text
stringlengths
2.85k
2.55M
label
class label
11 classes
Finding Approximate Local Minima Faster than Gradient Descent arXiv:1611.01146v4 [math.OC] 24 Apr 2017 Naman Agarwal Zeyuan Allen-Zhu Brian Bullins [email protected] [email protected] [email protected] Princeton University Institute for Advanced Study Princeton University Elad Hazan Tengyu Ma [email protected] [email protected] Princeton University Princeton University November 3, 2016 Abstract We design a non-convex second-order optimization algorithm that is guaranteed to return an approximate local minimum in time which scales linearly in the underlying dimension and the number of training examples. The time complexity of our algorithm to find an approximate local minimum is even faster than that of gradient descent to find a critical point. Our algorithm applies to a general class of optimization problems including training a neural network and other non-convex objectives arising in machine learning. 1 Introduction Finding a global minimizer of a non-convex optimization problem is NP-hard. Thus, the standard goal of efficient non-convex optimization algorithms is instead to find a local minimum. This problem has become increasingly important as the state-of-the-art in machine learning is attained by non-convex models, many of which are variants of deep neural networks. Experiments in [10, 11, 21] suggest that fast convergence to a local minimum is sufficient for training neural nets, while convergence to critical points (points with vanishing gradients) is not. Theoretical works have also affirmed the same phenomenon for other machine learning problems (see [5, 6, 18, 19] and the references therein). In this paper we give a provable linear-time algorithm for finding an approximate local minimum in smooth non-convex optimization. It applies to a general setting of machine learning optimization, and in particular to the optimization problem of training deep neural networks. Furthermore, the running time bound of our algorithm is the fastest known even for the more lenient task of computing a point with vanishing gradient (called a critical point), for a wide range of parameters. Formally, the problem of unconstrained mathematical optimization is stated in general terms as that of finding the minimum value that a function attains over Euclidean space, i.e. min f (x) . x∈Rd (1.1) If f is convex, the above formulation is convex optimization and is solvable in (randomized) polynomial time even if only a valuation oracle to f is provided. A crucial property of convex functions is that “local optimality implies global optimality”, allowing for greedy algorithms to reach the global optimum efficiently. Unfortunately, this is no longer the case if f is nonconvex; indeed, even a degree four polynomial can be NP-hard to optimize [23], or even just to check whether a point is not a local minimum [25]. Thus, for non-convex optimization one has to settle for the more modest goal of reaching approximate local optimality efficiently. Note that a particular interest to machine learning is the optimization of functions f : Rd 7→ R of the finite-sum form n 1X f (x) = fi (x) . (1.2) n i=1 Such functions arise when minimizing loss over a training set, where each example i in the set corresponds to one loss function fi in the summation. We say that the function f is second-order smooth if it has Lipschitz continuous gradient and Lipschitz continuous Hessian. We say that a point x is an ε-approximate local minimum if it satisfies (following the tradition of [28]): √ k∇f (x)k ≤ ε and ∇2 f (x)  − εI , where k · k denotes the Euclidean norm of a vector. We say that a point x is an ε-critical point if it satisfies the gradient condition above, but not necessarily the second-order condition. Critical points include saddle points in addition to local minima. We remark that ε-approximate local minima (even with ε = 0) are not necessarily close to any local minimum, neither in domain nor in function value. However, if we assume in addition the function satisfies the (robust) strict-saddle property [15, 24] (see Section 2 for the precise definition), then an ε-approximate local minimum is guaranteed to be close to a local minimum for sufficiently small ε. Our main theorem below states the time required for the proposed algorithm FastCubic to find an ε-approximate local minimum for second-order smooth functions. 1 Theorem (informal). Ignoring smoothness parameters, the running time of FastCubic to return an ε-approximate local minimum is !    n n3/4  1 + 7/4 · Th,1 for (1.2) or Õ · Th for the general (1.1). Õ ε3/2 ε ε7/4 Above, Th is the time to compute Hessian-vector product for ∇2 f (x) and Th,1 is that for an arbitrary ∇2 fi (x). The full statement of Theorem 1 can be found in Section 2. Hessian-vector products can be computed in linear time —meaning Th,1 = O(d) and Th = O(nd)— for many machine learning problems such as generalized linear models and training neural networks [1, 29]. We explain this more generally in Appendix A. Therefore, Corollary 1.1. Algorithm FastCubic returns an ε-approximate local minimum for the optimization problem of training a neural network in time ! nd n3/4 d Õ + 7/4 . ε3/2 ε Another important aspect of our algorithm is that even in terms of just reaching an ε-critical point, i.e. a point that satisfies k∇f (x)k ≤ ε without any second-order guarantee, FastCubic is faster than all previous results (see Table 1 for a comparison). The fastest methods to find critical points for a smooth non-convex function are gradient descent and its extensions, jointly known as first-order methods. These methods are extremely efficient in terms of per-iteration complexity; however, they necessarily suffer from a 1/ε2 convergence rate [27], to the best of our knowledge, in previous results only higher-order methods seem capable of breaking this 1/ε2 bottleneck [28]. For certain ranges of parameters, our FastCubic finds local minima even faster than first-order methods, even though they only find critical points. This is depicted in Table 1. Paper Gradient Descent (GD) SVRG [2] SGD [20] noisy SGD [16] a cubic regularization [28] Total Time Achieving k∇f (x)k ≤ ε  O nd ε2 2/3  O nd + n ε2 d  O εd4 O Õ this paper this paper  ndω−1 +dω ε3/2 Õ Õ dC1 ε4 nd ε3/2 nd ε7/4 +   n3/4 d ε7/4 Second-Order Guarantee n/a n/a n/a ∇2 f (x)  −ε1/C2 I ∇2 f (x)  −ε1/2 I  Table 1: Comparison of known methods. a Here C1 , C2 are two constants that are not explicitly written. We believe C1 ≥ 4. 2 ∇2 f (x)  −ε1/2 I ∇2 f (x)  −ε1/2 I 1.1 Related work Methods that Provably Reach Critical Points. Recall that only a gradient oracle is needed to reach a critical point. The most commonly used algorithm in practice for training non-convex learning machines such as deep neural networks is stochastic gradient descent (SGD), also known as stochastic approximation [30] and its derivatives. Some practical enhancements widely used in practice are based on Nesterov’s acceleration [26] and adaptive regularization [12]. The variance reduction technique, introduced in [32], was extremely successful in convex optimization, but only recently there was a non-convex counterpart with theoretical benefits introduced [2]. Methods that Provably Reach Local Minima. The recent work of Ge et al. [17] showed that a noise-injected version of SGD in fact converges to local minima instead of critical points, as long as the underlying non-convex function is strict-saddle. Their theoretical running time is a large polynomial in the dimension and not competitive with our method (see Table 1). The work of Lee et al. [24] shows that gradient descent, starting from a random point, almost surely converges to a local minimum of a strict-saddle function. The rates of convergence and precise step-sizes that are required are, however, yet unknown. If second-order information (i.e., the Hessian oracle) is provided, the cubic-regularization method 1 of Nesterov and Polyak [28] converges in O( ε3/2 ) iterations. However, each iteration of NesterovPolyak requires solving a cubic function which, in general, takes time super-linear in the input representation. One natural direction is to apply an approximate trust region solver, such as the linear-time solver of [22], to approximately solve the cubic regularization subroutine of Nesterov-Polyak. However, the approximation needed by a naive calculation makes this approach even slower than vanilla gradient descent. Our main challenge is to obtain approximate second-order local-minima and simultaneously improve upon gradient descent. Independently of this paper and concurrently1 , Carmon et al. [7] develop an accelerated gradient descent method that achieves the same running time for finding an approximate local minimum as in our paper. Remarkably, the same running time is obtained via a very different technique. 1.2 Our Techniques Our algorithm is based on the cubic regularization method of Nesterov and Polyak [8, 9, 28]. At a high level, cubic regularization states that if we can minimize a cubic function m(h) , g > h + 1 > L 3 2 2 h Hh + 6 khk exactly, where g = ∇f (x), H = ∇ f (x), and L is the second-order smoothness of the function f , then we can iteratively perform updates x0 ← x + h, and this algorithm converges to an ε-approximate local minimum in O(1/ε3/2 ) iterations. Unfortunately, solving this cubic minimization problem exactly, to the best of our knowledge, requires a running time of O(dω ) where ω is the matrix multiplication constant. Getting around this requires five observations. The first observation is that, minimizing m(h) up to a constant multiplicative approximation (plus a few other constraints) is sufficient for showing an iteration complexity of O(1/ε3/2 ).2 The proof techniques to show this observation are based on extending Nesterov and Polyak. The second observation is that the minimizer h∗ of m(h) must be of the form h∗ = (H+λ∗ I)+ g+ v, where λ∗ ≥ 0 is some constant satisfying H + λ∗ I  0, and v is the smallest eigenvector of H and + denotes the pseudo-inverse of a matrix. This can be viewed as moving in a mixture direction 1 To be precise, their manuscript appeared online approximately 24 hours before ours. More specifically, we need mt (h) ≤ C1 minh {mt (h)} for some constant C. In addition, we need to have good bounds on khk and k∇m(h)k. 2 3 between choosing h ← v, and choosing h to follow a shifted Newton’s direction h ← (H + λ∗ I)+ g. Intuitively, we wish to reduce both the computation of (H+λ∗ I)+ g and v to Hessian-vector products. The first task of computing (H + λ∗ I)+ g can be slow, and even if H + λ∗ I is strictly positivedefinite, computing it has a complexity depending on the (possibly huge) condition number of H + λ∗ I [34]. The third observation is that it suffices to pick some λ0 > λ∗ so both (1) the condition number of H + λ0 I is small and (2) the vectors (H + λ∗ I)−1 g and (H + λ0 I)−1 g are close. This relies on the structure of m(h). √ The second task of computing v has a complexity depending on 1/ δ where δ is the target √ additive error [13, 14]. The fourth observation is that the choice δ = ε suffices for the outer loop of cubic regularization to make sufficient progress. This reduces the complexity to compute v. Finally, finding the correct value λ∗ itself is as hard as minimizing mt (h). The fifth step is to design an iterative scheme that makes only logarithmic number of guesses on λ∗ . This procedure either finds the correct one (via binary search), or finds an approximate one, λ0 , but satisfying (H + λ∗ I)−1 g and (H + λ0 I)−1 g being sufficiently close. Putting all the observations together, and balancing all the parameters, we can obtain a cubic minimization subroutine (see FastCubicMin in Algorithm 2) that runs in time O(nd + n3/4 d/ε1/4 ). 2 Preliminaries and Main Theorem We use k · k to denote the Euclidean norm of a vector and the spectral norm of a matrix. For a symmetric matrix M we denote by λmax (M) and λmin (M) respectively the maximum and minimum eigenvalues of M. We denote by A  B that A − B is positive semidefinite (PSD). For a PSD matrix M, we denote by M+ its pseudo-inverse if M is not strictly positive definite. We make the following Lipschitz continuity assumptions for the gradient and Hessian of the target function f . Namely, there exist L2 , L > 0 such that ∀x, y ∈ Rd : k∇2 f (x)k ≤ L2 and k∇2 f (x) − ∇2 f (y)k ≤ Lkx − yk. (2.1) Definition 2.1. We assume the following complexity parameters on the access to f (x): • Let Tg ∈ R∗ be the time complexity to compute ∇f (x) for any x ∈ Rd .  • Let Th ∈ R∗ be the time complexity to compute ∇2 f (x) v for any x, v ∈ Rd . P Definition 2.2. We say that f is of finite-sum form if f = n1 ni=1 fi (x) and k∇2 fi (x)k ≤ L2 for each i ∈ [n]. In this case, we define Th,1 to be the time complexity to compute ∇2 fi (x) v for arbitrary x, v ∈ Rd and i ∈ [n]. Next we define the strict-saddle function for which an ε-approximate local minimum is almost equivalent to a local minimum [15, 24]. Definition 2.3 (strict saddle). Suppose f (·) : Rd → R is twice differentiable. For α, β, γ ≥ 0, we say f is (α, β, γ)-strict saddle if every x ∈ Rd satisfies at least one of the following three conditions: 1. k∇f (x)k ≥ α. 2. λmin (∇2 f ) ≤ −β. 3. There exists a local minimum x? that is γ-close to x in Euclidean distance. We see that if a function is (α, β, γ)-strict saddle, then for ε < min{α, β 2 } an ε-approximate local minimum is γ-close to some local minimum. 4 Algorithm 1 FastCubic(f, x0 , ε, L, L2 ) Input: f (x) that satisfies (2.1) with L2 and L; a starting vector x0 ; a target accuracy ε. 1/2 1: κ ← 900 . εL 2: for t = 0 to ∞ do > 2 3: mt (h) , ∇f (xt )> h + h ∇ 2f(xt )h + L6 khk3  4: (λ, v, vmin ) ← FastCubicMin ∇f (xt ), ∇2 f (xt ), L, L2 , κ min whichever gives smaller value for mt (h); h0 ← either v or λv2L 0 6: Set xt+1 , xt + h 3/2  c is a constant; we proved c = 2.4 ∗ 106 works 7: if mt (h0 ) > − cε√L then return xt+1 . 8: end for 5: 2.1 Main Results The finite-sum setting captures much of supervised learning, including Neural Networks and Generalized Linear Models. The main theorem which we show in our paper is as follows: Theorem 1. FastCubic (Algorithm 1) starts from a point x0 and outputs a point x such that √ k∇f (x)k ≤ ε and λmin (∇2 f (x)) ≥ − Lε in total time (denoting by D , f (x0 ) − f (x∗ ))  √  √ 1/4 • Õ Dε3/2L · Tg + DLε7/4 L2 · Th , or  √  √  3/4 1/4 • Õ Dε3/2L · Tg + nTh,1 + Dn εL7/4 L2 · Th,1 in the finite-sum setting (see Definition 2.2).  Here Õ hides logarithmic factors in L, L2 , 1/ε, d, and in maxx k∇f (x)k . Two Known Subroutines. Our running time of FastCubic relies on the following recent results for approximate matrix inverse and approximate PCA: Theorem 2.4 (Approximate Matrix Inverse). Suppose matrix M ∈ Rd×d satisfies kMk ≤ L2 and 2 λI + M  δI for constants λ, δ, L2 > 0. Let κ , λ+L δ . Then, we can compute vector x satisfying (2.2) x − (λI + M)−1 b ≤ εkbk,  using Accelerated gradient descent (AGD) in O κ1/2 log(κ/ε) iterations, each requiring O(d) time plus the time needed to multiply M with a vector. P Moreover, suppose M = n1 ni=1 Mi where each Mi is symmetric and satisfies kMi k ≤ L2 . If Mi b can be computed in time O(d0 ) for each i and vector b, then accelerated SVRG [4,  33] computes a vector x that satisfies equation (2.2) in time O max{n, n3/4 κ1/2 } · d0 · log2 (κ/ε) . We refer to the running time for this computation as Tinverse (κ, ε) and the algorithm as A. Above, the SVRG based running time shall be used only towards our finite-sum case in Definition 2.2. Theorem 2.5 (AppxPCA [3, 13, 14]). Let M ∈ Rd×d be a symmetric matrix with eigenvalues 1 ≥ λ1 ≥ · · · ≥ λd ≥ 0. With probability at least 1−p, AppxPCA produces a unit vector w satisfying w> M w ≥ (1 − δ× )(1 − ε)λmax (M) . The total running time is Õ(Tinverse (1/δ× , εδ× )). 3 Our Fast Cubic Regularization Algorithm Recall that the cubic regularization method of Nesterov and Polyak [28] studies the following upper bound on the change in objective value as we move from a point xt to xt + h: (it follows simply 5 from the Taylor series truncated to the third order) ∀h ∈ Rd : f (xt + h) − f (xt ) ≤ mt (h) , ∇f (xt )> h + h> ∇2 f (xt )h L + khk3 . 2 6 (3.1) Denote by h∗ an arbitrary minimizer of mt (h). We propose in this paper a subroutine FastCubicMin to minimizes mt (h) approximately. Note that FastCubicMin returns two vectors v and vmin . We min then choose h0 to be either v or λv2L , whichever gives a smaller value for mt (h). Before discussing the details of FastCubicMin, let us first state a main theorem for FastCubicMin:3 Theorem 2 (Guarantees of FastCubicMin). The algorithm FastCubicMin finds a vector h0 that satisfies (a) It produces a vector h0 satisfying mt (h0 ) ≤ 0 and either 3/2 3000mt (h0 ) ≤ mt (h∗ ) ε √ (b) If m(h∗ ) ≥ − 300 , then kh0 k ≤ kh∗ k + L √ √ε 4 L or and mt (h∗ ) ≥ − ε3/2 √ . 800 L k∇mt (h0 )k ≤ ε 2 . (c) FastCubicMin runs in time: (using Õ to hide logarithmic factors in L, L2 , 1/ε, d, k∇f (xt )k)  √  2 • Õ (εL)L1/4 · Th where Th is the time to multiply ∇2 f (xt ) to a vector;   √  2 • Õ max n, n3/4 (εL)L1/4 · Th,1 where Th,1 is the time to multiply ∇2 fi (xt ) with a vector. Above, the first guarantee promises that we are either done (because mt (h∗ ) is close to zero), or we obtain a 1/3000 multiplicative approximation to mt (h∗ ). Our second guarantee in Theorem 2 promises that when we are done (because mt (h∗ ) is close to zero), the output vector h0 and h∗ are roughly similar in Euclidean norm and have a small gradient k∇mt (h0 )k. Our third guarantee gives the time complexity of FastCubicMin. Now, our final algorithm FastCubic for finding the ε-approximate local minimum of f (x) is included in Algorithm 1. It simply iteratively calls FastCubicMin to find an approximate minimizer, 3/2 and it then stops whenever mt (h0 ) > − cε√L for some large constant c. Roadmap. In Section 4 we show why Theorem 2 implies Theorem 1. All the remaining sections are for the purpose of proving Theorem 2. Because our FastCubicMin is very technical, instead of stating what the algorithm is right away, we decide to take a different path. In Section 5, we first state a lemma characterizing “what h∗ looks like”. In Section 6, we provide a set of sufficient conditions which “look similar” to the characterization of h∗ , and show that as long as these conditions are met, Theorem 2-a and 2-b follow easily. Finally, in Section 7, we state FastCubicMin and explain why it satisfies these sufficient conditions and why it runs in the aforementioned time. 4 Theorem 2 implies Theorem 1 In this section, we show that Theorem 2 implies Theorem 1. It relies on the following lemma (proved in Appendix B) regarding the sufficient condition for us to reach an ε-approximate local minimum. 3 To present the simplest result, we have not tried to improve the constant dependency in this paper. 6 3/2 ε √ Lemma 4.1. If mt (h∗ ) ≥ − 800 and h0 is an approximate minimizer of mt (h) satisfying L √ √ε 4 L k∇mt (h0 )k ≤ 2ε , √ then we have that k∇f (xt + h0 )k ≤ ε and λmin (∇2 f (xt + h0 )) ≥ − Lε. kh0 k ≤ kh∗ k + and 3/2 Proof of Theorem 1 from Theorem 2. When FastCubic terminates, we have mt (h0 ) > − cε√L ; there3/2 ε √ fore, it satisfies mt (h∗ ) ≥ − 800 according to Theorem 2-a. Combining this with Theorem 2-b and L Corollary 4.1, we conclude that in the last iteration of FastCubic, our output satisfies k∇f (xt +h0 )k ≤ √ ε and λmin (∇2 f (xt + h0 )) ≥ − Lε. This finishes the proof with respect to the accuracy conditions. As for the running time, in every iteration except for the last one, FastCubic satisfies mt (h0 ) ≤ 3/2  3/2  √ √ . Therefore by (3.1), we must have decreased the objective by at least Ω −ε in this −Ω −ε L L √ (f (x0 )−f ∗ ) L  round, and this cannot happen for more than O iterations. The final running time ε3/2 of FastCubic follows from this bound together with Theorem 2-c. Therefore, in the rest of the paper it suffices to study FastCubicMin and prove Theorem 2. 5 Characterization Lemma of the Minimizer h∗ For notational simplicity in this and the subsequent sections we focus on the following problem: minimize h> Hh L + khk3 2 6 where H is a symmetric matrix with kHk2 ≤ L2 . m(h) , g > h + Recall from the previous section that we have denoted by h∗ an arbitrary minimizer of m(h). We have the following lemma which characterizes h∗ : (a variant of this lemma has appeared in [8], and we prove it in the appendix for the sake of completeness) Lemma 5.1. We have h∗ is a minimizer of m(h) if and only if there exists λ∗ ≥ 0 such that 2λ∗ . H + λ∗ I  0 , (H + λ∗ I)h∗ = −g , kh∗ k = L The objective value in this case is given by 1 2(λ∗ )3 m(h∗ ) = − g > (H + λ∗ I)+ g − ≤0 . 2 3L2 The following corollary comes from Lemma 5.1 and its proof: Corollary 5.2. The value λ∗ in Lemma 5.1 is unique, and for every λ satisfying H + λI  0, we have 2λ 2λ k(H + λI)−1 gk > ⇐⇒ λ∗ > λ and k(H + λI)−1 gk < ⇐⇒ λ∗ < λ . L L In the above characterization, we have a crude upper bound on λ∗ : p  Proposition 5.3. We have λ∗ ≤ B , max 2L2 + Lkgk, 1 with λ∗ defined in Lemma 5.1. Proof. We have Lk(H + BI)−1 gk ≤ Corollary 5.2. Lkgk λmin (H+BI) 7 ≤ Lkgk B−L2 < 2B and therefore λ∗ ≤ B due to 6 Sufficient Conditions for Theorem 2-a and 2-b Without worrying about the design of FastCubicMin at this moment, let us first state a set of sufficient conditions under which the assumptions in Theorem 2-a can be satisfied. Main Lemma 1. Consider an algorithm that outputs a real λ ∈ [0, 2B], a vector v ∈ Rd , and a unit vector vmin ∈ Rd . Additionally, suppose numbers κ, ε̃ ≥ 0 satisfying the following conditions: 1 1 (6.1) ε̃ ≤ 10000 (max {κ, L, L2 , kgk, k(H + λI)−1 k, B})20 (H + (λ − Lε̃)I)−1  0 Moreover, suppose that the outputs (λ, v, vmin ) satisfy one of the following two cases: Case 1: Lk(H + λI)−1 gk ∈ [2λ − 2Lε̃, 2λ + 2Lε̃] kv + (H + λI)−1 gk ≤ ε̃ and Case 2: The following conditions are satisfied: (a) λ ≥ λ∗ and λ + λmin (H) ≤ κ1 (b) Lk(H + λI)−1 gk ≤ 2λ and kv + (H + λI)−1 gk ≤ ε̃ 1 > Hv (c) vmin min ≤ λmin (H) + 10κ  min Then, at least one of the two choices h0 ∈ v, λv2L satisfy either m(h∗ ) ≥ 3000m(h0 ) or (6.2) m(h∗ ) ≥ − 32 . κ3 L2 Let us compare such sufficient conditions to the characterization Lemma 5.1. • In Case 1, up to a very small error ε̃, we have essentially found a vector v that satisfies ∗ v ≈ −(H + λI)−1 g and kvk ≈ 2λ L . Therefore, this v should be close to h for obvious reason. (This is the simple case.) • In Case 2, we have only found a vector v that satisfies v ≈ −(H + λI)−1 g and kvk . 2λ L . In this case, we also compute an approximate lowest eigenvector vmin of λmin (H) up to an additive 1/10κ accuracy (see case 2-c). We will make sure that, as long as the conditions in min 2-a hold, then either v or λv2L will be an approximate minimizer for mt (h). (This is the hard case.) Proof of Main Lemma 1. We first consider Case 1. According to Corollary 5.2, if ε̃ = 0 then v is a minimizer of m(h). The following claim extends this argument to the setting when ε̃ > 0: Claim 6.1. If λ and v satisfy Case 1 and ε̃ satisfies (6.1), then m(v) ≤ m(h∗ ) + 1 250κ3 L2 From the above lemma it follows that either m(h∗ ) ≥ − κ38L2 otherwise m(h∗ ) ≥ 1.1m(v) which satisfies the conditions of the theorem. We now consider Case 2, and in this case we make the following two claims: n  o min Claim 6.2. If λmin (H) ≤ − κ1 then m(h∗ ) ≥ 1500 min m(v), m λv2L − 500κ13 L2 . Claim 6.3. If λmin (H) ≥ − κ1 then m(h∗ ) ≥ 2m(v) − 16 κ3 L2 . Lemma 1 now follows from the two claims because we can output the vector h0 which has the min lowest value of m(h0 ) amongst the two choices h0 ∈ v, λ v2d . This satisfies either m(h∗ ) ≥ 3000m(h0 ) or m(h∗ ) ≥ − κ332L2 . The missing proofs of the three claims are deferred to Appendix D. 8 The next main lemma shows that, under the same sufficient conditions as Main Lemma 1, we also have that Theorem 2-b holds. (Its proof is contained in Appendix E.) 3/2 ε √ Main Lemma 2. In the same setting as Main Lemma 1, suppose m(h∗ ) ≥ − 300 . Then the L output vector v satisfies the following conditions: 3 ε 15 kvk ≤ kh∗ k + and k∇m(v)k ≤ + 2 . κL 4 κ L 7 Main Algorithms for Theorem 2 We are now ready to state our main algorithm FastCubicMin and sketch why it satisfies the sufficient conditions in Main Lemma 1. As described in Algorithm 2, our algorithm starts with a very large choice λ0 ← 2B and decreases it gradually. At each iteration i, it computes an approximate inverse v satisfying kv + (H + λi I)−1 gk ≤ ε̃ with respect to the current λi . Then there are three cases, depending on whether Lkvk is approximately equal to, larger than, or smaller than 2λi . At a high level, if it is “equal”, then we have met Case 1 in Main Lemma 1; if it is “larger”, then we can binary search the correct value of λ∗ in the interval [λi , λi−1 ]; and if it is “smaller”, then we need to compute an approximate eigenvector and carefully choose the next point λi+1 . We state our main lemma below regarding the correctness and running time of FastCubicMin. Main Lemma 3. FastCubicMin in Algorithm 2 outputs a real λ ∈ [0, 2B], a vector v ∈ Rd , and a unit vector vmin ∈ Rd satisfying one of the two sufficient conditions in Main Lemma 1. We also have that the procedure can be implemented in a total running time of  √ • Õ κL2 · Th if Accelerated Gradient Descent is used in Theorem 2.4 to invert matrices.  √ • Õ max{n, n3/4 κL2 }·Th,1 if we use accelerated SVRG as the subprocedure A in Theorem 2.4. Here Õ hides logarithmic factors in L, L2 , κ, d, B. We prove the correctness half of Main Lemma 3, and defer its running time analysis to Appendix G. 7.1 Correctness Half of Main Lemma 3 We will now establish the correctness of our algorithm. We first observe that the BinarySearch subroutine returns (λ, v, ∅) that satisfies Case 1 of Main Lemma 1. Fact 7.1. BinarySearch outputs a pair λ and v such that Lk(H + λI)−1 gk ∈ [2λ − 2Lε̃, 2λ + 2Lε̃] and kv + (H + λI)−1 gk ≤ ε̃ . Proof. The latter is guaranteed by line 3 in BinarySearch, and the former is implied by the latter because     Lk(H + λI)−1 gk ∈ Lkvk − Lε̃/2, Lkvk + Lε̃/2 ⊆ 2λ − 2Lε̃, 2λ + 2Lε̃ . We also establish the following invariants regarding the values λi . (Proof in Appendix F.) Lemma 7.2. The following statements hold for all i until FastCubicMin terminates (a) λi ∈ [0, 2B], λi + λmax (H) ≤ 3B (b) λi + λmin (H) ≥ (c) λi+1 + λmin (H) 3 10κ ≤ 34 (λi + λmin (H)) unless λi+1 = 0 Moreover when FastCubicMin terminates at Line 20 we have λi + λmin (H) ≤ κ1 . We now prove the output (λ, v, vmin ) of FastCubicMin satisfies the sufficient conditions of Main Lemma 1. 9 Algorithm 2 FastCubicMin(g, H, L, L2 , κ) (main algorithm for cubic minimization) Input: g a vector, H a symmetric matrix, parameters κ, L and L2 which satisfies −L2 I  H  L2 I. Output: (λ, v,p vmin ) 1 1: B ← L2 + Lkgk + κ .   20  2: ε̃ ← 1/ 10000 max L, kgk, 3κ , B, 1 10 3: λ0 ← 2B. 4: for i = 0 to ∞ do 5: Compute v such that kv + (H + λi I)−1 gk ≤ ε̃. 6: if Lkvk ∈ [2λi − Lε̃, 2λi + Lε̃] then 7: return (λi , v, ∅). 8: else if Lkvk > 2λi + Lε̃ then 9: return BinarySearch(λ1 = λi−1 , λ2 = λi , ε̃). 10: else if Lkvk < 2λi − Lε̃ then 11: Let Power Method find vector w that is 9/10-appx leading eigenvector of (H + λi I)−1 : 9 10 λmax ((H 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: + λi I)−1 ) ≤ w> (H + λi I)−1 w ≤ λmax ((H + λi I)−1 ) . 1 Compute a vector w̃ such that kw̃ − (H + λi I)−1 wk ≤ ε̂ , 60B . 1 ∆ ← 21 w̃> w−ε̂ . 1 if ∆ > 2κ then λ̃i+1 ← λi − ∆ 2. if λ̃i+1 > 0 then λi+1 ← λ̃i+1 else λi+1 ← 0 else > Hv Use AppxPCA to find any unit vector vmin such that vmin min ≤ λmin (H) + > Flip the sign of vmin so that g vmin ≤ 0. return (λi , v, vmin ). end if end if end for Algorithm 3 BinarySearch(λ1 , λ2 , ε̃) (binary search subroutine) Input: λ1 ≥ λ2 , Lk(H + λ1 I)−1 gk ≤ 2λ1 , Lk(H + λ2 I)−1 gk ≥ 2λ2 , λ2 + λmin (H) > 0 Output: (λ, v, ∅) 1: for t = 1 to ∞ do 2 2: λmid ← λ1 +λ 2 3: Compute vector v such that kv + (H + λmid I)−1 gk ≤ ε̃/2 4: if Lkvk ∈ [2λmid − Lε̃, 2λmid + Lε̃] then 5: return (λmid , v, ∅) 6: else if Lkvk + Lε̃ ≤ 2λmid then 7: λ1 ← λmid 8: else if Lkvk − Lε̃ ≥ 2λmid then 9: λ2 ← λmid 10: end if 11: end for 10 1 10κ . Correctness Proof of Main Lemma 3. We carefully verify these sufficient conditions: • Lemma 7.2 implies λi ∈ [0, 2B]. 3 from Lemma 7.2 implies k(H + λi I)−1 k ≤ 4κ. It is now immediate that • λi + λmin (H) ≥ 10κ the choice of ε̃ on Line 2 satisfies the Condition (6.1) in the assumption of Main Lemma 1. 1 • Since ε̃ ≤ 10κL and λi + λmin (H) ≥ Condition (6.2) in Main Lemma 1. 3 10κ it follows that (H + (λi − Lε̃)I)−1  0 which proves • We now verify Case 1 and 2 in the assumption of Main Lemma 1. At the beginning of the algorithm, our choice λ0 = 2B ensures (using Proposition 5.3) that Lk(H + λ0 I)−1 gk < 2λ0 . Let us now consider the various places where the algorithm outputs: – If FastCubicMin terminates at Line 7, then we have kv + (H + λi I)−1 gk ≤ ε̃ and additionally   Lk(H + λi I)−1 gk ∈ Lkvk − Lε̃, Lkvk + Lε̃ ⊆ [2λi − 2Lε̃, 2λi + 2Lε̃] . Therefore, the output meets Case 1 requirement of Main Lemma 1 with λ = λi . – If FastCubicMin terminates at Line 9, then Lk(H + λi I)−1 gk > Lkvk − Lε̃ ≥ 2λi . Obviously, we must have i ≥ 1 in this case because Lk(H + λ0 I)−1 gk < 2λ0 . Therefore, Line 10 must have been reached at the previous iteration, so it implies Lk(H + λi−1 I)−1 gk < 2λi−1 . Together, these two imply that we can call BinarySearch with (λi−1 , λi ). Owing to Fact 7.1, the subroutine outputs a pair (λ, v) satisfying the Case 1 requirement of Main Lemma 1. – If FastCubicMin terminates on Line 20, we verify that Case 2 of Main Lemma 1 with λ = λi holds. We first have Lk(H + λi I)−1 gk ≤ Lkvk + Lε̃ ≤ 2λi . By Corollary 5.2, we also have that λi ≥ λ∗ . Lemma 7.2 tells us λi satisfies λi +λmin (H) ≤ κ1 . 1 > Hv Vector v satisfies kv + (H + λi I)−1 gk ≤ ε̃. Vector vmin satisfies vmin min ≤ λmin (H) + 10κ . In sum, we have verified that all the assumptions of Main Lemma 1 hold. Final Proof of Theorem 2. Theorem 2 is a direct corollary of our main lemmas. Main Lemma 3 ensures that the assumptions of Main Lemma 1 and Main Lemma 2 both hold. Now, using the special choice of κ in FastCubic, Theorem 2-a immediately comes from Main Lemma 1; Theorem 2-b immediately comes from Main Lemma 2; and Theorem 2-c immediately comes from Main Lemma 3. This finishes the proof of Theorem 2. Acknowledgements We thank Ben Recht for very helpful suggestions and corrections to a previous version. Z. Allen-Zhu is supported by an NSF Grant, no. CCF-1412958, and a Microsoft Research Grant, no. 0518584. 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 NSF or Microsoft. Appendix A Computing Hessian-Vector Product in Linear Time In this section we sketch the intuition regarding why Hessian-vector products can be computed in linear time in many interesting (especially machine learning) problems. We start by showing that the gradient can be computed in linear time. The algorithm is often referred to as back-propagation, 11 which dates back to Werbos’s PhD thesis [35], and has been popularized by Rumelharte et al. [31] for training neural networks. Claim A.1 (back-propagation, informally stated). Suppose a real-valued function f : Rd → R can be evaluated by a differentiable circuit of size N . Then, the gradient ∇f can be computed in time O(N + d) (using a circuit of size O(N + d)). 4 The claim follows from simple induction and chain-rule, and is left to the readers. In the training of neural networks, often the size of circuits that computes the objective f is proportional to (or equal to) the number of parameters d. Thus the gradient ∇f can be computed in time O(d) using a circuit of size d. Next, we consider computing ∇2 f (x) · v where v ∈ Rd . Let g(x) := h∇f (x), vi be a function from Rd to R. Then, we see that if suffices to compute the gradient of g, since ∇2 f (x) · v = ∇g(x) . We observe that g(x) can be evaluated in linear time using circuit of size O(d) since we’ve shown ∇f (x) can. Thus, using Claim A.1 again on function g, 5 we conclude that ∇g(x) can also be computed in linear time. B Proof of Lemma B.1 and Corollary 4.1 Lemma B.1. For all h0 ∈ Rd , it satisfies k∇f (xt +h0 )k ≤ Lkh0 k2 +k∇mt (h0 )k and λmin (∇2 f (xt +h0 )) ≥ −  3L2 max{0,−mt (h∗ )} 2 1/3 −Lkh0 k . Proof of Lemma B.1. Let us denote by g = ∇f (xt ) and H = ∇2 f (xt ) in this proof. We begin by proving the first order condition. Note that we have ∇mt (h) = g + Hh + L2 khkh . Recall h∗ is a minimizer of argmin mt (h). The characterization result in Lemma 5.1 shows H + Lkh∗ k 2 I  0, and thus L g > h∗ + (h∗ )> Hh∗ + kh∗ k3 = ∇mt (h∗ )> h∗ = 0 (B.1) 2   Lkh∗ k L 3 ∗ > ∗ > ∗ (h ) Hh + khk = (h ) H+ I h∗ ≥ 0 . (B.2) 2 2 They imply (h∗ )> Hh∗ Lkh∗ k3 ¬ (h∗ )> Hh∗ L ∗ 3 + =− − kh k 2 6 2 3 ­ L L L ≤ kh∗ k3 − kh∗ k3 = − kh∗ k3 4 3 12 where ¬ uses (B.1) and ­ uses (B.2). mt (h∗ ) = g > h∗ + We compute the norm of the gradient at a point xt + h0 for any h0 ∈ Rd : k∇f (xt + h0 )k ≤ k∇f (xt + h0 ) − ∇mt (h0 )k + k∇mt (h0 )k Z 1   L = ∇f (xt ) + ∇2 f (xt + τ h0 )h0 dτ − g + Hh0 + kh0 kh0 + k∇mt (h0 )k 2 0 4 5 Technically, we assume that the gradient of each gate can be computed in O(1) time We assume here that the original circuits are twice differentiable 12 (B.3) Z 1  L ∇2 f (xt + τ h0 ) − H h0 dτ + kh0 k2 + k∇mt (h0 )k 2 0 Z 1 ® L τ dτ + kh0 k2 + k∇mt (h0 )k = Lkh0 k2 + k∇mt (h0 )k ≤ Lkh0 k2 (B.4) 2 0 where ® follows from the Lipschitz continuity on the Hessian (2.1). This proves the first conclusion of the lemma. ≤ As for the second-order condition, we first note that for all h0 ∈ Rd , by the Lipschitz continuity on the Hessian (2.1), we have k∇2 f (xt + h0 ) − ∇2 f (xt )k ≤ Lkh0 k. However, this implies λmin (∇2 f (xt + h0 )) ≥ λmin (∇2 f (xt )) − Lkh0 k . (B.5) λmin (∇2 f (xt + h0 )) ≥ −Lkh0 k . (B.6) because if two matrices A and B satisfies kA−Bk ≤ p, then it must satisfy λmin (A)−λmin (B) ≤ p as well. We consider two cases: if λmin (∇2 f (xt )) ≥ 0, then we have Otherwise, we consider the case where λmin (∇2 f (xt )) = λmin (H) < 0. Let νd be the normalized eigenvector corresponding to λmin (H), and define 2λmin (H) h̃ , sign(g > νd ) · νd . L We calculate mt (h̃) as follows: h̃> Hh̃ L 4|λmin (H)|3 h̃> Hh̃ L 2(λmin (H))2 > Hν + + kh̃k3 ≤ + kh̃k3 = ν d d 2 6 2 6 L2 3L2 3 3 3 4|λmin (H)| ­ 2(λmin (H)) ¬ 2(λmin (H)) + = , (B.7) = L2 3L2 3L2 where ¬ uses νd> Hνd = λmin (H) < 0, and ­ uses the assumption that λmin (H) < 0. Since by definition mt (h∗ ) ≤ mt (h̃), we can deduce from inequality (B.7) that  2 1/3 3L |mt (h∗ )| 2 λmin (∇ f (xt )) = λmin (H) ≥ − . (B.8) 2 Now we put together inequalities (B.5) and (B.8), and obtain  2 1/3 3L |mt (h∗ )| 2 0 λmin (∇ f (xt + h )) ≥ − − Lkh0 k . (B.9) 2 Combining (B.6) and (B.9) we finish the proof of Lemma B.1. mt (h̃) = g > h̃ + 3/2 ε √ Corollary 4.1. If mt (h∗ ) ≥ − 800 and h0 is an approximate minimizer of mt (h) satisfying L √ √ε 4 L k∇mt (h0 )k ≤ 2ε , √ then we have that k∇f (xt + h0 )k ≤ ε and λmin (∇2 f (xt + h0 )) ≥ − Lε. kh0 k ≤ kh∗ k + and 3/2 ε √ , along with inequality Proof of Corollary 4.1. First of all, our assumption that mt (h∗ ) ≥ − 800 L √ √ (B.3), tells us that kh∗ k ≤ 4√εL . This, together with our assumption on kh0 k, implies kh0 k ≤ 2√εL . Since we also assume k∇mt (h0 )k ≤ 2ε , we have from Lemma B.1 that ε ε k∇f (xt + h0 )k ≤ Lkh0 k2 + k∇mt (h0 )k ≤ + ≤ ε . 4 2 For the second-order condition, we can again apply Lemma B.1 to get !1/3 √  2 1/3 √ 3L max{0, −mt (h∗ )} Lε 3L3/2 ε3/2 2 0 0 λmin (∇ f (xt + h )) ≥ − − Lkh k ≥ − − ≥ − Lε . 2 1600 2 13 C Proof of Lemma 5.1 and Corollary 5.2 We begin by proving a few lemmas that characterize the system of equations. Lemma C.1. Consider the following system of equations/inequalities in variables λ, h: 2λ H + λI  0 , (H + λI)h = −g , khk = . L The following statements hold for any solution (λ0 , h0 ) of the above system: (C.1) • There is a unique value λ0 that satisfies the above equations. λ0 is such that λ0 ≥ −λmin (H). • If λ0 > −λmin (H), then the corresponding h0 is also unique and is given by h0 = −(H + λI)−1 g. • If λ0 = −λmin (H) then g > v = 0 for any vector v belonging to the eigenspace corresponding to λmin (H). Subsequently we also have that the corresponding h0 is of the form h0 = −(H + λI)+ g + γv for some γ and v in the lowest eigenspace of H. Proof of Lemma C.1. Note that H + λI  0 ensures that for any solution λ0 , we have λ0 ≥ −λmin (H). Furthermore, for any λ0 > −λmin (H), the corresponding h is uniquely defined by h = (H + λI)−1 g since H + λ0 I is invertible. If indeed λ0 = −λmin (H), then we have that the equation (H − λmin (H)I)h = −g has a solution. This implies that g has no component in the null space of H − λmin (H)I, or equivalently that it has no component in the eigenspace corresponding to λmin (H). We also have that every solution of (H − λmin (H)I)h = −g is necessarily of the form h = −(H − λmin I)+ g + γv for some γ and v in the lowest eigenspace of H. We will now prove the uniqueness of λ0 by contradiction. Consider two distinct values of λ1 , λ2 that satisfy the system (C.1). If both λ1 , λ2 > −λmin (H) we get that 2λ2 2λ1 and k(H + λ2 I)−1 gk = . k(H + λ1 I)−1 gk = L L Now note that k(H + λI)−1 gk is a strictly decreasing function over the domain λ ∈ (−λmin (H), ∞) and 2λ L is strictly increasing over the same domain. Therefore the above two equations cannot be satisfied for two distinct λ1 , λ2 > −λmin (H) which is a contradiction. Suppose now without loss of generality that λ1 = −λmin (H). Then we have that the corresponding solution is of the form h = −(H + λI)+ g + γv for some γ and v in the lowest eigenspace of H and g has no component in the lowest eigenspace of H. It follows that k(H − λmin (H)I)+ gk ≥ k(H + λI)−1 gk for any λ > −λmin (H). By a similar argument as in the first case, we can now see that the following conditions, 2λ1 2λ2 k(H + λ1 I)+ g + γvmin (H)k = and k(H + λ2 I)−1 gk = , L L cannot both be satisfied for λ2 > λ1 = −λmin (H), giving us a contradiction. This finishes the proof of Lemma C.1. Lemma C.2. Let (λ, h) be a solution of the system (C.1). Then we have that 1 2λ3 m(h) = − g > (H + λI)+ g − . 2 3L2 14 Proof of Lemma C.2. By the definition of the system (C.1), any solution λ, h to the system should be such that there exists some γ such that h = (H + λI)+ g + γv0 where v0 is in the null space of H + λI if it exists; otherwise γ = 0. This gives us the following: h> Hh L m(h) = g > h + + khk3 2 6 1 > λ L ¬ = − h (H + λI)h − khk2 + khk3 2 2 6 3 2λ 1 ­ . = − g > (H + λI)+ g − 2 3L2 Equality ¬ follows because (H + λI)h = −g. Equality ­ follows because h = (H + λI)+ g + γv0 and khk = 2λ L. Lemma 5.1. h∗ is a minimizer of m(h) if and only if there exists λ∗ ≥ 0 such that 2λ∗ . H + λ∗ I  0 , (H + λ∗ I)h∗ = −g , kh∗ k = L The objective value in this case is given by 1 2(λ∗ )3 m(h∗ ) = − g > (H + λ∗ I)+ g − ≤0 . 2 3L2 Proof of Lemma 5.1. We first compute that ∇m(h) = g + Hh + L L L khkh and ∇2 m(h) = H + khkI + khk 2 2 2  h khk  h khk > . For the forward direction, suppose h∗ is a minimizer of m(h). Let λ∗ = L2 kh∗ k. Then, the necessary conditions ∇m(h∗ ) = 0 and ∇2 m(h∗ )  0 can be written as  ∗   ∗ > ! h h ∗ ∗ > ∗ ∗ g + (H + λ I)h = 0 and w H+λ I+λ w ≥ 0, ∀w ∈ Rn . (C.2) kh∗ k kh∗ k From this we see (H + λ∗ I)h∗ = −g and kh∗ k = 2λ∗ L , and the only thing left to verify is H + λ∗ I  0. Note that if h∗ = 0, then the second inquality in (C.2) directly implies H + λ∗ I  0. Thus, we only need to focus on h∗ 6= 0. We want to show that w> (H + λ∗ I)w ≥ 0 for every w ∈ Rd . Now, if w> h∗ = 0 then this trivially follows from (C.2), so it suffices to focus on those w that satisfies w> h∗ 6= 0. Since w and h∗ are not orthogonal, there exists γ ∈ R\{0} such that kh∗ + γwk = kh∗ k. (This can be done by squaring both sides and solving the linear system in λ.) Squaring both sides we have γ 2 kwk2 =0 . (C.3) (γw)> h∗ + 2 Now we bound the difference (h∗ + γw)> H(h∗ + γw) h∗ Hh∗ m(h∗ + γw) − m(h∗ ) = g > ((h∗ + γw) − h∗ ) + − 2 2 ∗ + γw)> H(h∗ + γw) h∗ Hh∗ (h ¬ − = (h∗ − (h∗ + γw))> (H + λ∗ I)h∗ + 2 2 ∗ 2 ∗ + γw)> H(h∗ + γw) (h h∗ Hh∗ ­ λ γ = kwk2 + (h∗ − (h∗ + γw))> Hh∗ + − 2 2 2 ∗ Hh∗ ∗ + γw)> H(h∗ + γw) λ∗ γ 2 h (h = kwk2 + − (h∗ + γw)> Hh∗ + 2 2 2 15 λ∗ γ 2 γ2 γ2 > kwk2 + w> Hw = w (H + λ∗ I)w , (C.4) 2 2 2 where ¬ and ­ follow from (C.2) and (C.3), respectively. Since h∗ is a minimizer of m(h), we immediately have γ2 > m(h∗ + γw) − m(h∗ ) = w (H + λ∗ I)w ≥ 0, 2 and we conclude that (H + λ∗ I)  0. = For the backward direction, we will make use Lemma C.1 and Lemma C.2. First we note that the function m(h) is continuous and bounded from below, and there exists at least one minimizer h∗ . Suppose now there exists a λ∗ and a corresponding h∗ such that (λ∗ , h∗ ) is a solution to the system C.1. The backward direction requires us to prove that h∗ must be a minimizer of m(h). By Lemma C.1 we get the following two cases. We prove the backward direction by showing that the conditions in Equation C.2 determine the minimizer up to its norm. To this end we will use Lemma C.1 and Lemma C.2. First we note that the function m(h) is continuous, bounded from below, and tends to +∞ when khk → ∞, so there exists at least one minimizer h∗ . Suppose now there exists a λ∗ and a corresponding h∗ such that (λ∗ , h∗ ) is a solution to the system (C.1). The backward direction requires us to prove that h∗ must be a minimizer of m(h). By Lemma C.1 we get the following two cases. • If λ∗ > −λmin (H) then (λ∗ , h∗ ) is the only solution to the system (C.1). By the proof of the forward direction we see that any minimizer of m(h) must satisfy system (C.1) and therefore h∗ must be the minimizer. • If above is not the case, then λ∗ = −λmin (H). Let h0 be any minimizer of m(h). Lemma C.1 and the proof of the forward direction ensures that (λ∗ , h0 ) also satisfies the system (C.1). By Lemma C.2 we get m(h∗ ) = m(h0 ) and therefore h∗ is a minimizer too. Corollary 5.2. This value λ∗ is unique, and for every λ satisfying H + λI  0, we have 2λ 2λ k(H + λI)−1 gk > ⇐⇒ λ∗ > λ and k(H + λI)−1 gk < ⇐⇒ λ∗ < λ . L L Proof of Corollary 5.2. The uniqueness of λ∗ follows from Lemma C.1. To prove the second part we first make some observations about the function 2y p(y) , − k(H + yI)−1 gk L defined on the domain y ∈ (−λmin (H), ∞). Note that p(y) is continuous and strictly increasing over the domain and p(y) → ∞ as y → ∞. The corollary requires us to show that p(λ) < 0 ⇐⇒ λ∗ > λ and p(λ) > 0 ⇐⇒ λ∗ < λ . We begin by showing the first equivalence. To see the backward direction note that if λ∗ > λ > ∗ −λmin (H), by the characterization of λ∗ in Lemma C.1 we have that k(H + λ∗ I)−1 gk = 2λL i.e. p(λ∗ ) = 0 which implies that p(λ) < 0 as p(y) is a strictly increasing function. For the forward direction note that since p(y) is continuous and strictly increasing we see that the range of the function contains [p(λ), ∞). Since p(λ) < 0 there must exist a λ∗ > λ such that p(λ∗ ) = 0 which by the characterization in Lemma C.1 finishes the proof. Now we will prove that p(λ) > 0 ⇐⇒ λ∗ < λ. To see the forward direction note that if λ∗ ≥ λ then p(λ∗ ) = 0 and p(λ) > 0 which contradicts the fact that p(y) is strictly increasing. For the 16 backward direction we consider two cases. Firstly if λ∗ > −λmin (H) the conclusion follows similarly by the monotonicity of p(y). If λ∗ = −λmin then by Lemma C.1, we have that g has no component in the lowest eigenspace of H and therefore if we extend p(y) to −λmin (H) by defining −2λmin (H) p(−λmin (H)) , − k(H − λmin (H)I)+ gk L we get that p(y) is increasing in the domain y ∈ [−λmin (H), ∞). Now from the characterization of the solution in Lemma C.1 we can see that p(−λmin (H)) ≥ 0 and therefore by monotonicity p(λ) > 0. This finishes the proof. D Proof of Main Lemma 1 D.1 Proof of Claim 6.1 Claim 6.1. If λ and v satisfy Case 1 and ε̃ satisfies (6.1), then m(v) ≤ m(h∗ ) + 1 250κ3 L2 Proof of Claim 6.1. Note that by the conditions of the theorem we have that (H+(λ−Lε̃)I)−1  eq and Lk(H + (λ − Lε̃)I)−1 gk ≥ 2λ − 2Lε̃ and Lk(H + (λ + Lε̃)I)−1 gk ≤ 2λ − 2Lε̃ , according to Corollary 5.2 we must have λ∗ ∈ [λ − Lε̃, λ + Lε̃] (D.1) This also implies (using our assumption on ε̃) Next, consider the value m(v) Lkvk ≤ [2λ∗ − 5Lε̃, 2λ∗ + 5Lε̃] .   v > Hv L v > (H + λI)v λ Lkvk + kvk3 = g > v + − kvk2 − . 2 6 2 2 6 We bound the two parts on the right hand side of (D.2) separately. The first part m(v) = g > v + (D.2) v > (H + λI)v g > (H + λI)−1 g k(H + λI)−1 kε̃2 ≤− + kgkε̃ + k(H + λI)−1 gkε̃ + 2 2 2 > −1 ¬ g (H + λI) g 1 ≤− + (D.3) 2 1000κ3 L2 ­ g > (H + λ∗ I)−1 g 1 + Lkgk2 k(H + λI)−1 kk(H + (λ + 2Lε̃)I)−1 kε̃ + ≤− 2 1000κ3 L2 > ∗ −1 ® g (H + λ I) g 1 ≤− + 2 500κ3 L2 Above, inequalities ¬ and ® use the assumption on ε̃ in (6.1), and inequality ­ uses g>v + −(H + λI)−1  −(H + (λ∗ + Lε̃)I)−1 = −(H + λ∗ I)−1 − Lε̃(H + λ∗ I)−1 (H + (λ∗ + Lε̃)I)−1 Note that (H + λ∗ I)−1  0 by Equations (D.1) and (6.2). The second part of (D.2) can be bounded as follows     Lkvk (2λ∗ − 5Lε̃)2 λ∗ − Lε̃ 2λ∗ + 5Lε̃ 2 λ kvk − ≥ − 2 6 L2 2 6 ∗ 3 ∗ 3 ¬ 2(λ ) 2(λ ) 1 ≥ − 1000ε̃L(λ∗ )2 ≥ − 3L2 3L2 500κ3 L2 17 Above, inequality ¬ uses λ∗ ≤ B (owing to Proposition 5.3) and our assumption on ε̃ from (6.1). Putting these together we get that 1 m(v) ≤ m(h∗ ) + . 250κ3 L2 D.2 Proofs for Claims 6.2 and 6.3 For notational simplicity, let us rotate the space into the basis in the eigenspace of H; let the i-th dimension correspond to the i-th largest eigenvalue λi of H. We have λ1 ≥ λ2 . . . ≥ λd = λmin . Let gi denote the i-th coordinate of g in this basis. Lemma 5.1 implies m(h∗ ) = − where we denote by S1 = − 1 X gi2 2(λ∗ )3 2(λ∗ )3 − =: S + S − . 1 2 2 λi + λ∗ 3L2 3L2 (D.4) i X 1 i:λi +λ∗ ≥ κ gi2 λi + λ∗ From Corollary 5.2 we can also obtain X i:λi +λ∗ >0 Now the assumption k(H + λI)−1 gk ≤ S2 = − X 1 i:0<λi +λ∗ ≤ κ gi2 λi + λ∗ gi2 4(λ∗ )2 ≤ . (λi + λ∗ )2 L2 (D.5) 2λ L is equivalent to X gi2 4λ2 ≤ (λi + λ)2 L2 (D.6) i We begin with a few auxiliary claims. Claim D.1. If λmin (H) ≤ − κ1 then S2 ≥ 1000 · m Proof of Claim D.1. We compute that X gi2 S2 = − =− λi + λ∗ ∗ 1 i:0<λi +λ ≤ κ X 1 i:0<λi +λ∗ ≤ κ  λvmin 2L  gi2 (λi + λ∗ ) 1 ≥− ∗ 2 (λi + λ ) κ X 1 i:0<λi +λ∗ ≤ κ gi2 (λi + λ∗ )2 ­ 4 |λmin |3 ∗ 2 (λ ) ≥ −16 . (D.7) κL2 L2 Above, ¬ uses (D.5), and ­ follows because we have λmin (H) ≤ − κ1 in the assumption and have λ∗ ≤ −λmin (H) + κ1 in the assumption of Case 2 of Main Lemma 1. ¬ ≥− min Let us now consider the value of the vector λv2L . We have that   > Hv λvmin λg > vmin λ2 vmin λ3 ¬ λg > vmin λ2 λmin λ3 min m = + + ≤ + + 2L 2L 8L2 48L2 2L 16L2 48L2 ­ λg > vmin λ2 λmin λ2 λmin λg > vmin λ2 λmin ≤ + − ≤ + 2L 16L2 24L2 2L 48L2 1 Above, ¬ is because our assumption λmin (H) ≤ − κ and assumption vmin Hvmin ≤ λmin (H) + 1 1 together imply vmin Hvmin ≤ λmin 2 . ­ follows from λmin (H) ≤ − κ and λ ≤ −λmin (H) + κ . 1 10κ Now, recall that the sign of vmin is chosen so g > vmin is non-positive, and therefore by our 18 assumptions λmin (H) ≤ − κ1 and λ ≤ −λmin (H) + κ1 , we get the following inequality:   λvmin |λmin |3 m ≤− 2L 48L2 Putting inequalities (D.8) and (D.7) together finishes the proof of Claim D.1. (D.8) We also show the following lemma, the proof of which can be seen from inequality (D.3), as part of the proof of Claim 6.1 above. Lemma D.2. If we have λ, v such that Lk(H + λI)−1 gk ≤ 2λ and with ε̃ satisfying condition (6.1) then we have that g>v + Claim D.3. S1 ≥ 4m(v) − kv + (H + λI)−1 gk ≤ ε̃ v > (H + λI)v g > (H + λI)−1 g 1 ≤− + 2 2 1000κ3 L2 1 250κ3 L2 Proof of Claim D.3. We have that v > (H + λI)v λ L m(v) = g > v + − kvk2 + kvk3 2 2 6   > −1 g (H + λI) g L 1 ¬ 2 λ =− − kvk − kvk + 2 2 6 1000κ3 L2     ­ g > (H + λI)−1 g 2λ − 3Lε̃ 2 λ Lε̃ 1 ≤− − + + 2 L 6 3 1000κ3 L2 ® 2λ3 1 g > (H + λI)−1 g − + ≤− 2 3L2 500κ3 L2 g > (H + λI)−1 g 1 ≤− + (D.9) 2 500κ3 L2 Above, ¬ is due to Lemma D.2; ­ uses our condition on v which gives Lkvk ∈ [2λ − 3Lε̃, 2λ + 3Lε̃]; ® uses our condition (6.1) on ε̃. We now bound S1 . For this purpose first we note that if λi + λ∗ ≥ 2(λi + λ∗ ) ≥ 1/κ + λi + λ∗ ≥ λi + λ . Therefore, the sum S1 satisfies X gi2 S1 = − ≥ −2 λi + λ∗ ∗ 1 i:λi +λ ≥ κ X 1 i:0<λi +λ∗ ≤ κ 1 κ and λ − λ∗ ≤ 1 κ then gi2 1 ≥ −2(g > (H + λI)−1 g) ≥ 4m(v) − (λi + λ) 250κ3 L2 (Note that we have H + λI  0.) This finishes the proof of Claim D.3. n  o min Claim 6.2. If λmin (H) ≤ − κ1 then m(h∗ ) ≥ 1500 min m(v), m λv2L − 1 500κ3 L2 Proof of Claim 6.2. We derive that 2(λ∗ )3 ­ 1 16|λmin |3 ¬ 1 m(h∗ ) = (S1 + S2 ) − ≥ (S + S ) − 1 2 2 2 3L2 2   3L ® 1 λvmin 16|λmin |3 ≥ 2m(v) − + 500 · m − 500κ3 L2 2L 3L2   ¯ 1 λvmin ≥ 2m(v) − + 1500 · m 3 2 500κ L 2L 19    1 λvmin − ≥ 1500 min m(v), m 2L 500κ3 L2 Above, ¬ uses equation (D.4), inequality ­ follows because we have λmin (H) ≤ − κ1 in the assumption and have λ∗ ≤ −λmin (H) + κ1 in the assumption of Case 2 of Main Lemma 1; inequality ® uses Claim D.3 and Claim D.1; and inequality ¯ uses (D.8). This finishes the proof of Claim 6.2. Claim 6.3. If λmin (H) ≥ − κ1 then m(h∗ ) ≥ 2m(v) − 16 κ3 L2 Proof of Claim 6.3. This time we lower bound S2 slightly differently: ¬ ­ 4 16 S2 ≥ − 2 (λ∗ )2 ≥ − 3 2 (D.10) κL κ L where ¬ comes from the second to last inequality from (D.7) and ­ comes from λ∗ ≤ λ ≤ −λmin (H) + κ1 ≤ κ2 using our assumption in Case 2 of Main Lemma 1. Putting these together we get that 2(λ∗ )3 ­ 1 15 16 ¬ 1 ≥ 2m(v) − − 3 2 ≥ 2m(v) − 3 2 . m(h∗ ) = (S1 + S2 ) − 2 3 2 2 3L 500κ L κ L κ L Above, ¬ comes from (D.4), ­ uses Claim D.3, lower bound (D.10) and E 2(λ∗ )3 3L2 ≤ 16 3κ3 L2 Proof of Main Lemma 2 3/2 ε √ . Then the Main Lemma 2. In the same setting as Main Lemma 1, suppose m(h∗ ) ≥ − 300 L output vector v satisfies the following conditions: 3 ε 15 kvk ≤ kh∗ k + and k∇m(v)k ≤ + 2 . κL 4 κ L Proof of Main Lemma 2. Let’s first note that from the value given in Lemma 5.1, (λ∗ )3 ≤ L3/2 ε3/2 3L2 |m(h∗ )| ≤ . 2 200 (E.1) If Case 1 occurs, we have ® 2λ∗ ¯ 2λ + 2Lε̃ 1 + ε̃ ≤ + 5ε̃ ≤ kh∗ k + . L L 20κL Above, inequalities ¬ and ­ both use the assumptions of Case 1; inequality ® uses the fact that λ∗ ∈ [λ − Lε̃, λ + Lε̃] which again follows from the assumptions of Case 1 (see (D.1)); inequality ¯ ∗ uses kh∗ k = 2λL from Lemma 5.1 as well as our assumption (6.1) on ε̃. ¬ ­ kvk ≤ k(H + λI)−1 gk + ε̃ ≤ As for the quantity k∇m(v)k, we bound it as follows ¬ Lkvk k∇m(v)k = g + Hv + v ≤ kg + (H + λI)vk + λkvk + Lkvk2 2 ­ ® λ(2λ + 3Lε̃) + (2λ + 3Lε̃)2 ≤ kH + λIkε̃ + λkvk + Lkvk2 ≤ (L2 + 2B)ε̃ + L 2 ∗ 2 ¯ 6λ 6(λ + Lε̃) = (L2 + 2B)ε̃ + + 15ε̃λ + 9Lε̃2 ≤ + (L2 + 32B)ε̃ + 9Lε̃2 L L ° 6(λ∗ )2 ± ε 15 ≤ + (L2 + 56B)ε̃ + 15Lε̃2 ≤ + 2 . L 4 κ L Above, inequality ¬ uses triangle inequality; inequality ­ uses kv + (H + λI)−1 gk ≤ ε̃; inequality ® uses kH + λIk ≤ L2 + 2B and Lkvk ≤ 2λ + 3Lε̃ which comes from our upper bound on kvk above; ¯ uses the fact that λ∗ ∈ [λ − Lε̃, λ + Lε̃] which again follows from the assumptions of Case 1 (see 20 (D.1)); inequality ° uses λ∗ ≤ 2B; and inequality ± uses (E.1) together with our assumption (6.1) on ε̃. If Case 2 occurs, we have ® 2(λ∗ + 1/κ) 2λ 3 + ε̃ ≤ + ε̃ ≤ kh∗ k + . (E.2) L L κL Above, inequalities ¬ and ­ both use the assumptions of Case 2; inequality ® uses λ ≤ −λmin (H)+ 1/κ from our assumption of Case 2 as well as −λmin (H) ≤ λ∗ which comes from Lemma 5.1; ∗ inequality ¯ uses kh∗ k = 2λL from Lemma 5.1 as well as our assumption (6.1) on ε̃. ¬ ­ kvk ≤ k(H + λI)−1 gk + ε̃ ≤ The quantity k∇m(v)k can be bounded in an analogous manner as Case 1: λ(2λ + Lε̃) + (2λ + Lε̃)2 L ∗ + 1 )2 ∗ 2 ¬ 6λ2 ­ 6(λ 1 1 12(λ ) 15 ® ε 15 κ + + ≤ + 2 ≤ + 2 . ≤ ≤ 2 2 L 10κ L L 10κ L L κ L 4 κ L Above, inequality ¬ uses our assumption (6.1) on ε̃; inequality ­ uses λ ≤ λ∗ + κ1 which appeared in (E.2); inequality ® uses (E.1). k∇m(v)k ≤ kH + λIkε̃ + λkvk + Lkvk2 ≤ (L2 + 2B)ε̃ + F Proof of Lemma 7.2 Lemma 7.2. The following statements hold for all i until FastCubicMin terminates (a) λi ∈ [0, 2B], λi + λmax (H) ≤ 3B (b) λi + λmin (H) ≥ (c) λi+1 + λmin (H) 3 10κ ≤ 34 (λi + λmin (H)) unless λi+1 = 0 Moreover when FastCubicMin terminates at Line 20 we have λi + λmin (H) ≤ κ1 . Proof of Lemma 7.2. The lemma follows via induction. To see (a) and (b) at the base case i = 0, recall that the definitions of B and L2 together ensure 3 λ0 + λmax (H) ≤ 3B and λ0 + λmin (H) ≥ 10κ . Also λ0 ∈ [0, 2B]. Suppose now for some i ≥ 0 properties (a) and (b) hold. It is easy to check that λi ≤ λi−1 and thus we have λi + λmax (H) ≤ 2B and λi ≤ 2B. This implies property (a) at iteration i + 1 also hold. We now proceed to show property (c) at iteration i and property (b) at iteration i + 1. Recall that the algorithm ensures 9 λmax ((H + λi I)−1 ) ≤ w> (H + λi I)−1 w ≤ λmax ((H + λi I)−1 ) , 10 and by the definition of w̃ we have 9 λmax ((H + λi I)−1 ) − 2ε̂ ≤ w̃> w − ε̂ ≤ λmax ((H + λi I)−1 ) . (F.1) 10 3 ≤ λi + λmin (H) ≤ 3B from the inductive assumption, it follows from the choice of Now, since 10κ ε̂ that 1 1 λmax ((H + λi I)−1 ) 2ε̂ ≤ ≤ = . (F.2) 30B 10(λi + λmin (H)) 10 Plugging Equation (F.2) into Equation (F.1) we get 8 1 8 1 = λmax ((H + λi I)−1 ) ≤ w̃> w − ε̂ ≤ λmax ((H + λi I)−1 ) = . 10 λi + λmin (H) 10 λi + λmin (H) 21 Inverting this chain of inequalities, we have λi + λmin (H) 5(λi + λmin (H)) ≤∆≤ . (F.3) 2 8 From this we derive the following implications: 1 1 ∆≤ =⇒ (λi + λmin (H)) ≤ (F.4) 2κ κ 1 4 ∆> =⇒ (λi + λmin (H)) > (F.5) 2κ 5κ If Condition (F.4) happens, our algorithm FastCubicMin outputs on Line 20; in such a case (F.4) implies our desired inequality λi + λmin (H) ≤ κ1 . If Condition (F.5) happens, our choice λ̃i+1 ← λi − ∆ 2 and Equation (F.3) together imply that 3 11 (λi + λmin (H)) ≥ λ̃i+1 + λmin (H) ≥ (λi + λmin (H)) 4 16 Combining this with (F.5) we get that   3 11 4 3 (λi + λmin (H)) ≥ λ̃i+1 + λmin (H) ≥ ≥ . 4 16 5κ 10κ Therefore, we conclude that property (c) at iteration i holds and property (b) at iteration i + 1 hold because λi+1 ≥ λ̃i+1 . This finishes the proof of Lemma 7.2. G Proof of Main Lemma 3: Running Time Half Having proven the correctness of the algorithm, we now aim to bound the overall running time of FastCubicMin, completing the proof of Main Lemma 3. We prove in Appendix H the following lemma:  2 )B Lemma G.1. If λ2 +λmin (H) ≥ c1 ∈ (0, 1) then BinarySearch ends in O log( (λc11−λ ·L·ε̃ ) iterations. 3 Since in our FastCubicMin algorithm, it satisfies λi ≤ 2B and λi +λmin (H) ≥ 10κ (see Lemma 7.2), taken together with our choice of ε̃ we have:  Claim G.2. Each invocation of BinarySearch ends in O log(1/ε̃) iterations. Claim G.3. FastCubicMin ends in at most O(log(Bκ)) outer loops. Proof. According to Lemma 7.2 we have 43 (λi−1 + λmin (H)) ≥ λi + λmin (H) so the quantity λi + λmin (H) decreases by a constant factor per iteration (except possibly λi = 0 the last outer loop in which case we shall terminate in one more iteration). On one hand, we have began with λ0 + 3 according to Lemma 7.2. λmin (H) ≤ 3B. On the other hand, we always have λi + λmin (H) ≥ 10κ Therefore, the total number of outer loops is at most O(log(Bκ)). G.1 Matrix Inverse Since the key component of the running time is the computation of (H+λi I)−1 b for different vectors b we will first bound the condition number of the matrix (H + λi I)−1 via the following lemma Claim G.4. Through out the execution of FastCubicMin and BinarySearch whenever we compute λi +L2 (H + λi I)−1 b for some vector b it satisfies λi +λ ≤ 10κL2 . min (H) Proof of Claim G.4. We first focus on Line 5 and Line 11 of FastCubicMin. There are two cases. If λi +L2 λi ≥ 2L2 , then according to −L2 I  H  L2 I we can bound λi +λ ≤ 3 because the left hand min (H) 22 side is the largest when λi = 2L2 . If λi < 2L2 , then by Lemma 7.2 we know λi + λmin (H) ≥ λi +L2 This implies λi +λ ≤ 10κL2 . min (H) 3 10κ . We now focus on Line 3 of BinarySearch. We claim that all values λmid iterated over BinarySearch 3 3 also satisfy λmid + λmin (H) ≥ 10κ (because the values λmid ≥ λi and λi satisfies λi + λmin (H) ≥ 10κ according to Lemma 7.2). Therefore, the same case analysis (with respect to λmid ≥ 2L2 and λi +L2 λmid < 2L2 ) also gives λi +λ ≤ 10κL2 . min (H) Claim G.5. Line 5 of FastCubicMin and Line 3 of BinarySearch runs in time Õ(Tinverse (κL2 , ε̃)). Proof. Whenever we compute (H + λi I)−1 b for some vector v it satisfies kbk ≤ 1/ε̃; therefore to find v satisfying kv + (H + λi I)−1 bk ≤ ε̃ it suffices to find kv + (H + λi I)−1 bk ≤ ε̃2 kbk. This costs a total running time Õ(Tinverse (κL2 , ε̃)) according to Theorem 2.4. Therefore by Theorem 2.4, every time we need to multiply a vector v to (H + λI)−1 to error δ, the time required to approximately solve such a system is Tinverse (O(κL2 ), δ). We will state our running time with respect to Tinverse as it is the dominant operation in the algorithm. G.2 Power Method We now bound the running time of Power Method in Line 11 of FastCubicMin. It is a folklore (cf. [3, Appendix A]) that getting any constant multiplicative approximation to the leading eigenvector of any PSD matrix M ∈ Rd×d requires only O(log d) iterations, each computing Mb for some vector b. In our case, we have M = (H + λi I)−1 so we cannot compute Mb exactly. Fortunately, folklore results on inaccurate power method suggests that, as long as each Mb is computed to a very good accuracy such as ε̃−Ω(log d) , then we can still get a constant multiplicative approximate leading eigenvector that satisfies Line 11 of FastCubicMin. Ignoring all the details (which are quite standard and can be found for instance in [3, Appendix A]), we claim that  Claim G.6. Line 11 of FastCubicMin runs in time Õ Tinverse κL2 , ε−Θ(log(d)) = Õ (Tinverse (κL2 , ε)). G.3 Lowest Eigenvector We will now focus on the running time for the computation of the lowest eigenvector of the Hessian which is required in Line 18. We recall Theorem 2.5 from Section 2 which uses Shift and Invert to compute the largest eigenvalue of a matrix. Since we are concerned with the lowest eigenvector of H and by assumption −L2 I  H  L2 I, 2I we can equivalently compute the largest eigenvector of M , I − H+L which satisfies 0  M  I. 2L2 Note that computing Mv is of the same time complexity as computing Hv. By setting ε = δ× = 0.01 κL2 in Theorem 2.5 and running AppxPCA, we obtain a unit vector w such that ¬ λmin (H) + L2 w> Hw + L2 = w> Mw ≥ (1 − 2δ× )λmax (M) ≥ λmax (M) − 2δ× ≥ 1 − − 2δ× 2L2 2L2 Above, ¬ uses λmax (M) ≤ 1. Rearranging the terms we obtain w> Hw ≤ λmin (H) + 0.05κ as desired. In sum, 1− Claim G.7. The approximate lowest eigenvector computation on Line 18 runs in time Õ (Tinverse (κL2 , ε̃)). G.4 Putting It All Together Running-Time Proof of Main Lemma 3. Putting together our bounds in Claim G.2 and Claim G.2 which bound the number of iterations, as well as our bounds in Claim G.6, Claim G.5, and Claim G.7 for power method, matrix inverse, and lowest eigenvectors, we conclude that our total 23 running time of FastCubicMin is at most Õ (Tinverse (κL2 , ε̃)), where Õ contains factors polylogarithmic in κ, L, L2 , B, d. By putting together our choice of ε̃ in Line 2 as well as the running time of either accelerated gradient descent or accelerated SVRG from Theorem 2.4 into formula O(κL2 , ε̃), we finish the proof of the running time part for Main Lemma 3. H Proof of Lemma G.1  2 )B Lemma G.1. If λ2 +λmin (H) ≥ c1 ∈ (0, 1) then BinarySearch ends in O log( (λc11−λ ·L·ε̃ ) iterations. Proof of Lemma G.1. We first note that in all iterations of BinarySearch it always satisfies Lk(H + λ1 I)−1 gk ≤ 2λ1 and Lk(H + λ2 I)−1 gk ≥ 2λ2 . (H.1) This is true at the beginning. In each of the follow-up iterations, if we have set λ1 ← λmid then it must satisfy Lkvk + Lε̃ ≤ 2λmid but this implies Lk(H + λmid I)−1 gk ≤ 2λmid according to triangle inequality and kv + (H + λmid I)−1 gk ≤ Lε̃; similarly, if we have set λ2 ← λmid then it must satisfy Lk(H + λmid I)−1 gk ≥ 2λmid . 2 Suppose now the loop has run for at least log2 ( λ1 −λ ε̂ ) iterations where ε̂ , satisfy λ1 − λ2 ≤ ε̂. At this point, we compute and therefore Lε̃c1 40B . Then, it must (H + λ1 I)−1 = (H + λ2 I)−1 − (λ1 − λ2 )(H + λ2 I)−1 (H + λ1 I)−1 Lk(H + λ1 I)−1 gk ≥ Lk(H + λ2 I)−1 gk − Lk(λ1 − λ2 )(H + λ2 I)−1 (H + λ1 I)−1 gk ­ ¬ ≥ 2λ2 − ε̂k(H + λ2 I)−1 k · 2λ1 ≥ 2λ1 − 2ε̂ − ε̂k(H + λ2 I)−1 k · 2λ1 Above, inequality ¬ uses (H.1) and λ1 − λ2 ≤ ε̂; inequality ­ uses again λ1 − λ2 ≤ ε̂. Now, we notice that k(H + λ2 I)−1 k ≤ c11 and λ1 ≤ 2B because λ2 only increases and λ1 only ε̃c1 decreases through the execution of the algorithm. Therefore by the choice of ε̂ = 40B , we get Lk(H + λ1 I)−1 gk ≥ 2λ1 − Lε̃/5 . A completely analogous argument also shows that Lk(H + λ2 I)−1 gk ≤ 2λ2 + Lε̃/5 . Therefore, in the immediate next iteration when picking λmid ← (λ1 + λ2 )/2, it must satisfy 2λmid − Lε̃/2 ≤ 2λ − Lε̃/5 ≤ Lk(H + λmid I)−1 gk ≤ 2λ2 + Lε̃/5 ≤ 2λmid + Lε̃/2 . Then, at this iteration when v is computed to satisfy kv + (H + λmid I)−1 gk ≤ ε̃/2, we also have 2λmid − Lε̃ ≤ Lkvk ≤ 2λmid + Lε̃ which means BinarySearch will stop in this iteration. In sum, we have concluded that there will be 2 )B no more than O log( (λc11−λ ·L·ε̃ ) iterations. Acknowledgements We thank Ben Recht for helpful suggestions and corrections to a previous version. References [1] Naman Agarwal, Brian Bullins, and Elad Hazan. Second order stochastic optimization for machine learning in linear time. arXiv preprint arXiv:1602.03943, 2016. 24 [2] Zeyuan Allen-Zhu and Elad Hazan. Variance Reduction for Faster Non-Convex Optimization. In ICML, 2016. [3] Zeyuan Allen-Zhu and Yuanzhi Li. Even Faster SVD Decomposition Yet Without Agonizing Pain. In NIPS, 2016. [4] Zeyuan Allen-Zhu and Yang Yuan. Improved SVRG for Non-Strongly-Convex or Sum-of-NonConvex Objectives. In ICML, 2016. [5] Afonso S Bandeira, Nicolas Boumal, and Vladislav Voroninski. On the low-rank approach for semidefinite programs arising in synchronization and community detection. arXiv preprint arXiv:1602.04426, 2016. [6] S. Bhojanapalli, B. Neyshabur, and N. Srebro. Global Optimality of Local Search for Low Rank Matrix Recovery. ArXiv e-prints, May 2016. [7] Yair Carmon, John C. Duchi, Oliver Hinder, and Aaron Sidford. Accelerated methods for non-convex optimization. arXiv preprint 1611.00756, 2016. [8] Coralia Cartis, Nicholas IM Gould, and Philippe L Toint. Adaptive cubic regularisation methods for unconstrained optimization. part i: motivation, convergence and numerical results. Mathematical Programming, 127(2):245–295, 2011. [9] Coralia Cartis, Nicholas IM Gould, and Philippe L Toint. Adaptive cubic regularisation methods for unconstrained optimization. part ii: worst-case function-and derivative-evaluation complexity. Mathematical Programming, 130(2):295–319, 2011. [10] Anna Choromanska, Mikael Henaff, Michael Mathieu, Gérard Ben Arous, and Yann LeCun. The loss surfaces of multilayer networks. In AISTATS, 2015. [11] Yann N Dauphin, Razvan Pascanu, Caglar Gulcehre, Kyunghyun Cho, Surya Ganguli, and Yoshua Bengio. Identifying and attacking the saddle point problem in high-dimensional nonconvex optimization. In Advances in neural information processing systems, pages 2933–2941, 2014. [12] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121–2159, 2011. [13] Dan Garber and Elad Hazan. Fast and simple PCA via convex optimization. ArXiv e-prints, September 2015. [14] Dan Garber, Elad Hazan, Chi Jin, Sham M. Kakade, Cameron Musco, Praneeth Netrapalli, and Aaron Sidford. Robust shift-and-invert preconditioning: Faster and more sample efficient algorithms for eigenvector computation. In ICML, 2016. [15] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. arXiv:1503.02101, 2015. [16] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. In Proceedings of the 28th Annual Conference on Learning Theory, COLT 2015, 2015. 25 [17] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points - online stochastic gradient for tensor decomposition. In Proceedings of The 28th Conference on Learning Theory, COLT 2015, Paris, France, July 3-6, 2015, pages 797–842, 2015. [18] Rong Ge, Jason Lee, and Tengyu Ma. Matrix Completion has No Spurious Local Minimum. ArXiv e-prints, May 2016. [19] Rong Ge and Tengyu Ma. On the optimization landscape of tensor decompositions, 2016. [20] Saeed Ghadimi and Guanghui Lan. Accelerated gradient methods for nonconvex nonlinear and stochastic programming. Mathematical Programming, pages 1–26, feb 2015. [21] I. J. Goodfellow, O. Vinyals, and A. M. Saxe. Qualitatively characterizing neural network optimization problems. ArXiv e-prints, December 2014. [22] Elad Hazan and Tomer Koren. A linear-time algorithm for trust region problems. Mathematical Programming, pages 1–19, 2015. [23] Christopher J. Hillar and Lek-Heng Lim. Most tensor problems are np-hard. J. ACM, 60(6):45, 2013. [24] Jason D. Lee, Max Simchowitz, Michael I. Jordan, and Benjamin Recht. Gradient descent only converges to minimizers. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pages 1246–1257, 2016. [25] Katta G Murty and Santosh N Kabadi. Some np-complete problems in quadratic and nonlinear programming. Mathematical programming, 39(2):117–129, 1987. [26] Yurii Nesterov. A method of solving a convex programming problem with convergence rate O(1/k 2 ). In Doklady AN SSSR (translated as Soviet Mathematics Doklady), volume 269, pages 543–547, 1983. [27] Yurii Nesterov. Introductory Lectures on Convex Programming Volume: A Basic course, volume I. Kluwer Academic Publishers, 2004. [28] Yurii Nesterov and Boris T Polyak. Cubic regularization of newton method and its global performance. Mathematical Programming, 108(1):177–205, 2006. [29] Barak A Pearlmutter. Fast exact multiplication by the hessian. Neural computation, 6(1):147– 160, 1994. [30] Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400–407, 1951. [31] David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by back-propagating errors. Cognitive modeling, 5(3):1, 1988. [32] Mark Schmidt, Nicolas Le Roux, and Francis Bach. Minimizing finite sums with the stochastic average gradient. arXiv preprint arXiv:1309.2388, pages 1–45, 2013. Preliminary version appeared in NIPS 2012. [33] Shai Shalev-Shwartz. SDCA without Duality, Regularization, and Individual Convexity. In ICML, 2016. 26 [34] Jonathan Richard Shewchuk. An introduction to the conjugate gradient method without the agonizing pain, 1994. [35] Paul Werbos. Beyond regression: New tools for prediction and analysis in the behavioral sciences. 1974. 27
8cs.DS
Improved Techniques for Training GANs arXiv:1606.03498v1 [cs.LG] 10 Jun 2016 Tim Salimans [email protected] Ian Goodfellow [email protected] Wojciech Zaremba [email protected] Alec Radford [email protected] Vicki Cheung [email protected] Xi Chen [email protected] Abstract We present a variety of new architectural features and training procedures that we apply to the generative adversarial networks (GANs) framework. We focus on two applications of GANs: semi-supervised learning, and the generation of images that humans find visually realistic. Unlike most work on generative models, our primary goal is not to train a model that assigns high likelihood to test data, nor do we require the model to be able to learn well without using any labels. Using our new techniques, we achieve state-of-the-art results in semi-supervised classification on MNIST, CIFAR-10 and SVHN. The generated images are of high quality as confirmed by a visual Turing test: our model generates MNIST samples that humans cannot distinguish from real data, and CIFAR-10 samples that yield a human error rate of 21.3%. We also present ImageNet samples with unprecedented resolution and show that our methods enable the model to learn recognizable features of ImageNet classes. 1 Introduction Generative adversarial networks [1] (GANs) are a class of methods for learning generative models based on game theory. The goal of GANs is to train a generator network G(z; θ (G) ) that produces samples from the data distribution, pdata (x), by transforming vectors of noise z as x = G(z; θ (G) ). The training signal for G is provided by a discriminator network D(x) that is trained to distinguish samples from the generator distribution pmodel (x) from real data. The generator network G in turn is then trained to fool the discriminator into accepting its outputs as being real. Recent applications of GANs have shown that they can produce excellent samples [2, 3]. However, training GANs requires finding a Nash equilibrium of a non-convex game with continuous, highdimensional parameters. GANs are typically trained using gradient descent techniques that are designed to find a low value of a cost function, rather than to find the Nash equilibrium of a game. When used to seek for a Nash equilibrium, these algorithms may fail to converge [4]. In this work, we introduce several techniques intended to encourage convergence of the GANs game. These techniques are motivated by a heuristic understanding of the non-convergence problem. They lead to improved semi-supervised learning peformance and improved sample generation. We hope that some of them may form the basis for future work, providing formal guarantees of convergence. All code and hyperparameters may be found at: improved_gan 1 https://github.com/openai/ 2 Related work Several recent papers focus on improving the stability of training and the resulting perceptual quality of GAN samples [2, 3, 5, 6]. We build on some of these techniques in this work. For instance, we use some of the “DCGAN” architectural innovations proposed in Radford et al. [3], as discussed below. One of our proposed techniques, feature matching, discussed in Sec. 3.1, is similar in spirit to approaches that use maximum mean discrepancy [7, 8, 9] to train generator networks [10, 11]. Another of our proposed techniques, minibatch features, is based in part on ideas used for batch normalization [12], while our proposed virtual batch normalization is a direct extension of batch normalization. One of the primary goals of this work is to improve the effectiveness of generative adversarial networks for semi-supervised learning (improving the performance of a supervised task, in this case, classification, by learning on additional unlabeled examples). Like many deep generative models, GANs have previously been applied to semi-supervised learning [13, 14], and our work can be seen as a continuation and refinement of this effort. 3 Toward Convergent GAN Training Training GANs consists in finding a Nash equilibrium to a two-player non-cooperative game. Each player wishes to minimize its own cost function, J (D) (θ (D) , θ (G) ) for the discriminator and J (G) (θ (D) , θ (G) ) for the generator. A Nash equilibirum is a point (θ (D) , θ (G) ) such that J (D) is at a minimum with respect to θ (D) and J (G) is at a minimum with respect to θ (G) . Unfortunately, finding Nash equilibria is a very difficult problem. Algorithms exist for specialized cases, but we are not aware of any that are feasible to apply to the GAN game, where the cost functions are non-convex, the parameters are continuous, and the parameter space is extremely high-dimensional. The idea that a Nash equilibrium occurs when each player has minimal cost seems to intuitively motivate the idea of using traditional gradient-based minimization techniques to minimize each player’s cost simultaneously. Unfortunately, a modification to θ (D) that reduces J (D) can increase J (G) , and a modification to θ (G) that reduces J (G) can increase J (D) . Gradient descent thus fails to converge for many games. For example, when one player minimizes xy with respect to x and another player minimizes −xy with respect to y, gradient descent enters a stable orbit, rather than converging to x = y = 0, the desired equilibrium point [15]. Previous approaches to GAN training have thus applied gradient descent on each player’s cost simultaneously, despite the lack of guarantee that this procedure will converge. We introduce the following techniques that are heuristically motivated to encourage convergence: 3.1 Feature matching Feature matching addresses the instability of GANs by specifying a new objective for the generator that prevents it from overtraining on the current discriminator. Instead of directly maximizing the output of the discriminator, the new objective requires the generator to generate data that matches the statistics of the real data, where we use the discriminator only to specify the statistics that we think are worth matching. Specifically, we train the generator to match the expected value of the features on an intermediate layer of the discriminator. This is a natural choice of statistics for the generator to match, since by training the discriminator we ask it to find those features that are most discriminative of real data versus data generated by the current model. Letting f (x) denote activations on an intermediate layer of the discriminator, our new objective for the generator is defined as: ||Ex∼pdata f (x) − Ez∼pz (z) f (G(z))||22 . The discriminator, and hence f (x), are trained in the usual way. As with regular GAN training, the objective has a fixed point where G exactly matches the distribution of training data. We have no guarantee of reaching this fixed point in practice, but our empirical results indicate that feature matching is indeed effective in situations where regular GAN becomes unstable. 2 3.2 Minibatch discrimination One of the main failure modes for GAN is for the generator to collapse to a parameter setting where it always emits the same point. When collapse to a single mode is imminent, the gradient of the discriminator may point in similar directions for many similar points. Because the discriminator processes each example independently, there is no coordination between its gradients, and thus no mechanism to tell the outputs of the generator to become more dissimilar to each other. Instead, all outputs race toward a single point that the discriminator currently believes is highly realistic. After collapse has occurred, the discriminator learns that this single point comes from the generator, but gradient descent is unable to separate the identical outputs. The gradients of the discriminator then push the single point produced by the generator around space forever, and the algorithm cannot converge to a distribution with the correct amount of entropy. An obvious strategy to avoid this type of failure is to allow the discriminator to look at multiple data examples in combination, and perform what we call minibatch discrimination. The concept of minibatch discrimination is quite general: any discriminator model that looks at multiple examples in combination, rather than in isolation, could potentially help avoid collapse of the generator. In fact, the successful application of batch normalization in the discriminator by Radford et al. [3] is well explained from this perspective. So far, however, we have restricted our experiments to models that explicitly aim to identify generator samples that are particularly close together. One successful specification for modelling the closeness between examples in a minibatch is as follows: Let f (xi ) ∈ RA denote a vector of features for input xi , produced by some intermediate layer in the discriminator. We then multiply the vector f (xi ) by a tensor T ∈ RA×B×C , which results in a matrix Mi ∈ RB×C . We then compute the L1 -distance between the rows of the resulting matrix Mi across samples i ∈ {1, 2, . . . , n} and apply a negative exponential (Fig. 1): cb (xi , xj ) = exp(−||Mi,b − Mj,b ||L1 ) ∈ R. The output o(xi ) for this minibatch layer for a sample xi is then defined as the sum of the cb (xi , xj )’s to all other samples: n X cb (xi , xj ) ∈ R o(xi )b = j=1 h i o(xi ) = o(xi )1 , o(xi )2 , . . . , o(xi )B ∈ RB o(X) ∈ Rn×B Next, we concatenate the output o(xi ) of the minibatch layer with the intermediate features f (xi ) that were its Figure 1: Figure sketches how miniinput, and we feed the result into the next layer of the batch discrimination works. Features discriminator. We compute these minibatch features sep- f (x ) from sample x are multiplied i i arately for samples from the generator and from the train- through a tensor T , and cross-sample ing data. As before, the discriminator is still required to distance is computed. output a single number for each example indicating how likely it is to come from the training data: The task of the discriminator is thus effectively still to classify single examples as real data or generated data, but it is now able to use the other examples in the minibatch as side information. Minibatch discrimination allows us to generate visually appealing samples very quickly, and in this regard it is superior to feature matching (Section 6). Interestingly, however, feature matching was found to work much better if the goal is to obtain a strong classifier using the approach to semi-supervised learning described in Section 5. 3.3 Historical averaging Pt When applying this technique, we modify each player’s cost to include a term ||θ − 1t i=1 θ[i]||2 , where θ[i] is the value of the parameters at past time i. The historical average of the parameters can be updated in an online fashion so this learning rule scales well to long time series. This approach is loosely inspired by the fictitious play [16] algorithm that can find equilibria in other kinds of games. We found that our approach was able to find equilibria of low-dimensional, continuous non-convex games, such as the minimax game with one player controlling x, the other player controlling y, and value function (f (x) − 1)(y − 1), where f (x) = x for x < 0 and f (x) = x2 otherwise. For 3 these same toy games, gradient descent fails by going into extended orbits that do not approach the equilibrium point. 3.4 One-sided label smoothing Label smoothing, a technique from the 1980s recently independently re-discovered by Szegedy et. al [17], replaces the 0 and 1 targets for a classifier with smoothed values, like .9 or .1, and was recently shown to reduce the vulnerability of neural networks to adversarial examples [18]. Replacing positive classification targets with α and negative targets with β, the optimal discriminator data (x)+βpmodel (x) becomes D(x) = αppdata (x)+pmodel (x) . The presence of pmodel in the numerator is problematic because, in areas where pdata is approximately zero and pmodel is large, erroneous samples from pmodel have no incentive to move nearer to the data. We therefore smooth only the positive labels to α, leaving negative labels set to 0. 3.5 Virtual batch normalization Batch normalization greatly improves optimization of neural networks, and was shown to be highly effective for DCGANs [3]. However, it causes the output of a neural network for an input example x to be highly dependent on several other inputs x0 in the same minibatch. To avoid this problem we introduce virtual batch normalization (VBN), in which each example x is normalized based on the statistics collected on a reference batch of examples that are chosen once and fixed at the start of training, and on x itself. The reference batch is normalized using only its own statistics. VBN is computationally expensive because it requires running forward propagation on two minibatches of data, so we use it only in the generator network. 4 Assessment of image quality Generative adversarial networks lack an objective function, which makes it difficult to compare performance of different models. One intuitive metric of performance can be obtained by having human annotators judge the visual quality of samples [2]. We automate this process using Amazon Mechanical Turk (MTurk), using the web interface in figure Fig. 2 (live at http://infinite-chamber-35121.herokuapp.com/ cifar-minibatch/), which we use to ask annotators to distinguish between generated data and real data. The resulting quality assessments of our models are described in Section 6. Figure 2: Web interface given to annotators. Annotators are asked to distinguish computer generated images from real ones. A downside of using human annotators is that the metric varies depending on the setup of the task and the motivation of the annotators. We also find that results change drastically when we give annotators feedback about their mistakes: By learning from such feedback, annotators are better able to point out the flaws in generated images, giving a more pessimistic quality assessment. The left column of Fig. 2 presents a screen from the annotation process, while the right column shows how we inform annotators about their mistakes. As an alternative to human annotators, we propose an automatic method to evaluate samples, which we find to correlate well with human evaluation: We apply the Inception model1 [19] to every generated image to get the conditional label distribution p(y|x). Images that contain meaningful objects should have a conditional label distribution p(y|x) with low entropy. Moreover, we expect R the model to generate varied images, so the marginal p(y|x = G(z))dz should have high entropy. Combining these two requirements, the metric that we propose is: exp(Ex KL(p(y|x)||p(y))), where we exponentiate results so the values are easier to compare. Our Inception score is closely related to the objective used for training generative models in CatGAN [14]: Although we had less success using such an objective for training, we find it is a good metric for evaluation that correlates very 1 We use the pretrained Inception model from http://download.tensorflow.org/models/ image/imagenet/inception-2015-12-05.tgz. Code to compute the Inception score with this model will be made available by the time of publication. 4 well with human judgment. We find that it’s important to evaluate the metric on a large enough number of samples (i.e. 50k) as part of this metric measures diversity. 5 Semi-supervised learning Consider a standard classifier for classifying a data point x into one of K possible classes. Such a model takes in x as input and outputs a K-dimensional vector of logits {l1 , . . . , lK }, that can exp(lj ) be turned into class probabilities by applying the softmax: pmodel (y = j|x) = PK exp(l . In k) k=1 supervised learning, such a model is then trained by minimizing the cross-entropy between the observed labels and the model predictive distribution pmodel (y|x). We can do semi-supervised learning with any standard classifier by simply adding samples from the GAN generator G to our data set, labeling them with a new “generated” class y = K + 1, and correspondingly increasing the dimension of our classifier output from K to K + 1. We may then use pmodel (y = K + 1 | x) to supply the probability that x is fake, corresponding to 1 − D(x) in the original GAN framework. We can now also learn from unlabeled data, as long as we know that it corresponds to one of the K classes of real data by maximizing log pmodel (y ∈ {1, . . . , K}|x). Assuming half of our data set consists of real data and half of it is generated (this is arbitrary), our loss function for training the classifier then becomes L = −Ex,y∼pdata (x,y) [log pmodel (y|x)] − Ex∼G [log pmodel (y = K + 1|x)] = Lsupervised + Lunsupervised , where Lsupervised = −Ex,y∼pdata (x,y) log pmodel (y|x, y < K + 1) Lunsupervised = −{Ex∼pdata (x) log[1 − pmodel (y = K + 1|x)] + Ex∼G log[pmodel (y = K + 1|x)]}, where we have decomposed the total cross-entropy loss into our standard supervised loss function Lsupervised (the negative log probability of the label, given that the data is real) and an unsupervised loss Lunsupervised which is in fact the standard GAN game-value as becomes evident when we substitute D(x) = 1 − pmodel (y = K + 1|x) into the expression: Lunsupervised = −{Ex∼pdata (x) log D(x) + Ez∼noise log(1 − D(G(z)))}. The optimal solution for minimizing both Lsupervised and Lunsupervised is to have exp[lj (x)] = c(x)p(y=j, x)∀j<K+1 and exp[lK+1 (x)] = c(x)pG (x) for some undetermined scaling function c(x). The unsupervised loss is thus consistent with the supervised loss in the sense of Sutskever et al. [13], and we can hope to better estimate this optimal solution from the data by minimizing these two loss functions jointly. In practice, Lunsupervised will only help if it is not trivial to minimize for our classifier and we thus need to train G to approximate the data distribution. One way to do this is by training G to minimize the GAN game-value, using the discriminator D defined by our classifier. This approach introduces an interaction between G and our classifier that we do not fully understand yet, but empirically we find that optimizing G using feature matching GAN works very well for semi-supervised learning, while training G using GAN with minibatch discrimination does not work at all. Here we present our empirical results using this approach; developing a full theoretical understanding of the interaction between D and G using this approach is left for future work. Finally, note that our classifier with K + 1 outputs is over-parameterized: subtracting a general function f (x) from each output logit, i.e. setting lj (x) ← lj (x) − f (x)∀j, does not change the output of the softmax. This means we may equivalently fix lK+1 (x) = 0∀x, in which case Lsupervised becomes the standard supervised loss function of our original classifier with K classes, and our PK Z(x) discriminator D is given by D(x) = Z(x)+1 , where Z(x) = k=1 exp[lk (x)]. 5.1 Importance of labels for image quality Besides achieving state-of-the-art results in semi-supervised learning, the approach described above also has the surprising effect of improving the quality of generated images as judged by human annotators. The reason appears to be that the human visual system is strongly attuned to image statistics that can help infer what class of object an image represents, while it is presumably less sensitive to local statistics that are less important for interpretation of the image. This is supported 5 by the high correlation we find between the quality reported by human annotators and the Inception score we developed in Section 4, which is explicitly constructed to measure the “objectness” of a generated image. By having the discriminator D classify the object shown in the image, we bias it to develop an internal representation that puts emphasis on the same features humans emphasize. This effect can be understood as a method for transfer learning, and could potentially be applied much more broadly. We leave further exploration of this possibility for future work. 6 Experiments We performed semi-supervised experiments on MNIST, CIFAR-10 and SVHN, and sample generation experiments on MNIST, CIFAR-10, SVHN and ImageNet. We provide code to reproduce the majority of our experiments. 6.1 MNIST The MNIST dataset contains 60, 000 labeled images of digits. We perform semi-supervised training with a small randomly picked fraction of these, considering setups with 20, 50, 100, and 200 labeled examples. Results are averaged over 10 random subsets of labeled data, each chosen to have a balanced number of examples from each class. The remaining training images are provided without labels. Our networks have 5 hidden layers each. We use weight normalization [20] and add Gaussian noise to the output Figure 3: (Left) samples generated by model durof each layer of the discriminator. Table 1 sum- ing semi-supervised training. Samples can be marizes our results. clearly distinguished from images coming from Samples generated by the generator during MNIST dataset. (Right) Samples generated with semi-supervised learning using feature match- minibatch discrimination. Samples are coming (Section 3.1) do not look visually appealing pletely indistinguishable from dataset images. (left Fig. 3). By using minibatch discrimination instead (Section 3.2) we can improve their visual quality. On MTurk, annotators were able to distinguish samples in 52.4% of cases (2000 votes total), where 50% would be obtained by random guessing. Similarly, researchers in our institution were not able to find any artifacts that would allow them to distinguish samples. However, semi-supervised learning with minibatch discrimination does not produce as good a classifier as does feature matching. Model 20 DGN [21] Virtual Adversarial [22] CatGAN [14] Skip Deep Generative Model [23] Ladder network [24] Auxiliary Deep Generative Model [23] Our model Ensemble of 10 of our models Number of incorrectly predicted test examples for a given number of labeled samples 50 100 1677 ± 452 1134 ± 445 221 ± 136 142 ± 96 333 ± 14 212 191 ± 10 132 ± 7 106 ± 37 96 ± 2 93 ± 6.5 86 ± 5.6 200 90 ± 4.2 81 ± 4.3 Table 1: Number of incorrectly classified test examples for the semi-supervised setting on permutation invariant MNIST. Results are averaged over 10 seeds. 6.2 CIFAR-10 CIFAR-10 is a small, well studied dataset of 32 × 32 natural images. We use this data set to study semi-supervised learning, as well as to examine the visual quality of samples that can be achieved. For the discriminator in our GAN we use a 9 layer deep convolutional network with dropout and weight normalization. The generator is a 4 layer deep CNN with batch normalization. Table 2 summarizes our results on the semi-supervised learning task. 6 Model 1000 Ladder network [24] CatGAN [14] Our model Ensemble of 10 of our models 21.83±2.01 19.22±0.54 Test error rate for a given number of labeled samples 2000 4000 19.61±2.09 17.25±0.66 20.40±0.47 19.58±0.46 18.63±2.32 15.59±0.47 8000 17.72±1.82 14.87±0.89 Table 2: Test error on semi-supervised CIFAR-10. Results are averaged over 10 splits of data. Figure 4: Samples generated during semi-supervised training on CIFAR-10 with feature matching (Section 3.1, left) and minibatch discrimination (Section 3.2, right). When presented with 50% real and 50% fake data generated by our best CIFAR-10 model, MTurk users correctly categorized 78.7% of images correctly. However, MTurk users may not be sufficiently familiar with CIFAR-10 images or sufficiently motivated; we ourselves were able to categorize images with > 95% accuracy. We validated the Inception score described above by observing that MTurk accuracy drops to 71.4% when the data is filtered by using only the top 1% of samples according to the Inception score. We performed a series of ablation experiments to demonstrate that our proposed techniques improve the Inception score, presented in Table 3. We also present images for these ablation experiments—in our opinion, the Inception score correlates well with our subjective judgment of image quality. Samples from the dataset achieve the highest value. All the models that even partially collapse have relatively low scores. We caution that the Inception score should be used as a rough guide to evaluate models that were trained via some independent criterion; directly optimizing Inception score will lead to the generation of adversarial examples [25]. 6.3 SVHN For the SVHN data set, we used the same architecture and experimental setup as for CIFAR-10. Model Percentage of incorrectly predicted test examples for a given number of labeled samples 500 1000 2000 DGN [21] Virtual Adversarial [22] Auxiliary Deep Generative Model [23] Skip Deep Generative Model [23] Our model Ensemble of 10 of our models 36.02±0.10 24.63 22.86 16.61±0.24 8.11 ± 1.3 5.88 ± 1.0 18.44 ± 4.8 6.16 ± 0.58 Figure 5: (Left) Error rate on SVHN. (Right) Samples from the generator for SVHN. 7 Samples Model Score ± std. Real data 11.24 ± .12 Our methods 8.09 ± .07 -VBN+BN 7.54 ± .07 -L+HA 6.86 ± .06 -LS 6.83 ± .06 -L 4.36 ± .04 -MBF 3.87 ± .03 Table 3: Table of Inception scores for samples generated by various models for 50, 000 images. Score highly correlates with human judgment, and the best score is achieved for natural images. Models that generate collapsed samples have relatively low score. This metric allows us to avoid relying on human evaluations. “Our methods” includes all the techniques described in this work, except for feature matching and historical averaging. The remaining experiments are ablation experiments showing that our techniques are effective. “-VBN+BN” replaces the VBN in the generator with BN, as in DCGANs. This causes a small decrease in sample quality on CIFAR. VBN is more important for ImageNet. “-L+HA” removes the labels from the training process, and adds historical averaging to compensate. HA makes it possible to still generate some recognizable objects. Without HA, sample quality is considerably reduced (see ”-L”). “-LS” removes label smoothing and incurs a noticeable drop in performance relative to “our methods.” “-MBF” removes the minibatch features and incurs a very large drop in performance, greater even than the drop resulting from removing the labels. Adding HA cannot prevent this problem. 6.4 ImageNet We tested our techniques on a dataset of unprecedented scale: 128 × 128 images from the ILSVRC2012 dataset with 1,000 categories. To our knowledge, no previous publication has applied a generative model to a dataset with both this large of a resolution and this large a number of object classes. The large number of object classes is particularly challenging for GANs due to their tendency to underestimate the entropy in the distribution. We extensively modified a publicly available implementation of DCGANs2 using TensorFlow [26] to achieve high performance, using a multi-GPU implementation. DCGANs without modification learn some basic image statistics and generate contiguous shapes with somewhat natural color and texture but do not learn any objects. Using the techniques described in this paper, GANs learn to generate objects that resemble animals, but with incorrect anatomy. Results are shown in Fig. 6. Figure 6: Samples generated from the ImageNet dataset. (Left) Samples generated by a DCGAN. (Right) Samples generated using the techniques proposed in this work. The new techniques enable GANs to learn recognizable features of animals, such as fur, eyes, and noses, but these features are not correctly combined to form an animal with realistic anatomical structure. 2 https://github.com/carpedm20/DCGAN-tensorflow 8 7 Conclusion Generative adversarial networks are a promising class of generative models that has so far been held back by unstable training and by the lack of a proper evaluation metric. This work presents partial solutions to both of these problems. We propose several techniques to stabilize training that allow us to train models that were previously untrainable. Moreover, our proposed evaluation metric (the Inception score) gives us a basis for comparing the quality of these models. We apply our techniques to the problem of semi-supervised learning, achieving state-of-the-art results on a number of different data sets in computer vision. The contributions made in this work are of a practical nature; we hope to develop a more rigorous theoretical understanding in future work. References [1] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, et al. Generative adversarial nets. In NIPS, 2014. [2] Emily Denton, Soumith Chintala, Arthur Szlam, and Rob Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. arXiv preprint arXiv:1506.05751, 2015. [3] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [4] Ian J Goodfellow. On distinguishability criteria for estimating generative models. arXiv:1412.6515, 2014. arXiv preprint [5] Daniel Jiwoong Im, Chris Dongjoo Kim, Hui Jiang, and Roland Memisevic. Generating images with recurrent adversarial networks. arXiv preprint arXiv:1602.05110, 2016. [6] Donggeun Yoo, Namil Kim, Sunggyun Park, Anthony S Paek, and In So Kweon. Pixel-level domain transfer. arXiv preprint arXiv:1603.07442, 2016. [7] Arthur Gretton, Olivier Bousquet, Alex Smola, and Bernhard Schölkopf. Measuring statistical dependence with hilbert-schmidt norms. In Algorithmic learning theory, pages 63–77. Springer, 2005. [8] Kenji Fukumizu, Arthur Gretton, Xiaohai Sun, and Bernhard Schölkopf. Kernel measures of conditional dependence. In NIPS, volume 20, pages 489–496, 2007. [9] Alex Smola, Arthur Gretton, Le Song, and Bernhard Schölkopf. A hilbert space embedding for distributions. In Algorithmic learning theory, pages 13–31. Springer, 2007. [10] Yujia Li, Kevin Swersky, and Richard S. Zemel. Generative moment matching networks. CoRR, abs/1502.02761, 2015. [11] Gintare Karolina Dziugaite, Daniel M Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. arXiv preprint arXiv:1505.03906, 2015. [12] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [13] Ilya Sutskever, Rafal Jozefowicz, Karol Gregor, et al. Towards principled unsupervised learning. arXiv preprint arXiv:1511.06440, 2015. [14] Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv preprint arXiv:1511.06390, 2015. [15] Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. 2016. MIT Press. [16] George W Brown. Iterative solution of games by fictitious play. Activity analysis of production and allocation, 13(1):374–376, 1951. [17] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the Inception Architecture for Computer Vision. ArXiv e-prints, December 2015. [18] David Warde-Farley and Ian Goodfellow. Adversarial perturbations of deep neural networks. In Tamir Hazan, George Papandreou, and Daniel Tarlow, editors, Perturbations, Optimization, and Statistics, chapter 11. 2016. Book in preparation for MIT Press. [19] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. arXiv preprint arXiv:1512.00567, 2015. [20] Tim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. arXiv preprint arXiv:1602.07868, 2016. [21] Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Neural Information Processing Systems, 2014. 9 [22] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, Ken Nakae, and Shin Ishii. Distributional smoothing by virtual adversarial examples. arXiv preprint arXiv:1507.00677, 2015. [23] Lars Maaløe, Casper Kaae Sønderby, Søren Kaae Sønderby, and Ole Winther. Auxiliary deep generative models. arXiv preprint arXiv:1602.05473, 2016. [24] Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, 2015. [25] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, et al. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. [26] Martı́n Abadi, Ashish Agarwal, Paul Barham, et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. 10
9cs.NE
Transitivity of Commutativity for Linear Time-Varying Analog Systems Mehmet Emir KOKSAL Department of Mathematics, Ondokuz Mayis University, 55139 Atakum, Samsun, Turkey [email protected] Abstract: In this contribution, the transitivity property of commutative first-order linear timevarying systems is investigated with and without initial conditions. It is proven that transitivity property of first-order systems holds with and without initial conditions. On the base of impulse response function, transitivity of commutation property is formulated for any triplet of commutative linear time-varying relaxed systems. Transitivity proves are given for some special combinations of first and second-order linear time-varying systems which are initially relaxed. Keywords: Commutativity, Differential equations, Initial conditions, Time-varying systems, linear systems, Impulse response. AMS Subject Classification: 93C05, 93C15, 93A30 1. Introduction As the main branches of applied mathematics, differential (and integral) equations arise in many areas of sciences and engineering including acoustics, electromagnetic, electrodynamics, fluid dynamics etc. There is a great deal of papers on the theory, technique and applications of differential equations. Especially, they are used as a major tool in order to achieve many developments in real engineering problems by modelling, analyzing and solving naturel problems. For example, an interdisciplinary branch of applied mathematics and electricelectronics engineering, they play a pioneering role in system and control theory, that deal with the behavior of dynamical systems with inputs, and how their behavior is modified by different combinations such as cascade and feedback connections which is. When the cascade connection in system design is considered, the commutativity concept places a prominent role to improve different system performances. 1 Consider a system 𝐴 described by a linear time-varying differential equation of the form 𝑛𝐴 𝐴: ∑ 𝑎𝑖 (𝑡) 𝑖=0 𝑑𝑖 𝑦 (𝑡) = 𝑥𝐴 (𝑡); 𝑑𝑡 𝑖 𝐴 (1) (𝑥 − 𝑦) represents input-output pair of the system at any time 𝑡 ∈ 𝑅, 𝑎𝑖 (𝑡) are time-varying (𝑖) coefficients with 𝑎𝑛 (𝑡) ≠ 0, 𝑛𝐴 ≥ 0 is the oder of system; and 𝑦𝐴 (𝑡0 ) ∈ 𝑅, 𝑖 = 0, 1, ⋯ , 𝑛𝐴 − 1 are the initial conditions at the initial time 𝑡0 ∈ 𝑅. When two systems of this type are interconnected sequentially so that the output of the former feeds the input of the later, it is said that they are connected in cascade [1]. If the order of connection does not affect the input-output relation of the combined system 𝐴𝐵 or 𝐵𝐴, it is said that systems 𝐴 and 𝐵 are commutative. Figure 1: Cascade connection of the differential system 𝐴 and 𝐵 If the combined system has an overall input-output relation invariant with the sequence of connection, it is said that these systems are commutative [2]. In [2], J. E. Marshall has proven that “for commutativity, either both systems are time-invariant or both systems are timevarying”. In addition, he has revealed the commutativity conditions of first-order systems. Later Marshall’s work, a great deal of researches has been done on commutativity. In [3-5], the necessary and sufficient conditions for commutativity of second-order systems are presented. Koksal has presented the general commutativity conditions for time-varying systems of any order and reformulated the previous results obtained for seccond-order systems in the format of general conditions [6]. In this work, the general conditions are used to show that any system with constant forward and feedback gains is commutative with the system itself, which is an important fact for the feedback control theory. In 1985, Koksal prepared a technical report which is a survey on commutativity [7]. In this 2 report, an iterative formula is derived and an explicit formula is given for the entries of the coefficient matrix expressing the first set of commutativity conditions and the second set of commutativity conditions, respectively. Hence, the theorem stating these conditions is formally proved. Morover, explicit commutativity results for fourth-order systems are obtained. Finally, commutativity of Euler’s system is proved. The content of the published but undistributed work [7] can be found in the exhaustive journal paper of M. Koksal introduced the basic fundamentals of the subject [8]. His paper covers almost all the previous results except the ones related with initial conditions and sensitivity. This paper is the first tutorial paper that has appeared in the literature. More than one decade no publication had been appeared in the literature until the work in 2011 [9]. This reference is the second basic journal publication after the first appeared in 1988 [8]. In [9], another generic paper by the same author has presented explicit commutativity conditions of fifth-order systems in addition to reviews of commutativity of systems with nonzero initial conditions, commutativity and system disturbance, commutativity of Euler systems. Research on commutativity has not confined to analog systems only; there has been some literature on the subject for discrete-time systems as well [10, 11]. Hence, the research is continuing on both digital and analog area [12]. In [12], explicit results for finding all the second order commutative pairs of a first-order linear time-varying system have been given and the derived theoretical results have been verified by an example. About the commutativity of continuous time linear time-varying systems, [13] has been the last paper appearing in the literature; it deals with driving necessary and sufficiently conditions for the decomposition of a second order linear time-varying system into two cascade connected commutative first-order linear time-varying subsystems. After a short introduction of the literature in this section, the transitivity property of commutativity is introduced in Section 2. Transitivity property of commutative first-order systems with and without initial conditions is studied in Section 3. In Section 4, transitivity property of commutativity for relaxed systems of any order is formulated on the base of impulse response function. Section 5 covers the verification of the general results formulated in Section 4 on the base of impulse response function for first-order systems. Section 6 illustrates the results presented in Sections 4 and 5. Section 7 includes transitivity proves for some combinations of first and second-order relaxed linear time-varying systems. Finally, the paper finishes with conclusions and future work which compose the last section, Section 8. 3 2. Transitivity Property of Commutativity Logically or mathematically, transitivity is a property of a binary relation such that whenever one element is related to a second element, and the second element is related to a third element, then the first element is also related to the third element. Let 𝐴, 𝐵, 𝐶 be dynamical systems described by linear time-varying differential equations of the form (1) with their special input-output variables, orders of complexity, and coefficients. If 𝐴 and 𝐵 are commutative among themselves, further, 𝐵 and 𝐶 are also commutative amoung themselves, what can it be said about the commutativity of systems 𝐴 and 𝐶. If 𝐴 and 𝐶 are also commutative among themselves, this property is called transitivity property of commutativity, in other words commutativity is a transitive relation. For commutative systems 𝐴, 𝐵, 𝐶 satisfiying transitivity, all the triplets 𝐴𝐵𝐶, 𝐴𝐶𝐵, 𝐵𝐴𝐶, 𝐵𝐶𝐴, 𝐶𝐴𝐵, 𝐶𝐵𝐴 yield the same functionally equivalent cascade connected system and hence the same input-output property. The preference of an individual system connection depends on its relative performance characteristics such as sensitivity, disturbance, robustness, and etc., with respect to the others. It is well-known (or trivial to show) that linear scalar systems, that is systems of order 0, are always commutative among themselves whether time-invariant or time-varying; and transitivity always hold for such systems. Further, initially relaxed time-invariant systems are always commutative. When initial conditions exist, which is valid for non-scalar (1st or higherorder) systems, the commutativity of such systems (even including a scalar system) is not automatic and requires some conditions. Hence, the following discussions are devoted mainly to commutativity of systems at least one of them is of order one or higher. 3. Transitivity for First-order Systems Let 𝐴, 𝐵, 𝐶 be first-order linear time-varying systems defined by a differential equation of the form (1). Let 𝑎1 , 𝑎0 ; 𝑏1 , 𝑏0 ; and 𝑐1 , 𝑐0 are time-varying (in general) coefficients of these systems. Assume also that (𝐴, 𝐵) and (𝐵, 𝐶) are commutative pairs. The first commutativity conditions [7-9] for (𝐴, 𝐵) and (𝐵, 𝐶) yields 𝑏 𝑎 [ 1] = [ 1 𝑎 𝑏0 0 4 0 𝑘1 ] [ ], 1 𝑘0 (2a) 𝑐1 𝑏 [𝑐 ] = [ 1 𝑏0 0 0 ℓ1 ] [ ], 1 ℓ0 (2b) respectively; where 𝑘1 , 𝑘0 , ℓ1 , ℓ0 are some constants. Inserting the values of 𝑏1 , 𝑏0 as expressed in (2a) into Eq. (2b) and rearranging, we obtain 𝑐1 𝑎 [𝑐 ] = [ 1 𝑎0 0 0 𝑘1 ℓ1 ][ ]. 1 𝑘0 ℓ1 + ℓ0 (2c) This equation already satisfies the first commutativity condition for Systems 𝐴 and 𝐶; hence, 𝐴 and 𝐶 are commutative pairs under zero initial conditions. For the case of existence of non-zero initial conditions, the second commutativity condition [9] for (𝐴, 𝐵) and (𝐵, 𝐶) yields 𝑦𝐴 (𝑡0 ) = 𝑦𝐵 (𝑡0 ) ≠ 0, (3a) 1 − 𝑎0 (𝑡0 ) 1 − 𝑏0 (𝑡0 ) = ; 𝑎1 (𝑡0 ) 𝑏1 (𝑡0 ) (3b) 𝑦𝐵 (𝑡0 ) = 𝑦𝐶 (𝑡0 ) ≠ 0, (4a) 1 − 𝑏0 (𝑡0 ) 1 − 𝑐0 (𝑡0 ) = , 𝑏1 (𝑡0 ) 𝑐1 (𝑡0 ) (4b) respectively. Hence, Eqs. (3) and (4) lead to write 𝑦𝐴 (𝑡0 ) = 𝑦𝐶 (𝑡0 ) ≠ 0, (5a) 1 − 𝑎0 (𝑡0 ) 1 − 𝑐0 (𝑡0 ) = . 𝑎1 (𝑡0 ) 𝑐1 (𝑡0 ) (5b) The result in Eq. (5) clearly shows the satisfaction of the second commutativity condition for Subsystems 𝐴 and 𝐶. Hence, 𝐴 and 𝐶 are also commutative when initial conditions exist, and transitivity property is valid for non-relaxed first-order linear time-varying systems as well. In fact, Eq. (3b) is not satisfied for all systems 𝐴 and 𝐵 satisfying commutativity conditions (2a) under relaxed conditions. Using (2a) we see that Eq. (3b) requires 1 − 𝑎0 (𝑡0 ) 1 − 𝑏0 (𝑡0 ) 1 − 𝑘1 𝑎0 (𝑡0 ) − 𝑘0 = = = 𝑎1 (𝑡0 ) 𝑏1 (𝑡0 ) 𝑘1 𝑎1 (𝑡0 ) 5 1 − 𝑘0 − 𝑎0 (𝑡0 ) 𝑘1 ; 𝑎1 (𝑡0 ) (6a) Or equivalently 𝑘0 = 1 − 𝑘1 . (6b) Similarly, using (2b), we see that Eq. (4b) requires 1 − 𝑏0 (𝑡0 ) 1 − 𝑐0 (𝑡0 ) 1 − ℓ1 𝑏0 (𝑡0 ) − ℓ0 = = = 𝑏1 (𝑡0 ) 𝑐1 (𝑡0 ) ℓ1 𝑏1 (𝑡0 ) 1 − ℓ0 − 𝑏0 (𝑡0 ) ℓ1 , 𝑏1 (𝑡0 ) ℓ0 = 1 − ℓ1 . (7a) (7b) Using (2c) with (6b) and (7b), we can easily show that (5b) is satisfied; That is: 1 − 𝑐0 (𝑡0 ) 1 − [𝑘1 ℓ1 𝑎0 (𝑡0 ) + 𝑘0 ℓ1 + ℓ0 ] = = 𝑐1 (𝑡0 ) 𝑘1 ℓ1 𝑎1 (𝑡0 ) 1 − 𝑘0 ℓ1 − ℓ0 − 𝑎0 (𝑡0 ) 𝑘1 ℓ1 𝑎1 (𝑡0 ) 1 − (1 − 𝑘1 )ℓ1 − (1 − ℓ1 ) − 𝑎0 (𝑡0 ) 1 − 𝑎 (𝑡 ) 𝑘1 ℓ1 0 0 = = , 𝑎1 (𝑡0 ) 𝑎1 (𝑡0 ) (8) which is exactly Eq. (5b); hence, 𝐴 and 𝐶 are commutative under non-zero conditions as well if the constants 𝑘1 , ℓ1 , 𝑘0 , , ℓ0 satisfy (6b) and (7b). These are explicit commutativity conditions under non-zero initial states equivalently replacing by (3b) and (4b) in addition to (2a) and (2b) which are necessary and sufficient for relaxed case. With these conditions 5b is also satisfied, so that transitivity is valid. We state the results obtained so far by two theorems: Theorem 1: The necessary and sufficient conditions that two first-order linear time-varying systems 𝐴 and 𝐵 described by differential equations of the form (1) are commutative under zero initial conditions are that i. The coefficients of System 𝐵 must be expressible in terms of the coefficients of those of 𝐴 as in Eq. (2a) where 𝑘1 ≠ 0 and 𝑘0 are arbitrary constants. ii. Further, Systems 𝐴 and 𝐵 are commutative under arbitrary non-zero initial conditions as well if and only if Condition (i) is satisfied with 𝑘0 = 1 − 𝑘1 (that is 𝑘1 ≠ 0 and 𝑘0 cannot be chosen arbitrarily), and their non-zero initial conditions must be equal. Note that this theorem is the first theorem expressing the commutativity conditions for unrelaxed systems by using the arbitrary constants relating the coefficients of two systems for their commutativity in relaxed conditions. Note also that Eqs. (6b) and (7b) are independent of 6 the initial time. So, commutativity does not depend on the initial time 𝑡0 for first-order nonrelaxed systems. Theorem 2: The transitivity property of commutativity for first-order linear time-varying systems is always valid for both relaxed and un-relaxed commutative systems that is for systems with zero and non-zero initial conditions. 4. Transitivity for High-order Systems In this section, higher-order linear time-varying systems with zero initial conditions are considered; scalar (0-order) and first-order systems are also included in the scope. To prove the transitivity property of commutativity, the impulse response function is used. The results are general in the sense the subsystems of each commutative pair may have a different order than its partner. Let 𝐴 be a liear time-varying initially relaxed system having an impulse response ℎ𝐴 (𝑡, 𝜏); by definition this is the response to a unit impulse occurring at time 𝜏 and observed at time 𝑡 ≥ 𝜏 [14]. And the response of 𝐴 for an arbitrary input 𝑢𝐴 (𝑡) is expressed by superposition integral 𝑡 𝑦𝐴 (𝑡) = ∫ ℎ𝐴 (𝑡, 𝛾)𝑢𝐴 (𝛾)𝑑𝛾 . (9a) 𝑡0 Consider now the cascade connection of 𝐴 and 𝐵 as shown in Fig. 2 and denote this connection by 𝐴𝐵. Smilar to Eq. (9a), for the output of 𝐵 we write 𝑡 𝑦𝐵 (𝑡) = ∫ ℎ𝐵 (𝑡, 𝛾)𝑢𝐵 (𝛾)𝑑𝛾 . (9b) 𝑡0 It is obvious form Fig. 1, and using Eq. (9a) 𝜏 𝑢𝐵 (𝜏 ) = ∫ ℎ𝐵 (𝜏, 𝛾)𝑢(𝛾)𝑑𝛾 . 𝑡0 Figure 2: Cascade connection 𝐴𝐵 of Systems 𝐴 and 𝐵. 7 (9c) Finally, inserting Eq. (9c) in Eq. (9b), and observing 𝑦𝐵 (𝑡) in Fig. 2, we obtain 𝑡 𝜏 𝑦(𝑡 ) = ∫ ℎ𝐵 (𝑡, 𝜏) [ ∫ ℎ𝐴 (𝜏, 𝛾)𝑢(𝛾)𝑑𝛾] 𝑑𝜏 . 𝑡0 (9d) 𝑡0 This is the response of 𝐴𝐵 for any input 𝑢(𝑡) applied for 𝑡 ≥ 𝑡0 .To find the impulse response ℎ𝐴 (𝑡, 𝑡0 ) of the connection 𝐴𝐵, we substitute 𝑢(𝑡) = 𝛿(𝑡 − 𝑡0 ) in Eq. (9d) and arrive 𝑡 𝑡 𝜏 ℎ𝐴𝐵 (𝑡, 𝑡0 ) = ∫ ℎ𝐵 (𝑡, 𝜏) [∫ ℎ𝐴 (𝜏, 𝛾)𝛿(𝛾 − 𝑡0 )𝑑𝛾] 𝑑𝜏 = ∫ ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 , (10a) 𝑡0 𝑡0 𝑡0 where the second equality results from the property of impulse function. In a similar result, the impulse response ℎ𝐵𝐴 (𝑡, 𝜏) of the connection 𝐴𝐵 can be written as 𝑡 ℎ𝐵𝐴 (𝑡, 𝑡0 ) = ∫ ℎ𝐴 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 )𝑑𝜏 . (10b) 𝑡0 Since equal impulse responses yield equal input-output pairs, for commutativity of 𝐴 and 𝐵 it must be true that ℎ𝐴𝐵 (𝑡, 𝑡0 ) = ℎ𝐵𝐴 (𝑡, 𝑡0 ); ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅. (11a) Using Eqs. (10a, b); (11a) can be written as 𝑡 𝑡 ∫ ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 = ∫ ℎ𝐴 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 )𝑑𝜏 ; 𝑡0 ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅, (11b) ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅. (11c) 𝑡0 or equivalently 𝑡 ∫[ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐴 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 )] 𝑑𝜏 = 0; 𝑡0 In fact, either of Eqs. (11b) or Eq. (11c) express necessary and sufficient conditions in terms of impulse responses for relaxed systems 𝐴 and 𝐵 to be commutative. On the other hand, for commutativity of 𝐵 and 𝐶 under zero inintial conditions, the neccessary and suffifcient condition can be obtained from (11) by changing 𝐴 → 𝐵 and 𝐵 → 𝐶, the result is 8 ℎ𝐵𝐶 (𝑡, 𝑡0 ) = ℎ𝐶𝐵 (𝑡, 𝑡0 ); 𝑡 ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅, (12a) 𝑡 ∫ ℎ𝐶 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 )𝑑𝜏 = ∫ ℎ𝐵 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 )𝑑𝜏 ; 𝑡0 ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅, (12b) 𝑡0 or equivalently, 𝑡 ∫[ℎ𝐶 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 ) − ℎ𝐵 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 )] 𝑑𝜏 = 0; ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅. (12c) 𝑡0 For the proof of the commutativity of 𝐶 and 𝐴, that is the transitivity property of commutativity, it is required to show ℎ𝐶𝐴 (𝑡, 𝑡0 ) = ℎ𝐴𝐶 (𝑡, 𝑡0 ); 𝑡 ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅, that is, (13a) 𝑡 ∫ ℎ𝐴 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 )𝑑𝜏 = ∫ ℎ𝐶 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 ; 𝑡0 ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅, (13b) ∀𝑡 ≥ 𝑡0 , ∀𝑡0 ∈ 𝑅. (13c) 𝑡0 or equivalently, 𝑡 ∫[ℎ𝐴 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 ) − ℎ𝐶 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )] 𝑑𝜏 = 0; 𝑡0 In the light of the presence of equalities in (11b) and (12b), the work left for the proof of transitivity is to show the validity of (13b); if so then (13a) holds. This process will end with the proof of transitivity of linear time-varying relaxed systems of higher orders. It worth’s to remark that Eqs. (10a, b) are first used by J. E. Marshall to prove his assertion mentioned in Introduction (Eqs. (2, 3) in [2]). Later, they are used by the author for studying commutativity of Euler systems (Eqs. (34a, b) in [7]). When we consider a scalar system 𝐴: 𝑎0 (𝑡)𝑦𝐴 (𝑡) = 𝑥𝐴 (𝑡) (14a) for which its response ℎ𝐴 (𝑡, 𝑡0 ) to a unit impulse 𝛿(𝑡 − 𝑡0 ) is obviously ℎ𝐴 (𝑡, 𝑡0 ) = 𝑦𝐴 (𝑡) = 1 1 𝑥𝐴 (𝑡) = 𝛿(𝑡 − 𝑡0 ). 𝑎0 (𝑡) 𝑎0 (𝑡0 ) 9 (14b) Then, let 𝐵 be a time-varying system of 1st order or higher with impulse response ℎ𝐵 (𝑡, 𝑡0 ). Eqs. (10a) and (10b) lead to 𝑡 ℎ𝐴𝐵 (𝑡, 𝑡0 ) = ∫ ℎ𝐵 (𝑡, 𝜏) 𝑡0 𝑡 ℎ𝐵𝐴 (𝑡, 𝑡0 ) = ∫ 𝑡0 𝛿(𝜏 − 𝑡0 ) ℎ𝐵 (𝑡, 𝑡0 ) 𝑑𝜏 = , 𝑎0 (𝑡0 ) 𝑎0 (𝑡0 ) 𝛿(𝑡 − 𝜏) ℎ𝐵 (𝑡, 𝑡0 ) ℎ𝐵 (𝜏, 𝑡0 )𝑑𝜏 = . 𝑎0 (𝜏) 𝑎0 (𝑡) (15a) (15b) From these equations, it is obvious that a scalar system that can be commutative with a 1st or higher order system must be a time-invariant system; that is 𝑎0 (𝑡) = 𝑎0 (𝑡0 ) = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 for all 𝑡 ≥ 𝑡0 . In other words, a scalar time-varying system cannot commutative with any order of higher order (1st, 2nd …) time-varying system. The only commutative pairs of it are the scalar systems. Though commutativity of a constant gain system (scalar time-invariant system) is always valid with time-varying system of any order, if the initial conditions exist the commutativity is possible only if the constant gain is 1; that is System 𝐴 is an identity. The validation of transitivity using the equivalence of impulse responses ℎ𝐴𝐶 (𝑡, 𝑡0 ) and ℎ𝐶𝐴 (𝑡, 𝑡0 ) for first-order systems are considered in Section 5. But the extension of this result for systems at least one is 2nd order or higher is not straight forward and appears to be an unsolved problem. Instead of jumping this problem fully, we consider the special case that transitivity holds conditionally. Hence, the following discussion is not restricted by order limitation. Let 𝐴, 𝐵, 𝐶 be linear time-varying systems with impulse responses ℎ𝐴 , ℎ𝐵 , ℎ𝐶 satisfying ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐴 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 ) = 0, (16a) ℎ𝐶 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 )−ℎ𝐵 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 ) = 0. (16b) Eq. (16a) implies that Eqs. (11a, b, c) are satisfied, hence (𝐴, 𝐵) is a comutative pair. In a similar manner (16b) implies that (𝐵, 𝐶) is also a commutative pair. Multiplying (16b) by ℎ𝐴 (𝜏, 𝑡0 ) and inserting the equivalence of ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) as obtained from (16a), we find ℎ𝐶 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 )ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐵 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 )ℎ𝐴 (𝜏, 𝑡0 ) = 0, (17𝑎) ℎ𝐶 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 )ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐶 (𝜏, 𝑡0 )ℎ𝐴 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 ) = 0, (17𝑏) 10 [ℎ𝐶 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐴 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 )]ℎ𝐵 (𝜏, 𝑡0 ) = 0. (17𝑐) Since ℎ𝐵 (𝜏, 𝑡0 ) ≢ 0, it follows that ℎ𝐶 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐴 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 ) = 0. (18𝑎) This is sufficient to write 𝑡 𝑡 ∫ ℎ𝐶 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 − ∫ ℎ𝐴 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 )𝑑𝜏 = 0. 𝑡0 (18b) 𝑡0 Comparing with Eqs. (10a) and (10b), the first integral in (18b) is the impulse response of 𝐴𝐶 and the second one is that of 𝐶𝐴; hence, (18b) yields ℎ𝐴𝐶 (𝑡, 𝑡0 ) = ℎ𝐴𝐶 (𝑡, 𝑡0 ). (19) So, that 𝐴 and 𝐶 are commutative. This proves the transitivity proper of higher-order systems under the set assumptions. 5. Verifications for first-order systems This section verifies the transitivity property of first-order linear time-varying systems in their relaxed modes as presented in Section 3 by using the general results obtained for systems of any order in Section 4. Consider a first-order linear time-varying system 𝐴 defined by 𝑎1 (𝑡) 𝑑 𝑦 (𝑡) + 𝑎0 (𝑡)𝑦𝐴 (𝑡) = 𝑥𝐴 (𝑡), 𝑑𝑡 𝐴 (20) with zero initial conditions. The impulse response ℎ𝐴 (𝑡, 𝑡0 ) of this system to an impulse 𝛿(𝑡 − 𝑡0 ) occurring at 𝑡 = 𝑡0 is obviously expressed as [14, 15] ℎ𝐴 (𝑡, 𝑡0 ) = 𝑡 𝑎 (𝛾) 1 1 ∫𝑡 − 0 (𝛾)𝑑𝛾 𝑒 0 𝑎1 = 𝑒 𝑓𝐴(𝑡)− 𝑓𝐴(𝑡0 ) , (𝑡 ) (𝑡 ) 𝑎1 0 𝑎1 0 (21a) where 𝑓𝐴 (𝛾) = ∫ − 𝑎0 (𝛾) 𝑑𝛾 , 𝑎1 (𝛾) 𝑑 𝑎0 (𝛾) 𝑓𝐴 (𝛾) = − . 𝑑𝛾 𝑎1 (𝛾) 11 (21b) (21c) Hence, for Systems 𝐵 and 𝐶 of the same type of 𝐴, it can be written that ℎ𝐵 (𝑡, 𝑡0 ) = 𝑡 𝑏 (𝛾) 1 1 ∫ − 0 𝑑𝛾 𝑒 𝑡0 𝑏1 (𝛾) = 𝑒 𝑓𝐵 (𝑡)− 𝑓𝐵 (𝑡0 ) , 𝑏1 (𝑡0 ) 𝑏1 (𝑡0 ) 𝑓𝐵 (𝛾) = ∫ − 𝑑 𝑓 (𝛾) 𝑑𝛾 𝐵 𝑡 𝑏0 (𝛾) 𝑑𝛾 , 𝑏1 (𝛾) (22b) 𝑏 (𝛾) = − 𝑏0 (𝛾) , (22c) 1 𝑐 (𝛾) 1 ∫𝑡 −𝑐0 (𝛾)𝑑𝛾 0 1 𝑒 1 (𝑡0 ) ℎ𝐶 (𝑡, 𝑡0 ) = 𝑐 𝑡 𝑓𝐶 (𝛾) = ∫ − 𝑡0 =𝑐 (22a) 1 1 (𝑡0 ) 𝑒 𝑓𝐶 (𝑡)− 𝑓𝐶 (𝑡0 ) , 𝑐0 (𝛾) 𝑑𝛾 , 𝑐1 (𝛾) 𝑑 𝐶0 (𝛾) 𝑓𝐶 (𝛾) = − . 𝑑𝛾 𝐶1 (𝛾) (23a) (23b) (23c) For commutativity of 𝐴 and 𝐵, consider the verification of Eq. (11a) (or equivalently Eqs. (11b, c)). Using the relations in Eq. (2a) between the coefficients of 𝐴 and 𝐵 in Eq. (22b) and then recognizing (21b), we obtain 𝑓𝐵 (𝛾) = ∫ − 𝑏0 (𝛾) 𝑘1 𝑎0 (𝛾) + 𝑘0 𝑎0 (𝛾) 𝑘0 1 𝑑𝛾 = ∫ − 𝑑𝛾 = ∫ − 𝑑𝛾 − ∫ 𝑑𝛾 𝑏1 (𝛾) 𝑘1 𝑎1 (𝛾) 𝑎1 (𝛾) 𝑘1 𝑎1 (𝛾) = 𝑓𝐴 (𝛾) − 𝑘0 1 ∫ 𝑑𝛾 . 𝑘1 𝑎1 (𝛾) (24a) Using this result in Eq. (22a), we obtain 𝑘 𝑘 1 1 1 𝑓𝐴 (𝑡)− 0 ∫ 𝑑𝑡−𝑓𝐴 (𝑡0 )+ 0 ∫ 𝑑𝑡0 𝑘 (𝑡) 𝑘 (𝑡 𝑎 𝑎 1 1 1 1 0) ℎ𝐵 (𝑡, 𝑡0 ) = 𝑒 , 𝑘1 𝑎1 (𝑡0 ) = 1 1 1 𝑒 𝑓𝐴(𝑡)− 𝑓𝐴(𝑡0 ) 𝑒 𝑔(𝑡0 )− 𝑔(𝑡) = 𝑘1 𝑎1 (𝑡0 ) 𝑘1 𝑒 𝑔(𝑡0 )− 𝑔(𝑡) ℎ𝐴 (𝑡, 𝑡0 ), (24b) where 𝑔(𝑡) = 𝑘0 1 ∫ 𝑑𝑡 . 𝑘1 𝑎1 (𝑡) By using (15b) in (7a), we obtain 12 (24c) 𝑡 1 𝑔(𝜏)− 𝑔(𝑡) 𝑒 ℎ𝐴 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 . 𝑘1 ℎ𝐴𝐵 (𝑡, 𝑡0 ) = ∫ 𝑡0 (25) Before proceeding further, we show the transitivity property of ℎ𝐴 (•,•); in fact using (21a) ℎ𝐴 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) = = 1 1 𝑒 𝑓𝐴(𝑡)− 𝑓𝐴(𝜏) 𝑒 𝑓𝐴(𝜏)− 𝑓𝐴(𝑡0 ) 𝑎1 (𝜏) 𝑎1 (𝑡0 ) 1 1 1 𝑒 𝑓𝐴(𝑡)− 𝑓𝐴 (𝑡0 ) = ℎ (𝑡, 𝑡0 ). 𝑎1 (𝜏) 𝑎1 (𝑡0 ) 𝑎1 (𝜏) 𝐴 (26) Same property holds for the remaining first-order systems 𝐵 and 𝐶 as well. Another relation we need in the future proves is arrived as follows: 𝑡 ∫ 𝑡0 𝑡 𝑔(𝜏) 𝑒 𝑑𝜏 = ∫ 𝑎1 (𝜏) 𝑡0 𝑘0 1 ∫ (𝜏)𝑑𝜏 𝑘 𝑎 1 1 𝑒 𝑎1 (𝜏) 𝑑𝜏 = 𝑘0 1 𝑘1 𝑘1 𝑑𝜏 𝑡 ∫ 𝑒 𝑎1 (𝜏) | 𝑘0 𝑡0 𝑘1 𝑔(𝜏) 𝑡 𝑘1 𝑒 | = [𝑒 𝑔(𝑡) − 𝑒 𝑔(𝑡0 ) ]. 𝑘0 𝑡0 𝑘0 (27a) 𝑒 −𝑔(𝜏) 𝑘1 ∫ 𝑑𝜏 = [𝑒 −𝑔(𝑡0 ) − 𝑒 −𝑔(𝑡) ]. 𝑎1 (𝜏) 𝑘0 (27b) = Similarly, we obtain 𝑡 𝑡0 Using (26) and (27a) in (25), we have 𝑡 𝑡 𝑡0 𝑡0 1 𝑔(𝜏)− 𝑔(𝑡) 1 𝑒 − 𝑔(𝑡) 𝑒 𝑔(𝜏) ℎ𝐴𝐵 (𝑡, 𝑡0 ) = ∫ 𝑒 ℎ (𝑡, 𝑡0 )𝑑𝜏 = ℎ (𝑡, 𝑡0 ) ∫ 𝑑𝜏 𝑘1 𝑎1 (𝜏) 𝐴 𝑘1 𝐴 𝑎1 (𝜏) = 𝑒 −𝑔(𝑡) 𝑘1 ℎ𝐴 (𝑡, 𝑡0 ) 𝑘1 𝑘0 1 [𝑒 𝑔(𝑡) − 𝑒 𝑔(𝑡0 ) ] = 𝑘 ℎ𝐴 (𝑡, 𝑡0 ) [1 − 𝑒 𝑔(𝑡0 )−𝑔(𝑡) ]. 0 Using (24b) in (10b) and using the formula (26) and (27b), we obtain sequentially 𝑡 ℎ𝐵𝐴 (𝑡, 𝑡0 ) = ∫ ℎ𝐴 (𝑡, 𝜏) 𝑡0 𝑡 = ∫ 𝑡0 1 𝑔(𝑡 )− 𝑔(𝜏) 𝑒 0 ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 𝑘1 1 𝑔(𝑡 )− 𝑔(𝜏) 1 𝑒 0 ℎ (𝑡, 𝑡0 )𝑑𝜏 𝑘1 𝑎1 (𝜏) 𝐴 13 (28) 𝑡 𝑒 𝑔(𝑡0 ) 𝑒 −𝑔(𝜏) 𝑒 𝑔( 𝑡0 ) 𝑘1 −𝑔(𝑡 ) 0 − 𝑒 −𝑔(𝑡) ] (𝑡, ) = ℎ𝐴 𝑡0 ∫ 𝑑𝜏 = ℎ𝐴 (𝑡, 𝑡0 ) [𝑒 (𝜏) 𝑘1 𝑎1 𝑘1 𝑘0 𝑡0 1 = 𝑘 ℎ𝐴 (𝑡, 𝑡0 ) [1 − 𝑒 𝑔(𝑡0 )−𝑔(𝑡) ]. (29) 0 Obviously, 𝐴𝐵 and 𝐵𝐴 have the same impulse response as seen in Eqs. (28) and (29), respectively; so 𝐴 and 𝐵 are commutative. Remark 1: Although Eq. (11c), a property of impulse response of the commutative systems 𝐴 and 𝐵, seems to mislead to the conclusion of the integrant being zero; that is, ∆( 𝑡0 , 𝜏, 𝑡) ≜ ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐴 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 ) = 0. (30) This is strictly wrong. In fact, using (24b) for ℎ𝐴 (𝑡, 𝑡0 ), and (26) later, we have ∆( 𝑡0 , 𝜏, 𝑡) = 1 𝑔(𝜏)− 𝑔(𝑡) 1 𝑔(𝑡 )− 𝑔(𝜏) 𝑒 ℎ𝐴 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) − ℎ𝐴 (𝑡, 𝜏) 𝑒 0 ℎ𝐴 (𝜏, 𝑡0 ) = 0 𝑘1 𝑘1 = 1 ℎ (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) [𝑒 𝑔(𝜏)−𝑔(𝑡) − 𝑒 𝑔(𝑡0 )−𝑔(𝜏) ] 𝑘1 𝐴 = [𝑒 𝑔(𝜏)−𝑔(𝑡) − 𝑒 𝑔(𝑡0 )−𝑔(𝜏) ] 1 ℎ𝐴 (𝑡, 𝑡0 ) = 0. 𝑘1 𝑎1 (𝜏) (31a) Since, ℎ𝐴 (𝑡, 𝑡0 ) ≢ 0 and 𝑎1 (𝜏) ≢ 0, this implies 𝑒 𝑔(𝜏)−𝑔(𝑡) = 𝑒 𝑔(𝑡0 )−𝑔(𝜏) , (31b) or equivalently 1 [𝑔(𝑡) + 𝑔( 𝑡0 )]. 2 (31c) 1 1 1 1 𝑑𝜏 = [∫ 𝑑𝑡 + ∫ 𝑑 𝑡 ], 𝑎1 (𝜏) 2 𝑎1 (𝑡) 𝑎1 (𝑡0 ) 0 (31d) 𝑒 2𝑔(𝜏) = 𝑒 𝑔(𝑡)+𝑔( 𝑡0 ) ; 𝑔(𝜏) = With (24c), the last equation is equivalent to ∫ which is impossible for an arbitrary function 𝑎1 (•) And for general values of 𝑡0 ≤ 𝜏 ≤ 𝑡. 14 Similar result obtained in Eqs. (25-29) can be obtained for commutative pair (𝐵, 𝐶); either by the parallel derivations made for (𝐴, 𝐵), or by replacing 𝐴 → 𝐵, 𝐵 → 𝐶, so 𝑎1 → 𝑏1 and 𝑘1 , 𝑘0 by ℓ1 , ℓ0 , respectively. For the commutativity of 𝐴 and 𝐶, to show that ℎ𝐴𝐶 (𝑡, 𝑡0 ) = ℎ𝐶𝐴 (𝑡, 𝑡0 ), the replacements 𝐵 → 𝐶, (𝑘1 , 𝑘0 ) → (𝑘1 ℓ1 , 𝑘0 ℓ1 + ℓ0 ) in Eqs. (25-29) complete the verification of transitivity for initially relaxed first-order linear time- varying systems by using impulse responses. 6. Example This example is given for illustration of the results presented in Sections 4 and 5. Consider system 𝐴 describe by (𝑡 + 1)𝑦𝐴́ + (𝑡 + 2)𝑦𝐴 = 𝑥𝐴 , −1 < 𝑡0 ≤ 𝑡, (32) where 𝑎1 (𝑡) = 𝑡 + 1, 𝑎0 (𝑡) = 𝑡 + 2; 𝑓(𝑡) for 𝐴 is computed by using (21b) as 𝑓𝐴 (𝑡) = ∫ − 𝑡+2 𝑑𝑡 = −𝑡 − ln(𝑡 + 1). 𝑡+1 (33) Then, by (21a), its impulse response is computed as 𝑡0 +1 𝑒 −𝑡−ln(𝑡+1)+𝑡0 +ln(𝑡0 +1) 𝑒 −𝑡+𝑡0 +ln 𝑡+1 1 ℎ𝐴 (𝑡, 𝑡0 ) = = = 𝑒 −𝑡+𝑡0 . 𝑡0 + 1 𝑡0 + 1 𝑡+1 (34) Let subsystem 𝐵 be described by 2(𝑡 + 1)𝑦̇ 𝐵 + (2𝑡 + 5)𝑦𝐵 ; −1 < 𝑡0 ≤ 𝑡, (35) where 𝑏1 (𝑡) = 2(𝑡 + 1), 𝑏0 (𝑡) = 2𝑡 + 5 which can be obtained from 𝑎1 and 𝑎0 by using Eq. (2a) with 𝑘1 = 2, 𝑘0 = 1; hence, (𝐴, 𝐵) is a commutative pair. Using (22b), 𝑓(𝑡) for 𝐵 can be obtained as 𝑓𝐵 (𝑡) = ∫ − 2𝑡 + 5 𝑑𝑡 = −𝑡 − 1.5 ln(𝑡 + 1). 2(𝑡 + 1) (36) Then, by (22a), the impulse response of 𝐵 is computed as 𝑡0 +1 𝑒 −𝑡−1.5 ln(𝑡+1)+𝑡0 +1.5 ln(𝑡0 +1) 𝑒 −𝑡+𝑡0 +1.5 ln 𝑡+1 ℎ𝐵 (𝑡, 𝑡0 ) = = 2(𝑡0 + 1) 2(𝑡0 + 1) 15 = (𝑡0 + 1)1.5 (𝑡0 + 1)0.5 −𝑡+𝑡 1 0. 𝑒 −𝑡+𝑡0 = 𝑒 (𝑡 + 1)1.5 2(𝑡0 + 1) 2(𝑡 + 1)1.5 (37) For computations of ℎ𝐴𝐵 (𝑡, 𝑡0 ) and ℎ𝐵𝐴 (𝑡, 𝑡0 ), first consider the integrands in Eqs. (10a), (10b) and (11b). ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 ) = (𝜏 + 1)0.5 −𝑡+𝜏 1 1 𝑒 𝑒 −𝜏+𝑡0 = 𝑒 −𝑡+𝑡0 , (38a) 1.5 1.5 2(𝑡 + 1) 𝜏+1 2(𝑡 + 1) (𝜏 + 1)0.5 (𝑡 +1)0.5 1 (𝑡 +1)0.5 0 0 ℎ𝐴 (𝑡, 𝜏)ℎ𝐵 (𝜏, 𝑡0 ) = 𝑡+1 𝑒 −𝑡+𝜏 2(𝜏+1) 𝑒 −𝜏+𝑡0 = 2(𝑡+1)(𝜏+1) 𝑒 −𝑡+𝑡0 . 1.5 1.5 (38b) Obviously, these integrands are not identical and Eq. (30) in connection to Remark 1 is not satisfied for the general values of 𝑡0 ≤ 𝜏 ≤ 𝑡 ∈ 𝑅. The impulse response of 𝐴𝐵 and 𝐵𝐴 are computed as in (10a) and (10b), that is the integral of the integrands in (38a) and (38b), respectively. The results are as follows: 𝑡 𝑡 ℎ𝐴𝐵 (𝑡, 𝑡0 ) = ∫ ℎ𝐵 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 = ∫ 𝑡0 𝑡0 𝑒 −𝑡+𝑡0 1 𝑑𝜏 1.5 2(𝑡 + 1) (𝜏 + 1)0.5 𝑒 −𝑡+𝑡0 (𝜏 + 1)0.5 𝑡 = | 2(𝑡 + 1)1.5 0.5 𝑡0 = 𝑒 −𝑡+𝑡0 𝑒 −𝑡+𝑡0 𝑡0 + 1 0.5 0.5 0.5 ] [(𝑡 (𝑡 + 1) − + 1) = [1 − ( ) ], 0 (𝑡 + 1)1.5 𝑡+1 𝑡+1 𝑡 ℎ𝐵𝐴 (𝑡, 𝑡0 ) = ∫ 𝑡0 = (39a) (𝑡0 + 1)0.5 𝑒 −𝑡+𝑡0 (𝑡0 + 1)0.5 𝑒 −𝑡+𝑡0 (𝜏 + 1)−0.5 𝑡 1 𝑑𝜏 = | (𝜏 + 1)1.5 2(𝑡 + 1) 2(𝑡 + 1) −0.5 𝑡0 (𝑡0 +1)0.5 𝑒 −𝑡+𝑡0 (𝑡+1) [(𝑡 0 1 +1)0.5 1 − (𝑡+1)0.5 ] = 𝑒 −𝑡+𝑡0 𝑡+1 𝑡 +1 0.5 0 [1 − ( 𝑡+1 ) ]. (39b) Obviously, ℎ𝐴𝐵 (𝑡, 𝑡0 ) ≡ ℎ𝐵𝐴 (𝑡, 𝑡0 ). When System 𝐶 is obtained from 𝐵 by (2b) with ℓ1 = −0.5, ℓ0 = 3.5, its coefficients are found as 𝑐1 = −(𝑡 + 1), 𝑐0 = −(2𝑡 + 5)(−0.5) + 3.5 = −𝑡 + 1. Then, 𝑓(𝑡) for 𝐶 is computed from (23b) as 𝑓𝑐 (𝑡) = ∫ − −𝑡 + 1 𝑑𝑡 = −𝑡 + 2ln(𝑡 + 1). −𝑡 − 1 Using (23a), the impulse response of 𝐶 is now obtained as 16 (40a) ℎ𝐶 (𝑡, 𝑡0 ) = 𝑒 −𝑡+2 ln(𝑡+1)+𝑡0 −2 ln(𝑡0 +1) 1 𝑡+1 2 =− 𝑒 −𝑡+𝑡0 ( ) −(𝑡0 + 1) 𝑡0 + 1 𝑡0 + 1 =− (𝑡 + 1)2 −𝑡+𝑡 0. 𝑒 (𝑡0 + 1)3 (40b) The impulse response of the connection 𝐴𝐶 is computed by Eq. (10a) modified by replacing 𝐵 by 𝐶, and using Eqs. (34) and (40b) for 𝐴 and 𝐶; we obtain 𝑡 𝑡 ℎ𝐴𝐶 (𝑡, 𝑡0 ) = ∫ ℎ𝐶 (𝑡, 𝜏)ℎ𝐴 (𝜏, 𝑡0 )𝑑𝜏 = ∫ − 𝑡0 𝑡0 𝑡 = −(𝑡 + 1)2 𝑒 −𝑡+𝑡0 ∫ 𝑡0 = (𝑡 + 1)2 −𝑡+𝜏 1 𝑒 𝑒 −𝜏+𝑡0 𝑑𝜏 3 (𝜏 + 1) 𝜏+1 (𝑡 + 1)2 𝑒 −𝑡+𝑡0 1 1 𝑡 𝑑𝜏 = | 4 3 (𝜏 + 1) (𝜏 + 1) 𝑡0 3 (𝑡 + 1)2 𝑒 −𝑡+𝑡0 1 1 [ − ] (𝑡 + 1)3 (𝑡0 + 1)3 3 𝑒 −𝑡+𝑡0 𝑡+1 3 = [1 − ( ) ]. 3(𝑡 + 1) 𝑡0 + 1 (41a) Note that the impulse response of the connection 𝐶𝐴 can be obtained similarly by using Eq. (10a) by replacing 𝐵 by 𝐶 and using Eqs. (40b) and (34) for 𝐶 and 𝐴; the result is 𝑡 𝑡 ℎ𝐶𝐴 (𝑡, 𝑡0 ) = ∫ ℎ𝐴 (𝑡, 𝜏)ℎ𝐶 (𝜏, 𝑡0 )𝑑𝜏 = − ∫ 𝑡0 𝑡0 1 (𝜏 + 1)2 −𝜏+𝑡 −𝑡+𝜏 0 𝑑𝜏 𝑒 𝑒 (𝑡0 + 1)3 𝑡+1 𝑡 𝑒 −𝑡+𝑡0 𝑒 −𝑡+𝑡0 𝑡 2 (𝜏 + 1)3 | =− ∫(𝜏 + 1) 𝑑𝜏 = − 3 3 (𝑡 + 1)(𝑡0 + 1) 3(𝑡 + 1)(𝑡0 + 1) 𝑡0 𝑡0 = 𝑒 −𝑡+𝑡0 [(𝑡 + 1)3 − (𝑡 + 1)3 ] 3(𝑡 + 1)(𝑡0 + 1)3 0 = 𝑒 −𝑡+𝑡0 𝑡+1 3 [1 − ( ) ]. 3(𝑡 + 1) 𝑡0 + 1 (41b) This is the same impulse response expressed in (41a). Hence, it is verified that (𝐴, 𝐶) is a commutative pair. 7. Transitivity for Some 1st and 2nd Order Relaxed Systems 17 Let 𝐴, 𝐵, 𝐶 be linear time-varying systems of orders 2, 1, 1; respectively. Let they be represented by the general form of (1) with coefficients 𝑎2 , 𝑎1 , 𝑎0 ; 𝑏1 , 𝑏0 ; 𝑐1 , 𝑐0 ; inputs by 𝑥𝐴 , 𝑥𝐵 , 𝑥𝐶 ; output by 𝑦𝐴, 𝑦𝐵 , 𝑦𝐶 . It is true that 𝐴 has 2nd or lower order commutative pairs 𝐵 if and only if [8-10] −𝑎20.5 𝑑 4𝑎12 + 3𝑎̇ 22 − 8𝑎1 𝑎̇ 2 + 8𝑎̇ 1 𝑎2 − 4𝑎2 𝑎̈ 2 [𝑎0 − ] 𝑘1 = 0, 𝑑𝑡 16𝑎2 𝑎2 𝑏2 𝑎 [ 𝑏1 ] = 1 𝑏0 [𝑎0 0 0 𝑘2 0.5 𝑎2 0 [ 𝑘1 ], 𝑎2−0.5 (2𝑎1 − 𝑎̇ 2 ) 1] 𝑘0 4 (42a) (42b) where 𝑘2 , 𝑘1 , 𝑘0 are arbitrary constants. We assume that 𝐵 is a finite order commutative pair of 𝐴; hence 𝑘2 = 0 and 𝑎20.5 0 𝑏1 𝑘 −0.5 [ ] = [𝑎2 (2𝑎1 − 𝑎̇ 2 ) ] [ 1 ]. 𝑏0 𝑘 0 1 4 (43) On the other hand, it is true that 𝐵 has 1st or lower order commutative pairs 𝐶, if [8] 𝑐1 𝑏 [𝑐 ]=[ 1 𝑏0 0 0 ℓ1 ] [ ], 1 ℓ0 (44) where ℓ1 and ℓ0 are arbitrary constants. Inserting the values of 𝑏1 and 𝑏0 from Eq. (43),) into Eq. (44), and rearranging, we obtain 𝑎20.5 𝑐1 [𝑐 ] = [𝑎2−0.5 (2𝑎1 − 𝑎̇ 2 ) 0 4 0 𝑘1 ℓ1 ][ ]. 1 𝑘0 ℓ1 + ℓ0 (45) It is obviously true that this equation is in the form of (43). So 𝐶 is among the first-order commutative pairs of 𝐴. Hence, it has been proven that if (𝐴, 𝐵) and (𝐵, 𝐶) are commutative pairs so is (𝐴, 𝐶). Hence, transitivity is valid. Let’s get one step up and consider transitivity property between two second order and one firstorder systems. Let 𝐴, 𝐵, 𝐶 be 2nd, 1st, 2nd order systems, respectively, with coefficient 𝑎2 , 𝑎1 , 𝑎0 ; 𝑏1 , 𝑏0 , 𝑐2 , 𝑐1 , 𝑐0 . Assume (𝐴, 𝐵) and (𝐵, 𝐶) are commutative pairs and show (𝐴, 𝐶) is also commutative. Eq. (43) is valid since (𝐴, 𝐵) is a commutative pair. Similar equation 18 𝑐20.5 0 𝑏1 ℓ −0.5 [ ] = [𝑐2 (2𝑐1 − 𝑐̇2 ) ] [ 1] 𝑏0 ℓ 1 0 4 (46) is also valid since (𝐵, 𝐶) is a commutative pair. Further, (42a) is valid and the similar equation for 𝐶 is written as −𝑐20.5 𝑑 4𝑐12 + 3𝑐̇22 − 8𝑐1 𝑐̇2 + 8𝑐̇1 𝑐2 − 4𝑐2 𝑐̈2 [𝑐 − ] ℓ1 = 0. 𝑑𝑡 0 16𝑐2 (47) Since 𝐵 is of order 1, 𝑘1 in (43) and ℓ1 in (46) are not zero; hence (42a) and (47) yield 𝑎0 = [𝐴0 + 4𝑎12 + 3𝑎̇ 22 − 8𝑎1 𝑎̇ 2 + 8𝑎̇ 1 𝑎2 − 4𝑎2 𝑎̈ 2 ], 16𝑎2 (48a) 4𝑐12 + 3𝑐̇22 − 8𝑐1 𝑐̇2 + 8𝑐̇1 𝑐2 − 4𝑐2 𝑐̈2 ], 16𝑐2 (48b) 𝑐0 = [𝐶0 + respectively, where 𝐴0 and 𝐶0 are arbitrary constants. From Eq. (43), the first line, we obtain 2(𝑏̇12 + 𝑏1 𝑏̈1 ) 𝑎̈ 2 = . 𝑘12 𝑏12 2𝑏1 𝑏̇1 𝑎2 = 2 → 𝑎̇2 = , 𝑘1 𝑘12 (49a) Using these results in Eq. (43), the second line, we obtain 𝑎1 = 𝑏1 (2𝑏0 − 2𝑘0 + 𝑏̇1 ) 𝑏̇1 (2𝑏0 − 2𝑘0 + 𝑏̇1 ) + 𝑏1 (2𝑏̇0 + 𝑏̈1 ) → 𝑎̇ = . 1 𝑘12 𝑘12 (49b) Inserting the values of 𝑎2 , 𝑎̇ 2 , 𝑎̈ 2 , 𝑎1 , 𝑎̇ 1 in Eq. (49) into Eq. (48a) and simplifying, we obtain 𝑏0 − 𝑘0 2 𝑏1 𝑏̇0 𝑎0 = 𝐴0 + [ ] + 2 . 𝑘1 𝑘1 (49c) Similar results can be obtained starting from (45) and using (48b): 𝑐2 = 𝑐1 = 𝑏12 , ℓ12 𝑏1 (2𝑏0 −2ℓ0 +𝑏̇1 ) ℓ21 19 (50a) , (50b) 𝑐0 = 𝐶0 + [ 𝑏0 − ℓ0 2 𝑏1 𝑏̇0 ] + 2 . ℓ1 ℓ1 (50c) To prove the commutativity of 𝐴 and 𝐶, it is sufficient to show that 𝑎2 𝑐2 𝑎 [ 𝑐1 ] = 1 𝑐0 [𝑎 0 0 0 𝑚2 0.5 𝑎2 0 [ 𝑚1 ], 𝑎2−0.5 (2𝑎1 − 𝑎̇ 2 ) 1 ] 𝑚0 4 (51) which is similar equation to (42b), where 𝑚2 , 𝑚1 , 𝑚0 are some constants. It is true that, the coefficients of 𝐶 can be expressed as in (51) by proper choice of constants 𝑚2 , 𝑚1 , 𝑚0 ; in fact, inserting in coefficients 𝑎𝑖 in Eq. (49) and coefficient 𝑐𝑖 in Eq. (50) into Eq. (51), we find that 𝑘12 , ℓ12 (52a) 2𝑘1 (𝑘0 − ℓ0 ) , ℓ12 (52b) 𝑚2 = 𝑚1 = 𝑚0 = 𝐶0 − 𝐴0 𝑘12 ℓ21 +[ 𝑘0 −ℓ0 2 ℓ1 ] , (52c) which are all constants. Hence, Eq. (51) together with Eq. (42) imply that 𝐶 is a second-order commutative pair of 𝐴, that is 𝐴 and 𝐶 are also commutative. This proves the transitivity property of (𝐴, 𝐵) and (𝐵, 𝐶) to (𝐴, 𝐶). We express the result by a theorem: Theorem 3: The commutativity property between three subsystems of which at most 2 of them second order and the other(s) are first-order always satisfy the transitivity property under zero initial conditions. 8. Conclusions Transitivity property of commutativity is defined for commutative linear time-varying systems of any order. The transitivity results are presented for first-order systems with and without initial conditions. The study is carried on two approaches; one is based on use of impulse response function and the other depends on use of general conditions set by the author and others for commutativity of linear time-varying systems. 20 One illustrative example is included to show the validity of the results. However, general transitivity property of commutative high order systems have not been proved or disproved and this remains as an unsolved problem yet. REFERENCES [1] R. Boylestad and L. Nashelsky, Electronic Devices and Circuit Theory, Prentice Hall, New Jersey, 2013. [2] E. Marshal, Commutativity of time varying systems, Electronics Letters, 13 (1977) 539-540. [3] M. Koksal, Commutativity of second order time-varying systems, International Journal of Control, 36 (1982) 541-544. [4] S. V. Salehi, Comments on ‘Commutativity of second-order time-varying systems’, International Journal of Control, 37 (1983) 1195-1196. [5] M. Koksal, Corrections on ‘Commutativity of second-order time-varying systems’, International Journal of Control, 38 (1983) 273-274. [6] M. Koksal, General conditions for the commutativity of time-varying systems, IASTED International Conference on Telecommunication and Control (TELCONi84), 1984, pp. 223-225. [7] M. Koksal, A Survey on the Commutativity of time-varying systems, METU, Gaziantep Engineering Faculty, Technical. Report no: GEEE CAS-85/1, 1985. [8] M. Koksal, An exhaustive study on the commutativity of time-varying systems, International Journal of Control, 47 (1988) 1521-1537. [9] M. Koksal and M. E. Koksal, Commutativity of linear time-varying differential systems with non-zero initial conditions: A review and some new extensions, Mathematical Problems in Engineering, 2011 (2011) 1-25. [10] M. E. Koksal and M. Koksal, Commutativity of cascade connected discrete time linear time-varying systems, 2013 Automatic Control National Meeting TOK’2013, (2013) p.1128-1131. [11] M. Koksal and M. E. Koksal, Commutativity of cascade connected discrete-time linear time-varying systems, Transactions of the Institute of Measurement and Control, 37 (2015) 615-622. [12] M. E. Koksal, The Second order commutative pairs of a first-order linear time-varying system, Applied Mathematics and Information Sciences, 9 (2015) 1-6. [13] M. E. Koksal, Decomposition of a second-order linear time-varying differential system 21 as the series connection of two first-order commutative pairs, Open Mathematics, 14 (2016) 693-704. [14] C. A. Desoer, Notes For A Second Course On Linear Systems, Van Nostrand Rheinhold, New York, 1970. [15] Chi-Tsong Chen, Linear System Theory and Design, New York Oxford, Oxford University Press, 1999. 22
3cs.SY
A Beginner’s Guide to Systems Simulation in Immunology Grazziela P. Figueredo, Peer-Olaf Siebers, Uwe Aickelin, and Stephanie Foan arXiv:1307.1597v2 [cs.CE] 8 Jul 2013 Intelligent Modelling and Analysis Research Group, School of Computer Science, The University of Nottingham, NG8 1BB, UK gzf, uxa, pos, [email protected] Abstract. Some common systems modelling and simulation approaches for immune problems are Monte Carlo simulations, system dynamics, discrete-event simulation and agent-based simulation. These methods, however, are still not widely adopted in immunology research. In addition, to our knowledge, there is few research on the processes for the development of simulation models for the immune system. Hence, for this work, we have two contributions to knowledge. The first one is to show the importance of systems simulation to help immunological research and to draw the attention of simulation developers to this research field. The second contribution is the introduction of a quick guide containing the main steps for modelling and simulation in immunology, together with challenges that occur during the model development. Further, this paper introduces an example of a simulation problem, where we test our guidelines. 1 Introduction Some important advances in immunology were facilitated by the joint work of immunologists and mathematicians [1]. Many concepts existing in theoretical immunology are the result of mathematical models. Inumerous existing models in immunology are based on sets of ordinary differential equations (ODEs) [2, 3]. This approach for immunology, however, in practice limits the modelling effort to simpler dynamics involving fewer immune elements such as cells or molecules and it only allows analysis at an aggregate level. Moreover, it is not trivial to model problems involving individual localisation, memory of past events (or states) and emerging properties mathematically [1]. Hence, systems simulation emerged as a complement of mathematics that allows to overcome some of these limitations. Moreover, systems simulation modelling methods are closer to the natural description of the system, without the need of an in depth understanding of mathematics [4]. Sauro et al. [5] debates the usefulness of simulation in contrast to reductionism in biology. In reductionism, the dynamics of complex systems can be understood from studying the properties of their parts [6]. In contrast to reductionism, in holism (in its methodological version) the properties of the parts contribute to our understanding of the whole, but the properties can only be fully understood through the dynamics of the whole [6]. Systems simulation is, therefore, based on holism. For biology, Sauro et al. [5] state that “reductionism has proven to be a highly successful strategy and has enabled us to uncover the molecular details of biological systems in unprecedented detail”. The success of reductionist methods raised some scepticism as to the need for alternative approaches, such as systems biology. The challenge for simulation is, therefore, to generate novel insights that cannot be uncovered just by looking at a phenomena using reductionism. Examples of successful simulation approaches that helped advance immunological research were introduced in [7]. The models reviewed simulate interactions of immune cells and chemical substances, humoral responses and drug testing. With these simulations it is possible to observe emergent behaviour in the systems, which is not feasible with reductionism. As a first objective of this study, therefore, we want to show that there is a distinct place for simulation in the tool set that aids advances in immunology. Moreover we want to show that there is a wide range of problems in immunology to be tackled by computer scientists and simulation developers. As there few examples on the methodology for constructing immune systems simulations [8–10], the second objective is to introduce general guidances for conducting simulation studies in immunology and outline the challenges that might be encountered during the development of a simulation model. These guidances adapted from the work developed by Robinson [11] for operational research, considering the characteristics observed in immune simulations. We complement the current methodologies for constructing immune systems simulations by presenting a framework containing a life-cycle with the main steps to be followed by any developer, independent of the simulation modelling method chosen. The remainder of the paper is organized as follows. In Section 2 we review the main characteristics of the simulation methods used in immunology. In Section 3 we present the main steps and propose a life-cycle for conducting a simulation study for immune problems. In Section 4 we present a case study where we develop a system dynamics simulation model from the steps outlined. In Section 5, we present our conclusions and future work. 2 Simulation Methods The choice of a modelling technique for a problem is driven by the resources available such as experimental data, an understanding of the mechanisms involved, the hypothesis to be tested and the level of abstraction needed to test the hypothesis. Once the conceptual model is defined, a simulation method needs to be chosen. There is a wide spectrum of simulation methods used in immunology. These methods are classified as static or dynamic, stochastic or deterministic, continuous or discrete. These methods model the system using either top-down or bottom-up perspectives. Static models help understand connections between system components, without explicitly representing time [12]. Dynamic models aid in understanding dynamic implications and consequences over time of a system structure [13]. Deterministic models do not contain any probabilistic components. Stochastic models, on the other hand, consider random components [14]. The characteristic of being continuous or discrete determine whether time and variables of the model change continuously or discretely. For example the age of an individual changes continuously in time, whereas the number of immune cells that die with age is a discrete value. Top-down approaches focus on the system at an aggregate level, while bottom-up approaches split the system in individual parts that will interact giving rise to the behaviour of the system as a whole [15]. Sauro et al. [5] mentions that the construction of models of biochemical and cellular behaviour has been traditionally carried out through a bottom-up approach, which combines laboratory data and knowledge of a reaction network to produce a dynamic model. This process, however, requires the reaction network to be known and the possibility to carry out the various laboratory experiments. Furthermore, the modelling relies on the fact that data from laboratory experimentation matches real-world phenomena, which is not always correct. Samples can be compromised during collection or during the experimentation process. In addition, although bottom-up approaches are very useful for immunology, there are circumstances where they can not be applied. Examples include when the reaction network process is not well understood, or laboratory experiments are known not to be able to reproduce the real-world reactions (for instance, given the environmental differences such as temperature). In addition, the authors argue that “top-down modelling strategies are closer to the spirit of systems biology exactly because they make use of systems-level data, rather than having originated from a more reductionist approach of molecular purification”. The conclusion reached in their study was that there is no best approach as it is preferable to view them as complementary. Their ideas match other studies in biology and other research areas, which investigate the merits of each approach and their combination for simulation [16]. To our knowledge, the most common system simulation approaches for immunology are Monte Carlo simulation, system dynamics, discrete-event simulation, cellular automata and agent-based simulation. Monte Carlo simulations [17] are largely used in molecular theoretical immunology. These techniques generate random numbers and observe that fraction of the numbers that obey a certain property (of properties). These methods are suitable for obtaining numerical solutions for problems as an alternative to their analytical solution. The disadvantage of these methods are that they do not provide information of how the elements of the system change during the simulation (dynamics of the system). Instead, they focus on the determination of the system outcome given a certain input, not taking time into account. System dynamics (SD) is a top-down modelling technique that uses stocks, flows and feedback loops as concepts to model the behaviour of complex systems in a stock and flow diagram. It is an aspect of systems theory that is initially applied in order to understand complex aggregate behaviours in industry [18]. Currently, SD is applied to any complex system characterized by interdependency, mutual interaction, information feedback and circular causality. System dynamics simulation (SDS) is a continuous simulation for an SD model. It consists of a set of ODEs that are solved for a certain time interval. These ODEs, however, are implicit in the system’s structure and the relationships between the elements modelled can be established with experimental data. Some examples of SD applied to the immune system are found in [19, 20]. Discrete-event simulation is also a top-down approach that models a system as a set of entities being processed and evolving over time according to the availability of resources and the triggering of events. The simulator maintains an ordered queue of events [21]. Each event occurs at an instant in time and marks a change of state in the system. It is process-oriented and the entities involved are passive [11], with no pro-activity. The entities are individually represented and can be tracked throughout the system simulation. The models are stochastic and outputs usually represent average values [22]. Examples of applications for the immune system are found in [23–25]. Cellular automata is a discrete model consisting of two main components. The first component is an infinite regular grid of cells, which constitutes the universe or space of the cellular automata. In computer simulations, however, due to space limitations, the cellular automata space is predetermined and finite. The second component is a finite automaton (or cell). Each cell from the grid contains a finite number of states and a predefined set of cells called neighbourhood. The communication of a cell with other cells within its neighbourhood is local, deterministic, uniform and synchronous [26]. Each cell is initialized with an initial state at time t = 0. As time advances, the cells are updated according to a fixed rule, which is, in general, a mathematical function. This rule defines the next state of each cell according to its current state and its neighbourhood states. Examples of several applications for the immune system are found in [7]. Agent-based simulation is a technique that employs autonomous agents that interact with each other [27]. The agents’ behaviour is described by rules that determine how they learn, interact with each other and adapt. The overall system behaviour arises from the agents’ individual dynamics and their interactions [21]. For immunology, it can amalgamate in vitro data on individual interactions between cells and molecules of the immune system to build an impression of the system as a whole. Cellular automata and agent-based simulation have some similarities such as individual rules and interactions between the individuals entities. Moreover, both are bottom-up approaches capable of representing emergent behaviour in the system. The entities in cellular automata, however, do not have memory and only interact with individuals from the predefined neighbourhood, as their location does not change. In agent-based simulation, on the other hand, the agents are individual entities with memory and are capable to interact with any other agent in the system. Several examples of agent-based models in immunology are found in the european virtual human immune system project (ImmunoGrid) [28]. By reviewing the simulation methods and some of their applications to immune problems, such as those from [7, 23–25, 29], it is possible to outline the benefits of simulation to immunology and, therefore, achieve our first objec- tive of this work. Compared with real-world experimentation, simulation is time and cost-effective. Most laboratory experiments are expensive and have to be in agreement with ethical specifications. Furthermore, in a simulation environment, it is possible to systematically generate different scenarios, conduct and replicate experiments. In the following section we fulfil our second research goal of this paper, which is to introduce a descriptive guide for the development of a simulation model in immunology and the challenges that might be encountered during this process. These guidances are kept general and can be applied to all simulation methods in immunology. 3 Steps in a Simulation Study As there is not much done to established guidance to develop simulations for the immune system, we studied those developed by [11] for simulation in operational research problems and adapted them for simulations of the immune system. The adaptation was performed by studying several simulations under different approaches developed for the immune system, as mentioned in the previous section. In order to adapt the guidelines developed by [11], we observed the similarities and differences with operational research and outlined general steps for building immune simulations. These steps represent a life-cycle of a simulation and therefore the method we present is iterative. Furthermore, we discuss the pitfalls that might be encountered during the process, as shown below. In some of the steps, extra efforts specific to immunology were not added as we believe they are generic for any type of simulation. 1. Define the Objectives. Overall, the objectives are either to investigate a theory or propose a “what-if” scenario with no concern to ethics restrictions. The scenario proposed can either be based on experimental data or defined as an intuition of what might happen in reality. Furthermore, there are also cases where actual models do not match real-world experimentation and they need to be further investigated (in a simulation model). In addition, new hypotheses and research questions may be defined together with immunologists as simulation goals. The objectives come from real-world observation. We assume, however, that real-world observation and experimentation has been previously performed by immunologists. 2. Describe the system. In this step, it is necessary to use documents (immunology books and articles, transcripts of interviews with experts, etc.) describing how the immune elements to be simulated work and interact. The description of the system is based on knowledge acquired by theoretical work, real-world observation and laboratory experimentation. Due to the complexity of the elements and processes in the immune system, however, this knowledge is scarce. The immune system is far from being fully fathomable, and the descriptions found in literature are only partial representations and assumptions of what occurs in reality. 3. Investigate existing theories and established models. In order to build a new simulation model, it is common to look at the existing models and investigate their hypotheses, objectives, validation process and limitations. For some cases, these established models have somehow been validated against experimental data. With this practice it is possible to build a new model as an improvement of what has already been established in order to further investigate a certain immune process. 4. Use experimental data. Currently, most simulation models are built based on real-world observation and experimentation. There are some models, however, where there is no data available (for example, when Jerne’s network theory was conceptualized [30]). These models are based purely on theoretical assumptions with the purpose of providing more insights about what happens in the real world. Furthermore, in the field of immunology, the non-existence of data can be due to the lack of understanding of a process, or a difficulty or even impossibility in collecting information with current technology. In other cases, a hypothesis is first formulated requiring experimental data to confirm it. There is, therefore, the need to collect this data. For instance, Foan et al. [20] implemented a system dynamics simulation of T cell subsets throughout a person’s lifetime based on an established mathematical model developed by Balcheva [31]. The authors conclude that further validation of this model is necessary and so a novel data set should be collected as there are arguably more specific markers that could help to gain further insights from the model. 5. Build conceptual model. The conceptual model of a problem is an abstraction intended to contain the principal aspects observed in the real world, considering the necessary level of details [32]. In this step we formally define the model scope, the objectives previously outlined, the inputs and outputs and the simplifications. The process of creating a conceptual model evolves with decisions regarding the model scope and level of detail [11]. The acceptance of the conceptual model should be agreed with immunologists. According to Ulgen et al. [33], “rigorous validation procedure for the conceptual model is as important as the verification and validation of the model because it saves time and redirects the simulation developers in the right direction before time is wasted in the study”. Due to the limitations of a immune simulation, it is important to abstract the relevant real-world features and build a simple model. According to Kotiadis and Robinson [32], the importance of model abstraction “relies on the fact that there is no need to model all that is known about the real problem. Simpler models are developed and run faster, they are flexible, require less data and results are easier to be interpreted”. The nature of the immune problems thus implies that the model should be developed in order to address a few objectives, within a limited scope. The description of the system (and definition of the conceptual model) should therefore focus on the parts of the immune system (scope, elements, information available, assumptions, hypotheses) relevant to achieve the simulation goals. Daigle discusses the challenges of modelling immunology [34]. As it is a field in which information is still being gathered, simulations have to be updated frequently to suit new findings. Moreover, current computational resources and modelling techniques are in development. It is still thereby impossible to represent computationally an entire pool of cells of a typical immune response (around 1012 cells). In addition, immunological systems are mostly hierarchical, involving several layers and complex interactions between the elements of these layers. 6. Identify elements, parameters, aggregates, etc. already established in theory and real-world data. The study of the conceptual model provides a means to understand the problem and the best way to represent the elements of the system. This stage influences the choice of the most appropriate simulation approach. For example, if the in the conceptual model it is established the interactions of the simulation will occur at a cellular population level rather than an individual cell level, this might indicate that a top-down simulation approach would be more suitable to build the model. 7. Decide on the most appropriate simulation approach. This decision is made based on the characteristics of the problems, the research questions to be addressed, the scope, the level of aggregation and the experimental data available. Some of the most common approaches used in immunology are agent-based modelling and simulation, discrete-event modelling and simulation, cellular automata and system dynamics. Cellular automata is used for problems involving autonomous individual interactions within a neighbourhood placed in a lattice and emergent behaviour. Agent-based simulation is suitable for problems involving autonomous individual behaviour, elements spacial localization, memory and emergence. Discrete-event simulation tackles problems that are process-oriented, which have passive individual entities and chronological sequence of events. Furthermore, each event occurs at an instant in time and marks a change of state in the system. It can be used for any experiment where there is no need for continuous time. SD defines a system at a high level of aggregation and, therefore, it should be used when the research question involves patterns of behaviours and feed-back interactions between the aggregates. This approach is very useful to simulate dynamics of populations and interactions between different populations overtime. For example, interactions between tumours and populations of effector cells, populations of viruses and T cells, etc. 8. Represent elements, parameters, etc. using the appropriate simulation approach. Once the simulation approach is chosen, the elements defined in the conceptual model need to be translated into their correspondent implementation used by each approach, for instance, stocks, flows, parameters and information for SD or agents and rules for ABMS. This step is part of the construction of the simulation model, defined in the next step. 9. Build the simulation model. This stage includes the development of the computational implementation of the model in a simulation tool. The implementation is a software representation of the requisites defined in the conceptual model. The computational model is the final product to be used by the immunologists. 10. Verify the model. The model verification is the process of ensuring that the model design has been transformed into a computer model with sufficient accuracy [11]. 11. Validate the model with existing theories and, if available, realworld data. Validation ensures that the model is sufficiently accurate for the purpose at hand. For immunology it is acknowledged that models are not intended to be completely accurate for a number of reasons: (1) there is no real world data to compare against, (2) there is little data, (3) real-world data is inaccurate, (4) even if the data is accurate, the real world data is only a sample, which in itself creates inaccuracy. Verification and validation are continuous and iterative processes performed throughout the life cycle of a simulation study [11]. 12. Experimental design. The experimental design improves the experimentation process by the definition of sound experiments with trustworthy results. In this stage, the experimental factors that are most likely to lead to significant improvements are identified. This process is developed using data analysis, expert knowledge, preliminary experimentation and sensitivity analysis. 13. Experimentation. Experimentation is conducted following the experimental design guidelines. It can make use of multiple simulation replications; interactive experimentation (observing the simulation and making changes to the model to see the effects); batch experimentation (setting experimental factors and leaving the models to run for a pre-defined run length); comparing alternatives (where there is a limited number of scenarios to be compared) and search experimentation (when there is no predefined number of scenarios). 14. Result Analysis. Plots and statistics are collected during the simulation. The result analysis is the process that interprets results and the best way to present them. 15. Report Findings. After results are interpreted, there is the need to report the findings from the simulations. For immunology, it can be new insights, verification of a theory, etc. 16. Validate and add more requisites with immunologists. Building an immune simulation is an iterative process. Generally the model is built together with immunologists, and, in every step of the framework, the model elements should be verified with them. The process of simulation is iterative, as shown in Figure 1. During the model development, additional data might become available, which changes the system description/objectives and impacts on every step of the process. Moreover, as validation occurs throughout the whole process, if any of the stages is not validated (data available, real world understanding and description, conceptual model, computer model, experimental design, etc), there is the need to go back and rethink the invalid state, which impacts on the subsequent steps. 4 Case Study The objective of our case study is to exemplify how the steps defined previously can be employed to help in the development of a simulation for the immune system. The problem to be investigated is how the population of peripheral naive T cells evolve during the course of an individual’s lifetime. The development of the simulation model is depicted below. Fig. 1. Process of simulation study: the life cycle. 1. Define Objectives. The simulation goal is concerned with establishing an understanding of the peripheral naive T cell repertoire dynamics over time. 2. Describe the System. In the human body there is a type of white blood cell, namely the naive T cell, which plays an important role in the immune system by responding to new infections in the organism. Before an individual reaches the age of 20, the set of naive T cells is sustained primarily from thymic output. In middle age, however, there is a change in the source of naive T cells: as the thymus involutes, there is a considerable shrinkage in its T cell output, which means that new T cells are mostly produced by peripheral expansion. There is also a belief that some memory T cells have their phenotype reverted back to the naive proliferation cells type [35]. Furthermore, memory cells are originated from active T cells. 3. Investigate existing theories and models. Immunologists found out that thymic contribution in an individual are quantified by the level of a biological marker called ‘T cell receptors excision circle’ (TREC). TREC is circular DNA originated during the formation of the T-cell receptor. The percentage of T cells possessing TRECs decays with shrinkage of thymic output, activation and reproduction of naive T cells [35]. This means that naive T cells originating from the thymus have a greater percentage of TREC than those originating through other proliferation and with time there is a depletion of naive T cells from thymus in the organism. There is an existing model proposed by Murray [35] that investigates the thymic output and decay of these cells mathematically with the use of an ODE system. 4. Experimental data. TREC data collected by immunologists is presented by Murray et al. [35], which also develops an ODE system model for the dynamics of peripheral naive T cells. Furthermore, the authors provided us with data on active cells and total naive T cells in individuals with age ranging from 1 to 55 years. If we assume that this data has been validated by the immunologists and expresses what occurs in reality, we can use this information for the continuation of our investigations on naive cells from peripheral proliferation. 5. Conceptual model. The population dynamics of the model is shown in Figure 2. We have four main populations of cells: naive from thymus (in the figure naive), naive from proliferation, active cells and memory cells. Naive and memory cells are sources of naive cells from proliferation. Active cells are sources of memory cells. The scope of the simulation, therefore, is limited to the dynamics of these four populations. The number of naive from thymus and active cells are given by real-world data collected by immunologists. The conceptual model and data used are the same as the those from the existing model proposed by Murray [35]. The objective is to determine what are the dynamics of the naive cells from peripheral proliferation with age under a systems simulation approach different from the ODEs simulation. Another goal is to determine the rates in which the naive cells from thymus and memory cells become naive cells from proliferation; and the rates in which active cells become memory cells. Fig. 2. Dynamics of Naive T cells. 6 and 7. Identify elements, parameters, etc. and decide on the most appropriate simulation approach. As the investigations regard populations dynamics at a high level of aggregation, as defined in the conceptual model, we decided to build the simulation using the system dynamics approach, where the aggregates will be each different cell population and the feedback loops are those represented by the arrows in the conceptual model of figure 2. 8. Represent elements, parameters, etc. using the appropriate simulation approach. As stated before, system dynamics models consist of stock, flows, information and feedback loops. The stocks of the simulation are the variables that accumulate over time; flows modify the stocks by adding or sub- tracting elements. For the simulation, therefore, the stocks will be the number of naive cells from proliferation and memory cells. The stock of naive cells from proliferation is modified by flows such as addition of new cells from thymus, peripheral proliferation and death, as shown in Figure 2 from the conceptual model. The memory cells stock is changed by the flows: active cells reversing into memory and memory cells death. Both naive and active cells are represented in the simulation as look up tables. Moreover, parameters representing rates in which flows modify the stocks need to be incorporated. These parameters are: N aiveT hymusP rolif erationRate, N aiveP rolif erationRate, N aiveP rolif erationDeathRate, M emoryT oN P Rate, M emoryDeathRate and ReversionT oM emoryRate. 9. Build the simulation model. The final SD model implemented is shown in Figure 3. Fig. 3. SD built from naive T cells data. In the figure, the stocks are represented by the box are represented by the hourglass , flow , the flow variables , parameters and infor- mation . Information indicates that the stock value is used in the flow calculation. RealNaives and RealActives are look-up tables containing the experimental data. 9. Verify the model. As the model studied is quite simple, we verified our implementation against the conceptual model. Further verification was performed during the experimental stage. 10. Validate the model with existing theories and, if available, realworld data. As we mentioned, the validation process is performed throughout all simulation development. We validate our results against the data set provided for the total number of naive T cells in the organism, as shown in the result analysis (step 12). 11. Experimental design and experimentation. For this case study we will run one experiment in which we adjust the parameters to fit the original data. The simulation was run for a period correspondent to sixty years. 12. Result Analysis and findings. We calibrated the simulation parameters against the data provided and the results obtained are shown in Figure 4(a). Figure 4(b) shows the results obtained in [35]. For both approaches, the total number of naive cells for the simulation are different for the first eighteen years and this difference as well as the parameters obtained need further investigation with immunologists. After twenty years, the numbers for the real data observed and the outcomes obtained are very close. Moreover, it is possible to observe how the population of naive cells from proliferation grows with time and is prevalent in the total naive cells cohort after fifty years. Results for the SD model 100 90 80 80 70 60 50 60 50 40 40 30 30 20 20 10 10 0 Total Naive % CD4+ data Log10 percentage T cells from thymus data Total Naive %CD4+ from ODE simulation Naive from proliferation from ODE simulation 90 Naive % Naive % 70 Results for the ODE model 100 Total Naive % CD4+ data Log10 percentage T cells from thymus data Total T cells from simulation Naive from proliferation from simulation 0 10 20 30 Years 40 50 60 0 0 10 20 30 Years 40 50 60 (a) (b) Fig. 4. Simulation results. For the SD simulation, the parameter values used are: NaiveThymusProliferationRate = 0.025, NaiveProliferationDeathRate = 0.017, MemoryToNPRate = 0.001, ReversionToMemoryRate = 0 and MemoryDeathRate = 0.05. 13. Validate and add more requisites with immunologists. Results (and parameters calibration) validation needs to be done with immunologists, as well as new requisites do be added in the simulation model. There is the need to investigate whether the simulation models are informative and relatively accurate. Further research also needs to be done to explain the outcome differences for both models. 5 Conclusions Although there are examples showing the success of simulation aiding advances in immunology, this set of methodologies is not popular among immunologists. The overall objective of our research, therefore, is to outline the potential contribution of simulation methods to help immunological studies and invite experts (simulation developers, computer scientists, etc) to build solutions in this field. For this paper, we had two research goals. The first goal was to show that there is a distinct place for simulation in the tool set used by immunologists and present the most common simulation approaches. As there are no general guidelines for the development of immune simulations, our second objective was to introduce our own guidances for conducting simulation studies in immunology and outline the pitfalls that might be encountered during the development of a simulation model. We achieved our first objective by arguing that popular methodologies used such as ODEs and reductionist methods have limitations that are overcome by simulation. Moreover, we argued that for many simulation methods, the problem representation is closer to the systems natural description. For our second goal, we studied several simulations using different approaches in the literature and outlined their common features. This helped us to develop a simulation lifecycle with several steps to be followed. These steps encompass common aspects to be considered during the development of immune simulations, independent of the simulation approach adopted. As future work we want to improve the lifecycle introduced and develop a decision framework that further helps with the choice of a simulation approach according to the problem presented. In addition, we aim at making our set of guidances more specific according to the simulation method used. References 1. Louzoun, Y.: The evolution of mathematical immunology. Imm. Rev. 216 (2007) 9–20 2. Gruber, J. Models of Immune Systems: The Use of Differential Equations Available at: http://www.lymenet.de/literatur/immundif.htm (Last accessed 13 Jun 2011) 3. Eftimie, R., Bramson, J.L., Earn, D.J.: Interactions between the immune system and cancer: A brief review of non-spatial mathematical models. Bull Math Biol. (2010) 4. Bonabeau, E.: Agent-based modeling: Methods and techniques for simulating human systems. In: Proc. of the National Academy of Sciences of the United States of America. Volume 99. (2002) 7280–7287 5. Sauro, H.M., Harel, D., Kwiatkowska, M., Shaffer, C.A., Uhrmacher, A.M., Hucka, M., Mendes, P., Strömback, L., Tyson, J.J.: Challenges for modeling and simulation methods in systems biology, Winter Simulation Conference (2006) 1720–1730 6. ∅streng, W.: Reductionism versus Holism Contrasting Approaches? In: Consilience. Interdisciplinary Communications 2005/2006. Centre for Advanced Study, Oslo (2007) 11–14 7. Fachada, N., Lopes, V., Rosa, A.: Agent-based modelling and simulation of the immune system: a review. In: EPIA 2007 - 13th Portuguese Conference on Artificial Intelligence. (2007) 8. Kitano, H.: Computational systems biology. Nature 420 (2002) 206–210 9. Kitano, H.: Systems biology: A brief overview. Science 295 (2002) 1662–1664 10. Andrews, P.S., Polack, F.A.C., Sampson, A.T., Stepney, S., Timmis, J.: The CoSMoS process version 0.1: A process for the modelling and simulation of complex systems. Technical Report YCS-2010-453, Department of Computer Science, University of York (2010) 11. Robinson, S.: Simulation: The Practice of Model Development and Use. John Wiley and sons, Ltd (2004) 12. Silva, P.S., Trigo, A., Varajo, J., Pinto, T.: Simulation concepts and applications. In Lytras, M.D., Ordonez de Pablos, P., Ziderman, A., Roulstone, A., Maurer, H., Imber, J.B., eds.: Organizational, Business, and Technological Aspects of the Knowledge Society. Volume 112 of Communications in Computer and Information Science. Springer Berlin Heidelberg (2010) 429–434 13. Babulak, E., Wang, M.: 1. In: Discrete Event Simulation: State of the Art. InTech (2010) 1–8 14. Banks, J., Carson, J., Nelson, B., Nicol, D.: Discrete-event system simulation. 4th edn. Pearson (2005) 15. Macal, C.M.: To agent-based simulation from system dynamics. In: Proc. of the 2010 Winter Simulation Conference. (2010) 16. Schieritz, N., Milling, P.M.: Modeling the forrest or modeling the trees: A comparison of system dynamics and agent based simulation. In: Proc. of the XXI Int. Conference of the System Dynamics society. (2003) 17. Metropolis, N., Ulam, S.: The Monte Carlo method. J. Amer. Stat. Assoc. 44 (1949) 335–341 18. Forrester, J.W.: Industrial Dynamics. Pegasus Communications (1961) 19. Figueredo, G.P., Aickelin, U., Siebers, P.O.: Systems dynamics or agent-based modelling for immune simulation? In: Proc. of the Int. Conf. on AIS. (2011) 20. Foan, S.J., Jackson, A.M., Spendlove, I., Aickelin, U.: Simulating the dynamics of T cell subsets throughout the lifetime. In: Proc. of the Int. Conf. on AIS. (2011) 21. Siebers, P.O., Aickelin, U.: Introduction to Multi-Agent Simulation. In: Encyclopaedia of Decision Making and decision support technologies. (2007) 554–564 22. Tako, A.A., Robinson, S.: Comparing model development in discrete event simulation and system dynamics. In Rossetti, M.D., Hill, R., Dunkin, A., Ingalls, R.G., eds.: Proc. of the 2009 winter simulation conference. (2009) 979–990 23. Look, A.T., Schriber, T.J., Nawrocki, J.F., Murphy, W.H.: Computer simulation of the cellular immune response to malignant lymphoid cells: logic of approach, model design and laboratory verification. Immunology 43 (1981) 677–690 24. Martin S. Zand, Benjamin J. Briggs, A.B., Vo, T.: Discrete event modeling of CD4+ memory T cell generation. The Journal of Immunology 173 (2004) 3763– 3772 25. Figge, M.T.: Stochastic discrete event simulation of germinal center reactions. Phys. Rev. E 71 (2005) 051907 26. Wolfram, S.: Statistical mechanics of cellular automata. Rev. Mod. Phys. 5 (1983) 601–644 27. Macal, C.M., North, M.J.: Tutorial on agent-based modeling and simulation. In: Proc. of the 2005 Winter Simulation Conference. (2005) 28. ImmunoGrid. The European Virtual Immune System Project Available at: www.immunogrid.eu (Last accessed 15 Jul 2012) 29. Thorne, B.C., Bailey, A.M., Pierce, S.M.: Combining experiments with multi-cell agent-based modeling to study biological tissue patterning. Briefings in bioinformatics 8 (2007) 245–257 30. Jerne, N.K.: Towards a network theory of the immune system. Ann. Immunol (Inst. Pasteur) 125C (1974) 73–89 31. Baltcheva, I., Codarri, L., Pantaleo, G., Boudec, J.Y.L.: Lifelong Dynamics of Human CD4+ CD25+ Regulatory T Cells: Insights from in vivo Data and Mathematical Modeling. Journal of Theoretical Biology 266 (2010) 307–322 32. Kotiadis, K., Robinson, S.: Conceptual modelling: Knowledge acquisition and model abstraction. In Madon, S.J., Hill, R.R., Mnch, L., Rose, O., Jefferson, T., Fowler, J.W., eds.: Proc. of the 2008 Winter Simulation Conference. (2008) 951–958 33. Ulgen, O.M., Black, J.J., Johnsonbaugh, B., Klungle, R.: Simulation methodology - a practitioner’s perspective. Int. Journal of Industrial Engineering, Applications and Practice 1 (1994) 34. Daigle, J.: Human immune system simulation: A survey of current approaches. Georgia State University (2006) 35. Murray, J.M., Kaufmann, G.R., Hodgkin, P.D., Lewin, S.R., Kelleher, A.D., Davenport, M.P., Zaunders, J.: Naive T cells are maintained by thymic output in early ages but by proliferation without phenotypic change after twenty. Immunology and Cell Biology 81 (2003) 487–495
5cs.CE
Output Feedback Control of a Class of Uncertain Systems Under Control-derivative dependent disturbances arXiv:1610.05847v1 [cs.SY] 19 Oct 2016 M. Alamir ∗ J. Dobrowolski ∗∗ A. T. Mohammed ∗ ∗ CNRS, University of Grenoble Alpes (mazen.alamir(amgad.mohamed)@gipsa-lab.grenoble-inp.fr). ∗∗ Schneider Electric Industrie. 37 Quai Paul Louis Merlin. 38000 Grenoble ([email protected]) Abstract: This paper addresses the design of robust dynamic output feedback control for highly uncertain systems in which the unknown disturbance might be excited by the derivative of the control input. This context appears in many industrial problems such as the speed control of the hydraulic turbines and the frequency stabilization in micro grids to cite but few examples. A key feature that has to be carefully addressed in this context is that too agressive feedback might lead to the loss of controllability and/or a significant drop in the closed-loop performance. The paper formulates the problem, underlines its relevance and gives a rigorous solution in which a dynamic output feedback is given together with a realistic set of sufficient conditions on the controller’s parameters that enable to assess the behavior of the closed-loop under different circumstances. A numerical example is given to illustrate the relevance of the proposed successful design characterization. Keywords: Robust Control, control-dependent uncertainties, low gain feedback. 1. INTRODUCTION This paper addresses the problem of output feedback design of dynamical systems showing the following features: (1) There is a simple although uncertain relationship between u and y (y is of relative degree 0). This simplicity suggests the use of appealingly simple feedback design. (2) However, a cautionless design of such a simple law might excite some internal dynamics of the system leading to oscillations and/or lack of controllability. (3) In spite of this issue, the use of advanced observerbased nonlinear controller that would be designed using the entire model in order to master the internal dynamics is not welcomed by practitioners because of its high complexity and the need to derive a tight models of complex behaviors that are not always well mastered. Moreover, the observer design is not always easy nor the system is always observable. These reasons make the framework addressed in the present contribution appealing (when possible), namely, keep simple control structure but set the parameters of the simple control law in a sound and theoretically assessed way so that the above mentioned coupling issue is appropriately addressed. To the best of the authors knowledge, existing works do not tackle the case of output feedback of uncertain systems with control derivative-dependent uncertainties. Typical classes of uncertainties that are commonly handled are parametric uncertainties [Kar 1999], additive bounded state-dependent uncertainties [Cheng 1998, Nunes et al. 2009] or nonlinear uncertainties with affine state dependent bounds [Li et al. 2016] to cite but few representative references. Works belonging to the model-free approach [Fliess and Join 2013], while addressing higher relative degrees, are also based on a representation of the unknown term to be estimated that is not dependent on the control behavior in a way that might enhance instable coupling. This paper is organized as follows: First, the problem is stated in section 2 and motivated through the description of two industrial example (control of hydraulic turbines and frequency stabilization in micro grids). Section 3 discusses the working assumptions. The main results regarding the successful feasibility bounds are given in Section 4. An illustrative example is given in Section 5. Finally, Section 6 concludes the paper and gives some hints for further investigation. In the sequel, given a time interval I := [t1 , t2 ] and a variable x, the boldfaced symbol x is used to denote the profile x(t) t∈I of x over I when the later is known without ambiguity from the context. Otherwise the explicit notation x(I) is used instead. Let xt := x(t) and if x is scalar, let kxk∞ := supt∈I |x(t)|. The set of possible profiles w of the exogenous uncertainty involved in (2) is denoted by W. 2. PROBLEM STATEMENT We consider uncertain dynamic systems of the form: h i ẏ(t) = α(t) u(t) − g(t) + ℓ(t, η(t))) (1) η̇(t) = E(η [t−τ,t] , u̇[t−τ,t] , w[t−τ,t] ) (2) where y ∈ R and u ∈ [u, u] are the regulated output and the control input respectively. g(·) is an unknown term satisfying g(t) ∈ [g, g] with known bounds g and g. The vector η ∈ Rnη represents internal states with dynamics given by (2) in which E : Rnη × R× Rnw → Rnη is possibly unknown map. the vector w ∈ Rnw represents exogenous disturbances. Finally α(t) ∈ [α, ᾱ] is an unknown scalar that might be time-varying, with known bounds α and ᾱ. Let ∆u := ū − u and ∆g = ḡ − g denotes the admissible excursion of the control input and the unknown term g respectively. Remark 1. Equation (2) is a rather general representation that can encompasses time delayed systems, general partial differential equations to cite but few examples. A careful examination of (1) clearly shows that the controllability of y can be guaranteed if one can enforce the following inclusion: h := g − ℓ(η) ∈ [u + ρ, u − ρ] ⊂ [u, ū] (3) for some ρ > 0 and if |u̇| can be taken arbitrarily high since in this case, u can instantaneously dominate h and consequently enforce any desired sign to ẏ. However, the fact that the dynamic (2) of η depends on u̇ makes this second condition unrealistic as a strong dynamics on u (high u̇) can steer the system to regions where (3) is violated leading to the loss of controllability and even instability. This is precisely the issue that is investigated in this contribution. Note that the absence of precise knowledge of ℓ(·, ·), E(·, ·, ·), g(·) and α makes the problem even more challenging as it prevents, for instance, the reconstruction of η (from the only measured y) and the use of the estimated values in the necessarily careful control design. Moreover, the observability itself may not hold in many situations. In this paper, the following simple dynamic output feedback is considered  u = S λ(yd − y) + z (4) ż = λf (u − z) (5) where S is the saturation function that projects the argument inside [u, u] and yd is the constant set-point for the regulated output y. This feedback is defined up to the choice of the two positive parameters λf , λ > 0. The problem addressed in this paper can be formulated as follows: Problem Find a high level characterization of the uncertainties and maps involved in (1)(2) and associated conditions on the control parameters (λ, λf ) so that the behaviour of the closed-loop system can be conveniently/quantifiably assessed. More precisely, the assessment of the closed-loop properties should be understood in the following sense: (1) Asymptotic stability should be obtained in the absence of disturbance (w ≡ 0, g ≡ 0 and ℓ ≡ 0) (2) A quantifiable bound can be given on the asymptotic tracking error in the case where persistent dynamic g and non vanishing disturbance w are present. Before addressing the problem stated above, the following section underlines the relevance of the framework described by (1)-(2) by showing that it describes at least two concrete industrial problems. 2.1 Relevance of the framwork The framework described above fits at least two important industrial problems that are briefly discussed here. Control of hydraulic turbines Efficient control of hydraulic turbines in the context of Power Storage Plant (PSP) is gaining a renewed interest. In this context, the hydraulic plant is used as a mean to compensate for the intermittency of renewable sources of energy [Connolly et al. 2012]. As such, the response time of speed control is a key parameter that determines the success of the whole power management system. In this context, the regulated variable y is the rotational speed Ω, the control u is the guiding vane’s opening γ while the internal state η is the state of the penstock (flow rate and pressure values inside the penstock) that drives the water flow from the water reservoir to the turbine’s level. All practitioners know [Zhou 2011] that the major obstacle that limits high rotational acceleration of the turbine lies in the induced oscillating pressure waves in the penstock. When referring to the internal dynamic (2), the time laps τ represent twice the time needed for the pressure wave to travel the penstock’s length. These pressure oscillations generate disturbing torque variations at the turbine’s level that can go beyond what the controlled torque can compensate if the dynamics of the control is not monitored appropriately. That is the reason why simple control laws that are not carefully tuned against this phenomenon fail to produce satisfactory results. Distributed frequency-control in isolated micro grids This is another example that falls into the framework studied in this paper. Here the regulated variable is the grid frequency f . The control input u is the sum of produced powers by the Gensets and the renewable sources while the uncertainty w is the derivative of the load power consumption. The internal dynamics is induced by the flexibility of power transmission between Gensets following sudden change in the load power demand. The need for a distributed control design (in which only the frequency measurement is used) emphasizes the need for simple control laws that cannot afford the task of model-based reconstruction of the internal dynamic (which needs both observability and total knowledge of the model’s details). This internal dynamics disturbs the commonly used [Zhao et al. 2016, Xialing et al. 2014] power balance equation f˙ = α(P − PL ) by an additional term such that: f˙ = α(u − PL + Cη) (6) η̇ = Aη + B1 u̇ + B2 ṖL (7) which obviously takes the form (1)-(2) with w = ṖL . Note that a 4th order dynamics is typically needed to correctly represent the phenomena when only two Gensets are simply considered. contexts described in Section 2.1, the inequalities (9)-(10) become true after a finite time 1 with: Z t eA(t−σ) B2 wσ dσ (11) c0 := ǫ + sup sup C c1 := sup C t≥0 The first unavoidable assumption is called the Control Authority Margin (CAM) assumption. It simply states that u can ultimately dominates the unknown term g ∈ [g, ḡ] alone with some margins, denoted by ̺+ > 0 and ̺− : Assumption 3.1. (Control Authority Margin). There exist two scalars ̺− > 0 and ̺+ > 0 such that: (8) ū ≥ ḡ + ̺+ and u ≤ g − ̺− These different positive constants are shown in Figure 1. w∈W t≥0 d1 := |CB1 | + sup CA t≥0 u g ̺− ḡ ∆g ū ̺+ Fig. 1. Definition of the different positive constants involved in the characterization of the actuator and the unknown term g. The next assumption characterizes the behavior of the additional term ℓ involved in (1) under the dynamic (2) for all possible disturbance profiles w ∈ W and all profiles u: Assumption 3.2. There exist positive scalars c0 , d0 > 0 and c1 , d1 > 0 such that, for all w ∈ W and all admissible input profiles u (inside [u, ū]), the following inequality holds: |ℓ(t, η(t))| ≤ c0 + c1 ku̇[t−τ,t] k∞ (9) |ℓ̇(t, η(t))| ≤ d0 + d1 ku̇[t−τ,t]k∞ (10) Moreover, the evolution of the state η remains bounded for any bounded profiles in kuk∞ and ku̇k∞ . This assumption can be better understood if one considers the case where the dynamics (2) is given by (7) in which the matrix A is Hurwitz (open-loop stable internal dynamics). Indeed in this case, which holds for both industrial B1 dσ (12) Z t eA(t−σ) B2 wσ dσ (13) eA(t−σ) B1 dσ (14) 0 Z t 0 In the case of hydraulic turbines, asymptotic stability of the penstock dynamics comes from the fact that this system is theoretically marginally stable but becomes asymptotically stable by introducing a pre-compensator in the definition of the flow rate feedback. The control u discussed in this paper represent then the definition of the remaining feed-froward term. As for the micro grids case, the asymptotic stability comes from the use of the droop frequency control as a first rapid loop on the top of which, the control we are interested in amounts at translating the droop curve vertically. This is obviously equivalent to an action on the total produced power u. In the sequel, the short notation ku̇k∞ is used for ku̇[t−τ,t]k∞ as t is removed and τ is supposed to be fixed once for all. Note that without this assumption, there is obviously no means to guarantee bounded behavior of the output tracking error and this, regardless of the control law being used. ∆u e 0 d0 := ǫ + sup sup CA 3. WORKING ASSUMPTIONS In this section, the high level characterization that are mentioned in the problem’s statement (Section 2) are introduced. These characterizations delimit the class of unknown dynamics and quantities for which the simple law (4)-(5) can be appropriate provided that some conditions on the choice of λ and λf are fulfilled. These conditions are established in Section 4. w∈W t≥0 0 Z t A(t−σ) 4. SUFFICIENT CONDITIONS ON CONTROL PARAMETERS AND ASSOCIATED BOUNDS ON THE TRACKING ERROR Let us first of all examine some properties of the signals involved in the feedback laws (4)-(5). Lemma 4.1. Under the feedback law (4)-(5), for all λ > 0 satisfying: 1 λ< (15) ᾱc1 the following inequality holds:   λᾱ β + c0 + λf ∆u ku̇k∞ ≤ δu := (16) 1 − λᾱc1 where  (17) β := ∆g + max ̺+ , ̺− Proof. By the very definition (4), inequality (16) has to be checked only inside the admissible domain as otherwise u̇ = 0 and the inequality obviously holds. Now, when the saturation constraint is not active, one obviously has according to (4): |u̇| ≤ λ|ẏ| + |ż| (18) but according to (1), it comes that: h i |ẏ| ≤ ᾱ |u − g| + |ℓ| (19) an examination of Figure 1 clearly shows that: o n |u − g| ≤ β := ∆g + max ̺+ , ̺− therefore, using (20) and (9) in (19) gives: h i |ẏ| ≤ ᾱ β + c0 + c1 ku̇k∞ 1 (20) (21) beyond which the influence of the initial state that prevailed at the beginning of the system’s first operation time becomes lower than ǫ. ≤ λf ∆u z (2) any dynamics starting in A− enters A0 in finite time. (3) A0 is invariant. z − λ(y − yd ) = ū θ ≥ α(̺+ − |ℓ|) A+ A0 z − λ(y − yd ) = u ≥ α(̺− − |ℓ|) ≤ λf ∆u y − yd A− Fig. 2. Definition of the sets A+ , A− and A0 and disposition of the vector fields. on the other hand, since z is a first order filtered version of u, it comes that z ∈ [u, ū] and hence: |ż| ≤ λf ∆u (22) using (20)-(21) in (18) leads to: i h (23) |u̇| ≤ λ ᾱβ + c0 + c1 ku̇k∞ + λf ∆u which can be rewritten equivalently as follows: (1 − λᾱc1 )ku̇k∞ ≤ λᾱ(β + c0 ) + λf ∆u which gives obviously (16) if (15) is satisfied. (24) ✷ In order to go further in the analysis of the closed-loop behavior, the following sets are defined (see Figure 2): A+ := {(y, z) | z − λ(y − yd ) ≥ ū} (25) (26) A− := {(y, z) | z − λ(y − yd ) ≤ u} A0 := {(y, z) | z − λ(y − yd ) ∈ (u, ū)} (27) Note that by definition, if (y, z) ∈ A+ then u = ū, if (y, z) ∈ A− then u = u while if (y, z) ∈ A0 then the control is not saturated, namely u = λ(yd − y) + z. Based on these definitions, the following result can be stated: Lemma 4.2. (A0 is attractive and invariant). If the following conditions hold: • λ < 1/(ᾱc1 ) • λf and λ are such that λf < λϕ(λ) (28) where: c1 α i−1 h (β + c0 )c1 ᾱ i ̺ − c0 − λ α 1 − λᾱc1 1 − λᾱc1 (29) where ̺ := min{̺− , ̺+ }, then the set A0 is attractive and invariant for the closed-loop dynamics associated to the control law (4)-(5) and to any constant desired value yd . h ϕ(λ) := ∆u 1 + Proof. The steps of the proof are the following: (1) any dynamics starting in A+ enters A0 in finite time. proof of (1). Assume that (y, z) ∈ A+ (see Figure 2. Examination of the vector field (see Figure 2) suggests that the result would be proved if one can prove that the following inequality holds: |ż| < λ|ẏ| (30) On the other hand we know that |ż| ≤ λf ∆u while |ẏ| ≥ α(̺+ − |ℓ|). Now using the inequality (9), the inequality (30) would be satisfied if the following condition holds:   λf ∆u < α ̺+ − (c0 + c1 ku̇k∞ ) λ (31) and since λ < 1/(ᾱc1 ) the inequality (16) of Lemma 4.1 holds, therefore, (30) would be satisfied if the following inequality holds: ## " "   λᾱ β + c0 + λf ∆u + λf ∆u < α ̺ − c0 + c1 λ (32) 1 − λᾱc1 which is equivalent to (after straightforward manipulations): h c1 α i−1 h + (β + c0 )ᾱλ i λf < ∆u 1 + ̺ − c0 − c1 αλ 1 − λαc1 1 − λᾱc1 (33) proof of (2). Following exactly the same arguments, it can be shown that A0 is attractive for any initial condition in A− provided that the following condition holds: h c1 α i−1 h − (β + c0 )ᾱλ i λf < ∆u 1 + ̺ − c0 − c1 αλ 1 − λαc1 1 − λᾱc1 (34) Combining the more restrictive of the two conditions (33) and (34) obviously leads to (29). Proof of (3). This simply comes from the fact that the flows ẋ and ż are continuous (in y and z) and it has just been shown that the vector fields on the intersection boundaries A+ ∩ A0 and A− ∩ A0 does strictly enter inside the set A0 . Therefore A0 is invariant. ✷ Now regarding the existence of λ, λf > 0 that satisfy the conditions of Lemma 4.2, one has the following result: Lemma 4.3. (Existence of λ, λf ). If the following condition holds: c0 < ̺ := min{̺− , ̺+ } (35) then there exists λ∗ > 0 such that for all λ < λ∗ , there exists λf > 0 such that the pair (λ, λf ) satisfies the requirements of Lemma 4.2. More precisely, λ∗ is solution of:   1 | inf ϕ(λ) ≥ 0 (36) λ∗ = sup σ ≤ ᾱc1 λ∈(0,σ) Proof. This is because, thanks to (35), ϕ(·) satisfies: min{̺− , ̺+ } − c0 ϕ(0) = >0 (37) ∆u (1 + c1 ) and since ϕ is a continuous function of λ inside (0, ᾱc1 1 ), there exists λ∗ ∈ (0, ᾱc1 1 ) such that for all λ ∈ (0, λ∗ ), ϕ(λ) > 0 hence there exists λf > 0 satisfying (29). ✷ Based on the result of Lemma 4.2, it comes out that the asymptotic behavior of the closed-loop is only determined by the behavior of the system under the non-saturated control law u = λ(yd −y)+z. But this feedback law leads to a dynamics (inside A0 ) that can be written in the following form:      −αλ α y − yd ẏ (38) = −λf λ 0 z − h ż where h is the unknown dynamics given by: h = g − ℓ(η) (39) and using the following notation:   −αλ α (40) ey := y − yd ; ez := z − h ; A0 := −λf λ 0 the dynamics (38) becomes:       0 e ėy = A0 y − ez ėz ḣ (41) Based on this observation, the main result of the paper can be derived: Proposition 4.1. (Main result). If the following conditions are satisfied: (1) Assumptions 3.1-3.2 hold, (2) c0 < min{̺− , ̺+ }, (3) λ ∈ (0, λ∗ ) and λf < λϕ(λ) where λ∗ solves (36) in which ϕ is given by (29). (4) the unknown term g satisfies |ġ| ≤ δg then the tracking error ey satisfies the following inequality: δg + d0 + d1 δu lim |y(t) − yd | ≤ (42) t→∞ λλf where δu > 0 is the constant given by (16). Proof. Under the Assumption of the proposition, the conditions of Lemma 4.2 (by definition of λ∗ ) hold. Therefore, the closed-loop trajectories lie ultimately inside A0 and the dynamics (41) persistently prevails after a finite time. This means that one has asymptotically:     Z t 0 ey (t) A0 (t−σ) dσ (43) e → ez (t) ḣ(σ) 0 Focusing on ey and taking the worst case leads to: Z t lim |ey (t)| ≤ C1 eA0 (t−σ) C2 dσ max |ḣ(σ)| (44) t→∞ σ∈[0,t] 0 T where C1 := (1, 0) and C2 = (0, 1) . This gives, because A0 is invertible [see (40)]: lim |ey (t)| ≤ C1 A−1 0 C2 max |ḣ(σ)| t→∞ σ∈[0,t] (45) Now by definition (39) of h, the fact that |ġ| ≤ δg and (16) of Lemma 4.1: max |ḣ(σ)| ≤ δg + d0 + d1 δu (46) σ∈[0,t] Moreover, simple computations show that C1 A−1 0 C2 = 1/(λλf ) which obviously gives the result. ✷ 5. ILLUSTRATIVE EXAMPLE where A, B1 , B2 and C are given by: " # # " # " 0 0.1 −3.4 −1 −0.5 A = 0.25 −1.7 0.5 ; B1 = 0 ; B2 = 0.2 0 0 1.2 2.75 −3.6 0 1] C = [1 while the delay τ = 10 is used. The unknown signal g(t) is given by: g(t) := 1 − 0.3 cos(0.1t) − 0.1 sin(0.2t + π/6); (47) Therefore, the bounds g = 0.5 and ḡ = 1.5 can be used (∆g = 1). Moreover, the bound on the derivative of g is δg = 0.05. Therefore, considering control saturations given by u = −1 and ū = 3 leads to ̺− = 1.5 and ̺+ = 1.5, ̺ = 1.5 and ∆u = 4. The bounds α = 0.1, ᾱ = 0.3 are supposed to hold while a true value α = 0.2 is used in the simulations. We consider as admissible set W to be the set of all disturbances that are bounded by w̄ = 0.1. For simulation, the disturbance signal w(t) = w̄ sin(t) is used. Computation of (11)-(14) gives: c0 = 0.05 c1 = 0.07 ; d0 = 0.2 ; d1 = 0.42 (48) Using these values in the definition of ϕ(·) and λ∗ leads to the evolution of ϕ(λ), the bound on the asymptotic tracking error and the bound λϕ(λ) on the values of λf are depicted in Figure 3 where it can be inferred that λ∗ = 17.18. Note that the upper bound 1/(ᾱc1 ) ≈ 47.4 in this example meaning that in this example, λ∗ is limited by the need for a positive sign of ϕ. Figure 4 shows the behavior of the closed-loop system when the value λ(1) = 17 ∈ (0, λ∗ ) is adopted together with λf = 0.95λϕ(λ) ≈ 0.0102 satisfying (28). This Figure shows quite good closed-loop behavior with the tracking error asymptotically below its theoretical bound a while after the set-point gets constant. On the other hand, Figure 5 shows the behavior of the closed-loop system when λ(2) = 10λ(1) is used (with the same value of λf . The closed-loop clearly shows that the trajectories are no more adequately attracted to a small neighborhood of the desired values. This is mainly due to the high excursion of the internal state η which leads to high value of ℓ that breaks the attractiveness of the tight neighborhood of yd . This excursion has to be compared to the rather moderate one which can be observed on Figure 4. This clearly shows that a rationalized choice of (λ, λf ) is a key step in the success of the simple control law (4)-(5) for this particular class of systems. 6. CONCLUSION AND FUTURE WORKS In this paper, the problem of dynamic output feedback of systems with control-derivative dependent uncertainties is analyzed. High level characterization of the involved map is given so that a successful tuning of a simple feedback law is given together with an upper bound on the output tracking error. A natural extension of this work is a concrete application to the realistic examples described in the paper. Let us consider the uncertain system given by (1)-(2) in which the internal dynamic (2) is given by: REFERENCES η̇(t) = Aη(t) + B1 ku̇[t−τ,t]k∞ + B2 w ℓ(η) = Cη Cheng, C.F. (1998). Output feedback stabilization for uncertain systems: constrained riccati approach. IEEE Transactions on Automatic Control, 43(1), 81–84. 4 ·10 101 100 10 2 0 −2 10−1 5 0 5 10 15 20 Asymptotic bound on |ey | for λf = 0.95λ ∗ ϕ(λ) 10−2 10−3 0 0 100 200 300 400 4 100 0 5 10 15 Upper bound λ ∗ ϕ(λ) on λf 20 0 0 −2 −0.2 5 10 15 20 λ Fig. 3. (top) Evolution of ϕ(λ) given by (29). (Middle) Asymptotic bound on the output tracking error ey [see (42)]. (Bottom) Upper bound λϕ(λ) on the control parameter λf [see (33)]. |ey | y and yd 101 100 10 10−1 5 10−2 10−3 0 100 200 300 400 10−4 0 time u(t) 4 100 200 300 400 time ℓ(t) 8 6 2 4 0 2 0 100 200 300 400 time 0 0 100 200 300 400 time Fig. 4. Behavior of the closed-loop system for the choice (λ(1) , λf ) = (17, 0.0102) meeting the theoretical bounds. time ℓ(t) 6 4 2 0 100 200 300 400 time 0 100 200 300 400 8 2 0.2 −2 0 time u(t) 102 0 ey y and yd Evolution of ϕ(λ) vs λ −2 0 0 100 200 300 400 time Fig. 5. Behavior of the closed-loop system for the choice (λ(2) , λf ) = (170, 0.0102) that violate the prescribed bounds. Connolly, D., Lund, H., Mathiesen, B., Pican, E., and Leahy, M. (2012). The technical and economic implications of integrating fluctuating renewable energy using energy storage. Renewable Energy, 43, 47–60. Fliess, M. and Join, C. (2013). Model-free control. arXiv:1305.7085v2. Kar, I. (1999). Design of static output feedback controller for uncertain systems. Automatica, 35(1), 169 – 175. Li, G., Lin, Y., and Zhang, X. (2016). Adaptive output feedback control for a class of nonlinear uncertain systems with quantized input signal. International Journal of Robust and Nonlinear Control. Nunes, E.V.L., Hsu, L., and Lizarralde, F. (2009). Global exact tracking for uncertain systems using outputfeedback sliding mode control. IEEE Transactions on Automatic Control, 54(5), 1141–1147. Xialing, X., Jianghui, X., Youping, X., Ruyu, B., Hui, L., Tao, L., and Jing, Y. (2014). Research on the dynamic frequency characteristic of large-scale power grid considering the action of power system splitting and load shedding. In Proceedings of the 2014 international conference on power systems technology (powercon 2014). Zhao, J., Lyu, X., Fu, Y., Hu, X., and Li, F. (2016). Coordinated microgrid frequency regulation based on dfig variable coefficient using virtual inertia and primary frequency control. IEEE Transactions on Energy Conversion, 31(3), 833–845. Zhou, J.X. (2011). Analytical study on possible selfexcited oscillation in s-shaped regions of pump-turbines. Proc. IMech, 225, 1132–1142.
3cs.SY
Protein Folding Optimization using Differential Evolution Extended with Local Search and Component Reinitialization arXiv:1710.07031v1 [cs.AI] 19 Oct 2017 Borko Bošković · Janez Brest October 20, 2017 Abstract This paper presents a novel differential evolution algorithm for protein folding optimization that is applied to a three-dimensional AB off-lattice model. The proposed algorithm includes two new mechanisms. A local search is used to improve convergence speed and to reduce the runtime complexity of the energy calculation. For this purpose, a local movement is introduced within the local search. The designed evolutionary algorithm has fast convergence and, therefore, when it is trapped into local optimum or a relatively good solution is located, it is hard to locate a better similar solution. The similar solution is different from the good solution in only a few components. A component reinitialization method is designed to mitigate this problem. Both the new mechanisms and the proposed algorithm were analyzed on well-known amino-acid sequences that are used frequently in the literature. Experimental results show that the employed new mechanisms improve the efficiency of our algorithm and the proposed algorithm is superior to other state-of-the-art algorithms. It obtained a hit ratio of 100 % for sequences up to 18 monomers within a budget of 1011 solution evaluations. New best-known solutions were obtained for most of the sequences. The existence of the symmetric best-known solutions is also demonstrated in the paper. Keywords Protein folding optimization · Threedimensional AB off-lattice model · Differential evolution · Local search · Component reinitialization B. Bošković Faculty of Electrical Engineering and Computer Science, University of Maribor, SI-2000 Maribor, Slovenia E-mail: [email protected] J. Brest Faculty of Electrical Engineering and Computer Science, University of Maribor, SI-2000 Maribor, Slovenia E-mail: [email protected] 1 Introduction The protein structure prediction represents the problem of how to predict the native structure of a protein from its amino-acid sequence. This problem is one of the more important challenges of this century [17] and, because of its nature, it attracts scientists from different fields, such as Physics, Chemistry, Biology, Mathematics, and Computer Science. Within the protein structure prediction, the Protein Folding Optimization (PFO) represents a computational problem for simulating the protein folding process and to find a native structure. Most proteins must fold into unique threedimensional structure, known as a native structure, to perform their biological function [2]. Protein function is determined by its structure. Inability of a protein to form its native structure prevents a protein from fulfilling its function correctly, and this may be the basis of various human diseases [1, 25, 28, 29]. The PFO belongs to the class of NP-hard problems [11] and, with current algorithms and computational resources, it is possible to predict the native structures of relatively small proteins. The reason for that is the huge and multimodal search space. For example, a polypeptide that has only 18 amino-acids, will have 31 angles within a simplified AB model (see Section 3). Using uniform discretization with only 10 values for each angle, there would be 1031 possible configurations. To evaluate and select the correctly folded conformation among all these conformations in the time elapsed since the Big Bang, we need the huge computational speed of 1031 /(4.32 · 1017 ) = 2.31 · 1013 conformation evaluations per second. This is much faster than the speed obtained within our experiment, where we can evaluate only 5.73 · 105 conformations per second. From these numbers, we can see that the search space is huge, even 2 in the simplified model, which makes this problem very hard. However, in reality, the proteins fold into their native conformation on a time scale of seconds, and this contradiction is known as Levinthal’s paradox [7]. An optimization algorithm can give good results of a PFO problem only if it can locate good solutions and evaluate solutions efficiency. Here, the approximation techniques, such as heuristic and metaheuristic, with efficient data structures, become the only viable alternatives as the problem size increases. There exist some simplified protein models, such as HP models within different lattices [5, 21] and the AB off-lattice model [30, 31]. Simplified protein models were designed for development, testing, and comparison of different approaches. The AB off-lattice model was used in the paper for demonstrating the efficiency of the proposed algorithm. This model takes into account the hydrophobic interactions which represent the main driving forces of a protein structure formation and, as such, still imitates its main features realistically [14]. Although this model is incomplete, it allows the development, testing, and comparison of various search algorithms, and offers a global perspective of protein structures. It can be helpful in confirming or questioning important theories [3]. In our recent work [4], we proposed a Differential Evolution (DE) [32,33] algorithm for PFO that includes DE /best/1 /bin strategy, self-adaptive mechanism [6] of main control parameters, random reinitialization and temporal locality mechanism [10, 38]. This algorithm belongs to the ab-initio PFO methods, which optimize structures from scratch and do not require any information about related sequences. It showed a very fast convergence, and it was capable of obtaining significantly better results than other state-of-the-art algorithms. In this paper, we propose two new mechanisms, that additionally, improve the efficiency of our algorithm. A new local search mechanism was designed in order to improve convergence speed and to reduce runtime complexity of the algorithm. A similar idea was already used within the HP model [5], where it is applied to the cubic lattice. Using a simple local search mechanism where only one solution’s component is changed can produce a structure whereby a lot of monomers are moved. This means their positions must be recalculated and efficient energy calculation is not possible. In contrast to simple local search, our mechanism improves the quality of conformations using the local movements within the three-dimensional AB off-lattice model. We define a local movement as a transformation of conformation whereby only two consecutive monomers are moved locally in such a way that the remaining monomers remain in their positions. In such a way, the designed Borko Bošković, Janez Brest local movement allows efficient evaluation of neighborhood solutions. With the fast convergence, the algorithm can locate good solutions quickly, but it has a problem locating good similar solutions. For that purpose, a component reinitialization was designed and incorporated within our algorithm. This mechanism is employed when the local best solution is detected. It produces similar solutions that are different from the local best solution in only a few components. We called the proposed algorithm DElscr and it was tested on two sets of amino-acid sequences that were used frequently in the literature. The first set included 18 real peptide sequences, and the second set included 4 well-known artificial Fibonacci sequences with different lengths. Experimental results show that the proposed mechanisms improve the efficiency of the algorithm, and the algorithm is superior to other stateof-the-art algorithms. Its superiority is especially evident for larger sequences. With the proposed algorithm, that is stochastic, we cannot prove optimality of the obtained conformations. However, we can infer about them according to the observed hit ratio. The experimental results show that our algorithm obtained hit a ratio of 100 % for sequences that contain up to 18 monomers. For all larger sequences, we can only report the best-known conformations that are almost surely not optimal. Based on these observations, the main contributions of this paper are: 1. The proposed new DE algorithm for the PFO on a three-dimensional AB off-lattice model. 2. The local search mechanism that improves convergence speed and reduces runtime complexity of solution evaluations within the neighborhood. 3. The component reinitialization which increases the likelihood of finding good similar solution. 4. With the observed hit ratios we show how difficult the PFO is, even in a simplified model, and that, with the current algorithm, we can confirm solutions with a hit ratio of 100 % only for sequences that have up to 18 monomers. 5. An approach for determining the algorithm’s asymptotic average-case performances. 6. The existence of two best-known (potentially global best) structures that are symmetrical for all sequences with up to 25 monomers. 7. The new best-known conformations for most of the sequences. The remainder of this paper is organized as follows. A related work for the PFO on a three-dimensional AB off-lattice model is described in Section 2. The threedimensional AB off-lattice model is described in Section 3. A description of the introduced algorithm with the emphasis on new mechanisms is given in Section 4. Protein Folding Optimization using DE with Local Search and Component Reinitialization The experimental setup and numerical results are presented in Section 5. Section 6 concludes this paper. 2 Related work Over the years, different algorithms have been applied successfully to the PFO on a three-dimensional AB offlattice model. In [12] the low energy configurations are optimized using the pruned-enriched-Rosenbluth method (PERM). This method was applied to the lattice model quite successfully [34]. The conformational space annealing was studied using Fibonacci sequences in [20] and compared with nPERMis (new PERM with importance sampling) [13]. Next, the algorithm that was compared with the nPERM algorithm was proposed in [8]. In this work, the problem is converted from a nonlinear constraint-satisfied problem to an unconstrained optimization problem which can be solved by the wellknown gradient method. The statistical temperature molecular dynamics based algorithm ”statistical temperature annealing” was applied to an AB model in [18]. The efficiency of an improved tabu search algorithm was analyzed in [39]. The following hybrid algorithms were also developed for the AB model: A hybrid algorithm that combines the genetic algorithm and tabu search algorithm [35, 36, 40], particle swarm optimization and levy flight [9], the particle swarm optimization, genetic algorithm, and tabu search algorithm [41], and improved genetic algorithm and particle swarm optimization algorithm with multiple populations [42]. An artificial bee colony algorithm [22–24, 37] and an improved harmony search algorithm that is combined with dimensional mean based perturbation strategy [15] were also analyzed on the AB model. The authors in [16] determined the structural features of the PFO using Fitness Landscape Analysis (FLA) techniques based on the generated landscape path. From the results of FLA, it has been shown that the PFO has a highly rugged landscape structure containing many local optima and needle-like funnels, with no global structure that characterizes the PFO complexity. The obtained results also show that the artificial bee colony algorithm outperforms all other algorithms significantly in all instances for the three-dimensional AB off-lattice model. In our recent work [4], we proposed a differential evolution algorithm that is adapted to PFO on a threedimensional AB off-lattice model. Within this algorithm, we incorporated a self-adaptive mechanism, a mutation strategy for the fast convergence and a temporal locality. The obtained results of this algorithm show that it is superior to the algorithms from the literature, including the artificial bee colony algorithm, and significantly 3 lower free energy values were obtained for longer AB sequences. 3 Three-dimensional AB off-lattice model The basic building blocks of proteins are amino-acids. The linear chain of amino acids is a polypeptide, and a protein contains at least one long polypeptide. Each polypeptide can be represented with a unique amino acid sequence. The polypeptide must fold into a specific three-dimensional native structure before it can perform its biological function(s) [27]. Thus, all information necessary for folding must be contained in the amino-acid sequence, and this is known as the Anfinsenhypothesis [7]. From the amino-acid sequence it is possible to generate different conformations, which is also dependent on the used model. In general, there exist two types of simplified models: Off-lattice and lattice. The lattice model maps each position of amino-acid to the point on a discrete lattice. In contrast to the lattice model, the off-lattice model allows any position and, as such, is more accurate. The simplified three-dimensional AB off-lattice model was proposed in [31]. Instead of 20 standard amino-acids, this model uses only two different types of amino-acids: A – hydrophobic and B – hydrophilic. Thus, an amino-acid sequence is represented as a string s = {s1 , s2 , ..., sL }, si ∈ {A, B}, where A represents a hydrophobic, B a hydrophilic amino-acid and L the length of the sequence. The three-dimensional structure of an AB sequence is defined by bond angles θ = {θ1 , θ2 , ..., θL−2 }, torsional angles β = {β1 , β2 , ..., βL−3 } and the unit-length chemical bond between two consecutive amino-acids (see Fig. 1). Different energy calculations can be used within different models. Within an AB model, the free energy value is calculated using a simple trigonometric form of backbone bend potentials E1 (θ) and a species-dependent Lennard-Jones 12,6 form of non-bonded interactions E2 (s, θ, β) as shown in the following equation [31]: E(s, θ, β) = E1 (θ) + E2 (s, θ, β) E1 (θ) = L−2 1 X [1 − cos(θi )] 4 i=1 E2 (s, θ, β) = 4 L−2 X L X (1) [d(pi , pj )–12 –c(si , sj ) · d(pi , pj )–6 ] i=1 j=i+2 where pi = {xi , yi , zi } represents the position of the i-th amino-acid within the three-dimensional space. These positions are determined as shown in Fig. 1 and by the following equation: 4 Borko Bošković, Janez Brest (a) (b) Fig. 1 A schematic diagram of a sequence ABAB. (a) Projection of a structure with θ1 = 30, θ2 = −60 and β1 = 0 onto the XY-plane. (b) Projection of a structure with θ1 = 30, θ2 = −60 and β1 = 45 onto the ZY-plane. 4.1 Proposed algorithm   {0, 0, 0}      {0, 1, 0}    {cos(θ ), 1 + sin(θ ), 0} 1 1 pi =  {xi−1 + cos(θi−2 ) · cos(βi−3 ),      yi−1 + sin(θi−2 ) · cos(βi−3 ),     z i−1 + sin(βi−3 )} if i = 1, if i = 2, if i = 3, (2) if 4 ≤ i ≤ L. In Eq. (1) d(pi , pj ) denotes the Euclidean distance between positions pi and pj , while c(si , sj ) determines the attractive, weak attractive or weak repulsive nonbonded interaction for the pair si and sj as shown in the following equation:   1 c(si , sj ) = 0.5   −0.5 if si = A and sj = A, if si = B and sj = B, if si 6= sj . The objective of PFO within the context of an AB offlattice model is to simulate the folding process and to find the angles’ vector or conformation that minimizes the free-energy value: {θ ∗ , β ∗ } = arg min E(s, θ, β). 4 Proposed algorithm for PFO In this paper, we extend our differential evolution algorithm [4] with two new mechanisms. The first mechanism is a local search that improves convergence speed and reduces runtime complexity for solution evaluation within the specific neighborhood. The second mechanism is component reinitialization, which allows the algorithm to locate good similar conformations according to the local best solution. Hereinafter, we will describe briefly the DElscr algorithm that is shown in Fig. 2. The lines that represent improvements according to the previous version are highlighted with gray background. The optimization process begins with initialization (line 2). Each iteration of while loop (line 3) represents one generation of the evolutionary process. A mutation, crossover, and selection are performed for each population’s individual {x1 , x2 , ..., xNp } within one generation. The DE /best/1 mutation strategy and binary crossover (lines 7 – 18) are used for creating a trial individual u. The values of mutation F , and crossover Cr control parameters are set with the self-adaptive jDE mechanism (lines 5 and 6) [6]. The trial individual is evaluated in line 19 using Eq. (1). From this line, we can see that the individuals are D-dimensional vectors that contain real coded bond θ and torsional β angles: xi = {xi,1 , xi,2 , ..., xi,D } = = {θ1 , θ2 , ..., θL−2 , β1 , β2 , ..., βL−3 } xi,j ∈ [−π, π]; D =2·L−5 i = 1, 2, ..., Np; j = 1, 2, ..., D The selection mechanism, temporal locality and local search are shown in lines 20 – 40. If the trial vector is better than the corresponding vector from the population (eu < ei ), then the second trial vector u∗ is generated using temporal locality [38] and the better vector replaces population vector xi . The next mechanism is a local search. Within this mechanism, a local movement is used for improving the population best individual xpb according to each pair {θn−1 , βn−2 }. The values of {θn−1 , βn−2 } represent the angles that specify the position of the (n + 1)-th monomer according to the position of the n-th monomer. After each generation, either random or component reinitialization will Protein Folding Optimization using DE with Local Search and Component Reinitialization 1: procedure DElscr (s, Np) 2: Initialize a population P {xi , Fi = 0.5, Cr i = 0.9, ei = E(s,xi )} ∈ P xi,j = −π + 2 · π · rand [0,1] i = 1, 2, ..., Np; j = 1, 2, ..., D; D = 2 · length(s) − 5 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: p {xb , eb } = {xlb , elb } = {xp b , eb } = BEST(P ) while stopping criteria is not met do for i = 1 to Np do if rand [0,1] < 0.1 then F = 0.1 + 0.9 · rand [0,1] else F = Fi end if if rand [0,1] < 0.1 then Cr = rand [0,1] else Cr = Cr i end if do r1 =rand {1,Np} while r1 =i end do do r2 =rand {1,Np} while r2 =i or r2 =r1 end do jrand = rand {1,D} for j = 1 to D do if rand [0,1] < Cr or j = jrand then uj = xb,j + F · (xr1 ,j − xr2 ,j ) if uj ≤ -π then uj = 2 · π + uj end if if uj > π then uj = 2 · (-π) + uj end if else uj = xi,j end if end for eu = E(s,u) // Energy calculation if eu ≤ ei then // Temporal locality for j = 1 to D do u∗ j = xb,j + 0.5 · (uj − xi,j ) ∗ ∗ if u∗ j ≤ -π then uj = 2 · π + uj end if ∗ if u∗ > π then u = 2 · (-π) + u∗ j j j end if end for ∗ e∗ u = E(s,u ) if e∗ u ≤ eu then {xi , Fi , Cri , ei } = {u∗ , F, Cr , e∗ u} else {xi , Fi , Cri , ei } = {u, F, Cr , eu } end if // Local Search 34: 35: for n = 2 to L − 1 do θn-1 = rand [0,1] · (xp b,n-1 − xi,n-1 ) 3: 4: 5: 6: 36: βn-2 = rand [0,1] · (xp b,n+(L-4) − xi,n+(L-4) ) 37: {v, ev } = LOCAL MOVEMENT(xp b , n, θn-1 , βn-2 ) 38: 39: 40: 41: 42: p if ev ≤ eb then {xp b , ei } = {v, ev } end if end for end if end for p {xp b , eb } = BEST(P ) 43: p p if ep b ≤ eb then {xb , eb } = {xb , eb } end if p l l REINITIALIZATION({xp 44: b , eb },{xb , eb },P ) 45: end while 46: return {xb , eb } 47: end procedure Fig. 2 The proposed DElscr algorithm. be performed if the reinitialization criteria are satisfied (line 44). At the end of the evolutionary process, the algorithm returns the best obtained solution xb and its energy value eb , as shown in line 46. The local search 5 and reinitialization are described in more detail in the following subsections. For a detailed description of the rest mechanism, we refer readers to [4]. 4.2 Local search If the trial vector is better than the corresponding population vector, then the temporal locality and local search are performed. The local search calculates the values of pair {θn−1 , βn−2 } for each monomer, with the exception of the first two monomers. Positions of these two monomers are fixed within the AB-model, see Eq. (2). For the rest monomers, the angle values are defined with a randomly scaled difference between the population best individual xb and current individual xi , as shown in the following equation: θn−1 = rand [0,1] · (xpb,n−1 − xi,n−1 ) βn−2 = rand [0,1] · (xpb,n+(L−4) − xi,n+(L−4) ) i = 1, ..., Np; n = 2, ..., L − 1; A meticulous reader may notice that the θ has index n − 1, while β has index n − 2. This means that, for n = 2 the value of β0 is calculated using the values of θ components. The reason for that is in the position of the third monomer, which is dependent only on the θ1 , see Eq. (2). Therefore, within the local movement for n = 2 the value of β0 is ignored, and local movement takes into account only the value of θ1 . The local movement is a transformation of conformation whereby only two consecutive monomers are moved locally in such a way that the remaining monomers remain in their positions. There is only one exception, for the last monomer only one monomer is moved, while all the remaining monomers remain in their positions. Fig. 3 shows an example of two monomers’ local movement. The polygon that is defined with points P1 , P2 , P3 , P4 represents the section of original conformation where points represent the monomer positions. The local movement moves the point P2 to the point X2 according to the pair {θn−1 , βn−2 } while the position of point X3 is calculated using Eqs. (3) – (6). In these calculations, the point X3 is the nearest to the point P3 in such a way that the new polygon P1 , X2 , X3 , P4 must end at the point P4 . The calculation begins with the determination of point C whose position is in the middle of points P4 and X2 : C = X2 + P4 − X2 . 2 (3) The length L between points C and X3 is calculated by using the triangle P4 , C, X3 and Pythagoras’s theorem: 6 Borko Bošković, Janez Brest Fig. 3 A schematic diagram of a local movement. The polygon P1 , P2 , P3 , P4 is transformed to polygon P1 , X2 , X3 , P4 in such a way that only the two consecutive points P2 and P3 are moved to points X2 and X3 , while the remaining points P1 and P4 stay unchanged in their positions. ∆e2 = s L= 2 1− kP4 − X2 k . 4 P4 − X2 . kP4 − X2 k (4) (P3 − C) − CN · L. k(P3 − C) − CN k (5) (6) The created polygon contains unchanged points P1 and P4 , which means only monomers X2 and X3 are moved locally, while the remaining monomers stay in their unchanged positions. This feature allows us to design the fast conformation evaluation within the local movement. Two additional data structures E1 and E2 were used for this purpose. The values of elements within these data structures are determined according to Eq. (1), as follows: E1i = 1 − cos(θi ) E2i,j = d(pi , pj )−12 − c(si , sj ) · d(pi , pj )−6 i ∈ {1, ..., L − 2}; j ∈ {i + 2, ..., L}. Using these data structures for the population best individual and its energy value, we can calculate the energy of the conformation created by local movement efficiently, as is shown in Eqs. (7) – (9) where n represents the variable that was sent to the local movement procedure, as shown in Fig. 2 (see line 37). ∆e1 = E1n−1 − (1 − cos(θn−1 )) + E1n − (1 − cos(θn )) + E1n+1 − (1 − cos(θn+1 )) E2i,j − d(pi , pj )−12 − c(si , sj ) · d(pi , pj )−6 n+3 X i h X i E2j,i − + (8) i=n+1 j=1 At the end, point X3 is calculated by scaling of vector (P3 − C) − CN as follows: X3 = C + L h X i=n+1 j=n+2 The vector projection of (P3 − C) onto line X2 , P4 is calculated with the following equation: CN = (P3 − C) · n+3 X (7) d(pi , pj )−12 − c(si , sj ) · d(pi , pj )−6 i ∆e1 + 4 · ∆e2 ) (9) 4 From Eqs. (7) – (9) we can observe that the time com2 plexity of energy calculation is reduced from L2 to 2L. In this way, the designed local movement allows faster evaluation of neighborhood solutions, and its usage within local search improves convergence speed. ev = epb − ( 4.3 Reinitialization After each generation reinitialization will be performed if the reinitialization criteria are satisfied. In our previous work, random reinitialization will be performed if the best individual stays unchanged within the evolution process for more than 105 evaluations. In this work we design a new reinitialization mechanism. For that purpose, the algorithm includes three types of best individuals and three new control parameters, as shown in Fig. 4. The individuals xpb , xlb , xb represent the population best, local best and global best individuals. The population best individual is the best individual in the current population, the local best individual is the best individual among all similar individuals, and the global best individual is the best individual obtained within the evolutionary process. From this description of the best individuals, we can see that reinitialization has to control evolutionary process to: Protein Folding Optimization using DE with Local Search and Component Reinitialization p l l 1: procedure REINITIALIZATION({xp b , eb },{xb , eb },P ) is unchanged for at least P · D evaluations then 2: if xp b b p p l l l 3: if ep b ≤ eb then {xb , eb } = {xb , eb } end if 4: if xlb is unchanged for Lb · D reinitializations then 5: // Random reinitialization 6: xi = RANDOM() ; i = 1, 2, ..., Np p 7: {xlb , elb } = {xp b , eb } = BEST(P ) 8: else 9: // Component reinitialization 10: xi = RANDOM(xlb , C); i = 1, 2, ..., Np p 11: {xp b , eb } = BEST(P ) 12: end if 13: end if 14: end procedure Fig. 4 The reinitialization mechanism. • Locate the best individual by using the current population, • Locate the best similar individual by using component reinitialization, and • Locate the global best individual by using random reinitialization. The following new control parameters are introduced to the reinitialization mechanism: Pb , Lb and C. The Pb defines how long the best population individual can stay unchanged within the evolutionary process (line 2). For example, with Pb = 100 and dimension 21, the reinitialization is required if the best population individual stayed in the evolutionary process for at least Pb · D = 100 · 21 = 2100 evaluations. When this condition is satisfied, the algorithm performs random or component reinitialization according to the parameter Lb . If the local best individual is not changed for Lb · D reinitializations, then random reinitialization is performed, and component reinitialization otherwise (line 4). The last parameter C determines the number of components that are different between the local best individual and individuals generated by component reinitialization (line 10). Within this operation, the C components of each population individual xi are selected, and their values are replaced with random values on the interval [−π, π], while all the remaining components get the values from the local best individual. 5 Experiments The DElscr algorithm was compiled with a GNU C++ compiler 4.6.3 and executed using an Intel Core i7 computer with 2.93 GHz CPU and 8 GB RAM under Linux Mint 13 Maya and a grid environment (Slovenian Initiative for National Grid1 ). In order to evaluate the efficiency of the proposed algorithm, we used a set of 1 Available at http://www.sling.si/sling/ 7 amino-acid sequences as shown in Table 1. This set includes 5 Fibonacci sequences and 18 real peptide sequences from the Protein Data Bank database2 . The K-D method is used to transform real peptide sequences to the AB sequences. In this method the amino acids I, V, P, L, C, M, A, and G are transformed to hydrophobic ones (A) and amino acids D, E, H, F, K, N, Q, R, S, T, W, and Y to hydrophilic ones (B) [26]. The selected sequences have different lengths, which enabled us to analyze the algorithm according to different problem dimensions and, because they were used frequently in literature, they enabled us to compare the proposed algorithm with different algorithms. In order to analyze the efficiency of the introduced mechanisms and algorithm, we measured the following statistics: • The mean obtained energy value for all runs: PN i=1 Emean = Ei N where Ei denotes the obtained energy value for the i-th run and N the number of all runs. • The best obtained energy value among all runs: Ebest = max{E1 , E2 , ..., EN }. Note that all energy values within our experiments are multiplied by -1, which means that all energy values are positive and higher values are better. • The standard deviation of energy values for all runs: s PN − Emean )2 N −1 i=1 (Ei Estd = • The hit ratio or percentage of runs during which the best solution has equal or better energy value according to the target value (target): hitr = Nh N where Nh denotes the number of runs where the best obtained solution has good enough energy value eb according to the target value (eb ≥ target). • The mean number of solution evaluation for all Nh runs: PNh NSE i NSE mean = i=1 Nh where NSE i represents the number of solution evaluations for the i-th run. 2 Available at https://www.rcsb.org/pdb/home/home.do 8 Borko Bošković, Janez Brest Table 1 Details of amino-acid sequences used in experiments. Label 1BXP 1CB3 1BXL 1EDP 2ZNF 1EDN 2H3S 1ARE 2KGU 1TZ4 1TZ5 1AGT 1CRN 2KAP 1HVV Length 13 13 16 17 18 21 25 29 34 37 37 38 46 60 75 D 21 21 27 29 31 37 45 53 63 69 69 71 87 115 145 1GK4 84 163 1PCH 88 171 2EWH 98 191 F13 F21 F34 F55 F89 13 21 34 55 89 21 37 63 105 173 Sequence ABBBBBBABBBAB BABBBAABBAAAB ABAABBAAAAABBABB ABABBAABBBAABBABA ABABBAABBABAABBABA ABABBAABBBAABBABABAAB AABBAABBBBBABBBABAABBBBBB BBBAABAABBABABBBAABBBBBBBBBBB ABAABBAABABBABAABAABABABABABAAABBB BABBABBAABBAAABBAABBAABABBBABAABBBBBB AAABAABAABBABABBAABBBBAABBBABAABBABBB AAAABABABABABAABAABBAAABBABAABBBABABAB BBAAABAAABBBBBAABAAABABAAAABBBAAAAAAAABAAABBAB BBAABBABABABABBABABBBBABAABABAABBBBBBABBBAABAAABBABBABBAAAAB BAABBABBBBBBAABABBBABBABBABABAAAAABBBABAABBABBBABBAABBABBAABBBB BAABBBBBABBB ABABAABABBBBABBBABBABBBBAABAABBBBBAABABBBABBABBBAABBABBBBBAABAB AAABABAABBBBAABABBBBA ABBBAAABBBAAABABAABAAABBABBBBBABAAABBBBABABBAABAAAAAABBABBABABA BABBABBAABAABBBAABBAAABA AABABAAAAAAABBBAAAAAABAABAABBAABABAAABBBAAAABABAAABABBAAABAAABA AABAABBAABAAAAABAAABABBBABBAAABAABA ABBABBABABBAB BABABBABABBABBABABBAB ABBABBABABBABBABABBABABBABBABABBAB BABABBABABBABBABABBABABBABBABABBABBABABBABABBABBABABBAB ABBABBABABBABBABABBABABBABBABABBABBABABBABABBABBABABBABABBABBAB ABBABBABABBABABBABBABABBAB • The standard deviation of solution evaluations for all Nh runs: s PNh 2 i=1 (NSE i − NSE mean ) NSE std = Nh − 1 • The mean runtime for all runs: PN ti tmean = i=1 N where ti represents the runtime of the i-th run. • The mean speed for all runs: PN vi vmean = i=1 N where vi represents the speed (the number of solution evaluations per second) of the i-th run. The listed statistics were measured within the context of the following stopping conditions: • The maximum number of solution evaluations NSElmt : NSE i ≥ NSE lmt . • The runtime limit tlmt : ti ≥ tlmt . • The energy value of the best obtained solution target: eb ≥ target. Our algorithm belongs to stochastic algorithms, therefore, all the reported results of the proposed algorithm within this work are based on N = 100 independent runs. The described statistics, the defined stopping criteria and the determined number of independent runs were used to analyze the influence of new parameters and mechanisms on the algorithm’s efficiency. The algorithm was also compared with the state-of-the art algorithms. The asymptotic average-case performances were determined for the 6 shortest sequences and an analysis of the obtained conformations was also performed and will be given in the continuation of the paper. 5.1 Parameter settings The influence of the new control parameters (Pb , Lb , C) on the algorithm’s efficiency was analyzed by using Fibonacci sequences. In this analysis, the stopping condition was the maximum number of solution evaluations NSElmt = 1010 . For each sequence, we started with the following setting: Pb = 50, Lb = 10, and C = 5. Using 6 settings, where only one value of each setting was changed to the nearest higher or lower value, we tried to get better settings. The parameter values are used from the following sets: Pb ∈ {10, 25, 50, 100} Lb ∈ {1, 2, 5, 10, 20, 50} C ∈ {2, 5, 10, 20} For the started setting the following 6 settings were used: { Pb = 10, Lb = 10, C = 5}, {Pb = 25, Lb = 10, C = 5}, { Pb = 50, Lb = 5, C = 5}, {Pb = 50, Lb = 20, C = 5}, { Pb = 50, Lb = 10, C = 2}, {Pb = 50, Lb = 10, C = 10}. Protein Folding Optimization using DE with Local Search and Component Reinitialization 9 Table 2 The analysis of the new control parameters (Pb , Lb , C). N = 100 independent runs were performed for each setting and the stopping conditions were the maximum number of solution evaluations NSElmt = 1010 and target value. Pb Lb C 50 2 5 100 2 5 25 2 5 50 5 5 50 2 10 50 1 5 50 10 5 50 2 2 Emean 6.9961 6.9961 6.9961 6.9961 6.9961 6.9961 6.9961 6.9847 Estd 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.03 hitr NSE mean NSE std 100 6.41E+07 5.59E+07 100 6.88E+07 5.96E+07 100 7.52E+07 7.01E+07 100 9.07E+07 8.06E+07 100 9.52E+07 9.67E+07 100 9.59E+07 9.55E+07 100 9.77E+07 9.48E+07 90 3.15E+09 2.67E+09 Pb 25 25 50 50 10 25 25 25 Lb C 20 5 10 5 10 5 20 5 20 5 50 5 20 10 20 2 Emean 16.4500 16.4492 16.4432 16.4415 16.4307 16.4254 16.4037 15.4393 (a) F13, target = 6.9961 Pb 50 50 25 50 100 50 50 Lb 10 20 10 5 10 10 10 C 5 5 5 5 5 10 2 Emean 30.0670 30.0596 30.0519 29.9108 29.9034 29.3722 24.2650 (c) F34 Estd 0.45 0.40 0.47 0.38 0.47 0.35 1.94 Estd hitr NSE mean NSE std 0.09 21 4.91E+09 2.75E+09 0.08 19 4.89E+09 2.81E+09 0.08 17 3.92E+09 2.98E+09 0.10 22 4.86E+09 3.17E+09 0.09 15 3.93E+09 2.51E+09 0.12 33 4.84E+09 2.85E+09 0.08 2 7.94E+09 2.53E+09 0.45 0 - (b) F21, target = 16.5544 Pb 25 25 10 50 25 25 25 Lb 5 10 5 5 2 5 5 C 10 10 10 10 10 5 20 Emean 49.0262 49.0233 49.0148 48.9379 48.9192 47.8458 47.4250 Estd 0.78 1.26 1.05 1.19 1.03 1.74 0.88 (d) F55 We repeated this process until the new better setting was found. The results of the least iterations, together with recommended settings, are shown in Table 2. For clarity, the recommended settings and their results are shown in bold typeface. The displayed results show that each sequence has its own optimal setting, but it is still possible to select settings that can be used for any unknown sequence. We define these settings according to the dimension of the problem, as follows: ( {50, 10, 5} if n < 45 {Pb , Lb , C} = {25, 5, 10} otherwise. These settings are used in all the following experiments, because they can provide a good hit ratio for small sequences and good energy values for larger sequences. The search space for larger sequences is huge, which means the algorithm cannot provide optimal or suboptimal solutions. Therefore, for these sequences, the algorithm has to perform more reinitializations, and the component reinitialization has to change more components randomly. The shown results confirm, additionally, that the variable NSE have near-exponential or near-geometric distribution (NSE mean ≈ NSE std ). Under such distributions, given the Nh = 100 runs in all of our experiments, a reliable rule-of-thumb estimates the 95% confidence interval: 1.96 1.96 CI 95 ≈ [(1 − √ ) · NSE mean , (1 + √ ) · NSE mean ] Nh Nh ≈ [0.8 · NSE mean , 1.2 · NSE mean ]. Pb 50 25 50 25 50 100 50 50 Lb 2 2 5 5 1 2 2 2 C 10 10 10 10 10 10 5 20 Emean 76.8608 76.6879 76.5090 76.4541 76.3478 76.3275 75.1975 75.0143 Estd 1.64 1.89 1.88 1.93 1.40 1.71 2.62 1.52 (e) F89 5.2 Local search The local search within our algorithm was designed to increase the speed of algorithm convergence and speed of neighborhood solution evaluations. In order to demonstrate these advantages, the algorithm was analyzed with (DElscr ) and without (DEwls lscr ) local search. Within this analysis, the algorithms were compared using the following stopping conditions: NSE lmt = 107 and tlmt = tmean (DEwls lscr ), as shown in Table 3. With the first stopping condition, we show that the local search improves mean energy value Emean on 16 out of 23 sequences and reduces the mean runtime tmean for all sequences. Using the second stopping condition, both algorithms were limited with the same runtime and, in this case, local search improves Emean in 22 out of 23 sequences. These values are marked in bold typeface within the table. Results also show that speed up factor cv was 1.46 for the smallest sequences (F13 and 1BXP) and 3.91 for the largest sequence 2EWH, while the Emean is worse by 0.0171 for sequence 1CB3 and better for all other sequences. For the largest sequence 2EWH, the improvement of Emean was huge, from 182.2880 to 205.3507 or by 23.0627. From the obtained results, we can conclude that the local search improves the convergence speed of the algorithm for most of the sequences, while the speed of solution evaluation is increased for all sequences. Somebody would expect better speed up factor, but note that some conditions must be satisfied for local search and, there- 10 Borko Bošković, Janez Brest Table 3 The influence of the local search to the algorithm’s efficiency according to two algorithms: DElscr - with local search and DEwls lscr - without local search. Two different comparisons were made according to two different stopping conditions: NSE lmt = 107 and tlmt = tmean (DEwls lscr ). The reported mean speed vmean represents the mean number of function evaluations per second, cv represents the speed up factor vmean (DElscr )/vmean (DEwls lscr ) and the mean runtime tmean is given in seconds. NSE lmt = 107 Label 1BXP 1CB3 1BXL 1EDP 2ZNF 1EDN 2H3S 1ARE 2KGU 1TZ4 1TZ5 1AGT 1CRN 2KAP 1HVV 1GK4 1PCH 2EWH F13 F21 F34 F55 F89 DEwls lscr DElscr tmean 12.54 12.18 15.02 16.00 17.44 20.27 24.85 29.37 34.89 37.47 36.66 38.81 51.66 76.79 104.64 122.54 130.19 162.03 12.42 20.90 35.89 71.27 140.58 vmean Emean Estd 7.98E+05 4.7280 0.24 8.22E+05 7.9643 1.02 6.67E+05 16.2149 0.51 6.25E+05 13.7281 1.07 5.74E+05 16.1670 1.86 4.94E+05 17.9565 2.51 4.03E+05 15.1685 2.36 3.41E+05 19.3024 1.92 2.87E+05 43.6622 3.46 2.68E+05 28.7054 4.77 2.73E+05 34.3793 4.36 2.58E+05 52.9353 4.99 1.94E+05 78.8070 4.74 1.31E+05 54.6804 6.60 9.62E+04 57.5815 6.55 8.23E+04 72.3524 7.15 7.76E+04 103.4913 13.35 6.24E+04 189.5316 14.33 8.05E+05 6.0591 0.94 4.79E+05 12.0495 1.66 2.79E+05 20.0652 2.59 1.41E+05 35.2611 3.55 7.19E+04 55.4025 5.06 tmean 18.35 18.00 24.81 27.39 29.78 38.05 50.64 63.85 84.42 95.07 95.11 100.39 139.22 220.23 320.20 394.79 438.63 546.97 18.08 37.84 82.90 191.88 455.38 vmean Emean Estd 5.45E+05 4.6772 0.26 5.56E+05 8.1511 0.65 4.03E+05 16.2338 0.66 3.65E+05 13.3930 1.80 3.36E+05 14.4350 3.01 2.63E+05 16.5951 3.10 1.98E+05 15.1545 2.79 1.57E+05 18.6434 2.48 1.19E+05 40.6789 4.66 1.05E+05 25.3528 5.30 1.05E+05 32.9423 5.08 9.97E+04 47.6395 5.86 7.19E+04 78.8601 5.69 4.54E+04 55.3668 6.08 3.12E+04 57.3717 6.56 2.53E+04 72.8575 7.87 2.28E+04 101.7607 11.42 1.83E+04 182.2880 16.48 5.53E+05 6.0951 1.09 2.64E+05 11.3298 1.75 1.21E+05 18.3942 2.29 5.21E+04 35.3539 3.02 2.20E+04 55.0803 5.55 tmean 18.35 18.00 24.81 27.39 29.78 38.05 50.64 63.85 84.42 95.07 95.11 100.39 139.22 220.23 320.20 394.79 438.63 546.97 18.08 37.84 82.90 191.88 455.38 tlmt = tmean (DEwls lscr ) DElscr vmean cv Emean Estd 7.98E+05 1.46 4.7831 0.26 8.22E+05 1.48 8.1340 0.92 6.72E+05 1.66 16.3452 0.48 6.07E+05 1.66 14.1388 0.54 5.73E+05 1.70 16.7171 1.24 4.97E+05 1.89 18.9328 1.85 4.06E+05 2.06 16.1873 2.34 3.44E+05 2.20 20.2815 1.80 2.92E+05 2.46 46.1607 2.28 2.74E+05 2.61 31.7309 4.26 2.81E+05 2.67 36.7141 4.66 2.66E+05 2.67 56.5688 3.80 2.02E+05 2.82 82.8484 2.14 1.37E+05 3.01 59.9772 5.93 1.03E+05 3.29 63.5027 6.29 9.10E+04 3.59 78.8594 6.17 8.71E+04 3.82 116.0248 11.99 7.14E+04 3.91 205.3507 10.62 8.07E+05 1.46 6.3373 0.83 4.82E+05 1.82 12.8967 1.70 2.87E+05 2.38 21.4521 2.62 1.46E+05 2.80 37.9751 2.44 7.92E+04 3.61 59.1793 4.40 Table 4 The influence of the component reinitialization to the algorithm’s efficiency according to two algorithms: DElscr - with 11 component reinitialization and DEwcr lscr - without component reinitialization. Two stopping conditions were used: NSE lmt = 10 and target values that were set to the best known energy values (see Table 8). The shown CNSE represents the reduction of NSE mean : DElscr (NSE mean ) / DEwcr lscr (NSE mean ). Label Length D target 1BXP 1CB3 1BXL 1EDP 2ZNF F13 13 13 16 17 18 13 21 21 27 29 31 21 5.6104 8.4589 17.3962 15.0092 18.3402 6.9961 NSE mean 1.56E+09 3.61E+07 1.24E+10 4.58E+09 2.10E+09 8.92E+07 DElscr CNSE NSE std 0.38 1.68E+09 0.18 4.26E+07 < 0.37 1.24E+10 < 0.22 4.21E+09 < 0.05 1.92E+09 0.08 8.52E+07 fore, the speed up factor is dependent on the relationship between the number of solution evaluations inside and outside the local search. However, using the local search, the algorithm is capable of obtaining better energy values for almost all sequences, and this improvement of energy values increases for larger sequences. 5.3 Component reinitialization The main goal of the component reinitialization is to redirect the evolutionary process in such a way that a similar good solution can be located according the local best solution. To demonstrate the influence of this mechanism on the algorithm’s efficiency, the algorithm was analyzed with (DElscr ) and without (DEwcr lscr ) component reinitialization. Within this analysis, the algorithms were compared using the target values of the hitr 100 100 100 100 100 100 NSE mean 4.07E+09 1.99E+08 3.36E+10 2.14E+10 4.31E+10 1.14E+09 DEwcr lscr NSE std 4.20E+09 1.77E+08 2.71E+10 2.10E+10 2.75E+10 1.27E+09 hitr 100 100 32 96 50 100 best-known energy values and NSE lmt = 1011 , as shown in Table 4. The best values of NSE mean and hit r are marked in bold typeface. From the shown results, we can find that the algorithm that uses component reinitialization is capable of reaching the best-known energy value in all runs, and for that it required significantly less solution evaluations (NSE ). On the other hand, the algorithm without component reinitialization was not capable of reaching hit r = 100 within the budget of NSE lmt = 1011 for sequences 1BXL, 1EDP and 2ZNF. From these observations, we can conclude that the proposed component reinitialization allows the algorithm to locate good similar solutions and to reach the best-known energy values. This is shown clearly in Table 4, with CNSE which represents the relationship between the obtained values of NSE mean for both algorithms. The component reinitialization reduces the Protein Folding Optimization using DE with Local Search and Component Reinitialization 11 Table 5 Asymptotic average-case performances for DElscr . Values marked with the * are obtained by using the grid environmean ment. In these cases tmean is calculated as follows: tmean = NSE , where vmean represents the obtained mean speed of three vmean independent runs on our test computer in a given period of time (tlmt = 3600 seconds). All other results are obtained on our test computer. Label 1BXP 1CB3 1BXL 1EDP 2ZNF F13 target tmean NSE mean target tmean NSE mean target tmean NSE mean target tmean NSE mean target tmean NSE mean target tmean NSE mean 1 1.8013 0.16 2.45e+05 1.9174 0.06 1.03e+05 11.1862 167.93 8.96e+07 6.3823 677.33 6.74e+08 9.3228 4153.21 3.67e+09 1.8225 0.42 6.62e+05 2 2.0063 10.52 1.38e+07 1.9786 1.01 1.41e+06 13.8397 1472.79 7.07e+08 8.9122 437.82 3.88e+08 12.1166 270.26 2.18e+08 2.0453 3.34 4.52e+06 3 2.6838 395.94 4.62e+08 2.3884 1.67 2.06e+06 13.6386 611.86 2.68e+08 8.7042 1280.42 1.04e+09 11.9772 488.05 3.65e+08 4.6082 4.48 5.20e+06 4 3.1846 1349.36 1.42e+09 4.0429 4.22 4.82e+06 14.0105 508.47 2.14e+08 9.1152 776.01 5.97e+08 12.3307 755.42 5.50e+08 4.6858 8.03 8.43e+06 NSE mean from 0.38 to less than 0.05. Finally, it is obvious that the reinitialization mechanism is responsible for the DElscr obtaining hit r = 100 for all the sequences shown in Table 4. Results show additionally that the value of NSE mean is not only dependent on the sequence length or problem dimension, but also on the sequence itself. For example, for DElscr the value of NSE mean is 5.9 times smaller for sequence 2ZNF in comparison with sequence 1BXL, although the dimension of the first sequence is greater than the dimension of the second sequence. 5.4 Asymptotic average-case performance In this section, we introduce an approach to determine asymptotic average-case performance of the algorithm for small sequences. The condition for this is the ability of the algorithm to obtain the best known solution with hitr = 100. Until now, only our algorithm is able to fulfill this condition for the 6 shortest sequences. Six subsequences are generated for each of these sequences. The first subsequence has removed the last monomer, the second subsequence has removed the last two monomers, etc. This means that the length of each next subsequence is decreased by 1. For example, for sequence 1CB3 (BABBBAABBAAAB) the following six subsequences are generated: 1. 2. 3. 4. 5. 6. BABBBAABBAAA (L = 12, target = 8.4088), BABBBAABBAA (L = 11, target = 6.0209), BABBBAABBA (L = 10, target = 4.0429), BABBBAABB (L = 9, target = 2.3884), BABBBAAB (L = 8, target = 1.9786), BABBBAA (L = 7, target = 1.9174). 5 4.0191 12.39 1.17e+07 6.0209 4.70 4.52e+06 16.8991 25965.63 * 9.93e+09 * 11.5309 3494.96 2.47e+09 14.6296 562.56 3.77e+08 5.0428 10.47 9.74e+06 6 4.9321 125.70 1.09e+08 8.4088 80.85 7.11e+07 16.9404 113126.9 * 4.05e+10 * 11.7522 922.22 6.27e+08 14.6733 41844.24 * 1.32e+10 * 6.8092 70.98 6.19e+07 7 5.6104 1965.08 1.56e+09 8.4589 44.47 3.61e+07 17.3962 39706.68 * 1.34e+10 * 15.0092 7272.60 4.58e+09 18.3402 7437.15 2.10e+09 6.9961 110.54 8.92e+07 Asymptotic model 0.0015 · 2.8911L 4589.5644 · 2.5970L 0.0001 · 2.8662L 344.4917 · 2.5502L 0.0030 · 2.7931L 6240.7027 · 2.5976L 10.7641 · 1.4097L 2.32e+07 · 1.3103L 16.6030 · 1.3505L 3.19e+07·1.2642L 0.0019 · 2.3266L 6138.4492 · 2.0846L The best-known or target values are determined for all subsequences. In our case, we performed one run for each subsequence with tlmt = 4 days and the best reached energy value is used as a target value. Using these target values as a stopping condition, it is possible to calculate asymptotic average-case performance. The original sequence is also included within this calculation. This means the asymptotic average-case performance is determined by using 7 sequences. Table 5 and Figure 5 display the target values, obtained mean values and asymptotic average-case performances for DElscr . From the shown results, we observe that the best asymptotic average-case performances was obtained for sequence 2ZNF while the worst for sequences 1BXP and 1BXL. We can again observe that the value of NSEmean and tmean are not only dependent on the sequence length. Only one monomer can influence these values significantly. For example, DElscr requires less solution evaluations (NSE ) and runtime (t) to reach the target value for the subsequence of sequence 1EDP that has a length of 16 in comparison with a subsequence of length 13. From these results, we can conclude that the structure of the sequence has a big influence on the difficulty of the problem. 5.5 Comparison with other algorithms In this section, our algorithm is compared with other algorithms according to two stopping conditions NSElmt and tlmt , and according to the best obtained energy values. The obtained results for stopping conditions NSElmt that were set according to the literature [4,22] and three 12 11 13 14 15 16 17 12 13 14 20000 5000 observed t mean model (t mean ) : 16.603 ⋅ 1.3505L observed NSE mean model (N S E mean ) : 31907895 ⋅ 1.2642L ● ● 2000 Runtime (t ) [s] 16 ● ● ● ● ● ● 7 15 1000 5e+07 2e+07 5e+06 Number of solution evaluations (NSE ) 50.0 5.0 10.0 2.0 Runtime (t ) [s] ● ● 1e+06 5e+08 ● ● ● 1.0 ● ● ● 500 5e+09 2e+09 1e+09 2000 ● observed t mean model (t mean ) : 0.0019 ⋅ 2.3266L observed NSE mean model (N S E mean ) : 6138.449 ⋅ 2.0846L 5e+10 ● 10 ● ● ● 8 9 10 11 12 13 1e+10 2e+09 5e+08 1e+08 100 13 Number of solution evaluations (NSE ) 10000 2000 2e+06 Runtime (t ) [s] 500 1e+07 5e+00 5e+05 11 (c) 1BXL 0.5 5000 10 (b) 1CB3 1000 Runtime (t ) [s] 9 (a) 1BXP ● 500 8 Length (L ) observed t mean model (t mean ) : 10.7641 ⋅ 1.4097L observed NSE mean model (N S E mean ) : 23203404 ⋅ 1.3103L 12 ● 7 Length (L ) ● 11 ● Length (L ) ● ● ● 5e+09 13 ● 12 13 14 15 16 Length (L ) Length (L ) Length (L ) (d) 1EDP (e) F13 (f) 2ZNF 2e+09 12 ● ● 5e+08 11 ● ● 17 18 Number of solution evaluations (NSE ) 10 ● ● ● observed t mean model (t mean ) : 0.003 ⋅ 2.7931L observed NSE mean model (N S E mean ) : 6240.703 ⋅ 2.5976L 2e+08 9 Number of solution evaluations (NSE ) 8 ● Number of solution evaluations (NSE ) 5e+01 ● 7 ● ● 1e+05 5e+05 Runtime (t ) [s] 5e+06 5e+00 ● ● observed t mean model (t mean ) : 1e−04 ⋅ 2.8662L observed NSE mean model (N S E mean ) : 344.4917 ⋅ 2.5502L 5e−01 5e+07 5e+01 ● 5e−01 Runtime (t ) [s] ● 5e−02 5e+08 5e+02 ● Number of solution evaluations (NSE ) ● ● observed t mean model (t mean ) : 0.0015 ⋅ 2.8911L observed NSE●mean model (N S E mean ) : 4589.564 ⋅ 2.597L 50000 Borko Bošković, Janez Brest 5e+07 12 Fig. 5 Asymptotic average-case performances for DElscr . algorithms DElscr , DEpfo and BE-ABC are shown in Table 6. The best obtained energy values are marked in bold typeface. It can be observed that DElscr and DEpfo are comparable, and both outperform BE-ABC. Results that take into account speed up factor (see Table 3) are shown in the last column of the table. In this case, both algorithms DElscr and DEpfo spend approximately the same amount of runtime, and DElscr outperforms DEpfo on most sequences. Within this comparison, the value of NSElmt was relatively small. This means the reinitialization mechanism within DEpfo did not have a significant impact on the obtained results. Therefore, DEpfo and DElscr were also compared according to the tlmt that was set to 4 days. A grid environment was used within this comparison and results are shown in Table 7. In this comparison, DElscr obtained better values of Emean , Ebest and hitr in most sequences, and equal values for the shortest sequences. DElscr obtained hitr of 100, 100, 19 and 65 for shorter sequences 1BXL, 1EDP, 2H3S and F21. For the same sequences, DEpfo obtained hitr of 6.67, 13.33, 0 and 0, respectively. Significant improvement was obtained for longer sequences too. For example, the best energy values were improved from 90.914, 131.7787 and 225.0968 to 106.419, 156.525 and 245.519 for sequences 1GK4, 1PCH and 2EWH. The energy values were improved by 15.505, 24.7463 and 20.4222. Note that DElscr obtained the new best known solutions for all sequences with L ≥ 18, the hitr = 100 for 6 shortest sequences and hitr > 1 for 9 sequences by using tlmt = 4 days. The most important results in this paper are shown in Table 8, which collects the best energy values from all experiments that were described in previous sections, and the best-known energy values from the literature. It is evident that DElscr confirmed the best known energy values for the 3 shortest sequences, and reached the new best-known energy values for all other sequences, except for sequence F13. Solutions for the best energy values reached by DElscr are shown in Tables 9 and 10. In [19] an efficient global optimization method is ap- Protein Folding Optimization using DE with Local Search and Component Reinitialization 13 Table 6 Comparison of the DElscr algorithm with state-of-the-art algorithms. Label M 1CB3 1BXL 1EDP 2H3S 2KGU 1TZ4 1TZ5 1AGT 1CRN 1HVV 1GK4 1PCH 2EWH F13 F21 F34 F55 20 20 20 20 20 20 20 20 20 20 20 80 80 4 4 12 20 Ebest 7.7450 16.2618 13.1764 17.1724 41.0221 34.5265 37.8896 49.9861 74.7849 45.0054 49.9316 121.0579 193.8143 4.9533 11.1304 19.9550 29.5163 DElscr Emean 4.5108 12.5045 8.1986 11.5310 33.6539 21.6863 25.9996 39.1897 62.2668 35.9335 42.0261 87.5748 162.3482 3.0907 6.5538 13.3057 22.4019 Estd 2.13 2.17 2.78 2.45 3.99 3.62 4.12 5.21 7.60 4.92 4.77 11.42 16.60 0.78 1.53 2.47 3.58 NSElmt = M · 104 DEpfo [4] Ebest Emean Estd 8.3690 5.5884 1.96 16.3443 12.6104 2.53 13.5620 8.6666 2.56 16.5030 10.6767 2.75 44.3369 35.3850 4.70 30.9211 20.4361 5.28 38.1868 27.3412 4.08 50.6311 39.0268 5.34 74.4068 60.2444 7.58 44.7264 34.8059 5.29 52.0651 44.8591 4.72 103.1776 79.4878 8.85 171.6390 144.9060 12.84 5.7290 3.6040 0.66 11.2211 7.9567 1.53 19.3529 14.0749 2.09 31.9554 24.6243 3.57 BE-ABC [22, 23] Ebest Emean Estd – 5.9417 0.78 – 11.6942 1.13 – 8.0500 0.93 – 10.4618 1.13 – 22.7195 2.01 – 14.9436 2.22 – 17.4859 1.37 – 25.6024 2.34 – 42.3083 2.96 – 21.5386 3.53 – 27.0410 3.24 – 51.6674 3.50 – 94.5785 5.70 3.3945 2.8196 0.38 6.9065 5.2674 0.76 10.4224 8.3239 0.92 18.8385 14.4556 1.56 NSElmt = M · 104 · cv DElscr Ebest Emean Estd 7.7450 4.5929 2.16 16.7137 13.1940 2.22 13.1895 8.5313 2.81 17.4858 11.9565 2.48 44.0110 36.4642 4.39 35.3505 24.9569 4.55 40.0161 28.9335 3.60 54.0897 43.4210 5.45 82.5999 68.3890 7.28 57.1990 46.3685 5.61 69.5798 56.6853 5.16 128.4882 99.3441 14.52 210.7021 181.5912 17.49 4.9704 3.1977 0.79 11.7522 7.6885 1.75 21.0345 15.4491 2.85 33.1788 26.8111 3.34 Table 7 The obtained results for DElscr and DEpfo within a runtime limit of 4 days. Label L 1BXP 1CB3 1BXL 1EDP 2ZNF 1EDN 2H3S 1ARE 2KGU 1TZ4 1TZ5 1AGT 1CRN 2KAP 1HVV 1GK4 1PCH 2EWH F13 F21 F34 F55 F89 13 13 16 17 18 21 25 29 34 37 37 38 46 60 75 84 88 98 13 21 34 55 89 DElscr , number of independent runs N=100 Ebest Emean Estd hitr 5.6104 5.6104 0.0000 100.00 8.4589 8.4589 0.0000 100.00 17.3962 17.3962 0.0000 100.00 15.0092 15.0092 0.0000 100.00 18.3402 18.3402 0.0000 100.00 21.4703 21.3669 0.0431 7.00 21.1519 20.9956 0.0995 19.00 25.2800 24.5444 0.1718 1.00 52.7165 51.7233 0.3829 1.00 43.0229 41.8734 0.4285 1.00 49.3868 48.6399 0.3292 1.00 65.1990 64.1285 0.4173 1.00 92.9853 89.8223 0.6514 1.00 85.5099 83.1503 1.0041 1.00 95.4475 91.4531 1.9215 1.00 106.4190 99.6704 3.0377 1.00 156.5250 153.1003 2.7117 1.00 245.5190 240.2247 2.1421 1.00 6.9961 6.9961 0.0000 100.00 16.5544 16.5304 0.0329 65.00 31.3455 30.4913 0.3458 1.00 51.9030 49.5009 0.8817 1.00 81.5297 76.4804 2.0603 1.00 plied to the sequence F89. Within this work, 32,200 distinct conformations were obtained, and the best obtained energy was 73.1065. DElscr improves this energy by 10.4695. 5.6 Analysis of the obtained structures For most of the sequences, the best conformations were obtained by using tlmt = 4 days. Within this experiment, 100 solutions were generated with 100 independent runs. Distribution of the Root-Mean-Square Error (RMSE) values as a function of energy for all these solutions according to the best-known conformation for DEpfo [4], number of independent runs N=30 Ebest Emean Estd hitr – – – – 8.4589 8.4589 0.0000 100.00 17.3962 17.1916 0.0878 6.67 15.0092 14.9423 0.0471 13.33 – – – – – – – – 20.0979 19.6147 0.2699 0.00 – – – – 50.2960 49.1661 0.6334 0.00 39.7340 37.8329 0.9983 0.00 47.1513 43.9959 1.4087 0.00 62.8951 60.4175 1.0439 0.00 89.2001 86.0390 1.4529 0.00 – – – – 82.1427 68.8332 4.0852 0.00 90.9140 84.6836 3.3356 0.00 131.7787 117.7603 6.2617 0.00 225.0968 203.6813 7.1844 0.00 6.9961 6.9961 0.0000 100.00 16.2250 15.8894 0.1849 0.00 28.2509 25.6602 1.0523 0.00 45.0942 41.8670 1.4693 0.00 – – – – selected sequences is shown in Fig. 6. Note that the RMSE is calculated by using the superposition between matched pairs. From Fig. 6a, we can see that only two different solutions were reached for sequence 2ZNF. Similar graphs with only two different solutions were obtained for 6 sequences where hitr = 100 (see Table 7). Three-dimensional representations of these solutions are displayed in Fig. 7. As is shown, for each of these sequences two solutions are symmetrical according to the XY-plane. This can also be seen from Tables 9 and 10. Two reported solutions for one sequence are very similar. They are different in some components that belong to β torsional angles (marked in bold typeface), and 14 Borko Bošković, Janez Brest Table 8 Comparisons of the best energy values reported in the literature and the best energy values obtained by DElscr . The solution vectors obtained by DElscr are shown in Tables 9 and 10. Label DElscr 1BXP 1CB3 1BXL 1EDP 2ZNF 1EDN 2H3S 1ARE 2KGU 1TZ4 1TZ5 1AGT 1CRN 2KAP 1HVV 1GK4 1PCH 2EWH F13 F21 F34 F55 F89 5.6104 8.4589 17.3962 15.0092 18.3402 21.4703 21.1519 25.2800 52.7165 43.0229 49.3868 65.1990 92.9853 85.5099 95.4475 106.4193 156.5252 245.5193 6.9961 16.5544 31.3459 52.0558 83.5761 DEpfo [4] – 8.4589 17.3962 15.0092 – – 20.0979 – 50.2960 39.7340 47.1513 62.8951 89.2001 – 82.1427 90.9140 131.779 225.097 6.9961 16.2250 28.2509 45.0942 – ImHS [15] 4.498 – 15.200 – 15.056 17.721 15.340 17.416 40.696 – – 40.300 61.426 44.972 – – – – – – – – – BE-ABC [22, 23] 2.8930 8.4580 15.9261 13.9276 5.8150 7.6890 18.3299 10.2580 28.1423 39.4901 45.3233 51.8019 54.7253 27.1400 47.4484 49.4871 91.3508 146.8231 6.9961 15.6258 28.0516 42.5814 – I-PSO [9] – – – – – – – – 20.9633 – – – 28.7591 15.9988 – – 46.4964 – – – – – – their values represent angles with opposite directions. For a little bit longer sequences more different solutions were reached with different energy values, as shown in Figs. 6b and 6c while, for the longest sequences, all 100 solutions are different with different energy values. For example, this is illustrated in Fig. 6d for sequence 2EWH. From these results, we can conclude that all reported symmetrical solutions could be optimal, especially those obtained with hitr = 100, and all other solutions with hitr = 1 are almost surely not optimal. 6 Conclusions In this paper, we presented a novel differential evolution algorithm for protein folding optimization. To improve its efficiency, the algorithm is extended with a component reinitialization and local search that includes a local movement. The component reinitialization is designed to redirect the search process to similar solutions that are different from the already found good solution in only a few components. Thus, the search space around good solutions is explored thoroughly and, consequently, the algorithm can find better solutions. We also designed the local movement for a three-dimensional AB-off lattice model in such a way that only a two consecutive monomers are moved locally while all the remaining monomers remain in their positions. With additional data structure this type of movement allows us to reduce the runtime complexity of the energy cal- PGATS [41] – – – – – – – – 32.2599 – – – 49.6487 28.1052 – – 49.5729 – – – – – – MPGPSO [42] – – – – – – – – – – – – 43.9339 18.9513 – – 38.2766 – – – – – – ABC [24] – – – – – – – – 31.9480 – – – 52.3249 30.3643 – – 63.4272 – – – – – – GATS [35, 36] – 8.2515 15.8246 13.7769 – – 18.1640 – – 39.3444 45.3019 46.0842 – 25.1003 – – – – 6.9539 14.7974 27.9897 42.4746 – 2 C-ABC [37] – – – – – – – – – – – – – – – – – – 7.0025 14.9570 28.0055 42.2769 – culation within the local search from L2 to 2L. The 23 sequences are used in the experiments to analyze the proposed algorithm and its mechanisms. From the results of the algorithms with and without local search, it is evident that the local movement with additional data structure reduces the runtime complexity of the energy calculation, or increases the number of function evaluations per second by factor 1.46 for the shortest sequences, and by factor 3.91 for the longest sequence. This speed up is dependent on sequence length and the relationship between the number of solution evaluations inside and outside the local search. The local search also improves the algorithm’s convergence speed for most of the sequences. Because of both advantages, the local search improves the efficiency of the algorithm, and this improvement is greater for longer sequences. Using the best-known energy values as a stopping condition, we demonstrated the usefulness of component reinitialization. It reduces the required mean number of solution evaluations to reach the best-known energy value from 0.38 to less than 0.05. This indicates that the component reinitialization redirects the search process successfully to similar solutions, and allows the algorithm to locate the best-known solutions efficiently. Our algorithm is the first algorithm that is capable of obtaining a hit ratio of 100 % for 6 shorter sequences within the budget of 1011 function evaluations. Therefore, we introduce an approach for determining Protein Folding Optimization using DE with Local Search and Component Reinitialization ● 0.0 0.2 0.4 0.6 RMSE ● ● (a) 2ZNF 1.0 ● ● ● ● the best obtained solution the obtained soluton ● 0.0 0.5 1.0 1.5 RMSE (b) 1EDN 244 ● ● ● ●● ● ● ● ● ● 0.0 the best obtained solution the obtained soluton ● ● 0.2 0.4 0.6 0.8 RMSE (c) 2H3S ● ● ● ● ● ●● Energy (E) 240 242 ● ● ● 0.8 ● ● 20.90 21.30 ● the best obtained solution the obtained soluton 21.25 ● ● ●● ● ● ● 238 ● ● ● ●●● ● 236 ● ● ● Energy (E) 21.00 ● 20.80 ● ● ● 21.10 21.45 ● Energy (E) 21.35 21.40 ● 15 Energy (E) 20 25 ● 15 ● 1.0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ●● ● ● ● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● the best obtained solution the obtained soluton ● 1.2 ● ● 1.4 0.0 0.5 1.0 1.5 RMSE 2.0 2.5 (d) 2EWH Fig. 6 Distribution of the Root-Mean-Square Error (RMSE) values as a function of energy for all 100 obtained conformations within runtime limit of 4 days, calculated from the best-known conformation. asymptotic average-case performances. Our algorithm obtained the best runtime asymptotic average-case performance for sequence 2ZNF (16.6030 · 1.3505L ) and the worst for 1BXP (0.0015 · 2.8911L ). This approach shows additionally that the difficulty of the problem is not only dependent on sequence length, but also on the sequence itself. The proposed algorithm was also compared with recently published state-of-the-art algorithms for PFO. It outperforms all competitors, and the obtained energy values improve the best-known energy values from the literature for all sequences with L ≥ 18. For example, the best energy value of sequence 1PCH was improved from 131.7787 to 156.5250 or by 24.7463. The structure of the best obtained solutions was also analyzed. We figured out that there exist two symmetric best-known solutions for sequences with L ≤ 25. For these sequences, our algorithm obtained a hit ratio equal to or greater than 7 %. The solutions of these sequences could be optimal, especially those with a hit ratio of 100 %, and solutions for all other sequences are almost surely not optimal. In the future work we will try to improve the algorithm further by using knowledge about symmetric solutions. This knowledge can be integrated within the evaluation function, or used to reduce the size of the search space. Additionally, we will try to design an algorithm that will reduce the likelihood of the exploration of already explored search space. Acknowledgements Our work was supported by the Slovenian Research Agency under Program P2-0041 (Computer Systems, Methodologies, and Intelligent Services). References 1. Alberts, B., Bray, D., Hopkin, K., Johnson, A.D., Lewis, J., Raff, M., Roberts, K., Walter, P.: Essential Cell Biology, 4 edn. Garland Science (2013) 2. Balchin, D., Hayer-Hartl, M., Hartl, F.U.: In vivo aspects of protein folding and quality control. Science 353(6294) (2016). doi:10.1126/science.aac4354 3. Bazzoli, A., Tettamanzi, A.G.B.: A Memetic Algorithm for Protein Structure Prediction in a 3D-Lattice HP Model. In: G.R. Raidl, S. Cagnoni, J. Branke, D.W. Corne, R. Drechsler, Y. Jin, C.G. Johnson, P. Machado, E. Marchiori, F. Rothlauf, G.D. Smith, G. Squillero (eds.) Applications of Evolutionary Computing, Lecture Notes in Computer Science, vol. 3005, pp. 1–10. Springer Berlin Heidelberg (2004). doi:10.1007/978-3-540-24653-4 1 4. Bošković, B., Brest, J.: Differential evolution for protein folding optimization based on a three-dimensional AB off-lattice model. Journal of Molecular Modeling 22, 1– 15 (2016). doi:10.1007/s00894-016-3104-z 5. Bošković, B., Brest, J.: Genetic Algorithm with Advanced Mechanisms Applied to the Protein Structure Prediction in a Hydrophobic-Polar Model and Cubic Lattice. Applied Soft Computing 45, 61–70 (2016). doi:10.1016/j.asoc.2016.04.001 6. Brest, J., Greiner, S., Bošković, B., Mernik, M., Žumer, V.: Self-Adapting Control Parameters in Differential Evolution: A Comparative Study on Numerical Benchmark Problems. IEEE Trans. Evol. Comput 10(6), 646–657 (2006). doi:10.1109/TEVC.2006.872133 7. Buxbaum, E.: Fundamentals of Protein Structure and Function. Springer US (2007) 8. Chen, M., Huang, W.q.: Heuristic algorithm for offlattice protein folding problem. Journal of Zhejiang University SCIENCE B 7(1), 7–12 (2006). doi:10.1631/jzus.2006.B0007 9. Chen, X., Lv, M., Zhao, L., Zhang, X.: An Improved Particle Swarm Optimization for Protein Folding Prediction. International Journal of Information Engineering and Electronic Business 3(1), 1–8 (2011). doi:10.5815/ijieeb.2011.01.01 10. Denning, P.J.: The Locality Principle. Commun. ACM 48(7), 19–24 (2005). doi:10.1145/1070838.1070856 11. Fraenkel, A.S.: Complexity of protein folding. Bulletin of Mathematical Biology 55(6), 1199–1210 (1993). doi:10.1007/BF02460704 16 Borko Bošković, Janez Brest Table 9 The best solutions obtained by the DElscr algorithm. Label 1BXP 1BXP Solution vector in degrees 43.2915, 2.88166, -48.728, 0.0655009, 12.6242, 66.0927, -6.40805, 8.96332, 8.80015, 2.23544, 74.0763, -6.62061, 1.31798, -104.099, 160.341, -177.384, -20.6892, 26.8003, 127.789, 166.27, 10.2979 43.2915, 2.88166, -48.728, 0.0654961, 12.6242, 66.0927, -6.40805, 8.96332, 8.80016, 2.23544, 74.0763, 6.62061, -1.31798, 104.099, -160.341, 177.384, 20.6892, -26.8003, -127.789, -166.27, -10.2979 1CB3 -14.0758, 25.2546, -38.7359, -9.58086, 21.0366, 14.7617, -0.998265, 21.5393, 71.2738, -27.6012, -5.16526, -19.1483, -149.775, 172.54, 178.086, 178.164, 91.6772, 4.85452, -31.1093, 28.9806, 3.41538 1CB3 -14.0758, 25.2546, -38.7359, -9.58086, 21.0366, 14.7617, -0.998265, 21.5393, 71.2738, -27.6012, -5.16526, 19.1483, 149.775, -172.54, -178.086, -178.164, -91.6772, -4.85451, 31.1093, -28.9806, -3.41538 1BXL -22.4292, -32.2737, -16.9254, 5.81295, 15.6175, 26.9979, -38.2372, 52.8361, -48.2442, -24.0736, 49.3335, -36.1178, 13.9215, 12.5486, 1.91872, 55.1452, 147.302, -127.63, 168.592, -62.9624, -27.0891, 28.7221, 27.4283, 152.122, -177.152, 67.7357, -5.21217 1BXL -22.4292, -32.2737, -16.9254, 5.81296, 15.6175, 26.9979, -38.2372, 52.8361, -48.2442, -24.0736, 49.3335, -36.1178, 13.9215, 12.5486, -1.91872, -55.1452, -147.302, 127.63, -168.592, 62.9624, 27.0891, -28.7221, -27.4283, -152.122, 177.152, -67.7357, 5.21217 1EDP -22.6336, 7.26974, 60.7674, 23.936, -50.4261, 4.41672, 11.4886, 46.499, 13.2306, -12.2668, 22.7087, 4.07035, 30.6245, -69.1251, 16.9542, 26.0209, 124.911, -155.575, -61.088, 1.55078, 53.7379, 159.421, -162.592, -156.44, -170.499, -85.1224, 2.36332, -25.7677, 67.3571 1EDP -22.6336, 7.26974, 60.7674, 23.9359, -50.4261, 4.41671, 11.4886, 46.499,13.2306, -12.2668, 22.7087, 4.07036, 30.6245, -69.1251, 16.9542, -26.0209, -124.911, 155.575, 61.088, -1.55077, -53.7379, -159.421, 162.592, 156.44, 170.499, 85.1224, -2.36333, 25.7677, -67.3571 2ZNF -22.512, 7.71692, -75.1038, 26.0695, 35.539, 19.645, 6.73951, 21.8104, -57.4641, 1.6924, 6.15567, 3.08902, 9.89786, 23.8155, -48.9192, -4.31387, 78.7078, 2.66583, -114.943, -148.187, -162.564, -79.1176, 8.87759, -178.428, 42.9368, 15.8392, -18.6691, -104.193, 166.46, 12.876, 140.107 2ZNF -22.512 7.71691, -75.1038, 26.0694, 35.539, 19.645, 6.73952, 21.8104, -57.4641, 1.6924, 6.15567, 3.08903, 9.89787, 23.8155, -48.9192, -4.31386, -78.7078, -2.66582, 114.943, 148.187, 162.564, 79.1176, -8.87759, 178.428, -42.9368, -15.8392, 18.6691, 104.193, -166.46, -12.876, -140.107 1EDN -23.2048, 31.2208, 46.764, 48.9339, -43.6867, -28.0164, -17.6723, -38.3711, -25.1772, 10.6263, 9.07757, 33.5364, -4.83762, -6.09916, 25.0581, -81.151, 15.5944, -3.62479, -36.6783, 41.0025, 127.461, -147.732, -53.6249, -22.4102, -68.6344, -166.972, 147.028, -171.451, -155.381, 121.71, 29.6786, 131.144, 15.2983, 24.5428, -54.7787, -83.2637, -29.6805 1EDN -23.2048, 31.2207, 46.764, 48.9338, -43.6867, -28.0164, -17.6723, -38.3711, -25.1772, 10.6262, 9.07754, 33.5364, -4.83764, -6.09917, 25.058, -81.151, 15.5944, -3.62479, -36.6783, -41.0025, -127.461, 147.732, 53.6249, 22.4102, 68.6344, 166.972, -147.028, 171.451, 155.381, -121.71, -29.6786, -131.144, -15.2983, -24.5428, 54.7786, 83.2637, 29.6805 2H3S 30.6395, -51.1361, 34.4028, -0.410148, -32.439, -10.4102, -2.09416, 12.4798, -5.74202, -60.0842, 12.6704, -8.68551, -36.5963, -14.4828, -17.9172, 13.0794, 0.148026, 17.7335, -6.06512, 1.46386, -69.7022, 3.0363, 36.2347, -57.1061, -174.679, 173.256, -170.68, -156.724, 142.58, 40.6316, 22.5668, -1.4454, 175.849, -114.818, -61.1893, -4.11275, -27.6809, 84.4735, 144.867, 176.731, 161.605, -97.3254, -158.173, 113.225, 54.3451 2H3S 30.6395, -51.1361, 34.4028, -0.410146, -32.439, -10.4102, -2.09415, 12.4798, -5.74202, -60.0842, 12.6704, -8.68551, -36.5963, -14.4828, -17.9172, 13.0794, 0.148029, 17.7335, -6.06512, 1.46387, -69.7022, 3.0363, 36.2347, 57.1061, 174.679, -173.256, 170.68, 156.724, -142.58, -40.6317, -22.5668, 1.44539, -175.849, 114.818, 61.1893, 4.11273, 27.6808, -84.4735, -144.867, -176.731, -161.605, 97.3254, 158.173, -113.225, -54.3451 1ARE -11.5547, -1.31888, -15.2569, -42.6589, 17.4763, 5.06218, 14.6442, 24.251, 2.4936, -13.6942, 28.8183, -37.0023, -1.8785, -0.867767, -5.02831, 35.1061, -45.2208, -7.89329, 3.88011, -1.06756, -41.5237, 42.6134, 14.078, 1.71866, -70.4096, 19.7351, 23.088, -23.8173, -48.341, -27.8178, -175.825, 102.429, 138.697, -140.149, -46.4258, -148.917, -22.129, -165.228, 134.775, 48.8091, -12.7742, -50.1159, -163.389, 154.413, 126.397, -131.045, -60.8471, 167.884, 102.299, 52.433, -15.9838, -113.979, -58.9094 2KGU -156.228, 84.3317, -1.89424, -22.9614, 4.96104, -10.8986, 42.0037, -54.9878, -4.36371, -80.394, 6.84565, -4.01855, -29.0786, 38.404, -24.9304, 51.317, -53.2373, 15.7134, -51.9703, 1.34405, 37.6371, 36.5939, 35.6007, -52.9444, 32.6405, -108.259, -56.7621, 71.7249, 5.9403, 4.99762, 0.0626093, 8.48403, -161.728, -140.31, 137.06, 46.113, 21.1367, 45.0214, -27.4148, 37.097, -8.18763, -148.71, 107.671, -141.471, -176.445, 152.171, -23.7168, -63.0744, -154.472, 9.04166, -89.3673, 21.6149, -71.4051, 41.2427, -22.0274, 113.616, 22.7052, 159.166, -13.0884, -8.78814, 19.7018, 51.7085, 100.664 1TZ4 -13.2782, 2.2117, -21.4873, 13.5614, -50.9456, -18.6314, 58.273, 35.906, -51.557, 43.4606, 14.4093, 26.9361, -9.90087, 51.937, 12.5408, -12.0182, -39.4559, -3.12819, -37.7837, 39.5619, 14.5525, -105.659, -2.39298, 23.2026, 13.2624, 7.00485, -63.913, 21.5608, -2.32347, -4.49988, 14.2846, -2.28795, 25.5405, -52.7743, -3.52791, 88.4618, 172.62, 63.4655, 167.01, -112.19, -129.059, 165.903, 161.114, -13.1829, -29.6599, -142.278, -118.354, -17.9561, 62.8846, 132.227, 150.392, 59.2519, -21.0203, -51.4332, 27.3873, 6.73164, 10.4224, -36.4599, -134.654, -177.842, -46.6888, 152.495, 60.1706, -2.02398, -21.7416, 80.9012, 145.281, -5.47398, -93.0592 1TZ5 19.2916, -25.4743, 37.9748, -2.24909, -71.5607, -62.5534, -1.20914, 60.5119, -37.8385, 56.051, -23.4795, 88.5824, -23.4208, 9.88257, -27.3279, 2.64366, 4.72144, -32.8121, -37.9781, 28.6777, -1.79099, -1.45295, -1.55722, -28.7841, 53.5811, -7.1834, 28.1114, -34.8815, -63.6796, -10.3914, 19.0723, -11.8679, -27.892, -37.0612, 62.2441, 52.8494, -172.157, 163.821, 57.7857, -56.1207, -158.293, 168.377, -23.9122, -20.1987, 4.84453, -2.90382, -36.4027, -130.461, 158.501, 160.429, -146.987, -129.731, 128.236, 34.5188, 28.0746, -55.2047, -137.136, -167.33, 32.699, 35.1309, -64.3505, 35.5609, 22.6136, -27.8717, -112.09, 160.134, -131.465, -173.819, -165.595 1AGT 26.1664, -11.7847, -37.6783, -3.62257, 75.6542, -40.6386, 24.7245, -92.2268, -13.2317, 23.7859, -94.496, -2.2422, 17.0125, 1.77619, -39.6216, 113.613, 89.2441, -4.72246, -98.3805, -65.8427, 44.1904, -17.7537, -84.2295, -2.33273, -55.9952, -46.6065, -1.4073, 40.7682, -24.0458, 37.5641, 44.8005, -1.59772, 9.28805, 12.0621, -52.5228, 21.2213, 120.34, -179.746, -63.7778, 18.8875, 10.4973, -6.76493, -21.1687, 57.2819, 176.355, 27.0186, -122.011, -33.6896, -59.127, -178.6, 14.4172, -4.50249, -165.323, -6.2693, 12.6379, -54.0356, -62.0563, 7.63468, 127.685, 19.1897, 133.256, -157.687, -140.601, -147.971, -19.8046, 48.3979, 166.316, 54.8275, 156.099, 3.00416, -140.869 1CRN 36.2044, -2.8726, -58.3456, -109.168, 67.0176, 63.8303, -34.4202, -9.13991, 27.0952, 6.87578, -175.904, -10.0323, -14.0642, 169.202, 139.54, 37.4324, -30.2161, 3.47033, 120.567, 8.05841, 74.7893, -51.1755, -78.2244, -6.56336, -37.0077, -0.404044, 22.8391, -11.2627, -2.90337, -113.857, -122.645, -5.62342, 80.5936, -19.4761, 87.9704, 12.3212, -4.15216, 3.25955, 39.0676, 30.3454, 61.9086, 12.9802, -97.5976, 8.44839, -76.9107, 30.3312, 41.3065, 24.8161, -34.1801, 20.2024, 33.4227, -14.1966, 80.1988, 28.2782, -166.287, -129.879, -11.8488, 19.3045, -66.9439, -48.3743, -164.938, -12.7803, 7.1584, 29.2233, 12.4003, 39.0045, -58.1443, 52.0717, 43.5443, -0.577219, -103.851, -146.583, -9.20535, -12.6377, -128.769, 27.4049, -32.4672, 16.7912, -135.646, -149.836, 98.1608, 22.2995, 23.6538, 11.9513, 104.699, -3.17593, 35.9215 2KAP 46.469, 9.17062, -12.987, -39.265, -23.0536, 170.718, 7.46538, -139.561, 9.6654, -109.874, 39.7501, -77.1224, -8.16555, 82.4941, -21.6873, 93.4429, -10.6347, 10.7423, 20.8323, -4.45369, -11.4409, -5.20606, 147.482, 172.455, -52.8927, 8.19366, 92.0005, -44.9143, -45.2074, -1.91882, -16.8158, 4.77317, 17.6662, 124.018, 11.9037, -1.64667, 74.9571, 15.2233, -5.48327, -140.99, 19.2716, 15.4203, -48.7429, -34.6525, 5.87344, -6.16017, 41.6324, -16.8426, 49.2516, -28.6507, 29.562, -13.1308, 17.3443, -61.6342, 8.11077, -104.361, 26.4602, 4.19116, 18.9505, 67.8863, 154.188, -116.346, 19.3865, -84.7317, -27.0054, -31.7152, -24.4805, -34.1621, -13.632, 63.0618, 8.2678, -2.60225, 37.1772, -9.33353, -46.953, -117.05, -167.457, 155.733, -103.59, 35.8403, 44.471, -168.41, -18.09, 28.324, 22.7177, -44.4081, -37.3318, -3.25116, 42.16, 57.0729, -4.27289, -157.026, 158.794, -19.8247, 37.3666, 142.492, -5.84281, 168.076, -163.22, -4.06088, -38.3009, 6.22285, -20.4278, 52.41, 156.856, 11.6928, 124.907, -164.531, 100.594, -172.86, -66.3312, -55.802, 13.087, 38.8668, 61.5511 Protein Folding Optimization using DE with Local Search and Component Reinitialization 17 Table 10 The best solutions obtained by the DElscr algorithm. 1HVV 123.296, 175.071, -104.639, -8.91165, 17.898, 3.71452, 16.7371, -6.98533, -76.7403, -9.21776, 75.2042, 124.487, 46.9457, 18.594, -46.3806, 145.54, 124.742, -1.01034, 2.75056, 10.5349, -7.0204, 118.317, 75.4052, -30.5719, 69.7023, -72.9042, 176.87, -87.9407, -48.7546, 88.4046, -11.7349, 44.1027, -5.14578, -65.6298, 20.3053, -20.9559, -72.1726, 94.427, 45.6623, -45.1943, 55.0226, 121.96, 34.0003, 6.44231, 140.467, 17.4955, 85.266, -21.9109, -95.2265, -24.295, 2.64738, -17.4667, 155.115, -5.99421, -158.933, -6.23019, -43.4673, -28.7354, -11.6413, -19.2361, -10.0374, 34.4593, -178.973, -160.129, -42.443, 5.40211, -87.2981, -36.4155, 10.9084, 64.5935, -5.14139, 28.5554, -18.3091, -3.52734, 45.1155, 9.74914, 114.875, 75.0862, 26.4021, 22.7921, -63.2735, -138.233, -64.6958, -1.96622, 99.8458, -16.8097, 71.6329, 28.1128, -43.4581, -82.0519, 173.534, -96.2117, -16.7565, -32.4898, 48.5607, 11.8749, -64.2088, 1.38784, -57.9374, 25.3469, 54.5768, 34.603, -28.9913, -102.93, -64.0207, -23.3654, 157.688, 118.979, 5.08255, 61.9001, -18.6156, -45.7361, -10.7387, 47.8304, -26.517, -104.738, 22.5679, 115.444, -6.44774, 116.951, 14.5305, -0.364305, 25.7291, 114.23, -22.2869, 97.1472, 0.163606, -93.1095, -14.0922, 67.6929, 103.708, 12.5582, -62.8467, -103.687, -55.8599, 11.7904, 63.4791, 74.9204, 26.812, -72.0632, -116.517, -46.752, 39.4218, 63.2466, 101.367 1GK4 -156.276, -11.1754, -77.6765, -33.983, -9.25845, 27.2496, -22.3371, 55.198, -12.6002, 30.4017, 35.9669, -18.5758, -87.0091, 63.2376, 163.731, -40.6359, 102.397, 146.119, -16.2788, 0.676412, 169.967, -18.769, -43.9974, -62.1645, -51.3378, -148.518, 144.287, -170.774, -25.6785, -22.1326, 27.6078, -8.93322, -75.4448, -68.3403, -16.5373, -128.752, 53.7389, -140.548, -115.598, -1.7515, -106.07, -14.6299, 82.7281, -28.3651, 36.138, 37.748, -23.152, -11.6747, 20.0652, -55.0055, -150.457, -49.5769, 23.078, 65.4316, 111.217, 34.2085, 8.50149, 21.775, -107.598, 139.532, -69.7933, 68.8643, 88.8784, -166.542, -174.708, 31.9934, 137.315, -3.2063, -88.0773, -6.44718, 23.1364, 95.4164, -34.9923, 2.63385, 13.9679, -23.3478, -54.8455, 43.5591, -4.20436, -43.6293, -144.761, 18.6453, 179.845, -29.3419, 34.6059, 116.989, -2.74396, 108.058, 157.394, 13.5671, -34.673, -71.5358, 29.1635, -12.3351, -58.4977, -28.7525, -42.495, -47.6578, 29.0888, -101.645, -92.0769, 10.8024, 101.05, 70.2237, 17.3966, -48.5046, 27.4408, 61.4589, 71.0815, 77.6142, 36.2921, -18.009, -121.503, -122.087, -32.2391, 9.22399, 11.065, 70.686, 48.1796, -38.5792, -91.5736, 15.5793, -173.479, -25.563, 108.153, 54.9784, -50.888, -86.9754, -52.2761, -23.2842, 20.5012, 16.6481, -23.1703, -40.3118, -64.6739, 26.9541, 177.66, 154.029, 125.888, 2.61904, -11.91, -67.2757, 7.45577, 48.5355, -2.84037, -62.5508, -1.94643, 7.24978, 48.2981, 62.3802, 127.482, 80.9534, -6.93496, -105.181, -59.8353, -45.6067, -113.32, 1.58149, -33.4263, -8.31888, 28.5097, -8.75938, 151.901 1PCH 41.1106, -75.4478, -108.35, -88.2808, 52.6905, 63.9346, 98.575, -146.011, -103.251, -81.3915, -7.97873, -5.67391, -138.034, 77.0572, -3.43666, -168.458, -44.1355, -51.9614, -0.548426, -11.6916, -13.85, -90.7331, 162.157, -85.119, -80.3963, 2.41355, -4.42424, 54.2753, 89.5966, -147.035, 78.814, 99.0202, -89.7149, -126.891, -85.1937, 16.9404, -73.4292, 66.5445, 160.832, 40.1368, 145.935, 17.6023, -17.2377, 45.6224, 136.733, -49.815, -43.4151, -102.65, 8.11703, -109.171, -24.407, -47.2699, -132.484, -42.5279, -119.761, 147.911, 73.3968, 3.65598, 74.2541, 19.778, -2.2315, -111.056, -25.0304, -86.2442, 0.146651, 83.5428, -29.3382, 64.0093, 147.03, 73.9582, 29.3652, 154.906, 6.25221, 112.96, 165.03, 11.5624, -48.3887, -130.92, 158.099, -6.47314, -26.6561, -18.5458, -79.5949, 16.5753, 68.4287, 54.4969, 8.59587, -21.8077, -38.0325, -14.1827, -48.149, -7.71342, 5.32628, 34.3591, 4.97453, -19.9588, -29.6581, -39.8474, 152.45, -7.02004, -71.166, 40.6025, 90.9133, 41.1172, 10.2277, -41.2978, -21.4705, -9.53513, 33.3237, -170.287, -147.144, -21.8209, 27.7537, 19.2982, 29.7286, -13.7392, -55.8712, -28.3766, -8.00291, 125.209, 161.205, 19.9805, -46.2199, -2.73427, -12.1052, 106.535, 20.4942, -28.1138, 4.59628, 62.9273, -0.534962, 6.33028, -7.44623, 29.7984, -42.8088, 5.32914, 17.9307, 174.593, -36.0277, 3.2934, 24.3011, 174.231, -1.94325, 107.108, -4.82491, 44.1005, -38.1958, 47.1931, 0.689977, -48.5599, -2.29967, -16.9223, -9.36993, -13.2723, 23.7414, 17.0389, 157.955, 52.6113, 14.0859, -100.053, -42.2958, -9.25703, 37.9416, 58.9846, -28.9415, -56.1025, 37.1207, 50.4847, -55.062 2EWH 151.436, -92.5903, -3.75076, -9.668, -0.975246, 10.9844, 84.1865, -57.1686, 38.7048, 72.7755, 64.7086, 50.2283, 29.5956, -111.649, 163.46, -92.508, -148.929, 61.6607, 124.085, 171.298, -75.5506, -52.2331, -1.37142, -19.9511, 67.108, 14.27, -1.03143, 0.0222875, -116.144, -32.3217, -125.421, -102.86, 145.85, 108.298, -60.4006, -54.4374, -88.1894, -14.6692, 121.958, 125.926, 167.02, -74.5737, -130.938, 62.1354, 106.58, 35.1401, 93.7873, 162.441, 14.5873, -4.93593, 6.27325, -7.31527, 10.8045, -53.8271, -132.021, -37.8517, 30.6805, -89.4307, -61.2859, -31.1104, 90.5217, 118.145, -4.46292, -52.5412, 113.612, 159.141, -3.43442, 62.945, 12.7417, -19.7111, -15.1737, 30.368, -27.5934, -138.544, 7.81197, -59.2248, 9.7981, 122.127, -164.755, 36.2949, 27.611, -37.779, 39.5707, -22.2883, 38.9922, 4.30684, 71.8969, -21.7556, -128.587, -76.5211, -0.480596, 65.3271, 8.48192, 158.34, 107.055, -66.142, 18.5806, -129.465, -18.4294, -11.7806, 50.9098, 132.39, 101.434, 0.100595, -28.2695, 0.622333, 52.5959, 150.715, -11.0556, -45.8273, -39.1155, 8.30602, 56.8165, -46.0845, 17.9186, 11.1667, 19.5044, 89.7449, -23.746, -0.808862, 84.8186, 0.457484, -89.925, -21.9539, 26.9255, -59.9087, 45.3057, -9.74849, -70.462, -14.0544, 18.7807, 59.6121, -176.746, -30.6629, -54.0245, -8.68261, -14.3952, 43.302, 23.9289, 59.5115, -35.76, -58.2711, 2.27009, -152.857, -35.6967, -137.17, -49.407, 36.9083, 58.3246, -26.7135, -71.9911, 26.5305, 53.0114, 52.0147, -21.6699, -14.1031, 12.009, -63.6288, -54.0997, -10.6967, 5.20745, -124.069, -19.2082, 55.6145, -3.07942, 12.0508, 131.359, -177.867, 32.7929, 24.0475, 25.0758, -0.0780254, 5.44473, 36.0356, 28.5948, 22.5261, -174.132, -3.91424, -11.5903, -132.095, -172.313, -25.055, -156.073, 11.1264, 29.3397, -64.3192, -38.8408, -177.009, 22.2676, 11.9142, 56.3727 F13 7.66522, -83.448, 13.0886, 0.55134, 29.1616, -47.908, 2.75327, -31.0327, -31.3119, -46.3918, 0.276218, 9.04884, -29.5745, -116.199, 160.508, 0.890189, 129.381, 24.5074, 113.38, -161.672, 98.7127 F13 7.66522, -83.448, 13.0886, 0.551338, 29.1616, -47.908, 2.75327, -31.0327, -31.3119, -46.3918, 0.276222, -9.04884, 29.5745, 116.199, -160.508, -0.890189, -129.381, -24.5074, -113.38, 161.672, -98.7127 F21 -5.70817, -70.6345, 12.6013, -78.4561, 5.14012, 2.49148, 57.5974, -25.416, 27.2287, -35.8677, -5.33428, -13.9895, 3.02158, 19.9054, 74.4006, -31.0707, 4.76465, -19.1022, -32.9492, 155.506, -16.0013, -169.101, 162.893, -94.9124, 155.503, -140.891, 153.332, 40.6752, 137.563, 48.1957, -35.2245, 66.7533, -37.5734, 137.909, -144.521, -52.7295, -156.871 F21 -5.70816, -70.6345, 12.6014, -78.4561, 5.14014, 2.49149, 57.5974, -25.416, 27.2287, -35.8677, -5.33427, -13.9895, 3.0216, 19.9055, 74.4006, -31.0707, 4.76466, -19.1022, -32.9492, -155.506, 16.0013, 169.101, -162.893, 94.9124, -155.503, 140.891, -153.332, -40.6752, -137.563, -48.1957, 35.2245, -66.7533, 37.5734, -137.909, 144.521, 52.7295, 156.871 F34 12.3298, -83.1718, 20.1532, 8.42606, 37.8998, -37.8448, 9.33408, -77.8143, 7.4245, -73.1774, 26.15, -80.0668, 46.3843, 6.49943, -29.8816, 51.2622, -33.6564, 38.6885, -67.9543, 46.7986, -10.4886, -27.9647, -10.0583, -39.8364, -49.6972, -25.641, 44.7456, -59.6061, 18.6305, -20.9127, 25.4877, 13.4228, 1.77009, 42.1284, 129.207, -149.941, 1.89517, -120.166, 18.4003, 159.01, -168.548, 143.358, 151.62, -49.9323, -164.471, -44.6816, 177.501, -32.6178, 2.86468, -2.00479, -22.1516, -57.0231, -143.09, 131.37, -127.956, 147.157, 57.657, -21.2642, 27.2822, -52.9505, 17.7835, 119.254, 18.7327 F55 -15.6437, 97.9193, 1.00666, 95.3815, 1.86855, -64.0331, -141.452, -2.83476, 104.146, 8.21281, -162.93, -74.3953, 1.96392, 7.65968, -29.2495, 52.5953, 52.8264, -0.624594, 137.07, -4.89079, 0.957561, 150.771, 19.388, 7.34186, 59.4269, 8.22775, -64.6383, -54.8633, -8.8461, 59.752, 162.033, 13.6066, -78.2664, 13.0242, 102.375, 3.23899, -2.60196, -16.3626, 36.9652, -37.8734, 30.0569, 3.86882, -34.6667, -22.5344, 25.3408, 89.0776, 16.5037, -17.6911, -91.108, 4.84917, -9.27247, -4.88184, 6.63221, 4.31554, -28.558, -8.46761, 171.776, -66.1542, 29.7446, -114.307, -0.574113, 83.8969, -5.34284, 64.1091, 6.16523, 112.965, -5.20239, 68.6776, -17.6844, -113.527, 31.5684, -100.963, 152.521, -49.1181, -26.2181, -129.399, -24.1061, 42.4841, -45.0845, 67.3054, -35.1296, 15.741, 34.8919, 33.4461, 7.88754, 179.833, 41.9367, -135.639, 118.444, -156.824, -55.2589, 169.967, 0.172651, 91.1955, -4.02574, -81.307, 23.9152, -29.0528, -154.072, -133.971, 16.3457, -93.6495, -5.71876, 80.2119, -21.5927 F89 179.886, -95.54, -17.2583, -27.4664, -23.3,38.1298, 19.5766, 34.4132, 8.84695, -117.344, -20.5596, -131.943, -11.8962, -48.6976, 129.133, -107.932, 7.29644, 89.0642, 21.8161, 56.2631, -33.6006, -22.3247, -47.5945, -48.8527, -51.6802, 36.4829, 85.1461, 3.54137, 107.149, -0.955333, -51.2341, 65.8004, 13.8676, -69.7918, -0.860014, -134.319, -37.8356, -2.74527, -12.5366, -93.6285, -28.5384, -105.157, 19.0699, 81.6706, 6.93831, 0.887398, 116.484, 23.1153, 132.738, 10.4558, 73.2237, -15.4114, 6.88586, -109.859, -3.3155, -82.7065, 2.76043, -42.4804, 82.5479, -18.3209, -29.9615, -74.7318, -24.0277, 60.1736, -26.3071, -15.531, -14.9412, -79.5093, -1.99245, -48.5295, -70.5006, 58.6443, -42.9465, 50.0326, -70.0616, -9.55698, -109.482, -2.75044, -87.6997, -8.8569, 86.5537, -22.4479, 72.1052, 14.0501, -27.4652, -8.8744, 56.3962, 0.863411, -142.989, -54.5377, 29.0611, -61.1795, 50.3774, -12.8387, 73.4752, 12.0947, -39.6898, -28.42, 143.035, 28.1471, 39.6651, 10.0519, -140.34, -2.35037, 123.344, 3.62448, 125.741, 132.141, 71.1956, -36.3432, -36.7204, -39.5973, 57.8245, -31.8281, 13.6268, -143.946, -36.4178, -6.53297, 34.1645, 12.4669, -82.0619, 14.2377, -32.9623, 49.1945, 137.212, -16.0272, -178.526, 12.3581,69.7334, -1.88293, 147.327, 145.168, 27.4845, -35.3688, 8.48146, -81.2594, -5.25881, 119.388, -139.654, 57.454, 159.88, 27.509, -0.616009, 114.258, -13.2053, -39.494, 65.2585, -42.1881, 0.311959, -22.2436, -162.899, -54.8573, -20.7022, -14.7214, 128.993, 5.42026, 114.069, -21.3562, -46.7891, 18.6434, 15.3431, 121.287, -3.95967, -82.6683, -9.4711, -120.912, -1.33882, -28.956, 43.9338, -42.9642, -139.445, 137.938, 4.62324 18 Borko Bošković, Janez Brest (a) 1BXP (b) 1BXP (c) 1CB3 (d) 1CB3 (e) 1BXL (f) 1BXL (g) 1EDP (h) 1EDP (i) 2ZNF (j) 2ZNF (k) 1EDN (l) 1EDN (m) 2H3S (n) 2H3S (o) F13 (p) F13 (q) F21 Fig. 7 The best obtained conformations that could be optimal. (r) F21 Protein Folding Optimization using DE with Local Search and Component Reinitialization 12. Hsu, H.P., Mehra, V., Grassberger, P.: Structure optimization in an off-lattice protein model. Phys. Rev. E 68 (2003). doi:10.1103/PhysRevE.68.037703 13. Hsu, H.P., Mehra, V., Nadler, W., Grassberger, P.: Growth algorithms for lattice heteropolymers at low temperatures. The Journal of Chemical Physics 118(1), 444– 451 (2003). doi:10.1063/1.1522710 14. Huang, W., Liu, J.: Structure optimization in a threedimensional off-lattice protein model. Biopolymers 82(2), 93–98 (2006). doi:10.1002/bip.20400 15. Jana, N.D., Sil, J., Das, S.: An Improved Harmony Search Algorithm for Protein Structure Prediction Using 3D OffLattice Model, pp. 304–314. Springer Singapore, Singapore (2017). doi:10.1007/978-981-10-3728-3 30 16. Jana, N.D., Sil, J., Das, S.: Selection of appropriate metaheuristic algorithms for protein structure prediction in {AB} off-lattice model: a perspective from fitness landscape analysis. Information Sciences 391392, 28–64 (2017). doi:10.1016/j.ins.2017.01.020 17. Kennedy, D., Norman, C.: Editorial: So much more to know. Science 309, 78–102 (2005). doi:10.1126/science.309.5731.78b 18. Kim, J., Straub, J.E., Keyes, T.: Structure optimization and folding mechanisms of off-lattice protein models using statistical temperature molecular dynamics simulation: Statistical temperature annealing. Phys. Rev. E 76 (2007). doi:10.1103/PhysRevE.76.011913 19. Kim, S.Y.: Three-dimensional off-lattice ab model protein with the 89-residue fibonacci sequence. Chaos, Solitons & Fractals 90(Supplement C), 111–117 (2016). doi:10.1016/j.chaos.2016.04.010 20. Kim, S.Y., Lee, S.B., Lee, J.: Structure optimization by conformational space annealing in an offlattice protein model. Phys. Rev. E 72 (2005). doi:10.1103/PhysRevE.72.011916 21. Lau, K.F., Dill, K.A.: A lattice statistical mechanics model of the conformational and sequence spaces of proteins. Macromolecules 22(10), 3986–3997 (1989). doi:10.1021/ma00200a030 22. Li, B., Chiong, R., Lin, M.: A balance-evolution artificial bee colony algorithm for protein structure optimization based on a three-dimensional AB off-lattice model. Computational Biology and Chemistry 54, 1–12 (2015). doi:10.1016/j.compbiolchem.2014.11.004 23. Li, B., Lin, M., Liu, Q., Li, Y., Zhou, C.: Protein folding optimization based on 3D off-lattice model via an improved artificial bee colony algorithm. Journal of Molecular Modeling 21(10), 261 (2015). doi:10.1007/s00894015-2806-y 24. Li, Y., Zhou, C., Zheng, X.: The Application of Artificial Bee Colony Algorithm in Protein Structure Prediction. In: L. Pan, G. Pun, M. Prez-Jimnez, T. Song (eds.) Bio-Inspired Computing - Theories and Applications, Communications in Computer and Information Science, vol. 472, pp. 255–258. Springer Berlin Heidelberg (2014). doi:10.1007/978-3-662-45049-9 42 25. Márquez-Chamorroa, A.E., Asencio-Cortésa, G., Santiesteban-Tocab, C.E., Aguilar-Ruiza, J.S.: Soft Computing Methods for the Prediction of Protein Tertiary Structures: A Survey. Applied Soft Computing 35, 398–410 (2015). doi:10.1016/j.asoc.2015.06.024 26. Mount, D.W.: Bioinformatics: Sequence and Genome Analysis. New York: Cold Spring Harbor Laboratory Press (2001) 27. Petsko, G., Ringe, D.: Protein Structure and Function. Primers in biology. New Science Press (2004) 19 28. PJ, T., BH, Q., PL, P.: Defective protein folding as a basis of human disease 20, 456–459 (1995) 29. Selkoe, D.J.: Folding proteins in fatal ways. Nature pp. 900–904 (2003). doi:10.1038/nature02264 30. Stillinger, F.H., Head-Gordon, T.: Collective aspects of protein folding illustrated by a toy model. Phys. Rev. E 52, 2872–2877 (1995). doi:10.1103/PhysRevE.52.2872 31. Stillinger, F.H., Head-Gordon, T., Hirshfeld, C.L.: Toy model for protein folding. Phys. Rev. E 48, 1469–1477 (1993). doi:10.1103/PhysRevE.48.1469 32. Storn, R., Price, K.: Differential Evolution - a simple and efficient adaptive scheme for global optimization over continuous spaces. Tech. Rep. TR-95-012, Berkeley, CA (1995) 33. Storn, R., Price, K.: Differential Evolution - A Simple and Efficient Heuristic for Global Optimization Over Continuous Spaces. J. Glob. Optim. 11(4), 341–359 (1997) 34. Thachuk, C., Shmygelska, A., Hoos, H.H.: A replica exchange monte carlo algorithm for protein folding in the hp model. BMC Bioinformatics 8(1), 342 (2007). doi:10.1186/1471-2105-8-342 35. Wang, T., Zhang, X.: 3D Protein Structure Prediction with Genetic Tabu Search Algorithm in Off-Lattice AB Model. In: Knowledge Acquisition and Modeling, 2009. KAM ’09. Second International Symposium on, vol. 1, pp. 43–46 (2009). doi:10.1109/KAM.2009.2 36. Wang, T., Zhang, X.: A case study of 3D protein structure prediction with genetic algorithm and Tabu search. Wuhan University Journal of Natural Sciences 16(2), 125–129 (2011). doi:10.1007/s11859-011-0723-1 37. Wang, Y., Guo, G., Chen, L.: Chaotic Artificial Bee Colony algorithm: A new approach to the problem of minimization of energy of the 3D protein structure. Molecular Biology 47(6), 894–900 (2013). doi:10.1134/S0026893313060162 38. Wong, K.C., Wu, C.H., Mok, R.K.P., Peng, C., Zhang, Z.: Evolutionary multimodal optimization using the principle of locality. Inf. Sci. 194, 138–170 (2012). doi:10.1016/j.ins.2011.12.016 39. Zhang, X., Cheng, W.: Protein 3D Structure Prediction by Improved Tabu Search in Off-Lattice AB Model. In: Bioinformatics and Biomedical Engineering, 2008. ICBBE 2008. The 2nd International Conference on, pp. 184–187 (2008). doi:10.1109/ICBBE.2008.50 40. Zhang, X., Wang, T., Luo, H., Yang, J.Y., Deng, Y., Tang, J., Yang, M.Q.: 3D Protein structure prediction with genetic tabu search algorithm. BMC Systems Biology 4, 1–9 (2010). doi:10.1186/1752-0509-4-S1-S6 41. Zhou, C., Hou, C., Wei, X., Zhang, Q.: Improved hybrid optimization algorithm for 3D protein structure prediction. Journal of Molecular Modeling 20(7), 2289 (2014). doi:10.1007/s00894-014-2289-2 42. Zhou, C., Hu, T., Zhou, S.: Protein Structure Prediction Based on Improved Multiple Populations and GAPSO. In: L. Pan, G. Pun, M. Prez-Jimnez, T. Song (eds.) Bio-Inspired Computing - Theories and Applications, Communications in Computer and Information Science, vol. 472, pp. 644–647. Springer Berlin Heidelberg (2014). doi:10.1007/978-3-662-45049-9 105
2cs.AI
1 A Bayesian Approach to Policy Recognition and State Representation Learning arXiv:1605.01278v4 [stat.ML] 4 Aug 2017 Adrian Šošić, Abdelhak M. Zoubir and Heinz Koeppl Abstract—Learning from demonstration (LfD) is the process of building behavioral models of a task from demonstrations provided by an expert. These models can be used e.g. for system control by generalizing the expert demonstrations to previously unencountered situations. Most LfD methods, however, make strong assumptions about the expert behavior, e.g. they assume the existence of a deterministic optimal ground truth policy or require direct monitoring of the expert’s controls, which limits their practical use as part of a general system identification framework. In this work, we consider the LfD problem in a more general setting where we allow for arbitrary stochastic expert policies, without reasoning about the optimality of the demonstrations. Following a Bayesian methodology, we model the full posterior distribution of possible expert controllers that explain the provided demonstration data. Moreover, we show that our methodology can be applied in a nonparametric context to infer the complexity of the state representation used by the expert, and to learn task-appropriate partitionings of the system state space. Index Terms—learning from demonstration, policy recognition, imitation learning, Bayesian nonparametric modeling, Markov chain Monte Carlo, Gibbs sampling, distance dependent Chinese restaurant process F 1 L I NTRODUCTION (LfD) has become a viable alternative to classical reinforcement learning as a new data-driven learning paradigm for building behavioral models based on demonstration data. By exploiting the domain knowledge provided by an expert demonstrator, LfD-built models can focus on the relevant parts of a system’s state space [1] and hence avoid the need of tedious exploration steps performed by reinforcement learners, which often require an impractically high number of interactions with the system environment [2] and always come with the risk of letting the system run into undesired or unsafe states [3]. In addition to that, LfD-built models have been shown to outperform the expert in several experiments [4], [5], [6]. However, most existing LfD methods come with strong requirements that limit their practical use in real-world scenarios. In particular, they often require direct monitoring of the expert’s controls (e.g. [5], [7], [8]) which is possible only under laboratory-like conditions, or they need to interact with the target system via a simulator, if not by controlling the system directly (e.g. [9]). Moreover, many methods are restricted to problems with finite state spaces (e.g. [10]), or they compute only point estimates of the relevant system parameters without providing any information about their level of confidence (e.g. [9], [11], [12]). Last but not least, the expert is typically assumed to follow an optimal deterministic policy (e.g. [13]) or to at least approximate one, based on some presupposed degree of confidence in the optimal • • • EARNING FROM DEMONSTRATION Adrian Šošić is a member of the Signal Processing Group and an associate member of the Bioinspired Communication Systems Lab, Technische Universität Darmstadt, Germany. E-mail: [email protected] Abdelhak M. Zoubir is the head of the Signal Processing Group, Technische Universität Darmstadt, Germany. E-mail: [email protected] Heinz Koeppl is the head of the Bioinspired Communication Systems Lab and a member of the Centre for Cognitive Science, Technische Universität Darmstadt, Germany. E-mail: [email protected] behavior (e.g. [14]). While such an assumption may be reasonable in some situations (e.g. for problems in robotics involving a human demonstrator [1]), it is not appropriate in many others, such as in multi-agent environments, where an optimal deterministic policy often does not exist [15]. In fact, there are many situations in which the assumption of a deterministic expert behavior is violated. In a more general system identification setting, our goal could be, for instance, to detect the deviation of an agent’s policy from its known nominal behavior, e.g. for the purpose of fault or fraud detection (note that the term “expert” is slightly misleading in this context). Also, there are situations in which we might not want to reason about the optimality of the demonstrations; for instance, when studying the exploration strategy of an agent who tries to model its environment (or the reactions of other agents [16]) by randomly triggering different events. In all these cases, existing LfD methods can at best approximate the behavior of the expert as they presuppose the existence of some underlying deterministic ground truth policy. In this work, we present a novel approach to LfD in order to address the above-mentioned shortcomings of existing methods. Central to our work is the problem of policy recognition, that is, extracting the (possibly stochastic and non-optimal) policy of a system from observations of its behavior. Taking a general system identification view on the problem, our goal is herein to make as few assumptions about the expert behavior as possible. In particular, we consider the whole class of stochastic expert policies, without ever reasoning about the optimality of the demonstrations. As a result of this, our hypothesis space is not restricted to a certain class of ground truth policies, such as deterministic or softmax policies (c.f. [14]). This is in contrast to inverse reinforcement learning approaches (see Section 1.2), which interpret the observed demonstrations as the result of some preceding planing procedure conducted by the expert which 2 they try to invert. In the above-mentioned case of fault detection, for example, such an inversion attempt will generally fail since the demonstrated behavior can be arbitrarily far from optimal, which renders an explanation of the data in terms of a simple reward function impossible. Another advantage of our problem formulation is that the resulting inference machinery is entirely passive, in the sense that we require no active control of the target system nor access to the action sequence performed by the expert. Accordingly, our method is applicable to a broader range of problems than targeted by most existing LfD frameworks and can be used for system identification in cases where we cannot interact with the target system. However, our objective in this paper is twofold: we not only attempt to answer the question how the expert performs a given task but also to infer which information is used by the expert to solve it. This knowledge is captured in the form of a joint posterior distribution over possible expert state representations and corresponding state controllers. As the complexity of the expert’s state representation is unknown a priori, we finally present a Bayesian nonparametric approach to explore the underlying structure of the system space based on the available demonstration data. 1.1 Problem statement Given a set of expert demonstrations in the form of a system trajectory s = (s1 , s2 , . . . , sT ) ∈ S T of length T , where S denotes the system state space, our goal is to determine the latent control policy used by the expert to generate the state sequence.1 We formalize this problem as a discretetime decision-making process (i.e. we assume that the expert executes exactly one control action per trajectory state) and adopt the Markov decision process (MDP) formalism [17] as the underlying framework describing the dynamics of our system. More specifically, we consider a reduced MDP (S, A, T , π) which consists of a countable or uncountable system state space S , a finite set of actions A containing |A| elements, a transition model T : S × S × A → R≥0 where T (s0 | s, a) denotes the probability (density) assigned to the event of reaching state s0 after taking action a in state s, and a policy π modeling the expert’s choice of actions.2 In the following, we assume that the expert policy is parametrized by a parameter ω ∈ Ω, which we call the global control parameter of the system, and we write π(a | s, ω), π : A × S × Ω → [0, 1], to denote the expert’s local policy (i.e. the distribution of actions a played by the expert) at any given state s under ω . The set Ω is called the parameter space of the policy, which specifies the class of feasible action distributions. The specific form of Ω will be discussed later. Using a parametric description for π is convenient as it shifts the recognition task from determining the possibly infinite set of local policies at all states in S to inferring the posterior distribution p(ω | s), which contains all information that is relevant for predicting the expert behavior, Z p(a | s∗ , s) = π(a | s∗ , ω)p(ω | s) dω. Ω 1. The generalization to multiple trajectories is straightforward as they are conditionally independent given the system parameters. 2. This reduced model is sometimes referred to as an MDP\R (see e.g. [9], [18], [19]) to emphasize the nonexistence of a reward function. Herein, s∗ ∈ S is some arbitrary query point and p(a | s∗ , s) is the corresponding predictive action distribution. Since the local policies are coupled through the global control parameter ω as indicated by the above integral equation, inferring ω means not only to determine the individual local policies but also their spatial dependencies. Consequently, learning the structure of ω from demonstration data can be also interpreted as learning a suitable state representation for the task performed by the expert. This relationship will be discussed in detail in the forthcoming sections. In Section 3, we further extend this reasoning to a nonparametric policy model whose hypothesis class finally covers all stochastic policies on S . For the remainder of this paper, we make the common assumptions that the transition model T as well as the system state space S and the action set A are known. The assumption of knowing S follows naturally because we already assumed that we can observe the expert acting in S . In the proposed Bayesian framework, the latter assumption can be easily relaxed by considering noisy or incomplete trajectory data. However, as this would not provide additional insights into the main principles of our method, we do not consider such an extension in this work. The assumption of knowing the transition dynamics T is a simplifying one but prevents us from running into model identifiability problems: if we do not constrain our system transition model in some reasonable way, any observed state transition in S could be trivially explained by a corresponding local adaptation of the assumed transition model T and, thus, there would be little hope to extract the true expert policy from the demonstration data. Assuming a fixed transition model is the easiest way to resolve this model ambiguity. However, there are alternatives which we leave for future work, for example, using a parametrized family of transition models for joint inference. This extension can be integrated seamlessly into our Bayesian framework and is useful in cases where we can constrain the system dynamics in a natural way, e.g. when modeling physical processes. Also, it should be mentioned that we can tolerate deviations from the true system dynamics as long as our model T is sufficiently accurate to extract information about the expert action sequence locally, because our inference algorithm naturally processes the demonstration data piece-wise in the form of one-step state transitions {(st , st+1 )} (see algorithmic details in Section 2 and results in Section 4.2). This is in contrast to planning-based approaches, where small modeling errors in the dynamics can accumulate and yield consistently wrong policy estimates [8], [20]. The requirement of knowing the action set A is less stringent: if A is unknown a priori, we can still assume a potentially rich class of actions, as long as the transition model can provide the corresponding dynamics (see example in Section 4.2). For instance, we might be able to provide a model which describes the movement of a robotic arm even if the maximum torque that can be generated by the system is unknown. Figuring out which of the hypothetical actions are actually performed by the expert and, more importantly, how they are used in a given context, shall be the task of our inference algorithm. 3 1.2 Related work The idea of learning from demonstration has now been around for several decades. Most of the work on LfD has been presented by the robotics community (see [1] for a survey), but recent advances in the field have triggered developments in other research areas, such as cognitive science [21] and human-machine interaction [22]. Depending on the setup, the problem is referred to as imitation learning [23], apprenticeship learning [9], inverse reinforcement learning [13], inverse optimal control [24], preference elicitation [21], plan recognition [25] or behavioral cloning [5]. Most LfD models can be categorized as intentional models (with inverse reinforcement learning models as the primary example), or sub-intentional models (e.g. behavioral cloning models). While the latter class only predicts an agent’s behavior via a learned policy representation, intentional models (additionally) attempt to capture the agent’s beliefs and intentions, e.g. in the form of a reward function. For this reason, intentional models are often reputed to have better generalization abilities3 ; however, they typically require a certain amount of task-specific prior knowledge in order to resolve the ambiguous relationship between intention and behavior, since there are often many ways to solve a certain task [13]. Also, albeit being interesting from a psychological point of view [21], intentional models target a much harder problem than what is actually required in many LfD scenarios. For instance, it is not necessary to understand an agent’s intention if we only wish to analyze its behavior locally. Answering the question whether or not an intentionbased modeling of the LfD problem is advantageous, is out of the scope of this paper; however, we point to the comprehensive discussion in [26]. Rather, we present a hybrid solution containing both intentional and sub-intentional elements. More specifically, our method does not explicitly capture the expert’s goals in the form of a reward function but infers a policy model directly from the demonstration data; nonetheless, the presented algorithm learns a task-specific representation of the system state space which encodes the structure of the underlying control problem to facilitate the policy prediction task. An early version of this idea can be found in [27], where the authors proposed a simple method to partition a system’s state space into a set of socalled control situations to learn a global system controller based on a small set of informative states. However, their framework does not incorporate any demonstration data and the proposed partitioning is based on heuristics. A more sophisticated partitioning approach utilizing expert demonstrations is shown in [11]; yet, the proposed expectationmaximization framework applies to deterministic policies and finite state spaces only. The closest methods to ours can be probably found in [19] and [10]. The authors of [19] presented a nonparametric inverse reinforcement learning approach to cluster the expert data based on a set of learned subgoals encoded in the form of local rewards. Unfortunately, the required subgoal 3. The rationale behind this is that an agent’s intention is always specific to the task being performed and can hence serve as a compact description of it [13]. However, if the intention of the agent is misunderstood, then also the subsequent generalization step will trivially fail. assignments are learned only for the demonstration set and, thus, the algorithm cannot be used for action prediction at unvisited states unless it is extended with a non-trivial post-processing step which solves the subgoal assignment problem. Moreover, the algorithm requires an MDP solver, which causes difficulties for systems with uncountable state spaces. The sub-intentional model in [10], on the other hand, can be used to learn a class of finite state controllers directly from the expert demonstrations. Like our framework, the algorithm can handle various kinds of uncertainty about the data but, again, the proposed approach is limited to discrete settings. In the context of reinforcement learning, we further point to the work presented in [28] whose authors follow a nonparametric strategy similar to ours, to learn a distribution over predictive state representations for decision-making. 1.3 Paper outline The outline of the paper is as follows: In Section 2, we introduce our parametric policy recognition framework and derive inference algorithms for both countable and uncountable state spaces. In Section 3, we consider the policy recognition problem from a nonparametric viewpoint and provide insights into the state representation learning problem. Simulation results are presented in Section 4 and we give a conclusion of our work in Section 5. In the supplement, we provide additional simulation results, a note on the computational complexity of our model, as well as an indepth discussion on the issue of marginal invariance and the problem of policy prediction in large states spaces. 2 2.1 PARAMETRIC P OLICY R ECOGNITION Finite state spaces: the static model First, let us assume that the expert system can be modeled on a finite state space S and let |S| denote its cardinality. For notational convenience, we represent both states and actions by integer values. Starting with the most general case, we assume that the expert executes an individual control strategy at each possible system state. Accordingly, we introduce a set of local control parameters or local con|S| trollers {θ i }i=1 by which we describe the expert’s choice of actions. More specifically, we model the executed actions as categorical random variables and let the j th element of θ i represent the probability that the expert chooses action j at state i. Consequently, θ i lies in the (|A| − 1)-simplex, which we denote by the symbol ∆ for brevity of notation, i.e. θ i ∈ ∆ ⊆ R|A| . Summarizing all local control parameters in a single matrix, Θ ∈ Ω ⊆ ∆|S| , we obtain the global control parameter of the system as already introduced in Section 1.1, which compactly captures the expert behavior. Note that we denote the global control parameter here by Θ instead of ω , for reasons that will become clear later. Each action a is thus characterized by the local policy that is induced by the control parameter of the underlying state, π(a | s = i, Θ) = C AT(a | θ i ). For simplicity, we will write π(a | θ i ) since the state information is used only to select the appropriate local controller. 4 Considering a finite set of actions, it is convenient to place a symmetric Dirichlet prior on the local control parameters, pθ (θ i | α) = D IR(θ i | α · 1|A| ), which forms the conjugate distribution to the categorical distribution over actions. Here, 1|A| denotes the vector of all ones of length |A|. The prior is itself parametrized by a concentration parameter α which can be further described by a hyperprior pα (α), giving rise to a Bayesian hierarchical model. For simplicity, we assume that the value of α is fixed for the remainder of this paper, but the extension to a full Bayesian treatment is straightforward. The joint distribution of all remaining model variables is, therefore, given as p(s, a, Θ | α) = p1 (s1 ) ... × TY −1 t=1 |S| Y i=1 pθ (θ i | α) . . . (1) T (st+1 | st , at )π(at | θ st ), where a = (a1 , a2 , . . . , aT −1 ) denotes the latent action sequence taken by the expert and p1 (s1 ) is the initial state distribution of the system. Throughout the rest of the paper, we refer to this model as the static model. The corresponding graphical visualization is depicted in Fig. 1. 2.1.1 Gibbs sampling Following a Bayesian methodology, our goal is to determine the posterior distribution p(Θ | s, α), which contains all information necessary to make predictions about the expert behavior. For the static model in Eq. (1), the required marginalization of the latent action sequence a can be computed efficiently because the joint distribution factorizes over time instants. For the extended models presented in later sections, however, a direct marginalization becomes computationally intractable due to the exponential growth of latent variable configurations. As a solution to this problem, we follow a sampling-based inference strategy which is later on generalized to more complex settings. For the simple model described above, we first approximate the joint posterior distribution p(Θ, a | s, α) over both controllers and actions using a finite number of Q samples, and then marginalize over a in a second step, X p(Θ | s, α) = p(Θ, a | s, α) (2) ≈ X a  st−1 st st+1 at−1 at at+1 α z Θ Fig. 1: Graphical model of the policy recognition framework. The underlying dynamical structure is that of an MDP whose global control parameter Θ is treated as a random variable with prior distribution parametrized by α. The indicator node z is used for the clustering model in Section 2.2. Observed variables are highlighted in gray. Herein, a−t and Θ−i refer to all actions/controllers except at and θ i , respectively. The latter of the two expressions reveals that, in order to sample θ i , we need to consider only those actions played at the corresponding state i. Furthermore, the first expression shows that, given Θ, all actions {at } can be sampled independently of each other. Therefore, inference can be done in parallel for all θ i . This can be also seen from the posterior distribution of the global control parameter, which factorizes over states, p(Θ | s, a, α) ∝ |S| Y i=1 pθ (θ i | α) Y t:st =i π(at | θ i ). (3) From the conjugacy of pθ (θ i | α) and π(at | θ i ), it follows that the posterior over θ i is again Dirichlet distributed with updated concentration parameter. In particular, denoting by φi,j the number of times that action j is played at state i for the current assignment of actions a, X φi,j := 1(at = j), (4) t:st =i and by collecting these quantities in the form of vectors, i.e. φi := [φi,1 , . . . , φi,|A| ], we can rewrite Eq. (3) as p(Θ | s, a, α) = |S| Y i=1 D IR(θ i | φi + α · 1|A| ). (5) a  Q Q X 1 1 X   δ {q} {q} (Θ, a) = δ {q} (Θ), Q q=1 Θ a Q q=1 Θ where (Θ{q} , a{q} ) ∼ p(Θ, a | s, α), and δx (·) denotes Dirac’s delta function centered at x. This two-step approach gives rise to a simple inference procedure since the joint Q samples {(Θ{q} , a{q} )}q=1 can be easily obtained from a Gibbs sampling scheme, i.e. by sampling iteratively from the following two conditional distributions, p(at | a−t , s, Θ, α) ∝ T (st+1 | st , at )π(at | θ st ), Y p(θ i | Θ−i , s, a, α) ∝ pθ (θ i | α) π(at | θ i ). t:st =i 2.1.2 Collapsed Gibbs sampling Choosing a Dirichlet distribution as prior model for the local controllers is convenient as it allows us to arrive at analytic expressions for the conditional distributions that are required to run the Gibbs sampler. As an alternative, we can exploit the conjugacy property of pθ (θ i | α) and π(at | θ i ) to marginalize out the control parameters during the sampling process, giving rise to a collapsed sampling scheme. Collapsed sampling is advantageous in two different respects: first, it reduces the total number of variables to be sampled and, hence, the number of computations required per Gibbs iteration; second, it increases the mixing speed of the underlying Markov chain that governs the sampling process, reducing the correlation of the obtained 5 samples and, with it, the variance of the resulting policy estimate. Formally, collapsing means that we no longer approximate the joint distribution p(Θ, a | s, α) as done in Eq. (2), but instead sample from the marginal density p(a | s, α), X p(Θ | s, α) = p(Θ | s, a, α)p(a | s, α) a ≈ X a  1 p(Θ | s, a, α)  Q Q Q X q=1 1 X = p(Θ | s, a{q} , α), Q q=1  δa{q} (a) (6) where a{q} ∼ p(a | s, α). In contrast to the previous approach, the target distribution is no longer represented by a sum of Dirac measures but described by a product of Dirichlet mixtures (compare Eq. (5)). The required samples {a{q} } can be obtained from a collapsed Gibbs sampler with Z p(s, a, Θ | α) dΘ p(at | a−t , s, α) ∝ |S| ∆ Z Y ∝ T (st+1 | st , at ) pθ (θ st | α) π(at0 | θ st ) dθ st . ∆ t0 :st0 =st It turns out that the above distribution provides an easy sampling mechanism since the integral part, when viewed as a function of action at only, can be identified as the conditional of a Dirichlet-multinomial distribution. This distribution is then reweighted by the likelihood T (st+1 | st , at ) of the observed transition. The final (unnormalized) weights of the resulting categorical distribution are hence given as p(at = j | a−t , s, α) ∝ T (st+1 | st , at = j) · (ϕt,j + α), (7) where ϕt,j counts the number of occurrences of action j among all actions in a−t played at the same state as at (that is, st ). Explicitly, X ϕt,j := 1(at0 = j). t0 :st0 =st t0 6=t Note that these values can be also expressed in terms of the sufficient statistics introduced in the last section, ϕt,j = φst ,j − 1(at = j). As before, actions played at different states may be sampled independently of each other because they are generated by different local controllers. Consequently, inference about Θ again decouples for all states. 2.2 Towards large state spaces: a clustering approach While the methodology introduced so far provides a means to solve the policy recognition problem in finite state spaces, the presented approaches quickly become infeasible for large spaces as, in the continuous limit, the number of parameters to be learned (i.e. the size of Θ) will grow unbounded. In that sense, the presented methodology is prone to overfitting because, for larger problems, we will never have enough demonstration data to sufficiently cover the whole system state space. In particular, the static model S θ1 θ2 θ3 θ4 θ5 Fig. 2: Schematic illustration of the clustering model. The state space S is partitioned into a set of clusters {Ck }, each governed by its own local control parameter θ k . makes no assumptions about the structure of Θ but treats all local policies separately (see Eq. (5)); hence, we are not able to generalize the demonstrated behavior to regions of the state space that are not directly visited by the expert. Yet, we would certainly like to predict the expert behavior also at states for which there is no trajectory data available. Moreover, we should expect a well-designed model to produce increasingly accurate predictions at regions closer to the observed trajectories (with the precise definition of “closeness” being left open for the moment). A simple way to counteract the overfitting problem, in general, is to restrict the complexity of a model by limiting the number of its free parameters. In our case, we can avoid the parameter space to grow unbounded by considering only a finite number of local policies that need to be shared between the states. The underlying assumption is that, at each state, the expert selects an action according to one of K local policies, with corresponding control parameters {θ k }K k=1 . Accordingly, we introduce a set of indicator |S| or cluster assignment variables, {zi }i=1 , zi ∈ {1, . . . , K}, which map the states to their local controllers (Fig. 1). Obviously, such an assignment implies a partitioning of the state space (Fig. 2), resulting in the following K clusters, Ck := {i : zi = k}, k ∈ {1, . . . , K}. Although we motivated the clustering of states by the problem of overfitting, partitioning a system’s space is not only convenient from a statistical point of view; mapping the inference problem down to a lower-dimensional space is also reasonable for practical reasons as we are typically interested in understanding an agent’s behavior on a certain task-appropriate scale. The following paragraphs discuss these reasons in detail: • In practice, the observed trajectory data will always be noisy since we can take our measurements only up to a certain finite precision. Even though we do not explicitly consider observation noise in this paper, clustering the data appears reasonable in order to robustify the model against small perturbations in our observations. • Considering the LfD problem from a control perspective, the complexity of subsequent planning steps can be potentially reduced if the system dynamics can be approximately described on a lower-dimensional manifold of the state space, meaning that the system behavior can be well represented by a smaller set of informative states (c.f. finite state 6 controllers [29], control situations [27]). The LfD problem can then be interpreted as the problem of learning a (nearoptimal) controller based on a small set of local policies that together provide a good approximation of the global agent behavior. What remains is the question how we can find such a representation. The clustering approach described above offers one possible solution to this problem. • Finally, in any real setup, it is reasonable to assume that the expert itself can only execute a finite-precision policy due to its own limited sensing abilities of the system state space. Consequently, the demonstrated behavior is going to be optimal only up to a certain finite precision because the agent is generally not able to discriminate between arbitrary small differences of states. An interesting question in this context is whether we can infer the underlying state representation of the expert by observing its reactions to the environment in the form of the resulting state trajectory. We will discuss this issue in detail in Section 3. By introducing the cluster assignment variables {zi }, the joint distribution in Eq. (1) changes into p(s, a, z, Θ | α) = p1 (s1 ) ... × TY −1 t=1 K Y k=1 (8) pθ (θ k | α) . . . T (st+1 | st , at )π(at | θ zst )pz (z), where z = (z1 , z2 , . . . , z|S| ) denotes the collection of all indicator variables and pz (z) is the corresponding prior distribution to be further discussed in Section 2.2.3. Note that the static model can be recovered as a special case of the above when each state describes its own cluster, i.e. by setting K = |S| and fixing zi = i (hence the name static). In contrast to the static model, we now require both the indicator zi and the corresponding control parameter θ zi in order to characterize the expert’s behavior at a given state i. Accordingly, the global control parameter of the model is ω = (Θ, z) with underlying parameter space Ω ⊆ ∆K ×{1, . . . , K}|S| (see Section 1.1), and our target distribution becomes p(Θ, z | s, α). In what follows, we derive the Gibbs and the collapsed Gibbs sampler as mechanisms for approximate inference in this setting. 2.2.1 Gibbs sampling As shown by the following equations, the expressions for the conditional distributions over actions and controllers take a similar form to those of the static model. Here, the only difference is that we no longer group the actions by their states but according to their generating local policies or, equivalently, the clusters {Ck }, p(at | a−t , s, z, Θ, α) ∝ T (st+1 | st , at ) · π(at | θ zst ), Y p(θ k | Θ−k , s, a, z, α) ∝ pθ (θ k | α) π(at | θ k ) t:zst =k = pθ (θ k | α) Y t:st ∈Ck π(at | θ k ). The latter expression again takes the form of a Dirichlet distribution with updated concentration parameter, p(θ k | Θ−k , s, a, z, α) = D IR(θ k | ξ k + α · 1|A| ), where ξ k := [ξk,1 , . . . , ξk,|A| ], and ξk,j denotes the number of times that action j is played at states belonging to cluster Ck in the current assignment of a. Explicitly, X X X ξk,j := 1(at = j) = 1(at = j), (9) i∈Ck t:st =i t:zst =k which is nothing but the sum of the φi,j ’s of the corresponding states, X ξk,j = φi,j . i∈Ck In addition to the actions and control parameters, we now also need to sample the indicators {zi }, whose conditional distributions can be expressed in terms of the corresponding prior model and the likelihood of the triggered actions, Y p(zi | z −i , s, a, Θ, α) ∝ p(zi | z −i ) π(at | θ zi ). (10) t:st =i 2.2.2 Collapsed Gibbs sampling As before, we derive the collapsed Gibbs sampler by marginalizing out the control parameters, Z p(s, a, z, Θ | α) dΘ (11) p(zi | z −i , s, a, α) ∝ ∝ p(zi | z −i ) ∝ p(zi | z −i ) ∝ p(zi | z −i ) ∝ p(zi | z −i ) Z ∆K K Y ∆K k=1 Z K Y ∆K k=1 Z K Y ∆K k=1 K Y k=1 pθ (θ k | α) pθ (θ k | α) pθ (θ k | α) TY −1 t=1 |S| π(at | θ zst ) dΘ Y Y i0 =1 t:st =i0 Y π(at | θ zi0 ) dΘ Y i0 :zi0 =k t:st =i0 π(at | θ k ) dΘ   Z Y  pθ (θ k | α) π(at | θ k ) dθ k  . ∆ t:st ∈Ck Here, we first grouped the actions by their associated states and then grouped the states themselves by the clusters {Ck }. Again, this distribution admits an easy sampling mechanism as it takes the form of a product of Dirichletmultinomials, reweighted by the conditional prior distribution over indicators. In particular, we observe that all actions played at some state i appear in exactly one of the K integrals of the last equation. In other words, by changing the value of zi (i.e. by assigning state i to another cluster), only two of the involved integrals are affected: the one belonging to the previously assigned cluster, and the one of the new cluster. Inference about the value of zi can thus be carried out using the following two sets of sufficient statistics: • • φi,j : the number of actions j played at state i, ψi,j,k : the number of actions j played at states assigned to cluster Ck , excluding state i. The φi,j ’s are the same as in Eq. (4) and their definition is repeated here just as a reminder. For the ψi,j,k ’s, on the other hand, we find the following explicit expression, X X ψi,j,k := 1(at = j), i0 ∈Ck t:st =i0 i0 6=i 7 which can be also written in terms of the statistics used for the ordinary Gibbs sampler, ψi,j,k = ξk,j − 1(i ∈ Ck ) · φi,j . By collecting these quantities in a vector, i.e. ψ i,k := [ψi,1,k , . . . , ψi,|A|,k ], we end up with the following simplified expression, p(zi = k | z −i , s, a, α) ∝ p(zi = k | z −i ) . . . K Y ... × D IR M ULT(ψ i,k0 + 1(k 0 = k) · φi | α). k0 =1 Further, we obtain the following result for the conditional distribution of action at , p(at | a−t , s, z, α) ∝ T (st+1 | st , at ) . . . Z Y π(at0 | θ zst ) dθ zst . ... × pθ (θ zst | α) ∆ t0 :zs 0 =zst t By introducing the sufficient statistics {ϑt,j }, which count the number of occurrences of action j among all states that are currently assigned to the same cluster as st (i.e. the cluster Czst ), excluding at itself, X ϑt,j := 1(at = j), t0 :zs 0 =zst t t0 6=t we finally arrive at the following expression, p(at = j | a−j , s, z, α) ∝ (ϑt,j + α) · T (st+1 | st , at = j). As for the static model, we can establish a relationship between the statistics used for the ordinary and the collapsed sampler, ϑt,j = ξzst ,j − 1(at = j). 2.2.3 Prior models In order to complete our model, we need to specify a prior distribution over indicator variables pz (z). The following paragraphs present three such candidate models: Non-informative prior The simplest of all prior models is the non-informative prior over partitionings, reflecting the assumption that, a priori, all cluster assignments are equally likely and that the indicators {zi } are mutually independent. In this case, pz (z) is constant and, hence, the term p(zi | z −i ) in Eq. (10) and Eq. (11) disappears, so that the conditional distribution of indicator zi becomes directly proportional to the likelihood of the inferred action sequence. Mixing prior Another simple yet expressive prior can be realized by the (finite) Dirichlet mixture model. Instead of assuming that the indicator variables are independent, the model uses a set of mixing coefficients q = [q1 , . . . , qK ], where qk represents the prior probability that an indicator variable takes on value k . The mixing coefficients are themselves modeled by a Dirichlet distribution, so that we finally have γ · 1K ), q ∼ D IR(q | K zi | q ∼ C AT(zi | q), where γ is another concentration parameter, controlling the variability of the mixing coefficients. Note that the indicator variables are still conditionally independent given the mixing coefficients in this model. More specifically, for a fixed q , the conditional distribution of a single indicator in Eq. (10) and Eq. (11) takes the following simple form, p(zi = k | z −i , q) = qk . If the value of q is unknown, we have two options to include this prior into our model. One is to sample q additionally to the remaining variables by drawing values from the following conditional distribution during the Gibbs procedure, |S| Y γ · 1K ) C AT(zi | q) K i=1 γ ∝ D IR(q | ζ + · 1K ), K where ζ := [ζ1 , . . . , ζK ], and ζk denotes the number of variables zi that map to cluster Ck , p(q | s, a, z, Θ, α) ∝ D IR(q | ζk = |S| X 1(zi = k). i=1 Alternatively, we can again make use of the conjugacy property to marginalize out the mixing proportions q during the inference process, just as we did for the control parameters in previous sections. The result is (additional) collapsing in q . In this case, we simply replace the factor p(zi = k | z −i ) in the conditional distribution of zi by γ (−i) (12) p(zi = k | z −i , γ) ∝ (ζk + ), K (−i) where ζk is defined like ζk but without counting the current value of indicator zi , (−i) ζk := |S| X i0 =1 i0 6=i 1(zi = k) = ζk − 1(zi = k). A detailed derivation is omitted here but follows the same style as for the collapsing in Section 2.1.2. Spatial prior Both previous prior models assume (conditional) independence of the indicator variables and, hence, make no specific assumptions about their dependency structure. However, we can also use the prior model to promote a certain type of spatial state clustering. A reasonable choice is, for instance, to use a model which preferably groups “similar” states together (in other words, a model which favors clusterings that assign those states the same local control parameter). Similarity of states can be expressed, for example, by a monotonically decreasing decay function f : [0, ∞) → [0, 1] which takes as input the distance between two states. The required pairwise distances can be, in turn, defined via some distance metric χ : S × S → [0, ∞). In fact, apart from the reasons listed in Section 2.2, there is an additional motivation, more intrinsically related to the dynamics of the system, why such a clustering can be useful: given that the transition model of our system admits locally smooth dynamics (which is typically the case for real-world 8 systems), the resulting optimal control policy often turns out to be spatially smooth, too [11]. More specifically, under an optimal policy, two nearby states are highly likely to experience similar controls; hence, it is reasonable to assume a priori that both share the same local control parameter. For the policy recognition task, it certainly makes sense to regularize the inference problem by encoding this particular structure of the solution space into our model. The Potts model [30], which is a special case of a Markov random field with pairwise clique potentials [31], offers one way to do this, pz (z) ∝ |S| Y i=1 exp ! |S| βX f (di,j )δ(zi , zj ) . 2 j=1 j6=i Here, δ denotes Kronecker’s delta, di,j := χ(si , sj ), i, j ∈ {1, . . . , |S|}, are the state similarity values, and β ∈ [0, ∞) is the (inverse) temperature of the model which controls the strength of the prior. From this equation, we can easily derive the conditional distribution of a single indicator variable zi as p(zi | z −i ) ∝ exp β |S| X j=1 j6=i ! f (di,j )δ(zi , zj ) . (13) This completes our inference framework for finite spaces. 2.3 Countably infinite and uncountable state spaces A major advantage of the clustering approach presented in the last section is that, due to the limited number of local policies to be learned from the finite amount of demonstration data, we can now apply the same methodology to state spaces of arbitrary size, including countably infinite and uncountable state spaces. This extension had been practically impossible for the static model because of the overfitting problem explained in Section 2.2. Nevertheless, there remains a fundamental conceptual problem: a direct extension of the model to these spaces would imply that the distribution over possible state partitionings becomes an infinite-dimensional object (i.e., in the case of uncountable state spaces, a distribution over functional mappings from states to local controllers), requiring an infinite number of indicator variables. Certainly, such an object is non-trivial to handle computationally. However, while the number of latent cluster assignments grows unbounded with the size of the state space, the amount of observed trajectory data always remains finite. A possible solution to the problem is, therefore, to reformulate the inference task on a reduced state space Se := {s1 , s2 , . . . , sT } containing only states along the observed trajectories. Reducing the state space in this way means that we need to consider only a finite set of indicator variables {zt }Tt=1 , one for each expert state s ∈ Se, which always induces a model of finite size. Assuming that no state is visited twice, we may further use the same index set for both variable types.4 In order to limit the complexity of the dependency structure of the indicator variables for larger data sets, we further let the value of indicator zt depend only on a subset of the remaining variables z −t as defined by some neighborhood rule N . The resulting joint distribution is then given as ! T Y β X pz (z | s) ∝ exp f (dt,t0 )δ(zt , zt0 ) , 2 t0 ∈N t=1 t which now implicitly depends on the state sequence s through the pairwise distances dt,t0 := χ(st , st0 ), t, t0 ∈ {1, . . . , T } (hence the conditioning on s). The use of a finite number of indicator variables along the expert trajectories obviously circumvents the abovementioned problem of representational complexity. Nevertheless, there are some caveats associated with this approach. First of all, using a reduced state space model raises the question of marginal invariance [32]: if we added a new trajectory point to the data set, would this change our belief about the expert policy at previously visited states? In particular, how is this different from modeling that new point together with the initial ones in the first place? And further, what does such a reduced model imply for unvisited states? Can we still use it to make predictions about their local policies? These questions are, in fact, important if we plan to use our model to generalize the expert demonstrations to new situations. For a detailed discussion on this issue, the reader is referred to the supplement. Here, we focus on the inferential aspects of the problem, which means to identify the system parameters at the given trajectory states. Another (but related) issue resulting from the reduced modeling approach is that we lose the simple generative interpretation of the process that could be used to explain the data generation beforehand. In the case of finite state spaces, we could think of a trajectory as being constructed by the following, step-wise mechanism: first, the prior pz (z) is used to generate a set of indicator variables for all states. Independently, we pick some value for α from pα (α) and sample K local control parameters from pθ (θ k | α). To finally generate a trajectory, we start with an initial state s1 , generated by p1 (s1 ), select a random action a1 from π(a1 | s1 , θ zs1 ) and transition to a new state s2 according to T (s2 | s1 , a1 ), where we select another action a2 , and so on. Such a directed way of thinking is possible since the finite model naturally obeys a causal structure where later states depend on earlier ones and the decisions made there. Furthermore, the cluster assignments and the local controllers could be generated in advance and isolated from each other because they were modeled marginally independent. For the reduced state space model, this interpretation no longer applies as the model has no natural directionality. In fact, its variables depend on each other in a cyclic fashion: altering the value of a particular indicator variable (say, the one corresponding to the last trajectory point) will have 4. Note that we make this assumption for notational convenience only and that it is not required from a mathematical point of view. Nonetheless, for uncountable state spaces the assumption is reasonable since the event of reaching the same state twice has zero probability for most dynamic models. In the general case, however, the indicator variables require their own index set to ensure that each system state is associated with exactly one cluster, even when visited multiple times. 9 an effect on the values of all remaining indicators due to their spatial relationship encoded by the “prior distribution” pz (z | s). Changing the values of the other indicators, however, will influence the actions being played at the respective states which, in turn, alters the probability of ending up with the observed trajectory in the first place and, hence, the position and value of the indicator variable we started with. Explaining the data generation of this model using a simple generative process is, therefore, not possible. Nevertheless, the individual building blocks of our model (that is, the policy, the transition model, etc.) together form a valid distribution over the model variables, which can be readily used for parameter inference. For the reasons explained above, it makes sense to define this distribution in the form of a discriminative model, ignoring the underlying generative aspects of the process. This is sufficient since we can always condition on the observed state sequence s, p(a, Θ, z | s, α) = K Y 1 pz (z | s) pθ (θ k | α) . . . Zs k=1 . . . × p1 (s1 ) TY −1 t=1 T (st+1 | st , at )π(at | θ zst ). Herein, Zs is a data-dependent normalizing constant. The structure of this distribution is illustrated by the factor graph shown in the supplement (Fig. S-1), which highlights the circular dependence between the variables. Note that, for any fixed state sequence s, this distribution indeed encodes the same basic properties as the finite model in Eq. (8). In particular, the conditional distributions of all remaining variables remain unchanged, which allows us to apply the same inference machinery that we already used in the finite case. For a deeper discussion on the difference between the two models, we again point to the supplement. 3 N ONPARAMETRIC P OLICY R ECOGNITION In the last section, we presented a probabilistic policy recognition framework for modeling the expert behavior using a finite mixture of K local policies. Basically, there are two situations when such a model is useful: • • either, we know the true number of expert policies, or, irrespective of the true behavioral complexity, we want to find an approximate system description in terms of at most K distinct control situations [27] (c.f. finite state controllers [29]). In all other cases, we are faced with the non-trivial problem of choosing K . In fact, the choice of K should not just be considered a mathematical necessity to perform inference in our model. By selecting a certain value for K we can, of course, directly control the complexity class of potentially inferred expert controllers. However, from a system identification point of view, it is more reasonable to infer the required granularity of the state partitioning from the observed expert behavior itself, instead of enforcing a particular model complexity. This way, we can gain valuable information about the underlying control structure and state representation used by the expert, which offers a possibility to learn a state partitioning of task-appropriate complexity directly from the demonstration data. Hence, the problem of selecting the right model structure should be considered as part of the inference problem itself. From a statistical modeling perspective, there are two common ways to approach this problem. One is to make use of model selection techniques in order to determine the most parsimonious model that is in agreement with the observed data. However, choosing a particular model complexity still means that we consider only one possible explanation for the data, although other explanations might be likewise plausible. For many inference tasks, including this one, the more elegant approach is to keep the complexity flexible and, hence, adaptable to the data. Mathematically, this can be achieved by assuming a potentially infinite set of model parameters (in our case controllers) from which we activate only a finite subset to explain the particular data set at hand. This alternative way of thinking opens the door to the rich class of nonparametric models, which provide an integrated framework to formulate the inference problem over both model parameters and model complexity as a joint learning problem. 3.1 A Dirichlet process mixture model The classical way to nonparametric clustering is to use a Dirichlet process mixture model (DPMM) [33]. These models can be obtained by starting from a finite mixture model and letting the number of mixture components (i.e. the number of local controllers) approach infinity. In our case, we start with the clustering model from Section 2.2, using a mixing prior over indicator variables, q ∼ D IR(q | γ K · 1K ) θ k ∼ D IR(θ k | α · 1|A| ) s1 ∼ p1 (s1 ) zi | q ∼ C AT(zi | q) at | st , Θ, z ∼ π(at | θ zst ) (14) st+1 | st , at ∼ T (st+1 | st , at ) . From these equations, we arrive at the corresponding nonparametric model as K goes to infinity. For the theoretical foundations of this limit, the reader is referred to the more general literature on Dirichlet processes, such as [33], [34]. In this paper, we restrict ourselves to providing the resulting sampling mechanisms for the policy recognition problem. In a DPMM, the mixing proportions q of the local parameters are marginalized out (that is, we use a collapsed sampler). The resulting distribution over partitionings is described by a Chinese restaurant process (CRP) [35] which can be derived, for instance, by considering the limit K → ∞ of the mixing process induced by the Gibbs update in Eq. (12), ( (−i) ζ if k ∈ {1, . . . , K ∗ }, p(zi = k | z −i , γ) ∝ k (15) γ if k = K ∗ + 1. Here, K ∗ denotes the number of distinct entries in z −i which are represented by the numerical values {1, . . . , K ∗ }. In this model, a state joins an existing cluster (i.e. a group of states whose indicators have the same value) with probability proportional to the number of states already contained in that cluster. Alternatively, it may create a new cluster with probability proportional to γ . From the model equations (14) it is evident that, given a particular setting of indicators, the conditional distributions of all other variable types remain unchanged. Effectively, we 10 only replaced the prior model pz (z) by the CRP. Hence, we can apply the same Gibbs updates for the actions and controllers as before and need to rederive only the conditional distributions of the indicator variables under consideration of the above defined process. According to Eq. (15), we herein need to distinguish whether an indicator variable takes a value already occupied by other indicators (i.e. it joins an existing cluster) or it is assigned a new value (i.e. ∗ it creates a new cluster). Let {θ k }K k=1 denote the set of control parameters associated with z −i . In the first case (k ∈ {1, . . . , K ∗ }), we can then write S c2 s2 c8 s3 s4 c3 s1 c1 s7 c4 c6 s6 s5 c5 s8 c7 c9 s9 Fig. 3: Schematic illustration of the ddCRP-based clustering applied to the reduced state space model in Section 2.3. p(zi = k | Each trajectory state is connected to some other state of = p(zi = k | z −i , {at }t:st =i , θ k , α, γ) the sequence. The connected components of the resulting ∝ p(zi = k | z −i , θ k , α, γ)p({at }t:st =i | zi = k, z −i , θ k , α, γ) graph implicitly define the state clustering. Coloring of the ∝ p(zi = k | z −i , γ)p({at }t:st =i | θ k ) background illustrates the spatial cluster extrapolation (see Y (−i) Section A in the supplement). Note that the underlying ∝ ζk · π(at | θ k ). decision-making process is assumed to be discrete in time; t:st =i the continuous gray line shown in the figure is only to In the second case (k = K ∗ + 1), we instead obtain indicate the temporal ordering of the trajectory states. ∗ K∗ p(zi = K + 1 | z −i , s, a, {θ k }k=1 , α, γ) ∗ z −i , s, a, {θ k0 }K k0 =1 , α, γ) = p(zi = K ∗ + 1 | z −i , {at }t:st =i , α, γ) ∝ p(zi = K ∗ + 1 | z −i , α, γ) . . . . . . × p({at }t:st =i | zi = K ∗ + 1, z −i , α, γ) ∝ p(zi = K ∗ + 1 | z −i , γ)p({at }t:st =i | zi = K ∗ + 1, α) Z ∝γ· p({at }t:st =i | θ K ∗ +1 )pθ (θ K ∗ +1 | α) dθ K ∗ +1 Z∆ Y π(at | θ K ∗ +1 )pθ (θ K ∗ +1 | α) dθ K ∗ +1 ∝γ· ∆ t:s =i t ∝ γ · D IR M ULT(φi | α). If a new cluster is created, we further need to initialize the corresponding control parameter θ K ∗ +1 by performing the respective Gibbs update, i.e. by sampling from ∗ p(θ K ∗ +1 | z, s, a, {θ k }K k=1 , α, γ) = p(θ K ∗ +1 | {at }t:zst =K ∗ +1 , α) ∝ pθ (θ K ∗ +1 | α)p({at }t:zst =K ∗ +1 | θ K ∗ +1 ) Y ∝ pθ (θ K ∗ +1 | α) · π(at | θ K ∗ +1 ) t:zst =K ∗ +1 ∝ D IR(θ K ∗ +1 | ξ K ∗ +1 + α · 1|A| ). Should a cluster get unoccupied during the sampling process, the corresponding control parameter may be removed from the stored parameter set {θ k } and the index set for k needs to be updated accordingly. Note that this sampling mechanism is a specific instance of Algorithm 2 described in [33]. A collapsed variant can be derived in a similar fashion. 3.2 Policy recognition using the distance-dependent Chinese restaurant process In the previous section, we have seen that the DPMM can be derived as the nonparametric limit model of a finite mixture using a set of latent mixing proportions q for the clusters. Although the DPMM allows us to keep the number of active controllers flexible and, hence, adaptable to the complexity of the demonstration data, the CRP as the underlying clustering mechanism does not capture any spatial dependencies between the indicator variables. In fact, in the CRP, the indicators {zi } are coupled only via their relative frequencies (see Eq. (15)) but not through their individual locations in space, resulting in an exchangeable collection of random variables [35]. In fact, one could argue that the spatial structure of the clustering problem is a priori ignored. The fact that DPMMs are nevertheless used for spatial clustering tasks can be explained by the particular form of data likelihood models that are typically used for the mixture components. In a Gaussian mixture model [36], for instance, the spatial clusters emerge due to the unimodal nature of the mixture components, which encodes the locality property of the model needed to obtain a meaningful spatial clustering of the data. For the policy recognition problem, however, the DPMM is not able to exploit any spatial information via the data likelihood since the clustering of states is performed at the level of the inferred action information (see Eq. (10)) and not on the state sequence itself. Consequently, we cannot expect to obtain a smooth clustering of the system state space, especially when the expert policies are overlapping (i.e. when they share one or more common actions) so that the action information alone is not sufficient to discriminate between policies. For uncountable state spaces, this problem is further complicated by the fact that we observe at most one expert state transition per system state. Here, the spatial context of the data is the only information which can resolve this ambiguity. In order to facilitate a spatially smooth clustering, we therefore need to consider non-exchangeable distributions over partitionings. More specifically, we need to design our model in such a way that, whenever a state s is “close” to some other state s0 and assigned to some cluster Ck , then, a priori, s0 should belong to the same cluster Ck with high probability. In that sense, we are looking for the nonparametric counterpart of the Potts model. One model with such properties is the distance-dependent Chinese restaurant 11 process (ddCRP) [32].5 As opposed to the traditional CRP, the ddCRP explicitly takes into account the spatial structure of the data. This is done in the form of pairwise distances between states, which can be obtained, for instance, by defining an appropriate distance metric on the state space (see Section 2.2.3). Instead of assigning states to clusters as done by the CRP, the ddCRP assigns states to other states according to their pairwise distances. More specifically, the probability that state i gets assigned to state j is defined as ( ν if i = j, p(ci = j | D, ν) ∝ (16) f (di,j ) otherwise, where ν ∈ [0, ∞) is called the self-link parameter of the process, D denotes the collection of all pairwise state distances, and ci is the “to-state” assignment of state i, which can be thought of as a directed edge on the graph defined on the set of all states (see Fig. 3). Accordingly, i and j in Eq. (16) can take values {1, . . . , |S|} for the finite state space model and {1, . . . , T } for our reduced state space model. The state clustering is then obtained as a byproduct of this mapping via the connected components of the resulting graph (see Fig. 3 again). Replacing the CRP by the ddCRP and following the same line of argument as in [32], we obtain the required conditional distribution of the state assignment ci as   j = i, ν p(ci = j | c−i ,s,a, α,D, ν) ∝ f (di,j ) no clusters merged,   f (di,j )·L Czi and Czj merged, where we use the shorthand notation L= D IR M ULT(ξ zi + ξ zj | α) D IR M ULT(ξ zi | α)D IR M ULT(ξ zj | α) for the data likelihood term. The ξk,j ’s are defined as in Eq. (9) but are based on the clustering which arises when we ignore the current link ci . The resulting Gibbs sampler is a collapsed one as the local control parameters are necessarily marginalized out during the inference process. 4 S IMULATION R ESULTS In this section, we present simulation results for two types of system dynamics. As a proof-of-concept, we first investigate the case of uncountable state spaces which we consider the more challenging setting for reasons explained earlier. To compare our framework with existing methods, we further provide simulation results for the standard grid world benchmark (see e.g. [9], [11], [19]). It should be pointed out, however, that establishing a fair comparison between LfD models is generally difficult due to their different working principles (e.g. reward prediction vs. action prediction), objectives (system identification vs. optimal control), requirements (e.g. MDP solver, knowledge of the expert’s discount factor, countable vs. uncountable state space), and 5. Note that the authors of [32] avoid calling this model nonparametric since it cannot be cast as a mixture model originating from a random measure. However, we stick to this term in order to make a clear distinction to the parametric models in Section 2, and to highlight the fact that there is no parameter K determining the number of controllers. Fig. 4: Schematic illustration of the expert policy used in Section 4.1, which applies eight local controllers to sixteen distinct regions. A sample trajectory is shown in color. assumptions (e.g. deterministic vs. stochastic expert behavior). Accordingly, our goal is rather to demonstrate the prediction abilities of the considered models than to push the models to their individual limits. Therefore, and to reduce the overall computational load, we tuned most model hyper-parameters by hand. Our code is available at https: //github.com/AdrianSosic/BayesianPolicyRecognition. 4.1 Example 1: uncountable state space As an illustrative example, we consider a dynamical system which describes the circular motion of an agent on a two-dimensional state space. The actions of the agent correspond to 24 directions that divide the space of possible angles [0, 2π) into equally-sized intervals. More specifically, action j corresponds to the angle (j − 1) 2π 24 . The transition model of the system is defined as follows: for each selected action, the agent first makes a step of length µ = 1 in the intended direction. The so-obtained position is then distorted by additive zero-mean isotropic Gaussian noise of variance σ 2 . This defines our transition kernel as T (st+1 | st , at = j) = N (st+1 | st + µ · ej , σ 2 I), (17) where st , st+1 ∈ R2 , ej denotes the two-dimensional unit vector pointing in the direction of action j , and I is the two-dimensional identity matrix. The overall goal of our agent is to describe a circular motion around the origin in the best possible manner allowed by the available actions. However, due to limited sensory information, the agent is not able to observe its exact position on the plane but can only distinguish between certain regions of the state space, as illustrated by Fig. 4. Also, the agent is unsure about the optimal control strategy, i.e. it does not always make optimal decisions but selects its actions uniformly at random from a subset of actions, consisting of the optimal one and the two actions pointing to neighboring directions (see Fig. 4 again). To increase the difficulty of the prediction task, we further let the agent change the direction of travel whenever the critical distance of r = 5 to the origin is exceeded. Having defined the expert behavior, we generate 10 sample trajectories of length T = 100. Herein, we assume a motion noise level of σ = 0.2 and initialize the agent’s 12 0 0 χ(s, s ) = ||s − s ||2 . (18) The corresponding similarity values are calculated using a Gaussian-shaped kernel. More specifically, ! d2 fPotts (d) = exp − 2 σf for the Potts model and fddCRP (d) = (1 − )fPotts (d) +  for the ddCRP model, with σf = 1 and a constant offset of  = 0.01 which ensures that states with large distances can still join the same cluster. For the Potts model, we further use a neighborhood structure containing the eight closest trajectory points of a state. This way, we ensure that, in principle, each local expert policy may occur at least once in the neighborhood of a state. The concentration parameter for the local controls is set to α = 1, corresponding to a uniform prior belief over local policies. A major drawback of the Potts model is that posterior inference about the temperature parameter β is complicated due to the nonlinear effect of the parameter on the normalization of the model. Therefore, we manually selected a temperature of β = 1.6 based on a minimization of the average policy prediction error (discussed below) via parameter sweeping. As opposed to this, we extend the inference problem for the ddCRP to the self-link parameter ν as suggested in [32]. For this, we use an exponential prior, pν (ν) = E XP(ν | λ), with rate parameter λ = 0.1, and applied the independence Metropolis-Hastings algorithm [37] using pν (ν) as proposal distribution with an initial value of ν = 1. In all our simulations, the sampler quickly converged to its stationary distribution, yielding posterior values for ν with a mean of 0.024 and a standard deviation of 0.023. To locally compare the predicted policy with the ground truth at a given state, we compute their earth mover’s distance (EMD) [38] with a ground distance metric measuring the absolute angular difference between the involved actions. To track the learning progress of the algorithms, we calculate the average EMD over all states of the given trajectory set at each Gibbs iteration. Herein, the local policy predictions are computed from the single Gibbs sample of the respective iteration, consisting of all sampled actions, indicators and – in case of non-collapsed sampling – the local control parameters. The resulting mean EMDs and standard deviations are depicted in Fig. 5. The inset further shows the average EMD computed at non-trajectory states which are sampled on a regular grid (depicted in the supplement), reflecting the quality of the resulting spatial prediction. As expected, the finite mixture model (using the true number of local policies, a collapsed mixing prior, and 1.4 1.4 1.2 1 0.8 0.6 0.4 10 0 1.2 average EMD position uniformly at random on the unit circle. An example trajectory is shown in Fig. 4. The obtained trajectory data is fed into the presented inference algorithms to approximate the posterior distribution over expert controllers, and the whole experiment is repeated in 100 Monte Carlo runs. For the spatial models, we use the Euclidean metric to compute the pairwise distances between states, 1 0.8 0.6 0.4 10 0 10 1 10 2 mixing prior Potts (complete) Potts (collapsed) ddCRP 10 1 10 2 Gibbs iteration Fig. 5: Average policy prediction error at the simulated trajectory states (main figure) and at non-trajectory states (inset). Shown are the empirical mean values and standard deviations, estimated from 100 Monte Carlo runs. γ = 1) is not able to learn a reasonable policy representation from the expert demonstrations since it does not explore the spatial structure of the data. In fact, the resulting prediction error shows only a slight improvement as compared to an untrained model. In contrast to this, all spatial models capture the expert behavior reasonably well. In agreement with our reasoning in Section 2.1.2, we observe that the collapsed Potts model mixes significantly faster and has a smaller prediction variance than the non-collapsed version. However, the ddCRP model gives the best result, both in terms of mixing speed (see [32] for an explanation of this phenomenon) and model accuracy. Interestingly, this is despite the fact that the ddCRP model additionally needs to infer the number of local controllers necessary to reproduce the expert behavior. The corresponding posterior distribution, which shows a pronounced peak at the true number, is depicted in the supplement. There, we also provide additional simulation results which give insights into the learned state partitioning and the resulting spatial policy prediction error. The results reveal that all expert motion patterns can be identified by our algorithm. 4.2 Example 2: finite state space In this section, we compare the prediction capabilities of our model to existing LfD frameworks, in particular: the maximum margin method in [9] (max-margin), the maximum entropy approach in [12] (max-ent), and the expectationmaximization algorithm in [11] (EM). For the comparison, we restrict ourselves to the ddCRP model which showed the best performance among all presented models. As a first experiment, we compare all methods on a finite version of the setting in Section 4.1, which is obtained by discretizing the continuous state space into a regular grid S = {(x, y) ∈ Z2 : |x|, |y| ≤ 10}, resulting in a total of 441 states. The transition probabilities are chosen proportional to the normal densities in Eq. (17) sampled at the grid points. Here, we used a noise level of σ = 1 and a reduced number of eight actions. Probability mass “lying outside” the finite grid area is shifted to the closest border states of the grid. Figure 6a delineates the average EMD over the number of trajectories (each of length T = 10) provided for training. 13 1.5 1.5 average EMD average EMD 2 1 0.5 0 10 1 max-ent max-margin EM ddCRP 10 2 10 3 10 4 number of trajectories (a) learning curves (circular policy) 1.5 max-ent max-margin EM ddCRP 1 1 0.5 0 10 1 max-ent max-margin EM ddCRP 0.5 10 2 10 3 10 4 0 0 0.2 0.4 0.6 0.8 1 number of trajectories (b) learning curves (MDP policy) (c) model robustness (MDP policy) Fig. 6: Average EMD values for the prediction task described in Section 4.2: (a) circular policy (b,c) MDP policy. Shown are the empirical mean values and standard deviations, estimated from 100 Monte Carlo runs. The EMD values are computed based on (a) the predicted action distributions and (b,c) the predicted next-state distributions. Note that the curves of max-ent (purple) and max-margin (yellow) in subfigure (a) lie on top of each other. We observe that neither of the two intentional models (maxent and max-margin) is able to capture the demonstrated expert behavior. This is due to the fact that the circular expert motion cannot be explained by a simple state-dependent reward structure but requires a more complex state-action reward model, which is not considered in the original formulations [9], [12]. While the EM model is indeed able to capture the general trend of the data, the prediction is less accurate as compared to that of the ddCRP model, since it cannot reproduce the stochastic nature of the expert policy. In fact, this difference in performance will become even more pronounced for expert policies which distribute their probability mass on a larger subset of actions. Therefore, the ddCRP model outperforms all other models since the provided expert behavior violates their assumptions. To analyze how the ddCRP competes against the other models in their nominal situations, we further compare all algorithms on a standard grid world task where the expert behavior is obtained as the optimal response to a simple state-dependent reward function. Herein, each state on the grid is assigned a reward with a chance of 1%, which is then drawn from a standard normal distribution. Worlds which contain no reward are discarded. The discount factor 0.9, which is used to compute the expert policy (see [17]), is provided as additional input for the intentional models. The results are shown in Figure 6b, which illustrates that the intention-based max-margin method outperforms all other methods for small amounts of training data. The subintentional methods (EM and ddCRP), on the other hand, yield better asymptotic estimates and smaller prediction variances. It should be pointed out that the three reference methods have a clear advantage over the ddCRP in this case because they assume a deterministic expert behavior a priori and do not need to infer this piece of information from the data. Despite this additional challenge, the ddCRP model yields a competitive performance. Finally, we compare all approaches in terms of their robustness against modeling errors. For this purpose, we repeat the previous experiment with a fixed number of 1000 trajectories but employ a different transition model for inference than used for data generation. More specifically, we utilize an overly fine-grained model consisting of 24 directions, assuming that the true action set is unknown, as suggested in Section 1.1. Additionally, we perturb the assumed model by multiplying (and later renormalizing) each transition probability with a random number generated according to f (u) = tan( π4 (u + 1)), with u ∼ U NIFORM(−η, η) and perturbation strength η ∈ [0, 1]. Due the resulting model mismatch, a comparison to the ground truth policy based on the predicted action distribution becomes meaningless. Instead, we compute the Euclidean EMDs between the true and the predicted next-state distributions, which we obtain by marginalizing the actions of the true/assumed transition model with respect to the true/learned policy. Figure 6c depicts the resulting prediction performance for different perturbation strengths η . The results confirm that our approach is not only less sensitive to modeling errors as argued in Section 1.1; also, the prediction variance is notably smaller than those of the intentional models. 5 C ONCLUSION In this work, we proposed a novel approach to LfD by jointly learning the latent control policy of an observed expert demonstrator together with a task-appropriate representation of the system state space. With the described parametric and nonparametric models, we presented two formulations of the same problem that can be used either to learn a global system controller of specified complexity, or to infer the required model complexity from the observed expert behavior itself. Simulation results for both countable and uncountable state spaces and a comparison to existing frameworks demonstrated the efficacy of our approach. Most notably, the results showed that our method is able to learn accurate predictive behavioral models in situations where intentional methods fail, i.e. when the expert behavior cannot be explained as the result of a simple planning procedure. This makes our method applicable to a broader range of problems and suggests its use in a more general system identification context where we have no such prior knowledge about the expert behavior. Additionally, the task-adapted state representation learned through our framework can be used for further reasoning. 14 R EFERENCES [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] B. D. Argall, S. Chernova, M. Veloso, and B. Browning, “A survey of robot learning from demonstration,” Robotics and Autonomous Systems, vol. 57, no. 5, pp. 469–483, 2009. M. P. Deisenroth, D. Fox, and C. E. Rasmussen, “Gaussian processes for data-efficient learning in robotics and control,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 37, no. 2, pp. 408–423, 2015. P. Abbeel and A. Y. Ng, “Exploration and apprenticeship learning in reinforcement learning,” in Proc. 22nd International Conference on Machine Learning, 2005, pp. 1–8. D. Michie, M. Bain, and J. Hayes-Miches, “Cognitive models from subcognitive skills,” IEE Control Engineering Series, vol. 44, pp. 71– 99, 1990. C. Sammut, S. Hurst, D. Kedzier, and D. Michie, “Learning to fly,” in Proc. 9th International Workshop on Machine Learning, 1992, pp. 385–393. P. Abbeel, A. Coates, and A. Y. Ng, “Autonomous helicopter aerobatics through apprenticeship learning,” The International Journal of Robotics Research, 2010. D. A. Pomerleau, “Efficient training of artificial neural networks for autonomous navigation,” Neural Computation, vol. 3, no. 1, pp. 88–97, 1991. C. G. Atkeson and S. Schaal, “Robot learning from demonstration,” in Proc. 14th International Conference on Machine Learning, vol. 97, 1997, pp. 12–20. P. Abbeel and A. Y. Ng, “Apprenticeship learning via inverse reinforcement learning,” in Proc. 21st International Conference on Machine Learning, 2004. A. Panella and P. J. Gmytrasiewicz, “Nonparametric Bayesian learning of other agents’ policies in interactive POMDPs,” in Proc. International Conference on Autonomous Agents and Multiagent Systems, 2015, pp. 1875–1876. A. Šošić, A. M. Zoubir, and H. Koeppl, “Policy recognition via expectation maximization,” in Proc. 41st IEEE International Conference on Acoustics, Speech and Signal Processing, 2016. B. D. Ziebart, A. L. Maas, J. A. Bagnell, and A. K. Dey, “Maximum entropy inverse reinforcement learning.” in Proc. 23rd AAAI Conference on Artificial Intelligence, 2008, pp. 1433–1438. A. Y. Ng and S. J. Russell, “Algorithms for inverse reinforcement learning.” in Proc. 17th International Conference on Machine Learning, 2000, pp. 663–670. D. Ramachandran and E. Amir, “Bayesian inverse reinforcement learning,” Proc. 20th International Joint Conference on Artical Intelligence, vol. 51, pp. 2586–2591, 2007. S. D. Parsons, P. Gymtrasiewicz, and M. J. Wooldridge, Game theory and decision theory in agent-based systems. Springer Science & Business Media, 2012, vol. 5. K. Hindriks and D. Tykhonov, “Opponent modelling in automated multi-issue negotiation using Bayesian learning,” in Proc. 7th International Joint Conference on Autonomous Agents and Multiagent Systems, 2008, pp. 331–338. R. S. Sutton and A. G. Barto, Reinforcement learning: An introduction. MIT press, 1998. U. Syed and R. E. Schapire, “A game-theoretic approach to apprenticeship learning,” in Advances in Neural Information Processing Systems, 2007, pp. 1449–1456. B. Michini and J. P. How, “Bayesian nonparametric inverse reinforcement learning,” in Machine Learning and Knowledge Discovery in Databases. Springer, 2012, pp. 148–163. C. G. Atkeson and J. C. Santamaria, “A comparison of direct and model-based reinforcement learning,” in International Conference on Robotics and Automation, 1997. C. A. Rothkopf and C. Dimitrakakis, “Preference elicitation and inverse reinforcement learning,” in Machine Learning and Knowledge Discovery in Databases. Springer, 2011, pp. 34–48. O. Pietquin, “Inverse reinforcement learning for interactive systems,” in Proc. 2nd Workshop on Machine Learning for Interactive Systems, 2013, pp. 71–75. S. Schaal, “Is imitation learning the route to humanoid robots?” Trends in Cognitive Sciences, vol. 3, no. 6, pp. 233–242, 1999. K. Dvijotham and E. Todorov, “Inverse optimal control with linearly-solvable MDPs,” in Proc. 27th International Conference on Machine Learning, 2010, pp. 335–342. E. Charniak and R. P. Goldman, “A Bayesian model of plan recognition,” Artificial Intelligence, vol. 64, no. 1, pp. 53–79, 1993. [26] B. Piot, M. Geist, and O. Pietquin, “Learning from demonstrations: Is it worth estimating a reward function?” in Machine Learning and Knowledge Discovery in Databases. Springer, 2013, pp. 17–32. [27] M. Waltz and K. Fu, “A heuristic approach to reinforcement learning control systems,” IEEE Transactions on Automatic Control, vol. 10, no. 4, pp. 390–398, 1965. [28] F. Doshi-Velez, D. Pfau, F. Wood, and N. Roy, “Bayesian nonparametric methods for partially-observable reinforcement learning,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 37, no. 2, pp. 394–407, 2015. [29] N. Meuleau, L. Peshkin, K.-E. Kim, and L. P. Kaelbling, “Learning finite-state controllers for partially observable environments,” in Proc. 15th Conference on Uncertainty in Artificial Intelligence, 1999, pp. 427–436. [30] R. B. Potts, “Some generalized order-disorder transformations,” in Mathematical Proceedings of the Cambridge Philosophical Society, vol. 48, no. 01, 1952, pp. 106–109. [31] D. Koller and N. Friedman, Probabilistic Graphical Models: Principles and Techniques. MIT press, 2009. [32] D. M. Blei and P. I. Frazier, “Distance dependent Chinese restaurant processes,” The Journal of Machine Learning Research, vol. 12, pp. 2461–2488, 2011. [33] R. M. Neal, “Markov chain sampling methods for Dirichlet process mixture models,” Journal of Computational and Graphical Statistics, vol. 9, no. 2, pp. 249–265, 2000. [34] T. S. Ferguson, “A Bayesian analysis of some nonparametric problems,” The Annals of Statistics, pp. 209–230, 1973. [35] D. J. Aldous, Exchangeability and related topics. Springer, 1985. [36] C. E. Rasmussen, “The infinite Gaussian mixture model,” in Advances in Neural Information Processing Systems. MIT Press, 2000, pp. 554–560. [37] S. Chib and E. Greenberg, “Understanding the MetropolisHastings algorithm,” The American Statistician, vol. 49, no. 4, pp. 327–335, 1995. [38] Y. Rubner, C. Tomasi, and L. J. Guibas, “A metric for distributions with applications to image databases,” in 6th International Conference on Computer Vision, 1998, 1998, pp. 59–66. Adrian Šošić is a member of the Signal Processing Group and an associate member of the Bioinspired Communication Systems Lab at Technische Universität Darmstadt. Currently, he is working towards his Ph.D. degree under the supervision of Prof. Abdelhak M. Zoubir and Prof. Heinz Koeppl. His research interests center around topics from machine learning and (inverse) reinforcement learning, with a focus on probabilistic inference, multi-agent systems, and Bayesian nonparametrics. Abdelhak M. Zoubir is professor at the Department of Electrical Engineering and Information Technology at Technische Universität Darmstadt, Germany. His research interest lies in statistical methods for signal processing with emphasis on bootstrap techniques, robust detection and estimation, and array processing applied to telecommunications, radar, sonar, automotive monitoring and biomedicine. Heinz Koeppl is professor at the Department of Electrical Engineering and Information Technology at Technische Universität Darmstadt, Germany. His research interests include Bayesian inference methods for biomolecular data and methods for reconstructing large-scale biological or technological multi-agent systems from observational data. 1 A Bayesian Approach to Policy Recognition and State Representation Learning (Supplement) Adrian Šošić, Abdelhak M. Zoubir and Heinz Koeppl F A IN M ARGINAL I NVARIANCE & P OLICY P REDICTION L ARGE S TATE S PACES z2 When we extended our reasoning to large state spaces in Section 2.3 using a reduced state space model (see Fig. S-1), we inevitably arrived at the following questions: By modeling the expert behavior only along observed trajectories, what does the resulting model imply for the remaining states of the state space? Can we still use it for predicting their local policies? The purpose of this section is to provide an in-depth discussion on the implications of this reduced modeling approach in the context of policy prediction. When investigating the above-mentioned questions from a probabilistic perspective (i.e. by analyzing the induced joint distribution of our model), it turns out that they are strongly related to what is known as marginal invariance [1] (sometimes also referred to as marginalization property or simply consistency [2]). This property states that a model is consistent in the sense that it always provides the same marginal distributions for any subset of its variables, irrespective of the initial model size. In other words, a marginally invariant policy model yields the same answer for the given trajectory points, even if we include additional states into our reduced set Se for which we have not observed any demonstrations. For our spatial models, that is, the Potts model and the ddCRP, it can be shown that this consistency property is indeed lacking (see [1] for a detailed discussion). This means that we cannot expect to get compatible results when conducting our reduced model inference on two data sets of different sizes. On the contrary, making predictions for new states would always require to rerun our Gibbs sampler on the augmented data set, including all additional states. This brings us to the following practical dilemma: imagine an on-line policy recognition scenario where we observe an expert controlling our system. After a certain period of time, we are asked to take over control, using the experience we have acquired during the observation period. Each control command, whether performed by the expert or by us, will trigger a new state transition, meaning that new data points arrive sequentially one after another. Consequently, it is impossible to decide in advance which states to include in S s2 s3 z3 s1 z4 s7 s4 z1 z5 s5 s8 z8 z7 s6 z6 z9 s9 (a) reduced state space model zt zt+1 zt+2 pz st st+1 T at at+1 st+2 T at+2 π π π α pθ Θ (b) corresponding factor graph Fig. S-1: (a) Illustration of the reduced state space model, which operates on the space Se = {s1 , s2 , . . . , sT } of visited trajectory states. Note that the underlying decision-making process is assumed to be discrete in time; the continuous gray line shown in the figure is only to indicate the temporal ordering of the trajectory states. (b) Corresponding factor graph, highlighting the circular dependence between the variables. The factors are defined by the same building blocks that are used for the finite state space model. Observed variables are shaded in gray. 2 -15 1.6 -10 1.2 0 1 5 5 -5 0 5 10 -10 7 15 -15 -10 (a) mean prediction error 6 5 0 4 5 3 10 2 15 1 0.2 15 0.4 -15 -10 0.4 10 0.6 15 0.6 0 0.8 10 8 -5 -5 EMD -5 -15 0.8 1.4 EMD -10 1 controller 1.8 -15 -5 0 5 10 15 -15 -10 (b) standard deviation -5 0 5 10 15 (c) sample partitioning 0.4 probability probability 0.6 0.3 0.2 0.1 5 10 15 0.2 0 0 0 0 0.4 20 5 number of controllers 10 action 15 s (d) inferred model complexity 20 25 8 7 6 rs 5 4 rolle 3 2 cont 1 (e) posterior sample of the local controllers Fig. S-2: Simulation results for the ddCRP model on the continuous state space task described in Section 4.1. (a) Mean values of the spatial policy prediction error. (b) Standard deviations of the spatial policy prediction error. (c) Example partitioning of the state space, based on the local controllers depicted in sub-figure (e). The expert partitioning is shown in Fig. 4 of the main paper. (d) Posterior distribution of the number of local controllers. (e) Posterior sample of the local controllers found by the model. The results in (a,b,d) are based on 100 Monte Carlo runs while (c,e) are obtained from a single posterior sample. The figures in the top row were rendered using a spatial resolution of 2000x2000. our reduced space Se and which not. A rigorous approach in the above-described sense would thus require to recalibrate the model after each state transition – a costly operation. However, it is evident that the resulting data set is naturally divided into two disjoint parts, namely the expert demonstrations and the subsequent states reached during execution of the learned policy. Clearly, transitions occurring after the learning phase should by no means affect our belief about the expert policy and, hence, they should be completely discarded from the model. The easiest way to achieve this is, indeed, to “freeze” the model after the demonstration phase and to use the learned parameters to extrapolate the gathered policy information to surrounding states. This can be done, for instance, by retaining the structure of the involved spatial prior model to compute the resulting maximum a posteriori estimates for the extrapolated indicators of the new states, based on the inferred model parameters. In the case of the ddCRP, this coincides with the nearest-neighbor estimate (see Eq. (16)), ĉnew = arg max f (dt,new ) = arg min dt,new . t∈{1,...,T } (S-1) t∈{1,...,T } Herein, ĉnew is the estimate for the indicator of the new state and dt,new denotes the distance of that state to the tth trajectory point. Now, one could argue that the comfort of retaining a finite model structure for modeling inference problems on countably infinite or uncountable state spaces comes at the cost of not being able to provide a consistent posterior predictive distribution. However, the reduced state space approach allows us to incorporate the spatial information of the data in a fairly natural manner (i.e. in the form of pairwise distances), providing an easy way to model the expert behavior. Furthermore, our results demonstrate that the reduced model is able to capture the relevant spatial properties of a policy sufficiently accurate in order to make profound predictions about unseen states (see also subsequent section). Whether there exist alternative tractable models with similar properties remains to be seen. B A DDITIONAL S IMULATION R ESULTS In this section, we provide additional simulation results for the ddCRP model on the continuous state space task described in Section 4.1. Figure S-2a visualizes the spatial EMD prediction errors of the trained model in the form of a heat map, which compares the ground truth expert policy at non-trajectory points with the mean prediction provided by our model. The test points are placed on a regular grid of size 2000x2000 centered around the origin. The required indicator variables 3 at the interpolated states are computed according to Eq. (S1). In line with our expectation, the prediction error reaches its maximum at the policy boundaries but is comparably small within each policy region, indicating a good model fit. Note that the “windmill shape” of the error can be explained as a result of the reduced state space approach in combination with the inherent asymmetry of the used data generation scheme: regions of the state space containing trajectory endings are locally underrepresented in the data set (see example trajectory in Fig. 4 in the paper); this increases the chance of assigning the end points of a trajectory to the cluster of the preceding region, resulting in a smearing of the previous cluster into the next region. Also, we can observe that the variance of the error (Fig. S-2b) reaches its maximum at the transition regions and generally grows with the distance to the supporting trajectory data, reflecting the increasing prediction uncertainty at cluster boundaries and regions far from the expert demonstrations. Both figures were computed based on the learned policy representations of 100 Monte Carlo runs. Figure S-2c illustrates an example state partitioning of one such experiment, using the inferred local controllers depicted in Fig. S-2e. The result reveals that all expert motion patterns could be identified by our model. Note, however, that the two figures correspond to a single Gibbs sample of the process, which is not representative for the whole posterior distribution. Averaging over several experiments as done in Fig. S-2a and Fig. S-2b is not possible at the sample level due to the varying dimensionality of the corresponding policy representations (i.e. the number of learned controllers). Even taking averages over samples of equal dimensionality is not meaningful due to the multimodality of the posterior distribution, which arises from the inherent symmetry of the representation (i.e. interchanging two local controllers together with their corresponding indices yields the same model). Hence, averaging samples is possible only at the prediction level. Finally, Fig. S-2d depicts the posterior distribution of the number of local controllers used by the model, which shows a pronounced peak at the true number used by the expert. C C OMPUTATIONAL C OMPLEXITY The overall computational cost of performing inference in our model depends largely on two factors: the complexity per Gibbs iteration and the mixing speed of the underlying Markov chain. Each Gibbs iteration consists of up to three stages: 1) sampling T categorical action variables {at } from the set {1, . . . , |A|}, where T is the size of the demonstration set; 2) ddCRP model: sampling NS categorical state assignments {ci } from the set {1, . . . , NS }, where NS is e ); remaining models: the number of states (i.e. |S| or |S| sampling NS categorical partition assignments {zi } from the set {1, . . . , K}, where K is the number of local controllers; 3) for non-collapsed models: sampling K Dirichletdistributed control parameters {θ k } on the (|A| − 1)simplex. Collapsing the control parameters generally improves the mixing speed of the chain (see Fig. 5 in the paper) but requires that action variables belonging to the same cluster be updated sequentially; hence, a non-collapsed strategy can be advantageous for larger data sets. Sampling the variables {at }, {θ k } and {zi } is computationally cheap because the involved action likelihoods {T (s0 | s, a)} as well as the neighborhood structure N (Potts model) and the similarity values {f (di,j )} can be pre-computed. The most demanding operation is the update of {ci }, which requires tracking the connected components of the underlying ddCRP graph. Using an appropriate graph representation, this can be done in polylogarithmic worst case time [3]. R EFERENCES [1] D. M. Blei and P. I. Frazier, “Distance dependent Chinese restaurant processes,” The Journal of Machine Learning Research, vol. 12, pp. 2461–2488, 2011. [2] C. E. Rasmussen, “Gaussian processes for machine learning.” MIT Press, 2006. [3] B. M. Kapron, V. King, and B. Mountjoy, “Dynamic graph connectivity in polylogarithmic worst case time,” in Proc. 24th Annual ACM-SIAM Symposium on Discrete Algorithms, 2013, pp. 1131–1142.
3cs.SY
Hyper-heuristics Can Achieve Optimal Performance for Pseudo-Boolean Optimisation∗ arXiv:1801.07546v1 [cs.NE] 23 Jan 2018 Andrei Lissovoi, Pietro S. Oliveto, and John Alasdair Warwicker Department of Computer Science University of Sheffield Sheffield, S1 4DP United Kingdom Abstract Selection hyper-heuristics are randomised search methodologies which choose and execute heuristics from a set of low-level heuristics. Recent research for the LeadingOnes benchmark function has shown that the standard Simple Random, Permutation, Random Gradient, Greedy and Reinforcement Learning selection mechanisms show no effects of learning. The idea behind the learning mechanisms is to continue to exploit the currently selected heuristic as long as it is successful. However, the probability that a promising heuristic is successful in the next step is relatively low when perturbing a reasonable solution to a combinatorial optimisation problem. In this paper we generalise the ‘simple’ selection-perturbation mechanisms so success can be measured over some fixed period of time τ , rather than in a single iteration. We present a benchmark function where it is necessary to learn to exploit a particular low-level heuristic, rigorously proving that it makes the difference between an efficient and an inefficient algorithm. For LeadingOnes we prove that the Generalised Random Gradient, and the Generalised Greedy Gradient hyper-heuristics achieve optimal performance, while Generalised Greedy, although not as fast, still outperforms Random Local Search. The performance of the former two hyper-heuristics improves as the number of operators to choose from increases, while that of the Generalised Greedy hyper-heuristic does not. Experimental analyses confirm these results for realistic problem sizes and shed some light on the best choices of the parameter τ in various situations. 1 Introduction Many successful applications of randomised search heuristics to real-world optimisation problems have been reported. Despite these successes, it is still difficult to decide which particular search heuristic is a good choice for the problem at hand and what parameter settings should be used. In particular, while it is well understood that each heuristic will be efficient on some classes of problems and inefficient on others [23], very little guidance is available explaining how to choose an algorithm for a given problem. The high level idea behind the field of hyper-heuristics is to overcome this difficulty by evolving the search heuristic for the problem rather than choosing one in advance (or applying several arbitrary ones until a satisfactory solution is found). The overall goal is to automate the design and the tuning of the algorithm and parameters for the optimisation problem, hence achieving a more generally applicable system. Hyper-heuristics are usually classified into two categories: selection hyper-heuristics and generation hyperheuristics [5]. The former repeatedly select from a set of low-level heuristics to create new solutions for the problem, while the latter generate new heuristics from components of existing heuristics. The low-level heuristics can be further classified as either construction heuristics, which build a solution incrementally, or perturbation heuristics, which start with a complete solution and try to iteratively improve the current solution. An extended abstract of this manuscript has appeared at the 2017 Genetic and evolutionary Computation Conference (GECCO 2017) [15]. ∗ 1 Despite the numerous successes for NP-hard optimisation problems, including scheduling [6, 7, 10], timetabling [21], vehicle routing [3], cutting and packing [16], the theoretical understanding of selection hyper-heuristics is very limited. Some insights into the behaviour of selection heuristics have been achieved via landscape analyses [17, 18, 19]. Concerning their performance, [14] presented the first runtime analysis of selection-perturbation hyper-heuristics. They considered a Simple Random hyper-heuristic [6] that at each step randomly chooses between low-level heuristics and presented an example benchmark function class, called GapPath, where it is necessary to use more than one low-level heuristic to optimise the problem. Similar results have also been presented by [11]. A comparative time-complexity analysis of selection hyper-heuristics has recently been presented by [1]. They considered several common selection mechanisms, namely Simple Random, Permutation, Random Gradient and Greedy [6, 7] and analysed their performance on the standard LeadingOnes benchmark function when using a low-level heuristic set consisting of a 1-bit flip and a 2-bit flip operator (i.e., the same set previously considered by [14]). The runtime analysis results show that the four ‘simple’ selection mechanisms have the same asymptotic runtime, while experimental trials indicate that the runtimes are practically equivalent. Recently, additive Reinforcement Learning selection was, under mild assumptions, also shown to often have asymptotically equivalent performance to Simple Random selection, including for the same problem setting (i.e., LeadingOnes selecting between 1-bit and 2-bit mutation operators) [2]. In particular, the results indicate that selection mechanisms such as additive Reinforcement Learning and Random Gradient do not learn to exploit the more successful low-level heuristics and end up having the same performance as Simple Random selection. The main idea behind the learning mechanisms considered above is to continue to exploit the currently selected heuristic as long as it is successful. Unlike construction heuristics, where iterating a greedy move on a currently successful heuristic may work for several consecutive construction steps, the probability that a promising heuristic is successful in the next step is relatively low when perturbing a reasonable solution to a combinatorial optimisation problem. In this paper, we generalise the ‘simple’ selection-perturbation learning mechanisms analysed by [1] so success can be measured over some fixed period of time τ (i.e., Exploitation Stage), rather than in a single iteration. Since the Simple Random and Permutation mechanisms do not use any feedback from the optimisation process (i.e., do not attempt to learn), we only generalise the Greedy and the Random Gradient learning mechanisms. We first show that the learning period τ of the generalised hyper-heuristics is necessary, by presenting an example function, Generalised GapPath with Traps (GGPT), inspired by the GapPath function of [14]. We initially show that the generalised hyper-heuristics are efficient on GapPath, before generalising the function such that it is necessary to learn to prefer one operator over another. Then we add points of high non-optimal fitness throughout the function, and show that the ‘simple’ mechanisms fail on the function with overwhelming probability, while proving that the generalised hyper-heuristics find the global optimum of the function with overwhelming probability, given a sufficiently large learning period τ = Ω(n3 ). Afterwards we use the LeadingOnes (LO) benchmark function to show that the hyper-heuristics can be surprisingly fast. We first give exact runtime results for the ‘simple’ mechanisms on LO, proving that 2 2 they all have expected runtime ln(3) 2 n + o(n ), confirming what was suggested by the experimental analysis of [1]. This result indicates that all the ‘simple’ mechanisms essentially choose operators at random in each iteration, and perform worse than the single operator that always flips 1-bit (i.e., RLS) which has a runtime on LO of 12 n2 . We then prove upper bounds on the same function for the Generalised Random Gradient (GRG) and Generalised Greedy (GG) hyper-heuristics. We rigorously prove that both the generalised hyperheuristics have a better runtime than RLS up to lower order terms for appropriately chosen values for the parameter τ . Furthermore, the GRG hyper-heuristic can achieve the proven best possible runtime up to lower order terms for an algorithm using just two mutation operators, 1+ln(2) n2 + o(n2 ), for τ that satisfies 4 1 the GG hyper-heuristic, we show that for a both τ = ω(n) and τ ≤ ( 2 − ǫ)n ln(n), for ǫ = Θ(1). Concerning   arctan(2) n2 + o(n2 ) ≈ 0.47797n2 + o(n2 ). learning period τ ∈ ω(n) ∩ o(n2 ), its runtime is at most ln(5) 8 + 4 The tightness of the upper bound is shown by proving a matching runtime for an ideal Greedy algorithm which performs a Decision Stage ‘for free’ in every iteration. This proves that GG is not as fast as GRG for LO, but is still faster than either of its low-level heuristics applied alone. Next we introduce a new hyper-heuristic, that we call Generalised Greedy Gradient (GGG), which com- 2 Algorithm 1 Simple Selection Hyper-heuristic [6, 7, 1] 1: Choose s ∈ S uniformly at random 2: while stopping conditions not satisfied do 3: Choose h ∈ H according to the learning mechanism 4: s′ ← h(s) 5: if f (s′ ) > f (s) then 6: s ← s′ bines the learning ideas of both the GRG and GG hyper-heuristics. In particular, it uses the Decision Stage of GG and the Exploitation Stage of GRG. We show that it is just as efficient as the other generalised hyper-heuristics on GapPath, and GGPT for τ = Ω(n3 ) w.o.p.. Furthermore it requires lower learning periods τ to match the performance of GRG for LO. Since all the presented results consider hyper-heuristics that choose between only two operators, we present an analysis of the hyper-heuristics for LeadingOnes when they are allowed to choose between k = o(n) operators. We first show that including more operators is detrimental to the performance of the ‘simple’ mechanisms. On the other hand, we prove that the performance of the GRG hyper-heuristic improves as the number of available operators to choose from increases. In particular, when using k operators, GRG is faster than the best possible performance achievable by using only k − 1 operators, for k = o(n). We conclude the paper with an experimental analysis of the hyper-heuristics for realistic problem sizes. The experiments confirm that all generalised hyper-heuristics outperform the single operators and that GRG and GGG are faster than GG on LO. For two operators, it is shown how proper choices for the parameter τ can lead to the near optimal performance, while a relationship between the performance of the hyper-heuristics and the problem size n is suggested. For hyper-heuristics that are able to choose between more than two operators, the experiments show that the performance of GRG and GGG improves with more operators with appropriate choices of τ . The performance of the GG hyper-heuristic is worsened by including more operators, yet it still outperforms RLS. The rest of the paper is structured as follows. In Section 2, we formally introduce the hyper-heuristic framework together with the ‘simple’ selection hyper-heuristics and the generalised ones. In Section 3 we present the runtime results for the ‘simple’ and generalised hyper-heuristics on the GapPath and GGPT functions. In Section 4 we analyse the ‘simple’ and generalised hyper-heuristics on the LeadingOnes benchmark function. In Section 5 we introduce and theoretically analyse the Generalised Greedy Gradient hyper-heuristic. In Section 6 we present the results for hyper-heuristics that choose between more than two operators. Section 7 presents the experimental analysis. In the conclusion we present a discussion and some avenues for future work. Compared to its conference version [15] this manuscript has been considerably extended. The results of Section 4 have been generalised for any values of τ less than ( 21 − ǫ)n ln n, for ǫ = Θ(1) and n2 for GRG and GG respectively. In general, the results have been considerably strengthened. In particular, compared to the extended abstract, in the present manuscript we prove that GRG and GGG achieve optimal runtimes for LO. Section 5 and Section 6 are completely new additions, while a more comprehensive set of experiments is included in Section 7. 2 Preliminaries Let S be a finite search space, H a set of low-level heuristics and f : S → R+ a cost function. Algorithm 1 shows the pseudocode representation for a ‘simple’ selection hyper-heuristic as used in previous theoretical analyses [1]. The following learning mechanisms have been commonly used in the literature to solve combinatorial optimisation problems [6, 7]: Simple Random, which selects a low-level heuristic independently with probability ph in each iteration (usually ph = 1/|H|, i.e., uniformly at random); Permutation, which generates a random ordering of low-level heuristics and returns them in that sequence when called by the hyper-heuristic; Greedy, which applies all available low-level heuristics in parallel and returns the best found solution; Random Gradient, which randomly selects a low-level heuristic, and keeps using it as long 3 as it obtains improvements. [1] analysed the runtime of these four ‘simple’ mechanisms1 for the LeadingOnes benchmark function, choosing between flipping either one, or two, randomly chosen bits of the bit string (H = {1BitFlip, 2BitFlip}). We derive the exact runtimes in Section 4. It was shown experimentally by [1] that all mechanisms have the same performance as just choosing low-level heuristics at random. By making a heuristic selection decision in every iteration without taking past performance into account, the ‘simple’ mechanisms do not have enough time to learn which operator is preferable at the current optimisation stage. In this paper we generalise the ‘simple’ mechanisms to allow a longer time period to decide whether a low-level heuristic is currently successful or not, aiming to maintain the intrinsic ideas of the ‘simple’ learning mechanisms while generalising sufficiently to allow learning to take place. In particular, we consider: Generalised Greedy (GG), where all low-level heuristics are tested on the same candidate solution until an improvement is found (Decision Stage). The improvement (chosen uniformly at random if there are multiple ones) is then accepted, and the corresponding operator is run for a fixed period of time τ (Exploitation Stage). Generalised Random Gradient (GRG), where a low-level heuristic is chosen uniformly at random (Decision Stage) and run for a period of fixed time τ . If an improvement is found before the end of the period, then a new period of time τ is immediately initialised (Exploitation Stage). If the chosen operator fails to provide an improvement in τ iterations, a new operator is chosen at random. 3 Learning is Necessary In this section we consider the GapPath function (GP) previously introduced by [14] as an example to show that applying multiple low-level heuristics may be necessary. We prove that the generalised hyper-heuristics are also efficient on the problem. We then generalise the GP function to make one operator useful more often than the other, and add points of very high non-optimal fitness along the path that ‘trap’ algorithms that have not learned to prefer one operator to the other. The result will be that the ‘simple’ mechanisms fail w.o.p., while the generalised hyper-heuristics can find the global optimum efficiently w.o.p.. 3.1 GapPath The GapPath function is defined as follows [14]: ( ZM(x) if Ridge(x) mod 3 = 1 GP(x) := ZM(x) + 2nRidge(x) otherwise Pn where ZM(x) := i=1 (1 − xi ), and Ridge(x) := i if x = 1i 0n−i , and 0 otherwise. The function consists of a short path which corresponds to all search points of the form 1i 0n−i . The path contains gaps where the function values are inferior to the rest of the path. Such gaps consist of all path points where i ≡ 1 (mod 3). As a result of these gaps, an algorithm that only uses either the 1BitFlip or the 2BitFlip operator will have infinite expected runtime, since it is necessary to alternate the operators in order to make progress on the path. [14] prove that the runtime of the Simple Random mechanism, initialised on the 0n bit and usingonly the 1BitFlip and 2BitFlip operators with probability p and  string 3 n2 −3n2 for any probability p ∈ (0, 1). In the following two theorems we + 3(1−p)p 1 − p respectively, is n6(1−p) show that the generalised hyper-heuristics are also efficient on GapPath when choosing between the same two operators. Theorem 1 The expected runtime of the Generalised Greedy hyper-heuristic, when initialised on the 0n bit string, for GapPath is n3 /3 + 2n2 /3 + 2τ n/3 − τ . Proof: The GP function is optimised by requiring multiple repetitions of 1-bit and 2-bit consecutive improvements. There is only one possible successful move at each point on the path and only the use of the correct operator will lead to an improvement. 1 Throughout the paper, bounds on the runtimes of the considered ‘simple’ mechanisms refer to the number of fitness evaluations performed by Algorithm 1 using these mechanisms. 4 If a 1-bit improvement is necessary, the success probability of the 1BitFlip operator is 1/n, implying n expected 1-bit mutations before an improvement is found (by standard waiting time arguments). During this time, n 2-bit mutations will be performed in parallel, as the Generalised Greedy hyper-heuristic applies both operators during the Decision Stage. When a 2-bit improvement is necessary, the success probability of the 2BitFlip operator is 1/n · 1/n · 2 (since two specific bits must be flipped, but can be chosen in either order) implying n2 /2 expected 2-bit mutations before an improvement is found. The same number of 1-bit mutations will be evaluated in parallel. After an operator has succeeded, the Generalised Greedy hyper-heuristic will deterministically apply the successful operator (on its own) for another τ iterations (the Exploitation Stage), during which no improvement can occur (due to the nature of the GP function), before starting the next Decision Stage. Initially, a 2-bit improvement is required. The expected number of fitness function evaluations needed to reach the first point on the path 110n−2 from the 0n bit string is 2 · n2 /2 = n2 , which will be followed by τ non-improving steps. The next improvement will then occur by the 1BitFlip operator after an expected 2n steps, followed by τ unsuccessful 1-bit flips. Hence, the expected time to optimise the first three bits is n2 + τ + 2n + τ = n2 + 2n + 2τ . This three bit pattern occurs a total of n/3 times before the optimum is reached, and since the global optimum is reached just before the final Exploitation Stage starts, the total expected runtime is E(TGG ) = n/3 · (n2 + 2(n + τ )) − τ = n3 /3 + 2n2 /3 + 2τ n/3 − τ .  Theorem 2 The expected runtime of the Generalised Random Gradient hyper-heuristic, when initialised on the 0n bit string, for GapPath is at most n3 /3 + 2n2 /3 + 4τ n/3 − τ . Proof: The Generalised Random Gradient hyper-heuristic chooses a mutation operator uniformly at random, and applies it for a period of τ iterations. If an improvement is produced, a new period of τ iterations using the same operator is started immediately. Let T1 and T2 respectively be the number of iterations before a 1-bit or a 2-bit improvement is constructed when it is possible to do so. If the appropriate operator i is chosen (i.e., with probability 1/2), it may succeed with probability pi in each iteration, or it may fail during all τ iterations with probability (1 − pi )τ in which case the random choice is repeated. If the other operator is chosen, τ iterations are wasted before the random choice is repeated. Combined, using qi := 1 − pi for brevity: ! ! τ X 1 1 k−1 τ kqi pi + qi (τ + E(Ti )) + (τ + E(Ti )) E(Ti ) = 2 2 k=1 ! τ X = kqik−1 p + qiτ E(Ti + τ ) + τ (1) = k=1 ∞ X j=0 = ∞ X k=1 τ X (k + jτ )qijτ +k−1 pi k=1 kqik−1 pi ! +τ + ! + τ qijτ ! τ qiτ 1 τ qiτ = + τ + . 1 − qiτ pi 1 − qiτ (2) (3) A simple rearrangement yields (1), and applying it recursively to the qijτ E(Ti + jτ ) terms yields (2). As the inner sums are contiguous, a rearrangement in (3) simplifies the expression to an expectation of a geometrically-distributed variable and a sum of an infinite geometric series. As the expected number of τ qiτ qiτ periods of time τ where the correct operator is applied but does not produce an improvement is 1−q τ , 1−q τ is i i a lower bound on the number of iterations where a correct operator is applied before a success (i.e., 1/pi ) and τ qτ τ + 1−qi τ is an upper bound on 1/pi . Substituting these bounds into Eq. (3) yields 2/pi ≤ E(Ti ) ≤ 2/pi + τ . i After an improvement is constructed, the successful operator will run for an additional τ iterations while not being able to construct the next improvement. To reach the optimum from 0n , improvements must be constructed by alternating 2-bit and 1-bit mutations n/3 times, while the final τ -iteration Exploitation Stage is unnecessary. The total expected optimisation time is therefore: n (E(T1 ) + E(T2 ) + 2τ ) − τ ≤ n3 /3 + 2n2 /3 + 4τ n/3 − τ. 3 5  3.2 Generalising GapPath Having shown that the generalised hyper-heuristics are efficient on GP, we now introduce a function class on which it is necessary for the hyper-heuristics to learn which operator to use, if they are to be efficient. We will prove that the proposed generalised hyper-heuristics outperform the ‘simple’ mechanisms. Let n be of the form n = d(2k + 1) for some d, k ∈ N. ( ZM(x) if Ridge(x) ∈ Sk GGPk (x) := ZM(x) + 2nRidge(x) otherwise where Sk = {c(2k + 1) + 1 − 2β | c, β ∈ N : c ≤ d, β ≤ k}, and ZM(x) and Ridge(x) defined as in Section 3. This function is similar to the GapPath function, but requires k consecutive 2-bit successes after the 1-bit improvement is successfully executed at search points of the form 1(c−1)(2k+1) 0n−((c−1)(2k+1)) for 0 ≤ c ≤ d. Hence learning to use 2-bit flips often leads to improved performance. We modify the GGPk function by inserting a ‘trap’ point (point of high non-optimal fitness) at a random position within each group of k 2-bit flips. These ‘trap’ points can be reached by a 1-bit mutation, while the next path point remains reachable only by a 2-bit mutation, and are local optima for both mutation operators. If a ‘trap’ point is ever constructed, the algorithm will not be able to reach the global optimum. Since there is a finite probability for any mechanism to construct a ‘trap’ point, the expected runtimes will all be infinite by the law of total probability. Hence, we consider the success probabilities for the ‘simple’ mechanisms and generalised hyper-heuristics on this modified function (denoted GGPT). Theorem 3 Starting at 0n , all of the ‘simple’ selection mechanisms will fail to find the global optimum on GGPT in finite time, with probability at least 1 − n−Ω(n) . Proof: We will show that when each mechanism is at a point from which a ‘trap’ point is accessible, it will construct the ‘trap’ point before the next path point with probability 1−O(1/n). If this holds, as there are at least n/(2k + 1) = Ω(n) points from which a ‘trap’ point is accessible, the ‘simple’ mechanisms will therefore construct a ‘trap’ point before reaching the global optimum with probability 1 − O(1/n)Ω(n) = 1 − n−Ω(n) . The Greedy mechanism applies both mutation operators in one iteration. The probability that a ‘trap’ point is constructed via a 1-bit mutation is 1/n, while the probability that the next path point is constructed is 2/n2 . If both are constructed, the mechanism accepts the ‘trap’ point as it has higher fitness. The 1/n probability that a ‘trap’ point is constructed before the next path point is therefore at least 1/n+2/n 2 = 2 1 − n+2 = 1 − O(1/n). The Permutation mechanism, following a two-bit success leading to a point from which a ‘trap’ point is accessible, will perform 1-bit and 2-bit mutations in this order. The probability that a ‘trap’ point is constructed over two iterations is thus 1/n, while the probability that the next path point is constructed over two iterations is (1 − 1/n) · 2/n2 . The probability that a ‘trap’ point is constructed before the next path 1/n 1/n 2 point is therefore 1/n+(1−1/n)2/n 2 = 1/n+2/n2 + n2 +4n+2−4/n = 1 − O(1/n). The Simple Random mechanism constructs a ‘trap’ point with probability 1/(2n), and the next path point with probability 1/n2 . The probability that a ‘trap’ point is constructed before the next path point is 1/(2n) 2 therefore at least 1/(2n)+1/n 2 = 1 − n+2 = 1 − O(1/n). The Random Gradient mechanism behaves equivalently to the Simple Random mechanism, unless it manages to construct an improvement by a two-bit mutation immediately following another two-bit improvement. The probability that an individual ‘trap’ point is skipped in this manner is 1 − 2/n2 = O(1/n), and thus the probability that the Random Gradient constructs the ‘trap’ point before the next path point is (1 − O(1/n))2 = 1 − O(1/n).  On the other hand, the following theorem shows that with sufficiently large τ , the generalised hyper-heuristics can avoid the traps w.o.p.. Theorem 4 Starting at 0n for τ = Ω(n3 ), the Generalised Random Gradient hyper-heuristic will find the kn3 4τ n + 2(2k+1) + O(n2 ) steps with probability at least global optimum of GGPT (with constant k) in at most 2k+1 6 1 − 2−Ω(n) . However, for τ = O(n2 ), the Generalised Random Gradient hyper-heuristic will fail to reach the global optimum of GGPT in finite time with probability at least 1 − 2−Ω(n) . Proof: The Generalised Random Gradient hyper-heuristic avoids making a decision inside the two-bit region if it is able to construct k−1 two-bit improvements within τ iterations each. The probability of success for a 2-bit mutation is 2/n2 ; the probability of no successes in τ steps is (1 − 2/n2 )τ and the probability of (at least) one success in a period of τ steps is this value subtracted from 1. Thus, the probability that all k−1 k − 1 two-bit improvements are found in time is 1 − (1 − 2/n2 )τ .  cn2 k−1 For τ = cn2 , where c is a constant, the probability of the required k−1 successful periods is 1 − 1 − 2/n2 = (1 − e−2c − o(1))k−1 = Θ(1), and so the probability of failing to do so is at least constant. If another random Decision Stage is performed inside the region of two-bit improvements, a ‘trap’ point is accessible via a 1-bit mutation from the point at which the decision occurs with probability at least 1/(k − 1) = Ω(1) (as traps are placed uniformly at random inside these regions), and is found by the Generalised Random Gradient 2 hyper-heuristic with probability at least 1/2 · (1 − 1/n)cn ≥ 1/4. Thus, the probability that the no ‘trap’ point is constructed in a single region of k two-bit improvements is at most a constant smaller than one, which means that over the n/(2k + 1) such regions, the probability that a ‘trap’ point is constructed is at least 1 − 2−Ω(n) . For τ = cn3 , where c is a constant, the probability that all T = (k−1)·n/(2k+1) = Θ(n) two-bit successes  cn3 T are constructed within τ iterations is at least 1 − 1 − 2/n2 = (1−e−2cn)T ≥ 1−T e−2cn = 1−e−Ω(n) by applying a union bound. Thus, with overwhelming probability, the algorithm is not trapped, and the expected optimisation time is   k n 4τ n kn3 n + 2τ + n2 + 2τ = E(TGRG | no trap) ≤ + + O(n2 ), 2k + 1 2 2k + 1 2(2k + 1) with the 2τ terms corresponding to using the wrong operator for, in expectation, one period of τ iterations at the start of the phase, and using the successful operator for τ iterations while the next improvement can only be constructed by the other operator.  The following theorem can be proven using a similar approach. Theorem 5 Starting at 0n for τ = Ω(n3 ), the Generalised Greedy hyper-heuristic will find the global optin3 2τ n + 2k+1 + O(n2 ) steps with probability at least 1 − 2−Ω(n) . mum of GGPT (with constant k) in at most 2k+1 2 However, for τ = O(n ), the Generalised Greedy hyper-heuristic will fail to reach the global optimum of GGPT in finite time with probability at least 1 − 2−Ω(n) . Proof: The Generalised Greedy hyper-heuristic avoids making a decision inside the two-bit region if and only if it can produce k − 1 two-bit improvements within τ iterations following the first two-bit improvement. Let X be a binomially-distributed random variable with parameters p = 2/n2 (the success probability of the two-bit mutation operator) and τ trials, and thus E(X) = 2τ /n2 . We note that the probability distribution of X up to k − 1 is identical to that of the number of two-bit improvements constructed during the Decision Stage, while X ≥ k − 1 corresponds to constructing all remaining k − 1 improvements. For τ = cn2 , we note that the probability of constructing exactly zero improvements during the τ 2 iterations is at least (1 − 2/n2 )cn ≥ e−2c − O(1/n2 ) = Ω(1). If another Decision Stage is performed inside the region of two-bit improvements, a ‘trap’ point is accessible via a 1-bit mutation from the point at which the decision occurs with probability at least 1/(k − 1) = Ω(1) (as traps are placed uniformly at random inside these regions), and is found by the Greedy mechanism with probability at least (1/n)/(1/n + 2/n2 ) ≥ 1/4. Thus, the probability that the Generalised Greedy hyper-heuristic does not construct a ‘trap’ point in a single region of k two-bit improvements is at most a constant smaller than one, which means that over the n/(2k + 1) such regions, the probability that a ‘trap’ point is constructed is at least 1 − 2−Ω(n) . For τ = cn3 , where c is a constant, E(X) = 2cn. Applying a Chernoff bound, we note that the probability of observing fewer than cn successes in τ steps is at most e−Ω(n) , and if n is sufficiently large, cn > k. Thus, with overwhelming probability, a decision step does not occur inside a single two-bit region, and by a union 7 bound, does not occur inside any of the n/(2k + 1) two-bit regions in the bit string. Thus, with overwhelming probability, the algorithm is not trapped, and the expected optimisation time is E(TGG | no trap) ≤  n 2τ n n3 2n + τ + n2 + τ = + + O(n2 ). 2k + 1 2k + 1 2k + 1  We point out that, if the function values were inverted such that the ‘trap’ points had optimal fitness, and the 1n bit string did not, then the generalised hyper-heuristics would fail to find any of the global optima (w.o.p), while the ‘simple’ mechanisms would succeed (w.o.p). It is not surprising that learning mechanisms fail on a function especially designed to deceive them. 4 Hyper-Heuristics Are Faster In this section we show that the generalised hyper-heuristics can outperform low-level heuristics, even when the latter are efficient for the problem at hand. We consider the LeadingOnes function, LO(x) := Pn Q i i=1 j−1 xj , which counts the number of consecutive one-bits in a bit string before the first zero-bit. It is well known that the standard (1+1)-EA and RLS algorithms on LeadingOnes have expected 2 2 2 runtimes of e−1 2 n − o(n ) and 0.5n fitness function evaluations respectively [4]. In the following we show that the generalised hyper-heuristics are more efficient. We first introduce a lower bound on the runtime of all algorithms which use only the 1BitFlip and 2BitFlip operators. Since the 1BitFlip operator has a success probability of n1 while the 2BitFlip · 2 = (2n − 2i − 2)/n2 where i = LO(x), it is easy to see that for the first n/2 leading operator of n1 · n−i−1 n ones the 2BitFlip operator is more effective, while the 1BitFlip operator is preferable afterwards. Hence, the expected runtime of an algorithm using these operators in such a way gives a trivial lower bound on all stochastic unbiased algorithms using only the same two operators. This can be easily proved following the approach used for the (1+1)-EA by [4]. Theorem 6 ([4]) The expected time needed to find the optimum of LeadingOnes given random initialisation is n 1X An−i , E(T ) = T n = 2 i=1 where An−i is the expected time needed to find an improvement given a solution with fitness i. Theorem 7 The best possible expected runtime on LeadingOnes for a stochastic, unbiased algorithm using only the 1BitFlip and 2BitFlip operators is 1+ln(2) n2 + O(n) ≈ 0.42329n2 + O(n). 4 Proof: We partition the analysis into two phases: Phase 1, where the 2BitFlip operator is used for the first half of the search, and Phase 2, where the 1BitFlip operator is used for the second half of the search. Phase 1 The 2BitFlip operator is stochastic and unbiased, so the result from Theorem 6 holds for this phase. To find the expected runtime for this phase, we can consider every point LO(x) ≥ n2 to be optimal. That n2 , we can consider, for i ≥ n/2, An−i = 0. is, while for 0 ≤ i < n/2, An−i = 2n−2i−2 Hence, we note that for Phase 1, E(T1 ) = n/2−1 n−1 n−1 1X n2 1 X 1 X n2 An−i = = 2 i=0 2 i=0 2n − 2i − 2 2 2k k=n/2 = n2 4 n−1 X k=n/2  1 n2  Hn−1 − Hn/2−1 , = k 4 8 where Hx is the xth Harmonic number, which can be bounded by ln(n + 1) + γ − 1 1 ≤ Hn ≤ ln(n + 1) + γ − , n+1 2(n + 1) and γ is the Euler-Mascheroni constant (γ ≈ 0.57722 . . . ). Hence,  3  n2 n2 · ≤ E(T1 ) ≤ ln(2) + , ln(2) · 4 2n 4 i.e., ln(2) 2 n + O(n). E(T1 ) = 4 Phase 2 The runtime for Phase 2 can be calculated using Theorem 6 with An−i = n for i ≥ n/2. Similarly to Phase 1, we state An−i = 0 for i < n/2. n/2 n−1 1 1X 1X n2 n = · n · n/2 = E(T2 ) = An−i = . 2 i=0 2 j=1 2 4 Hence, the total expected runtime is: E(T ) = E(T1 ) + E(T2 ) = ln(2) 2 1 1 + ln(2) 2 n + O(n) + n2 = n + O(n). 4 4 4  The rest of the section is structured as follows. In Subsection 4.1 we show that the ‘simple’ hyper-heuristic mechanisms all perform equivalently to Simple Random for LeadingOnes, up to lower order terms. In Subsection 4.2 we show that the generalised hyper-heuristics are much faster. 4.1 ‘Simple’ Mechanisms In this section we show that the standard ‘simple’ selection mechanisms all have the same runtime on LeadingOnes. The following theorem derives the runtime for the Simple Random mechanism. The subsequent corollary extends the result to all the other ‘simple’ mechanisms. Theorem 8 The expected runtime of the Simple Random mechanism on LeadingOnes for p ∈ (0, 1) is 1 2 2 4(1−p) ln ((2 − p)/p) n + o(n ). If p = 0 the expected runtime is infinite. If p = 1, the expected runtime is 2 0.5n . Proof: If p = 0, only the 2BitFlip operator is used. There is a finite probability of reaching the point 1n−1 0, which cannot be improved by using the 2BitFlip operator. Hence, by the law of total probability, the expected runtime is infinite. 2 If p = 1, only Pnthe 1BitFlip operator is used, resulting in exactly RLS, which has expected runtime 0.5n . E(Tp ) = 12 i=1 An−i , where An−i is the expected time needed to find an improvement given a solution with fitness i, and the algorithm is initialised with a search point chosen uniformly at random. In each iteration, the 1BitFlip operator is chosen with probability p; the 2BitFlip operator is chosen with probability 1 − p. Hence, (An−i )−1 = p · n1 + (1 − p) · 2n−2i−2 , and n2 An−i = 1 p n + (1−p)(2n−2i−2) n2 = n2 2(1 − p)(n − i − 1) + np The total expected runtime is n−1 n n2 n2 X 1 1X = 2 i=0 2(1 − p)(n − i − 1) + np 2 (2p − 2)k + (2 − p)n k=1 ! ! n + (2−p)n n2 n2 ln((2 − p)/p) 2p−2 ln + o(n2 ), = + o(1) = (2−p)n 2(2p − 2) 4(1 − p) E(T ) = 2p−2 9 (4) (5) where Equation 4 hbecomes Equation 5i via the fact that   Pn n+bn/a 1 1 + o(1) with a = 2p − 2 and b = 2 − p.  k=1 a·k+b·n = a ln bn/a When p = 0.5 (i.e., equal chance of choosing each operator in each iteration), the standard Simple Random 2 2 mechanism has expected runtime ln(3) 2 n + o(n ). The runtime improves with increasing p, hence the optimal choice is p = 1. Corollary 9 The expected runtime of the Permutation, Greedy and Random Gradient mechanisms on 2 2 LeadingOnes is ln(3) 2 n + o(n ). Proof: For the Greedy and Permutation mechanisms, let pi = 1/n + (1 − 1/n)(2n − 2i − 2)/n2 be the probability that at least one improvement is constructed in respectively one or two iterations. To upper bound the optimisation time, we note that the difference between 2/pi (i.e., the waiting time for an improvement to be constructed in terms of fitness evaluations) and the An−i waiting times used to prove Theorem 8 is at most constant, and thus the difference between these mechanisms and Simple Random expected times is limited to lower-order terms. We note that with probability at most 2/n2 , both mutations considered are improvements; in such a case, we can consider an improvement step to be made in 0 iterations. As this occurs at most a constant number of times in expectation, and the maximum waiting time for any improving step is O(n), the lower-bound differs from the upper bound by at most an O(n) term. Thus, the expected runtime of these mechanisms is also ln(3)/2 · n2 + o(n2 ). For the Random Gradient mechanism, we note that the probability that an operator, when repeated following a success, is successful again is at most 2/n. Since there are at most n improvements to be made throughout the search space, the expected number of repeats which produce an improvement is at most 2. When not repeating a successful operator, the Random Gradient mechanism behaves identically to the Simple Random mechanism. Its expected runtime is therefore at least the runtime of the Simple Random mechanism less an O(n) term, and at most the runtime of the Simple Random mechanism plus n (as there are at most n iterations where the mechanisms differ in operator selection). Thus, its expected runtime is also ln(3)/2 · n2 + o(n2 ).  4.2 Generalised Hyper-heuristics In this section we present a rigorous theoretical analysis of the generalised hyper-heuristics on LeadingOnes. We start by introducing some important tools which will be used in the analyses. Theorem 10 Wald’s Equation [22, 9] Let T be a random variable with bounded expectation and let X1 , X2 , . . . be non-negative random variables with E(Xi |T ≥ i) ≤ C. Then # " T X Xi ≤ E[T ] · C. E i=1 Theorem 11 Additive Drift Theorem [12, 20] Let {Xt }t≥0 be a Markov process over a finite set of states S, and g : S → R+ 0 a function that assigns a non-negative real number to every state. Let the time to reach the optimum be T := min{t ≥ 0 : g(Xt ) = 0}. If there exists δ > 0 such that at any time step t ≥ 0 and at any state Xt ≥ 0 the following condition holds: E(∆(t)|g(Xt ) > 0) = E(g(Xt ) − g(Xt+1 )|g(Xt ) > 0) ≥ δ, then E(T |X0 ) ≤ and E(T ) ≤ g(X0 ) δ E(g(X0 )) . δ Theorem 12 Variable Drift Theorem [13] Let (Xt )t≥0 be a stochastic process over some state space S ⊆ {0} ∪ [xmin , xmax ], where xmin > 0. Let h(x) be an integrable, monotone increasing function on [xmin , xmax ] 10 such that E(Xt − Xt+1 | Xt ≥ xmin ) ≥ h(Xt ). Then it holds for the first hitting time T := min{t | Xt = 0} that Z X0 xmin 1 E(T | X0 ) ≤ + dx. h(xmin ) xmin h(x) 4.2.1 Generalised Random Gradient The following theorem considers the Generalised Random Gradient hyper-heuristic. The theorem allows us to show that the expected runtime of the hyper-heuristic for the function is the optimal runtime that may be achieved by using two operators. This result will be highlighted in Corollary 15 and depicted in Figure 1. Theorem 13 The  expected runtime of the Generalised Random Gradient hyper-heuristic on LeadingOnes with τ ≤ 12 − ǫ n ln(n), for ǫ = Θ(1), is at most    τ τ 0.5 w 2τ + e n M (1) + e2 n (1−(j−1)/w) M 2 X n 1−j/w n   + o(n2 ) τ τ 2 j=1 (e n + e2 n (1−j/w) − 2)w where M (x) := min( nτ , x), for any w ∈ Ω(1) ∩ o  n exp(2τ /n)  . Proof: For the purpose of this proof, we partition the optimisation process into w chunks based on the value of the LeadingOnes fitness function: during chunk j, the LO value of the current solution is at least (j − 1)n/w and less than j · n/w. After all the w chunks have been completed, the global optimum, with an LO value of n, will have been found. We upper-bound the expectation of the runtime T of the Generalised Random Gradient hyper-heuristic on LO by the sum of the expected values of Tj , the runtimes on each chunk of the optimisation process, plus the times taken to begin a chunk. As our analysis Pw of E(Tj ) requires the chunk to start with a random choice of mutation operator, we bound E(T ) ≤ j=1 (E(Tj ) + E(Sj+1 )) where Sj+1 is a random variable denoting the expected number of iterations between the first solution in chunk j +1 being constructed and the following random operator choice. We will later show that with proper parameter choices, the contribution of the Sj+1 terms can be bounded by o(n2 ), and therefore does not affect the leading constant in the overall bound. Let us now consider Tj , the number of iterations the hyper-heuristic spends in chunk j. Recall that a mutation operator is selected uniformly at random, and is allowed to run until it fails to produce an improvement for τ sequential iterations. Let Nj be a random variable denoting the number of random operator choices the hyper-heuristic performs during chunk j, and Xj,1 , . . . , Xj,Nj be the number of iterations PNj Xj,k , and by applying Wald’s the hyper-heuristic runs each chosen operator for. In which case, Tj = k=1 equation (Theorem 10), using E(Xj ) to denote an upper bound on all E(Xj,k ) in chunk j: E(Tj ) = PNj k=1 E(Xj,k ) ≤ E(Nj )E(Xj ). (6) To bound E(Nj ), the expected number of times the random operator selection is performed during chunk j, we lower-bound the expected number of improvements found following the operator selection, and apply the Additive Drift Theorem [12] to find the expected number of random operator selections occurring before a sufficient number of improvements have been found to enter the next chunk. Let F1 and F2 denote the events that the 1BitFlip and 2BitFlip operators fail to find an improvement during τ iterations. For the 1BitFlip operator, this event occurs with probability P (F1 ) = (1 − 1/n)τ τ τ throughout the process, which is within [e− n − 1/n, e− n ]. For the 2BitFlip operator, recall that during chunk j, the ancestor individual has at most jn/w − 1, and at least (j − 1)n/w, one bits, and thus: τ τ P (F2 ) ≤ (1 − 2 · (1/n) · (n − (jn/w − 1) − 1)/n) ≤ e−2 n (1−j/w) , τ P (F2 ) ≥ (1 − 2(1/n)(n − (j − 1)n/w − 1)/n)  τ 2(1 − (j − 1)/w) 2τ > 1− ≥ e− n (1−(j−1)/w) − 1/n. n 11 We note that a geometric distribution with parameter p = P (F1 ) can be used to model the number of improvements that the 1BitFlip operator finds prior to failing to find an improvement for τ iterations; the expectation of this distribution is (1 − p)/p = 1/p − 1. Combined over both operators, the expected number of improvements Dj produced following a single random operator selection during chunk j, E(Dj ), is greater than:     1 2τ 1 1 1 τ −1 + − 1 ≥ e n /2 + e n (1−j/w) /2 − 1, 2 P (F1 ) 2 P (F2 ) by inserting the upper bounds on P (F1 ) and P (F2 ). We use this expectation as the drift in the Additive Drift Theorem to upper-bound E(Nj ). Recall that each chunk consists of advancing through at most n/w fitness values; as bits beyond the leading ones prefix and the first zero bit remain uniformly distributed, at most n/(2w) improvements by mutation are required in expectation. If each step of a random process in expectation contributes E(Dj ) improvements by mutation, then the expected number of steps required to complete chunk j is at most: E(Nj ) ≤ n n/(2w) ≤ τ 2τ (1−j/w) E(Dj ) n n (e + e − 2)w (7) by the Additive Drift Theorem. To bound E(Xj ), the expected number of iterations before a selected mutation operator fails to produce an improvement for τ iterations, we apply Wald’s equation: let S be the number of improvements found by the operator before it fails, and W1 , . . . , WS be the number of iterations it took to find each of those improvements; then, once selected, the 1BitFlip operator runs for: E(Xj | 1-bit) = τ + S X E(Wk ) = E(S)E(W1 | S ≥ 1, 1-bit) k=1 where τ accounts for the iterations immediately before failure, and the sum for the iterations preceding each constructed improvement. Recall that E(S) = 1/P (F1 ) − 1 by the properties of the geometric distribution, and observe that E(W1 | S ≥ 1) = E(W1 | W1 ≤ τ ) ≤ min(τ, E(W1 )). Using a waiting time argument for E(W1 ) being equal to the reciprocal of the improvement probability for the 1BitFlip operator, we get (with a similar argument for the two-bit mutation operator): E(Xj | 1-bit) ≤ τ + (1/P (F1 ) − 1) min(τ, n), E(Xj | 2-bit) ≤ τ + (1/P (F2 ) − 1) min (τ, n/(2(1 − j/w))) . Combining these conditional expectations with lower bounds on P (F1 ) and P (F2 ) yields E(Xj ) ≤ 1/2 · E(Xj | 1-bit) + 1/2 · E(Xj | 2-bit) ≤τ+ min(τ, n/(2 − 2j/w)) min(τ, n) , + τ 2τ 2(e− n − 1/n) 2(e− n (1−(j−1)/w) − 1/n) (8) which can be simplified to:   min( nτ , 1/(2 − 2j/w)) min( nτ , 1) n 2τ + E(Xj ) ≤ + −τ 2τ 2 n e n − 1/n e− n (1−(j−1)/w) − 1/n  τ  τ  τ 2τ n 2τ + O(1) + e n min , 1 + e n (1−(j−1)/w) min , (2 − 2j/w)−1 ≤ 2 n n n using a/(b − c/n) = a/b + ac/(b2 n − bc) = a/b + O(1/n), where a, b, and c are constants with respect to n, to limit the contributions of the −1/n terms in denominators to lower-order terms. Finally, we can bound the overall runtime of the hyper-heuristic. Recall that Sj denotes the number of iterations the hyper-heuristic spends in chunk j while using the random operator chosen during chunk j − 1, and as E(Sj ) ≤ max (E(Xj | 1-bit), E(Xj | 2-bit)) < 2E(Xj ) = O (n exp(2τ /n)), and since w = 12  P  w n 2 o exp(2τ j=1 E(Sj+1 ) = o(n ). Substituting the bounds (7) and (8) into (6) yields the theorem /n) , statement:   w w X X E(Nj )E(Xj ) + o(n2 ) (E(Tj ) + E(Sj+1 )) ≤  E(T ) ≤ j=1 j=1 w n2 X ≤ o(n2 ) + × 2 j=1 2τ n 2τ τ n + e min( nτ , 1) + e n (1−(j−1)/w) min τ 2τ (e n + e n (1−j/w) − 2)w  τ 0.5 n , 1−j/w  .  We can use this result to get a tight upper bound on the runtime of the simple Random Gradient mechanism. We know the bound is tight by Theorem 8. Corollary 14 The expected runtime of the Generalised Random Gradient hyper-heuristic on LeadingOnes, 1 with τ = 1 (i.e., ǫ = 21 − n ln n ), is at most ln(3) 2 n + o(n2 ). 2 Proof: We constrain w = ω(log(n)) ∩ o(n). Note that for τ = 1, we have min(τ /n, 1) = min(τ /n, 0.5/(1 − j/w)) = 1/n. For w = ω(log(n)), we have e2/w = 1 + o(1). If we plug in τ = 1 into our result, we obtain   1 1 w n2 X n2 + e n · n1 + e2 n (1−(j−1)/w) · n1  E(T ) ≤ + o(n2 ) 1 1 2 j=1 (e n + e2 n (1−j/w) − 2)w   2 1 w n X e n + e2/w · e n (1−j/w) − 2 + 4  + o(n2 ) = 1 2 2 j=1 (e n + e n (1−j/w) − 2)w   w 4 1 n X 1  + o(n2 ) + · = 2 j=1 w w e n1 + e n2 (1−j/w) − 2    exp(1/n)+2    w ln exp(2/n) X 4 n 1  + o(n2 ) =   n2 + o(n2 ) =  · 1 2 2 j=1 w e n + e n (1−j/w) − 2 2 − exp(1/n) = ln(3) 2 n + o(n2 ). 2  We can also find parameter settings leading to the best-possible runtime, up to lower order terms, using only the 1BitFlip and 2BitFlip operators, from Theorem 7. In [15], the authors looked at the parameter setting τ = cn for constant c, and hence could not prove the optimal runtime. Corollary 15 The expected runtime of the Generalised Random Gradient hyper-heuristic on LeadingOnes,  with τ that satisfies both τ = ω(n) and τ ≤ 21 − ǫ n ln(n), for ǫ = Θ(1), is at most 1 + ln(2) 2 n + o(n2 ). 4   n o(1) . exp(2τ /n) ∩ n 0.5 M ( 1−j/w ). Since we have Proof: We constrain w ∈ ω(log n) ∩ o Consider first the terms M (1) and τ = ω(n), it is easy to see that M (1) = 1. For 0.5 0.5 0.5 M ( 1−j/w ), it is important to note that for the first half of the search, M ( 1−j/w ) = 1−j/w , and in the second 13 0.5 0.5 half of the search, M ( 1−j/w ) = O(w) = no(1) (excluding the case when j = w in which M ( 1−j/w )= n o(1) ). Note that τ n 2τ /n·1/w τ n = 1/w = ω(1) and e = o(n ) = 1 + o(1). Hence:    2τ τ 0.5 w 2τ + e n M (1) + e n (1−(j−1)/w) M 2 X n 1−j/w n   + o(n2 ) E(T ) ≤ τ τ 2 j=1 (e n + e2 n (1−j/w) − 2)w    τ 2τ 0.5 w 2τ + e n + e2τ /n·1/w · e n (1−j/w) M 2 X n 1−j/w n   + o(n2 ) = τ τ 2 (1−j/w) n n 2 j=1 (e + e − 2)w    τ 2τ 0.5 (1−j/w) w 2τ M 1−j/w n2  X n + e n + e n  + o(n2 ) = τ τ 2 j=1 (e n + e2 n (1−j/w) − 2)w      2τ τ 0.5 w n + e n (1−j/w) M 2τ e 2 − 2 X 1−j/w n  1  n +2  + = τ τ τ τ 2 j=1 w e n + e2 n (1−j/w) − 2 e n + e2 n (1−j/w) − 2 + o(n2 )     τ  2τ 0.5 w n + e n (1−j/w) M 2 e X 1−j/w − 2 n  1   + o(n2 ). = τ τ 2 j=1 w e n + e2 n (1−j/w) − 2 The exponential terms will dominate the summation term (since nτ = ω(1)). When j > w2 , we note that w exp(τ /n) > exp( 2τ n (1 − j/w)) and this term will dominate the other. Vice versa for j < 2 , and at j = w/2, the two values are equal. Hence, we can split the sum into two sections:     τ  2τ 0.5 w n + e n (1−j/w) M e − 2 2 X 1−j/w 1  n   + o(n2 ) E(T ) ≤ τ τ 2 j=1 w e n + e2 n (1−j/w) − 2    ! 2τ  τ w/2−1 0.5 (1−j/w) w 2 2 X · 1−j/w n n n2  X 1 e n 1 e n +   = + τ 2τ 2 w 2w 2 w en e n (1−j/w) j=1 j=w/2+1 2 + o(n )     w/2 2 X n  1  n2 1 + ln(2) = + + o(n2 ) = n2 + o(n2 ). 4 j=1 w − j 4 4 Note that at j = w, the respective ‘dominating terms’ are exp(τ /n) and exp(2τ /n(1 − w/w)) = 1, and 0.5 ) = nτ < 12 ln(n). Hence, exp(τ /n) will dominate.  M ( 1−j/w 4.2.2 Generalised Greedy The following results regarding the runtime of the Generalised Greedy hyper-heuristic can be proved using similar techniques and calculations to those used in the analysis of the Generalised Random Gradient hyperheuristic but applying the Variable Drift Theorem [13] instead of the Additive Drift Theorem. To simplify the presentation of the proofs, we will use 2 as a bound on the expected increase in fitness value following a successful mutation throughout the process. As the bits following the first zero-bit in any individual remain uniformly distributed throughout the process, this expectation would be correct if the bit string was of infinite length. We note that the law of total expectation can be used to prove that this overestimation will only affect lower-order terms in the derived runtimes, e.g. by using that the free-riders are overwhelmingly unlikely to span to the end of the bit string while the parent individual has fitness at most n − log2 n, and that a trivial upper bound for Generalised Greedy on the last k ≤ n bits is k(2n + τ ) = o(n2 ). We begin by stating a lemma on the expected time and progress for a combined Decision and Exploitation Stage. 14 Lemma 16 Let i = LeadingOnes(x(t) ) < n − 1, and Y (t) = n − i be the distance of the Generalised Greedy hyper-heuristic’s current solution at the start of the t’th Decision Stage to the LeadingOnes optimum, and let τ = o(n2 ). Then, E(Y (t) − Y (t+1) | Yt ≥ 2) = 2 · τ · (5n2 − (8i + 8)n + 4(1 + i)2 ) + 2 − o(1), n2 (3n − 2i − 2) and in expectation, the next Decision Stage begins after τ+ 2n2 3n − 2i − (4 − 2(i+1) n ) fitness evaluations. Proof: We look at the expected number of fitness evaluations for the Decision and Exploitation Stage, given the starting position LO(x) = i. During the Decision Stage, the hyper-heuristic will run both operators until one of them is successful (i.e., makes an improvement in the fitness). The expected number of fitness evaluations for this to happen is given by:    −1 1 2n − 2i − 2 E(TDSi ) = 2 · 1 − 1 − 1− n n2 2n2 2n3 = . = 3n2 − 2in + 2i − 4n + 2 3n − 2i − (4 − 2(i+1) ) n The probability of the Decision Stage choosing each operator, given by the ‘First Hit Probability’ is 1/n (2n−2i−2)/n2 n 2n−2i−2 1/n+(2n−2i−2)/n2 = 3n−2i−2 for the 1BitFlip operator and 1/n+(2n−2i−2)/n2 = 3n−2i−2 for the 2BitFlip operator. It is possible for both operators to succeed in one iteration; for our analysis, we note that this = O(1) times throughout the optimisation process, and opt to ignore happens an expected O(n2 )· n1 · 2n−2i−2 n2 any progress made by such Decision and Exploitation Stages, accounting for this by adding a lower-order O(τ + n) term to the expected runtime. In the Exploitation Stage, the operator which succeeded during the Decision Stage runs for τ steps. Throughout the two stages, the function value will increase. We can upper-bound the total increase by keeping i constant throughout (i.e., using the value from the Decision Stage), and lower-bound it by applying a high-probability bound on the number of observed LeadingOnes improvements. The highest success 2 2 probability occurs when using the 2BitFlip operator at i = 0; i.e 2n−2 n2 < n . Since τ = o(n ), we can use Chernoff bounds to bound the number of successes in τ steps as o(n) with probability 1 − 2−Ω(n) (i.e., the probability of Ω(n) successes in τ steps is at most 2−Ω(n) ). Hence, we can bound the progress from below by considering i + o(n). The probability of each operator being chosen will remain the same, since this is based on the original value of i at the Decision Stage. Hence, the expected progress of the Exploitation Stage in τ iterations is at most   1 2n − 2i − 2 2n − 2i − 2 n · + · 2·τ · 3n − 2i − 2 n 3n − 2i − 2 n2 2 · τ · (5n2 − (8i + 8)n + 4(1 + i)2 ) = n2 (3n − 2i − 2) and at least     1 2n − 2(i + o(n)) − 2 2n − 2i − 2 n · + · 2·τ · 3n − 2i − 2 n 3n − 2i − 2 n2 2 2 2 · τ · (5n − (8i + 8)n + 4(1 + i) ) − o(1). = n2 (3n − 2i − 2)  using 2 to bound the expected fitness change of an accepted mutation. 15 Summing the expected progress and expected number of fitness evaluations performed in both stages yields the Lemma statement. We further note that for LO(x) = n − 1, the decision step takes an expected 2n iterations and will conclude the optimisation process.  As the number of iterations spent in the decision step is not deterministic and not identically distributed over the optimisation process, we cannot directly apply the Variable Drift Theorem [13] to bound the expected runtime for the Generalised Greedy hyper-heuristic. However, we can upper bound the runtime through an application of Wald’s Equation (Theorem 10). By splitting the analysis into w chunks, we can upper bound the expected times for a Decision and Exploitation Stage within each chunk. We will then use the Variable Drift Theorem to bound the expected number of Decision and Exploitation Stages required to optimise each segment, and combine the two results to upper bound the total expected runtime. The significance of the following Theorem will be highlighted in Corollary 19 and depicted in Figure 1. Theorem 17 The expected runtime of the Generalised Greedy hyper-heuristic on LeadingOnes with τ = o(n2 ) is at most     Z kn w X w 2w 1 τ  di + o(n2 ) n + 2 2 (k−1)n 2τ ·(5n −(8i+8)n+4(1+i) ) 3w − 2k n +2 2 w k=1 n (3n−2i−2)    2 for any w = o min n, nτ . Proof: Let LeadingOnes(x) = i denote the current state. We divide the analysis into w chunks of length 2 n/w (for w = o( nτ )). We can bound the expected time for a Decision and Exploitation Stage (using the result from Lemma 16) in the kth chunk, where (k − 1)n/w ≤ i ≤ kn/w − 1, by   τ 2n2 2w   +τ ≤ · n. + 3w − 2k n 3n − 2i − 4 − 2(i+1) n We can make this claim since we know w = o(n). Within each chunk, we will use the Variable Drift Theorem to bound the number of expected Decision   2w and Exploitation Stages, by looking at the drift that happens in a ‘D+E’ Stage, i.e., at most 3w−2k + nτ · n steps. We note that there may be some minor overlap between chunks, although at most, this will result in the addition of τ · w = o(n2 ) iterations throughout the search. We have seen that, E(Yt − Yt+1 | Yt ) = 2 · τ · (5n2 − (8i + 8)n + 4(1 + i)2 ) + 2 − o(1) = h(n − i) = h(x). n2 (3n − 2i − 2) We consider Xt = 0 to be the end of the chunk. Let xmin = 1 represent the point kn w − 1, and we note xmin n = O( ). that h(x ) τ min Hence, by the Variable Drift Theorem, the expected runtime of the kth chunk is   τ 2w n· + E(Tk ) ≤ 3w − 2k n     Z kn w −1 xmin  1   + o(1) di + 2τ ·(5n2 −(8i+8)n+4(1+i)2 ) (k−1)n h(x min ) + 2 w n2 (3n−2i−2)  Z kn  w τ 1 2w n di + O(max{τ, n}). + ≤ 2 2 (k−1)n 2τ ·(5n −(8i+8)n+4(1+i) ) 3w − 2k n +2 w n2 (3n−2i−2) 16 The total expected runtime, by Wald’s equation will be at most equal to the sum of expected  the   runtimes n2 of each chunk, plus some lower-order terms amounting to at most O(max{τ, n}) · o min n, τ = o(n2 ). Thus, ! w X E(T ) ≤ E(Tk ) + o(n2 ). k=1  The upper bound delivered by the theorem holds for any subquadratic value of τ . This will indicate that the Generalised Greedy hyper-heuristic is not very sensitive to the parameter τ for LeadingOnes (as seen in Corollary 19). As a result, the parameter should be easy to set in practice as confirmed by experiments in Section 7. We can now use this result to tightly upper bound the runtime of the simple Greedy mechanism (when τ = 0, the two mechanisms act equivalently). We know this bound is tight by Corollary 9. Corollary 18 For τ = 0, the expected runtime of the Generalised Greedy hyper-heuristic is at most ln(3) 2 n + o(n2 ). 2 Proof: We constrain w ∈ ω(1) ∩ o(n). Inserting the relevant parameters into the equation will give:     Z kn w X w 2w 1 τ  di + o(n2 ) E(T ) ≤ n + 2 2 (k−1)n 2τ ·(5n −(8i+8)n+4(1+i) ) 3w − 2k n +2 w k=1 n2 (3n−2i−2) !   kn Z w X w 1 2w n = di + o(n2 ) (k−1)n 2 3w − 2k w k=1  w  X ln(3) 2 1 2 + o(n2 ) = n + o(n2 ) =n · 3w − 2k 2 k=1 for w = ω(1).  We can also find parameter settings leading to the best runtime that can be achieved for the Generalised Greedy hyper-heuristic. Corollary 19 For τ ∈ ω(n) ∩ o(n2 ) the expected runtime of the Generalised Greedy hyper-heuristic is at most   ln(5) arctan(2) n2 + o(n2 ). + 8 4 Proof: We constrain w = o(n). For τ ∈ ω(n) ∩ o(n2 ), we have: τ  2w τ τ + = +o . 3w − 2k n n n τ  2τ · (5n2 − (8i + 8)n + 4(1 + i)2 ) 2τ (5n2 − 8in + 4i2 ) . + 2 = + o n2 (3n − 2i − 2) n2 (3n − 2i − 2) n 17 Hence, we can simplify the expected runtime of the hyper-heuristic:     Z kn w X w 2w 1 τ  E(T ) ≤ di + o(n2 ) + n 2 2 (k−1)n 2τ ·(5n −(8i+8)n+4(1+i) ) 3w − 2k n + 2 2 w k=1 n (3n−2i−2) ! Z kn w 2 X w n (3n − 2i − 2) = τ di + o(n2 ) (k−1)n 2τ (5n2 − 8in + 4i2 ) w k=1 !   Z kn w 2 X w n 3n − 2i − 2 n2 1 1 2 = di + o(n ) = ln(5) + arctan(2) + o(n2 ) (k−1)n 5n2 − 8in + 4i2 2 2 4 2 w k=1   ln(5) arctan(2) = n2 + o(n2 ). + 8 4  We now analyse an ‘ideal’ algorithm which will provide a theoretical lower bound for the Generalised Greedy hyper-heuristic. This hyper-heuristic is sped-up by getting the result of the Decision Stages for ‘free’ in every iteration, and uses this result to decide which operator to apply. Theorem 20 The ideal greedy algorithm which performs the Decision Stage ‘for free’ in every iteration has runtime:   ln(5) arctan(2) n2 + o(n2 ). + E(T ) = 8 4 Proof: The probability of the Decision Stage choosing each operator is 2 (2n−2i−2)/n 1/n+(2n−2i−2)/n2 1/n 1/n+(2n−2i−2)/n2 = n 3n−2i−2 for 2n−2i−2 3n−2i−2 for the 2BitFlip operator. It is possible for both = the 1BitFlip operator and operators to succeed in one iteration; for our analysis, we note that this happens an expected O(n2 ) · n1 · 2n−2i−2 = O(1) times throughout the optimisation and we constrain this to an o(n2 ) term. Using Theorem n2 6, we have: −1 n−1  n 1 X 1 2n − 2i − 2 2n − 2i − 2 E(T ) = · · + · 2 i=0 3n − 2i − 2 n 3n − 2i − 2 n2   n−1 ln(5) arctan(2) 1 X (3n − 2i − 2)n2 n2 + o(n2 ). = + = · 2 i=0 (2n − 2i − 2)2 + n2 8 4  Hence, the upper bound provided in Corollary 19 is tight. 5 A New Hyper-heuristic: Generalised Greedy Gradient We now consider a new mechanism, called Generalised Greedy Gradient (GGG), which combines the Decision Stage idea of the Generalised Greedy hyper-heuristic i.e., where all operators are run in parallel and the first to make a fitness improvement is chosen, and applies this operator choice to the gradient-based Exploitation Stage of the Generalised Random Gradient hyper-heuristic i.e., the chosen operator is run for a period of τ steps, and each fitness improvement resets the period of τ . The idea is to combine the learning aspects of the two hyper-heuristics to create a hyper-heuristic that chooses the best operator and exploits this choice. In this section we will prove that the Generalised Greedy Gradient hyper-heuristic can solve the GapPath and GGPT efficiently in a similar way to GRG and GG. We also show that the GGG hyper-heuristic can achieve the same optimal performance on LeadingOnes as GRG by using shorter learning periods τ . 5.1 GapPath and GGPT We first introduce runtime results for the GGG hyper-heuristic on the GapPath and GGPT functions considered in Section 3, which show that the hyper-heuristic can learn to use a given operator in a similar 18 way to the other generalised hyper-heuristics. Theorem 21 Starting at 0n , the expected runtime of the Generalised Greedy Gradient hyper-heuristic on GapPath is n3 2n2 2τ n + + − τ. 3 3 3 Proof: The GGG hyper-heuristic will act equivalently to GG on GapPath; that is, it will run the Greedy operator Decision Stage and deterministically choose the unique operator which will give a success. Then the mechanism will waste τ iterations, since it cannot enact any improvements in this Exploitation Stage with the selected operator. Hence, the runtime is equivalent to the result from Theorem 1.  Theorem 22 Starting at 0n for τ = Ω(n3 ), the Generalised Greedy Gradient hyper-heuristic will find the 3 2τ n 2 + (k+1)n global optimum of GGPT (with constant k) in at most 2k+1 2(2k+1) + O(n ) steps with probability at least 1 − 2−Ω(n) . However, for τ = O(n2 ), the Generalised Random Gradient hyper-heuristic will fail to reach the global optimum of GGPT in finite time with probability at least 1 − 2−Ω(n) . Proof: Initially, a 1BitFlip improvement is necessary before the first 2BitFlip flip. For τ = Ω(n3 ), similarly to Theorem 5, this will take time 2n + τ to account for the wasted iterations. The GRG hyper2 heuristic will then run the Greedy Decision Stage to choose the 2BitFlip operator in time 2 · n2 = n2 . The Exploitation Stage will continue with this operator to find the remaining necessary 2BitFlip improvements and avoid the ‘trap’ point with probability 1 − 2−Ω(n) , as per Theorem 4. The time for the remaining k − 1 2 improvements will be (k−1)n + τ to account for the wasted iterations at the end. 2 n times to account for each run of 2BitFlip flips necessary to find This process must be repeated 2k+1 the global optimum. Hence, the expected running time will be   k−1 2 n 2 2n + τ + n + n +τ 2k + 1 2 which gives the result. However, if τ = O(n2 ), a similar argument to Theorem 4 can be made. That is, for τ = cn2 , where  cn2 k−1 = c is a constant, the probability of the required k − 1 successful periods is 1 − 1 − 2/n2 (1 − e−2c − o(1))k−1 = Θ(1), and so the probability of failing to do so is at least constant. If another random Decision Stage is performed inside the region of two-bit improvements, a ‘trap’ is accessible via a 1-bit mutation from the point at which the decision occurs with probability at least 1/(k − 1) = Ω(1) (as traps are placed uniformly at random inside these regions), and is found by the Random Gradient mech2 anism with probability at least 1/2 · (1 − 1/n)cn ≥ 1/4. Thus, the probability that the no ‘trap’ point is constructed in a single region of k two-bit improvements is at most a constant smaller than one, which means that over the n/(2k+1) such regions, the probability that a ‘trap’ point is constructed is at least 1−2−Ω(n) .  We have seen that the Generalised Greedy Gradient hyper-heuristic performs similarly to the two previous generalised hyper-heuristics on the GapPath series of functions. By learning to favour 2-bit flips it performs efficiently. 5.2 LeadingOnes We now prove that the Generalised Greedy Gradient mechanism can lead to improved performance on the LeadingOnes benchmark function compared to the Generalised Random Gradient hyper-heuristic. The result will be highlighted in Corollary 25 and a comparative performance with the other hyper-heuristics will be depicted in Figure 1. Theorem 23 The runtime of the Generalised Greedy Gradient hyper-heuristic on LeadingOnes, with τ ≤  1 2 − ǫ n ln(n), ǫ = Θ(1), is at most X w 3w − 2j + 2 n2 · E(T ) ≤ o(n2 ) + 2 3w − 2j j=1 19   τ 2τ  0.5 · (3w − 2j) + w · e n · M (1) + (2(w − j + 1)) · e n (1−(j−1)/w) · M ( 1−j/w )     2τ τ w w · e n + 2(w − j) · e n (1−j/w)   n where M (x) := min( nτ , x), for w = o exp(2τ /n) . 2w + τ n Proof: We partition the optimisation process into w chunks based on the value of the LeadingOnes fitness function: during chunk j, the LO value of the current solution is at least (j − 1)n/w and less than j · n/w. We follow the proof for the Generalised Random Gradient on LeadingOnes, in which we upper bounded the final runtime by the sum of the expected values of Tj , the runtime of each chunk of the process, plus the times taken P to begin a chunk. Since the analysis of E(Tj ) requires an operator choice, we bound the runtime E(T ) ≤ w j=1 (E(Tj ) + E(Sj+1 )), where Sj+1 is a random variable denoting the expected number of fitness evaluations between the first solution in chunk j + 1 being constructed and the first operator decision of  1 chunk j beginning. We note again (with the same parameter combinations i.e., τ ≤ − ǫ n ln(n), ǫ = Θ(1), 2  n 2 w = o exp(2τ /n) ), the contribution of the Sj+1 terms can be bounded by o(n ). We let Nj denote the number of operator decisions within chunk j, and Xj,1 , . . . , Xj,NJ the number of fitness function evaluations within the Decision Stage and the Exploitation Stage of the chosen operator. PNj Xj,k , and by Wald’s equation, using E(Xj ) to denote an upper bound on all E(Xj,k ) in Then Tj = k=1 chunk j, E(Tj ) ≤ E(Nj )E(Xj ). We can upper-bound E(Nj ), the number of Decision Stages in chunk j, by lower-bounding the expected number of improvements found from the Decision and Exploitation Stage of the chosen operator, and using the Additive Drift Theorem to find the expected number of operator selections required to enter the next chunk. Recall from the proof of Theorem 13 that, denoting F1 and F2 as the events that the 1BitFlip and 2BitFlip operators fail to find an improvement during τ iterations: τ e− n − τ 1 ≤ P (F1 ) ≤ e− n ; n 2τ e− n (1−(j−1)/w) − 2τ 1 ≤ P (F2 ) ≤ e− n (1−j/w) . n After each Decision Stage, an operator will be chosen. We use the First Hit Probability to look at the probability of each operator being chosen: P (C1 ) = Note that in chunk j, with 1 n + (j−1)n w 1 n 2(n−i−1) n2 = −1≤i≤ n ; 3n − 2i − 2 jn w P (C2 ) = 2n − 2i − 2 . 3n − 2i − 2 − 1, we can bound the two probabilities: w w ≤ P (C1 ) ≤ ; 3w − 2j + 2 3w − 2j 2w − 2j 2w − 2j + 2 ≤ P (C2 ) ≤ . 3w − 2j 3w − 2j + 2 We look at finding a lower bound for E(Dj ), the expected number of improvements Dj produced following an operator Decision and Exploitation Stage. Since we are looking for a lower bound, we use the lower bound for the probability of choosing each operator, and an upper bound for the number of improvements given the chosen operator. Note there is 1 improvement from the Decision Stage.     1 1 − 1 + P (C2 ) · −1 E(Dj ) ≥ 1 + P (C1 ) · P (F1 ) P (F2 )     w 2w − 2j 1 1 ≥1+ − 1 + − 1 · 3w − 2j + 2 exp(− nτ ) 3w − 2j exp(− 2τ n (1 − j/w)) τ w 2(w − j) 2τ (1−j/w) · en + ·en ≥ 3w − 2j + 2 3w − 2j τ 2τ 2(w − j) w · en + · e n (1−j/w) . ≥ 3w − 2j + 2 3w − 2j + 2 20 In each chunk, in expectation, we require n/(2w) fitness improvements to exit the chunk. If each random operator decision leads to more E(Dj ) improvements, by the Additive Drift Theorem, the expected number of steps required to complete chunk j, E(Nj ) satisfies: E(Nj ) ≤ ≤ n/(2w) n ≤ · E(Dj ) 2w 1 w 3w−2j+2 n(3w − 2j + 2) · 2w  τ n ·e + 2(w−j) 3w−2j+2 2τ · e n (1−j/w)  . 2τ (1−j/w) 1 τ n w · e + 2(w − j) · e n We now look at bounding E(Xj ), an upper bound on the number of fitness function evaluations for a Decision and Exploitation Stage within chunk j. The worst case expected time for the duration of the Decision Stage in chunk j is  −1   2(w − j) 2n2 w 1 1− = E(TDSj ) ≤ 2 · 1 − 1 − n nw (3w − 2j)n − 2(w − j) 2nw = + o(n). 3w − 2j The small order term will be omitted for brevity, but note that it makes no difference to the leading constant on the asymptotically significant term. We can also upper-bound E(Xj |C{1,2} ), the expected iterations before a selected operator fails to produce an improvement within τ iterations. Using, for each operator, E(Xj |C1 ) ≤ τ + (1/P (F1 ) − 1) · min(τ, n) E(Xj |C2 ) ≤ τ + (1/P (F2 ) − 1) · min(τ, 0.5n/(1 − j/w)). Hence: E(Xj ) ≤ E(TDSj ) + P (C1 ) · E(Xj |C1 ) + P (C2 ) · E(Xj |C2 ) 2w − 2j + 2 min(τ, n/(2 − 2j/w)) w min(τ, n) 2nw + +τ + · · τ 3w − 2j 3w − 2j e− n − 1/n 3w − 2j + 2 e− 2τ n (1−(j−1)/w) − 1/n 2w − 2j + 2 min(τ, n/(2 − 2j/w)) w min(τ, n) 2nw . + +τ + · −τ · − 2τ (1−(j−1)/w) ≤ n 3w − 2j 3w − 2j e 3w − 2j − 1/n − 1/n e n ≤ which can be simplified to E(Xj ) ≤ o(n) + n · 3w − 2j    τ  τ τ τ 2τ 0.5 (1− j−1 ) n n w 2w + (3w − 2j) + we min min . , 1 + (2w − 2j + 2)e , n n n 1 − j/w Finally, we bound the overall expected runtime of the hyper-heuristic. We have:   w w X X (E(Tj ) + E(Sj+1 )) ≤  E(Nj )E(Xj ) + o(n2 ) E(T ) ≤ j=1 and hence j=1 X w 3w − 2j + 2 n2 · E(T ) ≤ o(n ) + 2 3w − 2j j=1 2  2τ τ 2w + nτ (3w − 2j) + we n min( nτ , 1) + (2(w − j + 1))e n (1−    τ 2τ w w · e n + 2(w − j) · e n (1−j/w) j−1 w ) 0.5 ) min( nτ , 1−j/w    .  When we set τ = 0, the hyper-heuristic reduces to the simple Greedy mechanism, and the following corollary provides a tight runtime upper bound. We know it is tight from Corollary 9. 21 Corollary 24 When τ = 0 (i.e., ǫ = heuristic is at most 1 2 ), the expected runtime of the Generalised Greedy Gradient hyperln(3) 2 n + o(n2 ). 2 Proof: We constrain w = ω(1) ∩ o(n2 ). When τ = 0, we have   w w n2 X 2(3w − 2j + 2) 2w n2 X 3w − 2j + 2 = · · · E(T ) ≤ 2 j=1 3w − 2j w (w + 2(w − j)) 2 j=1 (3w − 2j)2 = ln(3) 2 n + o(n2 ). 2  The following corollary shows that we can find parameter values such that the GGG hyper-heuristic can match the optimal performance of the GRG hyper-heuristic (Corollary 15) with the best possible runtime from Theorem 7. Corollary 25 For τ that satisfies both τ = ω(n) and τ ≤ ( 21 − ǫ)n ln(n), for ǫ = Θ(1), the expected runtime of the Generalised Greedy Gradient hyper-heuristic is at most 1 + ln(2) 2 n + o(n2 ). 4   n exp(2τ /n) . 0.5 Consider first the terms M (1) and M ( 1−j/w ). Since we have τ = ω(n), we have nτ = ω(1); it is 0.5 ), it is important to note that for the first half of the search, easy to see that M (1) = 1. For M ( 1−j/w 0.5 0.5 0.5 M ( 1−j/w ) = 1−j/w , and in the second half of the search, M ( 1−j/w ) = O( nτ ) = O(ln n) for any constant 0.5 τ c > 0 (there is a special case when j = w in which M ( 1−j/w ) = n = O(ln n)). Note also that nτ = ω(1), e2τ /n·1/w = o(n1/w ) = 1 + o(1), 3w−2j+2 3w−2j = 1 + o(1). Proof: We constrain w ∈ ω(ln n) ∩ o Hence, the runtime will become: E(T ) ≤ o(n2 ) +   2w + τ n w  n2 X (1 + o(1))· · 2 j=1  2τ τ  0.5 · (3w − 2j) + w · e n + (2(w − j + 1)) · e2τ /n·1/w e n (1−j/w) · M ( 1−j/w )    τ 2τ w w · e n + 2(w − j) · e n (1−j/w) n2 · = o(n2 ) +  2 w  X 2w +   τ 2τ 0.5 · (3w − 2j) + w · e n + (2(w − j + 1)) · e n (1−j/w) · M ( 1−j/w )     2τ τ n + 2(w − j) · e n (1−j/w) w w · e j=1 w  n2 X 1 = o(n2 ) + · · 2 j=1 w ! 2τ τ 0.5 ) w · e n + 2(w − j + 1) · e n (1−j/w) · M ( 1−j/w 2w + nτ · (3w − 2j) + τ τ 2τ 2τ w · e n + 2(w − j) · e n (1−j/w) w · e n + 2(w − j) · e n (1−j/w) ! 2τ τ 0.5 w  w · e n + 2(w − j + 1) · e n (1−j/w) · M ( 1−j/w )  n2 X 1 2 · · . = o(n ) + 2τ τ 2 j=1 w w · e n + 2(w − j) · e n (1−j/w) τ n 22 Runtime (/n2 ) 0.60 GG GRG GGG RLS 0.50 2Opt 0.40 0 5 10 15 20 25 30 35 40 45 50 τ (/n) Figure 1: The leading constants in the theoretical upper bounds on the average number of fitness function evaluations required by the Generalised Greedy, Generalised Random Gradient, and Generalised Greedy Gradient hyper-heuristics to find the LeadingOnes optimum (w = 100, 000). Note that the exponential terms will dominate the summation term (since nτ = ω(1)). When j > w2 , we note that w · exp(τ /n) = ω(2(w − j + 1) · exp( 2τ n (1 − j/w))) and this term will dominate the other. Vice versa for j < w2 . We consider j = w/2 as a special case. ! τ 2τ 0.5 w  2 X w · e n + 2(w − j + 1) · e n (1−j/w) · M ( 1−j/w )  1 n · · E(T ) ≤ o(n2 ) + τ 2τ 2 j=1 w w · e n + 2(w − j) · e n (1−j/w)   2τ w/2−1 0.5 n (1−j/w) · 2 X e 1 2(w − j + 1) n  1−j/w  · · · = o(n2 ) + 2τ 2 w 2(w − j) n (1−j/w) e j=1   2τ τ w 2 2 X n n n  (2w + 2)e 1 e  n + · · · τ + 2τ 2w 2 w en 2w · e n j=w/2+1     w/2−1 w 2 2 2 X 1 X n 0.5  n n  1 = o(n2 ) + + · · + · 2 w 1 − j/w 2w 2 w j=1 j=w/2+1 = since 2(w−( w 2 )+1) 2(w−( w 2 )) = w/2  X n2 · 4 j=1 2w+2 2w 1 w−j  + n2 + o(n2 ) = 4 = 1 + o(1).  1 + ln(2) 4  n2 + o(n2 ).  Figure 1 shows the relevant theoretical upper bounds for the Generalised Greedy, Generalised Random Gradient and Generalised Greedy gradient hyper-heuristics from Theorem 13, Theorem 17, and Theorem 23. The results for the Generalised Greedy Gradient are better than the results for the Generalised Random Gradient at each value of τ , although they are essentially indistinguishable within the context of Figure 1. The two hyper-heuristics seem to quickly tend towards the optimal results of Corollary 15 and Corollary 25, and this would be seen by considering τ values that satisfy both τ = ω(n) and τ ≤ ( 12 −ǫ)n ln(n), for ǫ = Θ(1). 23 6 Increasing the Choice of Low-level Heuristics Runtime analyses of hyper-heuristics are easier if the algorithms can only choose between two operators. However, in realistic contexts, hyper-heuristics have to choose between many more operators. In this section, we consider the previously analysed generalised hyper-heuristics, yet extend the set H of low-level heuristics to be of size k = o(n) i.e., |H| = k. We extend upon the previous analysis by considering the k operators as k different mutation operators, each flipping between 1 and k indistinct bits uniformly at random respectively. This would more accurately represent hyper-heuristic approaches employed for real-world problems, as opposed to setting k = 2 for the purposes of the analysis. As before, we consider the LeadingOnes benchmark function. We will rigorously show that the performance of the ‘simple’ mechanisms deteriorates as the number of operators (k) increases. On the other hand, we prove decreasing upper bounds on the runtime of the Generalised Random Gradient hyper-heuristic as the number of operators increases. Since the Decision Stage of the Generalised Greedy hyper-heuristic (and the Generalised Greedy Gradient) hyper-heuristic makes the analysis very complex, we present an experimental analysis of these hyper-heuristics in Section 7. We first derive the best possible runtime achievable by any hyper-heuristic using k = o(n) operators. Before we prove this result we introduce the following two helpful lemmata. Lemma 26 The probability of improvement from an operator which flips m indistinct bits in a bit-string on the LeadingOnes benchmark function, at the state LO(x) = i, is m−1  n−i−1 1 + O(n−2 ). P (impm ) = m · · n n Proof: In the context of the LeadingOnes benchmark function, the way to make an improvement is to flip the first 0-bit after the leading 1-bits, whilst keeping the prefix leading 1-bits unflipped. Although it is possible to make improvements by flipping and re-flipping the same bit in some combination (with probability Θ( n12 )), the operators are likely to make a fitness improvement by flipping the first 0-bit (with probability 1/n, which can occur within any of the m bit-flips), and using the remaining m − 1 flips within the suffix )m−1 ). Hence we can say that the probability of an improvement when n − i − 1 bits (with probability ( n−i−1 n flipping k bits is  m−1 1 n−i−1 P (impm ) = m · · + O(n−2 ). n n  We can leave the formula in this state since all analyses will consider the use of the 1BitFlip operator. Since this always has an improvement probability of 1/n on LeadingOnes, any lower-order terms in other operators will not affect the leading constants if it is chosen sufficiently often. We also note that through a simple calculation, the 1BitFlip operator is always the best choice in the second half of the search space n 2 ≤ i < n. Lemma 27 Consider two indistinct bitflip operators flipping a and b bits respectively, with b > a. Then operator a outperforms b (excluding i = n − 1) when  1/(b−a) ! b − 1. i<n 1− a This follows simply from Lemma 26. In particular, an operator flipping m bits outperforms an operator n flipping m − 1 bits when i < m − 1. Theorem 28 The best-possible runtime on LeadingOnes for a mechanism using k = o(n) operators, (1, . . . , k) bitflips, is   n/k−1 k−1 X X n/x−1 1 1 1 X  ± o(n2 ). + E(Tk,opt ) =   1 n−i−1 x−1 1 n−i−1 k−1 2 x · · k · · x=1 i=n/(x+1) i=0 n n n n 24 n Proof: From Lemma 27, we can say the mBitFlip operator is optimal during the time when m+1 ≤i≤ n n − 1 (unless m = k, in which case it is optimal for 0 ≤ i ≤ − 1). Since the 1BitFlip operator has m k success probability O(n−1 ), and is chosen with the same probability as all other operators, the leading term in any success probability is O((nk)−1 ) = ω(n−2 ) and any O(n−2 ) terms are insignificant. Thus, they can be grouped into a lower order o(n2 ) term. Hence, by standard waiting time arguments, coupled with Theorem 6, we can show that the optimal runtime when using k operators is   n/x−1 n/k−1 k−1 X X X 1 1 1  ± o(n2 ). + E(Tk,opt ) =    n−i−1 x−1 1 n−i−1 k−1 1 2 x· · · x=1 i=0 k · n i=n/(x+1) n n n  1+ln(2) 2 1 2 2 n , E(T ) = n ≈ 0.42329n , In particular, taking limits as n → ∞, we have E(T ) = 2,opt 1,opt 2 4     ln(2) ln(3) ln(2) ln(3) 3721 1 2 2 2 2 n ≈ 0.40525n , E(T5,opt ) = 11520 + 2 − 4 n ≈ 0.39492n . E(T3,opt ) = 3 + 2 − 4 This result gives a theoretical lower bound on the expected runtime of any algorithm using the k operators on LeadingOnes. We can see that including further operators can improve the runtime. 6.1 ‘Simple’ Mechanisms We will now see how the simple learning mechanisms (Simple Random, Permutation, Greedy and Random Gradient) perform when tasked with choosing between k operators (i.e., (1, . . . , k) bitflips). We will show that incorporating more operators is detrimental to the performance of the ‘simple’ mechanisms on LeadingOnes. We again start by stating the expected runtime of the Simple Random mechanism, and use this as a basis for the other three mechanisms. Recall that the standard Simple Random mechanism chooses each operator uniformly at random in each iteration (i.e., with probability 1/k when using k operators). Theorem 29 The runtime of the Simple Random mechanism on LeadingOnes with k = o(n) operators, (1, . . . , k) bitflips, is n−1 1X 1 E(TSR|k ) = − o(n2 ).  1 n−i−1 m−1 2 i=0 1 · Pk m=1 m · n · k n Proof: We have seen previously that the probability of an improvement when flipping m indistinct bits is m−1  n−i−1 1 + O(n−2 ). P (impm ) = m · · n n We can use this claim again since, with a sub-linear number of operators, so long as the 1BitFlip operator is used, any u.a.r. choice of operators will give an improvement probability in each iteration of ω(n−2 ). The probability of an improvement in a single iteration is ! m−1  k 1 X 1 n−i−1 −1 −2 (An−i ) = · m· · + O(n ) k m=1 n n ! m−1    k 1 1 1 X 1 n−i−1 −2 x· · + O(n ) = Ω = + · kn k m=2 n n n and hence An−i = 1 1 k · We can use Theorem 6 to give the result: Pk m=1 m · n−1 n−1 1X 1X E(T ) = An−i = 2 i=0 2 i=0 1 n ·  n−i−1 m−1 n − o(n). 1 1 k · Pk m=1 25 m· 1 n ·  n−i−1 m−1 n − o(n2 ).  Corollary 30 The expected runtime of the Permutation, Greedy and Random Gradient mechanisms on LeadingOnes with k = o(n) operators, (1, . . . , k) bitflips, is E(Tk ) = n−1 1X 2 i=0 1 1 k · Pk m=1 m· 1 n · Proof: For the Greedy and Permutation mechanisms, let  n−i−1 m−1 n  pi = P (imp1 ) + (1 − P (imp1 )) · P (imp2 ) + · · · +  = k X m=1 = k X m=1  m−1 Y 1 · n  n−i−1 n j−1 ! 1 (1 − o(1)) · m · · n  n−i−1 n m−1  j=1 1−j·  k−1 Y j=1 ± o(n2 ).  (1 − P (impj )) · pk ·m· 1 · n !  n−i−1 n m−1   be the probability that at least one improvement is constructed in respectively 1, . . . , k iterations. To move from the second equation to the third, we note that Pimpj = O( n1 ) and Qm−1 1 o(n) = 1 − o(1). To upper bound the optimisation time, we note that j=1 (1 − Pimpj ) = (1 − O( n )) the difference between k/pi (i.e., the waiting time for an improvement to be constructed in terms of fitness evaluations) and the An−i waiting times used to prove Theorem 29 is at most constant, and thus the difference between these mechanisms and Simple Random expected times is limited to lower-order terms. We note that with probability at most k(k − 1)/n2 , at least two mutations (of the k) considered are improvements; in such a case, we can consider all but one of the improvement steps to be made in 0 iterations. As this occurs at most a sublinear number of times in expectation, and the maximum waiting time for any improving step is O(n), the lower-bound differs from the upper bound by at most an o(n2 ) term. Thus, the expected runtime Pn−1 1 ± o(n2 ). of these mechanisms is also 21 i=0 1 Pk n−i−1 m−1 1 ) m=1 m· n ·( k· n For the Random Gradient mechanism, we note that the probability that an operator, when repeated following a success, is successful again is at most k/n. Since there are at most n improvements to be made throughout the search space, the expected number of repeats which produce an improvement is at most k = o(n). When not repeating a successful operator, the Random Gradient mechanism behaves identically to the Simple Random mechanism. Its expected runtime is therefore at least the runtime of the Simple Random mechanism less an o(n2 ) term, and at most the runtime of the Simple Random mechanism plus n (as there are at most n iterations where the mechanisms differ in operator selection). Thus, its expected Pn−1 1 runtime is also 12 i=0 1 Pk ± o(n2 ).  n−i−1 m−1 1 ) m=1 m· n ·( k· n Note that the expected runtimes from Theorem 29 and Corollary 30 increase as k increases, suggesting that incorporating more operators is detrimental to the performance of the ‘simple’ mechanisms. In particular,  √  √  the 2 3 2 2 2 results for using 1, 2 and 3 operators respectively are 12 n2 , ln(3) n2 ≈ n ≈ 0.54931n and arctan 2 4 2 0.65281n2. 6.2 Generalised Random Gradient We present a rigorous theoretical analysis of the runtime of the Generalised Random Gradient hyper-heuristic on LeadingOnes using k ≥ 2 operators. The derived upperbound on the expected runtime decreases with k. 26 Theorem 31 The expected runtime of the Generalised Random Gradient hyper-heuristic on LeadingOnes for τ ≤ k1 − ǫ n ln(n), ǫ = Θ(1) with k = o(n) operators, (1, . . . , k) bitflips, is at most: i  hP   τ k 1 τ mn (1−(j−1)/w)m−1 w · M m(1−j/w) m−1 m=1 e n2 X  k · n +  ± o(n2 ). i  hP · τ m−1 k 2 j=1 (1−j/w) m n −k w m=1 e   n where M (x) := min( nτ , x), for any w ∈ Ω(1) ∩ o exp(kτ /n) . Proof: We follow the proof idea for the Generalised Random Gradient hyper-heuristic for two operators (Theorem 13). That is, we partition the optimisation process into w chunk based on the value of the LeadingOnes fitness function: during chunk j, the LO value of the current solution is at least (j − 1)n/w and less than j · n/w. After all w chunks have been completed, the global optimum, with an LO value of n, will have been found. We upper-bound the expectation of the runtime T of the Generalised Random Gradient hyper-heuristic on LO by the sum of the expected values of Tj , the runtimes on each chunk of the optimisation process, plus the times taken to begin a chunk. As our analysis of E(Tj ) requires the chunk to start with a random P choice of mutation operator, we bound E(T ) ≤ w (E(T j ) + E(Sj+1 )) where Sj+1 is a random variable j=1 denoting the expected number of iterations between the first solution in chunk j +1 being constructed and the following random operator choice. We will later show that with proper parameter choices, the contribution of Sj+1 terms can be bounded by o(n2 ), and therefore does not affect the leading constant in the overall bound. Let us now consider Tj , the number of iterations the hyper-heuristic spends in chunk j. Recall that a mutation operator is selected uniformly at random, and is allowed to run until it fails to produce an improvement for τ sequential iterations. Let Nj be a random variable denoting the number of random operator choices the hyper-heuristic performs during chunk j, and Xj,1 , . . . , Xj,Nj be the number of iterations PNj Xj,k , and by applying Wald’s the hyper-heuristic runs each chosen operator for, in which case Tj = k=1 equation (Theorem 10), using E(Xj ) to denote an upper bound on all E(Xj,k ) in chunk j: PNj E(Xj,k ) ≤ E(Nj )E(Xj ). (9) E(Tj ) = k=1 To bound E(Nj ), the expected number of times the random operator selection is performed during chunk j, we lower-bound the expected number of improvements found following operator selection, and apply the Additive Drift Theorem [12] to find the expected number of random operator selections occurring before a sufficient number of improvements have been found to enter the next chunk. Recall from Lemma 26 that the improvement probability for a mBitFlip operator is  m−1 n−i−1 1 + O(n−2 ). P (impm ) = m · · n n We note again that since the 1BitFlip operator is used, we can omit the O(n−2 ) terms, and they will fall into a o(n2 ) term in the final result. Let Fm denote the event that the mBitFlip operator fails to find an improvement during τ iterations. τ This will occur with probability P (Fm ) = (1 − P (impm )) . Within chunk j, the ancestor individual has at most jn/w − 1, and at least (j − 1)n/w , one bits. Hence:  m−1 !τ  m−1 !τ j 1 1 n − (jn/w − 1) − 1 1− ≤ 1−m· P (Fm ) ≤ 1 − m · n n n w ≤ e− P (Fm ) ≥ mτ n (1−j/w)m−1 1 1−m· n ≥ e− mτ n  ; n − ((j − 1)n/w) − 1 n (1−(j−1)/w)m−1 − m−1 !τ 1 . n 27 ≥ 1 1−m· n  m−1 !τ j−1 1− w We note that a geometric distribution with parameter p = P (Fm ) can be used to model the number of improvements that the mBitFlip operator finds prior to failing to find an improvement for τ iterations; the expectation of this distribution is (1 − p)/p = 1/p − 1. Combined over all k operators, the expected number of improvements Dj produced following a single random operator selection during chunk j, E(Dj ), is greater than: !   k k X 1 1 1 X mτ (1−j/w)m−1 −1 E(Dj ) ≥ e n −1 ≥ k P (F ) k m m=1 m=1 by inserting the upper bounds for P (Fm ). We use this expectation as the drift in the Additive Drift Theorem to upper-bound E(Nj ). Recall that each chunk consists of advancing through at most n/w fitness values; as bits beyond the leading ones prefix and the first zero bit remain uniformly distributed, in expectation n/(2w) improvements by mutation are required. If each step of a random process in expectation contributes E(Dj ) improvements by mutation, the expected number of steps required to complete chunk j is at most: E(Nj ) ≤ by the Additive Drift Theorem. n/(2w) k n ≤ · · P k E(Dj ) 2 w m=1 e 1 mτ n (1−j/w)m−1  (10) −k To bound E(Xj ), the expected number of iterations before a selected mutation operator fails to produce an improvement for τ iterations, we apply Wald’s equation: let S be the number of improvements found by the operator before it fails, and W1 , . . . , WS be the number of iterations it took to find each of those improvements. Then, once selected, the mBitFlip operator runs for: E(Xj |m) = τ + S X E(Ws ) = E(S)E(Wm | S ≥ 1) s=1 where τ accounts for the iterations immediately before failure, and the sum for the iterations preceding each constructed improvement. Recall that E(S) = 1/P (Fm ) − 1 by the properties of the geometric distribution, and observe that E(Wm | S ≥ 1) = E(Wm | Wm ≤ τ ) ≤ min(τ, E(Wm )). Using a waiting time argument for E(Wm ) being equal to the reciprocal of the improvement probability for the mBitFlip operator, we get:     1 1   − 1 · min τ, E(Xj | m) ≤ τ +  m−1  P (Fm ) m · n1 · n−(jn/w−1)−1 n !   1 n =τ+ − 1 · min τ, mτ m−1 m(1 − j/w)m−1 e− n (1−(j−1)/w) − n1   j−1 m−1 mτ n + O(1). ≤ τ + e n (1− w ) · min τ, m(1 − j/w)m−1 Combining these conditional expectations yields   k k  X X 1 n 1 mτ (1− j−1 )m−1 n w E(Xj ) ≤ · min τ, + O(k) · E(Xj | m) ≤ τ + ·e k k m(1 − j/w)m−1 m=1 m=1  ! k  X τ 1 mτ (1− j−1 )m−1 τ 1 w ≤n · min + O(k) + ·e n , n m=1 k n m(1 − j/w)m−1 !  k  X j−1 m−1 mτ 1 n kτ τ (1− ) w e n + O(k). + , ≤ · min k n n m(1 − j/w)m−1 m=1 28 (11) Runtime (/n2 ) 0.60 2-op 3-op 4-op 5-op 0.50 0.40 0 5 10 15 20 25 30 35 40 45 50 τ (/n) Figure 2: The leading constants in the theoretical upper bounds on the average number of fitness function evaluations required by the k-operator Generalised Random Gradient hyper-heuristic to find the LeadingOnes optimum (w = 100, 000). Finally, we return to bounding the overall runtime of the hyper-heuristic. Recall that Sj denoted the number of iterations the algorithm spends in chunk j while using the random operator chosen during chunk j − 1, and as E(Sj ) ≤ max (E(Xj | mBitFlip))m=1,...,k < kE(Xj ) = O (n exp(kτ /n)), and since w =  P  w n 2 o exp(kτ j=1 E(Sj+1 ) = o(n ). Substituting the bounds (10) and (11) into (9) yields the theorem /n) , statement:   w w X X (E(Tj ) + E(Sj+1 )) ≤  E(Nj )E(Xj ) + o(n2 ) E(T ) ≤ j=1 j=1 w X 1 n × · ≤ o(n2 ) + 2 w j=1 2 kτ n + i h mτ  j−1 m−1 1 τ n (1− w ) e , · min m=1 n m(1−j/w)m−1  P . j m−1 mτ k n (1− w ) −k m=1 e Pk  Figure 2 shows the relevant theoretical upper bounds for the k-operator variant of the Generalised Random Gradient hyper-heuristic from Theorem 31. The upper bounds found by the hyper-heuristics with more operators are better than the ones with less operators. In particular, the upper bounds for the any hyper-heuristic with k-operators outperform the best possible runtime for any hyper-heuristic with less than k operators. We depict this result for k = 3 and k = 5 in Figure 3. 7 Experimental Results In the previous sections we have proven that the generalised hyper-heuristics are extremely fast for the LeadingOnes benchmark function for large enough problem sizes n. In this section we present some experimental results for the generalised hyper-heuristics in order to shed light on their performance for realistic problem sizes. All parameter combinations have been simulated 10,000 times. 7.1 Two Low-level Heuristics (k = 2) We first consider the generalised hyper-heuristics using two operators only (i.e., 1BitFlip and 2BitFlip), and look at the impact of the parameter τ and problem size n. Figure 4 shows the runtimes for the three generalised hyper-heuristics on LeadingOnes for n = 10, 000 and n = 50, 000, illustrating the effect τ has on the runtime. 29 0.44 2-op 3-op 0.43 Runtime (/n2 ) Runtime (/n2 ) 0.44 2Opt 0.42 0.41 0.40 0 10 20 30 40 50 4-op 5-op 0.42 0.40 0.38 4Opt 0 10 20 τ (/n) 30 40 50 τ (/n) Figure 3: A comparison of the optimal runtimes of the Generalised Random Gradient hyper-heuristic with k-operators against the leading constant in the theoretical upper bound of the runtime of the Generalised Random Gradient hyper-heuristic with k + 1-operators; for k = 2 and k = 4. Runtime (/n2 ) 0.6 0.55 RLS 0.5 Gen. Greedy Gen. Random Gradient Gen. Greedy Gradient 0.45 0.4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 τ (/(n ln(n))) Figure 4: Average number of fitness function evaluations required by the hyper-heuristics with k = 2 operators to find the LeadingOnes optimum for n = 10, 000 (solid), n = 50, 000 (dashed). For the Generalised Greedy hyper-heuristic, we see that for the larger problem size, the runtimes improve slightly. The figure suggests that for a sufficiently large τ the hyper-heuristic outperforms RLS; in particular, for every value of τ greater than approximately 0.3n ln n (for n = 50, 000 this value is 162, 297). Also, for every τ ≥ n ln n the runtime of the GG hyper-heuristic does not change much confirming the robustness of the hyper-heuristic to the choice of τ , indicated by Corollary 19. The Generalised Random Gradient hyper-heuristic performance seems more dependent on the choice of τ . It is worth noting that as the problem size increases, for τ ≈ 0.55n ln(n), the runtime seems to be n2 + o(n2 ) ≈ 0.42329n2). For well approaching the optimal performance proven in Corollary 15 (i.e., 1+ln(2) 4 chosen τ values, the hyper-heuristic beats the runtime of RLS, and also the experimental runtime for the recently presented k-bit mutation algorithm with self-adjusting k, of 0.450n2, for the given parameter choices [8]2 . As τ increases past 0.6n2 , we see a detriment in the performance of the hyper-heuristic; it is worth noting, however, that for n = 50, 000, it is required that τ > 1.5n ln(n) = 811, 483 to be worse than the RLS expected runtime of 0.5n2 , indicating that the parameter is very robust. The Generalised Greedy Gradient hyper-heuristic showcases similar performance reliance on τ as the Generalised Random Gradient hyper-heuristic. The GGG hyper-heuristic, however, does have improved performance over the GRG hyper-heuristic for both values of n, suggesting that incorporating the Decision 2 We did not perform an experimental comparison with this algorithm as it is unclear how to set the various parameters for a fair comparison. 30 τ = 0.25n ln n τ = 0.5n ln n τ = 0.6n ln n τ = 0.75n ln n Runtime (/n2 ) 0.55 0.5 0.45 0.4 2 10 103 104 105 n 106 107 108 Figure 5: Average number of fitness function evaluations required for the Generalised Random Gradient hyper-heuristic with k = 2 operators to find the LeadingOnes optimum as the problem size n increases. Runtime (/n2 ) 0.60 0.55 RLS 0.50 2-op 3-op 4-op 5-op 0.45 0.40 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 τ (/(n ln(n))) Figure 6: Average number of fitness function evaluations required by the Generalised Random Gradient hyper-heuristic to find the LeadingOnes optimum, n = 100, 000. Stage of the GG hyper-heuristic has a positive effect on the runtime. Figure 5 shows the effects of increasing the problem size n for a variety of fixed τ values, for the GRG hyper-heuristic. We can see that an increased problem size leads to faster runtimes. The performance difference between the τ values decreases with increased n, suggesting that further increasing n would lead to similar, optimal performance for a large range of values, as suggested by Corollary 15. For n = 108 , the runtime for τ = 0.6n ln n is ≈ 0.4271n2, only slightly deviated from the optimal value of ≈ 0.4232n2. 7.2 More Than Two Low-level Heuristics (k ≥ 2) We now consider the generalised hyper-heuristics using k operators, (1, . . . , k) bitflips, and look at the impact of the parameter τ . Figure 6 shows the runtimes for the Generalised Random Gradient hyper-heuristic when choosing from 2 to 5 separate mutation operators on LeadingOnes, for a problem size of n = 100, 000. We see that incorporating more operators can be beneficial to the performance of the GRG hyper31 Runtime (/n2 ) 0.60 2-op 3-op 4-op 5-op 0.55 0.50 0.45 0 2 4 6 8 10 12 14 16 18 20 22 24 τ (/n) Figure 7: Average number of fitness function evaluations required by the Generalised Greedy hyper-heuristic to find the LeadingOnes optimum, n = 100, 000. Runtime (/n2 ) 0.54 0.52 0.50 0.48 2-op 4-op 0.46 0 50 100 150 200 250 300 350 400 450 500 550 600 650 3-op 5-op 700 750 τ (/n) Figure 8: Average number of fitness function evaluations required by the Generalised Greedy hyper-heuristic to find the LeadingOnes optimum, n = 100, 000. heuristic. Whilst the 2-operator hyper-heuristic achieves a best performance of approximately 0.44n2 , the 5-operator hyper-heuristic achieves a best performance of around 0.425n2. It is, however, important to set τ optimally to achieve the best performance. For 0 ≤ 0.35n ln(n) ≤ τ and τ ≥ 1.5n ln(n), the 2-operator hyper-heuristic outperforms the others; however, it is unable to achieve a better optimal performance. The results suggest that the more operators that are incorporated in the hyper-heuristic, the shorter the range of τ values for which it performs the best, in comparison with the hyper-heuristics with fewer operators. Figure 7 shows the runtimes for the Generalised Greedy hyper-heuristic when choosing from 2 to 5 separate mutation operators on LeadingOnes, for a problem size of n = 100, 000. Unlike the Generalised Random Gradient hyper-heuristic the Generalised Greedy, like the ‘simple’ mechanisms (see Theorem 29, Corollary 30), displays a detrimental performance when more operators are included. Unlike the GRG hyper-heuristic, which exploits a high-performing operator while running for a shorter time with low-performing operators, the GG hyper-heuristic runs each chosen operator for a fixed period of time. Involving more operators means a lower chance of choosing the best operator in the Decision Stage. Figure 8 shows the runtimes for the Generalised Greedy hyper-heuristic when choosing from 2 to 5 separate mutation operators on LeadingOnes, for a problem size of n = 100, 000, for a much larger range of 32 Runtime (/n2 ) 0.60 0.55 RLS 0.50 2-op 3-op 4-op 5-op 0.45 0.40 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 τ (/(n ln(n))) Figure 9: Average number of fitness function evaluations required by the Generalised Greedy Gradient hyper-heuristic to find the LeadingOnes optimum, n = 100, 000. τ values. We can see that the performance of the 2-operator hyper-heuristic remains the best performing hyper-heuristic. Although the performance of the 5-operator hyper-heuristic is the worst, it is worth noting than even this operator outperforms the runtime of the single operator algorithm RLS (i.e., 0.5n2 ). For this hyper-heuristic, the detriment in performance between τ = 50n and τ = 750n is approximately 0.01n2 , confirming that the Generalised Greedy hyper-heuristic is robust to the choice of τ . Figure 9 shows the runtime for the Generalised Greedy Gradient hyper-heuristic on LeadingOnes for n = 100, 000. While the hyper-heuristic displays similar performance to the GRG hyper-heuristic, we note that the best performance of each k outperforms the respective selection for the GRG hyper-heuristic with the same k. This suggests that, while the Decision Stage can be detrimental in the case of the GG hyper-heuristic, the Exploitation Stage idea can correct for poor operator choices, leading to better performance. We can see, for example, that the best performance of the 5-operator variation of the GGG hyper-heuristic, for τ ≈ 0.62n ln(n), achieves a performance of approximately 0.418n2, outperforming the best possible 2-operator runtime, shown in Corollary 25, of ≈ 0.423n2 . 8 Conclusion The field analysing theoretically the performance of hyper-heuristics is growing. Previous results have shown that the ‘simple’ learning mechanisms applied in combinatorial optimisation applications show no signs of learning on LeadingOnes and perform equivalently to choosing operators at random, up to lower order terms. We generalised the existing learning mechanisms to allow success to be measured over a longer period of time, τ , rather than in a single iteration, and proved that these generalised hyper-heuristics are faster than all standard evolutionary and local-search algorithms for LeadingOnes. To apply the generalised hyper-heuristics, a value for the learning period τ is required. Although our results indicate that τ is a fairly robust parameter (i.e., for n = 10, 000 all generalised hyper-heuristics achieved faster experimental runtimes than that of the (1+1) EA for all tested values of τ between 1 and 1,000,000), setting it appropriately will lead to optimal performance. Concerning the Generalised Random Gradient hyper-heuristic, clearly τ must be large enough to have at least a constant expected number of successes within τ steps, if the hyper-heuristic has to learn about the operator performance. Obviously, setting large values of τ may lead to large runtimes, since switching operators requires Ω(τ ) steps. Similar considerations may also be made for the Generalised Greedy hyper-heuristic that experiments indicate is even more robust to the choice of τ . Concerning the negative effects that may occur for too large values of τ , the GapPath function can be considered as a worst-case scenario for the generalised hyper-heuristics, because 33 the operator has to change after every success. Nevertheless, we have proved that the hyper-heuristics are asymptotically just as efficient as the ‘simple’ mechanisms for values of τ as large as O(n2 ). The Generalised Greedy Gradient hyper-heuristic, which combines Generalised Greedy’s Decision Stage with Generalised Random Gradient’s Exploitation Stage, can achieve even better performance than either hyper-heuristic. We finally have rigorously shown that the performance of the ‘simple’ mechanisms deteriorates as the choice of operators (choosing from k ≥ 2) increases, while the performance of the Generalised Random Gradient hyper-heuristic improves with a larger choice. Several directions can be explored in future work. On one hand, we will analyse the hyper-heuristics’ performance on a broader class of problems, including classical ones from combinatorial optimisation, and generalise the hyper-heuristics further by allowing the algorithms to automatically learn how to adapt τ . Finally, more sophisticated hyper-heuristics, such as the choice function approach [6] that have shown superior performance in practical applications, should be analysed. References [1] F. Alanazi and P. K. Lehre. Runtime analysis of selection hyper-heuristics with classical learning mechanisms. In 2014 IEEE Congress on Evolutionary Computation (CEC), pages 2515–2523. Springer, July 2014. [2] Fawaz Alanazi and Per Kristian Lehre. Limits to learning in reinforcement learning hyper-heuristics. In Evolutionary Computation in Combinatorial Optimization (EvoCOP 2016), pages 170–185, Cham, 2016. Springer International Publishing. [3] Shahriar Asta and Ender Özcan. An apprenticeship learning hyper-heuristic for vehicle routing in HyFlex. In IEEE Symposium on Evolving and Autonomous Learning Systems (EALS 2014), pages 65–72. IEEE, 2014. [4] Süntje Böttcher, Benjamin Doerr, and Frank Neumann. Optimal fixed and adaptive mutation rates for the leadingones problem. In Parallel Problem Solving from Nature (PPSN XI), pages 1–10, Berlin, Heidelberg, 2010. Springer. [5] Edmund K Burke, Michel Gendreau, Matthew Hyde, Graham Kendall, Gabriela Ochoa, Ender Özcan, and Rong Qu. Hyper-heuristics: A survey of the state of the art. Journal of the Operational Research Society, 64(12):1695–1724, 2013. [6] Peter Cowling, Graham Kendall, and Eric Soubeiga. A hyperheuristic approach to scheduling a sales summit. In Practice and Theory of Automated Timetabling III, pages 176–190, Berlin, Heidelberg, 2001. Springer. [7] Peter Cowling, Graham Kendall, and Eric Soubeiga. Hyperheuristics: A tool for rapid prototyping in scheduling and optimisation. In Applications of Evolutionary Computing: EvoWorkshops 2002: EvoCOP, EvoIASP, EvoSTIM/EvoPLAN Kinsale, Ireland, April 3–4, 2002 Proceedings, pages 1–10, Berlin, Heidelberg, 2002. Springer. [8] Benjamin Doerr, Carola Doerr, and Jing Yang. k-bit mutation with self-adjusting k outperforms standard bit mutation. In Parallel Problem Solving from Nature (PPSN XIV), pages 824–834. Springer International Publishing, 2016. [9] Benjamin Doerr and Marvin Künnemann. How the (1+λ) evolutionary algorithm optimizes linear functions. In Genetic and Evolutionary Computation Conference, GECCO ’13, Amsterdam, The Netherlands, July 6-10, 2013, pages 1589–1596, 2013. [10] Jonathon Gibbs, Graham Kendall, and Ender Özcan. Scheduling english football fixtures over the holiday period using hyper-heuristics. In Parallel Problem Solving from Nature (PPSN XI), pages 496–505, Berlin, Heidelberg, 2010. Springer. [11] Jun He, Feidun He, and Hongbin Dong. Pure strategy or mixed strategy? In Evolutionary Computation in Combinatorial Optimization: 12th European Conference (EvoCOP 2012), pages 218–229, Berlin, Heidelberg, 2012. Springer. [12] Jun He and Xin Yao. Drift analysis and average time complexity of evolutionary algorithms. Artificial Intelligence, 127(1):57–85, 2001. [13] Daniel Johannsen. Random combinatorial structures and randomized search heuristics. PhD thesis, Universita̋t des Saarlandes, Postfach 151141, 66041 Saarbra̋cken, 2010. [14] Per Kristian Lehre and Ender Özcan. A runtime analysis of simple hyper-heuristics: To mix or not to mix operators. In Proceedings of the Twelfth Workshop on Foundations of Genetic Algorithms XII, FOGA XII ’13, pages 97–104, New York, NY, USA, 2013. ACM. 34 [15] Andrei Lissovoi, Pietro S. Oliveto, and John Alasdair Warwicker. On the runtime analysis of generalised selection hyper-heuristics for pseudo-boolean optimisation. In Proceedings of the Genetic and Evolutionary Computation Conference, GECCO ’17, pages 849–856, New York, NY, USA, 2017. ACM. [16] Eunice López-Camacho, Hugo Terashima-Marin, Peter Ross, and Gabriela Ochoa. A unified hyper-heuristic framework for solving bin packing problems. Expert Systems with Applications, 41(15):6876–6889, 2014. [17] İbrahim Maden, S. Uyar, and Ender Özcan. Landscape analysis of simple perturbative hyperheuristics. In 15th International Conference on Soft Computing, pages 16–22. Mendel, 2009. [18] Gabriela Ochoa, Rong Qu, and Edmund K. Burke. Analyzing the landscape of a graph based hyper-heuristic for timetabling problems. In Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, GECCO ’09, pages 341–348, New York, NY, USA, 2009. ACM. [19] Gabriela Ochoa, José Antonio Vázquez-Rodrı́guez, Sanja Petrovic, and Edmund Burke. Dispatching rules for production scheduling: a hyper-heuristic landscape analysis. In IEEE Congress on Evolutionary Computation., pages 1873–1880. IEEE, 2009. [20] P. S. Oliveto and Xin Yao. Runtime analysis of evolutionary algorithms for discrete optimization. In Anne Auger and Benjamin Doerr, editors, Theory of Randomized Search Heuristics: Foundations and Recent Developments, pages 21–52. World Scientific, 02 2011. [21] Ender Özcan, Mustafa Misir, Gabriela Ochoa, and Edmund K. Burke. A reinforcement learning - great-deluge hyper-heuristic for examination timetabling. Applied Metaheuristic Computing, 1(1):39–59, 2010. [22] Abraham Wald. On cumulative sums of random variables. Ann. Math. Statist., 15(3):283–296, 09 1944. [23] David H Wolpert and William G Macready. No free lunch theorems for optimization. IEEE Transactions on Evolutionary Computation, 1(1):67–82, 1997. 35
9cs.NE
Generalized Nash Equilibrium Problem by the Alternating Direction Method of Multipliers arXiv:1703.08509v1 [cs.GT] 24 Mar 2017 Farzad Salehisadaghiani, and Lacra Pavel Abstract— In this paper, the problem of finding a generalized Nash equilibrium (GNE) of a networked game is studied. Players are only able to choose their decisions from a feasible action set. The feasible set is considered to be a private linear equality constraint that is coupled through decisions of the other players. We consider that each player has his own private constraint and it has not to be shared with the other players. This general case also embodies the one with shared constraints between players and it can be also simply extended to the case with inequality constraints. Since the players don’t have access to other players’ actions, they need to exchange estimates of others’ actions and a local copy of the Lagrangian multiplier with their neighbors over a connected communication graph. We develop a relatively fast algorithm by reformulating the conservative GNE problem within the framework of inexactADMM. The convergence of the algorithm is guaranteed under a few mild assumptions on cost functions. Finally, the algorithm is simulated for a wireless ad-hoc network. I. I NTRODUCTION The problem of finding a generalized Nash equilibrium (GNE) has recently drawn many attentions due to its applicability in various networked games with coupling constraints such as power grids [1], optical networks [2] and wireless communication networks [3]. In such games, each player aims to minimize his cost function by taking a proper action in response to other players. Each player’s feasible decision set is dependent on other players’ actions. We are interested in seeking a GNE, which is a point that no player can unilaterally deviate his local action to minimize his cost function. Due to similarities between this problem and distributed consensus optimization problems (DCOPs), we aim to employ an efficient, robust and fast optimization technique referred to as the alternating direction method of multipliers (ADMM) to find a GNE of a multi-player game. The key differences between DCOP and GNE problem is that in a DCOP each agent desires to minimize a global objective by controlling a full vector optimization variable. However, in a GNE problem, we have a set of local optimization problems assigned to each player who controls only his action (which is an element of a full vector). This leads to have a suboptimization problem associated to each player such that each of them is dependent on the other players’ actions. Related Works. Our work is related to the literature on (generalized) Nash games such as [4]–[7] and DCOPs such as [8], [9]. (G)NE seeking in distributed networked games The authors are with the Department of Electrical and Computer Engineering, University of Toronto, Toronto, ON M5S 3G4, Canada (emails: [email protected], [email protected]). has recently attracted an increased interest due to many realworld applications. To name only a few, [10], [11]. In [10], the problem of finding GNE is studied in a networked game. A gradient-based algorithm is designed over a complete communication graph. Convergence proof is analyzed in the presence of delay and dynamic change. Similar to [1], the problem of seeking a GNE is discussed in [12] for the games that players have access to all players’ actions on which their cost depends on. Thus, they exchange only local multipliers not the estimates of others’ actions. A Nash game with a coupled constraint is considered in [13]. A variational inequality related approach is used to compute a GNE of the game. The authors in [14] solve a quadratic GNE problem with linear shared coupled constraint using Lemkes method. Recently, there has been a widespread research on GNE seeking in aggregative games [1], [13], [14]. Quadratic aggregative games with affine and convex coupling constraints are studied in [15], [16]. A coordination scheme belonging to a class of asymmetric projection algorithm is presented in [15] and its convergence to a GNE is then discussed. A model-free dynamic control law, based on monotone operator, is proposed in [16] to ensure the global convergence to a GNE. ADMM algorithms, which are in the scope of this paper, have been developed in 70’s to find an efficient way to obtain an optimal point of distributed optimization problems (DOPs) [17], [18]. After the re-introduction of this method in [18], ADMM has become widely used to locate optimal points of DOPs as a robust and fast technique [19], [20]. An inexact-ADMM algorithm is proposed in [8] for DCOPs with an affine equality constraint. In [21], we develop a methodology to relate a distributed NE problem with no coupled constraint to a DCOP using augmentation technique. It is shown that an NE problem can be treated as a set of suboptimization problems with an augmented equality constraint for the estimates of the players. Contributions. Motivated by ADMM methods designed for DCOPs, we develop a relatively fast algorithm for GNE problems within the framework of inexact-ADMM. Players are only aware of their own cost functions (which are not in the form of aggregative but general game), problem data (which is related to a private coupled equality constraint for each player) and action set of all players (they are not aware of the others’ actions). We reformulate the conservative GNE problem into the corresponding Lagrange dual problem and then we augment it using local estimates of players’ actions as well as local copies of Lagrange multipliers. We derive a set of GNE conditions using the associated KKT conditions and finally we develop an inexact-ADMM algorithm based on the augmented Lagrange function which is related to each player. The convergence proof of the algorithm to a GNE of the game is then provided under a few mild assumptions on players’ cost functions. The paper is organized as follows. The problem statement and assumptions are provided in Section II. In Section III, an inexact-ADMM-like algorithm is derived. Convergence of the proposed algorithm to a GNE of the game is discussed in Section IV. Simulation results are illustrated in Section V and concluding remarks are presented in Section VI. II. P ROBLEM S TATEMENT Consider V = {1, . . . , N } as a set of N players that seek a GNE of a networked game with individual linear coupled constraints. The game is denoted by G and defined as follows: • Ωi ⊂ R: Action set of player i, ∀i ∈ V , Q N • Ω= i∈V Ωi ⊂ R : Action set of all players, • Ji : Ω → R: Cost function of player i, ∀i ∈ V . The game G(V, Ωi , Ji ) is defined over the set of players, V , the action set of player i ∈ V , Ωi and the cost function of player i ∈ V , Ji . The players’ actions are denoted as follows: • x = (xi , x−i ) ∈ Ω: All players actions, • xi ∈ Ωi : Player i’s action, ∀i ∈ V , Q • x−i ∈ Ω−i := j∈V \{i} Ωj :All players’ actions except i. The local data of player i is given as Ai := [Aii , [Aij ]j6=i ] ∈ Rm×N with Aii ∈ Rm , and bi ∈ Rm . Note that in this work, we are interested in a more general case in which each player has access only to his own private constraint which has not to be shared with the other players. Assumption 1. 1 There exists a positive semi-definite matrix B i ∈ Rm×m for all i ∈ V such that, Aii ∈ ker(B i − Im ), Aij ∈ ker(B i ) j 6= i. (1) Player i’s feasible strategy set is then denoted by Xi (x−i ) := {xi ∈ Ωi |Ai x = bi }2 . The game is played such that for a given x−i ∈ Ω−i , each player i ∈ V aims to minimize his own cost function selfishly w.r.t. xi subject to a private equality constraint. ( minimize Ji (xi , x−i ) xi (2) s.t. xi ∈ Xi (x−i ). Each optimization problem is run by a particular player i at the same time with other players. Note that (2) can simply accommodate inequality constraints Ai x ≥ bi by adding a slack variable y ≥ 0 and rewrite the inequality constraint as Ai x−y = bi . Note that the constraint y ≥ 0 can be enforced by a convex indicator function. 1 Derivation of the algorithm is not dependent on Assumption 1. Simulations for various cases for matrix Ai , even the ones that do not satisfy this assumption, verify that the algorithm works even without considering this assumption. However, this assumption is used at the convergence proof. 2 This case contains games with shared constraints for which Ax = b for all i ∈ V and m ≥ N An NE of a game is defined as follows: Definition 1. Consider an N -player game G(V, Ωi , Ji ), each player i minimizing the cost function Ji : Ω → R. A vector x∗ = (x∗i , x∗−i ) ∈ Ω is called a GNE of this game if Ji (x∗i , x∗−i ) ≤ Ji (xi , x∗−i ) ∀xi ∈ Xi (x∗−i ), ∀i ∈ V. (3) An NE lies at the intersection of all solutions of the set (2). The key challenges are two-fold. First, each optimization problem in (2) is dependent on the solution of the other simultaneous problems; second, the solutions are coupled through a linear constraint. Since this game is distributed, no player is aware of the actions, cost functions and constraints of the other players. Thus, each player i maintains an estimate of the other players’ actions. We define a few notations, in the following, for players’ estimates. i i i • x = (xi , x−i ) ∈ Ω: Player i’s estimate of all players actions, i • xi ∈ Ωi : Player i’s estimate of his own action which is i indeed his action, Q i.e., xi = xi ∀i ∈ V , i • x−i ∈ Ω−i := j∈V \{i} Ωj : Player i’s estimate of all other players’ actions except his action, T 1T , . . . , xN ]T ∈ ΩN : Augmented vector of • x = [x estimates of all players’ actions Note that all players’ actions can be interchangeably represented as x = (xii )i∈V . We assume that the cost function Ji , the action set Ω and the problem data Ai , bi are the only information available to player i. Thus, the players exchange their estimates in order to update their actions. An undirected communication graph GC (V, E) is defined with E ⊆ V × V denoting the set of communication links between the players. (i, j) ∈ E if and only if players i and j exchange estimates. In the following, we have a few definitions for GC : • Ni := {j ∈ V |(i, j) ∈ E}: Set of neighbors of i in GC , • H := [hij ]i,j∈V : Adjacency matrix associated with GC where hij = 1 if (i, j) ∈ E and hij = 0 otherwise, • D := diag{|N1 |, . . . , |NN |}: Degree matrix associated with GC . The following assumption is used for GC . Assumption 2. GC is a connected graph. We aim to link game (2) to a set of optimization problems whose solutions can be based on the ADMM. Game (2) is equivalently represented as the following problem for i ∈ V . ( min Ji (xi , x−i ) xi ∈Ωi (4) s.t. Ai x = bi . Let λ ∈ Rm be the joint Lagrange dual variable associated with the linear constraint Ai x = bi ∀i ∈ V . The Lagrange dual problem of (4) can be written as follows for i ∈ V . n maxm min Ji (xi , x−i ) + λT (Ai x − bi ). (5) λ∈R xi ∈Ωi Note that we are interested in computing a variational GNE of the game since we assumed a common Lagrange multiplier λ for each player in (5). Using the estimates of the actions xi and the local copies of the Lagrange dual variables λi for i ∈ V , we reformulate (5) so that the objective function is separable (the estimates are also interpreted as the local copies of x). Moreover, the slack variables tls |{l∈V, s∈Nl } ∈ Ω and pls |{l∈V, s∈Nl } ∈ Rm are employed to enforce that the local copies are equivalent.  T  Ji(xii , xi−i )+IΩi (xii )+λi (Ai xi −bi ) max min   i i m ls ls  λ ∈R ,p xi ∈Ωi ,t      s.t. xl = tls ∀l ∈ V, ∀s ∈ Nl , xs = tls          ∀l ∈ V, ∀s ∈ Nl , l ls ∀l ∈ V, ∀s ∈ Nl , s ls ∀l ∈ V, ∀s ∈ Nl , λ =p λ =p (6) i 0 if x ∈ Ω i i is an indicator function where IΩi (xii ) := ∞ otherwise of the feasibility constraint xii ∈ Ωi . Note that the solution of (6) is equivalent to that of (5), i.e., xii = xi , λi = λ for all i ∈ V . The ADMM is then employed to solve (6) in a distributed manner. A characterization of the NE for game (2) could be obtained by finding the KKT conditions on (6). Let {uls , v ls , wls , z ls }l∈V,s∈Nl with uls , v ls ∈ RN and wls , z ls ∈ Rm be the Lagrange multipliers associated with the four constraints in (6), respectively. The corresponding Lagrange function for player i, ∀i ∈ V is as follows:   Li xii , {tls , uls , v ls }, λi , {pls , wls , z ls } ( T := Ji (xii , xi−i ) + IΩi (xii ) + λi (Ai xi − bi ) XX T T + uls (xl − tls ) + v ls (xs − tls ), l∈V s∈Nl − XX T T wls (λl − pls ) + z ls (λs − pls ). (7) l∈V s∈Nl ∗ ∗ ∗ ∗ ∗ ∗ Let (xi , λi )i∈V and {uls , v ls , wls , z ls }l∈V, s∈Nl be a pair and dual optimal to (6). Let denote P of primal P solution ij ji i ij u + v := U and w + z ji := W i for j∈Ni j∈Ni notational simplicity. The KKT conditions are summarized as follows for i ∈ V, j ∈ Ni :  ∗ ∗ ∗T ∗ ∇i Ji (xi ) + ∂IΩi (xii ) + λi Aii + Uii = 0,    Ai xi ∗ − bi − W i ∗ = 0 , m (8) i∗ j∗ i∗ j∗  x = x , λ = λ ,    ij ∗ ∗ ∗ ∗ u + v ij = 0N , wij + z ij = 0m , where ∇i Ji (·) is gradient of Ji w.r.t. xi and ∂i IΩi (·) is a ∗ subgradient of IΩi at xi . By (8) and Assumption 2, x1 = N∗ ∗ 1∗ N∗ ∗ . . . = x := x and λ = . . . = λ := λ . Then, the GNE of (2), x∗ , satisfies the following equations ∀i ∈ V, j ∈ Ni :  ∗ ∗ ∗T i i∗  ∇i Ji (x ) + ∂IΩi (xi ) + λ Ai + Ui = 0, ∗ (9) Ai x∗ − bi − W i = 0m ,  ∗ ∗  ij ij ij ∗ ij ∗ u + v = 0N , w + z = 0m . In the following, we state a few assumptions for the existence of a GNE. Assumption 3. For every i ∈ V , • Ωi ⊂ R is compact and convex • Xi (x−i ) is non-empty for every x−i 1 • Ji (xi , x−i ) is C in xi , jointly continuous in x and convex in xi , for every x−i . The convexity of Ωi implies that the indicator function IΩi is convex. This yields that there exists at least one bounded subgradient ∂IΩi . Assumption 4. Let F : ΩN → RN , F (x) := [∇i Ji (xi )]i∈V be the pseudo-gradient vector (game map) where x := T T [x1 , . . . , xN ]T ∈ ΩN . F is cocoercive ∀x ∈ ΩN and y ∈ ΩN , i.e., (F (x) − F (y))T (x − y) ≥ σF kF (x) − F (y)k2 , (10) where σF > 0. III. D ISTRIBUTED I NEXACT-ADMM A LGORITHM Our objective is to find an ADMM-like algorithm for computing a GNE of G(V, Ωi , Ji ) using only imperfect information over the communication graph GC (V, E). The algorithm is elaborated in the following steps: 1- Initialization Step: Each player i ∈ V maintains an initial estimate for all players’ actions, xi (0) ∈ Ω and an initial Lagrange multiplier, λi (0) ∈ Rm . The initial values of uij (0), v ij (0), wij (0) and z ij (0) are all set to be zero for all i ∈ V , j ∈ Ni . 2- Communication Step: At iteration T (k), each player i ∈ V exchanges his previous estimate of the other players’ actions xi (k − 1) and his dual Lagrange multiplier λi (k − 1) with his neighbors j ∈ Ni . 3- Action Update Step: At this moment all players update their actions, estimates and Lagrange multiplier via the ADMM. For each player i ∈ V , let the augmented Lagrange function associated with (6) be as follows:   Lai xii , {tls , uls , v ls }, λi , {pls , wls , z ls } T := Ji (xii , xi−i ) + IΩi (xii ) + λi (Ai xi − bi ) XX T T + uls (xl − tls ) + v ls (xs − tls ) l∈V s∈Nl − XX T T wls (λl − pls ) + z ls (λs − pls ) l∈V s∈Nl cXX + (kxl − tls k2 + kxs − tls k2 ) 2 l∈V s∈Nl cXX − (kλl − pls k2 + kλs − pls k2 ), 2 (11) l∈V s∈Nl where c > 0 is a scalar coefficient. Consider the ADMM algorithm associated with (6) based on (11): The dual Lagrange multipliers uij , v ij , wij , z ij update rules ∀i ∈ V, j ∈ Ni are as follows:  c uij (k) = uij (k − 1) + xi (k − 1) − xj (k − 1) , (12) 2  c v ij (k) = v ij (k − 1) + xj (k − 1) − xi (k − 1) , (13) 2  c ij ij w (k) = w (k − 1) + λi (k − 1) − λj (k − 1) , (14) 2 z ij (k) = z ij (k − 1) +  c j λ (k − 1) − λi (k − 1) . 2 (15) as follows: n xii (k) = arg min max Ji (xii , xi−i (k − 1)) + IΩi (xii ) i i xi The update rule for the slack variable tij ∈ RN , ∀i ∈ V, j ∈ Ni , which is based on (11), is as follows:  a i ls ls ls tij (k) = arg min L i x (k − 1), {t , u (k), v (k)}, tij  λi (k − 1), {pls (k − 1), wls (k), z ls (k)} n − (uij (k) + v ij (k))T tij = arg min tij o c + (kxi (k − 1) − tij k2 + kxj (k − 1) − tij k2 ) 2 1 1 = (uij (k) + v ij (k)) + (xi (k − 1) + xj (k − 1)).(16) 2c 2 The initial conditions uij (0) = v ij (0) = 0N ∀i ∈ V, j ∈ Ni along with (12) and (13) suggest that uij (k) + v ij (k) = 0N ∀i ∈ V, j ∈ Ni , k > 0. Then, (16) yields, tij (k) = xi (k − 1) + xj (k − 1) . 2 (17) Similarly the update rule for pij ∈ Rm ∀i ∈ V, j ∈ Ni is represented as the following: λi (k − 1) + λj (k − 1) . (18) 2 The local estimate update for all i ∈ V is a min-max optimization problem based on (11).  a xii (k) = arg min max L xii , {tls (k), uls (k), v ls (k)}, λi , i xii ∈R λi ∈Rm  {pls (k), wls (k), z ls (k)} n = arg min max Ji (xii , xi−i (k − 1)) + IΩi (xii ) i i pij (k) = xi T T +Uii (k)T xii − W i (k)T λi X xi (k − 1) + xji (k − 1) +c xii − i 2 λi − j∈Ni λi (k − 1) + λj (k − 1) 2 j∈Ni iT 2o ∀i ∈ V. (19) xii − λ xii (k − 1) + xji (k − 1) 2 2 + Uii (k)T xii (20)  Aii xii + Ai−i xi−i (k − 1) − bi − W i (k)  o X +c (λi (k − 1) + λj (k − 1)) − c|Ni |kλi k2 +λ j∈Ni Substituting back (22) into (21), we obtain, n xii (k) = arg min Ji (xii , xi−i (k − 1)) + IΩi (xii ) i xi +c X j∈Ni + 1 4c|Ni | xii (k − 1) + xji (k − 1) 2 + Uii (k)T xii 2 X c (λi (k − 1) + λj (k − 1)) xii − j∈Ni i −W (k) + Aii xii + Ai−i xi−i (k − 1) − bi 2o . (23) T nh Aii  i i ∇i Ji (xi (k − 1)) + A x (k − 1) 2c|Ni | xi iT X −bi − W i (k) + c (λi (k − 1) + λj (k − 1)) . j∈Ni xi X Only the third line of (21) is dependent on λi which is the maximization variable. Thus, to maximize (21) w.r.t. λi , we let λi (k) be as follows: 1  i i λi (k) = A x (k) + Ai−i xi−i (k − 1) − bi 2c|Ni | i i X λi (k − 1) + λj (k − 1)  . (22) −W i (k) + 2c 2 xii (k) = arg min i In the derivation of (19), we used (17) and (18). The next min-max problem is equivalent in the sense that its solutions for xii and λi are equivalent to the solutions of (19). n xii (k) = arg min max Ji (xii , xi−i (k − 1)) + IΩi (xii ) i i +c xii − 2 j∈Ni X X We simplify (23) by using a proximal first-order approximation for Ji (xii , xi−i (k − 1)) and the last term in (23) around xi (k − 1); thus using inexact ADMM it follows: −λi bi + λi Aii xii + λi Ai−i xi−i (k − 1) −c xii (k − 1) + xji (k − 1) 2 + Uii (k)T xii 2 j∈Ni 1 h X i (λ (k − 1) + λj (k − 1)) −c|Ni | λi − c 2c|Ni | j∈Ni i 2 i i i i −W (k) + Ai xi + A−i xi−i (k − 1) − bi X 1 + c (λi (k − 1) + λj (k − 1)) 4c|Ni | j∈Ni 2o . (21) −W i (k) + Aii xii + Ai−i xi−i (k − 1) − bi +c λ T λ ∀i ∈ V. j∈Ni For the last two lines of (20), we complete the squared term βi i kx − xii (k − 1)k2 + IΩi (xii ) 2 i o X xi (k − 1) + xji (k − 1) 2 +c xii − i + Uii (k)T xii , (24) 2 .(xii − xii (k − 1)) + j∈Ni where βi > 0 is a penalty factor for the proximal first-order approximation for i ∈ V . We obtain an equivalent problem to (24) in the following such that its gradient w.r.t. xii is equivalent to that of (24). n  αi i −1 i xii (k) = arg min I (x ) + x − α βi xii (k − 1) Ω i i i 2 i xii −∇i Ji (xi (k − 1)) − Uii (k) + c X (xii (k − 1) + xji (k − 1)) j∈Ni T Aii 1:  Ai xi (k − 1) − bi − W i (k) 2c|Ni |  2 o X , λi (k − 1) + λj (k − 1) +c − Algorithm 1 ADMM Algorithm 2: 3: (25) 4: j∈Ni where αi := βi + 2c|Ni |. Let proxag [s] := arg minx {g(x) + − sk2 } be the proximal operator for the non-smooth i function g. Note that proxα IΩi [s] = TΩi [s] where TΩi : R → Ωi is an Euclidean projection. Then for each player i, ∀i ∈ V we obtain, h  xii (k) = TΩi αi−1 γi xii (k − 1) − ∇i Ji (xi (k − 1)) − Uii (k) a 2 kx 5: 6: 7: initialization xi (0) ∈ Ω, λi (0) ∈ Rm , U i (0) = 0N and W i (0) = 0m ∀i ∈ V for k = 1, 2, . . . do for each player i ∈ V do players i, j ∀j ∈ Ni exchange xi (k − 1), xj (k − 1), λi (k − 1)Pand λj (k − 1). U i (k) = U i (k−1)+c j∈Ni (xi (k−1)−xj (k−1)) P i j W i (k) = W ih(k−1)+c j∈Ni (λ (k−1)−λ (k−1))  xii (k) = TΩi αi−1 γi xii (k −1)−∇i Ji (xi (k −1)) P −Uii (k) + c j∈Ni xji (k − 1)  T Aii Ai−i xi−i (k − 1) − bi − W i (k) − 2c|N i| i P +c j∈Ni λi (k − 1) + λj (k − 1)  1 λi (k) = 2c|N Aii xii (k) + Ai−i xi−i (k − 1) − bi i|  i j P (k−1) −W i (k) + 2c j∈Ni λ (k−1)+λ 2 T Aii  i i A x (k − 1) − bi − W i (k) 2c|Ni | −i −i j∈Ni i X +c λi (k − 1) + λj (k − 1) , (26) +c X xji (k − 1) − 8: xi−i (k) = 10: end for 11: end for P 9: j∈Ni T 1 where γi := βi + c|Ni | − 2c|N Aii Aii . i| Eventually, after updating his action and dual Lagrange multiplier, each player i takes average of the received information with his estimate and updates his estimate as follows:  1 1 X j 1 xi−i (k) = xi−i (k−1)+ U i (k), x−i(k−1) − 2 |Ni | 2c|Ni | −i j∈Ni | {z } {z } | RECEIVED INFORMATION PENALTY TERM (27) where c > 0 is a scalar coefficient which is also used in (11). Note that in (27), the penalty term is associated with the difference between the estimates of the neighboring players (Equations (12), (13)). Then the ADMM algorithm is represented as in Algorithm 1. IV. C ONVERGENCE P ROOF Theorem 1. Let βi > 0 be player i’s penalty factor of the approximation in the inexact ADMM Algorithm 1 which satisfies 1 σF > , (28) kAi k2 2βi − c|Ni i | where σF is a positive constant for the cocoercive property of F , Aii is player i’s problem data and Ni is the number of neighbors of player i. Under Assumptions 1-4, the sequence {xi (k)} ∀i ∈ V , generated by Algorithm 1 converges to x∗ NE of game (2). Proof . From step 7 in Algorithm 1, we obtain the following optimality condition: +2c X j∈Ni xii (k) − j∈Ni xj−i (k−1)) |Ni | − i U−i (k−1) 2c|Ni | xii (k − 1) + xji (k − 1)  = 0 ∀i ∈ V, 2 Adding and subtracting Aii xii (k) from the second line of (29) and using (22), it leads to T ∇i Ji (xi (k − 1)) + ∂i IΩi (xii (k)) + Aii λi (k) +δi (xii (k) − xii (k − 1)) + Uii (k) (30) j  i X x (k − 1) + xi (k − 1) +2c = 0 ∀i ∈ V, xii (k) − i 2 j∈Ni T 1 Aii Aii . Adding the first Nash where δi := βi − 2c|N i| condition (9) and multiplying by (xii (k) − x∗i ), we obtain,  T ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k − 1) − x∗i )  T + ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k) − xii (k − 1))  T + ∂i IΩi (xii (k)) − ∂i IΩi (x∗i ) (xii (k) − x∗i )  T + λi (k) − λ∗ Aii (xii (k) − x∗i ) (31) +δi (xii (k) − xii (k − 1))T (xii (k) − x∗i )   ∗ T + Uii (k) − Uii (xii (k) − x∗i ) X xi (k − 1)+xji (k − 1)T i +2c xii (k)− i (xi (k)−x∗i ) = 0 2 j∈Ni ∇i Ji (xi (k − 1)) + βi (xii (k) − xii (k − 1)) + ∂i IΩi (xii (k)) T Ai  i i + i A x (k − 1) − bi − W i (k) (29) 2c|Ni |  X +c (λi (k − 1) + λj (k − 1)) + Uii (k) j∈Ni On the other hand, from (22) we obtain, 0m = −Aii xii (k) − Ai−i xi−i (k − 1) + bi X λi (k) + λj (k) +W i (k) + 2c λi (k) − 2 j∈Ni X +c (λi (k) + λj (k) − λi (k − 1) − λj (k − 1)),(32) j∈Ni i i Note that by (14) and (15), W (k + 1) = W (k) + i j P (k) 2c j∈Ni λi (k) − λ (k)+λ . Then, We add the second 2 Nash condition (9) to (32). Moreover, using Assumption 1, there exists a matrix B i such that we multiply into (32) and then multiply the result by (λi (k) − λ∗ ). T 0 = −(xii (k) − x∗i )T Aii (λi (k) − λ∗ )   ∗ T iT B (λi (k) − λ∗ ) + W i (k + 1) − W i X +c (λi (k) + λj (k) − λi (k − 1) − λj (k − 1))T .B (λi (k) − λ∗ ). j∈Ni iT i (λ (k) − λ∗ ) X (λi (k) + λj (k) − λi (k − 1) − λj (k − 1))T +c .B j∈Ni (33) (λi (k) − λ∗ ). T X xi (k) + xj (k) − xi (k − 1) − xj (k − 1) +c .B The second and third terms are bounded as follows:  T ∇i Ji (xi (k − 1))−∇i Ji (x∗ ) (xii (k)−xii (k − 1)) ≥ (37) ρ −1 k∇i Ji (xi (k − 1))−∇i Ji (x∗ )k2 − kxii (k)−xii (k − 1)k2 , 2ρ 2 (∂IΩi (xii (k)) − ∂IΩi (x∗i ))T (xii (k) − x∗i ) ≥ 0. 1 1 kF (x(k − 1)) − F (x∗ )k2 − kx(k) − x(k − 1)k2M1 2ρ 2 +(x(k) − x(k − 1))T diag((δi ei eTi )i∈V )(x(k) − x∗ ) X X ij ∗ ji ∗ T i ∗ + (ui (k + 1)+viji (k + 1)−uij i −vi ) (xi (k)−xi) − j∈Ni (λi (k) − λ∗ ) (34) j  i X T x (k − 1)+xi (k − 1) (xii (k)−x∗i ) = 0. +2c xii (k)− i 2 j∈Ni The last equation that we need to add it to (34) is the one associated with xi−i , (27), and multiplied by (xi−i − x∗−i ). XX ji T i ∗ (uij −i (k + 1) + v−i (k + 1)) (x−i (k) − x−i ) i∈V j∈Ni 2 T + (w(k + 1) − w∗ )T diag((B i )i∈V )(w(k + 1) − w(k)) c +c(λ(k) − λ(k − 1))T ((D + H) ⊗ Im ) .((D + H) ⊗ IN )(x(k) − x∗ ) ≤ 0, (39) ∗T (35) Adding (35) to (34), and using (12) and (13) for simplification, we obtain,  T ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k − 1) − x∗i )  T + ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k) − xii (k − 1))  T + ∂i IΩi (xii (k)) − ∂i IΩi (x∗i ) (xii (k) − x∗i ) +δi (xii (k) − xii (k − 1))T (xii (k) − x∗i ) X ij ∗ ji ∗ T i ∗ + (ui (k + 1)+viji (k + 1)−uij i −vi ) (xi (k)−xi ) j∈Ni j∈Ni + T j∈Ni ji T i ∗ (uij −i (k + 1) + v−i (k + 1)) (x−i (k) − x−i ) i∈V j∈Ni .diag((B i )i∈V )(λ(k) − λ∗ ) + c(x(k) − x(k − 1))T i U−i (k)T (xi−i (k) − x∗−i ) X xi (k − 1) + xj−i (k − 1) T +2c xi−i (k) − −i 2 X (38) Using (37) and (38) in (36) and summing over i ∈ V , we obtain, T  F (x(k − 1)) − F (x∗ ) (x(k − 1) − x∗ ) iT + (36) for any ρ > 0 ∀i ∈ V . By the convexity of IΩi (Assumption 3), we have for the third term, +δi (xii (k) − xii (k − 1))T (xii (k) − x∗i )   ∗ T + Uii (k) − Uii (xii (k) − x∗i )  ∗ T + W i (k + 1) − W i )T B i (λi (k) − λ∗ ) X +c (λi (k) + λj (k) − λi (k − 1) − λj (k − 1))T . .(xi−i (k) − x∗−i ) = 0. iT j∈Ni Adding (33) to (31), it yields,  T ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k − 1) − x∗i )  T + ∇i Ji (xi (k − 1)) − ∇i Ji (x∗ ) (xii (k) − xii (k − 1))  T + ∂i IΩi (xii (k)) − ∂i IΩi (x∗i ) (xii (k) − x∗i ) .B ∗ ∗ (wij (k + 1) + z ji (k + 1) − wij − z ji )T .(xii (k) − x∗i ) = 0. j∈Ni iT X + ∗T where M1 := diag((ρei eTi )i∈V ), x∗ = [x1 , . . . , xN ]T , T ∗T T ∗T λ = [λ1 , . . . , λN ]T and P λ∗ = [λ1 , . . . , λN ]T . Moreover, w = (wi )i∈V ∈ Rm i∈V |Ni | and wi =P(wij )j∈Ni ∈ ∗ Rm|Ni | and also w∗ = (wi )i∈V ∈ Rm i∈V |Ni | and ∗ ∗ wi = (wiij )j∈Ni ∈ Rm|Ni | . We bound the first term using TAssumption 4,  ∗ F (x(k − 1)) − F (x ) (x(k − 1) − x∗ ) ≥ σF kF (x(k − 1)) − F (x∗ )k2 . (40) We also simplify the fourth and the fifth lines in (39). GC is P an undirected graph, for any {aij }, P Since P P a = a . Then, ij ji i∈V i∈V j∈Ni i X X j∈N ∗ ij ji ij ∗ (ui (k + 1)+vi (k + 1)−ui −viji )T(xii (k)−x∗i ) i∈V j∈Ni + XX i∈V j∈Ni ji T i ∗ (uij −i (k + 1) + v−i (k + 1)) (x−i (k) − x−i ) = XX + XX ∗ ij T i ∗ (uij i (k + 1) − ui ) (xi (k) − xi ) i∈V j∈Ni ∗ (viij (k + 1) − viij )T (xji (k) − x∗i ) i∈V j∈Ni + XX T i ∗ uij −i (k + 1) (x−i (k) − x−i ) i∈V j∈Ni + XX ij (k + 1)T (xj−i (k) − x∗−i ). v−i (41) i∈V j∈Ni Note that by (12) and (13) as well as the initial conditions for Lagrange multipliers uij (0) = v ij (0) = 0N ∀i ∈ V, j ∈ Ni , we obtain, uij (k) + v ij (k) = 0N ∀i ∈ V, j ∈ Ni , k > 0. (42) Substituting and using (9), we obtain, X X ij(42) into (41) ∗ T j i (ui (k + 1) − uij i ) (xi (k) − xi (k)) i∈V j∈Ni + XX j T i uij −i (k + 1) (x−i (k) − x−i (k)) i∈V j∈Ni = ∗ 2 X X ij T ij ij (u (k + 1) − uij i ei ) (u (k + 1) − u (k)) c i∈V j∈Ni 2 := (u(k + 1) − u∗ )T (u(k + 1) − u(k)), c (43) P i ij where u = (ui )i∈V ∈ RN i∈V |Ni | and P u = (u )j∈N∗i ∈ |N | N ∗ i∗ N |Ni | i i∈V and ui = R and also u = (u )i∈V ∈ R ij ∗ (ui )j∈Ni ⊗ ei ∈ RN |Ni | . Using (40) and (43), for ρ = 2σ1F (39) becomes, 1 − kx(k) − x(k − 1)k2M1 2 +(x(k) − x(k − 1))T M2 (x(k) − x∗ ) ∗ T +(λ(k) − λ(k − 1)) Q(λ(k) − λ ) 2 + (u(k + 1) − u∗ )T (u(k + 1) − u(k)) c 2 + (w(k + 1) − w∗ )T B(w(k + 1) − w(k)) ≤ 0, (44) c   where M2 := diag (δi ei eTi )i∈V + c((D + H) ⊗ IN ), B := T o 1 1 + ku(k + 1) − u∗ k2 + kw(k + 1) − w∗ k2B ≤ c c n1 1 ∗ 2 kx(k − 1) − x kM2 + kλ(k − 1) − λ∗ k2Q 2 2 o 1 1 ∗ 2 + ku(k) − u k + kw(k) − w∗ k2B c c 1 1 − kx(k) − x(k − 1)k2M2 −M1 − kλ(k) − λ(k − 1)k2Q 2 2 1 1 2 − ku(k + 1) − u(k)k − kw(k + 1) − w(k)k2B . (47) c c By the condition (28), M2 − M1  0. Then (47) implies the following two results: 1) 12 kx(k) − x∗ k2M2 + 12 kλ(k) − λ∗ k2Q + 1c ku(k + 1) − u∗ k2 + 1c kw(k + 1) − w∗ k2B → θ, for some θ ≥ 0,   x(k) − x(k − 1) → 0N 2  λ(k) − λ(k − 1) → 0 mN 2) . u(k + 1) − u(k) → 0N Pi∈V |Ni |    w(k + 1) − w(k) → 0m Pi∈V |Ni | Result 1 implies that the sequences {xi (k)}, {λi (k)}, {uij (k)} and {wij (k)} (similarly {v ij (k)} and {z ij (k)}) are bounded and have limit points denoted by x̄i , λ̄i , ūij and w̄ij (v̄ ij and z̄ ij ), respectively. Then, we obtain, 1 1 θ = kx̄(k) − x∗ k2M2 + kλ̄(k) − λ∗ k2Q 2 2 1 1 ∗ 2 + kū(k + 1) − u k + kw̄(k + 1) − w̄∗ k2B (48) c c Result 2 along with (12) and (14) yield ∀i ∈ V, j ∈ Ni , x̄i = x̄j := x̄, λ̄i = λ̄j := λ̄ Moreover, by (42) we arrive at, ūij + v̄ ij = 0N ∀i ∈ V, j ∈ Ni . c((D + A) ⊗ IN ) = c((D (2I − LN )D ) ⊗ IN ), 1 1 1 (45) 1 (a(k) − a(k − 1)) M (a(k) − a ) = ka(k) − a∗ k2M 2 1 1 2 + ka(k) − a(k − 1)kM − ka(k − 1) − a∗ k2M . (46) 2 2 Then (44) becomes, n1 1 kx(k) − x∗ k2M2 + kλ(k) − λ∗ k2Q 2 2 ∗ i A x̄ − b − X ij w̄ + z̄ ji = 0m . (52) j∈Ni 1 where L := D − H, D 2 , D− 2 and LN := D− 2 LD− 2 are the Laplacian of GC , the square root and reciprocal square root of D and the normalized Laplacian of GC , respectively. 1 Since D  0, D− 2 exist, it is shown in that λmax (LN ) ≤ 2. Then (45) yields that c((D + H) ⊗ IN )  0. This concludes M2  0. Moreover, by Assumption 1, B  0. We use the following inequality in (44) for every {a(k)} and M  0: T j∈Ni i 1 2 (50) Similarly, w̄ij + z̄ ij = 0m ∀i ∈ V, j ∈ Ni . Result 2 also implies that by (49), (30) and (32): X ij ∇i Ji (x̄) + ∂IΩi (x̄i ) + (ūi + ṽiji ) = 0, (51) diag((B i )i∈V ) and Q := c((D + H) ⊗ IN )B. Note that, 1 2 (49) Comparing (49)-(52) with (9), it follows ∀i ∈ V, j ∈ Ni , x̄i = x∗ (x̄ = x∗ ), λ̄i = x∗ (λ̄ = λ∗ ), ij ij ∗ ū = u ∗ (ū = u ), w̄ ij =w ij ∗ (53) ∗ (w̄ = w ). This completes the proof. (54)  V. S IMULATION R ESULTS In this section, we simulate our algorithm for a wireless ad-hoc network (WANET). Consider a WANET with 16 nodes and 16 multi-hop communication links as in Fig. 1 (a). There are 15 users who aim to transfer data from a source to a destination. Solid line represents a link Lj , j ∈ {1, . . . , 16} and dashed line displays a path Ri , i ∈ {1, . . . , 15} that is assigned to user i to transfer data. Each link Lj has a positive 1 12 R7 L8 R6 R14 L9 R8 13 3 L10 L15 L11 R10 L12 9 L6 L14 R9 16 14 L4 L13 15 2 11 13 3 4 10 4 R3 5 R11 1 R4 L5 R15 L16 12 R5 11 10 VI. C ONCLUSIONS 2 L7 9 14 5 8 7 6 15 R13 8 R2 L3 L1 R12 L2 R1 6 7 Fig. 1: (a) Wireless Ad-Hoc Network (left). (b) Communication graph GC (right). 9 8 7 User Flow Rate 6 5 4 3 2 1 0 500 1000 1500 2000 Iteration Fig. 2: Flow rates of users 1, 3, 5, 15. GNE points are represented by black stars. capacity Cj > 0 that restricts the users’ data flow . The data flow of user i is denoted by xi such that 0 ≤ xi ≤ 10. For each user i, a cost function Ji is defined as in [7]: X κ P Ji (xi , x−i ) := −χi log(xi +1), Cj − w:Lj ∈Rw xw j:Lj ∈Ri where κ > 0 and χi > 0 are network-wide known and userspecific parameters, respectively. The problem is to find a GNE of the game which is played over a communication graph GC (depicted in Fig. 1 (b)). We assume a common constraint x1 + x3 + x5 = 14 between the players. It is straightforward to check the Assumptions 2,3 and 4 on GC and the cost functions. The users’ flow rate and the dual Lagrange multipliers (they converge to 0) as well as the normalized error are shown in Fig. 2 and Fig. 3 for χi = 15 ∀i ∈ {1, . . . , 15} and Cj = 15 ∀j ∈ {1, . . . , 16}. 2 0 λi −2 −4 −6 −8 0 500 1000 1500 2000 Iteration Fig. 3: Dual Lagrange multipliers for users 1, 3, 5, 15. 0 Normalized Error ||x(k)−x*||/||x*|| 10 −2 10 −4 10 −6 10 0 500 1000 1500 2000 Iteration Fig. 4: Normalized error of the users’ data flow. A distributed GNE seeking algorithm is designed within the framework of inexact-ADMM. Each player is only aware of his own cost function, problem data and action set of all players. Each player exchanges the estimates of other players’ actions along with the local copy of his Lagrange multiplier with his communication neighbors. An inexactADMM algorithm is then derived to find a GNE of the game. Convergence of the algorithm is then provided under mild conditions on cost functions. R EFERENCES [1] M. Zhu and E. Frazzoli, “Distributed robust adaptive equilibrium computation for generalized convex games,” Automatica, vol. 63, pp. 82–91, 2016. [2] L. Pavel, “An extension of duality to a game-theoretic framework,” Automatica, vol. 43, no. 2, pp. 226–237, 2007. [3] Z. Han, Game theory in wireless and communication networks: theory, models, and applications. Cambridge University Press, 2012. [4] T. Alpcan and T. Başar, “Distributed algorithms for Nash equilibria of flow control games,” in Advances in Dynamic Games. Springer, 2005, pp. 473–498. [5] F. Facchinei and C. Kanzow, “Generalized Nash equilibrium problems,” Annals of Operations Research, vol. 175, no. 1, pp. 177–211, 2010. [6] A. Fischer, M. Herrich, and K. Schönefeld, “Generalized Nash equilibrium problems-recent advances and challenges,” Pesquisa Operacional, vol. 34, no. 3, pp. 521–558, 2014. [7] F. Salehisadaghiani and L. Pavel, “Distributed Nash equilibrium seeking by gossip in games on graphs,” in Decision and Control (CDC), 2016 IEEE 55th Conference on. IEEE, 2016, pp. 6111–6116. [8] T.-H. Chang, M. Hong, and X. Wang, “Multi-agent distributed optimization via inexact consensus admm,” IEEE Transactions on Signal Processing, vol. 63, no. 2, pp. 482–497, 2015. [9] B. Johansson, “On distributed optimization in networked systems,” Ph.D. Dissertation, 2008. [10] F. Parise, B. Gentile, S. Grammatico, and J. Lygeros, “Network aggregative games: Distributed convergence to Nash equilibria,” in 2015 54th IEEE Conference on Decision and Control (CDC). IEEE, 2015, pp. 2295–2300. [11] F. Salehisadaghiani and L. Pavel, “Distributed Nash equilibrium seeking: A gossip-based algorithm,” Automatica, vol. 72, pp. 209–216, 2016. [12] P. Yi and L. Pavel, “A distributed primal-dual algorithm for computation of generalized nash equilibria with shared affine coupling constraints via operator splitting methods,” arXiv preprint arXiv:1703.05388, 2017. [13] H. Yin, U. V. Shanbhag, and P. G. Mehta, “Nash equilibrium problems with scaled congestion costs and shared constraints,” IEEE Transactions on Automatic Control, vol. 56, no. 7, pp. 1702–1708, 2011. [14] D. A. Schiro, J.-S. Pang, and U. V. Shanbhag, “On the solution of affine generalized Nash equilibrium problems with shared constraints by lemkes method,” Mathematical Programming, pp. 1–46, 2013. [15] D. Paccagnan, B. Gentile, F. Parise, M. Kamgarpour, and J. Lygeros, “Distributed computation of generalized Nash equilibria in quadratic aggregative games with affine coupling constraints,” in Decision and Control (CDC), 2016 IEEE 55th Conference on. IEEE, 2016, pp. 6123–6128. [16] S. Grammatico, “Aggregative control of competitive agents with coupled quadratic costs and shared constraints,” in Decision and Control (CDC), 2016 IEEE 55th Conference on. IEEE, 2016, pp. 3597–3602. [17] D. P. Bertsekas and J. N. Tsitsiklis, Parallel and Distributed Computation: Numerical Methods. Athena Scientific, Belmont, Massachusetts, 1997. [18] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein, “Distributed optimization and statistical learning via the alternating direction method of multipliers,” Foundations and Trends R in Machine Learning, vol. 3, no. 1, pp. 1–122, 2011. [19] B. He and X. Yuan, “On the o(1/n) convergence rate of the douglasrachford alternating direction method,” SIAM Journal on Numerical Analysis, vol. 50, no. 2, pp. 700–709, 2012. [20] E. Wei and A. Ozdaglar, “Distributed alternating direction method of multipliers,” in 2012 IEEE 51st IEEE Conference on Decision and Control (CDC). IEEE, 2012, pp. 5445–5450. [21] F. Salehisadaghiani and L. Pavel, “Distributed Nash equilibrium seeking via the alternating direction method of multipliers,” accepted in IFAC World Congress, 2017.
3cs.SY
Stochastic Runtime Analysis of a Cross-Entropy Algorithm for Traveling Salesman Problems Zijun Wua,1,∗, Rolf H. Möhringb,2,∗∗, Jianhui Laic, arXiv:1612.06962v2 [cs.DS] 11 Oct 2017 a Beijing Institute for Scientific and Engineering Computing (BISEC), Pingle Yuan 100, Beijing, P. R. China b Beijing Institute for Scientific and Engineering Computing (BISEC), Pingle Yuan 100, Beijing, P. R. China c College of Metropolitan Transportation, Beijing University of Technology, Pingle Yuan 100, Beijing, P. R. China Abstract This article analyzes the stochastic runtime of a Cross-Entropy Algorithm mimicking an Max-Min Ant System with iteration-best reinforcement. It investigates the impact of magnitude of the sample size on the runtime to find optimal solutions for TSP instances. For simple TSP instances that have a {1, n}-valued distance function and a unique optimal solution, we show that sample size N ∈ ω(ln n) results in a stochastically polynomial runtime, and N ∈ O(ln n) results in a stochastically exponential runtime, where “stochastically” means with a probability of 1 − n−ω(1) , and n represents number of cities. In particular, for N ∈ ω(ln n), we prove a stochastic runtime of O(N · n6 ) with the vertex-based random solution generation, and a stochastic runtime of O(N · n3 ln n) with the edgebased random solution generation. These runtimes are very close to the best known expected runtime for variants of Max-Min Ant System with best-sofar reinforcement by choosing a small N ∈ ω(ln n). They are obtained for ∗ Principal corresponding author Corresponding author Corresponding author Email addresses: [email protected] (Zijun Wu), [email protected] (Rolf H. Möhring), [email protected] (Jianhui Lai) 1 The author is also affiliated with the School of Applied Mathematics and Physics at Beijing University of Technology 2 The author is a professor emeritus of mathematics at Berlin University of Technology ∗∗ Preprint submitted to Theoretical Computer Science October 12, 2017 the stronger notion of stochastic runtime, and analyze the runtime in most cases. We also inspect more complex instances with n vertices positioned on an m × m grid. When the n vertices span a convex polygon, we obtain a stochastic runtime of O(n4 m5+ ) with the vertex-based random solution generation, and a stochastic runtime of O(n3 m5+ ) for the edge-based random solution generation. When there are k ∈ O(1) many vertices inside a convex polygon spanned by the other n − k vertices, we obtain a stochastic runtime of O(n4 m5+ + n6k−1 m ) with the vertex-based random solution generation, and a stochastic runtime of O(n3 m5+ + n3k m ) with the edge-based random solution generation. These runtimes are better than the expected runtime for the so-called (µ+λ) EA reported in a recent article, and again obtained for the stronger notion of stochastic runtime. Keywords: probabilistic analysis of algorithms, stochastic runtime analysis of evolutionary algorithms, Cross Entropy algorithm, Max-Min Ant System, (µ+λ) EA. 1. Introduction The Cross Entropy (CE) algorithm is a general-purpose evolutionary algorithm (EA) that has been applied successfully to many N P-hard combinatorial optimization problems, see e.g. the book [1] for an overview. It was initially designed for rare event simulation by Rubinstein [2] in 1997, and thereafter formulated as an optimization tool for both continuous and discrete optimization (see [3]). CE has much in common with the famous ant colony optimization (ACO, see [4]) and the estimation of distribution algorithms (EDAs, see [5]). They all belong to the so-called model-based search paradigm (MBS), see [6]. Instead of only manipulating solutions, which is very typical in traditional heuristics like Genetic Algorithms [7] and Local Search [8] and others, MBS algorithms attempt to optimize the solution reproducing mechanism. In each iteration, they produce new solutions by sampling from a probabilistic distribution on the search space. The distribution is often called a model in the literature (see e.g. [6] and [9]). This model evolves iteratively by incorporating information from some elite solutions occurring in the search history, so as to asymptotically model the spread of optimal solutions in the search 2 space. See the recent Thesis [9] for more details on MBS algorithms and their mathematical properties. An important issue for MBS algorithms is to determine a suitable size for the sampling in each iteration. A large sample size makes each iteration unwieldy, however a small sample size may mislead the underlying search due to the randomness in the sampling. Sample size reflects the iterative complexity (computational complexity in each iteration). Whether a large sample size is harmful depends on the required optimization time (i.e., the total number of iterations required to reach an optimal solution). This article aims to shed a light on this issue by theoretically analyzing the relation between sample size and optimization time for a CE variant that includes also some essential features of the famous Max-Min Ant System (MMAS [10]). To this end, a thorough runtime analysis is needed. The theoretical runtime analysis of EAs has gained rapidly growing interest in recent years, see e.g. [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23], [24], and [25]. In the analysis, an oracle-based view of computation is adopted, i.e., the runtime of an algorithm is expressed as the total number of solutions evaluated before reaching an optimal solution. Since the presence of randomness, the runtime of an EA is often conveyed in expectation or with high probability. Due to the famous No Free Lunch Theorem [26], the analysis must be problem-specific. The first steps towards this type of analysis were made for the so-called (1+1) EA [11] on some test problems that use pseudo boolean functions as cost functions, e.g., OneMax [15], LeadingOnes [27] and BinVar [11]. Recent research addresses problems of practical importance, such as the computing a minimum spanning trees (MST) [28], matroid optimization [29], traveling salesman problem [30], the shortest path problem [23], the maximum satisfiability problem [31] and the max-cut problem [32]. Runtime analysis generally considers two cases: expected runtime analysis and stochastic runtime analysis. Expected runtime is the average runtime of an algorithm on a particular problem, see, e.g., the runtime results of (1 + 1) EA reported in [11]. Expected runtime reflects the oracle-based average performance of an algorithm. A mature technique for expected runtime analysis is the so-called drift analysis [12]. However, this technique requires that the algorithm has a finite expected runtime for the underlying problem. By [33], drift analysis is not applicable to the traditional CE [3]. An algorithm with a smaller expected runtime need not be more efficient, see [34] for details. In contrast, stochastic runtime provides a better under3 standing of the performance of a (randomized) EA. Stochastic runtime is a runtime result conveyed with an overwhelming probability guarantee (see, e.g., the classic runtime result of 1-ANT in [15]), where an overwhelming probability means a probability tending to 1 superpolynomially fast in the problem size. It therefore reflects the efficiency of an algorithm for most cases in the sense of uncertainty. This article is concerned with stochastic runtime analysis, aiming to figure out the relation between stochastic runtime and magnitude of the sample size. Runtime analysis of CE algorithms has been initiated in [33], where Wu and Kolonko proved a pioneering stochastic runtime result for the traditional CE on the standard test problem LeadingOnes. As a continuation of the study of [33], Wu et al [34] further investigated the stochastic runtime of the traditional CE on another test problem OneMax. The runtime results reported in [33] and [34] showed that sample size plays a crucial role in efficiently finding an optimal solution. In particular, Wu et al [34] showed that if the problem size n is moderately adapted to the sample size N , then 4 the stochastic runtime of the traditional CE on OneMax is O(n1.5+ 3  ) for arbitrarily small  > 0 and a constant smoothing parameter ρ > 0, which beats the best-known stochastic runtime O(n2 ) reported in [13] for the classic 1-ANT algorithm, although 1-ANT employs a much smaller sample size (i.e., sample size equals one). Moreover, by imposing upper and lower bounds on the sampling probabilities as was done in MMAS [10], Wu et al [34] showed further that the stochastic runtime of the resulting CE can be significantly improved even in a very rugged search space. The present article continues the stochastic runtime analysis of [34], but now in combinatorial optimization with a study of CE on the traveling salesman problem (TSP). We emphasize the impact of the magnitude of N on the stochastic runtime, put ρ = 1, and consider a CE variant resembling an MMAS with iteration-best reinforcement under two different random solution generation mechanisms, namely, a vertex-based random solution generation and an edge-based random solution generation. Stochastic runtime for MMAS with iteration-best reinforcement on simple problems like OneMax has been studied in [20] and [25]. In particular, Neumann et al [20] showed that to obtain a stochastically polynomial runtime for OneMax, N/ρ ∈ Ω(ln n) is necessary. We shall not only extend this to TSP for the case of ρ = 1, but also prove that N ∈ ω(ln n) is already sufficient to guarantee a stochastically polynomial runtime for simple TSP instances. 4 TSP is a famous N P-complete combinatorial optimization problem. It concerns finding a shortest Hamiltonian cycle on a weighted complete graph. Existing algorithms exactly solving TSP generally have a prohibitive complexity. For instance, the Held-Karp algorithm [35] solves the problem with a complexity of O(n2 2n ). A well-known polynomial time approximation algorithm for metric TSP is the so-called Christofides algorithm [36], which finds a solution with a cost at most 3/2 times the cost of optimal solutions. As mentioned in [37], this is still the best known approximation algorithm for the general metric TSP so far. For Euclidean TSP there exists a famous polynomial-time approximation scheme (PTAS) by Arora, see [38]. To design a superior approximation algorithm, researchers in recent years tend to study TSP instances with particular structures, see, e.g., [39]. Due to the prohibitive running time of exact algorithms, heuristics are frequently employed in practice so as to efficiently compute an acceptable solution for a TSP problem, e.g., the Lin-Kernighan (LK) algorithm [40]. As a popular heuristic, CE has also been applied in practice to solve TSP instances, see [41] and [3]. The implementation there shows that CE can also efficiently compute an acceptable solution. In view of the high complexity of general TSP, we consider in our analysis two classes of TSP instances with a particular structure. The first kind of instances has been used in [19] and [42] for analyzing the expected runtime of some MMAS variants with best-so-far reinforcement. These TSP instances have polynomially many objective function values and a unique optimal solution. Moreover, on these TSP instances, solutions containing more edges from the optimal solution have a smaller cost than those with fewer such edges. For more details on these instances, see Section 5. For these simple instances, we prove in Theorem 2 that with a probability  1 − e−Ω(n ) , the runtime is O(n6+ ) with the vertex-based random solution generation, and O(n3+ ln n) with the edge-based random solution generation, for any constant  ∈ (0, 1) and N ∈ Ω(n ). For the case of N ∈ ω(ln n), we show that the runtimes (resp., O(n6 N and n3 (ln n)N ) are even smaller with probability 1 − n−ω(1) , see Corollary 1. These results are very close to the known expected runtime O(n6 + n lnρ n ) for (1 + 1) MMAA reported in [19], and the expected runtime O(n3 ln n + nρln ) for MMAS∗Arb reported in [42] (where ρ ∈ (0, 1) is an evaporation rate), if N ∈ ω(ln n) is suitably small. But they give the stronger guarantee of achieving the optimal solution in the respective runtime with an overwhelming probability. Moreover, we show 5 a stochastically exponential runtime for a suitable choice of N ∈ O(ln n), see Theorem 3. This generalizes the finding in [20] for OneMax to TSP instances. Therefore, N ∈ Ω(ln n) is necessary, and N ∈ ω(ln n) is sufficient for a stochastically polynomial runtime for simple TSP instances. We also inspect more complex instances with n vertices positioned on an m×m grid, and the Euclidean distance as distance function. These instances have been employed in [43] and [30] for analyzing the expected runtime of (µ+λ) EA and randomized local search (RLS). When the n vertices span a convex polygon without vertices in the interior of the polygon (so they are the corners of that polygon), we prove a stochastic runtime of O(n4 m5+ ) for the vertex-based random solution generation, and a stochastic runtime of O(n3 m5+ ) for the edge-based random solution generation, see Theorem 4 for details. Similarly, the  in the stochastic runtimes can be removed by slightly decreasing the probability guarantee, see Corollary 2. When the vertices span a convex polygon with k ∈ O(1) vertices in the interior, we show a stochastic runtime of O(n4 m5+ + n6k−1 m ) with the vertex-based random solution generation, and a stochastic runtime of O(n3 m5+ + n3k m ) with the edge-based random solution generation, see Theorem 5 for details. These runtimes are better than the expected runtime for the so-called (µ+λ) EA and RLS reported in the recent paper [30]. The remainder of this paper is arranged as follows. Section 2 defines the traditional CE and related algorithms, Section 3 defines the traveling salesman problem and provides more details of the used CE variants, Section 4 shows some important facts on the two random solution generation methods, and Section 5 reports the stochastic runtime results on the TSP instances. A short conclusion and suggestions for future work are given in Section 6. Notations for runtime Our analysis employs some commonly used notations from complexity theory. We use O(f (n)) to denote the class of functions which are bounded from above by the function f (n), i.e., those functions g(n) with g(n) ≤ c·f (n) for large enough n and some constant c ≥ 0 not depending on n. Similarly, Ω(f (n)) is the class of functions that are bounded from below by f (n), i.e., for any g(n) ∈ Ω(f (n)) there exists a constant c > 0 not depending on n such that g(n) ≥ c · f (n) for large enough n. Class Θ(f (n)) is the intersection of Ω(f (n)) and O(f (n)). Class o(f (n)) is the class of functions g(n) with g(n)/f (n) → 0 as n → ∞, and class ω(f (n)) is the class of functions 6 g(n) with g(n)/f (n) → +∞ as n → ∞. Obviously, o(f (n)) ⊂ O(f (n)) and ω(f (n)) ⊂ Ω(f (n)). 2. The general cross entropy algorithm and related algorithms We now introduce the traditional CE algorithm. The CE variant we will analyze inherits the framework of this traditional version. To compare our results with those in the literature, we shall give also details about some related algorithms. 2.1. The traditional cross entropy algorithm Algorithm 1 lists the traditional CE that was proposed in [3], adapted to an abstract notion of combinatorial optimization problems. The algorithm assumes a combinatorial minimization problem (S, f ), where S is a finite search space of “feasible” solutions and f is the cost function. Every feasible solution s ∈ S is composed of elements from a fixed finite set A, the ground set of the problem, i.e., we assume S ⊆ An for some integer n ∈ N. Furthermore there is a product distribution on the product space An that induces a distribution on S ⊆ An . The distribution on An can usually be represented as a vector (or matrix) of real-valued probabilities. The convex combination of the two distributions in Step 6 of Algorithm 1 then corresponds to a convex combination of the two vectors (or matrices). Specific to the TSP, the ground set A can be the set of nodes or edges, n is the number of nodes, and a feasible solution is a sequence of elements from A that forms a Hamiltonian cycle. The product distribution for the TSP is represented as an n×n matrix. When we consider the set of nodes as our ground set A, each row i of the matrix is a marginal distribution that specifies choice probabilities for all nodes following the current node i. A random Hamiltonian cycle is sequentially constructed from the product distribution by allowing only nodes not yet visited as continuations in each step, see Algorithm 2 for more details. When we consider the set of edges as A, marginals of the product distribution will be represented by the same n×n matrix where the sum of the (i, j)-th and (j, i)-th entries reflects the probability that the edge {i, j} occurs in a random solution. A random Hamiltonian cycle is still constructed sequentially and only edges leading to a feasible solution are taken in each step, see Algorithm 3 for details. 7 Algorithm 1 The general Cross-Entropy algorithm Input: an initial distribution Π0 on the solution space, a fixed smoothing parameter ρ ∈ (0, 1], a sample size N ∈ N+ , an elite size M ∈ N+ with M ≤ N 1: 2: 3: 4: 5: 6: 7: 8: t = 0; loop (1) (N ) independently generate N random solutions Xt , . . . , Xt with the current distribution Πt ; [1] sort these N solutions in non-decreasing order as f (Xt ) ≤ · · · ≤ [N ] f (Xt ) according to the cost function f ; learn an empirical distribution Wt from the M best solutions [1] [M ] X t , . . . , Xt ; set Πt+1 = (1 − ρ)Πt + ρWt ; t = t + 1; end loop Traditionally, CE sets a small elite ratio α ∈ (0, 1) and uses the best bα · N c solutions in Step 5 to build the empirical distribution Wt . Here, we use the elite size M instead. This does not intrinsically change the original algorithm. Steps 3 and 5 depend on the detailed definition of the underlying problem. We shall give details to them in Subsection 3.2. Step 6 of Algorithm 1 plays a crucial role in the different theoretical analyses of the algorithm, see, e.g., [44], [33], [45], [9], [34]. The occurrence of good solutions are probabilistically enforced by incorporating the new information Wt into Πt+1 . This idea, somehow, coincides with the reinforcement learning in [46]. The smoothing parameter ρ reflects the relative importance of the new information Wt in the next sampling. It balances global exploration and local exploitation to a certain degree. A larger ρ makes the algorithm concentrate more on the particular area spanned by the elite solu[1] [M ] tions Xt , . . . , Xt , while a smaller ρ gives more opportunities to solutions outside that area. However, balancing global exploration and local exploitation through tuning ρ is ultimately limited. Wu and Kolonko [33] proved that the famous “genetic drift” [47] phenomenon also happens in this algorithmic scheme, i.e., the sampling (Step 3) eventually freezes at a single solution and that solution needs not to be optimal. This means that the algorithm gradually 8 loses the power of global exploration. As a compensation for global exploration, Wu et al [34] proved that a moderately large sample size N might be helpful. The results there showed that a moderately large N configured with a large ρ (e.g., ρ = 1) can make the algorithm very efficient. Although a large N introduces a high computational burden in each iteration, the total number of iterations required for getting an optimal solution is considerably reduced. Wu et al [34] also indicated another way to compensate the global exploration, i.e., imposing a lower bound πmin ∈ (0, 1) and an upper bound πmax ∈ (0, 1) on the sampling distributions in each iteration. This idea is originated from MMAS [10]. In each iteration t, after applying Step 6, the entries of distribution Πt+1 that are out of the range [πmin , πmax ] are reset to that range by assigning to them the nearest bounds, see (6) in Section 3 for more details. Wu et al [34] have proved that this can make CE more efficient even in the case of a rugged search space. To follow these theoretical suggestions made in [34], we shall in our stochastic runtime analysis use a CE that modifies the traditional CE (Algorithm 1) accordingly. We shall see that these modifications make the CE very efficient for the considered TSP instances. 2.2. Related evolutionary algorithms Related evolutionary algorithms for TSP whose runtime has been extensively studied are RLS [28], (µ + λ) EA [30], and those theoretical abstractions of MMAS [10] including MMAS∗bs [17], (1+1) MMAA [19]. We now give algorithmic details of them. In order to facilitate the comparison, their runtimes for TSP instances will be discussed in Section 5. (µ + λ) EA is an extension of the famous (1 + 1) EA [11]. (µ + λ) EA randomly chooses µ solutions as the initial population. In each iteration, (µ+λ) EA randomly chooses λ parents from current population, then produces λ children by applying randomized mutation to each of the selected parents, and forms the next population by taking the best µ solutions from these µ + λ solutions in the end of current iteration. The expected runtime of (µ + λ) EA on TSP instances is studied in [30], where Sutton et al uses a Poisson distribution to determine the number of randomized mutations (2opt move or jump operation) should be taken by a selected parent in each iteration. RLS is a local search technique [48]. It employs a randomized neighborhood. In each iteration, it randomly chooses a number of components of the 9 best solution found so far and then changes these components. The expected runtime of RLS for TSP instances is also studied in [30], where the neighborhood is taken to be a k-exchange neighborhood with k randomly determined by a Poisson distribution. (1+1) MMAA is a simplified version of the famous MMAS [10], where the sample size is set to 1 and pheromones are updated only with the best solution found so far (best-so-far reinforcement) in each iteration. In each iteration of (1+1) MMAA, the ant which constructed the best solution found so far deposits an amount πmax of pheromones on the traversed edges, and an amount πmin of pheromones on the non-traversed edges, and the pheromones are updated by linearly combining the old and these newly added pheromones as in Algorithm 1. The expected runtime of (1+1) MMAA on simple TSP instances is studied in [19]. The expected runtime of its variant MMAS∗Arb on simple TSP instances is studied in [42]. 3. The traveling salesman problem and details of the CE variant Now, we formally define TSP, and give more details of the CE variant we will analyze. 3.1. The traveling salesman problem We consider an undirected graph G = (V, E) with vertex set V = {1, . . . , n}  and edge set E = {i, j} | i ∈ V, j ∈ V, i 6= j . A Hamiltonian cycle is a sequence {{il , il+1 } | l = 1, . . . , n} of edges such that a) i1 = in+1 ; b) (i1 , . . . , in ) is a permutation of {1, 2, . . . , n}. This definition actually considers E as the ground set A. As mentioned above, we can also put A = V and represent Hamiltonian cycles in a more compact way as permutations of V. Note that a Hamiltonian cycle corresponds to n different permutations, whereas a permutation corresponds to a unique Hamiltonian cycle. However, the two representations are intrinsically the same. We shall use them interchangeably in the sequel. To facilitate our discussion, we shall refer to a Hamiltonian cycle by just referring to one of the n corresponding permutations, and denote by S the set of all possible permutations. We employ the convention that two permutations are said 10 to be same iff they form the same underlying Hamiltonian cycle. The notation {k, l} ∈ s shall mean that the edge {k, l} belongs to the underlying Hamiltonian cycle of the solution (permutation) s. Once a distance function d : E 7→ R+ is given, the (total traveling) cost f (s) of a feasible solution s = (i1 , i2 , . . . , in ) ∈ S is then calculated by f (s) := n−1 X d(ij , ij+1 ) + d(in , i1 ). (1) j=1 We denote by S ∗ ⊆ S the set of feasible solutions (Hamiltonian cycles) that minimize the cost (1). 3.2. Details of the CE variant The CE variant we consider in the analysis completely inherits the structure of Algorithm 1, and additionally employs a component from MMAS. We now formalize the sampling distribution, and define Steps 3 and 5 in more detail. As mentioned, we represent a sampling distribution (a product distribution on An ) for the TSP by a matrix Π = (πi,j )n×n , such that Pn a) j=1 πi,j = 1, for all i = 1, . . . , n, b) πi,i = 0 for all i = 1, . . . , n, c) πi,j = πj,i for each edge {i, j} ∈ E. For each edge {i, j} ∈ E, πi,j reflects the probability that a Hamilton cycle continues with vertex j when it is in vertex i. In the sequel, we write the t sampling distribution Πt in iteration t as (πi,j )n×n , where the superscript t of t 0 πi,j indicates the iteration. The initial distribution Π0 = (πi,j )n×n is, without 1 0 0 for loss of generality, set to be the uniform distribution, i.e., πi,j = πj,i = n−1 all edges {i, j} ∈ E. We shall consider two random solution generation methods, a vertex-based random solution generation and an edge-based random solution generation. Algorithm 2 lists the vertex-based random solution generation method. This method uses V as the ground set A. A product distribution of An is therefore represented as a matrix Π = (πi,j )n×n satisfying a)-c) above, i.e., each row of Π represents a sampling distribution on A = V. Directly sampling from Π may produce infeasible solutions from An − S. To avoid that, Algorithm 2 starts with a randomly fixed initial node, and then sequentially extends 11 a partial solution with an unvisited vertex until a complete permutation is obtained. This method is efficient and rather popular in practice, see, e.g., [41] and [4]. Here, “s + (v)” means that appends a vertex v to the end of a partial solution s. Algorithm 2 Vertex-based random solution generation Input: a distribution Π = (πi,j )n×n Output: a permutation of 1, 2, . . . , n 1: s = ∅, and Vunivisted = V ; 2: randomly select v from V, s = s + (v), and Vunvisited = Vunvisited − {v}; 3: while (|Vunvisited 6= ∅|) do 4: select a random vertex v 0 from Vunvisited with a probability P[v 0 | s] = P πv,v0 k∈Vunvisited 5: 6: 7: 8: πv,k ; (2) set s = s+(v 0 ), Vunvisited = Vunvisited − {v 0 }; v = v0; end while return s; The edge-based random solution generation is listed in Algorithm 3. The idea is from [42]. This method considers edge set E as the ground set A. A feasible solution is then a sequence of edges that form a Hamiltonian cycle, i.e. S ⊆ E n . To unify the notation of feasible solutions, Algorithm 3 translates its outcomes into permutations. As the actual ground set is E, a product matrix such that each row is a marginal specifying distribution is an n× n(n−1) 2 a sampling distribution on E. Algorithm 3 only considers those with identical marginals, a product distribution can be therefore fully characterized by one of its marginals and is therefore again represented by an n × n matrix Π = (πi,j )n×n as above. PAn edge P {i, j} ∈ E is then sampled from Π with probability (πi,j + πj,i )/ nk=1 nl=1 πk,l = 2πi,j /n since each row of Π sums up to 1. A random sequence ∈ E n is generated by independently sampling from Π n times. To avoid infeasible solutions, Algorithm 3 considers in every sampling only edges that are admissible by the edges selected before. Given a set B of edges such that the subgraph (V, B) does neither contain a 12 cycle nor a vertex of degree ≥ 3, an edge e0 ∈ E is said to be admissible by B if and only if the subgraph (V, B ∪ {e0 }) still does neither contain a cycle nor a vertex of degree ≥ 3. We denote by Badmissible the set of edges ∈ / B that are admissible by B. Algorithm 3 Edge-based random solution generation Input: a distribution Π = (πi,j )n×n Output: a permutation of 1, 2, . . . , n 1: B = ∅, Badmissible = E; 2: while (|B| ≤ n − 1) do 3: select an edge {i, j} from Badmissible with a probability P[e | s] = P 4: 5: 6: 7: 8: πi,j + πj,i ; {k,l}∈Badmissible πk,l + πl,k (3) set B = B∪{{i, j}}; update Badmissible ; end while let s = (1, i2 , i3 , . . . , in ) with {1, i2 }, {ij , ij+1 } ∈ B for j = 2, . . . , n−1; return s; (1) (N ) The N random solutions Xt , . . . , Xt in iteration t are then generated by N runs of Algorithm 2 or Algorithm 3 with the current distribution Πt = t t )n×n is then calculated from )n×n . The empirical distribution Wt = (wi,j (πi,j the M elite solutions by setting PM ({i, j}) k=1 1{e0 ∈E | e0 ∈X[k] t t } wi,j = , (4) M where 1A (·) is the indicator function of set A = {e0 ∈ E | e0 ∈ Xt } for each t+1 {i, j} ∈ E. The next distribution Πt+1 = (πi,j )n×n is therefore obtained as [k] t+1 t t πi,j = (1 − ρ)πi,j + ρwi,j (5) for each {i, j} ∈ E. We continue with the suggestions made in [34]. In the CE variant, we shall use a moderately large N and a large ρ = 1. To fully use the best elite 13 solutions, we take M = 1. To prevent premature convergence (i.e., a possible stagnation at a non-optimal solution), we employ a feature from MMAS [10], called max-min calibration, in the construction of Πt+1 ,. We choose a lower bound πmin ∈ (0, 1) and an upper bound πmax ∈ (0, 1), and, after applying (5), adjust Πt+1 by  t+1  πmin if πi,j < πmin , t+1 t+1 t+1 πi,j = πi,j (6) if πi,j ∈ [πmin , πmax ],   t+1 πmax if πi,j > πmax , for any edge {i, j} ∈ E. Note that the max-min calibration is the only step that does not occur in the general CE (i.e., Algorithm 1). This setting turns CE into an MMAS with iteration-best reinforcement, [1] i.e., only the iteration-best solution Xt is allowed to change the ‘pheromones’ Πt . Stützle and Hoos [10] indicated in an empirical study that the practical performance of iteration-best reinforcement is comparable to best-so-far reinforcement for TSP instances. Thus, it should also be worthwhile to compare the theoretical runtime of iteration-best reinforcement with the known expected runtimes of best-so-far reinforcement for TSP instances presented in, e.g., [19] and [42]. 4. Properties of the random solution generation methods Before we start with our runtime analysis, we shall discuss some relevant properties of the two random solution generation methods, which concern the probability of producing a k-exchange move of the iteration-best solution in the next sampling. Formally, a k-exchange move on a Hamiltonian cycle is an operation that removes k edges from the cycle and adds k new edges to obtain again a cycle. A k-opt move is a k-exchange move reducing the total travel cost. Figure 1a shows an example of a 2-exchange move, in which edges {i, j}, {k, l} are removed, and edges {i, l}, {k, j} are added.Figure 1b shows an example of a 3-exchange move. In our analysis, we shall consider only iteration-best reinforcement with ρ = 1 and the max-min calibration (6). The empirical distribution Wt = t (wi,j )n×n for each iteration t ∈ N in this particular case therefore satisfies ( [1] min{1, πmax } = πmax if edge {i, j} ∈ Xt , t+1 t+1 πi,j = πj,i = (7) max{0, πmin } = πmin otherwise, 14 i k i l w v k j l j (a) A 2-exchange move (b) A 3-exchange move Figure 1: Examples for edge exchange moves for every edge {i, j} ∈ E and iteration t ∈ N. Furthermore, Πt+1 = Wt . [1] Since Πt+1 is biased towards the iteration-best solution Xt , k-exchanges [1] of Xt with a large k are unlikely to happen among the N draws from Πt+1 by either of the two generation methods. Thus, an optimal solution is more likely to be reached by a sequence of repeatedly k-exchange moves with small k from iteration-best solutions. Therefore, it is necessary to estimate the [1] probabilities of producing a k-exchange of Xt in the two generation methods, especially for the case of small k. 4.1. Probabilities of producing k-exchanges in the vertex-based random solution generation The probability of producing k-exchanges with k = 2, 3 in the vertexbased random solution generation has been studied in Zhou [19]. With πmin = 1 and πmax = 1 − n1 , Zhou [19] proved for (1 + 1) MMAA that with a n2 probability of Ω(1/n5 ), Algorithm 2 produces a random solution having more edges from s∗ than x∗t (the best solution found so far) provided that x∗t is not optimal. Zhou [19] actually showed that if x∗t 6= s∗ , then there exists either a 2-opt move or a 3-opt move for x∗t , and Algorithm 2 produces an arbitrary 2-exchange of x∗t with a probability of Ω(1/n3 ), and an arbitrary 3-exchange of x∗t with a probability of Ω(1/n5 ). 1 Although we use πmin = n(n−2) and consider iteration-best reinforcement, a similar result holds in our case. Claim 1 below gives a lower bound on the probability of producing a k-exchange move of the iteration-best solution in the next round with the vertex-based random solution generation. 15 [1] Claim 1. Let M = 1, ρ = 1, and consider a k-exchange move of Xt for some integer k = 2, 3, . . . , n. Then, Algorithm 2 produces the given k-exchange move with a probability Ω(1/n2k−1 ) in every of the N draws in iteration t + 1. Proof. Recall that in Algorithm 2, the probability (2) to select a continuing t t ) for (or, equivalently, πj,i edge {i, j} is always bounded from below by πi,j each iteration t ∈ N, since each row of Πt sums up to 1. Given a k-exchange [1] move of Xt , one possibility to generate it from Πt+1 = Wt by Algorithm 2 is that one of the new edges is added in the last step. This happens with a n−k  1 k−1 1 · 1 − n1 ≥ e·n2k−1 probability at least n1 · n(n−2) , where e ≈ 2.71828 1 is Euler’s number, n represents the probability to select the starting vertex, 1 is the common lower bound of the probability to select the remaining n(n−2) k − 1 new edges, and 1 − n1 is the common lower bound of the probability to [1] select one of the remaining n − k edges from Xt . [1] Because of Claim 1, every 2-exchange of Xt is produced from Πt+1 by Algorithm 2 with a probability Ω(1/n3 ), and every 3-exchange is produced by Algorithm 2 with a probability Ω(1/n5 ). Note that for any k = 2, 3, . . . , [1] if a k-opt move of Xt occurs among the N draws in the next sampling, [1] [1] then f (Xt+1 ) < f (Xt ) must hold. Thus, if we take a moderately large sample size, say N = Θ(n5+ ) for some  > 0, with a probability 1 − (1 −  [1] [1] Ω(n−5 ))Ω(5+) = 1 − e−Ω(n ) , f (Xt+1 ) < f (Xt ) will hold, provided that there [1] still exists a 2-opt or 3-opt move from Xt . Claim 2. Suppose that M = 1, ρ = 1. Then, for iteration t + 1, the probability [1] that Algorithm 2 produces a solution with a cost not larger than Xt in one application is in Ω(1). [1] Proof. Observe that the probability that Xt is reproduced in one application of Algorithm 2 is larger than (1 − 1/n)n−1 ∈ Ω(1), which implies that the [1] cost of the generated random solution is not larger than f (Xt ). [1] Note that if Xt is reproduced at least once among the N draws in the [1] next sampling, then f (Xt+1 )[1] ≤ f (Xt ). Thus, if the sample size N ∈ [1] [1] Ω(ln n), then f (Xt+1 ) ≤ f (Xt ) with a probability 1 − (1 − Ω(1))N = 1 − [1] [1] O(1/n). Particularly, when N ∈ Ω(n ) for some  > 0, f (Xt+1 ) ≤ f (Xt )  with an overwhelming probability 1 − e−Ω(n ) . 16 4.2. Probabilities of producing k-exchanges in the edge-based random solution generation The behavior of the edge-based random solution generation is comprehensively studied in [42]. Kötzing et al [42] proved for MMAS∗Arb and a constant k ∈ O(1) that, with a probability of Ω(1), Algorithm 3 produces a random solution that is obtained by a k-exchange move from the best solution found so far. t t t t Recall that in each iteration t, either πi,j = πj,i = πmin or πi,j = πj,i = πmax for any edge {i, j} ∈ E. For convenience, we will call an edge {i, j} ∈ E with t t = πmax a high edge, and otherwise a low edge. Kötzing et al [42] = πj,i πi,j showed the probability of the event that Algorithm 3 chooses √ a high edge in an arbitrary fixed step conditioned on the event that l ≤ n low edges have been chosen in some l steps before this step is 1 − O(1/n). Our setting is 1 only slightly different with from theirs, i.e., we use πmin = n(n−2) but they 1 put πmin = n(n−1) . Thus, the result should also hold here. Claim 3 below formally asserts this, readers may also refer to [42] for a similar proof. Claim 3. Assume M = 1, ρ = 1. Then, the probability of choosing√a high edge at any fixed step in Algorithm 3 is at least 1 − 12/n if at most n low edges have been chosen before that step and there exists at least one high admissible edge to be added. Proof. √ We now fix a step n−m for some m = 0, 1, . . . , n−1, and assume that l ≤ n low edges have been chosen before this step. Obviously, we still need to add m + 1 ≥ 1 edges to obtain a complete solution. We now estimate the numbers of admissible high and low edges in this step. Note that every of the l low edges blocks at most 3 of the m+l remaining high edges (at most two which are incident to the end points of the low edge, and at most one that may introduce a cycle). So at least m+l − 3l = m−2l ≥ m−3l high edges are available for adding in this step. Of course, it may happen that there is no admissible high edges in this step. However, we are not interested in such a case. We consider only the case that there exists at least one admissible high edge in this step, i.e. the number of admissible high edges in this step is at least max{1, m − 3l}. Note also that the n−m edges added before partition the subgraph of G = (V, E) with vertices V and edges from the partial solution constructed so far into exactly m connected components (here, we see an isolated vertex also as a connected component). For any two of the components, there are at most 4 admissible edges connecting them. 17   Therefore, there are at most min{4 m2 , n2 } admissible low edges. Observing √ l ≤ n, the probability of choosing a high edge in this step is bounded from below by (   √ 2m2 3 min{4 m2 , n2 } πmin 1− (m−3l)n(n−2) ≥ 1− (n−2) if m > 3 n, ≥ (8) 1− √ 12 max{1, m − 3l} πmax if m ≤ 3 n, 1− n−2 where the first inequality is obtained by observing that       m n n 2 min{4 , } ≤ min{2m , } ≤ 2m2 , 2 2 2 τmax = 1 − 1/n, πmin = 1 , n(n−2) and 2m2 m−3l ≤ 2 √ 1 − 3 2n m m ≤ 3n. With Claim 3, we can show that, for any t ∈ N and any fixed k ∈ O(1), [1] the probability of the event that a k-exchange of Xt is produced by one application of Algorithm 3 is Ω(1), see Claim 4. Here, we shall use a different proof from the one presented by Kötzing et al [42], which appears to us as problematic. Claim 4. Let M = 1, ρ = 1. For any k ∈ O(1), with probability Ω(1), the [1] random solution produced by Algorithm 3 is a k-exchange of Xt . Proof. Let k ∈ O(1) be arbitrarily fixed, and M be the set of all k-element subsets of {1, 2, . . . , n/2} (where we assume without loss of generality that n is even). Obviously, |M| ∈ Θ(nk ) since k ∈ O(1). Let M ∈ M be an arbitrarily fixed k-element subset. The probability of the event that Algorithm 3 selects k new edges (low edges) at steps i ∈ M and n − k edges (high edges) [1] from Xt at other steps, is bounded from below by  n−i+1 − (n − i + k + 1))πmin 1 1 n−k Y ( 2 ≥ Θ( k ), (9) 1 − O( ) n n(n − 1)πmin + (n − i + k + 1)πmax n i∈M where 1 − O(1/n) is a lower bound for the probability of selecting an edge [1] from Xt . In each step i ∈ M, the edges chosen before partition the graph into n−i+1 connected components, and for any two of the components there exists at least 2 edges connecting them without introducing a cycle. Hence,  n−i+1 there are at least admissible edges in each step i ∈ M. Notice also 2 that the number of admissible high edges in this case is at most n − i + k + 1 18 (n − i+k+1 is the maximal number of high edges that have not been chosen ((n−i+1 )−(n−i+k+1))πmin 2 of (9) is just the lower before). Therefore, each factor n(n−1)π min +(n−i+k+1)πmax bound of the probability for choosing an admissible edge not belonging to [1] Xt in a step i ∈ M. As a result, the probability of the random event that Algorithm 3 pro[1] duces a k-exchange of Xt with k ∈ O(1) in any of the N independent draws in iteration t+1 is bounded from below by |M|·Θ( n1k ) = Θ(nk )·Θ( n1k ) ∈ Ω(1), since new edges can also be added in steps l ≥ n/2. Notice that in the edge-based random solution generation, for any k = [1] 2, 3, . . . , n, any two k-exchanges of Xt are generated with the same probability, since the generation does not require adding the edges in a particular order. Therefore, by Claim 4, for any k ∈ O(1), any specified k-exchange of [1] [1] Xt will be produced with a probability Θ(1/nk ). Since reproducing Xt can [1] be seen as a 0-exchange of Xt , we can thus derive the following conclusion. Claim 5. Let M = 1, ρ = 1. With probability Ω(1), the random solution [1] generated by Algorithm 3 has a cost not larger than that of Xt . Claim 6 shows that it is unlikely that the random solution generated by [1] Algorithm 3 is “very” different from the last iteration-best solution Xt . This will be fundamental for deriving the runtime lower bound. Claim 6. Let M = 1, ρ = 1. For any δ ∈ (0, 1], with an overwhelming min{δ,1/4}/2 ) probability 1 − e−ω(n , the random solution generated by Algorithm 3 [1] is a k-exchange move from Xt for some k < nδ . Proof. Let δ ∈ (0, 1] be arbitrarily fixed, and put γ = min{δ, 1/4}. To prove the claim, we just need to show that with an overwhelming probability, the [1] random solution generated by Algorithm 3 is a k-exchange of Xt for some k ≤ nγ ≤ n1/4 . This is again implied by the fact that with an overwhelming γ probability, at most nγ/2 low edges are chosen within the first T := n − 3n4 γ steps in Algorithm 3, since the best case nγ/2 + 3n4 is still smaller than nγ . By Claim 3, for any k ≤ nγ/2 and any m ≤ T, Algorithm 3 chooses high edges with a probability at least 1 − 12/n at step m if at most k edges have been chosen before step m, since there exist at least n − m − 3k ≥ 3nγ − 3nγ/2 ≥ 3 admissible high edges at step m. 4 19 Let P denote the probability of the random event that at most nγ/2 low edges are chosen within T steps, and Q the probability of the random event that at least nγ/2 + 1 low edges are chosen within the same T steps. Then P = 1 − Q. We shall bound Q from above, which will give a lower bound for P. Let E be the random event that at least nγ/2 + 1 low edges are chosen within T steps. Then Q = P[E]. For each l = 1, . . . , nγ/2 + 1, we define a random variable vl denoting the first step m ≤ T such that l low edges are chosen within m steps. Obviously, E implies the random event E1 that v1 < v2 < · · · < vnγ/2 +1 ≤ T. Thus, Q ≤ P[E1 ], and P ≥ 1 − P[E1 ]. Observe that X P[E1 ] = P[v1 = a1 , . . . , vnγ/2 +1 = anγ/2 +1 ], a1 <a2 <···<anγ/2 +1 ≤T and v1 = a1 , . . . , vnγ/2 +1 = anγ/2 +1 is equivalent to the random event that before step a1 only high edges are chosen, that at any step between al and al+1 only high edges are chosen for any l with 1 ≤ l ≤ nγ/2 , and that at steps a1 , . . . , anγ/2 +1 only low edges are chosen. Thus, we have by Claim 3 that P[v1 = a1 , . . . , vnγ/2 +1 = anγ/2 +1 ] ≤ 12 nγ/2 +1 , n since at each step al , there exists at least one admissible high edge and we do not care about what happens  after step vnγ/2 +1 . There are at most nγ/2T +1 different combinations for a1 < a2 < · · · <  nγ/2 +1 . anγ/2 +1 . Therefore, P ≥ 1 − P[E1 ] ≥ 1 − nγ/2T +1 12 n γ/1 By Stirling’s formula, and observing that n + 1 ∈ o(T ), T ∈ Θ(n), we  nγ/2 +1 γ/2 γ/2 have nγ/2T +1 12 = e−ω(n ) . Hence, P ≥ 1 − e−ω(n ) is overwhelmn ingly large. 5. Main results We shall now analyze the stochastic runtime of our two different random solution generation methods for two classes of TSP instances that have been well studied in the literature. 20 5.1. Stochastic runtime analysis for simple instances We first consider a class of simple TSP instances that is defined by the following distance function d : E → R on a graph with n vertices.   1 if {i, j} = {i, i + 1} for each i = 1, 2, . . . , n − 1, d({i, j}) = 1 if {i, j} = {n, 1}, (10)   n otherwise. Obviously, TSP instances with this distance function have a unique optimal solution s∗ = (1, 2, . . . , n) (in the sense of the underlying Hamiltonian cycle), and s∗ has a cost of n. The cost of an arbitrary feasible solution s equals k + (n − k) · n, where k is the number of edges ∈ s that are also in s∗ . We shall refer to these instances as G1 in the sequel. The class G1 has been used in [19] and [42] for analyzing the expected runtime of variants of MMAS. Zhou [19] proved that the (1 + 1) MMAA algorithm has an expected runtime of O(n6 + n lnρ n ) on G1 in the case of nonvisibility (i.e., without the greedy distance information in the sampling), and has an expected runtime of O(n5 + n lnρ n ) in the case of visibility (i.e., with considering the greedy distance information in the sampling). Kötzing et al [42] continued the study in [19]. They investigated the expected runtime of (1 + 1) MMAA and its variant MMAS∗Arb on G1 and other TSP instances on which both (1 + 1) MMAA and MMAS∗Arb have exponential expected runtime. MMAS∗Arb differs with (1 + 1) MMAA only in the random solution generation. MMAS∗Arb uses Algorithm 3 as its random solution generation method, while (1 + 1) MMAA used Algorithm 2. Kötzing et al [42] proved that MMAS∗Arb has an expected runtime of O(n3 ln n + n lnρ n ) on G1 . Theorem 1 shows a stochastic runtime of O(n6+ ) for the CE variant with the add-on, i.e., Algorithm 1 with max-min calibration (6), the vertex-based random solution generation, and a stochastic runtime of O(n4+ ) for the edge-based random solution generation. These results are comparable with the above known expected runtimes. Although we are not able to get strictly superior runtimes, our results are actually stronger and more informative. Theorem 1 (Stochastic runtime of Algorithm 1 with max-min calibration on G1 ). Assume that we set M = 1, ρ = 1, and use Algorithm 1 with the 1 , πmax = 1 − n1 . Then max-min calibration (6) for the values πmin = n(n−2) a) if we use the vertex-based random solution generation method (Algorithm 2), and take a sample size N ∈ Ω(n5+ ) for any constant  ∈ 21 5 (0, 1), then with a probability at least 1 − e−Ω(N/n ) the optimal solution s∗ can be found within n iterations; b) if we use the edge-based random solution generation method (Algorithm 3), and take a sample size N ∈ Ω(n3+ ) for a constant  ∈ (0, 1), then 3 with a probability at least 1 − e−Ω(N/n ) , the optimal solution can be found within n iterations. Proof. We prove the Theorem by showing that the probability of the random event that before the optimal solution is met, the number of edges shared by the iteration-best and optimal solution strictly increases is overwhelmingly large. This implies that the optimal solution is found within n iterations, since the optimal solution has only n edges. Furthermore, the runtimes presented in the Theorem hold. We only discuss the case of a), b) follows with an almost identical argument. [1] By [19] (see also proof of Theorem 2), if Xt is not optimal, it has at least either a 2-opt move or a 3-opt move. Note that for G1 , any k-opt move of the iteration-best solution increases the number of its edges shared with the optimal solution. By Claim 1, any 2-opt move is generated by Algorithm 2 with probability Ω(n−3 ), and any 3-opt move is generated with [1] [1] probability Ω(n−5 ). Thus, if Xt is not optimal, Xt+1 shares more edges with [1] the optimal solution than Xt with a probability at least 1 − (1 − n−5 )N = 5  1−e−Ω(N/n ) ∈ 1−e−Ω(n ) if N ∈ Ω(n5+ ) for any  > 0. Thus, this repeatedly happens within polynomially many number of iterations with overwhelming 5 probability 1 − e−Ω(N/n ) . This completes the proof. The stochastic runtimes of Theorem 1 are derived for a relatively large sample size, namely N = Ω(n5+ ) and N = Ω(n3+ ). Actually, Theorem 1 may still hold for a smaller sample size. Theorem 2 partially asserts this. It states that the total number of iterations required to reach the optimal solution for both generation schemes may increase considerably if a smaller sample size is used. However, the stochastic runtime does not increase. Interestingly, one can obtain a smaller stochastic runtime with a small sample size for the edge-based random solution generation. Theorem 2 (Stochastic runtime of Algorithm 1 on G1 for a small sample size). Assume the conditions in Theorem 1, but set N ∈ Ω(n ) for any  ∈ (0, 1). Then: 22 a) For the vertex-based random solution generation, Algorithm 1 finds the optimal solution s∗ within n6 iterations with a probability of 1 − e−Ω(N ) . b) For the edge-based random solution generation, Algorithm 1 finds the optimal solution s∗ within n3 ln n iterations with a probability of 1 − e−Ω(N ) . Proof of Theorem 2. The proof shares a similar idea with that of Theorem 1. However, we consider here the random event that the number of edges shared by the iteration-best and optimal solution does not decrease and strictly increases enough times within a specified polynomial number of iterations. For a), we shall consider the first n6 iterations. By Claim 2, the number of edges shared by the iteration-best and optimal solution does not decrease N with a probability 1 − 1 − Ω(1) = 1 − e−Ω(N ) (N ∈ Ω(n )). Therefore, the number does not decrease within the first n6 iterations with probability Qn6 −Ω(N ) ) = 1−e−Ω(N ) . By Claim 1, for every consecutive n5 iterations, t=0 (1−e if the starting iteration-best solution is not optimal, then with probability n5 1 − (1 − n−5 )N = 1 − e−Ω(N ) , the number will strictly increase at least once within these n5 iterations. Therefore, with overwhelming probability 1 − e−Ω(N ) , the optimal solution will be reached within the period of the first n6 iterations, since there are n many consecutive n5 iterations within that period. b) can be proved by a similar way with a). We shall consider the first 3 n ln n iterations. By Claim 4, with probability 1 − (1 − Ω(1))N = 1 − e−Ω(N ) , the number of shared edges does not decrease in consecutive two iterations. To complete the proof, we need an extra fact on 2, 3-exchanges. Kötzing et al [42] showed for MMAS∗Arb that if the best solution s∗t found so far has n−k edges from the optimal solution s∗ , then the probability of the event that s∗t+1 has at least n−k+1 edges from s∗ , is in Ω(k/n3 ). We shall use a different but simpler proof to show that this alsoTholds in our case of iteration[1] best reinforcement. And with this fact, if |Xt s∗ | = n−k for some 0 < k ≤ 3 n, then with probability 1 − ((1 − k · n−3 )N )n /k = 1 − e−Ω(N ) , the number of edges shared by the iteration-best solution and s∗ will strictly increase at least once within the period [t, t + n3 /k]. This implies that s∗ is sampled within the first n3 ln n iterations with overwhelming probability 1 − e−Ω(N ) , since n3 ln n iterations can be partitioned into n many consecutive phases [0, n2 ), [n2 , n2 +n3 /(n−1)), [n2 +n3 /(n−1), n2 +n3 /(n−1)+n3 /(n−2)), . . . . We now prove that fact. 23 [1] We first show that when |Xt ∩ s∗ | = n − k with k > 0, then there exists a [1] 2-opt move or a 3-opt move for Xt (see also [19] for a similar proof). Assume [1] that Xt contains exactly n − k edges from s∗ for some integer k > 0. Let [1] e∗ = {i, i + 1} be an edge in s∗ but not in Xt . Note that each node of the [1] graph is exactly incident to two edges of s∗ and Xt , respectively. Therefore [1] [1] there exists an edge e0 ∈ Xt incident to i, an edge e00 ∈ Xt incident to i+1, and e0 , e00 are not in s∗ . Figure 2 shows an example, where e0 is either {i, u} or {i, v}, and e00 is either {i+1, w} or {i+1, y}. If e0 = {i, u} and e00 = {i+1, w} or u i e v i+1 ∗ w y e1 [1] Figure 2: Demonstration of adding a new edge. The solid edges represent the cycle Xt . [1] if e0 = {i, v} and e00 = {i+1, y}, then there exists a 2-opt move of Xt which removes e0 , e00 of distance n and adds e∗ and another edge (either {u, w} or {v, y}) of distance at most n + 1 together. If e0 = {i, u}, e00 = {i+1, y} or [1] e0 = {i, v}, e00 = {i+1, w}, there is a 3-opt move of Xt which removes e0 , e00 , and an edge e1 ∈ / s∗ , and adds edge e∗ and another two edges, this replacing 3 edges of distance n by 3 edges of distance at most 2n+1 together. Here, [1] [1] observe the fact that adding e∗ to Xt and removing e0 , e00 from Xt results [1] in graph containing a cycle, and there must be an edge e1 ∈ Xt on that cycle that does not belong to s∗ . We choose this edge as the edge e1 . Therefore, [1] for each e∗ of the k remaining edges in s∗ that are not in Xt , there exists a [1] 2-opt or 3-opt move of Xt that adds e∗ . By Claim 4, for any l ∈ O(1), the probability of producing an l-exchange [1] of the iteration-best solution Xt by Algorithm 3 in iteration t + 1 is Ω(1). Since any two l-exchanges are produced with the same probability, the probability of producing a particular l-exchange in iteration t + 1 is Ω(1/nl ). As [1] a result, Algorithm 3 produces for each edge e∗ ∈ s∗ − Xt a 2-opt or 3-opt [1] move of Xt that adds edge e∗ with probability at least Ω(1/n3 ). 24 Note that the generation of a 2-exchange (or a 3-exchange) with two newly added edges e2 , e3 by Algorithm 3 includes two mutually exclusive cases (3! cases for a 3-exchange): e2 is chosen before e3 , or e3 is chosen before e2 . It is not difficult to see that these two cases (3! cases for 3-exchange) have the same probability. Therefore, the probability of the event that Algorithm 3 [1] generates a 2-opt or 3-opt move of Xt that e∗ as one of the newly added edges and selects e∗ before the other newly added edges, is bounded from below [1] by Ω(1/3!n3 ) = Ω(1/n3 ). Since Xt has k such e∗ and the corresponding k [1] events are also mutually exclusive, we obtain that the probability that Xt+1 [1] [1] has more edges from s∗ than Xt if Xt has exactly n − k edges from s∗ for a constant k > 0 is Ω(k/n3 ) Corollary 1 further improves the stochastic runtime for an even smaller sample size. It can be proved by an argument similar to the proof of Theorem l 1, where we observe that (1 − (1 − p(n))ω(ln n) )n = 1 − n−ω(1) for any constant l > 0 and probability p(n) ∈ Ω(1), and that 1 − e−ω(ln n) = 1 − n−ω(1) . Corollary 1. Assume the conditions in Theorem 1, but let N ∈ ω(ln n). Then: a) For the vertex-based random solution generation, Algorithm 1 finds the optimal solution s∗ within n6 iterations with a probability of 1 − n−ω(1) . Particularly, if N = (ln n)2 , the runtime is n6 (ln n)2 with probability 1 − n−ω(1) . b) For the edge-based random solution generation, Algorithm 1 finds the optimal solution s∗ within n3 ln n iterations with a probability of 1 − n−ω(1) . Particularly, if N = (ln n)2 , the runtime is n3 (ln n)3 with probability 1 − n−ω(1) . Theorem 2 tells that, for any  ∈ (0, 1), a sample size of N ∈ Θ(n ) is already sufficient for iteration-best reinforcement to efficiently find an optimal solution of simple TSP instances with an overwhelming probability. Corollary 1 further shows that N ∈ ω(ln n) even leads to a better runtime with a slightly smaller but still overwhelming probability. Theorem 3 below shows that with an overwhelming probability, the runtime of iteration-best reinforcement will be exponential if N ∈ O(ln n), even if the instances are as simple as those in G1 . 25 1 ln n. Theorem 3. Assume the conditions of Theorem 1, but set N < 220 1/200 −Ω(n ) Then, with probability 1 − e , Algorithm 1 with edge-based solution 1/300 ) generation does not find the optimal solution s∗ within eΘ(n iterations. Proof. We prove the Theorem by inspecting the probability of the random event that, before the optimal solution is found, the cost of the iteration[1] best solution Xt will oscillate for exponentially many iterations with an overwhelming probability. We shall consider this in the last stages of the optimization process. Let T0 be the first iteration which samples a solution containing at least n − n1/4 + n1/5 edges from the optimal solution. We show that with an overwhelming probability, the number of common edges in the iteration-best and optimal solution will drop below n − n1/4 + n1/5 and the optimal solution is not sampled before that. This will imply the conclusion of Theorem 3, since, with an overwhelming probability, this phenomenon can repeatedly occur exponentially many times before optimal solution is found. To that end, we need to show the following: [1] 1) For any 1/4 > δ > 0, if Xt contains at least n − nδ edges from the optimal solution, then with a probability O( √1n ), the random solution generated by Algorithm 3 will contain more edges from the optimal [1] solution than Xt in iteration t + 1; [1] 2) For any 1/4 > δ > 0, if Xt contains at least n − nδ edges from the optimal solution, then with a probability Ω(1) (at least e−5 ), the random solution generated by Algorithm 3 will contain fewer edges [1] from the optimal solution than Xt in iteration t + 1. However, we first use these two facts and show them afterwards. 1/20 [1] By Claim 6, with probability 1−e−ω(n ) , XT0 contains at most n−n1/4 + n1/5 + n1/10 edges from the optimal solution, since the random event that the number of common edges from the iteration-best and optimal solution increases more than n1/10 in one iteration implies an occurrence of a Ω(n1/10 )1/200 ) exchange. Similarly, by Claim 6 again, with probability 1 − e−ω(n , the iteration-best solution contains k ∈ [n − n1/4 + n1/5 − n1/6+1/100 , n − n1/4 + n1/5 + n1/10 + n1/6+1/100 ] edges from the optimal solution in each iteration t ∈ [T0 , T0 + n1/6 ]. This means that the optimal solution is not found in the period [T0 , T0 + n1/6 ] with an overwhelming probability. With the help of 1) and 2), we are now to show that within this period, the number of edges 26 shared by the iteration-best and optimal solution is significantly reduced with an overwhelming probability. This will complete the proof. To facilitate our discussion, we call an iteration a successful iteration if its iteration-best solution contains more edges from the optimal solution than the last iteration-best solution, and an iteration a failure iteration if its iteration-best solution contains fewer edges from the optimal solution than the last iteration-best solution. By 1) and the subsequent discussion, the expected number of success1 n ), since N < 220 ln n. Thus, ful iterations within [T0 , T0 + n1/6 ] is O( nln1/3 1/6 −Ω(n ) by the Chernoff bound, with probability 1 − e , at most n1/100 successful iterations can occur within [T0 , T0 + n1/6 ]. By 2) and the subsequent discussion, the expected number of failure iterations in [T0 , T0 + n1/6 ] 1 1 1 ln n. By the Chernoff bound, it happens that is Ω(n 6 − 44 ), since N < 220 −Ω(n1/6 ) with probability 1 − e , at least n1/7 failure iterations will occur in [T0 , T0 + n1/6 ]. Since a successful iteration can add at most n1/100 edges from 1/200 ) the optimal solution with probability 1 − e−ω(n , it totally adds at most 1/100 1/100 1/50 n ×n =n edges from the optimal solution to the iteration-best 1/200 ) solution within [T0 , T0 +n1/6 ] with probability 1−e−ω(n . Note that within 1/6 −Ω(n1/6 ) 1/7 [T0 , T0 + n ], with probability 1 − e , at least n × 1 = n1/7 “good” edges are removed from the iteration-best solution. Therefore, with over1/200 ) [1] whelming probability 1 − e−Ω(n , XT0 +n1/6 will contain at most n − n1/4 + n1/5 + n1/10 − n1/7 + n1/50 < n − n1/4 + n1/5 [1] edges from the optimal solution, since XT0 contains at most n − n1/4 + n1/5 + 1/20 n1/10 iterations with probability 1 − e−Ω(n ) . As a result, with probability 1/200 ) 1−e−Ω(n , the number of common edges in the iteration-best and optimal solution will again be smaller than n − n1/4 + n1/5 in some iteration after T0 , and the optimal solution is not found before that. And this will repeatedly 1/300 ) 1/200 ) happen eΘ(n times with probability 1 − e−Ω(n . To finish the proof, we now formallyprove 1) and 2). We first consider 2). n By taking √ k = 2 and considering the 2 2-exchanges that happen in the first n − 3 n steps in the proof of Claim 4, one can show a tighter probability [1] lower bound e15 for producing 2-exchanges of Xt by Algorithm 3. Here, √ we observe that the probability of choosing a high edge at a step before n − 3 n is at least 1 − 3/(n − 2), see the proof of Claim 3. Note that if 2-exchanges deleting 2 edges from the optimal solution happen N times in an iteration, then the iteration will be a failure iteration. 27 By the above and the fact that any two k-exchanges happen with the same probability, a failure iteration then occurs with a probability at least 1 e5 n−nδ 2 n 2  !N ≥ 1 e5 n−nδ 2 n 2 1  ! 220 ln n ∈ Ω(n−1/44 ), 1 where δ ∈ (0, 1/4) and N < 220 ln n. This asserts 2). [1] 1) follows with a similar discussion. Since Xt is assumed to contain at least n − nδ edges from the optimal solution for some δ ∈ (0, 1/4), and since Ω(nδ )-exchanges happen with an overwhelmingly small probability, we need to consider only O(nδ )-exchanges when we estimate the probability of a successful iteration. For each k ∈ Ω(nδ ), the proportion of failure k-exchanges is bounded from below by  n−nδ 2knδ −1/2 k = e− n + o(1) ≥ e−2n + o(1), n k since 0 < δ < 1/4, and k-exchanges removing k edges shared by the iterationbest and optimal solution are not “successful” k-exchanges. Since for any k ∈ Ω(nδ ), any two k-exchanges happen with the same probability, and since the sum of the probabilities of successful and failure k-exchanges is smaller than 1, we conclude that successful O(nδ )-exchanges happen with a −1/2 probability smaller than 1−e2n ∈ O( √1n ). Therefore, a successful iteration √ n ) since N < 1 ln n. happens with a probability 1−(1−O( √1n ))N ∈ O( ln 220 n Theorem 3 generalizes the finding of [20] to simple TSP instances. It formally states that for ρ = 1, N ∈ Ω(ln n) is necessary to efficiently find an optimal solution to TSP. By Theorem 3, Theorem 1, Theorem 2 and its Corollary 1, we have clearly analyzed the impact of the size of N on the resulting stochastic runtime for the simple TSP instances in the case of that ρ = 1. N ∈ ω(ln n) is sufficient to find the optimal solution in a stochastically polynomial runtime, and the degree of the polynomial may increase with N , but the probability guaranteeing the runtime is also increasing with N . 5.2. Stochastic runtime analysis for grid instances Now, we consider more general TSP instances. Herein, the n vertices are positioned on an m × m grid for some integer m ∈ N+ . The vertices are positioned in a way that no three of them are collinear. Figure 3 gives an 28 5 4 3 2 1 0 1 2 3 4 5 Figure 3: A grid instance example of such an instance where m = 5 and n = 8. The weight of an edge {l, k} ∈ E in this case is defined as the usual Euclidean distance d(l, k) between vertex l and vertex k for every l, k = 1, . . . , n. In this section, we shall refer to these TSP instances as grid instances. Grid instances have been studied in [43] and [30]. Sutton and Neumann [43] investigated the expected runtime of (1+1) EA and RLS for these instances. As a continuation of [43], Sutton et al [30] further proved that the more extensive algorithm (µ + λ) EA finds an optimal solution for the instances expectedly in O((µ/λ)n3 m5 +nm5 +(µ/λ)n4k (2k−1)!) iterations if every of the λ selected parents is mutated by taking a random number of consecutive 2-exchange moves, and expectedly in O((µ/λ)n3 m5 +nm5 +(µ/λ)n2k (k−1)!) iterations with a mixed mutation operator, where k denotes the number of vertices that are not on the boundary of the convex hull of V. Sutton et al [30] also studied general Euclidean TSP instances (without collinearity) and showed similar results in terms of the maximum distance value dmax , the minimum distance value dmin , k and the minimum angle in the triangles formed by the vertices. Before we present our stochastic runtime, we summarize some structural properties of grid instances (some just follow from properties of general Euclidean instances). We say that two different edges {i, j} and {k, l} intersect with each other if there exists a point p such that p ∈ / {i, j, k, l} locates on both of the two edges, see, e.g., Figure 4a. We say that a solution is 29 intersection-free if the corresponding Hamiltonian cycle does not contain intersections, see, e.g., Figure 4b. j k p l j l i (a) intersection k i (b) intersection free Figure 4: Example for intersections Obviously, the triangle inequality [49] holds for grid instances. Therefore, removing an intersection by a (unique) 2-exchange move in a solution strictly reduces the total traveling cost, see Figure 4a. Lemma 1 states the well known fact that an optimal solution of grid instances is intersection-free. Lemma 1. Optimal solutions of grid instances are intersection-free. i l p k j Figure 5: Example for a 2-opt move We now restrict 2-opt moves to 2-exchange moves that remove an intersection. For example, removing edges {i, j}, {k, l} in Figure 5 and adding new edges {i, l}, {k, j} form such a 2-opt move. Lemma 2 below says that for grid instances, removing one intersection may reduce the total traveling cost Ω(m−4 ) if it is applicable. We omit the simple proof here. Interested readers may refer to [30] for a proof. Lemma 2. If a feasible solution to a grid instance contains intersections, then removing the intersection can reduce the total traveling cost Ω(m−4 ). 30 The convex hull Y(V ) of the vertex set V is the smallest convex set in R2 that contains V . Its boundary is a convex polygon spanned by some vertices with possibly other vertices in the interior of that polygon. Let V b denote the set of vertices on the boundary of Y(V ). Figure 6 illustrates this. Figure 6: Example of a convex hull Quintas and Supnick [50] proved that if a solution s is intersection-free, then the solution respects the hull-order, i.e., any two vertices in the subsequence of s induced by the boundary (the outer polygon) of Y(V ) are consecutive in s if and only if they are consecutive on the boundary of Y(V ). Therefore, if V b = V, i.e., all of the vertices are on the convex hull, then every intersection-free solution is optimal. Theorem 4 below analyzes the stochastic runtime of Algorithm 1 for grid instances for the case that V = V b . It states that the stochastic runtime is O(n4 ·m5+ ) for the vertex-based random solution generation, and O(n3 ·m5+ ) for the edge-based random solution generation. Corollary 2 further improves the runtime by sacrificing the probability guarantee. These stochastic runtimes are close to the expected runtime O(n3 ·m5 ) for RLS reported by Sutton et al [43] and [30]. Theorem 4. Consider a TSP instance with n vertices located on an m × m grid such that no three of them are collinear. Assume that V b = V , i.e., every vertex in V is on the convex hull V b , that we apply the max-min calibration 1 , ρ = 1, M = 1 and N ∈ Ω(m ) for some (6) with πmax = 1 − n1 , πmin = n(n−2) constant  > 0. Then: a) With an overwhelming probability of 1 − e−Ω(N ) , Algorithm 1 finds the optimal solution within at most n4 · m5 iterations with the vertex-based random solution generation. b) With an overwhelming probability of 1 − e−Ω(N ) , Algorithm 1 finds an optimal solution within at most n3 · m5 iterations with edge-based random solution generation. 31 Proof of Theorem 4. Note that under the conditions of Theorem 4, every intersection free solution is optimal. By Lemma 2, we know that a 2-opt move reduces the total traveling cost by Ω(m−4 ). Therefore, n·m5 consecutive 2-opt moves turn a feasible solution into an optimal one, since the worst solution in this case has a total traveling cost smaller than n·m and the optimal solution has total traveling cost larger than n. Notice also that m ≥ n/2, since the n vertices are positioned on the m × m grid and no three of them are collinear. With these facts, we prove the Theorem by a similar argument to the one used in the proof of Theorem 2. Again, we consider the random event that the cost of the iteration best solution does not increase within a specified period of polynomially many iterations and strictly decreases sufficiently many times within that period. For a), we consider the first n4 m5 iterations. For b), we consider the first n3 m5 iterations. 4 5 For a) : By Claim 2, with probability (1 − (1 − Ω(1))N )n m = 1 − e−Ω(N ) , the cost of the iteration-best solution does not increase within n4 m5 iterations. By Claim 1, for a phase consisting of consecutive n3 iterations, with 3 probability 1 − (1 − n−3 )N ·n = 1 − e−Ω(N ) , in at least one iteration of that phase an intersection is removed from the iteration-best solution, provided the phase starts with an iteration-best solution containing at least one intersection. Since the first n4 m5 iterations can have nm5 such phases, a) follows. b) follows with an almost identical discussion. We therefore omit the proof. Corollary 2. Consider a TSP instance with n vertices located on an m × m grid such that no three of them are collinear. Assume that V b = V , i.e., every vertex in V is on the convex hull V b , that we apply the max-min calibration 1 , ρ = 1, M = 1 and N ∈ ω(ln m). Then: (6) with πmax = 1 − n1 , πmin = n(n−2) a) With probability 1 − m−ω(1) , Algorithm 1 finds the optimal solution within at most n4 · m5 iterations with the vertex-based random solution generation. b) With probability 1−m−ω(1) , Algorithm 1 finds an optimal solution within at most n3 · m5 iterations with the edge-based random solution generation. Now, we consider the more interesting case that |V | − |V b | = k ∈ O(1), i.e., k vertices are not on the convex hull. Note that we can turn an arbitrary 32 intersection-free solution to an optimal solution only by rearranging the positions of those k interior points in that solution, and this requires at most k consecutive jump moves (see [30] for a proof). A jump move δi,j transforms a solution into another solution by shifting positions i, j as follows. Solution s is transformed into solution δi,j (s) by moving the vertex at position i into position j while vertices at positions between i and j are shifted appropriately, e.g., δ2,5 (i1 , i2 , i3 , i4 , i5 , i6 , i7 ) = (i1 , i3 , i4 , i5 , i2 , i6 , i7 ) and δ5,2 (i1 , i2 , i3 , i4 , i5 , i6 , i7 ) = (i1 , i5 , i2 , i3 , i4 , i6 , i7 ). It is not difficult to see that a jump move δi,j can be simulated by either a 2-exchange move (in the case that |i−j| = 1) or a 3-exchange move (in all other cases). Therefore, we can actually turn an intersection-free solution into an optimal one by a sequence of at most k consecutive 2-exchange or 3-exchange moves. Furthermore, a sequence of k consecutive 2-exchange or 3-exchange moves can be simulated by a κ-exchange move with an integer κ ≤ 3k. This means that any intersection-free solution can be turned into an optimal solution by a κ-exchange move with κ ≤ 3k. We shall call such a κexchange move in the sequel a 3k-opt move, although κ may be smaller than 1 ) by 3k. Recall that a 3k-opt move is produced with a probability of Ω( n6k−1 1 Algorithm 2 (see Claim 1), and with a probability of Ω( n3k ) by Algorithm 3 (see Lemma 6 of [42], or Claim 4) in any of the N independent draws in [1] iteration t, if Xt−1 is intersection-free and not optimal. As a result, we obtain by a similar proof as above Theorem 5 below. Theorem 5. Consider a TSP instance with n vertices located on an m × m grid such that no three of them are collinear. Assume that |V | − |V b | = k ∈ O(1) (k vertices are not on the convex hull V b ), that we apply the max-min 1 calibration 6 with πmax = 1 − n1 , πmin = n(n−2) , and set ρ = 1, M = 1, for some constant  > 0. Then: a) If we set N ∈ Ω(n3 · m ), then with an overwhelming probability of 3 1 − e−Ω(N/n ) , Algorithm 1 finds an optimal solution within at most n · m5 + n6k−4 iterations with the vertex-based random solution generation; b) If we set N ∈ Ω(n2 · m ), then with an overwhelming probability of 2 1 − e−Ω(N/n ) , Algorithm 1 finds an optimal solution within at most n·m5 +n3k−2 iterations with the edge-based random solution generation. 33 Proof of Theorem 5. We only prove a). b) can be derived by a very similar argument. We define two random events as following: [1] [1] E1 : for each t ≤ n · m5 + n6k−4 , f (Xt−1 ) ≥ f (Xt ); [1] E2 : for each t ≤ n · m5 + n6k−4 , if Xt−1 is not intersection-free, then a 2-opt move happens in iteration t. By a similar argument as the one for Theorem 4, we obtain that P[E1 ∩ E2 ] ≥ 3 1−e−Ω(N/n ) . Let η be a random variable denoting the number of iterations for [1] which Xt−1 is intersection-free. Notice that, conditioned on E1 ∩E2 , η ≥ n·m5 implies that an optimal solution occurs within n · m5 + n6k−4 iterations. Conditioned on E1 ∩ E2 and η < n · m5 , there are at least Ω(n6k−4 ) itera[1] tions in which Xt−1 is intersection-free, since each Xt−1 is either intersection[1] free or not intersection-free. Note also that in each iteration in which Xt−1 [1] intersection-free and not optimal, a 3k-opt move that turns Xt−1 into an op1 ))N . This timal solution happens with probability of at least 1 − (1 − Ω( n6k−1 [1] means for any fixed t ∈ N, if Xt−1 is intersection-free, then the probability of [1] 1 the event that Xt is optimal is bounded from below by 1 − (1 − Ω( n6k−1 ))N . Therefore, for any fixed Ω(n6k−4 ) iterations in which the iteration-best solu[1] tion Xt−1 is intersection-free and not optimal, the probability of the event [1] that the corresponding Ω(n6k−4 ) Xt ’s are still not optimal, is bounded from 6k−4 3 1 above by (1 − Ω( n6k−1 ))N ·n = e−Ω(N/n ) . This means that, conditioned on E1 ∩ E2 and η < n · m5 , an optimal solution occurs within n · m5 + n6k−4 3 iterations with a probability of 1 − e−Ω(N/n ) . As a result, an optimal solution occurs within the first n · m5 + n6k−4 3 iterations with a probability of 1 − e−Ω(N/n ) . Theorem 5 shows a stochastic runtime of n3 m5+ +n6k−1 m for Algorithm 1 equipped with the vertex-based solution generation, and a stochastic runtime of n3 m5+ + n3k m for Algorithm 1 equipped with edge-based solution generation, in the case of that |V | − |V b | = k ∈ O(1). This is much better than the expected runtime O(µ · n3 m5 +nm5 +µ · n4k (2k−1)!) for (µ+λ) EA with sequential 2-opt mutations reported by Sutton et al [30]. However, we are not able to analyze the stochastic runtime in the case that 34 k ∈ ω(1), since k ∈ ω(1) interior points may require super-polynomially many iterations to turn an intersection-free solution into an optimal solution when a polynomial sample size is used. 6. Conclusion We have analyzed the stochastic runtime of a CE algorithm on two classes of TSP instances under two different random solution generation methods. The stochastic runtimes are comparable with corresponding expected runtimes reported in the literature. Our results show that the edge-based random solution generation method makes the algorithm more efficient for TSP instances in most cases. Moreover, N ∈ Ω(ln n) is necessary for efficiently finding an optimal solution with iteration-best reinforcement. For simple instances, N ∈ ω(ln n) is sufficient to efficiently find an optimal solution with an overwhelming probability, and N ∈ O(ln n) results in an exponential runtime with an overwhelming probability. However, for more difficult instances, one may need to use a relatively large sample size. Our stochastic runtimes are better than the expected runtimes of the (µ + λ) EA on the grid instances. The EA randomly changes local structures of some of its current solutions by a Poisson distributed number of consecutive 2-exchange moves in every iteration, while our algorithm refrains from local operations on current solutions and only refreshes solutions by sampling from an evolving distribution. The solution reproducing mechanism in the EA stays the same throughout the optimization, only the current solutions in every iteration vary. However, the solution reproducing mechanism (sampling distribution) of our algorithm also evolves. This is the essential difference of MBS with traditional EAs. The comparison of our results with the expected runtimes in [30] therefore show that using a self-adaptive dynamic solution reproducing mechanism is helpful (in efficiently finding an optimal solution) when the search space becomes rugged. The stochastic runtimes in Theorem 4 are only valid for instances with a bounded number of interior points. In the future, it should be interesting to analyze the case that |V | − |V b | ∈ ω(1). This might also give more insight to the problem of RP v.s. P [51]. Our analysis is actually a kind of worst-case analysis, which is rather pessimistic. We analyze the optimization progress by only checking some very particular random events. This may not only underestimate the probability 35 of finding an optimal solution with our algorithm, but also overestimate the required number of iterations. In the future, it should be of great interest to consider a smoothed runtime analysis over an -neighborhood of the n nodes in the real plane as has been done for the Simplex method by Spielman and Teng in their famous paper [52]. Acknowledgment We thank the anonymous reviewers for their numerous useful suggestions on improving the scientific quality and English presentation of this article. References [1] R. Y. Rubinstein, D. P. Kroese, The cross-entropy method: a unified approach to combinatorial optimization, Monte-Carlo simulation and machine learning, Springer Science & Business Media, 2004. [2] R. Y. Rubinstein, Optimization of computer simulation models with rare events, European Journal of Operational Research 99 (1) (1997) 89–112. [3] R. Y. Rubinstein, The cross-entropy method for combinatorial and continuous optimization, Methodology and computing in applied probability 1 (2) (1999) 127–190. [4] M. Dorigo, T. Stützle, Ant colony optimization, Cambridge, Massachusetts: A Bradford Book, MIT Press, 2004. [5] M. Hauschild, M. Pelikan, An introduction and survey of estimation of distribution algorithms, Swarm and Evolutionary Computation 1 (3) (2011) 111–128. [6] M. Zlochin, M. Birattari, N. Meuleau, M. Dorigo, Model-based search for combinatorial optimization: A critical survey, Annals of Operations Research 131 (1-4) (2004) 373–395. [7] D. Whitley, A genetic algorithm tutorial, Statistics and computing 4 (2) (1994) 65–85. [8] H. R. Lourenço, O. C. Martin, T. Stützle, Iterated local search, Springer, 2003. 36 [9] Z. Wu, Model-based heuristics for combinatorial optimization: a mathematical study of their asymptotic behavior, Ph.D. thesis, Institut für Angewandte Stochastik und Operations Research (IASOR), Technical University of Clausthal (2015). [10] T. Stützle, H. H. Hoos, MAX-MIN ant system, Journal of Future Generation Computer Systems 16 (2000) 889–914. [11] S. Droste, T. Jansen, I. Wegener, On the analysis of the (1+1) evolutionary algorithm, Theoretical Computer Science 276 (1-2) (2002) 51–81. [12] J. He, X. Yao, Drift analysis and average time complexity of evolutionary algorithms, Artificial Intelligence 127 (1) (2001) 57–85. [13] F. Neumann, C. Witt, Runtime analysis of a simple ant colony optimization algorithm, Tech. rep., Departmant of Computer Science, University of Dortmund, Germany (2006). [14] C. Witt, Runtime analysis of the (µ +1) ea on simple pseudo-boolean functions, Evolutionary Computation 14 (1) (2006) 65–86. [15] F. Neumann, C. Witt, Runtime analysis of a simple ant colony optimization algorithm, Algorithmica 54 (2) (2009) 243–255. [16] B. Doerr, F. Neumann, D. Sudholt, C. Witt, Runtime analysis of the 1ant ant colony optimizer, Theoretical Computer Science 412 (17) (2011) 1629–1644. [17] W. J. Gutjahr, G. Sebastiani, Runtime analysis of ant colony optimization with best-so-far reinforcement, Methodology & Computing in Applied Probability 10 (3) (2008) 409–433. [18] Y. Zhou, J. He, A runtime analysis of evolutionary algorithms for constrained optimization problems, IEEE Transactions on Evolutionary Computation 11 (5) (2007) 608–619. [19] Y. Zhou, Runtime analysis of an ant colony optimization algorithm for tsp instances, Evolutionary Computation IEEE Transactions on 13 (5) (2009) 1083–1092. 37 [20] F. Neumann, D. Sudholt, C. Witt, A few ants are enough:aco with iteration-best update, in: Genetic and Evolutionary Computation Conference, GECCO 2010, Proceedings, Portland, Oregon, Usa, July, 2010, pp. 63–70. [21] P. S. Oliverto, C. Witt, Improved time complexity analysis of the simple genetic algorithm, Theoretical Computer Science 605 (15) (2015) 21–41. [22] D. Sudholt, C. Thyssen, Runtime analysis of ant colony optimization for shortest path problems, Journal of Discrete Algorithms 10 (10) (2012) 165–180. [23] A. Lissovoi, C. Witt, Runtime analysis of ant colony optimization on dynamic shortest path problems, Theoretical Computer Science 561 (2015) 73–85. [24] Y. Chen, X. Zou, Runtime analysis of a multi-objective evolutionary algorithm for obtaining finite approximations of pareto fronts, Information Sciences 262 (2014) 62–77. [25] D. Sudholt, C. Witt, Update strength in edas and aco: How to avoid genetic drift, in: Genetic and Evolutionary Computation Conference, 2016, pp. 61–68. [26] D. H. Wolpert, W. G. Macready, No free lunch theorems for optimization, IEEE Transactions on Evolutionary Computation 1 (1) (1997) 67– 82. [27] F. Neumann, D. Sudholt, C. Witt, Analysis of different mmas aco algorithms on unimodal functions and plateaus, Swarm Intelligence 3 (2009) 35–68. [28] F. Neumann, I. Wegener, Randomized local search, evolutionary algorithms, and the minimum spanning tree problem, Theoretical Computer Science 378 (2007) 32–40. [29] J. Reichel, M. Skutella, Evolutionary algorithms and matroid optimization problems, Algorithmica 57 (1) (2010) 187–206. [30] A. M. Sutton, F. Neumann, S. Nallaperuma, Parameterized runtime analyses of evolutionary algorithms for the planar euclidean traveling salesperson problem, Evolutionary Computation 22 (4) (2014) 595–628. 38 [31] A. M. Sutton, J. Day, F. Neumann, A parameterized runtime analysis of evolutionary algorithms for max-2-sat, in: Conference on Genetic & Evolutionary Computation, 2012, pp. 433–440. [32] Y. Zhou, X. Lai, K. Li, Approximation and parameterized runtime analysis of evolutionary algorithms for the maximum cut problem., IEEE Transactions on Cybernetics 45 (8) (2015) 1491–1498. [33] Z. Wu, M. Kolonko, Asymptotic properties of a generalized cross entropy optimization algorithm, IEEE Transactions on Evolutionary Computation 18 (5) (2014) 658 – 673. [34] Z. Wu, M. Kolonko, R. H. Möhring, Stochastic runtime analysis of the cross entropy algorithm, IEEE Transactions on Evolutionary Computation, DOI: 10.1109/TEVC.2017.2667713. [35] M. Held, R. M. Karp, A dynamic programming approach to sequencing problems, Journal of the Society for Industrial and Applied Mathematics 10 (1) (1962) 196–210. [36] N. Christofides, Worst-case analysis of a new heuristic for the travelling salesman problem, Tech. rep., Graduate School of Industrial Administration, CMU (1976). [37] M. T. Goodrich, R. Tamassia, Algorithm Design and Applications, Wiley, 2015. [38] S. Arora, Polynomial time approximation schemes for Euclidean traveling salesman and other geometric problems, Journal of the ACM 45 (5) (1988) 753–782. [39] J. S. B. Mitchell, A constant-factor approximation algorithm for tsp with pairwise-disjoint connected neighborhoods in the plane, in: TwentySixth Symposium on Computational Geometry, 2010, pp. 183–191. [40] S. Lin, B. W. Kernighan, An effective heuristic algorithm for the traveling-salesman problem, Operations Research 21 (2) (1973) 498–516. [41] P. T. D. Boer, D. P. Kroese, S. Mannor, R. Y. Rubinstein, A tutorial on the cross-entropy method, Annals of Operations Research 134 (1) (2005) 19–67. 39 [42] T. Kötzing, F. Neumann, H. Röglin, C. Witt, Theoretical analysis of two aco approaches for the traveling salesman problem, Swarm Intelligence 6 (1) (2012) 1–21. [43] A. M. Sutton, F. Neumann, A parameterized runtime analysis of evolutionary algorithms for the euclidean traveling salesperson problem, in: Proceedings of the Twenty-Sixth Conference on Artificial Intelligence (AAAI’12), AAAI press, 2012, pp. 1105–1111. [44] A. Costa, O. D. Jones, D. Kroese, Convergence properties of the crossentropy method for discrete optimization, Operations Research Letters 35 (5) (2007) 573–580. [45] Z. Wu, M. Kolonko, Absorption in model-based search algorithms for combinatorial optimization, in: Evolutionary Computation (CEC), 2014 IEEE Congress on, IEEE, 2014, pp. 1744–1751. [46] M. Thomas, Machine learning, New Delhi: McGraw Hill Education India, 1997. [47] H. Asoh, H. Mühlenbein, On the mean convergence time of evolutionary algorithms without selection and mutation, in: Parallel Problem Solving from Nature—PPSN III, Springer, 1994, pp. 88–97. [48] M. Pirlot, General local search methods, European Journal of Operational Research 92 (3) (1996) 493–511. [49] M. A. Khamsi, W. A. Kirk, An introduction to metric spaces and fixed point theory, John Wiley,, 2001. [50] L. V. Quintas, F. Supnick, On some properties of shortest Hamiltonian circuits, American Mathematical Monthly 72 (9) (1965) 977–980. [51] W. Gasarch, Classifying problems into complexity classes, Advances in Computers 95 (2015) 239–292. [52] D. A. Spielman, S. H. Teng, Smoothed analysis of algorithms: Why the simplex algorithm usually takes polynomial time, Journal of the Acm 51 (3) (2004) 385–463. 40
2cs.AI
1 On User Association in Multi-Tier Full-Duplex Cellular Networks arXiv:1607.01119v4 [cs.IT] 13 Jun 2017 Ahmed Hamdi Sakr and Ekram Hossain Abstract We address the user association problem in multi-tier in-band full-duplex (FD) networks. Specifically, we consider the case of decoupled user association (DUA) in which users (UEs) are not necessarily served by the same base station (BS) for uplink (UL) and downlink (DL) transmissions. Instead, UEs can simultaneously associate to different BSs based on two independent weighted path-loss user association criteria for UL and DL. We use stochastic geometry to develop a comprehensive modeling framework for the proposed system model where BSs and UEs are spatially distributed according to independent point processes. We derive closed-form expressions for the mean rate utility in FD, half-duplex (HD) DL, and HD UL networks as well as the mean rate utility of legacy nodes with only HD capabilities in a multi-tier FD network. We formulate and solve an optimization problem that aims at maximizing the mean rate utility of the FD network by optimizing the DL and UL user association criteria. We investigate the effects of different network parameters including the spatial density of BSs and power control parameter. We also investigate the effect of imperfect self-interference cancellation (SIC) and show that it is more severe at UL, where there exist minimum required SIC capabilities for BSs and UEs for which FD networks are preferable to HD networks; otherwise, HD networks are preferable. In addition, we discuss several special cases and provide guidelines on the possible extensions of the proposed framework. We conclude that DUA outperforms coupled user association (CUA) in which UEs associate to the same BS for both UL and DL transmissions. Keywords: Multi-tier cellular networks, in-band full-duplex (FD), decoupled user association (DUA), coupled user association (CUA), cell association, stochastic geometry. I. I NTRODUCTION In-band FD communication has recently attracted significant attention as a potential enabler for 5G networks to support higher data rates and meet the ever-increasing users demand for broadband wireless services. In contrast to HD communication in which a time-frequency resource block is only used for either transmission or reception, in-band FD communication 2 implies simultaneous transmission and reception of information in the same frequency band [1]. This, in turn, introduces extra interference between UL and DL networks, which affects the network performance gains especially for UL transmissions that suffer from excessive DL-to-UL interference [2]. The performance of FD networks is also limited by the capability of UEs and BSs to cancel self-interference (SI), which is caused by the transmitter to its collocated receiver. Fortunately, this technology is becoming feasible thanks to the recent advancements in antenna and digital baseband technologies where SI can be reduced close to the level of noise floor in low-power devices [3]. In this paper, we focus on the user association problem in multi-tier cellular networks (i.e., networks that consist of different classes of BSs) that support in-band FD communication. We consider the general case when a cellular UE can be simultaneously served by two different BSs for UL and DL data transmission, i.e., decoupled user association (DUA) [4]. In addition, we aim at optimizing user association in order to maximize the mean rate utility offered by FD networks. In order to evaluate and optimize the system performance, we use a statistical approach based on stochastic geometry to capture the network randomness [5]. Specifically, in order to derive closed-form expressions for the mean rate utility in a generic link in the network, due to their analytical tractability, we use independent Poisson Point Processes (PPPs) to model the locations of BSs. The results from the analysis enable us to optimize user association to maximize the mean rate utility and to understand the impact of network parameters (such as spatial density of BSs, power control, weighting factors, and SI) on the performance to provide insightful guidelines for system design. We show that DUA is superior to coupled user association in which UEs associate to only one BS for both UL and DL transmissions. We also show that FD networks can outperform HD networks in terms of mean rate for sufficiently high SI cancellation (SIC) capabilities of BSs and UEs. A. Related Work and Motivations In the context of DUA in multi-tier cellular networks, the authors in [6], [7] propose a framework for performance evaluation of multi-tier HD UL and DL cellular networks. In this model, the locations of BSs in each tier are modeled by independent PPPs where each network tier differs in the transmit power and spatial density. Using PPP assumption and weighted path-loss user association, [6] derives expressions for the rate coverage in HD UL and DL networks as well as the joint UL-DL rate coverage. On the other hand, closed-form expressions for the mean of 3 the logarithm of the transmission rate and spectrum allocation for both UL and DL transmissions are derived in [7]. Furthermore, utility maximization problems are solved to optimize both user association and spectrum partitioning. The authors in [8] use stochastic geometry to derive the achievable capacity in an HD network with DUA where a real-world simulation tool (Atoll) is used to verify the accuracy of the expressions. In [9], the DUA problem is formulated as a matching game in which UEs and BSs in a two-tier FD cellular network rank one another based on some preference metric, which is a function of the achievable signal-to-interference-plus-noise ratio (SINR), in order to maximize the total throughput. The authors in [10]–[16] evaluate the performance of FD networks using statistical modeling. In [10], a hybrid ad-hoc network is considered in which nodes with HD or FD capabilities are randomly deployed. For an ALOHA MAC protocol, it shows that FD networks achieve a 0−30% higher throughput, compared to HD networks, for practical values of path-loss exponent. It also considers the effect of imperfect SIC and shows how it affects the relative performance of FD and HD transmissions. The authors in [11] present the effects of transmission duration, SIC, and ratio of HD-to-FD nodes on the performance of ad-hoc networks with asynchronous ALOHA MAC protocol. The paper also highlights different optimal operating regions in which FD networks outperform HD networks. In [12], the authors propose a system design that controls the partial overlap between UL and DL channels in order to maximize the overall rate of FD cellular networks. The paper compares the performances of two realizations for FD networks: a two-node topology (2NT) with FD UEs and BSs and a three-node topology (3NT) with FD BSs and HD UEs. It shows that 3NT achieves performance comparable to that of 2NT, which paves the road to harvest the gains of FD transmissions with HD UE terminals. In [13], a hybrid multi-tier FD cellular network is considered in which BSs operate either in FD mode or HD DL mode. PPP assumption is used to derive expressions for the successful transmission probability and network throughput. The authors in [14] consider a single-tier network under 2NT and 3NT where BSs and UEs employ directional antennas. The directional antennas are shown to manage both SI as well as co-channel interference. In [15], the authors derive the success probability and achievable spectral efficiency of FD networks under a 3NT with multi-antenna BSs and single-antenna UEs. In [16], a massive MIMO-enabled FD network is considered where BSs adopt linear zero-forcing with SI-nulling precoding while UEs adopt SI-aware power control. The authors show that massive MIMO is a viable solution for FD communications. Although statistical modeling can be used for long-term performance evaluation of FD net- 4 works, it does not necessarily provide sufficient insights on short-term network performance. Therefore, tools from optimization theory can be used to evaluate short-term performance of networks and to find optimal parameters that maximize certain objective functions [17]–[20]. For example, [17] proposes a joint resource management scheme to mitigate the effect of imperfect SIC in an OFDMA-based two-tier FD cellular network. This is achieved by jointly assigning UEs and transmit power for each resource block in both UL and DL transmission based on the level of SI to maximize a total utility sum of the network. The authors in [18] propose an iterative algorithm to jointly perform subcarrier assignment and power allocation in order to maximize the sum-rate performance in a single-cell FD network. In [19], the authors propose a joint UL/DL user scheduling and power allocation algorithm to maximize the system throughput by investigating the feasibility conditions of FD operation with 3NT. The authors in [20] propose two distributed power control and interference management methods to manage interference in FD networks with 3NT. The proposed MAC protocol with transmit power optimization is shown to outperform its HD counterpart in terms of total throughput. B. Contributions, Organization, and Notations In contrast to previous works on FD networks (e.g., [10]–[16]) in which CUA is used to solve the association problem, we focus on DUA as a more general association criterion for FD networks. The contributions of the paper can be summarized as follows: • Using tools from stochastic geometry, we provide a tractable framework to analyze the performance of multi-tier FD networks with DUA. We derive closed-form expressions for the association probability, the mean interference received at UEs and BSs under weighted pathloss user association. In addition, we derive the mean rate utility of an FD network. • We investigate the effect of FD transmissions on legacy HD terminals that do not support FD communication and we provide closed-form expressions for the mean rate utility. • We formulate an optimization problem to maximize the mean rate utility of FD networks. By jointly optimizing both UL and DL user association to maximize the mean rate utility, we also show that DUA is superior to CUA in FD networks. • We show how the proposed framework can be extended to different models in the literature such as traditional HD UL and HD DL networks. In addition, we highlight different tradeoffs in the network and show the effect of varying network parameters such as densities of BSs, power control parameters, and user association weighting factors on network performance. 5 TABLE I L IST OF KEY NOTATIONS • Notation Definition Notation Definition Φk Pk Ψk Pmax Ui ψjk τ UL , τ DL α, αb , αu Point process of BSs of k-th tier Transmit power of BSs of k-th tier Point process of active UEs of k-th tier Maximum transmit power of UEs Weighting factor for UL user association Joint association probability Target SINR threshold Path-loss exponents λk ρk γk , Γk  Di DL AUL k ,Ak σbk , σu G, Gb , Gu Spatial density of BSs of k-th tier Receiver sensitivity of BS of k-th tier Transmit power of UEs of k-th tier Power control factor of UEs Weighting factor for DL user association Per-tier association probability SI cancellation parameters Path-loss gains We investigate the effect of SI on the performance of an FD network and show that FD mode of operation is preferable to HD mode only if the SIC capabilities of UEs and BSs are sufficient to mitigate SI. Furthermore, we show that the effect of imperfect SIC is more severe at UL. • Via Monte Carlo simulation, we validate our analytical results. Also, through numerical results we show the feasibility of FD communication to increase the mean transmission rate of cellular networks. The rest of the paper is organized as follows. System model and assumptions are described in Section II. In Section III, both joint distance distributions and user association probabilities are derived for a typical UE. Section IV presents the analysis for FD interference as well as mean rate utility of UL, DL, and FD transmissions. An optimization problem is formulated in Section V to maximize the mean rate utility of FD transmission. Finally, numerical results and discussion are presented in Section VI before the paper is concluded in Section VII. R∞ R∞ Notation: Γ[s] = 0 xs−1 e−x dx is the gamma function, Γ[s, a] = a xs−1 e−x dx denotes the Rb upper incomplete gamma function, γ[s, b] = 0 xs−1 e−x dx denotes the lower incomplete gamma Rb function, and Γ[s, a, b] = a xs−1 e−x dx denotes the generalized gamma function. f (·) and F (·) denote the probability density function (PDF) and cumulative distribution function (CDF), respectively. Finally, E[·] denotes the expectation operator and 1{·} is the indicator function. The key mathematical notations used in this paper are summarized in Table I. II. S YSTEM M ODEL , A SSUMPTIONS , AND M ETHODOLOGY OF A NALYSIS A. Multi-Tier Network Model We consider a cellular network that consists of K tiers of BSs. We use an independent homogeneous PPP Φk = {xi,k : i = 1, 2, . . . } with spatial density λk BS/m2 to model locations of BSs belonging to the k-th tier where 1 ≤ k ≤ K and xi,k ∈ R2 denotes the location of the 6 i-th BS in that tier. For all BSs in k-th tier, transmit power is fixed and equal to Pk . Locations of UEs are modeled in R2 according to an arbitrary independent point process ΦU with a spatial P density λu >> K k=1 λk . Saturation condition is assumed where each transmitter (i.e., a BS or a UE) sends data packets at the beginning of each time slot in a time-slotted transmission scenario. B. Channel Model We assume a co-channel deployment where the wireless channels are subject to both largescale (i.e., path-loss) and small-scale fading. Let kx − yk be the propagation distance between a generic transmitter (i.e., a BS or a UE) located at x and a receiver located at y. The path-loss of this link is defined as L(x, y) = Ḡkx − ykᾱ , where ᾱ > 2 is the path-loss exponent and Ḡ > 0 is a constant gain. In this work, we assume different path-loss exponents and gains for different communication links [21]. That is, ᾱ = α and Ḡ = G for BS-UE links, ᾱ = αb and Ḡ = Gb for BS-BS links, and ᾱ = αu and Ḡ = Gu for UE-UE links. In addition to the distance-dependent path-loss, the small-scale fading component of a channel is modeled by Rayleigh fading with unit average power where different links are assumed to be independent and identically distributed (i.i.d.). Hence, the power gain of all channels is exponentially-distributed and denoted by h ∼ Exp(1)1 . Channel coherence time is greater than or equal to the frame duration. SI channel is modeled by Nakagami-m fading with parameters (mbk , σbk ) and (mu , σu ) for BSs from k-th tier and UEs, respectively [16], [22]. Hence, the power σ gain of SI channel follows a Gamma distribution and denoted by hb ∼ Gamma(mbk , mbbk ) for k σu ) for UEs, where BSs and hu ∼ Gamma(mu , m u 1 σbk and 1 σu are SIC capabilities of BSs and UEs, respectively. There is no intra-cell interference between UL (DL) transmissions where different UEs in a cell are served in UL (DL) using orthogonal time-frequency resources (e.g. OFDMA). Hence, there are only one active UE in UL and one active UE in DL per BS at a certain time slot and channel. C. Power Control Model The UEs adopt fractional channel inversion power control where a UE at x adjusts its transmit power to ρk (Gkx − ykα ) to compensate for the large-scale fading such that the average received 1 This assumption can be relaxed to other scenarios, e.g., Gamma-distributed power envelope assumptions to model multi- antenna transmissions. 7 TABLE II M ODES OF OPERATION Mode Definition FD 3NT FD Legacy DL Legacy UL HD DL HD UL All BSs and UEs are FD All BSs are FD and all UEs are HD A typical HD UE with DL transmissions in an FD network A network tier of HD BSs with UL transmissions in an FD network All BSs and UEs are HD with DL transmissions All BSs and UEs are HD with UL transmissions signal power at the serving BS at y is equal to ρk (Gkx − ykα )−(1−) . Note that 0 ≤  ≤ 1 is the power control factor and ρk is the open loop power spectral density (or receiver sensitivity). Here, we use γk to denote the instantaneous transmit power of a UE transmitting to a BS belonging to the k-th tier where Γk is the corresponding random variable. UEs have a limited transmit power budget of Pmax , where the UEs that are unable to perform channel inversion, transmit with maximum power. Other power control mechanisms such as SI-aware power control [16] and interference-aware power control [23] can also be adopted. D. Mode of Operation and User Association Besides FD links in which a UE simultaneously transmits and receives data in the same channel, we consider network tiers in which UEs or BSs do not support FD transmissions (i.e., HD UEs and HD BSs). That is, we also evaluate the performance of the network when (i) there is a typical HD UE that can only receive DL transmission from one BS in a channel during a transmission interval, and (ii) there is a network tier of HD BSs each of which can only receive UL transmission in a channel from one UE during a transmission interval. A communication link is referred to as a legacy uplink when the UE-BS channel carries data only from the UE to the serving HD BS. On the other hand, when the UE-BS channel carries data only from the BS to the HD UE being served, the link is referred to as a legacy downlink. Furthermore, we consider the 3NT model, where the network consists of FD BSs each of which serves two HD UEs: one HD UE in DL and one HD UE in UL. The aforementioned scenarios are summarized in Table II and will be discussed in details in Sections IV and VI. For FD UEs, we consider the case where user association in UL is decoupled from that in DL. Hence, an FD UE is not necessarily served by the same BS in both UL and DL. That is, a UE may simultaneously receive data from one BS and transmit data to another in the same channel. To illustrate, without loss of generality, Fig. 1 shows a realization of a two-tier FD 8 3 1 2 Cell Coverage (DL) Cell Coverage (UL) Downlink Uplink Macro-cell BS Small-cell BS FD User HD User Fig. 1. A two-tier FD cellular network with macro-cell and small-cell BSs. Solid lines show DL coverage area while dotted lines show UL coverage of each cell. cellular network where a macro-cell network tier is overlaid with a denser and lower power small-cell network tier. It shows that the coverage area of each cell in DL is different from that in UL. For example, although UE 1 is served by a macro-cell BS in DL, it is located in UL coverage area of another small-cell BS, hence, served by two different BSs. On the other hand, UE 2 is located in the coverage area of one small-cell BS in both DL and UL, hence, served by the same BS. Fig. 1 also shows an example of 3NT realization where BS 3 serves two HD UEs simultaneously: one HD UE is in DL and another HD UE is in UL. We assume a weighted path-loss user association criterion similar to [24], [25] where each UE independently associates with the BS(s) that minimizes the weighted path-loss of UL and/or DL. That is, for a UE at y, with a slight abuse of notation, let xi , xUL , and xDL denote the BS with minimum path-loss from i-th tier, serving BS in UL, and serving BS in DL, respectively. Then, the association criterion for UL and DL can be described, respectively, as follows: xUL = arg min Ui kx − ykα (1) xDL = arg min Di kx − ykα (2) x∈{xi } x∈{xi } where xi = arg minx∈Φi kx − ykα , i = {1, 2, . . . , K}, and Ui and Di are the weighting factors, respectively, for UL and DL user association for the i-th tier. Assumption 1. Let µi = Ui Di and without loss of generality, let us assume that the network tiers are ordered such that µ1 ≤ µ2 ≤ · · · ≤ µK . 9 Note that Ui and Di are design parameters and are not necessarily equal. Varying thsese weighting factors can result in different association scenarios. For example, (i) coupled user association: when Ui = Di , each UE associates to the same BS for both DL and UL, (ii) minimum-distance user association: when Ui = U (or Di = D), each UE associates to the nearest BS for UL (or DL), (iii) maximum-received power user association: when Di = Pi−1 , each UE associates to the BS that offers the strongest received power for DL, and (iv) minimum-transmit power user association: when Ui = ρi , each UE associates to the BS that requires lowest transmit power for UL. E. Methodology of Analysis Based on the system model described above, we aim at quantifying the performance of a generic FD link in terms of mean rate in nats/sec/Hz. We first derive the user association probability and distance distributions based on decoupled and weighted path-loss user association. Then, we obtain the mean of interference experienced at a typical BS in UL and at a typical UE in DL. Next, we derive the mean rate utility of the network as well as that of UL and DL transmissions. Finally, we optimize UL and DL weighting factors such that the mean rate utility of the FD network is maximized. III. A NALYSES OF D ISTANCE AND U SER A SSOCIATION P ROBABILITIES IN FD N ETWORKS A. Analysis of User Association Probabilities Note that, even with DUA, an FD UE can associate to the same BS in the k-th tier for both UL and DL transmissions with a certain probability. It is worth mentioning that this scenario is different from the CUA as it does not necessitate Uk and Dk to be equal (as in the CUA). That is, although the UE still uses two different decision criteria for UL and DL user association (i.e., DUA in (1) and (2)), one BS meets both criteria. This event occurs depending on the network realization. Let ψjk denote the joint association probability that a UE is served by a BS from the j-th tier in DL and a BS from the k-th tier in UL. The following lemma characterizes this probability. 10 Lemma 1. (Joint association probability) The probability that an FD UE with DUA is served by the j-th tier for DL and k-th tier for UL transmissions is  K −1  2 P   λj max {Dji , Uji } α λi , j=k    i=1   2 2   α2 j−1 α P 1 ψjk = µl+1 µlα Dj  − , k<j λj λk Uk 2 2  Υ2l (j) α Ω  1+µl+1 1+µlα Ωl l=k  l   0, k>j  P −1 P K K l 2 P Uj Dj λi λi α where Ujk = Uk , Djk = Dk , Υl (j) = Dji λi , and Ωl = . 2 2 Proof: See Appendix A-I. i=1 Uiα i=l+1 (3) α i=l+1 Di Note that the joint association probability ψjk is different from the per-tier association probability, which is defined as the probability that a UE is served by a BS belonging to a certain tier for DL (UL) regardless of the serving UL (DL) BS. This per-tier association probability can be obtained directly from the joint association probability derived in Lemma 1. The following lemma provides expressions for this probability for both DL and UL transmissions. Lemma 2. (Per-tier association probability) The probability that a UE associates to a BS from the j-th tier for either DL or UL is defined, respectively, as follows: DL −1 ADL j = λj (Λj ) where ΛDL j = PK 2 UL α i=1 Dji λi and Λj = PK and UL −1 AUL j = λj (Λj ) (4) 2 α i=1 Uji λi are the effective spatial densities of the j-th tier for DL and UL transmissions, respectively. B. Analysis of Distance to Serving BS(s) Based on the system model and user association criteria described above, for UEs operating in FD mode, the marginal PDFs of the distances to the serving BSs in DL and UL are presented in the following lemma the proof of which can be found in [25, Appendix A]. Lemma 3. (Marginal distance distributions) The CDF of the distance between a generic UE   2 associated with the j-th tier for DL (or UL) and its serving BS is P[Rjm ≤ r] = 1−exp −πΛm r j  n  2+n  − n2 m and the n-th moment is ERjm Rj = Γ 2 πΛj , where m ∈ {DL, UL}. Furthermore, the joint PDF of the distance to serving BSs for DL and UL transmissions for FD UEs is presented in the following lemma. 11 Lemma 4. (Joint distance distribution) The joint PDF of the distance(s) from a generic FD UE to its serving BS(s), when associated to the j-th tier for DL and k-th tier for UL, is    K 2 P  2  α max {Dji , Uji } λi rj , j = k, rk = rj  2πλj rj exp −π i=1   fR (rj , rk ) = K 2  P    4π 2 λj λk rj rk exp −π max Dji rjα , Uki rkα α λi , k < j, (rj , rk ) ∈ A (5) i=1 n o 1 1 α α where A = (rj , rk ) : rj ≥ 0, Djk rj < rk < Ujk rj , and their expectations are given by  K − m2 2 P ER [Rjm ] = Γ 2 π max {Dji , Uji } α λi , i=1 j−1 −1 j−1 P P −1 m Hjl [µl , µl+1 ; 0] ER [Rj ] = Hjl [1, 1; m] , Ωl l=k l=k −1 j−1 j−1 P P n Hjl [µl , µl+1 ; n] , Hjl [µl , µl+1 ; 0] ER [Rk ] =  2+m  where Hjl [a, b; c] = c π2 − 4+c 2 (Υl (j)) Proof: See Appendix A-II. k<j (6) k<j l=k l=k Γ[ 2+c 2 ] j=k   − 2+c − 2+c   2 2 2 2 2+c 2+c α α a α 1 + µl Ω l − b α 1 + µl+1 Ωl . C. Analysis of Uplink Transmission Power As stated above, the UEs served in UL by a BS from k-th tier are assumed to perform fractional channel inversion with open loop power spectral density ρk . The UEs are also assumed to have a constraint Pmax on the transmit power. Thus, we define the required amount of transmit power of a UE when it associates with a BS from the k-th tier as γk = min {ρk G Rkα , Pmax } where Rk is the distance to the serving BS from tier k for UL transmission and its CDF is given in Lemma 3. Therefore, following Lemma 3, we derive the CDF of the transmit power where the  α1 i h  t UL · 1{t < Pmax }. proof follows directly such that P[Γk > t] = P Rk > ρk G Lemma 5. (Transmit power distribution) The CDF of the transmit power of a UE associated to tier k in UL and performing fractional channel inversion power control is P[Γk ≤ t] = h   α2 i t 1 − exp − πΛUL · 1{t < Pmax } and its n-th moment is given by k ρk G "   α2 # n n nα P nαρ G max k E[Γnk ] = , πΛUL . (7) nα γ k 2 2 ρk G 2(πΛUL ) k 12 IV. A NALYSIS OF R ATE C OVERAGE OF FD T RANSMISSIONS In this section, we characterize the mean rate utility for a generic FD link. We assume that during a transmission interval, a receiver (i.e., BS or a UE) using a particular channel to communicate with its corresponding transmitter experiences interference from all other BSs as well as UEs reusing the same channel. We start by defining the SINR received at a typical UE and BS. Then, the mean rate utility is also derived for a generic FD link and several special cases in the literature. A. Signal-to-Interference-plus-Noise Ratio For the system model described above, the SINR can be expressed as follows: SINRDL jk = Pj h DL DL (I + ISI + σ 2 )GkxDL kα and SINRUL jk = min{ρk G kxUL kα , Pmax }h 2 UL α (IUL + IUL SI + σ )Gkx k (8) where xDL ∈ Φj and xUL ∈ Φk denote the serving BS for DL and UL transmissions, respectively, as defined in (1)-(2). σ 2 is the additive noise power, {h} are channel power gains where subscripts are dropped for simplicity, and IDL and IUL are the interference received, respectively, at the tagged UE (i.e., DL) and BS (i.e., UL) from all other BSs and UEs sharing the same channel. Note that, unlike HD networks, interference signals received from DL and UL transmissions are correlated due to the relative distance between each UE-BS pair and the observation point. In order to characterize the interference, using the fact that each cell has exactly one DL and one UL transmissions, we pair each UE and its serving BS in UL together as an interfering pair. Hence, the aggregate interference at a typical receiver (i.e., a UE or a BS) located at the origin (0, 0) can be defined as follows2 : IDL = K X X Pi h + Gkxkα X Pi h + Gb kxkαb i=1 x∈Φi I UL = K X \{xDL } i=1 x∈Φi \{xUL } X y∈Ψi \{u[xUL ]} X γi (y)h Gu kykαu (9) γi (y)h Gkykα (10) y∈Ψi \{u[xUL ]} where u[x] returns the UE served by BS x in UL, γi (y) = min{ρi G ky − u−1 [y]kα , Pmax } is the transmit power of the UE, and Ψi is the point process that represents the active UEs. Note that, due to the correlation between the positions of active UEs and BSs resulting from the orthogonal time-frequency resource allocations (e.g., OFDMA), this point process does is not 2 Due to the homogeneous PPP assumption, interference statistics are independent of the observation point [5]. 13 a PPP. Instead, the positions of active UEs can be seen as a Voronoi perturbed lattice process which is not mathematically tractable [6], [26]. Assumption 2. The active UEs from the i-th tier are assumed to form an arbitrary point process Ψi that is (i) stationary with spatial density λi , (ii) independent of the point processes of active UEs from different tiers, and (iii) independent of Φi 3 . B. Interference Model For each type of tagged receivers (i.e., BSs or UEs) and interferers (i.e., BSs or UEs), we define a pair correlation function g(r) which in turn quantifies the spatial density of interfering nodes from i-th tier as λi g(r). (i) BSs-to-UEs (DL-to-DL): Using (2), we know that no interfering BS from i-th tier can have 1 less weighted path-loss to a UE than its serving BS, hence, kxk > Djiα kxDL k, where x ∈ Φi 1 and xDL ∈ Φj [5]–[7], [24], [27]. Therefore, g1 (r) = 1{r > Djiα Rj }, where Rj = kxDL k. (ii) UEs-to-BS (UL-to-UL): There is no exact boundary for the exclusion region around the tagged BS where interfering UEs can be arbitrarily close. However, using (1), we know that none of the interfering UEs associates with that BS, hence, for a UE u served by a BS 1 from i-th tier, kxUL − uk > Uikα kx − uk, where x ∈ Φi and xUL ∈ Φk [6], [7], [25], [28]. 1 Therefore, g2 (r) = 1{r > Uikα Ri }, where Ri = kx − uk. (iii) BSs-to-BS (DL-to-UL): Due to the PPP assumption, the BSs can be very close to each other, however, this is not true in practice due to physical constraints, different antenna heights, etc. [21]. Here, we use the approximation proposed in [29] to model interfering BSs from i-th tier as a non-homogeneous point process with g3 (r) = (1 − exp[−π βλbi r2 ])1{r > db } to model the repulsion between BSs in practical deployments where βb is the repulsion parameter and db is a constraint on the length of an DL-to-UL interference link. (iv) UEs-to-UE (UL-to-DL): We use a similar approximation to model the interfering UEs served by the i-th tier of BSs in UL as a non-homogeneous point process with g4 (r) = i (1 − exp[−π AλUL r2 ])1{r > du }, where AUL is the repulsion parameter as in [6] and du is i i the minimum length of an UL-to-DL interference link [30]. 3  2 Other approximations for Ψi exist in the literature, e.g., non-homogeneous PPP with spatial density λi 1 − exp[−πΛUL i r ] [6], or more generally λi g(r), where g(r) is a pair correlation function as proposed in [29]. Another approximation is using q 1 PPP assumption with exclusion ball of radius such as in [31] for single-tier networks. πΛUL i 14 C. Self-Interference UL In (8), IDL SI is SI resulting from UL transmission at the UE, and ISI is SI resulting from DL transmission at the BS. Since the SI incurred at a given receiver depends on its own transmit power, we define the residual SI power after cancellation as follows:   UL α IDL SI = min ρk G kx k , Pmax hu and IUL SI = Pk hbk (11) where hbk and hu represent SI channels such that σbk = E[hbk ] and σu = E[hu ] are the inverse of SIC capability of BSs from tier k and UEs, respectively. D. Mean Rate Utility For a given FD link, let us define the rate coverage probability as the probability of UL (DL) DL transmission rate to be higher than a required target rate threshold RUL o (Ro ). In other words, for UL (DL) transmission to achieve the target rate, the SINR received at the BS (UE) must be greater than a prescribed threshold τ UL (τ DL ) that can be given using Shannon’s formula such that τ m = exp[Rm o ] − 1, m ∈ {DL, UL}. Hence, the rate Rjk of a generic FD link measured in nats/sec/Hz for a UE served by a BS from j-th tier for DL and a BS from k-th tier for UL is defined as:     DL UL Rjk = P(SINRDL ) ln 1 + τ DL + P(SINRUL ) ln 1 + τ UL jk > τ jk > τ | {z } | {z } =RDL jk (12) =RUL jk DL UL which corresponds to a fixed data rate transmission (i.e., RDL ] and RUL ]) o = ln[1+τ o = ln[1+τ UL when the SINRs for DL and UL transmissions (i.e., SINRDL jk and SINRjk , respectively) exceed the predefined thresholds; otherwise, the transmission rate is zero. Furthermore, we define the mean rate utility of a generic FD link in the network as: R̄ = K X K X j=1 k=1 UL ψjk f RDL jk , Rjk  (13)  UL where f RDL is the mean utility of an FD link given that the UE is associated with jjk , Rjk    DL UL  UL th tier for DL and k-th tier for UL. In this work, we use f RDL , R = E ln Rjk Rjk = jk jk     UL E ln RDL as the mean utility function measured in ln[nats/sec/Hz] [7], [32]. The jk + E ln Rjk motivation of considering this utility is to achieve proportional fairness among UEs. This is achieved by improving the rates of links with low rate coverage probability while saturating the rates of links with high rate coverage probability. This performance metric is widely used 15 in the literature to solve the problem of radio resource allocations while achieving fairness via maximizing R̄ [33]. Therefore, hereafter, we derive the following performance metric for a generic UE operating in the FD mode:    m m m , E[ln Rm jk ] = ln Ro + E ln P(SINRjk > τ ) m ∈ {DL, UL} (14) where the expectation is with respect to h, R, Φi , and Ψi . First, we focus on UL rate coverage, which can be obtained as follows: " "  !## UL UL UL 2    τ G I + I + σ (a) SI UL ) = E ln P g > E ln P(SINRUL jk > τ α  min{ρk G Rk , Pmax }Rk−α # "  UL   UL  2 + E I + σ E I (b) SI = −τ UL G ER min{ρk G Rkα , Pmax }Rk−α (15) where (a) follows from (8) and (b) follows from the Rayleigh fading assumption. The mean of IUL and IUL SI are presented in the following lemma. Lemma 6. (Mean of uplink interference) The mean interference power received at a typical BS belonging to the k-th tier is given by K  UL  X E I = 2πλi i=1 K1 (db , αb , βλbi )   and the mean of SI is E IUL = σbk Pk , where SI and Gb 2−α U α K2 (i) Pi + ik ρi G(α − 2) !     (2<α<4) α−2 α−2 d2−α 2−α 2−α 1 1 (d→0) 2 2 2 K1 (d, α, Λ) = Γ Γ − (πΛ) , πΛd = − (πΛ) α−2 2 2 2 2  2# Pmax α 4 − α(1 − ) UL 2 UL K2 (i) = Γ , πΛi do , πΛi 2 ρi G "  α2 #  α−2 Pmax 4 − α P max 2 + (πΛUL Γ , πΛUL i ) i ρi G 2 ρi G   α(1−)−2 4 − α(1 − ) (Pmax →∞) UL UL 2 = (πΛi ) 2 Γ , πΛi do . 2 (πΛUL i ) α(1−)−2 2 (16) (17) " (18) in which do is the minimum distance between UEs and BSs [21]. Proof: See Appendix B-I. Note that in (18), the first term represents interference from UEs that are able to perform channel inversion power control without exceeding the power budget where the second term represents the interference from UEs who are transmitting with the maximum power Pmax . 16 Next, similar to UL, the rate coverage for DL can be obtained as follows: "   #  DL  DL 2    E I + E I + σ SI DL ) = −τ DL G ER E ln P(SINRDL jk > τ Pj Rj−α (19) where the mean of IDL and IDL SI are presented in the following lemma. Lemma 7. (Mean of downlink interference) The mean interference power received at a typical UE served in DL by the j-th tier and in UL by the k-th tier is given by  2−α  K 2−α α UL X   Dji Rj K1 (du , αu , Λi ) 2πλi  Pi + E [Γi ] E IDL = G(α − 2) G u i=1 where E [Γi ] is given in Lemma 5 and the mean of SI power is "  2#  DL  σu αρk G Pmax α α UL E ISI = , πΛk . α γ 2 2 ρk G 2(πΛUL k ) (20) (21) Proof: See Appendix B-II. The following theorem presents closed-form expressions for the mean rate utility in (13) for a generic FD link when a UE associates with the same tier j with probability ψjj and associates with tier j for DL transmission and tier k for UL transmission with probability ψjk . Theorem 1. (Mean rate utility of FD networks) The mean rate utility of the FD network model described above is given by R̄ = R̄o − ! !   K X K X A2 σu E[Γk ] τ UL σbk Pk + A3 (k) τ DL A1 (j) Γ 2+α 2 + + + K4 (k) ψjk G α α 2 2 Pj πΛDL K3 (j, k) ρk G (πΛUL (πΛDL j j ) k ) j=1 k=1 (22) UL where R̄o = ln RDL o + ln Ro and 2−α A1 (j) = K X 2πλi Djiα i=1 G(α − 2) A3 (k) = σ 2 + and      K X Pi , 2 A2 = σ + 2πλi 1 Γ[ 2+α 2 ] i Gu i=1 K1 (db , αb , βλbi ) Gb i=1  K X 2πλi K1 (du , αu , ΛUL ) K P 2−α U α K2 (i) Pi + ik ρi G(α − 2) 2 α  α2 max {Dji , Uji } λi , K3 (j, k) =  −1 j−1  j−1 P −1 P   Hjl [1, 1; α] Hjl [µl , µl+1 ; 0] ,  Ωl π i=1 l=k " 2 + α(1 − ) K4 (k) = (πΛUL , πΛUL k ) γ k 2 α 2 ! E [Γi ] (23) . j=k (24) k<j l=k  Pmax ρk G  α2 # "   α2 # ρk G 2+α P max Γ , πΛUL + k Pmax 2 ρk G 17 (Pmax →∞) = α 2 (πΛUL k ) Γ   2 + α(1 − ) . 2 (25) Proof: See Appendix C. Note that in (25), the first term represents the mean of the inverse of the useful signal power received at a typical BS from a UE being served that is able to perform channel inversion power control without exceeding the power budget. On the other hand, the second term represents the mean of the inverse of the useful signal power received from a UE that is transmitting with the maximum power Pmax . E. Special Cases Using the lemmas derived above and Theorem 1, the performance of (i) a network tier that consists only of legacy HD BSs with UL transmissions and (ii) a typical legacy HD UE with DL transmissions is presented in the following two corollaries where the proofs follow directly from (22). It is worth mentioning that if we add SI at FD BSs and FD UEs, the expressions for mean rate utility in Corollaries 1 and 2, respectively, will be equivalent to the mean rate utility of UL and DL transmissions in an FD network. Corollary 1. (Legacy uplink transmissions) The mean rate utility offered by the k-th tier that UL consists only of HD BSs in an FD cellular network to its UEs is given by ln RUL k = ln Ro − !! 2−α λi K α X K (d , α , )1{i = 6 k} 1 b b K4 (k) U K (i) τ UL 1− 2 β b G σ2 + 2πλi Pi + ik ρi (26) α . 2 ρk Gb G(α − 2) (πΛUL k ) i=1 Corollary 2. (Legacy downlink transmissions) The mean rate utility offered by an FD network DL to a legacy HD UE served by the j-th tier is given by: ln RDL j = ln Ro −     2−α   2+α  K 2+α α UL DL X D Γ Γ K (d , α , Λ ) τ 1 u u ji i 2 2 2 G 2πλi  DL Pi + E [Γi ]. (27) α σ + α DL DL 2 Pj πΛ G(α − 2) (πΛj ) 2 G (πΛ ) u j j i=1 In addition, the performance of HD UL networks and HD DL networks can be obtained as presented in the following corollaries where the proofs follow directly from (22). Corollary 3. (Half-duplex uplink networks) The mean rate utility of HD UL networks with weighted path-loss user association is given by K X K 2−α UL X 2πλi U α K2 (i) UL τ 1− 2 ik R̄ = ln RUL − A G σ + ρi o k ρ G(α − 2) k i=1 k=1 ! K4 (k) α 2 (πΛUL k ) (28) 18 (Pmax →∞) (σ 2 =0) = (Ui =ρ) (Pmax →∞) (σ 2 =0) = ln RUL o ln RUL o − K X 2−α    K 2 + α(1 − ) 4 − α(1 − ) X 2ρi Uikα Γ Γ AUL  (α − 2) i ρk 2 2 G i=1 τ AUL k k=1 UL      2 + α(1 − ) 4 − α(1 − ) 2τ UL Γ Γ . −  G (α − 2) 2 2 (29) (30) Corollary 4. (Half-duplex downlink networks) The mean rate utility of HD DL networks with weighted path-loss user association is given by    2−α  K K 2+α α DL X X 2πλi Dji Γ 2 τ 2 ADL G Pi  R̄ = ln RDL α σ + o − j DL DL 2 P πΛ G(α − 2) (πΛ ) j j j j=1 i=1 (σ 2 =0) = ln RDL o − (Di =Pi−1 ) (σ 2 =0) = K X j=1 ln RDL o − ADL j K τ DL X 2Pi Dij DL A Pj i=1 α − 2 i 2τ DL . α−2 (31) (32) (33) The results presented in (29) and (32) are consistent with the previous results in [7] on user association in multi-tier HD cellular networks. Furthermore, from (30) and (33), it can be seen that the performance of an interference-limited network is independent of the spatial density, receiver sensitivity, and transmit power of BSs, which is consistent with the results in existing literature [6], [7], [24], [25], [27]. In addition, by comparing the results in Corollaries 1 and 2 with those in Corollaries 3 and 4, respectively, it can be seen that the mean rates of both UL and DL transmissions in FD networks are lower than those in HD networks. This degradation is due to the additional interference resulting from FD transmissions and SI. It can be seen that for UL transmissions, DL-to-UL interference can be reduced by increasing the isolation of BSs. This can achieved by increasing SIC capability of BSs or using directional antennas where both vertical and horizontal patterns are designed such that the BSs are not in the main-lobe of each other. For DL, the effect of UL-to-DL interference can be seen to be less severe because of the low transmit power of UEs compared to that of BSs. Furthermore, the performance of FD networks with CUA and FD networks with 3NT are presented in the following two corollaries where the proofs follow directly from (22). 19 Corollary 5. (Coupled user association) The mean rate utility of FD networks with CUA is given by: R̄ = R̄o −  DL      K X τ A1 (k) 2 + α σu E[Γk ]+A2 τ UL 1− σbk Pk + A3 (k) DL G +Γ + G K4 (k) . (34) Ak α α 2 2 Pk πΛDL 2 ρk (πΛDL (πΛDL k k ) k ) k=1 Corollary 6. (3-node topology) The mean rate utility of FD networks with 3NT for a UE served by j-th tier in DL in given by (27) where that for a UE served by k-th tier in UL is UL given by ln RUL k = ln Ro − K X τ UL 1− G σ 2 + σbk Pk + 2πλi ρk i=1 K1 (db , αb , βλbi ) Gb 2−α U α K2 (i) Pi + ik ρi G(α − 2) !! K4 (k) α . 2 (πΛUL k ) (35) Proof: The proof follows from Corollaries 1 and 2 while considering SI affecting UL transmissions at BSs. V. R ATE M AXIMIZATION IN FD N ETWORKS BY O PTIMAL U SER A SSOCIATION In this section, for optimal user association, we derive closed-form expressions for the weighting factors that maximize the mean rate utility of FD cellular networks given in Theorem 1. For analytical tractability, we assume that (i) all BSs have the same receiver sensitivity (i.e., ρk = ρ), (ii) there is no constraint on the maximum transmit power of UEs (i.e., Pmax → ∞), and (iii) SI at BSs is modeled as noise such that σbk Pk = σb . The last assumption implies that the SIC capability of a BS is proportional to its transmit power (i.e., σbk ∝ 1 ), Pk that is, the cancellation capability of BSs with higher transmit power such as macrocell BSs is better than that of BSs with lower transmit power such as picocell or femtocell BSs. Following a similar procedure as in [7], we first derive the optimal effective spatial density Λ∗UL and Λ∗DL j , then we retrieve the k PK λ j α α ∗ ∗DL 2 2 optimal weighting factors Uk∗ ← a1 (Λ∗UL =1 k ) and Dj ← a2 (Λj ) which satisfy j=1 Λ∗DL j PK λk and k=1 Λ∗UL = 1 for any positive constants a1 and a2 (cf. Lemma 2). k 20 After some mathematical manipulations, maximizing (22) is equivalent to solving the following set of concave optimization sub-problem simultaneously: P1: P2: subject to min UL ΛDL j ,Λj min UL ΛDL j ,Λj K X K X c1 λ j DL 2+α 2 i=1 j=1 Pj (Λj ) K K X X c3 λ j K X λj ΛDL j j=1 2+α 2 Pi λ i (ΛDL i ) ρi λi ΛUL i ρj (ΛUL j ) i=1 K X λj = 1, = 1, ΛUL j j=1 j=1 2−α 2 and +  α2 K X K X ρi λi K1 (du , αu , ΛUL ) c2 λ j DL 2+α 2 j=1 Pj (Λj ) i=1 K K X X c4 λ j + j=1 Pj (ΛDL j ) UL ΛDL j , Λj ≥ 0, 2+α 2 i=1 (ΛUL i ) α 2 i ρ i λi (ΛUL i ) 2+α 2 ∀j where ci is an arbitrary positive constant for i ∈ {1, 2, 3, 4}. Using Lagrangian relaxation and taking the first order partial derivatives with respect to ΛDL j and ΛUL j , the optimal user association probability can be obtained as follows: Λ∗DL j = −2 Pj α K X Pi λ i i=1 which are equivalent to Dj∗ = D Pj 2 α and Λ∗UL j = K X λi (36) i=1 and Uj∗ = U for arbitrary positive constants D and U . This result is presented in the following theorem. Theorem 2. (Optimal user association in multi-tier FD networks) For an FD network, the mean rate utility is maximized when user association is based on maximum received power in DL and on minimum distance in UL. It is worth mentioning that the result in Theorem 2 shows the importance of DUA in FD cellular networks in order to maximize the overall mean rate of the network. The reason that a UE prefers to be served based on the maximum received SINR for DL and the minimum distance for UL can be explained as follows. From the DL perspective: (i) the received signal power at the UE from its serving BS is maximized, (ii) the received interference power at the UE from other BSs is minimized, and (iii) the SI power at the UE is minimized when transmitting to the nearest BS in UL. From the UL perspective: (i) the received signal power from the UE at its serving BS is maximized, (ii) the received interference power from other UEs at the serving BS is minimized when all UEs transmit with the minimum power, and (iii) since all BSs transmit with fixed power, the network tier of the serving BS for DL (or DL weighting factors) has no effect on the mean UL rate. The result above also shows the superiority of DUA compared to CUA in the FD network under consideration. That is, as shown in Theorem 1, two different association criteria are required for UL and DL user association to maximize the mean rate of FD networks. Clearly, this is possible only with DUA but not possible in general under any 21 CUA criterion where the UEs are forced to associate with the same BS for both UL and DL. This result is also intuitive since CUA is a special case of DUA implying that the maximum performance of CUA can be always achieved by DUA. VI. N UMERICAL R ESULTS AND D ISCUSSIONS A. System Parameters We use the results obtained above in closed-form to evaluate system performance in different scenarios. We consider the following cases: (i) FD networks with both CUA and DUA, (ii) FD networks with 3NT, (iii) HD DL networks (i.e., only DL transmissions), (iv) HD UL networks (i.e., only UL transmissions), (v) legacy DL transmissions (i.e., HD UEs with DL transmissions in an FD network), and (vi) legacy UL transmissions (i.e., HD BSs with UL transmissions in an FD network). For simulation and numerical evaluation, unless otherwise stated, we consider a twotier network with spatial densities λ2 = 4λ1 . The transmit powers of BSs are {P1 , P2 } = {37, 33} dBm and the maximum transmit power of UEs is Pmax = 23 dBm. The path-loss exponents are {α, αb , αu } = {4, 3.7, 4}, path-loss constants are {G, Gb , Gu } = {0, 30, 0} dB, and the minimum distances for the pair correlation functions are {do , db , du } = {1, 40, 1} m. For UL transmissions, the power control factor is  = 0.9 and all BSs have the same receiver sensitivity ρi = −40 dBm. The SIC capabilities of BSs and UEs are { σ1b , σ1u } = {70, 70} dB and the noise power is k σ = −104 dBm. For the evaluation of mean rate utility, SINR thresholds τ DL and τ UL are set to UL 0, i.e., RDL o = Ro = ln(2) nats/sec/Hz. B. Validation of Analytical Results We validate the expressions derived in Lemmas 6 and 7 for the mean interference received at a BS and a UE, respectively. These two expressions are the keys to deriving all the following results including Theorem 1 and they include all assumptions made throughout the analysis of the mean rate utility. The curves in Fig. 2 compare the results obtained from simulations and analysis as a function of the spatial density of tier 1. For Monte Carlo simulations, the locations of the BSs simulated as independent PPPs over a 20 × 20 km2 area with a typical UE or BS at the origin. To simulate the active UEs that are causing UL-to-UL and UL-to-DL interference, the UEs are first dropped as a PPP with high spatial density, then the UEs associate with BSs based on the defined association criteria for UL. Then, each BS randomly selects one UE for UL transmission. Hence, Assumption 2 is not retained in the simulation. The mean interference power for various links is averaged over 10, 000 iterations. The results in Fig. 2 validate the -40 -25 -45 -30 Mean of Interference (dBm) Mean of Interference (dBm) 22 -50 -55 -60 -65 -35 -40 -45 -50 Downlink-to-uplink (Analysis) Uplink-to-uplink (Analysis) Simulation -70 Downlink-to-downlink (Analysis) Uplink-to-downlink (Analysis) Simulation -55 0 5 10 15 20 25 0 Spatial density of tier 1 (# 0.52 : BS/km 2 ), 6 1 5 10 15 20 25 Spatial density of tier 1 (# 0.52 : BS/km 2 ), 6 1 (a) Mean of Interference at a typical BS (b) Mean of Interference at a typical UE Fig. 2. Analysis (Lemmas 6 and 7) vs. simulation: Mean of interference resulting from DL and UL transmissions at BSs and UEs. 0.3 0.5 DUA CUA 0.45 0.2 Downlink (HD Network) Uplink (HD Network) Downlink (Legacy & 3NT) Uplink (Legacy) Uplink (3NT) 0.15 0.1 0.05 0 10 0 Mean rate utility (nats/sec/Hz) Mean rate utility (nats/sec/Hz) 0.25 0.4 0.35 0.3 0.25 0.2 10 1 10 2 0.15 10 0 10 1 Spatial density of tier 1 (# 5 (0.52 :) -1 BS/km 2 ), 6 1 Spatial density of tier 1 (# 5 (0.52 :) -1 BS/km 2 ), 6 1 (a) Mean rate utility of DL and UL (b) Mean rate utility of DUA and CUA 10 2 Fig. 3. Mean rate utility (in nats/sec/Hz) vs. spatial density of tier 1 (in BS/km2 ). accuracy of our approach to derive the mean interference and show that the assumptions made above have a minor effect on the accuracy of the proposed analytical model. C. Effect of Spatial Density Fig. 3 shows the effect of varying the density of BSs on the mean rate utility for three different networks: (i) HD DL network, (ii) HD UL network, and (iii) FD network including both legacy DL and UL transmissions, and (iv) 3NT. For HD DL networks (i.e., Corollary 4) in Fig. 3a, the mean rate utility of DL transmissions is almost independent of the density of BSs. This can be explained as increasing λ results in increasing the power of both the useful signal and interference and the SINR remains unchanged. For HD UL networks (i.e., Corollary 3), the performance results can be explained as follows. In sparse networks with low density, the distances between UEs and their serving BSs become large and the UEs transmit with their 23 maximum power with high probability. Consequently, the useful received signal power decreases and the interference power is increased at the serving BS. Increasing the BS density improves the mean rate by making UEs closer to their serving BSs which in turn increases their ability to perform channel inversion without exceeding the maximum power budget. This increases the useful signal power and decreases interference power. With a very high BS density, the network becomes interference-limited and almost all UEs are able to invert their channel towards the serving BS, hence, the mean rate becomes independent of the spatial density of BSs. Fig. 3a shows that increasing the density of FD networks has two different effects on the mean rate utility of legacy transmissions. For legacy DL transmissions (i.e., Corollary 2), the mean rate is lower compared to HD DL networks where the difference is due to the extra interference resulting from UL transmissions sharing the same spectrum in the FD network. However, increasing the density of BSs (i) decreases the transmit power of UEs, hence, decreases UL-toDL interference, (ii) increases the useful signal power which is counteracted by the increase in DL-to-DL interference. Overall, this improves the mean rate of legacy DL transmissions and the performance approaches that of HD DL networks in very dense networks. On the other hand, the mean rate of legacy UL BSs (i.e., Corollary 1) degrades with increasing spatial density of BSs. Compared to HD UL networks, the difference is due to the extra interference resulting from DL transmissions. With increasing spatial density, the BSs become closer to each other which increases the DL-to-UL interference power received at all BSs. At the same time, the useful signal power received at any BS is upper bounded by ρ. Therefore, the SINR becomes very low and the mean UL rate approaches zero with increasing BS density. A similar behavior is evident for 3NT as shown in Fig. 3a. The mean DL rate is identical to that of legacy DL because both rates are evaluated at an HD UE. On the other hand, the difference between the mean UL rate in 3NT with FD BS and legacy UL with HD BS is due to the SI experienced at the FD BS in 3NT. Fig. 3b elaborates more on the effect of spatial density in FD networks by showing the mean rate utility of a generic FD link for different user association criteria (i.e., Theorem 1 and Corollary 5). Overall, it can be seen that the spatial density should be adjusted to balance the trade-off between the rates of DL and UL transmissions in FD networks. As shown in Fig. 3a, in dense FD networks, UL transmissions become more susceptible to high DL-to-UL interference. On the other hand, low spatial density of BSs degrades the performance of both DL and UL transmissions, respectively, due to high UL-to-DL interference and the maximum power budget 24 0.5 0.5 DUA (FD Network) CUA (FD Network) Downlink (HD Network) Uplink (HD Network) Downlink (Legacy) Uplink (Legacy) Mean rate utility (nats/sec/Hz) 0.4 0.35 0.4 0.3 0.25 0.2 0.15 0.35 0.3 0.25 0.2 0.15 0.1 0.1 0.05 0.05 0 -50 Mean Rate Utility (FD Network) Downlink (HD Network) Uplink (HD Network) Downlink (Legacy) Uplink (Legacy) 0.45 Mean rate utility (nats/sec/Hz) 0.45 0 -45 -40 -35 Receiver sensitivity of BSs (;) -30 -25 (a) Mean rate utility vs. receiver sensitivity of BSs 0 0.2 0.4 0.6 Power control factor (0) 0.8 1 (b) Mean rate utility vs. power control factor Fig. 4. Mean rate utility (in nats/sec/Hz) vs. UL power control parameters: sensitivity of BS receivers ρ (in dBm) and power control factor . constraint. Therefore, as shown in Fig. 3b, as the spatial density of BSs increases, the mean rate utility of the FD network increases up to a maximum value due to the improvement in both DL and UL transmissions, then it starts to decrease due to the degradation in the mean UL rate. D. Effect of Power Control Fig. 4a shows the effect of varying ρ on the mean rate utility of different networks. In general, decreasing the sensitivity of the receiver (i.e., increasing ρ) increases the amount of transmit power required by each UE to perform channel inversion towards the serving BS (i.e., Lemma 5). This, in turn, increases the power of useful signal, UL-to-UL interference, and ULto-DL interference (cf., Lemmas 6 and 7). Hence, as shown in Fig. 4a, the mean rate of DL transmissions in the FD network deteriorates with increasing ρ because of UL-to-DL interference compared to the HD DL scenario. For UL transmissions in both HD UL and FD networks, the mean UL transmission rate increases due to increased useful signal power. This happens up to a maximum value, then the rate starts to decrease because the transmit power of UEs becomes limited by the power budget Pmax . Overall, there exists an optimal value of ρ that maximizes the mean rate of FD networks and splits the performance into two regimes. That is, as ρ increases, the mean rate of FD networks increases up to a maximum value, then it starts to decrease. This behavior can be explained as follows. When ρ is very low (the left side of the optimal point), while DL transmissions experience low interference from UL transmissions, the interference at the BSs is very high compared to the useful signal power and thus the mean UL transmission rate is almost 0. As ρ increases, the mean DL transmission rate of DL transmissions starts to 25 0.5 0.45 0.45 0.4 Mean rate utility (nats/sec/Hz) Mean rate utility (nats/sec/Hz) 0.4 FD 0.35 0.3 0.25 0.2 P1 =33 dBm, P2 =23 dBm 0.15 P1 =33 dBm, P2 =26 dBm 0.1 P1 =33 dBm, P2 =30 dBm 0.05 P1 =33 dBm, P2 =33 dBm HD-DL 0 10 -1 10 0 0.35 FD ; = -40 dBm ; = -43 dBm Maximum 0.3 0.25 HD-UL Maximum 10 1 10 2 0.2 10 -1 D2 /D1 10 0 U2 /U1 10 1 (a) Mean rate utility vs. ratio of DL weighting factors (b) Mean rate utility vs. ratio of UL weighting factors Fig. 5. Mean rate utility of FD, HD DL, and HD UL networks (in nats/sec/Hz) vs. the ratio of DL and UL weighting factors. degrade while the mean rate of UL transmissions improves where this improvement dominates the overall mean rate performance. This happens until achieving the maximum mean rate. After this point, as ρ increases (the right side of the optimal point), the mean rates of both DL and UL transmissions start to fall. Hence, the overall mean rate of the FD network start to decrease. A similar behavior is observed for varying the power control factor  which can be justified using the same line of arguments as that for varying ρ. It is worth mentioning that Figs. 3b and 4a show that DUA is always superior to CUA for all ranges of λ and ρ, which is in agreement with the analytical results in Section V. E. Effect of Weighting Factors Fig. 5a shows the mean rate utility of FD and HD DL networks as a function of DL weighting factors for different transmit power settings. For both networks, it can be clearly seen that the maximum mean rate utility is achieved when the ratio of the weighting factors is equal to the inverse of the transmit power ratio. For example, when P2 P1 = 0.2 (i.e., {P1 , P2 } = {33, 26} dBm), the rate of FD transmissions and HD DL transmissions are maximized when Similar remark can be made for different cases when the ratio values of P2 , P1 the rate is maximized when D2 D1 P2 P1 D2 D1 = P1 P2 = 5. is 1, 0.5, and 0.1. For these is set to 1, 2, and 10, respectively. This behavior is consistent with Theorem 2 and can be explained as follows. For HD DL networks, intuitively, the power of the useful signal at the UE is maximized while the power of interference from other BSs is minimized when Dj∗HD = Pj−1 . Consequently, both the SINR and mean rate are maximized. For FD networks, same argument holds for DL transmissions as shown in Corollary 2. On the other hand, the mean UL transmission rate in an FD network is independent of DL 26 weighting factors as shown in Theorem 1 and Corollary 1. Hence, the mean rate utility of FD transmissions is maximized by maximizing the rate of DL transmissions by setting Dj∗FD = Pj−1 . On the other hand, Fig. 5b shows the mean rate utility of FD and HD UL networks as a function of UL weighting factors for different receiver sensitivity settings. In contrast to Fig. 5a, the maximum rate utility for both FD and HD networks is achieved when the ratio of the weighting factors is equal 1. This behavior is evident for different values of ρ and can be explained as follows. For HD UL networks, when the UEs associate with their nearest BSs, the aggregate interference power is minimized as the UEs transmit with the minimum power required to perform channel inversion power control. In addition, the useful signal power is maximized as the probability of a UE to perform channel inversion without exceeding Pmax increases as the distance to the serving BS decreases. Therefore, both SINR and mean rate utility are maximum when Uk∗HD = U for some constant U . For FD networks, same argument holds for UL transmissions as given in Corollary 1. For DL transmissions in an FD network, UL-to-DL interference is minimized when all the UEs transmit with the minimum transmit power as given in Theorem 1 and Corollary 2. Hence, the mean rate utility of FD transmissions is maximized by simultaneously maximizing the rate of UL transmissions and minimizing the ULto-DL interference where both are achieved by setting Uk∗FD = U . Therefore, it is clear that the maximum rate offered by an FD network is achieved for Dj Dk = Pk Pj and Uj Uk = 1. In other words, thanks to DUA, the mean rate utility can be maximized by simultaneously optimizing both DL and UL weighting factors which is not generally possible with CUA. F. Effect of Imperfect Self-Interference Cancellation Fig. 6a shows the effect of SI on the performance of FD networks. It shows that the mean rate of DL and UL transmissions in FD networks are highly impacted with increasing σu and σb , respectively. It is clear that the effect of SI is more severe for UL transmissions as it occurs at the FD BS where the transmit power is generally high compared to the power of the signal received from UL UE. Fig. 6a also shows that, based on SIC capability of UEs and BSs, HD transmissions may be preferable to FD transmissions. Fig. 6b shows the minimum required SIC capabilities of the UEs and BSs so that the rate offered by an FD network is higher than that of its HD counterpart. For example, for the case, λ2 = 4λ1 , the rate offered by an HD network is higher than that offered by an FD network when the SIC capabilities of UEs and BSs are less than 40 and 50 dBm, respectively. In addition, SIC requirements are lower for higher spatial 27 0.5 Mean rate utility (nats/sec/Hz) 0.4 70 6 2 =46 1 Mean rate (FD Network) Downlink rate (HD Network) Uplink rate (HD Network) Downlink rate (FD Network) Uplink rate (FD Network) SI cancellation capability of BSs (dB) 0.45 0.35 0.3 0.25 0.2 0.15 0.1 6 2 =86 1 65 60 55 FD FD HD HD 50 45 0.05 0 10 20 30 40 50 SI cancellation capability (dB) 60 70 (a) Mean rate utility vs. SIC capability 40 10 20 30 40 50 SI cancellation capability of users (dB) 60 70 (b) Minimum required SIC capability for FD networks Fig. 6. Mean rate utility (in nats/sec/Hz) vs. SIC capability of BSs and UEs 1 σb k and 1 . σu density of BSs (e.g., for λ2 = 8λ1 ) due to the decrease of the transmit power and consequently SI at UEs. From Fig. 6b, it can also be seen that the SIC capability of UEs does not have to be as high as that of BSs to achieve the same performance. This is mainly because the transmit power of FD UEs is not very high compared to the transmit power of BSs. VII. C ONCLUSION We have presented a comprehensive framework for user association in multi-tier FD cellular networks. For both UL and DL transmissions, we have considered different user association criteria including both CUA and DUA. We have used stochastic geometry to model, analyze, and evaluate the performance of the proposed system in terms of mean rate utility of FD, UL, and DL transmissions. Using weighted path-loss user association, we have derived the optimal weighting factors that maximize the mean rate utility of FD transmissions in the presence of DL-to-DL, DL-to-UL, UL-to-UL, and UL-to-DL interferences. In addition, we have shown that, in order to maximize the mean rate utility of FD networks, the UEs should associate with their nearest BSs in UL and to the BSs that result in the maximum received power in DL. This shows the advantage of using DUA over CUA. We have also shown that FD networks may be preferable to HD networks based on the level of SIC at UEs and BSs. 28 A PPENDIX A P ROOF OF A SSOCIATION P ROBABILITY AND D ISTANCE D ISTRIBUTION I. Proof of Lemma 1 We first consider the case when a UE associates with different BSs for DL and UL. A UE associates with different BSs (xDL ∈ Φj for DL and xUL ∈ Φk for UL where j 6= k) under the following four conditions: (i) xUL meets the criterion in (1) for UL, i.e., Uk kxUL kα < minx∈Φi Ui kxkα xDL meets the criterion in (2) for DL, i.e., Dj kxDL kα < minx∈Φi Di kxkα ∀i 6= j, k, (ii) ∀i 6= j, k, (iii) xDL does not meet the criterion defined for UL in (1), i.e., Uj kxDL kα > Uk kxUL kα , and (iv) xUL does not meet the criterion defined for DL in (2), i.e., Dk kxUL kα > Dj kxDL kα . Let Rj = kxDL k and Rk = kxUL k, the event that j 6= k can be expressed as:   K \ 1 1 1  α α α α Djk Rj < Rk < Ujkα Rj . min kxk > max Dji Rj , Uki Rk i=1,i6=j,k Hence, (a) " " ψjk = E exp −π (b) = 4π 2 λj λk Z Z 1 α Ujk 1 α Djk K X i=1,i6=j,k ∞ Z 1 αu Ujk 1 αu Djk 0 = 2λj λk (37) x∈Φi x K X i=1  max Dji Rjα , Uki Rkα " uv exp −π  2 α K X i=1 2 α 2 α # 1 α 1 α λi Djk Rj < Rk < Ujk Rj 2 α # # max{Dji uα , Uki v α } λi dvdu λi max Dji , Uki x 2  !−2 dx (38) where (a) follows from: (i) the fact that the minimum distance to a BS from a PPP Φi is Rayleigh-distributed with CDF P [minx∈Φi kxk ≤ t] = 1 − exp[−πλi t2 ] and (ii) independence assumption for network tiers, (b) follows since the expectation in (a) is with respect to Rj and Rk which denote the distances to the serving BSs. Note also that ψjk = 0 when k > j due to ordering the network tiers such that µi < µi+1 (i.e., Assumption 1). For the case when j = k, using (1) and (2) and following a similar procedure, the probability of the event, where xDL = xUL = xo given that xo belongs to the j-th tier, can be expressed as: " " ## K X 2 max{Dji , Uji } α λi Rj2 . (39) ψjj = E exp −π i=1,i6=j Hence, the result in (3) can be easily verified. 29 II. Proof of Lemma 4 Following the proof in Appendix A-I, the joint CDF of the distance can be obtained by adding two more conditions such that Rj > rj and Rk > rk . Then, the joint PDF can be obtained by differentiation. E[Rjm ] and E[Rkn ] follow the definition of the expected value. A PPENDIX B P ROOF OF M EAN I NTERFERENCE I. Proof of Lemma 6 Following the definition in (10), g2 (r), and g3 (r), we have " #!   Z Z ∞ K 2  α  UL  (a) X r Pi ∞ 1 − exp −πΛDL min{ρ G R , P } i max i i = 2πλi E I dr + ERi r1−α dr 1 αb −1 α G r G b db Uik Ri i=1 ! 2−α K X   Uikα K1 (db , αb , ΛDL i ) Pi + ERi min {ρi Riα , Pmax } Ri2−α = 2πλi (40) Gb G(α − 2) i=1 where (a) follows from (i) the Rayleigh fading assumption of interference channels gain and (ii) Campbell’s Theorem [5] knowing that the distance R from the tagged BS to the closest interfering 1 UE from tier i is greater than Uikα Ri (i.e., Ui Riα < Uk Rα ) as explained earlier in Section IV-B. i In addition, the spatial density of interfering BSs is λi (1 − exp[−π AλDL r2 ]). Following Lemma i   3, we obtain ERi min {ρi G Riα , Pmax } Ri2−α = ρi K2 (i). II. Proof of Lemma 7 Following the definition in (9), g1 (r), and g4 (r), we have  !  Z ∞ Z ∞ K UL 2  DL  (a) X 1 − exp −πΛ r ERi [Γi ] Pi i r1−α dr + dr E I = 2πλi 1 α −1 u G Djiα Rj Gu r du i=1 (41) where (a) follows from (i) the Rayaleigh fading assumption of interference channels gain and (ii) i the fact that Di Rα > Dj Rjα and the spatial density of interfering UEs is λi (1 − exp[−π AλUL r2 ]). i   Moreover, (21) is obtained from (11) such that E IDL = σu E [Γk ]. SI A PPENDIX C P ROOF OF T HEOREM 1 By combining (13), (15), (19), Lemma 6, and Lemma 7 and rearranging all terms, we have R̄ = K K X X j=1 k=1 DL ψjk ER [ln RUL jk ] + ER [ln Rjk ]  (42) 30 # " K K α X X σ P + A (k) R bk k 3 k UL UL = ln RDL G ψjk ER o + ln Ro − τ α  ρk G min{Rk , Pρkmax } G j=1 k=1 − τ DL G K K X A1 (j) X j=1 Pj K K X     1 X ψjk ER Rj2 − τ DL G ψjk (σu E[Γk ] + A2 )ER Rjα Pj k=1 j=1 k=1 (43) where the expectation is with respect to the distance to the serving BS(s) (i.e., DL and UL). Hence, using Lemmas 3 and 4, the expressions in Theorem 1 can be verified. R EFERENCES [1] A. Sabharwal, P. Schniter, D. Guo, D. Bliss, S. Rangarajan, and R. Wichman,“In-band full-duplex wireless: Challenges and opportunities” IEEE J. Select. Areas Commun., vol. 32, no. 9, pp. 1637–1652, Sept. 2014. [2] I. Randrianantenaina, H. ElSawy, and M.-S. Alouini, “Limits on the capacity of in-band full duplex communication in uplink cellular networks” in Proc. of 2015 IEEE Global Telecommunications Conference (GLOBECOM), 2015. [3] S. Hong, J. Brand, J. Choi, M. Jain, J. Mehlman, S. Katti, and P. Levis, “Applications of self-interference cancellation in 5G and beyond,” IEEE Commun. Mag., vol. 52, no. 2, pp. 114–121, Feb. 2014. [4] H. Elshaer, F. Boccardi, M. Dohler, and R. Irmer, “Downlink and uplink decoupling: A disruptive architectural design for 5G networks,” in Proc. of 2014 IEEE Global Telecommunications Conference (GLOBECOM), 2014, pp. 1798–1803. [5] M. Haenggi and R. K. Ganti, Interference in Large Wireless Networks. Now Publishers Inc, 2009. [6] S. Singh, X. Zhang, J. G. Andrews, “Joint rate and SINR coverage analysis for decoupled uplink-downlink biased cell associations in HetNets,” IEEE Trans. Wireless Commun., vol. 14, no. 10, pp. 5360–373, May 2015. [7] Y. Lin, W. Bao, W. Yu, and B. Liang, “Optimizing user association and spectrum allocation in HetNets: A utility perspective,” IEEE J. Select. Areas Commun., vol. 33, no. 6, pp. 1025–1039, June 2015. [8] K. Smiljkovikj, H. Elshaer, P. Popovski, F. Boccardi, M. Dohler, L. Gavrilovska, and R. Irmer, “Capacity analysis of decoupled downlink and uplink access in 5G heterogeneous systems,” Available [Online]: arXiv:1410.7270 (2015). [9] S. Sekander, H. Tabassum, and E. Hossain, “A matching game for decoupled uplink-downlink user association in fullduplex small cell networks,” in Proc. of 2015 IEEE Global Telecommunications Conference (GLOBECOM), 2015. [10] Z. Tong and M. Haenggi, “Throughput analysis for full-duplex wireless networks with imperfect self-interference cancellation,” IEEE Trans. Commun., vol. 63, no. 11, pp. 4490–4500, Nov. 2015. [11] A. Munari, P. Mähönen, and M. Petrova, “A stochastic geometry framework for asynchronous full-duplex networks.” Available [Online]: arXiv:1512.01478 (2015). [12] A. AlAmmouri, H. ElSawy, and M.-S. Alouini, “Flexible design for α-duplex communications in multi-tier cellular networks,” Available [Online]: arXiv:1511.07903 (2015). [13] J. Lee and T. Q. S. Quek, “Hybrid full-/half-duplex system analysis in heterogeneous wireless networks,” IEEE Trans. Wireless Commun., vol. 14, no. 5, pp. 2883–2895, May 2015. [14] C. Psomas, M. Mohammadi, I. Krikidis, and H. A. Suraweera, “Directional antennas for interference management in full-duplex cellular networks,” Available [Online]: arXiv:1602.02718 (2016). [15] I. Atzeni, M. Kountouris, “Full-duplex MIMO small-cell networks with interference iancellation,” Available [Online]: arXiv:1612.07289 (2016). [16] A. Shojaeifard, K. Wong, M. Di Renzo, G. Zheng, K. A. Hamdi, and J. Tang, “Massive MIMO-enabled full-duplex cellular networks,” Available [Online]: arXiv:1611.03854 (2016). 31 [17] J. H. Yun, “Intra and inter-cell resource management in full-duplex heterogeneous cellular networks,” IEEE Trans. Mobile Comput., vol. 15, no. 2, pp. 392–405, Feb. 2016. [18] C. Nam, C. Joo, and S. Bahk, “Joint subcarrier assignment and power allocation in full-duplex OFDMA networks,” IEEE Trans. Wireless Commun., vol. 14, no. 6, pp. 3108–3119, June 2015. [19] S. Goyal, P. Liu, S. Panwar, R. Yang, R. A. DiFazio, and E. Bala, “Full duplex operation for small cells,” Available [Online]: arXiv:1412.8708 (2015). [20] W. Choi, H. Lim, and A. Sabharwal, “Power-controlled medium access control protocol for full-duplex WiFi networks,” IEEE Trans. Wireless Commun., vol. 14, no. 7, pp. 3601–3613, July 2015. [21] 3GPP, “TR 36.814 v.9.0.0: Further advancements for E-UTRA,” Mar. 2010. [22] D. Nguyen, L. Tran, P. Pirinen, and M. Latva-aho, “On the spectral efficiency of full-duplex small cell wireless systems,” IEEE Trans. Wireless Commun., vol. 13, no. 9, pp. 4896–4910, Sep. 2014. [23] F. J. Martin-Vega, G. Gomez, M. C. Aguayo-Torres, and M. Di Renzo,“Analytical modeling of interference aware power control for the uplink of heterogeneous cellular networks,” IEEE Trans. Wireless Commun., vol. 15, no. 10, pp. 6742–6757, Oct. 2016. [24] H.-S. Jo, Y. J. Sang, P. Xia, and J. Andrews, “Heterogeneous cellular networks with flexible cell association: A comprehensive downlink SINR analysis,” IEEE Trans. Wireless Commun., vol. 11, no. 10, pp. 3484–3495, Aug. 2012. [25] A. H. Sakr and E. Hossain, “Analysis of multi-tier uplink cellular networks with energy harvesting and flexible cell association,” in Proc. of 2014 IEEE Global Telecommunications Conference (GLOBECOM), 2014, pp. 4712–4717. [26] B. Blaszczyszyn and D. Yogeshwaran, “Clustering comparison of point processes with applications to random geometric models,” Available [Online]: arXiv:1212.5285 (2014). [27] A. H. Sakr and E. Hossain, “Location-aware cross-tier coordinated multipoint transmission in two-tier cellular networks,” IEEE Trans. Wireless Commun., vol. 13, no. 11, pp. 6311–6325, Aug. 2014. [28] A. H. Sakr and E. Hossain, “Analysis of K-tier uplink cellular networks with ambient RF energy harvesting,” IEEE J. Select. Areas Commun., vol. 33, no. 10, pp. 2226–2238, Oct. 2015. [29] M. Haenggi, “User point processes in cellular networks,” Available [Online]: arXiv:1611.08560 (2016). [30] M. Ni, L. Zheng, F. Tong, J. Pan and L. Cai, “A geometrical-based throughput bound analysis for device-to-device communications in cellular networks,” IEEE J. Select. Areas Commun., vol. 33, no. 1, pp. 100–110, Jan. 2015. [31] T. Bai and R. W. Heath, “Analyzing uplink SINR and rate in massive MIMO systems using stochastic geometry,” IEEE Trans. Commun., vol. 64, no. 11, pp. 4592–4606, Nov. 2016. [32] F. Baccelli, B. Blaszczyszyn, and C. Singh, “Analysis of a proportionally fair and locally adaptive spatial aloha in Poisson networks,” in Proc. IEEE Int. Conf. Comput. Commun. (INFOCOM), 2014, pp. 2544–2552. [33] F. Kelly, A. Maulloo, and D. Tanm “Rate control in communication networks: shadow prices, proportional fairness and stability,” Journal of the Operational Research Society, vol. 49, no. 3, pp. 237–252, Mar. 1998.
7cs.IT
Design and Optimisation of the FlyFast Front-end for Attribute-based Coordination Diego Latella Mieke Massink Consiglio Nazionale delle Ricerche Istituto di Scienza e Tecnologie dell’Informazione “A. Faedo” [email protected], [email protected] Collective Adaptive Systems (CAS) consist of a large number of interacting objects. The design of such systems requires scalable analysis tools and methods, which have necessarily to rely on some form of approximation of the system’s actual behaviour. Promising techniques are those based on mean-field approximation. The FlyFast model-checker uses an on-the-fly algorithm for bounded PCTL model-checking of selected individual(s) in the context of very large populations whose global behaviour is approximated using deterministic limit mean-field techniques. Recently, a front-end for FlyFast has been proposed which provides a modelling language, PiFF in the sequel, for the Predicate-based Interaction for FlyFast. In this paper we present details of PiFF design and an approach to state-space reduction based on probabilistic bisimulation for inhomogeneous DTMCs. 1 Introduction Collective Adaptive Systems (CAS) consist of a large number of entities with decentralised control and varying degrees of complex autonomous behaviour. They form the basis of many modern smart city critical infrastructures. Consequently, their design requires support from formal methods and scalable automatic tools based on solid mathematical foundations. In [29, 27], Latella et al. presented a scalable mean-field model-checking procedure for verifying bounded Probabilistic Computation Tree Logic (PCTL, [19]) properties of an individual1 in the context of a system consisting of a large number of interacting objects. The model-checking procedure is implemented in the tool FlyFast2 . The procedure performs on-the-fly, mean-field, approximated model-checking based on the idea of fast simulation, as introduced in [8]. More specifically, the behaviour of a generic agent with S states in a system with a large number N of instances of the agent at given step (i.e. time) t is approximated by K(µ(t)) where K(m) is the S × S probability transition matrix of an (inhomogeneous) DTMC and µ(t) is a vector of size S approximating the mean behaviour of (the rest of) the system at t; each element of µ(t) is associated with a distinct state of the agent, say C, and gives an approximation of the fraction of instances of the agent that are in state C in the global system, at step t. Note that such an approximation is a deterministic one, i.e. µ is a function of the step t (the exact behaviour of the rest of the system would instead be a large DTMC in turn); note furthermore, that the above transition matrix does not depend on N [29, 27]. Recently, modelling and programming languages have been proposed specifically for autonomic computing systems and CAS [12, 5]. Typically, in such frameworks, a system is composed of a set of independent components where a component is a process equipped also with a set of attributes describing features of the component. The attributes of a component can be updated during its execution so 1 The technique can be applied also to a finite selection of individuals; in addition, systems with several distinct types of individuals can be dealt with; for the sake of simplicity, in the present paper we consider systems with many instances of a single individual only and we focus in the model-checking a single individual in such a context. 2 http://j-sam.sourceforge.net/ De Vink and Wiklicky (Eds.): QAPL 2017 EPTCS 250, 2017, pp. 92–110, doi:10.4204/EPTCS.250.6 c D. Latella & M. Massink This work is licensed under the Creative Commons Attribution License. D. Latella & M. Massink 93 that the association between attribute names and attribute values is maintained in the dynamic store of the component. Attributes can be used in predicates appearing in language constructs for component interaction. The latter is thus typically modelled using predicate-based output/input multicast, originally proposed in [26], and playing a fundamental role in the interaction schemes of languages like SCEL [12] and C ARMA [5]. In fact, predicate-based communication can be used by components to dynamically organise themselves into ensembles and as a means to dynamically select partners for interaction. Furthermore, it provides a way for representing component features, like for instance component location in space, which are fundamental for systems distributed in space, such as CAS [30]. In [9] we proposed a front-end modelling language for FlyFast that provides constructs for dealing with components and predicate-based interaction; in the sequel, the language—which has been inspired by C ARMA— will be referred to as PiFF, which stands for for Predicate-based Interaction for FlyFast. Components interact via predicate-based communication. Each component consists of a behaviour, modelled as a DTMC-like agent, like in FlyFast, and a set of attributes. The attribute name-value correspondence is kept in the current store of the component. Actions are predicate based multi-cast output and input primitives; predicates are defined over attributes. Associated to each action there is also an (atomic) probabilistic store-update. For instance, assume components have an attribute named loc which takes values in the set of points of a space, thus recording the current location of the component. The following action models a multi-cast via channel α to all components in the same location as the sender, making it change location randomly: α ∗ [loc = my.loc]hiJump. Here Jump is assumed to randomly update the store and, in particular attribute loc. The computational model is clock-synchronous, as in FlyFast, but at the component level. In addition, each component is equipped with a local outbox. The effect of an output action α ∗ [πr ]hiσ is to deliver output label αhi to the local outbox, together with the predicate πr , which (the store of) the receiver components will be required to satisfy, as well as the current store of the component executing the action; the current store is updated according to update σ . Note that output actions are non-blocking and that successive output actions of the same component overwrite its outbox. An input action α ∗ [πs ]()σ by a component will be executed with a probability which is proportional to the fraction of all those components whose outboxes currently contain the label αhi, a predicate πr which is satisfied by the component, and a store which satisfies in turn predicate πs . If such a fraction is zero, then the input action will not take place (input is blocking), otherwise the action takes place, the store of the component is updated via σ , and its outbox cleared. Related Work CAS are typically large systems, so that the formal analysis of models for such systems hits invariantly the state-space explosion problem. In order to mitigate this problem, the so called ‘onthe-fly’ paradigm is often adopted (see e.g. [10, 4, 21, 16]). In the context of probabilistic model-checking several on-the-fly approaches have been proposed, among which [13], [28] and [18]. In [13], a probabilistic model-checker is shown for the time bounded fragment of PCTL. An on-the-fly approach for full PCTL model-checking is proposed in [28] where, actually, a specific instantiation is presented of an algorithm which is parametric with respect to the specific probabilistic processes modelling language and logic, and their specific semantics. Finally, in [18] an on-the-fly approach is used for detecting a maximal relevant search depth in an infinite state space and then a global model-checking approach is used for verifying bounded Continuous Stochastic Logic (CSL) [1, 2] formulas in a continuous time setting on the selected subset of states. An on-the-fly approach by itself however, does not solve the challenging scalability problems that arise in truly large parallel systems, such as CAS. To address this type of scalability challenges in probabilistic model-checking, recently, several approaches have been proposed. In [20, 17] approximate 94 Designing Attribute-based FlyFast probabilistic model-checking is introduced. This is a form of statistical model-checking that consists in the generation of random executions of an a priori established maximal length [25]. On each execution the property of interest is checked and statistics are performed over the outcomes. The number of executions required for a reliable result depends on the maximal error-margin of interest. The approach relies on the analysis of individual execution traces rather than a full state space exploration and is therefore memory-efficient. However, the number of execution traces that may be required to reach a desired accuracy may be large and therefore time-consuming. The approach works for general models, i.e. models where stochastic behaviour can also be non Markovian and that do not necessarily model populations of similar objects. On the other hand, the approach is not independent from the number of objects involved. As recalled above, in [27] a scalable model-checking algorithm is presented that is based on mean-field approximation, for the verification of time bounded PCTL properties of an individual in the context of a system consisting of a large number of interacting objects. Correctness of the algorithm with respect to exact probabilistic model-checking has been proven in [27] as well. Also this algorithm is actually an instantiation of the above mentioned parametric algorithm for (exact) probabilistic model-checking [28], but the algorithm is instantiated on (time bounded PCTL and) the approximate, mean-field, semantics of a population process modelling language. It is worth pointing out that FlyFast allows users to perform simulations of their system models and to analyse the latter using their exact probabilistic semantics and exact PCTL model-checking. In addition, the tool provides approximate model-checking for bounded PCTL, using the model semantics based on mean-field. The work of Latella et al. [27] is based on mean-field approximation in the discrete time setting; approximated mean-field model-checking in the continuous time setting has been presented in the literature as well, where the deterministic approximation of the global system behaviour is formalised as an initial value problem using a set of differential equations. Preliminary ideas on the exploitation of mean-field convergence in continuous time for model-checking were informally sketched in [23], but no model-checking algorithms were presented. Follow-up work on the above mentioned approach can be found in [24] which relies on earlier results on fluid model-checking by Bortolussi and Hillston [6], later published in [7], where a global CSL model-checking procedure is proposed for the verification of properties of a selection of individuals in a population, which relies on fast simulation results. This work is perhaps closest related to [27, 29]; however their procedure exploits mean-field convergence and fast simulation [11, 15] in a continuous time setting—using a set of differential equations—rather than in a discrete time setting—where an inductive definition is used. Moreover, that approach is based on an interleaving model of computation, rather than a clock-synchronous one; furthermore, a global model-checking approach, rather than an on-the-fly approach is adopted; it is also worth noting that the treatment of nested formulas, whose truth value may change over time, turns out to be much more difficult in the interleaving, continuous time, global model-checking approach than in the clock-synchronous, discrete time, on-the-fly one. PiFF has been originally proposed in [9], where the complete formal, exact probabilistic, semantics of the language have been defined. The semantics definition consists of three transition rules—one for transitions associated with output actions, one for those associated with input actions, and one for transitions to be fired with residual probability. The rules induce a transition relation among component states and compute the relevant probabilities. From the component transition relation, a component one-step transition probability matrix is derived, the elements of which may depend on the fractions of the components in the system which are in a certain state. The system-wide one-step transition probability matrix is obtained by product—due to independence assumptions—using the above mentioned component probability matrix and the actual fractions in the current system global state. In [9] a translation of PiFF to the model specification language of FlyFast has also been presented which makes PiFF an additional front- D. Latella & M. Massink 95 end for FlyFast extending its applicability to models of systems based on predicate-based interaction. In the above mentioned paper, correctness of the translation has been proved as well. In particular, it has been shown that the probabilistic semantics of any PiFF model are isomorphic to those of the translation of the model. In other words, the transition probability matrix of (the DTMCs of) the two models is the same. A companion translation of bounded PCTL formulas is also defined [9] and proven correct. The notion of the outbox used in PiFF is reminiscent of the notion of the ether in PALOMA [14] in the sense that the collection of all outboxes together can be thought of as a kind of ether; but such a collection is intrinsically distributed among the components so that it cannot represent a bottleneck in the execution of the system neither a singularity point in the deterministic approximation. We are not aware of other proposals, apart from [9], of probabilistic process languages, equipped both with standard, DTMC-based, semantics and with mean-field ones, that provide a predicate-based interaction framework, and that are fully supported by a tool for probabilistic simulation, exact and mean-field model-checking. We conclude this section recalling that mean-field/fluid procedures are based on approximations of the global behaviour of a system. Consequently, the techniques should be considered as complementary to other, possibly more accurate but often not as scalable, analysis techniques for CAS, primarily those based on stochastic simulation, such as statistical model-checking. In this paper we present some details of PiFF, a translation to FlyFast which simplifies that proposed in [9] and an approach to model reduction based on probabilistic bisimulation for Inhomogeneous DTMCs. In Section 2 we briefly present the main ingredients of the PiFF syntax and informal semantics, and we recall those features of FlyFast directly relevant for understanding the translation of PiFF to the FlyFast input language proposed in [9]. A revised and simplified version of the translation is described in Section 3. In Section 4 we introduce a simplified language for the definition of transition-probabilities in PiFF that allows us to define in Section 5 a model reduction procedure of the translation result, based on a notion of bisimulation for the kind of IDTMCs of interest, introduced in Section 5 as well. An example of application of the procedure is presented in Section 6. Some conclusions are drawn in Section 7. A formal proof of decidability of the cumulative probability test for state-space reduction based on bisimulation is provided in the Appendix. 2 Summary on PiFF and FlyFast In the following we present the main ingredients of PiFF and the features of FlyFast relevant for the present paper. 2.1 PiFF A PiFF system model specification ϒ = (∆ϒ , Fϒ , Σ0 )(N) is a triple where Fϒ is the set of relevant function definitions (e.g. store updates, auxiliary constants and functions), ∆ϒ is a set of state defining equations, and Σ0 is the initial system state (an N-tuple of component states, each of which being a 3-tuple (C, γ, O) of agent state C, store γ and outbox O). We describe the relevant details below referring to [9] for the formal definition probabilistic semantics of the language. The PiFF type system consists of floating point values and operations, as in FlyFast, plus simple enumeration types for attributes, declared according to the syntax attype < name > enum < id − list >. < id − list > is a finite list of identifiers. Of course, attributes can also take floating point values. In Figure 1 the attribute type Space is defined that consists of four values A, B, C, D modelling four Designing Attribute-based FlyFast 96 attype Space enum A, B, C, D; .. . const H = 0.6; const L = 1 − H; const Hdiv2 = H/2; const Ldiv2 = L/2; .. . attribute loc : Space; .. . func Hr(x : Space) : Space; x endfunc; func N(x : Space) : Space; case x of A : A; B : B; C : B; D : A endfunc; func S(x : Space) : Space; case x of A : D; B : C; C : C; D : D endfunc; func E(x : Space) : Space; case x of A : A; B : A; C : D; D : D endfunc; func W(x : Space) : Space; case x of A : B; B : B; C : C; D : C endfunc; .. . func pHr(x : Space) : float; case x of A : H; B : L; C : H; D : L endfunc; func pN(x : Space) : float; case x of A : 0; B : 0; C : Ldiv2; D : Hdiv2 endfunc; func pS(x : Space) : float; case x of A : Ldiv2; B : Hdiv2; C : 0; D : 0 endfunc; func pE(x : Space) : float; case x of A : 0; B : Hdiv2; C : Ldiv2; D : 0 endfunc; func pW(x : Space) : float; case x of A : Ldiv2; B : 0; C : 0; D : Hdiv2 endfunc; .. . update Jump my.loc := Hr(my.loc) with pHr(my.loc); my.loc := N(my.loc) with pN(my.loc); my.loc := S(my.loc) with pS(my.loc); my.loc := E(my.loc) with pE(my.loc); my.loc := W(my.loc) with pW(my.loc) endupdate Figure 1: A fragment of FSI . D. Latella & M. Massink 97 locations. Some auxiliary constants are defined, using the const construct inherited from FlyFast: const < name > = < value >. A PiFF store update definition has the following syntax3 : update upd my.a1 := e11 , . . . , my.ak := ek1 with p1 ; .. . my.a1 := e1n , . . . , my.ak := ekn with pn endupdate where upd is the update name (unique within the system model specification), a1 , . . . , ak are the attribute names of the component, e11 , . . . , ekn and p1 , . . . , pn are attribute/store-probability expressions respectively, with syntax defined according to the grammars e ::= va | ca | my.a | f na (e1 , . . . , em ) and p ::= v p | c p | f n p (e1 , . . . , em ). In the above definition of attribute expressions va is an attribute value (drawn from finite set V of attribute values), ca is an attribute constant in V defined using the const; a ∈ {a1 , . . . , ak } is an attribute name and f na is an attribute function defined by the user in Fϒ , which, when applied to attribute expressions e1 , . . . , em returns an attribute value; the syntax for such function definitions afd is given below: afd ::= func f na (x1 : T 1, . . . , xm : T m) : T ; afb endfunc afb ::= e |case (x1 , . . . , xm ) of(va11 , . . . , vam1 ) : e1 ; (va12 , . . . , vam2 ) : e2 ; . . . (va1k , . . . , vamk ) : ek where f na is the name of the attribute function, x1 : T 1, . . . , xm : T m are its parameters and their relative types, T is the type of the result of f na ; e, ei are attribute-expressions and vai j are attribute-values. In Figure 1 attribute functions N, S, E, W are defined for North, South, East, and West, such that Space models the Cartesian space with four quadrants: A = N(D) = E(B), B = N(C) = W(A), and so on, as shown diagrammatically in Figure 2 right. Function Hr is the identity on Space. In the definition of store-probability expressions v p ∈ (0, 1], c p is a store-probability constant in (0, 1] defined using the FlyFast const construct, and f n p is a store-probability function defined by the user in Fϒ , which, when applied to attribute expressions e1 , . . . , em returns a probability value.The syntax for store-probability function definitions pfd is similar to that of attribute functions: pfd ::= func f n p (x1 : T 1, . . . , xm : T m) : float; pfb endfunc pfb ::= p |case (x1 , . . . , xm ) of(va11 , . . . , vam1 ) : p1 ; (va12 , . . . , vam2 ) : p2 ; . . . (va1k , . . . , vamk ) : pk where f n p is the name of the store-probability function, the result type is float (actually the range [0, 1]) x1 : T 1, . . . , xm : T m are its parameters and their relative types, p, pi are store-probability expressions and vai j are attribute-values. In any store update definition it must be guaranteed that the values of p1 . . . pn sum up4 to 1. The informal meaning is clear. The store update will make attributes a1 , . . . , ak take the values of e1i , . . . , eki respectively with probability equal to the value of pi . In Figure 1 store-probability functions pHr, pN, pS, pE, pW are defined that give the probabilities of not moving (pHr), or of jumping to North (pN), South (pS), East (pE), West (pW), as functions of the 3 In [9] a slightly different syntax for store updates has been used. this version of the translation we allow only flat updates, i.e. the specific probability of each combination of values assigned to the attributes must be given explicitly. Other possibilities could be defined using combinations of (independent) probability distributions. 4 In Designing Attribute-based FlyFast 98 S := frc (I) :: inf∗ [⊥]hiJump.I + frc (S) :: nsc∗ [⊥]hiJump.S I := ii :: inf∗ [⊥]hiJump.I + ir :: rec∗ [⊥]hiJump.S Figure 2: SI, a behavioural model. current location. Example 1 A simplified version of the behaviour of the epidemic process discussed in [9] is shown in Figure 2 left5 . In Figure 1 we show a fragment of FSI defining store update Jump together with the relevant type, constant and function definitions as introduced above. The component has just one attribute, named loc, with values in Space. The effect of Jump executed by a component in which loc is bound to quadrant ` is to leave the value of loc unchanged with probability pHr(`), change it to the quadrant North of ` with probability pN(`), and so on. Note that H > L and this implies that higher probability is assigned to A and C and low probability to B and D. This is represented in Figure 2 right where higher probability locations are shown in green and lower probability ones are shown in red; moreover, the relevant probabilities are represented as arrows (H/2, L/2) or self-loops (H, L). A susceptible (state S) component becomes infected (state I) via an inf action which takes place with probability equal to the fraction of components in the system which are currently infected (i.e. frc(I)); it remains in state S via the self-loop labelled by action nsc, with probability frc(S) = 1 − frc(I). An infected node (state I) may recover, entering state S with action rec and probability ir; while infected, it keeps executing action inf, with probability ii. Note that, for the sake of simplicity, we use only internal actions, modelled by means of output actions with predicate false (⊥). We assume that in the initial global state all outboxes are non-empty; each contains the initial store of the specific component (i.e., its initial location), predicate ⊥ and the empty tuple hi). A PiFF state defining equation has the following (abstract) form: C := ∑ j∈J [g j ]p j :: act j .C j where either [g j ]p j is the keyword rest or: • g j is a boolean expression b which may depend on the current store, but not on the current occupancy measure vector: b ::= > | ⊥ | e ./ e | ¬b | b ∧ b and e ::= va | ca |my.a where > (⊥) denotes the constant true (false), ./ ∈ {≥, >, ≤, <}, va is an attribute value (drawn from finite set V of attribute values), ca is an attribute constant in V defined using the FlyFast const construct, and a is the name of an attribute of the component. • p j is a transition probability expression p ::= v p | c p | frc (C) | frc (π) | ∏i∈I pi | ∑i∈I pi | 1 − p, for finite I, where v p ∈ (0, 1], c p a constant in (0, 1] defined via the const construct, and π is defined as b above, but where expressions e can also be attribute names a (i.e. e ::= va | ca | my.a | a); frc (C) is the fraction of components currently in state C over the total number N; similarly, frc (π) is the fraction of components the current store of which satisfies π, over the total number N. Note that it must be guaranteed that ∏i∈I pi ≤ 1 and ∑i∈I pi ≤ 1. 5 We focus only on those features that are most relevant for the present paper. In [9] also other features are shown like, e.g. the use of (predicate-based) input actions, which are not the main subject of this paper. D. Latella & M. Massink 99 • act j can be an output action α ∗ [π]hiσ or an input action α ∗ [π]()σ , where π is as above and σ is the name of a store update. Note that in the case of an input action, π refers to the store of the partner component in the previous step of the computation. If [g j ]p j = rest, then act j must be an output action α ∗ [π]hiσ , to be executed with the residual probability. 2.2 FlyFast FlyFast accepts a specification h∆, A, C0 i(N) of a model of a system consisting of the clock-synchronous product of N instances of a probabilistic agent. The states of the DTMC-like agent model are specified by a set of state-defining equations ∆. The (abstract) form of a state defining equation is the following C := ∑ri=1 ai .Ci where ai ∈ A—the set of FlyFast actions—C,Ci ∈ S—the set of FlyFast states—and, for i, j = 1, . . . , r ai 6= a j if i 6= j; note that Ci = C j with i 6= j is allowed instead6 . Each action has a probability assigned by means of an action probability function definition in A of the form a :: exp where exp is an expression consisting of constants and frc (C) terms. Constants are floating point values or names associated to such values using the construct const < name > = < value >; frc (C) denotes the element associated to state C in the current occupancy measure vector7 . So, strictly speaking, ∆ and A characterise an inhomogeneous DTMC whose probability matrix K(m) is a function of the occupancy measure vector m such that for each pair of states C,C0 , the matrix element K(m)C,C0 is the probability of jumping from C to C0 given the current occupancy measure vector m. Letting S∆ be the set of states of the agent, with |S∆ | = S, and U S = {(m1 , . . . , mS )|m1 + . . . + mS = 1} denote the unit simplex of dimension S, we have K : U S × S∆ × S∆ → [0, 1]. Matrix K is generated directly from the input specification h∆, A, C0 i(N) ; the reader interested in the details of how to derive K is referred to [27, 29]. Auxiliary function definitions can be specified in A. The initial state C0 is a vector of size N consisting of the initial state of each individual object. Finally, note that in matrix K(m) the information on specific actions is lost, which is common in PCTL/DTMC based approaches; furthermore, we note that, by construction, K(m) does not depend on N (see [27, 29] for details). 3 A revised translation As in [9], we define a translation such that, given a PiFF system specification ϒ = (∆ϒ , Fϒ , Σ0 )(N) , the translation returns the FlyFast system specification h∆, A, C0 i(N) preserving probabilistic semantics. The predicate-based FlyFast front-end is then completed with a simple translation at the PCTL level, for which we refer to [9]. The system model specification translation consists of two phases. In the first phase, each action in the input system model specification ϒ is annotated with an identifier which is unique within the specification. We let ℵ(ϒ) denote the resulting specification. These annotations will make action names unique specification-wide thus eliminating complications which may arise from multiple occurrences of the same action, in particular when leading to the same state (see [9] for details). Of course, these annotations are disregarded in the probabilistic semantics, when considering the interaction model of components. In other words, an output action αhi in outbox (γ, π, αhi) must match with any input 6 The concrete FlyFast syntax is: state C{a 1.C 1 + a 2.C 2 ...a r.C r}. 7 The occupancy measure vector is a vector with as many elements as the number of states of an individual agent; the element associated to a specific state gives the fraction of the subpopulation currently in that state over the size of the overall population. The occupancy measure vector is a compact representation of the system global state. Designing Attribute-based FlyFast 100 action α() even if αhi would actually correspond to (α, ι)∗ [π]hi and α() would actually correspond to (α, η)∗ [π 0 ](). Apart from this detail, the probabilistic semantics as defined in [9] remain unchanged. The second phase is defined by the translation algorithm defined in Figure 5, which is a revised and simplified version of that presented in [9] and is applied to ℵ(ϒ). We let I (ℵ(ϒ)) denote the result of the translation, namely the pure FlyFast system specification h∆, A, C0 i(N) . We recall here some notation from [9]. We let S∆ϒ denote the set of states of ϒ; Γ∆ϒ is the set of all stores defined over the attributes of ϒ—a store is a finite mapping from the attributes of the component to a finite set of values V , thus Γ∆ϒ is finite—and O∆ϒ the finite set of all outboxes of ϒ. A ϒ component-state is a triple (C, γ, O) ∈ S∆ϒ × Γ∆ϒ × O∆ϒ = Ω∆ϒ . If the component-state is the target of a transition modelling the execution of an output action, then O = (γ 0 , π, αhi), where γ 0 is the store of the (component-state) source of the transition, π is the predicate used in the action—actualised with γ 0 —and αhi the actual message sent by the action. If, instead, the component-state is the target of a transition for an input action, then O = hi, i.e. the empty outbox. Note that the set of component states of ℵ(ϒ) is identical to that of ϒ. Also the set of all stores of ℵ(ϒ) is the same as that of ϒ. In the algorithm of Figure 5 by t ∗ t 0 we mean the syntactical term representing the product of terms t and t 0 ; the notation is extended to PROD{t|cond(t)}, denoting the syntactical product t1 ∗ . . . ∗ tn if {t|cond(t) = tt} = {t1 , . . . ,tn } 6= 0/ and 1 otherwise. Similarly, SUM{t|cond(t)} denotes the syntactical sum t1 + . . . + tn if {t|cond(t) = tt} = {t1 , . . . ,tn } 6= 0/ and 0 otherwise. The translation algorithm uses a few auxiliary functions which we briefly discuss below: • IS : Ω∆ϒ → S is a total injection which maps every component state of ℵ(ϒ) to a distinct state of I (ℵ(ϒ)); we recall that S denotes the set of state names of FlyFast models. • IA : (S∆ϒ × Γ∆ϒ ) × (Λ∆ϒ × Iℵ ) × Ω∆ϒ → A is a total injection where, as in [9], Λ∆ϒ is the set of action labels of ϒ and Iℵ is the set of unique identifiers used in the first phase of the translation. We recall that A is the set of action names of FlyFast. The mapping of actions is a bit more delicate because we have to respect FlyFast static constraints and, in particular, we have to avoid multiple probability function definitions for the same action. A first source of potential violations (i.e. multiple syntactical occurrences of the same action) has been removed by action annotation in the first phase of the translation. A second source is the fact that the same action can take place in different contexts (for example with different stores) or leading to different target component states (maybe with different probabilities). To that purpose, we could distinguish different occurrences of the same action in different transitions, each characterised by its source component-state and its target component-state in Ω∆ϒ . In practice, since an action of a component cannot be influenced by the current outbox of the component, it is sufficient to restrict the first component of the domain from Ω∆ϒ to (S∆ϒ × Γ∆ϒ ). • The interpretation functions defined in Figure 3, namely those depending on stores only (and not on occupancy measure vectors); we assume EL [[·]]γ extended to EL [[ f n]]γ for defined function f n, in the standard way. In Figure 3 βϒ denotes the constant to value bindings generated by the const construct in the input model specification ϒ, whereas store update upd is defined as above. • The translation function IP for transition probability expressions p j , defined in Figure 4. Output actions are dealt with in step 1 of the algorithm of Figure 5. Let us consider, for example, (inf, 1)∗ [⊥]hiJump in the definition of state S in Figure 2 (assuming annotations are integer values and the action has been annotated with 1). We know that the possible values for locations are A,B,C,D, so that the set of all stores is {loc} → {A,B,C,D}. The algorithm generates 12 actions8 . Let us focus 8 Diagonal jumps are not contemplated in the model; technically this comes from the actual probability values used in the D. Latella & M. Massink 101 EL [[>]]γ = tt EL [[⊥]]γ = ff EL [[e1 ./ e2 ]]γ = EL [[e1 ]]γ ./ EL [[e2 ]]γ EL [[¬b]]γ = ¬EL [[b]]γ EL [[b1 ∧ b2 ]]γ = EL [[b1 ]]γ ∧ EL [[b2 ]]γ EL [[va ]]γ = va EL [[ca ]]γ = βϒ (ca ) EL [[v p ]]γ = vp EL [[c p ]]γ = βϒ (c p ) EL [[a]]γ = a EL [[my.a]]γ = γ(a) EL [[ f na (e1 , . . . , em )]]γ = EL [[ f na ]]γ (EL [[e1 ]]γ , . . . , EL [[em ]]γ ) EL [[ f n p (e1 , . . . , em )]]γ = EL [[ f n p ]]γ (EL [[e1 ]]γ , . . . , EL [[em ]]γ ) EU [[upd]]γ = λ γ 0 .dom(γ 0 ) 6= {a1 , . . . , ak } → 0; γ 0 (a1 ) = EL [[e11 ]]γ ∧ . . . ∧ γ 0 (ak ) = EL [[ek1 ]]γ → EL [[p1 ]]γ ; .. . ER [[>]]γ ER [[⊥]]γ ER [[e1 ./ e2 ]]γ ER [[¬b]]γ ER [[b1 ∧ b2 ]]γ ER [[va ]]γ ER [[ca ]]γ ER [[a]]γ = = = = = = = = γ 0 (a1 ) = EL [[e1n ]]γ ∧ . . . ∧ γ 0 (ak ) = EL [[ekn ]]γ → EL [[pn ]]γ ; otherwise → 0 tt ff ER [[e1 ]]γ ./ ER [[e2 ]]γ ¬ER [[b]]γ ER [[b1 ]]γ ∧ ER [[b2 ]]γ va βϒ (ca ) γ(a) Figure 3: Interpretation functions relevant for the translation on the action ξ associated to local position A (i.e. γ = [loc 7→ A]) and possible next position B (i.e. γ 0 = [loc 7→ B]); the algorithm will generate the FlyFast probability function definition ξ :: pW(A) ∗ (frc (I1) + . . . + frc (In))9 as well as a transition leading to (a state which is the encoding, via IS , of) the component state with I as (proper) state, store γ 0 , and outbox (γ, ⊥, infhi). Since the action is not depending on the current outbox, in practice a copy of such a transition is generated for each component state sharing the same proper state S and the same store γ. The translation scheme for input actions is defined in case 2 and is similar, except that one has also to consider the sum of the fractions of the possible partners. The translation of the rest case is straightforward. Note that for every ζ :: r ∗ q ∈ Aγ , r is a probability value associated to a store update; since any store update characterizes a probability distribution over stores, assuming the range of such a distribution is {r1 , . . . , rn } if ζi :: ri ∗ q ∈ Aγ , then also ζ j :: r j ∗ q ∈ Aγ for all j = 1, . . . , n, j 6= i with ∑ni=1 r j = 1. Thus the remaining probability is qγ = (1 − SUM{q|ζ :: r ∗ q ∈ Aγ }), where q is either a term IP (p j )γ , with p j occurring in a summand of the state defining equation (see step 1), or a term IP (p j )γ ∗ SUM{frc (IS (Σ))| . . .} (see step 2). It worth definition of Jump. 9 Here we assume that I ({(C, γ, O) ∈ Ω |C = I}) = {I1, . . . , In} ⊂ S . ∆ϒ S Designing Attribute-based FlyFast 102 IP (v p )γ IP (c p )γ IP (frc (C))γ IP (frc (π))γ IP (∏i∈I pi )γ IP (∑i∈I pi )γ = = = = = = vp βϒ (c p ) SUM{frc (IS ((C0 , γ 0 , O0 ))) | (C0 , γ 0 , O0 ) ∈ Ω∆ϒ and C0 = C} SUM{frc (IS ((C0 , γ 0 , O0 ))) | (C0 , γ 0 , O0 ) ∈ Ω∆ϒ and ER [[EL [[π]]γ ]]γ 0 = tt} PROD{IP (pi )γ | i ∈ I} SUM{IP (pi )γ | i ∈ I} Figure 4: Transition probability expressions translation function definition For each state equation C := ∑ j∈J [g j ]p j :: act j .C j in ∆ϒ : 1. For each output action (α, ι)∗ [π]hiσ = actk with k ∈ J and [gk ]pk 6= rest, for each γ ∈ Γ∆ϒ s.t. EL [[gk ]]γ = tt and (C, γ, O) ∈ Ω∆ϒ for some O ∈ O∆ϒ , for each γ 0 ∈ Γ∆ϒ s.t. (Ck , γ 0 , (γ, EL [[π]]γ , αhi)) ∈ Ω∆ϒ and EU [[σ ]]γ (γ 0 ) > 0, let ξ = IA ((C, γ), (αhi, ι), (Ck , γ 0 , (γ, EL [[π]]γ , αhi))) be a fresh new action in the FlyFast model specification I (ℵ(ϒ)) = h∆, A, C0 i(N) and add the following action probability function definition in A: ξ :: EU [[σ ]]γ (γ 0 ) ∗ IP (pk )γ . Moreover, for each outbox O ∈ O∆ϒ s.t. (C, γ, O) ∈ Ω∆ϒ , the following summand is added to the equation in ∆ for state IS ((C, γ, O)): ξ . IS ((Ck , γ 0 , (γ, EL [[π]]γ , αhi))); 2. For each input action (α, ι)∗ [π]()σ = actk , with k ∈ J and [gk ]pk 6= rest, for each γ ∈ Γ∆ϒ s.t. EL [[gk ]]γ = tt and (C, γ, O) ∈ Ω∆ϒ for some O ∈ O∆ϒ , for each γ 0 ∈ Γ∆ϒ s.t. (Ck , γ 0 , hi) ∈ Ω∆ϒ and EU [[σ ]]γ (γ 0 ) > 0, let ξ = IA ((C, γ), (α(), ι), (Ck , γ 0 , hi)), be a fresh new action in the FlyFast model specification I (ℵ(ϒ)) = h∆, A, C0 i(N) and add the following action probability function definition in A: ξ :: EU [[σ ]]γ (γ 0 ) ∗ IP (pk )γ ∗ ∗SUM{frc (IS (Σ))|Σ = (C00 , γ 00 , (γ, π, αhi)) ∈ Ω∆ϒ ∧ ∧ ER [[π]]γ = ER [[EL [[π]]γ ]]γ = tt}. Moreover, for each outbox O ∈ O∆ϒ s.t. (C, γ, O) ∈ Ω∆ϒ , the following summand is added to the equation in ∆ for state IS ((C, γ, O)): ξ . IS ((Ck , γ 0 , hi)); 3. If there exists k ∈ J s.t. [gk ]pk = rest, and actk = (α, ι)∗ [π]hiσ , for each γ ∈ Γ∆ϒ s.t. (C, γ, O) ∈ Ω∆ϒ for some O ∈ O∆ϒ , let Aγ be the set of probability function definitions which has been constructed in steps (1) and (2) above. Let qγ be defined by qγ = (1 − SUM{q|ζ :: r ∗ q ∈ Aγ }). For all γ 0 ∈ Γ∆ϒ s.t. (Ck , γ 0 , (γ, EL [[π]]γ , αhi)) ∈ Ω∆ϒ , let ξ = IA ((C, γ), (α, ι)hi, (Ck , γ 0 , (γ, EL [[π]]γ , αhi))) ∈ Ω∆ϒ , be a fresh new action in the FlyFast model specification I (ℵ(ϒ)) = h∆, A, C0 i(N) and add the following action probability function definition in A: ξ :: EU [[σ ]]γ (γ 0 ) ∗ qγ . Moreover, for each outbox O ∈ O∆ϒ s.t. (C, γ, O) ∈ Ω∆ϒ , the following summand is added to the equation in ∆ for state IS ((C, γ, O)): ξ . IS ((Ck , γ 0 , (γ, EL [[π]]γ , αhi))); 4. No other action probability function definition and transition is included and the initial state C0 of I (ϒ) is defined as C0 = IS (Σ0 ). Figure 5: The translation algorithm pointing out here that the translation of Figure 5 is essentially the same as that presented in [9], when the latter is applied to the sublanguage of PiFF where one requires that each action occurs at most once. The annotations performed in the first phase of the translation ensure that this requirement is fulfilled; as we noted above, these annotations are purely syntactical and are disregarded at the semantics level. We also recall that in probabilistic, pure DTMC process language semantics, actions are in the end dropped and, for each pair of states, the cumulative probability of such actions is assigned to the single transition from one of the states to the other one. Consequently, correctness of the translation, proved in [9], is preserved by the simplified version presented in this paper. We note that in the algorithm sets Ω∆ϒ , Γ∆ϒ and O∆ϒ are used. Of course, an alternative approach could be one which considers only the set Ω∆ϒ of component states which are reachable from a given initial component state and, consequently, the sets Γ∆ϒ and O∆ϒ of used stores and outboxes. In this way, the size of the resulting FlyFast model specification would be smaller (for example in terms of number of D. Latella & M. Massink 103 states). On the other hand, this approach might require recompilation for each model-checking session starting from a different initial component state. 4 A simplified language for Bisimulation-based optimisation In this section we consider a simplified language for transition probability expressions appearing in state defining equations that will allow us to perform bisimulation based optimisation of the result h∆, A, C0 i(N) . The restricted syntax for transition probability expressions p we use in this section is the following: p ::= e p | e p · frc (C) | e p · frc (π) and e p ::= v p | c p where v p and c p and π are defined as in Section 2. By inspection of the FlyFast translation as defined in Section 3, and recalling that the set S∆ of the states of the resulting FlyFast model, ranged over by z, zi , . . ., has cardinality S, it is easy to see that the probability action definition in the result of a translation of a generic output action is either of the form ξ :: k, or it is of the form ξ :: k ∗ SUM{frc (zi )|i ∈ I} where k is a FlyFast constant. Moreover, if p was of the form e p · frc (C), then index set I ⊆ {1, . . . , S} identifies those states in S∆ that represent (via IS ) component states with proper local state C; if instead, p was of the form e p · frc (π), then I ⊆ {1, . . . , S} identifies those states in S∆ that represent (via IS ) component states with a store satisfying π in the relevant store. At the FlyFast semantics level, recalling that frc (zi ) is exactly the i-th component mi of the occupancy measure vector m = (m1 , . . . , mS ) of the model, we can rewrite10 the above as k or k · ∑i∈I mi . Similarly, the probability action definition in the result of a translation of a generic  input action ∗ 0 0 (α, ι) [π ]() (executed in local store γ ) will necessarily be of the form k · ∑ j∈I 0 m j or of the form k · ∑ j∈I m j · ∑ j∈I 0 m j , for index sets I as above and I 0 as follows: I 0 = {i ∈ {1, . . . , S}|∃C, γ, γ, π, s.t. zi = IS ((C, γ, (γ, π, αhi))) ∧ ER [[π]]γ 0 = ER [[EL [[π 0 ]]γ 0 ]]γ = tt} An immediate consequence of using the above mentioned restricted syntax for the probability function definitions is that, letting K : U S ×S ×S → [0, 1] be the transition probability matrix for the FlyFast translation of a model specification, we have that K(m1 , . . . , mS )z,z0 is a polynomial function of degree at most 2 in variables m1 , . . . , mS . 5 Bisimilarity and State-space Reduction The following definition generalises standard probabilistic bisimilarity for state labelled DTMCs to the case in which transition probabilities are functions instead of constant values. Definition 1 For finite set of states S, with |S| = S, let K : U S × S × S → [0, 1] and, for z ∈ S and Q ⊆ S, write K(m)z,Q for ∑z0 ∈Q K(m)z,z0 . Let furthermore L : S → 2AP be a state-labelling function, for a given set AP of atomic propositions. An equivalence relation R ⊆ S × S is called a bisimulation relation if and only if z1 R z2 implies: (i) L (z1 ) = L (z2 ) and (ii) K(m)z1 ,Q = K(m)z2 ,Q , for all m ∈ U S and Q ∈ S/R. The bisimulation equivalence on S is the largest bisimulation relation R ⊆ S × S. We point out that the notion of bisimilarity does not introduce any approximation, and consequently error, in a model and related analyses. Bisimilarity is only a way for abstracting from details that are irrelevant 10 With a little notational abuse using k also as the actual value in [0, 1] of the FlyFast constant k. Designing Attribute-based FlyFast 104 l h H L H L Figure 6: SI in two quadrants for the specific analyses of interest. In particular, it is useful to remark that bisimilarity preserves also state labels, which are directly related to the atomic propositions of logic formulas for which modelchecking is performed. Actually, it is well known that probabilistic bisimilarity coincides with PCTL equivalence, i.e. the equivalence induced on system states by their satisfaction of PCTL formulas, for finitely branching systems [3]. Note that K(m1 , . . . , mS )z1 ,Q = K(m1 , . . . , mS )z2 ,Q for all (m1 , . . . , mS ) ∈ U S is in general not decidable. If instead we consider only transition probability matrices as in Section 4, we see that each side of the above equality is a polynomial function of degree at most 2 in variables m1 , . . . , mS and one can define a normal form for the polynomial expressions in m1 , . . . , mS supported by an ordering relationon the variable names (e.g. m1 ≺ . . . ≺ mS ) and get expressions of the general form ∑Si=1 ∑Sj≥i hi j · mi · m j +  hi j , hi , h. Actually, such expressions can always be rewritten in the form ∑Si=1 hi · mi + h for suitable  ui j · mi · m j + u for suitable ui j , u since, recalling that ∑Si=1 mi = 1, we get ∑Si=1 hi · mi = ∑Si=1 ∑Sj≥i   S an expression of the following ∑Si=1 m i · ∑i=1 hi · mi which,  by simple algebraic manipulation, yields  S S S S 0 form: ∑i=1 ∑ j≥i ui j · mi · m j ; finally, we get ∑i=1 ∑ j≥i ui j · mi · m j + u by letting ui j = hi j + u0i j and u = h. The following proposition thus establishes decidability of K(m1 , . . . , mS )z1 ,Q = K(m1 , . . . , mS )z2 ,Q for all (m1 , . . . , mS ) ∈ U S for transition probability matrices as in Section 4: Proposition 1   Let A(m1 , . . . , mS ) = ∑Si=1 ∑Sj≥i ai j · mi · m j + a and B(m1 , . . . , mS ) = ∑Si=1 ∑Sj≥i bi j · mi · m j + b with ai j , bi j , a, b ∈ R, where m1 , . . . , mS are variables taking values over R≥0 with ∑Si=1 mi = 1. The following holds: (∀m1 , . . . , mS .A(m1 , . . . , mS ) = B(m1 , . . . , mS )) ⇔ ((∀i, j = 1, . . . , S with i ≤ j.ai j = bi j ) ∧ a = b). The above results can be used for reduction of the state-space of the individual agent, i.e. the resulting FlyFast model specification, after the application of the translation described in Section 3, by using for instance the standard probabilistic relational coarsest set partition problem algorithm (see e.g. [22], page 227) with slight obvious modifications due to the presence of state-labels and the need of symbolic computation capabilities required for checking (degree 2) polynomial expressions equality.11 It is worth mentioning that state aggregation via bisimilarity is effective only if there is some sort of compatibility between (i) state labelling—and, consequently, the specific PCTL atomic propositions one uses—and (ii) the way probabilities are assigned to transitions—and, consequently, the cumulative probabilities to equivalence classes. We will come back on this issue in the following section. D. Latella & M. Massink SA SB SC SD IA IB IC ID SA HφS (m) H 2 φS (m) 0 H 2 φS (m) Hir H 2 ir 0 H 2 ir 105 SB L 2 φS (m) LφS (m) L 2 φS (m) 0 L 2 ir Lir L 2 ir 0 SC 0 H 2 φS (m) HφS (m) H 2 φS (m) 0 H 2 ir Hir H 2 ir SD L 2 φS (m) 0 L 2 φS (m) LφS (m) L 2 ir 0 L 2 ir Lir IA HφI (m) H 2 φI (m) 0 H 2 φI (m) Hii H 2 ii 0 H 2 ii IB L 2 φI (m) LφI (m) L 2 φI (m) 0 L 2 ii Lii L 2 ii 0 IC 0 H 2 φI (m) HφI (m) H 2 φI (m) 0 H 2 ii Hii H 2 ii ID L 2 φI (m) 0 L 2 φI (m) LφI (m) L 2 ii 0 L 2 ii Lii Figure 7: IDTMC transition probability matrix K(m), for m in U 8 . 6 Example The application of the translation to the specification of Example 1 generates an agent model with 8 states, say S∆ = {SA, SB, SC, SD, IA, IB, IC, ID}12 with associated IDTMC probability transition matrix as shown in Figure 7 where mxy represents the fraction of objects currently in state xy for x ∈ {S, I} and y ∈ {A, B,C, D}—i.e. the components in state x and with loc = y in the original specification of Fig 2—so that m = (mSA , mSB , mSC , mSD , mIA , mIB , mIC , mID ) is the occupancy measure vector. In Figure 7, functions φS and φI are used as abbreviations in the obvious way: φS (m) = mSA + mSB + mSC + mSD and φI (m) = mIA + mIB + mIC + mID . Let us assume now that we are interested in checking PCTL formulas on the model of Fig 2 which distinguish components located in A or C from those located in B or D, and those in state S from those in state I, that is we consider atomic propositions Sh, Ih, Sl and Il and a labelling L such that L (SA) = L (SC) = {Sh}, L (IA) = L (IC) = {Ih}, L (SB) = L (SD) = {Sl}, and L (IB) = L (ID) = {Il}. Consider relation R on S∆ defined as R = IS∆ ∪ {(SA, SC), (SB, SD), (IA, IC), (IB, ID)} ∪ {(SC, SA), (SD, SB), (IC, IA), (ID, IB)} where IS∆ is the identity relation on S∆ . It is very easy to show that R is a bisimulation according to Definition 1. Clearly R is an equivalence relation and its quotient S∆ /R is the set {QSh , QSl , QIh , QIl } with QSh = {SA, SC}, QSl = {SB, SD}, QIh = {IA, IC}, QIl = {IB, ID}. In addition, for all z1 , z2 ∈ S∆ , whenever z1 R z2 , we have L (z1 ) = L (z2 ) and K(m)z1 ,Q = K(m)z2 ,Q for all Q ∈ S∆ /R and for all m, as one can easily check; clearly, R is also the largest bisimulation relation on S∆ . The relationship between the two occupancy measure vectors is: mQSh = mSA + mSC , mQSl = mSB + mSD , mQIh = mIA + mIC , and mQIl = mIB + mID . We can thus use the reduced IDTMC defined by matrix b given b Q , mQ , mQ , mQ ) shown in Figure 9. It corresponds to the FlyFast agent specification ∆ K(m Sh Sl Ih Il in Figure 8. In a sense, the high probability locations A and C, in the new model, have collapsed into a single one, namely h and the low probability ones (B and D) have collapsed into l, as shown in Figure 6. We point out again the correspondence between the symmetry in the space jump probability on one side and the definition of the state labelling function on the other side. Finally, note that a coarser labelling like, e.g. L 0 (SA) = L 0 (SC) = L 0 (IA) = L 0 (IC) = {h}, L 0 (SB) = L 0 (SD) = L 0 (IB) = L 0 (ID) = {l} would make the model collapse into one with only two states, Qh and Ql , with probabilities H : Qh → Qh , H : Ql → Qh , L : Qh → Ql and L : Qh → Ql where only the location would be modelled whereas 11 For instance, on page 227 of [22], line 12, v(x, S) = v(y, S) should be replaced with L(x) = L(y) ∧ v(x, S) = v(y, S) and in line 13, v(x, S) 6= v(y, S) should be replaced with L(x) 6= L(y) ∨ v(x, S) 6= v(y, S), in order to take state labels into consideration as well. Of course v(x, S) (L, respectively)is to be intended as K(m)z,Q (L , respectively), using the notation we introduced above for Bisimilarity. 12 Actually the agent resulting from the translation of Figure 5 has a higher number of states due to the different possibilities for outbox values. Many of these states are unreachable from the initial state since the agent has no input action and we assume an initial unreachable state pruning has been performed. Designing Attribute-based FlyFast 106 action action action action QSh_inf_QIh: QSh_inf_QIl: QSl_inf_QIh: QSl_inf_QIl: H*(frc(QIh)+frc(QIl)); L*(frc(QIh)+frc(QIl)); H*(frc(QIh)+frc(QIl)); L*(frc(QIh)+frc(QIl)); action action action action QSh_nsc_QSh: QSh_nsc_QSl: QSl_nsc_QSh: QSl_nsc_QSl: H*(frc(QSh)+frc(QSl)); L*(frc(QSh)+frc(QSl)); H*(frc(QSh)+frc(QSl)); L*(frc(QSh)+frc(QSl)); action action action action QIh_inf_QIh: QIh_inf_QIl: QIl_inf_QIh: QIl_inf_QIl: H*ii; L*ii; H*ii; L*ii; action action action action QIh_rec_QSh: QIh_rec_QSl: QIl_rec_QSh: QIl_rec_QSl: H*ir; L*ir; H*ir; L*ir; state state state state QSh{QSh_inf_QIh.QIh QSl{QSl_inf_QIh.QIh QIh{QIh_inf_QIh.QIh QIl{QIl_inf_QIh.QIh + + + + QSh_inf_QIl.QIl QSl_inf_QIl.QIl QIh_inf_QIl.QIl QIl_inf_QIl.QIl + + + + QSh_nsc_QSh.QSh QSl_nsc_QSh.QSh QIh_rec_QSh.QSh QIl_rec_QSh.QSh + QSh_nsc_QSl.QSl} + QSl_nsc_QSl.QSl} + QIh_rec_QSl.QSl} +QIl_rec_QSl.QSl} b Figure 8: Reduced agent specification ∆ QSh QSl QIh QIl QSh H · (mQSh + mQSl ) H · (mQSh + mQSl ) H · ir H · ir QSl L · (mQSh + mQSl ) L · (mQSh + mQSl ) L · ir L · ir QIh H · (mQIh + mQIl ) H · (mQIh + mQIl ) H · ii H · ii QIl L · (mQIh + mQIl ) L · (mQIh + mQIl ) L · ii L · ii b Figure 9: IDTMC transition probability matrix function K(m), for m in U 4 . information on the infection status would be lost. 7 Conclusions PiFF [9] is a language for a predicate-based front-end of FlyFast, an on-the-fly mean-field modelchecking tool. In this paper we presented a simplified version of the translation proposed in [9] together with an approach for model reduction that can be applied to the result of the translation. The approach is based on probabilistic bisimilarity for inhomogeneous DTMCs. An example of application of the procedure has been shown. The implementation of a compiler for PiFF mapping the language to FlyFast is under development as an add-on of FlyFast. We plan to apply the resulting extended tool to more as well as more complex models, in order to get concrete insights on the practical applicability of the framework and on the actual limitations imposed by the restrictions necessary for exploiting bisimilarity-based state-space reduction. Investigating possible ways of relaxing some of such restrictions will also be an interesting line of research. Acknowledgments Research partially funded by EU Project n. 600708 A Quantitative Approach to Management and Design of Collective and Adaptive Behaviours (QUANTICOL). References [1] Adnan Aziz, Kumud Sanwal, Vigyan Singhal & Robert K. Brayton (2000): Model-checking continous-time Markov chains. ACM Trans. Comput. Log. 1(1), pp. 162–170, doi:10.1145/343369.343402. [2] Christel Baier, Boudewijn R. Haverkort, Holger Hermanns & Joost-Pieter Katoen (2003): Model-Checking Algorithms for Continuous-Time Markov Chains. IEEE Trans. Software Eng. 29(6), pp. 524–541, doi:10.1109/TSE.2003.1205180. D. Latella & M. Massink 107 [3] Christel Baier & Joost-Pieter Katoen (2008): Principles of model checking. MIT Press. [4] Girish Bhat, Rance Cleaveland & Orna Grumberg (1995): Efficient On-the-Fly Model Checking for CTL*. In: Proceedings, 10th Annual IEEE Symposium on Logic in Computer Science, San Diego, California, USA, June 26-29, 1995, IEEE Computer Society, pp. 388–397, doi:10.1109/LICS.1995.523273. [5] L. Bortolussi, G. Cabri, G. Di Marzo Serugendo, V. Galpin, J. Hillston, R. Lanciani, M. Massink & D. Tribastone, M. Weyns (2015): Verification of CAS. In J. Hillston, J. Pitt, M. Wirsing & F. Zambonelli, editors: Collective Adaptive Systems: Qualitative and Quantitative Modelling and Analysis, Schloss Dagstuhl Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany, pp. 91–102. Dagstuhl Reports. Vol. 4, Issue 12. Report from Dagstuhl Seminar 14512. ISSN 2192-5283. [6] Luca Bortolussi & Jane Hillston (2012): Fluid Model Checking. In Maciej Koutny & Irek Ulidowski, editors: CONCUR 2012 - Concurrency Theory - 23rd International Conference, CONCUR 2012, Newcastle upon Tyne, UK, September 4-7, 2012. Proceedings, Lecture Notes in Computer Science 7454, Springer, pp. 333– 347, doi:10.1007/978-3-642-32940-1 24. [7] Luca Bortolussi & Jane Hillston (2015): Model checking single agent behaviours by fluid approximation. Inf. Comput. 242, pp. 183–226, doi:10.1016/j.ic.2015.03.002. [8] Jean-Yves Le Boudec, David D. McDonald & Jochen Mundinger (2007): A Generic Mean Field Convergence Result for Systems of Interacting Objects. In: Fourth International Conference on the Quantitative Evaluaiton of Systems (QEST 2007), 17-19 September 2007, Edinburgh, Scotland, UK, IEEE Computer Society, pp. 3–18, doi:10.1109/QEST.2007.8. [9] Vincenzo Ciancia, Diego Latella & Mieke Massink (2016): On-the-Fly Mean-Field Model-Checking for Attribute-Based Coordination. In Alberto Lluch-Lafuente & José Proença, editors: Coordination Models and Languages - 18th IFIP WG 6.1 International Conference, COORDINATION 2016, Held as Part of the 11th International Federated Conference on Distributed Computing Techniques, DisCoTec 2016, Heraklion, Crete, Greece, June 6-9, 2016, Proceedings, Lecture Notes in Computer Science 9686, Springer, pp. 67–83, doi:10.1007/978-3-319-39519-7 5. [10] Costas Courcoubetis, Moshe Y. Vardi, Pierre Wolper & Mihalis Yannakakis (1992): Memory-Efficient Algorithms for the Verification of Temporal Properties. Formal Methods in System Design 1(2/3), pp. 275–288, doi:10.1007/BF00121128. [11] R.W.R. Darling & J.R. Norris (2008): Differential equation approximations for Markov chains. Probability Surveys 5, pp. 37–79, doi:10.1214/07-PS121. [12] Rocco De Nicola, Diego Latella, Alberto Lluch-Lafuente, Michele Loreti, Andrea Margheri, Mieke Massink, Andrea Morichetta, Rosario Pugliese, Francesco Tiezzi & Andrea Vandin (2015): The SCEL Language: Design, Implementation, Verification. In Martin Wirsing, Matthias M. Hölzl, Nora Koch & Philip Mayer, editors: Software Engineering for Collective Autonomic Systems - The ASCENS Approach, Lecture Notes in Computer Science 8998, Springer, pp. 3–71, doi:10.1007/978-3-319-16310-9 1. [13] Giuseppe Della Penna, Benedetto Intrigila, Igor Melatti, Enrico Tronci & Marisa Venturini Zilli (2004): Bounded Probabilistic Model Checking with the Muralpha Verifier. In Alan J. Hu & Andrew K. Martin, editors: Formal Methods in Computer-Aided Design, 5th International Conference, FMCAD 2004, Austin, Texas, USA, November 15-17, 2004, Proceedings, Lecture Notes in Computer Science 3312, Springer, pp. 214–229, doi:10.1007/978-3-540-30494-4 16. [14] Cheng Feng & Jane Hillston (2014): PALOMA: A Process Algebra for Located Markovian Agents. In Gethin Norman & William H. Sanders, editors: Quantitative Evaluation of Systems - 11th International Conference, QEST 2014, Florence, Italy, September 8-10, 2014. Proceedings, Lecture Notes in Computer Science 8657, Springer, pp. 265–280, doi:10.1007/978-3-319-10696-0 22. [15] Nicolas Gast & Bruno Gaujal (2010): A mean field model of work stealing in large-scale systems. In Vishal Misra, Paul Barford & Mark S. Squillante, editors: SIGMETRICS 2010, Proceedings of the 2010 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems, New York, New York, USA, 14-18 June 2010, ACM, pp. 13–24, doi:10.1145/1811039.1811042. 108 Designing Attribute-based FlyFast [16] Stefania Gnesi & Franco Mazzanti (2011): An Abstract, on the Fly Framework for the Verification of ServiceOriented Systems. In Martin Wirsing & Matthias M. Hölzl, editors: Rigorous Software Engineering for Service-Oriented Systems - Results of the SENSORIA Project on Software Engineering for Service-Oriented Computing, Lecture Notes in Computer Science 6582, Springer, pp. 390–407, doi:10.1007/978-3-642-204012 18. [17] Guillaume Guirado, Thomas Hérault, Richard Lassaigne & Sylvain Peyronnet (2006): Distribution, Approximation and Probabilistic Model Checking. Electr. Notes Theor. Comput. Sci. 135(2), pp. 19–30, doi:10.1016/j.entcs.2005.10.016. [18] Ernst Moritz Hahn, Holger Hermanns, Björn Wachter & Lijun Zhang (2009): INFAMY: An Infinite-State Markov Model Checker. In Ahmed Bouajjani & Oded Maler, editors: Computer Aided Verification, 21st International Conference, CAV 2009, Grenoble, France, June 26 - July 2, 2009. Proceedings, Lecture Notes in Computer Science 5643, Springer, pp. 641–647, doi:10.1007/978-3-642-02658-4 49. [19] Hans Hansson & Bengt Jonsson (1994): A Logic for Reasoning about Time and Reliability. Formal Asp. Comput. 6(5), pp. 512–535, doi:10.1007/BF01211866. [20] Thomas Hérault, Richard Lassaigne, Frédéric Magniette & Sylvain Peyronnet (2004): Approximate Probabilistic Model Checking. In Bernhard Steffen & Giorgio Levi, editors: Verification, Model Checking, and Abstract Interpretation, 5th International Conference, VMCAI 2004, Venice, January 11-13, 2004, Proceedings, Lecture Notes in Computer Science 2937, Springer, pp. 73–84, doi:10.1007/978-3-540-24622-0 8. [21] Gerard J. Holzmann (2004): The SPIN Model Checker - primer and reference manual. Addison-Wesley. [22] D. Huynh & L. Tian (1992): On some equivalence relations for probabilistic processes. Fundamenta Informaticae 17, pp. 211–234. [23] A. Kolesnichenko, A. Remke & P.-T. de Boer (2012): A logic for model-checking of mean-field models. Technical Report TR-CTIT-12-11, http://doc.utwente.nl/80267/. [24] Anna Kolesnichenko, Pieter-Tjerk de Boer, Anne Remke & Boudewijn R. Haverkort (2013): A logic for model-checking mean-field models. In: 2013 43rd Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), Budapest, Hungary, June 24-27, 2013, IEEE Computer Society, pp. 1–12, doi:10.1109/DSN.2013.6575345. [25] Kim G. Larsen & Axel Legay (2016): Statistical Model Checking: Past, Present, and Future. In Tiziana Margaria & Bernhard Steffen, editors: Leveraging Applications of Formal Methods, Verification and Validation: Foundational Techniques - 7th International Symposium, ISoLA 2016, Imperial, Corfu, Greece, October 10-14, 2016, Proceedings, Part I, Lecture Notes in Computer Science 9952, pp. 3–15, doi:10.1007/978-3319-47166-2 1. [26] D. Latella (1983): Comunicazione basata su proprietà nei sistemi decentralizzati. [Property-based interprocess communication in decentralized systems] Graduation Thesis. Istituto di Scienze dell’Informazione. Univ. of Pisa, Italy (in italian). [27] Diego Latella, Michele Loreti & Mieke Massink (2013): On-the-fly Fast Mean-Field Model-Checking. In Martı́n Abadi & Alberto Lluch-Lafuente, editors: Trustworthy Global Computing - 8th International Symposium, TGC 2013, Buenos Aires, Argentina, August 30-31, 2013, Revised Selected Papers, Lecture Notes in Computer Science 8358, Springer, pp. 297–314, doi:10.1007/978-3-319-05119-2 17. [28] Diego Latella, Michele Loreti & Mieke Massink (2014): On-the-fly Probabilistic Model Checking. In Ivan Lanese, Alberto Lluch-Lafuente, Ana Sokolova & Hugo Torres Vieira, editors: Proceedings 7th Interaction and Concurrency Experience, ICE 2014, Berlin, Germany, 6th June 2014., EPTCS 166, pp. 45–59, doi:10.4204/EPTCS.166.6. [29] Diego Latella, Michele Loreti & Mieke Massink (2015): On-the-fly PCTL fast mean-field approximated model-checking for self-organising coordination. Sci. Comput. Program. 110, pp. 23–50, doi:10.1016/j.scico.2015.06.009. [30] Michele Loreti & Jane Hillston (2016): Modelling and Analysis of Collective Adaptive Systems with CARMA and its Tools. In Marco Bernardo, Rocco De Nicola & Jane Hillston, editors: Formal Methods for the D. Latella & M. Massink 109 Quantitative Evaluation of Collective Adaptive Systems - 16th International School on Formal Methods for the Design of Computer, Communication, and Software Systems, SFM 2016, Bertinoro, Italy, June 20-24, 2016, Advanced Lectures, Lecture Notes in Computer Science 9700, Springer, pp. 83–119, doi:10.1007/9783-319-34096-8 4. Designing Attribute-based FlyFast 110 A Appendix Proof of Proposition 1 ⇐: Trivial. ⇒: We first prove that a = b: ∀m1 , . . . , mS .A(m1 , . . . , mS ) = B(m1 , . . . , mS ) ⇒ {Logic} A(0, . . . , 0) = B(0, . . . , 0) ⇒ {Def. of A(m1 , . . . , mS ) and B(m1 , . . . , mS )} a=b Now we prove that aii = bii for i = 1, . . . , S: ∀m1 , . . . , mS .A(m1 , . . . , mS ) = B(m1 , . . . , mS ) ⇒ {Take the S − tuple (m̄1 , . . . , m̄S ) where m̄k = 1 if k = i and 0 otherwise} A(m̄1 , . . . , m̄S ) = B(m̄1 , . . . , m̄S ) ⇒ {Def. of A(m1 , . . . , mS ) and B(m1 , . . . , mS )} aii + a = bii + b ⇒ {a = b (see above)} aii = bii Finally we prove that ai j = bi j , for i, j = 1, . . . , S, j > i: ∀m1 , . . . , mS .A(m1 , . . . , mS ) = B(m1 , . . . , mS ) ⇒ {(m̃1 , . . . , m̃S ) where m̃k = 0.5 if k ∈ {i, j} and 0 otherwise} A(m̃1 , . . . , m̃S ) = B(m̃1 , . . . , m̃S ) ⇒ {Def. of A(m1 , . . . , mS ) and B(m1 , . . . , mS )} 0.25aii + 0.25ai j + 0.25a j j + a = 0.25bii + 0.25bi j + 0.25b j j + b ⇒ {a = b (see above)} 0.25aii + 0.25ai j + 0.25a j j = 0.25bii + 0.25bi j + 0.25b j j ⇒ {Algebra} aii + ai j + a j j = bii + bi j + b j j ⇒ {aii = bii and a j j = b j j (see above)} ai j = bi j •
6cs.PL
Multivariable Adaptive Harmonic Steady-State Control for Rejection of Sinusoidal Disturbances Acting on an Unknown System Mohammadreza Kamaldar and Jesse B. Hoagg arXiv:1608.02508v2 [cs.SY] 11 May 2017 Department of Mechanical Engineering, University of Kentucky, Lexington, KY, 40506-0503 Abstract— This paper presents an adaptive harmonic steadystate (AHSS) controller, which addresses the problem of rejecting sinusoids with known frequencies that act on a completely unknown multi-input multi-output linear time-invariant system. We analyze the stability and closed-loop performance of AHSS for single-input single-output systems. In this case, we show that AHSS asymptotically rejects disturbances. 1 I. I NTRODUCTION The rejection of sinusoidal disturbances is a fundamental control objective in many active noise and vibration control applications such as noise cancellation [1], helicopter vibration reduction [2], and active rotor balancing [3]. For an accurately modeled linear time-invariant (LTI) system, the internal-model principle can be used to design a feedback controller capable of rejecting sinusoidal disturbances of known frequencies [4]–[6]. In this case, disturbance rejection is accomplished by incorporating copies of the disturbance dynamics in the feedback loop. If, on the other hand, an accurate model of the system is not available, but the open-loop dynamics are asymptotically stable, then adaptive feedforward cancellation can be used to accomplish disturbance rejection [7], [8]. One approach for sinusoidal disturbance rejection is harmonic steady-state (HSS) control [9], which has been used for helicopter vibration reduction [2] and active rotor balancing [3]. To discuss HSS control, let Gyu denote the control-toperformance transfer function, and assume that there is a single known disturbance frequency ω. Then, HSS control requires an estimate of Gyu (ω). In the SISO case, the estimate of Gyu (ω), which is a single complex number, must have an angle within 90◦ of ∠Gyu (ω) to ensure closedloop stability. In the MIMO case, closed-loop stability is ensured provided that the estimate of Gyu (ω) is sufficiently accurate. If there are multiple disturbance frequencies, then estimates are required at each frequency. For certain applications Gyu (ω) can be difficult to estimate or subject to change. To address this uncertainty, online estimation methods have been combined with HSS control [10]–[12]. For example, a recursive-least-squares identifier is used in [10], [11] to estimate Gyu (ω) in real time; however, an external excitation signal, which degrades performance, is required to ensure stability. 1 This paper is the preprint version of the following paper: Kamaldar M, Hoagg JB, “Multivariable adaptive harmonic steady-state control for rejection of sinusoidal disturbances acting on an unknown system,” American Control Conference (ACC), 2016. IEEE (pp. 1631-1636), which has been published by IEEE at DOI: 10.1109/ACC.2016.7525150, and is subject to IEEE copyright ploicy. In this paper, we present a new adaptive harmonic steadystate (AHSS) controller, which is effective for rejecting sinusoids with known frequencies that act on a completely unknown MIMO LTI system. We analyze the stability and closed-loop performance for SISO systems. We show that AHSS asymptotically rejects disturbances. The new AHSS algorithm in this paper is a frequencydomain method, and all computations are with discrete Fourier transform (DFT) data. The AHSS algorithm including DFT is demonstrated on a simulation of an acoustic duct. II. N OTATION Let F be either R or C. Let x(i) denote the ith element of x ∈ Fn , and let A(i,j) denote the element in row i and column j of A ∈ Fm×n . Let k · k be the 2-norm on Fn . Next, let A∗ denote the complex √conjugate transpose of A ∈ Fm×n , and define kAkF , tr A∗ A, which is the Frobenius norm of A ∈ Fm×n . Let spec(A) , {λ ∈ C : det(λI − A) = 0} denote the spectrum of A ∈ Fn×n , and let λmax (A) denote the maximum eigenvalue of A ∈ Fn×n , which is Hermitian positive semidefinite. Let ∠λ denote the argument of λ ∈ C defined on the interval (−π, π] rad. Let OLHP, ORHP, and CUD denote the open-left-half plane, open-right-half plane, and closed unit disk in C, respectively. Define N , {0, 1, 2, · · · } and Z+ , N\{0}. III. P ROBLEM F ORMULATION Consider the system ẋ(t) = Ax(t) + Bu(t) + D1 d(t), (1) y(t) = Cx(t) + Du(t) + D2 d(t), (2) where t ≥ 0, x(t) ∈ Rn is the state, x(0) = x0 ∈ Rn is the initial condition, u(t) ∈ Rm is the control, y(t) ∈ R` is the measured performance, d(t) ∈ Rp is the unmeasured disturbance, and A ∈ Rn×n is asymptotically stable. Define the transfer functions Gyu (s) , C(sI − A)−1 B + D, and Gyd (s) , C(sI − A)−1 D1 + D2 . Let ω1 , ω2 ,P · · · , ωq > 0, and consider the q tonal disturbance d(t) = i=1 dc,i cos ωi t + ds,i sin ωi t, where dc,1 , · · · , dc,q , ds,1 , · · · , ds,q ∈ Rp . Our objective is to design a control u that reduces or even eliminates the effect of the disturbance d on the performance y. We seek to design a control that relies on no model information of (1) and (2), and requires knowledge of only the disturbance frequencies ω1 , · · · , ωq . For simplicity, we focus on the case where d is the singletone disturbance d(t) = dc cos ωt + ds sin ωt. However, the adaptive controller presented in this paper generalizes to the case where d consists of multiple tones. We address multiple tones in Example 3. For the moment, assume that Gyu , Gyd , dc , and ds are known, and consider the harmonic control u(t) = uc cos ωt + us sin ωt, where uc , us ∈ Rm . Define û , uc − us , which is the value at frequency ω of the DFT obtained from a sampling of u. The HSS performance of (1) and (2) withcontrol û is   yhss (t, û) , Re M∗ û + dˆ cos ωt − Im M∗ û + dˆ sin ωt, (3) ˆ where M∗ , Gyu (ω) ∈ C and d , Gyd (ω)(dc − ds ) ∈ C` . The HSS performance yhss is the steady-state response of y, that is, limt→∞ [yhss (t, û) − y(t)] = 0 [13, Chap. 12.12]. Consider the cost function Zt 1 T yhss (τ, û)yhss (τ, û) dτ, (4) J(û) , lim t→∞ t `×m 0 which is the average power of yhss . Define ˆ ŷhss (û) , M∗ û + d, (5) which is the value at frequency ω of the DFT obtained from a sampling of yhss . It follows from (3)–(5) that ∗ (û)ŷhss (û). The following result provides an J(û) = 12 ŷhss expression for an open-loop control û = u∗ that minimizes J. The proof is omitted due to space limitations. Theorem 1. Consider the cost function (4), and assume rank M∗ = min{`, m}. Then, the following statements hold: −1 ˆ i) Assume ` > m, and define u∗ , − (M∗∗ M∗ ) M∗∗ d. −1 ∗ ˆ ∗ Then, ŷhss (u∗ ) = I` − M∗ (M∗M∗ ) M∗ d, ˆ and for all J(u∗ ) = 12 dˆ∗ I` − M∗ (M∗∗ M∗ )−1 M∗∗ d, m û ∈ C \{u∗ }, J(u∗ ) < J(û). ˆ Then, ii) Assume ` = m, and define u∗ , −M∗−1 d. m ŷhss (u∗ ) = 0, J(u∗ ) = 0, and for all û ∈ C \{u∗ }, J(u∗ ) < J(û). iii) Assume ` < m, and let u∗ ∈ {−M∗∗ (M∗ M∗∗ )−1 dˆ + (Im − M∗∗ (M∗ M∗∗ )−1 M∗ )v : v ∈ Cm }. Then, ŷhss (u∗ ) = 0 and J(u∗ ) = 0. Theorem 1 provides an expression for a control u∗ that ˆ minimizes J, but u∗ requires knowledge of M∗ and d. In this paper, we consider a sinusoidal control with frequency ω but where the amplitude and phase are updated at discrete times. Let Ts > 0 be the update period, and for each k ∈ Z+ , let uk ∈ Cm be determined from an adaptive law presented later. Then, for each k ∈ N and for all t ∈ [kTs , (k + 1)Ts ), consider the control u(t) = (Re uk ) cos ωt − (Im uk ) sin ωt. (6) Let yk ∈ C` denote the value at frequency ω of the DFT of the sequence obtained by sampling y on the interval [(k− 1)Ts , kTs ). If Ts is sufficiently large relative to the settling time of Gyu , then yk+1 ≈ ŷhss (uk ). For the remainder of this paper, we assume yk+1 = ŷhss (uk ), and it follows from (5) that ˆ yk+1 = M∗ uk + d. (7) In addition, we assume rank M∗ = min{`, m}. IV. H ARMONIC S TEADY-S TATE C ONTROL In this section, we review HSS control, which relies on knowledge of an estimate Me ∈ C`×m of M∗ . Let ρ > 0, and for all k ∈ N, consider the control uk+1 = uk − ρMe∗ yk+1 , (8) m where u0 ∈ C is the initial condition. It follows from (7) that yk+1 = M∗ uk + dˆ = M∗ uk + yk − M∗ uk−1 , and substituting (8) yields the closed-loop dynamics yk+1 = yk − ρM∗ Me∗ yk , (9) + ˆ where k ∈ Z and y1 = M∗ u0 + d. Define Λ , spec(Me∗ M∗ )∩spec(M∗ Me∗ ). The following result presents the stability properties of the closed-loop system (9). The proof is omitted due to space limitations. Theorem 2. Consider the closed-loop system (9), which consists of (7) and (8). Assume that Λ ⊂ ORHP, and assume that ρ satisfies 2Re λ . (10) 0 < ρ < min λ∈Λ |λ|2 Then, for all u0 ∈ Cm , u∞ , limk→∞ uk exists and y∞ , limk→∞ yk exists. Furthermore, for all u0 ∈ Cm , the following statements hold: −1 i) If ` > m, then u∞ = − (Me∗ M∗ ) Me∗ dˆ and y∞ = −1 ∗ ˆ ∗ [I` − M∗ (Me M∗ ) Me ]d. ii) If ` = m, then u∞ = −M∗−1 dˆ and y∞ = 0. iii) If ` < m, then u∞ = u0 − Me∗ (M∗ Me∗ )−1 (M∗ u0 + d) and y∞ = 0. Theorem 2 relies on the condition that Λ ⊂ ORHP. This condition depends on the estimate Me of M∗ . In the SISO case, Λ ⊂ ORHP if and only if Me is within 90◦ of M∗ , that is, |∠(Me /M∗ )| < π2 . In this case, (10) is satisfied by a sufficiently small ρ > 0. If Me = M∗ , then Λ ⊂ ORHP. In this case, (10) is satisfied if ρ < 2/λmax (M∗∗ M∗ ). If Λ∩OLHP is not empty, then for all ρ > 0, I` −ρM∗ Me∗ has at least one eigenvalue outside the CUD. In this case, (9) implies that yk diverges. V. A DAPTIVE H ARMONIC S TEADY-S TATE C ONTROL In this section, we present AHSS control, which does not require any information regarding M∗ . Let µ ∈ (0, 1], ν1 > 0, and u0 ∈ Cm , and for all k ∈ N, consider the control µ M ∗ yk+1 , (11) uk+1 = uk − ν1 + kMk k2F k where Mk ∈ C`×m is an estimate of M∗ obtained from the adaptive law presented below. Note that (11) is reminiscent of the HSS control (8) except the fixed estimate Me is replaced by the adaptive estimate Mk , and the fixed gain  ρ is replaced by the Mk -dependent gain µ/ ν1 + kMk k2F . To determine the adaptive law for Mk , consider the cost function J : R`×m × R`×m → [0, ∞) defined by 1 2 J(Mr , Mi ) , k(Mr + Mi )(uk − uk−1 ) − (yk+1 − yk )k . 2 Note that J(Re M∗ , Im M∗ ) = 0, that is, M∗ minimizes J. Define the complex gradient ∂J(Mr , Mi ) ∂J(Mr , Mi ) ∇J(Mr , Mi ) , + ∂Mr ∂Mi = [(Mr + Mi )(uk − uk−1 ) − (yk+1 − yk )] × (uk − uk−1 )∗ , (12) which is the direction of the maximum rate of change of J with respect to Mr + Mi [14]. Let M0 ∈ C`×m \{0}, γ ∈ (0, 1], and ν2 > 0, and for all k ∈ Z+ , consider the adaptive law Mk , Mk−1 − ηk ∇J(Re Mk−1 , Im Mk−1 ), (13) where γ(ν1 + kMk−1 k2F )2 (14) ηk , 2. ν2 µ2 + (ν1 + kMk−1 k2F )2 kuk − uk−1 k Using (12)–(14), it follows that, for all k ∈ N, h i Mk = Mk−1 − ηk Mk−1 (uk − uk−1 ) − (yk+1 − yk ) × (uk − uk−1 )∗ . (15) Thus, the AHSS control is given by (11), (14), and (15). The control architecture is shown in Fig. 1. All AHSS computations are performed using complex DFT signals. At time kTs , the control u is updated using (6) and the complex signal uk . Note that uk is calculated using yk , which is the DFT of y at frequency ω sampled over the interval [(k − 1)Ts , kTs ), which corresponds to the time between the k − 1 and k steps. The update period Ts must be sufficiently large such that the harmonic steady-state assumption yk+1 ≈ ŷhss (uk ) is valid. Numerical testing suggests that Ts should be at least as large as the settling time associated with the slowest mode of A, that is, Ts > 4/(ζωn ), where ζ and ωn are the damping ratio and natural frequency of the slowest mode of A. The AHSS controller parameters are µ ∈ (0, 1], γ ∈ (0, 1], ν1 > 0, and ν2 > 0. The gains µ and γ influence the step size of the uk and Mk update equations, respectively. The gain ν1 and ν2 influence the normalization of the uk and Mk update equations, respectively. VI. S TABILITY A NALYSIS The following result provides stability properties of the estimator (15). The proof follows from direct computation and is omitted due to space limitation. Proposition 1. Consider the open-loop system (7), and the AHSS control (11), (14), and (15), where µ ∈ (0, 1], γ ∈ (0, 1], ν1 > 0, and ν2 > 0. Then, for all u0 ∈ C and M0 ∈ C\{0}, the estimate Mk is bounded, and for all k ∈ Z+ , kMk − M∗ k2F − kMk−1 − M∗ k2F ∗ γk(Mk−1 − M∗ )Mk−1 yk k 2 ≤− . (16) ∗ y k2 ν2 + kMk−1 k Proposition 1 implies that kMk − M∗ k2F is nonincreasing. We now analyze closed-loop performance under the assumption that the open-loop system is SISO. Define u∗ , ˆ ∗ , which exists because M∗ 6= 0. Note that if uk ≡ −d/M u∗ , then yk ≡ 0. Next, (7) implies that yk+1 = M∗ uk + dˆ = M∗ uk + yk − M∗ uk−1 , and substituting (11) yields ∗ µM∗ Mk−1 yk , (17) yk+1 = yk − ν1 + |Mk−1 |2 ˆ Furthermore, (14) and where k ∈ Z+ and y1 = M∗ u0 + d. (15) can be written as  γ ∗ Mk = Mk−1 − Mk−1 Mk−1 yk ν2 + |Mk−1 |2 |yk |2 Fig. 1: AHSS control architecture.  ν1 + |Mk−1 |2 + (yk+1 − yk ) yk∗ Mk−1 . (18) µ Define M , C\{x ∈ C : |∠x − ∠M∗ | = π}, which is the set of all complex numbers except those numbers that are exactly 180◦ from M∗ . The following result provides the closed-loop SISO stability properties. The proof is in Appendix A. Theorem 3. Consider the closed-loop system (17) and (18), which consists of (7), (11), (14), and (15), where µ ∈ (0, 1], γ ∈ (0, 1], ν1 > 0, and ν2 > 0. Then, (yk , Mk ) ≡ (0, M∗ ) is a Lyapunov stable equilibrium of (17) and (18). Furthermore, for all initial conditions u0 ∈ C and M0 ∈ M\{0}, Mk is bounded, limk→∞ uk = u∗ and limk→∞ yk = 0. VII. N UMERICAL E XAMPLES Consider the acoustic duct of length L = 2 m shown in Fig. 2, where all measurements are from the left end of the duct. A disturbance speaker is at ξd = 0.95 m, while 2 control speakers are at ξψ1 = 0.4 m and ξψ2 = 1.25 m. All speakers have cross-sectional area As = 0.0025 m2 . The equation for the acoustic duct is ∂ 2 p(ξ, t) 1 ∂ 2 p(ξ, t) = + ρ0 ψ̇1 (t)δ(ξ − ξψ1 ) 2 2 c ∂t ∂ξ 2 ˙ + ρ0 ψ̇2 (t)δ(ξ − ξψ2 ) + ρ0 d(t)δ(ξ − ξd ), where p(ξ, t) is the acoustic pressure, δ is the Dirac delta, c = 343 m/s is the phase speed of the acoustic wave, ψ1 and ψ2 are the speaker cone velocities of the control speakers, d is the speaker cone velocity of the disturbance speaker, and ρ0 = 1.21 kg/m2 is the equilibrium density of air at room conditions. See [15] for more details. Using separation of variables and retaining r modes, the Pr solution p(ξ, t) is approximated by p(ξ, t) = pi=0 qi (t)Vi (ξ), where for i = 1, · · · , r, Vi (ξ) , c 2/L sin iπξ/L, and qi satisfies the differential equation (1), where  Rt T Rt x(t) = , q (σ)dσ q1 (t) · · · q (σ)dσ qr (t) 0 1 0 r i h i h 0 1 0 1 2 A = diag , · · · , −ωn2r −2ζr ωnr , −ωn −2ζ1 ωn 1 1  T ρ0 0 V1 (ξψ1 ) · · · 0 Vr (ξψ1 ) B= , As 0 V1 (ξψ2 ) · · · 0 Vr (ξψ2 )   ρ0 T 0 V1 (ξd ) · · · 0 Vr (ξd ) D1 = , As d " N/m2 ! y u (m/s) −200 5 0 −5 0 4 8 0 4 t (s) 8 t (s) Fig. 3: For a SISO plant with |∠M0 − ∠M∗ | < 90◦ , both HSS and AHSS yield y(t) → 0 as t → ∞. Dashed lines show ±|u∗ |. " HSS 200 0 ψ2 φ1 φ2 Feedback microphone Feedback microphone y ψ1 0 AHSS ! Disturbance Control speaker speaker AHSS 200 −200 u (m/s) Control speaker HSS N/m2 and for i = 1, · · · , r, ωni , iπc/L is the natural frequency of the ith mode, and ζi = 0.2 is the assumed damping ratio of the ith mode. Two feedback microphones are in the duct at ξφ1 = 0.3 m and ξφ2 = 1.7 m, and they measure the acoustic pressures φ1 (t) = p(ξφ1 , t) and φ2 (t) = p(ξφ2 , t), respectively. Thus, for i = 1, 2, φi (t) = Ci x(t), where ρ0 [ 0 V1 (ξφi ) · · · 0 Vr (ξφi ) ]. For all examCi = A s ples, r = 5 and x(0) = 0. The DFT is performed using a 1 kHz sampling frequency. The HSS and AHSS parameters are Ts = 0.1 s, u0 = 0, µ = γ = 0.2, ν1 = ν2 = 0.1kM0 k2F , ρ = µ/(ν1 + kM0 k2F ), and Me = M0 , where M0 is specified in each example. The following examples consider the acoustic duct with different control speaker and feedback microphone configurations. Let ω1 = 251 rad/s and ω2 = 628 rad/s. 5 0 −5 ξφ1 ξψ1 0 4 8 0 t (s) ξd 4 8 t (s) Fig. 4: For a SISO plant with |∠M0 − ∠M∗ | > 90◦ , the response y with HSS diverges, whereas AHSS yields y(t) → 0 as t → ∞. Dashed lines show ±|u∗ |. ξψ2 ξφ2 L 40 Fig. 2: Acoustic duct. M0 Mk M∗ M 61 30 20 Im M Example 1. SISO (m = ` = 1). Let u = ψ1 , y = φ1 , ψ2 = 0, and d = sin ω1 t + 2 cos ω1 t. First, consider the case where M0 is within 90◦ of the M∗ , specifically, π M0 = 2e 3 M∗ . Figure 3 shows y and u for HSS and AHSS. The control is turned on after 1 s. Both HSS and AHSS yield 2π asymptotic disturbance rejection. Next, let M0 = 2e 3 M∗ ◦ which is not within 90 of M∗ . Figure 4 shows y and u for HSS and AHSS. In this case, y with HSS diverges, whereas y with AHSS converges to zero. Figure 5 shows the trajectory of the estimate Mk , which moves toward M∗ . Proposition 1 states that |Mk − M∗ | is nondecreasing; however, this result assumes that y reaches harmonic steady state. Figure 5 shows that Mk − M∗ may increase slightly in practice but generally decreases. 4 Example 2. Single-input two-output (m = 1 and ` = 2). Let u = ψ1 , y = [ φ1 φ2 ]T , ψ2 = 0, and d = sin ω1 t + 2 cos ω1 t. First, consider the case where M0 is selected such that (10) is satisfied, specifically, π π M0 = [ 1.5e 4 (M∗ )(1,1) 0.5e 3 (M∗ )(2,1) ]T . Note that the optimal control is u∗ = −1.66 + 0.98, which minimizes the average power (4). Figure 6 shows y and u for HSS and AHSS. The control is turned on after 1 s. In this case, HSS and AHSS each yield uk → u∗ as k → ∞. Thus, limk→∞ kyk k is minimized. Next, let M0 = 3π 2π [ 1.5e 4 (M∗ )(1,1) 0.5e 3 (M∗ )(2,1) ]T , which does not 10 0 −10 −60 −50 −40 −30 −20 −10 Re M 0 10 20 Fig. 5: Trajectory of Mk with AHSS for a SISO plant where |∠(M0 /M∗ )| > π2 . The dashed line shows the locus of M such that |∠(M/M∗ )| = π2 , which is HSS stability boundary for Me . Selection of Me = M0 from the lower region, where |∠(M/M∗ )| > π2 , results in an unstable response with HSS, whereas AHSS yields asymptotic disturbance rejection for all M0 ∈ M. satisfy (10). Figure 6 shows y and u for HSS and AHSS. In this case, y with HSS diverges, whereas y with AHSS converges and uk → u∗ as k → ∞, which implies that limk→∞ kyk k is minimized. 4 Example 3. MIMO (m = 2 and ` = 2) with a twotone disturbance. Let u = [ ψ1 ψ2 ]T , y = [ φ1 φ2 ]T , and d = sin ω1 t + sin ω2 t + cos ω1 t + cos ω2 t, which is a two-tone disturbance. Define M∗,1 , Gyu (ω1 ), and M∗,2 , Gyu (ω2 ). Since d has 2 tones, we use 2 copies of the HSS or AHSS algorithm—one copy at each disturbance AHSS ! " y(1) N/m2 HSS 150 0 ! " y(2) N/m2 −150 300 0 −300 u(1) (m/s) ! " y(2) N/m2 ! " y(1) N/m2 HSS u (m/s) 5 0 0 2 4 t (s) 6 0 2 4 t (s) 6 Fig. 6: For a single-input two-output plant satisfying (10), both HSS and AHSS minimize limk→∞ kyk k. Dashed lines show ±|u∗ |. u(2) (m/s) −5 300 0 −300 300 0 −300 1 0 −1 2 0 −2 0 4 8 . AHSS 16 0 4 HSS ! " y(1) N/m2 0 −150 300 −300 0 −5 0 2 4 t (s) 6 0 2 4 t (s) 6 Fig. 7: For a single-input two-output plant that does not satisfy (10), the response y with HSS diverges, whereas AHSS minimizes limk→∞ kyk k. Dashed lines show ±|u∗ |. frequency. Let M1,0 and M2,0 denote the initial estimates of M∗,1 and M∗,2 . First, consider the case where M1,0 and M2,0 are such that (10) is satisfied, specifically, M1,0 = π π 0.6e 6 M∗,1 , and M2,0 = 0.9e 3 M∗,2 . Figure 8 shows y and u for HSS and AHSS. The control is turned on after 1 s. Both HSS and AHSS yield asymptotic disturbance rejection. π Next, consider the case where M1,0 = 0.2e 7 M∗,1 , and π  14 M2,0 = 0.6e M∗,2 , which do not satisfy (10). Figure 9 shows y and u for HSS and AHSS. In this case, y with HSS diverges, whereas y with AHSS converges to zero. 4 A PPENDIX A: P ROOF OF T HEOREM 3 Proof. Define M̃k , Mk − M∗ , VM (M̃k ) , |M̃k |2 , and ∆VM (k) , VM (M̃k ) − VM (M̃k−1 ). It follows from Proposition 1 that for all k ∈ Z+ γ|Mk−1 |2 |yk |2 |M̃k−1 |2 ∆VM (k) ≤ − . (19) ν2 + |Mk−1 |2 |yk |2 u(1) (m/s ) ! " y(2) N/m2 0 5 u (m/s) 12 t (s) 8 12 t (s) 16 Fig. 8: For a MIMO plant that satisfies (10) with a 2-tone disturbance, both HSS and AHSS yield y(t) → 0 as t → ∞. 150 u(2) (m/s ) ! " y(2) N/m2 ! " y(1) N/m2 HSS AHSS AHSS 300 0 −300 300 0 −300 1 0 −1 2 0 −2 0 4 8 12 t (s) 16 0 4 8 12 t (s) 16 Fig. 9: For a MIMO plant that does not satisfy (10) with a 2-tone disturbance, the response y with HSS diverges, whereas AHSS yields y(t) → 0 as t → ∞. Next, define Vy (yk ) , |yk |2 and ∆Vy (k) , Vy (yk+1 ) − Vy (yk ). Evaluating ∆Vy (k) along the trajectories of (17) yields  µ|yk |2 ∗ ∆Vy (k) = − 2Re M∗ Mk−1 ν1 + |Mk−1 |2  µ|M∗ |2 |Mk−1 |2 − , (20) ν1 + |Mk−1 |2 ∗ Note that |M̃k−1 |2 = |Mk−1 |2 + |M∗ |2 − 2Re M∗ Mk−1 , and it follows from (20) that  µ|yk |2 ∆Vy (k) = − |Mk−1 |2 + |M∗ |2 − |M̃k−1 |2 ν1 + |Mk−1 |2  µ|M∗ |2 |Mk−1 |2 . (21) ν1 + |Mk−1 |2 Define the Lyapunov function V (yk , M̃k−1 ) , ln(1 + aVy (yk )) + bVM (M̃k−1 ), where a , (|M0 | + 2|M∗ |)2 /ν2 , and b > 0 is provided later. Consider the Lyapunov difference ∆V (k) , V (yk+1 , M̃k ) − V (yk , M̃k−1 ). (22) Since for all x > 0, ln x ≤ x − 1, evaluating ∆V along the trajectories of (17)  and (18) yields a∆Vy (k) ∆V (k) = ln 1 + + b∆VM (k) 1 + aVy (yk ) a∆Vy (k) + b∆VM (k). (23) ≤ 1 + aVy (yk ) Substituting (19) and (21) into  (23) yields  − aµ|yk |2 |M∗ |2 − ∆V (k) ≤ − µ|M∗ |2 |Mk−1 |2 ν1 +|Mk−1 |2 (1 + a|yk |2 )(ν1 + |Mk−1 |2 ) aµ|yk |2 |M̃k−1 |2 + (1 + a|yk |2 )(ν1 + |Mk−1 |2 ) |Mk−1 |2 |yk |2 |M̃k−1 |2 . (24) − bγ ν2 + |Mk−1 |2 |yk |2 Since for all k ∈ Z+ , ∆VM (k) ≤ 0, it follows that |Mk−1 | ≤ |M̃k−1 | + |M∗ | ≤ |M̃0 | + |M∗ | ≤ |M0 | + 2|M∗ |, and thus |Mk−1 |2 ≤ aν2 . Therefore, since µ ∈ (0, 1], it follows from (24) that c1 |yk |2 aµ|yk |2 |M̃k−1 |2 ∆V (k) ≤ − + 1 + a|yk |2 ν1 (1 + a|yk |2 ) 2 |Mk−1 | |yk |2 |M̃k−1 |2 , (25) − bγ ν2 + aν2 |yk |2 2 1 |M∗ | where c1 , aµν (ν1 +aν2 )2 > 0. To show that (0, M∗ ) is a Lyapunov stable equilibrium, define D , C × {x ∈ C : |x| < |M∗ |/2}, and note that for 2 all (yk , M̃k−1 ) ∈ D, |Mk−1 | ≥ |M∗ |/2. Let b , γν4aµν 2, 1 |M∗ | and it follows from (25) that for all (yk , M̃k−1 ) ∈ D, ∆V (k) ≤ −c1 |yk |2 /(1 + a|yk |2 ), which is nonpositive. Therefore, (yk , Mk−1 ) ≡ (0, M∗ ) is a Lyapunov stable equilibrium. To show convergence of yk and uk , let M0 ∈ M\{0}, and define ( |M∗ |, if M0 = M∗ , c2 , (26) ∗ |Im M̃0 M∗ |/|M̃0 |, if M0 6= M∗ . First, assume M0 = M∗ , and it follows that for all k ∈ N, Mk = M∗ . In this case, for all k ∈ N, |Mk | = c2 . Next, assume M0 6= M∗ . Since M0 ∈ M\{0}, it follows that, ∠M∗ − ∠M0 6= π, which implies that ∠(M0 /M∗ ) 6= π. Thus, Im(M0 /M∗ ) 6= 0, which implies that Im M̃0 M∗∗ = Im (M̃0 M∗∗ + M∗ M∗∗ ) = Im M0 M∗∗ = |M∗ |2 Im(M0 /M∗ ) 6= 0, and it follows from (26) that c2 > 0. Next, note  that it follows2 from2 (17)  and (18) that γ|Mk−1 | |yk | M̃k = 1 − M̃k−1 , ν2 + |Mk−1 |2 |yk |2 which has the solution M̃k = βk M̃0 , where βk , Qk−1 γ|Mi |2 |yi+1 |2 . Thus, for all k ∈ Z+ , 1 − i=0 ν2 + |Mi |2 |yi+1 |2 |Mk |2 = |M̃k + M∗ |2 = |M̃0 βk + M∗ |2 = |M̃0 |2 βk2 + 2(Re M̃0 M∗∗ )βk + |M∗ |2 . Since f (x) , |M̃0 |2 x2 + 2(Re M̃0 M∗∗ )x + |M∗ |2 is quadratic and positive definite −Re M̃0 M∗∗ in x, it follows that f is minimized at . Thus, |M̃0 |2 for all k ∈ N, 2  |M∗ |2 |M̃0 |2 − Re M̃0 M∗∗ = c22 . |Mk |2 ≥ |M̃0 |2 aµν2 Thus, for all k ∈ N, |Mk | > c2 . Let b , γν 2 , and it 1 c2 follows from (25) that c1 |yk |2 ∆V (k) ≤ − . (27) 1 + a|yk |2 Next, since V is positive-definite, and for all k ∈ N, ∆V (k) is nonpositive, it follows from (22) and (27) that Pk Pk c1 |yi |2 0 ≤ limk→∞ i=1 1+a|y 2 ≤ − limk→∞ i=1 ∆V (i) = i| V (y1 , M̃0 ) − limk→∞ V (yk , M̃k−1 ) ≤ V (y1 , M̃0 ), where the upper and lower bounds imply that all the limc1 |yk |2 = 0. Since in addiits exist. Thus, limk→∞ 1+a|y 2 k| 2 c1 |yk | tion, 1+a|y 2 is a positive-definite function of yk , it folk| lows that limk→∞ yk = 0. Furthermore, (7) implies that ˆ limk→∞ uk = limk→∞ (yk+1 − d)/M ∗ = u∗ . R EFERENCES [1] S. J. Elliott and P. A. Nelson. Active noise control. IEEE Sig. Proc. Mag., 10(4):12–35, 1993. [2] P. P. Friedmann and T. A. Millott. Vibration reduction in rotorcraft using active control: A comparision of various approaches. J. Guidance, Control, and Dynamics, 18(4):664–673, 1995. [3] C. R. Knospe, R. W. Hope, S. M. Tamer, and S. J. Fedigan. Robustness of adaptive unbalance control of rotors with magnetic bearings. J. Vibration Contr., 2(2):33–52, 1996. [4] E. J. Davison. The robust control of a servomechanism problem for linear time-invariant multivariable systems. IEEE Trans. Autom. Contr., 21:25–34, 1976. [5] B. A. Francis, A. Sebakhy, and W. M. Wonham. Synthesis of multivariable regulators: The internal model principle. J. Appl. Math. Optim., 1:64–86, 1974. [6] J. B. Hoagg, M. A. Santillo, and D. S. Bernstein. Internal model control in the shift and delta domains. IEEE Trans. Autom. Contr., 53:1066–1072, 2008. [7] M. Bodson, A. Sacks, and P. Khosla. Harmonic generation in adaptive feedforward cancellation schemes. IEEE Trans. Auto. Contr., 39(9):1939–1944, 1994. [8] D. S. Bayard. A general theory of linear time-invariant adpative feedforward systems with harmonic regressors. IEEE Trans. Auto. Contr., 45(11):1983–1996, 2000. [9] S. J. Elliott, C. C. Boucher, and P. A. Nelson. Active noise control. IEEE Trans. Sig. Proc., 40(5):1041–1052, 1992. [10] D. Patt, J. Chandrasekar, D. S. Bernstein, and P. P. Friedmann. Higher-harmonic-control algorithm for helicopter vibration reduction revisted. J. Guidance, Control, and Dynamics, 28(5):918–930, 2005. [11] J. Chandrasekar, L. Liu, D. Patt, P. P. Friedmann, and D. S. Bernstein. Adaptive harmonic steady-state control for disturbance rejection. IEEE Trans. Contr. Sys. Tech., 14(6):993–1007, 2006. [12] S. Pigg and M. Bodson. Adaptive algorithms for the rejection of sinusoidal disturbances acting on unknown plants. IEEE Trans. Contr. Sys. Tech., 18(4):822–836, 2010. [13] D. S. Bernstein. Matrix Mathematics. Princeton University Press, 2009. [14] D. H. Brandwood. A complex gradient operator and its application in adaptive array theory. IEE Proceedings F (Communications, Radar and Signal Processing), 130(1):11–16, 1983. [15] J. Hong, J. C. Ackers, R. Venugopal, M. N. Lee, A. G. Sparks, P. D. Washabaugh, and D. S. Bernstein. Modeling, identification, and feedback control of noise in an acoustic duct. IEEE Trans. Contr. Sys. Tech., 4:283–291, 1996.
3cs.SY
Detection of Faults in Power System Using Wavelet Transform and Independent Component Analysis 1 1 2 Dept. of Electrical and Electronics Engineering, IIIT, Bhubaneswar, India. Dept. of Electrical Engineering, SOA University, Bhubaneswar, India. 3 3 4 Prakash K. Ray, 2B. K. Panigrahi, 2P. K. Rout Asit Mohanty, 4Harishchandra Dubey Dept. of Electrical Engineering, CET, Bhubaneswar, India. Dept. of ECE, The University of Texas at Dallas, USA. ABSTRACT: Uninterruptible power supply is the main motive of power utility companies that motivate them for identifying and locating the different types of faults as quickly as possible to protect the power system prevent complete power black outs using intelligent techniques. Thus, the present research work presents a novel method for detection of fault disturbances based on Wavelet Transform (WT) and Independent Component Analysis (ICA). The voltage signal is taken offline under fault conditions and is being processed through wavelet and ICA for detection. The time-frequency resolution from WT transform detects the fault initiation instant in the signal. Again, a performance index is calculated from independent component analysis under fault condition which is used to detect the fault disturbance in the voltage signal. The proposed approach is tested to be robust enough under various operating scenarios like without noise, with 20-dB noise and variation in frequency. Further, the detection study is carried out using a performance index, energy content, by applying the existing Fourier transform (FT), short time Fourier transform (STFT) and the proposed wavelet transform. Fault disturbances are detected if the energy calculated in each scenario is greater than the corresponding threshold value. The fault detection study is simulated in MATLAB/Simulink for a typical power system. 1 INTRODUCTION Modern power utilities require a efficient protection scheme to protect the system itself as well as the connected equipments for improving better performance under normal as well as abnormal/faulty operating scenarios. Now-a-days the electromechanical relays are replaced by digital relays because of their characteristics like faster operation, accuracy and reliability. The fault detection through digital relays and fault detector (FD) is very vital for implementing any real-time solutions (Phadke 1988, Dash 2000). In the literature, so may work are for monitoring and identification of faults in power system. Fault situation can be identified by comparing the difference between the value between two consecutive cycles when higher than a threshold value based on Phasor (Sidhu et al. 2002, Sachdev et al., 1991). But, its demerit being the modeling of fault resistance. Kalman filter is used for fault detection based on estimation method (Chowdhury et al. 1991, Zadeh et al. 2010, & Girgis 1982). Wavelet transform (WT) is being used for the detection of fault disturbances in power system (Ukil & R. Živanović 2007) which detects the changes in the signal. Then, adaptive filters and wavelet transform in combination was used for fault identification in power system (Ray et al. 2010). But, these techniques affected by variation in frequency, noise etc. This paper proposes an algorithm for fault detection using wavelet transform and independent component analysis. The sudden changes are to be detected by the detection techniques so that suitable solutions can be adapted to protect the power system from any type of disturbances. The proposed method performances are being analyzed under different operating scenarios like in presence of noise, harmonics and frequency variations. Wavelet transform (WT) and independent component analysis (ICA) are suitable candidates for detection of fault disturbances because of efficient timefrequency resolutions and their reliability to extract the suitable features for identification purpose. Again, the techniques are considered under different operating conditions in order to assess the robustness and accuracies (Pradhan et al. 2005). This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by the authors or by the respective copyright holders. The original citation of this paper is: P. K. Ray, B. K. Panigrahi, P. K. Rout, A. Mohanty, H. Dubey, "Detection of Faults in Power System Using Wavelet Transform and Independent Component Analysis", First International Conference on Advancement of Computer Communication & Electrical Technology, October 2016, Murshidabad, India, DOI: 10.13140/RG.2.2.20394.82882 The techniques used for detection analysis is presented in Section 2 followed by the algorithm of implementation in Section 3. Then, Section 4 explains the result analysis both qualitatively and quantitatively, followed by the conclusions in Section 5. 2 TECHNIQUES FOR FAULT DETECTION This section describes the techniques used for identification of different types of faults in wind system connected to grid power system. The WT and ICA as detection techniques are presented briefly with their mathematical modeling. Different operating scenarios are taken as case studies to test these methods for fault identifications which help in assessing both normal as well as faulty operating conditions. The details of these methods are as follows. 2.1 Wavelet transforms (WT) Figure 1: Wavelet decomposition tree Considering a voltage signal of the power system as ( ), the continuous wavelet transform (CWT) is expressed as:  tN V (t )*  a   M 1  DWT (V , M , N )  1 M 0m  k  n  kM 0m V (k )*   Mm 0     (2) Where M and N are replaced by M and kM , and k, mare integers. Scaling function in one stage is expressed as sum of that of next stage and can be given by:   h ( n)  (t )  2  (2t  n) n  (3) Using the above equation, the original voltage signal can be written as [8]:  V (t )   a jo (k )2 jo / 2  (2 jo t  k )    d j (k )2 j / 2  (2 j t  k ) (4) Where 0 is the coarse adjustment parameter in the scaling function. The detail and approximate coefficients are written: k  k  j  jo  The wavelet transform is a signal processing algorithm which is useful in detection of abnormal operating conditions based on decomposition of the power signals into different ranges of frequencies by the help of a series of low-pass and high-pass filters. This usually provides us a time-frequency multi-resolution analysis that greatly useful for identifying any short of abrupt variations in the electrical parameters such as voltage, phase, current, frequency etc. Here, Daubechies4 (dB4) is being used as the mother wavelet basis function for the fault detection analysis (Ukil & R. Živanović 2007). Usually, the signal is divided into a set of approximate (a) and detail (d) co-efficient representing the low-frequency and high frequency bands respectively. The decomposition is as presented below in Figure 1. CWT (V , M , N )  Where and are called as dilation and translation parameters and is known as the wavelet basis function. Now WT in discrete form as:   dt  (1) a j (k )  a j 1 (m)h(m  2k ) (5) m   d j (k )  c j 1 (m)h1 (m  2k ) m  (6) 2.2 Independent Component Analysis (ICA) Independent Component Analysis (ICA) is an advanced or modified version of principal component analysis (PCA). It uses high order statistical analysis based de-correlation for the source input signal and provides important information regarding the irregularities presence. In ICA, the input data is modeled as linear coefficients that are mutually independent to each other. Based on the blind source separation algorithm, it can efficiently and accurately transform the input voltage signal into mutually and statistically independent components, thereby helps the detection process (Hyvärinen et al. 2001, Pöyhönen et al. 2003, Lopez et al. 2011, & Dubey et al. 2011). The mutual information nothing but the individual independency measurement of the input signal and its entropy is Gaussian in nature and can be written as: J ( y )  h(vgaussian )  h(v) (7) Differential entropy H of an input signal y with density ( ) is given by: h(v)    ph   log pv   d (8) Here, the negentropy is estimated based on the estimation of probability functions of input signals Then, rather the negentropy can be expressed as:     e g  w x   e g  v J  vi   J e wiT x T i gaussian  2 (9) Here, e is the statistical expectation and G is a nonquadratic factor. For n linear mixtures taken as x , x , … . x for the n independent components, we can express : x j  a1s1  a2 s2  ....  an sn For all (10) Here, x is a random mixture and s is a random independent variable. Assuming x as the random vector with elements x , x , … . x and random vector with elements s , s , … . s , if A is the matrix having elements a , we can take column vectors; x ,as the transpose of x. Then, we can write in matrix form: x  As (11) Where, A is a column matrix of elements a j and then model is expressed as: n x   ai si (12) i 1 The ICA mathematical model is an iterative one where the independent components are called latent variables. Here the input mix matrix is considered to be unknown and the components s are statistically independent. Finally, once the matrix A is estimated, we can determine the inverse, W, then can evaluate the independent component by the following expression: s  Wx (iv) Then, the principal components (PC) of the input data are determined. (v) In the current study, the independent components are calculated based on fixed point iteration [12]-[15]. (vi) Then, de-correlating matrix, W and the independent component, S of voltage signal is determined from which a matrix, x is generated. (vii) And finally, the pre-fault signal is considered for constructing the matrix, x which can be used to calculate the performance index and fault is detected when the index is more than a set threshold value. The performance index is given by PI (k)  (normal(absolute(Wf (k )* xn (k )  s f (k )))2 ) (14) 4 SIMULATED RESULTS This section explains the detection results and corresponding discussions in a wind system connected to grid. The power system is simulated in MATLAB/Simulink environment and the grid is of 230 kV, 50 Hz rating consisting of thermal based power plant. The considered grid-connected power system is shown in Figure 2 and here, the sampling frequency is taken as 2 kHz. (13) Figure 2: Grid-connected wind power System. 3 FAULT DETECTION METHODOLOGY The fault detection methodology is explained in this section for the grid-connected wind power system as follows: (i) A grid-connected wind power system is simulated in MATLAB where different types of fault are created. The voltage signal is extracted at PCC under faulty conditions. The signal is then passed through wavelet transform to get the timefrequency analysis for identification of faulty situations. (ii) The voltage signal is processed through to find the mean and de-correlation. This is the 1st level of processing. . (iii) Then, X data size is reduced and filtered for better data redundancy. 4.1 Fault detection using wavelet transform The voltage signal at point of common coupling (PCC) is taken offline under AG fault. The signal is processed through WT which detects the fault instant based on filtering through a set of low-pass and high-pass filters. The voltage signal with its detection result is shown in Figure 3. Similarly, the detection result using AB and ABCG fault is shown in Figure 4 and Figure 5 respectively. These results clearly show that WT nicely detect the fault initiation instant nicely. But, as noticed when the fault is cleared, as shown in Figs., the recovery to normal waveform is un-noticed by wavelet transform. Figure 3: Detection of phase-to-ground fault in wind system connected to grid (red- voltage signal; green-WT output) 4.3 Phase-to-phase fault detection using Independent Component Analysis Next, a phase-to-phase fault is near to the point of common coupling and the corresponding voltage signal at the PCC. Then, the index as explained in ICA section is calculated under different operating conditions like without noise, with 20-dB noise and under variation in frequency condition. The simulated of the performance index obtained from ICA is shown in Figure 6 (b). It is observed that, the fault initiated at near about 0.065 s detected through sudden increase in the index value. Before the fault, the index value is observed to be almost zero. Once, the fault occurs, the value increases suddenly and if we set a threshold value, then the can be detected. But in this case, we have not set the threshold value. Rather, we are assessing the faulty condition based on sudden increase. Figure 4: Detection of phase-to-phase fault in wind system connected to grid (red- voltage signal; green-WT output) (a) Figure 5: Detection of three-phase-to-ground fault in wind system connected to grid (red- voltage signal; green-WT output) 4.2 Phase-to-ground fault detection using Independent Component Analysis A phase-to-ground fault is near to the point of common coupling and the corresponding voltage signal at the PCC is taken offline. Then, the index as explained in ICA section is calculated under different operating conditions like without noise, with 20-dB noise and under variation in frequency condition. The simulated of the performance index obtained from ICA is shown in Figure 6 (a). It is observed that, the fault initiated at near about 0.065 s detected through sudden increase in the index value. Before the fault, the index value is observed to be almost zero. Once, the fault occurs, the value increases suddenly and if we set a threshold value, then the can be detected. But in this case, we have not set the threshold value. Rather, we are assessing the faulty condition based on sudden increase. (b) Figure 6: Detection of (a) phase-to-ground fault (b) phase-tophase fault in wind system connected to grid 4.4 Detection of fault disturbances using the performance index (PI) This sub-section describes the detection technique using a performance index called energy content of the processed faulty signal. The voltage signal at the point of common coupling is extracted and processed through different signal processing transforms like Fourier transform (FT), Short time Fourier transform (STFT) and wavelet transform. Then the output waveform after processing is used to calculate energy which is compared with a threshold value to know the faulty or normal operating conditions in the power system. It is observed that proposed WT provides larger energy value so that a suitable threshold can be chosen to accurately detect the faulty conditions. The index in different cases is shown in Table 1. Table 1 Energy content using FT, STFT,WT Zadeh, R.A., A. Ghosh, & G. Ledwich (2010). Combination of Kalman Filter and Least-Error Square Techniques IEEE Trans. on Power System 25 (4) ,2868-2880. Girgis A. (1982). A new Kalman filtering based digital distance relaying IEEE Trans. on Power Apparatus and Systems 101,3471–3480. Scenario AG Fault BG Fault CG Fault AB Fault BC Fault ABC Fault FT 1.3672 1.4525 1.3324 2.2341 2.6342 3.1302 Energy content STFT 1.7863 2.2414 1.8367 2.3532 3.1230 3.8225 WT 2.1663 2.7352 2.6538 3.2514 3.8724 4.2431 Ukil, A. & R. Živanović (2007). Abrupt change detection in power system fault analysis using wavelet transform. International Conference on Power Systems Transients, Montreal, Canada.June. 19-23. Ukil, A. and R. Živanović, (2007). Application of Abrupt Change Detection in Power Systems Disturbance Analysis and Relay Performance Monitoring. 5 CONCLUSIONS This paper presented detection of fault disturbances using Wavelet Transform and Independent Component Analysis. Voltage signal extracted at PCC is being processed through the above techniques under different fault and operating scenarios. It is observed that WT transform detected the fault instant very accurately. But, in some cases, it could not discriminate the disturbance condition may be because of noise or frequency variation. Therefore, the faults are accurately detected using ICA under all operating scenarios IEEE Trans. on Power Delivery 22 (1),59-66. Ray, P. K., H. C. Dubey, S. R.Mohanty, N. Kishor, & K. Ganesh (2010). Power quality disturbance detection in grid-connected wind energy system using wavelet and Stransform, IEEE ICPCES,1-4. Pradhan, A. K. , A.Routray, & S. R.Mohanty (2005). A Moving Sum Approach for Fault Detection of Power Systems Electric Power Components and Systems 34 (4), 385 – 399. Hyvärinen, A., J. Karhunen, & E. Oja (2001). Independent Component Analysis. A Wiley Interscience Publication, REFERENCES Phadke, G. & J. S. Thorp (1988). Computer Relaying for Power Systems, New York, John Wiley. Dash, P. K., A. K. Pradhan, & G. Panda (2000). A novel fuzzy neural network based distance relaying scheme. IEEE Trans. on Power Delivery. 15, 902–907. John Wiley & Sons, Inc. Sanna, Pöyhönen., P. Jover, & H. Hyötyniemi (2003). Independent component analysis of vibrations for fault diagnosis of an induction motor Proceedings of IASTED International Conference Circuits, Signals, and Systems,19-21. Lopez, M. G., H. M.Lozano, L. P. Sanchez, &L. N. O. Sidhu, T. S., D. S. Ghotra, & M. S. Sachdev (2002). An Moreno (2011). Blind Source Separation of Audio adaptive distance relay and its performance comparison Signals Using Independent Component Analysis and with a fixed data window distance relay. IEEE Trans. on Wavelets Power Delivery. 17,691–697. Communications and Computers (CONIELECOMP) Sachdev, M. S. & M. A.Nagpal (1991). Recursive least square 21st International Conference on Electrical Mexico, 152-157. algorithm for power system relaying and measurement Dubey, H.C., S. R. Mohanty, & N. Kishore (2011). Abrupt applications. IEEE Trans. on Power Delivery. 6,1008– change detection of fault in power system using 1015. independent Chowdhury, F. N., J. P. Christensen, & J. L.Aravena (1991). component analysis Conference on Signal Processing, Communication, Power system fault detection and state estimation using Computing Kalman filter with hypothesis testing. IEEE Trans. on (ICSCCN),659 – 664. Power Delivery. 6, 1025–1030. International and Networking Technologies
3cs.SY
A note on the kernel of a pair of linear maps Miguel V. Carriegos† Noemı́ DeCastro‡ ∗ Ángel Luis Muñoz Castañeda§ arXiv:1603.02730v1 [math.AC] 8 Mar 2016 September 27, 2017 Abstract The kernel of a pair of linear maps is studied in the framework of commutative ring theory with application to behavioral perspective of dynamical systems. Keywords: pair of linear maps, pencil of matrices, convolution code, linear system, hereditary ring. 2010 MSC: 93B10, 15A21, 13C10. 1 Introduction This paper is devoted to the study of kernels of pairs of linear maps. This notion extend some tools used in systems theory, convolutional codes and Boolean networks [7], [9]. In fact if A = RZ is the R-algebra (R a ring) of sequences of elements of R; A ∈ Rn×n , B ∈ Rn×m are matrices and σ is the shift operator σ(x(t)) = x(t + 1). Then set ker(σI − A, B) = {(x(t), u(t)) ∈ An × Am | σ(x(t)) = x(t + 1) = Ax(t) + Bu(t)} collects the trajectories of linear system. On the other hand, it has also been defined ker(σI − A | B) = {u(t) ∈ Am | ∃x(t) ∈ An : σ(x(t)) = x(t + 1) = Ax(t) + Bu(t)} which is central in the definition of convolutional codes because it collects the codewords of convolutional code defined by linear system (A, B). In order to attack this problem we are studying kernels of pairs of matrices with entries in polynomial rings R[z]. Now all along this paper R will denote a commutative ring with identity. Usually R will be a F-algebra or even a field. We develop our results in a general framework and claim additional properties or structure when necessary. ∗ Partially supported by INCIBE. Ministerio de Industria, Spain. RIASC, Universidad de León, SPAIN, mail to: [email protected] ‡ Departamento de Matemáticas, Universidad de León, SPAIN, mail to: [email protected] § Institut für Mathematik, Freie Universität, Berlin, GERMANY, mail to: [email protected] † 1 2 Carriegos, DeCastro & Muñoz-Castañeda Definition 1.1. Let N and Mi , i = 1, 2 be R-modules and fi : Mi → N be R-linear maps. We define ker(f1 | f2 ) = {m2 ∈ M2 | ∃m1 ∈ M1 : f1 (m1 ) + f2 (m2 ) = 0} while we set ker(f1 , f2 ) = ker(f1 ⊕ f2 : M1 ⊕ M2 → N ) = {(m1 , m2 ) ∈ M1 ⊕ M2 : f (m1 ) + f2 (m2 ) = 0} as usual. The paper is organized as follows: Section 2 deals with main properties of ker(f1 | f2 ) which follow from the fact that ker(f1 | f2 ) is the kernel of certain linear map and it is also the cockernel of another linear map. We also point out several properties of ker(f1 | f2 ) when maps fi have nice properties. Section 3 is devoted to give a explicit factorization of ker(f1 | f2 ) in terms of usual kernels ker(f1 , f2 ) and ker(f1 ) when involved R-modules are hereditary or in particular when commutative ring R is hereditary (that is when submodules of projective R-modules are again projective). Note that the class of hereditary rings contains several interesting classes of commutative rings like for instance fields, principal ideal domains, Dedekind domains, von Neumann regular rings and Boolean rings. Next we study scalar extensions R → S in section 4. If R-algebra S happens to be R-flat then scalar extension of ker(f1 | f2 ) is given by the kernel of pair of extended maps ker(f1 ⊗ IS | f2 ⊗ IS ). This fact is used extensively in section 5 to develop the case of product rings R ∼ = R1 × · · · × Rs . We conclude by giving some results related to the kernel of pairs of polynomial matrices which are applicable both in behavioral linear systems and convolutional codes. 2 The kernel of a pair. Definition and properties Let R be a commutative ring; M1 , M2 , N are R-modules and let fj : Mj → N be R-linear maps. Definition 2.1. We denote by ker(f1 | f2 ) the subset of all m2 ∈ M2 such that there exists m1 ∈ M1 with the property f1 (m1 ) + f2 (m2 ) = 0; thats to say ker(f1 | f2 ) = {m2 ∈ M2 | ∃m1 ∈ M1 : f1 (m1 ) + f2 (m2 ) = 0} . This is a generalization of so-called kernel of a pair of morphisms as given in [7], [9]. Note that it is quite clear that ker(f1 | f2 ) is a R-submodule of M2 . It is also straightforward that 3 Kernel of a pair of linear maps Proposition 2.2. ker(f1 | f2 ) = f2−1 (Im (f1 )). Proof. If m2 ∈ ker(f1 | f2 ) then f1 (m1 )+f2 (m2 ) = 0 for some m1 ; that is, f2 (m2 ) ∈ Im (f1 ) or m2 ∈ f2−1 (Im (f1 )) We are also interested in presenting ker(f1 | f2 ) as the kernel of a R-linear map and as the cokernel of another R-linear map. Let’s denote by pi : N → N/ Im (fi ) the natural quotient map of identity sending n 7→ n + Im (fi ). Then it is straightforward that Proposition 2.3. ker(f1 | f2 ) = ker(p1 ◦ f2 : M2 → N/ Im (f1 )) Proof. x ∈ ker(p1 ◦ f2 : M2 → N/ Im (f1 )) ⇔ f2 (x) ∈ Im (f1 ) On the other hand put the linear map (f1 , f2 ) : M1 ⊕ M2 → N sending (m1 , m2 ) 7→ (f1 , f2 )(m1 , m2 ) = f1 (m1 ) + f2 (m2 ). Note that ker(f1 ) ⊆ ker(f1 , f2 ) because if m ∈ ker(f1 ) then f1 (m) = 0; hence (f1 , f2 )(m, 0) = 0 and consequently (m, 0) ∈ ker(f1 , f2 ). Moreover one has Theorem 2.4. ker(f1 | f2 ) = coker[ker(f1 ) ֒→ ker(f1 , f2 )] Proof. The projection onto the second factor π2 : M1 ⊕ M2 → M2 restricts to the onto π 2 map ker(f1 , f2 ) −→ ker(f1 | f2 ) whose kernel consist of all pairs satisfying π2 (x1 , x2 ) = 0 and therefore x2 = 0 by definition of π2 . So, a fortiori, f1 (x1 ) = 0, and consequently we are done because h i π2 ker ker(f1 , f2 ) −→ ker(f1 | f2 ) = ker(f1 ) That is, the following sequence is short exact 0 → ker(f1 ) ֒→ ker(f1 , f2 ) → ker(f1 | f2 ) → 0 m1 7→ (m1 , 0) (m1 , m2 ) 7→ m2 The following properties of the kernel of a pair of linear maps, may be easily derived. Proposition 2.5. Consider the R-linear maps fi : Mi → N . Denote by 0 and I respectiveli the zero linear map and the identity map. Then (i) ker(0 | f2 ) = ker(f2 ) (ii) If f1 is onto then ker(f1 | f2 ) = M2 (iii) ker(0 | I) = 0 4 Carriegos, DeCastro & Muñoz-Castañeda (iv) ker(f1 | 0) = M2 (v) In general, Im (f2 ) ⊆ Im (f1 ) ⇒ ker(f1 | f2 ) = M2 (vi) If Ψ2 is an automorphism of M2 then mapping m2 7→ Ψ2 (m2 ) is an isomorphism ker(f1 | f2 Ψ2 ) → ker(f1 | f2 ) (vii) ker(f1 | f2 Ψ2 ) = Ψ−1 2 (ker(f1 | f2 )) (viii) If Ψ1 is an automorphism of M1 then ker(f1 Ψ1 | f2 ) = ker(f1 | f2 ) (ix) If Ψ is an isomorphism of N then ker(Ψf1 | f2 ) = ker(f1 | Ψ−1 f2 ) Proof. (i), (ii), (iii) are straightforward from Proposition 2.2; (iv), (v) are directly obtained from Definition 2.1. Property (vi) is consequence of the fact that Ψ2 maps ker(f1 | f2 Ψ2 ) onto ker(f1 | f2 ). Since Ψ2 is injective (because it is a restriction an isomorphism) it follows that Ψ2 is itself an isomorphism and hence the result. Property (vii) follows straightforward from (vi). Assertion (viii) is clear because ker(f1 Ψ1 | f2 ) = {m2 ∈ M2 | ∃m1 ∈ M1 : f1 (Ψ1 m1 ) + f2 m2 = 0} Finally to prove (ix) note that ker(Ψf1 | f2 ) = {m2 ∈ M2 | ∃m1 ∈ M1 : Ψf1 (m1 ) + f2 m2 = 0}. Defining condition is equivalent to saying that f1 m1 + Ψ−1 f2 m2 = 0 which is the definition of ker(f1 | Ψ−1 f2 ) 3 Hereditary rings A R-module M is called hereditary if every submodule of M is projective. If every ideal of R is projective (that is, R is a ring of global dimension one) then every projective Rmodule is hereditary and commutative ring R is called hereditary. A hereditary integral domain is a Dedekind domain. Assume that R-modules Mi , N are hereditary R-modules. It follows that all R-modules in exact sequence of Theorem 2.4 0 → ker(f1 ) ֒→ ker(f1 , f2 ) → ker(f1 | f2 ) → 0 are projective. Therefore Theorem 3.1. If R-modules Mi and N are hereditary (in particular if R is itself an hereditary ring) then one has the factorization ker(f1 , f2 ) ∼ = ker(f1 ) ⊕ ker(f1 | f2 ) and, consequently ker(f1 | f2 ) ∼ = ker(f1 , f2 )/ ker(f1 ) 5 Kernel of a pair of linear maps Example 3.2. Put a matrix A ∈ Rn×n with no real eigenvalues and B ∈ Rn×m then one has the isomorphism ker(zI − A | B) ∼ = ker(zI − A, B). This result, translated to the case of z = σ the shift operator in R-algebra A = RZ , implies that sequences of admissible controls ~u(t) of linear system ~x(t + 1) = A~x(t) + B~u(t) are in bijective correspondece with trajectories (solutions) (~x(t), ~u(t)) of linear system. 4 Scalar Extension. Base change Assume in the sequel that S is a R-algebra with structural morphism ρ : R → S. Scalar extension of R-module M is the S-module ρ∗ (M ) = M ⊗R S, while scalar extension of R-linear map f : M → N is given by ρ∗ (f ) = f ⊗ IS : M ⊗R S → N ⊗R S. Scalar extension functor (− ⊗R S) preserves onto linear mappings, it is right-exact (see [1]) and hece it preserves epimorphisms. But notice that neither monomorphisms nor kernels are conserved in general by scalar extensions; for instance take ker[2 : Z → Z] = 0 and observe that ker[2⊗ IZ/2Z : Z ⊗Z Z/2Z → Z ⊗Z Z/2Z] = ker[0 : Z/2Z → Z/2Z] = Z/2Z A R-module (respectively R-algebra) S is flat (respectively flat algebra) if functor (− ⊗R M ) happens to be exact; that is it transforms exact sequences into exact sequences. Examples of R-flat modules are free R-modules and projective R-modules [1],[2], [3] or [8]. Within these conditions one has Theorem 4.1. If S is a flat R-algebra then ρ∗ (ker(f1 | f2 )) = ker(ρ∗ (f1 ) | ρ∗ (f2 )) Proof. Scalar extension functor ρ∗ (−) = − ⊗R S is exact because S is R-flat. Hence exact sequence 0 ι // ker(f1 ) π // ker(f1 , f2 ) // ker(f1 | f2 ) // 0 yields the exact sequence 0 // ker(f1 ) ⊗R S ι⊗IS // ker(f1 , f2 ) ⊗R S π⊗IS // ker(f1 | f2 ) ⊗R S // 0 Once again, since S is R-flat it follows the commutative square 0 // ker(f1 ) ⊗R S 0 // ker(f1 ⊗ IS ) ι⊗IS ι′ // // ker(f1 , f2 ) ⊗R S ker(f1 ⊗ IS , f2 ⊗ IS ) and therefore ρ∗ (ker(f1 |f2 )) = ker(f1 |f2 ) ⊗R S = ker(f1 ⊗ IS | f2 ⊗ IS ) = ker(ρ∗ (f1 ) | ρ∗ (f2 )). 6 Carriegos, DeCastro & Muñoz-Castañeda 5 Product rings Now we deal with the case of R = R1 × · · · × Rt being a finite direct product of rings. In this case each factor ring Ri ∼ = ei R where ei = (0, ..., 0, 1, 0, ..., 0) is the ith structrual ∼ e1 R ⊕ · · · ⊕ et R and therefore each factor Ri ∼ idempotent of product. Hence R1 = = ei R is a flat R-algebra because it is projective due to it is a direct summand of the free R-module R1 . This decomposition can be traslated to kernels of pairs of linear maps: Theorem 5.1. If πi : R1 × · · · × Rt → Ri is the projection onto ith factor, then πi is also structural R-algebra morphism and, for a given pair of R-linear maps fj : Mj → N , j = 1, 2 one has ker(f1 | f2 ) ∼ = t M ker(πi∗ (f1 ) | πi∗ (f2 )) i=1 Proof. The universal property of product yields the natural isomorphism Φ which is unique commutating both triangles in below natural diagram πi∗ -- ker(πi∗ (f1 ) | πi∗ (f2 )) p1 ❞❞❞❞❞❞22 ❞❞❞❞❞❞❞ L Φ ker(f1 | f2 ) ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴// ti=1 ker(πi∗ (f1 ) | πi∗ (f2 )) ❩❩❩❩❩❩p2❩ ❩❩❩❩❩❩,, 11 ker(πj∗ (f1 ) | πj∗ (f2 )) φ∗j Now we conclude with the case of R being a finite product of fields. This case contains modular rings Z/mZ where m is a square-free integer and would be of interest in convolutional coding. Corollary 5.2. Let Ki be a field for each i and consider a ring R = K1 × · · · × Ks . Let A ∈ Rp×q1 and B ∈ Rp×q2 be matrices. Then ker(A | B) = e1 · ker(π1 (A) | π1 (B)) + · · · + es · ker(πs (A) | πs (B)) Notice that Theorem 2.4 applies to above case of R beign a finite product of fields, hence one has the following result. Corollary 5.3. Let Ki be a field for each i and consider a ring R = K1 × · · · × Ks . Let A ∈ Rp×q1 and B ∈ Rp×q2 be matrices. Then ker(A | B) = ker(πs (A), πs (B)) ker(π1 (A), π1 (B)) ⊕ ··· ⊕ ker(π1 (A)) ker(πs (A)) 7 Kernel of a pair of linear maps Above results might be explained with an example. Consider the modular integer ring Z/30Z ∼ = Z/2× Z/3Z × Z/5Z, where isomorphism is given by Chinese Remainder Theorem (a, b, c) 7→ unique x such that x = a(mod 2), x = b(mod 3), x = c(mod 5) Thence structural idempotents are given by: Z/2 × Z/3Z × Z/5Z // Z/30 (1, 0, 0) // 15 (0, 1, 0) // 10 (0, 0, 1) // 6 Thus the kernel might be recovered from local data on every factor field by using Corollary 5.2 with above structural idempotents e1 = 15, e2 = 10, and e3 = 6. Note that this result can also be generalized to the case of polynomial matrices which would be useful in the behavioral theory of linear systems and in particular to convolutional codes. Corollary 5.4. Consider matrices A(z), B(z) of adequate sizes, p × q1 and p × q2 respectively, and entries in R[z] where R = R1 × · · · × Rs is a product ring with structural idempotents ei ∈ R. Then trajectories can be computed locally and glued together; that is to say, one has ker(A(z) | B(z)) = {u(z) | ∃x(z) : A(z)x(z) + B(z)u(z) = 0} = = e1 ker(π1 (A)(z) | π1 (B)(z)) + · · · + es ker(πs (A)(z) | πs (B)(z)) Proof. Note that R[z] = (R1 × · · · × Rs )[z] ∼ = R1 [z] × · · · × Rs [z] and thus Ri [z] is a flat R[z]-algebra. It only remains to detect structural morphism, which is a trivial exercise. Then we conclude by using Theorem 5.1 To conclude note that if K is a field then K[z] is a principal ideal domain and thus a Dedekind domain and hence hereditary. Thus by applying Theorem 3.1 one has the following factorization result. Corollary 5.5. Consider matrices A(z), B(z) of adequate sizes, p × q1 and p × q2 respectively, and entries in R[z] where R = K1 × · · · × Ks is a product of fields. Then ker((A(z) | B(z)) = ker(π1 (A)(z) | π1 (B)(z)) ker(π1 (A)(z) | π1 (B)(z)) ⊕ ··· ⊕ ker(π1 (A)(z)) ker(π1 (A)(z)) 8 Carriegos, DeCastro & Muñoz-Castañeda Notice that the key point in above results is some kind of ”commutativity” between the product of rings and extension from a ring to its ring of polynomials; that is to say,R[z] = (R1 × · · · × Rs )[z] ∼ = R1 [z] × · · · × Rs [z], which assures that Ri [z] is a flat R[z]-algebra. This phenomenon is also true for the extensions to formal power series R 7→ R[[z]]; polynomial ring R[z, z −1 ]; formal power series R[[z, z −1 ]]; Puisseux series; and, if Ri are domains, for extensions to rational fractions R 7→ R(z) and Laurent series R 7→ R((z)). Thus we conjecture that Theorem 5.1 could be extended to these scenarios. To conclude it is worth to note that factorization results à la Corollary 5.2 holds on by assuring that factor rings Ri [z] (or respectively Ri [[z]], ...) are hereditary. References [1] M.F. Atiyah, I.G. McDonald, Introduction to Commutative Algebra, Addison-Wesley, 1969. [2] H. Bass, Algebraic K-theory, Benjamin, 1968. [3] N. Bourbaki. Éléments de Mathématique, Algébre Conmutative, ch. 1 à 4, Masson, 1985. [4] M.V. Carriegos, J.A. Hermida-Alonso, T. Sánchez-Giralda, The pointwise feedback relation for linear dynamical systems over commutative rings, Lin. Algebra App. 279 (1998) 119–134. [5] N. DeCastro, Clasificación Feedback de Sistemas y Códigos de Convolución. Aplicaciones en Cibernética, Teorı́a de Códigos y Criptografı́a, Ph.D. Thesis, Universidad de León, 2016. [6] M. Kuijper, R. Pinto, J.W. Polderman, Kernel representations for behaviors over finite rings, Proceedings of the 17th International Symposium on Mathematical Theory of Networks and Systems, 2006, pp. 2494–2503. [7] J. Rosenthal, On behaviors and convolutional codes, IEEE Transactions on Inform. Theory 42(6), (1996), 1881–1891. [8] C.A. Weibel, The K-book, an introduction to Algebraic K-theory, β-edition (2013/02/23), http://www.math.rutgers.edu/∼weibel/Kbook/Kbook.pdf [9] J.C. Willems, Paradigms and puzzles in the theory of dynamical systems, IEEE Transactions on Automatic Control 36(3) (1991), 259–294. [10] E. Zerz, Behavioral systems theory: a survey, Int. J. Appl. Math. Comput. Sci. 18(3), (2008), 265–270.
0math.AC
Fixed-Parameter Algorithms for DAG PartitioningI René van Beverna,b,∗, Robert Bredereckb , Morgan Chopinc , Sepp Hartungb , Falk Hüffnerb , André Nichterleinb , Ondřej Suchýd,b a Novosibirsk State University, Novosibirsk, Russian Federation für Softwaretechnik und Theoretische Informatik, TU Berlin, Germany c Institut für Optimierung und Operations Research, Universität Ulm, Germany d Faculty of Information Technology, Czech Technical University in Prague, Czech Republic arXiv:1611.08809v1 [cs.DS] 27 Nov 2016 b Institut Abstract Finding the origin of short phrases propagating through the web has been formalized by Leskovec et al. [ACM SIGKDD 2009] as DAG PARTITIONING: given an arc-weighted directed acyclic graph on n vertices and m arcs, delete arcs with total weight at most k such that each resulting weakly-connected component contains exactly one sink—a vertex without outgoing arcs. DAG PARTITIONING is NP-hard. We show an algorithm to solve DAG PARTITIONING in O(2k · (n + m)) time, that is, in linear time for fixed k. We complement it with linear-time executable data reduction rules. Our experiments show that, in combination, they can optimally solve DAG PARTITIONING on simulated citation networks within five minutes for k ≤ 190 and m being 107 and larger. We use our obtained optimal solutions to evaluate the solution quality of Leskovec et al.’s heuristic. We show that Leskovec et al.’s heuristic works optimally on trees and generalize this result by showing that DAG 2 PARTITIONING is solvable in 2O(t ) · n time if a width-t tree decomposition of the input graph is given. Thus, we improve an algorithm and answer an open question of Alamdari and Mehrabian [WAW 2012]. We complement our algorithms by lower bounds on the running time of exact algorithms and on the effectivity of data reduction. Keywords: NP-hard problem, graph algorithms, polynomial-time data reduction, multiway cut, linear-time algorithms, algorithm engineering, evaluating heuristics 1. Introduction The DAG PARTITIONING problem was introduced by Leskovec et al. [26] in order to analyze how short, distinctive phrases (typically, parts or mutations of quotations, also called memes) spread to various news sites and blogs. To demonstrate their approach, Leskovec et al. [26] collected and analyzed phrases from 90 million articles from the time around the United States presidential elections in 2008; the results were featured in the New York Times [27]. Meanwhile, their approach has grown up into N IFTY, a system that allows near real-time observation of the rise and fall of trends, ideas, and topics in the internet [33]. A core component in the approach of Leskovec et al. [26] is a heuristic to solve the NP-hard DAG PARTITIONING problem. They use it to cluster short phrases, which may undergo modifications while propagating through the web, with respect to their origins. To this end, they create an arc-weighted directed acyclic graph with phrases as vertices and draw an arc from phrase p to phrase q if p presumably originates from q, where the weight of an arc represents the I A preliminary version of this article appeared in the Proceedings of the 8th International Conference on Algorithms and Complexity (CIAC’13) [5]. Besides providing full proof details, this revised and extended version improves our O(2k · n2 )-time algorithm to run in O(2k · (n + m)) time and provides linear-time executable data reduction rules. Moreover, we experimentally evaluated the algorithm and compared it to known heuristics by Leskovec et al. [26]. We prove the latter to work optimally on trees. ∗ Corresponding author. Email addresses: [email protected] (René van Bevern), [email protected] (Robert Bredereck), [email protected] (André Nichterlein), [email protected] (Ondřej Suchý) support for this hypothesis: the weight assigned to an arc (p, q) is chosen inversely proportional to the time difference between p and q and their Levenshtein distance when using words as tokens, whereas it is proportional to the total number of documents in the corpus that contain the phrase q.1 A vertex without outgoing arcs is called a sink and can be interpreted as the origin of a phrase. If a phrase has directed paths to more than one sink, its ultimate origin is ambiguous and, in the model of Leskovec et al. [26], at least one of the “p originates from q” hypotheses is wrong. Leskovec et al. [26] introduced DAG PARTITIONING with the aim to resolve these inconsistencies by removing a set of arcs (hypotheses) with least support: DAG PARTITIONING Input: A directed acyclic graph G = (V, A) with positive integer arc weights ω : A → N and a positive integer k ∈ N. Question: Is there a set S ⊆ A with ∑a∈S ω(a) ≤ k such that each weakly-connected component in G0 = (V, A \ S) has exactly one sink? Herein, the model of Leskovec et al. [26] exploits that a weakly-connected component of a directed acyclic graph contains exactly one sink if and only if all its vertices have directed paths to only one sink. We call a set S ⊆ A such that each weakly-connected component in G0 = (V, A \ S) has exactly one sink a partitioning set. Leskovec et al. [26] showed that DAG PARTITIONING is NP-hard and presented a heuristic to find partitioning sets of small weight. Alamdari and Mehrabian [1] showed that, for fixed ε > 0, even approximating the minimum weight of a partitioning set within a factor of O(n1−ε ) is NP-hard. In the absence of approximation algorithms, exact solutions to DAG PARTITIONING become interesting for the reason of evaluating the quality of known heuristics alone. We aim for solving DAG PARTITIONING exactly using fixed-parameter algorithms—a framework to obtain algorithms to optimally solve NP-hard problems that run efficiently given that certain parameters of the input data are small [15, 28, 12]. A natural parameter to consider is the minimum weight k of the partitioning set sought, since one would expect that wrong hypotheses have little support. Known results. To date, there are only few studies on DAG PARTITIONING. Leskovec et al. [26] showed that DAG PARTITIONING is NP-hard and present heuristics. Alamdari and Mehrabian [1] showed that, on n-vertex graphs, DAG PARTITIONING is hard to approximate in the sense that if P , NP, then there is no polynomial-time factor-(n1−ε ) approximation algorithm for any fixed ε > 0, even if the input graph has unit-weight arcs, maximum outdegree three, 2 and only two sinks. Moreover, Alamdari and Mehrabian [1] showed that DAG PARTITIONING can be solved in 2O(t ) · n time if a width-t path decomposition of the input graph is given. DAG PARTITIONING is very similar to the well-known NP-hard M ULTIWAY C UT problem [11]: given an undirected edge-weighted graph and a subset of the vertices called terminals, delete edges of total weight at most k such that each terminal is separated from all others. DAG PARTITIONING can be considered as M ULTIWAY C UT with the sinks being terminals and the additional constraint that not all arcs outgoing from a vertex may be deleted, since this would create a new sink. Xiao [34] gave an algorithm to solve M ULTIWAY C UT in O(2k · min(n2/3 , m1/2 ) · nm) time. Interestingly, in contrast to DAG PARTITIONING, M ULTIWAY C UT is constant-factor approximable (see, e. g., Karger et al. [23]). Our results. We provide algorithmic as well as intractability results. On the algorithmic side, we present an O(2k · (n + m)) time algorithm for DAG PARTITIONING and complement it with linear-time executable data reduction rules. We experimentally evaluated both and, in combination, they solved instances with k ≤ 190 optimally within five minutes, the number of input arcs being 107 and larger. Moreover, we use the optimal solutions found by our algorithm to evaluate the quality of Leskovec et al. [26]’s heuristic and find that it finds optimal solutions for most instances that our algorithm solves quickly, but performs worse by a factor of more than two on other instances. 2 Also, we give an algorithm that solves DAG PARTITIONING in 2O(t ) · n time if a width-t tree decomposition of the input graph is given. We thus answer an open question by Alamdari and Mehrabian [1]. Since every width-t path decomposition is a width-t tree decomposition but not every graph allowing for a width-t tree decomposition allows 2 for a width-t path decomposition, our algorithm is an improvement over the 2O(t ) · n-time algorithm of Alamdari and Mehrabian [1], which requires a path decomposition as input. 1 Unfortunately, Leskovec et al. [26] neither give a more precise description nor the range of their weights. All our hardness results even hold for unit weights, while all our algorithms work whenever the weight of each arc is at least one; however, we choose the weights to be positive integers to avoid representation issues. 2 On the side of intractability results, we strengthen the NP-hardness results of Leskovec et al. [26] and Alamdari and Mehrabian [1] to graphs of diameter two and maximum degree three and we show that our O(2k ·(n+m)) time algorithm cannot be improved to O(2o(k) · poly(n)) time unless the Exponential Time Hypothesis fails. Moreover, we show that DAG PARTITIONING does not admit polynomial-size problem kernels with respect to k unless NP ⊆ coNP/poly. Organization of this paper. In Section 2, we introduce necessary notation and two basic structural observations for DAG PARTITIONING that are important in our proofs. In Section 3, we present our O(2k · (n + m)) time algorithm and its experimental evaluation. With the help of the optimal solutions computed by our algorithm we also evaluate the quality of a heuristic presented by Leskovec et al. [26]. Moreover, we discuss the limits of parameterized algorithms and problem kernelization for DAG PARTITIONING parameterized by k. 2 Section 4 presents our 2O(t ) · n time algorithm. It follows that DAG PARTITIONING is linear-time solvable when at least one of the parameters k or t is fixed. We further show that the heuristic presented by Leskovec et al. [26] works optimally on trees. Section 5 then shows that other parameters are not as helpful in solving DAG PARTITIONING: DAG PARTITIONING remains NP-hard even when graph parameters like the diameter or maximum degree are constants. 2. Preliminaries and basic observations We consider finite simple directed graphs G = (V, A) with vertex set V (G) := V and arc set A(G) := A ⊆ V ×V , as well as finite simple undirected graphs G = (V, E) with vertex set V and edge set E(G) := E ⊆ {{u, v} | u, v ∈ V }. For a directed graph G, the underlying undirected graph G0 is the graph that has undirected edges in the places where G has arcs, that is, G0 = (V (G), {{v, w} : (v, w) ∈ A(G)}). We will use n to denote the number of vertices and m to denote the number of arcs or edges of a graph. For a (directed or undirected) graph G, we denote by G \ A0 the subgraph obtained by removing from G the arcs or edges in A0 and by G −V 0 the subgraph obtained by removing from G the vertices in V 0 . For V 0 ⊆ V , we denote by G[V 0 ] := G − (V \V 0 ) the subgraph of G induced by the vertex set V 0 . The set of out-neighbors and in-neighbors of a vertex v in a directed graph is N + (v) := {u | (v, u) ∈ A} and N − (v) := {u | (u, v) ∈ A}, respectively. The outdegree, the indegree, and the degree of a vertex v ∈ V are d + (v) := |N + (v)|, d − (v) := |N − (v)|, and d(v) := d + (v) + d − (v), respectively. A vertex v is a sink if d + (v) = 0; it is isolated if d(v) = 0. A path of length ` − 1 from v1 to v` in an undirected graph G is a tuple (v1 , . . . , v` ) ∈ V ` such that {vi , vi+1 } is an edge in G for 1 ≤ i ≤ ` − 1. An undirected path in a directed graph is a path in its underlying undirected graph. A directed path of length ` − 1 from v1 to v` in a directed graph G is a tuple (v1 , . . . , v` ) ∈ V ` such that (vi , vi+1 ) is an arc in G for 1 ≤ i ≤ ` − 1. We say that u ∈ V can reach v ∈ V or that v is reachable from u in G if there is a directed path from u to v in G. We say that u and v are connected if there is a (not necessarily directed) path from u to v in G. In particular, u is reachable from u and connected to u. We use connected component as an abbreviation for weakly connected component, that is, a maximal set of pairwise connected vertices. The diameter of G is the maximum length of a shortest path between two different vertices in the underlying undirected graph of G. Fixed-parameter algorithms. The main idea in fixed-parameter algorithms is to accept the super-polynomial running time, which is seemingly inevitable when optimally solving NP-hard problems, but to restrict it to one aspect of the problem, the parameter. More precisely, a problem Π is fixed-parameter tractable (FPT) with respect to a parameter k if there is an algorithm solving any instance of Π with size n in f (k) · poly(n) time for some computable function f [15, 28, 12, 10]. Such an algorithm is called fixed-parameter algorithm. Since Suen et al. [33] point out that the input instances of DAG PARTITIONING can be so large that even running times quadratic in the input size are prohibitively large, we focus on finding algorithms that run in linear time if the parameter k is a constant. An important ingredient of our algorithms is linear-time data reduction, which recently received increased interest since data reduction is potentially applied to large input data [32, 4, 18, 3, 22, 13]. 3 Problem kernelization. One way of deriving fixed-parameter algorithms is (problem) kernelization [17, 7]. As a formal approach of describing efficient data reduction that preserves optimal solutions, problem kernelization is a powerful tool for attacking NP-hard problems. A kernelization algorithm consists of data reduction rules that, applied to any instance x with parameter k, yield an instance x0 with parameter k0 in time polynomial in |x| + k such that (x, k) is a yes-instance if and only if (x0 , k0 ) is a yes-instance, and if both |x0 | and k0 are bounded by some functions g and g0 in k, respectively. The function g is referred to as the size of the problem kernel (x0 , k0 ). Note that it is the parameter that allows us to measure the effectiveness of polynomial-time executable data reduction, since a statement like “the data reduction shrinks the input by a factor α” would imply that we can solve NP-hard problems in polynomial time. From a practical point of view, problem kernelization is potentially applicable to speed up exact and heuristic algorithms to solve a problem. Since kernelization is applied to shrink potentially large input instances, recently the running time of kernelization has stepped into the focus and linear-time kernelization algorithms have been developed for various NP-hard problems [32, 4, 18, 3, 22, 13]. Two basic observations.. The following easy to prove structural observations will be exploited in many proofs of our work. The first observation states that a minimal partitioning set does not introduce new sinks. Observation 1. Let G be a directed acyclic graph and S be a minimal partitioning set for G. Then, a vertex is a sink in G \ S if and only if it is a sink in G. P ROOF. Clearly, deleting arcs from a directed acyclic graph cannot turn a sink into a non-sink. Therefore, it remains to show that every sink in G \ S was a sink already in G. Towards a contradiction, assume that there is a vertex s that is a sink in G \ S but not in G. Then, there is an arc (s, v) in G for some vertex v of G. Let Cv and Cs be the connected components in G \ S containing v and s, respectively, and let sv be the sink in Cv . Then, for S0 := S \ {(s, v)}, the connected component Cv ∪Cs in G \ S0 has only one sink, namely sv . Thus, S0 is also a partitioning set for G, but S0 ( S, a contradiction to S being minimal.  The second observation is that each vertex in a directed acyclic graph is connected to exactly one sink if and only if it can reach that sink. Observation 2. Let G be a directed acyclic graph. An arc set S is a partitioning set for G if and only if each vertex in G can reach exactly one sink in G \ S. P ROOF. If S is a partitioning set for G, then, by definition, each connected component of G \ S contains exactly one sink. Therefore, each vertex in G \ S can reach at most one sink. Moreover, since G \ S is a directed acyclic graph and each vertex in a directed acyclic graph can reach at least one sink, it follows that each vertex in G \ S can reach exactly one sink. Now, assume that each vertex in G \ S can reach exactly one sink. We show that each connected component of G \ S contains exactly one sink. For the sake of contradiction, assume that a connected component C of G \ S contains multiple sinks s1 , . . . , st . For i ∈ [t], let Ai be the set of vertices that reach si . These vertex sets are pairwise disjoint and, since every vertex in a directed acyclic graph reaches some sink, they partition the vertex set of C. Since C is a connected component, there are i, j ∈ [t] with i , j and some arc (v, w) in G \ S from some vertex v ∈ Ai to some vertex w ∈ A j . This is a contradiction, since v can reach si as well as s j .  3. Parameter weight of the partitioning set sought This section investigates the influence of the parameter “weight k of the partitioning set sought” on DAG PAR First, in Section 3.1, we present an O(2k · (n + m))-time algorithm and design linear-time executable data reduction rules. In Section 3.2, we experimentally evaluate the algorithm and data reduction rules and—with the help of the optimal solutions computed by our algorithm—we also evaluate the quality of a heuristic presented by Leskovec et al. [26]. In Section 3.3, we investigate the question whether the provided data reduction rules might have a provable shrinking effect on the input instance in form of a polynomial-size problem kernel. We will see that, despite the fact that data reduction rules work very effectively in experiments, polynomial-size problem kernels for DAG PARTITIONING do not exist under reasonable complexity-theoretic assumptions. Moreover, Section 3.3 will also show that the algorithm presented in Section 3.1 is essentially optimal. TITIONING . 4 Algorithm 1: Compute a partitioning set of weight at most k. Input: A directed acyclic graph G = (V, A) with arc weights ω and a positive integer k. Output: A partitioning set S of weight at most k if it exists; otherwise ‘no’. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 (v1 , v2 , . . . , vn ) ← reverse topological order of the vertices of G L ← array with n entries searchtree(1, 0) / // start with vertex v1 and S = 0/ output ‘no’ // there is no partitioning set of weight at most k Procedure searchtree(i, S) // vertex counter i; (partial) partitioning set S while vi is a sink s or there is a sink s such that ∀w ∈ N + (vi ) : L[w] = s do L[vi ] ← s // associate vi with sink s i ← i+1 // continue with next vertex if i > n then if ω(S) ≤ k then output S // all vertices have been handled, S is a partitioning set // a partitioning set of weight at most k has been found else D ← {L[w] | w ∈ N + (vi )} // the set of feasible sinks for vi if |D| − 1 ≤ k − ω(S) then // check whether we are allowed to delete |D| − 1 arcs foreach s ∈ D do // try to associate vi to each feasible sink s L[vi ] ← s S0 ← S ∪ {(vi , w) | w ∈ N + (vi ) and L[w] , s} searchtree(i + 1, S0 ) 3.1. Constant-weight partitioning sets in linear time We now present an algorithm to compute partitioning sets of weight k in O(2k · (n + m)) time. Interestingly, although both problems are NP-hard, it will turn out that DAG PARTITIONING is substantially easier to solve exactly than the closely related M ULTIWAY C UT problem, for which a sophisticated algorithm running in O(2k min(n2/3 , m1/2 )nm) time was given by Xiao [34]. This is in contrast to M ULTIWAY C UT being constant-factor approximable [23], while DAG PARTITIONING is inapproximable unless P = NP [1]. The main structural advantage of DAG PARTITIONING over M ULTIWAY C UT is the alternative characterization of partitioning sets given in Observation 2: we only have to decide which sink each vertex v will reach in the optimally partitioned graph. To this end, we first decide the question for all out-neighbors of v. This natural processing order allows us to solve DAG PARTITIONING by the simple search tree algorithm shown in Algorithm 1, which we explain in the proof of the following theorem. Theorem 1. Algorithm 1 solves DAG PARTITIONING in O(2k · (n + m)) time. P ROOF. Algorithm 1 is based on recursive branching and computes a partitioning set S of weight at most k for a directed acyclic graph G = (V, A). It exploits the following structural properties of a minimal partitioning set S: by Observation 2, a vertex v is connected to a sink s in G \ S if and only if it can reach that sink s in G \ S. Thus, consider a vertex v of G and assume that we know, for each out-neighbor w of v in G, the sink s that w can reach in G \ S. We call a sink s of G feasible for v if an out-neighbor of v in G can reach s in G \ S. Let D be the set of feasible sinks for v. Since v may be connected to only one sink in G \ S, at least |D| − 1 arcs outgoing from v are deleted by S. However, S does not disconnect v from all sinks in D, since then S would delete all arcs outgoing from v, contradicting Observation 1. Hence, exactly one sink s ∈ D must be reachable by v in G \ S. For each such sink s ∈ D, the partitioning set S has to delete at least |D| − 1 arcs outgoing from v. We simply try out all these possibilities, which gives rise to the following search tree algorithm. Algorithm 1 starts with S = 0/ and processes the vertices of G in reverse topological order, that is, each vertex is processed by procedure ”searchtree” after its out-neighbors. The procedure exploits the invariant that, when processing 5 a vertex v, each out-neighbor w of v has already been associated with the sink s that it reaches in G \ S (in terms of Algorithm 1, L[w] = s). It then tries all possibilities of associating v with a feasible sink and augmenting S accordingly, so that the invariant also holds for the vertex processed after v. Specifically, if v is a sink, then line 7 associates v with itself. If all out-neighbors of v are associated with the same sink s, then line 7 associates v with s. Otherwise, line 12 computes the set D of feasible sinks for v. In lines 14–17, the algorithm branches into all possibilities of associating v with one of the |D| feasible sinks s ∈ D (by way of setting L[v] ← s in line 15) and augmenting S so that v only reaches s in G \ S. That is, in each of the |D| branches, it adds to S the arcs outgoing from v to the out-neighbors of v that are associated with sinks different from s (the weight of S increases by at least |D| − 1). Then, line 17 continues with the next vertex in the reverse topological order. After processing the last vertex, each vertex of G \ S can reach exactly one sink, that is, S is a partitioning set. If a branch finds a partitioning set with weight at most k, line 10 outputs it. We analyze the running time of this algorithm. To this end, we first bound the total number of times that procedure “searchtree” is called. To this end, we first analyze the number of terminal calls, that is, calls that do not recursively call the procedure. Let T (α) denote the maximum possible number of terminal calls caused by the procedure “searchtree” when called with a set S satisfying ω(S) ≥ α, including itself if it is a terminal call. Note that procedure “searchtree” calls itself only in line 17, that is, for each sink s of some set D of feasible sinks with 1 ≤ |D| − 1 ≤ k − α, it calls itself with a set S0 of weight at least α + |D| − 1. Thus, we have T (α) ≤ |D| · T (α + |D| − 1). We now inductively show that T (α) ≤ 2k−α for 0 ≤ α ≤ k. Then, it follows that there is a total number of T (0) ≤ 2k terminal calls. For the induction base case, observe that T (k) = 1, since, if procedure “searchtree” is called with a set S 0 of weight at least k, then any recursive call is prevented by the check in line 13. Now, assume that T (α 0 ) ≤ 2k−α holds for all α 0 with α ≤ α 0 ≤ k. We show T (α − 1) ≤ 2k−(α−1) by exploiting 2 ≤ |D| ≤ 2|D|−1 as follows: T (α − 1) ≤ |D| · T (α − 1 + |D| − 1) ≤ |D| · 2k−(α−1)−(|D|−1) ≤ |D| · 2k−(α−1) ≤ 2k−(α−1) . 2|D|−1 It follows that there are at most T (0) = 2k terminal calls to procedure “searchtree”. In order to bound the total number of calls to procedure “searchtree”, observe the following: if each inner node of a tree has at least two children, then the number of inner nodes in a tree is at most its number of leaves. Now, since procedure “searchtree” calls itself only in line 17, that is, for each sink s of some set D of feasible sinks with 1 ≤ |D| − 1 ≤ k − α, each non-terminal call causes at least two new calls. Thus, since there are O(2k ) terminal calls, there are also O(2k ) non-terminal calls. It follows that there are O(2k ) total calls of procedure “searchtree”. For each such call, we iterate, in the worst case, over all out-neighbors of all vertices in the graph in lines 6–12, which works in O(n + m) time. Moreover, for each call of procedure “searchtree”, we compute a set S0 in line 16 in O(n + m) time. Hence, a total amount of O(2k · (n + m)) time is spent in procedure “searchtree”. Initially, Algorithm 1 uses O(n + m) time to compute a reverse topological ordering [9, Section 22.4].  The experimental results in Section 3.2 will show that Algorithm 1 alone cannot solve even moderately large instances. Therefore, we complement it by linear-time executable data reduction rules that will allow for a significant speedup. The following data reduction rule is illustrated in Figure 1. Reduction Rule 1. If there is an arc (v, w) such that w can reach exactly one sink s , w and v can reach multiple sinks, then • if there is no arc (v, s), then add it with weight ω(v, w), • otherwise, increase ω(v, s) by ω(v, w), and delete the arc (v, w). Note that, in the formulation of the data reduction rule, both v and w may be connected to an arbitrary number of sinks by an undirected path. However, we require that w can reach exactly one sink and that v can reach multiple sinks, that is, using a directed path. 6 v v w 2 s1 s2 s1 s2 Figure 1: The left side shows an input graph with unit weights to which Reduction Rule 1 is applicable. The right side shows the same graph to which Reduction Rule 1 has been applied as often as possible. Since v can reach multiple sinks and its out-neighbors each can reach only one sink, its arcs got redirected. Unlabeled arcs have weight one. Lemma 1. Let (G, ω, k) be a DAG PARTITIONING instance and consider the graph G0 with weights ω 0 output by Reduction Rule 1 applied to an arc (v, w) of G. Then (G, ω, k) is a yes-instance if and only if (G0 , ω 0 , k) is a yes-instance. P ROOF. First, assume that (G, ω, k) is a yes-instance and that S is a minimal partitioning set of weight at most k for G. We show how to transform S into a partitioning set of equal weight for G0 . We distinguish two cases: either S disconnects v from s or not, where s is the only sink that w can reach. Case 1) Assume that S disconnects v from s. Note that every subgraph of a directed acyclic graph is again a directed acyclic graph and that every vertex in a directed acyclic graph is not only connected to, but also can reach some sink. Hence, by Observation 1, S cannot disconnect w from s, since w can only reach s in G and would have to reach some other, that is, new sink in G \ S. It follows that S contains the arc (v, w). Now, however, S0 := (S \ {v, w}) ∪ {(v, s)} is a partitioning set for G0 , since G \ S = G0 \ S0 . Moreover, since ω 0 (v, s) = ω(v, s) + ω(v, w), we have ω 0 (S0 ) = ω(S), where we, for convenience, declare ω(v, s) = 0 if there is no arc (v, s) in G. Case 2) Assume that S does not disconnect v from s and, for the sake of a contradiction, that S is not a partitioning set for G0 . Observe that S contains neither (v, w) nor (v, s), because it is a minimal partitioning set and does not disconnect v from s. Therefore, G0 \ S differs from G \ S only in the fact that G0 \ S does not have the arc (v, w) but an arc (v, s) that was possibly not present in G \ S. Hence, since S is a partitioning set for G but not for G0 , two sinks are connected to each other in G0 \ S via an undirected path using the arc (v, s). Thus, one of the two sinks is s and the undirected path consists of (v, s) and a subpath p between v and some sink s0 . Then, however, s is connected to s0 also in G \ S via an undirected path between s and w (S cannot disconnect s from w by Observation 1), the arc (v, w) and the undirected path p from v to s0 . This contradicts S being a partitioning set for G. We conclude that S is a partitioning set for G0 . Moreover, since S contains neither (v, w) nor (v, s), one has ω(S) = ω 0 (S). Now, assume that (G0 , ω 0 , k) is a yes-instance and that S is a minimal partitioning set of weight at most k for G0 . We show how to transform S into a partitioning set of equal weight for G. Again, we distinguish between two cases: either S disconnects v from s or not. Case 1) Assume that S disconnects v from s. Then, (v, s) ∈ S. Now, S0 := S ∪ {(v, w)} is a partitioning set for G, since G \ S0 = G0 \ S. Moreover, since ω 0 (v, s) = ω(v, s) + ω(v, w), we have ω(S0 ) = ω 0 (S), where we assume that ω(v, s) = 0 if there is no arc (v, s) in G. Case 2) Assume that S does not disconnect v from s and, for the sake of a contradiction, assume that S is not a partitioning set for G. Then, since S is minimal, S does not contain (v, s). Now, observe that G \ S and G0 \ S differ only in the fact that G \ S has an additional arc (v, w) and that, possibly, (v, s) is missing. Hence, since S is a partitioning set for G0 but not for G, there is an undirected path between two sinks in G \ S through (v, w). Because S by Observation 1 cannot disconnect w from s, one of these sinks is s and the undirected path consists of a subpath between s and w, the arc (v, w), and a subpath p between v and a sink s0 . Then, however, s and s0 are also connected in G0 \ S via the arc (v, s) and the subpath p between v and s0 . This contradicts S being a partitioning set for G0 . Finally, since S does not contain (v, s), one has ω(S) = ω 0 (S).  7 v v 2 2 s1 s2 s1 s2 Figure 2: On the left side, a graph that cannot be reduced by Reduction Rule 1 is shown. The gray background highlights the non-sink vertices that can only reach the sink s1 . The right side shows the same graph to which Reduction Rule 2 has been applied as often as possible. Unlabeled arcs have weight one. After applying Reduction Rule 1 exhaustively, that is, as often as it is applicable, we apply a second data reduction rule, which is illustrated in Figure 2. Reduction Rule 2. If, for some sink s, the set L of non-sink vertices that can reach only s is nonempty, then delete all vertices in L. Lemma 2. Let G be a graph that is exhaustively reduced with respect to Reduction Rule 1 and G0 := G − L be the graph output by Reduction Rule 2 when applied to G for some sink s. Then, any partitioning set for G is a partitioning set of equal weight for G0 and vice versa. P ROOF. In order to prove the lemma, we first make three structural observations about the set L. i) There is no arc (v, w) from a vertex v < L to a vertex w ∈ L in G: for the sake of a contradiction, assume that such an arc exists. Then, since v < L and v is obviously not a sink, v can reach a sink s0 , s. It follows that v can reach two sinks: s via w and s0 . This contradicts the assumption that Reduction Rule 1 is not applicable. ii) There is no arc (v, w) from a vertex v ∈ L to a vertex w < L with w , s in G: for the sake of a contradiction, assume that such an arc exists. Then, since w < L and w , s, it follows that w can reach a sink s0 different from s. Then, also v can reach two sinks: s0 via w and s. This contradicts v ∈ L. iii) A minimal partitioning set S for G does not contain any arc between vertices in L ∪ {s}: this is because, by Observation 1, no minimal partitioning set S can disconnect any vertex v ∈ L from s, since otherwise v would reach another, that is, new sink in G \ S. Now, let S be a minimal partitioning set for G. Then, S is also a partitioning set for G0 , since G0 \ S = (G \ S) − L and deleting L from G \ S cannot create new sinks. In the opposite direction, let S be a partitioning set for G0 . Then, S is also a partitioning set for G, since G \ S is just 0 G \ S with the vertices in L and their arcs added. These, however, can reach only the sink s and are only connected to vertices to which s is connected. Hence, they do not create new sinks or connect distinct components of G0 \ S.  We now show how to exhaustively apply both data reduction rules in linear time. To this end, we apply Algorithm 2: in lines 1–4, it computes an array L such that, for each vertex v ∈ V , we have L[v] = {s} if v reaches exactly one sink s and L[v] = 0/ otherwise. It uses this information to apply Reduction Rule 1 in lines 6–10 and Reduction Rule 2 in lines 11 and 12. Lemma 3. Given a directed acyclic graph G with weights ω, in O(n + m) time Algorithm 2 produces a directed acyclic graph G0 with weights ω 0 such that G0 is exhaustively reduced with respect to Reduction Rule 1 and Reduction Rule 2. In particular, (G, ω, k) is a yes-instance if and only if (G0 , ω 0 , k) is a yes-instance. 8 Algorithm 2: Apply Reduction Rules 1 and 2 exhaustively. Input: A directed acyclic graph G = (V, A) with arc weights ω. Output: The result of exhaustively applying Reduction Rules 1 and 2 to G. 1 S ← sinks of G 2 L ← array with n entries 3 foreach v ∈ S do L[v] ← {v} // L[v] = {s} for any sink s ∈ V will mean that v only reaches the sink s. 4 foreach v ∈ V \ S in reverse topological order do \ 5 L[v] ← L[u] // Invariant: the intersection contains at most one sink. u∈N + (v) foreach v ∈ V with L[v] = 0/ do foreach w ∈ N + (v) with L[w] = {s} for some s ∈ S and w < S do if (v, s) < A then add (v, s) with ω(v, s) := 0 to A ω(v, s) ← ω(v, s) + ω(v, w) delete arc (v, w) // Application of Reduction Rule 1 foreach v ∈ V \ S such that L[v] = {s} for some s ∈ S do delete vertex v // Application of Reduction Rule 2 12 13 return (G, ω) 6 7 8 9 10 11 P ROOF. We first discuss the semantics of Algorithm 2, then its running time. After line 5, L[v] = {s} for some vertex v if v can reach exactly one sink s and L[v] = 0/ otherwise: this is, by definition, true for all L[v] with v ∈ S. For v ∈ V \ S it also holds, since v can reach exactly one sink s if and only if all of its out-neighbors u ∈ N + (v) can reach s and no other sinks, that is, if and only if L[u] = {s} for all out-neighbors u ∈ N + (v) of v. Hence, the loop in lines 6–10 applies Reduction Rule 1 to all arcs to which Reduction Rule 1 is applicable. Moreover, Reduction Rule 1 does not change which sinks are reachable from any vertex and, hence, cannot create new arcs to which Reduction Rule 1 may be applied. Hence, when reaching line 11, the graph will be exhaustively reduced with respect to Reduction Rule 1 and we do not have to update the array L. The loop in lines 11 and 12 now applies Reduction Rule 2, which is allowed, since the graph is exhaustively reduced with respect to Reduction Rule 1. Moreover, an application of Reduction Rule 2 cannot create new vertices to which Reduction Rule 2 may become applicable or arcs to which Reduction Rule 1 may become applicable. Hence, line 13 indeed returns a graph that is exhaustively reduced with respect to both data reduction rules. It remains to analyze the running time. Obviously, lines 1–3 of Algorithm 2 work in O(n) time. To execute line 4 in O(n + m) time, we iterate over the vertices in V \ S in reverse topological order, which can be computed in O(n + m) time [9, Section 22.4]. Hence, when computing L[v] for some vertex in line 4, we already know the values L[u] for all u ∈ N + (v). Moreover, L[v] is the intersection of sets with at most one element and, therefore, also contains at most one element. It follows that we can compute L[v] in O(|N + (v)|) time for each vertex v ∈ V \ S and, therefore, in O(n + m) total time for all vertices. The rest of the algorithm only iterates once over all arcs and vertices. Hence, to show that it works in O(n + m) time, it remains to show how to execute lines 8 and 9 in constant time. Herein, the main difficulty is that an adjacency list cannot answer queries of the form “(v, s) ∈ A?” in constant time. However, since we earlier required to iterate over all out-neighbors of a vertex v in O(|N + (v)|) time, we cannot just use an adjacency matrix instead. We exploit a different trick, which, for the sake of clarity is not made explicit in the pseudo code: assume that, when considering a vertex v ∈ V in line 6, we have an n-element array A such that A[s] holds a pointer to the value ω(v, s) if (v, s) ∈ A and A[s] = ⊥ otherwise. Then, we could in constant time check in line 8 whether A[s] = ⊥ to find out whether (v, s) ∈ A and, if this is the case, get a pointer to (and increment) the weight ω(v, s) in constant time in line 9. However, we cannot afford initializing an n-entry array A for each vertex v ∈ V and we cannot make assumptions on the value of uninitialized entries. Luckily, we access A[s] only if there is a vertex w ∈ N + (v) with L[w] = {s} for some s. Hence, we can create an n-entry array A once in the beginning of the algorithm and then, between lines 6 and 7, set up A for v ∈ V as follows: for each w ∈ N + (v) with L[w] = {s}, set Av [s] := ⊥. Then, for each s ∈ N + (v) with s ∈ S, let Av [s] point to ω(v, s).  9 Lemma 3 shows that we can exhaustively apply the two Reduction Rules 1 and 2 in linear time using Algorithm 2. A natural approach for evaluating the quality of our preprocessing would be to provide a performance guarantee in terms of small problem kernels. Unfortunately, in Section 3.3 we show that, under widely accepted complexity-theoretic assumptions, there is no problem kernel with size polynomial in k for DAG PARTITIONING. Nevertheless, the next section shows that our data reduction technique performs remarkably well in empirical tests. Furthermore, we show that the running time of Algorithm 1 is significantly improved when it is applied after Algorithm 2. We achieve the largest speedup of Algorithm 1 by interleaving the application of Algorithm 2 and the branching; a technique that generally works well for search tree algorithms [30]. 3.2. Experimental evaluation In this section, we aim for giving a proof of concept of our O(2k · (n + m)) time search tree algorithm presented in Section 3.1 by demonstrating to which extent instances of DAG PARTITIONING are solvable within a time frame of five minutes. Moreover, using the optimal solutions found by our algorithm, we evaluate the quality of a heuristic presented by Leskovec et al. [26], which can be considered a variant of our search tree algorithm (Algorithm 1): The difference is that, while our search tree algorithm branches into all possibilities of putting a vertex into a connected component with some sink, the heuristic just puts each vertex into the connected component with the sink it would be most expensive to disconnect from. This is the strategy described by Leskovec et al. [26] as yielding the best results and is in more detail described by Suen et al. [33]. The pseudocode of the heuristics (Algorithm 3) can be found in Section 4.1, where we prove that the heuristic works optimally on trees. Implementation details. We implemented the search tree algorithm as well as the heuristic in three variants: 1. without data reduction, 2. with initially applying the data reduction algorithm presented in Algorithm 2, and 3. with interleaving the data reduction using Algorithm 2 with the branching of Algorithm 1. The source code uses about 1000 lines of C++ and is freely available.2 The experiments were run on a computer with a 3.6 GHz Intel Xeon processor and 64 GiB RAM under Linux 3.2.0, where the source code has been compiled using the GNU C++ compiler version 4.7.2 and using the highest optimization level (-O3). Data. We tried to apply our algorithm to the data set described by Leskovec et al. [26]; unfortunately, its optimum partitioning sets have too large weight to be found by our algorithm.3 In order to prove the feasibility of solving large instances with small minimum partitioning sets, we generated artificial instances. Herein, however, we stick to the clustering motivation of DAG PARTITIONING and test our algorithm using simulated citation networks: vertices in a graph represent articles and if an article v cites an article w, there is an arc (v, w). Herein, we consider only directed acyclic graphs, which model that an article only cites older articles. A partitioning of such a network into connected components of which each contains only one sink can be interpreted as a clustering into different topics of which we want to identify the origins. To simulate citation networks, we employ preferential attachment graphs—a random graph model commonly used to model citations between articles [31, 2, 21]. Preferential attachment graphs model the natural growth of citation networks, in which new articles are published over time and with high probability cite the already highly-cited articles. Indeed, Jeong et al. [21] empirically verified that in this preferential attachment model, the probability of an article being cited is linear in the number of times the article has been cited in the past. To create a preferential attachment graph, we first choose two parameters: the number c of sinks to create and the maximum outdegree d of each vertex. After creating c sinks, n new vertices are introduced one after another. After introducing a vertex, we add to it d outgoing unit-weight arcs: for each of these d outgoing arcs, the target is chosen independently at random among previously introduced vertices such that each vertex is chosen as the target with a 2 http://fpt.akt.tu-berlin.de/dagpart/ 3 The exact weights of the optimum partitioning sets remain unknown, since our algorithm could not compute them within several hours. 10 interleaved data reduction initial data reduction no data reduction 400 running time [s] running time [s] 6 4 2 0 160 300 200 100 0 170 180 190 200 weight k of optimal partitioning set 160 170 180 190 200 weight k of optimal partitioning set Figure 3: Comparisons of the running time of Leskovec et al. [26]’s heuristic (left) with the running time of our search tree algorithm (right). All graphs have 106 vertices and roughly 18 · 106 arcs and were generated by adding k random arcs between ten connected components, each being a preferential attachment graph on 105 vertices with outdegree twenty and a single sink. The heuristic solved all 40 instances optimally. On the right hand side, no instance was solved in less than an hour without data reduction. probability proportional to its indegree plus one. We do not add an outgoing arc twice, which might result in a vertex having less than d outgoing arcs if the target nodes of two arcs to be added coincide. We compared our algorithm to the heuristic of Leskovec et al. [26] on these graphs, but our algorithm could solve only instances with up to 300 arcs optimally, since the optimum solution weight grows too quickly in the sizes of the generated graphs. To show the running time behavior of our algorithm on larger graphs with small solution sizes, we employ an additional approach: we generate multiple connected components, each being a preferential attachment graph with one sink, and randomly add k additional arcs between these connected components in a way so that the graph remains acyclic. Then, obviously, an optimal partitioning set cannot be larger than k. We call the set of k randomly added arcs embedded partitioning set and it can be viewed as noise in data that clusters well. Experimental results. Figure 3 compares the running time of the heuristic of Leskovec et al. [26] to the running time of our Algorithm 1 with increasing optimal partitioning set size k. On the left side, it can be seen that using the data reduction from Algorithm 2 slows down the heuristic. This is not surprising, since the heuristic itself is implemented to run in linear time and, hence, instead of first shrinking the input instance by Algorithm 2 in linear time, one might right away solve the instance heuristically. On the right side, one can observe that, as expected, the running time of Algorithm 1 increases exponentially in k. We only show the running time of the implementations with data reduction: without data reduction, we could not solve any instance in less than an hour. We can solve instances with k ≤ 190 optimally within five minutes. This allowed us to verify that the heuristic solved all 40 generated instances optimally, regardless of the type of data reduction applied. Figure 4 compares the running time of the heuristic of Leskovec et al. [26] to the running time of our Algorithm 1 with increasing graph size. While the heuristic shows a linear increase of running time with the graph size (on the left side), such a behavior cannot be observed for the search tree algorithm (on the right side). The reason for this can be seen in Figure 5: the data reduction applied by Algorithm 2 initially shrinks most input instances to about 2000 arcs in less than ten seconds. Thus, what we observe in the right plot of Figure 4 is, to a large extent, the running time of Algorithm 1 for constant k = 190 and roughly constant graph size. Our search tree algorithm allowed us to verify that the heuristic by Leskovec et al. [26] solved all 80 generated instances optimally regardless of the type of data reduction applied. Finally, Figure 6 presents instances that could not be optimally solved by Leskovec et al. [26]’s heuristic. In the left plot, we see that in instances with large embedded partitioning sets of several hundred thousand arcs, the heuristic of Leskovec et al. [26] does not find the embedded partitioning set but an about 5‰ larger one. In all cases, the heuristic 11 interleaved data reduction initial data reduction no data reduction 400 running time [s] running time [s] 30 20 10 300 200 100 0 20 40 60   input arcs 106 0 80 20 40 60   input arcs 106 80 Figure 4: Comparisons of the running time of Leskovec et al. [26]’s heuristic (left) with the running time of our search tree algorithm (right). Without interleaved data reduction, the search tree solved no instance in less than 5 minutes. The graphs were generated by adding k = 190 random arcs between ten connected components, each being a preferential attachment graph with outdegree twenty and a single sink. The heuristic solved all 80 instances optimally. 8 running time [s] output arcs 6,000 4,000 2,000 6 4 2 20 40 60  6 input arcs 10 0 80 20 40 60  6 input arcs 10 80 Figure 5: Effect (left) and running time (right) of initially running Algorithm 2 for data reduction. The graphs were generated by adding k = 190 random arcs between ten connected components, each being a preferential attachment graph with outdegree twenty and a single sink. 12 1.006 2.5 deviation factor deviation factor 3 1.004 2 1.5 1 100 300   weight of embedded partitioning set 103 150 200 250 10 20 15 25 weight k of optimum partitioning set Figure 6: Comparison of partitioning sets found by Leskovec et al. [26]’s heuristic with an embedded partitioning set of size k (left) and an optimal partitioning set (right). All graphs on the left side have 106 vertices and roughly 18 · 106 arcs and were generated by adding k random arcs between ten connected components, each being a preferential attachment graph on 105 vertices with outdegree fifteen and a single sink. All graphs on the right side are preferential attachment graphs with varying number of vertices, two sinks and outdegree three. found the same partitioning sets regardless of the type of data reduction applied. Note that the plot only gives a lower bound on the deviation factor, since there might be even better partitioning sets in the instances than the embedded one; we were unable to compute the optimal partitioning sets in these instances. In the right plot of Figure 6, we used smaller preferential attachment graphs (this time without embedded partitioning sets) and see that Leskovec et al. [26]’s heuristic can be off by more than a factor of two from the optimal partitioning set. Data reduction had no effect on the quality of the partitioning sets found. Summary. We have seen that solving large instances with partitioning sets of small weight is realistic using our algorithm. In particular, instances with more than 107 arcs and k ≤ 190 could be solved in less than five minutes. A crucial ingredient in this success is the data reduction executed by Algorithm 2; without its help, we could not solve any of our instances in less than five minutes. However, we also observed that our algorithm works best on those instances that can already be solved mostly optimally by Leskovec et al. [26]’s heuristic and that the data reduction executed by Algorithm 2 slows down the heuristic. Having seen that the heuristic by Leskovec et al. [26] can be off by more than a factor of two from the optimum on random preferential attachment graphs diminishes the hope that, in spite of the non-approximability results of DAG PARTITIONING by Alamdari and Mehrabian [1], the heuristic of Leskovec et al. [26] might find good approximations on naturally occurring instances. As we see, we do not have to construct adversarial instances to make the heuristic find solutions far from optimal. 3.3. Limits of data reduction and fixed-parameter algorithms In Section 3.1, we have seen linear-time data reduction rules for DAG PARTITIONING. Moreover, the experiments in Section 3.2 have shown that, on all input instancse we tested our algorithm on, the running time of our O(2k · (n + m)) time Algorithm 1 merely depended on k because Algorithm 2 shrunk our random input instances to roughly the same size. Therefore it is natural to ask whether we can provide data reduction rules that provably shrink the size of each possible input instance to some fixed polynomial in k, that is, whether there is a polynomial-size problem kernel for DAG PARTITIONING. Unfortunately, in this section, we give a negative answer to this question. Specifically, we prove that DAG PARTITIONING does not admit problem kernels with size polynomial in k, unless NP ⊆ coNP/poly. Moreover, we show that the running time O(2k · (n + m)) of Algorithm 1 cannot be improved to 2o(k) poly(n), unless the Exponential Time Hypothesis fails. Herein, the Exponential Time Hypothesis as well as NP * coNP/poly are hypotheses stronger than P , NP, but widely accepted among complexity theorists [20, 16]. 13 f t xt1 x1f xt2 x2f x1 x̄1 C1 x2 x̄2 f0 t0 Figure 7: DAG PARTITIONING instance constructed from the formula consisting only of the clause C1 := (x1 ∨ x̄2 ). Heavy arcs are drawn bold; dotted arcs are a partitioning set that corresponds to the satisfying assignment setting x1 to true and x2 to false. The variable gadgets are drawn on a gray background. Towards proving these results, we first recall the polynomial-time many-to-one reduction from 3-S AT to DAG PARTITIONING given by Alamdari and Mehrabian [1]. The 3-S AT problem is, given a formula ϕ in conjunctive normal form with at most three literals per clause, to decide whether ϕ admits a satisfying assignment. Construction 1 (Alamdari and Mehrabian [1]). Let ϕ be an instance of 3-S AT with the variables x1 , . . . , xn and the clauses C1 , . . . ,Cm . We construct a DAG PARTITIONING instance (G, ω, k) with k := 4n + 2m that is a yes-instance if and only if ϕ is satisfiable. The weight function ω will assign only two different weights to the arcs: a normal arc has weight one and a heavy arc has weight k + 1 and thus cannot be contained in any partitioning set of weight k. The remainder of this construction is illustrated in Figure 7. We start constructing the directed acyclic graph G by adding the special vertices f , f 0 ,t, and t 0 together with the heavy arcs ( f , f 0 ) and (t,t 0 ). The vertices f 0 and t 0 will be the only sinks in G. For each variable xi , introduce the vertices xti , xif , xi and x̄i together with the heavy arcs (t, xti ) and ( f , xif ) and the normal arcs (xti , xi ), (xti , x̄i ), (xif , xi ), (xif , x̄i ), (xi , f 0 ), (x̄i , f 0 ), (xi ,t 0 ), and (x̄i ,t 0 ). For each clause C j , add a vertex C j together with the heavy arc (t,C j ). Finally, if some clause C j contains the literal xi , then add the arc (C j , xi ); if some clause C j contains the literal x̄i , then add the arc (C j , x̄i ). Alamdari and Mehrabian [1] showed that, given a formula ϕ in 3-C NF with n variables and m clauses, Construction 1 outputs a graph G with arc weights ω such that ϕ is satisfiable if and only if there is a partitioning set S for G that does not contain heavy arcs. Since G has only the two sinks t 0 and f 0 , by Observation 1, a minimal such partitioning set has to partition G into two connected components, one connected component containing the heavy arc (t,t 0 ) and the other containing ( f , f 0 ). Moreover, if ϕ is satisfiable, then such a partitioning set has weight at most 4n + 2m, since for each xi of the n variables of ϕ, it deletes at most one of two arcs outgoing from each of the vertices xti , xif , xi , and x̄i , and for each C j of the m clauses, it deletes at most two out of the three arcs outgoing from the clause vertex C j . We thus obtain the following lemma: Lemma 4. Given a formula ϕ in 3-C NF with n variables and m clauses, Construction 1 outputs a graph G with arc weights ω such that ϕ is satisfiable if and only if there is a partitioning set S for G that does not contain heavy arcs. Moreover, if ϕ is satisfiable, then S has weight at most 4n + 2m and partitions G into one connected component containing the constructed vertices t and t 0 and the other containing f and f 0 . We will later exploit Lemma 4 to show our hardness results. Next, we show that arcs with non-unit weights in our constructions can be simulated by arcs with unit weights. This allows us to show stronger hardness results and to keep our constructions simple. 3.3.1. Strengthening of hardness results to unit-weight graphs Construction 1 heavily relied on forbidding the deletion of certain arcs by giving them a high weight. The next lemma shows that we can replace these arcs by a gadget only using unit-weight arcs without changing the weight of the partitioning set sought. 14 v 5 w v w Figure 8: Replacing an arc of weight 5 on the left by the gadget of unit-weight arcs on the right. Lemma 5. There is a polynomial-time many-one reduction from DAG PARTITIONING with polynomially bounded weights to unweighted DAG PARTITIONING that does not change the weight k of the partitioning set sought. P ROOF. Let (G, ω, k) be an instance of DAG PARTITIONING. We show how to obtain an instance (G0 , ω 0 , k) by replacing a single arc of weight more than one by arcs of weight one such that (G, ω, k) is a yes-instance if and only if (G0 , ω 0 , k) is a yes-instance. The replacement will be done as illustrated in Figure 8. The claim then follows by repeating this procedure for every arc of weight more than one. Consider an arc a = (v, w) in G with ω(a) > 1. We obtain G0 and ω 0 from G and ω by setting the weight ω 0 (a) = 1, adding a set X of ω(a) − 1 vertices to G0 , and inserting for each u ∈ X a weight-one arc (v, u) and a weight-one arc (u, w). First, assume that (G, ω, k) is a yes-instance and that S is a minimal partitioning set for G. We show how to obtain a partitioning set of weight k for G0 . Clearly, if a < S, then S is a partitioning set of equal weight for (G0 , ω 0 , k). If a ∈ S, then we get a partitioning set of equal weight for (G0 , ω 0 , k) by adding the arcs between v and X to S. Second, assume that (G0 , ω 0 , k) is a yes-instance and that S is a minimal partitioning set for G0 . We show how to obtain a partitioning set of weight k for G. To this end, we consider two cases: v and w are in a common or in separate connected components of G0 \ S. Case 1) If v and w are in one connected component of G0 \ S, then, by minimality, S does not contain a or any arc incident to vertices in X. Hence, S is a partitioning set of equal weight for G. Case 2) If v and w are in separate connected components of G0 \ S, then a ∈ S. Moreover, the vertices in X have only one outgoing arc. Hence, by Observation 1, S does not contain arcs from X to w but, therefore, contains all arcs from v to X. Removing these arcs from S results in a partitioning set of equal weight for (G, ω, k).  3.3.2. Limits of fixed-parameter algorithms We now show that DAG PARTITIONING cannot be solved in 2o(k) poly(n) time unless the Exponential Time Hypothesis fails. Thus, if our search tree algorithm for DAG PARTITIONING can be improved, then only by replacing the base of the exponential 2k -term by some smaller constant. The Exponential Time Hypothesis was introduced by Impagliazzo and Paturi [19] and states that n-variable 3-S AT cannot be solved in 2o(n) poly(n) time. Using the reduction from 3-S AT to DAG PARTITIONING given by Alamdari and Mehrabian [1] (Construction 1), we can easily show the following: Theorem 2. Unless the Exponential Time Hypothesis fails, DAG PARTITIONING cannot be solved in 2o(k) poly(n) time even if all arcs have unit weight. P ROOF. Construction 1 reduces an instance of 3-S AT consisting of a formula with n variables and m clauses to an equivalent instance (G, ω, k) of DAG PARTITIONING with k = 4n + 2m. Thus, a 2o(k) poly(n)-time algorithm for DAG PARTITIONING would yield a 2o(m) poly(m)-time algorithm for 3-S AT. This, in turn, by the so-called Sparsification Lemma of Impagliazzo et al. [20, Corollary 2], would imply a 2o(n) poly(n) time algorithm for 3-S AT, which contradicts the Exponential Time Hypothesis. Since the weights used in Construction 1 are polynomial in the number of created vertices and edges, we can apply Lemma 5 to transfer the result to the unit-weight case.  15 3.3.3. Limits of problem kernelization We now show that DAG PARTITIONING has no polynomial-size problem kernel with respect to the parameter k— the weight of the partitioning set sought. It follows that, despite the effectiveness of data reduction observed in experiments in Section 3.2, we presumably cannot generally shrink a DAG PARTITIONING instance in polynomial time to a size polynomial in k. To show that DAG PARTITIONING does not allow for polynomial-size kernels, we first provide the necessary concepts and techniques introduced by Bodlaender et al. [8]. Definition 1 (Bodlaender et al. [8, Definition 3.3]). For some finite alphabet Σ, a problem L ⊆ Σ∗ (OR-)cross-composes into a parameterized problem Q ⊆ Σ∗ × N if there is an algorithm (a (OR-)cross-composition) that transforms instances x1 , . . . , xs of L into an instance (x∗ , k) for Q in time polynomial in ∑si=1 |xi | such that i) k is bounded by a polynomial in maxsi=1 |xi | + log s and ii) (x∗ , k) ∈ Q if and only if there is an i ∈ {1, . . . , s} such that xi ∈ L. Furthermore, the cross-composition may exploit that the input instances x1 , . . . , xs belong to the same equivalence class of a polynomial equivalence relation R ⊆ Σ∗ × Σ∗ , which is an equivalence relation such that i) it can be decided in polynomial time whether two instances are equivalent and ii) any finite set S ⊆ Σ∗ is partitioned into poly(maxx∈S |x|) equivalence classes. The assumption that all instances belong to the same equivalence class of a polynomial equivalence relation can make the construction of a cross-composition remarkably easier: when giving a cross-composition from 3-S AT, we can, for example, assume that the input instances all have the same number of clauses and variables. Cross-compositions can be used to prove that a parameterized problem has no polynomial-size kernel unless NP ⊆ coNP/poly. Theorem 3 (Bodlaender et al. [8, Corollary 3.6]). If some problem L ⊆ Σ∗ is NP-hard under polynomial-time manyone reductions and L cross-composes into the parameterized problem Q ⊆ Σ∗ × N, then there is no polynomial-size problem kernel for Q unless NP ⊆ coNP/poly. In the following, we show that 3-S AT cross-composes into DAG PARTITIONING parameterized by k, which yields the following theorem: Theorem 4. Unless NP ⊆ coNP/poly, DAG PARTITIONING does not have a polynomial-size problem kernel with respect to the weight k of the partitioning set sought even if all arcs have unit weight. Although the proof of Theorem 4 is based on the following construction, which requires arc weights, by using Lemma 5 from Section 3.3.1, we obtain that Theorem 4 holds even on graphs with unit weights. Construction 2. Let ϕ1 , . . . , ϕs be instances of 3-S AT. Since we may assume ϕ1 , . . . , ϕs to be from the same equivalence class of a polynomial equivalence relation, we may assume that each of the formulas ϕ1 , . . . , ϕs has the same number n of variables and the same number m of clauses. Moreover, we may assume that s is a power of two; otherwise we simply add unsatisfiable formulas to the list of instances. We now construct a DAG PARTITIONING instance (G, ω, k) with k := 4n + 2m + 3 log s that is a yes-instance if and only if ϕi is satisfiable for at least one 1 ≤ i ≤ s, where we use “log” to denote the binary logarithm. As in Construction 1, the weight function ω will only assign two possible weight values: a heavy arc has weight k + 1 and thus cannot be contained in any partitioning set. A normal arc has weight one. The remainder of the construction is illustrated in Figure 9. For each instance ϕi , let Gi be the graph produced by Construction 1. By Lemma 4, Gi can be partitioned with 4n + 2m arc deletions if and only if ϕi is a yes-instance. We now build a gadget that, by means of additional 3 log s arc deletions, chooses exactly one graph Gi that has to be partitioned. To distinguish between multiple instances, we denote the special vertices f , f 0 ,t, and t 0 in Gi by fi , fi0 ,ti , and ti0 . For all 1 ≤ i ≤ s, we add Gi to the output graph G and merge the vertices f1 , f2 , . . . , fs into a vertex f and the vertices f10 , f20 , . . . , fs0 into a vertex f 0 . Furthermore, we add the vertices t,t 0 , and t 00 and the heavy arcs (t,t 0 ) and (t,t 00 ) to G. 16 t 00 t t1 t2 t10 t20 f O t3 t4 t30 t40 f0 t0 I Figure 9: Cross composition of four formulas φ1 , . . . , φ4 into a DAG PARTITIONING instance. Of each subgraph Gi corresponding to formula φi , only the vertices ti , ti0 , and their connecting heavy arc are shown. The introduced binary trees O and I are highlighted in gray. Deleting the 3 log 4 = 6 dotted arcs requires the graph G1 to be partitioned, since its vertices t1 and t10 are in a different connected component than its vertices f1 = f and f10 = f 0 . The graphs Gi for i > 1 do not have to be partitioned; they are completely contained in one connected component with f and f 0 . We add a balanced binary tree O rooted in t 00 and its leaves being the vertices t1 , . . . ,ts that is formed by normal arcs directed from the root to the leaves. That is, O is an out-tree. Moreover, add a balanced binary tree I rooted in t 0 and its leaves being the vertices t10 , . . . ,ts0 that is formed by normal arcs directed from the leaves to the root. That is, I is an in-tree. For each vertex v , t 0 in I, add a normal arc (v, f 0 ). Using this construction, we can now prove Theorem 4. P ROOF ( OF T HEOREM 4). We only have to show that the instance (G, ω, k) constructed by Construction 2 is a yesinstance if and only if at least one of the input formulas ϕi is satisfiable. Then, the theorem for the weighted case follows from Theorem 3. Since the weights used in Construction 2 are polynomial in the number of created vertices and edges, we can apply Lemma 5 to transfer the result to the unit-weight case. First, assume that a formula ϕi is satisfiable for some 1 ≤ i ≤ s. By Lemma 4 it follows that Gi can be partitioned by k0 := 4n + 2m arc deletions into two connected components Pt and Pf such that Pt contains ti and ti0 and such that Pf contains fi = f and fi0 = f 0 . We apply these arc deletions to G and delete 3 log s additional arcs from G as follows. Let L be the unique directed path in O from t 00 to ti . Analogously, let L0 be the unique directed path in I from ti0 to t 0 . Observe that each of these directed paths has log s arcs. We partition G into the connected component Pt0 = Pt ∪ {t,t 0 ,t 00 } ∪ V (L) ∪ V (L0 ) with sink t 0 and into the connected component Pf0 = V (G) \ Pt0 with sink f 0 . To this end, for each vertex v ∈ V (L) \ {ti }, we remove the outgoing arc that does not belong to L. Hence, exactly log s arcs incident to vertices of O are removed. Similarly, for each vertex v ∈ V (L0 ) \ {ti0 }, we remove the incoming arc not belonging to L0 . For each vertex v , t 0 of L0 , we remove the arc to f 0 . Hence, exactly 2 log s arcs incident to vertices of I are removed. Thus, in total, at most k = 4n + 2m + 3 log s normal arcs are removed to partition G into Pt0 and Pf0 . Conversely, let S be a minimal partitioning set for G with ω(S) ≤ k. Then, by Observation 1, G \ S has two connected components, namely Pt0 with sink t 0 and Pf0 with sink f 0 . Since S cannot contain heavy arcs, t and t 00 are in Pt0 . Hence, t 00 can reach t 0 in G \ S, since they are in the same component of G \ S. As every directed path from t 00 to t 0 goes through some vertices ti and ti0 , it follows that there is an i ∈ {1, . . . s} such that ti and ti0 are in Pt0 . Since f = fi and f 0 = fi0 are in Pf0 , the partitioning set S ∩ A(Gi ) partitions Gi into two connected components: one containing ti and ti0 and the other containing f = fi and f 0 = fi0 . Since S does not contain heavy arcs, from Lemma 4 it follows that ϕi is satisfiable.  17 Algorithm 3: Leskovec et al. [26]’s heuristic to compute small partitioning sets. Input: A directed acyclic graph G = (V, A) with arc weights ω. Output: A partitioning set S. 1 (v1 , v2 , . . . , vn ) ← reverse topological order of the vertices of G 2 L ← array with n entries 3 S←0 / 4 for i = 1 to n do 5 if vi is a sink then L[vi ] ← vi // associate vi with itself 6 else 7 D ← {L[w] | w ∈ N + (vi )} // the set of feasible sinks for vi 8 for s ∈ D do 9 As ← {(vi , w) ∈ A | w ∈ N + (vi ) ∧ L[w] = s} // set of arcs to keep if vi is associated with sink s 10 11 12 13 s∗ ← arg maxs∈D ω(As ) L[vi ] ← s∗ S ← S ∪ {(vi , w) | w ∈ N + (vi ) ∧ L[w] , s∗ } // cheapest sink s∗ to associate vi with return S 4. Parameter treewidth In Section 3, we have seen that DAG PARTITIONING is linear-time solvable when the weight k of the requested partitioning set is constant. Alamdari and Mehrabian [1] asked whether DAG PARTITIONING is fixed-parameter tractable with respect to the parameter treewidth, which is a measure of the “tree-likeness” of a graph. We will answer this question affirmatively. In Section 4.1, we first show that, if the input graph is indeed a tree, then the heuristic by Leskovec et al. [26] solves the instance optimally in linear time. Afterwards, in Section 4.2, we prove that this result can be generalized to graphs of bounded treewidth and thus improve the algorithm for pathwidth given by Alamdari and Mehrabian [1], since the treewidth of a graph is at most its pathwidth. 4.1. Partitioning trees In this section, we show that the heuristic by Leskovec et al. [26] solves DAG PARTITIONING in linear time on trees. This result will be generalized in the next section, where we show how to solve DAG PARTITIONING in linear time on graphs of bounded treewidth. The heuristic by Leskovec et al. [26] is similar to our search tree algorithm presented in Algorithm 1: instead of trying all possibilities of associating a vertex with one of its feasible sinks, it associates each vertex with the sink that it would be most expensive to disconnect from. The algorithm is presented in Algorithm 3. Theorem 5. Algorithm 3 solves DAG PARTITIONING optimally in linear time if the underlying undirected graph is a tree. P ROOF. Algorithm 3 clearly works in linear time: to implement it, we only have to iterate over the out-neighbors of each vertex vi once. In particular, all sets As in line 9 can be computed by one iteration over each w ∈ N + (vi ) and adding the arc (vi , w) to AL[w] . Moreover, Algorithm 3 returns a partitioning set: each vertex v is associated with exactly one sink L[v] of G and the returned set S deletes exactly the arcs (v, w) for which L[v] , L[w]. We show by induction on i that Algorithm 3 computes a minimum-weight partitioning set for G[{v1 , . . . , vi }]. For the induction base case, observe that v1 is a sink and, thus, v1 only reaches the sink L[v1 ] = v1 in G \ S for all possible minimum-weight partitioning sets S for G. Now, assume that there is a minimum-weight partitioning set S such that each v ∈ {v1 , . . . , vi−1 } only reaches the sink L[v] in G \ S. We show that there is a minimum-weight partitioning set S0 such that each v ∈ {v1 , . . . , vi } reaches only the sink L[v] in G \ S0 . If vi only reaches L[vi ] in G \ S, then we are done. Otherwise, vi reaches some sink s0 , L[vi ] in G \ S and, hence, is not itself a sink. The graph G is partly illustrated in Figure 10. 18 v vi w Rs0 RL[vi ] s0 u L[vi ] Figure 10: Illustration of the proof of Theorem 5. Straight lines represent arcs. Wavy lines represent directed paths. Dashed arcs and paths represent arcs and paths that cannot exist since the underlying undirected graph is a tree. Let Rs be the set of vertices reachable from vi that reach some sink s in G. Since the underlying undirected graph of G is a tree, vi has exactly one arc into Rs for each sink s reachable from vi . Let (vi , u) be the arc of vi into RL[vi ] and (vi , w) be the arc of vi into Rs0 . Observe that the arc (vi , u) exists since the algorithm can set L[vi ] only to sinks reachable from vi . To show that S0 := (S \ {(vi , w)}) ∪ {(vi , u)} is still a partitioning set, we only have to verify that vi and all vertices reaching vi only reach one sink in G \ S0 . For all other vertices, this follows from S being a partitioning set. 1. The vertex vi only reaches the sink L[vi ] in G \ S0 : this is because u = v j for some j < i which, by induction hypothesis, reaches exactly one sink in G \ S and, hence, in G \ S0 . 2. A vertex v that reaches vi in G \ S0 reaches only the sink L[vi ] in G \ S0 : otherwise v reaches s0 in G \ S0 since vi and, therefore v, reaches s0 in G \ S. This, however, means that v has a path to s0 that bypasses vi in G \ S0 and hence, in G \ S, which contradicts the undirected underlying graph of G \ S being a tree. It remains to show ω(S0 ) ≤ ω(S), implying that S0 is also a minimum-weight partitioning set. To see this, we analyze the sets As0 and AL[vi ] computed in line 9 of Algorithm 3. Observe that As0 = {(vi , w)} and that AL[vi ] = {(vi , u)}. Since ω(As0 ) ≤ ω(AL[vi ] ) because of the choice of L[vi ] in line 10, we conclude that ω(vi , u) ≤ ω(vi , w) and hence, ω(S0 ) ≤ ω(S).  4.2. Partitioning DAGs of bounded treewidth We now give an algorithm that solves DAG PARTITIONING in linear time on graphs of bounded treewidth. In contrast to Section 3, which presented our search tree algorithm and an experimental evaluation thereof, the algorithm presented below is of rather theoretical interest: Alamdari and Mehrabian [1] asked whether DAG PARTITIONING is fixed-parameter tractable with respect to the parameter treewidth. With a dynamic programming algorithm, we can prove the following theorem, which answers their open question and is an improvement of Alamdari and Mehrabian [1]’s algorithm, since the treewidth of a graph is at most its pathwidth. Theorem 6. Given a width-t tree decomposition of the underlying undirected graph, DAG PARTITIONING can be 2 solved in 2O(t ) · n time. We first formally define the tree decomposition of a graph and its width. Definition 2 (Treewidth, tree decomposition). Let G = (V, A) be a directed graph. A tree decomposition (T, β ) for G consists of a rooted tree T = (X, E) and a mapping β : X → 2V of each node x of the tree T to a subset Vx := β (x) ⊆ V , called bag, such that i) for each vertex v ∈ V , there is a node x of T with v ∈ Vx , ii) for each arc (u, w) ∈ A, there is a node x of T with {u, w} ⊆ Vx , 19 s4 Vx s3 Ux s1 s2 Figure 11: The set S consisting of the dotted arc is not a partitioning set for the shown graph G, but a partial partitioning set for G[Ux ]. Note that S would not be a partial partitioning set if it would additionally contain the bold arc, since then the sink s1 would be in a connected component with a vertex of Vx but not reachable from Vx . Also note that S does not separate s2 from s3 , which are sinks in G[Ux ] but not in G. iii) for each vertex v ∈ V , the nodes x of T for which v ∈ Vx induce a subtree in T . A tree decomposition is nice if Vr = 0/ for the root r of T and each node x of T is either • a leaf : then, Vx = 0, / • a forget node: then, x has exactly one child node y and Vx = Vy \ {v} for some v ∈ Vy , • an introduce node: then, x has exactly one child node y and Vx = Vy ∪ {v} for some v ∈ V \Vy , or • a join node: then, x has exactly two child nodes y and z such that Vx = Vy = Vz . The width of a tree decomposition is one less than the size of its largest bag. The treewidth of a graph G is the minimum width of a tree decomposition for G. For a node x of T , we denote by Ux the union of Vy for all descendants y of the node x. For any constant t, it can be decided in linear time whether a graph has treewidth t and the corresponding tree decomposition of width t can be constructed in linear time [6]. Also in O(tn) time, the tree decomposition of width t can be transformed into a nice tree decomposition with the same width and O(tn) nodes [24]. Hence, we assume without loss of generality that we are given a nice tree decomposition. Our algorithm is based on leaf-to-root dynamic programming. That is, intuitively, we start from the leaf nodes of the tree decomposition and compute possible partial partitioning sets for each bag from the possible partial partitioning sets for its child bags. Since our algorithm for DAG PARTITIONING on graphs of bounded treewidth is relatively intricate, we refer the reader that is yet inexperienced with dynamic programming on tree decompositions to introductory chapters in corresponding text books [28, 12, 10, 24]. We will now precisely define a partial partitioning set and show that any partial partitioning set for the root bag is a partitioning set for the entire graph. The definition is illustrated in Figure 11. Definition 3 (Partial partitioning set). A partial partitioning set S for G[Ux ] is an arc set S ⊆ A(G[Ux ]) such that (i) no connected component of G[Ux ] \ S contains two different sinks of Ux \Vx , and (ii) every sink in a connected component of G[Ux ] \ S that contains a vertex of Vx can be reached from some vertex of Vx in G[Ux ] \ S. Since we assumed to work on a tree decomposition with a root r such that the bag Vr is empty, any partial partitioning set for G[Ur ] = G will be a partitioning set for the entire graph G. Moreover, Definition 3(i) does not require partial partitioning sets for G[Ux ] to separate sinks in the bag Vx . This is because vertices in Vx that are sinks in G[Ux ] might be non-sinks for a supergraph, as illustrated in Figure 11. Thus, it might be unnecessary to separate the vertices in Vx . However, due to Definition 2(ii and iii) of a tree decomposition, sinks in Ux \Vx are sinks in all supergraphs G[Uq ] 20 Vx s3 P1 P2 s1 s2 Figure 12: A pattern (R, G, P), where shown are the graph G and a partition P of its vertices into two sets P1 and P2 . If the graph R is the subgraph of G induced by the vertices Vx , then, in terms of Definition 5, R = Rx (S) and G = Gx (S) for the partial partitioning set S for G[Ux ] shown in Figure 11. In this case, the partial partitioning set S satisfies the shown pattern. Moreover, a vertex is a sink in this figure if and only if it is a sink in G[Ux ] \ S shown in Figure 11. for q being an ancestor node of x. Definition 3(ii), by Observation 2, allows us to ensure that components containing both a sink in Ux \Vx and a vertex of Vx end up with only one sink in some supergraph G[Uq ]. The precise purpose of Definition 3(ii) will be explained in more detail after the upcoming Definition 5. To keep the notation free from clutter, note that Definition 3 implicitly relies on the bag Vx belonging to each set Ux . Thus, when a tree decomposition has a node x and a child node y such that Vx ( Vy but Ux = Uy , a partial partitioning set S for G[Uy ] is not necessarily a partial partitioning set for G[Ux ], although G[Uy ] \ S = G[Ux ] \ S. Now, assume that we want to compute partial partitioning sets for G[Ux ] from partial partitioning sets for child nodes of x. These partial partitioning sets might, for example, disagree on which arcs to delete in the child bags or which connected components of the child bags are meant to end up in a common connected component of the entire graph: for a child node y of x, multiple connected components of G[Uy ] \ S might be one connected component of G[Ux ] \ S. To prevent such incompatibilities, we only consider those partial partitioning sets for G[Ux ] that agree with partial partitioning sets for the child nodes of x on certain patterns. On a high level, our algorithm will store for each node of the tree decomposition a table with one row for each possible pattern. The value of a row will be the minimum weight of a partial partitioning set satisfying this pattern. To compute this value, our algorithm will use the rows with corresponding patterns in the tables of the child nodes. In the following, we first formalize the terms patterns and satisfying partial partitioning sets. Then, we present our algorithm and we specify the corresponding patterns. We start by formally defining patterns, see Figure 12 for an illustration. Definition 4 (Pattern). Let x be a node of a tree decomposition T . A pattern for x is a triple (R, G, P) such that i) R is a directed acyclic graph with the vertices Vx . ii) G is a directed acyclic graph with the vertices Vx and at most |Vx | additional vertices such that each vertex in V (G) \Vx is a non-isolated sink, and iii) P is a partition of the vertices of G such that each connected component of G is within one set Pi ∈ P and such that each Pi contains at most one vertex of V (G) \Vx . We will use a pattern (R, G, P) for x to capture important properties of partial partitioning sets for G[Ux ]. Intuitively, the graph R will describe which arcs between the vertices in the bag Vx a partial partitioning set S for G[Ux ] will not delete. The graph G will describe which vertices of Vx can reach each other in G[Ux ] \ S and which sinks outside of Vx they can reach. The partition P describes which vertices are meant to end up in the same connected component of G \ S for a partitioning set S of the entire graph. For this reason, the sets of the partition P are allowed to contain only one vertex of V (G) \Vx as these vertices are sinks. We will now explain precisely what it means for a partial partitioning set to satisfy a pattern. The following definition is illustrated in Figure 12. 21 Definition 5 (Pattern satisfaction). Let S be a partial partitioning set for G[Ux ]. A sink s in Ux \Vx is bag-reachable in G[Ux ] \ S if some vertex in Vx can reach s in G[Ux ] \ S. We define a canonical pattern (Rx (S), Gx (S), Px (S)) at x for S, where • Rx (S) is G[Vx ] \ S, • Gx (S) is the directed acyclic graph on the vertices Vx ∪V 0 , where V 0 is the set of bag-reachable sinks in G[Ux ] \ S, and there is an arc (u, v) in Gx (S) if and only if the vertex u can reach the vertex v in G[Ux ] \ S, and • Px (S) is the the partition of the vertices of Gx (S) such that the vertices u and v are in the same set of Px (S) if and only if they are in the same connected component of G[Ux ] \ S. Let (R, G, P) be a pattern for x. We say that S satisfies the pattern (R, G, P) at x if i) R = Rx (S), ii) G = Gx (S), and iii) for each set P ∈ Px (S) there exists a set P0 ∈ P such that P ⊆ P0 , that is, P is a coarsening of Px (S). It is easy to verify that a partial partitioning set S for G[Ux ] \ S satisfies its canonical pattern (Rx (S), Gx (S), Px (S)) at node x: to this end, observe that (Rx (S), Gx (S), Px (S)) is indeed a pattern for x: for the vertex set Vx ∪V 0 of Gx (S), we have |V 0 | ≤ |Vx | since each vertex in Vx can reach at most one distinct sink in V 0 ⊆ Ux \Vx in G[Ux ] \ S. Note that, since Gx (S) contains an arc (u, v) if and only if u can reach v instead of requiring them to be merely connected, a vertex is a sink in Gx (S) if and only if it is a sink in G[Ux ] \ S. Herein, Definition 3(ii) ensures that any sink s connected to a vertex in Vx is a vertex in Gx (S). While it might seem more natural to replace the condition (iii) in Definition 5 by simply P = Px (S), we prefer the current definition, because it allows for several connected components of G[Ux ] \ S becoming a part of one connected component of the entire graph. This greatly simplifies some parts of the algorithm. The Algorithm. We now describe a dynamic programming algorithm. Starting from the leaves of the tree decomposition T and working our way to its root, with each node x of T , we associate a table Tabx that is indexed by all possible patterns for x. Semantically, we want that Tabx (R, G, P) = minimum weight of a partial partitioning set for G[Ux ] that satisfies the pattern (R, G, P) at x. Since we have Vr = 0, / there is exactly one pattern (R, G, P) for the root r: R = G is the empty graph and P = 0. / Thus, Tabr has exactly one entry and it contains the minimum weight of a partial partitioning set S for G[Ur ], which is equivalent to S being a partitioning set for G. It follows that once the tables are correctly filled, to decide the DAG PARTITIONING instance (G, ω, k), it is enough to test whether the only entry of Tabr is at most k. We now present an algorithm to fill the tables and prove its correctness. First, we initialize all table entries of all tables by ∞. By updating the entry Tabx (R, G, P) with m we mean setting Tabx (R, G, P) := m if m < Tabx (R, G, P). For each leaf node x, it is obviously correct to set Tabx (R, G, P) = 0 for the only pattern (R, G, P) at x, which has the empty graph as R and G and the empty set as P. In the following, for each type of a node x of a tree decomposition, that is, for forget nodes, introduce nodes, and join nodes, we independently show how to compute the table Tabx given that we correctly computed the tables for all children of x. To show that the table Tabx is filled correctly, we prove the following lemma for each node type. Lemma 6. (i) There is a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x with weight at most Tabx (R, G, P). (ii) The minimum weight of a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x is at least Tabx (R, G, P). We present the algorithm and the proof for Lemma 6 independently for each node type in Sections 4.2.1, 4.2.2, and 4.2.3, respectively, where we assume that all tables Taby for child nodes y of x have been computed correctly. 22 4.2.1. Forget nodes We use the following procedure to compute the table Tabx of a forget node x under the assumption that the table Taby for the child node y of x has been computed correctly. Procedure 1 (Forget node). Let x be a forget node with a single child y. Assume that v is the vertex being “forgotten”, that is, v is in the child bag Vy but not in the current bag Vx . From the weights of optimal partial partitioning sets for G[Uy ], we want to compute the weight of optimal partial partitioning sets for G[Ux ]. To this end, for each pattern (R, G, P) for y, we distinguish four cases. In each case, we will construct a pattern (R0 , G0 , P0 ) for x such that a partial partitioning set for G[Uy ] that satisfies (R, G, P) is a partial partitioning set for G[Ux ] and satisfies (R0 , G0 , P0 ). Then, we update Tabx (R0 , G0 , P0 ) with the value of Taby (R, G, P). Herein, the following case distinction is not exhaustive. We do not take action for patterns (R, G, P) that do not satisfy any of the following conditions (for the reasons informally explained in the cases). In all cases, we set R0 := R − {v}. Case 1) If v is isolated in G and there is a set {v} in P, then we let G0 := G − {v} and P0 := P \ {{v}} and update Tabx (R0 , G0 , P0 ) with the value of Taby (R, G, P): an isolated vertex that is alone in its part of P can simply be forgotten. Case 2) If v is a non-isolated sink in G and v ∈ Pi ∈ P such that Pi ⊆ Vy , then we let G0 := G and P0 := P. We update Tabx (R0 , G0 , P0 ) with the value of Taby (R, G, P): in this case, the sink v “moves” from Vy to V (G0 ) \Vx . To ensure that (R0 , G0 , P0 ) is a pattern, the part Pi containing v cannot contain any additional sink in V (G) \Vy , thus we require Pi ⊆ Vy . Case 3) If v is not a sink in G and there is no sink in V (G) \ Vy such that v is its only in-neighbor, then let G0 := G − {v} and P0 be the partition of the vertices of G0 obtained from P by removing v from the set it is in. Update Tabx (R0 , G0 , P0 ) with the value of Taby (R, G, P). This the simplest case, where the vertex is somewhat unimportant to partial partitioning sets satisfying the pattern (R, G, P) at y, so we simply forget it. Case 4) If there is a sink u ∈ V (G) \ Vy such that v is its only in-neighbor and {u, v} is a set of P, then let G0 := G − {u, v} and P0 be the partition of the vertices of G0 obtained from P by removing the set {u, v}. Update Tabx (R0 , G0 , P0 ) with the value of Taby (R, G, P): If there was a sink u in V (G) \Vy only reachable from v, then it would be unreachable from Vx since v is forgotten. Therefore, if the part Pi of P containing u and v contained more vertices, then we could not be sure that a partial partitioning set satisfying the pattern (R, G, P) at y is a partial partitioning set for G[Ux ] at all. Namely, it may break Definition 3(ii). We show that Procedure 1 fills the table Tabx associated with a forget node x correctly. First, we show that there is a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x and having weight at most Tabx (R, G, P) as computed by Procedure 1. P ROOF ( OF L EMMA 6(i) FOR FORGET NODES ). Let x be a forget node with child node y and let v be the vertex “forgotten”, that is, v is in the child bag Vy but not in the current bag Vx . For any table entry Tabx (R0 , G0 , P0 ) < ∞, we show that there is a partial partitioning set S for G[Ux ] satisfying (R0 , G0 , P0 ) and having weight at most Tabx (R0 , G0 , P0 ). To this end, observe that, since Tabx (R0 , G0 , P0 ) < ∞ there is a pattern (R, G, P) for y from which Procedure 1 generates (R0 , G0 , P0 ) and such that Tabx (R0 , G0 , P0 ) = Taby (R, G, P). Since there is a partitioning set for G[Uy ] that satisfies (R, G, P) and has weight at most Taby (R, G, P), it is sufficient to show that any partial partitioning set S for G[Uy ] that satisfies the pattern (R, G, P) at y is also a partial partitioning set for G[Ux ] that satisfies at x the pattern (R0 , G0 , P0 ) generated in each of the cases (1)–(4) of Procedure 1. We first argue that S is a partial partitioning set for G[Ux ] if any of the cases (1)–(4) of Procedure 1 applies. We first verify Definition 3(i). To this end, observe that by Definition 5, a vertex u ∈ Vy is a sink in Gy (S) if and only if it is a sink in G[Uy ] \ S. Now, assume that there is a connected component of G[Ux ] \ S = G[Uy ] \ S that contains two different sinks s1 , s2 in Ux \Vx . Then, one of these sinks, say s1 , must be v. Since, then, v ∈ Vy is a sink in G[Ux ] \ S = G[Uy ] \ S, it is a sink in G = Gy (S) and none of the cases (3) and (4) apply. Moreover, since s2 is connected to v ∈ Vy in G[Uy ] \ S, by Definition 3(ii), some vertex in Vy can reach s2 , implying that s2 is a vertex of G = Gy (S). Thus, by Definition 5(iii), s2 is in the same set Pi ∈ P as s1 = v and, hence, (1) does not apply. Since s2 < Vy , also (2) does not apply. We now verify Definition 3(ii). It can only be violated if v is the only vertex of Vy that can reach some sink u in the connected component of v in G[Uy ] \ S. However, then, v is the only in-neighbor of u in Gy (S) = G. Hence, only case (4) might become applicable. When this case applies, however, {u, v} ∈ P implies that no vertex in Vy ⊇ Vx is connected to v or u in G[Uy ] \ S = G[Ux ] \ S. Thus, Definition 3(ii) is satisfied. 23 It remains to show that S satisfies the generated pattern (R0 , G0 , P0 ), that is, to verify R0 = Rx (S) (Definition 5(i)), = Gx (S) (Definition 5(ii)) and that P0 is a coarsening of Px (S) (Definition 5(iii)). Herein, R0 = R − {v} = Ry (S) − {v} = Rx (S) is trivial. To show G0 = Gx (S), we distinguish between the case of Procedure 1 applied. Case 1) In this case, v is not in Vx and, obviously, not a bag-reachable sink in G[Ux ] \ S. Hence, v is not in Gx (S). Moreover, v is isolated in G = Gy (S). Therefore, Procedure 1 sets G0 := G − {v} = Gy (S) − {v} = Gx (S). G0 Case 2) In this case, v is not in Vx but it is a bag-reachable sink in G[Ux ] \ S, since it is not isolated in G. Therefore, Procedure 1 sets G0 := G = Gy (S) = Gx (S). Case 3) In this case, v is not a sink in G (and thus also not in G[Ux ] \ S) and, therefore, clearly does not appear in Gx (S). Moreover, any sink not in Vy is reachable from a vertex in Vy \ {v} = Vx in Gy (S) if and only if it is reachable in Gy (S) − {v}. Hence, Procedure 1 sets G0 := G − {v} = Gy (S) − {v} = Gx (S). Case 4) In this case, u was a bag-reachable sink in G[Uy ] \ S but is not bag-reachable in G[Ux ] \ S. Moreover, since {v, u} ∈ P, no vertex of Vx is connected to v in G[Uy ] \ S = G[Ux ] \ S. Hence, neither v nor u are vertices of Gx (S). Hence, Procedure 1 sets G0 := G − {u, v} = Gy (S) − {u, v} = Gx (S). Finally, we verify Definition 5(iii) by showing that P0 is a coarsening of Px (S). Assume the contrary. Then, there are two vertices u, w of Gx (S) in the same set of Px (S) but in different sets of P0 . By construction of P0 from P, they are also in different sets of P = Py (S). It follows that u and w lie in the same connected component of G[Ux ] \ S but in different connected components of G[Uy ] \ S. Since these two graphs are the same, we have a contradiction.  We now show that the minimum weight of a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x is at least Tabx (R, G, P) as computed by Procedure 1. P ROOF ( OF L EMMA 6(ii) FOR FORGET NODES ). Let x be a forget node with child node y. Let v be the vertex “forgotten” that is, v ∈ Vy but v < Vx . Assume that S is a partial partitioning set for G[Ux ] satisfying the pattern (Rx , Gx , Px ) at x. It is sufficient to construct a pattern (R, G, P) that S satisfies at y and from which Procedure 1 generates exactly the pattern (Rx , Gx , Px ) to update the table Tabx (Rx , Gx , Px ) with Taby (R, G, P). Then, Lemma 6(ii) follows for forget nodes, because we have Tabx (Rx , Gx , Px ) ≤ Taby (R, G, P) ≤ ω(S). Herein, the last inequality follows from the induction hypothesis. We first show that S is a partial partitioning set for G[Uy ], that is, we verify Definition 3. Definition 3(i) is easy to verify: since S is a partial partitioning set for G[Ux ], each connected component of G[Ux ] \ S = G[Uy ] \ S contains at most one sink in Ux \ Vx ⊇ Uy \ Vy . It remains to verify Definition 3(ii). Assume, for a contradiction, that there is a connected component C in G[Uy ] \ S that contains a vertex of Vy such that no vertex of Vy ⊇ Vx can reach some sink s ∈ C \ Vy . Then, since S is a partial partitioning set for G[Ux ] \ S, the connected component C cannot contain vertices of Vx and, hence, C ∩Vy = {v}. However, since G[Uy ] \ S is a directed acyclic graph, v reaches some sink in C. Since v cannot reach s ∈ C, it follows that C contains two sinks. Since C ∩Vx = 0, / this contradicts S being a partial partitioning set for G[Ux ] \ S. It follows that S is a partial partitioning set for G[Uy ]. We now construct a pattern (R, G, P) that S satisfies at y. Consider R := Ry (S) and G := Gy (S). Note that there are at most two vertices in G that are not in Gx : one of them is v, the possibly other vertex is a sink u in V (G) \Vy only reachable from v. We define P as a partition of the vertices of G that partitions the set V (Gx ) in the same way as Px . We add the possibly missing vertices v and u to that partition as follows: if there is a vertex w ∈ Vx in the same connected component of G[Uy ] \ S = G[Ux ] \ S as v, then we put v and u into same set as w. Otherwise, we add the set {v} or {u, v}, respectively, to P. By choice of R, G, and P, the partial partitioning set S clearly satisfies the pattern (R, G, P) at y. We have shown that S satisfies the pattern (R, G, P) at y. Moreover, if any of the cases (1)–(4) of Procedure 1 applies to (R, G, P), then it generates a pattern (R0 , G0 , P0 ) with R0 = Rx and G0 = Gx , since we showed in the proof of Lemma 6(i) for forget nodes that S satisfies the pattern generated by Procedure 1 at x. Hence, it remains to show that indeed at least one of the cases (1)–(4) of Procedure 1 applies and that in all cases P0 = Px . Case 1) If v is an isolated sink in G, then no vertex in Vy ⊇ Vx can reach v in G[Uy ] \ S = G[Ux ] \ S. Hence, there is no vertex of Vx in the same connected component of G[Ux ] \ S as v, as otherwise v would be a sink in Ux \Vx not reachable from the vertices of Vx . Hence, by construction of P, we have {v} ∈ P and case (1) of Procedure 1 applies. It sets P0 := P \ {{v}} = Px . Case 2) If v is a non-isolated sink in G, then v is a bag-reachable sink in G[Ux ] \ S. Hence, it is contained in Gx and we have V (Gx ) = V (G). By construction of P, we also have Px = P. The set Pi ∈ Px containing v < Vx cannot 24 contain any other vertex in V (Gx ) \ Vx by Definition 4(iii). Thus, Pi ⊆ Vy and case (2) of Procedure 1 applies. It sets P0 := P = Px . Case 3) If v is not a sink in G and there is no sink in V (G) \ Vy only reachable from v in G, then case (3) of Procedure 1 applies. Since the sink s reachable from v is also reachable from some vertex u < {v, s}, and thus, connected to u in G[Uy ] \ S, the set in P containing v also contains u. Procedure 1 sets P0 to be P with v removed from the set it is in. This, by construction of P, is exactly Px . Case 4) Finally, if there is a sink u in V (G) \Vy only reachable from v, then the connected component of G[Uy ] \ S = G[Ux ] \ S containing the vertex v does not contain any vertex of Vx , since u is not reachable from any vertex of Vx . It follows that {u, v} is a set of P. Case (4) of Procedure 1 applies. It sets P0 := P \ {{v, u}} = Px .  4.2.2. Introduce nodes We use the following procedure to compute the table Tabx of an introduce node x under the assumption that the table Taby for the child node y of x has been computed correctly. Procedure 2 (Introduce node). Let x be an introduce node with a single child y. Assume that v is the node being “introduced”, that is, v is not in the child bag Vy but in the current bag Vx . Moreover, let B ⊆ A(G[Ux ]) be the set of arcs incident to v. By Definition 2(ii and iii) of a tree decomposition, one actually has B ⊆ A(G[Vx ]). We now try each possible subset B0 ⊆ B and consider it not deleted by a partial partitioning set for the graph G[Ux ]. Similarly as in the case for forget nodes, we will transform each pattern (R, G, P) for y into a pattern (R0 , G0 , P0 ) for x such that if a partial partitioning set S for G[Uy ] satisfies (R, G, P), then S ∪ (B \ B0 ) is a partial partitioning set for G[Ux ] and satisfies (R0 , G0 , P0 ). Then, we update Tabx (R0 , G0 , P0 ) with the value of Taby (R, G, P) + ω(B) − ω(B0 ). For each pattern (R, G, P) for y such that all vertices incident to the arcs in B0 (if any) except for v are contained in the same set Pi ∈ P, we obtain R0 from R by adding v and the arcs in B0 to R. Similarly, we obtain G0 from G by adding v and the arcs in B0 to G. Moreover, for each u, w ∈ V (G0 ) such that u can reach w in G0 we add the arc (u, w) to G0 . For obtaining P0 , we distinguish two cases. Case 1) If B0 = 0, / then we try all possibilities of adding v to a set in P. That is, for every Pi ∈ P, we get a set P0 from P by adding v to Pi and update Tabx (R0 , G0 , P0 ) with Taby (R, G, P) + ω(B). Additionally, for P0 := P ∪ {{v}}, we update the entry Tabx (R0 , G0 , P0 ) with Taby (R, G, P) + ω(B). Case 2) If B0 , 0, / then let Pi be the set of P that contains all vertices incident to arcs in B0 except v and let P0 be obtained from P by adding v to the set Pi . We update Tabx (R0 , G0 , P0 ) with Taby (R, G, P) + ω(B) − ω(B0 ). Note that, since P simulates the connected components of the resulting graph, all arcs incident on v remaining in the graph must be within one set of P, i.e., their endpoints different from v must be in one set of P. We show that Procedure 2 fills the table associated with an introduce node x correctly. First, we show that there is a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x and having weight at most Tabx (R, G, P) as computed by Procedure 2. P ROOF ( OF L EMMA 6(i) FOR INTRODUCE NODES ). Let x be an introduce node with child node y and let v be the vertex “introduced” that is, v is not in the child bag Vy but in the current bag Vx . Let B ⊆ A(G[Vx ]) be the arcs incident to v, B0 ⊆ B and, finally, (R, G, P) be some pattern for y such that all vertices incident to the arcs in B0 (if any) except for v are contained in the same set Pi ∈ P. For any partial partitioning set S for G[Uy ] satisfying the pattern (R, G, P) at y, we show that S0 = S ∪ (B \ B0 ) is a partial partitioning set for G[Ux ] that satisfies the pattern (R0 , G0 , P0 ) constructed by Procedure 2. From this, since ω(S0 ) = ω(S) + ω(B) − ω(B0 ), Lemma 6(i) follows (as already discussed in the beginning of the proof of Lemma 6(i) for forget nodes). We start by showing that S0 is a partial partitioning set for G[Ux ]. First, we verify Definition 3(i). For the sake of a contradiction, assume that there is a connected component of G[Ux ] \ S0 that contains two distinct sinks s1 , s2 in Ux \Vx . Since there is no such connected component in G[Uy ] \ S = (G[Ux ] \ S0 ) − {v}, there are vertices s01 , s02 ∈ Vy in the same connected components of G[Uy ] \ S as s1 and s2 , respectively, that are incident to some arcs in B0 . By Definition 3(ii), there are vertices in Vy that can reach s1 and s2 in G[Uy ] \ S. Hence, s1 and s2 are bag-reachable and, therefore, in G = Gy (S). Since s01 , s02 ∈ Pi and S satisfies (R, G, P), by Definition 4(iii), we also have s1 , s2 ∈ Pi . Then, however, Pi contains the two different vertices s1 and s2 of V (G) \Vy , which contradictions Definition 4(iii). 25 To show that S0 is a partial partitioning set, it remains to verify Definition 3(ii). For the sake of contradiction, assume that some connected component of G[Ux ] \ S0 contains some sink s ∈ Ux \Vx , some vertex in Vx , but s is not reachable from any vertex in Vx . Then, s is not reachable from any vertex in Vy ⊆ Vx in the subgraph G[Uy ] \ S either. Thus, the connected component does not contain any vertex of Vy and, therefore, not of Vx , since the only vertex in Vx \Vy is v and the added arcs B0 connect only vertices in Vy . We have shown that S0 is a partial partitioning set for G[Ux ]. We now show that it satisfies the pattern (R0 , G0 , P0 ) generated by Procedure 2; we verify Definition 5. Definition 5(i), that is, R0 = Rx (S0 ) is trivial by the construction of R0 . We verify Definition 5(ii), that is, Gx (S0 ) = G0 . First, observe that V (Gx (S0 )) = V (Gy (S)) ∪ {v} = V (G0 ). We have to show that there is an arc (u, w) in G0 if and only if u can reach w in G[Ux ] \ S0 . Let (u, w) be such an arc in G0 . If (u, w) is already in G, then u can reach w in G[Uy ] \ S = (G[Ux ] \ S0 ) − {v}. Otherwise, u reaches w in G0 via some arcs (u0 , v), (v, w0 ) ∈ B0 , that is, u can reach u0 and w0 can reach w in G[Ux ] \ S0 . It follows that u can reach w in G[Ux ] \ S0 . Now, for the opposite direction, let u, w be vertices of G0 such that u can reach w in G[Ux ] \ S0 . If u can reach w in (G[Ux ] \ S0 ) − {v} = G[Uy ] \ S, then the arc (u, w) is already present in G. Otherwise, u reaches w via some arcs (u0 , v), (v, w0 ) ∈ B0 . The arcs (u0 , v) and (v, w0 ) are in G0 , since u0 , w0 ∈ Vx . Moreover, u reaches u0 and w0 reaches w in G[Ux ] \ S0 . Hence, there are arcs (u, u0 ) and arc (w0 , w) in G0 and u reaches w in G0 via u0 and w0 . By construction of G0 , it follows that G0 contains the arc (u, w). Finally, we verify Definition 5(iii); we show that P0 is a coarsening of Px (S0 ). For the sake of a contradiction, assume that there are two vertices u, w that are in the same set of Px (S0 ) but in different sets of P0 . By construction of P0 from P, this implies that u and w are in different sets of P and, therefore, in different connected components of G[Uy ] \ S. Thus, in order for u and w to be connected in G[Ux ] \ S0 , there are vertices u0 , w0 in the same connected components of G[Uy ] \ S as u and w, respectively, that are incident to arcs in B0 and, hence, u0 , w0 ∈ Pi ∈ P. But then, also u, w ∈ Pi ∈ P — a contradiction.  We now show that the minimum weight of a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x is at least Tabx (R, G, P) as computed by by Procedure 2. P ROOF ( OF L EMMA 6(ii) FOR INTRODUCE NODES ). Let x be an introduce node with child node y. Let v be the vertex “introduced”, that is, v < Vy but v ∈ Vx . Assume that S is a minimum-weight partial partitioning set for G[Ux ] satisfying the pattern (Rx , Gx , Px ) at x. Let B be the set of arcs incident to v in G[Ux ] and B00 := B ∩ S. It is sufficient to construct a pattern (R, G, P) that S \ B00 satisfies at y and from which Procedure 2 generates exactly the pattern (Rx , Gx , Px ) to update the table Tabx (Rx , Gx , Px ) with Taby (R, G, P) + ω(B) − ω(B0 ), where B0 = B \ B00 . Then, Lemma 6(ii) follows for introduce nodes, since Tabx (Rx , Gx , Px ) ≤ Taby (R, G, P) + ω(B) − ω(B0 ) ≤ ω(S \ B00 ) + ω(B) − ω(B0 ) = ω(S). It is easy to verify that S \ B00 is a partial partitioning set for G[Uy ] (Definition 3), since G[Uy ] \ (S \ B00 ) = (G[Ux ] \ S) − {v} and S is a partial partitioning set for G[Ux ]; to this end, observe that, by Definition 2(ii and iii) of a tree decomposition, v only has arcs B ⊆ A(G[Vx ]) incident to vertices in Vy . We now construct a pattern. Let R = Ry (S \ B00 ) and G = Gy (S \ B00 ). Let P be the partition obtained from Px by removing the vertex v from the set it is in or by removing the set {v} if it exists in Px . It is easy to verify that S \ B00 satisfies (R, G, P) at y: Definition 5(i) and (ii) are trivially satisfied by choice of R and G; Definition 5(iii) holds by construction of P from Px , since G[Uy ] \ (S \ B00 ) is a subgraph of G[Ux ] \ S. It remains to show that Procedure 2 applies to the pattern (R, P, G) and the set B0 in order to generate the pattern (Rx , Px , Px ). Since S satisfies (Rx , Gx , Px ) at x, all vertices incident to arcs in B0 (if any) are contained in the same set Pi ∈ Px and, hence, all of them except v are contained in the set Pi \ {v} ∈ P. Therefore, Procedure 2 applies to B0 and the pattern (R, G, P), produces some new pattern (R0 , G0 , P0 ), and updates Tabx (R0 , G0 , P0 ) with Taby (R, G, P) + ω(B) − ω(B0 ). It remains to show that, for at least one of the generated patterns, R0 = Rx , G0 = Gx , and P0 = Px . If B0 , 0/ then 0 P = Px by construction of P0 from P in Procedure 2. If B0 = 0, / then Px is clearly among the partitions P0 generated from P by Procedure 2. Moreover, we already proved in the proof of Lemma 6(i) that S = (S \ B00 ) ∪ (B \ B0 ) satisfies the pattern generated by Procedure 2 at x. Hence, R0 = Rx and G0 = Gx .  4.2.3. Join nodes We use the following procedure to compute the table Tabx of a join node x under the assumption that the tables Taby for all child nodes y of x have been computed correctly. 26 Procedure 3 (Join node). Let x be a join node with children y and z, that is, Vx = Vy = Vz . For each pair of patterns (R, Gy , Py ) for y and (R, Gz , Pz ) for z such that Py and Pz partition the vertices of Vy = Vz = Vx in the same way, we construct a new pattern (R, G, P) as follows. Let G0 be the graph containing all vertices and arcs of Gy and Gz , and for each u, w ∈ V (G0 ) such that u can reach w in G0 add the arc (u, w) to G0 . Note that by Definition 2(iii) of a tree decomposition, Gy and Gz have only the vertices in Vx in common. Let P0 be the partition of Vx that partitions Vx in the same way as Py and Pz . We extend P0 to a partition for the vertices of G0 : for each u ∈ V (G0 ) \Vx , add u to a set Pi of P0 that contains a vertex v with (v, u) being an arc of G0 . Since there are no arcs between different sets of P in Gy or Gz , there is exactly one such set Pi ∈ P0 . If we created some set P ∈ P0 with more than one vertex of V (G0 ) \Vx , then continue with a different pair of patterns. Otherwise, we update Tabx (R, G0 , P0 ) with Taby (R, Gy , Py ) + Tabz (R, Gz , Pz ) − ω(A(G[Vx ])) + ω(A(R)). We show that Procedure 3 fills the table associated with a join node x correctly. First, we show that there is a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x and having weight at most Tabx (R, G, P) as computed by Procedure 3. P ROOF ( OF L EMMA 6(i) FOR JOIN NODES ). Let x be a join node with child nodes y and z, that is, Vx = Vy = Vz . Let Sy be a partial partitioning set for G[Uy ] satisfying the pattern (R, Gy , Py ) at y and let Sz be a partial partitioning set for G[Uz ] satisfying the pattern (R, Gz , Pz ) at z. We show that S = Sy ∪ Sz is a partial partitioning set for G[Ux ] that satisfies the pattern (R, G0 , P0 ) constructed by Procedure 3. Since ω(S) = ω(Sy ) + ω(Sz ) − ω(Sy ∩ Sz ), wherein Sy ∩ Sz = A(G[Vx ]) \ A(R), Lemma 6(i) follows for join nodes. We show that S is indeed a partial partitioning set for G[Ux ], that is, we verify Definition 3. We first verify Definition 3(ii) and then use it to verify Definition 3(i). Let s ∈ Ux \Vx be a sink such that the connected component containing s in G[Ux ]\S contains a vertex of Vx . Then, s ∈ Uy \Vx or s ∈ Uz \Vx . Without loss of generality, let s ∈ Uy \Vx . From Definition 2(iii) of a tree decomposition, we see that Uz ∩Uy ⊆ Vx and, hence, G[Uy ] \ Sy = G[Ux ] \ S − (Uz \Vz ). It follows that there is also a connected component of G[Uy ] \ Sy = G[Ux ] \ S − (Uz \Vz ) that contains s and a vertex of Vx and, therefore, s is reachable from some vertex v ∈ Vx in G[Ux ] \ S − (Uz \Vz ) and, hence, in G[Ux ] \ S. It also follows that (v, s) is an arc in Gy and, by construction in Procedure 3, of G0 . To verify Definition 3(i), for the sake of a contradiction, assume that there is a connected component of G[Ux ] \ S that contains two sinks s1 , s2 in Ux \ Vx . Note that, by Definition 2(iii) of a tree decomposition, there are no arcs between Uy \ Vx and Uz \ Vx . Hence, this connected component contains a vertex v of Vx ; otherwise, it would be a connected component with two sinks outside of Vx already in either G[Uy ] \ Sy or G[Uz ] \ Sz . Thus, as seen in the previous paragraph, we have arcs (s01 , s1 ) and (s02 , s2 ) with s01 , s02 ∈ Vx . It follows by construction of P0 from G0 in Procedure 3 that s1 and s01 are in a set Pi ∈ P0 and s2 and s02 are in a set Pj ∈ P0 . We show i = j, which contradicts the construction of P0 , since then Pi = Pj contains two vertices s1 < Vx and s2 < Vx . Since s1 and s2 are in the same connected component of G[Ux ] \ S, also s01 and s02 are, since they can reach s1 and s2 , respectively. Hence, there is an undirected path p between s1 and s2 in G[Ux ] \ S. It consists of consecutive path segments p0 that only have their endpoints u, w in Vx (possibly, such a path segment only consists of one arc). It follows that such a path segment p0 is entirely contained in G[Uy ] \ Sy or G[Uz ] \ Sy and, hence, its endpoints u and w are in the same set of Py or Pz . Since u, w ∈ Vx , by construction of P0 in Procedure 3, u and w are in the same set of P0 . It follows that s01 and s02 are in the same set of P0 , and so are s1 and s2 . It follows that S is indeed a partial partitioning set for G[Ux ] \ S. It remains to verify that S satisfies the pattern (R, G0 , P0 ) (Definition 5). Herein, Definition 5(i), R = Rx (S), is trivial. We verify (ii), that is, Gx (S) = G0 . Herein, V (Gx (S)) ⊆ V (G0 ) we already verified when verifying Definition 3(ii). Now, assume that there are two vertices u, w in G0 such that u can reach w in G[Ux ] \ S. Since, then, u is not a sink, it is in Vx . The directed path from u to w consists of consecutive subpaths, each being entirely contained in G[Uy ] \ Sy or G[Uz ] \ Sz and thus, causing an arc in Gy or Gz and, therefore, in G0 . It follows that u can reach w in G0 , which therefore has an arc (u, w). In the opposite direction, for every arc (u, w) in G0 that is already in Gy or Gz , there is an directed path in either G[Uy ] \ Sy or in G[Uz ] \ Sz from u to w and, thus, u can reach w in G[Ux ] \ S. For an arc (u, w) in G0 that is neither present in Gy nor Gz , there is an directed path in G0 from u to w consisting only of arcs that are already present in Gy or Gz . Since we have seen that for each such arc there is a corresponding directed path in G[Ux ] \ S, we have that u can reach w in G[Ux ] \ S. For Definition 5(iii), it has been shown above that if two vertices of G0 are in the same connected component of G[Ux ] \ S, then they are in the same set in P0 .  27 We now show that the minimum weight of a partial partitioning set for G[Ux ] satisfying a pattern (R, G, P) at x is at least Tabx (R, G, P) as computed by by Procedure 3. P ROOF ( OF L EMMA 6(ii) FOR JOIN NODES ). Let x be a join node with the child nodes y and z, that is Vx = Vy = Vz . Assume that S is a minimum-weight partial partitioning set for G[Ux ] satisfying the pattern (R, Gx , Px ) at x. It is sufficient to construct patterns (R, Gy , Py ) and (R, Gz , Pz ) that are satisfied by Sy := S ∩ A(G[Uy ]) at y and by Sz := S ∩ A(G[Uz ]) at z, respectively, such that from these patterns Procedure 3 generates exactly the pattern (R, Gx , Px ) to update Tabx (R, Gx , Px ) with Taby (R, Gy , Py ) + Tabz (R, Gz , Pz ) − ω(A(G[Vx ])) + ω(A(R)) ≤ ω(Sy ) + ω(Sz ) − ω(Sy ∩ Sz ) = ω(S). We first show that Sy is a partial partitioning set for G[Uy ]. Symmetrically, it follows that Sz is a partial partitioning set for G[Uz ]. We first verify Definition 3(i). Since by Definition 2(iii), there are no arcs between vertices in Uy \Vy and Uz \ Vz in G[Ux ], it follows from G[Uy ] \ Sy = G[Ux ] \ S − (Uz \ Vz ) that no connected component of G[Uy ] \ Sy contains two sinks not in Vy = Vx . It remains to verify Definition 3(ii). To this end, let u be a sink in Uy \ Vy in a connected component of G[Uy ] \ Sy containing a vertex of Vy . Then, by Definition 3(ii), the connected component of G[Ux ] \ S containing u contains a directed path from some vertex in Vx to u. The subpath of this directed path that contains only one vertex of Vx is preserved in G[Uy ] \ Sy . Hence, u is reachable from some vertex of Vx = Vy . We now construct the patterns. To this end, let Gy := Gy (Sy ) and Gz := Gz (Sz ). Moreover, we choose Py and Pz such that they partition the set Vx = Vy = Vz in the same way as Px and such that the vertices of V (Gy ) \Vy (or V (Gz ) \Vz ) are in the same set as the other vertices of their connected components in G[Uy ] \ Sy (or G[Uz ] \ Sz ). We show that Sy satisfies (R, Gy , Py ) at y. Analogously, it then follows that Sz satisfies (R, Gz , Pz ) at z. We verify Definition 5. Since R = Rx (S) = Ry (Sy ) = Rz (Sz ) and Gy = Gy (Sy ) hold by definition, it remains to verify Definition 5(iii). To this end, observe that G[Uy ] \ Sy = G[Ux ] \ S − (Uy \Vy ). Now, assume, for the sake of a contradiction, that there are two vertices v, w of Gy in different sets of Py but in the same connected component of G[Uy ] \ Sy . It follows that v and w are in the same connected component of G[Ux ] \ S. If v, w ∈ Vy , then, by construction of Py from Px , the vertices v and w are in different sets of Px , contradicting Sx satisfying (R, Gx , Px ). If exactly one of v, w is in Vy , then v and w being in different sets of Py contradicts the construction of Py . If both v, w < Vy , then v and w are two bag-reachable sinks in G[Uy ], which contradicts v and w being in the same connected component of G[Uy ] \ Sy . Hence, indeed Sy satisfies (R, Gy , Py ) at y and Sz satisfies (R, Gz , Pz ) at z. Moreover, since Py and Pz partition Vx in the same way, Procedure 3 applies to the patterns (R, Gy , Py ) and (R, Gz , Pz ) and produces a pattern (R, G0 , P0 ). If no set of P0 contains more than one vertex of V (G0 ) \Vx , it indeed updates Tabx (R, G0 , P0 ). Hence it remains to show that G0 = Gx and P0 = Px , as no set of Px contains two vertices of V (Gx ) \Vx by Definition 4(iii). We already showed in the proof of Lemma 6(i) for join nodes that S satisfies the pattern (R, G0 , P0 ) generated by Procedure 3. Hence, G0 = Gx . Finally, by construction of P0 in Procedure 3, the vertices of Vx are partitioned the same way by P0 and Px . For a vertex v ∈ V (G0 ) \ Vx , there is a vertex u in Vx that can reach v in G0 and, therefore, in G[Ux ] \ S. Hence, u and v must be in the same set of both Px and P0 by construction of P0 in Procedure 3.  4.2.4. Running time Having shown the correctness of the Procedures 1–3, we can finally complete the proof of Theorem 6 by analyzing the running time of the procedures. P ROOF ( OF T HEOREM 6). Lemma 6 showed that the presented dynamic programming algorithm is correct, that is, it solves DAG PARTITIONING given a tree decomposition of the input graph. It remains to analyze the running time. To this end, recall that each bag in a tree decomposition of width t contains at most t + 1 vertices. This allows t+1 us to give an upper bound on the number of possible patterns (R, G, P). There are at most 3( 2 ) directed acyclic graphs R on at most t + 1 vertices: for each pair (v, w) of vertices: there is either no arc, or an arc from v to w, or 2t+2 an arc from w to v. Similarly, there are at most 3( 2 ) directed graphs G on at most 2t + 2 vertices. Moreover, there are at most (2t + 2)2t+2 partitions P of at most 2t + 2 vertices into at most 2t + 2 sets. Hence, each table has at most 28 2t+2 t+1 2 2 3( 2 ) · 3( 2 ) · (2t + 2)2t+2 = 3O(t +t logt) = 2O(t ) entries and looking up entries in the tables can be implemented to 2 run in O(log 2t ) time, which is polynomial in t. In each leaf node, we set the single table entry to 0 in constant time. In each forget node, Procedure 1 iterates over the entries of the table of the child node and for each entry spends 2 time polynomial in t. Thus, it spends a total of 2O(t ) time in each forget node. To analyze the running time Procedure 2 spends in an introduce node, observe that there are at most t arcs in A(G[Vx ]) incident to the introduced vertex v. Hence, there are at most 2t subsets of them. For each of these subsets 2 and for each entry of the child node, Procedure 2 spends time polynomial in t. This makes a total of 2O(t ) time spent in each introduce node. Finally, in a join node, Procedure 3 considers every pair of patterns of its two child nodes and for each combination 2 2 spends time polynomial in t. Hence, the total time spent in a join node is (2O(t ) )2 = 2O(t ) . 2 Since the nice tree decomposition has O(tn) nodes, the algorithm runs in 2O(t ) · n time.  5. Other parameters yield stronger NP-hardness results In Sections 3 and 4, we have seen that DAG PARTITIONING is solvable in linear time when fixing the weight of the partitioning set sought or the treewidth of the input graph. The question whether fixed-parameter algorithms can be obtained for parameters that are smaller than the solution weight or the treewidth naturally arises [29, 25, 14]. One parameter of interest is the maximum vertex outdegree in the graph: a citation network of journal articles will, for example, have a small outdegree since journal articles seldom contain more than 50 references. In this section, however, we will show that, among others, this parameter being small will not help solving DAG PARTITIONING efficiently. Alamdari and Mehrabian [1] already showed that DAG PARTITIONING remains NP-hard even if the input graph has only two sinks. We complement this negative result by showing that the problem remains NP-hard even if the diameter or the maximum vertex degree of the input graph are constant. In conclusion, parameters like the number of sinks, the graph diameter or maximum degree cannot lead to fixed-parameter algorithms unless P = NP. Theorem 7. DAG PARTITIONING is solvable in linear time on graphs of diameter one, but NP-complete on graphs of diameter two even if all arcs have unit weight. P ROOF. On graphs of diameter one, the problem is trivial: a directed acyclic graph with diameter one is an acyclic tournament, that is, there is no pair of vertices not joined by an arc. As such, it already contains exactly one source and one sink. Hence, we just verify in linear time whether the input graph is an acyclic tournament and answer “yes” or “no” accordingly. For graphs of diameter two, we show NP-hardness by means of a polynomial-time many-one reduction from DAG PARTITIONING, which is NP-hard even when all arcs have weight one. Therefore, we agree on all arcs in this proof having weight one. Given an arbitrary instance (G, ω, k) of DAG PARTITIONING, we add a gadget to G to obtain in polynomial time an instance (G0 , ω 0 , k0 ) such that G0 is a graph of diameter two and such that (G, ω, k) is a yes-instance if and only if (G0 , ω 0 , k0 ) is a yes-instance. We obtain a graph G0 from G by adding an acyclic tournament T consisting of k + n + 2 vertices and outgoing arcs from the source s of T to all vertices of V (G) in G0 . We set k0 := k + n. Since every vertex in G0 is in distance one from s, the constructed graph G0 has diameter two. If (G, ω, k) is a yes-instance, then let S be a partitioning set with k arcs for G. A partitioning set S0 with k0 arcs for G0 is obtained by adding to S the n arcs from the source s of T to all vertices of V (G) in G0 . Thus, (G0 , ω 0 , k) is a yes-instance. If (G0 , ω 0 , k0 ) is a yes-instance, then let S0 be a partitioning set with k0 arcs for G0 . By Observation 2, every vertex in V (G) reaches at least one sink in G0 \ S0 . This sink cannot be the sink of T , since no vertex in T is reachable from V (G). Thus, S0 has to disconnect the sink of T from all vertices of V (G) in G0 , where all paths between the sink of T and V (G) are via the source s of T . Since T has k + n + 2 vertices, S0 cannot disconnect s from the sink of T and thus, has to remove from G0 the n arcs connecting s to the vertices of V (G). Then, the remaining k arcs in S0 have to be a partitioning set for G0 without the tournament T , which is precisely the original graph G. Thus, (G, ω, k) is a yes-instance.  29 t1 t2 v2 t3 e{t1 ,t2 } Z e{t1 ,v1 } Y v1 t1 e{v1 ,t2 } e{t2 ,v2 } v1 t2 e{v2 ,t3 } v2 t3 X s1 s2 s3 Figure 13: Reduction from a M ULTIWAY C UT instance with the terminals t1 ,t2 , and t3 to DAG PARTITIONING. The top shows an instance I1 of M ULTIWAY C UT, where the dotted edges are a multiway cut of size k1 = 3. The bottom shows the corresponding instance I2 of DAG PARTITIONING, where the dotted arcs are a corresponding partitioning set of size k2 = k1 + 2(n − 3) = 7 (n is the number of vertices in the graph of the M ULTIWAY C UT instance). The constructed vertex sets X,Y , and Z are highlighted using a gray background. Theorem 8. DAG PARTITIONING is solvable in linear time on graphs of maximum degree two, but NP-complete on graphs of maximum degree three even if all arcs have unit weight. P ROOF. Any graph of maximum degree two consists of undirected cycles or undirected paths. Thus, the underlying graph has treewidth at most two. We have seen in Theorem 6 that DAG PARTITIONING is linear-time solvable when the treewidth of the input graph is bounded by a constant. We prove the NP-hardness on graphs of maximum degree three. To this end, we adapt the polynomial-time manyone reduction from M ULTIWAY C UT to DAG PARTITIONING presented by Leskovec et al. [26]. In their reduction, we replace vertices of degree greater than three by equivalent structures of lower degree. M ULTIWAY C UT Input: An undirected graph G = (V, E), a weight function ω : E → N, a set T ⊆ V of terminals, and an integer k. Question: Is there a subset S ⊆ E with ∑e∈S ω(e) ≤ k such that the removal of S from G disconnects each terminal from all the others? We first recall the reduction from M ULTIWAY C UT to DAG PARTITIONING. From a M ULTIWAY C UT instance I1 := (G1 , ω1 , T, k1 ), we construct in polynomial time a DAG PARTITIONING instance I2 := (G2 , ω2 , k2 ) such that I1 is a yes-instance if and only if I2 is. From I2 , we then obtain an instance I3 with maximum degree three. Since M ULTIWAY C UT remains NP-hard even for three terminals and unit weights [11], we may assume |T | = 3 and, similarly as in the proof of Theorem 7, we agree on all arcs in this proof having weight one. We now construct the DAG PARTITIONING instance I2 = (G2 , ω2 , k2 ) from I1 = (G1 , ω1 , T, k1 ) as follows. The construction is illustrated in Figure 13. 1. Add three vertices s1 , s2 , s3 to G2 , forming the vertex set X, 2. add each vertex of G1 to G2 , forming the vertex set Y , 3. for each edge {u, v} of G1 , add a vertex e{u,v} to G2 , forming the vertex set Z, 4. for each terminal ti ∈ T , add the arc (ti , si ) to G2 , 5. for each vertex v ∈ Y \ T , add the arcs (v, si ) for i = 1, 2, 3 to G2 , and 6. for each edge {u, v} of G1 , add the arcs (e{u,v} , u) and (e{u,v} , v) to G2 . 30 w1 w3 w2 w4 w1 w3 w2 w4 w02 w03 w04 v v v0 s1 s2 s3 s1 Tv s2 s3 Figure 14: Reduction of the degree of a vertex v to three. On the left, the original neighborhood of v is shown. The right side shows v after modification. The tree structure Tv constructed in the proof is highlighted using a gray background. Set k2 = k1 + 2(n − 3), where n is the number of vertices of G1 . We claim that I1 is a yes-instance if and only if I2 is a yes-instance. First, suppose that there is a multiway cut S of size at most k1 for G1 . Then, we obtain a partitioning set of size at most k2 for G2 as follows: if a vertex v belongs to the same connected component of G1 \ S as terminal ti , then remove every arc (v, s j ) with j , i from G2 . Furthermore, for each edge {u, v} ∈ S, remove either the arc (e{u,v} , u) or the arc (e{u,v} , v) from G2 . One can easily check that we end up with a valid partitioning set of size k2 = k + 2(n − 3) for G2 : we delete at most k arcs from Z to Y and, for each of the n − 3 vertices in Y \ T , delete two arcs from Y to X. There are no arcs from X to Z. Conversely, suppose that we are given a minimal partitioning set S of size at most k2 for G2 . Note that it has to remove at least two of the three outgoing arcs of each vertex v2 ∈ Y \ T but cannot remove all three of them: contrary to Observation 1, this would create a new sink. Thus, S deletes 2(n − 3) arcs from Y to X and the remaining k2 − 2(n − 3) = k1 arcs from Z to Y . Therefore, we can define the following multiway cut of size k1 for G1 : remove an edge {u, v} from G1 if and only if one of the arcs (e{u,v} , u) and (e{u,v} , v) is removed from G2 by S. Again, one can easily check that we end up with a valid multiway cut. It remains to modify the instance I2 = (G2 , ω2 , k2 ) to get an instance I3 = (G3 , ω3 , k3 ) of maximum degree three. To this end, first we show how to reduce the outdegree of each vertex of G2 to two. Thereafter, we show how to reduce the indegree of each vertex of G2 to one by introducing gadget vertices, each having indegree two and outdegree one. The construction is illustrated in Figure 14. Note that all vertices of G2 with outdegree larger than two are in Y . In order to decrease the degree of these vertices, we obtain a graph G03 from G2 by carrying out the following modifications (see Figure 14) to G2 : for each vertex v ∈ Y , with N + (v) = {s1 , s2 , s3 }, remove (v, s1 ) and (v, s2 ) add a new vertex v0 , and insert the three arcs (v, v0 ), (v0 , s1 ), and (v0 , s2 ). We show that (G03 , ω30 , k2 ) is a yes-instance if and only if (G2 , ω2 , k2 ) is. To this end, for v ∈ Y , let Tv be the induced subgraph G03 [{v, v0 , s1 , s2 , s3 }]. In G2 , a minimal partitioning set removes exactly two of the outgoing arcs of v, since s1 , s2 , and s3 are sinks. It is enough to show that a minimal partitioning set S removes exactly two arcs in Tv from G03 in such a way that there remains exactly one directed path from v to exactly one of s1 , s2 , or s3 . This remaining directed path then one-to-one corresponds to the arc that a partitioning set would leave in G2 between v and s1 , s2 , or s3 . Since s1 , s2 , and s3 are sinks, S indeed has to remove at least two arcs from Tv : otherwise, two sinks will belong to the same connected component. However, due to Observation 1, S cannot remove more than two arcs from Tv . Moreover, again exploiting Observation 1, the two arcs removed by S leave a single directed path from v to exactly one of s1 , s2 , or s3 . We have seen that (G03 , ω30 , k2 ) is equivalent to (G2 , ω2 , k2 ) and that all vertices of G03 have outdegree two. To shrink 31 the overall maximum degree to three, it remains to reduce the indegrees. Note that the vertices newly introduced in the previous step already have indegree one. We obtain graph G3 of maximum degree three from G03 as follows. For each vertex v with |N − (v)| = |{w1 , . . . , wd − (v) }| ≥ 2, do the following (see Figure 14): for j = 2, . . . , d − (v), remove the arc (w j , v) and add a vertex w0j together with the arc (w j , w0j ). Moreover, add the arcs (w1 , w02 ), (wd − (v) , v), and (w0j , w0j+1 ) for each j ∈ {2, . . . , d − (v) − 1}. Now, every vertex of V (G03 ) in G3 has indegree one and outdegree two, while the newly introduced vertices have indegree two and outdegree one. It follows that all vertices in G3 have degree at most three. It remains to show that (G3 , ω3 , k2 ) is a yes-instance if and only if (G03 , ω30 , k2 ) is. It then follows that (G3 , ω3 , k2 ) is a yes-instance if and only if (G2 , ω2 , k2 ) is. To this end, note that by Observation 1, among the introduced arcs, only the arcs w1 , w02 and (w j , w0j ) can be removed by a minimal partitioning set. From this, there is a one-to-one correspondence between deleting the arc w1 , w02 or (w j , w0j ) in the graph G3 and deleting the arc (w j , v) in the graph G03 .  6. Outlook We have presented two fixed-parameter algorithms for DAG PARTITIONING, one with respect to the weight k of the partitioning set sought and one with respect to the parameter treewidth t. We demonstrated the feasibility of applying the fixed-parameter algorithm for the parameter k (Algorithm 1) to large input instances with optimal partitioning sets of small weight. However, we were unable to solve the instances in the data set of Leskovec et al. [26], since the weight of optimal partitioning sets is too large. We found out that the heuristic presented by Leskovec et al. [26] finds nearly optimal partitioning sets on the instances that our algorithm works on best. However, we have also seen that one does not have to specially craft adversarial instances to make the heuristic perform badly. Surprisingly, our algorithm for DAG PARTITIONING is much simpler and more efficient than the algorithm for M ULTIWAY C UT by Xiao [34], although M ULTIWAY C UT is much easier to approximate than DAG PARTITIONING [23, 1]. On the theoretical side, we improved a fixed-parameter algorithm by Alamdari and Mehrabian [1] such that the running time now depends on the treewidth of the input graph rather than on its pathwidth. However, our algorithm, as well as the algorithm of Alamdari and Mehrabian [1], are practically inapplicable. Towards solving the instances of Leskovec et al. [26] exactly in reasonable time, a challenging task would be to analyze the data used by Leskovec et al. [26] in order to find parameters that are small and make DAG PARTITIONING fixed-parameter tractable, that is, to take a data-driven approach to parameterizing DAG PARTITIONING. Acknowledgments We are thankful to Rolf Niedermeier and to the anonymous referees of CIAC’13 and Discrete Applied Mathematics for helpful comments. René van Bevern acknowledges supported by the Russian Foundation for Basic Research (RFBR), project 16-3160007 mol a dk, while working at Novosibirsk State University, and by the German Research Foundation (DFG), project DAPA (NI 369/12), while working at TU Berlin. Robert Bredereck acknowledges support by DFG project PAWS (NI 369/10). Morgan Chopin was supported by the DAAD during a three-month visit to TU Berlin in summer 2012. Falk Hüffner acknowledges support by DFG projects PABI (NI 369/7) and ALEPH (HU 2139/1). Ondřej Suchý acknowledges support by DFG project AREG (NI 369/9) while at TU Berlin and by the Czech Science Foundation, project 14-13017P. References [1] S. Alamdari and A. Mehrabian. On a DAG partitioning problem. In Proceedings of the 9th International Workshop on Algorithms and Models for the Web Graph (WAW’12), volume 7323 of Lecture Notes in Computer Science, pages 17–28. Springer, 2012. doi: 10.1007/ 978-3-642-30541-2 2. [2] A.-L. Barabási and R. Albert. Emergence of scaling in random networks. Science, 286(5439):509–512, 1999. doi: 10.1126/science.286.5439. 509. [3] R. van Bevern. Towards optimal and expressive kernelization for d-Hitting Set. Algorithmica, 70(1):129–147, 2014. doi: 10.1007/ s00453-013-9774-3. 32 [4] R. van Bevern, S. Hartung, F. Kammer, R. Niedermeier, and M. Weller. Linear-time computation of a linear problem kernel for Dominating Set on planar graphs. In Proceedings of the 6th International Symposium on Parameterized and Exact Computation (IPEC’11), volume 7112 of Lecture Notes in Computer Science, pages 194–206. Springer, 2012. doi: 10.1007/978-3-642-28050-4 16. [5] R. van Bevern, R. Bredereck, M. Chopin, S. Hartung, F. Hüffner, A. Nichterlein, and O. Suchý. Parameterized complexity of DAG Partitioning. In Proceedings of the 8th International Conference on Algorithms and Complexity (CIAC’13), number 7878 in Lecture Notes in Computer Science, pages 49–60. Springer, 2013. [6] H. L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM Journal on Computing, 25(6):1305–1317, 1996. doi: 10.1137/S0097539793251219. [7] H. L. Bodlaender. Kernelization: New upper and lower bound techniques. In Proceedings of the 4th International Workshop on Parameterized and Exact Computation (IWPEC’09), volume 5917 of Lecture Notes in Computer Science, pages 17–37. Springer, 2009. doi: 10.1007/ 978-3-642-11269-0 2. [8] H. L. Bodlaender, B. M. P. Jansen, and S. Kratsch. Kernelization lower bounds by cross-composition. SIAM Journal on Discrete Mathematics, 28(1):277–305, 2014. doi: 10.1137/120880240. [9] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. MIT Press, 2nd edition, 2001. [10] M. Cygan, F. V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. Parameterized Algorithms. Springer, 2015. doi: 10.1007/978-3-319-21275-3. [11] E. Dahlhaus, D. S. Johnson, C. H. Papadimitriou, P. D. Seymour, and M. Yannakakis. The complexity of multiterminal cuts. SIAM Journal on Computing, 23(4):864–894, 1994. doi: 10.1137/S0097539792225297. [12] R. G. Downey and M. R. Fellows. Fundamentals of Parameterized Complexity. Springer, 2013. doi: 10.1007/978-1-4471-5559-1. [13] S. Fafianie and S. Kratsch. A shortcut to (sun)flowers: Kernels in logarithmic space or linear time. In Proceedings of the 40th International Symposium on Mathematical Foundations of Computer Science (MFCS’15), volume 9235 of Lecture Notes in Computer Science, pages 299–310. Springer, 2015. doi: 10.1007/978-3-662-48054-0 25. [14] M. R. Fellows, B. M. P. Jansen, and F. A. Rosamond. Towards fully multivariate algorithmics: Parameter ecology and the deconstruction of computational complexity. European Journal of Combinatorics, 34(3):541–566, 2013. doi: 10.1016/j.ejc.2012.04.008. [15] J. Flum and M. Grohe. Parameterized Complexity Theory. Springer, 2006. doi: 10.1007/3-540-29953-X. [16] L. Fortnow and R. Santhanam. Infeasibility of instance compression and succinct PCPs for NP. Journal of Computer and System Sciences, 77 (1):91–106, 2011. doi: 10.1145/1374376.1374398. [17] J. Guo and R. Niedermeier. Invitation to data reduction and problem kernelization. ACM SIGACT News, 38(1):31–45, 2007. doi: 10.1145/ 1233481.1233493. [18] T. Hagerup. Simpler linear-time kernelization for Planar Dominating Set. In Proceedings of the 6th International Symposium on Parameterized and Exact Computation (IPEC’11), volume 7112 of Lecture Notes in Computer Science, pages 181–193. Springer, 2012. doi: 10.1007/ 978-3-642-28050-4 15. [19] R. Impagliazzo and R. Paturi. On the complexity of k-SAT. Journal of Computer and System Sciences, 62(2):367–375, 2001. doi: 10.1006/jcss.2000.1727. [20] R. Impagliazzo, R. Paturi, and F. Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63 (4):512–530, 2001. doi: 10.1006/jcss.2001.1774. [21] H. Jeong, Z. Néda, and A. L. Barabási. Measuring preferential attachment in evolving networks. Europhysics Letters, 61(4):567–572, 2003. doi: 10.1209/epl/i2003-00166-9. [22] F. Kammer. A linear-time kernelization for the rooted k-leaf outbranching problem. Discrete Applied Mathematics, 193:126–138, 2015. doi: 10.1016/j.dam.2015.04.028. [23] D. R. Karger, P. Klein, C. Stein, M. Thorup, and N. E. Young. Rounding algorithms for a geometric embedding of Minimum Multiway Cut. Mathematics of Operations Research, 29(3):436–461, 2004. doi: 10.1287/moor.1030.0086. [24] T. Kloks. Treewidth. Computations and Approximations, volume 842 of Lecture Notes in Computer Science. Springer, 1994. [25] C. Komusiewicz and R. Niedermeier. New races in parameterized algorithmics. In Proceedings of the 37th International Symposium on Mathematical Foundations of Computer Science (MFCS’12), volume 7464 of Lecture Notes in Computer Science, pages 19–30. Springer, 2012. doi: 10.1007/978-3-642-32589-2 2. [26] J. Leskovec, L. Backstrom, and J. Kleinberg. Meme-tracking and the dynamics of the news cycle. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD’09), pages 497–506. ACM, 2009. doi: 10.1145/1557019.1557077. [27] S. Lohr. Study measures the chatter of the news cycle. New York Times, July 13th:B1, 2009. New York edition. [28] R. Niedermeier. Invitation to Fixed-Parameter Algorithms. Oxford University Press, 2006. doi: 10.1093/acprof:oso/9780198566076.001.0001. [29] R. Niedermeier. Reflections on multivariate algorithmics and problem parameterization. In Proceedings of the 27th International Symposium on Theoretical Aspects of Computer Science (STACS’10), volume 5 of LIPIcs, pages 17–32. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2010. doi: 10.4230/LIPIcs.STACS.2010.2495. [30] R. Niedermeier and P. Rossmanith. A general method to speed up fixed-parameter-tractable algorithms. Information Processing Letters, 73 (3-4):125–129, 2000. doi: 10.1016/S0020-0190(00)00004-1. [31] D. D. S. Price. A general theory of bibliometric and other cumulative advantage processes. Journal of the American Society for Information Science, 27(5):292–306, 1976. doi: 10.1002/asi.4630270505. [32] F. Protti, M. Dantas da Silva, and J. Szwarcfiter. Applying modular decomposition to parameterized cluster editing problems. Theory of Computing Systems, 44(1):91–104, 2009. doi: 10.1007/s00224-007-9032-7. [33] C. Suen, S. Huang, C. Eksombatchai, R. Sosic, and J. Leskovec. NIFTY: A system for large scale information flow tracking and clustering. In Proceedings of the 22nd International Conference on World Wide Web (WWW’13), pages 1237–1248. IW3C2, 2013. doi: 10.1145/2488388. 2488496. [34] M. Xiao. Simple and improved parameterized algorithms for multiterminal cuts. Theory of Computing Systems, 46(4):723–736, 2010. doi: 10.1007/s00224-009-9215-5. 33
8cs.DS
Dichotomy for Digraph Homomorphism Problems arXiv:1701.02409v4 [cs.CC] 29 Jul 2017 Tomás Feder∗ Jeff Kinne † Arash Rafiey ‡ Abstract Update – An issue has been found in the correctness of our algorithm, and we are working to resolve the issue. Until a resolution is found, we retract our main claim that our approach gives a combinatorial solution to the CSP conjecture. We remain hopeful that we can resolve the issues. We thank Ross Willard for carefully checking the algorithm and pointing out the mistake in the version of this manuscript. We briefly explain one issue at the beginning of the text, and leave the rest of the manuscript intact for the moment . Ross Willard is posting a more involved description of a counter-example to the algorithm in the present manuscript. We have an updated manuscript that corrects some issues while still not arriving at a full solution; we will keep this private as long as unresolved issues remain. Previous abstract – We consider the problem of finding a homomorphism from an input digraph G to a fixed digraph H. We show that if H admits a weak-near-unanimity polymorphism φ then deciding whether G admits a homomorphism to H (HOM(H)) is polynomial time solvable. This confirms the conjecture of Maroti and McKenzie [MM08], and consequently implies the validity of the celebrated dichotomy conjecture due to Feder and Vardi [FV93]. We transform the problem into an instance of the list homomorphism problem where initially all the lists are full (contain all the vertices of H). Then we use the polymorphism φ as a guide to reduce the lists to singleton lists, which yields a homomorphism if one exists. 1 Introduction Update – discussion of counter-example to correctness of the algorithm in this manuscript – In this brief update we aim the discussion at those who already are familiar with our ∗ 268 Waverley Street, Palo Alto, CA 94301, United States, [email protected] Indiana State University, IN, USA, [email protected] ‡ Indiana State University, IN, USA [email protected] and Simon Fraser University, BC, Canada, [email protected] † 1 approach from reading this or another manuscript. Our algorithm makes a decision based on the output of a test Tx,a,b on a smaller instance of the homomorphism problem. Here a, b are possible images for x ∈ V (G), of a homomorphism from G to H. The present manuscript assumes that the test Tx,a,b outputs“yes” and based on the correctness of the test a is removed from further consideration for x. The test Tx,a,b uses the properties of the weak-nuf polymorphism φ. However, it is conceivable that the test Tx,a,b fails and this means we should not remove a from the list of possible images of x. We had incorrectly claimed in the manuscript that the properties of φ and pre-tests in the algorithm gaurtanee the test always passes. But we can simply construct such an example where the test must fail in the algorithm as follows. Let H be a digraph with two weakly connected components H1 , H2 . The weak nuf polymorphism φ could be of arity 3 and such that for every a ∈ H1 and every b ∈ H2 , φ(a, b, b) = φ(b, b, a) = φ(b, a, b) = c for some c ∈ H2 . Suppose there exists a homomorphism from G (weakly connected) to H that maps x to a and hence the entire graph G must be mapped to H1 . Moreover, suppose there is no homomorphism from G to H2 . The algorithm does consider the test Tx,a,b eventually for such G and H. According to the test Tx,a,b , we remove a from further consideration for x which leads us to remove the possible homomorphism from G to H. Note that one can assume H is weakly connected as follows. Suppose H1 , H2 are balanced digraphs with ` levels (we can partitioned the vertics of Hi , i = 1, 2, into ` parts where all the arcs of Hi go from a vertex in some part j to part j + 1). Then an extra vertex a0 can be added and connected to all the vertices of H1 , H2 on the lowest level. This way we obtain the weakly connected digraph H = H1 ∪ H2 ∪ {a0 } with ` + 1 levels. We may assume G is also balanced and has ` levels. An extra vertex x0 can be added to G with arcs to every vertex of G on the lowest level. Now G0 = G ∪ {x0 } is also a balanced digraph with ` + 1 levels. Note that in any homomorphism from G0 to H, x0 must be mapped to a0 and any other vertex of G0 must map to H − {x}. We note that Ross Willard may post a concrete counter-example (and further discussion of his example) for which H contains 197 vertices in H. The example is inspired from instances of the CSP problem, so called Semi-lattice block Maltsev. Previous introduction – For a digraph G, let V (G) denote the vertex set of G and let A(G) denote the arcs (aka edges) of G. An arc (u, v) is often written as simply uv to shorten expressions. Let |G| denote the number of vertices in G. A homomorphism of a digraph G to a digraph H is a mapping g of the vertex set of G to the vertex set of H so that for every arc uv of G the image g(u)g(v) is an arc of H. A natural decision problem is whether for given graphs G and H there is a homomorphism of G to H. If we view graphs as digraphs in which each edge is replaced by the two opposite directed arcs, we may apply the definition to graphs as well. An easy reduction from the k-coloring problem shows that this decision problem is N P -hard: a graph G admits a 3-coloring if and only if there is a homomorphism from G to K3 , the complete graph on 3 vertices. As a homomorphism is easily verified if the mapping is given, the homomorphism problem is 2 contained in N P and is thus N P -complete. The following version of the problem has attracted much recent attention. For a fixed digraph H the problem HOM (H) asks if a given input digraph G admits a homomorphism to H. Note that while the above reduction shows HOM (K3 ) is NP-complete, HOM (H) can be easy (in P ) for some graphs H: for instance if H contains a vertex with a selfloop, then every graph G admits a homomorphism to H. Less trivially, for H = K2 (or more generally, for any bipartite graph H), there is a homomorphism from G to K2 if and only if G is bipartite. A very natural goal is to identify precisely for which digraphs H the problem HOM (H) is easy. In the case of graphs the classification has turned out to be this: if H contains a vertex with a self-loop or is bipartite, then HOM (H) is in P , otherwise it is N P -complete [HN90] (see [B05, S10] for shorter proofs). This classification result implies a dichotomy of possibilities for the problems HOM (H) when H is a graph, each problem being N P -complete or in P . However, the dichotomy of HOM (H) remained open for general digraphs H. It was observed by Feder and Vardi [FV93] that this problem is equivalent to the dichotomy of a much larger class of problems in N P , in which H is a fixed finite relational structure. These problems can be viewed as constraint satisfaction problems with a fixed template H [FV93], written as CSP (H). A constraint satisfaction problem CSP (H) consists of (a) a relational structure H that specifies a set V of variables that each come from some domain D and (b) a set C of constraints giving restrictions on the values allowed on the variables. The question is whether all constraints can be simultaneously satisfied. 3SAT is a prototypical instance of CSP, where each variable takes values of true or false (a domain size of two) and the clauses are the constraints. Digraph homomorphism problems can also easily be converted into CSPs: the variables V are the vertices of G, each must be assigned a vertex in H (meaning a domain size of |V (H)|), and the constraints encode that each arc of G must be mapped to an arc in H. Feder and Vardi argued in [FV93] that in a well defined sense the class of problems CSP (H) would be the largest subclass of N P in which a dichotomy holds. A fundamental result of Ladner [L75] asserts that if P 6= N P then there exist N P -intermediate problems (problems neither in P nor N P -complete), which implies that there is no such dichotomy theorem for the class of all N P problems. Non-trivial and natural subclasses which do have dichotomy theorems are of great interest. Feder and Vardi made the following Dichotomy Conjecture: every problem CSP (H) is N P -complete or is in P . This problem has animated much research in theoretical computer science. For instance the conjecture has been verified when H is a conservative relational structure [B11], or a digraph with all in-degrees and all-out-degrees at least one [BKN09]. Numerous special cases of this conjecture have been verified [ABISV09, B06, BH90, BHM88, CVK10, D00, F01, F06, FMS04, LZ03, S78]. It should be remarked that constraint satisfaction problems encompass many well known computational problems, in scheduling, planning, database, artificial intelligence, and constitute an important area of applications, in addition to their interest in theoretical computer 3 science [CKS01, D92, V00, K92]. While the paper of Feder and Vardi [FV93] did identify some likely candidates for the boundary between easy and hard CSP -s, it was the development of algebraic techniques by Jeavons [J98] that lead to the first proposed classification [BJK05]. The algebraic approach depends on the observation that the complexity of CSP (H) only depends on certain symmetries of H, the so-called polymorphisms of H. For a digraph H a polymorphism φ of arity k on H is a homomorphism from H k to H. Here H k is a digraph with vertex set {(a1 , a2 , . . . , ak )|a1 , a2 , . . . , ak ∈ V (H)} and arc set {(a1 , a2 , . . . , ak )(b1 , b2 , . . . , bk ) | ai bi ∈ A(H) for all 1 ≤ i ≤ k}. For a polymorphism φ, φ(a1 , a2 , . . . , ak )φ(b1 , b2 , . . . , bk ) is an arc of H whenever (a1 , a2 , . . . , ak )(b1 , b2 , . . . , bk ) is an arc of H k . Over time, one concrete classification has emerged as the likely candidate for the dichotomy. It is expressible in many equivalent ways, including the first one proposed in [BJK05]. There were thus a number of equivalent conditions on H that were postulated to describe which problems CSP (H) are in P . For each, it was shown that if the condition is not satisfied then the problem CSP (H) is N P -complete (see also the survey [HN08]). One such condition is the existence of a weak near-unanimity polymorphism (Maroti and McKenzie [MM08]). A polymorphism φ of H of arity k is a k near unanimity polymorphism (k-nu) on H, if φ(a, a, . . . , a) = a for every a ∈ V (H), and φ(a, a, . . . , a, b) = φ(a, a, . . . , b, a) = · · · = φ(b, a, . . . , a) = a for every a, b ∈ V (H). If we only have φ(a, a, . . . , a) = a for every a ∈ V (H) and φ(a, a, . . . , a, b) = φ(a, a, . . . , b, a) = · · · = φ(b, a, . . . , a) [not necessarily a] for every a, b ∈ V (H), then φ is a weak k-near unanimity function (weak k-nu). Given the N P -completeness proofs that are known, the proof of the Dichotomy Conjecture reduces to the claim that a relational structure H which admits a weak near-unanimity polymorphism has a polynomial time algorithm for CSP (H). As mentioned earlier, Feder and Vardi have shown that is suffices to prove this for HOM (H) when H is a digraph. This is the main result of our paper. Note that the real difficulty in the proof of the graph dichotomy theorem in [HN90] lies in proving the N P -completeness. By contrast, in the digraph dichotomy theorem proved here it is the polynomial-time algorithm that has proven more difficult. While the main approach in attacking the conjecture has mostly been to use the highly developed techniques from logic and algebra, and to obtain an algebraic proof, we go in the opposite direction and develop a combinatorial algorithm. Our main result is the following. Theorem 1.1 Let H be a digraph that admits a weak near-unanimity function. Then HOM (H) is in P . Deciding whether an input digraph G admits a homomorphism to H can be done in time O(|G|3 |H|k+1 ) (k is the arity of the weak near-unanimity function). Together with the N P -completeness result of [MM08], this settles the CSP Conjecture in the affirmative. We note that H is fixed and also k ≤ 2|H| according to [JB17]. Therefore we may consider O(|G|3 ) as running time in Theorem 1.1. 4 Our Methods, Very High Level View We start with a general digraph H and a weak k-nu φ of H. We turn the problem HOM (H) into a related problem of seeking a homomorphism with lists of allowed images. The list homomorphism problem for a fixed digraph H, denoted LHOM (H), has as input a digraph G, and for each vertex x of G an associated list (set) of vertices L(x) ⊆ V (H), and asks whether there is a homomorphism g of G to H such that for each x ∈ V (G), the image g(x) is in L(x). Such a homomorphism is called a list homomorphism of G to H with respect to the lists L. List homomorphism problems are known to have nice dichotomies. For instance when H is a reflexive graph (each vertex has a loop), the problem LHOM (H) is polynomial when H is an interval graph and is N P complete otherwise [FH98]. Similar list homomorphism dichotomies were proved for general graphs [FHH03, FHH07], and more recently also for digraphs [HR11]. In fact, motivated by the results in [FH98, FHH03], Bulatov [B11] proved that the list version of constraint satisfaction problems has a dichotomy for general relational systems. It is not difficult to see that there are digraphs H such that HOM (H) is polynomial while LHOM (H) is N P -complete. For instance, the reflexive four-cycle H has loops and so HOM (H) is trivial, while LHOM (H) is NP-complete since H is not an interval graph. However, we transform the problem HOM (H) into a restricted version of LHOM (H) in which the lists satisfy an additional property related to the weak k-nu φ. One of the common ingredients in CSP algorithms is the use of consistency checks to reduce the set of possible values for each variable (see, for example the algorithm outlined in [HN04] for CSP (H) when H admits a near unanimity function). Our algorithm includes such a consistency check as a first step. We begin by performing a pair consistency check of the list of vertices in the input digraph G. For each pair (x, y) of V (G) × V (G) we consider a list of possible pairs (a, b), a ∈ L(x) (the list in H associated with x ∈ G) and b ∈ L(y). Note that if xy is an arc of G and ab is not an arc of H then we remove (a, b) from the list of (x, y). Moreover, if (a, b) ∈ L(x, y) and there exists z such that there is no c for which (a, c) ∈ L(x, z) and (c, b) ∈ L(z, y) then we remove (a, b) from the list of (x, y). We continue this process until no list can be modified. If there are empty lists then clearly there is no list homomorphism. After performing pair consistency checks (and repeating the consistency checks throughout the algorithm), the main structure of the algorithm is to perform pairwise elimination, which focuses on two vertices a, b of H that occur together in some list L(x), x ∈ V (G), and finds a way to eliminate a or b from L(x) without changing a feasible problem into an unfeasible one. In other words if there was a list homomorphism with respect to the old lists L, there will still be one with respect to the updated lists L. This process continues until either a list becomes empty, certifying that there is no homomorphism with respect to L (and hence no homomorphism at all), or until all lists become singletons, specifying a concrete homomorphism of G to H. This technique, due to the last author, has been successfully used in several other papers [HR11, HR12, EHLR14]. In this paper, the choice of which a or b is eliminated, and how, is governed by the given weak near-unanimity polymorphism φ. In fact, we define a family of mappings fx , x ∈ V (G) which are each polymorphisms 5 derived from φ and use these polymorphisms as a guide. The heart of the algorithm is a delicate procedure for updating the lists L(x) and polymorphisms fx in such a way that (i) feasibility is maintained, and (ii) the polymorphisms fx remain polymorphisms (which is key to maintaining feasibility). We present two approaches where the first algorithm is recursive and the second algorithm is not recursive. For the sake of the completeness we repeat the definitions in both parts. The introduction is presented once. We think the first algorithm is conceptually is easier to follow. 2 First Approach (recursive algorithm ) An oriented walk (path) is obtained from a walk (path) by orienting each of its edges. The net-length of a walk W , is the number of forward arcs minus the number of backward arcs following W from the beginning to the end. An oriented cycle is obtained from a cycle by orienting each of its edges. We say two oriented walks X, Y are congruent if they follow the same patterns of forward and backward arcs. Given digraphs G and H, let G × H k be a digraph on the vertices {(y; a1 , a2 , . . . , ak )|y ∈ V (G), ai ∈ V (H), 1 ≤ i ≤ k} with the arcs (y; a1 , a2 , ..., ak )(y 0 ; b1 , b2 , ..., bk ) where yy 0 is an arc of G and each ai bi , 1 ≤ i ≤ k, is an arc of H. By convention, we shall further restrict the use of the symbol G×H k to the digraph induced on the vertices {(y; a1 , a2 , . . . , ak )|y ∈ V (G), ai ∈ L(y), 1 ≤ i ≤ k} where L(y) is the set of vertices in H that are being considered as images of a homomorphism from G to H. Definition 2.1 (Homomorphism consistent with Lists) Let G and H be digraphs. For each x ∈ V (G), let list of x, L(x), be a subset of H. Let k > 1 be a constant integer. A function f : G × H k → H is a homomorphism consistent with L if the following hold. • List property : for every x ∈ V (G) and every a1 , a2 , . . . , ak ∈ L(x), f (x; a1 , a2 , . . . , ak ) ∈ L(x) • Adjacency property: for every x, y ∈ V (G) and every a1 , ..., ak ∈ L(x), b1 , ..., bk ∈ L(y), if xy is an arc of G and ai bi is an arc of H for each 1 ≤ i ≤ k then f (x; a1 , ..., ak )f (y; b1 , ..., bk ) is an arc of H. In addition if f has the following property then we say f has the weak nu property. • for every x ∈ V (G), {a, b} ⊆ L(x), we have f (x; a, b, b, ..., b) = f (x; b, a, b, ..., b) = ... = f (x; b, b, b, ...a). We note that this definition is tailored to our purposes and in particular differs from the standard definition of weak k-nu as follows. (a) f is based on two digraphs G and H rather than just H (we think of this as starting with a traditional weak k-nu on H and then allowing it to vary somewhat for each x ∈ G), 6 (b) We do not require that f (y; d, d, d, ..., d) = d (this is not required in our algorithm, and in fact is more convenient to leave out). Notation For simplicity let (bk , a) = (b, b, . . . , b, a) be a k-tuple of all b’s but with an a in the k th coordinate. Let (x; bk , a) be a (k + 1)-tuple of x, (k − 1) b’s and a in the (k + 1)th coordinate. 2.1 Main Procedure Algorithm 1 The main algorithm for solving the digraph homomorphism problem. 1: function DigraphHom(G, H, φ) . G and H digraphs, φ a weak k-nu on H 2: for all x ∈ G, let L(x) = V (H) 3: for all x ∈ G and a1 , ..., ak ∈ V (H), let f (x; a1 , ..., ak ) = φ(a1 , ..., ak ) 4: PreProcessing(G, H, L) 5: RemoveNotMinority(G, H, L, f ) 6: Note: now, for all x ∈ V (G) and a, b ∈ L(x) we know f (x; bk , a) = a 7: RemoveMinority(G, H, L, f ) 8: if RemoveMinority produces a homomorphism then return true The main algorithm starts with applying the arc consistency and pair consistency on the lists L by calling Algorithm 2. Algorithm 4 (RemoveNotMinority function) is the key subroutine of the main algorithm. It starts with w = (x; bk , a) where f (w) = c 6= a and then it will modify f by setting f (x; e1 , e2 , . . . , ek ) = f (w) for every k-tuple e1 , e2 , . . . , ek ∈ L(x) with f (x; e1 , e2 , . . . , ek ) = a. Now in order to have a homomorphism from G × H k to H consistent with L, it recursively solves an instance of the problem to be able to modify f as necessary. After the main loop in Algorithm 1, we end up with a so-called Maltsev or minority instance of the problem – in which we have a homomorphism f consistent with L such that for every y ∈ V (G) and every c, d ∈ L(y) we have f (y; ck , d) = d. We argue in the next subsection that such instances can be solved by using the known algorithm of [BD06] (see the remark at the end of Subsection 2.2). The Maltsev/minority instances can also be solved in a manner similar to our arguments for RemoveNotMinority (see Section 5.7) . In what follows we give an insight of why the weak nu property of H is necessary for our algorithm. For contrary suppose w1 = (x; bk , a) with f (w1 ) = c and w2 = (x; a, b, b, . . . , b) with f (w2 ) = d. If d = a then in RemoveNotMinority we try to remove a from L(x) if we start with w1 while we do need to keep a in L(x) because we later need a in L(x) for the Maltsev algorithm. It might be the case that d 6= a but some non-minority pairs becomes minority pairs during the execution of Algorithm 4. In other words, for some w3 = (x; bk , e) with f (w3 ) 6= e we may set f (w3 ) to e. So we need to have f (w1 ) = f (w2 ), the weak nu 7 Algorithm 2 Update lists of x, y based on edge constraints and pair constraint. Call by reference, i.e. the update to L will be reflected in the calling function 1: function PreProcessing(G, H, L) 2: Input: digraphs G, H, lists L(x) ⊆ V (H) for each x . L lists are unary and binary 3: . The update to L would be available for the function calling PreProcessing 4: ArcConsistency(G, H, L) and PairConsistency(G, H, L) function ArcConsistency(G, H, L) update=True while update do if ∃xy(yx) ∈ A(G), a ∈ L(x) s.t. @b ∈ L(y) with ab(ba) ∈ A(H) then remove a from L(x) and set update=True. else update=False. 11: if there is an empty list then print ”no homomorphism” and terminate 5: 6: 7: 8: 9: 10: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: function PairConsistency(G, H, L) for all (x, y) ∈ V (G) × V (G) do set L(x, y) = {(a, b)|a ∈ L(x), b ∈ L(y)} for all x ∈ V (G) do set L(x, x) = {(a, a)|a ∈ L(x)}. for all xy ∈ A(G), a ∈ L(x), b ∈ L(y) do if ab 6∈ A(H) then remove (a, b) from L(x, y). update=True while update do if ∃x, y, z s.t. @c ∈ L(z) s.t. (a, c) ∈ L(x, z)&(c, b) ∈ L(z, y) then remove (a, b) from L(x, y) and set update=True. else update=False. if there is an empty list then print ”no homomorphism” and terminate 8 property, to start in the main algorithm, Algorithm 1. We do mention at the end of the proof of Lemma 3.4 that we can start the entire Algorithm 4 from vertex w2 and following the first coordinates. First we give the necessary definition for Algorithm 4. GL Subdigraph of G×H k : Let GL be the digraph with vertices V (GL ) = {(y; ak1 , a2 ) | y ∈ V (G), a1 , a2 ∈ L(y)} and with arcs : A(GL ) = {(y; ak1 , a2 )(y 0 ; bk1 , b2 ) | yy 0 ∈ A(G), a1 b1 , a2 b2 ∈ A(H)}∪{(y; ak1 , a2 )(y 0 ; bk1 , b2 ) | y 0 y ∈ A(G), b1 a1 , b2 a2 ∈ A(H)}. Note that a directed path in GL is an oriented path in G × H k . Let B be a walk in H starting at some vertex a ∈ V (H). We say a directed path W in GL follows B if B is the projection of W on the (k + 1)th coordinate, i.e. B is induced by the (k + 1)th coordinates of the vertices in W . We say a directed path W in GL follows a walk X in G when X is the projection of W on the first coordinate, i.e. X is induced by the first coordinates of the vertices in W . Definition 2.2 (Reachable from w in GL : GL (w), GrL (w)) Let w = (x; bk , a) with f (w) 6= a. • Let GL (w) be the induced sub-digraph of GL with vertices w0 = (y; ak1 , a2 ) such that (b, a1 ) ∈ L(x, y) and w0 is reachable from w in GL . 1 • Let GrL (w) be the induced sub-digraph of GL (w) with vertices w1 = (y; ak1 , a02 ) such that – (b, a1 ) ∈ L(x, y) and (a, a02 ) ∈ L(x, y) – w0 is reachable from w in GL . 2 Definition 2.3 (Pair digraph to update f : ) Let L be the lists of the vertices of G. For y ∈ V (G) and a1 ∈ L(y), let Pl (y, a1 ) denote a subset of vertices in L(y). For a positive integer t > 1, let Plt (y, c1 ) be a subset of L(y) s.t. Plt (y, c1 ) = Pl (y, Plt−1 (y, c1 )). Here Pl (y, L0 ) = ∪a1 ∈L0 Pl (y, a1 ) where L0 ⊆ L(y) and Pl1 (y, a1 ) = Pl (y, a1 ). Let GPl be the digraph of vertices (y, c1 , c2 ) with y ∈ V (G) and c1 , c2 ∈ L(y) such that c2 ∈ Pli (y, c1 ) for some i ≥ 1 and Pl (y, c2 ) = {c2 }. The arc set of GPl is A(GPl ) = {(y, c1 , c2 )(z, d1 , d2 ) | yz ∈ A(G), c1 d1 , c2 d2 ∈ A(H) OR zy ∈ A(G), d1 c1 , d2 c2 ∈ A(H)}. Let GPl (x, a, d) be the induced sub-digraph of GPl induced by the vertices of GPl that are reachable from (x, a, d). 1 2 Suppose w0 is reachable from w via a path P in Gl . If P contains (x; dk , a0 ) then d = b. Suppose w0 is reachable from w via a path P in Gl . If P contains (x; bk , a0 ) then a0 = a. 9 Definition 2.4 (f -closure of a list : ) We say a list L0 (y) ⊆ L(y) is closed under f if for every k-tuple a01 , a02 , . . . , a0k ∈ L1 (y) we have f (y; a01 , a02 , . . . , a0k ) ∈ L0 (y). For L0 (y) ⊆ L(y), let L0f (y) be a minimal set that includes all the element of L0 (y) and it is closed under f . Definition 2.5 (restriction of f to a sub-list:) Let L0 (y) ⊆ L(y) for every y ∈ V (G). Let f |L0 denote the restriction of f under L0 , i.e. for all y ∈ V (G), and for all a1 , a2 , . . . , ak ∈ L0 (y) we have fL0 (y; a1 , a2 , . . . , ak ) = f (y; a1 , a2 , . . . , ak ). Let X : x1 , x2 , . . . , xn be an oriented walk in G. Let L(X) denote the vertices of H that lie in the list of the vertices of X. Let X[xi , xj ], 1 ≤ i ≤ j ≤ n, denote the induced sub-path of X from xi to xj . An overview of Algorithm 4 : Algorithm 4 starts with a vertex x ∈ V (G) and two vertices a, b ∈ L(x) such that f (w = (x; bk , a)) = c. The goal is to modify f by setting f (w1 ) to c for every w1 = (x; e1 , e2 , . . . , ek ) where f (w1 ) = a initially. The change to f in x imposes a change to f in the neighbors of x. Let w1 = (y; ak1 , a2 ) be a neighbor of w and suppose ca2 6∈ A(H). We do need to change f (w0 = (y; a01 , a02 , . . . , a0k )) from a2 to an out-neighbor of c in L(y) in order to keep f as a homomorphism from G × H k to H and consistent with the lists L. There are several possibilities to change f (w0 ). One could consider any out-neighbor of b, say a1 and consider vertex w2 = (y; ak1 , a2 ) and modify f (w0 ) to f (w2 ) which is an out-neighbor of c (see Figure 1 top). The decision for changing f in y would also imply a change to f in some vertex z ∈ V (G) which is a neighbor of y. In order to manage these modifications we construct an instance G0 , H, L0 , f 0 so called Small-Instance. We first give a reason of the construction of such an instance. Let X be an oriented cycle in G. The goal is to replace an oriented cycle B containing vertex a in L(X) with an oriented cycle C in L(X) that does not contain a. We may view B as an image of X under a homomorphism from G to H that maps x to a. The Algorithm 4 starts with empty lists E, L0 . It considers the vertices of GrL (w) and for each vertex (y; ak1 , a2 ) ∈ GrL (w) it adds f (y; ak1 , a2 ) into E(y). Then it sets L0 (y) = Ef (y), i.e. the closure of E(y) under f . This means L0 (y) contains f (y; c1 , c2 , . . . , ck ) for every c1 , c2 , . . . , ck ∈ L0 (y). Now in this new instance, for every y ∈ V (G0 ) it defines f 0 to be the restriction of f to the vertices in L0 (y). This would imply that f 0 is a homomorphism from G × H k to H and consistent with the lists L0 . Note that L0 (x) = c and hence in the resulting instance at least one list becomes smaller. The algorithm solves the instance G0 , L0 , f 0 , H recursively. Note that the stopping point is when for every y ∈ G0 and every d, e ∈ L0 (y), f 0 (y; dk , e) = e. In order to keep track of changes to f 0 , it maintains a list Pl (y, a2 ); list of possible images for a2 , which indicates f (w0 = (y; a01 , a02 , . . . , a0k )) may need to be changed from a2 to c2 ∈ Pl (y, a2 ) (see Figure 1). We make the Pl list global so they will be accessible in recursion tree. 10 However, in the recursive call, c2 may change to something else. In other words, d2 ∈ Pl (y, c2 ), and this would mean f (w0 ) should be changed from a2 to d2 . In this case d2 ∈ Pl (y, Pl (y, a2 )) or equivalently d2 ∈ Pl2 (y, a2 ). At the bottom of the recursion tree we would have an element ct ∈ Plt (y, a2 ) such that Pl (y, ct ) = {ct }. Now the algorithm modifies f according to the Pl lists. It constructs a triple digraph GPl (x, a, c) that represents the vertices of G for which the f values need to be changed because of the initial change in L(x). It starts at w and it changes f (w1 = (x, e1 , e2 , . . . , ek )) from a to c for any such w1 . Suppose the algorithm modifies f (w0 ) for w0 = (y; a01 , a02 , . . . , a0k ) from a2 to an element ct ∈ Plt (y, a2 ). Then it modifies f for f (z; ...) from b2 to an element in Plt (z, b2 ) which is an out-neighbor of c2 and (y; ak1 , a2 )(z; bk1 , b2 ) ∈ A(GrL (w) see Figure 2). This suggests the algorithm does a depth first search in digraph GPl (x, a, c) to update f in the Update-f function. At this point for every k-tuple e1 , e2 , . . . , ek in L(x), f (x, e1 , e2 , . . . , ek ) 6= a. However, the algorithm has not modified f on the entire digraph affected by the initial change to f in L(x). For this reason it constructs a Big-Instance G0 , H, L0 , f 0 . In the Big-Instance it considers the GL (w). It constructs the lists L0 based on the already updated f after solving the Small-Instance. It starts with the empty lists E, L0 . For each vertex (y; ak1 , a2 ) ∈ GL (w) it does the following : (a) If (y; ak1 , a2 ) ∈ GrL (w) and f (y; a01 , a02 , . . . , a0k ) changed from a2 to c2 in the Update-f (after the Small-Instance) then add c2 into E(y). In this case we have Pl (y, c2 ) = {c2 }. It is also possible that a2 = c2 and in this case a2 is added into E(y). (b) If (y; ak1 , a2 ) 6∈ GrL (w), i.e. (a, a2 ) 6∈ L(x, y) then add f (y; ak1 , a2 ) into E(y). Now in this case the f (y; ak1 , a2 ) is added into Pl (y, a2 ). At the end the algorithm sets L0 (y) = Ef (y). Item (b) ensures that we do not repeat part of the work done in the Small-Instance. The necessary information after the recursive call for Small-Instance are still available in Pl lists (see Figure 1 middle). Now it runs the PreProcessing and in particular the ArcConsistency on G0 , H, L0 to remove unnecessary elements in L0 . Recall that G0 is the induced sub-digraph of G obtained by the projection of GL (w) on the first coordinates. Note that because of condition in (a) we only need to have elements d ∈ L0 (z) where (z; bk1 , b2 ) ∈ GL (w) \ GrL (w), (y; ak1 , a2 ) ∈ GrL (w) where (c, d) ∈ L0 (y, z) and c ∈ L0 (y). This is achieved by running the ArcConsistency on lists L0 . Note that by definition, L0 (x) does not contain a because we know that no k-tuple in x has its f value as a. Therefore the resulting instance is smaller than the original one. In the Big-Instance we pass f |L0 as f 0 . At the end the algorithm updates f according to Pl lists as described for the Small-Instance and it removes a from L(x). We argue that the changes to f can be extended upon the changes occurred to f after solving the SmallInstance. Note that all the information that are needed in the Update-f function can be obtained by looking at the current values of the Pl lists. 11 c1 c2 c3 a04 b04 d04 c a4 b4 d4 f (x; b, b, a) = c a a2 b2 d2 f (y; a1 , a1 , a2 ) = a4 f (y; a01 , a01 , a02 ) = a04 a01 b01 b1 a1 b d01 a01 f (y; a4 , a4 , a04 ) = c1 a4 , a04 ∈ Pl (y, a2 ) c1 ∈ Pl2 (y, a2 ) a4 , a04 , c1 ∈ L0 (y) f (z; b4 , b4 , b04 ) = c2 b4 , b04 ∈ Pl (y, b2 ) c2 ∈ Pl2 (z, b2 ) b4 , b04 , c2 ∈ L0 (z) f (z; b1 , b1 , b2 ) = b4 f (z; b01 , b01 , b02 ) = b04 d1 b01 d01 b a1 b1 d1 x y z u f (u; d1 , d1 , d2 ) = d4 f (u; d01 , d01 , d02 ) = d04 f (u; d4 , d4 , d04 ) = c3 d4 , d04 ∈ Pl (u, d2 ) c3 ∈ Pl2 (u, d2 ) d4 , d04 , c3 ∈ L0 (u) c1 c2 c3 c4 a04 b04 d04 e004 f (x; b, b, a0 ) = c0 f (x; b, b, a) = c c 0 f (z; b1 , b1 , b2 ) = b4 f (z; b01 , b01 , b02 ) = b04 f (z; b4 , b4 , b04 ) = c2 e04 b4 a4 c d4 e02 b2 a2 a a01 b01 b1 a1 b d2 a01 b01 d01 e01 d1 e1 d01 e01 a0 a f (u; d1 , d1 , d2 ) = d4 f (u; d01 , d01 , d02 ) = d04 f (u; d4 , d4 , d04 ) = c3 b f (v; e1 , e1 , e02 ) = e04 f (v; e01 , e01 , e02 ) = e004 f (v; e04 , e04 , e004 ) = c4 b a1 b1 d1 e1 b x y z u v x L0 (y) = c1 c3 ∈ L0 (u) L0 (z) = c2 e04 , e004 , c4 ∈ L0 (v) Figure 1: The top figure is an example of small-instance. The middle figure : example of biginstance. e3 e2 e1 a03 a02 a01 b03 b02 b01 d03 d02 d01 c1 c2 c3 a04 b04 d04 f (x; e1 , e2 , e3 ) = a f (x; e1 , e2 , e3 ) = c change c a4 b4 f (y; a01 .a02 , a03 ) = a2 f (y; a01 .a02 , a03 ) = c1 f (z; b01 , b02 , b03 ) = b2 f (z; b01 , b02 , b03 ) = c2 f (u; d01 , d02 , d03 ) = d2 f (u; d01 , d02 , d03 ) = c3 d4 a a2 b2 d2 x y z u Figure 2: Updating f based on the result of the recursion. 12 Algorithm 3 Initialize Pl lists and call Remove-NM 1: function RemoveNotMinority(G, H, L, f ) 2: Input: digraphs G, H, lists L and, weak nu homomorphism f : G × H k → H 3: For every y ∈ V (G) and every a1 ∈ L(y) set Pl (y, a1 ) = ∅. . Pl lists are global 4: Remove-NM(G, H, L, f ) . call by reference for L, f , i.e, the changes to f, L will be reflected to RemoveNotMinority function Algorithm 4 updating f so that it remains a homomorphism of G × H k to H consistent with L and for every x ∈ V (G), a0 , b0 ∈ L(x), f (x; a0k , b0 ) = b0 1: function Remove-NM(G, H, L, f ) 2: Input: digraphs G, H, lists L and, weak nu homomorphism f : G × H k → H 3: while ∃x ∈ V (G), & a, b ∈ L(x), a 6= b s.t. f (w = (x; bk , a)) = c 6= a & ∃ w2 ∈ V (G × H k ) with f (w2 ) = a do 4: Let (G0 , L0 , f 0 )= Small-instance(G, L, f, w) 5: Remove-NM(G0 , H, L0 , f 0 ) 6: for all y ∈ G0 , d ∈ L0 (y) do set Pl (y, d) = {d}. 7: Update-f(L, Pl , f, x, a) . Call by reference for f 0 0 0 8: Let (G , L , f )= Big-instance(G, L, f, w) 9: Remove-NM(G0 , H, L0 , f 0 ) 10: for all y ∈ G0 , d ∈ L0 (y) do set Pl (y, d) = {d}. 11: Update-f(L, Pl , f, x, a) 12: Remove a from L(x) 13: PreProcessing(G, H, L) . Update lists L after removing a 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: function Small-Instance(G, L, f, w ) Set G0 to be the induced sub-digraph of G with vertices y s.t. (y; ak1 , a2 ) ∈ GrL (w) Create new empty lists E, L0 . for all y ∈ V (G0 ) do Set E(y) = {f (w1 = (y; ak1 , a2 ))|w1 ∈ GrL (w1 )} Set L0 (y) = Ef (y) . see definitions 2.4 0 for all y ∈ V (G ), a1 ∈ L(y) do Pl (y, a1 ) = {f (w1 = (y; dk , a1 ))|w1 ∈ GrL (w)} Set f 0 = f |L0 . see definitions 2.5 0 0 0 Return (G , L , f ) 13 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: function Big-Instance(G, L, f, w ) Set G0 to be the induced sub-digraph of G with vertices y s.t. (y; ak1 , a2 ) ∈ GL (w) Create new empty lists E, L0 . for all w1 = (y; ak1 , a2 ) ∈ GrL (w) do add c2 into E(y), where f (w1 = (y; ...)) was initially a2 and now f (w1 ) = c2 . . Happened in Update-f function. Pl (y, c2 ) = {c2 } and possible that c2 = a2 for all y ∈ V (G0 ) do E(y) = E(y) ∪ {f (w1 )|w1 = (y; ak1 , a2 ) ∈ GL (w) \ GrL (w)} L0 (y) = Ef (y) for all y ∈ V (G0 ), a2 ∈ L(y) s.t. (a, a2 ) 6∈ L(x, y) do Pl (y, a2 ) = {f (w1 )|w1 = (y; ak1 , a2 )) ∈ GL (w)} . w1 ∈ GL (w) \ GrL (w) Set f 0 = f |L0 PreProcessing(G0 , L0 ) and Return (G0 , L0 , f 0 ) function Update-f(L, Pl , f, x, a ) . In Small-Instance GPl (x, a, c) Construct GPl (x, a, d) Initialize and empty stack ST ST.Push((x, a, d)) and set V isit[(x, a, d)] to true while ST is not empty do v = (y, a1 , c1 ) = ST.P op() for all (a01 , a02 , . . . , a0k ) ∈ L(y) s.t f (y; a01 , a02 , . . . , a0k ) = a1 do set f (y; a01 , a02 , . . . , a0k ) = c1 for all v 0 where vv 0 ∈ A(GPl (x, a, d)) do if V isit[v 0 ] = f alse then Set V isit[v 0 ] to true and ST.P ush(v 0 ) 14 Description of the Algorithm 4 line by line 3. We go through list of each vertex x and take a, b with f (x; bk , a) 6= a. Going to modify f so we don’t need a in the list of x. Note that we should take a such that ∃ f (w1 = (x; e1 , e2 , . . . , ek )) = a. 4. We are going to modify f (w1 ) to c. Construct Small-Instance in which L0 (x) = {c} only. 5. We call to solve the same problem for instance G0 , H, L0 , f 0 . Here f 0 is the restriction of f over the k-tuples in L0 . f 0 is a homomorphism from G × H k to H and consistent with the lists L0 . 6. At this point each L0 (y) is either singleton or for every d, d0 ∈ L0 (y) we have f 0 (y; d0k , d) = d. That’s why we set Pl (y, d) = {d}. 7. We Update f based on the Pl lists. Pl has the information of what should be the new value for f (y, a01 , a02 , . . . , a0k ) that was initially a2 . The Update to f is with respect to the Small-Instance. At this point no k-tuple in L(x) has f value a. 8. In order to update f everywhere we construct the Big-Instance. Since we have run the Remove-NM for Small-Instance, the Big-Instance is smaller than the original instance. L0 (x) does not have a. 11. Update f based on the Pl lists. Now at this point f is a homomorphism from G × H k to H and consistent with the lists L and at this point no k-tuple in L(x) has value a. 12. At this point we remove a from L(x). 13. Since we have removed a from L(x) the L lists should be updated. 2–3. [Small-Instance:] To construct G0 and create the L0 lists. 4–6. [Small-Instance:] To make sure L0 is closed under f we set L0 (y) = Ef (y) for every y ∈ V (G0 ); the image of each k-tuple in L0 (y) should be in L0 (y). Set f 0 to be the same as f in L0 lists. 7–8. [Small-Instance :] Fill out Pl lists for Small-Instance. 9. [Small-Instance :] Set f 0 to be the the restriction of f on L0 lists. 4–8. [Big-Instance :] First we look at every w1 = (y; ak1 , a2 ) ∈ GrL (w). If the f value of some k-tuple in y changed from a2 to c2 (when updating f after running Small-Instance) then we need to add c2 into L0 (y). The goal is not to recompute L0 and recompute Pl lists in Small-Instance. 15 11–13. [Big-Instance :] We update Pl for those Pl (y, a2 ) that have not been set in lines 4–7. In other words, for we go through w1 = (y; ak1 , a2 ) ∈ GL (w) \ GrL (w) and add f (w1 ) into Pl (y, a2 ). 2. [Update-F :] Construct the digraph GPl (x, a, d). In the Small-Instance Pl (x, a) is c. In the Big-Instance instead of c (when call recursively) we may have Pl (x, c) = c1 and finally we may end up having d ∈ Plt (x, a) where Pl (x, d) = {d}. 4. [Update-F :] We start a depth first search DFS (using stack ST) starting from (x, a, d). 5–7. [Update-F :] Pop an element v = (y, a1 , c1 ) from the top of ST and if f (w1 ) = a1 for w1 = (y; a01 , a02 , . . . , a0k ), then we change f (w1 ) to c1 (the f value of each such w1 is changed once). 8–9. [Update-F :] We look at each neighbor of v in GPl (x, c, d) and if we have not visited that neighbor we push it on the top of the stack ST. 2.2 Minority Algorithm (RemoveMinority) In this section we show that once the minority case has been reached in our main algorithm, we can reduce to an already solved setting for homomorphism testing – namely that of the Maltsev case. We note that this section is independent of the rest of the algorithm. Note that at this point for every a, b ∈ L(x) we have f (x; bk , a) = a and in particular when a = b we have f (x; a, a, . . . , a) = a (idempotent property). This is because when a is in L(x) then it means the Remove-NM procedure did not consider a and in fact did not change the value of f (x; ...) from a to something else. Note that for the argument below we just need the idempotent property for those vertices that are in L(x), x ∈ V (G). A ternary polymorphism h0 is called Maltsev if for all a 6= b, h0 (a, b, b) = h0 (b, b, a) = a. Note that the value of h0 (b, a, b) is unspecified by this definition. Let G and H be as input to Algorithm 1, and suppose line 6 of the algorithm has been reached. We define a homomorphism h : G × H 3 → H consistent with the lists L by setting h(x; a, b, c) = f (x; a, b, b, . . . , b, c) for a, b, c ∈ L(x). Note that because f has the minority property for all x ∈ G, a, b ∈ L(x), h is a Maltsev homomorphism consistent with the lists L. Note that for the argument below we just need the idempotent property for those vertices that are in L(x), x ∈ V (G). Let G0 be the structure obtained from G by making each arc a different binary relation. In other words, G0 has vertices V (G) and |E(G)| binary relations Re , e ∈ E(G), where Re = {xy} if e is the arc e = xy. Let H 0 be the structure where V (H 0 ) is the disjoint union of L(x), x ∈ V (G), and there are also |E(G)| binary relations Se , e ∈ E(G), where Se is the set of all ordered pairs ab with ab ∈ E(H), a ∈ L(x), b ∈ L(y), where e = xy. Note that |V (H 0 )| ≥ |V (G0 )| if each L(x) is non-empty. This may seem unusual for the homomorphism setting, but is certainly allowed. 16 Now note that there is an L-homomorphism of G to H (i.e., a list homomorphism consistent with lists L) if and only if there is a homomorphism of G0 to H 0 . Homomorphisms of such structures are mappings f : V (G0 ) → V (H 0 ) such that xy ∈ Re implies f (x)f (y) ∈ Se for all e ∈ E(G). Finally, note that the structure H 0 has a Maltsev polymorphism h0 of the ordinary kind. Indeed, let hx be our Maltsev polymorphisms defined on L(x) by setting hx (a, b, c) = h(x; a, b, c). We let h0 (a, b, c) = h(x; a, b, c) if a, b, c are from the same L(x), and for a, b, c not from the same L(x) define h0 (a, b, c) = a unless a = b, in which case define it as h0 (a, b, c) = c. The definition ensures that h is Maltsev. To check it is a polymorphism, note that aa0 , bb0 , cc0 ∈ Se is only possible if a, b, c ∈ L(x), a0 , b0 , c0 ∈ L(y), where e = xy. For those, we have the polymorphism property by assumption. Now we have a structure with a Maltsev polymorphism, so the Bulatov-Dalmau [BD06] algorithm applies and solves the homomorphism problem. Note that Corollary 4.2 of the Bulatov-Dalmau paper explicitly mentions that it is polynomial in both the sizes of G and H. Therefore we have the following theorem. Theorem 2.6 Suppose h : G × H k → H is a minority homomorphism consistent with lists L on G. Then the existence of an L-homomorphism of G to H can be decided in polynomial time. Remark : We have communicated with the authors of [BD06] and they confirmed that indeed we can apply their algorithm as explained above. We note that it is also possible to give a direct algorithm for the minority case that is similar to how we handle the “not minority” case. 3 Proofs 3.1 PreProcessing and List Update We first show that the standard properties of consistency checking remain true in our setting – namely, that if the PreProcessing algorithms succeed then f remains a homomorphism consistent with the lists L if it was before the PreProcessing. Lemma 3.1 If f is a homomorphism of G × H k → H consistent with L then f is a homomorphism consistent with L after running the pre-processing. Proof: We need to show that if a1 , a2 , . . . , ak are in L(y) after the pre-processing then f (y; a1 , a2 , . . . , ak ) ∈ L(y) after the pre-processing. By definition vertex a is in L(y) after the pre-processing because for every oriented path Y (of some length m ) in G from y to a fixed vertex z ∈ V (G) there is a vertex a0 ∈ L(z) and there exists a walk B in H from a to a0 and congruent with Y that lies in L(Y ). 17 Let a01 , a02 , a03 , . . . , a0k ∈ L(z). Let Ai , 1 ≤ i ≤ k be a walk from ai to a0i in L(Y ) and 0 congruent to Y . Let Ai = ai , ai1 , a2i , . . . , am i , ai and let Y = y, y1 , y2 , . . . , ym , z. Since f is a homomorphism consistent with L before the pre-processing, f (y; a1 , a2 , . . . , ak ), 0 0 0 m m f (y1 ; a11 , a12 , . . . , a1k ), . . . , f (yi ; ai1 , ai2 , . . . , aik ), . . . , f (ym ; am 1 , a2 , . . . , ak ), f (z; a1 , a2 , . . . , ak ) is a walk congruent with Y . This would imply that there is a walk from f (y; a1 , a2 , . . . , ak ) to f (z; a01 , a02 , . . . , a0k ) congruent with Y in L(Y ) and hence f (y; a1 , a2 , . . . , ak ) ∈ L(y).  By a similar argument as in the proof of Lemma 3.1 we have the following lemma. Lemma 3.2 If f is a homomorphism of G×H k → H, consistent with L and a1 , a2 , . . . , ak ∈ L(x), b1 , b2 , . . . , bk ∈ L(y), and (ai , bi ) ∈ L(x, y), 1 ≤ i ≤ k, after pre-processing then (f (x; a1 , a2 , . . . , ak ), f (y; b1 , b2 , . . . , bk )) ∈ L(x, y) after the pre-processing. Lemma 3.3 The pair list L0 (x, y) is not empty. Proof: Let w = (x; bk , a) with f (w) = c 6= a. Suppose (b, a1 ) ∈ L(x, y), and a2 ∈ L(y). Now by definition (Small-Instance or Big-Instance) there exists a vertex w1 = (y; ak1 , a2 ) in GL (w) and hence f (w1 ) ∈ L0 (y). This would mean (c, f (w1 )) ∈ L0 (x, y) because there exists a path from c to f (w1 ) in L0 (Y ) where Y is a path from x to y in G0 .  3.2 RemoveNotMinority Correctness Proof The main argument is proving that after RemoveNotMinority function, f still is a homomorphism consistent with the lists and has weak nu property (Lemma 3.4). Moreover, after RemoveNotMinority there still exists a homomorphism from G to H if there was one before RemoveNotMinority (Lemma 3.5). Lemma 3.4 If f is a homomorphism of G × H k → H, consistent with L and with weak nu property before RemoveNotMinority then the modified f remains a homomorphism consistent with L and with weak nu property afterwards. Lemma 3.5 If there is a homomorphism g : G → H then there is a homomorphism from G to H after RemoveNotMinority. 3.2.1 Proof of Lemma 3.4 It is enough to show the following : f is a homomorphism of G × H k → H consistent with the lists (with weak nu property) after removing a from L(x) in the while loop in Algorithm 4. We need to address items 1,2,3 below. 1. The weak nu property is preserved. 2. The Running time of Remove-NM function is O(|G|3 |H|k+1 ). 18 3. The adjacency property is preserved: for an arbitrary arc yz ∈ A(G) (zy ∈ A(G)) and for every a01 , a02 , . . . , a0k ∈ L(y) and b01 , b02 , . . . , b0k ∈ L(z) where a0i b0i ∈ A(H) (b0i a0i ∈ A(H)), 1 ≤ i ≤ k, we have f (y; a01 , a02 , . . . , a0k )f (z; b01 , b02 , . . . , b0k ) ∈ A(H) (f (z; b01 , b02 , . . . , b0k )f (y; a01 , a02 , . . . , a0k ) ∈ A(H)). Proof of 1 : Since in the Update-f function we change the value f (y; a01 , a02 , ..., a0k ) from a2 to f (y; ak1 , a2 ) for every k-tuple a01 , a02 , . . . , a0k ∈ L(y), we change f (y; b1 , b1 , . . . , b1 , b2 ) = f (y; b1 , b1 , . . . , b2 , b1 ) = · · · = f (y; b2 , b1 , . . . , b1 ) to the same value. Therefore f still has the weak k-nu property. Proof of 2 : In the Algorithm 4 we consider pairs (x, a) ∈ V (G × H) where a ∈ L(x) and ∃w2 ∈ V (G × H k ) with f (w2 ) = a. In the Update-F function for every y ∈ V (G0 ) and every a2 ∈ L(y), such that (y; ak1 , a2 ) ∈ GL (w), the f value of w1 with f (w1 ) = a2 is going to change to some new value. Once the f value of some k-tuple in L(y) changed from a2 to something else, there would be no k-tuple in L(y) that its value is set to a2 in the further steps of the Algorithm. Moreover, for every (a, e) ∈ L(x, y) the value of f for w1 , w2 with f (w1 ) = a and f (w2 ) = e would change simultaneously. In other words, if (y; ak1 , a2 ) is in GL (w) and (y; bk1 , a2 ) ∈ GL (w1 ) for some w1 = (z; dk , e) then there exists some w10 = (z; d0k , e) ∈ GL (w). This implies that in the main while loop we do not consider any w100 = (z; d00k , e) because there exists no k-tuple b01 , b02 , . . . , b0k in L(z) such that f (z; b01 , . . . , b0k ) = e. This means that the vertices of GL are partitioned and when we solve instance G0 , H, L0 , f 0 recursively we deal with one of these partitions. Considering all these partitions together, in the worst case we end up processing all the vertices in G − x together with their lists to be able to process a ∈ L(x). At each step one element (y, aj ), aj ∈ L(y), y ∈ V (G) is processed (aj is removed) to be able to process a ∈ L(x); remove a from L(x). The actual work is writing down some new lists (each write down takes O(|A(G)||H k |)). The overall size of the new lists is one smaller than the previous lists. So the overall running time is O(|G||A(G)||H|k+1 ). Note that |A(G)| ∈ O(|G|2 ). By considering the running time of the PreProcessing we conclude that the overall running time is O(|G|3 |H|k+1 ). Proof of 3 : Let ak+1 = f (y; a01 , a02 , . . . , a0k ) and bk+1 = f (z; b01 , b02 , . . . , b0k ). We need to show ak+1 bk+1 ∈ A(H) when (y; a01 , . . . , a0k )(z; b01 , b02 , . . . , b0k ) is an arc of G × H k . In order to show that we first prove the following claims. In Claims 3.6,3.7,3.8 at each step of the recursive call we deal with some vertex x of G and two vertices a, b ∈ L(x) such that f (x; bk , a) = c 6= a, and f (x; c, c, . . . , c) = c considered in Algorithm 4 (line 3). Moreover, the assumption is that f is a homomorphism consistent with the lists L and if f (y; a01 , a02 , . . . , a0k ) = a1 then f (y; a1 , a1 , . . . , a1 ) = a1 . Claim 3.6 Let X : y = y, y1 , y2 , . . . , yn , x be a walk from a vertex y to vertex x in G. Let C1 : c0 , c1 , c2 , . . . , cn , c and C2 : c00 , c01 , . . . , c0n , c be two oriented walks congruent to X 19 in L(X). Then f (y; ck0 , c00 ), f (y1 ; ck1 , c01 ), . . . , f (yi ; cki , c0i ), . . . , f (yn ; ckn , c0n ), f (x; c, c, . . . , c) is a walk in L(X) from c0 = f (y; ck0 , c1 ) to c and congruent to X. Proof: Since f is a homomorphism consistent with the lists, for every 0 ≤ i ≤ n − 1 we have f (yi ; cki , c0i )f (yi+1 ; cki+1 , c0i+1 ) ∈ A(H) when yi yi+1 ∈ A(G), ci ci+1 , c0i c0i+1 ∈ A(H), and f (yi+1 ; cki+1 , c0i+1 )f (yi ; cki , c0i ) ∈ A(H) when yi+1 yi ∈ A(G), ci+1 ci , c0i+1 c0i ∈ A(H).  The following claim will be used to show that we can extend the update to f from the Small-Instance to the Big-Instance. Claim 3.7 Let W1 , W2 be two cycles from w = (x; bk , a) to w = (x; bk , a) in GL (w) with the following conditions : • W1 , W2 are congruent and both follow oriented cycle X : x, x1 , x2 , . . . , xn , x in G. • the projection of W1 , W2 on the (k + 1)th coordinate yield the same closed walk B : a, a1 , a2 , . . . , ai , . . . , an , a in L(X). Let B 0 : a, a1 , a2 , . . . , ai , a0i+1 , a0i+2 , . . . , a0n , a0 be a walk in L(X) congruent with B such that (a, a0i+1 ) 6∈ L(x, xi+1 ). Let ei = f (wi ) and e0i = f (wi0 ) where wi and wi0 are the ith vertices of W1 , W2 respectively. Then there exist walks C1 , C2 from ei , e0i to c0 in L0 (X) (constructed in Big-Instance) that are congruent to B 0 [ai , a0 ] and there exists a walk C from f (xi ; eki , e0i ) to c0 = f (x; bk , a0 ) in L0 (X) and congruent to B 0 [ai , a0 ]. Proof: Let W3 be the quasi-path from w to w0 = (x; bk , a0 ) and congruent to W1 that follows X, B 0 and such that the j th vertex of W3 is of form (y; dkj , a0j ), where (y; dkj , aj ) ∈ W1 and a0j is the j-th vertex of B 0 . Let W4 be the quasi-path from w to w0 = (x; bk , a0 ) and con0 gruent to W2 that follows X, B 0 such that the j th vertex of W4 is of form (y; d0k j , aj ), where 0 th (y; d0k vertex of B 0 . Let f (vi ) = ei and f (ui ) = e0i where vi is j , aj ) ∈ W2 and aj is the j the ith vertex of W3 and ui is the ith vertex of W4 . Now C1 : f (vi ), f (vi+1 ), . . . , f (vn ), c0 is a walk in L0 (X) and congruent to B 0 [ai , a0 ]. This is because we add f (vj ), i ≤ j ≤ n (and c0 ) into L0 (X) in the construction of the Big-Instance, and L0 (X) is closed under f . Similarly C2 : f (ui ), f (ui+1 ), . . . , f (un ), c0 is a walk in L0 (X) and congruent to B 0 [ai , a0 ]. Now according to Claim 3.6 the walk C : f (xi ; eki , e0i ), f (xi+1 ; eki+1 , e0i+1 ), . . . , f (xn ; ekn , en ), c0 where ej ∈ C1 and e0j ∈ C2 , i ≤ j ≤ n, is from f (xi ; eki , e0i ) to c0 and it is congruent to B 0 [ai , a0 ]. Note that C is in L0 (X[xi , xn ], x) ⊂ L(X).  Claim 3.8 Let X : x, x1 , x2 , . . . , xn , x be an oriented cycle in G containing vertex x. Suppose f (x; bk , a0 ) = c0 . Let B : a, a1 , a2 , . . . , ai , . . . , an , a and B 0 : a, a1 , a2 , . . . , ai , a0i+1 , a0i+2 , . . . , a0n , a0 be two congruent walks in L(X) such that (a, a0i+1 ) 6∈ L(x, xi+1 ). Let t ≥ 1 be an integer such that ci ∈ Plt (xi , ai ) (Pl constructed during the execution of Remove-NM). Then there exists a walk in L0 (X) from ci to c0 congruent with B 0 [ai , a0 ]. 20 c1 c2 c3 c4 c0 e01 e02 e2 e03 e3 e04 e4 e1 c a1 a d01 a2 d02 d1 b d01 d2 d02 a03 a04 a0 a3 a4 a d03 d04 d3 d4 d03 d04 b b d1 d2 d3 d4 b x y z u v x f (y; d1 , d1 , a1 ) = e1 f (y; d01 , d01 , a1 ) = e01 f (u; d3 , d3 , a03 ) = e3 f (u; d03 , d03 , a03 ) = e03 f (u; e3 , e3 , e03 ) = c3 Figure 3: An illustration for Claim 3.7. Proof: Let W1 , W2 be two cycles from w = (x; bk , a) to w = (x; bk , a) in GL (w) that both follow B and such that f (wi ), f (wi0 ) ∈ Pl (xi , ai ) where wi is the ith vertex of W1 and wi0 is the ith vertex of W2 . According to Claim 3.7, there exist walks C1 , C2 in L0 (X) from c1 , c2 to c0 where c1 , c2 ∈ Pl (y, ai ) and there exists a walk C 0 in L0 (X) from c3 = f (y; ck1 , c2 ) to c0 and congruent with B 0 [ai , a0 ]. Now according to the Remove-NM in the recursive call we place c3 into L0 (y) and also into Pl (y, c2 ). By applying Claim 3.6 on c3 , c1 we conclude that there exists a walk from f (y; ck1 , c3 ) to c0 and congruent to C1 if the recursive call considers vertex (y; ck1 , c3 ). We note that since L0 (y) is closed under f , f (y; ck1 , c3 ) ∈ L0 (y). Note that in this case Pl2 (y, ai ) would contain c3 . Similarly we would have a walk from f (y; ck3 , c1 ) to c0 congruent to C1 if the recursive call considers vertex (y; ck3 , c1 ). By repeatedly applying Claim 3.6 we conclude that there exists a walk in L0 (X) from ci to c0 and congruent to B 0 [ai , a0 ]  Claim 3.9 Consider the current lists L at some stage of Remove-NM algorithm. For every (y, a2 ) where (y; ak1 , a2 ) ∈ GL (w) there exists d ∈ L0 (y) ∩ Plt (y, a2 ) for some integer 1 ≤ t ≤ |L(y)| such that Pl (y, d) = {d}. 0 Proof: Let a01 ∈ Pl (y, a2 ). Suppose there exists a02 ∈ Pl (y, a2 ) such that c1 = f (y; a0k 1 , a2 ) 6= 0 0 0 a2 . Now in the recursive call Pl (y, a2 ) is updated (we write down some vertices of L into Pl (y, a02 )) and in particular c1 ∈ Pl (y, a02 ) and by definition c1 ∈ Pl2 (y, a2 ). To see that, L0 is a subset of L where every a02 ∈ L0 (y) L0 is on a walk C 0 from c inside L0 (Y ). Here Y is a walk in G that some path W in GL (w) from w to (y; ak1 , a02 ) follows Y, C 0 . Now according to construction of Small-Instance and Big-Instance with respect to lists L0 , c1 ∈ Pl (y, a02 ). 21 Since at line 6 and 10 of the Remove-NM we set Pl (y, d) = {d}, and because at each step of the recursion one element from L0 (y) will disappear from the rage of f 0 = f |L0 , after some t ≤ |L| steps of the nested recursive calls for all d, e ∈ Lt , f (t) (y; dk , e) = e. Here Lt are the lists passed to the Remove-NM after t steps of recursions, and f t is the corresponding homomorphism (from G × H k to H) to Lt . Note that all the information that are needed in the Update-f function can be obtained by looking at the current values of the Pl lists.  From Small-Instance to Big-Instance We need to argue that in the Big-Instance the modification to f would be consistent with the update to f after calling the Remove-NM on Small-Instance. In the function Update-f(L,Pl ,f, x, a) after Small-Instance we follow an oriented path inside L(X) where X is an oriented cycle in G containing x ∈ V (G). We modify the f value for (y; a01 , a02 , . . . , a0k ) from a2 to some element d2 ∈ Plt (y, a2 ) where y ∈ X and (y, a2 , d2 ) is reachable from (x, a, d) in GPl (x, a, d) (t and d2 exist according to Claim 3.9). Now consider a vertex b2 in L(z) where yz ∈ A(X) but (a, b2 ) 6∈ L(x, z). In the Big-Instance we consider an oriented path B 0 : a2 , b2 , . . . , a0 such that • B 0 is congruent to yX[z, x] (portion of X from y to x) in L(X) • a directed path W from (y; ak1 , a2 ) to (x; bk , a0 ) follows B 0 . By Claim 3.8, there exists a walk C 0 from d2 ∈ Plt (y, a2 ) to c0 in L0 (X) which is congruent to B 0 . This would imply that if we fix vertex c0 in L0 (x) in the recursive call, then corresponding to B 0 in L(X) we would have walk C 0 in L0 (X) and the f value along B 0 would change to elements in C 0 . Note that we may change the f value for some k-tuples in x from c0 ∈ L(x). To be more precise, we would have the elements in C 0 to be considered for further changes to f . Therefore the updates in f in the Big-Instance can be build upon the updated f on the Small-Instance. Why the adjacency preserved : Suppose the value of f (y; a01 , a02 , . . . , a0k ) changed from a2 to c2 ∈ Plt (y, a2 ). Let b2 = f (z; b01 , b02 , . . . , b0k ). We note that a2 b2 ∈ A(H) because f was initially a homomorphism consistent with the lists. Since f (y; b01 , b02 , . . . , a0k ) changed from a2 to c2 , we have (y, a2 , c2 ) ∈ GPl (x, a, d). There exists a1 ∈ L(y) such that (b, a1 ) ∈ L(x, y) (according to Lemma 3.3 at each step of the recursion) and hence (y; ak1 , a2 ) ∈ GL (w). Let c2 ∈ Plt (y, a2 ) (c2 , t exist by Claim 3.9 ) and let c02 ∈ Pl (y, a2 ). Now there exists a vertex b1 ∈ L(z) such that (b, b1 ) ∈ L(x, z) and a1 b1 ∈ A(H). According to Remove-NM we add an out-neighbor of c02 into L0 (z) and hence Pl (z, b2 ) has an out-neighbor of c02 say d02 . By following the recursive calls we would conclude that there exists some vertex d2 ∈ Plt (z, a2 ) which is an out-neighbor of c2 and Pl (y, d2 ) = {d2 }. Therefore according to the function Update-f (note that each (y, a2 ) is visited once in Update-f) we change f (z; b01 , b02 , . . . , b0k ) from b2 to d2 . 22 Closing remark Once we change the value of f (x; a1 , a2 , . . . , ak ) from a to c then potentially we need to modify the value for f (y; b1 , b2 , . . . , bk ) from an out-neighbor of a, say a0 in L(y) to an out-neighbor of c. As far as the modifying f is concern it would yield the same result if we start from (x; b, . . . , a, b, . . . , b), a is in the ith coordinate.  3.2.2 Proof of Lemma 3.5 It is enough to show that the following: If there is a homomorphism g : G → H with g(x) = a then there is a homomorphism from G to H after removing a from L(x) in Algorithm 4 (line 12). The Update-f function performs a depth first search in GPl (x, a, c), c = f (w, bk , a). For simplicity we may assume that c ∈ Plt (x, a) with Pl (x, c) = {c}. The argument is similar for the case when (x, a, d) ∈ GPl . We note that if vertex (y, a2 , c2 ) is visited in Update-f function first and then after a while a vertex (y; a2 , c02 ) is visited then no changes would apply into f . This is because there is no k-tuple a01 , a02 , . . . , a0k in L(y) such that f (y; a01 , a02 , . . . , a0k ) = a2 . Let G3 be the induced sub-digraph of GPl (x, a, c) with the arcs ê = (y, a1 , c1 )(z, b1 , c2 ) such that ê ∈ A(GPl (x, a, c)) and c1 b1 6∈ A(H) when a1 b1 ∈ A(H) and b1 c1 6∈ A(H) when b1 c1 ∈ A(H). Note that G3 contains (x, a, c). Let G0 be the induced sub-digraph of G with vertices y such that (y, g(y), c2 ) ∈ G3 is visited for the first time by the depth first search in function Update-f. Observation 3.10 Let X be an oriented cycle in G containing vertex x. By construction of Small-Instance, corresponding to g(X) say B, there exists a closed cycle C containing c and congruent to B. Here g(X) is the image of X under g. For every vertex y ∈ G0 set h(y) = c2 where (y, g(y), c2 ) ∈ GPl (x, a, c). For every y ∈ V (G) \ V (G0 ) set h(y) = g(y). We need to show that h is a homomorphism from G to H. Let zz 0 (z 0 z) be an arc of G where z ∈ V (G0 ). We only need to consider the case z ∈ V (G0 ). By definition we have (z, g(z), c2 ) ∈ G3 . Since zz 0 is an arc of G and g is a homomorphism from G to H, g(z)g(z 0 ) ∈ A(H). If h(z)g(z 0 ) ∈ A(H) then we are done because in this case we have z 0 6∈ G0 . Suppose h(z)g(z 0 ) 6∈ A(H). Now in the Small-Instance there exist vertices w1 = (z; ak1 , g(z)) and w2 = (z 0 ; bk1 , g(z 0 )) that are in GrL (w). This means there exists a vertex c02 in L0 (z 0 ) that is an out-neighbor of c2 and hence by definition (z 0 , g(z 0 ), c02 ) ∈ G3 . This would imply z 0 ∈ V (G0 ) and hence h(z 0 ) = c02 , implying that h(z)h(z 0 ) ∈ A(H). Note that in the special case when z 0 = x we have g(z 0 ) = a and by the Observation above we have h(z 0 ) = c. Therefore h is a homomorphism from G to H with h(x) = c.  23 3.3 Proof of Theorem 1.1 By Lemma 3.5 we preserve the existence of a homomorphism from G to H after Algorithm 4. By Lemma 3.4 f is still a homomorphism from G × H k → H consistent with the lists L of G after Algorithm 4. Now we can apply Theorem 5.4. We observe that the running time of PreProcessing function is O(|G|3 |H|2 ). According to the proof of Lemma 3.4 (2) the running time of Algorithm 4 is O(|G|3 |H|k+1 ). The running time of Algorithm 2.2 (O(|G||A(G)||H|k+1 ). Therefore the running time of the Algorithm 1 is O(|G|3 |H|k+1 ). 4 Additional Algorithms and Proofs (New Minority Algorithm) This section collects additional statements and proofs mainly related to new Minority algorithm. We develops a direct algorithm to handle the minority case in our main algorithm. Of course, it would be easier to appeal to Bulatov-Dalmau Maltsev result as explained in Subsection 2.2. A direct proof for Theorem 5.4 Let M 3 be the digraph of triple (y, c, d), x ∈ G, c, d ∈ L(y). There is an arc from (y, c, d) to (y 0 , c0 , d0 ) where yy 0 ∈ A(G), cc0 , dd0 ∈ A(H) and cd0 6∈ A(H) or y 0 y ∈ A(G) and c0 c, d0 d ∈ A(H), d0 c 6∈ A(H). Note that M 3 is a graph but we view M 3 as digraph and when we talk about a path in M 3 we mean an oriented path that reflect the direction of the edge xy when (y, c, d)(y 0 , c0 , d0 ) is an arc of M 3 . Let Gx (a, b) be the strong component of M 3 containing (x, a, b) such that for each vertex (y, c, d) ∈ Gx (a, b), (a, c) ∈ L(x, y) and (b, d) ∈ L(x, y). We say a strong component Gx (a, b) of M 3 is invertible if both (x, a, b) and (x, b, a) are in Gx (a, b). Again the idea is similar to the one handling the RemoveNotMinority case. At each step we consider a vertex x of G and two vertices a, b ∈ L(x) and try to eliminate one of the a, b from L(x). To decide whether remove a or b we construct an instance of the problem say (G0 , H, L0 ) and solve this instance recursively. Based on the existence of a L0 -list homomorphism from G0 to H we decide to remove a or b. Depending on Gx (a, b) being invertible or not two different instances for the sub-problem are constructed. At the end we have singleton lists and if there is a homomorphism from G to H with the singleton lists then success otherwise we report there is no homomorphism from G to H. We denote the underline graph of digraph G by U N (G). If Gx (a, b) is invertible we construct a new instance G0 , H, L0 and to construct the lists L0 we use the Maltsev property. Lemma 4.1 Let X be an oriented path in G and let B, C, D be three walks in L(X) all congruent to X where B is from a to c and C is from b to c and D is from b to D. Then there exists a walk E from a to d in L(X) that is congruent with X. 24 Algorithm 5 RemoveMinority – Using Matlsev Operations 1: function RemoveMinority(G, H, L) 2: Input: x, a, b such that f (x; bk |i←a ) = a 3: Define Maltsev consistent homomorphism h : G × H 3 → H where h(x; a, b, c) = f (x; a, b, b, . . . , b, c) for a, b, c ∈ L(x). 4: while ∃ x ∈ V (G) with |L(x)| ≥ 2 do 5: Matlsev(G, H, L ) 6: if ∃ a list homomorphism from G to H then return True 7: else return False. 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: function Maltsev(G, H, L) Let a, b ∈ L(x) be two distinct vertices. Construct Gx (a, b). if Gx (a, b) is not invertible then Set L0 (x) = a and L0 (y) = ∅ for every x 6= y. Set G00 = ∅, and let G0 be an induced sub-digraph of G constructed as below. for all y ∈ G s.t. ∃ a path from (x, a, b) to (y, c, d) in Gx (a, b) do add y to G0 and c to L0 (y), let yy 0 an arc of G0 when (y, c, d)(y 0 , c0 , d0 ) ∈ Gx (a, b). if Gx (a, b) is invertible then Set L0 (x) = a and L0 (y) = ∅ for every x 6= y. Let G00 be the set of vertices y ∈ V (G) where (y, c, d, e) lies on an oriented path P from (x, a, b, b) to (x, b, b, a) in U N (G × H 3 ) s.t. no intermediate vertex in P is (x, a0 , b0 , c0 ) for a0 , b0 , c0 ∈ L(x) for all arc (y, c, d, e)(y 0 , c0 , d0 , e0 ) ∈ P do add h(y, c, d, e) to L0 (y), h(y 0 , c0 , d0 , e0 ) to L0 (y 0 ), and add arc yy 0 (y 0 y) to G00 Let G0 be the induced sub-digraph of G with vertices y ∈ G \ G00 and arcs yy 0 where (y, c, d)(y 0 , c0 , d0 ) ∈ Gx (a, b) and add c into L0 (y) when (y, c, d) ∈ Gx (a, b) if Matlsev(G0 ∪ G00 , H, L0 ) then remove b from L(x) else remove a from L(x). 25 Proof: By following B, C, D on the vertices in X and applying the definition of polymorphism h, we conclude that E exists.  Lemma 5.10 implies the following corollary. Corollary 4.2 If (a, c) ∈ L(x, y) and (b, c), (b, d) ∈ L(x, y) then (a, d) ∈ L(x, y). Lemma 4.3 The Algorithm 9 runs in O(|A(G)||H|k+1 ). Moreover, if there is a homomorphism g from G to H with g(x) ∈ {a, b} then there is a homomorphism from G to H after removing a or b from L(x) according to Maltsev-(G, H, L, h). Proof: We spend O(|G||H|k+1 ) to define h. For every pair a, b ∈ L(x) the algorithm construct an instance of the problem which takes O(|A(G)||A(H)|3 ). The algorithm is recursive and the depth of the recursion in |G||H|. Now by similar analysis as in Algorithm 4 we conclude that the running time of function Maltsev(G, H, L) is O(|G||A(G)||H|4 ) (replace |A(H)| by |H|2 ). Therefore the running time of the Algorithm 2.2 is O(|A(G)||H|k+1 ). First consider the case that Gx (a, b) is not invertible. The Algorithm 9 is recursive but at each recursive call the size of the input decreases by at least one. This is because we do not add b into L0 (x) and hence we have an instance (G0 , L0 , H) of the problem in which at least one vertex has a smaller size list. We also note that once we make a decision to remove a vertex from a list the decision is not changed. Therefore the overall procedure in this case is polynomial (assuming in each call Gx (a, b) is not invertible). According to Maltsev(G, H, L, h) if G0 does not admit a homomorphism to H then there is no homomorphism from G to H that maps x to a since G0 is a sub-digraph of G. No suppose b is removed according to Maltsev-(G, H, L, h) and there exists a homomorphism g from G to H with g(x) = b. Let ψ be the homomorphism from G0 to H. Note that ψ(x) = a. Define G1 be a sub-digraph of G0 consists of the vertices y such that (y, ψ(y), g(y)) is reachable from (x, a, b) in Gx (a, b). Now for every vertex y ∈ G1 set φ(x) = ψ(x) and for every y ∈ G \ G1 set φ(y) = g(y). Now let zz 0 be an arc of G. If none of the z, z 0 ∈ G1 then clearly since g is a homomorphism, φ(z)φ(z 0 ) ∈ A(H). If both z, z 0 ∈ G1 then again since ψ is a homomorphism, we have φ(z)φ(z 0 ) ∈ A(H). Suppose z ∈ G1 and z 0 6∈ G1 . Since z ∈ G1 there exists a path in Gx (a, b) from (x, a, b) to (z, ψ(z), g(z)). Now if ψ(z)g(z 0 ) is an arc then we are done. Otherwise (z 0 , c, g(z 0 )) ∈ Gx (a, b) where c ∈ L(z 0 ) and ψ(z)c ∈ A(H) (note that since ψ(z) is in L(z) it must have an out-neighbor in L(z 0 )). This would mean z 0 ∈ G1 , a contradiction. Note that when z 0 = x and z ∈ G1 then because (ψ(z), a) ∈ L(z, x) we have ψ(z)a ∈ A(H). Second consider the case that Gx (a, b) is invertible. Again as we argued in the previous case the algorithm is recursive but at each recursive call the size of the input decreases and once a decision made (removing a or b ) it won’t change. 26 Observe that if there exists a homomorphism g that maps x to a then for every closed walk X from x to x, the image of g(X) is a closed walk from a to a in H. Since there is a walk BB from b to b in L(X) congruent and since (a, b) ∈ L(x, x), there is a walk BA in L(X) congruent to X. Now by Lemma 5.10 there is a walk AB from a to b in L(X) and congruent with X. These would imply that there exists a path P in U (G × H 3 ) from (x, b, b, a) to (x, a, b, b). Now according to the definition of G00 for every walk BB in L(X) from b to b congruent with X we keep a walk AA in L0 (X) congruent with X and is obtained by adding h(y, c1 , c2 , c3 ) into L0 (y) where (y, c1 , c2 , c3 ) is in P . This would mean that in the list of L0 (X), corresponding to ψ(X) (ψ is a homomorphism from G to H where ψ(x) = a if there exists one) we have a path from a to a in L0 (X). Therefore if there exists no homomorphism from G0 ∪ G00 → H that maps x to a then there is no homomorphism from G to H that maps x to a. Now suppose b is removed according to Maltsev-(G, H, L, h) and there exists a homomorphism g from G to H with g(x) = b. Let ψ1 be the homomorphism from G0 to H and ψ2 be a homomorphism from G00 to H. Note that ψ1 (x) = ψ2 (x) = a. First we show that there is no arc e (forward or backward) from a vertex y in G0 to a vertex in G00 . If this is the case then there is a walk Q from x to y and there is a walk Q0 from y to x. Now since yz is an arc then Qee−1 Q0 is a closed walk from x to x and hence we should have added z into G00 . Note that G00 consists of all the induced oriented cycles including x and also all the paths reaching out of vertices of these cycles except x. Define G1 be a sub-digraph of G0 consists of vertices y such that (y, ψ1 (y), g(y)) is reachable from (x, a, b) in Gx (a, b). Now for every vertex y ∈ V (G1 ) set φ1 (y) = ψ(y) and for every y ∈ V (G) \ V (G1 ) set φ1 (y) = g(y). Define G2 be a sub-digraph of G00 consisting of vertices y such that (y, ψ2 (y), g(y)) is reachable from (x, a, b) in Gx (a, b). Now for every vertex y ∈ V (G2 ) set φ2 (y) = ψ2 (y) and for every y ∈ V (G) \ V (G2 ) set φ2 (y) = g(y). And finally let φ(y) = φ1 (y) when y ∈ V (G0 ) and φ(y) = φ2 (y) when y ∈ V (G00 ). Now let zz 0 be an arc of G. We need to verify that φ(z)φ(z 0 ) is an arc of H. If none of the z, z 0 ∈ V (G1 ∪ G2 ) then clearly since g is a homomorphism, φ(z)φ(z 0 ) ∈ A(H). If both z, z 0 ∈ V (Gi ) (i = 1, 2) then again since ψi is a homomorphism, we have φ(z)φ(z 0 ) ∈ A(H). Suppose z ∈ V (G2 ) and z 0 6∈ V (G2 ). Since z ∈ V (G2 ), there exists a closed walk ZZ 0 that contains z where Z is a path from x to z and Z 0 is a walk from z to x. Note that ψ2 (ZZ 0 ) is a walk from a to a in L(ZZ 0 ) and g(ZZ 0 ) is a walk from b to b in L(ZZ 0 ) and since (b, a) ∈ L(x × x) there exists a walk BA in L(ZZ 0 ) congruent with ZZ 0 . These would imply that corresponding to ZZ 0 there exists a path P from (x, b, b, a) to (x, a, b, b) containing vertex (z, ψ2 (z), d, g(z)). Now since g(z) ∈ L(z) there exists a vertex c ∈ L(z 0 ) such that g(z)c ∈ A(H) and there exists e0 ∈ L(z 0 ) such that dd0 ∈ A(H). Now we add the two arcs (z, ψ2 (z), d, g(z))(z 0 , c, d0 , g(z 0 )), (z 0 , c, d0 , g(z 0 ))(z, ψ2 (z), d, g(z)) into P and hence we obtain a path P 0 from (x, b, b, a) to (x, a, b, b) that goes through vertex (z 0 , c, d0 , g(z 0 )) and hence z 0 ∈ G00 . Now since φ2 (z)g(z 0 ) 6∈ A(H), by definition z 0 ∈ V (G2 ), a contradiction. 27 As we argue before one can show that φ1 is also a homomorphism from G to H. Therefore φ is a homomorphism from G to H with φ(x) = a.  5 Second Approach (none recursive algorithm) 5.1 An introduction to the Algorithm In this section we introduce the main parts of our algorithm. We encourage the reader to take time to read and internalize as much of this section as possible, while consulting the figures that are referenced. 1. We associate to each vertex x ∈ V (G) a list L(x), with each L(x) initially V (H). We also consider pair lists L(x, y), where (a, b) ∈ L(x, y) means that it may be possible for x and y to simultaneously map to a and b (respectively) for the same homomorphism. 2. We let the polymorphism on H be specialized for each vertex in G. We define a homomorphism f : G × H k → H, i.e. f (x; a1 , a2 , . . . , ak ) for x ∈ V (G) and a1 , ..., ak ∈ V (H). Initially f (x; a1 , ..., ak ) = φ(a1 , ..., ak ) where φ is the weak k-nu polymorphism given to us. We call f a weak k-nu homomorphism from G to H (see Def 5.1). 3. PreProcessing. We perform standard consistency checks that are done in CSP algorithms to prune the lists L(x) for every x, and pair lists L(x, y) for each x and y. 4. We refine f and work towards building a homomorphism g from G to H. The main loop in the algorithm picks a vertex x ∈ V (G) and tries to remove one of the vertices a ∈ V (H) from consideration for being g(x). At any given time, we have lists L(x) ⊆ H for each x ∈ V (G) that have the vertices in H that are being considered for g(x). 5. For a, b ∈ L(x), if f (x; b, b, ..., b, a) = a we say this is the minority case. The minority case is similar to a case of the homomorphism problem that is already solved, namely the setting where the underlying polymorphism is Maltsev (see subsection 5.4). We thus have our main loop choose x, b, a where f (x; b, b, ..., b, a) 6= a and attempt to remove a from consideration. If f (x; b, b, ..., b, a) = a then we leave it alone. This is the first place the existence of weak k-nu would be essential. 6. The main procedure, then, is to take an x ∈ V (G), special a, b ∈ L(x) such that f (x; b, b, ..., b, a) 6= a and remove a from consideration – that is for any e1 , e2 , ..., ek ∈ L(x) if f (x; e1 , e2 , ..., ek ) = a then we would set f (x; e1 , e2 , . . . , ek ) = c. This change to set f (x; e1 , ..., ek ) = c could break the homomorphism property of f (for k = 3 if (y; a01 , a02 , a03 ) exists with xy ∈ A(G), ei a0i ∈ A(H) and cf (y; a01 , a02 , a03 ) ∈ / A(H)). If so, we update the values of f on these neighbors of x. See Figure 4. 28 e3 e2 e1 a03 a02 a01 b03 b02 b01 change f (...) c a4 b4 a a2 b2 f (x; e1 , e2 , e3 ) = a f (y; a01 , a02 , a03 ) = a2 f (z; b01 , b02 , b03 ) = b2 f (x; e1 , e2 , e3 ) = c f (y; a01 , a02 , a03 ) = a4 f (z; b01 , b02 , b03 ) = b4 H H b a1 b1 b a1 b1 x y z f (x; b, b, a) = c f (y; a1 , a1 , a2 ) = a4 f (z; b1 , b1 , b2 ) = b4 H G Figure 4: The solid lines are arcs, dotted lines are missing arcs, and no line means either could be true. In the first column, initially f (x; e1 , e2 , e3 ) = a but we set f (x; e1 , e2 , e3 ) = c where c = f (x; b, b, a). In the second column, initially f (y; a01 , a02 , a03 ) = a3 but we change it to f (y; a01 , a02 , a03 ) = a4 where a4 = f (y; a1 , a1 , a2 ). The change in the first column is so we can remove a from L(x); the change in the second column is to preserve the homomorphism property (this change is only needed if there is a missing arc from c to a neighbor a2 of a). 7. DFS of updates to f . We begin by changing f values from a to something else (c) on x, and this forces some changes for f on y’s that are neighbors of x, which in turn forces some changes for f on neighbors of y. This results in a DFS through G × H k . We can imagine a subgraph Gf of G × H k where the vertices are the columns in Figure 4 (for k = 3) and there is a connection between (y; a1 , a1 , a2 ) and (z; b1 , b1 , b2 ) if a change to f occurs on the DFS. 8. Cycles in DFS and weak k-nu property. The DFS of updates to f should be careful of difficulties such as cycles. An almost-cycle is a cycle in the DFS of updates from some vertex (x; b, b, .., b, a) to itself where the only change in the vertex is the coordinate of the a (see Figure 6). DFS moves along such cycles and update f . Since f is a weak k-nu, update to f starting at (x; b, b, .., b, a) would be consistent with the changes starting at (x; b, b, ...., b, a, b, ..., b), a at ith coordinate. 9. At each step in the DFS, one of the coordinates (e.g., a2 in the second column of Figure 4) is forced due to a missing arc (the dotted lines in the figures). The remaining coordinates (e.g., a1 in the second column of Figure 4) are more free, and these are chosen to ensure that the DFS of updates to f always moves in the direction of a 29 shortest almost-cycle (Figure 6). Different choices for the ”more free” coordinates result in different paths through Gf because they use different values for updating f . 10. The goal is that the DFS can complete, and we have fixed any places the homomorphism property for f was broken. If we can fix all the problems, then f would still be a homomorphism after the procedure is done. Then we remove a from L(x). Further, for the proof of correctness we need to make sure that if we had a correct homomorphism g in mind, then after removing a from L(x) we could change g to remain a homomorphism with respect to the lists L and set g(x) to something other than a. Outline We have given most of the main ideas that are part of the algorithm and proofs. We give definitions to setup the algorithm in Section 5.2, precisely define the algorithm in Section 5.3, and give the correctness proof in Section 5.5. We encourage the reader to begin by reading Section 5.3 and consult back to Section 5.2 as needed. We also encourage the reader to look forward to Section 5.5 to keep in mind the main structure of the proofs. 5.2 Definitions This section contains definitions that are used in the algorithms in Section 5.3 and the proofs in Section 5.5. An oriented walk (path) is obtained from a walk (path) by orienting each of its edges. The net-length of a walk W , is the number of forward arcs minus the number of backward arcs following W from the beginning to the end. An oriented cycle is obtained from a cycle by orienting each of its edges. We say two oriented walks X, Y are congruent if they follow the same patterns of forward and backward arcs. Given digraphs G and H, let G × H k be a digraph on the vertices {(y; a1 , a2 , . . . , ak )|y ∈ V (G), ai ∈ V (H), 1 ≤ i ≤ k} with the arcs (y; a1 , a2 , ..., ak )(y 0 ; b1 , b2 , ..., bk ) where yy 0 is an arc of G and each ai bi , 1 ≤ i ≤ k, is an arc of H. By convention, we shall further restrict the use of the symbol G×H k to the digraph induced on the vertices {(y; a1 , a2 , . . . , ak )|y ∈ V (G), ai ∈ L(y), 1 ≤ i ≤ k} where L(y) is the set of vertices in H that are being considered as images of a homomorphism from G to H. Definition 5.1 (Homomorphism consistent with Lists) Let G and H be digraphs. For each x ∈ V (G), let L(x) ⊆ V (H). Let k > 1 be a constant integer. A function f : G × H k → H is a homomorphism consistent with L if the following hold. • List property : for every x ∈ V (G) and every a1 , a2 , . . . , ak ∈ L(x), f (x; a1 , a2 , . . . , ak ) ∈ L(x) • Adjacency property: for every x, y ∈ V (G) and every a1 , ..., ak ∈ L(x), b1 , ..., bk ∈ L(y), if xy is an arc of G and ai bi is an arc of H for each 1 ≤ i ≤ k then f (x; a1 , ..., ak )f (y; b1 , ..., bk ) is an arc of H. 30 In addition if f has the following property then we say f has the weak nu property. • for every x ∈ V (G), {a, b} ⊆ L(x), we have f (x; a, b, b, ..., b) = f (x; b, a, b, ..., b) = ... = f (x; b, b, b, ...a). We note that this definition is tailored to our purposes and in particular differs from the standard definition of weak k-nu as follows. (a) f is based on two digraphs G and H rather than just H (we think of this as starting with a traditional weak k-nu on H and then allowing it to vary somewhat for each x ∈ G), (b) We do not require that f (y; d, d, d, ..., d) = d (this is not required in our algorithm, and in fact is more convenient to leave out). Notation For simplicity let (bk , a) = (b, b, . . . , b, a) be a k-tuple of all b’s but with an a in the k th coordinate. Let (x; bk , a) be a (k + 1)-tuple of x, (k − 1) b’s and a in the (k + 1)th coordinate. Digraph of Updates to f Let Gf be a digraph where V (Gf ) = V (G × H k ) and with arcs : A(Gf ) = {(y; ak1 , a2 )(y 0 ; bk1 , b2 ) | yy 0 ∈ A(G), a1 b1 , a2 b2 ∈ A(H), f (y; ak1 , a2 )b2 6∈ A(H)} ∪ {(y; ak1 , a2 )(y 0 ; bk1 , b2 ) | y 0 y ∈ A(G), b1 a1 , b2 a2 ∈ A(H), b2 f (y; ak1 , a2 ) 6∈ A(H)}. When (y; ak1 , a2 )(y 0 ; bk1 , b2 ) is an arc of Gf then we say (y; ak1 , a2 ) avoids (y 0 ; bk1 , b2 ) in coordinate k, or simply say the avoidance appears in the k th coordinate. In Figure 4, (z; b1 , b1 , b2 ) is an out-neighbor of (y; b1 , b1 , b2 ) in Gf with avoidance in the third coordinate. Note that a directed path in Gf would be an oriented path in G × H k . Let B be a walk in H starting at some vertex a ∈ V (H). We say a directed path W in Gf (with avoidance in coordinate k) follows B if B is a walk in H induced by (k + 1)th coordinates of the vertices in W (see Figure 5). We say directed path W in Gf follows walk X in G when X is the walk induced by the first coordinates of the vertices in W . For a fixed vertex x ∈ V (G) and fixed vertex b ∈ V (H), let Gx,b be a digraph of vertices a0 ∈ L(x) where f (x; bk , a0 ) 6= a0 . The arcs of Gx,b are of form a0 a00 where there exists a directed path in Gf from w0 = (x; bk , a0 ) to w00 = (x; bk , a00 ). Definition 5.2 Let w = (x; bk , a) and w1 = (x; bk , a0 ) with f (w) 6= a and f (w1 ) 6= a0 . We say directed path W from w to w1 in Gf is quasi-cycle when vertex (x; dk , d1 ) is in W then d = b. If a0 = a then we say W is an almost-cycle. 31 c a4 b4 c4 a a2 b2 c2 b a1 b1 c1 b a1 b1 c1 x y z u f (x; b, b, a) = c f (y; a1 , a1 , a2 ) = a4 f (z; b1 , b1 , b2 ) = b4 f (u; c1 , c1 , c2 ) = c4 A path from (x; b, b, a) to (u; c1 , c1 , c2 ) Figure 5: An illustration of the graph Gf , with each column representing a vertex in Gf . Solid lines are arcs, dotted lines are missing arc, and no line means either could be true. (x; b, b, a) is connected to (y; a1 , a1 , a2 ) with avoidance at coordinate 3, which in turn is connected to (z; b1 , b1 , b2 ) with avoidance at coordinates 3, etc. The figure depicts a path P in Gf – where the avoidance began on the 3rd coordinate, proceeding by the walk a, a2 , b2 , c2 in H. f (x; b, b, a) = c f (y; b1 , b1 , b2 ) = b4 W : f (z; c1 , c1 , c2 ) = c4 f (w; d1 , d1 , d2 ) = d4 f (v; i1 , i1 , i2 ) = i4 f (u; `1 , `1 , `2 ) = `4 c b4 c4 d4 i4 `4 c a b2 c2 d2 i2 `2 a b b1 c1 d1 i1 `1 b b b1 c1 d1 i1 `1 b x y z w u x (x; b, b, a), (y; b1 , b1 , b2 ), (z; c1 , c1 , c2 ), (w; d1 , d2 , d3 ), v (v; i1 , i1 , i2 ), (u; `1 , `1 , `2 ), (x; b, b, a) Figure 6: An almost-cycle in Gf . Each column is a vertex in Gf , and dotted lines are missing arcs. 32 Consider the digraph Gx,b . Let S = Gx,b (a) be a strong component of Gx,b containing a. We say S is a sink component if there is no arc from an element in S to any other vertex in Gx,b outside S. We also say S is trivial if it has only one element. Let w = (x; bk , a) where Gx,b (a) is a sink component in Gx,b . Let Grf (w) (r for restricted) be the induced sub-digraph of Gf (w) containing vertices w0 = (y; ak1 , a2 ) reachable from w such that (b, a1 ) ∈ L(x, y). 5.3 Main Procedure In this subsection we present the main algorithm. The main algorithm is Algorithm 6. Subroutines that are used by the main algorithm are Algorithms 7, 8, and a known result discussed in Section 5.4. Algorithm 7 (PreProcessing) simply updates the lists L of vertices in G based on local edge constraints, and also updates the pair lists of vertices in G (pair consistency); standard textbook CSP algorithms for the homomorphism problem would repeatedly invoke the PreProcessing routine, and then make a decision (often greedy, or trying all possible choices that remain). Algorithm 6 The main algorithm for solving the digraph homomorphism problem. 1: function DigraphHom(G, H, φ) . G and H digraphs, φ a weak k-nu on H 2: for all x ∈ G, let L(x) = V (H) 3: for all x ∈ G and a1 , ..., ak ∈ V (H), let f (x; a1 , ..., ak ) = φ(a1 , ..., ak ) 4: PreProcessing(G, H, L) 5: while ∃x ∈ V (G), a, b ∈ L(x), a 6= b s.t. f (x; bk , a) 6= a & Gx,b (a) is a sink do 6: RemoveNotMinority((x; bk , a)) 7: Remove a from L(x) 8: PreProcessing(G, H, L) 9: Note: now, for all x ∈ V (G) and a, b ∈ L(x) we know f (x; bk , a) = a 10: RemoveMinority(G, H, L, f ) 11: if RemoveMinority produces a homomorphism then return true Algorithm 8 (RemoveNotMinority function) is the key subroutine of the main algorithm. It starts with w = (x; bk , a) where f (w) = c 6= a and then it starts modifying f by setting f (x; e1 , e2 , . . . , ek ) = f (w) for every k-tuple e1 , e2 , . . . , ek ∈ L(x) with f (x; e1 , e2 , . . . , ek ) = a. Now in order to have a homomorphism from G × H k to H consistent with L it performs a depth first search (in Grf (w) ) to modify f as necessary. After the execution of Algorithm 8 we remove a from L(x) in Algorithm 6. We construct Gf once and then construct Gx,b and then consider a sink component of Gx,b , to identify the vertex w = (x; bk , a). After the main loop in Algorithm 6, we end up with a so-called Maltsev or minority instance of the problem – in which we have a homomorphism f consistent with L such that for every y ∈ V (G) and every c, d ∈ L(y) we have f (y; ck , d) = d. We argue in the next subsection that such instances can be solved by using the known algorithm of [BD06] (see 33 the remark at the end of Subsection 5.4). The Maltsev/minority instances can also be solved in a manner similar to our arguments for RemoveNotMinority (see Section 5.7) . Algorithm 7 Update lists of x, y based on edge constraints and pair constraint 1: function PreProcessing(G, H, L) 2: Input: digraphs G, H, lists L(x) ⊆ V (H) for each x 3: ArcConsistency(G, H, L); 4: PairConsistency(G, H, L) function ArcConsistency(G, H, L) update=True while update do if ∃xy(yx) ∈ A(G), a ∈ L(x) s.t. @b ∈ L(y) with ab(ba) ∈ A(H) then remove a from L(x) and set update=True. else update=False. 11: if there is an empty list then return no homomprphism 5: 6: 7: 8: 9: 10: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: function PairConsistency(G, H, L) for every (x, y) ∈ V (G) × V (G) set L(x, y) = {(a, b)|a ∈ L(x), y ∈ L(y)}. for all xy ∈ A(G), a ∈ L(x), b ∈ L(y) do if ab 6∈ A(H) then remove (a, b) from L(x, y). update=True while update do if ∃x, y, z s.t. @c ∈ L(z) s.t. (a, c) ∈ L(x, z)&(c, b) ∈ L(z, y) then remove (a, b) from L(x, y) and set update=True. else update=False. if there is an empty list then return no homomorphism An overview of Algorithm 8 : Algorithm 8 starts with vertex x ∈ V (G) and two vertices a, b ∈ L(x) such that Gx,b (a) is a sink component. The Algorithm 8 has a depth first search function so called NM-DFS that modifies f . The advantage of taking such a, b is that we only need to modify f in Grf (w) where w = (x; bk , a) and this allows us to direct the NM-DFS along the almost-cycles in Grf (w). The crucial observation is that we construct Grf (w) once with the initial values. Then we change f (x; e1 , e2 , . . . , ek ) from a to f (x; bk , a). Now updating f is translated into taking different directed paths in Grf (w) starting at vertex w. All the step taken by the NM-DFS along the paths in Grf (w) are guided based on the current values of f . Suppose at the current step of the NM-DFS we are at vertex w0 = (y; ak1 , a2 ). Suppose we have changed the image of some (y; a01 , a02 , . . . , a0k ) from a2 to f (w0 ). Note that if this is not 34 the case then there is no need to continue from w0 and it would mean retreat from w0 . Now we look at each neighbor of y, say z. Then in the list of z we look for an out-neighbor (in-neighbor) of a2 , say b2 , for which the f value of w1 = (z; b01 , b02 , . . . , b0k ) should be changed to an out-neighbor of f (w0 ) because the f value of some vertex (y; a01 , . . . , a0k ) was changed from a2 to f (w0 ). There are two possibilities : In the first case the f value of w1 is b2 and it should be changed from b2 to an out-neighbor of f (w0 ) because f (w0 )b2 6∈ A(H) (b2 f (w0 ) 6∈ A(H)). In the second case, the f value of w1 has already been changed to some vertex d ∈ L(z) at some earlier step and now this value should be changed to an out-neighbor of f (w0 ) because f (w0 )b2 , f (w0 )d 6∈ A(H) (b2 f (w0 ), df (w0 ) 6∈ A(H)). Therefore we find a neighbor of w0 , say w00 = (z; bk1 , b2 ) in Grf (w) to change f (w1 ) to f (w00 ) and take arc w0 w00 ∈ Gfr (w) in the NM-DFS. Since w0 ∈ Grf (w), we have (b, a1 ) ∈ L(x, y) and hence there exists a vertex b1 ∈ L(z) such that a1 b1 ∈ A(H), and (b, b1 ) ∈ L(x, z) (because of the PreProcessing). Definition 5.3 Let w0 = (y; ak1 , a2 ) be a vertex in Grf (w). We say an arc w0 w00 ∈ Grf (w) is nice if it lies on a shortest directed path (cycle) Q (starting at w) in Grf (w) and if there is a choice we may assume Q is a shortest almost-cycle, i.e. Q ends at (x; bk , a). To simplify the proof of the correctness we may direct the NM-DFS to take an w0 w00 when f (w0 )f (w00 ) is an arc of H. If no such arc w0 w00 exists, then we place w0 w00 into queue Q (pause) and go back to take different branches. Later NM-DFS comes back and will resume from w0 w00 . We will explain how such situation occurs. Once NM-DFS retreat at some point it considers vertex w1 where w1 = (y; dk1 , d2 ) and then take arc w1 w2 where w2 = (z; ek1 , e2 ) and f (w0 ) = d2 and f (w00 ) = e2 . If there is no branch to take NM-DFS removes an arc w0 w00 from Q and it resumes from there. For simplicity one can assume that DFS does not put anything into queue Q. In Algorithm 8 the vertices (x; bk |i←a ) and (x; bk |`←a ) of Gf are considered as the same vertex. The NM-DFS is used for two purposes. 1. To modify f such that at the end f is a homomorphism consistent with lists L and for any k-tuple e1 , e2 , . . . , ek , f (x; e1 , e2 , . . . , ek ) 6= a. 2. To show that if there exists a homomorphism g : G → H consistent with lists L with g(x) = a then there exists a homomorphism h : G → H consistent with lists L and with h(x) 6= a. We use NM-DFS as a guide to define h. We will show that in order to repair f we only need to do the NM-DFS inside Grf (w). Let Gaf (w) (’a’ for almost-cycle) be the sub-digraph of Grf (w) containing vertices w0 such that w0 lies on an almost cycle containing w. We observe that in order to update f in Gaf (w), 35 e3 e2 e1 a03 a02 a01 b03 b02 b01 d03 d02 d01 d f (z; b1 , b1 , b2 ) = b4 c a4 b4 d4 change a a2 b2 d2 b a1 b1 d1 b a1 b1 d1 x y z u f (y; a01 , a02 , a03 ) = a2 f (z; b01 , b02 , b03 ) = b2 f (y; a01 , a02 , a03 ) = a4 f (z; b01 , b02 , b03 ) = b4 f (z; b01 , b02 , b03 ) = d Figure 7: Line 10 from Algorithm 8 where f (z; b01 , b02 , b03 ) changed from b2 to d at an earlier step in the NM-DFS, and so now is changed to b4 along with other points that map to b2 . we need to go through the cycles in Gaf (w) and hence we direct NM-DFS to go through the shortest almost-cycles one by one. Let Gof (w) (’o’ is for other) be the sub-digraph of Grf (w) containing those vertices that do not lie on an almost-cycle. Therefore in order to update f in Gof (w) we need to direct NM-DFS to go through the directed paths in Gof (w) and hence we direct NM-DFS to go through the shortest paths one by one. In what follows we argue how things could go wrong if H does not have the weak nu property. For contrary suppose w1 = (x; bk , a) with f (w1 ) = c and w2 = (x; a, b, b, . . . , b) with f (w2 ) = d. If d = a then according to the NM-DFS we try to remove a from L(x) if we start with w1 while we do need to keep a in L(x) because we later use the Maltsev algorithm. It might not be the case that d 6= a but as one can see (shown in the proof of Lemma 3.3 (4)) some non-minority pairs becomes minority pairs. In other words, during NM-DFS for some w3 = (x; bk , e) with f (w3 ) 6= e we may set f (w3 ) to e. So we need to have f (w1 ) = f (w2 ), the weak nu property, to start. We do mention at the end of the proof of Lemma 5.7 that it does not matter to start the NM-DFS from w1 or w2 . In Conclusion : NM-DFS modifies f and the reason we use almost-cycles is because of (2) above and the need for weak nu property is because modifying f starting at any of the (x; bk , a), (x; b, b, . . . , b, a, b, . . . , b) (ith coordinate) would keep the property of f . 36 Algorithm 8 Remove a from L(x), updating f so it remains a homomorphism of G × H k to H consistent with L. 1: function RemoveNotMinority(w = (x; bk , a)) 2: Input: x, a, b such that f (w) = c 6= a and Gx,b (a) is a sink 3: if ∃ w1 = (x; a01 , a02 , . . . , a0k ) with f (w1 ) = a then 4: for all w1 = (x; a01 , a02 , . . . , a0k ) with f (w1 ) = a do set f (w1 ) = c 5: NM-DFS(w = (x; bk , a)) 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: function NM-DFS(w0 = (y; ak1 , a2 )) if w0 already visited then return do Let w00 = (z; bk1 , b2 ) 6= (x; bk , a) s.t w0 w00 is a nice arc of Grf (w) . a2 b2 ∈ A(H), f (w0 )b2 6∈ A(H) & f (y; ...) changed from a2 to f (w0 ) if f (w0 )f (w00 ) 6∈ A(H) then add w0 w00 into queue Q and return Let d ∈ L(z) s.t. f (z; ...) was changed from b2 to d. . d = b2 if no change 0 if f (w )d 6∈ A(H) then for all w2 = (z; ...) if f (w2 ) was changed from b2 to d or f (w2 ) = b2 do set f (w2 ) = f (w00 ) NM-DFS(w00 ) while ∃ a neighbor of w0 that has non been considered . It considers the neighbors of w0 and for each b2 only one NM-DFS(w00 ) call while Q is not empty do remove w0 w00 from Q if w0 w00 is an arc of Grf (w) then NM-DFS(w00 ) 37 5.4 Minority Algorithm (RemoveMinority) In this section we show that once the minority case has been reached in our main algorithm, we can reduce to an already solved setting for homomorphism testing – namely that of the Maltsev case. We note that this section is independent of the rest of the algorithm. Note that at this point for every a, b ∈ L(x) we have f (x; bk |i←a ) = a and in particular when a = b we have f (x; a, a, . . . , a) = a (idempotent property). This is because when a is in L(x) then it means the RemoveNotMinority procedure did not consider a and in fact did not change the value of f (x; ...) from a to something else. Note that for the argument below we just need the idempotent property for those vertices that are in L(x), x ∈ V (G). A ternary polymorphism h0 is called Maltsev if for all a 6= b, h0 (a, b, b) = h0 (b, b, a) = a. Note that the value of h0 (b, a, b) is unspecified by this definition. Let G and H be as input to Algorithm 6, and suppose line 9 of the algorithm has been reached. We define a homomorphism h : G × H 3 → H consistent with the lists L by setting h(x; a, b, c) = f (x; a, b, b, . . . , b, c) for a, b, c ∈ L(x). Note that because f has the minority property for all x ∈ G, a, b ∈ L(x), h is a Maltsev homomorphism consistent with the lists L. Note that for every a, b ∈ L(x) we have f (x; bk |k←a ) = a and in particular if a = b we have f (x; a, a, . . . , a) = a (idempotent property). Since a is in L(x), this means the RemoveNotMinority procedure did not considered a and in fact did not change the value of f (x; ...) from a to something else. Note that for the argument below we just need the idempotent property for those vertices that are in L(x), x ∈ V (G). Let G0 be the structure obtained from G by making each arc a different binary relation. In other words, G0 has vertices V (G) and |E(G)| binary relations Re , e ∈ E(G), where Re = {xy} if e is the arc e = xy. Let H 0 be the structure where V (H 0 ) is the disjoint union of L(x), x ∈ V (G), and there are also |E(G)| binary relations Se , e ∈ E(G), where Se is the set of all ordered pairs ab with ab ∈ E(H), a ∈ L(x), b ∈ L(y), where e = xy. Note that |V (H 0 )| ≥ |V (G0 )| if each L(x) is non-empty. This may seem unusual for the homomorphism setting, but is certainly allowed. Now note that there is an L-homomorphism of G to H (i.e., a list homomorphism consistent with lists L) if and only if there is a homomorphism of G0 to H 0 . Homomorphisms of such structures are mappings f : V (G0 ) → V (H 0 ) such that xy ∈ Re implies f (x)f (y) ∈ Se for all e ∈ E(G). Finally, note that the structure H 0 has a Maltsev polymorphism h0 of the ordinary kind. Indeed, let hx be our Maltsev polymorphisms defined on L(x) by setting hx (a, b, c) = h(x; a, b, c). We let h0 (a, b, c) = h(x; a, b, c) if a, b, c are from the same L(x), and for a, b, c not from the same L(x) define h0 (a, b, c) = a unless a = b, in which case define it as h0 (a, b, c) = c. The definition ensures that h is Maltsev. To check it is a polymorphism, note that aa0 , bb0 , cc0 ∈ Se is only possible if a, b, c ∈ L(x), a0 , b0 , c0 ∈ L(y), where e = xy. For those, we have the polymorphism property by assumption. Now we have a structure with a Maltsev polymorphism, so the Bulatov-Dalmau [BD06] 38 algorithm applies and solves the homomorphism problem. Note that Corollary 4.2 of the Bulatov-Dalmau paper explicitly mentions that it is polynomial in both the sizes of G and H. Therefore we have the following theorem. Theorem 5.4 Suppose h : G × H k → H is a minority homomorphism consistent with lists L on G. Then the existence of an L-homomorphism of G to H can be decided in polynomial time. Remark : We have communicated with the authors of [BD06] and they confirmed that indeed we can apply their algorithm as explained above. We note that it is also possible to give a direct algorithm for the minority case that is similar to how we handle the “not minority” case. 5.5 Proofs 5.5.1 PreProcessing and List Update We first show that the standard properties of consistency checking remain true in our setting – namely, that if the PreProcessing algorithms succeed then f remains a homomorphism consistent with the lists L if it was before the pre-processing. Lemma 5.5 If f is a homomorphism of G × H k → H consistent with L then f is a homomorphism consistent with L after running the pre-processing. Proof: We need to show that if a1 , a2 , . . . , ak are in L(y) after the pre-processing then f (y; a1 , a2 , . . . , ak ) ∈ L(y) after the pre-processing. By definition vertex a is in L(y) after the pre-processing because for every oriented path Y (of some length m ) in G from y to a fixed vertex z ∈ V (G) there is a vertex a0 ∈ L(z) and there exists a walk B in H from a to a0 and congruent with Y that lies in L(Y ). L(Y ) denote the vertices that are in the list of the vertices of Y . Let a01 , a02 , a03 , . . . , a0k ∈ L(z). Let Ai , 1 ≤ i ≤ k be a walk from ai to a0i in L(Y ) and 0 congruent to Y . Let Ai = ai , ai1 , a2i , . . . , am i , ai and let Y = y, y1 , y2 , . . . , ym , z. Since f is a homomorphism consistent with L before the pre-processing, f (y; a1 , a2 , . . . , ak ), m m 0 0 0 f (y1 ; a11 , a12 , . . . , a1k ), . . . , f (yi ; ai1 , ai2 , . . . , aik ), . . . , f (ym ; am 1 , a2 , . . . , ak ), f (z; a1 , a2 , . . . , ak ) is a walk congruent with Y . This would imply that there is a walk from f (y; a1 , a2 , . . . , ak ) to f (z; a01 , a02 , . . . , a0k ) congruent with Y in L(Y ) and hence f (y; a1 , a2 , . . . , ak ) ∈ L(y).  By a similar argument as in the proof of Lemma 5.5 we have the following lemma. Lemma 5.6 If f is a homomorphism of G×H k → H, consistent with L and a1 , a2 , . . . , ak ∈ L(x), b1 , b2 , . . . , bk ∈ L(y), and (ai , bi ) ∈ L(x, y), 1 ≤ i ≤ k, after pre-processing then (f (x; a1 , a2 , . . . , ak ), f (y; b1 , b2 , . . . , bk )) ∈ L(x, y) after the pre-processing. 39 5.5.2 RemoveNotMinority Correctness Proof The main argument is proving that after each step of the RemoveNotMinority function f still is a homomorphism consistent with the lists and has weak nu property (Lemma 5.7). Moreover, after removing a vertex from the list of a vertex of G there still exists a homomorphism from G to H if there was one before removing that vertex from the list (Lemma 5.8). Lemma 5.7 If f is a homomorphism of G × H k → H, consistent with L with weak nu property before RemoveNotMinority(w = (x; bk , a)) then the modified f remains a homomrphism consistent with L with weak nu property afterwards. Moreover for every k-tuple a1 , a2 , . . . , ak ∈ L(x), f (x; a1 , . . . , ak ) 6= a. Lemma 5.8 If there is a homomorphism g : G → H with g(x) = a then there is a homomorphism from G to H after removing a from L(x) according to RemoveNotMinority((x; bk , a)). 5.5.3 Proof of Lemma 5.7 In order to show that f still is a homomorphism consistent with L with weak nu property, we need to address items 1,2,3,4 below. 1. The weak nu property is preserved. 2. The RemoveNotMinority function stops in O(|A(G)||H|k+1 ). 3. The adjacency property is preserved: for an arbitrary arc yz ∈ A(G) (zy ∈ A(G)) and for every a01 , a02 , . . . , a0k ∈ L(y) and b01 , b02 , . . . , b0k ∈ L(z) where a0i b0i ∈ A(H) (b0i a0i ∈ A(H)), 1 ≤ i ≤ k, we have f (y; a01 , a02 , . . . , a0k )f (z; b01 , b02 , . . . , b0k ) ∈ A(H) (f (z; b01 , b02 , . . . , b0k )f (y; a01 , a02 , . . . , a0k ) ∈ A(H)). 4. We argue that we only need to fix the problems caused by changing f (x; ...) from a to c in Grf (x; bk , a). We show that if f (x; bk , a) = c 6= a and f (x; e1 , e2 , . . . , ek ) = a then f (x; e1 , e2 , . . . , ek ) is changed to c (in the simple case) or to some other fixed element (which will be used in the next lemma) not equal to a after the execution of RemoveNotMinority((x; bk , a)). Proof of 1 : Since we change the value f (y; a01 , a02 , ..., a0k ) from a2 to f (y; ak1 , a2 ) for every k-tuple a01 , a02 , . . . , a0k ∈ L(y), we change f (y; b1 , b1 , . . . , b1 , b2 ) = f (y; b1 , b1 , . . . , b2 , b1 ) = · · · = f (y; b2 , b1 , . . . , b1 ) to the same value. Therefore f still has the weak k-nu property. Proof of 2 : Observe that during the NM-DFS the value of f (y; a01 , a02 , . . . , a0k ), y 6= x may change several times. This is because after changing f (y; a01 , a02 , . . . , a0k ) from a2 to some ak+1 there might be the case that there is a path A0 from a to ak+1 in H and some directed path Q in Grf (w) to some vertex (y; ck1 , ak+1 ). 40 However, the value of f (θ), θ = (x; e1 , e2 , . . . , ek ) is changed once or the value of f (θ) may change a number of times while going through a circuit (explained in Case 2 in the proof of (4)) but each time to a new value. Note that the NM-DFS algorithm may end up traversing all the vertices in Gf but each vertex at most once. There are at most |G||H k | vertices in Gf . The running time of the NM-DFS is O(|A(G)|H|2k+1 ). Note that the size of Gf is at most |A(G)|H|k+1 and at each step of the NM-DFS we may change a value of some k-tuple in a list of a vertex of G and there are |H|k of them. Proof of 3 : Let ak+1 = f (y; a01 , a02 , . . . , a0k ) and bk+1 = f (z; b01 , b02 , . . . , b0k ). If ak+1 bk+1 is an arc of H then we are done. Otherwise without loss of generality we consider the following two cases. (a) The value of f (y; a01 , a02 , . . . , a0k ) changed from a2 to ak+1 for the last time and the value of f (z; b01 , b02 , . . . , b0k ) was not changed. (b) The value of f (y; a01 , a02 , . . . , a0k ) changed from a2 to ak+1 for the last time and the value of f (z; b01 , b02 , . . . , b0k ) was changed after changing the value of f (y; a01 , a02 , . . . , a0k ). Note that ak+1 is the last value of f (y; a01 , a02 , . . . , a0k ) and bk+1 is the last value of f (x; b01 , b02 , . . . , b0k ). Observe that the original value of f (y; a01 , a02 , . . . , a0k ) may not be a2 and it could have been changed several times before finally being set to ak+1 . For the sake of simplicity, we may assume that a2 is the original value of f (y; a01 , a02 , . . . , a0k ). Otherwise we may consider an arc (y; a001 , a002 , . . . , a00k )(z; b001 , b002 , . . . , b00k ) with f (y; a001 , a002 , . . . , a00k ) = a2 instead of arc (y; a01 , a02 , . . . , a0k )(z; b01 , b02 , . . . , b0k ) and then we could look back at the earlier step of the NMDFS and apply the same argument as below. According to the RemoveNotMinority function, there is a directed path W from w = (x; bk , a) to w0 = (y; ak1 , a2 ) in Grf (w). Here w0 is the vertex visited by NM-DFS function. Let b2 be the original value of f (z; b01 , b02 , . . . , b0k ). We note that a2 b2 is an arc of H because initially f is a homomorphism consistent with L. Proof of (a) : Here bk+1 = b2 . Now since ak+1 b2 6∈ A(H), there exists w00 = (y; bk1 , b2 ) such that w0 w00 ∈ A(Grf (w)). The NM-DFS considers all such arcs w0 w00 ∈ Gfr (w) and by Claim 5.9 we may assume that w0 w00 is a nice arc (f (w00 ) is an out-neighbor of ak+1 ). Therefore NM-DFS should have changed the value of f (z; b01 , b02 , . . . b0k ) from b2 to f (w00 ) which is a contradiction. Proof of (b): Case 1. Suppose ak+1 b2 6∈ A(H). Observe that there exists w00 = (z; bk1 , b2 ) such that w0 w00 ∈ A(Grf (w)). Recall that the assumption is : f (z; b01 , b02 , . . . , b0k ) changed after f (y; a01 , a02 , . . . , a0k ). There are two scenarios : 1. w00 is visited right after w0 . 41 a03 a02 a01 − − − b03 b02 b01 d03 d02 d01 a5 a4 = d b4 e4 c a2 f (x; b, b, a) = c f (y; a1 , a1 , a2 ) = a4 f (z; c1 , c1 , b2 ) = b4 f (u; e1 , e1 , e2 ) = e4 f (y; d1 , d1 , a2 ) = a5 change b2 e2 a a1 b d1 a1 b x d1 y b1 c1 f (y; a01 , a02 , a03 ) = a2 f (z; b01 , b02 , b03 ) = b2 f (u; d01 , d02 , d03 ) = e2 f (y; a01 , a02 , a03 ) = a4 f (z; b01 , b02 , b03 ) = b4 f (u; d01 , d02 , d03 ) = e4 f (y, a01 , a02 , a03 ) = a4 f (y, a01 , a02 , a03 ) = a5 e1 b1 c1 e1 z u z 0 Figure 8: Keep in mind for the proof of 3 (b) in the proof of Lemma 5.7 2. We reach w00 by following a directed path R in Grf (w) starting at w0 . Suppose (1) occurs. This would mean we should have changed the value of f (z; b01 , b02 , . . . , b0k ) as we discussed in the proof of (a). Note that again here we appeal to Claim 5.9 for the nice arc w0 w00 . We also note that in this case the value of f (z; b01 , b02 , . . . , b0k ) is going to change for the first time in the NM-DFS. Suppose (2) occurs. This means the value of f (z; b01 , b02 , . . . , b0k ) did change (from b2 ) following R. Let Z : y, y1 , . . . , yr , z be the oriented path in G that R follows. By adding arc yz (zy) we get an oriented cycle in G. Since Z(yz) is a cycle it may be that the last vertex of R is w00 = (z; bk1 , b2 ) and hence by following the modification of f along the path R we set f (z; b01 , b02 , . . . , b0k ) = bk+1 . Since f is a homomorphism for the vertices in R (by Claim 5.9), f (w0 )f (w00 ) is an arc and hence ak+1 bk+1 must be an arc of H, a contradiction. In other words, the modification is consistent. Now let us assume that the last vertex of R is not w00 . Let α = (z; ck1 , b2 ) be the last vertex of R (α 6= w00 ). Now in this case according to line 10 of the NM-DFS (see y as z and z as y in the algorithm, see also Figure 8) we have d = ak+1 and dbk+1 is not an arc of H. First suppose a2 bk+1 6∈ A(H) (in Figure 8, a2 b4 6∈ A(H)) then according to NM-DFS we should have considered the vertex α0 = (y; dk1 , a2 ) where αα0 is a nice arc and hence we should have changed the value of f (y; a01 , a02 , . . . , a0k ) from ak+1 to an in-neighbor of bk+1 , a contradiction (by Claim 5.9 we consider the nice arc αα0 and f (α)f (α0 ) is an arc of H). Second suppose a2 bk+1 is an arc of H (in Figure 8, a2 b4 ∈ A(H)). In this case there exists a nice arc w0 w2 in Grf where w0 = (y; ak1 , a2 ) and w2 = (z; bk1 , bk+1 ) (in Figure 42 8, (y; a1 , a1 , a2 )(z; b1 , b1 , b4 ) ∈ A(Grf (w)). Therefore we should have changed the value of f (z; b01 , b02 , . . . , b0k ) from bk+1 , a contradiction that was the last value (here again by Claim 5.9 f (w0 )f (w2 ) is an arc of H). Remark : Note that w00 could be one of the visited vertices but the important thing is we change the value of some k-tuple in z to f (w00 ) (if necessary) and once the NM-DFS is called with vertex w00 it returns. What is important to notice is that in the NM-DFS we consider the arcs of Grf (w) (we visit each arc) and makes the update to f accordingly. Once the NM-DFS traces back and come back to w00 it starts taking a different branch and it continues updating f from w00 (the visited) accordingly. Case 2. ak+1 b2 ∈ A(H). In this case the NM-DFS does not proceed to some vertex w00 = (z; bk1 , b2 ) where a2 b2 ∈ A(H). However, NM-DFS proceeds to some vertex w1 = (z; dk1 , , b2 ) with f (w1 ) = bk+1 because f (z; b01 , b02 , ..., b0k ) has changed to bk+1 . Now since ak+1 b2 ∈ A(H) and ak+1 bk+1 6∈ A(H), NM-DFS should have continued considering some vertex w2 = (y; ek1 , ak+2 ) which is a neighbor of w1 in Grf (w) and should have changed f (y; a01 , a02 , ..., a0k ) from ak+1 to an in-neighbor of bk+1 . But this is a contradiction because ak+1 was the last value of f (y; a01 , a02 , ..., a0k ). Claim 5.9 Suppose the NM-DFS is at vertex w0 = (y; ak1 , a2 ). Let b2 be an out-neighbor (in-neighbor) of a2 . Then at some stage of the NM-DFS there exists a vertex w00 = (z; bk1 , b2 ) such that w0 w00 is a nice arc and f (w0 )f (w00 ) ∈ A(H). Proof: Set w00 = (z; bk1 , b2 ) such that w0 w00 ∈ Grf (w). Initially f (w0 )f (w00 ) (f (w00 )f (w0 ) ∈ A(H)) is an arc of H because f is a homomorphism consistent with the lists. For contradiction suppose f (w0 )f (w00 ) is not an arc of H. This means either f (w0 ) did change and f (w00 ) did not change immediately or f (w00 ) did change and f (w0 ) did not change. Case 1. f (w0 ) did change first. This means there is a directed path Q1 from w to some α = (y; ck1 , c2 ) in Grf (w) and the NM-DFS went along Q1 and did change f (w0 ) from c2 to f (α). But according to the rules of NM-DFS we don’t take arc w0 w00 and we will wait till we take arc λ = (y; ck1 , c2 )(z; dk1 , d2 ) such that f (w00 ) = d2 is an is an out-neighbor (in-neighbor) of c2 . Note that f (w0 ) is changed to f (α) according to the NM-DFS. If f (α)d2 6∈ A(H) then the arc λ should have been taken by NM-DFS. Case 2. f (w00 ) did change and f (w0 ) did not change immediately. This means there is a path Q1 from w to β = (z; dk1 , d2 ) where f (w00 ) changed from d2 to f (β). Now the NM-DFS moved along some path Q2 starting at β and reach w0 . At this point if f (w0 )d2 6∈ A(H) and f (w0 )f (β) 6∈ A(H) then according to line 13 of the Algorithm 8 the NM-DFS should change f (w00 ) from f (β) to an out-neighbor of f (w0 ). So this case can not happen.  43 c d1 d2 a c a c d1 d2 a b b b b b b b b b b x x x x x Figure 9: Circuit of length 2 Proof of 4 : The NM-DFS starts from vertex w where w = (x; bk , a). The changes to f are forced in the list of vertices y where w0 = (y; ak1 , a2 ) ∈ Gf , i.e. f (y; . . . ) should be changed from a2 to something else. This means there exists a path from w to w0 . Since we only need to change the image of f in y from a2 , we are free to choose a1 ∈ L(y) and hence we may assume that NM-DFS is performed in Grf (w). We also note that since a is a sink component of Gx,b (a), any shortest almost-cycle lies entirely in Grf (w). Now in the remaining we analyze the behavior of NM-DFS depending on the final value of f (x; e1 , e2 , . . . , ek ) that is initially a. The final value is used in Lemma 5.8. Let C = Gx,b (a) be sink strong component of Gx,b containing a. We say vertex a ∈ C is a source if there is no path from a to c in C where f (x; bk , a) = c. We say the sink component C is invertible if it does not have a source. Suppose C does not have a source. Now according to the definition of invertible, there is a path in C starting at a that goes through the vertices c, d1 , d2 , . . . , dt−1 , dt in this order. Thus there exist corresponding vertices α = (x; bk , a), β = (x; bk , c), λj = (x; bk , dj ), 1 ≤ j ≤ t and there exists a quasi-cycle Q in Grf from α to λt that goes through β, λ1 , λ2 , . . . , λt in this order and f (α) = c, f (β) = d1 , f (λ1 ) = d2 , . . . , f (λt−1 ) = dt , f (λt ) = a. If t = 1 then d1 = a and λt+1 = α. We say Q is a circuit in Grf (α) (see Figure 9). Let Q(t) be an almost-cycle obtained from concatenating Q and a directed path Q0 from λt to α0 = (x; bk , a) in Grf (α). Note that path Q0 exists because C is a strong component of Gx,b . Note that here for simplicity we may assume that the last vertex of the circuit is λt with f (λt ) = a. It could be the case the di plays the role of a. Observe that if there exists an arc from a to a00 in C then this means we do need to modify f (x; β10 , β20 , . . . , βk0 ) from a00 to f (w1 ) where w1 = (x; bk , a00 ). Now we consider two cases depending on whether C is invertible or not. 44 Case 1. C is not invertible. Note that since a is a source and C is a sink component, there is no arc from a to some c where f (w) = c, and hence there is no path in Grf (α) from α to (x; bk , c). This means we do not end up changing a value of f (x; α10 , α20 , . . . , αk0 ) after changing it from a to c and then changing it from c to something else. Case 2. C is invertible. We need to show that if there is an arc from a to c in C then function NM-DFS would handle this situation and it fixes the value of f (x; b01 , b02 , . . . , b0k ) from a to some element not a. The main purpose of this case would be finding that fixed element. Since C is invertible, there exists a directed path P in C from a to dt which goes through the vertices a, c, d1 , d2 , . . . , dt−1 (at this order). Consequently this means there exist vertices : α, β = (x; bk , c), λi = (x; bk , di ), 1 ≤ i ≤ t and there exists a path Q : α, . . . , β, . . . , λ1 , . . . , λ2 , . . . , λt in Grf (α) where f (α) = c, f (β) = d1 , f (λ1 ) = d2 , . . . , f (λt−1 ) = dt , f (λt ) = a. Now according to the definition of a circuit there exists an almost-cycle Q(t). in Grf (α). According to the function NM-DFS at some point the NM-DFS starts with α and it moves along an almost-cycle Q(t) and changes the value of f (λt ) from a to c. As it moves along Q(t), once it reaches β the NM-DFS algorithm changes the value of f (λt ) from c to d1 and also changes the value of f (α) from c to d1 , once NM-DFS reaches λ1 on Q(t), it changes the value of f (β) from d1 to d2 and the value of f (α) from d1 to d2 . It continues, until it reaches λt−1 , and at this point the value of all f (λi ), 1 ≤ i ≤ t is set to dt as well as the value of f (α), f (β). Now there does not exists a path from α in Grf (α) to some vertex α0 = (x; bk , dt ) with f (α0 ) = dt . This is because of the following observations : Observation: There is no directed path R in Grf (ψ), ψ = (x; ck , d) with f (ψ) 6= d to some vertex φ = (x; c0k , d0 ) with f (φ) = d0 . To see that suppose such a path R exists. Consider the last arc of R say e = (y; dk1 , d2 )(x; c0k , d0 ) where we may assume yx ∈ A(G). Since e is an arc of Grf (ψ) we have f (y; dk1 , d2 )d0 6∈ A(H) and f (y; dk1 , d2 )f (x; c0k , d0 ) ∈ A(H), a contradiction. Observation: Since C is a source we do not need to consider circuits in other components of Gx,b . Now α becomes a source, since f (α) = dt . NM-DFS has changed f (x; a1 , a2 , . . . , ak ) from a to dt and it does not change it anymore. NM-DFS starts the usual procedure as if there is no circuit Q. Moreover since C is a sink component there is no path from C to another invertible component. Note that the NM-DFS goes through the vertices of λ1 , λ2 , . . . , λt−1 and it continues the usual NM-DFS from λt−1 . In the next step it returns back and it starts from λt−2 and so on. 45 Closing remark We run the function NM-DFS(x; bk , a). Once we change the value of f (x; a1 , a2 , . . . , ak ) from a to c (or dt when C is invertible) then potentially we need to modify the value for f (y; b1 , b2 , . . . , bk ) from an out-neighbor of a, say a0 in L(y) to an out-neighbor of c. As far as the modifying f is concern it would yield the same result if we start from (x; a, b, . . . , b).  5.5.4 Proof of Lemma 5.8 Suppose g is a homomorphism from G to H with g(x) = a. We may assume that there exists a (x; e1 , e2 , . . . , ak ) with f (x; e1 , e2 , . . . , ak ) = a. Otherwise in some previous step we have shown that there exists a homomorphism that does not map x to a if there exists one that maps x to a. Let w = (x; bk , a) and let c = f (w). Let G0f be the induced sub-digraph of Grf (w) with vertices w0 = (y; ak1 , a2 ) such that : • f (w1 ) = a2 , for w1 = (y; a01 , a02 , . . . , a0k ) where f (w1 ) was initially g(y), • a2 is the value before the last time f (w1 ) is going be to change to f (y; ak1 , a2 ). . the value of f (w1 ) is going to be changed to f (y; ak1 , a2 ) according to NM-DFS for the last time. Let G0 be the induced sub-digraph of G with the vertices y ∈ V (G) where (y; ak1 , a2 ) ∈ G0f . Observation : Consider a path W in G0f from (x; bk , a) to (x; bk , a). Now let X be a walk in G from x to x corresponding to W , i.e. W follows X. We note that by replacing a2 with f (y; ak1 , a2 ) for every y ∈ X where (y; ak1 , a2 ) is on path W , we get a mapping from X to H and under this mapping the beginning of X and end of X are mapped to same vertex c. Moreover this mapping is a homomorphism from X to H because f is a homomorphism consistent with L. Let Y be a path in G0 from x to y. Corresponding to Y there is a path in G0f from (x; bk , a) to some (y; ak1 , a2 ). Now define h(y) = f (y; ak1 , a2 ). For every y ∈ V (G) \ V (G0 ) set h(y) = g ∗ (y) (here g ∗ (y) is the last value of f (y; a01 , a02 , . . . , a0k ) where initially was g(y)). Note that h(x) = c. We need to show that h is a homomorphism from G to H. Let zz 0 (z 0 z) be an arc of G where z ∈ V (G0 ). We only need to consider the case z ∈ V (G0 ). By definition there exists a path W from w to some w0 = (z; bk1 , b2 ) ∈ G0f with f (w0 ) = bk+1 . Note that if there does not exists such path W , then by definition z 6∈ V (G0 ). Since zz 0 is an arc of G and g is a homomorphism from G to H, g(z)g(z 0 ) ∈ A(H). Moreover, according to the NM-DFS b2 d2 ∈ A(H) (here d2 is the value in which some vertex w10 = (z 0 ; d01 , d02 , . . . , d0k ) is going to change from g(z 0 ) after visiting the arc zz 0 by the NMDFS). Note that d2 is in L(z 0 ). This is because either d2 = g(z 0 ) and hence it passes the 46 PreProcessing test or d2 = f (z 0 ; ...) and hence by Lemma 5.5 d2 ∈ L(z 0 ). Now if bk+1 d2 is an arc of H then we are done. Otherwise according to the NM-DFS there exist vertex d1 ∈ L(z 0 ) such that b1 d1 , b2 d2 ∈ A(H), and w0 w00 , w00 = (z 0 ; dk1 , d2 ), is an arc of G0f . Since this is the last time NM-DFS change the value of some f (w10 ) from g(z), we have w00 ∈ G0f and hence z 0 ∈ V (G0 ). This would imply that h(z 0 ) = f (w00 ). Since f is a homomorphism consistent with L, we have f (w0 )f (w00 ) ∈ A(H) and because we set h(z) = f (w0 ) and h(z 0 ) = f (w00 ) we have h(z)h(z 0 ) ∈ A(H). Note that in the special case when z 0 = x we have g(z 0 ) = a and by the Observation above we have h(z 0 ) = c. Therefore h is a homomorphism from G to H with h(x) = c. The argument is the same when the strong component Gx,b (a) does not have a source.  5.6 Proof of Theorem 1.1 (second approach) By Lemma 5.8 we preserve the existence of a homomorphism from G to H after Algorithm 8. By Lemma 5.7 f is still a homomorphsim from G × H k → H consistent with the lists L of G after Algorithm 8. Now we can apply Theorem 5.4. According to the proof of Lemma 5.7 (2) the running time of Algorithm 4 is O(|A(G)||H|2k+1 ). The running time of Algorithm 2.2 is O(|G||A(G)||H|k+1 ). In the Algorithm 6 we call Algorithm 8 at most |G||H| times. We observe that the running time of PreProcessing O(|G|3 |H|2 ). However, one single run but at each step of while loop in the Algorithm 6 we only remove one element of H therefore the overall time for PreProcessing would be O(|G|3 |H|2 ). Therefore the running time of Algorithm 6 is O(|G|3 |H|2k+2 ). 5.7 Additional Algorithms and Proofs (New Minority Algorithm) This section collects additional statements and proofs mainly related to new Minority algorithm. We develops a direct algorithm to handle the minority case in our main algorithm. Of course, it would be easier to appeal to Bulatov-Dalmau Maltsev result as explained in Subsection 5.4. A direct proof for Theorem 5.4 Let M 3 be the digraph of triple (y, c, d), x ∈ G, c, d ∈ L(y). There is an arc from (y, c, d) to (y 0 , c0 , d0 ) where yy 0 ∈ A(G), cc0 , dd0 ∈ A(H) and cd0 6∈ A(H) or y 0 y ∈ A(G) and c0 c, d0 d ∈ A(H), d0 c 6∈ A(H). Note that M 3 is a graph but we view M 3 as digraph and when we talk about a path in M 3 we mean an oriented path that reflect the direction of the edge xy when (y, c, d)(y 0 , c0 , d0 ) is an arc of M 3 . Let Gx (a, b) be the strong component of M 3 containing (x, a, b) such that for each vertex (y, c, d) ∈ Gx (a, b), (a, c) ∈ L(x, y) and (b, d) ∈ L(x, y). We say a strong component Gx (a, b) of M 3 is invertible if both (x, a, b) and (x, b, a) are in Gx (a, b). Again the idea is similar to the one handling the RemoveNotMinority case. At each step we consider a vertex x of G and two vertices a, b ∈ L(x) and try to eliminate one of the a, b from L(x). To decide whether remove a or b we construct an instance of the problem say (G0 , H, L0 ) 47 and solve this instance recursively. Based on the existence of a L0 -list homomorphism from G0 to H we decide to remove a or b. Depending on Gx (a, b) being invertible or not two different instances for the sub-problem are constructed. At the end we have singleton lists and if there is a homomorphism from G to H with the singleton lists then success otherwise we report there is no homomorphism from G to H. We denote the underline graph of digraph G by U N (G). If Gx (a, b) is invertible we construct a new instance G0 , H, L0 and to construct the lists L0 we use the Maltsev property. Lemma 5.10 Let X be an oriented path in G and let B, C, D be three walks in L(X) all congruent to X where B is from a to c and C is from b to c and D is from b to D. Then there exists a walk E from a to d in L(X) that is congruent with X. Proof: By following B, C, D on the vertices in X and applying the definition of polymorphism h, we conclude that E exists.  Lemma 5.10 implies the following corollary. Corollary 5.11 If (a, c) ∈ L(x, y) and (b, c), (b, d) ∈ L(x, y) then (a, d) ∈ L(x, y). Lemma 5.12 The Algorithm 9 runs in O(|E(G)||H|k+1 ). Moreover, if there is a homomorphism g from G to H with g(x) ∈ {a, b} then there is a homomorphism from G to H after removing a or b from L(x) according to Maltsev-(G, H, L, h). Proof: We spend |G||H|k+1 to define h. For every pair a, b ∈ L(x) the algorithm construct an instance of the problem which takes O(|A(G)||A(H)|3 ). The algorithm is recursive and the depth of the recursion in |G||H|. We conclude that the running time of function Maltsev(G, H, L) is O(|G||A(G)||H|4 ) (replaces |A(H)| by |H|2 ) (see the analysis of Algorithm 4). Therefore the running time of the Algorithm 2.2 is O(|A(G)||H|k+1 ). First consider the case that Gx (a, b) is not invertible. The Algorithm 9 is recursive but at each recursive call the size of the input decreases by at least one. This is because we do not add b into L0 (x) and hence we have an instance (G0 , L0 , H) of the problem in which at least one vertex has a smaller size list. We also note that once we make a decision to remove a vertex from a list the decision is not changed. Therefore the overall procedure in this case is polynomial (assuming in each call Gx (a, b) is not invertible). According to Maltsev(G, H, L, h) if G0 does not admit a homomorphism to H then there is no homomorphism from G to H that maps x to a since G0 is a sub-digraph of G. No suppose b is removed according to Maltsev-(G, H, L, h) and there exists a homomorphism g from G to H with g(x) = b. Let ψ be the homomorphism from G0 to H. Note that ψ(x) = a. Define G1 be a sub-digraph of G0 consists of the vertices y such that (y, ψ(y), g(y)) is reachable from (x, a, b) in Gx (a, b). 48 Algorithm 9 RemoveMinority – Using Matlsev Operations 1: function RemoveMinority(G, H, L) 2: Input: x, a, b such that f (x; bk |i←a ) = a 3: Define Maltsev consistent homomorphism h : G × H 3 → H where h(x; a, b, c) = f (x; a, b, b, . . . , b, c) for a, b, c ∈ L(x). 4: while ∃ x ∈ V (G) with |L(x)| ≥ 2 do 5: Matlsev(G, H, L ) 6: if ∃ a list homomorphism from G to H then return True 7: else return False. 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: function Maltsev(G, H, L) Let a, b ∈ L(x) be two distinct vertices. Construct Gx (a, b). if Gx (a, b) is not invertible then Set L0 (x) = a and L0 (y) = ∅ for every x 6= y. Set G00 = ∅, and let G0 be an induced sub-digraph of G constructed as below. for all y ∈ G s.t. ∃ a path from (x, a, b) to (y, c, d) in Gx (a, b) do add y to G0 and c to L0 (y), let yy 0 an arc of G0 when (y, c, d)(y 0 , c0 , d0 ) ∈ Gx (a, b). if Gx (a, b) is invertible then Set L0 (x) = a and L0 (y) = ∅ for every x 6= y. Let G00 be the set of vertices y ∈ V (G) where (y, c, d, e) lies on an oriented path P from (x, a, b, b) to (x, b, b, a) in U N (G × H 3 ) s.t. no intermediate vertex in P is (x, a0 , b0 , c0 ) for a0 , b0 , c0 ∈ L(x) for all arc (y, c, d, e)(y 0 , c0 , d0 , e0 ) ∈ P do add h(y, c, d, e) to L0 (y), h(y 0 , c0 , d0 , e0 ) to L0 (y 0 ), and add arc yy 0 (y 0 y) to G00 Let G0 be the induced sub-digraph of G with vertices y ∈ G \ G00 and arcs yy 0 where (y, c, d)(y 0 , c0 , d0 ) ∈ Gx (a, b) and add c into L0 (y) when (y, c, d) ∈ Gx (a, b) if Matlsev(G0 ∪ G00 , H, L0 ) then remove b from L(x) else remove a from L(x). 49 Now for every vertex y ∈ G1 set φ(x) = ψ(x) and for every y ∈ G \ G1 set φ(y) = g(y). Now let zz 0 be an arc of G. If none of the z, z 0 ∈ G1 then clearly since g is a homomorphism, φ(z)φ(z 0 ) ∈ A(H). If both z, z 0 ∈ G1 then again since ψ is a homomorphism, we have φ(z)φ(z 0 ) ∈ A(H). Suppose z ∈ G1 and z 0 6∈ G1 . Since z ∈ G1 there exists a path in Gx (a, b) from (x, a, b) to (z, ψ(z), g(z)). Now if ψ(z)g(z 0 ) is an arc then we are done. Otherwise (z 0 , c, g(z 0 )) ∈ Gx (a, b) where c ∈ L(z 0 ) and ψ(z)c ∈ A(H) (note that since ψ(z) is in L(z) it must have an out-neighbor in L(z 0 )). This would mean z 0 ∈ G1 , a contradiction. Note that when z 0 = x and z ∈ G1 then because (ψ(z), a) ∈ L(z, x) we have ψ(z)a ∈ A(H). Second consider the case that Gx (a, b) is invertible. Again as we argued in the previous case the algorithm is recursive but at each recursive call the size of the input decreases and once a decision made (removing a or b ) it won’t change. Observe that if there exists a homomorphism g that maps x to a then for every closed walk X from x to x, the image of g(X) is a closed walk from a to a in H. Since there is a walk BB from b to b in L(X) congruent and since (a, b) ∈ L(x, x), there is a walk BA in L(X) congruent to X. Now by Lemma 5.10 there is a walk AB from a to b in L(X) and congruent with X. These would imply that there exists a path P in U (G × H 3 ) from (x, b, b, a) to (x, a, b, b). Now according to the definition of G00 for every walk BB in L(X) from b to b congruent with X we keep a walk AA in L0 (X) congruent with X and is obtained by adding h(y, c1 , c2 , c3 ) into L0 (y) where (y, c1 , c2 , c3 ) is in P . This would mean that in the list of L0 (X), corresponding to ψ(X) (ψ is a homomorphism from G to H where ψ(x) = a if there exists one) we have a path from a to a in L0 (X). Therefore if there exists no homomorphism from G0 ∪ G00 → H that maps x to a then there is no homomorphism from G to H that maps x to a. Now suppose b is removed according to Maltsev-(G, H, L, h) and there exists a homomorphism g from G to H with g(x) = b. Let ψ1 be the homomorphism from G0 to H and ψ2 be a homomorphism from G00 to H. Note that ψ1 (x) = ψ2 (x) = a. First we show that there is no arc e (forward or backward) from a vertex y in G0 to a vertex in G00 . If this is the case then there is a walk Q from x to y and there is a walk Q0 from y to x. Now since yz is an arc then Qee−1 Q0 is a closed walk from x to x and hence we should have added z into G00 . Note that G00 consists of all the induced oriented cycles including x and also all the paths reaching out of vertices of these cycles except x. Define G1 be a sub-digraph of G0 consists of vertices y such that (y, ψ1 (y), g(y)) is reachable from (x, a, b) in Gx (a, b). Now for every vertex y ∈ V (G1 ) set φ1 (y) = ψ(y) and for every y ∈ V (G) \ V (G1 ) set φ1 (y) = g(y). Define G2 be a sub-digraph of G00 consisting of vertices y such that (y, ψ2 (y), g(y)) is reachable from (x, a, b) in Gx (a, b). Now for every vertex y ∈ V (G2 ) set φ2 (y) = ψ2 (y) and for every y ∈ V (G) \ V (G2 ) set φ2 (y) = g(y). And finally let φ(y) = φ1 (y) when y ∈ V (G0 ) and φ(y) = φ2 (y) when y ∈ V (G00 ). Now let zz 0 be an arc of G. We need to verify that φ(z)φ(z 0 ) is an arc of H. If none of the z, z 0 ∈ V (G1 ∪ G2 ) then clearly since g is a homomorphism, φ(z)φ(z 0 ) ∈ 50 A(H). If both z, z 0 ∈ V (Gi ) (i = 1, 2) then again since ψi is a homomorphism, we have φ(z)φ(z 0 ) ∈ A(H). Suppose z ∈ V (G2 ) and z 0 6∈ V (G2 ). Since z ∈ V (G2 ), there exists a closed walk ZZ 0 that contains z where Z is a path from x to z and Z 0 is a walk from z to x. Note that ψ2 (ZZ 0 ) is a walk from a to a in L(ZZ 0 ) and g(ZZ 0 ) is a walk from b to b in L(ZZ 0 ) and since (b, a) ∈ L(x × x) there exists a walk BA in L(ZZ 0 ) congruent with ZZ 0 . These would imply that corresponding to ZZ 0 there exists a path P from (x, b, b, a) to (x, a, b, b) containing vertex (z, ψ2 (z), d, g(z)). Now since g(z) ∈ L(z) there exists a vertex c ∈ L(z 0 ) such that g(z)c ∈ A(H) and there exists e0 ∈ L(z 0 ) such that dd0 ∈ A(H). Now we add the two arcs (z, ψ2 (z), d, g(z))(z 0 , c, d0 , g(z 0 )), (z 0 , c, d0 , g(z 0 ))(z, ψ2 (z), d, g(z)) into P and hence we obtain a path P 0 from (x, b, b, a) to (x, a, b, b) that goes through vertex (z 0 , c, d0 , g(z 0 )) and hence z 0 ∈ G00 . Now since φ2 (z)g(z 0 ) 6∈ A(H), by definition z 0 ∈ V (G2 ), a contradiction. As we argued before one can show that φ1 is also a homomorphism from G to H. Therefore φ is a homomorphism from G to H with φ(x) = a.  Acknowledgements : We would like to thank Ross Willard and Pavol Hell for so many helpful discussions and their useful comment as well as their enormous support. We would like to thank Vı́ctor Dalmau for so many useful questions and helpful comments. We would also like to thank Geoffrey Exoo, László Egri, for their comments. References [ABISV09] E. Allender, M. Bauland, N. Immerman, H. Schnoor, and H. Vollmer. The complexity of satisfiability problems: refining schaefer’s theorem. Journal of Computer and System Sciences, 75(4): 245–254 (2009). [BHM88] J. Bang-Jensen, P. Hell, G. MacGillivray. The complexity of colouring by semicomplete digraphs. SIAM J. Discrete Math., 1 : 281–298 (1988). [BH90] J. Bang-Jensen, P. Hell. The effect of two cyles on the complexity of colourings by directed graphs. Discrete Appl. Math., 26 : 1–23 (1990). [BKN09] L. Barto, Marcin Kozik, and Todd Niven. The CSP Dichotomy Holds for Digraphs with No Sources and No Sinks (A Positive Answer to a Conjecture of Bang-Jensen and Hell). SIAM J. Comput, 38(5) : 1782–1802 (2009). [B02b] A.A. Bulatov. A dichotomy constraint on a three-element set. In Proceedings of STOC 649–658 (2002). [B05] A.Bulatov. H-Coloring dichotomy revisited. Theoret. Comp. Sci., 349 (1) : 31-39 (2005). [B06] A. Bulatov. A dichotomy theorem for constraints on a three-element set. Journal of the ACM, 53(1): 66–120 (2006). 51 [B11] A.Bulatov. Complexity of conservative constraint satisfaction problems. Journal of ACM Trans. Comput. Logic, 12(4) : 24–66 (2011). [BD06] A. Bulatov and V. Dalmau. A Simple Algorithm for Mal’tsev Constraints. SIAM J. Comput., 36(1): 16–27 (2006). [BJK05] A.A. Bulatov, P. Jeavons, and A. Krokhin. Classifying the complexity of constraints using finite algebras. SIAM journal on computing, 34(3): 720-742 (2005). [JB17] J. Bulin. Private communication. [CCL13] J.Y. Cai, X. Chen, P. Lu. Graph Homomorphisms with Complex Values: A Dichotomy Theorem. SIAM J. Comput., 42(3): 924–1029 (2013). [CVK10] C. Carvalho, V.Dalmau, and A.A. Krokhin. CSP duality and trees of bounded pathwidth. Theor. Comput. Sci., 411(34–36): 3188–3208 (2010). [CKS01] N. Creignou, S. Khanna, and M. Sudan. Complexity Classifications of Boolean Constraint Satisfaction Problems. SIAM Monographs on Discrete Math. and Applications, vol. 7 (2001). [CL14] P. Csikvári and Z. Lin. Graph homomorphisms between trees. Elec. J. Combin., 21 : 4–9 (2014). [D92] R. Dechter. Containt networks. Encyclopedia of Artificial Intelligence 276–285 (1992). [D00] V. Dalmau. A new tractable class of constraint satisfaction problems. In Proceedings 6th International Symposium on Artificial Intelligence and Mathematics, 2000. [DF03] V. Dalmau, D. Ford. Generalized satisfiability with k occurrences per variable: A study through delta-matroid parity. In Proceedings of MFCS 2003, Lecture Notes in Computer Science, 2747 : 358–367 (2003). [EHLR14] L.Egri, P.Hell, B.Larose, and A.Rafiey. Space complexity of List H-coloring : a dichotomy. In Proceedings of SODA, (2014). [F01] T. Feder. Homomorphisms to oriented cycles and k-partite satisfiability. SIAM J. Discrete Math., 14 : 471–480 (2001). [F06] T. Feder A dichotomy theorem on fixed points of several nonexpansive mappings. SIAM J. Discrete Math., 20 : 291–301 (2006). [FHH99] T.Feder, P.Hell, J.Huang. Bi-arc graphs and the complexity of list homomorphisms. J. Graph Theory, 42 : 61–80 (1999). [FH98] T. Feder, P. Hell. List homomorphisms to reflexive graphs. J. Comb. Theory Ser., B 72 : 236–250 (1998). [FHH99] T. Feder, P. Hell, J. Huang. List homomorphisms and circular arc graphs. Combinatorica, 19 : 487–505 (1999). 52 [FHH03] T. Feder, P. Hell, J. Huang. Bi-arc graphs and the complexity of list homomorphisms. J. Graph Theory, 42 : 61–80 (2003). [FHH07] T. Feder, P. Hell, J. Huang. List homomorphisms of graphs with bounded degrees. Discrete Math., 307 : 386–392 (2007). [FMS04] T. Feder, F. Madelaine, I.A. Stewart. Dichotomies for classes of homomorphism problems involving unary functions. Theoret. Comput. Sci., 314 : 1–43 (2004). [FV93] T.Feder and M.Vardi. Monotone monadic SNP and constraint satisfaction. In Proceedings of STOC, 612–622 (1993). [FV98] T. Feder and M.Y. Vardi. The computational structure of monotone monadic SNP constraint satisfaction: A study through Datalog and group theory. SIAM Journal on Computing, 28(1): 57–104 (1998). [HN90] P. Hell and J. Nešetřil. On the complexity of H-colouring. J. Combin. Theory B, 48 : 92–110 (1990). [HN04] P. Hell, J. Nešetřil. Graphs and Homomorphisms, Oxford University Press, 2004. [HN08] P.Hell, J.Nešetřil. Colouring, Constraint Satisfaction, and Complexity. Computer Science Review , 2(3): 143–163 (2008). [HR11] P.Hell and A.Rafiey. The Dichotomy of List Homomorphisms for Digraphs. In Proceedings of SODA 1703–1713 (2011). [HR12] P. Hell and A. Rafiey. The Dichotomy of Minimum Cost Homomorphism Problems for Digraphs. SIAM J. Discrete Math., 26(4): 1597–1608 (2012). [KSDR96] L.G. Kroon, A. Sen, H. Deng, A. Roy. The optimal cost chromatic partition problem for trees and interval graphs. In Graph-Theoretic Concepts in Computer Science (Cadenabbia, 1996), Lecture Notes in Computer Science, 1197 : 279–292 (1997). [K92] V. Kumar. Algorithms for constraint-satisfaction problems. AI Magazine, 13 :32–44 (1992). [J98] P. Jeavons. On the Algebraic Structure of Combinatorial Problems. Theor. Comput. Sci., 200(1-2): 185-204 (1998). [L75] R. Ladner. On the Structure of Polynomial Time Reducibility. Journal of the ACM (JACM), 22(1): 155–171 (1975). [LZ03] B. Larose, L. Zádori. The complexity of the extendibility problem for finite posets. SIAM J. Discrete Math., 17 : 114–121 (2003). [MM08] M. Maroti, and R. McKenzie. Existence theorems for weakly symmetric operations. Algebra Universalis, 59 : 463–489 (2008). 53 [S78] T.J. Schaefer. The complexity of satisfiability problems. In Proceedings of STOC, 216– 226 (1978). [S10] M.Sigge. A new proof of the H-coloring dichotomy. SIAM J. Discrete Math., 23 (4) : 2204–2210 (2010). [V00] M.Y. Vardi. Constraint satisfaction and database theory: a tutorial. Proceedings of the 19th Symposium on Principles of Database Systems (PODS), 76–85 (2000). 54
8cs.DS
International Journal of Computer Trends and Technology (IJCTT) – volume 14 number 2 – Aug 2014 Selection of Most Appropriate Backpropagation Training Algorithm in Data Pattern Recognition Hindayati Mustafidah #1, Sri Hartati #2, Retantyo Wardoyo #3, Agus Harjoko #4 1 Engineering Informatics - Muhammadiyah University of Purwokerto Purwokerto, Indonesia 234 Computer Science – FMIPA - Gadjah Mada University Yogyakarta, Indonesia Abstract—There are several training algorithms for back propagation method in neural network. Not all of these algorithms have the same accuracy level demonstrated through the percentage level of suitability in recognizing patterns in the data. In this research tested 12 training algorithms specifically in recognize data patterns of test validity. The basic network parameters used are the maximum allowable epoch = 1000, target error = 10-3, and learning rate = 0.05. Of the twelve training algorithms each performed 20 times looping. The test results obtained that the percentage rate of the great match is trainlm algorithm with alpha 5% have adequate levels of suitability of 87.5% at the level of significance of 0.000. This means the most appropriate training algorithm in recognizing the the data pattern of test validity is the trainlm algorithm. Keywords—validity, appropriate, training algorithms, data pattern recognition. I. INTRODUCTION One of the computer technology development in the creation of the current approach in resolving an issue is soft computing [1]. Soft Computing is part of the intelligent system that is a model approach to computing by imitating human reason and has the ability to reason and learn in an environment that is filled with uncertainty and inaccuracy. Soft Computing consists of several main components constituent that is fuzzy systems, neural network, evolutionary algorithms, and probabilistic reasoning. Performance of soft computing in solving problems in various areas of life has proven its benefits. One of the methods used in this study is an Artificial Neural Network (ANN), which is the ideal solution for problems that can’t be easily formulated using an algorithm [2]. In the neural network there are several learning algorithms. Based on how it works, learning algorithm is divided into two parts with adaptation-based and trainingbased learning. The adaptation-based learning algorithm consists of two algorithms namely learngd and learngdm, while the training-based learning algorithm consisting of twelve algorithms, they are traingd, traingdm, traingdx, trainrp, traingda, traincgf, traincgp, traincgb, trainscg, trainbfg, trainoss, and trainlm [3]. Training-based learning algorithm is often referred to as a training algorithm. The use of training algorithm in neural network has been done in solving, for example, predicts student learning achievement at Informatics Engineering in Muhammadiyah ISSN: 2231-2803 University of Purwokerto that is based on the grades in the subjects to be tested in the national exam as in High School [4]. The training algorithm used is traingd and produces error rate of 0.0664179 of target error 0.05. Seen that the resulting error rates in excess of a expected target error. It shows that it needs to review and study the learning algorithm that held the most optimal in problem solving. Some studies have also been carried out to determine the most optimal algorithm that gives the smallest error i.e. comparing the optimum level of training algorithms traingd, traingdm, learngd, and learngdm in case of student learning achievement predictions at Informatics Engineering Muhammadiyah University of Purwokerto [5]. Based on the results of the statistical tests of the four algorithms with the alpha level 5%, obtained the value significance of 0,632. It means that the four algorithms have no differences in optimum level. In other words, the four training algorithms have the same proper level. Based on this case, it needs to be done further testing on other training algorithms to obtain reference the most appropriate one. On this research was performed testing against the twelve training algorithms to obtain the most appropriate algorithm in data pattern recognizing. Appropriateness is shown by the percentage of matches in recognizing patterns of data i.e. data patterns of training and test data pattern where the test data used is similar to the training data. A case study used is of data validity of test questions based on the percentage category of test item in Bloom revised taxonomy developed by Anderson-Krathwohl. This Data is used in the this research by reason of the training algorithms obtained will be used in the determination of the level of the validity of the question test with a different case so that will be obtained the right predictions of reserved test questions validity. Validity is a measure that shows the levels of instrument validity. A test is said to have validity if the result corresponds to criterion, in the sense of having equality between the test results and criteria [6]. A test called valid if the test were able to precisely measure what is measured. If the data that is retrieved from a valid instrument, it can be said that the instrument is valid as it can give a description of the data correctly in accordance with the fact or circumstance indeed. In doing the analysis of validity about commonly used correlation product moment formula [7]. A test is said to have the validity of the construction when the details matter that http://www.ijcttjournal.org Page 92 International Journal of Computer Trends and Technology (IJCTT) – volume 14 number 2 – Aug 2014 build these tests measure every aspect of thinking as mentioned in the learning objectives. Construction in this sense is psychological invention itemize the contents of several aspects such as: memory/knowledge, comprehension, application, analysis, synthesis, and evaluation better known as Bloom's taxonomy [8]. The six aspects by [9] developed as six cognitive processes dimensions, namely: remembering (C1), understanding (C2), applying (C3), analyzing (C4), evaluating (C5), and creating (C6) that known a revision of Bloom's Taxonomy by Anderson-Krathwohl. The validity of the construction can be known with detailing and pair each test item with every aspect of the learning objectives. II. RESEARCH METHODS The data used in this research are primary and secondary data. Primary data are student’s scores and test questions at National Exam in 2009 of the province of Yogyakarta and Bengkulu. The primary data retrieved from the PUSPENDIK (Centre for Educational Assessment) in Jakarta, while the secondary data were retrieved from the data analysis of the research about test analysis at 2003, 2004, 2005 in Banyumas Regency and its surroundings ([10], [11], [12], [13], [14], [15], [16], [17], [18], [19]). The research data were presented in Table I. TABLE I RESEARCH DATA C1 20 0 0 18.75 12.5 12.9 16.67 14.29 17.14 50 50 48 48 60 28.89 28.89 28.89 40 40 ... C2 35 15 15 12.5 6.25 9.68 56.67 62.86 57.14 30 30 42 42 36.67 37.78 37.78 37.78 38 38 0 0 Percentage C3 C4 0 45 29 6 29 6 59.38 9.38 71.88 9.38 67.74 9.68 23.33 3.33 20 2.86 17.14 8.57 10 10 10 10 6 4 6 4 3.33 0 26.67 6.67 26.67 6.67 26.67 6.67 8 14 8 14 45 52.5 C5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.5 Data preprocessing setting network parameters train the training data Simulating of testing data = training data Network output of testing result Data postprocessing Camparing network output simulated data and training target data Validity 0.351 0.308 0.376 0.232 0.205 0.186 0.752 0.296 0.345 0.361 0.232 0.071 0.175 0.218 0.184 0.221 0.155 0.162 0.201 0.458 This research uses mixed method, namely qualitative and quantitative research. The qualitative research carried out by developing a program code for processing data using the twelve algorithms (Fig. 1), whereas quantitative research conducted by statistical testing against the accuracy of the twelve algorithms in recognizing data patterns shown by the percentage of matches between the results of network ISSN: 2231-2803 simulation data and the input data. These algorithms are traingd, traingdm, traingdx, trainrp, traingda, traincgf, traincgp, traincgb, trainscg, trainbfg, trainoss, and trainlm. The output data of any algorithm is done by looping 20 times. Fig. 1 The process of training and testing data Statistical testing is done using SPSS software to determine the most appropriate algorithm using one-way analysis of variance (One-way ANOVA) [20]. The hypotheses used are: H0: the variants of the twelve training algorithms are the same H1: the variants of the twelve training algorithms are not the same. The rejection of H0 is performed if the value significance obtained is less than α (in this case α = 0.05 or 5%). III. RESULTS AND DISCUSSION A. The Structure of the Network The network structure is shown in Fig. 2. B. The Network Parameters Parameters of the network includes the learning rate (LR) = 0.05, the maximum amount of epoch = 1000, and the level of error = 0.001 (10-3). http://www.ijcttjournal.org Page 93 International Journal of Computer Trends and Technology (IJCTT) – volume 14 number 2 – Aug 2014 testing against both algorithms using independent samples ttest (Table VI). TABLE III POSTHOC TEST OF DUNCAN MULTIPLE COMPARISONS ANALYSIS FOR 12 ALGORITHMS USING SPSS Matched reached in percentages Training Subset for alpha = 0.05 N Algorithms 1 2 3 4 20 58.125 Duncana traingda traingd 20 64.125 traingdm 20 65.750 20 66.375 traingdx 20 80.500 trainrp 20 84.000 trainoss traincgp 20 84.121 20 84.375 trainbfg 20 85.000 traincgf 20 85.375 trainscg 20 86.125 traincgb trainlm 20 1.000 0.110 1.000 0.166 Sig. Means for groups in homogeneous subsets are displayed. a. Uses Harmonic Mean Sample Size = 20.000. Analysis Fig. 2 Neural network structure with 3 layers C. Testing ANOVA test results obtained significance of 0.000, it means that the value is less than α, so H0 is rejected. In other word, the twelve algorithms are not homogeneous (have not the same variant) (Table II). TABLE II ANOVA TEST RESULTS OF THE 12 TRAINING ALGORITHMS USING SPSS Matched reached in percentages Sum of df Squares 11 Between Groups 25020.286 4007.812 228 Within Groups 29028.099 239 Total Mean Square F Sig. 2274.571 129.398 0.000 17.578 To learn more the algorithms which have differences level of appropriateness, performed using a Duncan POSTHOC method with results as shown in the Table III. Based on the Duncan method, it shows that traincgf, trainscg, traincgb, and trainlm algorithms are on the lowest subset with significance 0.086. This means that the four training algorithms have the same appropriateness level at α = 5%. To get the most appropriate algorithm of four the training algorithms, further testing needs to be done and the results as presented in Table IV. From the second test result, significance of 0.003 is obtained which means that all four training algorithms have inequality on the appropriateness level. Then the testing is done using Duncan method that is indicated as in Table V. 5 85.000 85.375 86.125 87.500 0.086 TABLE IV ANOVA TEST RESULTS OF 4 TRAINING ALGORITHMS Matched reached in percentages Sum of df Squares Between Groups 73.125 3 Within Groups 371.875 76 Total 445.000 79 Mean Square F Sig. 24.375 4.982 0.003 4.893 TABLE V POSTHOC TEST OF DUNCAN MULTIPLE COMPARISONS ANALYSIS FOR 4 ALGORITHMS Duncan Subset for alpha = 0.05 1 2 Algorithm traincgf, trainscg, traincgb, trainlm N traincgf 20 85.000 trainscg 20 85.375 traincgb 20 86.125 trainlm 20 Sig. 86.125 87.500 0.133 0.053 Means for groups in homogeneous subsets are displayed. Based on Table VI seen that with 95% confidence interval and significance level of α = 0.000 (< 5%), the traincgb algorithm is in the negative area which means that it has smaller appropriateness level than trainlm. It is seen that in this test was obtained similarities at two algorithms, namely traincgb and trainlm on the significance of 0.053. Because it has not yet obtained the most appropriate algorithm, testing was continued with an average difference of ISSN: 2231-2803 http://www.ijcttjournal.org Page 94 International Journal of Computer Trends and Technology (IJCTT) – volume 14 number 2 – Aug 2014 TABLE VI THE TEST RESULTS OF THE INDEPENDENT SAMPLE T-TEST Independent Samples Test Levene's Test for Equality of Variances Matched of traincgb & trainlm Equal variances assumed t-test for Equality of Means Sig. t df Sig. (2tailed) Mean Difference Std. Error Difference 73.962 0.000 -3.240 38 0.002 -1.375000 0.424380 -2.234113 -0.515887 -3.240 19.000 0.004 -1.375000 0.424380 -2.263238 -0.486762 Equal variances not assumed IV. CONCLUSIONS The 12 training algorithms in neural network have been tested, namely traingd, traingdm, traingdx, trainrp, traingda, traincgf, traincgp, traincgb, trainscg, trainbfg, trainoss, and trainlm in the appropriateness of recognizing the data pattern. The network parameters include maximum epoch = 1000, the learning rate = 0.05, and target error = 0.001. The test results obtained that at the confidence interval of 95% the trainlm algorithm is the algorithm that is most appropriate in recognizing the data pattern with an average level of appropriateness of 87.5%. It is advisable to test the training algorithms in recognizing data patterns in the other case of categories of test quality namely reliability, test difference power, and difficulty level reserved. [10] [11] [12] [13] [14] REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] S. Kusumadewi, and S. Hartati, Neuro-Fuzzy : Fuzzy systems and Neural Network Integration, Yogyakarta: Graha Ilmu, 2006. M.T. Jones, Artificial Intelligence: A Systems Approach, New Delhi: Infinity Science Press LLC, 2008. S. Kusumadewi, Building Artificial Neural Network Using MATLAB & EXCEL LINK, Yogyakarta: Graha Ilmu, 2004. Harjono, and D. Aryanto, Application of Artificial Neural Networks to Predict Students Study Achievement, SAINTEK ISSN 1411-2558, Vol. 5 No. 2. 2009. H. Mustafidah, D.K. Hakim, and S. Sugiyanto, Optimization Level of Training Algorithms in Neural Network (Case Studies of Student Learning Achievement Predictions), JUITA, ISSN: 2086 – 9398, Vol. II No. 3, pp. 159–166, May 2013. S. Arikunto, The basics of Education Evaluation, Revised Edition, Jakarta: Bumi Aksara, 2006. L.L. Oriondo and E.M. Dallo-Antonio, Evaluating Educational Outcomes (Tests, Measurement and Evaluation), Manila: Rex Book Store, 1998. M. Wijaya, Taxonomy Bloom in Digital Era Education, [Online], Available: http://high-aims.blogspot.com/2009/02/taxsonomy-bloomin-digital-era.html, accessed on 12th January 2010, 2009. L.W. Anderson, and D.R. Krathwohl, Framework Foundation for Teaching, and Learning Assessment (a Revision of Bloom's Taxonomy of Education) (translated by: Agung Prihantono), Yogyakarta: Pustaka Pelajar, 2010. ISSN: 2231-2803 95% Confidence Interval of the Difference Lower Upper F [15] [16] [17] [18] [19] [20] C. Bennyarsih, Correlation between Remidial Learning and Achievement of Learning Objectives in PKnPS Subject in Term the Struggle against the Occupiers and the National Movement in Grade V SD Negeri Segugus Pamuji UPK Karanglewas Semester II in Academic Year of 2005/2006. Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2006. Y. Dwiningsih, The Curriulum 2004 Evaluation System Analysis of Some Private High Schools on the Subjects of Biology Class X Academic Year 2004/2005 in Banyumas Regency, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2006. L. Handayani, Evaluation of Mathematics General Test Questions in High School Class I Quarter 3 in Banyumas Regency, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2003. D.F. Hani, Analysis of Test Items at Even Semester Class X in Biology Curriculum 2004 Academic Year 2004/2005 in SMAN Sumpiuh Banyumas Regency, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2006. F. Nurhasanah, Evaluation of Mathematic Test Question at First Class in SLTP Quarter 3 in Banyumas Regency, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2003. D. Purwanti, An Attempt to Evaluate the Implementation of the Curriculum 1994 Through Analysis of Test Items in Even Semester at Final Exam in Study Program Biology Class I Academic Year 2003/2004 at SMA Veteran and SMA Jendral Sudirman Purwokerto, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2005. D.A. Rahayu, Evaluation of Mathematics Test Questions the Second Class Quarter 3 in High School in Banyumas Regency, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2003. R.D.P. Sari, Evaluation of the Quality of the Final Exam Questions in Even Semester the Subjects of Biology Class X Academic Year 2004/2005 in SMAN 3 Purwokerto, SMAN 4 Purwokerto, and SMAN Sokaraja, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2006. E. Susiani, The Relationship between Students Discipline and Learning Achievements at SMP Negeri 3 Margasari Tegal Regency in the Second Class for Social Science Subjects, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2005. N. Wardiningsih, Evaluation of Mathematic Final Test Question the Even Semester Class II SMPN 1 Karangmoncol Purbalingga Regency, Thesis, Purwokerto: FKIP Muhammadiyah University of Purwokerto (UMP), 2004. T. Taniredja and H. Mustafidah, Quantitative Research (an Introduction), Bandung: Alfabeta, 2011. http://www.ijcttjournal.org Page 95
9cs.NE
arXiv:1703.03962v3 [math.AC] 4 Sep 2017 PRÜFER CONDITIONS UNDER THE AMALGAMATED CONSTRUCTION Y. AZIMI, P. SAHANDI AND N. SHIRMOHAMMADI Abstract. In this paper we improve the recent results on the transfer of Prüfer, Gaussian and arithmetical conditions on amalgamated constructions. As an application we provide an answer to a question posed by Chhiti, Jarrar, Kabbaj and Mahdou as well as we construct various examples. 1. Introduction The notion of Prüfer domain appeared for the first time in [20]. Then Krull further studied and named such domains as Prüfer domains [15]. Prüfer domains play a central role in Multiplicative ideal theory and several different characterizations of these domains exist [11]. Many of these characterizations have been extended to the case of rings with zero-divisors. Among them are the Prüfer, Gaussian and arithmetical rings. It is commonly accepted to define Prüfer rings as the rings in which every non-zero finitely generated regular ideal is projective [3, 12]. A commutative ring R is called Gaussian if cR (f g) = cR (f )cR (g) for every two polynomials f, g ∈ R[X], where cR (f ) is the content ideal of f [22]. Finally, a commutative ring is called an arithmetical ring if every finitely generated ideal is locally principal [14]. It is well known that an arithmetical ring is Gaussian and a Gaussian ring is Prüfer and that all these coincide in the context of domains. The aim of this paper is to investigate when the amalgamated algebra is a Prüfer, Gaussian or arithmetical ring. D’Anna, Finocchiaro, and Fontana in [6] and [7] have announced the following ring construction. Let R and S be two commutative rings with unity, let J be an ideal of S and let f : R → S be a ring homomorphism. They introduced the following subring R ⊲⊳f J := {(r, f (r) + j) | r ∈ R and j ∈ J} of R × S, called the amalgamation of R with S along J with respect to f . This construction generalizes the amalgamated duplication of a ring along an ideal (introduced and studied in [9]). Moreover, several classical constructions such as the Nagata’s idealization, the R + XS[X] and the R + XSJXK constructions can be studied as particular cases of this new construction (see [6, Example 2.5 and Remark 2.8]). Assuming that J and f −1 (J) are regular ideals, Finocchiaro in [10, Theorem 3.1] obtained that R ⊲⊳f J can be Prüfer ring only in the trivial case, namely when R and S are Prüfer rings and J = S. He also established some results about the 2010 Mathematics Subject Classification. Primary 13F05, 13A15. Key words and phrases. Amalgamated algebra, arithmetical ring, Gaussian ring, Prüfer ring, trivial extension. 1 2 Y. AZIMI, P. SAHANDI AND N. SHIRMOHAMMADI transfer of some Prüfer-like conditions between R ⊲⊳f J and R. Meanwhile, among other things, the authors in [4, Theorem 2.2] find necessary and sufficient conditions under which Prüfer-like properties transfer between the amalgamated duplication R ⊲⊳ I = R ⊲⊳f I of a local ring R and the ring R itself, where I is an ideal of R, S = R and f is the identity map on R. In particular, they proved that R ⊲⊳ I is a Prüfer ring if and only if R is a Prüfer ring and I = rI for every regular element r of the unique maximal ideal of R. They then asked that is their characterization valid in the global case? i.e., when R is Prüfer (not necessarily local) or locally Prüfer [4, Question 2.11]. The outline of the paper is as follows. In Section 2, we determine the zerodivisors of the amalgamated algebra R ⊲⊳f J under certain conditions. In Section 3, among other things, we attempt to generalize the results mentioned above to the case of the amalgamated algebra R ⊲⊳f J and, consequently, to answer [4, Question 2.11]. In Sections 4 and 5, we investigate the transfer of Gaussian and arithmetical conditions of the amalgamated algebra R ⊲⊳f J. By various examples we examine our results. 2. Preliminaries To determine whether a ring is Prüfer (resp. total ring of quotients) or not, it is of great importance to know zero-divisors and regular elements of the ring. This section is devoted to determine the zero-divisor and regular elements of R ⊲⊳f J. Let first us fix some notation which we shall use throughout the paper: R and S are two commutative rings with unity, J a proper ideal of the ring S, and f : R → S is a ring homomorphism. For a commutative ring A, Max(A) denotes the set of maximal ideals of A, Jac(A) denotes the Jacobson radical of A, Reg(A) denotes the set of regular elements of A, Z(M ) denotes the set of zero-divisors of an A-module M and, for an ideal I of A, V(I) denotes the set of all prime ideals of A containing I. An ideal of ring is called a regular ideal if it contains a regular element. A full description for the set of zero-divisors of the duplication ring R ⊲⊳ I has been provided in [17, Proposition 2.2]. In the following lemma we generalize it to amalgamated algebra. Before we announce this generalization, we should perhaps point out that {(r, f (r) + j) | j ′ (f (r) + j) = 0, for some j ′ ∈ J \ {0}} ⊆ Z(R ⊲⊳f J) in general. Lemma 2.1. There is the inclusion Z(R ⊲⊳f J) ⊆ {(r, f (r) + j) | r ∈ Z(R)} ∪ {(r, f (r) + j) | j ′ (f (r) + j) = 0, for some j ′ ∈ J \ {0}}, with equality if at least one of the following conditions hold: (1) f (Z(R)) ⊆ J and f −1 (J) 6= 0; (2) f (Z(R))J = 0 and f −1 (J) 6= 0; (3) J ⊆ f (R); (4) J be a torsion R-module. Proof. Assume that (r, f (r) + j) ∈ Z(R ⊲⊳f J). Then (r, f (r) + j)(s, f (s) + j ′ ) = 0 for some non-zero element (s, f (s) + j ′ ) ∈ R ⊲⊳f J. Hence rs = 0 and jf (s) + j ′ (f (r) + j) = 0. If s = 0, then j ′ 6= 0 and j ′ (f (r) + j) = 0. Otherwise, r ∈ Z(R). This proves the inclusion. We already have the inclusion {(r, f (r) + j) | j ′ (f (r) + j) = 0, for some j ′ ∈ J \ {0}} ⊆ Z(R ⊲⊳f J). To complete the proof, it is enough for us to show that {(r, f (r) + j) | r ∈ Z(R) and j ∈ J} ⊆ Z(R ⊲⊳f J) under the validity of any of PRÜFER CONDITIONS UNDER THE AMALGAMATED CONSTRUCTION 3 conditions (1)–(4). Let (r, f (r) + j) ∈ R ⊲⊳f J where r ∈ Z(R) and j ∈ J. Then there is a non-zero element s ∈ R such that rs = 0. (1) If r 6= 0, we have (r, f (r) + j)(s, f (s) + (−f (s))) = 0. So assume that r = 0 and choose 0 6= a ∈ f −1 (J). Then (0, i)(a, 0) = 0. (2) If r 6= 0, we have (r, f (r) + j)(s, f (s)) = 0. So assume that r = 0 and choose 0 6= a ∈ f −1 (J). Then (0, i)(a, 0) = 0. (3) If f (s)J = 0, then (r, f (r) + j)(s, f (s)) = 0. Assume now that f (s)J 6= 0. Then there is 0 6= k ∈ J such that f (s)k 6= 0. By assumption k = f (t) for some t ∈ R. It is clear that st 6= 0 and (r, f (r) + i)(st, f (st) − f (s)k) = 0. (4) Let t ∈ Reg(R) such that f (t)j = 0. It is easy to see that ts 6= 0 and (r, f (r) + i)(ts, f (ts)) = 0.  We say that the amalgamated ring R ⊲⊳f J has the condition ⋆ if the equality Z(R ⊲⊳f J) = {(r, f (r)+j) | r ∈ Z(R)}∪{(r, f (r)+j) | j ′ (f (r)+j) = 0, ∃j ′ ∈ J \{0}} holds. Lemma 2.1 now says that the amalgamated ring R ⊲⊳f J involving one of the mentioned conditions has the condition ⋆. In particular when f is surjective, by part (3) of Lemma 2.1, R ⊲⊳f J has the condition ⋆. Therefore the amalgamated duplication of a ring along an ideal has the condition ⋆. Although the trivial extension of a ring by a module does not satisfy any conditions mentioned in Lemma 2.1, the next remark illustrates that the trivial extension of a ring by a module also has this condition. So we have a bunch of examples satisfying the condition ⋆. Let M be an R-module. Nagata (1955) gave a ring extension of R called the trivial extension of R by M (or the idealization of M in R), denoted here by R ⋉ M [19, page 2]. It should be noted that the module M becomes an ideal in R ⋉ M and (0 ⋉ M )2 = 0. As in [6, Remark 2.8], if S := R ⋉ M , J := 0 ⋉ M , and ι : R → S be the natural embedding, then R ⊲⊳ι J ∼ = R ⋉ M which maps the element (r, ι(r) + (0, m)) to the element (r, m). Remark 2.2. Let M be an R-module. By [1, Proposition 1.1], one has Z(R ⋉ M ) = {(r, m) | r ∈ Z(R) ∪ Z(M ) and m ∈ M }. This equality together with the isomorphism mentioned above shows that the trivial extension R ⋉ M has the condition ⋆. 3. Transfer of Prüfer condition In this section we investigate the transfer of Prüfer condition on the amalgamated algebra R ⊲⊳f J. The following concept and lemmas are crucial in this investigation. Let p be a prime ideal of R. Then (R, p) is said to has the regular total order property if, for each pair of ideals a and b of R, at least one of which is regular, the ideals aRp and bRp are comparable. Using this notion, Griffin [12, Theorem 13] obtained the following useful characterization of Prüfer rings which we use it frequently. Theorem 3.1. The ring R is Prüfer if and only if (R, m) has the regular total order property for every m ∈ Max(R). The following basic lemma will be used throughout this section. Lemma 3.2. Let U be a multiplicatively closed subset of the ring R. If r ∈ Reg(R), then r/1 ∈ Reg(RU ). The converse holds whenever U ∩ Z(R) = φ. In particular, if 4 Y. AZIMI, P. SAHANDI AND N. SHIRMOHAMMADI Z(R) ⊆ Jac(R), then, for a maximal ideal m, one has r/1 ∈ Reg(Rm ) if and only if r ∈ Reg(R). This lemma enables us to present the following version of the theorem above which is very useful for us. Lemma 3.3. Assume that Z(R) ⊆ Jac(R) and that m is a maximal ideal of the ring R. Then (R, m) has the regular total order property if and only if the principal ideals xRm and yRm are comparable for all x, y ∈ R with x is regular. Proof. Assume that the principal ideals xRm and yRm are comparable for all x, y ∈ R with x is regular. Let a and b be ideals of R, and x be a regular element of R in a. Suppose that y/1 ∈ bm \ am . It follows that xRm ⊆ yRm . To conclude the inclusion am ⊆ bm , it is enough for us to show that am ⊆ yRm . Suppose on the contrary that there exists an element a/1 ∈ am \ yRm . Since aRm * xRm , it follows that xRm ⊆ aRm . It turns out that a/1 is regular. This in conjunction with Lemma 3.2 implies that a is regular. Hence yRm and aRm are comparable which is a contradiction.  In the sequel, we will use the following properties of amalgamated rings without explicit comments. Remark 3.4. The following statements hold. (1) ([8, Corollaries 2.5 and 2.7]) For p ∈ Spec(R) and q ∈ Spec(S) \ V(J), set p′f :=p ⊲⊳f J := {(p, f (p) + j)|p ∈ p, j ∈ J}, qf :={(r, f (r) + j)|r ∈ R, j ∈ J, f (r) + j ∈ q}. Then, one has the following. (a) The prime ideals of R ⊲⊳f J are of the type qf or p′f , for q varying in Spec(S) \ V(J) and p in Spec(R). (b) Max(R ⊲⊳f J) = {p′f |p ∈ Max(R)} ∪ {qf |q ∈ Max(S) \ V(J)}. (2) ([8, Proposition 2.9]) The following formulas for localizations hold. (a) For any q ∈ Spec(S) \ V(J), the localization (R ⊲⊳f J)qf is canonically isomorphic to Sq . This isomorphism maps the element (r, f (r) + j)/(r′ , f (r′ ) + j ′ ) to (f (r) + j)/(f (r′ ) + j ′ ). (b) For any p ∈ Spec(R) \ V(f −1 (J)), the localization (R ⊲⊳f J)p′f is canonically isomorphic to Rp . This isomorphism maps the element (r, f (r) + j)/(r′ , f (r′ ) + j ′ ) to r/r′ . (c) For any p ∈ Spec(R) containing f −1 (J), consider the multiplicative subset Tp := f (R \ p) + J of S and set STp := Tp−1 S and JTp := Tp−1 J. If fp : Rp → STp is the ring homomorphism induced by f , then the ring (R ⊲⊳f J)p′f is canonically isomorphic to Rp ⊲⊳fp JTp . This isomorphism maps the element (r, f (r) + j)/(r′ , f (r′ ) + j ′ ) to (r/r′ , (f (r) + j)/(f (r′ ) + j ′ )). We are now ready to state and prove the main result of this section. In fact, it provides a partial converse of [10, Proposition 4.2] as well as a generalization of [4, Theorem 2.2]. Theorem 3.5. Assume that f (Reg(R)) ⊆ Reg(S). PRÜFER CONDITIONS UNDER THE AMALGAMATED CONSTRUCTION 5 (1) If R ⊲⊳f J is a Prüfer ring, then R is a Prüfer ring and JTm = f (r)JTm for every m ∈ Max(R) and every r ∈ Reg(R). (2) Assume that R ⊲⊳f J has the condition ⋆ and that Z(R ⊲⊳f J) ⊆ Jac(R ⊲⊳f J). If R is a Prüfer ring and JTm = f (r)JTm for every m ∈ Max(R) and every r ∈ Reg(R), then R ⊲⊳f J is a Prüfer ring. Proof. (1) Assume that R ⊲⊳f J is a Prüfer ring. By [10, Proposition 4.2], R is a Prüfer ring. Let r ∈ Reg(R), m ∈ Max(R), and k/x ∈ JTm . It is easy to see that (r, f (r)) ∈ Reg(R ⊲⊳f J). By Theorem 3.1, the ideal (r, f (r))(R ⊲⊳f J)m′ f is comparable with any ideal of (R ⊲⊳f J)m′ f . Hence the principal ideal of Rm ⊲⊳fm JTm generated by (r/1, fm (r/1)) is comparable   with the principal ideal generated by (0, k/x). If (r/1, fm (r/1)) Rm ⊲⊳fm JTm ⊆ (0, k/x) Rm ⊲⊳fm JTm , then (r/1, fm (r/1)) = (0, k/x)(s/z, fm(s/z) + j/y) for some (s/z, fm(s/z) + j/y) ∈ Rm ⊲⊳fm JTm which implies that r/1 = 0. This is a contradiction since r/1 ∈  fm Reg(Rm ) by Lemma 3.2. So we  may assume that the inclusion (0, k/x) Rm ⊲⊳ JTmf ⊆ fm (r/1, fm (r/1)) Rm ⊲⊳ JTm holds. Thus there exists (s/z, fm (s/z)+j/y) ∈ Rm ⊲⊳ m JTm such that (0, k/x) = (r/1, fm (r/1))(s/z, fm (s/z) + j/y). This means that s/z = 0 and k/x = fm (r/1)j/y = f (r)j/y ∈ f (r)JTm , as desired. (2) By Theorem 3.1, it is sufficient to prove that (R ⊲⊳f J, M) has the regular total order property for every maximal ideal M of R ⊲⊳f J. On the other hand, it follows from the hypothesis that J ⊆ Jac(S) and Z(R) ⊆ Jac(R). Indeed if J * Jac(S), there exists a q ∈ Max(S) \ V(J). Then {(0, j) | j ∈ J} ⊆ Z(R ⊲⊳f J) ⊆ Jac(R ⊲⊳f J) ⊆ qf . This yields J ⊆ q a contradiction. For the second inclusion assume a ∈ Z(A) and m ∈ Max(R). Then (a, f (a)) ∈ Z(R ⊲⊳f J) ⊆ Jac(R ⊲⊳f J) ⊆ m′f , which implies that a ∈ m. Therefore we have two cases to consider: Case 1. Assume that M = m′f for some m ∈ Max(R) such that f −1 (J) * m. Let (r, f (r) + j) ∈ Reg(R ⊲⊳f J). Then (r, f (r) + j)/(1, 1) ∈ Reg((R ⊲⊳f J)m′f ). Using the isomorphism (R ⊲⊳f J)m′f ∼ = Rm , one has r/1 ∈ Reg(Rm ) which implies that r ∈ Reg(R) by Lemma 3.2. Since (R, m) has the regular total order property, the ideal rRm is comparable with every ideal of Rm . Consequently, the ideal (r, f (r) + j)(R ⊲⊳f J)m′f is comparable with every ideal of (R ⊲⊳f J)m′f . Case 2. Assume that M = m′f for some m ∈ Max(R) such that f −1 (J) ⊆ m. Let (r, f (r) + j) ∈ Reg(R ⊲⊳f J) and (r′ , f (r′ ) + j ′ ) ∈ R ⊲⊳f J. Since R ⊲⊳f J has the condition ⋆, we have r ∈ Reg(R). Thus the principal ideals rRm and r′ Rm are comparable because (R, m) has the regular total order property. We may and do assume r′ Rm ⊆ rRm . So we have r′ /1 = (r/1)(t/u) for some t/u ∈ Rm . We claim that there exists an element k/y ∈ JTm such that j ′ /1 − fm (t/u)j/1 = (k/y)(fm (r/1) + j/1). If this is the case, then one has the equality (r′ /1, fm(r′ /1) + j ′ /1) = (t/u, fm(t/u) + k/y)(r/1, fm (r/1) + j/1) in the ring Rm ⊲⊳fm JTm which shows the following inclusion of principal ideals (r′ /1, fm(r′ /1) + j ′ /1)(Rm ⊲⊳fm JTm ) ⊆ (r/1, fm (r/1) + j/1)(Rm ⊲⊳fm JTm ). This inclusion yields the inclusion (r′ , f (r′ ) + j ′ )(R ⊲⊳f J)m′f ⊆ (r, f (r) + j)(R ⊲⊳f J)m′f . It remains to prove the claim. To this end, one notices that our assumption gives an element l/v ∈ JTm such that j/1 = fm (r/1)(l/v). Hence fm (r/1) + j/1 = fm (r/1)((v + l)/v) and observe that the element (v + l)/v is a unit element of  STm . 6 Y. AZIMI, P. SAHANDI AND N. SHIRMOHAMMADI We have the following corollaries. Corollary 3.6. Assume that (R, m) is a local ring, J ⊆ Jac(S) and f (Reg(R)) ⊆ Reg(S). (1) If R ⊲⊳f J is a Prüfer ring, then R is a Prüfer ring and J = f (r)J for every r ∈ Reg(R). (2) Assume further that R ⊲⊳f J has the condition ⋆. If R is a Prüfer ring and J = f (r)J for every r ∈ Reg(R), then R ⊲⊳f J is a Prüfer ring. Proof. It follows from the inclusion J ⊆ Jac(S) that the elements of Tm = f (R \ m) + J are units in S for every m ∈ Max(R). Hence, for every r ∈ R and every m ∈ Max(R), JTm = f (r)JTm holds if and only if J = f (r)J holds. One also notices from Remark 3.4(1)(b) that (R, m) is a local ring and J ⊆ Jac(S) if and only if R ⊲⊳f J is local. The result is therefore immediate from Theorem 3.5.  We now deal with the amalgamated duplication. Assume that R = S and f is the identity map on R. Let I be an ideal of R, 0 6= r ∈ R and m ∈ Max(R). One notices that if m ⊇ I, then Tm = R \ m + I = R \ m, otherwise, ITm = 0 by [10, Remark 2.4]. Hence ITm = rITm holds if and only if Im = rIm . It also easily obtain that Z(R ⊲⊳ I) ⊆ Jac(R ⊲⊳ I) if and only if Z(R) ⊆ Jac(R) and I ⊆ Jac(R).Therefore we can derive the following corollary of Theorem 3.5. This corollary generalizes [4, Theorem 2.2] to non-local case as well as provides an answer to [4, Question 2.11]. Corollary 3.7. Let I be an ideal of the ring R. (1) If R ⊲⊳ I is a Prüfer ring, then R is a Prüfer ring and Im = rIm for every m ∈ Max(R) and every r ∈ Reg(R). (2) Assume further that Z(R) ⊆ Jac(R) and I ⊆ Jac(R). If R is a Prüfer ring and Im = rIm for every m ∈ Max(R) and every r ∈ Reg(R), then R ⊲⊳ I is a Prüfer ring. Corollary 3.8. (See [4, Theorem 2.2]) Let (R, m) be a local ring and I a proper ideal of R. Then R ⊲⊳ I is a Prüfer ring if and only if R is a Prüfer ring and I = rI for every r ∈ Reg(R). We shall now describe the behaviour of Prüfer condition on trivial extension. Corollary 3.9. Let M be an R-module such that Z(M ) ⊆ Z(R). (1) If R ⋉ M is a Prüfer ring, then R is a Prüfer ring and Mm = rMm for every m ∈ Max(R) and every r ∈ Reg(R). (2) Assume further that Z(R) ⊆ Jac(R). If R is a Prüfer ring and Mm = rMm for every m ∈ Max(R) and every r ∈ Reg(R), then R ⋉ M is a Prüfer ring. Proof. It follows from the inclusion Z(M ) ⊆ Z(R) that ι(Reg(R)) ⊆ Reg(R ⋉ M ). On the other hand, for r ∈ R and m ∈ Max(R), we have Tm = ι(R \ m) + J = R ⋉ M \ m ⋉ M where J = 0 ⋉ M . Hence JTm = ι(r)JTm holds if and only if Mm = rMm holds. Finally, it is easy to see that our assumption Z(M ) ⊆ Z(R) together with Remark 2.2 implies Z(R⋉M ) ⊆ Jac(R⋉M ). Consequently, Theorem 3.5 completes the proof.  It is worth pointing out that in the corollary above the assumption Z(M ) ⊆ Z(R) in crucial. For example let (R, m) be a local integral domain which is not a valuation domain (e.g. R := k + Y k(X)JY K, where k is a field and X, Y are indeterminates PRÜFER CONDITIONS UNDER THE AMALGAMATED CONSTRUCTION 7 over k). The trivial extension R ⋉ (R/m) is a total ring of quotients, hence, Prüfer, while R is not (see [16, Proposition 3.1(a)]). Corollary 3.10. Assume that R is an integral domain or is a local ring and that M is a torsion-free R-module. Then R ⋉ M is a Prüfer ring if and only if R is a Prüfer ring and Mm = rMm for every m ∈ Max(R) and r ∈ Reg(R). Applying the corollary above we obtain an easy proof for the following result of Bakkari, Kabbaj, and Mahdou. Corollary 3.11. (cf. [2, Theorem 2.1(1)]) Assume that A ⊆ B is an extension of domains and let K be the quotient field of A. Then A ⋉ B is a Prüfer ring if and only if A is a Prüfer domain and K ⊆ B. Proof. It is well-known that B = ∩m∈Max(A) Bm . Hence, for every 0 6= a ∈ A, one has Bm = aBm for every m ∈ Max(A) if and only if B = aB. This is the case if and only if K ⊆ B. The conclusion is now clear by Corollary 3.9.  Total rings of quotients are trivial examples of Prüfer rings. In [10, Proposition 4.6], Finocchiaro gave conditions, under which, total ring of quotients property transfers from R to R ⊲⊳f J. The next proposition provides a slight generalization as well as is a partial converse of it. Proposition 3.12. The following statements hold: (1) Assume that J ⊆ Jac(S) and that R ⊲⊳f J has the condition ⋆. If R is a total ring of quotients, then so is R ⊲⊳f J. (2) Assume that f (Reg(R)) ⊆ Reg(S). If R ⊲⊳f J is a total ring of quotients, then so is R. Proof. The proof of (1) is similar to that of [10, Proposition 4.6], but, for the reader’s convenience, we derive it under the general assumption that R ⊲⊳f J has the condition ⋆. Assume that R is a total ring of quotients and let (r, f (r) + j) be a non-unit element of R ⊲⊳f J. Hence (r, f (r)+j) ∈ m′f for some m ∈ Max(R); so that r ∈ m. This in conjunction with the assumption that R is a total ring of quotients yields r ∈ Z(R). It now follows from Lemma 2.1 that (r, f (r) + j) ∈ Z(R ⊲⊳f J). Therefore R ⊲⊳f J is a total ring of quotients. To prove (2), let r ∈ R. If (r, f (r)) is a unit of R ⊲⊳f J, then obviously r is a unit of R. Otherwise (r, f (r)) is a zerodivisor of R ⊲⊳f J. Our desired result will be established if r is a zero-divisor of R. If not, by Lemma 2.1, there exists j ∈ J such that jf (r) = 0, which contradicts since f (r) is regular.  4. Transfer of Gaussian condition Our goal in this section is to determine the behaviour of Gaussian condition under amalgamated construction. Let X be an indeterminate over R. The content ideal cR (f ) of a polynomial f ∈ R[X] is defined to be the ideal of R generated by the coefficients of f . A ring R is called a Gaussian ring if cR (f g) = cR (f )cR (g) for every two polynomials f, g ∈ R[x]. It is shown in [22, Theorem 2.2] that a local ring R is Gaussian if and only if, for every two elements a, b ∈ R, the following two properties hold: (i) (a, b)2 = (a2 ) or (b2 ); (ii) if (a, b)2 = (a2 ) and ab = 0, then b2 = 0. Using this characterization, the authors in [4, Theorem 3.2(2) and Corollary 3.8(2)] established that the amalgamated duplication ring R ⊲⊳ I is Gaussian if and 2 only if R is Gaussian, Im = 0 and rIm = r2 Im for every m ∈ Max(R) ∩ V(I) and 8 Y. AZIMI, P. SAHANDI AND N. SHIRMOHAMMADI every r ∈ m. Then, again, by means of this characterization, for a local ring (R, m) and assuming J 2 = 0, it is shown that R ⊲⊳f J is Gaussian if and only if so is R and f (r)J = f (r)2 J for every r ∈ m [18, Theorem 2.1(2)]. In the following, we give an improvement to this result provided that J ⊆ f (R). Theorem 4.1. Assume that (R, m) is a local ring and J ⊆ f (R) ∩ Jac(S) (e.g. f is surjective). Then R ⊲⊳f J is Gaussian if and only if R is Gaussian, J 2 = 0 and f (r)J = f (r)2 J for every r ∈ m. Proof. The backward direction is [18, Theorem 2.1(2)]. For the forward direction assume that R ⊲⊳f J is Gaussian. Then R is a Gaussian ring, since the Gaussian property is stable under factor rings. Next, let i, j ∈ J. Assume that j = f (a) for some a ∈ R. By assumption we have ((a, j), (0, j))2 = ((0, j)2 ) or ((a, j)2 ) [22, Theorem 2.2]. If the first case happens, then a2 = 0; so that j 2 = 0. The second case yields j 2 (1 − j ′ ) = 0 for some j ′ ∈ J. Thus j 2 = 0. Similarly i2 = 0. Hence ij = 0. To this end one notices that R ⊲⊳f J is Gaussian. Let now 0 6= r ∈ m and j ∈ J. The last equality is the direct consequence of the statement ((r, f (r)), (0, j))2 = ((r, f (r))2 ) or ((0, j)2 ) together with J 2 = 0.  In the course of this paper, for an R-module M , SuppR (M ) will denote the set of all prime ideals p of R such that Mp 6= 0. In a sense, the next corollary is a generalization of [4, Corollary 3.8(3)]. Corollary 4.2. Assume that J ⊆ f (R) ∩ Jac(S). Then R ⊲⊳f J is Gaussian if 2 and only if R is Gaussian, Jm = 0 and f (r)Jm = f (r)2 Jm for every m ∈ Max(R) ∩ −1 V(f (J)) and r ∈ m. Proof. One can see Jm = JTm for every m ∈ V(f −1 (J)) since Tm = f (R \ m) + J = f (R \ m). It also follows from the assumption J ⊆ f (R) that JTm ⊆ fm (Rm ) for every m ∈ SuppR (J) ∩ V(f −1 (J)). Hence Theorem 4.1 completes the proof.  The next example illustrates the assumption J ⊆ f (R) in the forward direction of the theorem above is essential. Example 4.3. Let Z be the ring of integers and p = pZ be the prime ideal generated by a prime number p. Let X be an indeterminate over the field of rational numbers Q, and let R := Zp , S := QJXK the formal power series ring over Q, J := XQJXK the unique maximal ideal of S, f : R → S be the inclusion homomorphism. It is clear that J * f (R). Notice that R ⊲⊳f J is isomorphic to the composite ring extension Zp + XQJXK, by [6, Example 2.5]. It follows from [13, Theorem 1.3] that R ⊲⊳f J is a Prüfer domain, hence, a Gaussian ring [11, Corollary 28.5], while J 2 6= 0. As an application of our results we construct some examples of Prüfer rings which are not Gaussian. Example 4.4. Let k be a field and X an indeterminate over k. Let R := k[X]/(X 8) which is a total quotient ring, S := k[X]/(X 4), J := (X 2 )/(X 4 ) and f be the canonical surjection. Then R ⊲⊳f J has the condition ⋆ since f is surjective. It follows from Proposition 3.12(1) that R ⊲⊳f J is a total quotient ring, hence Prüfer. However R ⊲⊳f J is not a Gaussian ring by Theorem 4.1, since XJ 6= X 2 J. The next example handles the non-local case. PRÜFER CONDITIONS UNDER THE AMALGAMATED CONSTRUCTION 9 Example 4.5. Let R := Z/48Z, S := Z/24Z, J := 6Z/24Z and f be the canonical surjection. Then, as Example 4.4, R ⊲⊳f J has the condition ⋆ and it follows from Proposition 3.12(1) that R ⊲⊳f J is a Prüfer ring. But, it is not a Gaussian ring 2 by Corollary 4.2, since the natural image of 12 = 62 − 24 in Jm is not zero, where m = 2Z/48Z. 5. Transfer of arithmetical condition This section deals with arithmetical condition on amalgamated construction. The ring R is said to be an arithmetical ring if every finitely generated ideal of R is locally principal [14]. Thus R is an arithmetical ring if and only if R is a locally chain ring. Recall that an R-module M is said to be uniserial if its set of submodules is totally ordered by inclusion and R is a chain ring if it is uniserial as R-module. The special case of the following result has been appeared in [5, Proposition 1.1]. Theorem 5.1. Assume that J is a non-zero ideal of S. If R ⊲⊳f J is a chain ring, then R is a valuation domain and J = (f (a) + j)J for every 0 6= a ∈ R and j ∈ J. The converse holds provided that J is a uniserial R-module. Proof. Assume that R ⊲⊳f J is a chain ring. Then, as a factor ring, R is a chain ring. Let 0 6= a ∈ R and l ∈ J. Clearly (a, f (a)) ∈ / (0, l)(R ⊲⊳f J). Then (0, l) = (r, f (r)+ f i)(a, f (a)) for some (r, f (r) + i) ∈ R ⊲⊳ J; so that ra = 0 and l = f (a)i ∈ f (a)J. Hence J = f (a)J and this shows that R is a valuation domain. Now if further j ∈ J, there is (r, f (r) + k) ∈ R ⊲⊳f J such that (0, l) = (a, f (a) + j)(r, f (r) + k). Hence ra = 0 which implies that r = 0. Thus l = (f (a) + j)k ∈ (f (a) + j)J. Therefore J = (f (a) + j)J. For the converse assume that J is a uniserial R-module. Let (a, f (a)+j), (b, f (b)+ i) ∈ R ⊲⊳f J be arbitrary. Assume that b 6= 0 and a = bc. Then there exists k ∈ J such that j − f (c)i = (f (a) + i)k. Hence (a, f (a) + j) = (b, f (b) + i)(c, f (c) + k). In the case that b = 0, there is r ∈ R such that j = ri(= f (r)i) since J is uniserial. Hence (0, j) = (r, f (r))(0, i).  We notice that one can not necessarily deduce J is a uniserial R-module from the assumption that R ⊲⊳f J is a chain ring. In fact, bearing in mind the notations of Example 4.3, it is clear that the Zp -submodules of J generated by the two elements X and X 2 are not comparable. Corollary 5.2. The following statements hold: (1) Assume that J is a non-zero ideal of S such that J 2 = 0. Then R ⊲⊳f J is a chain ring if and only if R is a valuation domain, J is a uniserial R-module and J = f (a)J for every 0 6= a ∈ R. (2) Assume that J ⊆ f (R). Then R ⊲⊳f J is a chain ring if and only if R is a chain ring and J = 0. Proof. (1) It is obvious that J = (f (a) + j)J for every 0 6= a ∈ R and j ∈ J if and only if J = f (a)J for every 0 6= a ∈ R. Then, in view of Theorem 5.1, it remains for us to deduce J is uniserial when R ⊲⊳f J is a chain ring. Indeed, for i, j ∈ J, one of the elements (0, i) and (0, j) divides the other. So we may assume (0, j) = (r, f (r) + k)(0, i) for some (r, f (r) + k) ∈ R ⊲⊳f J. Thus j = (f (r) + k)i = f (r)i. (2) One implication is clear. For the other, suppose, on the contrary, that J 6= 0. Then one can choose a non-zero element j ∈ J and, hence, a non-zero element a ∈ R 10 Y. AZIMI, P. SAHANDI AND N. SHIRMOHAMMADI such that j = f (a). This together with Theorem 5.1 shows that J = (f (a)−j)J = 0, which is a contradiction.  Corollary 5.3. (see [4, Theorem 3.2(1)]) The ring R ⊲⊳ I is a chain ring if and only if R is a chain ring and I = 0. We now want to generalize Corollary 5.2 to arithmetical rings. To this end, we need the concept of distributive lattice of submodules. Let M be a module over the ring R. We say that M has a distributive lattice of submodules if M satisfies one of the following two equivalent conditions: (1) (N + L) ∩ K = (N ∩ K) + (L ∩ K) for every submodules N, L, K of M ; (2) (N ∩ L) + K = (N + K) ∩ (L + K) for every submodules N, L, K of M . It is known that M has a distributive lattice of submodules if and only if Mm is a uniserial module for each maximal ideal m of R [5, Proposition 1.2]. The special case of part 2 of the following result was obtained in [4, Corollary 3.8(1)]. Corollary 5.4. The following statements hold: (1) Assume that J is a non-zero ideal of S with J 2 = 0. Then R ⊲⊳f J is an arithmetical ring if and only if R is arithmetical, Rp is a domain for every p ∈ SuppR (J), J is locally divisible and has a distributive lattice of submodules. (2) Assume that J ⊆ f (R). Then R ⊲⊳f J is an arithmetical ring if and only if R is arithmetical, Jm = 0 for every m ∈ Max(R) ∩ V(f −1 (J)) and Sq is a chain ring for every q ∈ Max(S) \ V(J). Proof. (1) One can employ [21, Lemma 2.8] together with Corollary 5.2 and the above-mentioned result [5, Proposition 1.2] to deduce the assertion. (2) Assume that R ⊲⊳f J is an arithmetical ring. First, note that, as a factor ring, R is an arithmetical ring. Then we show that Jm = 0 for every m ∈ Max(R) ∩ V(f −1 (J)). Let m ∈ Max(R) ∩ V(f −1 (J)). By assumptions, (R ⊲⊳f J)m′f ∼ = Rm ⊲⊳fm JTm is a chain ring and one has the inclusion JTm ⊆ fm (Rm ). Hence JTm = 0 by Corollary 5.2. On the other hand, using the inclusions J ⊆ f (R) and f −1 (J) ⊆ m, it is easily seen that Tm = f (R \ m) + J = f (R \ m). Therefore Jm = 0. Finally, the isomorphism (R ⊲⊳f J)qf ∼ = Sq shows that Sq is a chain ring for every q ∈ Max(S) \ V(J). The converse direction is easy to obtain.  The conclusion of the corollary above fails if the assumption J 2 = 0 or J ⊆ f (R) is dropped. For example, let X be an indeterminate over the field of rational numbers Q, and let R := Z, S := QJXK the formal power series ring over Q, J := XQJXK, f : R → S be the inclusion homomorphism. It is clear that J * f (R) and that J 2 6= 0. Notice that R ⊲⊳f J ∼ = Z + XQJXK [6, Example 2.5]. It follows from [13, Theorem 1.3] that R ⊲⊳f J is a Prüfer domain, hence, an arithmetical ring. However J is not locally divisible. In concluding we give an example of a non-arithmetical Gaussian ring. Example 5.5. Let k be a field and X an indeterminate over k. Set R := k[X], S := k[X]/(X 2), J := (X)/(X 2 ) and let f be the canonical surjection. Then R ⊲⊳f J is Gaussian by Corollary 4.2. However R ⊲⊳f J is not an arithmetical ring by Corollary 5.4, since J 6= 0 = XJ. PRÜFER CONDITIONS UNDER THE AMALGAMATED CONSTRUCTION 11 References 1. M. Axtell and J. Stickles, Zero-divisor graphs of idealizations, J. Pure Appl. Algebra, 204, (2006), 235–243. 2. C. Bakkari, S. Kabbaj, and N. Mahdoua, Trivial extensions defined by Prüfer conditions J. Pure App. Algebra, 214, (2010), 53–60. 3. H. S. Butts and W. Smith, Prüfer rings, Math. Z., 95, (1967), 196–211. 4. M. Chhiti, M. Jarrar, S. Kabbaj and N. Mahdou, Prüfer conditions in an amalgamated duplication of a ring along an ideal, Comm. Algebra, 43, (2015), 249–261. 5. F. Couchot, Gaussian trivial ring ectensions and fqp-rings, Comm. Algebra, 43, (2015), 2863– 2874. 6. M. D’Anna, C. A. Finocchiaro, and M. Fontana, Amalgamated algebras along an ideal, in: Commutative Algebra and Applications, Proceedings of the Fifth International Fez Conference on Commutative Algebra and Applications, Fez, Morocco, 2008, W. de Gruyter Publisher, Berlin, 2009, pp. 155–172. 7. M. D’Anna, C. A. Finocchiaro, and M. Fontana, Properties of chains of prime ideals in an amalgamated algebra along an ideal, J. Pure Appl. Algebra, 214, (2010), 1633–1641. 8. M. D’Anna, C. A. Finocchiaro, and M. Fontana, New algebraic properties of an amalgamated algebra along an ideal, Comm. Algebra, 44, (2016), 1836–1851. 9. M. D’Anna and M. Fontana, An amalgamated duplication of a ring along an ideal: the basic properties, J. Algebra Appl., 6, No.3, (2007), 443–459. 10. C. A. Finocchiaro, Prüfer-like conditions on an amalgamated algebra along an ideal, Houston J. Math., 40, (2014), 63–79. 11. R. Gilmer, Multiplicative Ideal Theory, New York, Dekker, 1972. 12. M. Griffin, Prüfer rings with zero divisors, J. Reine Angew. Math., 239/240, (1969), 55–67. 13. E. Houston and J. Taylor, Arithmetic properties in pullbacks, J. Algebra, 310, (2007), 235– 260. 14. C. U. Jensen, Arithmetical rings, Acta Math. Hungr., 17, (1966), 115–123. 15. W. Krull, Beitrage zur arithmetik kommutativer integritatsbereiche, Math. Z., 41, (1936), 545–577. 16. T. Lucas, Some results on Prüfer rings, Pasific J. Math., 124, (1986), 333–343. 17. H. Maimani and S. Yassemi, Zerodivisor graphs of amalgamated duplication of a ring along an ideal, J. Pure Appl. Algebra, 212, (2008), 168–174. 18. M. A. S. Moutui and N. Mahdou, Amalgamated algebras along an ideal defined by Gaussian condition, Journal of Taibah University for Science, 9, (2015), 373–379. 19. M. Nagata, Local Rings, Interscience, New York, 1962. 20. H. Prüfer, Untersuchungen uber teilbarkeitseigenschaften in korpern, J. Reine Angew. Math., 168 (1932), 1-36. 21. P. Sahandi, N. Shirmohammadi, and S. Sohrabi, Cohen-Macaulay and Gorenstein properties under the amalgamated construction, Comm. Algebra, 44, (2016), 1096–1109. 22. H. Tsang, Gauss’s Lemma Ph.D. thesis, University of Chicago, Chicago, 1965. Department of Pure Mathematics, Faculty of Mathematical Sciences, University of Tabriz, Tabriz, Iran. E-mail address: [email protected] Department of Pure Mathematics, Faculty of Mathematical Sciences, University of Tabriz, Tabriz, Iran. E-mail address: [email protected] Department of Pure Mathematics, Faculty of Mathematical Sciences, University of Tabriz, Tabriz, Iran. E-mail address: [email protected]
0math.AC
1 Multi-objective Optimal Sizing and Energy Management of Hybrid Energy Storage System for Electric Vehicles arXiv:1801.07183v1 [cs.SY] 19 Jan 2018 Huilong Yu, Member, IEEE, Federico Cheli, Francesco Castelli-Dezza, Member, IEEE, Dongpu Cao, Member, IEEE, and Fei-Yue Wang, Fellow, IEEE Abstract—Hybrid energy storage system (HESS) composed of lithium-ion battery and supercapacitors has been recognized as one of the most promising solutions to face against the high cost, low power density and short cycle life of the battery-only energy storage system, which is the major headache hindering the further penetration of electric vehicles. In this work, the HESS sizing and energy management problem of an electric race car is investigated as a case study to improve the driving mileage and battery cycle life performance. Compared with the existing research, the distinctive features of this work are: (1) A dynamic model and a degradation model of the battery are employed to describe the dynamic behavior and to predict the cycle life of the battery more precisely; (2) Considering the fact that the design and control problems are coupled in most cases, in order to achieve a global optimal design solution and an implementable real-time energy management system, a Bi-level multi-objective sizing and control framework based on non-dominated sorting genetic algorithm-II and fuzzy logic control (FLC) is proposed to size the HESS and to optimize the membership functions of a FLC based EMS at the same time; (3) In order to improve the optimization efficiency, a vectorized fuzzy inference system which allows large scale of fuzzy logic controllers operating in parallel is devised. At last, the Pareto optimal solutions of different HESSs are obtained and compared to show the achieved enhancements of the proposed Bi-level optimal sizing and energy management framework. Index Terms—Hybrid energy storage system, multi-objective optimization, vectorized fuzzy interface, real-time energy management, electric vehicles. I. I NTRODUCTION I N recent years, to face the challenge of air pollution, fossil oil crisis, and greenhouse gas emissions, Electric vehicles (EVs) have gained unprecedented amount of attentions from the governments, academia and industries all over the world. After intensively developing over the last decades, the worldwide promotion and application of EVs have reached a considerable scale. However, the dynamic performance, H. Yu was with the Department of Mechanical Engineering, Politecnico di Milano, 20156, Milano, Italy. He is now with the Mechanical and Mechatronics Engineering Department, University of Waterloo, N2L 3G1, Waterloo, Canada (e-mail: [email protected]). F. Cheli and F. Castelli Dezza are with the Department of Mechanical Engineering, Politecnico di Milano, 20156, Milano, Italy (e-mail: [email protected];[email protected]). D. Cao is with the Mechanical and Mechatronics Engineering Department, University of Waterloo, N2L 3G1, Waterloo, Canada (e-mail: dongp [email protected]). FY. Wang is with the State Key Lab for Management and Control of Complex Systems Institute of Automation, Chinese Academy of Sciences, 100190, Beijing, China (e-mail: [email protected]). cost, durability of an EV are still significantly influenced by the design, integration, and control of its energy storage system (ESS) [1]. It is generally known that the batteryonly ESS with high cost and short cycle life has become one of the biggest obstacles hindering further penetrations of the EVs. Lithium-ion batteries with high energy density and relatively good power density dominate the most recent group of EVs in development, however, its degradation can be accelerated when there is high peak discharging/charging power demand during the acceleration/ deceleration process [2]–[4]. Alternatively, supercapacitors (SCs) can tolerate much more charging/discharging cycles and exhibit superior ability to cope with high peak power, due to their specific energy storage mechanism, but the low energy density hampers their large scale application on EVs [5], [6]. A hybrid energy storage system (HESS) composed by lithium-ion batteries and SCs which can bridge the gap between them is considered as one of the most promising solutions to solve the forgoing problems entrenched in battery-only/SC-only energy [7]–[10]. The configuration of a HESS vary with different connections of the battery, supercapacitor and DC/DC converter. The employed HESS in this work is the most studied configuration that using a bidirectional DC/DC converter to interface the supercapacitor to the DC link of the battery in parallel, where the voltage of supercapacitor can be used in a wide range [8]. Existing research has demonstrated that HESS can dramatically improve braking energy recuperation efficiency, eliminate the need for battery over-sizing, and reduce the weight and cost of the entire system [11]. However, the HESS introduces complicated sizing, energy management and integration problems [12]. The sizing problem of HESS aims to find the appropriate number of supercapacitor banks and battery cells that minimizing the cost, mass and efficiency of the HESS or maximize the battery cycle life. A multi-objective optimization problem was formulated to minimize the overall HESS size and maximize the battery cycle life, the formulated problem was solved with the sample-based global search oriented DIviding RECTangles (DIRECT) algorithm [13]. Ref. [14] proposed a multi-objective sizing approach based on nondominated sorting genetic algorithm II (NSGA-II) for a semiactive HESS and obtained the Pareto frontier with battery capacity loss and total cost of supercapacitors as objectives. Convex optimization was introduced to solve the formulated sizing and energy management problems of different kinds of 2 HESSs with weighted cost as objective [1], [15]. For the energy management strategy (EMS) of HESS, both rule based approach and the optimization based approach are widely investigated [16]. A time efficient utility functionbased control of a battery semi-active HESS was proposed and carried out in [17] by formulating a weighted multiobjective optimization problem, then the formulated problem is solved using the Karush-Kuhn-Tucker (KKT) conditions. Ref. [18] proposed an energy management strategy for a HESS based on fuzzy logic supervisory wavelet-transform frequency decoupling approach, which aims to maintain the state of the energy (SOE) of the supercapacitor at an optimal value, to increase the power density of the ESS and to prolong the battery lifetime. An explicit model predictive control (EMPC) system for a HESS was proposed and validated in [19] to make the HESS operating within specified constraints while allocating high and low frequency current changes to the supercapacitor and battery respectively. Ref. [20] developed a real-time predictive power management control strategy based on neural network and particle swarm optimization algorithm to minimize the total cost including battery degradation and system energy. A variable charging/discharging threshold method and an adaptive intelligence technique based on historical data was proposed in [21] to improve the power management efficiency and smooth the load of a HESS. Two real-time energy management strategies based on KKT conditions and neural network were investigated and validated with experimental work in [22] to improve the battery state of health performance of a HESS effectively. The continuous previous efforts have improved the overall performance of HESS considerably. However, most of the aforementioned literature investigated the sizing and energy management problems separately which can not obtain the global optimal performance of the HESS since the design and control problems of it are actually coupled in practice [23]. We can only obtain the sub-optimal solution when we try to optimize one and fix the other. Some of the existing approach in literature are off-line optimization methods which are quite useful as the reference in designing real-time EMS but not appropriate for real implementation, and most of the real-time implementable EMSs are not able to achieve optimal performances. Besides, few existing work has considered the fact that the total available amount of energy could be extracted from the battery cells will vary when uses different discharging C-rates in practical cases. This dynamic situation should be considered during the optimization research especially when the HESS is operating at limit conditions. Thus, it is necessary to explore a framework that can achieve the global optimal performance by incorporating both the sizing and real-time feedback control problems of the HESS taking into account the battery dynamics. In order to force against the drawbacks of the state-of-theart methods, this work will explore the sizing and real-time energy management problem of HESS as a coupled problem. In particular, the HESS of an electric race car is investigated as a case study. Although win the race is the only ultimate goal on a circuit, we should try to minimize the cost for a racing team and the environmental impact caused by the waste battery as much as possible during a race or for the offline training, which can match the spirit of the electric racing better. Our goal of this work is to introduce the HESS with proper sizing parameters and optimized EMS to improve the cycle life of the battery without scarifying the mileage of the electric race car too much. A multi-objective optimal sizing and energy management framework supported by the employed dynamic battery model, evaluation model and the proposed vectorized fuzzy inference system is proposed in this work. With this framework, one can obtain the Pareto optimal solutions of the formulated multi-objective optimal sizing and energy management problem and achieve both the optimal sizing parameters and the static parameters of the EMS at the same time for each Pareto optimal solution which are ready for further real-time implementation. The rest of this work is organized as follows: Section 2 describes the proposed Bi-level design and energy management framework, then presents the formulation of the sizing and energy management problem. Section 3 elaborates the modelling of the battery and supercapacitor. Section 4 details the devised FLC based on vectorized fuzzy inference engine. In section 5, the simulation parameters and settings are presented in detail. Section 6 and Section 7 illustrate the obtained results and the concluding remarks respectively. II. B I -L EVEL O PTIMAL D ESIGN AND C ONTROL F RAMEWORK The proposed Bi-level optimal design and control framework is presented as Figure 1. The power demand of the driving profile Pdem , the battery state of charge xSOC and supercapacitor state of energy xSOE are the inputs of the FLC based EMS, while the outputs are requested power from the battery Preqbat and from the supercapacitor Preqsc . The outputs of the EMS are the inputs of the battery and supercapacitor modeled in Section III, while the evaluation indexes can be calculated with the outputs of the battery and supercapacitor model. Preqbat xSOC Battery model xSOC Vb Ibat xSOE EMS xSOE Pdem Preqsc SC model xmf N sc Evaluation model Optimal ? Yes End Vsc Isc No Multi-objective optimization Fig. 1. Framework of the Bi-Level design and control The working scheme of the Bi-level optimal design and control is illustrated as follows. Firstly, the multi-objective algorithm will generate the sizing parameter matrix and the corresponding static tuning parameter matrix of the energy management system, in this work, the mentioned matrices are respectively the number of supercapacitor banks and the parameters of the membership functions (MFs) in different 3 pages of the optimization parameters. Secondly, the FLC based EMS constructed with the new membership functions will control the generated new HESS to output the demand power from the battery and supercapacitor respectively. Then, the maximum number of laps can be obtained when both the battery and supercapacitor arrives at the minimum state of charge values set in the constraints, while the capacity loss of the battery is evaluated with the average current of the battery during the whole scenario. There are quite a lot of existing literature to model the capacity loss of the lithiumion battery. The capacity loss model is mostly validated by discharging the battery with constant current C rate, and we havent find any work that can predict the battery capacity loss dynamically with validated experimental work. Thus, we choose to estimate the capacity loss of the battery with average load as many previous work did. When the Pareto-frontier of the two evaluation indexes is obtained, the above iteration will terminate, otherwise, it will continue. The objective of this work is to find the optimal sizing parameter Nsc and the parameter vector xmf defining the membership functions which are respectively the key parameters of HESS design and the real-time FLC based EMS. The optimized EMS will output the requested control command series u(t) = [Preqbat , Preqsc ] to maximize the number of traveled laps Jlaps and battery cycle life Jlifebat on a given race circuit: max J = [Jlaps (x(t), u(t), p), Jlifebat (x(t), u(t), p)] (1) subject to: the first order dynamic constraints ẋ(t) = f [x(t), u(t), t, p], (2) the boundaries of the state, control and design variables xmin ≤ x(t) ≤ xmax umin ≤ u(t) ≤ umax (3) pmin ≤ p ≤ pmax , the algebraic path constraints g min ≤ g[x(t), u(t), t, p] ≤ g max , III. M ODELLING OF THE HESS In this section, the dynamic characteristics of the implemented Lithium-ion battery are analyzed first, and a dynamic battery model is employed after comparison. Then, the details of the employed battery cycle life model are presented. A simplified supercapacitor model is illustrated at the end of this section. A. Dynamic Battery model In order to obtain the optimal sizing parameters and energy management strategy for the HESS considering the characteristics of the battery in practical conditions, it is necessary to implement a proper dynamic battery model that can describe the battery dynamic behavior precisely. The most existing battery models for the simulation of battery behavior basically include the experimental, electrochemical and electrical ones [24]–[26]. However, the experimental and electrochemical model are not appropriate to simulate the battery dynamics correctly. In comparison with the experimental and electrochemical battery model, specially devised electric circuit based model are capable to represent the battery dynamics for the purpose of state of charge (SOC) estimation. In this work, a modified Shepherd model is employed to depict the dynamic characteristics of the battery during charging and discharging process [27]. The dynamic battery model are presented as Equation (6) and Equation (7) with the assumption that the internal resistance is constant and the thermal behavior of the battery is neglected. Discharge: Vbatt = E0 −K Qmax Qmax it−K i−Ri+Ae(−B·it) Qmax − it Qmax − it (6) Charge: (4) and the boundary conditions bmin ≤ b[x(t0 ), t0 , x(tf ), tf , p] ≤ bmax , variables x, control variables u, design parameters p and the boundary constraints b will be presented in the following paragraphs. (5) where ẋ is the first order derivative of the state variables, f is the dynamic model, x, u, p are respectively the state, control and design vector with their lower and upper bounds: xmin , umin , pmin and xmax , umax , pmax . While g and b are the path and boundary equations respectively with their lower and upper bounds g min , bmin and g max , bmax . The dimensions of the input and output variables in Equations (2), (4) and (5) are separately given as: f : Rnx × Rnu × R × Rnp → Rnx g : Rnx × Rnu × R × Rnp → Rng b : Rnx × R × Rnx × R × Rnp → Rnb In this work, the algebraic path constraint g is eliminated by introducing a simple relaxation in Equation (16), the state Qmax Qmax it−K i−Ri+Ae(−B·it) Qmax − it it − 0.1Qmax (7) where Vbatt is the battery voltage (V ), E0 is the voltage constant (V ), K is the polarization constant or polarization resistance, Qmax is the total capacity, i is the battery current, R is the internal resistance. The battery discharge (i > 0) or charge (i < 0 ) it is denoted as Z it = idt. (8) Vbatt = E0 −K The voltage amplitude A (V ), time constant inverse B (Ah−1 ) of the exponential zone, the polarization resistance K (Ω) and the voltage constant E0 (V) in Equations (6) and (7) are calculated as follows [28]: A = VF ull − Vexp B= 3 Qexp (9) (10) 4 K= (Vf ull − Vnom + A(exp(−BQnom ) − 1))(Q − Qnom ) Qnom (11) E0 = VF ull + K + R · i − A. (12) The typical discharge process of the lithium-ion battery is divided into three stages as demonstrated in Figure 2. In the initial stage, the battery voltage drops exponentially from the fully charged voltage Vf ull , the voltage and extracted charge at the end of this stage are Vexp and Qexp , respectively. The voltage continues to decline slowly before reaching the nominal voltage Vnom and the corresponding discharge increases to Qnom in the second stage. In the final stage, the battery voltage drops abruptly to the minimum value and the discharge reaches the maximum value Qmax . in problems that are time-consuming and difficult to solve. There should be more efforts put in improving the optimization efficiency. B. Battery Cycle Life Model In recent years, substantial efforts have been made by both the researchers and industries to develop models that can predict the degradation of the lithium-ion batteries accurately [29]–[31]. A revised semi-empirical model based on Arrhenius equation is widely researched with large scale experiments, and this model is mostly applied in optimization and control problems related with batteries [29]. As presented from Equation (17) to Equation (20), the capacity loss of this model is expressed as a function of the discharge current rate Crate , temperature T and ampere-hour throughout Ah . −Ea )(Ah )z (17) RT where Qloss represents the battery capacity loss, A the preexponential factor, Ea the activation energy from Arrhenius law (J), R is the gas constant of 8.314 , T is the absolute temperature (K), Ah is the Ah-throughput, which represents the amount of charge delivered by the battery during cycling. The pre-exponential factor A in Equation (17) is proved to be sensitive to the discharge current rate Crate with large scale experiments in [32] , and it is fitted with the format as Equation (18) in [33]. Qloss = A exp( ln A = a · exp(−b · Crate ) + c The activation energy can be fitted as a linear function of discharge current rate Ref. [32], Typical discharge curve Fig. 2. Typical discharge curve of lithium-ion battery. The state of charge of the battery xsoc and its derivative ẋsoc is denoted as Equation (13) and Equation (14) respectively. Z tf 1 xsoc = 100(1 − idt) (13) 3600Qmax 0 ẋsoc 1 =− i 36Qmax (14) The charging/discharging i is denoted as  Preqbat    N V η , Preqbat ≥ 0 bat bat AD (15) i=  Preqbat ηAD   , Preqbat < 0 Nbat Vbat where ηAD is the efficiency of the DC/AC converter taking into account of the motor efficiency as a constant value. In this work, the number of battery cells Nbat are determined by the available total mass of the HESS mHESS and the number of the supercapacitor banks Nsc , as shown in Equation (16). The total mass of the HESS is fixed in this work considering the fact that the mass of a race car is strictly limited in general. Nbat = b(mHESS − Nsc mbank )/mcell c (18) (16) Although the modified Shepherd model can represent the dynamic characteristics of the battery, it has not been employed so much in the existing literature related with the HESS design and control due to its complicity, which usually results Ea = d + e · Crate (19) where a, b, c, d, e are the correction parameters of the battery cycle life model. The Ah-throughput can be expressed as Ztf Ah = i dt 3600 (20) 0 where i is the discharge current, tf is the end time of the current profile. C. Supercapacitor Model In this work, the capacity fading of the supercapacitor is neglected considering the fact that it has much longer cycle life than lithium-ion batteries. The supercapacitor model is simplified to a series connection of a resistance and a supercapacitor bank [6]. Also, the efficiency of the DC/DC converter between the supercapacitor and the bus is assumed to be a constant value of 0.95. The recursive supercapacitor model is deduced as  p Vct − Vct2 − 4Rsct Preqsc /(ηAD ηdc )    Preqsc ≥ 0 − 2Csct Rsct V̇ct = p   V − Vct2 − 4Rsct Preqsc ηAD ηdc  − ct Preqsc < 0 2Csct Rsct (21) 5 xSOE = Vct 2 2 Vctmax (22) ẋSOE = 2Vct V̇ct 2 Vctmax (23) and big respectively. The basic idea of the fuzzy rule is to utilize the the supercapacitor as a buffer to reduce the high peak power impact on battery and absorb more regenerative braking power. Vct = Vc Nsc (24) B. Membership functions Csct =Cbank /Nsc (25) Rst = Nsc Rs (26) where Vct is the total open circuit voltage of the supercapacitor pack assuming that all banks have a uniform behavior, tk+1 is the time at step k + 1, Rst is the total equivalent series resistance, Preqsc is the demand power from the supercapacitor, ηdc is the efficiency of the DC/DC converter, Csct is the total capacity, SOE is the state of energy, Vctmax is the initial open circuit voltage, Vc is the open circuit voltage of one supercapacitor, Nsc is the total number of the banks, Rs is the series resistance of one supercapacitor. The actual total output power of the supercapacitor is represented as p Vct − Vct2 − 4Rst Preqsc /ηAD ηdc . (27) Psc = Vct · 2Rst IV. FLC BASED ON V ECTORIZED F UZZY I NFERENCE E NGINE In this work, the EMS is developed based on fuzzy logic control (FLC), which has the features of real-time, adaptive and intelligent. It allows different operators to merge nonlinearities and uncertainties in the best way and incorporate heuristic control in the form of if-then rules. The developed FLC in this section are composed of the if-then fuzzy rules, fuzzification, fuzzy inference engine and defuzzification modules. To speed up the optimization and take the advantage of the powerful matrix processing capability of MATLAB, a vectorized fuzzy inference system (VFIS) presented in Figure 3 is developed for the first time according to the state-ofthe-art literature. The developed VFIS is capable to handle Np × Ninp dimensional inputs with Np pages of membership functions each time. This means that Np fuzzy controllers (can be hundreds of thousands depends on the performance of the utilized CPU) can work at the same time with the same page number of inputs and outputs. The following paragraph will present the detail of fuzzy rules, membership functions, vectorized fuzzification, fuzzy inference engine, and defuzzification operations of the developed vectorized FLC. The concept of membership functions was introduced by Zadeh in the first paper on fuzzy sets [34]. A membership function is a curve or a function that defines how each point of the input variables is mapped to a membership value between 0 and 1. It is quite challenging to design the optimal MFs for each HESS manually according to the engineering experiences. Besides, considering that the performance of the FLCs are sensitive to their MFs, different MFs of the FLCs with the same fuzzy rules should be devised for different sizes of HESS. Based on these considerations, the parameters of the MFs are selected as parts of the parameters to be optimized in this work. The trapezoidal-shaped membership function is selected for the fuzzy inference engine based on the considerations that it has high flexibility, e.g., as shown in Figure 5, when a = b, the trapezoid MF will change its shape to triangle [12]. C. Vectorized Fuzzification During the fuzzification stage, the input variables are identified to the fuzzy sets (membership functions) they belong to and the respective degree of membership to each relevance will be assigned. For a FIS with trapezoidal shaped MFs and a number of Ninp inputs, the fuzzy sets of each can be described with a matrix S k = [ak , bk , ck , dk ] ∈ RNp ×Nti,k ×4 . Np is the total page number of the inputs; Nti,k is the number of fuzzy linguistic sets of state input k, k ∈ {1, 2, ..., Ninp } and a, b, c, d are the variables that define one trapezoid in Figure 5. The input matrix is denoted as xk ∈ RNp , for Xk , its membership matrix µk ∈ RNp ×Nti,k can be denoted as:  Xk − ak    µk (ak ≤ Xk < bk ) = b − a  k k  µk (bk ≤ Xk ≤ ck ) = I (28)    d − X k   µk (ck < Xk ≤ dk ) = k d k − ck where ak , bk , ck , dk , I belong to RNp ×Nti,k , and Xk is denoted as: Xk = [xk , xk , ..., xk ] ∈ RNp ×Nti,k | {z } (29) Nti,k A. Fuzzy rules Fuzzy rules are a set of if-then linguistic rules used to formulate the conditional relationships that comprise a fuzzy logic controller, for instance, a fuzzy rule can be: if SOC is Small and SOE is Big and Preq is Positive big then Psc is Positive big. It is reasonable to devise the same if-then rules for the control of different sizes of HESSs since the control objectives of all the HESSs are the same in this work. The developed fuzzy rules are demonstrated as Figure 4, where the labels N, P, S, M, B means negative, positive, small, medium The membership array U for input X can be constructed as: U = {µ1 , ..., µk , ..., µNinp } ∈ RNp ×Nti,k ×Ninp (30) D. Vectorized Fuzzy Inference Engine Fuzzy inference is the way of mapping an input space to an output space using fuzzy logic. A FIS tries to formalize the reasoning process of human language by means of fuzzy logic (the built fuzzy If-Then rules). The process of fuzzy inference involves all of the MFs, If-Then rules, linguistic variables of 6 Page 1 Page 2 Membership function optimization algorithm c(Nto,Np) d(Nto,Np) Page Ns b(1,Np,1) c(1,Np,1) b(2,Np,1) c(2,Np,1) b(Nti,k,Np,1) c(Nti,k,Np,1) d(Nti,k,Np,2) a(Nti,k,Np,2) …… …… x d(1,Np,Ninp) a(2,Np,Ninp) d(2,Np,Ninp) a(Nti,k,Np,Ninp) Np×Ninp (Np,Ninp) Inputs UoNto×Np (1, Np) …… a(1,Np,Ninp) …… b(1,Np) b(1,Np,Ninp)c(1,Np,Ninp)b(2,Np,Ninp)c(2,Np,Ninp) b(Nti,k,Np,Ninp) c(Nti,k,Np,Ninp) xNp×Ninp(Np,Ninp) d(1,Np) a(2,Np) d(2,Np) Output fuzzy set of page Np d(1,Np,1) a(2,Np,2) d(2,Np,2) xNp×Ninp(Np,2) d(Nti,k,Np,Ninp) Input fuzzy sets of page Np Fuzzification Fuzzy Rules xNp×Ninp(Np) a(1,Np) a(1,Np,1) c(2,Np) c(Nti,k,Np,2) …… b(2,Np) b((1,Np,1) c(1,Np,1) b(2,Np,2) c(2,Np,2) b(Nti,k,Np,2) xNp×Ninp(Np,2) b(Nto,Np) d(Nti,k,Np,1) c(1,Np) a(Nti,k,Np,1) xNp×Ninp(Np,1) UoNto×Np (2, Np) UoNto×Np (Nto, Np ) a(1,Np,1) d(1,Np,1) a(2,Np,1) d(2,Np,1) Fuzzy Inference Engine xNp×Ninp(Np,1) a(Nto,Np) …… Defuzzification Outputs Fig. 3. Framework of the vectorized FLC a=b c d a=b=c d PB PM PS NS NM NB B B Change a,b,c,d M M S S a b c a b d c=d Trapezoidal MF NB NM NS PS PM PB a b=c d Fig. 4. Fuzzy rules for the EMS of the HESS the inputs and outputs. Mamdani’s fuzzy inference method is the most commonly seen fuzzy methodology. The search-able fuzzy inference engine is able to map only one page of the inputs to one page of the outputs. This section will give an elaborate description of the developed powerful VFIS which allows a large number of FLCs operating in parallel based on Mamdani’s fuzzy inference method. The linguistic variables are programmed with their integer indexes from the smallest to the biggest in turn in this work. For instance, the fuzzy sets {NB, NM, NS, PS, PM, PB} of the third input in Figure 4 are correspondingly mapped to {1, 2, ..., Nti,k }, here Nti,k = 6, k = 3. The fuzzy rule matrix < ∈ RNr ×(Ninp +No ) is constructed with the mapped integer a b=c=d Fig. 5. Flexible trapezoidal-shaped membership function indexes, Nr is the number of fuzzy rules and No is the number of outputs. For instance: Rule : xSOC <(Nr ) : 1 xSOE 3 Preq 6 Psc 6 (31) where <(Nr ) denotes the fuzzy rule Nr , it means the rule like: if SOC is Small and SOE is Big and Preq is Positive big 7 then Psc is Positive big. The working scheme of the VFIS is illustrated as follows: 1) Repeatedly copy the membership matrix µk into Nr blocks, and we can obtain: µtemp = [µk ; µk ; ...; µk ], µtemp ∈ RNp ×Nti,k ×Nr k k | {z } Lin 2 2 .. . ··· ... .. . Nti,k Nti,k .. . 1 2 ··· Nti,k       ,···   1 1 .. . 2 2 .. . ··· ... .. . Nti,k Nti,k .. . 1 2 ··· Nti,k {z Np         N    r     } (33) 3) Repeatedly copy the kth column of the rule matrix < ∈ RNr ×(Ninp +No ) into Np × Nti,k block arrangement <temp ∈ RNp ×Nti,k ×Nr , k ∈ {1, 2, . . . , Ninp }:   <k , <k , . . . , <k     <k , <k , . . . , <k    <temp =  . Np (34)  . . .., ..   .., ...,    <k , <k , . . . , <k | {z } Nti,k 4) Get the effective membership matrix µeff,k for input k ∈ {1, 2, . . . , Ninp }: µeff,k = µk (Lin == <temp ), µeff,k ∈ RNp ×Nti,k ×Nr Ueff,o = Uo,temp (Lo == <otemp ), Ueff,o ∈ RNp ×Nr ×Nto (41) 11) Merge the membership matrix of the output fuzzy sets in all the fuzzy rules Uo,final = E. Vectorized Defuzzification The purpose of defuzzification process is to produce a quantifiable result in crisp logic based on the given fuzzy sets and corresponding membership degrees. The defuzzification process based on center of gravity method is demonstrated as Figure 6. UoNto×Np (1, Np) a(1,Np) b(1,Np) k=1 2 2 .. . ··· ... .. . Nto Nto .. . 1 2 ··· Nto      ,···   {z Np 1 1 .. . 2 2 .. . ··· ... .. . Nto Nto .. . 1 2 ··· Nto         Nr        } (38) 8) Repeatedly copy the column of output fuzzy sets in the rule matrix < ∈ RNr ×(Ninp +No ) into a Np × Nto block arrangement <otemp ∈ RNp ×Nr ×Nto , Nto is the number of fuzzy linguistic sets of output :   <No , <No , . . . , <No    <No , <No , . . . , <No     <otemp =  . Np (39)  . . .., ..   .., ...,    <No , <No , . . . , <No | {z } Nto c(1,Np) b(2,Np) c(2,Np) d(1,Np) c(1,Np) a(2,Np) b(Nto,Np) b(2,Np) d(2,Np) a(Nto,Np) c(2,Np) b(Nto,Np) Np) c(Nto,Np) d(Nto,Np) c(Nto,Np) …… a(1,Np) b(1,Np) 7) Create index matrix Lo ∈ RNp ×Nr ×Nto for output the fuzzy sets: 1 1 .. . UoNto×Np (2, …… 6) Get the mapped membership matrix Uo for the output fuzzy sets: Ninp Uo = ∩ Uin (k), Uo ∈ RNp ×Nr (37) b(1,Np) …… Ninp  (42) By the above calculation, the membership of each trapezoid of the output fuzzy set is obtained as Uo,final , and the next step is the defuzzification. Uin = { ∪ µeff,k (j), ∪ µeff,k (j), ..., ∪ µeff,k (j)} (36) j=1 j=1 j=1 | {z }       Lo =       | Uo,eff (i), Uo,final ∈ RNp ×Nto i=1 Nti,k Nti,k Nr [ (35) 5) Combine and get the final membership matrix Uin ∈ RNp ×Nr ×Ninp for all the input X: Nti,k Nto 10) Get the effective membership matrix Ueff,o of all the output fuzzy sets: 2) Create index matrix Lin ∈ RNp ×Nti,k ×Nr for input k: 1 1 .. . Uo,temp = {Uo , Uo , ..., Uo }, Uo,temp ∈ RNp ×Nr ×Nto (40) | {z } (32) Nr       =      | 9) Repeatedly copy the membership matrix of the output fuzzy sets Uo ∈ RNp ×Nr into Nto blocks Uo,temp : d(1,Np) c(1,Np) a(2,Np) b(2,Np) d(2,Np) a(Nto,Np) c(2,Np) b(Nto,Np) d(Nto,Np) c(Nto,Np) …… UoNto×Np (Nto, Np ) a(1,Np) d(1,Np) a(2,Np) d(2,Np) a(Nto,Np) d(Nto,Np) Output fuzzy set of page Np ∑ Fig. 6. Defuzzification process based on center of gravity method The procedure of the vectorized defuzzification is elaborated as followings: 1) Discrete the output fuzzy sets into Ndis parts xo ∈ RNdis from its minimum value xo,min to the maximum one xo,max , xo = [xo,min : (xo,max − xo,min )/(Ndis − 1) : xo,max ] (43) 8 where the value of Ndis affects the accuracy of the crisp output, for instance, the increasing of Ndis will improve the precision but will increase the computational burden. 2) Repeatedly copy xo ∈ RNdis and output fuzzy set S o = [ao , bo , co , do ] ∈ RNto ×Np ×4 , we can obtain xo,temp ∈ RNto ×Np ×Ndis and S o,temp ∈ RNto ×Np ×Ndis respectively:   xo , xo , . . . , xo     xo , xo , . . . , xo    xo,temp =  . Np (44)  .. .  .., ., . . . , ..     xo , xo , . . . , xo | {z } vector is p = {Nsc , xmf }. As demonstrated in Figure 7, there are 28 parameters of the devised membership functions plus one design parameter of the HESS in one page of parameters to be optimized. The design vector p is constrained by defining pmin and pmax . 1 S M B 0.5 0 0 100 1 S Nto M B 0.5 S o,temp = [S o , S o , ..., S o ] | {z } (45) 0 Ndis 0 3) Calculate the membership matrix of xo,temp based on the output fuzzy set S o,temp = [ao,temp , bo,temp , co,temp , do,temp ] ∈ RNto ×Np ×Ndis ×4 :  xo,temp − ao,temp   µo (ao,temp ≤ xo,temp < bo,temp ) =  bo,temp − ao,temp   µo,temp (bo,temp ≤ xo,temp ≤ co,temp ) = I    d − xo,temp   µo (co,temp < xo,temp ≤ do,temp ) = o,temp do,temp − co,temp (46) 4) Repeatedly copy the membership matrix Uo,f inal in to Ndis blocks Uo,temp ∈ RNto ×Np ×Ndis : Uo,temp = [Uo,f inal , Uo,f inal , ..., Uo,f inal ] | {z } (47) Ndis 5) Find the effective membership matrix: \ Ueff,o = Uo,temp µo , Ueff,o ∈ RNto ×Np ×Ndis (48) 6) Merge the membership matrix obtained in last step: Nr [ Uo,x = Ueff,o (i), Uo,x ∈ RNp ×Ndis (49) i=1 7) Calculate the crisp output matrix for all the input matrices: NP dis y= xo (i) ◦ Uo,x (xo (i)) i=1 NP dis , y ∈ RNp (50) Uo,x (xo (i)) i=1 In order to design the fuzzy rules and membership functions conveniently, the devised vectorized FLC modules illustrated above are developed in MATLAB with standard and user friendly interfaces. V. S IMULATION PARAMETERS AND S ETTINGS The state variables includes the battery state of charge xSOC and state of energy of the supercapacitor xSOE , x = [xSOC , xSOE ]. The control variable output by the FLC in this work is the requested power from the supercapacitor u = Preqsc , the demand power from the battery can be calculated by Preqbat = Pdem − Preqsc . The design parameter 100 1 0.5 0 -200 200 1 0.5 0 -200 Fig. 7. The design parameters of the MFs for the EMS The operating profile of an electric race car is of great difference with the one of conventional electric vehicle running on a city road. Thus, standard driving cycles are not suitable for the research on electric race car. The real driving cycle of a race car in Nurburgring circuit is chosen as the test scenario. The demand driving/braking power is calculated by Equation (51). The corresponding velocity profile, acceleration profile and demand power are demonstrated as Figure 8. 1 Pdem = ( ρCd Av 2 + f mv g + mv a)v 2 (51) The detail simulation parameters of the race car, 53 Ah high energy lithium-ion battery, 2.85V/3400F high performance supercapacitor and the converters are illustrated in Table I. In the FLC based EMS, the SOE and current of the supercapacitor are constrained between 0.1 and 0.99, -2000 A and 2000A respectively. While the SOC of the lithiumion battery is constrained between 0.2 and 0.9, the current is regulated by adjusting the requested power from the battery. When the lithium-ion battery is exhausted, the simulation of one iteration will be terminated and the objective functions will be correspondingly evaluated. The temperature is for sure very important in any kind of vehicle equipped with batteries since it can affect the performance of the batteries directly. However, it is very difficult to model the heat generation, dispassion and the thermal control system of the energy storage system on an 9 300 200 100 0 10 0 20 40 60 80 100 120 0 20 40 60 80 100 120 0 20 40 60 80 100 120 0 -10 -20 200 0 -200 -400 Fig. 8. Power demand in Nurburgring circuit TABLE I PARAMETER VALUES OF THE SIMULATION Parameters Vehicle mass (kg) Aerodynamics coefficient (h2 N/km2 ) Rolling resistance coefficient Mass of the battery cell (kg) Voltage constant of the battery cell (V ) Total capacity of the battery cell(Ah) Polarization resistance of the battery cell (Ω) Internal resistance of the battery cell (Ω) Voltage amplitude of the battery cell (V ) Time constant inverse of the battery cell (Ah−1 ) Fitting parameter of pre-exponential factor Fitting parameter of pre-exponential factor Fitting parameter of pre-exponential factor Fitting parameter of activation energy Fitting parameter of activation energy Mass of the supercapacitor bank (kg) Supercapacitor bank capacity(F ) Supercapacitor equivalent series resistance (Ω) DC/DC converter efficiency DC/AC converter efficiency Symbol mv ρCd A f mcell E0 Qmax K R A B a b c d e mbank Cbank Rs ηdc ηAD From the sizing point of view, using different number of supercapacitors means different compromises between high power density and high energy density. As it is demonstrated in Figure 9, utilizing more supercapacitors can assist to reduce the average current of the Lithium-ion battery which is beneficial for longer cycle life of the battery, but cut down the energy density of the HESS which results in shorter driving mileage. When less supercapacitors are used, the results will be opposite. It is also observed from Figure 9 that HESS with the same design solutions (makers filled with the same color) may achieve different values of both objective functions, which means that for the same HESS with uniform fuzzy rules, the parameters of the membership functions will determine whether we can achieve the Pareto optimal solutions. Thanks to the proposed Bi-level optimal sizing and control framework, the corresponding sizing parameter Nsc of each HESS and the membership function parameters xmf of the related EMS are coupled and obtained at the same time for all the solutions including those on the Pareto frontier. Value 570 0.075 0.016 1.15 3.43 55 8.85×10−5 1.33×10−3 0.761 0.040 1.345 0.2563 9.179 46868 -470.3 0.52 3400 2.2×10−4 0.95 0.96 Fig. 9. Multi-objective sizing and control solutions when mHESS = 320kg electric vehicle precisely. Actually, it is reasonable to assume that the temperature is controlled at a constant value (23 o C) by adjusting the thermal control system [1], [35]. In this work, a controlled elitist NSGA which is a variant of NSGA-II [36] is implemented to solve the multi-objective optimization problem. Instead of only choosing the top-ranking nondominated fronts, the controlled elitist GA also favors individuals that can assist to improve the diversity of the population even if their fitness values are relatively lower. VI. R ESULTS In this section, the results of the multi-objective optimal sizing and control of the HESS are presented and analyzed in detail. Figure 9 presented the achieved results when the total mass of the HESS is limited at 320 kg. The population size is set as 500 in the NSGA-II optimization algorithm, and the optimization is terminated after about 13 hours in a ThinkPad T470P laptop with Intel(R) Core(TM) i5-7300HQ CPU @2.50 GHz CPU and 16GB RAM, the number of total iterations is 1839. Moreover, this work has investigated the optimal sizing and control results of HESSs with different total mass. From Figure 10, we can drawn the following basic conclusions: 1) HESSs with smaller total mass will cover fewer number of available laps, but the available cycle life of the battery are longer due to their shorter operating mileage; 2) We can achieve a pretty decent compromised solution that can enhance both objective functions with only about 40 supercapacitor banks and the optimized membership functions. In order to analyze the reason of the exhibited advantages of the proposed Bi-level optimal sizing and control framework, one solution from the Pareto frontier in Figure 9 (Nsc = 32) is compared with the solution with same sizing parameter but the initial devised membership functions. Figure 11 demonstrates the initial and optimized membership functions with the dotted lines and solid lines respectively. The achieved available number of laps of the initial and optimized solutions are very similar which are respectively 17.88 and 17.98. This is mostly due to the fact that the two cases are implemented with the same HESS and the available 10 140 5800 120 6000 100 6200 80 6400 60 6600 40 supercapacitors very fast at a few seconds after starting the operation and the average SOE is under 20% during the simulation which is not capable to provide long-time high peak power to protect the battery. While EMS with the optimized membership functions tends to maintain the SOE of the supercapacitors above 50%, which helps to play the role of shaving the peak and filling the valley very well during the whole driving profile. For instance, the curves in the dotted box in Figure 12 (c) demonstrate that the requested power from the battery is less after optimizing the MFs since the SOE is maintained at a relatively high level due to the optimized EMS. 6800 20 19 18 17 16 15 14 13 12 11 10 200 150 100 Fig. 10. Pareto optimal solutions for HESS with different mass mHESS 50 1 0 M S B 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200 0.5 100 50 0 0 10 20 30 40 50 60 70 80 90 100 0 1 -50 S M B -100 0.5 -150 0 0 10 20 30 40 50 60 70 80 90 100 1 100 80 NB NM NS PS PM PB 60 0.5 40 0 -200 20 -150 -100 -50 0 50 100 150 200 0 1 NB NM NS PS PM PB 0.5 Fig. 12. Pareto optimal solutions for HESS with different sizes 0 -200 -150 -100 -50 0 50 100 150 200 VII. C ONCLUSIONS Fig. 11. The initial and optimized membership functions when Nsc = 32 mileage is mainly determined by the sizing parameters rather than the control parameters. However, the available cycle life of the battery are different which are respectively 6082 and 6463. This means that HESS with the optimized membership functions improved the battery cycle life by 6.3%. Figure 12 presents the interested variables between 0-200s, as it is illustrated in Figure 12 (a) and Figure 12 (b), the EMS with initial devised membership functions tends to request more high peak power from the battery and less from the supercapacitors which will accelerate the degradation of the battery. This phenomenon can be explained with the curve of SOE in Figure 12 (c). We can see that EMS with the initial devised membership functions tends to exhaust the More supercapacitors do not always guarantee a better overall performance especially when the total mass of the HESS is limited. However, we are able to obtain a pretty good balanced performance with less supercapatitors and the optimized EMS by the proposed optimization framework. The proposed Bi-level optimal sizing and control framework in this work makes it possible to obtain the global optimal solutions since it enables the optimization algorithm to search both the design and control parameters simultaneously. The user could choose the favored sizing solution from the obtained Pareto frontier packaged with the optimal membership functions based on a preferred compromise between the two objectives. The obtained global optimal sizing parameters and optimal parameters of the real-time controller on the Pareto frontier can be put into real-time implementations. In addition to the Bi-level optimal sizing and control framework, the devised 11 vectorized fuzzy logic controller with standard interfaces can be used in other kinds of real time feedback control problems, in particular, it can assist to dramatically improve the computational efficiency when need to optimize the parameters of fuzzy logic controller. R EFERENCES AND F OOTNOTES R EFERENCES [1] X. Hu, L. Johannesson, N. Murgovski, and B. Egardt, “Longevityconscious dimensioning and power management of the hybrid energy storage system in a fuel cell hybrid electric bus,” Applied Energy, vol. 137, pp. 913–924, 2015. [2] G. Suri and S. Onori, “A control-oriented cycle-life model for hybrid electric vehicle lithium-ion batteries,” Energy, vol. 96, pp. 644–653, 2016. [3] F. Sun, X. Hu, Y. Zou, and S. Li, “Adaptive unscented Kalman filtering for state of charge estimation of a lithium-ion battery for electric vehicles,” Energy, vol. 36, no. 5, pp. 3531–3540, 2011. [4] Y. Zou, X. Hu, H. Ma, and S. E. Li, “Combined state of charge and state of health estimation over lithium-ion battery cell cycle lifespan for electric vehicles,” Journal of Power Sources, vol. 273, no. Supplement C, pp. 793 – 803, 2015. [5] A. Burke, “Ultracapacitors: why, how, and where is the technology,” Journal of power sources, vol. 91, no. 1, pp. 37–50, 2000. [6] L. Zhang, X. Hu, Z. Wang, F. Sun, and D. G. Dorrell, “A review of supercapacitor modeling, estimation, and applications: A control/management perspective,” Renewable and Sustainable Energy Reviews, vol. 81, pp. 1868 – 1878, 2018. [7] S. M. Lukic, S. G. Wirasingha, F. Rodriguez, J. Cao, and A. Emadi, “Power management of an ultracapacitor/battery hybrid energy storage system in an hev,” in 2006 IEEE Vehicle Power and Propulsion Conference, Sept 2006, pp. 1–6. [8] J. Cao and A. Emadi, “A new battery/ultracapacitor hybrid energy storage system for electric, hybrid, and plug-in hybrid electric vehicles,” IEEE Transactions on power electronics, vol. 27, no. 1, pp. 122–132, 2012. [9] T. Ma, H. Yang, and L. Lu, “Development of hybrid batterysupercapacitor energy storage for remote area renewable energy systems,” Applied Energy, vol. 153, pp. 56–62, 2015. [10] O. Ahmed and J. Bleijs, “An overview of dcdc converter topologies for fuel cell-ultracapacitor hybrid distribution system,” Renewable and Sustainable Energy Reviews, vol. 42, no. Supplement C, pp. 609 – 626, 2015. [11] C. G. Hochgraf, J. K. Basco, T. P. Bohn, and I. Bloom, “Effect of ultracapacitor-modified PHEV protocol on performance degradation in lithium-ion cells,” Journal of Power Sources, vol. 246, pp. 965–969, 2014. [12] H. Yu, D. Tarsitano, X. Hu, and F. Cheli, “Real time energy management strategy for a fast charging electric urban bus powered by hybrid energy storage system,” Energy, vol. 112, pp. 322–331, 2016. [13] J. Shen, S. Dusmez, and A. Khaligh, “Optimization of sizing and battery cycle life in battery/ultracapacitor hybrid energy storage systems for electric vehicle applications,” IEEE Transactions on Industrial Informatics, vol. 10, no. 4, pp. 2112–2121, 2014. [14] Z. Song, J. Li, X. Han, L. Xu, L. Lu, M. Ouyang, and H. Hofmann, “Multi-objective optimization of a semi-active battery/supercapacitor energy storage system for electric vehicles,” Applied Energy, vol. 135, no. 0, pp. 212–224, 2014. [15] X. Hu, N. Murgovski, L. M. Johannesson, and B. Egardt, “Comparison of three electrochemical energy buffers applied to a hybrid bus powertrain with simultaneous optimal sizing and energy management,” IEEE Transactions on Intelligent Transportation Systems, vol. 15, no. 3, pp. 1193–1205, 2014. [16] S. F. Tie and C. W. Tan, “A review of energy sources and energy management system in electric vehicles,” Renewable and Sustainable Energy Reviews, vol. 20, pp. 82 – 102, 2013. [17] H. Yin, C. Zhao, M. Li, and C. Ma, “Utility Function-Based RealTime Control of A Battery Ultracapacitor Hybrid Energy System,” IEEE Transactions on Industrial Informatics, vol. 11, no. 1, pp. 220–231, 2015. [18] S. Dusmez and A. Khaligh, “A supervisory power splitting approach for a new ultracapacitor battery vehicle deploying two propulsion machines,” IEEE Transactions on Industrial Informatics, vol. 10, no. 3, pp. 1960–1971, 2014. [19] B. Hredzak, V. G. Agelidis, and G. Demetriades, “Application of explicit model predictive control to a hybrid battery-ultracapacitor power source,” Journal of Power Sources, vol. 277, pp. 84–94, 2015. [20] Q. Zhang, W. Deng, and G. Li, “Stochastic Control of Predictive Power Management for Battery/Supercapacitor Hybrid Energy Storage Systems of Electric Vehicles,” IEEE Transactions on Industrial Informatics, pp. 1–1, 2017. [21] K. Jia, Y. Chen, T. Bi, Y. Lin, D. Thomas, and M. Sumner, “HistoricalData-Based Energy Management in a Microgrid With a Hybrid Energy Storage System,” IEEE Transactions on Industrial Informatics, vol. 13, no. 5, pp. 2597–2605, 2017. [22] J. Shen and A. Khaligh, “Design and real-time controller implementation for a battery-ultracapacitor hybrid energy storage system,” IEEE Transactions on Industrial Informatics, vol. 12, no. 5, pp. 1910–1918, 2016. [23] H. Yu, F. Castelli-Dezza, and F. Cheli, “Optimal powertrain design and control of a 2-iwd electric race car,” in 2017 International Conference of Electrical and Electronic Technologies for Automotive, June 2017, pp. 1–7. [24] Y. Cao, R. C. Kroeze, and P. T. Krein, “Multi-timescale parametric electrical battery model for use in dynamic electric vehicle simulations,” IEEE Transactions on Transportation Electrification, vol. 2, no. 4, pp. 432–442, 2016. [25] S. J. Moura, F. B. Argomedo, R. Klein, A. Mirtabatabaei, and M. Krstic, “Battery state estimation for a single particle model with electrolyte dynamics,” IEEE Transactions on Control Systems Technology, vol. 25, no. 2, pp. 453–468, 2017. [26] H. Chaoui and C. C. Ibe-Ekeocha, “State of charge and state of health estimation for lithium batteries using recurrent neural networks,” IEEE Transactions on Vehicular Technology, vol. 66, no. 10, pp. 8773–8783, 2017. [27] O. Tremblay, “Experimental validation of a battery dynamic model for ev applications experimental validation of a battery dynamic model for ev applications,” in 24th International Battery, Hybrid and Fuel Cell Electric Vehicle Symposium and Exhibition 2009, EVS 24, vol. 2, 2009, pp. 930–939. [28] O. Tremblay, L.-a. Dessaint, and a. I. Dekkiche, “A Generic Battery Model for the Dynamic Simulation of Hybrid Electric Vehicles,” 2007 IEEE Vehicle Power and Propulsion Conference, no. V, pp. 284–289, 2007. [29] J. Wang, P. Liu, J. Hicks-Garner, E. Sherman, S. Soukiazian, M. Verbrugge, H. Tataria, J. Musser, and P. Finamore, “Cycle-life model for graphite-LiFePO4 cells,” Journal of Power Sources, vol. 196, no. 8, pp. 3942–3948, 2011. [30] A. Cordoba-Arenas, S. Onori, Y. Guezennec, and G. Rizzoni, “Capacity and power fade cycle-life model for plug-in hybrid electric vehicle lithium-ion battery cells containing blended spinel and layered-oxide positive electrodes,” Journal of Power Sources, vol. 278, pp. 473–483, 2015. [31] R. Deshpande, M. Verbrugge, Y.-T. Cheng, J. Wang, and P. Liu, “Battery Cycle Life Prediction with Coupled Chemical Degradation and Fatigue Mechanics,” Journal of the Electrochemical Society, vol. 159, no. 10, pp. A1730–A1738, aug 2012. [32] R. Wang, Y. Chen, D. Feng, X. Huang, and J. Wang, “Development and performance characterization of an electric ground vehicle with independently actuated in-wheel motors,” Journal of Power Sources, vol. 196, no. 8, pp. 3962–3971, 2011. [33] J. Shen, A. Hasanzadeh, and A. Khaligh, “Optimal power split and sizing of hybrid energy storage system for electric vehicles,” in 2014 IEEE Transportation Electrification Conference and Expo (ITEC), 2014, pp. 1–6. [34] L. Zadeh, “Fuzzy sets,” Information and Control, vol. 8, no. 3, pp. 338 – 353, 1965. [35] S. Ebbesen, P. Elbert, and L. Guzzella, “Battery state-of-health perceptive energy management for hybrid electric vehicles,” IEEE Transactions on Vehicular Technology, vol. 61, no. 7, pp. 2893–2900, Sept 2012. [36] K. Deb, “Multi-objective optimization using evolutionary algorithms: an introduction,” Multi-objective evolutionary optimisation for product design and manufacturing, pp. 1–24, 2011.
3cs.SY
1 A systematic process for evaluating structured perfect Bayesian equilibria in dynamic games with asymmetric information arXiv:1508.06269v3 [math.OC] 18 Mar 2018 Deepanshu Vasal, Abhinav Sinha and Achilleas Anastasopoulos Abstract We consider both finite-horizon and infinite-horizon versions of a dynamic game with N selfish players who observe their types privately and take actions that are publicly observed. Players’ types evolve as conditionally independent Markov processes, conditioned on their current actions. Their actions and types jointly determine their instantaneous rewards. In dynamic games with asymmetric information a widely used concept of equilibrium is perfect Bayesian equilibrium (PBE), which consists of a strategy and belief pair that simultaneously satisfy sequential rationality and belief consistency. In general, there does not exist a universal algorithm that decouples the interdependence of strategies and beliefs over time in calculating PBE. In this paper, for the finite-horizon game with independent types we develop a two-step backward-forward recursive algorithm that sequentially decomposes the problem (w.r.t. time) to obtain a subset of PBEs, which we refer to as structured Bayesian perfect equilibria (SPBE). In such equilibria, a player’s strategy depends on its history only through a common public belief and its current private type. The backward recursive part of this algorithm defines an equilibrium generating function. Each period in the backward recursion involves solving a fixed-point equation on the space of probability simplexes for every possible belief on types. Using this function, equilibrium strategies and beliefs are generated through a forward recursion. We then extend this methodology to the infinite-horizon model, where we propose a timeinvariant single-shot fixed-point equation, which in conjunction with a forward recursive step, generates the SPBE. Sufficient conditions for the existence of SPBE are provided. With our proposed method, we find equilibria that exhibit signaling behavior. This is illustrated with the help of a concrete public goods example. Index Terms Dynamic games, asymmetric information, perfect Bayesian equilibrium, sequential decomposition, dynamic programming, signaling. I. I NTRODUCTION Several practical applications involve dynamic interaction of strategic decision-makers with private and public observations. Such applications include repeated online advertisement auctions, wireless resource sharing, and energy markets. In repeated online advertisement auctions, advertisers place bids for locations on a website to sell a product. These bids are calculated based on the value of that product, which is privately observed by the advertiser and past actions of other advertisers, which are observed publicly. The authors are with the Department of Electrical Engineering and Computer Science, University of Michigan, Ann Arbor, MI, 48105 USA e-mail: {dvasal, absi, anastas}@umich.edu. This work is supported in part by NSF grants CIF-1111061 and ECCS-1608361. This paper has originally appeared on arXiv.org on August 26, 2015 as working paper 1508.06269 and revised on September 14, 2016 as 1609.04221. 2 Each advertiser’s goal is to maximize its reward, which for an auction depends on the actions taken by others. In wireless resource sharing, players are allocated channels that interfere with each other. Each player privately observes its channel gain and takes an action, which can be the choice of modulation or coding scheme and also the transmission power. The reward it receives depends on the rate the player gets, which is a function of each player’s channel gain and other players’ actions (through the signalto-interference ratio). Finally, in an energy market, different suppliers bid their estimated power outputs to an independent system operator (ISO) that formulates the market mechanism to determine the prices assessed to the different suppliers. Each supplier wants to maximize its return, which depends on its cost of production of energy, which is its private information, and the market-determined prices which depend on all the bids. Dynamical systems with strategic players are modeled as dynamic stochastic games, introduced by Shapley in [1]. Discrete-time dynamic games with Markovian structure have been studied extensively to model many practical applications, in engineering as well as economics literature [2, 3]. In dynamic games with perfect and symmetric information, subgame perfect equilibrium (SPE) is an appropriate equilibrium concept and there exists a backward recursive algorithm to find all the SPEs of these games (refer to [4, 5, 6] for a more elaborate discussion). Maskin and Tirole in [7] introduced the concept of Markov perfect equilibrium (MPE) for dynamic games with symmetric information, where equilibrium strategies are dependent on some payoff relevant Markovian state of the system, rather than on the entire history. This is a refinement of the SPE. Some prominent examples of the application of MPE include [8, 9, 10]. Ericson and Pakes in [8] model industry dynamics for firms’ entry, exit and investment participation, through a dynamic game with symmetric information, compute its MPE, and prove ergodicity of the equilibrium process. Bergemann and Välimäki in [9] study a learning process in a dynamic oligopoly with strategic sellers and a single buyer, allowing for price competition among sellers. They study MPE of the game and its convergence behavior. Acemoğlu and Robinson in [10] develop a theory of political transitions in a country by modeling it as a repeated game between the elites and the poor, and study its MPE. In dynamic games with asymmetric information, and more generally in multi-player, dynamic decision problems (cooperative or non-cooperative) with asymmetric information, there is a signaling phenomenon that can occur, where a player’s action reveals part of its private information to other players, which in turn affects their future payoff (see [11] for a survey of signaling models).1 In one of the first works demonstrating signaling, a two-stage dynamic game was considered by Spence [15], where a worker signals her abilities to a potential employer using the level of education as a signal. Since then, this phenomenon has been shown in many settings, e.g., warranty as a signal for better quality of a product, in [16], larger deductible or partial insurance as a signal for better health of a person, in [17, 18], and in evolutionary game theory, extra large antlers by a deer to signal fitness to a potential mate, in [19]. 1 There are however instances where even though actions reveal private information, at equilibrium the signaling effect is non-existent [12, 13] and [14, sec III.A]. Thus, MPE is an appropriate equilibrium concept for such games. In [12], authors extend the model of [8] where firms’ set-up costs and scrap values are random and their private information. However, these are assumed to be i.i.d. across time and thus the knowledge of this private information in any period does not affect the future reward. In[13],[14, sec III.A], authors discuss games with one-step delayed information pattern, where all players get access to players’ private information with delay one. In this case as well, signaling does not occur. 3 For dynamic games with asymmetric information, where players’ observations belong to different information sets, in order to calculate expected future rewards players need to form a belief on the observations of other players (where players need not have consistent beliefs). As a result, SPE or MPE, 2 are not appropriate equilibrium concepts for such settings. There are several notions of equilibrium for such games, such as perfect Bayesian equilibrium (PBE), sequential equilibrium, and trembling hand equilibrium [4, 5]. Each of these equilibrium notions consist of an assessment, i.e., a strategy and a belief profile for the entire time horizon. The equilibrium strategies are optimal given the equilibrium beliefs and the equilibrium beliefs are derived from the equilibrium strategy profile using Bayes’ rule (whenever possible), with some equilibrium concepts requiring further refinements. Thus there is a cyclical requirement of beliefs being consistent with strategies, which are in turn optimal given the beliefs, and finding such equilibria can be thought of as being equivalent to solving a fixed point equation in the space of strategy and belief profiles over the entire time horizon. Furthermore, these strategies and beliefs are functions of histories and thus their domain grows exponentially in time, which makes the problem computationally intractable. To date, there is no universal algorithm that provides simplification by decomposing the aforementioned fixed-point equation for calculating PBEs. Some practically motivated work in this category is the work in [20, 21, 22, 23]. Authors in [20, 21, 22] study the problem of social learning with sequentially-acting selfish players who act exactly once in the game and make a decision to adopt or reject a trend based on their estimate of the system state. Players observe a private signal about the system state and publicly observe actions of past players. The authors analyze PBE of the dynamic game and study the convergent behavior of the system under an equilibrium, where they show occurrence of herding. Devanur et al. in [23] study PBE of a repeated sales game where a single buyer has a valuation of a good, which is its private information, and a seller offers to sell a fresh copy of that good in every period through a posted price. A. Contributions In this paper, we present a sequential decomposition methodology for calculating a subset of all PBEs for finite and infinite horizon dynamic games with asymmetric information. Our model, consists of strategic players having types that evolve as conditionally independent Markov controlled processes. Players observe their types privately and actions taken by all players are observed publicly. Instantaneous reward for each player depends on everyone’s types and actions. The proposed methodology provides a decomposition of the interdependence between beliefs and strategies in PBE and enables a systematic evaluation of a subset of PBE, namely structured perfect Bayesian equilibria (SPBE). Furthermore, we show that all SPBE can be computed using this methodology. Here SPBE are defined as equilibria with players strategies based on their current private type and a set of beliefs on each player’s current private type, which is common to all the players and whose domain is time-invariant. The beliefs on players’ types are such that they can be updated individually for each player and sequentially w.r.t. time. The model allows for signaling amongst players as beliefs depend on strategies. 2 SPE and MPE are used for games where beliefs in the game are strategy-independent and consistent among players. Equivalently, these beliefs are derived from basic parameters of the problems and are not part of the definition of the equilibrium concept. 4 Our motivation for considering SPBE stems from ideas in decentralized team problems and specifically the works of Ho [24] and Nayyar et al. [25]. We utilize the agent-by-agent approach in [24] to motivate a Markovian structure where players’ strategies depend only on their current types. In addition, we utilize the common information based approach introduced in [25] to summarize the common information into a common belief on players’ private types. Even though these ideas motivate the special structure of our equilibrium strategies, they can not be applied in games to evaluate SPBE because they have been developed for dynamic teams and are incompatible with equilibrium notions. Our main contribution is a new construction based on which SPBE can be systematically evaluated. Specifically, for the finite horizon model, we provide a two-step algorithm involving a backward recursion followed by a forward recursion. The algorithm works as follows. In the backward recursion, for every time period, the algorithm finds an equilibrium generating function defined for all possible common beliefs at that time. This involves solving an one-step fixed point equation on the space of probability simplexes. Then, the equilibrium strategies and beliefs are obtained through a forward recursion using the equilibrium generating function obtained in the backward step and the Bayes update rule. The SPBE that are developed in this paper are analogous to MPEs (for games with symmetric information) in the sense that players choose their actions based on beliefs that depend on common information, and private types, both of which have Markovian dynamics. For the infinite horizon model, instead of the backwards recursion step, the algorithm solves a single-shot time invariant fixed-point equation involving both an equilibrium generating function and an equilibrium reward-to-go function. We show that using our method, existence of SPBE in the asymmetric information dynamic game is guaranteed if the aforementioned fixed-point equation admits a solution. We provide sufficient conditions under which this is true. We demonstrate our methodology of finding SPBE through a multi-stage public goods game, whereby we observe the aforementioned signaling effect at equilibrium. B. Relevant Literature Related literature on this topic include [14, 26] and [27]. Nayyar et al. in [14, 26] consider dynamic games with asymmetric information. There is an underlying controlled Markov process and players jointly observe part of the process and whilst making additional private observations. It is shown that the considered game with asymmetric information, under certain assumptions, can be transformed to another game with symmetric information. A backward recursive algorithm is provided to find MPE of the transformed game. For this strong equivalence to hold, authors in [14, 26] make a critical assumption in their model: based on the common information, a player’s posterior beliefs about the system state and about other players’ information are independent of the past strategies used by the players. This leads to all strategies being non-signaling. Our model is different from this since we assume that the underlying state of the system has independent components, each constituting a player’s private type. However, we do not make any assumption regarding update of beliefs and allow the belief state to depend on players’ past strategies, which in turn allows the possibility of signaling in the game. Ouyang et al. in [27] consider a dynamic oligopoly game with strategic sellers and buyers. Each seller privately observes the valuation of their good, which is assumed to have independent Markovian dynamics, 5 thus resulting in a dynamic game of asymmetric information. The common belief is strategy dependent and the authors consider equilibria based on this common information belief. It is shown that if all other players play actions based on the common belief and their private information using equilibrium strategies, and if all players use equilibrium belief update function, then player i faces a Markov decision process (MDP) with respect to its action with state being the common belief and its private type. Thus calculating equilibrium boils down to solving a fixed-point equation on belief update functions and strategies of all players. Existence of such equilibrium is shown for a degenerate case where players act myopically at equilibrium and the equilibrium itself is non-signaling. Other than the common information based approach, Li et al. [28] consider a finite horizon zero-sum dynamic game, where at each time only one player out of the two knows the state of the system. The value of the game is calculated by formulating an appropriate linear program. Cole et al. [29] consider an infinite horizon discounted reward dynamic game where actions are only privately observable. They provide a fixed-point equation for calculating a subset of sequential equilibrium, which is referred to as Markov private equilibrium (MPrE). In MPrE strategies depend on history only through the latest private observation. C. Notation We use uppercase letters for random variables and lowercase for their realizations. For any variable, subscripts represent time indices and superscripts represent player indices. We use notation −i to represent all players other than player i i.e. −i = {1, 2, . . . i − 1, i + 1, . . . , N }. We use notation At:t0 to represent the vector (At , At+1 , . . . At0 ) when t0 ≥ t or an empty vector if t0 < t. We use i+1 . . . , AN At−i to mean (A1t , A2t , . . . , Ai−1 t , At t ) . We remove superscripts or subscripts if we want to represent the whole vector, for example At represents (A1t , . . . , AN t ). In a similar vein, for any collection i i of sets (X )i∈N , we denote ×i∈N X by X . We denote the indicator function of a set A by IA (·). For any finite set S, ∆(S) represents the space of probability measures on S and |S| represents its cardinality. We denote by Pg (or Eg ) the probability measure generated by (or expectation with respect to) strategy profile g. We denote the set of real numbers by R. For a probabilistic strategy profile of players (βti )i∈N where the probability of action ait conditioned on a1:t−1 , xi1:t is given by βti (ait |a1:t−1 , xi1:t ), Q j j j −i we use the notation βt−i (a−i t |a1:t−1 , x1:t ) to represent j6=i βt (at |a1:t−1 , x1:t ). All equalities/inequalities involving random variables are to be interpreted in the a.s. sense. For mappings with range function sets f : A → (B → C) we use square brackets f [a] ∈ B → C to denote the image of a ∈ A through f and parentheses f [a](b) ∈ C to denote the image of b ∈ B through f [a]. A controlled Markov process with state Xt , action At , and horizon T is denoted by (Xt , At )t∈T . The paper is organized as follows. In Section II, we present the model for games with finite and infinite horizon. Section III serves as motivation for focusing on SPBE. In Section IV, for finite-horizon games, we present a two-step backward-forward recursive algorithm to construct a strategy profile and a sequence of beliefs, and show that it is a PBE of the dynamic game considered. In Section V, we extend that methodology to infinite-horizon games. Section VII discusses concrete example of a public goods game with two players and results are presented for both, finite and infinite horizon versions of the example. All proofs are provided in appendices. 6 II. M ODEL AND P RELIMINARIES 4 We consider a discrete-time dynamical system with N strategic players in the set N = {1, 2, . . . N }. We 4 consider two cases: finite horizon T = {1, 2, . . . T } with perfect recall and infinite horizon with perfect 4 recall. The system state is Xt = (Xt1 , Xt2 , . . . XtN ), where Xti ∈ X i is the type of player i at time t, which is perfectly observed and is its private information. Players’ types evolve as conditionally independent, controlled Markov processes such that P(x1 ) = N Y Qi1 (xi1 ) (1a) i=1 P(xt |x1:t−1 , a1:t−1 ) = P(xt |xt−1 , at−1 ) = N Y Qit (xit |xit−1 , at−1 ), (1b) (1c) i=1 where Qit are known kernels. Player i at time t takes action ait ∈ Ai on observing the actions a1:t−1 =  (ak )k=1,...,t−1 where ak = ajk j∈N , which is common information among players, and the types xi1:t , which it observes privately. The sets Ai , X i are assumed to be finite. Let g i = (gti )t∈T be a probabilistic strategy of player i where gti : At−1 × (X i )t → ∆(Ai ) such that player i plays action Ait according to 4 Ait ∼ gti (·|a1:t−1 , xi1:t ). Let g = (g i )i∈N be a strategy profile of all players. At the end of interval t, player i receives an instantaneous reward Rti (xt , at ). To preserve the information structure of the problem, we assume that players do not observe their rewards until the end of game.3 The reward functions and state transition kernels are common knowledge among the players. For the finite-horizon problem, the objective of player i is to maximize its total expected reward ( T ) X 4 Rti (Xt , At ) . (2) J i,g = Eg t=1 For the infinite-horizon case, the transition kernels Qit are considered to not depend on time t. We also substitute Rti (Xt , At ) = δ t Ri (Xt , At ) take limT →∞ in the above equation, where δ ∈ [0, 1) is the common discount factor and Ri is the time invariant stage reward function for player i. With all players being strategic, this problem is modeled as a dynamic game, DT for finite horizon and D∞ for infinite horizon, with asymmetric information and simultaneous moves. A. Preliminaries Any history of this game at which players take action is of the form ht = (a1:t−1 , x1:t ). Let Ht be 4 the set of such histories, HT = ∪Tt=0 Ht be the set of all possible such histories in finite horizon and 4 i i H∞ = ∪∞ t=0 Ht for infinite horizon. At any time t player i observes ht = (a1:t−1 , x1:t ) and all players together have hct = a1:t−1 as common history. Let Hti be the set of observed histories of player i at time t and Htc be the set of common histories at time t. An appropriate concept of equilibrium for such games is PBE [5], which consists of a pair (β ∗ , µ∗ ) of strategy profile β ∗ = (βt∗,i )t∈T ,i∈N where βt∗,i : Hti → ∆(Ai ) Alternatively, we could have assumed instantaneous reward of a player to depend only on its own type, i.e. be of the form Rti (xit , at ), and have allowed rewards to be observed by the players during the game as this would not alter the information structure of the game 3 7 and a belief profile µ∗ = (i µ∗t )t∈T ,i∈N where i µ∗t : Hti → ∆(Ht ) that satisfy sequential rationality so that ∀i ∈ N , t ∈ T , hit ∈ Hti , β i ∗,i i Wti,β ,T (hit ) ≥ Wti,β ,T (hit ) (3) where the reward-to-go is defined as i,β i ,T Wt β i β ∗,−i , i µ∗t [hit ] (hit ) , E ( T X ) Rni (Xn , An ) hit , (4) n=t and the beliefs satisfy some consistency conditions as described in [5, p. 331]. Similarly, for the game D∞ PBE (β ∗ , µ∗ ) requires: ∀i ∈ N , t ≥ 1, hit ∈ Hti , β i ∗,i i Wti,β (hit ) ≥ Wti,β (hit ) (5) where the reward-to-go is i,β i Wt i ∗,−i , i µ∗ [hi ] t t (hit ) , Eβ β (∞ X ) Rni (Xn , An ) hit . (6) n=t In general, a belief for player i at time t, i µ∗t is defined on history ht = (a1:t−1 , x1:t ) given its private history hit = (a1:t−1 , xi1:t ). Here player i’s private history hit = (a1:t−1 , xi1:t ) consists of a public part hct = a1:t−1 and a private part xi1:t . At any time t, the relevant uncertainty player i has is about other players’ types t j x−i 1:t ∈ ×n=1 (×j6=i X ) and their future actions. In our setting, due to independence of types, and given the common history hct , player i’s type history xi1:t does not provide any additional information about x−i 1:t , as will be shown later. For this reason we consider beliefs that are functions of each player’s history hit only through the common history hct . Hence, for each player i, its belief for each history hct = a1:t−1 is derived from a common belief µ∗t [a1:t−1 ]. Furthermore, as will be shown later, this belief factorizes into a Q ∗ ∗ product of marginals j∈N µ∗,j t [a1:t−1 ]. Thus we can sufficiently use the system of beliefs, µ = (µt )t∈T , ∗,i −i c i where µ∗t = (µ∗,i t )i∈N , and µt : Ht → ∆(X ), with the understanding that player i’s belief on xt is Q ∗,j j µt∗,−i [a1:t−1 ](x−i t ) = j6=i µt [a1:t−1 ](xt ). Under the above structure, all consistency conditions that are required for PBEs [5, p. 331] are automatically satisfied. III. M OTIVATION FOR STRUCTURED EQUILIBRIA In this section, we present structural results for the considered dynamical process that serve as a motivation for finding SPBE of the underlying game DT . Specifically, we define a belief state based on common information history and show that any reward profile that can be obtained through a general strategy profile can also be obtained through strategies that depend on this belief state and players’ current types, which are their private information. These structural results are inspired by the analysis of decentralized team problems, which serve as guiding principles to design our equilibrium strategies. While these structural results provide intuition and the required notation, they are not directly used in the proofs for finding SPBE later in Section IV. At any time t, player i has information (a1:t−1 , xi1:t ) where a1:t−1 is the common information among players, and xi1:t is the private information of player i. Since (a1:t−1 , xi1:t ) increases with time, any strategy of the form Ait ∼ gti (·|a1:t−1 , xi1:t ) becomes unwieldy. Thus it is desirable to have an information state in 8 a time-invariant space that succinctly summarizes (a1:t−1 , xi1:t ), and that can be sequentially updated. We first show in Lemma 1 that given the common information a1:t−1 and its current type xit , player i can discard its type history xi1:t−1 and play a strategy of the form Ait ∼ sit (·|a1:t−1 , xit ). Then in Lemma 2, we show that a1:t−1 can be summarized through a belief πt , defined as follows. For any strategy profile 4 g, belief πt on Xt , πt ∈ ∆(X ), is defined as πt (xt ) = Pg (Xt = xt |a1:t−1 ), ∀xt ∈ X . We also define the 4 marginals πti (xit ) = Pg (Xti = xit |a1:t−1 ), ∀xit ∈ X i . For player i, we use the notation g to denote a general policy of the form Ait ∼ gti (·|a1:t−1 , xi1:t ), notation s, where sit : At−1 × X i → ∆(Ai ), to denote a policy of the form Ait ∼ sit (·|a1:t−1 , xit ), and notation m, where mit : ∆(×i∈N X i ) × X i → ∆(Ai ), to denote a policy of the form Ait ∼ mit (·|πt , xit ). It should be noted that since πt is a function of random variables a1:t−1 , m policy is a special type of s policy, which in turn is a special type of g policy. Using the agent-by-agent approach [24], we show in Lemma 1 that any expected reward profile of the players that can be achieved by any general strategy profile g can also be achieved by a strategy profile s. Lemma 1: Given a fixed strategy g −i of all players other than player i and for any strategy g i of player i, there exists a strategy si of player i such that ∀t ∈ T , xt ∈ X , at ∈ A, i −i i −i Ps g (xt , at ) = Pg g (xt , at ) i −i (7) i −i which implies J i,s g = J i,g g . Proof: Please see Appendix A. Since any si policy is also a g i type policy, the above lemma can be iterated over all players which implies that for any g policy profile there exists an s policy profile that achieves the same reward profile i.e., (J i,s )i∈N = (J i,g )i∈N . Policies of types s still have increasing domain due to increasing common information a1:t−1 . In order to summarize this information, we take an equivalent view of the system dynamics through a common agent, as taken in [30]. The common agent approach is a general approach that has been used extensively in dynamic team problems [31, 32, 33, 34]. Using this approach, the problem can be equivalently described as follows: player i at time t observes a1:t−1 and takes action γti , where γti : X i → ∆(Ai ) is a partial (stochastic) function from its private information xit to ait , of the form Ait ∼ γti (·|xit ). These actions are generated through some policy ψ i = (ψti )t∈T , ψti : At−1 → {X i → ∆(Ai )}, that operates on the common information a1:t−1 such that γti = ψti [a1:t−1 ]. Then any policy of the form Ait ∼ sit (·|a1:t−1 , xit ) is equivalent to Ait ∼ ψti [a1:t−1 ](·|xit ). We call a player i’s policy through common agent to be of type ψ i if its actions γti are taken as γti = ψti [a1:t−1 ]. We call a player i’s policy through common agent to be of type θi where θti : ∆(X ) → {X i → ∆(Ai )}, if its actions γti are taken as γti = θti [πt ]. A policy of type θi is also a policy of type ψ i . There is a one-to-one correspondence between policies of type si and of type ψ i and between policies of type mi and of type θi . In summary, the notation for the various functional form of strategies is Ait ∼ sit (·|a1:t−1 , xit ) Ait ∼ ψti [a1:t−1 ](·|xit ), (8a) Ait ∼ mit (·|πt , xit ) Ait ∼ θti [πt ](·|xit ). (8b) 9 In the following lemma, we show that the space of profiles of type s is outcome-equivalent to the space of profiles of type m. Lemma 2: For any given strategy profile s of all players, there exists a strategy profile m such that Pm (xt , at ) = Ps (xt , at ) ∀t ∈ T , xt ∈ X , at ∈ A, (9) which implies (J i,m )i∈N = (J i,s )i∈N . Proof: Please see Appendix B. The above two lemmas show that any reward profile that can be generated through a policy profile of type g can also be generated through a policy profile of type m. This is precisely the motivation for using SPBE which are equilibria based on policies of type m. It should be noted that the construction of si depends only on g i (as shown in (37)), while the construction of mi depends on the whole policy profile g and not just on g i , since the construction of θi depends on ψ in (49). Thus any unilateral deviation of player i in g policy profile does not necessarily translate to unilateral deviation of player i in the corresponding m policy profile. Therefore g being an equilibrium of the game (in some appropriate notion) does not necessitate the corresponding m also being an equilibrium. Thus the set of equilibria of type g contains those of type m but not vice-versa (in general); characterizing the relationship between the two sets of equilibria is an interesting open problem. We end this section by noting that although finding general PBEs of type g of the games DT or D∞ would be a desirable goal, since the space of strategies is growing exponentially with time, it would be computationally intractable. However, Lemmas 1 and 2 suggest that strategies of type m form a rich class that achieves every possible reward profile. Since these strategies are functions of beliefs πt that lie in a time-invariant space and are easily updatable, equilibria of this type are potential candidates for computation through backward recursion. Our goal is to devise an algorithm to find structured equilibria of type m of the dynamic games DT or D∞ . Definition 1 (SPBE): A structured perfect Bayesian equilibrium is a PBE of the considered dynamic game where at any time t, for any agent i, its equilibrium strategy βt∗,i is of type m (as in (8b)). IV. A M ETHODOLOGY FOR SPBE COMPUTATION IN FINITE HORIZON In this section we consider the finite horizon dynamic game DT . In the previous section, (specifically in Claim 1, included in the proof of Lemma 2 in Appendix B), it is shown that due to the independence of types and their evolution as independent controlled Markov processes, for any strategy of the players, Q i i the joint common belief can be factorized as a product of its marginals i.e., πt (xt ) = N i=1 πt (xt ), ∀xt . Since in this paper, we only deal with such joint beliefs, to accentuate this independence structure, we define π t ∈ ×i∈N ∆(X i ) as vector of marginal beliefs where π t := (πti )i∈N . In the rest of the paper, we will use π t instead of πt whenever appropriate, where of course, πt can be constructed from π t . Similarly, we define the vector of belief updates as F (π, γ, a) := (F i (π i , γ i , a))i∈N where (using Bayes rule)  P πi (xi )γ i (ai |xi )Qi (xi |xi ,a) P i i i i i t t t+1 t  xit Pt if i i i i i x̃it π (x̃t )γ (a |x̃t ) > 0 π (x̃t )γ (a |x̃t ) x̃it (10) F i (π i , γ i , a)(xit+1 ) = P P  π i (xi )Qi (xi |xi , a) if π i (x̃i )γ i (ai |x̃i ) = 0. xit t t t+1 t x̃it t t 10 The update function F i defined above depends on time t through the kernel Qit (for the finite horizon model). For notational simplicity we suppress this dependence on t. We also change the notation of policies of type m and θ as follows, so they depend on π t instead of πt mit : ×i∈N ∆(X i ) × X i → ∆(Ai )  θti : ×i∈N ∆(X i ) → X i → ∆(Ai ) . (11a) (11b) In the following we present a backward-forward algorithm that evaluates SPBE. As will be shown in Theorem 2, this is a “canonical” methodology, in the sense that all SPBE can be generated this way. A. Backward Recursion In this section, we define an equilibrium generating function θ = (θti )i∈N ,t∈T , where θti : ×i∈N ∆(X i ) → {X i → ∆(Ai )}. In addition, we define a sequence of reward-to-go functions of player i at time t, (Vti )i∈N ,t∈{1,2,...T +1} , where Vti : ×i∈N ∆(X i )×X i → R. These quantities are generated through a backward recursive way, as follows. 1. Initialize ∀π T +1 ∈ ×i∈N ∆(X i ), xiT +1 ∈ X i , 4 VTi +1 (π T +1 , xiT +1 ) = 0. (12) Q 2. For t = T, T − 1, . . . 1, ∀π t ∈ ×i∈N ∆(X i ), πt = i∈N πti , let θt [π t ] be generated as follows. Set γ̃t = θt [π t ], where γ̃t is the solution, if it exists,4 of the following fixed-point equation, ∀i ∈ N , xit ∈ X i , o n i i i i γti (·|xit )γ̃t−i , πt i i γ̃t (·|xt ) ∈ arg max (13) E Rt (Xt , At ) + Vt+1 (F (π t , γ̃t , At ), Xt+1 ) xt , i i γt (·|xt ) i where expectation in (13) is with respect to random variables (Xt−i , At , Xt+1 ) through the measure i i i −i −i −i i i i πt−i (x−i t )γt (at |xt )γ̃t (at |xt )Qt+1 (xt+1 |xt , at ) and F is defined above. Furthermore, using the quantity γ̃t found above, define o n i i 4 γ̃ti (·|xit )γ̃t−i , πt i i i i Vt (π t , xt ) =E (14) Rt (Xt , At ) + Vt+1 (F (π t , γ̃t , At ), Xt+1 ) xt . It should be noted that in (13), γ̃ti is not the outcome of a maximization operation as is the case in a best response equation of a Bayesian Nash equilibrium. Rather (13) is a different fixed point equation. This is because the maximizer γ̃ti appears in both, the left-hand-side and the right-hand-side of the equation (in the belief update F (π t , γ̃t , At ) = (F i (πti , γ̃ti , At ))i∈N ). This distinct construction is pivotal in the proof of Theorem 1, as will be further elaborated in the Discussion section. B. Forward Recursion As discussed above, a pair of strategy and belief profile (β ∗ , µ∗ ) is a PBE if it satisfies (4). Based on θ defined above in (12)–(14), we now construct a set of strategies β ∗ and beliefs µ∗ for the game DT in a forward recursive way, as follows.5 As before, we will use the notation µ∗t [a1:t−1 ] := (µ∗,i t [a1:t−1 ])i∈N , 4 The problem of existence in this step will be discussed in Section VI. As discussed in the preliminaries subsection on Section II, the equilibrium beliefs in SPBE, µ∗t are functions of each player’s history hit only through the common history hct and are the same for all players. 5 11 where µ∗,i [a1:t−1 ] is a belief on xit , and µ∗t [a1:t−1 ] can be constructed from µ∗t [a1:t−1 ] as µ∗t [a1:t−1 ](xt ) = QN ∗,it i c i=1 µt [a1:t−1 ](xt ), ∀a1:t−1 ∈ Ht . 1. Initialize at time t = 1, µ∗1 [φ](x1 ) := N Y Qi1 (xi1 ). (15) i=1 c 2. For t = 1, 2 . . . T, ∀i ∈ N , a1:t ∈ Ht+1 , xi1:t ∈ (X i )t βt∗,i (ait |a1:t−1 , xi1:t ) = βt∗,i (ait |a1:t−1 , xit ) := θti [µ∗t [a1:t−1 ]](ait |xit ) (16) and ∗,i i i ∗ µ∗,i t+1 [a1:t ] := F (µt [a1:t−1 ], θt [µt [a1:t−1 ]], at ) (17) where F i is defined in (10). We now state our main result. Theorem 1: A strategy and belief profile (β ∗ , µ∗ ), constructed through the backward-forward recursion algorithm is a PBE of the game, i.e., ∀i ∈ N , t ∈ T , a1:t−1 ∈ Htc , xi1:t ∈ (X i )t , β i , ∗,i ∗,−i βt:T βt:T , µ∗t [a1:t−1 ] E ( T X ) Rni (Xn , An ) a1:t−1 , xi1:t n=t i β ∗,−i , µ∗ [a βt:T t 1:t−1 ] t:T ≥E ( T X ) Rni (Xn , An ) a1:t−1 , xi1:t . n=t (18) Proof: Please see Appendix C. We emphasize that even though the backward-forward algorithm presented above finds a class of equilibrium strategies that are structured, the unilateral deviations of players in (18) are considered in the space of general strategies, i.e., the algorithm does not make any bounded rationality assumptions. The following result shows that the backward-forward construction described above is “canonical”, in the sense that all SPBE can be found through this methodology. Clearly, an SPBE can be defined as a PBE (β ∗ , µ∗ ) of the game that is generated through forward recursion in (15)–(17), using an equilibrium generating function φ, where φ = (φit )i∈N ,t∈T , φit : ×i∈N ∆(X i ) → {X i → ∆(Ai )}, common belief update function F and prior distributions Q1 . As a consequence, βt∗,i only depends on current type xit of player i, and on the common information a1:t−1 through the set of marginals µ∗t [a1:t−1 ], and µ∗,i t depends only on common information history a1:t−1 . Theorem 2 (Converse): Let (β ∗ , µ∗ ) be an SPBE. Then there exists an equilibrium generating function φ that satisfies (13) in backward recursion ∀ πt = µ∗t [a1:t−1 ], ∀ a1:t−1 , such that (β ∗ , µ∗ ) is defined through forward recursion using φ.6 Proof: Please see Appendix E. 6 Note that for π t 6= µ∗t [a1:t−1 ] for any a1:t−1 , φ can be arbitrarily defined without affecting the definition of (β ∗ , µ∗ ). 12 C. Discussion Several remarks are in order with regard to the above methodology and the result. Remark 1: The second sub-case in (10) dictates how beliefs are updated for histories with zero probability. The particular expression used is only one of many possible updates than can be used here. Dynamics that govern the evolution of public beliefs at histories with zero probability of occurrence affect equilibrium strategies. Thus, the construction proposed for calculating PBEs in this paper will produce a different set of equilibria if one changes the second sub-case above. The most well-known example of another such update is the intuitive criterion proposed in [35] for Nash equilibria, later generalized to sequential equilibria in [36]. The intuitive criterion assigns zero probability to states that can be excluded based on data available to all players (in our case action profile history a1:t−1 ). Another example of belief update is universal divinity, proposed in [37]. Remark 2: To highlight the significance of the unique structure of (13), one can think as follows. When all players other than player i play structured strategies, i.e., strategies of the form Ajt ∼ mjt (·|π t , xjt ) = θtj [π t ](·|xjt ), one may want to characterize the optimization problem from the viewpoint of the i-th player in order to characterize its best response. In particular one may want to show that although player i can play general strategies of the form Ait ∼ gti (·|xi1:t , a1:t−1 ), it is sufficient to best respond with structured strategies of the form Ait ∼ mit (·|π t , xit ) = θti [π t ](·|xit ) as well. To show that, one may entertain the thought that player i faces an MDP with state (Xti , Πt ), and action Ait at time t. If that were true, then player i’s optimal action could be characterized (using standard MDP results) by a dynamic-programming equation similar to (13), of the form o n i i i −i i i γti (·|xit )γ̃t−i , πt i i γ̃ti (·|xit ) ∈ arg max , γ (·|x ), γ̃ (·|·), γ̃ , A ), X ) x (19) E (π R (X , A ) + V (F t t t t t t t t t+1 t , t t+1 i i γt (·|xt ) where, unlike (13), in the belief update equation the partial strategy γti (·|xit ) is also optimized over. However, as it turns out, user i does not face such an MDP problem! The reason is that the update equation π t+1 = F (π t , γt , at ) also depends on γti which is the partial strategy of player i and this has not been fixed in the above setting. If however the update equation is first fixed (so it is updated as π t+1 = F (π t , γ̃ti , γ̃t−i , at ) = F (π t , θt [πt ], at ), i.e., using the equilibrium strategies even for player i) then indeed the problem faced by user i is the MDP defined above. It is now clear why (13) has the flavor of a fixed-point equation: the update of beliefs needs to be fixed beforehand with the equilibrium action γ̃ti even for user i, and only then user i’s best response can depend only on the MDP state (Xti , Πt ) thus being a structured strategy as well. This implies that his optimal action γ̃ti appears both on the left and right hand side of this equation giving rise to (13). Remark 3: In this paper, we find a class of PBEs of the game, while there may exist other equilibria that are not “structured”, and can not be found by directly using the proposed methodology. The rationale for using structured equilibria over others is the same as that for using MPE over SPE for a symmetric information game; a focussing argument for using simpler strategies being one of them. V. A M ETHODOLOGY FOR SPBE COMPUTATION IN I NFINITE H ORIZON In this section we consider the infinite horizon discounted reward dynamic game D∞ . We state the fixed-point equation that defines the value function and strategy mapping for the infinite horizon problem. 13 This is analogous to the backwards recursion ((13) and (14)) that define the value function and θ mapping for the finite horizon problem. j i i i i Define the set of functions V i : ×N j=1 ∆(X ) × X → R and strategies γ̃ : X → ∆(A ) (which are generated formally as γ̃ i = θi [π] for given π) via the following fixed-point equation: ∀ i ∈ N , xi ∈ X i ,  o n  i i γ i (·|xi ),γ̃ −i ,π −i i i 0i i γ̃ (· | x ) ∈ argmax E R (X, A) + δV F (π, γ̃, A), X | π, x , (20a) γ i (·|xi )∈∆(Ai )  n  o i i −i −i i V i (π, xi ) = Eγ̃ (·|x ),γ̃ ,π Ri (X, A) + δV i F (π, γ̃, A), X 0 | π, xi . (20b) Note that the above is a joint fixed-point equation in (V, γ̃), unlike the backwards recursive algorithm earlier which required solving a fixed-point equation only in γ̃. Here the unknown quantity is distributed as (X −i , Ai , A−i , X 0 i ) ∼ π −i (x−i )γ i (ai | xi )γ̃ −i (a−i | x−i )Qi (x0 i | xi , a), and F i (·) is defined in (10). Define the belief µ∗ inductively similar to the forward recursion from Section IV-B. By construction the belief defined above satisfies the consistency condition needed for a PBE. Denote the strategy arising out of γ̃ by β ∗ i.e., i h i,∗ i ∗ i i (21) βt (at | x1:t , a1:t−1 ) = θ µt [a1:t−1 ] (ait | xit ). Note that although the mapping θi is stationary, the strategy βti,∗ derived from it is not so. Below we state the central result of this section, that the strategy-belief pair (β ∗ , µ∗ ) constructed from the solution of the fixed-point equation (20) and the forward recursion indeed constitutes a PBE. Theorem 3: Assuming that the fixed-point equation (20) admits an absolutely bounded solution V i (for all i ∈ N ), the strategy-belief pair (β ∗ , µ∗ ) defined in (21) is a PBE of the infinite horizon discounted reward dynamic game i.e., ∀ i ∈ N , β i , t ≥ 1, hit ∈ Hti , (∞ ) (∞ ) X X i,∗ −i,∗ ∗ c i −i,∗ ∗ c Eβ ,β ,µt [ht ] δ n−t Ri (Xn , An ) | hit ≥ Eβ ,β ,µt [ht ] δ n−t Ri (Xn , An ) | hit . (22) n=t n=t Proof: Please see Appendix F. Our approach to proving Theorem 3 is as follows. We begin by noting that the standard contraction mapping arguments used in infinite horizon discounted reward MDPs/POMDPs viewed as a limit of finite horizon problems, do not apply here, since the policy equation (20a) is not a maximization, but a different fixed-point equation. So we attempt to “fit” the infinite horizon problem into the framework of finite-horizon model developed in the previous section. We do that by first introducing a terminal reward that depends on common beliefs, in the backward-forward recursion construction of Section IV for finite horizon games. We consider a finite horizon, T > 1, dynamic game with rewards same as in the infinite horizon version and time invariant transition kernels Qi . For each player i, there is a terminal reward Gi (πT +1 , xiT +1 ) that depends on the terminal type of player i and the terminal belief. It is  assumed that i,T Gi (·) is absolutely bounded. We define the value functions Vt : ×j∈N ∆(X j ) × X i → R and i∈N ,t∈T   strategies γ̃ti,T backwards inductively in the same way as in Section IV-A except Step 1, where i∈N ,t∈T i ∗ ∗ instead of (12) we set VTi,T +1 ≡ G . This consequently results in a strategy/belief pair (β , µ ), based on the forward recursion in Section IV-B. Now, due to the above construction, the value function Vti,T from above and V i from (20) are related (please see Lemma 9 in Appendix G). This result combined with continuity arguments as T → ∞ complete the proof of Theorem 3. 14 VI. A N E XISTENCE R ESULT FOR THE F IXED -P OINT E QUATION In this section, we discuss the problem of existence of signaling equilibria.7 While it is known that for any finite dynamic game with asymmetric information and perfect recall, there always exists a PBE [4, Prop. 249.1], existence of SPBE is not guaranteed. It is clear from our algorithm that existence of SPBE boils down to existence of a solution to the fixed-point equation (13) in finite horizon and (20) in infinite i for all i ∈ N from horizon. Specifically, for the finite horizon, at each time t given the functions Vt+1 the previous round (in the backwards recursion) equation (13) must have a solution γ̃ti for all i ∈ N . Generally, existence of equilibria is shown through Kakutani’s fixed point theorem, as is done in proving existence of a mixed strategy Nash equilibrium of a finite game [4, 38]. This is done by showing existence of fixed point of the best-response correspondences of the game. Among other conditions, it requires the “closed graph” property of the correspondences, which is usually implied by the continuity property of the utility functions involved. For (13) establishing existence is not straightforward due to: (a) potential discontinuity of the πt update function F when the denominator in the Bayesian update is 0 and (b) i potential discontinuity of the value functions, Vt+1 . In the following we provide sufficient conditions that can be checked at each time t to establish the existence of a solution. We consider a generic fixed-point equation similar to the one encountered in Section IV and Section V and state conditions under which they are guaranteed to have a solution. To concentrate on the essential aspects of the problem we consider a simple case with N = 2, type sets X i = {xH , xL } and action sets Ai = {0, 1}. Furthermore, types are static and instantaneous rewards Ri (x, a) do not depend on x−i . i 1 2 Given public belief π = (π 1 , π2 ) ∈ ×2i=1  ∆(A ), value functions V , V , one wishes to solve the following system of equations for γ̃ i (· | xi ) . xi ∈{xH ,xL },i∈{1,2} i i γ̃ (· | x ) ∈ γ i (·|xi ),γ̃ −i argmax E      i i i 1 1 1 1 2 2 2 2 i i (23) R (x , A)+V F (π , γ̃ , A ), F (π , γ̃ , A ) , x | x , π γ i (·|xi )∈∆(Ai ) where the expectation is evaluated using the probability distribution on (A1 , A2 ), h i i i i j H j j H j L j j L γ (a | x ) π (x )γ̃ (a | x ) + π (x )γ̃ (a | x ) . (24)   The probabilistic policy γ̃ can be represented by the 4-tuple p = p̃1L , p̃2L , p̃1H , p̃2H where p̃iH = γ i (ai = 1 | xH ) and p̃iL = γ i (ai = 1 | xL ), i = 1, 2. The fixed-point equation of interest reduces to    1H p̃ ∈ argmax a π 2 p̃2H +(1−π 2 )p̃2L V 1 (F1 (π 1 , p̃1 ), F1 (π 2 , p̃2 ), xH )−V 1 (F0 (π 1 , p̃1 ), F1 (π 2 , p̃2 ), xH ) a∈[0,1]    + 1 − π 2 p̃2H − (1 − π 2 )p̃2L V 1 (F1 (π 1 , p̃1 ), F0 (π 2 , p̃2 ), xH ) − V 1 (F0 (π 1 , p̃1 ), F0 (π 2 , p̃2 ), xH )    + π 2 p̃2H + (1 − π 2 )p̃2L R1 (xH , 1, 1) − R1 (xH , 0, 1)    2 2H 2 2L 1 H 1 H + 1 − π p̃ − (1 − π )p̃ R (x , 1, 0) − R (x , 0, 0) (25) In the special case of uncontrolled types where player i’s instantaneous reward does not depend on its private type xit , the fixed point equation always has a type-independent, myopic solution γ̃ti (·), since it degenerates to a best-response-like equation similar to the one for computing Nash equilibrium. This result is shown in [27]. 7 15 and three other similar equations for p̃1L , p̃2H , p̃2L . πpH πpH + πpL π(1 − pH ) F0 (π, (pH , pL )) , π(1 − pH ) + π(1 − pL ) F1 (π, (pH , pL )) , (26a) (26b) and in both definitions, if the denominator is 0 then the RHS is taken as π. A. Points of Discontinuities and the Closed graph result Equation (25) and the other three similar equations are essentially of the form (for a given π) x ∈ argmax af1 (x, y, w, z), a∈[0,1] w ∈ argmax cf3 (x, y, w, z), c∈[0,1] y ∈ argmax bf2 (x, y, w, z) b∈[0,1] z ∈ argmax df4 (x, y, w, z) (27) d∈[0,1] with x, y, z, w as p̃1H , p̃1L , p̃2H , p̃2L , respectively. Define Di ⊆ [0, 1]4 as the set of discontinuity points of fi and D , ∪4i=1 Di . For any point x0 ∈ D, define S(x0 ) as the subset of indexes i ∈ {1, 2, 3, 4} for which fi (x) is discontinuous at x0 . Assumption (E1): At any point x0 ∈ D, ∀ i ∈ S(x0 ) one of the following is satisfied: 1) fi (x0 ) = 0, or 2) ∃  > 0 such that ∀ x ∈ B (x0 ) (inside an -ball of x0 ) the sign of fi (x) is same as the sign of fi (x0 ). In the following we provide a sufficient condition for existence. Theorem 4: Under Assumption (E1), there exists a solution to the fixed-point equation (27). Proof: Please see Appendix H. The above set of results provide us with an analytical tool for establishing existence of a solution to the concerned fixed-point equation. While the above analytical result is useful in understanding a theoretical basis for existence, it doesn’t cover all instances. For instance, fixed-point equation arising out of (13) for t = 1 from Section VII-A, does not satisfy assumption (E1). In the following we provide a more computationally orientated approach to establishing existence and/or solving the generic fixed-point equation (27). We motivate this case-by-case approach with the help of an example. Suppose we hypothesize that the solution to (27) is such that x = 0, w = 0 and y, z ∈ (0, 1). Then (27) effectively reduces to checking if there exists y ∗ , z ∗ ∈ (0, 1) such that y ∗ ∈ argmax b f2 (0, y ∗ , 0, z ∗ ) z ∗ ∈ argmax d f4 (0, y ∗ , 0, z ∗ ) b (28a) d f1 (0, y ∗ , 0, z ∗ ) ≤ 0 f3 (0, y ∗ , 0, z ∗ ) ≤ 0. (28b) Thus the 4-variable system reduces to solving a 2-variable system and 2 conditions to verify. For instance, if f2 (0, y, 0, z), f4 (0, y, 0, z) as functions of y, z satisfy the conditions of Theorem 4 then the sub-system (28a) has a solution. If one of these solution is also consistent with (28b) then this sub-case indeed provides a solution to (27). 16 Generalizing the simplification provided in the above example, we divide solutions into 34 = 81 cases8 based on whether each of x, y, w, z are in {0}, (0, 1), {1}. There are (1) 16 corner cases where none are in the strict interior (0, 1); (2) 32 cases where exactly one is in the strict interior (0, 1); (3) 24 cases where 2 variables are in the strict interior (0, 1); (4) 8 cases where 3 variables are in the strict interior (0, 1); (5) 1 case where all 4 variables are in the strict interior (0, 1). Similar to the calculations above, for each of the 81 cases one can write a sub-system to which the problem (27) effectively reduces to. Clearly, if any one of the 81 sub-systems has a solution then the problem (27) has a solution. Furthermore, searching for a solution reduces to an appropriate sub-problem depending on the case. The approach then is to enumerate each of these 81 cases (as stated above) and check them in order. However this case-by-case division provides a computational simplification - not all cases require solving the entire fixed-point equation. Whenever a variable, say y, is not in the strict interior (0, 1) then the corresponding equation (27) need not be solved, since one only needs to verify the sign at a specific point. Hence, all sub-cases of (1) reduce to simply checking the value of functions fi at corner points no need for solving a fixed-point equation. All sub-cases of (2) reduce to solving a 1-variable fixed-point equation and three corresponding conditions to verify, etc. VII. A C ONCRETE E XAMPLE OF M ULTI - STAGE INVESTMENT IN P UBLIC G OODS Here we discuss both, a two-stage (finite) and an infinite-horizon version of a public goods example to illustrate the methodology described above for the construction of SPBE. A. A two stage public goods game We consider a discrete version of Example 8.3 from [5, ch.8], which is an instance of a repeated public goods game. There are two players who play a two-period game. In each period t, they simultaneously decide whether to contribute to the period t public good, which is a binary decision ait ∈ {0, 1} for players i = 1, 2. Before the start of period 2, both players know the action profile from period 1. In each period, each player gets a reward of 1 if at least one player contributed and 0 if none contributed. Player i’s cost of contributing is xi which is its private information. Both players believe that xi ’s are drawn independently and identically with probability distribution Q with support {xL , xH }; 0 < xL < 1 < xH , and PQ (X i = xH ) = q ∈ (0, 1). In our model this corresponds to N = 2, T = 2 and reward for player i in period t is Rti (x, at ) = i δ t Ri (x, at ), with Ri (x, at ) = (1 − xi )1(ait = 1) + a−i t 1(at = 0). We set δ = 1 in this two-stage case. We use the backward recursive algorithm from Section IV to find an SPBE of this game. Here the partial iH functions γti can equivalently be defined through the scalars piL ∈ [0, 1], for t = 1, 2 and i = 1, 2, t , pt where γti (1|xL ) = piL t , γti (1|xH ) = piH t , γti (0|xL ) = 1 − piL t , (29a) γti (0|xH ) = 1 − piH t , (29b) iH Henceforth, piL is used interchangeably with γti . t , pt 8 Generally, the number of cases is 3 PN i=1 Mi where N is the number of agents and Mi is the number of types for player i. 17 For t = 2 and for any fixed π 2 = (π21 , π22 ), where π2i = π2i (xH ) ∈ [0, 1] represents a probability measure 2L 1H 2H on the event {X i = xH }. Let γ̃2 = (p̃1L 2 , p̃2 , p̃2 , p̃2 ) = θ2 [π 2 ] be defined through the fixed point equation (13). Since 1 − xH < 0, p̃iH 2 = 0 is the solution. Thus the fixed-point equation can be reduced to, ∀i ∈ {1, 2}, iL −i −iL L + piL p̃iL 2 (1 − x ). 2 ∈ arg max(1 − p2 )(1 − π2 )p̃2 piL 2 This implies (31) below, the solutions to which are   0 if    1 if p̃iL 2 =     arbitrary if (30) shown in Figure 1 in the space of (π21 , π22 ). xL > 1 − (1 − π2−i )p̃−iL 2 , xL < 1 − (1 − π2−i )p̃−iL 2 , (31) xL = 1 − (1 − π2−i )p̃−iL 2 . 2H 2L 1H Fig. 1: Solutions of fixed point equation in (31). Solutions are shown as quadruplets (p̃1L 2 , p̃2 , p̃2 , p̃2 ) with intervals used whenever the solution is not uniquely defined. Thus for any π 2 , there can exist multiple equilibria and correspondingly multiple θ2 [π 2 ] can be defined. For any particular θ2 , at t = 1, the fixed point equation arising out of (13) defines θ1 [Q2 ], where Q2 = Q×Q denotes the profile of initial belief. Using one such θ2 defined below, we find an SPBE of the game for q = 0.1, xL = 0.2, xH = 1.2. We use θ2 [π 2 ] as one possible set of solutions of (31), described below,  L 1−xL  ( 1−x π21 ∈ [0, xL ), π22 ∈ [0, xL ) 1 , 1−π 2 , 0, 0)  1−π  2 2    (1, 0, 0, 0) π21 ∈ [0, xL ], π22 ∈ [xL , 1] 2H 1L 2L 1H θ2 [π2 ] = (p̃2 , p̃2 , p̃2 , p̃2 ) = (32)  (0, 1, 0, 0) π21 ∈ [xL , 1], π22 ∈ [0, xL ]      (1, 1, 0, 0) π21 ∈ (xL , 1], π22 ∈ (xL , 1]. Then, through iteration on the fixed point equation and using the aforementioned θ2 [π 2 ], we numerically 2L 1H 2H find (and analytically verify) that θ1 [Q2 ] = (p̃1L 1 , p̃1 , p̃1 , p̃1 ) = (0, 1, 0, 0) is a fixed point. Thus β11 (A11 = 1|X 1 = xL ) = 0 β12 (A21 = 1|X 2 = xL ) = 1 β11 (A11 = 1|X 1 = xH ) = 0 β12 (A21 = 1|X 2 = xH ) = 0 18 with beliefs µ∗2 [00] = (q, 1), µ∗2 [01] = (q, 0), µ∗2 [10] = (q, 1), µ∗2 [11] = (q, 0) and (β2i (·|a1 , ·))i∈{1,2} = θ2 [µ∗2 [a1 ]] is an SPBE of the game. In this equilibrium, player 2 at time t = 1, contributes according to her type whereas player 1 never contributes, thus player 2 reveals her private information through her action whereas player 1 does not. Since θ2 is symmetric, there also exists an (antisymmetric) equilibrium where at time t = 1, players’ strategies reverse i.e. player 2 never contributes and player 1 contributes according 1−xL 1−xL to her type. We can also obtain a symmetric equilibrium where θ1 [Q2 ] = ( (1−q)(1+x L ) , (1−q)(1+xL ) , 0, 0) as q , resulting in beliefs µ∗2 [00] = (p, p), µ∗2 [01] = (p, 0), µ∗2 [10] = (0, p), µ∗2 [11] = a fixed point when xL > 2−q (0, 0) where p = q(1+xL ) . q(1+xL )+(1−xL ) B. Infinite horizon version For the infinite horizon version we consider three values δ = 0, 0.5, 0.95 and solve the corresponding fixed point equation (arising out of (20)) numerically to calculate the mapping θ. The fixed-point equation is solved numerically by discretizing the π−space [0, 1]2 and all solutions that we find are symmetric w.r.t. players i.e., p̃1L for π = (π 1 , π 2 ) is the same as p̃2L for π 0 = (π 2 , π 1 ) and similarly for p̃1H , p̃2H . For δ = 0, the game is instantaneous and actually corresponds to the second round t = 2 play in the finite horizon two-stage version above. Thus whenever player 1’s type is xH , it is instantaneously profitable not to contribute. This gives p̃1H = 0, for all π. Thus we only plot p̃1L ; in Fig. 2 (this can be inferred from the discussion and Fig. 1 above). Intuitively, with type xL the only values of π for which player 1 would not wish to contribute is if he anticipates player 2’s type to be xL with high probability and rely on player 2 to contribute. This is why for lower values of π 2 (i.e., player 2’s type likely to be xL ) we see p̃1L = 0 in Fig. 2. Fig. 2: p̃1L vs. (π 1 , π 2 ) at δ = 0; (p̃1L , p̃1H ) = θ1 [π 1 , π 2 ]. Now consider p̃1L plotted in Fig. 2 and 3. As δ increases, future rewards attain more priority and signaling comes into play. So while taking an action, players not only look for their instantaneous reward but also how their action affects the future public belief π about their private type. It is evident in the figures that as δ increases, at high π 1 , up to larger values of π 2 player 1 chooses not to contribute when his type is xL . This way he intends to send a “wrong” signal to player 2 i.e., that his type is xH and subsequently force player 2 to invest. This way player 1 can free-ride on player 2’s investment. Now consider p̃1H plotted in Fig. 3. For δ = 0 we know that not contributing is profitable, however as δ increases from 0, players are mindful of future rewards and thus are willing to contribute at certain beliefs. Specifically, coordination via signaling is evident here. Although it is instantaneously not profitable to 19 Fig. 3: p̃1L , p̃1H vs. (π 1 , π 2 ) at δ = 0.5 (upper left and right). p̃1L , p̃1H vs. (π 1 , π 2 ) at δ = 0.95 (lower left and right). contribute if player 1’s type is xH , by contributing at higher values of π 2 (i.e., player 2’s type is likely xH ) and low π 1 , player 1 coordinates with player 2 to achieve net profit greater than 0 (reward when no one contributes). This is possible since the loss when contributing is −0.2 whereas the profit from free-riding on player 2’s contribution is 1. Under the equilibrium strategy, beliefs Πt form a Markov chain. One can trace this Markov chain to study the signaling effect at equilibrium. On numerically simulating this Markov chain for the above example (at δ = 0.95) we observe that for almost all initial beliefs, within a few rounds players completely learn each other’s private type truthfully (or at least with very high probability). In other words, players manage to reveal their private type via their actions at equilibrium and to such an extent that it negates any possibly incorrect initial belief about their type. As a measure of cooperative coordination at equilibrium one can perform the following calculation. Compare the value function V 1 (·, x) of agent 1 arising out of the fixed-point equation, for δ = 0.95 and x ∈ {xH , xL } (normalize it by multiplying with 1 − δ so that it represents per-round value) with the best possible attainable single-round reward under a symmetric mixed strategy with a) full coordination and b) no coordination. Note that the two cases need not be equilibrium themselves, which is why this will result in a bound on the efficiency of the evaluated equilibria. In case a), assuming both agents have the same type x, full coordination can lead to the best possible reward of 1+1−x = 1 − x2 i.e., agent 1 contributes with probability 0.5 and agent 2 contributes with 2 probability 0.5 but in a coordinated manner so that it doesn’t overlap with agent 1 contributing. In case b) when agents do not coordinate and invest with probability p each, then the expected singleround reward is p(1 − x) + p(1 − p). The maximum possible value of this expression is (1 − x2 )2 . For x = xL = 0.2, the range of values of V 1 (π1 , π2 , xL ) over (π1 , π2 ) ∈ [0, 1]2 is [0.865, 0.894]. Whereas full coordination produces 0.9 and no coordination 0.81. It is thus evident that agents at equilibrium end 20 up achieving reward close to the best possible and gain significantly compared to the strategy of no coordination. Similarly for x = xH = 1.2 the range is [0.3, 0.395]. Whereas full coordination produces 0.4 and no coordination 0.16. The gain via coordination is evident here too. VIII. C ONCLUSION In this paper we presented a methodology for evaluating SPBE for games with asymmetric information and independent private types evolving as controlled Markov processes. The main contribution is a time decomposition akin to dynamic programming. This decomposition allows one to find SPBE that exhibit signaling behavior with linear complexity in the time horizon. Using this methodology, dynamic LQG games with asymmetric information are studied in [39] where it is shown that under certain conditions, there exists an SPBE of the game with strategies being linear in players’ private types. In [40], authors extend the finite-horizon model in this paper such that players do not observe their own types, rather make independent noisy observations of their types. An analogous backward-forward algorithm is presented for that model. It is worth noting that although structured strategies are useful in making the equilibrium finding process tractable, no claim can be made about whether the resulting equilibrium outcomes are better or worse than those corresponding to general strategies. We believe this is an interesting future research direction. Another interesting future direction is dynamic mechanism design for asymmetric information systems. ACKNOWLEDGMENT The authors wish to acknowledge Vijay Subramanian for his contribution to the paper. Achilleas Anastasopoulos wishes to acknowledge Ashutosh Nayyar for the fruitful discussion and criticism of an early draft of this work presented during the ITA 2012 conference. A PPENDIX A P ROOF OF L EMMA 1 We prove this Lemma in the following steps. (a) In Claim 1, we prove that for any policy profile g and ∀t ∈ T , xi1:t for i ∈ N are conditionally independent given the common information a1:t . (b) In Claim 2, using Claim 1, we prove that for every fixed strategy g −i of the players −i, ((A1:t−1 , Xti ), Ait )t∈T is a controlled Markov process for player i. i 4 g i i (c) For a given policy g, we define a policy si of player i from g as sit (ait |a1:t−1  , xt ) = P (at |a1:t−1  , xt ). (d) In Claim 3, we prove that the dynamics of this controlled Markov process (A1:t−1 , Xti ), Ait under i −i t∈T (si g −i ) are same as under g i.e. Ps g (xit , xit+1 , a1:t ) = Pg (xit , xit+1 , a1:t ). (e) In Claim 4, we prove that w.r.t. random variables (xt , at ), xit is sufficient for player i’s private information −i history xi1:t i.e. Pg (xt , at |a1:t−1 , xi1:t , ait ) = Pg (xt , at |a1:t−1 , xit , ait ). i −i (f) From (c), (d) and (e) we then prove the result of the lemma that Ps g (xt , at ) = Pg (xt , at ). 21 Claim 1: For any policy profile g and ∀t, Pg (x1:t |a1:t−1 ) = N Y i Pg (xi1:t |a1:t−1 ) (34) i=1 Proof: Pg (x1:t , a1:t−1 ) g x1:t P (x1:t , a1:t−1 )  Qt QN i i i i i i i i i i i n=2 Qn (xn |xn−1 , an−1 )gn (an |a1:n−1 , x1:n ) i=1 Q1 (x1 )g1 (a1 |x1 ) = P QN  Qt i i i i i i i i i i i i=1 Q (x1 )g1 (a1 |x1 ) n=2 Qn (xn |xn−1 , an−1 )gn (an |a1:n−1 , x1:n ) x1:t  QN Qt i i i i i i i i i i i Q (x )g (a |x ) Q (x |x , a )g (a |a , x ) n−1 1:n−1 n n 1:n n=2 n n n−1 P 1 1 1 1 1  = Q i=1 Qt N i i i i i i i i i i i |x (a )g ) Q (x |x , a )g (a |a , x ) Q (x i 1 1 1 1 1:n i=1 n=2 n n n−1 n−1 n n 1:n−1 x1:t Q N Y Qi (xi )g i (ai |xi ) t Qin (xin |xin−1 , an−1 )gni (ain |a1:n−1 , xi1:n ) = Qt P 1 i1 i1 i1 i1 i n=2 i i i i i i Q (x )g (a |x ) i 1 1 1 1 n=2 Qn (xn |xn−1 , an−1 )gn (an |a1:n−1 , x1:n ) x i=1 Pg (x1:t |a1:t−1 ) = P (35a) (35b) (35c) (35d) 1:t = N Y i Pg (xi1:t |a1:t−1 ) (35e) i=1 Claim 2: For a fixed g −i , {(A1:t−1 , Xti ), Ait }t is a controlled Markov process with state (A1:t−1 , Xti ) and control action Ait . Proof: Pg (ã1:t , xit+1 |a1:t−1 , xi1:t , ai1:t ) X i i = Pg (ã1:t , xit+1 , x−i 1:t |a1:t−1 , x1:t , at ) (36a) x−i 1:t = X i −i i i i Pg (ã−i t , xt+1 , x1:t |a1:t−1 , x1:t , at )I(a1:t−1 ,ait ) (ã1:t−1 , ãt ) (36b) x−i 1:t ! = X P x−i 1:t =P g −i g −i (x−i 1:t |a1:t−1 ) Y i gtj (ãjt |a1:t−1 , xj1:t ) Qit (xit+1 |xit , ait , ã−i t )I(a1:t−1 ,ait ) (ã1:t−1 , ãt ) (36c) j6=i (ã1:t , xit+1 |a1:t−1 , xit , ait ), (36d) i where (36c) follows from Claim 1 since x−i 1:t is conditionally independent of x1:t given a1:t−1 and the corresponding probability is only a function of g −i . For any given policy profile g, we construct a policy si in the following way, 4 sit (ait |a1:t−1 , xit ) = Pg (ait |a1:t−1 , xit ) P g i i xi1:t−1 P (at , x1:t |a1:t−1 ) =P P i i g i ãit x̃i1:t−1 P (ãt , x̃1:t−1 xt |a1:t−1 ) P gi i i i i xi1:t−1 P (x1:t |a1:t−1 )gt (at |a1:t−1 , x1:t ) =P P Pgi (x̃i1:t−1 xit |a1:t−1 )gti (ãit |a1:t−1 , x̃i1:t−1 xit ) ãit x̃i 1:t−1 (37a) (37b) (37c) 22 i = Pg (ait |a1:t−1 , xit ), (37d) where dependence of (37c) on only g i is due to Claim 1. Claim 3: The dynamics of the Markov process {(A1:t−1 , Xti ), Ait }t under (si g −i ) are the same as under g i.e., i −i Ps g (xit , xit+1 , a1:t ) = Pg (xit , xit+1 , a1:t ) ∀t (38) Proof: We prove this by induction. Clearly, i −i Pg (xi1 ) = Ps g (xi1 ) = Qi1 (xi1 ). (39) i −i Now suppose (38) is true for t − 1 which also implies that the marginals Pg (xit , a1:t−1 ) = Ps g (xit , a1:t−1 ). Then Pg (xit , a1:t−1 , xit+1 , at ) = Pg (xit , a1:t−1 )Pg (ait |a1:t−1 , xit )Pg (xit+1 , a1:t |xit , a1:t−1 , ait ) =P si g −i (xit , a1:t−1 )sit (ait |a1:t−1 , xit )P =P si g −i (xit , a1:t−1 , xit+1 , at ), g −i (xit+1 , a1:t |xit , a1:t−1 , ait ) (40a) (40b) (40c) where (40b) is true from induction hypothesis, definition of si in (37d) and since {(a1:t−1 , xit ), ait }t is a controlled Markov process as proved in Claim 2 and its update kernel does not depend on policy g i .This completes the induction step. Claim 4: For any policy g, −i Pg (x̃t , ãt |a1:t−1 , xi1:t , ait ) = Pg (x̃t , ãt |a1:t−1 , xit , ait ). (41) −i i Pg (x̃t , ãt |a1:t−1 , xi1:t , ait ) = Ixit ,ait (x̃it , ãit )Pg (x̃−i t , ãt |a1:t−1 , x1:t ). (42) Proof: Now −i i Pg (x̃−i t , ãt |a1:t−1 , x1:t ) = X −i i Pg (x̃−i 1:t , ãt |a1:t−1 , x1:t ) (43a) x̃−i 1:t−1 ! = X i Pg (x̃−i 1:t |a1:t−1 , x1:t ) x̃−i 1:t−1 Y gtj (ãjt |a1:t−1 , x̃j1:t ) (43b) j6=i ! = X −i Pg (x̃−i 1:t |a1:t−1 ) x̃−i 1:t Y gtj (ãjt |a1:t−1 , x̃j1:t ) (43c) j6=i −i −i = Pg (x̃−i t , ãt |a1:t−1 ) (43d) where (43c) follows from Claim 1. Hence −i −i Pg (x̃t , ãt |a1:t−1 , xi1:t , ait ) = Ixit ,ait (x̃it , ãit )Pg (x̃−i t , ãt |a1:t−1 ) (44a) 23 −i = Pg (x̃t , ãt |a1:t−1 , xit , ait ) (44b) Finally, Pg (x̃t , ãt ) = X Pg (x̃t , ãt |a1:t−1 , xi1:t , ait )Pg (a1:t−1 , xi1:t , ait ) (45a) a1:t−1 xi1:t ait = −i X Pg (x̃t , ãt |a1:t−1 , xit , ait )Pg (a1:t−1 , xi1:t , ait ) (45b) a1:t−1 xi1:t ,ait = X −i Pg (x̃t , ãt |a1:t−1 , xit , ait )Pg (a1:t−1 , xit , ait ) (45c) a1:t−1 xit ,ait = X −i i −i Pg (x̃t , ãt |a1:t−1 , xit , ait )Ps g (a1:t−1 , xit , ait ) (45d) a1:t−1 xit ,ait i −i = Ps g (x̃t , ãt ). (45e) where (45b) follows from (41) in Claim 4 and (45d) from (38) in Claim 3. A PPENDIX B P ROOF OF L EMMA 2 For this proof we will assume the common agents strategies to be probabilistic as opposed to being deterministic, as was the case in Section III. This means actions of the common agent, γti ’s are generated probabilistically from ψ i as Γit ∼ ψti (·|a1:t−1 ), as opposed to being deterministically generated as γti = ψti [a1:t−1 ], as before. These two are equivalent ways of generating actions ait from a1:t−1 and xit . We avoid using the probabilistic strategies of common agent throughout the main text for ease of exposition, and because it conceptually does not affect the results. Proof: We prove this lemma in the following steps. We view this problem from the perspective of a common agent. Let ψ be the coordinator’s policy corresponding to policy profile g. Let πti (xit ) = i Pψ (xit |a1:t−1 ). Q i i i (a) In Claim 5, we show that πt can be factorized as πt (xt ) = N i=1 πt (xt ) where each πt can be updated i through an update function πt+1 = F i (πti , γti , at ) and F i is independent of common agent’s policy ψ. (b) In Claim 6, we prove that (Πt , Γt )t∈T is a controlled Markov process. 4 (c) We construct a policy profile θ from g such that θt (dγt |πt ) = Pψ (dγt |πt ). (d) In Claim 7, we prove that dynamics of this Markov process (Πt , Γt )t∈T under θ is same as under ψ i.e. Pθ (dπt , dγt , dπt+1 ) = Pψ (dπt , dγt , dπt+1 ). (e) In Claim 8, we prove that with respect to random variables (Xt , At ), πt can summarize common information a1:t−1 i.e. Pψ (xt , at |a1:t−1 , γt ) = P(xt , at |πt , γt ). (f) From (c), (d) and (e) we then prove the result of the lemma that Pψ (xt , at ) = Pθ (xt , at ) which is equivalent to Pg (xt , at ) = Pm (xt , at ), where m is the policy profile of players corresponding to θ. Q i i i Claim 5: πt can be factorized as πt (xt ) = N i=1 πt (xt ) where each πt can be updated through an i update function πt+1 = F i (πti , γti , at ) and F i is independent of common agent’s policy ψ. We also say π t+1 = F (π t , γt , at ). 24 Proof: We prove this by induction. Since π1 (x1 ) = Q i suppose πt = N i=1 πt . Then, QN i=1 Qit (xi1 ), the base case is verified. Now πt+1 (xt+1 ) = Pψ (xt+1 |a1:t , γ1:t+1 ) (46a) = Pψ (xt+1 |a1:t , γ1:t ) P ψ P (xt , at , xt+1 |a1:t−1 , γ1:t ) = P xt ψ x̃t+1 x̃t P (x̃t , x̃t+1 , at |a1:t−1 , γ1:t ) P QN i i i i i i xt πt (xt ) i=1 γt (at |xt )Qt (xt+1 |xt , at ) =P QN i i i i i i i=1 γt (at |x̃t )Qt (x̃t+1 |x̃t , at ) x̃t x̃t+1 πt (x̃t ) P i i i i i i i N i Y xit πt (xt )γt (at |xt )Qt (xt+1 |xt , at ) P i i i i i = x̃it πt (x̃t )γt (at |x̃t ) i=1 = N Y i πt+1 (xit+1 ), (46b) (46c) (46d) (46e) (46f) i=1 where (46e) follows from induction hypothesis. It is assumed in (46c)-(46e) that the denominator is not 0. If denominator corresponding to any γti is zero, we define X i πt+1 (xit+1 ) = πti (xit )Qit (xit+1 |xit , at ), (47) xit i = F i (πti , γti , at ) and π t+1 = F (π t , γt , a1 ) where F i and F are where πt+1 still satisfies (46f). Thus πt+1 appropriately defined from above. Claim 6: (Πt , Γt )t∈T is a controlled Markov process with state Πt and control action Γt Proof: X Pψ (dπt+1 , at , xt |π1:t , γ1:t ) (48a) Pψ (dπt+1 |π1:t , γ1:t ) = at ,xt = X Pψ (xt |π1:t , γ1:t ) at ,xt = X at ,xt (N Y ) γti (ait |xit ) IF (πt ,γt ,at ) (πt+1 ) (48b) i=1 πt (xt ) (N Y ) γti (ait |xit ) IF (πt ,γt ,at ) (πt+1 ) (48c) i=1 = P(dπt+1 |πt , γt ). (48d) For any given policy profile ψ, we construct policy profile θ in the following way. 4 θt (dγt |πt ) = Pψ (dγt |πt ). (49) Claim 7: Pψ (dπt , dγt , dπt+1 ) = Pθ (dπt , dγt , dπt+1 ) ∀t ∈ T . (50) 25 Proof: We prove this by induction. For t = 1, Pψ (dπ1 ) = Pθ (dπ1 ) = IQ (π1 ). (51) Now suppose P ψ (dπt ) = P θ (dπt ) is true for t, then Pψ (dπt , dγt , dπt+1 ) = Pψ (dπt )P ψ (dγt |πt )Pψ (dπt+1 |πt γt ) (52a) = Pθ (dπt )θt (dγt |πt )P (dπt+1 |πt , γt ) (52b) = Pθ (dπt , dγt , dπt+1 ). (52c) where (52b) is true from induction hypothesis, definition of θ in (49) and since (Πt , Γt )t∈T is a controlled Markov process as proved in Claim 6 and thus its update kernel does not depend on policy ψ. This completes the induction step. Claim 8: For any policy ψ, Pψ (xt , at |a1:t−1 , γt ) = P(xt , at |πt , γt ). (53) Proof: Pψ (xt , at |a1:t−1 , γt ) = Pψ (xt |a1:t−1 , γt ) Y γti (ait |xit ) (54a) i∈N = πt (xt ) Y γti (ait |xit ) (54b) i∈N = P(xt , at |πt , γt ). (54c) Pψ (xt , at |a1:t−1 , γt )Pψ (a1:t−1 , γt ) (55a) P(xt , at |πt , γt )Pψ (a1:t−1 , γt ) (55b) Finally, Pψ (xt , at ) = X a1:t−1 ,γt = X a1:t−1 γt = X P(xt , at |πt , γt )Pψ (πt , γt ) (55c) P(xt , at |πt , γt )Pθ (πt , γt ) (55d) πt ,γt = X πt ,γt = Pθ (xt , at ). where (55b) follows from (53), (55c) is due to change of measure and (55d) follows from (50). (55e) 26 A PPENDIX C P ROOF OF T HEOREM 1 Proof: We prove (18) using induction and the results in Lemma 3, 4 and 5 proved in Appendix D. For base case at t = T , ∀i ∈ N , (a1:T −1 , xi1:T ) ∈ HTi , β i n o ∗,i ∗,−i ∗ (56a) EβT βT , µT [a1:T −1 ] RTi (XT , AT ) a1:T −1 , xi1:T = VTi (µ∗T [a1:T −1 ], xiT ) o n i ∗,−i ∗ ≥ EβT βT , µT [a1:T −1 ] RTi (XT , AT ) a1:T −1 , xi1:T , (56b) where (56a) follows from Lemma 5 and (56b) follows from Lemma 3 in Appendix D. c Let the induction hypothesis be that for t + 1, ∀i ∈ N , a1:t ∈ Ht+1 , xi1:t+1 ∈ (X i )t+1 , β i , ( T ) X ∗,i ∗,−i ∗ Eβt+1:T βt+1:T , µt+1 [a1:t ] Rni (Xn , An ) a1:t , xi1:t+1 (57a) n=t+1 ∗,−i i βt+1:T βt+1:T , µ∗t+1 [a1:t ] ≥E ( T X ) Rni (Xn , An ) a1:t , xi1:t+1 . (57b) n=t+1 Then ∀i ∈ N , (a1:t−1 , xi1:t ) ∈ Hti , β i , we have ( T ) X ∗,i ∗,−i ∗ Eβt:T βt:T , µt [a1:t−1 ] Rni (Xn , An ) a1:t−1 , xi1:t = n=t i ∗ i Vt (µt [a1:t−1 ], xt ) (58a) o n i i ≥E Rti (Xt , At ) + Vt+1 (µ∗t+1 [a1:t−1 At ], Xt+1 ) a1:t−1 , xi1:t ( ( T X ∗,i ∗,−i βti βt∗,−i , µ∗t [a1:t−1 ] i βt+1:T βt+1:T , µ∗t+1 [a1:t−1 ,At ] =E Rt (Xt , At ) + E Rni (Xn , An ) βti βt∗,−i , µ∗t [a1:t−1 ] (58b) n=t+1 o a1:t−1 , At , xi1:t+1 a1:t−1 , xi1:t  i ∗,−i ∗ ≥ Eβt βt , µt [a1:t−1 ] Rti (Xt , At )+ ( T ) ) X ∗,−i i ∗ i Eβt+1:T βt+1:T µt+1 [a1:t−1 ,At ] Rni (Xn , An ) a1:t−1 , At , xi1:t , Xt+1 a1:t−1 , xi1:t βti βt∗,−i , µ∗t [a1:t−1 ] =E i β ∗,−i µ∗ [a βt:T t 1:t−1 ] t:T E ( (58c) (58d) n=t+1 n i Rt (Xt , At )+ T X ) i Rni (Xn , An ) a1:t−1 , At , xi1:t , Xt+1 a1:t−1 , xi1:t o (58e) n=t+1 i β ∗,−i βt:T t:T =E µ∗t [a1:t−1 ] ( T X ) Rni (Xn , An ) a1:t−1 , xi1:t , (58f) n=t where (58a) follows from Lemma 5, (58b) follows from Lemma 3, (58c) follows from Lemma 5, (58d) follows from induction hypothesis in (57b) and (58e) follows from Lemma 4. Moreover, construction of θ in (13), and consequently definition of β ∗ in (16) are pivotal for (58e) to follow from (58d). We note that µ∗ satisfies the consistency condition of [5, p. 331] from the fact that (a) for all t and for every common history a1:t−1 , all players use the same belief µ∗t [a1:t−1 ] on xt and (b) the belief µ∗t can be Q ∗,i ∗,i c i factorized as µ∗t [a1:t−1 ] = N i=1 µt [a1:t−1 ] ∀a1:t−1 ∈ Ht where µt is updated through Bayes’ rule F as in Lemma 5 in Appendix B. 27 A PPENDIX D I NTERMEDIATE LEMMAS USED IN PROOF OF T HEOREM 1 Lemma 3: ∀t ∈ T , i ∈ N , (a1:t−1 , xi1:t ) ∈ Hti , βti Vti (µ∗t [a1:t−1 ], xit ) ≥ βti βt∗,−i , µ∗t [a1:t−1 ] E o n i i i i ∗ ∗ Rt (Xt , At ) + Vt+1 (F (µt [a1:t−1 ], βt (·|a1:t−1 , ·), At ), Xt+1 ) a1:t−1 , x1:t . (59) Proof: We prove this Lemma by contradiction. Suppose the claim is not true for t. This implies ∃i, βbti , b a1:t−1 , x bi1:t such that o n i βbti βt∗,−i , µ∗t [b a1:t−1 ] i i i ∗ ∗ E Rt (Xt , At ) + Vt+1 (F (µt [b a1:t−1 , x b1:t a1:t−1 , ·), At ), Xt+1 ) b a1:t−1 ], βt (·|b > Vti (µ∗t [b a1:t−1 ], x bit ). (60) We will show that this leads to a contradiction. Construct ( bit a1:t−1 , x bi1:t ) xit = x βbti (ait |b γ bti (ait |xit ) = arbitrary otherwise. (61) Then for b a1:t−1 , x bi1:t , we have Vti (µ∗t [b a1:t−1 ], x bit ) o n ∗ ∗ i i i i −i i = max E a1:t−1 ], βt (·|b a1:t−1 , ·), At ), Xt+1 ) x bt , (62a) Rt (b xt xt , at ) + Vt+1 (F (µt [b γti (·|b xit ) o n ∗,−i i i ∗ i i a1:t−1 ], βt∗ (·|b a1:t−1 , ·), At ), Xt+1 )x bit (62b) ≥ Eγbt (·|bxt )βt , µt [ba1:t−1 ] Rti (Xt , At ) + Vt+1 (F (µ∗t [b n o X i ∗ = Rti (b xit x−i a1:t−1 ], βt∗ (·|b a1:t−1 , ·), at ), xit+1 ) t , at ) + Vt+1 (F (µt [b γti (·|b xit )βt∗,−i , µ∗t [b a1:t−1 ] x−i t ,at ,xt+1 = i i × µ∗,−i [b a1:t−1 ](x−i γti (ait |b xit )βt∗,−i (a−i a1:t−1 , x−i xit , at ) t t )b t |b t )Qt (xt+1 |b o n X ∗ ∗ i i i −i i a1:t−1 ], βt (·|b a1:t−1 , ·), at ), xt+1 ) Rt (b xt xt , at ) + Vt+1 (F (µt [b (62c) x−i t ,at ,xt+1 i i bi i a1:t−1 , x a1:t−1 , x−i xit , at ) bi1:t )βt∗,−i (a−i × µ∗,−i [b a1:t−1 ](x−i t t |b t )Qt (xt+1 |b t )βt (at |b o n bi ∗,−i ∗ i ∗ ∗ i i = Eβt βt ,µt [ba1:t−1 ] Rti (b xit x−i , a ) + V (F ) b a , x b (µ [b a ], β (·|b a , ·), A ), X t 1:t−1 t 1:t−1 t+1 1:t t t t+1 t 1:t−1 (62d) > Vti (µ∗t [b a1:t−1 ], x bit ), (62f) (62e) where (62a) follows from definition of Vti in (14), (62d) follows from definition of γ bti and (62f) follows from (60). However this leads to a contradiction. i Lemma 4: ∀i ∈ N , t ∈ T , (a1:t , xi1:t+1 ) ∈ Ht+1 and βti ( T ) X i β ∗,−i , µ∗ [a βt:T ] i i t 1:t−1 t:T E Rn (Xn , An ) a1:t , x1:t+1 (63a) n=t+1 =E ∗,−i i βt+1:T βt+1:T , µ∗t+1 [a1:t ] ( T X n=t+1 ) Rni (Xn , An ) a1:t , xi1:t+1 . (63b) 28 Thus the above quantities do not depend on βti . ∗,−i Proof: Essentially this claim stands on the fact that µt+1 [a1:t ] can be updated from µt∗,−i [a1:t−1 ], βt∗,−i Q ∗,j ∗,j and at , as µ∗,−i t+1 [a1:t ] = j6=i F (µt [a1:t−1 ], βt , at ) as in Claim 5. Since the above expectations involve −i random variables Xt+1 , At+1:T , Xt+2:T , we consider the probability ∗,−i i Pβt:T βt:T , µ∗t [a1:t−1 ] i (x−i t+1 , at+1:T , xt+2:T |a1:t , x1:t+1 ) = Nr Dr (64) where Nr = X i ∗,−i ∗,−i , µ∗t [a1:t−1 ] Pβt:T βt:T , µ∗t [a1:t−1 ] i (x−i t , at , xt+1 , at+1:T , xt+2:T |a1:t−1 , x1:t ) (65a) x−i t = X i Pβt:T βt:T i (x−i t a1:t−1 , x1:t ) x−i t ∗,−i i −i βt:T βt:T βti (ait |a1:t−1 , xi1:t )βt∗,−i (a−i t |a1:t−1 , xt )Q(xt+1 |xt , at )P = X , µ∗t [a1:t−1 ] (at+1:T , xt+2:T |a1:t , xi1:t−1 , xt:t+1 ) (65b) i i i µt∗,−i [a1:t−1 ](x−i t )βt (at |a1:t−1 , x1:t ) x−i t i ∗,−i ∗ −i i i i −i −i −i βt+1:T βt+1:T , µt+1 [a1:t ] βt∗,−i (a−i (at+1:T , xt+2:T |a1:t , xi1:t , xt+1 ), t |a1:t−1 , xt )Q (xt+1 |xt , at )Q (xt+1 |xt , at )P (65c) where (65c) follows from the conditional independence of types given common information, as shown in Claim 1, and the fact that probability on (at+1:T , x2+t:T ) given a1:t , xi1:t−1 , xt:t+1 , µ∗t [a1:t−1 ] depends on ∗,−i i βt+1:T . Similarly, the denominator in (64) is given by a1:t , xi1:t , xt+1 , µ∗t+1 [a1:t ] through βt+1:T X i ∗,−i ∗ i i Pβt:T βt:T , µt [a1:t−1 ] (x̃−i Dr = t , at , xt+1 a1:t−1 , x1:t ) x̃−i t X i ∗,−i Pβt:T βt:T , µ∗t ∗,−i −i i i i i i i i (x̃−i (at |a1:t−1 , x̃−i t |a1:t−1 , x1:t )βt (at |a1:t−1 , x1:t )βt t )Q (xt+1 |xt , at ) (65d) x̃−i t = X ∗,−i −i i i i i i i µ∗,−i [a1:t−1 ](x̃−i (at |a1:t−1 , x̃−i t t )βt (at |a1:t−1 , x1:t )βt t )Q (xt+1 |xt , at ). (65e) x̃−i t By canceling the terms βti (·) and Qi (·) in the numerator and the denominator, (64) is given by P ∗,−i −i −i −i −i µ∗,−i [a1:t−1 ](x−i (at |a1:t−1 , x−i t t )βt t )Qt+1 (xt+1 |xt , at ) x−i t P ∗,−i −i µ∗,−i [a1:t−1 ](x̃−i (at |a1:t−1 , x̃−i t t )βt t ) x̃−i t i ∗,−i ∗ × Pβt+1:T βt+1:T , µt+1 [a1:t ] (at+1:T , xt+2:T |a1:t , xi1:t , xt+1 ) −i = µ∗,−i t+1 [a1:t ](xt+1 )P =P ∗,−i i βt+1:T βt+1:T , µ∗t+1 [a1:t ] ∗,−i i βt+1:T βt+1:T , µ∗t+1 [a1:t ] (at+1:T , xt+2:T |a1:t , xi1:t , xt+1 ) i (x−i t+1 , at+1:T , xt+2:T |a1:t , x1:t+1 ), (65f) (65g) (65h) ∗,−i where (65g) follows from using the definition of µt+1 [a1:t ](x−i t ) in the forward recursive step in (17) and the definition of the belief update in (46). Lemma 5: ∀i ∈ N , t ∈ T , (a1:t−1 , xi1:t ) ∈ Hti , ) ( T X ∗,i ∗,−i ∗ Rni (Xn , An ) a1:t−1 , xi1:t . (66) Vti (µ∗t [a1:t−1 ], xit ) = Eβt:T βt:T ,µt [a1:t−1 ] n=t 29 Proof: We prove the lemma by induction. For t = T , n o ∗,i ∗,−i ∗ EβT βT , µT [a1:T −1 ] RTi (XT , AT ) a1:T −1 , xi1:T X ∗,−i −i ∗,i i i = (aT |a1:T −1 , x−i RTi (xT , aT )µ∗T [a1:T −1 ](x−i T ) T )βT (aT |a1:T −1 , xT )βT (67a) x−i T aT = VTi (µ∗T [a1:T −1 ], xiT ), (67b) where (67b) follows from the definition of Vti in (14) and the definition of βT∗ in the forward recursion in (16). i Suppose the claim is true for t + 1, i.e., ∀i ∈ N , t ∈ T , (a1:t , xi1:t+1 ) ∈ Ht+1 ) ( T X ∗,i ∗,−i ∗ i (68) Rni (Xn , An ) a1:t , xi1:t+1 . (µ∗t+1 [a1:t ], xit+1 ) = Eβt+1:T βt+1:T , µt+1 [a1:t ] Vt+1 n=t+1 Then ∀i ∈ N , t ∈ T , (a1:t−1 , xi1:t ) ∈ Hti , we have ( T ) X ∗,i ∗,−i ∗ Eβt:T βt:T , µt [a1:t−1 ] Rni (Xn , An ) a1:t−1 , xi1:t n=t ∗,i ∗,−i βt:T βt:T , µ∗t [a1:t−1 ] =E ( T X n ∗,i ∗,−i ∗ Rti (Xt , At ) + Eβt:T βt:T , µt [a1:t−1 ] ) ) i Rni (Xn , An ) a1:t−1 , At , xi1:t , Xt+1 a1:t−1 , xi1:t (69a) n=t+1  ∗,i ∗,−i ∗ = Eβt:T βt:T , µt [a1:t−1 ] Rti (Xt , At )+ ( T ) ) X i Rni (Xn , An ) a1:t−1 , At , xi1:t , Xt+1 a1:t−1 , xi1:t (69b) n=t+1 n o i i ∗ i i =E Rt (Xt , At ) + Vt+1 (µt+1 [a1:t−1 At ], Xt+1 ) a1:t−1 , x1:t n o βt∗,i βt∗,−i , µ∗t [a1:t−1 ] i ∗ i i i =E Rt (Xt , At ) + Vt+1 (µt+1 [a1:t−1 At ], Xt+1 ) a1:t−1 , x1:t (69d) = Vti (µ∗t [a1:t−1 ], xit ), (69e) ∗,i ∗,−i βt:T βt:T , µ∗t [a1:t−1 ] (69c) where (69b) follows from Lemma 4 in Appendix D, (69c) follows from the induction hypothesis in (68), i (69d) follows because the random variables involved in expectation, Xt−i , At , Xt+1 do not depend on ∗,i ∗,−i βt+1:T βt+1:T and (69e) follows from the definition of βt∗ in the forward recursion in (16), the definition of µ∗t+1 in (17) and the definition of Vti in (14). A PPENDIX E P ROOF OF T HEOREM 2 Proof: We prove this by contradiction. Suppose for any equilibrium generating function φ that generates (β ∗ , µ∗ ) through forward recursion, there exists t ∈ T , i ∈ N , a1:t−1 ∈ Htc , such that for π t = µ∗t [a1:t−1 ], (13) is not satisfied for φ i.e. for γ̃ti = φi [π t ] = βt∗,i (·|µ∗t [a1:t−1 ], xit ), n o i γti (·|xi )γ̃t−i , πt i i i i γ̃t 6∈ arg max E Rt (Xt , At ) + Vt+1 (F (π t , γ̃t , At ), Xt+1 ) xt . (70) i γt 30 Let t be the first instance in the backward recursion when this happens. This implies ∃ γ bti such that n o i i −i i i (F (π t , γ̃t , At ), Xt+1 ) xit Eγbt (·|x )γ̃t , πt Rti (Xt , At ) + Vt+1 o n i i −i i i (F (π t , γ̃t , At ), Xt+1 (71) ) xit > Eγ̃t (·|x )γ̃t , πt Rti (Xt , At ) + Vt+1 This implies for βbt (·|µ∗t [a1:t−1 ], ·) = γ bti , ) ( T X ∗,i ∗,−i ∗ Rni (Xn , An ) a1:t−1 , xi1:t Eβt:T βt:T , µt [a1:t−1 ] n=t βt∗,i βt∗,−i , µ∗t [a1:t−1 ] =E ( T X n ∗,i ∗,−i ∗ Rti (Xt , At ) + Eβt:T βt:T , µt [a1:t−1 ] ) ) Rni (Xn , An ) a1:t−1 , At , xi1:t+1 a1:t−1 , xi1:t (72a) n=t+1 βt∗,i βt∗,−i , µ∗t [a1:t−1 ] =E ( T X n ∗,i ∗,−i ∗ Rti (Xt , At ) + Eβt+1:T βt+1:T , µt+1 [a1:t−1 ,At ] ) ) Rni (Xn , An ) a1:t−1 , At , xi1:t+1 a1:t−1 , xi1:t (72b) n=t+1 n o i i Rti (Xt , At ) + Vt+1 (F (π t , γ̃t , At ), Xt+1 ) xit o n ∗ i −i bi i i ) xit < Eβt (·|µt [a1:t−1 ],xt )γ̃t , πt Rti (Xt , At ) + Vt+1 (F (π t , γ̃t , At ), Xt+1 n ∗,i ∗,−i ∗ βbti βt∗,−i , µ∗t [a1:t−1 ] =E Rti (Xt , At ) + Eβt+1:T βt+1:T µt+1 [a1:t−1 ,At ] ( T ) o X i Rni (Xn , An ) a1:t−1 , At , xi1:t , Xt+1 a1:t−1 , xi1:t i i −i = Eγ̃t (·|xt )γ̃t , πt (72c) (72d) (72e) n=t+1 ∗,i ∗,−i βbti ,βt+1:T βt:T , µ∗t [a1:t−1 ] =E ( T X ) Rni (Xn , An ) a1:t−1 , xi1:t , (72f) n=t where (72b) follows from Lemma 4, (72c) follows from the definitions of γ̃ti and µ∗t+1 [a1:t−1 , At ] and Lemma 5, (72d) follows from (71) and the definition of βbti , (72e) follows from Lemma 3, (72f) follows from Lemma 4. However, this leads to a contradiction since (β ∗ , µ∗ ) is a PBE of the game. A PPENDIX F P ROOF OF T HEOREM 3 We divide the proof into two parts: first we show that the value function V i is at least as big as any reward-to-go function; secondly we show that under the strategy βi∗ , reward-to-go is V i . Part 1: For any i ∈ N , β i define the following reward-to-go functions ) (∞ X i i −i,∗ ∗ c (73a) Wti,β (hit ) = Eβ ,β ,µt [ht ] δ n−t Ri (Xn , An ) | hit ( T ) n=t X i,β i ,T i β i ,β −i,∗ ,µ∗t [hct ] n−t i δ R (Xn , An ) + δ T +1−t V i (ΠT +1 , XTi +1 ) | hit . Wt (ht ) = E (73b) n=t i Since X i , Ai are finite sets the reward Ri is absolutely bounded, the reward-to-go Wti,β (hit ) is finite ∀ i, t, β i , hit . 31 For any i ∈ N , hit ∈ Hti ,         i,β i i,β i ,T i,β i ,T i,β i ∗ c i i i ∗ c i i i i i (ht ) + Wt (ht ) − Wt (ht ) (74) V µt [ht ], xt − Wt (ht ) = V µt [ht ], xt − Wt Combining results from Lemmas 8 and 9 in Appendix G, the term in the first bracket in RHS of (74) is non-negative. Using (73), the term in the second bracket is   ∞ X  β i ,β −i,∗ ,µ∗ [hc ] n−(T +1) i i T +1−t i i t t − δ R (Xn , An ) + V (ΠT +1 , XT +1 ) | ht . E δ (75) n=T +1 The summation in the expression above is bounded by a convergent geometric series. Also, V i is bounded. Hence the above quantity can be made arbitrarily small by choosing T appropriately large. Since the LHS of (74) does not depend on T , this results in   i (76) V i µ∗t [hct ], xit ≥ Wti,β (hit ). Part 2: Since the strategy β ∗ generated in (21) is such that βti,∗ depends on hit only through µ∗t [hct ] i,∗ and xit , the reward-to-go Wti,β , at strategy β ∗ , can be written (with abuse of notation) as ) (∞ X i,∗ i,∗ ∗ ∗ c Wti,β (hit ) = Wti,β (µ∗t [hct ], xit ) = Eβ ,µt [ht ] (77) δ n−t Ri (Xn , An ) | µ∗t [hct ], xit . n=t For any hit ∈ Hti , i,∗ Wti,β (µ∗t [hct ], xit ) V i (µ∗t [hct ], xit ) β ∗ ,µ∗t [hct ] = E β ∗ ,µ∗t [hct ] = E  o n  i,β i,∗ ∗ c ∗ c i ∗ c i i R (Xt , At ) + δWt+1 F (µt [ht ], θ[µt [ht ]], At+1 ), Xt+1 | µt [ht ], xt  (78a)    ∗ c ∗ c i ∗ c i i i R (Xt , At ) + δV F (µt [ht ], θ[µt [ht ]], At+1 ), Xt+1 | µt [ht ], xt . (78b) Repeated application of the above for the first n time periods gives   t+n−1     X i,β i,∗ i,β i,∗ ∗ c i β ∗ ,µ∗t [hct ] m−t i n i ∗ c i δ R (Xt , At ) + δ Wt+n Πt+n , Xt+n | µt [ht ], xt (79a) Wt (µt [ht ], xt ) = E   m=t     t+n−1   X i ∗ c i β ∗ ,µ∗t [hct ] ∗ c i i m−t i n i V (µt [ht ], xt ) = E δ R (Xt , At ) + δ V Πt+n , Xt+n | µt [ht ], xt . (79b)   m=t Here Πt+n is the n−step belief update under strategy and belief prescribed by β ∗ , µ∗ . Taking differences results in i,∗ Wti,β (µ∗t [hct ], xit ) − V i (µ∗t [hct ], xit ) = δ n Eβ ∗ ,µ∗ [hc ] t t n i,∗ i,β Wt+n     o i i Πt+n , Xt+n − V i Πt+n , Xt+n | µ∗t [hct ], xit . (80) Taking absolute value of both sides then using Jensen’s inequality for f (x) = |x| and finally taking supremum over hit reduces to i,∗ sup Wti,β (µ∗t [hct ], xit ) − V i (µ∗t [hct ], xit ) hit ≤ δ n sup Eβ hit ∗ ,µ∗ [hc ] t t n o i,β i,∗ i Wt+n (Πt+n , Xt+n ) − V i (µ∗t [hct ], xit ) | µ∗t [hct ], xit . (81) Now using the fact that Wt+n , V i are bounded and that we can choose n arbitrarily large, we get i,∗ suphit |Wti,β (µ∗t [hct ], xit ) − V i (µ∗t [hct ], xit )| = 0. 32 A PPENDIX G I NTERMEDIATE L EMMA USED IN P ROOF OF T HEOREM 3 In this section, we present four lemmas. Lemma 6 and 7 are intermediate technical results needed in the proof of Lemma 8. Then the results in Lemma 8 and 9 are used in Appendix F for the proof of Theorem 3. The proofs for Lemma 6 and 7 below aren’t stated as they are analogous (the only difference being a non-zero terminal reward in the finite horizon model) to the proofs of Lemma 3 and 4, from Appendix D, used in the proof of Theorem 1. i Define the reward-to-go Wti,β ,T for any agent i and strategy β i as i Wti,β ,T (hit ) β i ,β −i,∗ ,µ∗t [hct ] =E T hX i δ n−t Ri (Xn , An ) + δ T +1−t Gi (ΠT +1 , XTi +1 ) | hit . (82) n=t Here agent i’s strategy is β whereas all other agents use strategy β −i,∗ defined above. Since X i , Ai are assumed to be finite and Gi absolutely bounded, the reward-to-go is finite ∀ i, t, β i , hit . In the following, any quantity with a T in the superscript refers the finite horizon model with terminal reward Gi . For further discussion, please refer to the comments after the statement of Theorem 3. Lemma 6: For any t ∈ T , i ∈ N , hit and β i ,  h  i i −i,∗ ∗ c i,T i F (µ∗t [hct ], βt∗ (·|µ∗t [hct ], ·), At ), Xt+1 Vti,T (µ∗t [hct ], xit ) ≥ Eβ ,β ,µt [ht ] Ri (Xt , At ) + δVt+1 | hit . (83) i Lemma 7: i −i,∗ ∗ c Eβt+1:T ,βt+1:T ,µt+1 [ht ,at ] T h X δ n−(t+1) Ri (Xn , An ) + δ T +1−t Gi (ΠT +1 , XTi +1 ) | hit , at , xit+1 i n=t+1 i ,β −i,∗ ,µ∗ [hc ] βt:T t t t:T =E T h X δ n−(t+1) i R (Xn , An ) + δ T +1−t i G (ΠT +1 , XTi +1 ) | hit , at , xit+1 i . (84) n=t+1 The result below shows that the value function from the backwards recursive algorithm is higher than any reward-to-go. Lemma 8: For any t ∈ T , i ∈ N , hit and β i , i Vti,T (µ∗t [hct ], xit ) ≥ Wti,β ,T (hit ). (85) Proof: We use backward induction for this. At time T , using the maximization property from (13) (modified with terminal reward Gi ), VTi,T (µ∗T [hcT ], xiT ) i,T (86a) h c (·|xiT ),γ̃T−i,T ,µ∗T [ht ]   i Ri (XT , AT ) + δGi F (µ∗T [hcT ], γ̃TT , AT ), XTi +1 | µ∗T [hcT ], xiT h   i i,T −i,T ∗ i c ≥ EγT (·|xT ),γ̃T ,µT [ht ] Ri (XT , AT ) + δGi F (µ∗T [hcT ], γ̃TT , AT ), XTi +1 | µ∗T [hcT ], xiT , Eγ̃T i = WTi,β ,T (hiT ) (86b) (86c) (86d) Here the second inequality follows from (13) and (14) and the final equality is by definition in (82). Assume that the result holds for all n ∈ {t + 1, . . . , T }, then at time t we have Vti,T (µ∗t [hct ], xit ) (87a) 33 i −i,∗ ≥ Eβt ,βt ,µ∗t [hct ] βti ,βt−i,∗ ,µ∗t [hct ] ≥E h  i  i,T i | hit Ri (Xt , At ) + δVt+1 F (µ∗t [hct ], βt∗ (·|µ∗t [hct ], ·), At ), Xt+1 T h h X −i,∗ i i βt+1:T ,βt+1:T ,µ∗t+1 [hct ,At ] R (Xt , At ) + δE δ n−(t+1) Ri (Xn , An ) (87b) (87c) n=t+1 +δ T −t i G (ΠT +1 , XTi +1 ) i ,β −i,∗ ,µ∗ [hc ] βt:T t t t:T =E T hX δ | i hit , At , Xt+1 n−t i i | hit i R (Xn , An ) + δ T +1−t i G (ΠT +1 , XTi +1 ) | hit i (87d) n=t i = Wti,β ,T (hit ) (87e) Here the first inequality follows from Lemma 6, the second inequality from the induction hypothesis, the third equality follows from Lemma 7 and the final equality by definition (82). The following result highlights the similarities between the fixed-point equation in infinite horizon and the backwards recursion in the finite horizon. Lemma 9: Consider the finite horizon game with Gi ≡ V i . Then Vti,T = V i , ∀ i ∈ N , t ∈ {1, . . . , T } satisfies the backwards recursive construction stated above (adapted from (13) and (14)). Proof: Use backward induction for this. Consider the finite horizon algorithm at time t = T , noting i i that VTi,T +1 ≡ G ≡ V , h  i  −i,T −i i i γ̃Ti,T (· | xiT ) ∈ argmax EγT (·|xT ),γ̃T ,πT Ri (XT , AT ) + δV i F (π T , γ̃TT , AT ), XTi +1 | π T , xiT (88a) γTi (·|xiT )∈∆(Ai ) i,T VTi,T (π T , xiT ) = Eγ̃T (·|xiT ),γ̃T−i,T ,π −i T h  i  Ri (XT , AT ) + δV i F (π T , γ̃TT , AT ), XTi +1 | π T , xiT . (88b) Comparing the above set of equations with (20), we can see that the pair (V, γ̃) arising out of (20) satisfies the above. Now assume that Vni,T ≡ V i for all n ∈ {t + 1, . . . , T }. At time t, in the finite horizon i,T construction from (13), (14), substituting V i in place of Vt+1 from the induction hypothesis, we get the i,T i same set of equations as (88). Thus Vt ≡ V satisfies it. A PPENDIX H P ROOF OF T HEOREM 4 Denote the vector correspondence defined by the RHS of (27) by     φ1 (x) argmaxa af1 (x)  .    ..  ..  =  φ(x) =  .     φ4 (x) (89) argmaxd df4 (x) where x = (x, y, w, z). For any x ∈ [0, 1]4 , φ(x) is non-empty and closed, since the argmax solution always exists and is one of {0}, {1}, [0, 1]. If in addition φ also has a closed graph then by Kakutani Fixed Point Theorem there exists a solution to (27). Consider any sequence (xn , an , bn , cn , dn ) → (x0 , a0 , b0 , c0 , d0 ) such that ∀ n ≥ 1, an ∈ argmax af1 (xn ), a∈[0,1] cn ∈ argmax cf3 (xn ), c∈[0,1] bn ∈ argmax bf2 (xn ), (90a) b∈[0,1] dn ∈ argmax df4 (xn ). d∈[0,1] (90b) 34 We need to verify that (90) also holds for the limit (x0 , a0 , b0 , c0 , d0 ). If x0 ∈ / D then due to continuity, (90) indeed holds at the limit. For x0 ∈ D, for any i ∈ S(x0 ) if fi (x0 ) = 0 then in the relation to be verified, the requirement is either of a0 , b0 , c0 , d0 ∈ [0, 1], which is always true. For x0 ∈ D1 ∩ D2{ ∩ D3{ ∩ D4{ , if f1 (x0 ) > 0 then for any sequence xn → x0 , for large n the points in the sequence are within B (x0 ) and thus f1 (xn ) > 0 for large n. This means that the relation from (90) holds at the limit (noting that f2 , f3 , f4 are continuous at x0 in this case). Similarly if f1 (x0 ) < 0 and for any x0 ∈ D1{ ∩ D2 ∩ D3{ ∩ D4{ .For x0 ∈ D1 ∩ D2 ∩ D3{ ∩ D4{ if f1 (x0 ) > 0 and f2 (x0 ) < 0 then there exists an  > 0 such that ∀ x ∈ B (x0 ) we have f1 (x) > 0 and f2 (x) < 0. From this it follows that the relation (90) holds at the limit. Similar argument works for any other sign combination of f1 , f2 , f3 , f4 . The two arguments above cover all cases. R EFERENCES [1] L. S. Shapley, “Stochastic games,” Proceedings of the national academy of sciences, vol. 39, no. 10, pp. 1095–1100, 1953. [2] T. Başar and G. Olsder, Dynamic Noncooperative Game Theory, 2nd Edition. Society for Industrial and Applied Mathematics, 1998. [3] J. Filar and K. Vrieze, Competitive Markov decision processes. Springer Science & Business Media, 2012. [4] M. J. Osborne and A. Rubinstein, A Course in Game Theory, ser. MIT Press Books. The MIT Press, 1994, vol. 1. [5] D. Fudenberg and J. Tirole, Game Theory. Cambridge, MA: MIT Press, 1991. [6] G. J. Mailath and L. Samuelson, Repeated games and reputations: long-run relationships. Oxford university press, 2006. [7] E. Maskin and J. Tirole, “Markov perfect equilibrium: I. observable actions,” Journal of Economic Theory, vol. 100, no. 2, pp. 191–219, 2001. [8] R. Ericson and A. Pakes, “Markov-perfect industry dynamics: A framework for empirical work,” The Review of Economic Studies, vol. 62, no. 1, pp. 53–82, 1995. [9] D. Bergemann and J. Välimäki, “Learning and strategic pricing,” Econometrica: Journal of the Econometric Society, pp. 1125–1149, 1996. [10] D. Acemoğlu and J. A. Robinson, “A theory of political transitions,” American Economic Review, pp. 938–963, 2001. [11] D. M. Kreps and J. Sobel, “Chapter 25 signalling,” ser. Handbook of Game Theory with Economic Applications. Elsevier, 1994, vol. 2, pp. 849 – 867. [12] U. Doraszelski and A. Pakes, “A framework for applied dynamic analysis in IO,” Handbook of industrial organization, vol. 3, pp. 1887–1966, 2007. [13] E. Altman, V. Kambley, and A. Silva, “Stochastic games with one step delay sharing information pattern with application to power control,” in Game Theory for Networks, 2009. GameNets’ 09. International Conference on. IEEE, 2009, pp. 124–129. 35 [14] A. Nayyar, A. Gupta, C. Langbort, and T. Başar, “Common information based Markov perfect equilibria for stochastic games with asymmetric information: Finite games,” IEEE Trans. Automatic Control, vol. 59, no. 3, pp. 555–570, March 2014. [15] M. Spence, “Job market signaling,” The quarterly journal of Economics, pp. 355–374, 1973. [16] S. J. Grossman, “The informational role of warranties and private disclosure about product quality,” The Journal of Law & Economics, vol. 24, no. 3, pp. 461–483, 1981. [17] C. Wilson, “A model of insurance markets with incomplete information,” Journal of Economic theory, vol. 16, no. 2, pp. 167–207, 1977. [18] M. Rothschild and J. Stiglitz, “Equilibrium in competitive insurance markets: An essay on the economics of imperfect information,” in Foundations of Insurance Economics. Springer, 1976, pp. 355–375. [19] A. Zahavi, “Mate selection–a selection for a handicap,” Journal of theoretical Biology, vol. 53, no. 1, pp. 205–214, 1975. [20] A. V. Banerjee, “A simple model of herd behavior,” The Quarterly Journal of Economics, pp. 797– 817, 1992. [21] S. Bikhchandani, D. Hirshleifer, and I. Welch, “A theory of fads, fashion, custom, and cultural change as informational cascades,” Journal of Political Economy, vol. 100, no. 5, pp. pp. 992–1026, 1992. [Online]. Available: http://www.jstor.org/stable/2138632 [22] L. Smith and P. Sörensen, “Pathological outcomes of observational learning,” Econometrica, vol. 68, no. 2, pp. 371–398, 2000. [Online]. Available: http://dx.doi.org/10.1111/1468-0262.00113 [23] N. R. Devanur, Y. Peres, and B. Sivan, “Perfect Bayesian equilibria in repeated sales,” in Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms. SIAM, 2015, pp. 983– 1002. [24] Y.-C. Ho, “Team decision theory and information structures,” Proceedings of the IEEE, vol. 68, no. 6, pp. 644–654, 1980. [25] A. Nayyar, A. Mahajan, and D. Teneketzis, “Optimal control strategies in delayed sharing information structures,” IEEE Trans. Automatic Control, vol. 56, no. 7, pp. 1606–1620, July 2011. [26] A. Gupta, A. Nayyar, C. Langbort, and T. Başar, “Common information based Markov perfect equilibria for linear-gaussian games with asymmetric information,” SIAM Journal on Control and Optimization, vol. 52, no. 5, pp. 3228–3260, 2014. [27] Y. Ouyang, H. Tavafoghi, and D. Teneketzis, “Dynamic oligopoly games with private Markovian dynamics,” in Proc. 54th IEEE Conf. Decision and Control (CDC), 2015. [28] L. Li and J. Shamma, “Lp formulation of asymmetric zero-sum stochastic games,” in 53rd IEEE Conference on Decision and Control, Dec 2014, pp. 1930–1935. [29] H. L. Cole and N. Kocherlakota, “Dynamic games with hidden actions and hidden states,” Journal of Economic Theory, vol. 98, no. 1, pp. 114–126, 2001. [30] A. Nayyar, A. Mahajan, and D. Teneketzis, “Decentralized stochastic control with partial history sharing: A common information approach,” IEEE Transactions on Automatic Control, vol. 58, no. 7, pp. 1644–1658, July 2013. [31] A. Mahajan, “Optimal decentralized control of coupled subsystems with control sharing,” Automatic 36 [32] [33] [34] [35] [36] [37] [38] [39] [40] Control, IEEE Transactions on, vol. 58, no. 9, pp. 2377–2382, 2013. A. Mahajan and D. Teneketzis, “On the design of globally optimal communication strategies for real-time communcation systems with noisy feedback,” IEEE J. Select. Areas Commun., no. 4, pp. 580–595, May 2008. A. Nayyar and D. Teneketzis, “On globally optimal real-time encoding and decoding strategies in multi-terminal communication systems,” in Proc. IEEE Conf. on Decision and Control, Cancun, Mexico, Dec. 2008, pp. 1620–1627. D. Vasal and A. Anastasopoulos, “Stochastic control of relay channels with cooperative and strategic users,” IEEE Transactions on Communications, vol. 62, no. 10, pp. 3434–3446, Oct 2014. I.-K. Cho and D. M. Kreps, “Signaling games and stable equilibria,” The Quarterly Journal of Economics, vol. 102, no. 2, pp. 179–221, 1987. I.-K. Cho, “A refinement of sequential equilibria,” Econometrica, vol. 55, no. 6, pp. 1367–1389, 1987. J. S. Banks and J. Sobel, “Equilibrium selection in signaling games,” Econometrica, vol. 55, no. 3, pp. 647–661, 1987. J. Nash, “Non-cooperative games,” Annals of mathematics, pp. 286–295, 1951. D. Vasal and A. Anastasopoulos, “Signaling equilibria for dynamic LQG games with asymmetric information,” in Proc. IEEE Conf. on Decision and Control, Dec. 2016, pp. 6901–6908. ——, “Decentralized Bayesian learning in dynamic games,” in Proc. Allerton Conf. Commun., Control, Comp., Sept. 2016.
3cs.SY
Phase Transitions, Optimal Errors and Optimality of Message-Passing in Generalized Linear Models Jean Barbier†,♦,⊗ , Florent Krzakala? , Nicolas Macris† , Léo Miolane∗,⊗ and Lenka Zdeborová∪ arXiv:1708.03395v2 [cs.IT] 3 Nov 2017 Abstract We consider generalized linear models (GLMs) where an unknown n-dimensional signal vector is observed through the application of a random matrix and a non-linear (possibly probabilistic) componentwise output function. We consider the models in the high-dimensional limit, where the observation consists of m points, and m/n → α where α stays finite in the limit m, n → ∞. This situation is ubiquitous in applications ranging from supervised machine learning to signal processing. A substantial amount of theoretical work analyzed the model-case when the observation matrix has i.i.d. elements and the components of the ground-truth signal are taken independently from some known distribution. While statistical physics provided number of explicit conjectures for special cases of this model, results existing for non-linear output functions were so far non-rigorous. At the same time GLMs with non-linear output functions are used as a basic building block of powerful multilayer feedforward neural networks. Therefore rigorously establishing the formulas conjectured for the mutual information is a key open problem that we solve in this paper. We also provide an explicit asymptotic formula for the optimal generalization error, and confirm the prediction of phase transitions in GLMs. Analyzing the resulting formulas for several non-linear output functions, including the rectified linear unit or modulus functions, we obtain quantitative descriptions of information-theoretic limitations of high-dimensional inference. Our proof technique relies on a new version of the interpolation method with an adaptive interpolation path and is of independent interest. Furthermore we show that a polynomial-time algorithm referred to as generalized approximate message-passing reaches the optimal generalization error for a large set of parameters. Contents 1 Introduction 2 2 Setting and main results 2.1 Generalized linear estimation: Problem statement . . . . . . . . . . . . 2.2 Two scalar inference channels . . . . . . . . . . . . . . . . . . . . . . . 2.3 Replica-symmetric formula and mutual information . . . . . . . . . . . 2.4 The case of discrete channels . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Optimality of the generalized approximate message-passing algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 6 7 8 10 † Laboratoire de Théorie des Communications, Faculté Informatique et Communications, Ecole Polytechnique Fédérale de Lausanne, Suisse. ♦ Probability and Applications Group, School of Mathematical Sciences, Queen Mary University of London, United-Kingdom. ? Laboratoire de Physique Statistique, CNRS & Université Pierre et Marie Curie & École Normale Supérieure & PSL Université, Paris, France. ∗ Département d’Informatique de l’ENS, École Normale Supérieure & CNRS & PSL Research University & Inria, Paris, France. ∪ Institut de Physique Théorique, CNRS & CEA & Université Paris-Saclay, Saclay, France. ⊗ Corresponding authors: [email protected], [email protected] 1 3 Optimal errors in supervised learning 3.1 Teacher-student scenario . . . . . . . . . . . . . . . . . . . . 3.2 Generalization error . . . . . . . . . . . . . . . . . . . . . . . 3.3 Computing the generalization error . . . . . . . . . . . . . . 3.4 Computing the optimal errors with (small) side information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 12 12 13 4 Application to concrete situations 15 4.1 Generic observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2 Phase diagrams of perfect learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 Examples of optimal generalization error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5 Proof of the replica formula by the adaptive interpolation method 5.1 Interpolating estimation problem . . . . . . . . . . . . . . . . . . . 5.2 Free entropy variation along the interpolation path . . . . . . . . . 5.3 Overlap concentration . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Canceling the remainder . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Lower and upper matching bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 23 25 26 27 28 Appendix A Some technicalities A.1 The Nishimori identity . . . . . . . . . A.2 Some properties of the scalar channels A.3 Proof of Theorem 2 . . . . . . . . . . . A.4 Proof of Proposition 1 . . . . . . . . . . A.5 Boundedness of an overlap fluctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 29 29 32 34 35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix B Proofs of the limits of optimal errors 36 B.1 Computation of the denoising error: Proof of Corollary 3 . . . . . . . . . . . . . . . . . . . . . 36 B.2 Optimal generalization error with side information: Proof of Proposition 2 . . . . . . . . . . . 37 Appendix C Proof of Proposition 4 37 C.1 Proof of (114) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 C.2 Proof that An vanishes as n → ∞ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Appendix D Approximation 41 D.1 Relaxing the hypotheses on P0 and Φ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 D.2 Relaxing the hypotheses on ϕ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Appendix E A sup-inf formula 45 Appendix F Concentration of free entropy and overlaps 48 F.1 Concentration of the free entropy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 F.2 Concentration of the overlap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 1 Introduction Modern statistical analysis and signal processing require solving very high-dimensional estimation problems with a very large number of parameters. This paradigm arises in problems as diverse as learning with neural networks [54] and regression problems [22] or compressed sensing in signal processing [24, 30]. Developing algorithms up to these tasks, and understanding their limitations, has become a major challenge in computer science, machine learning and statistics. 2 In many examples, it has been empirically observed that both the inference and learning tasks appear to have intrinsic limitations when the available data becomes too scarce or too noisy. In some cases these apparent thresholds are related to information-theoretic phenomena: There is simply not enough information in the dataset. This is the case, as famously discussed by Shannon in his seminal paper on communication theory [74], for the task of reconstructing a noisy signal when the noise is beyond the so-called Shannon capacity of the communication channel. In many situations, including communications, there also seem to exist jumps in the computational hardness, beyond which the most sophisticated known algorithms take exponential time to solve the task: In this case the problem has become too complicated to be solved efficiently. A substantial amount of work suggests that one can understand and locate these fundamental barriers in a range of statistical models by thinking of them as phase transitions in the sense of physics. In fact, over the last three decades or so, a large body of interdisciplinary work in the statistical physics community has been applied to such problems [32,34,35,59,60,65,73,81,84] considering random instances, generated by given statistical models, and then locating these phase transitions. Such models are in fact being widely used in fields as diverse as (without any pretension of exhaustivity) statistical learning [3,17,28,33,38], compressed sensing and signal processing [9, 11, 21, 29, 31, 55, 56, 62, 70, 84], communication theory [6, 12, 15, 41, 77], community detection in networks [2, 23, 27, 51], combinatorial optimization problems [7, 50, 59] or to model the behavior of neurons or neural nets [4, 5, 73, 81]. Many of these works, especially in the context of compressed sensing and machine learning, relied however on non-rigorous methods, using instead powerful heuristics like the replica and cavity approaches [60]. In the present contribution we leverage on these pioneering works and provide instead rigorous asymptotic predictions in the case of generalized linear estimation models [64]. This includes a range of statistical models of interest in many scientific fields such as random linear estimation in statistics, the teacher-student singlelayer perceptron problem, probit classification or quantized compressed sensing. For all these estimation and learning problems our results completely vindicate the physics results —closing in some cases conjectures open since almost three decades [16, 36, 42]— and considerably extend them. We also establish the value of the generalization error after an optimal learning, which gives a bound on how accurately any algorithm is able to predict outcome values for previously unseen data. We compare the optimal results with the algorithmic ones provided by message-passing algorithms [31,70, 84] and observe that, while optimal performances are often thought to be intractable, in the present setting they can actually be obtained using a polynomial-time scheme for a large set of parameters. There exists, however, an interesting region of parameters where all so far known algorithms fail to provide a satisfactory answer to the estimation and learning problems, while it is nevertheless information-theoretically possible to do so. In this case there is a significant gap between what currently known polynomial algorithms can do and what should be expected from the information-theoretic point of view. Finally, our proof technique has an interest on its own. It exploits a powerful new technique called the adaptive1 interpolation method [13] that is applicable to many other open problems in statistical estimation. We informally summarise our main contributions here: • We consider generalized linear estimation models where, given an unknown signal vector X∗ , one is  given the measurement vector Y = ϕ √1n ΦX∗ , with Φ a known random matrix with i.i.d. entries of zero mean, and where ϕ (that can be probabilistic) acts componentwise. • Our first main result is the rigorous determination of the expression of the (conditional) entropy H(Y|Φ) of the observation variable, a quantity often called “the averaged free energy” in the statistical physics literature, in the “high-dimensional regime” where the signal dimensionality n as well as the number of In [13] the method involves a discrete time stochastic process and is called “stochastic interpolation method.” For dense graphical problems one can easily take a continuum limit in which the stochastic process does not appear explicitly and the method is better called “adaptive interpolation method.” 1 3 observations m are jointly growing such that m/n → α > 0. As we shall see, many statistical quantities of interest, such as the mutual information between the observation and the unknown signal or the Bayes-optimal generalization error, can be computed from this expression. We provide the proof of this expression —which is our main technical contribution— in the last section. Only the simple linear case was known rigorously so far [10, 14, 71], whereas including the non-linearity is an absolutely key element towards building more powerful multilayer neural networks. In fact, our results cover a number of cases discussed in the literature, often anticipated by statistical physics techniques, and allow to rigorously prove many predictions obtained by the heuristic replica method. The expression for the entropy was first famously conjectured in 1989 in [36] for the particular case of ϕ(x) = sgn(x), a work that is at the basis of many significant developments. The generic formula was also recently conjectured on the same heuristic basis [84]. Our proof yields a spectacular confirmation of the cavity and replica methods. • We demonstrate (with the technical assumption of the presence of small side-information, which is equivalent to the presence of a small vanishing magnetic field in physics) the formula for the minimum mean-square-error (MMSE) for the reconstruction of the unknown signal in the generalized linear estimation model. • We also compute (under the same technivcal assumption) the Bayes-optimal generalization error in the context of a supervised learning task of a rule used by the model (the so-called teacher-student setting). This estimator is optimal in the sense that it minimizes the label (the value of the output of ϕ) mean-square-error among all possible student estimators. Again, this formula was anticipated with the heuristic cavity and replica methods, and was proposed, for the restricted case ϕ(x) = sgn(x) (the so-called perceptron problem), in pioneering works in the statistical physics community [42, 66, 73]. • While these results are information-theoretic, we also consider the performance of a well-known algorithm to solve random instances of generalized linear estimation problems, called generalized approximate message-passing (GAMP [31, 70, 84]). This algorithm, which also originated from statistical physics [5, 46, 58, 78], is expected to be particularly powerful on these random instances, as proven for instance for compressed sensing [14, 31, 52, 79]. Indeed we show that, for a large set of problems and a large region of parameters, GAMP yields an optimal generalization error. There exists, however, a region of parameters where GAMP does not reach the optimal results. It remains a challenging open problem whether a polynomial algorithm that outperforms GAMP in this region exists. • Finally, we study in depth the situation for many given choices of the function ϕ, and identify sharp phase transitions and novel phase diagrams. By locating these transitions we clarify the difficulties and challenges in solving complex non-linear high-dimensional statistical problems in many modelsituations, and characterize these problems in terms of optimal information-theoretical reconstruction. 2 Setting and main results 2.1 Generalized linear estimation: Problem statement We now give a generic description of the observation model. Note that we describe here an estimation (or inference) problem. In the title of the paper, we refer to generalized linear models. This is a very general setting that will allow us to consider supervised learning problems (see Sec. 3). Precise hypotheses are given below in Sec. 2.3. 4 Let n, m ∈ N∗ . Let P0 be a probability distribution over R and let (Xi∗ )ni=1 i.i.d. ∼ P0 be the components i.i.d. ∗ ∗ of a signal vector X (this is also denoted X ∼ P0 ). We fix a function ϕ : R × RkA → R and consider i.i.d. kA (Aµ )m µ=1 ∼ PA , where PA is a probability distribution over R , kA ∈ N. We acquire m measurements through  √  1 Yµ = ϕ √ [ΦX∗ ]µ , Aµ + ∆Zµ , n (1) 1 ≤ µ ≤ m, i.i.d. where (Zµ )m µ=1 ∼ N (0, 1) is an additive Gaussian noise, ∆ > 0, and Φ is a m × n measurement matrix with i.i.d. Φµi ∼ N (0, 1) entries (this hypothesis will actually be relaxed, see Sec. 2.3). The estimation problem is to recover X∗ from the knowledge of Y = (Yµ )m of the random µ=1 , ϕ, Φ, ∆, P0 and PA (the realization Pn ∗ stream A itself, if present in the model, is unknown). We use the notation [ΦX ]µ = i=1 Φµi Xi∗ . When ϕ(x, A) = ϕ(x) = x we have a random linear estimation problem, whereas if, say, ϕ(x) = sgn(x) we have a noisy single layer perceptron. Sec. 3 discusses various examples related to non-linear estimation and supervised learning. It is also fruitful to think of the measurements as the outputs of a “channel”,   1 Yµ ∼ Pout · √ [ΦX∗ ]µ n (2) where the transition density, with respect to (w.r.t.) Lebesgue’s measure, is Z  1 1 2 Pout y x = √ dPA (a)e− 2∆ (y−ϕ(x,a)) . 2π∆ (3) Our hypotheses ensure that this is a well defined density. In fact (3) is sometimes called a “random function representation” of a transition kernel. Our analysis uses both representations (1) and (2). Throughout this paper we often adopt the language of statistical mechanics. In particular the random variables Y (and also Φ, X∗ , A, Z) are called quenched variables because once the measurements are acquired they have a “fixed realization.” An expectation taken w.r.t. all quenched random variables appearing in an expression will simply be denoted by E without subscript. Subscripts are only used when the expectation carries over a subset of random variables appearing in an expression or when some confusion could arise. A fundamental role is played by the joint posterior distribution of (the signal) x and of (the random stream) a given the quenched measurements Y (recall that X∗ , A and Z are unknown). The prior over the signal is Q Q denoted dP0 (x) = ni=1 dP0 (xi ), and similarly dPA (a) = m µ=1 dPA (aµ ). According to the Bayes formula this joint posterior is given by m dP (x, a|Y, Φ) = Y 1 1 − 1 √ dP0 (x)dPA (a) e 2∆ Z(Y, Φ) 2π∆ µ=1 2 Yµ −ϕ( √1n [Φx]µ ,aµ ) , (4) where the partition function (the normalization factor) is defined as Z Z(Y, Φ) := m Y 1 − 1 √ dP0 (x)dPA (a) e 2∆ 2π∆ µ=1 5 2 Yµ −ϕ( √1n [Φx]µ ,aµ ) . (5) Marginalizing (4) w.r.t. a yields the posterior of x, namely 1 dP0 (x)e−H(x;Y,Φ) , Z(Y, Φ) Z Z(Y, Φ) = dP0 (x)e−H(x;Y,Φ) , dP (x|Y, Φ) = (6) (7) where the Hamiltonian is defined as H(x; Y, Φ) := − m X   1 ln Pout Yµ √ [Φx]µ . n µ=1 (8) From the point of view of statistical mechanics (6) is a Gibbs distribution and the integration over dP0 (x) in the partition function is best thought as a “sum over annealed or fluctuating degrees of freedom” (note that in the representation (5), (aµ )m µ=1 also play the role of annealed variables). Let us introduce a standard statistical mechanics notation for the expectation w.r.t. the joint posterior (4), the so called Gibbs bracket h−i defined as Z hg(x, a)i := dP (x, a|Y, Φ)g(x, a) (9) for any continuous bounded function g. The main quantity of interest here is the associated averaged free entropy (or minus the averaged free energy) fn := 1 E ln Z(Y, Φ) . n (10) It is perhaps useful to stress that Z(Y, Φ) is nothing else than the density of Y conditioned on Φ so we have the explicit representation (used later on) Z 1 fn = EΦ dYZ(Y, Φ) ln Z(Y, Φ) n Z Z 1 ∗ (11) = EΦ dYdP0 (X∗ )e−H(X ;Y,Φ) ln dP0 (x) e−H(x;Y,Φ) , n Q where dY = m µ=1 dYµ . Thus fn is minus the conditional entropy −H(Y|Φ)/n of the measurements. One of the main contributions of this paper is the derivation, thanks to the adaptive interpolation method, of the thermodynamic limit limn→∞ fn in the “high-dimensional regime”, namely when n, m → ∞ while m/n → α > 0 (α is sometimes referred to as the “measurement rate” in compressed sensing terminology). 2.2 Two scalar inference channels An important role in our proof of the asymptotic expression of the free entropy is played by simple scalar inference channels. As we will see, the free entropy is expressed in terms of the free entropy of these channels. This “decoupling property” results from the mean-field approach in statistical physics, used through in the replica method to perform a formal calculation of the free entropy of the model [59,60]. Let us now introduce these two scalar denoising models. The first one is an additive Gaussian channel. Let r ≥ 0, which plays the role of a signal-to-noise ratio (snr). Suppose that X0 ∼ P0 and that we observe Y0 = √ r X 0 + Z0 , (12) where Z0 ∼ N (0, 1) independently of X0 . Consider the inference problem consisting of retrieving X0 from 6 the observations Y0 . The associated posterior distribution is √ 2 dP0 (x)e r Y0 x−rx /2 √ . dP (x|Y0 ) = R dP0 (x)e r Y0 x−rx2 /2 (13) In this expression all the x-independent terms have been simplified between the numerator and the normalization. The free entropy associated with this channel is just the expectation of the logarithm of the normalization factor Z √ 2 ψP0 (r) := E ln dP0 (x)e r Y0 x−rx /2 . (14) The basic properties of ψP0 are presented in Appendix A.2.1. The second scalar channel that appears naturally in the problem is linked to the transition kernel Pout through the following inference model. Suppose that V, W ∗ i.i.d. ∼ N (0, 1) where V is known while the inference ∗ problem is to recover the unknown W from the following observation  √ √ Ye0 ∼ Pout · | q V + ρ − q W ∗ , (15) where ρ > 0, q ∈ [0, ρ] and Pout is the transition density defined in (3). The free entropy for this model, again related to the normalization factor of the posterior dP (w|Ye0 , V ), is Z  √ √ (16) ΨPout (q; ρ) = ΨPout (q) := E ln DwPout Ye0 | q V + ρ − q w , 2 where Dw = dw(2π)−1/2 e−w /2 is the standard Gaussian measure. We prove in Appendix A.2.2 that this function is convex, differentiable and non-decreasing w.r.t. its first argument. √ √ √ Recall that we consider here Pout to be of the form (3), so that Ye0 = ϕ( q V + ρ − q W ∗ , A) + ∆Z, where A ∼ PA and Z ∼ N (0, 1), independently of any other random variable. In the sequel, the joint posterior distribution of (W ∗ , A) given (V, Ye0 ) will be particularly useful, so we define the Gibbs bracket for the scalar channel (15) by: 1 e− 2∆ Z hg(w, a)isc = DwdPA (a) R 2 √ √ Ye0 −ϕ( q V + ρ−q w,a) 2 √ √ 1 − 2∆ Ye0 −ϕ( q V + ρ−q w,a) g(w, a) , (17) DwdPA (a)e for any continuous bounded function g. 2.3 Replica-symmetric formula and mutual information Let us now introduce our first main result, a single-letter replica-symmetric formula for the asymptotic free entropy of model (1), (2). The result holds under the following rather general hypotheses. We will consider two cases: The case where the entries of Φ are i.i.d. standard Gaussian random variables and the case of general distributions. This leads to two sets of hypotheses. (h1) The prior distribution P0 admits a finite second moment and has at least two points in its support. (h2) There exists γ > 0 such that the sequence (E[|ϕ( √1n [ΦX∗ ]1 , A1 )|2+γ ])n≥1 is bounded. (h3) (Φµi ) i.i.d. ∼ N (0, 1). In the non-Gaussian case, the hypothesis (h3) has to be replaced by the following hypotheses: (h3.a) The prior distribution P0 admits a finite third moment. 7 (h3.b) The random variables (Φµi ) are independent with zero mean, unit variance and finite third moment that is bounded with n. (h3.c) For almost-all values of a ∈ RkA (w.r.t. PA ), the function x 7→ ϕ(x, a) is continuous almost everywhere. Let us define the replica-symmetric potential (or just potential). Call ρ := E[(X ∗ )2 ] where X ∗ ∼ P0 . Then the potential is fRS (q, r; ρ) = fRS (q, r) := ψP0 (r) + αΨPout (q; ρ) − rq . 2 (18) We define also fRS (ρ, +∞) = limr→∞ fRS (ρ, r). From now on denote ψP0 0 (r) and Ψ0Pout (q) = Ψ0Pout (q; ρ) the derivatives of ψP0 (r) and ΨPout (q; ρ) w.r.t. their first argument. We need also to define the set of the critical points of fRS : ( ) q = 2ψP0 0 (r) Γ := (q, r) ∈ [0, ρ] × (R+ ∪ {+∞}) , (19) r = 2αΨ0Pout (q; ρ) where, with a slight abuse of notation, we define ψP0 0 (+∞) = limr→∞ ψP0 0 (r) and Ψ0Pout (ρ) = limq→ρ Ψ0Pout (q). These limits are well defined by convexity of ψP0 and ΨPout . The elements of Γ are called “fixed points of the state evolution”. The main theorem of this paper is Theorem 1 (Replica-symmetric formula). Suppose that hypotheses (h1) and (h2) hold. Suppose that either (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, for the generalized linear estimation model (1), (2) the thermodynamic limit of the free entropy (10) verifies f∞ := lim fn = sup inf fRS (q, r) = sup fRS (q, r) . n→∞ q∈[0,ρ] r≥0 (20) (q,r)∈Γ Moreover, the “sup inf” and the supremum over Γ in (20) are achieved over the same couples. An immediate corollary of Theorem 1 is the limiting expression of the mutual information between the observations and the hidden variables. Corollary 1 (Single-letter formula for the mutual information). The thermodynamic limit of the mutual information for model (1), (2) between the observations and the hidden variables verifies in := 1 α I(X∗ , A; Y |Φ) −−−→ i∞ := −f∞ − (1 + ln(2π∆)) . n→∞ n 2 (21) Proof. This follows from a simple calculation: 1 P (Y, X∗ , A|Φ) 1 1 I(X∗ , A; Y|Φ) = E ln = − E ln P (Y|Φ) + E ln P (Y|X∗ , A, Φ) ∗ n P (Y|Φ)P (X , A|Φ) n n m X 1 m = −fn − (Yµ − ϕ([ΦX∗ ]µ , Aµ ))2 − E ln(2π∆) 2n∆ 2n µ=1 m m = −fn − − ln(2π∆) . 2n 2n 2.4 (22) The case of discrete channels A natural question to ask now is: Can we extend the previous results without the Gaussian noise in (1)? This question seems to be non-trivial for various reasons. First, without the “regularizing” Gaussian noise, the 8 transition kernel Pout may not have a density w.r.t. Lebesgue’s measure: How should we define the “entropylike” quantities that we study? Second, even in the situation where the transition kernel admits a density, it seems not totally obvious to justify the ∆ → 0 limit in Theorem 1. This is mostly due to the fact that Shannon’s entropy is not continuous w.r.t. the weak convergence, see for instance [69]. The results of [69] provide sufficient conditions that the densities should verify in order to have convergence of the entropies. So it should be possible to take the ∆ → 0 limit in Theorem 1 at the cost of additional technical assumptions, but we prefer for simplicity to only consider discrete transition kernels. Therefore, in this section we assume that ϕ takes its values in a finite set. We suppose also that hypotheses (h1) and (h2) hold, and that either (h3) or (h3.a)-(h3.b)-(h3.c) hold. We define ξn := 1 E ln n Z dP0 (x)dPA (a) m     1  Y 1 δ ϕ √ [ΦX∗ ]µ , Aµ − ϕ √ [Φx]µ , aµ , n n µ=1 (23) and for q ∈ [0, ρ], Z Ψϕ (q) = E ln  √ √ √ √ dPA (a)Dw δ ϕ( q V + ρ − q W, A) − ϕ( q V + ρ − q w, a) , (24) where V, W i.i.d. ∼ N (0, 1) and A ∼ PA are independent random variables. Theorem 2 (Replica-symmetric formula for discrete channels). Suppose that hypotheses (h1) and (h2) hold. Suppose that either (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, for the generalized linear estimation model (1) with ∆ = 0 and an output function ϕ taking values in a finite set, the thermodynamic limit of the free entropy (23) verifies n rq o . (25) ξn −−−→ sup inf ψP0 (r) + αΨϕ (q) − n→∞ q∈[0,ρ] r≥0 2 The proof of Theorem 2 is presented in Appendix A.3. As an application of Theorem 2 we can compute the free energy of the “planted perceptron” on the hypercube and the sphere. This perceptron model has already been studied in physics [36] and more recently in statistics, where it is known as “one-bit compressed sensing” [21, 83]. The limit of the free entropy follows from an application of Theorem 2 with ϕ(x) = sgn(x) and P0 = 21 δ−1 + 12 δ1 (for the hypercube) or P0 = N (0, 1) (for the sphere). For µ ∈ {1, . . . , m}, we define n o Sµ = x ∈ Rn sgn(x · Φµ ) = sgn(X∗ · Φµ ) . (26) We will use the notation N (x) = P(Z ≤ x) for Z ∼ N (0, 1). Let Sn be the unit sphere in Rn and µn the uniform measure on Sn . Corollary 2 (Free entropy of the planted perceptron). Let Z, V ∼ N (0, 1). m  \  1 E ln # Sµ ∩ {−1, 1}n n µ=1 n h  √q V   √q V i r(q + 1) o √ √ ln N √ − −−−→ ln(2) + sup inf E ln cosh( rZ + r) + 2αE N , (27) n→∞ 2 1−q 1−q q∈[0,1) r≥0 m \  n1 h  √q V   √q V i q o 1 E ln µn Sµ ∩ Sn −−−→ sup ln(1 − q) + 2αE N √ ln N √ + . (28) n→∞ q∈[0,1) 2 n 2 1 − q 1 − q µ=1 9 2.5 Optimality of the generalized approximate message-passing algorithm While the main results presented until now are information-theoretic, our next one concerns the performance of a popular algorithm to solve random instances of generalized linear problems, called generalized approximate message-passing (GAMP). We shall not re-derive its properties here, and instead refer to the original papers for details. This approach has a long history, especially in statistical physics [5, 46, 58, 78], error correcting codes [72], and graphical models [80]. For a modern derivation in the context of linear models, see [31, 52, 79]. The case of generalized linear models was discussed by Rangan in [70], and has been used for classification purpose in [85]. We first need to define two so-called threshold functions that are associated to the two scalar channels (12) and (15). The first one is the posterior mean of the signal in channel (12) with signal-to-noise ratio r: gP0 (y, r) = E[X0 |Y0 = y] . (29) The second one is the posterior mean of W ∗ in channel (15) with “noise level” η = ρ − q: √ gPout (e y , v, η) = E[W ∗ |Ye0 = ye, q V = v] . (30) These functions act componentwise when applied to vectors. Given initial estimates (b x0 , v0 ) for the means and variances of the elements of the signal vector X∗ , GAMP takes as input the observation vector Y and then iterates the following equations with initialization gµ0 = 0 for all µ = 1, . . . , m (we denote by u the average over all the components of the vector u and Φ| is the transpose of the matrix Φ): From t = 1 until convergence,   V t = vt    t = Φb t−1 /√n − V t gt−1  ω x    t t t   ∀ µ = 1, . . . m  gµ = gPout (Yµ , ωµ , V ) t 2 t t (31) λ = α gPout (Y, ω , V )  √  t t−1 t | t  b R = x +λ Φ g / n    t t t  x b = g (R ∀ i = 1, . . . n  P0 i i, λ )    vt = (λt )−1 ∂ g (R, λt )| ∀ i = 1, . . . n R P0 R=Rit i One of the strongest asset of GAMP is that its performance can be tracked rigorously in the limit n, m → ∞ via a procedure known as state evolution (SE), see [18, 19] for the linear case, and [45, 70] for the generalized one. In our notations, state evolution tracks the asymptotic value of the overlap between the true hidden bt defined as q t = limn→∞ X∗ · x bt /n (that is related to the asymptotic value X∗ and its estimate by GAMP x bt by E t = ρ − q t , where recall that ρ = E[(X ∗ )2 ] with mean-square error E t between X∗ and its estimate x ∗ X ∼ P0 ) via: ( q t+1 rt = 2ψP0 0 (rt ) , = 2αΨ0Pout (q t ; ρ) . (32) From Theorem 1 we realize that the fixed points of these equations correspond to the critical points of the asymptotic conditional entropy in (20). In fact, in the replica heuristic, the optimizer q ∗ of the potential is conjectured to give the optimal value of the overlap, a fact that was proven for the linear channel [10, 14]. If the minimizer of (20) is unique, or is attractive within the GAMP dynamics, then q t converges to q ∗ when t → +∞. Perhaps more surprisingly, one can use GAMP in the teacher-student scenario (that we precisely describe √ in Sec. 3.1) in order to provide an estimation of a new output Cnew = ϕ(Φnew ·X∗ / n, Anew ), where Φnew is 10 bt is the GAMP estimate of the expectation a new row of the matrix and Anew ∼ PA a new random source. As x of X∗ , with estimated variance vt , the natural heuristic is to consider for the posterior probability distribution √ √ bt / n and variance V t = E t = ρ − q t of the random variable Φnew · X∗ / n a Gaussian with mean Φnew · x (the fact that the variance and MSE are equal follows from the Nishimori identity of Proposition 9 applied to GAMP, see e.g. [84]). This allows to estimate the posterior mean of the output, which leads the GAMP prediction (recall the Pout definition (3)): b GAMP,t = C Z 1 e dy dw y Pout (y|w) p 2π(ρ − q t ) 1 − 2(ρ−q t) √1 Φnew ·b xt −w n 2 . (33) We show in Sec. 3.3.2 that this leads to a GAMP generalization error given by    GAMP,t b GAMP,t 2 := lim E Cnew − C Egen n→∞ p  √    p 2  = EV,A ϕ( ρ V, A)2 − EV EW,A ϕ( q t V + ρ − q t W, A) , (34) where V, W i.i.d. ∼ N (0, 1) and A ∼ PA . We will see in Sec. 3.2 that this formula matches the one for the Bayes-optimal generalization error, see (40), up to the fact that instead of q ∗ (a maximizer obtained from the replica formula (20)) appearing in the optimal error formula, here it is q t which appears. Thus clearly, when q t converges to q ∗ (we shall see that this is the case in many situations in the examples of Sec. 4) this yields a very interesting and non trivial result: GAMP achieves the Bayes-optimal generalization error in a plethora of models (a task again often believed to be intractable) and this for large sets of parameters. 3 Optimal errors in supervised learning 3.1 Teacher-student scenario Consider the following teacher-student scenario (also called planted model). We voluntarily employ terms coming from machine learning, instead of the signal processing terminology used in the previous sections. First the teacher randomly generates a classifier X∗ ∈ Rn (the signal in the estimation problem) with i.i.d. n X∗ i.i.d. ∼ P0 , an ensemble of m = αn patterns (row-vectors) Φµ ∈ R for µ = 1, . . . , m such that Φµ ∼ i.i.d. N (0, In ), and a stream A = (Aµ )m µ=1 ∼ PA . The teacher chooses a model ϕ(x, A). For deterministic models A is simply absent. Finally the teacher associates to each pattern a label Cµ ∈ R selected by the √ classifier, namely Cµ = ϕ(Φµ · X∗ / n, Aµ ) for µ = 1, . . . , m. Stacking the rows (Φµ )m µ=1 in a m × n m matrix Φ and denoting the vector of labels C = (Cµ )µ=1 , then the labels, patterns, source of randomness and classifier verify  1  C = ϕ √ ΦX∗ , A , n (35) where it is understood that ϕ acts in componentwise fashion on vectors. The student is given the distributions P0 , PA and the function ϕ and his task is to learn the classifier X∗ from the pattern-label pairs (Φµ , Cµ )m µ=1 . ∗ How does one use this estimation to perform prediction? The teacher, still using the same X , will create a new sample (and thus a new line of the matrix, or pattern, Φnew and a new random Anew ). The teacher √ will first compute the new value of the projection of X∗ , that we denote znew = Φnew · X∗ / n, and then generate the new random label Cnew = ϕ(znew , Anew ). He is now ready to evaluate the student generalization performance. 11 3.2 Generalization error An important quantity is the generalization error (or prediction error) which measures the performance of the b new , C, Φ) the estimator used by the student (which is thus a measurable function student. If we denote C(Φ of the observations), the generalization error is defined as h 2 i b = E Cnew − C(Φ b new , C, Φ) Egen (C) . (36) The optimal generalization error is then defined as the minimum of Egen over all estimators: h D  E2 i opt b = E Cnew − ϕ √1 Φnew · x, a := min Egen (C) Egen . n b C (37) where x is sampled according to the posterior distribution P (x = X∗ |C, Φ) and a ∼ PA . h−i denotes the joint expectation w.r.t. (x, a). 3.3 Computing the generalization error In order to express the limit of the generalization error, we introduce the following function:    √ 2   √ √ E : q 7→ E ϕ( ρ V, A)2 − E EW,A ϕ( q V + ρ − q W, A) (38) where V, W i.i.d. ∼ N (0, 1), A ∼ PA are independent random variables and EW,A denotes the expectation w.r.t. W and A only. We recall ρ = E[(X ∗ )2 ]. 3.3.1 Optimal generalization error opt The computation of the limit of Egen is not trivial and requires a good knowledge of the posterior distribution. In Sec. 3.4.1 we will show that under a small perturbation of the model (given some side information), one can compute it rigorously. Here we only show that if the overlap between the planted solution X∗ and a sample (a replica) x from the posterior distribution converges to some number q, then the optimal generalization error converges to E(q). Proposition 1. Assume that the overlap n1 x · X∗ converges in probability to some number 0 ≤ q < ρ. Then opt Egen −−−→ E(q) . n→∞ (39) The proof of Proposition 1 is presented in Appendix A.4. This result by itself does not tell us how to compute q. But in view of Proposition 2 we expect that q = q ∗ the maximizer of (20). Conjecture 1 (Optimal generalization error). For almost all ∆ > 0 we have opt Egen −−−→ E(q ∗ ) , n→∞ (40) where q ∗ is a maximizer of (20). The optimal generalization error is independent of the random function representation as long as both ϕ √ R R and PA are known. EX dY Y k Pout (Y |X) = EX,a dY Y k exp{−(Y − ϕ(X, a))2 /(2∆)}/ 2π∆ implies that the error (40) can be re-expressed equivalently as a function of the two first moments of the transition probability Pout , namely (again, q ∗ is a maximizer of (20)) Z h hZ i2 i p p √ opt −−−→ EV dY Y 2 Pout (Y | ρ V ) − EV Ew dY Y Pout (Y | q ∗ V + ρ − q ∗ w) − ∆ . (41) Egen n→∞ 12 3.3.2 Generalization error of the generalized approximate message-passing algorithm We now turn our attention to the generalization performance of the GAMP algorithm of Sec. 2.5. The following claim is from [70], where it is stated as a claim because some steps of the proof are missing. The paper [45] affirms in its abstract to prove the claim of [70], but without further details. For these reasons, we believe that the claim holds, however we prefer to state it here as a claim (instead of a theorem). Claim 1 ( [70]). We have almost surely for all t ∈ N, lim n→∞ 1 t 1 t 2 b · X∗ = lim kb x x k = qt . n→∞ n n (42) Provided that Claim 1 holds, we can deduce the generalization error of GAMP. b GAMP,t is given by (33). Then Claim 2 (GAMP generalization error). Recall that C    GAMP,t b GAMP,t 2 = E(q t ) . := lim E Cnew − C Egen n→∞ (43) Claim 2 is proved following the same proof strategy as for Proposition 1, see Appendix A.4. 3.3.3 Optimal denoising error Another interesting error measure to study is the following “denoising error”. Assume that the observations  are noisy, as in (1). The goal here is to denoise the observations Yµ and estimate the signal ϕ √1n [ΦX∗ ]µ , Aµ . The minimum denoising error (in L2 sense) is actually a simple corollary from the replica-symmetric formula of Theorem 1 and follows from a so-called “I-MMSE relation”, see [40]. Corollary 3 (Limit of the optimal denoising error). For almost every ∆ > 0, for any optimal couple (q ∗ , r∗ ) of (20) we have  D  1 E 2 i 1 h  1 E ϕ √ ΦX∗ , A − ϕ √ Φx, a n→∞ m n n p p     √ = E ϕ( ρ V, A)2 − E ϕ( q ∗ V + ρ − q ∗ w, a)i2sc , lim (44) where the Gibbs brackets are defined by (9) and (17) and V ∼ N (0, 1), (w, a) ∼ h−isc . The proof of Corollary 3 is presented in Appendix B.1. 3.4 3.4.1 Computing the optimal errors with (small) side information Optimal generalization error with side information As presented in Sec. 3.3.1, the computation of the optimal generalization error requires a good knowledge of the posterior distribution, typically that the overlap concentrates around a deterministic value. Proving this kind of result seems to be highly non-trivial. An easier strategy would be to proceed as in the previous section by using “I-MMSE relations”: Differentiating the free entropy fn w.r.t. the model parameters allows to access interesting quantities. However, in order to obtain an expression for the generalization error, we need to assume that the new “test label” Cnew is also observed by the student in the scenario of Sec. 3.1 but with a large amount of noise, so that we can differentiate fn w.r.t. this noise. For this reason we introduce the following “train-test” observation model. The set of rows of Φ and labels are divided into two sets by the teacher: The training set S tr of size βm, β ∈ [0, 1], that will be used by the student in order to learn the classifier, and the test set S te of size (1 − β)m that 13 will be used by the teacher in order to evaluate the performance of the student. For the training the √ set both βm tr tr patterns and associated noisy labels are given to the student, namely S = {(Yµ = Cµ + Zµ ∆ ; Φµ )}µ=1 where Zµ ∼ N (0, 1) (recall the labels are given by (35)). Here ∆tr is strictly positive (but typically small) and known by the student who can thus optimally tune its “confidence” in the training labels during the training/learning stage. For the test set, the previously unseen patterns to classify are given to the student √ te te te but the labels are (almost) not, namely S = {(Yµ = Cµ + Zµ ∆ ; Φµ )}m µ=βm+1 where ∆ is typically te very large. We are particularly interested in the case ∆ → ∞ when the student has no information about the labels of the test set but for the aforementioned technical reasons we will have to work with very large, but finite, ∆te . Define ∆µ = ∆tr if µ ≤ βm, ∆µ = ∆te else. Then the inference of the classifier X∗ from the noisy p labels Yµ = Cµ + Zµ ∆µ is a slight extension of model (1): This inference problem is nothing else than te = (Φ )m a supervised learning of the classifier by the student. Define Cte = (Cµ )m µ µ=βm+1 µ=βm+1 and Φ as the m(1 − β)-dimensional vector of labels and the m(1 − β) × n matrix, respectively, both restricted to te the test set and similarly for Ate = (Aµ )m µ=βm+1 . Then the optimal generalization error at finite ∆ in this “train-test” observation model is h D  1 E 2 i 1 side := Egen E Cte − ϕ √ Φte x, ate (1 − β)m n  D  1 E 2 i h  1 1 . (45) E ϕ √ Φte X∗ , Ate − ϕ √ Φte x, ate = (1 − β)m n n Here the Gibbs bracket h−i is associated to the joint posterior (4) but with ∆ replaced by ∆µ in order to take into account that the noise varies in the training and test sets. Moreover ate is the restriction of a to its components belonging to the test set, namely ate = (aµ )m µ=βm+1 . By a straightforward extension of the interpolation method presented in Sec. 5 one can generalize Theorem 1 to take into account that the noise variance ∆µ differs in the training and test sets. This leads to an asymptotic free entropy rigorously given by n rq o ts ts tr (q; ρ) + α(1 − β)ΨP te (q; ρ) − f∞ = sup inf fRS (q, r) = sup inf ψP0 (r) + αβΨPout . (46) out 2 q∈[0,ρ] r≥0 q∈[0,ρ] r≥0 tr and ∆ = ∆te respectively. tr and ΨP te are obtained from (16) using Pout given by (3) with ∆ = ∆ Here ΨPout out ts (inside Note that in the limit ∆te → ∞ (which means that the student has no access to the test set labels), fRS the brackets in (46)) collapses on fRS given by (18) up to a trivial additive constant which corresponds to 0 te and a rescaling of the measurement rate α = αβ. ΨPout Differentiating the free entropy w.r.t. ∆te , we deduce the limit of this optimal generalization error with side information: Proposition 2 (Optimal generalization error with side information). For almost every ∆te > 0 we have p p     √ side lim Egen = E ϕ( ρ V, A)2 − E ϕ( q ∗ (∆te ) V + ρ − q ∗ (∆te ) w, a)i2sc,∆te , n→∞ (47) where q ∗ (∆te ) is a maximizer of (46) and where h−isc,∆te is the Gibbs bracket associated with the posterior distribution of the second scalar channel (17) with ∆ = ∆te . The proof of Proposition 2 is presented in Appendix B.2. A natural continuation would be to show that for almost every value of ∆tr , q ∗ (∆te ) converges, as ∆te → ∞, to a maximizer q ∗ of the replica formula (20) from Theorem 1. Using theorems for limit-expectations permutation, it should not be difficult to show then side that lim lim Egen = E(q ∗ ). Then, provided we can justify the following permutation of limits we would ∆te →∞ n→∞ 14 obtain lim E opt n→∞ gen lim E side n→∞ ∆te →∞ gen = lim side lim Egen = E(q ∗ ) . = lim (48) ∆te →∞ n→∞ We conjecture this formula to be true, but we were however unable to provide the technical justifications mentioned above. 3.4.2 Optimal reconstruction error with side information Analogously to the previous section, one can add small side information to our statistical model (1) by supposing that one observes also Yi0 = Xi∗ + √ ∆side Zi0 , (49) 1 ≤ i ≤ n, side > 0 quantifies the noise level of the where (Zi0 )ni=1 i.i.d. ∼ N (0, 1) independently of everything else. Here ∆ side information and will typically be very large. The proof of Theorem 1 can be directly adapted to obtain that the new free energy converges to n  side side f∞ = sup inf fRS (q, r) = sup inf ψP0 r + q∈[0,ρ] r≥0 q∈[0,ρ] r≥0 1  ∆side + αΨPout (q; ρ) − rq o . 2 (50) By then taking the derivative w.r.t. (∆side )−1 , which is again a I-MMSE relation [40], one deduces the minimum mean-square-error (MMSE) for the reconstruction of X∗ : Proposition 3 (Reconstruction MMSE with side information). For almost all ∆side > 0, MMSEn := 1  ∗ 2 E X − hxi −−−→ ρ − q ∗ (∆side ), n→∞ n (51) where q ∗ (∆side ) is a maximizer of (50). 4 Application to concrete situations In this section, we show how our main results can be applied to several models of interest in fields ranging from machine learning to signal processing, and unveil several interesting new phenomena in learning of generalized linear models. For various specific cases of prior P0 and output Pout , we evaluate numerically the free entropy potential (18), its stationary points Γ and identify which of them gives the information-theoretic results, i.e. is the maximizer in (20). We also identify which of the stationary points corresponds to the result obtained asymptotically by the GAMP algorithm, i.e. the fixed point of the state evolution (32). Finally we compute the corresponding generalization error (43). We stress that in this section the results are based on numerical investigation of the resulting formulas: We do not aim at rigor that would involve precise bounds and more detailed analytical control for the corresponding integrals. 4.1 Generic observations Using the functions gPout and gP0 introduced in Sec. 2.5 we can rewrite the fixed point equations (19) as q = 2ψP0 0 (r) = E[gP0 (Y0 , r)2 ] , α √ E[gPout (Ye0 , q V, ρ − q)2 ] , r = 2αΨ0Pout (q) = ρ−q 15 (52) (53) where the expectation in (52) corresponds to the scalar channel (12) and the expectation in (53) corresponds to the second scalar channel (15). Non-informative fixed point and its stability: It is interesting to analyze under what conditions q ∗ = 0 is the optimizer of (20). Notice that q ∗ = 0 corresponds to the error on the recovery of the signal as large as it would be if we had no observations at our disposition. Theorem 1 gives that any optimal couple (q ∗ , r∗ ) of (20) should be a fixed point of the state evolution equations (52)-(53). A sufficient condition for (q, r) = (0, 0) to be a fixed point of (52)-(53) is that (a) The transition density Pout (y|z) is even in the argument z. (b) The prior P0 has zero mean. In order to see this, notice that if Pout (y|z) is even in z then from the definition (30) of the function gPout we have gPout (y, 0, ρ) = 0 and consequently from (53) we have Ψ0Pout (0) = 0. For the second point, notice that we have ψP0 0 (0) = 21 EP0 [X0 ]2 = 0. We assume now that the transition density Pout (y|z) is even in the argument z and that the prior P0 has zero mean. In order for q = 0 to be the global maximizer q ∗ of (20) or to be a relevant fixed point of the state evolution (32) (relevant in the sense that GAMP might indeed converge to it in a practical setting) we need q = 0 to be a numerically stable fixed point of the above equations (52)-(53). We therefore need to expand (52)-(53) around q = 0, and doing so, we obtain that q = 0 is stable if  2  2αΨ00Pout (0) × 2ψP00 0 (0) = αE hw2 isc − hwi2sc − 1 < 1, (54) where the expectation corresponds to the scalar channel (15) with q = 0 and the Gibbs bracket h−isc is given by (17). The expectation quantifies how the observation of Ye0 in the scalar channel (15) modifies the variance of W ∗ (which is 1 without any observation). Rewriting this condition more explicitly into a form that is convenient for numerical evaluation we get Z αρ  R 0 (y|√ρz) 2 DzzPout dy R < 1, √ DzPout (y| ρz) (55) 0 (y|ω) stands for the partial derivative where recall that Dz is a standard Gaussian measure and where Pout w.r.t. ω. We conjecture that the condition (54) (or equivalently (55) for differentiable models) delimits precisely the region where polynomial-time algorithms do not perform better than “random guessing” (see the discussion below, where we will make this stability condition explicit for several examples of symmetric output channels). Exact recovery fixed point: Another particular fixed point of (52)-(53) that we observe is the one corresponding to exact recovery q ∗ = ρ. A sufficient and necessary condition for this to be a fixed point is that limq→ρ Ψ0Pout (q) = +∞. Heuristically, this means that the integral of the Fisher information of the output channel should diverge: 2 Z −ω 0 (y|ω)2 e 2ρ Pout dydω √ = +∞ , (56) 2πρ Pout (y|ω) 0 (y|ω) denotes the partial derivative w.r.t. ω. This typically means that the channel should be where again Pout noiseless. For the Gaussian channel with noise variance ∆, the above expression equals 1/∆. For the probit √ √ channel where Pout (y|z) = erfc(−yz/ 2∆)/2 the above expression at small ∆ is proportional to 1/ ∆. Numerical stability of the exact recovery fixed point was also investigated, but we did not obtain any unified expression. The stability depends non-trivially on both the properties of the output channel, but also 16 on the properties of the prior. Below we give several examples where exact recovery either is or is not possible, or where there is a phase transition between the two regimes. 4.2 Phase diagrams of perfect learning In this section we consider deterministic (noiseless) output channels and ask: How many measurements are needed in order to perfectly recover the signal? Our crucial point is to compare with the well explored phase diagram of Bayesian (noiseless) compressed sensing in the case of the linear channel [52, 53]. As the number of samples (measurements) varies we encounter four different regimes of parameters: • The EASY phase: This is the region in the parameter space where GAMP achieves perfect reconstruction. • The IMPOSSIBLE phase: Region where perfect reconstruction is information-theoretically impossible. • The HARD phase: Region where the perfect reconstruction is information-theoretically possible, but where GAMP is unable to achieve it. However, in this region GAMP leads to a better generalization error than the one corresponding to the non-informative fixed point. It remains a challenging open question whether polynomial-time algorithms can achieve perfect reconstruction in this regime. • The HARD-RG phase: This “hard-random guess” phase corresponds to the region where perfect reconstruction is information-theoretically possible but where GAMP only achieves an error as bad as randomly guessing, given by the trivial fixed point. In this phase as well, the existence of polynomialtime exact recovery algorithms is an open question. This phase does not exist for the linear channel. Some of the codes used in this section can be consulted online on the github repository [1]. 4.2.1 The linear channel The case of exact recovery of a sparse signal after it passed trough a noiseless linear channel, i.e. ϕ(x) = x, is studied in the literature in great details, especially in the context of compressed sensing [24, 31]. For a signal with a fraction ρ of non-zero entries it is found that as soon as α > ρ, perfect reconstruction is theoretically possible, although it may remain computationally difficult. The whole field of compressed sensing builds on the realization that, using the `1 norm minimization technique, one can efficiently recover the signal for larger α values than the so-called Donoho-Tanner transition [29, 31]. In the context of the present paper, when the empirical distribution of the signal is known, one can fairly easily beat the `1 transition and reconstruct the signal up to lower values of α using the Bayesian GAMP algorithm [31, 52, 53, 70]. In this case, three different phases are present [52, 53]: i) For α < ρ, perfect reconstruction is impossible; ii) for ρ < α < αs reconstruction is possible, but not with any known polynomialcomplexity algorithm; iii) for α > αs , the so-called spinodal transition computed with state evolution, GAMP provides a polynomial-complexity algorithm able to reach perfect reconstruction. The line αs (ρ) depends on the distribution of the signal. For a Gauss-Bernoulli signal with a fraction ρ of non-zero (Gaussian) values we compare the GAMP performance to the optimal one in Fig. 1 (left and right). 4.2.2 The rectified linear unit (ReLU) channel Let us start by discussing the case of a generalized linear model with the ReLU output channel, i.e. ϕ(x) = √ max(0, x), with a signal coming from a Gauss-Bernoulli distribution P0 (x) = ρ exp(−x2 /2)dx/ 2π + (1 − ρ)δ(x) with a fraction ρ of non-zero (Gaussian) values. We are motivated by the omnipresent use of the ReLU activation function in deep learning, and explore its properties for GLMs that can be seen as a simple single layer neural network. 17 Absolute value channel, Gauss-Bernoulli X* Symmetric Door activation, width Κ, Rademacher X* 3 1.2 1 2.5 EASY EASY 1.5 IMPOSSIBLE 0 1 HARD IMPOSSIBLE 1 0.5 ρ 0.5 IMPOSSIBLE Perfect recovery Spinodal instability at q=0 Spinodal CS 0 HARD, RG 1.5 HARD HARD, RG 0.2 α=m/n 0.6 0.4 EASY 2 HARD α=m/n α=m/n 0.8 Relu activation, Gauss-Bernoulli signal 2 0.5 instability at q=0 Perfect recovery Spinodal 0 1 0 0.5 1 1.5 Κ Perfect recovery Spinodal Naive spinodal 0 2 2.5 0 0.5 ρ 1 Figure 1: Phase diagrams for several non-linear output channels showing the region where a perfect recovery is possible/hard/impossible. Left: The phase diagram for the signless output with ϕ(x) = |x| with a GaussBernoulli signal, as a function of α = m/n and the fraction of non-zero components ρ. We find that a perfect recovery is IMPOSSIBLE for α < ρ. Perfect recovery becomes possible starting from α > ρ, as for the linear channel. On the algorithmic side, GAMP is not able to perform better than a random guess as long as α < 0.5. We denote this region HARD-RG, for “not better than random guess”. For larger values, the inference using GAMP leads to better results than a purely random guess but cannot reach perfect recovery, so the problem remains HARD. GAMP can perfectly identify the hidden signal only for values of α larger than the so-called spinodal (or algorithmic threshold), when the problem becomes EASY. For comparison we also show the algorithmic transition for the linear output (the spinodal CS dashed line). Middle: Phase diagram for the door function problem, with ϕ(x) = sgn(|x| − K), for a Rademacher signal as a function of α and K. The same four regions of parameters are observed and depicted. Right: Phase diagram for the ReLU output, with ϕ(x) = max(0, x), again with the EASY, HARD and IMPOSSIBLE regions. Here it is always possible to generalize better than chance using GAMP. The so-called naive spinodal shows for comparison the algorithmic performance when using information only about the non-zero observations. Our analysis shows that a perfect generalization (and thus a perfect reconstruction of the signal as well) is possible whenever the number of samples per dimension (measurement rate) α > 2ρ, and impossible when α < 2ρ. This is very intuitive, since half of the measurements (those non-zero) are giving as much information as in the linear case, thus the factor 2. How hard is it to actually solve the problem with an efficient algorithm? The answer is given by applying the state evolution analysis to GAMP, which tells us that only for even larger values of α, beyond the spinodal transition, does GAMP reach a perfect recovery. Notice, however, that this spinodal transition occurs at a significantly lower measurement rate α than one would reach just keeping the non-zero measurements. This shows that, actually, these zero measurements contain a useful information for the algorithm. The situation is shown in the right side of Fig. 1: The zero measurements do not help information-theoretically but they, however, do help algorithmically. 4.2.3 The signless channel We now discuss the signless channel where only the absolute value of the linear mixture is observed, i.e. ϕ(x) = |x|. This case can be seen as the real-valued analog of the famous phase retrieval problem. We again consider the signal to come from a Gauss-Bernoulli distribution with a fraction ρ of non-zero (Gaussian) values. Sparse phase retrieval has been well explored in the literature in the regime where the number s of nonzeros is sub-leading in the dimension, s = O(n). This case is known to present a large algorithmic gap. While analogously to compressed sensing exact recovery is information-theoretically possible for a number of measurement O(s ln(n/s)), best known algorithms achieve it only with O(s2 / ln n) measurements [67], see also [75] and references therein for a good discussion of other related literature. This is sometimes referred 18 to as the s2 barrier. We are not aware of a study where, as in our setting, the sparsity is s = ρn and the number of measurements is αn with α = O(1). Our analysis in this regime hence sheds a new light on the hardness of the problem of recovering a sparse signal from signless measurements. Our analysis of the mutual information shows that a perfect reconstruction is information-theoretically possible as soon as α > ρ: In other words, the problem is –information-theoretically– as easy, or as hard as the compressed sensing one. This is maybe less surprising when one thinks of the following algorithm: Try all 2m choices of the possible signs for the m outputs, and solve a compressed sensing problem for each of them. Clearly, this should yields a perfect solution only in the case of the actual combination of signs. Algorithmically, however, the problem is much harder than for the linear output channel. As shown in the left side of Fig. 1, for small ρ one requires a much larger fraction α of measurements in order for GAMP to recover the signal. For the linear channel the algorithmic transition αs (ρ) → 0 as ρ → 0, while for the signless channel we get αs (ρ) → 1/2 as ρ → 0. In other words if one looses the signs one cannot perform recovery in compressed sensing with less than n/2 measurements. What we observe in this example for α < 1/2 is in the statistical physics literature on neural networks known as retarded learning [43]. This appears in problems where the ϕ(x) function is symmetric, as seen at the beginning of this section: There is always a critical point of the mutual information with an overlap value q = 0. For this problem, this critical point is actually “stable” (meaning that it is actually a local minimum in q) for all α < 1/2 independently of ρ. To see that, we have to go back to (54). For the absolute value channel, √ the posterior distribution of W ∗ given Ye0 = ρ |W ∗ | in the second scalar channel (15) is a mean of two Dirac masses on −W ∗ and W ∗ . Thus, the posterior variance is hw2 isc − hwi2sc = (W ∗ )2 . Consequently, (54) leads to the stability condition α < 1/2. This has the two following implications: i) In the IMPOSSIBLE phase, when α < 1/2 and ρ > α, the minimum at q = 0 is actually the global one. In this case, the MMSE and the generalization error are the ones given by using 0 as a guess for each element of X∗ ; in other words, there is no useful information that one can exploit and no algorithmic approach can be better than a random guess. ii) In the POSSIBLE but HARD phase when α < 1/2, GAMP initialized at random, i.e. close to the q = 0 fixed point, will remain there. This suggests that in this region, even if a perfect reconstruction is possible, it will still be very hard to beat a random guess with a tractable algorithm. 4.2.4 The symmetric door channel The third output channel we study in detail is the symmetric door channel, where ϕ(x) = sgn(|x| − K). In case of channels with discrete set of outputs exact recovery is only possible when the prior is also discrete. In the present case we consider the signal to be Rademacher, where each element is chosen at random between 1 and −1, i.e. P0 (x) = (δ(x − 1) + δ(x + 1))/2. This channel was studied previously using the replica method in the context of optimal data compression [44]. This output channel is in the class of symmetric channels for which overlap q = 0 is a fixed point. This fixed point is stable for α < αc (K). Exact recovery is information-theoretically possible above αIT (K) and tractable with the GAMP algorithms above the spinodal transition αs (K). The values of these three transition lines are depicted in the center panel of Fig. 1. We note that αIT ≥ 1 is a generic bound on exact recovery for every K, required by a simple counting argument. While a-priori it is not clear whether this bound is saturated for some K, we observe that it is for K = 0.67449 such that half of the observed measurements are negative and the rest positive. This is, however, not efficiently achievable with GAMP. The saturation of the αIT ≥ 1 bound was remarked previously in the context of the work [44] on optimal data compression. Our work predicts that this information-theoretic result will not be achievable with known efficient algorithms. 19 Generalization error Perceptron, Rademacher X* Perceptron, Gauss-Bernoulli X*, ρ=0.2 Symmetric Door, Rademacher X* 1 1 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 SE Optimal AMP,N=1044 Logistic,N=10 0.2 0 0 0.5 1 Optimal and SE AMP, N=104 Logistic,N=104 SE Optimal AMP,N=104 0.8 1 2-layer NN 0 0 0 1 α 1.5 2 5 10 15 20 0 0 0.5 1 1.5 2 2.5 α 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 α Figure 2: Generalization error in three classification problems as a function of the number of data-samples per dimension α. The red line is the Bayes-optimal generalization error, while the green one shows the (asymptotic) performances of GAMP as predicted by the state evolution (SE), when different. For comparison, we also show the result of GAMP (black dots) and, in blue, the performance of a standard out-of-the-box solver, both tested on a single randomly generated instance. Left: Perceptron, with ϕ(x) = sgn(x) and a Rademacher (±1) signal. While a perfect generalization is information-theoretically possible starting from α = 1.249(1), the state evolution predicts that GAMP will allow such perfect prediction only from α = 1.493(1). The results of a logistic regression with fine-tuned ridge penalty with the software scikit-learn [68] are shown for comparison. Middle: Perceptron with Gauss-Bernoulli coefficients for the signal. No phase transition is observed in this case, but a smooth decrease of the error with α. The results of a logistic regression with fine-tuned `1 sparsity-enhancing penalty (again with [68]) are very close to optimal. Right: The symmetric door activation rule with parameter K = 0.67449 chosen in order to observe the same number of occurrence of the two classes. In this case there is a sharp phase transition at α = 1 from a situation where it is impossible to learn the rule, so that the generalization is not better than a random guess, to a situation where the optimal generalization error drops to zero. However, GAMP identifies the rule perfectly only starting from αs = 1.566 (GAMP error stays 1 up to αstab = 1.36, see the black dashed curve). Interestingly, this non-linear rule seems very hard to learn for other existing algorithms. Using Keras [26], a neural network with two hidden layers was able to learn approximately the rule, but only for much larger training set sizes (shown in inset). 4.3 Examples of optimal generalization error Besides the formula for the mutual information, the main result of this paper is the formula (40) (or (47) when ∆te → +∞) for the optimal generalization error, and formula (43) for the generalization error achieved by the GAMP algorithm. In this section we evaluate both these generalization errors for several cases of priors and output functions. We study both regression problems, where the output is real-valued, and classification problems, where the output is discrete. While in realistic regression and classification problems the matrix Φ corresponds to the data, and is thus not i.i.d. random, we view the practical interest of our theory as a benchmark for state-of-the art algorithms. Our work provides an exact asymptotic analysis of optimal generalization error and sample complexity for a range of simple rules where a teacher uses random data to generate labels. The challenge for state-of-the-art multi-purpose algorithms is to try to match as closely as possible the performance that can be obtained with GAMP that is fine-tuned to the specific form of the output and prior. 4.3.1 Threshold output: The perceptron The example of non-linear output that is the most widely explored in the literature is the threshold output, where the deterministic output (or “activation”) function is ϕ(x) = sgn(x). This output in the teacher-student setting of the present paper is known as the perceptron problem [36], or equivalently, the one-bit compressed sensing in signal processing [21]. Its solution has been discussed in details within the replica formalism (see for instance [16, 46, 66, 83]) and we confirm all of these heuristic computations within our approach. Let 20 V ∼ N (0, 1). The formula (40) for the generalization error then reduces to (recall q ∗ is a maximizer of (20)) lim E opt n→∞ gen Z =1−  2 Z V DV √ π 0 q q∗ 2(ρ−q ∗ ) −t2 /2 dt e 2 h  = 1 − E erf V s 2 i q∗ . 2(ρ − q ∗ ) (57) In Fig. 2 (left) we plot the optimal generalization error of the perceptron with a Rademacher signal, the state evolution prediction of the generalization error of the GAMP algorithm, together with the error actually achieved by GAMP on one randomly generated instance of the problem. We also compare these to the performance of a standard logistic regression. As expected from existing literature [36,73] we confirm that in this case the information-theoretic transition appears at a number of samples per dimension αIT = 1.249(1), while the algorithmic transition is at αs = 1.493(1). Logistic regression does not seem to be able to match the performance on GAMP in this case. In Fig. 2 (center) we plot the generalization error for a Gauss-Bernoulli signal with density ρ = 0.2. Cases as this one were studied in detail in the context of one-bit compressed sensing [83] and GAMP was found to match the optimal generalization performance with no phase transitions observed. In this case the logistic regression is rather close to the performance of GAMP. 4.3.2 Symmetric Door The next classification problem, i.e. discrete output rule, we study is the symmetric door function ϕ(x) = sgn(|x| − K). In this case the generalization error (40) becomes lim E opt n→∞ gen hn  K − √q ∗ V   K + √q ∗ V  o2 i = 1 − EV erf p − erf − p −1 . 2(ρ − q ∗ ) 2(ρ − q ∗ ) (58) In Fig. 2 (right) we plot the generalization error for K = 0, 67449 such that 1/2 of the outputs are 1 and 1/2 are −1. The symmetric door output is an example of function for which the optimal generalization error for α < αIT = 1 (for that specific value of K, see phase diagram in center of Fig. 1)) is as bad as if we were guessing randomly. The GAMP algorithm still achieves such a bad generalization until αstab = 1.36, and achieves perfect generalization only for α > αs = 1.566. Interestingly, labels created from this very simple symmetric door rule seem to be very challenging to learn for general purpose algorithms. We tried to optimize parameters of a two-layers neural network and only managed to get the performances shown in the inset of Fig. 2 (right). It is an interesting theoretical challenge whether a deeper neural network can learn this simple rule from fewer samples. 4.3.3 Linear regression The additive white Gaussian noise (AWGN) channel, or linear regression, is defined by ϕ(x, A) = x+σA with A ∼ N (0, 1). This models the (noisy) linear regression problem, as well as noisy random linear estimation and compressed sensing. In this case (40) leads to lim E opt n→∞ gen = ρ − q∗ + σ2 . (59) This result agrees with the generalization error analyzed heuristically in [73] in the limit σ → 0. Fig. 3 (left) depicts the generalization error for this example. Performance of GAMP in this case very close to the one of LASSO. 21 Generalization error AWGN σ= 0.032, Gauss-Bernoulli X*, ρ=0.2 ReLu, Gauss-Bernoulli X*, ρ=0.2 0.08 0.07 0.06 0.05 0.04 0.03 0.02 0.01 0 0.2 0.15 0.1 Optimal and SE AMP,N=104 LASSO,N=104 0.05 0 0 0.2 0.4 0.6 Absolute value, Gauss-Bernoulli X*, ρ=0.5 0.2 SE Optimal AMP, N=104 Keras,N=104 0.15 SE Optimal AMP,N=104 0.6 0.1 0.4 0.2 0.05 PM 0 0 1 2 3 4 0 0 0.2 0.4 0.6 α α 0.8 1 1.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 α Figure 3: The generalization error for three regression problems is plotted as a function of the number of samples per dimension α. The red line is again the Bayes-optimal generalization error, while the green one shows the (asymptotic) performances of GAMP as predicted by the state evolution (SE), when different. Again, we also show the result of GAMP on a particular instance (black dots) and, in blue, the performance of an out-of-the-box solver. Left: White Gaussian noise output and a Gauss-Bernoulli signal. For this choice of noise, there is no sharp transition (as opposed to what happens at smaller noises). The results of a LASSO with fine-tuned `1 sparsityenhancing penalty (with [68]) are very close to optimal. Middle: Here we analyze a ReLU output function ϕ(x) = max(0, x), still with a Gauss-Bernoulli signal. Now there is an information-theoretic phase transition at α = 2ρ = 0.4, but GAMP requires αs = 0.589 to reach perfect recovery. We show for comparison the result of a maximum likelihood estimation performed with Keras [26] and observe a sizeable gap in performance. Right: The signless output function ϕ(x) = |x|. The information-theoretic perfect recovery starts at α = ρ = 0.5, but the problem is again harder algorithmically for GAMP that succeeds only above αs = 0.90. Again, the problem appears to be hard for other solvers. In inset, we show the performance for the estimation problem using PhaseMax [37], which is able to learn the rule only using about four times as many measurement than needed information-theoretically. 4.3.4 Rectified linear unit (ReLU) In Fig. 3 (center) we analyze the generalization error for the ReLU output function, ϕ(x) = max(0, x). This channel models the behavior of a single neuron with the rectified linear unit activation [54] widely used in multilayer neural networks. In this case (40) becomes after simple algebra and Gaussian integration by parts (again V ∼ N (0, 1)), lim E opt n→∞ gen h  ρ q∗  1 + EV V 2 erf V = − 2 4 s 2 i (ρ − q ∗ )3/2  1 q∗ q∗ √ − + 2(ρ − q ∗ ) ρ + q ∗ 2π ρπ r ρ + q∗  . ρ − q∗ (60) For sparse Gauss-Bernoulli signals in Fig. 3 (center) we observe again the information-theoretic transition to perfect generalization to be distinct from the algorithmic one. At the same time our test with existing algorithms were not able to closely match the performance of GAMP. This hence also remains an interesting benchmark. 4.3.5 Signless channel In Fig. 3 (right) we analyze the generalization error for the signless output function where ϕ(x) = |x|. This models a situation similar to compressed sensing, except that the sign of the output has been lost. This is a real-valued analog of the phase retrieval problem as discussed in Sec. 4.2.3. In this case the generalization error (40) becomes p   opt lim Egen = ρ − EV b(V q ∗ , ρ − q ∗ )2 , n→∞ (61) where r b(x, y) =   2y − x2y2 x x  xn x o e + erfc − √ − 1 + erf − √ . π 2 2 2y 2y 22 (62) Our comparison with the performance of a state-of-the-art algorithm PhaseMax [37] suggests that also for this simple benchmark there is room for improvement in term of matching the performance of GAMP. 4.3.6 Sigmoid, or logistic regression Let us also consider an output function with auxiliary randomization. After having generated the classifier X∗ , the teacher randomly associates the label +1 to the pattern Φµ with probability fλ (n−1/2 Φµ ·X∗ ), where fλ (x) = (1 + exp(−λx))−1 ∈ [0, 1] is the sigmoid of parameter λ > 0, and the label −1 with probability 1 − fλ (n−1/2 Φµ · X∗ ). One of the (many) possible ways for the teacher to do so is by selecting ϕ(x, A) = I(A ≤ fλ (x)) − I(A > fλ (x)), where I(E) is the indicator function of the event E. He then generates a i.i.d. stream of uniform random numbers A i.i.d. ∼ U[0,1] and obtains the labels through (35). Let V, w ∼ N (0, 1). In this setting the error (40) becomes opt lim Egen = 2 − 4 EV n→∞ p p  Ew fλ ( q ∗ V + ρ − q ∗ w) 2 . (63) This fomula reduces to (57) when λ → ∞ as it should. 5 Proof of the replica formula by the adaptive interpolation method We now prove Theorem 1. Our main tool will be an interpolation method recently introduced in [13] and called “adaptive interpolation method”. Here we formulate the method as a direct evolution of the Guerra and Toninelli interpolation method developed in the context of spin glasses [39]. In constrast with the discrete and more pedestrian version of the adaptive interpolation method presented in [13] (and called in this case “stochastic interpolation method”), here we employ a continuous approach which is more straightforward (see [13] for the links between the discrete and continuous versions of the method) and that has also been recently used in [8] for studying non-symmetric tensor estimation. We will prove Theorem 1 under the following hypotheses: (H1) The prior distribution P0 has a bounded support. (H2) ϕ is a bounded C 2 function with bounded first and second derivatives w.r.t. its first argument. (H3) (Φµi ) i.i.d. ∼ N (0, 1). These assumptions will then be relaxed in Appendix D to the assumptions (h1), (h2) and (h3) or (h3.a)-(h3.b)(h3.c). Since the observations (1) are equivalent to the rescaled observations  1  Yeµ := ∆−1/2 Yµ = ∆−1/2 ϕ √ [ΦX∗ ]µ , Aµ + Zµ , n 1 ≤ µ ≤ m, (64) the variance ∆ of the Gaussian noise can be “incorporated” inside the function ϕ. Thus, it suffices to prove Theorem 1 for ∆ = 1 and we suppose, for the rest of the proof, that we are in this equivalent case. 5.1 Interpolating estimation problem We introduce an “interpolating estimation problem” that interpolates between the orginal problem (2) at t = 0, t ∈ [0, 1] being the interpolation parameter, and the two scalar problems described in Sec. 2.2 at t = 1 which are analytically tractable. For t ∈ (0, 1) the interpolating estimation problem is a mixture of the original and scalar problems. This interpolation scheme is inspired from the interpolation paths used by Talagrand to 23 study the perceptron, see [76]. There are two major differences between the “non-planted perceptron” studied by Talagrand, and the “planted perceptron” that we are investigating: • In the planted case, the presence of a planted solution forces (under small perturbations) the correlations to vanish for all values of the parameters, see [48,63]. In the non-planted case, proving such decorelation is much more involved, and is proved only in a limited region of the parameter space, see [76]. • However, in the planted case, there can be arbitrarily many (see Remark 21 in [82]) solutions to the state evolution equations (19), whereas in the region studied by [76], there is only one solution. For this reason, our interpolation method needs to be more sophisticated in order to interpolate with the “right fixed point”. Let q : [0, 1] → [0, ρ] be a continuous “interpolation function” and r ≥ 0. Define r St,µ := 1−t [ΦX∗ ]µ + n sZ sZ t t q(v)dv Vµ + 0 (ρ − q(v))dv Wµ∗ (65) 0 where Vµ , Wµ∗ i.i.d. ∼ N (0, 1). Consider the following observation channels, with two types of observations obtained through ( Yt,µ ∼ Pout ( · | St,µ ) , 1 ≤ µ ≤ m, √ (66) 0 Yt,i = r t Xi∗ + Zi0 , 1 ≤ i ≤ n, m where (Zi0 )ni=1 i.i.d. ∼ N (0, 1). We assume that V = (Vµ )µ=1 is known. Then the inference problem is to recover ∗ ∗ m ∗ ∗ n both unknowns W = (Wµ )µ=1 and X = (Xi )i=1 from the knowledge of V, Φ and the “time-dependent” 0 0 n observations Yt = (Yt,µ )m µ=1 and Yt = (Yt,i )i=1 . We now understand that rt appearing in the second set of measurements in (66), and the terms 1 − t, Rt Rt q(v)dv and 0 (ρ − q(v))dv appearing in the first set all play the role of signal-to-noise ratios in the in0 terpolating model, with t giving more and more “power” (or weight) to the scalar inference channels when increasing. Here is the first crucial and novel ingredient of our interpolation scheme. In the classical interpolation method, these signal intensities would all take a trivial form (i.e. would be linear in t) but here, the non-trivial (integral) dependency in t of the two latter intensities through the use of the interpolation function q allows for much more flexibility when choosing the interpolation path. This will allow us to actually choose the “optimal interpolation path” (this will become clear soon). Define uy (x) := ln Pout (y|x) and, with a slight abuse of notations, r st,µ = st,µ (x, wµ ) := 1−t [Φx]µ + n sZ sZ t 0 t (ρ − q(v))dv wµ . q(v)dv Vµ + (67) 0 We introduce the interpolating Hamiltonian Ht (x, w; Y, Y0 , Φ, V) := − m X n ln Pout (Yµ |st,µ ) + µ=1 =− m X 2 1X 0 √ Yi − t r xi 2 i=1 uYt,µ (st,µ ) + µ=1 n 1X √ 2 t r (Xi∗ − xi ) + Zi0 2 . (68) i=1 The dependence in Φ and V of the Hamiltonian is through the (st,µ )m µ=1 . We also introduce the corresponding Gibbs bracket h−it which is the expectation operator w.r.t. the t-dependent posterior distribution of (x, w) 24 given (Yt , Yt0 , Φ, V). It is defined as 1 hg(x, w)it := Zt (Yt , Yt0 , Φ, V) Z 0 dP0 (x)Dw g(x, w) e−Ht (x,w;Yt ,Yt ,Φ,V) , (69) Q 2 /2 −wµ for every continuous bounded function g on Rn × Rm . In (69) Dw = (2π)−m/2 m is the µ=1 dwµ e 0 m-dimensional standard Gaussian distribution and Zt (Yt , Yt , Φ, V) is the appropriate normalization: Z 0 0 Zt (Yt , Yt , Φ, V) := dP0 (x)Dw e−Ht (x,w;Yt ,Yt ,Φ,V) . (70) Finally the interpolating free entropy is fn (t) := 1 E ln Zt (Y, Y0 , Φ, V) . n (71) One verifies easily that ( fn (0) = fn − 21 , fn (1) = ψP0 (r) − 1+rρ 2 + R1 m n ΨPout ( 0 q(t)dt; ρ) , (72) where fn is given by (11). We emphasize a crucial property of the interpolating model: It is such that at t = 0 we recover the original model and thus fn (0) = fn − 1/2 (the trivial constant comes from the purely noisy measurements of the second channel in (66)), while at t = 1 we have the two scalar inference channels and thus the associated terms ψP0 and ΨPout discussed in Sec. 2.2 appear in fn (1). These are precisely the terms appearing in the potential (18). 5.2 Free entropy variation along the interpolation path From the understanding of the previous section, it is at this stage very natual to evaluate the variation of free entropy along the interpolation path, which allows to “compare” the original and purely scalar models thanks to the identity 1 fn = fn (0) + = fn (1) − 2 Z 0 1 1 dfn (t) dt + , dt 2 (73) where the first equality follows from (72). As discussed above, part of the potential (18) appears in fn (1). If the interpolation is properly done, the missing terms required to obtain the potential on the r.h.s. of (73) should naturally appear. Then by choosing the optimal interpolation path thanks to the non-trivial snr dependencies in t (i.e. by selecting the proper interpolating function q), we will be able to show the equality between the replica formula and the true entropy fn . We thus now compute the t-derivative of the free entropy along the interpolation path (see Appendix C for the proof). Let u0y (x) be the derivative (w.r.t. x) of uy (x). Then we have the following. Proposition 4 (Free entropy variation). For model (2), the derivative of the free entropy (71) verifies, for all t ∈ (0, 1), m  E dfn (t) 1 D 1 X 0 rq(t) rρ =− E uYt,µ (St,µ )u0Yt,µ (st,µ ) − r Q − q(t) + − + On (1) , dt 2 n 2 2 t µ=1 25 (74) where On (1) is a quantity that goes to 0 in the n, m → ∞ limit, uniformly in t ∈ [0, 1] and the overlap is n Q := 1X ∗ Xi xi . n (75) i=1 5.3 Overlap concentration The next lemma plays a key role in our proof. Essentially it states that the overlap concentrates around its mean, a behavior called “replica symmetric” in statistical physics. Similar results have been obtained in the context of the analysis of spin glasses [76]. Here we use a formulation taylored to Bayesian inference problems as developed in the context of LDPC codes, random linear estimation [14] and Nishimori symmetric spin glasses [47, 48, 57]. We introduce a “small” perturbation of the interpolating estimation problem by adding to the Hamiltonian (68) a term n  2  X √ x bi  i − xi Xi∗ − xi Z 2 (76) i=1 where (Zbi )ni=1 i.i.d. ∼ N (0, 1). This√term can be interpreted as having a set of extra observations coming from a Gaussian side-channel Ybi = Xi∗ + Zbi for i = 1, . . . , n and that preserves the Nishimori identity (see Appendix A.1). The new Hamiltonian Ht, (x, w; Y, Y0 , Φ, V) defines a new Gibbs bracket h−in,t, and free entropy fn, (t), and all the set up of Sec. 5.1 and Proposition 4 trivially extend. This perturbation induces only a small change in the free entropy, namely of the order of : Lemma 1 (Small free entropy variation under perturbation). Let S > 0 such that the support of P0 is included in [−S, S]. For all  > 0 and all t ∈ [0, 1], |fn, (t) − fn (t)| ≤  S2 . 2 (77) Proof. A simple computation gives ∂fn, (t) 1 S2 = EhQin,t, ≤ , ∂ 2 2 (78) which proves the lemma. Moreover, this small perturbation forces the overlap to concentrate around its mean: Lemma 2 (Overlap concentration). For any 0 < a < b < 1, b Z lim n→∞ a Z 1 dt E Q − EhQin,t, d 0 2 n,t, = 0. (79) In Appendix F.2 we briefly sketch the main steps of the proof for the convenience of the reader and refer to [13] for more details where the method has been streamlined. ∗ Lemma 2 implies that there exists a sequence (n )n≥1 ∈ (0, 1)N that converges to 0 such that Z lim n→∞ 0 1 dt E Q − EhQin,t,n 2 n,t,n = 0. (80) (n )n≥1 converges to 0, so Lemma 1 gives that fn,n (t) and fn (t) have the same limit (provided it exists). In 26 the rest of the section, in order to alleviate the notations, we abusively remove the perturbation subscript n since it makes no difference for the computation of the limit of the free entropy. 5.4 Canceling the remainder Note from (72) and (18) that the second and third terms appearing in (74) are precisely the missing ones that are required in order to obtain the expression of the potential on the r.h.s. of (73). Thus in order to prove Theorem 1 we would like to “cancel” the Gibbs bracket in (74), which is the so called remainder (once integrated over t). This is made possible thanks to the adaptive interpolating parameter q. We would like to choose q(t) = E hQit , which is approximately equal to Q because it concentrates, see Lemma 2. However, Rt E hQit depends on 0 q(v)dv (and on r too). The equation q(t) = E hQit is therefore a first order differential Rt equation over t 7→ 0 q(v)dv. Proposition 5 (Existence of the optimal interpolation function). For all r ≥ 0 the differential equation (81) q(t) = E hQit (r) admits a unique solution qn (t) on [0, ρ] and the mapping Z 1 r ≥ 0 7→ (82) qn(r) (v)dv 0 is continuous. Rt Proof. One verify easily that E hQit is a bounded C 1 function of ( 0 q(v)dv, r). The proposition follows then from an application of the parametric Cauchy-Lipschitz theorem. Using this optimal choice for the interpolating function allows then to relate the potential and free entropy. (r ) n Proposition 6. Let (rn )n≥1 ∈ RN be the solution of (81). Then + be a bounded sequence. For n ∈ N, let qn Z 1 fn = fRS qn(rn ) (v)dv, rn  + On (1) . (83) 0 (r ) Proof. qn n satisfies (81). Therefore by the Cauchy-Schwarz inequality m  D 1 X E u0Yt,µ (St,µ )u0Yt,µ (st,µ ) − rn Q − qn(rn ) (t) dt E n t 0 µ=1 m Z 1 D 1 X 2 E 1/2  Z 1 2 1/2 ≤ dt E u0Yt,µ (St,µ )u0Yt,µ (st,µ ) − rn dt E Q − qn(rn ) (t) t = On (1) . n t 0 0 Z 1 µ=1 The last equality uses that the first factor is bounded (independently of t) because we supposed that Pout is generated by (64) with assumptions (H1), (H2) and (H3) (see Appendix A.5 for proof details) and the second factor goes to 0 when n, m → ∞ by (80), (81). Therefore from (74) Z 0 1 rn dfn (t) dt = dt 2 Z 1 qn(rn ) (t)dt − 0 rn ρ + On (1) . 2 (84) When replacing this identity in (73) and combining this with (72) we reach  m fn = ψP0 (rn ) + ΨPout n Z 1  qn(rn ) (t)dt; ρ 0 27 rn − 2 Z 0 1 qn(rn ) (t)dt + On (1) . (85) Recalling that m/n → α as m, n → ∞ allows to recognize from (18) the claimed identity (83). 5.5 Lower and upper matching bounds We now possess all the necessary tools to prove Theorem 1 in three steps. (i) We prove that, under assumptions (H1), (H2) and (H3), limn→∞ fn = supr≥0 inf q∈[0,ρ] fRS (q, r). (ii) Under hypothesis (H2), the function ΨPout is convex, Lipschitz and non-decreasing (Proposition 11). We thus apply Corollary 5 of Appendix E to get supr≥0 inf q∈[0,ρ] fRS (q, r) = supq∈[0,ρ] inf r≥0 fRS (q, r). We then deduce from (i) that limn→∞ fn = supq∈[0,ρ] inf r≥0 fRS (q, r) under (H1)-(H2)-(H3). (iii) Finally, the approximation arguments given in Appendix D permit to relax (H1)-(H2) to the weaker hypotheses (h1)-(h2) and allow to replace the Gaussian assumption (H3) on Φ by (h3.a)-(h3.b)-(h3.c). This proves the first equality of Theorem 1. The last equality in (20) and the remaining part of Theorem 1 follow then from Lemma 13. It remains thus to tackle (i). Let us start by the lower bound. Proposition 7 (Lower bound). The free entropy (10) verifies lim inf fn ≥ sup inf fRS (q, r) . n→∞ r≥0 q∈[0,ρ] (86) Proof. By Proposition 6 we have that for any r ≥ 0, fn ≥ fRS 1 Z qn(r) (t)dt, r  + On (1) ≥ inf fRS (q, r) + On (1) q∈[0,ρ] 0 (87) and thus lim inf fn ≥ inf fRS (q, r) . n→∞ q∈[0,ρ] (88) This is true for all r ≥ 0 thus we obtain Proposition 7. We now turn our attention to the converse bound. Proposition 8 (Upper bound). The free entropy (10) verifies lim sup fn ≤ sup inf fRS (q, r) . r≥0 q∈[0,ρ] n→∞ (89) Proof. Let K = 2αΨ0Pout (ρ; ρ). The mapping from equation (82) is continuous, consequently the application [0, K] → [0, K]  R 1 (r) 0 r 7→ 2αΨPout 0 qn (t)dt; ρ (90) is continuous (recall that Ψ0Pout denotes the derivative of ΨPout w.r.t. its first argument, and is shown to be R 1 (r∗ ) continuous and bounded in Appendix A.2.2). It admits therefore a fixed point rn∗ = 2αΨ0Pout ( 0 qn n (t)dt; ρ). Proposition 6 gives then Z 1 ∗  fn = fRS qn(rn ) (t)dt, rn∗ + On (1) . (91) 0 28 We now remark that fRS Z 1  ∗ qn(rn ) (t)dt, rn∗ = inf fRS (q, rn∗ ) . q∈[0,ρ] 0 (92) Indeed, the function grn∗ : q ∈ [0, ρ] 7→ fRS (q, rn∗ ) is convex (because of Proposition 11) and its q-derivative is gr0 n∗ (q) = αΨ0Pout (q) − rn∗ . 2 (93) R 1 (r∗ ) R 1 (r∗ ) Since gr0 n∗ ( 0 qn n (t)dt) = 0 by definition of rn∗ , the minimum of grn∗ is necessarily achieved at 0 qn n (t)dt. Combining (91) with (92) we reach fn = inf fRS (q, rn∗ ) + On (1) ≤ sup inf fRS (q, r) + On (1) q∈[0,ρ] r≥0 q∈[0,ρ] (94) which allows to deduce Proposition 8. From the arguments given at the beginning of the section, this ends the proof of Theorem 1. Appendix A: Some technicalities A.1 The Nishimori identity Proposition 9 (Nishimori identity). Let (X, Y) ∈ Rn1 × Rn2 be a couple of random variables. Let k ≥ 1 and let X(1) , . . . , X(k) be k i.i.d. samples (given Y) from the conditional distribution P (X = · |Y), independently of every other random variables. Let us denote h−i the expectation operator w.r.t. P (X = · |Y) and E the expectation w.r.t. (X, Y). Then, for all continuous bounded function g we have Ehg(Y, X(1) , . . . , X(k) )i = Ehg(Y, X(1) , . . . , X(k−1) , X)i . (95) Proof. This is a simple consequence of Bayes formula. It is equivalent to sample the couple (X, Y) according to its joint distribution or to sample first Y according to its marginal distribution and then to sample X conditionally to Y from its conditional distribution P (X = · |Y). Thus the (k + 1)-tuple (Y, X(1) , . . . , X(k) ) is equal in law to (Y, X(1) , . . . , X(k−1) , X). A.2 A.2.1 Some properties of the scalar channels The additive Gaussian scalar channel We recall here some properties of the free entropy of the first scalar channel (12). Proposition 10. Let X0 ∼ P0 be a real random variable with finite second moment. Let r ≥ 0 and Y0 = √ rX0 + Z0 , where Z0 ∼ N (0, 1) is independent from X0 . Then the function Z √ 2 ψP0 : r 7→ E ln dP0 (x)e r Y0 x−rx /2 is convex, differentiable, non-decreasing and 12 E[X02 ]-Lipschitz on R+ . Moreover, ψP0 is strictly convex, if P0 is not a Dirac measure. Proof. Denote by h−ir the posterior distribution of X0 given Y0 in the channel (12). Using Gaussian integration by parts and the Nishimori property (Proposition 9), one verify easily that for all r ≥ 0 2ψP0 0 (r) = EhxX0 ir = Ehxi2r ∈ [0, E[X02 ]] , 29 where x ∼ h−ir , independently of everything else. ψP0 0 is non-decreasing because it is linked to the minimal mean square error mmse(r) of the channel (12) which is non-increasing with r: h 2 i mmse(r) = E X0 − E[X0 |Y0 ] = E[X02 ] − 2ψP0 0 (r) . It remains to show that ψP0 is strictly convex when P0 differs from a Dirac mass. When P0 admits a finite moment of order 4, one can compute the second derivative and again, using Gaussian integration by parts and the Nishimori identity one obtain: 2 i 1 h ψP00 0 (r) = E hx2 ir − hxi2r . 2 (N ) Without the 4th moment assumption, one can proceed by truncation. We consider now the distribution P0 (N ) of X0 = X0 I(−N ≤ X0 ≤ N ). h−ir,N will denote the corresponding posterior distribution. We apply the previous computation to obtain ψ 0 (N ) (t) P0 − ψ 0 (N ) (s) P0 1 = 2 t Z h hx2 ir,N − hxi2r,N E 2 i dr , (96) s for 0 < s < t. Now suppose that ψP0 0 is not strictly increasing. We can then find 0 < s < t such that ψP0 0 (s) = ψP0 0 (t). The sequence of convex functions (ψP (N ) )N converges to ψP0 which is differentiable. A 0 standard analysis lemma gives then that the derivatives (ψ 0 (N ) P0 )N converges to ψP0 0 . Therefore, equation (96) and Fatou’s Lemma lead to  Z t  Z t h 2 2 i 2 2 0≤ E lim inf hx ir,N − hxir,N dr ≤ lim inf E hx2 ir,N − hxi2r,N dr = 0 . s N →∞ N →∞ s It is not difficult to verify that hx2 ir,N − hxi2r,N −−−−→ hx2 ir − hxi2r almost surely. We conclude N →∞ Z t h E hx2 ir − hxi2r 2 i dr = 0 . s We can thus find r ∈ [s, t] such that hx2 ir − hxi2r = 0 almost surely. This means that h−ir is almost surely a Dirac distribution. This is absurd because h−ir admits almost surely a strictly positive density w.r.t. P0 , and P0 is assumed not to be a Dirac distribution. This concludes the proof. A.2.2 The non-linear scalar channel We prove here some properties of the free entropy of the second scalar channel (15). Proposition 11. Let Pout be as in (3) where ϕ : R × RkA → R is a measurable function. Suppose that for (Z, A) ∼ N (0, 1) ⊗ PA we have √ E[ϕ( ρZ, A)2 ] < ∞ . (97) Let V, W ∗ i.i.d. ∼ N (0, 1) and Y be the output of the scalar channel (15). Then for all q ∈ [0, ρ], Z ΨPout (q) = E ln w2  √ e− 2 √ dw √ Pout Y | q V + ρ − q w 2π is well define and the function ΨPout is convex, non-decreasing on [0, ρ] and differentiable on [0, ρ). Moreover, if ϕ is bounded and C 2 with respect to its first coordinate, with bounded first and second derivatives, then ΨPout is Lipschtitz on [0, ρ]. 30 Notice that (97) is for instance verified under hypotheses (h2). Proof. We have for all x, y ∈ R 1 Pout (y|x) = √ 2π∆ Z   1 1 2 exp − (y − ϕ(x, a)) dPA (a) ≤ √ . 2∆ 2π∆ Thus, using Jensen’s inequality √ 1 1 √ Ea,w (Y − ϕ( qV + ρ − qw))2 − ln(2π∆) − 2 2∆ w2 Z  √ 1 e− 2 √ ≤ ln dw √ Pout Y | q V + ρ − q w ≤ − ln(2π∆) , 2 2π (98) where Ea,w denotes the expectation w.r.t. (w, a) ∼ N (0, 1) ⊗ PA . By assumptions, the left-hand side is integrable, so that ΨPout (q) is well defined for all q ∈ [0, ρ]. Let us assume now that ϕ is bounded and C 2 w.r.t. its first coordinate, with bounded first and second derivatives. In that case, we will be able to use continuity and differentiation under the expectation, because all the domination hypotheses will be easily verified. It is thus easy to check that ΨPout is continuous on [0, ρ]. We compute now the first derivative. Recall that h−isc , defined in (17), denotes the posterior distribution of W ∗ given Y . We will use the notation uy (x) = ln Pout (y|x). For q ∈ (0, ρ) we have E √ √ 1 D √ √ Ψ0Pout (q) = E u0Y ( qV + ρ − qw)u0Y ( qV + ρ − qW ∗ ) 2 sc E2 √ 1 D 0 √ = E uY ( qV + ρ − qw) ≥ 0, 2 sc where w ∼ h−isc , independently of everything else. ΨPout is therefore non-decreasing. Using the boundedness assumption on ϕ, it is not difficult to check that Ψ0Pout is indeed bounded. ΨPout is thus Lipschtitz. √ √ We will now compute Ψ00Pout . To lighten the notations, we write u0Y (w) for u0Y ( qV + ρ − qw). We compute D E h 1  D E i 1 ∂q E u0Y (w)u0Y (W ∗ ) =E W ∗ u0Y (W ∗ ) u0Y (w)u0Y (W ∗ ) √ V − √ 2 q 2 ρ−q sc sc D 1  E 1 +2E W ∗ u00Y (W ∗ )u0Y (w) √ V − √ 2 q 2 ρ−q sc D 1  E 1 +E W ∗ u0Y (W ∗ )2 u0Y (w) √ V − √ 2 q 2 ρ−q sc D E D 1  E 1 −E u0Y (W ∗ )u0Y (w) w u0Y (w) √ V − √ 2 q 2 ρ−q sc sc (A) (B) (C) (D) (99) Notice that (A) = (C). We compute, using Gaussian integration by parts and the Nishimori identity (Pro- 31 position 9) D E i 1 h D E i 1 h (A) = E u0Y (W ∗ ) u0Y (W ∗ )u00Y (w) + E u0Y (W ∗ ) u0Y (W ∗ )u0Y (w)2 2 2 sc sc D E D E i 1 h 0 − E uY (W ∗ ) u0Y (W ∗ )u0Y (w) u0Y (w) 2 sc D E D D Esc D E − E u00Y (W ∗ )u0Y (w) + E u00Y (W ∗ )u0Y (w)2 (B) = E u00Y (W ∗ )u00Y (w) sc sc D 1  E 1 ∗ 0 ∗ 0 (1) 0 (2) √ V − W u (W )u (w )u (w ) (D) = −E √ Y Y Y 2 q 2 ρ−q sc sc (100) u0Y (w) E sc (101) = −Ehu0Y (W ∗ )u00Y (w(1) )u0Y (w(2) )isc − Ehu0Y (W ∗ )u0Y (w(1) )2 u0Y (w(2) )isc + Ehu0Y (W ∗ )u0Y (w(1) )u0Y (w(2) )isc hu0Y (w)isc (102) We now replace (100), (101) and (102) in (99): D E D E D E − E u0Y (W ∗ )2 u0Y (w(1) )u0Y (w(2) ) + E u0Y (W ∗ )2 u0Y (w)2 2Ψ00Pout (q) = E u0Y (W ∗ )2 u00Y (w) E sc E sc D D E sc D 00 ∗ 0 (1) 0 (2) 00 ∗ 0 2 00 ∗ 00 − E uY (W )uY (w )uY (w ) + E uY (W )uY (w) + E uY (W )uY (w) − sc 0 ∗ 00 (1) 0 EhuY (W )uY (w )uY (w(2) )isc Using the identity u00Y (x) + u0Y (x)2 = Ψ00Pout (q) 00 (Y |x) Pout Pout (Y |x) , − sc 0 ∗ 0 EhuY (W )uY (w(1) )2 u0Y (w(2) )isc + sc 0 4 EhuY (w)isc . this factorizes and gives E 2 2 i D 00 (Y |√q V + √ρ − qw) E √ 1 hD Pout √ √ = E ≥ 0. − u0Y ( q V + ρ − qw) √ 2 Pout (Y | q V + ρ − qw) sc sc (103) ΨPout is thus convex on [0, ρ]. It remains now to prove that ΨPout is convex without the boundedness and C 2 assumptions on ϕ. Using the same arguments than in Appendix D one see that we can approximate with arbitrary precision ΨPout with a function ΨP̂out , where P̂out can be represented by a couple (ϕ̂, ∆) and ϕ̂ is bounded and C 2 w.r.t. its first coordinate, with bounded first and second derivatives. This proves that ΨPout is convex. The fact that ΨPout is differentiable on [0, ρ) follows from differentiation under the expectation sign. In order to see it, we define √ √ X = q V + ρ − q W ∗ . Then, for all q ∈ [0, ρ): Z ΨPout (q) = E 1 − e dX p 2π(ρ − q) √ (X− q V )2 2(ρ−q) Z Z dY Pout (Y |X) ln dx p 1 2π(ρ − q) e − √ (x− q V )2 2(ρ−q) Pout (Y |x) . (104) We are now in a good setting to differentiate under the expectation sign. The domination follows by the same convexity argument than for (98). A.3 Proof of Theorem 2 Define for ∆ > 0, m ln(2π∆) fˆn (∆) = fn + 2n   Z m X √ 1 1 = E log  dP0 (x)dPa (a) exp − (ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ ) + ∆Zµ )2  n 2∆ µ=1 32 Lemma 3. m fˆn (∆) −−−→ ξn − ∆→0 2n Proof. This follows from two applications of the dominated convergence Theorem. Define    Z m X √ 1 (ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ ) + ∆Zµ )2  h(X, A, Z, ∆) = log  dP0 (x)dPa (a) exp − 2∆ µ=1 and  Z g(X, A, Z) = log  dP0 (x)dPa (a) m Y Z2 − 2µ δ (ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ )) e   µ=1 By the dominated convergence Theorem (the domination is here obvious), for all Φ, X, A, Z h(X, A, Z, ∆) −−−→ g(X, A, Z) . ∆→0 Now, for all Φ, X, A, Z, x, a we have m Y δ(ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ )) e− 2 Zµ 2 m   1 X √ (ϕ([ΦX]µ , Aµ )−ϕ([Φx]µ , aµ )+ ∆Zµ )2 ≤ 1 ≤ exp − 2∆ µ=1 µ=1 Consequently, g(X, A, Z) ≤ h(X, A, Z, ∆) ≤ 0 . Thus h is lower and upper bounded by integrable random variables (that do not depend on ∆). We can thus apply the dominated convergence Theorem to obtain the Lemma. (∆) We will need to write explicitely the dependence of Pout in ∆ by writting: Pout . We also define Ψ̂P (∆) (q) = ΨP (∆) (q) + out out 1 ln(2π∆) 2 Let (∆k )k≥0 be a sequence of positive numbers that converges to 0.   Lemma 4. The sequence Ψ̂ (∆k ) converges uniformly on [0, ρ] to Ψϕ − 21 . Pout k≥0 Proof. The pointwise convergence is proved using the same arguments as in the previous lemma. The uni form convergence follows from Dini’s second Theorem, Ψ̂ (∆k ) k≥0 is indeed a sequence of non-decreasing Pout functions on [0, ρ] that converges pointwise to Ψϕ − 12 , which is continuous over [0, ρ] (as a pointwise limit of convex functions, for instance). The uniform convergence implies then the convergence of the sup − inf : Corollary 4. n n rq o rq o α sup inf ψP0 (r) + αΨP (∆) (q) − −−−→ sup inf ψP0 (r) + αΨϕ (q) − − ∆→0 q∈[0,ρ] r≥0 out 2 2 2 q∈[0,ρ] r≥0 We have now all the tools needed for the proof of Theorem 2. Proof of Theorem 2. We extend by continuity (see Lemma 3) fˆn at ∆ = 0, to obtain a sequence of convex 33 functions on [0, 1]. Define for ∆ ∈ [0, 1]  o n supq∈[0,ρ] inf r≥0 ψP0 (r) + αΨ (∆) (q) − rq Pout n o2 fˆ∞ (∆) = rq sup − α2 q∈[0,ρ] inf r≥0 ψP0 (r) + αΨϕ (q) − 2 if ∆ > 0 , if ∆ = 0 . By Theorem 1, fˆ∞ is the pointwise limit of the sequence of convex functions (fˆn )n≥1 on (0, 1], it is thus continuous on (0, 1]. By Corollary 4 we obtain that fˆ∞ is continuous on [0, 1]. Moreover, fˆn is differentiable on (0, 1) and it is not difficult to check that its derivative is uniformly bounded in n: "  2 # m 1 0 ∀n ≥ 1, sup |fn (∆)| ≤ E ϕ √ [ΦX]1 , A1 n n ∆∈(0,1) which is bounded by assumption (h2). This implies that fˆn (0) → fˆ∞ (0), otherwise the derivative of fˆn would explode near 0. A.4 Proof of Proposition 1 In this section, we prove Proposition 1. In order to prove Proposition 1, we will need the following lemma. For k ≥ 1 we denote by Sk+ the set of positive semi-definite k × k matrices and by Sk+∗ the set of positive definite k × k matrices. Lemma 5. Let (Cn )n≥1 be a sequence of random variables in Sk+ , that converges in law to C, such that C is almost surely positive definite. Let f : Rk → R be a measurable function and Z ∼ N (0, Ik ) be independent from (Cn ). Assume that the sequence (f (Cn Z))n≥1 is uniformly integrable. Then E[f (Cn Z)] −−−→ E[f (CZ)] n→∞ Proof. By the uniform integrability assumption, it suffices to show that (f (Cn Z))n converges to f (CZ) in law. Let g : R → R be a continuous bounded function. Let EZ denote the expectation w.r.t. Z only. Then the function h : Sk+ → R M 7→ EZ [g(f (MZ))] is continuous over Sk+∗ . Indeed, for M ∈ Sk+∗ , 1 h(M) = k/2 (2π) |detM|k Z   1 | −2 exp − x M x g(f (x))dx . 2 The discontinuity points of h are thus in Sk+ \ Sk+∗ , which has 0 measure for the law of C (because C is a.s. positive definite). Consequently, by Portemanteau Theorem E[h(Cn )] → E[h(C)] which proves that (f (Cn Z))n converges to f (CZ) in law. We can now prove Proposition 1. Proof. We define 1 Cn = n kX∗ k2 x · X∗ x · X∗ kxk2 ! 34 P −−−→ n→∞ ρ q q ρ ! ∈ S2+∗ By the Nishimori property, one verify easily that *        2   2 + Φnew · X∗ Φnew · x Φnew · x 1 Φnew · X∗ √ √ √ √ E ϕ ,A − ϕ ,a ,A − ϕ ,a = E ϕ 2 n n n n n n *     2 + ∗ Φnew · X Φnew · x 1 √ √ ,A − ϕ ,a = E Ea,A ϕ 2 n n n Now, we remark that     2 Φnew · X∗ Φnew · x √ √ Ea,A ϕ ,A − ϕ ,a n n is simply a measurable function that we denote f of   Φnew · X∗ Φnew · x √ = C1/2 , √ n Z n n in law, where Z ∼ N (0, I2 ) is independent from Cn . We can thus apply Lemma 5 (the uniform integrability assumption follows from our hypothesis (h2)): *     2 + Φnew · X∗ Φnew · x √ √ lim E Ea,A ϕ ,A − ϕ ,a n→∞ n n n h 2 i √ √ √ √ 1/2 = E[f (C Z)] = E ϕ( qZ1 + ρ − qZ2 , A) − ϕ( qZ1 + ρ − qZ20 , a) for Z1 , Z2 , Z20 i.i.d. ∼ N (0, 1). By expanding the square of the right-hand side and applying Bayes rule, one obtains exactly twice the right-hand side of (39). This concludes the proof. A.5 Boundedness of an overlap fluctuation In this appendix we show that the “overlap fluctuation” m m D 1 X 2 E D 1 X 2 E 0 0 2 E uYt,µ (St,µ )uYt,µ (st,µ ) − rn ≤ 2rn + 2E u0Yt,µ (St,µ )u0Yt,µ (st,µ ) n n t t µ=1 (105) µ=1 is bounded uniformly in t under hypothesis (H2) on ϕ. From the representation (3) (recall we consider ∆ = 1 in Sec. 5) uYt,µ (s) = ln Pout (Yt,µ |s) Z 1 1 2 = ln dPA (aµ ) √ e− 2 (Yt,µ −ϕ(s,aµ )) 2π (106) and thus u0Yt,µ (s) R = 1 2 dPA (aµ )(Yt,µ − ϕ(s, aµ ))ϕ0 (s, aµ )e− 2 (Yt,µ −ϕ(s,aµ )) R 1 2 dPA (aµ )e− 2 (Yt,µ −ϕ(s,aµ )) (107) where ϕ0 is the derivative w.r.t. the first argument. From (1) at ∆ = 1 we get |Yt,µ | ≤ sup |ϕ| + |Zµ |, where the supremum is taken over both arguments of ϕ, and thus immediately obtain for all s ∈ R |u0Yt,µ (s)| ≤ (2 sup |ϕ| + |Zµ |) sup |ϕ0 | . 35 (108) From (108) and (105) we see that it suffices to check that 2  m2  E (2 sup |ϕ| + |Zµ |)2 (sup |ϕ0 |)2 ≤ C(ϕ) 2 n where C(ϕ) is a constant depending only on ϕ. This is easily seen by expanding all squares and using that m/n is bounded. Appendix B: Proofs of the limits of optimal errors B.1 Computation of the denoising error: Proof of Corollary 3 One can verify easily that in (defined by (21)) is a concave differentiable function of ∆−1 (see [40]). Thus its limit i∞ is also a concave function of ∆−1 . Therefore, a standard analysis lemma gives that the derivative of in w.r.t. ∆−1 converges to the derivative of i∞ at every point at which i∞ is differentiable (i.e. almost every points, by concavity). Let us now compute these two derivatives. Using the I-MMSE Theorem from [40], one obtain m  1  D  1 E 1 X ∂in ∗ √ √ = E ϕ [ΦX ] , A − ϕ [Φx] , a µ µ µ µ ∂∆−1 2n n n 2 . (109) µ=1 Second, define h(q, ∆) = n qr o α (1 + ln(2π∆)) + αΨPout (q) + inf ψP0 (r) − . r≥0 2 2 (110) Then i∞ = − supq∈[0,ρ] h(q, ∆). The computation of ∂ΨPout (q)/∂∆−1 follows from the I-MMSE theorem √ √ √ of [40]. Indeed, if we denote S = ϕ( qV + ρ − qW ∗ , A), notice that ΨPout (q) = −I(S; S + ∆Z | V ) − √ √ √ 1 2 log(2πe∆), because ΨPout (q) = −H(S + ∆Z | V ) and I(S + ∆Z; S | V ) = H(S + ∆Z | V ) − H(S + √ ∆Z | V, S) = −ΨPout (q) − 12 log(2πe∆). Therefore √ √ ∂ΨPout (q) ∆ ∂ ∆ 1 = − I(S + ∆Z; S | V ) = − MMSE(S + ∆Z | V, S) ∂∆−1 2 ∂∆−1 2 2  p p    ∆ 1  √ = − E ϕ( ρ V, A)2 − E ϕ( q ∗ V + ρ − q ∗ w, a)i2sc . 2 2 Consequently, p p    ∂h(q, ∆) α  √ 2 ∗V + ∗ w, a)i2 E ϕ( ρ V, A) − E ϕ( q ρ − q . = − sc ∂∆−1 2 Now, Theorem 1 from [61] gives that at every ∆−1 at which i∞ is differentiable p p    ∂i∞ ∂ α  √ 2 ∗V + ∗ w, a)i2 ρ V, A) − E ϕ( q ρ − q = − sup h(q, ∆) = E ϕ( . sc ∂∆−1 ∂∆−1 q∈[0,ρ] 2 where q ∗ ∈ [0, ρ] is a point where the supremum above is achieved, and thus correspond to an optimal couple in (20). As explained above, ∂in /∂∆−1 converges to ∂i∞ /∂∆−1 at every ∆−1 at which i∞ is differentiable, which concludes the proof. 36 B.2 Optimal generalization error with side information: Proof of Proposition 2 Here the arguments are the same as for the proof of Corollary 3, but we repeat them briefly for the reader. By a straightforward generalization of (22), fn is related to the mutual information I(X∗ , A; Y|Φ) between the noisy labels and the classifier and stream A through in := 1 α I(X∗ , A; Y|Φ) = −fn − − αβ ln(2π∆tr ) − α(1 − β) ln(2π∆te ) , n 2 (111) Now in order to access the generalization error we employ the classical I-MMSE relation [40] for Gaussian noise but restricted to the test set. It takes the following form in the present setting (1 − β)m side din = Egen . te −1 d(∆ ) 2n (112) Again we use that in is a sequence of concave functions in (∆te )−1 and thus its limit (which exists by Theorem 1) is concave too. Again, these concavity properties allow to permute limits and differentiation. Therefore from (111) and (112) we find that for almost every ∆te > 0 lim E side n→∞ gen = ∆te − 2 d sup inf f ts (q, r) . α(1 − β) d(∆te )−1 q∈[0,ρ] r≥0 RS (113) It remains to evaluate this derivative using (46) to finally assess the asymptotic generalization error. This is done as in the previous section using an envelope Theorem, see [61]. Appendix C: Proof of Proposition 4 0 (y|x) and P 00 (y|x) the first Recall u0y (x) is the x-derivative of uy (x) = ln Pout (y|x). Moreover denote Pout out and second x-derivatives, respectively, of Pout (y|x). We will first prove that for all t ∈ (0, 1) m n  1 X E dfn (t) 1 D 1 X 0 rq(t) rρ An =− E uYµ (St,µ )u0Yµ (st,µ ) − r Xi∗ xi − q(t) + − − , dt 2 n n 2 2 2 t µ=1 (114) i=1 where m n 1 i h 1 X 00 (Y |S )  Pout 1 X µ t,µ √ ((Xi∗ )2 − ρ) ln Zt . An := E √ n n µ=1 Pout (Yµ |St,µ ) n (115) i=1 Once this is done, we will prove that An goes to 0 as n → ∞ uniformly in t ∈ [0, 1], in order to obtain Proposition 4. C.1 Proof of (114) Recall definition (71) which becomes, when written as a function of the interpolating Hamiltonian (68), Z Z 1 0 0 ∗ ∗ −Ht (X∗ ,W∗ ;Y,Y 0 ,Φ,V) fn (t) = EΦ,V dYdY dP0 (X )DW e ln dP0 (x)Dw e−Ht (x,w;Y,Y ,Φ,V) . n (116) 37 We will need the Hamiltonian t-derivative Ht0 given by Ht0 (X∗ , W∗ ; Y, Y0 , Φ, V) =− m X dSt,µ µ=1 dt u0Yµ (St,µ ) 1 − 2 r n rX ∗ 0 √ Xi (Yi − t rXi∗ ) . t (117) i=1 The derivative of the interpolating free entropy thus reads, for 0 < t < 1,  1 dfn (t) 1  = − E Ht0 (X∗ , W∗ ; Y, Y0 , Φ, V) ln Zt − E Ht0 (x, w; Y, Y0 , Φ, V) t dt {z } |n {z } |n T1 (118) T2 where recall the definition of Zt = Zt (Y, Y0 , Φ, V) given by (70). Let us compute T1 . Let 1 ≤ µ ≤ m. Let us start with the following term  i h dS i 1 h [ΦX∗ ]µ ρ − q(t) q(t) t,µ 0 Vµ + qR Wµ∗ u0Yµ (St,µ ) ln Zt . E + qR uYµ (St,µ ) ln Zt = E − p t t dt 2 n(1 − t) 0 q(s)ds 0 (ρ − q(s))ds (119) Let us compute the first term of the right-hand side of the last identity. By Gaussian integration by parts w.r.t Φµi we obtain   1 p E [ΦX∗ ]µ u0Yµ (St,µ ) ln Zt n(1 − t) n hZ i X 1 ∗ ∗ 0 =p E dYdY0 e−Ht (X ,W ;Y,Y ,Φ,V) Φµi Xi∗ u0Yµ (St,µ ) ln Zt n(1 − t) i=1 = n    1 X  ∗ 2 00 E (Xi ) uYµ (St,µ ) + u0Yµ (St,µ )2 ln Zt + E Xi∗ xi u0Yµ (St,µ )u0Yµ (st,µ ) t n i=1 n n i D1 X E h1 X P 00 (Yµ |St,µ ) (Xi∗ )2 out ln Zt + E Xi∗ xi u0Yµ (St,µ )u0Yµ (st,µ ) , =E n Pout (Yµ |St,µ ) n t i=1 (120) i=1 where we used the identity u00Yµ (x) + u0Yµ (x)2 = 00 (Y |x) Pout µ . Pout (Yµ |x) (121) We now compute the second term of the right hand side of (119). Using again Gaussian integrations by parts but this time w.r.t Vµ , Wµ∗ i.i.d. ∼ N (0, 1) as well as the previous formula, we obtain similarly h  i q(t) ρ − q(t) E qR Vµ + qR Wµ∗ u0Yµ (Sµ,t ) ln Zt t t 0 q(s)ds 0 (ρ − q(s))ds  i hZ  q(t) ρ − q(t) ∗ ∗ 0 =E dYdY0 e−Ht (X ,W ;Y,Y ,Φ,V) qR Vµ + qR Wµ∗ u0Yµ (Sµ,t ) ln Zt t t 0 q(s)ds 0 (ρ − q(s))ds i h P 00 (Y |S ) µ µ,t ln Zt + E q(t)u0Yµ (Sµ,t )u0Yµ (sµ,t ) t . (122) = E ρ out Pout (Yµ |Sµ,t ) 38 Combining equations (119), (120) and (122) together, we have h dS i t,µ 0 −E uYµ (St,µ ) ln Zt dt n n h  i 1 D 1 X  E 00 1 P (Yµ |Sµ,t )  1 X ∗ 2 = E out (Xi ) − ρ ln Zt + E Xi∗ xi − q(t) u0Yµ (St,µ )u0yµ (st,µ ) . (123) 2 Pout (Yµ |Sµ,t ) n 2 n t i=1 i=1 As seen from (118) it remains to compute, recalling that for 1 ≤ j ≤ n, Yj0 − Gaussian integration by parts w.r.t Zj0 ∼ N (0, 1), √ t rXj∗ = Zj0 and then again a Z h i  ∗ 0 √   ∗ 0  0 ∗ ∗ 0 E Xj (Yj − t rXj ) ln Zt = E Xj Zj ln Zt = E Xj Zj ln dP0 (x)Dw e−Ht (x,w;Y,Y ,Φ,V) Z n m h n X √ 2 oi 1X √ ∗ 0 = E Xj Zj ln dP0 (x)Dw exp − uYµ (st,µ ) + trXi∗ + Zi0 − t r xi 2 µ=1 i=1   ∗ √ ∗ 0 t r(Xj − xj ) + Zj t = E Xj √  (124) = t r ρ − EhXj∗ xj it . Thus, by taking the sum, 1 − 2 r n n E i rρ r D 1 X r h1 X ∗ 0 √ E Xi (Yi − t rXi∗ ) ln Zt = − E Xi∗ xi . t n 2 2 n t i=1 (125) i=1 Therefore, for all t ∈ (0, 1), m n 1 i rρ rq(t) 00 (Y |S )  1 h 1 X Pout 1 X µ µ,t ∗ 2 √ √ T1 = E ((Xi ) − ρ) ln Zt + − 2 Pout (Yµ |Sµ,t ) n 2 2 n n µ=1 i=1 m n  1 X E 1 D 1 X 0 uYµ (St,µ )u0Yµ (st,µ ) − r + E Xi∗ xi − q(t) . 2 n n t µ=1 (126) i=1 To obtain (114), it remains to show that T2 = 0. This is a direct consequence of the Nishimori identity (see Appendix A.1): T2 = 1 E Ht0 (x, w; Y, Y0 , Φ) n t = 1 E Ht (X∗ , W∗ ; Y, Y0 , Φ) = 0 . n (127) For obtaining the Lemma, it remains to show that An goes to 0 uniformly in t ∈ [0, 1]. C.2 Proof that An vanishes as n → ∞ We now consider the final step, that is showing that An given by (115) vanishes in the n → ∞ limit uniformly in t ∈ [0, 1] under conditions (H1)-(H2)-(H3). First we show that m n h 1 X i 00 (Y |S )  Pout 1 X µ t,µ √ fn (t)E √ ((Xi∗ )2 − ρ) = 0 . n µ=1 Pout (Yµ |St,µ ) n (128) i=1 Once this is done, we use the fact that n1 ln Zt concentrates around fn (t) to prove that An converges to 0 R 00 as n → ∞. We start by noticing the simple fact that for all s ∈ R, Pout (y|s)dy = 0. Consequently, for 39 µ ∈ {1, . . . , m}, h P 00 (Y |S ) i Z out µ t,µ ∗ 00 E X , St = dYµ Pout (Yµ |St,µ ) = 0 . Pout (Yµ |St,µ ) (129) Thus, using the “tower property” of the conditionnal expectation: n m n m ii h X X h X  hX 00 (Y |S ) i 00 (Y |S ) Pout Pout µ t,µ µ t,µ X ∗ , St = 0 E ((Xi∗ )2 − ρ) =E ((Xi∗ )2 − ρ) E Pout (Yµ |St,µ ) Pout (Yµ |St,µ ) i=1 µ=1 µ=1 i=1 (130) which implies (128). We now show that An goes to 0 uniformly in t ∈ [0, 1] as n → ∞. Using successively (128) and the Cauchy-Schwarz inequality, we have m n h 1 X i  1 00 (Y |S )  Pout 1 X µ t,µ √ √ |An | = E ln Zt − fn (t) ((Xi∗ )2 − ρ) n n µ=1 Pout (Yµ |St,µ ) n i=1 m n h 1 X 2 i1/2 h 1 2 i1/2 00 (Y |S ) 2  Pout 1 X µ t,µ √ ≤ E √ E . ((Xi∗ )2 − ρ) ln Zt − fn (t) n n µ=1 Pout (Yµ |St,µ ) n (131) i=1 Using again the “tower property” of conditional expectations m n n m h X 2 i h X ii 2 h X 00 (Y |S ) 2  X 00 (Y |S ) 2 Pout Pout µ t,µ µ t,µ ∗ 2 ∗ 2 E ((Xi ) − ρ) =E X∗ , St . ((Xi ) − ρ) E Pout (Yµ |St,µ ) Pout (Yµ |St,µ ) µ=1 i=1 µ=1 i=1 (132) Now, using the fact that conditionally on St , the random variables we have  00 (Y |S Pout µ t,µ ) Pout (Yµ |St,µ ) 1≤µ≤m are i.i.d. and centered, m m h X i h X i h P 00 (Y |S ) 2 i 00 (Y |S ) 2 00 (Y |S ) 2 Pout Pout µ t,µ µ t,µ out 1 t,1 X∗ , St = E St = mE St . (133) E Pout (Yµ |St,µ ) Pout (Yµ |St,µ ) Pout (Y1 |St,1 ) µ=1 µ=1 Under condition (H2), it is not difficult to show that there exists a constant C > 0 such that h P 00 (Y |S ) 2 i out 1 t,1 E St ≤ C . Pout (Y1 |St,1 ) (134) Combining now (134), (133) and (132) we obtain that m n n h X 2 i h X 2 i 00 (Y |S ) 2  X  Pout µ t,µ ((Xi∗ )2 − ρ) ≤ mC E ((Xi∗ )2 − ρ) = mnC Var (X1∗ )2 . E Pout (Yµ |St,µ ) µ=1 i=1 i=1 Going back to (131), therefore there exists a constant C 0 > 0 such that 2 i1/2 h 1 |An | ≤ C 0 E ln Zt − fn (t) . n (135) By Theorem 4 we have E[(n−1 ln Zt − fn (t))2 ] → 0 as n → ∞ uniformly in t ∈ [0, 1]. Thus An goes to 0 uniformly in t ∈ [0, 1] as n → ∞. This ends the proof of Proposition 4. 40 Appendix D: Approximation In this section, we suppose that Theorem 1 holds for channels of the form (1) under the hypotheses (H1), (H2) and (H3). We show in this section that this imply that Theorem 1 holds under the hypotheses (h1), (h2), and either (h3) or (h3.a)-(h3.b)-(h3.c). Again, as explained at the beginning of Sec. 5, it suffices to consider the case where ∆ = 1. We start by relaxing the hypothesis (H1). D.1 Relaxing the hypotheses on P0 and Φ The goal of this section is to prove the following proposition: Proposition 12. Suppose that (h1) holds and that ϕ is C ∞ with compact support. Suppose that (h3) or (h3.a)(h3.b)-(h3.c) hold. Then Theorem 1 holds. Proposition 12 will follow from Lemma 6 and Lemma 7 below. Lemma 6. Suppose that (h1) (H2) and (h3) hold. Then Theorem 1 holds. Proof. The ideas are basically the same that in [55] (Sec. 6.2.2). We omit the details here for the sake of brevity. We now relax the Gaussian assumption on the “measurement matrix” Φ. Lemma 7. Suppose that (h1) holds, and that ϕ is C ∞ with compact support. Suppose that (h3.a)-(h3.b) hold. Then Theorem 1 holds. Proof. The proof is based on the Lindeberg generalization theorem (Theorem 2 from [49]) which is a variant of the generalized “Lindeberg principle” from [25]. Theorem 3 (Lindeberg generalization theorem). Let (Ui )1≤i≤n and (Vi )1≤i≤n be two collection of random variables with independent components and f : Rn → R a C 3 function. Denote ai = |EUi − EVi | and bi = |EUi2 − EVi2 |. Then n  X bi ai E|∂i f (U1:i−1 , 0, Vi+1:n )| + E|∂i2 f (U1:i−1 , 0, Vi+1:n )| |Ef (U) − Ef (V)| ≤ 2 i=1 Z Ui Z Vi  1 1 3 2 3 2 + E |∂ f (U1:i−1 , 0, Vi+1:n )|(Ui − s) ds + E |∂i f (U1:i−1 , 0, Vi+1:n )|(Vi − s) ds . 2 0 i 2 0 Let (Φ0µ,i ) i.i.d. ∼ N (0, 1) and let (Φµ,i ) be a family of independent random variables, with zero mean and unit variance. Let fn0 be the free entropy (10) with design matrix Φ0 and fn be the free entropy (10) with design matrix Φ. We will apply Theorem 3 to the function F : U ∈ Rm×n 7→ 1 E ln n Z − 12 dPA (a)dP0 (x) e m P      2 ϕ √1n [UX∗ ]µ ,Aµ −ϕ √1n [Ux]µ ,aµ +Zµ µ=1 x,a where the expectation E is taken w.r.t. X∗ , A and Z. We have fn = EF (Φ) and 41 fn0 = EF (Φ0 ) . It is not difficult to verify that F is a C 3 function and that for all 1 ≤ µ ≤ m and 1 ≤ i ≤ n: ∂3F 3 ∂Uµ,i ≤ ∞ C , n5/2 for some constant C that only depends on ϕ and the first three moments of P0 . Thus, an application of Theorem 3 gives C |fn − fn0 | ≤ √ . n By Proposition 6, we know that Theorem 1 holds for fn0 , thus it holds for fn . D.2 Relaxing the hypotheses on ϕ It remains to relax the hypotheses on ϕ. This section is dedicated to the proof of the following proposition, which is of course exactly the statement of Theorem 1. Proposition 13. Suppose that (h1) and (h2) hold. Suppose that (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, Theorem 1 holds for the output channel (1). To prove Proposition 13 we will approximate the function ϕ with a function ϕ̂ which is C ∞ with compact support. In the following, G is a standard Gaussian random variable, independent of everything else. Proposition 14. Suppose that (h1) and (h2) hold. Suppose that (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, for all  > 0, there exist ϕ̂ ∈ C ∞ (R × RkA ) with compact support, such that  √  √ E (ϕ( ρG, A) − ϕ̂( ρG, A))2 ≤  , and for n large enough, we have "  E ϕ 1 √ [ΦX∗ ]1 , A1 n   − ϕ̂ 1 √ [ΦX∗ ]1 , A1 n 2 # ≤ . Proof. We will distinguish the cases where (h3) holds and where (h3.a)-(h3.b)-(h3.c) holds. Case 1: The Gaussian case: (h3) holds. Notice that [ΦX∗ ]1 = kX∗ kG in law. Thus, if |X1∗ | is a constant random variable, then ϕ is in L2 (R × RkA ) √ with the measure induced by ( ρG, A1 ). The result follows by density of the C ∞ functions with compact support in L2 . We consider now the case where |X1∗ | is not constant. We start with a useful lemma. Lemma 8. Let f : R → R+ be a measurable function. Let G ∼ N (0, 1) and 0 < a ≤ b. Then √ r E[f ( aG)] ≤ √ b E[f ( bG)]. a √ √ In particular, if f ( bG) is integrable then f ( aG) is also integrable. R √ √ 2 Proof. For x ∈ [a, b], notice that: xE[f ( xG)] = (2π)−1/2 e−g /(2x) f (g)dg which is clearly non-decreasing in x. 42 |X1∗ | is not constant and ρ = E[(X1∗ )2 ], therefore there exists ρ < r < r0 such that P(r ≤ (X1∗ )2 ≤ r0 ) > 0. Consequently, using Lemma 8, √ √ P(r ≤ (X1∗ )2 ≤ r0 )E[ϕ( rG, A1 )2 ] = E[1r≤(X1∗ )2 ≤r0 ϕ( rG, A1 )2 ] |X ∗ | ≤ E[1r≤(X1∗ )2 ≤r0 √1 ϕ(|X1∗ |G, A1 )2 ] ≤ r r r0 E[ϕ(|X1∗ |G, A1 )2 ] < ∞. r √ Therefore E[ϕ( rG, A1 )2 ] < ∞. √ Let  > 0. We have just proved that ϕ ∈ L2 (R × RkA ) with the measure induced by ( rG, A1 ). There  √  √ exists a C ∞ function with compact support ϕ̂ such that E (ϕ( rG, A) − ϕ̂( rG, A))2 ≤ . Thus by Lemma 8 r r    √ √ r  √ r √ 2 2 E (ϕ( rZ, A) − ϕ̂( rZ, A)) ≤ . E (ϕ( ρZ, A) − ϕ̂( ρZ, A)) ≤ ρ ρ     2  1 1 √ √ . By the law of large numbers, n1 kXk2 It remains to bound E ϕ kXkG, A1 − ϕ̂ kXkG, A1 n n converges to ρ in probability as n → ∞. Thus P( n1 kXk2 ∈ / [ρ/2, r]) −−−→ 0. We now apply Hölder’s n→∞ inequality: "   2 #   1 1 E 1kXk2 /n∈[ρ/2,r] ϕ √ kXkG, A1 − ϕ̂ √ kXkG, A1 / n n 2 "    2+γ # 2+γ γ 1 1 ≤ P(kXk2 /n ∈ / [ρ/2, r]) 2+γ E ϕ √ kXkG, A1 − ϕ̂ √ kXkG, A1 n n γ ≤ C 2+γ , for some constant C > 0 and for n large enough. It remain to bound " E 1kXk2 /n∈[ρ/2,r] ϕ  1 √ kXkG, A1 n   !2 # 1 − ϕ̂ √ kXkG, A1 n   r  2 √ √ nr ≤ E 1kXk2 /n∈[ρ/2,r] ϕ rG, A1 − ϕ̂ rG, A1 kXk2 r  2 i √ √ 2r h ≤ E ϕ rG, A1 − ϕ̂ rG, A1 ρ r 2r . ≤ ρ  Case 2: The non-Gaussian case: (h3.a)-(h3.b)-(h3.c) hold. In that case, by the Central Limit Theorem (using the fact that the third moments of (Xi∗ Φ1,i ) are bounded with n, because of hypotheses (h3.a) and (h3.b))   [ΦX∗ ]1 √ (d) √ , A1 −−−→ ( ρG, A1 ) . (136) n→∞ n This implies that  ϕ [ΦX∗ ]1 √ , A1 n  √ (d) −−−→ ϕ( ρG, A1 ) . n→∞ (137) Indeed, let g : R → R be a continuous bounded function. We have, by Portemanteau Theorem, that for almost 43 all a ∈ RkA (with respect to PA )    [ΦX∗ ]1 √ √ ,a −−−→ E [g ◦ ϕ( ρG, a)] . E g◦ϕ n→∞ n because for almost all a, g◦ϕ(·, a) is continuous almost-everywhere and bounded. By dominated convergence, it follows that    [ΦX∗ ]1 √ √ E g◦ϕ −−−→ E [g ◦ ϕ( ρG, A1 )] . , A1 n→∞ n   ∗] √ 1 , A1 )n is by assumption (h2) bounded in L2 , thus That finishes the proof of (137). The sequence (ϕ [ΦX n √ by (137) we have that E[ϕ( ρG, A1 )2 ] < ∞. √ Let  > 0. We have just proved that ϕ ∈ L2 (R × RkA ) with the measure induced by ( ρG, A1 ). There   √ √ exists a C ∞ function with compact support ϕ̂ such that E (ϕ( ρG, A) − ϕ̂( ρG, A))2 ≤ . One deduce from (136) and (137) that   2   1 1 √ √ (d) ∗ ∗ −−−→ (ϕ( ρG, A) − ϕ̂( ρG, A))2 . ϕ √ [ΦX ]1 , A1 − ϕ̂ √ [ΦX ]1 , A1 n→∞ n n Now, hypothesis (h2) gives that the sequence above is uniformly integrable. This gives that     2 1 1 √ √ E ϕ √ [ΦX∗ ]1 , A1 − ϕ̂ √ [ΦX∗ ]1 , A1 −−−→ E(ϕ( ρG, A) − ϕ̂( ρG, A))2 ≤  . n→∞ n n Consequently, the left-hand side is smaller that 2 for n large enough. This concludes the proof. In the remaining of this section, we prove Proposition 13. Let  > 0. Let ϕ and ϕ̂ as in Proposition 14. Let fn be the free entropy associated to ϕ and fˆn the free entropy corresponding to ϕ̂. Lemma 9. There exists a constant C > 0 such that for n large enough √ |fn − fˆn | ≤ C  . Proof. Consider the observation channel given by   √  1  Yt,µ = tϕ √n [ΦX∗ ]µ , Aµ + Zµ   √  Ŷt,µ = 1 − tϕ̂ √1n [ΦX∗ ]µ , Aµ + Ẑµ for 1 ≤ µ ≤ m. Let fn (t) denote the interpolating free energy: 1 fn (t) = E ln n Z − 12 dPA (a)dP0 (x) e m P  √ Yt,µ − tϕ µ=1 √1 [Φx]µ ,aµ n  2  2  √ + Ŷt,µ − 1−tϕ̂ √1n [Φx]µ ,aµ . x,a (x,a) In order to shorten the notations, we will now write ϕµ We compute, for 0 < t < 1: fn0 (t)  i m h (X∗ ,A) 2 (X∗ ,A) 2 E (ϕ̂1 ) − (ϕ1 ) + = 2n i m h (X∗ ,A) 2 (X∗ ,A) 2 = E (ϕ̂1 ) − (ϕ1 ) + 2n (x,a) and ϕ̂µ     for ϕ √1n [Φx]µ , aµ and ϕ̂ √1n [Φx]µ , aµ . m E 1 X D (x,a) (X∗ ,A) ∗ ,A) − ϕ̂(x,a) ϕ̂(X E ϕµ ϕµ µ µ 2n t µ=1 D E m (x,a) (X∗ ,A) (X∗ ,A) (x,a) (x,a) (X∗ ,A) E ϕ1 (ϕ1 − ϕ̂1 ) + (ϕ1 − ϕ̂1 )ϕ̂1 . 2n t 44 We start by controlling the first term:   h i     1/2 (X∗ ,A) 2 (X∗ ,A) 2 (X∗ ,A) (X∗ ,A) 2 (X∗ ,A) (X∗ ,A) 2 ≤ E ϕ̂1 E (ϕ̂1 ) − (ϕ1 ) + ϕ1 E ϕ̂1 − ϕ1 √ ≤ C0  , by Proposition 14, for some constant C0 and n large enough. The two other terms can be bounded the same way: D E (x,a) (X∗ ,A) ϕ1 (ϕ1 − (X∗ ,A) ϕ̂1 )       1/2 (X∗ ,A) 2 (X∗ ,A) (X∗ ,A) 2 ≤ E ϕ1 E ϕ̂1 − ϕ1 E t √ ≤ C0  , by Proposition 14, for n large enough. Consequently, there exists a constant C > 0 such that for n large √ enough and for all 0 < t < 1, |fn0 (t)| ≤ C . Notice that t 7→ fn (t) is continuous over [0, 1], fn (0) = fˆn R1 √ and fn (1) = fn , hence |fn − fˆn | ≤ 0 |fn0 (t)|dt ≤ C . Let Pout denote the transition kernel associated to ϕ and P̂out the one associated to ϕ̂. Analogously to the previous Lemma, one can show: Lemma 10. There exists a constant C 0 > 0 such that for all q ∈ [0, ρ] √ |ΨPout (q) − ΨP̂out (q)| ≤ C 0  . From there we obtain that √ sup inf fRS (q, r) − sup inf fˆRS (q, r) ≤ C 0  . q∈[0,ρ] r≥0 q∈[0,ρ] r≥0 (138) Applying Theorem 1 for Pout , we obtain that for n large enough |fn − supq∈[0,ρ] inf r≥0 fRS (q, r)| ≤ . We now combine this with (138) and Lemma 9 we obtain that for n large enough √ √ fn − sup inf fRS (q, r) ≤ fˆn − sup inf fˆRS (q, r) + (C + C 0 )  ≤ (C + C 0 )  +  , q∈[0,ρ] r≥0 r≥0 q∈[0,ρ] which concludes the proof of Proposition 13. Appendix E: A sup-inf formula This appendix gathers some useful lemmas for the manipulations of “sup-inf” formulas like (20). We first need to indroduce some notations about convex functions. Let f be a convex function on some interval I ⊂ R. For t ∈ I we will denote respectlively by f 0 (t− ) and f 0 (t+ ) the left- and right-hand derivatives of f at t. We also define the subgradient of f at t as ∂f (t) = [f 0 (t− ), f 0 (t+ )]. If t is the right (resp. left) border of I, then we define ∂f (t) = [f 0 (t− ), +∞) (resp. ∂f (t) = (−∞, f 0 (t+ )]). Lemma 11. Let f and g be two convex, Lipschitz, non-decreasing functions on R+ . For q1 , q2 ∈ R+ we define ψ(q1 , q2 ) = f (q1 ) + g(q2 ) − q1 q2 . Then sup inf ψ(q1 , q2 ) = q1 ≥0 q2 ≥0 sup ψ(q1 , q2 ) = q1 ∈∂g(q2 ) q2 =f 0 (q1+ ) 45 sup q1 ∈∂g(q2 ) q2 ∈∂f (q1 ) ψ(q1 , q2 ) , (139) and these extremas are achieved at some (possibly many) couples. Moreover, if g is strictly convex, then the above extremas are achieved precisely on the same couples (q1 , q2 ) and f is differentiable at q1 . Corollary 5. Let f be a convex, Lipschitz, non-decreasing function on R+ . Define ρ = supx≥0 f 0 (x+ ). Let g : [0, ρ] → R be a convex, Lipschitz, non-decreasing function. For q1 ∈ R+ and q2 ∈ [0, ρ] we define ψ(q1 , q2 ) = f (q1 ) + g(q2 ) − q1 q2 . Then sup inf ψ(q1 , q2 ) = sup inf ψ(q1 , q2 ) . q2 ∈[0,ρ] q1 ≥0 q1 ≥0 q2 ∈[0,ρ] Proof. In order to apply Lemma 11 we need to extend g on R+ . We thus define for x ≥ 0 g̃(x) = ( g(x) if x ≤ ρ g(ρ) + (x − ρ)g 0 (ρ+ ) if x ≥ ρ g̃ is simply equal to g that we extend for x ≥ ρ using its tangent at ρ. Obviously g̃ is a convex, Lipschitz, non-decreasing function on R+ . One can thus apply Lemma 11: sup inf f (q1 ) + g̃(q2 ) − q1 q2 = sup inf f (q1 ) + g̃(q2 ) − q1 q2 q1 ≥0 q2 ≥0 q2 ≥0 q1 ≥0 and both “sup-inf” are achieved on [0, supx≥0 g̃ 0 (x+ )]×[0, supx≥0 f 0 (x+ )]. By definition, ρ = supx≥0 f 0 (x+ ), thus sup inf f (q1 ) + g̃(q2 ) − q1 q2 = sup inf f (q1 ) + g̃(q2 ) − q1 q2 q1 ≥0 q2 ≥0 q1 ≥0 q2 ∈[0,ρ] = sup inf f (q1 ) + g̃(q2 ) − q1 q2 = sup q2 ≥0 q1 ≥0 inf f (q1 ) + g̃(q2 ) − q1 q2 q2 ∈[0,ρ] q1 ≥0 which concludes the proof because g̃(q2 ) = g(q2 ) for q2 ∈ [0, ρ]. To prove Lemma 11 we will need the following lemma on the Fenchel-Legendre transform. Lemma 12. Let V ⊂ R be a non-empty interval and let g : V → R be a convex function. Define  g ∗ : x ∈ R 7→ sup xy − g(y) ∈ R ∪ {+∞} . (140) y∈V Let Dg∗ = {x ∈ R | g ∗ (x) < ∞}. Then g ∗ is a convex function on the interval Dg∗ 6= ∅. Moreover, Dg∗ = {a} if and only if g : x 7→ ax. For all x ∈ Dg∗ the set of maximizers of (140) is of the form [ax , bx ], where ax , bx ∈ R ∪ {±∞}. Then, the left-hand and right-hand derivatives of g ∗ at x are respectlively ax and bx . In particular, if g is strictly convex then g ∗ is differentiable around every point in the interior of Dg∗ . Proof. g is convex, so there exists an affine function h : x 7→ ax + b such that ∀x ∈ V, g(x) ≥ h(x). Compute   g ∗ (a) = sup ay − g(y) ≤ sup ay − h(y) = b < ∞ . y∈V y∈V Thus Dg∗ 6= ∅. It is easy to verify that Dg∗ is convex. g ∗ is then convex as a supremum of linear functions. For x ∈ R we define the function ϕx : y 7→ xy − g(y). Let x ∈ Dg∗ . Because of convexity, g ∗ is left- and right-hand differentiable at x. We are only going to show that the left-hand derivative of g ∗ at x is equal to ax , the result for the right-hand derivative is proved analogously. First of all, notice that if ax = −∞ then g ∗ (x0 ) = +∞ for any x0 < x, so the left-hand derivative of g ∗ is not defined. We will thus concentrate on the cases where ax ∈ R or ax = +∞. 46 Let us consider first the case where ax is finite. By definition, g ∗ (x) = ϕx (ax ). Let now x0 < x. We have ax (x − x0 ) = ϕx (ax ) − ϕx0 (ax ) ≥ g ∗ (x) − g ∗ (x0 ) , which implies that (g ∗ )0 (x− ) ≤ ax . Let now x0 < x in Dg∗ . Notice that, by convexity of g, bx0 ≤ ax . The fact that ax achieves the maximum in (140) implies that x ∈ ∂g(ax ). We have then, by convexity g(bx0 ) ≥ g(ax ) + (bx0 − ax )x which implies g ∗ (x) − g ∗ (x0 ) = ax x − g(ax ) − bx0 x0 + g(bx0 ) ≥ ax − g(a) − bx0 x0 + g(a) + (bx0 − ax )x ≥ bx (x − x0 ) . When x0 → x, it is not difficult to verify that bx0 → ax . We obtain therefore that (g ∗ )0 (x− ) ≤ ax . We conclude (g ∗ )0 (x− ) = ax . Suppose now that ax = +∞. Let x0 < x. Notice that ax0 is finite, because the converse would imply that g ∗ (x) = +∞. Using the result we just proved, we have ax0 = (g ∗ )0 (x0− ) ≤ (g ∗ )0 (x− ), where the last inequality is due to convexity. When x0 → x it is again not difficult to verify that ax0 → ax = +∞. We conclude (g ∗ )0 (x− ) = +∞. Proof of Lemma 11. By convexity of g, for all q1 , q2 ≥ 0 such that q1 ∈ ∂g(q2 ), we have ψ(q1 , q2 ) = inf q20 ≥0 ψ(q1 , q20 ). Consequently: sup inf ψ(q1 , q2 ) ≥ q1 ≥0 q2 ≥0 ψ(q1 , q2 ) ≥ sup q1 ∈∂g(q2 ) q2 ∈∂f (q1 ) sup ψ(q1 , q2 ) . q1 ∈∂g(q2 ) q2 =f 0 (q1+ ) Let us now prove the converse bound. Let Lg = supy≥0 g 0 (y + ). Lg is finite because g is Lipschitz. Notice that for 0 ≤ y < Lg , g ∗ (y) < ∞ while for y > Lg , g ∗ (y) = +∞. f is continuous on [0, Lg ] and g ∗ is convex on [0, Lg ] (g ∗ (Lg ) may be equal to +∞). Therefore f − g ∗ achieves its suppremum at some q1∗ ∈ [0, Lg ]. If 0 < q1∗ < Lg then the optimality condition at q1∗ gives f 0 (q1∗− ) − g ∗0 (q1∗− ) ≥ 0 and f 0 (q1∗+ ) − g ∗0 (q1∗+ ) ≤ 0. Thus (141) g ∗0 (q1∗− ) ≤ f 0 (q1∗− ) ≤ f 0 (q1∗+ ) ≤ g ∗0 (q1∗+ ) . We know by Lemma 12 that [g ∗0 (q1∗− ), g ∗0 (q1∗+ )] is the set of maximizers of q2 7→ q1∗ q2 − g(q2 ). Consequently q2∗ := f 0 (q1∗+ ) maximizes q2 7→ q1∗ q2 − g(q2 ). This gives q1∗ ∈ ∂g(q2∗ ). We conclude: sup inf ψ(q1 , q2 ) = f (q1∗ ) + g(q2∗ ) − q1∗ q2∗ ≤ q1 ≥0 q2 ≥0 sup f (q1 ) + g(q2 ) − q1 q2 . q1 ∈∂g(q2 ) q2 =f 0 (q1+ ) If now q1∗ = 0, the optimality condition is now: f 0 (0+ ) − g ∗0 (0+ ) ≤ 0. f is non-decreasing, hence 0 ≤ f 0 (0+ ) ≤ g ∗0 (0+ ). g is non-decreasing, thus the set of maxizers of g ∗ (0) is, by Lemma 12 [0, g ∗0 (0+ )]. Therefore q2∗ := f (0+ ) maximizes q2 7→ q1∗ q2 − g(q2 ) and we conclude similarly as before. If q1∗ = Lg , then the optimality condition is f 0 (q1∗− ) − g ∗0 (q1∗− ) ≥ 0. Therefore f 0 (q1+ ) ≥ f 0 (q1− ) ≥ g ∗0 (q1∗− ). Again by Lemma 12, q2∗ := f (q1∗+ ) maximizes q2 7→ q1∗ q2 − g(q2 ), we conclude similarly as before. The equalities (139) are now proved. Moreover, we have seen in the proof above that there exists a couple (q1∗ , q2∗ ) that achieves all three extremas. Suppose now that g is strictly convex. This means (by Lemma 12) that g ∗ is differentiable. 47 Let (q1 , q2 ) ∈ R2+ be a couple that achieves the supremum in one of the last two sup. This means in particular that q1 ∈ ∂g(q2 ). By convexity of g we have then ψ(q1 , q2 ) = inf q20 ≥0 ψ(q1 , q20 ). Since ψ(q1 , q2 ) = supq10 ≥0 inf q20 ≥0 ψ(q10 , q20 ), (q1 , q2 ) achieves the sup-inf. Let (q1 , q2 ) be a couple that achieves the sup-inf. It remains to show that q1 ∈ ∂g(q2 ) and q2 = f10 (q1+ ). First of all, the fact that ψ(q1 , q2 ) = inf q20 ≥0 ψ(q1 , q20 ) implies (by convexity) that q1 ∈ ∂g(q2 ). Now, as in the proof above we have to distiguish whenever q1 ∈ (0, Lg ), q1 = 0 or q1 = Lg . When q1 ∈ (0, Lg ), the strict convexity of g implies the differentiability of g ∗ , therefore the inequality (141) gives that f is differentiable at q1 and f 0 (q1 ) = g ∗0 (q1 ) = q2 . The case q1 = 0 goes the same way. It remains to see that q1 could not be equal to Lg . Indeed, by strict convexity, the infimum of q20 7→ ψ(Lg , q20 ) is only achieved when q20 → +∞. ∗ Lemma 12 gives then that g ∗ (L− g ) = +∞, which gives that the function q1 7→ f (q1 ) − g (q1 ) is decreasing on [Lg − , Lg ], for some  > 0. The supremum can therefore not be achieved at q1 = Lg . Lemma 13. Let g be a strictly convex, differentiable, Lipschitz non-decreasing function on R+ . Define ρ = supx≥0 g 0 (x). Let f be a convex, non-decreasing function on [0, ρ], differentiable on [0, ρ). For q1 , q2 ∈ R+ we define ψ(q1 , q2 ) = f (q1 ) + g(q2 ) − q1 q2 . Then sup inf ψ(q1 , q2 ) = q1 ∈[0,ρ] q2 ≥0 where sup ( Γ= (142) ψ(q1 , q2 ) , (q1 ,q2 )∈Γ (q1 , q2 ) ∈ [0, ρ] × (R+ ∪ {+∞}) q1 = g 0 (q2 ) q2 = f 0 (q1 ) ) , where all the function are extended by there limits at the points at which they may not be defined (for instance g 0 (+∞) = lim g 0 (q)). Moreover, the above extremas are achieved precisely on the same couples. q→∞ Proof. The proof goes almost exactly as for Lemma 11. The only difference with Lemma 11 and Corollary 5 above is that, without the Lipschitz assumption on f , the extremas in (142) can be achieved for (q1 , q2 ) = (ρ, +∞) ∈ Γ, when f 0 (ρ− ) = +∞. It remains only to deal with this case, because the others can be handled exactly as in the proof of Lemma 11. First, suppose that q1 = ρ maximizes q1 7→ inf q2 ≥0 ψ(q1 , q2 ) over [0, ρ]. In that case, the infimum in q2 is achieved for q2 → +∞, because by assumption q2 7→ g(q2 ) − ρq2 is strictly decreasing. Thus in that case we still have sup inf ψ(q1 , q2 ) = ψ(ρ, +∞) ≤ sup ψ(q1 , q2 ) . q1 ∈[0,ρ] q2 ≥0 (q1 ,q2 )∈Γ It remains now to show that ψ(ρ, +∞) ≤ supq1 inf q2 ψ(q1 , q2 ). Let q2 ≥ 0 and define q1 = g 0 (q2 ). By convexity ψ(q1 , q2 ) ≤ sup inf ψ(q10 , q20 ) . 0 q10 ∈[0,ρ] q2 ≥0 Now notice that f (q1 ) + g(q2 ) − ρq2 ≤ ψ(q1 , q2 ) and that the left-hand side of this last inequality goes to ψ(ρ, +∞) as q2 → ∞. This concludes the proof. Appendix F: Concentration of free entropy and overlaps F.1 Concentration of the free entropy The goal of this Appendix is to prove that the free entropy of the interpolating model studied in Sec. 5.1 concentrates around its expectation. To simplify the notations we use C(ϕ, S, α), for a generic strictly positive 48 constant depending only on ϕ, S and α (S the supremum over signal values). It is also understood that n and m are large enough and m/n → α. Theorem 4. Under assumptions (H1), (H2) and (H3) we can find a constant C(ϕ, S, α) > 0 such that " 2 #  C(ϕ, S, α) 1 1 ≤ E ln Zt − E ln Zt . n n n (143) The remaining of this Appendix is dedicated to the proof of Theorem 4. We first recall some set-up and notation for the convenience of the reader. The interpolating Hamiltonian (68)-(67) is (we indicate only the annealed variables in its arguments) − m X µ=1 n 1X 0 √ (Yi − trxi )2 ln Pout (Yµ |st,µ (x, wµ )) + 2 (144) i=1 where r st,µ (x, wµ ) = 1−t [Φx]µ + k1 (t)Vµ + k2 (t)wµ , n sZ sZ t q(v)dv, k1 (t) = 0 t (ρ − q(v))dv k2 (t) = 0 We find it convenient to use the random function representation (1) for the interpolating model, namely  q  1−t Y = ϕ ∗ ] + k (t)V + k (t)W ∗ , A [ΦX + Zµ , t,µ µ 1 µ 2 µ µ n √ Y 0 = rtX ∗ + Z 0 t,i i i i.i.d. In this representation the random variables (Aµ )1≤µ≤m i.i.d. ∼ PA are arbitrary, and (Zµ )1≤µ≤m ∼ N (0, 1). We have Z  1 2 1 Pout (Yt,µ |st,µ (x, w)) = dPA (aµ ) √ exp − Yt,µ − ϕ(st,µ (x, wµ ), aµ 2 2π   Z 1 1 2 (145) = dPA (aµ ) √ exp − (Γt,µ (x, wµ , aµ ) + Zµ ) 2 2π where, using the random function representation, Γt,µ (x, wµ , aµ ) (146) r 1 − t  r 1 − t  =ϕ [ΦX∗ ]µ + k1 (t)Vµ + k2 (t)Wµ∗ , Aµ − ϕ [Φx]µ + k1 (t)Vµ + k2 (t)wµ , aµ . n n From (144), (145), (146) we can express the free entropy of the interpolating model as Z 1 n m 1 ln Zt = ln dP0 (x)dPA (a)Dw e−Ht (x,w,a) − ln(2π) n n 2n (147) where Dw denote the standard m-dimensional Gaussian measure and where the Hamiltonian Ht is Ht (x, w, a) = m n µ=1 i=1 √ 1X 1X √ Γt,µ (x, wµ , aµ )2 + ( rtXi∗ + Zi0 − trxi )2 . 2 2 (148) The interpretation here is that x, w, a are annealed variables and Φ, V, A, Z, Z0 , X∗ , W∗ are quenched. The inference problem is to recover X∗ , W∗ given all other quenched variables. 49 Our goal is to show that the free energy (147) concentrates around its expectation. We will first show concentration w.r.t. all Gaussian variables Φ, V, Z, Z0 , W∗ thanks to the classical Gaussian Poincaré inequality, then the concentration w.r.t. A and finally the one w.r.t. X∗ using classical bounded differences arguments. The order in which we prove the concentrations matters. We recall here these two variances bounds. The reader can refer to [20] (Chapter 3) for detailled proofs of these statements. Proposition 15 (Gaussian Poncaré inequality). Let U = (U1 , . . . , UN ) be a vector of N independent standard normal random variables. Let g : RN → R be a continuously differentiable function. Then (149)   Var(g(U)) ≤ E k∇g(U)k2 . Proposition 16. Let U ⊂ R. Let g : U N → R a function that satisfies the bounded difference property, i.e., there exists some constants c1 , . . . , cN ≥ 0 such that sup u1 ,...uN ∈U N u0i ∈U |g(u1 , . . . , ui , . . . , uN ) − g(u1 , . . . , u0i , . . . , uN )| ≤ ci , for all 1 ≤ i ≤ N . Let U = (U1 , . . . , UN ) be a vector of N independent random variables that takes values in U. Then N 1X 2 Var(g(U)) ≤ ci . 4 (150) i=1 Before we proceed it is useful to remark m n µ=1 i=1 1 1 1 X 2 1 X 02 m ln Zt = ln Ẑt − Zµ − ln(2π) Zi − n n 2n 2n 2n (151) where 1 1  ln Ẑt = ln n n Z dP0 (x)dPA (a)Dw e−Ĥt (x,w,a)  (152) and m Ĥt (x, w, a) = o 1 Xn Γt,µ (x, wµ , aµ )2 + 2Zµ Γt,µ (x, wµ , aµ ) 2 µ=1 n o √ √ √ 1 Xn √ + ( rtXi∗ − trxi )2 + 2Zi0 ( rtXi∗ − trxi ) . 2 (153) i=1 In order Theorem 4 it remains to show that there exists a constant C(ϕ, S, α) > 0 such that  to prove  C(ϕ,S,α) 1 . This concentration property together with (151) implies (143). Var n ln Ẑt ≤ n F.1.1 Concentration with respect to Gaussian random variables Zµ , Zi0 , Vµ , Wµ∗ , Φµi In this section, we prove that n1 ln Ẑt is close to its expectation w.r.t. the Gaussian random variables Z, Z0 , V, W∗ , Φ. Lemma 14. Let EG denotes the expectation w.r.t. Z, Z0 , V, W∗ , Φ only. There exists an constant C(ϕ, S, α) > 0 such that "  2 # 1 1 C(ϕ, S, α) E ln Ẑt − EG ln Ẑt ≤ . (154) n n n 50 Lemma 14 follows, by Pythagorean theorem, from Lemmas 15 and 16 below. Lemma 15. Let EZ,Z0 denotes the expectation w.r.t. Z, Z0 only. There exists an constant C(ϕ, S, α) > 0 such that "  2 # 1 C(ϕ, S, α) 1 ≤ E ln Ẑt − EZ,Z0 ln Ẑt . (155) n n n Proof. We consider here g = random variables. We have 1 n ln Ẑt only as a function of Z and Z0 and work conditionnaly to all other m X ∂g k∇gk = ∂Zµ 2 µ=1 2 n X ∂g + ∂Zi0 2 . (156) i=1 Each of these partial derivatives are of the form ∂g = n−1 h∂ Ĥt iĤt where the Gibbs bracket h−iĤt pertains to the effective Hamiltonian (153). We find ∂g = n−1 hΓt,µ iĤt ≤ 2n−1 sup |∂x ϕ| ∂Zµ √ √ ∂g = n−1 h rtXi∗ − trxi iĤt ≤ 2n−1 S 0 ∂Zi and replacing in (156) we get k∇gk2 ≤ 2n−1 ( m n sup |∂x ϕ| + S). Applying Proposition 15 we have " EZ,Z0  2 # 1 1 C(ϕ, S, α) ln Ẑt − EZ,Z0 ln Ẑt ≤ n n n (157) almost surely. Taking the expectation in (157) gives the lemma. Lemma 16. There exists an constant C(ϕ, S, α) > 0 such that "    2 # 1 1 C(ϕ, S, α) E EZ,Z0 ln Ẑt − EG ln Ẑt . ≤ n n n (158) Proof. We consider here g = n−1 EZ,Z0 [ln Ẑt ] as a function of V, W∗ , Φ and we work conditionnaly to the other random variables. hD ∂Γt,µ E i ∂g = n−1 EZ,Z0 (Γt,µ + Zµ ) ∂Vµ ∂Vµ Ht r h i 2 −1 −1 )(2 sup |∂x ϕ|) ≤ n EZ,Z0 (2 sup |ϕ| + |Zµ |)(2 sup |∂x ϕ|) = n (2 sup |ϕ| + π The same inequality holds for ∂g ∂Wµ∗ . To compute the derivative w.r.t. Φµi we first remark r r 1 − t  n ∂Γt,µ 1−t ∗ = Xi − xi ∂x ϕ [ΦX∗ ]µ + k1 (t)Vµ + k2 (t)Wµ∗ , Aµ ∂Φµi n n r  1−t o − ∂x ϕ [Φx]µ + k1 (t)Vµ + k2 (t)wµ , aµ . n 51 Therefore hD ∂Γt,µ E i ∂g = n−1 EZ,Z0 (Γt,µ + Zµ ) ∂Φµi ∂Φµi Ht r h i 2 −3/2 −3/2 ≤n EZ,Z0 (2 sup |ϕ| + |Zµ |)(4S sup |∂x ϕ|) = n (2 sup |ϕ| + )(4S sup |∂x ϕ|) π Putting these inequalities together we find m m n X ∂g 2 X X + ∂Vµ µ=1 µ=1 µ=1 i=1 r m 2 ≤ 2 (2 sup |ϕ| + )(2 sup |∂x ϕ|) + n π k∇gk2 = m X ∂g ∂Vµ 2 + ∂g ∂Φµi 2 mn (2 sup |ϕ| + n3 r 2 )(4S sup |∂x ϕ|) . π We the lemma follows again from Proposition 15. F.1.2 Bounded difference with respect to Aµ The next step is an application of the variance bound of Lemma 16 to show that n1 EG [ln Ẑt ] concentrates w.r.t. A (we still keep X∗ fixed for the moment). Lemma 17. Let EA denotes the expectation w.r.t. A only. There exists an constant C(ϕ, S, α) > 0 such that "    2 # 1 1 C(ϕ, S, α) E EG ln Ẑt − EA EG ln Ẑt . (159) ≤ n n n Proof. Let us consider n1 EG [ln Ẑt ] as a function g of A only. Let ν ∈ {1, . . . , m}. We must estimate variations (ν) (ν) g(A) − g(A(ν) ) corresponding to two configurations A and A(ν) with Aµ = Aµ for µ 6= ν and Aν = Ãν . (ν) (ν) We will use the notations Ĥt and Γt,µ to denote respectively the quantities Ĥt and Γt,µ where A is replaced by A(ν) . By an application of Jensen’s inequality one finds 1 1 (ν) (ν) EG hĤt − Ĥt iĤ(ν) ≤ g(A) − g(A(ν) ) ≤ EG hĤt − Ĥt iĤt t n n (160) where the Gibbs brackets pertain to the effective Hamiltonians (153). From (153) we obtain (ν) Ht − Ht = m  1  1 X  (ν)2 (ν) (ν)2 (ν) Γt,µ − Γ2t,µ + 2Zµ (Γt,µ − Γt,µ ) = Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) . 2 2 µ=1 Consequently D E D E 1 1 (ν)2 (ν) (ν)2 (ν) EG Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) (ν) ≤ g(A) − g(A(ν) ) ≤ EG Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) . 2n 2n Ht Ht (161) (ν)2 (ν) Notice that Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) ≤ 4 sup |ϕ|2 + 4|Zν | sup |ϕ|. Thus we conclude by (161) that g satisfies a bounded difference property: r ! 2 2 |g(A) − g(A(ν) )| ≤ sup |ϕ| sup |ϕ| + 2 . (162) n π Lemma 17 follows then by an application of Proposition 16. 52 F.1.3 Bounded difference with respect to Xi∗ ∗ Let EΘ = EA EhG denotes i the expectation w.r.t. all quenched variables except X . It remains to bound the variance of EΘ n1 ln Ẑt (which only depends on X∗ ). Lemma 18. There exists an constant C(ϕ, S, α) > 0 such that "    2 # 1 1 C(ϕ, S, α) E EΘ ln Ẑt − E ln Ẑt ≤ . n n n (163) Proof. The lemma is proved using again a bounded difference argument. n1 EΘ [ln Ẑt ] is a function of X∗ that we denote by g. We will show that g satisfies a bounded difference property. Let j ∈ {1, . . . , n}. Let ∗(j) X∗ , X∗(j) ∈ [−S, S]n be two input signals such that Xi = Xi∗ for i 6= j. We are going to interpolate between g(X∗ ) and g(X∗(j) ). For s ∈ [0, 1] we define ψ(s) = g(sX∗ + (1 − s)X∗(j) ) Obviously ψ(1) = g(X∗ ) and ψ(0) = g(X∗(j) ). Using Gaussian integration by parts, it is not difficult to verify that for s ∈ [0, 1] C(ϕ, S, α) |ψ 0 (s)| ≤ . n This implies that |g(X∗ ) − g(X∗(j) )| ≤ F.1.4 C(ϕ,S,α) n and using Proposition 16 we obtain the lemma. Proof of Theorem 4   ln Ẑt ≤ From Lemmas 14, 17 and 18 above, we obtain using Pythagorean theorem that Var some constant C(ϕ, S, α) > 0. As mentioned before, this implies (thanks to (151)) Theorem 4. F.2 1 n C(ϕ,S,α) n for Concentration of the overlap In this appendix we give the main steps of the proof of Lemma 2. We denote by h−in,t, the Gibbs measure associated to the perturbed Hamiltonian n X  √ x2 Ht (x, w; Y, Y ) +  i − xi Xi∗ − xi Ẑi 2 0 i=1 i.e., the sum of (68) and (76). It is crucial that the second term is a perturbation which preserves the Nishimori identity of Appendix A.1. We note that the precise form of the first term does not matter and all subsequent arguments are generic as long as it is a Hamiltonian whose Gibbs distribution satisfies this Nishimori identity. The corresponding average free entropy is denoted fn, (t) and we call Fn, (t) the free entropy for a realization of the quenched variables, that is Fn, (t) = n−1 ln Zt (Y, Y0 ). Let n L := 1 X  x2i xi zbi  − xi si − √ . n 2 2  i=1 Up to the prefactor n−1 this quantity is the derivative of the perturbation term in (76). The fluctuations of the 53 overlap Q = n−1 Pn ∗ i=1 Xi xi E (L − EhL in,t, )2 and those of L are related through the remarkable identity n,t, 1 = Eh(Q − EhQin,t, )2 4 n,t, 1 + E[hQ2 in,t, − hQi2n,t, ] 2 n 1 X + 2 E[hXi2 in,t, − hXi i2n,t, ]. 4n  i=1 A detailed derivation can be found in Appendix IX of [13] and involves only some algebra using the Nishimori identity and integrations by parts w.r.t. the Gaussian Ẑi in the perturbation term. Lemma 2 is then a direct consequence of the following: Proposition 17 (Concentration of L on E [hL i] ). Under assumptions (H1), (H2) and (H3) we have for any 0 < a < b < 1, Z b d E (L − EhL in,t, )2 lim n→+∞ a n,t, = 0. (164) The proof of this proposition is broken in two parts. Notice that E (L − EhL in,t, )2 n,t, = E (L − hL in,t, )2 n,t,   + E (hL in,t, − EhL in,t, )2 . (165) Thus it suffices to prove the two following lemmas. The first lemma expresses concentration w.r.t. the posterior distribution (or “thermal fluctuations”) and is an elementary consequence of concavity properties of the free energy and the Nishimori identity. Lemma 19 (Concentration of L on hL i ). Under assumptions (H1), (H2) and (H3), we have for any 0 < a < b < 1, Z lim n→+∞ a b  d E (L − hL in,t, )2  n,t, =0 (166) The second lemma expresses the concentration of the average overlap w.r.t. the realizations of quenched disorder variables and is a consequence of the concentration of the free energy (more precisely equation (143) in Appendix F.1). Lemma 20 (Concentration of hL i on EhL i ). Under assumptions (H1), (H2) and (H3), we have for any 0 < a < b < 1, Z lim n→+∞ a b   d E (hL in,t, − E[hL in,t, ])2 = 0 (167) The reader is referred to Sec. V of [13] for the proof of these two Lemmas. We point out that the analysis gives a rate of decay O(n−1 ) for (166) which is optimal but a weaker decay rate for (167). However any decay rate will suit for the present proof of the replica formula. Acknowledgments Jean Barbier acknowledges funding from the Swiss National Science Foundation (grant 200021-156672). Florent Krzakala acknowledges funding from the ERC under the European Union 7th Framework Programme Grant Agreement 307087-SPARCS. Lenka Zdeborová acknowledges funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 714608 - SMiLe). Part of this work was done while Léo Miolane was visiting EPFL. 54 References [1] Github repository of numerical experiments for the current paper. https://github.com/sphinxteam/ GeneralizedLinearModel2017, 2017. [2] E. Abbe. Community detection and stochastic block models: recent developments. ArXiv e-prints arxiv 1703.10146, March 2017. [3] Madhu Advani and Surya Ganguli. An equivalence between high dimensional bayes optimal inference and m-estimation. In Advances in Neural Information Processing Systems, pages 3378–3386, 2016. [4] Carlo Baldassi, Christian Borgs, Jennifer T. Chayes, Alessandro Ingrosso, Carlo Lucibello, Luca Saglietti, and Riccardo Zecchina. Unreasonable effectiveness of learning neural networks: From accessible states and robust ensembles to basic algorithmic schemes. Proceedings of the National Academy of Sciences, 113(48):E7655–E7662, 2016. [5] Carlo Baldassi, Alfredo Braunstein, Nicolas Brunel, and Riccardo Zecchina. Efficient supervised learning in networks with binary synapses. Proceedings of the National Academy of Sciences, 104(26):11079–11084, 2007. [6] J. Barbier, M. Dia, and N. Macris. Proof of threshold saturation for spatially coupled sparse superposition codes. In 2016 IEEE International Symposium on Information Theory (ISIT), pages 1173–1177, July 2016. [7] J. Barbier, F. Krzakala, L. Zdeborová, and P. Zhang. The hard-core model on random graphs revisited. In Journal of Physics Conference Series, volume 473 of Journal of Physics Conference Series, page 012021, December 2013. [8] J. Barbier, N. Macris, and L. Miolane. The Layered Structure of Tensor Estimation and its Mutual Information. In 47th Annual Allerton Conference on Communication, Control, and Computing (Allerton), September 2017. [9] Jean Barbier. Statistical physics and approximate message-passing algorithms for sparse linear estimation problems in signal processing and coding theory. PhD thesis, Université Paris Diderot, 2015. [10] Jean Barbier, Mohamad Dia, Nicolas Macris, and Florent Krzakala. The mutual information in random linear estimation. In 2016 54th Annual Allerton Conference on Communication, Control, and Computing (Allerton), 2016. [11] Jean Barbier, Mohamad Dia, Nicolas Macris, Florent Krzakala, Thibault Lesieur, and Lenka Zdeborová. Mutual information for symmetric rank-one matrix estimation: A proof of the replica formula. In Advances in Neural Information Processing Systems 29, page 424–432. 2016. [12] Jean Barbier and Florent Krzakala. Approximate message-passing decoder and capacity-achieving sparse superposition codes. [13] Jean Barbier and Nicolas Macris. The stochastic interpolation method: A simple scheme to prove replica formulas in bayesian inference. Arxiv preprints arxiv 1705.02780, 2017. [14] Jean Barbier, Nicolas Macris, Mohamad Dia, and Florent Krzakala. Mutual information and optimality of approximate message-passing in random linear estimation. arXiv preprint arXiv:1701.05823, 2017. [15] A. R. Barron and A. Joseph. Toward fast reliable communication at rates near capacity with gaussian noise. In 2010 IEEE International Symposium on Information Theory, pages 315–319, June 2010. [16] Eric B Baum and Yuh-Dauh Lyuu. The transition to perfect generalization in perceptrons. Neural computation, 3(3):386–401, 1991. 55 [17] M. Bayati and A. Montanari. The lasso risk for gaussian matrices. IEEE Transactions on Information Theory, 58(4):1997–2017, April 2012. [18] Mohsen Bayati, Marc Lelarge, and Andrea Montanari. Universality in polytope phase transitions and message passing algorithms. The Annals of Applied Probability, 25(2):753–822, 2015. [19] Mohsen Bayati and Andrea Montanari. The dynamics of message passing on dense graphs, with applications to compressed sensing. IEEE Transactions on Information Theory, 57(2):764–785, Feb 2011. [20] Stéphane Boucheron, Gábor Lugosi, and Olivier Bousquet. Concentration inequalities. In Advanced Lectures on Machine Learning, pages 208–240. Springer, 2004. [21] Petros T Boufounos and Richard G Baraniuk. 1-bit compressive sensing. In Information Sciences and Systems, 2008. CISS 2008. 42nd Annual Conference on, pages 16–21. IEEE, 2008. [22] Peter Bühlmann and Sara Van De Geer. Statistics for high-dimensional data: methods, theory and applications. Springer Science & Business Media, 2011. [23] F. Caltagirone, M. Lelarge, and L. Miolane. Recovering asymmetric communities in the stochastic block model. ArXiv e-prints, October 2016. [24] E. J. Candes and T. Tao. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE Transactions on Information Theory, 52(12):5406–5425, Dec 2006. [25] Sourav Chatterjee et al. A generalization of the lindeberg principle. The Annals of Probability, 34(6):2061– 2076, 2006. [26] François Chollet. keras. https://github.com/fchollet/keras, 2015. [27] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Inference and Phase Transitions in the Detection of Modules in Sparse Networks. Physical Review Letters, 107(6):065701, August 2011. [28] David Donoho and Andrea Montanari. High dimensional robust m-estimation: asymptotic variance via approximate message passing. Probability Theory and Related Fields, 166(3):935–969, Dec 2016. [29] David Donoho and Jared Tanner. Observed universality of phase transitions in high-dimensional geometry, with implications for modern data analysis and signal processing. Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 367(1906):4273–4293, 2009. [30] David L. Donoho, Arian Maleki, and Andrea Montanari. Message-passing algorithms for compressed sensing. Proc. Natl. Acad. Sci., 106(45):18914–18919, 2009. [31] David L Donoho, Arian Maleki, and Andrea Montanari. Message-passing algorithms for compressed sensing. Proceedings of the National Academy of Sciences, 106(45):18914–18919, Nov 2009. [32] Viktor Dotsenko. An introduction to the theory of spin glasses and neural networks, volume 54. World Scientific, 1995. [33] Noureddine El Karoui, Derek Bean, Peter J. Bickel, Chinghway Lim, and Bin Yu. On robust regression with high-dimensional predictors. Proceedings of the National Academy of Sciences, 110(36):14557–14562, 2013. [34] Andreas Engel and Christian Van den Broeck. Statistical mechanics of learning. Cambridge University Press, 2001. [35] Konrad H Fischer and John A Hertz. Spin glasses, volume 1. Cambridge university press, 1993. 56 [36] Elizabeth Gardner and Bernard Derrida. Three unfinished works on the optimal storage capacity of networks. Journal of Physics A: Mathematical and General, 22(12):1983, 1989. [37] Tom Goldstein and Christoph Studer. Phasemax: Convex phase retrieval via basis pursuit. arXiv preprint arXiv:1610.07531, 2016. [38] Rémi Gribonval and Pierre Machart. Reconciling" priors" &" priors" without prejudice? In Advances in Neural Information Processing Systems, pages 2193–2201, 2013. [39] Francesco Guerra and Fabio Lucio Toninelli. The thermodynamic limit in mean field spin glass models. Communications in Mathematical Physics, 230(1):71–79, 2002. [40] Dongning Guo, S. Shamai, and S. Verdú. Mutual information and minimum mean-square error in gaussian channels. IEEE Transactions on Information Theory, 51(4):1261–1282, April 2005. [41] Dongning Guo and Sergio Verdú. Randomly spread cdma: Asymptotics via statistical physics. IEEE Transactions on Information Theory, 51(6):1983–2010, June 2005. [42] Géza Györgyi. First-order transition to perfect generalization in a neural network with binary synapses. Physical Review A, 41(12):7097, 1990. [43] D Hansel, G Mato, and C Meunier. Memorization without generalization in a multilayered neural network. EPL (Europhysics Letters), 20(5):471, 1992. [44] Tadaaki Hosaka, Yoshiyuki Kabashima, and Hidetoshi Nishimori. Statistical mechanics of lossy data compression using a nonmonotonic perceptron. Physical Review E, 66(6):066126, 2002. [45] Adel Javanmard and Andrea Montanari. State evolution for general approximate message passing algorithms, with applications to spatial coupling. Information and Inference: A Journal of the IMA, 2(2):115– 144, 2013. [46] Y Kabashima. Inference from correlated patterns: a unified theory for perceptron learning and linear vector channels. Journal of Physics: Conference Series, 95(1):012001, 2008. [47] S. B. Korada and N. Macris. Tight bounds on the capacity of binary input random cdma systems. IEEE Transactions on Information Theory, 56(11):5590–5613, Nov 2010. [48] Satish Babu Korada and Nicolas Macris. Exact solution of the gauge symmetric p-spin glass model on a complete graph. Journal of Statistical Physics, 136(2):205–230, 2009. [49] Satish Babu Korada and Andrea Montanari. Applications of the Lindeberg principle in communications and statistical learning. IEEE Transactions on Information Theory, 57(4):2440–2450, 2011. [50] F. Krzakala, A. Montanari, F. Ricci-Tersenghi, G. Semerjian, and L. Zdeborová. Gibbs states and the set of solutions of random constraint satisfaction problems. Proceedings of the National Academy of Science, 104:10318–10323, June 2007. [51] F. Krzakala, C. Moore, E. Mossel, J. Neeman, A. Sly, L. Zdeborová, and P. Zhang. Spectral redemption in clustering sparse networks. Proceedings of the National Academy of Science, 110:20935–20940, December 2013. [52] Florent Krzakala, Marc Mézard, François Sausset, YF Sun, and Lenka Zdeborová. Statistical-physicsbased reconstruction in compressed sensing. Phys. Rev. X, 2:021005(18), May 2012. [53] Florent Krzakala, Marc Mézard, Francois Sausset, Yifan Sun, and Lenka Zdeborová. Probabilistic reconstruction in compressed sensing: algorithms, phase diagrams, and threshold achieving matrices. Journal of Statistical Mechanics: Theory and Experiment, 2012(08):P08009(57), 2012. 57 [54] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [55] M. Lelarge and L. Miolane. Fundamental limits of symmetric low-rank matrix estimation. ArXiv e-prints, November 2016. [56] T. Lesieur, L. Miolane, M. Lelarge, F. Krzakala, and L. Zdeborová. Statistical and computational phase transitions in spiked tensor estimation. ArXiv e-prints, January 2017. [57] N. Macris. Griffith-Kelly-Sherman correlation inequalities: A useful tool in the theory of error correcting codes. IEEE Transactions on Information Theory, 53(2):664–683, Feb 2007. [58] M Mézard. The space of interactions in neural networks: Gardner’s computation with the cavity method. Journal of Physics A: Mathematical and General, 22(12):2181–2190, 1989. [59] Marc Mezard and Andrea Montanari. Information, physics, and computation. Oxford University Press, 2009. [60] Marc Mézard, Giorgio Parisi, and Miguel-Angel Virasoro. Spin glass theory and beyond. 1987. [61] Paul Milgrom and Ilya Segal. Envelope theorems for arbitrary choice sets. Econometrica, 70(2):583–601, 2002. [62] L. Miolane. Fundamental limits of low-rank matrix estimation: the non-symmetric case. ArXiv e-prints, February 2017. [63] Andrea Montanari. Estimating random variables from random sparse observations. European Transactions on Telecommunications, 19(4):385–403, 2008. [64] John Ashworth Nelder and R Jacob Baker. Generalized linear models. Wiley Online Library, 1972. [65] Hidetoshi Nishimori. Statistical physics of spin glasses and information processing: an introduction, volume 111. Clarendon Press, 2001. [66] Manfred Opper and David Haussler. Generalization performance of bayes optimal classification algorithm for learning a perceptron. Physical Review Letters, 66(20):2677, 1991. [67] Samet Oymak, Amin Jalali, Maryam Fazel, Yonina C Eldar, and Babak Hassibi. Simultaneously structured models with application to sparse and low-rank matrices. IEEE Transactions on Information Theory, 61(5):2886–2908, 2015. [68] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. [69] Francisco J Piera and Patricio Parada. On convergence properties of shannon entropy. Problems of Information Transmission, 45(2):75–94, 2009. [70] S. Rangan. Generalized approximate message passing for estimation with random linear mixing. In 2011 IEEE International Symposium on Information Theory Proceedings, pages 2168–2172, July 2011. [71] G. Reeves and H. D. Pfister. The replica-symmetric prediction for compressed sensing with gaussian matrices is exact. In 2016 IEEE International Symposium on Information Theory (ISIT), pages 665–669, July 2016. [72] Tom Richardson and Ruediger Urbanke. Modern coding theory. Cambridge university press, 2008. [73] H. S. Seung, H. Sompolinsky, and N. Tishby. Statistical mechanics of learning from examples. Phys. Rev. A, 45:6056–6091, Apr 1992. 58 [74] Claude E Shannon. A mathematical theory of communication, part i, part ii. Bell Syst. Tech. J., 27:623–656, 1948. [75] Mahdi Soltanolkotabi. Structured signal recovery from quadratic measurements: Breaking sample complexity barriers via nonconvex optimization. arXiv preprint arXiv:1702.06175, 2017. [76] Michel Talagrand. Mean field models for spin glasses: Volume I: Basic examples, volume 54. Springer Science & Business Media, 2010. [77] Toshiyuki Tanaka. A statistical-mechanics approach to large-system analysis of cdma multiuser detectors. IEEE Transactions on Information Theory, 48(11):2888–2910, Nov 2002. [78] David J Thouless, Philip W Anderson, and Robert G Palmer. Solution of‘solvable model of a spin glass’. Philosophical Magazine, 35(3):593–601, 1977. [79] Jeremy P Vila and Philip Schniter. Expectation-maximization gaussian-mixture approximate message passing. IEEE Transactions on Signal Processing, 61(19):4658–4672, 2013. [80] Martin J Wainwright, Michael I Jordan, et al. Graphical models, exponential families, and variational inference. Foundations and Trends® in Machine Learning, 1(1–2):1–305, 2008. [81] Timothy L. H. Watkin, Albrecht Rau, and Michael Biehl. The statistical mechanics of learning a rule. Rev. Mod. Phys., 65:499–556, Apr 1993. [82] Yihong Wu and Sergio Verdú. Optimal phase transitions in compressed sensing. IEEE Transactions on Information Theory, 58(10):6241–6263, Oct 2012. [83] Yingying Xu, Yoshiyuki Kabashima, and Lenka Zdeborová. Bayesian signal reconstruction for 1-bit compressed sensing. Journal of Statistical Mechanics: Theory and Experiment, 2014(11):P11015, 2014. [84] Lenka Zdeborová and Florent Krzakala. Statistical physics of inference: thresholds and algorithms. Advances in Physics, 65(5):453–552, 2016. [85] Justin Ziniel, Philip Schniter, and Per Sederberg. Binary linear classification and feature selection via generalized approximate message passing. In Information Sciences and Systems (CISS), 2014 48th Annual Conference on, pages 1–6. IEEE, 2014. 59
7cs.IT
What Really is Deep Learning Doing? ∗ Chuyu Xiong Independent Researcher, New York, USA Email: [email protected] arXiv:1711.03577v1 [cs.LG] 6 Nov 2017 Abstract Deep learning has achieved a great success in many areas, from computer vision to natural language processing, to game playing, and much more. Yet, what deep learning is really doing is still an open question. There are a lot of works in this direction. For example, [6] tried to explain deep learning by group renormalization, and [5] tried to explain deep learning from the view of functional approximation. In order to address this very crucial question, here we see deep learning from perspective of mechanical learning and learning machine (see [1], [2]). From this particular angle, we can see deep learning much better and answer with confidence: What deep learning is really doing? why it works well, how it works, and how much data is necessary for learning. We also will discuss advantages and disadvantages of deep learning at the end of this work. Keywords: Mechanical learning, learning machine, deep learning, X-form, universal learning machine, internal representation space, data sufficiency 1 Introduction In recent years, deep learning (a branch of machine learning) has achieved many successes in lot of fields. However, a clear theoretical framework of deep learning is still missing. Consequently, there are many fundamental questions about deep learning are still open. For example: What is deep learning really doing? Is it really learning, or just a kind of fancy approximation to a function? Why it indeed has so many success? Why deep learning needs big data? For a particular problem, how much data is sufficient to drive deep learning to learn? Up to now, there is no satisfactory answer for these fundatamental questions. We here are trying to address these questions from a new angle. We introduced term ”Mechanical learning” in [1]. Mechanical learning is a computing system that is based on a simple set of fixed rules (this is so called mechanical), and can modify itself according to incoming data (this is so called learning). A learning machine is a system that realizes mechanical learning. In [2], we described learning machine in a lot of details. By doing so, we gained some useful knowledges and insights of mechanical learning. In this short article, by using those knowledges and insights, we are trying to view deep learning from a new angle. First, we will briefly discuss learning machine, pattern, internal representation space, X-form, data sufficiency, and learning strategies and methods. Then, we will use the view of learning machine to see deep learning. We start from the simplest deep learning, i.e., 2-1 RBM, then go to 3-1 RBM, N -1 RBM, N -M RBM, stacks of RBMs. Then we discuss the learning dynamics of deep learning. By this approach, we see clearly what deep learning is doing, why deep learning is working, under what condition deep learning can learn well, how much data are needed, and what disadvantages deep learning has. 2 Mechanical Learning and Learning Machine We here very briefly sum up the discussions that we did in [1] and [2]. A learning machine M has 2 major aspects: it is an IPU, i.e. it is able to process information; and it is learning, i.e. its information ∗ Great thanks for whole heart support of my wife. 1 2 What really is deep learning? processing ability is changing according to data. Without learning (since it is a machine we design, we can stop learning), M is very similar to a CPU. However, one major difference between learning machine and CPU is: learning machine treat incoming data according to its pattern, not bit-wise. Thus, in order to understand a learning machine, it’s absolutely necessary to understand pattern well. There are 2 kinds of patterns: objective pattern and subjective pattern. Subjective pattern is crucial for learning machine. In [2], we proved one theorem: For any objective pattern Po , we can find a proper subjective pattern p that can express Po well and is build upon a least set of base patterns. To describe subjective patterns, it is best to use X-form, which is one algebraic expression upon some base patterns. X-form is one very important mathematical object. X-form could have sub-forms. X-form and its sub-forms actually forms the fundamental fabric of a learning machine. We also defined learning by teaching and learning without teaching. Then, further specify typical mechanical learning. Learning by teaching requires we know learning machine and the pattern to learn well. By these knowledges, we can design a teaching sequence to make learning machine learn well. We proved that if a learning machine has certain capabilities for learning by teaching, it is universal, i.e. able to learn anything. However, most learning is not learning by teaching. In order to understand typical mechanical learning, we introduced internal representation space. Structurally, a learning machine M has components: input space, output space, internal representation space, and learning methods and learning strategies. The most important part is internal representation space. We studies internal representation space E in details, and revealed, in fact, it is equivalent to a collection of X-forms. This fact tells us that learning is nothing but a dynamics on E, moving from one X-form to another. With clear and reachable internal representation space, learning can be understood much better, and can be done much more efficiently. For example, we can unify all 5 kinds of learning – logic reasoning, connectionism, probabilistic approach, analogy, and evolution (see [3]) – together on E naturally. For mechanical learning, we need to understand data sufficiency. This is very crucial concept. We use X-form and its sub-forms to define data sufficient to support one X-form and sufficient to bound one X-form. With sufficient data, we can see how learning strategy and learning method work. There could be many learning strategies and learning methods. We show 3 learning strategies: 1. Embed X-form into parameter space. 2. Squeeze X-form from inside to higher abstraction. 3. Squeeze Xform from inside and outside to higher abstraction. We prove that with certain capabilities, the last 2 strategies and methods will make universal learning machine. Of course, this is theoretical results, since we have not designed a specific learning machine yet. Here, we will show that deep learning is actually doing mechanical learning by the first strategy, i.e. embed X-forms into parameter space. Such a fact will help us to understand deep learning much better. 3 See Deep Learning from View of Learning Machine According to our definition, if without human intervention, deep learning is mechanical learning. Of course, this ”if” is a big if. Often, deep learning program is running with a lot of human intervention, specially at the time of model set up. We will restrict our discussion to Hinton’s original model [4], i.e., a stack of RBMs. Each level of RBM is clearly a N -M learning machine (N andM are dimensions of input and output). Hinton’s deep learning model is by stacking RBM together. If without further human intervention, it is a learning machine. This is the original model of deep learning. Other deep learning program can be thought as variations based on this model. Though in the past few years deep learning has leaped forward greatly, stacking RBM together still reflects the most typical properties of deep learning. Thus, we would expect many things in mechanical learning could be applied to deep learning. The point is, we are viewing deep learning from a quite different angle – angle of mechanical learning. For example, we can view Hinton’s original deep learning program [4] as one 258-4 learning machine, and we ask what is the internal representation space of it? We expect such angle and questions would reveal useful things for us. The central questions indeed are: what is the internal representation space of deep learning? what is the learning dynamics? At first, seems it is quite hard since learning is conducted on a huge parameter space (dimension could be hundreds of millions), and learning methods are overwhelmingly a big body of math. However, when we apply the basic thoughts of learning machine to deep learning, starting from simplest RBM, i.e. 2-1 RBM, we start to see much 3 Chuyu Xiong more clearly. 2-1 RBM 2-1 RBM is the simplest. However, it is also very useful since we can examine all details, and such details will give us a good guide on more general RBM. 2 2-1 RBM is one IPU. We know 2-1 IPU totally has 16 processing (22 ). But, we only consider those processing: p(0, 0) = 0, so totally 8 processing, which we denote as Pj , j = 0, . . . , 7 (see [1]). For 2-1 RBM, any processing p can be written as: for input (i1 , i2 ), the output o is:  1 if x ≥ 0 2 o = p(i1 , i2 ) = Sign(ai1 + bi2 ), where (a, b) ∈ R , Sign(x) = 0 if x < 0 The parameters (a, b) determine what the processing really is. Parameter space R2 has infinite many choices of parameters. But, there are only 6 processing, thus, for many different parameters, the processing is actually same. We can see all processing in below table: (0,0) (1,0) (0,1) (1,1) Region X-form P0 0 0 0 0 R4 0 P1 0 1 0 0 R3 b1 P2 0 0 1 0 R5 b2 P3 0 1 0 1 R2 b1 + b3 P4 0 0 1 1 R6 b2 + b3 P5 0 1 1 0 None b1 + b2 P6 0 0 0 1 None b3 P7 0 1 1 1 R1 b1 + b2 + b3 Tab. 1. Table for all processing of 2-1 RBM Fig. 1. Parameter space of 2-1 RBM that is cut into 6 regions In first row of table, Pi , i = 0, . . . , 7 are all processing of 2-1 IPU. Under first row, there is value table for each processing. We point out some quite familiar processing: P7 is actually logical OR gate, P6 is logical AND gate, P5 is logical XOR gate. Note, P5 , P6 are processing for 2-1 IPU, but not in 2-1 RBM. It is well known, 2-1 RBM has no XOR and AND (i.e. no P5 , P6 ). Rj , j = 1, . . . , 6 indicate regions in parameter space R2 , each region for one processing. There are only 6 regions, since 2-1 RBM only has 6 processing. We briefly discuss how we get these regions. See illustration in figure. Suppose p is processing. Line a = 0 cuts R2 into 2 regions: a ≥ 0 and a < 0. If (a, b) is in first region, then p(1, 0) = 1, in second, p(1, 0) = 0. Line b = 0 is perpendicular to a = 0, so, it cuts the previous 4 What really is deep learning? 2 regions into 4 regions: a ≥ 0, b ≥ 0 and a ≥ 0, b < 0 and a < 0, b ≥ 0 and a < 0, b < 0. Clearly, if b ≥ 0, p(0, 1) = 1, if b < 0, p(0, 1) = 0. Line a + b = 0 could no longer cuts the previous 4 regions into 8 regions, it could only cut 2 regions (2nd, 4th quadrant) into 4 regions (R2 , R3 , R5 , R6 ). So, totally, we have 6 regions, and each region is for one processing. This argument about regions is very simple, yet very effective. We can extend this argument to N -1 RBM. Each region is for one processing. So, region can be used to represent processing. That is 6th row in the table shown. Yet, a much better expression is by X-form ([2]). We explain them here. Here b0 = (0, 0), b1 = (1, 0), b2 = (0, 1), b3 = (1, 1) are base patterns. For 2-dim pattern space, there are only these 4 base patterns. But, bi can also be used to represent one processing of 2-1 IPU, i.e. bi is such a processing: when input is bi , output is 1, otherwise output is zero. X-forms are expressions based on all N -1 base patterns, operations +, ·, ¬, composition, Cartesian product, and apply them consecutively. Example, b1 + b3 , b1 · b2 , b1 + ¬b2 are X-forms. Any processing of 2-1 IPU can be expressed by at least one X-form [2]. For example, if region is R3 , processing is P1 , X-form is b1 . Another example, region is R1 , processing is P7 (this is OR gate), X-form is b1 + b2 + b3 . P5 is a processing of 2-1 IPU (XOR gate), but not in 2-1 RBM, its X-form is b1 + b2 . The 7th row in the table shows X-forms representing processing. We can say that each processing is represented by a region, and by a X-form as well. When 2-1 RBM is learning, clearly, parameter (a, b) is adapting. But, only when (a, b) cross region, processing changes. Before crossing, change of parameters is just for preparation for crossing (perhaps many parameter changes are just wasted). Learning is moving from one region to another. Or, equivalently, learning is from one X-form to another. Such view is crucial. Now, we are clear, on surface, learning on 2-1 RBM is a dynamics on parameter space R2 , but real learning dynamics is on 6 regions (or X-forms). Such indirectness causes a lot of problem. 3-1 RBM Just increase input dimension 1, we have 3-1 RBM. To discuss it, we can gain some insights for general RBM. For 3-1 RBM, still we can write: for any input (i1 , i3 , i3 ) ∈ B3 , output o ∈ B is:  1 if x ≥ 0 o = p(i1 , i2 , i3 ) = Sign(ai1 + bi2 + ci3 ), where (a, b, c) ∈ R3 , Sign(x) = 0 if x < 0 However, while we can easily write down all possible processing of 2-1 RBM, it would be hard to do 3 so for 3-1 RBM. For 3-1 IPU, we know that the number of all possible processing is 22 = 28 = 256. Since only considering such processing p: p(0, 0, 0) = 0, the number becomes 256/2 = 128. We expect 3-1 RBM has less processing. But, how many possible processing of 3-1 RBM could have? Following the guidance that 2-1 RBM gives to us, i.e. to consider the hyperplane generated by nonlinearity that cuts parameter spaces, we examine parameter space (a, b, c) ∈ R3 , and following planes: a = 0, b = 0, c = 0, a + b = 0, a + c = 0, b + c = 0, a + b + c = 0. These planes are naturally obtained. For example, if we consider the input (1, 0, 0), it is easy to see plane a = 0 is where cut the value of output: 1 or 0. So, the above planes are associated with following inputs: (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1) We can clearly see that in one region that is cut out by above 7 planes, the output values are same. Therefore, one region actually is representing one processing: in the region, processing is same. So, question of how many possible processing becomes how many possible regions cut out by the 7 planes. We do counting for the regions below. First, a = 0 cuts parameter space into 2 pieces: R11 , R21 . Second, b = 0 perpendicular to a = 0, so, it cuts each region R11 , R21 into 2 pieces, we then have 4 regions: R12 , R22 .R32 , R42 . Then, c = 0 perpendicular to a = 0 and b = 0, so, we have 8 regions: Rj3 , j = 1, . . . , 8. Then, consider a + b = 0. This plane no longer could be perpendicular to all a = 0, b = 0, c = 0. We will not have 2 ∗ 8 = 16 regions. We only have 1.5 ∗ 8 = 12 regions. Following the same argument, we have: For a + c = 0, 1.5 ∗ 12 = 18 regions. For b + c = 0, 1.5 ∗ 18 = 27 regions. For a + b + c = 0, 1.5 ∗ 27 < 41 regions. So, for 3-1 RBM, there are at most 41 possible processing, comparing to 128 possible processing of full 3-1 IPU. However, there are possibility that the number of processing is even less than 41, since among those regions, it is possible that 2 different regions give same processing. We do not consider these details here. Since regions can be represented by X-form, each processing 3-1 RBM can be represented by at least one X-form. b1 = (1, 0, 0), b2 = (0, 1, 1), b3 = (0, 0, 1), . . . , b7 = (1, 1, 1) are X-form for all base patterns. 5 Chuyu Xiong Examples, X-form b1 + b2 is in 3-1 RBM. But, b1 · b2 is not in 3-1 RBM. There are a lot of such X-form that is not in 3-1 RBM. Learning dynamics on 3-1 RBM is also in such way: on surface, it is dynamics on R3 , but real learning dynamics is on 41 regions (or X-forms). N -1 RBM The argument for 3-1 RBM can be extended to N -1 RBM (See details in [2]). We consider hyperplanes N and regions cut off by these hyperplanes. The number of these regions is less than: 2N 1.52 −N −1 . N Compare to the number of all processing of N -1 IPU, which is 22 −1 , easy to see, N -1 RBM has much less processing. This means that N -1 RBM could not express many processing. For N -1 RBM, still we can write: for any input (i1 , . . . , iN ) ∈ BN , output o ∈ B is: o = p(i1 , . . . , i3 ) = Sign(a1 i1 + a2 i2 + . . . + aN i3 ), where (a1 , . . . , aN ) ∈ RN , Sign(x) =  1 if x ≥ 0 0 if x < 0 a1 = 0, . . . , a1 + a2 = 0, . . . , a1 + a2 + a3 = 0 . . . , . . . , a1 + a2 + a3 + . . . = 0, . . . (1)   N N There are 1 hyperplanes such as a1 = 0; 2 hyperplanes such as a1 + a2 = 0; . . . . We also have this: First N hyperplanes will cut parameter space into 2N regions. Then, later each hyperplanes will cut more regions by the rate of multiplying factor 1.5. Thus, we can see the number of regions are: 2N ∗ 1.5K2 ∗ 1.5K3 ∗ . . . ∗ 1.5KN where K2 =  N 2 is the number of hyperplanes such as a + b = 0, etc. And, we have the equation: N 2         N N N N = + + + ... + 0 1 2 N (2) So, K2 + K3 + . . . + KN =           N N N N N + + ... + = 2N − − = 2N − N − 1 2 3 N 1 0 (3) Thus, the number of regions are N 2N ∗ 1.52 −N −1 3 N = 2N ∗ ( )2 −N −1 2 This is a very big number. Yet, compare to the total possible processing of full IPU, it is quite small. See their quotient: N 22 2N −N −1 3 2N −N −1 = 2 ∗ (4/3) N 2 ∗ (2) N It tells that full IPU has f = 2 ∗ (4/3)2 −N −1 times more processing comparing to RBMs. This is huge difference. Say, just for N = 10, f is more than 120 digits, i.e. the number of processing of full IPU would has more 120 digits at the end than the number of RBMs. Also, each region can be expressed by at least one X-form. For examples, b1 + bN , b1 + b3 + b5 , etc. Learning dynamics on N -1 RBM is in such way: on surface, it is dynamics on RN , but real learning N dynamics is on those 2N 1.52 −N −1 regions (or X-forms). N -M RBM Suppose Ri , i = 1, . . . , M are M N -1 RBMs, we can form a N -M RBM, denote as R = (R1 , . . . .RM ), whose processing are p = (p1 , p2 , . . . , pM ), where pi , i = 1, . . . , M are processing of Ri . So, R is Cartesian product of Ri , i = 1, . . . , M . Since all Ri are cut into regions, and in each region, processing is same, we can see R is also cut into regions, and each region is a Cartesian product of regions of Ri : R = R1 × R2 × . . . × RM , where Ri 6 What really is deep learning? N is one region from i-th RBM Ri . Thus, the number of all possible regions of R is (2N 1.52 −N −1 )M = N N 2N M 1.5M (2 −N −1) . This is a much smaller number than 2M 2 , which is the number of total possible processing for N -M IPU. X-form for each region of R, are actually Cartesian product of X-form for those regions of Ri . Suppose R = R1 × R2 × . . . × RM , and fi are X-forms for region Ri in Ri , i = 1, . . . , M , then X-form for R is f = (f1 , . . . , fM ). For example, (b1 , b1 + b3 , . . . , b2 · b4 ) is one X-form of R. Learning dynamics on N -M RBM is in such way: on surface, it is dynamics on parameter space RN M , N but real learning dynamics is on those 2N M 1.5M (2 −N −1) regions (or X-forms). Stacking RBMs Consider a N -M RBM R1 , and a M -L RBM R2 , stacking them together, we get one N -L IPU R: A processing p of R are composition of processing p1 , p2 of R1 , R2 : p(i1 , i2 , . . . , iN ) = p2 (p1 (i1 , i2 , . . . , iN )). And we denote as: R = R1 ⊗ R. The parameter space of R clearly is RN M × RM L . We know RN M is cut into some regions, in each region processing is same. So does RM L . Thus, RN M +M L is cut into some regions, in each region processing is same, and these regions are Cartesian product of regions in RN M and RM L . So, we know number of total possible processing R equals total possible processing of R1 times R2 , i.e. N M N M 2N M 1.5M (2 −N −1) × 2M L 1.5L(2 −M −1) = 2N M +M L 1.5M (2 −N −1)+L(2 −M −1) . N We can easily see if M is large enough, the above number will become greater than 2L2 , which is total possible processing of R. We can see, at least potentially, R has enough ability to become a N -L full IPU. But, we will not consider here. In fact, it is very closely related to the so called Universal Approximation Theorem. Indeed, stacking RBM together is powerful. X-form can be expressed as composition as well. For example, consider 3 2-1 RBM R1 , R2 , and R3 . Using R1 and R2 to form a 2-2 RBM, and using R3 to stack on it, we get a 2-1 IPU R: R = R3 ⊗ (R1 , R2 ). If for this case, R1 has X-form b1 , and R2 has X-form b2 , and R3 has X-form b1 + b2 + b3 , them, R has X-form (b1 + b2 + b3 )(b1 , b2 ). Easy to see this X-form is processing P5 (XOR gate), which is not expressible by one 2-1 RBM. So, putting 3 2-1 RBMs together, more X-form can be expressed. 4 Learning Dynamics of Deep Learning With these understandings RBMs, which is the most essential building block of deep learning, we can see how the model of deep learning is build up, and how learning dynamics is doing. Clearly, today’s deep learning is much more than original Hinton’s model of stacking RBMs (see [4]). But, we would first talking about this model. The deep learning model is by stacking more RBMs (this is so called deep). Once several RBMs are putting together, a deep learning model is formed. Suppose Rj , are Nj -Nj+1 RBM, j = 1, . . . , J, where N1 , . . . , NJ , NJ+1 are sequence of integers. So, we can stack these RBM together to form one N1 -NJ+1 IPU, whose processing could be written in such way: p(i1 , i2 , . . . , iN1 ) = pJ (. . . p2 (p1 (i1 , i2 , . . . , iN1 )) where each pj is processing of Rj . We denote this IPU as R = R1 ⊗ . . . ⊗ RJ . All parameters of R form a huge Euclidean space RN1 N2 +...+NJ NJ+1 . We can denote this huge parameter space as R∗ . Then, clearly, deep learning is conducted on R to reach a good processing by modifying the parameters in R∗ . Of course, it requires skills to modify such a huge number of parameters. There are methods, such as CD (convergent divergence), SGD (stochastic gradient descent), etc. are invented for such purpose. However, no matter what methods are used to modify the parameters, it is modifying parameters to form the dynamics of learning. So, seems the phase space of learning dynamics is on the space R∗ . But, this is just on surface. As we discussed in last section, the true dynamics is not conducted on parameters, but on those regions. The learning dynamics is conducted on these regions cut by N1 hyperplanes and Cartesian products. The number of regions are huge: 2N1 N2 1.5N2 (2 −N1 −1) × . . .. More precisely, the situation is: as learning, a huge number of parameters are adapting, but only when parameters cross region, the processing of R changes. Before crossing, processing remains same, the changes of parameter at most can be thought as the preparation for crossing (perhaps many such changes of parameters are just wasted). Thus, learning dynamics is to move from one region 7 Chuyu Xiong to another. We also know each region is associated with one X-form. Thus, learning dynamics is to move from one X-form to another X-form. Fig. 2. Illustration on parameter space is cut into regions Fig. 2 gives one illustration on parameter space is cut into regions. Of course, R∗ is very high dimension Euclidean space, so regions could be shown on paper precisely, and Fig. 2 is just one illustration. However, this illustration gives us one clear picture about deep learning structure. The deep learning structure is formed by these factors: how many RBMs, dimension of each RBM, how to stack, how to do Cartesian product. Once the structure is formed, if no further human intervention (such as manually adjust numbers or subroutines in model), the structure will not change. Such structure is formed by people at set up time. So, for fixed structure, we will have fixed region cut (as illustrated in Fig. 2). Further, we will have a fixed set of X-forms, and learning is conducted on this set of X-forms. We can see one example. R1 , R2 , R3 are 3 2-1 RBMs. We put them like this: R = R3 ⊗ (R1 , R2 ). We have 3 parameter space (a, b), (c, d), (e, f ). We have 6 regions for each parameter space. Put them together, we have 6x6x6 = 216 regions. R is one 2-1 IPU. So, R at most has 8 processing. Thus, among those 216 regions some different regions will have same processing. But, each region will have one X-form. That is to say, for one processing, there could have several X-form associated with. For example, consider this region: R13 × (R31 , R52 ). This gives processing P5 (XOR gate). Normally, for this processing, we can use X-form b1 + b2 for it. But, for the region, naturally, the X-form is: (b1 +b2 +b3 )⊗(b1 , b2 ). That is to say, this X-form will generate the same processing as b1 +b2 . Another region: R23 × (R21 , R62 ) will give the same processing. And, the X-form is: (b1 + b3 ) ⊗ (b1 + b3 , b2 + b3 ). For deep learning model build on stacking RBMs (original Hinton’s model, [4]), as we discussed in last section, the situation is same: the parameter space R∗ is cut into regions (by hyperplanes, etc), and each region is associated with one X-form, when parameter cross the boundary of the regions, one X-form moves to another X-form, learning dynamics is conducted on this set of X-form. This is the learning dynamics of deep learning, this is what really deep learning is doing. For more complicated deep learning, such as convolution is used, connection pruning is done, nonlinearity is other than sign function (like ReLU), the situation will be more complicated. However, if there is no human intervention, it will surely be mechanical learning. We still can prove that the learning dynamics is the same: the parameter space R∗ is cut into regions, and each region is associated with one X-form, when parameter cross the boundary of the regions, one X-form moves to another X-form, learning dynamics is conducted on this set of X-form. To prove this for general deep learning mathematically, additional works are needed. We will do this work in other place. But, we have no doubt this can be done. Such a learning strategy is exactly what we described in [2]: ”Embedded X-forms into parameter space”. 8 5 What really is deep learning? Remark Now, we know the fact: deep learning is using strategy of ”Embedded X-forms into parameter space”. This fact is very essential and many consequences can be derived from it. Here we make some comments. True nature of deep learning: On surface, deep learning seems build a model from data feed into eventually (by using neural network, stacking RBMs, and more other tools). However, as we reveal in previous sections, it is not such a case. Essentially, a deep learning model is doing this: at the time of model setting up, to cut the huge parameter space R∗ into many regions, and each region is associated with one X-form that is one logical statement, then driven by big amount of data, following certain learning dynamics, i.e. to move from region to another region, which is equivalent to move from one X-form to another X-form, and eventually to reach a satisfactory X-form, which is the learning result. So, we say that deep learning is not to building up a model from data input, but it is to choose a good X-form from a set of X-forms established at the time deep learning model is set up. This is the true nature of deep learning. Such a view is different than popular view about deep learning. However, it is true and help us to understand deep learning better. For example, [6] might be right, there are some group renormalization going on, but, it missed this issue: group renormalization happens at the setting stage not at the learning stage. Another example, [5] gives a very good explanation about the power of multi-stagecomposition. However, it failed to realize that learning is not only to get a good processing, but to find a best possible X-form for the good processing (since one particular processing could have many associated X-form, and some of such X-form is bad, some of such X-form is good). Fundamental limitation of deep learning: The fundamental limitation of a deep learning model is from its nature: it acts on a pre-selected set of X-forms X, which is formed at the time the model is set up. So, mostly likely, a deep learning model could not be an universal learning machine [2]. If it is universal, X must contains at least one X-forms for any possible processing. This is nearly impossible. Actually, a deep learning model is set up by human, and is for one particular task. So, most likely, X only contains X-forms specially for this task. And, this deep learning model is limited by X. If the learning target is for a particular processing, and if in X there is at least one X-form associated to this processing, a deep learning model could possible to get the target. Otherwise, a deep learning model could not reach the processing, no matter how hard to try and how much data. In another word, the model is a bad model. But, deep learning has no any method to tell if a model is good or bad before trying it out. This is one huge limitation. Yet, even X contains a X-form associated with the desired processing, we still do not know if the X-form is a good one. As we know in [2], there are many X-forms associated with one processing, some is bad, and some is good. For example, one X-form is more robust for certain conditions. If X does not contain the robust X-form, no matter how hard to try and how much data, learning could not get a robust solution. Again, deep learning has no any method to tell if X contains such X-form. . These limitations are fundamental and are derived from the fact: deep learning is chosen X-form from a pre-selected set X, not dynamically building a X-form from input data. Logical or Probabilistic: Quite often, people think deep learning is doing probability learning. They think that a probability model is essential for deep learning since a lot data feed in, specially, stochastic gradient descent is one very essential learning method. However, we would like to point out: deep learning fundamentally is viewing its learning target logically. Why? Each X-form in X is a logical statement, often a very long logical statement (so called deep). So, the very essential thing is: when a deep learning model does its information processing, it is doing according to a solid logical statement. Not doing the information processing probabilistically. Of course, the way to get the X-form might not be pure logical, it could involve a lot of probabilistic views and actions, such as stochastic gradient descent. However, we would point out, even the way to get the X-form, could be pure deterministic not probabilistic. It is possible to design a pure deterministic learning dynamics, at least in theory. Chuyu Xiong 9 Why works well: Practice shows, deep learning works very well for many problems. Now, we can see the reason for such success clearly: when a deep learning model for one problem is set up by experienced people, the desired X-form is already build into the model. More precisely, if the desired X-form is X, when deep learning model is set up, we have X ∈ X, where X is the pre-selected set of X-forms. If so, it is possible to learn the X-form X successfully, so the processing associated with X. Thus, the success of a deep learning model depends on its set up. Having a good set up, the model will work well. Otherwise, no matter what data and what efforts, the model will not work well. Of course, besides the set up of model, learning methods are crucial. It is not easy to choose the right X from X at all. We would like to point out the methods currently used indeed have some advantages: 1. Methods act on Euclidean space, which is most easy to calculate, with many sophisticated algorithms, library, packages, and hardwares available. 2. Methods are mostly doing linear algebraic calculus, which are easy to be parallelized. And, high parallelization is the key of its success. However, this advantage is build on this fact: no dynamic adaption. If dynamic adaption is used (such as recently introduced Capsule), this advantage might be lost. Data for deep learning: As discussed above, the logical statement (X-form) is the core of deep learning. Without supporting data, a deep learning model could not reach a sophisticated logical statement (X-form). We defined data sufficiency in [2], which tells what kind of data can support one X-form (logical statement). Of course, the data sufficiency we defined is only the first step to understand data. Since deep learning approaching the desired X-form by some learning methods, it is easy to see that we need more data than just sufficient to support one X-form. The relationships here could be quite complicated, which would be the topic for further research. However, we can tell that data sufficient to support and sufficient to bound the desired X-form is the necessary condition for deep learning. In this sense, for so called big data for deep learning, we understand the necessity and lower bound. Disadvantages of deep learning: Deep learning has some fundamental disadvantages from its root. We list some of them below: 1. It is acting on huge parameter space, but, actual learning dynamics is on a fixed set of regions (which is equivalent to a set of X-forms). This indirectness makes every aspects of learning harder, especially, it is near impossible to know what is exactly happening in learning dynamics. 2. Successful learning needs data sufficient to support and to bound. This is very costly. 3. The structure of learning is setup by human. Once setup, structure (how many layers, how big a layer is, how layers fitting together, how to do convolution, etc) is not be able to change. This means that learning is restricted on a fixed group of regions, equivalent a fixed group of X-forms. If best X-form is not in this set, deep learning has no way to reach best X-form, no matter how big data are and how hard to try. Consequently, it is not universal learning machine. 4. It is very costly to embed X-forms into a huge parameter space. Perhaps, among all computing spend on learning, only a very small fraction is used on critical part, i.e. moving X-form to another, and most are just wasted. 5. Since there is no clear and reachable internal representation (due to the embedding), it will be very hard to do advanced learning, such as to unite all 5 learning methods together (see [3], [2]). 6. Since there is no clear internal representation space, it is hard to define initial X-form, which is very essential to efficiency improving and several stages of learning. Looking forward to universal learning machine: Since deep learning model is not universal learning machine, naturally, we looking forward to universal learning machine. We discussed this in [1] and [2]. There, we proved that with certain capabilities, we can make universal learning machine. Also, we actually invented a concrete universal learning machine which is in the patent application process. We think universal learning machine has many advantages over deep learning model. There are many research works needed to be done for universal learning machine. 10 What really is deep learning? References [1] Chuy Xiong. Discussion on Mechanical Learning and Learning Machine, arxiv.org, 2016. http://arxiv.org/pdf/1602.00198.pdf [2] Chuy Xiong. Descriptions of Objectives and Processes of Mechanical Learning, arxiv.org, 2017. http://arxiv.org/abs/1706.00066.pdf [3] Pedro Domingos. The Master Algorithm, Talks at Google. https://plus.google.com/117039636053462680924/posts/RxnFUqbbFRc [4] E. G. Hinton. Learning multiple layers of representation, Trends in Cognitive Sciences, Vol. 11, pp 428-434.. http://www.cs.toronto.edu/ hinton/absps/tics.pdf [5] Henry W. Lin, Max Tegmark, David Rolnick. Why does deep and cheap learning work so well?, arxiv.org, 2016. http://arxiv.org/pdf/1608.08225.pdf [6] Pankaj Mehta, David J. Schwab, David Rolnick. An exact mapping between the Variational Renormalization Group and Deep Learning, arxiv.org, 2014. http://arxiv.org/pdf/1410.3831.pdf
9cs.NE
Bayesian Nonparametric Inference for M/G/1 Queueing Systems Moritz von Rohrscheidt∗1 and Cornelia Wichelhaus †2 arXiv:1703.07072v1 [math.ST] 21 Mar 2017 1 Ruprecht-Karls 2 Technische Universität Heidelberg Universität Darmstadt March 22, 2017 Abstract In this work, nonparametric statistical inference is provided for the continuous-time M/G/1 queueing model from a Bayesian point of view. The inference is based on observations of the inter-arrival and service times. Beside other characteristics of the system, particular interest is in the waiting time distribution which is not accessible in closed form. Thus, we use an indirect statistical approach by exploiting the Pollaczek-Khinchine transform formula for the Laplace transform of the waiting time distribution. Due to this, an estimator is defined and its frequentist validation in terms of posterior consistency and posterior normality is studied. It will turn out that we can hereby make inference for the observables separately and compose the results subsequently by suitable techniques. Keywords: Bayesian Statistics, Nonparametric Inference, Queues in Continuous Time 1 Introduction Much attention has been drawn to the analysis and the statistics of queueing systems. Beside approaches to statistical inference for queueing systems in the classical frequentist sense, during the last three decades there has taken place mentionable research in what is frequently called Bayesian queues. By that we mean inference for queueing systems from the Bayesian point of view. Bayesian statistical approaches are often feasible and useful in the area of Operations Research since one is able to express prior knowledge about the system which is often present, see also e.g. the foreword by Dennis Lindley in De Finetti (1974). It is worth to mention here some of the recent works on Bayesian queues. Armero and Bayarri (1994) deals with Markovian queues in the Bayesian sense, i.e. queues with a homogeneous Poisson process as input stream and exponential service times with varying number of service stations. In this parametric model, the parametrically conjugate Gamma prior is put on the parameter space which contains the arrival and service parameter with the aim to evolve a Bayesian test for the stability of the queueing system. ∗ † [email protected] [email protected] 1 This work forms the base for further works on Bayesian inference for systems with Markovian characters under several generalizations cf. e.g. Armero and Conesa (1998, 2004, 2006) and Ausín et al. (2007, 2008). Generalizations in many ways were performed as for example a non-Markovian setting for the inter-arrival times, cf. Wiper (1998) and Ausín et al. (2007, 2008). Assuming the arrival stream of customers to be Poisson is often well-suited and ensures desirable properties of the stochastic process in the background of the system, meaning that there is a description in terms of an embedded Markov chain. In contrast, the service times often have to be modeled to be governed by a more general distribution. Moreover, more flexible classes of service time distributions often preserve the aforementioned property. Thus, it is reasonable to generalize the distribution of the service times which, in the classical parametric treatment, is taken to be exponential. Models with generalizations of the service time distribution can be found in Insua et al. (1998), where Erlang and hyperexponential distributions are employed to model the service times more flexibly. Ausín et al. (2004) use the well known probabilistic result that the class of phase-type distributions forms a dense set in the space of all probability distributions [cf. Asmussen (2008, p.84)]. They model the service time distribution semiparametrically, assign prior distributions to its parameters for eventually inferring the system by MCMC procedures. However, one is often interested in a even more general approach for modeling the service time distribution which leads to a non-parametric Bayesian approach to estimate the unknown service time distribution. The first work in a discrete-time framework concerning this was given by Conti (1999) for a Geo/G/1 system which can be seen to be the discrete-time analog of the continuous-time M /G/1. Geo/G/1 is frequently used to model communication systems where information encoded in packages of fixed size is transmitted by a serving unit. The server is assumed to be able to transmit one package during one time slot. Hence, the randomness of the service times can rather be seen to be given in form of random batch sizes, i.e. marks of the point process governing the arrival stream. Employing a Dirichlet process prior for the distribution of the magnitude of these marks, Conti obtains estimators for various characteristics of the queue by a well known functional relationship [see also e.g. Grübel and Pitts (1992)] of the inter-arrival and the service time distribution with the waiting time distribution. Since the target of Conti’s work was to obtain estimates for the waiting times of customers, he took this rather indirect approach mainly because assigning a prior distribution to the waiting time distribution and updating it by data consisting of the marked arrival stream is infeasible. He obtained large sample properties for the estimator of the probability generating function of the waiting time distribution. These were uniform posterior consistency and a Bernstein-von Mises type result. The former roughly says that the posterior distribution, i.e. the prior updated by the data, will center around the true value while the latter forms a Bayesian analog to the central limit theorem and gives an idea how this centering looks like. For the Bernsteinvon Mises theorem results in Freedman (1963) were employed. The aim of the present work is to take a similar way of Bayesian statistical inference for the continuous-time M /G/1 system which is the more appropriate model in many situations where time-continuity is more reasonable. For example one could think of customers arriving at a cashier in a supermarket, cars arriving at a traffic jam, goods arriving at a storing center and many others. Therefor, a continuous-time analog for the functional relationship of observables and objects of interest is used which is known as the functional Pollaczek-Khinchine formula in honor of Felix Pollaczek and Aleksandr Khinchine who derived the steady state behaviour 2 of the M /G/1 system in the 1930s. Thereby, the philosophy is analog to that of Conti (1999), meaning that the main target will be the nonparametric estimation of the waiting time distribution on basis of observations of the arrival stream and the service times. However, a richer class of prior distributions is used which allows to express prior knowledge more flexibly. We feel that this is more reasonable for a system evolving in continuous time. The combination of this larger class of prior distributions together with the assumption of continuous time leads to more intricate proofs of results related to the discrete-time analog. As usual, the Bayesian approach is appreciable if prior knowledge and only few data is available. However, since typically large data samples are accessible, large sample properties as posterior consistency and posterior normality are investigated. The paper is organized the following way. In section 2 the underlying queueing model is introduced and the functional relationship between observables and characteristics of interest is briefly described. Section 3 is devoted to the assignment of prior distributions to the random distributions governing the observables. Therefor, we review some facts of Bayesian statistics and call to mind a large family of non-parametric priors for eventually obtaining suitable estimators. Subsequently, frequentist validations of the suggested estimators is given in section 4 and section 5. While section 4 deals with the concentration of the posterior law of the random quantities in form of posterior consistency results, section 5 is devoted to the question how these concentrations take place yielding Bernstein-von Mises type results. 3 2 The Queueing Model The present section is devoted to the underlying queueing model. The model is chosen, in Kendall’s notation [Kendall (1953)], to be the M /G/1/∞-FIFO system. This notation means that (M) indistinguishable customers arrive consecutively according to a homogeneous Poisson process. Here, the M stands for "Markovian" to depict the memorylessness property of the exponential distribution which governs the independent inter-arrival times (An )n∈Z . Note that most of the appreciable properties of the M /G/1 system are due to this assumption. Moreover, customers requiring service are served according to a general service time distribution (G) concentrated on R+ . The service times are assumed to form a sequence of i.i.d. random variables (Sn )n∈Z . The consecutive services are accomplished by one (1) reliable service station in a first-in-first-out (FIFO) manner. Customers who cannot be served immediately are stored in an infinitely large waiting-room (∞) and thus form a queue which, provided the queue is stable and in steady state, is distributed according to a stationary distribution. For the sake of clarity of what follows, we introduce the following notation. We hereby assume that all random variables are defined on a common underlying probability space (Ω, A, P). • Qt ≡ queue length at time t ∈ R • Nt ≡ number of customers in the entire system at time t ∈ R, i.e. Nt = Qt + 1 in case Qt > 0 for t ∈ R • Wn ≡ waiting time of customer n ∈ Z • Dn ≡ sojourn time in the system of customer n ∈ Z • An ≡ time between arrival of n-th and (n − 1)-st customer n ∈ Z • Sn ≡ service time of customer n ∈ Z Letting λ denote the arrival rate of the Poisson arrival stream, µ the mean of the amount of time the server needs to complete the service of a customer and defining the so-called traffic intensity ρ ∶= E[S]/E[A] = λµ, a well known assumption for the existence of a stationary distribution for N is ρ < 1. If the queue is stable, by stationarity it is common to denote above quantities without an index tacitly assuming that the system has already run for an infinitely large time-horizon. If additional one assumes E[S 2 ] < ∞ it can be shown that E[N ] = ρ + ρ2 + λVar[S] . 2(1 − ρ) This formula is known as the Pollaczek-Khinchin mean formula and relates the mean of the distribution of N to that of A, S and to the variance of S, Var[S]. However, this formula only relates parameters of aforementioned distributions to each other instead of the entire distributions. However, in Bayesian statistics one is typically interested in the entire distribution of a parameter one is uncertain in. A functional relationship is given by the Pollaczek-Khinchine k transform formula. To state it, define the following objects. Let n(z) = ∑∞ k=0 z P(N = k) be ∞ the probability generating function (p.g.f.) of the distribution of N and g(z) = ∫0 e−zs dG(s) the Laplace-Stieltjes transform (LST) of the service time distribution. Then the following functional relationship can be obtained, see e.g. Haigh (2004) or Nelson (2013). n(z) = g(λ(1 − z)) (1 − z)(1 − ρ) , g(λ(1 − z)) − z z ∈ [0, 1]. 4 Manipulations of this formula give q(z) = (1 − z)(1 − ρ) , g(λ(1 − z)) − z and z ∈ [0, 1], w(z) = z(1 − ρ) , z − λ(1 − g(z)) z ∈ R+ , where q(z) denotes the p.g.f. of the queue-length distribution and w(z) the LST of the waitingtime distribution. The latter two quantities are of special statistical interest since they provide the essential information about the development of the queue. 5 3 Prior Assignments and Estimators All the transforms n(z), q(z) and w(z) introduced in section 2 depend on the arrival rate λ and on the LST of the service time distribution g(z). These values are typically assumed to be unknown and thus need to be inferred. For this inference, we choose a Bayesian approach which is further introduced in the present section. Since it does not make sense to a subjectivist statistician to talk about "fixed but unknown" parameters [see De Finetti (1974)], another philosophical concept is used. That is one interprets the "fixed but unknown" parameter as a random quantity itself. This approach leads to the concept of exchangeability which provides a "meaningful, observable character" of the data. This approach is briefly reviewed. Let (Ω, A, P) be an abstract probability space. Call an infinite sequence of random variables (Xi )∞ i=1 with Xi ∶ Ω → R, i ∈ N, exchangeable if for any m ∈ N and any permutation π of m elements it holds that (E) L [X1 , . . . , Xm ] = L [Xπ(1) , . . . , Xπ(m) ] , where L denotes the joint law of the respective random object. Now, assume that we observe n inter-arrival times An1 = (A1 , . . . , An ) between the first (n + 1) consecutive customers as well as the service times S1n = (S1 , . . . , Sn ) of the first n customers. The data An1 and S1n are assumed to be the first n projections of two independent ∞ sequences of exchangeable random variables A∞ 1 and S1 which, in turn, are assumed to be independent of each other, i.e. L(Si ; i ∈ I∣Aj ; j ∈ J) = L(Si ; i ∈ I) for all finite subsets I, J ⊂ N. We turn to de Finetti’s theorem for Polish spaces [Hewitt and Savage (1955)]. Let P(S) denote the space of all probability measures on some Polish space S and consider in particular P(R) equipped with the topology of weak convergence of measures. This leads to a measurable space (P(R), BP(R) ) which is itself Polish [e.g. Kechris (1995)]. By the de Finetti theorem for exchangeables, it holds for all n ∈ N and for all measurable subsets Ai ⊂ R, i = 1, . . . , n that X1∞ = (X1 , X2 . . . ) is exchangeable if and only if there is a unique mixing measure ν ∈ P(P(R)) such that n P(Xi ∈ Ai ; i = 1, . . . , n) = ∫ P(R) ∏ P (Xi ∈ Ai )ν(dP ). i=1 The right-hand side reflects the equivalent property of the sequence X1∞ being exchangeable the following way. The data X1∞ are conditionally i.i.d. given some probability measure P ∈ P(R), in symbols write X1∞ ∣P ∼ ⊗N P . The probability measure P itself is random and distributed according to the mixing measure ν which is called the prior distribution from a Bayesian statistical point of view. Moreover, notice that unconditionally the data X1∞ are in general not independent. Indeed, by a result from Kingman (1978), it is easily seen that in general data are positively correlated, a fact that makes Bayesian statistics a theory of statistical prediction and thus convenient for other theories as e.g. machine learning. For actual applications, however, the prior ν and the integration in de Finetti’s theorem becomes infeasible in general. This is mainly due to the fact that one has merely a nonconstructive proof of the existence of ν. Another difficulty is that the set P(R) is quite large. One has mainly two ways to choose to circumvent this problem in applications. The first is to shrink the support of ν to a reasonable subset of P(R) by an additional "symmetry 6 constraint" on the sequence of random variables, thus, to put additional information on the data, to boil down above integration to a finite dimensional parameter space. The second is to model ν non-parametrically by genius probabilistic tools. We use the first approach here to get a prior distribution for the random arrival rate λ ∶ Ω → R+ and the second to get a prior distribution for the random service time distribution G ∶ Ω → P(R+ ). 3.1 Arrival Rate In case of the inter-arrivals an additional symmetry assumption on the law of the infinite exchangeable sequence A∞ 1 will give rise to a mixing measure which is supported by all exponential distributions. This additional symmetry condition is stated as follows. Let n ∈ N and for i = 1, ..., n, Bi ∈ BR+ , the Borel sigma-field on R+ . Furthermore, let ci ∈ R be real constants such that ∑ni=1 ci = 0 and Ci = ci + Bi = {ci + r ∶ r ∈ Bi } ⊂ R+ , i = 1, . . . , n. The law of the exchangeable sequence A∞ 1 fulfills the symmetry condition P(Ai ∈ Bi ; i = 1, ..., n) = P(Ai ∈ Ci ; i = 1, ..., n), (S) for all n, Bi , Ci as above if and only if it is a mixture of exponential distributions [Diaconis and Ylvisaker (1985)], in symbols n P(Ai ∈ Bi ; i = 1, ..., n) = ∫ ∏ P (Ai ∈ Bi )ν(dP ) E i=1 n = ∫ ∏∫ R+ i=1 Bi λe−λxi dxi ν̃(dλ), where E denotes the space of all exponential distributions on R+ and ν̃ denotes the pushforward measure of ν along the natural parametrization ˜∶ E → R+ ; P ↦ λ of the exponential distributions. Moreover, if in above situation additionally it holds E[A2 ∣A1 ] = αA1 + β for real constants α, β > 0, then the mixing measure ν̃ can be shown to be a Gamma distribution. Since the M /G/1 queueing model implies a mixture of exponential distributions for the joint law of the inter-arrivals, from a Bayesian point of view, we assume A∞ 1 to meet constraints (E), (S) and that E[A2 ∣A1 ] = αA1 + β holds as well (note that by exchangeability, this extends to all random inter-arrival times). The latter directly leads to a conjugate prior for the arrival rate. To be more precise, if we assume λ to be a random variable distributed according to a Gamma distribution with hyper parameters a, b > 0, then the posterior distribution given the data X1n is a Gamma distribution as well with updated hyper-parameters (a + n, b + ∑ni=1 Ai ), i.e. the family of gamma distributions is closed with respect to exponential sampling. In summary, we assume the following sampling scheme λ∣(a, b) ∼ Γ(a, b) A∞ 1 ∣λ ∼ ⊗ E(λ), N which leads, through Bayes theorem, to the posterior distribution, the Bayes estimate for 7 squared error loss and the posterior predictive distribution density, respectively, given by n λ∣(a, b), An1 ∼ Γ (a + n, b + ∑ Ai ) i=1 a+n = b + ∑ni=1 Ai (a + n) (b + ∑ni=1 Ai )a+n f (an+1 ∣An1 , (a, b)) = . (b + ∑ni=1 Ai + an+1 )a+n+1 EΓ [λ∣An1 , (a, b)] The latter leads to the predictive value for the next observation E[An+1 ∣An1 , (a, b)] = n 1 b . ∑ Ai + a + n − 1 i=1 a+n−1 Note that the latter equation again reflects the learning process which does not exist in the frequentistic approach in such an explicit form and that for n = 1 it is given by E[A2 ∣A1 , (a, b)] = 1/aA1 + b/a. 3.2 Service Time Distribution Since the M /G/1 model does not imply a parametric mixture for the service time random variables as for the inter-arrivals, assigning a suitable prior is a more difficult task. Not being able to shrink the support of the mixing measure ν in the de Finetti theorem to a finitedimensional set, we have to choose a prior that supports most of P(R+ ). The common way is to parametrize P(R+ ) by a reasonable dense subset. This is taken to be the set of all discrete ∞ distributions on R+ , Pd (R+ ) = {P ∈ P(R+ ) ∶ P (⋅) = ∑∞ i=1 wi δxi (⋅); wi ∈ [0, 1], ∑i=1 wi = 1, xi ∈ R+ ; ∀i ∈ N}. It is well-known that the most famous non-parametric prior in Bayesian statistics, namely the Dirichlet process prior obtained in Ferguson (1973), samples discrete probability measures with probability one. Moreover, it is known that it has full weak support of all of P(R+ ) if its base measure has support all of R+ . However, here we will use a slightly more general family of prior distributions that enables us to model more flexibly prior beliefs of the true data generating distribution G0 . This larger family will be a subclass of so called neutral to the right prior processes, namely the beta-Stacy processes. Although these priors sample discrete probabilities with probability one, too, an analogue of the result concerning the weak support is known as well. The class of neutral to the right priors is now briefly introduced and its most important properties will be stated. 3.2.1 Neutral to the right Priors Let F(R+ ) denote the space of all cumulative distribution functions (c.d.f.) on R+ . Then, a random distribution function F ∈ ΩF (R+ ) is said to be neutral to the right (NTR) if for each k > 1 and 0<t1 < t2 < ... < tk the normalized increments F (t1 ), F (t2 ) − F (t1 ) F (tk ) − F (tk−1 ) , ..., 1 − F (t1 ) 1 − F (tk−1 ) are independent assuming F (t) < 1, ∀t ∈ R+ . That is, for all i ∈ N, F̄ (ti )/F̄ (ti−1 ) is independent of the sigma-field generated by F up to time ti−1 , σ({F (t) ∶ t < ti−1 ), where F̄ (⋅) ∶= 1 − F (⋅) is the survival function associated to F . This essentially asserts that the proportion of mass that 8 F assigns to (ti , ∞) with respect to (ti−1 , ∞) does not depend on how F behaves left of ti−1 . This property coined the name neutral to the right. Doksum (1974) has shown that F (⋅) ∈ ΩF is NTR if and only if L(F (⋅)) = L(1 − exp[−A(⋅)]) for some independent increment process A(⋅) which is almost surely non-decreasing, right continuous and such that limt→−∞ A(t) = 0 and limt→∞ A(t) = ∞. Such objects are called increasing additive processes, see e.g. Sato (1999). For more details on the construction of NTR priors see e.g. Phadia (2015). Since independent increment processes are well understood, the definition of NTR priors leads to a rich class of non-parametric priors which are analytically tractable. Another nice feature of NTR priors is that this family is conjugate with respect to (right-censored) exchangeable data. A fact that makes NTR priors appreciable in statistical survival analysis. Notice, that a Dirichlet process prior updated by right censored data is not longer Dirichlet. The next proposition makes a statement about the weak support of a NTR prior. Recall that the topological support of a measure is the smallest closed set with full measure. In the following theorem F(R+ ) is identified with the space of all probability measures P(R+ ) which is equipped with the weak topology. Proposition 3.1. Dey et al. (2003) Let F be a random distribution function which is governed by a NTR prior Π ∈ P(F), i.e. F ∼ Π, and let A(⋅) = − log(1 − F (⋅)) be the corresponding positive increasing additive process with Lévy measure L. Then, Π has full support if L has full support. The assertion remains true if F(R+ ) is equipped with the sup-norm. Proof. It has to be shown that all weak neighborhoods of any probability measure have positive Π-mass. Since continuous distributions are dense in P(R+ ) with respect to the weak topology, it suffices to show the assertion for all weak neighborhoods of continuous distributions. Now, choose some random distribution function F0 and some  > 0 and consider U ∶= {F ∶ sup ∣F (t) − F0 (t)∣ < }. Then [e.g. Ghosh and Ramamoorthi (2003))] W ⊆ U for 0≤t<∞ some weak neighborhood W of F0 . Moreover, there is δ > 0, m ∈ N and 0 < t1 < t2 < ⋯ < tm such that {F ∶ ∣F (ti , ti+1 ] − F0 (ti , ti+1 ]∣ < δ, i = 1, . . . , m} ⊆ W . Hence, it is enough to show that sup-neighborhoods restricted to compact sets possess positive prior probability. By the homeomorphism φ ∶ F (⋅) ↦ − log[1 − F (⋅)] the problem can be translated to the analogous one for the corresponding Lévy process. That is to show that L(A) gives positive probability to sets of the form C ∶= {A ∶ sup ∣A(t) − φ−1 F0 (t)∣ < γ} for fixed r ∈ Q. Now, take a partition 0≤t≤r ρ = ∪ki=1 (ai , ai+1 ] of (0, r] such that sup φ−1 F0 (aj , aj+1 ] < γ and define 1≤j≤k Bi ∶= (ai , ai+1 ] × (φ−1 F0 (ai , ai+1 ] − γ/k, φ−1 F0 (ai , ai+1 ] + γ/k), B ∶= ∩ki=1 {A ∶ #{(t, A({t}) ∈ Bi } = 1} . It follows that B ⊆ C and, since L was assumed to have full support, k φ−1 Π(C) ≥ φ−1 Π(B) = ∏ L(Bi )e−L(Bi ) > 0. i=1 9 3.2.2 Beta Processes and Beta-Stacy Processes For our purposes, we choose a NTR prior with corresponding process Y (⋅) being driven by a certain class of Lévy measures. These were studied by Hjort (1990) and Walker and Muliere (1997). Hjort studied beta-processes from a survival analysis viewpoint and therefor elicited a non-parametric prior for the cumulative hazard function (c.h.f.) given for F ∈ F(R+ ) by t H(t) = ∫ 0 dF (s) , t > 0. F̄ (s) Walker and Muliere (1997) give the definition of the analog of the beta-process as a prior for the c.d.f. directly as follows. F is said to be distributed according to a beta-Stacy process + with parameters (c(⋅), H(⋅)) ∈ RR + × F(R+ ) (for short F ∼ BS(c, H)) if for all t ≥ 0 the corresponding process Y (⋅) fulfilling F (⋅) = 1 − exp[−Y (⋅)] has Lévy measure t dx −xc(s)(1−H(s)) dLt (x) = c(s)dHc (s), ∫ e 1 − e−x 0 for all x > 0, where Hc (t) = H(t) − ∑ H(tk ) is the continuous part of H with ti as the fixed k∶tk <t points of discontinuity of H. Since we are in a continuous-time framework, we will always choose H to be continuous. However, discontinuities appear in the Lévy measure governing the posterior law. Note that EBS [F (⋅)] = H(⋅) is the prior guess on the c.d.f. F and the function c(⋅) acts like a tuning parameter affecting the magnitude of the increments and is sometimes interpreted as the "flexible" belief in the prior guess. For the sake of clarity, note that the Dirichlet process with finite measure α as parameter admits a similar representation with Lévy-measure t dx −xc(1−ᾱ(s)) dDt (x) = cᾱ(ds), ∫ e 1 − e−x 0 α(⋅) where c = α(R) and ᾱ(⋅) denotes the c.d.f. corresponding to the probability measure c . In the case of Dirichlet processes it is well-known that the prior guess on the random probability measure equals 1/cα(⋅) and c itself is often interpreted as the strength of belief in the prior guess. Thus, a Dirichlet process is a beta-Stacy process whose parameters are determined by α alone. As already mentioned, the beta-Stacy process is a parametrically conjugate prior, meaning that the posterior law of F given exchangeable possibly right-censored data is a beta-Stacy process as well. To be more precise, let S1n be the first n projections of infinite exchangeable data S1∞ . Let S1∞ be conditional iid given the c.d.f. F and let F ∼ BS(c, H). n n i=1 i=1 Further, define M (t) = ∑ 1[t,∞) (Si ) and N (t) = ∑ 1[0,t] (Si ). Then it holds [Walker and Muliere (1997, Theorem 4)] that F ∣S1n ∼ BS(c∗n , Hn∗ ), where c∗n (⋅) and Hn∗ (⋅) are given by Hn∗ (t) = 1 − ∏ (1 − s∈[0,t] c∗n (t) = c(s)dH(s) + dN (s) ), c(s)H̄(s) + M (s) c(t)H̄(t) + M (t) − N (t) . H¯∗ (t) 10 Thereby, Hn∗ (t) is defined by means of the product integral, see Gill and Johansen (1990). Note, that the posterior process possesses fixed points of discontinuity at the observations and that the posterior guess on F , i.e. the Bayes estimate with respect to squared error loss is given by F̂n (⋅) = Hn∗ (⋅). Having a look at the Pollazcek-Khinchine transform formulas in section 2, one may ask if they are well defined for almost all λ and F drawn from their respective prior and posterior distributions. While the posterior of the mean inter-arrival times is straightforward by definition, the mean and the second moment of the random c.d.f. describing the general service times deserves more attention. The existence of functionals of c.d.f.s drawn according to a beta-Stacy process was studied in Epifani et al. (2003). Relating A(⋅) and c(⋅) to the existence of a certain functional, they obtained sufficient conditions for moments of order m to exist [equation (10) in their article]. We will assume throughout that this condition holds at least for the moment of second order. Moreover, note that they obtained an explicit formula for the prior moments [equation (11)] as well as for the posterior moments [equation (13)]. In summary, we assume the following sample scheme for the service times in the M /G/1 system. G∣(c, H) ∼ BS(c, H) S1∞ ∣G ∼ ⊗ G. N This leads to the posterior distribution G∣(c, H), S1n ∼ BS(c∗n , Hn∗ ). Notice again that this updating continues to hold for right-censored observations. Hence, the model can be enlarged in that one does not have to keep exact track of the customers and is still able to make reasonable inference even if e.g. it is solely known that the service of customers has exceeded a certain threshold. 3.3 Estimators for Queueing Characteristics In this subsection, we study the Bayes estimators, i.e. the posterior means, of several characteristics of the M /G/1 system. Not all posterior laws of each single characteristic are obtainable explicitly. Hence, for those characteristics whose posterior laws are not obtainable in closed form, we define suitable estimators by replacing Bayes estimators for the corresponding values. Assume for the general service time distribution G ∼ BS(c, H) and let Ĝn = EBS [G∣S1n ] , µ̂n = EBS [∫ λ̂n = ∞ 0 EΓ [λ∣An1 ] tdG(t)∣S1n ] and be the Bayes estimates with respect to squared error loss. Note that with Mn (s) = ∑nj=1 δXj [s, ∞), as in Epifani et al. (2003), µ̂n can be given as µ̂n = ∫ 0 ∞ t exp [− ∫ 0 t β(s) + M (s) − 1 α(ds) n ] exp [− ∫ Nn (ds)] dt, β(s) + Mn (s) β(s) + Mn (s) 0 11 where if H is continuous [see Phadia (2015)] • β(t) = c(t)[1 − H(t)] t • α(t) = ∫0 c(s)dH(s). Observe that ρ̂n = EBS⊗Γ [λµ∣S1n , An1 ] = µ̂n λ̂n by above independence assumption. However, in Bayesian statistics, one is interested in the entire posterior law rather than merely in a certain functional. The posterior law of ρ is obtainable explicitly in the following form PBS⊗Γ (ρ ≤ t∣An1 , S1n ) = PBS⊗Γ (µλ ≤ t∣An1 , S1n ) ∞ =∫ 0 =∫ = 0 ∞ PBS⊗Γ (µ ≤ t/λ∣An1 , S1n , λ)PBS⊗Γ (λ∣An1 , S1n )dλ PBS (µ ≤ t/λ∣S1n , λ)PΓ (λ∣An1 )dλ ∞ (b + ∑ni=1 Ai )a+n n a+n−1 −λ(b+∑n i=1 Ai ) dλ. e ∫ PBS (µ ≤ t/λ∣S1 , λ)λ Γ(a + n) 0 Note that PBS (µ ≤ t/λ∣S1n , λ) can be stated more explicitly in form of a density by means of Proposition 4 in Regazzini et al. (2003). This explicit form is omitted here due to technical reasons and left to the interested reader. If one observes the queueing system and is, as is usually the case, not aware of the condition ρ0 < 1, one can thus obtain the posterior probability that the system is stable PBS⊗Γ (ρ < 1∣An1 , S1n ). We close this section by defining estimates for: • mean service time: µ̂n • traffic intensity: ρ̂n = λ̂n µ̂n ∞ • LST of service-time distribution: gn∗ (z) = ∫0 e−zt dĜn (t) • LST of waiting-time distribution: wn∗ (z) = • pgf of queue-size distribution: qn∗ (z) = z(1−ρ̂n ) ∗ (z)) z−λ̂n (1−gn (1−ρ̂n )(1−z) ∗ (λ̂ (1−z))−z gn n • system-size distribution: n∗n (z) = qn∗ (z)gn∗ (λ̂n (1 − z)). Notice that for the random arrival- and service rate and the random distribution function of the service times the natural Bayes estimator is used, i.e. the minimizer with respect to squared error loss. They are analytically tractable and obtainable in closed form. For the remaining queueing characteristics obvious plug-in estimators are used. The reason therefor is that a closed form of the push-forward law under the mapping (λ, G(⋅)) ↦ f (⋅), where f ∈ {n, g, q}, of the prior ΠBS⊗Γ is not easy to obtain. Neither is known how to update such a pushed prior by exchangeable data (S, A)n1 which we have access to in a natural Bayesian way. However, the goodness of these estimates in a rigorous mathematical sense is established in the next sections. 12 4 Consistency Results Posterior consistency provides a tool for validation of Bayesian procedures. Roughly speaking, it is defined to be the property of the posterior law to center around the true parameter when the number of observed data increases. As a consequence of posterior consistency two different priors will asymptotically lead to the same prediction, a fact often called merging of prior opinions. So, prior information is consecutively washed away by the new state of information provided by the data. Posterior consistency is the most desired property of Bayesian procedures since it states that one can recover the true measure that generates the data. For examples of inconsistent Bayes procedures see e.g. Diaconis and Freedman (1986) and Kim and Lee (2001) and references therein. We will have to deal with two different posterior consistency issues, a parametric one for the posterior of the arrival rate and a non-parametric one for the service time distribution and values depending on it. The first was considered by Doob (1949) in a rather general way by the use of martingale theory. It clarifies that, under very weak constraints (the state- and the parameter spaces are assumed to be Polish spaces and the likelihood is identifiable), there is a subset of the parameter space with full prior mass such that the sequence of posterior laws is consistent at any parameter of that subset that is taken as the true one. However, one problem is that in high-dimensional parameter spaces the set with full prior mass might become topologically small. Therefore, especially nonparametric Bayesian statistical problems deserve a deeper study of posterior consistency since the set of possible likelihoods can not longer be assumed to be parametrized finitely. First of all, the definition of posterior consistency in a rather general framework is given as it can be found e.g. in Schervish (1995). Notice that for any Polish state space S the space of all probability measures, P(S), can be equipped with the topology induced by weak convergence which has neighborhood bases for P ∈ P(S) given by the collection of sets of the form UP ; = {Q ∈ P(R) ∶ ∣∫ fi dP − ∫ fi dQ∣ < , fi ∈ Cb (R), for all i = 1, .., k}. This topology makes P(S) itself a Polish space [see Kechris (1995)] and the topology can be metrized e.g. by the Prohorov metric. The Borel σ-field, B(P), with respect to the weak topology serves as a natural measure-theoretical structure to turn P(S) into a measurable space (P(S), B(P)). B(P) turns out to be the smallest σ-field on P(S) that makes the mappings P ↦ P (A) (B(P), B([0, 1]))-measurable for all A ∈ B(S). In the sequel Π, occasionally with an appropriate index, shall denote a prior distribution and Πn the corresponding posterior distribution after having seen the first n projections of the exchangeable data. A distribution (or a value that parametrizes a distribution) indexed by 0 will always denote the true data generating measure. Definition 1. Let Π ∈ P(P(R)) be a prior distribution, i.e. the distribution of some random probability measure P ∈ P(R) and let X1∞ be a sequence of exchangeable data which is conditionally i.i.d. given P . Moreover, let P0 ∈ P(R) be the true data generating distribution and (Πn )n≥0 = (Π(⋅∣X1n ))n≥0 be the sequence of posterior laws. Then call (Πn )n≥0 weakly consistent at P0 if for all weak neighborhoods UP0 , of P0 it holds n→∞ Πn (UP0 , ) Ð→ 1, for P0∞ -almost all data sequences X1∞ . 13 Here, P0∞ denotes the true joint law governing the sequence X1∞ . Needless to say that in the case of the arrival rate λ things become easier because, due to the additional judgment concerning the symmetry of the distribution of the exchangeable sequence of inter-arrival times, one can reduce the problem to that of parametric consistency that is rather easy to handle by conjugacy. Proposition 4.1. Let ΠΓ stand for the Gamma prior of the random arrival rate λ and (ΠΓ;n (⋅))n≥1 = (ΠΓ (⋅∣An1 ))n≥1 be the sequence of posterior laws. Then, for all  > 0 and for Pλ∞0 almost all sequences A∞ 1 it holds n→∞ ΠΓ;n (∣λ − λ0 ∣ < ) Ð→ 1. Proof. Taking into account that the gamma prior is conjugate for exponentially distributed data, the posterior density can be shown to be that of a Γ(a + n, b + ∑ni=1 Ai ) distribution. By well known properties of the Gamma distribution one has EΓ;n [λ] = (a + n)(b + ∑ni=1 Ai )−1 and VarΓ;n [λ] = (a + n) (b + ∑ni=1 Ai )−2 . Applying the continuous mapping theorem the assertion follows from the strong law of large numbers and the Markov inequality. Let us now turn to the nonparametric part concerning the random c.d.f. G. The following two results are due to Dey et al. (2003) and give the consistency of the Bayes estimator and the random c.d.f. G. Lemma 4.2 (Dey et al. (2003)). Let G0 ∈ F(R+ ) be the true c.d.f. of the service times. Furthermore suppose that G0 is continuous and that G0 (t) < 1 for all t ∈ R+ . Let G ∼ BS(c, H) and ΠBS;n denote the posterior distribution of G. Then, for G∞ 0 -almost all sequences of data S1∞ and all t ∈ R+ it holds n→∞ EBS;n [G(t)] Ð→ G0 (t). Next, the posterior consistency of the random service time distribution G induced by a beta-Stacy prior will be stated. Since the service time distribution function G(⋅) is seen to be a random function rather than a random variable, we investigate deviations in the sup-norm. Theorem 4.3 (Dey et al. (2003)). Let G0 ∈ F(R+ ) be the true c.d.f. of the service times. Again, suppose that G0 is continuous and that G0 (t) < 1 for all t ∈ R+ . Let G ∼ BS(c, H) and ΠBS;n denote the posterior distribution of G. Then, for all  > 0 it holds n→∞ ΠBS;n ( sup ∣G(t) − G0 (t)∣ < ) Ð→ 1 0≤t<∞ for G∞ 0 -almost all sequences S1∞ . Remark 1. We stress some peculiarity of a certain class of neutral to the right measures. For a full formal treatment see Dey et al. (2003). As already mentioned in the previous section, neighborhoods w.r.t. the sup-norm contain some weak neighborhoods. These, in turn, are given as finite intersections of sets of the form {G ∶ ∣G(t) − G0 (t)∣ < γ}. Thus, it is enough to show that the posterior mass of such sets converges to one. But since the Lévy measure that corresponds to the beta-Stacy prior is of the form L(dt, ds) = a(t, s)dsK(dt) for suitable a and K, the convergence of the expected value of the posterior law to the true c.d.f. already ensures that the posterior variance vanishes with increasing data size. 14 As an immediate consequence one has the uniform consistency of the Bayes estimator. Corollary 4.4. Let the conditions of Lemma 4.2 be fulfilled. Then the Bayes estimate EBS;n [G(⋅)] of the service time distribution is uniformly consistent at the true continuous service time distribution G0 (⋅), that is n→∞ sup ∣EBS;n [G(t)] − G0 (t)∣ Ð→ 0, 0≤t<∞ ∞ for G∞ 0 -almost all sequences S1 . Proof. By above theorem one has RRR RRR R RRR sup ∣EBS;n [G(t)] − G0 (t)∣ = sup RRR∫ (G(t) − G0 (t)) ΠBS;n (dG)RRRRR RRR 0≤t<∞ 0≤t<∞ RR RRF R ≤ sup ∣G(t) − G0 (t)∣ ΠBS;n (dG) ∫ {G∶sup∣G(t)−G0 (t)∣≥} 0≤t<∞ + sup ∣G(t) − G0 (t)∣ ΠBS;n (dG) ∫ {G∶sup∣G(t)−G0 (t)∣<} 0≤t<∞ n→∞ < ΠBS;n ( sup ∣G(t) − G0 (t)∣ ≥ ) +  Ð→ . 0≤t<∞ Since  > 0 can be chosen arbitrarily small, the proof is completed and the assertion follows. The next lemma establishes the uniform consistency on R+ of the service time LST in posterior law. Proposition 4.5. Let g(z) = ∫ e−sz dG(s) denote the LST of the random service time distribution G possessing a beta-Stacy process prior and g0 (z) = ∫ e−sz dG0 (s) the LST of the corresponding true data generating distribution. Then, if the constraints of Theorem 4.3 are fulfilled, it holds n→∞ ΠBS;n ( sup ∣g(z) − g0 (z)∣ < ) Ð→ 1, 0≤z<∞ ∞ for all  > 0 and for G∞ 0 -almost all data sequences S1 . Proof. The assertion of the proposition follows from Theorem 4.3 and the continuous mapping theorem applied to the mapping G(⋅) ↦ g(⋅) which is continuous w.r.t. the sup-norm. Indeed, take a δ > 0 and let UG0 ,δ be a uniform δ-neighborhood of the true service time distribution and let G ∈ UG0 ,δ with corresponding LST g. Then, by integration by parts of the Riemann- 15 Stieltjes integral it holds that sup ∣g(z) − g0 (z)∣ = sup ∣∫ 0≤z<∞ 0≤z<∞ ∞ 0 e−sz [G − G0 ](ds)∣ = sup ∣[e−sz [G(s) − G0 (s)]∣s=∞ − [e−sz [G(s) − G0 (s)]∣s=0 − ∫ 0 0≤z<∞ ∞ = sup ∣∫ 0≤z<∞ ≤ sup ∫ 0≤z<∞ 0 ∞ 0 < δ sup ∫ [G(s) − G0 (s)]de−zs ∣ = sup ∣∫ 0≤z<∞ ∞ 0 ∞ [G(s) − G0 (s)]de−zs ∣ [G(s) − G0 (s)]ze−zs ds∣ ze−zs ∣G(s) − G0 (s)∣ ds ∞ ze−zs ds = δ, 0 0≤z<∞ which completes the proof and shows the claim. Next, the consistency of the estimator gn∗ (z) of the LST of the service time distribution is studied. On basis of the previous result, the following lemma establishes the uniform consistency on R+ of the estimator gn∗ (z). Lemma 4.6. Let gn∗ (⋅), g0 (⋅) as above. Then, under the constraints of Theorem 4.3, it holds sup ∣gn∗ (z) − g0 (z)∣ Ð→ 0, n→∞ 0≤z<∞ ∞ for G∞ 0 -almost all sequences of data S1 . Proof. Let  > 0 be arbitrary and let Ĝn (⋅) ∶= EBS;n [G(⋅)]. Then by properties of the RiemannStieltjes integral, one has sup ∣gn∗ (z) − g0 (z)∣ 0≤z<∞ ∞ = sup ∣∫ 0≤z<∞ 0 = sup ∣ [e e−zs dĜn (s) − ∫ ∞ 0 −zs Ĝn (s)]∣ s=∞ 0≤z<∞ − [e −zs e−zs dG0 (s)∣ s=0 −zs − [e = sup ∣∫ 0≤z<∞ 0 = sup ∣∫ 0≤z<∞ ∞ 0 ∞ Ĝn (s)d(e −sz ∞ Ĝn (s)]∣ ∞ )−∫ 0 −∫ 0 Ĝn (s)de−zs G0 (s)]∣s=∞ + [e−zs G0 (s)]∣s=0 + ∫ 0 −sz G0 (s)d(e ∞ G0 (s)de−zs ∣ )∣ [Ĝn (s) − G0 (s)]ze−zs ds∣ < sup ∣Ĝn (s) − G0 (s)∣ . 0≤s<∞ Hence, the assertion follows from Corollary 4.4 and the proof is completed. ∞ Since the Bayesian estimate of the random mean of G, i.e. EBS;n [∫0 tdG(t)], is used to define estimators of several queueing characteristics, its posterior consistency is examined next. For the most prominent prior process, namely the Dirichlet process a rather general result is known. This is reviewed briefly. So, let P ∼ Dα be a random probability measure 16 that is distributed according to a Dirichlet prior with finite measure α as parameter. Let f ∶ S → R be measurable. Then [c.f. Feigin and Tweedie (1989)] ∫ ∣f ∣ dα < ∞ ⇒ ∫ ∣f ∣ dP < ∞ with Dα probability one and EDα [∫ f dP ] = ∫ f dEDα [P ] = ∫ f dα. This fact in combination with an assumption that the state space is countable makes it easy to show that posterior consistency of the random measure P induces posterior consistency of the random mean of P . However, here neither the state space is assumed to be countable nor the random measure is assumed to possess a Dirichlet prior. Thus the posterior consistency of the random mean of G which is drawn according to a beta-Stacy process is studied in more depth and an affirmative result is given. Lemma 4.7. Suppose G(⋅) is drawn according to a beta-Stacy process with parameters (α, β), where α is a measure on R+ and β(s) ≥ 1 such that (1.) ∫R+ [β(s)]−1 α(ds) = ∞ (2.) ∫R+ exp [− ∫0 [β(s)]−1 α(ds)] dt < ∞. t Then the posterior expectation of the random mean of G converges G∞ 0 -a.s. to the true one. ∞ it holds -almost all sequences of data X That is for G∞ 1 0 EBS;n [∫ tdG(t)] ∶= EBS [∫ R+ R+ n→∞ tdG(t)∣X1n ] Ð→ ∫ tdG0 (t). R+ Proof. First of all note that, due to Epifani et al. (2003), the first moment of the random mean under the prior does exist and is given as ∞ EBS;n [∫ tdG(t)] = ∫ exp [− ∫ R+ 0 t 0 ⎡ ⎤ ⎢ α(ds) β(Xi ) + Mn (Xi ) − 1 ⎥⎥ ⎢ ]×⎢ ∏ ⎥ dt, β(s) + Mn (s) ⎢{i∶Xi ≤t} β(Xi ) + Mn (Xi ) ⎥ ⎣ ⎦ where Mn (s) = ∑nj=1 δXj [s, ∞). Thus, letting Nn (s) = ∑ni=1 δXi [0, s), one obtains EBS;n [∫ ∞ tdG(t)] R+ t = ∫ exp [− ∫ 0 0 t β(s) + Mn (s) α(ds) ] exp [− ∫ log ( ) dNn (s)] dt. β(s) + Mn (s) β(s) + Mn (s) − 1 0 Since β(s) ≥ 1, by elementary properties of the logarithm, it follows 1 β(s) + Mn (s) 1 ≤ log ( )≤ , β(s) + Mn (s) β(s) + Mn (s) − 1 β(s) + Mn (s) − 1 which in turn implies ∞ t ∫ exp [− ∫ 0 0 tdG(t)] ≤ EBS;n [∫ ∞ R+ ≤ ∫ exp [− ∫ 0 t Nn (ds) α(ds) ] × exp [− ∫ ] dt β(s) + Mn (s) 0 β(s) + Mn (s) − 1 t 0 α(ds) + Nn (ds) ] dt. β(s) + Mn (s) 17 such that it remains to show that the bounding terms converge to the mean of the true c.d.f.. From a straight-forward application of the monotone convergence theorem and by continuity of the exponential function, it follows ∞ lim EBS;n [∫ n→∞ R+ ∞ t = ∫ exp [− ∫ 0 0 lim 0 n→∞ 0 1/nNn (ds) ] dt 1/nβ(s) + 1/nMn (s) G0 (ds) ] dt. 1 − G0 (s) G0 (ds) 1−G0 (s) Now, note that t tdG(t)] = ∫ exp [− ∫ = λ(s)ds = P(s < S ≤ s + ∆s∣S > s), where λ(s) = lim∆s→0 t t G (ds) P(s<S≤s+∆s) ∆s[1−G0 (s)] 0 is the cumulative usually denotes the hazard function. Hence Λ(t) = ∫0 λ(s)ds = ∫0 1−G 0 (s) hazard until t ≥ 0. On the other hand Λ(t) = − log(1 − G0 (t)). Thus, t exp [− ∫ 0 t G0 (ds) ] = exp [− ∫ λ(s)ds] = exp [−Λ(t)] = exp [log(1 − G0 (t))] = 1 − G0 (t), 1 − G0 (s) 0 which in turn completes the proof. The next lemma establishes the contraction of the mass of the posterior law of the random mean. Lemma 4.8. If, in addition to the assumptions of the previous lemma, the parameter (α, β) meets the condition √ ∫ exp [− ∫ R+ t [β(s)]−1 α(ds)] dt < ∞ 0 then the posterior variance of the random mean ∫ tG(dt) vanishes G∞ 0 -a.s. as the size of the ∞ ∞ data increases. That is, for G0 -almost all sequences of data X1 it holds VBS;n [∫ R+ n→∞ tG(dt)] ∶= VBS [∫ R+ tG(dt)∣X1n ] Ð→ 0. Proof. Due to Lemma 4.7 and the continuous mapping theorem the claim follows if the second moment of the random mean under the posterior converges a.s. to the square of the mean of the true distribution function G0 (⋅). From Epifani et al. (2003) the second moment under the prior law exists and the second moment under the posterior law of the random mean is given 18 by ∞ EBS;n [(∫ 2 tdG(t)) ] 0 ∞ ∞ s α(dx) α(dx) ] exp [− ∫ ] β(x) + Mn (x) + 1 0 β(x) + Mn (x) r = 2 ∫ ∫ exp [− ∫ 0 r 0 × ∞ r = 2 ∫ exp [− ∫ 0 0 ⎛ β(Xj ) + Mn (Xj ) − 1 ⎞ β(Xi ) + Mn (Xi ) ⎞ ⎛ dsdr ∏ ∏ ⎝{i∶Xi ≤r} β(Xi ) + Mn (Xi ) + 1 ⎠ ⎝{j∶Xj ≤s} β(Xj ) + Mn (Xj ) ⎠ r α(dx) β(x) + Mn (x) ] exp [− ∫ log ( ) dNn (x)] β(x) + Mn (x) + 1 β(x) + Mn (x) + 1 0 ∞ s ∫ exp [− ∫ r 0 s α(dy) β(y) + Mn (y) ] exp [− ∫ log ( ) dNn (y)] dsdr β(y) + Mn (y) β(y) + Mn (y) − 1 0 Hence, by similar arguments as in the proof of the previous lemma and using Fubini’s theorem, it follows that for G∞ 0 −almost all sequences of data ∞ EBS;n [(∫ 0 2 ∞ n→∞ r tdG(t)) ] Ð→ 2 ∫ exp [− ∫ 0 0 ∞ s dG (y) dG0 (x) 0 ] ∫ exp [− ∫ ] dsdr 1 − G0 (x) 0 1 − G0 (y) r ∞ ∞ r = 2 ∫ ∫ exp [− ∫ 0 0 r s dG (y) dG0 (x) 0 ] exp [− ∫ ] dsdr. 1 − G0 (x) 0 1 − G0 (y) (#) Furthermore, a straight-forward application of Fubini’s theorem yields ∞ ∞ ∞ s ∫ ∫ g(r, s)drds = ∫ ∫ g(r, s)dsdr, 0 0 r 0 where g is an arbitrary integrable function g ∶ [0, ∞)2 → R+ . Now, let f (r, s) denote the integrand of the last integral of equation (#). Since f is symmetric, i.e. f (r, s) = f (s, r), it follows from above equality and further application of Fubini’s theorem ∞ ∞ ∞ ∞ ∞ s 2 ∫ ∫ f (r, s)dsdr = ∫ ∫ f (r, s)drds + ∫ ∫ f (r, s)dsdr r ∞ r 0 0 0 ∞ ∞ r ∞ ∞ 0 = ∫ ∫ f (s, r)dsdr + ∫ ∫ f (r, s)dsdr = ∫ ∫ f (r, s)drds. 0 0 0 r 0 0 Therefore, ∞ EBS;n [(∫ 0 2 n→∞ tdG(t)) ] Ð→ (∫ 0 ∞ 2 tdG0 (t)) , which completes the proof of the assertion. 19 Theorem 4.9. Under the assumptions of Lemma 4.7 and Lemma 4.8 the mean of the random c.d.f. G possesses the property of posterior consistency. That is for all  > 0 and G∞ 0 -almost all sequences of data it holds ΠBS (∣∫ n→∞ tG(dt) − ∫ R+ R+ tG0 (dt)∣ > ∣X1n ) Ð→ 0. Proof. This is a direct consequence of the two previous lemmas and the Markov inequality. Remark 2. A brief discussion of the assumptions of above lemmas and theorem, respectively, is given. Assumption (1.) of Lemma 4.7 is an artifact of survival analysis and ensures that the prior (α, β), that is to be chosen, actually leads to a cumulative hazard function. Assumption (2.) of the first lemma and the additional assumption of the second lemma, respectively, ensures the existence of the first, resp. second, moment of the posterior distribution of the random mean. These conditions are given in Epifani et al. (2003) Proposition 4. Moreover, this work extends results which concern the existence of certain random functionals w.r.t. to a random c.d.f. drawn according to a NTR prior. Those results can be understood as a generalization of a work by Feigin and Tweedie (1989) which gives conditions under which certain functionals of a random measure drawn according to a Dirichlet prior exist in terms of the base measure (the prior parameter). At this place it should be emphasized that they investigated this problem by creating a new approach to the Dirichlet process which is often not mentioned in the literature. To be more precise, they show that the Dirichlet process can be extracted as the invariant distribution of a measure-valued Markov chain and exploit this theory to show sufficiency of the conditions of their existence theorem. Since Dirichlet priors are as well included in the family of NTR priors the extension by Epifani et al. seems natural. The last assumption, i.e. that β(s) ≥ 1 ensures posterior consistency of the random mean of the c.d.f. governed by the beta-Stacy prior and is used in the proofs of both lemmas. Hence, a prior for the random c.d.f. G is to be chosen, in terms of its parameter, such that the sequence of posteriors of the G-mean is consistent as long as this property is desired. It is interesting to see how advanced information on the posterior consistency of the random mean influences the prior knowledge of the random c.d.f. itself. To put it another way, information concerning the posterior consistency of the random mean is indeed prior information on G. However, the other way around is not true in general, i.e. posterior consistency of the random c.d.f. does not generally imply posterior consistency of the random mean. That is because this functional is not continuous. However, posterior consistency of G implies that of its truncated mean. That means integration is restricted to a compact set and would lead to a weaker form of consistency in the sense of compact convergence. As an immediate consequence of the previous results one obtains the consistency of the traffic intensity of the M /G/1 queue. Corollary 4.10. Let µ ∶= ∫ sG(ds), µ0 ∶= ∫ sG0 (ds) be the random and true mean of the service-time distribution and ρ0 = λ0 µ0 the true traffic intensity. Further, let ΠBS⊗Γ = ΠBS ⊗ ΠΓ be the prior on (P(R+ ), R+ ) that is formed by taking the product-measure of ΠBS and ΠΓ , ΠBS⊗Γ;n the posterior, respectively, and define λ̂n ∶= Eλ;n [λ] ∶= EΓ [λ∣An1 ], µ̂n ∶= ∞ ∞ EBS;n [∫0 tdG(t)] ∶= EBS [∫0 tdG(t)∣S1n ] and ρ̂n ∶= EBS⊗Γ;n [ρ] ∶= EBS⊗Γ [ρ∣An1 , S1n ]. Then, under the assumptions of Proposition 4.1 and Theorem 4.9, one has 20 (i) for all  > 0 n→∞ ΠBS⊗Γ (∣ρ − ρ0 ∣ ≥ ∣S1n , An1 ) Ð→ 0, ∞ ∞ for Pλ∞0 ⊗ G∞ 0 -almost all data sequences (A1 , S1 ), (ii) n→∞ ∣ρ̂n − ρ0 ∣ Ð→ 0, ∞ ∞ for Pλ∞0 ⊗ G∞ 0 -almost all data sequences (A1 , S1 ). Proof. (i) Recalling the posterior consistency of the arrival rate λ in Proposition 4.1 and the service rate µ in Theorem 4.9 one has ΠBS⊗Γ;n (∣ρ − ρ0 ∣ ≥ ) = ΠBS⊗Γ;n (∣µλ − µλ0 + µλ0 − λ0 µ0 ∣ ≥ ) ≤ ΠBS⊗Γ;n (∣µλ − µλ0 ∣ + ∣µλ0 − λ0 µ0 ∣ ≥ ) ≤ ΠBS⊗Γ;n (∣µλ − µλ0 ∣ ≥ /2) + ΠBS⊗Γ;n (∣µ − µ0 ∣ ≥  ) 2λ0 ≤ ΠBS⊗Γ;n ((µ0 + δ)∣λ − λ0 ∣ ≥ /2, ∣µ − µ0 ∣ < δ) + ΠBS;n (∣µ − µ0 ∣ ≥ δ) + ΠBS;n (∣µ − µ0 ∣ ≥ ≤ ΠΓ;n (∣λ − λ0 ∣ ≥  2(µ0 + δ)  ) 2λ0 ) + ΠBS;n (∣µ − µ0 ∣ ≥ δ) + ΠBS;n (∣µ − µ0 ∣ ≥  ), 2λ0 from which the assertion of (i) follows. (ii) Straightforward one has a.s. ∣ρ̂n − ρ0 ∣ ≤ ∣µ̂n λ0 − µ̂n λ̂n ∣ + λ0 ∣µ̂n − µ0 ∣ ≤ (µ0 + γ)∣λ0 − λ̂n ∣ + λ0 ∣µ̂n − µ0 ∣ by selecting γ > 0 such that a.s. ∣µ̂n − µ0 ∣ < γ, for all n sufficiently large. The assertion of (ii) then follows from the proof of Proposition 4.1 and Lemma 4.7 completing the proof. We are now in a position to state the main theorem of this section, i.e. the consistency of the estimators for the waiting time LST, the queue length p.g.f. and the system size p.g.f., defined in section 3.3. Theorem 4.11. Under the assumptions of Proposition 4.1, Proposition 4.5 and Theorem 4.9 one has (i) for all  > 0 n→∞ ΠBS⊗Γ ( sup ∣f (z) − f0 (z)∣ ≥ ∣S1n , An1 ) Ð→ 0. 0≤z<∞ (ii) sup ∣fn∗ (z) − f0 (z)∣ Ð→ 0, n→∞ 0≤z<∞ for Pλ∞0 ∞ ∞ ⊗ G∞ 0 -almost all data sequences (A1 , S1 ), where f (⋅) ∈ {n(⋅), q(⋅), w(⋅)}. 21 Proof. We show the result for f = w, that is in the case of the p.g.f. of the waiting-time distribution. The other cases are treated similarly and we omit the details. We intent to apply the continuous mapping theorem. Therefor note that the mapping (g(⋅), λ, µ) ↦ w(⋅) is continuous with respect to the suitable topologies induced by the sup-norm. Hence, the assertion of the theorem is implied by the results of the present section. We shall stress that above theorem is important, especially for applications, since it states that one can reduce the difficult task of making Bayesian inference for queueing characteristics to that of making inference for the observables separately in order to compose it subsequently to that of the objects of interest. Qualitatively this will lead to reasonable asymptotic inference. This is appreciable because it is a non-feasible task to place a prior on the distributions of aforementioned characteristics in a way that it can be updated with data given by observations that we have access to. 22 5 Posterior Normality Asymptotic normality results, so called Bernstein-von Mises theorems, for the posterior law serve as an additional validation of Bayesian procedures. Especially in situations where the exact posterior law is not available or hard to compute they are useful from a rather applied viewpoint to get an approximation of the posterior law. While the previous section has shown that the posterior concentrates around the true value when data increases, normality results give an idea how, asymptotically speaking, it does concentrate and how fluctuations around this centering appear. Often it is true that the posterior law, if centered and rescaled appropriately, resembles a centered Gaussian distribution with a certain covariance structure. For applications, special interest lies in this limiting covariance structure. The earliest result dates back to de Laplace (1774) who approximates the posterior of a beta distribution by a normal integral. Sergei Bernstein and Richard von Mises gave a rather modern version of this approach by applying a general result about infinite products of functions to the sequence of posterior densities, see e.g. Johnson (1967) for a review and references. These approaches of expanding posterior densities coined the name. Nowadays, the parametric case is well understood and results including centering with the MLE or the Bayes estimate as well can be found in Schervish (1995) or Ghosh and Ramamoorthi (2003). However, the results needed for an asymptotic behavior of the posterior of infinite-dimensional parameters, i.e. in the nonparametric case, go deeper and deserve separate investigation. Posterior normality results involving Dirichlet process priors or NTR processes can be found in Conti (1999) who employs a result by Freedman (1963) on asymptotic normality in the finitedimensional case. We use a general result by Kim and Lee (2004) on the asymptotic normality of NTR processes to obtain the asymptotic behavior of the posterior law of the waiting time LST. This result is stated next. For the sake of clarity, it is stated for the non-censored case. However, it can be enlarged to the situation where data is right-censored. For a positive real number τ let (D[0, τ ], ∥⋅∥τ ) denote the space of all cadlag functions on [0, τ ] equipped with the sup-norm and L[X] the law of a random object X. Theorem 5.1 (Kim and Lee (2004)). Suppose that G(⋅) = 1 − exp[A(⋅)] is a random c.d.f. drawn according to a NTR prior Π with corresponding increasing additive process A(⋅) whose Lévy measure L is given by t L([0, t], B) = ∫ ∫ 0 B gs (x) dxλ(s)ds, x 1 where ∫0 gt (x)dx = 1 for all t ∈ R+ . Let the true c.d.f. G0 be continuous and such that G0 (t) < 1 for all t ∈ R+ . Moreover let the following conditions be fulfilled for a τ > 0, • sup (1 − x)gt (x) < ∞, t∈[0,τ ],x∈[0,1] • there is a function q(t) ∶ R+ → R such that 0 < inf q(t) < sup q(t) < ∞ and, for some t∈[0,τ ] 23 t∈[0,τ ] α > 1/2 and  > 0, sup t∈[0,τ ],x∈[0,] ∣ gt (x) − q(t) ∣ < ∞, xα • λ(t) is bounded and positive on (0, ∞). ∞ Then it holds that for G∞ 0 -almost all sequences of data S1 √ lim Π ( n[G(⋅) − EΠ;n [G(⋅)]]∣S1n ) = L[A(⋅)] n→∞ weakly on (D[0, τ ], ∥⋅∥τ ), where A(⋅) denotes a centered Gaussian process given by A(t) = (G0 (t) − 1)W (A0 (t)) with a Brownian motion W. The covariance structure then is h(u, v) ∶= Cov[A(u), A(v)] = (1 − G0 (u))(1 − G0 (v))min(A0 (u), A0 (v)). Proof. See Kim and Lee (2004) for the proof as well as for a discussion of the constraints of the theorem. Above theorem can well be stated as follows. The posterior distribution of the scaled and centered random process looks more and more like a Gaussian process as the sample size increases. The limiting process is centered, i.e. the expectation function is the constant function taking only the value zero. Next result ensures that above assertions hold for betaStacy processes. Corollary 5.2 (Kim and Lee (2004)). The assertion of Theorem 5.1 for the random c.d.f. G holds, with G being governed by a beta-Stacy process prior with parameters (c(⋅), H(⋅)), where H is a continuous distribution function with continuous density a with respect to the Lebesgue measure such that 0 < inf t c(t)[1 − H(t)] < supt c(t)[1 − H(t)] < ∞, i.e. for G∞ 0 -almost all sequences of data S1∞ it holds √ lim ΠBS;n ( n[G(⋅) − Ĝn (⋅)]) = L[A(⋅)] n→∞ weakly on (D(1) [0, ∞), ∥⋅∥∞ ) with A(⋅) as in Theorem 5.1, where D(1) [0, ∞) denotes the space of cadlag functions bounded by one on [0, ∞). Proof. By Theorem 5 of Dey et al. (2003), a beta-Stacy process is a transformed beta process. More precisely, a process Λ is a beta-Stacy process with parameters (c(⋅), H(⋅)) if and only ⋅ dH(s) if it is a beta process with parameters (c(⋅)[1 − H(⋅)], ∫0 1−H(s) ). Further on, Kim and Lee (2004) showed that a beta process fulfills the constraints of the theorem as long as positive and continuous on R+ and c(t)[1 − H(t)] is as required. a(s) 1−H(s) is Next, we turn to the asymptotic behavior of the LST g of the service time distribution G and its random mean µ ∶= ∫ xdG(x). Since a plug-in estimator for g is employed, we will use the functional delta method to provide the asymptotic normality result. Recall that in the previous section a posterior consistency result was given for the random mean µ, i.e. it was shown that the posterior law of µ centers a.s. around its true value µ0 ∶= ∫ xG0 (x). This suggests the conjecture that a normality result might be present in this case as well. However, even if Regazzini et al. (2003) provide results to approximate the density of the random mean of random measures, we were not able to show the density in our case to be approximated 24 by a normal density if the sample size increases. The main reason for this is that it does not seem to be straight-forward to obtain a suitable expansion of this approximated density. Hence, in the following we make the rather technical assumption that there is prior knowledge of the kind that service times can not exceed a certain sufficiently large threshold M ∈ R+ . From a practical point of view this is a rather gentle constraint. Let FM ∶= FM (R+ ) ∶= {F ∈ F(R+ ) ∶ F (t) = 1, ∀t ≥ M } be the space of all c.d.f.’s whose corresponding probability measure has support [0, M ]. Since it is well known that the prior guess on the c.d.f. G under a beta-Stacy prior BS(c, H) is given as EBS;n [G] = H, in the following we take H ∈ FM such that H is continuous on [0, M ]. Recall that G(⋅) = 1 − exp[−A(⋅)], where A is a non-negative increasing additive process with Lévy measure t dx −xc(s)[1−H(s)] dNt (x) = c(s)H(ds). ∫ e 1 − e−x 0 From the theory of increasing additive processes it is well known [see e.g. Sato (1999)] that for all t > 0 A(t) = At is a random variable governed by a infinitely divisible distribution φt . Let φ̂t (ξ) denote the characteristic function of φ, i.e. φ̂t (ξ) = ∫ exp[iξs]φ(ds) = exp [− ∫ ∞ 0 (1 − eiξx )dNt (x)] . Furthermore, since (At ) has independent increments one has φ̂t (ξ) = φ̂s (ξ)φ̂s,t (ξ) for all s < t, where φ̂s,t (ξ) denotes the characteristic function of the difference At − As . Now, since H ∈ FM it follows for t > M, φ̂t (ξ) = exp [− ∫ = exp [− ∫ ∞ 0 ∞ 0 (1 − eiξx ) dNt (x)] = exp [− ∫ ∞ 0 t 1 − eiξx −xc(s)[1−H(s)] c(s)H(ds)dx] ∫ e −x 1−e 0 iξx M 1−e e−xc(s)[1−H(s)] c(s)H(ds)dx] ∫ −x 1−e 0 ⋅ exp [− ∫ 0 ∞ t 1 − eiξx −xc(s)[1−H(s)] c(s)H(ds)dx] ∫ e −x 1−e M = φ̂M (ξ), the process (At )t≥M is a.s. constant. That implies that the corresponding c.d.f. G is constant from M onwards. In order to ensure that it is indeed a distribution function, we set G(t) ∶= 1, (M ) for all t ≥ M . The support of the truncated prior ΠBS law will still be all of FM . In order to achieve a posterior normality result for the random LST g, we show that the ∞ mapping Φ ∶ D(1) [0, M ] → C (1) [0, ∞); G ↦ ∫0 e−sz dG(s) is Hadamard differentiable, where D(1) [0, M ] and C (1) [0, ∞) denote the space of cadlag and continuous functions, bounded by one, respectively. Moreover, since we are solely interested in distribution functions on R+ , w.l.o.g. it is assumed that D(1) [0, M ] consists only of functions starting at zero. For a good reference on Hadamard differentiability and applications including the functional delta method see Kosorok (2008). 25 Lemma 5.3. The mapping Φ ∶ (D(1) [0, M ], ∥.∥M ) → (C (1) [0, ∞), ∥.∥∞ ) M G ↦ Φ[G](●) ∶= ∫ e−●s G(ds) 0 is Hadamard differentiable. t↘0 Proof. Let t ↘ 0 and ht ∈ D(1) [0, M ], such that ht Ð→ h ∈ D(1) [0, M ] w.r.t. the sup-norm. Then, by properties of the Riemann-Stieltjes integral, one has ∥ M Φ[G + tht ](z) − Φ[G](z) −∫ e−zs dh(s)∥ t 0 ∞ M [ht (s) − h(s)](−z)e−zs ds∣ M ( sup ∣ht (x) − h(x)∣) (−z)e−zs ds∣ = sup ∣∫ 0≤z<∞ 0 ≤ sup ∣∫ 0≤z<∞ 0 0≤x<M M ≤ ∥ht − h∥M sup ∫ 0≤z<∞ t↘0 ze−zs ds 0 = ∥ht − h∥M Ð→ 0. Define Φ′G ∶ D(1) [0, M ] → C (1) [0, ∞) M h ↦ Φ′G [h](z) = ∫ e−zs dh(s). 0 Since the Riemann-Stieltjes integral is linear in the integrator, the mapping Φ′G is linear. Moreover, if sup ∣F (s) − G(s)∣ < δ, it follows 0≤s<M RRR RRR M M M RRR RRR −zs −zs RRR∫ e dF (s) − ∫ e dG(s)RRR ≤ ∥F − G∥M sup ∫ ze−zs ds < δ, RRR RRR 0≤z<∞ 0 0 R R0 ′ thus the continuity of ΦG . Hence the mapping Φ is Hadamard differentiable with derivative Φ′G . Now, the lemma will be applied in combination with the functional delta method to obtain the posterior normality of the service time LST centered suitably at its respective Bayes (M ) estimator. Write ΠBS;n for the posterior law induced by the M -truncated beta-Stacy process. Corollary 5.4. Let gn∗M (z) = ∫0 e−zs dEBS;n [G](s). Under the assumptions of Theorem 5.1 ∞ and Corollary 5.2, it holds for G∞ 0 -almost all sequences S1 (M ) √ lim ΠBS;n ( n [g(⋅) − gn∗M (⋅)]) = L[G(⋅)] M n→∞ on C (1) ([0, ∞), ∣∣.∣∣∞ ), where G(z) is a centered Gaussian process with covariance structure γ(⋅, ⋅) given by M γ(u, v) = Cov [G(u), G(v)] = uv ∫ 0 M ∫ e−(us+vt) h(u, v)dudv, 0 where h(⋅, ⋅) is defined in Theorem 5.1. 26 Proof. By the functional delta method applied to the mapping in the previous lemma one has G(z) = Φ′G [(G0 (⋅) − 1)W (A0 (⋅))] (z) = ∫ M 0 e−zs d [(G0 (s) − 1)W (A0 (s)] . Using a Riemann sum approximation for above integral, one concludes that the process G(⋅) is a Gaussian process. Further, by well-known properties of the Riemann-Stieltjes integral, one gets M G(z) = z ∫ 0 (1 − G0 (s))W (A0 (s)) e−sz ds. Using Fubini’s theorem it is immediately seen that E[G(z)] = 0 for any z ∈ R+ . Again using Fubini’s theorem, the covariance structure of G(⋅) is obtained as Cov [G(u), G(v)] = E [G(u)G(v)] M = uvE [∫ 0 M = uv ∫ 0 M ∫ 0 0 M = uv ∫ 0 M ∫ M ∫ (1 − G0 (s))W (A0 (s))e−us (1 − G0 (t))W (A0 (t))e−vt dsdt] e−(us+vt) (1 − G0 (s))(1 − G0 (t))E [W (A0 (s))W (A0 (t))] dsdt e−(us+vt) h(s, t)dsdt. 0 Next, we investigate the posterior normality of the mean of the random c.d.f. G. Since M no exact results seem obtainable, we use the plug-in estimator µ∗n ∶= ∫0 [1 − EBS;n [G(t)]]dt M which, in general, does not equal EBS;n [∫0 [1 − G(t)]dt]. This estimator in combination with the M -truncated c.d.f.’s enables us to use the functional delta method for obtaining normality results. Lemma 5.5. Let M be an arbitrary positive real number. Then, the mapping Ψ ∶ (FM , ∥⋅∥M ) → ([0, M ], ∣⋅∣) M G ↦ Ψ[G] ∶= ∫ [1 − G(s)]ds 0 is Hadamard-differentiable with derivative Ψ′ [h] = − ∫0 h(s)ds. M t↘0 Proof. Take t ↘ 0 and ht ∈ FM , such that ht Ð→ h ∈ FM . Then ∣ M M Ψ[G + tht ] − Ψ[G] t↘0 +∫ h(s)ds∣ = ∣∫ h(s) − ht (s)ds∣ ≤ M ∥h − ht ∥M Ð→ 0. t 0 0 Obviously, the derivative of Ψ is linear and continuous w.r.t. to the considered topologies. Corollary 5.6. Under the assumptions of Theorem 5.1 and Corollary 5.2 it holds for G∞ 0 almost all data S1∞ that (M ) √ lim ΠBS;n ( n[µ − µ∗n ]) = L[H], n→∞ M M where H is a centered Gaussian random variable with variance η ∶= Var[H] = ∫0 ∫0 h(s, t)dsdt. 27 Proof. By the previous lemma and the functional delta method the limiting variable is given by M Ψ′ [(G0 (⋅) − 1)W (A0 (⋅))] = ∫0 (1 − G0 (s))W (A0 (s))ds which is seen to be centered Gaussian by a Riemann sum approximation in combination with Fubini’s theorem. Moreover, again by Fubini’ theorem Var[H] = E [H2 ] = E [∫ M =∫ 0 M 0 M ∫ 0 (1 − G0 (s))W (A0 (s))(1 − G0 (t))W (A0 (t))dsdt] M ∫ h(s, t)dsdt. 0 Next we consider the asymptotic normality of the arrival-rate when centering with its Bayes estimate. Proposition 5.7. Let λ̂n ∶= EΓ;n [λ]. Then, for Pλ∞0 -almost all sequences of data A∞ 1 one has √ lim ΠΓ ( n [λ − λ̂n ] ∣An1 ) = N , n→∞ where N is a centered Gaussian random variable with precision λ20 . Proof. By Theorem 1.4.3. in Ghosh and Ramamoorthi (2003) the convergence of the posterior √ distribution of n [λ − λ̂n ] to a centered normal distribution directly follows. Moreover, the variance of this limiting Gaussian variable is given by the inverse Fisher information at the true arrival rate. Checking the necessary conditions for interchanging integral and derivative is left to the interested reader. The Fisher information is obtained as I(λ0 ) = Eλ0 [( 2 ∂ ∂2 = λ−2 log (λe−λA )) ] = −Eλ0 [ 2 [log(λ) − λA]] 0 . ∂λ ∂λ ∣λ=λ 0 We are now in a position to formulate the posterior normality of the waiting-time LST. However, the same techniques can be applied to show posterior normality of several other queueing characteristics like e.g. for the queue length p.g.f. or the sojourn time LST. The waiting-time distribution is of special interest since it gives a qualitative idea about the loss of information that can occur in a M /G/1 system and thus helps to ensure a well-working system. However, since the exact posterior law of the waiting time distribution is not obtainable in closed form, asymptotic approximations are given. These results extend results of the previous section where it was shown that the plug-in estimator is reasonable to make inference. Roughly, we prove that the posterior law of the LST follows, asymptotically speaking, a Gaussian (M ) quantity that is centered around the plug-in estimator. Let ΠBS⊗Γ = ΠBS ⊗ ΠΓ denote the prior on the parameter space R+ × FM . z(1−ρ) z−λ(1−g(z)) z(1−λ̂n µ∗n ) ∗M (z)) z−λ̂n (1−gn Theorem 5.8. Let w(z) = be the LST of the waiting time distribution as given in section 2 and wn∗M (z) = be its plug-in estimator. Then, under the assumptions ∞ ∞ of Theorem 5.1 and Corollary 5.2, for G∞ 0 ⊗ Pλ0 -almost all sequences of data (S, A)1 it holds that √ lim ΠBS⊗Γ ( n [w(⋅) − wn∗M (⋅)] ∣An1 , S1n ) = L[Z(⋅)] n→∞ 28 weakly on C([0, ∞), ∣∣.∣∣∞ ), where Z(⋅) is a centered Gaussian process with covariance structure ζ(u, v) = Cov[Z(u), Z(v)] given by ζ(u, v) = µ20 w0 (u)w0 (v) 2 w0 (u)(1 − g0 (u)) w0 (v)(1 − g0 (v)) [λ η + × ] + λ−2 0 0 2 2 (1 − ρ0 ) λ0 (1 − g0 (u)) − u λ0 (1 − g0 (v)) − v λ0 w0 (u)w0 (v)λ20 γ(u, v) [λ0 (1 − g0 (u)) − u] [λ0 (1 − g0 (v)) − v] µ0 w0 (u)w0 (v) w0 (u)(1 − g0 (u)) w0 (v)(1 − g0 (v)) − [ + ] [λ0 (1 − ρ0 )]2 u v ⎡ ⎤ ⎥ λ0 w0 (u)w0 (v) ⎢⎢ −us −tv ⎥, w (u) e h(s, t)d(s, t) + w (v) e h(s, t)d(s, t) − 0 0 ∫ ∫ ⎢ ⎥ 2 (1 − ρ0 ) ⎢ ⎥ ⎣ ⎦ [0,M ]2 [0,M ]2 + where γ(⋅, ⋅) is given in Corollary 5.4. Proof. Taking a similar route of proving as in the proof of Theorem 3 in Conti (1999), we √ begin with a decomposition of n [w(z) − wn∗M (z)]. The decomposition yields √ −w(z) √ n [w(z) − wn∗M (z)] = n [λµ − λ̂n µ∗n ] 1−ρ √ 1 1 + z(1 − λ̂n µ∗n ) n [ ] − z − λ(1 − g(z)) z − λ̂n (1 − g(z)) √ 1 1 ) + z(1 − λ̂n µ∗n ) n ( − z − λ̂n (1 − g(z)) z − λ̂n (1 − gn∗M (z)) =∶ Z1;n (z) + Z2;n (z) + Z3;n (z) Now, the three terms of the sum are investigated separately and it will be shown that they possess the same asymptotic distribution as objects whose asymptotic is easier to obtain. These objects will be tagged by an additional ∗ superscript. First write Z1;n (z) = −w(z) √ n [µ∗n (λ − λ̂n ) + (µ − µ∗n )(λ − λ0 ) + λ0 (µ − µ∗n )] 1−ρ and note that by the uniform posterior consistency results of the previous section and the M continuity of the mapping G ↦ ∫0 (1 − G(s))ds one has lim ΠBS⊗Γ [Z1;n (z)∣An1 , S1n ] = lim ΠBS⊗Γ [ n→∞ =∶ n→∞ ∗ lim ΠBS⊗Γ [Z1;n (z)∣An1 , S1n ] n→∞ −w0 (z) √ n(µ0 (λ − λ̂n ) + λ0 (µ − µ∗n ))∣An1 , S1n ] 1 − ρ0 =∶ L[Z1 (z)]. For Z2;n (z), note that the mapping λ ↦ [z − λ(1 − g(z))]−1 is analytic in a suitably chosen neighborhood of λ0 . Its derivative is given by λ↦ 1 − g(z) [z − λ(1 − g(z))]2 . 29 Thus, a Taylor expansion of that mapping yields Z2;n (z) = (1 − λ̂n µ∗n )z 1 − g(z) √ 2 n (λ − λ̂n ) , [z − λ̄(1 − g(z))] for a suitably chosen λ̄ ∈ [λ0 , λ̂n ]. Therefore, using consistency results and continuous mapping, one gets lim ΠBS⊗Γ [Z2;n (z)∣S1n , An1 ] = lim ΠΓ [(1 − ρ0 )z n→∞ n→∞ 1 − g0 (z) [z − λ0 (1 − g0 (z))] √ 2 n (λ − λ̂n ) ∣An1 ] ∗ ∣An1 ] =∶ L[Z2 (z)]. =∶ lim ΠΓ [Z2;n n→∞ −1 Another Taylor expansion for the mapping x ↦ [z − λ̂n (1 − x)] as before yields (M ) lim ΠBS⊗Γ [Z3;n (z)∣S1n , An1 ] = lim ΠBS [− n→∞ n→∞ and analogous reasoning √ w0 (z)λ0 n [g(z) − gn∗M (z)] ∣S1n ] λ0 (1 − g0 (z)) − z (M ) ∗ ∣S1n ] =∶ L[Z3 (z)]. =∶ lim ΠBS [Z3;n n→∞ Now, the convergence of the posterior law of the waiting time LST follows from the previous results of the present section. What remains is the calculation of the covariance structure. This, in turn, is easily obtained by above decomposition and the assumed independence of the arrivals and services or their prior laws, respectively. 3 3 3 Cov [∑ Zi (u), ∑ Zi (v)] = ∑ Cov [Zi (u), Zi (v)] + ∑ Cov [Zi (u), Zj (v)] i=1 i=1 i=1 i≠j 3 = ∑ Cov [Zi (u), Zi (v)] i=1 + Cov [Z1 (u), Z2 (v)] + Cov [Z2 (u), Z1 (v)] + Cov [Z1 (u), Z3 (v)] + Cov [Z3 (u), Z1 (v)] By the previous results of this section it follows 3 µ20 w0 (u)w0 (v) 2 [λ η + ] 0 (1 − ρ0 )2 λ20 w0 (u)(1 − g0 (u)) w0 (v)(1 − g0 (v)) + λ−2 × 0 λ0 (1 − g0 (u)) − u λ0 (1 − g0 (v)) − v w0 (u)w0 (v)λ20 + γ(u, v). [λ0 (1 − g0 (u)) − u] [λ0 (1 − g0 (v)) − v] ∑ Cov [Zi (u), Zi (v)] = i=1 Furthermore, by the independence assumption of the prior laws of the inter-arrival rate and the service time distribution, one has Cov [Z1 (u), Z2 (v)] = µ0 w0 (u)w0 (v)(g0 (v) − 1) × . v − λ0 (1 − g0 (v)) λ20 (1 − ρ0 ) 30 has Furthermore, using the previous results of the present section and Fubini’s theorem, one w0 (u)w0 (v)λ20 E[H × G(v)] (1 − ρ0 )(λ0 (1 − g0 (v)) − v) w0 (u)w0 (v)λ20 = (1 − ρ0 )(λ0 (1 − g0 (v)) − v) Cov [Z1 (u), Z3 (v)] = M × E [∫ 0 M (1 − G0 (s))W (A0 (s))ds × v ∫ 0 (G0 (t) − 1)W (A0 (t))e−tv dt] M M vw0 (u)w0 (v)λ20 = e−tv h(s, t)dsdt ∫ ∫ (1 − ρ0 )(λ0 (1 − g0 (v)) − v) 0 0 w0 (u)w0 (v) 2 e−tv h(s, t)d(s, t). λ w0 (v) ∫ =− (1 − ρ0 )2 0 [0,M ]2 Finally, compounding above covariance structures yields ζ(⋅, ⋅). The covariance structure ζ(⋅, ⋅) depends on the unknown objects. However, one can use the suggested estimators and plug them in place of the true ones. This might be helpful to implement the problem and the provided consistency results ensure accuracy as long as the sample size is large enough. 31 Funding: This work was supported by the Deutsche Forschungsgemeinschaft (German Research Foundation) within the programme "Statistical Modeling of Complex Systems and Processes—Advanced Nonparametric Approaches", grant GRK 1953. Corresponding Author Dr. Cornelia Wichelhaus Technische Universität Darmstadt Schlossgartenstraße 7 64289 Darmstadt Germany [email protected] Moritz von Rohrscheidt Ruprecht-Karls Universität Heidelberg Berliner Straße 41-49 69120 Heidelberg Germany [email protected] 32 References Armero, C. and M. Bayarri 1994. Prior Assessments for Prediction in Queues. The Statistician, Pp. 139–153. Armero, C. and D. Conesa 1998. Inference and Prediction in Bulk Arrival Queues and Queues with Service in Stages. Applied Stochastic Models and Data Analysis, 14(1):35–46. Armero, C. and D. Conesa 2004. Statistical Performance of a Multiclass Bulk Production Queueing System. European Journal of Operational Research, 158(3):649–661. Armero, C. and D. Conesa 2006. Bayesian Hierarchical Models in Manufacturing Bulk Service Queues. Journal of Statistical Planning and Inference, 136(2):335–354. Asmussen, S. 2008. Applied Probability and Queues, volume 51. Springer Science & Business Media. Ausín, M. C., R. E. Lillo, and M. P. Wiper 2004. Bayesian estimation for the M/G/1 queue using a phase-type approximation. Journal of Statistical Planning and Inference, 118(1):83–101. Ausín, M. C., R. E. Lillo, and M. P. Wiper 2007. Bayesian Control of the Number of Servers in a GI/M/c Queueing System. Journal of Statistical Planning and Inference, 137(10):3043–3057. Ausín, M. C., R. E. Lillo, and M. P. Wiper 2008. Bayesian Prediction of the Transient Behaviour and Busy Period in short-and longtailed GI/G/1 Queueing Systems. Computational Statistics & Data Analysis, 52(3):1615– 1635. Conti, P. L. 1999. Large Sample Bayesian analysis for Geo/G/1 discrete-time Queueing Models. The Annals of Statistics, Pp. 1785–1807. De Finetti, B. 1974. Theory of Probability, volume 1. Wiley New York. de Laplace, P. 1774. Mémoire sur les suites récurro-récurrentes et sur leurs usages dans la théorie des hasards. Mém. Acad. Roy. Sci. Paris, 6:353–371. Dey, J., R. Erickson, and R. Ramamoorthi 2003. Some Aspects of neutral-to-right Priors. International Statistical Review, 71(2):383– 401. Diaconis, P. and D. Freedman 1986. On the Consistency of Bayes Estimates. The Annals of Statistics, Pp. 1–26. 33 Diaconis, P. and D. Ylvisaker 1985. Quantifying Prior Opinion. Bayesian Statistics, 2:133–156. Doksum, K. 1974. Tailfree and Neutral Random Probabilities and their Posterior Distributions. The Annals of Probability, Pp. 183–201. Doob, J. L. 1949. Application of the Theory of Martingales. Le calcul des probabilites et ses applications, Pp. 23–27. Epifani, I., A. Lijoi, and I. Prünster 2003. Exponential Functionals and Means of neutral-to-the-right Priors. 90(4):791–808. Biometrika, Feigin, P. D. and R. L. Tweedie 1989. Linear Functionals and Markov Chains associated with Dirichlet Processes. 105(03):579–585. Ferguson, T. S. 1973. A Bayesian Analysis of some Nonparametric Problems. The Annals of Statistics, Pp. 209–230. Freedman, D. A. 1963. On the Asymptotic Behavior of Bayes’ Estimates in the Discrete Case. The Annals of Mathematical Statistics, Pp. 1386–1403. Ghosh, J. K. and R. Ramamoorthi 2003. Bayesian Nonparametrics. Springer Series in Statistics. Gill, R. D. and S. Johansen 1990. A survey of Product-Integration with a View toward Application in Survival Analysis. The Annals of Statistics, Pp. 1501–1555. Grübel, R. and S. M. Pitts 1992. A Functional Approach to the Stationary Waiting Time and Idle Period Distributions of the GI/G/1 Queue. The Annals of Probability, Pp. 1754–1778. Haigh, J. 2004. Probability Models. Springer Science & Business Media. Hewitt, E. and L. J. Savage 1955. Symmetric Measures on Cartesian Products. Transactions of the American Mathematical Society, 80(2):470–501. Hjort, N. L. 1990. Nonparametric Bayes Estimators based on Beta Processes in Models for Life History Data. The Annals of Statistics, Pp. 1259–1294. Insua, D. R., M. Wiper, and F. Ruggeri 1998. Bayesian Analysis of M/Er/1 and M/H_k/1 Queues. Queueing Systems, 30(3-4):289– 308. 34 Johnson, R. A. 1967. An Asymptotic Expansion for Posterior Distributions. The Annals of Mathematical Statistics, Pp. 1899–1906. Kechris, A. S. 1995. Classical Descriptive Set Theory. Springer. Kendall, D. G. 1953. Stochastic Processes occurring in the Theory of Queues and their Analysis by the Method of the imbedded Markov Chain. The Annals of Mathematical Statistics, Pp. 338– 354. Kim, Y. and J. Lee 2001. On Posterior Consistency of Survival Models. The Annals of Statistics, Pp. 666–686. Kim, Y. and J. Lee 2004. A Bernstein-von Mises Theorem in the Nonparametric Right-Censoring Model. The Annals of Statistics, Pp. 1492–1512. Kingman, J. F. 1978. Uses of Exchangeability. The Annals of Probability, Pp. 183–197. Kosorok, M. 2008. Introduction to Empirical Processes and Semiparametric Inference. Springer, New York. Nelson, R. 2013. Probability, Stochastic Processes, and Queueing Theory: the Mathematics of Computer Performance Modeling. Springer Science & Business Media. Phadia, E. G. 2015. Prior Processes and their Applications. Springer. Regazzini, E., A. Lijoi, and I. Prünster 2003. Distributional Results for Means of Normalized Random Measures with Independent Increments. The Annals of Statistics, Pp. 560–585. Sato, K. 1999. Lévy Processes and Infinitely Divisible Distributions. Schervish, M. J. 1995. Theory of Statistics. Springer Science & Business Media. Walker, S. and P. Muliere 1997. Beta-Stacy Processes and a Generalization of the Pólya-Urn Scheme. The Annals of Statistics, Pp. 1762–1780. Wiper, M. 1998. Bayesian Analysis of Er/M/1 and Er/M/c Queues. Journal of Statistical Planning and Inference, 69(1):65–79. 35
10math.ST
1 Summarization of User-Generated Sports Video by Using Deep Action Recognition Features arXiv:1709.08421v1 [cs.CV] 25 Sep 2017 Antonio Tejero-de-Pablos, Member, IEEE, Yuta Nakashima, Member, IEEE, Tomokazu Sato, Member, IEEE, Naokazu Yokoya, Life Senior Member, IEEE, Marko Linna, and Esa Rahtu Abstract—Automatically generating a summary of sports video poses the challenge of detecting interesting moments, or highlights, of a game. Traditional sports video summarization methods leverage editing conventions of broadcast sports video that facilitate the extraction of high-level semantics. However, usergenerated videos are not edited, and thus traditional methods are not suitable to generate a summary. In order to solve this problem, this work proposes a novel video summarization method that uses players’ actions as a cue to determine the highlights of the original video. A deep neural network-based approach is used to extract two types of action-related features and to classify video segments into interesting or uninteresting parts. The proposed method can be applied to any sports in which games consist of a succession of actions. Especially, this work considers the case of Kendo (Japanese fencing) as an example of a sport to evaluate the proposed method. The method is trained using Kendo videos with ground truth labels that indicate the video highlights. The labels are provided by annotators possessing different experience with respect to Kendo to demonstrate how the proposed method adapts to different needs. The performance of the proposed method is compared with several combinations of different features, and the results show that it outperforms previous summarization methods. Video summary Index Terms—Sports video summarization; user-generated video; action recognition; deep learning; 3D convolutional neural networks; long short-term memory. I. I NTRODUCTION T HE widespread availability of cameras has led to an enormous and ever-growing collection of unedited and unstructured videos generated by users around the world [1]. A popular domain corresponds to sports videos taken at public events and professional/amateur matches. These types of user-generated sports videos (UGSVs) are often lengthy with several uninteresting parts, and thus many of them are stored and are never reviewed. A convenient way to review, transfer, and share the video via channels, such as social network services, includes generating summaries of a UGSV that only shows the interesting parts or highlights. Automatic video summarization is a challenging problem that involves extracting semantics from video. Traditional usergenerated video summarization methods target general videos in which contents are not limited to a specific domain because of the difficulty in extracting semantics from an unstructured A. Tejero-de-Pablos, Y. Nakashima, T. Sato and N. Yokoya were with the Graduate School of Information Science, Nara Institute of Science and Technology, Nara, 630-0101 Japan. e-mail: [email protected]. M. Linna is with the Center for Machine Vision Research, University of Oulu, Oulu, 90014 Finland. E. Rahtu is with the Department of Signal Processing, Tampere University of Technology, Tampere, 33101 Finland Manuscript received July, 2017 Fig. 1. An overview of the proposed method to generate a summary of user-generated sports video (UGSV) based on players’ actions. Two types of features that represent players’ actions, namely body joint-based and holistic actions, are used to extract highlights from the original video. video. As opposed to extracting semantics, these methods use low-level visual features and attempt to reduce visual redundancy using clustering-based approaches [2]. More recent user-generated video summarization methods use deep neural network-based features to extract higher-level semantics [3]. With respect to sports video and especially with respect to professional sports in broadcast TV programs, there exist a number of summarization methods that leverage editing conventions to extract high-level semantics by exploiting a knowledge of the specific sport [4], [5]. For example, broadcast sports video contains slow-motion replays [6], narration and superimposed text [7], and specific camera work [8]. This type of video editing constitutes the basis for heuristic rules that aid in the determination of highlights (or certain interesting moments of a game such as a free kick in soccer or a pitch in baseball). Additionally, broadcast video is often edited by following the structure of the sport (i.e., “downs” 2 in American football), and this constitutes another cue for summarization [9]. UGSV lies in in-between general user-generated video and broadcast sports video. Given a specific sport, domain knowledge can be used to generate a UGSV summary. However, UGSV does not typically follow any editing convention or structure, and thus a different type of cues is required to grab the semantics. This paper describes a novel method for UGSV summarization. Our observation with respect to semantics extraction is that a game in most sports consists of a succession of players’ actions, and thus the actions can be one of the most important cues to determine if a certain part of video is interesting or not. For example, a definitive smash in tennis is more likely to be enjoyed by tennis viewers than a repetitive ball exchange. Also, a feint in boxing might not be interesting by itself, but viewers would surely enjoy it if it is followed by an uppercut that knocks out the opponent. Based on this observation, the proposed method uses players’ actions to model the highlights of a sports game (Fig. 1). Inspired by recent methods for action recognition in video, the proposed method uses a two-stream architecture that extracts two types of action features for action representation. One type involves players’ body joint positions estimated in 2D or 3D (obtainable from depth maps). Body joint-based features provide a precise representation of actions. The other type involves holistic features that can be obtained with deep convolutional neural networks (CNNs) designed to extract spatio-temporal features from video. Holistic features help to capture actions in their context. Subsequently, long short-term memory (LSTM) is used to model the temporal dependencies of the extracted features for highlight classification. In our summaries, a highlight may contain one or more actions performed by the players. Several types of body joint-based and holistic features are comparatively evaluated for UGSV summarization. We consider the case of Kendo (Japanese fencing) as an example of a sport to evaluate the proposed method. This work is an extension of our previous work in [10]. The main contributions of this work are as follows: • • • • A novel UGSV summarization method that determines highlights in a video by using players’ action features and a deep neural network. A comparison of several action feature extraction methods, i.e., body joint features (RGB image-based 2D joint positions and depth map-based 3D joint positions) and holistic features (C3D [11] and CNN-ISA [12]) to demonstrate their adequacy to model video highlights. A new UGSV dataset with 246 min of Kendo videos in which each second of a video has a label that indicates whether or not it is a part of a highlight. The labels were provided by annotators with and without experience in Kendo. Objective and subjective evaluations of the proposed method. Users with and without experience in Kendo were surveyed to investigate the adequacy of the proposed method with respect to individual needs. II. R ELATED WORK This section introduces existing video summarization methods in terms of the types of video (i.e., broadcast sports video and user-generated video). This section also reviews existing work in action recognition, which constitutes a key technique for modeling highlights in the proposed method. A. Action recognition from video Traditional approaches for action recognition use conventional classifiers and hand-crafted features that represent human movement in RGB video [13], [14], [15]. However, the field of action recognition recently benefits from deep neural networks for feature extraction and classification. An example corresponds to three-dimensional convolutional neural networks (3D CNNs) that constitute an extension of CNNs applied to images (2D CNNs). While 2D CNNs perform only spatial operations in a single image, 3D CNNs also perform temporal operations while preserving temporal dependencies among the input video frames [11]. Le et al. [12] used a 3D CNN with independent subspace analysis (CNN-ISA) and a support vector machine (SVM) to recognize human actions from video. Additionally, Tran et al. [11] designed a CNN called C3D to extract video features that were subsequently fed to an SVM for action recognition. Another state-of-the-art CNN-based action recognition method employed two types of streams, namely a spatial appearance stream and a temporal motion stream [16], [17]. Videos are decomposed into spatial and temporal components, i.e., into an RGB and optical flow representation of its frames, and fed into two separate 3D CNNs. Each stream separately provides a score for each possible action, and the scores from two streams were later combined to obtain a final decision. This architecture is supported by the two-stream hypothesis of neuroscience in which the human visual system is composed of two different streams in the brain, namely the dorsal stream (spatial awareness and guidance of actions) and the ventral stream (object recognition and form representation) [18]. In addition to RGB videos, other methods leverage depth maps obtained from commodity depth sensors (e.g. Microsoft Kinect) to estimate the human 3D pose for action recognition [19], [20], [21]. The third dimension provides robustness to occlusions and variations from the camera viewpoint. B. Broadcast sports video summarization Summarization of sports video focuses on extracting interesting moments (i.e., highlights) of a game. A major approach leverages editing conventions such as those present in broadcast TV programs. Editing conventions are common to almost all videos of a specific sport and allow automatic methods to extract high-level semantics [22], [23]. Ekin et al. [7] summarized broadcast soccer games by leveraging predefined camera angles in edited video to detect soccer field elements (e.g., goal posts). Similar work used slow-motion replays to determine key events in a game [6] and predefined camera motion patterns to find scenes in which players scored in basketball/soccer games [8]. 3 In addition to editing conventions, the structure of the sport also provides high-level semantics for summarization. Certain sports are structured in “plays” that are defined based on the rules of the sport and are often easily recognized in broadcast videos [4], [24], [25]. For example, Li et al. [9] summarized American football games by leveraging their turnbased structure and recognizing “down” scenes from the video. Other methods used metadata in sports videos [5], [26] since it contains high-level descriptions (e.g., “hits” may be annotated in the metadata with their timestamps for a baseball game). A downside of these methods is that they cannot be applied to sports video without any editing conventions, structures, and metadata. Furthermore, they are based on heuristics, and thus it is difficult to generalize them to different sports. Existing work also proposed several methods that are not based on heuristics. These methods leverage variations between scenes that are found in broadcast video (e.g., the closeup in a goal celebration in soccer). Chen et al. [27] detected intensity variations in color frames to segment relevant events to summarize broadcast videos of soccer, basketball, and tennis. Mendi et al. [28] detected the extrema in the optical flow of a video to extract the frames with the highest action content and construct a summary for broadcast rugby video. These methods can be more generally applied to broadcast videos, but they lack high-level semantics, and thus the extracted scenes do not always correspond to the highlights of the game. C. User-generated video summarization Sports video includes a somewhat universal criterion on the extent to which a “play” is interesting (e.g., a homerun in a baseball game should be an interesting play for most viewers). In contrast, user-generated video in general do not have a clear and universal criterion to identify interesting moments. Additionally, neither editing conventions nor specific structures that can be used to grab high-level semantics can be leveraged [29]. Hence, many video summarization methods for user-generated video are designed to reduce the redundancy of a lengthy original video as opposed to determining interesting moments. Traditional methods uniformly sample frames [30] or cluster them based on low-level features, such as color [2], to extract a brief synopsis of a lengthy video. These methods do not extract highlights of the video, and therefore researchers proposed other types of summarization criteria such as important objects [31], attention [32], [33], and interestingness [34]. Recent methods use deep neural networks to automatically learn a criterion to model highlights. Yang et al. [35] extracted features from ground-truth video summaries to train a model for highlight detection. Otani et al. [36] use a set of both original videos and their textual summaries that are generated via majority voting by multiple annotators to train a model to find video highlights. Video titles [37] and descriptions [3] can also be used to learn a criterion to generate summaries. The aforementioned methods employed networks with CNNs and LSTMs, and this requires a large amount of data for training. The generation of these types of large summarization datasets for training their network is non-viable for most researchers, and thus their models are built on pre-trained networks such as VGG [38] and GoogLeNet [39]. III. UGSV SUMMARIZATION USING ACTION FEATURES UGSV summarization inherits the intricacies of usergenerated video summarization. The extraction of high-level semantics is not trivial in the absence of editing conventions. However, given a specific sport, it is possible to leverage domain knowledge to facilitate the extraction of high-level semantics. The idea in the present work for semantics extraction involves utilizing players’ actions, as they are the main constituents of a game. Our previous work [10] applied an action recognition technique to sports videos to determine combinations of actions that interest viewers by using a hidden Markov model with Gaussian Mixture emissions. To the best of our knowledge, this work was the first to use a UGSV summarization based on players’ actions. A major drawback of the previous work [10] involves the usage of the outputs of a classic action recognizer as features to determine the highlights of the UGSV. Moreover, in addition to the UGSV summarization dataset, the method also requires an action dataset of the sport to train the action recognizer. Another drawback of [10] is that it only uses features from 3D joint positions (that are estimated by, e.g., [40]). They provide rich information on players’ actions but miss other potential cues for summarization contained in the appearance of the scene. For example, appearance is useful when the joint position estimation fails. In this work, the method in [10] is extended by employing a two-stream deep neural network [16], [17]. Our new method considers two different types of inputs, namely RGB frames of video and body joint positions, and each of them are transformed through two separate neural networks (i.e., streams). These two streams are then fused to form a single action representation to determine the highlights. Our method does not require an action recognizer; and the proposed network is trained from the lower layer to the top layers by using a UGSV summarization dataset. Given the proposed method, it is necessary for the target sports to satisfy the following conditions: (1) a game consists of a series of recognizable actions performed by each player and (2) players are recorded from a close distance for joint position estimation. However, it is expected that the idea of using action recognition-related features for UGSV summarization is still valid for most types of sports. A. Overview In this work, UGSV summarization is formulated as a problem of classifying a video segment in the original video as interesting (and thus included in the summary) or uninteresting. A two-stream neural network is designed for this problem, and it is trained in a supervised manner with ground truth labels provided by multiple annotators. Figure 1 shows an overview of the proposed method. The method first divides the original input video into a set S = {st } of video segments in which RGB frames can be accompanied by their corresponding depth maps. A video segment st is then fed into the two-stream network. The body joint-based feature stream considers RGB frames (and depth maps) in st to obtain body joint-based features xt , and the 4 ... Time Fig. 2. In the video segmentation, a video segment st contains frames inbetween t − 1 and t + 2 sec. Each video segment overlaps with adjacent ones for 2 sec. holistic feature stream computes holistic features yt from the RGB frames. The former stream captures the players’ motion in detail by explicitly estimating their body joint positions. The latter stream represents entire frames in the video segment, and this is helpful to encode, for example, the relationship between the players. The features X = {xt } and Y = {yt } are then used for highlight classification by considering the temporal dependencies among the video segments. The highlight summaries correspond to a concatenation of the segments that are classified as interesting. B. Video segmentation Various methods have been proposed to segment a video (e.g., its content [27]). In the proposed method, the original input video of length T seconds (sec) is uniformly segmented into multiple overlapping segments, so that subsequently a second t of video can be represented by extracting action features from a video segment st , i.e., S = {st |t = 1, . . . , T }. Thus, T also corresponds to the number of video segments in S, and st corresponds to the video segment that contains frames from sec t − 1 to sec t + τ − 1. For a finer labeling of highlights, short video segments are required. We choose a τ = 3, for which adjacent video segments overlap by 2 sec as shown in Fig. 2. Each segment st may contain a different number of frames, especially when the input video is captured with an RGB-D camera (e.g., Microsoft Kinect) due to automatic exposure control. C. Body joint-based feature stream In this stream (Fig. 3), a sequence of positions of the players’ body joints (e.g., head, elbow, etc.) that represent the movement of the players irrespective of their appearance is used to obtain a detailed representation of players’ actions. Specifically, two types of joint representations are employed in this work, namely 3D positions from depth maps or 2D positions from RGB frames. With respect to the 3D body joint positions, the skeleton tracker (e.g., [40]) is used as in the previous work [10], and it estimates 3D positions from depth maps. The 3D positions are usually represented in the camera coordinate system, and thus they are view-dependent, thereby introducing extra variations. Fig. 3. In the body joint-based feature stream, an LSTM is fed with the body joint positions estimated from players on each frame uft to model temporal dependencies and extract a feature vector ht . Additionally, these body joint positions are also used to calculate an activity measure for all players at . The body joint-based feature vector is their concatenation xt . Therefore, the 3D positions from the camera coordinate system are transformed to each player’s coordinate system in which the origin corresponds to one of the body joints (e.g., torso). In the absence of depth maps (which is likely in current user-generated video), 2D body joint positions can still be estimated from RGB frames. Recent methods in human pose estimation leverage 2D CNNs to learn spatial relationships among human body parts and estimate 2D joint positions [41]. These types of 2D positions are not as robust relative to view variations as 3D positions. However, they can be extracted from RGB frames alone without using depth maps. The given 2D body joint positions are also transformed to positions relative to the player’s coordinate system to ensure that they are translation invariant. The use of an activity measure works positively while extracting highlights [10]. In order to calculate the activity measure of a certain player q in the video segment s (we omit subscript t in this subsection for notation simplicity), the volume (or plane for the 2D case) around the player is divided into a certain number of regions, and the ratio rv of the number of frames in the video segment in which the joint j falls into region v is calculated. The activity measure aq is defined as the entropy obtained based on rv . With respect to each joint j in player q’s body, we compute the entropy as follows: X ej = − rv log(rv ). (1) v Then, we calculate the activity measure for player q as follows: aq = J X j=1 ej . (2) 5 The activity measure for all players in a segment is calculated. More details on the activity measure can be found in [10]. Let ufqj in R3 or R2 (a row vector) denote the 3D or 2D relative position of joint j of player q in frame f of video segment s. Subsequently, given the number of players Q and of estimated body joints J, the concatenation of the body joints of all players in frame f is defined as follows: uf = (uf11 · · · ufqj · · · ufQJ ). (3) As shown in Fig. 3, vectors u1 to uF are passed through an LSTM to model the temporal dependencies of the joint positions of players’ bodies in s. After feeding the last vector uF , the hidden state vector h of the LSTM is considered as a representation of {uf }. The state of the LSTM is reset to all zeros prior to feeding the next video segment. It is assumed that the number of players Q does not change. However, some players can be out of the field-of-view of the camera. In this case, the corresponding elements in u and a are substituted with zeros. The proposed method represents a video segment s by concatenating the LSTM output and the activity measure of all players in one vector as follows: Fig. 4. The recurrent neural network architecture for highlight classification consists of a single LSTM layer and several fully-connected layers. The body joint-based features xt and holistic features yt extracted from video segment st are input to calculate the probability pt that the segment is interesting. where a denotes the concatenation of (a1 · · · aQ ). This stream represents a video segment s by using a holistic feature vector y that corresponds to the output of one of the aforementioned 3D CNNs. D. Holistic feature stream E. Highlight classification using LSTM This stream encodes a video segment s in a spatio-temporal representation. We rely on state-of-the-art 3D CNNs over RGB frames. Training a 3D CNN from scratch requires thousands of videos [42] that are not available for the proposed task. Recent work on deep neural networks for computer vision [11], [17], [43] shows that the activations of an upper layer of a CNN are useful for other related tasks without requiring fine-tuning. Thus, 3D CNN in which parameters are pre-trained with largescale datasets can be used instead to leverage a huge amount of labeled training data [44]. The proposed method utilizes a 3D CNN for action feature extraction pre-trained with a publicly available action recognition dataset, such as Sports1M [42]. Unlike our previous work [10], which required to classify players’ actions, it is not necessary to use a sportspecific action recognition dataset. Two types of holistic representations of video segments extracted using 3D CNNs are employed, namely CNN-ISA [12] and C3D [11]. Specifically, CNN-ISA provides a representation robust to local translation (e.g., small variations in players’ or camera motion) while it is selective to frequency, rotation, and velocity of such motion. The details of CNNISA can be found in [12]. CNN-ISA achieved state-of-theart performance in well-known datasets for action recognition such as YouTube [45], Hollywood2 [46], and UCF sports [47]. Additionally, C3D features provide a representation of objects, scenes, and actions in a video. The network architecture and other details can be found in [11]. C3D pre-trained with the Sports-1M dataset achieved state-of-the-art performance on action recognition over the UCF101 dataset [48]. Figure 4 shows the network architecture designed to extract highlights of UGSV using the features xt and yt from video segment st . The temporal dependencies among video segments are modeled using an LSTM, and the network outputs the probability pt that the video segment st is interesting. First, the features are concatenated to form vector zt = (xt yt ). Vector zt then goes through a fully-connected layer to reduce its dimensionality. It is assumed that interesting video segments are related to each other in time, in the same way a skillful boxer first feints a punch prior to hitting to generate an opening in the defense. Existing work in video summarization uses LSTMs to extract video highlights [35] since it allows the modeling of temporal dependencies across longer time periods when compared to other methods [49]. Following this concept, an LSTM layer is introduced to the network for highlight classification. The hidden state of the LSTM from each time step goes through two fully-connected layers, and this results in a final softmax activation of two units corresponding to “interesting” and “uninteresting.” The proposed method provides control over the length L of the output summary. The softmax activation of the unit corresponding to “interesting” is considered as the probability pt ∈ [0, 1] that segment st is interesting, and skimming curve formulation [50] is applied to the sequence of probabilities by decreasing a threshold θ from 1 until a set of segments whose total length is highest below L is determined (Fig. 5). The segments in which the probability exceeds θ are concatenated to generate the output summary in the temporal order. Hence, x = (h a), (4) 6 Fig. 5. A summary is generated by concatenating segments in which the probability pt of being a highlight surpasses a certain threshold θ. The threshold is chosen to fit the summary length. the resulting summary may contain multiple consecutive interesting segments. F. Network training A pre-trained CNN is used in the holistic features stream (i.e., CNN-ISA or C3D) while the LSTMs and fully-connected layers are trained from scratch. Hence, during training, the parameters in the holistic feature stream (i.e., CNN layers) are fixed and those in the body joint-based feature stream (i.e., lstmJ ) and highlight classification (i.e., fc1, lstmH , fc2, and fc3) are updated. The UGSV dataset contains video and ground truth labels lt ∈ {0, 1} for every second, where lt = 1 implies that the period from t sec to t + 1 sec of the video is “interesting” and lt = 0 otherwise. Label lt is assigned to its corresponding video segment st . With respect to training, cross-entropy loss ` is used: X `= lt log pt . (5) IV. E XPERIMENTS The proposed method is evaluated objectively and subjectively. With respect to the objective evaluation, the performance of the proposed method is compared while using different representations of the players’ actions. Specifically, only body joint features (3D or 2D), only holistic motion features (CNN-ISA or C3D), and a combination of both features are evaluated. Subsequently, the completeness of the highlights of the generated summaries are examined. With respect to the subjective evaluation, users with and without experience in the sport are surveyed to study their opinions with respect to the summaries. A. Implementation details For the evaluation, Kendo (Japanese fencing) was selected as an example of a sport. Kendo is a martial art featuring two players and a set of recognizable actions (e.g., attacking and parrying). We used the UGSV Kendo dataset in [10], which contains 90 min of self-recorded Kendo matches divided in 10 RGB-D videos taken with a Microsoft Kinect v2, and extended it by adding 18 more self-recorded RGB-D Kendo videos. The total length of the videos is 246 min with a framerate of approximately 20 fps. The body joint-based feature stream was configured for Q = 2 players since Kendo is a two-player sport. The tracker in [40] was used to estimate J = 15 3D body joint positions from depth maps: head, neck, torso, right shoulder, right elbow, right wrist, left shoulder, left elbow, left wrist, right hip, right knee, right ankle, left hip, left knee, and left ankle. In order to estimate the 2D positions of the players’ joints from the RGB frames, the CNN-based method proposed by Linna et al. [51] was used. We pre-trained this joint estimation CNN with the human pose dataset used by Linna et al. [51], and then we fine-tuned it with our extended UGSV Kendo video dataset. The network provides J = 13 joints (that is the same as the 3D case with the exception of neck and torso). Therefore, the size of vector uft is Q×J ×3 = 90 in the case of 3D positions and Q × J × 2 = 52 in the case of 2D. Given that the size of lstmJ is the same as that of the input and that the size of at is Q = 2, the feature vector xt for the stream is ∈ R92 for 3D and ∈ R54 for 2D. With respect to the holistic feature stream, either the CNNISA [12] or C3D [11] networks were used. The UGSV Kendo dataset is not sufficiently large to train the CNNs from scratch, and thus networks pre-trained with an action recognition dataset were used. The CNN-ISA was trained in an unsupervised way with the Hollywood2 dataset that consists of 2859 videos [46]. For this network, we followed the configuration in [52]. We used a vector quantization representation of the extracted features with a codebook size of 400, thereby resulting in a feature vector yt ∈ R400 for each segment st . The C3D was trained with the Sports-1M dataset [42] that consisted of 1.1 million videos of sports activities. The C3D features were extracted as indicated in [11] by uniformly sub-sampling 16 frames out of approximately 60 frames in st (the number of frames in st may vary for different segments due to the variable framerate of Microsoft Kinect v2) and subsequently the activations from layer fc6 (i.e., yt ∈ R4096 ) were extracted. The proposed method was implemented in Chainer [53]. The learning rate was calculated by the adaptive moment estimation algorithm (Adam) [54] with α = 0.001. Sigmoid activation was introduced after the fully-connected layers. Table I summarizes the number of learnable parameters for each layer, which varies based on the choice of features. B. Results For annotating the ground truth, 15 participants were invited and divided into two groups, namely experienced (E, 5 people) and inexperienced (NE, 10 people), based on their experience in the target sport (i.e., Kendo). It was assumed that the highlights preferred by the E and NE groups would exhibit significant variations, and an aim of the study included evaluating the extent to which the proposed method adapts to the needs of each group. For this, the participants annotated manually the highlights of the 28 videos. The ground truth labels of the videos were separately obtained for both E and NE groups. With respect to each one-second period t of video, the ground truth label is lt = 1 if at least 40% of the participants annotated it as interesting (i.e., 2 people in group E and 4 people in 7 TABLE I S IZE OF THE LEARNABLE ELEMENTS IN THE NETWORK WITH RESPECT TO THE FEATURES USED (input × output). F EATURE VECTOR SIZES ARE DETAILED IN S ECTION IV-A) lstmJ fc1 lstmH fc2 fc3 Body 3D joints 90 × 90 92 × 50 50 × 50 50 × 20 20 × 2 joint-based features only 2D joints Action recognition 52 × 52 — 54 × 50 402 × 400 50 × 50 400 × 400 50 × 20 400 × 100 20×2 100 × 2 Holistic features only CNN-ISA C3D — — 400 × 400 4096 × 400 400 × 400 400 × 400 400 × 100 400 × 100 100 × 2 100 × 2 group NE). Otherwise, lt = 0. Due to group E’s technical knowledge of Kendo, their highlights contain very specific actions (e.g., decisive strikes and counterattacks). Conversely, group NE selected strikes as well as more general actions (e.g., parries and feints), and thus their labeled highlights are almost three times as long as group E’s (please refer to the durations in Appendix A). The network was separately trained with each group’s ground truth labels in the leave-one-out (LOO) fashion, i.e., 27 videos were used for training and a summary of the remaining video was generated for evaluation purposes. The CNN for 2D pose estimation was trained independently prior to each experiment, it was fine-tuned with the 27 training videos in order to estimate the joints of the video used for evaluation. This process was repeated for each video and for each group E and NE, to result in 28 experienced summaries and 28 inexperienced summaries. The generated summaries had the same length as their respective ground truth. Figure 5 illustrates a few examples of the frames of a video as well as highlight frames extracted by the proposed method (framed in orange). 1) Objective evaluation by segment f-score: The ability of the proposed method to extract highlights was evaluated in terms of the f-score. In the proposed method, a one-second period of video is as follows: • true positive (TP), if it is in the summary and lt = 1, • false positive (FP), if it is in the summary but lt = 0, • false negative (FN), if it is not in the summary but lt = 1, • true negative (TN), if it is not in the summary and lt = 0. The f-score is subsequently defined as follows: 2TP . (6) 2TP + FP + FN Table II shows the f-scores for the summaries generated with the labels of both E and NE groups. In addition to the features described in Section IV-A, it includes the results of using the features from our previous work in UGSV summarization [10]. The features were obtained by feeding the 3D body joint representation of players’ actions to the action recognition method in [55] and considering the action classification results. Additionally, the proposed architecture was also compared with that of the method used in the previous work [10] that uses a hidden Markov model with Gaussian mixture emission (GMM-HMM) over the same action recognition results mentioned above. Finally, the results of using k-means clustering are included, since k-means is widely accepted as a baseline for user-generated video summarization [56]. To f-score = Body joint-based and holistic features 3D joints + CNN-ISA 2D joints + CNN-ISA 90 × 90 52 × 52 492 × 400 454 × 400 400 × 400 400 × 400 400 × 100 400 × 100 100 × 2 100 × 2 TABLE II F- SCORE COMPARISON OF DIFFERENT COMBINATIONS OF FEATURES AND OTHER UGSV SUMMARIZATION METHODS . Method Body joint-based features Holistic features Body joint-based and holistic features Other UGSV summarization 3D joints 2D joints Action recognition [10] CNN-ISA C3D 3D joints + CNN-ISA 2D joints + CNN-ISA GMM-HMM [10] k-means clustering Group E 0.53 0.45 0.48 0.50 0.27 0.58 0.57 0.44 0.28 Group NE 0.83 0.77 0.76 0.79 0.60 0.85 0.81 0.79 0.61 implement the k-means clustering baseline, the video segments S were clustered based on the concatenated features 3D joints + CNN-ISA, and the summary was created by concatenating in time the cluster centroids. The number of clusters for each video were configured such that the resulting summary length is equal to that of the ground truth. With respect to using a single feature (i.e. 3D joins, 2D joints, CNN-ISA, C3D, or action recognition), 3D joints obtain the best performance. Although C3D features perform well in action recognition tasks [11], the results were significantly worse than that of other features in the summarization task. The dimensionality of the C3D features is significantly higher when compared to that of others, and thus the dataset may not be sufficient to train the network well. Fine-tuning C3D using the Kendo dataset might improve its performance. In contrast, CNN-ISA also uses RGB frames and obtains better results when compared to those of C3D and even 2D joints. This implies that it is also possible to obtain features from RGB frames that allow the modeling of UGSV highlights. The decrease in the performance of 2D joints with respect to 3D joints may indicate that view variations in the same pose negatively affect the body joint-based features stream. The action recognition feature had an intermediate performance. A potential reason is that the action recognition feature is based on a classic approach for classification, so useful cues contained in the 3D body joint positions degenerated in this process. From these results, the features that performed better for highlight classification correspond to CNN-ISA holistic features and 3D body joint-based features. Several state-of-the-art action recognition methods enjoy improvements in performance by combining handcrafted spatio-temporal features (e.g., dense trajectories) and those learned via CNNs [11], [17]. This is also true in the present 8 𝑐=70% 𝑐 =0% 𝑐 =100% Summary Ground truth Fig. 6. Association of highlights with respect to the greedy algorithm. Each highlight in the ground truth is uniquely associated to a highlight in the generated summary (two summary highlights cannot share the same ground truth highlight). The completeness of a summary highlight corresponds to the percentage of overlap with the ground truth (0% if unassociated). work where a combination of CNN-ISA with 3D joints achieves the best performance. The combination of CNNISA with 2D joints also provides a considerable boost in performance and especially for the experienced summaries. This supports our hypothesis that a two-streams architecture also provides better results for UGSV summarization. Finally, as shown in the lowest part of Table II, the results of the proposed method outperform the results of previous work, as well as those of the clustering-based baseline. While clustering allows a wider variety of scenes in the summary, this is not a good strategy for UGSV summarization that follows a different criterion based on interestingness. The proposed method also outperforms the previous work [10], which used the classification results of an action recognition method to train a GMM-HMM for highlight modeling. We can conclude that it is not necessary to explicitly recognize players’ actions for UGSV summarization, which may actually degrade performance when compared to that in the case of directly using action recognition features. 2) Objective evaluation by highlight completeness: A highlight may consist of consecutive video segments. Hence, although missing a segment may not significantly impact the f-score, it affects the continuity of the video, and thereby the comprehensibility and the user experience of the summary. Given this, a criterion is defined to evaluate the completeness c of an extracted highlights as the fraction of overlap between the extracted highlight and its associated ground truth highlights (Fig. 6). The association between extracted and ground truth highlights is not trivial, and it was performed by using a greedy algorithm in which the total c of all highlights is maximized. An extracted highlight is considered as a TP if its completeness c exceeds a certain percentage C%, and based on this, the precision and recall of the highlights are calculated as follows: precision = TP , TP + FP recall = TP . TP + FN (7) In the experiment, the threshold θ was varied from 0 to 1 over the probability p to generate the recall-precision curve of group E and NE. Figure 7 shows the curves produced for C = 50%, 70%, and 90%. We observe that reducing C to 50% significantly increases the number of complete highlights. The presence of incomplete highlights is attributed to the way highlights are extracted. First, the high p segments are extracted, and then the highlight is completed with low p segments as the threshold θ decreases (Fig. 8). However, prior to the completion of a Fig. 7. Recall-precision curves for different completeness values (up: labels E, down: labels NE). The gap between the curves C = 50% and C = 70% shows that a significant number of the highlights are missing for a maximum of half the interesting segments. highlight, high p segments from other highlights are extracted and, in a few cases, the low p segments are never extracted. Specifically, the parts before and after an interesting Kendo technique normally correspond to low p segments since they are not present in every ground truth highlight annotated by the participants. The reason for the increased number of incomplete segments (less TP) in the NE summaries is because the inexperienced group annotated a higher number of highlights. 3) Subjective evaluation: The same participants who annotated the original videos were asked to participate in a survey to assess their opinion on the ground truth and the generated summaries. The three videos with the highest, median and lowest f-scores (averaged over groups E and N E) were selected. With respect to each video, participants were shown the ground truth and the summaries generated with the best feature combination (i.e., 3D joints + CNN-ISA) using both group E and NE labels. As a result, each participant watched 12 videos (3 f-scores × 4 video types). The participants were asked to: • (Q1) assign a score in a Likert scale from 1 (very few highlights are interesting) to 5 (most highlights are interesting) based on their satisfaction with the contents of each of the 12 videos. • (Q2) state their opinion on the videos and the criteria followed while assigning a score. Table III shows the results of Q1 grouped by video type and video f-score. The scores are averaged for group E and NE 9 𝑝 𝑝 𝜃 Ground truth Time Fig. 8. Original length: 10 min 40 sec. Summary length: 1 min. The highlights summary is generated by applying a threshold θ to the probability of interestingness p. Video segments with higher p are extracted prior to segments with lower p, and thus in a few cases the beginning/end segments of the highlights are missing when compared to the ground truth. separately. In the context of Q1, with respect to the video type, both experienced and inexperienced participants assigned a higher score to the ground truth videos than to the generated summaries. This is because some of the summaries contain uninteresting video segments and also the completeness of the highlights is worse when compared to that of ground truth videos. The potential reasons as to why the ground truth videos did not obtain a perfect score are mainly attributed to the following two factors: (1) The ground truth summaries are created by combining labels from several participants via majority voting, and thus the original labels of each participant are lost. (2) The ground truth also contains incomplete highlights due to errors when the participants annotated the videos. Additionally, experienced participants preferred the NE ground truth to the E summaries plausibly because they do not find incomplete highlights interesting since context is missing. Conversely, inexperienced participants tend to appreciate the highlights from the experienced participants more than their own highlights. This is potentially because the highlights from the experienced participants are briefer and contain certain techniques (e.g. counterattacks) that make summaries more interesting when compared to those of the inexperienced participants. The results for Q1 in terms of the f-score type demonstrate the high correlation to the f-score (i.e., a video with a higher f-score tends to receive a higher subjective score). With respect to Q2, participants provided their opinion on the summaries. A few experienced participants found the highlights as too short and this even included complete highlights in the ground truth. This occurs because only the segments labeled as highlights by at least 40% of the participants (i.e., 2 people in group E and 4 people in group NE) were included in the ground truth, and thus some labeled segments were left out. Inexperienced participants state the usefulness of the proposed method to extract highlights based on interesting actions as well as time saved by watching the highlights as opposed to the whole video. In addition, for a few inexperienced participants incomplete highlights make the summaries difficult to follow. From this evaluation, we conclude that the labels from experienced users contain a better selection of Kendo techniques. Due to the negative impact of incomplete highlights on the summaries, it is necessary to consider extra temporal consistency in pt . Therefore, although combining the labels of several participants is convenient to generate the ground truth, the process introduces incomplete highlights (Section IV-B2) and alters personal preferences. Thus, instead of combining labels from different participants, another possibility is to create personalized summaries with a higher quality ground truth or to include user profiles such as that proposed in [5]. V. C ONCLUSION This paper has described a novel method for automatic summarization of UGSV, especially demonstrating the results for Kendo (Japanese fencing) videos. Given the lack of editing conventions that permit the use of heuristics, a different cue, i.e., players’ actions, is used to acquire high-level semantics from videos to generate a summary of highlights. The presented two-stream method combines body joint-based features and holistic features for highlights extraction. The best combination among the evaluated features corresponds to a combination of 3D body joint-based features and CNNISA features [12]). In contrast to the previous work [10], the results indicate that it is not necessary to explicitly recognize players’ actions in order to determine highlights. Alternatively, deep neural networks are leveraged to extract a feature representation of players’ actions and to model their temporal dependency. Specifically, LSTM is useful to model the temporal dependencies of the joint positions of players’ bodies in each video segment as well as the highlights in the entire video. In order to generate appealing summaries, players’ 3D body joint positions from depth maps offer the best performance. However, in the absence of depth maps, 2D body joint positions and holistic features extracted from RGB images are also used for summarization. The future work includes fine-tuning the proposed network to illustrate its potential performance and evaluating the method in the context of a wider variety of sports (e.g., boxing, fencing, and table tennis). 10 TABLE III S UBJECTIVE EVALUATION RESULTS WITH RESPECT TO THE VIDEO TYPE AND F - SCORE . E ACH CELL CONTAINS THE MEAN ± THE STANDARD DEVIATION OF SCORES . Group E Group NE Ground truth E 3.2±0.99 3.57±0.72 Video type Ground truth NE Summary E 3.07±1.04 2.6±1.23 3.5±1.07 3.2±0.83 ACKNOWLEDGMENT This work was supported in part by JSPS KAKENHI Grant Number 16K16086. A PPENDIX A Table IV lists the duration of the videos in the dataset used in the experiments and their respective ground truth highlights as annotated by users. TABLE IV D URATION OF THE VIDEO DATASET AND GROUND TRUTHS . ID #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 Total Original video 10 min 48 sec 5 min 10 sec 5 min 18 sec 9 min 37 sec 9 min 59 sec 10 min 5 sec 10 min 3 sec 10 min 10 sec 5 min 17 sec 5 min 14 sec 4 min 58 sec 20 min 40 sec 10 min 15 sec 10 min 16 sec 10 min 37 sec 10 min 37 sec 5 min 14 sec 5 min 4 sec 10 min 57 sec 5 min 36 sec 5 min 36 sec 10 min 48 sec 9 min 44 sec 10 min 23 sec 10 min 7 sec 10 min 40 sec 4 min 59 sec 8 min 13 sec 4 hours 6 min 11 sec Ground truth E 1 min 11 sec 49 sec 1 min 9 sec 1 min 37 sec 2 min 33 sec 1 min 28 sec 48 sec 45 sec 32 sec 22 sec 53 sec 1 min 24 sec 53 sec 58 sec 47 sec 34 sec 16 sec 32 sec 38 sec 27 sec 33 sec 58 sec 1 min 11 sec 54 sec 28 sec 49 sec 33 sec 47 sec 24 min 49 sec Ground truth NE 2 min 21 sec 1 min 7 sec 1 min 58 sec 2 min 17 sec 2 min 42 sec 2 min 55 sec 1 min 45 sec 2 min 14 sec 1 min 14 sec 1 min 30 sec 1 min 50 sec 4 min 14 sec 2 min 50 sec 5 min 8 sec 2 min 44 sec 2 min 21 sec 1 min 44 sec 2 min 21 sec 2 min 11 sec 1 min 21 sec 1 min 35 sec 1 min 59 sec 2 min 48 sec 2 min 25 sec 1 min 57 sec 2 min 5 sec 2 min 13 sec 2 min 10 sec 1 hour 3 min 59 sec R EFERENCES [1] Y. G. Jiang, Q. Dai, T. Mei, Y. Rui, and S. F. Chang, “Super fast event recognition in internet videos,” IEEE Transactions on Multimedia, vol. 17, no. 8, pp. 1174–1186, 2015. [2] R. W. Lienhart, “Dynamic video summarization of home video,” in Proc. SPIE Electronic Imaging, 1999, pp. 378–389. [3] M. Otani, Y. Nakashima, E. Rahtu, J. Heikkilä, and N. Yokoya, “Video summarization using deep semantic features,” in Proc. Asian Conference on Computer Vision, 2016, pp. 361–377. [4] W. Li, Z. Zhang, and Z. Liu, “Action recognition based on a bag of 3D points,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2010, pp. 9–14. [5] N. Nitta, Y. Takahashi, and N. Babaguchi, “Automatic personalized video abstraction for sports videos using metadata,” Multimedia Tools and Applications, vol. 41, no. 1, pp. 1–25, 2009. Summary NE 2.73±0.87 2.9±0.97 Highest 3.3±0.95 3.48±0.83 Video f-score Median Lowest 2.85±0.97 2.55±1.18 3.03±0.91 3.38±0.95 [6] H. Pan, P. Van-Beek, and M. I. Sezan, “Detection of slow-motion replay segments in sports video for highlights generation,” in Proc. IEEE International Conference on Acoustics, Speech, and Signal Processing, vol. 3, 2001, pp. 1649–1652. [7] A. Ekin, A. M. Tekalp, and R. Mehrotra, “Automatic soccer video analysis and summarization,” IEEE Transactions on Image Processing, vol. 12, no. 7, pp. 796–807, 2003. [8] G. Xu, Y. F. Ma, H. J. Zhang, and S. Q. Yang, “An HMM-based framework for video semantic analysis,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 15, no. 11, pp. 1422–1433, 2005. [9] B. Li and M. I. Sezan, “Event detection and summarization in sports video,” in Proc. IEEE Workshop on Content-based Access of Image and Video Libraries, 2001, pp. 132–138. [10] A. Tejero-de-Pablos, Y. Nakashima, T. Sato, and N. Yokoya, “Human action recognition-based video summarization for RGB-D personal sports video,” in Proc. IEEE International Conference on Multimedia and Expo, 2016, pp. 1–6. [11] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri, “Learning spatiotemporal features with 3d convolutional networks,” in 2015 IEEE International Conference on Computer Vision, 2015, pp. 4489–4497. [12] Q. V. Le, W. Y. Zou, S. Y. Yeung, and A. Y. Ng, “Learning hierarchical invariant spatio-temporal features for action recognition with independent subspace analysis,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2011, pp. 3361–3368. [13] D. Y. Chen, S. W. Shih, and H. Y. M. Liao, “Human action recognition using 2-D spatio-temporal templates,” in Proc. IEEE International Conference on Multimedia and Expo, 2007, pp. 667–670. [14] H. Meng, N. Pears, and C. Bailey, “A human action recognition system for embedded computer vision application,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2007, pp. 1–6. [15] S. Calderara, R. Cucchiara, and A. Prati, “Action signature: A novel holistic representation for action recognition,” in Proc. IEEE International Conference on Advanced Video and Signal Based Surveillance, 2008, pp. 121–128. [16] K. Simonyan and A. Zisserman, “Two-stream convolutional networks for action recognition in videos,” in Proc. Advances in Neural Information Processing Systems, 2014, pp. 568–576. [17] C. Feichtenhofer, A. Pinz, and R. Wildes, “Spatiotemporal residual networks for video action recognition,” in Proc. Conference and Workshop on Neural Information Processing Systems, 2016, pp. 3468–3476. [18] M. A. Goodale and A. D. Milner, “Separate visual pathways for perception and action,” Trends in neurosciences, vol. 15, no. 1, pp. 20– 25, 1992. [19] L. Xia, C. C. Chen, and J. K. Aggarwal, “View invariant human action recognition using histograms of 3D joints,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2012, pp. 20–27. [20] M. Martı́nez-Zarzuela, F. J. Dı́az-Pernas, A. Tejero-de-Pablos, D. González-Ortega, and M. Antón-Rodrı́guez, “Action recognition system based on human body tracking with depth images,” Advances in Computer Science: an International Journal, vol. 3, no. 1, pp. 115– 123, 2014. [21] X. Cai, W. Zhou, L. Wu, J. Luo, and H. Li, “Effective active skeleton representation for low latency human action recognition,” IEEE Transactions on Multimedia, vol. 18, no. 2, pp. 141–154, 2016. [22] J. Choi, W. J. Jeon, and S. C. Lee, “Spatio-temporal pyramid matching for sports videos,” in Proc. ACM International Conference on Multimedia Information Retrieval, 2008, pp. 291–297. [23] M. Chen, S. C. Chen, M. L. Shyu, and K. Wickramaratna, “Semantic event detection via multimodal data mining,” IEEE Signal Processing Magazine, vol. 23, no. 2, pp. 38–46, 2006. [24] D. Tjondronegoro, Y. P. Chen, and B. Pham, “Integrating highlights for more complete sports video summarization,” IEEE MultiMedia, vol. 11, no. 4, pp. 22–37, 2004. 11 [25] C. Liang, J. Kuo, W. Chu, and J. Wu, “Semantic units detection and summarization of baseball videos,” in Proc. IEEE Midwest Symposium on Circuits and Systems, vol. 1, 2004, pp. 297–300. [26] A. Divakaran, K. A. Peker, R. Radhakrishnan, Z. Xiong, and R. Cabasson, “Video summarization using mpeg-7 motion activity and audio descriptors,” in Video Mining. Boston, MA: Springer US, 2003, pp. 91–121. [27] C. Y. Chen, J. C. Wang, J. F. Wang, and Y. H. Hu, “Motion entropy feature and its applications to event-based segmentation of sports video,” EURASIP Journal on Advances in Signal Processing, vol. 2008, pp. 1–8, 2008. [28] E. Mendi, H. B. Clemente, and C. Bayrak, “Sports video summarization based on motion analysis,” Computers & Electrical Engineering, vol. 39, no. 3, pp. 790–796, 2013. [29] X. S. Hua, L. Lu, and H. J. Zhang, “Optimization-based automated home video editing system,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 14, no. 5, pp. 572–583, 2004. [30] M. Mills, J. Cohen, and Y. Y. Wong, “A magnifier tool for video data,” in Proc. ACM SIGCHI Conference on Human Factors in Computing Systems, 1992, pp. 93–98. [31] S. Lu, Z. Wang, T. Mei, G. Guan, and D. D. Feng, “A bag-of-importance model with locality-constrained coding based feature learning for video summarization,” IEEE Transactions on Multimedia, vol. 16, no. 6, pp. 1497–1509, 2014. [32] Y. F. Ma, X. S. Hua, L. Lu, and H. Zhang, “A generic framework of user attention model and its application in video summarization,” IEEE Transactions on Multimedia, vol. 7, no. 5, pp. 907–919, 2005. [33] G. Evangelopoulos, A. Zlatintsi, A. Potamianos, P. Maragos, K. Rapantzikos, G. Skoumas, and Y. Avrithis, “Multimodal saliency and fusion for movie summarization based on aural, visual, and textual attention,” IEEE Transactions on Multimedia, vol. 15, no. 7, pp. 1553–1568, 2013. [34] W. T. Peng, W. T. Chu, C. H. Chang, C. N. Chou, W. J. Huang, W. Y. Chang, and Y. P. Hung, “Editing by viewing: automatic home video summarization by viewing behavior analysis,” IEEE Transactions on Multimedia, vol. 13, no. 3, pp. 539–550, 2011. [35] H. Yang, B. Wang, S. Lin, D. Wipf, M. Guo, and B. Guo, “Unsupervised extraction of video highlights via robust recurrent auto-encoders,” in Proc. IEEE International Conference on Computer Vision, 2015, pp. 4633–4641. [36] M. Otani, Y. Nakashima, T. Sato, and N. Yokoya, “Video summarization using textual descriptions for authoring video blogs,” Multimedia Tools and Applications, vol. 76, no. 9, pp. 12 097–12 115, 2017. [37] Y. Song, J. Vallmitjana, A. Stent, and A. Jaimes, “Tvsum: Summarizing web vvideos using titles,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2015, pp. 5179–5187. [38] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” in Proc. International Conference on Learning Representations, 2015. [39] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper with convolutions,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2015, pp. 1–9. [40] Z. Zhang, “Microsoft Kinect sensor and its effect,” IEEE MultiMedia, vol. 19, no. 2, pp. 4–10, 2012. [41] S. E. Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh, “Convolutional pose machines,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 3714–3722. [42] A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei, “Large-scale video classification with convolutional neural networks,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2014, pp. 1725–1732. [43] K. H. Zeng, T. H. Chen, J. C. Niebles, and M. Sun, “Title generation for user generated videos,” in Proc. European Conference on Computer Vision, 2016, pp. 609–625. [44] 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 Proc. ACM International Conference on Multimedia, 2014, pp. 675–678. [45] J. Liu, J. Luo, and M. Shah, “Recognizing realistic actions from videos “in the wild”,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2009, pp. 1996–2003. [46] M. Marszalek, I. Laptev, and C. Schmid, “Actions in context,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2009, pp. 2929–2936. [47] M. D. Rodriguez, J. Ahmed, and M. Shah, “Action MACH a spatiotemporal Maximum Average Correlation Height filter for action recog- [48] [49] [50] [51] [52] [53] [54] [55] [56] nition,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2008, pp. 1–8. K. Soomro, A. R. Zamir, and M. Shah, “UCF101: A dataset of 101 human actions classes from videos in the wild,” CRCV-TR-12-01, 2012. J. Y.-H. Ng, M. Hausknecht, S. Vijayanarasimhan, O. Vinyals, R. Monga, and G. Toderici, “Beyond short snippets: Deep networks for video classification,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2015, pp. 4694–4702. B. T. Truong and S. Venkatesh, “Video abstraction: A systematic review and classification,” ACM Transactions on Multimedia Computing, Communications, and Applications, vol. 3, no. 1, pp. 3:1–3:37, 2007. M. Linna, J. Kannala, and E. Rahtu, “Real-time human pose estimation from video with convolutional neural networks,” CoRR, abs/1609.07420, 2016. H. Wang, M. M. Ullah, A. Klaser, I. Laptev, and C. Schmid, “Evaluation of local spatio-temporal features for action recognition,” in Proc. British Machine Vision Conference, 2009, pp. 124–1. S. Tokui, K. Oono, S. Hido, and J. Clayton, “Chainer: A next-generation open source framework for deep learning,” in Proc. Conference and Workshop on Neural Information Processing Systems, 2015, pp. 1–6. D. P. Kingma and J. L. Ba, “Adam: a method for stochastic optimization,” in Proc. International Conference on Learning Representations, 2015, pp. 1–13. A. Tejero-de-Pablos, Y. Nakashima, N. Yokoya, F. J. Dı́az-Pernas, and M. Martı́nez-Zarzuela, “Flexible human action recognition in depth video sequences using masked joint trajectories,” EURASIP Journal on Image and Video Processing, vol. 2016, no. 1, pp. 1–12, 2016. Y. Cong, J. Yuan, and J. Luo, “Towards scalable summarization of consumer videos via sparse dictionary selection,” IEEE Transactions on Multimedia, vol. 14, no. 1, pp. 66–75, 2012. Antonio Tejero-de-Pablos received a B.E. in telematics engineering and a M.E.in telecommunications engineering from University of Valladolid, Spain, in 2009 and 2012 respectively. He received a Ph.D. in information sciences from Nara Institute of Science and Technology (NAIST), Japan, in 2017. He is currently a researcher at the University of Tokyo. His research interests include action recognition, video summarization, user interfaces and general-purpose computing on GPU. He is a member of the IEEE. Yuta Nakashima received a B.E. and a M.E. in communication engineering and a Ph.D. in engineering from Osaka University, Osaka, Japan in 2006, 2008, and 2012, respectively. He was an assistant professor at Nara Institute of Science and Technology from 2012 to 2016 and is currently an associate professor at the Institute for Datability Science, Osaka University. He was a visiting scholar at UNCC in 2012 and at CMU from 2015-2016. His research interests include computer vision and machine learning and their applications. His main research focus includes video content analysis using machine learning approaches. He is a member of IEEE, ACM, IEICE, and IPSJ. Tomokazu Sato received a B.E. in computer and system science from Osaka Prefecture University in 1999. He received a M.E. and a Ph.D. in information sciences from Nara Institute of Science and Technology (NAIST) in 2001 and 2003, respectively. He was an assistant professor at NAIST during 20032011. He served as a visiting researcher at Czech Technical University in Prague from 2010-2011. He is an associate professor at NAIST since 2011. His research interests include computer vision and mixed reality. 12 Naokazu Yokoya received a B.E., a M.E., and a Ph.D. in information and computer sciences from Osaka University in 1974, 1976, and 1979, respectively. He joined the Electrotechnical Laboratory (ETL) at the Ministry of International Trade and Industry in 1979. He was a visiting professor at McGill University in 1986-1987 and was a professor at Nara Institute of Science and Technology (NAIST) during 1992-2017. He is the president at NAIST since April 2017. His research interests include image processing, computer vision, and mixed and augmented reality. He is a life senior member of IEEE. Marko Linna received a M.Sc. in computer science and engineering from the University of Oulu, Finland, in 2016. He is a research assistant at the Center for Machine Vision and Signal Analysis (CMVS) research center at the University of Oulu. His main research interests include computer vision. Esa Rahtu received a MSc in 2004 and a Doctor of Technology in electrical engineering in 2007 from the University of Oulu, Finland. His thesis was selected as the best doctoral thesis by the Pattern Recognition Society of Finland. He was also awarded a highly competitive three-year postdoctoral scholarship from the Academy of Finland. Currently, he is an assistant professor at the Tampere University of Technology in Finland. His main research interests include computer vision and machine learning with a focus on features extraction, object classification and categorization, face recognition, image retrieval, and registration and segmentation of deformable scenes.
1cs.CV
NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS ANNE LONJOU arXiv:1503.03731v3 [math.AG] 14 Sep 2016 Abstract. Using a theorem of F. Dahmani, V. Guirardel and D. Osin we prove that the Cremona group in 2 dimension is not simple, over any field. More precisely, we show that some elements of this group satisfy a weakened WPD property which is equivalent in our particular context to the M. Bestvina and K. Fujiwara’s one. (An English version of this paper is available on the webpage of the author.) Introduction Une question importante lors de l’étude d’un groupe est de savoir s’il est simple ou non, et dans ce dernier cas de construire des sous-groupes distingués. Ces questions se sont posées dès la fin du 19ème siècle pour le groupe Bir(P2k ), le groupe des transformations birationnelles du plan projectif sur un corps k. Cependant, il a fallu attendre 2013 pour que S. Cantat et S. Lamy [CL13] y répondent dans le cas où k est un corps algébriquement clos. L’espace de Picard-Manin associé à P2k est la limite inductive des groupes de Picard des surfaces obtenues en éclatant toutes suites finies de points de P2k , infiniment proches ou non (voir [Man86], [Can11] et le paragraphe §2.1). Il est muni d’une forme d’intersection de signature (1, ∞). En considérant une nappe d’hyperboloïde, nous pouvons lui associer un espace hyperbolique de dimension infinie, noté H∞ k . La stratégie de S. Cantat et S. Lamy est de faire agir, par isométries, le groupe de Cremona sur cet espace hyperbolique. Ils obtiennent ainsi de nombreux sous-groupes distingués. Leur article est constitué de deux parties. Dans la première partie, ils définissent la notion d’élément tendu (« tight element » dans leur terminologie) que nous énonçons dans le cas particulier du groupe de Cremona, de la manière suivante : un élément g de Bir(P2k ) est tendu si l’isométrie correspondant à g est hyperbolique et vérifie deux conditions. La première est que son axe soit rigide, c’est-à-dire si l’axe d’un conjugué de g est proche de l’axe de g sur une distance suffisamment grande alors les deux axes sont confondus. La seconde condition est que le stabilisateur de l’axe de g soit le normalisateur du groupe <g>. Plus précisément, l’élément hyperbolique g doit vérifier : • Pour tout ε > 0, il existe C ≥ 0 tel que si un élément f dans Bir(P2k ) satisfait l’inégalité Diam(Tubε (Axe(g))∩Tubε (f Axe(g))) ≥ C alors f Axe(g) = Axe(g), où Tubε signifie le voisinage tubulaire de rayon ε. • Pour tout élément f dans Bir(P2k ), si f Axe(g) = Axe(g) alors f gf −1 = g ±1 . Ce critère leur permet d’établir une variante de la propriété de la petite simplification : Théorème 1. [CL13] Soit k un corps algébriquement clos. Si g ∈ Bir(P2k ) est tendu alors il existe un entier n non nul tel que pour tout élément h non trivial appartenant au sous-groupe normal engendré par g n , le degré de h vérifie deg(h) ≥ deg(g n ). En particulier, le sous-groupe normal g n  de Bir(P2k ) est propre. 2010 Mathematics Subject Classification. 14E07, 20F65. Key words and phrases. groupe de Cremona, propriété WPD, espace hyperbolique. 1 NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 2 La seconde partie consiste à montrer qu’il existe des éléments tendus dans Bir(P2k ). Nous y reviendrons à la fin de cette introduction. L’objectif du présent article est d’obtenir une preuve de la non simplicité du groupe de Cremona qui fonctionne pour tout corps k : Théorème 2. Pour tout corps k, le groupe de Cremona Bir(P2k ) n’est pas simple. Pour démontrer ce théorème, nous n’allons pas utiliser le fait qu’un élément soit tendu mais plutôt le fait qu’il satisfasse la propriété WPD (« weakly properly discontinuous »), propriété proposée par M. Bestvina et K. Fujiwara [BF02] en 2002 dans le contexte du mapping class group. Un élément g satisfait la propriété WPD, si pour tout ε ≥ 0, il existe un point x et un entier n strictement positif tels qu’il n’existe qu’un nombre fini d’éléments du groupe G déplaçant x et g n (x) d’au plus ε. Les éléments hyperboliques que nous étudions possèdent un axe. Par conséquent, nous emploierons de manière équivalente la terminologie introduite par R. Coulon dans son exposé au séminaire Bourbaki [Cou14] : le groupe G agit discrètement le long de l’axe de g. L’avantage de la formulation de R. Coulon est d’expliciter le rôle du groupe G. À noter que D. Osin [Osi16] a englobé cette notion ainsi que d’autres sous le terme d’action acylindrique. Il unifie ainsi plusieurs travaux concernant des groupes différents. Récemment, F. Dahmani, V. Guirardel et D. Osin [DGO14] généralisent également la théorie de la petite simplification pour des groupes agissant par isométries sur des espaces δ-hyperboliques. Rappelons qu’un espace métrique géodésique X est δ-hyperbolique si pour chaque triangle de X, tout côté est contenu dans le δ-voisinage de la réunion de ses deux autres côtés. Une de leur motivation est d’étudier le mapping class group d’une surface de Riemann hyperbolique. Ce groupe agit sur le complexe des courbes qui est un espace δ-hyperbolique non localement compact (tout comme l’espace H∞ k mentionné plus haut). Dans ce contexte, ils construisent des sous-groupes distingués propres qui sont de plus libres et purement pseudo-Anosov, c’est-à-dire que tous leurs éléments non triviaux sont pseudo-Anosov. Ils répondent ainsi à deux questions restées longtemps ouvertes. Le lien entre la théorie de la petite simplification et la propriété WPD se fait au travers de deux énoncés [Gui14, Theorem 1.3 et Corollary 2.9]. Le premier nous dit que dans le groupe normal engendré par une famille vérifiant la propriété de petite simplification, les éléments ont une grande longueur de translation, et le second nous dit que lorsqu’un élément g satisfait la propriété WPD, les conjugués de <g n > forment une famille satisfaisant la propriété de petite simplification. En réunissant ces deux énoncés (voir également [DGO14, Theorem 5.3, Proposition 6.34]), nous obtenons le théorème : Théorème 3. [DGO14] Soit C un nombre réel positif. Soient G un groupe agissant par isométries sur un espace X δ-hyperbolique et g un élément hyperbolique de G. Si G agit discrètement le long de l’axe de g alors il existe n ∈ N tel que pour tout élément h non trivial et appartenant au sousgroupe normal engendré par g n , L(h) > C où L est la longueur de translation. En particulier, pour n assez grand, le sous-groupe normal g n  de G est propre. De plus, ce sous-groupe est libre. En utilisant ce théorème, la preuve du théorème 2 se résume à exhiber des éléments satisfaisant la propriété WPD. Nous trouvons de tels éléments dans Aut(A2k ) que nous identifions à un sousgroupe de Bir(P2k ) via l’application qui envoie (x, y) ∈ A2k sur [x : y : 1] ∈ P2k . Notre résultat principal est alors : Théorème 4. Soient n ≥ 2 et k un corps de caractéristique ne divisant pas n. Considérons l’action du groupe Bir(P2k ) sur H∞ où k̄ est la clôture algébrique de k. Le groupe Bir(P2k ) agit k̄ NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 3 discrètement le long de l’axe de l’application : hn : A2k −→ (x, y) 7−→ A2k . (y, y n − x) Remarquons que si k est un corps algébriquement clos de caractéristique p > 0, pour tout entier k ≥ 1, le sous-groupe normal engendré par hkp est le groupe Bir(P2k ). En effet, hp normalise les translations : (xp − y, x) ◦ (x + a, y + b) ◦ (y, y p − x) = (x + ap − b, y + a). Nous obtenons que hkp  contient une translation non triviale. Le théorème de Noether permet alors de montrer l’égalité hkp = Bir(P2k ), voir par exemple [CD13, Proposition 5.12] ou [Giz94, p.42]. Plus généralement, sur un corps infini de caractéristique divisant n, l’application hn ne satisfait pas la propriété WPD, ce qui justifie l’énoncé du théorème 4. En fait, comme conséquence des résultats de F. Dahmani, V. Guirardel et D. Osin, nous obtenons des propriétés plus précises que la seule non-simplicité : Théorème 5. Soit k un corps. Le groupe Bir(P2k ) contient des sous-groupes distingués libres, et est SQ-universel. Rappelons qu’un groupe G est SQ-universel si tout groupe dénombrable se plonge dans un quotient de G. Plus de détails se trouvent par exemple dans [Gui14, Theorem 2.14]. Nous terminons cette introduction en comparant notre preuve du théorème 2 à des résultats récents de [SB15] d’une part, et à la stratégie de [CL13] d’autre part. Dans son article [SB15, Corollary 7.11], N.I. Shepherd-Barron prouve que tout élément hyperbolique du groupe de Cremona sur un corps k fini engendre un sous-groupe normal propre. En particulier, Bir(P2k ) n’est pas simple pour tout corps k fini. Dans ce même article (Theorem 7.6), il donne un critère en terme de la longueur de translation de g, pour qu’une transformation hyperbolique g soit tendue, et donc que le sous-groupe distingué engendré par l’une de ses puissances soit propre. Théorème 6. [SB15] Supposons que la caractéristique de k soit nulle ou que k soit de caractéristique p > 0 et algébrique sur Fp . Si la longueur de translation d’un élément hyperbolique g de Bir(P2k ) n’est pas le logarithme d’un entier quadratique, ni de la forme log pn dans le cas où la caractéristique est strictement positive, alors une certaine puissance de g est tendue. Une hypothèse sans doute excessive est faite sur le corps dans le cas de la caractéristique positive (k doit être isomorphe à un sous-corps de F¯p ), dans le but d’éviter le problème mentionné ci-dessus des transformations normalisant le sous-groupe des translations. Cependant, même si nous pouvions enlever cette hypothèse et obtenir ainsi une démonstration alternative de la non simplicité de Bir(P2 ) sur tout corps, une telle preuve reste peu élémentaire car elle repose lourdement sur les articles [CL13] et [BC16]. Dans ce dernier article, J. Blanc et S. Cantat s’intéressent aux degrés dynamiques de toutes les applications birationnelles de surface projective. Ils prouvent notamment qu’il n’y a pas de degré dynamique dans l’intervalle ]1, λL [ où λL est le nombre de Lehmer (« gap property »). Ils obtiennent comme corollaire que pour tout élément hyperbolique g du groupe de Cremona, l’indice de <g> dans son centralisateur est fini. Comme remarqué par R. Coulon [Cou14], ceci implique que si un élément est tendu alors Bir(P2k ) agit discrètement le long de l’axe de cet élément. Dans [CL13] une relation entre l’entier n du théorème 1 et la longueur de translation de g est donnée. Une autre conséquence de la « gap property » est que l’entier n peut être choisi de façon NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 4 10795 uniforme : n ≥ max{ 139347 λL , λL + 374} convient. Dans leur article [CL13], S. Cantat et S. Lamy exhibent de deux manières différentes des éléments tendus, selon si le corps est C ou un corps algébriquement clos quelconque. Dans le cas où k est un corps algébriquement clos, ils éclatent des points particuliers de P2k pour obtenir une surface S ayant des automorphismes de grands degrés dynamiques. Par exemple, éclater les 10 points doubles d’une sextique rationnelle donne une telle surface, dite de Coble. Si le corps n’est pas algébriquement clos, les automorphismes sont à coefficients dans la clôture algébrique mais pas dans le corps k initial, leur preuve ne s’étend donc pas dans ce cas là. Dans le cas où le corps est C, ils considèrent un élément « général » du groupe de Cremona de la forme g = a ◦ J où a ∈ PGL3 (C) et J est une transformation de Jonquières, et ils montrent qu’il est tendu. Le qualificatif « général » signifie que n’importe quel élément a ∈ PGL3 (C) convient, quitte à enlever un nombre dénombrable de fermés de Zariski propres dans PGL3 (C). Ainsi si le corps de base est dénombrable, il se peut qu’il n’y ait pas d’application générale. C’est pourtant cette méthode que nous généralisons. En effet, dans leur preuve, il est nécessaire que g satisfasse deux conditions. La première impose aux points base de g et de g −1 d’être dans P2k . La seconde impose aux points base des itérés de g d’être disjoints de ceux des itérés de g −1 . Les applications hn que nous considérons se décomposent comme la composée d’une involution de Jonquières et de l’involution linéaire qui échange les coordonnées, hn = (y, x) ◦ (y n − x, y). La 2 première condition n’est pas vérifiée car hn et h−1 n n’ont qu’un seul point base dans Pk mais nous verrons que ce n’est pas un problème. Concernant la seconde condition, composer par l’élément (y, x) ∈ PGL3 (k) permet de séparer les points base des itérés de hn de ceux des itérés de h−1 n . Ainsi cet élément particulier joue le même rôle que l’élément général a ci-dessus. La preuve présentée dans cet article ne repose pas sur [BC16, CL13] à l’exception du lemme 21 à la section 2.3 qui est une adaptation directe de [CL13, Proposition 5.7]. L’article est organisé comme suit. Dans la première section, nous rappelons la construction formelle d’un espace hyperbolique de dimension infinie puis nous introduisons la notion de « tube géodésique », qui nous permet notamment de court-circuiter [CL13, Lemma 3.1]. Le résultat principal de cette section permet d’affaiblir, dans un espace hyperbolique de dimension infinie, les hypothèses assurant à un groupe d’agir discrètement le long de l’axe d’un de ses éléments. Dans la seconde section, nous rappelons la définition de l’espace de Picard-Manin ainsi que la construction de l’espace hyperbolique H∞ associé. Nous utilisons l’action du groupe Bir(P2k ) sur k̄ ∞ Hk̄ afin d’exhiber des éléments satisfaisant la propriété WPD. Ceci nous permet de prouver le théorème 4 et par conséquent de montrer que le groupe de Cremona n’est pas simple pour tout corps. Remerciements Je remercie vivement Stéphane Lamy, mon directeur de thèse, qui m’a proposé ce sujet. Je le remercie également pour ses nombreuses relectures. Merci au rapporteur pour ses commentaires qui ont permis de rendre certains passages plus clairs. 1. Propriété WPD dans un espace hyperbolique de dimension infinie L’objectif de cette section est de montrer que lorsqu’un groupe agit sur un espace hyperbolique de dimension infinie, nous pouvons affaiblir les hypothèses qui assurent qu’un groupe agit discrètement le long de l’axe d’un de ses éléments. 1.1. Espace hyperbolique de dimension infinie. Nous rappelons ici la construction des espaces hyperboliques de dimension infinie (voir par exemple [Can11, Section 6.3]). Soit (H, h·, ·i) NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 5 un espace de Hilbert réel de dimension infinie. Soient u ∈ H de norme 1 et u⊥ son complémentaire orthogonal. Tout élément v ∈ H s’écrit de manière unique v = vu u + vu⊥ où vu ∈ R et vu⊥ appartient à u⊥ . Nous définissons une forme bilinéaire symétrique B sur H de signature (1, ∞) de la manière suivante : B(x, y) = xu yu − hxu⊥ , yu⊥ i. Notons H∞ la nappe d’hyperboloïde définie par : H∞ := {x ∈ H | B(x, x) = 1 et B(u, x) > 0}. L’espace H∞ muni de la distance d définie par cosh d(x, y) := B(x, y) est un espace métrique complet et de dimension infinie. Remarquons que si l’intersection de H∞ avec un sous-espace vectoriel de dimension n+1 de H est non vide alors c’est une copie de l’espace hyperbolique usuel Hn . En particulier, il existe une unique géodésique reliant deux points de H∞ , obtenue comme l’intersection de H∞ avec le plan vectoriel contenant ces deux points. Dans la pratique, nous nous ramenons souvent à H2 en considérant un plan hyperbolique de H∞ . De ce fait, tout triangle de H∞ est isométrique à un triangle de H√2 . Ceci implique que H∞ est CAT(−1) et δ-hyperbolique pour la même constante δ = log(1 + 2) ≈ 0.881373587 que H2 (voir [Cal07, Example 1.23]). Dans la suite lorsque nous parlerons d’un espace hyperbolique H∞ , il sera toujours de cette forme. Introduisons à présent quelques définitions et notations. Soit f une isométrie de H∞ , sa longueur de translation est définie par L(f ) = inf∞ d(x, f (x)). Si la longueur de translation de x∈H f est strictement positive, f est dite hyperbolique. Dans ce cas, elle possède un axe invariant déterminé par les points réalisant l’infimum : Axe(f ) := {x ∈ H∞ | d(x, f (x)) = L(f )}. De plus, f s’étend de manière unique au bord ∂H∞ . Pour plus de détails sur la notion de bord, nous renvoyons à [BH99, p.260]. L’isométrie hyperbolique f possède exactement deux points fixes sur ∂H∞ ; l’un répulsif noté b− , et l’autre attractif noté b+ . Ce sont les bouts de l’axe de f que l’on oriente de b− vers b+ . Nous définissons ainsi une relation d’ordre sur les points de Axe(f ). Le point x est dit plus petit que y, noté x < y si x ∈ ]b− , y] (et par symétrie y ∈ [x, b+ [). Lorsqu’un point x est sur l’axe de f nous notons respectivement x − ε et x + ε les deux points sur Axe(f ) situés à distance ε de x tels que x − ε < x + ε. Remarquons que pour tout point x ∈ H∞ , la suite (f ±n (x))n∈N converge vers b± . 1.2. Propriété WPD. Soit G un groupe qui agit par isométrie sur un espace métrique (X, d). Pour toute partie A de X et pour toute constante ε ≥ 0, nous notons Fixε A := {g ∈ G | d(a, ga) ≤ ε ∀a ∈ A}, le fixateur à ε près de A par G. Dans la suite nous ne préciserons plus que les actions considérées sont isométriques. Le lemme suivant est bien connu. Lemme 7. Soient G un groupe agissant sur un espace métrique X et g un élément de G. Les deux propriétés suivantes sont équivalentes : (1) Il existe y ∈ X tel que pour tout ε ≥ 0, il existe N ∈ N tel que Fixε {y, g N (y)} soit fini. (2) Pour tout x ∈ X, pour tout ε ≥ 0, il existe N ∈ N tel que Fixε {x, g N (x)} soit fini. Démonstration. Soit y vérifiant le point (1). Soient x un point quelconque de X et ε ≥ 0. Posons ε0 = 2 d(x, y) + ε et N l’entier du point (1) associé à ε0 . Par l’inégalité triangulaire, nous avons l’inclusion : Fixε {x, g N (x)} ⊂ Fixε0 {y, g N (y)}. Ainsi, l’ensemble Fixε {x, g N (x)} est fini.  NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 6 Nous disons dans la situation du lemme que g satisfait la propriété WPD (« weak proper discontinuity »), ou encore lorsque la notion d’axe est bien définie que le groupe G agit discrètement le long de l’axe de g (voir [BF02] et [Cou14]). Dans les prochains paragraphes, nous introduisons la notion de « tube géodésique ». Ceci nous permet d’affaiblir les hypothèses garantissant la propriété WPD dans le contexte d’un groupe agissant sur H∞ . 1.3. Quadrilatères hyperboliques. Nous rappelons ici un lemme donnant des relations trigonométriques pour des quadrilatères hyperboliques ayant trois angles droits. Lemme 8. Soit ADCB un quadrilatère de H2 dont les angles en B, C et D sont droits, alors la relation suivante est vérifiée : tanh d(A, B) = tanh d(D, C) cosh d(C, B). A e D b d π 2 −γ γ C a c B Figure 1. Quadrilatère ADCB. Démonstration. Dans le triangle rectangle ABC, notons a, b, c les longueurs opposées aux sommets A, B, C, et γ l’angle en C, et dans le triangle ACD, d et e, les longueurs opposées aux sommets A et C (voir Figure 1). Les triangles rectangles ABC et ACD satisfont les relations classiques (voir par exemple [Bea95, Theorem 7.11.2]) : π tanh d tanh c tanh a , sin γ = cos( − γ) = et tan γ = . tanh b 2 tanh b sinh a Cela nous donne l’égalité cherchée : cos γ = tanh c = tanh d cosh a.  1.4. Tubes géodésiques. Fixons un espace (H∞ , d) comme défini précédemment. Soit Γ une géodésique de H∞ . Nous introduisons à présent la notion de tube géodésique autour de Γ qui sera centrale dans la preuve de la proposition principale de cette section (Proposition 11). Le mot « géodésique » est employé ici pour signifier que lorsque l’on considère l’intersection de ce tube avec un plan hyperbolique P contenant Γ, le quadrilatère plein obtenu est bordé de segments géodésiques. Soient x et x0 deux points de H∞ et Γ la géodésique passant par ces deux points. Soit prΓ la projection qui envoie un point y ∈ H∞ sur le point de Γ le plus proche de y. Nous notons ∞ Γ⊥ | prΓ y = x} x := {y ∈ H l’hyperplan orthogonal à Γ en x. Nous définissons le tube Tεx,x0 comme l’enveloppe convexe de 0 ⊥ l’union des deux convexes fermés B̄(x, ε) ∩ Γ⊥ x et B̄(x , ε) ∩ Γx0 (voir Figure 2, à noter que les tubes sont pleins). Le rayon de ce tube en z ∈ [x, x0 ], noté rεx,x0 (z), est ε rεx,x0 (z) := sup{d(z, u) | u ∈ Γ⊥ z ∩ Tx,x0 }. NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS ε rεx,x0 (z) n z x B̄(x, ε) ∩ Γ⊥ x 7 Γ x0  Figure 2. Tube Tεx,x0 . 1 Tεx,x 0 2 Tεy,y 0 Γ ε2 1 Figure 3. Tube Tεx,x 0 traversant le tube Ty,y 0 . 1 Soient x ≤ y < y 0 ≤ x0 quatre points d’une même géodésique Γ. Nous dirons que le tube Tεx,x 0 ε2 ε1 ε1 0 traverse Ty,y0 si nous avons les inégalités : rx,x0 (y) ≤ ε2 et rx,x0 (y ) ≤ ε2 (voir Figure 3). ε2 1 Remarque 9. Cette définition implique que pour tout z ∈ [y, y 0 ], rεx,x 0 (z) ≤ ry,y 0 (z). En effet, ε1 soit u ∈ Γ⊥ z ∩ Tx,x0 , alors u appartient à un segment géodésique ayant ses extrémités dans ε ε ε1 ε2 ε2 ε2 ⊥ ⊥ 1 2 Γ⊥ y ∩ Tx,x0 ⊂ Ty,y 0 et Γy 0 ∩ Tx,x0 ⊂ Ty,y 0 . Par convexité du tube Ty,y 0 , u appartient à Γz ∩ Ty,y 0 . L’espace H∞ étant CAT(−1) et donc à fortiori CAT(0), la distance est convexe. Cela revient à dire (voir [BH99, p.176]) que pour tous segments géodésiques [a, b] et [c, d] et pour tous points z ∈ [a, b] et z 0 ∈ [c, d] ayant les mêmes coordonnées barycentriques, c’est-à-dire d(a, z) = t d(a, b) et d(c, z 0 ) = t d(c, d) avec t ∈ [0, 1], nous avons d(z, z 0 ) ≤ (1 − t) d(a, c) + t d(b, d). Nous utilisons la convexité de la distance de la façon suivante. Lemme 10. Soit G un groupe agissant sur H∞ . Considérons quatre points x, x0 , z, z 0 sur une géodésique Γ vérifiant x ≤ z < z 0 ≤ x0 . Pour tout ε ≥ 0 nous avons : (1) Fixε {x, x0 } ⊂ Fixε {z, z 0 }. (2) le tube Tεx,x0 traverse le tube Tεz,z0 . d(x,z) 0 0 Démonstration. Posons t := d(x,x 0 ) . Soit g ∈ Fix ε {x, x }. Comme g agit par isométrie, z ∈ [x, x ] et g · z ∈ [g · x, g · x0 ] ont les mêmes coordonnées barycentriques. Nous avons alors par convexité de la distance : d(z, g · z) ≤ t d(x0 , g · x0 ) + (1 − t) d(x, g · x) ≤ ε. En faisant de même pour z 0 , le point (1) est démontré. Par le même argument et en se plaçant dans un plan contenant le segment [x, x0 ], nous avons : rεx,x0 (z) ≤ t rεx,x0 (x0 ) + (1 − t) rεx,x0 (x) ≤ ε. En faisant de même pour z 0 , le point (2) est prouvé.  1.5. Affaiblissement des hypothèses de la propriété WPD. Nous prouvons dans cette section le résultat suivant, qui nous permettra de vérifier plus facilement qu’une isométrie satisfait la propriété WPD. NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 8 Proposition 11. Soient G un groupe agissant sur H∞ et h un élément hyperbolique de G. Les deux propriétés suivantes sont équivalentes : (1) Il existe y ∈ Axe(h), η > 0 et n, k ∈ N tels que Fixη {h−k (y), hn (y)} soit fini. (2) Il existe w ∈ Axe(h) tel que pour tout ε ≥ 0, il existe N ∈ N tel que Fixε {w, hN (w)} soit fini. Le point (2) correspond à la définition donnée dans le lemme 7.(1), et le point (1) est la version avec les hypothèses affaiblies qui nous sera utile dans la section 2. La preuve découle immédiatement du lemme 13. Lemme 12. Soient G un groupe agissant sur H∞ et Γ une géodésique de H∞ . Pour toutes constantes fixées ε ≥ 0, η > 0 et pour tous points y, y 0 , z, z 0 ∈ Γ avec y ≤ z < z 0 ≤ y 0 , le tube Tεy,y0 traverse le tube Tηz,z0 dès que les distances d(y, z) et d(y 0 , z 0 ) sont suffisamment grandes. x01 x1 z1 w1 ε ε Γ x z w z0 x0 Figure 4. Trace du tube Tεx,x0 dans le plan P. Démonstration. Si η ≥ ε, il suffit de prendre y ≤ z et y 0 ≥ z 0 (voir lemme 10.(2)). Si maintenant η < ε, nous voulons trouver deux points x et x0 sur Γ avec x ≤ z et x0 ≥ z 0 de sorte que rεx,x0 (z) = η et rεx,x0 (z 0 ) = η. Ainsi en utilisant le lemme 10.(2), tous les points y, y 0 vérifiant d(y, z) ≥ d(x, z) et d(y 0 , z 0 ) ≥ d(x0 , z 0 ) satisferont le lemme. Soit w le milieu de [z, z 0 ]. Considérons deux points x, x0 ∈ Γ avec x ≤ z et x0 ≥ z 0 et tels que w soit le milieu du segment [x, x0 ]. Par symétrie, nous pouvons nous placer dans un plan P contenant la géodésique Γ. Dans ce plan, la trace du tube Tεx,x0 est un quadrilatère plein. Notons x1 et x01 deux sommets de ce quadrilatère situés dans un même demi-plan délimité par Γ (voir Figure 4). Nous avons alors d(x1 , x) = d(x01 , x0 ) = ε. Soit w1 le milieu du segment géodésique [x1 , x01 ]. Par symétrie, la géodésique passant par les points w et w1 est la géodésique orthogonale aux géodésiques [x1 , x01 ] et Γ. Appelons z1 le point sur le segment géodésique [x1 , w1 ] vérifiant prΓ z1 = z. Le lemme 8 nous donne : ( tanh d(w, w1 ) cosh d(w, z) = tanh d(z1 , z) tanh d(w, w1 ) cosh d(w, x) = tanh d(x1 , x) = tanh ε. En combinant les égalités, nous obtenons : tanh ε cosh d(w, z) = tanh d(z, z1 ). cosh d(w, x) Prenons x tel que   tanh ε cosh d(w, z) . tanh η Alors d(z, z1 ) = η, et le point w étant le milieu des segments [z, z 0 ] et [x, x0 ], nous obtenons par symétrie que d(z 0 , z10 ) = η, comme attendu.  d(w, x) = argcosh NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 9 Lemme 13. Soient G un groupe agissant sur H∞ et h une isométrie hyperbolique de G. Pour toutes constantes fixées ε ≥ 0, η > 0, pour tous points z, z 0 , w ∈ Axe(h) avec z < z 0 , il existe N, M ∈ N tels que si l’ensemble Fixη {z, z 0 } est fini alors Fixε {h−N (w), hM (w)} l’est aussi. Tεh−N (w)+ε,hM (w)−ε η/3 Tz−ε,z0 +ε Axe(h) z w −N h z0 z−ε (w) + ε z0 + ε hM (w) − ε η/3 Figure 5. Tube Tεh−N (w)+ε,hM (w)−ε traversant le tube Tz−ε,z0 +ε . Démonstration. Soient ε ≥ 0, η > 0, z,z 0 et w trois points de Axe(h). D’après le lemme 12, il existe deux entiers N et M suffisamment grands de sorte que le tube Tεh−N (w)+ε,hM (w)−ε traverse η/3 Tz−ε,z0 +ε (voir Figure 5). Supposons que l’ensemble Fixε {h−N (w), hM (w)} soit infini. Considérons une suite (fn )n∈N d’éléments deux à deux distincts de cet ensemble, et notons pn et p0n les projections respectives de fn (h−N (w)) et fn (hM (w)) sur l’axe de h. Ainsi, pour tout n, nous avons : [fn (h−N (w)), fn (hM (w))] ⊂ Tεpn ,p0n . En appliquant le lemme 10.(2) nous obtenons que le tube Tεpn ,p0n traverse le tube Tεh−N (w)+ε,hM (w)−ε η/3 qui, par construction, traverse le tube Tz−ε,z0 +ε . De plus, par le lemme 10.(1), nous obtenons l’inclusion : Fixε {h−N (w), hM (w)} ⊂ Fixε {z, z 0 }. Par conséquent, pour tout n, fn (z) appartient à la boule fermée B̄(z, ε). Notons zn la projection de fn (z) sur Axe(h). En particulier, la suite (zn )n∈N appartient au compact [z − ε, z 0 + ε]. Ceci signifie que d’une part, quitte à prendre une sous-suite, nous pouvons supposer que la suite (zn )n∈N converge et que pour tout k ≥ 0, d(z0 , zk ) ≤ η3 , et d’autre part que d(zn , fn (z)) ≤ η3 . Par conséquent, nous avons pour tout n ≥ 0 : d(f0 (z), fn (z)) ≤ d(f0 (z), z0 ) + d(z0 , zn ) + d(zn , fn (z)) ≤ η. Quitte à prendre une sous-suite de (fn )n∈N et en considérant maintenant le point z 0 , nous obtenons, par le même argument, l’inégalité précédente en remplaçant z par z 0 . Ainsi, la suite (f0−1 fn )n≥0 est contenue dans Fixη {z, z 0 } qui est donc infini comme attendu.  2. Application au groupe de Cremona Soient k un corps et k̄ sa clôture algébrique. Dans cette section, nous rappelons la construction de l’espace de Picard-Manin sur k̄, et celle de l’espace hyperbolique de dimension infinie associé. Ainsi, nous pourrons montrer que le groupe Bir(P2k ) agit discrètement le long de l’axe de certains de ses éléments en utilisant la version affaiblie établie dans la section 1.5. NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 10 2.1. Action du groupe de Cremona sur l’espace de Picard-Manin. Plaçons nous sur k̄. Rappelons rapidement la construction de l’espace de Picard-Manin et comment le groupe Bir(P2k̄ ) agit dessus. Plus de précisions se trouvent dans [CL13] et [Can11]. Soit S une surface projective lisse. Le groupe de Néron-Severi associé à S, noté N1 (S), est le groupe des diviseurs à coefficients réels sur S à équivalence numérique près. Il est muni d’une forme bilinéaire symétrique, la forme d’intersection. Pour tout diviseur D sur S nous notons {D}S sa classe de Néron-Severi ou {D} s’il n’y a pas d’ambiguïté sur la surface. Si π : S 0 −→ S est un morphisme birationnel entre deux surfaces, alors le tiré en arrière π ∗ : N1 (S) ,→ N1 (S 0 ) qui à la classe d’un diviseur associe la classe de sa transformée totale, est un morphisme injectif qui préserve la forme d’intersection. De plus, N1 (S 0 ) est isomorphe à (1) π ∗ (N1 (S)) ⊕ ( R{Ep∗ }), ⊕ p∈Bs(π −1 ) où Bs(π −1 ) est l’ensemble des points base de π −1 (infiniment proches ou pas) et Ep∗ est la transformée totale, vue dans S 0 , du diviseur exceptionnel Ep obtenu en éclatant le point p. Cette somme est orthogonale relativement à la forme d’intersection. Considérons la limite inductive des groupes de Néron-Severi des surfaces S 0 obtenues comme éclatements de S (nous dirons que de telles surfaces S 0 dominent S) : Z C (S) = lim N1 (S 0 ), −→ S 0 →S où l’indice C fait référence aux b-diviseurs de Cartier (pour plus de précisions voir [Fav10]). Remarquons que pour toute surface S 0 dominant S, le groupe N1 (S 0 ) est plongé dans Z C (S). En fait, si nous considérons un diviseur D sur S, à chaque surface S 0 dominant S, nous pouvons lui faire correspondre une classe de Néron-Severi {D}S 0 dans N1 (S 0 ). Ces éléments sont tous identifiés dans Z C (S) et correspondent à une classe d de Z C (S) notée en lettre minuscule. Exemple 14. Considérons un point q appartenant au diviseur exceptionnel Ep , issu de l’éclatement d’une surface S au point p. Notons Sp la surface obtenue en éclatant le point p et Sp,q celle en éclatant successivement les points p et q. La classe ep correspond à {Ep }Sp dans N1 (Sp ) et à {Ẽp + Eq }Sp,q dans N1 (Sp,q ) où Ẽp est la transformée stricte de Ep dans Sp,q . Définissons la forme d’intersection sur Z C (S). Pour cela, considérons c et d deux éléments de Z C (S). Il existe une surface S1 dominant S telles que les classes c et d correspondent respectivement à {C}S1 et {D}S1 dans N1 (S1 ). La forme d’intersection est donnée par : c·d = {C}S1 ·{D}S1 . Montrons qu’elle ne dépend pas du choix de la surface S1 . En effet, considérons une autre surface S2 où les éléments c et d se réalisent comme des éléments de N1 (S2 ). En résolvant l’application birationnelle allant de S1 vers S2 nous obtenons une surface S3 dominant S1 et S2 c’est-à-dire qu’il existe deux morphismes birationnels π : S3 → S1 et σ : S3 → S2 faisant commuter le diagramme : S3 π σ S1 S2 . S NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 11 La forme d’intersection étant stable par tiré en arrière nous avons : {C}S1 · {D}S1 = {C}S3 · {D}S3 = {C}S2 · {D}S2 . Par la suite, nous nous intéressons à l’espace de Hilbert défini par X X Z(S) = {{D0 }S + λp ep | λp ∈ R, λ2p < ∞ et {D0 }S ∈ N1 (S)}, p que nous appelons l’espace de Picard-Manin (voir [CL13] et [Can11]). C’est le complété L2 de Z C (S). Les classes ep (nous gardons les notations introduites dans l’exemple 14) où p est un point de S ou d’une surface dominant S, sont d’auto-intersection −1, orthogonales deux à deux et orthogonales à N1 (S). La forme d’intersection est donc de signature (1, ∞) et préserve la décomposition orthogonale : Z(S) = N1 (S) ⊕ (⊕Rep ). (2) p Exemple 15. Soient p et q les points définis dans l’exemple 14. Considérons les classes de PicardManin ep et eq . Plaçons nous sur la surface Sp,q puisqu’elle domine la surface Sp contenant le diviseur Ep et qu’elle contient le diviseur Eq . Dans N1 (Sp,q ) les classes ep et eq correspondent respectivement à {Ẽp + Eq } et à {Eq }. Nous avons donc : ep · ep = Ẽp2 + Eq2 + 2Ẽp · Eq = −2 − 1 + 2 = −1 ep · eq = Ẽp · Eq + Eq2 = 1 − 1 = 0. Si π : S 0 → S est un morphisme birationnel, nous avons mentionné que l’application induite par tiré en arrière sur les groupes de Néron-Severi est une injection. Précisément : π∗ : N1 (S) {D0 }S ,→ 7→ {D̃0 }S 0 + 1 NP (S 0 ) mq (D0 )eq , q∈Bs(π −1 ) où D̃0 est la transformée stricte dans S 0 de D0 et mq (D0 ) la multiplicité de D0 au point q. Regardons ce que nous obtenons au niveau des espaces de Picard-Manin. D’après (2) puis (1), nous avons la décomposition   0 1 Z(S ) = N (S) ⊕ ( ⊕ Req ) ⊕ ( ⊕ Rer ). q∈Bs(π −1 ) −1 ) r ∈Bs(π / Nous définissons un isomorphisme π# de Z(S 0 ) vers Z(S) qui consiste à considérer comme exceptionnelles au-dessus de S les classes eq qui étaient dans l’espace de Néron-Severi de S 0 . Ainsi −1 au niveau des l’injection π ∗ au niveau des espaces de Néron-Severi devient un isomorphisme π# espaces de Picard-Manin. Plus précisément, nous avons −1 π# : Z(S) = N1 (S) ⊕ (⊕Rep ) −→ Z(S 0 ) = N1 (S 0 ) ⊕ ( p {D0 }S + P λ p ep p 7→ ⊕ Rer ) −1 ) r ∈Bs(π / ! {D̃0 }S 0 + P (mq (D0 ) + λq )eq q∈Bs(π −1 ) + P λ r er . −1 ) r ∈Bs(π / À présent, considérons l’espace H∞ (S) = {c ∈ Z(S) | c · c = 1 et c · d0 > 0}, où d0 ∈ N1 (S) est une classe ample. Muni de la distance définie par d(c, c0 ) = argcosh(c · c0 ) pour tous c, c0 ∈ H∞ (S), c’est un espace hyperbolique de dimension infinie comme ceux introduits dans la section 1. Nous nous intéressons dans cet article à H∞ (P2k̄ ) que nous notons H∞ . Tout k̄ P ∞ élément de Hk̄ est de la forme λ` ` + p λp ep où ` correspond à la classe d’une droite dans P2k̄ , P λ` > 0 et λ2` − p λ2p = 1. Considérons une résolution de f ∈ Bir(P2k̄ ) : NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 12 S π P2k̄ σ f P2k̄ . Le groupe Bir(P2k̄ ) agit sur H∞ via l’application (f, c) 7→ f# (c) où f# est définie par k̄ f# = σ# ◦ (π# )−1 . Remarquons que (f# )−1 = (f −1 )# . Remarque 16. Si f est un isomorphisme d’un voisinage U de x sur un voisinage V de f (x) alors nous avons f# (ex ) = ef (x) . Explicitons sur un exemple l’action de f sur `, la classe d’une droite de P2k̄ . Exemple 17. Soit f : P2s 99K P2b une application quadratique et notons q1 , q2 et q3 les points base (infiniment proches ou non) de f −1 . Nous mettons un indice s comme source et un indice b comme but pour plus de clarté. La transformée par f d’une droite générale L de P2s (ne passant pas par les points base de f ) est une conique C de P2b qui passe par les points base de f −1 . Considérons une résolution π : S → P2s et σ : S → P2b de f . Nous voulons exprimer {π ∗ (L)}s dans la base de N1 (S) issue de σ ∗ , c’est-à-dire dans la base : σ ∗ ({L}b ), {Eq∗1 }b , {Eq∗2 }b , {Eq∗3 }b . La droite L ne passant pas par les points base de f nous avons π ∗ (L) = L̃ qui correspond à la transformée stricte de C par σ : C̃ = σ ∗ (C) − Eq∗1 − Eq∗2 − Eq∗3 . Or, σ ∗ ({C}b ) = 2σ ∗ ({L}b ). Ainsi, nous avons écrit {π ∗ (L)}s dans la base voulue, {π ∗ (L)}s = {2σ ∗ (L) − Eq∗1 − Eq∗2 − Eq∗3 }b . Si nous réécrivons cette égalité dans les espaces de Picard-Manin nous avons : f# (`) = 2` − eq1 − eq2 − eq3 . De manière générale, pour tout f ∈ Bir(P2k̄ ), f# (`) · ` = deg(f ). . Par la suite, nous allons nous intéresser aux ap2.2. Action des applications hn sur H∞ k̄ n plications hn : (x, y) 7→ (y, y − x) où n ≥ 2. Elles appartiennent à Bir(P2k ) qui est inclus dans Bir(P2k̄ ). Nous nous plaçons donc sur k̄. Fixons l’entier n ≥ 2. Considérons les applications birationnelles a : (x, y) 7→ (y, x) et jn : (x, y) 7→ (y n − x, y). Nous avons : −1 hn = a ◦ jn et h−1 ◦ hn ◦ a. n =a L’application jn étant une application de Jonquières elle a un point base p0 de multiplicité n − 1 et 2n−2 points base de multiplicité 1 (voir [KSC04, Definition 2.28]). En homogénéisant, le point p0 a pour coordonnées [1 : 0 : 0]. C’est le seul point base de l’application jn qui appartient à P2k̄ . Les autres points base de jn forment une tour de points infiniment proches au-dessus de p0 (voir [Lam02, Lemme 9]). Pour 1 ≤ k ≤ 2n − 2, notons pk le point base de jn appartenant au diviseur exceptionnel obtenu en éclatant le point base pk−1 . Ainsi le point pk est infiniment proche du point pk−1 . Plus précisément, la figure 6 représente les transformées strictes des diviseurs exceptionnels obtenus en résolvant hn munis de leur auto-intersection respective. La configuration obtenue, illustrée sur la figure, découle du fait que les n − 1 points base p1 , . . . , pn−1 se trouvent sur les transformées strictes respectives de Ep0 . À l’exception des points p0 et p1 , remarquons que les points pk dépendent de n. Cependant, pour ne pas alourdir davantage l’écriture nous ne mettons pas d’indice n. L’application a étant un automorphisme de P2k̄ , hn possède les mêmes points base que jn . En conjuguant par a, nous obtenons par symétrie les points base de h−1 n que nous notons {qk }0≤k≤2n−2 . Remarquons que q0 = [0 : 1 : 0]. NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 13 Ep0 −n Epn−1 −2 Epn−2 E pn −2 −2 .. . Ep1 Ep2n−3 −2 −2 .. . Ep2n−2 −1 Figure 6. Arbre des transformées strictes des diviseurs exceptionnels obtenus en résolvant les points d’indétermination de hn . L’isométrie hn# est hyperbolique et de longueur de translation log(n) (voir [CL13, Theorem 4.4, Remark 4.5]). Nous allons décrire son axe. Pour alléger l’écriture nous notons e+ n (respectivement e− ) les sommes avec multiplicités des classes des diviseurs exceptionnels issus de la n résolution de hn (respectivement de hn−1 ) : ( + en = (n − 1)ep0 + ep1 + · · · + ep2n−2 . e− n = (n − 1)eq0 + eq1 + · · · + eq2n−2 L’action sur ` de hn# et de ses itérés est donnée par : 2 2 − − hn# (`) = n` − e− n , hn# (`) = n ` − nen − hn# (en ), etc. La suite ( n1k hkn# (`))k∈N converge dans l’espace de Picard-Manin vers un élément b+ n d’autointersection 0 qui s’identifie à un point du bord ∂H∞ . Cet élément correspond à un bout de k̄ − Axe(hn# ). De même, la suite ( n1k h−k (`)) converge vers un élément b . Ces deux classes se k∈N n# n réécrivent : ∞ ∞ + X X hin# (e− h−i n) n# (en ) + − bn = ` − et bn = ` − . i+1 i+1 n n i=0 i=0 L’action de hn sur les classes ep est donnée par la remarque suivante car hn est un automorphisme polynomial. Remarque 18. Soit f un automorphisme du plan affine A2 de degré au moins 2, que nous étendons en une application birationnelle de P2 . L’ordre des éclatements dans la résolution minimale de f −1 est uniquement déterminé. En effet à chaque étape de la résolution l’unique point base propre est l’image de la droite à l’infini. Ainsi il y a dans ce contexte une notion de « dernier diviseur » produit lors de la résolution minimale de f −1 , et si p est un point de la droite à l’infini qui n’est pas le point base propre de f , alors il existe un point q sur ce dernier diviseur produit tel que la transformation birationnelle induite par f donne un isomorphisme local entre des voisinages de p et q. En particulier, par la remarque 16, nous avons f# (ep ) = eq . Lemme 19. Considérons l’ensemble des éléments des 4n − 2 suites (hin# (eqk ))i∈N , (h−i n# (epk ))i∈N avec 0 ≤ k ≤ 2n − 2. Ces éléments sont tous deux à deux orthogonaux. Démonstration. Construisons les points (hn# (eqk )), pour 0 ≤ k ≤ 2n − 2. Les autres points se construisent de la même façon. L’application hn est régulière en q0 et hn (q0 ) = q0 est un point base de h−1 n . D’après la remarque 18, il existe un point sur le dernier diviseur exceptionnel NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 14 Eq2n−2 issu de l’éclatement de tous les points {qk }0≤k≤2n−2 , que nous notons q2n−1 , tel que hn# (eq0 ) = eq2n−1 . Si nous notons π0 l’éclatement du point q0 , alors l’application hn ◦ π0 est régulière en q1 et hn ◦ π0 (q1 ) = q0 qui est un point base de (hn ◦ π0 )−1 . Toujours d’après la remarque 18, il existe un point sur le diviseur exceptionnel obtenu en éclatant le point q2n−1 , que nous notons q2n , et vérifiant hn# (eq1 ) = eq2n . En réitérant le procédé, nous obtenons qu’il existe un point, noté q2n−1+k , sur le diviseur exceptionnel issu de l’éclatement du point q2n−2+k tel que hn# (eqk ) = eq2n−1+k . À présent, nous pouvons montrer, par récurrence sur i, que hin# (eqk ) = eqi(2n−1)+k pour tout i ≥ 1 et tout k tel que 0 ≤ k ≤ 2n − 2. En faisant de même, nous obtenons également que h−i n# (epk ) = epi(2n−1)+k pour tout i ≥ 1 et tout k tel que 0 ≤ k ≤ 2n − 2. Ainsi tous les éléments de toutes les suites sont deux à deux orthogonaux.  Considérons à présent pour chaque n ≥ 2, le point wn qui est le projeté de ` sur Axe(hn# ). − L’axe de hn# étant uniquement déterminé par b+ n et bn , wn est une combinaison linéaire de ces − 2 + 2 − 2 + − deux classes ; wn = αb+ n + βbn . Nous avons 1 = wn = 2αβ car (bn ) = 0 = (bn ) et bn · bn = 1. De plus, wn · ` = α + β doit être minimal car wn est le projeté de `. Nous obtenons finalement : ∞ −i + X √ hin# (e− 1 n ) + hn# (en ) . (3) wn = 2` − √ rn où rn = i+1 n 2 i=0 Remarque 20. Écrivons tous les termes de rn : h (eq ) eq ep eq eq ep rn = (n − 1) 0 + 1 + · · · + 2n−2 + (n − 1) 0 + · · · + 2n−2 + (n − 1) n# 2 0 + · · · . n n n n n n Le lemme 19 implique que tous les termes de rn sont orthogonaux deux à deux. Ainsi, la classe de tout diviseur exceptionnel ei a un nombre d’intersection non nul avec au plus un seul des termes de rn . Remarquons également, même si nous n’utiliserons pas ce fait, que les points pi (respectivement qi ), construits dans le lemme 19, sont les points base des itérés de hn (respectivement de 2 h−1 n ). Le diagramme suivant donne une idée de preuve dans le cas de hn . S̃ π̃ σ̃ S π P2k̄ S σ hn π P2k̄ σ hn P2k̄ 2.3. Preuve du résultat principal. Soient k un corps et n ≥ 2 un entier tels que la caractéristique de k ne divise pas n. Considérons les applications hn : A2k −→ (x, y) 7−→ A2k (y, y n − x) appartenant au groupe Bir(P2k ). Nous montrons dans ce paragraphe le théorème 4, c’est-à-dire que le groupe Bir(P2k ) agit discrètement le long de l’axe de hn# . Plus précisément, nous allons montrer que le groupe Bir(P2k̄ ) agit discrètement le long de l’axe de hn# , ce qui impliquera immédiatement la même propriété pour le groupe Bir(P2k ). Nous avons besoin du lemme suivant tiré de [CL13, Proposition 5.7]. Remarquons que nous avons effectué deux modifications dans notre version de l’énoncé. D’une part nous voulons vérifier le lemme pour les transformations hn , qui ne sont pas NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS f# (`) b− n 15 H∞ k̄ εn f# (wn ) + bn wn ) Axe(hn# ` Figure 7. Action de f sur les classes ` et wn . des applications générales. D’autre part le rapporteur, que nous remercions, nous a signalé une erreur de calcul d’intersection dans la preuve, qui en fait se trouvait déjà dans [CL13]. C’est ce qui explique que dans notre énoncé la constante epsilon dépende de n, alors qu’elle était uniforme dans l’article original. Ceci est suffisant pour notre but, signalons cependant qu’il serait possible de préserver l’uniformité de la constante au prix d’une preuve un peu plus longue. Avant d’énoncer le lemme, rappelons que wn est le projeté sur l’axe de hn# de la classe de ` et est donné par l’égalité (3). Lemme 21. Il existe εn > 0 tel que tout élément de Fixεn {wn } ⊂ Bir(P2k̄ ) soit un automorphisme de P2k̄ .  i √ √ i 1 2 + n√ − argcosh 2 , cette constante vérifie Démonstration. Choisissons εn ∈ 0, argcosh 2 alors : √  √ 1  3  argcosh( 2) + εn < argcosh 2 + √ < argcosh √ n 2 2 . (∗) √  2 argcosh( 2) + εn < argcosh 4 La deuxième inégalité vient du fait que : √  5  √ √ √ 1  2 argcosh( 2)+εn < argcosh( 2)+argcosh 2+ √ < argcosh( 2)+argcosh √ < argcosh 4, n 2 2 2   √ 5 avec argcosh( 2) + argcosh 2√2 ' 0, 881 + 1, 171 = 2, 052 et argcosh 4 ' 2, 063. Soit f ∈ Fixεn {wn }. Nous voulons montrer que f est de degré 1. D’après l’inégalité triangulaire et le fait que d(f# (wn ), wn ) ≤ εn , nous obtenons (voir Figure 7) : d(f# (`), `) ≤ d(f# (`), f# (wn )) + d(f# (wn ), wn ) + d(wn , `) ≤ 2 d(wn , `) + εn . Rappelons que cosh d(f# (`), `) = f# (`) · ` = deg f , donc deg f ≤ cosh(2 d(wn , `) + εn ). Re√ marquons que d(wn , `) = argcosh(wn · `) = argcosh 2 (en utilisant (3)). Finalement, d’après le choix (∗) de εn , nous majorons le degré de f par 4 : √ deg f ≤ cosh(2 argcosh( 2) + εn ) < 4. Il nous reste à montrer que f ne peut pas être de degré 2 ou 3. Dans chacun √ des deux cas nous raisonnons par l’absurde et arrivons à l’inégalité d(f# (`), wn ) > argcosh( 2) + εn . Or, par l’inégalité triangulaire, nous obtenons : d(f# (`), wn ) ≤ d(f# (`), f# (wn )) + d(f# (wn ), wn ) √ ≤ d(wn , `) + εn = argcosh( 2) + εn , ce qui nous mène à une contradiction. NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 16 Supposons que deg(f ) = 3, alors f −1 possède un point base de multiplicité 2 et quatre points base de multiplicité 1, d’après les relations de Noether (voir [KSC04, p.39]). Ainsi, l’action de f# sur la classe ` de Picard-Manin est définie par f# (`) = 3` − 2e0 − e1 − e2 − e3 − e4 avec ei les classes des diviseurs exceptionnels au-dessus de P2k̄ . D’après la remarque 20, nous obtenons : 1 (−2(n − 1) − (n − 1) − 1 − 1 − 1) = −3, n ce qui nous donne −f# (`) · rn ≥ −3. Par hypothèse nous avons f# (`) · ` = 3, ce qui nous permet, en utilisant (3), d’établir l’inégalité : √ √ 3 1 3 f# (`) · wn = 2f# (`) · ` − √ f# (`) · rn ≥ 3 2 − √ = √ . 2 2 2 En prenant le cosinus hyperbolique réciproque et en utilisant (∗), nous arrivons à la contradiction attendue : √ 3 d(f# (`), wn ) ≥ argcosh √ > argcosh( 2) + εn . 2 Supposons maintenant que deg f = 2, alors d’après les relations de Noether, f −1 possède trois points base de multiplicité 1. De même que dans le cas précédent, nous considérons l’action de f# sur ` ; f# (`) = 2` − e0 − e1 − e2 avec ei les classes des diviseurs exceptionnels au-dessus de P2k̄ . D’après la remarque 20, nous avons : (2e0 + e1 + e2 + e3 + e4 ) · rn ≥ −f# (`) · rn = (e0 + e1 + e2 ) · rn ≥ 1 1 (−(n − 1) − (n − 1) − 1) = −2 + . n n De plus, f# (`) · ` = 2, ce qui implique : √ √ √ 1 1 2 1 f# (`) · wn = 2f# (`) · ` − √ f# (`) · rn ≥ 2 2 − √ + √ = 2 + √ . 2 2 n 2 n 2 De même que précédemment, nous obtenons la contradiction : √ √ 1  d(f# (`) · wn ) ≥ argcosh 2 + √ > argcosh( 2) + εn . n 2  Démonstration du théorème 4. Le groupe Bir(P2k ) étant inclus dans le groupe Bir(P2k̄ ), il agit sur l’espace H∞ . Nous allons montrer que Bir(P2k̄ ) agit discrètement le long de l’axe de hn# , c’estk̄ 2 à-dire qu’il existe ε > 0 tel que l’ensemble Fixε {h2n# (wn ), h−2 n# (wn )} ⊂ Bir(Pk̄ ) soit fini. Ainsi, 2 −2 2 2 Fixε {hn# (wn ), hn# (wn )}∩Bir(Pk ) sera fini ce qui signifie que le groupe Bir(Pk ) agit discrètement le long de l’axe de hn# et le théorème sera démontré. Choisissons un εn > 0 vérifiant (∗), comme dans le lemme 21. Soit f une application birationnelle de P2k̄ appartenant à Fixεn {h2n# (wn ), h−2 n# (wn )}. Par le lemme 10.(1), nous avons l’inclusion : −1 Fixεn {h2n# (wn ), h−2 n# (wn )} ⊂ Fixεn {hn# (wn ), hn# (wn )} ⊂ Fixεn {wn }. De ce fait, f appartient à Fixεn {wn } et en utilisant le lemme 21, nous obtenons que f est de degré 1 : f : [x : y : z] 7→ [ax + ky + bz : lx + cy + dz : hx + my + jz]. Le but est maintenant de trouver des contraintes sur les coefficients de f pour montrer qu’il n’y a qu’un nombre fini de choix possibles pour une telle application. L’application f appartient −1 −1 −1 aussi à Fixεn {hn# (wn ), h−1 n# (wn )} d’où d(f# hn# (wn ), hn# (wn )) ≤ εn . L’application hn# étant une isométrie nous avons : d(hn# f# h−1 n# (wn ), wn ) ≤ εn . −1 −1 De plus, hn# f# hn# = (hn f hn )# donc d’après le lemme 21 l’application hn f h−1 n est un automorphisme. En considérant la courbe C contractée sur p0 par h−1 (la droite à l’infini) et le fait n que f est un automorphisme, nous avons f (p0 ) = p0 , ce qui implique que l = h = 0. En utilisant NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS 17 le même argument et le fait que d(f# hn# (wn ), hn# (wn )) ≤ εn nous obtenons f (q0 ) = q0 qui implique k = m = 0. À présent, nous pouvons supposer j = 1. Ainsi, f est un automorphisme affine : f : (x, y) 7→ (ax + b, cy + d). −1 Calculons hn f h−1 et h f h et regardons à quelles conditions ce sont des automorphismes de n n n degré 1 de A2k̄ . n n hn f h−1 n = (y, y − x) ◦ (ax + b, cy + d) ◦ (x − y, x) = (cx + d, (cx + d)n + ay − axn − b) = (cx + d, xn (cn − a) + ncn−1 dxn−1 + · · · + ncdn−1 x + ay + dn − b). De même, nous avons : n n n−1 n−1 h−1 by + · · · + nabn−1 y + cx + bn − d, ay + b). n f hn = (y (a − c) + na −1 2 Comme les applications hn f h−1 n et hn f hn sont des automorphismes affines de Ak̄ , les coefficients a et c de f vérifient les relations : cn = a et c = an Cela signifie que a et c appartiennent à l’ensemble Un2 −1 des racines (n2 − 1)-ème de l’unité car f est un automorphisme et donc a et c sont non nuls. Supposons dans un premier temps que n ≥ 3. En considérant les coefficients de xn−1 et y n−1 nous avons : ncn−1 d = nan−1 b = 0. Comme la caractéristique du corps ne divise pas n et que a et c sont non nuls, nous obtenons d = b = 0. Pour n ≥ 3, f est donc de la forme (x, y) 7→ (ax, cy) avec a, c ∈ Un2 −1 et an = c, ainsi l’ensemble Fixεn {h2n# (wn ), h−2 n# (wn )} est fini. Si maintenant n = 2, nous ne pouvons pas conclure directement. Par hypothèse, f appartient à Fixε2 {h22# (w2 ), h−2 2# (w2 )} cela signifie que −2 2 2 d(f# h−2 2# (w2 ), h2# (w2 )) ≤ ε2 et d(f# h2# (w2 ), h2# (w2 )) ≤ ε2 . 2 Comme h−2 2# et h2# sont des isométries nous avons en fait : −2 2 d(h22# f# h−2 2# (w2 ), w2 ) ≤ ε2 et d(h2# f# h2# (w2 ), w2 ) ≤ ε2 . 2 D’après le lemme 21, les applications h22 f h−2 et h−2 2 2 f h2 sont de degré 1. De plus le point p0 (respectivement le point q0 ) est le seul point base de h22 (respectivement de h−2 2 ) appartenant −1 −1 2 à Pk̄ . Par le même argument que précédemment, h2 f h2 préserve p0 et h2 f h2 préserve q0 . Nous obtenons que 2cd = 0 et 2ab = 0. Comme nous sommes en caractéristique différente de 2 et que f est un automorphisme nous devons avoir a et c non nuls donc b = d = 0. Finalement, lorsque n = 2, f est de la forme (x, y) 7→ (ax, cy) avec a, c ∈ U3 et a2 = c. L’ensemble Fixε2 {h22# (w2 ), h−2  2# (w2 )} est fini comme attendu. Références [BC16] [Bea95] [BF02] [BH99] J. Blanc & S. Cantat – « Dynamical degrees of birational transformations of projective surfaces », J. Amer. Math. Soc. 29 (2016), p. 415–471. A. F. Beardon – The geometry of discrete groups, Graduate Texts in Mathematics, vol. 91, SpringerVerlag, New York, 1995. M. Bestvina & K. Fujiwara – « Bounded cohomology of subgroups of mapping class groups », Geometry and Topology 6 (2002), p. 69–89 (electronic). M. R. Bridson & A. Haefliger – Metric spaces of non-positive curvature, Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol. 319, Springer-Verlag, Berlin, 1999. NON SIMPLICITÉ DU GROUPE DE CREMONA SUR TOUT CORPS [Cal07] [Can11] [CD13] [CL13] [Cou14] [DGO14] [Fav10] [Giz94] [Gui14] [KSC04] [Lam02] [Man86] [Osi16] [SB15] 18 D. Calegari – Foliations and the geometry of 3-manifolds, Oxford Mathematical Monographs, Oxford University Press, Oxford, 2007. S. Cantat – « Sur les groupes de transformations birationnelles des surfaces », Annals of Mathematics. Second Series 174 (2011), p. 299–340. D. Cerveau & J. Déserti – Transformations birationnelles de petit degré, Cours Spécialisés [Specialized Courses], vol. 19, Société Mathématique de France, Paris, 2013. S. Cantat & S. Lamy – « Normal subgroups in the Cremona group », Acta Math. 210 (2013), p. 31–94. R. Coulon – « Théorie de la petite simplification : une approche géométrique », Séminaire Bourbaki 1089 (2014). F. Dahmani, V. Guirardel & D. Osin – « Hyperbolically embedded subgroups and rotating families in groups acting on hyperbolic spaces », À paraître aux Memoirs of the A.M.S., arxiv :1111.7048v5 (2014). C. Favre – « Le groupe de Cremona et ses sous-groupes de type fini », Astérisque (2010), no. 332, p. Exp. No. 998, vii, 11–43, Séminaire Bourbaki. Volume 2008/2009. Exposés 997–1011. M. H. Gizatullin – « The decomposition, inertia and ramification groups in birational geometry », in Algebraic geometry and its applications (Yaroslavl’, 1992), Aspects Math., E25, Vieweg, Braunschweig, 1994, p. 39–45. V. Guirardel – « Geometric small cancellation », in Geometric Group Theory (M. Bestvina, M. Sageev & K. Vogtmann, éds.), vol. 21, IAS/Park City Mathematics Institute, 2014. J. Kollár, K. E. Smith & A. Corti – Rational and nearly rational varieties, Cambridge Studies in Advanced Mathematics, vol. 92, Cambridge University Press, Cambridge, 2004. S. Lamy – « Une preuve géométrique du théorème de Jung », Enseign. Math. (2) 48 (2002), no. 3-4, p. 291–315. Y. I. Manin – Cubic forms, North-Holland Mathematical Library, vol. 4, North-Holland Publishing Co., Amsterdam, 1986. D. Osin – « Acylindrically hyperbolic groups », Trans. Amer. Math. Soc. 368 (2016), p. 851–888. N. Shepherd-Barron – « Some effectivity questions for plane Cremona transformations », arxiv :1311.6608v4 (2015). Institut de Mathématiques de Toulouse, Université Paul Sabatier, 118 route de Narbonne, 31062 Toulouse Cedex 9, France E-mail address: [email protected]
4math.GR
arXiv:1101.2245v3 [cs.DS] 4 Oct 2015 Invertible Bloom Lookup Tables Michael T. Goodrich Dept. of Computer Science University of California, Irvine http://www.ics.uci.edu/˜goodrich/ Michael Mitzenmacher Dept. of Computer Science Harvard University http://www.eecs.harvard.edu/˜michaelm/ Abstract We present a version of the Bloom filter data structure that supports not only the insertion, deletion, and lookup of key-value pairs, but also allows a complete listing of the pairs it contains with high probability, as long the number of keyvalue pairs is below a designed threshold. Our structure allows the number of keyvalue pairs to greatly exceed this threshold during normal operation. Exceeding the threshold simply temporarily prevents content listing and reduces the probability of a successful lookup. If entries are later deleted to return the structure below the threshold, everything again functions appropriately. We also show that simple variations of our structure are robust to certain standard errors, such as the deletion of a key without a corresponding insertion or the insertion of two distinct values for a key. The properties of our structure make it suitable for several applications, including database and networking applications that we highlight. 1 Introduction The Bloom filter data structure [5] is a well-known way of probabilistically supporting dynamic set membership queries that has been used in a multitude of applications (e.g., see [8]). The key feature of a standard Bloom filter is the way it trades off query accuracy for space efficiency, by using a binary array T (initially all zeroes) and k random hash functions, h1 , . . . , hk , to represent a set S by assigning T [hi (x)] = 1 for each x ∈ S. To check if x ∈ S one can check that T [hi (x)] = 1 for 1 ≤ i ≤ k, with some chance of a false positive. This representation of S does not allow one to list out the contents of S given only T . This aspect of Bloom filters is sometimes viewed as a feature, in settings where some degree of privacy protection is desired (e.g., see [2, 3, 18, 27, 30]). Still, in many domains one would benefit from a similar set representation that would also allow listing out the set’s contents [17]. 1 In this paper, we are interested not in simply representing a set, but instead in methods for probabilistically representing a lookup table (that is, an associative memory) of key-value pairs, where the keys and values can be represented as fixed-length integers. Unlike previous approaches (e.g., see [6, 9]), we specifically desire a data structure that supports the listing out of all of its key-value pairs. We refer to such a structure as an invertible Bloom lookup table (IBLT). 1.1 Related Work Our work can be seen as an extension of the invertible Bloom filter data structure of Eppstein and Goodrich [17], modified to store key-value pairs instead of only keys. Our analysis, however, supersedes the analysis of the previous paper in several respects, in terms of efficiency and tightness of the analysis (as well as correcting some small deficiencies). In particular, our analysis demonstrates the natural connection between these data structures and cores of random hypergraphs, similar to the connection found previously for cuckoo hashing and erasure-correcting codes (e.g., see [16, 23]). This provides both a significant constant factor reduction in the required space for the data structure, as well as an important reduction in the error probability (to inverse polynomial, from constant in [17]). In addition, our IBLT supports some usage cases and applications (discussed later in this section) that are not supported by a standard invertible Bloom filter. Given its volume, reviewing all previous work on Bloom filters is, not surprisingly, beyond the scope of this paper (e.g., see [7, 8, 33] for some excellent surveys). Nevertheless, two closely related works include Bloomier filters [9] and Approximate Concurrent State Machines (ACSMs) [6], which are structures to store and track key-value pairs. Song et al. [35] store elements in a Bloom-like hash table in a fashion that is somewhat similar to that of a cuckoo hash table [15, 26, 29]. Cohen and Matias [12] describe an extended Bloom filter that allows for multiplicity queries on multisets. While an IBLT is not intended for changing values, it can be used in such settings where a key-value pair can be explicitly deleted and a new value for the key re-inserted. Again, an IBLT has additional features, including listing, graceful handling of data exceeding the listing threshold, and counting multiplicities, which make it useful for several applications where these other structures are insufficient. Another similar structure is the recently developed counter braid architecture [22], which keeps an updatable count field for a set of flows in a compressed form, with the compressed form arising by a careful use of hashing and allowing reconstruction of the count for each flow. Unlike an IBLT, however, the flow list must be kept explicitly to read out the flow counts, and such lists do not allow for direct lookups of individual values. There are several other differences from our work due to their focus on counters, but perhaps most notable is their decoding algorithm, which utilizes belief propagation. Additional work in the area of approximate counting of a similar flavor but with very different goals from the IBLT includes the well-known CM-sketch [13] and recent work by Price [32]. 2 1.2 Our Results We present a deceptively simple variation of the Bloom filter data structure that is designed for key-value pairs and further avoids the limitation of previous structures (such as [6, 9]) that do not allow the listing of contents. As mentioned above, we call our structure an invertible Bloom lookup table, or IBLT for short. Our IBLT supports insertions, deletions, and lookups in O(k) time, where k is the number of random hash functions used (which will typically be a constant in practice). Just as Bloom filters have false positives, our lookup operation works only with constant probability, although this probability can be made quite close to 1. Our data structure also allows for a complete listing of the key-value pairs the structure contains, with high probability, whenever the current number, n, of such pairs lies below a certain threshold capacity, t, a parameter that is part of the structure’s design. This listing takes O(t) time. In addition, because the content-listing operation succeeds with high probability, one can also use it as a backup in the case that a standard lookup fails—namely, if a lookup fails, perform a listing of key-value pairs until one can retrieve a value for the desired key. Our IBLT construction is also space-efficient, requiring space1 at most linear in t, the threshold number of keys, even if the number, n, of stored key-value pairs grows well beyond t (for example, to polynomial in t) at points in time. One could of course instead keep an actual list of key-value pairs with linear space, but this would require space linear in n, i.e., the maximum number of keys, not the target number, t, of keys. Keeping a list also necessarily requires more computationally expensive lookup operations than our approach supports. We further show that with some additional checksums we can tolerate various natural errors in the system. For example, we can cope with key-value pairs being deleted without first being inserted, or keys being inserted with the same value multiple times, or keys mistakenly being inserted with multiple values simultaneously. Interestingly, together with its contents-listing ability, this error tolerance leads to a number of applications of the IBLT, which we discuss next. 1.3 Applications and Usage Cases There are a number of possible applications and usage cases for invertible Bloom lookup tables, some of which we explore here. Database Reconciliation Suppose Alice and Bob hold distinct, but similar, copies, DA and DB , of an indexed database, D, and they would like to reconcile the differences between DA and DB . For example, Alice could hold a current version of D and Bob could hold a backup, or Alice and Bob could represent two different copies of someone’s calendar database (say, respectively on a desktop computer and a smartphone) that now need to be symmetrically synchronized. Such usage cases are natural in database systems, particularly for systems that take the approach advocated in an 1 As in the standard RAM model, we assume in this paper that keys and values respectively fit in a single word of memory (which, in practice, could actually be any fixed number of memory words), and we characterize the space used by our data structure in terms of the number of memory words it uses. 3 interesting recent CACM article by Stonebraker [36] that argues in favor of sacrificing consistency for the sake of availability and partition-tolerance, and then regaining consistency by performing database reconciliation computations whenever needed. Incidentally, in a separate work, Eppstein et al.2 are currently empirically exploring a similar application of the invertible Bloom table technology for the reconciliation of two distributed mirrors of a filesystem (say, in a peer-to-peer network). To achieve such a reconciliation with low overhead, Alice constructs an IBLT, B, for DA , using indices as keys and checksums of her records as values. She then sends the IBLT B to Bob, who then deletes index-checksum pairs from B corresponding to all of his entries in DB . The remaining key-value pairs corresponding to insertions without deletions identify records that Alice has that Bob doesn’t have, and the remaining key-value pairs corresponding to deletions without insertions identify records that Bob has that Alice doesn’t have. In addition, as we show, Bob can also use B to identify records that they both possess but with different checksums. In this way, Alice needs only to send a message B of size O(t), where t here is an upper bound on the number of differences between DA and DB , for Bob to determine the identities of their differences (and a symmetric property holds for a similar message from Bob to Alice). Tracking Network Acknowledgments As another example application, consider a router R that would like to track TCP sessions passing through R. In this case, each session corresponds to a key, and may have an associated value, such as the source or the destination, that needs to be tracked. When such flows are initiated in TCP, particular control messages are passed that can be easily detected, allowing the router to add the flow to the structure. Similarly, when a flow terminates, control messages ending the flow are sent. The IBLT supports fast insertions and deletions and can be used to list out the current flows in the system at various times, as long as the number of flows is less than some preset threshold, t. Note this work can be offloaded simply by sending a copy of the IBLT to an offline agent if desired. Furthermore, the IBLT can return the value associated with a flow when queried, with constant probability close to 1. Finally, if at various points, the number of flows spikes above its standard level to well above t, the IBLT will still be able to list out the flows and perform lookups with the appropriate probabilities once the total load returns to t or below. Again, this is a key feature of the IBLT; all keys and values can be reconstructed with high probability whenever the number of keys is below a design threshold, but if the number of keys temporarily exceeds this design threshold and later returns to below this threshold, then the functionality will return at that later time. In this networking setting, sometimes flows do not terminate properly, leaving them in the data structure when they should disappear. Similarly, initialization messages may not be properly handled, leading to a deletion without a corresponding insertion. We show that the IBLT can be modified to handle such errors with minimal loss in performance. Specifically, we can handle keys that are deleted without being inserted, or keys that erroneously obtain multiple values. Even with such errors, we provide conditions for which all valid flows can still all be listed with high probability. Our experimental results also highlight robustness to these types of errors. (Eventually, of 2 Personal communication. 4 course, such problematic keys should be removed from the data structure. We do not concern ourselves with removal policies here; see [6] for some possibilities based on timing structures.) Oblivious Selection from a Table As a final motivating application, consider a scenario where Alice has outsourced her data storage needs, including the contents of an important indexed table, T , of size n, to a cloud storage server, Bob, because Alice has very limited storage capacity (e.g., Alice may only have a smartphone). Moreover, because her data is sensitive and she knows Bob is honest-but-curious regarding her data, she encrypts each record of T using a secret key, and random nonces, so that Bob cannot determine the contents of any record from its encryption alone. Such encryptions are not sufficient, however, to fully protect the privacy of Alice’s data, as recent attacks show that the way Alice accesses her data can reveal its contents (e.g., see [10]). Alice needs a way of hiding any patterns in the way she accesses her data. Suppose now that Alice would like to do a simple SELECT query on T and she is confident that the result will have a size at most t, which is much less than n but still more than she can store locally. Thus, she cannot use techniques from private information retrieval [11, 37], as that would either require storing results back with Bob in a way that could reveal selected indices or using yet another server besides Bob. She could use techniques from recent oblivious RAM simulations [19, 20, 31] to obfuscate her access patterns, but doing so would require O(n log2 n) I/Os. Therefore, using existing techniques would be inefficient. By using an IBLT, on the other hand, she can perfrom her SELECT query much more efficiently. The advantage comes from the fact that an insertion in an IBLT accesses a random set of cells (that is, memory locations) whose addresses depend (via random hash functions) only on the key of the item being inserted. Alice thus uses all the indices for T as keys, one for each record, and accesses memory as though inserting each record into an IBLT of size O(t). In fact, Alice only inserts those records that satisfy her SELECT query. However, since Alice encrypts each write using a secret key and random nonces, Bob cannot tell when Alice’s write operations are actually changing the records stored in the IBLT, and when a write operation is simply rewriting the same contents of a cell over again re-encrypted with a different nonce. In this way Alice can obliviously create an IBLT of size O(t) that contains the result of her query and is stored by Bob. Then, using existing methods for oblivious RAM simulation [20], she can subsequently obliviously extract the elements from her IBLT using O(t log2 t) I/Os. With this approach Bob learns nothing about her data from her access pattern. In addition, the total number of I/Os for her to perform her query is O(n + t log2 t), which is linear (and optimal) for any t that is O(n/ log2 n). We are not currently aware of any other way that Alice can achieve such a result using a structure other than an IBLT. 5 2 A Simple Version of the Invertible Bloom Lookup Table In this section, we describe and analyze a simple version of the IBLT. In the sections that follow we describe how to augment and extend this simple structure to achieve various additional performance goals. The IBLT data structure, B, is a randomized data structure storing a set of key-value pairs. It is designed with respect to a threshold number of keys, t; when we say the structure is successful for an operation with high probability it is under the assumption that the actual number of keys in the structure at that time, which we henceforth denote by n, is less than or equal to t. Note that n can exceed t during the course of normal operation, however. As mentioned earlier, we assume throughout that, as in the standard RAM model, keys and values respectively fit in a single word of memory (which, in practice, could actually be any fixed number of memory words) and that each such word can alternatively be viewed as an integer, character string, floating-point number, etc. Thus, without loss of generality, we view keys and values as positive integers. In many cases we take sums of keys and/or values; we must also consider whether word-value overflow when trying to store these sums in a memory word. (That is, the sum is larger than what fits in a data word.) As we explain in more detail at appropriate points below, such considerations have minimal effects. In most situations, with suitably sized memory words, overflow may never be a consideration. Alternatively, if we work in a system that supports graceful overflows, so that (x + y) − y = x even if the first sum results in an overflow, our approach works with negligible changes. Finally, we can also work modulo some large prime (so that vaues fit within a memory word) to enforce graceful overflow. These variations have negligible effects on the analysis. However, we point out that in many settings (except in the case where we may have duplicate copies of the same key-value pair), we can use XORs in place of sums in our algorithms, and avoid overflow issues entirely. 2.1 Operations Supported Our structure supports the following operations: • INSERT(x, y): insert the key-value pair, (x, y), into B. This operation always succeeds, assuming that all keys are distinct. • DELETE(x, y): delete the key-value pair, (x, y), from B. This operation always succeeds, provided (x, y) ∈ B, which we assume for the rest of this section. • GET(x): return the value y such that there is a key-value pair, (x, y), in B. If y = null is returned, then (x, y) 6∈ B for any value of y. With low (but constant) probability, this operation may fail, returning a “not found” error condition. In this case there may or may not be a key-value pair (x, y) in B. • LIST E NTRIES(): list all the key-value pairs being stored in B. With low (inverse polynomial in t) probability, this operation may return a partial list along with an 6 “list-incomplete” error condition. When an IBLT B is first created, it initializes a lookup table T of m cells. Each of the cells in T stores a constant number of fields, each of which corresponds to a single memory word. We emphasize that an important feature of the data structure is that at times the number of key-value pairs in B can be much larger than m, but the space used for B remains O(m) words. (We discuss potential issues with word-value overflow where appropriate.) The INSERT and DELETE methods never fail, whereas the GET and LIST E NTRIES methods, on the other hand, only guarantee good probabilistic success when n ≤ t. For our structures we shall generally have m = O(t), and often we can give quite tight analyses on the constants required, as we shall see below. 2.2 Data Structure Architecture Like a standard Bloom filter, an IBLT uses a set of k random3 hash functions, h1 , h2 , . . ., hk , to determine where key-value pairs are stored. In our case, each key-value pair, (x, y), is placed into cells T [h1 (x)], T [h2 (x)], . . . T [ht (x)]. In what follows, for technical reasons4 , we assume that the hashes yield distinct locations. This can be accomplished in various ways, with one standard approach being to split the m cells into k subtables each of size m/k, and having each hash function choose one cell (uniformly) from each subtable. Such splitting does not affect the asymptotic behavior in our analysis and can yield other benefits, including ease of parallelization of reads and writes into the hash table. (Another approach would be to select the first k distinct hash values from a specific sequence of random hash functions.) Each cell contains three fields: • a count field, which counts the number of entries that have been mapped to this cell, • a keySum field, which is the sum of all the keys that have been mapped to this cell, • a valueSum field, which is the sum of all the values that have been mapped to this cell. Given these fields, which are initially 0, performing the update operations is fairly straightforward: • INSERT(x, y): for each (distinct) hi (x), for i = 1, . . . , k do 3 We assume, for the sake of simplicity in our analysis, that the hash functions are fully random, but this does not appear strictly required. For example, the techniques of [24] can be applied if the data has a sufficient amount of entropy. For worst-case data, we are not aware of any results regarding the 2-core of a random hypergraph where the vertices for each edge are chosen according to hash functions with limited independence, which, as we will see, would be needed for such a result. Similar graph problems with limited independence have recently been studied in [1]. It is an interesting theoretical question to obtain better bounds on the randomness needed for our proposed IBLT data structure. 4 Incidentally, this same technicality can be used to correct a small deficiency in the paper of Eppstein and Goodrich [17]. 7 add 1 to T [hi (x)].count add x to T [hi (x)].keySum add y to T [hi (x)].valueSum end for • DELETE(x, y): for each (distinct) hi (x), for i = 1, . . . , k do subtract 1 from T [hi (x)].count subtract x from T [hi (x)].keySum subtract y from T [hi (x)].valueSum end for 2.3 Data Lookups We perform the GET operation in a manner similar to how membership queries are done in a standard Bloom filter. The details are as follows: • GET(x): for each (distinct) hi (x), for i = 1, . . . , k do if T [hi (x)].count = 0 then return null else if T [hi (x)].count = 1 then if T [hi (x)].keySum = x then return T [hi (x)].valueSum else return null end if end if end for return “not found” Recall that for now we assume that all insertions and deletions are done correctly, that is, no insert will be done for an existing key in B and no delete will be performed for a key-value pair not already in B. With this assumption, if the above operation returns a value y or the null value, then this is the correct response. This method may fail, returning “not found,” if it can find no cell that x maps to that holds only one entry. Also, as a value is returned only if the count is 1, overflow of the sum fields is not a concern. For a key x that is in B, consider the probability p0 that each of its hash locations contains no other item. Using the standard analysis for Bloom filters (e.g., see [8]), we find p0 is: (n−1)  k ≈ e−kn/m . p0 = 1 − m That is, assuming the table is split into k subtables of size m/k (one for each hash function), each of the other n − 1 keys misses the location independently with probability 1 − k/m. One nice interpretation of this is that the number of keys that hash to 8 the cell is approximately a Poisson random variable with mean kn/m, and e−kn/m is the corresponding probability a cell is empty. The probability that a GET for a key that is in B returns “not found” is therefore approximately k  (1 − p0 )k ≈ 1 − e−kn/m , which corresponds to the false-positive rate for a standard Bloom filter. As is standard for these arguments, these approximations can be readily replaced by tight concentration results [8]. The probability that a GET for a key that is not in B returns“not found” instead of null can be found similarly. Here, however, note that every cell hashed to by that key must be hashed to by at least two other keys from B. This is because an empty cell would lead to a null return value, and a cell with just one key hashed to it would yield the corresponding true key value, and hence also lead to a null return value for a key not in B. Using the same approximation – specifically, that the number of keys from B that land in a cell is approximately distributed as a discrete Poisson random variable with mean kn/m – we find this probability is  2.4 1 − e−kn/m − kn −kn/m e m k . Listing Set Entries Let us next consider the method for listing the contents of B. We describe this method in a destructive fashion—if one wants a non-destructive method, then one should first create a copy of B as a backup. • LIST E NTRIES(): while there’s an i ∈ [1, m] with T [i].count = 1 do add the pair (T [i].keySum , T [i].valueSum) to the output list call DELETE(T [i].keySum , T [i].valueSum) end while It is a fairly straightforward exercise to implement this method in O(m) time, say, by using a link-list-based priority queue of cells in T indexed by their count fields and modifying the DELETE method to update this queue each time it deletes an entry from B. If at the end of the while-loop all the entries in T are empty, then we say that the method succeeded and we can confirm that the output list is the entire set of entries in B. If, on the other hand, there are some cells in T with non-zero counts, then the method only outputs a partial list of the key-value pairs in B. This process should appear entirely familiar to those who work with random graphs and hypergraphs. It is exactly the same procedure used to find the 2-core of a random hypergraph (e.g., see [16, 25]). To make the connection, think of the cells as being vertices in the hypergraph, and the key-value pairs as being hyperedges, with the vertices for an edge corresponding to the hash locations for the key. The 2-core is the largest 9 sub-hypergraph that has minimum degree at least 2. The standard “peeling process” finds the 2-core: while there exists a vertex with degree 1, delete it and the corresponding hyperedge. The equivalence between the peeling process and the scheme for LIST E NTRIES is immediate. We note that this peeling process is similarly used for various erasure-correcting codes, such as Tornado codes and its derivatives (e.g., see [23]), that have, in some ways, the same flavor as this construction5 . Assuming that the cells associated with a key are chosen uniformly at random, we use known results on 2-cores of random hypergraphs. In particular, tight thresholds are known; when the number of hash values k of each is at least 2, there are constants ck > 1 such that if m > (ck + )n for any constant  > 0, LIST E NTRIES succeeds with high probability, that is with probability 1 − o(1). Similarly, if m < (ck − )n for any constant  > 0, LIST E NTRIES succeeds with probability o(1). Hence t = m/ck is (approximately) the design threshold for the IBLT. As can be found in for example [16, 25], these values are given by n o −kαxk−1 c−1 = sup α : 0 < α < 1; ∀x ∈ (0, 1), 1 − e < x . k It is easy to check from this definition that ck ≤ k, as for α = 1/k we immediately k−1 have 1 − e−x < x. In fact ck grows much mor slowly with k, as shown in Table 1, which gives numerical values for these thresholds for 3 ≤ k ≤ 7. Here we are not truly concerned with the exact values ck ; it is enough that only linear space is required. It is worthwhile noting that ck is generally close to 1, while to obtain successful GET operations we require a number of cells which is a significant constant factor larger than n. Therefore, in practice the choice of the size of the IBLT will generally be determined by the desired probability for a successful GET operation, not the need for listing. (For applications where GET operations are unimportant and listing is the key feature, further improvements can be had by using irregular IBLTs.) k ck 3 1.222 4 1.295 5 1.425 6 1.570 7 1.721 Table 1: Thresholds for the 2-core rounded to four decimal places. When we design our IBLT, depending on the application, we may want a target probability for succeeding in listing entries. Specifically, we may desire failure to occur with probability O(t−c ) for a chosen constant c (whenever n ≤ t). By choosing k sufficiently large and m above the 2-core threshold, we can ensure this; indeed, standard results give that the bottleneck is the possibility of having two edges with the same collection of vertices, giving a failure probability of O(t−k+2 ). The following theorem follows from previous work but we provide it for completeness. Theorem 1: As long as m is chosen so that m > (ck + )t for some  > 0, LIST E N TRIES fails with probability O(t−k+2 ) whenever n ≤ t. 5 Following this analogy, one could for example, consider irregular versions of the IBLT, where different keys utilize a different number of hash values; such a variation could use less space while allowing LIST E N TRIES to succeed, or could be used to allow some keys with more hash locations to obtain a better likelihood of a successful lookup. These variations are straightforward and we do not consider the details further here. 10 Proof: We describe the result in terms of the 2-core. In what follows we assume n ≤ t. The probability that j hyperedges form a non-empty 2-core is dominated by the probability that these edges utilize only jk/2 vertices. This probability is at most    jk n m jk j jk/2 2m ≤  n j  2m jk/2  jk jk e nj mjk/2 = jk 2m  jk/2  j jke e . m j For k constant, m > (ck + )n, and j ≤ γn for some constant γ, the sum of these probabilities is dominated by the term where j = 2, which corresponds to a failure probability of O(n−k+2 ). To deal separately with the case of j > γn, we note that standard analysis of the peeling process shows that, as long as m is above the decoding threshold, the probability that the peeling process fails before reaching a core of size δn for any constant δ is asymptotically exponentially small in n. (See, e.g., [14].) By this argument the case of j > γn adds a vanishing amount to the failure probability, completing the proof of the theorem. 3 Adding Fault Tolerance to an Invertible Bloom Lookup Table For cases where there can be deletions for key-value pairs that are not already in B, or values can be inserted for keys that are already in B, we require some fault tolerance. We can utilize a standard approach of adding random checksums to get better fault tolerance. Extraneous Deletions Let us first consider a case with extraneous deletions only. Specifically, we assume a key-value pair might be deleted without a corresponding insertion; however, in this first setting we still assume each key is associated with a single value, and is not inserted or deleted multiple times at any instant. This causes a variety of problems for both the GET and LIST E NTRIES routines. For example, it is possible for a cell to have an associated count of 1 even if more than one key has hashed to it, if there are corresponding extraneous deletions; this causes us to re-evaluate our LIST E NTRIES routine. To help deal with these issues, we add to our IBLT structure. We assume that each key x has an additional hash value given by a hash function G1 (x), which in general we assume will take on uniform random values in a range [1, R]. We then require each cell has the following additional field: • a hashkeySum field, which is the sum of the hash values, G1 (x), for all the keys that have been mapped to this cell. The hashkeySum field must be of sufficiently many bits and the hash function must be sufficiently random to make collisions sufficiently unlikely; this is not hard to achieve 11 in practice. Our insertion and deletion operations must now change accordingly, in that we now must add G1 (x) to each T [hi (x)].hashkeySum on an insertion and subtract G1 (x) during a deletion. The pseudocode for these and the other operations is given in Figure 3 at the end of this paper. The hashkeySum field can serve as an extra check. For example, to check when a cell has a count of 1 that it corresponds to a cell without extraneous deletions, we check G1 (x) field against the hashkeySum field. For an error to occur, we must have that a deletion has caused a count of 1 where the count should be higher, and the hashed key values must align so that their sum causes a false check. This probability is clearly at most 1/R (using the standard principle of deferred decisions, the “last hash” must take on the precise wrong value for a false check). We will generally assume that R is chosen large enough that we can assume a false match does not occur throughout the lifetime of the data structure, noting that only O(log n) bits are needed to handle lifetimes that are polynomial in n. Notice that even if sum fields overflow, as long as they overflow gracefully, the probability of a false check is still 1/R. Let us now consider GET operations. The natural approach is to assume that the hashkeySum field will not lead to a false check, as above. In this case, on a GET of a key x, if the count field is 0, and the keySum and hashkeySum are also 0, one should assume that the cell is in fact empty, and return null. Similarly, if the count field is 1, and the keySum and hashkeySum match x and G1 (x), respectively, then one should assume the cell has the right key, and return its value. In fact, if the count field is −1, and after negating keySum and hashkeySum the values match x and G1 (x), respectively, one should assume the cell has the right key, except that it has been deleted instead of inserted! In our pseudocode we return the value, although one could also flag it as an extraneous deletion as well. Note, however, that we can no longer return null if the count field is 1 but the keySum field does not match x; in this case, there could be, for example, an additional key inserted and an additional key extraneously deleted from that cell, which would cause the field to not match even if x was hashed to that cell. If we let n be the number of keys either inserted or extraneously deleted in the IBLT, k then this reduces the probability of returning null for a key not in B to 1 − e−kn/m . That is, to return null we must have at least one cell with zero key-value pairs from B hashing to it, which occurs (approximately) with the given probability (using our Poisson approximation). For the LIST E NTRIES operation, we again use the hashkeySum field to check when a cell has a count of 1 that it corresponds to a cell without extraneous deletions. Note here that an error in this check will cause the entire listing operation to fail, so the probability of a false check should be made quite low—certainly inverse polynomial in n. Also note, again, that we can make progress in recovering keys with cells with a count of −1 as well, if the cell contains only one extraneously deleted key and no inserted keys. That is, if a cell contains a count of −1, we can negate the count, keySum, and hashkeySum fields, check the hash value against the key to prevent a false match, and if that check passes recover the key and remove it (in this case, add it back in) to the other associated cells. Hence, a cell cannot yield a key during the listing process only if more than one key, either inserted or deleted, has hashed to that cell. This is now exactly the same setting as in the original case of no extraneous deletions, 12 and hence (assuming that no false checks occur!) the same analysis applies, with n representing the number of keys either inserted or extraneously deleted. We give the revised pseudo-code descriptions in Figure 3. Multiple Values A more challenging case for fault tolerance occurs when a key can be inserted multiple times with different values, or inserted and deleted with different values. If a key is inserted multiple times with different values, not only can that key not be recovered, but every cell associated with that key has been poisoned, in that it will not be useful for listing keys, as it cannot have a count of 1 even as other values are recovered. (A later deletion of a key-value pair could correct this problem, of course, but the cell is poisoned at the time.) The same is true if a key is inserted and deleted with different values, and here the problem is potentially even worse: if a single other key hashes to that cell, the count may be 1 and the keySum and hashkeySum fields will be correct even though the valueSum field will not match the other key’s value, causing errors. Correspondingly, we introduce an additional check for the sum of the values at a cell, using a hash function G2 (y) for the values, and adding the following field: • a hashvalueSum field, which is the sum of the hash values G2 (y) for all the values that have been mapped to this cell. One can then check that the hash of the keySum and valueSum take on the appropriate values when the count field of a cell is 1 (or −1) in order to see if listing the key-value pair is appropriate. The question remains whether the poisoned cells will prevent recovery of key values. Here we modify the goal of LIST E NTRIES to return all key-value pairs for all valid keys with high probability—that is, all keys with a single associated value at that time. We first claim that if the invalid keys make up a constant fraction of the n keys that this is not possible under our construction with linear space. A constant fraction of the cells would then be poisoned, and with constant probability each valid key would then hash solely to poisoned cells, in which case the key could not be recovered. However, it is useful to consider these probabilities, as in practical settings these quantities will determine the probability of failure. For example, suppose γn keys are invalid for some constant γ. By our previous analysis, the fraction of cells that are  poisoned is concentrated around 1 − e−kγn/m , and hence the probability that any k specific valid key has all of its cells poisoned is 1 − e−kγn/m . (While there are other possible ways a key could not be recovered, for example if two keys have all but one of their cells poisoned and their remaining cell is the same, this gives a good first approximation for reasonable values, as other terms will generally be lower order when these probabilities are small.) For example, in a configuration we use in our experiments below, we choose k = 5, m/n = 8, and γ = 1/10; in this case, the probability of a specific valid key being unrecoverable is approximately 8.16 · 10−7 , which may be quite suitable for practice. For a more theoretical asymptotic analysis, suppose instead that there are only n1−β invalid keys. Then if each key uses at least d1/βe + 1 hash functions, with high probability every valid key will have at least one hash location that does not coincide with 13 a invalid cell. This alone does not guarantee reconstructing the valid key-value pairs, but we can extend this idea to show LIST E NTRIES can provably successfully obtain all valid keys even with n1−β invalid keys; by using k = d1/βe + 4 hash functions, we can guarantee with high probability that every valid key has at least 3 hash locations without an invalid cell. (One can raise the probability to any inverse polynomial in n by changing the constant 4 as desired.) Indeed, we can determine the induced distribution for the number of neighbors that are unpoisoned cells for the valid keys, but the important fact is that the number of keys with k hashes to unpoisoned cells in n − o(n). It follows from the standard analysis of random cores (e.g., see Molloy [25]) that the same threshold as for the original setting with k hash functions applies. Hence the number of cells needed will again be linear in n (with the coefficient dependent on β) in order to guarantee successful listing of keys with high probability. This yields the following theorem: Theorem 2: Suppose there are n1−β invalid keys. Let k = d1/βe + 4. Then if m > (ck + )n for some  > 0, LIST E NTRIES succeeds with high probability. While this asymptotic analysis provides some useful insights, namely that full recovery is practical, in practice we expect the analysis above based on setting γ so that the number of invalid keys is γn will prove more useful for parameter setting and predicting performance. Extensions to Duplicates Interestingly, using the same approach as for extraneous deletions, our IBLT can handle the setting where the same key-value pair is inserted multiple times. Essentially, this means the IBLT is robust to duplicates, or can also be used to obtain a count for key-value pairs that are inserted multiple times. We again use the additional hashkeySum and valueSum fields. When the count field is j for the cell, we take the keySum, hashkeySum, and valueSum fields and divide them by j to obtain the proposed key, value, and corresponding hash. (Here, note we cannot use XORs in place of sums in our algorithms.) If the key hash matches, we assume that we have found the right key and return the lookup value or list the key-value pair accordingly, depending on whether a GET or LIST E NTRIES operation is being performed. If it is possible to have the same key appear with multiple values, as above, then we must also make use of the hashvalueSum fields, dividing it by j and using it to check that the value is correct as well. For the listing operation, the IBLT deletes j copies of the key-value pair from the other cells.6 The point here is that a key that appears multiple times, just as a key that is deleted rather than inserted, can be handled without significant change to the decoding approach. The one potential issue with duplicate key-value pairs is in the case of word-value overflow for the memory locations containing the sum; in case of overflow, it may be that one does not detect that the key hash matches (and similarly for the hashvalueSum fields). In practice this may limit the number of duplicates that can be tolerated; however, for small numbers of duplicates and suitably sized memory fields, overflow 6 Note that here we are making use of the assumption that the hash locations are distinct for a key; otherwise, the count for the number of copies at this location might not match the number of copies of the key in all the other locations. 14 will be a rare occurrence (that would require large numbers of keys to hash to the same cell, a provably probabilistically unlikely event). Fault Tolerance to Lost Memory Subblocks We offer one additional way this structure proves resilient to various possible faults. Suppose that the structure is indeed set up with k different memory subblocks, one for each hash function. Conceivably, one could lose an entire subblock, and still be able to recover all the keys in a listing with high probability, with only a reduction in the success probability of a GET (as long as k − 1 hashes with a smaller range space remains sufficient for listing). In some sense, this is because the system is arguably overdesigned; obtaining high lookup success probability when n is less than the threshold t requires a large number of empty cells, and this space is far more than is needed for decoding. An Example Application As an example of where these ideas might be used, we return to our mirror site application. An IBLT B from Alice can be used by Bob to find filename-checksum (key-value) pairs where his filename has a different checksum than Alice’s. After deleting all his key-value pairs, he lists out the contents of B to find files that he or Alice has that the other does not. The IBLT might not be empty at this point, however, as the listing process might not have been able to complete due to poisoned cells, where deletions were done for keys with values different than Alice’s values. To discover these, Bob can re-insert each of his key-value pairs, in turn, to find any that may unpoison a cell in B (where he immediately deletes ones that don’t lead to a new unpoisoned cell). If a new unpoisoned cell is found found (using the G1 hash function as a check), then Bob can then remove a key-value pair with the same key as his but with a different value (that is, with Alice’s value). Note Bob may then also be able to possibly perform more listings of keys that might have been previously unrecovered because of the poisoned cells. Repeating this will discover with high probability all the key-value pairs where Alice and Bob differ. 4 Space-Saving for an Invertible Bloom Lookup Table Up to this point, we have not been concerned with minimizing space for our IBLT structure, noting that it can be done in linear space. Nevertheless, there are a variety of techniques available for reducing the space required, generally at the expense of additional computation and shuffling of memory, while still keeping constant amortized or worst-case time bounds on various operations. Whether such efforts are worthwhile depends on the setting; in some applications space may be the overriding issue, while in others speed or even simplicity might be more relevant. We briefly point to some of the previous work that can offer further insights. IBLTs, like other Bloom filter structures, often have a great deal of wasted space corresponding to zero entries that can be compressed or fixed-length space required for fields like the count field that can be made variable-length depending on the value. This wasted space can be compressed away using techniques for keeping compressed forms of arrays, including those for storing arrays of variable-length strings. Such mechanisms are explored in for example [4, 28, 34] and can be applied here. 15 A simpler, standard approach (saving less space) is to use quotienting, whereby the hash value for a key determines a bucket and an additional quotient value that can be stored. Quotienting can naturally be used with the IBLT to reduce the space used for storing for example the keySum or the hashkeySum values. Also, as previously mentioned, in settings without multiple copies of the same key-value pair, we can use XORs in place of sums to save space. Finally, we recall that the space requirements arise because of the desire for high accuracy for GET operations, not because of the LIST E NTRIES operation. If one is willing to give up lookup accuracy—which may be the case if, for example, one expects the system to be overloaded much of the time—then less space is needed to maintain successful listing. 5 Simulations and Experiments We have run a number of simulations to test the IBLT structure and our analysis. In these experiments we have not focused on running time; a practical implementation could require significant optimization. Also, we have not concerned ourselves with issues of word-value overflow. Because of this, there is no need to simulate the data structure becoming overloaded and then deleting key-value pairs, as the state after deletions would be determined entirely by the key-value pairs in the system. Instead, we focus on the success probability of the listing of keys and, to a lesser extent, on the success probability for a GET operation. Overall, we have found that the IBLT works quite effectively and the performance matches our theoretical analysis. We provide a few example results. In all of the experiments here, we have chosen to use five hash functions. First, our calculated asymptotic thresholds for decoding from Table 1 are quite accurate even for reasonably small values. For example, in the setting where there are no duplicate keys or extraneous deletions of keys, we repeatedly performed 20,000 simulations with 10,000 keys, and varied the number of cells. Table 1 suggests an asymptotic threshold for listing all entries near 14,250. As shown in Figure 1(a), around this point we see a dramatic increase in the average number of key-value pairs recovered when performing our LIST E NTRIES operation. In fact, at 14,500 cells only two trials failed to recover all key-value pairs, and with 14,600 cells or more all trials successfully recover all key-value pairs. We performed an additional 200,000 trials with 14,600 cells, and again all trials succeeded. In Figure 1(b), we consider 20,000 simulations with 100,000 keys, where the corresponding threshold should be near 142,500. With more keys, we expect tighter concentration around the threshold, and indeed with 144,000 cells or more all trials successfully recover all key-value pairs. We performed an additional 200,000 trials with with 144,000 cells, and again all trials succeeded. We acknowledge that more simulations would be required to obtain detailed bounds on the probability of failure to recover all key-value pairs for specific values of the number of key-value pairs and cells. This is equivalent to the well-studied problem of “finite-length analysis” for related families of error-correcting codes. Dynamic programming techniques, as discussed in [21] and subsequent follow-on work, can be applied to obtain such bounds. 16 Our next tests of the IBLT allow duplicate keys with the same value and extraneous deletions, but without keys with multiple values. Our analysis suggests this should work exactly as with no duplicate or extraneous deletions, and our simulations verify this. In these simulations, we had each key result in a duplicate with probability 1/5, and each key result in a deletion in place of an insertion with probability 1/5. Using a check on key and value fields, in 20,000 simulations with 10,000 keys, 80,000 cells, and 5 hash functions, a complete listing was obtained every time, and GET operations were successful on average for 97.83 percent of the keys, matching the standard analysis for a Bloom filter. Results were similar with 20,000 runs with 100,000 keys and 800,000 cells, again with complete recovery each time and GET operations successful on average for 97.83 percent of the keys. Finally, we tested the IBLT with keys that erroneously obtain multiple values. As expected, these keys can prevent recovery of other key-value pairs during listing, but do not impact the success probability of GET operations for other keys. For example, again using a check on key and value fields, in 20,000 simulations with 10,000 keys of which 500 had multiple values, 80,000 cells, and 5 hash functions, the 9500 remaining key-value pairs were recovered 19,996 times; the remaining 4 times all but one of the 9500 key-value pairs was recovered. With 1000 keys with multiple values, the remaining key-value pairs were recovered 19,872 times, and again the remaining 128 times all but one of the 9000 key-value pairs was recovered. The average success rate for GET operations remained 97.83 percent on the valid keys in both cases, as would be expected. We note that with 10,000 keys with 1,000 with multiple values, our previous back-of-the-envelope calculation showed that each valid key would fail with probability roughly 8.16·10−7 ; hence, with 9,000 other keys, assuming independence we would estimate the probability of complete recovery at approximately 0.9927, closely matching our experimental results. More detailed results are give in Figures 2(a) and 2(b), where we vary the number keys with multiple values for two settings: 10,000 keys and 80,000 cells, and 100,000 keys and 800,000 cells. The results are based on 20,000 trials. As can be seen complete recovery is possible with large numbers of multiplevalued keys in both cases, but naturally the probability of complete recovery becomes worse with larger numbers of keys even if the percentage of invalid keys is the same. We emphasize that even when complete recovery does not occur in this setting, generally almost all keys with a single value can be recovered. For example, in Table 2 we consider three experiments. The first is for 10,000 keys, 80,000 cells, and 1,000 keys with duplicate values. The second is the same but with 2,000 keys with duplicate values. The third is for 100,000 keys, 800,000 cells, and 10,000 keys with duplicate values. Over all 20,000 trials for each experiment, in no case were more than 3 valid keys unrecovered. The main point of Table 2 is that with suitable design parameters, even when complete recovery is not possible because of invalid keys, the degradation is minor. We suspect this level of robustness may be useful for some applications where almost-complete recovery is acceptable. 17 Experiment 1 Experiment 2 Experiment 3 0 99.360 83.505 92.800 Unrecovered Keys 1 2 3 0.640 0.000 0.000 14.885 1.520 0.090 6.915 0.265 0.020 Table 2: Percentage of trials where 1, 2, and 3 keys are left unrecovered. 6 Conclusion and Future Work We have given an extension to the Bloom filter data structure to key-value pairs and the ability to list out its contents. This structure is deceptively simple, but is able to achieve functionalities and efficiencies that appear to be unique in many respects, based on our analysis derived from recent results on 2-cores in hypergraphs. One possible direction for future work includes whether one can easily include methods for allowing for multiple values as a natural condition instead of an error. Acknowledgments Michael Goodrich was supported in part by the National Science Foundation under grants 0724806, 0713046, 0847968, and 0953071. Michael Mitzenmacher was supported in part by the National Science Foundation under grants IIS-0964473, CCF0915922 and CNS-0721491, and in part by grants from Yahoo! Research, Cisco, Inc., and Google. References [1] N. Alon and A. Nussboim. k-wise independent random graphs. In Proceedings of the 49th Annual IEEE Symposium on Foundations of Computer Science, pages 813–822, 2008. [2] M. Bawa, R. J. Bayardo, Jr, R. Agrawal, and J. Vaidya. Privacy-preserving indexing of documents on the network. The VLDB Journal, 18(4):837–856, 2009. [3] S. M. Bellovin and W. R. Cheswick. Privacy-enhanced searches using encrypted Bloom filters. Technical Report CUCS-034-07, Columbia University, Dept. of Computer Science, 2007. [4] D. Blandford and G. Blelloch. Compact dictionaries for variable-length keys and data with applications. ACM Transactions on Algorithms (TALG), 4(2):1–25, 2008. [5] B. Bloom. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 13(7):422–426, 1970. 18 [6] F. Bonomi, M. Mitzenmacher, R. Panigrahy, S. Singh, and G. Varghese. Beyond Bloom filters: From approximate membership checks to approximate state machines. ACM SIGCOMM Computer Communication Review, 36(4):326, 2006. [7] F. Bonomi, M. Mitzenmacher, R. Panigrahy, S. Singh, and G. Varghese. An improved construction for counting Bloom filters. In Proceedings of the European Symposium on Algorithms (ESA), volume 4168 of LNCS, pages 684–695, 2006. [8] A. Broder and M. Mitzenmacher. Network applications of Bloom filters: A survey. Internet Mathematics, 1(4):485–509, 2004. [9] B. Chazelle, J. Kilian, R. Rubinfeld, and A. Tal. The Bloomier filter: an efficient data structure for static support lookup tables. In Proceedings of the Fifteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 30–39, 2004. [10] S. Chen, R. Wang, X. Wang, and K. Zhang. Side-channel leaks in web applications: a reality today, a challenge tomorrow. In Proceedings of the 31st IEEE Symposium on Security and Privacy, 2010. [11] B. Chor, E. Kushilevitz, O. Goldreich, and M. Sudan. Private information retrieval. J. ACM, 45:965–981, November 1998. [12] S. Cohen and Y. Matias. Spectral Bloom filters. In Proceedings of the 2003 ACM SIGMOD International Conference on Management of Data, pages 241–252, 2003. [13] G. Cormode and S. Muthukrishnan. An improved data stream summary: the count-min sketch and its applications. J. Algorithms, 55:58–75, April 2005. [14] R. Darling and J. Norris. Differential equation approximations for Markov chains. Probability Surveys, 5:37–79, 2008. [15] L. Devroye and P. Morin. Cuckoo hashing: further analysis. Inf. Process. Lett., 86(4):215–219, 2003. [16] M. Dietzfelbinger, A. Goerdt, M. Mitzenmacher, A. Montanari, R. Pagh, and M. Rink. Tight thresholds for cuckoo hashing via XORSAT. In Proceedings of ICALP, pages 213–225, 2010. [17] D. Eppstein and M. T. Goodrich. Straggler identification in round-trip data streams via Newton’s identities and invertible Bloom filters. IEEE Transactions on Knowledge and Data Engineering, to appear. [18] E.-J. Goh. Secure indexes. Cryptology ePrint Archive, Report 2003/216, 2003. http://eprint.iacr.org/2003/216/. [19] O. Goldreich and R. Ostrovsky. Software protection and simulation on oblivious RAMs. J. ACM, 43(3):431–473, 1996. 19 [20] M. T. Goodrich and M. Mitzenmacher. MapReduce parallel cuckoo hashing and oblivious RAM simulations. CoRR, abs/1007.1259, 2010. [21] R. Karp, M. Luby, and A. Shokrollahi. Finite length analysis of LT codes. In Proceedings of the International Symposium on Information Theory, page 39, 2004. [22] Y. Lu, A. Montanari, B. Prabhakar, S. Dharmapurikar, and A. Kabbani. Counter braids: a novel counter architecture for per-flow measurement. In Proceedings of the 2008 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems, pages 121–132, 2008. [23] M. Luby, M. Mitzenmacher, M. Shokrollahi, and D. Spielman. Efficient erasure correcting codes. IEEE Transactions on Information Theory, 47(2):569–584, 2001. [24] M. Mitzenmacher and S. Vadhan. Why simple hash functions work: exploiting the entropy in a data stream. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 746–755, 2008. [25] M. Molloy. The pure literal rule threshold and cores in random hypergraphs. In Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms, pages 672–681. Society for Industrial and Applied Mathematics, 2004. [26] M. Naor, G. Segev, and U. Wieder. History-independent cuckoo hashing. In Proceedings of ICALP, pages 631–642, 2008. [27] R. Nojima and Y. Kadobayashi. Cryptographically secure Bloom-filters. Trans. Data Privacy, 2(2):131–139, 2009. [28] A. Pagh, R. Pagh, and S. Rao. An optimal Bloom filter replacement. In Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, page 829, 2005. [29] R. Pagh and F. F. Rodler. Cuckoo hashing. J. Algorithms, 51(2):122–144, 2004. [30] J. J. Parekh, K. Wang, and S. J. Stolfo. Privacy-preserving payload-based correlation for accurate malicious traffic detection. In LSAD ’06: Proceedings of the 2006 SIGCOMM Workshop on Large-scale Attack Defense, pages 99–106, 2006. [31] B. Pinkas and T. Reinman. Oblivious RAM revisited. In T. Rabin, editor, Advances in Cryptology (CRYPTO), volume 6223 of Lecture Notes in Computer Science, pages 502–519. Springer, 2010. [32] E. Price. Efficient sketches for the set query problem. CoRR, abs/1007.1253, 2010. [33] F. Putze, P. Sanders, and J. Singler. Cache-, hash-, and space-efficient Bloom filters. J. Exp. Algorithmics, 14:4.4–4.18, 2009. 20 [34] R. Raman and S. Rao. Succinct dynamic dictionaries and trees. In Proceeding of ICALP, pages 357–368, 2003. [35] H. Song, S. Dharmapurikar, J. Turner, and J. Lockwood. Fast hash table lookup using extended Bloom filter: An aid to network processing. In Proceedings of SIGCOMM, pages 181–192, 2005. [36] M. Stonebraker. In search of database consistency. Commun. ACM, 53:8–9, October 2010. [37] S. Yekhanin. Private information retrieval. Commun. ACM, 53:68–73, April 2010. 21 Recovery for 10000 Keys Avg. Percentage Recovered 100 80 60 40 20 0 13800 14000 14200 14400 Size of Table 14600 14800 146000 148000 (a) 10,000 keys Recovery for 100000 Keys Avg. Percentage Recovered 100 80 60 40 20 0 138000 140000 142000 144000 Size of Table (b) 100,000 keys Figure 1: Percentage of key-value pairs recovered around the threshold. Slightly over the theoretical asymptotic threshold, we obtain full recovery of all key-value pairs with LIST E NTRIES on all simulations. Each data point represents the average of 20,000 simulations. 22 Recovery with Damaged Keys Percentage Incomplete Recovery 1 0.8 0.6 0.4 0.2 0 0 200 400 600 Damaged Keys 800 1000 8000 10000 (a) 10,000 keys Recovery with Damaged Keys Percentage Incomplete Recovery 10 8 6 4 2 0 0 2000 4000 6000 Damaged Keys (b) 100,000 keys Figure 2: Percentage of trials with incomplete recovery with “damaged” keys that have multiple values. Each data point represents the average of 20,000 simulations. 23 • INSERT(x, y): for each hi (x) value, for i = 1, . . . , k do add 1 to T [hi (x)].count add x to T [hi (x)].keySum add y to T [hi (x)].valueSum add G1 (x) to T [hi (x)].hashkeySum end for • DELETE(x, y): for each hi (x) value, for i = 1, . . . , k do subtract 1 from T [hi (x)].count subtract x from T [hi (x)].keySum subtract y from T [hi (x)].valueSum subtract G1 (x) to T [hi (x)].hashkeySum end for • GET(x): for each hi (x) value, for i = 1, . . . , k do if T [hi (x)].count = 0 and T [hi (x)].keySum = 0 and T [hi (x)].hashkeySum = 0 then return null else if T [hi (x)].count = 1 and T [hi (x)].keySum = x and T [hi (x)].hashkeySum = G1 (x) then return T [hi (x)].valueSum else if T [hi (x)].count = −1 and T [hi (x)].keySum = −x and T [hi (x)].hashkeySum = −G1 (x) then return −T [hi (x)].valueSum end if end for return “not found” • LIST E NTRIES(): while there is an i ∈ [1, m] such that T [i].count = 1 or T [i].count = −1 do if T [hi (x)].count = 1 and T [hi (x)].hashkeySum = G1 (T [hi (x)].keySum) then add the pair, (T [i].keySum , T [i].valueSum), to the output list call DELETE(T [i].keySum, T [i].valueSum) else if T [hi (x)].count = −1 and −T [hi (x)].hashkeySum = G1 (−T [hi (x)].keySum) then add the pair, (−T [i].keySum , −T [i].valueSum), to the output list call INSERT(−T [i].keySum, −T [i].valueSum) end if end while Figure 3: Revised pseudo-code for tolerating extraneous deletions. 24
8cs.DS
Stochastic Gradient Descent in Continuous Time: A Central Limit Theorem Justin Sirignano∗ and Konstantinos Spiliopoulos†‡ arXiv:1710.04273v2 [math.PR] 2 Nov 2017 November 3, 2017 Abstract Stochastic gradient descent in continuous time (SGDCT) provides a computationally efficient method for the statistical learning of continuous-time models, which are widely used in science, engineering, and finance. The SGDCT algorithm follows a (noisy) descent direction along a continuous stream of data. The parameter updates occur in continuous time and satisfy a stochastic differential equation. This paper analyzes the asymptotic convergence rate of the SGDCT algorithm by proving a central limit theorem for strongly convex objective functions and, under slightly stronger conditions, for non-convex objective functions as well. An Lp convergence rate is also proven for the algorithm in the strongly convex case. 1 Introduction “Stochastic gradient descent in continuous time” (SGDCT) is a statistical learning algorithm for continuoustime models, which are common in science, engineering, and finance. SGDCT is the continuous-time analog of the well-known stochastic gradient descent. Given a continuous stream of data, stochastic gradient descent in continuous time (SGDCT) can estimate unknown parameters or functions in stochastic differential equation (SDE) models. [3] analyzes the numerical performance of SGDCT for a number of applications in finance and engineering. Batch optimization for the statistical estimation of continuous-time models may be impractical for large datasets where observations occur over a long period of time. Batch optimization takes a sequence of descent steps for the model error for the entire observed data path. Since each descent step is for the model error for the entire observed data path, batch optimization is slow (sometimes impractically slow) for long periods of time or models which are computationally costly to evaluate (e.g., partial differential equations). SGDCT provides a computationally efficient method for statistical learning over long time periods and for complex models. SGDCT continuously follows a (noisy) descent direction along the path of the observation; this results in much more rapid convergence. Parameters are updated online in continuous time, with the parameter updates θt satisfying a stochastic differential equation. Consider a diffusion Xt ∈ X = Rm : dXt = f ∗ (Xt )dt + σdWt . (1.1) The goal is to statistically estimate a model f (x, θ) for f ∗ (x) where θ ∈ Rk . The function f ∗ (x) is unknown. Wt ∈ Rm is a standard Brownian motion. The diffusion term Wt represents any random behavior of the system or environment. The functions f (x, θ) and f ∗ (x) may be non-convex. The stochastic gradient descent update in continuous time follows the SDE:   (1.2) dθt = αt ∇θ f (Xt , θt )(σσ ⊤ )−1 dXt − ∇θ f (Xt , θt )(σσ ⊤ )−1 f (Xt , θt )dt , ∗ Department of Industrial and Enterprise Systems Engineering, University of Illinois at Urbana-Champaign, Urbana, E-mail: [email protected] † Department of Mathematics and Statistics, Boston University, Boston, E-mail: [email protected] ‡ Research of K.S. supported in part by the National Science Foundation (DMS 1550918) 1 α . The where ∇θ f (Xt ; θt ) is matrix-valued and αt is the learning rate. For example, αt could equal CC0 +t parameter update (1.2) can be used for both statistical estimation given previously observed data as well as online learning (i.e., statistical estimation in real-time as data becomes available). We assume that Xt is sufficiently ergodic (to be concretely specified later in the paper) and that it has some well-behaved π(dx) as its unique invariant measure. As a general notation, if h(x, θ) is a generic L1 (π) function, then we define its average over π(dx) to be Z h(x, θ)π(dx). h̄(θ) = X Let us set g(x, θ) = E −1 1 1D 2 f (x, θ) − f ∗ (x), σσ ⊤ (f (x, θ) − f ∗ (x)) . kf (x, θ) − f ∗ (x)kσσ⊤ = 2 2 The gradient ∇θ g(Xt , θ) cannot be evaluated since f ∗ (x) is unknown. However, dXt = f ∗ (Xt )dt + σdWt is a noisy estimate of f ∗ (x)dt, which leads to the algorithm (1.2). SGDCT follows a noisy descent direction along a continuous stream of data produced by Xt . ḡ is a natural objective function for the estimation of the continuous-time R dynamics. Heuristically, it is expected that θt will tend towards the minimum of the function ḡ(θ) = X g(x, θ)π(dx). The data Xt will be correlated over time, which complicates the mathematical analysis. This differs from the standard discrete-time version of stochastic gradient descent where the the data is usually considered to be i.i.d. at every step. a.s. The authors previously proved in [3] that k∇ḡ(θt )k → 0. In this paper, we prove several new results regarding the convergence rate of the algorithm θt . The first main result of the paper is an Lp convergence rate and a central limit theorem in the case where p K ḡ(θ) is strongly convex. Let θ∗ be the global minimum of ḡ(θ). We prove that E[kθt − θ∗ k ] ≤ (C +t) p/2 for 0 √ d α . The Lp p ≥ 1 and t(θt − θ∗ ) → N (0, Σ̄) when ḡ(θ) is strongly convex and the learning rate αt is CC0 +t convergence rate is proven in Theorem 2.7 and the central limit theorem is proven in Theorem 2.8. We prove these results for models f (x, θ) with up to quadratic growth in θ and polynomial growth in x. Theorems 2.7 and 2.8 do not make use of the results in [3]. The second main result is a central limit theorem when the objective function ḡ(θ) is non-convex. We √ d prove that t(θt − θ∗ ) → N (0, Σ̄) when ḡ(θ) is non-convex with a single critical point; see Theorem 2.12. We prove this result for models f (x, θ) with up to linear growth in θ and polynomial growth in x. As a part of the proof, we also strengthen the convergence result of [3], which did not allow f (x, θ) to grow in θ; see Theorem 2.10. Analogous results for Theorems 2.7, 2.8, and 2.12 hold of course for a general class of learning rates αt ; see Proposition 2.13. The precise statement of the mathematical results and the technical assumptions required are presented in Section 2. These mathematical results are important for two reasons. First, they establish theoretical guarantees for the rate of convergence of the algorithm. Secondly, they can be used to analyze the effects of different features such as the learning rate αt , the level of noise σ, and the shape of the objective function ḡ(θ). We are able to precisely characterize the regime under which the optimal convergence rate exists as well as characterize the limiting covariance Σ̄. The regime depends entirely upon the choice of the learning rate. Rt h(X The proofs in this paper require addressing several challenges. First, fluctuations of the form α s , θs )− s 0  h̄(θs ) ds must be analyzed. We evaluate, and control with rate α2t , these fluctuations using a Poisson partial differential equation. Second, the model f (x, θ) is allowed to grow with θ. This means that the fluctuations as well as other terms can grow with θ. Therefore, we must prove an a priori stability estimate for kθt k. Proving a central limit theorem for the non-convex ḡ(θ) in Theorem 2.12 is challenging since the convergence speed of θt can become arbitrarily slow in certain regions, and the gradient can even point away from the global minimum θ∗ . We prove the central limit theorem for the non-convex case by analyzing two regimes [0, τδ ] and [τδ , ∞), where τδ is defined such that kθt − θ∗ k < δ for all t ≥ τδ . The proof also requires the analysis of stochastic integrals with anticipative integrands, which is challenging since standard approaches (such as the Itô Isometry) cannot be directly applied. 2 1.1 Literature Review The vast majority of the statistical learning, machine learning, and stochastic gradient descent literature addresses discrete-time algorithms. In contrast, this paper analyzes a statistical learning algorithm in continuous time. Below we review the existing literature that is most relevant to our work. We also comment on the importance of developing and analyzing continuous-time algorithms for addressing continuous-time models. Many discrete-time papers study algorithms for θn without the X-dynamics (for example, stochastic gradient descent with i.i.d. noise at each step). The inclusion of the X-dynamics makes analysis significantly more challenging. An L2 convergence rate and central limit theorem result for discrete-time stochastic gradient descent is presented in [8]. Our setup and assumptions are different from [8]. Our proof leverages the continuous-time nature of our setting, which is the formulation of interest in many engineering and financial problems (see [3]). [4] studies continuous-time stochastic mirror descent in a setting different than ours. In the framework of [4], the objective function is known. In this paper, we consider the statistical estimation of the unknown dynamics of a random process (i.e. the X process satisfying (1.1)). Statisticians and financial engineers have actively studied parameter estimation of SDEs, although typically not with statistical learning or machine learning approaches. The likelihood function will usually be calculated from the entire observed path of X (i.e., batch optimization) and then maximized to find the maximum likelihood estimator (MLE). Unlike in this paper, the actual optimization procedure to maximize the likelihood function is often not analyzed. Some relevant publications in the financial statistics literature include [1], [2], [7], and [10]. [7] derives the likelihood function for continuously observed X. The MLE can be calculated via batch optimization. [1] and [2] consider the case where X is discretely observed and calculate MLEs via a batch optimization approach. [10] estimates parameters by a Bayesian approach. Readers are referred to [9, 15, 11] for thorough reviews of classical statistical inference methods for stochastic differential equations. Continuous-time models are common in engineering and finance. There are often coefficients or functions in these models which are uncertain or unknown; stochastic gradient descent can be used to learn these model parameters from data. It is natural to ask why use SGDCT versus a straightforward approach which (1) discretizes the continuoustime dynamics and then (2) applies traditional stochastic gradient descent. We elaborated in detail in regards to this issue in [3], where specific examples are provided there to showcase the differences. For completeness, let us briefly discuss the issues that arise. SGDCT allows for the application of numerical schemes of choice to the theoretically correct statistical learning equation for continuous-time models. This can lead to more accurate and more computationally efficient parameter updates. Numerical schemes are always applied to continuous-time dynamics and different numerical schemes may have different properties for different continuous-time models. A priori performing a discretization to the system dynamics and then applying a traditional discrete-time stochastic gradient descent scheme can result in a loss of accuracy, or may not even converge, see [3]. For example, there is no guarantee that (1) using a higher-order accurate scheme to discretize the system dynamics and then (2) applying traditional stochastic gradient descent will produce a statistical learning scheme which is higher-order accurate in time. Hence, it makes sense to first develop the continuous-time statistical learning equation, and then apply the higher-order accurate numerical scheme. In addition to model estimation, SGDCT can be used to solve continuous-time optimization problems, such as American options. In [3], SGDCT was combined with a deep neural network to solve American options in up to 100 dimensions. Alternatively, one could discretize the dynamics and then use the Qlearning algorithm (traditional stochastic gradient descent applied to an approximation of the discrete HJB equation). However, as we showed in [3], Q-learning is biased while SGDCT is unbiased. Furthermore, in SDE models with Brownian motions, the Q-learning algorithm can blow up as the time step size ∆ becomes small; see [3] for details. 1.2 Organization of Paper In Section 2 we state our assumptions and the main results of this paper. The proof of the Lp convergence rate for p ≥ 1 is in Section 3. The proof of the CLT in the strongly convex case is in Section 4. Section 3 5 proves the central limit theorem for a class of non-convex models. In Section 6, the convergence rate results are used to analyze the behavior and dynamics of the stochastic gradient descent in continuous-time algorithm. Some technical results required for the proofs are presented in Appendix A. Appendix B contains the proof of Theorem 2.10, which strengthens the convergence result of [3]. In particular, Appendix B provides the necessary adjustments to the proofs of [3] in order to guarantee convergence in the case where the model f (x, θ) is allowed to grow with respect to θ. 2 Main Results We prove three main results. Theorem 2.7 is an Lp convergence for the strongly convex case. Theorem 2.8 is a central limit theorem for the strongly convex case. Theorem 2.12 is a central limit theorem for the non-convex case with a single critical point. We say that “the function h(θ) is strongly convex with constant C” if there exists a C > 0 such that z ⊤ ∆θ h(θ)z ≥ Cz ⊤ z for any non-zero z ∈ Rk . Conditions 2.6 and 2.11 require that CCα > 1 where Cα is the magnitude of the learning rate and C is the strong convexity constant for the objective function ḡ(θ∗ ) at point θ = θ∗ . This is an important conclusion of the convergence analysis in this paper: the learning rate needs to be sufficiently large in order to achieve the optimal rate of convergence. This dependence of the convergence rate on the learning rate is not specific to the algorithm SGDCT in this paper, but applies to other algorithms (even deterministic gradient descent algorithms). We discuss this in more detail in Section 6. It should be emphasized that the assumptions for Theorem 2.7 and Theorem 2.8 (the strongly convex case) allow for the model f (x, θ) to grow up to quadratically in θ. On the other hand, Theorem 2.12 (the non-convex case) is proven under the assumption that f (x, θ) grows up to linearly in θ. The growth of the model f (x, θ) is allowed to be polynomial in x for Theorems 2.7, 2.8, and 2.12. The proofs of Theorems 2.7, 2.8, and 2.12 are in Sections 3, 4, and 5, respectively. Some technical results required for these proofs are presented in Appendix A. Appendix B contains the changes necessary to generalize the proof of convergence of [3] from bounded ḡ(θ) to ḡ(θ) that can grow up to quadratically in θ; see Theorem 2.10 for the corresponding rigorous statement. Let us now list our conditions. Condition 2.1 guarantees uniqueness and existence of an invariant measure for the X process. Condition 2.1 and the second part of Condition 2.2 guarantee that equation (1.1) is wellposed. Condition 2.1. We assume that σσ ⊤ is non-degenerate bounded diffusion matrix and lim|x|→∞ f ∗ (x)·x = −∞ In regards to regularity of the involved functions, we impose the following Condition 2.2.  2 ∇θ g ∈ C X , Rk , ∇θ g(·, θ) ∈ Condition 2.2. 1. We assume that ∇θ g(x, ·) ∈ C 2 (Rk ) for all x ∈ X , ∂ ∂x 2 C α (X ) uniformly in θ ∈ Rk for some α ∈ (0, 1). 2. The function f ∗ (x) is C 2+α (X ) with α ∈ (0, 1). Namely, it has two derivatives in x, with all partial derivatives being Hölder continuous, with exponent α, with respect to x. 3. For every t ≥ 0, equation (1.2) is well-posed. Conditions 2.3 and 2.4 are imposed in order to guarantee that θt has bounded moments uniformly in time t. Condition 2.3. There exists a constant R < ∞ and an almost everywhere positive function κ(x) such that h−∇θ g(x, θ), θ/ kθki ≤ −κ(x) kθk , for kθk ≥ R. Condition 2.4. Consider the function 1/2  θ θ ⊤ . , τ (x, θ) = ∇θ f (x, θ)∇θ f (x, θ) kθk kθk (2.1) Then, there exists a function λ(x), growing not faster than polynomially in kxk, such that for any θ1 , θ2 ∈ Rk , t > 0 and x ∈ Rm |τ (x, θ1 ) − τ (x, θ2 )| ≤ |λ(x)|ρ (kθ1 − θ2 k) 4 (2.2) R where ρ(ξ) is an increasing function on [0, ∞) with ρ(0) = 0 and ξ>0 ρ−2 (ξ)dξ = ∞. Notice that Condition 2.4 simplifies considerably when θ is one-dimensional and that it is always true in the case where ∇θ f (x, θ) is independent of θ (which happens for example when f (x, θ) is affine in θ). p The Conditions 2.3 and 2.4 are necessary to prove that supt≥0 E[kθt k ] < K for p ≥ 2. This uniform bound on moments, which we prove in Appendix A.1, is in turn required for the proofs of the Lp convergence and central limit theorem in Theorems 2.7 and 2.8. The function g(x, θ) is allowed to grow, which means that some a priori bounds on the moments of θt are necessary. In regards to the learning rate we assume α Condition 2.5. The learning rate is αt = CC0 +t where Cα > 0 is a constant. Condition 2.5 makes the presentation of the results easier. However, as we shall see in Corollary 2.13 the α is not necessary as long as αt satisfies certain conditions. We chose to present the specific form αt = CC0 +t results under this specific form both for presentation purposes and because this is the usual form that the learning rate takes in practice. However, we do present the result for a general learning rate in Corollary 2.13.   Condition 2.6. 1. ∇iθ f (x, θ) ≤ K 1 + kxkq + kθk(2−i)∨0 , for i = 0, 1, 2, 3 and for some finite constants K, q < ∞. 2. ḡ(θ) is strongly convex with constant C. 3. CCα > 1. 4. ḡ(θ) ∈ C 3 . 5.   4−i , for i = 0, 1, 2, 3 and for some finite constant K < ∞. ∇iθ ḡ(θ) ≤ K 1 + kθk R t As will be seen from the proof of the Theorems 2.7 and 2.8, one needs to control terms of the form 0 αt (∇ḡ(θs ) − g(Xs , θs ))ds. Due to ergodicity of the X process one expects that such terms are small in magnitude and go to zero as t → ∞. However, the speed at which they go to zero is what matters here. We treat such terms by rewriting them equivalently using appropriate Poisson type partial differential equations (PDE). Conditions 2.1, 2.2 and 2.6 guarantee that these Poisson equations have unique solutions that do not grow faster than polynomially in the x and θ variables (see Theorem A.1 in Appendix A). Theorem 2.7. Assume that Conditions 2.1, 2.2, 2.3, 2.4, 2.5 and 2.6 hold. Then, for p ≥ 1, there exists a constant 0 < K < ∞ such that K p . E[kθt − θ∗ k ] ≤ (C0 + t)p/2 In order to state the central limit theorem results we need to introduce some notation. Let us denote by v(x, θ) the solution to the Poisson equation (A.5) with H(x, θ) = ∇θ g(x, θ) − ∇θ ḡ(θ). Let us also set  ⊤   Z ⊤ −1 ⊤ −1 ⊤ h(x, θ) = ∇θ f (x, θ)(σσ ) −∇x v(x, θ) σσ ∇θ f (x, θ)(σσ ) −∇x v(x, θ) and h̄(θ) = h(x, θ)π(dx). Theorem 2.8. Assume that Conditions 2.1, 2.2, 2.3, 2.4, 2.5 and 2.6 hold. Then, √ d t(θt − θ∗ ) → N (0, Σ̄), where Σ̄ is defined to be Σ̄ = Cα2 Z ∞ e−s(Cα ∆ḡ(θ ∗ )−I) h̄(θ∗ )e−s(Cα (∆ḡ) ⊤ (θ ∗ )−I ) ds. 0 The main result of [3] states that if ḡ(θ) and its derivatives are bounded with respect to θ, then under assumptions of ergodicity for the X process one has convergence of the algorithm, in the sense that limt→∞ k∇θ ḡ(θ)k = 0. In this paper, we allow growth of ḡ(θ) with respect to kθk. In particular, as we shall state in Theorem 2.10 and prove in Appendix B, the results of [3] hold true without considerable extra work if one allows up to linear growth for f (x, θ) with respect to θ, which translates into up to quadratic growth for ḡ(θ) and up to linear growth of ∇ḡ(θ) with respect to θ. Let us formalize the required assumptions in the form of Condition 2.9 below. 5 Condition 2.9. K, q < ∞. 2. 1.   q (1−i)∨0 , for i = 0, 1, 2 and for some finite constants ∇iθ f (x, θ) ≤ K 1 + kxk + kθk   2−i , for i = 0, 1, 2 and for some finite constant K < ∞. ∇iθ ḡ(θ) ≤ K 1 + kθk 3. ∇ḡ(θ) is globally Lipschitz. Theorem 2.10. Assume that Conditions 2.1, 2.2, 2.3, 2.4, 2.5 and 2.9 hold. Then, lim k∇θ ḡ(θ)k = 0, t→∞ a.s. Theorem 2.10 proves convergence for non-convex ḡ(θ) even when f (x, θ) grows at most linearly in θ. Theorem 2.10 is proven in Appendix B. The proof is based on the uniform bound for the moments of θ established in Appendix A. Theorem 2.10 is required for proving a central limit theorem for non-convex ḡ(θ). The central limit theorem for non-convex ḡ(θ) is proven in Theorem 2.12. 1. ḡ(θ) may be non-convex but has a single critical point θ∗ . Condition 2.11. 2. There is a δ ∗ > 0 small enough such that ḡ(θ) is strongly convex in the region kθ − θ∗ k < δ ∗ with constant C and CCα > 1. 3. ḡ(θ) ∈ C 3 . 4. ∇θi ḡ(θ) > 0 if θi − θi∗ > R0 and ∇θi ḡ(θ) < 0 if θi − θi∗ < −R0 for i = 1, 2, . . . , k and for some R0 > 0 large enough. The fourth part in Condition 2.11 guarantees that ∇θi ḡ(θ) always points inwards towards the global minimum θ∗ if |θi | is sufficiently large. Theorem 2.12. Assume that Conditions 2.1, 2.2, 2.3, 2.4, 2.5, 2.9 and 2.11 hold. Then, we have that √ d t(θt − θ∗ ) → N (0, Σ̄), where Σ̄ is defined as in Theorem 2.8. If f (x, θ) and ∇θ f (x, θ) are uniformly bounded in θ and polynomially bounded in x, Theorem 2.12 is true without Conditions 2.3 and 2.4. Proposition 2.13 shows that under certain conditions on the learning rate αt , the specific form of the learning rate assumed in Condition 2.5 is not necessary. In particular, the convergence rate and central limit theorem results can be proven for a general learning rate αt . The proof of Proposition 2.13 follows exactly the same steps as the proofs of Theorems 2.7, 2.8, and 2.12 albeit more tedious algebra and is omitted. (p) Rt Proposition 2.13. Let us denote Ψt,s = e−pC s αρ dρ , for p ≥ 1 and consider the matrix-valued solution Φ∗t,s to equation (4.1). Theorems 2.7, 2.8, and 2.12 also hold under a general learning rate αt satisfying the conditions: Z ∞ Z ∞ Z ∞ αt dt = ∞, α2t dt < ∞, |α′s |ds < ∞, ∃p > 0 such that lim αt tp = 0, t→∞ 0 0 0 Z t Z t  p/2 (1) 1/2 (p) α2s Ψt,s ds ≤ o(αt ) α2s + |α′s | Ψt,s αsp/2−1 ds ≤ O(αt ), and ∀p ≥ 2 0 0 Z t 5/2 (2) αs Ψt,s ds ≤ o(αt ), 0 Z t 2 α2s Φ∗t,s ds = O(αt ), 0 ∀p ≥ 2 (p) p/2 (1) 1/2 Ψt,0 ≤ O(αt ) and Ψt,0 ≤ o(αt ). 6 In particular, the statements of Theorems 2.7, 2.8, and 2.12 then take the form p/2 p E[kθt − θ∗ k ] ≤ Kαt and −1/2 αt d (θt − θ∗ ) → N (0, Σ̄). h i k  C2 where now Σ̄ = Σ̄i,j i,j=1 is as in (4.9) but with the bracket term (λm +λ α′ )Cα −1 replaced by m  lim α−1 t t→∞ Z t α2s e−(λm +λm′ ) 0 Rt s αu du  ds . α as the learning rate, then the conditions that appear in It is easy to check that if we use αs = CC0 +s Proposition 2.13 all hold if CCα > 1. We conclude this section by mentioning that in the bounds that appear in the subsequent sections, 0 < K < ∞ will denote unimportant fixed constants (that do not depend on t or other important parameters). The constant K may change from line to line but it will always be denoted by the same symbol K. Without loss of generality and in order to simplify notation in the proofs, we will let C0 = 0, consider t ≥ 1 (i.e., the initial time is set to t = 1), and let σ be the identity matrix. 3 Theorem 2.7 - Lp convergence rate in strongly convex case The proofs in this paper will repeatedly make use of two important uniform moment bounds. First, as we prove in Appendix A.1, we have that sup E[kθt kp ] < K, t≥0 for p ≥ 2. Second, it is known from [12] that under the imposed conditions for the X process p sup E[kXt k ] < K, t≥0 for p ≥ 2. To begin the proof for the Lp convergence rate, re-write the algorithm (1.2) for θt in terms of g(x, θ) and ḡ(θ). dθt = αt ∇θ f (Xt , θt )(dXt − f (Xt , θt )dt) = αt ∇θ f (Xt , θt )(f ∗ (x) − f (Xt , θt ))dt + αt ∇θ f (Xt , θt )dWt = −αt ∇θ g(Xt , θt )dt + αt ∇θ f (Xt , θt )dWt  = −αt ∇θ ḡ(θ) + αt ∇θ ḡ(θt ) − ∇θ g(Xt , θt ) dt + αt ∇θ f (Xt , θt )dWt . (3.1) A Taylor expansion yields: ∇θ ḡ(θt ) = = ∇θ ḡ(θ∗ ) + ∆ḡ(θt1 )(θt − θ∗ ) ∆ḡ(θt1 )(θt − θ∗ ), where θt1 is an appropriately chosen point in the segment connecting θt and θ∗ . Substituting this Taylor expansion into equation (3.1) produces the equation: d(θt − θ∗ ) = −αt ∆ḡ(θt1 )(θt − θ∗ )dt + αt (∇θ ḡ(θt ) − ∇θ g(Xt , θt ))dt + αt ∇θ f (Xt , θt )dWt . Let Yt = θt − θ∗ . Then, Yt satisfies the SDE dYt = −αt ∆ḡ(θt1 )Yt dt + αt (∇θ ḡ(θt ) − ∇θ g(Xt , θt ))dt + αt ∇θ f (Xt , θt )dWt . 7 By Itô formula, we then have for p ≥ 2 X p p−2 p−2 d kYt k = p kYt k Ytk αt (∇θ f (Xt , θt ))k,i dWti − pαt kYt k Yt , ∆ḡ(θt1 )Yt dt i,k + pαt kYt k p−2 hYt , ∇θ ḡ(θt ) − ∇θ g(Xt , θt )i dt  !2   2 X X X p 2 p−2  −1 + αt kYt k (∇θ f (Xt , θt ))i,k + (p − 2) kYt k Ytk (∇θ f (Xt , θt ))k,i  dt. (3.2) 2 i i,k k Using the strong convexity of ḡ we obtain the inequality X d kYt kp ≤ p kYt kp−2 Ytk αt (∇θ f (Xt , θt ))k,i dWti − pCαt kYt kp dt i,k p−2 + pαt kYt k hYt , ∇θ ḡ(θt ) − ∇θ g(Xt , θt )i dt  !2   2 X X X p 2 (∇θ f (Xt , θt ))i,k + (p − 2) kYt k−1 Ytk (∇θ f (Xt , θt ))k,i  dt. + αt kYt kp−2  2 i i,k k Let’s now define the process Z t Rt X p−2 Mt = p e−pC s αρ dρ αs kYs k Ysk (∇θ f (Xs , θs ))k,i dWsi , 1 i,k and notice that Mt solves the SDE dMt = −pCαt Mt dt + p kYt k p−2 X Ytk (∇θ f (Xt , θt ))k,i dWti . i,k p Next, if we set Γt = kYt k − Mt we obtain that p−2 dΓt ≤ −pCαt Γt dt + pαt kYt k hYt , ∇θ ḡ(θt ) − ∇θ g(Xt , θt )i dt  !2    X X X 2 p (∇θ f (Xt , θt ))i,k + (p − 2) kYt k−1 Ytk (∇θ f (Xt , θt ))k,i  dt. + α2t kYt kp−2  2 i i,k k Next, we define the function (p) Ψt,s = e−pC Rt s αρ dρ =  s pCCα t , and the comparison principle gives Z th i (p) (p) p p−2 Γt ≤ Ψt,1 kY1 k + p αs Ψt,s kYs k hYs , ∇θ ḡ(θs ) − ∇θ g(Xs , θs )i ds 1  !2  Z t  2 X X X p (p) p−2  −1 + Ψ α2 kYs k (∇θ f (Xs , θs ))i,k + (p − 2) kYs k Ysk (∇θ f (Xs , θs ))k,i  ds 2 1 t,s s i i,k = Γ1t + Γ2t + k Γ3t . (3.3) The next step is to rewrite the second term of (3.3), i.e., Γ2t = i Rth (p) p−2 αs Ψt,s kYs k hYs , ∇θ ḡ(θs ) − ∇θ g(Xs , θs )i ds. 1 We construct the corresponding Poisson equation and use its solution to analyze Γ2t . Define G(x, θ) = hθ − θ∗ , ∇θ ḡ(θ) − ∇θ g(x, θ)i and let v(x, θ) be the solution to the PDE Lx v(x, θ) = G(x, θ). Here Lx is the 8 infinitesimal generator of the X process. Due to Theorem A.1, the Poisson PDE solution has the following bounds: kv(x, θ)k + k∇x v(x, θ)k ≤ K(1 + kθkm1 )(1 + kxkm2 ), X ∂ iv ∂ 2v ∂3v m m (x, θ) + (x, θ) ≤ K(1 + kθk 3 )(1 + kxk 4 ) (x, θ) + i 2 ∂θ ∂x∂θ ∂x∂θ i=1,2 (3.4) for appropriate, but unimportant for our purposes, constants m1 , m2 , m3 , m4 . By Itô’s formula: Z t Z t v(Xt , θt ) − v(Xs , θs ) = Lx v(Xu , θu )du + Lθ v(Xu , θu )du s s Z t Z t αu ∇θ v(Xu , θu )∇θ f (Xu , θu )dWu ∇x v(Xu , θu )dWu + + s s Z + t αu ∇θx v(Xu , θu )∇θ f (Xu , θu )du. s Define vt ≡ v(Xt , θt ) and recognize that: G(Xt , θt )dt Lx v(Xt , θt )dt = dvt − Lθ v(Xt , θt )dt − ∇x v(Xt , θt )dWt − αt ∇θ v(Xt , θt )∇θ f (Xt , θt )dWt = − αt ∇θx v(Xt , θt )∇θ f (Xt , θt )dt. (3.5) Using this result, Γ2t can be rewritten as: Γ2t Z th i (p) p−2 αs Ψt,s kYs k hYs , ∇θ ḡ(θs ) − ∇θ g(Xs , θs )i ds 1 Z t (p) αs Ψt,s kYs kp−2 dvs 1 Z t (p) αs Ψt,s kYs kp−2 ∇x v(Xs , θs )dWs 1 Z t (p) αs Ψt,s kYs kp−2 Lθ v(Xs , θs )ds = = − − 1 Z − t 1 Z − t α2s Ψt,s kYs k (p) p−2 ∇θ v(Xs , θs )∇θ f (Xs , θs )dWs (p) p−2 ∇θx v(Xs , θs )∇θ f (Xs , θs )ds α2s Ψt,s kYs k 1 Γ2,1 t = 2,3 2,4 2,5 + Γ2,2 t + Γt + Γt + Γt . (3.6) (p) Let’s first rewrite the first term Γ2,1 t . We apply Itô’s formula to αs Ψt,s kYs k (p) αt Ψt,t kYt k p−2 (p) vt − α1 Ψt,1 kY1 k + Z 1 (p) t αs ∂Ψt,s ∂s t t p−2 vs : Cα (p) p−2 Ψt,s kYs k vs ds 2 s 1 1 Z t Z t h i (p) (p) p−2 p−2 p−2 kYs k vs ds + αs Ψt,s vs d kYs k + αs Ψt,s d kYs k , vs . p−2 v1 = Z (p) p−2 αs Ψt,s kYs k 1 9 dvs − Z 1 Then, we have the following representation for Γ2,1 t : Z t (p) p−2 Γ2,1 = αs Ψt,s kYs k dvs t 1 Z t (p) ∂Ψt,s Cα (p) p−2 Ψ kY k v ds − α kYs kp−2 vs ds = − kY1 k v1 + s s s t,s 2 ∂s 1 1 s Z t Z t i h (p) (p) − αs Ψt,s vs d kYs kp−2 − αs Ψt,s d kYs kp−2 , vs 1 1 Z t Z t (p) (p) (p) (p) = αt Ψt,t kYt kp−2 vt − α1 Ψt,1 kY1 kp−2 v1 + Cα−1 α2s Ψt,s kYs kp−2 vs ds − pC α2s Ψt,s kYs kp−2 vs ds (p) αt Ψt,t kYt kp−2 vt (p) α1 Ψt,1 t Z p−2 1 − Z 1 t (p) αs Ψt,s vs d kYs k p−2 − Z t 1 (p) h p−2 αs Ψt,s d kYs k 1 i , vs . (3.7) Now, we are ready to put things together. Equation (3.2) with p − 2 in place of ph is then usedi to evaluate p−2 the second to last term of (3.7) and similarly for the quadratic covariation term d kYs k , vs of the last term of (3.7). Plugging (3.7) in (3.6) and that in (3.3), we get that there is an unimportant constant K < ∞ large enough and a matrix-valued function ζ(x, θ) that grows at most polynomially in x and θ such that (p) p (p) (p) p−2 Γt ≤ Ψt,1 kY1 k + αt Ψt,t kYt k vt − α1 Ψt,1 kY1 k Z t (p) p−2 ζ(Xs , θs )ds + M̂t , +K α2s Ψt,s kYs k p−2 v1 (3.8) 1 where M̂t is a mean zero and square integrable (this follows from the uniform moment bounds on the X and θ processes) Brownian stochastic intergal. Recall now that we want to evaluate E kYt kp . Recalling the definition of Γt and taking expectation in (3.8) we obtain Z t i h (p) (p) (p) p−2 p p p−2 p−2 α2s Ψt,s kYs k ζ(Xs , θs )ds. E kYt k ≤ E Ψt,1 kY1 k + αt kYt k vt − α1 Ψt,1 kY1 k v1 + KE 1 (p) Ψt,1 (p) Ψt,1 ≤ t−p . Hence we have obtained that Recalling that = t−pCCα and that CCa > 1 we get that for any p ≥ 2 the following inequality holds Z t h i (p) p p−2 p−2 E kYt k ≤ Kt−p + E αt kYt k vt + KE α2s Ψt,s kYs k ζ(Xs , θs )ds. (3.9) 1 The next step is to proceed by induction. Using the uniform moment bounds for X and θ together with the polynomial growth of v(x, θ) and ζ(x, θ), we get for p = 2 Z t (2) 2 E kYt k ≤ Kt−2 + E [αt vt ] + KE α2s Ψt,s ζ(Xs , θs )ds 1   Z t −2 −1 −2CCα 2CCα −2 ≤K t +t +t s ds 1 ≤ Kt−1 , where the unimportant constant K may change from line to line. Hence the desired statement is true for p = 2. Next let us assume that it is true for exponent p − 1 and we want to prove that it is true for exponent p. Using Hölder inequality with exponents r1 , r2 > 1 such that 1/r1 + 1/r2 = 1 and choosing r1 = p−1 p−2 > 1 we get 1/r1  i h (E|vt |r2 )1/r2 E αt kYt kp−2 vt ≤ αt E kYt kp−1 ≤ Kt−1 t− 10 p−2 2 = Kt−p/2 , and likewise Z t Z t 1/r1  (p) (p) r 1/r (p−2)r1 p−2 E (E kζ(Xs , θs )k 2 ) 2 ds α2s Ψt,s E kYs k α2s Ψt,s kYs k ζ(Xs , θs )ds ≤ 1 1 ≤K Z t 1 t 1/r1  (p) (p−2)r1 ds α2s Ψt,s E kYs k 1 (p) α2s Ψt,s (p−2)/2 ds s 1 Z t p −pCCα ≤ Kt spCCα −1− 2 ds 1   −p/2 ≤K t − t−pCCα ≤K Z ≤ Kt−p/2 . Putting the last two displays together, (3.9) gives E kYt kp ≤ Kt−p/2 , which is the statement of Theorem 2.7 for integer p ≥ 2. The statement for any p ≥ 1 then follows from Hölder inequality. This concludes the proof of the theorem. 4 Proof of Central Limit Theorem in strongly convex case To prove the central limit theorem, we use a second-order Taylor expansion: ∇θ ḡ(θt ) = ∇θ ḡ(θ∗ ) + ∆ḡ(θ∗ )(θt − θ∗ ) + 1 ∂ 3 ḡ 1 (θ )(θt − θ∗ )(θt − θ∗ )⊤ , 2 ∂θ3 t where θt1 is an appropriate point chosen in the segment that connects θt to θ∗ . Then, the evolution of θt follows: d(θt − θ∗ ) = −αt ∆ḡ(θ∗ )(θt − θ∗ )dt − αt ∂ 3 ḡ 1 (θ )(θt − θ∗ )(θt − θ∗ )⊤ dt + αt (∇θ ḡ(θt ) − ∇θ g(Xt , θt ))dt 2 ∂θ3 t +αt ∇θ f (Xt , θt )dWt . Let Yt = θt − θ∗ . Then, Yt satisfies the SDE dYt = −αt ∆ḡ(θt∗ )Yt dt − αt ∂ 3 ḡ 1 (θ )Yt Yt⊤ dt + αt (∇θ ḡ(θt ) − ∇θ g(Xt , θt ))dt + αt ∇θ f (Xt , θt )dWt . 2 ∂θ3 t Let Φ∗t,s ∈ Rk×k be the fundamental solution satisfying dΦ∗t,s Φ∗s,s = = −αt ∆ḡ(θ∗ )Φ∗t,s dt, I, (4.1) where I is the identity matrix. As in Section 3 we set without loss of generality C0 = 0 and assume that the initial time is at t = 1. Then, Yt can be written in terms of Φ∗t,s : Z t Z t Z t 3 ∗ ∗ αs ∂ ḡ 1 ⊤ ∗ Yt = Φt,1 Y1 − Φt,s (θ )Ys Ys ds + Φt,s αs (∇θ ḡ(θs ) − ∇θ g(Xs , θs ))ds + Φ∗t,s αs ∇θ f (Xs , θs )dWs 2 ∂θ3 s 1 1 1 = Γ1t + Γ2t + Γ3t + Γ4t . (4.2) qP 2 Next, a convergence rate for Φ∗t,s must be established in the matrix norm kAk = i,j Ai,j . Consider Rt the change of variables τ (t) = s + s αu du and define Φ̃∗τ,s via Φ̃∗τ,s = Φ∗t,s . For αt = Ctα , we have τ (t) = s + Cα (log(t) − log(s). Performing this change of variables, dΦ̃∗τ,s Φ̃∗s,s = −∆ḡ(θ∗ )Φ̃∗τ,s dτ, = I, 11 (4.3) for τ ≥ s. Note that the columns of the matrix solution Φ̃∗τ,s evolve independently. This makes the analysis ∗ ∗ i ∗ much simpler. Define Φ̃∗,j τ,s as the j-th column of Φ̃τ,s and ∆ḡ(θ ) as the i-th row of the matrix ∆ḡ(θ ). Consider the one-dimensional differential equation:   2   d d ∗,j,k 2 ∗,j,1 2 ∗,j + · · · + Φ̃τ,s Φ̃τ,s Φ̃τ,s = dτ dτ   ∗,j,1 ∗ 1 ∗,j ∗,j,k ∗ k ∗,j = −2 Φ̃τ,s ∆ḡ(θ ) Φ̃τ,s + · · · + Φ̃τ,s ∆ḡ(θ ) Φ̃τ,s ⊤ ⊤   ∗,j ∗ ∗,j ∗,j Φ̃∗,j ∆ḡ(θ ) Φ̃ < −2C Φ̃ = −2 Φ̃∗,j τ,s = −2C Φ̃τ,s τ,s τ,s τ,s 2 , where we have used the strong convexity assumption. This of course yields the convergence rate: 2 Φ̃∗τ,s ≤ Ke−2C(τ −s). Changing variables again yields the convergence rate in the original time coordinate t: Φ∗t,s 2 = Φ̃∗τ,s 2 ≤ Ke−2C ≤ Ke−2C(τ −s) Rt s α̃u du = Kt−2CCα s2CCα . (4.4) We recall some important properties of Φ∗t,s (for reference, see Proposition 2.14 in [14]). Φ∗t,s is differentiable in t with the semi-group property Φ∗t,1 = Φ∗t,s Φ∗s,1 . Furthermore, Φ∗t,s is invertible with inverse = Φ∗s,t . Therefore, Φ∗,−1 t,s ∂ ∗ Φ ∂s t,s   ∂ ∗,−1 ∗ Φt,1 Φs,1 = ∂s ∗ ∂ ∗,−1 ∂Φs,1 ∗,−1 ∗ = Φ∗t,1 Φ∗,−1 Φ s,1 = Φt,1 Φs,1 ∂s ∂s s,1  = −Φ∗t,s αs ∆ḡ(θ∗ )Φ∗s,1 Φ∗,−1 s,1 = −αs Φ∗t,s ∆ḡ(θ∗ ). (4.5) Combining the calculation (4.5) with the bound (4.4) yields: ∂ ∗ Φ ∂s t,s 2 ≤ Kαs t−2CCα s2CCα . √ Now, let’s examine the process tYt , which represents the fluctuations of θ√ t around the global minimum √ a.s. p θ∗ . First, observe that tΓ1t → 0 due to the bound (4.4). Let’s now examine tΓ2t . Recall that E[kYt k ] ≤ K from the Lp convergence rate in the previous section. Applying this result with p = 2, 3 we obtain tp/2  √ 2 tΓt E 1   Z √ ≤ E t t  ∂ 3 ḡ 1 ⊤ (θ )Y Y ds s s ∂θ3 s 1 1   Z t √ 1 1 ∗ + 5/2 ds ≤ K t Φt,s s2 s 1 √ −CC Z t CC −2 √ α ≤ K tt s α ds ≤ K tt−1 = Kt−1/2 . Φ∗t,s αs (4.6) 1 √ p Therefore, tΓ2t → 0. √ Next, we address the term tΓ3t . We construct the corresponding Poisson equation and use its solution to analyze Γ3t . Define G(x, θ) = ∇θ ḡ(θ) − ∇θ g(x, θ) and let v(x, θ) be the solution to the PDE Lx v(x, θ) = 12 √ G(x, θ). Proceeding in a fashion similar to equation (3.5) (but with different function v now) we write tΓ3t as: √ 3 √ Z t tΓt = t αs Φ∗t,s (∇θ ḡ(θs ) − ∇θ g(Xs , θs ))ds 1 √ Z t t = αs Φ∗t,s dvs 1 √ Z t t αs Φ∗t,s ∇x v(Xs , θs )dWs − 1 √ Z t − t αs Φ∗t,s Lθ v(Xs , θs )ds 1 √ Z t 2 ∗ t − αs Φt,s ∇θ v(Xs , θs )∇θ f (Xs , θs )dWs 1 Z t √ α2s Φ∗t,s ∇θx v(Xs , θs )∇θ f (Xs , θs )ds t − 1 √ 3,1 √ 3,2 √ 3,3 √ 3,4 √ 3,5 = tΓt + tΓt + tΓt + tΓt + tΓt , (4.7) where v(x, θ) satisfies bounds similar to the ones in (3.4). Following similar steps as in Section 3,   √ L1 3,1 3,3 3,4 3,5 t |Γt | + |Γt | + |Γt | + |Γt | → 0, √ 3,3 3,4 3,5 p which of course that t(Γ3,1 t + Γt + Γt + Γt ) → 0. √ implies √ 4 The term tΓ3,2 t + tΓt is now analyzed. This term will produce the limiting Gaussian random variable. Recalling the reduction to σ = I, we have   Z t √ 3,2 √ 4 √ (4.8) tΓt + tΓt = t αs Φ∗t,s ∇θ f (Xs , θs ) − ∇x v(Xs , θs ) dWs . 1   ⊤ R Let h(x, θ) = ∇θ f (x, θ) − ∇x v(x, θ) ∇θ f (x, θ) − ∇x v(x, θ) and h̄(θ) = h(x, θ)π(dx). q q Let 3 H(x, θ) = h(x, θ) − h̄(θ). Recall that k∇θ f (x, θ)k ≤ K(1 + kxk + kθk), k∇x v(x, θ)k ≤ K(1 + kxk + kθk ), 2 q 3 2 q ∂ v ≤ K(1 + kxk + kθk ), and ∂x∂θ ≤ K(1 + kxk + kθk). The latter bounds on v(x, θ) 2 (x, θ) and its derivatives are from equation (3.4). These bounds imply that the function H(x, θ) and its derivatives have polynomial growth in kxk and kθk. Based on Theorem A.1, the solution w(x, θ) to the PDE Lx w(x, θ) = H(x, θ) and its derivatives will also have at most polynomial growth in kxk and kθk. √ 4 d √ tΓt → N (0, Σ̄) for the appropriate limiting variance-covariance matrix Σ̄. We will prove that tΓ3,2 t + The proof will rely upon the Poisson partial differential equation approach using the at most polynomial growth of its solution and its derivatives together with the uniform boundedness of the moments of Xt and θt processes to analyze the rate of convergence. √ 4 √ tΓt is: The quadratic covariation matrix of tΓ3,2 t + Z t Σt = t α2s Φ∗t,s h(Xs , θs )Φ∗,⊤ t,s ds. ∂ v ∂x∂θ (x, θ) 1 p It is necessary to show that Σt → Σ̄ as t → ∞. To begin, we show a simpler limit. Consider the process: Z t Σ̄t = t α2s Φ∗t,s h̄(θ∗ )Φ∗,⊤ t,s ds. 1 It will be proven now that Σ̄t converges to a limit Σ̄ as t → ∞. Let us now establish the limit Σ̄ as t → ∞. Recall that ∆ḡ(θ∗ ) is both strictly positive matrix and symmetric. Therefore, by the eigenvalue decomposition we can write that ∆ḡ(θ∗ ) = U ΛU ⊤ , 13 where U = [u1 , · · · , uk ] is the corresponding matrix of orthogonal eigenvectors u1 , . . . , uk ∈ Rk and Λ = diag(λ1 , · · · , λk ) is the diagonal matrix with the positive eigenvalues λi > 0 for i = 1, · · · , k. Next, we notice Rt that a time transformation as in (4.3) allows us to write that for τ (t) = s + s αu du and Φ̃∗τ (t),s = Φ∗t,s Φ̃∗τ,s = e−∆ḡ(θ ∗ )(τ −s) . Combining the latter results we then obtain that Φ∗t,s = U e−Λ Rt s αu du U ⊤. For notational convenience, let us now set Λt,s = e− Rt s αu duΛ Let us write λ(t,s),i =    s λk Cα    Rt Rt s λ1 Cα . ,··· , = diag e−λ1 s αu du , · · · , e−λk s αu du = diag t t  s λi Cα t for i = 1, · · · , k. The (i, j)-th element of the matrix Φ∗t,s takes the form Φ∗t,s,i,j k X = λ(t,s),m ui,m uj,m . m=1 P Naturally (Φ∗,⊤ )t,s,k′ ,j = Φ∗t,s,j,k′ = km′ =1 λ(t,s),m′ uj,m′ uk′ ,m′ . Hence, the (i, j)-th element of the matrix Σ̄t takes the form # Z t "X k X ∗ 2 ∗,⊤ ∗ Φt,s,i,n αs Σ̄t,i,j = t h̄(θ )n,k′ (Φ )t,s,k′ ,j ds 1 =t Z 1 = n t α2s k′ =1 " X X n λ(t,s),m ui,m un,m m ! X ∗ h̄(θ )n,k′ X λ(t,s),m′ uj,m′ uk′ ,m′ m′ k′ !# ds XXXX Z t    t α2s λ(t,s),m ui,m un,m h̄(θ∗ )n,k′ λ(t,s),m′ uj,m′ uk′ ,m′ ds n m k′ m′ 1 X X X X  Z t  s (λm +λm′ )Cα  ds ui,m un,m h̄(θ∗ )n,k′ uj,m′ uk′ ,m′ = t α2s t 1 n m k ′ m′   XXXX Cα2 1 − t1−(λm +λm′ )Cα ui,m un,m h̄(θ∗ )n,k′ uj,m′ uk′ ,m′ . = (λm + λm′ ) Cα − 1 ′ ′ n m k m By the Rayleigh-Ritz theorem, λ1 , . . . , λk ≥ C. Therefore, Cα (λm + λk′ ) ≥ 2Cα C > 1. Then, we get that the (i, j)-th element of the limiting quadratic covariation matrix Σ̄ takes the form  XXXX Cα2 Σ̄i,j = lim Σ̄t,i,j = ui,m un,m h̄(θ∗ )n,k′ uj,m′ uk′ ,m′ t→∞ ′ (λ + λ ) C − 1 m m α n m k ′ m′  XX X X Cα2 = (4.9) uj,m′ uk′ ,m′ . ui,m un,m h̄(θ∗ )n,k′ (λm + λm′ ) Cα − 1 ′ ′ n m m k Notice that we can conveniently write that Z ∞ ⊤ ∗ ∗ Σ̄ = Cα2 e−s(Cα ∆ḡ(θ )−I) h̄(θ∗ )e−s(Cα (∆ḡ) (θ )−I ) ds. (4.10) 0 It remains to show that E Σt − Σ̄t E Σt − Σ̄ Then, E Σt − Σ̄ 1 1 → 0 as t → ∞. If this is true, then the triangle inequality yields ≤ E Σt − Σ̄t 1 p 1 → 0 would imply that Σt → Σ̄. 14 + E Σ̄t − Σ̄ 1 → 0. To prove that E Σt − Σ̄t → 0, we begin by defining Z t V̄t = t α2s Φ∗t,s h̄(θs )Φ∗,⊤ t,s ds. 1 1 ≤ Σt − V̄t 1 + V̄t − Σ̄t 1 . We first address the second term: Z t ∗,⊤  ∗ ∗ . (4.11) t α2s Φ∗t,s h̄(θs )Φ∗,⊤ t,s − Φt,s h̄(θ )Φt,s ds By the triangle inequality, Σt − Σ̄t V̄t − Σ̄t 1 = 1 1 1 The (i, j)-th element of the matrix V̄t − Σ̄t is:  Z t X k k X X X  ∗,⊤ ∗,⊤ 2 ∗ ∗ ∗ αs V̄t − Σ̄t i,j = t Φt,s,i,n h̄(θs )n,k′ Φt,s,k′ ,j − Φt,s,i,n h̄(θ )n,k′ Φt,s,k′ ,j ds. 1 = t Z n t 1 α2s X k X Φ∗t,s,i,n n θs1 n k′ =1 k′ =1 k′ =1 ∗,⊤ ∗ ∇θ h̄(θs1 )⊤ n,k′ (θs − θ )Φt,s,k′ ,j ds, where is an appropriately chosen point in the segment connecting θs and θ∗ . Recall now that v and its derivatives can grow at most polynomially in kxk and kθk. As a result of the specific growth rates we have 6 ∇θ h̄(θ) ≤ K(1 + kθk ). 2 In addition, E[kθs − θ∗ k ] ≤ K s from the convergence rate in Section 3. Using these facts, the uniform in time moments bound on θt , and the Cauchy Schwartz inequality, Z t k X X  ∗,⊤ ∗ Φ∗t,s,i,n ∇θ h̄(θs1 )⊤ α2s E E[| V̄t − Σ̄t i,j |] ≤ t n,k′ (θs − θ )Φt,s,k′ ,j ds 1 n t ≤ Kt Z t ≤ Kt Z 1 α2s k′ =1 X Φ∗t,s,i,n n 1  k X E ∇θ h̄(θs1 )n,k′ k′ =1 5 s− 2 Φ∗t,s 2 2  21   21 2 E kθs − θ∗ k Φ∗,⊤ t,s,k′ ,j ds ds. Therefore, V̄t − Σ̄t 1 → 0 as t → ∞. Now, let’s address Σt − V̄t 1 using the Poisson equation method.  Z t  ∗,⊤ ∗ ds. − Φ h̄(θ )Φ Σt − V̄t = t α2s Φ∗t,s h(θs , Xs )Φ∗,⊤ s t,s t,s t,s 1 The (i, j)-th element of the matrix Σt − V̄t is:  Z t X k  X  2 ∗ αs Φt,s,i,n V̄t − Σ̄t i,j = t h(θs , Xs )n,k′ − h̄(θs )n,k′ Φ∗,⊤ t,s,k′ ,j ds. 1 n k′ =1 Using Itô’s formula, the bounds (A.6) on the Poisson equation Lx w = H, the moment bounds on Xt and θt , and the Itô Isometry, it can be shown that  E V̄t − Σ̄t i,j → 0, as t → ∞. This of course implies that E V̄t − Σ̄t p 1 → 0. Combining results and using the triangle inequality, we have the desired result Σt → Σ̄ as t → ∞. The convergence in probability of the quadratic variation Σt for equation (4.8) implies that (4.8) converges in distribution to a mean zero normal random variable with covariance Σ̄ (see Section 1.2.2 in [15]). Combining all of the results yields the central limit theorem: √ d tYt → N (0, Σ̄), which is our desired result. 15 5 Proof of Central Limit Theorem in the non-convex case From Theorem 2.10, we know that k∇ḡ(θt )k → 0 almost surely. Under the imposed conditions this implies that either kθt − θ∗ k → 0 or kθt k → ∞. We must therefore first show that kθt k remains finite almost surely. The parameter θt evolves as: Z t Z t Z t   θt = θ1 + −αs ∇θ ḡ(θs )ds + αs ∇θ ḡ(θs ) − ∇θ g(θs , Xs ) ds + αs ∇θ f (Xs , θs )dWs . (5.1) 1 1 1 Recall from Condition 2.11 that ∇θi ḡ(θ) > 0 if θi − θi∗ > R0 and ∇θi ḡ(θ) < 0 if θi − θi∗ < −R0 for i = 1, 2, . . . , k. If |θt,i (ω)| → ∞, then either θt,i (ω) → +∞ or θt,i (ω) → −∞ since θt has continuous paths (i.e., a divergent sequence such as −2n cannot occur). Next, note that the second and third integrals in equation (5.1) converge to finite random variables almost surely. Suppose that θt,i (ω) → +∞. This Rt implies that there exists a T (ω) such that θt,i > θi∗ for all t ≥ T (ω). However, T (ω) −αs ∇θi ḡ(θs )ds < 0. This, combined with the fact that the second and third terms in (5.1) converge to finite random variables almost surely, proves that θt,i < +∞ with probability one. A similar argument shows that θt,i > −∞ with probability one. Therefore, |θt,i − θi∗ | → 0 almost surely. a.s. θt → θ∗ implies that, for any δ > 0 sufficiently small, there exists a (random) time τδ such that kθt − θ∗ k < δ for all t ≥ τδ . Notice that for fixed δ > 0, τδ is almost surely finite, but we also remark that τδ is not a stopping time. In this section, the parameter δ is chosen sufficiently small such that 0 < δ < δ ∗ , where δ ∗ is taken from Condition 2.11. Using a Taylor expansion: ∇θ ḡ(θt ) = ∇θ ḡ(θ∗ ) + ∆ḡ(θt1 )(θt − θ∗ ) = ∆ḡ(θt1 )(θt − θ∗ ), where θt1 is appropriately chosen in the segment connecting θt to θ∗ . Then we have d(θt − θ∗ ) = −αt ∆ḡ(θt1 )(θt − θ∗ )dt + αt (∇θ ḡ(θt ) − ∇θ g(Xt , θt ))dt + αt ∇θ f (Xt , θt )dWt . Let Φt,s satisfy dΦt,s = Φs,s = −αt ∆ḡ(θt1 )Φt,s dt, I, and notice that for t > s > τδ , 2 kΦt,s k ≤ Kt−2CCα s2CCα . We will also later make use of the fact that Φt,s satisfies the semi-group property Φt,s = Φt,τ Φτ,s (for reference, see Proposition 2.14 in [14]). Letting Yt = θt − θ∗ , we obtain Z t Z t αs Φt,s (∇θ ḡ(θs ) − ∇θ g(Xs , θs ))ds + αs Φt,s ∇θ f (Xs , θs )dWs Yt = Φt,1 Y1 + 1 = 1 Γ1t + Γ2t + Γ3t . The first term Γ1t is analyzed below. Lemma 5.1. √ 1 a.s. tΓt → 0, as t → ∞. 16 Proof. For t ≥ τδ we have √ 1 tΓt 1 √ t Φt,τδ̄ Φτδ̄ ,1 Y1 1 √ ≤ K t Φt,τδ̄ Φτδ̄ ,1 Y1 = 1 ≤ Kt−CCα + 2 τδ̄CCα Φτδ̄ ,1 Y1 1 = K(τδ̄ )t−CCα + 2 . where K(τδ̄ ) = τδ̄CCα Φτδ̄ ,1 Y1 is almost surely finite since P[τδ̄ < ∞] = 1. Then, since CCα > 1, as t → ∞. √ 1 a.s. tΓt → 0 Let v(x, θ) satisfy the Poisson PDE Lx v = G(x, θ) where G(x, θ) = ∇θ ḡ(θ) − ∇θ g(x, θ). The solution v(t, x) and its relevant partial derivatives will be growing at most polynomially in kxk and linearly in kθk due to the assumptions of Theorem 2.12. Itô’s formula yields the representation Z t Γ2t = αs Φt,s (∇θ ḡ(θs ) − ∇θ g(Xs , θs ))ds 1 Z t = αs Φt,s dvs 1 Z t − αs Φt,s ∇x v(Xs , θs )dWs 1 Z t − αs Φt,s Lθ v(Xs , θs )ds 1 Z t α2s Φt,s ∇θ v(Xs , θs )∇θ f (Xs , θs )dWs − 1 Z t α2s Φt,s ∇θx v(Xs , θs )∇θ f (Xs , θs )ds − = 1 Γ2,1 t 2,4 2,5 2,3 + Γ2,2 t + Γt + Γt + Γt . In order now to analyze the terms involved in Γ2t and Γ3t we need some intermediate results that we state now below. For presentation purposes the proof of these Lemmas is deferred to the end of this section. Lemma 5.2. Let ζ(x, θ) be a (potentially matrix-valued) function that can grow at most polynomially in x and θ. Then, we have that √ Rt a.s. 1. It1 = t 1 α2s Φt,s ζ(Xs , θs )ds → 0, as t → ∞, and √ Rt 2. It2 = t 1 α2s Φt,s ζ(Xs , θs )dWs → 0, in probability, as t → ∞. √ (recall√that the operator Lθ has a multiplicative Lemma 5.2√immediately gives that the terms tΓ2,3 t converge almost surely to zero and that tΓ2,4 converges in probability to zero, as factor of αt ), tΓ2,5 t t t → ∞. To see this it is enough to notice that all of these terms take the form of the It1 and It2 quantities √ 2,1 mentioned in Lemma 5.2. The term tΓt also converges almost surely to zero by first rewriting using Itô (p) formula, as it was done for the corresponding term of Section 3 (refer to (3.7) with p = 2 and replace Ψt,s by Φt,s ) and then using again Lemma 5.2. limiting Gaussian random variable will be produced by Γ2,2 and Γ3t . Therefore, it remains to analyze t √ The 2,2 3 t(Γt + Γt ). We have   √ Z t √ 2,2 3 t(Γt + Γt ) = t αs Φt,s ∇θ f (Xs , θs ) − ∇x v(Xs , θs ) dWs . 1 Using the results from [15], it is sufficient to prove the convergence in probability of Z t Σt = t α2s Φt,s h(Xs , θs )Φ⊤ t,s ds 1 17   ⊤ to a deterministic quantity. We recall here that h(x, θ) = ∇θ f (x, θ)−∇x v(x, θ) ∇θ f (x, θ)−∇x v(x, θ) . As before, let Φ∗t,s be the solution to dΦ∗t,s Φ∗s,s −αt ∆ḡ(θ∗ )Φ∗t,s dt, I. = = Recall that Φ∗t,s satisfies the bound Φ∗t,s 2 ≤ Kt−2CCα s2CCα . Define Σ̄t and Σ̄∗t as: Σ̄t = t Z t 1 Σ̄∗t = t Z 1 t α2s Φt,s h̄(θ∗ )Φ⊤ t,s ds. α2s Φ∗t,s h̄(θ∗ )Φ∗,⊤ t,s ds. Note that we already proved in the previous section that Σ̄∗t converges in probability to Σ̄ as t → ∞. We would like to show that Σ̄t − Σ̄∗t → 0 as t → ∞, almost surely. Lemma 5.3. Σ̄t − Σ̄∗t → 0, with probability 1, as t → ∞. To prove that Σt − Σ̄t → 0, we begin by defining V̄t = t Z 1 t α2s Φt,s h̄(θs )Φ⊤ t,s ds By the triangle inequality, Σt − Σ̄t ≤ Σt − V̄t + V̄t − Σ̄t . We then have the following lemmas. Lemma 5.4. V̄t − Σ̄t → 0, with probability 1, as t → ∞. Lemma 5.5. Σt − V̄t → 0, in probability, as t → ∞. By the triangle inequality, Σt − Σ̄ ≤ ≤ Σt − Σ̄t + Σ̄t − Σ̄ Σt − V̄t + V̄t − Σ̄t + Σ̄t − Σ̄ . p Combining Lemmas 5.5, 5.3, and 5.4, Σt − Σ̄ → 0 as t → ∞. Therefore, using the results from [15], √ 2,2 d t(Γt + Γ3t ) → N (0, Σ̄), as t → ∞. Combining all of the results yields the central limit theorem: √ d tYt → N (0, Σ̄), which is our desired result. 5.1 Proof of Lemmas 5.2-5.5 In this subsection we give the proof of the lemmas that were used in the proof of the central limit theorem of the non-convex case. First we need an intermediate result to properly handle convergence to zero of multidimensional stochastic integrals. Such a result should be standard in the literature, but because we did not manage to locate an appropriate statement we present Lemma 5.6. 18 Rt Lemma 5.6. Let Zt = 1 b(t, s, Xs , θs )dWs . Let p ∈ N be a given integer, and consider a constant c > p − 21 and a matrix E where EE ⊤ is positive definite, such that Z t 1 p t−c+p− 2 αps sc b(t, s, Xs , θs )E ⊤ ds → 0, (5.2) 1 as t → ∞. Then, if Rt 1 p p b(t, s, Xs , θs )b(t, s, Xs , θs )⊤ ds → 0 as t → ∞, Zt → 0 as t → ∞. Proof of Lemma 5.6. Let η > 0 be arbitrarily chosen and construct the random variable s Z 2c − 2p + 1 −c+p− 12 t p c t αs s EdWs . Z̃t = η Cα2p 1 d d From Section 1.2.2 in [15], Zt + Z̃t → N (0, η 2 EE ⊤ ) as t → ∞. In addition, Z̃t → N (0, η 2 EE ⊤ ) as t → ∞. From the triangle inequality,   k X ǫ 2 P Zt,i > P kZt k > ǫ ≤ k i=1 r  r    k k X X ǫ ǫ P |Zt,i | > P |Zt,i + Z̃t,i − Z̃t,i | > = k k i=1 i=1 r   k X ǫ P |Z̃t,i | + |Zt,i + Z̃t,i | > k i=1 r  r   k   X 1 ǫ 1 ǫ P |Z̃t,i | > + P |Zt,i + Z̃t,i | > . 2 k 2 k i=1  = ≤ ≤  2 (5.3) For each fixed η > 0, the RHS of the inequality (5.3) converges to a finite quantity as t → ∞ due to the continuous mapping theorem and the convergence in distribution of Zt,i + Z̃t,i and Z̃t . Furthermore, the limit of the RHS can be made arbitrarily small by choosing a sufficiently small η. Therefore, for any δ > 0, there exists a η > 0 such that:   2 lim P kZt k > ǫ < δ. t→∞ Proof of Lemma 5.2. Let us first prove the first statement of the lemma. Without loss of generality, let t ≥ τδ . To begin, divide [0, t] into two regimes [1, τδ ∧ t] and [τδ ∧ t, τδ ∨ t]: √ Z t 2 √ Z τδ ∧t 2 √ Z τδ ∨t 2 1 It = t αs Φt,s ζ(Xs , θs )ds = t αs Φt,s ζ(Xs , θs )ds + t αs Φt,s ζ(Xs , θs )ds. 1 = It1,1 + 1 τδ ∧t It1,2 . (5.4) Let us first study the second term. It1,2 1 = √ Z t √ ≤K t τδ ∨t α2s Φt,s ζ(Xs , θs )ds τδ ∧t Z τδ ∨t τδ ∧t 1 α2s kΦt,s k kζ(Xs , θs )k ds ≤ Kt−CCα+1/2 ≤ Kt−CCα+1/2 τδ ∨t Z τδ ∧t Z τδ ∨t 1 m1 + kθs k m2 ) ds m1 + kθs k m2 ) ds. sCCα −2 (1 + kXs k sCCα −2 (1 + kXs k 19 Let us now define the quantity Lt = Kt−CCα +1/2 t Z sCCα −2 (1 + kXs k 1 m1 m2 + kθs k ) ds, and notice that with probability one we have lim sup It1,2 t→∞ 1 ≤ lim sup Lt . t→∞ For ε > 0, consider now the event At,ε = Lt ≥ tε−1/2 . Using the uniform in time bounds for the moments of Xs and θs we obtain that Z t   E |Lt | ≤ Kt−CCα +1/2 sCCα −2 ds ≤ K t−1/2 − t−CCα +1/2 .  1 Then, Markov’s inequality and the fact that CCα > 1 give P [At,ε ] ≤ E |Lt | ≤ Kt−ε . tε−1/2 The latter then implies that X n∈N P [A2n ,ε ] < ∞, which then due to the Borel-Cantelli lemma, guarantees the existence of a finite positive random variable d(ω) and of some n0 < ∞ such that for every n ≥ n0 , L2n ≤ d(ω)2−nε . For any t ∈ [2n , 2n+1 ] and n ≥ n0 , Lt n(−CCα +1/2) Z ≤ K2 ≤ K2CCα−1/2 L2n+1 ≤ ≤ 1 2n+1 sCCα −2 (1 + kXs km1 + kθs km2 )ds. K2CCα−1/2 d(ω)2−(n+1)ε K(ω)t−ε . a.s. a.s. Therefore, Lt → 0, which immediately implies that It1,2 → 0. Next, we analyze the first term on the RHS of equation (5.4). If t > τδ , the semi-group property yields: It1,1 = Therefore, if t > τδ , √ Z t 1 √ R τδ ∧t 2 R τ ∧t √ t 1 αs Φt,s ζ(Xs , θs )ds = tΦt,τδ 1 δ α2s Φτδ ,s ζ(Xs , θs )ds. τδ ∧t α2s Φt,s ζ(Xs , θs )ds Z √ ≤ K t kΦt,τδ k ≤ C(τδ )t τδ 1 −CCα +1/2 α2s Φτδ ,s ζ(Xs , θs )ds . The constant C(τδ ) is almost surely finite since P[τδ < ∞] = 1 and because kXs k and kθs k are almost surely finite for s ≤ τδ . Therefore, using the constraint CCα > 1, we have obtained Z τδ ∧t √ a.s. α2s Φt,s ζ(Xs , θs )ds → 0. t 1 Combining results, the integral (5.4) converges to 0 almost surely as t → ∞. 20 Next, we prove the second statement √ of the lemma, where we shall use Lemma 5.6. In the notation of Lemma 5.6, let us set b(t, s, x, θ) = tα2s Φt,s ζ(x, θ) and, with some abuse of notation, let us consider the quantity Z t [It2 ] = t α4s Φt,s ζ(Xs , θs )ζ T (Xs , θs )ΦTt,s ds. 1 Now [It2 ] is a matrix with elements [It2 ]i,j = t =t Z t Z τδ ∧t 1 1 α4s X Φt,s,i,n n α4s = [It2 ]1i,j + X k X ζζ ⊤ k′ =1 Φt,s,i,n n [It2 ]2i,j . k X k′ =1  n,k′ ζζ ⊤ (Xs , θs )Φt,s,k′ ,j ds  n,k′ (Xs , θs )Φt,s,k′ ,j ds + t Z τδ ∨t τδ ∧t α4s X Φt,s,i,n n k X k′ =1 ζζ ⊤  n,k′ (Xs , θs )Φt,s,k′ ,j ds Proceeding as in the first part of the lemma shows that for each index i, j, the corresponding element of the matrix [It2 ] goes to zero, i.e., [It2 ]i,j = [It2 ]1i,j + [It2 ]2i,j → 0, a.s., as t → ∞. To complete the proof, we then need to use Lemma 5.6. Let us define Z t √ 1 α2+p sc tΦt,s ζ(Xs , θs )E ⊤ ds Dt = t−c+p− 2 s 1 Z τδ ∧t Z τδ ∨t −c+p c ⊤ −c+p =t α2+p s Φ ζ(X , θ )E ds + t α2+p sc Φt,s ζ(Xs , θs )E ⊤ ds. t,s s s s s 1 τδ ∧t = Dt1 + Dt2 . By Lemma 5.6, if we show that for the appropriate choices of p, c and E, Dt goes to zero in probability as t → ∞, then we would have shown that the second statement of the lemma holds, i.e. that It2 → 0 in probability as t → ∞. We pick p = 2, c = 2CCα and E = I to be the identity matrix. Let us first start with Dt2 . Notice that for the (i, j) element of the matrix we have Z τδ ∨t 2 −2CCα +2 Dt 1 ≤ Kt α4s s2CCα kΦt,s ζ(Xs , θs )k ds ≤ Kt−3CCα+2 Z τδ ∧t τδ ∨t τδ ∧t s3CCα −4 (1 + kXs k m1 + kθs k m2 )ds. It is clear that from this point the analysis of Dt2 is identical to the analysis of It1,2 . In particular, define the quantity Z t m m −3CCα +2 L̂t = Kt s3CCα −4 (1 + kXs k 1 + kθs k 2 )ds, 1 n o and, for ε > 0, consider the event Ât,ε = L̂t ≥ tε−1 . Using Markov’s inequality and the uniform in time bounds for the moments of Xs and θs we obtain that Rt i E L̂t h t−3CCα +2 1 s3CCα −4 ds P Ât,ε ≤ ε−1 ≤ K t tε−1 −ε ≤ Kt . 21 From here on, the rest of the argument follows the Borel-Cantelli argument that was used for the proof a.s. of the first part of the lemma. This yields that Dt2 → 0 as t → ∞. Next, using the semi-group property and for τδ < t, Dt1 can be re-written as: Z τδ Dt1 = t−2CCα +2 α4s s2CCα Φt,τδ Φτδ ,s ζ(Xs , θs )ds. 1 Z τδ −2CCα +2 =t Φt,τδ α4s s2CCα Φτδ ,s ζ(Xs , θs )ds. 1 Therefore, by similar logic as for the term It1,1 , we obtain Dt1 ≤ C(τδ )t−3CCα +2 , a.s. where C(τδ ) is almost surely finite. Therefore, since CCα > 1, Dt1 → 0 as t → ∞. Consequently, as t → ∞, we have indeed obtained a.s. Dt = Dt1 + Dt2 → 0, which by Lemma 5.6 implies that the second statement of the lemma is true. This concludes the proof of the lemma. Proof of Lemma 5.3. Φt,s can be expressed in terms of Φ∗t,s . To see this, first perform a Taylor expansion: dΦt,s = Φs,s = −αt ∆ḡ(θ∗ )Φt,s dt − αt Ct Yt Φt,s dt, I, Ct are the third-order partial derivatives of ḡ(θ) and, based on the imposed assumptions, they are uniformly bounded. Therefore, Z t Φt,s = Φ∗t,s − αu Φ∗t,u Cu Yu Φu,s du. s Rt Define ξt,s = s αu Φ∗t,u Cu Yu Φu,s du. Recall that there exists an almost surely finite random time τδ such that kYt k < δ for all t ≥ τδ and any δ small enough. From the bounds on Φt,s and Φ∗t,s , we have that for t > s > τδ where δ small enough, Z t 2 2 kξt,s k ≤ t α2u Φ∗t,u Cu Yu Φu,s du s Z t 2 2 2 ≤ tK α2u Φ∗t,u kYu k kΦu,s k du s Z t ≤ Kδ 2 t−2CCα +1 s2CCα u−2 du s 2 −2CCα 2CCα ≤ Kδ t s . We have used the Cauchy-Schwartz inequality in the first inequality above. Now, consider the case where t > τδ but s < τδ . Z t αu Φ∗t,u Cu Yu Φu,s du ξt,s = s Z t Z τδ αu Φ∗t,u Cu Yu Φu,s du αu Φ∗t,u Cu Yu Φu,s du + = τδ s Z τδ αu Φ∗τδ ,u Cu Yu Φu,s du + ξt,τδ . = Φ∗t,τδ s 22 From the previous bound, kξt,τδ k ≤ Kδt−CCα τδCCα . Therefore, using the fact that τδ is almost surely finite, the bounds on Φ∗t,τδ and ξt,τδ , and the triangle inequality, kξt,s k ≤ C(τδ )t−CCα , when t > τδ but s < τδ . We will use these results to derive the limit of Σ̄t as t → ∞. Z t Σ̄t = t α2s Φt,s h̄(θ∗ )Φ⊤ t,s ds 1 Z t Z t Z t ∗,⊤ ⊤ ∗ ⊤ ∗ 2 2 ∗ ds α2s Φ∗t,s h̄(θ∗ )ξt,s αs ξt,s h̄(θ )Φt,s ds − t = t αs Φt,s h̄(θ )Φt,s ds − t 1 1 1 Z t Z t ⊤ ds. α2s Φ∗t,s h̄(θ∗ )ξt,s α2s ξt,s h̄(θ∗ )Φ⊤ = Σ̄∗t − t t,s ds − t (5.5) 1 1 Let’s consider the second term in (5.5). Without loss of generality, assume t > τδ . t Z 2 t 1 α2s ξt,s h̄(θ∗ )Φ⊤ t,s ds Z ≤ t3 ≤ t t τδ Z t 3 2 α2s ξt,s h̄(θ∗ )Φ⊤ t,s ≤ Kδ 2 t−4CCα +3 ≤ Kδ 2 + C(τδ )t Z t Z τδ 1 2 α2s ξt,s h̄(θ∗ )Φ⊤ t,s τδ ds + t3 ds + t 3 Z 1 τδ α2s ξt,s h̄(θ∗ )Φ⊤ t,s 2 ds ⊤ α2s ξt,s h̄(θ∗ )Φ⊤ τδ ,s Φt,τδ 2 ds s4CCα −4 ds + C(τδ )t−4CCα +3 τδ −4CCα +3 . (5.6) C(τδ ) is almost surely finite since τδ is almost surely finite. The third term in (5.5) is similar. Using (5.5) and the bound (5.6), we have that with probability one: lim sup Σ̄t − Σ̄∗t t→∞ ≤ Kδ. This implies that limt→∞ Σ̄t − Σ̄∗t = 0 since δ can be as small as we want. This concludes the proof of the lemma. Proof of Lemma 5.4. V̄t − Σ̄t = t Z 1 t  ∗ ⊤ α2s Φt,s h̄(θs )Φ⊤ t,s − Φt,s h̄(θ )Φt,s ds . Using the semi-group property,  Z τδ  ∗ ⊤ ⊤ ⊤ ⊤ 2 αs Φt,τδ Φτδ ,s h̄(θs )Φτδ ,s Φt,τδ − Φt,τδ Φτδ ,s h̄(θ )Φτδ ,s Φt,τδ ds V̄t − Σ̄t = t 1  Z t  ∗ ⊤ ⊤ 2 αs Φt,s h̄(θs )Φt,s − Φt,s h̄(θ )Φt,s ds. + t τδ The (i, j)-th element of the matrix V̄t − Σ̄t is: V̄t − Σ̄t  i,j = k X t m,ℓ,n,k′ =1 + t Z t τδ α2s Z X n,k′ 1 τδ ∗ α2s Φt,τδ ,i,m Φτδ ,s,m,ℓ ∇θ h̄(θs1 )⊤ ℓ,n (θs − θ )Φτδ ,s,n,k′ Φt,τδ ,k′ ,j ∗ Φt,s,i,n ∇θ h̄(θs1 )⊤ n,k′ (θs − θ )Φt,s,k′ ,j ds. 23 By the Cauchy-Schwartz inequality and the bound ∇θ h̄(θ) ≤ K(1 + kθk) we have 2  Z t X 1 ⊤ ∗ 2 αs Φt,s,i,n ∇θ h̄(θs )n,k′ (θs − θ )Φt,s,k′ ,j ds t ≤ t3 Z τδ n,k′ t X τδ α4s n,k′ 2 −4CCα +3 ≤ Kδ t ≤ Kδ 2 . We also have that:  Z t τδ 1 ≤ t3 Z τδ 1 ≤ Kt3 k X α2s m,ℓ,n,k′ =1 α4s  m,ℓ,n,k′ =1 ≤ C(τδ )t Z k X ds s4CCα −4 ds τδ (5.7) −θ ∗ ⊤ )Φ⊤ τδ ,s,n,k′ Φt,τδ ,k′ ,j ds ∗ Φt,τδ ,i,m Φτδ ,s,m,ℓ ∇θ h̄(θs1 )⊤ ℓ,n (θs − θ )Φτδ ,s,n,k′ Φt,τδ ,k′ ,j 2 Z  Φt,τδ ,k′ ,j Φt,τδ ,i,m τδ 1 −4CCα +3 2 t Φt,τδ ,i,m Φτδ ,s,m,ℓ ∇θ h̄(θs1 )⊤ ℓ,n (θs m,ℓ,n,k′ =1 k X ∗ Φt,s,i,n ∇θ h̄(θs1 )⊤ n,k′ (θs − θ )Φt,s,k′ ,j 2 2 ds 2  ∗ (θ − θ ) α4s Φ2τδ ,s,m,ℓ ∇θ h̄(θs1 )⊤ Φ2τδ ,s,n,k′ ds ℓ,n s . (5.8) Since τδ < ∞ with probability 1, C(τδ ) is also finite with probability 1. Combining the results from equations (5.7) and (5.8),  V̄t − Σ̄t i,j ≤ Kδ 2 + C(τδ )t−4CCα +3 . Therefore, we have that lim supt→∞ V̄t − Σ̄t ≤ Kδ 2 . Since δ is arbitrarily small, we have that V̄t −  a.s. Σ̄t i,j → 0, concluding the proof of the lemma. Proof of Lemma 5.5. Notice that we have  Z t  ⊤ h̄(θ )Φ − Φ α2s Φt,s h(θs , Xs )Φ⊤ Σt − V̄t = t s t,s t,s ds. t,s (5.9) 1 and consequently the (i, j)-th element of the matrix Σt − V̄t is: V̄t − Σ̄t  = t i,j Z t 1 α2s X Φt,s,i,n n k  X k′ =1  h(θs , Xs )n,k′ − h̄(θs )n,k′ Φ⊤ t,s,k′ ,j ds. Let wn,k′ (x, θ) be the solution to the Poisson equation Lwn,k′ (x, θ) = h(θ, x)n,k′ − h̄(θ)n,k′ . The solution to θ and x due to wn,k′ (t, θ) and its relevant partial derivatives will grow at most polynomially with respect  the assumptions of Theorem 2.12. The next step is to rewrite the difference V̄t − Σ̄t i,j using that Poisson equation and Itô’s formula and then to show that each term on the right hand side of the resulting equation goes to zero. For example we shall have that t Z t 1 = t α2s X Φt,s,i,n n Z 1 t α2s X n  k  X h(θs , Xs )n,k′ − h̄(θs )n,k′ Φt,s,k′ ,j ds k′ =1 Φt,s,i,n k X k′ =1 Φt,s,k′ ,j ∇x wn,k′ (Xs , θs )⊤ dWs + (∗), 24 (5.10) where (∗) is a collection of Riemann integrals resulting from the application of Itô’s formula. Now each of these terms can be shown to go to zero with an argument exactly parallel to Lemma 5.2. Due to the similarity of the argument, the details are omitted. 6 Convergence Analysis The central limit theorem provides an important theoretical guarantee for the performance of the SGDCT algorithm developed in [3]. Theorem 2.12 is particularly significant since it shows that the asymptotic 1 convergence rate of t− 2 even holds for a certain class of non-convex models. This is important since many models are non-convex. In addition, the analysis yields insight into the behavior of the algorithm and provides guidance on selecting the optimal learning√rate for numerical performance. The regime where the central limit theorem holds with the optimal rate t is Cα C > 1. Cα is the magnitude of the learning rate. For example, take α . Therefore, the learning rate magnitude must be chosen sufficiently large in order to achieve the αt = CC0 +t optimal rate of convergence. The larger the constant C is, the steeper the function ḡ(θ) is around the global minimum θ∗ . The smaller the constant C is, the smaller the function ḡ(θ) is around the global minimum θ∗ . The “flatter” the region around the global minimum point, the larger the learning rate magnitude must be. If the region around the global minimum point is steep, the learning rate magnitude can be smaller. 1 The condition of Cα C > 1 to ensure the convergence rate of t− 2 is not specific to the SGDCT algorithm, but is in general a characteristic of continuous-time statistical learning algorithms. The convergence rate of any continuous-time gradient descent algorithm with a decaying learning rate will depend upon the learning rate magnitude Cα . Consider the deterministic gradient descent algorithm dθt = −αt ∇θ ḡ(θ). dt Let αt = Cα C0 +t and assume ḡ(θ) is strongly convex. Then, kθt − θ∗ k ≤ Kt−CCα . Note that the convergence rate depends entirely upon the choice of the learning rate magnitude Cα . If Cα is very small, the deterministic gradient descent algorithm will even converge at a rate much smaller than 1 t− 2 . 1 t− 2 is the fastest possible convergence rate given that the noise in the system (1.1) is a Brownian motion. This is due to the quadratic variation of a Brownian motion growing linearly in time. However, other types 1 of noise with variances which grow sub-linearly in time could allow for a faster rate of convergence than t− 2 . An example of a stochastic process whose variance grows sub-linearly in time is a fractional Brownian motion with appropriately chosen Hurst parameter. Analyzing the convergence rate under more general types of noise would be a very interesting topic for future research. In the central limit theorem result, we are also able to precisely characterize the asymptotic covariance k  Σ̄ = Σ̄i,j i,j=1 , with Σ̄i,j = XX n ui,m un,m m and Σ̄ = Cα2 X ∗ h̄(θ ) n,k′ k′ Z ∞ e−s(Cα ∆ḡ(θ X m′ ∗ )−I)  Cα2 uj,m′ uk′ ,m′ (λm + λm′ ) Cα − 1 h(θ∗ )e−s(Cα (∆ḡ) ⊤ (θ ∗ )−I ) ds. 0 The covariance depends upon the eigenvalues and eigenvectors of the matrix ∆ḡ(θ∗ ), which is the Hessian matrix ∆ḡ(θ) at the global minimum θ∗ . The larger the eigenvalues, the smaller the variance. This means that the steeper the function ḡ(θ) is near the global minimum θ∗ , the smaller the asymptotic variance. The flatter the function ḡ(θ) is near the global minimum, the larger the asymptotic variance. If the function is very flat, θt ’s drift towards θ∗ is dominated by the fluctuations from the noise Wt . The covariance also 25 depends upon the learning rate magnitude Cα . The larger the learning rate magnitude, the larger the asymptotic variance Σ̄. Although a sufficiently large learning rate is required to achieve the optimal rate of 1 convergence t− 2 , too large of a learning rate will cause high variance. 7 Conclusion Stochastic gradient descent in continuous time (SGDCT) provides a computationally efficient method for the statistical learning of continuous-time models, which are widely used in science, engineering, and finance. The SGDCT algorithm follows a (noisy) descent direction along a continuous stream of data. The algorithm updates satisfy a stochastic differential equation. This paper analyzes the asymptotic convergence rate of the SGDCT algorithm by proving a central limit theorem. An Lp convergence rate is also proven for the algorithm. In addition to a theoretical guarantee, the convergence rate analysis provides important insights into the behavior and dynamics of the algorithm. The asymptotic covariance is precisely characterized and shows the effects of different features such as the learning rate, the level of noise, and the shape of the objective function. Rt The  proofs in this paper require addressing several challenges. 2First, fluctuations of the form 0 αs h(Xs , θs )− h̄(θs ) ds must be analyzed. We evaluate, and control with rate αt , these fluctuations using a Poisson partial differential equation. Secondly, the model f (x, θ) is allowed to grow with θ. This means that the fluctuations as well as other terms can grow with θ. Therefore, we must prove an a priori stability estimate for kθt k. Proving a central limit theorem for the non-convex ḡ(θ) in Theorem 2.12 is challenging since the convergence speed of θt can become arbitrarily slow in certain regions, and the gradient can even point away from the global minimum θ∗ . We prove the central limit theorem for the non-convex case by analyzing two regimes [0, τδ ] and [τδ , ∞), where τδ is defined such that kθt − θ∗ k < δ for all t ≥ τδ . The proof also requires the analysis of stochastic integrals with anticipative integrands, which is challenging since standard approaches (such as the Itô Isometry) cannot be directly applied. A Preliminary Estimates This section presents two key bounds that are used throughout the paper. Section A.1 proves uniform in p time moment bounds for θt . That is, we prove that E[kθt k ] is bounded uniformly in time. Section A.2 presents a bound on the solutions for a class of Poisson partial differential equations. In the paper, we relate certain equations to the solution of a Poisson partial differential equation and then apply this bound. A.1 Moment bounds It is easy to see that for kθk > R (in fact for kθk > 0) one has for kθt k =  q Pk i=1 θti 2    n n θ i θ j ∇ f ∇T f (X , θ ) X X ∇θ f ∇Tθ f (Xt , θt ) i,i θ t t i,j t t hθ , ∇ g(X , θ )i θ t θ t t  dt + α2t d kθt k = −αt − α2t 3 kθt k 2 kθ k t 2 kθ k t i=1 i,j=1 1 + αt hθt , ∇θ f (Xt , θt )dWt i kθt k     T n n θ i θ j ∇ f ∇T f (X , θ ) X X ∇ f ∇ f (X , θ ) θ t t θ t t hθt , ∇θ g(Xt , θt )i t t θ θ i,j i,i  = −αt + α2t dt − α2t 3 kθt k 2 kθ k t 2 kθ k t i=1 i,j=1 + αt τ (Xt , θt )dW̃t , for an independent one-dimensional Brownian motion W̃ . Let us also now consider the process θ̃t which satisfies dθ̃t = −αt κ(Xt )θ̃t dt + αt ∇θ f (Xt , θ̃t )dWt , 26 where κ(x) is from Condition 2.3. Then, we get similarly that for θ̃ > 0 and θ̃t =   d θ̃t = −αt κ(Xt ) θ̃t − α2t + αt 1 θ̃t   θ̃ti θ̃tj ∇θ̃ f ∇Tθ̃ f (Xt , θ̃t ) n X 2 θ̃t i,j=1 i,j 3 + α2t n X  = −αt κ(Xt ) θ̃t − α2t 2 θ̃t i,j=1 i,j 3 + α2t n X θ̃ti 2   ∇θ̃ f ∇Tθ̃ f (Xt , θ̃t ) i,i   dt 2 θ̃t    ∇θ̃ f ∇Tθ̃ f (Xt , θ̃t ) i,i   dt 2 θ̃t i=1   θ̃ti θ̃tj ∇θ̃ f ∇Tθ̃ f (Xt , θ̃t ) n X i=1  E D θ̃t , ∇θ̃ f (Xt , θ̃t )dWt  r Pk i=1 + αt τ (Xt , θ̃t )dW̃t Due to Conditions 2.3 and 2.4 and continuity of the involved drift and diffusion coefficients for kθk , θ̃ > R > 0, we may use the comparison theorem (see for example [5]) to obtain that   P kθt k ≤ θ̃t , t ≥ 0 = 1. (A.1) It is easy to see that the proof of the comparison theorem 1.1 of [5] goes through almost verbatim, despite the presence of the term λ(x) in Condition 2.4. The reason is that |λ(x)| is assumed to have at most polynomial growth in kxk and all moments of Xt are bounded uniformly in t. Now, notice that θ̃t can be written as the solution to the integral equation Z t R Rt − 0t αs κ(Xs )ds θ̃t = θ̃0 e + αs e− s αr κ(Xr )dr ∇θ f (Xs , θ̃s )dWs . 0 From the latter representation we obtain, recall that κ(x) is almost surely positive, that for any p ≥ 1 E θ̃t 2p ≤ E θ̃0 ≤ E θ̃0 ≤ E θ̃0 ≤ E θ̃0 ≤ E θ̃0 ≤ E θ̃0 ≤ E θ̃0 2p +E t Z αs e− Rt s αr κ(Xr )dr 0 2p +E 2p +E 0 t Z α2s e−2 −2p α2p s e 0 2p t Z Rt s αr κ(Xr )dr ∇θ f (Xs , θ̃s ) Rt αr κ(Xr )dr ∇θ f (Xs , θ̃s ) s t Z ∇θ f (Xs , θ̃s )dWs 2p 0 2p +K Z 0 2p ≤K +K Z t α2p s ds + K Z t 0 α2p s E θ̃s 2p  0 ds 2p p ds α2p s E θ̃s 2p ds ds  1  1−2p +K C0 − (C0 + t)1−2p + K 2p − 1 t 2 2p α2p ∇θ f (Xs , θ̃s ) ds s 0  Z t 2p 2pq +K α2p 1 + E kXs k + E θ̃s s +E 2p Z 0 t α2p s E θ̃s 2p ds. ds, where the unimportant finite constant K < ∞ changes from line to line. Hence, Gronwall lemma then immediately gives that for any p ≥ 1 there exists a finite constant K < ∞ such that sup E θ̃t t>0 27 2p ≤ K. (A.2) Combining (A.1) and (A.2) we then obtain that for any p ≥ 1 and for an appropriate finite constant K, 2p sup E kθt k t>0 ≤ K, completing the proof of the targeted bound. A.2 Poisson PDE We recall the following regularity result from [13] on the Poisson equations in the whole space, appropriately stated to cover our case of interest.  Theorem A.1. Let Conditions 2.1, 2.2 and 2.6 be satisfied. Assume that H(x, θ) ∈ C α,2 X , Rk , Z H(x, θ)π(dx) = 0, (A.3) X and that for some positive constants K, p1 , p2 , p3 and q, kH(x, θ)k ∂H (x, θ) ∂θ ∂2H (x, θ) ∂θ2 p q p q p q ≤ K(1 + kθk 1 )(1 + kxk ), ≤ K(1 + kθk 2 )(1 + kxk ), ≤ K(1 + kθk 3 )(1 + kxk ). Let Lx be the infinitesimal generator for the X process. Then the Poisson equation Z u(x, θ)π(dx) = 0 Lx u(x, θ) = H(x, θ), (A.4) (A.5) X has a unique solution that satisfies u(x, ·) ∈ C 2 for every x ∈ X , ∂θ2 u ∈ C (X × Rn ) and there exist positive constants K ′ and m such that ku(x, θ)k + k∇x u(x, θ)k ≤ K ′ (1 + kθkp1 )(1 + kxkm ), ∂2u ∂u p m (x, θ) + (x, θ) ≤ K ′ (1 + kθk 2 )(1 + kxk ), ∂θ ∂x∂θ ∂2u ∂3u p m (x, θ) + (x, θ) ≤ K ′ (1 + kθk 3 )(1 + kxk ). ∂θ2 ∂x∂θ2 (A.6) Terms of the form H(x, θ) = h(x, θ) − h̄(θ) must be analyzed and controlled throughout the paper. Note that H(x, θ) satisfies the centering condition (A.3). For example, the term G(x, θ) = ∇θ g(x, θ) − ∇θ ḡ(θ) needs to be controlled. G(x, θ) satisfies the centering condition (A.3) and Condition 2.6 implies the bounds (A.4) with appropriate choices for p1 , p2 , p3 and q. Therefore, the Poisson solution (A.5) associated with H(x, θ) = G(x, θ) satisfies the bounds (A.6). B Proof of Convergence with Linear Growth in f (x, θ) Under the global Lipschitz assumption on ∇ḡ(θ) and the uniform bounds on the moments of θ derived in (1) Appendix A.1 the proof is exactly the same as in [3], except for the term Jt of Lemma 3.1, in Section 3 of [3] which we re-define below and prove converges almost surely to 0. (1) Jt = αt kv(Xt , θt )k . Using the bounds (A.6) and results from [12], there is some 0 < K < ∞ (that may change from line to line below) and 0 < q < ∞ such that for t large enough   (1) E|Jt |2 ≤ Kα2t E 1 + kXt kq + kθt k2 ≤ Kα2t . 28 o n (1) Consider p > 0 such that limt→∞ α2t t2p = 0 and for any δ ∈ (0, p) define the event At,δ = Jt ≥ tδ−p . Then we have for t large enough such that α2t t2p ≤ 1 (1) P (At,δ ) ≤ E|Jt |2 1 α2 t2p ≤ K t2δ ≤ K 2δ . 2(δ−p) t t t The latter implies that X n∈N P (A2n ,δ ) < ∞. Therefore, by Borel-Cantelli lemma we have that for every δ ∈ (0, p) there is a finite positive random variable d(ω) and some n0 < ∞ such that for every n ≥ n0 one has (1) J2n ≤ d(ω) . 2n(p−δ) Thus for t ∈ [2n , 2n+1 ) and n ≥ n0 one has for some finite constant K < ∞ (1) Jt ≤ Kα2n+1 sup s∈(0,2n+1 ] kv(Xs , θs )k ≤ K d(ω) 2(n+1)(p−δ) ≤K d(ω) . tp−δ The latter display then guarantees that for t ≥ 2n0 we have with probability one (1) Jt ≤K d(ω) → 0, as t → ∞. tp−δ References [1] Y. Ait-Sahalia, Maximum Likelihood Estimation of Discretely Sampled Diffusions: A Closed-form Approximation Approach, Econometrica, Vol. 70, No. 1, (2002), pp. 223-262. [2] Y. Ait-Sahalia, Closed-form likelihood expansions for multivariate diffusions, Annals of Statistics, Vol. 36, No. 2, (2008), pp. 906-937. [3] Justin Sirignano and Konstantinos Spiliopoulos, Stochastic Gradient Descent in Continuous Time, SIAM Journal on Financial Mathematics, 2017, to appear. [4] M. Raginsky and J. Bouvrie, Continuous-time stochastic mirror descent on a network: variance reduction, consensus, convergence, IEEE Conference on Decision and Control, 2012. [5] N. Ikeda and S. Watanabe, A comparison theorem for solutions of stochastic differential equations and its applications, Osaka J. Math., Vol. 14, (1977), pp. 619-633. [6] A. Yu. Veretennikov, On polynomial mixing bounds for stochastic differential equations, Stochastic Processes and their Applications Vol. 70, Issue 1, (1997), pp. 115-127. [7] I. Basawa and B. Rao, Asymptotic inference for stochastic processes, Stochastic Processes and their Applications, Vol.10, No. 3, (1980), pp. 221-254. [8] A. Benveniste, M. Metivier, and P. Priouret, Adaptive Algorithms and Stochastic Approximations. Springer-Verlag, 2012. [9] J. P. N. Bishwal, Parameter estimation in stochastic differential equations, in: Lecture Notes in Mathematics, Vol. 1923, Springer Science & Business Media, 2008. [10] O. Elerian, S. Chib, and N. Shephard, Likelihood inference for discretely observed nonlinear diffusions, Econometrica, Vol. 69, No. 4, (2001), pp. 959-993. [11] B. L. S. P. Rao, Statistical inference for diffusion type processes, Arnold, 1999. 29 [12] E. Pardoux and A.Yu. Veretennikov, On Poisson equation and diffusion approximation 1, Annals of Probability, Vol. 29, No. 3, (2001), pp. 1061-1085. [13] E. Pardoux and A. Y. Veretennikov, On Poisson equation and diffusion approximation 2, The Annals of Probability, Vol. 31, No. 3, (2003), 1166-1192. [14] C. Chicone, Ordinary differential equations with applications, second edition, Springer, New York, 2006. [15] Y. Kutoyants, Statistical Inference for Ergodic Diffusion Processes. Springer, 2004. 30
10math.ST
SkyQuery: A Web Service Approach to Federate Databases Tanu Malik Alex S. Szalay Tamas Budavari Ani R. Thakar Johns Hopkins University Baltimore USA [email protected], [email protected], [email protected], [email protected] Abs tract Traditional science searched for new objects and phenomena that led to discoveries. Tomorrow's science will combine together the large pool of information in scientific archives and make discoveries. Scientists are currently keen to federate together the existing scientific databases. The major challenge in building a federation of these autonomous and heterogeneous databases is system integration. Ineffective integration will result in defunct federations and under utilized scientific data. Astronomy, in particular, has many autonomous archives spread over the Internet. It is now seeking to federate these, with minimal effort, into a Virtual Observatory that will solve complex distributed computing tasks such as answering federated spatial join queries. In this paper, we present SkyQuery, a successful prototype of an evolving federation of astronomy archives. It interoperates using the emerging Web services standard. We describe the SkyQuery architecture and show how it efficiently evaluates a probabilistic federated spatial join query. 1. Introduction Autonomous astronomy archives operating over the Internet feel an increasing need to federate with each other. A federation will enable their users to combine data in different archives for the same astronomical object and Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the VLDB copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Very Large Data Base Endowment. To copy otherwise, or to republish, requires a fee and/or special permission from the Endowment Proceedings of the 28th VLDB Conference, Hong Kong, China, 2002 thus examine each object in more detail. Similar needs to federate are also felt in pharmaceutical [UFI01], medical [Daw00], geographical [Arn98], and other scientific archives. A federated database is a collection of cooperating but autonomous component archives behaving like a single integrated database [She90]. The challenge in federation arises from the heterogeneity of the autonomous archives. Each archive makes independent choices in its hardware, software, data schema, etc., and invests its resources accordingly. As a result, differences arise among archives in the types of network systems, operating systems, database systems, programming platforms, and algorithmic techniques used. An archive is naturally reluctant to forsake its autonomy --- even if it isn't, complete restructuring can be prohibitively expensive. Federated database architecture is designed to maintain autonomy and yet accomplish federated tasks. This implies that the interfaces of the architecture must conform to some common standard fo r interoperability. Such a standard specifies, primarily, a communication protocol and a data exchange format. To be functional, a federation on the Internet needs a communication protocol that is universally acceptable and a data exchange format that is simple and extensible. In this paper, we present SkyQuery [Sky02], a successful prototype of one of the first proposed federations of astronomy archives. It supports a complex federated query called the cross match query, which is a spatial join query that matches objects between archives, if they correspond to the same astronomical body. SkyQuery is implemented using the emerging middleware standard called Web services [Sim01, XML02]. Its success in supporting cross matches has implications on the feasibility of adopting Web Services as a standard for a full-fledged federation of astronomy archives that also supports a variety of other federated queries and transactions. The rest of the paper is organized as follows. In Section 2, we give an overview of astronomy archives on the Internet, mentioning characteristics of astronomical data and the reasons behind the need to federate. A lot of effort, including from the geographical information systems community, has been directed towards standards for interoperability [Ama96, Arn98]. Some of the standards that have taken advantage from this community are CORBA [Obj02], DCOM [Dis98], and Java RMI [Jav98]. In Section 3, briefly look at the interoperability issues relevant to Internet federations. We also describe Web Services and point out its advantages and disadvantages. Spatial query execution in distributed and federated environments has recently become a focus of research. In Section 4, we give an overview of the existing work in this area. Section 5 is the heart of the paper. We first describe in detail the architecture of SkyQuery. We then define a cross match query. Next, we present an original algorithm designed to efficiently solve this query. Finally, we present the steps followed by the various components of SkyQuery in the execution of this algorithm. In Section 6 we make concluding remarks. In this paper, we use the terms “archive” and “database” interchangeably. Also, when we say, “user query”, we mean, the cross match query specified by the user. 2. Astronomy and the DataAvalanche: the Need for Federation Astronomy is a particularly good domain for building federations and evaluating techniques for federated spatial queries [APS99]. Astronomers have conducted more than a 100 independent surveys [Slo02, NAS02], each mapping the sky in different wavelengths, but related to each other by the unique position of each astronomical body. Typically, such surveys cover 10 – 100 million objects, with some of the larger ones expected to cover a billion objects. The archives resulting from these surveys are autonomous and heterogeneous. In spite of this, building a federation of these archives has been a goal of astronomers for a long time as the users will then be able to run federated spatial join queries. Through these queries, they would observe the same sky in other wavelengths (using someone else’s data) and combine the available observations into a multi-spectral data set. This would immensely aid in making discoveries faster and easier [Sch00]. Astronomical data sets are large and contain a widevariety of data types —from raw pixels to fully derived tables of scientific measurements [Sch00]. In addition this data is freely available. By studying and providing for the needs of the world’s 10,000 strong astronomy community, one can gain valuable insight in developing federated systems – which can then be scaled to support a much wider audience. 3. Choice of a Standard for Interoperability The components of a federated database need to agree upon a flexible communication standard for supporting message passing and for the RPC semantics used between them. To achieve this flexibility, we can either use proprietary standards or existing distributed object frameworks like DCOM, CORBA, Java RMI, etc., which have provided excellent solutions for distributed and multi-databases [Ozs99, Ama96, Arn98]. Proprietary solutions provide limited flexibility, as they are usually tailored to satisfy the needs of a single enterprise where the kind of heterogeneity is not the same as witnessed over the Internet. Similarly, distributed object frameworks for multi-databases are poorly suited to federated database systems in the following ways: 1. Network protocol dependence: These standards are integrated closely with a communication protocol. For example, CORBA 2.0 compliance requires vendors to support the TCP/IP protocol suite. 2. Operating system dependence: Most of the existing standards have platform preferences. DCOM is tightly integrated with Windows while CORBA with UNIX-based platforms. For DCOM, porting the solution can be arduous; while in CORBA, it is not guaranteed that ORBs [Obj02] from different vendors are interoperable. 3. Semantic dependence: Standards like DCOM, and Java RMI are based on the object -oriented paradigm. Implementing them is easy only in an object-oriented language. 4. Unwieldy: These standards are reliable, secure, and scalable, but at the same time, overloaded with functionality. This implies that solutions based on them are complex and difficult to maintain, and so unsuitable for applications not making use of the extra functionality they provide. In the following subsection, we give a brief description of the emerging Web services standard. 3.1 Web Services A distributed computing model consists of a message exchange model, a communication protocol, and mechanisms for describing, defining, and discovering services. Web Services use Internet -based applicationlevel protocols like Simple Mail Transfer Protocol (SMTP) [Smt01] and Hypertext Transfer Protocol (HTTP) [Hyp99] for communication between applications. Simple Object Access Protocol (SOAP) [Sim01] is the message-exchange protocol; Web Services Description Language (WSDL) [Web01] is the standard for describing and defining, services; and Universal Description, Discovery and Integration (UDDI) [Uni02] is the standard for discovering services. SOAP is a simple and lightweight mechanism for exchanging structured and typed information between peers in a decentralized, distributed environment. SOAP supports both one-way and request-response message exchange paradigms. Further, it is a flexible, easy-t odeploy, loosely coupled, access-protocol-independent, open standard protocol. It is highly flexible as it uses XML [Ext96] as the data exchange format. The syntaxindependence of XML allows communicating entities to specify the syntax of the data (meta-data) along with the actual payload, making it highly flexible for an evolving payload. SOAP message processing entities are lightweight, as it doesn’t define bulky protocol-dependent headers. HTTP messages containing SOAP need to specify only one extra field "Soap Action", below custom HTTP headers, that identifies the SOAP entity on the destination machine. SOAP is easy-t o-deploy as it currently uses XML and HTTP, whi ch are ubiquitous easy-t o-understand de facto Internet standards. Almost all machines support the HTTP protocol, and XML parsers are freely available, and being text based, very easy to understand and debug. SOAP is loosely coupled, as, due to the flexibility of XML, it doesn’t rely on any programming model or application semantics. SOAP is also access-protocol-independent.WSDL consists of two distinct parts - service definition and service implementation. Service definition is an XML-style description of what the service intends to provide, i.e., names of messages and their parameters, type of messages, etc. Service implementation specifies binding to a particular protocol or data type, i.e., syntax of the messages exchanged, protocols used to transfer messages, etc. By dissociating service definition from its implementation, WSDL allows re-use of the service description interface by clients that might be using other programming models to implement the service. Currently WSDL supports only SOAP and HTTP protocols for message communication. Services need a unique service for discovering other services that may be available on the Internet. This service should provide a common repository where services can register themselves and be discovered. UDDI is the standard architecture for building such repositories. To summarize, the simplicity and flexibility of XML and the ubiquity of HTTP make Web Services an attractive solution for federating archives. 4. Related Work Federated database systems have been extensively researched [Lit90]. Most studies, however, have concentrated on schema integration, cost estimation for sub-query execution at individual archives, construction of query execution plans, transaction management, and other issues that are not the primary focus of this paper and were only partially considered while building SkyQuery. Spatial joins, which are much more expensive than regular relational joins, have also received a lot of research attention [Arg98, Bri93]. But most schemes rely on the existence of efficient spatial indices to perform spatial joins. Abel et al. [Abe95] formalise a spatial semijoin operator, which is a generalisation of the conventional semi-join operator, and present efficient algorithms for performing distributed spatial joins. They present two algorithms based, again, on specialized spatial indices: (1) single dimensional object mappings, commonly known as space filling curves, for point data, and (2) the R tree for region data. These indices are rarely available in autonomous archives. Furthermore, since their objective is to compute a distributed join over a LAN, they assume that processing costs are relatively “more” than transmission costs. This is not true for federated spatial joins over the Internet, and so their algorithms aren’t well suited to our purpose. 5. SkyQuery: Architecture and Implementation SkyQuery is a prototype of an evolving federation of geographically separate astronomy databases on the Internet. It has a web interface that allows astronomers to query spatial data stored in the databases participating in the federation. In particular, SkyQuery evaluates a probabilistic federated spatial join query called the cross match query. In this section, we describe the algorithms and the architecture used in SkyQuery. We begin with a description of the architectural components and their interaction using Web services. Next, we explain the cross match query, and finally, we show how this framework for federation can be used for efficiently evaluating such queries. 5.1 Architecture The SkyQuery architecture is based on the wrappermediator architecture (Figure 1), which is common in federated database systems. It consists of three components (1) the Clients, (2) the Portal and (3) the SkyNodes. The Portal is the mediator and the SkyNodes contain the wrappers around databases. These three components coordinate with each other to perform two tasks: allowing databases to join the federation, and evaluating cross match queries. The Clients are web interfaces (or similar applications) that accept user queries and pass them on to the Portal. The Portal mediates between the Clients and the SkyNodes. It accepts user queries from the Clients and and coordinates with the SkyNodes to evaluate the queries. Primarily, SkyNodes are the heterogeneous, autonomous databases participating in the federation. Each SkyNode also implements services that act as Web services Interface Web services Interface Databasespecific API Web Meta-data services Information Portal Astronomy Archive Sky Node Query Registration Cross-Match Meta-data archive SkyNode SkyQuery Meta-data Web services Interface Information Query More such SkyNodes are waiting to join Portal Cross-match More such SkyNodes are waiting to join Portal Clients Messages between clients, portal and SkyNodes are exchanged as SOAP messages (over HTTP protocol) Figure 1 The SkyQuery Architecture wrappers and hide its DBMS and other platform specific details. This presents a uniform view to the Portal. The Portal provides two functionalities. First, it implements a Registration service that SkyNodes can use to join the federation. As part of registration, the Portal catalogs meta-data-information, which is used in query decomposition. Secondly, it receives SQL-like queries from the Client through its SkyQuery service. It decomposes the queries to generate performance queries that are used for query optimization. Based on the results of performance queries, the Portal constructs an optimized execution plan, which is, essentially, an ordered set of spatial queries. This order defines the routing of the spatial query set among the participating databases. Many federations, based on the wrapper-mediator architecture, pull results from each database to the Portal. SkyQuery, instead, moves the partial results of spatial queries from one SkyNode to the next along a chain that ends at the Portal. The Portal relays the final result back to the Client. The SkyNode databases usually have very similar logical schemas. A primary table stores the unique sky position for each astronomical object. Other tables store secondary observations like light intensities in various wavelengths, spectrograms and spectral lines of selected objects, etc. The implementation of the schemas, however, varies, and is an autonomous decision of the organization hosting the database. Apart from this, SkyNode databases have libraries that support range queries. Many astronomy archives support the HTM library [Hie02]; the HTM is a hierarchical spatial index based on spherical triangles. It helps in reducing spatial processing at individual databases.SkyNodes have APIs, which are database specific that provide access to the data and meta-data. In addition, each SkyNode has a wrapper, which implements its specific federation task. This wrapper interfaces with the APIs, as well as the libraries implementing the Web services standard. In essence, the wrapper hides the heterogeneity of the APIs and provides a uniform view to the Portal. This obviates the need for a different module at the Portal to communicate with each SkyNode. (Figure 1). A SkyNode implements the following four Web services – Information service, Meta-data service, Query service and Cross match service. The first three Web services are the minimum set of services needed to provide a basic framework for the federation of astronomy databases. The fourth service performs the actual federated task, which, in our case, is the execution of a cross match query. When a SkyNode wishes to join the SkyQuery federation; it calls the Registration service of the Portal. The registration request includes information about services available on the SkyNode. The Portal, in response to this request, calls the Meta-data service at the SkyNode. The Meta-data service is responsible for providing complete schema information to the Portal, which the Portal catalogs. Once the Portal successfully recognizes a SkyNode, it calls the Information service to collect certain astronomy specific constants of that SkyNode such as the object position estimation errors, the name of primary table that stores the position of objects, etc. The Query service is a generalpurpose database querying service. In our case, it is used by the Portal to answer performance queries. The Cross match service executes the cross match query. The next sub-sections explain the cross match query and describe its evaluation using these services. In this query, SDSS: Photo_Object, TWOMASS: Photo_Primary, and FIRST: Primary_Object are tables from three different federated SkyNodes, namely, SDSS, TWOMASS, and FIRST. The AREA clause limits the query to a circular range centered at longitude 185.0 and latitude -0.5, and with a radius of 4.5 arc seconds. 5.2 Cross Match Queries A cross match query is a SQL-like query with special clauses to specify spatial constraints. The spatial clauses are (1) AREA to specify a spatial range; and (2) XMATCH to specify a probabilistic (fuzzy) spatial join. The AREA clause is used to specify a circular range in the sky. All objects returned by the query have to lie within this range. The XMATCH clause is used to match objects in different archives that are observations of the same astronomical body (In this sub-section we use the term "body" to refer to the real astronomical object, and the term "object" to refer to an observation of such a body stored in an archive). Each archive measures the unique position in sky, i.e., right ascension and declination, for the astronomical bodies it observes. This measured position would be sufficient for exact matches between objects in different archives, except that there is always some unavoidable error in the measurements. The measured position varies slightly, from archive to archive. Astronomers assume that this measured position is a random variable distributed normally around the real position of the body. The standard deviation σ of the error is circular and is known for each survey; its value depends on the accuracy of the survey’s measuring instruments. Using this knowledge, given a set of objects, one from each archive, one can compute the probability of their being a cross match, i.e., of their referring to the same astronomical body. For a given query, the XMATCH clause specifies the minimum probability threshold for a set of objects to be considered a cross match. For example, take the following cross match query: Figure 2 Different sets of objects are selected based on XMATCH clause specified in user query. The figure shows that set {aO,aT, aP} gets selected when user specifies XMATCH(O,P,T) < 3.5 while {b O, bT,bP} gets selected when the user specifies The XMATCH clause specifies that only those sets of objects, one each from the three archives, which are within 3.5 standard deviations of their mean position, should be considered. (There is a direct correspondence from this specification to the specification in terms of the minimum probability threshold for a set of objects that was mentioned earlier). For example, in Figure 2, a O, aT, and a P are the positions for the body a as observed by the archives O, T, and P. Similarly b O, bT, and, b P are observations for body b. Assume that all these observations satisfy the AREA clause. The mean positions for the two sets of observations are a m and b m, respectively. Note, that the mean positions depend on which observations are being considered for computing the mean, but for the sake of simplicity, we will assume that they are always at the positions shown. The figure also shows, for each body, the range of 3.5 standard deviations from the mean position. All three observations for the object a are within this range. So the set {a , aT, aP O SELECT O.object_id, O.right_accession, T.object_id FROM SDSS: Photo_Object O, TWOMASS: Photo_Primary T, FIRST: Primary_Object PWHERE AREA (185.0,-0.5,4.5) AND XMATCH (O,T,P) <3.5 AND O.type= GALAXY AND (O.i_flux - T.i_flux)>2. } is a cross match. But the set for body b, {b O, bT, b P }, is not a cross match as b P is out of range. The XMATCH clause can also specify the absence of a match. For example, if instead, the clause was XMATCH (O, T, !P) <3.5, it would imply selection of only those sets of objects, one each from the first two archives, that are within 3.5 standard deviations of their mean position, and which don’t have a matching object in the last archive within the same error bound. The last archive is called a drop out. Note that a drop out specification corresponds to an “exclusive” outer join. In Figure 2, {aO, a T, a P} is not a cross match for this specification, but {b O, b T} is. Archives specified in XMATCH clause that are not drop outs are called mandatory. 5.3 Query Execution and Optimization Query execution (see Figure 3) in SkyQuery incurs processing costs at the individual SkyNodes and transmission costs in sending partial results from one SkyNode to the next. We reduce processing costs by using an efficient algorithm for cross match computation at each SkyNode, and we reduce transmission costs by first sending performance queries to estimate the maximum size of the partial result that each SkyNode will transmit. There are methods that involve extensive calculations for reducing transmission costs, but we use one that is simple, yet effective. Our method follows the basic approach of treating component DBMSs as black boxes, running test queries on them, and finally estimating transmission costs from the results. This approach has attracted considerable attention for its simplicity [Du92, Zhu96]. We call our method the count star approach, as our test queries are count queries on the component databases of the federation. For every user submitted cross match query, the Portal creates performance queries (Step 2 in Figure 3), one for each of the mandatory archives contained in the XMATCH clause. A performance query for a component database is a SQL query constructed to find an upper bound on the number of tuples the database will return Figure 3 The Portal and the SkyNodes coordinate to solve a cross match query submitted by a Client. The figure shows the order in which the sample query gets executed. during the cross match computation. For example, the cross match query discussed earlier will result in the following three performance queries: SELECT count(*) FROM SDSS: Photo_Object O WHERE AREA(185.0,0.5,4,5) AND O.type = GALAXY. SELECT count(*) FROM TWOMASS: Photo_Primary T WHERE AREA(185.0,0.5,4,5) SELECT count(*) FROM FIRST: Primary_Object P WHERE AREA(185.0,0.5,4,5) Note, these queries contain clauses that can be evaluated entirely at their SkyNodes. These performance queries are passed as asynchronous SOAP messages to the respective Query services of each SkyNode (Step 3 in Figure 3). This will often warm the database cache on each SkyNode with index pages that satisfy the main cross match query, and thus aid in reducing processing time that would be incurred while doing the cross match. When the messages of performance query results with the number of potentially qualifying tuples arrive at the Portal (Step 4 in Figure 3), it creates a federated query execution plan (Step 5 in Figure 3). (De-serialization of these messages is not an expensive operation as they are single integers.) The federated query execution plan consists of a list of ordered pairs, each containing a query and the URL information of the SkyNode where it would be executed. The list is in decreasing order of the count star values returned by the performance queries, with the drop out archives, if any, at the beginning of the list. To begin cross match query execution, the Portal sends a SOAP RPC to the Cross match service of the first SkyNode on the list, and passes the query execution plan as a parameter. This Cross match service, in turn, calls the similar service at the second SkyNode on the list, again with the plan as a parameter. This daisy chaining continues until the last SkyNode on the list, which executes the query meant for it (Step 6 in Figure 3). The query selects rows that satisfy the AREA and other clauses. The query result includes spatial attributes required for computing the cross match. The SkyNode returns this result, as a serialized XML encoded SOAP message to its calling SkyNode. (Step 7 in Figure 3). Now, at this (second last in the list) SkyNode the encoded results are first de-serialized using a SOAP translator. Next, the results are cast into a database object characteristic to the database that the SkyNode hosts. The Cross match service uses the database specific API at that SkyNode to insert the values in the database object into a temporary table. Next, a stored procedure encoding the cross match algorithm (See Section 5.4) uses this temporary table and the primary table at this SkyNode to identify matching objects (with the last SkyNode) that have a potential to satisfy the XMATCH clause. Note, the certainty of the XMATCH clause being satisfied is only known after all the SkyNodes have been consulted. This procedure, in fact, computes an implicit spatial join. (The join is akin to an outer join or an inner join based on whether the archive is a drop out or not). After this, the Cross match service executes its own (non-spatial) query from the execution plan and joins - this is an explicit inner join - with the results of the spatial join. The final results are returned to the calling SkyNode. The temporary table is deleted. The process above is repeated at every SkyNode in the reverse order of the calls. The first SkyNode returns the results to the Portal, which relays it to the client. In this whole process, it is clear that the order based on the count star values will often decrease the network transmission costs. 5.4 The Cross Match Algorithm The AREA clause in a cross match query is implemented using the range search capabilities of the individual archives. We assume that each archive has a reasonably efficient mechanism for implementing a range search. One such mechanism, which is also used by the SkyQuery test databases, is the HTM [Hie02]. This mechanism builds a quad tree on the sky, each node of which corresponds to a spherical triangle. To retrieve objects in a given range, triangles that are entirely within or intersect the range are first computed. All objects in the triangles that are entirely within the range are in the range too. Objects that are in intersecting triangles, however, are again individually tested to check if they are within the range or not. Objects in other triangles are not in range. Similarly, the other clauses, except XMATCH, are implemented using each archive’s ability to evaluate regular queries. The XMATCH clause is implemented by computing a probabilistic spatial join. Let the clause contain N archives. Assume that none of them are dropouts; the extension to include dropouts is straightforward. We first describe, given an N -tuple of objects R = (o1 ,...,oN), one from each archive, how to compute the log likelihood of each oi, 1 = ?i = ?N, being an observation of the same astronomical body. Let the position for object o i (from archive i) be given by (xi, yi, zi). Let (x, y, z) be the unknown true position of the astronomical body. The log likelihood that the observations in R are of this object is N 1 2 χ 2(x , y, z) = −∑ 2 (x − xi ) + (y − yi )2 + (z − zi )2 i =1 2σ i where s i is the standard deviation of the error at archive i. The best such position (x, y, z) is obtained by minimizing the following chi -squared expression [ ] 1 ∑ 2σ [(x − x ) + ( y − y ) + (z − z ) ]− λ[x N 2 2 i =1 i 2 i 2 i 1 2 2 ] + y2 + z 2 − 1 i where the second term is the Lagrange multiplier that forces (x, y, z) to be a unit vector. This best position is along the direction ( a x , a y , a z ) , and the log likelihood at this position is, − a N a= + a 2x + a 2y + a z2 , where N x N y N z 1 i i i , a = , a = , a = ∑ 2 x ∑ 2 y ∑ 2 z ∑ 2. i=1 σi i=1 σi i=1 σi i=1 σi Only those N-tuples satisfy the XMATCH clause that have a log likelihood value greater than the threshold specified in the clause. Let the set of satisfying tuples be S. This set is computed in a distributed fashion as each archive is at a different site; the computation is done in N steps, one at each archive. At archive i, the set Si consisting of tuples of length i that “have the potential” to satisfy the clause is constructed. Let Ri = (o1,..., oi) be one such tuple. For each such Ri the corresponding cumulative values are also computed. Remember that (ai,x ,ai,y, ai,z) is the direction of the best position (xi, yi, zi) of the astronomical object if Ri is to be a cross match. To compute these values, the archive i receives from archive i-1 tuples of type Ri-1 = (o1, ..., oi-1) and the corresponding values ai -1, ai-1,x, ai-1, y, ai-1,z. For each Ri-1, archive i retrieves all objects that are close to the current best position (xi-1,yi-1,zi-1) (and satisfy the other clauses in the cross match query) using a range search. Each such object is appended to Ri -1 to get tuples of type Ri. The cumulative values for each such Ri are then computed using the information available. Next, the log likelihood of Ri being a cross match is computed, and only if it is larger than the threshold, Ri (and its cumulative values) is sent to the next archive i+1. The first archive just needs to send 1-tuples comprising of objects that satisfy the other clauses in the query to the second archive. The tuples surviving the Nth archive are the required cross matches. This XMATCH scheme is fully symmetric; the particular order of the archives considered doesn’t matter. We do, however, impose an order, using the count star approach to reduce network data transfer costs. 6. Conclusion We want to highlight some of our experiences while developing SkyQuery, talk about extensions, as well as speculate on what it may imply for the future of federations (of astronomy archives) on the Internet. Since SOAP is an evolving standard, it was difficult to find a fully standard-conforming, well-documented SOAP implementation. The Web service implementation did not require any significant programming overhead as, we feel, would have been required with an alternative technology like CORBA. We faced problems while trying to match large number of objects, though. The XML parser at the SkyNode would run out of memory while parsing SOAP messages of about 10 MB. We worked around by dividing large data sets into smaller chunks. SOAP is considered to be slower than other middleware, like, CORBA, because of the time spent for serialization and de-serialization [XML02]. XML and SOAP are technologies that are still evolving and probably quite far from realizing their peak in terms of the service and the convenience they provide. Yet, we found that they were more than sufficient for building SkyQuery. This makes us want to extend SkyQuery, using XML and SOAP, to perform other complex distributed computing tasks for the Virtual Observatory. We would also like to include a lot more participating archives. That would effectively test the interoperability and the system integration capabilities of Web services. Another extension is to implement transaction processing for exchange of data between astronomy archives, and see how the stateless SOAP handles such complex requirements. We are still building SkyQuery and extending its functionality. We want to evaluate spatial queries more complex than cross matches. For example, queries on spatial objects that are not just points but objects of different shapes like polygons. They AREA clause can also be extended to specify arbitrary polygons rather than just simple circles. This would imply many more evaluations of spatial joins and an exchange of a larger magnitude of XML data. SkyQuery shows that Web services are a good medium for publishing data on the Internet. It demonstrates that such archives can be federated with minimal additional software effort and compliance requirements. 7. Acknowledgements The authors thank Jim Gray for inspiring them to write this paper in the first place as well as for the helpful suggestions and discussions at all stages of this project. References [Abe95] D.J. Abel, B.C. Ooi, K.L. Tan, R. Power, and J.X. Yu. Spatial Join Strategies in Distributed Spatial Dbms. Proc. Fourth Int'l Symp. Large Spatial Databases, pp. 348--367, Aug. 1995. [Ama96] Bernd Amann. Integrating GIS Components with Mediators and CORBA. http://citeseer.nj.nec.com/ amann96integrating.html, 1996. [APS99] APS Federated Database. http://spihr.spa.umn. edu/FedBase, 1999. [Arn98] H.-Arno Jacobsen, Agnès Voisard. CORBABased Interoperable Geographic Information Systems. European Conference on Parallel and Distributed Systems, 1998. [Arg98] Lars Arge, Octavian Procopiuc, Sridhar Ramaswamy, Torsten Suel, Jeffrey Scott Vitter. Scalable Sweeping-Based Spatial Join. Proc. 24th Int. Conf. Very Large Data Bases ( VLDB), 1998. [Bri93] T. Brinkhoff, H.-P. Kriegel, B. Seeger. Efficient Processing of Spatial Joins Using R-trees. Proceedings of ACM SIGMOD Conf., 1993. [Daw00] Steven Dawson, Shelly Qian, and Pierangela Samarati. Providing Security and Interoperation of Heterogeneous Systems. Distributed and Parallel Databases, 8(1):119--145, 2000. [Dis98] Distributed Component Object Model. http://www.microsoft.com/com/tech/DCOM.asp, 1998. [Du92] W. Du, R. Krishnamurthy, M. C. Shan. Query Optimization in a Heterogeneous DBMS. Proc. 18 th Intl. Conf. on VLDB, pp 277-291, 1992. [Ext96] Extensible Markup Language (XML) http://www.w3.org/TR/WD-xml-961114.html, 1996. [Hei85] D. Heimbigner and D. McLeod. A Federated Architecture for Information Management., ACM Transactions on Office Information Systems, 3(3): 253 -278, Jul. 1985. [Hie02] Hierarchical Triangular sdss.jhu.edu/htm, 2002. Mesh. [Sch00] Schade, D., Dowler, P., Zingle, R., Durand, D., Gaudet, S., Hill, N., Jaeger, S., & Bohlender, D. 2000, in ASP Conf. Ser., Vol. 216, Astronomical Data Analysis Software and Systems IX, Eds. N. Manset, C. Veillet, D. Crabtree (San Francisco: ASP), 215. [She90] A. Sheth and J. Larson. Federated database systems for managing distributed, heterogeneous, and autonomous databases. ACM Trans. Database System, 22(3), 1990. [Sim01] Simple Object Access Protocol (SOAP 1.1). http://www.w3.org/TR/SOAP/, 200. [Sky02] SkyQuery http://www.skyquery.net, 2002. [Slo02] Sloan Digital Sky Survey. http://www.sdss. org, 2002. [20 Smt01] RFC 2821. Simple Mail Transfer Protocol (SMTP). http://www.ietf.org/rfc/rfc2821.txt, 2001. http://www. [Hyp99] RFC 2616. Hypertext Transfer Protocol -HTTP/1.1. http://www.ietf.org/rfc/rfc2616.txt, 1999. [UFI01] UF Interdisciplinary Bioinformatics Initiative Clinical Data Subgroup Summary, http://www.biotech. ufl.edu/BioInformatics/ClinicalDataSummary.htm, 2001. [18 Uni98] RFC 2396. Uniform Resource Identifiers (URI): Generic Syntax. http://www.ietf.org/rfc/ rfc2396.txt, 1998. [Jav98] Java Remote Method Invocation. http://java.sun.com/, 1998. [17 Kia00] Kian-Lee Tan, Beng Chin Ooi, David. J. Abel. Exploiting Spatial Indexes for Semijoin-based Join Processing in Distributed Spatial Databases. IEEE Trans. and Data Engineering, 12(6), 2000. [Lit90] Witold Litwin, Leo Mark, and Nick Roussopoulos. Interoperability of multiple autonomous databases. ACM Computing Surveys (CSUR), 22(3): 267 – 293, September 1990. [Mul96] RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies.http://www.ietf.org/rfc/rfc2045.txt, 1996. [NAS02] NASA Astronomical http://adc.gsfc. nasa.gov/, 2002. [Ozs99] M. T. Ozsu and P. Valduriez. Principles of Distributed Database Systems. Prentice Hall, Inc., second edition, 1999. Data Center. [Obj02] Object Management Group. http://www.omg.org, 2002 [Uni02] Universal Description, Discovery and Integration of Web services. http://www.uddi.org, 2002. [ Web01] Web Services Description Language (WSDL). http://www.w3.org/TR/wsdl, 2001 [ XML02] XML as a basis for remote procedure calls http://www.webservices.org/fullpaper.php, 2002. [Zhu96] Q. Zhu and P.A. Larson. Solving Local Cost Estimation Problem for Global Query Optimization in Multidatabase Systems. Proc. 9th Intl. Conf. on Parallel and Distributed Computing Systems (PDCS), Sep 1996, pp. 640-647.
5cs.CE
Modular Deep Q Networks for Sim-to-real Transfer of Visuo-motor Policies 1 Introduction The advent of large datasets and sophisticated machine learning models, commonly referred to as deep learning, has in recent years created a trend away from handcrafted solutions towards more data-driven ones. Learning techniques have shown significant improvements in robustness and performance [Krizhevsky et al., 2012], particularly in the computer vision field. Traditionally robotic reaching approaches have been based on crafted controllers that combine (heuristic) motion planners with the use of hand-crafted features to localize the target visually. Recently learning approaches to tackle this problem have been presented [Zhang et al., 2015; Levine et al., 2016b; Bateux et al., 2017; Katyal et al., B 64 filters 64 filters Conv1 Conv2 Conv3 Θ I Perception Module fully conn. 9 units fully conn. + ReLU 300 units fully conn. + ReLU LqBN Task Loss (Lq) 64 filters 5 units Or fully conn. 84×84 400 units Perception Loss (Lp) C stride 1 3×3 conv + ReLU While deep learning has had significant successes in computer vision thanks to the abundance of visual data, collecting sufficiently large real-world datasets for robot learning can be costly. To increase the practicality of these techniques on real robots, we propose a modular deep reinforcement learning method capable of transferring models trained in simulation to a real-world robotic task. We introduce a bottleneck between perception and control, enabling the networks to be trained independently, but then merged and fine-tuned in an end-to-end manner to further improve hand-eye coordination. On a canonical, planar visually-guided robot reaching task a fine-tuned accuracy of 1.6 pixels is achieved, a significant improvement over naive transfer (17.5 pixels), showing the potential for more complicated and broader applications. Our method provides a technique for more efficient learning and transfer of visuomotor policies for real robotic systems without relying entirely on large real-world robot datasets. A stride 2 4×4 conv + ReLU Abstract stride 2 7×7 conv + ReLU arXiv:1610.06781v4 [cs.RO] 19 Dec 2017 Fangyi Zhang, Jürgen Leitner, Michael Milford, Peter Corke Australian Centre for Robotic Vision (ACRV), Queensland University of Technology (QUT) Brisbane, Australia [email protected] Q-values BN FC_c1 FC_c2 FC_c3 Bottleneck Control Module Figure 1: We present a technique for efficient learning and transfer of visuo-motor policies for a planar reaching task from simulated (A) to real environments (B) using a modular deep Q network (C). 2017]. However a consistent issue faced by most approaches is the reliance on large amounts of data to train these models. For example, Google researchers addressed this problem by developing an "arm farm" with 6 to 14 robots collecting data in parallel [Levine et al., 2016b]. Generalization forms another challenge: many current systems are brittle when learned models are applied to robotic configurations that differ from those used in training. This leads to the question: is there a better way to learn and transfer visuo-motor policies on robots for tasks such as reaching? Various approaches have been proposed to address these problems in a robot learning context: (i) the use of simulators, simulated and synthetic data [Bateux et al., 2017; D’Innocente et al., 2017; Tobin et al., 2017; James et al., 2017]; (ii) methods that transfer the learned models to real-world scenarios [Fitzgerald et al., 2015; Tzeng et al., 2016]; (iii) directly learning real-world tasks by collecting large amounts of data [Levine et al., 2016b; Pinto and Gupta, 2016]. In this paper, we present a method that connects these three, usually separately considered, approaches. Vision and kinematics data is gathered in simulations (cheap) to decrease the amount of real world collection necessary (costly). The approach is capable of transferring the learned models to real-world scenarios with a fraction of the real-world data typically required for direct realworld learning approaches. In particular, we propose a modular deep reinforcement learning approach – inspired by DQN for Atari game playing [Mnih et al., 2015] – to efficiently learn and transfer visuo-motor policies from simulated to real environments, and benchmark with a visually-guided planar reaching task for a robotic arm (Figure 1). By introducing a modular approach, the perception skill and the controller can be transferred individually to a robotic platform, while retaining the ability to fine-tune them in an end-to-end fashion to further improve hand-eye coordination on a real robot (in this research a Baxter). 2 Related Work Data-driven learning approaches have become popular in computer vision and are starting to replace hand-crafted solutions also in robotic applications. Especially robotic vision tasks – robotic tasks based directly on real image data – such as, navigation [Tai et al., 2016], object grasping and manipulation [Levine et al., 2016b; Pinto and Gupta, 2016; Lenz et al., 2015] have seen increased interest. The lack of large-scale real-world datasets, which are expensive, slow to acquire and limit the general applicability of the approach, has so far limited the broader application. Collecting the datasets required for deep learning has been sped up by using many robots operating in parallel [Levine et al., 2016b]. With over 800,000 grasp attempts recorded, a deep network was trained to predict the success probability of a sequence of motions aiming at grasping on a 7 DoF robotic manipulator with a 2-finger gripper. Combined with a simple derivative-free optimization algorithm the grasping system achieved a success rate of 80%. Another example of dataset collection for grasping is the approach to self-supervised grasping learning in the real world where force sensors were used to autonomously label samples [Pinto and Gupta, 2016]. After training with 50,000 real-world trials using a staged leaning method, a deep convolutional neural network (CNN) achieved a grasping success rate around 70%. These are impressive results but achieved at high cost in terms of dollars, space and time. DeepMind showed that a deep reinforcement learning system is able to directly synthesize control actions for computer games from vision data [Mnih et al., 2015]. While this result is an important and exciting breakthrough it does not transfer directly to real robots with real cameras observing real scenes [Zhang et al., 2015]. In fact very modest image distortions in the simulation environment (small translations, Gaussian noise and scaling of the RGB color channels) caused the performance of the system to fall dramatically. Introducing a real camera observing the game screen was even worse [Tow et al., 2016]. There has been increasing interest to create robust visuo-motor policies for robotic applications, especially in reaching and grasping. Levine et al. introduced a CNN-based policy representation architecture with an added guided policy search (GPS) to learn visuo-motor policies (from joint angles and camera images to joint torques) [Levine et al., 2016a], which allow to reduce the number of real world training by providing an oracle (or expert’s initial condition to start learning). Impressive results were achieved in complex tasks, such as hanging a coat hanger, inserting a block into a toy, and tightening a bottle cap. Recently it has been proposed to simulate depth images to learn and then transfer grasping skills to real-world robotic arms [Viereck et al., 2017], yet no adaptation in the real-world has been performed. Transfer learning attempts to develop methods to transfer knowledge between different tasks [Taylor and Stone, 2009; Pan and Yang, 2010]. To reduce the amount of data collected in the real world (expensive), transferring skills from simulation to the real world is an attractive alternative. Progressive neural networks are leveraged to improve transfer and avoid catastrophic forgetting when learning complex sequences of tasks [Rusu et al., 2017]. Their effectiveness has been validated on reinforcement learning tasks, such as Atari and 3D maze game playing. Modular reinforcement learning approaches have shown skill transfer capabilities in simulation [Devin et al., 2017]. However, methods for realworld robotic applications are still scarce and require manually designed mapping information, e.g. similaritybased approach to skill transfer for robots [Fitzgerald et al., 2015]. To reduce the number of real-world images required, a method of adapting visual representations from simulated to real environments was proposed, achieving a success rate of 79.2% in a “hook loop” task, with 10 times less real-world images [Tzeng et al., 2016]. 3 Methodology Reinforcement learning [Sutton and Barto, 1998a] has been proposed for agents to learn novel behaviours. One approach for learning from rewards is Q-learning [Sutton and Barto, 1998b], which aims to obtain a policy π that maximizes the expectation of accumulated rewards by approximating an optimal Q-value function ∞ hX i Q∗ (s, a) = max E γ i rt+i |st = s, at = a, π , π (1) i=0 Modular Deep Q Networks Our preliminary studies of deep visuo-motor policies indicate that the convolutional layers focus on perception, i.e., extracting useful information from visual inputs, while the fully connected (FC) layers perform control [Zhang et al., 2017b]. To make the learning and transfer of perception and control more efficient, we propose to separate the DQN into perception and control modules connected by a bottleneck layer (Figure 1C). The bottleneck forces the network to learn a low-dimensional representation, not unlike Autoencoders [Hinton and Salakhutdinov, 2006]. The difference is that we explicitly equate the bottleneck layer with the minimal scene configuration Θ whose meaning will be further introduced in Section 4. The values in Θ are normalized to the interval [0, 1]. With the bottleneck, the perception module learns how to estimate the scene configuration Θ̂ from a rawpixel image I; the control module learns to approximate the optimal Q-value function as defined in Eq. 1, determining the most appropriate action a∗ given the scene configuration Θ, i.e., a∗ = max Q(Θ, a). a To further improve the performance of a combined network (perception + control), a weighted end-to-end fine-tuning method is proposed, since experimental results show that a naive end-to-end fine-tuning using a straight-forward loss function does not work well for performance improvement (Section 5.3). 3.2 m Lp = where rt is the reward at each time step t, when following a behaviour policy π = P (a|s) that determines which action a to take in each state s. γ is a discount factor applied to future rewards. A deep neural network was introduced to approximate the Q-value function, named Deep Q Network (DQN) [Mnih et al., 2015]. The state can therefore be represented by a high-dimensional raw-pixel image, since latent state features can be extracted by the convolutional layers [Krizhevsky et al., 2012]. However, learned visuo-motor policies with highlevel (raw pixel) input do not transfer directly from simulated to real robots [Zhang et al., 2015]. 3.1 with the quadratic loss function Training Method Perception The perception network is trained using supervised learning – first conducted in simulation, then fine-tuned with a small number of real samples for skill transfer – 1 X y(I j ) − Θj 2m j=1 2 , (2) where y(I j ) is the prediction of Θj for I j ; m is the number of samples. Control The control network is trained using Q-learning, where weights are updated using the Bellman equation which is equivalent to the loss function m 1 X Q(Θjt , ajt ) − (rtj + γ max Q(Θjt+1 , ajt+1 )) Lq = 2m j=1 ajt+1 2 (3) where Q(Θjt , ajt ) is the Q-value function; γ is the discount factor applied to future rewards. End-to-end fine-tuning using weighted losses Aiming for a better hand-eye coordination, an end-toend fine-tuning is conducted for a combined network (perception + control) after their separate training, using weighted task (Lq ) and perception (Lp ) losses. Here for end-to-end fine-tuning, Θj is replaced with I j in Lq (Eq. 3). The control network is updated using only Lq , while the perception network is updated using the weighted loss L = βLp + (1 − β)LBN q , (4) where LBN is a pseudo-loss which reflects the loss of Lq q in the bottleneck (BN); β ∈ [0, 1] is a balancing weight. From the backpropagation algorithm [LeCun, 1988], we , where δL is the can infer that δL = βδLp + (1 − β)δLBN q are the gradients gradients resulted by L; δLp and δLBN q (equivalent to resulting respectively from Lp and LBN q that resulting from Lq in the perception module). 4 Benchmark: Robotic Reaching We use the canonical planar reaching task in [Zhang et al., 2015] as a benchmark to evaluate the feasibility of the modular DQN and its training method. The task is defined as controlling a robot arm so that its end-effector position x in operational space moves to the position of a target x∗ ∈ Rm . The robot’s joint configuration is represented by its joint angles q ∈ Rn . The two spaces are related by the forward kinematics, i.e., x = K(q). The reaching controller adjusts the robot configuration to minimize the error between the robot’s current and target position, i.e., kx − x∗ k. In this task, we use the target position x∗ and arm configuration q to represent the scene configuration Θ. The physical meaning of Θ guarantees the convenience of collecting labelled training , configuration Θ, its outputs are the Q-value estimates for each of the 9 possible actions. Networks with a first convolutional layer initialized with weights from pre-trained GoogLeNet [Szegedy et al., 2015] (on ImageNet data [Deng et al., 2009]) were observed to converge faster and achieve higher accuracy. As GoogLeNet has three input channels (RGB) compared to our single (grey) channel network a weight conversion, based on standard RGB to grey-scale mapping, is necessary in the first convolutional layer initialization. The other parts of the networks are initialized with random weights. Figure 2: A webcam is used to observe the scene, providing visual inputs. data, as it can directly be measured. We consider a robotic arm (Figure 1) with 3 degrees of freedom (DoF), i.e., q ∈ R3 steering its end-effector position in the plane i.e., x ∈ R2 – ignoring orientation. Task setup The real-world task employs a Baxter robot’s left arm (Figure 1B) to reach (in a vertical plane) for an arbitrarily placed blue target using vision. We control only three joints, keeping the others fixed. At each time step one of 9 possible actions a ∈ a is chosen to change the robot configuration, 3 per joint: increasing or decreasing by a constant amount (0.04 rad) or leaving it unchanged. A monocular webcam is placed on a tripod to observe the scene, providing raw-pixel image inputs (Figure 2). Simulator A simple simulator was created that, given a scene configuration Θ = [x∗ q] ∈ R5 , generates the corresponding image. It creates images using a simplistic representation of a Baxter arm (in configuration q) and the target (at location x∗ ) represented by a blue disc with a radius of 3.8 pixels (9 cm) in the image (Figure 1A). A reach is deemed successful if the robot reaches and keeps its end-effector within 7 pixels (16 cm) of the target’s centre for four consecutive actions. Experimental results show that although the simulator is low-fidelity, and therefore cheap and fast for data collection, reaching skills can be learned and transferred to the real robot. Network architecture The perception network for the task has an architecture as shown in Figure 1C, which consists of 3 convolutional and 1 fully-connected (FC) layer. Images from the simulator or the webcam (RGB, cropped to 160 × 210) are converted to grey-scale and downsized to 84 × 84 as inputs to the network. The control network consists of 3 fully-connected layers, with 400 and 300 units in the two hidden layers (Figure 1C). Input to the control network is the scene Reward The reward r for Q learning is determined by the Euclidean distance d = kx − x∗ k between the end-effector and the target disc’s centre   λ(δ/d − 1), if d > δ r = 0, (5) if d 6 δ, n < N   1, if d 6 δ, n > N where δ is a threshold for reaching a target (δ = 0.05m); λ is a constant discount factor (λ = 10−3 ); n represents the times of d is consecutively smaller than δ and N = 4 is a threshold that determines task completion. This reward function will yield negative rewards until getting close enough to the target. This helps to take into account temporal costs during policy search, i.e., fewer steps are better. By giving positive rewards only when d is smaller than the threshold δ for more than N consecutive times, the reward function will guide a learner to converge to a target rather than just pass through it. This reward function proves successful for learning planar reaching, but we do not claim optimality. Designing a good reward function is an active topic in reinforcement learning. Guiding Q learning with K-GPS In Q-learning, the ε-Greedy method is frequently used for policy search. However, our experiments show that ε-Greedy works poorly for the planar reaching task when using multiple DoF (Section 5.2). Therefore, we introduce a kinematics-based controller to guide the policy search (K-GPS), i.e., guide the learning of the operational space controller with a joint-space controller, which selects actions by arg min a a[q] − K−1 (x∗ ) , (6) where a[] is an operator that returns an updated arm configuration when executing an action, and K−1 (·) is the inverse kinematic function. Algorithm 1 shows the DQN with K-GPS. A replay memory D is used to store samples of (Θt , at , rt , Θt+1 ). 1 2 3 4 5 6 7 8 9 Initialize replay memory D Initialize Q-function Q(Θ, a) with random weights for iteration=1,K do if previous trial finished then Start a new trial: Randomly generate configurations q and q∗ Compute the end-effector position x∗ = K(q∗ ) end if rand(0,1) < ε then at = arg min ka[q] − q∗ k 12 13 14 15 160×210 C 640×480 84×84 a else at = arg max Q(Θt , a) 10 11 B A Algorithm 1: DQN with K-GPS a Execute at and observe rt and Θt+1 Add the new sample (Θt , at , rt , Θt+1 ) into D Sample a random mini-batch from D Update (Q(Θ, a)) using the mini-batch end At the beginning of each trial, the arm’s starting configuration and target position are randomly generated. To guarantee a random target position x∗ is reachable by the arm, we first randomly select an arm configuration q∗ , then use the position of its end-effector as the target position. q∗ (= K−1 (x∗ )) is also used as the desired configuration to guide the policy search. In each iteration, the action will be selected either by the kinematic controller (with probability ε) or by the control network. During training, ε decreases linearly from 1 to 0.1, i.e., the guidance gets weaker in the process. The newly observed sample (Θt , at , rt , Θt+1 ) is added to D before the network is updated using a mini-batch randomly selected from D. 5 Experiments and Results Perception and control networks were first trained and evaluated independently under various conditions for the benchmark reaching task. Then comparisons were made for different combined (end-to-end) networks, such as naively combined vs fine-tuned networks. Evaluations were conducted in both simulated and real scenarios: a Baxter robot arm reaching observed by a camera. 5.1 Assessing Robot Perception To understand the effect of adapting perception with real images, we trained six networks for the planar reaching task with different training data as shown in Table 1. SIM was trained from scratch purely in simulation; RW was trained from scratch using real images; P25–100 were trained by adapting SIM with different percentages of real images found in the mini-batches. 1418 images were collected on the real robot together with their ground-truth scene configuration for use in Figure 3: An image from a webcam (A) is first cropped and scaled to match the simulator size, a virtual target is also added (B). Like the simulated images, it is then converted to grey-scale and scaled to 84 × 84 (C). training and adaptation. During image collection, the robot was moved to fixed arm configurations uniformly distributed in the joint space. The target (blue disc) is rendered into the image at a random position to create a large number of training samples. Figure 3 shows a typical scene during data capture and a final dataset image after scaling, cropping and target addition. To increase the robustness of the trained network the image dataset was augmented by applying transformations to the original images (rotation, translation, noise, and brightness). In both training and adaptation, RmsProp [Tieleman and Hinton, 2012] was adopted using a mini-batch size of 128 and a learning rate between 0.1 and 0.01. The networks trained from scratch converged after 4 million update steps (~6 days on a Tesla K40 GPU). In contrast, those adapted from SIM converged after only 2 million update steps. Performance was evaluated using perception error, defined as the Euclidean norm between the predicted and b − Θ∗ . We ground-truth scene configuration e = Θ compared three different scenarios: [Sim] 400 simulator images, uniformly distributed in the scene configuration space [Real] 400 images collected using the real robot but withheld during training [Live] 40 different scene configurations during live trials on Baxter Results are listed in Table 1 with mean eµ and standard deviation eσ of e. As expected, the perception network performed well in the scenarios in which they were trained or adapted but poorly otherwise. The network trained with only simulated images (SIM) had a small error in simulation but very poor performance in real scenarios (Real and Live). Similarly, the network trained (RW) or adapted (P100) with only real images Table 1: Perception Networks, Conditions and Error Reported Sim Nets Training Conditions SIM RW P25 P50 P75 P100 Train from scratch, simulated images Train from scratch, real images Adapt SIM, 25% real, 75% simulated images Adapt SIM, 50% real, 50% simulated images Adapt SIM, 75% real, 25% simulated images Adapt SIM, 100% real images 1.0 0.8 Simulation e =kbµ¡µ¤ k Live on Baxter 0.6 0.4 0.2 0.0 P25 P50 P75 Perception Modules P100 Figure 4: Distance errors for networks P25 to P100 in simulation (blue) and during live trials on Baxter (green). The circles and diamonds represent outliers. performed fine in real scenarios but poorly in simulation. In contrast, the networks adapted with a mixture of simulated and real images coped with all scenarios. Results for P25 to P100 show that the fraction of real images in a mini-batch is important for balancing real and simulated environment performance (Figure 4). The more real images presented during training the smaller the real world experiment error became – similarly for simulation. In particular, P25 had the smallest mean error eµ in simulation and P100 the smallest eµ for real world and live scenarios. However, when balancing eµ and eσ , P75 had the best performance when tested live on Baxter: it had a smaller eσ and only slightly larger eµ compared to P100. Comparing the performance in simulation we see that the network adapted with no simulated images (P100 in Figure 4) resulted in a much larger error than SIM. This indicates that the presence of simulated images in adaptation prevents a network from forgetting the skills learned. We also observe that, a network adapted using only real images (P100) had a smaller error than one trained from scratch (RW). This shows that adaptation from a pre-trained network leads to better performance eµ 0.013 0.537 0.012 0.013 0.015 0.498 eσ 0.009 0.191 0.008 0.008 0.010 0.162 Real eµ 13.92 0.023 0.025 0.024 0.021 0.019 eσ 0.877 0.046 0.044 0.045 0.046 0.049 Live eµ 13.53 0.308 0.219 0.192 0.135 0.133 eσ 1.436 0.138 0.091 0.109 0.123 0.153 as well as reduces the training time. For all networks except SIM, errors in live trials on Baxter were slightly larger than that for the real world testing set, although the collected real world dataset was augmented with translations and rotations in training. This indicates a high sensitivity of the perception networks to variations in camera pose (between capture of the training/testing images and the live trials). To further test this indication we trained some perception networks without data augmentation, which resulted in significantly poorer performance during live trials. To check sensible network behaviour, we investigated the perception networks behaviour when no target was present. All trained networks output incorrect constant values (with small variance) for the target position prediction. When images with two targets were presented to the networks, a random mixture of the two target positions were output. However in both cases, joint angles were estimated accurately. When part of the robot body or arm was occluded, as shown in Figure 6, the arm configurations were still estimated well, although with a slightly greater error in most cases. 5.2 Assessing Robot Control We trained 6 control networks in simulation for the planar reaching task with varying degrees of freedom using ε-Greedy or K-GPS policy search. In the 1 DoF case, only q2 was active; 2 DoF uses q2 and q3 ; while 3 DoF controls all three joints. In training, we used a learning rate between 0.1 and 0.01, and a mini-batch size of 64. The ε probability decreased from 1 to 0.1 within 1 million training steps for 1 DoF reaching, 2 million steps for 2 DoF, and 3 million steps for 3 DoF. ε-Greedy and K-GPS used the same ε. Figure 5 shows the learning curves indicating the success rate of a network after a certain number of training steps. For each data point 200 reaching tests were performed using the criteria introduced in Section 4. The target positions and initial arm configurations were uniformly distributed in the scene configuration space. For 1 DoF reaching, networks trained using K-GPS Table 2: Performance of ε-Greedy and K-GPS DoF 1 2 3 dmed [cm] ε-Greedy K-GPS 1.0 0.7 4.9 2.8 14.5 3.4 dQ3 [cm] ε-Greedy K-GPS 2.3 1.1 9.0 3.7 28.5 4.3 α [%] ε-Greedy K-GPS 100.00 100.00 83.75 99.50 50.25 98.50 we also tested several other control network architectures, varying the number of hidden layers and the number of units in each layer. Qualitative results show that a network with only one hidden layer was enough for 1 DoF reaching but insufficient for 2 and 3 DoF cases. The number of units in each layer also influenced the performance. Our proposed architecture worked best for 3 DoF reaching; at least two hidden layers with 200 and 150 units were needed. 5.3 Figure 5: Learning curves showing that K-GPS converges faster than ε-Greedy. and ε-Greedy both converged to a success rate of 100% after around 1 million steps (4 hrs on one 2.66GHz 64bit Intel Xeon processor core). For the 2 DoF case, K-GPS and ε-Greedy converged to around 100% and 80% and took 2 million (8 hrs) and 4 million (16 hrs) steps respectively. For 3 DoF reaching, they converged to about 100% and 40% after 4 million and 6 million (24 hrs) steps respectively. The results show that K-GPS was feasible for all degrees of freedom, while ε-Greedy worked appropriately only in 1 DoF reaching and degraded as the number of DoF increased. For a more detailed comparison, we further analyzed the error distance d – the Euclidean distance between the end-effector and target – reached by a converged network. 400 reaching tests were performed for each network in simulation. The results are sumarized in Table 2 which shows that K-GPS achieved smaller error distances for both median dmed and third quartile dQ3 than ε-Greedy in all DoF cases. To evaluate the performance of a control network in real scenarios, a K-GPS trained network (3 DoF) was directly transferred on Baxter. In the test, joint angles were taken from the robot’s encoders and the target position was set externally. It achieved a median distance error of 1.3 pixels (3.2 cm) in 20 consecutive reaching trials (CR in Table 3), indicating robustness to real-world sensing noise. In addition to the proposed FC network architecture, End-to-end Network Performance We evaluated the end-to-end performance of combined networks in both simulated and real-world scenarios using the metrics of Euclidean distance error d (between the end-effector and target) and average accumulated reward R̄ (a bigger accumulated reward means a faster and closer reaching to a target) in 400 simulated trials or 20 real trials. When testing in real scenarios, virtual targets were rendered into the image stream from the camera for repeatability and simplicity. For comparison, we evaluated three networks end-toend: EE1, EE2 and EE2-FT. EE1 is a combined network comprising SIM and CR; EE2 consists of P75 and CR; EE2-FT is EE2 after end-to-end fine-tuning using weighted losses. P75 and CR are the perception and control modules selected in Section 5.1 and Section 5.2, which have the best performance individually. The end-to-end fine-tuning was mainly conducted in simulation. In the fine-tuning, β = 0.8, we used a learning rate between 0.01 and 0.001, a mini-batch size of 64 and 256 for task and perception losses respectively, and an exploration possibility of 0.1 for K-GPS. These parameters were empirically selected. To prevent the perception module from forgetting the skills for real scenarios, the 1418 real samples were also used to obtain δLp . Similar to P75, 75% samples in a mini-batch for δLp were from real scenarios, i.e., at each weight updating step, 192 real and 64 simulated samples were used. The error distances in cm and pixels (in the 84 × 84 image) are compared. Results are listed in Table 3, where dmed and dQ3 are the median and third quartile of d. The CR network, where perfect perception is assumed is added as baseline. From the results in simulation, we can see that EE1 and EE2 have similar performance in all metrics. After Table 3: End-to-end Reaching Performance Scenario Nets EE1 (SIM+CR) EE2 (P75+CR) EE2-FT CR (Control Only Baseline) EE1 EE2 EE2-FT CR (Control Only Baseline) Sim Real Occlusion Occlusion A B dmed [cm] [pixels] 4.7 2.0 4.6 1.9 3.6 1.5 3.4 1.4 41.8 17.5 4.6 1.9 3.7 1.6 3.2 1.3 C [cm] 6.7 6.2 4.8 4.3 80.2 6.2 5.2 4.3 dQ3 [pixels] 2.8 2.6 2.0 1.8 33.6 2.6 2.2 1.8 R̄ [\] 0.313 0.319 0.626 0.761 -0.050 0.219 0.628 0.781 Occlusion D E Occlusion Figure 6: Successful reaching with real targets (A) and occlusions (B-E) which were not present during training. end-to-end fine-tuning, EE2-FT achieved a much better performance (21.7% smaller dmed and 96.2% bigger R̄) than EE2. The fine-tuned performance is very close to that of the control module (CR) which controls the arm using ground-truth Θ as sensing inputs. This indicates the proposed fine-tuning approach significantly improved the hand-eye coordination. In the real world, as expected, EE1 worked poorly, since the perception network had not experienced real scenarios. In contrast, EE2 and EE2-FT worked well and achieved comparable performance to that in simulation. Note that due to the cost of real world experiments, only 20 trials each were run (compared to 400 in simulation). Similar to the results in simulation, benefiting from the end-to-end fine-tuning, EE2-FT achieved a smaller median distance error (3.7 cm, 1.6 pixels) than EE2. This shows that the adaptation to real scenarios can be kept by presenting (a mix of simulated and) real samples to compute the perception loss. All networks (except EE1 in the real scenario) achieved a success rate between 98% and 100%. Apart from the weighted end-to-end fine-tuning approach, we also tried naively fine-tuning combined networks only using the task loss Lq . It did not work well for performance improvement (making the performance even worse), although many efforts were made in searching appropriate hyper-parameters. To see the combined networks’ robustness to a real target and occlusions, we tested EE2-FT in the setups shown in Figure 6. In the case without occlusion (A), real targets can be reached (although only virtual targets were used for training). Occlusions had not been experienced by the network during training, yet we see that in cases B, C and E, most targets can be reached but with larger distance errors (about 2 times larger than in case A). In case D, only a few targets could be reached with a yet increased error across all cases, as shown in the attached video1 . 6 Conclusion In this paper, we demonstrated reliable vision-based planar reaching on a real robot using a modular deep Q network (DQN), trained in simulation, with transference to a real robot utilizing only a small number of real world images. The proposed end-to-end fine-tuning approach using weighted losses significantly improved the hand-eye coordination of the naively combined network (EE2). Through fine-tuning, its (EE2-FT) reaching accuracy was improved by 21.7%. This work has led to the following observations: Value of a modular structure and end-to-end fine-tuning: The significant performance improvement (hand-eye coordination) and relatively low real world data require1 https://goo.gl/vtLuVV ments show the feasibility of the modular structure and end-to-end fine-tuning for low-cost transfer of visuomotor policies. Through fine-tuning with weighted losses, a combined network comprising perception and control modules trained independently can even achieve performance very close to the control network alone (indicating the performance upper-limit). Scaling the proposed techniques to more complicated tasks and networks will likely be achievable with an appropriate scene configuration representation. Perception adaptation: A small number of real-world images are sufficient to adapt a pre-trained perception network from simulated to real scenarios in the benchmark task, even with a simulator of only modest visual fidelity. The percentage of real images in a mini-batch plays a role in balancing the performance in real and simulated environments. The presence of simulated images in fine-tuning prevents a network from forgetting pre-mastered skills. The adapted perception network also has some interesting robustness properties: it can still estimate the robot configuration even in the presence of occlusions it has not directly experienced or when there is/are zero or multiple targets. Control training with K-GPS: With guidance from a kinematic controller K-GPS leads to better policies (smaller error distance) in a shorter time than ε-Greedy, producing a trained control network that is robust to real-world sensing noise. However KGPS does assume that we already have some knowledge of the task to learn, i.e., a model of the task. We believe the architecture presented here: introducing a bottleneck between perception and control, training networks independently then merging and finetuning, is a promising line of investigation for robotic visual servoing and manipulation tasks. In current and future work we are scaling up the complexity of the robot tasks and further characterizing the performance of this approach. Promising results have been obtained in tabletop object reaching in clutter using a 7 DoF robotic arm in velocity control mode [Zhang et al., 2017a]. Acknowledgements This research was conducted by the Australian Research Council Centre of Excellence for Robotic Vision (project number CE140100016). Additional computational resources and services were provided by the HPC and Research Support Group at the Queensland University of Technology, Brisbane, Australia. References [Bateux et al., 2017] Quentin Bateux, Eric Marchand, Jürgen Leitner, Francois Chaumette, and Peter Corke. Visual servoing from deep neural networks. In New Frontiers for Deep Learning in Robotics Workshop at Robotics: Science and Systems Conference (RSS), 2017. [Deng et al., 2009] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A largescale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2009. [Devin et al., 2017] Coline Devin, Abhishek Gupta, Trevor Darrell, Pieter Abbeel, and Sergey Levine. Learning modular neural network policies for multitask and multi-robot transfer. In IEEE International Conference on Robotics and Automation (ICRA), 2017. [D’Innocente et al., 2017] Antonio D’Innocente, Fabio Maria Carlucci, Mirco Colosi, and Barbara Caputo. Bridging between computer and robot vision through data augmentation: a case study on object recognition. In International Conference on Computer Vision Systems (ICVS), 2017. [Fitzgerald et al., 2015] Tesca Fitzgerald, Ashok Goel, and Andrea Thomaz. A similarity-based approach to skill transfer. In Women in Robotics Workshop at Robotics: Science and Systems Conference (RSS), 2015. [Hinton and Salakhutdinov, 2006] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504–507, 2006. [James et al., 2017] Stephen James, Andrew J Davison, and Edward Johns. Transferring end-to-end visuomotor control from simulation to real world for a multistage task. In 1st Annual Conference on Robot Learning (CoRL), 2017. [Katyal et al., 2017] Kapil Katyal, I-Jeng Wang, and Philippe Burli. Leveraging deep reinforcement learning for reaching robotic tasks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, 2017. [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 (NIPS), pages 1097–1105, 2012. [LeCun, 1988] Y. LeCun. A theoretical framework for back-propagation. In D. Touretzky, G. Hinton, and T. Sejnowski, editors, Proceedings of the 1988 Connectionist Models Summer School, pages 21–28, CMU, Pittsburgh, Pa, 1988. Morgan Kaufmann. [Lenz et al., 2015] Ian Lenz, Ross Knepper, and Ashutosh Saxena. Deepmpc: Learning deep latent features for model predictive control. In Robotics: Science and Systems (RSS), 2015. [Taylor and Stone, 2009] Matthew E Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. The Journal of Machine Learning Research, 10:1633–1685, 2009. [Levine et al., 2016a] Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. [Tieleman and Hinton, 2012] 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. [Levine et al., 2016b] Sergey Levine, Peter Pastor Sampedro, Alex Krizhevsky, and Deirdre Quillen. Learning hand-eye coordination for robotic grasping with deep learning and large-scale data collection. In International Symposium on Experimental Robotics (ISER), 2016. [Mnih et al., 2015] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [Pan and Yang, 2010] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10):1345–1359, 2010. [Pinto and Gupta, 2016] Lerrel Pinto and Abhinav Gupta. Supersizing self-supervision: Learning to grasp from 50k tries and 700 robot hours. In IEEE International Conference on Robotics and Automation (ICRA), 2016. [Rusu et al., 2017] Andrei A Rusu, Matej Vecerik, Thomas Rothörl, Nicolas Heess, Razvan Pascanu, and Raia Hadsell. Sim-to-real robot learning from pixels with progressive nets. In 1st Annual Conference on Robot Learning (CoRL), 2017. [Sutton and Barto, 1998a] Rich Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT Press, 1998. [Sutton and Barto, 1998b] R.S. Sutton and A.G. Barto. Reinforcement learning: An introduction. Cambridge Univ Press, 1998. [Szegedy et al., 2015] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1–9, 2015. [Tai et al., 2016] Lei Tai, Shaohua Li, and Ming Liu. A deep-network solution towards model-less obstacle avoidance. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2016. [Tobin et al., 2017] Josh Tobin, Rachel Fong, Alex Ray, Jonas Schneider, Wojciech Zaremba, and Pieter Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017. [Tow et al., 2016] Adam W Tow, Sareh Shirazi, Jürgen Leitner, Niko Sünderhauf, Michael Milford, and Ben Upcroft. A robustness analysis of deep q networks. In Australasian Conference on Robotics and Automation (ACRA), 2016. [Tzeng et al., 2016] Eric Tzeng, Coline Devin, Judy Hoffman, Chelsea Finn, Pieter Abbeel, Sergey Levine, Kate Saenko, and Trevor Darrell. Adapting deep visuomotor representations with weak pairwise constraints. In Workshop on the Algorithmic Foundations of Robotics (WAFR), 2016. [Viereck et al., 2017] Ulrich Viereck, Andreas ten Pas, Kate Saenko, and Robert Platt. Learning a visuomotor controller for real world robotic grasping using simulated depth images. In 1st Annual Conference on Robot Learning (CoRL), 2017. [Zhang et al., 2015] Fangyi Zhang, Jürgen Leitner, Michael Milford, Ben Upcroft, and Peter Corke. Towards vision-based deep reinforcement learning for robotic motion control. In Australasian Conference on Robotics and Automation (ACRA), December 2015. [Zhang et al., 2017a] Fangyi Zhang, Jürgen Leitner, Michael Milford, and Peter Corke. Sim-to-real transfer of visuo-motor policies for reaching in clutter: Domain randomization and adaptation with modular networks. Technical report, Queensland University of Technology, 2017. [Zhang et al., 2017b] Fangyi Zhang, Jurgen Leitner, Michael Milford, and Peter I. Corke. Tuning modular networks with weighted losses for hand-eye coordination. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, July 2017.
2cs.AI
The Sparse Awakens: Streaming Algorithms for Matching Size Estimation in Sparse Graphs arXiv:1608.03118v2 [cs.DS] 14 Nov 2016 Graham Cormode∗ Hossein Jowhari† Morteza Monemizadeh‡ S. Muthukrishnan § November 15, 2016 Abstract Estimating the size of the maximum matching is a canonical problem in graph algorithms, and one that has attracted extensive study over a range of different computational models. We present improved streaming algorithms for approximating the size of maximum matching with sparse (bounded arboricity) graphs. • (Insert-Only Streams) We present a one-pass algorithm that takes O(c log2 n) space and approximates the size of the maximum matching in graphs with arboricity c within a factor of O(c). This improves significantly upon the state-of-the-art Õ(cn2/3 )-space streaming algorithms. • (Dynamic Streams) Given a dynamic graph stream (i.e., inserts and deletes) of edges of an underlying c-bounded arboricity graph, we present an one-pass algorithm that uses space Õ(c10/3 n2/3 ) and returns an O(c)-estimator for the size of the maximum matching. This algorithm improves the state-of-the-art Õ(cn4/5 )-space algorithms, where the Õ(.) notation hides logarithmic in n dependencies. In contrast to the previous works, our results take more advantage of the streaming access to the input and characterize the matching size based on the ordering of the edges in the stream in addition to the degree distributions and structural properties of the sparse graphs. ∗ Department of Computer Science, University of Warwick, UK. Supported in part by European Research Council grant ERC2014-CoG 647557 and a Royal Society Wolfson Research Merit Award. [email protected]. † Department of Computer Science, University of Warwick, UK. Supported by European Research Council grant ERC-2014CoG 647557. [email protected] . ‡ Rutgers University, Piscataway, NJ, USA. [email protected]. § Rutgers University, Piscataway, NJ, USA. [email protected]. 1 Introduction Problems related to (maximum) matchings in graph have a long history in Combinatorics and Computer Science. They arise in many contexts, from choosing which advertisements to display to online users, to characterizing properties of chemical compounds. Stable matchings have a suite of applications, from assigning students to universities, to arranging organ donations. These have been addressed in a variety of different computation models, from the traditional RAM model, to more recent sublinear (property testing) and external memory (MapReduce) models. Matching has also been studied for a number of classes of input graph: including general graphs, bipartite graphs, weighted graphs, and those with some sparsity structure. We focus on the streaming case, where each edge is seen once only, and we are restricted to space sublinear in the size of the graph (ie., no. of its vertices). In this case, the objective is to find (approximately) the size of the matching. Even here, results for general graphs are either weak or make assumptions about the input or the stream order. In this work, we seek to improve the guarantees by restricting to graphs that have some measure of sparsity – bounded arboricity, or bounded degree. This aligns with reality, where most massive graphs have asymptotically fewer than O(n2 ) edges. Recently, Kapralov, Khanna, and Sudan [19] developed a streaming algorithm which computes an estimate of matching size for general graphs within a factor of O(polylog(n)) in the random-order streaming model using O(polylog(n)) space. In the random-order model, the input stream is assumed to be chosen uniformly at random from the set of all possible permutations of the edges. Esfandiari et al. [10] were the first to study streaming algorithms for estimating the size of matching in bounded arboricity graphs in the adversarial-order streaming model, where the algorithm is required to provide a good approximation for any ordering of edges. Graph arboricity is a measure to quantify the density of a given graph. A graph G(V, E) has arboricity c if the set E of its edges can be partitioned into at most c forests. Since a forest on n nodes has at most n − 1 edges, a graph with arboricity c can have at most c(n − 1) edges. Indeed, by a result of Nash-Williams [28, 29] this holds for any subgraph of a c-bounded arboricity graph G. Formally, the Nash-Williams Theorem [28, 29] states that c = maxU ⊆V {|E(U )|/(|U | − 1)}, where |U | and |E(U )| are the number of nodes and edges in the subgraph with nodes U , respectively. Several important families of graphs have constant arboricity. Examples include planar graphs (that have arboricity c = 3), bounded genus graphs, bounded treewidth graphs, and more generally, graphs that exclude a fixed minor.1 The important observation in [10] is that the size of matching in bounded arboricity graphs can be approximately characterized by the number of high degree vertices (vertices with degree above a fixed threshold) and the number of so called shallow edges (edges with both low degree endpoints). This characterization allows for estimation of the matching size in sublinear space by taking samples from the vertices and edges of the graph. The work of [10] implements the characterization in Õ(cn2/3 ) space giving a O(c) approximation of the matching size. Subsequent works [2, 26] consider alternative characterizations and improve upon the approximation factor however they do not result in major space improvements. 1.1 Our Contributions We present major improvements in the space usage of streaming algorithms for sparse graphs (c-bounded Arboricity Graphs). Our main result is a polylog space algorithm that beats the nε space bound of prior algorithms. More precisely, we show: Theorem 1. Let G(V, E) be a graph with arboricity bounded by c. Let S be an (adversarial order) insertiononly stream of the edges of the underlying graph G. Let M ∗ be the size of the maximum matching of G (or S interchangeably). Then, there is a randomized 1-pass streaming algorithm that outputs a (22.5c+ 6)(1+ ε)approximation to M ∗ with probability at least 1 − δ and takes O( εc2 log( 1ε ) log cn log n) space. 1 √ It can be shown that for an H-minor-free graph, the arboricity number is O(h h) where h is the number of vertices of H. [22] 1 For the case of dynamic streams (i.e, streams of inserts and deletes of edges), we design a different algorithm using Õ(c10/3 n2/3 ) space which improves the Õ(cn4/5 )-space dynamic (insertion/deletion) streaming algorithms of [2, 3]. The following theorem states this result (proved in Section 3.3). Theorem 2. Let G(V, E) be a graph with the arboricity bounded by c. Let M ∗ be the size of the maximum matching of G. Let S be a dynamic stream of edge insertions and deletions of the underlying graph G of length at most O(cn) . Let β = µ((2µ)/(µ − 2c + 1) + 1) where µ > 2c. Then, there exists a streaming 4/3 2/3 ) space in expectation and outputs a (1 + ε)β approximation of M ∗ with algorithm that takes O( β ε(nc) 4/3 probability at least 0.86. Our algorithms for bounded arboricity graphs are based on two novel streaming-friendly characterizations of the maximum maching size. The first characterization is a modification of the characterization in [9] which approximates the size of the maximum matching by hµ + sµ where hµ is defined as the number of high degree vertices (vertices with degree more than a threshold µ) and sµ is the number of shallow edges (edges with low degree endpoints). While hµ can be easily approximated by sampling the vertices and checking if they are high degree or not, approximating sµ in sublinear space is a challenge because in one pass we cannot determine if a sampled edge is shallow or not. The work of [9] resolves this issue by sampling the edges at a high rate and manages to implement their characterization in Õ(cn2/3 ) space for adversarial insert-only streams. To bring the space usage down to Õ(c2.5 n1/2 ) (for insert-only streams), we modify the formulation of the above characterization. We still need to approximate hµ but instead of sµ we approximate nL the number of non-isolated vertices in the induced subgraph GL defined over the low degree vertices. Note that sµ is the number of edges in GL . This subtle change of definition turns out to be immensely helpful. Similar to hµ we only need to sample the nodes and check if their degrees are below a certain threshold or not, however we carry the additional constraint that we have to avoid counting the nodes in GL that are isolated (have only high degree nodes as neighbors). To satisfy this additional constraint, our algorithm stores the neighbors of the sampled vertices along with a counter for each that maintains their degree in the rest of the stream. Although we only obtain a lower bound on the degree of the neighbors, as it turns out the lower bound information on the degree is still useful because we can ensure the number of false positives that contribute to our estimate is within a certain limit. As result, we can approximate hµ + nL using Õ(cn1/2 ) space which gives a (2c + 1)(2c + 2) approximation of the maximum matching size after choosing appropriate values for µ and other parameters. This characterization is of particular importances, as it can be adapted to work under edge deletions as well as long as the number of deletions is bounded by O(cn). Details of the characterization and the associated algorithms are given in Lemma 4 and Section 3.2. To obtain a polylog(n) space algorithm (and prove the claim of Theorem 1), we give a totally new characterization. This characterization, unlike the previous ones that only depend on the parameters of the graph, also takes the ordering of the edges in the stream into account. Roughly speaking, we characterize the size of a maximum matching by the number of edges in the stream that have few neighbor edges in the rest of the stream. To understand the connection with maximum matching, consider the following simplistic special case. Suppose the input graph G is a forest composed of k disjoint stars. Observe that the maximum matching on this graph is just to pick one edge from each star. We relate this to a combinatorial characterization that arises from the sequence of edges in the stream: no matter how we order the edges of G in the stream, from each star there is exactly one edge that has no neighboring edges in the remainder of the stream (in other words, the last edge of the star in the stream). Our characterization generalizes this idea to graphs with arboricity bounded by c by counting the α-good edges, i.e. edges that have at most α = 6c neighbors in the remainder of the stream. We prove this characterization gives an O(c) approximation of the maximum matching size. More important, a nice feature of this characterization is that it can be implemented in polylog(n) space if one allows a 1 + ε approximation. The implementation adapts an idea 2 Reference Graph class Stream Approx. Factor ∗ Space Bound∗∗ [19] General Random Order O(polylog(n)) O(polylog(n)) [9] Arboricity ≤ c Insert-Only 5c + 9 Õ(cn2/3 ) Arboricity ≤ c Insert-Only c+2 Õ(cn2/3 ) Arboricity ≤ c Insert/Delete O(c) Arboricity ≤ c Insert-Only (2c + 1)(2c + 2) Õ(cn4/5 ) √ Õ(c2.5 n) Insert/Delete (2c + 1)(2c + 2) Õ(c10/3 n2/3 ) Arboricity ≤ c Insert-Only 22.5c + 6 Õ(c log2 n) [26] [2, 3] This paper This paper This paper Arboricity ≤ c Table 1: Known results for estimating the size of a maximum matching in data streams. (*) In some entries, a (1 + ε) multiplicative factor has been suppressed for concision. (**) The Õ(.) notation hides logarithmic in n dependencies. from the well-known L0 sampling algorithm. It runs O(log n) parallel threads each sampling the stream at a different rate. At the end, a thread “wins” that has sampled roughly Θ(log n) elements from the α-good edges (samples the edges with a rate of logk n where k is the number of α-good edges). The threads that under-sample will end up with few edges or nothing while the ones that have oversampled will keep too many α-good edges and will be terminated as result. Table 1 summarizes the known and new results for estimating the size of a maximum matching. 1.2 Further Related Streaming Work In the classical offline model, where we assume we have enough space to store all vertices and edges of a graph G = (V, E), the problem of computing the maximum matching of G has been extensively studied. The best result in this model is the 30-years-old algorithm due to Micali and Vazirani [27] with running √ time O(m n), where n = |V | and m = |E|. A matching of size within (1 − ε) factor of a maximum cardinality matching can be found in O(m/ε) time [17, 27]. Very recently, Duan and Pettie [5] develop a (1 − ε)-approximate maximum weighted matching algorithm in time O(m/ε). The question of approximating the maximum cardinality matching has been extensively studied in the streaming model. An O(n)-space greedy algorithm trivially obtains a maximal matching, which is a 2approximation for the maximum cardinality matching [11]. A natural question is whether one can beat the approximation factor of the greedy algorithm with O(n polylog(n)) space. Recently, it was shown e ≃ 1.58 in one pass requires n1+Ω(1/ log log n) space that obtaining an approximation factor better than e−1 [12, 18], even in bipartite graphs and in the vertex-arrival model, where the vertices arrive in the stream together with their incident edges. This setting has also been studied in the context of online algorithms, where each arriving vertex has to be either matched or discarded irrevocably upon arrival. Seminal work due e approximation factor in this model. to Karp, Vazirani and Vazirani [20] gives an online algorithm with e−1 e Closing the gap between the upper bound of 2 and the lower bound of e−1 remains one of the most appealing open problems in the graph streaming area (see [31]). The factor of 2 can be improved on if one either considers the random-order model or allows for two passes [21]. By allowing even more passes, the approximation factor can be improved to multiplicative (1 − ǫ)-approximation via finding and applying augmenting paths with successive passes [24, 25, 6, 7, 1]. Another line of research [11, 24, 32, 8] has explored the question of approximating the maximum-weight matching in one pass and O(n polylog(n)) space. Currently, the best known approximation factor equals 4 + ε (for any positive constant ε) [4]. 3 2 Preliminaries and Notations Let G(V, E) be an undirected unweighted graph with n = |V | vertices and m = |E| edges. For a vertex v ∈ V , let degG (v) denote the degree of vertex v in G. A matching M of G is a set of pairwise non-adjacent edges, i.e., no two edges share a common edge. Edges in M are called matched edges; the other edges are called unmatched. A maximum matching of graph G(V, E) is a matching of maximum size. Throughout the paper, when we fix a maximum matching of G(V, E), we denote it by M ∗ . A matching M of G is maximal if it is not a proper subset of any other matching in graph G. Abusing the notation, we sometimes use M ∗ and M for the size the maximum and maximal matching, respectively. It is well-known (see for example [23]) that the size of a maximal matching is at least half of the size of a maximum matching, i.e., M ≥ M ∗ /2. Thus, we say a maximal matching is a 2-approximation of a maximum matching of G. It is known [23] that the simple greedy algorithm, where we include the newly arrived edge if none of its endpoint are already matched, returns a maximal matching. 3 Algorithms for Bounded Arboricity Graphs Throughout this section, hµ denotes the number of vertices in graph G = (V, E) that have degree above µ. Let GL = (V ′ , E ′ ) be an induced subgraph of G where V ′ = {v| degG (v) ≤ µ} and (u, v) ∈ E ′ iff u and v are both in V ′ . Note that GL might have isolated vertices. In the following we let Mµ denote the size of maximum matching in GL . 3.1 Characterization lemmas Lemma 3 ([9]). For a c-bounded arboricity graph G(V, E) and µ > 2c, we have hµ ≤ 2µ ∗ µ−2c+1 M . Lemma 4. For a c-bounded arboricity graph G(V, E) and µ > 2c, we have   2µ ∗ + 1 M∗ . M ≤ hµ + Mµ ≤ µ − 2c + 1 Proof. The lower bound is easy to see: every edge of a maximum matching either has an endpoint with degree more than µ or both of its endpoints are vertices with degree at most µ. The number of matched edges of the first type are bounded by hµ whereas the number of matched edges of the second type are bounded by Mµ . To prove the upper bound, we use the fact Mµ ≤ M ∗ and Lemma 3. Definition 5. Let S = (e1 , . . . , em ) be a sequence of edges. We say the edge ei = (u, v) is α-good with respect to S if max{di (u), di (v)} ≤ α where di (x) is defined as the number of the neighbors of x that appear after the i-th location in the stream. Lemma 6. Let µ > 2c be a (large enough) parameter. Let Eα be the set of α-good edges in an edge stream for a graph with arboricity at most c. We have:  c 1 − 2 µ+1  M ∗ ≤ |Eα | ≤   5 α + 2 M ∗, 4 4c(µ+1) where α = max{µ − 1, µ+1−2c }. In particular for µ = 6c − 1, we have M ∗ ≤ 3|E6c | ≤ (22.5c + 6)M ∗ Proof. First we prove the lower bound on |Eα |. In particular we show a relation involving the number of edges where both endpoints have low degree, sµ = |{e = (u, v)|e ∈ E, deg(u) ≤ µ, deg(v) ≤ µ}|: 4   1 c − hµ + sµ ≤ |Eα |. 2 µ+1 The claim in the lemma follows from the relatively loose bound that M ∗ ≤ hµ + sµ . Let H be the set of vertices in the graph with degree above µ and let L = V \ H. Recall that hµ = |H|. Let H0 be the vertices in H that have no neighbor in L, and let H1 = H \ H0 . First we notice that |H1 | ≥ (1 − 2c µ )|H|. To see this, let E ′ be the edges with at least one endpoint in H0 . By definition, every node in H0 has degree at least µ + 1, so we have |E ′ | ≥ µ+1 2 |H0 |. At the same time, the total number of edges in the subgraph induced by the nodes H is at most c(|H| − 1), using the arboricity assumption. Therefore, µ+1 |H0 | c(|H| − 1) ≥ |E ′ | ≥ 2 2c It follows that |H0 | ≤ µ+1 (|H| − 1) which further implies that 2c 2c |H1 | ≥ (1 − )|H| = (1 − )hµ . (1) µ+1 µ+1 P Now let dH (v) be the degree of v in the induced subgraph H. We have v∈H1 dH (v) ≤ 2c|H|, again using the arboricity bound and the fact that summing over degrees counts each edge at most twice. Therefore, taking the average over nodes in H1 , 2c dH (v) ≤ 2c 1 − µ+1 for v ∈ H1 . Consequently, at least half of the vertices in H1 have their dH bounded by 4c(µ+1) µ+1−2c (via the ′ ′ Markov inequality). Let H1 be those vertices. For each v ∈ H1 we find an α-good edge. Let e∗ = (v, u) be the last edge in the stream where u ∈ L. Then, there cannot be too many edges that neighbor (v, u) and come after it in the stream: the total number of edges that share an endpoint with e∗ in the rest of 4c(µ+1) the stream is bounded by max{µ − 1, 4c(µ+1) µ+1−2c }. Consequently, for α = max{µ − 1, µ+1−2c }, we have c |Eα | ≥ ( 12 − µ+1 )hµ , based on the set of |H1 |/2 edges in H1′ and using (1). For α ≥ µ, Eα also contains the disjoint set of edges from L × L, which are all guaranteed to be α-good since both their endpoints have c degree bounded by µ. Therefore |Eα | ≥ sµ + ( 21 − µ+1 )hµ as claimed. To prove the upper bound on |Eα |, we notice that the subgraph containing only the edges in Eα has 4|Eα | [14]. It follows that |Eα | ≤ degree at most α + 1. Such a graph has a matching size of at least 5(α+1)+3 5α+8 ∗ 4 M . This finishes the proof of the lemma. Last, we note that in the special case of trees (or more generally, graph streams which represent forests), a tighter approximation bound follows (for which our algorithms specified below will also apply). Lemma 7. For trees we have M ∗ ≤ |E1 | ≤ 2M ∗ . Proof. Let T = (V, E) be a tree with maximum matching size M ∗ . The upper bound follows by considering E1 : the subgraph of T formed by E1 has degree at most 2, and since we are considering trees, the set E1 can have no cycles and so consists of paths. Hence, |E1 | ≤ 2M ∗ . For the lower bound, we use induction on the number of nodes. Suppose the claim |E1 | ≥ M ∗ is true for all trees on n nodes. We want to show that the claim remains true for trees on n + 1 nodes. The base case n = 2 is trivially true. Given a tree T = (V, E) with n + 1 nodes, there is always a leaf w ∈ V , that is connected to a node u where u has at most one non-leaf neighbor. If we remove the edge (u, w) from the tree, we get a tree T ′ with n nodes and by our induction hypothesis, |E1 (T ′ )| ≥ M ∗ (T ′ ) no matter how the stream is ordered. Fix some ordering of the stream for T ′ . We claim after inserting the edge (u, w) in the stream (anywhere) we will have |E1 (T )| ≥ M ∗ (T ). Why? We have two cases to consider. (1) w has no sibling in T . In this case E1 (T ) = E1 (T ′ ) ∪ {(u, w)}. This is because u must have been a 5 leaf in T ′ and as result adding (u, w) does not cause any other edge to lose the 1-goodness property. If follows that the size of E1 increases by 1 while M ∗ increases by at most 1. (2) w has a sibling. In this case for sure M ∗ does not increase. Although there may be a concern that the size of E1 could drop, below we show that adding a leaf to the stream of the edges of a tree does not cause the size of the set E1 to drop. This is enough to show that in this case as well |E1 (T )| ≥ M ∗ (T ). To see why adding a leaf to the stream of edges cannot reduce |E1 |, assume we insert an edge e = (u, w) in the stream where w is a newly added leaf. If u has no 1-good edges incident on it, then E1 remains as it was. If u has one 1-good edge on it and adding e = (u, w) causes it to be kicked out of E1 , it means e is admitted as a new member of E1 . So the loss is accounted for. If u has two 1-good edges on it, say e1 and e2 , we show adding e cannot cause them to be ejected from E1 . To see this, assume to the contrary that it could, and suppose (without loss of generality) the edges come in the following order in the stream: . . . , e2 , . . . , e1 , . . . , e, . . .. The edge e2 clearly cannot be part of E1 . But e1 must have a neighboring edge e3 incident on u, that follow it. But that means e2 was already out before adding e to the stream. A contradiction. Finally we note that u cannot have more than two 1-good edges on it. This finishes the proof. √ 3.2 Õ( n) space algorithm for insert-only streams In this section, first we present Algorithm 1 that estimates Mµ + hµ and prove the following theorem. Theorem 8. Let G(V, E) be a graph with the arboricity bounded by c. Let S be an (adversarial order) insertion-only stream of the edges of the underlying graph G. Let β = µ((2µ)/(µ − 2c + 1) +√1) where µ > 2c. Then, there exists an insertion-only streaming algorithm (Algorithm 1) that takes O( β εcn log n) space in expectation and outputs a (1 + ε)β approximation of M ∗ with probability at least 0.86, where M ∗ is a maximum matching of G. Algorithm 1: Estimate-Mµ + hµ Initialization: Each node is sampled to set S with probability p (determined below). Stream Processing: forall the edges e = (u, v) in the stream do if u ∈ S or v ∈ S then store e in H if u ∈ S then increment d(u) else increment l(u) if numv ∈ S then increment d(v) else increment l(v) Post Processing: Let S1 = {v ∈ S|d(v) ≤ µ, ∃w ∈ Γ(v) : d(w) + l(w) ≤ µ} Let S2 be the set of vertices {v|v ∈ S, d(v) > µ} return s = (|S1 | + |S2 |)/p For each w in Γ(S) (the set of neighbors of nodes in S), the algorithm maintains l(w), the number of occurrences of w observed since (the first) v ∈ S such that w ∈ Γ({v}) was added. Note that in this algorithm, l(w) is a lower bound on the degree of w. For the output, S1 is the subset of nodes in S whose degree is bounded by µ and additionally there is at least one neighbor of v, w, whose observed degree (d(w) or l(w)) is at most µ. Meanwhile, S2 is the “high degree” nodes in S. 2µ + 1). Algorithm 1 outputs s where (1 − ε)M ∗ ≤ s ≤ Lemma 9. Let ε ∈ (0, 1) and β = µ( µ−2c+1 (1 + ε)βM ∗ with probability at least 1 − e −ε2 M ∗ p 4β 2 . 6 Proof. First we prove the following bounds on E(s). Mµ + hµ ≤ E(s) ≤ µ(Mµ + hµ ). Let L be the set of vertices in G that have degree at most µ and let GL be the induced graph on L. Let H = V \ L. Note that GL might have isolated vertices. Let N be the non-isolated vertices in GL . It is clear that if the algorithm samples v ∈ N , v will be in S1 . Likewise, if it samples a vertex w ∈ H, w will be in S2 . Given the fact that |H| = hµ and |N | ≥ Mµ , this proves the lower bound on E(s). The expectation may be above Mu , as the algorithm may pick an isolated vertex in GL (a vertex that is only connected to the high-degree vertices) and include it in S1 because one of its high-degree neighbours w was identified as low degree, i.e., w ∈ Γ(S) and l(w) ≤ µ but w ∈ H. Let u ∈ H and let U = {a1 , . . . , aµ } be the last µ neighbours of u according to the ordering of the edges in the stream. The algorithm can only identify u as low degree when it picks a sample from U and no samples from Γ(u) \ U . This restricts the number of unwanted isolated vertices to at most µhµ . Together with the fact that |N | ≤ µMµ , it establishes the upper bound on E(s). Now using a Chernoff bound, Pr[|s − E(s)| ≤ λE(s)] ≤ e probability at least 1 − e Setting λ = ε β −λ2 (Mµ +hµ )p 4 −λ2 M ∗ p 4 ≤ e −λ2 M ∗ p 4 . Therefore with , (Mµ + hµ ) − λµ(hµ + Mµ ) ≤ s ≤ µ(1 + λ)(Mµ + hµ ) and putting this and Lemma 4 together, we derive the statement of the lemma. Algorithm 2: Estimate-M ∗ (2) √ Initialization: Let ε ∈ (0, 1) and t = ⌈ β ε8nc ⌉ where β is as defined in Lemma 9. Stream Processing: Do the following tasks in parallel: (1) Greedily keep a maximal matching of size at most r ≤ t (and terminate this task if this size bound is exceeded). (2) Run the Estimate-(Mµ + hµ ) procedure (Algorithm 1) with parameter p ≥ 8 λ2 t where λ = βε . Post processing: If r < t then output 2r as the estimate for M ∗ , otherwise output the result of the Estimate-(Mµ + hµ ) procedure. Proof of Theorem 8: Suppose M ∗ < t. Clearly the size of the maximal matching r obtained by the first task will be less than t. In this case, M ∗ ≤ M ′ ≤ 2M ∗ . Now suppose M ∗ ≥ t. By Lemma 4, we will have Mµ + hµ ≥ t and hence by Lemma 9, with probability at least 1 − e−2 ≥ 0.86, the output of the algorithm will be within the promised bounds. The expected space of the algorithm is O((t + pnc) log n). Setting √ √ β cn t = β 8nc/ε to balance the space costs, the space complexity of the algorithm will be O( ε log n) as claimed. ✷ 3.3 O(n2/3 ) space algorithm for insertion/deletion streams Algorithms 1 and 2 form the basis of our solution in the more general case where the stream contains deletions of edges as well. In the case of Algorithm 1, the algorithm has to maintain the induced subgraph on S and the edges of the cut (S, Γ(S)). However if we allow arbitrary number of insertions and deletions, the size of the cut (S, Γ(S)) can grow as large as O(n) even when |S| = 1. This is because each node at some intermediate point could become high degree and then lose its neighbours because of the subsequent deletion of edges. Therefore here in order to limit the space usage of the algorithm, we make the assumptions that number of deletions is bounded by O(cn). Since the processed graph has arboricity at most c this forces the number of insertions to be O(cn) as well. Under this assumption, if we pick a random vertex, still, in expectation the number of neighbours is bounded by O(c). 7 Another complication arises from the fact that, with edge deletions, a vertex added to Γ(S) might become isolated at some point. In this case, we discard it from Γ(S). Additionally for each vertex in S ∪ Γ(S), the counters d(v) (or l(v) depending on if it belongs to S or Γ(S)) can be maintained as before. The space complexity of the algorithm remains O(pnc log n) in expectation as long as the arboricity factor remains within O(c) in the intermediate graphs. In the case of Algorithm 2, we need to keep a maximal matching )1/3 to of size O(t). This can be done in O(t2 ) space using a randomized algorithm [3]. Setting t at ( 8βnc ε2 rebalance the space costs, we obtain the result of Theorem 2. 3.4 The O(log2 n) space algorithm for insert-only streams In this section we present our polylog space algorithm by presenting an algorithm for estimating |Eα | within (1 + ε) factor. Our algorithm is similar in spirit to the known L0 sampling strategy. It runs O(log n) parallel threads each sampling the stream at a different rate. At the end, a thread “wins” that has sampled roughly n Θ(log n) elements from |Eα | (samples the edges with a rate of log |Eα | ). The threads that under-sample will end up with few edges or nothing while the ones that have oversampled will keep too many elements of Eα and will be aborted as result. First we give a simple procedure (Algorithm 3) that is the building block of the algorithm. Algorithm 3: The α-good test Initialization: given the edge e = (u, v) in the stream, let r(u) = 0 and r(v) = 0. forall the subsequent edges e′ = (t, w) do if t = u or w = u then increment r(u) if t = v or w = v then increment r(v) if max{r(u), r(v)} > α then terminate and report NOT α-good Now we present the main algorithm (Algorithm 4) followed by its analysis. Algorithm 4: An algorithm for approximating |Eα | Initialization: ∀i.Xi = ∅ ⊲ Xi represents the current set of sampled α-good edges. Stream Processing: forall the levels i ∈ {0, 1, . . . , [⌊log1+ε m⌋} in parallel do forall the edges e do Feed e to the active α-good tests and update Xi 1 With probability pi = (1+ε) i add e to Xi and start a α-good test for e. Let |Xi | be the number of active α-good tests within this level. 2 n if |Xi | > τ = 64αcεlog then terminate level i 2 Post processing: if |X0 | ≤ τ then return |X0 | else ⊲ |X0 | > τ and the j-th level was not terminated; let j be the smallest integer such that Xj ≤ 8 log n(1+ε) ε2 Xj if there is no such j then return FAIL else return pj Lemma 10. With high probability, Algorithm 4 outputs a 1 ± O(ε) approximation of |Eα |. Proof. It is clear that if |X0 | ≤ τ then X0 = Eα and the algorithm makes no error. In case |X0 | > τ , we claim that |Eα | > 2αc 2 τ . To prove this let t be the time step where |X0 | exceeds τ and let Gt = (V, E (t) ) 8 be the graph where E (t) = {e1 , . . . , et }. Clearly M ∗ (G) ≥ M ∗ (Gt ) because the size of matching only increases. Abusing the notation, let Eα (Gt ) denote the set of α-good edges at time t. By Lemma 6, we have   5 2µ 2α2 τ < |Eα (Gt )| ≤ α + 2 M ∗ (Gt ) ≤ 4αM ∗ (G) ≤ 4α|Eα | ≤ |Eα |. 4 µ − 2c c This proves the claim. n and let i∗ be the integer such Therefore in the following we assume that |Eα | > 2αc 2 τ . Let τ ′ = 8 log ε2 ∗ ∗ ′ i −1 ′ i that (1 + ε) τ ≤ |Eα | ≤ (1 + ε) τ . τ′ ≤ E[|Xi∗ |] ≤ τ ′ . By a Assuming the i∗ -th level does not terminate before the end, we have (1+ε) Chernoff bound, for each i we have (again assuming we do not terminate the corresponding level)   2 ε pi |Eα | . Pr[||Xi | − E(|Xi |)| ≥ εE(|Xi |)] ≤ exp − 4 2 ε |Eα | 2 log n −1 ). Therefore, Pr[||Xi∗ | − E(|Xi∗ |)| ≥ εE(|Xi∗ |)] ≤ exp (− 2(1+ε) i∗ ) ≤ exp ( 1+ε ) ≤ O(n As a result, with high probability |Xi∗ | ≤ 8 log n(1+ε) . Moreover for all i < i∗ − 1, the corresponding ε2 levels either terminate prematurely or in the end we will have |Xi | > 8 log n(1+ε) with high probability. ε2 ∗ ∗ ∗ ∗ Consequently j ∈ {i , i − 1}. It remains to prove that runs corresponding to i and i − 1 will survive until the end with high probability. We prove this for i∗ . The case of i∗ − 1 is similar. (t) Consider a fixed time t in the stream and let Xi∗ be the set of sampled α-good edges at time t corre(t) sponding to the i∗ -th level. Note that Xi∗ contains the a subset of α-good edges with respect to the stream St = (e1 , . . . , et ). From the definition of i∗ and our earlier observations we have 2α2 |Eα | 2α2 τ ′ |Eα (Gt )| (t) ≤ ≤ E[|Xi∗ |] = ∗ ∗ (1 + ε)i c(1 + ε)i c By the Chernoff inequality for δ ≥ 1,   i h −δ (t) (t) (t) Pr |Xi∗ | ≥ (1 + δ)E(|Xi∗ |) = τ ≤ exp E(|Xi∗ |) . 3 From δ = τ (t) E(|Xi∗ |) ∗ −1 = τ (1+ε)i |Eα (Gt )| − 1, we get    −τ |Eα (Gt )| 2α2 τ ′ −τ ≥ τ ≤ exp Pr + + ≤ exp 3 (1 + ε)i∗ 3 c 8α2 τ ′ For τ ≥ c , the term inside the exponent is smaller than −2 log n. It also satisfies δ ≥ 1. After h (t) |Xi∗ | i  (t) applying the union bound, for all t the size of Xi∗ is bounded by τ = finished the proof of the lemma. 64α2 log n cε2 with high probability. This Next, putting everything together, we prove Theorem 1. Proof of Theorem 1: The theorem follows from Lemmas 6 and 10 and taking α = µ + 1 = 6c. Observe that the space cost of Algorithm 4 can be bounded: we have log1+ε m levels where each level runs at most τ concurrent α-good tests otherwise it will be terminated. Each α-good test keeps an edge and two counters and as result it occupies O(1) space. Consequently the space usage of the algorithm is bounded by O(τ log1+ε m). The space bound in the theorem follows from the facts that τ = O( εc2 log n) for α = 6c and m ≤ cn. ✷ References [1] K. J. Ahn, S. Guha, and A. McGregor. Analyzing graph structure via linear measurements. In Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 459–467, 2012. 9 [2] M. Bury and C. Schwiegelshohn. Sublinear estimation of weighted matchings in dynamic data streams. In Proceedings of the 23rd Annual European Symposium on Algorithms (ESA), pages 263–274, 2015. [3] R. Chitnis, G. Cormode, H. Esfandiari, M.T. Hajiaghayi, A. McGregor, M. Monemizadeh, and S. Vorotnikova. Kernelization via sampling with applications to finding matchings and related problems in dynamic graph streams. In Proceedings of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1326–1344, 1326-1344. [4] M. Crouch and D. S. Stubbs. Improved streaming algorithms for weighted matching, via unweighted matching. In Proceedings of the 17th International Workshop on Randomization and Approximation Techniques in Computer Science (RANDOM), pages 96–104, 2014. [5] R. Duan and S. Pettie. Linear-time approximation for maximum weight matchings. Journal of the ACM, 61(1):1–23, 2014. [6] S. Eggert, L. Kliemann, P. Munstermann, and A. Srivastav. Bipartite graph matchings in the semistreaming model. Algorithmica, 63(1-2):490–508, 2012. [7] Sebastian Eggert, Lasse Kliemann, Peter Munstermann, and Anand Srivastav. Bipartite matching in the semi-streaming model. Algorithmica, 63(1-2):490–508, 2012. [8] Leah Epstein, Asaf Levin, Julián Mestre, and Danny Segev. Improved approximation guarantees for weighted matching in the semi-streaming model. SIAM J. Discrete Math., 25(3):1251–1265, 2011. [9] H. Esfandiari, M.T. Hajiaghyi, V. Liaghat, M. Monemizadeh, and K. Onak. Streaming algorithms for estimating the matching size in planar graphs and beyond. In Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2015. [10] Hossein Esfandiari, Mohammad Taghi Hajiaghayi, Vahid Liaghat, Morteza Monemizadeh, and Krzysztof Onak. Streaming algorithms for estimating the matching size in planar graphs and beyond. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, San Diego, CA, USA, January 4-6, 2015, pages 1217–1233, 2015. [11] J. Feigenbaum, S. Kannan, A. McGregor, S. Suri, and J. Zhang. On graph problems in a semi-streaming model. Theoretical Computer Science, 348(2):207–216, 2005. [12] Ashish Goel, Michael Kapralov, and Sanjeev Khanna. On the communication and streaming complexity of maximum bipartite matching. In Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 468–485, 2012. [13] Oded Goldreich and Dana Ron. Property testing in bounded degree graphs. Algorithmica, 32(2):302– 343, 2002. [14] Yijie Han. Matching for graphs of bounded degree. In Frontiers in Algorithmics, Second Annual International Workshop, FAW 2008, Changsha, China, June 19-21, 2008, Proceeedings, pages 171– 173, 2008. [15] Yijie Han. Matching for graphs of bounded degree. In Frontiers in Algorithmics, pages 171–173. Springer, 2008. [16] A. Hassidim, J. A. Kelner, H. N. Nguyen, and K. Onak. Local graph partitions for approximation and testing. In Proceedings of the 50th IEEE Symposium on Foundations of Computer Science (FOCS), pages 22–31, 2009. 10 [17] John E. Hopcroft and Richard M. Karp. An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM J. Comput., 2(4):225–231, 1973. [18] M. Kapralov. Better bounds for matchings in the streaming model. Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1679–1697, 2013. [19] M. Kapralov, S. Khanna, and M. Sudan. Approximating matching size from random streams. Proceedings of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 734–751, 2014. [20] R. M. Karp, U. V. Vazirani, and V. V. Vazirani. An optimal algorithm for on-line bipartite matching. Proceedings of the 22nd Annual ACM Symposium on Theory of Computing (STOC), pages 352–358, 1990. [21] C. Konrad, F. Magniez, and C. Mathieu. Maximum matching in semi-streaming with few passes. In Proceedings of the 11th International Workshop on Randomization and Approximation Techniques in Computer Science (RANDOM), pages 231–242, 2012. [22] Alexandr V. Kostochka. Lower bound of the hadwiger number of graphs by their average degree. Combinatorica, 4(4):307–316, 1984. [23] L. Lovasz and M.D. Plummer. Matching theory. In North-Holland, Amsterdam-New York, 1986. [24] A. McGregor. Finding graph matchings in data streams. In Proceedings of the 8th International Workshop on Randomization and Approximation Techniques in Computer Science (RANDOM), pages 170–181, 2005. [25] A. McGregor. Graph mining on streams. In Encyclopedia of Database Systems, pages 1271–1275. Springer, 2009. [26] A. McGregor and S. Vorotnikova. Planar matching in streams revisited. In Proceedings of the 19th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX), 2016. p [27] S. Micali and V. V. Vazirani. An o( |V ||e|) algorithm for finding maximum matching in general graphs. Proceedings of the 21st IEEE Symposium on Foundations of Computer Science (FOCS), pages 17–27, 1980. [28] C. St. J. A. Nash-Williams. Edge-disjoint spanning trees of finite graphs. Journal of the London Mathematical Society, 36(1):445–450, 1961. [29] C. St. J. A. Nash-Williams. Decomposition of finite graphs into forests. Journal of the London Mathematical Society, 39(1):12, 1964. [30] H. N. Nguyen and K. Onak. Constant-time approximation algorithms via local improvements. In Proceedings of the 49th IEEE Symposium on Foundations of Computer Science (FOCS), pages 327– 336, 2008. [31] List of open problems in sublinear algorithms: Problem 60. http://sublinear.info/60. [32] Mariano Zelke. Weighted matching in the semi-streaming model. Algorithmica, 62(1-2):1–20, 2012. 11
8cs.DS
ARXIV PREPUBLICATION 1 Regularized maximum likelihood estimation of covariance matrices of elliptical distributions arXiv:1611.10266v1 [math.ST] 30 Nov 2016 Christophe Culan , Claude Adnet∗ , Advanced Radar Concepts division, Thales, Limours 91338, France Abstract—The maximum likelihood principle is widely used in statistics, and the associated estimators often display good properties. indeed maximum likelihood estimators are guaranteed to be asymptotically efficient under mild conditions. However in some settings, one has too few samples to get a good estimation. It then becomes desirable to take into account prior information about the distribution one wants to estimate. One possible approach is to extend the maximum likelihood principle in a bayesian context, which then becomes a maximum a posteriori estimate; however this requires a distribution model on the distribution parameters. We shall therefore concentrate on the alternative approach of regularized estimators in this paper; we will show how they can be naturally introduced in the framework of maximum likelihood estimation, and how they can be extended to form robust estimators which can reject outliers. A. Notations and conventions In the following development, the following notations and conventions shall be observed: • • Index Terms—Maximum likelihood estimation, KL-divergence, entropy, elliptical distributions, complex elliptical distributions, adaptive detection, iterative algorithm, outlier detection, outlier rejection, regularized estimators I. I NTRODUCTION : REGULARIZED ESTIMATION Many statistical estimators are shown to be asymptotically well behaved; in particular maximum likelihood estimators are consistent and efficient under relatively mild conditions, and often have good convergence properties, thus making them a popular choice for parametric estimation [21][25][12][1]. However in a few sample regime, their performances can be greatly degraded, and in some cases one may not even be able to compute these estimators [20]; this is notably the case for covariance estimations when the number of samples is of the same order or lower than the dimension of the space [13][29]. In such situations, one has to add additional information in the estimation procedure, other than available samples. Hence a popular approach is to use regularized estimators, which are estimators purposely biased towards a prior distribution representing an initial knowledge of the model; the effect generally is a smoothing of the estimated parameter, although this largely depends upon the shape of the prior distribution; moreover this prior is not necessarily explicitly known. Various regularization methods have been proposed [30][4][2][9][16][6][11]. A popular approach is to derive such estimates by a penalized maximum likelihood approach [31][22][29][17]. The applied penalties are often chosen for convenience of computation; we introduce in this article a way to define such penalties which are in agreement with the theory of maximum likelihood. Manuscript received October XX, 2016; revised October XX, 2016. Corresponding author: M. Culan (email: [email protected]). • • • • • • • For any topological space R1 and R2 , the topological space R1 × R2 is the product of R1 and R2 , whereas R1 ∨ R2 is the disjoint union of R1 and R2 . One also notes, for a topological space R, RN to be the product of N copies of R and ∨N R to be the disjoint union of N copies of R. Let R1 , ..., RN be topological spaces, and let µn be a measure defined onQ Rn for 1 ≤ n ≤ N . The N measure µ1 . . . µn = n=1 µn is the product measure QN of (µn )1≤n≤N defined on n=1 Rn , whereas WN WN µ1 ∨ · · · ∨ µn = n=1 µn is the measure of n=1 Rn such that its restriction to Rn is µn for 1 ≤ n ≤ N and is the joint measure of (µn )1≤n≤N . Moreover for a topological space R and a measure µ defined on R, µN is the product measure of N copies of µ defined on RN , whereas ∨N µ is the joint measure of N copies of µ defined on N · R. The vector space Cd is canonically identified to R2d [23]. Hd (R) is the set of symmetric matrices of size (d, d); Hd (C) is the set of hermitian matrices of size (d, d). Hd+ (K) is the subset of matrices of Hd+ (K) which are + positive; HP + d (K) is the subset of matrices of Hd (K) of unit determinant. The vector space Cd is canonically identified to R2d [23]. X † is the transpose conjugate of any matrix or vector X. µRd is the Lebesgues measure of the space Rd . Similarly, µCd is the Lebesgues measure of Cd ' R2d . Sd−1 is the (d − 1)-sphere, which is identified as the following part of Rd : Sd−1 ' x ∈ Rd ; x† x = 1 . Similarly S2d−1 is identified to x ∈ Cd ; x† x = 1 in Cd . sd−1 shall denote the probability distribution of Sd−1 isotropic for the canonical scalar product of Cd , defined by: d−1 X hy, xi = yk xk (1) k=0 R • δx • is the Dirac delta distribution centered in x in space R. One shall note:  R  Z  dδ0 (t) dδ0R (t) (2) hδ = H δ0R |µR = log dt t∈R It is the entropy of the Dirac distribution relative to the Lebesgues measure of R due to its translational ARXIV PREPUBLICATION 2 symmetry, which is positive and infinite. It can be used to express different other entropies in higher dimensional settings:  d  H δxR |µRd = dhδ (3)   d H δxC |µCd = 2dhδ II. M AXIMUM LIKELIHOOD WITH PRIOR INFORMATION A. General theory Let us first recall that likelihood can be understood in terms of information; indeed it can be expressed as the relative entropy (or KL-divergence [15]) of the sampling distribution S relative to the model distribution P [7]:  Z l(P |S) = −H(S|P ) = log x∈R  dP (x) dS(x) dS (4) Under the usual hypothesis in which one has N i.i.d samples (xn )1≤n≤N , the usual sampling distribution is defined on a space ∨N B, with B being some base space, and is given by the disjoint union of Dirac distributions centered on each sample [7]: N 1 _ B S= δ N n=1 xn The model distribution is given by being some distribution of B. (5) 1 N ∨N PB , with PB Thus the likelihood can be expressed under this hypothesis by: l(P |S) = − N 1 X H(δxBn |PB ) N n=1 (6) Obviously this particular instantiation of the maximum likelihood problem is not well suited for our current problem, as we would like to take into account some prior information in addition to the information provided by samples. We shall focus on a situation in which we have an existing prior estimate, and we want to take into account this prior in our estimation procedure [29][17]. Fortunately the entropic formulation of the maximum likelihood is quite flexible; in particular one can use different models for the sampling distribution, as is done for example in [7] to take into account the circular symmetry of the distributions. We therefore propose to take into account the prior knowledge as part of the sampling distribution. The sampling distribution under the i.i.d hypothesis, with additional prior information can then be modeled as: S= with: N α _ Sn N n=1 ! ∨ ((1 − α)Pprior ) (7) Sn the sample distribution associated to the n-th sample, defined on a base space B; it would generally be given by δxBn . • Pprior the prior distribution. It is not necessarily defined on the same space as the sample distributions depending on the information it carries, and might be defined on a quotiented image of the base space, which shall be noted as [B]. • α ∈ [0; 1] the integration factor, which represents how much ones trusts the prior estimate compared to the newly acquired samples. The distribution model one wants to fit can on the other hand be expressed as:  α ∨N P ∨ ((1 − α)[P ]) (8) N with: • P the distribution model • [P ] the distribution model resulting from P on the quotiented space [B] The corresponding likelihood can therefore be expressed as: • N α X H(Sn |P ) − (1 − α)H(Pprior |[P ]) l(P |S) = − N n=1 (9) Therefore this results in a penalized version of maximum likelihood , the penalty being defined from the relative entropy of the prior distribution for the model distribution [17][29]. III. R EGULARIZED COVARIANCE ESTIMATORS We shall now apply the regularized maximum likelihood equation to different covariance estimation problems. We’ll focus on the two following cases: • The distribution which we try to estimate is elliptically symmetric (ES/CES) [5][18]. No hypothesis is made on the radial distribution of this distribution; this corresponds to the conditions for which Tyler’s estimator is the maximum likelihood estimator for i.i.d samples [7][27][19]. • The distribution is gaussian, or circular gaussian for complex distributions. Note that the corresponding maximum likelihood estimators under the i.i.d hypothesis are given in [7]. A. Regularized Tyler’s estimator Let us first recall that an elliptical distribution can be expressed in general by [7]: √  1 dP (x) = p dQ x† R−1 x dsd−1 |R|  L(R)−1 x √ x† R−1 x  (10) with the radial distribution Q being any probability measure on R+ , and the correlation matrix R being any matrix of HP + d (K) [7]. Supposing here that one has no a priori on the radial distribution, the prior distribution one wants to use should be defined on the unit sphere, and corresponds to the unique ARXIV PREPUBLICATION 3 probability distribution of the unit sphere which is isotropic Rprior for the corresponding correlation matrix Rprior , noted as sd−1 . The entropy between two such distributions isotropic for correlation matrices R1 and R2 shall be noted H(R1 |R2 ). Thus the concentrated likelihood for samples (xn )1≤n≤N in Rd under i.i.d hypothesis is given, after maximization over the radial distribution, by [7]: l(R|S) = − dhδ − N  α(d − 1) X log xn † R−1 xn 2N n=1 1: function REG T YLER(Rprior ,(xn )1≤n≤N ,α,) 2: R ← Rprior 3: repeat √ R 12 ← 4: 5: R− 12 ← R 12 −1 6:   S ← (1 − α)anscm R− 21 Rprior R− 21 (11) + − (1 − α)H(Rprior |R) H(Rprior |R) however represents a challenge to compute. Fortunately, one can characterize its differential with respect to R (see A for more details):   1 1 1 d − 1  1 tr R 2 anscm(R− 2 Rprior R− 2 )R 2 d R−1 2 (12) d tr(S) S S← 8: R ← R 21 exp(S − I)R 12 R R ← tr(R)   2 until tr (R−1 R − I) ≤  10: = N X α xn xn † R− 21 R 1 † N x R− 21 R− 21 xn − 2 n=1 n 7: 9: dH(Rprior |R) R return R− 12 11: 12: end function In the case of a distribution in Cd under the circularity hypothesis, the maximum likelihood equation under i.i.d hypothesis is slightly different; indeed the sampling distribution is then given by: with anscm(Σ) being the expected value of the normalized sample covariance estimator (NSCM) for an elliptical distribution of correlation matrix proportional to Σ. Unfortunately there is no explicit way of computing this matrix in the general case to the authors’ knowledge and one has to resort to numerical methods to extract its eigenvalues. However it has been characterized for complex circularly symmetric distribution in [3]. By deriving the concentrated likelihood in a manner similar to [7] and differentiating it, on gets the following equation: In any case this leads to the following maximum likelihood equation:  tr λR S= − Without any structural constrain on R, this simplifies to:    1 1 1 1 1 R= (1 − α)R 2 anscm R− 2 Rprior R− 2 R 2 2λ(d − 1)  N α X xn xn † + N n=1 xn † R−1 xn (14) This can be solved by using the following numerical procedure: (15)     1 1 1 1 1 − (1 − α) d − R 2 anscm R− 2 Rprior R− 2 R 2 2   N  α(d − 1) X xn xn † −1 − d R =0 N x † R−1 xn n=1 n (16)  tr λR   1 1 1 (1 − α)(d − 1) 1 R 2 anscm R− 2 Rprior R− 2 R 2 2   N  α(d − 1) X xn xn † −1 − d R =0 2N x R−1 xn n=1 n (13) N α _ C Rprior δ + (1 − α)sd−1 N n=1 [xn ] This is almost the same equation, although each sample actually carries less information compared to the prior distribution for a same α parameter. The equation can thus be solved numerically by calling the same algorithm REG T YLER with a different α parameter: REG T YLER(Rprior ,(xn )1≤n≤N , d−α(d−1) ,) 1 (1+α) 2 Note however that the computation of the ansm function differs in the real and complex circular cases (see annex). These regularized Tyler estimators are more complicated to compute than those found in the existing litterature by applying different penalties (specifically ones maintaining the convexity of the problem) and offer no theoretical guaranty ARXIV PREPUBLICATION 4 of convergence [28][17][26]. However they use a penalty which is consistent with the definition of the likelihood as an information theoretic quantity, which is the aim of this paper. B. Regularized estimators for gaussian distributions A subclass of interest of elliptical models are estimations constrained on a subclass of models corresponding to a fixed scaled radial distribution, of the from:   L(R)−1 x (17) dP (x) = σdQ0 (σr)dsd−1 √ x† R−1 x Indeed most M-estimators can be expressed as maximum likelihood estimators for one of these subclasses of models [7]. However the existence of an easy to compute regularized estimator then depends on the expression of the gradient of H(Σ1 |Σ2 ) with respect to Σ2 for two distributions with the same base radial distribution Q0 . Unfortunately there is no analytical expression of this gradient except in specific cases [14]. We shall therefore focus on one of these specific cases: that of gaussian distributions, which corresponds to Q0 following a χ2 (cK d) distribution, with cK = 1 for K = R, and cK = 2 for K = C. The relative entropy of two such gaussian models is given by [10]:   cK tr Σ2 −1 Σ1 + log |Σ2 | − log |Σ1 | − d 2 (18) with Σ1 and Σ2 being the covariance matrices of said models. In the standard case of gaussian distributions in Rd , the resulting likelihood is thus given up to constant additive terms by: H(Σ1 |Σ2 ) = N α X † −1 xn Σ xn 2N n=1 (19)  1 1−α −1 tr Σ Σprior − log |Σ| − 2 2 The corresponding maximum likelihood estimator is then given by a weighted mean of the covariance of the prior distribution and that of the sample covariance matrix of the new samples (SCM): This can be differentiated, leading to the following maximum likelihood equation: Σ= 1 α ((1 − α)Σprior 1 − 2d  N  α X 1 + 1− xn xn † ) N n=1 2xn † Σ−1 xn (22) A solution can be found numerically by adapting the algorithm described in [7]: CG COV 1: 2: 3: function REG CG COV(Σprior , (xn )1≤n≤N , α, , Kmax ) Σ ← (1 − α)Σprior + repeat √ 4: Σ 21 ← 5: Σ− 12 ← Σ 21 −1 6: S← 7: 8: 9: 10: α N N P xn xn † n=1 Σ 1 α (1− 2d ) ((1 − α)Σprior  N  1 α X 1− + xn xn † ) N n=1 2xn † Σ−1 xn   R ← Σ 12 exp Σ− 12 SΣ− 12 − I Σ 21  2  ≤ until tr Σ− 21 ΣΣ− 12 − I return Σ− 21 end function Thus in the specific case of gaussian and complex circular gaussian variables, the regularized maximum likelihood estimators can be computed efficiently. l(Σ|S) = − Σ = (1 − α)Σprior + N α X xn xn † N n=1 (20) In the complex circular case, one can take into account the phase symmetry of the sampling distribution, in a manner similar to Tyler’s estimator; this results in the following likelihood, up to constant additive terms:  N   α X 1 † −1 † −1 l(Σ|S) = − xn Σ xn − log xn Σ xn N n=1 2   α − (1 − α)tr Σ−1 Σprior − 1 − log |Σ| 2d (21) IV. PARTIAL ESTIMATION AND REGULARIZED ESTIMATORS We have thus successfully extended maximum likelihood estimators of covariance matrices to a regularized estimation setting. We shall now discuss a further extension of these regularized estimators in order to improve their robustness to cases of contamination by outliers. In particular, we would like to extend the partial maximum likelihood estimation method developed in [8] to these estimators. Let us recall that partial estimation as introduced in [8] consists in the maximization of a partial likelihood:  dP (x) dS(x) l|X (P |S) = −H|X (P |S) = log dS x∈X (23) under the constrain that X can be any measurable set such that S(X) ≥ p with p ∈ [0; 1] being the order of the partial estimation. Z  Unfortunately this definition is impractical in the case of regularized estimators for which R = ∨N B ∨ [B]. Indeed one ARXIV PREPUBLICATION 5 would have to consider partial entropy integrals between the prior and model distribution of the form:   dPprior H|X∩[B] (Pprior |P ) = log (x) dPprior (x) dP x∈X∩[B] (24) We therefore propose to restrict the possible partial domains to subsets X of the form X ∨ [B], with X ⊂ ∨N B and such that S(X) ≥ (1 − α) + αp. Thus the corresponding restricted partial likelihood, maximized on the partial domain X is now given by [8]: Z 11: R ← R 21 exp(S − I)R 12 12: R R ← tr(R)   2 if tr (R−1 R − I) ≤  then 13: 14: 15: 16: 17: 18: 19: lp (P |S) = − Hp (P |S)  Z = sup S(X)≥αp+(1−α) log x∈X  dP (25) (x) dS(x) dS This is the restricted partial likelihood of order p, conditional to the fact that the prior distribution Pprior contains no outliers. This can be recast as: dpN e  α X  B H δxo(n) |P lp (P |S) = − dpN e n=1 This is a penalized form of the partial likelihood as expressed in [8]. Thus the partial estimation procedure introduced in [8] can be directly extended to such regularized estimators. A. Restricted partial maximum likelihood principle for regularized estimators We shall now apply the partial estimation procedure to the different regularized estimators introduced so far. Outlined below is the algorithmic procedures corresponding to the partial version of the regularized Tyler estimator for a distribution in Rd : function REG P T YLER(Rprior , (xn )1≤n≤N , α, p, , Kmax ) p 2: R 21 ← Rprior 3: R− 12 ← R 21 −1 4: for k from 1 to Kmax do 5: 6: 7: 8: 9: for n from 1 to N do τn ← xn † R− 12 R− 12 xn end for   o ← argsort↑ (τn )1≤n≤N   S ← (1 − α)anscm R− 12 Rprior R− 12 dpN e X xo(n) xo(n) † α 1 + R− 2 R− 21 dpN e τo(n) n=1 10: S← d tr(S) S else R 12 ← √ R R− 21 ← R 12 −1 end if end for 20: return R− 21 21: end function The corresponding partial procedure for a distribution in Cd is the same as Tyler but using a different α parameter: (26) − (1 − α)H(Pprior |[P ]) 1: break REG P T YLER (Rprior ,(xn )1≤n≤N , α(d−1) ,p,) d− 21 (1+α) As stated in III-B, it is in general quite difficult to derive regularized estimators for M-estimators which are consistent with maximum likelihood theory as stated in II-Aexcept for some specific cases. The same remains valid for partial regularized estimates, for which we shall again concentrate on the specific case of gaussian models. The corresponding partial regularized estimators, corresponding to the partial versions of the regularized sample covariance in the real case and the REG CG COV algorithm in the complex circular case are outlined below: 1: function REG PARTIAL SCM(Σprior , (xn )1≤n≤N , α, Kmax ) 2: Σ ← Σprior 3: for n from 1 to N do 4: τn ← xn † Σ−1 xn 5: end for 6:   o0 ← argsort↑ (xn )1≤n≤N 7: for k from 1 to Kmax do α dpN e 8: Σ ← (1 − α)Σprior + 9: for n from 1 to N do 10: dpN Pe n=1 τn ← xn † Σ−1 xn 11: end for 12:   o1 ← argsort↑ (τn )1≤n≤N xo0 (n) xo0 (n) † ARXIV PREPUBLICATION 13: 14: 15: 16: 17: 6 if o0 = o1 then the background noise is generated as a white gaussian noise of unit variance. The target signal is generated as a complex centered circular 1-dimensional gaussian signal aligned with the test signal s, whose variance σ is such that: break else o0 ← o1 end if 18: end for 19: return Σ 20: end function 10 log10 (σ) = SiNR In the complex circular case the corresponding algorithm is given by: 1: 2: 3: function REG PCG COV(Σprior (xn )1≤n≤N , α, , Kmax ) Σ ← (1 − α)Σprior + √ Σ 12 ← Σ α N N P Σ− 12 ← Σ 12 −1 5: for k from 1 to Kmax do 7: for n from 1 to N do end for 9: o ← argsort↑ 11: 12: 13: 14: 15: 16: 17: S← 1 α (1− 2d ) τn − 1 2   log (τn ) 1≤n≤N This covariance/correlation matrix is then used in an adaptive detection scheme.  (1 − α)Σprior   dpN e  α X 1 † + xo(n) xo(n) 1− dpN e n=1 2τo(n)   R ← Σ 12 exp Σ− 12 SΣ− 12 Σ 12  2  if tr Σ− 21 ΣΣ− 12 − I ≤  then The performances are considered in the asymptotic regime (meaning that Σm follows the same distribution as Σm−1 for any m ∈ Z). The performances are shown for N = 11, p = 34 for partial estimators, with various values of α; the results are also compared to the non regularized versions of the estimators for N = 22 [7][8]. break else √ Σ 21 ← Σ Σ− 12 ← Σ 21 −1 end if 18: end for 19: return Σ− 21 20:  In this scenario, we have an infinite stream of learning samples (xn,m )1≤n≤N,m∈Z . These learning samples are used to learn the covariance/correlation matrix of the signal sequentially, using the following pattern: Σm = reg(Σm−1 , (xn,m )1≤n≤N ) τn ← xn † Σ−1 xn 8: 10: xn xn † n=1 4: 6: The detection thresholds are defined to have a false alarm rate of 10−4 ; they are learned on clean training sets, that is that they contain no outliers. end function V. S IMULATIONS We shall now show some simulation results of adaptive detectors using various estimators introduced in this article, using the detection tests introduced in [7][24]. The simulation results are shown in a single channel scenario of dimension d = 8, as a function of the SiNR of the target signal. Fig. 1. Detection capabilities of Tyler-NMF and pTyler-NMF ARXIV PREPUBLICATION 7 presence of outliers, by using the partial procedure defined in [8]. Finally the potential gain in terms of detection performances in adaptive detection schemes is shown on some simulations. A PPENDIX A O N THE RELATIVE ENTROPY OF ANGULAR MODELS The relative entropy of two angular models of Rd , characterized by their correlation matrix R0 and R (with the convention that |R0 | = |R| = 1), is given by: H(R0 |R) =  † −1  Z x R x d−1 log dsd−1 2 x† R0 −1 x x∈Sd−1 Fig. 2. Detection capabilities of reg SCM-MF and reg pSCM-MF L(R )−1 x p 0 x† R0 −1 x ! (27) Although the exact computation of this integral represents a challenge, what is of interest to us is its differential with respect to the matrix R: dH(R0 |R) =  Z d−1  tr  2 xx † −1 x† R−1 x dsd−1 x∈Sd−1 L(R ) x p 0 x† R0 −1 x  !  d(R−1 ) (28) Thus we have to compute: xx† dsd−1 x† R−1 x Z Σ= x∈Sd−1 L(R )−1 x p 0 x† R0 −1 x ! (29) 1 By making a change of variable y = R− 2 x, this integral can be recast as:    † − 12 −1 − 21 yy R R ) y L(R 0  R 12 Σ=R  dsd−1  q † 1 1 y∈Sd−1 y y y † R− 2 R0 R− 2 y (30) Let us note for any symmetric positive matrix Σ: 1 2 As can be seen on figures 1, 2 and V, the use of a regularized estimate in this case allows to greatly improve the detection capabilities of adaptive tests. Indeed the performances quickly approach the asymptotic limit in which the covariance matrix is perfectly estimated when a slower integration factor is chosen. Moreover the degradation of performances of partial estimators can be almost completely negated for a slow enough integration (α ≤ 14 ), thus resulting in estimators which offer performances close to non-adaptive detectors, while retaining the robustness to outliers offered by partial estimators. VI. C ONCLUSION We have presented a theoretical background for a likelihood based approach to regularized estimations. This background allows to define penalties used in penalized maximum likelihood schemes in a way which is consistent with the maximum likelihood principle. This maximum likelihood principle for regularized estimation is then further extended to allow for robust estimators in the Z Z anscm(Σ) = y∈Sd−1 yy † dsd−1 y† y L(Σ)−1 y p y † Σ−1 y ! (31) † This is the integral of yy on the unit ellipse defined by the y† y correlation matrix Σ, and therefore corresponds to the expected value of the normalized sample covariance estimator (NSCM) for an elliptical distribution of correlation matrix proportional to Σ. The structure of this matrix has been studied thoroughly in [3] for complex circular distributions, in the case in which all eigenvalues are distinct: anscm(Σ) = U diag(µ)U † (32) with: • Σ = U diag(λ)U † with U U † = I being the eigen decomposition of Σ ARXIV PREPUBLICATION • µ = Ec with:          E =         c=   8 λ log( λj ) i λj λi −1 −  λi λj if i 6= j  if i = j 1≤i,j≤d 0 ! 1 λk k6=j 1− λj Q 1≤j≤d Note that in a practical implementation, the limitation of having distinct eigenvalues is not restrictive, as it is almost surely the case. However one should take steps to insure a decent numerical stability. We have on our end opted for enforcing a minimum spacing between eigenvalues determined by a numerical tolerance, as given by the following algorithm: 1: 2: function R ESPACE  ((λk )1≤k≤d  , ) o ← argsort↑ (λk )1≤k≤d 3: (µk )1≤k≤d ← (λk )1≤k≤d 4: for k from 1 to d − 1 do if 5: µo(k+1) µo(k) − 1 <  then for m from k + 1 to d do 6: µo(m) ← (1 + )µo(m−1) − µo(m) 7: end for 8: 10: end if end for 11: return (µk )1≤k≤d 9: 12: end function Unfortunately we do not have a similar result in the general case of distributions in Rd , in which case one has to resort to numerical integration methods. Indeed the matrix can be expressed as anscm U diag(λ)U † = U diag(µ)U † , with: µk =  ZZ 2 Γ d2  √ π Γ d−1 2 t∈[0;1] x∈Sd−2 d t2 (1 − t2 ) 2 P t2 + (1 − t2 ) −1 m6=k λm 2 λk xk dsd−2 (x)dt (33) There is no known analytical expression of these eigenvalues to the authors’ knowledge. R EFERENCES [1] John Aldrich et al. Ra fisher and the making of maximum likelihood 1912-1922. Statistical Science, 12(3):162–176, 1997. [2] Frédéric Barbaresco. Super-resolution spectrum analysis regularization: Burg, capon & ago-antagonistic algorithms. In European Signal Processing Conference, 1996. EUSIPCO 1996. 8th, pages 1–4. IEEE, 1996. [3] Sebastien Bausson, Frederic Pascal, Philippe Forster, Jean-Philippe Ovarlez, and Pascal Larzabal. First-and second-order moments of the normalized sample covariance matrix of spherically invariant random vectors. IEEE Signal Processing Letters, 14(6):425–428, 2007. [4] Peter J Bickel and Elizaveta Levina. Covariance regularization by thresholding. The Annals of Statistics, pages 2577–2604, 2008. [5] MA Chmielewski. Elliptically symmetric distributions: a review and bibliography. International Statistical Review/Revue Internationale de Statistique, pages 67–74, 1981. [6] Philippe Ciuciu, Jérôme Idier, and Jean-François Giovannelli. Regularized estimation of mixed spectra using a circular Gibbs-Markov model. IEEE Transactions on Signal Processing, 49(10):2201–2213, oct. 2001. [7] Christophe Culan and Claude Adnet. Maximum likelihood estimation of covariances of elliptically symmetric distributions. eprint, arXiv:1611.04365, 2016. [8] Christophe Culan and Claude Adnet. Partial estimators and application to covariance estimation of gaussian and elliptical distributions. eprint, arXiv:1611.07418, 2016. [9] Junbo Duan, Charles Soussen, David Brie, Jérôme Idier, Mingxi Wan, and Yu-Ping Wang. Generalized LASSO with under-determined regularization matrices. Signal Processing, 127:239–246, 2016. [10] John Duchi. Derivations for linear algebra and optimization. Berkeley, California, 2007. [11] Jean-François Giovannelli, Jérôme Idier, Guy Desodt, and Daniel Muller. Regularized adaptive long autoregressive spectral analysis. IEEE Transactions on Geoscience and Remote Sensing, 39(10):2194–2202, oct. 2001. [12] Anders Hald. On the history of maximum likelihood in relation to inverse probability and least squares. Statistical Science, pages 214– 222, 1999. [13] Joseph P Hoffbeck and David A Landgrebe. Covariance matrix estimation and classification with limited training data. IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(7):763–767, 1996. [14] Reshad Hosseini, Suvrit Sra, Lucas Theis, and Matthias Bethge. Inference and mixture modeling with the elliptical gamma distribution. Computational Statistics & Data Analysis, 101:29–43, 2016. [15] Solomon Kullback and Richard A Leibler. On information and sufficiency. The annals of mathematical statistics, 22(1):79–86, 1951. [16] Ali Mohammad-Djafari, Jean-François Giovannelli, Guy Demoment, and Jérôme Idier. Regularization, maximum entropy and probabilistic methods in mass spectrometry data processing problems. Int. Journal of Mass Spectrometry, 215(1-3):175–193, avr. 2002. [17] Esa Ollila and David E Tyler. Regularized-estimators of scatter matrix. IEEE Transactions on Signal Processing, 62(22):6059–6070, 2014. [18] Esa Ollila, David E Tyler, Visa Koivunen, and H Vincent Poor. Complex elliptically symmetric distributions: Survey, new results and applications. Signal Processing, IEEE Transactions on, 60(11):5597–5625, 2012. [19] Frédéric Pascal, Yacine Chitour, Jean-Philippe Ovarlez, Philippe Forster, and Pascal Larzabal. Covariance structure maximum-likelihood estimates in compound gaussian noise: Existence and algorithm analysis. Signal Processing, IEEE Transactions on, 56(1):34–48, 2008. [20] Johann Pfanzagl. Parametric statistical theory. Walter de Gruyter, 1994. [21] John W Pratt. Fy edgeworth and ra fisher on the efficiency of maximum likelihood estimation. The Annals of Statistics, pages 501–514, 1976. [22] Pradeep Ravikumar, Martin J Wainwright, Garvesh Raskutti, Bin Yu, et al. High-dimensional covariance estimation by minimizing 1penalized log-determinant divergence. Electronic Journal of Statistics, 5:935–980, 2011. [23] Louis L Scharf. Statistical signal processing, volume 98. AddisonWesley Reading, MA, 1991. [24] Louis L Scharf and Benjamin Friedlander. Matched subspace detectors. Signal Processing, IEEE Transactions on, 42(8):2146–2157, 1994. [25] Stephen M Stigler. Statistics on the table: The history of statistical concepts and methods. Harvard University Press, 2002. [26] Ying Sun, Prabhu Babu, and Daniel P Palomar. Regularized tyler’s scatter estimator: Existence, uniqueness, and algorithms. IEEE Transactions on Signal Processing, 62(19):5143–5156, 2014. [27] David E Tyler. Statistical analysis for the angular central gaussian distribution on the sphere. Biometrika, 74(3):579–589, 1987. [28] Ami Wiesel. Geodesic convexity and covariance estimation. Signal Processing, IEEE Transactions on, 60(12):6182–6189, 2012. [29] Ami Wiesel. Unified framework to regularized covariance estimation in scaled gaussian models. IEEE Transactions on Signal Processing, 60(1):29–38, 2012. [30] Daniela M Witten and Robert Tibshirani. Covariance-regularized regression and classification for high dimensional problems. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 71(3):615– 636, 2009. [31] Lingzhou Xue, Shiqian Ma, and Hui Zou. Positive-definite 1-penalized estimation of large covariance matrices. Journal of the American Statistical Association, 107(500):1480–1491, 2012. ARXIV PREPUBLICATION Christophe Culan was born in Villeneuve-St-Georges, France, on November 1st , 1988. He received jointly the engineering degree from Ecole Centrale de Paris (ECP), France and a master’s degree in Physico-informatics from Keio University, Japan, in 2013. He was a researcher in applied physics in Itoh laboratory from 2013 to 2014, specialized in quantum information and quantum computing, and has contributed to several publications related to these subjects. He currently holds a position as a research engineer in Thales Air Systems, Limours, France, in the Advanced Radar Concepts division. His current research interests include statistical signal and data processing, robust statistics, machine learning and information geometry. Claude Adnet was born in A, France, in 1961. He received the DEA degree in signal processing and Phd degree in 1988 and 1991 respectively, from the Institut National Polytechnique de Grenoble (INPG), Grenoble France. Since then, he has been working for THALES Group, where he is now Senior Scientist. His research interests include radar signal processing and radar data processing. 9
10math.ST
M ULTI - MODAL G EOLOCATION E STIMATION D EEP N EURAL N ETWORKS USING arXiv:1712.09458v1 [cs.CV] 26 Dec 2017 Jesse M. Johns, Jeremiah Rounds & Michael J. Henry Pacific Northwest National Laboratory Richland, WA 99352, USA {jesse.johns,jeremiah.rounds,michael.j.henry}@pnnl.gov A BSTRACT Estimating the location where an image was taken based solely on the contents of the image is a challenging task, even for humans, as properly labeling an image in such a fashion relies heavily on contextual information, and is not as simple as identifying a single object in the image. Thus any methods which attempt to do so must somehow account for these complexities, and no single model to date is completely capable of addressing all challenges. This work contributes to the state of research in image geolocation inferencing by introducing a novel global meshing strategy, outlining a variety of training procedures to overcome the considerable data limitations when training these models, and demonstrating how incorporating additional information can be used to improve the overall performance of a geolocation inference model. In this work, it is shown that Delaunay triangles are an effective type of mesh for geolocation in relatively low volume scenarios when compared to results from state of the art models which use quad trees and an order of magnitude more training data. In addition, the time of posting, learned user albuming, and other meta data are easily incorporated to improve geolocation by up to 11% for country-level (750 km) locality accuracy to 3% for city-level (25 km) localities. 1 I NTRODUCTION Advancements in deep learning over the past several years have pushed the bounds of what is possible with machine learning beyond typical image classification or object localization. Whereas prior work in computer vision and machine learning has focused primarily on determining the contents of the image–“is there a dog in this photo?”—more recent methods and more complicated models have enabled deeper examinations of the contextual information behind an image. This deeper exploration allows a researcher to ask more challenging questions of its models. One such question is, “where in the world was this picture taken?” However, estimating the geographic origin of a ground-level image is a challenging task due to a number of different factors. Firstly, the volume of available images with geographic information associated with them is not evenly distributed across the globe. This uneven distribution increases the complexity of the model chosen and complicates the design of the model itself. Furthermore, there are additional challenges associated with geo-tagged image data, such as the potential for conflicting data (eg. incorrect geolabels and replica landmarks - St Peters Basilica in Nikko, Japan) and the ambiguity of geographic terms (eg. imagery of similar and ambiguous geological features, such as beaches, screenshots of websites, or generally, plates of food). The work presented herein focuses on the task of content-based image geolocation: the process of identify the geographic origin of an image taken at ground level. Given the significant growth in the production of data, and trends in social data to move away from pure text-based platforms to more images, videos, and mixed-media, tackling the question of inferring geographic context behind an image becomes a significant and relevant problem. Whereas social textual data may be enriched with geolocation information, images may or may not contain such information; EXIF data is often stripped from images or may be present but incomplete. Within the context of mixed-media data, using the geolocation information associated with a linked object may be unreliable or not even 1 applicable. For example, a user on Twitter may have geolocation information enabled for their account, but may post a link to an image taken from a location different from the one where they made their post. 1.1 R ELATED W ORK A wide variety of approaches have been considered for geolocation from image content, please consult (Brejcha & Čadı́k, 2017) for a review. The approach taken in this paper builds on recent work in global geolocation from ground-based imagery (Weyand et al., 2016) for global scale geoinferencing. Weyand et al. (2016) utilize a multi-class approach with a one-hot encoding. A common approach, as well, is to perform instance-level scene retrieval in order to perform geolocation of imagery (Hays & Efros, 2008; 2015; Vo et al., 2017). These works query on previously geotagged imagery and assign a geolabel based on the similarity of the image query to the database. Further, Vo et al. (2017) builds on work by Hays & Efros (2008; 2015); Weyand et al. (2016) by utilizing the feature maps for the mesh-based classifier for the features of their nearest-neighbors scene retrieval approach. Prior work exists for data sampling strategies for large-scale classification problems for social media applications. Kordopatis-Zilos et al. (2016) considers weighted sampling of minority classes. In this work, the class selection is biased during training of the deep learning models. Biasing class selection with random noising (often called image regularization) is a well known way to allow a model to see more examples of rare classes, but also there are additional concerns related specifically to social media applications. For example, researchers in Kordopatis-Zilos et al. (2016) consider the case of sampling such that an individual user is only seen once per a training epoch. In this work, sampling is performed without respect to user, so that images are selected in epochs completely at random, but the broader influence of latent variables, other than user, and communities is of concern in social media geolocation. 1.2 C ONTRIBUTIONS The first type of model considered in this work is purely geolocation for image content (M1). The use of time information forms a second set of models within this work (M2). User-album inputs form a third set of models within this work (M3). Our work contributes meaningful consideration of the use of an alternative mesh for geolocation in M1 and demonstrates the meaningful use of time and user information to improve geolocation (M2 and M3). 2 G EOLABELED DATA Collected data holdings are derived from YFCC100M (Thomee et al., 2016), where training and validation was performed on a randomly selected 14.9M (12.2M training/2.7M validation) of the 48.4M geolabeled imagery. PlaNet, in comparison, used 125M (91M training/34M validation) images (Weyand et al., 2016) for model developemt. In using the data, it is assumed that the ground truth GPS location is exactly accurate, which is a reasonable approximation based on the results of Hauff (2013). Every YFCC100M image has associated meta data. Importantly, these data contain user-id and posted-time. User-id is a unique token that groups images by account. Posted time is the time that the user uploaded data to the website that ultimately created the combined storage of all images. The most likely true GPS location for an image from varies by the time the image is uploaded to a website, as shown in Figure 1. 3 3.1 M ETHODOLOGY CNN C LASSIFICATION (M ODEL M1) The approach described in this work for the global-scale geolocation model is similar to the classification approach taken by PlaNet (Weyand et al., 2016). Spatially the globe is subdivied into a grid, forming a mesh, decribed in Section 3.1.1, of classification regions. An image classifier is to trained 2 Figure 1: True Longitude versus Time of Posting. In these boxplots, we limit users to one image selected at random to decouple any user effects from time of day. What this image implies is that the prior distribution for image longitude differs by the time of day that an image is posted. As an example, consider longitudes near 0. It would take less evidence to predict a longitude close to zero for an image posted around 01:00 UTC than to make a similar prediction at 21:00 UTC because of the observed priors. At 21:00 UTC, the boxplot indicates images are typically as far from zero longitude as will been seen in the data. to recognize the imagery whose ground truth GPS is contained in a cell and hence, during inference, the mesh ascribes a probability distribution of geo-labels for the input imagery. 3.1.1 M ESH The classification structure is generated using a Delaunay triangle-based meshing architecture. This differs from the PlaNet approach, which utilizes a quad-tree mesh. Similarly to PlaNet, the mesh cells are generated such that they conserve surface area, but the approach is not as simple as with a quad-tree. The triangular mesh was deployed under the hypothesis that the Delaunay triangles would be more adaptive to the geometric features of the Earth. Since triangular meshes are unstructures, they can more easily capture water/land interfaces without the additional refinement needed by quadtree meshes. However, the triangular mesh loses refinement level information which comes with a structured quad-tree approach, which would allow for granularity to be controlled more simplistically, based which cells contain other cells. In order to control mesh refinment, cells are adapatively refined, or divided, when the cell contains more than some number of examples (refinement limit) or the mesh cell is dropped from being classified by the model (the contained imagery is also dropped from training) if the cell contains less than a number of samples (minimum examples). The options used for generating the three meshes in this paper are shown in Table 1. Parameters for the initialization of the mesh were not explored; each mesh was initialized with a 31 x 31 structured grid with equal surface area in each triangle. The mesh for the a) coarse mesh and b) fine mesh are shown in Figure 3.1.1. Table 1: The geolocation classification mesh can be tuned by modifying the refinement level to adjust the maximum and minimum number of cells in each mesh cell. This table shows the meshing parameters used for the three meshes studied in this work. These meshes were selected to cover a reasonable range of mesh structures, with fineP meant to replicate the mesh parameters utilized by PlaNet. However, it should be noted that this isn’t direcly comparable since the fineP mesh is generated with both a different methodology and a different dataset. Mesh Coarse Fine FineP Refinement Limit Minimum Examples 8000 5000 10000 1000 500 50 3 Cell Count 538 6565 4771 Figure 2: Coarse mesh and fine mesh classification structure for classification models developed in this paper. The red triangles indicate regions where the number of images per cell meets the criteria for training. The coarse mesh was generated with an early dataset of 2M YFCC100M images, but final training was performed by populating those cells with all training data without additional refinement. The fine and fineP meshes were generated with all available imagery (14M). The fine mesh does a better job at representing geographic regions, for example, the water/land interface of Spain and Portugal becomes evident. However, this is masked with the coarser mesh, which lacks fidelity to natural geographic boundaries. 3.1.2 M ODEL The Inception v4 convolutional neural network architecture proposed in (Szegedy et al., 2016) is deployed to develop the mesh-based classification geolocation model (Model M1) presented in this work, which differs from the Inception v3 architecture used in PlaNet (Weyand et al., 2016). A softmax classification is utilized, similar to the PlaNet approach. One further difference between the work presented here and that of PlaNet is that cells are labeled based the cell centroid, in latitudelongitude. Here an alternate approach is used where the “center-of-mass” of the training data in a containing cell is computed, whereby the geolocation for each cell was specified as the lat/lon centroid of the image population. Significant improvements are expected for coarse meshes, as it can be noticed in Figure 3.1.1 for example, that the cell centroid on the coast of Spain is out in the ocean. Therefore, any beach image, as an example, will have an intrinsically higher error that would be otherwise be captured by a finer mesh. This is expecially true for high density population regions. 3.1.3 M ODEL E VALUATION Models are evaluated by calculating the distance between the predicted cell and the ground-truth GPS coordinate using a great-circle distance: d = R × arcos (sin(x1 )sin(x2 ) + cos(x1 )cos(x2 )cos(y2 − y1 )) where xi and yi is the latitude and longitude, respectively, in radians, and R is the radius of the Earth (assumed to be 6372.795 km). An error threshold here is defined as the number of images which are classified within a distance of d. Error thresholds of 1 km, 25 km, 200 km, 750 km, 2500 km are utilized to represent street, city, region, country, and continent localities to remain consistent with previous work (Hays & Efros, 2008; 2015; Weyand et al., 2016; Vo et al., 2017). As an example, if 1 out of 10 images are geolabeled with a distance of less than 200 km, then the 200 km threshold would be 10%. 3.2 G EOLOCATION I MPROVEMENT WITH T IME M ETA DATA (M ODEL M2) Every YFCC100M image has associated meta data; importantly these data consist of user id and posted time. Posting time is utilized in model M2, Figure 3. Let Zik be the one-hot encoding of the ith image for the kth class, so that it takes on value 1 if image i belongs to the kth geolocation class. P (Zik = 1|Xi ) is assumed not equal to P (Zik = 1|Xi , ti ), where ti is the time of posting of the ith image. Evidence for this fact is of the form of observed true GPS longitude shown as changing distribution with respect to posting time (Hour of Day UTC) as shown in Figure 1. Figure 1 is only strong evidence for P (Zik = 1|ti ) 6= P (Zik = 1), and it could still be the case that P (Zij = 1|Xi ) = P (Zij = 1|Xj , tj ). Which is to say, conditioned on the content of an image there could be no dependence on time, but it seems prudent with the evidence in this figure to proceed under the assumption that there is time dependence. The operational research hypothesis for this model (M2) is that there remains a time-dependence after conditioning on image content. 4 Table 2: M2: Time-Adjusting Geolocation Model. N is the length of p̂j , which takes on two values: 538 (coarse mesh) and 6565 (fine mesh). All layers except the last are dense layers with 50% dropout and batch normalization. Layer Type Number Neurons Activation 1 Input N+4 ReLU 2 Hidden 542*3 Sigmoid 3 Hidden 542*3 ReLU 4 Hidden 542*3 Sigmoid 5 Output N Softmax To incorporate time, related variables are appended to the output of the geolocation model (M1) to form a new input for M2. Every image has a vector of fit probabilities p̂i from the softmax layer of M1. p̂i is filtered so that only the top 10 maximum entries P remain, and the other entries are set to 0 (p̂0i ). This vector is normalized, so that , p̂1ik = p̂0ik / l p̂0il . The L1-norm (denominator) in the normalization |p̂0i | is appended as a feature. Time of posting is turned into a tuple of numeric input as Ti = (Hour(ti ) − 11.5)/24, (Day of Week(ti ) − 3.5)/7, (Month(ti ) − 6.5)/12, where ti is the time of publishing, Hour(ti ) is a function that returns hour of the day (0 to 23), Day of Week is a function that returns 1 to 7 for numbered days of the week starting with Sunday as 1, and Month(ti ) is a function that returns the month of year starting with January as 1. Geolocation uses as input for each image, the concatenated vector (p̂1i , |p̂0i |, Ti ). Year is specifically omitted from time inputs because this would not generalize to new data posted in the future. 3.3 U SER -A LBUM G EOLOCATION R EFINEMENT (M ODEL M3) Model M3, Figure 3, simultaneously geolocates many images from a single user with an LSTM model. The idea here is to borrow information from other images a user has posted to help aid geolocation.The Bidirectional LSTMs capitalizes on correlations in a single user’s images. LSTMs were also considered by Weyand et al. (2016), but in PlaNet the albums were created and organized by humans. When a human organizes images they may do so by topic or location. In M3, all images by a single user are organized sequentially in time with no particular further organization. The related research question is: does the success observed by Weyand et al. (2016) extend to this less informative organization of images? All images from a user are grouped into albums of size 24. If there are not enough images to fill an album then albums are 0 padded and masking is utilized. During training, a user was limited to a single random album per epoch. Album averaging was considered by Weyand et al. (2016) (PlaNet). In album averaging, the images in an album are assigned a mesh cell based on the highest average probability across all images. This method increases accuracy by borrowing information across related images. As a control, a similar idea is applied to user images, in which, the location of an image is determined as the maximum average probability across all images associated with the posting user. This result assumes that all images from a user are from the same mesh grid cells. In addition with user-averaging, there is no optimization that controls class frequencies to be unbiased. Finally, LSTM on a time-ordered sequence of images was considered (without respect to user). However, we were unable to improve performance significantly past that gained by just adding time to the model, so albums without user are not further considered in this paper. 4 R ESULTS 4.1 4.1.1 M ODEL M1 C LASSIFICATION E XPERIMENTS M ESH C OMPARISON Meshing parameters are investigated to understand the sensitivity to mesh adaptation. The results for each mesh is shown in Table 3. There is an apparent trade-off between fine-grain and coarsegrain geolocation. The coarse mesh demonstrates improved large granularity geolocation and the fine mesh performs better at finer-granularities, as would be expected. This observation was also noticed in (Vo et al., 2017). In addition, the impact of classifying on the centroid of the training data 5 Figure 3: Album model with component details added. Operator 1 is a filtering and re-normalization of M1: Geolocation output. At operator (1) the output of M1 is filtered to output only the top 10 mesh cell probabilities (making it mostly sparse) re-normalized to sum to 1. Training of M2 and M3 was only done on the validation data of M1 (using a new random split of test-validation). Time inputs are concatenated to filtered and normalized outputs at (1) and a new training step is implied. A small abuse of notation is present: M3 (Time-Albums) is properly described as M2 concatenated with M3 layers. is compared to utilizing the cell centroid for class labels. A dramatic improvement is noticed for the coarse mesh, with only a modest improvement for the fine mesh. Table 3: Geolocation locality error thresholds on the YFCC100M validation hold-out set comparing both imagery centroid and cell centroid classification structures. Mesh Coarse Coarse Fine Fine FineP FineP 4.1.2 Imagery Centroid Street 1 km City 25 km Region 200 km Country 750 km False True False True False True 0.42 1.25 3.20 4.44 1.86 3.23 6.89 10.57 9.56 10.49 8.23 9.47 21.22 23.99 16.64 16.63 16.23 16.69 38.53 38.72 29.49 29.57 30.98 31.07 Continent 2500 km 56.64 56.66 49.17 49.13 50.97 50.98 O UTDOOR I MAGERY An experiment was conducted to determine if the performance of the M1 model could be improved by applying the geolocation model on outdoor imagery only. From Thomee et al. (2016) it would be expected that approximately 50% of the geolabeled YFCC100M imagery contains outdoor imagery. A Place365 (Zhou et al., 2016) model was used in conjunction with indoor-outdoor label deliminations to filter geolocation inference only on outdoor imagery. Note that the geolocation model was not re-trained on the “outdoor” imagery, this is only conducted as a filtering operation during inference. Results are shown in Table 4. In general, the improvement is quite good, about a 4-8% improvement in accuracy for region/country localities, with a more modest boost in smaller-scale regions. 4.1.3 IM2GPS T EST R ESULTS The Im2GPS testing data is utilized to test the model on the 237 images provided by the work of Hays & Efros (2008). Results are tabluated in Table 5 for all of the meshes. The imagery centroid classification labels are generated with the YFCC100M training data, yet the performance 6 Table 4: Geolocation locality error thresholds on the YFCC100M validation hold-out set comparing inference on outdoor imagery only. Mesh Coarse Coarse Fine Fine FineP FineP Outdoor Only Street 1 km City 25 km Region 200 km Country 750 km False True False True False True 1.25 1.46 4.44 4.90 3.23 3.57 10.57 12.15 10.49 12.17 9.47 10.82 23.99 29.22 16.63 19.96 16.69 19.85 38.72 46.23 29.57 34.84 31.07 36.2 Continent 2500 km 56.66 63.50 49.13 54.33 50.98 55.94 is still greatly improved when applied to the Im2GPS testing set, demostrating generality with the approach. The performance of the M1 classification model is comparable to the performance of (Weyand et al., 2016) with a factor of ten less training data and far fewer classification regions (6k compared to 21k); the coarse mesh M1 model exceeds the performance of PlaNet for large regions (750 and 2500 km). Table 5: Geolocation locality error thresholds on the Im2GPS testing data comparing both imagery centroid and cell centroid classification structures. Bold indicates the best of the models developed in this work. The work of Weyand et al. (2016) used 125M images for model development (91M training/34M validation) and Vo et al. (2017) is an instance retrieval based method, utilizing a PlaNet-inspired mesh-based classifier for feature extraction which was trained on 9M Flickr images. Mesh Coarse Fine FineP Coarse Fine FineP Hays & Efros (2008) Hays & Efros (2015) Weyand et al. (2016) Vo et al. (2017) 4.2 Imagery Centroid Street 1 km City 25 km Region 200 km Country 750 km FALSE FALSE FALSE TRUE TRUE TRUE 0.71 4.57 3.27 2.89 7.53 4.75 11.35 20.41 16.79 18.47 22.42 18.73 12.0 21.9 24.5 33.3 29.32 32.78 28.87 35.53 33.82 30.20 15.0 32.1 37.6 44.3 55.62 49.95 46.01 56.17 50.96 46.23 23.0 35.4 53.6 57.4 2.5 8.4 12.2 Continent 2500 km 72.02 67.06 64.04 71.99 67.07 64.10 47.0 51.9 71.3 71.3 T IME A DJUSTED G EOLOCATION AND A LBUM R ESULTS (M2 AND M3) Use of time improves geolocation in two ways. There is a slight gain of accuracy for using time as indicated in Tables 4 and 6. 24.20% of images are geolocated to within 200 km as opposed to 23.99% without using time with the coarse mesh, and 12.28% versus 10.49% are within 25 km using the fine mesh. This small persistent advantage can be seen across all error calculations and is statistically significant. There is a measurable difference between the error of the coarse mesh using time (M2) and not using time (M1). There exist a matched pair of errors for each image: e1i and e2i , where i is a validation image index. The first superscript being the M1 error and the second superscript being M2 error for image i in km. A null hypothesis is µ1 = µ2 where µ1 is the mean of the unknown distribution of e1i and likewise for µ2 . This hypothesis is tested with a Wilcoxon-Signed-Test for paired observations, which makes a minimal number of distributional assumptions. Specifically, normality of the errors is not assumed. The difference µ̂2 − µ̂1 = 381 is highly significant (p-value < 10−16 ) in favor of using time-inputs, so even though the effect of M2 is small, it is not explained by chance alone. It is the case that the distribution of errors is mean shifted, but it is not uniformly shifted to lower error, nor is it it the case that images are universally predicted closer to the truth. The median of coarse mesh e1 is 1627 km while the median of e2 is 1262 km (Table 7). 7 Time input models appear to have lower-bias class probabilities. Cross-entropy was optimized in training for both the classification model (M1) and time-inputs models (M2). In each training method the goal is to minimize these class biases. KL-Divergence(p̂, q̂) is calculated for each model, where p is the observed class proportions for the true labels in validation, and q is the observed class proportions for the model predicted labels in validation (in both cases, 1 is added to the counts prior to calculating proportions as an adjustment for 0 count issues). The KL-divergence of the model output class frequencies compared to the true class frequencies in validation are in Table 7. “User-Averaging” is incorporated into results because it is a simple method that appears to be more accurate then predicting individual images with M1 or M2; however, it biases cell count frequency (Table 7). In general when using the average probability vector to predict a user’s image, there is no guarantee that the class frequencies are distributed similarly to the truth; thus, improved accuracy can come with higher bias which is what is observed. Albums are a much better approach to borrow information across users because built into the training method is a bias reducing cross-entropy optimization, and indeed LSTMs on user albums had the lowest class bias of any model considered. Table 6: Percentage accuracy to specific resolution: Researched models compared at various spatial resolutions. Coarse and fine mesh have 538 and 6565 triangles across the globe (cells), respectively. ”Time inputs” indicates time meta information has been concatenated with M1 output. Albums are created using user-id and contain 24 images. Bold is the best observed accuracy in column. Coarse Mesh and Fine Mesh Best Possible are not actual models, but rather the best possible accuracy if every image was given exactly the right class. In the fine mesh the best possible accuracy is incidental, but in the coarse mesh it is a severe limitation for street level accuracy. Model Coarse Mesh Time Inputs (M2) Coarse Mesh Time Inputs (M2) Coarse Mesh User Averaging Coarse Mesh User Albums (M3) Coarse Mesh User Albums (M3) Coarse Mesh Best Possible (cell centroid) Coarse Mesh Best Possible (imagery centroid) Fine Mesh Time Inputs (M2) Fine Mesh Time Inputs (M2) Fine Mesh Best Possible (cell centroid) Fine Mesh Best Possible (imagery centroid) Outdoor Only False True False False True False False False True False False Street 1 km 1.20 1.36 0.84 1.25 1.39 1.57 4.10 4.82 4.95 21.92 31.22 City 25 km 10.47 11.99 11.34 11.25 12.52 25.33 43.38 12.28 13.44 73.13 83.23 Region 200 km 24.20 29.28 27.30 25.65 30.24 81.97 93.86 18.44 21.17 97.26 99.09 Country 750 km 40.12 47.60 44.74 42.38 49.17 99.99 99.98 31.39 35.85 99.99 99.99 Continent 2500 km 60.66 66.69 62.84 63.17 68.61 100.00 100.00 52.25 56.31 100.00 100.00 Table 7: KL-Divergence of various models from observed class proportions in validation data. Lower KL-Divergence is better, and 0 indicates distributional equivalence between model class frequencies and true class frequencies. Bold is best model observed by these measures. Entropy has no ”best”, so it is not bolded. Model KL Divergence Shannon Entropy Mean Average Error (km) Median Image Error (km) 0.6718 0.4998 0.9702 0.4991 0.0000 1.7120 0.3543 0.0000 5.6360 5.2890 5.0760 5.1900 6.0180 7.0460 8.2770 8.6090 3897 3516 3192 3320 62 4561 4311 17 1627 1262 1051 1124 33 2705 2140 4 Coarse Mesh Inception (M1) Coarse Mesh Time Inputs (M2) Coarse Mesh User Averaging Coarse Mesh User Albums Time Inputs (M3) Coarse Mesh Best Possible Fine Mesh Inception (M1) Fine Mesh Time Inputs (M2) Fine Mesh Best Possible 5 C ONCLUSIONS Conditioning on latent variables can only improve geolocation models. Universally using time of day in the models was observed to increase accuracy and lower bias. Time of day is a weak addition 8 to Inception-like results, but it is useful to be as accurate as possible, and it makes statistically significant improvements to geolocation. Both meshes were improved by using time information (M2). This is a result that is not surprising, and as a research approach, can be applied to any number of meta data variables that might accompany images. Accounting for indoor/outdoor scenes in images explained variation in validation accuracy. Outdoor only results are better than results for all images. We suggest as future work that the probability that an image is outdoor could be concatenated to the input of M2. The accompanying research hypothesis is that in the case that an image is indoors, perhaps the model will learn to weight time or other meta data results more heavily, or otherwise be able to use that information optimally. Increasing the granularity of a grid reduces accuracy at the country and regional level, while improving accuracy at street and city level accuracy. To be clear though, street level geoinferencing is not practical with a course mesh. This is shown by the best possible accuracy in Table 6, and so it is expected that a fine mesh would do better. On the other hand, there is no reason to assume that a fine mesh has to be better for geolocation at larger resolutions than 25 km, nor is there any explicit way to prove a fine mesh should do no worse than a course mesh. What we observe is that a course mesh is a superior grid for 200 km resolutions. Furthermore, we show that for both the coarse mesh and the fine mesh, using a Delaunay triangle-based mesh provides the ability to train accurate models with far fewer training examples than what was previously published. ACKNOWLEDGMENTS This research was performed at Pacific Northwest National Laboratory, a multi-program national laboratory operated by Battelle for the U.S. Department of Energy. R EFERENCES Yoshua Bengio and Jean-Sbastien Sencal. Quick Training of Probabilistic Neural Nets by Importance Sampling. 2003. Jan Brejcha and Martin Čadı́k. State-of-the-art in visual geo-localization. Pattern Analysis and Applications, 20(3):613–637, Aug 2017. ISSN 1433-755X. doi: 10.1007/s10044-017-0611-1. URL https://doi.org/10.1007/s10044-017-0611-1. Rich Caruana, Steve Lawrence, and C Lee Giles. Overfitting in neural nets: Backpropagation, conjugate gradient, and early stopping. In Advances in neural information processing systems, pp. 402–408, 2001. John Duchi, Elad Hazan, and Yoram Singer. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. J. Mach. Learn. Res., 12:2121–2159, July 2011. ISSN 1532-4435. URL http://dl.acm.org/citation.cfm?id=1953048.2021068. Yoav Freund and Robert E Schapire. A desicion-theoretic generalization of on-line learning and an application to boosting. In European conference on computational learning theory, pp. 23–37. Springer, 1995. Claudia Hauff. A Study on the Accuracy of Flickr’s Geotag Data. In Proceedings of the 36th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’13, pp. 1037–1040, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2034-4. doi: 10. 1145/2484028.2484154. URL http://doi.acm.org/10.1145/2484028.2484154. James Hays and Alexei A Efros. Im2gps: estimating geographic information from a single image. In Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on, pp. 1–8. IEEE, 2008. James Hays and Alexei A. Efros. Large-Scale Image Geolocalization. In Jaeyoung Choi and Gerald Friedland (eds.), Multimodal Location Estimation of Videos and Images, pp. 41–62. Springer International Publishing, 2015. ISBN 978-3-319-09860-9 978-3-319-09861-6. URL http://link.springer.com/chapter/10.1007/978-3-319-09861-6_3. DOI: 10.1007/978-3-319-09861-6 3. 9 Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. CoRR, abs/1502.01852, 2015. URL http: //arxiv.org/abs/1502.01852. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. Giorgos Kordopatis-Zilos, Symeon Papadopoulos, and Yiannis Kompatsiaris. In-depth exploration of geotagging performance using sampling strategies on yfcc100m. In Proceedings of the 2016 ACM Workshop on Multimedia COMMONS, pp. 3–10. ACM, 2016. Andriy Mnih and Geoffrey E Hinton. A Scalable Hierarchical Distributed Language Model. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou (eds.), Advances in Neural Information Processing Systems 21, pp. 1081–1088. Curran Associates, Inc., 2009. URL http://papers.nips.cc/paper/ 3583-a-scalable-hierarchical-distributed-language-model.pdf. 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. arXiv:1409.0575 [cs], September 2014. URL http://arxiv.org/abs/1409.0575. arXiv: 1409.0575. Yikang Shen, Shawn Tan, Chrisopher Pal, and Aaron Courville. Self-organized Hierarchical Softmax. arXiv:1707.08588 [cs], July 2017. URL http://arxiv.org/abs/1707.08588. arXiv: 1707.08588. Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex Alemi. Inception-v4, InceptionResNet and the Impact of Residual Connections on Learning. arXiv:1602.07261 [cs], February 2016. URL http://arxiv.org/abs/1602.07261. arXiv: 1602.07261. Bart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. YFCC100m: The New Data in Multimedia Research. Communications of the ACM, 59(2):64–73, January 2016. ISSN 00010782. doi: 10.1145/2812802. URL http://arxiv.org/abs/1503.01817. arXiv: 1503.01817. Nam Vo, Nathan Jacobs, and James Hays. Revisiting IM2gps in the Deep Learning Era. arXiv:1705.04838 [cs], May 2017. URL http://arxiv.org/abs/1705.04838. arXiv: 1705.04838. Tobias Weyand, Ilya Kostrikov, and James Philbin. Planet-photo geolocation with convolutional neural networks. In European Conference on Computer Vision, pp. 37–55. Springer, 2016. Bolei Zhou, Aditya Khosla, Agata Lapedriza, Antonio Torralba, and Aude Oliva. Places: An Image Database for Deep Scene Understanding. arXiv:1610.02055 [cs], October 2016. URL http: //arxiv.org/abs/1610.02055. arXiv: 1610.02055. 10 A T RAINING P ROCEDURE Images were divided at random into training and validation sets of 12.2M and 2.7M images and associated metadata, respectively. Validation data used for M1 was further sub-divided at random into training and validations sets for training time-based models (M2 and M3), so that no data used to train M1 was used to also train M2 and M3. A.1 M ODEL M1 Historically, softmax classification is shown to perform quite poorly when the number of output classes is large (Bengio & Sencal, 2003; Mnih & Hinton, 2009; Shen et al., 2017). During initial experiments with large meshes (> 4,000 mesh regions), a training procedure was developed to circumvent these challenges. Empirically, this procedure worked for training the large models presented in this paper; however, it is not demostrated to be ideal or that all steps are necessary for model training. This approach started by training the model, pre-trained on ImageNet (Russakovsky et al., 2014), with Adagrad (Duchi et al., 2011). Second, the number of training examples were increased each epoch by 6%, with the initial number of examples equal to the number of cells times 200. Third, the classes were biased by oversampling minority classes, such that all classes were initially equally represented. A consequence of this approach, however, is that the minority classes are seen repeatedly and therefore the majority classes have significantly more learned diversity. Fourth, the class bias was reduced after each model had completed a training cycle — previous weights loaded and the model re-trained with a reduced bias. The final model was trained with SGD, using a linearly decreasing learning rate reduced at 4% with each epoch, without class biasing and with the full dataset per epoch. The initial value of the learning rate varied for each model (between 0.004 and 0.02). The values of those hyperparameters were empirically determined. A.2 M ODEL M2 AND M3 The layers of M2 are described in Table 2. M2 is trained using He intializations ((He et al., 2015)), initial iterations of Adaboost(Freund & Schapire, 1995), followed by ADAM at learning rates of 0.005 and 0.001 (Kingma & Ba, 2014). Early stopping is used to detect a sustained decrease in validation accuracy (Caruana et al., 2001). B M1 F EATURE - BASED I MAGE R ETRIEVAL The generality of the M1 classification model is demonstrated by performing a query-by-example on the 2K random Im2GPS. An example of an image of the Church of the Savior on Spilled Blood is shown in Figure 4. By manual inspection (querying on the bounding box by GPS location), this church was not present in the training data nor in the 2K random dataset (Hays & Efros, 2008). C C LASS B IAS A NALYSIS Each image is given categorical indicator variable zik = 1 if the ith image is in the kth class, 0 otherwise. There exist a latent class distribution pi = P (Zi = 1) which is assumed constant between training, testing, and application. An estimate of this unknown distribution is 1 P p̂z = I(zij = 1). The second to last layer in all trained networks is assumed to N j∈Training be a fit logit for class i: Li = (L1i , ..., LKi ) for the ith image where K is the number P of classes in the mesh grid. The last layer output from networks is a softmax p̂m = exp(L )/ ik ik v exp(Liv ), where the mth index indicates model output given appropriate image input. Optimization is done P m by minimizing the cross entropy between p̂i and p̂m as − p̂ log p̂ . Images are given the class k i ik k Ŷi = arg maxv p̂m , ẑ = I( Ŷ = k). ik i v observed distribution of class frequencies in validation is q̂k = P 1 I(ẑik = 1). As a diagnostic we investigated how close the class |Validation| k∈Validation frequencies are to each other when both are calculated from the validation data. In general if two The 11 Figure 4: Fine-mesh based query-by-example on Im2GPS 2K random testing dataset for a qualitative assement for model generalization. The L2 distance is computed and shown below the top six queried results. models are compared we prefer the most accurate, but may also tilt toward unbiased models in classification distribution. If training has been done well, it should be the case that the KL-divergence P p̂k between q and p is low: k p̂k log . As a matter of completeness we also consider the entropy of q̂k p and q. 12
1cs.CV
arXiv:1710.07198v1 [cs.CV] 19 Oct 2017 Dress like a Star: Retrieving Fashion Products from Videos Noa Garcia George Vogiatzis Aston University, UK Aston University, UK [email protected] [email protected] Abstract This work proposes a system for retrieving clothing and fashion products from video content. Although films and television are the perfect showcase for fashion brands to promote their products, spectators are not always aware of where to buy the latest trends they see on screen. Here, a framework for breaking the gap between fashion products shown on videos and users is presented. By relating clothing items and video frames in an indexed database and performing frame retrieval with temporal aggregation and fast indexing techniques, we can find fashion products from videos in a simple and non-intrusive way. Experiments in a large-scale dataset conducted here show that, by using the proposed framework, memory requirements can be reduced by 42.5X with respect to linear search, whereas accuracy is maintained at around 90%. Figure 1: Fashion items in a popular TV show. difficult and it involves time-consuming searches. To help in the task of finding fashion products that appear in multimedia content, some websites, such as Film Grab4 or Worn on TV 5 , provide catalogs of items that can be seen on films and TV shows, respectively. These websites, although helpful, still require some effort before actually buying the fashion product: users need to actively remember items from videos they have previously seen and navigate through the platform until they find them. On the contrary, we propose an effortless, non-intrusive and fast computer vision tool for searching fashion items in videos. This work proposes a system for retrieving clothing products from large-scale collections of videos. By taking a picture of the playback device during video playback (i.e. an image of the cinema screen, laptop monitor, tablet, etc.), the system identifies the corresponding frame of the video sequence and returns that image augmented with the fashion items in the scene. In this way, users can find a product as soon as they see it by simple taking a photo of the video sequence where the product appears. Figure 1 shows a frame 1. Introduction Films and TV shows are a powerful marketing tool for the fashion industry, since they can reach thousands of millions of people all over the world and impact on fashion trends. Spectators may find clothing appearing in movies and television appealing and people’s personal style is often influenced by the multimedia industry. Also, online videosharing websites, such as YouTube1 , have millions of users generating billions of views every day2 and famous youtubers3 are often promoting the latest threads in their videos. Fashion brands are interested in selling the products that are advertised in movies, television or YouTube. However, buying clothes from videos is not straightforward. Even when a user is willing to buy a fancy dress or a trendy pair of shoes that appear in the latest blockbuster movie, there is often not enough information to complete the purchase. Finding the item and where to buy it is, most of the times, 1 https://www.youtube.com/ 2 https://www.youtube.com/yt/press/statistics.html 4 http://filmgarb.com/ 3 Users 5 https://wornontv.net who have gained popularity from their videos on YouTube 1 of a popular TV show along with its fashion items. Recently, many computer vision applications for clothing retrieval [14, 11] and style recommendation [24, 21] have been proposed. Our system is close to clothing retrieval approaches in that the aim is to retrieve a product from an image. Instead of retrieving products directly as in standard clothing retrieval, we propose to first retrieve frames from the video collection. There are several reasons for that. Firstly, in standard clothing retrieval users usually provide representative images of the object of interest (e.g. dresses in front view, high-heeled shoes in side view, etc.). In a movie, the view of the object of interest cannot be chosen, and items might be partially or almost completely occluded, such as the red-boxed dress in Figure 1. Secondly, standard clothing retrieval requires to select a bounding box around the object of interest. This is undesirable in clothing video retrieval as it may distract user’s attention from the original video content. Finally, performing frame retrieval instead of product retrieval in videos allows users to get the complete list of fashion items in a scene, which usually matches the character’s style, including small accessories such as earrings, watches or belts. Some of these items are usually very small, sometimes almost invisible, and would be impossible to detect and recognize using standard object retrieval techniques. Retrieving frames from videos is a challenging task in terms of scalability. An average movie of two hours duration may contain more than 200,000 frames. That means that with only five movies in the video dataset, the number of images in the collection might be over a million. To overcome scalability issues, we propose the combination of two techniques. Firstly, frame redundancy is exploited by tracking and summarizing local binary features [7, 20] into a key feature. Secondly, key features are indexed in a kd-tree for fast search of frames. Once the scene the query image belongs to is identified, the clothing items associated to that scene are returned to the user. The contributions of this paper are: • Introduction of the video clothing retrieval task and collection of a dataset of videos for evaluation. • Proposal of a fast and scalable video clothing retrieval framework based on frame retrieval and indexing algorithms. • Exhaustive evaluation of the framework, showing that similar accuracy to linear search can be achieved while the memory requirements are reduced by a factor of 42.5. This paper is structured as follows: related work is summarized in Section 2; the details of the proposed system are explained in Section 3; experiment setup and results are detailed in Section 4 and 5, respectively; finally, the conclusions are summarized in Section 6. 2. Related Work Clothing Retrieval. Clothing retrieval is the field concerned with finding similar fashion products given a visual query. In the last few years, it has become a popular field within the computer vision community. Proposed methods [14, 25, 13, 11, 12, 15] are mainly focused on matching realworld images against online catalog photos. In this crossscenario problem, some methods [25, 13, 15] train a set of classifiers to find items with similar attributes. Other approaches [14, 12, 11] model the differences across domains by using a transfer learning matrix [14] or a deep learning architecture [12, 11]. All these methods, however, perform clothing retrieval on static images, in which a representative and recognizable part of the item of interest is contained. In the scenario of clothing retrieval from films and television, fashion items are not always shown in a representative and recognizable way across the whole duration of the video due to object occlusions and changes in camera viewpoints. Given a snapshot of a video, an alternative solution is to first, identify the frame it belongs to and then, find the products associated to it. Scene Retrieval. Scene retrieval consists on finding similar frames or scenes from a video collection according to a query image. Early work, such as Video Google [22] and others [18, 9, 8], retrieve frames from video datasets by applying image retrieval methods and processing each frame independently. More recent scene retrieval approaches use temporal aggregation methods to improve scalability and reduce memory requirements. [2, 5] extract hand-crafted local features from frames, track them along time and aggregate them into a single vector. Other proposals [26, 3, 4] produce a single scene descriptor, which improves efficiency but involves a more difficult comparison against the static query image. Recently, Araujo et al. [4] showed that, in scene retrieval, methods based on hand-crafted features outperform convolutional neural networks. Similarly to [2], our approach is based on the aggregation of local features along temporal tracks. Instead of using SIFT features [16], we provide evidence that binary features [7, 20] are more appropriate for the task and that they can be easily indexed in a kd-tree for fast search. 3. Video Clothing Retrieval Framework To retrieve fashion products from movies, television and YouTube, we propose a framework based on frame retrieval and fast indexing techniques. Since the number of frames explodes with the number of movies available in a collection, a key feature of this framework is its scalability. The system overview is shown in Figure 2. There are three main modules: product indexing, training phase and query phase. The product indexing and the training phase are done offline, whereas the query phase is performed online. Product Indexing Offline Training phase Fashion Items Indexed Database Video Collection Feature Extraction Feature Tracking Shot Detection Key Feature Computation Key Feature Indexing Video Frames Online Output Query phase Retrieved Frame Feature Extraction Key Feature Search Shot Search Fashion Items Frame Search Query Image Figure 2: System overview. First, during the product indexing, fashion items and frames are related in an indexed database. Then, frames are indexed by using key features. Finally, in the query phase, query images are used to retrieve frames and find associated fashion items. In the product indexing, fashion items and frames from the video collection are related in an indexed database. This process can be done manually (e.g. with Amazon Mechanical Truck6 ) or semi-automatically with the support of a standard clothing retrieval algorithm. In the training phase, features are extracted and tracked along time. Tracks are used to detect shot boundaries and compute aggregated key features, which are indexed in a kd-tree. In the query phase, features extracted from the query image are used to find their nearest key features in the kd-tree. With those key features, the shot and the frame the query image belong to are retrieved. Finally, the fashion products associated with the retrieved frame are returned by the system. 3.1. Feature Extraction and Tracking Local features are extracted from every frame in the video collection and tracked across time by applying descriptor and spatial filters. The tracking is performed in a bidirectional way so features within a track are unique (i.e. each feature can only be matched with up to two features: one in the previous frame and one in the following frame). 6 https://www.mturk.com As local features, instead of the popular SIFT [16], we use binary features for two main reasons. Firstly, because Hamming distance for binary features is faster to compute than Euclidean distance for floating-points vectors. Secondly, because we find that binary features are more stable over time than SIFT, as can be seen in Figure 3. Convolutional neural network (CNN) features from an intermediate layer of a pre-trained network were also studied. However, their results were not satisfactory as the resulting tracked features quickly started to get confused when the dataset increased. 3.2. Shot Detection and Key Feature Computation Consecutive frames that share visual similarities are grouped into shots. The boundaries of different shots are detected when two consecutive frames have no common tracks. Each shot contains a set of tracks, each track representing the trajectory of a particular feature along time. We define a key feature as the aggregation of all the features in the same track into a single vector. Subsequently, each shot is then represented by a set of key features, similarly to how frames are represented by a set of features. For each track, a key feature is computed by using majorities [10]. Figure 4: Visual similarities between frames. Left: Query image. Middle: Ground truth frame. Right: Retrieved frame similar to ground truth frame, thus, Visual Match. FIFO queue we first explore the closest nodes to the root, because the corresponding bits exhibit more variability by construction of the tree. 3.4. Search Figure 3: Trajectories of sample tracks along a sequence of frames. Left: Binary features. Right: SIFT features. Binary features are more constant over time than SIFT features. 3.3. Key Feature Indexing A popular method for searching in binary feature space is FLANN [17]. FLANN uses multiple, randomly generated hierarchical structures and it is not obvious how it can be deployed across multiple CPUs in order to provide the scalability we are looking for. On the other hand, kd-trees are a formalism that has been shown to be highly parallelizable in [1]. In this work, we modify the basic kd-tree to handle binary features and index our key features. In a kd-tree each decision node has an associated dimension, a splitting value and two child nodes. If the value of a query vector in the associated dimension is greater than the splitting value, the vector is assigned to the left child. Otherwise, the vector is associated to the right child. The process is repeated at each node during the query phase until a leaf node is reached. In our case, as we are dealing with binary features, each decision node has an associated dimension, dim, such that all query vectors, v, with v[dim] = 1 belong to the left child, and all vectors with v[dim] = 0 belong to the right child. The value dim is chosen such that the training data is split more evenly in that node, i.e. its entropy is maximum. Note that this criterion is similar to the one used in the ID3 algorithm [19] for the creation of decision trees, but where the splitting attribute is chosen as the one with smallest entropy. Leaf nodes have as many as SL indices pointing to the features that ended up in that node. A first-in first-out (FIFO) queue keeps record of the already visited nodes to backtrack B times and explore them later. We use a FIFO queue to ensure that even if some of the bits in a query vector are wrong, the vector can reach its closest neighbours by exploring unvisited nodes latter. With the In the query phase, binary features are extracted from an input image and assigned to its nearest set of key features by searching down the kd-tree. Each key feature votes for the shot it belongs to. The set of frames contained in the most voted shot are compared against the input image by brute force, i.e. distances between descriptors in the query image and descriptors in the candidate frames are computed. The frame with minimum distance is retrieved. Shots are commonly groups of a few hundreds of frames, thus the computation can be performed very rapidly when applying the Hamming distance. Finally, all the fashion vectors associated with the retrieved frame are returned to the user. 4. Experiments Experimental Details. To evaluate our system a collection of 40 movies with more than 80 hours of video and up to 7 million frames is used. Query images are captured by a webcam (Logitech HD Pro Webcam C920) while movies are being played on a laptop screen. To provide a ground truth for our experiments, the frame number of each captured image is saved in a text file. Movies and queries have different resolutions and aspect ratios, thus all the frames and images are scaled down to 720 pixels in width. Binary features are computed by using ORB detector [20] and BRIEF extractor [7]. In the tracking module, only matches with a Hamming distance less than 20 and a spatial distance less than 100 pixels are considered, whereas in the key feature computation algorithm, only tracks longer than 7 frames are used. The default values for the kd-tree are set at SL = 100 and B = 50. Evaluation criteria. The aim of the system is to find the fashion products in the query scene, so we only retrieve one frame per query image. The returned frame may not be the same frame as the one in the annotated ground truth but one visually similar. As long as the retrieved frame shares strong similarities with the ground truth frame, we consider it as a Visual Match, as shown in Figure 4. To measure the visual similarities between two frames, we match SURF [6] BF KT KF Ours 85M 85M 25M 2M 2.53GB 2.53GB 762MB 61MB 0.90 0.91 0.92 0.94 0.92 0.93 B = 100 0.96 0.93 0.94 B = 250 0.97 0.93 0.94 Indexed Features Memory B = 10 (b) Figure 5: Precision of the evaluation method: (a) TPR and FPR curves; (b) Three ground truth frames (left column) and retrieved frames (right column) along with their score. features. The linear comparison between two frames that do not present any noise or perspective distortion is an easy task that almost all kinds of features can perform correctly. If the matching score between SURF features of two dataset frames is greater than a threshold, τ , they are considered to be visually similar. To measure the precision of this evaluation method, we manually annotate either if a pair of frames (i.e. ground truth frame and retrieved frame) is a Visual Match or not, along with its score. For different values of τ the True Positive Rate (TPR) as well as the False Positive Rate (FPR) are computed as: TPR = TP TP + FN FPR = FP FP + TN (1) where T P is the number of true positives (Visual Match with score > τ ), F P is the number of false positives (No Match with score > τ ), T N is the number of true negatives (No Match with score ≤ τ ) and F N is the number of false negatives (Visual Match with score ≤ τ ). Figure 5 shows both the TPR and the FPR computed with the annotations of 615 pairs of frames and 406 different values of τ . Among all the possible values, we chose τ = 0.15, with T P R = 0.98 and F P R = 0. Finally, the accuracy for a set of query images is computed as: Acc = No. Visual Matches Total No. Queries (2) 5. Experimental Results To evaluate the proposed framework, two different experiments are performed. In the first one, our frame retrieval system is compared against other retrieval systems. In the second one, the performance of the frame retrieval method when scaling up the video collection is evaluated in terms of accuracy. 5.1. Retrieval Performance First, we compare our system against other retrieval frameworks. Accuracy (a) B = 50 0.98 Table 1: Comparison between different systems on a single movie. Accuracy is shown for four backtracking steps, B. Our system achieves comparable results by using 42.5x less memory than BF and KT and 12.5x less memory than KF. BF. Brute Force matcher, in which query images are matched against all frames and all features in the database. Brute Force system is only used as an accuracy benchmark, since each query take, in average, 46 minutes to be processed. Temporal information is not used. KT. Kd-Tree search, in which all features from all frames are indexed using a kd-tree structure, similarly to [1]. Temporal information is not used. KF. Key Frame extraction method [23], in which temporal information is used to reduce the amount of frames of each shot into a smaller set of key frames. Key frames are chosen as the ones at the peaks of the distance curve between frames and a reference image computed for each shot. For each key frame, features are extracted and indexed in a kd-tree structure. We compare these three systems along with the method proposed here, using a single movie, The Devil Wears Prada, consisting of 196,572 frames with a total duration of 1 hour 49 minutes and 20 seconds. To be fair in our comparison, we use binary features in each method. The results of this experiment are detailed in Table 1. The performance is similar for the four systems. However, the amount of processed data and the memory requirements are drastically reduced when the temporal information of the video collection is used. In the case of our system, by exploiting temporal redundancy between frames, the memory is reduced by 42.5 times with respect to BF and KT and by 12.5 times with respect to the key frame extraction technique. Theoretically, that means that when implemented in a distributed kd-tree system as the one in [1], where the authors were able to process up to 100 million images, our system might be able to deal with 4,250 million frames, i.e. more than Title N. Frames N. Features N. Shots N. Key Features N. Queries Accuracy The Help 210387 101M 1726 2.2M 813 0.98 Intolerable Cruelty 179234 86M 1306 2M 544 0.97 Casablanca 147483 71M 881 1.5M 565 0.96 Witching & Bitching 163069 66M 4193 0.8M 588 0.74 Pirates of the Caribbean 3 241127 108M 3695 1.7M 881 0.74 Captain Phillips 190496 59M 7578 0.6M 618 0.67 7M 3040M 116307 58M 25142 0.87 Total Table 2: Summary of the results from the experiments on the dataset containing 40 movies. Due to space restrictions, only three of the best and worst accuracies are shown, along with the total results for the whole database. Pirates of the Caribbean 3 perform worst, as fewer descriptors can be found in those kinds of dimly lit images. Figure 6 shows the evolution of accuracy when the size of the database increases for five different movies. It can be seen that most of the movies are not drastically affected when the number of frames in the database is increased from 200,000 to 7 million. For example, both Intolerable Cruelty and 12 Years a Slave movies maintain almost a constant accuracy for different sizes of the collection. Even in the worst case scenario, The Devil Wears Prada movie, the loss in accuracy is less than a 8.5%. This suggests that our frame retrieval system is enough robust to handle largescale video collections without an appreciable loss in performance. Figure 6: Accuracy vs Database size for 5 different movies. 20,000 movies and 40,000 hours of video. 5.2. Large-scale Dataset In this experiment, we explore the scalability of our framework by increasing the dataset up to 40 movies and 7 million frames. The collection is diverse and it contains different movie genres such as animation, fantasy, adventure, comedy or drama, to ensure that a wide range of movies can be indexed and retrieved with the proposed algorithm. Table 2 shows the results of this experiment. It can be seen that, by using our temporal aggregation method, the amount of data is reduced from 7 million frames and 3,040 million features to only 116,307 shots and 58 million key features. Even so, the total number of key features in the 40 movie collection is still smaller than the 80 million features that, in average, a single movie contains. The total accuracy over the 40 movies is 0.87, reaching values of 0.98 and 0.97 in The Help and Intolerable Cruelty movies, respectively. Movies with very dark scenes such as Captain Phillips and 6. Conclusions This work proposes a framework to perform video clothing retrieval. That is, given a snapshot of a video, identify the video frame and retrieve the fashion products that appear in that scene. This task would help users to easily find and purchase items shown in movies, television or YouTube videos. We propose a system based on frame retrieval and fast indexing. Experiments show that, by using our temporal aggregation method, the amount of data to be processed is reduced by a factor of 42.5 with respect to linear search and accuracy is maintained at similar levels. The proposed system scales well when the number of frames is increased from 200,000 to 7 million. Similar to [1] our system can easily be parallelised across multiple CPUs. Therefore, the encouraging experimental results shown here indicate that our method has the potential to index fashion products from thousands of movies with high accuracy. In future work we intend to further increase the size of our dataset in order to identify the true limits of our approach. Furthermore it is our intention to make all data publicly available so that other researchers can investigate this interesting retrieval problem. References [1] M. Aly, M. Munich, and P. Perona. Distributed kd-trees for retrieval from very large image collections. British Machine Vision Conference, 2011. 4, 5, 6 [2] A. Anjulan and N. Canagarajah. Object based video retrieval with local region tracking. Signal Processing: Image Communication, 22(7), 2007. 2 [3] A. Araujo, J. Chaves, R. Angst, and B. Girod. Temporal aggregation for large-scale query-by-image video retrieval. In Image Processing (ICIP), 2015 IEEE International Conference on, pages 1519–1522. IEEE, 2015. 2 [4] A. Araujo and B. Girod. Large-scale video retrieval using image queries. IEEE Transactions on Circuits and Systems for Video Technology, 2017. 2 [5] A. Araujo, M. Makar, V. Chandrasekhar, D. Chen, S. Tsai, H. Chen, R. Angst, and B. Girod. Efficient video search using image queries. In Image Processing (ICIP), 2014 IEEE International Conference on, pages 3082–3086. IEEE, 2014. 2 [6] H. Bay, T. Tuytelaars, and L. Van Gool. SURF : Speeded Up Robust Features. European Conference on Computer Vision, pages 404–417, 2006. 4 [7] M. Calonder, V. Lepetit, C. Strecha, and P. Fua. BRIEF : Binary Robust Independent Elementary Features. ECCV, 2010. 2, 4 [8] D. Chen, N.-M. Cheung, S. Tsai, V. Chandrasekhar, G. Takacs, R. Vedantham, R. Grzeszczuk, and B. Girod. Dynamic selection of a feature-rich query frame for mobile video retrieval. In Image Processing (ICIP), 2010 17th IEEE International Conference on, pages 1017–1020. IEEE, 2010. 2 [9] O. Chum, J. Philbin, M. Isard, and A. Zisserman. Scalable near identical image and shot detection. In Proceedings of the 6th ACM international conference on Image and video retrieval, pages 549–556. ACM, 2007. 2 [10] C. Grana, D. Borghesani, M. Manfredi, and R. Cucchiara. A fast approach for integrating orb descriptors in the bag of words model. In IS&T/SPIE Electronic Imaging. International Society for Optics and Photonics, 2013. 3 [11] M. Hadi Kiapour, X. Han, S. Lazebnik, A. C. Berg, and T. L. Berg. Where to buy it: Matching street clothing photos in online shops. In ICCV, 2015. 2 [12] J. Huang, R. S. Feris, Q. Chen, and S. Yan. Cross-domain image retrieval with a dual attribute-aware ranking network. In Proceedings of the IEEE International Conference on Computer Vision, pages 1062–1070, 2015. 2 [13] Y. Kalantidis, L. Kennedy, and L.-J. Li. Getting the look: clothing recognition and segmentation for automatic product suggestions in everyday photos. In Proceedings of the 3rd ACM conference on International conference on multimedia retrieval, pages 105–112. ACM, 2013. 2 [14] S. Liu, Z. Song, G. Liu, C. Xu, H. Lu, and S. Yan. Street-toshop: Cross-scenario clothing retrieval via parts alignment and auxiliary set. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 3330–3337. IEEE, 2012. 2 [15] Z. Liu, P. Luo, S. Qiu, X. Wang, and X. Tang. Deepfashion: Powering robust clothes recognition and retrieval with rich annotations. In CVPR, 2016. 2 [16] D. G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2), 2004. 2, 3 [17] M. Muja and D. G. Lowe. Fast matching of binary features. Proceedings of the 2012 9th Conference on Computer and Robot Vision, 2012. 4 [18] D. Nistér and H. Stewénius. Scalable recognition with a vocabulary tree. CVPR, 2006. 2 [19] J. R. Quinlan. Induction of decision trees. Machine learning, 1(1):81–106, 1986. 4 [20] E. Rublee, V. Rabaud, K. Konolige, and G. Bradski. ORB: an efficient alternative to SIFT or SURF. In ICCV, 2011. 2, 4 [21] E. Simo-Serra, S. Fidler, F. Moreno-Noguer, and R. Urtasun. Neuroaesthetics in fashion: Modeling the perception of fashionability. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 869–877, 2015. 2 [22] J. Sivic and A. Zisserman. Video Google: a text retrieval approach to object matching in videos. ICCV, 2003. 2 [23] Z. Sun, K. Jia, and H. Chen. Video key frame extraction based on spatial-temporal color distribution. In Intelligent Information Hiding and Multimedia Signal Processing, 2008. IIHMSP’08 International Conference on, pages 196– 199. IEEE, 2008. 5 [24] A. Veit, B. Kovacs, S. Bell, J. McAuley, K. Bala, and S. Belongie. Learning visual clothing style with heterogeneous dyadic co-occurrences. In Proceedings of the IEEE International Conference on Computer Vision, pages 4642–4650, 2015. 2 [25] D. Wei, W. Catherine, B. Anurag, P.-m. Robinson, and S. Neel. Style finder: fine-grained clothing style recognition and retrieval, 2013. 2 [26] C.-Z. Zhu and S. Satoh. Large vocabulary quantization for searching instances from videos. In Proceedings of the 2nd ACM International Conference on Multimedia Retrieval, page 52. ACM, 2012. 2
7cs.IT
arXiv:1702.08615v1 [math.ST] 28 Feb 2017 Bridging Finite and Super Population Causal Inference Peng Ding∗, Xinran Li†, and Luke W. Miratrix‡ Abstract There are two general views in causal analysis of experimental data: the super population view that the units are an independent sample from some hypothetical infinite populations, and the finite population view that the potential outcomes of the experimental units are fixed and the randomness comes solely from the physical randomization of the treatment assignment. These two views differs conceptually and mathematically, resulting in different sampling variances of the usual difference-in-means estimator of the average causal effect. Practically, however, these two views result in identical variance estimators. By recalling a variance decomposition and exploiting a completeness-type argument, we establish a connection between these two views in completely randomized experiments. This alternative formulation could serve as a template for bridging finite and super population causal inference in other scenarios. Keywords: Completeness; Finite population correction; Potential outcome; Simple random sample; Variance of individual causal effects 1. Introduction Neyman (1923, 1935) defined causal effects in terms of potential outcomes, and proposed an inferential framework viewing all potential outcomes of a finite population as fixed and the treatment assignment as the only source of randomness. This finite population view allows for easy interpretation free of any hypothetical data generating process of the outcomes, and is used in a variety of contexts (e.g., Kempthorne 1952; Hinkelmann and Kempthorne 2008; Copas 1973; Rosenbaum ∗ Department of Statistics, University of California, Berkeley, California 94720 USA. Email: [email protected] † Department of Statistics, Harvard University, Cambridge, Massachusetts 02138 USA. Email: [email protected] ‡ Graduate School of Education and Department of Statistics, Harvard University, Cambridge, Massachusetts 02138 USA. Email: [email protected] 1 2002; Imai 2008; Freedman 2008a,b; Rosenbaum 2010; Aronow and Middleton 2013; Aronow et al. 2014; Abadie et al. 2014; Miratrix et al. 2013; Ding 2016; Lin 2013; Middleton and Aronow 2015; Imbens and Rubin 2015; Chiba 2015; Rigdon and Hudgens 2015; Li and Ding 2016). This approach is considered desirable because, in particular, it does not assume the data is somehow a representative sample of some larger (usually infinite) population. Alternative approaches, also using the potential outcomes framework, assume that the potential outcomes are independent and identical draws from a hypothetical infinite population. Mathematical derivations under this approach are generally simpler, but the approach itself can be criticized because of this typically untenable sampling assumption. Furthermore, this approach appears to ignore the treatment assignment mechanism. That being said, it is well known that the final variance formulae from either approach tend to be quite similar. For example, while the variance of the difference-in-means estimator for a treatmentcontrol experiment under an infinite population model is different from the one under Neyman (1923)’s finite population formulation, this difference is easily represented as a function of the variance of the individual causal effects. Furthermore, this difference term is unidentifiable and is often assumed away under a constant causal effect model (Neyman 1923, 1935; Hodges and Lehmann 1964; Rubin 1990; Reichardt and Gollob 1999; Freedman et al. 2007), or by appeals to the final estimators being “conservative.” Strictly speaking, the infinite population variance estimate gives a conservative (overly large) estimate of the finite population variance for the difference in means. As deriving infinite population variance expressions, relative to finite population variance expressions, tends to be more mathematically straightforward, we might naturally wonder if we could use infinite population expressions as conservative forms of finite population expressions more generally. In this work we show that in fact we can assume an infinite population model as an assumption of convenience, and derive formula from this perspective. This shows that we can thus consider the resulting formula as focused on the treatment assignment mechanism and not on a hypothetical sampling mechanism, i.e., we show variance derivations under the infinite population framework can be used as conservative estimators in a finite context. Mathematically, this result comes from a variance decomposition and a completeness-style argument that characterizes the connection and the difference between these two views. The vari2 ance decomposition we use has previously appeared in Imai (2008), Imbens and Rubin (2015), and Balzer et al. (2016). The completeness-style argument, which we believe is novel in this domain, then sharpens the variance decomposition by moving from an expression on an overall average relationship to one that holds for any specific sample. Our overall goal is simple: we wish to demonstrate that if one uses variance formula derived from assuming an infinite population sampling model, then the resulting inference one obtains will be correct with regards to the analogous samples-specific treatment effects (although it could be potentially conservative in that the standard errors may be overly large) regardless of the existence of any sampling mechanism. 2. Super Population, Finite Population, and Samples Assume that random variables (Y (1), Y (0)) represent the pair of potential outcomes of an infinite super population, from which we take an independent and identically distributed (IID) finite population of size n: S = {(Yi (1), Yi (0)) : i = 1, . . . , n}. We first discuss completely randomized experiments, and comment on other experiments in Section 4. For a completely randomized experiment, we randomly assign n1 units to receive treatment, leaving the remaining n0 = n − n1 units to receive control. Let Z = (Z1 , . . . , Zn ) ∈ {0, 1}n be the treatment assignment vector, which takes a particular value (z1 , . . . , zn ) ∈ {0, 1}n with probability P n1 !n0 !/n!, for any (z1 , . . . , zn ) ∈ {0, 1}n with ni=1 zi = n1 . The observed outcome for unit i is then Yiobs = Zi Yi (1) + (1 − Zi )Yi (0). At the super population level, the average potential outcomes are E{Y (1)} and E{Y (0)}, and the average causal effect is τ = E{Y (1) − Y (0)}. The population variances of the potential outcomes and individual causal effect are V1 = Var{Y (1)}, V0 = Var{Y (0)}, Vτ = Var{Y (1) − Y (0)}. At the finite population level, i.e., for a fixed sample S, the average potential outcomes and 3 average causal effect are n Ȳ1 = 1X Yi (1), n n Ȳ0 = i=1 1X Yi (0), n τS = Ȳ1 − Ȳ0 . i=1 The corresponding finite population variances of the potential outcomes and individual causal effects are n S12 = 1 X {Yi (1) − Ȳ1 }2 , n−1 i=1 n S02 = 1 X {Yi (0) − Ȳ0 }2 , n−1 n Sτ2 = i=1 1 X (τi − τ )2 , n−1 i=1 where we use the divisor n − 1 following the tradition of survey sampling (Cochran 1977). All these quantities are fully dependent on S. In classical casual inference (Neyman 1923), the potential outcomes of these n experimental units, S, are treated as fixed numbers. Equivalently, we can consider such causal inference to be conducted conditional on S (e.g., Copas 1973; Rosenbaum 2002; Imbens and Rubin 2015; Rigdon and Hudgens 2015; Chiba 2015). Regardless, we have two parameters—the population average treatment effect τ , and the sample average treatment effect τS . After collecting the data, we would want to draw inference about τ or τS . Our primary statistics are the averages of the observed outcomes and the difference-in-means estimator: Ȳ1obs = n 1 X Zi Yiobs , n1 Ȳ0obs = i=1 n 1 X (1 − Zi )Yiobs , n0 i=1 τb = Ȳ1obs − Ȳ0obs . We also observe the sample variances of the outcomes under treatment and control using n s21 1 X = Zi (Yiobs − Ȳ1obs )2 , n1 − 1 n s20 i=1 1 X = (1 − Zi )(Yiobs − Ȳ0obs )2 . n0 − 1 i=1 We do not have the sample analogue of Sτ2 or Vτ because Yi (1) and Yi (0) are never jointly observed for any unit i in the sample. We summarize the infinite population, finite population and sample quantities in Table 1. 4 Table 1: Means and variances at the super population, finite population and sample levels. super population finite population sample 3. treatment E{Y (1)} Ȳ1 Ȳ1obs means control effect E{Y (0)} τ = E{Y (1) − Y (0)} Ȳ0 τS = Ȳ1 − Ȳ0 Ȳ0obs τb = Ȳ1obs − Ȳ0obs variances treatment control V1 V0 S12 S02 s21 s20 effect Vτ Sτ2 − Deriving Complete Randomization Results with an Independent Sampling Model The three levels of quantities in Table 1 are connected via independent sampling and complete randomization. Neyman (1923), without reference to any infinite population and by using the assignment mechanism as the only source of randomness, represented the assignment mechanism via an urn model, and found Var(b τ | S) = S12 S02 Sτ2 + − . n1 n0 n (1) He then observed that the final term was unidentifiable but nonnegative, and thus if we dropped it we would obtain an upper bound of the estimator’s uncertainty. We next derive this result by assuming a hypothetical sampling mechanism from some assumed infinite super-population model of convenience. This alternative derivation of the above result, which can be extended to other assignment mechanisms, shows how we can interpret formulae based on super-population derivations as conservative formulae for finite-sample inference. 3.1. Sampling and randomization To begin, note that IID sampling of S from the super population implies three things: first, the finite population average causal effect τS satisfies E(τS ) = τ , second # n Vτ 1X {Yi (1) − Yi (0)} = , Var(τS ) = Var n n " i=1 5 (2) and third, the sample variances are unbiased for the true variances: E(S12 ) = V1 , E(S02 ) = V0 , E(Sτ2 ) = Vτ . (3) Conditional on S, randomization of the treatment Z is the only source of randomness. In a completely randomized experiment, the outcomes in the treatment group form a simple random sample of size n1 from {Yi (1) : i = 1, . . . , n}, and the outcomes in the control group form a simple random sample of size n0 from {Yi (0) : i = 1, . . . , n}. Therefore, classical survey sampling theory (Cochran 1977) for the sample mean and variance gives E(Ȳ1obs | S) = Ȳ1 , E(Ȳ0obs | S) = Ȳ0 , E(b τ | S) = τS , E(s21 | S) = S12 , E(s20 | S) = S02 . (4) We do not use the notation ES (·), because, depending on the contexts, such notation could either indicate expectation conditional on S or expectation averaged over S. We therefore use conditional expectations and conditional variances explicitly. If we do not condition on S, then the independence induced by the assignment mechanism means the outcomes under treatment are IID samples of Y (1) and the outcomes under control are IID samples of Y (0), and furthermore these samples are independent of each other. This independence makes it straightforward to show that τb is unbiased for τ with super population variance Var(b τ ) = Var(Ȳ1obs ) + Var(Ȳ0obs ) = V1 V0 + . n1 n0 (5) This is the classic infinite population variance formula for the two sample difference-in-means statistic. We could use it to obtain standard errors by plugging in s21 and s20 for the two variances. This derivation, from (2)–(5), is motivated by the sampling assumption: the assignment mechanism makes the two samples independent, but it is the IID assumption and classic sampling theory that gives this result (along with asymptotical normality which allows for associated testing and confidence interval generation). 6 3.2. Connecting the finite and infinite population inference with a variance decomposition We will now extend the above to indirectly derive the result on the variance of τb in finite popula- tion inference without explicitly enumerating the potential outcomes. The variance decomposition formula implies Var(b τ ) = E{Var(b τ | S)} + Var{E(b τ | S)} (6) = E{Var(b τ | S)} + Var(τS ) = E{Var(b τ | S)} + Vτ , n (7) which further implies that the finite population variance of τb satisfies (using (3)) E {Var(b τ | S)} = Var(b τ) − Vτ V1 V0 Vτ = + − =E n n1 n0 n  S12 S02 Sτ2 + − n1 n0 n  . (8) Compare to the classic variance expression (1), which is this without the expectation. Here we have that on average our classic variance expression holds. Now, because this is true for any infinite population, as it is purely a consequence of the IID sampling mechanism and complete randomization, we can close the gap between (1) and (8). Informally speaking, because (8) holds as an average over many hypothetical super populations, it should also hold for any finite population at hand, and indeed it does, as we next show using a “completeness” concept from statistics (Lehmann and Romano 2008). 3.3. A “Completeness” argument First, define f (S) ≡ S12 S02 Sτ2 + − − Var(b τ | S), n1 n0 n (9) a function of a fixed finite sample S, as the difference of the hypothesized finite sample variance formula and the actual finite sample variance. Formula (8) shows E{f (S)} = 0. Now we are going to show the stronger result f (S) = 0. 7  For any given sample S, we have fixed sample quantities: U = Y1 (1) − Ȳ1 , . . . , Yn (1) − Ȳ1 ,  and W = Y1 (0) − Ȳ0 , . . . , Yn (0) − Ȳ0 . Some algebra gives τb − τS = n n 1 X 1 X Zi Ui − (1 − Zi )Wi . n1 n0 i=1 (10) i=1 According to (10), the finite population variance Var(τ̂ | S) = E{(τ̂ − τS )2 | S} must be a quadratic form of (U, W ). Therefore, from (9), f (S) must be a quadratic form of (U, W ), and therefore must have the following expression: f (S) = n n X X aij Ui Uj + n n X X bij Wi Wj + cij Ui Wj . i=1 j=1 i=1 j=1 i=1 j=1 n n X X for some aij , bij and cij . f (S) is the same regardless of the ordering of units, so by symmetry the constants aij , bij and cij must be the same regardless of i and j. This gives aii = a11 , aij = a12 , bii = b11 , bij = b12 , cii = c11 , cij = c12 , for all i 6= j. Thus f (S) =a11 n X Uj2 + a12 i=1 Because XX Ui Uj + b11 i=1 Ui Ui2 + i=1 n X i=1 Pn Wi2 i=1 Wi + + b12 XX Wi Wj + c11 n X Ui Wi + c12 i=1 i6=j XX Ui W j . i6=j = 0, we have n X Similarly, as Wi2 i=1 i6=j Pn n X XX Ui Uj = n X Ui i=1 i6=j !2 = 0. = 0, we have XX Wi Wj = 0, n X Ui Wi + i=1 i6=j XX Ui W j = n X i=1 i6=j Ui ! n X i=1 Wi ! = 0. Use the above to replace our cross terms of i 6= j with single index terms to write f (S) as f (S) =a n X i=1 Ui2 + b n X i=1 Wi2 + c n X Ui Wi , i=1 where a = a11 − a12 , b = b11 − b12 , and c = c11 − c12 . Because E{f (S)} = 0, we have aE(U12 ) + 8 aE(W12 ) + cE(U1 W1 ) = 0, where E(U12 ) = n−1 n−1 n−1 Var{Y (1)}, E(W12 ) = Var{Y (0)}, E(U1 W1 )2 = Cov{Y (1), Y (0)}. n n n Thus, aVar{Y (1)} + bVar{Y (0)} + cCov{Y (1), Y (0)} = 0. (11) Because (11) holds for any populations regardless of its values of Var{Y (1)}, Var{Y (0)} and Cov{Y (1), Y (0)}, it must be true that a = b = c = 0, which implies f (S) = 0. 4. Discussion Equation (8) relies on the assumption that the hypothetical infinite population exists, but Equation (1) does not. However, the completeness-style argument allowed us to make our sampling assumption only for convenience in order to prove (1) by, in effect, dropping the expectation on both sides of (8). Similar argument exists in the classical statistics literature; see Efron and Morris (1973) for the empirical Bayes view of Stein’s estimator. While the final result is, of course, not new, we offer it as it gives an alternative derivation that does not rely on asymptotics such as a growing superpopulation or a focus on the properties of the treatment assignment mechanism. Using Freedman (2008a)’s results, Aronow et al. (2014) considered a super population with N units, with the finite population being a simple random sample of size n. Letting N → ∞, we can obtain similar results. We go in the other direction: we use the variance decomposition (6) to derive the finite population variance from the super population one. This decomposition approach also holds for other types of experiments. First, for a stratified experiment, each stratum is essentially a completely randomized experiment. Apply the result to each stratum, and then average over all strata to obtain results for a stratified experiment. Second, because a matched-pair experiment is a special case of a stratified experiment with two units within each stratum, we can derive the Neyman-type variance (cf. Imai 2008; Imbens and Rubin 2015) directly from that of a stratified experiment. Third, a cluster-randomized experiment is a completely randomized experiment on the clusters. If the causal parameters can be expressed as 9 cluster-level outcomes, then the result can be straightforwardly applied (cf. Aronow and Middleton 2013; Middleton and Aronow 2015). Fourth, for general experimental designs, the variance decomposition in (6) still holds, and therefore we can modify the derivation of the finite population variance according to different forms of (4) and (5). In a completely randomized experiment, the finite population sampling variance of τb in (1) de- pends on three terms: the first two can be unbiasedly estimated by s21 /n1 and s20 /n0 , but the third term Sτ2 /n is unidentifiable from the data. Assuming a constant causal effect model, Sτ2 = 0 and the variance estimators under both finite and super population inference coincide. However, Robins (1988), Aronow et al. (2014) and Ding and Dasgupta (2016) demonstrated that the treatment variation term Sτ2 has a sharp lower bound that may be larger than 0, which allows for more precise variance estimators under the finite population view. This demonstrates that we can indeed make better inference conditional on the sample we have. On the other hand, in this work, we showed that assuming an infinite population, while not necessarily giving the tightest variance expressions, nonetheless gives valid (conservative) variance expressions from a finite-population perspective. We offer this approach as a possible method of proof that could ease derivations for more complex designs. More broadly, it is a step towards establishing that infinite population derivations for randomized experiments can be generally thought of as pertaining to their finite population analogs. Also see Samii and Aronow (2012) and Lin (2013), who provide alternative discussions of super population regression-based variance estimators under the finite population framework. Our discussion is based on the frequentists’ repeated sampling evaluations of the difference-inmeans estimator for the average causal effect. In contrast, Fisher (1935) proposed the randomization test against the sharp null hypothesis that Yi (1) = Yi (0) for all units, which is numerically the same as the permutation test for exchangeable units sampled from an infinite population (Lehmann and Romano 2008). This connection becomes more apparent when only the ranks of the outcomes are used to construct the test statistics, as discussed extensively by Lehmann (1975). Acknowledgments We thank the Associate Editor, Dr. Peter Aronow, and three anonymous reviewers for helpful comments. 10 References Abadie, A., Athey, S., Imbens, G. W., and Wooldridge, J. M. (2014). Finite population causal standard errors. Technical report, National Bureau of Economic Research. Aronow, P. M., Green, D. P., and Lee, D. K. K. (2014). Sharp bounds on the variance in randomized experiments. The Annals of Statistics, 42:850–871. Aronow, P. M. and Middleton, J. A. (2013). A class of unbiased estimators of the average treatment effect in randomized experiments. Journal of Causal Inference, 1:135–154. Balzer, L. B., Petersen, M. L., and Laan, M. J. (2016). Targeted estimation and inference for the sample average treatment effect in trials with and without pair-matching. Statistics in Medicine, 35:3717–3732. Chiba, Y. (2015). Exact tests for the weak causal null hypothesis on a binary out come in randomized trials. Journal of Biometrics and Biostatistics, 6:doi:10.4172/2155–6180.1000244. Cochran, W. G. (1977). Sampling Techniques. John Wiley & Sons, 3rd edition. Copas, J. (1973). Randomization models for the matched and unmatched 2 × 2 tables. Biometrika, 60:467–476. Ding, P. (2016). A paradox from randomization-based causal inference (with discussion). Statistical Science, in press. Ding, P. and Dasgupta, T. (2016). A potential tale of two by two tables from completely randomized experiments. Journal of American Statistical Association, 111:157–168. Efron, B. and Morris, C. (1973). Stein’s estimation rule and its competitors—an empirical bayes approach. Journal of the American Statistical Association, 68:117–130. Fisher, R. A. (1935). The Design of Experiments. Edinburgh, London: Oliver and Boyd, 1st edition. Freedman, D., Pisani, R., and Purves, R. (2007). Statistics. W. W. Norton & Company, 4th edition. Freedman, D. A. (2008a). On regression adjustments in experiments with several treatments. The Annals of Applied Statistics, 2:176–196. 11 Freedman, D. A. (2008b). Randomization does not justify logistic regression. Statistical Science, 23:237–249. Hinkelmann, K. and Kempthorne, O. (2008). Design and Analysis of Experiments, Volume 1: Introduction to Experimental Design. New Jersey: John Wiley & Sons, Inc., 2nd edition. Hodges, J. L. J. and Lehmann, E. L. (1964). Basic Concepts of Probability and Statistics. San Francisco: Holden-Day. Imai, K. (2008). Variance identification and efficiency analysis in randomized experiments under the matched-pair design. Statistics in Medicine, 27:4857–4873. Imbens, G. W. and Rubin, D. B. (2015). Causal Inference for Statistics, Social and Biometrical Sciences: An Introduction. Cambridge: Cambridge University Press. Kempthorne, O. (1952). The Design and Analysis of Experiments. New York: John Wiley and Sons. Lehmann, E. L. (1975). Nonparametrics: Statistical Methods Based on Ranks. San Francisco: Holden-Day, 1st edition. Lehmann, E. L. and Romano, J. P. (2008). Testing Statistical Hypotheses. New York : Wiley, 3rd edition. Li, X. and Ding, P. (2016). Exact confidence intervals for the average causal effect on a binary outcome. Statistics in Medicine, 35:957–960. Lin, W. (2013). Agnostic notes on regression adjustments to experimental data: Reexamining Freedman’s critique. The Annals of Applied Statistics, 7:295–318. Middleton, J. A. and Aronow, P. M. (2015). Unbiased estimation of the average treatment effect in cluster-randomized experiments. Statistics, Politics and Policy, 6:39–75. Miratrix, L. W., Sekhon, J. S., and Yu, B. (2013). Adjusting treatment effect estimates by poststratification in randomized experiments. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 75:369–396. 12 Neyman, J. (1923). On the application of probability theory to agricultural experiments. essay on principles (with discussion). section 9 (translated). reprinted ed. Statistical Science, 5:465–472. Neyman, J. (1935). Statistical problems in agricultural experimentation (with discussion). Supplement to the Journal of the Royal Statistical Society, 2:107–180. Reichardt, C. S. and Gollob, H. F. (1999). Justifying the use and increasing the power of a t test for a randomized experiment with a convenience sample. Psychological Methods, 4:117–128. Rigdon, J. and Hudgens, M. G. (2015). Randomization inference for treatment effects on a binary outcome. Statistics in Medicine, 34:924–935. Robins, J. M. (1988). Confidence intervals for causal parameters. Statistics in Medicine, 7:773–785. Rosenbaum, P. R. (2002). Observational Studies. New York: Springer, 2nd edition. Rosenbaum, P. R. (2010). Design of Observational Studies. New York: Springer. Rubin, D. B. (1990). Comment: Neyman (1923) and causal inference in experiments and observational studies. Statistical Science, 5:472–480. Samii, C. and Aronow, P. M. (2012). On equivalencies between design-based and regression-based variance estimators for randomized experiments. Statistics and Probability Letters, 82:365–370. 13
10math.ST
1 Superadditivity in trade-off capacities of quantum channels arXiv:1708.04314v2 [quant-ph] 16 Aug 2017 Elton Yechao Zhu, Quntao Zhuang, Min-Hsiu Hsieh, Senior Member, IEEE, and Peter W. Shor Abstract—In this article, we investigate the additivity phenomenon in the dynamic capacity of a quantum channel for trading classical communication, quantum communication and entanglement. Understanding such additivity property is important if we want to optimally use a quantum channel for general communication purpose. However, in a lot of cases, the channel one will be using only has an additive single or double resource capacity, and it is largely unknown if this could lead to an superadditive double or triple resource capacity. For example, if a channel has an additive classical and quantum capacity, can the classical-quantum capacity be superadditive? In this work, we answer such questions affirmatively. We give proof-of-principle requirements for these channels to exist. In most cases, we can provide an explicit construction of these quantum channels. The existence of these superadditive phenomena is surprising in contrast to the result that the additivity of both classical-entanglement and classical-quantum capacity regions imply the additivity of the triple capacity region. Index Terms—Additivity; Quantum Channel Capacity; Tradeoff Capacity Regions; Quantum Shannon theory. I. I NTRODUCTION N studying classical communication, Shannon developed powerful probabilistic tools that connect the theoretic throughput of a channel to an entropic quantity defined on a single use of the channel [1]. Shannon’s noiseless channel coding theorem involves a random coding strategy to prove achievability and entropic inequalities that show optimality, i.e., the converse. This methodology has now become standard in proving finite or asymptotic optimal resource conversions in information theory. Quantum Shannon information starts by mimicking classical information theory: typical sets can be generalized to typical subspaces to prove achievability while various entropic inequalities, such as the quantum data processing inequality, can be used to prove the converse. However, the differences between quantum and classical Shannon information are also significant. On one hand, additional resources available in the quantum domain diversify the allowable capacities, resulting in I E.Y. Zhu is with the Center of Theoretical Physics and Department of Physics, Massachusetts Institute of Technology, Cambridge, MA, 02139 USA (e-mail: [email protected]). Q. Zhuang is with the Research Laboratory of Electronics and Department of Physics, Massachusetts Institute of Technology, Cambridge, MA, 02139 USA (e-mail: [email protected]). Min-Hsiu Hsieh is with the Centre of Quantum Software and Information (UTS |QSIi), University of Technology Sydney, Australia (e-mail: [email protected]). P.W. Shor is with the Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA, 02139 USA (e-mail: [email protected]). trade-off regions for the resources that are consumed or generated [2]–[4]. The most common, and useful, quantum resource in communication settings is quantum entanglement. Unlike classical shared randomness, which does not increase a classical channel’s capability to send more messages, preshared quantum entanglement will generally increase the throughput of a quantum channel for sending classical messages or quantum messages or both [2], [5]–[9]. It thus makes sense to consider the trade-off capacity regions among these three useful resources: entanglement, classical communication, and quantum communication, and this was done in Ref. [4]. The result in Ref. [4] further shows that a coding strategy that exploits the channel coding of these three resources as a whole performs better than strategies that do not take advantage of channel coding. On the other hand, single-lettered channel capacity formulas in the classical regime generally become intractable regularized capacity formulas in the quantum regime [10]– [14]. In other words, evaluation of these capacity quantities requires optimizing channel inputs over an arbitrary finite number of uses of a given channel. This largely blocks our understanding of how quantum channels behave. An extreme example shows the existence of two quantum channels that cannot be used to send a quantum message individually but will have a positive channel capacity when both are used simultaneously [15]. However, there are also several examples showing that when additional resources are used to assist, the corresponding assisted capacity will also become additive. The classical capacity over quantum channels is generally superadditive; however, when assisted by a sufficient amount of entanglement, the entanglement-assisted capacity becomes additive [6], [16]. The quantum capacity also exhibits similar properties. When assisted by either entanglement [2], [3] or an unbounded symmetric side channel [17], its assisted quantum capacity becomes additive. This superadditive property of quantum channel capacities has accordingly attracted significant attention. Hastings [18] proved that the classical capacity over quantum channels is not additive, a result built upon earlier developments by HaydenWinter [19] and Shor [20]. Recently, three of us showed a rather perplexing result [21]: when assisted by an insufficient amount of entanglement, a channel’s classical capacity could be superadditive regardless of whether the unassisted classical capacity is additive or not. Further, the additive property of the entanglement-assisted classical capacity shows a form of phase transition. Even if the channel is additive when assisted by a sufficient amount of entanglement or no entanglement at all, it can still be superadditive when assisted with an insuf- 2 ficient amount of entanglement. This phenomenon indicates that quantum channels behave fundamentally differently from classical channels, and our understanding of it is still quite limited. This paper is inspired by, and aims to extend Ref. [21]. Will additivity of single or double resource capacities always lead to additivity of a general resource trade-off region? We will study superadditi vity in a general framework that considers the three most common resources of: entanglement, noiseless classical communication and quantum communication. Our results show that (i) additivity of single resource capacities of a quantum channel does not generally imply additivity of double resource capacities, except for the known result [2] that an additive quantum capacity yields an additive entanglementassisted quantum capacity region (see Table I); and (ii) additive double resource capacities does not generally imply an additive triple resource capacity, except for the known case [8] that additive classical-entanglement and classical-quantum capacity regions yield an additive triple dynamic capacity (see Table II). These results again demonstrate how complex a quantum channel can be, and further investigation is required. The paper is structured as follows. Section II introduces the various definitions, notations and previous results on the triple resource quantum Shannon theory. Section III summarizes the various superadditivity results that we establish in the paper. Section IV establishes the switch channel that we use for all our constructions, and how this reduces the triple resource trade-off formula. Section V gives a detailed construction of all the possible superadditivity phenomena. II. P RELIMINARIES In this section, we give definitions of basic entropic quantities used in the paper. We also describe the dynamic capacity theorem. Special cases of this include the various single and double resource capacities. Finally, we define the elementary channels that will be used in our explicit constructions. A bipartite quantum state σAB is a positive semi-definite matrix in Hilbert space H A ⊗ H B with trace one. We define the von Neumann entropy, conherent information and quantum mutual information of σAB , respectively, as follows: S(AB)σ = −Tr [σAB log σAB ], I(AiB)σ = S(B)σ − S(AB)σ, I(A; B)σ = S(A)σ + I(AiB)σ, where S(A)σ is the von Neumann entropy of the reduced state σA = TrB [σAB ]. x } For an ensemble {p(x), σAB x ∈X , let Õ x σX AB = p(x)|xihx|X ⊗ σAB , x ∈X where {|xi} forms a fixed orthonormal (computational) basis in Hilbert Space HX . We need the following information quantities as well: Õ I(AiBX)σ = p(x)I(AiB)σx , (1) I(A; B|X)σ = x Õ p(x)I(A; B)σx , (2) I(X; B)σ + I(A; B|X)σ, (3) x I(AX; B)σ = where I(AiBX)σ and I(A; B|X) in Eqs. (1) and (2) are the conditional coherent information and the conditional mutual information, respectively. I(X; B)σ in Eq. (3) is the Holevo information of σX B = Tr A[σX AB ]. A quantum channel N is a completely positive and tracepreserving map. With it, we can transmit either classical or quantum information or both with possible entanglement assistance between the sender and the receiver [8]. More generally, the authors in Ref. [4] proved the following capacity theorem that involves a noisy quantum channel N and the three resources mentioned above; namely, classical communication (C), quantum communication (Q) and quantum entanglement (E). Theorem 1 (CQE trade-off [4]): The dynamic capacity region CCQE (N ) of a quantum channel N is equal to the following expression: CCQE (N ) = ∞ Ø  1 (1) CCQE N ⊗k , k k=1 where the overbar indicates the closure of a set. The region (1) CCQE (N ) is equal to the union of the state-dependent regions (1) CCQE,σ (N ): (1) CCQE (N ) ≡ The state-dependent region C, Q and E, such that Ø σ (1) CCQE,σ (N ) . (1) CCQE,σ (N ) is the set of all rates C + 2Q ≤ I(AX; B)σ, (4) Q + E ≤ I(AiBX)σ, (5) C + Q + E ≤ I(X; B)σ + I(AiBX)σ . (6) The above entropic quantities are with respect to a classicalquantum state (cq state) σX AB , where Õ  σX AB ≡ p(x) |xi hx| X ⊗ NA0 →B φ xAA0 , (7) x φ xAA0 and the states are pure. We say that the dynamic capacity of a channel N is additive if (1) CCQE (N ) = CCQE (8) (N ) . The dynamic capacity region CCQE (N ) in Theorem 1 allows us to recover known capacity theorems by choosing certain (C, Q, E) in Eqs. (4)-(6) as follows: • the classical capacity CC (N ) when choosing Q = E = 0 [10], [11]; • the quantum capacity CQ (N ) when choosing C = E = 0 [12]–[14]; • the classical and quantum capacity CCQ (N ) when choosing E = 0 (CQ trade-off) [22]; • the entanglement assisted classical capacity CCE (N ) when choosing Q = 0 (CE trade-off) [7], [16]; • the entanglement assisted quantum capacity CQE (N ) when choosing C = 0 (QE trade-off) [2], [3]; Additivity of these special cases follows similarly from Eq. (8). We note that the dynamic capacity region is concave, as a convex combination of any two points in the region can be 3 achieved by a time-sharing strategy, i.e., using the channel for a fraction of uses to achieve one point, and using it for the other fraction to achieve the second point. Below we will briefly describe a few channels which we will repeatedly use. Definition 2: A Hadamard channel is a quantum channel whose complementary channel is entanglement breaking. Suppose Ψ A0 →B is a Hadamard channel, with the complementary channel ΨcA0 →E . Then there is a degrading map DB→E such that ΨcA0 →E = DB→E ◦ Ψ A0 →B . Moreover, D can be decomposed as 1 2 DB→E = DY→E , ◦ DB→Y where Y is a classical variable. A Hadamard channel has an additive quantum dynamic capacity region, when tensored with an arbitrary quantum channel [23]. Examples of Hadamard channels include the qubit dephasing channel, 1 → N cloning channels, and the Unruh channel. We’ll define the qubit dephasing channel below, but refrain from giving definitions of other Hadamard channels, since their exact forms are not needed for understanding this work. We refer the interested readers to Ref. [23] for more details and properties of these channels. dph Definition 3: The qubit dephasing channel Ψη , with dephasing probability η, is defined as dph Ψη (ρ) = (1 − η)ρ + ηZ ρZ. Imply the additivity of CE CQ QE N [21] N [25] N [25] N (SecV-C) N (SecV-C) Y [3] N (SecV-B) N (SecV-D) Y[3] TABLE I S UMMARY OF RESULTS FOR DOUBLE RESOURCES .“N” STANDS FOR “ DOES NOT IMPLY ADDITIVITY ”, WHILE “Y” MEANS “ IMPLIES ADDITIVITY ”. Additive capacities C Q C,Q⇔ C,QE Imply the additivity of Additive capacities CQE QE N (SecV-C) CQ N (SecV-G) CE N (SecV-E) CE,Q⇔CE,QE N (SecV-F) CE,CQ Y[8] TABLE II S UMMARY OF RESULTS FOR TRIPLE RESOURCES . “N” STANDS FOR “ DOES NOT IMPLY ADDITIVITY ”, WHILE “Y” MEANS “ IMPLIES ADDITIVITY ”. III. S UMMARY OF R ESULTS We summarize all of our results here. We will denote the single capacity region by a single letter, e.g. C for CC (N ). We will also use short notation for double and triple tradeoff regions, e.g. CE for CCE (N ) and CQE for CCQE (N ). We will use the arrow notation, with “→” meaning additivity of the left-hand side capacity implies additivity of the right-hand side capacity, and “6→” meaning additivity of the left-hand side capacity does not imply additivity of the right-hand side capacity. dpo Definition 4: The qubit depolarizing channel Ψp , with depolarizing probability p, is defined as I dpo Ψp (ρ) = (1 − p)ρ + p . 2 The qubit depolarizing channel is known to have an additive classical capacity [24], but a superadditive quantum capacity [25]. Definition 5: A random orthogonal channel Ψro is defined as D Õ | Ψro (ρ) = Pi Oi ρOi , i=1 where Oi are chosen from the orthogonal group and the probabilities Pi are roughly equal. For 1  D  N, with N the input dimension, such a channel will have a subadditive minimum output entropy with high probability [18]. Definition 6: Consider an arbitrary channel ΨC→B . Append a register R to the input, with a set of orthonormal bases {| ji} and |R| = |B| 2 . We define its unitally extended channel [20], [26] ΦRC→B as Õ ΦRC→B (ρRC ) = X( j)ΨC→B (h j | ρRC | ji R ) X( j)†, (9) A. Double resources (see table I) 1) CE: a) C 6→ CE [21]: There exists a quantum channel N , such that its classical capacity is additive, but its CE trade-off capacity region is superadditive. We will give a simplified construction in Sec V-A. b) C, Q 6→ CE: There exists a quantum channel N , such that its classical and quantum capacities are both additive, but its CE trade-off capacity region is superadditive, i.e.,, ∃ a quantum channel N s.t. CC (N ) = CC(1) (N ) and (1) CQ (N ) = CQ (N ) but (1) CCE (N ) ) CCE (N ) . j where {X( j) : j ∈ {1, . . . , |R|}} are the Heisenberg-Weyl operators. The unital extension of a random orthogonal channel will have a superadditive classical capacity with high probability [20]. An explicit construction of N is given in Sec V-B. 2) Q → QE [3]: For all quantum channels N , if its quantum capacity is additive, then its QE trade-off capacity region is always additive. 4 3) CQ: a) C 6→ CQ [25]: There exists a quantum channel N , such that its classical capacity is additive, but its CQ tradeoff capacity region is superadditive. The depolarizing channel has a superadditive quantum capacity and hence a superadditive CQ trade-off capacity, while its classical capacity is additive. b) Q 6→ CQ: There exists a quantum channel N , such that its quantum capacity is additive, but its CQ tradeoff capacity region is superadditive, i.e., ∃ a quantum channel N s.t. (1) CQ (N ) = CQ (N ) but (1) CCQ (N ) ) CCQ (N ) . A construction of this example quantum channel is given in Sec V-C. c) C, Q 6→ CQ: Moreover, there exists a quantum channel N , such that its classical and quantum capacities are additive, but its CQ trade-off capacity region is superadditive, i.e., ∃ a quantum channel N s.t. CC (N ) = CC(1) (N ) and but (1) CQ (N ) = CQ (N ) , (1) CCQ (N ) ) CCQ (N ) . A construction of this example quantum channel is given in Sec V-D. B. Triple resources (see table II) 1) CE 6→ CQE: There exists a quantum channel N such that its CE trade-off capacity region is additive, but its dynamic capacity region is superadditive, i.e., ∃ a quantum channel N s.t. (1) CCE (N ) = CCE (N ) but (1) CCQE (N ) ) CCQE (N ) . An example is constructed in Sec V-E. 2) CE, Q 6→ CQE: There exists a quantum channel N such that its quantum capacity and its CE trade-off capacity region are additive, but its dynamic capacity region is superadditive, i.e., ∃ a quantum channel N s.t. (1) CQ (N ) = CQ (N ) and but (1) CCE (N ) = CCE (N ) , (1) CCQE (N ) ) CCQE (N ) . An example is constructed in Sec V-F. 3) CQ 6→ CQE: There exists a quantum channel N such that its CQ trade-off capacity region is additive, but its dynamic capacity region is superadditive, i.e., ∃ a quantum channel N s.t. (1) CCQ (N ) = CCQ (N ) but (1) CCQE (N ) ) CCQE (N ) . An example is given in Sec V-G. 4) CE, CQ → CQE [8]: If a quantum channel N has additive CE and CQ trade-off capacity regions, then its dynamic capacity region is also additive. This statement is first observed in Ref. [8], and an explicit argument can be found in Ref. [23]. IV. F RAMEWORK This section presents technical tools that we require for demonstration of superadditivity in trade-off capacities. We first define the concept of switch channels. 0 Definition 7: A switch channel NMC→B between NC→B 1 and NC→B with M being a 1-bit switch register is defined as NMC→B (ρ MC ) 0 1 =NC→B (h0| ρ MC |0i M ) + NC→B (h1| ρ MC |1i M ) . In quantum information theory, switch channels were first used in Ref. [7] to demonstrate the existence of quantum channels such that the quantum capacity is nonzero, but for which pre-shared entanglement does not improve the classical capacity. Subsequently, they are used in Ref. [27] to show the superadditivity of private information, with an alternative definition. Recently, they are also used in Ref. [21] to show the superadditivity of the classical capacity with limited entanglement assistance. One immediate difficulty is that, even if N 0 and N 1 are well-studied, the dynamic capacity region of N may not always have a simple expression in terms of those of N 0 and N 1 . This is due to the fact that the switch register M can be in a superposition state. However, if N 0 and N 1 are unitally extended channels, then the dynamic capacity region of N does have a simple expression. Lemma 8: Consider a switch channel NA0 →B between 0 1 NRC→B and NRC→B , with input partition A0 = M RC and M 0 1 being a switch register. Here NRC→B and NRC→B are unital 0 1 extensions of ΨC→B and ΨC→B respectively. Then      (1) (1) (1) CCQE (N ) = Conv CCQE N 0 , CCQE N 1 , where Conv denotes the convex hull of points from the two sets. If the quantum dynamic capacity region for N 0 ⊗ Ψ is additive for any Ψ, then we also have      CCQE (N ) = Conv CCQE N 0 , CCQE N 1 . The rest of this section is devoted to the proof of this lemma. Firstly, we note that switch channels and unitally extended channels fall under a broader class of channels that we call partial classical-quantum channels (partial cq channels). 5 Definition 9: A channel ΨRC→B is a partial cq channel if there exists a noiseless classical channel ΠR→R with orthonormal basis {| ji R }, such that ΨRC→B = ΨRC→B ◦ ΠR→R . x, j (12) with its output state Õ x p(x) |xi hx| X ⊗ ς AB , x  x = Ψ 0 x where ς AB A →B φ AA0 , there exists a corresponding state ρX AA0 , in the form of Eq. (11), which can achieve the same rate, if not better. In fact, the state ρX AA0 can be obtained by applying ΠR→R on %X AA0 and expanding its classical register X. This can be achieved by the following quantum instrument T : R → RXR , Õ T (ψR ) := h j | ψR | ji | ji h j | R ⊗ | ji h j | XR so that = = 0) T (% Õ X AA xj p(x, j) |x, ji hx, j | X ⊗ | ji h j | R ⊗ φ AC (13) x, j where we abuse the notation X to denote X XR in Eq. (13), p(x, j) ≡ p(x)p( j |x), and p( j |x) = Tr[| ji h j | φ xAC ]. Let σX AB = Ψ A0 →B (ρX AA0 ). Then Õ xj σX AB = p(x, j) |x, ji hx, j | X ⊗ σAB x, j where ≥ Õ p(x)I(AiB)ς x x = I(AiBX)ς , (15) where the inequality is due to Eq. (14) and the convexity of coherent information with respect to inputs. 2) Now consider I(AX; B)σ . Similarly, I(AX; B)σ = S(B)σ + I(Bi AX)σ ≥ S(B)ς + I(Bi AX)ς = I(AX; B)ς , where the inequality is due to σB = ςB and Eq. (15). 3) Finally consider I(X; B)σ . Writing |x, ji as |xi | ji, it can be shown I(X; B)σ ≥ I(X; B)ς Lemma 11: The optimal trade-off surface of the 1-shot quantum dynamic capacity region of a unitally extended channel can always be achieved with σX AB such that S(B)σ = log(|B|). This extends similarly to higher shots. Proof. Suppose ΦRC→B is unitally extended from ΨC→B . Since a unitally extended channel ΦRC→B is a partial cq channel, by Lemma 10, we can consider states of the form Õ xj %X AA0 = p(x, j) |x, ji hx, j | X ⊗ | ji h j | R ⊗ φ AC . x, j xj p( j |x)σAB .   x jk xj xj xj where ς AB = X(k)ς AB X(k)† and ς AB = ΨC→B φ AC . We can construct another state of the form in Eq. (11): Õ xj ρX 0 AA0 = p(x, j, k) |x, j, ki hx, j, k | X 0 ⊗ |ki hk | R ⊗ φ AC , x, j,k (16) where p(x, j, k) = p(x, j)/|R|, and σX 0 AB = ΦRC→B (ρX 0 AA0 ): Õ x jk σX 0 AB = p(x, j, k) |x, j, ki hx, j, k | X 0 ⊗ σAB ,   xj xj xj where = X(k)σAB X(k)† and σAB = ΨC→B φ AC . The state σX 0 AB satisfies x jk σAB It follows that Õ x, j x, j,k   xj xj σAB = Ψ A0 →B | ji h j | R ⊗ φ AC . x ς AB = p(x)p( j |x)I(AiB)σ x j x, j Let ςX AB = ΦRC→B (%X AA0 ) with A0 ≡ RC. Then Õ xjj ςX AB = p(x, j) |x, ji hx, j | X ⊗ ς AB , j ρX AA0 = Õ using the data processing inequality when we apply the partial trace map |xi hx| ⊗ | ji h j | → |xi hx| to σX B . x ςX AB ≡ Ψ A0 →B (%X AA0 ) = x, j (10) If there is no register C, then such channels are classicalquantum channels (cq channels). For partial cq channels, one can always assume inputs are cq states with respect to the input partition R and C for the purpose of evaluating capacities, as we show in Lemma 10 below. Lemma 10: If Ψ A0 →B is a partial cq channel with partition A0 = RC, then the optimal trade-off surface of the 1-shot (1) dynamic capacity region CCQE (Ψ) can be achieved with respect to cq states σX AB = Ψ A0 →B (ρX AA0 ), where ρX AA0 is of the form Õ xj (11) ρX AA0 = p(x, j) |x, ji hx, j | X ⊗ | ji h j | R ⊗ φ AC . Proof. We will show that, for any input state Õ %X AA0 = p(x) |xi hx| X ⊗ φ xAA0, 1) First consider I(AiBX)σ . Õ I(AiBX)σ = p(x, j)I(AiB)σ x j (14) j Since the dynamic capacity region is fully determined by the three entropic quantities I(AX; B)σ , I(AiBX)σ and I(X; B)σ in Eqs. (4)-(6), it suffices to show that all three entropic quantities evaluated on ρX AA0 are greater than those evaluated on %X AA0 . ©Õ x jk ª S(B)σ = S ­ p(x, j, k)σB ® «x, j,k ¬ ! Õ 1 Õ x jk σ ≥ p(x, j)S |R| k B x, j = log(|B|), 6 where we’ve used the qudit twirl formula [28] 1 Õ x jk 1 Õ 1 xj σB = X(k)σB X(k)† = IB . |R| k |R| k |B| Likewise, (17) x, j,k = p(x, j)I(AiB)ς x j j = I(AiBX)ς = 1 Õ p(x, m, k)I(Bi A)σ x mk pm I(AX; B)σ m m=0 and I(X; B)σ = (18) x, j 1 Õ pm I(X; B)σ m . m=0 I(AX 0; B)σ = S(B)σ + Õ p(x, j, k)I(Bi A)σ x j k x, j,k = log(|B|) + Õ p(x, j)I(Bi A)ς x j j ≥ I(AX; B)ς x, j I(X 0; B)σ 1 Õ Õ m=0 x,k One can verify that the dynamic capacity region with σX 0 AB is larger than that with ςX AB as follows: Õ I(AiBX 0)σ = p(x, j, k)I(AiB)σ x j k Õ I(AX; B)σ = log(|B|) + = S(B)σ − Õ p(x, j, k)S(B)σ x j k (19) x, j,k = log(|B|) − Õ p(x, j)S(B)ς x j j ≥ I(X; B)ς . This means if we consider inputs of the form (21), the triple rate for using N can always be expressed as a linear combination of the triple rates of N 0 and N 1 . It is also clear that any linear combination is achievable by the time-sharing principle. Since using states of the form (21) is optimal, we have     Ø (1) (1) (1) CCQE pCCQE N 0 + (1 − p)CCQE N1 (N ) = 0≤p ≤1 x, j      (1) (1) = Conv CCQE N 0 , CCQE N1 . (20) The key property used in the above equations is, for any Heisenberg-Weyl operator X(k), S(σB ) = S(X(k)σB X(k)† ). Proof of lemma 2. Following from Lemma 11 and Eq. (16), we only need to consider states of the form ρX AA0 = 1 Õ pm |mi hm| M ⊗ ρm X ARC (21) m=0 Here, addition means Minkowski sum1 . Similarly, we have    (1) (1) CCQE (N ⊗ N ) =Conv CCQE N0 ⊗ N0 ,     (1) (1) CCQE N 0 ⊗ N 1 , CCQE N1 ⊗ N1 . If the quantum dynamic capacity region is additive for N 0 ⊗Ψ, for any Ψ, then       (1) (1) (1) CCQE N 0 ⊗ N 1 = CCQE N 0 + CCQE N1 . (24) Í where pm = x,k p(x, m, k) and Õ p(x, m, k) = ρm |x, m, ki hx, m, k | X ⊗ |ki hk | R ⊗ φ xm X ARC AC , p m x,k In this case the 1-shot quantum dynamic capacity region for N ⊗ N can be greatly simplified to      (1) (1) CCQE (N ⊗ N ) = Conv 2CCQE N 0 , CCQE N 1 ⊗ N 1 . with p(x, m, k) = p(x, m, k 0) for all k, k 0 and m ∈ {0, 1}. The corresponding channel output is Similarly, σX AB = 1 Õ pm σXmAB (22) m=0 where σXmAB = Õ p(x, m, k) xmk |x, m, ki hx, m, k | X ⊗ σAB p m x,k (23) and  xmk m † σAB = X(k)ΨC→B φ xm AC X(k) . Then all three of the entropic quantities evaluated on σX AB in Eq. (22) can be decomposed to the corresponding ones evaluated on σXmAB given in Eq. (23): I(AiBX)σ = 1 Õ Õ p(x, m, k)I(AiB)σ x mk m=0 x,k = 1 Õ m=0 pm I(AiBX)σ m .   (1) CCQE N ⊗k        ⊗k−1  ⊗k (1) (1) =Conv CCQE N1 , CCQE N0 ⊗ N1 ,       ⊗k ⊗k−1 (1) (1) . · · · , CCQE N0 ⊗ N 1 , CCQE N0   ⊗m  ⊗k−m  (1) N0 ⊗ N1 , 0 ≤ m ≤ k, can be Each term CCQE upper bounded as     ⊗k−m  ⊗m (1) 0 ⊗ N1 CCQE N      ⊗k−m (1) =mCCQE N 0 + CCQE N1     ⊆mCCQE N 0 + (k − m)CCQE N 1      ⊆kConv CCQE N 0 , CCQE N 1 . 1 For two sets of position vectors A and B in Euclidean space, their Minkowski sum A + B is obtained by adding each vector in A to each vector in B, i.e., A + B = {a + b |a ∈ A, b ∈ B } [29]. 7 Here the second line follows from the addivity of the dynamic capacity region of N 0 . The third line follows from the definition of CCQE . The fourth line follows from the definition of  (1) convex hull. Thus CCQE N ⊗k can also be upper bounded as        (1) CCQE N ⊗k ⊆ kConv CCQE N 0 , CCQE N 1 . and ∞ Ø  1 (1) CCQE N ⊗k CCQE (N ) = k k=1   ⊆Conv CCQE N 0 , CCQE N 1      =Conv CCQE N 0 , CCQE N 1 . The last equality follows because of the topology of the dynamic capacity region, as we show in Appendix D. By a time-sharing protocol, it is obvious that      CCQE (N ) ⊇ Conv CCQE N 0 , CCQE N 1 . In each construction, we first state the properties that N 0 and N 1 need to satisfy, in addition to Property (U). We then show how the desired superadditivity of the switch channel N follows from these properties. In the end, we explicitly construct channels that satisfy the properties we required. Before we start, we first propose two families of unital extended channels that satisfy (U). Many of our explicit constructions of N 0 will be chosen from these candidates. The first family comes from unital extensions of Hadamard channels. The following lemma shows that the dynamic capacity of the unitally extended Hadamard channels is also additive. Lemma 12: The dynamic capacity region is additive for Φ0 and any other channel Ψ1 , if Φ0 is a unital extension of a Hadamard channel Ψ0 . The second family is unital extensions of classical channels. Lemma 13: If Ψ0 is a classical channel, then the dynamic capacity region is additive for Ψ0 ⊗ Ψ1 , for arbitrary Ψ1 . The same holds for a unital extension of a classical channel. The proofs of the above lemmas are left to the Appendices, as they are not essential in understanding the construction. Hence      CCQE (N ) = Conv CCQE N 0 , CCQE N 1 . Note that unital extensions are not unique, and we only used the unitarity of Heisenberg-Weyl operators and the twirl formula Eq. (17) in proving the above lemmas. Hence, as long as we have K unitaries {Uk } ∈ U(d) that satisfy the twirl formula I 1 Õ Uk AUk† = Tr(A) (25) K k d for any d × d matrix A, one has a valid unital extension, and lemmas 8 and 11 will hold. 2 Moreover, unital extensions are preserved under tensor product of channels: if Φ1 is a unital extension of Ψ1 , and Φ2 is a unital extension of Ψ2 , then Φ1 ⊗Φ2 is also a unital extension of Ψ1 ⊗Ψ2 . This follows from the fact that if {U j } ∈ U(d1 ) and {Vk } ∈ U(d2 ) both satisfy Eq. (25), then {U j ⊗ Vk } ∈ U(d1 d2 ) also satisfies Eq. (25). V. E XPLICIT C ONSTRUCTION OF VARIOUS S UPERADDITIVITY P HENOMENA With the tools developed in Sec IV, we can now explicitly construct channels that satisfy the superadditivity properties stated in Sec III. All our constructions utilize the switch channel idea. We always assume that N is a switch channel of two unitally extended channels N 0 and N 1 . Further, we assume that (U) N 0 has an additive dynamic capacity region, when tensored with another arbitrary channel. In this setting, we can use Lemma 8 and its reduction to various single-resource and two-resource capacities. 2 Note that we do not even require N 0 and N 1 to have the same unital extension. However, to ensure the input dimensions of N 0 and N 1 are the same, their unital extensions must involve the same number of unitaries. For this reason, we stick with the Heisenberg-Weyl operators most of the time. A. Additive C, Superadditive CE Here we review the original argument in [21] and recast it in the current framework. We use CP (N ) when we view C (N ) as a function of the amount of entanglement assistance P, where (C (N ) , P) are points on the CE trade-off curve of N . When P = 0, we return to the classical capacity CC (N ). When P is maximal, we arrive at the classical capacity with unlimited entanglement assistance CE (N ). CP(1) (N ) denotes the 1-shot case. We require N 0 and N 1 to have the following properties:   (A1) CC N 0 = CC N 1 . (A2) N 1 has a superadditive CE trade-off capacity region, i.e.,,     (1) CCE N 1 ) CCE N1 ,  and CCE N 1 is strictly concave and superadditive at a boundary point of the trade-off region with entanglement consumption  P̄.  (A3) CCE N 0 ( CCE N 1 in the sense the CE trade-off capacity region of N 0 is strictly smaller than that of N 1 when entanglement consumption is at P̄. In the property (A2) means at P = P̄,  CP notation,  CP N 1 > CP(1) N 1 and CP N 1 is strictly  concave3 in P at P = P̄ . Property (A3) implies that CP N 0 < CP N 1 at P = P̄. Note that these properties are weaker than the ones required in Ref. [21]. These three properties (A1)-(A3), together with (U), will guarantee that (i) the classical capacity of N is additive; and (ii) the CE trade-off capacity region of N is superadditive at entanglement consumption rate P̄. 3 Here by saying a function f is strictly concave at y, we mean f (y) > (1 − p) f (v) + p f (w) for all v < y < w satisfying (1 − p)v + pw = y, with p ∈ (0, 1). 8 Combining property (A1) with (U) yields statement (i): n    o   CC (N ) = max CC N 0 , CC N 1 = CC N 0 n    o = max CC(1) N 0 , CC(1) N 1 = CC(1) (N ) , where Lemma 8 is used in the first equality. Property (A3) ensures that      CCE (N ) = Conv CCE N 0 , CCE N 1   = CCE N 1 .   (N ) = Conv CCE N 0  (1) , CCE  N 1  CP(1) (Φro ) ≤ CC(1) (Φro ) + P, (28) CE (Φro ) ≤ CC (Φro ) + log(N) −  . This implies dCP (Φro ) /dP cannot always be 1. Thus there exists P̄ ∈ [0, log(N)) such that dCP (Φro ) /dP = 1, ∀ 0 ≤ P ≤ P̄ and (26) Since (1) CCE Since , there exists P0, P1 ≥ 0 and p ∈ [0, 1] such that pP0 +(1−p)P1 = P̄ and     CP̄(1) (N ) = pCP0 N 0 + (1 − p)CP(1)1 N 1 . Statement (ii) follows after considering three different cases. 1) p = 0.     CP̄(1) (N ) = CP̄(1) N 1 < CP̄ N 1 = CP̄ (N ) , where the inequality follows from the superadditivity part of property (A2). The second equality follows from Eq. (26). 2) 0 < p < 1.     CP̄(1) (N ) = pCP(1)0 N 0 + (1 − p)CP(1)1 N 1     ≤ pCP0 N 1 + (1 − p)CP1 N 1   < CP̄ N 1 = CP̄ (N ) where the first inequality follows from Property (A3). The second inequality follows from the strict concavity part of property (A2). The last equality follows from Eq. (26). 3) p = 1. Then     CP̄(1) (N ) = CP̄ N 0 < CP̄ N 1 = CP̄ (N ) . dCP (Φro ) /dP < 1, ∀P > P̄. Next we discuss different cases of P̄. 1) P̄ > 0. Then CP (Φro ) is strictly concave at P̄. Furthermore, CP̄ (Φro ) − CP̄(1) (Φro ) ≥  since CP̄ (Φro ) = CC (Φro ) + P̄ but CP̄(1) (Φro ) ≤ CC(1) (Φro ) + P̄. Thus N 1 = Φro satisfies (A2). dph dph 2) P̄ = 0. Let N 1 = Φro ⊗ Φη , where Φη is the unital extension of the qubit dephasing channel. Since dCP (Φro ) /dP|0+ < 1, choose η > 0 small such that dph dCP Φη /dP|1− > dCP (Φro ) /dP|0+ . This is possible,       dph dph dph as CP Φη = CP Ψη and dCP Ψη /dP|1− → 1 as η → 0. This ensures that when 0 < P ≤ 1,     dph (29) CP N 1 = CC (Φro ) + CP Φη , where we’ve also used Lemma 12.   dph dph For Φη , it can be shown that CP Φη is strictly concave in P when η < 1/2 (see Appendix C). Hence CP N 1 is also strictly concave with respect to P, for 0 < P ≤ 1. Also, when P < ,     dph CP N 1 > CC (Φro ) + CC Φη     dph > CC(1) (Φro ) + CC Φη + P ≥ CP(1) N 1 . Here the first inequality   comes from Eq. (29) and dph dph CP Φη > CC Φη when P > 0. The second inequality comes from our assumption P <  and Eq. (27). The last inequality comes from Eq. (28).  This ensures that CP N 1 is superadditive. Thus when  0 < P < min{1,  }, CP N 1 is strictly concave and superadditive. For N 0 , as long as extension of a classical  it is a unital  channel with CC N 0 = CC N 1 , it will automatically satisfy property (A3). Here the first equality follows from additivity of the CE trade-off capacity region for N 0 . The inequality follows from property (A3). The last equality follows from Eq. (26). Explicit Construction of N : We quote the following property about concave functions [30]: A concave function u(y) is continuous, differentiable from the left and from the right. The derivative is decreasing, i.e., for x < y we have u 0(x−) ≥ B. Additive C and Q, Superadditive CE u 0(x+) ≥ u 0(y−) ≥ u 0(y+). We use “±” to denote the right and In Section V-A, we constructed a channel N with an left derivatives when needed. 1 ro additive classical capacity, but a superadditive CE trade-off We first construct N . Choose Ψ to be a random orthogcapacity region. It’s unclear if our construction N has an onal channel with a subadditive minimum output entropy, and ro ro additive quantum capacity. To extend the argument, we need Ψ has input dimension N. This is unitally extended to Φ . to make some modifications to the original construction. Due to Lemma 10, the useful entanglement assistance is at In addition to properties (A1)-(A3), the channels N 0 and most log(N). Thus we restrict to 0 ≤ P ≤ log(N). 1 N need to satisfy Let   (1) ro ro  = CC (Φ ) − CC (Φ ) > 0. (27) (B1) CQ N 0 ≥ CQ N 1 . 9 then (B1) is automatically satisfied. Hence we will focus on the case where     CQ N 0 < CQ N 1 . In this case, we call these two channels Φ0 and Φ1 respectively. We will construct two new channels N 0 and N 1 that satisfy properties (A1)-(A3) and (B1). We will use the qubit dephasing channel and 1 → N cloning channel. To make the argument work, we will modify them in the following manner. For the 1 → N cloning channel Ψ1→N , we always tensor an appropriate classical channel, such that the resulting channel has its classical capacity equal to 1, and the output dimension is the same as the input dimension. We denote the resulting channel Ψ N . For the dephasing channel, we will tensor a complete depolarizing channel, so that its input and output dimensions match those of Ψ N . Since tensoring a complete depolarizing channel does not modify the dynamic capacity region of the dph qubit dephasing channel, we will continue using Ψη to denote it. Based on results in Ref. [23], we can obtain the trade-off dph capacities of the qubit dephasing channel Ψη and modified N 1 → N cloning channel Ψ . We observe that for η = 0.2 and N = 15, their trade-off capacities satisfy the following properties (see Fig. 1)     dph CQ Ψη > CQ Ψ N . and     dph CCE Ψη ( CCE Ψ N , (30) in the sense that Ψ N achieves a strictly better classical comdph munication rate than Ψη , if we have any non-zero amount of entanglement assistance. In the CP notation, it means    dph CP Ψη < CP Ψ N for all P > 0. Since unital extensions do not change the CE and CQ tradeoff capacity regions of these two channels (see Appendix C), dph the above properties hold if we replace Ψη and Ψ N by their dph N unital extensions Φη and Φ respectively. Since     dph CQ Φη > CQ Φ N , let n be large enough so that         dph nCQ Φη + CQ Φ0 ≥ nCQ Φ N + CQ Φ1 . 0.8 2.0 Ψ N, N = 15 Ψ ηdph , η = 0.2 0.6 0.4 0.2 0.0 0.0 0.2 0.4 0.6 0.8 1.0 Classical Communication Rate Classical Communication Rate Explicit Construction of N : We take the channels N 0 and 1 N that were constructed in Sec  V-A, and compare their quantum capacities. Since CQ N 0 = 0, we can only have CQ N 0 ≤ CQ N 1 . If     CQ N 0 = CQ N 1 , 1.0 Quantum Communication Rate This ensures that the quantum capacity of N is also additive: n    o   CQ (N ) = max CQ N 0 , CQ N 1 = CQ N 0 n    o (1) (1) = max CQ N 0 , CQ N 1 = CQ (N ) . 1.8 Ψ N, N = 15 Ψ ηdph , η = 0.2 1.6 1.4 1.2 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Entanglement Consumption Rate (a) (b) Fig. 1. Comparison of trade-off curves between qubit dephasing channel dph Ψη and modified 1 → N cloning channel Ψ N , when η = 0.2 and N = 15. (a) CQ trade-off. (b) CE trade-off. Define and   ⊗n dph N 0 = Φη ⊗ Φ0   ⊗n N 1 = ΦN ⊗ Φ1 . Our choice of n ensures that     CQ N 0 ≥ CQ N 1 . We also need to ensure our newly constructed N 0 and N 1 still satisfy properties (A1)-(A3). As     dph CC Φη = CC Φ N = 1 and     CC Φ0 = CC Φ1 , we immediately have     CC N 0 = CC N 1 and property (A1) is satisfied. The CE trade-off curve of Ψ1→N is strictly concave for N , 1 [23], hence property (A2) is also satisfied for N 1 . Property (A3) is satisfied due to Eq. (30). C. Additive Q, Superadditive CQ We require N 0 and N 1 to have the following properties:   (C1) CQ N 0 ≥ CQ N 1 .   (1) (C2) CC N 1  > CC N 1 . (C3) CC N 0 < CC N 1 . These properties (C1)-(C3) will allow us to show that (i) (1) (1) CQ (N ) = CQ (N ); and (ii) CCQ (N ) ) CCQ (N ) . Statement (i) follows from property (C1) and (U) that N 0 has an additive quantum capacity: n    o   CQ (N ) = max CQ N 0 , CQ N 1 = CQ N 0 n    o (1) (1) (1) = max CQ N 0 , CQ N 1 = CQ (N ) . Properties (C2) and (C3) together ensure n    o   CC (N ) = max CC N 0 , CC N 1 = CC N 1 n    o > max CC(1) N 0 , CC(1) N 1 = CC(1) (N ) , 10 i.e., the classical capacity of N is superadditive; hence statement (ii) follows. Explicit Construction of N : Next we construct N 0 and N 1 that satisfy the above properties. Let Ψro be a random orthogonal channel, such that its unital extension has a superadditive classical capacity. For convenience, we also assume Ψro has the input dimension dph N = 2n . Choose η for  the qubit dephasing channel Ψη such dph that CQ (Ψro ) + CQ Ψη = m for some integer m. Define dph N 1 = Φro ⊗ Φη , dph where Φro is a unital extension of Ψro and Φη is a unital dph extension of Ψη .  N 1 has the property that its quantum capacity is CQ N 1 = m, whereas its classical capacity is superadditive, and greater than m. Define   ⊗m   ⊗n+1−m dpo N 0 = ΦI ⊗ Φ1 , where Φ I is a unital extension of the noiseless qubit channel, dpo and Φ1 is a unital extension of the complete qubit depolarizing channel. 0 It’s clear  that N 0 has its classical and quantum capacity as 0 CC N = CQ N = m, thus fulfiling the properties (C1) and (C3) above. D. Additive C and Q, Superadditive CQ We require N 0 and N 1 to satisfy the following properties:     (D1) CC N 0  ≤ CC N 1 = CC(1) N 1 and CQ N 0 = CQ N 1 . (D2) N 1 has a superadditive CQ trade-off capacity region, meaning     (1) CCQ N 1 ) CCQ N1 .  CCQ N 1 is strictly concave and superadditive at a boundary point with classical communication rate C̄.  (D3) CCQ N 0 ( CCQ N 1 in the sense the CQ trade-off capacity region of N 0 is strictly smaller than that of N 1 when classical communication rate is at C̄. With these properties, we can show that (i) CC (N ) = (1) CC(1) (N ); (ii) CQ (N ) = CQ (N ); and (iii) CCQ (N ) ) (1) CCQ (N ) . We’ll focus on the CQ trade-off curve. Same as in Section V-A, we use a simplified notation QC (N ) when we view Q (N ) as a function of C (N ). In the 1-shot scenario, it is (1) denoted by QC (N ). We’ll show there exists C̄ , 0 such that (1) QC̄ (N ) > QC̄ (N ). In the QC notation, means at C = C̄,  property (D2)  (1) QC N 1 > QC N 1 and QC N 1 is strictly concave in C at C = C̄. Property (D3) implies that QC N 0 < QC N 1 at C = C̄. Property (D1) and (U) that N 0 has an additive quantum capacity ensure that n    o   CC (N ) = max CC N 0 , CC N 1 = CC N 1 n    o = max CC(1) N 0 , CC(1) N 1 = CC(1) (N ) and n    o   CQ (N ) = max CQ N 0 , CQ N 1 = CQ N 0 n    o (1) (1) (1) = max CQ N 0 , CQ N 1 = CQ (N ) , i.e., N has an additive classical and quantum capacity. By property (D3), we have      CCQ (N ) = Conv CCQ N 0 , CCQ N 1   = CCQ N 1 . (31) Since      (1) (1) CCQ (N ) = Conv CCQ N 0 , CCQ N 1 , there exists C0, C1 and p ∈ [0, 1] such that pC0 + (1 − p)C1 = C̄ and     (1) (1) QC̄ (N ) = pQC0 N 0 + (1 − p)QC1 N 1 . Now consider three different cases. 1) p = 0.     (1) (1) QC̄ (N ) = QC̄ N 1 < QC̄ N 1 = QC̄ (N ) , where the inequality follows from property (D2). The second equality follows from Eq. (31). 2) 0 < p < 1.     (1) (1) QC̄ (N ) =pQC0 N 0 + (1 − p)QC1 N 1     ≤pQC0 N 1 + (1 − p)QC1 N 1   <QC̄ N 1 = QC̄ (N ) . Here the first inequality follows from the definition of CCQ and property (D3). The second inequality follows from the strict concavity part of property (D2). The last equality follows from Eq. (31). 3) p = 1. Then     (1) QC̄ (N ) = QC̄ N 0 < QC̄ N 1 = QC̄ (N ) . Here the inequality follows from property (D3). The last equality follows from Eq. (31). Hence statement (iii) follows. Explicit Construction: Now we explicitly construct N 0 and N 1. dpo Choose p such that the qubit depolarizing channel Ψp is known to have a superadditive quantum capacity. Consider   its dpo dpo unital extension Φ p . Note that the gradient dQC Φ p /dC of the CQ trade-off curve cannot always stay at 0 for the choice dpo of Ψp with a positive quantum capacity. It means there exists  dpo 0 ≤ C̄ < CC Φ p such that   dpo dQC Φ p /dC = 0, ∀0 ≤ C ≤ C̄− and     dpo dpo dQC Φ p /dC < 0, ∀C̄+ ≤ C ≤ CC Φ p . (32) 11   dpo 1) C̄ > 0. In this case, we know QC Φ p is strictly concave at C̄. Also         dpo dpo dpo dpo (1) QC̄ Φ p = Q0 Φ p > Q(1) Φ p ≥ QC̄ Φp . 0 Here the equality follows from Eq. (32). The first inequaldpo ity follows because Ψp has a superadditive quantum (1) capacity, as both CQ and CQ remain unchanged after a unital extension, and QC reduces to the quantum capacity at C = 0. The second inequality follows as the rate of quantum communication along the CQ trade-off curve must not exceed the quantum capacity. Choose the noise parameter η for the qubit dephasing dph channel Ψη appropriately such that     dph dpo CQ Ψη = 1 − CQ Ψp . Here we construct a channel that has an additive CE tradeoff capacity region, but a superadditive quantum capacity, hence a superadditive quantum dynamic capacity region. Let Ψ0 be a classical channel and Ψ1 be the depolarizing dpo dpo channel Ψp . p is chosen such that Ψp has a superadditive quantum capacity. Also, we require     CC Ψ0 > CE Ψ1 . (33) Now consider the switch channel N , consisting of N 0 and which are unital extensions of Ψ0 and Ψ1 . It can be easily shown that unital extension does not change the classical capacity with umlimited entanglement assistance of the qubit depolarizing channel. Thus Eq. (33) implies       (1) CCE N 0 ⊇ CCE N 1 ⊇ CCE N1 . (34) N 1, Hence Define N = 1 It’s clear that E. Additive CE, Superadditive Q and CQE dpo Φp ⊗ dph Φη . dpo Ψp ⊗ N1 is a unitally extended channel of   dpo dph 1 and has CQ N = CQ Ψp ⊗ Ψη = 1. The CQ trade-off curve is strictly concave and superadditive at C̄. The corresponding Ψ0 is dph Ψη dpo Ψ0 = I ⊗ Ψ1 , i.e., a noiseless channel tensor a complete qubit depolarizing channel. N 0 is a unital extension of Ψ0 . 2) C̄ = 0. Choose η1 close to 1/2 such that     dpo dph dQC Φ p dQC Φη1 .  >  dph dC dC CC Ψη 0+ 1 − Let dph dpo dph N 1 = Φη1 ⊗ Φ p ⊗ Φη2 , where η2 is chosen such that     dph dpo dph CQ N 1 = CQ Ψη1 ⊗ Ψp ⊗ Ψη2       dph dpo dph =CQ Ψη1 + CQ Ψp + CQ Ψη2 = 1.   dph dpo By our choice of η1 , QC Φη1 ⊗ Φ p is strictly concave   dph in C for 0 < C < 1. QC Φη2 is also strictly concave in  C. Thus QC N 1 is strictly concave in C, for 0 < C < 1. In this case, the corresponding Ψ0 is  dpo Ψ0 = I ⊗ Ψ1  ⊗2 , i.e., a noiseless channel tensor two copies of the complete qubit depolarizing channel. N 0 is a unital extension of Ψ0 .  CCE (N ) = Conv CCE  = Conv CCE   N 0 , CCE   (1) N 0 , CCE  N1    = CCE N 0  N1  (1) = CCE (N ) , i.e., its CE trade-off capacity region is additive.  Since CQ N 0 = 0, it is clear that the quantum capacity of N is the same as that of N 1 , which is superadditive. Note that N is a unitally extended channel. This fact will be implicitly used in Section V-F. F. Additive CE and Q, Superadditive CQE Previously in Section V-D, we give an example of a channel with an additive classical and quantum capacity, but whose CQ trade-off curve is superadditive. It is unclear if the channel has an additive CE trade-off capacity region, because the CE tradeoff capacity region of the depolarizing channel has not been shown to be additive. This is itself an interesting question but we’ll not explore it here. dpo We replace Ψp in the original argument of Section V-D by the channel constructed in Section V-E. It’s clear that the rest of the argument is not changed and N still has a superadditive CQ trade-off capacity region. Now both N 0 and N 1 have an additive CE trade-off capacity region. It’s clear that      CCE (N ) = Conv CCE N 0 , CCE N 1      (1) (1) (1) = Conv CCE N 0 , CCE N 1 = CCE (N ) , i.e., the CE trade-off capacity region of N is additive. G. Additive CQ, Superadditive CQE Our construction in Section V-A has a superadditive CE trade-off capacity region. But most likely its CQ trade-off capacity region is also superadditive. This is because in Section V-A, N 0 is the unital extension of a classical channel, and its CQ trade-off capacity region is trivial. Hence the CQ trade-off capacity region of N is given by that of N 1 , which is most likely superadditive as well. 12 To achieve an additive CQ trade-off capacity region, we have to substitute N 0 with a channel that has a non-trivial CQ trade-off capacity region. Recall that our construction in Section V-A requires N 0 and N 1 to have properties (A1)-(A3). These three properties ensure that N will have a superadditive CE trade-off capacity region, while its classical capacity is still additive. In extending to a channel with an additive CQ trade-off capacity region, the additional properties we need are   (G1) CCQ N 0 ⊇ CCQ N 1 . Property (G1) and (U) ensure the CQ trade-off capacity region of N is additive, as        CCQ (N ) = Conv CCQ N 0 , CCQ N 1 = CCQ N 0        (1) (1) (1) = CCQ N 0 = Conv CCQ N 0 , CCQ N1 (1) = CCQ (N ) . Unfortunately, we cannot find quantum channels N 0 and that satisfy all the properties. Hence we do not have an explicit construction in this case. This is because there are very few channels that we understand their dynamic capacity regions. This leaves us with a limited choice of candidates for N 0 . However, in principle there is no obstacle and the construction will be readily available once we have a better understanding of quantum channels. N1 VI. C ONCLUSION Unlike previous studies on additivity of single resource channel capacity, our work aimed to understand how additivity of single or double resource capacity regions will effect additivity of a general resource trade-off capacity. In contrast to the two known results in the literature; namely, (i) additivity of the quantum capacity implies additivity of the entanglement-assisted quantum capacity region and (ii) additivity of classical-quantum and classical-entanglement capacity regions implies additivity of the three resource capacity region, the additivity of all the remaining situations does not hold. In this work, we identified all possible occurrences where superadditivity could occur in the trade-off quantum dynamic capacity. Furthermore, we provided an explicit construction of quantum channels for most instances. Our main technical tool combines properties of switch channels and unital extension of known quantum channels. An obvious open question is an explicit construction of a quantum channel whose classical-quantum capacity region is additive, but its triple trade-off capacity is superadditive. Moreover, there are other triple resource trade-off capacity regions [4], [31]. Could similar statements made in this work hold in these scenarios as well? ACKNOWLEDGMENT EYZ and PWS are supported by the National Science Foundation under grant Contract Number CCF-1525130. QZ is supported by the Claude E. Shannon Research Assistantship. MH is supported by an ARC Future Fellowship under Grant FT140100574. PWS is supported by the NSF through the STC for Science of Information under grant number CCF0-939370. A PPENDIX A P ROOF OF L EMMA 12 Proof. Consider Φ0RC→B0 and Ψ1A1 →B1 , where Φ0 is a unital 0 1 is an extension of a Hadamard channel ΨC→B 0 , and Ψ arbitrary channel. The result follows if both the CQ and CE trade-off capacity regions of Φ0 are additive [4]. To show that the CQ trade-off capacity region is additive for Φ0 , it was shown in Ref. [23] it suffices to prove that       fλ Φ0 ⊗ Ψ1 = fλ Φ0 + fλ Ψ1 (35) for any channel Ψ1 , where fλ (N ) = max I(X; B)σ + λI(AiBX)σ . (36) ρ The state σ is the channel output state with ρ being the input state (see, e.g., Theorem we will only  1). In the following,  show that fλ Φ0 ⊗ Ψ1 ≤ fλ Φ0 + fλ Ψ1 because the other direction is trivial from its definition. Since Φ0 ⊗ Ψ1 : CRA1 → B0 B1 is a partial cq channel, then by the same argument as that in Lemma 10, fλ Φ0 ⊗ Ψ1 can be achieved with input states of the following form Õ p(x) |x, ji hx, j | X ⊗ | ji h j | R ⊗ φ xAC A1 , ρX R AC A1 = |R| x, j with output states σX AB0 B1 = where Õ p(x) xj |x, ji hx, j | X ⊗ σAB0 B1 , |R| x, j (37)   xj σAB0 B1 = Φ0 ⊗ Ψ1 | ji h j | R ⊗ φ xAC A1 . 0 1 Let UC→B 0 E 0 and U A1 →B 1 E 1 be the isometric extensions of 1 and Ψ , and let Õ %X AC A1 = p(x) |xi hx| X ⊗ φ xAC A1 Ψ0 x ωX AA1 B0 E 0 ςX AB0 B1 E 0 E 1    † = U 0 ⊗ I %X AC A1 U 0 ⊗ I    † = U 0 ⊗ U 1 %X AC A1 U 0 ⊗ U 1 . Moreover, let θ XY AB1 E 0 E 1 = DB1 0 →Y (ςX AB0 B1 E 0 E 1 ) , 2 1 where DY→E 0 ◦ D B 0 →Y = D B 0 →E 0 is a degrading map for the Hadamard channel Ψ0 . For any state σX AB0 B1 in Eq. (37), we have   fλ Φ0 ⊗ Ψ1     =I X; B0 B1 + λI AiB0 B1 X σ   σh    i =S B0 B1 + (λ − 1)S B0 B1 |X − λS AB0 B1 |X σ σ σ         =S B0 B1 + (λ − 1)S B0 B1 |X − λS AB0 B1 |X , ς ς ς 13 where the last equality follows from the same argument used in Eqs. (18) and (20). Then subadditivity of the von Neumann entropy and chain rule yield       ≤S B0 + (λ − 1)S B0 |X − λS E 0 |X ς ς  ς     1 1 0 1 0 +S B + (λ − 1)S B |B X − λS E |E X ς  ς   ς   0 0 0 ≤S B + (λ − 1)S B |X − λS E |X ς ς  ς     1 1 1 +S B + (λ − 1)S B |XY − λS E |XY θ θ θ  1 where the last inequality uses the fact that S B |B0 X ς ≤   S B1 |Y X θ due to the existence of D 1 and S E 1 |E 0 X ς ≥  S E 1 |Y X θ due to the existence of D 2 . Finally,       = I X; B0 + λI AA1 iB0 X ω ω      1 0 1 + I XY ; B + λI AE iB XY θ θ    0 1 ≤ fλ Φ + fλ Ψ  because S(E 0|X)ς = S(AA1 B0 |X)ω and S E 1 |XY θ = S AB1 E 0 |XY θ . To prove that the CE trade-off capacity region of the channel Φ0 is additive is equivalent to showing that [23]:       gλ Φ0 ⊗ Ψ1 = gλ Φ0 + gλ Ψ1 , (38) where 0 ≤ λ < 1, gλ (N ) = max I(AX; B)σ − λS(A|X)σ σ (39) and σ is of the form given in Eq. (7). However this proof proceeds similarly; hence, we will omit it. where is now a product state with respect to A0 and B0 . The three entropic quantities of interest can be simplied when evaluated with respect to σX A0 B0 , as         Õ I A0 X; B0 = S B0 − p(x, j)S B0 x j ≤ CC Ψ0 , σ  I A0 iB0 X   C + Q + E ≤ CC Ψ0 ,  where CC Ψ0 is the classical capacity of Ψ0 . The same holds for a unital extension of a classical channel. Proof. Consider the 1-shot dynamic  capacity region of (1) Ψ0A00 →B0 . By Lemma 10, CCQE Ψ0 can be achieved with  respect to cq states σX A0 B0 = Ψ0 ρX A0 A00 , where ρX A0 A00 is of the form Õ xj ρX A0 A00 = p(x, j) |x, ji hx, j | X ⊗ | ji h j | A00 ⊗ φ A0 . x, j Thus σX A0 B0 = Õ x, j xj p(x, j) |x, ji hx, j | X ⊗ σA0 B0 , σ σ σ =− Õ σ x, j  p(x, j)S A0 x, j  σx j ≤ 0,   ≤ CC Ψ0 . It’s also clear that those inequalities can be achieved. Thus  (1) CCQE Ψ0 is described by   C + 2Q ≤ CC Ψ0 , Q + E ≤ 0,   C + Q + E ≤ CC Ψ0 . Since the classical capacity of a classical channel is additive, the dynamic capacity region of Ψ0 is additive and is described by the same set of inequalities. Next we show that the dynamic capacity region is additive for Ψ0 and Ψ1 , with Ψ1 arbitrary. Since Ψ0A00 →B0 ⊗ Ψ1A10 →B1 is a partial cq channel, its  (1) Ψ0 ⊗ Ψ1 can be 1-shot dynamic capacity region CCQE achieved with respect to cq states σX AB0 B1 = Ψ0A00 →B0 ⊗  Ψ1A10 →B1 ρX AA00 A10 , where ρX AA00 A10 is of the form Õ xj ρX AA00 A10 = p(x, j) |x, ji hx, j | X ⊗ | ji h j | A00 ⊗ φ AA10 . x, j For ρ Q + E ≤ 0,    I X; B0 A PPENDIX B P ROOF OF L EMMA 13 Lemma 6: If Ψ0 is a classical channel, then the dynamic capacity region is additive for Ψ0 ⊗ Ψ1 , for arbitrary Ψ1 . Moreover, the dynamic capacity region of Ψ0 is described by the following relation   C + 2Q ≤ CC Ψ0 ,   xj xj σA0 B0 = Ψ0A00 →B0 | ji h j | A00 ⊗ φ A0 of this form, σX AB0 B1 is of the form Õ xj σX AB0 B1 = p(x, j) |x, ji hx, j | X ⊗ σAB0 B1 , 0 0 X AA0 A1 x, j with   xj xj σAB0 B1 = Ψ0A00 →B0 ⊗ Ψ1A10 →B1 | ji h j | A00 ⊗ φ AA10 . For such σX AB0 B1 , each of the three entropic quantities have simple upper bounds,       I AX; B0 B1 ≤ I X; B0 + I AX; B1 , σ σ  σ   1 0 1 I AiB B X = I AiB X ,  σ   σ   I X; B0 B1 ≤ I X; B0 + I X; B1 , σ σ σ where we’ve used subadditivity of the von Neumann entropy. Thus the 1-shot dynamic capacity region of Ψ0 ⊗ Ψ1 has a simple upper bound       (1) (1) (1) CCQE Ψ0 ⊗ Ψ1 ⊆ CCQE Ψ0 + CCQE Ψ1 . It’s trivial to extend it to the dynamic capacity region of Ψ0 ⊗ Ψ1       CCQE Ψ0 ⊗ Ψ1 ⊆ CCQE Ψ0 + CCQE Ψ1 . 14 Since the other direction of inclusion is obvious, we have       CCQE Ψ0 ⊗ Ψ1 = CCQE Ψ0 + CCQE Ψ1 . A PPENDIX D C ONVEX HULL Here we show that4 For unital extensions of a classical channel, we observe that, if the Heisenberg-Weyl operators are defined on the standard basis for the output of the channel, then the resulting channel is also a classical channel. Hence the above result applies. A PPENDIX C UNITAL EXTENSION OF THE QUBIT DEPHASING CHANNEL AND 1 → N CLONING CHANNEL Lemma 14: The CE and CQ trade-off curve of the qubit dephasing channel and 1 → N cloning channels are unchanged after a unital extension. dph Proof. Consider the qubit dephasing channel Ψη and a 1 → dph 1→N N cloning channel Ψ , and their unital extensions Φη and 1→N Φ . The statement of this lemma is equivalent to showing that for fλ (Ψ) = fλ (Φ) ∀λ ≥ 1, gλ (Ψ) = gλ (Φ) ∀0 ≤ λ < 1.     dph dph (Ψ, Φ) = Ψη , Φη , Ψ1→N , Φ1→N . In Lemma 11, we have argued that the 1-shot dynamic capacity region of a unitally extended channel can be achieved with input of the form in Eq. (16). Evaluating fλ (Φ) on such states, one obtains   Conv CCQE N 0 , CCQE N 1      =Conv CCQE N 0 , CCQE N 1 . We quote a few properties about convex hull and Minkowski addition that we will use [29]: (i) For two closed sets A and B in Rk , if A is bounded, then A + B is closed. (ii) For two sets A and B in Rk , Conv(A + B) = Conv(A) + Conv(B) . (iii) The convex hull of a bounded set in Rk is also bounded. First, we note that, by Ref. [4], all points in the 1-shot dynamic capacity region can be achieved by the classically enhanced father protocol, combined with unit protocols, i.e., Ø (1) (1) CCQE CCQE,CEF (N ) = (N )σ + CCQE,unit, σ where 1 1 (1) CCQE,CEF (N )σ = {I(X; B)σ, I(A; B|X)σ, − I(A; E |X)σ } 2 2 is the rate achieved using the classically enhanced father protocol, and σ is of the form in Eq. (7). CCQE,unit are all the rates achieved by the unit protocols. Clearly CCQE,unit is convex and closed. Define Ø (1) (1) CCQE,CEF CCQE,CEF (N )σ . (N ) = σ (1) CCQE,CEF (N ) Clearly fλ (Φ) = log(|B|) + (λ − 1)S (B|X 0)σ − λS (AB|X 0)σ dimensions of N . Õ = log(|B|) + p(x, j, k) [(λ − 1)S(B)σ x j k − λS(AB)σ x j k ] Then x, j,k = log(|B|) + Õ CCQE (N ) = p(x, j) [(λ − 1)S(B)σ x j − λS(AB)σ x j ] x, j ≤ log(|B|) + max [(λ − 1)S (B)σ − λS (AB)σ ] , σ where σAB = ΨC→B (φ AC ) . (41) For such a σAB = Ψ (φ AC ) that achieves Eq. (40), one can construct 1 |ki hk | X ⊗ |ki hk | R ⊗ φ AC . (42) ρX AA0 = |R| This state will saturate the above inequality. dph For Ψη and Ψ1→N , it can be verified [23] that their fλ have the same form, i.e., fλ (Ψ) = log(|B|) + max [(λ − 1)S (B)σ − λS (AB)σ ] , σ = (40) (43) with σ of the form given in Eq. (41). The same argument also applies to gλ . The CQ trade-off curve of the qubit dephasing channel was computed in Ref. [22], and the CE trade-off curve was computed in Ref. [8]. The CE and CQ trade-off curves of the 1 → N cloning channel were given in Ref. [23]. Other than the special cases (η = 0, 1/2 for the dephasing channel, N = 1 for the 1 → N cloning channel), it can be verified that their CE and CQ trade-off curves are strictly concave at every point. By Lemma 14, this property is true for their unital extensions. is bounded by the input and output  Ø1  (1) CCQE,CEF N ⊗k + CCQE,unit k k=1 Ø1  (1) N ⊗k + CCQE,unit . CCQE,CEF k k=1 Denote A=   Ø1 (1) CCQE,CEF N ⊗k , k k=1 B = CCQE,unit . Since A is bounded, B is closed, by (i) and (iii), A + B is also closed. Since A + B ⊆ A + B, and A + B is closed, we have A + B ⊆ A + B. It is also obvious that A + B ⊇ A + B, hence A + B = A + B. Denote CCQE,CEF (N ) = 4 N0 Ø1  (1) CCQE,CEF N ⊗k . k k=1 and N 1 are assumed to be finite-dimensional. 15 Then by the above arguments, CCQE (N ) = CCQE,CEF (N ) + CCQE,unit . Now we apply the above result to N 0 and N 1 .      Conv CCQE N 0 , CCQE N 1      =Conv CCQE N 0 ∪ CCQE N 1       =Conv CCQE,CEF N 0 ∪ CCQE,CEF N 1 + CCQE,unit      =Conv CCQE,CEF N 0 ∪ CCQE,CEF N 1 + CCQE,unit . In the last line, we used (ii). Since CCQE,CEF (N ) is closed and bounded for any finite dimensional quantum channel N , the same must  0 1 . Hence be true for CCQE,CEF N ∪ C N CQE,CEF   Conv CCQE,CEF N 0 ∪ CCQE,CEF N 1 is closed  and bounded. Thus Conv CCQE,CEF N 0 ∪ CCQE,CEF N 1 + CCQE,unit is also closed. R EFERENCES [1] C. E. Shannon, “A mathematical theory of communication,” The Bell System Technical Journal, vol. 27, no. 3, pp. 379–423, July 1948. [2] I. Devetak, A. W. Harrow, and A. Winter, “A family of quantum protocols,” Phys. Rev. Lett., vol. 93, p. 230504, Dec 2004. [3] I. Devetak, A. W. Harrow, and A. J. Winter, “A resource framework for quantum shannon theory,” IEEE Transactions on Information Theory, vol. 54, no. 10, pp. 4587–4618, Oct 2008. [4] M.-H. Hsieh and M. M. Wilde, “Trading classical communication, quantum communication, and entanglement in quantum shannon theory,” IEEE Transactions on Information Theory, vol. 56, no. 9, pp. 4705– 4730, Sept 2010. [5] C. H. Bennett and S. J. Wiesner, “Communication via one- and two-particle operators on einstein-podolsky-rosen states,” Phys. Rev. Lett., vol. 69, pp. 2881–2884, Nov 1992. [6] C. H. Bennett, P. W. Shor, J. A. Smolin, and A. V. Thapliyal, “Entanglement-assisted classical capacity of noisy quantum channels,” Phys. Rev. Lett., vol. 83, pp. 3081–3084, Oct 1999. [7] C. H. Bennett, P. W. Shor, J. A. Smolin, and A. V. Thapliyal, “Entanglement-assisted capacity of a quantum channel and the reverse shannon theorem,” IEEE Transactions on Information Theory, vol. 48, no. 10, pp. 2637–2655, Oct 2002. [8] M.-H. Hsieh and M. M. Wilde, “Entanglement-assisted communication of classical and quantum information,” IEEE Transactions on Information Theory, vol. 56, no. 9, pp. 4682–4704, Sept 2010. [9] N. Datta and M. H. Hsieh, “One-shot entanglement-assisted quantum and classical communication,” IEEE Transactions on Information Theory, vol. 59, no. 3, pp. 1929–1939, March 2013. [10] A. S. Holevo, “The capacity of the quantum channel with general signal states,” IEEE Transactions on Information Theory, vol. 44, no. 1, pp. 269–273, Jan 1998. [11] B. Schumacher and M. D. Westmoreland, “Sending classical information via noisy quantum channels,” Phys. Rev. A, vol. 56, pp. 131–138, Jul 1997. [12] S. Lloyd, “Capacity of the noisy quantum channel,” Phys. Rev. A, vol. 55, pp. 1613–1622, Mar 1997. [13] P. W. Shor, “The quantum channel capacity and coherent information,” MSRI Workshop on Quantum Computation, 2002. [14] I. Devetak, “The private classical capacity and quantum capacity of a quantum channel,” IEEE Transactions on Information Theory, vol. 51, no. 1, pp. 44–55, Jan 2005. [15] G. Smith and J. Yard, “Quantum communication with zero-capacity channels,” Science, vol. 321, no. 5897, pp. 1812–1815, 2008. [16] P. W. Shor, “The classical capacity achievable by a quantum channel assisted by a limited entanglement.” Quantum Information and Computation, vol. 4, no. 6, pp. 537 – 545, 2004. [17] G. Smith, J. A. Smolin, and A. Winter, “The quantum capacity with symmetric side channels,” IEEE Transactions on Information Theory, vol. 54, no. 9, pp. 4208–4217, Sept 2008. [18] M. B. Hastings, “Superadditivity of communication capacity using entangled inputs,” Nat Phys, vol. 5, no. 4, pp. 255–257, 04 2009. [19] P. Hayden and A. Winter, “Counterexamples to the maximal pnorm multiplicativity conjecture for all p > 1,” Communications in Mathematical Physics, vol. 284, no. 1, pp. 263–280, 2008. [20] P. W. Shor, “Equivalence of additivity questions in quantum information theory,” Communications in Mathematical Physics, vol. 246, no. 3, pp. 453–472, 2004. [21] E. Y. Zhu, Q. Zhuang, and P. W. Shor, “Superadditivity of the classical capacity with limited entanglement assistance,” Phys. Rev. Lett., vol. 119, p. 040503, Jul 2017. [22] I. Devetak and P. W. Shor, “The capacity of a quantum channel for simultaneous transmission of classical and quantum information,” Communications in Mathematical Physics, vol. 256, no. 2, pp. 287–303, 2005. [23] K. Brádler, P. Hayden, D. Touchette, and M. M. Wilde, “Trade-off capacities of the quantum hadamard channels,” Phys. Rev. A, vol. 81, p. 062312, Jun 2010. [24] C. King, “Additivity for unital qubit channels,” Journal of Mathematical Physics, vol. 43, no. 10, pp. 4641–4653, 2002. [25] D. P. DiVincenzo, P. W. Shor, and J. A. Smolin, “Quantum-channel capacity of very noisy channels,” Phys. Rev. A, vol. 57, pp. 830–839, Feb 1998. [26] M. Fukuda, “Simplification of additivity conjecture in quantum information theory,” Quantum Information Processing, vol. 6, no. 3, pp. 179–186, 2007. [27] D. Elkouss and S. Strelchuk, “Superadditivity of private information for any number of uses of the channel,” Phys. Rev. Lett., vol. 115, p. 040501, Jul 2015. [28] M. M. Wilde, Quantum Information Theory. Cambridge University Press, 2013. [29] R. Schneider, Convex Bodies: The Brunn-Minkowski Theory (Encyclopedia of Mathematics and its Applications). Cambridge University Press, 1993. [30] W. Rudin, Principles of Mathematical Analysis. McGraw-Hill Education, 1976. [31] M. M. Wilde and M.-H. Hsieh, “The quantum dynamic capacity formula of a quantum channel,” Quantum Information Processing, vol. 11, no. 6, pp. 1431–1463, 2012.
7cs.IT
Fast Algorithms for Convolutional Neural Networks Andrew Lavin Scott Gray Nervana Systems [email protected] arXiv:1509.09308v2 [cs.NE] 10 Nov 2015 [email protected] Abstract cause they achieve better accuracy with fewer weights than shallow networks with larger filters [11, 7]. Deep convolutional neural networks take GPU days of compute time to train on large data sets. Pedestrian detection for self driving cars requires very low latency. Image recognition for mobile phones is constrained by limited processing resources. The success of convolutional neural networks in these situations is limited by how fast we can compute them. Conventional FFT based convolution is fast for large filters, but state of the art convolutional neural networks use small, 3 × 3 filters. We introduce a new class of fast algorithms for convolutional neural networks using Winograd’s minimal filtering algorithms. The algorithms compute minimal complexity convolution over small tiles, which makes them fast with small filters and small batch sizes. We benchmark a GPU implementation of our algorithm with the VGG network and show state of the art throughput at batch sizes from 1 to 64. Therefore there is a strong need for fast convnet algorithms for small batch sizes and small filters. However conventional convnet libraries require large batch sizes and large filters for fast operation. This paper introduces a new class of fast algorithms for convolutional neural networks based on the minimal filtering algorithms pioneered by Winograd [13]. The algorithms can reduce the arithmetic complexity of a convnet layer by up to a factor of 4 compared to direct convolution. Almost all of the arithmetic is performed by dense matrix multiplies of sufficient dimensions to be computed efficiently, even when the batch size is very small. The memory requirements are also light compared to the conventional FFT convolution algorithm. These factors make practical implementations possible. Our implementation for NVIDIA Maxwell GPUs achieves state of the art throughput for all batch sizes measured, from 1 to 64, while using at most 16MB of workspace memory. 1. Introduction Deep convolutional neural networks (convnets) achieve state of the art results on image recognition problems [11][7]. The networks take several days of GPU time to train and require significant compute resources during classification as well. Larger data sets and models lead to better accuracy but also increase computation time. Therefore progress in deep neural networks is limited by how fast the networks can be computed. Likewise the application of convnets to low latency inference problems, such as pedestrian detection in self driving car video imagery, is limited by how fast a small set of images, possibly a single image, can be classified. Distributed training of convnets can be achieved by partitioning each batch of examples across the nodes of a cluster and accumulating weight updates across the nodes. Large batch sizes adversely affect convergence of the network, so the minimum batch size that can be computed efficiently places an upper limit on cluster size [8, 6]. State of the art convnet architectures for image recognition use deep networks of 3 × 3 convolutional layers, be- 2. Related Work The FFT and convolution theorem have been used to reduce the arithmetic complexity of convnet layers, first by Mathieu et al. [10], then refined by Visalache et al. [12], and then implemented in the NVIDIA cuDNN library [1]. The Strassen algorithm for fast matrix multiplication was used by Cong and Xiao [3] to reduce the number of convolutions in a convnet layer, thereby reducing its total arithmetic complexity. The authors also suggested that more techniques from arithmetic complexity theory might be applicable to convnets. Various approaches have been attempted to reduce the complexity of convnets by quantizing or otherwise approximating the convolutional layer. We consider these approaches as orthogonal and complementary to those that exploit algebraic structure, and therefore declare them outside the scope of this paper. 1 3. Convolutional Neural Networks where A convnet layer correlates a bank of K filters with C channels and size R × S against a minibatch of N images with C channels and size H × W . We denote filter elements as Gk,c,u,v and image elements as Di,c,x,y . The computation of a single covnnet layer output Yi,k,x,y is given by the formula: Yi,k,x,y = C X R X S X Di,c,x+u,y+v Gk,c,u,v (1) c=1 v=1 u=1 and we can write the output of an entire image/filter pair as Yi,k = C X Di,c ∗ Gk,c (2) c=1 where ∗ denotes 2D correlation. 4. Fast Algorithms It has been known since at least 1980 that the minimal filtering algorithm for computing m outputs with an r-tap FIR filter, which we call F (m, r), requires µ(F (m, r)) = m + r − 1 (3) multiplications [13, p. 39]. Also, we can nest minimal 1D algorithms F (m, r) and F (n, s) to form minimal 2D algorithms for computing m × n outputs with an r × s filter, which we call F (m × n, r × s). These require µ(F (m × n, r × s)) = µ(F (m, r))µ(F (n, s)) = (m + r − 1)(n + s − 1) (4) multiplications [14]. We can continue to nest 1D algorithms to form algorithms for multi-dimensional FIR filters. It is interesting to note that in 1D, 2D, and multidimensions, the minimal algorithm requires a number of multiplications equal to the number of inputs. In other words, to compute F (m, r) we must access an interval of m + r − 1 data values, and to compute F (m × n, r × s) we must access a tile of (m + r − 1) × (n + s − 1) data values. Therefore the minimal filtering algorithm requires one multiplication per input. 4.1. F(2x2,3x3) The standard algorithm for F (2, 3) uses 2 × 3 = 6 multiplications. Winograd [13, p. 43] documented the following minimal algorithm:    g0    d d1 d2   m1 + m2 + m3 F (2, 3) = 0 g1 = d1 d2 d3 m2 − m3 − m4 g2 (5) m1 = (d0 − d2 )g0 m4 = (d1 − d3 )g2 g0 + g1 + g2 2 g0 − g1 + g2 m3 = (d2 − d1 ) 2 m2 = (d1 + d2 ) This algorithm uses just 4 multiplications and is therefore minimal by the formula µ(F (2, 3)) = 2 + 3 − 1 = 4. It also uses 4 additions involving the data, 3 additions and 2 multiplications by a constant involving the filter (the sum g0 + g2 can be computed just once), and 4 additions to reduce the products to the final result. Fast filtering algorithms can be written in matrix form as:   Y = AT (Gg) ⊙ (B T d) (6) where ⊙ indicates element-wise multiplication. F (2, 3), the matrices are:   1 0 −1 0 0 1 1 0  BT =  0 −1 1 0 0 1 0 −1   1 0 0 1 1 1 2 2 2 G= 1 1 − 21 2 2 0 0 1   1 1 1 0 AT = 0 1 −1 −1 T  g = g0 g1 g2 T  d = d0 d1 d2 d3 For (7) A minimal 1D algorithm F (m, r) is nested with itself to obtain a minimal 2D algorithm, F (m × m, r × r) like so:   (8) Y = AT [GgGT ] ⊙ [B T dB] A where now g is an r × r filter and d is an (m + r − 1) × (m + r − 1) image tile. The nesting technique can be generalized for non-square filters and outputs, F (m × n, r × s), by nesting an algorithm for F (m, r) with an algorithm for F (n, s). F (2 × 2, 3 × 3) uses 4 × 4 = 16 multiplications, whereas the standard algorithm uses 2 × 2 × 3 × 3 = 36. This is an arithmetic complexity reduction of 36 16 = 2.25. The data transform uses 32 additions, the filter transform uses 28 floating point instructions, and the inverse transform uses 24 additions. Algorithms for F (m × m, r × r) can be used to compute convnet layers with r × r kernels. Each image channel is divided into tiles of size (m + r − 1) × (m + r − 1), with r − 1 elements of overlap between neighboring tiles, yielding P = ⌈H/m⌉⌈W/m⌉ tiles per channel, C. F (m × m, r × r) is then computed for each tile and filter combination in each channel, and the results are summed over all channels. Substituting U = GgGT and V = B T dB, we have:   (9) Y = AT U ⊙ V A Labeling tile coordinates as (e x, ye), we rewrite the convnet layer formula (2) for a single image i, filter k, and tile coordinate (e x, ye) as: Yi,k,ex,ey = C X Di,c,ex,ey ∗ Gk,c c=1 = Uk,c ⊙ Vc,i,ex,ey A X C  Uk,c ⊙ Vc,i,ex,ey A T A c=1 = AT   C X c=1 (10) Thus we can reduce over C channels in transform space, and only then apply the inverse transform A to the sum. This amortizes the cost of the inverse transform over the number of channels. We examine the sum Mk,i,ex,ey = C X Uk,c ⊙ Vc,i,ex,ey (11) Algorithm 1 Compute Convnet Layer with Winograd Minimal Filtering Algorithm F (m × m, r × r) P = N ⌈H/m⌉⌈W/m⌉ is the number of image tiles. α = m + r − 1 is the input tile size. Neighboring tiles overlap by r − 1. dc,b ∈ Rα×α is input tile b in channel c. gk,c ∈ Rr×r is filter k in channel c. G, B T , and AT are filter, data, and inverse transforms. Yk,b ∈ Rm×m is output tile b in filter k. for k = 0 to K do for c = 0 to C do u = Ggk,c GT ∈ Rα×α (ξ,ν) Scatter u to matrices U: Uk,c = uξ,ν for b = 0 to P do for c = 0 to C do v = B T dc,b B ∈ Rα×α (ξ,ν) Scatter v to matrices V: Vc,b = vξ,ν for ξ = 0 to α do for ν = 0 to α do M (ξ,ν) = U (ξ,ν) V (ξ,ν) for k = 0 to K do for b = 0 to P do (ξ,ν) Gather m from matrices M: mξ,ν = Mk,b Yk,b = AT mA c=1 and simplify the notation by collapsing the image/tile coordinates (i, x e, ye) down to a single dimension, b. We also label each component of the element-wise multiplication separately, as (ξ, ν), yielding: (ξ,ν) Mk,b = C X (ξ,ν) (ξ,ν) Uk,c Vc,b 4.2. F(3x3,2x2) (12) c=1 This equation is just a matrix multiplication, so we can write: M (ξ,ν) = U (ξ,ν) V (ξ,ν) (13) Matrix multiply has efficient implementations on CPU, GPU, and FPGA platforms, owing to its high computational intensity. Thus we have arrived at the practical implementation for the fast algorithm listed in Algorithm 1. Winograd documented a technique for generating the minimal filtering algorithm F (m, r) for any choice of m and r. The construction uses the Chinese remainder theorem to produce a minimal algorithm for linear convolution, which is equivalent to polynomial multiplication, then transposes the linear convolution algorithm to yield a minimal filtering algorithm. The reader is referred to Winograd’s seminal book [13], or Blahut’s book [2] for a modern treatment of the subject. We provide derivations of the specific algorithms used in this paper in the supplementary material. Training a network using stochastic gradient descent requires computation of the gradients with respect to the inputs and weights. For a convnet layer, the gradient with respect to the inputs is a convolution of the next layer’s backpropagated error, of dimension N × K × H × W , with a flipped version of the layer’s R × S filters. Therefore it can be computed using the same algorithm that is used for forward propagation. The gradient with respect to the weights is a convolution of the layer inputs with the backpropagated errors, producing R × S outputs per filter and channel. Therefore we need to compute the convolution F (R×S, H ×W ), which is impractical because H ×W is much too large for our fast algorithms. Instead we decompose this convolution into a direct sum of smaller convolutions, for example F (3 × 3, 2 × 2). Here the algorithm’s 4 × 4 tiles are overlapped by 2 pixels in each dimension, and the 3 × 3 outputs are summed over all tiles to form F (3 × 3, H × W ). The transforms for F (3 × 3, 2 × 2) are given by:   1 0 −1 0  0 1 1 0     BT =  1 0  0 −1 1 0  1   1 2  0 −1 0 1 , G =  21    − 21  2 1 1 1 0 0 1 AT =  0 1 −1 0  0 1 1 1 (14) 4.4. Fast Fourier Transform With (3 + 2 − 1)2 = 16 multiplies versus direct convolution’s 3 × 3 × 2 × 2 = 36 multiplies, it achieves the same 36/16 = 2.25 arithmetic complexity reduction as the corresponding forward propagation algorithm. 4.3. F(4x4,3x3) A minimal algorithm for F (4, 3) has the form:   4 0 −5 0 1 0  0 −4 −4 1 1 0     0 4 −4 −1 1 0  T   B = 2 1 0   0 −2 −1   0 2 −1 −2 1 0  0 4 0 −5 0 1   1 0 0 4  −1 − 61 − 16    61 1  − − 16  6 6   G= 1 1 1  12 6   24 1   1 −1 24 12 6 0 0 1   1 1 1 1 1 0  0 1 −1 2 −2 0   AT =   0 1 1 4 4 0  0 1 −1 8 −8 1 tiles, the transforms cannot be computed accurately [13, p. 28]. Convnets require surprisingly little numeric precision [4, 5]. This implies that we can sacrifice some numeric accuracy in the filtering computation without affecting the accuracy of the convnet. We examine the possibility of F (6 × 6, 3 × 3) in the supplementary material. (15) The data transform uses 13 floating point instructions, the filter transform uses 8, and the inverse transform uses 10. Applying the nesting formula yields a minimal algorithm for F (4 × 4, 3 × 3) that uses 6 × 6 = 36 multiplies, while the standard algorithm uses 4 × 4 × 3 × 3 = 144. This is an arithmetic complexity reduction of 4. The 2D data transform uses 13(6 + 6) = 156 floating point instructions, the filter transform uses 8(3 + 6) = 72, and the inverse transform uses 10(6 + 4) = 100. The number of additions and constant multiplications required by the minimal Winograd transforms increases quadratically with the tile size [9, p. 211]. Thus for large tiles, the complexity of the transforms will overwhelm any savings in the number of multiplications. The magnitude of the transform matrix elements also increases with increasing tile size. This effectively reduces the numeric accuracy of the computation, so that for large The Fast Fourier Transform (FFT) can be used to produce a tiled convolution algorithm that has the same form as Algorithm 1. The main difference is that the transform matrices are replaced with FFT and inverse FFT, and point-wise multiplication of complex FFT components yields cyclic convolution. Only m × n components of the (m + r − 1) × (n + s − 1) cyclic convolution are valid, the rest must be discarded, and the tiles must be overlapped by r − 1 and s − 1 in order to recompute the discarded outputs. This technique is referred to as overlap and save [2, p. 195]. The similarity of overlap and save to our approach makes for an easy comparison. With FFT based convolution, the multiply stage still uses 1 multiply per input, but now the operands are complex numbers. Direct multiplication of complex numbers requires 4 real multiplications. Thankfully, a couple of tricks reduce the complexity further. The Fourier transform of a real signal has Hermitian symmetry, which reduces the number of unique products in each U ⊙V by almost half. FFT based convnet implementations have exploited this property [10, 12]. Specifically, the discrete Fourier transform of a α × α array of real values can be represented with an array of α × (⌊ α2 ⌋ + 1) complex values. Furthermore U H V H = (U V )H , so the products of the missing values can be reconstructed simply by taking the complex conjugate of the computed values. Thus the multiply stage of the FFT convnet algorithm with tile size α H ⌉⌈ W α = m + r − 1 requires N ⌈ m m ⌉CKα(⌊ 2 ⌋ + 1) comα plex multiplications, or (⌊ 2 ⌋+1)/α complex multiplies per input. Using the standard algorithm for multiplying complex numbers, this equals 4(⌊ α2 ⌋ + 1)/α > 2 real multiplies per input. Another technique, which to our knowledge has not been used in convnets, is to use a fast algorithm to multiply complex numbers with 3 real multiplications [13]: (x0 + ix1 )(y0 + iy1 ) = [x0 y0 − x1 y1 , i(x0 y1 + x1 y0 )] = [uc va + ua vc , i(ua vc − ub vb )] (16) where va = y0 ua = x0 ub = x0 + x1 , vb = y1 uc = x1 − x0 vc = y0 + y1 (17) Tile 3 4 5 6 8 16 32 64 128 256 α′ 9.00 4.00 2.78 2.25 1.78 Winograd β′ γ′ 2.00 1.75 3.60 2.24 4.33 2.00 6.50 2.23 δ′ 1.50 2.24 2.78 4.38 α′ FFT β ′ , γ ′, δ′ 4.44 2.94 2.42 2.20 2.10 2.05 2.42 4.23 6.24 8.30 10.37 12.42 Table 1. Multiply (α′ ), data transform (β ′ ), filter transform (γ ′ ), and inverse transform (δ ′ ) normalized arithmetic complexity versus tile size, for both Winograd and FFT based convolution. F(4x4,3x3) has tile size 6. Direct convolutions has tile size 3. An FFT based convnet algorithm can incorporate this by modifying the FFT transforms of the filter and data to output the the real valued matrices (Ua , Ub , Uc ) and (Va , Vb , Vc ) instead of the complex valued matrices U and V . This adds 2 floating point instructions per output to the filter transform, and 1 to the data transform. It also increases the memory footprint of each matrix by half. Then we can calculate M = U V using 3 calls to a standard real matrix multiply function (e.g. SGEMM): T = Ua Vc M0 = Uc Va + T M1 = −Ub Vb + T, M = (M0 , iM1 ) (18) The accumulation of temporary matrix T is performed using regular SGEMM with β = 1 and C = T , at the cost of adding 2 floating point instructions per output. We can think of these instructions as adding to the inverse transform cost. The temporary matrix T increases memory use by half, so that the total workspace size is approximately twice that of FFT based convolution with direct CGEMM. Combining Hermitian symmetry with fast CGEMM gives us a multiplication stage with 3(⌊ α2 ⌋ + 1)/α > 1.5 real multiplies per input. Recall that the multiply stage of the Winograd algorithms is always 1 real multiply per input. Thus even with fast CGEMM, FFT base convolution must use a significantly larger tile size in order to rival the arithmetic complexity of the Winograd algorithms. For the FFT transform itself, we consider the split-radix FFT algorithm, which is the minimal practical FFT algorithm when N is a power of 2 [9, p. 150]. We assume the 2D FFT transform is constructed using row-column composition, and borrow the complexity figures from the DSP Handbook [9, pp. 173,175] for Table 1. Tile 8 16 32 64 128 256 FFT with Fast CGEMM α′ β′ γ′ δ′ 3.33 3.77 4.30 4.30 2.20 6.23 6.82 6.82 1.81 8.94 9.57 9.57 1.65 11.72 12.36 12.36 1.57 14.48 15.14 15.14 1.54 17.22 17.88 17.88 Table 2. Normalized arithmetic complexity for FFT filtering with fast CGEMM. Fast CGEMM uses 3 multiplies per complex multiply instead of 4, but has slightly greater transform overhead and uses more memory. 5. Arithmetic Complexity Analysis In our model of fast convnets, the arithmetic complexity of the multiplication stage is: M = N ⌈H/m⌉⌈W/n⌉CK(m + R − 1)(n + S − 1) (19) When m = n = 1, the formula equals the arithmetic complexity of direct convolution. Therefore direct convolution is the minimal algorithm for F (1 × 1, R × S) Although our analysis employs minimal convolutions, the convnet layer itself is still not minimal because it performs more convolutions than are strictly necessary. We could reduce the number of convolutions by employing Strassen recursions as in [3], but each recursion reduces all 3 dimensions of our matrices by half while providing only an 87 reduction in arithmetic complexity. The matrix multiplications cannot be computed efficiently if C or K is too small. Fast convolution alone provides a 2.25 or larger arithmetic complexity reduction while shrinking only the largest dimension of the matrix, P . Still, for layers with large C, K, and P , it may be worthwhile to perform Strassen recursions in addition to fast convolution. We leave this as an area for further research. In order to simplify the equations, we will henceforth assume that W/m and H/n have no remainders. We also assume square filters and blocks, R = S and m = n. The multiplication complexity can be rewritten as: M = (m + R − 1)2 /m2 N HW CK = α′ N HW CK (20) where α = (m + R − 1)2 and α′ = α/m2 The total arithmetic complexities of the data, filter, and inverse transforms can be written as: T (D) = β/m2 N HW C T (F ) = γCK 2 T (I) = δ/m N HW K (21) where β, γ, and δ are the number of floating point instructions used by the corresponding transforms for single tiles. Dividing the complexity of each transform by M yields its relative complexity: T (D)/M = β/(Kα2 ) = β ′ /K T (F )/M = γ/(N HW α2 /m2 ) = γ/(P α2 ) = γ ′ /P 2 6. GPU Implementation (22) ′ T (I)/M = δ/(Cα ) = δ /C We call β ′ , γ ′ , and δ ′ the normalized arithmetic complexities of the data, filter, and inverse transforms, respectively. P = N HW/m2 is the number of tiles per channel. Adding the terms for each stage gives the total arithmetic complexity of the convnet layer: L = α′ (1 + β ′ /K + γ ′ /P + δ ′ /C)N HW CK large enough dimensions so that the multiply stage is efficient. This is problematic for current GPUs, which have a limited amount of on chip memory. CPUs have large caches and might therefore compute FFT based convolution more efficiently. (23) In order to achieve a large speedup, the multiplication complexity α′ must be as small as possible, and the transform complexities β ′ , γ ′ , and δ ′ must each be small compared with K, P , and C, respectively. For direct convolution, α′ = α2 = R2 and β ′ = γ ′ = δ ′ = 0. Therefore the maximum speedup of a fast algorithm versus direct convolution is R2 /α′ . We list the normalized transform complexity for different tile sizes and algorithms in Tables 1 and 2. Due to its similarity to our approach, FFT based convolution complexity can also be measured with Equation 23. FFT based convnet layers with direct CGEMM must use tile size at least 64 × 64 to equal the multiplication stage complexity of Winograd F (4 × 4, 3 × 3) and its 6 × 6 tile, but then it incurs much greater transform overhead. Also a 64 × 64 tile will waste computation on many unwanted pixels for images with sizes that are not close to a multiple of 62 × 62. Even for moderate size layers, a moderate to large minibatch must be used, or there will be too few tiles to compute the CGEMM efficiently. Finally, the memory used by a single transformed filter channel is 64 × 64 = 4096 units, which is a large expansion of the 3 × 3 = 9 unit filter. The 6x6 tile of F (4 × 4) expands the same filter to 6 × 6 = 36 units. FFT based convnet layers with fast CGEMM can be much more competitive with Winograd algorithms. They have multiplication stage parity with tile size 16, and reasonable transform complexity. Also tile size 16 generates a reasonably large number of tiles with large convnet layers or moderate batch size. Even with fast CGEMM, the larger tile size compared to Winograd means FFT based convnet implementations must have a large memory workspace to hold transformed data. A decent amount of transformed data must be held in order to amortize transform cost and to generate matrices with We implemented F (2 × 2, 3 × 3) for NVIDIA Maxwell GPUs and tested on the NVIDIA Titan X model. The small 4 × 4 tile size and light weight transforms of F (2 × 2, 3 × 3) make possible a fused implementation of the algorithm stages, where the the data and filter transform, 16 batched matrix multiplies (GEMMs), and inverse transform are all computed in the same block. Another resource limit is the instruction cache, which can only fit about 720 instructions. Our main loop is larger than this, but aligning the start of the loop with the 128 byte instruction cache-line boundary helps mitigate the cost of a cache miss. The 16 batched GEMMs compute 32×32 outputs, which enables us to fit the workspace in the registers and shared memory of a single block and still have 2 active blocks per SM for latency hiding. Zero padding is implicit through use of predicates. If the predicate deselects a global image load, the zero value is loaded with a dual issued I2I instruction. Image data is stored in CHWN order to facilitate contiguous and aligned memory loads, significantly reducing over-fetch. We employ a “super blocking” strategy to load 32 tiles of size 4 × 4 from a configurable number of images, rows, and columns. For N >= 32, we load tiles from 32 separate images. For N < 32, we load a super block of X × Y = 32/N tiles per image. This strategy facilitates efficient loads with small batch sizes, as the W × N dimensions of the input data are contiguous in memory. Furthermore, the 2 pixel overlap between adjacent tiles causes high L1 cache hit rates when using several tiles in a super block. We also employ L2 cache blocking to increase the re-use of overlapping blocks. Since the number of image tiles is typically much larger than the number of filters, our block mapping iterates over a group of up to 128 filters in the inner loop, and then iterates over all image tiles in the second loop. All channels of the filter group fit in L2 cache, so each filter will only be loaded once from DDR memory, and each image tile will be loaded ⌈K/128⌉ times as we iterate over the filter groups. This strategy reduces DDR memory bandwidth by almost half. We implemented a version of our kernel that loads fp16 data, which decreases global memory bandwidth. We also implemented a variant that we call “FX” that runs a filter transform kernel first and stores the result in a workspace buffer. The convolution kernel loads transformed filter values from the workspace as needed. The size of the workspace is only 16KC units of memory, which equals just 16MB when K = C = 512 and data is fp32. Layer conv 1.1 conv 1.2 conv 2.1 conv 2.2 conv 3.1 conv 3.2 conv 4.1 conv 4.2 conv 5 Total Depth 1 1 1 1 1 3 1 3 4 C ×H ×W 3 × 224 × 224 64 × 224 × 224 64 × 112 × 112 128 × 112 × 112 128 × 56 × 56 256 × 56 × 56 256 × 28 × 28 512 × 28 × 28 512 × 14 × 14 K 64 64 128 128 256 256 512 512 512 GFLOPs 0.17 3.70 1.85 3.70 1.85 11.10 1.85 11.10 3.70 39.02 Table 3. Convolution layers of VGG network E. All layers uses 3 × 3 filters. Depth indicates the number of times a given layer shape occurs in the network. GFLOPs is weighted by depth and assumes N=1. 7. Experiments We ran accuracy and speed experiments with VGG Network E [11]. This is a deep network that uses 3×3 filters exclusively in the convolution layers, which are summarized in Table 3. We tested the accuracy of our fast algorithms with both single precision (fp32) and half precision (fp16) data and filters. In all tests we used fp32 arithmetic instructions. We used random data and filters from the uniform distribution [−1, 1] and measured absolute element error. Ground truth was computed by direct convolution using a double precision accumulator for reductions. We measured the speed of our GPU implementation of F (2 × 2, 3 × 3) and compared with cuDNN v3 [1] on a superclocked NVIDIA Titan X GPU. We disabled boost clock and observed a maximum clock rate of 1126MHz. The GPU has 3072 cores, yielding a device peak throughput of 2 × 3072 × 1126 = 6.96 TFLOPS. Speed for a given layer was calculated by dividing the number of GFLOPs of computation required by direct convolution, as tabulated in 3, by the run time in milliseconds to yield Effective TFLOPS. The reduction of arithmetic complexity allows fast algorithms to have Effective TFLOPS that can exceed device peak throughput. Total GFLOPs and run time were calculated by weighting the GFLOPs and run time for each layer by its depth, and total throughput was calculated as the ratio of the two. 8. Results Table 4 shows the numeric accuracy of the different convolution layer algorithms tested with single precision (fp32) and half precision (fp16) input data and filters. F (2 × 2, 3 × 3) is actually slightly more accurate than direct convolution. Its simple transforms do not lose much precision, and its multiplication stage performs a reduction over C channels, rather than the RSC filter elements reduced by direct convolution. F (4 × 4, 3 × 3) has a larger error, but it is still more accurate than direct convolution with fp16 data. All tested algorithms are equally accurate with fp16 data. Here accuracy is limited by the precision of the inputs. Because direct convolution is accurate enough for training and inference with low precision data [4, 5], we conclude that F (4 × 4, 3 × 3) is too. Table 5 and Table 6 show the total throughput for VGG Network E layers for cuDNN and our F (2×2, 3×3) implementation for fp32 and fp16 data for different batch sizes. For fp32 data, F (2 × 2, 3 × 3) is 1.48X at N = 64 and 2.26X as fast at N = 1. The throughput at N = 16 is 9.49 TFLOPS. For fp16 data, F (2×2, 3×3) extends its lead over cuDNN, recording 10.28 TFLOPS throughput for N = 64. N = 8 performance is still very good at 9.57 TFLOPS. Figure 1 shows throughput by layer. Hatch marks indicate the layers where cuDNN used the FFT algorithm, otherwise direct convolution was used. For F (2 × 2, 3 × 3), hatch marks indicate that the external filter transform (FX) was used, otherwise the fused transform was faster. cuDNN appears to erroneously select its FFT algorithm for intermediate values of N despite the fact that it performs very poorly, under 2 TFLOPS. While this is probably just a bug, it is revealing. Low performance at moderate values of N suggests that the FFT convolution implementation either uses large tiles, or possibly just a single tile per image, as in [12], which leads to inefficient multiplication stages unless N is large. At large N , cuDNN FFT performs much better, but stays well under 8 TFLOPS. F (2×2, 3×3) performs better than cuDNN at every layer and batch size, except layer conv1.1, which contributes less than 0.5% of the total network computation. In general, we found that the FX variant of our implementation performed best unless the number of filters and channels was very large. Computing the filter transform is heavily memory bound, therefore transforming a larger filter bank decreases computational efficiency. The worst F (2 × 2, 3 × 3) performance occurs for the 14×14 layers when N = 1. In this case the 8×4 superblock runs over the image boundary and computes unwanted pixels. Throughput on this layer configuration is still over 5 TFLOPS, where cuDNN performance is just 1.6 TFLOPS. cuDNN FFT uses a global memory workspace up to 2.6 GB in our experiments. By contrast, our fused F (2 × 2, 3 × 3) implementation does not use any global workspace, and the FX variant uses no more than 16 MB. F (2 × 2, 3 × 3) performance shows new capabilities for high throughput and small batch size with state of the art convolutional neural networks. We expect performance to increase again when F (4 × 4, 3 × 3) is implemented. Layer 1.2 2.2 3.2 4.2 5 Direct 4.01E-05 8.01E-05 1.53E-04 3.20E-04 3.43E-04 fp32 F(2x2,3x3) 1.53E-05 2.86E-05 5.34E-05 5.34E-05 4.20E-05 F(4x4,3x3) 2.84E-04 5.41E-04 9.06E-04 1.04E-03 1.08E-03 vgg.conv1.1 12 10 8 6 4 2 0 fp16 1.14E-02 1.45E-02 1.99E-02 3.17E-02 2.61E-02 vgg.conv1.2 12 10 8 6 4 2 0 vgg.conv2.1 12 10 8 6 4 2 0 Table 4. Maximum element error on VGG network layers. With fp32 data, F (2×2, 3×3) is more accurate than direct convolution. With fp16 data, all algorithms are equally accurate. vgg.conv2.2 N 1 2 4 8 16 32 64 cuDNN msec TFLOPS 12.52 3.12 20.36 3.83 104.70 1.49 241.21 1.29 203.09 3.07 237.05 5.27 394.05 6.34 F(2x2,3x3) msec TFLOPS 5.55 7.03 9.89 7.89 17.72 8.81 33.11 9.43 65.79 9.49 132.36 9.43 266.48 9.37 Speedup 2.26X 2.06X 5.91X 7.28X 3.09X 1.79X 1.48X Table 5. cuDNN versus F (2 × 2, 3 × 3) performance on VGG Network E with fp32 data. Throughput is measured in Effective TFLOPS, the ratio of direct algorithm GFLOPs to run time. N 1 2 4 8 16 32 64 cuDNN msec TFLOPS 14.58 2.68 20.94 3.73 104.19 1.50 241.87 1.29 204.01 3.06 236.13 5.29 395.93 6.31 F(2x2,3x3) msec TFLOPS 5.53 7.06 9.83 7.94 17.50 8.92 32.61 9.57 62.93 9.92 123.12 10.14 242.98 10.28 Effective TFLOPS 12 10 8 6 4 2 0 vgg.conv3.1 12 10 8 6 4 2 0 vgg.conv3.2 12 10 8 6 4 2 0 vgg.conv4.1 12 10 8 6 4 2 0 vgg.conv4.2 12 10 8 6 4 2 0 Speedup 2.64X 2.13X 5.95X 7.42X 3.24X 1.92X 1.63X Table 6. cuDNN versus F (2 × 2, 3 × 3) performance on VGG Network E with fp16 data. 12 10 8 6 4 2 0 vgg.conv5 1 2 4 cuDNN cuDNN FFT cudNN fp16 cudNN FFT fp16 8 Batch Size 16 32 64 F(2x2,3x3) F(2x2,3x3) FX F(2x2,3x3) fp16 F(2x2,3x3) FX fp16 Figure 1. VGG net Effective TFLOPS vs. batch size for cuDNN and F (2 × 2, 3 × 3) on a 6.96 TFLOPS NVIDIA Titan X GPU. References [1] cuDNN. https://developer.nvidia.com/cudnn. Accessed: 2015-11-01. 1, 7 [2] Richard E Blahut. Fast algorithms for signal processing. Cambridge University Press, 2010. 3, 4 [3] Jason Cong and Bingjun Xiao. Minimizing computation in convolutional neural networks. In Artificial Neural Networks and Machine Learning–ICANN 2014, pages 281–290. Springer, 2014. 1, 5 [4] Matthieu Courbariaux, Yoshua Bengio, and JeanPierre David. Low precision arithmetic for deep learning. CoRR, abs/1412.7024, 2014. 4, 7 [5] Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. arXiv preprint arXiv:1502.02551, 2015. 4, 7 [6] Suyog Gupta, Wei Zhang, and Josh Milthrope. Model accuracy and runtime tradeoff in distributed deep learning. arXiv preprint arXiv:1509.04210, 2015. 1 [7] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 1 [8] Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014. 1 [9] V. Madisetti. The Digital Signal Processing Handbook. Number v. 2 in Electrical engineering handbook series. CRC, 2010. 4, 5 [10] Michaël Mathieu, Mikael Henaff, and Yann LeCun. Fast training of convolutional networks through ffts. CoRR, abs/1312.5851, 2013. 1, 4 [11] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 1, 7 [12] Nicolas Vasilache, Jeff Johnson, Michaël Mathieu, Soumith Chintala, Serkan Piantino, and Yann LeCun. Fast convolutional nets with fbfft: A GPU performance evaluation. CoRR, abs/1412.7580, 2014. 1, 4, 7 [13] Shmuel Winograd. Arithmetic complexity of computations, volume 33. Siam, 1980. 1, 2, 3, 4 [14] Shmuel Winograd. On multiplication of polynomials modulo a polynomial. SIAM Journal on Computing, 9(2):225–229, 1980. 2
9cs.NE
Under consideration for publication in Theory and Practice of Logic Programming 1 arXiv:1210.2282v2 [cs.PL] 9 Oct 2012 Towards Multi-Threaded Local Tabling Using a Common Table Space MIGUEL AREIAS and RICARDO ROCHA CRACS & INESC TEC, Faculty of Sciences, University of Porto Rua do Campo Alegre, 1021/1055, 4169-007 Porto, Portugal (e-mail: {miguel-areias,ricroc}@dcc.fc.up.pt) submitted 1 January 2003; revised 1 January 2003; accepted 1 January 2003 Abstract Multi-threading is currently supported by several well-known Prolog systems providing a highly portable solution for applications that can benefit from concurrency. When multithreading is combined with tabling, we can exploit the power of higher procedural control and declarative semantics. However, despite the availability of both threads and tabling in some Prolog systems, the implementation of these two features implies complex ties to each other and to the underlying engine. Until now, XSB was the only Prolog system combining multi-threading with tabling. In XSB, tables may be either private or shared between threads. While thread-private tables are easier to implement, shared tables have all the associated issues of locking, synchronization and potential deadlocks. In this paper, we propose an alternative view to XSB’s approach. In our proposal, each thread views its tables as private but, at the engine level, we use a common table space where tables are shared among all threads. We present three designs for our common table space approach: No-Sharing (NS) (similar to XSB’s private tables), Subgoal-Sharing (SS) and Full-Sharing (FS). The primary goal of this work was to reduce the memory usage for the table space but, our experimental results, using the YapTab tabling system with a local evaluation strategy, show that we can also achieve significant reductions on running time. To appear in Theory and Practice of Logic Programming. KEYWORDS: Tabling, Multi-Threading, Implementation. 1 Introduction Tabling (Chen and Warren 1996) is a recognized and powerful implementation technique that overcomes some limitations of traditional Prolog systems in dealing with recursion and redundant sub-computations. In a nutshell, tabling is a refinement of SLD resolution that stems from one simple idea: save intermediate answers from past computations so that they can be reused when a similar call appears during the resolution process1 . Tabling based models are able to reduce the search space, 1 We can distinguish two main approaches to determine similarity between tabled subgoal calls: variant-based tabling and subsumption-based tabling. 2 Miguel Areias and Ricardo Rocha avoid looping, and always terminate for programs with the bounded term-size property (Chen and Warren 1996). Work on tabling, as initially implemented in the XSB system (Sagonas and Swift 1998), proved its viability for application areas such as natural language processing, knowledge based systems, model checking, program analysis, among others. Currently, tabling is widely available in systems like XSB, Yap, B-Prolog, ALS-Prolog, Mercury and Ciao. Nowadays, the increasing availability of computing systems with multiple cores sharing the main memory is already a standardized, high-performance and viable alternative to the traditional (and often expensive) shared memory architectures. The number of cores per processor is expected to continue to increase, further expanding the potential for taking advantage of multi-threading support. The ISO Prolog multi-threading standardization proposal (Moura 2008) is currently implemented in several Prolog systems including XSB, Yap, Ciao and SWI-Prolog, providing a highly portable solution given the number of operating systems supported by these systems. Multi-threading in Prolog is the ability to concurrently perform multiple computations, in which each computation runs independently but shares the database (clauses). When multi-threading is combined with tabling, we have the best of both worlds, since we can exploit the combination of higher procedural control with higher declarative semantics. In a multi-threaded tabling system, tables may be either private or shared between threads. While thread-private tables are easier to implement, shared tables have all the associated issues of locking, synchronization and potential deadlocks. Here, the problem is even more complex because we need to ensure the correctness and completeness of the answers found and stored in the shared tables. Thus, despite the availability of both threads and tabling in Prolog compilers such as XSB, Yap, and Ciao, the implementation of these two features such that they work together seamlessly implies complex ties to one another and to the underlying engine. Until now, XSB was the only system combining tabling with multi-threading, for both private and shared tables (Marques and Swift 2008; Swift and Warren 2012). For shared tables, XSB uses a semi-naive approach that, when a set of subgoals computed by different threads is mutually dependent, then a usurpation operation (Marques 2007; Marques et al. 2010) synchronizes threads and a single thread assumes the computation of all subgoals, turning the remaining threads into consumer threads. The basis for our work is also on multi-threaded tabling using private tables, but we propose an alternative view to XSB’s approach. In our proposal, each thread has its own tables, i.e., from the thread point of view the tables are private, but at the engine level we use a common table space, i.e., from the implementation point of view the tables are shared among all threads. We present three designs for our common table space approach: No-Sharing (NS) (similar to XSB with private tables), Subgoal-Sharing (SS) and Full-Sharing (FS). Experimental results, using the YapTab tabling system (Rocha et al. 2005) with a local evaluation strategy (Freire et al. 1995), show that the FS design can achieve significant reductions on memory usage and on execution time, compared to the NS and SS designs, for a set of worst case scenarios where all threads start with the same query goal. Towards Multi-Threaded Local Tabling Using a Common Table Space 3 The remainder of the paper is organized as follows. First, we describe YapTab’s table space organization and XSB’s approach for multi-threaded tabling. Next, we introduce our three designs and discuss important implementation details. We then present some experimental results and outline some conclusions. 2 Basic Concepts In this section, we introduce some background needed for the following sections. We begin by describing the actual YapTab’s table space organization, and then we briefly present XSB’s approach for supporting multi-threaded tabling. 2.1 YapTab’s Table Space Organization The basic idea behind tabling is straightforward: programs are evaluated by storing answers for tabled subgoals in an appropriate data space, called the table space. Similar calls to tabled subgoals are not re-evaluated against the program clauses, instead they are resolved by consuming the answers already stored in their table entries. During this process, as further new answers are found, they are stored in their tables and later returned to all similar calls. A critical component in the implementation of an efficient tabling system is thus the design of the data structures and algorithms to access and manipulate tabled data. The most successful data structure for tabling is tries (Ramakrishnan et al. 1999). Tries are trees in which common prefixes are represented only once. The trie data structure provides complete discrimination for terms and permits look up and possibly insertion to be performed in a single pass through a term, hence resulting in a very efficient and compact data structure for term representation. Figure 1 shows the general table space organization for a tabled predicate in YapTab. Tabled Predicate Compliled Code Table Entry Subgoal Trie Structure Subgoal Frame call_1 Subgoal Frame call_2 . . . Subgoal Frame call_n Answer Trie Structure Answer Trie Structure . . . Answer Trie Structure Fig. 1. YapTab’s table space organization At the entry point we have the table entry data structure. This structure is 4 Miguel Areias and Ricardo Rocha allocated when a tabled predicate is being compiled, so that a pointer to the table entry can be included in its compiled code. This guarantees that further calls to the predicate will access the table space starting from the same point. Below the table entry, we have the subgoal trie structure. Each different tabled subgoal call to the predicate at hand corresponds to a unique path through the subgoal trie structure, always starting from the table entry, passing by several subgoal trie data units, the subgoal trie nodes, and reaching a leaf data structure, the subgoal frame. The subgoal frame stores additional information about the subgoal and acts like an entry point to the answer trie structure. Each unique path through the answer trie data units, the answer trie nodes, corresponds to a different answer to the entry subgoal. 2.2 XSB’s Approach to Multi-Threaded Tabling XSB offers two types of models for supporting multi-threaded tabling: private tables and shared tables (Swift and Warren 2012). For private tables, each thread keeps its own copy of the table space. On one hand, this avoids concurrency over the tables but, on the other hand, the same table can be computed by several threads, thus increasing the memory usage necessary to represent the table space. For shared tables, the running threads store only once the same table, even if multiple threads use it. This model can be viewed as a variation of the table-parallelism proposal (Freire et al. 1995), where a tabled computation can be decomposed into a set of smaller sub-computations, each being performed by a different thread. Each tabled subgoal is computed independently by the first thread calling it, the generator thread, and each generator is the sole responsible for fully exploiting and obtaining the complete set of answers for the subgoal. Similar calls by other threads are resolved by consuming the answers stored by the generator thread. In a tabled evaluation, there are several points where we may have to choose between continuing forward execution, backtracking, consuming answers from the table, or completing subgoals. The decision on which operation to perform is determined by the evaluation strategy. The two most successful strategies are batched evaluation and local evaluation (Freire et al. 1996). Batched evaluation favors forward execution first, backtracking next, and consuming answers or completion last. It thus tries to delay the need to move around the search tree by batching the return of answers. When new answers are found for a particular tabled subgoal, they are added to the table space and the evaluation continues. On the other hand, local evaluation tries to complete subgoals as soon as possible. When new answers are found, they are added to the table space and the evaluation fails. Answers are only returned when all program clauses for the subgoal at hand were resolved. Based on these two strategies, XSB supports two types of concurrent evaluations: concurrent local evaluation and concurrent batched evaluation. In the concurrent local evaluation, similar calls by other threads are resolved by consuming the answers stored by the generator thread, but a consumer thread suspends execution until the table is completed. In the concurrent batched evaluation, new answers are con- Towards Multi-Threaded Local Tabling Using a Common Table Space 5 sumed as they are found, leading to more complex dependencies between threads. In both evaluation strategies, when a set of subgoals computed by different threads is mutually dependent, then a usurpation operation (Marques et al. 2010) synchronizes threads and a single thread assumes the computation of all subgoals, turning the remaining threads into consumer threads. 3 Our Approach Yap implements a SWI-Prolog compatible multi-threading library (Wielemaker 2003). Like in SWI-Prolog, Yap’s threads have their own execution stacks and only share the code area where predicates, records, flags and other global nonbacktrackable data are stored. Our approach for multi-threaded tabling is still based on this idea in which each computational thread runs independently. This means that each tabled evaluation depends only on the computations being performed by the thread itself, i.e., there isn’t the notion of being a consumer thread since, from each thread point of view, a thread is always the generator for all of its subgoal calls. We next introduce the three alternative designs for our approach: No-Sharing (NS), Subgoal-Sharing (SS) and Full-Sharing (FS). In what follows, we assume a local evaluation strategy. 3.1 No-Sharing The starting point of our work is the situation where each thread allocates fully private tables for each new subgoal called during its computation. Figure 2 shows the configuration of the table space if several different threads call the same tabled subgoal call i. One can observe that the table entry data structure still stores the common information for the predicate (such as the arity or the evaluation strategy), and then each thread t has its own cell Tt inside a bucket array which points to the private data structures. The subgoal trie structure, the subgoal frames and the answer trie structures are private to each thread and they are removed when the thread finishes execution. The memory usage for this design for a particular tabled predicate P , assuming that all running threads N T have completely evaluated the same number N S of subgoals, is sizeof (T EP ) + sizeof (BAP ) + [sizeof (ST SP ) + [sizeof (SFP ) + sizeof (AT SP )] ∗ N S] ∗ N T , where T EP and BAP represent the common table entry and bucket array data structures, ST SP and AT SP represent the nodes inside the subgoal and answer trie structures, and SFP represents the subgoal frames. 3.2 Subgoal-Sharing In our second design, the threads share part of the table space. Figure 3 shows again the configuration of the table space if several different threads call the same tabled subgoal call i. In this design, the subgoal trie structure is now shared among the threads and the leaf data structures in each subgoal trie path, instead of pointing to a subgoal frame, they now point to a bucket array. Each thread t has its own 6 Miguel Areias and Ricardo Rocha Table Entry . . . Tk-3 Tk-2 Tk-1 Subgoal Trie Structure Subgoal Trie Structure Subgoal Trie Structure Subgoal Frame call_i Subgoal Frame call_i Subgoal Frame call_i Answer Trie Structure Answer Trie Structure Answer Trie Structure T0 T1 T2 Fig. 2. Table space organization for the NS design cell Tt inside the bucket array which then points to a private subgoal frame and answer trie structure. In this design, concurrency among threads is restricted to the allocation of new entries on the subgoal trie structure. Whenever a thread finishes execution, its private structures are removed, but the shared part remains present as it can be in use or be further used by other threads. Assuming again that all running threads N T have completely evaluated the same number N S of subgoals, the memory usage for this design for a particular tabled predicate P is sizeof (T EP )+sizeof (ST SP )+ [sizeof (BAP ) + [sizeof (SFP ) + sizeof (AT SP )] ∗ N T ] ∗ N S, where BAP represents the bucket array pointing to the private data structures. Table Entry Subgoal Trie Structure . . . Tk-3 Tk-2 Tk-1 Subgoal Frame call_i Subgoal Frame call_i Subgoal Frame call_i Answer Trie Structure Answer Trie Structure Answer Trie Structure T0 T1 T2 Fig. 3. Table space organization for the SS design Towards Multi-Threaded Local Tabling Using a Common Table Space 7 3.3 Full-Sharing Our third design is the most sophisticated among three. Figure 4 shows its table space organization if considering several different threads calling the same tabled subgoal call i. In this design, part of the subgoal frame information (the subgoal entry data structure in Fig. 4) and the answer trie structure are now also shared among all threads. The previous subgoal frame data structure was split into two: the subgoal entry stores common information for the subgoal call (such as the pointer to the shared answer trie structure); the remaining information (the subgoal frame data structure in Fig. 4) remains private to each thread. Table Entry Subgoal Trie Structure Subgoal Entry call_i T0 Answer Trie Structure . . . Tk-3 Tk-2 Tk-1 Subgoal Frame call_i Subgoal Frame call_i Subgoal Frame call_i Sg_Entry Sg_Entry Sg_Entry T1 T2 Fig. 4. Table space organization for the FS design The subgoal entry also includes a bucket array, in which each cell Tt points to the private subgoal frame of each thread t. The private subgoal frames include an extra field which is a back pointer to the common subgoal entry. This is important because, with that, we can keep unaltered all the tabling data structures that point to subgoal frames. To access the private information on the subgoal frames there is no extra cost (we still use a direct pointer), and only for the common information on the subgoal entry we pay the extra cost of following an indirect pointer. Again, assuming that all running threads N T have completely evaluated the same number N S of subgoals, the memory usage for this design for a particular tabled predicate P is sizeof (T EP ) + sizeof (ST SP ) + [sizeof (SEP ) + sizeof (BAP ) + sizeof (AT SP ) + sizeof (SFP ) ∗ N T ] ∗ N S, where SEP and SFP represent, respectively, the shared subgoal entry and the private subgoal frame data structures. In this design, concurrency among threads now also includes the access to the subgoal entry data structure and the allocation of new entries on the answer trie structures. However, this latest design has two major advantages. First, memory usage is reduced to a minimum. The only memory overhead, when compared with a single threaded evaluation, is the bucket array associated with each subgoal entry, and apart from the split on the subgoal frame data structure, all the remaining structures remain unchanged. Second, since threads are sharing the same answer 8 Miguel Areias and Ricardo Rocha trie structures, answers inserted by a thread for a particular subgoal call are automatically made available to all other threads when they call the same subgoal. As we will see in section 5, this can lead to reductions on the execution time. 4 Implementation In this section, we discuss some low level details regarding the implementation of the three designs. We begin by describing the expansion of the table space to efficiently support multiple threads, next we discuss the locking schemes used to ensure mutual exclusion over the table space, and then we discuss how the most important tabling operations were extended for multi-threaded tabling support. 4.1 Efficient Support for Multiple Threads Our proposals already include support for any number of threads working on the same table. For that, we extended the original table data structures with bucket arrays. For example, for the NS design, we introduced a bucket array in the table entry (see Fig. 2), for the SS design, the bucket array follows a subgoal trie path (see Fig. 3), and for the FS design, the bucket array is part of the new subgoal entry data structure (see Fig. 4). These bucket arrays contain as much entry cells as the maximum number of threads that can be created in Yap (currently 1024). However, in practice, this solution is highly inefficient and memory consuming, as we must always allocate this huge bucket array even when only one thread will use it. To solve this problem, we introduce a kind of inode pointer structure, where the bucket array is split into direct bucket cells and indirect bucket cells. The direct bucket cells are used as before and the indirect bucket cells are only allocated as needed. This new structure applies to all bucket arrays in the three designs. Figure 5 shows an example on how this new structure is used in the FS design. Subgoal Entry call_i T0 Subgoal Frame call_i Sg_Entry T2 ... Ts-1 B0 Ts Ts+1 Ts+2 ... Bu-3 Bu-2 Bu-1 Subgoal Frame call_i Sg_Entry . . . Answer Trie Structure T1 . . . Tk-3 Tk-2 Tk-1 Subgoal Frame call_i Sg_Entry Fig. 5. Using direct and indirect bucket cells in the FS design A bucket array has now two operating modes. If it is being used by a thread Towards Multi-Threaded Local Tabling Using a Common Table Space 9 with an identification number t lower than a default starting size s (32 in our implementation), then the buckets are used as before, meaning that the entry cell Tt still points to the private information of the corresponding thread. But now, if a thread with an identification number equal or higher than s appears, the thread is mapped into one of the u undirected buckets (entry cells B0 until Bu−1 in Fig. 5), which becomes a pointer to a second level bucket array that will now contain the entry cells pointing to the private thread information. Given a thread t (t ≥ s), its index in the first and in the second level bucket arrays is given by the division and the remainder of (t − s) by u, respectively. 4.2 Table Locking Schemes Remember that the SS and FS designs introduce concurrency among threads when accessing shared resources of the table space. Here, we discuss how we use locking schemes to ensure mutual exclusion when manipulating such shared resources. We can say that there are two critical issues that determine the efficiency of a locking scheme. One is the lock duration, that is, the amount of time a data structure is locked. The other is the lock grain, that is, the amount of data structures that are protected through a single lock request. It is the balance between lock duration and lock grain that compromises the efficiency of different locking schemes. The or-parallel tabling engine of Yap (Rocha et al. 2005) already implements four alternative locking schemes to deal with concurrent table accesses: the Table Lock at Entry Level (TLEL) scheme, the Table Lock at Node Level (TLNL) scheme, the Table Lock at Write Level (TLWL) scheme, and the Table Lock at Write Level - Allocate Before Check (TLWL-ABC) scheme. Currently, the first three are also available on our multi-threaded engine. However, in what follows, we will focus our attention only on the TLWL locking scheme, since its performance showed to be clearly better than the other two (Rocha et al. 2004). The TLWL scheme allows a single writer per chain of sibling nodes that represent alternative paths from a common parent node (see Fig. 6). This means that each node in the subgoal/answer trie structures is expanded with a locking field that, once activated, synchronizes updates to the chain of sibling nodes, meaning that only one thread at a time can be inserting a new child node starting from the same parent node. With the TLWL scheme, the process of check/insert a term t in a chain of sibling nodes works as follows. Initially, the working thread starts by searching for t in the available child nodes (the non-critical region) and only if the term is not found, it will enter the critical region in order to insert it on the chain. At that point, it waits until the lock be available, which can cause a delay proportional to the number of threads that are accessing the same critical region at the same time. In order to reduce the lock duration to a minimum, we have improved the original TLWL scheme to use trylocks instead of traditional locks. With trylocks, when a thread fails to get access to the lock, instead of waiting, it returns to the non-critical region, i.e., it traverses the newly inserted nodes, if any, checking if t was, in the meantime, inserted in the chain by another thread. If t is not found, the process 10 Miguel Areias and Ricardo Rocha Table Entry Parent Child Lock L1 Child Child Child Locked by L1 Locked by L1 Locked by L1 Subgoal Frame Parent Child Lock L2 Child Child Child Locked by L2 Locked by L2 Locked by L2 Fig. 6. The TLWL locking scheme repeats until the thread get access to the lock, in order to insert t, or until t be found. Figure 7 shows the pseudo-code for the implementation of this procedure using the TLWL scheme with trylocks. trie_node_check_insert(term T, parent trie node P) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. last_child = NULL // used to mark the last child to be checked do { // non-critical region first_child = TrNode_first_child(P) child = first_child while (child != last_child) // traverse the chain of sibling nodes ... if (TrNode_term(child) == T) // ... searching for T return child child = TrNode_sibling(child) last_child = first_child } while (! trylock(TrNode_lock(P))) // critical region, lock is set child = TrNode_first_child(P) while (child != last_child) // traverse the chain of sibling nodes ... if (TrNode_entry(child) == T) // ... searching for T unlock(TrNode_lock(P)) // unlocking before return return child child = TrNode_sibling(child) // create a new node to represent T child = new_trie_node(T) TrNode_sibling(child) = TrNode_first_child(P) TrNode_first_child(P) = child unlock(TrNode_lock(P)) // unlocking before return return child Fig. 7. Pseudo-code for the trie node check/insert operation Initially, the procedure traverses the chain of sibling nodes, that represent al- Towards Multi-Threaded Local Tabling Using a Common Table Space 11 ternative paths from the given parent node P, and checks for one representing the given term T. If such a node is found (line 6) then execution is stopped and the node returned (line 7). Otherwise, this process repeats (lines 3 to 10) until the working thread gets access to the lock field of the parent node P. In each round, the last child auxiliary variable marks the last node to be checked. It is initially set to NULL (line 1) and then updated, at the end of each round, to the new first child of the current round (line 9). Otherwise, the thread gets access to the lock and enters the critical region (lines 12 to 23). Here, it first checks if T was, in the meantime, inserted in the chain by another thread (lines 13 to 17). If this is not the case, then a new trie node representing T is allocated (line 19) and inserted in the beginning of the chain (lines 20 and 21). The procedure then unlocks the parent node (line 22) and ends returning the newly allocated child node (line 23). 4.3 Tabling Operations In YapTab, programs using tabling are compiled to include tabling operations that enable the tabling engine to properly schedule the evaluation process. One of the most important operations is the tabled subgoal call. This operation inspects the table space looking for a subgoal similar to the current subgoal being called. If a similar subgoal is found, then the corresponding subgoal frame is returned. Otherwise, if no such subgoal exists, it inserts a new path into the subgoal trie structure, representing the current subgoal, and allocates a new subgoal frame as a leaf of the new inserted path. Figure 8 shows how we have extended the tabled subgoal call operation for multi-threaded tabling support. tabled_subgoal_call(table entry TE, subgoal call SC, thread id TI) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. root = get_subgoal_trie_root_node(TE, TI) leaf = check_insert_subgoal_trie(root, SC) if (NS_design) sg_fr = get_subgoal_frame(leaf) if (not_exists(sg_fr)) sg_fr = new_subgoal_frame(leaf) return sg_fr else if (SS_design) bucket = get_bucket_array(leaf) if (not_exists(bucket)) bucket = new_bucket_array(leaf) else if (FS_design) sg_entry = get_subgoal_entry(leaf) if (not_exists(sg_entry)) sg_entry = new_subgoal_entry(leaf) bucket = get_bucket_array(sg_entry) sg_fr = get_subgoal_frame(bucket) if (not_exists(sg_fr)) sg_fr = new_subgoal_frame(bucket) return sg_fr Fig. 8. Pseudo-code for the tabled subgoal call operation 12 Miguel Areias and Ricardo Rocha The procedure receives three arguments: the table entry for the predicate at hand (TE), the current subgoal being called (SC), and the id of the working thread (TI). The NS design, SS design and FS design macros define which table design is enabled. The procedure starts by getting the root trie node for the subgoal trie structure that matches with the given thread id (line 1). Next, it checks/inserts the given SC into the subgoal trie structure, which will return the leaf node for the path representing SC (line 2). Then, if the NS design is enable, it uses the leaf node to obtain the corresponding subgoal frame (line 4). If the subgoal call is new, no subgoal frame still exists and a new one is created (line 6). Then, the procedure ends by returning the subgoal frame (line 7). This code sequence corresponds to the usual tabled subgoal call operation. Otherwise, for the SS design, it follows the leaf node to obtain the bucket array (line 9). If the subgoal call is new, no bucket exists and a new one is created (line 11). On the other hand, for the FS design, it follows the leaf node to obtain the subgoal entry (line 13) and, again, if the subgoal call is new, no subgoal entry exists and a new one is created (line 15). From the subgoal entry, it then obtains the bucket array (line 16). Finally, for both SS and FS designs, the bucket array is then used to obtain the subgoal frame (line 17) and one more time, if the given subgoal call is new, a new subgoal frame needs to be created (line 19). The procedure ends by returning the subgoal frame (line 20). Note that, for the sake of simplicity, we omitted some of the low level details in manipulating the bucket arrays, such as in computing the bucket cells or in expanding the indirect bucket cels. Another important tabling operation is the new answer. This operation checks whether a newly found answer is already in the corresponding answer trie structure and, if not, inserts it. Remember from section 2.2 that, with local evaluation, the new answer operation always fails, regardless of the answer being new or repeated, and that, with batched evaluation, when new answers are inserted the evaluation should continue, failing otherwise. With the FS design, the answer trie structures are shared. Thus, when several threads are inserting answers in the same trie structure, it may be not possible to determine when an answer is new or repeated for a certain thread. This is the reason why the FS design can be only safely used with local evaluation. We are currently studying how to bypass this constraint in order to also support the FS design with batched evaluation. 5 Experimental Results In this section, we present some experimental results obtained for the three proposed table designs using the TLWL scheme with traditional locks and with trylocks. The environment for our experiments was a machine with 4 Six-Core AMD Opteron (tm) Processor 8425 HE (24 cores in total) with 64 GBytes of main memory and running the Linux kernel 2.6.34.9-69.fc13.x86 64 with Yap 6.3. To put our results in perspective, we make a comparison with the multi-threaded implementation of XSB, version 3.3.6, using thread-private tables. Towards Multi-Threaded Local Tabling Using a Common Table Space 13 We used five sets of benchmarks. The Large Joins and WordNet sets were obtained from the OpenRuleBench project2 ; the Model Checking set includes three different specifications and transition relation graphs usually used in model checking applications; the Path Left and Path Right sets implement two recursive definitions of the well-known path/2 predicate, that computes the transitive closure in a graph, using several different configurations of edge/2 facts (Fig. 9 shows an example for each configuration). We experimented the BTree configuration with depth 18, the Pyramid and Cycle configurations with depth 2000 and the Grid configuration with depth 35. All benchmarks find all the solutions for the problem. BTree (depth 2) Pyramid (depth 4) Cycle (depth 4) Grid (depth 4) Fig. 9. Edge configurations Table 1 shows the execution time, in milliseconds, when running 1 working thread with local scheduling, for our three table designs, using the TLWL scheme with traditional locks (columns NS and FS) and with trylocks (columns SST and FST )3 , and for XSB. In parentheses, it also shows the respective overhead ratios when compared with the NS design. The running times are the average of five runs. The ratios marked with n.c. for XSB mean that we are not considering them in the average results (we opted to do that since they correspond to running times much higher than the other designs, which may suggest that something was wrong). One can observe that, on average, the SS design and the XSB implementation have a lower overhead ratio (around 10%) than the FS and FST designs (around 20%). For the SS and, mainly, for the FS approaches, this can be explained by the higher complexity of the implementation and, in particular, by the cost incurred with the extra code necessary to implement the TLWL locking scheme. Note that, even with a single working thread, this code has to be executed. Starting from these base results, Table 2 shows the overhead ratios, when compared with the NS design with 1 thread, for our table designs and XSB, when running 16 and 24 working threads (the results are the average of five runs). In order to create a worst case scenario that stresses the trie data structures, we ran all threads starting with the same query goal. By doing this, it is expected 2 3 Available from http://rulebench.projects.semwebcentral.org. We also have results for the other benchmarks proposed by the OpenRuleBench project (Liang et al. 2009) but, due to lack of space, here we only include these two sets. In general, for this set of benchmarks, the SS design presented similar results with traditional locks and with trylocks and, thus, here we only show the results with trylocks. 14 Miguel Areias and Ricardo Rocha Table 1. Execution time, in milliseconds, when running 1 working thread with local scheduling, for the NS, SST , FS and FST designs and for XSB, and the respective overhead ratios when compared with the NS design Bench NS Large Joins Join2 3,419 Mondial 730 Average WordNet Clusters 789 Hypo 1,488 Holo 694 Hyper 1,386 Tropo 598 Mero 678 Average Model Checking IProto 2,517 Leader 3,726 Sieve 23,645 Average SST FS FST 3,418 (1.00) 725 (0.99) (1.00) 3,868 (1.13) 856 (1.17) (1.15) 3,842 (1.12) 887 (1.21) (1.17) 990 1,671 902 1,587 784 892 981 1,728 881 1,565 763 869 982 1,720 884 1,576 762 864 (1.26) (1.12) (1.30) (1.15) (1.31) (1.32) (1.24) 2,449 (0.97) 3,800 (1.02) 24,402 (1.03) (1.01) (1.24) (1.16) (1.27) (1.13) (1.28) (1.28) (1.23) 2,816 (1.12) 3,830 (1.03) 24,479 (1.04) (1.06) XSB 3,444 (1.01) 1,637 (2.24) (1.62) (1.24) (1.16) (1.27) (1.14) (1.27) (1.27) (1.23) 549 (0.70) 992,388 (n.c.) 425 (0.61) 1,320 (0.95) 271 (0.45) 131,830 (n.c.) (0.68) 2,828 (1.12) 3,897 (1.05) 25,201 (1.07) (1.08) 3,675 (1.46) 10,354 (2.78) 27,136 (1.15) (1.80) Path Left BTree 2,966 Pyramid 3,085 Cycle 3,828 Grid 1,743 Average 2,998 3,159 3,921 1,791 (1.01) (1.02) (1.02) (1.03) (1.02) 3,826 3,256 3,775 2,280 (1.29) (1.06) (0.99) (1.31) (1.16) 3,864 3,256 3,798 2,293 (1.30) (1.06) (0.99) (1.32) (1.17) 2,798 2,928 3,357 2,034 (0.94) (0.95) (0.88) (1.17) (0.98) Path Right BTree 4,568 Pyramid 2,520 Cycle 2,761 Grid 2,109 Average 5,048 2,531 2,773 2,110 (1.11) (1.00) (1.00) (1.00) (1.03) 5,673 3,664 3,994 3,097 (1.24) (1.45) (1.45) (1.47) (1.40) 5,701 3,673 3,992 3,117 (1.25) (1.46) (1.45) (1.48) (1.41) 3,551 2,350 2,817 2,462 (0.78) (0.93) (1.02) (1.17) (0.97) Total Average (1.08) (1.21) (1.22) (1.12) that they will access the table space, to check/insert for subgoals and answers, at similar times, thus causing a huge stress on the same critical regions. In particular, for this set of benchmarks, this will be specially the case for the answer tries (and thus, for the FS and FST designs), since the number of answers clearly exceeds the number of subgoals. Analyzing the general picture of Table 2, one can observe that, on average, the NS and SST designs show very poor results for 16 and 24 threads. In Towards Multi-Threaded Local Tabling Using a Common Table Space 15 Table 2. Overhead ratios, when compared with the NS design with 1 thread, for the NS, SST , FS and FST designs and for XSB, when running 16 and 24 working threads with local scheduling (best ratios are in bold) Bench NS 16 Threads SST FS FST XSB NS 24 Threads SST FS FST XSB Large Joins Join2 Mondial Average 7.96 1.05 4.51 8.05 1.07 4.56 3.14 1.46 2.30 3.14 1.53 2.34 5.74 2.43 4.08 24.78 1.13 12.96 24.84 1.13 12.98 3.77 1.60 2.68 3.76 1.64 2.70 8.64 2.53 5.58 WordNet Clusters Hypo Holo Hyper Tropo Mero Average 6.29 5.33 6.15 8.03 6.03 4.90 6.12 5.61 5.09 5.41 7.65 4.96 4.92 5.61 3.92 4.56 3.73 3.57 3.93 3.90 3.93 3.94 2.99 3.72 2.94 3.95 3.71 3.54 2.82 n.c. 2.77 4.26 2.93 n.c. 3.19 12.23 9.20 10.92 21.34 13.46 8.93 12.68 8.67 8.33 9.87 16.82 8.44 7.96 10.02 4.52 5.21 4.67 4.59 5.64 4.59 4.87 4.55 4.15 4.55 3.34 5.68 4.44 4.45 4.87 n.c. 4.37 7.14 4.69 n.c. 5.27 Model Checking IProto 4.15 Leader 1.02 Sieve 1.01 Average 2.06 4.20 1.04 1.04 2.09 1.60 1.05 1.05 1.24 1.55 1.07 1.08 1.23 1.92 2.80 1.15 1.95 7.16 1.02 1.02 3.07 7.31 1.04 1.04 3.13 1.71 1.05 1.06 1.27 1.63 1.07 1.08 1.26 2.14 2.79 1.15 2.03 Path Left BTree Pyramid Cycle Grid Average 9.85 7.67 7.32 5.99 7.71 9.78 7.79 7.38 6.00 7.74 6.88 3.74 3.73 3.77 4.53 4.81 3.40 3.25 3.15 3.65 5.11 4.40 4.36 2.41 4.07 25.65 24.92 22.39 19.82 23.20 25.42 24.88 23.05 19.80 23.29 8.03 5.86 5.95 4.65 6.12 5.97 4.48 4.08 4.46 4.75 8.09 7.02 6.99 5.30 6.85 Path Right BTree Pyramid Cycle Grid Average 13.82 17.09 17.96 9.52 14.60 13.13 17.00 18.17 9.48 14.44 10.57 14.85 17.05 7.13 12.40 5.54 8.15 8.36 5.53 6.90 6.33 5.94 6.63 3.75 5.66 29.53 46.25 47.89 26.58 37.56 27.36 45.31 47.60 27.80 37.02 Total Average 7.43 7.25 5.24 3.78 3.87 18.64 17.72 10.16 6.76 10.38 10.86 10.42 10.31 11.49 10.76 10.99 7.50 6.96 6.41 10.00 8.73 9.52 5.42 4.73 6.11 particular, these bad results are more clear in the benchmarks that allocate a higher number of trie nodes. The explanation for this is the fact that we are using Yap’s memory allocator, that is based on Linux system’s malloc, which can be a problem, when making a lot of memory requests, since these requests require synchronization at the low level implementation. 16 Miguel Areias and Ricardo Rocha For the FS and FST designs, the results are significantly better and, in particular for FST , the results show that its trylock implementation is quite effective in reducing contention and, consequently, the running times for most of the experiments. Regarding XSB, for 16 threads, the results are similar to the FST design (3.87 for XSB and 3.78 for FST , on average) but, for 24 threads, the FST is noticeable better (6.11 for XSB and 4.73 for FST , on average). These results are more important since XSB shows base execution times (with 1 thread) lower than FST (please revisit Table 1) and since FST also pays the cost of using Yap’s memory allocator based on Linux system’s malloc. We can say that there are two main reasons for the good results of the FS design. The first, and most important, is that the FS design can effectively reduce the memory usage of the table space, almost linearly in the number of threads4 , which has the collateral effect of also reducing the impact of Yap’s memory allocator. The second reason is that, since threads are sharing the same answer trie structures, answers inserted by a thread are automatically made available to all other threads when they call the same subgoal. We observed that this collateral effect can also lead to unexpected reductions on the execution time. 6 Conclusions We have presented a new approach to multi-threaded tabled evaluation of logic programs using a local evaluation strategy. In our proposal, each thread views its tables as private but, at the engine level, the tables are shared among all threads. The primary goal of our work was, in fact, to reduce the memory table space but, our experimental results, showed that we can also significantly reduce the running times. Since our implementation achieved very encouraging results on worst case scenario tests, it should keep at least the same level of efficiency on any other tests. Moreover, we believe that there is still considerable space for improvements, mainly related to the low-level issues of Yap’s memory allocator for multi-threaded support. The goal would be to implement strategies that pre-allocate bunches of memory in order to minimize the performance degradation that the system suffers, when it is exposed to simultaneous memory requests made by multiple threads. Further work will also include extending the FS design to support batched evaluation. Acknowledgments This work is partially funded by the ERDF (European Regional Development Fund) through the COMPETE Programme and by FCT (Portuguese Foundation for Science and Technology) within projects HORUS (PTDC/EIA-EIA/100897/2008) and LEAP (PTDC/EIA-CCO/112158/2009). Miguel Areias is funded by the FCT grant SFRH/BD/69673/2010. 4 We have experimental results confirming the memory usage formulas introduced on section 3 but, due to lack of space, we are not including them here. Towards Multi-Threaded Local Tabling Using a Common Table Space 17 References Chen, W. and Warren, D. S. 1996. Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43, 1, 20–74. Freire, J., Hu, R., Swift, T., and Warren, D. S. 1995. Exploiting Parallelism in Tabled Evaluations. In International Symposium on Programming Languages: Implementations, Logics and Programs. Number 982 in LNCS. Springer-Verlag, 115–132. Freire, J., Swift, T., and Warren, D. S. 1996. Beyond Depth-First: Improving Tabled Logic Programs through Alternative Scheduling Strategies. In International Symposium on Programming Language Implementation and Logic Programming. Number 1140 in LNCS. Springer-Verlag, 243–258. Liang, S., P.Fodor, Wan, H., and M.Kifer. 2009. OpenRuleBench: An Analysis of the Performance of Rule Engines. In Internacional World Wide Web Conference. ACM Press, 601–610. Marques, R. 2007. Concurrent Tabling: Algorithms and Implementation. Ph.D. thesis, Department of Computer Science, New University of Lisbon. Marques, R. and Swift, T. 2008. Concurrent and Local Evaluation of Normal Programs. In International Conference on Logic Programming. Number 5366 in LNCS. SpringerVerlag, 206–222. Marques, R., Swift, T., and Cunha, J. C. 2010. A Simple and Efficient Implementation of Concurrent Local Tabling. In International Symposium on Practical Aspects of Declarative Languages. Number 5937 in LNCS. Springer-Verlag, 264–278. Moura, P. 2008. ISO/IEC DTR 13211–5:2007 Prolog Multi-threading Predicates. Available from http://logtalk.org/plstd/threads.pdf. Ramakrishnan, I. V., Rao, P., Sagonas, K., Swift, T., and Warren, D. S. 1999. Efficient Access Mechanisms for Tabled Logic Programs. Journal of Logic Programming 38, 1, 31–54. Rocha, R., Silva, F., and Santos Costa, V. 2004. Concurrent Table Accesses in Parallel Tabled Logic Programs. In International Euro-Par Conference. Number 3149 in LNCS. Springer-Verlag, 662–670. Rocha, R., Silva, F., and Santos Costa, V. 2005. On applying or-parallelism and tabling to logic programs. Theory and Practice of Logic Programming 5, 1 & 2, 161– 205. Sagonas, K. and Swift, T. 1998. An Abstract Machine for Tabled Execution of FixedOrder Stratified Logic Programs. ACM Transactions on Programming Languages and Systems 20, 3, 586–634. Swift, T. and Warren, D. S. 2012. XSB: Extending Prolog with Tabled Logic Programming. Theory and Practice of Logic Programming 12, 1 & 2, 157–187. Wielemaker, J. 2003. Native Preemptive Threads in SWI-Prolog. In International Conference on Logic Programming. Number 2916 in LNCS. Springer-Verlag, 331–345.
6cs.PL
SAMUEL COMPACTIFICATIONS OF AUTOMORPHISM GROUPS DANA BARTOŠOVÁ AND ANDY ZUCKER arXiv:1802.02513v1 [math.DS] 7 Feb 2018 1. Introduction In this paper, we are interested in the automorphism groups of countable first-order structures and the Samuel compactifications of these groups. We will address a variety of questions about the algebraic structure of the Samuel compactification and exhibit connections between this algebraic structure and the combinatorics of the first-order structures at hand. Let G be a topological group; all topological groups and spaces will be assumed Hausdorff. The group G comes with a natural uniform structure, the left uniformity, whose entourages are of the form {(g, h) ∈ G × G : g −1 h ∈ V } where V ranges over open symmetric neighborhoods of the identity. Every uniform space U admits a Samuel comactifiation, the Gelfand space of the algebra of bounded uniformly continuous functions on U (see [Sa] or [U]). We denote by S(G) the Samuel compactification of the group G with its left uniform structure. In addition to being a compact Hausdorff space, the space S(G) can also be endowed with algebraic structure. A G-flow is a compact Hausdorff space X equipped with a continuous right G-action a : X × G → X. Typically the action a is understood, and we write x · g or xg for a(x, g). We can give S(G) the structure of a G-flow; indeed, for each g ∈ G, the rightmultiplication map h → hg is left-uniformly continuous, so can be continuously extended to S(G). With some extra work, it can be shown that the evaluation S(G) × G → S(G) is continuous. If X and Y are G-flows, a G-map is a continuous map ϕ : X → Y which respects the G-action. A G-ambit is a pair (X, x0 ), where X is a G-flow and x0 ∈ X has a dense orbit. If (X, x0 ) and (Y, y0 ) are ambits, then a map of ambits is a G-map ϕ : X → Y with ϕ(x0 ) = y0 . Notice that there is at most one map of ambits from (X, x0 ) to (Y, y0 ). By identifying G as embedded into S(G) and by considering the orbit of 1G , we turn (S(G), 1G ) into an ambit. It turns out that this is the greatest ambit; for any G-ambit (X, x0 ), there is a map of ambits ϕ : (S(G), 1G ) → (X, x0 ). We can use this universal property to endow S(G) with yet more structure. A compact left-topological semigroup is a semigroup S with a compact Hausdorff topology in which the left multiplication maps t → st are continuous for each s ∈ S. Now let x ∈ S(G); then the pair (x · G, x) is a G-ambit, so there is a unique G-map λx : S(G) → x · G with λx (1G ) = x. We can endow S(G) with the structure of a compact left-topological semigroup by setting xy := λx (y). It is not hard to show that this operation is associative. Another consequence of the universal property is the existence of universal minimal flows. Let X be a G-flow. A subflow is any closed Y ⊆ X which is invariant under the G-action. The G-flow X is minimal if X 6= ∅ and every orbit is dense; equivalently, X is minimal if X contains no proper subflows. An easy Zorn’s Lemma argument shows that every flow contains a minimal subflow. The G-flow X is universal if there is a G-map from X onto any minimal flow. Let M ⊆ S(G) be any minimal subflow, and let Y be a minimal flow. Pick y0 ∈ Y arbitrarily, making (Y, y0 ) an ambit. Then there is a map of ambits ϕ : (S(G), 1G ) → (Y, y0 ), 1 2 D. BARTOŠOVÁ AND A. ZUCKER and ϕ|M : M → Y is a G-map. We have just shown the existence of a universal minimal flow. By using some techniques from the theory of compact left-topological semigroups, it can be shown that there is a unique universal minimal flow up to G-flow isomorphism, denoted M (G). The existence and uniqueness of the universal minimal flow suggests another “canonical” G-ambit we can construct. If X is a G-flow, we can view each g ∈ G as the function ρg : X → X. Form the product space X X , and set E(X) = {ρg : g ∈ G}. It will be useful in this instance to write functions on the right, so if f ∈ X X , we write x·f or xf instead of f (x). The group G acts on E(X) via x · (f · g) = (x · f ) · g. Notice that ρg · h = ρgh , so (E(X), ρ1G ) is an ambit. We can also give E(X) a compact left-topological semigroup structure; rather than a universal property, it is the fact that members of E(X) are functions that allows us to do this. Indeed, the product is given by composition, which with our notation means that for f1 , f2 ∈ E(X), we define x · (f1 · f2 ) = (x · f1 ) · f2 . The ambit E(X) (the distinguished point being understood) is called the enveloping semigroup of X; we will be particularly interested in E(M (G)), the enveloping semigroup of the universal minimal flow. It is worth pointing out that we could have avoided some of this notational awkwardness by switching the roles of left and right throughout, i.e. working with left G-actions and compact right-topological semigroups. The reason we work with our left-right conventions is due to the specific groups that we will be working with, i.e. automorphism groups of countable first-order structures. We will point out later how a left-right switch could be made. Also note that several of the references use the opposite left-right conventions, in particular [HS] and [Ba]. Robert Ellis (see [E]) first proved the existence and uniqueness of M (G), and was the first to consider the two canonical ambits S(G) and E(M (G)). As S(G) is the greatest ambit, there is a map of ambits ϕ : S(G) → E(M (G)) (when referring to S(G) and enveloping semigroups, we will suppress the distinguished point unless there is possible confusion). He posed the following very natural question: is ϕ : S(G) → E(M (G)) an isomorphism? Vladimir Pestov (see [P]) observed that the existence of extremely amenable groups, groups where M (G) is a singleton, provides a negative answer to Ellis’s question. Pestov also constructed many other examples of groups G where S(G) and E(M (G)) were not isomorphic. The diversity of counterexamples to Ellis’s question led Pestov to make the following conjecture. Conjecture 1.1 (Pestov). Let G be a topological group. Then the canonical map ϕ : S(G) → E(M (G)) is an isomorphism iff G is precompact. Here, G is said to be precompact if the completion of its left uniformity is compact. If this is the case, then all of S(G), M (G), and E(M (G)) are isomorphic to the left completion. Aside from the initial work of Pestov, very little work has been done on Conjecture 1.1. Glasner and Weiss (see [GW1]) have shown that S(Z) and E(M (Z)) are not isomorphic. Their proof is rather difficult and uses some deep results in ergodic theory (see [F]); as such, their methods are unlikely to generalize even to countable amenable groups. In this paper, we address Conjecture 1.1 for groups of the form G = Aut(K) where K is a countable first-order structure. We endow G with the topology of pointwise convergence, turning G into a Polish group. In a mild abuse of terminology, we will call groups of this form automorphism groups. When K is a countable set with no additional structure, we have Aut(K) = S∞ , the group of all permutations of a countable set. More generally, automorphism groups are exactly the closed subgroups of S∞ . The work of Kechris, Pestov, and Todorcevic [KPT] provides explicit computations of M (G) for many automorphism groups. SAMUEL COMPACTIFICATIONS 3 Having an explicit representation of M (G) aids in analyzing the properties of E(M (G)). Along with an explicit representation of S(G) for automorphism groups (see [Z]), this allows us to address Conjecture 1.1 for some of these groups. Our first main theorem is the following. Theorem 1.2. Let K be any of the following: • a countable set without structure, • the random Kn -free graph, • the random r-uniform hypergraph. Then for G = Aut(K), we have S(G) ∼ 6= E(M (G)). We then turn to finding the extent to which S(G) and E(M (G)) differ. Any minimal subflow M ⊆ S(G) is isomorphic to M (G), and it turns out that S(G) admits a retraction onto M , i.e. a G-map ϕ : S(G) → M with ϕ|M the identity. Pestov has shown (see [P1]) that S(G) ∼ = E(M (G)) iff the retractions of S(G) onto a minimal subflow M ⊆ S(G) separate the points of S(G). So if S(G) ∼ 6= E(M (G)), it makes sense to ask which pairs of points cannot be separated; this will not depend on the choice of minimal subflow M ⊆ S(G). Given x, y ∈ S(G), we say they can be separated by retractions if there is a retraction ϕ : S(G) → M with ϕ(x) 6= ϕ(y). Every compact left-topological semigroup S admits a smallest two-sided ideal, denoted K(S). Our second main theorem is the following. Theorem 1.3. There are x 6= y ∈ K(S(S∞ )) which cannot be separated by retractions. On the way to proving Theorem 1.3, we prove some theorems of independent interest both for general topological groups G and for S∞ . By a well-known theorem of Ellis, every compact left-topological semigroup S contains an idempotent, an element u ∈ S which satisfies u · u = u (see [E]). Given Y ⊆ S, write J(Y ) for the set of idempotents in Y . Our route to proving Theorem 1.3 involves a careful understanding of when the product of two idempotents is or is not an idempotent. In the case G = S∞ , we are able to find large semigroups of idempotents; this is what allows us to prove Theorem 1.3. Theorem 1.4. There are two minimal subflows M 6= N ⊆ S(S∞ ) so that J(M ) ∪ J(N ) is a semigroup. It is worth noting that any minimal subflow M ⊆ S(G) is a compact subsemigroup of S(G), so J(M ) 6= ∅. There are some cases when it is clear that K(S(G)) contains sufficiently large semigroups of idempotents. Given a G-flow X, recall that a pair of points x, y ∈ X is called proximal if there is p ∈ E(X) with xp = yp; the pair (x, y) is called distal if it is not proximal. A G-flow X is proximal if every pair from X is proximal, and X is called distal if every pair x 6= y ∈ X is distal. If M (G) is proximal, then whenever M ⊆ S(G) is a minimal subflow, we have J(M ) = M . If M (G) is distal and M ⊆ S(G) is a minimal subflow, then J(M ) = {u}, a single idempotent. So long as S(G) contains at least two minimal right ideals, which is always the case when G is Polish (see [Ba]), then E(M (G)) ∼ 6= S(G) in these cases. We will discuss examples of groups with M (G) proximal and provide a partial characterization of Polish groups G with M (G) distal. 4 D. BARTOŠOVÁ AND A. ZUCKER Theorem 1.5. Let G be a Polish group. The following are equivalent. (1) M (G) is distal and metrizable. i ϕ (2) There is a short exact sequence of groups 1 → H → − G− → K → 1 with H extremely amenable and K compact metrizable. Furthermore, in item (2), K ∼ = M (G), and the G-action is given by k · g = kϕ(g). 2. Countable first-order structures and the Samuel compactification In this section, we provide the necessary background on countable structures and provide an explicit construction of the Samuel compactification of an automorphism group. The presentation here is largely taken from [Z1]. Recall that S∞ is the group of all permutations of ω := {0, 1, 2, ...}. We can endow S∞ with the topology of pointwise convergence; a typical basic open neighborhood of the identity is {g ∈ S∞ : g(k) = k for every k < n} for some n < ω. Notice that each of these basic open neighborhoods is in fact a clopen subgroup. Fix now G a closed subgroup of S∞ . A convenient way to describe the G-orbits of finite tuples from ω is given by the notions of a Fraı̈ssé class and structure. A relational language L = {Ri : i ∈ I} is a collection of relation symbols. Each relation symbol Ri has an arity ni ∈ N. An L-structure A = hA, RiA i consists of a set A and relations RiA ⊆ Ani ; we say that A is an L-structure on A. If A, B are L-structures, then g : A → B is an embedding if g is a map from A to B such that RiA (x1 , ..., xni ) ⇔ RiB (g(x1 ), ..., g(xni )) for all relations. We write Emb(A, B) for the set of embeddings from A to B. We say that B embeds A and write A ≤ B if Emb(A, B) 6= ∅. An isomorphism is a bijective embedding, and an automorphism is an isomorphism between a structure and itself. If A ⊆ B, then we say that A is a substructure of B, written A ⊆ B, if the inclusion map is an embedding. A is finite, countable, etc. if A is. Definition 2.1. Let L be a relational language. A Fraı̈ssé class K is a class of L-structures with the following four properties. (1) K contains only finite structures, contains structures of arbitrarily large finite cardinality, and is closed under isomorphism. (2) K has the Hereditary Property (HP): if B ∈ K and A ⊆ B, then A ∈ K. (3) K has the Joint Embedding Property (JEP): if A, B ∈ K, then there is C which embeds both A and B. (4) K has the Amalgamation Property (AP): if A, B, C ∈ K and f : A → B and g : A → C are embeddings, there is D ∈ K and embeddings r : B → D and s : C → D with r ◦ f = s ◦ g. If K is a countably infinite L-structure (which we will typically assume has underlying set ω), we write Age(K) for the class of finite L-structures which embed into K. The following is the major fact about Fraı̈ssé classes. SAMUEL COMPACTIFICATIONS 5 Fact 2.2. If K is a Fraı̈ssé class, there is up to isomorphism a unique countably infinte L-structure K with Age(K) = K satisfying one of the following two equivalent conditions. (1) K is ultrahomogeneous: if f : A → B is an isomorphism between finite substructures of K, then there is an automorphism of K extending f . (2) K satisfies the Extension Property: if B ∈ K, A ⊆ B, and f : A → K is an embedding, there is an embedding h : B → K extending f . Conversely, if K is a countably infinite L-structure satisfying 1 or 2, then Age(K) is a Fraı̈ssé class. Given a Fraı̈ssé class K, we write Flim(K), the Fraı̈ssé limit of K, for the unique structure K as above. We say that K is a Fraı̈ssé structure if K ∼ = Flim(K) for some Fraı̈ssé class. Our interest in Fraı̈ssé structures stems from the following result. Fact 2.3. For any Fraı̈ssé structure K, Aut(K) is isomorphic to a closed subgroup of S∞ . Conversely, any closed subgroup of S∞ is isomorphic to Aut(K) for some Fraı̈ssé structure K. Fix S a Fraı̈ssé class K with Fraı̈ssé limit K. Set G = Aut(K). We also fix an exhaustion K = n AnS , with each An ∈ K, |An | = n, and Am ⊆ An for m ≤ n. Whenever we write K = n An , it will be assumed that the right side is an exhaustion of K. Write Hn = {gGn : g ∈ G}, where Gn = G ∩ NAn is the pointwise stabilizer of An . We can identify Hn with Emb(An , K),Sthe set of embeddings of An into K. Note that under this identification, we have Hn = N ≥n Emb(An , AN ). For g ∈ G, we often write g|n for gGn , and we write in for Gn . The group G acts on Hn on the left; if x ∈ Hn and g ∈ G, we have g · x = g ◦ x. For m ≤ n, we let inm ∈ Emb(Am , An ) be the inclusion embedding. Each f ∈ Emb(Am , An ) gives rise to a dual map fˆ : Hn → Hm given by fˆ(x) = x◦f . Note that we must specify the range of f for the dual map to make sense, but this will usually be clear from context. Proposition 2.4. (1) For f ∈ Emb(Am , An ), the dual map fˆ : Hn → Hm is surjective. (2) For every f ∈ Emb(Am , An ), there is N ≥ n and h ∈ Emb(An , AN ) with h ◦ f = iN m. Proof. Item 1 is an immediate consequence of the extension property. For item 2, use ultrahomogeneity to find g ∈ G with g ◦ f = im . Let N ≥ n be large enough so that ran(g|n ) ⊆ AN , and set h = g|n .  We now proceed with an explicit construction of S(G). First, if X is a discrete space, we let βX be the space of ultrafilters on X. We topologize βX by declaring a typical basic open neighborhood to be of the form {p ∈ βX : A ∈ p}, where A ⊆ X. We view X as a subset of βX by identifying x ∈ X with the ultrafilter {A ⊆ X : x ∈ A}. If Y is a compact Hausdorff space and ϕ : X → Y is any map, there is a unique continuous extension ϕ̃ : βX → Y . Now let f ∈ Emb(Am , An ). The dual map fˆ extends to a continuous map f˜ : βHn → βHm . If p ∈ βHn and f ∈ Emb(Am , An ), we will sometimes write p · f for f˜(p). Form the inverse 6 D. BARTOŠOVÁ AND A. ZUCKER limit lim βHn along the maps ı̃nm . We can identify G with a dense subspace of lim βHn by ←− ←− associating to each g ∈ G the sequence of ultrafilters principal on g|n . The space lim βHn ←− turns out to be the Samuel compactification S(G) (see Corollary 3.3 in [P]). To see that S(G) is the greatest ambit, we need to exhibit a right G-action on S(G). This might seem unnatural at first; after all, the left G-action on each Hn extends to a left G-action on βHn , giving us a left G-action on S(G). The problem is that the left action is not continuous when G is given its Polish topology. The right action we describe doesn’t “live” on any one level of the inverse limit lim βHn ; we need to understand how the various ←− levels interact. Let πn : lim βHn → βHn be the projection map. We often write α(n) := πn (α). For ←− α ∈ lim βHn , g ∈ G, m ∈ N, and S ⊆ Hm , we have ←− S ∈ αg(m) ⇔ {x ∈ Hn : x ◦ g|m ∈ S} ∈ α(n) where n ≥ m is large enough so that ran(g|m ) ⊆ An . Notice that if g|m = h|m = f , then αg(m) = αh(m) := α · f := λαm (f ). By distinguishing the point 1 ∈ lim βHn with ←− 1(m) principal on im , we endow S(G) with the structure of a G-ambit, and (S(G), 1) is the greatest ambit (see Theorem 6.3 in [Z]). Using the universal property of the greatest ambit, we can define a left-topological semigroup structure on S(G): Given α and γ in lim βHn , m ∈ N, and S ⊆ Hm , we have ←− S ∈ αγ(m) ⇔ {f ∈ Hm : S ∈ α · f } ∈ γ(m). If α ∈ S(G) and S ⊆ Hm , a useful shorthand is to put α−1 (S) = {f ∈ Hm : S ∈ α · f }. Then the semigroup multiplication can be written as S ∈ αγ(m) ⇔ α−1 (S) ∈ γ(m). Notice that for fixed α, αγ(m) depends only on γ(m); indeed, if α ∈ lim βHn , p ∈ βHm , and ←− S ⊆ Hm , we have S ∈ α · p iff α−1 (S) ∈ p. In fact, α · p = λ̃αm (p), where the map λ̃αm is the continuous extention of λαm to βHm . As promised in the introduction, we now explain the reason behind our left-right conventions. The primary reason behind considering right G-flows is because for G = Aut(K), the left uniformity is very natural to describe. Namely, every entourage contains an entourage of the form {(g, h) ∈ G × G : g|m = h|m }. This leads naturally to considering the embeddings from Am to K. If we wanted to consider the right uniformity, we would instead be considering partial isomorphisms of K with range Am , which are less easily described. 3. KPT correspondence In this section, we provide a brief review of KPT correspondence. For proofs of the results in this section, see [KPT], [NVT], or [Z]. Let L be a relational language and L∗ = L ∪ S, where S = {Si : i ∈ N} and the Si are new relational symbols of arity ni . If A is an L∗ -structure, write A|L for the structure SAMUEL COMPACTIFICATIONS 7 obtained by throwing away the interpretations of the relational symbols in L∗ \ L. If K∗ is a class of L∗ -structures, set K∗ |L = {A∗ |L : A∗ ∈ K∗ }. If K = K∗ |L and K∗ is closed under isomorphism, we say that K∗ is an expansion of K. If A∗ ∈ K∗ and A∗ |L = A, then we say that A∗ is an expansion of A, and we write K∗ (A) for the set of expansions of A in K∗ . If f ∈ Emb(A, B) and B∗ ∈ K∗ (B), we let B∗ · f be the unique expansion of A so that f ∈ Emb(B∗ · f, B∗ ). The expansion K∗ is precompact if for each A ∈ K, the set {A∗ ∈ K∗ : A∗ |L = A} is finite. If K∗ is an expansion of the Fraı̈ssé class K, we say that the pair (K∗ , K) is reasonable if for any A, B ∈ K, embedding f : A → B, and expansion A∗ of A, then there is an expansion B∗ of B with f : A∗ → B∗ an embedding. When K∗ is also a Fraı̈ssé class, we have the following equivalent definition. Proposition 3.1. Let K∗ be a Fraı̈ssé expansion class of the Fraı̈ssé class K with Fraı̈ssé limits K∗ , K respectively. Then the pair (K∗ , K) is reasonable iff K∗ |L ∼ = K. Set Fin(K) = {A ∈ K : A ⊆ K}. Suppose (K∗ , K) is reasonable and precompact. Set ~ : hA, S| ~ A i ∈ K∗ whenever A ∈ Fin(K)}. XK∗ := {hK, Si We topologize this space by declaring the basic open neighborhoods to be of the form N (A∗ ) := {K0 ∈ XK∗ : A∗ ⊆ K0 }, where A∗ is an expansion of some A ∈ Fin(K). We can view XK∗ as a closed subspace of Y {A∗ : A∗ ∈ K∗ (A)}. A∈Fin(K) Notice that since (K∗ , K) is precompact, XK∗ is compact. If compatible metric is given by S n An = K is an exhaustion, a ~ hK, T~ i = 1/k(S, ~ T~ ), d(hK, Si, ~ T~ ) is the largest k for which hAk , S| ~A i∼ where k(S, = hAk , T~ |Ak i. k We can now form the (right) logic action of G = Aut(K) on XK∗ by setting K0 · g to be the structure where for each relation symbol S ∈ S, we have 0 0 S (K ·g) (x1 , ..., xn ) ⇔ S K (g(x1 ), ..., g(xn )). This action is jointly continuous, turning XK∗ into a G-flow. For readers used to left logic actions, acting on the right by g is the same as acting on the left by g −1 . First let us consider when XK∗ is a minimal G-flow. Definition 3.2. We say that the pair (K∗ , K) has the Expansion Property (ExpP) when for any A∗ ∈ K∗ , there is B ∈ K such that for any expansion B∗ of B, there is an embedding f : A∗ → B ∗ . Proposition 3.3. Let K∗ be a reasonable, precompact Fraı̈ssé expansion class of the Fraı̈ssé class K with Fraı̈ssé limits K∗ , K respectively. Let G = Aut(K). Then the G-flow XK∗ is minimal iff the pair (K∗ , K) has the ExpP. 8 D. BARTOŠOVÁ AND A. ZUCKER Expansion classes are particularly inetesting when K∗ has the following combinatorial property. Definition 3.4. Let C be a class of finite structures. (1) We say that A ∈ C is a Ramsey object if for any r ≥ 2 and any B ∈ C with A ≤ B, there is C ∈ C with B ≤ C so that for any coloring c : Emb(A, C) → r, there is h ∈ Emb(B, C) with |c(h ◦ Emb(A, B))| = 1. (2) We say that C has the Ramsey Property (RP) if every A ∈ C is a Ramsey object. The following is one of the major theorems in [KPT]. This theorem in its full generality is proven in [NVT]. Theorem 3.5. Let K∗ be a reasonable, precompact Fraı̈ssé expansion class of the Fraı̈ssé class K with Fraı̈ssé limits K∗ , K, respectively. Let G = Aut(K). Then XK∗ ∼ = M (G) iff the pair (K∗ , K) has the ExpP and K∗ has the RP. Pairs (K∗ , K) of Fraı̈ssé classes which are reasonable, precompact, satisfy the ExpP, and where K∗ has the RP are called excellent. In particular, if K = Flim(K), G = Aut(K), and there is an expansion class K∗ so that (K∗ , K) is excellent, then M (G) is metrizable. The following converse is one of the major theorems of [Z]. Theorem 3.6. Let K be a Fraı̈ssé class with K = Flim(K) and G = Aut(K). If M (G) is metrizable, then there is an expansion class K∗ so that (K∗ , K) is excellent. 4. Ellis’s problem for random relational structures In S this section, we prove Theorem 1.2. Let G = Aut(K) for some Fraı̈ssé structure K = n An . If T ⊆ Hm , n ≥ m, and f ∈ Emb(Am , An ), set f (T ) = {s ∈ Hn : s ◦ inm ∈ T }. This is a minor abuse of notation, since f also denotes a map from Am to An ; however, this map induces a continuous embedding of the Boolean algebra P(Hm ) into P(Hn ). We will freely identify P(Hm ) with 2Hm ; in particular, G acts on 2Hm by right shift, where for ϕ ∈ 2Hm , f ∈ Hm , and g ∈ G, we have ϕ · g(f ) = ϕ(g · f ). Definition 4.1. We call a subset S ⊆ Hm minimal if the flow χS · G ⊆ 2Hm is minimal. The formulation of Ellis’s problem we will work with is the one concerning retractions given by Pestov. We will be interested in whether every pair x 6= y ∈ S(G) can be separated by retractions. A characterization of when this occurs for discrete groups can be found in [Ba] (see Proposition 11). We first prove a similar characterization for automorphism groups in the next two lemmas. SAMUEL COMPACTIFICATIONS 9 Before proceeding, a quick remark on notation is in order. If X is a G-flow, then there is a unique map of ambits ϕ : S(G) → E(X). If x ∈ X and p ∈ S(G), we write x · p for x · ϕ(p). Lemma 4.2. Suppose α, γ ∈ S(G) cannot be separated by retractions, and let S ⊆ Hm be minimal. Then S ∈ α(m) ⇔ S ∈ γ(m). Proof. Let M ⊆ S(G) be a minimal subflow, and consider the non-empty closed subsemigroup {p ∈ M : χS · p = χS }. By Ellis’s theorem, let u ∈ M be an idempotent with χS · u = χS . As the left multiplication λu : S(G) → M is a retraction, we must have u · α = u · γ. Therefore χS · α = χS · γ, and α−1 (S) = γ −1 (S) := T . It follows that im ∈ T iff S ∈ α(m) iff S ∈ γ(m).  For each m < ω, let Bm ⊆ P(Hm ) be the Boolean algebra generated by the minimal 0 subsets of Hm . Let Bm be the Boolean algebra {T ⊆ Hm : ∃n ≥ m(inm (T ) ∈ Bn )}. Lemma 4.3. Fix M ⊆ S(G) a minimal. The following are equivalent. (1) Retractions of S(G) onto M separate points of S(G), 0 = P(Hm ). (2) For every m < ω, we have Bm Proof. Suppose that there are α 6= γ ∈ S(G) which cannot be separated by retractions. Find m < ω with α(m) 6= γ(m), and find T ⊆ Hm with T ∈ α(m), T 6∈ γ(m). Note that for every n ≥ m, we have inm (T ) ∈ α(n) and inm (T ) 6∈ γ(n). Towards a contradiction, suppose for some n ≥ m that inm (T ) was a Boolean combination of minimal set A1 , ..., Ak ⊆ Hn . By our assumption, α(n) and γ(n) agree on the membership of each Ai , hence also on the membership of T , a contradiction. 0 0 ) denote . Let S(Bm Conversely, suppose that T ⊆ Hm is not in the Boolean algebra Bm 0 0 0 the Stone space of Bm ; form the inverse limit lim S(Bn ), and let p ∈ lim S(Bn ) be chosen ←− ←− so that p(m) doesn’t decide T . Then find α, γ ∈ lim βHn with T ∈ α(m), T 6∈ γ(m) which ←− both extend p. Then α and γ cannot be separated by retractions.  Notice that item (2) of Lemma 4.3 does not depend on M . In general, the relation of whether x 6= y ∈ S(G) can be separated by retractions does not depend on the minimal subflow of S(G) chosen, but we postpone this discussion until the end of section 6 (see the discussion after Theorem 5.11). Now suppose that (K∗ , K) is an excellent pair of Fraı̈ssé classes. Given a set of expansions E ⊆ K∗ (Am ) and K0 ∈ XK∗ , let Hm (E, K0 ) = {f ∈ Hm : Am (f, K0 ) ∈ E}. If n ≥ m and A0n ∈ K∗ (An ), we set Emb(E, A0n ) = {f ∈ Emb(Am , An ) : Am (f, A0n ) ∈ E}. Proposition 4.4. S ⊆ Hm is minimal iff there is K0 ∈ XK∗ and E ⊆ K∗ (Am ) so that S = Hm (E, K0 ) Proof. One direction is easy once we note that given E ⊆ K∗ (Am ), the map ϕE : XK∗ → 2Hm given by ϕE (K0 ) = Hm (E, K0 ) is a map of G-flows. In the other direction, let S ⊆ Hm be minimal. Then Y := χS · G ⊆ 2Hm is a minimal G-flow, so fix a G-map ϕ : XK∗ → Y . Note that ϕ(K∗ ) must be a G∗ -fixed point, so by ultrahomogeneity of K∗ it must be of the form 10 D. BARTOŠOVÁ AND A. ZUCKER Hm (E, K∗ ) for some E ⊆ K∗ (Am ). It follows that ϕ = ϕE , so in particular S = Hm (E, K0 ) for some K0 ∈ XK∗ .  The main tool allowing us to prove Theorem 1.2 is an explicit characterization of M (G) for certain autormorphism groups G. The following facts can be found in [KPT]. Fact 4.5. Let K = Age(K), where K is any of the structures in the statement of Theorem 1.2. Let K∗ be the class of linearly ordered members of K. Then (K∗ , K) is an excellent pair. Setting G = Aut(K), then M (G) = XK∗ is the space of linear orders of K. The next theorem is the simplest case of Theorem 1.2. The following notion will be useful in the proof. Given T ⊆ Hm and N ≥ m, an N -pattern of T is a set S ⊆ Emb(Am , AN ) so that there is y ∈ HN with S = {f ∈ Emb(Am , AN ) : y ◦ √ f ∈ T }. We Will be using Stirling’s formula which states that asymptotically n! is equal to 2πn( ne )n . Theorem 4.6. Let K = {xn : n < ω} be a countable set with no structure (so G ∼ = S∞ ), 0 ⊆ 2Hm is meager. In particular, any and set Am = {xi : i < m}. Then for every m ≥ 2, Bm 0 . T ∈ Hm whose orbit is dense is not in Bm Proof. Let T ⊆ Hm have dense orbit. So for every N ≥ m, every S ⊆ Emb(Am , AN ) is an N -pattern of T . Towards a contradiction, suppose for some n ≥ m that inm (T ) was a Boolean combination of minimal sets B1 , ..., Bk ⊆ Hn . Let N >> n; we will obtain a contradiction N m by counting the number of N -patterns in inm (T ), which by assumption is 2m!(m) ≥ 2N /2 . Since |K∗ (An )| = n! and since there are N ! linear orders on AN , this gives us 2n! N ! possible N -patterns for each Bi by Proposition 4.4. Therefore any N -pattern of T must be a Boolean combination of some k of these N -patterns. Each choice of k patterns results k in at most 22 Boolean combinations, so the total number of possible patterns is at most k 22 (2n! N !)k patterns. Noting that n and k remain fixed as we let N grow large, we have that asymptotically there are CN · ekN possible N -patterns of inm (T ), which is far less than m 2N /2 , a contradiction.  We now consider the case where K = Flim(K) is the random r-uniform hypergraph for some r ≥ 2. In order to generalize the arguments in the proof of Theorem 4.6, we will S need some control over the exhaustion K = n An . We will do this by not specifying an exhaustion in advance, but instead determining parts of it as we proceed. We will need the following notion. With K as above, let A ⊆ B ∈ K, and let C ⊆ D ∈ K. We say that D extends C along A ⊆ B if for any f ∈ Emb(A, C), there is an h ∈ Emb(B, D) with h|A = f . Given C ∈ K, write |C| for the number of vertices in C. Lemma 4.7. Let K be the class of r-uniform hypergraphs for some r ≥ 2. Let e ⊆ B ∈ K, where e ∈ K is the hypergraph on r vertices consisting of an edge, and let C ∈ K with |C| = N . Then there is D ∈ K extending C along e ⊆ B with |D| ≤ cN r−1 for some constant c depending only on |B|. SAMUEL COMPACTIFICATIONS 11 Proof. Recall that given an r-uniform hypergraph C, a matching is a subset of the edges of C so that each vertex is included in at most one edge. By Baranyai’s theorem [B], the edge set into M1 , ..., M` with each Mi a matching and with  of C can be partitioned rdN/re r−1 `≤ /dN/re) ≈ c0 N . For each i ≤ ` and j ≤ r!, let Dij be a set of |B| − r new r S S vertices. We will define the hypergraph D on vertex set C ∪ i≤` j≤r! Dij . First add edges to D so that Dij ∼ = B \ e. For each e0 ∈ Mi , enumerate the embeddings fj : e → C with 0 range e . Add edges to D so that each fj extends to an embedding hj : B → D with range e0 ∪ Dij . This is possible since each Mi is a matching. The hypergraph D has |D| ≤ cN r−1 as desired.  Theorem 4.8. Let K be the class of r-uniform hypergraphs for r ≥ 2, with K = Flim(K). Let Ar ⊆ K be an edge on r vertices. Then if T ⊆ Hr has dense orbit, then T 6∈ Br0 . Remark. Though we are not specifying an exhaustion in advance, we will still use some of the associated notation. In particular, when we write Am for some m < ω, we mean a subgraph of K on m vertices. Proof. Suppose towards a contradiction that there were some graph An ⊇ Ar so that inr (T ) was a Boolean combination of minimal sets B1 , ..., Bk ⊆ Hn . Let N  n, and fix a graph AN ⊇ An with at least Nr /2 edges. Let AN 0 ⊇ AN extend AN along Ar ⊆ An with N 0 ≈ cN r−1 as guaranteed by Lemma 4.7. We will obtain a contradiction by counting the number of N 0 -patterns of inr (T ). Exactly as in the proof of Theorem 4.6, there are at most k 0 r−1 22 (2n! N 0 !)k ≈ CN 0 · ekN ≈ CN r−1 · ekN many N 0 -patterns. But since T has dense orbit, N r  there must be at least 2( r )/2 ≈ 2cN N 0 -patterns of inr (T ), a contradiction. We next turn to the class K of Kr -free graphs for some r ≥ 3. We will need a result similar to Lemma 4.7, but the given proof will not work as the construction doesn’t preserve being Kr -free. Recall that the Ramsey number R(r, n) of r and n is the smallest integer such that any graph on R(r, n) vertices either contains a clique of size r or an independent set of size n. Lemma 4.9. Let K be the class of Kr -free graphs for some r ≥ 3. Let e ⊆ B ∈ K, where e is an edge, and let C ∈ K with |C| = N . Then there is D ∈ K extending C along e ⊆ B with |D| ≤ cN 2(r−1)/(r−2) . Proof. Let R(r, n) be the Ramsey number of r and n. In [AKS], it is shown that R(r, n) = o(nr−1 ). Since C is Kr -free, this implies that C has an independent set of size at least N 1/(r−1) ; by repeatedly removing independent sets, we see that the chromatic number of C is at most ` ≈ N (r−2)/(r−1) . Write C = C1 t · · · t C` so that each Ci is an independent set. For every ordered pair (i, j) of distinct indices with i, j ≤S`, let D(i,j) be a set of |B| − 2 new vertices. We will define the graph D on vertex set C ∪ {i,j}∈[`]2 (D(i,j) ∪ D(j,i) ). First add edges to D so that D(i,j) ∼ = B \ e; fix h0 : B \ e → D(i,j) an isomorphism. Write e = {a, b}; if f : e → C with f (a) = i and f (b) = j, then add edges to D so that h0 ∪ f := h : B → D is an embedding with range f (e)∪D(i,j) . The hypergraph D is Kr -free and has |D| ≤ cN 2(r−2)/(r−1) as desired.  12 D. BARTOŠOVÁ AND A. ZUCKER Theorem 4.10. Let K be the class of Kr -free graphs for some r ≥ 3, with K = Flim(K). Let A2 ⊆ K be an edge. Then if T ⊆ H2 has dense orbit, then T 6∈ B20 . As in the proof of Theorem 4.8, we will not specify an exhaustion in advance, but we will still use some of the notational conventions. Proof. Suppose towards a contradiction that there were some graph An ⊇ A2 so that in2 (T ) was a Boolean combination of minimal sets B1 , ..., Bk ⊆ Hn . Let N  n, and fix a graph AN ⊇ An with at least n2 /r edges. Let AN 0 ⊇ AN extend AN along A2 ⊆ An with N 0 ≈ cN 2(r−2)/(r−1) as guaranteed by Lemma 4.9. We now obtain a contradiction by counting 0 2(r−1)/(r−2) N 0 -patterns. Once again, there are at most CN 0 · ekN ≈ CN 2(r−2)/(r−1) · ekN many N /r 0 n cN 2 ( ) 2 N -patterns in i2 (T ), which contradicts the fact that there are at least 2 ≈2 many N 0 -patterns.  We end this section with a conjecture. While it is a strict sub-conjecture of Conjecture 1.1, we think it might be more easily approached. Conjecture 4.11. Let G be a closed, non-compact subgroup of S∞ with metrizable universal minimal flow. Then S(G) 6∼ = E(M (G)). 5. A closer look at S∞ In this section, we take a closer look at S(S∞ ), with an eye towards understanding which pairs of points x 6= y ∈ S(S∞ ) can be separated by retractions. We view S∞ as the group of permutations of ω. We can realize ω as a Fraı̈ssé structure in the empty language. We set An = n, so that Hn is the set of all injections from n into ω, and for m ≤ n, Emb(Am , An ) is the set of all injections from m into n. We will often abuse notation and write s ∈ Hm as the tuple (s0 , ..., sm−1 ), where si = s(i). We start by developing some notions for any automorphism group. Let f ∈ Emb(Am , An ). If F ⊆ P(Hm ) is a filter, then we write f (F) for the filter generated by {f (T ) : T ∈ F}. If H ⊆ P(Hn ) is a filter, then f˜(H) is the push-forward filter {T ⊆ Hm : f (T ) ∈ H}. This may seem like a conflict of notation since f˜ : βHn → βHm is the extended dual map of f . We canTjustify this notation as follows. To each filter H on Hn , we associate the closed set XH := A∈H A ⊆ βHn . Conversely, given a closed set X ⊆ βHn , we can form the filter of clopen neighborhoods FX := {A ⊆ Hn : X ⊆ A}. Then we obtain the identity Xf˜(H) = f˜(XH ). A similar identity holds given a filter F on Hm : Xf (F ) = f˜−1 (XF ). Let Y ⊆ S(G) be closed. Let πm : S(G) → βHm be the projection map. Then πm (Y ) Y is a closed subset of βHm . Write Fm for Fπm (Y ) . For n ≥ m, the filter FnY extends the n Y n Y Y filter im (Fm ) and ı̃m (Fn ) = Fm . Conversely, given filters Fm on Hm for every m < ω such SAMUEL COMPACTIFICATIONS 13 that Fn extends inm (Fm ) and with ı̃nm (Fn ) = Fm , there is a unique closed Y ⊆ S(G) with Y Fm = Fm for each m < ω. We will call such a sequence of filters compatible. M We will need to understand the filters Fm when M ⊆ S(G) is a minimal subflow. It turns out that these filters are characterized by a certain property of their members. Definition 5.1. Given T ⊆ Hm , we say that T is thick if either of the following equivalent items hold (see [Z1]). (1) T ⊆ Hm is thick iff χHm ∈ χT · G. (2) T ⊆ Hm is thick iff for every n ≥ m, there is s ∈ Hn with s ◦ Emb(Am , An ) ⊆ T . We can now state the following fact from [Z1]. Theorem 5.2. Let G be an automorphism group, and let M ⊆ S(G) be closed. Then M is M a minimal subflow iff each Fm is a maximal filter of thick sets. Another observation is the following. Y and f ∈ Emb(Am , An ). Proposition 5.3. Say Y ⊆ S(G) is a subflow, and let T ∈ Fm Y Then f (T ) ∈ Fn . Proof. Pick g ∈ G with g|m = f . Then for any α ∈ S(G), we have T ∈ αg(m) iff f (T ) ∈ α(n). As Y is G-invariant, the result follows.  We now turn our attention to G = S∞ . Let {σi : i < m!} T list the permutations of m, i.e. M . Call S ⊆ Hm the members of Emb(Am , Am ). Then by Proposition 5.3, i σi (T ) ∈ Fm saturated if whenever (a0 , ..., am−1 ) ∈ S and σ is a permutation, then (aσ(0) , ..., aσ(m−1) ) ∈ S. M has a base of saturated sets. We have just shown that Fm Let us recall Ramsey’s theorem: for every k, `, r < ω with k ≤ `, there is m ≥ ` so that for every coloring c : [m]k → r, there is A ⊆ m with |A| = ` and |c([A]k )| = 1. Ramsey’s theorem will consequences for the collection of thick subsets of Hm . F F have interesting n Let ϕ : n Hn → n [ω] be the order forgetful map, i.e. for (y0 , ..., ym−1 ) ∈ Hm , we set ϕ(y0 , ..., ym−1 ) = {y0 , ..., ym−1 } ∈ [ω]m . Any filter F on Hm pushes forward to a filter ϕ(F) on [ω]m . We can define a thick subset of [ω]m in a very similar fashion to a thick subset of Hm ; more precisely, we say T ⊆ [ω]m is thick iff for every n ≥ m, there is s ∈ [ω]n with [s]m ⊆ T . Call S ⊆ [ω]m thin if it is not thick. We now have the following crucial corollary of Ramsey’s theorem: if T ⊆ [ω]m is thick and T = T0 ∪ · · · ∪ Tk , then some Ti is thick. In particular, if H is a thick filter on [X]m , i.e. a filter containing only thick sets, then we can extend H to a thick ultrafilter. It also follows that for every m < ω, the collection of thin subsets of [ω]m forms an ideal. M Theorem 5.4. Let M ⊆ S(S∞ ) be a minimal right ideal. Then for every m < ω, ϕ(Fm ) m −1 is a thick ultrafilter. Conversely, if p ∈ β[ω] is a thick ultrafilter, then {ϕ (T ) : T ∈ p} generates a maximal thick filter on Hm , hence there is a minimal M ⊆ S(S∞ ) with p = M ϕ(Fm ). 14 D. BARTOŠOVÁ AND A. ZUCKER M ) is a thick filter. Towards a contradiction, suppose it is not an ultrafilProof. Clearly ϕ(Fm M M ter, and extend it to a thick ultrafilter p ∈ β[ω]m . Let T ∈ p \ ϕ(Fm ). Then ϕ−1 (T ) 6∈ Fm . −1 M However, ϕ (T ) ∩ S is thick for every saturated S ∈ Fm . As saturated sets form a base for M M . , this contradicts the maximality of Fm Fm m Now let p ∈ β[ω] be a thick ultrafilter. Then F := {ϕ−1 (T ) : T ∈ p} generates a thick filter. Suppose S ⊆ Hm and {S} ∪ F generated a thick filter strictly larger than F. We may assume S is saturated. Then ϕ(S) ∈ p, so ϕ−1 (ϕ(S)) = S ∈ F, a contradiction.  Notice that if p ∈ β[ω]n is thick and m ≤ n, then there is a unique thick ultrafilter q ∈ β[ω]m with the property that {a ∈ [ω]n : [a]m ⊆ S} ∈ p for every S ∈ q. Certainly such a q must be unique. To see that this q exists, suppose [ω]m = S t T . Then the set n (p) for this q. If {a ∈ [ω]n : [a]m ∩ S 6= ∅ and [a]m ∩ T 6= ∅} is not thick. We will write πm M n M M ⊆ S(G) is a minimal right ideal and p = ϕ(Fn ), then we have πm (p) = ϕ(Fm ). Let LO(ω) be the space of linear orders on ω. Viewed as a subset of the right shift 2H2 , LO(ω) becomes an S∞ -flow. It is known (see [KPT] or [GW]) that LO(ω) ∼ = M (S∞ ). Indeed, we saw in section 4 that if K is the class of finite sets and K∗ is the class of finite linear orders, then (K∗ , K) is an excellent pair, and XK∗ ∼ = LO(ω). If M ⊆ S(S∞ ) is a minimal right ideal and <∈ LO(ω), then the map λ : M → LO(ω) given by λ(α) = < ·α := limgi →α < ·gi is an S∞ -flow isomorphism. We will often write <α for < ·α, and we will write > for the reverse linear order of <. If <0 , <1 ∈ LO(ω) and m ≥ 2, define the set Am (<0 , <1 ) = {{a0 , ..., am−1 } ∈ [ω]m : ∀i, j < m(ai <0 aj ⇔ ai <1 aj )} and define Bm (<0 , <1 ) = Am (<0 , >1 ). If s ∈ Hm , we say that <0 and <1 agree on s if ϕ(s) ∈ Am (<0 , <1 ), and we say that they anti-agree on s if ϕ(s) ∈ Bm (<0 , <1 ). When m = 2 we often omit the subscript. If M is a minimal right ideal, then ϕ(F2M ) contains exactly one of A(<0 , <1 ) or B(<0 , <1 ). Let AM ⊆ LO(ω) × LO(ω) be defined AM = {(<0 , <1 ) : A(<0 , <1 ) ∈ ϕ(F2M )}. Then AM is certainly reflexive and symmetric. To see that AM is an equivalence relation, note that A(<0 , <1 ) ∩ A(<1 , <2 ) ⊆ A(<0 , <2 ). Furthermore, AM has exactly two equivalence classes; this is because B(<0 , <1 ) ∩ B(<1 , <2 ) ⊆ A(<0 , <2 ). Lemma 5.5. Let M ⊆ S(S∞ ) be a minimal right ideal, and let (<0 , <1 ) ∈ AM . Then for M any m < ω, we have Am (<0 , <1 ) ∈ ϕ(Fm ). Proof. Let {fi : i < k} enumerate Emb(A2 , Am ). Then this is exactly the desired set. T i M fi (ϕ−1 (A(<0 , <1 ))) ∈ Fm , and  Lemma 5.6. Let M ⊆ S(S∞ ) be a minimal right ideal, and let α ∈ M . Then the following are equivalent: (1) α is an idempotent, (2) For any <∈ LO(ω), we have (<, <α ) ∈ AM , (3) There is <∈ LO(ω) with (<, <α ) ∈ AM . SAMUEL COMPACTIFICATIONS 15 Proof. Suppose α ∈ M is an idempotent, and let <∈ LO(ω). Then considering i2 = (x0 , x1 ) ∈ Emb(A2 , A2 ), we have x0 <α x1 iff {f ∈ H2 : f0 < f1 } ∈ α(2). But since α is an idempotent, this is equivalent to {f ∈ H2 : f0 <α f1 } ∈ α(2). But this implies that ϕ−1 (A(<, <α )) ∈ α(2), implying that A(<, <α ) ∈ ϕ(F2M ). Conversely, suppose α ∈ M and <∈ LO(ω) with (<, <α ) ∈ AM . If f ∈ Emb(A2 , An ), then we have f0 <α f1 iff {s ∈ Hn : s(f0 ) < s(f1 )} ∈ α(n). By Lemma 5.5, we see that this is iff {s ∈ Hn : s(f0 ) <α s(f1 )} ∈ α(n). It follows that < ·α · α =< ·α, so α is idempotent.  Theorem 5.7. Let M, N ⊆ S(S∞ ) be minimal right ideals. The following are equivalent. (1) AM = AN , (2) If u ∈ M and v ∈ N are idempotents, then uv ∈ M is also idempotent. Proof. Suppose AM 6= AN , with (<0 , <1 ) ∈ AN \ AM . Find u ∈ M with <0 ·u = <0 , and find v ∈ N with <0 ·v = <1 . By Lemma 5.6, u and v are idempotents and uv is not an idempotent. Conversely, suppose u ∈ M and v ∈ N are idempotents with uv not idempotent. Find <0 ∈ LO(ω) with <0 ·u = <0 , and let <1 = <0 ·v. Since v is idempotent, we have by Lemma 5.6 that (<0 , <1 ) ∈ AN ; but since uv is not idempotent, we have (<0 , <1 ) 6∈ AM .  It is easy to construct minimal right ideals M, N ⊆ S(S∞ ) with AM 6= AN . Let <0 m , <1 ∈ LO(ω) be linear orders so that for every m < ω, there are sm = (sm 0 , ..., sm−1 ) ∈ Hm m m m m and t = (t0 , ..., tm−1 ) ∈ Hm so that <0 and <1 agree on s and anti-agree on tm . Let M ⊆ S(S∞ ) be a minimal subflow with ϕ−1 (A(<0 , <1 )) ∈ F2M , and let N ⊆ S(S∞ ) be a minimal subflow with ϕ−1 (B(<0 , <1 )) ∈ F2N . Then (<0 , <1 ) ∈ AM \ AN . We now turn our attention to constructing M 6= N ⊆ S(S∞ ) minimal right ideals with AM = AN ; this will prove Theorem 1.4 as a corollary of Theorem 5.7. To this end, we will construct two thick ultrafilters p 6= q ∈ β[ω]3 with π23 (p) = π23 (q), so that whenever M and N are minimal subflows of S(S∞ ) with ϕ(F3M ) = p and ϕ(F3N ) = q, then ϕ(F2M ) = ϕ(F2N ). In particular, this implies that AM = AN . Recall that a selective ultrafilter is an ultrafilter p on ω with the property that for any finite coloring c : [ω]2 → r, there is a p-large set A ⊆ ω which is monochromatic for c. Another way of saying this is as follows. Given a set A ⊆ ω, set λA = [A]2 , and if F is a filter on ω, let λF be the filter generated by {λA : A ∈ F}. Then the ultrafilter p is selective iff λp is an ultrafilter. The existence of selective ultrafilters is independent of ZFC. We will be considering the following generalizations of selective ultrafilters. Let m < ω. If T ⊆ [ω]m , we set λT = {s ∈ [ω]m+1 : [s]m ⊆ T }. If n > m, we set λ(n−m) (T ) = {s ∈ [ω]n : [s]m ⊆ T }. Notice that the λ(n−m) operation is the same as applying λ (n − m)-many times, justifying this notation. If F is a filter on [ω]m , we let λ(n−m) F be the filter generated by {λ(n−m) T : T ∈ F}. It can happen that for some T ∈ F we have λ(n−m) T = ∅. We will usually be working under assumptions that prevent this from happening. For instance, if T ⊆ [ω]m is thick, then λ(n−m) T 6= ∅ for every n > m. Even better, if F is a thick filter on [ω]m , then λ(n−m) F is a thick filter on [ω]n . 16 D. BARTOŠOVÁ AND A. ZUCKER Definition 5.8. Let p ∈ β[ω]m be a thick ultrafilter. We say that p is (m, n)-selective if λ(n−m) p is an ultrafilter. We say that p is weakly (m, n)-selective if there is a unique thick ultrafilter extending the filter λ(n−m) p. If p ∈ β[ω]m is a thick ultrafilter and q ∈ β[ω]n is a thick ultrafilter extending λ(n−m) p, n then we have πm (q) = p. Therefore to prove Theorem 1.4, it is enough to construct a thick ultrafilter p ∈ β[ω]2 which is not weakly (2, 3)-selective. Indeed, if p ∈ β[ω]2 is not weakly (2, 3)-selective, then there are thick ultrafilters q0 6= q1 both extending the filter λp, so π23 (q0 ) = π23 (q1 ). Our construction proceeds in two parts. First we define a certain type of pathological subset of [ω]3 and show that its existence allows us to construct p ∈ β[ω]2 which is not weakly (2, 3)-selective. Then we show the existence of such a pathological set. We begin by developing some abstract notions. Let Y be a set, and let I be a proper ideal on Y . Write S ⊆I T if S \ T ∈ I. Let ψ : P(Y ) → P(Y ) be a map satisfying ψ 2 = ψ, S ⊆ ψ(S), S ⊆ T ⇒ ψ(S) ⊆ ψ(T ), and ψ(∅) = ∅. Call a set S ⊆ Y ψ-closed or just closed if ψ(S) = S, and call S near-closed if there is a closed set T with S∆T ∈SI. Call a set S ⊆ Y (< ℵ0 )-near-closed if there are k < ω and closed T0 , ..., Tk−1 with S∆( i<k Ti ) ∈ I. Notice that a finite union of near-closed sets is (< ℵ0 )-near-closed. Now suppose S ⊆ Y is a set which is not (< ℵ0 )-near-closed. If p, q ∈ βY , we say that p ψ-intertwines q over S modulo I if the following three items all hold: (1) {S \ T : T is near-closed and T ⊆I S} ⊆ p, (2) {ψ(T ) \ S : T ∈ p, T ⊆ S} ⊆ q, (3) p and q extend the filterdual of I. If ψ, S, and I are understood, we will just say that p intertwines q. Notice in (1) that if T is near-closed with T ⊆I S, then S ∩ T is also near-closed, so it is enough to consider near-closed T with T ⊆ S. Lemma 5.9. Fix S ⊆ Y which is not (< ℵ0 )-near-closed. (1) If B ⊆ Y with B ∈ I, then B is near-closed. Hence S 6∈ I. (2) There are p, q ∈ βY so that p intertwines q. Proof. The first part follows since the empty set is closed. Since S is not (< ℵ0 )-near-closed, we have that {S \ T : T near-closed and T ⊆I S} generates a filter F extending the filterdual of I. Let p ∈ βY be any ultrafilter extending F. Now let T ∈ p. Then ψ(T ) \ S 6∈ I; otherwise we would have ψ(T ) ⊆I S, so S \ ψ(T ) ∈ p, contradicting that T ∈ p. Also note by monotonicity of ψ that (ψ(T0 ) ∩ ψ(T1 )) \ S ⊇ ψ(T0 ∩ T1 ) \ S, so the collection {ψ(T ) \ S : T ∈ p} generates a filter H avoiding I; letting q be any ultrafilter extending both H and the filterdual of I, we see that p intertwines q.  We now apply these ideas. Let Y = [ω]3 , and let I be the thin ideal. Given T ⊆ [ω]3 , view T as a 3-uniform hypergraph, and form the shadow graph ∂T := {{a, b} ∈ [ω]2 : ∃c({a, b, c} ∈ SAMUEL COMPACTIFICATIONS 17 T )}. Define ψ(T ) = λ∂T . In words, ψ(T ) is the largest hypergraph with ∂ψ(T ) = ∂T . More generally, we can set Y = [ω]n and let I be the ideal of subsets of [ω]n which are not thick. If m < n and T ⊆ [ω]n , we set ∂ (n−m) T = {s ∈ [ω]m : ∃t ∈ [ω]n−m (s ∪ t ∈ T )}. Then we can set ψ(T ) = λ(n−m) ∂ (n−m) T . Theorem 5.10. Let Y = [ω]n , let I be the thin ideal, and let ψ = λ(n−m) ∂ (n−m) for some m < n. Suppose S ⊆ [ω]n is not (< ℵ0 )-near-closed, and say p, q ∈ β[ω]n where p intertwines n n q. Then πm (p) = πm (q). n n Proof. Suppose towards a contradiction that p0 := πm (p) 6= q 0 := πm (q) as witnessed by m 0 m 0 A ⊆ [ω] with A ∈ p , [ω] \ A ∈ q . Then setting B := {s ∈ [ω]n : [s]m ⊆ A} and C := {s ∈ [ω]n : [s]m ⊆ [ω]m \ A}, we have B ∈ p, C ∈ q, and B ∩ C = ∅. Note that both B and C are ψ-closed. Since p and q are intertwined, we have ψ(B ∩ S) \ S ∈ q, so in particular B \ S ∈ q. But since C ∈ q, this is a contradiction.  The next theorem along with Theorems 5.10 and 5.7 will prove Theorem 1.4. Theorem 5.11. With I and ψ as in Theorem 5.10, there is S ⊆ [ω]n which is not (< ℵ0 )near-closed. Proof. The following elegant proof is due to Anton Bernshteyn. We take S to be the random n-uniform hypergraph. Suppose towards a contradiction that S was k-near-closed for some k < ω. We write S = S0 ∪ · · · ∪ Sk−1 S with each Si near-closed. Let Ti ⊆ [ω]n be a ψ-closed set with Si ∆Ti ∈ I, and write T = i<k Ti . So S∆T ∈ I. This means that there is some ` < ω so that the hypergraph S∆T contains no clique of size `. We now compute an upper bound on the number of induced subgraphs of S that can appear on N vertices V := {v0 , ..., vN −1 } ⊆ ω. Since S is the random n-uniform hypergraph, N there must be 2( n ) many possibilities. But by assumption, S = T ∆G, where G is some hypergraph with no cliques of size `. Since an induced subgraph of a ψ-closed graph is N ψ-closed, each Ti |V is determined by ∂ (n−m) (Ti |V ), so in particular, there are at most 2(m) N many possibilities for each Ti |V , so at most 2k(m) possibilities for T |V . As for G, we need an estimate on the number of `-free n-uniform hypergraphs on N vertices. It is a fact that  N for some constant c > 0 depending only on ` and n, we can find c n subsets of N of size ` which pairwise have intersection smaller than n. By a probabilistic argument, it follows that the proportion of n-uniform hypergraphs on N vertices which are `-free is at most ` N ` N N (1 − 2−(n) )c( n ) ≤ 2−c(n)( n ) := 2−d( n ) . Multiplying together the number of choices for T |V with the number of choices for G|V , we have that the number of possibilities for S|V is at most N N N (2(1−d)( n ) )(2k(m) )  2( n ) . This shows that S is not (< ℵ0 )-near-closed.  Let us now briefly discuss why Theorem 1.4 implies Theorem 1.3. Recall (see [HS]) that in any compact left-topological semigroup S, the smallest ideal K(S) is both the union of the minimal right ideals and the union of the minimal left ideals. The intersection of any 18 D. BARTOŠOVÁ AND A. ZUCKER minimal right ideal and any minimal left ideal is a group, so in particular contains exactly one idempotent. More concretely, if M ⊆ S is a minimal right ideal and u ∈ M is an idempotent, then Su is a minimal left ideal and M u = M ∩ Su. All the groups formed in this way are algebraically isomorphic. When S = S(G) for some topological group G, we can interpret this group as aut(M (G)), the group of G-flow isomorphisms of M (G). Fix M ⊆ S(G) a minimal subflow, and let ϕ : S(G) → M be a G-map. Letting p = ϕ(1G ), then we must have ϕ = λp . It follows that ϕ is a retraction iff ϕ = λu for some idempotent u ∈ M . Furthermore, if p ∈ M , then there is a unique idempotent u ∈ M with p = pu ∈ M u. It follows that for some q ∈ M we have λq ◦ λp = λu . Now suppose N ⊆ S(G) is another minimal right ideal, and that x 6= y ∈ S(G) can be separated by a retraction ψ onto N . Pick any p ∈ M and form the G-map λp ◦ ψ. Notice that λp |N is an isomorphism. For some q ∈ M we have λp ◦ ψ = λq . Then for some r ∈ M , we have λr ◦ λq = λu a retraction. It follows that x and y are also separated by λu . Hence the relation of being separated by a retraction does not depend on the choice of minimal subflow M ⊆ S(G). Now let G = S∞ , and let M 6= N be the minimal right ideals found in Theorem 1.4. Let L be any minimal left ideal, and let u ∈ M ∩ L and v ∈ N ∩ L be idempotents. We will show that u and v cannot be separated by retractions, so let ϕ : S(G) → M be a retraction. Then ϕ = λw for some idempotent w ∈ M . Then ϕ(u) = wu = u since idempotents in M are left identities for M . But now consider ϕ(v) = wv. By our assumption on M and N , wv is an idempotent. However, we must also have wv ∈ M ∩ L since M and L are respectively right and left ideals. It follows that wv = u, so ϕ(u) = ϕ(v) as desired. 6. Proximal and Distal The technique of finding M, N ⊆ S(G) minimal subflows with J(M ) ∪ J(N ) a semigroup allows for a quick solution to Ellis’s problem for some Polish groups G. Recall from the introduction that a pair of points x, y in a G-flow X is called proximal if there is p ∈ E(X) with xp = yp and X is proximal if every pair of points is proximal. Now suppose that M (G) is proximal, i.e. that M (G) is proximal. Then every element of M is an idempotent; to see why, notice that it suffices to show that M ∩ L is a singleton whenever L is a minimal left ideal. Indeed, suppose u 6= p ∈ M ∩ L, with u idempotent. Suppose that (u, p) were proximal, i.e. that for some q ∈ S(G) we have uq = pq. Since M ∩ L is a group with identity u, we must have pu = p. Now as M is a minimal right ideal, find r ∈ M with uqr = u. But then pqr = puqr = pu = p. This is a contradiction, so (u, p) cannot be proximal. A G-flow X is distal if every pair of non-equal points is distal, that is, not proximal. A useful fact (see [A]) is that X is distal iff E(X) is a group. If M (G) is distal and M ⊆ S(G) is a minimal subflow, then J(M ) is a singleton. To see this, note that if u, v ∈ J(M ), then uv = vv = v, so (u, v) is a proximal pair. If u ∈ J(M ) is the unique idempotent, then the map ϕ : E(M ) → M given by p → u · p is a G-flow isomorphism. For automorphism groups G with M (G) proximal or distal, it follows that the conclusion of Theorem 1.4 is automatic for any two minimal right ideals M 6= N . The same argument for S∞ shows that any two idempotents of the same minimal left ideal cannot be separated by retractions. Of course, we need to know that S(G) contains more than one minimal right ideal; see ([Ba], Corollary 11) for a proof of this fact. SAMUEL COMPACTIFICATIONS 19 The following theorem collects some examples of Polish groups G with M (G) proximal. Theorem 6.1. Let G be either Homeo(2ω ) or the automorphism group of the countablyinfinite-dimensional vector space over a finite field. Then S(G) ∼ 6= E(M (G)) We now consider the case when M (G) is distal. The rest of this section is spent proving Theorem 1.5. proof of Theorem 1.5. Suppose M (G) is distal and metrizable, and fix minimal M ⊆ S(G). As M ∼ = E(M ) is a group, we see that Aut(M ), the group of G-flow isomorphisms of M , acts transitively on M . Therefore by ch. 2, Theorem 13 of [A], M must be equicontinuous, hence a compact metrizable group. Furthermore, as M must have a comeager orbit by [BYMT], we have that M is a single orbit. Let H = {g ∈ G : ug = u}. By [MNT], H is extremely amenable. To show that H is normal, we show that the map ϕ : G → M given by ψ(g) = ug is a homomorphism. Indeed, we have ug · uh = (ugu)h = ugh since u is a two-sided identity for M . This shows the existence of the short exact sequence from item (2) of Theorem 1.5. i ϕ Now suppose 1 → H → − G− → K → 1 is a short exact sequence of groups with H extremely amenable and K compact metrizable. Notice that the action k · g := k · ϕ(g) turns K into a G-flow. Notice that ϕ is left uniformly continuous, so we can extend to a map ϕ : S(G) → K via ϕ(p) = limgi →p ϕ(gi ). Let M ⊆ S(G) be minimal; then ϕ|M is a G-map. Since H ⊆ G is extremely amenable, let u ∈ M be an H-fixed point. Now viewing K as the right coset space {Hg : g ∈ G}, we build a G-equivariant map ψ : K → M by setting ψ(Hg) = ug. As the image of ψ is dense in M , we will be done once we show that ψ is continuous. To see this, notice that we have the following commutative diagram. M ψ ϕ K λϕ(u) K Indeed, let Hg ∈ K. Then ϕ(ψ(Hg)) = ϕ(ug)) = ϕ(u) · g = ϕ(u) · Hg. Since λϕ(u) and ϕ are continuous, we must have that ψ is continuous.  7. Some ultrafilters on [ω]2 This last section includes a short discussion of some ultrafilters motivated by the work in section 5. The first main theorem of this section provides a counterpoint to Theorem 1.4. Theorem 7.1. It is consistent with ZFC that there is a minimal subflow M ⊆ S(G) so that if N ⊆ S(G) is a minimal subflow with J(M ) ∪ J(N ) a semigroup, then M = N . The second theorem points out a key difference between selective ultrafilters and (2, 3)selective ultrafilters. Recall that if p, q ∈ βω, then we say that q ≥RK p if there is a function f : ω → ω with f (q) = p. Another characterization of selective ultrafilters is that they are 20 D. BARTOŠOVÁ AND A. ZUCKER exactly the ultrafilters which are minimal in the Rudin-Keisler order. The next theorem shows that (2, 3)-selectives can be very far from Rudin-Keisler minimal. Theorem 7.2. If p ∈ βω, there is a countably closed forcing extension P adding a (2, 3)selective ultrafilter q with q ≥RK p. As it turns out, these two theorems will both be proven using the same forcing construction. We define a forcing P which is very similar to a forcing defined by Laflamme [L]. A slightly more straightforward forcing would suffice for Theorem 7.1 where we don’t refer to a fixed p ∈ βω, but with a bit more work, we can prove both theorems. F Definition 7.3. Fix p ∈ βω. Write ω = n En with |En | = n. We define P = hP, ≤i as follows. (1) A condition A ∈ P is a subset of ω so that for every k < ω, we have {n < ω : |A ∩ En | ≥ k} ∈ p. (2) We declare that B ≤ A iff B ⊆ A. If A, B ∈ P, we define B  A iff there is k < ω so that {m < ω : |Em ∩ (B \ A)| ≤ k} ∈ p. It is straightforward to see that hP, i is a separative pre-order which is equivalent to P. Lemma 7.4. P is countably closed. Proof. T First notice that if hAn : n < ωi is a -decreasing sequence in P , then setting A0n = i≤n Ai , we have that A0n is -equivalent to An . So we may freely work with ≤decreasing sequences. Suppose hAn : n < ωi is a ≤-decreasing sequence in P . Write S(m, k) = {n < ω : |Am ∩ En | ≥ k}. Note that S(m, k) ∈ p for every m, k < ω. Also, if m ≤ m0 and k ≤ k 0 , then S(m0 , k 0 ) ⊆ S(m, k). S For m ≥ 1, we define Tm = S(m, m) \ S(m + 1, m + 1). Note that if m < ω, then n≥m Tm = S(m, m). If m ≥ 1 and n ∈ Tm , then |Am ∩ En | ≥ m. We form B ∈ P by setting [ [ B= Am ∩ En . m≥1 n∈Tm For each m ≥ 1, we have {n < ω : |B ∩ En | ≥ m} = S(m, m) ∈ p, so B ∈ p. To see that B  Am , we note that {n < ω : B 6⊆ Am } ⊆ ω \ S(m, m).  If A ∈ P, we set à = S n [A ∩ En ]2 ⊆ [ω]2 . The next proposition will prove Theorem 7.2. Proposition 7.5. Let G ⊆ P be generic. Then G̃ := {à : A ∈ G} generates a thick ultrafilter on [ω]2 which is (2, n)-selective for every n. Furthermore, this ultrafilter is RK-above p. Proof. Set E2 = 1eP , and suppose E2 = S t T . Let A ∈ p. By Ramsey’s theorem, there is some non-decreasing function k → b(2, k) increasing to infinity so that any 2-coloring of the complete graph on k vertices has a monochromatic clique of size b(2, k). If |A ∩ EN | = k, then let XN ⊆ A ∩ EN be chosen so that |XN | = b(2, k) and X˜N ⊆ S or X˜N ⊆ T . Define S 0 , T 0 ⊆ ω, placing N ∈ S 0 S or N ∈ T 0 depending on which outcome happens. WLOG suppose 0 S ∈ p. Then letting X = N ∈S 0 XN , we have X ∈ P, X ≤ A, and X decides whether S or T is in the filter generated by G̃. SAMUEL COMPACTIFICATIONS 21 The argument that the ultrafilter generated by G̃ is (2, n)-selective is almost the exact same. By Ramsey’s theorem, there is some non-decreasing function k → b(n, k) increasing to infinity so that any 2-coloring of the complete n-uniform hypergraph on k-vertices has a monochromatic clique of size b(n, k). Now letting En = λ(n−2) (E2 ), fix a partition En = StT . If A ∈ P, we can in a similar fashion find X ≤ A deciding whether S or T is in the filter λ(n−2) (G̃). Lastly, let ψ : E2 → ω be so that ψ({x, y}) = n iff {x, y} ⊆ En . Then if U ∈ V [G] is the ultrafilter generated by G̃, then ψ(U) = p.  We now turn towards the proof of Theorem 7.1. To do this, we use Theorem 5.7. Working in V [G], let MG ⊆ S(S∞ ) be the unique minimal subflow so that ϕ(F2MG ) is the ultrafilter generated by G̃. We need to show that {A(<0 , <1 ) : (<0 , <1 ) ∈ AMG } generates G̃. To see why this is, fix A ∈ P. We may assume that if A ∩ En 6= ∅, then |A ∩ En | ≥ 2. We will construct linear orders S <0 and <1 so that A(<0 , <1 ) = Ã. First write ω = n Xn , where X0 = ω \ A and Xn = A ∩ En . Some of the Xn may be empty, but this is fine. First define <0 and <1 on X0 to be any linear orders which completely disagree. Suppose <0 and <1 have been defined on X0 ∪ · · · ∪ Xn−1 . First define <0 and <1 on Xn so that they agree. Now place Xn <0 -below everything built so far and also <1 -above everything built so far. Then A(<0 , <1 ) = à as desired. This completes the proof of Theorem 7.1. The proof of Theorem 7.1 suggests another type of ultrafilter on [ω]2 we can define. If p ∈ β[ω]2 is thick, define Ap = {(<0 , <1 ) : A(<0 , <1 ) ∈ p}. As we saw in section 5, Ap is an equivalence relation on LO(ω). Definition 7.6. Let p ∈ β[ω]2 be a thick ultrafilter. We call p a linear order ultrafilter if {A(<0 , <1 ) : (<0 , <1 ) ∈ Ap } generates p. Call p a weak linear order ultrafilter if p is the unique thick ultrafilter containing every A(<0 , <1 ) with (<0 , <1 ) ∈ p. One can prove that there are thick ultrafilters p ∈ β[ω]2 which are not weak linear order ultrafilters, providing an alternate proof of Theorem 1.4. The proof is very similar to the proof that some p ∈ β[ω]2 is not weakly (2, 3)-selective. We end with some open question about these ultrafilters. Question 7.7. Does ZFC prove the existence of (2, 3)-selective ultrafilters? Of linear order ultrafilters? Question 7.8. Can there exist a weakly (2, 3)-selective ultrafilter which is not (2, 3)-selective? Same question for linear order ultrafilters. The last question is motivated by Theorem 7.2. This shows that (2, 3)-selective ultrafilters can exist arbitrarily high up in the Rudin-Keisler order. Question 7.9. Is it consistent with ZFC that the (2, 3)-selective ultrafilters are upwards Rudin-Keisler cofinal? References [AKS] M. Ajtai, J. Komlós, and E. Szemerédi, A Note on Ramsey Numbers, Journal of Combinatorial Theory, 29, (1980) 354–360. 22 D. BARTOŠOVÁ AND A. ZUCKER [A] J. Auslander, Minimal Flows and Their Extensions, North Holland, 1988. [B] Z. Baranyai, On the factorization of the complete uniform hypergraph, Colloq. Math. Soc. Janos Bolyai, 10 (1975), 91–108. [Ba] D. Bartošová, Topological dynamics of automorphism groups of ω-homogeneous structures via near ultrafilters, Ph.D. Thesis, University of Toronto, 2013. [BYMT] I. Ben-Yaacov, J. Melleray, and T. Tsankov, Metrizable universal minimal flows of Polish groups have a comeagre orbit, GAFA, 27(1) (2017), 67–77. [E] R. Ellis, Lectures on Topological Dynamics, W.A. Benjamin, 1969. [F] H. Firstenberg, Disjointness in ergodic theory, minimal sets, and a problem in Diophantine approximation, Math. Syst. Theory, 1 (1967), 1–49. [GW] E. Glasner and B. Weiss, Minimal actions of the group S(Z) of permutations of the integers, Geometric and Functional Analysis, 12 (2002), 964988. [GW1] E. Glasner and B. Weiss, Interpolation sets for subalgebras of `∞ (Z), Israel J. Math., 44(4) (1983), 345–360. [HS] N. Hindman and D. Strauss, Algebra in the Stone-Čech Compactification, 2nd Edition, De Gruyter, 2012. [KPT] A.S. Kechris, V.G. Pestov, and S. Todorčević, Fraı̈ssé limits, Ramsey theory, and topological dynamics of automorphism groups, Geometric and Functional Analysis, 15 (2005), 106–189. [L] C. Laflamme, Forcing with filters and complete combinatorics, Annals of Pure and Applied Logic, 42(2) (1989), 125–163. [MNT] J. Melleray, L. Nguyen Van Thé, T. Tsankov, Polish groups with metrizable universal minimal flows, Int. Math. Res. Not., no. 5 (2016), 1285–1307. [NVT] L. Nguyen Van Thé, More on the Kechris-Pestov-Todorčević Correspondence: Precompact Expansions, Fund. Math., 222 (2013), 19-47. [P] V. Pestov, On free actions, minimal flows, and a problem by Ellis, Trans. Amer. Math. Soc., 350 (10), (1998), 4149–4165. [P1] V. Pestov, Some universal constructions in abstract topological dynamics, Topological dynamics and applications, 215 of Contemp. Math. (1998), 8399. [Sa] Pierre Samuel, Ultrafilters and compactifications of uniform spaces. Trans. Amer. Math. Soc., 64 (1948), 100–132. [U] V. Uspenskij, Compactifications of topological groups, Proceedings of the ninth Prague topological symposium (2001), 2002, 331–346 [Z] A. Zucker, Topological dynamics, ultrafilter combinatorics, and the Generic Point Problem. Trans. Amer. Math. Soc., 368(9), (2016). [Z1] A. Zucker, Thick, syndetic, and piecewise syndetic subsets of Fraı̈ssé structures. Preprint (2016).
4math.GR
Distributed Scheduling Algorithms for Optimizing Information Freshness in Wireless Networks arXiv:1803.06469v1 [cs.IT] 17 Mar 2018 Rajat Talak, Sertac Karaman, and Eytan Modiano Abstract—Age of Information (AoI), measures the time elapsed since the last received information packet was generated at the source. We consider the problem of AoI minimization for singlehop flows in a wireless network, under pairwise interference constraints and time varying channel. We consider simple, yet broad, class of distributed scheduling policies, in which a transmission is attempted over each link with a certain attempt probability. We obtain an interesting relation between the optimal attempt probability and the optimal AoI of the link, and its neighboring links. We then show that the optimal attempt probabilities can be computed by solving a convex optimization problem, which can be done distributively. I. I NTRODUCTION Timely delivery of information updates is gaining increasing relevance with the advent of technologies such as autonomous flying vehicles, internet of things, and other cyber physical systems. In autonomous flying vehicles, for example, timely exchange of position, velocity, and other control information can improve network safety [1], [2]. Packet delay, the traditionally used measure, accounts for the average time taken for a packet to reach the destination node, but does not measure the ‘information lag’ at the destination node, especially when the information update generation can be controlled [3]–[5]. For example, if two packets carry the same information, and one arrives early at the destination, then there is no need in accounting for the delay in reception of the second packet. Age of information (AoI), a newly proposed metric [3], [6], is defined to be the time elapsed since the last received information update was generated at the source node. AoI, upon reception of a new update packet drops to the time elapsed since generation of the packet, and grows linearly otherwise. AoI, therefore, more accurately captures the ‘information lag’ at the destination node. AoI has been analyzed for various queueing models [3], [7]– [11], but very little attention has been paid to AoI minimization in wireless networks. A problem of scheduling finitely many update packets under physical interference constraints was shown to be NP-hard in [12]. Age for a broadcast network, where only a single link can be activated at any time, was studied in [13]–[15]. Some preliminary analysis of age for a slotted ALOHA like random access was done in [16], The authors are with the Laboratory for Information and Decision Systems (LIDS) at the Massachusetts Institute of Technology (MIT), Cambridge, MA. {talak, sertac, modiano}@mit.edu Submitted to SPAWC 2018. This work was supported by NSF Grants AST-1547331, CNS-1713725, and CNS-1701964, and by Army Research Office (ARO) grant number W911NF17-1-0508. while multi-hop networks have been considered in [5], [17]. More recent work includes [4], [18], [19], which propose centralized scheduling policies for AoI minimization, under general interference constraints and time varying channels. In a wireless network, it is not always possible to implement centralized schemes. In this paper, we consider a simple, yet broad, class of distributed scheduling policies for wireless networks, in which each link attempts transmission with a certain probability. We consider time varying channel and a pairwise interference model, in which each link interferes with a specified set of links in the network. We first derive an interesting relation between the optimal attempt probability, and the optimal age of the given link and the interfering links. We then characterize the optimal distributed policy πD , as a solution to a convex optimization problem. We further show that this convex problem can be solved distributively. II. S YSTEM M ODEL We model a wireless communication network as a graph G = (V, E), where V is the set of nodes and E is the set of directed communication links between the nodes. Each link e ∈ E is associated with a source-destination pair. Time is slotted, with the duration of each slot set equal to the time it takes to transmit a single update packet. For simplicity, we normalize the slot duration to unity. Transmission of update packets cannot occur simultaneously over all links due to wireless interference constraints [20]. For each link e ∈ E, there is a subset of links Ne ⊂ E, that interfere with link e, i.e., if link e and a link l ∈ Ne attempt simultaneous transmission, then the transmission over link e fails due to interference. We call this the pairwise interference model. Popular models such as 1-hop and 2-hop interference models [20] are special cases of this model. Channel uncertainty can also lead to failure in reception of update packets. We consider a two state channel process Se (t) ∈ {0, 1} for all time t and links e. Channel state Se (t) = 1 implies that link e’s channel is ON at time t, and a noninterfering transmission over e is successfully received. When Se (t) = 0, even a non-interfering transmission over link e fails due to bad channel conditions. We assume the channel process {Se (t)}t,e to be independent and identically distributed (i.i.d.) across time t, and only independent across links e. We let γe = Pr (Se (t) = 1) denote the channel success probability for link e. We consider the case when the channel statistics, namely γe for all e ∈ E, are known but the current channel state Se (t) cannot be observed. We use Ue (t) to denote scheduling decisions at time t, for each link e. Ue (t) = 1 when link e attempts transmissions in slot t, and Ue (t) = 0 otherwise. Thus, a successful transmission occurs over link e if and only if a transmission is attempted on link e, the link e’s channel is ON, and no transmission is attempted over links e0 ∈ Ne . This is equivalent to Y (1 − Ue0 (t)) = 1. Ûe (t) , Se (t)Ue (t) (1) e0 ∈Ne A. Age of Information AoI of a network is a function of AoI of each sourcedestination pair. Thus, we define age Ae (t) for each link, to be the time since the last received update was generated. We assume source nodes to be active sources, i.e., it can generates a fresh update packet before every transmission. When all sources are active, the age Ae (t), is equal to the time elapsed since the last successful transmission over e. Thus, the evolution of age Ae (t) can be written as  Ae (t) + 1 if Ûe (t) = 0 Ae (t + 1) = , (2) 1 if Ûe (t) = 1 for all e ∈ E. We define average age for link e to be Aave e = lim sup T →∞ T 1X Ae (t), T t=1 (3) whenever the limit exists. We define the peak age to be the average of all the age peaks: Ape Ne (T ) X 1 Ae (Te (i)), = lim sup T →∞ Ne (T ) i=1 (4) where Te (i) denote the ith instance of successful transmission over link e, i.e., the ith instance when Ûe (t) = 1, and Ne (T ) is the number of successful transmissions over link e until time T . We define average and peak AoI of the network to be a weighted sum of link AoI: X X Aave = we Aave and Ap = we Ape . (5) e , e∈E e∈E Our objective is to design distributed scheduling policies that minimize the network average and peak age. B. Distributed Stationary Policies We focus our attention on policies in which scheduling decisions are made by the source of each link e, and not by a centralized scheduler. In particular, we consider policies in which each link e attempts transmission with probability pe > 0, independent across links and slots. We refer to these policies as the distributed stationary policies. The probability that a non-interferingQtransmission is attempted over link e is given by fe = pe e0 ∈Ne (1 − pe0 ). We will refer to fe as the link activation frequency of link e, and use f = (fe )e∈E to denote the link activation frequency vector. Fig. 1. Example of two interfering links, 1 and 2. The yellow region is FD . Also shown is the set of feasible link activation frequencies for centralized schedule: F = {(f1 , f2 ) | f1 + f2 ≤ 1 and fi ≥ 0}. The space of all link activation frequencies f , attainable using distributed stationary policies, is given by  Y FD = f ∈ R|E| | fe = pe (1 − pe0 ) e0 ∈Ne  and 0 ≤ pe ≤ 1 ∀ e ∈ E . (6) Figure 1 shows the set of feasible link activation frequencies for distributed policies for the two interfering link example. Also, shown is the set of all link activation frequencies F attainable using a centralized scheduler. It can be seen that the set FD is non-convex, and strictly smaller than F. The gap between these two sets indicates the price one has to pay in resorting to distributed scheduling. III. O PTIMAL P OLICY In this section, we characterize an age optimal policy, and propose an implementation that requires only local information. We first show that for any distributed stationary policy, the peak and average age are equal, and can be written as a simple convex function in link activation frequencies fe . Lemma 1: For any distributed stationary policy, the average and peak age is given by X we Aave = Ap = , (7) γe fe e∈E Q where fe = pe e0 ∈Ne (1 − pe0 ) is the link activation frequency of link e. Proof: A similar result was proved in [4] which considered a class of centralized policies, that are not necessarily stationary. Here, we provide a proof for distributed stationary policies. Consider a link e. Then, under any distributed stationary policy, the event that link e is successfully activated in slot t is independent and identically distributed across slots, with success probability of γe fe . Thus, the time since last activation is geometrically distributed with mean γe1fe . It turns out that the peak and average age for link e are indeed equal to this quantity, i.e., 1 p Aave , e = Ae = γe fe P we and therefore, the network age is e∈E γe fe . The detailed proof is given in Appendix A. An immediate consequence of Lemma 1 is that both peak and average age minimization problems, over the space of all distributed stationary policies, can be written as X we Minimize (8) f ∈FD γe fe e∈E Notice that, although the objective function is convex, the constraint set FD is non-convex, see Figure 1. Furthermore, obtaining optimal link activation frequencies f ∗ does not suffice as the distributed policy is characterized by the attempt probabilities pe . The optimal link attempt probabilities p∗ , that solve (10), yield a distributed stationary policy, that is both peak and average age optimal. We call this policy πD . The following result characterizes the optimal link attempt probabilities p∗ in terms of the optimal link age A∗e . Theorem 1: The attempt probabilities p∗ ∈ E), that solve (8), are given by = (p∗e |e p∗e = we A∗e + w A∗ Pe e e0 :e∈Ne0 we0 A∗e0 , (9) −1  Q is for all e ∈ E, where A∗e = γe p∗e e0 ∈Ne (1 − p∗e0 ) the optimal peak/average age of link e. Proof: Substituting FD , from (6), in (8) we get X we Minimize γe fe p∈[0,1]|E| ,f ∈R|E| e∈E Y subject to fe = pe (1 − pe0 ) ∀ e ∈ E However, Theorem 1 shows that the attempt probability p∗e = P A∗e e0 ∈E A∗e0 , (13) is both peak and average age optimal. This gives us a more precise answer to the question posed in [16]. Our result, however, holds under the more general pairwise interference constraints, and non-equal weights we > 0. A. Distributed Computation of πD Although, Theorem 1 gives a characterization of the optimal attempt probabilities, in terms of the optimal link age A∗e , it does not provide for a simple method to computation. We now provide for an alternate characterization of the network age minimization problem (8). In particular, we show that p∗ can be obtained by a simpler convex optimization problem, than the one in (11). We will also see that this simpler problem is akin to distributed computation of the policy πD . Theorem 2: The age minimization problem (8) is equivalent to the convex optimization problem:   ! X X λ e λe + P Maximize λe0  H λe ≥0 λe + e0 :e∈Ne0λe0 e∈E e0 :e∈Ne0   X  we + λe 1 + log , G(λ), λe e∈E (14)     1 where H (p) = p log p1 + (1 − p) log 1−p is the ∗ entropy function. If λ is the optimal solution to this problem, then the optimal attempt probabilities p∗ are given by λ∗ p∗e = ∗ P e , (15) λe + e0 :e∈Ne0 λ∗e0 for all e ∈ E. (10) e0 ∈Ne fe ≥ 0 for all e ∈ E Now, substituting qe = 1 − pe , the optimization problem (10) reduces to X w Q e Minimize p≥0,q≥0 γe pe e0 ∈Ne qe0 (11) e∈E subject to pe + qe ≤ 1 ∀e ∈ E This is a convex program in standard form, and can be solved using KKT conditions to obtain Theorem 1. The details are given in Appendix B. Preliminary results on age optimization for a ALOHA type network model were presented in [16] for a network in which only one link can be activated at any given time. As a heuristic, it was argued in [16] that the attempt rates should be √ 1/ γe P pe = (12) √ . 0 e0 ∈E 1/ γe Proof: See Appendix C. We first note that the variable λe is a proxy for the weighted age we Ae of link e, and the solution λ∗e corresponds to optimal weighted age we A∗e . This can also be intuited from (15), which is same as (9). The objective function G(λ) in (14) is a concave function; since the problem is convex. Therefore, a simple projected gradient ascent is guaranteed to converge to the optimal λ∗ [21]. The gradient of the function G (λ) is given by     X   we θe λe0 ∂G (λ) = log + log 1+ + log 1 + , ∂λe λe λe 0 θ e0 e :e∈∈Ne0 P 0 for all e ∈ E, where θe = e0 :e∈Ne0 λe . Note that the ∂G(λ) gradient ∂λe depends only on λe and λe0 , for e0 that are ‘extended neighbors’ of e. This space dependence of ∂G(λ) ∂λe on λ makes the projected gradient descent algorithm akin to distributed implementation. We give the projected gradient descent algorithm for distributively computing policy πD in Algorithm 1. In it, we divide time into frames, each frame of F ≥ 1 slots. For simplicity, we assume symmetric interference, i.e., e interferes with e0 if and only if e0 interferes with e which is same as the condition Ne = {e0 ∈ E | e ∈ Ne0 } for all links e. Link e, sets its attempt probability to pe (m), in frame m ≥ 1. The source of link e tracks and updates two variables, namely, λe (m) and θe (m). We use Π to denote the projection on the set [, +∞), for a  > 0. As seen in Steps 5 and 7 in Algorithm 1, variables λe (m) and θe (m) need to be exchanged only between the neighboring links. Algorithm 1 Distributed Computation of Policy πD 1: pe (m): attempt probability of link e, in frame m 2: λe (m), θe (m): dual variables, in frame m 3: Start: Set λe (0) = 1 and θe (0) = |Ne | for all e ∈ E. Set pe (0) = 1/2 and m = 0. 4: for each frame m do 5: Send: θe (m) to all e0 ∈ Ne 6: Compute λe (m + 1): " (   we λe (m + 1) ← Π λe (m) + ηm log λe (m)     )# X θe (m) λe0 (m) + log 1 + + log 1 + λe (m) θe0 (m) 0 e ∈Ne 7: 8: Send: λe (m + 1) to all e0 ∈ Ne Update θe (m + 1): X θe (m + 1) ← λe0 (m + 1) e0 ∈Ne 9: Update pe (m + 1): pe (m + 1) ← 10: 11: λe (m + 1) λe (m + 1) + θe (m + 1) m←m+1 end for IV. C ONCLUSION We considered age minimization in a wireless network, with pairwise interference constraints, time varying channels, and single-hop flows. We considered a simple class of distributed scheduling policies, in which each link attempts transmission with probability pe . We showed an interesting relationship between the optimal attempt probability for a link, and the optimal age of the link and it’s neighboring links. We then showed that the optimal link attempt probabilities can be obtained by solving a convex optimization problem, which can be done distributively using the projected gradient ascent algorithm. R EFERENCES [1] O. K. Sahingoz, “Networking models in flying ad-hoc networks (FANETs): Concepts and challenges,” J. Intell. Robotics Syst., vol. 74, pp. 513–527, Apr. 2014. [2] R. Talak, S. Karaman, and E. Modiano, “Speed limits in autonomous vehicular networks due to communication constraints,” in Proc. CDC, pp. 4998–5003, Dec. 2016. [3] S. Kaul, R. Yates, and M. Gruteser, “Real-time status: How often should one update?,” in Proc. INFOCOM, pp. 2731–2735, Mar. 2012. [4] R. Talak, S. Karaman, and E. Modiano, “Optimizing information freshness in wireless networks under general interference constraints,” in submited to Mobihoc, Jun. 2018. [5] R. Talak, S. Karaman, and E. Modiano, “Minimizing age-of-information in multi-hop wireless networks,” in Proc. Allerton, Oct. 2017. [6] S. Kaul, M. Gruteser, V. Rai, and J. Kenney, “Minimizing age of information in vehicular networks,” in Proc. SECON, pp. 350–358, Jun. 2011. [7] L. Huang and E. Modiano, “Optimizing age-of-information in a multiclass queueing system,” in Proc. ISIT, pp. 1681–1685, Jun. 2015. [8] C. Kam, S. Kompella, and A. Ephremides, “Age of information under random updates,” in Proc. ISIT, pp. 66–70, Jul. 2013. [9] S. K. Kaul, R. D. Yates, and M. Gruteser, “Status updates through queues,” in Proc. CISS, pp. 1–6, Mar. 2012. [10] E. Najm and R. Nasser, “Age of information: The gamma awakening,” in Proc. ISIT, pp. 2574–2578, Jul. 2016. [11] M. Costa, M. Codreanu, and A. Ephremides, “Age of information with packet management,” in Proc. ISIT, pp. 1583–1587, Jun. 2014. [12] Q. He, D. Yuan, and A. Ephremides, “Optimizing freshness of information: On minimum age link scheduling in wireless systems,” in Proc. WiOpt, pp. 1–8, May 2016. [13] I. Kadota, E. Uysal-Biyikoglu, R. Singh, and E. Modiano, “Minimizing the age of information in broadcast wireless networks,” in Proc. Allerton, pp. 844–851, Sep. 2016. [14] Y.-P. Hsu, E. Modiano, and L. Duan, “Age of information: Design and analysis of optimal scheduling algorithms,” in Proc. ISIT, pp. 1–5, Jun. 2017. [15] I. Kadota, A. Sinha, and E. Modiano, “Optimizing age of information in wireless networks with throughput constraints,” in to appear in Proc. INFOCOM, Apr. 2018. [16] S. K. Kaul and R. D. Yates, “Status updates over unreliable multiaccess channels,” ArXiv e-prints, May 2017. [17] A. M. Bedewy, Y. Sun, and N. B. Shroff, “Age-optimal information updates in multihop networks,” in Proc. ISIT, pp. 576–580, Jun. 2017. [18] R. Talak, I. Kadota, S. Karaman, and E. Modiano, “Scheduling policies for age minimization in wireless networks with unknown channel state,” in submitted to ISIT, Jun. 2018. [19] R. Talak, S. Karaman, and E. Modiano, “Optimizing age of information in wireless networks with perfect channel state information,” in to appear in Proc. WiOpt, May 2018. [20] A. Kumar, D. Manjunath, and J. Kuri, Wireless Networking. Morgan Kaufmann, 2008. [21] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge University Press, 2004. [22] R. W. Wolff, Stochastic Modeling and the Theory of Queues. Prentice Hall, 1 ed., 1989. A PPENDIX A. Proof of Lemma 1 Consider a distributed stationary policy with link activation frequencies fe > 0 for each e ∈ E. For a link e, let Te (i) be the ith instance when link e was successfully activated, i.e., the ith instance when Ûe (t) = 1. Let Xe (i) = Te (i) − Te (i−1) to be the ith inter-(successful) activation time for link e. Since all the processes involved, namely Se (t) and Ue (t), are i.i.d. across time h t, Xe (i)i is geometrically distributed with rate equal to P Ûe (t) = 1 = γe fe , i.e., P [Xe (i) = k] = k−1 γe fe (1 − γe fe ) , for all k ∈ {1, 2, . . .}. We now compute the average age Aave e for link e. Note that the age Ae (t) over slots t ∈ {Te (i)+1, . . . Te (i+1)} increases PTe (i+1) from 1 to Xe (i) in steps of 1. Therefore, t=T Ae (t) = e (i)+1 PXe (i) m for all i. Then, using renewal theory [22], we can derive the average age to be PN PXe (i) T 1X ave i=1 m=1 m P Ae (t) = lim , Ae = lim sup m N →∞ T →∞ T t=1 i=1 Xe (i) PN 1 i=1 2 Xe (i) (Xe (i) + 1) = lim , PN N →∞ i=1 Xe (i) 1 E [Xe (i) (Xe (i) + 1)] = a.s.. (16) 2 E [Xe (i)] m=1 1 Computing the moments of Xe (i) we get Aave e = γe fe a.s.. For peak age, note that the ith peak is equal to the ith inter(successful) activation time Xe (i), i.e., Ae (Te (i)) = Xe (i). Therefore, we have Ape = lim sup T →∞ N (t) N 1 X 1 X Ae (Te (i)) = lim Xe (i), N →∞ N N (T ) i=1 i=1 which is equal to E [Xe (1)] = 1 γe fe a.s.. This proves the result. B. Proof of Theorem 1 This follows by first making the the substitution pe = ePe , qe = eQe , and fe = ehe , and then taking log in each of the constraints. This is a standard technique in geometric programming [21]. However, unlike geometric programming, we don’t need to apply log function to the objective as it is already convex, and also separable in variables he . The problem (20) is convex [21], and satisfies slater’s conditions. As a consequence, the duality gap is zero, and the problem (20) is equivalent to its Lagrangian dual problem. Define the Lagrangian function of the optimization problem (20) to be X X we  e−he + νe log ePe + eQe L (h, P, Q, λ, ν) = γe e∈E e∈E X X  + λe he − Pe − Qe0 , (21) e0 ∈Ne e∈E for λ ≥ 0 and ν ≥ 0. The dual problem for (20) is given by Maximize g (λ, ν) , (22) λ≥0,ν≥0 where g (λ, ν) is the dual objective function defines as Consider the Lagrangian dual X X w Q e L(p, q, λ) = + λe (pe + qe − 1) . γe pe e0 ∈Ne qe0 e∈E e∈E (17) The problem (11) satisfies Slater’s conditions, and thus, the KKT conditions are both necessary and sufficient. Setting partial derivatives of L with respect to pe and qe to zero, we obtain X pe λe = we Ae , and qe λe = we0 Ae0 , (18) e0 :e∈Ne0 for all e ∈ E, where Ae = γe pe Q 10 is the age of e ∈Ne qe0 link e. Equations (18) imply that λe cannot be zero. By complementary slackness criteria we must have pe + qe = 1. This, with (18), gives pe = we Ae +P w0 e Ae w 0 A 0 and λe = e e e :e∈N 0 e P we Ae + e0 :e∈Ne0 we0 Ae0 . This proves the result. C. Proof of Theorem 2 The age minimization problem, given in (10), can be written as by substituting qe = 1 − pe : X we Minimize f ≥0,p≥0,q≥0 γe fe e∈E Y (19) subject to fe ≤ p e qe0 ∀ e ∈ E e0 ∈Ne pe + qe ≤ 1 ∀ e ∈ E Now, substituting Pe = log pe , Qe = log qe , and he = log fe , the problem reduces to X we Minimize exp {−he } h,P,Q γe e∈E X (20) subject to he − Pe − Qe0 ≤ 0 ∀ e ∈ E g (λ, ν) =Minimize L (h, P, Q, λ, ν) . h,P,Q We will now show that the the optimization problem in Theorem 2 is in fact the dual problem (22). First note that the Lagrangian function L (h, P, Q, λ, ν) is strictly convex in h, P, and Q [21]. Thus, first order conditions ∇h,P,Q L = 0 yield the optimal h, P, and Q. Setting these partial derivatives to 0, we get X νe eQe we −he νe ePe , λe0 = Pe , and λe = e , λe = Pe Q Q e e e +e e +e γe e0 :e∈Ne0 (24) for all e ∈ E. Adding and dividing the first two equations in (24) also yields ! X λe νe = λ e + λe0 , and Pe − Qe = log P , 0 e0 :e∈Ne0 λe e0 :e∈Ne0 (25) respectively, for all e. Substituting (24) and (25) in L, in (21), we recover g(λ, µ) = G(λ), the objective function in (14), and therefore, the dual problem (22) is same as the optimization problem in Theorem 2. This proves the first part. We now show that if λ∗ is the solution to this problem, then the optimal attempt probability is given by (15). Let f ∗ , p∗ , q∗ be the solution to (19), h∗ , P∗ , Q∗ be the solution to (20), and λ∗ be the solution to the problem in Theorem 2. Note link e ∈ E, we must have fe∗ = Q that,∗ for each ∗ ∗ pe e0 ∈Ne qe and pe + qe∗ = 1; as otherwise the objective function can be reduced by increasing fe∗ and/or p∗e . Since ∗ ∗ ∗ ∗ p∗e = ePe and qe∗ = eQe , we have ePe + eQe = 1. Substituting this in (24), and using (25), we obtain λ∗e ∗ p∗e = ePe = e0 ∈Ne log (exp {Pe } + exp {Qe }) ≤ 0 ∀ e ∈ E (23) which proves the result. λ∗e + P e0 :e∈Ne0 λ∗e0 , (26)
7cs.IT
Pedestrian-Robot Interaction Experiments in an Exit Corridor arXiv:1802.05730v1 [cs.RO] 15 Feb 2018 Zhuo Chen, Chao Jiang and Yi Guo Abstract— The study of human-robot interaction (HRI) has received increasing research attention for robot navigation in pedestrian crowds. In this paper, we present empirical study of pedestrian-robot interaction in an uni-directional exit corridor. We deploy a mobile robot moving in a direction perpendicular to that of the pedestrian flow, and install a pedestrian motion tracking system to record the collective motion. We analyze both individual and collective motion of pedestrians, and measure the effect of the robot motion on the overall pedestrian flow. The experimental results show the effect of passive HRI, where the pedestrians’ overall speed is slowed down in the presence of the robot, and the faster the robot moves, the lower the average pedestrian velocity becomes. Experiment results show qualitative consistency of the collective HRI effect with simulation results that was previously reported. The study can be used to guide future design of robot-assisted pedestrian evacuation algorithms. I. I NTRODUCTION With the rapid advances in the development of autonomous mobile robot technologies, the applications of service and socially assistive robots have been woven into people’s daily life. As robots are performing tasks where human beings are involved, the problem of human-robot interaction (HRI) arises and has received considerable attention during the past decade. Understanding the effect of HRI on human’s behavior, especially in human and robot collective motion, is of great significance for robot control or decision-making. In one of the recent works, HRI is studied and considered for human-aware robot navigation, where traditional motion planning approach is amended to respect the effect of HRI on human behavior in the presence of mobile robot [1]. In addition to considering human being as moving obstacles, criteria such as human comfort [2, 3], natural motion [4, 5] and socially-adaptive motion [6, 7] are taken in to account for robot motion planning. In the studies of robot-assisted guidance where multiple robots work collaboratively to escort a group of people, HRI is commonly modeled as repulsive or attractive force that is embedded in the social force model which governs human motion dynamics [8]. The robot performs either as a leader who directs a group of people towards the destination, or as a shepherd who regroups people escaping from the group formation. Thus, human’s motion is controlled through the effect of attractive and repulsive force from the leader and shepherd robot, respectively. In [9], the parameters of the social force based HRI model were found by analyzing the This work was partially supported by the US National Science Foundation under Grant CMMI-1527016. The authors are with the Department of Electrical and Computer Engineering, Stevens Institute of Technology, Hoboken, NJ 07030, USA {zchen39,cjiang6,yi.guo}@stevens.edu data obtained from real-world experiment using an interactive learning approach. HRI is also studied for robot motion planning in largescale human crowds. It has been found interesting how implicit interaction between humans and mobile robots affects human collective motion, so that desired human crowd behaviors can be achieved by adjusting the motion of robot in human crowd. Specially, inspired by self-organized phenomena in human collective motion, attempts have been made to improve human flow efficiency by introducing mobile robots in human crowds. The large-scale dynamics of human crowds can be modified as human crowds implicitly interact with the robot [10, 11]. Previous study [12] has found that placing a mobile robot in crossing human flows can help to create diagonal strip pattern in human flow as the human agents try to avoid the collision with the robot. The strip pattern is a desirable phenomenon for preventing congestion in crossing crowds. By adjusting their motion, the interacting robots can improve human flow efficiency under different flow densities. In our early work [13], simulations based on social force models were carried out to characterize HRI in an unidirectional exit corridor. An interacting robot was placed and programmed to move in a direction that is perpendicular to that of the flow direction to regulate the flow velocity in an evacuation situation in a uni-directional corridor. The focus of this paper is to empirically study passive HRI in an exit corridor for the purpose of robot-assisted pedestrian flow regulation. We conduct real robot experiments with a group of pedestrians walking towards an exit door, and measure the effect of robot motion on the overall pedestrian flow. Our experimental results show that in an exit corridor environment, a robot moving in a direction perpendicular to that of the uni-directional pedestrian flow can slow down the uni-directional flow, and the faster the robot moves, the lower the average pedestrian velocity becomes. Furthermore, the effect of the robot on the pedestrian velocity is more significant when people walk at a faster speed. This empirical evidence is qualitatively consistent with simulation results reported in our early paper [13], and can be used for future development on robot-assisted pedestrian flow regulation. The rest of the paper is organized as follows: Section II introduces the the passive pedestrian-robot interaction studied in the paper, and present the experimental setup and procedure. Section III presents the experimental results, and discuss comparisons with simulation results reported before. The conclusion and future work are presented in Section IV. Kinect sensors Pedestrian flow direction 4m Robot 𝒚 𝒙 𝑶 10m Fig. 1: The schematic diagram of pedestrian flow in an indoor corridor with robot-assisted regulation Fig. 2: The customized Adept Pioneer P3-DX mobile robot. II. PASSIVE P EDESTRIAN -ROBOT I NTERACTION AND E XPERIMENTAL S ETUP A. Passive Pedestrian-Robot Interaction We empirically study the regulation of human flow velocity in an exit corridor environment using an interacting robot. As shown in Fig. 1, a single interacting robot is added to the pedestrian flow, and moves in a direction perpendicular to that of the pedestrian flow with a predesignated speed. Since the robot’s movement is in the way of the pedestrians towards the exit, the pedestrians see the robot and avoid potential collisions by either changing the speed or alter the trajectory of their own. The pedestrian flow is regulated through the effect of passive HRI. That is, the robot moves in a predesignated trajectory with a predesignated speed, and the pedestrians avoid potential collisions when passing through the robot thus passively interact with the robot. Note that we assume normal situations that the pedestrians can clearly see the robot and their movement behaviors are rational. We do not consider panic situations or nonrational behaviors. Our hypothesis is that the speed of the robot moving in a direction perpendicular to that of a uni-directional pedestrian flow will affect the average speed of the pedestrians going through the corridor. The goal of the study is to test this hypothesis, measure the effect of the passive HRI by adjusting the robot’s speed on the pre-designated trajectory, and compare the effect with the case without the robot. B. Experimental Setup 1) The Environment: The experiment was conducted in the Griffith Building of Stevens Institute of Technology on June 22, 2016. A pedestrian tracking system deployed in the building covers a 10 meter by 4 meter tracking area as shown in Fig. 1 with an exit door at the end of the area. The boundaries of the tracking area are marked with red duct tapes. The tracking system consists of 5 Microsoft Kinect sensors and 6 computers connected to a local area network. A pedestrian detection and tracking software OpenPTrack [14] is used. OpenPTrack is a real-time distributed people detection and tracking software capable of utilizing RGB-D images from the Kinect network. OpenPTrack runs on Robot Operating System (ROS) in Ubuntu 14.04. During the experiment, each of the 5 Kinect sensors is connected to a computer and the image stream obtained by the Kinect sensor is fed into a OpenPTrack detection program running on the computer. The OpenPTrack detection program on each computer processes the images and transmits the detection results to a central computer over the local area network. The central computer fuses the received data and records the tracking results. 2) The Mobile Robot: We used a customized Adept Pioneer P3-DX mobile robot, as shown in Fig. 2. The robot motion dynamics is described by a single integrator model, that is ẋr = ur (1) where xr = [xxr , xyr ]T ⊆ R2 denotes the robot position and ur = [uxr , uyr ]T denotes robot velocity control. The robot motion is controlled to follow a pre-designed trajectory that is perpendicular to the pedestrian flow direction. The robot velocity in the y direction is controlled to track a sinusoidal signal, and the velocity control in the x direction remains 0. That is, uxr (t) = 0 (2a) uyr (t) = Aω sin (ωt) (2b) where A is the amplitude of the simple harmonic motion, which is set to 2m (half the corridor width); ω is the robot motion frequency. This control law makes sure that the robot moves within the boundary of the area, and the upper limit of the controlled speed is Aω. 3) Tracking System Calibration: After the sensors are mounted in place, both intrinsic and extrinsic parameters of the tracking system need to be determined. Default intrinsic parameters for the Kinect sensors were used without performing any intrinsic calibration. To calibrate the extrinsic parameters of the tracking system, we printed a 6-by-7 checkerboard with the cell width and height both being 75mm. The networking capabilities of ROS enable the Kinect sensors’ poses to be estimated by: Step (1) letting a pair of sensors both see the checkerboard to calibrate their relative pose; Step (2) finding one calibrated sensor and one uncalibrated sensor, and doing Step (1) with this pair of sensors; Step (3) repeating Step (2) until all sensors are calibrated; Step (4) placing the checkerboard on the ground where it can be seen by at least 1 sensor to specify the checkerboard reference frame; and Step (5) performing calibration refinement with people detections [14]. By performing the 5 steps above, sensor poses are estimated with respect to the checkerboard reference frame 5 Low-velocity position centroid Grid vertex ground truth position 3 4 y position (m) y position (m) 2 1 0 3 2 1 -1 0 -2 -1 -8 -6 -4 -2 0 0 x position (m) 2 4 6 8 10 x position (m) (a) (b) (c) Fig. 3: Tracking system calibration: estimation of the coordinate transformation from checkerboard frame to ground frame. (a) Walking Pattern in checkerboard reference frame; (b) Comparison between measurement and ground truth; (c) Measurement error magnitude histogram. (a) t=4.0s (b) t=6.0s (c) t=9.0s (d) t=24.0s Fig. 4: Experimental procedure. (a) People start to walk in the bounded area; (b) People walk toward the robot; (c) People interact with the moving robot; (d) People finish one round and walk back to the starting line. defined by the pose of the checkerboard in Step (4), which does not necessarily coincide with the ground reference frame as shown in Fig. 1. Here we define the transformation T : P2 (R) → P2 (R) that maps the homogeneous coordinates of points in checkerboard reference frame to those in ground reference frame as   cos θ 0 ∆x sin θ ∆y  (3) T= 0 0 0 1 where (∆x, ∆y) represents translation while θ represents rotation. To determine the transformation T, the vertices of a unitdistance square grid graph are marked on the tracking area ground. In Fig. 3b, ground truth positions of the 55 vertices marked with circles in Fig. 3b are expressed in checkerboard reference frame as (xgt,k , ygt,k ), k = 1, 2, ..., 55. A person is asked to walk through every marked vertex of the grid, stop at each mark and remain still for a second or two before proceeding to the next one. Fig. 3a shows an example pattern of trajectory recorded by the tracking system, starting from (4, 0) and ending at (10, 0) in ground frame coordinates. Once the trajectory is recorded, the measured positions where the subject stops, or low-velocity points, are obtained by filtering out those points in the trajectory whose velocity is greater than 0.2m/s. These low-velocity positions are clustered and the centroid of each cluster is marked with a “×” in Fig. 3b. The low-velocity position centroid expressed in checkerboard reference frame is denoted by (xct,k , yct,k ), k = 1, 2, ..., 55. We solve for the transformation T by minimizing the sum of squared errors between lowvelocity position centroids and their corresponding ground truth positions, that is,    2 55 xct,k xgt,k X (4) T ·  yct,k  −  ygt,k  e (T) = 0 0 k=1 C. Experiment Procedure After the tracking system was set up and calibrated, we conducted experiments with 6 cases as listed in Table I. We compare HRI in two testing scenarios with people walking at a normal speed (Cases #1, #2, and #3) and a faster speed (Cases #4, #5, and #6). In each of the two scenarios, we compare pedestrian motions with: 1) no robot, 2) a slow-moving robot, and 3) a fast-moving robot. The mobile robot, whose motion is subject to (1), has a pre-set angular frequency ω = 0.1rad/s for the slow-moving cases (Cases #2 and #5), and ω = 0.4rad/s in the fast-moving cases (Cases #3 and #6). In each case, there are 11 participants who have no knowledge of the aim or nature of this experiment. As shown in Table I, in Cases #1 and #4, pedestrians walk without robot intervention, while in the rest of the cases, a mobile robot whose motion is subject to (1) is introduced in the environment. The participants are instructed to walk within the boundaries of the tracking area at two different walking speed, i.e., normal or faster. As shown in Fig. 4, the participants waiting on the left side of the tracking area receives an instruction to walk, and they enter the tracking area. Once they exit the tracking area from the right side of the corridor, they walk back through another pathway next to the tracking area and get ready for the next run. Each case consists of 3 repeated runs. Fig. 4 shows the snapshots of a complete run of Case #3. TABLE I: Experimental scenarios and parameters Case # 1 2 3 4 5 6 Human Instructed # of Walking People Speed 11 Normal 11 Normal 11 Normal 11 Faster 11 Faster 11 Faster Robot Angular Start Freq. Position ω(rad/s) N/A N/A 0.1 (6.6, 0) 0.4 (6.6, 0) N/A N/A 0.1 (6.6, 0) 0.4 (6.6, 0) We present the results from collected data in the next section. III. E XPERIMENTAL R ESULTS In this section, we present the observed HRI behaviors, summary statistics for collected HRI, and compare with numerical simulation results reported in our previous work [13]. A. Individual HRI Behaviors We have recorded pedestrian trajectories using the OpenPTrack software and a video recording system. We observe the HRI behaviors when people get close to the robot. It appears that the pedestrian motion behavior changes according to their anticipation of potential collision with the robot, and the density of the area and whether there’s room to move around. We observe that the speed change of the robot affects humans’ motion. We first describe individual HRI behaviors in this subsection, and the HRI effect on collective motion and the average flow velocity is presented in the next subsection. Fig. 5 shows the temporal sequence of experiment snapshots in Case #2, where the pedestrians walk at normal speed. It can be seen that the pedestrians approach the interacting robot at t = 46s and start to avoid the robot at t = 47s. At t = 48s and t = 49s, some pedestrians adjust their walking directions to avoid collision with the robot. Fig. 6 shows the temporal sequence of experiment snapshots in Case #5, where the pedestrians walk at faster speed. To understand the motion behavior of pedestrians while interacting with the robot, we further investigate the change of trajectory and velocity of individual pedestrians. Fig. 7a and Fig. 7b show the trajectories of the pedestrians and the interacting robot in Case #2 and Case #3, respectively. The circles and stars represent the position of the pedestrian and the robot at every 1 second. The arrow represents the velocity with the length proportional to the velocity magnitude. From Fig. 7a, one can see that the pedestrian adjusts his/her walking direction at around x = 4.5m to avoid the robot as he/she foresees potential collision with the robot. Meanwhile, the velocity of the pedestrian changes slightly. One can see from Fig. 7b that the pedestrian adjusts his/her walking direction at around x = 4.6m and x = 5.8m respectively, and meanwhile slows down to avoid collision with the robot. Fig. 7c shows the trajectories of the pedestrian and the interacting robot in Case #6, from which one can see the pedestrian adjusts his/her walking direction at around x = 4.8m. The results demonstrate that both the trajectory and velocity of the pedestrians can be affected by HRI. B. Summary Statistics for Collective HRI We have collected pedestrian trajectory data for all 6 experimental cases listed in Table I. One set of such trajectories is plotted in Fig. 8a for 3 runs of Case #2. Each data point on the trajectory has a timestamp. The velocity of each pedestrian is calculated by performing a backward difference on the position signal and then applying a moving average filter to the resulting velocity signal. To understand the effect of HRI on the collective motion of pedestrians, we plot the average pedestrian velocity profile, which is obtained by averaging all individual pedestrians’ velocities along the x axis for each case. Fig. 8b shows the testing scenario of normal walking speed of pedestrians (i.e., Cases #1, #2 and #3), and Fig. 8c shows the case of the fast walking speed (i.e., Cases #4, #5 and #6). We can see that the average pedestrian velocities are lowered with the presence of robot; and the faster the robot moves, the lower the average pedestrian velocity becomes. This phenomenon is more visible around the robot area (i.e., the vertical dashed line of robot positions shown in the figure) than other areas (e.g., the beginning and the end of the pedestrian trajectories), which indicates an HRI region exists around the robot positions. To further understand the collective pedestrian motion, we plot the velocity distribution of pedestrians in each case in the box plot of Fig. 9, where the central rectangle spans the first quartile to the third quartile, the segment inside the rectangle shows the median, and “whiskers” above and below the box show the locations of the minimum and maximum. We can clearly see the trends of HRI, that is, the first quartile, the median, and the third quartile consistently show that: 1) pedestrian velocities are lowered with the presence of robot, and 2) the faster the robot moves, the lower the average pedestrian velocity becomes. C. Comparison with Simulations and Discussions To compare the experimental results with the numerical simulation results presented in our previous work [13] (Figures 4 and 5 therein), we calculate the pedestrian flow velocity by averaging the velocities over all pedestrians in each case in an HRI region, which is defined the same as in the simulations (i.e., the rectangular regions within 2 meters sideways from the robot path). Fig. 9c shows the average (a) t=46.0s (b) t=47.0s (c) t=48.0s (d) t=49.0s Fig. 5: HRI behavior with normal walking speed of pedestrians (Case #2). (a) t=39.0s (b) t=39.6s (c) t=40.2s (d) t=40.8s Fig. 6: HRI behavior with fast walking speed of pedestrians (Case #5). 3 0 0 1 2 3 4 5 2 Pedestrian trajectory Pedestrian position at every 1 second Pedestrian velocity vector Robot trajectory Robot position at every 1 second Robot velocity vector 1 0 6 7 8 y position (m) y position (m) y position (m) Pedestrian trajectory Pedestrian position at every 1 second Pedestrian velocity vector Robot trajectory Robot position at every 1 second Robot velocity vector 1 Pedestrian trajectory Pedestrian position at every 1 second Pedestrian velocity vector Robot trajectory Robot position at every 1 second Robot velocity vector 4 3 2 9 0 1 2 x position (m) 3 4 3 2 1 5 6 7 8 9 0 1 2 3 x position (m) (a) 4 5 6 7 8 9 x position (m) (b) (c) Fig. 7: Single pedestrian and robot interacting trajectories. (a) Case #2, run #2, pedestrian #10, t is from 47.1s to 51.1s; (b) Case #3, run #2, pedestrian #1, t is from 40.0s to 44.0s; (c) Case #6, run #2, pedestrian #7, t is from 36.7s to 39.7s. y position (m) 4 3 2 Case #1: No robot Case #2: Slow-moving robot Case #3: Fast-moving robot 2.5 5 velocity (m/s) velocity (m/s) 3 2 1.5 Robot x position→ 1 1 0 0 1 2 3 4 5 6 x position (m) 7 8 9 10 0 2 4 6 8 x position (m) 10 Case #4: No robot Case #5: Slow-moving robot Case #6: Fast-moving robot 4 3 Robot x position→ 2 0 2 4 6 8 10 x position (m) (a) (b) (c) Fig. 8: (a)Trajectories recorded from all 3 runs of Case #2. The trajectory followed by each pedestrian is represented by a solid curve. The vertical dotted line denotes the robot trajectory; Average pedestrian velocities vs. x position for (a) normal walking speed of pedestrians, and (b) faster walking speed of pedestrians. pedestrian speed with no-robot and in the presence of a slow- and fast- moving robot in the two cases of normal pedestrian speed and faster pedestrian speed. We can see that the slow-down effect of the pedestrian-robot interaction is more significant for the group of faster-moving pedestrians, comparing with slower-moving pedestrians. In comparison with simulations reported in our previous work [13], we can clearly see that the trends of HRI match. Specifically, the following claims are supported by both simulations and our HRI experiments: • • • The pedestrian speeds are affected by the presence of a moving robot; A moving robot slows down a uni-directional flow. The faster the robot moves, the lower the average pedestrian velocity becomes; The effect of the robot on the pedestrian velocity is 2 1.8 1.6 1.4 1.2 3.5 3 2.5 No Robot Slow-moving Fast-moving robot robot No Robot Slow-moving Fast-moving robot robot (a) (b) Average pedestrian velocity (m/s) Pedestrian velocity (m/s) Pedestrian velocities (m/s) 2.2 4 3.5 Normal walking speed Faster walking speed 3 2.5 2 1.5 1 No Robot Slow-moving Fast-moving robot robot (c) Fig. 9: Box plot of pedestrian velocities for each case. (a) Normal walking speed; (b) Faster walking speed; (c) Average pedestrian velocity comparison with and without the presence of a moving robot. more significant when people walk at a faster speed. For the tested scenarios, it clearly shows qualitative agreement of HRI in an exit corridor in comparison with numerical simulations based on social force models. The results indicate that it is promising to use a moving robot to regulate pedestrian flows, specifically, slowing down the traffic to a desired average speed. Note that in evacuation scenarios, being able to slow down the traffic and avoid the faster-is-slower effect is often desirable. With more time and resources, we would have collected more experimental data. For example, we may vary the pedestrian density of the area, and compare the HRI effect with different density setups. Nevertheless, the obtained data can be used to tune simulation models for a better match with real world situations, which will be in the scope of our future research. Also, we plan to conduct future HRI experiments to validate learning-based robot-assisted pedestrian regulation schemes that was presented in our early work [13]. IV. C ONCLUSION AND F UTURE W ORK In this paper, we presented a human-robot interaction experiment in an exit corridor. We investigated the pedestrian behavior when they interact with a robot moving in a direction perpendicular to that of the uni-directional pedestrian flow. Using the experimental data, we not only studied the individual HRI behavior, but also analyzed collective HRI and the effect of robot on the average pedestrian flow. We compared the HRI effect on the pedestrian flow with that obtained from numerical simulations based on the social force models that were reported in our early work [13]. We found that the experimental HRI effect on the collective pedestrian flow is qualitatively consistent with numerical simulations. Future work includes calibrating simulation models using experimentally obtained data, and developing learning-based robot motion planner to regulate the collective speed of the pedestrians to a desired level. ACKNOWLEDGMENT The authors would like to thank the undergraduate students, Peter Smith and Randall Devitt, and the graduate student, Muhammad Fahad, for their assistance in collecting data during the human robot experiments. R EFERENCES [1] T. Kruse, A. K. Pandey, R. Alami, and A. Kirsch, “Human-aware robot navigation: A survey,” Robotics and Autonomous Systems, vol. 61, no. 12, pp. 1726–1743, 2013. [2] M. Luber, L. Spinello, J. Silva, and K. O. Arras, “Socially-aware robot navigation: A learning approach,” in IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 902–907, 2012. [3] D. G. Macharet and D. A. Florencio, “Learning how to increase the chance of human-robot engagement,” in IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 2173–2179, 2013. [4] M. Bennewitz, W. Burgard, G. Cielniak, and S. Thrun, “Learning motion patterns of people for compliant robot motion,” The International Journal of Robotics Research, vol. 24, no. 1, pp. 31–48, 2005. [5] P. Henry, C. Vollmer, B. Ferris, and D. Fox, “Learning to navigate through crowded environments,” in IEEE International Conference on Robotics and Automation, pp. 981–986, 2010. [6] A. K. Pandey and R. Alami, “A framework for adapting social conventions in a mobile robot motion in human-centered environment,” in International Conference on Advanced Robotics, pp. 1–8, 2009. [7] B. Kim and J. Pineau, “Socially adaptive path planning in human environments using inverse reinforcement learning,” International Journal of Social Robotics, vol. 8, no. 1, pp. 51–66, 2016. [8] A. Garrell and A. Sanfeliu, “Local optimization of cooperative robot movements for guiding and regrouping people in a guiding mission,” in IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 3294–3299, 2010. [9] G. Ferrer, A. Garrell, and A. Sanfeliu, “Robot companion: A socialforce based approach with human awareness-navigation in crowded environments,” in IEEE/RSJ International Conference on Intelligent robots and systems, pp. 1688–1694, 2013. [10] J. A. Kirkland and A. A. Maciejewski, “A simulation of attempts to influence crowd dynamics,” in IEEE International Conference on Systems, Man and Cybernetics, vol. 5, pp. 4328–4333, 2003. [11] B. D. Eldridge and A. A. Maciejewski, “Using genetic algorithms to optimize social robot behavior for improved pedestrian flow,” in IEEE International Conference on Systems, Man and Cybernetics, vol. 1, pp. 524–529, 2005. [12] K. Yamamoto and M. Okada, “Control of swarm behavior in crossing pedestrians based on temporal/spatial frequencies,” Robotics and Autonomous Systems, vol. 61, no. 9, pp. 1036–1048, 2013. [13] C. Jiang, Z. Ni, Y. Guo, and H. He, “Robot-assisted pedestrian regulation in an exit corridor,” in IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 815–822, 2016. [14] M. Munaro, F. Basso, and E. Menegatti, “Openptrack: Open source multi-camera calibration and people tracking for RGB-D camera networks,” Robotics and Autonomous Systems, vol. 75, pp. 525–538, 2016.
3cs.SY
1 Efficient Systematic Encoding of Non-binary VT Codes arXiv:1708.04071v2 [cs.IT] 30 Aug 2017 Mahed Abroshan, Ramji Venkataramanan and Albert Guillén i Fàbregas Abstract Varshamov-Tenengolts (VT) codes are a class of codes which can correct a single deletion or insertion with a linear-time decoder. This paper addresses the problem of efficient encoding of nonbinary VT codes, defined over an alphabet of size q > 2. We propose a simple linear-time encoding method to systematically map binary message sequences onto VT codewords. The method provides a new lower bound on the size of q-ary VT codes of length n. I. I NTRODUCTION Designing codes for correcting deletions or insertions is well known to be a challenging problem; see, e.g., [1]–[8]. For the special case of correcting one insertion or deletion, there exists an elegant class of codes called Varshamov-Tenengolts (VT) codes. Binary VT codes were first introduced by Varshamov and Tenengolts in [9] for channels with asymmetric errors. Later, Levenshtein [10] showed that they can be used for correcting a single deletion or insertion with a simple decoding algorithm whose complexity is linear in the code length [1]. Tenengolts subsequently introduced a non-binary version of VT codes, defined over a q-ary alphabet for any q > 2 [11]. The q-ary VT codes retain many of the attractive properties of the binary codes. In particular, they can correct deletion or insertion of a single symbol from a q-ary VT codeword with a linear-time decoder. M. Abroshan and R. Venkataramanan are with the Department of Engineering, University of Cambridge, UK, ([email protected], [email protected]). A. Guillén i Fàbregas is with the Department of Information and Communication Technologies, Universitat Pompeu Fabra, Barcelona 08018, Spain, also with the Institució Catalana de Recerca i Estudis Avançats (ICREA), Barcelona 08010, Spain, and also with the Department of Engineering, University of Cambridge, Cambridge CB2 1PZ, U.K. (e-mail: [email protected]). This work was supported in part by the European Research Council under Grants 259663 and 725411, in part by the Spanish Ministry of Economy and Competitiveness under Grant Grant TEC2016-78434-C3-1-R. 2 Given the simplicity of VT decoding, a natural question is: can one construct a linear-time encoder to efficiently map binary message sequences onto VT codewords? For binary VT codes, such an encoder was proposed by Abdel-Ghaffar and Ferriera [12]. (A similar encoder was also described in [13].) However, the issue of efficient encoding for non-binary VT codes has not been addressed previously, to the best of our knowledge. In this paper, we propose an efficient systematic encoder for non-binary VT codes. The encoder has complexity that is linear in the code length, and is systematic in the sense that the message bits are assigned to pre-specified positions in the codeword. The encoder also yields a new lower bound on the size of q-ary VT codes, for q > 2. VT codes are a key ingredient of recent code constructions for channels with segmented deletions and insertions [14], [15], and the proposed VT encoder can be applied to these constructions. VT codes have also recently been used in algorithms for synchronization from deletions and insertions, e.g., [16]–[19]. In [11, Sec. 5], Tenengolts introduced a systematic non-binary code that can correct a single deletion or insertion. However, this code is not strictly a VT code as its codewords do not necessarily share the same VT parameters. (Formal definitions of VT codes and their parameters are given in the next two sections.) In this paper, we propose an encoder for VT codes defined in the standard way, noting that using standard VT codes is a key requirement in some of the code constructions mentioned above. Notation: Sequences are denoted by capital letters, and scalars by lower-case letters. Throughout, we use n for the code length and k for the number of message bits mapped to the codeword. The set Zq = {0, 1, · · · , q − 1} is the finite integer ring of size q. We consider the natural order for the elements of Zq , i.e., 0 < 1 . . . < (q − 1). The term dyadic index will be used to refer to an index that is a power of 2. The rest of the paper is organized as follows. In the next section, we formally define binary VT codes and briefly review the systematic encoder from [12]. In Section III, we define the q-ary VT codes, and describe the systematic encoding method and the resulting lower bound on the size of the codes. 3 II. B INARY VT CODES The VT syndrome of a binary sequence S = s1 s2 · · · sn ∈ Zn2 is defined as syn(S) , n X i si mod (n + 1). (1) i=1 For positive integers n and 0 ≤ a ≤ n, the VT code of length n and syndrome a, is defined as  VTa (n) = S ∈ Zn2 : syn(S) = a , (2) i.e., the set of binary sequences S of length n that satisfy syn(S) = a. For example, the VT code of length 3 and syndrome 2 is 3 n o X 3 VT2 (3) = s1 s2 s3 ∈ Z2 : j sj = 2 mod 4 j=1 (3) = {010, 111}. Each of the sets VTa (n), 0 ≤ a ≤ n, is a code that can correct a single deletion or insertion with a decoder whose complexity is linear in n. The details of the decoding algorithm can be found in [1]. The (n + 1) sets VTa (n), 0 ≤ a ≤ n, partition the set of all binary sequences of length n, i.e., each sequence S ∈ Zn2 belongs to exactly one of the sets. Therefore, the smallest of the codes VTa (n) will have at most 2n n+1 min sequences. Hence 0≤a≤n 1 1 log2 |VTa (n)| ≤ 1 − log2 (n + 1). n n (4) An exact formula for the size |VTa (n)| was given by Ginzburg [20]. The formula [1, Theorem 2.2] does not give an analytical expression for general n, but it shows that if (n + 1) is a power of 2, then |VTa (n)| = 2n /(n + 1), for 0 ≤ a ≤ n. Moreover, for general n, the formula can be used to deduce that the sizes of the codes VTa (n) are all approximately 2n /(n + 1). In particular, 2n 2n − 2(n+1)/3 ≤ |VTa (n)| ≤ + 2(n+1)/3 , (n + 1) (n + 1) for a ∈ {0, . . . , n}. (5) Abdel-Ghaffar and Ferriera [12] proposed a systematic encoder to map k-bit message sequences onto codewords in |VTa (n)|, where k = n − ⌈log2 (n + 1)⌉. We briefly review the encoding procedure as it is an ingredient of our systematic q-ary VT encoder. Consider a k-bit message M = m1 · · · mk to be encoded into a codeword C = c1 · · · cn ∈ VTa (n), for some a ∈ {0, 1, · · · , n}. The number of “parity” bits is denoted by t = n − k = ⌈log2 (n + 1)⌉. The 4 idea is to use the code bits in dyadic positions, i.e., c2i , for 0 ≤ i ≤ (t − 1), to ensure that syn(C) = a. The encoding steps are: 1) Denote the first k non-dyadic indices by {j1 , · · · , jk }, where the indices are in ascending order, i.e., j1 = 3, j2 = 5, . . . We set cji equal to the message bit mi , for 1 ≤ i ≤ k. 2) First set the bits in all the dyadic positions to be zero and denote the resulting sequence by C ′ = c′1 · · · c′n (so that we have c′2i = 0 for 0 ≤ i ≤ t − 1 and c′jl = ml for 1 ≤ l ≤ k = (n − t)). Define the deficiency d as the difference between the desired syndrome a and the syndrome of C ′ . That is, d = a − syn(C ′ ) mod (n + 1). 3) Let the binary representation of d be dt−1 . . . d1 d0 , i.e., d = 0 ≤ i ≤ (t − 1), to obtain C. (6) Pt−1 i=0 2i di . Set c2i = di , for The rate of this systematic encoder is R = 1 − n1 ⌈log2 (n + 1)⌉, regardless of the syndrome a ∈ {0, . . . , n}. Comparing with (4), we observe that the rate loss for the smallest VT code of length n is less than 1 . n On the other hand, if (n + 1) is not a power of two, the rate loss for the larger VT codes may be higher due to codewords that are unused by the encoder. However this rate loss is unavoidable with any systematic encoder [12]. We remark that the dyadic positions are not the only set of positions that can be used for syndrome bits. For instance, the following set of indices also produce all syndromes: {ci0 , · · · , cit−1 } where ij = −2j (mod n + 1) for 0 ≤ j ≤ t − 1. This can be helpful in some applications (see e.g. [15]) where some code bits are already reserved for prefixes or suffixes, and thus cannot be used as syndrome bits. In general, a set of positions {p1 , p2 , · · · , pr } can be used for syndrome bits if for each syndrome a ∈ {0, · · · , n}, there exists a subset P ⊆ {p1 , p2 , · · · , pr } such that X pj = a (mod n + 1). (7) j∈P In other words, for each a ∈ {0, · · · , n}, there should exist binary coefficients b1 , · · · , br such that r X j=1 bj pj = a (mod n + 1). (8) 5 III. E FFICIENT E NCODING FOR N ON - BINARY VT CODES For any code length n, the VT codes over Zq , for q > 2 are defined as follows [11]. For each q-ary sequence S = s0 s1 · · · sn−1 ∈ Znq , define a corresponding length (n − 1) auxiliary binary sequence AS = α1 α2 . . . αn−1 as follows1. For 1 ≤ i ≤ n − 1,   1 if si ≥ si−1 αi =  0 if si < si−1 . (9) We also define the modular sum of S as sum(S) = n−1 X si (mod q). (10) i=0 For 0 ≤ a ≤ n − 1 and b ∈ Zq , the q-ary VT code with length n and parameters (a, b) is defined as  VTa,b (n) = S ∈ Znq : syn(AS ) = a, sum(S) = b . (11) Each of the sets VTa,b (n) is a code that can correct deletion or insertion of a single symbol with a decoder whose complexity is linear in the code length n. The details of the decoding algorithm can be found in [11, Sec. II]. Similarly to the binary case, the codes VTa,b (n), for 0 ≤ a ≤ n − 1 and b ∈ Zq , partition the space Znq of all q-ary sequences of length n. For a given n, there are nq of these codes, and hence the smallest of them will have no more than qn nq sequences. Let Rmin be the rate of the smallest of these codes, i.e., Rmin , min a,b log2 |VTa,b (n)| , n (12) where the minimum is over 0 ≤ a ≤ n − 1 and b ∈ Zq . We then have the bound Rmin ≤ log2 q − 1 1 log2 n − log2 q bits/symbol. n n (13) The encoding procedure described below yields a lower bound on the size of |VTa,b (n)| (see Proposition 1), which shows that for q ≥ 4, 1 1 Rmin ≥ log2 q− ⌈log2 n⌉(3 log2 q−2 log2 (q−1))− (5 log2 (q−1)−3 log 2 q) bits/symbol. (14) n n 1 For non-binary sequences, we start the indexing from 0 as this makes it convenient to describe the encoding procedure in Section III. 6 Kulkarni and Kiyavash [21] have shown that the size of any single deletion correcting q-ary code of length n is bounded by q n −q . (q−1)(n−1) This yields a rate upper bound Rmax for any single deletion correcting code, where Rmax ≤ log2 q − log2 (n − 1) log2 (q − 1) − . n n (15) We now describe the encoder to map a sequence of message bits to a codeword of the q-ary VT code VTa,b (n). For simplicity, we first assume that q is a power of two, and address the case of general q at the end of this section. We will map a k-bit message M = m1 m2 · · · mk to a codeword in VTa,b (n), where k = (n − 3t + 3) log2 q + (t − 3)(2 log2 q − 1) + (log2 q − 1) = n log2 q − t(log2 q + 1) − 2(log2 q − 1), (16) (17) with t = ⌈log2 n⌉. Therefore, the rate of our encoding scheme is R = log2 q − ⌈log2 n⌉(log2 q + 1) 2 log2 q − 2 − bits/symbol. n n (18) Our encoding method gives a lower bound on the size of any non-binary VT code of length n. An immediate lower bound on the size is 2k , with k given by (17). The proposition below gives a slightly better bound, which is obtained by modifying the encoding method to map q-ary message sequences to q-ary VT codewords, rather than a binary message sequence to a q-ary VT codeword. Proposition 1. For n ≥ 6, q ≥ 4, and any 0 ≤ a ≤ n, and b ∈ Zq , we have |VTa,b (n)| ≥ (q − 1)2t−5 q n−3t+3 , = q n(1− n [3 log2 q−2 log2 (q−1)]− n [5 log2 (q−1)−3 log2 q]) t 1 where t = ⌈log2 n⌉. The proof of the proposition is given at the end of this section, after describing the encoding procedure. We emphasize that we use t = ⌈log2 n⌉ throughout this section (as opposed to ⌈log2 (n + 1)⌉ used for binary VT encoding) because the binary auxiliary sequence has length (n − 1). 7 A. Encoding procedure The high level idea for mapping a k-bit message to a codeword C ∈ VTa,b (n) is the following. Similarly to the binary case, we reserve the t dyadic positions in the binary auxiliary sequence AC to ensure that syn(AC ) = a. Recall from (9) that each bit of AC is determined by comparing two adjacent symbols of the q-ary sequence C. Therefore, to ensure that syn(AC ) = a we not only reserve the symbols in the dyadic positions of C, but also place some restrictions on the symbols adjacent to the dyadic positions. Finally, we use the first three symbols of C to ensure that sum(C) = b. We explain the method in six steps with the help of the following running example. Example 1. Let q = 8, n = 16, and suppose that we wish to encode a binary message M to a codeword C in VT0,1 (16). We have t = ⌈log2 n⌉ = 4 and log2 q = 3. Therefore, from (17) the length of M is k = 3(n − 3t + 3) + 5(t − 3) + 2 = 25 bits. Let M = 110 001 000 111 010 101 000 11100 11. (19) Step 1. Let S be the set of pairs of symbols adjacent to a dyadic symbol, i.e., S = {(c2j −1 , c2j +1 ), for 2 ≤ j ≤ (t − 1)}. (20) There are |S| = (t − 2) pairs of symbols in S. Excluding c0 , the number of symbols in C that are neither in dyadic positions nor in S is (n − 1) − 2|S| − t = (n − 3t + 3). (21) Assign the first (n − 3t + 3) log2 q bits of the message M to these symbols, by converting each set of log2 q bits to a q-ary symbol. This corresponds to the first term in (16). In Example 1, (n − 3t + 3) log2 q = 18, and the representation of first 18 bits of M in Z8 is 6 1 0 7 2 5 0. Therefore the sequence C is C = c0 c1 c2 c3 c4 c5 6 c7 c8 c9 1 0 7 2 5 0. (22) Step 2. In this step, we assign the remaining bits of the message to the symbols in S. For a given dyadic position c2j , j = 2, 3, · · · , (t − 1), we constrain the pair of adjacent symbols (c2j −1 , c2j +1 ) to belong to the following set T = {(r, l) ∈ Zq × Zq : r 6= 0, l 6= (r − 1)}. (23) 8 Via (23), we enforce c2j −1 6= 0 because if c2j −1 were 0, then we necessarily have c2j ≥ c2j −1 which constrains the value of a2j to 1. However, a2j needs to be unconstrained in order to guarantee that any desired syndrome can be generated. Furthermore, we will see in Step 5 that if c2j +1 = c2j −1 −1, then we may be unable find a suitable symbol c2j compliant with the restrictions induced by the auxiliary sequence. We therefore enforce the constraint c2j +1 6= c2j −1 − 1 using (23). It is easy to see that |T | = (q − 1)2 . Excluding the pair (c3 , c5 ), there are (t − 3) pairs in S. If we were encoding q-ary message symbols, each of these (t − 3) pairs could take any pair of symbols in T . Since we are encoding message bits, we use a look up table to map ⌊log2 |T |⌋ = 2 log2 q − 1 bits to each of the pairs in S excluding (c3 , c5 ). We thus map (t − 3)(2 log2 q − 1) bits to the pairs in S excluding (c3 , c5 ). This corresponds to the second term in (16). Next, set c3 = q − 1. This choice is important as it will facilitate step 6. Since (c3 , c5 ) ∈ T , when c3 = q − 1, then c5 has to be such that c5 6= q − 2. Hence, there are q − 1 possible values for c5 . As we are encoding a binary message, we map ⌊log2 (q − 1)⌋ = log2 q − 1 bits to c5 using a look-up table. This corresponds to the third term in (16). We note that the two look-up tables used in this step have sizes at most (q − 1)2 and q, respectively. Thus, in steps one and two in total we have mapped the claimed k message bits to the symbols of C. In Example 1, as seen from (22), (c7 , c9 ) is the only pair in S different from (c3 , c5 ). We can assign 2 log2 q − 1 = 5 bits to (c7 , c9 ). After the first 18 message bits mapped in Step 1, the next five bits in M are 11100. Suppose that in our look-up table these bits correspond to the pair (3, 5). We then have (c7 , c9 ) = (3, 5). Also, we fix c3 = q − 1 = 7, and the last two message bits determine c5 . The last two message bits are 11. Suppose that 3 is the corresponding symbol in the look-up table. We therefore set c5 = 3. Therefore, we have C = c0 c1 c2 7 c4 3 6 3 c8 5 1 0 7 2 5 0. (24) Up to this point, we have mapped our k message bits to a partially filled q-ary sequence. In the following steps we ensure that the resulting sequence lies in the correct VT code by carefully choosing remaining (t+1) symbols to obtain the auxiliary sequence syndrome a and the modular sum b. Step 3. In this step, we specify the bits in the non-dyadic locations of the auxiliary sequence AC . Notice that according to (9), in order to define a2j +1 , the value of c2j should be known. This is not the case here as the dyadic positions in C have been reserved to generate the required 9 syndrome. To circumvent this issue, we determine a2j +1 (for 1 < j < t) by comparing c2j +1 with c2j −1 as follows: a2j +1 =   1  0 if c2j +1 ≥ c2j −1 , (25) if c2j +1 < c2j −1 . As we shall show in step 5, we will be able to make these choices for the auxiliary sequence compatible with the definition of a valid auxiliary sequence in (9). Next, since we have chosen c3 = q − 1, from the rule in (9) we have a3 = 1, regardless of what c2 is. The other non-dyadic positions of the auxiliary sequence AC can be filled in using (9), i.e., ai = 1 if ci ≥ ci−1 , and 0 otherwise. For our example with C shown in (24), at the end of this step we have AC = a1 a2 1 a4 0 1 0 a8 1 0 0 1 0 1 0. (26) Step 4. In this step, we use the binary encoding method described in Section II to find the bits in the dyadic positions a20 , · · · , a2t−1 such that syn(AC ) = a. With this, the auxiliary sequence AC is fully determined. In the example, we need to find a1 , a2 , a4 and a8 such that syn(AC ) = 0. First, we set the syndrome bits a1 = a2 = a4 = a8 = 0, and denote the resulting sequence by A′C = 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0. (27) Now, syn(A′C ) = 12, and the deficiency d = 0 − 12 (mod 6) = 4. The binary representation of d is d3 d2 d1 d0 = 0100. Hence, a1 = a2 = a8 = 0 and a4 = 1 will produce the desired syndrome. Summarizing, we have the following auxiliary sequence AC = 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0. (28) Step 5. In this step, we specify the symbols of C in the dyadic positions (except c1 and c2 ). This will be done by ensuring that AC is a valid auxiliary sequence consistent with the definition in (9). In particular, the choice of c2j for j = 2, · · · , t − 1, should be consistent with a2j +1 and a2j . We ensure this by choosing c2j (for 1 < j < t) as follows:   c2j −1 − 1 if a2j = 0, c2j =  c2j −1 if a2j = 1. (29) From the definition in (9), this choice is consistent with a2j . Now we show that it is also consistent with a2j +1 . If a2j +1 = 1, then according to (25), c2j +1 ≥ c2j −1 ; then the choice of c2j 10 in (29) always guarantees that c2j −1 ≥ c2j , and thus c2j +1 ≥ c2j . Next suppose that a2j +1 = 0. Then according to (25), c2j +1 < c2j −1 . We need to verify that c2j +1 < c2j Now, if a2j = 1, then c2j = c2j −1 and c2j +1 < c2j . Also, if a2j = 0, from (29) we have c2j = c2j −1 − 1. Since symbols adjacent to dyadic positions (c2j −1 , c2j +1 ) are chosen from T (see step 2), then c2j +1 6= c2j −1 −1. Thus, we have that c2j +1 < c2j −1 − 1 = c2j . Therefore, in either case the choice is consistent with (9). For the example, using (29) and (28) we obtain C = c0 c1 c2 7 7 3 6 3 2 5 1 0 7 2 5 0. (30) Step 6. Finally, we need to find c0 , c1 and c2 that are compatible with a1 , a2 , a3 (the first three bits of the auxiliary sequence), and such that sum(C) = b. Let n X w ,b− ci (mod q). (31) i=3 Hence we need c0 + c1 + c2 = w (mod q). We will show that when q ≥ 4, we can find three distinct integers (x, y, z) such that 0 ≤ x < y < z < q and x + y + z = w (mod q). We will assign these numbers to c0 , c1 and c2 . Also recall that we set c3 = q − 1; hence we always have x, y, z ≤ c3 , which is consistent with a3 = 1. The triplet with smallest numbers that we can choose is x = 0, y = 1, z = 2. For this choice, w = 0 + 1 + 2 = 3 (mod q). By increasing z from 2 to q − 1 with x = 0 and y = 1, we can produce any value of w from 3 to q − 1 as well as w = 0. Finally, the only remaining values are w = 1, 2. To obtain these values, we choose x, y, z as follows. 1) w = 1: Choose x = 0, y = 2, z = q − 1. 2) w = 2: Choose x = 1, y = 2, z = q − 1. Hence, we have shown that for q ≥ 4, any w ∈ Zq can be expressed as the (mod q) sum of three distinct elements of Zq . Assigning these elements to c0 , c1 , c2 in the order required by the auxiliary sequence completes the encoding procedure. We now have sum(C) = b and syn(AC ) = a, and thus C ∈ VTa,b (n) as required. In our example, from (30) we have 15 X ci = 48 = 0 (mod 8), (32) i=3 and b = 1. Therefore we need c0 + c1 + c2 = 1 (mod 8). We have a1 = a2 = 0 so c0 > c1 > c2 is the correct order. We therefore assign c0 = 7, c1 = 2, and c2 = 0 to obtain the codeword. C = 7 2 0 7 7 3 6 3 2 5 1 0 7 2 5 0 ∈ VT0,1 (16). (33) 11 It can be verified that sum(C) = 1, and the auxiliary sequence syndrome syn(AC ) = 0. B. The case where q is not a power of two When log2 q is not an integer, the main difference is that we map longer sequences of bits to sequences of q-ary symbols. Recall that in step 1, we determine (n − 3t + 3) symbols of the q-ary codeword. One can map ⌊(n − 3t + 3) log2 q⌋ bits to these (n − 3t + 3) symbols using standard methods to convert an integer expressed in base 2 into base q. In the second step, as described earlier we can map ⌊log2 (q − 1)2 ⌋ bits to (t − 3) pairs in S (excluding (c3 , c5 )). Moreover ⌊log2 (q − 1)⌋ bits can be mapped to c5 . Therefore, in total we can map k bits to a q-ary VT codeword of length n, where k = ⌊(n − 3t + 3) log2 q⌋ + (t − 3)⌊log2 (q − 1)2 ⌋ + ⌊log2 (q − 1)⌋ ≥ n log2 q − t(log2 q + 2) − (2 log2 q − 4). (34) (35) For q ≥ 4, the remaining steps are identical to the case where q is a power of two. The case of q = 3 is slightly different and it is discussed in Appendix A. C. Proof of Proposition 2 The result can be directly derived from steps one and two of our encoding method by mapping sequences of q-ary message symbols (rather than sequences of message bits) to distinct codewords in |VTa,b (n)|. In step 1, we can assign (n − 3t + 3) arbitrary symbols to positions that are neither dyadic nor in S. There are q n−3t+3 ways to choose these symbols. Then in step two, we can choose (q − 1)2 pairs for each of the (t − 3) specified pairs of positions; furthermore, there are (q − 1) choices for c5 . According to steps 3 to 6, we can always choose the remaining symbols such that resulting codeword lies in VTa,b (n). Therefore, we can map q n−3t+3 (q −1)2t−5 different sequences of message symbols to distinct codewords in VTa,b (n). This yields the lower bound on |VTa,b (n)|. A PPENDIX A. Encoding for q = 3 For q = 3, we need to slightly modify the proposed algorithm. The first step is as described in Section III-B. The difference in the second step is that we do not embed data in c5 and simply 12 choose c5 = c3 = 2. Steps three to five remain the same. In the sixth step, we compute w as in (31), and choose c0 , c1 , c2 as follows depending on the values of a0 and a1 : 1) a1 = a2 = 1: Choose c2 = c1 = 2 and c0 = w − 4 (mod 3). 2) a1 = 1, a2 = 0: Choose c2 = 1 and c1 = 2 and c0 = w − 4 (mod 3). 3) a1 = 0, a2 = 1: Choose c2 = 2. If w = 1, then c1 = 0, c0 = 2. If w = 0, then c1 = 0, c0 = 1. If w = 2, then c1 = 1, c0 = 2. The only remaining case is when a1 = a2 = 0. For this case, we need to change c3 and c4 , and also the first three bits of AC . Since c3 has been set to 2, the first three bits of AC in this case are 001. If we change these three bits to 110, syn(AC ) will remain unchanged. We therefore set a1 = a2 = 1 and a3 = 0. Now we update c0 , c1 , c2 , c3 to be compatible with the new auxiliary sequence. Set c3 = 1, recall that c5 = 2 so we still have c5 ≥ c3 and hence this change will not affect a5 . Update c4 according to (29). Set c2 = c1 = 2, and c0 = w − 4 (mod 3). Now we have c3 < c2 which is consistent with a3 = 0. Also c2 ≥ c1 ≥ c0 is consistent with a1 = a2 = 1. Hence, for q = 3, we have mapped k = ⌊log2 3(n−3t+ 3)⌋+ 2(t−3) bits to a q-ary codeword C. This induces following rate: ⌊log2 3 (n − 3⌈log2 n⌉ + 3)⌋ 2(⌈log2 n⌉ − 3) + n n 2.76 ⌈log2 n⌉ 2.25 − ≥ log2 3 − n n R= (36) (37) Similarly to Proposition 2, we can show that for q = 3 there are at least 22(t−3) 3n−3t+3 codewords in each of the VT codes. Acknowledgement The authors thank Andreas Lenz for pointing them to the references [12] and [13]. R EFERENCES [1] N. J. A. Sloane, “On single-deletion-correcting codes,” in Codes and Designs, Ohio State University (Ray-Chaudhuri Festschrift), pp. 273–291, 2000. Online: https://arxiv.org/abs/math/0207197. [2] M. C. Davey and D. J. C. MacKay, “Reliable communication over channels with insertions, deletions, and substitutions,” IEEE Trans. Inf. Theory, vol. 47, no. 2, pp. 687–698, 2001. [3] E. A. Ratzer, “Marker codes for channels with insertions and deletions,” Ann. Telecommn., vol. 60, no. 1, pp. 29–44, 2005. [4] K. A. Abdel-Ghaffar, F. Paluncic, H. C. Ferreira, and W. A. Clarke, “On Helberg’s generalization of the Levenshtein code for multiple deletion/insertion error correction,” IEEE Trans. Inf. Theory, vol. 58, no. 3, pp. 1804–1808, 2012. [5] T. A. Le and H. D. Nguyen, “New multiple insertion/deletion correcting codes for non-binary alphabets.,” IEEE Trans. Inf. Theory, vol. 62, no. 5, pp. 2682–2693, 2016. 13 [6] J. Brakensiek, V. Guruswami, and S. Zbarsky, “Efficient low-redundancy codes for correcting multiple deletions,” in Proc. ACM-SIAM Symp. on Discrete Algorithms, pp. 1884–1892, 2016. [7] V. Guruswami and C. Wang, “Deletion codes in the high-noise and high-rate regimes,” IEEE Trans Inf. Theory, vol. 63, no. 4, pp. 1961–1970, 2017. [8] S. K. Hanna and S. E. Rouayheb, “Guess & check codes for deletions and synchronization,” in Proc. IEEE Int. Symp. Inf. Theory, 2017. [9] R. R. Varshamov and G. M. Tenengolts, “Codes which correct single asymmetric errors,” Automatica i Telemekhanica, vol. 26, no. 2, pp. 288–292, 1965. [10] V. I. Levenshtein, “Binary codes capable of correcting deletions, insertions and reversals,” Doklady Akademii Nauk SSSR, vol. 163, no. 4, pp. 845–848, 1965. [11] G. Tenengolts, “Nonbinary codes, correcting single deletion or insertion,” IEEE Trans. Inf. Theory, vol. 30, no. 5, pp. 766–, 1984. [12] K. A. S. Abdel-Ghaffar and H. C. Ferreira, “Systematic encoding of the Varshamov-Tenengolts codes and the ConstantinRao codes,” IEEE Trans Inf. Theory, vol. 44, pp. 340–345, Jan 1998. [13] K. Saowapa, H. Kaneko, and E. Fujiwara, “Systematic deletion/insertion error correcting codes with random error correction capability,” in Int. Symp. Defect and Fault Tolerance in VLSI Systems, pp. 284–292, Nov. 1999. [14] Z. Liu and M. Mitzenmacher, “Codes for deletion and insertion channels with segmented errors,” IEEE Trans Inf. Theory, vol. 56, no. 1, pp. 224–232, 2010. [15] M. Abroshan, R. Venkataramanan, and A. Guillén i Fàbregas, “Codes for channels with segmented edits,” in Proc. IEEE Int. Symp. Inf. Theory, 2017. Extended version: http://arxiv.org/abs/1701.06341. [16] R. Venkataramanan, V. N. Swamy, and K. Ramchandran, “Low-complexity interactive algorithms for synchronization from deletions, insertions, and substitutions,” IEEE Trans Inf. Theory, vol. 61, no. 10, pp. 5670–5689, 2015. [17] S. M. S. Tabatabaei Yazdi and L. Dolecek, “Synchronization from deletions through interactive communication,” IEEE Trans. Inf. Theory, vol. 60, pp. 397–409, Jan. 2014. [18] F. Sala, C. Schoeny, N. Bitouzé, and L. Dolecek, “Synchronizing files from a large number of insertions and deletions,” IEEE Trans. Commun., vol. 64, no. 6, pp. 2258–2273, 2016. [19] M. Abroshan, R. Venkataramanan, and A. Guillén i Fàbregas, “Multilayer codes for synchronization from deletions,” in To appear in Proc. IEEE Inf. Theory Workshop, 2017. Online: https://arxiv.org/abs/1705.06670. [20] B. D. Ginzburg, “A number-theoretic function with an application in the theory of coding,” Problemy Kibernet., pp. 249– 252, 1967. [21] A. A. Kulkarni and N. Kiyavash, “Nonasymptotic upper bounds for deletion correcting codes,” IEEE Trans Inf. Theory, vol. 59, pp. 5115–5130, Aug. 2013.
7cs.IT
arXiv:1701.00821v1 [cs.DS] 31 Dec 2016 Partially Recursive Acceptance Rejection Mark Huber Claremont McKenna College [email protected] Version: January 5, 2017 Abstract Generating random variates from high-dimensional distributions is often done approximately using Markov chain Monte Carlo. In certain cases, perfect simulation algorithms exist that allow one to draw exactly from the stationary distribution, but most require O(n ln(n)) time, where n measures the size of the input. In this work a new protocol for creating perfect simulation algorithms that runs in O(n) time for a wider range of parameters on several models (such as Strauss, Ising, and random cluster) than was known previously. This work represents an extension of the popping algorithms due to Wilson. 1 Introduction Partially recursive acceptance rejection (PRAR) is a new protocol for creating algorithms for exactly generating random variates from high dimensional distributions. The method is simple to implement efficiently, and results in algorithms that can be proved to have an expected running time that is linear in problem size over a wider range of parameters than known previously for several problems of interest. Consider a distribution defined either by an unnormalized weight function w(x) for discrete spaces, or an unnormalized density function f (x) for continuous spaces. In the past, techniques for perfect simulation from these distributions have been very different depending on whether the spaces were continuous or discrete. PRAR operates the same way in both situations. The problems where PRAR is useful often use approximate sampling via Markov chain Monte Carlo (MCMC). However, these are not true algorithms unless the mixing time of the Markov chain being used can be somehow bounded. One such technique for bounding the mixing time of a Markov chain is Dobrushin uniqueness [3] (see also the work on path coupling of Bubley and Dyer [2]). PRAR requires a condition very similar to Dobrushin uniqueness, the difference being that even if Dobrushin uniqueness cannot be shown mathematically, it can be verified algorithmically. One can prove (up to an arbitrarily small chance of error) that a Markov chain is slowly mixing through computer experiment, however, there is no generally effective way to show that a Markov chain is rapidly mixing. However, with perfect simulation protocols like PRAR, it is possible through computer experiment to verify that the resulting output comes exactly from the target distribution, thereby making them more useful in practice for certain problems than the Markov chain approach. Our concern here is with fast algorithms that use an expected number of random choices that is linear in the size of the problem. There are currently two protocols for generating samples in expected linear time from these types of problems. The first method is the Clan of Ancestors method of [5]. This method is an extension of the Coupling from the Past [16] protocol or Propp and Wilson. It looks backwards in time at the events that could affect the state in the present. The set of backwards events is called the Clan of Ancestors, which gives the name to the method. This approach has rarely been implemented (see [10] for one such implementation) because unless special care is taken it can be very computationally expensive to keep track of how clans arising from different dimensions interact. One of the advantages of PRAR is that such interactions cannot occur with this approach, making the implementation much easier. The second linear time method is the Randomness Recycler method of [11, 6]. Like PRAR (and unlike Clan of Ancestors) it is straightforward to implement, however, the range of parameters for which the algorithm is provably linear time is in all known cases more restricted than with PRAR. The PRAR protocol is illustrated with the following applications. • For independent sets of a graph with n nodes, maximum degree ∆, and parameter λ, the method allows O(n) expected sampling time when λ < 1.13/(∆ − 2), beating the previously best known linear time algorithm which required λ < 1/(∆ − 1). • For the continuous state space autonormal model on a graph with n nodes and parameter β, the method allows O(n) expected sampling time when β < (∆−1) exp(−β), beating the previously best known linear time algorithm which required β < ∆ exp(−β). • For the random cluster model on a graph with n nodes and maximum degree ∆, and parameters p and q, the method allows O(n) expected sampling time when p < 1/∆. Of course, if the expected running time is allowed to be O(n ln(n)) rather than linear, other methods with wider parameter ranges exist. For instance, in [11] it was shown using bounding chains and coupling from the past [16] how to sample independent sets in O(n ln(n)) time when λ < 2/(∆ − 2). But for O(n) algorithms, PRAR appears to have the widest bounds. 2 The rest of the paper is organized as follows. The next section presents the applications, followed by a section describing the theory of the protocol. Then Section 4 applies the protocol to the different applications, proving the running time results listed above. Section 5 then shows how this method can be viewed as a generalization of the popping method of Wilson for sampling directed rooting spanning trees of a graph. 2 Applications Each of the applications will be described as an unnormalized density w(x) with respect to a base finite measure µ from which it is easy to sample from. 2.1 Independent Sets of a Graph Consider coloring the nodes of a graph (V, E) with either 0 or 1, so the state space is Ω = {0, 1}V . The underlying measure we use has a parameter λ ≥ 0 that controls the average number of nodes in a randomly drawn coloring: µ({x}) = λ P i x(i) . (1) Say that X is a Bernoulli random variable with mean p (write X ∼ Bern(p)) if P(X = 1) = p and P(X = 0) = 1 − p. To sample from µ, generate X(v) ∼ Bern(λ/(1 + λ)) independently for all v ∈ V . We use the convention 00 = 1 so that when λ = 0 the only state with positive measure is the all 0 coloring, while as λ grows the measure favors labelings with more 1’s. An independent set of a graph is a labeling such that no two adjacent nodes receive a 1. Hence the density of interest is Y w(x) = (1 − x(i)x(j)). {i,j}∈E Note that for all x ∈ Ω, w(x) ∈ {0, 1} as well. 2.2 Strauss process The Strauss process [17] extends the independent set model by allowing two adjacent nodes to both be labeled 1, but assigns a penalty factor of α ∈ [0, 1] when this occurs. The underlying measure µ still is defined by (1), now the density becomes Y αx(i)x(j) . w(x) = {i,j}∈E With the convention that 00 = 1, then when α = 0 this is just the independent set density. 3 2.3 Autonormal The autonormal model [1] is a continuous extension of the Ising model [13] used for modeling images and other spatial experiments. For a graph G = (V, E), the state space is Ω = [0, 1]V , the underlying measure µ has density ! X (2) f (x) = exp −J (x(i) − y(i))2 i with respect to Lebesgue measure. Here J ≥ 0 and y(i) are known parameters. To sample from µ, each node label X(i) is independently normal with mean y(i), variance (2J)−1 , and conditioned to lie in [0, 1]. The density is   X w(x) = exp − β · (x(i) − x(j)2  , {i,j}∈E where β is another constant. 2.4 Random Cluster The random cluster model [8] is another way of viewing the Potts model [15], which is itself a different extension of the Ising model [13]. Given a graph G = (V, E) the state space is now a coloring of edges with 0 and 1. Given x ∈ Ω = {0, 1}E , and parameter p, the underlying measure µ is µ({x}) = p P e∈E x(e) (1 − p) P e∈E (1−x(e)) . Again this measure µ is easy to sample from: draw (for all e ∈ E) X(e) ∼ Bern(p) independently. A second parameter q controls the density w through the use of c(x), which is the number of connected components in the graph using only the edges with x(e) = 1. w(x) = q c(x) . (3) When q = 2, a sample from the random cluster model can be transformed into a sample from the Ising model in linear time [8], and for q an integer greater than 2, it can be transformed in linear time into a sample from the Potts model. 3 Theory The well-known acceptance rejection method requires two properties to hold: 1. It is easy to sample from the underlying measure µ. 4 Figure 1: An illustration of the random cluster model on a 2 by 2 square lattice. Here the state has measure p(1 − p)3 since one edge is included and three edges are not. The density of this state is q 3 since the edges of the state break the nodes into 3 connected components. With respect to counting measure, this state has density p(1 − p)3 q 3 . 2. The target density is bounded by a known constant M. When these hold (and they do for each of the applications of the previous section), the acceptance rejection (AR) technique is as follows. AR 1) 2) 3) 4) 5) Output: X Randomly draw X ← µ Draw U uniformly from [0, 1] If U < w(X)/M output X and quit Else X ← AR, output X and quit It is well-known [7, 12] that the output is a draw from density w(x) with respect to measure µ. Now suppose that x ∈ C D for color set C and dimension set D (as it is for all of our applications.) Let (D1 , D2 ) be a partition of the dimensions D. Note that for each of our applications, the product nature of w(x) means that we can write w(x) = w1 (x(D1 ))w2 (x(D2 )w12 (x(D1 ∪ D2 )), For instance, for the independent sets model, if (V1 , V2 ) is a partition of the nodes V , then   " # Y Y Y (1 − x(i)x(j)) w(x) =  (1 − x(i)x(j))  (1 − x(i)x(j)) {i,j}∈V1 {i,j}∈V2 i∈V1 ,j∈V2 and w(x) has been nicely factored into w1 , w2 , and w12 . When for D1 and D2 there is an M such that w12 (x) ≤ M, fully recursive AR is as follows. 5 Fully Recusrive AR 1) 2) 3) 4) 5) 6) Input: S ⊆ D Output: X(S) Parition S into D1 and D2 X(D1 ) ← Fully Recursive AR(D1 ), X(D2 ) ← Fully Recursive AR(D2 ) Draw U uniformly from [0, 1] If U < w12 (X)/M output X and quit Else X ← Fully Recursive AR(S), output X(S) and quit Lemma 1. Fully recursive AR generates output X according to w with respect to µ. This is similar to the self-reducibility of Jerrum, Valiant, and Vazirani [14]. More recently, this approach has also been formalized in [12]. The proof follows immediately from the correctness of basic AR and an induction on the number of times line 2 has been used. 3.1 The PRAR protocol Suppose we desire only to know X(v) for a single node v. Then first generate X(v) and X(V \ {v}) separately, and then choose to accept or reject the combination. The key idea of PRAR is that sometimes this does not require that we generate X(V \{v}). For example, in the independent set model, if X(v) = 0, then we accept no matter what X(V \ {v}) is. Even if X(v) = 1, we do not need to know the entirely of X(V \ {v}), only those neighbors of v. The general protocol looks like this. Partially Recursive AR Input: S and D where S ⊆ D Output: [X(S ′ ), S ′] where X is a draw from w over dimensions D and S ⊆ S ′ 1) If S = ∅ then output [∅, ∅] 2) Else 3) Let d be any element of S, let D1 ← {d} 4) Draw X(d) randomly from w1 over µ 5) Draw U uniformly from [0, 1] 6) If U ≤ minx(D\{d}) w12 (X(D1 ), x(D \ D1 ))/M 7) Draw [X(S ′′ ), S ′′ ] ← Partially Recursive AR(S \ {d}, D \ {d}) 8) S ′ ← S ′′ ∪ {d}. Output [X(S ′ ), S ′ ] and quit 9) Else 10) Let D3 be the smallest set such that w12 (X(D1 ∪ D3 )) determines w12 (X) 11) [X(S ′′ ), S ′′] ← Partially Recursive AR(D3 , D \ {d}) 12) If U ≤ w12 (X(D1 ∪ D3 ))/M, then S ′ ← S ′′ ∪ {d}, output [X(S ′ ), S ′] 13) Else let [X(S ′ ), S] ← Partially Recursive AR(S, D) and output [X(S ′ ), S ′] 6 Lemma 2. Suppose Partially Recursive AR(S, D) terminates with probability 1 with output (X(S), D). Then X(S) has the same distribution as the coordinates of S from X where X is a complete draw from density w with respect to µ over dimensions D. Proof. The Fundamental Theorem of Perfect Simulation [12, 9] says that if the algorithm terminates with probability 1, then we assume that lines 1, 6, 11, and 13 have the correct output when proving that the overall algorithm is correct. With that assumption, lines 7 and 11 are drawing a state X, and then reporting X(S ′′ ) for some set of dimensions S ′′ that contain S. So the algorithm’s output has the same distribution as Fully Recursive AR, but not all coordinates of X are reported in the output. It is the analysis of the running time where we see a Dobrushin like condition. Lemma 3. Let c1 < 1 be the probability that line 13 is reached. Let p(d) denote the probability that line 10 is reached given D1 = d. Suppose for all d ∈ D, there exists B with E[#(D3 )|d] ≤ B, and that E[#(D3 )|d]p(d) ≤ c2 < 1. Given S then the expected number of times line 4 is called (or equivalently line 5) is at most (1 − c1 )−1 (1 − c2 )−1 #(S). Proof. Consider two temporary changes to the algorithm. First, at line 13, change it to Else, output [∅, ∅] and quit. Second, at line 3, add S ← S \{d} to the end. Because of our previous change to line 13, this does not alter the algorithm any further. Consider the expected time needed to either reach our new line 13, or to quit. Then there might be several recursive calls to Paritall Recursive AR over the run of the algorithm. Let Nt be the number of dimensions in the union of the S sets after t recursive calls to the algorithm. Then N0 = #(S). Now consider Nt+1 given Nt . Two things can happen. If lines 7 and 8 activate, then Nt+1 = Nt − 1. If lines 10 and 11 activate, then Nt+1 = Nt − 1 + #(D3 ). This second event happens with probability p(d). So E[Nt+1 |Nt , d] = Nt − 1 + p(d)E[#(D3 )|d]. When this right hand side is at most Nt − (1 − c2 ), standard martingale theory (see for instance [4]) gives that the expected amount of time for the Nt process to reach 0 is N0 /(1 − c2 ). Now consider what happens if line 13 is changed back. Then the expected time between reaching line 13 is #(S)(1 − c2 )−1 . Each time through the algorithm there is at least a 1 − c1 chance line 13 is not executed and the algorithm does not recurse further. Therefore, the total expected number of steps taken is at most (1 − c1 )−1 (1 − c2 )−1 #(S). 7 4 4.1 Applications Independent sets of a graph Independent sets of a graph label each node either 0 or 1. In this case where there are only two colors, the general PRAR can be simplified. If the label of a node is 0, then the node is immediately accepted. But if the label is 1, then all the neighbors of the node must also be 0. If a neighbor is 1, then we can immediately track down its neighbors to ensure that they are all 0, and so on. So if a neighbor of the end of the backbone is labeled 1, that increases the length of the backbone by 1. On the other hand, if all the neighbors of the end of the backbone at labeled 0, then the node that is the end of the backbone accepts its label of 1. If the backbone had length 1, then we are done. Otherwise, that meant the the second to the end node in the backbone rejects–because it comes into conflict with the end of the backbone that is labeled 1. Therefore the last two nodes in backbone are removed from the backbone and return to being unresolved. The process then starts over again. This gives us a connected sequence of nodes labeled 1 that grows and shrinks in length. Call this sequence the backbone of the current state, and the method Backbone PRAR. See Figure 2 for an illustration. Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Step 9 Step 10 Step 11 Step 12 Figure 2: Backbone PRAR for independent sets. Here white stands for label 0 and black for label 1. For instance, at step 7 the bottom center node was labeled 0. This meant that the bottom right node was accepted, which then meant that the right center node was rejected, so both were removed at Step 8. By step 12 the backbone has resolved and the upper left labeling of 1 is accepted. This idea of a backbone works on other applications with two colors, such as the Ising model and the Strauss model. 8 Lemma 4. The backbone method for independent sets only requires an independent, identically distributed stream of Bernoulli random variables with mean λ/(1 + λ). Let ∆ be the maximum degree of the graph and i−1 ∆−1  λ λ X 1− . γ= 1 + λ i=1 (1 + λ)∆ If γ < 1, then the expected number of Bernoulli’s needed to resolve one node is bounded above by C = 1 + λ∆(∆ − 1)/(1 − γ). Since this is a constant with respect to the size of the graph, the time needed to generate a sample over the entire graph is at most Cn. Proof. When the backbone resolves, it resolves either as an acceptance or a rejection. The number of resolutions until acceptance is stochastically bounded above by a geometric random variable with parameter 1/(1+λ). Therefore, the expected number of resolutions of the backbone is at most (1 + λ) − 1 = λ. How many draws does it take to resolve a node? It certainly takes one to determine the label for the node. So if T is the resolution time, then E[T ] ≤ 1 + ∆R, where R is an upper bound on the expected resolution time for subsequent nodes. These subsequent nodes have maximum degree at most ∆ − 1. The first neighbor takes at most R expected time. On to the second neighbor. Note that the second neighbor only needs to be resolved if the first neighbor resolved to a 0. If the first neighbor had resolved to a 1, then the original node is rejected, there is no need for further action. The chance that a neighbor resolves to 1 is at least c = [λ/(1 + λ)][1/(1 + λ)]∆−1 . So the second neighbor is only activated with probability 1 − c. Similarly, the third neighbor can also take time distributed as R, but only if the first two neighbors fail. Adding this up over the (up to ∆ − 1) neighbors gives   ∆−1 !i−1 ∆−1 λ X λ 1 R≤1+ R 1− , 1 + λ i=1 1+λ 1+λ which gives the result. It is straightforward to verify that for λ < 1.13/(∆ − 2) we have γ < 1. This gives the result presented in Section 1. Call the value of λ where γ = 1 the critical value of λ, and denote it λc . For λ < λc , the algorithm is guaranteed to generate samples in polynomial time. For λ ≥ λc , the algorithm might operate in polynomial time, or it might not. 4.2 Strauss process Now consider what happens in the Strauss process. Again consider drawing an initial node and accepting or rejecting based upon the neighbors of the node. 9 ∆ 3 4 5 λc for RR λc for CoA λc for PRAR 0.2 0.142857. . . 0.111111. . . 0.5 0.333. . . 0.25 1.13224. . . 0.57833. . . 0.29315. . . Figure 3: Range of critical λ compared to ∆. Since expected sampling time is guaranteed linear for λ < λc , higher is better. Column for λc for the Randomness Recycler (RR) comes from Theorem 1 of [6]. Column for λc for Clan of Ancestors (CoA) comes from a branching process analysis. If the node is labeled 0, then we always accept as before. If the node is labeled 1, then the chance of accepting is α raised to the power of each of the neighbors of the node labeled 1. Another way to view this, is to, for each edge adjacent to the original node, draw a Bern(α) random variable. If this variable is 1, then the neighbor does not matter. If this variable is 0, then the neighbor does matter, and recursion needs to be used to find out its value. This changes the expected number of neighbors to be considered from ∆ − 1 to (∆ − 1)α. The chance of a node being labeled 1 is strictly greater in the recursion, therefore, the new value of γα is at most λ α(∆ − 1). 1+λ Note that γα < 1 is equivalent to λ < 1/[α(∆ − 1) − 1], so a similar argument to the previous section gives the following result. γα = Lemma 5. When λ < [α(∆ − 1) − 1]−1 , then PRAR generates a sample from the Strauss process using O(n) expected number of Bernoulli draws. 4.3 Autonormal As with the independent set density, the idea is to consider what happens when a single node is drawn, the rest of the graph is drawn, and the combination is either accepted or rejected. The value that U from line 6 in the general protocol must fall below is the product of the chance of rejecting because of each of the neighboring edges. That is, in order to determine if node v can be combined with the state of x(V \ {v}), it is necessary to independently draw a uniform [0, 1] random variable for each of the neighbors w of v. Only if every edge accepts can the entire state be said to accept. If the single node v is assigned value x(v), the chance of rejecting based on w is at most exp(−β(x(v) − x(w))2 ) ≤ exp(−β max{1 − x(i), x(i)}2 ), 10 where the upper bound on the right hand side does not depend on x(w)! Therefore, only if Uw ≥ exp(−β max{1 − x(i), x(i)}2 ) does the value x(w) need to be determined. Therefore, the expected number of neighbors of the original node v that need to be found out is bounded above by ∆(1 − exp(−β max{1 − x(i), x(i)}2 )). The original node v might have had up to ∆ neighbors, but subsequent nodes will only have at most ∆−1 neighbors. Therefore, if (∆−1)(1−exp(−β max{1−x(i), x(i)}2 )) < 1, then on average the number of new nodes to consider generated by a node will be negative, and PRAR will terminate after a finite number of steps. This argument yields the following lemma. Lemma 6. Let γ = (∆ − 1) exp(−β). If γ < 1, then PRAR can generate a sample from the Autonormal model in O(n) random choices on a graph with n nodes and maximum degree ∆. A similar analysis for the Clan of Ancestors approach requires ∆ exp(−β) < 1, therefore the parameter range with guaranteed performance here is slightly wider. 4.4 Random Cluster Suppose that q > 1 in the random cluster model with density given by (3). Then the density of a configuration gains a factor of q for each connected component in the graph. Viewed as a penalty, this means that for a particular edge, there is a penalty of 1/q if it connects two previously disconnected components in the rest of the graph. In other words, if c = (1/q)n , where n is the number of nodes in the graph, then the density can be written as w2 (x) = cw(x) = (1/q)n−c(x)) . Now consider a single edge {i, j} chosen from the underlying measure. If the edge is labeled 0 (which happens with probability 1 − p), then the edge is accepted regardless of the rest of the components. If the edge is labeled 1 (which happens with probability p), then the edge is accepted with probability 1/q if the rest of the state does not connect nodes i and j, and accepted with probability 1 otherwise. Suppose that x({i, j}) is randomly chosen to be 1. Then draw U uniformly over [0, 1]. If U < 1/q, then the edge {i, j} is accepted regardless of the rest of the state and the edge value becomes known. Otherwise, recursion must be used to determine enough of the rest of the state in order to determine if the nodes {i, j} are connected or not. The first edge {i, j} can be connected to as many as 2(∆ − 1) different edges, each of which must be considered to determine if x({i, j}) = 1. Let e be one of these edges (either of the form {i, k} or {j, k} for some nodes k.) 11 If e is chosen to be labeled 0 in the recursion, then it is removed from the “needs a value” list. Otherwise, it is adjacent to at most ∆ − 1 new edges that might need a value. Hence the expected change of the size of the number of edges that need values is bounded above by (−1)(1 − p) + p(∆ − 1) = ∆p − 1. If this quantity is less than 0, then the number of edges to be considered drops (on average) at each step, and the expected number of steps is bounded. This gives the following lemma. Lemma 7. Let G be a graph with n nodes, m edges, and maximum degree ∆. If p < 1/∆, then the expected number of random choices made in the algorithm is O(m). 5 Connection to popping This PRAR protocol can be viewed as an extension of the cycle popping algorithm of Wilson for uniformly generating from rooted trees in a directed graph. Consider a graph (V, E), and construct a directed graph by taking each edge {i, j} and adding directed arcs (i, j) and (j, i). Designate a special node r ∈ V known as the root of the graph. Then let a configuration consist of a {0, 1} labeling of arcs such that every node v 6= r has exactly one outgoing edge (v, w) labeled 1. Let µ be the underlying measure that is uniform over all such labelings. Then it is easy to sample from µ: independently for each node i select a neighbor j uniformly at random and label that outgoing arc 1, and all other outgoing arcs from i label 0. The density w(x) then is 1 if every node has a directed path using edges labeled 1 to the root, and is 0 otherwise. When w(x) is 1, say that x encodes a directed rooted tree in the original graph. Then Wilson [18] presented a simple algorithm for generating from w(x) over µ. Start with an arbitrary node i, and uniformly choose a neighbor j. From j choose neighbor k, and continue until one of two things happens. If the directed path reaches a node already examined, then there is a loop. Erase the loop and continue onwards. For instance, if the choices where a → b → c → d → b, then (b, c, d, b) forms a loop, and the next step would start with a → b. The other thing that can happen is that the directed path reaches r. In this case, fix the labeling for all nodes along the path. Now choose another node in the graph and repeat, choosing random neighbors, erasing loops as they form, and stopping when reaching either r or a previously fixed node. This algorithm is just PRAR with the backbone method applied to µ and w! At each step of the algorithm we are recursively moving deeper into the graph in order to determine if acceptance should occur. If a loop forms, then rejection occurs, and all the edges in the loop are eliminated. But if the path should encounter a previously 12 fixed path, then acceptance occurs not only for the original edge but all along the path as well. Wilson gave a proof tailored for his algorithm. Because this is also a PRAR algorithm, we immediately have correctness for the loop-erased random walk method of uniformly generating rooted trees. Acknowledgements An earlier version of this technique appears in [12] (without the backbone method, connection to popping, and the general running time bound given here.) The recent development of this method was supported by NSF grant DMS-1418495. References [1] J. Besag. Spatial interaction and the statistical analysis of lattice systems (with discussion). J. R. Statist. Soc. Ser. B Stat. Methodol., 36:192–236, 1974. [2] R. Bubley and M. Dyer. Path coupling: a technique for proving rapid mixing in Markov chains. In Proc. 38th Sympos. on Foundations of Computer Science, pages 223–231, 1997. [3] P. L. Dobruschin. The description of a random field by means of conditional probabilities and conditions of its regularity. Theor. Prob. Appl., 13(2):197–224, 1968. [4] R. Durrett. Probability: Theory and Examples, Third edition. Brooks/Cole, 2005. [5] P.A. Ferrari, R. Fernández, and N. L. Garcia. Perfect simulation for interacting point processes, loss networks and ising models. Stochastic Process. Appl., 102(1):63–68, 2002. [6] J. A. Fill and M. L. Huber. The Randomness Recycler: A new approach to perfect sampling. In Proc. 41st Sympos. on Foundations of Comp. Sci., pages 503–511, 2000. [7] G. S. Fishman. Choosing sample path length and number of sample paths when starting in the steady state. Oper. Res. Letters, 16:209–219, 1994. [8] C.M. Fortuin and P.W. Kasteleyn. On the random cluster model I: Introduction and relation to other models. Phys., 57:536–564, 1972. [9] M. Huber. The Fundamental Theorem of perfect simulation. 2016. Submitted. 13 [10] M. Huber, E. Villella, D. Rozenfeld, and J. Xu. Bounds on the artificial phase transition for perfect simulation of the hard core Gibbs processes. Involve, 5(3):247–255, 2012. [11] M. L. Huber. A faster method for sampling independent sets. In Proc. 11th ACM-SIAM Sympos. on Discrete Algorithms, pages 625–626, 2000. [12] Mark L. Huber. Perfect Simulation. Number 148 in Chapman & Hall/CRC Monographs on Statistics & Applied Probability. CRC Press, 2015. [13] E. Ising. Beitrag zur theorie des ferromagnetismus. Z. Phys., 31:253–258, 1925. [14] M. Jerrum, L. Valiant, and V. Vazirani. Random generation of combinatorial structures from a uniform distribution. Theoret. Comput. Sci., 43:169–188, 1986. [15] R. B. Potts. Some generalised order-disorder transformations. Proc. Cambridge Philosophical Soc., 48:106–109, 1952. [16] J. G. Propp and D. B. Wilson. Exact sampling with coupled Markov chains and applications to statistical mechanics. Random Structures Algorithms, 9(1– 2):223–252, 1996. [17] D. J. Strauss. A model for clustering. Biometrika, 63:467–475, 1975. [18] D. B. Wilson. Generating random spanning trees more quickly than the cover time. In Proc. 28th ACM Sympos. on the Theory of Computing, pages 296–303, 1996. 14
8cs.DS
Coordinated Charging and Discharging Strategies for Plug-in Electric Bus Fast Charging Station with Energy Storage System Huimiao Chen, Zechun Hu *, Hongcai Zhang, Haocheng Luo Department of Electrical Engineering, Tsinghua University, Beijing, 100084, China * [email protected] Abstract: Plug-in electric bus (PEB) is an environmentally friendly mode of public transportation and plug-in electric bus fast charging stations (PEBFCSs) play an essential role in the operation of PEBs. Under effective control, deploying an energy storage system (ESS) within a PEBFCS can reduce the peak charging loads and the electricity purchase costs. To deal with the (integrated) scheduling problem of (PEBs charging and) ESS charging and discharging, in this study, we propose an optimal real-time coordinated charging and discharging strategy for a PEBFCS with ESS to achieve maximum economic benefits. According to whether the PEB charging loads are controllable, the corresponding mathematical models are respectively established under two scenarios, i.e., coordinated PEB charging scenario and uncoordinated PEB charging scenario. The price and lifespan of ESS, the capacity charge of PEBFCS and the electricity price arbitrage are considered in the models. Further, under the coordinated PEB charging scenario, a heuristics-based method is developed to get the approximately optimal strategy with computation efficiency dramatically enhanced. Finally, we validate the effectiveness of the proposed strategies, interpret the effect of ESS prices on the usage of ESS, and provide the sensitivity analysis of ESS capacity through the case studies. 1. Nomenclature Indices and Sets n Index of PEB. m Index of fast charging port. Index of time interval in the following k optimising time horizon. Index of parking of PEB n in the in , jn following optimising time horizon. Subscript of charging/discharging. c/d N Index set of PEBs. Index set of fast charging ports. M Index set of time intervals in the following K optimising time horizon. Index set of time intervals during parking P(in ) in of PEB n . Index set of parking of PEB n in the I ( n) following optimising time horizon. Index set of time intervals in the following P( I (n)) optimising time horizon when PEB n is expected to be parking. card( X ) The number of elements in set X . Parameters and Variables SnPEB Battery capacity of PEB n (kWh). ESS Energy capacity of ESS (kWh). S PcPEB Rated charging power of PEBs (kW). Ppeak Peak load of PEBFCS (kW). ESS Pc,max Maximum charging power of ESS (kW). ESS Pd,max Maximum discharging power of ESS (kW). cPEB cESS Charging efficiency of PEBs. dESS Discharging efficiency of ESS. Charging efficiency of ESS. ESS SOCmin Minimum state of charger (SOC) for PEB batteries. Minimum SOC for ESS. SOCnPEB ,in SOC of in th arrival of PEB n . PEB SOCmin ESS k SOC SOCnPEB ,in an ,in SOC of ESS at the beginning of time interval k . SOC difference of PEB n between in th departure and the next return. Time interval of in th expected return of PEB n ( an,i  K ). n ln ,in Time interval of in th expected departure of PEB n ( ln,i  K ). Lk Power of other loads excluding PEB charging loads in time interval k (kW). Duration of a time interval (min). Electricity price in time interval k (RMB/kWh). Price of ESS (RMB/kWh). Capacity charge of PEBFCS (RMB/kW). The number of charge-discharge cycle of ESS. Discount rate of the capacity charge (%). Life cycle of PEBFCS (year). Charging state matrix of PEBs (dimensions: card( N )  card( K ) ). Charging state matrix of fast charging ports (dimensions: card(M )  card( K ) ). Vector of charging power of ESS (dimensions: 1 card( K ) ). Vector of discharging power of ESS (dimensions: 1 card( K ) ). n t  kTOU  ESS  Cap n ESS   C PEB C FCP PcESS PdESS cnPEB ,k Element of CPEB , binary variable, 1: on 1 cmFCP ,k EES Pc,k charge; 0: off charge. Element of C FCP , binary variable, 1: on state; 0: off state. Element of PcESS , the charging power of P ESS in time interval k (kW). Element of PdESS , the discharging power of un, k , vn , k ESS in time interval k (kW). Auxiliary variables. EES d,k 2. Introduction The wide use of fossil energy has resulted in global warming and severe environmental pollution [1]. Plug-in electric vehicles (PEVs) have incomparable advantage over fuel-powered vehicles in environmental protection and sustainable development [2], [3]. With development and popularization of PEVs, a large-scale of PEVs will be connected to the public power grid in the future. The incremental charging loads of PEVs will have a massive impact on the existing power system [4], [5]. For example, difference between load peak and off-peak may increase; power quality could be deteriorated; distribution networks will face new challenges, including increasing of network losses [6], [7], overloading of transformers [8], [9], excessively heavy line loads and larger voltage deviations [10], [11], etc. Present research has shown coordinated charging of PEVs is able to effectively reduce the negative impact of PEVs’ charging loads on the power system [12]-[17]. The optimisation objectives and methods of PEV coordinated charging are various in the literature. Under the time-of-use (TOU) prices, reference [12] proposes a cost-optimal control strategy for multiple PEV aggregators to guarantee that the distribution system runs within the security limits. In deregulated electricity market, authors of [13] present an optimal charging control method for PEVs to provide ancillary services based on the forecast of future electricity prices. In [14], a two-stage optimisation method is developed: Firstly, in order to achieve peak shaving and valley filling, PEVs are allocated appropriate charging periods according to the urgency degree; then the charging sites are optimised to minimise transmission losses. In [15], a threshold admission and greedy scheduling policy is proposed to maximise the revenue of charging services for large-scale electric vehicles. Taking vehicle to grid into account, reference [16] builds an optimal scheduling model to minimise the energy consumption and carbon emission, whereas reference [17] formulates a dynamic charging control strategy for providing frequency regulation services. Though a lot of research on PEV coordinated charging has been done, most of the relevant works concentrate on studies of slow or normal charging mode of private PEVs, which are not applicable for a plug-in electric bus fast charging station (PEBFCS). As a special type of PEVs, plug-in electric bus (PEB) is an electric bus which is powered by electricity and can be recharged from an external source of electricity. In [18], an effective charging strategy for PEBFCSs is proposed to minimise the power purchase costs by responding to the TOU prices, and as the result, the peak loads are mitigated as well. But the work is not suitable for a PEBFCS with ESS. Nowadays, with the rapid development of energy storage technology, installing ESS in the charging station can achieve better demand response [19]. However, only a few published literature focuses on charging stations with ESS. Reference [20] proposes a control strategy for PEV fast charging station equipped with a flywheel ESS, which is able to work without any digital communication between the grid-tied and flywheel ESS converters. Reference [21] provides a method to schedule PEV charging with energy storage and shows that aggregator’s revenue varies as the number of PEVs and the number of energy storage units change. Authors of [22] present a coordinated control strategy for ESS to reduce the electricity purchase costs and flatten the charging load profile. However, the investment costs of energy storage are not taken into account both in [21] and [22]. Besides, the original load curve is given and fixed in [22] so that the elasticity of PEV charging loads cannot play a role. In [19], the value of ESS in a PEBFCS is discussed as the core problem and the control strategy of PEBs is not concerned. To the best of our knowledge, there is no existing papers which study the optimal load scheduling method for a PEBFCS with ESS. Thus, herein, we aim to develop an integrated control strategy for both ESS and PEB loads in a PEBFCS with ESS in order to achieve maximum economic benefits. It is worthy to note that a PEBFCS with ESS is a valuable research object for following reasons: 1) PEB is a green public means of transportation, which is convenient for centralized control and management. Moreover, a large number of PEB lines have been in commercial operation or demonstrational operation in some cities (e.g. Shenzhen and Chongqing, China). 2) Fast charging stations are regarded as the promising providers of public PEVs’ charging service in the future because they can provide large charging power and meet urgent charging demands. 3) As the technology of ESS advances, the efficiency and lifespan of ESS are expected to be improved and its price declines. Thus ESS is an effective supplement for a PEBFCS to reduce the high capacity charge for the grid integration as well as to reduce the charging costs through arbitraging the price differences under TOU price scheme. Based on the above considerations and motivations, the main procedures and contributions of the paper are summarized below.: 1) A coordinated charging strategy for PEBs without considering ESS is formulated as the baseline strategy. Additionally, under the coordinated PEB charging scenario (PEB charging loads are controllable), an optimal coordinated charging and discharging strategy involving PEBs and ESS is proposed. The control of ESS and PEBs is optimised in an integrated way and the combined control strategy achieves the best optimality. 2) Under the uncoordinated PEB charging scenario (PEB charging loads are uncontrollable), an optimal coordinated charging and discharging strategy of ESS is presented. 3) To enhance the computation efficiency, under the coordinated PEB charging scenario, a heuristics-based method is further developed to get the approximately optimal control strategy of ESS and PEBs. 4) Operation costs, load profiles and some other important indices of a given PEBFCS with ESS are simulated and compared with the ones without ESS under both two scenarios, i.e., coordinated PEB charging scenario and uncoordinated PEB charging scenario, to verify the 2 effectiveness of the proposed control strategies. The impacts of ESS capacity on economic benefits are also analyzed. The remainder of the paper is organized as follows. Section 3 describes the scenario for the proposed strategies. The details and the mathematical formulations of the strategies are presented in Section 4. Section 5 shows case studies and complements our analysis. Finally, Section 6 concludes. 3. Scenario Descriptions In order to ensure the security of power grid, the power capacity for a PEBFCS is usually adequate for simultaneous charging of all the fast charging piles, otherwise the total power of chargers might exceed the capacity of distribution transformer and the line overload might occur. However, in the actual operation, the total charging power of the PEBFCS seldom hits the upper limit [19]. For this reason, installing ESS rather than a distribution transformer with overlarge capacity could be a more economical way by reducing the grid connection fee, i.e., the capacity charge for a PEBFCS. The configuration of a PEBFCS with ESS is illustrated in Fig. 1. The network supplies power to the station through the local distribution transformer. And ESS, PEB charging piles and the appliances of nearby residential or commercial areas (other loads) are connected to the secondary side of the distribution transformer. If the station has exclusive distribution transformer, the ratio of the power of other loads will be approximately zero. In this text, it is assumed that PEBFCS purchases electricity from the utility at TOU electricity prices and provides fast charging service to PEBs. Note that in deregulated electricity markets, the forecasting electricity prices can take place of the TOU electricity prices and the control strategy proposed in the following still works. For a PEBFCS, we suppose that the number of PEBs, i.e., card( M ) , the number of fast charging piles, i.e., card( N ) , and the PEB departure time-table are given. The control system of PEBFCS is able to acquire SOCs of PEBs when they arrive at the station through built-in battery management systems on PEBs. And SOCnPEB ,in can be used to forecast the following arrival SOCs. In actual operation, SOCnPEB ,in can be obtained based on historical data. Note that the proposed control strategy in this paper is to some degree resistant to the influence of the SOC forecasting errors because the real-time control is updated periodically and the negative effect caused by the forecasting errors will be gradually mitigated (see Section 4 for the details of the proposed control strategy). In order to reduce the negative effect on battery lifespan caused by excessive discharging, the minimum SOCs for PEB batteries and ESS are set, i.e., PEB ESS SOCmin and SOCmin . Also, due to the harmful effect of fast charging start-stop on chargers and batteries, continuous (uninterruptible) charging is adopted. For the control strategies, the optimising time horizon is discretely divided into card( K ) time intervals equally and the duration of each time interval is t . Charging power of PEB, and charging and discharging powers of ESS are regarded as constants in each time interval. Intuitively, larger card( K ) (smaller t ) makes the results more accurate, but the computation burden will be heavier. In practice, the value of card( K ) and t can be adjusted according to the accuracy requirements and the computational performances. Based on the above scenario descriptions, the coordinated charging and discharging strategies for PEBFCS with ESS is computed through optimisation models to meet multiple constraints, such as charging demands of PEBs and continuous fast charging of PEB batteries, and to improve the economic benefit of PEBFCS, detailed in the next section. Substation Distribution Transformer ESS Power Time Plug-in Electric Bus Fast Charging Station Other Loads Fig. 1. Schematic illustration of a PEBFCS with ESS 4. Strategies and Mathematical Formulations 4.1. Control Strategy Overview In this subsection, we outline the proposed control strategies. A rolling horizon optimisation method is applied to implementation of the proposed control strategy. Every time, a real-time control strategy is formulated according to information of the following optimising time horizon (from the next time interval to the card( K ) th time interval), and to ensure the real-time control performance, each control strategy will be only executed for one time interval and then a recalculated strategy will substitute for it for the next time interval. For the control strategy under coordinated PEB charging scenario, it is operated through a three-step serial processing procedure at each time interval. When a new time interval begins, the control system will orderly 1) implement the strategy generated in the last time interval by controlling the on-off states of fast charging piles and the charging or discharging power of ESS; 2) make sure all the necessary data ready and then calculate the new charging and d i s c h ar g i n g s tr a te g y o f P E B s a n d E S S (d e ta i le d subsequently), which will be implemented in the next time interval; 3) prepare data for the next cycle. Here, data preparation in a time interval include that: 1) if a PEB arrives, the control system will acquire the number of the PEB and read its current SOC, i.e., its SOCnPEB ,1 ; 2) the next arrival SOCs of the rest PEBs, i.e., the other SOCnPEB ,1 , are estimated through the last departure SOCs (if there is communication 3 New time interval? No Yes Implement the strategy generated in the last time interval. Calculate the next strategy. Get C PEB , P cE S S and P dE S S. PEB Convert C to C FC P. Remain the system unchanged and enter a delay of 10s. No New time interval? Yes Calculate the next strategy. Read or estimate all the SOCnPEB ,1 . Implement the strategy generated in the last time interval. Update the PEB departure time-table. Get P cE S S and P dE S S . Forecast the future PEB charging load profile. Read or forecast the other related parameters. Read or forecast the other related parameters. a Fig. 2. Flow charts of the control strategies (a) Under coordinated PEB charging scenario, (b) Under uncoordinated PEB charging scenario between PEBFCS and PEBs on road, the current SOCs of all the PEBs will be available) and SOCnPEB ,in ; 3) the PEB b min EPC  ECC (1) where departure time-table is updated according to the current information of PEBs; 4) the control system gets the other necessary information, which can be extracted from the database (e.g. the battery capacity SnPEB , the electricity price  PEB  TOU EPC     cnPEB , k Pc  t k k K  nN  Cap ECC   Ppeak ,  kTOU ) or be predicted based on historical data (e.g. the power  of other loads rk ). The corresponding flow chart is shown in Fig. 2 (a). As for the control strategy under uncoordinated PEB charging scenario, the processing procedure is similar but becomes less complicated without regard to the control of PEB charging loads. At the beginning of a new time interval, the control system will orderly 1) implement the strategy generated in the last time interval by controlling the charging or discharging power of ESS; 2) calculate the new charging and discharging strategy of ESS (detailed subsequently); 3) as the basis for the strategy formulation in the next cycle, TOU prepare the necessary data (e.g. the electricity price  k , the power of other loads rk ) and forecast the PEB charging load profile in the following optimising time horizon. The corresponding flow chart is shown in Fig. 2 (b). 4.2. Formulations of Optimisation Models Mathematical models in this section aim at optimising the economic benefits of PEBFCS, i.e., minimising the equivalent operation costs of the following optimising time horizon. 4.2.1 Optimisation Model for Coordinated PEB Charging Scenario without ESS: Here, the optimisation model (Model A) is utilized to compute the coordinated PEB charging strategy, which is used as the reference. The objective function is to minimise the electricity purchase costs ( EPC ) and the equivalent capacity charge ( ECC ) in the following optimising time horizon. The whole model is formulated as (1)-(10). Remain the system unchanged and enter a delay of 10s. card  K  t (2)  1     365  24  60 ,  1     1 subject to: PEB Ppeak   cnPEB  Lk , k  K , k Pc c nN  card( M ), k  K cnPEB , k  0, k  K \ P  I (n)  , n  N PEB n, k un, k  c c , n  N , k  K \ 1 PEB n, k vn, k  c c , n  N, PEB n , k -1 PEB n , k 1 k  K \ card  K  un,k , vn,k  0,1  (4) nN PEB n, k kP  in  (3) un, k   kP  in  (5) (6) (7) (8) (9) vn, k  1, in  I  n  , n  N (10)   PEB PEB PEB PEB   SOCn,in  SOCn,1  SOCmin  Sn  in  jn  PEB PEB PEB    cn, k Pc c t  in  jn k P  in    PEB PEB PEB   SOCn ,in  1  SOCn ,in  Sn ,  in  jn 1  (11) jn  I  n  , n  N . In the above model, equations (2) calculates the electricity purchase costs by summing the costs in all the time intervals. In (2), cnPEB , k denotes the charging state of PEB n at time interval k ; PcPEB denotes the rated charging power of PEBs; t denotes the duration of a time interval;  kTOU is 4 the electricity price at time interval k . Equation (3) calculates the equivalent capacity fees of PEBFCS. In (3),  is capital recovery factor (  is the discount rate of the capacity charge and  is the life cycle of PEBFCS), which converts the initial investment costs into a stream of equal annual payments over  years, and the equivalent annual capacity charge is multiplied by a ratio  , which is the proportion of the duration of optimisation time horizon to a year (see the second equation in (3)), to proportionally count the capacity charge for the following optimising time horizon.  Cap is the capacity charge of PEBFCS and the peak load Ppeak can calculated by (12), where Lk is the total power of other loads excluding PEV charging loads in time interval k . In the model, constraints (4) are linearized expressions to describe Ppeak instead of (12) without any sacrifice of optimality, because the optimal solution must meet equation (12) to achieve the lowest costs.   PEB Ppeak  max   cnPEB  Lk  (12) , k Pc kK  nN  For constraints (5)-(11), (5) are the upper charging pile number constraints; constraints (6) describe that only parking PEBs can be on charge, where P( I (n)) is the index set of time intervals in the following optimising time horizon when PEB n is expected to be parking and P( I (n))   in I ( n )  P(in )  an,1 , , ln,1∪∪ an,card( I  n) , , ln,card( I  n )  , n  N ; constraints (7)-(10) ensure the continues charging of PEBs by introducing two auxiliary variables, i.e., un , k and vn , k . Note that un , k and vn , k guarantee the continuity of PEB charging by restricting the change of PEB charging state, which can be easily proved, and the introduce of un , k and vn , k makes the constraints linear; constraints (10) describe the charging demand constraints of PEBs. The recharged energy of PEBs during each charging between the minimum charging demands and the available battery capacity, as shown in (13).  SOC PEB n , in  k P  in   SOC  t  1  SOC PEB PEB PEB n,k c c c S  SOC PEB min P PEB n , in  PEB n PEB n , in  S PEB n , (13) Based on (13), we utilize all the SOCnPEB and ,1 SOC PEB n ,in to estimate the other SOC 4.2.2 Optimisation Model for Coordinated PEB Charging Scenario with ESS: Here, the optimisation model (Model B) is utilized when ESS is installed and charging loads of PEBs are controllable. To ensure the global optimality of the control strategy, PEB charging strategy and ESS charging and discharging strategy are optimised integratedly in the model. The objective function is to minimise the electricity purchase costs ( EPC ), the life expenditure costs of ESS ( ESSC ) and the equivalent capacity charge ( ECC ) in the following optimising time horizon. The whole model is formulated as (14)-(24). min EPC + ESSC + ECC (14) where ECC is calculated by (3) and  PEB  TOU EPC     cnPEB , k Pc  t k k K  nN   ESS  TOU    Pc,ESS k   Pd, k  t k k K  kK  ESS π ESS ESSC= ESS  Pc,ESS t k c n kK subject to: (5)-(11) PEB ESS Ppeak   cnPEB  Pc,ESS , k Pc k  Pd, k  Lk , . Then, (13) can be rewritten in form of accumulation, i.e., (11). In (11), in  jn means parking in occurs no later than parking jn . And the middle part of each inequality in (11) represents the total recharged energy of PEB n during jn times parking. The first and last parts of each inequality in (11) respectively represent the lower and upper limits of total recharged energy of PEB n after jn times charging processes. Note that (13) PEB PEB +SOCn,i  1, n  N . and (11) both require SOCmix n The optimal charging state matrix of PEBs CPEB can be obtained by solving Model A. And CPEB should be (15) (16) (17) nN kK ESS 0  Pc,ESS k  Pc,max , k  K 0 P ESS d, k ESS k SOC  SOC P ESS d,max (18) (19) ,k K P  ESS ESS c, k c ESS k 1 (20) t  P ESS d, k t /  ESS c, k P ESS d, k +P P ESS d , k  K \ card  K  ESS SOCmin  SOCkESS  1, k  K kK in  I  n  , n  N PEB n ,in converted into the corresponding charging state matrix of charging piles CFCP before implementing the control strategy. This step can be achieved by checking the numbers of each PEB and the charging pile the PEB connected to.   max  P ESS ESS c, k c ESS c, k ESS d, k +P / ESS d, k ,P ESS d (21) (22) , k  K =0 (23) (24) In the above model, equation (15) calculates the electricity purchase costs for PEBFCS with ESS. In (15), EES EES and Pd,k denote the charging power and discharging Pc,k power of ESS at time interval k , respectively. Equation (16) approximately calculates the ESS life expenditure costs during the optimising time horizon through the recharged energy, where,  ESS , n ESS and cESS are the unit price of ESS, the number of charge-discharge life cycle of ESS and the charging efficiency of ESS, respectively. The peak load Ppeak here is constrained by (18) and the optimal solution must make (25) hold (similar to constraint (4) in Model A).   PEB ESS Ppeak  max   cnPEB  Pc,ESS (25) , k Pc k  Pd, k  Lk  k K  nN  For constraints (19)-(24), (19) and (20) restrict the charging power and discharging power of ESS within the maximum powers, respectively; (21) describe the energy state transition of ESS; (22) are the SOC range constraints for 5 ESS; (23) describe the mutual exclusion of charging and discharging states of ESS, i.e., avoid simultaneous charging and discharging of ESS; (24) is the energy balance constraint of ESS, since it is usually expected that the initial and final SOCs are same. In above constraints, nonlinear constraints (23) can be deleted from Model B without any sacrifice of optimality due to the charging and discharging efficiency. The detailed proof is omitted here and interested reader may need to refer to the appendix in [19], which is similar. Solving Model B, the optimal charging state matrix of PEBs CPEB , the optimal vector of charging power of ESS PcESS and the optimal vector of discharging power of ESS PdESS are accordingly obtained. 4.2.3 Optimisation Model for Uncoordinated PEB Charging Scenario with ESS: In this subsection’s optimisation model (Model C), ESS is taken into account and charging loads of PEBs cannot be scheduled. The expression of the objective function is same as (14), but the charging PEB profile of PEBs, i.e.,  cnPEB , is input parameters here. , k Pc nN The problem is modeled as (26) and (27). min EPC + ESSC + ECC (26) where EPC , ESSC and ECC are calculated by (15), (16) and (3), respectively. subject to: (18)-(22), (24). (27) The optimal vectors of charging and discharging powers of ESS, i.e., PcESS and PdESS , can be obtained by solving Model C. vn , k . To fix this, herein, we further propose a heuristics-based method. Firstly, we solve Model A without regard to constraints (7) and (8) and obtain a charging state matrix of PEBs CPEB PEB (elements: cnPEB and the PEB departure , k ). According to C time table, we can extract approximate charging time of all the PEBs during their each parking, denoted by CTn,in , in the following optimising time horizon (see (28)). Also, we treat ˆ PEB  sum(CPEB ) (elements: cˆ PEB ; sum(X) is a row vector C k whose elements are the sum of every column of X ) as the guideline of the number of PEB on charge at each time interval. ln ,in 1 k  ai ,in 1 cnPEB ,k determined. LX n, k  ln,in  CTn,in  k , an,in  k  ln,in Based on Tn ,in , cˆ PEB k (28) Secondly, inspired by [23] and [24], we define the laxity LX n, k (see (29)), which is used to describe the (29) and LX n, k , a heuristic algorithm is then developed to dispatch the PEB charging with the continuous charging constraints involved and generate the final charging state matrix of PEBs CPEB , given in Algorithm 1. Algorithm 1. PEB Charging Dispatching 1: Initialization: Set CPEB  0 . 2: for k  1 to K do 3: Find all the parked PEBs that are waiting for charging and compute their LX n, k . 4: 5: 6: 7: if LX k , n  0 then PEB PEB Set cnPEB , k  cn , k 1    cn , k  CT n ,in 1 1 . end if Sort PEBs according to the increasing LX n, k  0 and for PEBs with same LX n, k , sort them according to the decreasing CTn,in . 8: 9: ˆ PEB then if sum(CPEB )  C ˆ PEB  sum(CPEB ) PEBs according to the Select C PEB order in line 7 and set cnPEB , k  cn , k 1    n In the previous text, all the formulated models, i.e., Model A, Model B, and Model C, are mixed integer linear programming (MILP) models. However, different from Model C, Model A and Model B bear the extra computation burdens caused by the introduced auxiliary variables un , k and  n parks at the PEBFCS, and an ,in and ln ,in are therefore cnPEB , k  CTn ,i 4.3. Heuristics-based Method for Coordinated PEB Charging Scenario with ESS CTn,in  defined for parked PEBs that wait for charging, otherwise (if the PEB is on charge or has been charged), the laxity is invalid; 2) for a new time interval, laxity values should be updated; 3) for a given k , a specific in can be found if PEB 1 1 . 10: end if 11: end for Armed with CPEB got by Algorithm 1, we are then able to skip auxiliary variables un , k and vn , k and seek for the ESS charging and discharging strategy through Model C. Note that, in the heuristics-based method, the control strategies of PEBs and ESS are generated separately and the PEB coordinated charging is dispatched heuristically so that the final strategy is not necessarily the optimal strategy. 5. Case Studies 5.1. Parameter Settings The proposed strategies are tested on a PEBFCS with 10 fast charging piles, which provides charging service to a loop PEB line with 24 PEBs. The settings of the PEBFCS are on the basis of a practical PEBFCS in Chongqing, China. ESS in the PEBFCS is composed of lithium titanate batteries, and the discount rate, the life cycle, and the capacity charge for the station are respectively set as   5% ,   50 year and  Cap  14847 RMB/kW [25]. The circle length of the PEB route is 50 km. According to the central limit theorem, we assume the average speeds of PEBs (km/h) follow Gaussian distribution N  50,52  , and all SOCnPEB ,in (kWh) follow flexibility of the PEB charging. Note that 1) the laxity is 6 Table 1 Parameters settings of PEBs and ESS SnPEB (kWh) cPEB PcPEB (kW) PEB SOCmin S ESS (kWh) ESS Pc,max ESS Pd,max (kW) (kW) 324 0.92 117 0.2 800 1000 1000 cESS dESS n ESS ESS SOCmin 0.92 0.92 15000 [26] 0.2 Table 2 PEB departure time-table Time Number* Interval (min) 12 5 06:00-07:00 12 5 07:00-08:00 12 5 08:00-09:00 12 5 09:00-10:00 12 5 10:00-11:00 12 5 11:00-12:00 12 5 12:00-13:00 12 5 13:00-14:00 6 10 14:00-15:00 * The number of PEBs depart the PEBFCS at each time interval. Table 3 TOU electricity prices Time Valley Shoulder High Peak Price (RMB/kWh) 23:00-7:00 7:00-10:00, 15:00-18:00, 21:00-23:00 10:00-15:00, 18:00-21:00 11:00-13:00, 20:00-21:00 0.3818 0.8395 1.3222 1.4409 Gaussian distribution N  70, 72  . Specific parameters of PEBs and ESS are listed in Table 1, where the PEB parameters partially refer to those of BYD K9 pure electric bus [27]. The PEB departure time-table is listed in Table 2 and the TOU electricity tariffs are given in Table 3 [28]. The typically load profile in [29] is selected as the other load curve in the case. The optimising time horizon is set as 24h and card  K  is 288, i.e., t=5min . Based on the parameters settings above, we carry out the simulations when the unit price of ESS, i.e.,  ESS , is respectively 8000 RMB/kWh, 6000 RMB/kWh, 4000 RMB/kWh, and 2000 RMB/kWh. 5.2. Results and Analysis Numerical simulation results under uncoordinated and coordinated PEB charging scenarios are respectively summarized in Tables 4 and 5 (including the optimal and heuristics-based strategies), where AOC is the abbreviation of annual operation costs (including the ESS expenditure costs, equivalent capacity charge and electricity bills per year). Typical daily load profile, SOC curve of ESS and charging/discharging power curves of ESS under uncoordinated PEB charging scenario are given in Figs. 3 and 4, and the corresponding profiles under coordinated PEB charging scenario are shown in Figs. 5 and 6. All the Time Number* Interval (min) 15:00-16:00 16:00-17:00 17:00-18:00 18:00-19:00 19:00-20:00 20:00-21:00 21:00-22:00 22:00-23:00 Other 6 12 12 4 4 4 2 1 0 10 5 5 15 15 15 30 60 - problems were solved by the CPLEX package [30] on a laptop with an Intel Core i5 processor and 4 GB randomaccess memory. From Tables 4 and 5, by comparing with the results without ESS, it can be seen that the proposed control strategies effectively improve AOC of PEBFCS and peak loads both under coordinated and uncoordinated PEB charging scenarios. And as the price of ESS falls, AOC decreases. According to whether charging loads of PEBs are controllable and whether ESS is considered, there are four different AOCs under each price of ESS. These four AOCs demonstrate that the combination of coordination of PEB and ESS achieves the best optimality. Besides, when loads of PEB and ESS are both coordinated, it is observed that the controlled peak load first decreases and then rebounds as the price of ESS declines from 8000 RMB/kWh to 2000 RMB/kWh (both using optimal and heuristics-based strategies). The reason is that electricity price arbitrage makes more profits than to decrease the capacity charge when the price of ESS is sufficiently low. While under the uncoordinated PEB charging scenario, the controlled peak load remains constant with the change of the ESS price because all the capacity of ESS is used to shave the peak PEB charging loads during the high and peak TOU price periods, which brings larger benefits than ESS costs. Regarding the different results of optimal and heuristics-based strategies in Table 5, it can be observed that the heuristics-based strategy gives rise to a slight increasing of AOC and peak loads, but has a distinct advantage in computation speed. In practice, if t=5min , both optimal and heuristics-based strategies are applicable for a PEBFCS of such size, because all the computation time is much shorter than t . If the PEBFCS size increases or t decreases, the computation time could matter and the heuristics-based strategy is probably a more appropriate choice. For example, we double the PEBFCS size, i.e., the PEB number increases to 48 and the departure numbers in Table 2 are all doubled, and let t=3min , i.e., card  K  is 480, then the computation time of optimal strategy exceeds 7 . Table 4 Numerical simulation results under the uncoordinated PEB charging scenario AOC Peak Load Reduction of The Average Price of ESS AOC (with Reduction of Peak Load (with (without (without ESS) Peak Load Computation (RMB/kWh) ESS) (RMB) AOC (%) ESS) (kW) ESS) (RMB) (kW) (%) Time (s) 8000 3474289 8.58 1045.1 23.51 5.18 6000 3436731 9.57 1045.1 23.51 9.12 3800453 1366.4 4000 3374498 11.21 1045.1 23.51 9.34 2000 3312229 12.85 1045.1 23.51 9.23 Table 5 Numerical simulation results under the coordinated PEB charging scenario (optimal/heuristics-based) AOC Peak Load Reduction of The Average Price of ESS AOC (with Reduction of Peak Load (with (without (without ESS) Peak Load Computation (RMB/kWh) ESS) (RMB) AOC (%) ESS) (kW) ESS) (RMB) (kW) (%) Time (s) 1314657 8000 6.12/5.48 1057.1/1057.1 19.01/19.01 19.02/0.19 /1324911 1284581 6000 8.33/7.75 1009.2/1023.0 22.68/21.63 20.31/0.19 /1293059 1401710 1305.3 1236876 4000 11.76/11.24 1009.2/1023.2 22.68/21.61 22.24/0.21 /1243737 1181943 2000 15.68/15.31 1015.6/1024.7 22.19/21.50 24.51/0.21 /1187108 1400 1400 Without ESS With ESS 1000 800 600 1000 800 600 400 400 200 200 0 0 4 8 Without ESS With ESS 1200 Power(kW) Power(kW) 1200 12 16 20 0 0 0 4 8 12 16 20 0 Time(h) Time(h) a b Fig. 3. Typical daily load profiles of the local distribution transformer under uncoordinated PEB charging scenario (a) Price of ESS: 8000 RMB/kWh, (b) Price of ESS: 6000 RMB/kWh, 4000 RMB/kWh, and 2000 RMB/kWh 1000 1000 1 1 800 800 400 0.4 Charging Power of ESS Discharging Power of ESS SOC 200 0 0 4 8 12 Time(h) 16 0.2 20 0 0 Power(kW) 0.6 SOC Power(kW) 600 600 0.6 400 0.4 Charging Power of ESS Discharging Power of ESS SOC 200 0 SOC 0.8 0.8 0 4 8 12 Time(h) 16 0.2 20 0 0 a b Fig. 4. Typical daily SOC curves and charging/discharging power curves of ESS under uncoordinated PEB charging scenario (a) Price of ESS: 8000 RMB/kWh, (b) Price of ESS: 6000 RMB/kWh, 4000 RMB/kWh, and 2000 RMB/kWh 8 1400 1400 Without ESS With ESS (Optimal) With ESS (Heuristic) 1000 800 600 1000 800 600 400 400 200 200 0 0 4 8 12 16 20 Without ESS With ESS (Optimal) With ESS (Heuristic) 1200 Power(kW) Power(kW) 1200 0 0 0 4 8 a 20 0 1400 Without ESS With ESS (Optimal) With ESS (Heuristic) 1000 800 600 1000 800 600 400 400 200 200 0 4 8 12 16 20 Without ESS With ESS (Optimal) With ESS (Heuristic) 1200 Power(kW) 1200 Power(kW) 16 b 1400 0 12 Time(h) Time(h) 0 0 0 4 8 12 16 20 0 Time(h) Time(h) c d Fig. 5. Typical daily load profiles of the local distribution transformer under coordinated PEB charging scenario (a) Price of ESS: 8000 RMB/kWh, (b) Price of ESS: 6000 RMB/kWh, (c) Price of ESS: 4000 RMB/kWh, (d) Price of ESS: 2000 RMB/kWh 1000 Charging Power of ESS 1 Discharging Power of ESS SOC 0.8 0.6 400 0.4 200 4 8 12 Time(h) 16 20 0.6 400 0.4 200 0.2 0 600 0 0 0 0.2 0 4 8 a 20 0 0 1000 Charging Power of ESS 1 Discharging Power of ESS SOC 0.8 0.6 400 0.4 200 0.2 0 4 8 12 Time(h) 16 20 0 0 Power(kW) 600 Charging Power of ESS 1 Discharging Power of ESS 0.8 SOC 800 SOC 800 Power(kW) Time(h) 16 b 1000 0 12 600 0.6 400 0.4 200 0 SOC 0 Power(kW) 600 Charging Power of ESS 1 Discharging Power of ESS SOC 0.8 800 SOC Power(kW) 800 SOC 1000 0.2 0 4 8 12 Time(h) 16 20 0 c d Fig. 6. Typical daily SOC curves of ESS and charging/discharging power curves of ESS under coordinated PEB charging scenario (optimal) 9 (a) Price of ESS: 8000 RMB/kWh, (b) Price of ESS: 6000 RMB/kWh, (c) Price of ESS: 4000 RMB/kWh, (d) Price of ESS: 2000 RMB/kWh 1000 Charging Power of ESS 1 Discharging Power of ESS SOC 0.8 0.6 400 0.4 200 4 8 12 Time(h) 16 20 0.6 400 0.4 200 0.2 0 600 0 0 0 0.2 0 4 8 a 20 0 0 1000 Charging Power of ESS 1 Discharging Power of ESS SOC 0.8 0.6 400 0.4 200 0.2 0 4 8 12 Time(h) 16 20 0 0 Power(kW) 600 Charging Power of ESS 1 Discharging Power of ESS SOC 0.8 800 SOC 800 Power(kW) 16 b 1000 0 12 Time(h) 600 0.6 400 0.4 200 0 SOC 0 Power(kW) 600 Charging Power of ESS 1 Discharging Power of ESS SOC 0.8 800 SOC Power(kW) 800 SOC 1000 0.2 0 4 8 12 Time(h) 16 20 0 0 c d Fig. 7. Typical daily SOC curves of ESS and charging/discharging power curves of ESS under coordinated PEB charging scenario (heuristics-based) (a) Price of ESS: 8000 RMB/kWh, (b) Price of ESS: 6000 RMB/kWh, (c) Price of ESS: 4000 RMB/kWh, (d) Price of ESS: 2000 RMB/kWh t=3min but the time of heuristics-based strategy is within 5s. Thus, under this scenario with larger station size and more frequent strategy update rate, heuristics-based strategy still works while the optimal strategy becomes unpractical due to over-long calculation time. Comparing the load profiles in Figs. 3 and 5, we can see that 1) when there is no ESS, the coordinated PEB charging shifts the peak loads from day (high electricity prices) to night (low electricity prices); 2) when ESS is taken into account, the control strategies, including the optimal and heuristics-based (only for coordinated PEB charging scenario) strategies, smooth the load profiles under both two scenarios. Recall that under uncoordinated PEB charging scenario, ESS is made full use of and the main restriction of further costs decreasing is the capacity. Due to this, daily load profile, SOC curve of ESS and charging/discharging power curves of ESS are identical when the price of ESS is respectively 6000 RMB/kWh, 4000 RMB/kWh and 2000 RMB/kWh (see Figs. 3 and 4). The reason, why the profiles under the ESS price 8000 RMB/kWh differ, is that charging ESS in the shoulder TOU price period and discharging ESS in the peak TOU price period are not profitable at such an ESS price (can be observed by comparing subfigures in Figs. 3 and 4). In other words, there is a threshold value of ESS price, which is between 6000 RMB/kWh and 8000 RMB/kWh, and PEBFCS can make profits through electricity price arbitrage between shoulder and peak TOU prices if the ESS price is lower than the value, otherwise larger electricity price difference, e.g., the price difference between peak and valley TOU prices, is needed. Under coordinated PEB charging scenario, the subfigures in Fig. 5 illustrate that the total load profile of PEBFCS with ESS becomes more and more flatter as the price of ESS falls, and the subfigures in Figs. 6 and 7 show that the usage frequency of ESS trends to increase as the price of ESS falls. Besides, it is observed that charging and discharging of ESS both occur in the valley period of electricity price (see Figs. 6 and 7). And as a result, the night peak loads are further flattened, which implies that economic losses caused by energy consumption during the charging and discharging process are less than the reduction of capacity charge. Also, Figs. 5-7 illustrate that the load profiles, SOC curves of ESS, and charging/discharging power curves of ESS are similar when using optimal and heuristics-based strategies. 5.3. Sensitivity Analysis of ESS Capacity We study the impact of the ESS capacity on AOC when using the optimal control strategy under PEB coordinated charging scenario (the impacts are similar for different strategies and scenarios). The ESS prices 6000 RMB/kWh and 4000 RMB/kWh are selected for the sensitivity analysis, and the results are given in Fig. 8. It can 10 be seen that AOC decreases and converges to a constant as the ESS capacity increases. However, when the AOC stops declining, the extra capacity of idle ESS will lead to unnecessary investment, which is not included in EOA. So, in practice, the ESS capacity at the stop point of AOC decreasing is most appropriate for installation. In Fig. 8, the best ESS capacity at ESS prices 6000 RMB/kWh and 4000 RMB/kWh are both between 1000 kWh and 1200 kWh. x 10 [8] [9] 6 1.4 AOC (RMB) [7] ESS Price: 6000 RMB/kWh ESS Price: 4000 RMB/kWh [10] 1.35 [11] 1.3 [12] [13] 1.25 1.22 [14] 0 400 800 1200 1600 ESS Capacity (kWh) Fig. 8. Curves of sensitivity analysis of ESS capacity [15] 6. Conclusion This paper proposes coordinated charging and discharging strategies for a PEBFCS with ESS to optimise the economic benefits. The mathematical models are respectively formulated when the PEB charging loads are controllable or not. And when PEB charging loads are controllable, i.e., under coordinated PEB charging scenario, a heuristics-based strategy is further proposed to enhance the computation efficiency with a little sacrifice of optimality. We validate the effectiveness of the proposed strategies under multiple ESS prices through case studies, and analyze the impacts of ESS capacity on the PEBFCS operation costs. Further research includes the cooperation strategy for several PEBFCSs with ESS. 7. Acknowledgments This work was supported in part by the National Natural Science Foundation of China (51477082) and the National Key Research and Development Program (2016YFB0900103). [16] [17] [18] [19] [20] [21] [22] [23] 8. References [1] [2] [3] [4] [5] [6] Boulanger, A. G., Chu, A. C., Maxx, S., et al.: ‘Vehicle electrification: status and issues’, Proceedings of the IEEE, 2011, 99, (6), pp. 1116– 1138. Deng, J., Shi, J., Liu, Y. et al.: ‘Application of a hybrid energy storage system in the fast charging station of electric vehicles.’ IET Generation, Transmission & Distribution, 2016, 10, (4), pp. 1092-1097. Tang, Y., Zhong J., Bollen, M.: ‘Aggregated optimal charging and vehicle-to-grid control for electric vehicles under large electric vehicle population’, IET Generation, Transmission & Distribution, 2016, 10, (8), pp. 2012-2018. Lopes, J. A. P., Soares, F. J., Almeida, P. M. R.: ‘Integration of electric vehicles in the electric power system’, Proceedings of the IEEE, 2010, 99, (1), pp. 168-183. Vicini, R., Micheloud, O., Kumar H., et al.: ‘Transformer and home energy management systems to lessen electrical vehicle impact on the grid’, IET Generation, Transmission & Distribution, 2012, 6, (12) pp. 1202-1208. Fernandez, L. P., Román, T. G. S., Cossent, R., et al.: ‘Assessment of the impact of plug-in electric vehicles on distribution networks’, IEEE Transactions on Power Systems, 2011, 26, (1), pp. 206–213. [24] [25] [26] [27] [28] [29] [30] Amini, M. H., Boroojeni, K. G., Wang, C. J., et al.: ‘Effect of electric vehicle parking lots’ charging demand as dispatchable loads on power systems loss’, IEEE International Conference on Electro Information Technology, Grand Forks, North Dakota, USA, May, 2016. Dow, L., Marshall, M., Xu, L., et al.: ‘A novel approach for evaluating the impact of electric vehicles on the power distribution system’, IEEE Power and Energy Society General Meeting, Minneapolis, Minnesota, USA, July, 2010. Staats, P. T., Grady, W. M., Arapostathis, A., et al.: ‘A procedure for derating a substation transformer in the presence of widespread electric vehicle battery charging’, IEEE Transactions on Power Delivery, 1997, 12, (4), pp. 1562–1568. Singh, M., Kar, I., Kumar, P.: ‘Influence of EV on grid power quality and optimizing the charging schedule to mitigate voltage imbalance and reduce power loss’, Power Electronics and Motion Control Conference, Ohrid, Macedonia, Sep., 2010. Putrus, G. A., Suwanapingkarl, P., Johnston, D., et al.: ‘Impact of electric vehicles on power distribution networks’, IEEE Vehicle Power and Propulsion Conference, Dearborn, Michigan, USA, Sep., 2009. Xu, Z., Hu, Z., Song, Y., et al.: ‘Coordination of PEVs charging across multiple aggregators’, Applied Energy, 2014, 136, pp. 582–589. Rotering, N., Ilic, M.: ‘Optimal charge control of plug-in hybrid electric vehicles in deregulated electricity markets’, IEEE Transactions on Power Systems, 2011, 26, (3), pp. 1021–1029. Masoum, A. S., Deilami S., Moses, P. S., et al.: ‘Smart load management of plug-in electric vehicles in distribution and residential networks with charging stations for peak shaving and loss minimisation considering voltage regulation’, IET Generation, Transmission & Distribution, 2011, 5, (8), pp. 877–888. Yu, Z., Chen, S., Tong, L.: ‘An intelligent energy management system for large-scale charging of electric vehicles’, CSEE Journal of Power and Energy Systems, 2016, 2, (1), pp. 47-53. Yao, W., Zhao, J., Wen, F., et al.: ‘A hierarchical decomposition approach for coordinated dispatch of plug-in electric vehicles’, IEEE Transactions on Power Systems, 2013, 28, (3), pp. 2768–2778. Han, S., Han, S., Sezaki, K.: ‘Development of an optimal vehicle-togrid aggregator for frequency regulation’, IEEE Transactions on Smart Grid, 2010, 1, (1), pp. 65–72. Chen, H., Hu, Z., Xu, Z., et al.: ‘Coordinated charging strategies for electric bus fast charging stations’, IEEE Power Energy Society AsiaPacific Power and Energy Engineering Conference, Xi’an, Shaanxi China, Oct., 2016. Ding, H., Hu, Z., Song, Y.: ‘Value of the energy storage system in an electric bus fast charging station’, Applied Energy, 2015, 157, pp. 630– 639. Sun, B., Dragičević, T., Freijedo, F. D., et al.: ‘A control algorithm for electric vehicle fast charging stations equipped with flywheel energy storage systems’, IEEE Transactions on Power Electronics, 2016, 31, (9), pp. 6685–6674. Ding, H., Hu, Z., Song, Y., et al.: ‘Coordinated control strategy of energy storage system with electric vehicle charging station’, IEEE Transportation Electrification Conference and Expo, Asia-Pacific, Beijing, China, Aug., 2014. Jin, C., Tang J., Ghosh, P.: ‘Optimizing electric vehicle charging with energy storage in the electricity market’, IEEE Transactions on Smart Grid, 2013, 4, (1), pp. 311–320. Petersen, M. K., Edlund, K., Hansen, L. H., et al.: ‘A taxonomy for modeling flexibility and a computationally efficient algorithm for dispatch in smart grids’, American Control Conference, Washington, D.C., USA, June, 2013, pp. 1150-1156. Xu, Y., Pan, F., Tong, L.: ‘Dynamic scheduling for charging electric vehicles: A priority rule’, IEEE Transactions on Automatic Control, 2016, 61, (12), pp. 4094-4099. Luo, Z., Hu, Z., Song, Y., et al.: ‘Optimal coordination of plug-in electric vehicles in power grids with cost-benefit analysis—Part I: Enabling techniques’, IEEE Transactions on Power Systems, 2013, 28, (4), pp. 3546-3555. ‘AceOn Group’ http://www.aceongroup.com/divisions, accessed 27 Oct. 2017. ‘BYD K9-CPTDB Wiki’, https://cptdb.ca/wiki/index.php/BYD_Auto _K9, accessed 17 Feb. 2017. ‘The Industrial Time-of-use Electricity Prices in Beijing’, http://www.docin.com/p-1140670657.html, accessed 17 Feb. 2017. Xu, Z., Hu, Z., Song, Y., et al.: ‘Coordinated charging strategy for PEVs charging stations’, IEEE Power and Energy Society General Meeting, San Diego, California, USA, July, 2012. ‘ILOG CPLEX Homepage’, http://www.ilog.com, accessed 17 Feb. 2017. 11 12
3cs.SY
CRYSTALS AND TREES: QUASI-KASHIWARA OPERATORS, MONOIDS OF BINARY TREES, AND ROBINSON–SCHENSTED-TYPE CORRESPONDENCES arXiv:1702.02998v2 [math.CO] 1 Feb 2018 ALAN J. CAIN AND ANTÓNIO MALHEIRO Abstract. Kashiwara’s crystal graphs have a natural monoid structure that arises by identifying words labelling vertices that appear in the same position of isomorphic components. The celebrated plactic monoid (the monoid of Young tableaux), arises in this way from the crystal graph for the q-analogue of the general linear Lie algebra gln , and the socalled Kashiwara operators interact beautifully with the combinatorics of Young tableaux and with the Robinson–Schensted–Knuth correspondence. The authors previously constructed an analogous ‘quasi-crystal’ structure for the related hypoplactic monoid (the monoid of quasi-ribbon tableaux), which has similarly neat combinatorial properties. This paper constructs an analogous ‘crystal-type’ structure for the sylvester and Baxter monoids (the monoids of binary search trees and pairs of twin binary search trees, respectively). Both monoids are shown to arise from this structure just as the plactic monoid does from the usual crystal graph. The interaction of the structure with the sylvester and Baxter versions of the Robinson–Schensted–Knuth correspondence is studied. The structure is then applied to prove results on the number of factorizations of elements of these monoids, and to prove that both monoids satisfy non-trivial identities. 1. Introduction Kashiwara’s notion of a crystal basis [Kas90, Kas91] (informally, a basis of a representation for a suitable algebra on which the generators have a particularly straightforward action), gives rise, via tensor products, to the crystal graph. This graph has a natural monoid structure where the vertices are viewed as words in the free monoid, and words are identified when they lie in the same places in isomorphic components of this graph. In the case of the q-analogue of the general linear Lie algebra gln , the monoid obtained is the celebrated plactic monoid, whose elements can be identified with Young tableaux and which appears in such diverse contexts as symmetric functions [Mac08], representation theory [Gre06], algebraic combinatorics [Lot02], algebraic geometry [Ful97], Kostka–Foulkes polynomials [LS81, LS78], Schubert polynomials [LS85, LS90], and musical theory [Jed11]. (Indeed, since The first author was supported by an Investigador FCT fellowship (IF/01622/2013/CP1161/CT0001). For both authors, this work was partially supported by by the Fundação para a Ciência e a Tecnologia (Portuguese Foundation for Science and Technology) through the project UID/MAT/00297/2013 (Centro de Matemática e Aplicações), and the project PTDC/MHC-FIL/2583/2014. The authors thank the anonymous referee for carefully reading the paper and for valuable comments, and, in particular, for making the observation contained in Remark 3.4. 1 2 ALAN J. CAIN AND ANTÓNIO MALHEIRO Lascoux and Schützenberger’s [LS81] seminal study, so many connections have emerged that Schützenberger proclaimed it ‘one of the most fundamental monoids in algebra’ [Sch97].) The beautiful interaction of the crystal graph and the associated Kashiwara operators with the combinatorics of Young tableaux and the Robinson–Schensted correspondence is such an important and powerful combinatorial tool that in this context the Kashiwara operators and crystal graph are sometimes simply referred to as the ‘coplactic’ operators and ‘coplactic’ graph (see, for instance, [Lot02, § 5.5] and [vL01]). In a previous paper [CM17], the present authors constructed an analogue of this crystal structure for the monoid of quasi-ribbon tableaux: the so-called hypoplactic monoid. The hypoplactic monoid emerged from the theory of non-commutative symmetric functions and quasi-symmetric functions [KT97, KT99, Nov00]. Quasi-ribbon functions form a basis for the ring of quasi-symmetric functions, just as the Schur polynomials form a basis for the ring of symmetric polynomials. The quasi-ribbon functions are indexed by the so-called quasi-ribbon tableaux, which can be identified with the elements of the hypoplactic monoid. As shown in the authors’ previous paper, much of the elegant interaction of the crystal graph, Kashiwara operators, Young tableaux, and the plactic monoid is echoed in the interaction of the analoguous quasi-crystal graph, quasi-Kashiwara operators, quasi-ribbon tableaux, and the hypoplactic monoid. Thus both plactic and hypoplactic monoids can be defined by factoring the free monoid by a relation that can be defined in three equivalent ways: 1. Defining relations: the relation is the smallest congruence containing a given set of defining relations. 2. Insertion: the relation is the kernel of the map that takes a word to a ‘tableau-type’ object computed by an insertion algorithm. 3. Crystals: the relation arises from isomophisms of connected components of a ‘crystal-type’ graph. The main aim of this paper is to develop an analoguous of the crystaltype structure for the sylvester [HNT05] and Baxter [Gir12] monoids, whose elements are respectively right strict binary search trees and pairs of twin binary search trees. To be more precise: the existing literature contains equivalent definitions for these monoid using defining relations and insertions algorithms (approaches 1 and 2 above). This paper develops and applies the crystalline definition (approach 3 above). In fact, the crystal-type graph for the sylvester and Baxter monoids are the same as for the hypoplactic monoid: it is the notion of isomorphism that has to be modified. This paper develops an abstract framework for this modified notion of isomorphism (Section 5), and then applies it to the sylvester and Baxter monoids (Sections 6 and 7). This framework is developed from a slightly different perspective from the authors’ earlier paper on the hypoplactic monoid. Essentially, the difference is that rather than having finitely many Kashiwara and ‘quasi-Kashiwara’ operators, countably many are allowed, and the resulting monoids have infinite rank rather than finite rank. This is a step away from the representationtheoretic origin of crystal bases, but is actually a much more natural context CRYSTALS AND TREES 3 for a combinatorially-focussed study. More importantly, it seems to be the correct starting-point to crystallize other monoids connected with combinatorics, such as sylvester and Baxter monoids. In order to discuss the advantages of these modified graphs and to clarify what properties a ‘crystal structure’ for the sylvester and Baxter monoids should enjoy, Section 3 briefly recapitulates some of the existing theory. Although some of this material is in existing literature, the important differences between the finiteand infinite-rank cases are often glossed over. The resulting crystal-type structure for the sylvester and Baxter monoids turns out to interact neatly with the sylvester and Baxter versions of the Robinson–Schensted correspondence, and yield new results. 2. Preliminaries and notation Much of the notation used in this paper is drawn from [CM17], to which this paper is a sequel. For definitions and notation for alphabets, words, presentations, standard words, standardization, partitions, compositions, and weight see [CM17, § 2]. For Young tableaux, the Schensted insertion algorithm, and the definition of the plactic monoid plac and rank-n plactic monoid placn using these, see [CM17, § 3.1]; note however that the present paper uses Pplac (u) and Qplac (u) respectively for the Young tableau and recording tableau computed from u ∈ A∗ and calls these the plactic P- and Q-symbols of u. Similarly Phypo (u) and Qhypo (u) are respectively the quasiribbon tableau and recording ribbon computed from u ∈ A∗ and calls these the hypoplactic P- and Q-symbols of u. This is to keep notation uniform with the analogous notions for the sylvester and Baxter monoids. Note that the defining relations Rplac given in [CM17, § 1] (known as the Knuth relations) are the reverse of the ones given in [CGM]. This is because, in the context of crystal bases, the convention for tensor products gives rise to a ‘plactic monoid’ that is actually anti-isomorphic to the usual notion of plactic monoid. Since [CM17] and the present paper are mainly concerned with combinatorics, rather than representation theory, they follow Shimozono [Shi05] in using the convention that is compatible with the usual notions of Young tableaux and the Robinston–Schensted correspondence. For quasi-ribbon tableaux and the Schensted insertion algorithm, and the definition of the hypoplactic monoid hypo and rank-n hypoplactic monoid hypon using these, see [CM17, § 4]. 3. Infinite-rank crystals and quasi-crystals This section recalls the definitions of the Kashiwara and quasi-Kashiwara operators, defines the infinite-rank crystal and quasi-crystal graphs, and shows that isomorphisms between components of these graphs give rise, respectively to the plactic and hypoplactic monoids. Many of the proofs in this section are not given in full, since they are straightforward modifications of the proofs for finite-rank crystal and quasi-crystal graphs given in [CM17, §§ 3 and 5]. 4 ALAN J. CAIN AND ANTÓNIO MALHEIRO 3.1. Crystal graph and the plactic monoid. Let i ∈ N and define the Kashiwara operators ẽi and f˜i on A as follows: ẽi (i + 1) = i, f˜i (i) = i + 1, ẽi (x) is undefined for x 6= i + 1; f˜i (x) is undefined for x = 6 i. The definition is extended to A∗ \ A by the recursion ( ẽi (u) v if ǫ̃i (u) > φ̃i (v); ẽi (uv) = u ẽi (v) if ǫ̃i (u) ≤ φ̃i (v), ( f˜i (u) v if ǫ̃i (u) ≥ φ̃i (v); f˜i (uv) = u f˜i (v) if ǫ̃i (u) < φ̃i (v), where ǫ̃i and φ̃i are auxiliary maps defined by  ǫ̃i (w) = max k ∈ N ∪ {0} : ẽi · · · ẽi (w) is defined ; | {z } k times  φ̃i (w) = max k ∈ N ∪ {0} : f˜i · · · f˜i (w) is defined . | {z } k times (Note that this definition is in a sense the mirror image of [KN94, Theorem 1.14], because of the choice of definition for readings of tableaux used in this paper. Thus the definition of ẽi and f˜i is the same as in [CM17] and [Shi05, p. 8].) The operators ẽi and f˜i respectively increase and decrease weight whenever they are defined, in the sense that if ẽi (u) is defined, then wt(ẽi (u)) > wt(u), and if f˜i (u) is defined, then wt(f˜i (u)) < wt(u). Thus ẽi and f˜i are respectively called the Kashiwara raising and lowering operators. Furthermore, a word on which none of the ẽi is defined is said to be highest-weight. The crystal graph for plac, denoted Γ(plac), is the directed labelled graph with vertex set A∗ and, for u, v ∈ A∗ , an edge from u to v labelled by i if and only if v = f˜i (u) (or, equivalently, u = ẽi (v)). Figure 1 shows part of the crystal graph Γ(plac). For any w ∈ A∗ , let Γ(plac, w) denote the connected component of Γ(plac) that contains the vertex w. For n ∈ N, the crystal graph for placn , denoted Γ(placn ), is the subgraph of Γ(plac) induced by A∗n . Notice that edge labels in Γ(placn ) must lie in {1, . . . , n − 1}, since for i ≥ n, if f˜i (u) is defined, then at least one of u and f˜i (u) does not lie in A∗n . Define a relation ≈ on A∗ as follows: u ≈ v if and only if there is a labelled digraph isomorphism θ : Γ(plac, u) → Γ(plac, v) with θ(u) = v. That is, u ≈ v if u and v lie in corresponding places in isomorphic components of Γ(plac). It is worth emphasizing that the definition of ≈ is the crucial point of divergence from the standard approach to crystals: normally, as in [CGM, § 2.4], ≈ is defined in terms of weight-preserving isomorphisms. Proposition 3.1 ([CGM, Proposition 2.6]). The relation ≈ is a congruence on A∗ . (Strictly speaking, the preceding result follows by modifying the proof of [CGM, Proposition 2.6] by replacing An with A and ignoring the discussion of weight.) CRYSTALS AND TREES 5 2111 1 2 3111 1 2112 3 3112 1 3122 1 3222 1 2 4111 3 1 4112 3 1 4122 2113 4 2 5111 2 4 4113 2 1 5112 6111 3 3113 1 5 2122 3123 1 2 2114 3 2 3114 2123 4 1 2115 2 3 2133 2124 Figure 1. Part of the connected component Γ(plac, 2111). Theorem 3.2 ([Lot02, Theorem 5.5.1]). Let u, v ∈ A∗ . (1) Qplac (u) = Qplac (ẽi (u)) if ẽi (u) is defined and similarly for f˜i . (2) Suppose u ≡plac v. Then ẽi (u) is defined if and only if ẽi (v) is defined, in which case ẽi (u) ≡plac ẽi (v) and similarly for f˜i . (To be strict, [Lot02, Theorem 5.5.1] is concerned only with words in A∗n and i ∈ {1, . . . , n − 1}. To obtain the result as stated here, one simply chooses n to be bigger than the maximum symbol that appears in u or v.) Proposition 3.3. The relations ≡plac and ≈ coincide. Proof. Let u ∈ A∗ and i ∈ N. By iterated application of Theorem 3.2(2), if u, v ∈ A∗ are such that u ≡plac v, then there is a labelled digraph isomorphism θ : Γ(plac, u) → Γ(plac, v) with θ(u) = v. For the converse, let u, v ∈ A∗ and suppose there is a labelled digraph isomorphism θ : Γ(plac, u) → Γ(plac, v) with θ(u) = v. If ẽi (u) is defined for some i ∈ N, so is ẽi (v) (since θ is a labelled digraph isomorphism); thus one can replace u and v with ẽi (u) and ẽi (v). Eventually one obtains highest weight words u′ and v ′ . By the proof of [Lot02, Proposition 5.5.2], u′ and v ′ are Yamanouchi words. Suppose n is the largest symbol appearing in u′ . Then |u′ |n is the length of the longest directed path in Γ(plac) made up of edges labelled by n starting at |u′ | u′ , or equivalently, φ̃n (u′ ). Furthermore, |u′ |n−1 = |f˜n n (u′ )|n−1 is equal to |u′ | φ̃n−1 (f˜n n (u′ )). Continuing in this way, one sees that for each i ∈ {1, . . . , n}  ′ ′ |u′ | |u′ | |u′ |i = |f˜i+1i+1 · · · f˜n|u |n (u′ )|i = φ̃i f˜i+1i+1 · · · f˜n|u |n (u′ ) . Hence wt(u′ ) is determined by the connected component Γ(plac, u′ ). Similarly, wt(v ′ ) is determined by the connected component Γ(plac, v ′ ). 6 ALAN J. CAIN AND ANTÓNIO MALHEIRO Since the components Γ(plac, u′ ) and Γ(plac, v ′ ) are isomorphic, wt(u′ ) = wt(v ′ ). Thus, since u′ and v ′ are Yamanouchi words, Pplac (u′ ) and Pplac (v ′ ) are both equal to the tableaux of shape wt(u′ ) = wt(v ′ ) containing only symbols i on row i. Hence u′ ≡plac v ′ . By iterated application of Theorem 3.2(2), w ≡plac θ(w) for all w ∈ Γ(plac, u).  In the finite rank case, the analogy of Proposition 3.3 does not hold: for example, the connected components Γ(placn , ε) and Γ(placn , n(n − 1) · · · 21) both consist of single vertices and thus are isomorphic as labelled digraphs. (Thus [Lot02, Proposition 5.5.2] is technically false as stated.) This is the crucial difference between the infinite-rank and finite-rank cases: In the infinite-rank case, all necessary information about weights is contained in the abstract graph Γ(plac) and so it suffices to consider labelled digraph isomorphisms between connected components. However, in the finite-rank case, the abstract graph Γ(placn ) does not contain sufficient information to define the plactic monoid placn , and so it is necessary to restrict to weightpreserving labelled digraph isomorphisms. Remark 3.4. In fact, the abstract graph Γ(placn ) is the crystal graph for sln . This corresponds to the fact that quotienting by the full column n(n − 1) · · · 21 projects from isomorphism classes of gln crystal graphs to isomorphism classes of sln crystal graphs. The only extra information one requires to reverse this projection is how many full columns are present. 3.2. Quasi-crystal graph and the hypoplactic monoid. Let i ∈ N. Define the quasi-Kashiwara operators ëi and f¨i on A∗ as follows: Let u ∈ A∗ . • If u contains a subsequence (i + 1)i, both ëi (u) and f¨i (u) are undefined. • If u does not contain a subsequence (i + 1)i, but u contains at least one symbol i+1, then ëi (u) is the word obtained from u by replacing the left-most symbol i + 1 by i; if u contains no symbol i + 1, then ëi (u) is undefined. • If u does not contain a subsequence (i + 1)i, but u contains at least one symbol i, then f¨i (u) is the word obtained from u by replacing the right-most symbol i by i + 1; if u contains no symbol i, then f¨i (u) is undefined. (As in [CM17], a subsequence may be made up of non-consecutive letters; thus the phrase ‘contains a subsequence (i + 1)i’ is equivalent to ‘contains a symbol i + 1 somewhere to the left of a symbol i’.) For example, ë2 (3123) is undefined since 3123 contains the subsequence 32; f¨2 (3131) is undefined since 3131 does not contains a symbol 2; f¨1 (3113) = 3123. Lemma 3.5 ([CM17, Lemma 1]). For all i ∈ N, the operators ëi and f¨i are mutually inverse, in the sense that if ëi (u) is defined, u = f¨i (ëi (u)), and if f¨i (u) is defined, u = ëi (f¨i (u)). The operators ëi and f¨i respectively increase and decrease weight whenever they are defined, in the sense that if ëi (u) is defined, then wt(ëi (u)) > CRYSTALS AND TREES 7 1212 2 1213 3 2 1214 4 1313 2 1215 5 1314 2 1216 6 1217 1 3 4 1323 1315 2 5 1316 1 3 1414 3 1 1324 3 1 1 4 1325 4 1415 2323 3 1424 1 3 2324 Figure 2. Part of the connected component Γ(hypo, 1212). wt(u), and if f¨i (u) is defined, then wt(f¨i (u)) < wt(u). Thus ëi and f¨i are respectively called the quasi-Kashiwara raising and lowering operators. Furthermore, a word on which none of the ëi is defined is said to be highestweight. (Strictly speaking, it is necessary to distinguish words that are highest-weight with respect to the operators ëi and words that are highestweight with respect to the operators ẽi . Since the ẽi are not mentioned in the remainder of the paper, the term ‘highest-weight’ will always be with respect to the operators ëi .) The quasi-crystal graph for hypo, denoted Γ(hypo), is the directed labelled graph with vertex set A∗ and, for u, v ∈ A∗ , an edge from u to v labelled by i if and only if v = f˜i (u) (or, equivalently, u = ẽi (v)). Figure 2 shows part of the crystal graph Γ(hypo). For any w ∈ A∗ , let Γ(hypo, w) denote the connected component of Γ(hypo) that contains the vertex w. The quasi-crystal graph for hypon , denoted Γ(hypon ), is the subgraph of Γ(hypo) induced by A∗n . Notice that edge labels in Γ(hypon ) must lie in {1, . . . , n − 1}, since for i ≥ n, if f¨i (u) is defined, then at least one of u and f¨i (u) does not lie in A∗n . Define a relation ∼ on A∗ as follows: u ∼ v if and only if there is a labelled digraph isomorphism θ : Γ(hypo, u) → Γ(hypo, v) with θ(u) = v. That is, u ∼ v if u and v lie in corresponding places in isomorphic components of Γ(hypo). For instance, as can be seen in Figure 3, 1241 ∼ 2141. Again, note that the definition of ∼ is the point of divergence from the previous definition in [CM17], where ∼ is defined in terms of weight-preserving isomorphisms. 8 ALAN J. CAIN AND ANTÓNIO MALHEIRO By the proof of [CM17, Proposition 4], replacing An with A and ignoring the discussion of weight, the relation ∼ is a congruence on A∗ . Proposition 3.6 ([CM17, Proposition 5]). Let u ∈ A∗ and i ∈ N. (1) If ëi (u) is defined, then std(ëi (u)) = std(u). (2) If f¨i (u) is defined, then std(f¨i (u)) = std(u). In contrast to Proposition 3.6, the usual Kashiwara operators do not preserve standardization: ẽ2 (1322) = 1323, but std(1322) = 1423 6= 1324 = std(1323). Proposition 3.7. The relations ≡hypo and ∼ coincide. Proof. Let u, v ∈ A∗ . Suppose that u ≡hypo v. Using the reasoning that leads to the proof of [CM17, Proposition 8], but replacing An by A, proves that u ∼ v. Now suppose that there is a labelled digraph isomorphism θ : Γ(hypo, u) → Γ(hypo, v) with θ(u) = v. Then there is a sequence of operators ëi1 , . . . , ëik such that the words u′ = ëi1 · · · ëik (u) and v ′ = ëi1 · · · ëik (v) are highestweight. By the same reasoning as in Proposition 3.3, wt(u′ ) and wt(v ′ ) are determined by the isomorphic connected components Γ(hypo, u) and Γ(hypo, v), and thus wt(u′ ) = wt(v ′ ). Since u′ ≡hypo C(Phypo (u′ )), and v ′ ≡hypo C(Phypo (v ′ )) by [CM17, Lemmata 5 and 6] (replacing An by A), and C(Phypo (u′ )) and C(Phypo (v ′ )) are highest-weight (since ≡hypo ⊆ ∼hypo by the first part) and have the same weight, C(Phypo (u′ )) = C(Phypo (v ′ )) by [CM17, Corollary 3]. Hence u′ ≡hypo C(Phypo (u′ )) = C(Phypo (v ′ )) ≡hypo v ′ . By [CM17, Lemma 6(2)], applying f¨i to ≡hypo -related words yields ≡hypo related words. Hence u ≡hypo v.  In the finite rank case, the analogy of Proposition 3.7 does not hold: the connected components Γ(hypon , ε) and Γ(hypon , n(n−1) · · · 21) both consist of single vertices and thus are isomorphic as labelled digraphs. This is again the crucial difference between the infinite-rank and finite-rank cases: In the infinite-rank case, all necessary information about weights is contained in the abstract graph Γ(hypo) and so it suffices to consider labelled digraph isomorphisms between connected components. However, in the finite-rank case, the abstract graph Γ(hypon ) does not contain sufficient information, and so it is necessary to restrict to weight-preserving labelled digraph isomorphisms. There is a very neat interaction between the structure of Γ(hypo) and the hypoplactic analogue of the Robinson–Schensted correspondence; the proof for the finite-rank case applies in the infinite-rank case: Theorem 3.8 ([CM17, Theorem 2]). Let u, v ∈ A∗ . The words u and v lie in the same connected component of Γ(hypo) if and only if Qhypo (u) = Qhypo (v). Thus the recording ribbons Qhypo (·) produced by the insertion algorithm (see the exposition in [CM17, § 4]) index connected components of Γ(hypo). However, in the infinite-rank case, connected components are also indexed by standard words, as shown in Corollary 3.10 below. Lemma 3.9. For any u ∈ A∗ , the equality Qhypo (std(u)) = Qhypo (u) holds. CRYSTALS AND TREES Γ(hypo, 1212) }| z 1212 { 2 2 1215 3 2 3 1314 1 4 1323 2151 1221 { 1231 2 2141 1313 Γ(hypo, 1221) }| z 2 2131 1214 4 2121 { 2 1213 3 Γ(hypo, 2121) }| z 9 3 3131 2 3 3141 2 1241 1 4 3231 1251 1331 2 3 1341 1 1332 Figure 3. The isomorphic components Γ(hypo, 1212), Γ(hypo, 2121), and Γ(hypo, 1221) of the quasi-crystal graph Γ(hypo). Proof. Let u = u1 · · · uk and std(u) = s1 · · · sk , where uh , sh ∈ A. Since std(u1 · · · uk ) = std(s1 · · · sk ), it follows that std(u1 · · · uh ) = std(s1 · · · sh ) for all h (this is immediate from the definition of standardization [Nov00, Lemma 2.2]). Thus, by [Nov00, Theorems 4.12 and 4.16], Qhypo (u1 · · · uh ) and Qhypo (s1 · · · sh ) both have shape DC(std(u1 · · · uh )−1 ) for all h. The sequence of these shapes determines where new symbols are inserted during the computation of Phypo (u) and Qhypo (std(u)) by [CM17, Algorithm 4], and so Qhypo (u) = Qhypo (std(u)).  Corollary 3.10. In every connected component of Γ(hypo), there is exactly one standard word, and so for all u, v ∈ A∗ , the words u and v lie in the same connected component if and only if std(u) = std(v). Proof. By Lemma 3.9 and Theorem 3.8, u and std(u) are in the same component of Γ(hypo), so each connected component contains at least one standard word. Suppose u′ is a standard word in the same component of Γ(hypo) as u. Then it is possible to apply a sequence of quasi-Kashiwara operators to u and obtain u′ . By Proposition 3.6, quasi-Kashiwara operators preserve standardization; thus std(u) = std(u′ ) and so u = u′ since u and u′ are standard words. The last claim in the statement follows immediately.  Remark 3.11. As noted in [CM17], a related notion of ‘quasi-crystal’ is found in Krob and Thibon [KT99]; see also [Hiv00]. However, the Krob– Thibon quasi-crystal describes the restriction to quasi-ribbon tableaux (or rather corresponding to quasi-ribbon tableaux) of the action of the usual Kashiwara operators: it does not apply to all words and so does not yield a definition of ≡hypo via isomorphisms of components. 10 ALAN J. CAIN AND ANTÓNIO MALHEIRO 4. Binary trees and the sylvester and Baxter monoids This section gathers the necessary definitions and background on binary search trees, the sylvester and Baxter monoids, and the analogues of the Robinson–Schensted correspondence. For further background on the sylvester monoid, see [HNT05]; for the Baxter monoid, see [Gir12]. 4.1. Binary trees and insertion. A left strict binary search tree is a labelled rooted binary tree where the label of each node is strictly greater than the label of every node in its left subtree, and less or equal to than the label of every node in its right subtree. A right strict binary search tree is a labelled rooted binary tree where the label of each node is greater than or equal to the label of every node in its left subtree, and strictly less than the label of every node in its right subtree. The following are examples of, respectively, left strict and right strict binary search trees: 5 4 4 (4.1) 1 5 4 2 7 1 6 2 1 5 4 1 5 . 6 5 7 5 A binary search tree is standard if the labels of its nodes are exactly the integers from 1 to the number of nodes in the tree. The shape of a binary search tree T , denoted Sh(T ), is simply its underlying unlabelled rooted binary tree. The notion of shape will be important later in the paper. A decreasing tree is a labelled rooted binary tree where the label of each node is greater than the label of its children. An increasing tree is a labelled rooted binary tree where the label of each node is less than the label of its children. The following are examples of, respectively, standard increasing and standard decreasing trees: 1 10 2 (4.2) 4 3 10 7 6 9 9 5 7 4 8 2 3 1 . 6 5 8 The left-to-right infix traversal (or simply the infix traversal) of a rooted binary tree T is the sequence that ‘visits’ every node in the tree as follows: it recursively performs the infix traversal of the left subtree of the root of T , then visits the root of T , then recursively performs the infix traversal of the right subtree of the root of T . Thus the infix traversal of any binary tree with the same shape as the right-hand tree in (4.1) visits nodes as follows: (4.3) . The left-to-right postfix traversal, or simply the postfix traversal, of a rooted binary tree T is the sequence that ‘visits’ every node in the tree as follows: CRYSTALS AND TREES 11 it recursively perform the postfix traversal of the left subtree of the root of T , then recursively perform the postfix traversal of the right subtree of the root of T , then visits the root of T . Thus the postfix traversal of any binary tree with the same shape as the right-hand tree in (4.1) visits nodes as follows: (4.4) . The infix reading In(T ) (respectively, postfix reading Post(T )) of a labelled binary search tree T is defined to be the word obtained by listing the labels of the nodes visited during the infix (respectively, postfix) traversal. For example, the infix and postfix readings of the right-hand tree in (4.1) are, respectively, 1124455567 and 1142557654. Note that the weights of the infix and postfix readings of a given binary search tree are the same; both weights are simply the tuple that describes the number of each symbol in A appearing in the tree. Thus define the weight of a labelled binary search tree to be the weight of these readings. The following result is immediate from the definition of a binary search tree, but it is used frequently: Proposition 4.1. For any (left or right strict) binary search tree T , the infix reading In(T ) is always the unique weakly increasing word with the same weight as T . Let T be a rooted binary tree and let x1 , . . . , xm be the nodes of T in the order visited in an infix traversal. Let i1 , . . . , ik−1 be such that the xih are precisely the nodes of T that have non-empty left subtrees. The left interval partition of T is the partition o n {x1 , . . . , xi1 −1 }, {xi1 , . . . , xi2 −1 }, . . . , {xik−2 , . . . , xik−1 −1 }, {xk−1 , . . . , xm } ; {z } | {z } {z } | {z } | | 1st left interval 2nd left interval k − 1-th left interval k-th left interval the h-th part of this partition is the h-th left interval of T . Let j1 , . . . , jℓ−1 be such that the xjh are precisely the nodes of T that have non-empty right subtrees. The right interval partition of T is the partition o n {x1 , . . . , xj1 } , {xj1 +1 , . . . , xj2 }, . . . , {xjℓ−2 +1 , . . . , xjℓ−1 }, {xℓ−1 , . . . , xm } ; {z } | {z } | {z } {z } | | 1st right interval 2nd right interval ℓ − 1-th right interval ℓ-th right interval the h-th part of this partition is the h-th right interval of T . Consider the left and right intervals of a binary tree with the same shape as the right-hand tree in (4.1). Then the nodes lying in the left intervals and right intervals of this tree are, respectively, those linked by solid lines in the left-hand and right-hand diagrams below: 4th 3rd (4.5) 6th 2nd 1st 4th 5th 1st 2nd 3rd 5th 12 ALAN J. CAIN AND ANTÓNIO MALHEIRO In a sense, the lengths of the left and right intervals of a binary seach tree are analogous to the lengths of the rows in a quasi-ribbon tableau. However, the lengths of left and right intervals do not determine the shape of the tree, for the trees and both have left interval length 2, 2 and right interval lengths 1, 2, 1: ; . The canopy of a binary tree T , denoted cnp(T ) is the word over {0, 1} obtained by doing an infix traversal of the nodes of T and outputting a 1 when an empty left subtree is encountered and 0 when an empty right subtree is encountered, then omitting the 1 from the start and the 0 from the end of the resulting word. (These symbols correspond to the empty left subtree of the leftmost node and the empty right subtree of the rightmost node.) For example, the canopies of the two binary trees in (4.1) are, respectively, 110101100 and 001010011: 5 4 (4.6) 1 1 1 4 1 4 6 2 0 1 2 7 0 1 1 5 5 0 1 1 0 0 1 5 4 0 1 5 5 0 0 1 . 6 1 7 0 Let TL and TR be binary trees. Then (TL , TR ) is a pair of twin binary trees if cnp(TL ) and cnp(TR ) are complementary, in the sense that for all i, the i-th symbols of cnp(TL ) and cnp(TR ) are unequal. Now let TL be a left strict binary search tree and let TR be a right strict binary search tree. Then (TL , TR ) is a pair of twin binary search trees if In(TL ) = In(TR ) and cnp(TL ) and cnp(TR ) are complementary (that is, the underlying binary trees form a pair of twin binary trees). Note that the binary search trees in (4.1) form a pair of twin binary search trees, since they have the same infix reading (that is, 1124455567), and complementary canopies, as shown in (4.6). The shape of a pair of twin binary search trees (TL , TR ), denoted Sh(TL , TR ), is simply the underlying pair of unlabelled rooted binary trees. The insertion algorithms for right (respectively, left) strict binary search trees adds the new symbol as a leaf node in the unique place that maintains the property of being a right (respectively, left) strict binary search tree. Algorithm 4.2 (Left strict leaf insertion). Input: A left strict binary search tree T and a symbol a ∈ A. Output: A left strict binary search tree T ← a. Method: If T is empty, create a node and label it a. If T is non-empty, examine the label x of the root node; if a ≥ x, recursively insert a into the right subtree of the root node; otherwise recursively insert a into the left subtree of the root note. Output the resulting tree. CRYSTALS AND TREES 13 Algorithm 4.3 (Right strict leaf insertion). Input: A right strict binary search tree T and a symbol a ∈ A. Output: A right strict binary search tree a → T . Method: If T is empty, create a node and label it a. If T is non-empty, examine the label x of the root node; if a ≤ x, recursively insert a into the left subtree of the root node; otherwise recursively insert a into the right subtree of the root note. Output the resulting tree. Using the leaf insertion algorithms described above, we can compute from a word in A∗ a left (respectively, right) binary search tree. Algorithm 4.4 (Left strict insertion). Input: A word a1 · · · ak , where ai ∈ A. Output: A left strict binary search tree TL (a1 · · · ak ) and a standard increasing tree TRecL (a1 · · · ak ). Method: Start with the empty binary search tree T0 and an empty increasing tree D0 . For each i = 1, . . . , k, insert ai into Ti−1 as per Algorithm 4.2; let Ti be the resulting binary search tree. Build a increasing tree Di that has the same shape as Ti by adding a node labelled by i to the tree Di−1 in the same place as ai was inserted into Ti−1 . Output Tk for TL (a1 · · · ak ) and Dk for TRecL (a1 · · · ak ). Algorithm 4.5 (Right strict insertion). Input: A word a1 · · · ak , where ai ∈ A. Output: A right strict binary search tree TR (a1 · · · ak ) and a standard decreasing tree TRecR (a1 · · · ak ). Method: Start with the empty binary search tree T0 and an empty decreasing tree D0 . For each i = 1, . . . , k, insert ak−i+1 into Ti−1 as per Algorithm 4.3; let Ti be the resulting binary search tree. Build a decreasing tree Di that has the same shape as Ti by adding a node labelled by k − i + 1 to the tree Di−1 in the same place as ak−i+1 was inserted into Ti−1 . Output Tk for TR (a1 · · · ak ) and Dk for TRecR (a1 · · · ak ). For example, if u = 5451761524, then TL (u) and TR (u) are respectively the left- and right-hand trees in (4.1), and TRecL (u) and TRecR (u) are respectively the left- and right-hand trees in (4.2). Note that Algorithm 4.4 proceeds through the word from left to right, while Algorithm 4.5 proceeds through the word from right to left. Let u ∈ A∗ be a word that contains no repeated symbols. The decreasing tree of u, denoted DecT(u), is defined as follows: if m is the maximum symbol that appears in u, so that u = sms′ , then DecT(u) has root labelled by m, and the left subtree of its root is DecT(s) and the right subtree of the root is DecT(s′ ). That is,  DecT(u) = DecT sms′ = m . DecT(s) DecT(s′ ) Similarly, the increasing tree of u, denoted IncT(u), is defined as follows: if n is the minimum symbol that appears in u, so that u = tnt′ , then IncT(u) 14 ALAN J. CAIN AND ANTÓNIO MALHEIRO has root labelled by n, and the left subtree of its root is IncT(t) and the right subtree of the root is IncT(t′ ). That is,  IncT(u) = IncT tnt′ = n IncT(t′ ) IncT(t) Thus if u is 47921013865 (where the underline denotes a single symbol in A that is not written using a single decimal digit), then IncT(u) and DecT(u) are respectively the left- and right- hand trees in (4.2). Remark 4.6. The infix reading of DecT(u) is u and the infix reading of IncT(u) is u. Proposition 4.7 ([Gir12, Proposition 4.8]). For any word u ∈ A∗ , (1) TRecL (u) = IncT(std(u)−1 ); (2) TRecR (u) = DecT(std(u)−1 );  and TRecL (u), TRecR (u) is a pair of twin binary trees. (Note that since std(u) is a standard word, it can be viewed as a permutation in one-line notation, and thus its inverse is defined.) Before proceeding to define the sylvester and Baxter monoids, it is first necessary to prove two technical lemmata: Lemma 4.8. Let α, α′ , β, β ′ ∈ A∗ and k ∈ A be such that |α| = |α′ |, |β| = |β ′ |, the symbol k is greater than every symbol in α, α′ , β, β ′ , and αkβ and α′ kβ ′ are standard words. (1) If the decreasing trees DecT(αβ) and DecT(α′ β ′ ) have the same shape as each other, then the decreasing trees DecT(αkβ) and DecT(α′ kβ ′ ) are of the same shape as each other. (2) If the increasing trees IncT(αβ) and IncT(α′ β ′ ) have the same shape as each other, then the increasing trees IncT(αkβ) and IncT(α′ kβ ′ ) are of the same shape as each other. Proof. (1) Suppose that the |α|-th symbol in αkβ is c. Now consider two cases separately: (a) c is a left child node in DecT(αβ). The infix reading of DecT(αβ) is αβ, so the left subtree of c must have infix reading α0 , where α = α0 c, and the right subtree of c must have infix reading β0 , where β0 is a prefix of β. Suppose β = β0 β1 ; then β1 is the infix reading of the part of the tree above and to the right of c. That is, DecT(αβ) must be as shown in the left-hand side of (4.7) below. DecT(αβ) z }| { β1 (4.7) z DecT(αkβ) }| { c α0 k c β0 α0 β1 β0 CRYSTALS AND TREES 15 The tree on the right-hand side of (4.7) has infix reading αkβ. (Note that in the right-hand tree, the subtree β0 attaches to the subtree β1 in the same place as c attaches to the subtree β1 in the left-hand tree.) It is a decreasing tree since k is the maximum symbol and the relative order of c, α0 , β0 , and β1 is correct since DecT(αβ) is a decreasing tree. Hence the righthand tree in (4.7) is DecT(αkβ). Since DecT(α′ β ′ ) has the same shape as DecT(αβ) and |α| = |α′ |, the |α|-th symbol of α′ β ′ is also a left child and so DecT(α′ β ′ ) has the same shape as the left-hand tree in (4.7). Since k is also the maximum symbol in α′ kβ ′ , the decreasing tree DecT(α′ kβ ′ ) has the same shape as the right-hand tree in (4.7). Thus DecT(αkβ) and DecT(α′ kβ ′ ) have the same shape. (b) c is a right child node or the root node. The infix reading of DecT(αβ) is αβ, so the left subtree of c must have infix reading α1 , where α1 c is a suffix of α, and the right subtree of c must have infix reading β. Suppose α = α0 α1 c; then α0 is the infix reading of the part of the tree above and to the left of c. That is, DecT(αβ) must be as shown in the left-hand side of (4.8) below. DecT(αβ) z }| { α0 (4.8) DecT(αkβ) }| { k α0 c α1 z β c β α1 The tree on the right-hand side of (4.8) has infix reading αkβ. It is a decreasing tree since k is the maximum symbol and the relative order of c, α0 , α1 , and β is correct since DecT(αβ) is a decreasing tree. Hence the right-hand tree in (4.8) is DecT(αkβ). Since DecT(α′ β ′ ) has the same shape as DecT(αβ) and |α| = |α′ |, the |α|-th symbol of α′ β ′ is also a right child or is also the root node and so DecT(α′ β ′ ) has the same shape as the left-hand tree in (4.8). Since k is also the maximum symbol in α′ kβ ′ , the decreasing tree DecT(α′ kβ ′ ) has the same shape as the right-hand tree in (4.8). Thus DecT(αkβ) and DecT(α′ kβ ′ ) have the same shape. (2) Since k is greater than every symbol in αβ, the increasing tree IncT(αkβ) is obtained from IncT(αβ) by adding k as a leaf node. With the same notation and similar reasoning as in case (1), one gets the following equivalents of (4.7) (when c is a left child node) 16 ALAN J. CAIN AND ANTÓNIO MALHEIRO and (4.8) (when c is a right child node or the root node): z IncT(αβ) }| { z β1 IncT(αkβ) }| { c α0 β1 c α0 β0 β0 k z IncT(αβ) }| { α0 z IncT(αkβ) }| { α0 c α1 c β α1 β k In each case, the right-hand tree is an increasing tree with infix read αkβ, by the fact that k is the maximum symbol and the relative order of c, α0 , α1 , and β is correct since IncT(αβ) is an increasing tree. Hence in both cases the right-hand tree is IncT(αkβ). Thus, by similar reasoning to case (1), IncT(αkβ) and IncT(α′ kβ ′ ) have the same shape.  The second technical lemma is simply the dual of the first: Lemma 4.9. Let α, α′ , β, β ′ ∈ A∗ be such that |α| = |α′ |, |β| = |β ′ |, and α1β and α′ 1β ′ are standard words. (1) If the decreasing trees DecT(αβ) and DecT(α′ β ′ ) have the same shape as each other, then the decreasing trees DecT(α1β) and DecT(α′ 1β ′ ) are of the same shape as each other. (2) If the increasing trees IncT(αβ) and IncT(α′ β ′ ) have the same shape as each other, then the increasing trees IncT(α1β) and IncT(α′ 1β ′ ) are of the same shape as each other. Equipped with these notions of binary search trees and insertion algorithms, it is now possible to use them to define the sylvester and Baxter monoids (approach 2 in the introduction). 4.2. Sylvester monoid. Define the sylvester P-symbol of u ∈ A∗ by Psylv (u) = TR (u), and the sylvester Q-symbol of u ∈ A∗ by Qsylv (u) = TRecR (u). The definition of the relation ≡sylv using right strict binary search trees and insertion is: u ≡sylv v ⇐⇒ Psylv (u) = Psylv (v). Using this definition, it can be shown that ≡sylv is a congruence on A∗ , which is known as the sylvester congruence. The factor monoid A∗ /≡sylv is the sylvester monoid and is denoted sylv. The congruence ≡sylv naturally CRYSTALS AND TREES 17 restricts to a congruence on A∗n , and the factor monoid A∗n / ≡sylv is the sylvester monoid of rank n and is denoted sylvn . The monoid sylv is presented by hA | Rsylv i, where  Rsylv = (cavb, acvb) : a ≤ b < c, v ∈ A∗ ; the monoid sylvn is presented by hAn | Rsylv i, where the set of defining relations Rsylv is naturally restricted to A∗n × A∗n . Notice that sylv and sylvn are multihomogeneous. (See [CGM17] for a general discussion of homogeneous and multihomogeneous monoids.)  It is straightforward to see that the map u 7→ Psylv (u), Qsylv (u) is a bijection between words in A∗ and pairs consisting of a right strict binary search tree and a decreasing tree of the same shape; this is the sylvester analogue of the Robinson–Schensted correspondence. For instance, if Psylv (u) and Qsylv (u) are the right-hand trees in (4.1) and (4.2) respectively, then u = 5451761524. For any word u ∈ A∗ , the set of words in the ≡sylv -class of u is the sylvester class of u. Extend this terminology to right strict binary search trees: for such a tree T , the set of words w ∈ A∗ such that Psylv (w) = T is the sylvester class of T . The left-to-right postfix reading Post(T ) is an element of the sylvester class of T : that is, Psylv (Post(T )) = T . (Note that the infix reading In(T ) is not in general an element of the sylvester class of T .) The following lemma follows immediately from the definition of the left-to-right postfix reading: Lemma 4.10. Let T be an unlabelled binary tree. Under the sylvester analogue of the Robinson–Schensted correspondence, the set of postfix readings of right strict binary search trees of shape T is obtained by fixing a particular sylvester Q-symbol of shape T and varying the sylvester P-symbol of over all right strict binary search trees of shape T . The following corollary of Proposition 4.7 does not seem to have been stated before: Corollary 4.11. For u, v ∈ A∗ , u ≡sylv v ⇐⇒ wt(u) = wt(v)   ∧ Sh DecT(std(u)−1 ) = Sh DecT(std(v)−1 ) . Proof. Suppose that u ≡sylv v. Then TR (u) = TR (v). Thus wt(u) = wt(TR (u)) = wt(TR (v)) = wt(v) and, by Proposition 4.7,  Sh DecT(std(u)−1 ) = Sh(Qsylv (u)) = Sh(Psylv (u))  = Sh(Psylv (v)) = Sh(Qsylv (v)) = Sh DecT(std(v)−1 ) .  On the other hand, suppose wt(u) = wt(v) and Sh DecT(std(u)−1 ) =  Sh DecT(std(v)−1 ) . Then  Sh(Psylv (v)) = Sh(Qsylv (v)) = Sh DecT(std(v)−1 )  = Sh DecT(std(u)−1 ) = Sh(Qsylv (u)) = Sh(Psylv (u)). Thus Psylv (u) and Psylv (v) have the same shape. Since wt(u) = wt(v), the trees Psylv (u) and Psylv (v) have the same content. By Proposition 4.1, the 18 ALAN J. CAIN AND ANTÓNIO MALHEIRO infix reading of a binary search tree is the unique weakly increasing word with the same content, and so it follows that the infix readings of Psylv (u) and Psylv (v) are equal. Since Psylv (u) and Psylv (v) have the same shape, they are thus identical. Hence u ≡sylv v.  4.3. Baxter monoid. The definition of the relation ≡baxt uses pairs of twin binary search trees. For any word u ∈ A∗ , the binary search trees TL (u) and TR (u) form a pair of twin binary search trees. Define the Baxter Q symbol of u by Pbaxt (u) = TL (u), TR (u) , and the Baxter Q-symbol of u by Qbaxt (u) = TRecL (u), TRecR (u) . Define ≡baxt by: u ≡baxt v ⇐⇒ Pbaxt (u) = Pbaxt (v). Using this definition, it follows that ≡baxt is a congruence on A∗ , which is known as the Baxter congruence. The factor monoid A∗ /≡baxt is the Baxter monoid and is denoted baxt. The congruence ≡baxt naturally restricts to a congruence on A∗n , and the factor monoid A∗n / ≡baxt is the Baxter monoid of rank n and is denoted baxtn . The monoid baxt is presented by hA | Rbaxt i, where  Rbaxt = (cudavb, cuadvb) : a ≤ b < c ≤ d, u, v ∈ A∗ ∪ { (budavc, buadvc) : a < b ≤ c < d, u, v ∈ A∗ }; the monoid baxtn is presented by hAn | Rbaxt i, where the set of defining relations Rbaxt is naturally restricted to A∗n × A∗n . Note that baxt and baxtn are multihomogeneous. The map     u 7→ Pbaxt (u), Qbaxt (u) = TL (u), TR (u) , TRecL (u), TRecR (u) is a bijection between words in A∗ and pairs consisting of a pair of twin binary search tree and a pair made up of an increasing and a decreasing tree of the same shape as the corresponding binary search trees; this is the Baxter analogue of the Robinson–Schensted correspondence. For instance, if Pbaxt (u) is the pair of twin binary search trees in (4.1), and Qbaxt (u) is the pair of increasing and decreasing trees in (4.2), then u = 5451761524. For example, if u = 5451761524, then std(u) = 64711092835, so (std(u))−1 = 47921013865. Hence TRecL (u) and IncT((std(l))−1 ) are both the left-hand tree in (4.2), and TRecR (u) and DecT((std(u))−1 ) are both the right-hand tree in (4.2). For any word u ∈ A∗ , the set of words in the ≡baxt -class of u is the Baxter class of u. Extend this terminology to pairs of twin binary search trees: for such a pair (TL , TR ), the set of words w ∈ A∗ such that Pbaxt (w) = T is the Baxter class of T . There is a straightforward method for computing words in the Baxter class of a pair of twin binary search trees (TL , TR ): Method 4.12. Input: A pair of twin binary search trees (TL , TR ). Output: A word in the Baxter class of (TL , TR ). (1) Set (UL , UR ) to be (TL , TR ). (Throughout this computation, UL is a forest of left strict binary search trees and UR is a right strict binary search tree.) CRYSTALS AND TREES 19 (2) If UL and UR are empty, halt. (3) Given some (UL , UR ), choose and output some symbol a that labels a root of some tree in the forest UL and a leaf of the tree UR . (4) Delete the corresponding root vertex of UL and the corresponding leaf vertex of UL . (5) Go to step 2. This is essentially [Gir12, Algorithm on p.133], except that the method given here is non-deterministic in that there may be several choices for a in step 3. As these choices vary, all words in the Baxter class of (TL , TR ) are obtained. If, in step 3, one always chooses the leftmost possible a, call the resulting word the left-consistent reading of (TL , TR ). (By [Gir12, Proposition 4.16], the left-consistent reading of (TL , TR ) is the lexicographically smallest word in the corresponding Baxter class.) The following lemma follows immediately from the definition of the left-consistent reading: Lemma 4.13. Let (TL , TR ) be a pair of twin binary trees. Under the Baxter analogue of the Robinson–Schensted correspondence, the set of left-consistent readings of pairs of twin binary search trees of shape (TL , TR ) is obtained by fixing a particular Baxter Q-symbol of shape (TL , TR ) and varying the Baxter P-symbol over all pairs of twin binary search trees of shape (TL , TR ). The following result is the analogy of Corollary 4.11 for the Baxter monoid: Corollary 4.14. For u, v ∈ A∗ , u ≡baxt v ⇐⇒ wt(u) = wt(v)   ∧ Sh DecT(std(u)−1 ) = Sh DecT(std(v)−1 )   ∧ Sh IncT(std(u)−1 ) = Sh IncT(std(v)−1 ) . Proof. Follow the reasoning in the proof of Corollary 4.11, but working additionally with TL (·), TRecL (·), and IncT(std(·)−1 ).  5. Quasi-crystals with abstract shapes An abstract shape is a map σ : A∗ → S satisfying the following axioms: S1 The map σ is invariant under standardization, in the sense that for all u ∈ A∗ σ(u) = σ(std(u)). S2 For all u, v ∈ A∗ and a ∈ A, if wt(u) = wt(v) and σ(u) = σ(v), then σ(ua) = σ(va) and σ(au) = σ(av) for all w ∈ A∗ . Explicit examples of shapes will be given in the next section. For the moment, note that by Proposition 3.6 and Corollary 3.10, axiom S1 is equivalent to saying that σ is invariant under the quasi-Kashiwara operators, in the sense that for all u ∈ A∗ and all i ∈ N, if ëi (u) is defined, then σ(u) = σ(ëi (u)), and if f¨i (u) is defined, σ(u) = σ(f¨i (u)). Thus, if axiom S1 is satisfied, every element of a given connected component of Γ(hypo) will have the same image under σ. For u, v ∈ A∗ , a quasi-crystal isomorphism θ : Γ(hypo, u) → Γ(hypo, v) is shape-preserving (with respect to an abstract shape σ) if σ(w) = σ(θw) for all w ∈ Γ(hypo, u). 20 ALAN J. CAIN AND ANTÓNIO MALHEIRO Define a relation ∼σ on the free monoid A∗ as follows: u ∼σ v if and only if there is a shape-preserving quasi-crystal isomorphism θ : Γ(hypo, u) → Γ(hypo, v) such that θ(u) = v. That is, u ∼σ v if and only if u and v have the same image under σ and are in the same position in isomorphic connected components of Γ(hypo). Note that ∼σ ⊆ ∼. Proposition 5.1. The relation ∼σ is a congruence on the free monoid A∗ . Proof. It is clear from the definition that ∼σ is an equivalence relation; it thus remains to prove that ∼σ is compatible with multiplication in A∗ . Suppose u ∼σ v and w ∈ A∗ . Suppose w = w1 · · · wk (where wi ∈ A). The aim is to proceed by induction on i and show there is a shape-preserving quasi-crystal isomorphism θi : Γ(hypo, uw1 · · · wi ) → Γ(hypo, vw1 · · · wi ) such that θ(uw1 · · · wi ) = vw1 · · · wi for all i ∈ {0, 1, . . . , k} (formally taking w1 · · · wi to be ε when i = 0). For i = 0, since u ∼σ v, there is by definition a shape-preserving quasicrystal isomorphisms θ0 : Γ(hypo, u) → Γ(hypo, v) such that θ(u) = v. This is the basis of the induction. So assume there is a shape-preserving quasi-crystal isomorphism θi : Γ(hypo, uw1 · · · wi ) → Γ(hypo, vw1 · · · wi ) such that θi (uw1 · · · wi ) = vw1 · · · wi . In particular, uw1 · · · wi ∼ vw1 · · · wi . Since ∼ is a congruence, uw1 · · · wi wi+1 ∼ vw1 · · · wi wi+1 , and so there is a quasi-crystal isomorphism (which is not yet known to be shape-preserving) θi+1 : Γ(hypo, uw1 · · · wi+1 ) → Γ(hypo, vw1 · · · wi+1 ) such that θi+1 (uw1 · · · wi+1 ) = vw1 · · · wi+1 . Furthermore, since θi is shapepreserving, σ(uw1 · · · wi ) = σ(θ(uw1 · · · wi )) = σ(vw1 · · · wi ). Combine this with uw1 · · · wi ∼ vw1 · · · wi and use axiom S2 to see that σ(uw1 · · · wi+1 ) = σ(vw1 · · · wi+1 ). Thus, by axiom S1, every element in the connected components Γ(hypo, uw1 · · · wi+1 ) and Γ(hypo, vw1 · · · wi+1 ) have the same shape. Hence θi+1 is shape-preserving. Hence, by induction, θk : Γ(hypo, uw) → Γ(hypo, vw) is a shape-preserving quasi-crystal isomorphism; therefore uw ∼σ vw. Similar reasoning shows that wu ∼σ wv; hence ∼σ is compatible with multiplication and is thus a congruence.  Thus every abstract shape σ gives rise to a monoid A∗ /∼σ . 6. Crystallizing the sylvester monoid 6.1. Definition by crystals. Let S be the set of unlabelled binary trees and define σsylv (u) = Sh(DecT(std(u)−1 )) for all u ∈ A∗ . Proposition 6.1. σsylv is an abstract shape. Proof. By Proposition 3.6, the map σsylv is invariant under the quasi-Kashiwara operators, and so satisfies axiom S1. To see that σsylv satisfies S2, proceed as follows. Let u, v ∈ A∗ be such that u ∼ v and σsylv (u) = σsylv (v), and let a ∈ A. The first aim is to prove that σsylv (ua) = σsylv (va). When one computes std(ua) and std(va), the symbol a is replaced by the same symbol b in both words, since u and v have the same content. Let k = |u| + 1. In std(ua) (viewed as a permutation), k is mapped to b. Thus, k is the b-th symbol, and the maximum symbol, in both std(ua)−1 and std(va)−1 . That is, std(u)−1 = CRYSTALS AND TREES 21 αβ, std(ua)−1 = αkβ, std(v)−1 = α′ β ′ and std(va)−1 = α′ kβ ′ for some α, α′ , β, β ′ ∈ A∗ , such that |α| = |α′ |, |β| = |β ′ |, the symbol k is greater than every symbol in α, α′ , β, β ′ , and αkβ and α′ kβ ′ are standard words. Furthermore, DecT(std(u)−1 ) = DecT(αβ) and DecT(std(v)−1 ) = DecT(α′ β ′ ) have the same shape, since σsylv (u) = σsylv (v). Thus, by Lemma 4.8(1), DecT(std(ua)−1 ) = DecT(αkβ) and DecT(std(va)−1 ) = DecT(α′ kβ ′ ) have the same shape. Hence σsylv (ua) = σsylv (va). The next aim is to prove that σsylv (au) = σsylv (av). When one computes std(au) and std(av), the symbol a is replaced by the same symbol b in both words, since u and v have the same content. In std(au) (viewed as a permutation), 1 is mapped to b. Thus, 1 is the b-th symbol, and the minimum symbol, in both std(au)−1 and std(av)−1 . By similar reasoning to the above, but using Lemma 4.9(1), one sees that DecT(std(au)−1 ) and DecT(std(av)−1 ) have the same shape. Hence σsylv (au) = σsylv (av).  As a consequence of Proposition 6.1, one can define a relation ∼sylv on the free monoid A∗ to be the relation ∼σ from Section 5 with the abstract shape σ = σsylv . By Propositions 5.1 and 6.1, ∼sylv is a congruence. When viewing the quasi-crystal graph Γ(hypo) in the context of σsylv preserving isomorphisms, denote it by Γ(sylv). Similarly, denote the connected component Γ(hypo, u) by Γ(sylv, u). (This is arguably an abuse of notation, since Γ(hypo) and Γ(sylv) are the same graph, and the difference is in the notion of isomorphism and the relation to which it gives rise.) Proposition 6.2. The relations ∼sylv and ≡sylv coincide. Proof. Let u, v ∈ A∗ . Suppose that u ∼sylv v. Then u ∼ v and hence wt(u) = wt(v). Furthermore, σsylv (u) = σsylv (v), and so   Sh DecT(std(u)−1 ) = σsylv (u) = σsylv (v) = Sh DecT(std(v)−1 ) . Hence, by Corollary 4.11, u ≡sylv v. Now suppose that u ≡sylv v. Then u ≡hypo v and so u ∼ v and so there is a quasi-crystal isomorphism θ : Γ(hypo, u) → Γ(hypo, v) with θ(u) = v. By Corollary 4.11,   σsylv (u) = Sh DecT(std(u)−1 ) = Sh DecT(std(v)−1 ) = σsylv (v). Thus, by S2, σsylv (θ(w)) = σsylv (w) for all w ∈ Γ(hypo, u). Hence θ is a σsylv -preserving quasi-crystal isomorphism and so u ∼sylv v.  Our aim here has been to show that ≡sylv can be defined using quasicrystals; thus we have avoided using the prior knowledge that ≡sylv is a congruence [HNT05]. If we had used that result, it would have been straightforward to recover the fact that σsylv is an abstract shape. 6.2. Characterizing highest-weight elements. Proposition 6.3. Let T be an unlabelled binary tree. The set of words in A∗ that are postfix readings of right strict binary search trees of shape T form a single connected component of Γ(sylv). Proof. Suppose u and v are postfix readings of two right strict binary search trees of shape T . Then std(u) and std(v) are also postfix readings of two 22 z ALAN J. CAIN AND ANTÓNIO MALHEIRO 1 1 2 2 Γ(sylv, 1221) }| { z 2121 Γ(sylv, 2121) }| { z 2 1 1 2 Γ(sylv, 1212) }| { 2 1 1 2 1 1 4 1 2 3 1 1 5 1 2 2 4 3 | {z 1 3 3 4 1 3 } 2151 | 3141 4 2 1 2 3 1 2 1 3 1 3 {z 3 1 3 3231 } 1 1 2 4 3131 2 2 Legend 1 2141 3 4 1 1 2 3 1 3 2131 3 5 4 1 1 2 1 | 2 3 {z 1 4 3 1 4 3 1 2 5 Figure 4. Part of the connected components Γ(sylv, 1221) and Γ(sylv, 2121), which are linked by a shape-preserving isomorphism, and part of the connected component Γ(sylv, 1212), which is only isomorphic to the others as a labelled digraph. binary search trees of shape T [HNT05, Lemma 11]. Since there is exactly one right strict binary search of a given shape labelled by a standard word [HNT05, Note 3], it follows that std(u) = std(v) and so u and v are in the same connected component of Γ(sylv) by Corollary 3.10.  Lemma 6.4. Let u ∈ A∗ and i ∈ N. Then ëi (u) is defined if and only if TR (u) contains at least one node i + 1, but does not contain a node i + 1 in the right subtree of the topmost node i. Proof. By definition, ëi (u) is defined if and only if every symbol i + 1 is to the right of every symbol i in u. In terms of Algorithm 4.5, this is equivalent to every symbol i + 1 being inserted before every symbol i, which in turn is equivalent to no symbol i + 1 being inserted into the right subtree of the topmost symbol i.  Proposition 6.5. Let u ∈ A∗ . Then u is a highest-weight word if and only if TR (u) has the following property: if the right interval partition of TR (u) has ℓ parts, then for a ∈ {1, . . . , ℓ} ⊆ A, the nodes in the a-th right interval are labelled by a. 3 } CRYSTALS AND TREES 23 Before proceeding to the proof, an example is helpful. The word u = 1121335432 is highest weight, and TR (u) is 2 1 1 1 3 2 3 3 , 4 5 which satisfies the condition in Proposition 6.5. On the other hand, the word u = 5451761524 does not have highest weight, and TR (u) is the right-hand tree in (4.1), which does not satisfy the condition. Proof. Suppose u is a highest-weight word. Then ëi (u) is undefined for all i. Let ℓ be the number of right intervals of TR (u). Since the infix reading of TR (u) is a weakly increasing word that must increase immediately after the rightmost nodes in the first ℓ − 1 right intervals, there are at least ℓ distinct symbols among the labels in TR (u). If i > 1 is a symbol in u, then i − 1 is also a symbol in u, for otherwise ëi−1 (u) would be defined. Consequently, u contains the symbols 1, . . . , m for some m ≥ ℓ. If m > 1, then, by Lemma 6.4, there is a symbol 2 in the right subtree of the topmost symbol 1. Thus the symbols 1 must label all nodes in the first right interval of TR (u). Proceeding inductively and using Lemma 6.4, one sees that a must label all nodes in the a-th right interval. Hence TR (u) has the form described in the statement. Now suppose that TR (u) has the form described. It is immediate that a + 1 is in the right subtree of the topmost node a for all a ∈ {1, . . . , ℓ}, and so ëi (u) is undefined for i ≤ ℓ. Since ℓ + 1 is the maximum symbol in TR (u), it follows that ëi (u) is undefined for all i by Lemma 6.4, and so u has highest weight.  Note that it would be possible to prove Proposition 6.5 by appealing to the corresponding result for the hypoplactic monoid and quasi-ribbon tableaux [CM17, Proposition 6(2)] to characterize highest weight words, but it seems clearer to give a direct proof that reasons only about trees. 6.3. The sylvester version of the Robinson–Schensted correspondence. The following result clarifies the interaction of the quasi-crystal structure and the sylvester version of the Robinson–Schensted correspondence: Proposition 6.6. Let u, v ∈ A∗ . The words u and v lie in the same connected component of Γ(sylv) if and only if Qsylv (u) = Qsylv (v). Proof. Suppose Qsylv (u) = Qsylv (v). Hence TRecR (u) = TRecR (v) and by Proposition 4.7, DecT(std(u)−1 ) = DecT(std(u)−1 ). Thus, by Proposition 4.1, std(u)−1 and std(v)−1 are the infix readings of the same labelled binary tree, and so std(u) = std(v). Since u and std(u) lie in the same connected component of Γ(sylv) by Corollary 3.10, and similarly for v and std(v), it follows that u and v are in the same connected component of Γ(sylv). On the other hand, if u and v lie in the same connected component of Γ(sylv), then std(u) = std(v) by Corollary 3.10 and so Qsylv (u) = Qsylv (v).  24 ALAN J. CAIN AND ANTÓNIO MALHEIRO Thus the sylvester Q-symbol indexes connected components of the quasicrystal graph and the sylvester P-symbol locates a word within that component. Note that combining Proposition 6.6 and Lemma 4.10, one recovers Proposition 6.3. The Knuth ‘hook-length’ formula Q shows that the number of descending trees of the same shape as T is n!/ v∈T hv , where hv is the number of nodes in the subtree rooted at v [Knu98, § 5.1.4, Exer. 20]. This gives a formula for the number of sylvester Q-symbols of a given shape, and thus for the size of sylvester classes corresponding to left strict binary search trees of a given shape, and thus for the number of quasi-crystal components that are mapped to a given one by a σsylv -preserving quasi-crystal isomorphism. In the infinite-rank setting, there are infinitely many sylvester P-symbols of a given shape. On restricting to the rank n case, the number of sylvester P-symbols of a given shape can be calculated using the same formula as for the hypoplactic monoid [CM17, Theorem 4]: Proposition 6.7. Let T be a binary search tree for which the right interval partition has ℓ parts. The number of right strict binary search trees of shape T labelled by symbols from An is ( n+|T |−ℓ if ℓ ≤ n n−ℓ 0 if ℓ > n. Proof. Consider a highest-weight word u ∈ A∗n such that TR (u) has shape T . By Proposition 6.5, u contains the symbols {1, . . . , ℓ}. Let α be the shape of the quasi-ribbon tableau Phypo (u). Since u is also a highest-weight word in Γ(sylv) and thus in Γ(hypo), it follows that the column reading v of Phypo (u) is also a highest weight word in Γ(hypo) and so α = wt(v) = wt(u) [CM17, Proposition 6]. In particular, ℓ(α) = ℓ and |α| = |v| = |u| = |T |. Since Γ(sylv, u) = Γ(hypo, u) is isomorphic to Γ(hypo, v), they both contain the same number of words that lie in A∗n , and so the result follows by subsituting the given values for ℓ(α) and |α| into [CM17, Theorem 4].  6.4. Counting factorizations. One interpretation of the Littlewood–Richardson rule [Ful97, ch. 5] is that the Littlewood–Richardson coefficients cνλµ are the number of different factorizations of an element of plac corresponding to a Young tableau of shape ν into elements corresponding to a tableau of shape λ and a tableau of shape µ. In particular, it shows that the number of such factorizations is independent of the content of the tableau, and is rather dependent only on the shape. The quasi-crystal structure yields a similar result for hypo [CM17, Theorem 5], and a minimal modification to the proof gives the similar result for the sylvester monoid: Theorem 6.8. The number of distinct factorizations of an element of the sylvester monoid corresponding to a right strict binary search tree of shape T into elements that correspond to right strict binary search trees of shapes U and V is dependent only of T , U , and V , and not on the content of the element. Proof. For the purposes of this proof, a word u ∈ A∗ is a postfix word if it is the postfix reading of a binary search tree; a postfix word u has shape U , CRYSTALS AND TREES 25 where U is an unlabelled binary tree, if it is the postfix reading of a binary search tree of shape U . Let T , U , and V be unlabelled binary trees. Let w ∈ A∗ be a postfix word of shape T . Let  w SU,V = (u, v) : u, v ∈ A∗n are postfix words, u has shape U , v has shape V , w ≡sylv uv . w SU,V So is a complete list of factorizations of w into elements whose corresponding right strict binary search trees have shapes U and V . Let i ∈ N w . Then w ≡ and suppose ëi (w) is defined. Pick some pair (u, v) ∈ SU,V sylv uv and so ëi (uv) is defined, and ëi (w) = ëi (uv). By [CM17, Lemma 2], either ëi (w) , ëi (uv) = uëi (v), or ëi (uv) = ëi (u)v. In the former case, (u, ëi (v)) ∈ SU,V ë (w) i , since ëi preserves being a postand in the latter case (ëi (u), v) ∈ SU,V fix word and the shape of the corresponding right strict binary search tree ëi (w) w by Proposition 6.3. So ëi induces an injective map from SU,V to SU,V . ëi (w) w ¨ to S . Hence It follows that fi induces the inverse map from S U,V U,V w | = |S f¨i (w) |. Since Similarly, if f¨i (w) is defined, then |SU,V = U,V all the postfix words whose corresponding binary search trees have shape T lie in the same connected component of Γ(sylv) by Proposition 6.3, it follows w | is dependent only on T , not on w. that |SU,V  w | |SU,V ëi (w) |. |SU,V 6.5. Satisfying an identity. Another application of the quasi-crystal structure was to prove that the hypoplactic monoid satisfies a non-trivial identity [CM17, Theorem 6]. Similarly, it is possible to use the quasi-crystal structure to prove that the sylvester monoid satisfies an identity. Theorem 6.9. The sylvester monoid satisfies the identity xyxy = yxxy. Proof. Let x, y ∈ A∗ . The proof that xyxy = yxxy proceeds by reverse induction on the weight of xyxy. The base case of the induction is when xyxy is highest-weight. Thus ëi (xyxy) is undefined for all i ∈ N. So xyxy must contain a subsequence (i+1)i for all i ∈ {1, . . . , ℓ−1}, where ℓ is the maximum symbol appearing in x or y. The symbols i + 1 and i may each lie in x or y, but in any case, there is a subsequence (i + 1)i in yxxy. Hence ëi (yxxy) is undefined for all i ∈ N and so yxyx is also highest-weight. Clearly wt(xyxy) = wt(yxxy). Consider applying Algorithm 4.5 to xyxy and yxxy. In both cases, the algorithm initially computes TR (xy). At this point, every symbol in B = {1, . . . , ℓ} appears in the tree and so the infix reading of TR (xy) contains all these symbols. Thus any symbol b ∈ B that is subsequently inserted will be placed either as the left child of a node b that is already present, or into the right subtree of the topmost node b − 1 that is already present. Thus the trees TR (xyxy) and TR (yxxy) are identical. The remaining reasoning parallels the proof of [CM17, Theorem 6]. For the induction step, suppose xyxy is not highest-weight, and that x′ y ′ x′ y ′ ≡sylv y ′ x′ x′ y ′ for all x′ , y ′ ∈ A∗ such that x′ y ′ x′ y ′ has higher weight than xyxy. 26 ALAN J. CAIN AND ANTÓNIO MALHEIRO Then ëi (xyxy) is defined for some i ∈ N. Neither x nor y contains a symbol i, since otherwise there would be a subsequence (i + 1)i. So ǫ̈i (xyxy) = ǫ̈i (yxxy) = |xyxy|i+1 = |yxxy|i+1 = 2|x|i+1 + 2|y|i+1 = 2ǫ̈i (x) + 2ǫ̈i (y), and ǫ̈i (xyxy) applications of ëi change every symbol i + 1 in xyxy to i. ǫ̈ (xyxy) ǫ̈ (yxxy) That is, ëi i (xyxy) and ëi i (yxxy) are both defined and are equal ǫ̈ (x) ǫ̈ (y) ′ ′ ′ ′ ′ ′ ′ ′ to x y x y and y x x y respectively, where x′ = ëi i (x) and y ′ = ëi i (y). Since x′ y ′ x′ y ′ has higher weight than xyxy, it follows by the induction hypothesis that x′ y ′ x′ y ′ ≡sylv y ′ x′ x′ y ′ . Hence ǫ̈ (xyxy) ′ ′ ′ ′ ǫ̈ (xyxy) ′ ′ ′ ′ xyxy = f¨i i (x y x y ) ≡sylv f¨i i (y x x y ) = yxxy. This completes the induction step and thus the proof.  For an alternative proof of Theorem 6.9 that does not require the quasicrystal structure, see [CM, Section 3.3]. 7. Crystallizing the Baxter monoid 7.1. Definition by crystals. Let S be the set of pairs of twin binary trees and define σbaxt (u) = Sh(IncT(std(u)−1 )), Sh(DecT(std(u)−1 )) for all u ∈ A∗ . Proposition 7.1. σbaxt is an abstract shape. Proof. By Proposition 3.6, the map σbaxt is invariant under the quasi-Kashiwara operators, and so satisfies axiom S1. To see that σbaxt satisfies S2, proceed as follows. Let u, v ∈ A∗ be such that wt(u) = wt(v) and σbaxt (u) = σbaxt (v), and let a ∈ A. Then Sh(IncT(std(u)−1 )) = Sh(IncT(std(v)−1 )) and Sh(DecT(std(u)−1 )) = Sh(DecT(std(v)−1 )). By the reasoning in the proof of Proposition 6.1, Sh(DecT(std(ua)−1 )) = Sh(DecT(std(va)−1 )) and Sh(DecT(std(au)−1 )) = Sh(DecT(std(av)−1 )). Symmetrical reasoning, but using part (2) of Lemmata 4.8 and 4.9 shows that Sh(IncT(std(ua)−1 )) = Sh(IncT(std(va)−1 )) and Sh(IncT(std(au)−1 )) = Sh(IncT(std(av)−1 )). Hence σbaxt (ua) = σbaxt (va) and σbaxt (au) = σbaxt (av). Hence σbaxt satisfies S2.  As a consequence of Proposition 7.1, one can define a relation ∼baxt on the free monoid A∗ to be the relation ∼σ from Section 5 with the abstract shape σ = σbaxt . By Propositions 5.1 and 7.1, ∼baxt is a congruence. When viewing the quasi-crystal graph Γ(hypo) in the context of σbaxt preserving isomorphisms, denote it by Γ(baxt). Similarly, denote the connected component Γ(hypo, u) by Γ(baxt, u). (This is arguably an abuse of notation, since Γ(hypo) and Γ(baxt) are the same graph, and the difference is in the notion of isomorphism and the relation to which it gives rise.) Proposition 7.2. The relations ∼baxt and ≡baxt coincide. Proof. Let u, v ∈ A∗ . Suppose that u ∼baxt v. Then u ∼ v and hence wt(u) = wt(v). Furthermore, σbaxt (u) = σbaxt (v), and so  Sh(IncT(std(u)−1 )), Sh(DecT(std(u)−1 )) = σbaxt (u)  = σbaxt (v) = Sh(IncT(std(v)−1 )), Sh(DecT(std(v)−1 )) CRYSTALS AND TREES 27 Hence, by Corollary 4.14, u ≡baxt v. Now suppose that u ≡baxt v. Then u ≡hypo v and so u ∼ v and so there is a quasi-crystal isomorphism θ : Γ(hypo, u) → Γ(hypo, v). By Corollary 4.14,  σbaxt (u) = Sh(IncT(std(u)−1 )), Sh(DecT(std(u)−1 ))  = Sh(IncT(std(v)−1 )), Sh(DecT(std(v)−1 )) = σbaxt (v). Thus, by S2, σbaxt (θ(w)) = σbaxt (w) for all w ∈ Γ(hypo, u). Hence θ is a σbaxt -preserving quasi-crystal isomorphism and so u ∼baxt v.  As was the case for ≡sylv , our aim here has been to show that ≡baxt can be defined using quasi-crystals; thus we have avoided using the prior knowledge that ≡baxt is a congruence [Gir12], from which, it would have been straightforward to recover the fact that σbaxt is an abstract shape. 7.2. Characterizing highest weight elements. Proposition 7.3. Let (TL , TR ) be a pair of twin binary trees. The set of words in A∗ that are left-consistent readings of pairs of twin binary search trees of shape (TL , TR ) form a single connected component of Γ(baxt). Proof. Suppose u and v are left-consistent readings of two pairs of twin binary seach trees of shape (TL , TR ). Then std(u) and std(v) are also leftconsistent readings of shape (TL , TR ) (by [HNT05, Lemma 11] and its dual). Since there is exactly one pair of twin binary search trees of a given shape labelled by a standard word (by [HNT05, Note 3] and its dual), it follows that std(u) = std(v) and so u and v are in the same connected component of Γ(baxt) by Corollary 3.10.  The following lemma is the dual of Lemma 6.4, and can be proved by a dual argument. Lemma 7.4. Let u ∈ A∗ and i ∈ N. Then ëi (u) is defined if and only if TL (u) contains at least one node i + 1, but does not contain a node i in the left subtree of the topmost node i + 1. The following result follows from the argument in the proof of Proposition 6.5 plus a dual argument: Proposition 7.5. Let u ∈ A∗ . Then u is a highest-weight word if and only if Pbaxt (u) = (TL (u), TR (u)) has the following properties: • if the left interval partition of TL (u) has k parts, then for a ∈ {1, . . . , k} ⊆ A, the nodes in the a-th left interval are labelled by a; • if the right interval partition of TR (u) has ℓ parts, then for a ∈ {1, . . . , ℓ} ⊆ A, the nodes in the a-th right interval are labelled by a. 7.3. The Baxter version of the Robinson–Schensted correspondence. The following result is the parallel of Proposition 6.6 for the Baxter monoid: Proposition 7.6. Let u, v ∈ A∗ . The words u and v lie in the same connected component of Γ(baxt) if and only if Qbaxt (u) = Qbaxt (v). 28 ALAN J. CAIN AND ANTÓNIO MALHEIRO Like the case of the sylvester monoid, the Baxter Q-symbol indexes connected components of the quasi-crystal graph and the Baxter P-symbol locates a word within that component. Unlike the sylvester monoid, there is no known neat formula for the size of classes of words that represent the same element of the Baxter monoid. However, the quasi-crystal structure does make it clear that the size of these classes is dependent only on the shape of the corresponding pair of twin binary search trees. Remark 7.7. One might consider trying to use the quasi-crystal structure to obtain a formula for the size of these classes as follows. By the quasicrystal structure, it suffices to consider the size of the class for a standard element; that is, for a pair of twin binary search trees (TL , TR ) containing each symbol in K = {1, . . . , k} exactly once. Each of these binary search trees can be considered as a partial order on the set K; denote these partial orders by ≤L and ≤R . Let ≤′L be the dual of ≤L . Now, any reading of (TL , TR ) can be viewed as a linear order on K that extends ≤′L and ≤R . Since K is finite, there are finitely many such linear orders, so we can intersect them to obtain a partial order ⊏. So the readings of (TL , TR ) are in oneto-one correspondence with the linear orders extending ⊏. However, the problem of the number of linear orders extending a given partial order is #P -complete [BW91]. Of course, not all partial orders on K will arise as ⊏, so it is possible that a more refined version of this argument, using the structure of the pair of twin binary search trees to gain information about ⊏, might still work. 7.4. Counting factorizations. The following result is the parallel of Theorem 6.8 for the Baxter monoid: Theorem 7.8. The number of distinct factorizations of an element of the Baxter monoid corresponding to a pair of twin binary search trees of shape (TL , TR ) into elements that correspond to pairs of twin binary search trees of shapes (UL , UR ) and (VL , VR ) is dependent only of (TL , TR ), (UL , UR ), and (VL , VR ), and not on the content of the element. Proof. For the purposes of this proof, a word u ∈ A∗ is a left-consistent word if it is the left-consistent reading of a pair of twin binary search tree; a left-consistent word u has shape (UL , UR ), where (UL , UR ) is a pair of twin binary trees, if it is the left-consistent reading of a pair of twin binary search trees of shape (UL , UR ). Let (TL , TR ), (UL , UR ), and (VL , VR ) be pairs of twin binary trees. Let w ∈ A∗ be a postfix word such that T is the shape of TR (w). Let  w S(U = (u, v) : u, v ∈ A∗n are left-consistent words, L ,UR ),(VL ,VR ) u has shape (UL , UR ), v has shape (VL , VR ), w ≡baxt uv . Now following the reasoning in the proof of Theorem 6.8, but using Propositions 7.6 w and 7.3 shows that |S(U | is dependent only on (TL , TR ), not on L ,UR ),(VL ,VR ) w.  CRYSTALS AND TREES 29 7.5. Satisfying an identity. The analogy of Theorem 6.9 for the Baxter monoid is the following: Theorem 7.9. The Baxter monoid satisfies the identity xyxyxy = xyyxxy. Proof. Let x, y ∈ A∗ . The proof that xyxyxy = xyyxxy proceeds by reverse induction on the weight of xyxyxy. The base case of the induction is when xyxyxy is highest-weight. By reasoning parallel to the proof of Theorem 6.9, xyyxxy is also highest-weight. Clearly wt(xyxyxy) = wt(xyyxxy). Again by reasoning parallel to the proof of Theorem 6.9, the trees TR (xyxyxy) and TR (xyyxxy) are equal. By dual reasoning, the trees TR (xyxyxy) and TR (xyyxxy) are equal. The induction step is essentially identical to the proof of Theorem 6.9, except that ǫ̈i (xyxyxy) = 3ǫ̈i (x) + 3ǫ̈i (y) = ǫ̈i (xyyxxy) applications of ëi change every symbol i + 1 to i. The result follows.  For an alternative proof of Theorem 7.9 that does not require the quasicrystal structure, see [CM, Section 3.5]. 8. Perspectives 8.1. The Robinson–Schensted type correspondences. The graphs Γ(hypo), Γ(sylv) and Γ(baxt) are all the same object; the difference is in the notion of ‘isomorphic’ components. In terms of the hypoplactic, sylvester, and Baxter versions of the Robinson–Schensted correspondence, the Q-symbol of a word identifies a connected component of the graph, and the P-symbol of a word identifies its position within that connected component. Viewed in this context, the sylvester and Baxter Q-symbols are overdetermined. The ‘underlying’ Q-symbol of a word u ∈ A∗ is std(u), which lies in the same component as u. This corresponds with the notions of ‘compatibility with the destandardization process’ and std-goodness developed by [Pri13]. 8.2. Bases of combinatorial Hopf algebras. In the infinite-rank setting, there is a very natural connection between the crystal graph Γ(plac) and free Schur functions. The free Schur functions are indexed by standard Young tableau and form a basis for the algebra of free symmetric functions FSym. The crystal graph offers an equivalent way of defining them: X ST = w, w∈Γ(plac,T ) where Γ(plac, T ) denotes the connected component of Γ(plac) corresponding to a standard Young tableau T . Similarly, the free quasi-ribbon functions, which form a basis for FQSym can be defined with reference to the quasi-crystal graph: X Fu = w, w∈Γ(hypo,u) where u ∈ A∗ is a standard word; this follows from the fact that standard words index connected components of Γ(hypo). 30 ALAN J. CAIN AND ANTÓNIO MALHEIRO For the basis of the algebra of planar binary trees PBT given by [HNT05, Eqs (16–17)] (see also [Hiv07, Theorem 27]), the definition using the quasicrystal graph becomes: X PT = w, w∈Γ(sylv,U ) Sh(U )=T where T is a binary tree, U ranges over the set of decreasing trees and Γ(sylv, U ) denotes the connected component of Γ(sylv) indexed by the decreasing tree U . For the basis of the algebra Baxter given in [Gir12, Theorem 6.12], the definition using the quasi-crystal graph is: X w, P′ (TL ,TR ) = w∈Γ(baxt,(UL ,UR )) Sh(UL ,UR )=(TL ,TR ) where (TL , TR ) is a pair of twin binary trees, (UL , UR ) ranges over the set of pairs made up of increasing and a decreasing tree with the same infix reading and Γ(baxt, (UL , UR )) denotes the connected component of Γ(baxt) indexed by the pair (UL , UR ). 8.3. Speculations. In the quasi-crystal structure for the hypoplactic monoid, one constructs the graph using the quasi-Kashiwara operators and one defines the congruence using labelled directed graph isomorphisms of connected components. If one replaces the quasi-Kashiwara operators with the original Kashiwara operators, one obtains the plactic monoid. On the other hand, if one requires that labelled directed graph isomorphisms be shape-preserving, one obtains the sylvester and Baxter monoids. It is thus natural to ask what monoids arise when one makes both replacements and considers shapepreserving isomorphisms on the graph arising from the original Kashiwara operators (see Figure 5). (If one uses the abstract notion of shape defined in Section 5 and the original Kashiware operators, axiom S1 should probably be replaced with ‘invariance under the Kashiwara operators’, which is a natural analogue in light of the discussion following axioms S1 and S2. Alternatively, one could seek a natural analogue of standardization for the original Kashiwara operators.) References [BW91] G. Brightwell & P. Winkler. ‘Counting linear extensions’. Order, 8, no. 3 (1991), pp. 225–242. doi: 10.1007/BF00383444. [CGM] A. J. Cain, R. D. Gray, & A. Malheiro. ‘Crystal monoids & crystal bases: rewriting systems and biautomatic structures for plactic monoids of types An , Bn , Cn , Dn , and G2 ’. arXiv: 1412.7040. [CGM17] A. J. Cain, R. D. Gray, & A. Malheiro. ‘On finite complete rewriting systems, finite derivation type, and automaticity for homogeneous monoids’. Inform. and Comput., 255, no. 1 (2017), pp. 68–93. doi: 10.1016/j.ic.2017.05.003. [CM] A. J. Cain & A. Malheiro. ‘Identities in plactic, hypoplactic, sylvester, Baxter, and related monoids’. arXiv: 1611.04151. [CM17] A. J. Cain & A. Malheiro. ‘Crystallizing the hypoplactic monoid: from quasiKashiwara operators to the Robinson–Schensted–Knuth-type correspondence for quasi-ribbon tableaux’. J. Algebraic Combin., 45, no. 2 (2017), pp. 475–524. doi: 10.1007/s10801-016-0714-6. Q ra wa hi as rs K to si- era ua op ? Is om or ph ism s 31 ra wa s hi tor as a K p er o Sh a iso pem pr o r es ph er ism vin s g CRYSTALS AND TREES sylv baxt plac hypo Figure 5. (Quasi-)-Kashiwara operators, notions of isomorphisms, and monoids. [Ful97] W. Fulton. Young Tableaux: With Applications to Representation Theory and Geometry. No. 35 in LMS Student Texts. Cambridge University Press, 1997. [Gir12] S. Giraudo. ‘Algebraic and combinatorial structures on pairs of twin binary trees’. J. Algebra, 360 (2012), pp. 115–157. doi: 10.1016/j.jalgebra.2012.03.020. [Gre06] J. Green. Polynomial Representations of GLn. No. 830 in Lecture Notes in Mathematics. Springer, 2nd edition, 2006. doi: 10.1007/3-540-46944-3. [Hiv00] F. Hivert. ‘Hecke algebras, difference operators, and quasi-symmetric functions’. Advances in Mathematics, 155, no. 2 (2000), pp. 181–238. doi: 10.1006/aima.1999.1901. [Hiv07] F. Hivert. ‘An Introduction to Combinatorial Hopf Algebras: Examples and realizations’. In J.-P. Gazeau, J. Nešetřil, & B. Rovan, eds, Physics and Theoretical Computer Science: From Numbers and Languages to (Quantum) Cryptography, no. 7 in NATO Security through Science Series D: Information and Communication Security. IOS Press, 2007. [HNT05] F. Hivert, J.-C. Novelli, & J.-Y. Thibon. ‘The algebra of binary search trees’. Theoret. Comput. Sci., 339, no. 1 (2005), pp. 129–165. doi: 10.1016/j.tcs.2005.01.012. [Jed11] F. Jedrzejewski. ‘Plactic classification of modes’. In C. Agon, M. Andreatta, G. Assayag, E. Amiot, J. Bresson, & J. Mandereau, eds, Mathematics and Computation in Music, no. 6726 in Lecture Notes in Comput. Sci., pp. 350–353. Springer, 2011. doi: 10.1007/978-3-642-21590-2 31. [Kas90] M. Kashiwara. ‘Crystalizing the q-analogue of universal enveloping algebras’. Comm. Math. Phys., 133, no. 2 (1990), pp. 249–260. url: http://projecteuclid.org/euclid.cmp/1104201397. [Kas91] M. Kashiwara. ‘On crystal bases of the q-analogue of universal enveloping algebras’. Duke Mathematical Journal, 63, no. 2 (1991), pp. 465–516. doi: 10.1215/S0012-7094-91-06321-0. [KN94] M. Kashiwara & T. Nakashima. ‘Crystal graphs for representations of the qanalogue of classical Lie algebra’. J. Algebra, 165, no. 2 (1994), pp. 295–345. doi: 10.1006/jabr.1994.1114. [Knu98] D. E. Knuth. The Art of Computer Programming: Sorting and Searching, vol. 3. Addison-Wesley, 2nd edition, 1998. 32 [KT97] [KT99] [Lot02] [LS78] [LS81] [LS85] [LS90] [Mac08] [Nov00] [Pri13] [Sch97] [Shi05] [vL01] ALAN J. CAIN AND ANTÓNIO MALHEIRO D. Krob & J.-Y. Thibon. ‘Noncommutative Symmetric Functions IV: Quantum Linear Groups and Hecke Algebras at q = 0’. Journal of Algebraic Combinatorics, 6, no. 4 (1997), pp. 339–376. doi: 10.1023/A:1008673127310. D. Krob & J.-Y. Thibon. ‘Noncommutative Symmetric Functions V: A Degenerate Version of uq (gln )’. Int. J. Algebra Comput., 9, no. 3–4 (1999), pp. 405–430. doi: 10.1142/S0218196799000254. M. Lothaire. Algebraic Combinatorics on Words. No. 90 in Encyclopedia of Mathematics and its Applications. Cambridge University Press, 2002. A. Lascoux & M.-P. Schützenberger. ‘Sur une conjecture de H. O. Foulkes’. C. R. Acad. Sci. Paris Sér. A-B, 286, no. 7 (1978), pp. A323–A324. A. Lascoux & M.-P. Schützenberger. ‘Le monoı̈de plaxique’. In Noncommutative structures in algebra and geometric combinatorics, no. 109 in Quaderni de ”La Ricerca Scientifica”, pp. 129–156, Rome, 1981. CNR. url: http://igm.univ-mlv.fr/~ berstel/Mps/Travaux/A/1981-1PlaxiqueNaples.pdf. A. Lascoux & M.-P. Schützenberger. ‘Schubert polynomials and the LittlewoodRichardson rule’. Lett. Math. Phys., 10, no. 2-3 (1985), pp. 111–124. doi: 10.1007/BF00398147. A. Lascoux & M.-P. Schützenberger. ‘Tableaux and noncommutative Schubert polynomials’. Funct. Anal. Its. Appl., 23, no. 3 (1990), pp. 223–225. doi: 10.1007/BF01079531. I. Macdonald. Symmetric Functions and Hall Polynomials. Clarendon Press, Oxford University Press, 2008. J.-C. Novelli. ‘On the hypoplactic monoid’. Discrete Mathematics, 217, no. 1–3 (2000), pp. 315–336. doi: 10.1016/S0012-365X(99)00270-8. J.-B. Priez. ‘A lattice of combinatorial Hopf algebras: Binary trees with multiplicities’. In Formal Power Series and Algebraic Combinatorics, Nancy, 2013. The Association. Discrete Mathematics & Theoretical Computer Science. url: http://www.dmtcs.org/pdfpapers/dmAS0196.pdf. M.-P. Schützenberger. ‘Pour le monoı̈de plaxique’. Mathématiques et sciences humaines, 140 (1997). url: http://msh.revues.org/2764. M. Shimozono. ‘Crystals for dummies’, 2005. Notes. url: http://www.aimath.org/WWN/kostka/crysdumb.pdf. M. A. van Leeuwen. ‘The Littlewood-Richardson Rule, and Related Combinatorics’. In J. R. Stembridge, J.-Y. Thibon, & M. A. van Leeuwen, eds, Interaction of Combinatorics and Representation Theory, pp. 95–145, Tokyo, 2001. Mathematical Society of Japan. doi: 10.2969/msjmemoirs/01101C030. Centro de Matemática e Aplicações, Faculdade de Ciências e Tecnologia, Universidade Nova de Lisboa, 2829–516 Caparica, Portugal E-mail address: [email protected] Centro de Matemática e Aplicações and Departamento de Matemática, Faculdade de Ciências e Tecnologia, Universidade Nova de Lisboa, 2829–516 Caparica, Portugal E-mail address: [email protected]
4math.GR
Robust Detection in Leak-Prone Population Protocols Dan Alistarh15? , Bartłomiej Dudek2 , Adrian Kosowski3?? , David Soloveichik4? ? ? , and Przemysław Uznański1 arXiv:1706.09937v1 [cs.DS] 29 Jun 2017 1 ETH Zürich, Switzerland University of Wrocław, Poland Inria Paris and IRIF, Université Paris Diderot, France 4 University of Texas, Austin, TX, USA 5 IST Austria 2 3 {dan.alistarh,przemyslaw.uznanski}@inf.ethz.ch,[email protected], [email protected], [email protected]. Abstract. In contrast to electronic computation, chemical computation is noisy and susceptible to a variety of sources of error, which has prevented the construction of robust complex systems. To be effective, chemical algorithms must be designed with an appropriate error model in mind. Here we consider the model of chemical reaction networks that preserve molecular count (population protocols), and ask whether computation can be made robust to a natural model of unintended “leak” reactions. Our definition of leak is motivated by both the particular spurious behavior seen when implementing chemical reaction networks with DNA strand displacement cascades, as well as the unavoidable side reactions in any implementation due to the basic laws of chemistry. We develop a new “Robust Detection” algorithm for the problem of fast (logarithmic time) single molecule detection, and prove that it is robust to this general model of leaks. Besides potential applications in single molecule detection, the error-correction ideas developed here might enable a new class of robustby-design chemical algorithms. Our analysis is based on a non-standard hybrid argument, combining ideas from discrete analysis of population protocols with classic Markov chain techniques. 1 Introduction A major challenge in designing autonomous molecular systems is to achieve a sufficient degree of error tolerance despite the error-prone nature of the chemical substrate. While considerable effort has focused on making the chemistry itself more robust, here we look at the possibility of developing chemical algorithms that ? ?? ??? Supported by an SNF Ambizione Fellowship. Supported by Inria project GANG, ANR project DESCARTES, and NCN grant 2015/17/B/ST6/01897. Supported by NSF grants CCF-1618895 and CCF-1652824. are inherently resilient to the types of error encountered. Before designing robust chemical algorithms, we must decide on a good error model that is relevant to the systems we care about. In this paper we focus on a very simple and general error model that is motivated both by basic laws of chemistry as well as by implementation artifacts in strand displacement constructions for chemical reaction networks. We begin by listing the types of errors we aim to capture. Leaks due to Law of Catalysis. A fundamental law of chemical kinetics is that for every catalyzed reaction, there is an uncatalyzed one that occurs at a (often much) slower rate. By a catalytic reaction, we mean a reaction that involves some species X but does not change its amount; this species is called a catalyst of that reaction. For example, the reaction X + Y → X + Z is catalytic, and species X is the catalyst since its count remains unchanged by the firing of this reaction. By the law of catalysis, reaction X + Y → X + Z must be accompanied by a (slower) leak reaction Y → Z. (A more general formulation of the law of catalysis is that if any sequence of reactions does not change the net count of X, then there is a pathway that has the same effect on all the other species, but can occur in the absence of X (possibly much slower). Thus for example, if X + Y → W and W → X + Z are two reactions, then there must also be a leak reaction Y → Z. Formally defining catalytic cycles and catalysts is non-trivial and is beyond the scope of this paper [1].) Leaks due to Law of Reversibility. Another fundamental law of chemical kinetics is that any reaction occurs also in the reverse direction at some (possibly much slower) rate. In other words, reaction X + Y → Z + W must be accompanied by Z + W → X + Y . (The degree of reaction reversibility is related to the freeenergy use, such that irreversible reactions would require “infinite” free energy.) Leaks due to Spurious Activation in Strand-Displacement Cascades. Arbitrary chemical reaction networks can in principle be implemented with DNA strand displacement cascades [2,3]. Implementations based on strand displacement also suffer from the problem of leaks [4]. The implementation of a reaction like X + Y → Z + W consists of “fuel” complexes present in excess, that hold Z and W sequestered. A cascaded reaction of the fuel complex with X and Y results in the release of active Z and W . Leaks in this case consist of Z and W becoming spuriously activated, even in the absence of active X or Y . Importantly, for a catalytic reaction such as X + Y → X + Z, it is possible to design a strand displacement implementation that does not leak the catalyst X. This implementation would release the same exact molecule of X as was consumed to initiate the process, as in the catalytic system described in [5]. Since fuels do not hold X sequestered, X cannot be produced in the leak process (although Z can). Modeling Reactions and Leaks. Note that in all cases above, we can guarantee that a species does not leak if it is exclusively a catalyst in every reaction it occurs in. This allows us some handle on the leak. In particular, we will ensure that the species we are trying to detect (called D below) will be a catalyst in every reaction that involves it. Otherwise, there might be a leak pathway to generating D itself—which is fundamentally irrecoverable. We express the implementations below in the population protocol formalism [6]. That is, we consider a system with n molecules (aka nodes), which interact uniformly at random in a series of discrete steps. A population protocol is given as a set of reactions (aka transition rules) of the form A + B → C + D. Note that unlike general reaction networks, population protocols conserve total molecular count since molecules never combine or split. For this reason, compared to general chemical reaction networks, this model is easier to analyze. Given the set of reactions defining a protocol, we partition the species into catalytic states, which never change count as a consequence of any reaction, and non-catalytic, otherwise. Crucially, we model leaks as spurious reactions which can consume and create arbitrary non-catalytic species. More formally, a leak is a reaction of the type S → S0, where S and S 0 denote arbitrary non-catalytic species. In the following, we do not make any assumptions on the way in which these leak transitions are chosen (i.e., they could in theory be chosen adversarially), but we assume an upper bound on the rate at which leaks may occur in the system, controlled by a parameter β. Leak-Robust Detection. A computationally simple task which already illustrates the difficulty of information processing in such an error-prone system is single molecule detection. Consider a solution of n molecules, in which a single molecule D may or may not be present. Intuitively, the goal is to generate largescale (in the order of n) change in the system, depending on whether or not D is present or absent. Our time complexity measure is parallel time, defined as the number of pairwise interactions, divided by n. This measure of time naturally captures the parallelism of the system, where each molecule can participate in a constant number of interactions per unit time. Subject to leaks, our goal is to design the chemical interaction rules (formalized as a population protocol) to satisfy the following behavior. If D is present then it is detected fast, in logarithmic parallel time, and that the output is probabilistically “stable” in the sense that sampled at a random future time the system is in the “detected configuration” with high probability. By contrast, if D is absent, then the system sampled at a random future time should be in the “undetected configuration” with high probability. This basic task has several variations, for instance signal amplification or approximate counting of D. We first develop some intuition about this problem, by considering some strawman approaches. A first trivial attempt would be to have neutral molecules become “detectors” (state T ) as soon as they encounter D, that is, D + N → D + T. This approach suffers from two fatal flaws. First, it is slow, in that detection takes linear parallel time. Second, it has no way from recovering from leaks of the type N → T . A second attempt could try to implement an epidemic-style detection of D, that is: D + N →D + T T + N → T + T. This approach is fast, i.e. converges in logarithmic parallel time in case D is present. However, if D is not present, the algorithm converges to a false positive state: a leak of the type N → T brings the system to an all-T state, despite the absence of D. One could try to add a “neutralization” pathway by having T turn back to N after a constant number of interactions, but a careful analysis shows that this approach also fails to recover from leaks of the type N → T . Thus, it is not clear whether leak-resistant detection is possible in population protocols (or more generally chemical reaction networks). There has been considerable work in the algorithmic community on diffusion based models, e.g. [7]. However, such results do not seem to apply to this setting, since leak models have not been considered previously, and none of the known techniques are robust to leaks. In particular, it appears that techniques for deterministic computation in population protocols do not carry over in the presence of leaks. More generally, this seems to create an unfortunate gap between the algorithmic community, which designs and analyzes population protocols in leak-free models, and more practically-minded research, which needs to address such implementation issues. Contribution. In this paper, we take a step towards bridging this gap. We provide a general algorithmic model of leaks, and apply it to the detection problem. Specifically, our immediate goal is to elucidate the question of whether efficient, leak-robust detection is possible. We prove that the answer is yes. We present a new algorithm, called RobustDetect, which guarantees the following. Assume that the rate at which leaks occur is upper bounded by β/n  1/n, and that we return the output mapping (detect/non-detect) of a randomly chosen molecule after O(log n) parallel time. Then the probability of a false negative is at most 1/e + o(1), and the probability of a false positive is at most β. (Note that as the total molecular count n increases, the chance that a particular interaction involves D decreases linearly with n. Thus the leak rate must also decrease linearly with n, or else the leaks will dominate. Alternatively, we can view some fixed leak rate as establishing an upper bound on the molecular count n, see below. ) Algorithm Description. We now sketch the intuition behind the algorithm and its properties, leaving the formal treatment to Sections 4 and 5. Fix a parameter s ≥ 1, to be defined later. We define a set of “detecting” species X1 , . . . , Xs , arranged in consecutive levels. Whenever a molecule meets D, it moves to the highest “alert” level, X1 . Since leaks might produce this species as well, we decay it gracefully across s levels. More precisely, whenever a molecule at level Xi meets another molecule at level Xj , both molecules move to state Xmin(i,j)+1 . A molecule which would move beyond level Xs following a reaction becomes neutral, i.e. moves to species N . Nodes in state Xi with i < s turn N into Xi+1 , whereas molecules in state Xs also become neutral when interacting with N . Analysis. Intuitively, the algorithm’s dynamics for the case where a single molecule is in state D are as follows. The counts of molecules in state Xi tend to increase exponentially with the alert level i, up to levels ≈ log n, when the count becomes a constant fraction of n. However, once level log n is reached, these counts decrease doubly exponentially. Thus, it suffices to set s = log n to obtain that a fraction of at least (1 − 1/e) molecules are in one of the alert states Xi in case D is present. It is not hard to prove that leaks cannot meaningfully affect the convergence behavior in this case. The other interesting case is when D is not present, but leaks may occur, leading to possible false positives. Intuitively, we can model this case as one where states X1 at the highest alert level simply are created at a lower rate β/n  1/n. A careful analysis of this setting yields that the probability of a false positive (D detected, but not present) in this case is at most β, corresponding to the leak rate parameter. Our analysis technique works by characterizing the stationary behavior of the Markov chain corresponding to the algorithm, and the convergence properties (mixing time) of this chain. For technical reasons, the analysis uses a non-standard hybrid argument, combining ideas from discrete analysis of population protocols with classic Markov chain techniques. The argument proves that the algorithm always stabilizes to the correct output in logarithmic parallel time. The analysis further highlights a few interesting properties of the algorithm. First, if the detectable species D is present in a higher count k > 1, then the algorithm effectively skips the first log k levels, and thus requires log(n/k) + O(log log n) states. Second, it is not necessary to know the exact value of log n, as the counts of species past this threshold decrease doubly exponentially. Alternative Formulations. An alternative view of this protocol is as solving the following related amplification problem: we are given a signal of strength (rate) φ, and the algorithm’s behavior should reflect whether this strength is below or above some threshold. The detection problem requires us to differentiate thresholds set at β/n and 1/n, for constant β  1, but our analysis applies to more general rates. Above, we have assumed that the leak rate decreases linearly with n, to separate from the case where a single instance of D is present. However, it is also reasonable to consider that the leak rate is fixed, say, upper bounded by a constant λ. In this case, the analysis works as long as the number of molecules n satisfies λ  1/n. Self-stabilization. Our algorithm is self-stabilizing in the sense that if the count of D changes due to some external reason, the output quickly adapts (within logarithmic parallel time). This is particularly interesting if the algorithm is used in the context of a “control module” for a cell detecting D and the amount of D changes over time. Note that strawman solutions considered above cannot be “untriggered” once D has been detected, and thus cannot adapt to a changing input. 2 Related Work There is much work on attempting to decrease error in the underlying chemical substrate. A famous example includes kinetic proofreading [8]. In the context of DNA strand displacement systems in particular, leak reduction has been a prevailing topic [9]. Despite the importance of handling leaks, there are few examples of non-trivial algorithms, where leaks are handled through computation embedded in chemistry. One algorithm that appears to be able to handle errors is approximate majority [10], originally analyzed in a model where a fraction of the nodes are Byzantine, in that they can change their reported state in an adversarial way. Potentially due to its robustness properties, the approximate majority algorithm appears to be widely used in biological regulatory networks [11], and it was also one of the first chemical reaction network algorithms implemented with strand displacement cascades [4]. Our algorithm can be viewed as a timed, self-stabilizing version of rumor spreading. For analysis of simple rumor-spreading, see [12]. Other work include fault-tolerant rumor spreading [13], push-pull models [7] and self-stabilizing broadcasting [14]. A rumor-spreading formulation of the molecule detection problem is also considered in recent work [15], which relies on a different source amplification mechanism based on oscillator dynamics. This protocol [15] is self-stabilizing in a weaker (probabilistic) sense compared to the algorithms from this paper and does not provide leak robustness guarantees. 3 3.1 Preliminaries Population Protocols with Leaks Population Protocols. We start from a standard population protocol model, where n molecules (nodes) interact uniformly at random in a series of discrete steps. In our formulation, in each step, a coin is flipped to decide whether the current interaction is a regular reaction or a leak reaction. In the former case, two molecules are picked uniformly at random, and interact according to the rules of the protocol. In the latter case, a leak reaction occurs (see below). A population protocol is given as a set of reactions (transition rules) of the form A + B → C + D, (where some of A, B, C, D might be the same). We (arbitrarily) match the first reactant (A) with the first product (C), and the second reactant (B) with the second product (D), and think of A as changing state to C, and B as changing state to D. If the two molecules picked to interact do not have a corresponding interaction rule, then they don’t change state and we call this a null interaction. Population protocols are a special case of the stochastic chemical reaction networks kinetic model (e.g., [16](A.4)). Catalytic and Non-Catalytic Species. Given a set of reactions, we define the set of catalytic species as the set of states which never change as a consequence of any reaction. That is, for every reaction, the species is present in the same count both in the input and the output of the reaction. For example, in the reactions A+C →B+C A+B →A+D we call C catalytic. Note that A acts as a catalyst in the second reaction, but its count is changed by the first reaction, thus it is not overall catalytic. All species whose count is modified by some reaction are called non-catalytic. Note that it is possible that a species is never created, but disappears as a consequence of an interaction. For example, in the reaction L + L → A + B, L is such as species. We define such species as non-catalytic, since their creation is possible by the law of reversibility, and thus they can leak. An Algorithmic Model of Leaks. A leak is a reaction of the type S → S0 where S and S 0 are arbitrary non-catalytic species produced by the algorithm. Note that the input and output species of a leak may be the same (although in that case the reaction is trivial). In the following, we make no assumptions on the way in which the input and output of a leak reaction are chosen—we assume that they are chosen adversarially. Instead, we assume an absolute bound on the probability of a leak. We assume that each reaction is either a leak reaction or a normal reaction, which follows the algorithm. We formalize this as follows. Definition 1. Given an algorithm, defined by a set of reactions, the set of catalysts is the set of species whose count does not change as a consequence of any reaction. A leak is a spurious reaction, which changes an arbitrary non-catalytic species to an arbitrary non-catalytic species. The leak rate β/n is the probability that any given interaction is a leak reaction. 3.2 The Detection Problem In the following, we consider the following detection task: we are given a distinct species D, whose presence or absence must be detected by the algorithm, in the presence of leaks. More precisely, if the species D is present, then the algorithm should stabilize to a state in which molecules map to output value “detect”. Otherwise, if D is not present, then the algorithm should stabilize to a state in which molecules map to output value “non-detect”. To observe the algorithm’s output, we sample a molecule at random, and return its output mapping. (Alternatively, to boost accuracy, we can take a number of samples, and return the majority output mapping.) We require that species D are catalytic. 4 The Robust-Detect Algorithm Description. As given in the problem statement, we assume that there exists a distinguished species D, which is to be detected, and which never changes state. Our algorithm implements a chain of detection species X1 , . . . , Xs , for some parameter s, each of which maps to output “detect”, but with decreasing “confidence”. Further, we have a neutral species N , which maps to output “nondetect”. We assume that the parameter s = dlog ne, and that initially all molecules are in state N . We specify the transitions below, and provide the intuition behind them. Algorithm 1 D + Xi → D + X1 , D + N → D + X1 ∀i ∈ {2, . . . , s} Xs + Xs → N + N Xs + N → N + N Xi + Xj → Xmin(i,j)+1 + Xmin(i,j)+1 , Xi + N → Xi+1 + Xi+1 , ∀i, j ∈ {1, 2, . . . , s − 1} ∀i ∈ {1, 2, . . . , s − 1} The intuition behind the algorithm is as follows. The “detecting” species X1 , . . . , Xs are arranged in consecutive levels. Whenever a molecule meets D, it moves to the highest “alert” level, X1 . Since leaks might produce this species as well, we decay it gracefully across s levels. After going through these levels, a molecule moves to neutral state N , in case it is not brought back either by meeting D, or some molecule at a lower alert level. For this, whenever two of these species Xi and Xj meet, they both move to level min(i, j) + 1. This reaction has the double purpose of both decaying the alert level of the molecule at the lower level, and of bringing back the molecule with the higher alert level. Further, whenever a molecule at level Xi meets a neutral molecule N , it advances its level by 1. At the same time, neutral molecules are turned into detector molecules whenever meeting some molecule at an alert level smaller than s. Intuitive Dynamics. Roughly, the chain of alert levels have the property that, for the first ∼ log n levels, the count roughly doubles with level index. At the same time, past this point, counts exhibit a steep (doubly exponential) drop, so that a small constant fraction of molecules are always neutral. The presence of D acts like a trigger, which maintains the chain in “active” state. The analysis in the next section makes this intuition precise. These dynamics are illustrated in Figure 1. 5 Analysis Overview. We divide the analysis of the detection algorithm into two parts. First, we derive stationary probabilities of the underlying Markov chain of transitions of particles, by solving recursively the equations following from the 0.10 0.05 0 5 10 15 20 25 level i Level CDF dlog ne = 14 1.0 0.4 = 0.0 1 0.6 = 0.1 t 0.8 1D prese n 0.15 = 0.0 1 t 0.20 = 0.1 dlog ne = 14 0.25 (b) probability that a random molecule is one of D, X1 , . . . , Xi Number of molecules in level 1D prese n probability that a random molecule is Xi (a) 0.2 0 5 10 15 20 25 level i Fig. 1. Steady state probabilities of the Robust-Detect algorithm for n = 104 molecules. Three conditions are evaluated: (blue) 1 molecule of D is present and no leak (leak parameter β = 0); (orange, red) no D is present but with worst-case leak for falsepositives (leak reactions Xi → X1 and N → X1 ) (orange: leak parameter β = 0.01, red: leak parameter β = 0.1). (a) The probabilities of each level i. (b) The cumulative probabilities of levels ≤ i, capturing the probability that a random molecule is in a “detect” state. Note that it is enough to set the number of levels s = 14 = dlog ne to have both false positive and false negative error probabilities small, although for smaller leak rates (β = 0.01) increasing s beyond log n can help better distinguish true and false positives. Numerical probabilities are computed using equations (1) and (2). underlying dynamics. Later, we derive optimal bounds on the mixing time of this Markov chain—that is we show that probability distribution of states at every time t ≥ cn log n (for some constant c) is almost the same as the stationary distribution. Simplified Algorithm. For the purpose of analysis, let us consider a following rephrasing of the detection algorithm: molecule states are D, X1 , X2 , X3 , . . ., and interactions are as follows: Algorithm 2 D + Xi → D + X1 , Xi + Xj → Xmin(i,j)+1 + Xmin(i,j)+1 . This algorithm uses infinite number of states, thus it is useful only for purposes of theoretical analysis. However, it captures the behavior of the original algorithm in the following way: if in Algorithm 2 all states Xs+1 , Xs+2 , . . . are collapsed to N , the transitions are equivalent to Algorithm 1. However, formulation of Algorithm 2 is oblivious to parameter s, thus captures simultaneously the dynamics of all possible instances of Algorithm 1. 5.1 Stationary Analysis Let us consider an initial state when k ≥ 0 instances of state D are present, with special attention given to k = 0 and k = 1. Those molecules do not change their state. We can imagine tracking a particular molecule through its state transitions, such that its state can be expressed as a Markov chain. In the following, we will focus on analyzing the stationary distribution of this Markov chain. For any i ∈ {1, 2, . . . , s}, we let p?i be the stationary probability that a molecule chosen uniformly at random is in state Xi . We let p?0 = nk be the (stationary) probability that the molecule is in the state D. Let p?≤i = p?0 + . . . + p?i be the probability that a molecule is in any of the states D, X1 , . . . , Xi . Let us now analyze these stationary probabilities. Stable State with No Leaks. We first analyze the simplified case where no leaks occur. A molecule u is in one of states D, X1 , . . . , Xi at time t, in two cases: – It was in state D, X1 , . . . , Xi at time t − 1, and did not get selected for a reaction, which occurs with probability 1 − 2/n. – It got selected for a reaction with element u0 , and either u or u0 was in one of states D, X1 , . . . , Xi−1 . Hence, by stationarity, we get that   2 2 ? ? p≤i = p≤i 1 − + · (1 − (1 − p?≤(i−1) )2 ). n n From this we get that 1 − p?≤i = (1 − p?≤(i−1) )2 , which solves to  2i k p?≤i = 1 − 1 − . n (1) This gives us following estimates: if k ≥ 1, then p?i ≈ 2i−1 nk for i ≤ log(n/k). j Additionally, for i = log(n/k) + 1 + j, p?i ≈ e−2 . Thus, for i ≥ log(n/k) + Θ(log log n) in all practicalities p?i ≈ 0. To analyze the probability of detection when k = 1, we sum probabilities for all i from 0 to s = dlog ne Pr[detect] = s X  n 1 1 p?i = p?≤s ≥ 1 − 1 − ≥1− . n e i=0 Probability of False Positives with Leaks. A useful side effect of the previous analysis is that we also get probability bounds for detection in the case where D is not present, i.e. false positives. We model this case as follows. Assume that there exists an upper bound λ on the probability that a certain reaction is a leak. Examining the structure of the algorithm, we note that the worst-case adversarial application of leaks would be if this probability is entirely concentrated into leaks which produce species X1 . To preserve molecular count, we assume the following simplified leak model, which is equivalent to the general one, but easier to deal with in the confines of our algorithm. Each reaction is a leak with probability λ = β/n, where β  1 is a small constant. If a reaction is a leak, it selects a molecule at random, and transforms it into an arbitrary state. In this case, we will assume adversarially that all leaked molecules are transformed into state X1 . Notice that the assumption that β  1 is required to separate this setting from the case where D is present in the system, where the probability of producing state X1 is 2/n. We continue with calculations of p?0 , p?1 , . . . for the above formulation. Note that the recurrence relation for p?≤i , i ≥ 1 is changed as follows: – If at that round there was no leak, the transition probabilities are as previously. This happens with probability 1 − nβ . – If there was a leak, then the molecule either is selected as a leaked molecule (this happens with probability n1 · nβ ) or it was not selected as a leaked ? molecule, but it was already in the proper state (probability nβ · n−1 n p≤i ). The recursive formulation gives         2 1 n−1 ? 2 β β p?≤i = p?≤i 1 − + + + p≤i . 1 − (1 − p?≤(i−1) )2 1− n n n n n n Which is equivalent to 1 − p?≤i   1 − nβ  (1 − p?≤(i−1) )2 = β 1 − 2n leading to (using estimate (1 − nβ )/(1 − p?≤i β 2n ) ≈ (1 − β 2n ))  1+2+...+2i−1  2i −1 β β ≈1− 1− =1− 1− . 2n 2n (2) This gives us following estimates: p?i ≈ 2i−2 nβ for i ≤ log(2n/β). Additionally, j for i = log(2n/β) + 1 + j, p?i ≈ e−2 . Thus, for i ≥ log(2n/β) + Θ(log log n) in all practicalities p?i ≈ 0. This immediately implies that  2n s X β 1 ? ? Pr[detect] = pi = p≤s ≤ 1 − 1 − = 1 − β ≈ β, 2n e i=0 which means that the probability that a randomly chosen molecule is in detect state when chosen uniformly at random is at most β. Probability of False Negatives with Leaks. Under the same leak model, it is easy to notice that the “best” adversarial strategy for our algorithm in case D is present is to concentrate all leaks to create the neutral species N (or X∞ in case of Algorithm 2). It is easy to see that this just decreases the total probability of detect states by the leak probability λ = β/n. More formally, we compute once again stationary probabilities. The recurrent relation is p?≤i  = p?≤i  2 1− n    2 β β n−1 ? ? 2 + · (1 − (1 − p≤(i−1) ) ) 1− + · p . n n n n ≤i β β Using estimate (1 − nβ )/(1 − 2n ) ≈ (1 − 2n ) we reach   β (1 − (1 − p?≤(i−1) )2 ). p?≤i = 1 − 2n Thus we have for the first log(n/k) levels the dampening factor of (1 − β/(2n)) per level (compared to the leakless case). It can be easily shown by induction that  i  2i  2i β k k 1− 1− ≤ p?≤i ≤ 1 − . 2n n n The estimates for p?i follow from the leakless case, after taking into the account the composed dampening factor:   log n    s X β 1 log n 1 · 1− =1− −O β . Pr[detect] = p?i = p?≤s ≥ 1 − e 2n e n i=0 Finally, we summarize the results in this section as follows: Theorem 1. Assuming leak rate β/n for β  1, Robust-Detect guarantees the following. – The probability of a false positive is at most β. – The probability of a false negative is at most 1/e + O(β · (log n)/n). Notice that these probabilities can be boosted by standard sampling techniques. 5.2 Convergence Analysis We now proceed with an analysis of the convergence speed of the previously described protocols. To avoid separate analysis for each of the aforementioned cases (no leaks, false positives, false negatives) and to be independent from all possible initializations of the algorithm, we first start with showing that, under no leaks and with no D present, all states X1 , . . . , Xc are quickly killed. In this section, it is more convenient to use t to refer to the total number of interactions, rather than parallel time. To convert to parallel time, one needs to divide by n, the number of molecules. Lemma 1. Assume arbitrary (adversarial) initial state in t = 0 and evolution with no leaks (β = 0) and no D is present. For any c(n) ≥ 1, there is t = O(n · (c(n) + log n)) such that with probability 1 − 1/nΘ(1) (with high probability) there is no molecule in any of the states X1 , X2 , . . . , Xc(n) after t interactions. Proof. We assign a potential to each molecule, based on the state it is currently in: Φ(Xi ) = 3−i . We also define a global potential Φt as sum of all molecular potentials after t interactions. Observe, that when two molecules interact, following rule Xi + Xj → Xmin(i,j)+1 + Xmin(i,j)+1 , then there is: Φ(Xmin(i,j)+1 ) + Φ(Xmin(i,j)+1 ) ≤ 2/3 · (Φ(Xi ) + Φ(Xj )) , which can be interpreted that each interacting molecule loses at least 1/3 of its potential. Since each molecule participates in an interaction with probability n2 in each round, the following bound holds: X 2 1 Φt , E[Φt+1 − Φt |Φt ] ≥ · Pr(v interacts in round t) · Φt (v) = 3 3n v   2 Φt . E[Φt+1 |Φt ] ≤ 1 − 3n Substituting Φ0 ≤ n and fixing t ≥ 32 n ln(n · 3c(n) · nΘ(1) ) = O(n(c(n) + log n + Θ(log n))) we have t  c(n) Θ(1) 2 1 E[Φt ] ≤ 1 − · n ≤ e− ln(n·3 ·n ) · n = 3−c(n) · Θ(1) . 3n n By Markov’s inequality, this means that there is no molecule in any of the states X1 , X2 , . . . , Xc with probability at least 1 − n−Θ(1) , that is with high probability. t u We mention one additional useful property of Algorithm 2, that its actions on population are decomposable with respect to levels. That is, define levelt (u) = i if molecule u at time t is in state Xi , and levelt (u) = 0 if it is in state D. Observation 1 Let {u1 , u2 , . . . , un }, {v1 , v2 , . . . , vn }, {w1 , w2 , . . . , wn } be 3 disjoint populations each on n molecules, following evolution defined by Algorithm 2. Moreover, let their evolutions be coupled: at each time t, in each population the corresponding molecules interact (i.e., the interaction is ui + uj , vi + vj , wi + wj in the three populations for some i, j). If ∀i level0 (ui ) = min(level0 (vi ), level0 (wi )), then at any time t > 0 : ∀i levelt (ui ) = min(levelt (vi ), levelt (wi )). This observation can be naturally generalized to more than 3 populations. As shown below, the observation implies that to analyze detection under noisy start, we can decouple starting noise from detected particle and analyze evolution under those two separately. Denote by pi (t) and p≤i (t) the probability for a randomly picked molecule after t interactions to be in the state Xi or D, X1 , . . . , Xi respectively. Theorem 2. Fix arbitrary leak model (i.e. no leaks, false-positives, false-negatives) and arbitrary concentration of D. For any c ≥ 1, and t = Ω(n · (c + log n)), there is p?≤c − p≤c (t) ≤ 1/nΘ(1) , where p? is the stationary probability distribution of the identical process. Proof. First, for simplicity we collapse all states Xc+1 , Xc+2 , . . . into N , since it has no effect on p≤c distributions. Consider a population of size n, under no leaks, no D, evolution. By Lemma 1, in τ = O(n · (c + log n)) steps it reaches all-N state, regardless of initial configuration, with high probability. Thus evolution of any population {ui }, under no leaks, with D present, is a coupling (as in Observation 1) of following evolutions: – initial configuration of population {ui }, with each D replaced with N ; – for every timestep ti such that D interacted with Xi or N creating X1 , we couple a population with corresponding molecule set to X1 and every other molecule set to N , shifted in time so its evolution starts at time ti . Observe, that evolution of population of both types will reach all-N state in τ steps, with high probability. Thus, conditioned on this high probability, the configuration at any t ≥ τ is the result of coupling of all-N (result of evolution of first type population) with possibly several configurations of the second type, where at each timestep t0 ∈ [t − τ, t] such population was created independently with some probability only depending on n and k. However, the coupling we just described is invariant from the choice of t, as long as t ≥ τ . Thus, P for any t1 , t2 ≥ τ , t there is |p≤c (t1 ) − p≤c (t2 )| ≤ 1/nΘ(1) . Since p?≤c = limt→∞ 1t i=1 p≤c (i), the claimed bound follows. To take into account errors, we say that whenever there is a leak changing state of molecule v to some state S at time t, we change state of v at that time in all existing populations to N , and create new population where v has state S, and all other molecules are in N state. The same reasoning as in the error-less case follows, since switching molecules to N state it only speeds up convergence of populations to all-N state and since populations created due to leaks are created at each step with the same probability depending only on n and error model. t u 6 Simulation Results We simulated the Robust-Detect algorithm (Algorithm 1) using a modified version of the CRNSimulatorSSA Mathematica package [17]. Figure 2 shows the shape of typical trajectories when there is one molecule in state D (k = 1), compared with no molecules in state D (k = 0) but with the worst-case leak for falsepositives. Note that D is quickly detected if present, and if absent the system exhibits random perturbations that are quickly extinguished and are clearly distinguishable from the true positive case. Fig. 2. Typical time-evolution of the Robust-Detect algorithm (Algorithm 1). Three colors correspond to the three conditions described in Fig. 1: (blue) 1 molecule of D is present and no leak (leak parameter β = 0); (orange, red) no D is present but with worst-case false-positive leak Xi → X1 and N → X1 (orange: leak parameter β = 0.01, red: leak parameter β = 0.1). All Xi states map to output value “detect”, and thus we plot the sum of all their counts. (a) s = 14 layers, β = 0.1 (red). (b) s = 17 layers, β = 0.01 (orange). See Fig. 1 for the corresponding steady state probabilities. Note that with smaller leak (β = 0.01), it is possible to better distinguish true positives and false positives by increasing the number of layers (from 14 to 17). In all cases there are n = 104 molecules, and the initial configuration is all molecules in neutral state N . Parallel time (number of interactions divided by n) corresponds to the natural model of time where each molecule can interact with a constant number of other molecules per unit time. 7 Conclusions We have considered the problem of modeling and withstanding leaks in chemical reaction networks, expressed as population protocols. We have presented an arguably simple algorithm which is probabilistically correct under assumptions on the leak rate, and converges quickly to the correct answer. Beyond the specific example of robust detection, we hope that our results motivate more systematic modeling of leaks, and further work on algorithmic techniques to withstand them. As such errors appear to spring from the basic laws of chemistry, their explicit treatment appears to be necessary. The authors found it surprising that many of the algorithmic techniques developed in the context of deterministically correct population protocols might not carry over to implementations, due to their inherent non-robustness to leaks. In future work, we plan to perform an exhaustive examination of which of the current algorithmic techniques could be rendered leak-robust, and whether known algorithms can be modified to withstand leaks via new techniques. Another interesting avenue for future work is lower bounds on the set of computability or complexity of fundamental predicates in the leak model. Finally, we would like to examine whether our robust detection algorithm can be implemented in strand displacement systems. Acknowledgments. We thank Lucas Boczkowski and Luca Cardelli for helpful comments on the manuscript. References 1. M. Gopalkrishnan, “Catalysis in reaction networks,” Bulletin of mathematical biology, vol. 73, no. 12, pp. 2962–2982, 2011. 2. D. Soloveichik, G. Seelig, and E. Winfree, “DNA as a universal substrate for chemical kinetics,” Proceedings of the National Academy of Sciences, vol. 107, no. 12, pp. 5393–5398, 2010. 3. L. Cardelli, “Two-domain DNA strand displacement,” Mathematical Structures in Computer Science, vol. 23, no. 02, pp. 247–271, 2013. 4. Y.-J. Chen, N. Dalchau, N. Srinivas, A. Phillips, L. Cardelli, D. Soloveichik, and G. Seelig, “Programmable chemical controllers made from DNA,” Nature Nanotechnology, vol. 8, no. 10, pp. 755–762, 2013. 5. D. Y. Zhang, A. J. Turberfield, B. Yurke, and E. Winfree, “Engineering entropydriven reactions and networks catalyzed by DNA,” Science, vol. 318, no. 5853, pp. 1121–1125, 2007. 6. D. Angluin, J. Aspnes, Z. Diamadi, M. Fischer, and R. Peralta, “Computation in networks of passively mobile finite-state sensors,” Distributed Computing, vol. 18, pp. 235–253, 2006, preliminary version appeared in PODC 2004. 7. R. M. Karp, C. Schindelhauer, S. Shenker, and B. Vöcking, “Randomized rumor spreading,” in 41st Annual Symposium on Foundations of Computer Science, FOCS 2000. IEEE Computer Society, 2000, pp. 565–574. 8. J. J. Hopfield, “Kinetic proofreading: a new mechanism for reducing errors in biosynthetic processes requiring high specificity,” Proceedings of the National Academy of Sciences, vol. 71, no. 10, pp. 4135–4139, 1974. 9. C. Thachuk, E. Winfree, and D. Soloveichik, “Leakless DNA strand displacement systems,” in DNA Computing and Molecular Programming. Springer, 2015, pp. 133–153. 10. D. Angluin, J. Aspnes, and D. Eisenstat, “A simple population protocol for fast robust approximate majority,” Distributed Computing, vol. 21, no. 2, pp. 87–102, 2008. 11. L. Cardelli, “Morphisms of reaction networks that couple structure to function,” BMC Systems Biology, vol. 8, no. 1, p. 84, 2014. 12. B. Pittel, “On spreading a rumor,” SIAM Journal on Applied Mathematics, vol. 47, no. 1, pp. 213–223, 1987. 13. B. Doerr, C. Doerr, S. Moran, and S. Moran, “Simple and optimal randomized fault-tolerant rumor spreading,” Distributed Computing, vol. 29, no. 2, pp. 89–104, 2016. 14. L. Boczkowski, A. Korman, and E. Natale, “Minimizing message size in stochastic communication patterns: Fast self-stabilizing protocols with 3 bits,” in Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, pp. 2540–2559. 15. B. Dudek and A. Kosowski, “Spreading a confirmed rumor: A case for oscillatory dynamics,” CoRR, vol. abs/1705.09798, 2017. 16. D. Soloveichik, “Robust stochastic chemical reaction networks and bounded tauleaping,” Journal of Computational Biology, vol. 16, no. 3, pp. 501–522, 2009. 17. http://users.ece.utexas.edu/~soloveichik/crnsimulator.html.
8cs.DS
1 LOOP Descriptor: Local Optimal Oriented Pattern arXiv:1710.09317v2 [cs.CV] 2 Feb 2018 Tapabrata Chakraborti, Brendan McCane, Steven Mills and Umapada Pal Abstract—This letter introduces the LOOP binary descriptor (local optimal oriented pattern) that encodes rotation invariance into the main formulation itself. This makes any post processing stage for rotation invariance redundant and improves on both accuracy and time complexity. We consider fine-grained lepidoptera (moth/butterfly) species recognition as the representative problem since it involves repetition of localized patterns and textures that may be exploited for discrimination. We evaluate the performance of LOOP against its predecessors as well as few other popular descriptors. Besides experiments on standard benchmarks, we also introduce a new small image dataset on NZ Lepidoptera. Loop performs as well or better on all datasets evaluated compared to previous binary descriptors. The new dataset and demo code of the proposed method are to be made available through the lead author’s academic webpage and GitHub. Keywords—Local Binary Patterns, Collaborative Representation, Local Optimal Oriented Pattern (LOOP), Fine-grained Recognition. I. I NTRODUCTION Local binary descriptors have been shown to be effective encoders of repeated local patterns for robust discrimination in several visual recognition tasks [1]. He and Wang [2], in their seminal paper on the subject, introduced the concept of textons. These encode localized textures/patterns in an image into binary words, and the frequency histogram of these words describes the image. The first popular implementation was local binary pattern (LBP) by Ojala et al [3]. Since then, many interesting modifications and improvements of these descriptors have been developed. A few of these are modified census transform (MCT) [4], local gradient pattern (LGP) [5], local directional pattern (LDP) [6], uniform local binary pattern (ULBP) [17], etc. LBP encodes the local intensity variation in the 3 × 3 neighborhood of each image pixel into a binary word, the decimal equivalent of which then acts as a representative feature encapsulating the pattern of local intensity variation in that neighborhood. The histogram of the LBP values over all pixels of an image serves as the descriptor for that image. MCT [4] is a modified version of LBP, where instead of taking the central pixel intensity of the neighborhood as the threshold, the average intensity over the entire neighborhood is treated as the threshold while forming the binary word. LGP [5] considers the gradient of neighboring pixel intensities with respect to the central pixel intensity to generate the binary word. Both MCT and LGP Tapabrata Chakraborti, Brendan McCane and Steven Mills are with the Department of Computer Science, University of Otago, NZ. e-mail: tapabrata;mccane;steven at cs.otago.ac.nz. Umapada Pal is with the Computer Vision and Pattern Recognition Unit at the Indian Statistical Institute. e-mail: umapada at isical.ac.in. were demonstrated to be more robust to noise than the original LBP operator [5],[6]. LDP was proposed by Jabid et al. [6] as a more noise invariant alternative to LBP. It incorporates the outputs of the 3 × 3 Kirsch masks in 8 directions, for each pixel, into a binary word and its corresponding decimal value is the desired LDP value, corresponding to that pixel. An inherent shortcoming of both LBP and LDP, as well as many of the other related descriptors like MCT, LGP, etc., is that each assigns an ad hoc bias while sequencing the generated binary digits to form the binary word. This is because the choice of the initial pixel of this circular sequence of bits determines the binary-to-decimal conversion weight assigned to each of the binary digits, as explained later in the paper. This adds an inherent rotation variance. A few rotation invariant versions have also been suggested in existing literature, like LDPri [16] for LDP. But these have their own set of limitations and the present work presents an alternative rotation invariant scheme. The main contributions of this paper are: 1) LOOP descriptor: We encapsulate rotation invariance into the main formulation of local binary descriptor, thus overcoming a drawback of most existing descriptors of the genre. In the process we decrease post processing time complexity and increase accuracy of classification. The demo code for LOOP will be made available through the lead author’s GitHub account. 2) NZ Lepidoptera dataset: We present a new finegrained image dataset of NZ Lepidoptera. Small finegrained datasets can have significant real life applications, like native/endemic species recognition and biodiversity analysis. It is difficult to effectively train deep networks on such small specialized datasets, and hence fine-tuned approaches like the present one still have practical significance. The dataset will soon be available at the lead author’s academic webpage. Note that though we have shown the efficacy of the proposed method on butterfly and moth species recognition, the methodology may be applied to other similar applications exhibiting repeated local patterns/textures. II. P REVIOUS D ESCRIPTORS A brief review of LBP and LDP is presented here, since the proposed LOOP descriptor is an improvement designed on them. A. Local Binary Pattern (LBP) LBP [3] is a popular descriptor which captures the local intensity variation patterns of an image and has good discrimination characteristics. 2 Let ic be the intensity of an image I at pixel (xc , yc ) and in (n = 0, . . . , 7) be the intensity of a pixel in the 3 × 3 neighborhood of (xc , yc ) excluding the center pixel ic . Then the LBP value for the pixel (xc , yc ) is given by LBP (xc , yc ) = 7 X s(in − ic ).2n (1) n=0 where  s(x) = if x ≥ 0 otherwise 1 0 (2) A major disadvantage of LBP is the arbitrary sequence of binarization weights. Depending on the chosen starting pixel of the sequence of binary weights (2n , n = 0, . . . , 7), the 8 neighbors of the output 3 × 3 grid are allocated subsequent weightage n sequentially. There is no clear logic behind the proper assignment of weight and the result obtained is susceptible to rotation variance. The same pattern rotated between images of the same class or even within different parts of the same image will generate a different binary word, thereby confounding the classification process. In fact, this bias has persisted over to other related descriptors as well, like LDP, MCT, LGP, etc. B. Local Directional Pattern (LDP) LDP is an improved local pattern descriptor which incorporates a directional component by using Kirsch compass kernels. It was shown to be less susceptible to noise than the traditional LBP operator [6]. Let ic be the intensity of an image I at pixel (xc , yc ) and in , n = 0, 1, . . . , 7 be the intensity of a pixel in the 3 × 3 neighborhood of (xc , yc ) excluding the center pixel ic . 3 × 3 Kirsch edge detectors centered at (xc , yc ) in eight possible directions are given in Fig. 1. The 8 responses of the Kirsch masks are mn , n = 0, . . . , 7 corresponding to pixels with intensity in , n = 0, . . . , 7 and let mk be the k th highest Kirsch activation. Then all the neighboring pixels having Kirsch response higher than mk is assigned 1, and others 0. But the empirically assigned value of k is ad hoc [6]. This fixes the possible number of ones to k −1 and number of zeros to (n + 1 − (k − 1) = n − k + 2 where n is as defined above by the neighborhood pixel number. Hence the possible number of n+1 binary words is reduced from 2(n+1) to Ck−1 . Then the LDP value for the pixel (xc , yc ) is given by LDPk (xc , yc ) = 7 X s(mn − mk ).2n as in previous formulations. Thus it assigns an emperical rule to the starting point of the binary word construction. However, it suffers from the self-imposed restriction of always having a leading 1, which immediately reduces the number of available combinations in the binary word by half. The problem of fixed number of 1s and 0s also persists from the original LDP, depending on the value of the threshold k. III. P ROPOSED M ETHODOLOGY The proposed Local Optimal Oriented Pattern (LOOP) is described here in details. A. Local Optimal Oriented Pattern (LOOP) As discussed earlier, the major disadvantage of LBP and LDP is the arbitrary sequence of binarization weights that adds dependancy to orientation. LDP also suffers from the empirical assignment of value to the threshold variable, which puts an ad hoc restriction on the number of bits allowed to be 1, thus reducing the number of possible words, as discussed before. LOOP presents a non-linear amalgamation of LBP and LDP that overcomes these drawbacks while preserving the strengths of each. Let ic be the intensity of an image I at pixel (xc , yc ) and in (n = 0, 1, . . . , 7) be the intensity of a pixel in the 3 × 3 neighborhood of (xc , yc ) excluding the center pixel ic . The 8 Kirsch masks, as used in LDP previously, are oriented in the direction of these 8 neighboring pixels in (n = 0, 1, . . . , 7) thus giving a measure of the strength of intensity variation in those directions, respectively. This leads us to propose the incorporation of this information by assigning the binarization weight to each neighboring pixel corresponding to the strength of Kirsch output in the direction of that pixel. The underlying rationale behind this approach is that the Kirsch mask output in a particular direction provides an indication of the probability of occurrence of an edge in that direction. Since the LBP indicates the intensity variation over the neighboring pixels in the same directions, the value of the Kirsch output is employed to assign the decimalto-binary weightage. As discussed earlier, the 8 responses of the Kirsch masks are mn corresponding to pixels with intensity in , n = 0, . . . , 7 Each of these pixels are assigned an exponential wn (a digit between 0 and 7) according to the rank of the magnitude of mn among the 8 Kirsch mask outputs. Then the LOOP value for the pixel (xc , yc ) is given by (3) LOOP (xc , yc ) = n=0 where  s(x) = 1 0 7 X s(in − ic ).2wn (5) n=0 if x ≥ 0 otherwise where (4) Rotation Invariant LDP (LDP ri ): A rotation invariant version is introduced in [16]. Here the neighbor pixel with highest Kirsch mask output is assigned the highest order in the binary word, and then the other bits are taken sequentially  s(x) = 1 0 if x ≥ 0 otherwise (6) Thus the LOOP descriptor encodes rotation invariance into the main formulation. Moreover, the proposed LOOP algorithm also negates the empirical assignment of the value of the parameter k in the traditional LDP method (eqn. 3). 3 (a) Admiral (b) Blue (c) Copper (d) Ringlet (e) Erebidae (f) Geometridae (g) Hepialidae (h) Noctuidae Fig. 2: Sample images from each class of the new NZ Lepidoptera dataset. It has 640 images currently with 80 images per class. (a)-(d) are butterfly species & (e)-(h) are moth species. IV. Fig. 1: Numerical Example to calculate LBP, LDP and LOOP. B. Scale and Rotation Invariance A multi-scaled amalgamated histogram is constructed to achieve scale-independence. This is done by forming a spatial gaussian pyramid and then concatenating the histograms of LOOP values obtained at each scale to form the final histogram which acts as the descriptor for the image. Figure 1 illustrates the rotation invariance property of LOOP descriptor, compared to the lack thereof in LBP and LDP. As demonstrated in Figure 1, binary words are formed according to LBP rule and the weights are assigned according to the LDP mask activations. Tie break in weight assignment: Referring to Figure 1, the one with more differing nearest neighbour is assigned higher weight. Eg. For the two -2155 for pattern 2, the nearest neighbours for one are -2155 and -275 (difference is 1880) while nearest neighbours for the other are -2155 and -2035 (difference is 120). So the former is assigned higher weight than latter (21 vs. 20 ). E XPERIMENTS AND R ESULTS A. Experimental Setup Datasets. 3 image datasets of moth and butterfly species have been used to showcase the performance of the methods. Leeds butterfly dataset [7] was built in 2009 at the University of Leeds, UK. It contains 832 images of 10 species of butterflies with 55 to 100 images per catagory. Ponce butterfly dataset [8] was built by the Ponce Group at Beckman Institute, University of Illinois at Urbana-Champaign in 2004. It has 7 butterfly types with a total of 619 images. The smallest class contains 42 images and the largest class has 111 images. NZ Lepidoptera dataset is a new benchmark built during this work at the Department of Computer Science, University of Otago, NZ in collaboration with the CVPR Unit, Indian Statistical Institute. It has 8 classes of NZ butterflies and moths, 4 categories each. Currently it has 640 images with 80 images per class, subject to expansion in near future. Images of NZ moths have been compiled from the publicly available database of NZ Landcare Research. Sample images of the NZ Lepidoptera dataset are presented in Figure 2. Classifiers. The collaborative representation classifier (CRC) [9] has been shown recently to be effective in handling small fine-grained datasets where the differences in objects between classes is subtle compared to randomized significant background variation within and between classes [10]. CRC represents the test image as an optimal weighted average of training images of all classes and the subsequent residual per class is used to calculate the predicted category. We adopt a recent Probabilistic formulation of CRC called ProCRC [11]. For comparison with a popular off-the-shelf classifier, a support vector machine (SVM) [12] with a χ2 kernel is chosen with settings as in the ProCRC paper [11] for fair comparison. Multiclass categorization is performed with the binary SVM classifier in a one-versus-all fashion in turns. 4 TABLE I: Classification Accuracy (%) Leeds (a) Sample image (b) LOOP output Fig. 3: Standard test image (rice.png) and the LOOP output. Descriptors. We compare the performance of several local binary pattern encoders like LBP, MCT, LDP, LDPri , LGP with the proposed LOOP descriptor. Among these, LOOP is built influenced by LBP and LDP, while MCT and LGP are chosen as relevant modifications of these methods. LDPri is a rotation invariant modification of LDP. We also compare with three popular modern binary descriptors: BRIEF (Binary Robust Independent Elementary Features) [13], BRISK (Binary Robust Invariant Scalable Keypoints) [14], and ORB (Oriented FAST and rotated BRIEF) [15]. BRIEF was the first of these and presents a simple configuration similar to LBP, without rotation invariance. ORB descriptor is rotation invariant and uses an optimal sampling pair. BRISK has both of these attributes and also has the additional characteristic of a more advanced hand-crafted sampling pattern composed of concentric rings. B. Results and Discussion For each dataset, experiments are conducted with 5 fold cross validation and percentage classification accuracies are presented in Table 1 with the highest accuracy in each column highlighted in bold. The LOOP output on a standard test image ’rice.png’ is presented in Figure 3 as an illustrative example. It is observed that LOOP performs much better than LBP and LDP, the two descriptors on which it is based. Performance of LOOP is also better than the competing LBP variants: MCT, LGP and LDPri . LOOP successfully outperforms BRIEF, but has comparable results with BRISK and ORB, both of which are rotation invariant. However, LOOP has a simpler formulation and lower execution time than ORB and BRISK. Using the standard tic-toc functionalities of MATLAB, it is observed that ORB and BRISK have 21% and 27% higher computation time respectively than LOOP. Among the competing classifiers listed in Table1, only LDPri , BRISK and ORB are rotation invariant. LOOP yields comparable results to BRISK and ORB, but has lower run time due to simpler formulation. LOOP yields only marginal improvement in performance compared to LDPri , but has similar complexity in formulation and comparable run time. We determine whether the increase in average accuracy of LOOP over LDPri is statistically significant. Ponce NZ SVM ProCRC SVM ProCRC SVM ProCRC LBP 62.1 64.7 68.4 70.5 55.6 59.3 MCT 63.9 65.8 69.9 72.3 58.7 61.1 LDP 66.6 68.5 71.7 74.1 60.9 64.5 LDPri 69.2 72.5 75.1 77.9 64.8 68.3 LGP 69.4 72.9 75.0 77.6 64.2 68.6 BRIEF 65.5 67.1 70.4 73.6 59.9 63.0 BRISK 69.8 73.5 77.7 79.3 66.2 69.5 ORB 71.0 73.8 78.4 79.9 65.8 70.1 LOOP 71.5 74.4 78.3 80.4 66.0 70.6 Sign Binomial Test. For each descriptor, we have 2 classifiers and 3 datasets, hence 6 combinations per descriptor. Also there are 5 fold cross-validation per combination. So for each descriptor we have 30 sets of accuracy results. Assuming the null hypothesis to be that the two competing methods (LOOP and LDPri ) are equally good, then there is 50% chance of each beating the other. It is observed that of the 30 experimental runs, LOOP outperforms LDPri 22 times. The one-tail P value at 5% level of significance is 0.0081. Now using Bonferroni correction, at 5% level of significance, the corrected α for the 6 combinations (2 classifiers and 3 datasets per descriptor) is 0.05/6 = 0.0083. Since the calculated chance is 0.0081 (less than the corrected α), we can reject the null hypothesis and conclude that LOOP has a statistically significant better performance than LDPri . Also as explained earlier, LDPri has the constraint of always having a leading 1 thus halving the number of possible words, along with the restriction of having a fixed number of 1s and 0s in the binary word. LOOP is free from these limitations design. V. C ONCLUSION A novel binary local pattern descriptor, LOOP, which overcomes some disadvantages of its predecessors LBP and LDP, is presented. It is tested on Lepidoptera species recognition with encouraging initial results that warrant further exploration. It outperforms the descriptors on which it is based, along with a few other variants. It has comparable results with popular binary descriptors like BRISK and ORB, but gains in time complexity. A new benchmark dataset of NZ Lepidoptera images is also introduced. The proposed method may be used in similar finegrained applications with small datasets, where fine-tuning a deep network is difficult. The present letter has only presented experiments and results on one representative problem, that of Lepidoptera classification. But LOOP is a generalized binary descriptor and may be used in further research for other small fine-grained datasets where it is difficult to train deep convolutional networks. 5 R EFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] D. Huang, C. Shen, M. Ardabilian, Y. Wang, and L. Chen, “Local Binary Patterns and Its Application to Facial Image Analysis: A Survey,” IEEE Trans. on Systems, Man and Cybernetics- Part C, vol. 41, no. 6, pp. 765781, Nov 2011. DC. He and L. Wang, “Texture Unit, Texture Spectrum, And Texture Analysis,” IEEE Trans. on Geoscience and Remote Sensing, vol. 28, pp. 509 - 512, 1990. T. Ojala, M. Pietikinen, and D. Harwood, “Performance evaluation of texture measures with classification based on Kullback discrimination of distributions,” In Proc. ICPR, 1994. B. Frobaand and A. Ernst, “Face Detection with the Modified Census Transform,” In Proc. IEEE Conf. on Face and Gesture Recognition, pp. 9196, May 2004. B. Jun and D. Kim, “Robust face detection using local gradient patterns and evidence accumulation,” Pattern Recognition, vol. 45, no. 9, pp. 3304-3316, Sep. 2012. T. Jabid, M. H. Kabir, and O. S. Chae, “Gender Classification using Local Directional Pattern (LDP),” In Proc. ICPR, 2010. J. Wang, K. Markert, and M. Everingham, “Learning Models for Object Recognition from Natural Language Descriptions,” In Proc. BMVC, 2009. S. Lazebnik, C. Schmid, and J. Ponce, “Semi-Local Affine Parts for Object Recognition,” In Proc. BMVC, 2004. L. Zhang, M. Yang, and X. Feng, “Sparse Representation or Collaborative Representation: Which Helps Face Recognition?,” In Proc. ICCV, 2011. T. Chakraborti, B. McCane, S. Mills, and U. Pal, “Collaborative representation basedfine-grained species recognition,” In Proc. IVCNZ, 2016. S. Cai, L. Zhang, W. Zuo and X. Feng, “A Probabilistic Collaborative Representation based Approach for Pattern Classification,” In Proc. CVPR, 2016. C. Cortes and V. Vapnik, “A support vector networks,” Machine Learning, vol. 20, no. 3, pp. 273297, Sept 1995. M. Calonder, V. Lepetit, C. Strecha, and P. Fua, Brief: Binary robust independent elementary features, In Proc. ECCV, 2010. S. Leutenegger, M. Chli, and R. Y. Siegwart, BRISK: Binary robust invariant scalable keypoints, In Proc. ICCV, 2011. E. Rublee, V. Rabaud, K. Konolige, and G. Bradski, ORB: an efficient alternative to SIFT or SURF, In Proc. ICCV, 2011. T. Jabid, M. H. Kabir, and O. S. Chae, “Local directional pattern (LDP)A robust image descriptor for object recognition,” Proc. IEEE Conf. on Advanced Video and Signal Based Surveillance (AVSS), 2010. Y. Ming, G. Wang, C. Fan, “Uniform Local Binary Pattern Based Texture-Edge Feature for 3D Human Behavior Recognition”, Plos One, vol. 10, no. 5, pp: 1-15, 2015.
1cs.CV
A Line-Point Unified Solution to Relative Camera Pose Estimation* Ashraf Qadir, Jeremiah Neubert Abstract— In this work we present a unified method of relative camera pose estimation from points and lines correspondences. Given a set of 2D points and lines correspondences in three views, of which two are known, a method has been developed for estimating the camera pose of the third view. Novelty of this algorithm is to combine both points and lines correspondences in the camera pose estimation which enables us to compute relative camera pose with a small number of feature correspondences. Our central idea is to exploit the tri-linear relationship between three views and generate a set of linear equations from the points and lines correspondences in the three views. The desired solution to the system of equations are expressed as a linear combination of the singular vectors and the coefficients are computed by solving a small set of quadratic equations generated by imposing orthonormality constraints for general camera motion. The advantages of the proposed method are demonstrated by experimenting on publicly available data set. Results show the robustness and efficiency of the method in relative camera pose estimation for both small and large camera motion with a small set of points and line features. I. INTRODUCTION Accurate and efficient camera pose estimation is essential to a number of applications such as structure from motion, robot navigation and simultaneous localization and mapping. One key step is to estimate the relative position and orientation of the views using the geometric constraints arising from a 3D object and its corresponding 2D images in multiple views. Most existing methods use images of scene features such as corner points [1, 2, 3] or lines [4, 5] with points being the primary feature of interest. However, almost all of these methods use either points or lines but do not handle both. Using either lines or points does not allow one to take full advantages of the information available in the images. While natural scenes are rich in feature points, manmade environment such as office interiors or city landscapes can consists of texture less planar surfaces where there are few point features that can be reliably detected. On the other hand, such environments consists of large number of visible lines. A system that can handle both lines and points, either independently or combined has an advantage to be useful in a wide range of applications. While visual SLAM systems mostly deal with sequential images with small camera motions, structure from motion methods often require to deal with an unordered set of images with large camera motions. In this work we propose an algorithm that gives a unified linear approach that can deal with a mixture of points and lines for relative pose estimation using three views. Given a set of lines and points correspondences between views, the algorithm exploits the tri-linearity relationship between the views to generate a set of constraint equations from the points and lines correspondences. The desired solution to the system of equations are expressed as a linear combination of the singular vectors and the coefficients are computed by solving a small set of quadratic equations generated by imposing orthonormality constraints for general camera motion. The proposed method considers the image sequence is generated from a monocular camera and equation representations used are adopted to three views. However, the method can be easily extended to stereo systems with immediate advantage that only two view are required. It also generates an added set of constraint equations when using points and line correspondences in all 4 views. In theory given two known camera pose, it is possible to reconstruct 3D lines and points from the corresponding images and then estimate the third camera pose from the 3D to 2D points and lines correspondences. However, the quality of the camera pose estimation is critically dependent on the accuracy of the reconstructed 3D points and lines. It is especially critical with narrow base line and forward motion [4]. The major contribution of this paper is the development of a unified framework for relative camera pose estimation combining points and lines. The algorithm is robust, efficient and can handle a wide range of line and point combination. The intended use of the algorithm is with robust hypothesize-and-test frameworks but is also suitable for scenarios with a large number of points and lines. Using both points and line features mean the proposed method is equally applicable in natural as well as manmade urban and indoor environments. II. *Research supported partially by ND EPSCoR through NSF grants #EPS-0814442, #IIA-1355466 and the University of North Dakota Ashraf Qadir is with RFA Engineering, Minnesota, USA (phone: 1-701213-8094; e-mail: aqadir@ rfamec.com). Jeremiah Neubert is with Mechanical Engineering Department, University of North Dakota, Grand Forks, North Dakota.(email: [email protected]) LITERATURE REVIEW While line based structure from motion has received considerable attention, most of the existing systems that are robust and computationally efficient are points based systems. A primary reason is that points provide stronger constraints than lines as shown in [6]. For instance, the 5 points minimal solution exists [1] for two view reconstruction for a calibrated camera. However, lines do not put such constraints on the camera pose and at least 3 images are required for camera placement derivation. As a result, a common approach is to use multifocal tensors [6, 7] for structure from motions from lines. The disadvantage is that a large number of lines in three views are required making it less desirable in a hypothesis-and-test framework for motion estimation. Yet there are situations where using lines are beneficial or required for a successful structure from motion system. Important breakthrough in solving minimal problems for points [1, 2] led to the development of efficient point based camera pose estimation and reconstruction methods. A few examples are visual odometry methods [8, 9, 10] or urban reconstruction [11, 12] that uses the 5 points algorithm inside a RANSAC framework for relative camera pose estimation. These methods rely on the assumption that many points can be reliably detected and localized. However, stability of 5 points algorithm decreases for forward motions as well as large depth of the features. For robotics application, often additional sensors (IMU, odometer etc.) and constraints are used along with vision for relative pose estimation [13]. One of the earlier methods for line based 3D structure and camera motion estimation is described in [14]. In order to obtain an estimation of the scene structure and the motion of the camera together, an objective function is defined that minimizes the re-projection error in the image plane. The method is robust to variable end points across views. However, they use iterative nonlinear minimization which requires initialization. The system also requires at least 6 line correspondences over three views. A similar method is presented in [15] for urban environment. A detail investigation on 3D line representation, triangulation and bundle adjustment is performed in [16] where the camera pose estimation was performed using trifocal tensor. An efficient algorithm for relative camera pose estimation using two stereo image pairs (four images) is presented in [4]. The algorithm uses 2 or 3 line correspondences in four images of two stereo image pairs to estimate the relative camera pose between two stereo frames in a RANSAC framework. That paper contains elements of ideas contained in the present paper which extends the idea to monocular camera with a combine points and line based relative pose estimation as well as large camera motions. Focusing on indoor and/or urban application, one category of line based SFM from lines algorithms proposed in [17, 18] based on the assumptions such as existence of three orthogonal directions or primitive configurations such as parallel and orthogonal lines. In [18], three dominant directions are computed for camera pose recovery. All lines in an image are used to find the dominant direction and the method fails if a dominant direction cannot be detected. On the other hand, the method presented in [5] requires a primitive configuration of two parallel lines and an orthogonal line to estimate the relative camera pose in a RANSAC framework. As a result the method is not suitable for environment with few or no primitive configurations among lines. In literature, there are a few methods present that combines line and points together for camera pose recovery or structure from motion. Once such method is presented in [6] that involves generating a set of linear equations from the point and line correspondences in three views and solve for the trifocal tensor. Camera poses for the second and third views are then computed from the estimated trifocal tensor. A linear solution followed by an iterative refinement was presented. The method presented in this work is foreshadowed by the aforementioned work and extends to a robust and efficient relative camera pose estimation. III. OUR APPROACH TO RELATIVE POSE ESTIMATION Let the three cameras are denoted as P1 , P2 , and P3 . Assuming that the intrinsic parameter matrix K is known, the first two cameras can be parameterized as P1 [I | 0] and P2 [R 0 | t 0 ] where R 0 is the known rotation matrix and t 0 is the known translation vector of the second camera relative to the first camera. Then the camera matrix of the third camera relative to the first camera is given by P3 [R | t] . A. Problem formulation from 2D lines correspondences in Three Views Fig. 1: Geometry of 3D line formation. The back projected planes joining three camera centers and the three corresponding lines intersect in a 3D line. Let L be a 3D line and its projection on three image planes are l 1 , l 2 and l 3 . The back projected planes through the three camera centers containing the 3D line L and imaged as l 1 , l 2 and l 3 are given by 1 P1T l 1 , 2 P2T l 2 and 3 P3T l 3 . Together the three equation can be stacked in a 4x3 matrix form as M l1 0 R T0 l 2 t T0 l 2 R Tl 3 t Tl 3 (1) Since the three back projected planes intersect at the 3D line L , there are two independent 3D points X 1 and X 2 on the line L that satisfy the point-plane incident relations X Ti j 0 , for i 1,2 and j 1,2,3 . As a result the matrix M is a rank 2 matrix with 1D null space and we can consider that the first column m 1 is a linear combination of the last two columns m1 am2 bm3 . three images and the points are transformed as xˆ1j xˆ 2j G i j x 2i and xˆ 3j Fi j x1i , H i j x 3i , then the transformed trifocal tensor is written as Similar to [], we perform a two-step QR decomposition of the matrix M with householder rotation to obtain a matrix of the form Tˆi jk (F 0 0 0 0 0 f 2 (R, t) (2) f 1 (R, t) Where f1 ( R, t ) and f 2 ( R, t ) are two affine functions of the parameters R, t . The matrix M is also of rank 2 since the rank of a matrix is preserved by elementary matrix operation. From the above matrix it readily follows that f i ( R, t ) 0; i 1,2 (3) B. Problem formulation from Points Correspondences in Three Views xˆ 13Tˆk13 Fig 2. The correspondence x1 x2 x3 arises from the image of a X in space Let X be a 3D point in space and its projection on three image planes are x 1 , x 2 , and x 3 respectively. The trilinearity constraint between the three views gives rise to four independent equations involving the three corresponding points and the three camera matrices [19, 20]. Using tensor notation, the four equations can be written as x1k ( x 12 x 13Tk33 x 13Tk13 x 12Tk31 Tk11 ) x1k ( x 12 x 32Tk33 x 32Tk13 x 12Tk32 Tk12 ) 0 (5) x1k ( x 22 x 13Tk33 x 13Tk23 x 22Tk31 Tk21 ) 0 (6) x1k ( x 22 x 32 Tk33 x 32 Tk23 x 22Tk32 Tk22 ) (4) 0 0 (7) where Ti jk aij b4k a 4j bik is the tri-focal tensor, and ai , bi are the columns of the camera matrices P2 a 1 a 2 a 3 a 4 and P3 b 1 b 2 b 3 b 4 . For better numerical stability, the points are normalized following the methods mentioned in [19]. If F, G, and H represents three coordinate transformations in (8) xˆ 12Tˆk31 Tˆk11 ) (9) 0 xˆ 1k ( xˆ 12 xˆ 32 Tˆk33 xˆ 32 Tˆk13 xˆ 12 Tˆk32 Tˆk12 ) 0 (10) xˆ1k ( xˆ 22 xˆ 13Tˆk33 xˆ 13Tˆk23 xˆ 22 Tˆk31 Tˆk21 ) 0 (11) xˆ1k ( xˆ 22 xˆ 32 Tˆk33 xˆ 32 Tˆk23 xˆ 22 Tˆk32 Tˆk22 ) 0 (12) Similar to the equations for line correspondences, we rearrange the above equations to generate four independent equations of the form f j ( R, t ) 0; j 1,2 ,3,4 (13) C. Liner Solution Every corresponding triplet of points x1 , x 2 , x 3 contributes four linearly independent equations. Similarly every corresponding triplet of lines l 1 , l 2 , l 3 contributes two linearly independent equations. The equations can be stacked to construct a system of the form Av 3D point ) G sj H tk T rst Then the new set of equations become xˆ1k ( xˆ 12 xˆ 13Tˆk33 M 1 r s b ( 14 ) where v [r1T r2T r3T t T ] and r1 , r2 , r3 are the columns of the rotation matrix R while t is the translation vector. A is a n 12 matrix, generated by arranging the coefficients from the equations in (3) and (13). If the number of point triplets is denoted as n1 and the number of line triplets is denoted as n2 , then the number of rows is n 4 * n1 2 * n2 . Since v is a 12 element vector, we need at least 12 constraint equations generated from the lines or points correspondences. However, such a system suffers from in the presence of noise and the solution can be arbitrarily far from a rigid motion since orthonormality constraints are ignored. D. Solution as a Linear Combination of Singular Vectors with Orthonormality Constraints Once the matrix A is constructed, the solution of the linear system lies in the null space or the kernel of A. In noise free cases the rank of the matrix A is one (because of scale ambiguity) when the number of independent linear equations n 12 generated from at least three points correspondences or six line correspondences or a combination of points and lines (assuming points and lines are all independent). However, the matrix A can be rank deficient because of noise or nearly parallel motion (principal axes are parallel). In addition the solution is also required to satisfy the geometric constraints among the elements of v . Similar to [..] we express the desired solution as a linear combination of the last k singular vectors of the matrix A, denoted as v i r1 | r2 | 1 r3 | ....... v1 | k vk | | t (15) The problem is then reduced to determining the coefficients 1 , 2 ,....., k of the above linear combination, subject to orthonormality constraints: r1 2 r1T r2 1, 0, r2 2 r2T r3 1, 0 r3 r3T r1 r1 r2 2 0, and r2 2 r3 2 Case N 3 : We consider the three singular vectors corresponding to 3 smallest eigenvalues and the solution is written as x v3 (20) 1v 1 2v2 For ease of computation we use the 6 constraint equations in (16) and (17) and construct a linear system of 6 equations of the form A 2 1 0 (16) (17) Substituting ( R, t ) from equation (15) in equation (16) and (17) we get 6 polynomials of degree two in the k variables 1 , 2 ,....., k . This system of polynomial equations will have no solution in the general noisy case and we need to resort to a principled “least squares” approach to extract the solution. The degree of the system can be reduced by replacing the unit norm constraint by the equal norm constraints: 2 using Singular Value Decomposition (SVD) and chose the signs of so that the points have positive z coordinates. 0 (18) Combining equation (17) and (18) now we have 5 polynomial constraint equations of degree 2 in the variables 1 ,..., k . Note that this approach applies even when the combined system is under constraint for example when the number of constraint equations are 8 or 10 from a limited number of points and/or line correspondences. Case N 1 : The eigenvector corresponding to the lowest eigenvector is considered as the solution. The rotation matrix is constructed from the first nine element of the eigenvector and the scale is fixed by setting the determinant as 1. Case N 2 : Two singular vectors corresponding to the lowest two eigenvalues are considered and the solution can be written as x 1v 1 2 v 2 where we need to solve for coefficients and . Each of the five constraint equations consists of three monomials 12 , , and we solve for them using a linearization technique that was developed in cryptography and used in [21, 22]. The five constraint equations are arranged in a linear system of five equations of the form A (19) Where is the matrix constructed from the constraint equations and [ 12 , , ] . We solve this system (21) b Now each of the constraint equations consists of 6 monomials [ 12 , , 32 , , , ], is a 6x6 square matrix constructed from the constraint equations and b [0,0,0,1,1,1]T . We follow the same procedure as before to solve for i . Case N 4 : We now have four unknown coefficients i , i 1,....4 and the solution is written as x 1v 1 2v2 3v 3 (22) 4v4 In theory, the 5 constraint equations should still suffice. However, the linearization procedure treats all monomials in the constraint equations as unknowns and there are not enough constraints any more. We solve this problem by using a relinearization method used in [4] to solve for 4 unknown coefficients. Initially the degree of the system is reduced by dropping the scale. This is done by dividing each equations in (22) by 4 to have a system of the form x 1v 1 2 v2 3v 3 (23) v4 Now each of the 5 constraint equations consists of 10 monomials. Discarding the superscripts from the coefficients i , the monomials are [ 12 , 22 , 1 2 , 1 , 2 , 1 3 , 2 3 , 3 ,1] . In order to solve for a single variable, the constraint equations are rearranged to get a matrix system of the form . . . [1] [1] [2] . . . [1] [1] [2] . . . [1] [1] [2] . . . [1] [1] [2] . . . [1] [1] [2] 2 1 2 2 1 2 1 2 1 0 0 0 (24) 0 0 Where . represents some scalar value and [N ] denotes a polynomial of degree N in the variable 3 . Once the matrix is constructed the next step is to solve for the null vector. The components of the null vector is obtained (up to a scale) by omitting the corresponding column of the 5x6 coefficient matrix, then taking the determinant of the resulting matrix and multiply by as appropriate. For example, the A B th i component of the null vector can be computed as ui ( 1) i 1 det( Fˆ ) (25) Where F̂ is a 5x5 matrix constructed by deleting the i column of the above 5x6 coefficient matrix. As a result, the components of the null vector u [ 12 , 22 , 1 2 , 1, 2 ,1] introduces a new set of polynomial equations of degree 4 ( 12 , 22 , 1 2 ), degree 3( 1 , 2 ) and degree 2(1) in the single variable 3 . The components of the null vector are not independent and they satisfy three constraint equations r t 0 (27) where r is the vector constructed from the elements of the rotation matrix and t is the translation vector th ( 1) ( 2) ( ( 1) ( 1) ( ( 2) ( 2) ( 1 2 ) (1) 2 1 ) (1) 2 2 ) (1) (26) A set of three polynomial equations of degree 6 in the single variable 3 are constructed by substituting the expressions for the components of the null vector from equation (19) in the three constraint equations in (20). Solving the nonlinear equation system (20) by linearization technique might lead to an inconsistent result from redundant equations and we approach it as an unconstrained optimization problem. Denoting the three univariate polynomials in equation (20) as f i ( 3 ); i 1,2,3 a cost function F can be defined as a square sum of the three 3 polynomials as F identified f i 1 i by derivative F 2 ( finding 3 f ( i 1 i 3) . The minima of F can be the 3) fi ( 3) roots of its 1st 0 . F is a 11th order polynomial which can be easily solved by the eigenvalue methods. There can be up to 11 real roots of F ( 3 ) , all of which need to be tested as a candidate solution. Once the candidate for 3 are obtained, the corresponding candidates for 1, 2 are obtained by substituting values of 3 in the component expressions of u . Once the coefficients i are computed with the method described above, the rotation can now be obtained by substituting i ; i 1....k in equation (14). Then the scale is fixed by setting the determinant of the rotation matrix to 1. Theoretically, the translation can also be found from equation (14). However, experiments with real data generated large translation error. Hence the translation is estimated separately in the following method once the rotation is estimated. E. Translation Computation In order to compute translation, we express the translation vector in terms of the rotation parameters in a least-square sense. We re-organize linear system of (23) in the form We rearrange equation (24) in the form Ar Bt and then the least-square solution to the translation vector t can be expressed as t ( B T B) 1 B T Ar (28) F. Efficient Computation In order to improve efficiency as well as to ensure numerical stability, computations of critical components of the algorithm are carefully designed. This way we ensure that the number of arithmetic operations does not become too large that might adversely affect the numerical behavior. We pre-compute the symbolic interaction between coefficients in the equation and then evaluate for values of the variables. As an example, the coefficients of the matrix A in equation (14) are symbolically pre-computed and evaluated with the set of points and lines correspondences. Similar steps are taken for constructing systems of polynomials and solve them to estimate rotation and translation. The symbolic calculations are done using Matlab symbolic toolbox and the scripts are available at request. For brevity, details of the equations are skipped. G. Correct Pose Selection In order to find the correct camera, all the possible camera pose candidates obtained by the method in previous section need to be evaluated. We use a simple method to do this. For the corresponding points in first and second view, the 3D point is determined by back projecting the rays in first and second view. The 3D point is then projected onto the third view. A prescreening is performed by discarding the camera poses where majority of the 3D points have negative z coordinate in the 3rd camera before computing reprojection error. Similarly, lines back projected from the first and second image intersects at a 3D line. The 3D line is then projected onto the third camera and the line reprojection error is computed. The pose with the lowest reprojection error is selected as the final estimated pose. IV. EXPERIMENTAL EVALUATION The proposed algorithm is evaluated for accuracy, robustness and efficiency with both synthetic and real data. We demonstrate the effectiveness of the proposed algorithm by comparing results with state of the art line based pose estimation algorithms. A. Synthetic Experiments Monte Carlo simulation with synthetic lines and points were performed to quantify the performance of the proposed algorithm. We evaluate the algorithm’s performance under various noise level, different lines and points’ combination as well as large and small camera motion. At each trial, a predefined number of 3D line segments and 3D points are generated by randomly placing segment end points as well as the 3D points inside a cube (10 m length) that is centered at the origin of the world coordinate system {W } . We consider a virtual calibrated camera with image size 640x480 and focal length 800 pixels. The first view is generated by placing the camera randomly at a distance of 20 meters from the origin. For large motion, the second and third camera views are also generated randomly similar to the first view. For small motion, the second and third camera are generated by randomly selected camera positions that are within 5 meters of the first camera position. The cameras were then oriented so that they looked at the origin having all the 3D points and the line segments in the field of views. translation error as a function of noise level. The difference between mean and median error mainly comes from the pose estimation with large errors. The output of the algorithm is shown in fig. 4. The top row shows the mean rotation and translation error whereas the bottom rows shows the median errors. The experiments are done with 50% points and 50% lines where the numbers are varied from 4 to 8. It can be seen that the algorithm’s performance is very stable when number of points and lines used are 5 or above. Again we consider large camera motion similar to experiment 1. The 3D points and line segments are projected on each view to generate the 2d points and line segments. Zero mean, Gaussian noise of varying standard deviations is added to the coordinates of the 2D points and line segments in each of the three views. All the experiments are based on 500 trials. In the first experiment, we evaluate the effectiveness of the algorithm when used in a hypothesize-and-test framework such as RANSAC. It is important to select a small set of features for hypothesis generation in a RANSAC scheme, we used a combination of 3 or 4 lines and 3 or 4 points in this experiment. Similar to [1, 4], the lower quartile of the error distributions are used since finding a fraction of good hypothesis is more important than to get consistent results. Performance of the algorithm is shown in Fig. 3. The left image shows the camera pose as well as the lines and points. The relative distance between cameras could be as much as 40 meters. It can be seen that rotational and translational error increases with noise level. However with a moderate noise level, all combination of lines and points generate reasonable pose estimation. It can be observed that the pose estimation is more accurate when the number of points used is 4. This is explained by the fact that the number of constraint equations is larger in case of points than lines as well as how noise is added to the coordinates of the points and lines. For each line, random noise is added to both end points of the 2D lines resulting in a larger noise effect compared to 2D points. However, in moderate noise, the estimated camera poses are sufficiently accurate for further optimization. a. Experiment setup b. Rotation Error c. Translation Error Fig. 3. Rotation and translation error with large camera motion as a function of noise level. Experiments are conducted with lines n L =3 or 4 and points n p =3 or 4. In the second experiment, the robustness of the algorithm is evaluated by computing mean and median rotation and Fig 4. Mean and Median rotation and translation error as a function of noise level. Number of lines and points used ranges between 4 and 8. In each experiment, 50% lines and 50% points are used. Efficiency of the method was evaluated on a laptop computer with an Intel Core i5-4340M 2.9 GHz CPU. Figure 5 shows the computational time requirement in millisecond vs the number of features. Number of lines and points are varied between 4 and 45. For 4 lines and 4 points the average runtime is 37 milliseconds and for 5 lines and 5 points, average runtime is 41 milliseconds. Results show that a combination of 4 points and 4 lines or 5points and 5 lines are suitable for use in RANSAC framework while being very stable. Fig. 5: Computational time requirement vs number of lines and points. All experiments are conducted with 50% lines and 50% points, averaged over 500 runs. The computational cost grows almost linearly with number of features used. B. Real Images In order to evaluate the algorithm’s performance in real world situations with various magnitude and direction of motions, we apply the algorithm on the VGG Multiview dataset.[22]. The dataset contains indoor and outdoor image sequences with extracted 2D lines and points, their reconstructed 3D positions and camera projection matrices. The Corridor sequence contains indoor images with small forward camera motion whereas the other image sequences are outdoor images of buildings with various camera motions. In order to evaluate the accuracy and robustness of our algorithm we consider three images from each sequence and consider known camera poses for the first two views. Then we apply the algorithm to estimate the camera pose of the third view relative to the first view. The error is represented as the ratio of the estimated relative pose and ground truth relative pose between first and third view. Fig. 6 shows the performance of the algorithm in boxplot representation, where each column depicts the distribution of errors for 100 runs of the algorithm for a number of points and lines. From left to right, the number of 2D lines and points combination considered are 2 lines + 2 points, 2 lines+ 3 points, 2 lines+4 points, 3 lines+3 points, 4 lines + 2 points, 4 lines + 4 points, 6 lines + 6 points, and 10 lines + 10 points. At each run, a predefined set of corresponding 2D lines and points in three views are randomly selected from the dataset. From the VGG Multiview dataset, the image sequences considered are UL= University Library, MC-I = Merton-College-I, MC-II=Merton-College-II, MCIII=Merton-College-III, WC=Wadham-College, C=Corridor. UL W C C Fig. 6. Rotation and translation error as a function of number of lines and points. The boxplot result is generated by running the algorithm 100 times with randomly selecting n lines and points. From left to right, the combinations of lines and points used are 2 lines + 2 points, 2 lines+ 3 points, 2 lines+4 points, 3 lines+3 points, 4 lines + 2 points, 4 lines + 4 points, 6 lines + 6 points, and 10 lines + 10 points. It can be seen that the algorithm is very robust when using a combination of 3 lines + 3 points or above for both small and large camera motions. Figure 7 shows example results from the VGG dataset. In each row, the left and middle images are overlaid with the corresponding points and lines used for pose estimation of the third view relative to the first view. A set of 3D lines are then projected onto the third view using the estimated camera pose. U L M C-I M C I M CII M CIII M C I I M C I I I W C [11] M. Pollefeys, D. Nistér, J. M. Frahm, A. Akbarzadeh, P. Mordohai, B. C O Clipp, C. Engels, D. Gallup, S. J. Kim, P. Merrell, C. Salmi, “ Detailed real-time urban 3d reconstruction from video”, International Journal of Computer Vision, Vol. 78(2-3), pp:143-67,2008 [12] Y. Furukawa, B. Curless, S. M. Seitz, R. Szeliski, ”Manhattan-world Fig. 7: Example results from the VGG dataset. The left and the middle images are overlaid with two corresponding lines and four corresponding points that are used for relative pose estimation in the third view. The right image shows re-projection of a subset of 3D line segments from the dataset using estimated camera poses. Camera poses are estimated using 4 lines and 2 points and colors are chosen randomly for both points and lines in each image. V. CONCLUSION AND DISCUSSION [13] B. Li, L. Heng, G. H. Lee, M. Pollefeys, “A 4-point algorithm for relative pose estimation of a calibrated camera with a known relative rotation angle” Intelligent Robots and Systems (IROS), 2013 IEEE/RSJ International Conference on, pp. 1595-1601, Nov 2013 [14] C. J. Taylor, D. J. Kriegman, “Structure and Motion from Line Segments in Multiple Images” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 17(11), pp.1021-1032, 1995 [15] G. Schindler, P. Krishnamurthy, F. Dellaert, “Line-based structure In this work, we have presented the development of a unified relative camera pose estimation method that combines points and lines. Given a set of point and line correspondences in three views, the third camera view is estimated relative to the first view when the first two views are known. One of our primary contribution is a robust and efficient algorithm that is suitable for both small and large camera motions. We have demonstrated that the system, though not fully optimized, perform robustly and suitable for use in a RANSAC framework in both indoor and outdoor environment. While no nonlinear optimization was performed in any of the experiments, it will conceivably improve the pose estimation. Future work include applying the algorithm in real time SFM pipeline and simultaneous localization and mapping frameworks. from motion for urban environments”, 3D Data Processing, Visualization, and Transmission, Third International Symposium on, pp. 846-853, June 2006 [16] A. Bartoli, P. Sturm, “Structure-from-motion using lines: Representation, triangulation, and bundle adjustment”, Computer vision and image understanding, vol. 100(3), pp:416-41, Dec, 2005 [17] T. Werner, A. Zisserman “New techniques for automated architectural reconstruction from photographs”, Computer Vision—ECCV , pp:8089, 2002 [18] J. Košecká, W. Zhang, “Extraction, matching, and pose recovery based on dominant rectangular structures”, Computer Vision and Image Understanding. vol. 100(3), pp::274-93, Dec 2005 [19] R. Hartley, A. Zisserman. “Multiple view geometry in computer vision”. Cambridge university press; 2003. [20] A. Shashua. “Projective structure from uncalibrated images: Structure from motion and recognition”, IEEE Transactions on Pattern Analysis and Machine Intelligence. vol. 16(8), pp:778-90, Aug, 1994 [21] V. Lepetit, F. Moreno-Noguer, P. Fua, “Epnp: An accurate o (n) solution to the pnp problem” International journal of computer vision. vol. 81(2), pp:155-66, Feb, 2009 [22] A. Ansar and K. Daniilidis. “Linear pose estimation from points or REFERENCES [1] D. Nistér, “An efficient solution to the five-point relative pose problem.” IEEE transactions on pattern analysis and machine intelligence, vol. 26(6), pp.756-770, 2004 [2] D. Nistér, and H. Stewénius, “A minimal solution to the generalised 3point pose problem.” Journal of Mathematical Imaging Vision, vol. 27(1), pp.67-79, Jan, 2007 stereo” Computer Vision and Pattern Recognition, 2009. IEEE Conference on, pp. 1422-1429, Jun 2009 and [3] H. Li and R. Hartley, “Five-point motion estimation made easy,” Pattern Recognition, 2006. ICPR 2006. 18th International Conference on, vol. 1. IEEE, pp. 630–633, 2006 [4] M. Chandraker, J. Lim, D. Kriegman, “Moving in stereo: Efficient structure and motion using lines”, Computer Vision, 2009 IEEE 12th International Conference on, pp. 1741-1748. Sep, 2009 [5] A. Elqursh, A. Elgammal, “Line-based relative pose estimation.” Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pp. 3049-3056, June, 2011 [6] R. I. Hartley, “Lines and points in three views and the trifocal tensor”. International Journal of Computer Vision. Vol. 22(2), pp:125-40, Mar, 1997 [7] A. Shashua, L. Wolf, “On the structure and properties of the quadrifocal tensor”, Computer Vision-ECCV pp.710-724, 2000 [8] D. Scaramuzza, F. Fraundorfer, R. Siegwart, “Real-time monocular visual odometry for on-road vehicles with 1-point ransac.” In Robotics and Automation, 2009. ICRA'09. IEEE International Conference on pp. 4293-4299, May, 2009 [9] D. Nistér, O. Naroditsky, J. Bergen, “Visual odometry”, CVPR, Vol. 1, pp. 652-659, 2004 [10] A. Agrawal, K. Konolige, “Real-time localization in outdoor environments using stereo vision and inexpensive gps”, Pattern Recognition, 2006. ICPR 2006. 18th International Conference on, Vol. 3, pp. 1063-1068, Aug 2006 lines”, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 25(5), pp:578–589, 2003
1cs.CV
Control of Large Swarms via Random Finite Set Theory arXiv:1801.07314v3 [cs.SY] 27 Feb 2018 Bryce Doerr1 and Richard Linares2 Abstract— Controlling large swarms of robotic agents has many challenges including, but not limited to, computational complexity due to the number of agents, uncertainty in the functionality of each agent in the swarm, and uncertainty in the swarm’s configuration. This work generalizes the swarm state using Random Finite Set (RFS) theory and solves the control problem using model predictive control which naturally handles the challenges. This work uses information divergence to define the distance between swarm RFS and a desired distribution. A stochastic optimal control problem is formulated using a modified L22 distance. Simulation results show that swarm densities converge to a target destination, and the RFS control formulation can vary in the number of target destinations. I. INTRODUCTION Control of large robotic groups or swarms is currently an area of great interest in controls research. These robotic groups are usually tiny robots with limited actuators that do specific tasks in the formation. For example, the group can use its combined effort to grasp or move in the environment [1]. Specifically, in NASA applications, swarm control of space systems including satellites and rovers can be used for exploration of asteroids and other celestial bodies of interest [2]. In military applications, swarms of UAVs can be used for border patrol, search and rescue, surveillance, communications relaying, and mapping of hostile territory [3]. In reviewing these applications, swarm control of large groups of swarming agents are required. Changing how the swarm is modeled can alleviate computational complexity for different control methods. Previously, the swarm/potential model using the random finite set (RFS) formalism was used to describe the temporal evolution of the probabilistic description of the robot swarm to promote decentralized coordination [6]. By using a measure-value recursion of the RFS formalism for the agents of the swarm, the dynamics of the swarm in time can be determined with computational efficiency. Several control techniques have been implemented on swarms previously. In centralized control, one agent in the swarm is the designated controller and manages the execution of other agents in the swarm [7]. Thus, it oversees the other agents’ system processes. This type of control is the easiest to implement on a swarm of robots, and it solves the problem of controlling the swarm to a desired state. Unfortunately, this type of control suffers from two main 1 Bryce Doerr, Graduate Student, Department of Aerospace Engineering and Mechanics, University of Minnesota, Minneapolis, MN 55455, USA [email protected] 2 Richard Linares, Assistant Professor, Department of Aerospace Engineering and Mechanics, University of Minnesota, Minneapolis, MN 55455, USA [email protected] problems. As the number of agents of the swarm increases, the computational workload becomes more difficult. This is especially difficult when the swarm robots are low cost robotic agents. Another issue that arises is that centralized control is not robust against failures of other agents within the swarm [8]. Since swarm robots on a level of a thousand agents are low cost units, communication, actuation, and sensing are performed with less reliability. Thus, centralized control may not be a viable option for these systems. Probabilistic swarm guidance has also been used to enable the swarm to converge to target distributions [9]. Probabilistic swarm guidance controls a swarm density distribution through distributed control, so that each agent determines its own trajectory while the swarm converges to the target distribution. Distributed control is defined as reformulating a control problem as a set of interdependent subproblems and solving these subproblems [5]. Probabilistic swarm guidance solves issues that involve controlling an increasing number of individual agents which is computationally complex by controlling the swarm density distribution of the agents. Using optimal transport, convergence is achieved faster than a homogeneous Markov chain approach and the cost function is minimized [9], [10], [11]. Another method is the use of the inhomogeneous Markov chain [12], [13]. In this approach, the agents move in a decentralized fashion which is like the homogeneous Markov chain, but the algorithm allows communication with other agents to reach and settle at the target destination. These algorithms are robust to external disturbances since the algorithms themselves use the swarm density distribution. Velocity field generation for swarm control is a nonoptimal decentralized control method for swarms that synthesizes smooth velocity fields as a function of time and position [14]. With a designated target distribution, the swarm follows the velocity field using the heat equation to convergence by using local agent position information to estimate its local density. The advantage of this method is that the agents facilitate collision avoidance and move in a smoother manner than previous Markov chain approaches [10]. Unfortunately, the use of the heat equation diffuses the agents in a locally uniform manner to the target density. Therefore, this is a non-optimal method of controlling the swarm to a target distribution. Model predictive control (MPC) has been heavily studied for nonlinear systems and for applications including spacecraft maneuvering and attitude control [15], [16], [17]. Decentralized MPC has also been studied for thousands of low cost spacecraft with limited capabilities [18]. MPC computes the control input by solving a finite horizon problem. This allows it to optimize the current time step while taking the future time steps into account. One last decentralized approach to controlling swarms is using sequential convex programming [19]. Sequential convex programming uses multiple iterations to maintain accuracy of the convex approximations of the constraints which create more efficient trajectories. Uncertainties in the trajectories are accounted for when the algorithm is tuned. Thus, this provides the robustness for the swarm while pushing the agents to the designated targets while using this algorithm in combination with MPC in real time. Morgan also used sequential convex programming to do target assignment (mapping of agents to targets) and trajectory generation for varying swarm sizes through time [20]. This method is viable for swarms, but through RFS control, target assignment is not necessary. II. R ANDOM F INITE S ET C ONTROL P ROBLEM F ORMULATION (1) The control sequence is also defined by a RFS in the form  Ut = u1,t , u2,t , · · · , uNtotal(t) ,t and a RFS probability density given by p(U = {u1 , u2 , · · · , un }) = p(|U |= n)p({u1 , u2 , · · · , un } | |U | = n), where b(x), ps (ζ), and f (x|ζ) are the agents’ birth, survival probability, and target motion models respectively and ζ is the previous state [22]. The bar on v̄t (x) denotes that the PHD is conditioned on measurements Zt−1 . For the time update, the equation is given by vt (x) = (1 − pd (x))v̄t (x) X pd (x)g(zt |x)v̄t (x) R , + c(z) + pd (ζ)g(zt |ζ)v̄t (ζ)dζ z ∈Z (4) t The control problem for swarming agents is set up by using RFS theory [21], [22]. This theory addresses the decentralized formulation for each agent in the formation. Each agent has the challenge of estimating its local formation configuration and designing a decentralized control policy to achieve some local configuration. It is assumed that each agent within the swarm is identical and using unique identifiers on each agent is unnecessary. Using RFS theory, the number of agents and their states is determined from measurements. The number of agents in the field is denoted by Ntotal (t) and  may be varying as agents enter and leave the field. Xt = x1,t , x2,t , · · · , xNtotal(t) ,t denotes a realization of the RFS distribution for agents. At any time, t, the RFS probability density function can be written as p(X = {x1 , x2 , · · · , xn }) = p(|X|= n)p({x1 , x2 , · · · , xn } | |X| = n). the cardinality of the agent set that is Poisson distributed [22]. It is noted that the assumptions made by the PHD filter are strong assumption for swarming robotics. However, this is a good starting point for initial proof-of-concept study. The PHD recursion for a general intensity function, vt (x), is given by Z v̄t (x) = b(x) + ps (ζ)f (x|ζ)v(ζ)dζ, (3) (2) since the number of the agents in the field to be controlled is also varying. The Bayesian multi-target state estimation problem generally has no closed-form solution, but when the form p(|X|= n) and p({x1 , x2 , ..., xn } | |X| = n) are assumed, approximate solutions can be determined by the Probability Hypothesis Density (PHD) filter. Using the PHD filter assumption, the RFS is represented by its first moment (intensity function ν(x, t)) [21]. ν(x, t) represents the probability of finding an agent in a region of state space. The PHD is defined over the single agent’s state space and has the property that the expected number of agents over a region is simply the integral of the PHD over that region. Propagation of the PHD can be determined if the agents are assumed to be independent and identically distributed with where pd (x), g(zt |x), and c(z) are the probability of detection, likelihood function, and clutter model of the sensor respectively [22]. By using this recursion, the swarm probabilistic description can be updated. Unfortunately, Eqs. (3) and (4) do not contain a closed-form solution and the numerical integration suffers from higher computational time as the states increase. Fortunately, a closed-form solution exists if it is assumed that the survival and detection probabilities are state independent, and the intensities of the birth and spawn RFSs are Gaussian mixtures of the form ν(x, t) = f (x) = ν̄(x, t) = g(x) = Nf X (5) i=1  (i) wf N x; mif , Pfi , Ng X  wg(i) N x; mig , Pgi , (6) i=1  where w are the weights and N x; mi , P i is the probability density function of a multivariate Gaussian distribution with a mean and covariance respectively. Note that closed form solutions using Gaussian mixtures exist for cases without PNf (i) the state independent assumption. Additionally, i=1 wf = PNg (i) = N̄total (t) where N̄total (t) is the Ntotal (t) and i=1 wg desired number of agents. The intensity function ν(x, t) is in terms of the swarm state while ν̄(x, t) is in terms of the desired state. The swarm intensity function can be propagated through updates on the mean and covariance as given by mif,k+1 = Ak mif,k + Bk uif,k , (7) i i Pf,k+1 = Ak Pf,k ATk + Qk , (8) where Qk is process noise. Then given the Gaussian mixture intensities assumption, a control variable is calculated for each component uif,k . Additionally, each Gaussian mixture component can represent many agents since the intensity function integrates to the total number of agents. Note that although linear dynamics is used, the RFS-based cost function is nonquadratic. Each individual swarm agent will run a local PHD observer to estimate the state of the swarm by modeling PSfrag replacements the swarm as a distribution. Thus, using RFS PSfrag theory, replacements it is assumed that the individual swarm agents form an intensity function that is a Gaussian mixture density in which the y means and covariances of the Gaussian mixture are propx agated and controlled. An optimal control problem is set (a) Cauchy-Schwarz Divergence up that tracks a desired swarm formation by minimizing its control effort in the following objective function Z T J(u) = E {u⊺ Ru} + D(ν(x, t), ν̄(x, t))dt, (9) PSfrag replacements 2.5 400 2 200 1.5 0 1 -200 0.5 60 -400 60 50 40 50 40 40 40 30 20 0 30 20 20 20 y 10 0 0 10 0 x (b) L22 Distance 1500 1000 500 0 -500 0 where ν̄(x, t) is the desired formation and u is the control effort for the Gaussian mixture swarm. Both ν(x, t) and ν̄(x, t) are defined over the complete state space which include position and velocity parameters. D(ν(x, t), ν̄(x, t)) is the distance between these Gaussian mixtures which has several closed-form solutions. III. D ISTRIBUTIONAL D ISTANCE BASED -C OST A. Cauchy-Schwarz Divergence The Cauchy-Schwarz divergence is based on the CauchySchwarz inequality for inner products, and it is defined for two random vectors with probability densities f and g given by   hf, gi , (10) DCS (f, g) = ln kf kkgk where h·, ·i is the L22 inner product over the densities. The argument of the logarithm is non-negative since probability densities are non-negative, and it does not exceed one by the Cauchy-Schwarz inequality. The Cauchy-Schwarz divergence can be interpreted as an approximation to the Kullback-Leibler divergence but has a closed-form expression for Gaussian mixtures [24]. This is useful for calculating the distance between two-point processes represented by intensity functions. The Cauchy-Schwarz divergence between two Poisson point processes with Gaussian mixture intensities is shown in Eq. (10) when Eqs. (5) and (6) are substituted inside. Note that in the control formulation used, only ν(x, t) is assumed to depend on the control u. Therefore, the term that depends only on ν̄(x, t) is omitted from the objective function since ν̄(x, t) does not depend on u. Figure 1(a) shows the surface plot using the CauchySchwarz divergence for 4 densities in the swarm at an initial time instance. Each initial state has hills while the destination states have valleys. Thus, each density will repel each other while moving towards the final state through time. If the initial state is too large compared to the destination states, it will take longer for the 4 densities to converge to the destination values. Also, the repelling effect due to the hills are relatively small. Thus, the Cauchy-Schwarz divergence may not be the fastest converging solution for the objective function minimization. B. L22 Distance Alternatively, the distance between two Poisson point processes with Gaussian mixture intensities can be determined 60 40 20 y 0 0 10 x 20 30 40 50 (c) L22 + Quadratic Term Fig. 1: Surface Plots of the RFS divergences. by using the L22 distance between the probability densities. The L22 is given by Z 2 DL22 (f, g) = (f − g) dx. (11) Figure 1(b) shows surface plot using the L22 distance for a 4-density swarm at an initial time instance. Each initial state has more defined hills compared to the Cauchy-Schwarz divergence. Thus, the initial states have a stronger repel effect from each other. Also, the destination states have large valleys that create a large attraction effect for each initial state to move to. Thus, the optimization solution will be faster in the L22 distance case. Unfortunately, the L22 distance suffers from a similar issue to the Cauchy-Schwarz divergence. If the initial conditions increase farther away from the destination states, the optimization may take much longer due to a flat surface away from the destination states. C. L22 Distance with Quadratic Term The issue of convergence remains for the L22 distance when the initial states are far larger than the destination states. To achieve faster convergence, an additional term is added to the L22 distance to shape the gradient descent through a quadratic term as given by DL22 mod (f, g) = DL22 (f, g)   Ng Nf X X (12) (i) wg(j) wf N (mjg ; mif , Pgi + Pfj ). − ln  j=1 i=1 Note that this term is referred as quadratic, although it may be more appropriate to call it quadratic-like. Figure 1(c) shows the surface plot using the modified L22 distance for a 4-density swarm in Eq. (12). Compared to the L22 distance, the initial and destination states provide the hills and valleys necessary to obtain convergence. However, as the initial states move outwards, the surface map decreases in a quadratic fashion instead of staying flat. Thus, the optimization can occur at any point to reach convergence in a timely manner. To solve the minimization problem for the objective function, traditional LQR based solutions are not applicable since the terms inside the objective functions are nonquadratic [23]. The minimization of the objective function in discrete time is min uk ,k =1,...,T + J(u) = T X E{u⊺k Ruk } k=1 Nf Nf X X j i wf,k wf,k N (mjf,k ; mif,k , Pf,k + Pf,k ) Ng Ng X X j i wg,k wg,k N (mjg,k ; mig,k , Pg,k + Pg,k ) (j) (i) (j) (i) j =1 i =1 + j =1 i =1 −2 Ng Nf X X (j) V. R ESULTS (i) j i wg,k wf,k N (mjg,k ; mif,k , Pg,k + Pf,k ) j =1 i =1  − ln  which measures the distance of the agents to the means of the densities. As the swarm evolved, this distance determined which units belong to a given component. Agents were controlled according to their placement in each density through an open loop method using the MPC control input obtained for each density. Although an open loop method was used, feedback control can be used if the state estimates are determined from the PHD filter. The great advantage of using MPC is that the algorithm can handle nonlinearities in the objective function. Unfortunately, numerically solving an optimization at each timestep is not particularly fast, so it can be difficult to run optimization problems in real-time to control swarm robots towards a target state. Ng Nf X X j=1 i=1  (j) (i) j i wg,k wf,k N (mjg,k ; mif,k , Pg,k + Pf,k ) , (13) Subject to : mif,k+1 = Ak mif,k + Bk uif,k , (14) N where uk = [(u1f,k )T , · · · , (uf,kf )⊺ ]⊺ is the collection of all control variables. IV. R ECEDING H ORIZON DYNAMIC P ROGRAMMING In the simulation experiment, a 4-density swarm on a 2D plane was initialized in a square grid where the densities 1, 2, 3, and 4 were defined counterclockwise starting on the first quadrant. With the 4-density swarm, four different test cases were implemented to bring the densities to the target trajectories and to test the control theory involved from the control formulation. The first test case shows the limitations of using only the L22 distance with varying initial conditions in a square grid and four target destinations located at (±1,±1). The last three cases used the L22 distance with a quadratic term and varying target destinations. In Case 2, four target destinations are located at (±1,±1). For Case 3, three target destinations are located at (±1,1) and (-1,-1). Lastly in Case 4, five target destinations are located at (±1,±1) and (0,0). The receding horizon dynamic programming was used to determine the control effort and trajectories for the simulation, but other methods including iterative LQR can be used too [23]. m2,y m3,y m4,y m1,y m2,x m3,x m4,x m1,x An optimal solution based on minimizing the objective uses MPC or receding horizon control. This uses dynamic programming techniques to obtain an optimal control solution u from the objective function and has been implemented on swarm control previously [20]. Conceptually, at a time t, the knowledge of the system model is used to derive a sequence u(t|t), u(t + 1|t), u(t + 4 4 2|t), · · · , u(t + Tp |t) where Tp is the finite horizon from 2 2 the current state x̄(k) [26]. With the input sequence, the 0 0 0 0.1 0.2 0.3 0.4 0 0.1 0.2 0.3 0.4 state is moved forward in time by the control horizon, Tc ; PSfrag replacements Time (s) Time (s) 0 4 usually one time-step. Then the same strategy is repeated -2 2 -4 0 for time t + 1. Tp can be chosen to be either small or large. 0 0.1 0.2 0.3 0.4 0 0.1 0.2 0.3 0.4 As Tp increases, the degrees of freedom in the optimization Time (s) Time (s) 0 0 increases which can slow down the algorithm considerably -2 -2 -4 -4 even though more of the future reference trajectory would 0 0.1 0.2 0.3 0.4 0 0.1 0.2 0.3 0.4 Time (s) Time (s) be useful to bring the output closer to the reference. With 4 0 2 -2 a smaller Tp , the computation time will be faster, but the 0 -4 0 0.1 0.2 0.3 0.4 0 0.1 0.2 0.3 0.4 optimization may be more suboptimal. Thus, the swarm may Time (s) Time (s) not converge to the desired configuration. For the RFS control formulation, a u that controls the swarm densities through their statistics (mean and covari- Fig. 2: The position responses of density statistics (means) ance) was found by minimizing the objective as given by are shown for Case 1 and Case 2.2 Black-dashed and redEq. (13) and (14). This was done using MATLAB’s fminunc dotted lines are the responses for L2 distance with (±3,±3)) The bluesolver and the Quasi-Newton algorithm [27]. Then, the and (±1.5,±1.5)) initial conditions respectively. 2 solid lines are the responses for the L +Quadratic term with 2 agents in the swarm were initialized to the closest density initial conditions of (±3,±3)). The green-dotted lines are the using the Mahalanobis distance given by target destinations for both cases. q DM (x, mif,k ) = (x − mif,k )⊺ P −1 (x − mif,k ), (15) A. Case 1: L22 5 time = 0.00 s 5 time = 0.05 s 0.08 y y y y y y y y For Case 1, four swarm densities are controlled to move 0.07 0 0 towards the target destinations at initial conditions farther 0.06 away (square grid at (±3,±3)) and closer to (square grid -5 -5 0.05 at (±1.5,±1.5)) the target destinations as shown by mean -5 0 5 -5 0 5 x x PSfrag replacements responses given by the black-dashed and red-dotted lines in 0.04 time = 0.10 s time = 0.40 s 5 5 Figure 2 respectively. From the trajectory snapshots given 0.03 by Figure 3(a), initial conditions that are far from the target 0 0 destinations do not have a converging control solution. From 0.02 the surface visualization in Figure 1(b), the general plane 0.01 -5 -5 is flat in areas away from the target destinations and states -5 0 5 -5 0 5 x x of the density. Therefore, optimization using MPC is more difficult in these flat areas and may not converge to a solution. Fig. 4: Case 2: Trajectories of the swarm with individual If the densities are initialized much closer to the target agents (red dots) and four target destinations (black x’s). destinations as shown in Figure 3(b), the flatness in the general plane is minimal, and the optimization step in MPC converges to a solution. By using the L22 distance, converging C. Case 3: L2 +Quadratic Term, Three Target Destinations 2 control solutions can only be found for initial conditions and Case 3 illustrates the effect of three target destinations target destinations that are close. on the final trajectories of the four swarm densities. From Figure 5, it can be visually shown where the swarm densities time = 0.00 s time = 0.40 s 5 5 are located relative to the target destinations at each time 0.08 step. The trajectories for density 1 and density 3 reach their 0.07 0 0 target, but densities 2 and 4 reach the third target with 0.06 approximately 0.30 of steady-state error. The results obtained -5 -5 follow directly from the RFS control theory using the L22 plus Sfrag replacements 0.05 -5 0 5 -5 0 5 x (a) Initial conditions of (±3,±3) x quadratic distance term. By using this L22 with a quadratic 0.04 time = 0.00 s time = 0.40 s 5 5 term in the objective function, the individual densities will 0.03 attract towards the target destinations while repulsing away 0 0 from each other. This can be shown in the surface map shown 0.02 in Figure 1(c) where the hills are areas of repulsion and 0.01 -5 -5 valleys are areas of attraction. Thus, for Case 3, densities 2 -5 0 5 -5 0 5 time = 0.10 s x (b) Initial conditions of (±1.5,±1.5) x and 4 are attracted to the same target, but they stay away from each other which causes both to share the same target Fig. 3: Case 1: Trajectories of the swarm with individual at a distance away. agents (red dots) and four target destinations (black x’s). 5 time = 0.00 s 5 time = 0.05 s 0.12 B. Case 2: L22 +Quadratic Term, Four Target Destinations y y y y 0 0 0.1 In Case 2, four swarm densities move towards the four target destinations given by the blue-solid lines (mean re0.08 -5 -5 sponses) in Figure 2. Figure 4 shows the trajectory snapshots -5 0 5 -5 0 5 x x and final states of each of the swarm densitiesPSfrag duringreplacements the 0.06 time = 0.10 s time = 0.40 s 5 5 simulation. The target destinations are plotted as black x’s. 0.04 The red dots are the individual swarm agents that form 0 0 the Gaussian mixture densities. From the figure, all four 0.02 densities converge to the target destinations in approximately -5 -5 0.17 seconds and approximately 0.03 of steady-state error -5 0 5 -5 0 5 x x between the densities’ position to the target destinations. In comparison to Case 1, Figure 2 shows that for small Fig. 5: Case 3: Trajectories for the swarm with individual distances between the initial state and the target destination, agents (red dots) and three target destinations (black x’s). the L22 distance is sufficient for state convergence, but as the 2 distance increases, the L2 distance diverges away. By adding D. Case 4: L2 +Quadratic term, Five Target Destinations 2 the quadratic term to L22 , the optimization step can directly determine the minimum for the control solution shown in Figure 1(c). Therefore, the target destinations attract the swarm densities at distances that fail for only L22 distance given by Figure 2. For Case 4, four swarm densities are attracted to five target destinations. The trajectory snapshots of the densities are visually shown relative to the five target destinations in Figure 6. All densities have a steady state error of approximately 0.17 which follow the theory as expected. Since the swarm densities are far from each other, the effects of repulsion are minimal. Also, the densities are attracted to the four target destinations that make up a square, but they are also attracted to the target destination at the origin. This is due to the minimization of the objective function that has a L22 and a quadratic term where the individual densities will attract towards the target destinations. Since there is an additional target destination of attraction at the origin, all four swarm densities are affected by the origin as they are moving towards the 4 square target destinations. Thus, compared to Case 2 with only 4 target destinations, the densities in this case will have steady state error due to attraction of the target destination that has no density. time = 0.00 s 5 5 time = 0.05 s 0.09 y y 0.08 0 0 0.07 0.06 -5 -5 Sfrag replacements 5 0 -5 -5 5 x time = 0.10 s 5 0 5 0.05 x time = 0.40 s 0.04 y y 0.03 0 0 0.02 0.01 -5 -5 0 5 -5 -5 x 0 5 x Fig. 6: Case 4: Trajectories for the swarm with individual agents (red dots) and five target destinations (black x’s). VI. C ONCLUSIONS The objective of this paper was to formulate a method to control swarming formations by MPC and RFS theory. By setting up the problem using information divergence to define the distance between the swarm RFS and a desired distribution, an optimal control problem was found that tracked a linear system with a nonquadratic objective function using MPC that approximates the optimal control solution that minimizes the objective function. ACKNOWLEDGMENT The authors wish to acknowledge support by the National Aeronautics and Space Administration under Contract Number NNX16CP45P issued through the NASA STTR Program by the Jet Propulsion Laboratory (JPL) and led by Amir Rahmani at JPL. The authors wish to acknowledge useful conversations related to satellite technologies with Chuck Hisamoto, Vaughn Weirens, and Suneel Sheikh of ASTER Labs, Inc. R EFERENCES [1] Kube, C. Ronald, and Hong Zhang. “Collective robotics: From social insects to robots.” Adaptive behavior 2.2 (1993): 189-218. [2] Vassev, Emil, Mike Hinchey, and Joey Paquet. “Towards an ASSL specification model for NASA swarm-based exploration missions.” Proceedings of the 2008 ACM symposium on Applied computing. ACM, 2008. [3] Ryan, Allison, et al. “An overview of emerging results in cooperative UAV control.” Decision and Control, 2004. CDC. 43rd IEEE Conference on. Vol. 1. IEEE, 2004. [4] Rubenstein, Michael, Alejandro Cornejo, and Radhika Nagpal. “Programmable self-assembly in a thousand-robot swarm.” Science 345.6198 (2014): 795-799. [5] Lunze, Jan. Feedback control of large-scale systems. London: PrenticeHall, (1992): 9-11. [6] Pace, M., M. Birattari, and M. Dorigo. “The swarm/potential model: Modeling robotics swarms with measure-valued recursions associated to random finite sets.” IEEE Transactions on Robotics, page submitted (2013). [7] Centralized Control. Ian Sommerville , 2008. Web. 05 May 2017. [8] Mondada, Francesco, et al. “The cooperation of swarm-bots: Physical interactions in collective robotics.” IEEE Robotics & Automation Magazine 12.2 (2005): 21-28. [9] Bandyopadhyay, Saptarshi, Soon-Jo Chung, and Fred Y. Hadaegh. “Probabilistic swarm guidance using optimal transport.” Control Applications (CCA), 2014 IEEE Conference on. IEEE, 2014. [10] Acikmese, Behet, and David S. Bayard. “A markov chain approach to probabilistic swarm guidance.” American Control Conference (ACC), 2012. IEEE, 2012. [11] Chattopadhyay, Ishanu, and Asok Ray. “Supervised self-organization of homogeneous swarms using ergodic projections of markov chains.” IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics) 39.6 (2009): 1505-1515. [12] Bandyopadhyay, Saptarshi, Soon-Jo Chung, and Fred Y. Hadaegh. “Inhomogeneous Markov chain approach to probabilistic swarm guidance algorithm.” 5th Int. Conf. Spacecraft Formation Flying Missions and Technologies. 2013. [13] Hadaegh, Fred Y., Soon-Jo Chung, and Harish M. Manohara. “On development of 100-gram-class spacecraft for swarm applications.” IEEE Systems Journal 10.2 (2016): 673-684. [14] Eren, Utku, and Behet Açıkmeşe. “Velocity field generation for density control of swarms using heat equation and smoothing kernels.” IFACPapersOnLine 50.1 (2017): 9405-9411. [15] Camacho, Eduardo F., and Carlos Bordons Alba. Model predictive control. Springer Science & Business Media, 2013. [16] Di Cairano, S., H. Park, and I. Kolmanovsky. “Model predictive control approach for guidance of spacecraft rendezvous and proximity maneuvering.” International Journal of Robust and Nonlinear Control 22.12 (2012): 1398-1427. [17] Manikonda, V., et al. “A model predictive control-based approach for spacecraft formation keeping and attitude control.” American Control Conference, 1999. Proceedings of the 1999. Vol. 6. IEEE, 1999. [18] Morgan, Daniel, Soon-Jo Chung, and Fred Y. Hadaegh. “Decentralized model predictive control of swarms of spacecraft using sequential convex programming.” Advances in the Astronautical Sciences 148 (2013): 1-20. [19] Morgan, Daniel, Soon-Jo Chung, and Fred Hadaegh. “Spacecraft swarm guidance using a sequence of decentralized convex optimizations.” (2012): Art-No. [20] Morgan, Daniel, Soon-Jo Chung, and Fred Y. Hadaegh. “Swarm assignment and trajectory optimization using variable-swarm, distributed auction assignment and model predictive control.” AIAA guidance, navigation, and control conference. 2015. [21] Mahler, Ronald PS. “Multitarget Bayes filtering via first-order multitarget moments.” IEEE Transactions on Aerospace and Electronic systems 39.4 (2003): 1152-1178. [22] Vo, B-N., and W-K. Ma. “The Gaussian mixture probability hypothesis density filter.” IEEE Transactions on signal processing 54.11 (2006): 4091-4104. [23] Todorov, Emanuel, and Weiwei Li. “A generalized iterative LQG method for locally-optimal feedback control of constrained nonlinear stochastic systems.” American Control Conference, 2005. Proceedings of the 2005. IEEE, 2005. [24] Hoang, Hung Gia, et al. “The Cauchy Schwarz divergence for Poisson point processes.” IEEE Transactions on Information Theory 61.8 (2015): 4475-4485. [25] Inaba, Masayuki, and Peter I. Corke. “Linear-quadratic control and smoothing.” Robotics Research: The 16th International Symposium ISRR. Switzerland: Springer, 2016. 43-47. Print. [26] Findeisen, Rolf, and Frank Allgwer. “An introduction to nonlinear model predictive control.” 21st Benelux Meeting on Systems and Control. Vol. 11. Eindhoven, The Netherlands: Technische Universiteit Eindhoven Veldhoven, 2002. [27] Find minimum of unconstrained multivariable function - MATLAB fminunc, MathWorks. Web.
3cs.SY
1 Mitigating Asymmetric Nonlinear Weight Update Effects in Hardware Neural Network based on Analog Resistive Synapse Chih-Cheng Chang, Pin-Chun Chen, Teyuh Chou, I-Ting Wang, Boris Hudec, Che-Chia Chang, Chia-Ming Tsai, Tian-Sheuan Chang, Senior Member, IEEE, and Tuo-Hung Hou, Senior Member, IEEE  Abstract—Asymmetric nonlinear weight update is considered as one of the major obstacles for realizing hardware neural networks based on analog resistive synapses because it significantly compromises the online training capability. This paper provides new solutions to this critical issue through co-optimization with the hardware-applicable deep-learning algorithms. New insights on engineering activation functions and a threshold weight update scheme effectively suppress the undesirable training noise induced by inaccurate weight update. We successfully trained a two-layer perceptron network online and improved the classification accuracy of MNIST handwritten digit dataset to 87.8/94.8% by using 6-bit/8-bit analog synapses, respectively, with extremely high asymmetric nonlinearity. Index Terms—Neuromorphic computing, RRAM, synapse, multilayer perceptron D I. INTRODUCTION EEP learning on software-defined neural networks has greatly advanced many aspects of artificial intelligence, such as image recognition, speech recognition, natural language understanding, and decision making, by using a general-purpose learning procedure on conventional computing hardware, such as central processing units or graphic processing units [1]. Recently, the limitations of the conventional computing hardware on the form factor, cost, and power consumption of deep learning systems have promoted active research on hardware neural networks (HNNs) that are inspired by the physical structure of high-density, low-power, and distributed biological neural networks [2-3]. The HNNs employing crossbar resistive random access memory (RRAM)-based synaptic arrays are particularly interesting because they may significantly improve the learning efficiency by fully parallelizing the vector-matrix multiplication (weighted sum) and outer-product weight update through the This work was supported by the Ministry of Science and Technology of Taiwan under grant: MOST 105-2119-M-009-009 and Research of Excellence program MOST 106-2633-E-009-001, and Taiwan Semiconductor Manufacturing Company. T.-H. Hou acknowledges support by NCTU-UCB I-RiCE program, under grant MOST 106-2911-I-009-301. The authors are with Department of Electronics Engineering and Institute of Electronics, National Chiao Tung University, Hsinchu, Taiwan (email:[email protected]) distributed weight storage [4]. Impressive RRAM-based HNN prototypes have been demonstrated including speech and electroencephalography signal recognition [5], pattern recognition [6], dot product engine [7], nature image processing [8], and face classification [9]. However, most implementations were limited to primitive algorithms such as single-layer perceptron or sparse coding, and many of them relied on offline training. By contrast, our brain processes information intelligently and in real time through a considerably more complicated deep neural networks with a layered structure [10]. The software approach also resorts to extremely deep neural networks to improve recognition accuracy that surpasses humans [11]. Designing a deep HNN with online training capability is a nontrivial task because of the challenges of non-ideal properties of RRAM synapses [4, 12–16]. In particular, the asymmetric nonlinear weight update of RRAM synapses had been identified as an outstanding issue that significantly degraded the learning accuracy [15–17]. Several approaches have been proposed aiming at improving the asymmetric nonlinear weight update of RRAM synapses, for example by careful material/device engineering [18], by implementing an additional compensational circuit [19], or by optimizing the operating pulse waveform [20]. However, to further increase the immunity against this undesirable nonlinear effect, co-optimization considering both the device characteristics and the HNN algorithms suitable for future deep learning would be essential. This paper focused on the HNN design employing a Ta/HfO2/Al-doped TiO2/TiN synaptic device deposited by atomic layer deposition (ALD). The device exhibited bidirectional analog weight change that is suitable for the ultimate high-density neural network by using one two-terminal RRAM cell per synapse [4]. By contrast, more than one RRAM cell per synapse would be required by using binary RRAM [21] or unidirectional analog RRAM [15]. Furthermore, we presented a hardware-applicable multilayer perceptron (MLP) algorithm that accelerated supervised online training through massive parallelism. The MLP algorithm is the foundation of numerous deep-learning neural networks such as convolutional neural network (CNN). We reported that engineering the nonlinear activation function and employing a cutoff threshold on weight update were effective for mitigating the effects of asymmetric nonlinear weight update. The 2 Fig. 2. Non-ideal properties of RRAM-based synapse including bounded weight with finite precision and asymmetric nonlinear weight update. The potentiation and depression curves with different degrees of asymmetric nonlinearity (ANL) are also plotted. Fig. 1. (a) DC switching curve of the Ta/HfO2/Al-doped TiO2/TiN RRAM devices. Inset shows the cross-sectional TEM image of the Ta/HfO2/Al-doped TiO2/TiN RRAM device with a HfO2/TiO2 bilayer thickness of 12 nm. (b) Conductance modulation of multiple devices during AC potentiation and depression operations. Potentiation and depression pulses were 3 V for 0.01 ms and -3 V for 70 ms, respectively. The conductance value were readout at -1.5 V. The box-and-whisker plot indicating the device-to-device variation and the fitting curve using Eq. (1)-(3) are also sketched. (c) Reproducible conductance modulation during repeated potentiation and depression cycles with a total of 3,000 training pulses. The curve in the first and final 500 cycles are zoomed in. classification accuracy of MNIST handwritten digit dataset was improved to 94.8% by considering an extremely high asymmetric nonlinearity in weight update. We also discussed the effects of reduced precision in weights and neurons. The results suggest the HNN algorithm, if designed properly, could be highly robust against the non-ideal asymmetric nonlinearity of weight update. II. FULLY ANALOG RRAM SYNAPSE The synaptic device we considered in this study was implemented using a non-filamentary Ta/HfO2/Al-doped TiO2/TiN RRAM. The device resembled similar analog synaptic properties as those in the previously reported Ta/TaOx/TiO2/Ti RRAM [20, 22–23]. Figure 1(a) shows the DC switching characteristics of the device with positive set and negative reset voltages. The total film thickness of the new HfO2/TiO2 oxide bilayers, as shown in the transmission electron microscope image (Inset in Fig. 1(a)), was further scaled down to approximately 12 nm by using ALD compared with the previous 40-nm-thick TaOx/TiO2 deposited by sputtering. The conformal ALD growth and oxide thickness scaling are highly desirable in future 3D crossbar synaptic arrays with extremely high-density and high-connectivity [20]. In 3D crossbar synaptic arrays, which resemble the 3D neural network in the human brain [24], the oxide bilayers must be conformally deposited on the vertical sidewalls of deep trenches or vias. The pitch size of the trenches or vias and thus the ultimate packing density are determined by the thickness of the oxide bilayers. More detailed discussions on the device fabrication process and RRAM switching characteristics will be presented elsewhere. Figure 1(b) shows the synaptic plasticity determined by measuring the device conductance (G) at -1.5 V. The G value changed from a G minimum (Gmin) to a G maximum (Gmax) in a range of approximately 4 S within one cycle of synaptic operation, which comprised 50 consecutive potentiation pulses (P-pulses) at 3 V for 0.01 ms, followed by another 50 consecutive depression pulses (D-pulses) at -3 V for 70 ms. Here the increment and decrement of the device conductance are referred to as potentiation and depression, respectively. The device-to-device variation was considerably small because of the uniform ALD growth. The multiple analog states were precisely trained according to P/D-pulse inputs provided by external neural circuits. The bidirectional analog weight modulation with minimal conductance fluctuation obtained in this device is inherently different from the conventional filamentary synapses [25]. Furthermore, Fig. 1(c) shows reproducible synaptic plasticity during repeated potentiation and depression cycles with a total of 3,000 training pulses. Although this device demonstrated promising analog synaptic responses, several non-ideal properties compared with the weight presented by floating-point numbers in software-defined neural networks are noticeable, as summarized in Fig. 2. Their influence should be carefully evaluated when implementing HNNs. First, the precision of 3 synaptic weight is limited because the total plasticity range Gmax/Gmin is finite and precise control on the weight value is governed by the integer number of training pulses. The discrete weight values in this device are bounded between Gmax and Gmin with approximately a 5 to 6-bit precision. Second, the weight change is not linearly proportional to the P/D-pulse inputs. The change of device conductance is more dramatic during the first few P/D-pulses and saturates as the number of pulses increases, which is referred to as nonlinear weight update. More importantly, the potentiation and depression characteristics are not symmetric. The weight change induced by the P-pulses is much stronger at the low-conductance states while that induced by the D-pulses is much stronger at the high-conductance states, which is referred to as asymmetric weight update. This asymmetric nonlinear weight update creates a hysteresis loop [4] in Fig. 2 when using the number of P/D-pulses to update weights, and results in a considerable error. For example, the weight value undergoing 25 P-pulses is not identical as that undergoing 50 P-pulses plus 25 D-pulses. The asymmetric nonlinear relation between discrete G values and the cumulative number of P/D-pulses (nP/nD) is fitted mathematically by: GP (nP )  Gmin  A  nP nP  ek GD (nD )  Gmax  A  ( N  nD ) ( N  nD )  ek A  (Gmax  Gmin )  (1  ek ) N (1) (2) (3) where GP and GD are functions describing conductance of potentiation and depression curves, respectively. N is the maximum allowed number of input pulses, which defines the weight precision of RRAM devices, and k is a fitting parameter. Furthermore, this non-ideal effect could be quantitatively defined using an asymmetric nonlinearity factor (ANL) as: N N   ANL  GP ( )  GD ( )  / (Gmax  Gmin ) 2 2   (4) The ANL value is between zero to one. Completely symmetric potentiation and depression curves yield an ANL value of zero while the device exhibits an ANL value of 0.7 in Fig. 1(b). III. MULTILAYER PERCEPTRON ALGORITHM FOR HNNS Here we present a modified two-layer perceptron algorithm for implementing HNNs. The network includes one input neuron layer where neurons are numbered from 1 to i, one hidden neuron layer where neurons are numbered from 1 to j, and one output neuron layer where neurons are numbered from 1 to k, as illustrated in Fig. 3(a). Two adjacent neuron layers are referred to as pre-neuron and post-neuron layers along the forward propagation direction, and are fully connected using RRAM synapses. The fully connected network could be implemented using a crossbar RRAM array, as illustrated in Fig. Fig. 3. (a) Illustration of a two-layer fully-connected perceptron network. (b) Implementation of weighted sum and outer-product weight update by using the crossbar RRAM configuration. Only the first fully-connected layer was illustrated. (c) Illustrations of sigmoid and ReLU activation functions with and without parallel shifts. 3(b). The initial conductance values of RRAM synapses are randomized in the range between Gmin and Gmax. The weighted sum is performed by summing all current components on the same column, and the post neurons in different columns parallel convert analog current signal to digital voltage signal by using appropriate integrated circuits, such as a leaky integrate-and-fire neuron circuit. Note that time-consuming readout of conductance values of individual devices is not necessary when performing this weighted sum calculation by using the crossbar configuration. However, the synaptic weight values could be both positive and negative float-point numbers in conventional multilayer perceptron algorithms while the discrete conductance values in RRAM synapses are only positive. Therefore, the effect of signed weight values are emulated by subtracting a reference current flowing through a separate dummy column. The weighted sum values of the hidden (Hj) and output (Ok) neurons are given by: I   H j  f a ( S Hj )  f a b j    X i  Wij   i 1   I    f a b j    X i   Gij  Gr    i 1   (5) 4 (13) J   Ok  f a ( SkO )  f a bk    H j  W jk   j 1   I    f a bk    H j   G jk  Gr    i 1   (6) where fa is a nonlinear activation function, and Xi is the value of input neurons. S Hj and S kO are the weighted sum before activation. bj(bk), Wij(Wjk), and Gij(Gjk) are bias value, signed weight value, and device conductance value in the first (second) fully-connected layer. Gr is a constant reference conductance in the dummy column given by: Gr  (Gmax  Gmin ) / 2 (7) The nonlinear activation functions evaluated in this work include the popular sigmoid function and rectified linear unit (ReLU) function [26]. Fig. 3(c) shows the illustration of both functions. The sigmoid function is given by: f a ( x)  1 1  e ( x s ) (8) The ReLU function is given by: f a ( x)  max  0, ( x  s )  (9) where s is the parallel shifted value of the functions, which is set to zero by default. The supervised training is performed using a gradient-descent backpropagation method. The ) backpropagation values of the output ( OkBP ) and hidden ( H BP j neurons are given by: OkBP  Tk  Ok  f a'  S kO  (10) K H BP    OkBPW jk  f a'  S Hj  j (11) k 1 where Tk is the target value of each output neuron, and f a' is the derivative of the activation function. The conductance values of RRAM synapses are updated according to multiplications of forward-propagation values of pre-neurons and backward-propagation values of post-neurons, which is mathematically equivalent to perform outer product of two vectors. The multiplication could be realized through the careful overlapping of the pre- and post-neuron waveforms by using the crossbar configuration [16, 27], and the effective pulse number nij (njk) applied on RRAM synapses in the first (second) fully-connected layer is given by: nij  round ( X i  H BP j ) n jk  round ( H j OkBP ) (12) where  is the learning rate that is a scaling factor to regulate training. Rounding is performed considering only an integer of the effective pulse number. Positive and negative n induce potentiation and depression of the device conductance, respectively. This outer-product weight update is highly efficient because all synapses in the array are updated simultaneously. More importantly, the update is solely based on the values of pre-neuron and post-neuron. No prior state of RRAM synapses needs be stored or readout before updating. If the weight change Wij(Wjk) of RRAM synapses is linearly proportional to nij (njk), Eqs. (12) and (13) would guarantee correct weight changes that follow the ideal gradient-descent backpropagation method. However, practical RRAM synapses possess nonlinear weight update behaviors as discussed in Eqs. (1) and (2). The new conductance value of the updated RRAM synapse, Gnew, should be considered using Eqs. (1) and (2) as: G new  GP (nPold  n) for n  0 (14)  GD (nDold  n) for n  0 where nPold and nDold are equivalent cumulative number of P/D-pulses before update. Furthermore, rounding is performed on all forward- and backward-propagation values, i.e. Xi, Hj, Ok, , and OkBP , because the precision of practical neuron H BP j circuits is finite. For the mathematically unbounded activations, such as ReLU, an upper bound of neuron values was set to facilitate rounding in hardware. This upper bound was estimated in advance in this work to prevent clipping of high positive neuron values, but it potentially could be optimized empirically based on the classification results. This hardware-applicable algorithm could be extended to more sophisticate deep neural networks, such as CNN, with more than one hidden layer. To evaluate the non-ideal properties of the RRAM analog synapse on the hardware-applicable MLP algorithm, we performed simulations by using MNIST handwritten digit dataset. The network size was fixed at 784×300×10. The bias values were set to zero for simplicity in this work. Each training epoch contained 60,000 training images, which were 28×28 pixels large with 256 gray levels. The weight update could be performed after every training image by using stochastic gradient descent or after a minibatch of training images by using minibatch gradient descent. We verified that the convergence errors of training did not yield significant differences between these two methods. Therefore, the results reported in this paper were obtained using minibatch gradient descent to accelerate the simulation. The typical batch size was set to 10 to 50. A constant learning rate was used throughout training, but the value was optimized individually for different hardware setting conditions to improve training convergence. The classification accuracy was tested after training by using another independent 10,000 testing images. 5 TABLE I AVERAGE SPARSITY AND CLASSIFICATION ACCURACY BY USING SIGMOID AND RELU ACTIVATIONS WITH DIFFERENT SHIFTED VALUES S AND ANL. Fig. 4. Effects of various activation functions. (a) Dependence of asymmetric nonlinearity on the classification accuracy of MNIST handwritten digit dataset. (b) Convergence of MSE during training for both sigmoid and ReLU activation functions when linear and asymmetric nonlinear weight updates are assumed. IV. MITIGATING ASYMMETRIC NONLINEAR WEIGHT UPDATE BY ENGINEERING ACTIVATIONS We first verified the effects of asymmetric nonlinear weight update on MLP training, which was reported to be one of the major limitations of electronic synaptic devices [15–17]. Both neuron and weight precision were set to 8 bits. The nonlinear but symmetric weight update did not significantly affect the classification accuracy (not shown), which is consistent with previous studies [15–17]. By contrast, Fig. 4(a) shows that the asymmetric nonlinear weight update substantially degraded the accuracy by using the sigmoid activation function and a practical ANL factor larger than 0.4. Figure 4(b) shows the convergence of mean square error (MSE) during training. The asymmetric nonlinear weight update resulted in a slower convergence rate and premature saturation of MSE compared with the linear one because the intended amount of weight change on the device is not linearly proportional to the effective pulse number according to Eqs (1)-(2). The amount of weight change depends on the current weight state and is not equal when receiving an identical number of P-pulses and D-pulses. Ideally corrections on Eqs (1)-(2) would be possible in the neuron circuits to compensate the effects of asymmetric nonlinear weight update if the current weight state is known. However, this would involve reading the weight (conductance) value of every individual RRAM synapse and significantly comprise the advantage of hardware acceleration through the crossbar configuration. By contrast, we found that this undesirable effects could be effectively mitigated by using the ReLU activation. Both the classification accuracy in Fig. 4(a) and the convergence of training MSE in Fig. 4(b) were significantly improved when with a large ANL value of 0.8. Although both the ReLU and sigmoid functions rectify negative neuron values, the ReLU function produces a hard saturation effect where all negative values and their corresponding derivatives are forced to be or Ok and exactly zero, i.e. both the values of Hj and H BP j OkBP are zero. We referred those neurons with zero/non-zero values as inactive/active neurons. According to Eqs. (12)-(13), inactive neurons prevent those weights connected to them from updating (n=0). We define an average sparsity of the hidden layer as the fraction of zeros in Hj [28]. For ANL=0.8, the ReLU function greatly increased the average sparsity to 49% compared with 0.12% when using the sigmoid function. The quasi-hard saturation effect could be employed by using shifted sigmoid activation functions, which also showed excellent immunity against asymmetric nonlinear update in Fig. 4(a). Table 1 list the average sparsity and classification accuracy by using the sigmoid and ReLU activation functions with different s values for both linear (ANL=0) and highly nonlinear (ANL=0.8) weight update. The average sparsity increased with the increase of positive s, and the classification accuracy also increased with s before a turning point. For ANL=0, both sigmoid and ReLU activations achieved high accuracy of over 97%. For ANL=0.8, the highest classification accuracy of 6 Fig. 5. Dependence of average sparsity on the classification accuracy for different activation functions and asymmetric nonlinearity. 91.5% was obtained by using s = 3.5 for sigmoid while the highest classification accuracy of 85.4 % was obtained by using s = 0.2 for ReLU. Figure 5 illustrates that the optimized degrees of sparsity depended strongly on the choice of activation functions and the ANL values. The advantages of sparsity has been widely recognized in the field of deep neural networks [28]. The mathematical reasons behind had been explained by improving information disentangling, variable-size representation, linear separability, and distributed representation [28, 29]. In our MLP simulation, these factors were not determinant because the classification accuracy was relatively independent of the sparsity for the ideal linear update case. Both sigmoid and ReLU activations could achieve similar accuracy with different sparsity levels (~35% for sigmoid and ~65% for ReLU). We attribute the improvement by increasing the average sparsity for the highly nonlinear update case to the suppression of inaccurate weight update. The frequent switching of the signs of the small n values during training would induce substantial update error and unnecessary perturbation toward convergence because of the asymmetric nonlinear weight update. Their effects could be considered as noise during weight training. The hard or quasi-hard saturation effect introduced by ReLU or shifting promotes convergence by suppressing noise induced by small n while favoring large n that carries the true information. However, excessive sparsity deteriorated the performance of forward propagation in both training and testing for an equal number of neurons because it reduces the effective capacity of the model [28]. More information was discarded in forward propagation by using high s values. Therefore, there exists an optimized s values in Fig. 5. Furthermore, for a high ANL, sigmoid outperformed ReLU on the classification accuracy when shifting is employed, as shown in Fig. 4 and Table 1. ReLU is widely adopted in deep neural networks because its constant derivative overcomes the vanishing gradient problem [26, 28]. However, the vanishing gradient problem is not a concern for the simple MLP demonstrated here. The major difference between ReLU and a shifted sigmoid is that ReLU is unbounded with a constant derivative for high positive values. Therefore, n is not equal to zero according to Eqs. (10)-(13) Fig. 6. Effects of threshold weight update scheme with both the sigmoid and ReLU activation functions in the presence of high asymmetric nonlinearity (ANL=0.8). The improvement of using the shifted sigmoid (with the optimized s=3.5) and the threshold update are cumulative while the additional benefit of using shifted ReLU (with the optimized s=0.2) is less pronounced. even if the output neuron values exceed the highest possible target values. An upper bounded activation function with zero derivation for high positive values, such as shifted sigmoid, could suppress this unnecessary update when the nonideal training noise is significant. Our preliminary data (not shown) suggest that using a clipped ReLU activation by setting a suitable upper bound value could achieve a comparable accuracy as that using the shifted sigmoid in Fig. 4. V. THRESHOLD WEIGHT UPDATE SCHEME Inspired by the result that high sparsity is only required during weight update but not forward propagation, we propose a threshold weight update scheme where high degree of sparsity is only introduced to suppress the noise of weight update by modifying Eqs. (12)-(13) as:  nij  round  fth ( X i )  fth ( H BP j ) (15) n jk  round  fth ( H j )  fth (OkBP )  (16) The cutoff threshold function fth with a threshold value th is given by: fth ( x)  x for x  th (17)  0 for x  th The optimized th value is considered as an empirical parameter similar to the learning rate for different datasets. The same th value was applied for all Xi, Hj, H BP , and OkBP in this work for j simplicity, but potentially different th values could be optimized for each term separately. Figure 6 shows the comparison of classification accuracy by using different th and s values. For ANL=0.8, the highest classification accuracy of 94.8 % was obtained by using th = 0.99 for sigmoid (s=3.5), which is close to the ideal 97% accuracy with ANL=0. The highest classification accuracy of 92.9 % was obtained by using th = 0.6 for ReLU (s=0). Because of the cutoff threshold, 7 Fig. 7. Evolution of weight distributions in the first and second fully-connected layers for both ANL=0 and 0.8. The shifted sigmoid (s=3.5) and threshold weight update (th=0.99) were used. extremely high sparsity could be induced in the backpropagation path (sparsity over 97% for the sigmoid case) to suppress update noise without compromising the accuracy of forward propagation. The effects of shifted activations and threshold weight update were cumulative especially for the sigmoid activation, which without any modification produces an inherently less sparse network and is thus more prone to noise induced by erroneous weight update. Independently tuning sparsity during the forward propagation by using the shifted activation and sparsity during weight update by using the cutoff threshold function achieved higher classification accuracy than that by tuning one of them alone. Figure 7 shows the evolution of weight distributions in the first and second fully-connected layers for the optimized networks with ANL=0 (97% accuracy) and ANL=0.8 (94.8% accuracy). The final weight distributions were surprisingly different for these two cases with a comparable accuracy. This result highlights that the modified MLP algorithm, if designed properly, is self-adaptive to high asymmetric nonlinearity of weight update. VI. WEIGHT AND NEURON PRECISION The effects of reducing weight and neuron precision were further investigated in the presence of high asymmetric nonlinearity. A lower weight/neuron precision relaxes the design specifications on the synaptic devices/peripheral circuits for the ease of hardware implementation. Figure 8a shows that the requirement on the weight precision was higher for high ANL values. The asymmetric nonlinearity compromised the effective bit precision because of the irregular weight update. The future development of synaptic devices with a higher weight precision, for example by increasing the dynamic range of the conductance change to accommodate more analog states, should be continuously pursued. However, an acceptable accuracy of 87.8% was obtained by using a 6-bit weight precision, which is potentially obtainable by using practical analog RRAM-based synapses such as the one shown in Fig. 1. Figure 8b shows that the requirement on the neuron precision was also higher for high ANL values because the activations and threshold update implemented in the algorithm were Fig. 8. Dependence of the classification accuracy on the (a) weight and (b) neuron precision. The shifted sigmoid (s=3.5) and threshold weight update (th=0.99) were used. sensitive to the neuron precision. A 6-bit neuron precision could be a good tradeoff between accuracy and hardware complexity. VII. CONCLUSION Asymmetric nonlinear weight update is an outstanding issue of online training for analog RRAM-based HNNs. Previous studies mainly focused on improving this non-ideal property from various perspectives of device optimization. Through careful co-optimization between device properties and hardware-applicable deep-learning algorithms, this paper proposed an alternative solution to this problem. By engineering the activation function and adopting the threshold weight update scheme, the modified MLP algorithm suppressed update noise induced by inaccurate small weight changes and is self-adaptive to asymmetric nonlinearity. Both modifications could be implemented in neuron circuits. We successfully trained a two-layer perceptron network online in the presence of extremely high asymmetric nonlinearity (ANL=0.8) and improves classification accuracy of MNIST handwritten digit dataset to 94.8% by using 8-bit weight and neuron precisions. The tradeoff between accuracy and 8 hardware complexity was attainable using a reduced precision to 6 bits. The results suggest a promising direction for designing a robust HNN against asymmetric nonlinear weight update in practical synaptic devices. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] Y. Lecun, Y. Bengio, and G. Hinton, "Deep learning," Nature, vol. 521, no. 7553, pp. 436-444, 2015. D. Kuzum, S. Yu, and H.-S. P. Wong, "Synaptic electronics: materials, devices and applications," Nanotechnology, vol. 24, 382001, 2013. S. B. Eryilmaz, D. Kuzum, S. Yu, and H.-S. P. Wong, "Device and system level design considerations for analog-non-volatile- memory based neuromorphic architectures," in Proc. IEEE Int. Electron Devices Meeting (IEDM), 2015, pp. 64–67. S. Yu, P.-Y. Chen, Y. Cao, L. Xia, Y. Wang, and H. Wu, "Scaling-up resistive synaptic arrays for neuro-inspired architecture: challenges and prospect," in Proc. IEEE Int. Electron Devices Meeting (IEDM), 2015, pp. 451–454. S. Park, M. Chu, J. Kim, J. Noh, M. Jeon, B. H. Lee, H. Hwang, B. Lee, and B.-G. Lee, "Electronic system with memristive synapses for pattern recognition," Sci. Rep., vol. 5, 10123, 2015. M. Prezioso, F. Merrikh-Bayat, B. D. Hoskins, G. C. Adam, K. K. Likharev, and D. B. Strukov, "Training and operation of an integrated neuromorphic network based on metal-oxide memristors," Nature, vol. 521, no. 7550, pp. 61–64, 2015. M. Hu, J. P. Strachan, Z. Li, E. M. Grafals, N. Davila, C. Graves, S. Lam, N. Ge, J. Yang, and R. S. Williams, "Dot-product engine for neuromorphic computing: Programming 1T1M crossbar to accelerate matrix-vector multiplication," in Proc. Design Automation Conf. (DAC), 2016, pp. 1–6. P. M. Sheridan, F. Cai, C. Du, W. Ma, Z. Zhang, and W. D. Lu, "Sparse coding with memristor networks," Nature Nanotech., doi:10.1038/nnano.2017.83, 2017. P. Yao, H. Wu, B. Gao, S. B. Eryilmaz, X. Huang, W. Zhang, Q. Zhang, N. Deng, L. Shi, H.-S. P. Wong, and H. Qian, "Face classification using electronic synapses," Nature Communi., vol. 8, 15199, 2017. S. Shipp, "Structure and function of the cerebral cortex," Current Biology, vol. 17, no. 12, pp. R443–449, 2007. K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for image recognition," in Proc. Computer Vision and Pattern Recognition (CVPR), 2016, pp. 770–778. M. Hu, H. Li, Y. Chen, Q. Wu, G. S. Rose, and R. W. Linderman, "Memristor crossbar-based neuromorphic computing system: a case study," IEEE Trans. Neural Networks and Learning Systems, vol. 25, no. 10, pp. 1864–1878, 2014. P.-Y. Chen, B. Lin, I-T. Wang, T.-H. Hou, J. Ye, S. Vrudhula, J.-S. Seo, Y. Cao, S. Yu, "Mitigating effects of non-ideal synaptic device characteristics for on-chip learning," in Proc. Computer-Aided Design (ICCAD), 2015, pp. 194–199. P.-Y. Chen, D. Kadetotad, Z. Xu, A. Mohanty, B. Lin, J. Ye, S. Vrudhula, J.-S. Seo, Y. Cao, and S. Yu, "Technology-design co-optimization of resistive cross-point array for accelerating learning algorithms on chip," in Proc. Design, Automation & Test in Europe Conference & Exhibition (DATE), 2015, pp. 854–859. [15] G. W. Burr, R. M. Shelby, C. Nolfo, J. W. Jang, R. S. Shenoy, P. Narayanan, K. Virwani, E. U. Giacometti, B. Kurdi, and H. Hwang, "Experimental demonstration and tolerancing of a large-scale neural network (165,000 synapses), using phase-change memory as the synaptic weight element," in Proc. IEEE Int. Electron Devices Meeting (IEDM), 2014, pp. 697-700. [16] S. Agarwal, S. J. Plimpton, D. R. Hughart, A. H. Hsia, I. Richter, J. A Cox, C. D. James, M. J. Marinella, "Resistive memory device requirements for a neural algorithm accelerator," in Proc. Int. Joint Conf. Neural Networks (IJCNN), 2016, pp. 929-938. [17] J.-W. Jang, S. Park, G. W. Burr, H. Hwang, Y.-H. Jeong, "Memristor crossbar-based neuromorphic computing system: a case study," IEEE Electron Device Lett., vol. 36, no. 5, pp. 457–459, 2015. [18] J. Woo, K. Moon, J. Song, S. Lee, M. Kwak, J. Park, and H. Hwang, "Improved synaptic behavior under identical pulses using AlOx/HfO2 bilayer RRAM array for neuromorphic systems," IEEE Electron Device Lett., vol. 37, no. 8, pp. 994–997, 2016. [19] D. Lee, J. Park, K. Moon, J. Jang, S. Park, M. Chu, J. Kim, J. Noh, M. Jeon, B. H. Lee, B. Lee, B.-G. Lee, and H. Hwang, "Oxide based nanoscale analog synapse device for neural signal recognition system," in Proc. IEEE Int. Electron Devices Meeting (IEDM), 2015, pp. 91–94. [20] I.-T. Wang, C.-C. Chang, L.-W. Chiu, T. Chou, and T.-H. Hou, "3D Ta/TaOx/TiO2/Ti synaptic array and linearity tuning of weight update for hardware neural network applications," Nanotechnology, vol. 27, 365204, 2016. [21] D. Garbin, O. Bichler, E. Vianello, Q. Rafhay, C. Gamrat, L.Perniola, G. Ghibaudo, B. DeSalvo, "Variability-tolerant convolutional neural network for pattern recognition applications based on OxRAM synapses," in Proc. IEEE Int. Electron Devices Meeting (IEDM), 2014, pp. 661–664. [22] I.-T. Wang, Y.-C. Lin, Y.-F. Wang, C.-W. Hsu, and T.-H. Hou, "3D synaptic architecture with ultralow sub-10 fJ energy per spike for neuromorphic computation," in Proc. IEEE Int. Electron Devices Meeting (IEDM), 2014, pp. 665-668. [23] Y.-F. Wang, Y.-C. Lin, I-T. Wang, T.-P. Lin, and T.-H. Hou, "Characterization and modeling of nonfilamentary Ta/TaOx/TiO2/Ti analog synaptic device," Sci. Rep., vol. 5, 10150, 2015. [24] V. J. Wedeen, D. L. Rosene, R. Wang, G. Dai, F. Mortazavi, P. Hagmann, J. H. Kaas, W.-Y. I. Tseng, "The geometric structure of the brain fiber pathways," Science, vol. 335, 1628–1634, 2012. [25] S. Yu, B. Gao, Z. Fang, H. Yu, J. Kang, and H.-S. P. Wong, "A neuromorphic visual system using RRAM synaptic devices with sub-pJ energy and tolerance to variability: experimental characterization and large-scale modeling," in Proc. IEEE Int. Electron Devices Meeting (IEDM), 2012, pp. 239–242. [26] V. Nair and G. E. Hinton, "Rectified linear units improve restricted boltzmann machines," in Proc. Int. Conf. Machine Learning (ICML), 2010, pp. 807–814. [27] D. Kadetotad, Z. Xu, A. Mohanty, P.-Y. Chen, B. Lin, J. Ye, S. Vrudhula, S. Yu, Y. Cao, and J.-S. Seo, "Parallel architecture with resistive crosspoint array for dictionary learning acceleration," IEEE J. Emerging Sel. Topics Circuits Syst., vol. 5, no. 2, pp. 194–204, 2015. [28] X. Glorot, A. Bordes, and Y. Bengio, "Deep sparse rectifier neural networks," in Proc. Conf. Artificial Intelligence and Statistics (AISTATS), 2011, pp. 315–323. [29] Y. Bengio, "Learning deep architectures for AI," Foundations and Trends in Machine Learning, vol. 2, no. 1, pp. 1–127, 2009.
9cs.NE
A Lottery Model for Center-type Problems With Outliers ∗ David G. Harris† Thomas Pensyl‡ Aravind Srinivasan§ Khoa Trinh¶ arXiv:1710.00287v1 [cs.DS] 1 Oct 2017 Abstract In this paper, we give tight approximation algorithms for the k-center and matroid center problems with outliers. Unfairness arises naturally in this setting: certain clients could always be considered as outliers. To address this issue, we introduce a lottery model in which each client j is allowed to submit a parameter pj ∈ [0, 1] and we look for a random solution that covers every client j with probability at least pj . Our techniques include a randomized rounding procedure to round a point inside a matroid intersection polytope to a basis plus at most one extra item such that all marginal probabilities are preserved and such that a certain linear function of the variables does not decrease in the process with probability one. 1 Introduction The classic k-center and Knapsack Center problems are known to be approximable to within factors of 2 and 3 respectively [7]. These results are best possible unless P=NP [7, 8]. In these problems, we are given a metric graph G and want to find a subset S of vertices of G subject to either a cardinality constraint or a knapsack constraint such that the maximum distance from any vertex to the nearest vertex in S is as small as possible. We shall refer to vertices in G as clients. Vertices in S are also called centers. It is not difficult to see that a few outliers (i.e., very distant clients) may result in a very large optimal radius in the center-type problems. This issue was raised by Charikar et. al. [4], who proposed a robust model in which we are given a parameter t and only need to serve t out of given n clients (i.e. n − t outliers may be ignored in the solution). Here we consider three robust center-type problems: the Robust k-Center (RkCenter) problem, the Robust Knapsack Center (RKnapCenter) problem, and the Robust Matroid Center (RMatCenter) problem. Formally, an instance I of the RkCenter problem consists of a set V of vertices, a metric distance d on V , an integer k, and an integer t. Let n = |V | denote the number of vertices (clients). The goal is to choose a set S ⊆ V of centers (facilities) such that (i) |S| ≤ k, (ii) there is a set of covered vertices (clients) C ⊆ V of size at least t, and (iii) the objective function R := max min d(i, j) j∈C i∈S is minimized. In the RKnapCenter problem, each vertex i ∈ VPhas a weight wi ∈ [0, 1], and the cardinality constraint (i) is replaced by the knapsack constraint: i∈S wi ≤ 1. Similarly, in the RMatCenter problem, the constraint (i) is replaced by a matroid constraint: S must be an independent set of a given matroid M. Here we assume that we have access to the rank oracle of M. ∗ Research supported in part by NSF Awards CNS-1010789 and CCF-1422569, and by a research award from Adobe, Inc. A preliminary version of this work appeared in the Proc. International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX), 2017. † Department of Computer Science, University of Maryland, College Park, MD 20742. Email: [email protected] ‡ Department of Computer Science, University of Maryland, College Park, MD 20742. Email: [email protected] § Department of Computer Science and Institute for Advanced Computer Studies, University of Maryland, College Park, MD 20742. Email: [email protected] ¶ Department of Computer Science, University of Maryland, College Park, MD 20742. Email: [email protected] 1 In [4], Charikar et. al. introduced a greedy algorithm for the RkCenter problem that achieves an approximation ratio of 3. Recently, Chakrabarty et. al. [3] give a 2-approximation algorithm for this problem. Since the k-center problem is a special case of the RkCenter problem, this ratio is best possible unless P=NP. The RKnapCenter problem was first studied by Chen et. al. [5], which showed that one can achieve an approximation ratio of 3 if allowed to slightly violate the knapsack constraint by a factor of (1 + ). It is still unknown whether there exists a true approximation algorithm for this problem. The current inapproximability bound is still 3 due to the hardness of the Knapsack Center problem. The current best approximation guarantee for the RMatCenter problem is 7 by Chen et. al. [5]. This problem has a hardness of (3 − ) via a reduction from the k-supplier problem. From a practical viewpoint, unfairness arises inevitably in the robust model: some clients might always be considered as outliers and hence not covered within the guaranteed radius. To address this issue, we introduce a lottery model for these problems. The idea is to randomly pick a solution from a public list such that each client j ∈ V is guaranteed to be covered with probability at least pj , where pj ∈ [0, 1] is the success rate requested by j. This is also motivated by the fact that different clients may have different tolerances of getting connected to their closest facility. One possible way of determining the pj values is to let each client j pay for the chance of being served. Note that the robust model is a special case when pj = 0 for all j ∈ V . Similarly, when all pj ’s are equal to 1, it becomes the standard model where all clients must be connected. The lottery model might also be useful in the context of clustering. Recall that clustering is a fundamental task in unsupervised machine learning. Basically, we want to partition a set of data points to clusters in such a way that the points in the same cluster are “similar” to each other. The k-center clustering is one of the popular approaches to this task. (See also k-means clustering [1,9] and k-median clustering [2, 12, 15].) Naturally, the robust model can be applied to get rid of some “bad data points” or “noise” and hence improve the overall quality of all clusters. Here over-fitting may occur when this model misclassifies some good points as outliers. The lottery model offers the flexibility to decide whether a point should be included in the solution via the pj values. In this paper, we introduce new approximation algorithms for these robust center problems under the lottery model. (Note that this model has been used recently for the Knapsack Center problems [6], although the techniques and problems in that paper are different from ours.) We also propose improved approximation algorithms for the RkCenter problem and the RMatCenter problem. 1.1 The Lottery Model In this section, we formally define our lottery model for the above-mentioned problems. First, the Fair Robust k-Center (FRkCenter) problem is formulated as follows. Besides the parameters V, d, k and t, each vertex j ∈ V has a “target” probability pj ∈ [0, 1]. We are interested in the minimum radius R for which there exists a distribution D on subsets of V such that a set S drawn from D satisfies the following constraints: Coverage constraint: |C| ≥ t with probability one, where C is the set of all clients in V that are within radius R from some center S, Fairness constraint: Pr[j ∈ C] ≥ pj for all j ∈ V , where C is as in the coverage constraint, Cardinality constraint: |S| ≤ k with probability one. Here we aim for a polynomial-time, randomized algorithm that can sample from D. Note that the RkCenter is a special of this variant in which all pj ’s are set to be zero. The Fair Robust Knapsack Center (FRKnapCenter) problem and Fair Robust Matroid Center (FRMatCenter) problem are defined similarly except that we replace the cardinality constraint by a knapsack constraint and a matroid constraint, respectively. More formally, in the FRKnapCenter problem, each vertex i has a weight wi ∈ [0, 1], and we require the total weight of centers in S to be at most 2 1 with probability one. Similarly, in the FRMatCenter problem, we are given a matroid M and we require the solution S to be an independent set of M with probability one. 1.2 Our contributions and techniques First of all, we give tight approximation algorithms for the RkCenter and RMatCenter problems. Theorem 1.1. There exist a 2-approximation algorithm for the RkCenter problem 1 and a 3-approximation algorithm for the RMatCenter problem. Our main results for the lottery model are summarized in the following theorems. Theorem 1.2. For any given constant  > 0 and any instance I = (V, d, k, t, p~) of the FRkCenter problem, there is a randomized polynomial-time algorithm A which can compute a random solution S such that • |S| ≤ k with probability one, • |C| ≥ (1 − )t, where C is the set of all clients within radius 2R from some center in S and R is the optimal radius, • Pr[j ∈ C] ≥ (1 − )pj for all j ∈ V . Theorem 1.3. For any  > 0 and any instance I = (V, d, w, B, t, p~) of the FRKnapCenter problem, there is a randomized polynomial-time algorithm A which can return random solution S such that P • i∈S wi ≤ (1 + )B with probability one, • |C| ≥ t, where C is the set of vertices within distance 3R of S. • Pr[j ∈ C] ≥ pj for all j ∈ V . Finally, the FRMatCenter can be reduced to (randomly) rounding a point in a matroid intersection polytope. We design a randomized rounding algorithm which can output a pseudo solution, which consists of a basis plus one extra center. By using a preprocessing step and a configuration LP, we can satisfy the matroid constraint exactly (respectively, knapsack constraint) while slightly violating the coverage and fairness constraints in the FRMatCenter (respectively, FRKnapCenter) problem. We believe these techniques could be useful in other facility-location problems (e.g., the matroid median problem [10, 14]) as well. Theorem 1.4. For any given constant γ > 0 and any instance I = (V, d, M, t, p~) of the FRMatCenter (respectively, FRKnapCenter) problem, there is a randomized polynomial-time algorithm A which can return a random solution S such that • S is a basis of M with probability one, (respectively, w(S) ≤ B with probability one) • |C| ≥ t − γ 2 n, where C is the set of vertices within distance 3R of S. • there exists a set T ⊆ V of size at least (1 − γ)n, which is deterministic, such that Pr[j ∈ C] ≥ pj − γ for all j ∈ T . 1 A 2-approximation algorithm has also been found independently by Chakrabarty et. al. [3], and in a private discussion between Marek Cygan and Samir Khuller. Our algorithm here is different from the algorithm in [3]. 3 1.3 Organization The rest of this paper is organized as follows. In Section 2, we review some basic properties of matroids and discuss a filtering algorithm which is used in later algorithms. Then we develop approximation algorithms for the FRkCenter, FRKnapCenter, and FRMatCenter problems in the next three sections. 2 2.1 Preliminaries Matroid polytopes We first review a few basic facts about matroid polytopes. For any vector z and set S, we let z(S) denote P the sum i∈S zi . Let M be any matroid on the ground set Ω and rM be its rank function. The matroid base polytope of M is defined by  PM := x ∈ RΩ : x(S) ≤ rM (S) ∀S ⊆ Ω; x(Ω) = rM (Ω); xi ≥ 0 ∀i ∈ Ω . Definition 2.1. Suppose Ax ≤ b is a valid inequality of PM . A face D of PM (corresponding to this valid inequality) is the set D := {x ∈ PM : Ax = b} . The following theorem gives a characterization for any face of PM (See, e.g., [11, 13]). Theorem 2.2. Let D be any face of PM . Then it can be characterized by  D = x ∈ RΩ : x(S) = rM (S) ∀S ∈ L; xi = 0 ∀i ∈ J; x ∈ PM , where J ⊆ Ω and L is a chain family of sets: L1 ⊂ L2 ⊂ . . . ⊂ Lm . Moreover, it is sufficient to choose L as any maximal chain L1 ⊂ L2 ⊂ . . . ⊂ Lm such that x(Li ) = rM (Li ) for all i = 1, 2, . . . , m. Proposition 2.3. Let x ∈ PM be any point and I be the set of all tight constraints of PM on x. Suppose D is the face with respect to I. Then one can compute a chain family L for D as in Theorem 2.2 in polynomial time. 0 (S) = r (S) − x(S) for S ⊆ Ω Proof. Recall that rM is a submodular function. Thus the function rM M is also submodular. It is well-known that submodular minimization can be done in polynomial time. We 0 (S) : S ⊆ Ω}. If there are multiple solutions, we solve the following optimization problem: min {rM let S0 be any solution of minimal size. (This can be done easily, say, by trying to drop each item from the current solution and resolving the program.) We add S0 to our chain. Then we find some minimal 0 (S ) = 0, add S to our chain, and repeat the process. superset S1 of S0 such that rM 1 1 Corollary 2.4. Let D be any face of PM . Then it can be characterized by  D = x ∈ RΩ : x(S) = bS ∀S ∈ O; xi = 0 ∀i ∈ J; x ∈ PM , where J ⊆ Ω and O is a family of pairwise disjoint sets: O1 , O2 , . . . , Om , and bO1 , . . . , bOm are some integer constants. Proof. By Theorem 2.2, we have  D = x ∈ RΩ : x(S) = rM (S) ∀S ∈ L; xi = 0 ∀i ∈ J; x ∈ PM , where J ⊆ Ω and L is the chain: L1 ⊂ L2 ⊂ . . . ⊂ Lm . Now let us define O1 := L1 , O2 := L2 \ L1 , O3 := L3 \L2 , . . . , Om := Lm \Lm−1 , and bO1 := rM (L1 ), bO2 := rM (L2 )−rM (L1 ), . . . , bOm := rM (Lm ) − rM (Lm−1 ). It is not difficult to verify that  D = x ∈ RΩ : x(S) = bS ∀S ∈ O; xi = 0 ∀i ∈ J; x ∈ PM . 4 2.2 Filtering algorithm All algorithms in this paper are based on rounding an LP solution. In general, for each vertex i ∈ V , we have a variable yi ∈ [0, 1] which represents the probability that we want to pick i in our solution. (In the standard model, yi is the “extent” that i is opened.) In addition, for each pair of i, j ∈ V , we have a variable xij ∈ [0, 1] which represents the probability that j is connected to i. Note that in all center-type problems, the optimal radius R is always the distance between two vertices. Therefore, we can always “guess” the value of R in O(log n) by a binary search on the sorted entries of the matrix d. WLOG, we may assume that we know the correct value of R. For any j ∈ V , we define P Bj := {i ∈ V : d(i, j) ≤ R} and we let Fj := {i ∈ V : d(i, j) ≤ R ∧ xij > 0} and sj := i∈Bj xij . We shall refer to Fj as a cluster with cluster center j. Depending on a specific problem, we may have different constraints on xij ’s and yi ’s. In general, the following constraints are valid in most of the problems here: XX xij ≥ t, (1) j∈V i∈Bj X i∈Bj xij ≤ 1, xij ≤ yi , yi , xij ≥ 0, For the fair variants, we may also require that X xij ≥ pj , i∈Bj ∀j ∈ V, ∀i, j ∈ V, (2) (3) ∀i, j ∈ V. (4) ∀j ∈ V. (5) Constraint (1) says that at least t vertices should be covered. Constraint (2) ensures that each vertex is only connected to at most one center. Constraint (3) means vertex j can only connect to center i if it is open. Constraint (5) says that the total probability of j being connected should be at least pj . By constraints (2) and (3), we have y(Fj ) ≤ 1. The first step of all algorithms in this paper is to use the following filtering algorithm to obtain a maximal collection of disjoint clusters. The algorithm will return the set V 0 of cluster centers of the chosen clusters. In the process, we also keep track of the number cj of other clusters removed by Fj for each j ∈ V 0 . Algorithm 1 RF ILTERING (x, y) 1: 2: 3: 4: 5: 6: 7: 3 V0 ←∅ for each unmarked cluster Fj in decreasing order of sj do V 0 ← V 0 ∪ {j} Set all unmarked clusters Fk (including Fj itself) s.t. Fk ∩ Fj 6= ∅ as marked. Let cj be the number of marked clusters in this step. ~c ← (cj : j ∈ V 0 ) return (V 0 , ~c) The k-center problems with outliers In this section, we first give a simple 2-approximation algorithm for the RkCenter problem. Then, we give an approximation algorithm for the FRkCenter problem, proving Theorem 1.2. 5 3.1 The robust k-center problem Suppose I = (V, d, k, t) is an instance the RkCenter problem with the optimal radius R. Consider the polytope PRkCenter containing points (x, y) satisfying constraints (1)–(4), and the cardinality constraint: X yi ≤ k. (6) i∈V Since R is the optimal radius, it is not difficult to check that PRkCenter 6= ∅. Let us pick any fractional solution (x, y) ∈ PRkCenter . The next step is to round (x, y) into an integral solution using the following simple algorithm. Algorithm 2 R K C ENTER ROUND (x, y) (V 0 , ~c) ← RF ILTERING (x, y) . 2: S ← the top k vertices i ∈ V 0 with highest value of ci . 3: return S 1: Analysis. By construction, the algorithm returns a set S of k open centers. Note that, for Peach i ∈ S, ci is the number of distinct clients within radius 2R from i. Thus, it suffices to show that i∈S ci ≥ t. By inequality (2), we have sj ≤ 1 for all j ∈ V 0 . Thus, X X ci si ≥ si ≥ t, i∈V 0 i∈V where the first inequality is due to the greedy choice of vertices in V 0 and the second inequality follows from (1). Now recall that the clusters whose centers in V 0 are pairwise disjoint. By constraint (6), X X X si ≤ y(Fi ) ≤ yi ≤ k. i∈V 0 It follows by the choice of S that 3.2 P i∈S ci i∈V 0 i∈V ≥ t. This concludes the first part of Theorem 1.1. The fair robust k-center problem Assume I = (V, d, k, t, p~) be an instance of the FRkCenter problem  with the optimal radius R. Fix any  > 0. If k ≤ 2/, then we can generate all possible O n1/ solutions and then solve an LP to obtain the corresponding marginal probabilities. So the problem can be solved easily in this case. We will assume that k ≥ 2/ for the rest of this section. Consider the polytope PFRkCenter containing points (x, y) satisfying constraints (1)–(4), the fairness constraint (5), and the cardinality constraint (6). We now show that PFRkCenter is actually a valid relaxation polytope. Proposition 3.1. The polytope PFRkCenter is non-empty. Proof. It suffices to point out a solution (x, y) ∈ PFRkCenter . Since R is the optimal radius, there exists a distribution D satisfying the coverage, fairness, and cardinality constraints. Suppose S is sampled from D and C is the set of all clients in V that are within radius R from some P center S. We now set yi := Pr[i ∈ S] for all i ∈ V . Since |S| ≤ k with probability one, we have i∈V yi = E[|S|] ≤ k, and hence constraint (6) is valid. We construct the assignment variable x as follows. For each j ∈ V , set zj := 0. Then for each i ∈ Bj , set xij := min{yi , 1 − zj } and update zj := zj + xij . It is not hard to see that inequalities (2) and (3) hold by this construction. Now let us fix any j ∈ V . By fairness guarantee of D and the union bound, we have X pj ≤ Pr[j ∈ C] ≤ yi . i∈Bj 6 Thus, by construction of x, we have X i∈Bj xij ≥ Pr[j ∈ C] ≥ pj , and hence inequality (5) is satisfied. Finally, we have X XX E[|C|] = Pr[j ∈ C] ≤ xij . j∈V j∈V i∈Bj Since |C| ≥ t with probability one, E[|C|] ≥ t, implying that inequality (1) holds. Our algorithm is as follows. Algorithm 3 FR K C ENTER ROUND (, x, y) (V 0 , ~c) ← RF ILTERING (x, y) . 2: Form vector y 0 by setting 1: yj0 ← (1 − ) 3: 4: 5: 6: 7: X xij i∈Fj for each j ∈ V 0 . while at least three entries of y 0 are in the range (0, 1) do 0 Let δ ∈ RV , δ 6= 0 be such that δi = 0 ∀i ∈ V 0 : yi0 ∈ {0, 1}, δ(V 0 ) = 0, and ~c · δ = 0. Choose scaling factors a, b > 0 such that 0 0 • y 0 + aδ ∈ [0, 1]V and y 0 − bδ ∈ [0, 1]V • there is at least one new entry of y 0 + aδ which is equal to zero or one • there is at least one new entry of y 0 − bδ which is equal to zero or one b With probability a+b , update y 0 ← y 0 + aδ; else, update y 0 ← y 0 − bδ. return S = {i ∈ V : yi0 > 0}. Analysis. First, note that one can find such a vector δ in line 4 as the system of δ(V 0 ) = 0 and ~c · δ = 0 consists of two constraints and at least three variables (and hence is underdetermined.) Thus, the algorithm rounds at least one fractional variable per iteration, and terminates after O(n) rounds. Let S denote the (random) solution returned by FR K C ENTER ROUND and C be the set of all clients within radius 3R from some center in S. Theorem 1.2 can be verified by the following propositions. Proposition 3.2. |S| ≤ k with probability one. Proof. By definition of y 0 at line 2 of FR K C ENTER ROUND, we have X X X X y 0 (V 0 ) = (1 − ) xij ≤ (1 − ) yi ≤ (1 − )k ≤ k − 2, j∈V 0 i∈Fj j∈V 0 i∈Fj since k ≥ 2/. Note that the sum y 0 (V 0 ) is never changed in the while loop (lines 4 . . . 7) because δ(V 0 ) = 0. Then the final vector y 0 contains at most two fractional values at the end of the while loop. By rounding these two values to one, the size of S is indeed at most k. Proposition 3.3. |C| ≥ (1 − )t with probability one. Proof. At the beginning of the while loop, we have X X X cj sj ≥ (1 − ) sj ≥ (1 − )t. ~c · y 0 = cj yj0 (Fj ) = (1 − ) j∈V 0 j∈V 0 7 j∈V Again, the quantity ~c · y 0 is unchanged in the while loop because ~c · δ = 0 implies that ~c · (y 0 + aδ) = ~c · y 0 0 and ~c · (y 0 − bδ) = ~c · y 0 in each iteration. Note that if y 0 ∈ {0, 1}V , then ~c · y 0 is the number of clients within radius 2R from some center i such that yi0 = 1. Basically, we round the two remaining fractional values of y 0 to one in line 8; and hence, the dot product should be still at least (1 − )t. Proposition 3.4. Pr[j ∈ C] ≥ (1 − )pj for all j ∈ V . Proof. Fix any j ∈ V . The algorithm RF ILTERING guarantees that there exists k ∈ V 0 such that Fj ∩ Fk 6= ∅ and sk ≥ sj . Now we claim that E[yk0 ] = yk0 . This is because the expected value of yk0 does not change after any single iteration: E[yk0 ] = (yk0 + aδ) b a + (yk0 − bδ) = yk0 . a+b a+b Then Pr[k ∈ S] = Pr[yk0 > 0] ≥ Pr[yk0 = 1] = E[yk0 ] = yk0 = (1 − )sk . Therefore, Pr[j ∈ C] ≥ Pr[k ∈ S] ≥ (1 − )sk ≥ (1 − )sj ≥ (1 − )pj , by constraint (5). 4 The Knapsack Center problems with outliers We study the RKnapCenter and FRKnapCenter problems in this section. Recall that in these problems, each vertex has a weight and we want to make sure that the total weight of the chosen centers does not exceed 1. We first give a 3-approximation algorithm for the RKnapCenter problem that slightly violates the knapsack constraint. Although this is not better than the known result by [5], both our algorithm and analysis here are more natural and simpler. It serves as a starting point for the next results. For the FRKnapCenter, we show that it is possible to satisfy the knapsack constraint exactly with small violations in the coverage and fairness constraints. 4.1 The robust knapsack center problem Suppose I = (V, d, w, t) is an instance the RKnapCenter problem with the optimal radius R. Consider the polytope PRKnapCenter containing points (x, y) satisfying constraints (1)–(4), and the knapsack constraint: X wi yi ≤ 1. (7) i∈V Again, it is not difficult to check that PRKnapCenter 6= ∅. Let us pick any fractional solution (x, y) ∈ PRKnapCenter . Our pseudo-approximation algorithm to round (x, y) is as follows. Algorithm 4 RK NAP C ENTER ROUND (x, y) (V 0 , ~c) ← RF ILTERING (x, y) . 2: For each i ∈ V 0 , let vi = arg minj∈Fi {wj } be the vertex with smallest weight in Fi n o P P 0 3: Let P 0 := z ∈ [0, 1]V : c z ≥ t ∧ w z ≤ 1 0 0 i i v i i i∈V i∈V 1: Compute an extreme point Y of P 0 5: return S = {vi : i ∈ V, Yi > 0} 4: 8 Analysis. We first claim that P 0 6= ∅ which implies that the extreme point Y of P 0 (in line 4) does exist. To see this, we claim that the vector s lies in P 0 . For, we have: X X ci si ≥ si ≥ t. i∈V 0 i∈V Also, X i∈V 0 wvi si = X i∈V 0 wvi X j∈Fi xji ≤ X i∈V 0 wv i X j∈Fi yj ≤ XX 0 i∈V j∈Fi wj yj ≤ X i∈V wi yi ≤ 1. All the inequalities follow from LP constraints and definitions of si , ci , and vi . Proposition 4.1. The solution S returned by RK NAP C ENTER ROUND satisfies w(S) ≤ 1 + 2wmax and |C| ≥ t, where C is the set of vertices within distance 3R of S and wmax is the maximum weight of any vertex in V . Proof. First, observe that any extreme point of P 0 has at most two fractional values. (In the worst case, 0 an i = 1, P extreme point z is Pfully determined by |V | − 2 tight constraints of the form zi = 0 or∗ z∗∗ c z = t, and w z = 1.) By construction of S, there are at most two vertices i , i such i∈V 0 i i i∈V 0 vi i that Yi∗ , Yi∗∗ are fractional. Thus, X wvi Yi + wi∗ + wi∗∗ ≤ 1 + 2wmax . w(S) = i∈S\{i∗ ,i∗∗ } Recall that each i ∈ V 0 has ci clients within distance 2R (and each client is counted only one time). By the triangle inequality, these clients are within distance 3R from vi . Thus, S covers at least X X ci Yi + ci∗ + ci∗∗ ≥ ci Yi ≥ t, i∈S\{i∗ ,i∗∗ } i∈S clients within radius 3R. 4.2 The fair robust knapsack center problem In this section, we will first consider a simple algorithm that only violates the knapsack constraint by two times the maximum weight of any vertex. Then using a configuration polytope to “condition” on the set of “big” vertices, we show that it is possible to either violate the budget by (1 + ) or to preserve the knapsack constraint while slightly violating the coverage and fairness constraints. 4.2.1 Basic algorithm Suppose I = (V, d, w, t, p~) is an instance the FRKnapCenter problem with the optimal radius R. Consider the polytope PFRKnapCenter containing points (x, y) satisfying constraints (1)–(4), the fairness constraint (5), and the knapsack constraint (7). The proof that PFRKnapCenter 6= ∅ is very similar to that of Proposition 3.1 and is omitted here. The following algorithm is a randomized version of RK NAP C ENTER ROUND. Note that P 0 6= ∅, and so the decomposition at line 4 is well-defined (see the analysis in Section 4.1). Proposition 4.2. The algorithm BASIC FRK NAP C ENTER ROUND returns a random solution S such that w(S) ≤ 1 + 2wmax , |C| ≥ t, and Pr[j ∈ C] ≥ pj for all j ∈ V , where C is the set of vertices within distance 3R of S and wmax is the maximum weight of any vertex in V . Proof. By similar arguments to the proof of Proposition 4.1, we have w(S) ≤ 1 + 2wmax and |C| ≥ t. To obtain the fairness guarantee, observe that vi ∈ S with probability at least zi = si . For any j ∈ V , let k ∈ V 0 be the vertex that removed j in the filtering step. We have Pr[j ∈ C] ≥ Pr[vk ∈ S] ≥ sk ≥ sj ≥ pj , where the penultimate inequality is due to our greedy choice of k in RF ILTERING. 9 Algorithm 5 BASIC FRK NAP C ENTER ROUND (x, y) (V 0 , ~c) ← RF ILTERING (x, y) . 2: For each i ∈ V 0 let vi := arg minj∈Fi {wj } be the vertex with smallest weight in Fi n o P P 0 3: Let P 0 := z ∈ [0, 1]V : c z ≥ t ∧ w z ≤ 1 i∈V 0 i i i∈V 0 vi i 1: 4: Decompose the vector s as a convex combination of extreme points z (1) , . . . , z (n+1) of P 0 : s = p1 z (1) + . . . + pn+1 z (n+1) , P where ` p` = 1 and p` ≥ 0 for all ` ∈ [n + 1]. 5: Randomly choose Y ← z (`) with probability p` . 6: return S = {vi : i ∈ V, Yi > 0} 4.2.2 An algorithm slightly violating the budget constraint Fix a small parameter  > 0. A vertex i is said to be big iff wi > . Let U denote the collection of all possible sets of big vertices. Since a solution can contain at most 1/ big vertices, we have |U| ≤ nO(1/) . Consider the configuration polytope Pconfig1 containing points (x, y, q) with the following constraints: P qU = 1    PU ∈U U   ∀j ∈ V, U ∈ U  i∈Bj xij ≤ qU   P P  U  ∀j ∈ V   U ∈U i∈Bj xij ≥ pj   U U   ≤ yi ∀i, j ∈ V, U ∈ U x Pij U w y ≤ qU B ∀U ∈ U Pi∈V Pi i  U   x ≥ qU t   j∈V i∈Bj ij   U  yi = 1 ∀U ∈ U, i ∈ U     U  yi = 0 ∀U ∈ U, i ∈ V \ U, wi > 1/    U U xij , yi , qU ≥ 0 ∀i, j ∈ V, U ∈ U We first claim that Pconfig1 is a valid relaxation polytope for the problem. Proposition 4.3. The polytope Pconfig1 is non-empty. Proof. Fix any optimal distribution D. Suppose S is sampled from D. For any U ∈ U, let P E(U ) be the event that U ⊆ S and S \U contains no big vertex, and let qU = Pr[E(U )]. It is clear that U ∈U qU = 1. U Let xU ij = Pr[E(U ) ∧ j is connected to i] and let yi = Pr[E(U ) ∧ i ∈ S]. Now observe that X X qU = Pr[E(U )] = Pr[j is connected to i ∧ E(U )] = xU ij . i∈Bj i∈Bj Similarly, pj ≤ Pr[j is connected] = = X X U ∈U i∈Bj X U ∈U Pr[j is connected ∧ E(U )] Pr[j is connected to i ∧ E(U )] = X X xU ij . U ∈U i∈Bj U Note that xU ij /qU and yi /qU are the probabilities that j is connected to i and i ∈ S conditioned on E(U ), respectively. Since the number of connected clients is at least t with probability one, we have XX XX t ≥ E[# connected clients|E(U )] = Pr[j is connected to i|E(U )] = xU ij /qU . j∈V i∈Bj j∈V i∈Bj 10 Similarly, w(S) ≤ 1 with probability one and so X 1 ≥ E[w(S)|U ] = wi (yiU /qU ). i∈V The other constraints can be verified easily. We conclude that (x, y, q) ∈ Pconfig1 . We use the following Algorithm 6 to round any (x, y, q) ∈ Pconfig1 : Algorithm 6 FRK NAP C ENTER ROUND 1 (x, y, q) Randomly pick a set U ∈ U with probability qU 0 U Let x0ij ← xU ij /qU and yi ← min{yi /qU , 1} 3: return S = BASIC RFK NAP C ENTER ROUND (x0 , y 0 ) 1: 2: We are now ready to prove Theorem 1.3. Proof of Theorem 1.3. We will show that solution S returned by FRK NAP C ENTER ROUND 1 satisfies the requirements of Theorem 1.3. Let E(U ) denote the event that it select U ∈ U. Note that (x0 , y 0 ) satisfies the following constraints: XX x0ij ≥ t, j∈V i∈Bj X i∈Bj X x0ij ≤ 1, x0ij = i∈Bj X i∈V ∀j ∈ V, X xij /qU , i∈Bj x0ij ≤ yi0 , wi yi0 ∀j ∈ V, ∀i, j ∈ V, ≤ 1. Moreover, yi0 = 1 for all i ∈ U , and yi0 = 0 for all big vertices i ∈ V \ U . Thus, the two extra fractional vertices opened by BASIC FRK NAP C ENTER ROUND have weight at most . By Proposition 4.2, we have w(S) ≤ 1 + 2. Moreover, conditioned on U , we have X X x0ij = xij /qU . Pr[j ∈ C|E(U )] ≥ i∈Bj i∈Bj Thus, by definition of Pconfig1 and our construction of S, we get Pr[j ∈ C] = 4.2.3 X U ∈U Pr[j ∈ C|E(U )] Pr[E(U )] ≥ X X U ∈U i∈Bj xij ≥ pj . An algorithm that satisfies the knapsack constraint exactly Let  > 0 a small parameter to be determined. Let U denote the collection of all possible vertex sets of at most d1/e; note that |U| ≤ nO(1/) . Suppose R is the optimal radius to our instance. Given a set U ∈ U, we say that vertex j ∈ V is blue if d(j, U ) ≤ 3R; otherwise, vertex i is red. For any i ∈ V , let RBall(i, U, R) denote the set of red vertices within radius 3R from i: RBall(i, U, R) := {j ∈ V : d(i, j) ≤ 3R ∧ d(j, U ) > 3R} 11 Consider the configuration polytope Pconfig2 containing points (x, y, q) with the following constraints: P qU = 1    PU ∈U U   ∀j ∈ V, U ∈ U  i∈B xij ≤ qU   P jP  U  ∀j ∈ V   U ∈U i∈Bj xij ≥ pj   U U   ≤ yi ∀i, j ∈ V, U ∈ U x Pij U wi y ≤ qU B ∀U ∈ U  Pi∈V P i  U    j∈V i∈Bj xij ≥ qU t    U  yi = 1 ∀U ∈ U, i ∈ U     U  yi = 0 ∀U ∈ U, i ∈ V \ U, |RBall(i, U, R)| ≥ n    U U xij , yi , qU ≥ 0 ∀i, j ∈ V, U ∈ U We first claim that Pconfig2 is a valid relaxation polytope for the problem. Proposition 4.4. The polytope Pconfig2 is non-empty. Proof. Suppose S is a solution drawn from the optimal distribution D. Consider the following randomized procedure to generate a random subset US of S: Algorithm 7 Generate random US : Set US ← ∅. while there exists ∈ S such that |RBall(i, US , R)| ≥ n do 3: Select the vertex i of smallest index such that |RBall(i, US , R)| ≥ n 4: Update US ← US ∪ {i} 5: Mark all vertices within radius 3R of i as blue 1: 2: Note that for all i ∈ S \ US , we have |RBall(i, US , R)| < n by the condition of the while-loop. Moreover, we claim that |US | ≤ d1/e, so that US ∈ U. For, suppose |US | > 1/; for each i ∈ US , there are at least n red vertices turned into blue by i in the procedure. This implies that there are more than (1/) × n = n vertices, which is a contradiction. Now for any U ∈ U, we set qU := Pr[US = U ]. Let xU = Pr[US = U ∧ j is connected to i], and ij P finally let yiU = Pr[US = U ∧ i ∈ S]. Then it is clear that U ∈U qU = 1. Using similar arguments as in the proof of Proposition 4.3, we have the following inequalities: X xU ij ≤ qU , ∀j ∈ V, U ∈ U i∈Bj X X U ∈U i∈Bj X i∈V xU ij ≥ pj , wi yiU ≤ qU , XX j∈V i∈Bj ∀j ∈ V ∀U ∈ U xU ij ≥ qU t. As mentioned before, if |RBall(i, US , R)| ≥ n then i ∈ / S. Therefore, yiU = Pr[US = U ∧ i ∈ S] = 0, ∀U ∈ U, i ∈ V \ U, |RBall(i, U, R)| ≥ n. The other constraints can be verified easily. We conclude that (x, y, q) ∈ Pconfig2 . 12 Algorithm 8 FRK NAP C ENTER ROUND 2 (x, y, q) 1: 2: 3: 4: 5: Randomly pick a set U ∈ U with probability qU 0 U Let x0ij ← xU ij /qU and yi ← min{yi /qU , 1} 0 S ← BASIC RFK NAP C ENTER ROUND (x0 , y 0 ) Let i1 , i2 be vertices in S 0 \ U having largest weights. return S = S 0 \ {i1 , i2 } Next, let us pick any (x, y, q) ∈ Pconfig2 and use the following algorithm to round it. 2 Analysis. Let us fix any γ > 0 and set  := γ2 . Also, let E(U ) denote the event that U ∈ U is picked in the algorithm. Again, observe that (x0 , y 0 ) satisfies the following inequalities: XX j∈V i∈Bj X i∈Bj X x0ij ≥ t, x0ij ≤ 1, x0ij = i∈Bj X i∈V ∀j ∈ V, X xij /qU , i∈Bj x0ij ≤ yi0 , wi yi0 ∀j ∈ V, ∀i, j ∈ V, ≤ 1. Recall that the algorithm BASIC FRK NAP C ENTER ROUND will return a solution S 0 consisting of a set S 00 with w(S 00 ) ≤ 1 plus (at most) two extra “fractional” centers i∗ and i∗∗ . Since yi0∗∗ , yi0∗ are fractional, we have that i∗ , i∗∗ ∈ / U . Thus, by removing the two centers having highest weights in S 0 \ U , we ensure that w(S) ≤ 1 with probability one. Now we shall prove the coverage guarantee. By Proposition 4.2, S 0 covers at least t vertices within radius 3R. If a vertex is blue, it can always be connected to some center in U and so it is not affected by the removal of i1 , i2 . Because each of i1 and i2 can cover at most n other red vertices, we have |C| ≥ t − 2n = 1 − γ 2 n. For any j ∈ V , let Xj be the indicator random variable for the event that d(j, S 0 ) ≤ 3R but d(j, P S \ {i1 , i2 }) > 3R. We say that j is a bad vertex iff E[Xj ] ≥ γ, other, vertex j is good. Note that j∈V Xj ≤ 2n with probability one. Thus, there can be at most 2n/γ bad vertices. Letting T denote the set of good vertices, we have |T | ≥ n − 2n/γ = (1 − γ)n. By Proposition 4.2, Pr[j is covered by S 0 ] ≥ pj . For any j ∈ T , we have Pr[j ∈ C] = Pr[j is covered by S 0 ∧ Xj = 0] = Pr[j is covered by S 0 ] − Pr[j is covered by S 0 ∧ Xj = 1] ≥ Pr[j is covered by S 0 ] − Pr[Xj = 1] ≥ pj − γ. This concludes the first part of Theorem 1.4 for the FRKnapCenter problem. 5 The Matroid Center problems with outliers In this section, we will first give a tight 3-approximation algorithm for the RMatCenter problem, improving upon the 7-approximation algorithm by Chen et. al. [5]. Then we study the FRMatCenter problem and prove the second part of Theorem 1.4. 13 5.1 The robust matroid center problem Suppose I = (V, d, M, t) is an instance of the RMatCenter problem with optimal radius R. Let rM denote the rank function of M. Consider the polytope PRMatCenter containing points (x, y) satisfying constraints (1)–(4), and the matroid rank constraints: y(U ) ≤ rM (U ), ∀U ⊆ V. (8) Since R is the optimal radius, it is not difficult to check that PRMatCenter 6= ∅. Let us pick any fractional solution (x, y) ∈ PRMatCenter . The next step is to round (x, y) into an integral solution. Our 3-approximation algorithm is as follows. Algorithm 9 RM AT C ENTER ROUND (x, y) (V 0 , ~c) ←  RF ILTERING (x, y) . 0 2: Let P := z ∈ [0, 1]V : z(U ) ≤ rM (U ) ∀U ⊆ V ∧ z(Fi ) ≤ 1 ∀i ∈ V 0 3: Find a basic solution Y ∈ P 0 which maximizes the linear function f : [0, 1]V → R defined as X X f (z) := cj zi for z ∈ [0, 1]V . 1: j∈V 0 4: i∈Fj return S = {i ∈ V : Yi = 1}. Analysis. Again, by construction, the clusters Fi are pairwise disjoint for i ∈ V 0 . Note that P 0 is the matroid intersection polytope between M and another partition matroid polytope saying that at most one item per set Fi for i ∈ V 0 can be chosen. Moreover, y ∈ P 0 implies that P 0 6= ∅. Thus, P 0 has integral extreme points and optimizing over P 0 can be done in polynomial time. Note that the solution S is feasible as it satisfies the matroid constraint. The correctness of RM AT C ENTER ROUND follows immediately by the following two propositions. Proposition 5.1. There are at least f (Y ) vertices in V that are at distance at most 3R from some open center in S. Proof. Recall that S is the set of vertices i ∈ V such that Yi = 1. Moreover, since Y (Fj ) ≤ 1, there can be at most one open center in Fj (i.e., |S ∩ Fj | ≤ 1) for each j ∈ V 0 . For any j ∈ V 0 , • if Y (Fj ) = 0, then there is no open center in Fj and its contribution in f (Y ) is zero, • if Y (Fj ) = 1, then we open some center i ∈ Fj and the contribution of j to f (Y ) is equal to cj . (Recall that cj is the number of clusters Fk with Fj ∩ Fk 6= ∅.) By triangle inequality, d(k, i) ≤ d(k, j) + d(j, i) ≤ 2R + R = 3R. Proposition 5.2. We have f (Y ) ≥ t. Proof. For each j ∈ V 0 and i ∈ Fj , define yi0 := xij (this is well-defined as all clusters Fj for j ∈ V 0 are pairwise disjoint). Also, set yi0 := 0 for other vertices i not belonging to any marked cluster. Then, by greedy choice and constraint (1), we have X X X f (y 0 ) = cj y 0 (Fj ) = cj sj ≥ sj ≥ t. j∈V 0 j∈V 0 By the choice of Y , we have f (Y ) ≥ f (y 0 ) ≥ t. This analysis proves the second part of Theorem 1.1. 14 j∈V 5.2 The fair robust matroid center problem In this section, we consider the FRMatCenter problem. It is not difficult to modify and randomize algorithm RMC ENTER ROUND so that it would return a random solution satisfying both the fairness guarantee and matroid constraint, and preserving the coverage constraint in expectation. This can be done by randomly picking Y inside P 0 . However, if we want to obtain some concrete guarantee on the coverage constraint, we may have to (slightly) violate either the matroid constraint or the fairness guarantee. We leave it as an open question whether there exists a true approximation algorithm for this problem. We will start with a pseudo-approximation algorithm which always returns a basis of M plus at most one extra center. Our algorithm is quite involved. We first carefully round a fractional solution inside a matroid intersection polytope into a (random) point with a special property: the unrounded variables form a single path connecting some clusters and tight matroid rank constraints. Next, rounding this point will ensure that all but one cluster has an open center. Then opening one extra center is sufficient to cover at least t clients. Finally, using a similar preprocessing step similar to the one in Section 4.2.3, we correct the solution by removing the extra center without affecting the fairness and coverage guarantees by too much. This algorithm concludes Theorem 1.4. 5.2.1 A pseudo-approximation algorithm Suppose I = (V, d, M, t, p~) is an instance the robust matroid center problem with the optimal radius R. Let rM denote the rank function of M and PM be the matroid base polytope of M. Consider the polytope PFRMatCenter containing points (x, y) satisfying constraints (1)–(4), the fairness constraint (5), and the matroid constraints (8). We note that PFRMatCenter is a valid relaxation. The main algorithm is summarized in Algorithm 10, which can round any vertex point (x, y) ∈ PFRMatCenter . Basically, we will round y iteratively. In each round, we construct a (multi)-bipartite graph where vertices on the left side are the disjoint sets O1 , O2 , . . . in Corollary 2.4. Vertices on the right side are corresponding to the disjoint sets F1 , F2 , . . . returned by RF ILTERING. Now each edge of the bipartite graph, connecting Oi and Fj , represents some unrounded variable yv ∈ (0, 1) where v ∈ Oi and v ∈ Fj . See Figure 1. L v Oi R yv 2 (0, 1) v Fj Figure 1: Construction of the multi-bipartite graph H = (L, R, EH ) in the main algorithm. Then we carefully pick a cycle (path) on this graph and round variables on the edges of this cycle (path). This is done by subroutines ROUND C YCLE, ROUND S INGLE PATH, and ROUND T WO PATHS. See Figures 2, 3, and 4. Basically, these procedures will first choose a direction ~r which alternatively 15 increases and decreases the variables on the cycle (path) so that (i) all tight matroid constraints are preserved and (ii) the number of (fractionally) covered clients is also preserved. Now we randomly move y along ~r or −~r to ensure that all the marginal probabilities are preserved. Finally, all the remaining, fractional variables will form one path on the bipartite graph. We round these variables by the procedure ROUND F INAL PATH which exploits the integrality of any face of a matroid intersection polytope. Then, to cover at least t clients, we may need to open one extra facility. Algorithm 10 P SEUDO FRMC ENTER ROUND (x, y) 1: 2: 3: 4: 5: 6: 7: 8: 9: (V 0 , ~c) ← RF ILTERING (x, y) and let F ← {Fj : j ∈ V 0 } Set yi0 ← xij for all j ∈ V 0S , i ∈ Fj Set yi0 ← 0 for all i ∈ V \ j∈V 0 Fj while y 0 still contains some fractional values do Note that y 0 ∈ PM . Compute the disjoint sets O1 , . . . , Ot and constants bO1 , . . . , bOt as in Corollary 2.4. S S Let O0 ← V \ ti=1 Oi and F0 ← V \ j∈V 0 Fj Construct a multi-bipartite graph H = (L, R, EH ) where • each vertex i ∈ L, where L = {0, . . . , t}, is corresponding to the set Oi • each vertex j ∈ R, where R = {0} ∪ {k : Fk ∈ F}, is corresponding to the set Fj • for each vertex v ∈ V such that yv ∈ (0, 1): if v belongs to some set Oi and Fj , add an edge e with label v connecting i ∈ L and j ∈ R. Check the following cases (in order): • Case 1: H contains a cycle. Let ~v = (v1 , v2 , . . . , v2` ) be the sequence of edge labels on this cycle. Update y 0 ← ROUND C YCLE(y 0 , ~v ) and go to line 4. • Case 2: H contains a maximal path with one endpoint in L and the other in R. Let ~v = (v1 , v2 , . . . , v2`+1 ) be the sequence of edge labels on this path. Update y 0 ← ROUND S INGLE PATH(y 0 , ~v ) and go to line 4. • Case 3: There are at least 2 distinct maximal paths (not necessarily disjoint) having both endpoints in R. Let ~v1 , ~v2 be the sequences of edge labels on these two paths. Update y 0 ← ROUND T WO PATHS(y 0 , ~v1 , ~v2 , ~c) and go to line 4. • The remaining case: all edges in H form a single path with both endpoints in R. Let (v1 , v2 , . . . , v2` ) be the sequence of edge labels on this path. Let Y ← ROUND F INAL PATH(y 0 , ~v ) and exit the loop. return S = {i ∈ V : Yi = 1}. Proposition 5.3. The polytyope PFRMatCenter is non-empty. Proof. The proof is similar to Proposition 3.1, and is omitted. We now explain how to implement the rounding steps in this algorithm. These are all based on the subroutine ROUND S INGLE P OINT, which moves the vector y as far as possible along the direction of vector ~r until it a new face of the polytope begins tight. We define it formally as Algorithm 11; note that it can be implemented efficiently by solving an appropriate LP. Algorithm 11 ROUND S INGLE P OINT (y, ~r) Select δ ∗ ≥ 0 to be maximal such that the vector z + δ ∗ r is in PM . 2: return (y + δ ∗~ r, δ ∗ ). 1: 16 Algorithm 12 ROUND C YCLE (y 0 , ~v ) Initialize ~r = ~0, then set rvj = (−1)j for j = 1, 2, . . . , |~v | 2: (y1 , δ1 ) ←ROUND S INGLE P OINT(y 0 , ~ r) 3: return y1 1: + yv1 1 yv2 1 1 yv6 yv3 + yv4 1 1 yv5 + 1 Figure 2: The left part shows a cycle. The right part shows how the variables on the cycle are being changed by ROUND C YCLE. Algorithm 13 ROUND S INGLE PATH (y 0 , ~v ) Initialize ~r = ~0, then set rvj = (−1)j+1 for j = 1, 2, . . . , |~v | 2: (y1 , δ1 ) ←ROUND S INGLE P OINT(y 0 , ~ r) 3: return y1 1: + yv1 1 yv2 1 yv3 + yv4 1 + yv5 O0 1 1 O0 Figure 3: The left part shows a single path. The right part shows how the variables on the path are being changed by ROUND S INGLE PATH. 17 Algorithm 14 ROUND T WO PATHS (y 0 , ~v , ~v 0 , ~c) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: WLOG, suppose j1 , j2 ∈ R are endpoints of v1 , v2` of the path ~v respectively and cj1 ≥ cj2 0 of the path ~ WLOG, suppose j10 , j20 ∈ R are endpoints of v10 , v2` v 0 respectively and cj10 ≥ cj20 0 ∆1 ← cj1 − cj2 ; ∆2 ← cj10 − cj20 ; ~r ← ~0 V1+ ← {v1 , v3 , . . . , v2`−1 }; V1− ← {v2 , v4 , . . . , v2` } 0 }; V − ← {v 0 , v 0 , . . . , v 0 V2+ ← {v20 , v40 , . . . , v2` 0 1 3 2 2`0 −1 } + for each v ∈ V1 : rv ← rv + 1; for each v ∈ V1− : rv ← rv − 1 for each v ∈ V2+ : rv ← rv + ∆1 /∆2 ; for each v ∈ V2− : rv ← rv − ∆1 /∆2 (y1 , δ1 ) ←ROUND S INGLE P OINT(y 0 , ~r) (y2 , δ2 ) ←ROUND S INGLE P OINT(y 0 , −~r) With probability δ1 /(δ1 + δ2 ): return y2 With remaining probability δ2 /(δ1 + δ2 ): return y1 j1 yv1 yv2 y + j1 2 1 v10 + 1 + + 1 1 j10 yv3 , yv20 2 j2 1 j20 + + 1 1 2 2 + yv30 2 j10 1 yv4 j1 1 1 j2 2 2 2 1 2 j10 1 2 2 + 2 1 2 j2 yv40 1 1 2 j20 2 1 j20 2 Figure 4: The left part shows an example of two distinct maximal paths chosen in Case 3. The black edge is common in both paths. The middle and right parts are two possibilities of rounding y. With probability δ1 /(δ1 + δ2 ), the strategy in the right part is adopted. Otherwise, the strategy in the middle part is chosen. Algorithm 15 ROUND F INAL PATH (y, ~v )  1: P1 ← z ∈ [0, 1]V : z(U ) ≤ rM (U ) ∀U ⊆ V ∧ z(Oi ) = bOi ∀i ∈ L \ {0} ∧ zi = 0 ∀i : yi = 0 2: P2 ← {z ∈ [0, 1]V : z(Fj ) = y(Fj ) ∀j ∈ V 0 \ J ∧ z(Fj ) ≤ 1 ∀j ∈ J}, where J ⊆ R is the set of vertices in R on the path ~v . 3: Pick an arbitrary extreme point ŷ of P 0 = P1 ∩ P2 4: for each j ∈ R and j is on the path ~ v : if ŷ(Fj ) = 0, pick an arbitrary u ∈ Fj and set ŷu ← 1. 5: return ŷ 18 5.2.2 Analysis of P SEUDO FRMC ENTER ROUND Proposition 5.4. In all but the last iteration, the while-loop (lines 4 to 8) of P SEUDO FRMC ENTER ROUND preserves the following invariant: if y 0 lies in the face D of PM (w.r.t all tight matroid rank constraints) at the beginning of the iteration, then y 0 ∈ D at the end of this iteration. Proof. Observe that y 0 ∈ PM at the beginning of the first iteration due to the definition of y 0 . Fix any iteration. Let y 00 be the updated y 0 at the end of the iteration. By Corollary 2.4, it suffices to show that y 00 ∈ {x ∈ Rn : x(S) = bS ∀S ∈ O; xi = 0 ∀i ∈ J; x ∈ PM } , where J ⊆ V is the set of all vertices i with yi0 = 0. Note that y 00 is the output of one of the three subroutines ROUND C YCLE, ROUND S INGLE PATH, and ROUND T WO PATHS. Since we only round floating variables strictly greater than zero, we have yi00 = 0 for all i ∈ J. Also, the procedure ROUND S INGLE P OINT guarantees that y 00 ∈ PM . • When calling the procedure ROUND C YCLE, observe that each vertex j ∈ L on the cycle is adjacent to exactly two edges. By construction, we always increase the variable on one edge and decrease the variable on the other edge at the same rate. See Figure 2. Therefore, y 00 (Oj ) = y 0 (Oj ) = bOj for all j ∈ O. • When calling the procedure ROUND S INGLE PATH, recall that our path is maximal and has one endpoint in L and the other in R. We claim that the left endpoint of this path should be corresponding to the set O0 . Otherwise, suppose it is some set Oj with j > 0. We have the tight constraint y 0 (Oj ) = bOj ∈ Z+ . Then the degree of the vertex j must be at least 2 as there must be at least two fractional variables in this set. This contradicts to the fact that our path is maximal. See Figure 3. By the same argument as before, we have y 00 (Oj ) = y 0 (Oj ) = bOj for all j ∈ O. • In the procedure ROUND T WO PATHS, we round the variables on two paths which have both endpoints in R. Thus, any vertex j should be adjacent to either 2 or 4 edges. Again, by construction, the net change in y 0 (Oj ) is equal to zero. See Figure 4. Finally, the claim follows by induction. Proposition 5.5. P SEUDO FRMC ENTER ROUND terminates in polynomial time. Proof. Note that, in each iteration, each floating variable yv0 ∈ (0, 1) corresponds to exactly one edge in the bipartite graph. This is because, by construction, the sets O0 , . . . , Ot form a partition of V and the sets in F and F0 also form a partition of V . Thus, as long as there are fractional values in y 0 , our graph will have some cycle or path. Now we will show that the while-loop (lines 4 to 8) terminates after O(|V |) iterations. For any set S, let χ(S) denote the characteristic vector of S. That is, χ(v) = 1 for v ∈ S and χ(v) = 0 otherwise. Let us fix any iteration and let T = {χ(S) : S ⊆ V ∧ y 0 (S) = rM (S)} be the set of all tight constraints. In this iteration, we will move y 0 along some direction ~r as far as possible (by procedure ROUND S INGLE P OINT). It means that the new point y 00 = y 0 + δ ∗~r will either have at least one more rounded variable or hit a new tight constraint y 00 (S0 ) = rM (S0 ) (while y 0 (S0 ) < rM (S0 )) for some S0 ⊆ V . Indeed χ(S0 ) is linearly independent of all vectors in T . Proposition 5.4 says that all the tight constraints are preserved in the rounding process. Therefore, in the next iteration, we either have at least one more rounded variable or the rank of T is increased by at least 1. This implies the algorithm terminates after at most |V | iterations. Proposition 5.6. In all iterations, the while-loop (lines 4 to 8) of P SEUDO FRMC ENTER ROUND satisfies the invariant that y 0 (Fj ) ≤ 1 for all Fj ∈ F. 19 Proof. By constraints 2 and 3, this property is true at the beginning of the first iteration. By a very similar argument as in the proof of Proposition 5.4, this is also true during all but the last iteration. (Note that if j is an endpoint of a path, then j must be adjacent to exactly one fractional value yv0 , which could be rounded to one, while other variables {yv0 0 : v 0 ∈ Fj , v 0 6= v} are already rounded to zero as our path is maximal.) Finally, it is not hard to check that procedure ROUND F INAL PATH also does not violate this invariant. Proposition 5.7. P SEUDO FRMC ENTER ROUND returns a solution S which is some independent set of M plus (at most) one extra vertex in V . Proof. Let us focus on the procedure ROUND F INAL PATH. Recall that the polytope P 0 in ROUND F I NAL PATH is the intersection of the following two polytopes:  P1 = z ∈ [0, 1]V : z(U ) ≤ rM (U ) ∀U ⊆ V ∧ z(Oi ) = bOi ∀i ∈ L \ {0} ∧ zi = 0 ∀i : yi = 0 , and P2 = {z ∈ [0, 1]V : z(Fj ) = y(Fj ) ∀j ∈ V 0 \ J ∧ z(Fj ) ≤ 1 ∀j ∈ J}, where J ⊆ R is the set of vertices in R on the path ~v . By construction, P1 is the face of the matroid base polytope PM corresponding to all tight constraints of y. It is well-known that P1 itself is also a matroid base polytope. By Propositions 5.4 and 5.6, we have y ∈ P1 and y ∈ P2 . Thus, y ∈ P which implies that P 6= ∅. Moreover, P2 is a partition matroid polytope. (Observe that z(Fj ) = y(Fj ) ∈ {0, 1} ∀j ∈ V 0 \ J since all fractional variables are on the path ~v .) Therefore, P = P1 ∩ P2 has integral extreme points and the point ŷ chosen in line 3 is integral. Finally, recall that ~v = (v1 , v2 , . . . , v2` ) is a simple path with both endpoints in R. The constraints of P1 and integrality of bOi ’s ensure that ŷv1 + ŷv2 = 1, ŷv3 + ŷv4 = 1, . . . , ŷv2`−1 + ŷv2` = 1. In other words, every vertex i ∈ L on the path will be “matched” with exactly one vertex in R. Thus, there can be at most one vertex j ∈ R on the path such that ŷ(Fj ) = 0 in line 4. Opening u ∈ Fj adds one extra facility to our solution. Recall that C is the (random) set of all clients within radius 3R from some center in S, where R is the optimal radius. The following two propositions will conclude our analysis. Proposition 5.8. |C| ≥ t with probability one. P P Proof. Let f denote the function defined in Algorithm RMC ENTER ROUND (i.e., f (z) = j∈V 0 i∈Fi zi for any z ∈ [0, 1]V .) Using a similar argument as in the proof of Proposition 5.1, one can easily verify that there are at least f (Y ) vertices in V that are within radius 3R from some open center in S. Next, it suffices to show that f (Y ) ≥ t. By definition of y 0 in lines 2 and 3, we have f (y 0 ) ≥ t (see the proof of Proposition 5.2.) We now claim that f (y 0 ) is not decreasing after each iteration of the rounding scheme. We check the following cases: • Case y 0 is rounded by ROUND C YCLE: observe that y 0 (Fj ) is preserved for all j ∈ R since j is adjacent to two edges and we increase/decrease the corresponding variables by the same amount. Thus, f (y 0 ) is unchanged. • Case y 0 is rounded by ROUND S INGLE PATH: if j ∈ R is not the endpoint of the path then j is adjacent to two edges on the path and y 0 (Fj ) is unchanged. If j is the endpoint, then we increase the variable on the adjacent edge; and hence, y 0 (Fj ) will increase. See Figure 3. • Case y 0 is rounded by ROUND T WO PATHS: again, for any j ∈ R \ {j1 , j2 , j10 , j20 }, the value of y 0 (Fj ) remains unchanged in the process. We now verify the change in f caused by the four 20 endpoints j1 , j2 , j10 , and j20 . Suppose y1 is returned, the contribution of these points in f (y1 ) is cj1 y1 (Fj1 ) + cj2 y1 (Fj2 ) + cj10 y1 (Fj10 ) + cj20 y1 (Fj20 )     ∆1 ∆1 0 0 0 0 0 0 = cj1 (y (Fj1 ) + δ1 ) + cj2 (y (Fj2 ) − δ1 ) + cj1 y(Fj1 ) − δ1 + cj2 y(Fj2 ) + δ1 ∆2 ∆2 ∆1 = cj1 y 0 (Fj1 ) + cj2 y 0 (Fj2 ) + cj10 y 0 (Fj10 ) + cj20 y 0 (Fj20 ) + δ1 (cj1 − cj2 ) + δ1 (c 0 − cj10 ) ∆ 2 j2 = cj1 y 0 (Fj1 ) + cj2 y 0 (Fj2 ) + cj10 y 0 (Fj10 ) + cj20 y 0 (Fj20 ). Hence, f (y1 ) = f (y 0 ). Similarly, one can verify that f (y2 ) = f (y 0 ). • Case y 0 is rounded by ROUND F INAL PATH: we have shown in the proof of Proposition 5.7 that y 0 (Fj ) = 1 for all j ∈ J where J is the set of vertices in R on the path ~v . This fact and the other constraints of P2 ensure that y 0 (Fj ) is not decreasing for all j ∈ V 0 . Proposition 5.9. Pr[j ∈ C] ≥ pj for all j ∈ V . Proof. Let y 0 be the vector defined as in lines 2 and 3 of P SEUDO FRMC ENTER ROUND. It suffices to show that, for all j ∈ V 0 , Pr[Y (Fj ) = 1] ≥ y 0 (Fj ). (Note that y 0 (Fj ) ≥ pj by constraint (5).) This is because, for any vertex k ∈ V \ V 0P , the algorithmPRF ILTERING guarantees that there exists j ∈ V 0 0 such that Fk ∩ Fj 6= ∅, and y (Fj ) = i∈Bj xij ≥ i∈V :d(i,k)≤R xik = y 0 (Fk ). Notice that the event Y (Fj ) = 1 means there is some open center Fj and the distance from k to this center should be at most 3R. Thus, Pr[k ∈ C] ≥ Pr[Y (Fj ) = 1] ≥ y 0 (Fj ) ≥ y 0 (Fk ) ≥ pk , by constraint (5). Fix any j ∈ V 0 . Recall that Y is obtained by rounding y 0 and, by Proposition 5.6 and the proof of 5.7, we have Y (Fj ) ∈ {0, 1} and Pr[Y (Fj ) = 1] = E[Y (Fj )]. We now show that the expected value of y 0 (Fj ) does not decrease after each iteration of the while-loop. • Case y 0 is rounded by ROUND C YCLE: y 0 (Fj ) is unchanged as before. • Case y 0 is rounded by ROUND S INGLE PATH: if j is not the endpoint of ~v then y 0 (Fj ) is unchanged. Otherwise, y 0 (Fj ) is increase by some δ1 > 0 with probability one. • Case y 0 is rounded by ROUND T WO PATHS: again, if j ∈ / {j1 , j2 , j10 , j20 } then y 0 (Fj ) is unchanged. Now suppose j = j1 . With probability δ1 /(δ1 + δ2 ), y 0 (Fj1 ) is increase by δ2 , and, with the remaining probability, it is decreased by δ1 . Thus, the expected change in y 0 (Fj1 ) is δ1 δ2 (δ2 ) + (−δ1 ) = 0. δ1 + δ2 δ1 + δ2 Similarly, one can verify that the expected values of y 0 (Fj2 ), y 0 (Fj10 ), and y 0 (Fj20 ) remain the same. • Case y 0 is rounded by ROUND F INAL PATH: we have showed in the proof of Proposition 5.7 that if j is on the path ~v , then Y (Fj ) = 1. Otherwise, the constraints of P2 ensure that Y (Fj ) = y 0 (Fj ). So far we have proved the following theorem. Theorem 5.10. P SEUDO FRMC ENTER ROUND will return a random solution S such that • S is the union of some basis of M with (at most) one extra vertex, • |C| ≥ t with probability one, • Pr[j ∈ C] ≥ pj for all j ∈ V . 21 5.2.3 An algorithm satisfying the matroid constraint exactly Using a similar technique as in Section 4.2.3, we will develop an approximation algorithm for the FRMatCenter problem which always returns a feasible solution. Let  > 0 a small parameter to be determined. Let U denote the collection of all possible sets of verticies with size at most d1/e such that U is an independent set of M. Again, we have |U| ≤ nO(1/) . Suppose R is the optimal radius to our instance. For any i ∈ V , recall that RBall(i, U, R) is the set of red vertices within radius 3R from i. Consider the configuration polytope Pconfig3 containing points (x, y, q) with the following constraints: P qU = 1    PU ∈U U   x ≤ qU ∀j ∈ V, U ∈ U   Pi∈Bj Pij  U  ∀j ∈ V  U ∈U i∈Bj xij ≥ pj    U U   ≤ yi ∀i, j ∈ V, U ∈ U x Pij U y ≤ qU rM (W ) ∀U ∈ U, W ⊆ V  Pi∈W Pi  U    j∈V i∈Bj xij ≥ qU t     yiU = 1 ∀U ∈ U, i ∈ U     U  yi = 0 ∀U ∈ U, i ∈ V \ U, |RBall(i, U, R)| ≥ n    U U xij , yi , qU ≥ 0 ∀i, j ∈ V, U ∈ U We first claim that Pconfig3 is a valid relaxation for the problem. Proposition 5.11. The polytope Pconfig3 is non-empty. Proof. Suppose S is a solution drawn from the optimal distribution D. We compute a subset US of S using a similar procedure as in the proof of Proposition 4.4. Recall that |RBall(i, US , R)| < n for all i ∈ S \ US and |US | ≤ d1/e. Since US ⊆ S, US is also an independent set of M, implying that US ∈ U. Now for any U ∈ U, we set qU := Pr[US = U ]. Let xU ij be probability of the joint event: US = U U be the probability of the joint event: U = U and i ∈ S. Then it and j is connected to i. Finally, let y S i P is clear that U ∈U qU = 1. Using similar arguments to the proofs of Propositions 4.4 and 4.3, we have the following inequalities: X xU ∀j ∈ V, U ∈ U (9) ij ≤ qU , i∈Bj X X U ∈U i∈Bj XX j∈V i∈Bj xU ij ≥ pj , ∀j ∈ V (10) xU ij ≥ qU t, (11) yiU = 0 ∀U ∈ U, i ∈ V \ U, |RBall(i, U, R)| ≥ n. (12) Recall that yiU /qU is the Pr[i ∈ S | U = US ]. Since S is independent with probability one, we have |S ∩ W | ≤ rM (W ) for all W ⊆ V . Therefore, X X rM (W ) ≥ E[|S ∩ W | | U = US ] = Pr[i ∈ S | U = US ] = yiU /qU , i∈W i∈W for all W ⊆ V . The other constraints can be verified easily. We conclude that (x, y, q) ∈ Pconfig3 . Next, let us pick any (x, y, q) ∈ Pconfig3 and use the following algorithm to round it. 22 Algorithm 16 FRMC ENTER ROUND (x, y, q) 1: 2: 3: 4: 5: Randomly pick a set U ∈ U with probability qU 0 U Let x0ij ← xU ij /qU and yi ← min{yi /qU , 1} 0 S ← P SEUDO FRMC ENTER ROUND (x0 , y 0 ) Let i∗ be the “extra” vertex in S 0 . return S = S 0 \ {i} Analysis. We are now ready to prove the second part of Theorem 1.4. Let us fix any γ > 0 and set  := γ 2 . Also, let E(U ) be the event that Algorithm 16 selects U ∈ U. Note that (x0 , y 0 ) satisfies the following inequalities: XX x0ij ≥ t, j∈V i∈Bj X i∈Bj X x0ij ≤ 1, x0ij = i∈Bj ∀j ∈ V, X xij /qU , i∈Bj ∀j ∈ V, x0ij ≤ yi0 , ∀i, j ∈ V, X yi0 ≤ rM (W ), ∀W ⊆ V. i∈W Moreover, every i ∈ U satisfies yi0 = 1; every i ∈ V \ U with RBall(i, U, R) ≥ n satisfies yi0 = 0. Recall that the algorithm P SEUDO FRMC ENTER ROUND will return a solution S 0 , which is the union of a basis of M with an extra center i∗ . The vertex i∗ has yi∗ ∈ (0, 1), and in particular i∗ ∈ / U . By removing i∗ from S 0 , we ensure that the resulting set is a basis of M with probability one. Now we shall prove the coverage guarantee. By Theorem 5.10, S 0 covers at least t vertices within radius 3R. Any blue vertex can be connected to some center in U and hence is not affected by the removal of i∗ . Because i∗ covers at most n other red vertices, we have |C| ≥ t − n = 1 − γ 2 n. For any j ∈ V , let Xj be the indicator random variable for the event that d(j, S 0 ) ≤ 3R but 0 ∗ d(j, P S \ {i }) > 3R. We say that j is a bad vertex iff E[Xj ] ≥ γ, otherwise, j is good. Again, j∈V Xj ≤ n with probability one. Thus, there can be at most n/γ bad vertices. Letting T be the set of good vertices, we have |T | ≥ n − n/γ = (1 − γ)n. By Theorem 5.10, Pr[j is covered by S 0 ] ≥ pj . So, for any j ∈ T , we have Pr[j ∈ C] ≥ Pr[j is covered by S 0 ] − Pr[Xj = 1] ≥ pj − γ. 23 References [1] Sara Ahmadian, Ashkan Norouzi-Fard, Ola Svensson, and Justin Ward. Better guarantees for k-means and euclidean k-median by primal-dual algorithms. CoRR, abs/1612.07925, 2016. [2] Jaroslaw Byrka, Thomas Pensyl, Bartosz Rybicki, Aravind Srinivasan, and Khoa Trinh. An improved approximation for k-median, and positive correlation in budgeted optimization. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms, (SODA), pages 737–756, 2015. [3] Deeparnab Chakrabarty, Prachi Goyal, and Ravishankar Krishnaswamy. The non-uniform k-center problem. In 43rd International Colloquium on Automata, Languages, and Programming (ICALP 2016), volume 55, pages 67:1–67:15, 2016. [4] Moses Charikar, Samir Khuller, David M. Mount, and Giri Narasimhan. Algorithms for facility location problems with outliers. In Proceedings of the Twelfth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’01, pages 642–651, Philadelphia, PA, USA, 2001. Society for Industrial and Applied Mathematics. [5] Danny Z. Chen, Jian Li, Hongyu Liang, and Haitao Wang. Matroid and knapsack center problems. Integer Programming and Combinatorial Optimization: 16th International Conference, IPCO 2013, Valparaı́so, Chile, March 18-20, 2013. Proceedings, pages 110–122, 2013. [6] David G. Harris, Thomas Pensyl, Aravind Srinivasan, and Khoa Trinh. Symmetric randomized dependent rounding. CoRR, abs/1709.06995, 2017. [7] Dorit S. Hochbaum and David B. Shmoys. A unified approach to approximation algorithms for bottleneck problems. J. ACM, 33(3):533–550, May 1986. [8] Wen-Lian Hsu and George L. Nemhauser. Easy and hard bottleneck location problems. Discrete Applied Mathematics, 1(3):209 – 215, 1979. [9] Tapas Kanungo, David M. Mount, Nathan S. Netanyahu, Christine D. Piatko, Ruth Silverman, and Angela Y. Wu. A local search approximation algorithm for k-means clustering. Comput. Geom., 28(2-3):89–112, 2004. [10] Ravishankar Krishnaswamy, Amit Kumar, Viswanath Nagarajan, Yogish Sabharwal, and Barna Saha. The matroid median problem. In Proceedings of the annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1117–1130. SIAM, 2011. [11] Lap-Chi Lau, R. Ravi, and Mohit Singh. Iterative Methods in Combinatorial Optimization. Cambridge University Press, New York, NY, USA, 1st edition, 2011. [12] Shi Li and Ola Svensson. Approximating k-median via pseudo-approximation. In STOC, pages 901–910, 2013. [13] Alexander Schrijver. Combinatorial optimization: polyhedra and efficiency, volume 24. Springer Science & Business Media, 2003. [14] Chaitanya Swamy. Improved approximation algorithms for matroid and knapsack median problems and applications. In APPROX/RANDOM 2014, volume 28, pages 403–418, 2014. [15] David P. Williamson and David B. Shmoys. The Design of Approximation Algorithms. Cambridge University Press, 2011. 24
8cs.DS
arXiv:1304.5144v2 [math.GR] 20 Jun 2016 Locally normal subgroups of totally disconnected groups. Part I: General theory Pierre-Emmanuel Caprace∗1 , Colin D. Reid†2 , and George A. Willis‡2 1 Université catholique de Louvain, IRMP, Chemin du Cyclotron 2, bte L7.01.02, 1348 Louvain-la-Neuve, Belgique 2 School of Mathematical and Physical Sciences, University of Newcastle, Callaghan, NSW 2308, Australia April 22, 2015 Abstract Let G be a totally disconnected, locally compact group. A closed subgroup of G is locally normal if its normaliser is open in G. We begin an investigation of the structure of the family of closed locally normal subgroups of G. Modulo commensurability, this family forms a modular lattice LN (G), called the structure lattice of G. We show that G admits a canonical maximal quotient H for which the quasi-centre and the abelian locally normal subgroups are trivial. In this situation LN (H) has a canonical subset called the centraliser lattice, forming a Boolean algebra whose elements correspond to centralisers of locally normal subgroups. If H is second-countable and acts faithfully on its centraliser lattice, we show that the topology of H is determined by its algebraic structure (and thus invariant by every abstract group automomorphism), and also that the action on the Stone space of the centraliser lattice is universal for a class of actions on profinite spaces. Most of the material is developed in the more general framework of Hecke pairs. Contents 1 Introduction 3 ∗ F.R.S.-FNRS research associate, supported in part by the ERC (grant #278469) Supported in part by ARC Discovery Project DP120100996 ‡ Supported in part by ARC Discovery Project DP0984342 † 1 2 Locally normal subgroups 2.1 Definition and first properties . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Local equivalence and the structure lattice . . . . . . . . . . . . . . . . . . 3 Quasi-centralisers and their 3.1 Motivation . . . . . . . . 3.2 The quasi-centre . . . . . 3.3 Quasi-centralisers . . . . . 3.4 C-stability . . . . . . . . . 3.5 Local C-stability . . . . . stability properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 9 13 13 14 16 19 23 4 Direct decomposition of locally normal subgroups 26 4.1 Local decomposition lattices . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.2 Locally finitely decomposable t.d.l.c. groups . . . . . . . . . . . . . . . . . 31 5 The 5.1 5.2 5.3 5.4 centraliser lattice and weakly decomposable actions The centraliser lattice . . . . . . . . . . . . . . . . . . . . . Weakly decomposable actions . . . . . . . . . . . . . . . . . Faithful weakly decomposable groups . . . . . . . . . . . . . Topologically free actions . . . . . . . . . . . . . . . . . . . 6 Some radicals of locally compact groups 6.1 The quasi-hypercentre . . . . . . . . . . . . . . . 6.2 Relation with the quasi-hypercentre of subgroups 6.3 Other radicals . . . . . . . . . . . . . . . . . . . . 6.4 Canonical completions of Hecke pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 33 39 42 47 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 48 49 53 60 7 Restrictions on the group topology 62 7.1 The structure lattice and refinements of the group topology . . . . . . . . 62 7.2 A group topology derived from the centraliser lattice . . . . . . . . . . . . 63 7.3 Subgroups abstractly generated by compact locally normal subgroups . . 66 Bibliography 69 Index 71 2 1 Introduction The aim of the present article is to establish foundations for a study of general nondiscrete totally disconnected locally compact (t.d.l.c.) groups in terms of their local structure. We define a canonical lattice in terms of this local structure that, in the case of a p-adic Lie group, is equivalent to the lattice of ideals in the Lie algebra. Inspired by earlier work of J. Wilson [27] on just-infinite groups and by Barnea–Ershov–Weigel [2] on abstract commensurators of profinite groups, we develop properties of this lattice. This article, which concerns general t.d.l.c. groups, is the first in a series. The second paper in the series [8] uses the tools developed here to study the more special class of compactly generated t.d.l.c. groups with few normal subgroups and, in particular, those that are topologically simple. Most of the definitions and results in this first part apply more generally to a Hecke pair (G, U ), that is a group G with a commensurated subgroup U , in a way that depends only on the (abstract) commensurability class of U as a subgroup of G. Although our principal interest is in t.d.l.c. groups, we will state and prove results in this more general framework in situations where it is unnecessary to use the topology of the group. For example, in the case G = U , most of the results we obtain will be valid for residually finite groups in general, with profinite groups as a special case. 1.1 Background Since the solution of Hilbert’s fifth problem by Gleason, Montgomery–Zippin and Yamabe, connected locally compact groups are known to have a far-reaching structure theory, ensuring notably that they are all projective limits of connected Lie groups. This deep result extends the powerful machinery of Lie theory to all connected locally compact groups, thereby yielding decomposition theorems and classification results. In contrast, the solution of Hilbert’s fifth problem yields no information about totally disconnected locally compact groups, that is, those in which the connected component of each element is a singleton. Understanding this case would go a long way towards an understanding of general locally compact groups because each general group is an extension of a totally disconnected group by a connected one. While a rather rich and deep theory was developed for some special classes of t.d.l.c. groups (profinite groups, reductive groups over local fields, p-adic analytic groups, . . . ), for a long time the only general result known was van Dantzig’s theorem, which asserts that compact open subgroups exist and form a basis of identity neighbourhoods. Since the class of t.d.l.c. groups includes all discrete groups, it seemed during this time that no meaningful structure theory could be developed beyond the connected or almost connected case. Three developments over the last twenty years have changed the situation. First, new general results were obtained with the aid of the scale function, introduced by Willis 3 in [26]. The scale function on the t.d.l.c. group G measures the effect on compact open subgroups of conjugation by elements of G; it takes positive-integer values and is non-trivial only when G is not discrete. The scale function and associated ideas elicit significant new features of general non-discrete t.d.l.c. groups such as tidy subgroups, contraction groups, parabolic subgroups, etc. and have resolved several open questions. A complementary approach was initiated by Barnea–Ershov–Weigel [2], based on the following observation: since any two compact open subgroups of a t.d.l.c. group G are commensurate, G admits a natural homomorphism to the group of abstract commensurators of its compact open subgroups. By definition, abstract commensurators can be recovered from any compact open subgroup and are thus purely local objects depending only on arbitrarily small identity neighbourhoods of G. This observation thus produces a local approach to t.d.l.c. groups. The third development is that techniques for isolating the non-discrete case from the discrete one have been found. At the global level, Caprace–Monod [7] identified simple pieces of a t.d.l.c. group G under the hypothesis that G has no discrete quotients while, at the local level, Burger–Mozes [6] introduced, in analogy with the kernel of the adjoint representation of a Lie group, the quasi-centre of G, which contains in particular any discrete normal subgroup of G. The former of the two motivates the focus of our next paper [8] on simple groups, while the latter was important in the approach introduced in [2] and is developed further in Sections 3 and 6 below as part of the foundation for a general theory of the local structure of t.d.l.c. groups. 1.2 Locally normal subgroups and their centralisers The central concept in the general local theory is that of a locally normal subgroup of a t.d.l.c. group, that is, a subgroup whose normaliser has finite index in an open subgroup. A major part of [2] focuses on t.d.l.c. groups in which every open compact subgroup is (hereditarily) just infinite; this corresponds exactly to the condition that every non-trivial compact locally normal subgroup is open. Away from this case, the arrangement of (closed) locally normal subgroups becomes more complex. The intersection of two locally normal subgroups is locally normal. Moreover, if H and K are closed locally normal subgroups of G, then they admit respective compact open subgroups H ′ < H and K ′ < K which normalise each other, and such that the product H ′ K ′ , which is also a compact subgroup, is locally normal. It is thus natural to consider the collection of all compact locally normal subgroups modulo the equivalence relation given by local equivalence: two subgroups H and K are locally equivalent if their intersection H ∩K is open in both H and K. In this way, the collection of all equivalence classes of compact locally normal subgroups of G, which is denoted by LN (G), endowed with the partial ordering induced by the inclusion of subgroups, is easily seen to form a modular lattice. We call it the structure lattice of G. There are two elements that we 4 regard as trivial (assuming G is non-discrete): the minimum element, which is the class of the trivial subgroup, and the maximum element, which is the class of compact open subgroups. The symbols 0 and ∞ will be used to denote the minimum and maximum elements respectively of any bounded lattice, including LN (G). A non-trivial subset of a bounded lattice is one that contains elements other than 0 and ∞. Its structure lattice is a local invariant of a t.d.l.c. group G, since it is determined by any open compact subgroup, which admits a natural action of the topological automorphism group of G. In case G is a p-adic Lie group, the structure lattice LN (G) is canonically isomorphic to the lattice of ideals in the Qp -Lie algebra of G (see Proposition 2.5 below). Hence the structure lattice may be viewed as a group theoretic analogue for arbitrary t.d.l.c. groups of the lattice of ideals in the p-adic case. Although it is difficult to determine the structure lattice of a particular t.d.l.c. group G explicitly, the action of G on LN (G) provides an important tool for elucidating the overall structure of G. Moreover, under the right conditions we obtain two natural G-invariant subsets of LN (G) that are Boolean algebras when equipped with the induced order and, when non-trivial, constitute valuable additional tools. The first is the local decomposition lattice LD(G), which consists of all direct factors of open compact subgroups of G up to equivalence. The second is the centraliser lattice LC(G): an element of LC(G) is given by the equivalence class of the centraliser CU (K) for some open compact subgroup U of G and closed normal subgroup K of U . In general, the structure lattice depends on the topology of the open compact subgroups of G, but the centraliser and decomposition lattices depend only on the Hecke pair structure (G, U ), where U is any open compact subgroup of G. Following Burger–Mozes [6], we define the quasi-centre QZ(G) of a locally compact group G to be the collection of all elements whose centraliser is open (see Lemma 3.1 below for its basic properties). Theorem I. Let G be a t.d.l.c. group. (i) (See Theorem 4.5) Suppose that G has trivial quasi-centre. Then LD(G) is a Boolean algebra. (ii) (See Theorem 5.2) Suppose in addition that G has no non-trivial abelian locally normal subgroups. Then LC(G) is a Boolean algebra and LD(G) is a subalgebra of LC(G). This opens up a new perspective: using the Stone representation theorem, a group action on a Boolean algebra A can equivalently be regarded as a group action by homeomorphisms on a topological space S(A), called the Stone space of A, that is profinite, in other words, compact and totally disconnected. An important property of the G-actions on the Stone spaces of LD(G) and LC(G) is encapsulated in the following definition. Let G be a locally compact group and X be a profinite space on which G acts faithfully 5 by homeomorphisms. The G-action is called weakly decomposable if for every nonempty clopen subset α ( X, the stabiliser of α in G is open, and the pointwise stabiliser of α is non-trivial. Say that G is faithful weakly decomposable if it admits a faithful weakly decomposable action on some profinite space. Theorem II (See Theorem 5.18). Let G be a t.d.l.c. group such that QZ(G) = 1. (i) Suppose that the only abelian locally normal subgroup of G is trivial, and suppose that G acts faithfully on LC(G). Then the induced action of G on S(LC(G)) is a faithful weakly decomposable action. (ii) Suppose X is a profinite space with a faithful weakly decomposable action of G. Then the only abelian locally normal subgroup of G is trivial and there exists a G-equivariant continuous surjective map from S(LC(G)) to X. In particular, if G is faithful weakly decomposable, then S(LC(G)) is the unique maximal compact G-space for which the action is faithful and weakly decomposable. 1.3 Radical theory The hypotheses of Theorem I are satisfied by all compactly generated, topologically simple t.d.l.c. groups: for (i) this is Theorem 4.8 of [2], and for (ii) this will be proved in [8, Theorem A]. We will show, by developing a suitable ‘radical theory’, that an arbitrary t.d.l.c. group has a canonical maximal quotient which satisfies the hypotheses of Theorem I(i) or (ii). Theorem III. Let G be a t.d.l.c. group. Then G has closed characteristic subgroups QZ∞ (G) ≤ R[A] (G) ≤ G with the following properties: (i) (See Theorem 6.2) QZ∞ (G) is the unique smallest closed normal subgroup N of G such that G/N has trivial quasi-centre. (ii) (See Theorem 6.11) R[A] (G) is the unique smallest closed normal subgroup M of G such that G/M has trivial quasi-centre and no non-trivial abelian locally normal subgroups. In case G is a p-adic Lie group, R[A] (G) is the unique largest closed normal subgroup whose Lie algebra is the soluble radical of Lie(G); see Proposition 6.18 below. Both QZ∞ (G) and R[A] (G) are well behaved with respect to open subgroups, in the sense that QZ∞ (H) = QZ∞ (G)∩H and R[A] (H) = R[A] (G)∩H for any open subgroup H of G 6 (see Propositions 6.3 and 6.15). Thus if the canonical quotients provided by Theorem III turn out to be trivial, we have additional local information about the structure of G. For instance it is easily seen that if R[A] (G) = G, then the open compact subgroups of G are Fitting-regular in the sense of [22]. 1.4 Group topologies We now specialise to the case of first-countable t.d.l.c. groups and give some results on the relationship between the commensurated compact subgroups and the compact locally normal subgroups. For instance (Lemma 7.4), a closed subgroup K of a first-countable profinite group U is commensurated by U if and only if U normalises an open subgroup of K. Hence, any compact commensurated subgroup of a first-countable t.d.l.c. group G is commensurate with a locally normal subgroup, whose commensurability class is thus a G-fixed point in LN (G). As a consequence, the commensurated compact locally normal subgroups have an interpretation in terms of group topologies. Theorem IV (See § 7.1). Let G be a first-countable t.d.l.c. group. Then there is a natural bijection between the elements of LN (G) that are fixed by the action of G, and refinements of the topology of G that are locally compact and compatible with the group structure. When G is faithful weakly decomposable, we obtain a topological rigidity result of a similar kind to those for semisimple Lie groups over real and p-adic fields given in [17] and [19]. Theorem V (See Theorem 7.6). Let G be a second-countable t.d.l.c. group with trivial quasi-centre, and suppose that G is faithful weakly decomposable. Then the topology of G is the coarsest group topology on G for which it is a Baire space. In particular, it is preserved by every automorphism of G as an abstract group. Consequently, the topology of G is the unique σ-compact locally compact group topology on G, and the set of all locally compact group topologies of G is in natural bijection with the set of fixed points of G acting on LN (G) by conjugation. Acknowledgements We express our gratitude to John Wilson for numerous comments which helped in improving the presentation of this paper. We thank Corina Ciobotaru, David Hume, Thierry Stulemeijer and Phillip Wesolek for their careful reading of an earlier draft of the manuscript. 7 2 Locally normal subgroups 2.1 Definition and first properties Let G be a t.d.l.c. group, which is assumed to be Hausdorff by convention. Then van Dantzig’s theorem [13, Theorem II.7.7] asserts that the open compact subgroups of G form a base of identity neighbourhoods. Denote this set by B(G). Any two elements of B(G) are commensurate, as an elementary topological argument shows. Hence, letting U be any open compact subgroup of G, the pair (G, U ) satisfies the following condition. A Hecke pair (of groups) (G, U ) is a group G together with a commensurated subgroup U of G, that is, U ∩ gU g −1 has finite index in U for all g ∈ G. Most of our arguments will be made in terms of general Hecke pairs, as the results then apply directly to residually finite groups and not just to their profinite completions. When specialising to the case that U is an open compact subgroup of the t.d.l.c. group G, we will say that (G, U ) is a t.d.l.c. Hecke pair. Given a Hecke pair (G, U ), a locally normal subgroup of (G, U ) is a subgroup K of G such that the normaliser NU (K) has finite index in U . A subgroup K of G is bounded if K ∩ U is commensurate with K. When (G, U ) is t.d.l.c., subgroups that are bounded and closed are precisely the compact ones. The most elementary properties of locally normal subgroups collected in the following will frequently be used without comment. Lemma 2.1. Let (G, U ) be a Hecke pair and K, L be subgroups of G. (i) If K and L are locally normal, so is K ∩ L. (ii) If (G, U ) is t.d.l.c. and K is compact and locally normal, so is every open subgroup of K. (iii) If K is locally normal, so is the centraliser CV (K) for any V ≤ G commensurate with U . (iv) If K is bounded, then there is V ≤ G commensurate with U that contains K. If K is also locally normal, then V may be chosen to normalise K. When (G, U ) is t.d.l.c. and K is compact and locally normal, then we can take V ∈ B(G). Proof. (i) is clear since K ∩ L is normalised by NU (K) ∩ NU (L). (ii) An open subgroup of K may be written as K ∩ U for some U ∈ B(G). Since any element of B(G) is locally normal, (ii) follows from part (i). 8 (iii) Let W = U ∩ V . If K is locally normal, then CV (K) is a subgroup of V , so that NW (K) ≤ NW (CV (K)) and we have |U : NU (CV (K))| ≤ |U : W ||W : NW (CV (K))| ≤ |U : W ||W : NW (K)| < ∞; hence CV (K) is locally normal. T (iv) If K is bounded, then W = k∈K kU k−1 is commensurate with U and normalised by K, so that V = KW is a subgroup commensurate with U and containing K. If K locally normal, then W = NU (K) is commensurate with U and V = KW is a subgroup commensurate with U and containing K as a normal subgroup. When (G, U ) is t.d.l.c. and K is compact and locally normal, then W open and compact with either definition, and so V is an open compact subgroup of G. Notice that the converse to Lemma 2.1(ii) does not hold: namely, the fact that K is compact and contains a locally normal subgroup as an open subgroup does not generally imply that K itself is locally normal, since otherwise all finite subgroups of G would be locally normal and hence contained in the quasi-centre QZ(G). 2.2 Local equivalence and the structure lattice Let (G, U ) be a Hecke pair and let H be a subgroup of G. Write [H] for the class of all subgroups K of G such that K ∩ U is commensurate with H ∩ U and say that H and K are locally equivalent if [H] = [K]. Although H might not be bounded, and such will be the case in later arguments, it is the bounded subgroups of [H] that are of interest. There is a natural partial ordering on local equivalence classes, given by [H] ≥ [K] if H ∩ K ∩ U has finite index in K ∩ U . Note that, when (G, U ) is t.d.l.c. and H is closed, the closed subgroups in [H] are those that have an open subgroup in common with H. A subgroup H in G is locally equivalent to the trivial subgroup if and only if H ∩ U is finite; in the t.d.l.c. case, this occurs if and only if H is discrete. We shall later be interested in subgroups H of t.d.l.c. groups G such that H ∩ U = 1 for all U ∈ B(G). Since every compact (and hence every finite) subgroup of G is contained in some open compact subgroup, the latter property holds if and only if H is discrete and torsion-free. For a given a Hecke pair (G, U ), let LN (G, U ) denote the set of local equivalence classes of subgroups of G that have locally normal representatives. Unless otherwise stated, when choosing a representative of α ∈ LN (G, U ), we only take representatives that are bounded and locally normal. Then the partially ordered set LN (G, U ) is a lattice. The greatest lower bound and least upper bound of α, β ∈ LN (G, U ) are respectively α ∧ β = [H ∩ K] and α ∨ β = [HK], where representatives H ∈ α and K ∈ β are chosen such that H, K E V for some V ≤ U of finite index. That [H ∩ K] and [HK] are independent of how H, K and V are chosen 9 and that they are respectively the greatest lower bound and least upper bound of α and β is easily verified. We call (LN (G, U ), ≤) the abstract structure lattice of (G, U ). If (G, U ) is a t.d.l.c. Hecke pair, write LN (G) for the set of elements of LN (G, U ) that have compact locally normal representatives. Then LN (G) is a sublattice of LN (G, U ) that does not depend on the choice of U so long as it is compact and open. We define LN (G) with the induced operations to be the structure lattice of G. It is clear that LN (G, U ) is determined entirely by the group structure of U , so effectively LN (G, U ) = LN (U, U ). We retain the notation LN (G, U ) in order to distinguish the abstract (Hecke pair) structure lattice from the topological structure lattice LN (G), which is more useful in the study of t.d.l.c. groups. Example 2.2. (a) Let T be a regular tree of finite degree d, with d ≥ 3, and let G = Aut(T ). Then G is a t.d.l.c. group, with topology generated by the pointwise stabilisers of finite subtrees of T . Let F be a finite subtree of T , let U be the pointwise stabiliser of F , and let T1 , . . . , Tn be the connected components of T − F . Then U decomposes as a direct product U = K1 × K2 × · · · × Kn where Ki is the pointwise stabiliser in G of all vertices outside Ti . Evidently Ki is compact and normal in U , so it is locally normal in G, and since each tree Ti is infinite and G induces an infinite group of automorphisms on it, each group Ki is infinite. Thus the given decomposition of U provides 2n distinct elements of the structure lattice of G. By varying the finite tree F , we see that LN (G) is infinite in this case. (b) Let G = Qnp for n ≥ 2. Then the every subgroup of G is locally normal, since G is abelian. The compact subgroups of G are all isomorphic to Zm p where 0 ≤ m ≤ n. It is easily seen that two compact subgroups of G are commensurate if and only if they span the same subspace of G regarded as a Qp -vector space, and conversely every Qp -subspace of G is spanned by a compact subgroup. Consequently, the structure lattice of G is naturally isomorphic to the lattice of Qp -subspaces of G. In particular, LN (G) is uncountable. (c) At the other extreme, let G be any t.d.l.c. group with a hereditarily just infinite open subgroup U , for instance G = Qp or G = PSLn (Qp ). Then given a closed locally normal subgroup K, the intersection K ∩ U is normal in an open subgroup of U , and hence K is either finite or open. Hence LN (G) is the two-element lattice. When G is a t.d.l.c. group, the lattice structure of LN (G) is preserved by the topological automorphism group Aut(G) of G. More generally, the structure of LN (G, U ) is preserved by those automorphisms of G that preserve the commensurability class of U . 10 In particular, G acts on LN (G) (when defined) and LN (G, U ) by conjugation. If U is infinite, there are two ‘trivial’ elements of LN (G, U ) and of LN (G), namely the class of the trivial group, denoted by 0, and the class of the subgroups containing a subgroup of U of finite index, denoted by ∞. The use of the term structure lattice is borrowed from J. Wilson ([27]), whose ideas developed in the context of just infinite groups were an important source of inspiration for the present work. The structure lattice is a purely ‘local’ invariant of a t.d.l.c. group, that is, it is completely determined by any open compact subgroup. It is also built out of lattices of normal subgroups of open compact subgroups in a natural sense. Similar observations apply more generally to the abstract structure lattice. Lemma 2.3. Let (G, U ) be a Hecke pair. (i) Let X be a finite subset of LN (G, U ), and let L be the sublattice generated by X. Then there is a subgroup V of U of finite index and a choice of representatives Y for the elements of X, so that every element of Y is a normal subgroup of V , and L is isomorphic to the lattice of subgroups of V generated by Y modulo commensuration. If L ⊆ LN (G), then we can take V ∈ B(G). (ii) Let I be a lattice identity that is satisfied by the normal subgroup lattice of V (modulo commensuration), for every finite index subgroup V of U . Then I is satisfied by LN (G, U ). In particular, LN (G, U ) is a modular lattice. T Proof. (i) Let X = {[K1 ], . . . , [Kn ]}, let V = NU (Ki ), and let Li = V ∩ Ki for i ∈ {1, . . . , n}. Then Y = {L1 , . . . , Ln } consists of normal subgroups of V , and the meet and join operations in L can evidently be given by [Ki ] ∧ [Kj ] = [Li ∩ Lj ] and [Ki ] ∨ [Kj ] = [Li Lj ] = [hLi , Lj i]. Thus the map L 7→ [L] gives a surjective map from the lattice generated by Y to L, and two subgroups have the same image if and only if they are commensurate. If (G, U ) is t.d.l.c. and L ⊆ LN (G), then we can choose K1 , . . . , Kn to be closed, so V is closed, and hence V ∈ B(G). (ii) This is immediate from (i), recalling that the lattice of normal subgroups in any group is modular (see [14, Theorem 8.3]). If G is a t.d.l.c. group and U is an open compact subgroup, we see that LN (G) is a sublattice of LN (G, U ). (In particular, LN (G) inherits the modular property from LN (G, U ).) In general, elements of LN (G) may have non-closed representatives, since a finite index subgroup of a profinite group is not necessarily closed. However, we can recognise the elements of LN (G) inside LN (G, U ) by the existence of closed representatives (without reference to normalisers). Proposition 2.4. Let (G, U ) be a t.d.l.c. Hecke pair and let α ∈ LN (G, U ). Then α ∈ LN (G), that is, α has a compact locally normal representative, if and only if there is closed subgroup H of G such that [H] = α. 11 Proof. If α ∈ LN (G), then certainly α has a closed representative. It remains to show the converse. Suppose H is a closed subgroup of G such that [H] = α. Since α ∈ LN (G, U ), there is some bounded locally normal subgroup K of G such that [K] = α. We see that H ∩ U is closed and [H ∩ U ] = α, so we may assume H ≤ U . Now H ∩ K has finite index in K, so the image of K in U/H is a finite set of cosets, say k1 H, . . . , kn H. Since H is closed, there is a sufficiently small open normal subgroup V of U such that the cosets k1 H, . . . , kn H remain pairwise distinct modulo V . It then follows that H ∩ K ∩ V = K ∩ V. Note that K ∩ V is locally normal and [K ∩ V ] = α. So by replacing K by K ∩ V , we may assume K ≤ H. Since H is a closed subgroup of G, we in fact have K ≤ H. Now K has finite index in K, since K is commensurate with H, so [K] = α; moreover, the normaliser of K in G is a closed subgroup containing NG (K), so the normaliser of K is open. Hence K is the desired compact locally normal representative of α. We have seen that the structure lattice LN (G) of a t.d.l.c. group G is a modular lattice that can be recovered from any identity neighbourhood in G. In the special case where G is a p-adic Lie group, the structure lattice can be described in terms of the Qp -Lie algebra of G, as follows. Proposition 2.5. Let G be a p-adic Lie group. Then the structure lattice LN (G) is G-equivariantly isomorphic to the lattice of ideals in the Qp -Lie algebra Lie(G). Indeed, that proposition readily follows from the following known properties of the Lie correspondence in p-adic Lie groups. Proposition 2.6. Let G be a p-adic Lie group, and g = Lie(G) denote its Qp -Lie algebra. (i) For any two closed subgroups H1 , H2 ≤ G, we have [H1 ] = [H2 ] if and only if Lie(H1 ) = Lie(H2 ). (ii) If H ≤ G is closed with NG (H) open, then Lie(H) is an ideal. (iii) If h is an ideal of g, then there exists a compact locally normal subgroup H with Lie(H) = h. Proof. We first recall that every closed subgroup of G is a Lie group, whose Lie algebra is a subalgebra of g, see [5, Ch. III, §8, Th. 2]. We next observe that every vector subspace of g is closed: this is easily seen by induction on dimension, using the fact that every proper open subgroup of Qp is compact. Therefore, every Lie subalgebra of g is the Lie algebra of a closed subgroup of G by [5, Ch. III, §7, Th. 2]. 12 This being recorded, assertion (i) now follows from [5, Ch. III, §7, Th. 2], while assertions (ii) and (iii) follow from [5, Ch. III, §7, Prop. 2]. 3 Quasi-centralisers and their stability properties 3.1 Motivation Let (G, U ) be a Hecke pair. Our principal aim in the present section and Sections 4 and 5 is to obtain two subsets of the structure lattice of (G, U ), namely the local decomposition lattice LD(G, U ) and the centraliser lattice LC(G, U ) that are Boolean algebras, provided that (G, U ) satisfies some unavoidable hypotheses. The local decomposition lattice will have as representatives the direct factors of finite index subgroups of U ; more generally, one can define the local decomposition lattice LD(G, U ; K) relative to a locally normal subgroup K, with representatives given by those direct factors of finite index subgroups of K that are locally normal in G. The centraliser lattice will have as representatives the centralisers of all locally normal subgroups. Here are some observations that will lead us to the required hypotheses. 1. Given a direct factor K of a group U , observe that there may be many different subgroups L such that K × L = U : consider for instance the direct factorisations of U = Z2p as Zp × Zp . However, if the centre of U is trivial, then K has a unique complement, namely L = CU (K). 2. A priori, the map LN (G, U ) → LN (G, U ); [K] 7→ [CG (K)] is not well-defined: given a locally normal subgroup K and a finite index subgroup V of U , it could be the case that CG (K ∩ V ) lies in a local equivalence class that is strictly above the local equivalence class of CG (K). So instead, we will define a subgroup QCG ([K]) that is the union of all centralisers of representatives of [K], and then define [K]⊥ to be [QCG ([K])]. We will see that under suitable conditions, every representative of [K] actually has the same centraliser, so the map [K] 7→ [CG (K)] is in fact well-defined. 3. There is a natural approach to obtaining a Boolean algebra from a bounded lattice L, provided that L is pseudocomplemented. A pseudocomplementation is a function ⊥ : L → L such that: (∗) For all α, β ∈ L, we have α ∧ β = 0 if and only if β ≤ α⊥ . If a pseudocomplementation exists, it is necessarily unique. Moreover, the set A = {α⊥ | α ∈ L} forms a Boolean algebra, with the restriction of ⊥ serving as the complementation map on A (in particular, ⊥3 = ⊥). We will obtain hypotheses 13 such that LN (G, U ) is pseudocomplemented, and the pseudocomplementation will be given by [K] 7→ [CG (K)]. These observations lead naturally to the definitions of the quasi-centre (see 3.2), quasicentralisers (see 3.3) and C-stability (see 3.4). The purpose of the present section (Section 3) is to perform the technical groundwork needed to verify that the definitions have the properties we desire of them. Since the lattices we are describing are ‘local’ invariants of the Hecke pair (G, U ), for the proofs, there will be no loss of generality in assuming G = U , and we may freely replace G or U by a finite index subgroup when it is convenient to do so. 3.2 The quasi-centre As observed in §3.1, to ensure unique complementation in the local decomposition lattice of the Hecke pair (G, U ), we need the finite index subgroups of U (or at least all sufficiently small finite index subgroups of U ) to have trivial centre. When (G, U ) is a t.d.l.c. Hecke pair, this becomes the question as to whether the quasi-centre of G, defined as the set of all elements whose centraliser is open, is discrete. The notion of quasi-centre is due to Burger–Mozes [6]; its basic properties are as follows. Lemma 3.1. Let G be a locally compact group. Then: (i) QZ(G) is a (not necessarily closed) characteristic subgroup of G. (ii) QZ(O) ≤ QZ(G) for any open subgroup O ≤ G. (iii) For any closed normal subgroup N of G, the image of QZ(G) under the projection to G/N is contained in QZ(G/N ). (iv) QZ(G) contains every discrete subgroup of G whose normaliser in G is open. In particular, all discrete normal subgroups and all finite locally normal subgroups are contained in QZ(G). (v) For any discrete normal subgroup N of G, we have QZ(G)/N = QZ(G/N ). In particular, if QZ(G) is discrete, then QZ(G/QZ(G)) = 1. Proof. (i) For all g, h ∈ G, we have CG (gh) ≥ CG (g) ∩ CG (h). This implies that gh ∈ QZ(G) as soon as g, h ∈ QZ(G). Part (i) follows. (ii) Let O ≤ G be open. Since CG (g) ≥ CO (g) for any g ∈ G, so that CG (g) is open as soon as CO (g) is so. Part (ii) follows. (iii) Clear since the projection G → G/N is an open map. 14 (iv) Let H be a discrete subgroup of G such that NG (H) is open and let V be an open compact subgroup of NG (H). Consider h ∈ H. Since the V -conjugacy class of h is compact, thus finite, h is centralised by an open subgroup of V and so h ∈ QZ(G) as claimed. (v) Let N ≤ G be a discrete normal subgroup. We have N ≤ QZ(G) by (iv) and QZ(G)/N ≤ QZ(G/N ) by (iii). Let now g ∈ G such that gN ∈ QZ(G/N ). Thus there is U ∈ B(G) such that [g, U ] ⊂ N . Since N is discrete, there exists also V ∈ B(G) with V ∩ N = 1. Since the commutator map x 7→ [g, x] is continuous, we may, upon replacing U by a sufficiently small open subgroup, assume that [g, U ] ⊂ V . We deduce that [g, U ] = 1, whence g ∈ QZ(G). This confirms that QZ(G)/N ≥ QZ(G/N ), and the required assertion follows. Given a general Hecke pair (G, U ), we define the quasi-centre of G with respect to U , denoted by QZ(G, U ), to be the set of all elements of G that have finitely many U -conjugates. When (G, U ) is a t.d.l.c. pair, this is equal to the quasi-centre of G as defined previously and we will adopt the notation QZ(G) for the quasi-centre of G with respect to U in the general case as well when there is no ambiguity about the choice of U . Subgroups H of G are understood to have the Hecke pair structure (H, H ∩ U ), so QZ(H) is the set of all elements of H that have finitely many (H ∩ U )-conjugates. Note that QZ(H) is a normal subgroup of H, and agrees with the usual definition of the quasi-centre for topological groups in the case that (G, U ) is t.d.l.c. and H is closed. When H is bounded with respect to (G, U ), observe that QZ(H) is just the union of all finite conjugacy classes of H. Note that a version of Lemma 3.1(iv) also holds for Hecke pairs (G, U ): Lemma 3.2. Let (G, U ) be a Hecke pair and let H ≤ G. Suppose that there is a finite index subgroup V of U such that V ≤ NG (H) and H ∩ V = 1. Then H ≤ QZ(G). Proof. Let x ∈ H. Then there is a finite index subgroup W of V such that xW x−1 ≤ V , since V is commensurated by G. Given w ∈ W , we have [x, w] ∈ H, since H is normalised by W , and also [x, w] ∈ xW x−1 W ⊆ V . Thus [x, w] ∈ H ∩ V , so [x, w] = 1. Hence x ∈ CG (W ) ≤ QZ(G). The quasi-centre has a useful characterisation in the case that it is locally equivalent to the trivial group. Corollary 3.3. Let (G, U ) be a Hecke pair. Suppose that QZ(G) ∈ [1], that is, there exists a finite index subgroup V of U such that QZ(G) ∩ V = 1. Then QZ(G) is the unique largest locally normal representative of [1]. In particular, if QZ(G) = 1, then the trivial group is the only locally normal representative of [1] in G. Proof. Follows immediately from Lemma 3.2. 15 Observe that if V is a finite index subgroup of U , then QZ(V ) = QZ(G) ∩ V . So in taking the local approach, to prove results about Hecke pairs (G, U ) with QZ(G) ∈ [1], we are usually free to assume that QZ(G) = 1. 3.3 Quasi-centralisers Generalising the quasi-centre, we introduce a notion of the centraliser of a subgroup that depends only on its local equivalence class. Definition 3.4. Let (G, U ) be a Hecke pair, let H and K be subgroups of G and let C be the class of subgroups of K ∩ U of finite index. The quasi-centraliser of K in H is given by [ QCH (K) := CH (L). L∈C Clearly the quasi-centraliser QCH (K) contains the centraliser CH (K). Moreover, the quasi-centraliser is a subgroup of G, since CH (L1 )CH (L2 ) ⊆ CH (L1 ∩ L2 ). Similarly we have QCH (K) = QCH (L) for any finite index subgroup L of K ∩ U , so that QCH (K) depends only on the local equivalence class α = [K] and we can write QCH (α) without ambiguity. Some caution is required in saying that two subgroups ‘quasi-commute’, as the relation A is contained in the quasi-centraliser of B is not symmetric. We see that QZ(H) = QCH (H). We emphasise that the quasi-centraliser of a subgroup Q need not be closed, even in the context of`profinite groups. For example, if G = N S3 , then QCG (G) is the dense subgroup N S3 . However, it is the case that QCG (H) = QCG (H) in this context. Lemma 3.5. Let (G, U ) be a Hecke pair, such that G is a topological group and U is open in G. Let H be a subgroup of G. Then QCG (H) = QCG (H). Proof. It may be assumed that H ≤ U and hence, since U is an open subgroup and therefore closed, that H ≤ U . Hence, to compute the quasi-centralisers, we may work with finite index subgroups of H and H. Let K ≤ H have finite index. Then K∩H has finite index in H and CG (K∩H) ≥ CG (K). Hence QCG (H) ≥ QCG (H). On the other hand, if L has finite index in H, then L has finite index in H and CG (L) = CG (L). Hence QCG (H) ≤ QCG (H) In the context of t.d.l.c. groups, the definition of the quasi-centraliser can be reformulated as follows. 16 Lemma 3.6. Let (G, U ) be a t.d.l.c. Hecke pair and H, K be subgroups of G. Then we have [ QCH (K) := CH (K ∩ V ). V ∈B(G) Proof. In view of Lemma 3.5, we have QCH (K) = QCH (K). Moreover, for any V ∈ B(G) we have K∩V = K ∩ V because V is open, which yields CH (K∩V ) = CH (K ∩ V ) = CH (K ∩ V ). We may therefore assume that K is closed. S For any S V ∈ B(G), we have CH (K ∩ V ) ≥ CH (K ∩ U ∩ V ), so that V ∈B(G) CH (K ∩ V ) = V ∈B(G) CH (K ∩ U ∩ V ). Given a finite index subgroup L ≤ K ∩ U , we have CH (L) = CH (L). Moreover, since K is closed and since L is an open subgroup of K ∩ U there exists V ∈ B(G) with K ∩ U ∩ V = L. Denoting by C be the class of subgroups of K ∩ U of finite index, we infer that [ [ QCH (K) = CH (L) = CH (K ∩ U ∩ V ) L∈C V ∈B(G) as required. The following observation is borrowed from [2, Prop. 2.6]. Lemma 3.7. Let G be a group, let U and V be subgroups of G, and let W ≤ U ∩ V . Suppose θ : U → V is an (abstract) isomorphism such that θ(x) = x for all x ∈ W , and suppose also that CG (W ∩ g−1 W g) = 1 for all g ∈ U . Then U = V and θ = idU . Proof. Let g ∈ U and let x ∈ W ∩ g −1 W g. Then gxg −1 = θ(gxg −1 ) = θ(g)θ(x)θ(g −1 ) = θ(g)xθ(g−1 ), so g−1 θ(g) centralises x. This shows that g−1 θ(g) ∈ CG (W ∩ g−1 W g) = 1. Thus g = θ(g). In the following lemmas, we obtain some consequences of the hypothesis that a given subgroup H of G has trivial quasi-centre. Lemma 3.8. Let (G, U ) be a Hecke pair and H be a subgroup of G such that QZ(H) = 1. Then: (i) QCG (H) ∩ NG (H) = CG (H); (ii) Every finite locally normal subgroup of G has trivial intersection with H. 17 Proof. For part (i), let t ∈ QCG (H) ∩ NG (H). Then conjugation by t induces an automorphism, θt , of H that fixes pointwise some finite index subgroup, K, of H ∩ U . Since K is commensurated by H and QZ(H, H ∩ U ) = 1, we have CH (K ∩ g−1 Kg) = 1 for all g ∈ H and so, by Lemma 3.7, θt = idH , that is, t ∈ CG (H). The reverse inclusion is clear. For part (ii), let K be a finite locally normal subgroup of G. Then there is a subgroup V of G that is commensurate to U such that K ≤ V ≤ NG (K). Let H ′ = H ∩ V and let K ′ = H ∩ K. Then K ′ is finite and normal in H ′ , and therefore contained in the quasi-centre of H ′ . However, H ′ has trivial quasi-centre, and so K ′ is trivial. Lemma 3.9. Let (G, U ) be a Hecke pair and let H and K be subgroups of G such that QZ(H) = 1. Suppose that |H ∩ K|, |H : NH (K)| and |K : NK (H)| are all finite. Then NK (H) = CK (H). Proof. Set A = NH (K) and B = NK (H), so that A and B normalise each other. We have A ∩ B ≤ H ∩ K, so that A ∩ B is finite by hypothesis. Since A ∩ B is normal in A, we infer that A ∩ B is centralised by a finite index subgroup of A, hence by a finite index subgroup of H since |H : A| is finite by hypothesis. Therefore A ∩ B ≤ QZ(H) = 1. Since A and B normalise each other, it follows that they commute. Hence B centralises a finite index subgroup of H, which implies that B ≤ QCG (H). Since B also normalises H, we deduce that B ≤ CG (H) by Lemma 3.8(i). Lemma 3.10. Let (G, U ) be a Hecke pair and H be a subgroup of G such that NU (H) has finite index in U . (i) Suppose (G, U ) is t.d.l.c. (as defined in §2.1 above), H is closed and QZ(H) is discrete and torsion-free. Then QCG (H) is closed and H ∩ QCG (H) is discrete and torsion-free. In particular, QCG (H) cannot be dense in G unless H is discrete and torsion-free. (ii) Let V be a subgroup of G that is commensurate with U . If QZ(H) ∩ V = 1, then QCG (H) is locally equivalent to CG (H ∩ V ). In particular, we have QCG (QCG (H)) = QCG (CG (H ∩ V )) = QCG (CV (H ∩ V )). Proof. (i) Let V be any open compact subgroup of G. Then QZ(H ∩ V ) = 1 because QZ(H) is discrete and torsion-free and QZ(H ∩V ) ≤ QZ(H). Therefore, by Lemma 3.8(i) and because QCG (H ∩ V ) = QCG (H), QCG (H) ∩ NG (H ∩ V ) = CG (H ∩ V ). (1) In particular, QCG (H) ∩ (H ∩ V ) ≤ Z(H ∩ V ) = 1. Hence H ∩ QCG (H) intersects trivially any open compact subgroup of G and is therefore a discrete and torsion-free. 18 That QCG (H) is closed follows from (1) by noting that NG (H ∩ V ) is open because it contains NU (H) ∩ V and that CG (H ∩ V ) is closed. (ii) Let W = NV (H). Since QZ(H) ∩ V = 1, it follows that QZ(H ∩ V ) = 1, and Lemma 3.8(i) implies that QCG (H ∩ V ) ∩ W ≤ QCG (H ∩ V ) ∩ NG (H ∩ V ) = CG (H ∩ V ). On the other hand, the inclusion CG (H ∩ V ) ∩ W ≤ QCG (H ∩ V ) ∩ W holds because CG (H ∩V ) ≤ QCG (H ∩V ). Since QCG (H ∩V ) = QCG (H), we infer that QCG (H)∩W = CG (H ∩ V ) ∩ W and hence that [QCG (H)] = [CG (H ∩ V )]. 3.4 C-stability Recall that one of our aims is to use the map K 7→ QCG (K) to define a pseudocomplementation on LN (G, U ), or at least on a subset of LN (G, U ). Observe that any pseudocomplementation ⊥ on a lattice L satisfies the following identity: 2 α⊥ ∧ α⊥ = 0 ∀α ∈ L. (2) The following property applied to locally normal subgroups, closely related to the identity (2), will prove to be the key criterion for our purposes. Definition 3.11. Let (G, U ) be a Hecke pair and let H be a subgroup of G. Say H is C-stable in G if R(H) := QCG (H) ∩ QCG (CG (H)) ∈ [1]. We shall mostly be interested in the case that H is contained in a subgroup commensurate with U . The following shows that, in that case, C-stability could have equivalently been defined to mean that QCV (HCG (H)) = 1 for some finite index subgroup V of U . In the t.d.l.c. case, this is equivalent to requiring that QCG (HCG (H)) be discrete. Lemma 3.12. Let (G, U ) be a Hecke pair and let H be a bounded subgroup of G. Then R(H) = QCG (H) ∩ QCG (CG (H)) = QCG (HCG (H)). Proof. Let x ∈ QCG (HCG (H)), so x centralises some finite index subgroup K of HCG (H) ∩ U . Then H ∩ K has finite index in H ∩ U and CG (H) ∩ K has finite index in CG (H)∩U and x centralises both subgroups. Hence x ∈ QCG (H) and x ∈ QCG (CG (H)). Conversely, consider x ∈ QCG (H)∩QCG (CG (H)) and let V be a subgroup commensurate to U such that H ≤ V . Then there are subgroups L of finite index in H ∩ U and M of finite index in CU ∩V (H) such that x ∈ CG (L) ∩ CG (M ). 19 Hence x centralises the group LM . Since L has finite index in H and M has finite index in CV (H), we thus have that x centralises a finite index subgroup of HCV (H). Finally, the condition that H ≤ V implies that HCV (H) = HCG (H) ∩ V , and the latter group is commensurate with HCG (H) ∩ U . Hence x centralises a finite index subgroup of HCG (H) ∩ U as required. We also note the role of the quasi-centre of (G, U ) as a whole in C-stability. Given any subgroup H of G, then QCG (H) ∩ QCG (CG (H)) ≥ QZ(G), and equality holds in the case H = G. So if QZ(G) ∈ [1], then G is C-stable in itself, and moreover, every subgroup of G commensurate to U is C-stable in G. If instead QZ(G) 6∈ [1], then G does not have any C-stable subgroups. So in proving properties of C-stable subgroups of a Hecke pair (G, U ), we may assume QZ(G) ∈ [1]. In particular, the following is an immediate consequence of Corollary 3.3: Corollary 3.13. Let (G, U ) be a Hecke pair and let H be a C-stable locally normal subgroup of G. Then R(H) = QCG (H) ∩ QCG (CG (H)) = QZ(G). The next lemma records the most basic properties of C-stable subgroups. Lemma 3.14. Let (G, U ) be a Hecke pair and let H be a C-stable subgroup of G. (i) Let K be a subgroup of H that is commensurate with H ∩ U . Then K is C-stable in G. (ii) QZ(H) ∈ [1]; indeed, QZ(H) ≤ QCG (H) ∩ QCG (CG (H)). (iii) If H ∩ U is finite, then H ≤ QCG (H) ∩ QCG (CG (H)). Proof. Let V be a subgroup of G that is commensurate with U . (i) Since K is commensurate with H ∩ U , we have QCG (K) = QCG (H). Since K ≤ H, we have CG (K) ≥ CG (H), so that QCG (CG (K)) ≤ QCG (CG (H)). Therefore QCG (K) ∩ QCG (CG (K)) ≤ QCG (H) ∩ QCG (CG (H)) ∈ [1]. (ii) We have QZ(H) = QCH (H) ≤ QCG (H). Moreover, any g ∈ QZ(H) belongs to H and therefore commutes with CG (H), so that QZ(H) ≤ CG (CG (H)) ≤ QCG (CG (H)). Therefore QZ(H) ≤ QCG (H) ∩ QCG (CG (H)) ∈ [1]. (iii) If H ∩ U is finite, then QZ(H) = H, so H ≤ QCG (H). Clearly also H is contained in QCG (CG (H)). 20 For each integer n > 0, we define inductively n Cn+1 H (K) = CH (CH (K)) n QCn+1 H (α) = QCH (QCH (α)), and where H and K are subgroups of G and α is either a subgroup, or a local equivalence class of subgroups. For convenience we also adopt the convention C0H (K) = K = QC0H (K). The following is elementary, and will be used frequently without comment. Lemma 3.15. Let G be a group and let H be a subgroup of G. Then C2G (H) ≥ H and C3G (H) = CG (H). The following lemma gives a useful relationship between n-th centralisers and n-th quasicentralisers in the context of C-stable subgroups. Lemma 3.16. Let (G, U ) be a Hecke pair, let H be a subgroup of G. As before, we set R(H) = QCG (H)∩QCG (CG (H)). Let n ≥ 0 and let V be a subgroup of G commensurate with U . (i) If L is a subgroup of G that contains a finite index subgroup of U , then R(Cn+1 L (H)) ≤ R(CnL (H)). In particular, if H is C-stable, then so is CnL (H). (ii) Suppose that H is C-stable and locally normal in G. Let V be a subgroup of G commensurate with U such that QZ(G) ∩ V = 1. Then we have QCV (QCnG (H)) = Cn+1 V (H ∩ V ). In particular, QCV (H) = CV (H ∩ V ). ′ Proof. (i) Fix n ≥ 0, let H ′ = CnL (H) and let K = Cn+1 L (H) = CL (H ). On the one hand H ′ ∩L is locally equivalent to H ′ and contained in CG (K), so QCG (CG (K)) ≤ QCG (H ′ ); on the other hand we also have QCG (K) = QCG (CG (H ′ )). Hence QCG (K) ∩ QCG (CG (K)) ≤ QCG (H ′ ) ∩ QCG (CG (H ′ )), n in other words, R(Cn+1 L (H)) ≤ R(CL (H)). Thus if H is C-stable, then so are the groups n CL (H) for n ≥ 0. (ii) Without loss of generality H ≤ V , since neither side of the desired equation is affected by replacing H by H ∩ V , and H ∩ V retains the properties of being C-stable and locally normal in G. Thus QZ(H) = 1 by Lemma 3.14(ii) and Corollary 3.13. First suppose that n = 0: we must show that QCV (H) commutes with H. Consider x ∈ QCV (H), so that x ∈ CV (K) for some finite index subgroup K of H ∩ U . Then K has finite index in H and, replacing K by its core in H, we may assume that K is normal in H. 21 Moreover, K is C-stable by Lemma 3.14(i), and it follows from part (i) and Lemma 3.14(ii) that QZ(CV (K)) = 1. Now CV (K) ∩ H = 1 since QZ(H) = 1. Also, H normalises CV (K) since H ≤ V and since H normalises K. Furthermore H is locally normal, so that H is normalised by some finite index subgroup W of U ∩ V such that W is normal in V . Hence H is normalised by CW (K). Thus [H, CW (K)] ≤ H ∩ CW (K) ≤ H ∩ CV (K) = 1, so that H centralises CW (K). As CW (K) is a subgroup of CV (K) of finite index, we see that H centralises CV (K) by Lemma 3.8(i), and in particular H centralises x. This concludes the proof for n = 0. For the general case, note first that CnV (H) is C-stable by part (i), has trivial quasi-centre by Lemma 3.14(ii) and is also locally normal by Lemma 2.1(iii). Therefore, by repeated applications of Lemma 3.10(ii), recalling that H ≤ V , we have the equation n n QCn+1 V (H) = QCV (QCV (H)) = QCV (CV (H)). The desired conclusion follows, since by the base case n = 0, we have QCV (CnV (H)) = CV (CnV (H)). We are now able to define a partial map α 7→ [QCG (α)] on the abstract structure lattice. Corollary 3.17. Let (G, U ) be a Hecke pair and let K be a C-stable locally normal subgroup of G. Suppose QZ(G) ∩ U = 1. Then for every finite index subgroup L of K ∩ U , we have QCU (K) = CU (L). In particular we have [CG (K ∩ U )] = [CU (K ∩ U )] = [QCG (K)], so that the local equivalence class [CU (K)] depends only on [K]. Proof. By Lemma 3.16(ii), we have QCU (K) = CU (K ∩ U ). Let now L be a finite index subgroup of K ∩ U . By definition of the quasi-centraliser, we have QCG (K) = QCG (K ∩ U ) = QCG (L) ≥ CG (L). Since L ≤ K ∩ U , we also have CG (L) ≥ CG (K ∩ U ). Intersecting with U and combining this with the observation above, we obtain QCU (K) = QCU (L) ≥ CU (L) ≥ CU (K ∩ U ) = QCU (K). Therefore all those subgroups coincide, which yields the desired assertion. 22 3.5 Local C-stability The previous section motivates the following definition. Definition 3.18. A Hecke pair (G, U ) is called locally C-stable if all locally normal subgroups of G are C-stable in G. We can now establish the following theorem, which characterises locally C-stable Hecke pairs under the assumption that U is residually finite; in particular, we obtain a characterisation of those t.d.l.c. Hecke pairs that are locally C-stable. We also obtain several stability properties of quasi-centralisers; to avoid unnecessary complications, we state these under the assumption that G has trivial quasi-centre. In view of Lemma 3.1(v) this hypothesis is harmless: indeed if G is locally C-stable, then QZ(G) is discrete, so that G/QZ(G) is locally C-stable and has trivial quasi-centre. Theorem 3.19. Let (G, U ) be a Hecke pair such that U is residually finite. Then G is locally C-stable if and only if QZ(G) ∈ [1] and every bounded abelian locally normal subgroup of G is contained in QZ(G) (see §2.1 for the definition of the term bounded). Moreover, if G is locally C-stable and QZ(G) = 1, then every locally normal subgroup H of G has the following properties: (i) QZ(H) = 1. (ii) QCG (H) = CG (H). In particular CG (H) depends only on [H]. (iii) Given a locally normal subgroup K of G, then H and K commute if and only if H ∩ K = 1. The proof requires some properties of subnormal subgroups of residually finite groups, given in the following lemma. Lemma 3.20. Let G be a group and let K be a normal subgroup of G. (i) If M is an abelian minimal normal subgroup of K, then the normal closure of M in G is abelian. (ii) If M is a finite perfect normal subgroup of K and G is residually finite, then |G : CG (M )| is finite. Proof. (i) Let g ∈ G. Since M is a minimal normal subgroup of K, then either M = gM g−1 , in which case [M, gM g−1 ] = 1 since M is abelian, or M ∩ gM g−1 = 1, in which case [M, gM g−1 ] ≤ M ∩ gM g −1 = 1 since M and gM g−1 are normal subgroups of K. In 23 either case, we see that M commutes with gM g−1 , so every G-conjugate of M commutes with every G-conjugate of M . Hence the normal closure of M in G is abelian. (ii) Since M is finite and G is residually finite, there is a normal subgroup H of G of finite index such that the quotient map G → G/H restricts to an injective map M → G/H. In particular, M ∩ H = 1. Now consider [H, K]: this is a subgroup of H ∩ K that is normal in G. Thus [H, K] and M are subgroups of G that normalise each other and have trivial intersection, so [H, K, M ] = 1, where [H, K, M ] = [[H, K], M ]. In particular, [H, M, M ] = 1, since M is a subgroup of K; equivalently [M, H, M ] = 1. By the Three Subgroups Lemma (see [12, Theorem 10.3.5]), we have [M, M, H] = 1. But M is perfect, so M = [M, M ], and hence [M, H] = [M, M, H] = 1, demonstrating that H ≤ CG (M ). Proof of Theorem 3.19. Suppose that G has an abelian locally normal subgroup L such that L 6≤ QZ(G). Then L 6∈ [1] by Lemma 3.2, and moreover L ≤ QCG (L) ∩ QCG (CG (L)), so L is not C-stable in G. From now on, we may suppose that QZ(G) ∈ [1] and every non-trivial abelian bounded locally normal subgroup A of G is contained in QZ(G); in particular, every such A is finite. If (G, U ) is t.d.l.c., it is enough to consider compact locally normal subgroups, since the closure of an abelian locally normal subgroup is an abelian locally normal subgroup. We now claim that for every bounded locally normal subgroup L of G, then QZ(L) ≤ QZ(G). If L is finite, then L ≤ [1] by the fact that U is residually finite, so L ≤ QZ(G) by Lemma 3.2. Given a bounded locally normal subgroup L of G, then the quasi-centre of L is characteristic in L, so the quasi-centre is itself bounded locally normal. Let V be a finite index subgroup of U such that QZ(G) ∩ V = 1. To show QZ(L) ≤ QZ(G), it is enough to show that QZ(L) is finite, and hence it is enough to show that QZ(L ∩ V ) is finite. Thus we may assume that L is an infinite subgroup of V such that L = QZ(L). By replacing V with NV (L), we may assume L E V . Since G has no infinite abelian bounded locally normal subgroup, the centre of L is finite. By ([1], Proposition 3 and Theorem 2), it follows that L is the union of its finite normal subgroups, so there exists a minimal finite normal subgroup M of L. Then M is characteristically simple, so either M is abelian or M is perfect. If M is abelian, then the normal closure N of M in V is a bounded locally normal subgroup of G, and N is abelian by Lemma 3.20(i), so N = 1; if M is perfect, then |V : CV (M )| is finite by Lemma 3.20(ii), so M ≤ QZ(G) = 1. In either case, we have a contradiction to the assumption that M is non-trivial. This contradiction proves the claim that every bounded locally normal subgroup L of G has quasi-centre contained in QZ(G). 24 We next claim that for any bounded locally normal subgroup L of G, we have QCG (LCG (L)) ≤ QZ(G). This implies that L is C-stable in view of Lemma 3.12. Let V be a finite index subgroup of U such that QZ(G) ∩ V = 1 and V ≤ NG (L), and let W be a subgroup S of G commensurate to U such that L E W . Then L ∩ V has finite index in L, so L = ni=1 (L ∩ V )li for some finite set of elements {l1 , . . . , ln } of L. Hence (LCG (L)) ∩ W = LCW (L) = n [ (L ∩ V )CW (L)li = m n [ [ (L ∩ V )CV (L)li wj , i=1 j=1 i=1 where {w1 , . . . , wm } is a finite subset of W . Consequently QCG (LCG (L)) = QCG (K), where K = (L ∩ V )CV (L). Notice that CV (K) ≤ M ∩ CV (M ), where M = CV (L). In particular, CV (K) is abelian, and moreover it is bounded and locally normal in G since CV (K) E V . It must thus be contained in QZ(G) by hypothesis. Hence CV (K) ≤ QZ(G) ∩ V = 1. On the other hand QZ(K) = 1 by the first part of the proof above. Therefore, by Lemma 3.8(i) we have QCV (K) = CV (K) = 1. In particular, the group generated by QCG (K) and V is a semidirect product QCG (K) ⋊ V . Given g ∈ QCG (K), there is a finite index subgroup Y of V such that Y gY g−1 is contained in Y . We see that ygy −1 g−1 ∈ QCG (K) ∩ V = 1 for all y ∈ Y , so g ∈ CG (Y ) ≤ QZ(G). Thus QCG (K) ≤ QZ(G), as desired, and the claim is proved. It remains to prove that every locally normal subgroup H satisfies the assertions (i), (ii) and (iii), under the assumption that QZ(G) = 1. Let V = NU (H). Then H ∩ V is bounded locally normal, so QZ(H) ∩ V = QZ(V ) ≤ QZ(G). Hence QZ(H) is normalised by V and has trivial intersection with V , so QZ(H) ≤ QZ(G) by Lemma 3.2, which proves (i). Let H̃ = QCG (H). Since QZ(H) = 1, Lemma 3.8(i) ensures that QCG (H) ∩ NG (H) = CG (H), in other words NH̃ (H) = CG (H). Now NH̃ (H) contains a finite index subgroup L say of H̃ ∩ U , so H ≤ CG (L) ≤ QCG (H̃). Moreover the definition H̃ = QCG (H) implies that H normalises H̃, and also that H̃ is locally normal. Then QZ(H̃) = 1 by (i), and we infer from Lemma 3.8(i) that H centralises H̃. Hence H̃ = CG (H) and (ii) holds. 25 Let K be a locally normal subgroup of G. If K ≤ CG (H), then certainly H ∩ K = 1 by property (i). Conversely, suppose H ∩K = 1. Then there is a finite index subgroup W of U such that H ∩ W normalises K ∩ W , and hence H ∩ W ≤ CG (K ∩ W ) by Lemma 3.9. Hence H ∩ W ≤ QCG (K), but then by property (ii) we have H ∩ W ≤ CG (K). Hence by the same argument K ≤ QCG (H) = CG (H), proving (iii). 4 4.1 Direct decomposition of locally normal subgroups Local decomposition lattices Let (G, U ) be a Hecke pair and let H be a bounded C-stable locally normal subgroup of G. In this section, we will obtain Boolean algebras corresponding to the decomposition of finite index subgroups of H into direct factors. Lemma 4.1. Let (G, U ) be a Hecke pair, let H be a bounded locally normal subgroup of G with trivial quasi-centre, let K be a subgroup of H of finite index and let L be a direct factor of K. Then L is C-stable in (H, H). Moreover CK (L) is the unique direct complement of L in K and L = C2K (L). If H is C-stable in G, then L is also C-stable in G. Proof. Let K = L × M . Then LCH (L) is a finite index subgroup of H, so QCH (LCH (L)) = QZ(H) = 1. Thus L is C-stable as a subgroup of H by Lemma 3.12. In particular, L has trivial centre; we see that CK (L) = M , and similarly CK (M ) = L. In addition LCG (L) contains K and also contains CG (K), so KCG (K) ≤ LCG (L). If H is C-stable in G, then K is C-stable in G by Lemma 3.14(i), and thus by Lemma 3.12, QCV (LCG (L)) ≤ QCV (KCG (K)) = 1 for every subgroup V of G commensurate with U . In this case L is C-stable in G. Lemma 4.2. Let G be a group such that Z(G) = 1, let K be a direct factor of G, and let H be a subgroup of G such that H = C2G (H). Then H = (H ∩ K) × CH (K). Proof. We have G = K × CG (K); let π1 and π2 be the projections onto K and CG (K) respectively associated with this decomposition. Then H ≤ π1 (H) × π2 (H). Moreover π1 (H) and π2 (H) are centralised by CG (H), so contained in H. Thus H = π1 (H) × π2 (H), which implies π1 (H) = H ∩ K and π2 (H) = CH (K). 26 Definition 4.3. Given a group H and a subgroup K of H, say K is an almost direct factor of H if there is a finite index subgroup L of H such that K is a direct factor of L. Let H be a bounded locally normal subgroup of G, such that the quasi-centre of H is finite. Define the local decomposition lattice LD(G, U ; H) of G at H to be the subset of LN (G, U ) consisting of elements [K] where K is locally normal in G and K is an almost direct factor of H. In the case that G is a t.d.l.c. group and U is an open compact subgroup of G, we will write LD(G; H) to mean LD(G, U ; H). Lemma 4.4. Let (G, U ) be a Hecke pair, let H be a bounded locally normal subgroup of G, and let K be a locally normal subgroup of G that is commensurate with H. Then LD(G, U ; H) = LD(G, U ; K) as subsets of LN (G, U ). Proof. Without loss of generality, we may assume that K is a finite index subgroup of H. It is clear from the definition that LD(G, U ; K) ⊆ LD(G, U ; H). Conversely, suppose the finite index subgroup L of H decomposes as L1 × L2 with L1 and L2 locally normal in G. Then Li ∩ K is locally normal, and has finite index in Li for i ∈ {1, 2}. Hence (L1 ∩ K) × (L2 ∩ K) has finite index in K, so [L1 ] = [L1 ∩ K] and [L2 ] = [L2 ∩ K] are contained in LD(G, U ; K). Consequently, it makes sense to write LD(G, U ; α) where α is any element of LN (G, U ) that has a representative with trivial quasi-centre, and this lattice admits an action of Gα by conjugation. The case α = [U ] is of particular interest, and we will define LD(G, U ) := LD(G, U ; [U ]). As the name suggests, the local decomposition lattice is a sublattice of LN (G, U ), but more is true: Theorem 4.5. Let (G, U ) be a Hecke pair and let α ∈ LN (G, U ) have a bounded locally normal representative H with trivial quasi-centre. Then LD(G, U ; α) is a sublattice of LN (G, U ), and internally it is a Boolean algebra (relative to the maximum α), with complementation map ⊥α : β 7→ [QCH (β)]. If (G, U ) is t.d.l.c. and α has a closed representative, then LD(G; α) is a sublattice of LN (G). We will prove the following separately, as it will be reused later. Lemma 4.6. Let M be a meet-semilattice with a least element 0. Suppose ⊥ : M 7→ M is an order-reversing involution such that for all α, β ∈ M, α ∧ β = 0 if and only if β ≤ α⊥ . Then M is a Boolean algebra, with minimum 0 and maximum 0⊥ , complementation given by ⊥ and join operation given by α ∨ β = (α⊥ ∧ β ⊥ )⊥ . 27 Proof. Let γ ∈ M. The existence of an order-reversing involution ensures that M is a lattice, with maximum and join as given. For all α ∈ M we have α∨α⊥ = (α⊥ ∧α)⊥ = 0⊥ and clearly α ∧ α⊥ = 0, so α⊥ is a complement of α relative to the maximum element 0⊥ . It remains to show that M is distributive. We first show α ∧ β ≤ γ ⇔ α ≤ β ⊥ ∨ γ, (3) for all α, β, γ ∈ M. Using the properties of ⊥ in the hypothesis, we have α ∧ β ≤ γ if and only if α ∧ β ∧ γ ⊥ = 0, while α ≤ β ⊥ ∨ γ if and only if δ = 0 where δ = α ∧ (β ⊥ ∨ γ)⊥ . Now δ = α ∧ β ∧ γ ⊥ , so (3) is proved. Now let α, β, γ, δ ∈ M. By (3) we have (α ∨ δ) ∧ β ≤ γ ⇔ α ∨ δ ≤ β ⊥ ∨ γ ⇔ (α ≤ β ⊥ ∨ γ and δ ≤ β ⊥ ∨ γ). Using (3) again we have α ≤ β ⊥ ∨ γ ⇔ α ∧ β ≤ γ and δ ≤ β ⊥ ∨ γ ⇔ δ ∧ β ≤ γ. Finally, the conjunction of the inequalities α ∧ β ≤ γ and δ ∧ β ≤ γ is given by the inequality (α ∧ β) ∨ (δ ∧ β) ≤ γ, proving the distributive law. Proof of Theorem 4.5. Fix a bounded locally normal representative H of α, such that H has trivial quasi-centre. Then every finite index subgroup of H has trivial quasi-centre. Let K and L be almost direct factors of H such that K and L are locally normal in G. Then KCH (K) and LCH (L) both have finite index in H, and K ∩CH (K) = L∩CH (L) = 1. We may replace K with C2H (K) and so assume K = C2H (K), since this substitution does not affect the commensurability class of K or its status as an almost direct factor of H that is locally normal in G. Let M = LCH (L) and let K2 = K ∩ M . Then K2 = CM (CH (K)). Since K is C-stable in H by Lemma 4.1, in fact CH (K) = CH (K2 ) by Corollary 3.17; in turn, CH (K) has the same centraliser in H as CM (K) for the same reason. So in fact K2 = C2M (K2 ). It follows by Lemma 4.2 that K2 ∩ L is a direct factor of K2 . In turn, K2 is a direct factor of K2 CH (K), which has finite index in H. Thus K2 ∩ L is an almost direct factor of H. By a similar argument, there is a finite index subgroup R of CH (K) that factorises as (R ∩ L) × CR (L), so there is a finite index subgroup of H that factorises as K2 × (R ∩ L) × CR (L). The first two factors are contained in K2 L, while the last factor centralises K2 L; additionally K2 L ∩ CR (L) ≤ QZ(H) = 1. It follows that K2 L is an almost direct factor of H. Finally, note that K2 and L are both bounded and locally normal, and this property is inherited by both their intersection and their product. We conclude that [K2 ∩ L], [K2 L] ∈ LD(G, U ; α), so LD(G, U ; α) is a sublattice of LN (G, U ). 28 By Lemma 3.10, [QCH (K)] has a representative CH (K); this also represents an element of LD(G, U ; α), so ⊥α preserves LD(G, U ; α). One has [K] ∧ β = 0 for β ∈ LD(G, U ; α) whenever β ≤ [K]⊥α , since QZ(K) = 1, and conversely [K]∧β = 0 implies by Lemma 3.9 that some representative of β centralises a representative of [K], so in this case β ≤ [K]⊥α . It is also clear that ⊥α is an order-reversing involution on LD(G, U ; α). Thus LD(G, U ; α) is a Boolean algebra by Lemma 4.6. Now suppose (G, U ) is t.d.l.c. and that α has a closed representative. Then by Proposition 2.4, α has a compact locally normal representative H2 , and moreover from the proof, H2 can be taken to be the closure of a finite index subgroup of H. We see that H ∩ H2 has trivial quasi-centre. Since H ∩ H2 is a dense subgroup of H2 of finite index, we have QCG (H2 ) = QCG (H ∩ H2 ). In particular, H2 has trivial quasi-centre. We now follow the same argument as before, with H2 in place of H, and see that every element of LN (G; α) has a representative of the form L = C2H2 (K), where K is locally normal. Since centralisers are closed, it follows that L is compact and locally normal in G, so LN (G; α) ⊆ LN (G); since LN (G; α) is a sublattice of LN (G, U ), it is also a sublattice of LN (G). Proof of Theorem I (i). Since G has trivial quasi-centre, the quasi-centraliser QCG (U ) of any open compact subgroup of G is trivial. In particular, U is C-stable in G, so by Theorem 4.5, the lattice LD(G; [U ]) = LD(G) is a Boolean algebra. In the case of a topological group G and a subgroup H, there naturally arises the question of how direct factors of H relate to direct factors of H. Put another way, one can consider the quasi-factors of a topological group, meaning the direct factors of its dense subgroups. If H is compact and centreless, there is good control of this situation. As a result, we obtain a relationship between decomposition lattices of t.d.l.c. groups and their dense subgroups. Lemma 4.7. Let G be a compact topological group such that Z(G) = 1 and let D be a dense subgroup of G. Let K be a direct factor of D. Then G = CG (K) × C2G (K), and K = C2G (K) ∩ D. In particular, the map K 7→ C2G (K) defines an injective homomorphism from LD to LG , where LD is the lattice of direct factors of D and LG is the lattice of direct factors of G. Proof. Since centralisers are closed, we have CG (D) = 1. Let D = K × L. Then Z(L) ≤ CG (D) = 1, so CD (L) = K. Similarly, CD (K) = L. Thus D is contained in the set E = CG (K)CG (L). We see that both CG (K) and CG (L) are closed in G, hence compact, so E is compact, hence closed. Since E is also dense, it follows that E = G. Each of the subgroups CG (K) and CG (L) is normalised by 29 D, and hence by G, since the normaliser of a closed subgroup is closed. Moreover, CG (K) ∩ CG (L) = CG (D) = 1. Hence G = CG (K) × CG (L). We see that Z(CG (K)) ≤ Z(G) = 1, so in fact CG (L) = C2G (K). It follows that C2G (K) ∩ D = CD (L) = K. The remaining conclusions are clear. Proposition 4.8. Let G be a t.d.l.c. group such that QZ(G) = 1 and let D be a dense subgroup of G. Let U be an open compact subgroup of G, and let R be a commensurated subgroup of D that is also a dense subgroup of U . Let H be a bounded locally normal subgroup of the Hecke pair (D, R). Then QZ(D) = 1; moreover the following assertions hold. (i) If H has trivial quasi-centre, then H has trivial quasi-centre. Moreover the map 2 (K)] defines an injective order-preserving map from LD(D, R; H) to [K] 7→ [CH LD(G, U, H). (ii) If H has trivial quasi-centre, then LD(G, U ; H) is embedded in LD(D, R; H) as a sublattice in a natural way. If H is closed in G, then this embedding is an isomorphism. Proof. We have QCG (U ) ≤ QZ(G) = 1, so QCG (R) = 1 by Lemma 3.5. In particular, every finite index subgroup of R has trivial centraliser in D. Thus QZ(D) = 1. Since H is locally normal in (D, R), without loss of generality we may assume H ≤ R. (i) We have QCG (H) = QCG (H) by Lemma 3.5. Suppose QZ(H) = 1. Then QZ(H) = 1. Let K be an almost direct factor of H that is locally normal in (D, R). Then NG (K) contains a finite index subgroup of R, so NG (K) contains a finite index subgroup of R = U ; thus K is compact and locally normal in (G, U ). We see from Lemma 4.7 that the map φ : [K] 7→ [C2H (K)] defines an order-preserving map from LD(D, R; H) 2 (K), where M is any finite index to LD(G, U, H ). Moreover, we have K = M ∩ CH subgroup of H of which K is a direct factor, so φ is injective. (ii) If K is an almost direct factor of H that is locally normal in (G, U ), then it is also locally normal in (D, R), since R ≤ U . We can therefore regard LD(G, U ; H) as a subset of LD(D, R; H), consisting of those elements α ∈ LD(D, R; H) such that there exists a representative K of α such that NG (K) contains a finite index subgroup of U . Moreover, LD(G, U ; H) forms a sublattice of LD(D, R; H), since the meet and join operations for LD(G, U ; H) and LD(D, R; H) are essentially the same (in both cases, the meet is the 30 class of the intersection of representatives, and the join is the class of the product of suitably-chosen representatives). If H is closed in G, then every almost direct factor K of H has finite index in a closed almost direct factor C2H (K), and we see that C2H (K) is locally normal in (G, U ) if and only if it is locally normal in (D, R), in other words LD(D, R; H) = LD(G, U ; H). It is clear that the relation “A is a direct factor of B” is transitive. A similar transitivity applies to local decomposition lattices: Lemma 4.9. Let (G, U ) be a Hecke pair and let α, β ∈ LN (G, U ) have bounded locally normal representatives with trivial quasi-centre. Then LD(G, U ; α) ⊆ LD(G, U ; β) if and only if α ∈ LD(G, U ; β). Proof. Suppose α ∈ LD(G, U ; β). Then there is a representative H of α and a representative K of β such that H is a direct factor of K. It follows that all almost direct factors of H are also almost direct factors of K. 4.2 Locally finitely decomposable t.d.l.c. groups The following are natural properties to consider in the context of local decomposition lattices: Definition 4.10. Let H be a group. Say H is finitely decomposable if H = H1 × · · · × Hn for some n ≥ 1, such that each Hi is indecomposable, i.e. all of whose direct product decompositions are trivial. Given a t.d.l.c. group G, say G is locally finitely decomposable if every open compact subgroup of G is finitely decomposable. Proposition 4.11. Let G be a group such that Z(G) = 1. (i) Suppose G = G1 × · · · × Gn for some n ≥ 1, such that each Gi is indecomposable. Then {G1 , . . . , Gn } is precisely the set of indecomposable direct factors of G and every direct factor of G is a product of some subset of {G1 , . . . , Gn }. In particular, Aut(G) acts on {G1 , . . . , Gn } and there are exactly 2n direct factors of G. (ii) Suppose that G is compact and not finitely decomposable. Then G is topologically isomorphic to an infinite Cartesian product of closed subgroups. In particular, G has uncountably many closed direct factors up to commensurability. Proof. For any direct factor H of G, then CG (H) is the complement of H and thus also a direct factor, so H = CG (CG (H)). Suppose G = G1 × · · · × Gn for some n ≥ 1, such 31 that each Gi is indecomposable. Let K be a direct factor of G. Then Q G = KCG (K), and K ∩ CG (K) ≤ Z(G) = 1. Let I = {i | Gi 6≤ CG (K)}. Then K ≤ i∈I Gi , since K is centralised by the remaining factors. Given i ∈ I, then K ∩ Gi is a direct factor of both K and Gi , Q by Lemma 4.2, so K = Gi by the fact that K and Gi are indecomposable. Thus K = i∈I Gi . Suppose G is compact and not finitely decomposable. We shall define a family {Gi,j }1≤j≤i of non-trivial subgroups as follows, so that for all n, G = Gn,1 × · · · × Gn,n and Gn,n is not finitely decomposable. Set G1,1 = G. Suppose we have G = Gn,1 ×· · ·×Gn,n for some n. Choose some non-trivial direct decomposition Gn,n = Hn × Kn , ensuring that Kn is not finitely decomposable (this is always possible, as by induction Gn,n is not finitely decomposable). Now set Gn+1,n = Hn , Gn+1,n+1 = Kn and Gn+1,j = Gn,j for 1 ≤ j < n. T Let K = ∞ j=1 Gj,j . We claim now that G∼ =K× ∞ Y Gj+1,j . j=1 The decomposition G = Gn,1 × · · · × Gn+1,n+1 gives a continuous epimorphism G → Qn Q n G = G with kernel G , and we note from the construction that n+1,j n+1,j n+1,n+1 j=1 Qj=1 n G . These epimorphisms are compatible with each other as n varies so that j=1 j+1,j Q they generate an inverse system, with a limit homomorphism φ : L G → ∞ j=1 Gj+1,j . ∞ G We see that ker φ is precisely K. In addition φ(CG (K)) contains j=1 j+1,j , since Q Gj+1,j centralises Gn+1,n+1 for all 1 ≤ j ≤ n, so φ(CG (K)) = ∞ G j=1 j+1,j . In particular G = KCG (K): this implies K ∩ CG (K) ≤ Z(G) = 1, so in fact G = K × CG (K). The restriction of φ to CG (K) is consequently bijective, Q giving the desired isomorphism. We now obtain uncountably many direct factors Q GJ = j∈J Gj+1,jQby letting J range over all subsets of N. For two such direct factors j∈J1 Gj+1,j and j∈J2 Gj+1,j to be commensurate, the symmetric difference of the sets J1 and J2 must be finite. This defines an equivalence relation on the power set of N whose equivalence classes are countable, so there must be uncountably many equivalence classes. Corollary 4.12. Let G be a t.d.l.c. group with QZ(G) = 1. (i) G is locally finitely decomposable if and only if G has a basis of identity neighbourhoods consisting of open compact subgroups that are finitely decomposable. (ii) Suppose G is first-countable. Then G is locally finitely decomposable if and only if LD(G) is countable. Proof. (i) The necessity of the condition is obvious. Conversely, if G is not locally finitely decomposable, then G has some open compact subgroup V which is not finitely decomposable. Since G has trivial quasi-centre, the group V must be center-free, and is 32 thus an infinite Cartesian product of closed subgroups by Proposition 4.11. Now, any open subgroup W of V contains infinitely many direct factors of V ; those factors are then also direct factors of W , and hence W cannot be finitely decomposable. (ii) Suppose that G is locally finitely decomposable. Since LD(G) = LD(U ) for any open compact subgroup U , we may assume that G is compact. In this case G has only countably many open subgroups, each with only finitely many direct factors, and thus LD(G) is countable. Conversely, suppose LD(G) is countable. Then given an open compact subgroup U of G, the direct factors of U fall into countably many commensurability classes. Thus U is finitely decomposable by Proposition 4.11. Proposition 4.13. Let G be a t.d.l.c. group and let H be a C-stable compact locally normal subgroup that is locally finitely decomposable. Then LD(G; H) = LD(H); indeed LD(G; H) contains LD(K) for every almost direct factor K of H. Proof. It is clear that LD(G; H) ⊆ LD(H). Let L be an open subgroup of H, and let K be a direct factor of L. Then NG (L) is open in G by Lemma 2.1(ii), and it preserves the set X of indecomposable direct factors of L; since X is finite, there is an open subgroup R of NG (L) that normalises every indecomposable direct factor of L. In turn K is a product of indecomposable direct factors of L, so it is normalised by R. Hence K is locally normal, so represents an element of LD(G; H). Hence LD(G; H) = LD(H), and LD(H) contains LD(H; K) by Lemma 4.9. In turn, K is locally finitely decomposable, because given an open subgroup M of K, the direct factors of M are also direct factors of M CH (K), which is an open subgroup of H. Hence LD(H; K) = LD(K). 5 5.1 The centraliser lattice and weakly decomposable actions The centraliser lattice It would be useful to combine all the local decomposition lattices of (G, U ) (which are not necessarily individually preserved by the action of G) into a single Boolean algebra admitting a G-action. There are two difficulties here: one is that the property of having trivial quasi-centre may not be well-behaved under intersections, and the other is that we need a unified notion of complementation. To avoid the first difficulty and overcome the second, we restrict our attention to locally C-stable Hecke pairs (G, U ) in the sense of §3.5. Recall from Theorem 3.19 that under the assumption that U is residually finite, these are precisely the Hecke pairs with trivial quasi-centre and no non-trivial abelian locally normal subgroups. The resulting lattice will not be a sublattice of LN (G, U ) in general (because the join operation is different), but it arises from the structure lattice in a natural way. 33 Definition 5.1. Let (G, U ) be a locally C-stable Hecke pair. Define the map ⊥ : LN (G, U ) → LN (G, U ) : α 7→ [QCG (α)]. This is well-defined by Theorem 3.19, since there exists a finite index subgroup V of U such that QZ(V ) = 1, and we have [QCG (α)] = [QCV (α)] = [CG (K)] for every locally normal representative K of α contained in V . The centraliser lattice LC(G, U ) is defined to be the set {α⊥ | α ∈ LN (G, U )} together with the map ⊥ restricted to LC(G, U ), the partial order inherited from LN (G, U ) and the binary operations ∧c and ∨c given by: α ∧c β = α ∧ β α ∨c β = (α⊥ ∧ β ⊥ )⊥ . In general we will write ∨ instead of ∨c in contexts where it is clear that we are working inside the centraliser lattice. Given a t.d.l.c. group G, we define LC(G) := LC(G, U ), where U is some open compact subgroup of G. (The choice of U here is inconsequential.) Theorem 5.2. Let (G, U ) be a locally C-stable Hecke pair, such that U is residually finite. (i) The poset LC(G, U ) is a Boolean algebra and ⊥2 : LN (G, U ) → LC(G, U ) is an idempotent surjective lattice homomorphism. If G is t.d.l.c., then LC(G) = {α⊥ | α ∈ LN (G)} ⊆ LN (G). 2 (ii) Fix α ∈ LN (G, U ) and let θ be the map on LN (G, U ) given by β 7→ β ⊥ ∧ α. Then θ is an idempotent order-preserving map, and θ(LN (G, U )) = θ(LC(G, U )) ⊇ LD(G, U ; α). Moreover, θ −1 (LD(G, U ; α)) ∩ LC(G, U ) is a subalgebra of LC(G, U ). We need the following basic group theoretic facts. Lemma 5.3. Let G be a group such that every normal subgroup has trivial centre, in other words that G has no non-trivial abelian normal subgroups. Then the following equations are satisfied for any normal subgroups A and B of G. (i) C2G (A ∩ B) = C2G (A) ∩ C2G (B); (ii) CA (B) = CA (A ∩ B); (iii) CA (CG (B)) = CA (CA (B)). 34 Proof. (i) Let K = C2G (A) and let L = C2G (B). It is clear that CG (CG (A ∩ B)) ≤ CG (CG (A)CG (B)) = K ∩ L, so it suffices to show that K ∩ L centralises CG (A∩ B). For this it is enough to show that M = CG (A∩ B)∩ K ∩ L = 1, since all subgroups under consideration are normal. We see that M ∩ A ∩ B ≤ Z(A ∩ B) = 1, so M ∩ A centralises B, in other words M ∩ A ≤ CG (B). Then M ∩ A is centralised by L, so M ∩ A is central in M , so M ∩ A = 1, and hence M ≤ CG (A). Since K centralises CG (A) and contains M , we see that M is central in CG (A) and hence trivial, as required. (ii) Notice that CA (A ∩ B) is normal in G and has trivial intersection with A ∩ B (since Z(A ∩ B) = 1). Therefore [CA (A ∩ B), B] ⊂ CA (A ∩ B) ∩ B = 1, whence CA (A ∩ B) ≤ CA (B). The reverse inclusion is clear. (iii) This a special case of (ii), using the normal subgroups A and CG (B) instead of A and B. Proof of Theorem 5.2. Since we are concerned only with properties of a local nature, we are free to replace G and U with a finite index subgroup V of U (which can be assumed to be open in the t.d.l.c. case) such that QZ(V ) = 1. In other words, we may assume that G has trivial quasi-centre. (i) Let A be a bounded locally normal subgroup of G, let α = [A], and let V be a subgroup of G commensurate with U such that A E V . By Lemma 3.16, CnV (A) is then 3 2 n a representative of α⊥ . We deduce α⊥ ≥ α and α⊥ = α⊥ from Lemma 3.15. In particular, ⊥ acts as an involution on LC(G, U ), so ⊥2 (LN (G, U )) = LC(G, U ). In the 2 2 t.d.l.c. case, we note that CU (CV (A)) is a closed representative of α⊥ , so α⊥ ∈ LN (G), and since ⊥3 = ⊥, it follows that ⊥(LN (G)) = ⊥(LN (G, U )) =: LC(G) and that LC(G) is contained in LN (G). It is clear that ⊥ is order-reversing (so ⊥2 is order-preserving). Let α, β ∈ LN (G, U ) and choose representatives A and B of α, β respectively that are normal in a subgroup V that is commensurate with U . Then we have CV (AB) = CV (A) ∩ CV (B), so that (α ∨ β)⊥ = α⊥ ∧ β ⊥ . (4) This shows that LC(G, U ) is a meet-sublattice of LN (G, U ). Since the only abelian normal subgroup of V is the trivial one, it also follows from Lemma 5.3(i) that ⊥2 is compatible with the meet operation. By Lemma 3.9, α ∧ β = 0 if and only if B centralises A, which amounts to saying that β ≤ α⊥ . Hence LC(G, U ) is a Boolean algebra by Lemma 4.6. We see that ⊥2 is compatible with the join operations in passing from LN (G, U ) to LC(G, U ) as follows, using (4): 2 2 3 2 3 α⊥ ∨c β ⊥ = (α⊥ ∧ β ⊥ )⊥ = (α⊥ ∧ β ⊥ )⊥ = (α ∨ β)⊥ . 35 Hence ⊥2 is a lattice homomorphism. (ii) It is clear that θ(LN (G, U )) = θ(LC(G, U )), since ⊥2 is a projection of LN (G, U ) to LC(G, U ). It is also clear that θ is order-preserving. Given β ∈ LN (G, U ) we have 2 4 2 2 2 θ 2 (β) = (β ⊥ ∧ α)⊥ ∧ α = β ⊥ ∧ α⊥ ∧ α = β ⊥ ∧ α, so θ 2 = θ. Let A be a bounded locally normal representative of α and let K be a direct factor of A. Choose V commensurate with U such that both A and K are normal in U . Then 2 K = C2A (K), so K = CA (CV (K)) by Lemma 5.3(iii). In other words, [K] = β ⊥ ∧ α 2 where β = β ⊥ is the element [C2V (K)] = [QC2U (K)] of LC(G, U ). Thus θ(LC(G, U )) contains LD(G, U ; α). Let L = θ −1 (LD(G, U ; α)) ∩ LC(G, U ). Then L is closed under meets in LC(G, U ), by the fact that ⊥2 is compatible with the meet operation. Furthermore L is closed under complementation in LC(G, U ), since the complement of β ∧ α in LD(G, U ; α) is (β ∧ α)⊥ ∧ α by Theorem 4.5. Using Lemma 5.3(ii) we see that (β ∧ α)⊥ ∧ α = [CA (A ∩ B)] = [CA (B)] = β ⊥ ∧ α, where A and B are representatives of α and β respectively that normalise each other. So L is a subalgebra of LC(G, U ). Theorem I (ii) now follows from Theorem 5.2 together with Theorem 3.19. Let (G, U ) be a locally C-stable Hecke pair such that QZ(G) = 1. Then each element α of the centraliser lattice has a canonical ‘global’ representative, namely QCG (α⊥ ). This subgroup is the unique largest locally normal representative of α. If (G, U ) is t.d.l.c., then QCG (α⊥ ) is closed, but not necessarily compact. We can consider the set L = {QCG (α) | α ∈ LN (G, U )}, ordered by inclusion, as the global centraliser lattice of (G, U ). As a Boolean algebra, it is G-equivariantly isomorphic to LC(G, U ). The elements of L also have a more direct characterisation using Theorem 3.19, as follows: Proposition 5.4. Let (G, U ) be a locally C-stable Hecke pair such that U is residually finite and QZ(G) = 1. Then the set of subgroups L := {QCG (α) | α ∈ LN (G, U )} enjoys the following properties: (i) If H ∈ L, then H = C2G (H) and H is locally normal. Indeed H ∩ R = C2R (H), where R is any locally normal subgroup of G. (ii) Let K be a subgroup of G such that CG (K) is locally normal. Then CG (K) ∈ L. If K is locally normal, in fact CG (K) = QCG ([K]) and C2G (K) = QCG ([K]⊥ ). 36 Proof. Let α ∈ LN (G, U ), let H = QCG (α). Since α is an element of LN (G, U ), then |U : Uα | is finite; in turn Uα normalises H, since H is defined as a subgroup of G in terms of α. Hence |U : NU (H)| is finite, so that H is locally normal. Let L = QCG (α⊥ ). Then L = CG (H) by Theorem 3.19. The same argument shows that H = CG (L), so H = C2G (H). Now let M = CG (H), and suppose R is a locally normal subgroup of G. Then R ∩ M is locally normal and hence centreless, since G is locally C-stable and QZ(G) = 1. Then CR (R ∩ M ) ≥ H ∩ R, since M centralises H. Moreover, we have CR (R ∩ M ) ∩ M = CR (R ∩ M ) ∩ (R ∩ M ) ≤ Z(R ∩ M ) = 1. Thus CR (R ∩ M ) and M are locally normal subgroups that intersect trivially, so they commute by Theorem 3.19(iii), so that CR (R ∩ M ) = CR (M ), and hence CR (R ∩ M ) ≤ C2G (H) = H. This proves (i). Now let K be a locally normal subgroup of G. Then CG (K) = QCG ([K]) by Theorem 3.19, so in particular CG (K) ∈ L. Setting L = CG (K), the same argument shows that CG (L) = QCG (α⊥ ). More generally, if K is a subgroup of G such that CG (K) is locally normal, then CG (K) = C3G (K), and in turn C3G (K) is the centraliser of a locally normal subgroup C2G (K) of G, so CG (K) ∈ L. This completes the proof of (ii). As a consequence of Proposition 5.4 and Lemma 4.2, we obtain information about the decomposability of centralisers in G. Corollary 5.5. Let (G, U ) be a locally C-stable Hecke pair such that U is residually finite and QZ(G) = 1. Let A and B be locally normal subgroups of G. Suppose that B = K × L for some subgroups K and L. Then CB (A) = CK (A) × CL (A). Proof. Let H = CG (A) and let R = CB (A). Then R = C2B (H) by Proposition 5.4; consequently R ≥ C2B (R), so in fact R = C2B (R). Thus by Lemma 4.2, R ∩ K and R ∩ L are complementary direct factors of R, giving the required factorisation. Similar to Proposition 4.8, there is a relationship between the centraliser lattice of a t.d.l.c. group and that of its dense subgroups, viewed as Hecke pairs. Proposition 5.6. Let G be a locally C-stable t.d.l.c. group such that QZ(G) = 1 and let D be a dense subgroup of G. Let U be an open compact subgroup of G, and let R be a commensurated subgroup of D that is also a dense subgroup of U . (i) The Hecke pair (D, R) is locally C-stable, with QZ(D) = 1. (ii) Let L be the global centraliser lattice of (G, U ) and let L′ be the global centraliser lattice of (D, R). Then there is an injective D-equivariant order-preserving map from L′ to L given by K 7→ C2G (K). 37 Proof. Given a locally normal subgroup L of D, then L and CG (L) are both closed and locally normal in G; in particular, CG (L) ∈ L by Proposition 5.4. Assuming L is non-trivial, then since L cannot be finite or abelian, neither can L. In addition, we have QZ(D) = 1 by Proposition 4.8. This proves (i) in view of Theorem 3.19. Given K ∈ L′ , then CG (K) ∈ L as above, hence C2G (K) ∈ L. Thus θ : K 7→ C2G (K) is a map from L′ to L. Clearly θ is D-equivariant and order-preserving. Since K = C2D (K), we see that K = θ(K) ∩ D as follows: K ≤ θ(K) ∩ D = C2G (K) ∩ D ≤ CG (CD (K)) ∩ D = C2D (K) = K. Thus θ is injective. This proves (ii). Example 5.7. In general, given a t.d.l.c. group G, the centraliser lattice of a dense subgroup of G does not determine the centraliser lattice of G. Let F be a non-abelian free group (with the discrete topology), and consider F as a Hecke pair (F, F ). It is clear that F is locally C-stable, so we can define the centraliser lattice LC(F, F ). Since CF (x) is cyclic for all x ∈ F r {1}, in fact LC(F, F ) = {0, ∞}. Likewise LC(F̂p ) = {0, ∞}, where F̂p is the pro-p completion of F . However, there are many pro-p groups P with dense free subgroups such that LC(P ) is large. For instance, if P is a pro-p branch group, then by results of J. Wilson, P acts faithfully on LC(P ), and P contains a dense non-abelian free subgroup. (See [27].) The global centraliser lattice is a natural frame of reference for considering quasi-factors of a locally C-stable t.d.l.c. group that has trivial quasi-centre. In contrast to the compact case considered in Lemma 4.7, a closed quasi-factor of a non-compact t.d.l.c. group G need not be a direct factor of G. (See [7], Appendix II.) Proposition 5.8. Let G be a locally C-stable t.d.l.c. group with QZ(G) = 1. Let K be a closed normal subgroup of G, and suppose KCG (K) is dense in G. Let α = [K]. Then there is a dense subgroup of G of the form QCG (α)× QCG (α⊥ ), where both direct factors are closed and normal in G. In addition, the following are equivalent: (i) G = K × CG (K); (ii) G = QCG (α) × QCG (α⊥ ); (iii) α ∈ LD(G); 2 (iv) α⊥ ∈ LD(G). Proof. We have QCG (α) = CG (K) and QCG (α⊥ ) = C2G (K) by Proposition 5.4; in particular, both QCG (α) and QCG (α⊥ ) are closed. Since K is normal, both QCG (α) and QCG (α⊥ ) are normal in G. Since Z(G) = 1, we see that both K and CG (K) have trivial centre. This ensures that the subgroup generated by QCG (α) and QCG (α⊥ ) is a direct product. 38 Let U be an open compact subgroup of G and let L be a direct factor of G. Then 2 L = C2G (L), so [L] = [L]⊥ . Moreover, the topology of G is generated as a product topology by the topologies of L and CG (L). In particular (L ∩ U ) × CU (L) is open in G, hence has finite index in U . Thus L ∩ U is an almost direct factor of U , so α = [L ∩ U ] ∈ LD(G). Thus (i) implies (iii) and (ii) implies (iv). On the other hand, let L be a closed normal subgroup of G such that LCG (L) is dense and [L] ∈ LD(G). (L ∩ U ) × CU (L ∩ U ) is open in U , since it is a closed subgroup of finite index, and moreover CU (L ∩ U ) = CU (L) by Theorem 3.19. Hence LCG (L) contains an open subgroup of G. Since LCG (L) is also dense, we conclude that G = L × CG (L). So (iii) implies (i) and (iv) implies (ii). It is clear that (i) implies (ii), since K ≤ QCG (α⊥ ) and CG (K) = QCG (α). Conversely if (ii) holds, then K × CG (K) is a closed subgroup of G = QCG (α) × QCG (α⊥ ), since K is closed in QCG (α⊥ ) and CG (K) = QCG (α). Since K × CG (K) is also dense, it follows that (i) holds. This completes the proof that (i), (ii), (iii) and (iv) are equivalent. Corollary 5.9. Let G be a locally C-stable t.d.l.c. group such that LC(G) = LD(G) and such that QZ(G) = 1. Then every closed quasi-factor of G is a direct factor of G. 5.2 Weakly decomposable actions Let A be a Boolean algebra. Then by the Stone representation theorem, A defines a profinite space (that is, a compact totally disconnected space), the Stone space S(A) of A, whose points are the ultrafilters of A, with clopen subsets corresponding to elements of A. Conversely, given a profinite space X, the set A(X) of clopen subsets of X forms a Boolean algebra. This correspondence produces a natural isomorphism between Aut(A) and Aut(S(A)). In practice we will often find it convenient to abuse notation and treat elements of A as subsets of S(A), identifying α ∈ A with S(α) := {p ∈ S(A) | α ∈ p} ∈ A(S(A)). Given α ∈ A and p ∈ S(A), the expressions ‘α ∈ p’ and ‘p ∈ α’ can therefore be taken to be synonymous. A partition P of α ∈ A is a finite subset of A such that the join of P is α and the meet of any two distinct elements of P is 0; a partition of A is just a partition of ∞ in A. Definition 5.10. Let G be a topological group acting on a set Ω. Say that the action of G on Ω is smooth if every point stabiliser is open; this implies that for every open compact subgroup U of G, the orbits of U on Ω are all finite. Note that if the action is smooth, then G is orbit-equivalent to any of its dense subgroups. 39 The following fact shows the relevance of smooth actions for t.d.l.c. groups: Lemma 5.11. Let G be a t.d.l.c. group, let X be a profinite space and A a Boolean algebra. (i) If G acts on X by homeomorphisms, and if the G-action is continuous with respect to the topology of uniform convergence, then the corresponding G-action on the Boolean algebra of clopen subsets of X is smooth. (ii) If G acts on A by automorphisms, and if the G-action is smooth, then the corresponding G-action on the Stone space S(A) is continuous with respect to the topology of uniform convergence. In particular, the action map (g, x) 7→ gx is a continuous map from G × S(A) to S(A). Proof. Let U ∈ B(G) and let X = X1 ∪ · · · ∪ Xn be a clopen partition of S(A). If G acts on X by homeomorphisms, and if the G-action is continuous with respect to the topology of uniform convergence, then for any net (gα ) converging to the identity in G, for all i and each x ∈ Xi , we have gα (x) ∈ Xi for all T sufficiently large α. Therefore gα eventually belongs to the common stabiliser H = ni=1 GXi , which is thus an open subgroup of G. It follows that H ∩ U is open in G, and so it therefore UXi = U ∩ GXi . Thus (i) holds. Assume now that G acts smoothly on A by automorphisms and set X = S(A). Since Tn the action is smooth, the common stabiliser V = i=1 UXi is open in U . Thus any net (gα ) converging to the identity in G eventually belongs to V and thus stabilises each Xi . Thus (gα ) uniformly converges to the identity in the space of homeomorphisms of X. In particular the action of G on S(A) is jointly continuous (see [16, Chapter 7]). This proves (ii). As before, let G be a group acting on a set Ω. Given X ⊆ Ω, the rigid stabiliser of X is the subgroup ristG (X) := {g ∈ G | gx = x for all x ∈ Ω r X}. Similarly, if G acts on a Boolean algebra A, then given α ∈ A we define ristG (α) := {g ∈ G | gβ = β for all β ≤ α⊥ }. (Equivalently, one could define ristG (α) to be the rigid stabiliser of the subset of S(A) corresponding to α.) Notice that if A is a subalgebra of LC(G) or of LD(G), then QCG (α) ≤ ristG (α⊥ ) for all α ∈ A. 40 Lemma 5.12. Let G be a t.d.l.c. group acting smoothly on a Boolean algebra A and let υ ⊆ S(A). Then ristG (υ) is closed. Proof. It suffices to show that Gp is closed for all p ∈ S(A). This is immediate from Lemma 5.11. Related to the notion of rigid stabilisers is that of (weakly, locally) decomposable actions. The centraliser and local decomposition lattices account for all faithful actions of this kind of a t.d.l.c. group (if any such actions exist). Definition 5.13. Let (G, U ) be a Hecke pair such that G acts on a Boolean algebra A, with kernel K. Say the action is weakly decomposable if, for every α ∈ A r {0}, the U -orbit of α is finite and ristG (α)/K is non-trivial. Note that the fact that U has finite orbits ensures that U K/K is residually finite. Moreover, taking α = ∞, we see that G/K must be non-trivial. Say the action is locally decomposable if it is weakly decomposable and if, for all α ∈ A, the product ristU (α)ristU (α⊥ ) has finite index in U . Given an action of G by homeomorphisms on a profinite space X, we say the action is weakly or locally decomposable if the action of G on the algebra of clopen subsets of X is weakly or locally decomposable respectively. Say a Hecke pair (G, U ) is faithful weakly decomposable if QZ(G) = 1 and G admits a faithful weakly decomposable action on a Boolean algebra. (We require that QZ(G) = 1 to avoid degenerate situations, such as Hecke pairs of the form (G, 1).) A property closed related to the weakly decomposable property has been considered by R. Möller and J. Vonk ([20]), referred to in [20] as property H. In particular, the authors give a criterion for obtaining non-discrete topologically simple t.d.l.c. groups, of a kind that we will study further in [8]. As can easily be seen from the definitions, Property H and weakly decomposable are related as follows: Proposition 5.14. Let G be a group of automorphisms of a thick locally finite tree T , let v be a vertex of T and let U = Gv . Then (G, U ) is a Hecke pair, and the action of G on T has property H in the sense of [20] if and only if the action of G on the space of ends of T is weakly decomposable. Here are some basic properties of weakly decomposable actions. We state them for actions on profinite spaces; of course these can be translated via the Stone correspondence into corresponding statements for actions on Boolean algebras. Lemma 5.15. Let (G, U ) be a Hecke pair such that G acts by homeomorphisms on a profinite space X. Assume that the action is weakly decomposable with kernel K. Then: (i) X has no isolated point. 41 (ii) If QZ(G/K) = 1, then for every non-empty clopen set α ⊆ X, we have [ristG (α)] > [K]. (iii) Suppose QZ(G/K) = 1. Then for any two clopen subsets α, β, we have α 6= β if and only if [ristG (α)] 6= [ristG (β)]. Proof. There is no loss of generality in replacing (G, U ) by the Hecke pair (G/K, U K/K), so we may assume that the action is faithful. Since the action is weakly decomposable, it is clear that |X| > 1. (i) If a point x ∈ X is isolated, its complement is a non-empty clopen set whose rigid stabiliser is trivial, contradicting the assumption that the action is weakly decomposable. (ii) Let α ⊆ X be a non-empty clopen subset. Then Gα contains a finite index subgroup V of U , and contains ristG (α) as a normal subgroup; by assumption ristG (α) is non-trivial. Since QZ(G) = 1, it follows from Lemma 3.2 that ristU (α) is infinite, so [ristU (α)] > 0. (iii) Assume that α 6= β. Upon swapping α and β, we may assume that α 6≤ β. Then α∧β ⊥ 6= 0 so that ristU (α∧β ⊥ ) is an infinite bounded locally normal subgroup contained in ristU (α). On the other hand, ristU (α ∧ β ⊥ ) ∩ ristU (β) = 1. Hence [ristG (α)] 6= [ristG (β)]. 5.3 Faithful weakly decomposable groups We now study the rigid stabilisers of the G-action on the centraliser and local decomposition lattices. Of particular interest is the case of faithful actions of G. In general, if a group G acts on a Boolean algebra A with an invariant subalgebra A′ , then ristG (α) could be larger when defined in terms of the action on A′ than it is when defined in terms of the action on A. However, this ambiguity does not arise in the case of faithful actions on subalgebras of the centraliser lattice: the rigid stabilisers turn out to be exactly the corresponding elements of the global centraliser lattice discussed earlier. Proposition 5.16. Let (G, U ) be a locally C-stable Hecke pair and let A be a G-invariant subalgebra of LC(G, U ) on which G acts faithfully. Then QZ(G) = 1. Moreover, the following hold. (i) For each α ∈ A, we have ristG (α) = QC2G (α) = CG (QCG (α)) = QCG (α⊥ ). (ii) If G is a topological group and U is open in G, then the action of G on A is smooth. (iii) For each α ∈ A, we have α = [ristG (α)]. (iv) The action of G on A is weakly decomposable, and if A is a subalgebra of LD(G, U ) the action is locally decomposable. 42 Proof. Observe that for any Hecke pair (G, U ), the quasi-centre of G fixes every element of LN (G, U ) by conjugation. Thus to have a faithful action on a subalgebra of LC(G, U ), we must have QZ(G) = 1. Note also that U has finite orbits on A. (i) We see that QCG (α⊥ ) ≤ ristG (α) and QCG (α) ≤ ristG (α⊥ ). In particular, ristG (α) centralises QCG (α), so ristG (α) ≤ CG (QCG (α)). By Proposition 5.4, in fact CG (QCG (α)) = QC2G (α) = QCG (α⊥ ). Hence ristG (α) = CG (QCG (α)) = QC2G (α). This proves (i). (ii) For each α ∈ A, then ristG (α) is closed by (i), so Gα = NG (ristG (α)) is closed. Since moreover |U : Uα | is finite, we conclude that Uα is open in U , and hence Gα is open in G. 2 (iii) Follows from (i) and the fact that α = α⊥ , see Theorem 5.2(i). (iv) It is clear from (iii) that the action is weakly decomposable. If A is a subalgebra of LD(G, U ), note that for all α ∈ A there are representatives K of α and L of α⊥ such that KL has finite index in U . Consequently ristG (α)ristG (α⊥ ) contains a finite index subgroup of U . Corollary 5.17. Let (G, U ) be a locally C-stable Hecke pair and let A be a G-invariant subalgebra of LC(G, U ) on which G acts faithfully. Let K be a locally normal subgroup 2 of G, and let α = [K]⊥ . Suppose α ∈ A. Then the set of points in S(A) moved by K forms an open dense subset of α. Proof. Let υ be the set of points in S(A) moved by K. We have K ≤ ristG (α) by Proposition 5.4 and Proposition 5.16(i), which ensures that υ ⊆ α. Suppose υ is not dense in α. Then υ is contained in a proper clopen subset β of α. But then K ≤ ristG (β), so [K] ≤ [ristG (β)] = β < α, a contradiction. A Hecke pair (G, U ) with trivial quasi-centre that admits a faithful weakly decomposable action is locally C-stable. Moreover, the faithful locally or weakly decomposable actions are controlled by LD(G, U ) and LC(G, U ) respectively. Theorem 5.18. Let (G, U ) be a Hecke pair. (i) Suppose that G has a faithful weakly decomposable action on some Boolean algebra A. Then the following are equivalent: (a) QZ(G) = 1; (b) The action of U is weakly decomposable, and every non-trivial normal subgroup of G has non-trivial intersection with U ; 43 (c) G is locally C-stable, and A is G-equivariantly isomorphic to a subalgebra of LC(G, U ) (indeed, the set of rigid stabilisers of A form a subalgebra of the global centraliser lattice). (ii) Every G-equivalence class of faithful locally decomposable actions of G (if there are any) occurs as the action of G on a subalgebra of LD(G, U ). We begin the proof of Theorem 5.18 with two lemmas. Lemma 5.19. Let A, N be subgroups of a group G. Assume that N is normal, and contains an element x ∈ N such that [A, xAx−1 ] = 1. Then N contains [A, A]. Proof. Let a, b, c ∈ A. Since a and b commute with xcx−1 , we have [a, b] = [a, bxcx−1 ]. Setting c = b−1 , we infer that [a, b] = [a, [b, x]], which belongs to N since N is normal. Lemma 5.20. Let U be a residually finite group acting faithfully on an atomless Boolean algebra A. Let K be a non-trivial normal subgroup of U and let α ∈ A r {0} be such that gα ∧ α = 0 for some g ∈ K. (i) If K is abelian, then ristU (α) is abelian. (ii) If K is finite, then ristU (α) is finite-by-abelian (and hence centre-by-finite). In either case, there exists β ∈ A such that 0 < β ≤ α and ristU (β) = 1, so the action of U on A is not weakly decomposable. Proof. We see that K ∩ ristU (α) and K ∩ ristU (gα) are conjugate subgroups of K, and also that ristU (α)∩ristU (gα) = 1 since U acts faithfully on A. Moreover, by Lemma 5.19, K ∩ ristU (α) contains R = [ristU (α), ristU (α)]. Suppose K is abelian. Then the conjugation action of K on its subgroups is trivial, so K ∩ristU (α) = K ∩ristU (gα); since ristU (α)∩ristU (gα) = 1, it follows that K ∩ristU (α) = ristK (α) = 1. Thus R = [ristU (α), ristU (α)] is trivial and ristU (α) is abelian. Suppose instead that K is finite. In particular, R = [ristU (α), ristU (α)] is finite, so ristU (α) has a finite index subgroup Z such that Z ∩ R = 1. We see that [ristU (α), Z] ≤ Z ∩ R = 1, so Z is central in ristU (α) and hence ristU (α) is centre-by-finite. Since A is atomless, there is a strictly descending sequence (αi )i∈N of non-zero elements of A such that α0 = α. If ristU (α) is finite, then there exist i, j ∈ N with i < j such that ristU (αi ) = ristU (αj ), and thus ristU (β) is trivial, where β = αi ∧ α⊥ j . Thus we may suppose that ristU (α) is infinite. Let Z be a central subgroup of ristU (α) of finite index. Since U acts faithfully on A, there must be some β ∈ A r {0} and z ∈ Z such that zβ ∧ β = 0; it follows that β ≤ α, since ristU (α) fixes α⊥ pointwise as a subspace of S(A). Now ristU (β) and ristU (zβ) are subgroups of ristU (α) that are Z-conjugate, so ristU (β) = ristU (zβ), and hence ristU (β) = 1 since zβ ∧ β = 0. 44 Proof of Theorem 5.18. (i) Let A be a Boolean algebra equipped with a faithful weakly decomposable action of G. Then A is atomless by Lemma 5.15. We also see that U is residually finite, since U has finite orbits on A. Suppose QZ(G) = 1. Then given a non-trivial subgroup K of G such that |U : NU (K)| is finite, then K ∩ U is infinite. In particular, ristU (α) is infinite for every α ∈ A r {0}, so the action of V on A is weakly decomposable, for every subgroup V of G commensurate with U . Hence (a) implies (b). Moreover, by Lemma 5.20, V has no non-trivial finite or abelian normal subgroups. Hence G is locally C-stable, by Theorem 3.19. Let α ∈ A and let β = α⊥ . Then ristG (α) and ristG (β) commute. Let x ∈ CG (ristG (β)). We claim that x ∈ ristG (α), in other words, the set υ of points moved by x is a subset of α. If not, then υ ∩ β contains some γ ∈ A, since υ is an open subset of S(A). Indeed there is some δ ∈ A such that 0 < δ ≤ γ and xδ 6= δ. The fact that the action is weakly decomposable ensures that ristG (δ) and ristG (xδ) are not locally equivalent by Lemma 5.15(iii), so x does not commensurate ristG (δ), and in particular x 6∈ QCG (ristG (δ)). Since ristG (δ) ≤ ristG (β), we have a contradiction. This shows that ristG (α) = CG (ristG (α⊥ )). (5) By Proposition 5.4, ristG (α) is an element of the global centraliser lattice of G. We therefore have a map θ : A → LC(G, U ); θ(α) = [ristG (α)]. By Lemma 5.15, θ is injective, and (5) shows that θ is compatible with complementation; θ is also compatible with meets. Hence θ is a homomorphism of Boolean algebras. From the above argument, we conclude that (a) implies (b) and (c). In the other direction, it is clear that (c) implies (a). Suppose instead that (b) holds. By Lemma 5.20, U has no non-trivial virtually abelian normal subgroups. This implies that the quasi-centre of U is trivial, in other words, QZ(G) ∩ U = 1. Since every non-trivial normal subgroup of G intersects U non-trivially, we conclude that QZ(G) = 1. Hence (b) implies (a). This completes the proof of (i). (ii) If the action of G on A is locally decomposable, then ristU (α) × ristU (β) has finite index in U , so ristU (α) is an almost direct factor of U for all α ∈ A. So in this case θ(A) is contained in LD(G, U ). Corollary 5.21. Let G be a t.d.l.c. group with QZ(G) = 1 and let U be an open compact subgroup of G. Then every faithful weakly decomposable action of G (if there are any) on a profinite space is continuous with respect to the topology of uniform convergence. Proof. By Theorem 5.18, G is locally C-stable and by Proposition 5.16, the action of G on LC(G) is smooth. The conclusion now follows from Theorem 5.18 and Lemma 5.11. 45 Proof of Theorem II. (i) This follows from Proposition 5.16. (ii) By Theorem 5.18 (i), there is a G-equivariant embedding ρ of the algebra A of clopen subsets of X into LC(G). This embedding ρ then corresponds, via the contravariant functor provided by the Stone representation theorem, to a G-equivariant quotient map ρ∗ from S(LC(G)) to X. Another consequence of Theorem 5.18 is that if (G, U ) is locally C-stable and has a faithful action on its centraliser lattice, then both properties are inherited by subgroups with large normalisers. Proposition 5.22. Let (G, U ) be a faithful weakly decomposable Hecke pair. Let H be a locally normal subgroup of G. Then the Hecke pair (H, H ∩ U ) is locally C-stable and H has a faithful weakly decomposable action on a principal ideal of LC(G, U ); this ideal is H-equivariantly isomorphic to a subalgebra of LC(H, H ∩ U ). Proof. The existence of a faithful weakly decomposable action ensures that U is residually finite. By Proposition 5.16 and Theorem 5.18, (G, U ) is locally C-stable and has 2 a faithful weakly decomposable action on A = LC(G, U ). Let α = [H]⊥ and let I be the ideal of A generated by α. By Corollary 5.17, the set of points in S(A) moved by H forms an open dense subset of α. Since G acts faithfully on A, it follows that H acts faithfully on I. Since I is a principal ideal, it is a Boolean algebra in its own right. We have QZ(H) := QZ(H, H ∩ U ) = 1 by Theorem 3.19. Given 0 < β ∈ I, 3 then ristG (β) = QCG (β ⊥ ). Since β ⊥ > α⊥ = α⊥ , we see that [ristG (β)] > [QCG (H)]. If ristH (β) = 1, then 0 = [ristG (β) ∩ H] = [ristG (β)] ∧ [H] = β ∧ [H]. Hence [H] ≤ β ⊥ 3 so that α ≤ β ⊥ = β ⊥ . Since β ≤ α, we obtain β = 0, a contradiction. Thus the action of H on I is weakly decomposable. Hence by Theorem 5.18, H is locally C-stable and I is H-equivariantly isomorphic to a subalgebra of LC(H, H ∩ U ). Corollary 5.23. Let (G, U ) be a faithful weakly decomposable Hecke pair and let H be a subgroup of G. Suppose there is a sequence of subgroups H = H1 ≤ H2 ≤ · · · ≤ Hn = G such that |Hi+1 ∩ U : NHi+1 (Hi ) ∩ U | is finite for 1 ≤ i < n. Then either H = 1 or (H, H ∩ U ) is faithful weakly decomposable. In particular, QZ(H) = 1. Proof. Follows from Proposition 5.22 by induction. 46 5.4 Topologically free actions For groups acting on topological spaces, there is a natural notion of actions that are in some sense the opposite of weakly decomposable: Definition 5.24. Let G be a group acting faithfully on a topological space X. The action is locally faithful at x ∈ X if for every neighbourhood O of x, the pointwise stabiliser of O in G is trivial. The action is topologically free if it is locally faithful at every point in X. Let (G, U ) be a Hecke pair and let G act by homeomorphisms on a profinite space X, such that U has finite orbits on the set of clopen subsets of X. Clearly, if the action of G on X is weakly decomposable, then it is not locally faithful at any point. In general, the action of (G, U ) on X may be neither weakly decomposable nor locally faithful at any point, even if the action is minimal. For example, given a (faithful, minimal) weakly decomposable action of (G, U ) on X, then (G × Z/2Z, U ) has a (faithful, minimal) action on the disjoint union of two copies of X that is not weakly decomposable, but has no locally faithful point: this is achieved by letting G act identically on each copy of X and Z/2Z swap the two copies of X. If G admits a non-inner automorphism φ of order 2, then one could construct a similar example of an action of (H, U ), where this time H = G ⋊ hφi has trivial quasi-centre with respect to U . As a concrete example, let T be a regular rooted tree, let G be the derived subgroup of Aut(T ), and let X be the set of ends of T . Then (G, G) is a Hecke pair; the G-action on X is faithful, minimal and weakly decomposable, and the G-orbit of any clopen subset is finite. The outer automorphism group Out(G) contains (and is in fact equal to) Aut(T )/G, which is an infinite direct product of cyclic groups of order 2. In particular Out(G) contains many involutions, which can be lifted to involutions in Aut(G). However, with a stronger restriction on the group structure of U , we can ensure the existence of locally faithful points. This property may be regarded as the antithesis of the faithful weakly decomposable property. The following definition and proposition are inspired by [21], which uses similar methods to comprehend the actions of free groups on rooted trees. Definition 5.25. Let U be group. Say U has the virtually normal intersection property (VNIP) if for any two non-trivial subgroups K, L of U such that NU (K) and NU (L) have finite index in U , the intersection K ∩ L is infinite. If (G, U ) is locally C-stable, one sees that U has VNIP if and only if LC(G, U ) is trivial. Proposition 5.26. Let (G, U ) be a Hecke pair, let X be a profinite space on which G acts faithfully by homeomorphisms, let A be the Boolean algebra of clopen subsets of X, and suppose that U has finite orbits on A. Suppose that QZ(G) = 1 and that U has VNIP. Then the set of points in X at which G acts locally faithfully is non-empty and closed. In particular, if the action of G on X is minimal, then it is topologically free. 47 Proof. Let Y be the set of points at which G acts locally faithfully. We see from the definition that X r Y is open and hence Y is closed, since if G does not act locally faithfully at some p ∈ X, then there is an open neighbourhood O of p such that the pointwise stabiliser of O is non-trivial, and hence G does not act locally faithfully at any point in O. Suppose Y = ∅. Then for each p ∈ X, we can find αp ∈ A such that p ∈ αp and ristG (α⊥ p ) )) has is non-trivial. Since U has finite orbits on A, the normaliser V = NU (ristG (α⊥ p ) to be infinite. Since finite index in U ; the fact that QZ(G) = 1 then forces ristV (α⊥ pW every point in X is covered by some αp , by compactness weThave ni=1 αpi = ∞ for some p1 , . . . , pn ∈ X. Since U has VNIP, the intersection K = ni=1 ristU (α⊥ pi ) is non-trivial. W V But ni=1 αpi = ∞, in other words ni=1 α⊥ = 0, so K acts trivially on A, contradicting pi the hypothesis that G acts faithfully on A. Hence Y must be non-empty. Clearly Y is G-invariant, so if the action of G on X is minimal, then Y = X. 6 Some radicals of locally compact groups 6.1 The quasi-hypercentre In previous sections, we found it useful to assume that the groups under consideration have trivial quasi-centre. Of course, there is no reason in general for a t.d.l.c. group to have this property; more interesting, however, is the question of which locally compact groups G have a non-trivial Hausdorff quotient G/K such that QZ(G/K) = 1. To address this issue, we need to introduce the following definitions. Definition 6.1. Let G be a locally compact group. A subgroup K of G is quasihypercentral in G if, whenever N is a closed normal subgroup of G such that K 6≤ N , then KN/N has non-trivial intersection with QZ(G/N ). The quasi-hypercentre of G, denoted by QZ∞ (G), is the intersection of all closed normal subgroups N of G such that QZ(G/N ) = 1. By Lemma 3.1, we have QZ(G) ≤ QZ∞ (G). If moreover QZ(G) is discrete, then Lemma 3.1 ensures that QZ(G/QZ(G)) = 1 so that QZ(G) = QZ∞ (G) in this case. The main properties of the quasi-hypercentre are collected in the following. Theorem 6.2. Let G be a locally compact group. Then: (i) QZ∞ (G) is a closed characteristic subgroup. (ii) The quotient G/QZ∞ (G) has trivial quasi-centre. In particular QZ∞ (G) is the unique minimal closed normal subgroup of G with this property. 48 (iii) QZ∞ (G) is the unique largest quasi-hypercentral subgroup of G. Proof of Theorem 6.2. (i) is clear by the definition of the quasi-hypercentre. (ii) Set H = QZ∞ (G) and let N be the set of all closed normal subgroups N of G such that QZ(G/N ) = 1. Let x ∈ G, and suppose xH ∈ QZ(G/H). For any N ∈ N , the group G/N is a quotient of G/H, so that xN ∈ QZ(G/N ) by Lemma T 3.1(iii). Since QZ(G/N ) = 1 by the definition of N , we infer that x ∈ N . Thus x ∈ N ∈N N = H. In other words G/H has trivial quasi-centre, as desired. (iii) Since QZ(G/H) = 1 by part (ii), it follows that every quasi-hypercentral subgroup of G is contained in H. It remains to show that H itself is quasi-hypercentral. Let M be a closed normal subgroup of G not containing H. Then N = H ∩ M does not contain H. Therefore, by the definition of H, the quasi-centre of G/N is non-trivial and, hence, there is some element x of G such that x 6∈ N and xN ∈ QZ(G/N ). Since QZ(G/H) = 1 by part (ii), in fact we have x ∈ H r N = H r M . Since N ≤ M , the group G/M is a quotient of G/N , and we deduce from Lemma 3.1(iii) that x is an element of H whose image in G/M is non-trivial and contained in QZ(G/M ). We conclude that H is quasi-hypercentral in G, as desired. Recall that the quasi-centre QZ(G) is characteristic but need not be closed. Theorem 6.2 ensures that if QZ(G) is non-trivial, then QZ∞ (G) is a non-trivial closed characteristic subgroup (that could be the whole of G). 6.2 Relation with the quasi-hypercentre of subgroups We now specialise to t.d.l.c. groups. The goal is to establish the following stability properties of the quasi-hypercentre by passage to subgroups. Proposition 6.3. Let G be a t.d.l.c. group and H be a subgroup of G. (i) If H is closed and normal in G, then QZ∞ (H) ≥ QZ∞ (G) ∩ H. (ii) If H is open in G, then QZ∞ (H) = QZ∞ (G) ∩ H. The proof of that proposition requires some preparations and will be given at the end of the subsection. We shall need additional definitions. Recall that given two normal subgroups K ≥ L of an abstract group G, the centraliser of K modulo L is defined by CG (K/L) = {g ∈ G | [g, K] ⊂ L}, where we define [u, g] = ugu−1 g −1 . The centraliser CG (K/L) is a normal subgroup of G, since it coincides with the preimage in G of the centraliser CG/L (K/L). We shall 49 need to quasify this notion as follows. (Recall that B(G) denotes the set of open compact subgroups of G.) Definition 6.4. Let G be a t.d.l.c. group and let K and L be closed subgroups. The quasi-centraliser of K modulo L is defined by QCG (K/L) = {g ∈ G | there is U ∈ B(G) such that [g, U ∩ K] ⊂ L.} The following shows that QCG (K/L) is a normal subgroup of G provided that L is normal in K and that K and L are both ‘quasi-normal’ in G: Lemma 6.5. Let G be a t.d.l.c. group and let K and L be non-trivial subgroups of G such that L E K. Assume that gKg −1 ∈ [K] and gLg −1 ∈ [L] for all g ∈ G. Then: (i) QCG (K/L) = QCG (K ′ /L′ ) for all K ′ ∈ [K] and L′ ∈ [L]. (ii) QCG (K/L) is a non-trivial normal subgroup of G. Proof. (i) It is clear from the definition that QCG (K/L) is invariant under replacing K with a subgroup of G that is locally equivalent to K. Let M = V ∩ L for some open compact subgroup V of G. Certainly QCG (K/M ) ⊆ QCG (K/L). On the other hand, given g ∈ QCG (K/L) and an open compact subgroup U of G such that [u, g] ∈ L for all u ∈ U ∩ K, there is an open subgroup W of V such that W gW g−1 is a subset of V . Thus for all w ∈ W ∩ K we have [w, g] ∈ V ∩ L = M , so QCG (K/M ) = QCG (K/L). Hence QCG (K/L) is invariant under replacing L with a subgroup of G that is locally equivalent to L. This proves (i). (ii) We see that L ≤ QCG (K/L), since [K, L] ≤ L, so QCG (K/L) is non-trivial. Let g, h ∈ QCG (K/L) and let U and V be open compact subgroups of G such that [u, g] ∈ L for all u ∈ U ∩ K and [v, h] ∈ L for all v ∈ V ∩ K. Then for u ∈ U ∩ V we have [u, g−1 h] = ug −1 hu−1 h−1 g = g −1 [g, u][u, h]g ∈ g −1 Lg. Since g−1 Lg ∈ [L] by hypothesis, we deduce from (i) that g −1 h ∈ QCG (K/g−1 Lg) = QCG (K/L), so QCG (K/L) is a subgroup of G. By definition, we have gQCG (K/L)g−1 = QCG (gKg−1 /gLg −1 ) for all g ∈ G. Therefore QCG (K/L) is normal in G by (i). We note the following facts separately as they will be used again later. 50 Lemma 6.6. Let G be a t.d.l.c. group. Suppose that to every open compact subgroup U we have assigned a closed normal subgroup R(U ), such that the following statements hold: (a) Given two open compact subgroups U and V of G, then R(U ) is commensurate with R(V ). If V = gU g −1 then R(V ) = gR(U )g −1 . (b) Given an open compact subgroup U of G, then the quotient U/R(U ) has trivial quasicentre. Let U ∈ B(G) and set K = QCG (U/R(U )). Then: (i) K = QCG (V /R(V )) for any V ∈ B(G). (ii) K ∩ V = R(V ) for every V ∈ B(G). (iii) K is a closed normal subgroup of G. (iv) QZ(G/K) = 1. Proof. (i) Condition (a) ensures that the set {R(U ) | U ∈ B(G)} lies in a single commensurability class of subgroups of G, so that R(U ) is a compact locally normal subgroup of G such that [R(U )] does not depend on U . It follows from Lemma 6.5 that K is normal in G and does not depend on the choice of U . Thus (i) holds. (ii) By the definition of K, we see that K ∩ U consists of those elements of U whose image in U/R(U ) is quasi-central. By condition (b), we thus have K ∩ U = R(U ). Hence (ii) follows from (i). (iii) We have already noted that K is normal in G as a consequence of Lemma 6.5. Since K ∩ U = R(U ) is closed in U by (ii), it follows that K is closed in G. (iv) Let x ∈ G such that xK ∈ QZ(G/K); then x centralises V K/K for some open compact subgroup V of G, but this ensures in turn that x ∈ QCG (V /R(V )) = K by (ii), so xK is trivial. Hence QZ(G/K) = 1. Proof of Proposition 6.3. (i) We see that the quasi-hypercentre of a t.d.l.c. group is a characteristic subgroup, so QZ∞ (H) is normal in G. Let K = CG (H/QZ∞ (H)) be the centraliser of H modulo QZ∞ (H). Since H and QZ∞ (H) are closed normal subgroups of G, so is K. Moreover K ∩ H = QZ∞ (H), since H/QZ∞ (H) has trivial quasi-centre. Consequently the quotient G/K of G has a normal subgroup HK/K ∼ = H/QZ∞ (H) whose quasi-centre is trivial by Theorem 6.2. Since QZ(G/K) ∩ HK/K ≤ QZ(HK/K) = 1, 51 we infer that QZ(G/K) is a normal subgroup of G/K with trivial intersection with HK/K. Therefore HK/K and QZ(G/K) commute. On the other hand the definition of K implies that HK/K has trivial centraliser in G/K. It follows that QZ(G/K) = 1. Therefore K ≥ QZ∞ (G), and thus QZ∞ (H) = K ∩ H ≥ QZ∞ (G) ∩ H. (ii) Let Q = QZ∞ (G). Note that H/(Q ∩ H) ∼ = HQ/Q, and HQ/Q is an open subgroup of G/Q; thus QZ(HQ/Q) ≤ QZ(G/Q) = 1, so H/(Q ∩ H) has trivial quasi-centre. By Theorem 6.2, we conclude that Q ∩ H ≥ QZ∞ (H). Combining this with part (i), we see that QZ∞ (O) = QZ∞ (G) ∩ O in the case that O is an open normal subgroup of G. Let now V ≤ U be compact open subgroups of G. Let O be the core of V in U , so that O is an open normal subgroup of both V and U . By the preceding paragraph, we have QZ∞ (U ) ∩ O = QZ∞ (O) = QZ∞ (V ) ∩ O. In particular QZ∞ (U ) and QZ∞ (V ) are commensurate. This implies that for all U, V ∈ B(G), the groups QZ∞ (U ) and QZ∞ (V ) are commensurate. Define R(U ) := QZ∞ (U ) for every profinite group U . We have just checked that condition (a) from Lemma 6.6 is satisfied, and so is condition (b) by Theorem 6.2. Hence, given V ∈ B(G), the group K = QCG (V /QZ∞ (V )) is a closed normal subgroup of G that does not depend on the choice of V . Moreover Lemma 6.6 ensures that QZ(G/K) = 1, so K ≥ Q. Also K ∩ V = QZ∞ (V ) ≤ Q ∩ V , where the latter containment was observed in the first paragraph above. It follows that Q contains an open subgroup of K, so K/Q is a discrete normal subgroup of G/Q; since QZ(G/Q) = 1, this forces K = Q by Lemma 3.1. This shows that QZ∞ (G) = QCG (V /QZ∞ (V )) for any open compact subgroup V of G. In particular, if H is any open subgroup of G, we may replace V by V ∩ H and deduce that QZ∞ (G) ∩ H = QCG (V /QZ∞ (V )) ∩ H = QCH (V /QZ∞ (V )) = QZ∞ (H). This confirms (ii). Remark 6.7. We have shown that the local equivalence class of the quasi-hypercentre is unchanged by passing to an open subgroup. In particular for any open subgroup H of G and any V ∈ B(H), the group QZ∞ (H) is locally equivalent to QZ∞ (V ), so we have QZ∞ (G) = QCG (V /QZ∞ (V )) = QCG (H/QZ∞ (H)). Remark 6.8. In general, the quasi-hypercentre of an arbitrary closed subgroup of a t.d.l.c. group bears no relation to that of the group itself. For instance, any profinite group H can be embedded as a closed subgroup of the Cartesian product G of its finite continuous images, in which case QZ∞ (G) = G since QZ(G) is dense in G. On the other 52 hand H can be embedded in a semidirect product K⋊H (where K is an infinite Cartesian product of copies of the free profinite group on 2 generators, for instance, and H permutes the terms of this product) of such a form that QZ∞ (K ⋊ H) = QZ(K ⋊ H) = 1. The following question is natural. Question 6.9. If H is a closed normal subgroup of G contained in QZ∞ (G), does it follow that H is quasi-hypercentral in G? We can at least say that H is quasi-hypercentral in itself; in other words, given any proper closed normal subgroup K of H, then QZ(H/K) is non-trivial. 6.3 Other radicals We have seen that locally compact groups admit a unique largest quotient with trivial quasi-centre. In a similar manner, for some classes of profinite group there is a unique largest quotient that has no non-trivial compact locally normal subgroups in the given class. In particular, a motivation for eliminating virtually abelian locally normal subgroups in this way is the centraliser lattice described in Section 5.1. Definition 6.10. Let C be a class of profinite groups. Say C is stable if the following conditions hold: (a) C contains all abelian profinite groups, as well as all finite simple groups; (b) Given a group U ∈ C and a closed normal subgroup K of U , then K ∈ C and U/K ∈ C; (c) Given a profinite group U that is a (possibly non-direct) product of finitely many closed normal C-subgroups, then U ∈ C; (d) C is stable under isomorphisms, i.e. it contains the whole isomorphism class of each of its elements. Given a profinite group U , write C(U ) for the closed subgroup generated by all normal C-subgroups of U . Given a stable class C, a t.d.l.c. group G is C-semisimple if QZ(G) = 1 and the only locally normal subgroup of G belonging to C is the identity subgroup. For a profinite group U , a subgroup K of U is called C-regular in U if for every closed normal subgroup L of U not containing K, the image of K in U/L contains a non-trivial locally normal C-subgroup of U/L. For a t.d.l.c. group G and closed subgroup H, say H is C-regular in G if U ∩ H is C-regular in U for all open compact subgroups U of G. 53 Write [A] for the smallest stable class; note that by Fitting’s Theorem, all groups in this class are virtually nilpotent. However, the class of [A]-regular t.d.l.c. groups is larger than just the locally [A] groups; for example, all t.d.l.c. groups with virtually soluble open compact subgroups are [A]-regular. In a recent paper ([25, Theorem 1.11]), P. Wesolek has shown that every second-countable [A]-regular t.d.l.c. group can be constructed from profinite groups and countable discrete groups by a (possibly transfinite) sequence of extensions and countable increasing unions. On the other hand, we shall see in Proposition 6.17 below that a t.d.l.c. group is [A]-semisimple if and only if it is locally C-stable with trivial quasi-centre. Another example of a stable class (within the class of profinite groups) is the class of profinite groups that are topologically generated by pronilpotent normal subgroups and quasisimple subnormal subgroups; for this class C, then C(U ) is the generalised proFitting subgroup of U . The regular and semisimple classes associated to this class are discussed in [22]. Here is the main theorem for this section. Theorem 6.11. Let G be a t.d.l.c. group and let C be a stable class of topological groups. Then G has a uniquely defined closed normal subgroup RC (G), the C-regular radical of G, that is characterised by either of the following properties: (i) RC (G) is the unique largest locally normal subgroup of G that is C-regular in G; (ii) G/RC (G) is C-semisimple, and given any closed normal subgroup N of G such that G/N is C-semisimple, then N ≥ RC (G). The proof will be given at the end of the section. The following classical fact is well known. Lemma 6.12 (Dietzmann’s Lemma). Let G be a group and Σ be a finite subset consisting of torsion elements. If Σ is invariant under conjugation, then hΣi is finite. Proof. See [11] or [18, p. 154]. For the remainder of this section, C is a stable class of profinite groups. We need to check that the local and global definitions of C-regularity are not in conflict; this will be ensured by part (v) of the following lemma. Lemma 6.13. Let U be a profinite group. (i) Suppose that C(U ) = 1. Then U is C-semisimple. 54 (ii) Let N be the set of all closed normal subgroups N of U such that U/N is Csemisimple, and define K = R(U ) to be the intersection of N . Then U/K is C-semisimple. (iii) Let N be a non-trivial closed normal subgroup of U such that N does not contain any non-trivial closed normal C-subgroups of U . Then U/CU (N ) is a non-trivial C-semisimple image of U . (iv) Let V ≥ K ≥ L be closed normal subgroups of U and suppose K is C-regular in U . Then L is C-regular in U and K is C-regular in V . (v) Let K be a closed normal subgroup of U , let V be an open subgroup of U and let L ≤ K be a closed normal subgroup of U that has finite index in K. Then the following are equivalent: (a) K is C-regular in U ; (b) L is C-regular in U ; (c) K ∩ V is C-regular in V . Proof. (i) Let H be a non-trivial finite locally normal subgroup of U . Then by Dietzmann’s Lemma, H is contained in a finite non-trivial normal subgroup K of U ; there is then a characteristic subgroup M of K that is a direct power of a finite simple group, so that M is a normal C-subgroup of U . Thus the condition C(U ) = 1 ensures that every non-trivial locally normal subgroup of U is infinite. Let H be an infinite locally normal C-subgroup of U , and let V be a closed normal subgroup of U of finite index that is contained in NU (H). By intersecting with V , we may assume H ≤ V . Let K be the smallest closed normal subgroup of U containing H. Then K is topologically generated by the set of conjugates of H in U , which is a finite set of normal subgroups of K (since K ≤ V ), so K is a normal C-subgroup of U , contradicting the assumption that C(U ) = 1. It remains to show that QZ(U ) = 1. If not, then there is some open normal subgroup V of U such that CU (V ) > 1. Then CU (V ) is normal in U , hence infinite, so that Z(V ) = CU (V ) ∩ V is infinite as well. But then Z(V ) is a non-trivial abelian normal subgroup of U , so 1 < Z(V ) ≤ C(U ), a contradiction. (ii) We may assume K = 1. By (i) it suffices to show that C(U ) = 1. Let H be a non-trivial closed normal subgroup of U such that H ∈ C. Then there is some N ∈ N such that H 6≤ N . But then the image of H in U/N is a non-trivial normal C-subgroup, contradicting the hypothesis that U/N is C-semisimple. (iii) Let K = CU (N ). We must have Z(N ) = 1, since otherwise Z(N ) would be a non-trivial normal C-subgroup of U ; thus K ∩ N = 1. As a consequence, U/K has a normal subgroup N K/K isomorphic to N , and in particular U/K 6= 1; moreover, CU/K (N K/K) = 1. Let H/K be a non-trivial normal C-subgroup of U/K. Then H/K ∩ N K/K is non-trivial since N K/K has trivial centraliser. Since H > K, we then have L > 1 where L = H ∩ N . Now L is isomorphic to (H ∩ N K)/K, so L is a normal 55 C-subgroup of U contained in N , a contradiction. Thus no such subgroup H/K of U/K exists, so C(U/K) = 1; by part (i), it follows that U/K is C-semisimple. (iv) If L is not C-regular in U , then there is some closed normal subgroup M of U not containing L such that LM/M does not contain any non-trivial closed normal Csubgroups of U/M . It follows by part (iii) that there is a closed normal subgroup R of U containing M but not L such that U/R is C-semisimple. But then every C-regular closed normal subgroup of U must be contained in R, so K is not C-regular in U . This confirms that L is C-regular in U as soon as K is so. Let N be a closed normal C-subgroup of V that does not contain K, and let R be the core of N in U . Then KR/R contains a non-trivial locally normal C-subgroup S/R of U/R. Since S > R, there is some u ∈ U such that S 6≤ uN u−1 . Since S ≤ KR E U , we infer that u−1 Su ≤ KREV . Thus u−1 SuN/N is a non-trivial locally normal C-subgroup of V /N that is contained in KN/N . This confirms that K is C-regular in V . (v) We have already seen in (iv) that (a) implies (b). In the other direction, suppose that (b) holds and let M be a closed normal subgroup of U that does not contain K. If KM/M is finite, then it certainly contains a non-trivial normal C-subgroup of U/M . If KM/M is infinite, then LM/M is also infinite and so contains a non-trivial normal C-subgroup of U/M . Thus (a) and (b) are equivalent. Given the equivalence of (a) and (b), from now on we may assume K ≤ V . Suppose K is C-regular in one of U and V . Then K is C-regular in the core W of V in U by (iv). Let Y be either U or V . Given a closed normal C-subgroup R of Y not containing K, then R∩W is a normal C-subgroup of W not containing K. It follows that K(R∩W )/(R∩W ) contains a non-trivial locally normal C-subgroup S/(R ∩ W ) of W/(R ∩ W ), so KR/R contains the non-trivial locally normal C-subgroup SR/R of W/R; note that SR/R is also locally normal in Y /R. Thus K is C-regular in Y , so (a) and (c) are equivalent. Proof of Theorem 6.11. Assume for the moment that G is profinite. Let N be the set of all closed normal subgroups of G such that G/N is C-semisimple, and let K be the intersection of N . Then K satisfies property (ii) of the theorem by Lemma 6.13 (ii). It is clear from the construction that K contains every subgroup of G that is C-regular in G. Let N be a closed normal subgroup of G not containing K. If KN/N is abelian, then it is a locally normal C-subgroup of G/N . If KN/N is non-abelian, let L = CG (KN/N ) be the centraliser of KN modulo N . Note that L does not contain K, so by the definition of K, the quotient G/L cannot be C-semisimple. It then follows by Lemma 6.13 (iii) that KN/N contains a non-trivial closed normal C-subgroup of G/N . Thus K is C-regular in G. We have proved the theorem in the profinite case. Now let G be an arbitrary t.d.l.c. group. We have already obtained a C-regular radical for the compact subgroups of G. 56 Moreover, the C-regular radicals of the open compact subgroups satisfy the hypotheses of Lemma 6.6: this is clear from Lemma 6.13 (v) and the fact that the C-regular radical is the unique largest C-regular normal subgroup. Let U be an open compact subgroup of G and define R = RC (G) := QCG (U/RC (U )). Then by Lemma 6.6, R is a closed normal subgroup of G that does not depend on the choice of U , such that QZ(G/R) = 1 and R ∩ U = RC (U ). The open compact subgroups of G/R are of the form U R/R for U an open compact subgroup of G; U R/R is isomorphic to U/U ∩ R = U/RC (U ), so U R/R is C-semisimple. Hence G/R is C-semisimple; in particular RC (G/R) = 1. Let N be a closed normal subgroup of G such that G/N is C-semisimple. Then by the profinite case of the theorem, we have N ≥ RC (U ) for every open compact subgroup U of G; this ensures that RN/N is a discrete normal subgroup of G/N . But G/N has trivial quasi-centre, so all discrete normal subgroups are trivial. Thus N ≥ R. We have now shown that property (ii) holds, which is clearly a characterisation of the C-regular radical. Given an open compact subgroup V of G, then the V ∩ R is C-regular in V by the profinite case of the theorem. Hence R is C-regular in G. The fact that G/R is Csemisimple then ensures that R is the largest C-regular locally normal subgroup of G: given K ≤ G such that K 6≤ R and K is locally normal in G, then KR/R is non-discrete (since QZ(G/R) = 1), so KR/R ∩ U R/R is non-trivial for every open compact subgroup U of G, but clearly KR/R does not contain any non-trivial locally normal C-subgroup of U R/R. Theorem III now follows immediately from Theorems 6.2 and 6.11. Theorem 6.11 also has the following consequence: Corollary 6.14. Let G be a t.d.l.c. group. Then at least one of the following holds: (i) G is [A]-regular; (ii) there is a closed characteristic normal subgroup R of G such that G/R is nondiscrete and [A]-semisimple. In particular, consider a topologically characteristically simple t.d.l.c. group G. Then G is either [A]-regular or [A]-semisimple. As in the case of the quasi-hypercentre (see Proposition 6.3), the C-regular radical enjoys stability properties with respect to certain closed subgroups. Proposition 6.15. Let G be a t.d.l.c. group and let C be a stable class of profinite groups. 57 (i) Let H be a closed normal subgroup of G. Then RC (H) ≥ RC (G) ∩ H. (ii) Let H be an open subgroup of G. Then RC (H) = RC (G) ∩ H. Proof. (i) Let U be an open compact subgroup of G. Then RC (U ) is C-regular in U , so RC (U ) ∩ H is C-regular in U ∩ H by Lemma 6.13 (iv). Thus RC (U ) ∩ H ≤ RC (U ∩ H). At the global level, we have QCH (G/(RC (U ) ∩ H)) = QCH (G/RC (U )) since H is normal in G, so [g, h] ∈ H whenever g ∈ G and h ∈ H. Hence we have RC (H) = ≥ = = QCH (G/RC (U ∩ H)) QCH (G/(RC (U ) ∩ H)) QCH (G/RC (U )) RC (G) ∩ H. (ii) We can obtain both RC (H) and RC (G) ∩ H as QCH (U/RC (U )), where U is an open compact subgroup of G that is contained in H. We finish this section by linking it with our previous discussion of locally C-stable t.d.l.c. groups. Note the following variant of Lemma 3.7, giving a condition under which a locally normal subgroup has trivial centraliser in G. Lemma 6.16. Let (G, U ) be a Hecke pair such that QZ(G) = 1 and let L be a locally normal subgroup of G such that CU (L) is finite. Then: (i) CG (L) = 1. (ii) Let H and K be subgroups of G containing L, such that H ∩ K contains a finite index subgroup V of U . Suppose θ : H → K is an isomorphism such that θ(x) = x for all x ∈ L and such that θ(V ) is commensurate with V . Then H = K and θ = idH . Proof. Observe that CU (L) is finite and normalised by a finite index subgroup of U , so in fact CU (L) ≤ QZ(U ) = 1. We now prove (ii). We may assume V ≤ NG (L). Choose a finite index subgroup W of V such that W θ(W ) is contained in V . Let g ∈ W and let x ∈ L. Then gxg −1 = θ(gxg −1 ) = θ(g)θ(x)θ(g −1 ) = θ(g)xθ(g−1 ), so g−1 θ(g) centralises x. This shows that g −1 θ(g) ∈ CV (L) = 1. Thus g = θ(g), that is, θ fixes W pointwise. We may now apply Lemma 3.7, since CG (W ∩ g−1 W g) ≤ QZ(G) = 1 for all g ∈ G. Thus H = K and θ = idH . Part (ii) follows. 58 By applying (ii) to the automorphisms of G induced by conjugation by elements of CG (L), we infer that CG (L) ≤ Z(G) = 1, thereby confirming (i). Proposition 6.17. Let G be a t.d.l.c. group such that QZ(G) = 1. The following are equivalent: (i) G is locally C-stable; (ii) For every compact locally normal subgroup H of G and open compact subgroup U of G we have CG (HCU (H)) = 1; (iii) G has no non-trivial abelian locally normal subgroups; (iv) G is [A]-semisimple. Proof. Suppose G is locally C-stable. Then (ii) follows from Lemma 6.16(i). Suppose (ii) holds and let H be an abelian locally normal subgroup of G. Let U be any open compact subgroup of G and let K = H ∩ U . Then K ≤ CG (KCU (K)) = 1, so H is discrete. Since QZ(G) = 1, we conclude that H is trivial. Suppose (iii) holds. If G is not [A]-semisimple, then there is an open compact subgroup U of G such that U has a non-trivial normal [A]-subgroup H, by Lemma 6.13(i). But we see by hypothesis that U has no non-trivial finite or abelian locally normal subgroups, so by the construction of [A], there is no way to obtain a normal [A]-subgroup. Thus G is [A]-semisimple. Now suppose that G is [A]-semisimple. In particular, QZ(G) = 1 and there are no non-trivial compact abelian locally normal subgroups. Then G is locally C-stable by Theorem 3.19. The following illustration of the above discussion also provides a justification for the choice of terminology. Proposition 6.18. Let G be a p-adic Lie group with Lie algebra g = Lie(G). Let also R = R[A] (G) be the the [A]-regular radical of G. Then Lie(R) coincides with the solvable radical r of g, and R is the largest closed normal subgroup of G with Lie algebra r. It coincides with the kernel of the G action on g/r. In particular R is locally soluble, and G is [A]-semisimple if and only if its Lie algebra g is semisimple. Proof. By Proposition 2.6, every ideal of g is the Lie algebra of a compact locally normal subgroup of G. In particular G has a compact locally normal subgroup K whose Lie algebra is the soluble radical r of g. By [5, Ch. III, §9, Cor. to Prop. 6], the group K 59 has a soluble open subgroup, say K0 . By Lemma 2.1 there is a compact open subgroup U of G containing K0 as a normal subgroup. By Theorem 6.11 and Proposition 6.15(ii), we have K0 = Lie(K0 ) ≤ R[A] (U ) = R ∩ U . Since U/K0 is a compact p-adic Lie group whose Lie algebra g/r is a direct product of simple (non-abelian) Lie algebras, it follows from Proposition 2.6 that U is virtually a direct product of hereditarily just finite profinite groups that are not virtually abelian. In particular U has trivial quasi-centre (see Proposition 5.1 in [2]) and no non-trivial abelian locally normal subgroup. Therefore U is [A]-semisimple by Proposition 6.17, so that K0 = Lie(K0 ) ≤ R[A] (U ) = R ∩ U . In particular K0 is an open subgroup of R that is soluble, and we have r = Lie(K0 ) = Lie(R). Any closed normal subgroup of G with Lie algebra r is locally solvable by [5, Ch. III, §9, Cor. to Prop. 6], hence [A]-regular, and thus contained in R by Theorem 6.11. Thus R is the largest such subgroup. It follows that R is the kernel of the G-action on g/r (a short and complete argument showing this can be found in the proof of Lemma 6.4 in [10]). The remaining assertions are now clear. The [A]-regular radical has been used recently to analyse the global structure of t.d.l.c. group admitting an open subgroup which has a continuous faithful finite-dimensional representation over a local field: by [9, Theorem R.1], the [A]-regular radical of such a group is the largest closed normal subgroup that is locally soluble (i.e. that has a soluble open subgroup). 6.4 Canonical completions of Hecke pairs The radical theory developed so far in this section is specific to t.d.l.c. groups, as the topology plays an important role. However, results about t.d.l.c. groups naturally have consequences for Hecke pairs in general, due to the existence of a universal ‘completion’ for Hecke pairs that generalises the well-known profinite completion of a group. A construction is given in [4] and a proof of universality in [23]. Theorem 6.19. Let (G, U ) be a Hecke pair, such that G is a topological group (possibly discrete) and U is closed in G. Then there is an essentially unique group homomorphism θ : G → ĜU , the localised profinite completion!of a Hecke pair of G at U , where ĜU is a topological group, such that the following properties hold: (i) The image of θ is dense, the restriction θ|U of θ to U is continuous, and θ(U ) is an open profinite subgroup of ĜU . (ii) Let R be a topological group and let φ : G → R be a group homomorphism. Suppose 60 that φ|U is continuous and φ(U ) is profinite. Then there is a unique continuous homomorphism ψ : ĜU → R such that φ = ψθ. By composing with the appropriate quotient map, we also have canonical homomorphisms with related universal properties for t.d.l.c. groups with trivial quasi-centre, respectively locally C-stable t.d.l.c. groups with trivial quasi-centre, that follow immediately from the results we have so far. Corollary 6.20. Let (G, U ) be a Hecke pair, such that G is a topological group (possibly discrete) and U is closed in G. Let θ1 : G → ĜU /QZ∞ (ĜU ) and θ2 : G → ĜU /R[A] (ĜU ) be the canonical homomorphisms obtained from Theorem 6.19, Theorem 6.2 and Theorem 6.11. Set G1 = ĜU /QZ∞ (ĜU ) and G2 = ĜU /R[A] (ĜU ). Then the homomorphisms θi are characterised by the following properties: (i) The image of θi is dense, the restriction θi |U of θi to U is continuous, and θi (U ) is an open profinite subgroup of Gi . Moreover, QZ(G1 ) = QZ(G2 ) = 1, and G2 is locally C-stable. (ii) Let R be a t.d.l.c. group and let φ : G → R be a group homomorphism. Suppose that φ|U is continuous and φ(U ) is profinite. If QZ(R) = 1, then there is a unique continuous homomorphism ψ1 : G1 → R such that φ = ψ1 θ1 . If in addition R is locally C-stable, then there is a unique continuous homomorphism ψ2 : G2 → R such that φ = ψ2 θ2 . Let (G, U ) be a Hecke pair, equipped with the discrete topology, such that U is residually finite. Two questions arise at this point: Question 6.21. If (G, U ) has trivial quasi-centre, is θ1 : G → ĜU /QZ∞ (ĜU ) necessarily injective? Equivalently, does (G, U ) necessarily admit a dense embedding into a t.d.l.c. group with trivial quasi-centre? Question 6.22. If (G, U ) is locally C-stable with trivial quasi-centre, is θ2 : G → ĜU /R[A] (ĜU ) necessarily injective? Equivalently, does (G, U ) necessarily admit a dense embedding into a locally C-stable t.d.l.c. group with trivial quasi-centre? Both questions are of a local nature: if (G, U ) has trivial quasi-centre, then by Lemma 3.2, every non-trivial normal subgroup of G has infinite intersection with U . Thus θi is injective for i ∈ {1, 2} if and only if θi |U is injective. The questions can thus be restated as follows: Question 6.23. Let U be a residually finite group with trivial quasi-centre. Can U be densely embedded in a profinite group P , such that P has trivial quasi-centre? Question 6.24. Let U be a residually finite group with no non-trivial virtually abelian normal subgroups. Can U be densely embedded in a profinite group P , such that P has no non-trivial virtually abelian normal subgroups? 61 7 Restrictions on the group topology 7.1 The structure lattice and refinements of the group topology In this section, we investigate the structural significance of fixed points in the action of a t.d.l.c. group G on its structure lattice. Of course, if G has a closed normal subgroup K that is neither discrete nor open, then [K] is a non-trivial fixed point in LN (G). Especially interesting, however, is the question of whether a compactly generated, topologically simple t.d.l.c. group can have non-trivial fixed points in LN (G). We shall return to this question in the second paper [8], elaborating on the results of the present chapter. Most results we shall obtain here are for t.d.l.c. groups that are first-countable or σ-compact; it is known (see [15]) that a compactly generated (or even σ-compactly generated) t.d.l.c. group without non-trivial compact normal subgroups is second-countable (and hence also first-countable and σ-compact). Our first goal is to prove Theorem IV, giving a general connection between the structure lattice and group topologies for first-countable t.d.l.c. groups. Definition 7.1. Let G be a t.d.l.c. group and let µ be a commensurability class (or subset of a commensurability class) of compact subgroups of G. The localisation of G at µ is the t.d.l.c. group H, unique up to isomorphism, that admits a continuous embedding φ : H → G, such that for some (any) K ∈ µ, φ(H) = CommG (K) and φ−1 (K) is an open compact subgroup of H. This group topology on H is called the localised topology at µ; it is denoted by T(µ) . Thus, as an abstract group, the localisation of G at µ coincides with CommG (K) so that the localisation of G at µ is nothing but (CommG (K), T(µ) ). Starting with a t.d.l.c. group G, one sees that the t.d.l.c. groups with the same group structure as G but a finer topology are precisely the groups of the form (G, T(µ) ), where µ is a G-invariant commensurability class of compact subgroups of G. If G is firstcountable, we can in fact classify these topological refinements of G using the structure lattice: this is the purpose of Theorem IV. First we recall a result of Caprace–Monod [7]. Recall that a t.d.l.c. group G is residually discrete if the intersection of all open normal subgroups of G is trivial. Proposition 7.2 ([7] Corollary 4.1). Let G be a compactly generated t.d.l.c. group. Then the following are equivalent: (i) G is residually discrete; (ii) G has a base of neighbourhoods of the identity consisting of subsets that are invariant under conjugation; 62 (iii) G has a base of neighbourhoods of the identity consisting of open compact normal subgroups. Corollary 7.3. Let G be a residually discrete locally compact group and let x ∈ G. Then the open subgroups of G normalised by x form a base of neighbourhoods of the identity. Lemma 7.4. Let U be a first-countable profinite group and let K be a closed subgroup of U . Then U commensurates K if and only if U normalises an open subgroup of K. Proof. Certainly, if U normalises an open subgroup of K then U commensurates K. Conversely, suppose U commensurates K. Let µ be the commensurability class of K. Then U(µ) is residually discrete, so by Corollary 7.3 [ U = {NU (L) | L ≤o K}. Now K is first-countable, so it has countably many open subgroups; thus we have expressed U as a union of countably many subgroups, each of which is closed for the given topology on U . By the Baire Category Theorem, at least one of these, say NU (L), must be open in U . Thus L has finitely many T conjugates in U , and we have U = CommU (L) since L is commensurate with U . Hence u∈U uLu−1 is a closed subgroup of L of finite index and thus an open subgroup of K. Proof of Theorem IV. Let T be the given topology of G and let T ′ be a refinement of T compatible with the group structure. By van Dantzig’s theorem, under T ′ there is a subgroup K of G that is open and compact; it follows that K is compact under T . Moreover, the set of such subgroups forms a commensurability class µ that is invariant under conjugation in G. In particular, given a subgroup U of G that is open and compact under T , then by Lemma 7.4, U normalises a subgroup L ∈ µ. Thus µ corresponds to an element α = [L] of LN (G); we have G = Gα since µ is G-invariant, and see that the topology T ′ is exactly the topology T(α) . Conversely, let α ∈ LN (G) that is fixed by G. Then G admits a locally compact topological refinement by declaring those representatives of α that are closed in T to be open, in other words, the group (G, T(α) ), which by definition has the same underlying group structure as G. Note that none of the group topologies in Theorem IV are σ-compact, except possibly the original topology of G, since a closed subgroup of a profinite group is either open or of uncountable index. 7.2 A group topology derived from the centraliser lattice Let A be a Boolean algebra, and equip Aut(A) with the coarsest group topology such that the stabiliser of α is open, for all α ∈ A. Then Aut(A) is a totally disconnected 63 group. Given a group G acting faithfully on A, write GA for the closure of G in Aut(A), equipped with the subspace topology. Of particular interest is the case in which an infinite commensurated subgroup U of G (perhaps G itself) has finite orbits. In this case, we see that U is residually finite and U A is profinite, so the group hG, U A i can be equipped with a t.d.l.c. topology that extends the topology of U A . Theorem 7.5. Let (G, U ) be a Hecke pair with trivial quasi-centre and let A be a Boolean algebra on which G has a faithful, weakly decomposable action. Let E be the subgroup of Aut(A) generated by G and U A . Then E commensurates U A , so that E can be equipped with a t.d.l.c. group topology by extending the topology of U A (so that U A is embedded as an open subgroup). Moreover, the following holds: (i) As a t.d.l.c. group, E is locally C-stable and faithful weakly decomposable. (ii) As a locally compact topological group, E is characterised as follows: Given a locally compact group L and an injective homomorphism θ : G → L with dense image such that θ(U ) is an open subgroup of L, then there exists a unique continuous surjective homomorphism φ : L → E such that the composition φθ is the embedding of G in E. (iii) If |G : U | is countable, the following characterisation also applies: Given a topological group L that is a Baire space and an injective homomorphism θ : G → L such that L = hθ(G), θ(U )i, then there exists a unique continuous homomorphism φ : L → E such that the composition φθ is the embedding of G in E. Proof. Let V = U A . Given g ∈ G, we see that gU g −1 contains a finite index subgroup of U , which ensures that gV g−1 contains an open subgroup of V . Thus E can be equipped with a t.d.l.c. group topology by extending the topology of U A . Certainly E acts faithfully on A, and the action of E on A is weakly decomposable with respect to V . Given x ∈ QZ(E), then x centralises a finite index subgroup of U , and hence xristU (α)x−1 is commensurate with ristU (α), for all α ∈ A. This implies that x acts trivially on A, so x = 1. Thus E is locally C-stable by Theorem 5.18. Let us suppose we have a homomorphism θ : G → L as in either (ii) or (iii), with (G, U ) and A satisfying the necessary hypotheses. We will prove (ii) and (iii) together, except where it is necessary to divide into cases. Given α ∈ A, let Rα = θ(ristG (α)) and let Kα = CL (Rα⊥ ). Then Kα is a closed subgroup of L, for all α ∈ A. Moreover, we have Rα ≤ Kα , but Kα ∩ Rα⊥ is trivial. This ensures that Kα ∩ θ(G) = Rα ; in particular, given α, β ∈ A such that α 6= β, then Rα 6= Rβ since the action of G is weakly decomposable, so Kα 6= Kβ . Now set Nα = NL (Kα ). Then Nα 64 is closed in L, since Kα is closed. Moreover, Nα ∩ θ(G) = Nθ(G) (Rα ) = θ(NG (ristG (α))). We see that Nα ∩ θ(U ) has finite index in θ(U ), so Nα ∩ P has finite index in P , where P = θ(U ). In case (ii), it follows that Nα ∩ P is open in P , and hence Nα is open in L, since P is open in L. In case (iii), Nα is a closed subgroup of L of countable index, and hence open by the Baire category theorem. In either case, we conclude that Nα is open in L, as is any finite intersection of subgroups Nα . Therefore the set {Kα | α ∈ A} ordered by inclusion forms a Boolean algebra A′ on which L acts smoothly, so that θ(U ) is orbit-equivalent to P on the finite subsets of A′ . The natural map Kα 7→ α induces a continuous homomorphism ψ : L → Aut(A) such that ψθ is the given action of G on A. In case (ii), ψ(P ) has a dense subgroup in common with U A , and both groups are compact, so ψ(P ) = U A . In case (iii), UA is dense in ψ(P ), so ψ(P ) ≤ U A . In either case, ψ(L) is generated by ψθ(G) and ψ(P ), so ψ(L) ≤ E, and hence ψ restricts to a continuous homomorphism φ : L → E with the required properties (in particular, φ is surjective in case (ii)). Moreover, in both cases the required properties specify φ uniquely, since the condition on φθ ensures that φ is uniquely specified on a dense subset of L. We see from Theorem 7.5(i) that the embedding G → E is not dependent on the choice of A, only on G and the commensurability class of U . Thus if (G, U ) is any faithful weakly decomposable Hecke pair, we may define E to be the centraliser lattice completion (LC-completion) of (G, U ), denoted ĜLC . For example, if G is a branch group, regarded as a Hecke pair (G, G), then ĜLC is the congruence completion of G in the sense of [3]. Theorem 7.5 is of interest even if (G, U ) is t.d.l.c., as it has implications for the topologies that are compatible with the group structure of G. In this case, G = ĜLC as topological groups. Notice that if G is second-countable, then |G : U | is countable. In particular, we can prove a slightly more general form of Theorem V. Corollary 7.6. Let G be a t.d.l.c. group that is faithful weakly decomposable. Let L be a topological group and let θ : L → G be an abstract group isomorphism, such that one of the following conditions holds: (i) L is a t.d.l.c. group, and there exists an open compact subgroup U of L such that θ(U ) is open and compact in G. (ii) G is second-countable and the topology of L is a Baire space. Then θ is continuous. In particular, if G is second-countable, then the topology of G is the unique σ-compact locally compact topology compatible with the group structure (in particular, it is preserved 65 by every automorphism of G as an abstract group), and the set of all locally compact group topologies of G is in natural bijection with the set of fixed points of G acting on LN (G) by conjugation. Proof. By applying Theorem 7.5 to the group isomorphism θ −1 : G → L, we see that there exists a continuous group homomorphism φ such that φθ −1 = idG . Clearly φ = θ. In particular, if G is second-countable, then the topology of G is the coarsest group topology on G that forms a Baire space, so in particular it is the coarsest locally compact Hausdorff group topology on G. The remaining assertions follow from Theorem IV. 7.3 Subgroups abstractly generated by compact locally normal subgroups Let G be a locally compact group. Recall that the group Aut(G) of homeomorphic automorphisms carries a natural Hausdorff group topology, called the Braconnier topology (see Appendix I in [7]). Basic identity neighbourhoods in Aut(G) are provided by the sets  A(K, U ) = α ∈ Aut(G) | ∀x ∈ K, α(x) ∈ U x and α−1 (x) ∈ U x , where K runs over compact subsets of G and U runs over identity neighbourhoods of G. In particular, for each compact open subgroup U < G, the stabiliser {α ∈ Aut(G) | α(U ) = U } is an identity neighbourhood in Aut(G). In what follows, automorphism groups of locally compact groups will always be implicitly endowed with the Braconnier topology. Lemma 7.7. Let G be a t.d.l.c. group, let I be a directed set, and let (Un )n∈I be a net of open compact subgroups in G forming a base of identity neighbourhoods, such that Ui < Uj whenever i > j. Let (αn )n∈I be a net in Aut(G) such that limn∈I αn (x) = x for all x ∈ G. If for each m ∈ I, there is some n0 ∈ I such that αn (Um ) = Um for all n ≥ n0 , then (αn )n∈I converges to the identity with respect to the Braconnier topology. Proof. Let K ⊂ G be a compact subset and U < G an identity neighbourhood. Choose S Um ⊂ U . We can find a finite subset {x1 , . . . , xk } ⊂ K such that K ⊂ ki=1 Um xi . Since (αn ) converges pointwise to the identity, so does the sequence (α−1 n ). Hence we may find −1 n0 such that αn (xi ) ∈ Um xi and αn (xi ) ∈ Um xi for all n ≥ n0 . Let now x ∈ K. Choose i such that Um x = Um xi . Thus we have αn (x) ∈ αn (Um x) = αn (Um xi ) = Um αn (xi ) = Um xi = Um x. 66 Similarly, we get α−1 n (x) ∈ Um x. This shows that αn belongs to A(K, Um ) ⊂ A(K, U ) for all n ≥ n0 . Thus (αn ) converges to the identity with respect to the Braconnier topology. Definition 7.8. Let G be a t.d.l.c. group and let α ∈ LN (G). Define the compact locally normal closure LN(G, α) of α in G to be the group generated by all compact locally normal representatives of α. We remark that LN(G, α) is a (not necessarily closed) subgroup of G with open normaliser, and if α is fixed by G then LN(G, α) is normal in G. If G is locally C-stable with trivial quasi-centre and α ∈ LC(G), then it follows from Proposition 5.4 that LN(G, α) is an open subgroup of QCG (α⊥ ), which in turn is a closed subgroup of Gα , and the normaliser of LN(G, α) is exactly Gα . Proposition 7.9. Let G be a t.d.l.c. group and let α be a fixed point of G in LN (G). Let D = LN(G, α). Then the natural homomorphism G → Aut(D, T(α) ) induced by the G-action by conjugation is continuous. Proof. Since G commensurates the open compact subgroups of (D, T(α) ), it follows that the homomorphism ϕ : G → Aut(D, T(α) ) induced by the conjugation action indeed takes its values in the group of homeomorphic automorphisms of (D, T(α) ). Let (gn )n∈I ⊂ G be a net converging to the identity in G. Let us first show that ϕ(gn ) converges pointwise to the trivial automorphism. Let x ∈ D. Let L1 , . . . , Lk beTcompact locally normal representatives of α such that x ∈ L1 L2 . . . Lk . Then the group ki=1 NG (Li ) is open in G, and therefore contains gn for all sufficiently large n. In particular, for such a large n, we have ϕ(gn ).x = gn xgn−1 ∈ L1 L2 . . . Lk . The latter product being compact with respect to the localised topology T(α) , it follows that the net of commutators (gn xgn−1 x−1 )n∈I is bounded in (D, T(α) ). Therefore, all we need to show is that 1 is its only accumulation point. Suppose for a contradiction that some subnet ([gf (n) , x])n∈I ′ converges to z 6= 1. Choose a compact locally normal representative L of α which is sufficiently small so that z 6∈ L. We have [gf (n) , x] ∈ Lz for all large n. In particular [gf (n) , x] ∈ Oz, where O is any open compact subgroup of G containing L. Since z 6∈ L, we may choose O small enough so that it does not contain z. Then O and Oz are disjoint so that [gf (n) , x] 6∈ O for all large n. Since O is an open subgroup of G, we deduce that ([gf (n) , x])n∈I ′ does not converge to the identity in G, which is absurd. Let now L be a compact locally normal representative of α and let (Un )n∈I be as in Lemma 7.7; we may assume Un ≤ NG (L) for all n ∈ I. Then the groups Lm = L ∩ Um form a basis of identity neighbourhoods in (D, T(α) ). Clearly, for each m ≥ 0, we have gn ∈ NG (Lm ) for all sufficiently large n. Lemma 7.7 now implies that ϕ(gn ) converges to the identity with respect to the Braconnier topology. 67 Corollary 7.10. Let G be a t.d.l.c. group, and let α be a fixed point of G in LN (G). Let D be an abstract normal subgroup of G generated by compact locally normal representatives of α, and let H = Γ.D where Γ is a discrete normal subgroup of G. Then the natural homomorphism G → Aut(H, T(α) ) induced by the G-action by conjugation is continuous. Proof. Note that Γ is a discrete normal subgroup of (H, T(α) ), and we have H = Γ.D. Note also that D is an open subgroup of LN(G, α) with respect to the localised topology T(α) , so the Braconnier topology on Aut(D, T(α) ) is compatible with the Braconnier topology on Aut(LN(G, α), T(α) ). Let (gn ) be a net tending to the identity in G; let K ⊂ H be T(α) -compact and V ≤ H be a T(α) -compact open subgroup. We need to show that [gn , K] ∪ [gn−1 , K] is contained in V for all sufficiently large n. Since H = Γ.D, it suffices to deal with the case when K = γC with γ ∈ Γ and C ⊂ D is T(α) -compact. For n large enough, we have [gn , γ] = 1 since Γ is contained in the quasi-center of G. Therefore [gn , γC] = γ[gn , C]γ −1 . Observe that W = γ −1 V γ is a compact open subgroup of (H, T(α) ). By Proposition 7.9, we have [gn , C] ⊂ W for all sufficiently large n. Hence [gn , γC] ⊂ V for all large n. The argument with gn−1 instead of gn is similar. In general, a compact subgroup of a t.d.l.c. group that is commensurate with a locally normal subgroup need not itself be locally normal. For example, if G has trivial quasicentre, then the only finite locally normal subgroup is the trivial one, but G may still have non-trivial finite subgroups. Proposition 7.9 leads to an interesting criterion for compact subgroups to be locally normal. Proposition 7.11. Let G be a t.d.l.c. group and let α ∈ LN (G). Let L be a compact subgroup of G such that [L] = α. Then L is locally normal in G if and only if L ≤ LN(G, α). Proof. If L is locally normal, then L ≤ LN(G, α) by definition. Assume conversely that L ≤ LN(G, α). Since Gα is open, it follows that a subgroup of G contained in Gα is locally normal in G if and only if it is locally normal in Gα . Moreover, every locally normal representative of α is contained in Gα . Thus we have LN(G, α) = LN(Gα , α), and there is no loss of generality in assuming that G = Gα . Let D be the group LN(G, α) equipped with the localised topology T(α) . Note that L is compact with respect to T(α) . Thus L is an open compact subgroup of D. In particular the collection A(L, L) of automorphisms of D which stabilise L is an identity neighbourhood with respect to the Braconnier topology on Aut(D). Since the natural map G → Aut(D) is continuous by Proposition 7.9, there must be an open subgroup of G that normalises L. 68 If U is an open compact subgroup of G that fixes α, there is a useful description of LN(G, α) ∩ U . Proposition 7.12. Let G be a t.d.l.c. group, let α ∈ LN (G) and let U be an open compact subgroup of G such that U fixes α. Let L be a closed subgroup of U such that [L] ≤ α. Then L ≤ LN(G, α) if and only if there is a closed normal subgroup M of U such that L ≤ M and [M ] = α. Proof. By Lemma 7.4, there is a normal subgroup N of U such that [N ] = α; by definition, N ≤ LN(G, α). Let L be a closed subgroup of U such that [L] ≤ α. Suppose L ≤ LN(G, α). By replacing L with LN we may assume N ≤ L. By Proposition 7.11, L is locally normal in G. In particular, L/N is a finite locally normal subgroup of U/N , so NU/N (L/N ) has finite index in U/N , and hence CU/N (L/N ) has finite index in U/N . Now by Dietzmann’s Lemma, it follows that the normal closure M/N of L/N in U/N is finite and hence closed, so M is a closed normal subgroup of U such that [M ] = α. Corollary 7.13. Let U be a profinite group and let L be a closed subgroup. Assume that L is commensurated and locally normal in U . Then the abstract normal closure of L in U is closed, and contains L as a finite index subgroup. Proof. Let N be the abstract normal closure of L. Since α = [L] is fixed by G by hypothesis, we have N ≤ LN(G, α). The previous proposition therefore implies that α has a representative M that is normal in U and contains L. Thus M is closed, the index of L in M is finite and we have L ≤ N ≤ M . Therefore N is closed and contains L as a finite index subgroup. References [1] R. Baer, Finiteness properties of groups, Duke Math. J. 15 (1948), no. 4, 1021–1032. [2] Y. Barnea, M. Ershov, T. Weigel, Abstract commensurators of profinite groups, Trans. Amer. Math. Soc. 363 (2011), no. 10, 5381–5417. [3] L. Bartholdi, O. Siegenthaler, P. Zalesskii, The congruence subgroup problem for branch groups, Israel Journal of Mathematics 187 (2012), Issue 1, 419–450. [4] V. V. Belyaev, Locally finite groups with a finite nonseparable subgroup (Russian) Sibirsk. Mat. Zh. 34 (1993), no. 2, 23–41, 226, 233. Translation in Siberian Math. J. 34 (1993), no. 2, 218–232 (1994) 69 [5] N. Bourbaki, Groupes et algèbres de Lie. Chapitre II: Algèbres de Lie libres. Chapitre III: Groupes de Lie. Actualités Scientifiques et Industrielles, No. 1349. Hermann, Paris, 1972. 320 pp. [6] M. Burger, Sh. Mozes, Groups acting on trees: from local to global structure, Publ. Math. IHÉS 92 (2000), 113–150. [7] P-E. Caprace, N. Monod, Decomposing locally compact groups into simple pieces, Math. Proc. Cambridge Philos. Soc. 150 Nr. 1 (2011), 97–128. [8] P-E. Caprace, C. D. Reid and G. A. Willis, Locally normal subgroups of totally disconnected groups. Part II: Compactly generated simple groups, preprint, http://arxiv.org/abs/arXiv:1401.3142. [9] P-E. Caprace, T. Stulemeijer, Totally disconnected locally compact groups with a linear open subgroup, Int. Math. Res. Not. IMRN (to appear), http://arxiv.org/abs/1409.8184. [10] R. Cluckers, Y. Cornulier, N. Louvet, R. Tessera, A. Valette, The Howe-Moore property for real and p-adic groups, Math. Scand. 109 (2011), no. 2, 201–224. [11] A. P. Dietzmann, On the criteria of non-simplicity of groups. C. R. (Dokl.) Acad. Sci. URSS, n. Ser. 44 (1944), 89–91. [12] M. Hall Jr., The theory of groups. Reprinting of the 1968 edition. Chelsea Publishing Co., New York, 1976. [13] E. Hewitt and K. A. Ross, Abstract harmonic analysis, Berlin-Göttingen-Heidelberg 1963. [14] N. Jacobson, Basic algebra. I. Second edition. W. H. Freeman and Company, New York, 1985. [15] S. Kakutani, K. Kodaira, Über das Haarsche Mass in der lokal bikompakten Gruppe. Proc. Imp. Acad. Tokyo 20, (1944). 444–450. [16] J. L. Kelley, General topology. Reprint of the 1955 edition. Graduate Texts in Mathematics, No. 27. Springer-Verlag, New York-Berlin, 1975. [17] L. Kramer, The topology of a semisimple Lie group is essentially unique, Adv. Math. 228 (2011), no. 5, 2623–2633. [18] A. G. Kurosh, The theory of groups. Translated from the Russian and edited by K. A. Hirsch. Chelsea Publishing Co., New York, 1960. [19] R. McCallum, Rigidity of the group topology for p-adic semisimple groups and automorphism groups of trees, http://arxiv.org/abs/arXiv:1210.1405. 70 [20] R. G. Möller, J. Vonk, Normal subgroups of groups acting on trees and automorphism groups of graphs, J. Group Theory 15 (2012), no. 6, 831–850. [21] V. Nekrashevych, Free subgroups in groups acting on rooted trees, Groups Geom. Dyn. 4 (2010), no. 4, 847–862. [22] C. D. Reid, The generalised Fitting subgroup of a profinite group, Communications in Algebra 41 (2013), no. 1, 294–308. [23] C. D. Reid, The profinite completion of a group localised at a subgroup, http://arxiv.org/abs/arXiv:1208.3554. [24] G. Schlichting, Operationen mit periodischen Stabilisatoren, Arch. Math. (Basel) 34 (1980), no. 2, 97–99. [25] P. Wesolek, Elementary totally disconnected locally compact groups, Proc. London Math. Soc. (to appear). [26] G. A. Willis, The structure of totally disconnected, locally compact groups, Math. Ann. 300 (1994), no. 2, 341–363. [27] J. S. Wilson, On Just Infinite Abstract and Profinite Groups, ch. 5 of New Horizons in Pro-p groups, editors M. du Sautoy, D. Segal, A. Shalev, Birkhäuser, 2000. 71
4math.GR
A Lambda-Calculus with letrec, case, constructors and non-determinism arXiv:cs/0011008v1 [cs.PL] 6 Nov 2000 Manfred Schmidt-Schauß and Michael Huber Fachbereich Informatik Johann Wolfgang Goethe-Universität Postfach 11 19 32 D-60054 Frankfurt, Germany E-mail: [email protected] Abstract. A non-deterministic call-by-need lambda-calculus λndlr with case, constructors, letrec and a (non-deterministic) erratic choice, based on rewriting rules is investigated. A standard reduction is defined as a variant of left-most outermost reduction. The semantics is defined by contextual equivalence of expressions instead of using αβ(η)-equivalence. It is shown that several program transformations are correct, for example all (deterministic) rules of the calculus, and in addition the rules for garbage collection, removing indirections and unique copy. This shows that the combination of a context lemma and a metarewriting on reductions using complete sets of commuting (forking, resp.) diagrams is a useful and successful method for providing a semantics of a functional programming language and proving correctness of program transformations. 1 Introduction Functional programming languages are based on extended lambda calculi and the corresponding rewrite semantics. There are several methods of giving these languages a semantics and proving the correctness of program transformations: – A denotational semantics uses a mathematical domain and a mapping from expressions to their denotation. This defines an equivalence of expressions, which can be used to define a notion of correctness of program transformations. This area is well-developed, but reaches its limits if non-deterministic operations are possible in the language. – An operational semantics defining the evaluation of expressions (the execution, resp.). Sometimes this is used with a kind of syntactic equality (e.g. αβ(η)-equality in the lambda-calculus). It could also be complemented by a behavioral equivalence, which can be used to define the a notion of correctness of program transformation. – A contextual semantics is a kind of operational semantics as above enhanced with an approximation relation based on a contextual preordering (see e.g. [Smi92,MST96,Pit97]). An expression s has less information than an expression t, iff in all contexts C[], if C[s] gives some information (e.g. terminates), then C[t] also gives some information (i.e. terminates). This notion is directly adapted to define a notion of correctness of program transformation. Often it gives the intuitive correct notion of program equivalence, and hence also of correct program transformations. The advantage of the contextual semantics is that the number of equality relations is maximal and that the derived properties are independent of a specific domain. The properties of the contextual preorder are comparable to the orderings in domains; for example it is possible to use fixed-point constructions for recursion. The contextual semantics is superior to the more syntax-oriented αβ(η)-equivalence, since contextual semantics permits considerably more program transformations. An advantage of contextual semantics over the denotational approach becomes obvious if non-determinism is on board and also sharing in the form of a (nonrecursive or recursive) let. It appears to be very hard to construct a useful domain for denotational semantics in the presence of non-determinism and higherorder functions, whereas it is possible to use the contextual equivalence for defining an intuitive correct semantics. This can then be used to prove correctness of program transformations sometimes exploiting rewriting techniques. A slight disadvantage of the contextual semantics (w.r.t. economy of proofs) is that it depends on the available syntactic constructs, hence on the set of contexts, and the defined standard reduction. The prominent syntactic property of the lambda-calculus is confluence of reduction [Bar84]. In the framework of a contextual semantics for the lambda-calculus (see e.g. [Abr90]), confluence is not thus important and is replaced by the correctness of program transformations. The really interesting propositions are: – Every beta-reduction transforms a program P into an equivalent one P ′ , meaning that P and P ′ are contextually equivalent. This is the required modification of confluence. – (standardization) Whenever there is a reduction of an expression t to an abstraction, then the standard reduction terminates, i.e. reduces t to an abstraction. These properties can be generalized to extended lambda-calculi, where confluence may be false (see e.g. [AK94]), but contextual equivalence can be easily adapted. Another approach is Rewriting Logic (see e.g. [Mes00]), which is a step in the direction of providing a semantics for programming languages based on rewriting rules. This appears to work for deterministic languages based on rewriting rules. However, the contextual semantics is our method of choice for the nondeterministic case. In this paper we present the calculus λndlr that is rather close to a non-strict functional core language. Reduction is like lazy call-by-need evaluation in functional programming languages. λndlr can be seen as a generalization of the calculus in [KSS98,Kut00] and thus of the calculi in [AFM+ 95,AF97,MOW98], which 2 treat sharing in the lambda calculus. It also is a generalisation of [MSC99] insofar as the language of expressions is not restricted to have only variables as arguments in applications. The calculus λndlr is related to the calculus in [SS00], where a similar language is investigated, but with the emphasis on an IO-interface. Another method for treating sharing are explicit substitutions [ACCL91], which optimize resource usage of reductions by exploiting sharing, however, it is i) based on αβ(η)-equivalence and ii) the reduction rules are in general not compatible with non-determinism, i.e. not with λndlr nor with the calculus in [Kut00]; in particular, the let-over-lambda-rules are incompatible with non-determinism. Specific ingredients of λndlr are – sharing by using letrec, which moreover allows recursive definitions. – a non-deterministic (erratic) choice, which allows to choose between two expressions. – a modified beta-reduction that prevents an unwanted duplication of nondeterministic expressions. The motivation to investigate non-determinism is to model interfaces of lazy functional languages to the outside world, i.e. to model input/output. This is done by a simulation of an IO-action by a nested choice-expression that represents the set of possible input values of the IO. The paper proposes to investigate extended lambda-calculi by using operational methods and a contextual semantics. The contextual semantics includes a measure for the number of non-deterministic steps. As a method for proving program transformation to be correct we propose to use complete sets of reduction diagrams in combination with an appropriate context lemma. The results are that for λndlr a rather large set of basic program transformations is proved to be correct. The paper also demonstrates the power of the method, since the reduction rules of λndlr are numerous and complex. As a check-program for complete sets, a program “Jonah“ was implemented to automatically test the complete reduction diagrams using a generate-and-test scheme; Jonah can also be used to compute proposals for complete sets. As a remaining open problem the paper can be seen as a recommendation to start an investigation into adapting the Knuth-Bendix method to automatically computing the reduction diagrams. However, the reduction diagrams for (llet) for example show that it would be necessary to integrate a kind of meta-description like the Kleene-∗. In this paper we do not present all proofs, but give enough hints and evidence of how the claims can be verified and that they are valid. 2 The calculus λndlr The syntax of the language is as follows: There is a set of type-names. For every type there are constructors c coming with an arity ar(c). This partitions the set of all constructors into the constructors 3 belonging to different types. For a type A, |A| is defined to be the number of constructors belonging to A. The constructors belonging to type A are indexed, and cA,i denotes the ith constructor of type A. E ::= V | C | (choice s t) | (caseA E Alt1 . . . Alt|A| ) | (E1 E2 ) | (λV.E) | (letrec V1 = E1 , . . . Vn = En in E) Alt ::= (P at → E) P at ::= c V1 . . . Var(c) where E, Ei are expressions, A is a type, V, Vi are variables, and C is a constructor. The variables in a pattern P at must be different, and also new ones. Moreover, in a caseA -expression, there is exactly one alternative with a pattern of the form (cA,i y1 . . . yn ) for every constructor cA,i . The constants caseA and choice can only occur in a special syntactic construction. Thus expressions where choice or caseA is applied to a wrong number of arguments are not allowed. The structure letrec obeys the following conditions: The variables in the bindings are all distinct. We also assume that the bindings in letrec are commutative, i.e. can be commuted without syntactic change. letrec is recursive: I.e. the scope of xi in (letrec xi = Ei in E) is Ei , E. This allows to define closed, open expressions and α-renamings. For simplicity we use the disjoint variable convention. I.e., all bound variables in expressions are assumed to be disjoint. The reduction rules are such that the bound variables in the result are also made distinct by α-renaming. We also use the convention to omit parenthesis in denoting expression: (s1 . . . sn ) denotes (. . . (s1 s2 ) . . . sn ). We say that an expression of the form (c t1 . . . tn ) is a constructor application, if n ≤ ar(c). A constructor application of the form (c x1 . . . xn ) is called a pure constructor application. An expression of the form (c t1 . . . tar(c) ) is called a saturated constructor application. Definition 2.1. Let R, R− , be context classes defined as follows: R− ::= [] | R− E | (caseA R− alts) R ::= R− | (letrec x1 = E1 , . . . , xn = En in R− ) | (letrec x1 = R1− [·], x2 = R2− [x1 ], . . . , xj = Rj− [xj−1 ], . . . in R− [xj ]) where Rj− is a context of class R− R is called a reduction context and R− is called a weak reduction context. For a term t with t = R− [t0 ], we say R− is maximal, iff there is no larger weak reduction context with this property. For a term t with t = R[t0 ], we say the reduction context R is maximal, iff it is either a maximal weak reduction context, or of the form (letrec x1 = R1− [·], x2 = R2− [x1 ], . . . , xj = Rj− [xj−1 ], . . . in R− [xj ]), 4 where t = (letrec x1 = t1 , . . . in R− [xj ]), R1− [·] is maximal for t1 , and the number j is maximal. For example the maximal reduction context of (letrec x2 = λx.x, x1 = x2 x1 in x1 ) is (letrec x2 = [], x1 = x2 x1 in x1 ), in contrast to the nonmaximal reduction context (letrec x2 = λx.x, x1 = x2 x1 in []). The (call-by-need) reduction rules defined in 2.2 follow the principle of minimizing copying at the cost of perhaps following several indirections. This holds for the copy rule (cpn) as well as (case). The technical reason is that this principle assures well-behaved reduction diagrams. Definition 2.2. The reduction rules are defined below in figure 2. If the context is important, then we denote it as a label of the reduction or state it explicitly. Note that for (case), the typical example is written down, where the position of the case is left open. There are two variants, one where the caseis in the in-expression, and one where the case-expression is in the right hand side of a binding. An exceptional case, where perhaps a letrec-expression has to be omitted, is the case of a constructor with zero arguments like (case N il . . .). The union of ndl, ndr is called (nd). Reductions are denoted using an arrow with llet super and/or subscripts: e.g. −−→. Transitive closure is denoted by a +, reflexive ∗ transitive closure by a ∗. E.g. −→ is the reflexive, transitive closure of →. As a short comment of the reduction rules: – (lbeta) is a sharing version of beta-reduction – (cpn) is a lazy version of the replacement done by usual beta-reduction, where the copy may jump over several indirections. – (case) is the generalized if for case analysis of values. To find the value to be analyzed, it has to be virtually assembled by following the bindings. – (llet), (lapp), (lcase) are used to adjust the let-environments – (nd) is the non-deterministic (erratic) choice. The next definition is intended to formalize the standard reduction. The idea is to find the reduction that is outermost, in a reduction context and also necessary for making progress in the evaluation. Definition 2.3. Let t be an expression. Let R be the maximal reduction context such that t ≡ R[t′ ] for some t′ . The standard redex and the corresponding st standard reduction −−→ is defined by one of the following cases: – t′ is a choice-expression: then use (ndr) or (ndl). – R = (letrec x1 = t1 , . . . xn = tn in []), and t′ is a letrec-expression. Then apply (llet) to R[t′ ]. – R = R0 [(· t′′ )] where R0 is a reduction context. If t′ is a letrec-expression, then use (lapp) in context R0 ; If t′ is an abstraction, then use (lbeta) in context R0 . 5 – R = R0 [caseA · alts]. If t′ is a letrec-expression, then use (lcase) in context R0 ; If t′ is a saturated constructor application, then use (case) in context R0 , if it is applicable. – R = (letrec x1 = [], x2 = x1 , . . . , xj = xj−1 , . . . in R1− [xj ])] where R1− is a weak reduction context. If t′ is an abstraction, then use (cpn) as follows: (letrec x1 = t′ , x2 = x1 , . . . , xj = xj−1 , . . . in R1− [xj ])] → (letrec x1 = t′ , x2 = x1 , . . . , xj = xj−1 , . . . in R1− [t′ ])]. If t′ is a letrec-expression, then use (llet),(lcase), or (lapp) to flatten the letrec-expression t′ into its superexpression. If t′ is a constructor application, and (case) is applicable to a case-expression in a reduction context, then apply this (case)-reduction. – R = (letrec x1 = [], x2 = x1 , . . . , xj = xj−1 , xj+1 = − − − Rj+1 [xj ], . . . in R∞ [xk ])] where Ri− , R∞ are weak reduction contexts. ′ If t is an abstraction, then use (cpn) such that the result is: R = − − (letrec x1 = t′ , x2 = x1 , . . . , xj = xj−1 , xj+1 = Rj+1 [t′ ], . . . in R∞ [xk ])]. ′ If t is a letrec-expression, then use (llet),(lcase), or (lapp) to flatten the letrec-expression t′ into its superexpression. If t′ is a constructor application, and (case) is applicable to a case-expression in a reduction context, then apply this (case)-reduction. Lemma 2.4. For every term t: if t has a standard redex, then this redex is unique. If the standard reduction is not an (nd), then the standard reduction is also unique. st st st Definition 2.5. A standard reduction s −−→ s1 −−→ s2 . . . sn −−→ t has ndcount D, iff D is the number of (nd)-reductions in it. Note that we use the notion standard reduction also for non-maximal reductions. Definition 2.6. For a term t and an nd-count D, t⇓D holds if there is some standard-reduction starting with t, and the reduction has nd-count D. Note that a standard reduction for an nd-count D is in general not unique. Note also that there may be expressions without a standard redex. Definition 2.7. define: (contextual preorder and equivalence) Let s, t be terms. We s ≤c t iff ∀C[].∀D : C[s]⇓D ⇒ (∃B.D ≤ B ∧ C[t]⇓B ) s ∼c t iff s ≤c t ∧ t ≤c s Note that we permit contexts such that C[s] is an open term. 6 Proposition 2.8. ≤c is a preordering and ∼c is an equivalence relation. s ≤c t implies that C[s] ≤c C[t] for all contexts C[.]. I.e., ≤c is a precongruence on the set of expressions. s ∼c t implies that C[s] ∼c C[t] for all contexts C[.]. I.e., ∼c is a congruence on the set of expressions. Note that there are terms t without a standard redex, i.e. the standard reduction stops. The reasons could be classified as i) type-error like (caseA (λx.x) . . .), ii) a kind of non-termination like (letrec x = x in x), iii) as a value or a kind of normal form like (Cons True Nil) or λx.x. The following lemma shows that it is sufficient to use reductions contexts for checking contextual approximation. Lemma 2.9. (Context Lemma) Let s, t be terms. If for all reduction contexts R and all nd-counts D: R[s]⇓D ⇒ (∃B.D ≤ B ∧ R[t]⇓B ), then s ≤c t. Proof. We prove the more general claim: if for all i: si , ti satisfy the conditions of the lemma for reduction contexts, then for all multicontexts C[·1 , . . . , ·m ]: C[s1 , . . . , sn ]⇓D ⇒ (∃B.D ≤ B ∧ C[t1 , . . . , tn ]⇓B . Assume this is false. Then there is a multicontext C, an nd-count D, such that C[s1 , . . . , sn ]⇓D , and for all B with D ≤ B: C[t1 , . . . , tn ]6⇓B . We select a multicontext, C, terms si , ti , and an nd-count D, and a corresponding reduction, such that the counterexample is minimal w.r.t. the following lexicographic ordering: i) the number of reduction steps of C[s1 , . . . , sn ], ii) the number of holes of C[. . .]. The search for a standard redex is performed top-down. There are two cases: 1. The search for the reduction context inspects the term in a hole. Then we can assume wlog that the first hole is inspected first. Hence C[·, t2 , . . . , tn ] is a reduction context. Let C ′ := C[s1 , ·2 , . . . , ·n ]. Since C ′ [s2 , . . . , sn ] ≡ C[s1 , . . . , sn ], we can select the the same standard reduction for nd-count D. Since the number of holes of C ′ is smaller than the number of holes in C, we obtain some B ≥ D with C ′ [t2 , . . . , tn ]⇓B , which means C[s1 , t2 , . . . , tn ]⇓B . Since C[·, t2 , . . . , tn ] is a reduction context, the preconditions of the lemma imply that there is some B ′ ≥ B with C[t1 , t2 , . . . , tn ]⇓B ′ , a contradiction. 2. The search for the reduction context does not inspect any hole of C. Then C[s1 , . . . , sn ] as well as C[t1 , . . . , tn ] can be reduced using the same standard reduction, since the search for a standard redex takes place only in the outer context C[. . .]. There are two cases for a reduction: st If the reduction C[s1 , . . . , sn ] −−→ s′ is not (nd), then this may result in C ′ [...] with more holes, and the holes are filled with copies of si , ti . Then we get a smaller counterexample since the number of reductions steps is smaller, and since non-(nd) standard reductions are unique. 7 st If the reduction C[s1 , . . . , sn ] −−→ s′ is an (ndl) (or (ndr), respectively), then the reduction of s′ has nd-count D′ = D − 1. We make the corresponding st,ndl reduction: C[t1 , . . . , tn ] −−→ t′ . This is a smaller counterexample; hence we get a contradiction also in this case. Definition 2.10. A program transformation is a relation T between programs (expressions). A program transformation T is called correct, iff for all expressions P, P ′ : P T P ′ implies P ∼c P ′ . The reductions rules in definition 2.2 define corresponding program transformations if they are allowed in arbitrary contexts. Definition 2.11. Let an internal reduction be a non-standard reduction that takes place within a reduction context. Usually, this is denoted by the label i on the reduction arrow. We define complete sets of commuting and forking diagrams adapted from [Kut99,Kut00]. In the following definition we use a notation for rewrite rules (i,llet) (st,a) (st,a) (i,llet) on reduction sequences. For example −→ · −→ ❀ −→ · −→ , where a is a reduction type. The · on the left hand side is like a joker, and the · on the right hand side can be seen as an existentially quantified term. Definition 2.12. Assume given a reduction type (red) and a set of (complementary) reduction types T , where the base calculus reduction types are contained in T , as well as (red). A complete set of commuting diagrams for a reduction (red) is a set of rewrite rules on reduction sequences of the form i,red st,a1 st,ak −−→ . −−→ . . . −−→ st,b1 ❀ st,bm i,ch i,c1 −−→ . . . −−→ . −−→ . . . . . −−→, i,red st,∗ where ci ∈ T , such that for every reduction sequence s −−→ . −−→ t: Either it can be transformed using one of the meta-reductions into another reduction i,red st,∗ sequence from s to t, such that at least −−→ can be replaced. Or . −−→ t can be st,∗ st,+ prolonged into a longer standard reduction sequence . . . −−→ t −−→ t′ , such that it can be replaced as above. A complete set of forking diagrams for a reduction (red) is a set of rewrite rules on reduction sequences of the form st,a1 st,ak i,red ←−− . . . ←−− . −−→ i,c1 ❀ i,ch st,b1 st,bm −−→ . . . . . −−→ . ←−− . . . ←−−, st,∗ i,red where ci ∈ T , such that: Either every reduction sequence s ←−− . −−→ t can be transformed into another reduction sequence between s and t, such that at i,red st,∗ least −−→ is replaced. Or s ←−− . can be prolonged into a reduction sequence st,+ st,∗ s′ ←−− s ←−− . , such that it can be replaced as above. We also use reductions not in the base calculus as internal reductions. 8 It is intended that the corresponding meta-rewriting on reduction sequences terminates, which has to be proved for every such complete set. The complete sets of commuting (forking) diagrams are not unique. Note that in many cases, the forking diagrams can be derived from the commuting diagrams. Lemma 2.13. For every reduction that is not a (llet) or (cp)-reduction, i.e., a ∈ {(nd), (lbeta), (lapp), (lcase), (case)}, there are no internal reductions. This means, every internal a-reduction with a ∈ {(nd), (lbeta), (lapp), (lcase), (case)} is a standard reduction. Proof. By inspecting all the finitely many cases. a Proposition 2.14. If s −−→ t, where a ∈ {(lbeta), (lapp), (lcase), (case)}, then s ∼c t. I.e., all the program transformations defined by one of the reductions {(lbeta),(lapp),(lcase),(case)} are correct. a,[] Proof. Let s′ −−→ t′ by a (a)-reduction on the surface with a ∈ {(lbeta), (lapp), (lcase), (case)}. We show s′ ≤c t′ exploiting the context lemma. Let R be a reduction context. i,a st,a Then R[s′ ] −→ R[t′ ] is not possible by Lemma 2.13. Then R[s′ ] −→ R[t′ ] by a unique standard reduction, hence if there a reduction for R[s′ ] with nd-count D, there is also one for R′ [t′ ] with nd-count D. The context lemma now shows that s ′ ≤ c t′ . To show t′ ≤c s′ using the context lemma is similar: If there a standard reduction for R[t′ ] with nd-count D, there is also one for R[s′ ] with nd-count D. The context lemma now shows that t′ ≤c s′ . Hence we have shown s′ ∼c t′ . Since ∼c is a congruence, we have also that C[s′ ] ∼c C[t′ ] for an arbitrary context C. Hence the proposition holds. 3 Correctness of the reduction (llet) The union of the reductions (llet),(lapp),(lcase) is denoted as (lll). The reduction lll+ means a reduction sequence consisting only of (lll)-reductions of length at least 1. Accordingly lll∗ is defined as any number of (lll)-reductions. (i, llet)0∨1 means no reduction or 1 reduction (i, llet). In the following two lemmas, a stands a for an arbitrary reduction −−→. Lemma 3.1. A complete set of commuting diagrams for (llet) is: (i,llet) (st,a) (st,a) (i,llet) (i,llet) (st,a) (st,a) (st,llet) (i,llet) (st,lll+ ) – −−→ · −−→ ❀ −−→ · −−→ – −−→ · −−→ ❀ −−→ · −−→ – −−→ · −−→ (st,lll+ ) ❀ (i,llet)0∨1 −−→ · −−−→ 9 Lemma 3.2. A complete set of forking diagrams for (llet) is: (st,a) (i,llet) – ←−− · −−→ (st,llet) (st,a) (i,llet) (i,llet) (st,a) – ←−− · ←−− · −−→ (st,lll+ ) (i,llet) – ←−−−− · −→ (st,lll+ ) (i,llet) – ←−−−− · −→ (st,a) ❀ −−→ · ←−− ❀ ❀ ←−− (i,llet (st,lll+ ) −→ · ←−−−− (st,lll+ ) ❀ ←−−−− (i,llet) Proposition 3.3. If s −−→ t, then s ∼c t. I.e. (llet) is a correct program transformation in any context. Proof. First we assume that the reduction is on top level. To use the context lemma, we have to show what happens in a reduction context. I.e. assume that s ≡ R[s′ ] and s′ is the llet-redex. Using the forking diagrams, it is possible to construct from a standard reduction of s a standard reduction of t with the same nd-count. The context lemma then shows that s ≤c t. Using the commuting diagrams, it is possible to construct from a standard reduction of t a standard reduction of s with the same nd-count by shifting the (i,llet) −−→ to the right. The context lemma then shows that t ≤c s. Together, this means s ∼c t. Finally, the congruence property of ∼c implies that a (llet) can be applied everywhere in a term. ✷ 4 Garbage Collection: ldel Garbage collection in the calculus has two forms, a non-cyclic one, and the other one that also collects cyclic references: The noncyclic reduction (ldel) is defined as : (ldel) (letrec x = s in t) → t if x does not occur in t (ldel) (letrec x = s, E in t) → (letrec E in t) if x does not occur in t, E The cyclic reduction (ldelcyc) consisting of (ldelcyc1), (ldelcyc2) is defined as : (ldelcyc1) (letrec x1 = s1 , . . . , xm = sm in t) → (letrec xj = sj , . . . , xm = sm in t) if xi for 1 ≤ i ≤ j − 1 does not occur in sj , . . . , sm , t and m > 1 (ldelcyc2) (letrec x1 = s1 , . . . , xm = sm in t) → t if xi for 1 ≤ i ≤ m does not occur in t Here we show the correctness of (ldel). Lemma 4.1. A complete set of commuting diagrams for (ldel) is: (ldel) (st,a) (st,a) (ldel) – −−→ · −−→ ❀ −−→ · −−→ 10 (ldel) – −−→ ❀ (st,lll+ ) (st,lll+ ) (ldel) ldel −−→ · −−→ – −−→ · −−→ (st,lll∗ ) ❀ (ldel) −−→ · −−→ As an example for computing commuting diagrams, we show one case: We write \ instead of λ. Example 4.2. We compute the overlap of an (ldel)-redex and a standard (lapp)redex. If the overlap is trivial, then it is not hard to see that the reductions commute, including the property “standard“. In the case of a proper overlap, the redex and the corresponding reduction is as follows: ldel ((letrec x = c in \y.y) d) −−→ (\y.y d) On the other hand, if first the (lapp) rule is applied, then: st,lapp ((letrec x = c in \y.y) d) −−→ (letrec x = c in (\y.y ldel −−→ (\y.y d)) d) (ldel) This is covered by the rule −−→ ❀ (st,lll+ ) ldel −−→ · −−→. Lemma 4.3. A complete set of forking diagrams for (ldel) is: (st,a) (ldel) – ←−− · −→ + (st,lll ) ❀ (ldel) – ←−−−− · −→ (st,lll+ ) (ldel) – ←−−−− · −→ (ldel) ❀ ❀ (st,a) −→ · ←−− (ldel) −→ (ldel) (st,lll∗ ) −→ · ←−− Lemma 4.4. There are no infinite lll-reductions Proof. This can be shown by a natural-number valuation of expressions similar as in [Kut00], which is strictly decreasing in every reduction step. ✷ (ldel) Proposition 4.5. If s −−→ t, then s ∼c t. Proof. (sketch) Follows by induction on the length of reductions from the context lemma, and since there are no infinite (lll)-reduction sequences. ✷ 5 Copying variables This section contains the reduction (lcv) which is like compressing references used in letrecs. It can also be described as removing indirections. (lcv) (letrec x = y, E in C[x]) → (letrec x = y, E in C[y]) (lcv) (letrec x1 = y, x2 = C[x1 ], E in t) → (letrec x1 = y, x2 = C[y], E in t) 11 Lemma 5.1. A complete set of commuting diagrams for (lcv) is: (lcv) (st,a) (st,a) (lcv) – −→ · −→ ❀ −→ · −→ (lcv) (st,cpn) (st,cpn) (lcv) (lcv) – −→ · −→ ❀ −→ · −→ · −→. (lcv) (st,a) (st,a) – −→ · −→ ❀ −→ , where a ∈ {case, cpn, ndr, ndl}. Lemma 5.2. A complete set of forking diagrams for (lcv) is: (st,a) (lcv) (lcv) (st,a) – ←−− · −−→ ❀ −−→ · ←−− (st,cpn) (lcv) (lcv) (lcv) (st,cpn) – ←−− · −−→ ❀ −−→ · −−→ · ←−− (st,a) (lcv) (st,a) – ←−− · −−→ ❀ ←−− for a ∈ {cp, case, ndl, ndr}. (lcv) Proposition 5.3. If s −−→ t, then s ∼c t. I.e., (lcv) is a correct program transformation in any context. The proof uses the context lemma, and the complete set of commuting and forking diagrams to meta-reduce reduction sequences. 6 Contextual equivalence of copy reductions The required diagrams and the proof of correctness of non-standard copy reductions are complex. Only the complete set of commuting diagrams are presented. For this rule we require a special class of contexts: surface contexts: Surface contexts define expressions with holes not in the body of an abstraction. Definition 6.1. S ::= [] | (S E) | (E S) | (caseA S alts) | (caseA E . . . (p → S) . . .) | (choice E S) | (choice S E) | ((letrec . . . in S) | ((letrec . . . , xi = S, . . . in E) where E stands for an expression. S is called surface context. We consider the following atomic copy reductions: (cp) (letrec x1 = s1 , . . . , xn = sn in C[x1 ]) → (letrec x1 = s1 , . . . , xn = sn in C[s1 ]) where s1 is an abstraction (cp) (letrec x1 = s1 , . . . , xn = sn in s) → (letrec x1 = s1 , . . . , xj = C[s1 ], . . . , xn = sn in s) where s1 is an abstraction and where sj ≡ C[x1 ] We distinguish the (cp)-reduction into two subreductions: If the target occurrence of the variable is in a surface context, then (cpt), otherwise it is a (cpd). Equivalently, it is a (cpd) iff the target variable is within an abstraction. Thus ((letrec x = s, E in D[λz.C[x]])) → ((letrec x = s, E in D[λz.C[s]])) is a reduction of type (cpd). 12 Lemma 6.2. A complete set of commuting diagrams for (cpt), (cpd) is: (i,cpt) (st,a) (i,cpd) (st,a) (i,cpd) (st,lbeta) – −→ · −→ ❀ (i,cpt) (st,a) – −→ · −→ ❀ (st,a) ({i,st},cpt) (st,a) (i,cpd) −→ · −−→ (st,a) −→ , where a ∈ {case, ndr, ndl}. – −→ · −→ ❀ −→ · −→ (i,cpd) (st,cpn) (st,cpn) (i,cpd) (i,cpd) – −→ · −→ ❀ −→ · −→ · −→ (i,cpd) (st,a) (st,a) – −→ · −→ ❀ −→ , where a ∈ {case, ndr, ndl}. – −→ · −→ ❀ (st,lbeta) −→ · ({i,st},cpt) −−→ . This is sufficient to show that the (cp)-reductions retain contextual equivalence by a meta-reduction on reduction sequences. (cp) Proposition 6.3. If s −−→ t, then s ∼c t. I.e., (cp) is a correct program transformation in any context. In summary, we can prove: Theorem 6.4. All the reductions of the base calculus with the exception of (ndr), (ndl) are correct program transformations It is obvious that (ndr), (ndl) are not correct as program transformations, since (choice T rue F alse) may reduce to T rue, but T rue is not equivalent to (choice T rue F alse). 7 Unique Copy: Inlining If a letrec-bound variable occurs only once, then it is possible to replace this variable by the bound expression and to remove the binding: (ucp) (letrec x = s, E in C[x]) → (letrec E in C[s]), where C[] is a surface context, s arbitrary, x has exactly one occurrence in C[x] and no occurrence in E nor in s. (ucp) (letrec x = s in C[x]) → C[s], where C[] is a surface context, s arbitrary, and x has exactly one occurrence in C[x] and no occurrence in s. (ucp) (letrec x = s, y = C[x], E in t) → (letrec y = C[s], E in t), where C[] is a surface context, s arbitrary, x has exactly one occurrence in C[x] and no occurrence in E,s and t. Note that if s is an abstraction, then the rule is a combination of (cp) and (ldel). Lemma 7.1. A complete set of commuting diagrams for (ucp) is: (ucp) (st,a) – −→ · −→ ❀ (ucp) (st,a) – −→ · −→ ❀ (ucp) (st,a) – −→ · −→ ❀ (st,a) (ucp) −→ · −→ (ldel) −→ · −→ for a ∈ {case, ndr, ndl, cpn} (st,a) (st,a) −→ for a ∈ {case, ndr, ndl} 13 (ucp) (st,lll∗ ) (st,lll∗ ) (ucp) – −→ · −→ ❀ −→ · −→ (ucp) where the extreme case −→ ❀ (ucp) (st,cpn) (ldel) – −→ ❀ −→ · −→ (ucp) −→ is excluded. (ucp) Proposition 7.2. If s −−→ t, then s ∼c t. I.e., (ucp) is a correct program transformation in any context. 8 Conclusion The rewriting based method of computing complete sets of commuting (resp. forking) diagrams to prove program transformations to be correct is demonstrated to be successful. We are able to show that all deterministic reduction rules in the rather complex lambda calculus λndlr and also some other rules are correct. A general automatic method to compute diagrams by checking all nontrivial overlaps would be a valuable tool and deserves further research efforts. References Abr90. Samson Abramsky. The lazy lambda calculus. In D. Turner, editor, Research Topics in Functional Programming, pages 65–116. Addison-Wesley, 1990. ACCL91. M. Abadi, L. Cardelli, P.-L. Curien, and J.-J Lévy. Explicit substitutions. J. functional programming, 4(1):375–416, 1991. AF97. Z.M. Ariola and M Felleisen. The call-by-need lambda calculus. J. functional programming, 7(3):265–301, 1997. AFM+ 95. Z.M. Ariola, M. Felleisen, J. Maraist, M. Odersky, and P. Wadler. A callby-need lambda calculus. In Principles of programming languages, pages 233–246, San Francisco, California, 1995. ACM Press. AK94. Z.M. Ariola and Jan Willem Klop. Cyclic lambda graph rewriting. In LICS 94, pages 416–425. IEEE Press, 1994. Bar84. H.P. Barendregt. The Lambda Calculus. Its Syntax and Semantics. NorthHolland, Amsterdam, New York, 1984. KSS98. Arne Kutzner and Manfred Schmidt-Schauß. A nondeterministic call-byneed lambda calculus. In International Conference on Functional Programming 1998, pages 324–335. ACM Press, 1998. Kut99. Arne Kutzner. A non-deterministic call-by-need lambda-calculus with erratic choice: operational semantics, program transformations and applications. draft of thesis, 1999. Kut00. Arne Kutzner. Ein nichtdeterministischer call-by-need Lambda-Kalkül mit erratic choice: Operationale Semantik, Programmtransformationen und Anwendungen. Dissertation, J.W.Goethe-Universität Frankfurt, 2000. in german. Mes00. José Meseguer. Rewriting Logic and Maude: concepts and applications. In Leo Bachmair, editor, Proceedings RTA’2000, pages 1–26. Springer-Verlag, 2000. MOW98. John Maraist, Martin Odersky, and Philip Wadler. The call-by-need lambda calculus. J. of Functional programming, 8:275–317, 1998. 14 MSC99. MST96. Pit97. Smi92. SS00. A.K.D. Moran, D. Sands, and M. Carlsson. Erratic fudgets: A semantic theory for an embedded coordination language. In Coordination ’99, volume 1594 of Lecture Notes in Computer Science. Springer-Verlag, 1999. Ian Mason, Scott F. Smith, and Carolyn L. Talcott. From operational semantics to domain theory. Information and Computation, 128:26–47, 1996. Andrew D. Pitts. Operationally-based theories of program equivalence. In Semantics and Logics of Computation. Cambridge University Press, 1997. S.F. Smith. From operational to denotational semantics. In 7th International Conference MFPS, LNCS 598, pages 54–76. Springer-Verlag, 1992. M. Schmidt-Schauß. FUNDIO: A lambda-calculus with a recursive let, case, constructors, and an IO-interface, 2000. draft. 15 (lbeta) ((λx.s) t) → (letrec x = t in s) (cpn) (letrec x1 = s1 , x2 = x1 , . . . , xj = xj−1 , xj+1 = sj+1 . . . in C[xj ]) → (letrec x1 = s1 , x2 = x1 , . . . , xj = xj−1 , xj+1 = sj+1 . . . in C[s1 ]) where s1 is an abstraction (cpn) (letrec x1 = s1 , x2 = x1 , . . . , xj = xj−1 , xj+1 = C[xj ], . . . in s) → (letrec x1 = s1 , x2 = x1 , . . . , xj = xj−1 , xj+1 = C[s1 ], . . . in s) where s1 is an abstraction (llet) (letrec x1 = s1 , . . . , xn = sn in (letrec y1 = t1 , . . . , ym = sm in r)) → (letrec x1 = s1 , . . . , xn = sn , y1 = t1 , . . . , ym = sm in r) (llet) (letrec x1 = s1 , . . . , xi = (letrec y1 = t1 , . . . , ym = tm in si ), . . . , xn = sn in r) → (letrec x1 = s1 , . . . , xn = sn , y1 = t1 , . . . , ym = sm in r) (lapp) ((letrec xi = ti in t) s) → (letrec xi = ti in (t s)) (lcase) (caseA (letrec E in t) alts) → (letrec E in caseA t alts) (case) (caseA (cA,i t1 . . . tn ) . . . ((cA,i y1 . . . yn ) → t) . . .) → (letrec y1 = t1 . . . yn = tn in t) letrec x1 = (cA,i t1 . . . tj1 ), x2 = x1 tj1 +1 . . . tj2 , ... (case) xm = xm−1 tjm−1 +1 . . . tjm , ... C[caseA (xm tjm +1 . . . tjm+1 ) . . . ((cA,i z1 . . . zn ) → t)]) −→ letrec x1 = (cA,i y1 . . . yj1 ), y1 = t1 , . . . yj1 = tj1 , x2 = x1 yj1 +1 . . . yj2 , yj1 +1 = tj1 +1 , . . . , yj2 = tj2 , ... xm = xm−1 yjm−1 +1 . . . yjm , yjm−1 +1 = tjm−1 +1 , . . . , yjm = tjm , ... C[(letrec yjm +1 = tjm +1 , . . . , yjm+1 = tjm+1 , z1 = y1 , . . . , zn = yn in t)] where n = jm and the case-expression may be in a bound or in the in-expression and where yi are fresh variables (ndl) (ndr) (choice s t) → s (choice s t) → t Fig. 1. Reduction rules of λndlr 16
6cs.PL
1 A Linearly Relaxed Approximate Linear Program for Markov Decision Processes arXiv:1704.02544v1 [cs.SY] 9 Apr 2017 Chandrashekar Lakshminarayanan? , Shalabh Bhatnagar? , and Csaba Szepesvari† Abstract Approximate linear programming (ALP) and its variants have been widely applied to Markov Decision Processes (MDPs) with a large number of states. A serious limitation of ALP is that it has an intractable number of constraints, as a result of which constraint approximations are of interest. In this paper, we define a linearly relaxed approximation linear program (LRALP) that has a tractable number of constraints, obtained as positive linear combinations of the original constraints of the ALP. The main contribution is a novel performance bound for LRALP. Keywords: Markov Decision Processes (MDPs), Approximate Linear Programming (ALP), I. I NTRODUCTION Markov decision processes (MDPs) have proved to be an indispensable model for sequential decision making under uncertainty with applications in networking, traffic control, robotics, operations research, business, finance, artificial intelligence, health-care and more (see, e.g., [Whi93; Rus96a; FS02; HY07; SB10; BR11; Put94; LL12; AA+15; BD17]). In this paper we adopt the framework of discrete-time, discounted MDPs when a controller steers the stochastically evolving state of a system while receiving rewards that depends on the states visited and actions chosen. The goal is to choose the actions so as to maximize the return, defined as the total discounted expected reward. A controller that uses past state information is called a policy. An optimal policy is one that maximizes the value no matter where the process is started from [Put94]. In this paper we consider planning problems where the goal is to calculate actions of policies ? Department of Computer Science and Automation, Indian Institute of Science, Bangalore 560012. E-mail: {chandrul, shalabh}@csa.iisc.ernet.in † Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2E8. E-mail: [email protected] April 11, 2017 DRAFT 2 that give rise to high values and give new error bounds on the quality of solutions obtained by solving linear programs of tractable size. To explain the contributions in more details, we start by describing the computational challenges involved in planning. The main objective of planning is to compute actions of an optimal policy while interacting with an MDP model. In finite state-action MDPs, assuming access to individual transition probabilities and rewards along transitions, various algorithms are available to perform this computation in time and space that scales polynomially with the number of states and actions. However, in most practical applications, the MDP is compactly represented and if it is not infinite, the number of states scale exponentially with the size of the representation of the MDP. If planners are allowed to perform some fixed amount of calculations for each state encountered, it is possible to use sampling to make the per-state calculation-cost independent of the size of the state space [Rus96b; Sze01; KMN02]. Nevertheless, the resulting methods are still quite limited. In fact, various hardness results show that computing actions of (near-) optimal policies is intractable in various senses and in various compactly represented MDPs [BT00]. Given these negative results, it is customary to adopt the modest goal of efficiently computing actions of a policy that is nearly as good as a policy chosen by a suitable (computationally unbounded, and well-informed) oracle from a given restricted policy class. Here, within some restrictions (see below), the policy class can be chosen by the user. The more flexibility the user is given in this choice, the stronger a planning method is. The problem of planning with limited resources is also one of the key problem in artificial intelligence (AI). The book of [KM12] gives a relatively fresh, algorithm-centered summary of existing methods suitable for planning in MDPs. AI research tend to focus on empirical results through the development of various benchmarks and little if any effort is devoted to the theoretical understanding of the quality-effort tradeoff exhibited by the that the various algorithms that are developed in this field. A popular approach along these lines, which goes back to Schweitzer and Seidmann [SS85], relies on considering linear approximations to the optimal value function: The idea is that, similarly to linear regression, a fixed sequence of basis functions are combined linearly. The user’s task is to use a priori knowledge of the MDP to choose the basis functions so that a good approximation to the optimal value function will exist in the linear space spanned by the basis functions. The idea then is to design some algorithm to find the coefficients of the basis functions that gives a good approximation, while keeping computation cost in check. Finding a good approximation is sufficient, since at the expense of an extra O(1/ε2 ) randomized computation, April 11, 2017 DRAFT 3 a uniform O(ε)-approximation to the optimal value function can be used to calculate an action of an O(ε)-optimal policy at any given state (e.g., follow the ideas in [Sze01; KMN02]; see also Theorem 3.7 of Kallenberg [Kal17]). Since the number of coefficients can be much smaller than the number of states, the algorithms that search for the coefficients have the potential to run efficiently regardless of the number of states. Following Schweitzer and Seidmann [SS85], most of the literature considers algorithms that are obtained from restricting exact planning methods to search in the span of the fixed basis functions when performing computations. In this paper we consider the so-called approximate linear programming (ALP) approach, which was heavily studied during the last two decades, e.g., [SP01; Gue+03; FV03; FV04; KH04; PZ09; DFM09; Tay+10; PP11; BFM12; AYBM14]. The basic idea here is to combine a linear program whose solution is the optimal value function (and thus the number of optimization variables in it scales with the number of states) with a linear constraint that restricts the optimization variables to lie in the subspace spanned by the basis functions. As already noted by Schweitzer and Seidmann [SS85], the new LP can still be kept feasible by just adding one special basis function, while by substituting the “value function candidates” with their linear expansions, the number of optimization variables becomes the number of basis functions. As shown by de Farias and Van Roy [FV03], the solution to the resulting LP is within a constant factor of the best approximation to the optimal value function within the span of the chosen bases. However, since the number of constraints in the LP is still proportional to the number of states, it is not obvious whether a solution to the resulting LP can be found in time independent of the number of states (other computations can be done in time independent of the number of states, e.g., using sampling, at the price of a controlled increase of the error, e.g., Theorem 6 of [PZ09]). Most of the literature is thus devoted to designing methods to select a tractable subset of the constraints while keeping the approximation guarantees, as well as keeping computations tractable. Since a linear objective is optimized by a point on the boundary of the feasible region, knowing the optimizer would be sufficient to eliminate all but as many constraints as the number of optimization variables. The question is how to find a superset of these, or an approximating set, without incurring much computational overhead. Schuurmans and Patrascu [SP01] and Guestrin et al. [Gue+03] propose constraint generation in a setting where the MDP has additional structure (i.e., factorized transition structure). This additional structure is then exploited in designing constraint generation methods which are able to efficiently generate violated constraints. A more April 11, 2017 DRAFT 4 general approach due to de Farias and Van Roy [FV04] is to choose a random subset of the constraints by choosing states to be included at random from a distribution that reflects the “importance” of states. While constraint generation can be powerful, it is not known how solution quality degrades with the budget on the constraints generated (Guestrin et al. note that the number of constraints generated can be at most exponential in a fundamental quantity, the induced width of a so-called cost-network, which may be large and is in general hard to control). For constraint sampling, de Farias and Van Roy [FV04] prove a bound on the suboptimality, but this bound applies only in the unrealistic scenario when the constraints are sampled from an idealized distribution, which is related to the stationary distribution of an optimal policy. While it is possible to extend this result to any sampling distribution, the bound then scales with the mismatch between the sampling and the idealized distributions, which, in general, will be uncontrolled. Another weakness of the bound is related to that when constraints are dropped, the linear program may become unbounded. To prevent this, de Farias and Van Roy [FV04] propose imposing an extra constraint on the optimization variables. The bound they obtain, however, scales with the worst approximation error over this constraint set. While in a specific example it is shown that this error can be controlled, no general results are derived in this direction. Later works, such as that of Desai, Farias, and Moallemi [DFM09] and Bhat, Farias, and Moallemi [BFM12], repeat the analysis of de Farias and Van Roy [FV04] in combinations with other ideas. However, no existing work that we know of addresses the above weaknesses of the result of de Farias and Van Roy [FV04]. Another interesting approach is to consider the dual linear program, where the optimization variables are measures over the state-action space and the feasible set is the set of discounted state-occupation (DSO) measures of all possible policies. By adding an extra linear constraint on the optimization variables, we arrive at an “approximate dual LP”. Feasibility of the resulting LP can be ensured by adding basis functions that represent DSO measures of some select policies. Abbasi-Yadkori, Bartlett, and Malek [AYBM14] considered this approach together and proposed to use a randomized gradient method to minimize a penalized form of the linear objective to approximately enforce the constraints. The algorithm computes the parameters of a measure over the state-action space, from which a policy can be derived by normalization. The main result of Abbasi-Yadkori, Bartlett, and Malek is a bound on the performance loss of this policy relative April 11, 2017 DRAFT 5 to the performance of the best DSO measure in the feasible set of the approximate dual LP,1 while iteration cost to obtain an ε-competitive solution is O(1/ε4 ) provided that a number of conditions hold. On the above complexity bound, the constants hidden are instance dependent, but do not depend on the number of states or actions. The conditions under which the result is proven are as follows: (i) the algorithm needs to be able to sample from distributions not too dissimilar to the idealized distributions q1 , q2 , where q1 is a distribution over state-action pairs, q2 P is a distribution over states and, e.g., q1 is defined by q1 (s, a) = kφ(s, a)k/ s0 ,a0 kφ(s0 , a0 )k with φ(s, a) = (φ1 (s, a), . . . , φk (s, a))> and φ1 , . . . , φk being the chosen basis functions specifying the linear constraints and (s, a) is a state-action pair; (ii) the Markov chains underlying all policies in the MDP are uniformly fast mixing; (iii) for any state s0 ∈ S and index 1 ≤ i ≤ k, the P expression s,a φi (s, a)pa (s, s0 ) can be evaluated in O(1) time, where pa (s, s0 ) is the probability of transitioning from state s to s0 provided action a is chosen. While the second assumption limits the scope of MDPs that the result can be applied to, the other two assumptions limit the choice of the basis functions. Among other things, it is unclear how feasibility can be ensured while satisfying (i). Nevertheless, Abbasi-Yadkori, Bartlett, and Malek demonstrate promising empirical results on a queuing problem. Our main contribution is a new suboptimality bound for the case when the constraint system is replaced with a smaller, linearly projected constraint system. We also propose a specific way of adding the extra constraint to keep the resulting LP bounded. Rather than relying on combinatorial arguments (such as those at the heart of de Farias and Van Roy [FV04]), our argument uses previously unexploited geometric structure of the linear programs underlying MDPs. As a result our bound avoids distribution-mismatch terms and we also remove the scaling with worst approximation error. A specific outcome of our general result is the realization that it is beneficial to select states so that the “feature vectors” of all states when scaled with a fixed constant factor are included in the conic hull of the “feature vectors” underlying the selected states. This suggests to choose the basis functions so that this property can be satisfied by selecting only a few states. As we will argue, this property holds for several popular choices of basis functions. A preliminary version of this paper without the theoretical analysis and without the geometric arguments was published in a short conference communication [LB15]. 1 The result shown is more general, allowing to use measures outside of the feasible set. However, for such measures the performance bound degrades very rapidly and hence the greater generality does not seem to add much to the result. April 11, 2017 DRAFT 6 II. BACKGROUND The purpose of this section is to introduce the necessary background before we can present the problem studied and the main results. We shall consider finite state-action space, discounted total expected reward MDPs. We note in passing that the assumption that number of states is finite is mainly made for convenience and at the expense of a more technical presentation could be lifted. We will comment later on the assumption concerning the number of actions. Let the set of states, or state space be S = {1, 2, . . . , S} and let the set of actions be A = {1, 2, . . . , A}. For simplicity, we assume that all actions are admissible in all states. Given a choice of an action a ∈ A in a state s ∈ S, the controller incurs a reward (or gain) of ga (s) ∈ [0, 1] and the state moves to a next state s0 ∈ S with probability pa (s, s0 ). A policy u is a mapping from states to actions.2 When a policy is followed, the state sequence evolves as a Markov chain with transition probabilities given by Pu matrix whose (s, s0 )th entry is Pu(s) (s, s0 ). Along the way the rewards generated from gu . defined by gu (s) = gu(s) (s). The value of following a policy from a starting state s is denoted by Ju (s) and is defined as the expected total reward discounted reward. Thus, ∞ . X t t α (Pu gu )(s) , Ju (s) = t=0 where α ∈ (0, 1) is the so-called discount factor. We call Ju the value function of policy u. The value function of a policy satisfies the fixed-point equation Ju = Tu Ju where the affine-linear operator Tu is defined by Tu J = gu + αPu J. An optimal policy, is one that maximizes the value simultaneously for all initial states. The optimal value function J ∗ is defined by J ∗ (s) = maxu Ju (s) and is known to be the solution of the fixed-point equation J ∗ = T J ∗ where the operator T is defined by (T J)(s) = maxu (Tu J)(s), s ∈ S, i.e., the maximization is componentwise. Optimal policies exist and in fact any policy u such that the equation Tu J ∗ = T J ∗ holds is optimal (e.g., Corollary 3.3 of [Kal17]). A policy u is said to be greedy with respect to (w.r.t.) J if Tu J = T J ∗ . Thus, any policy that is greedy w.r.t. J ∗ is optimal. III. T HE L INEARLY R ELAXED ALP In this section we introduce the computational model used and the “Linearly Relaxed Approximate Linear Program” a relaxation of the ALP. 2 For the scope of this paper, it suffices to restrict our attention to such policies as opposed to considering history dependent policies. See Chapter 3, and specifically Corollary 3.3 of [Kal17]. April 11, 2017 DRAFT 7 As discussed in the introduction, we are interested in methods that compute a good approximation to the optimal value function. As noted earlier, at the expense of a modest additional cost, knowing an O(ε) approximation to J ∗ at a few states suffices to compute actions of an O(ε)-optimal policy. We will take a more general view, and we will consider calculating good approximations to J ∗ with respect to a weighted 1-norm, where the weights c form a probability distribution over S. Recall that the weighted 1-norm kJk1,c of a vector J ∈ RS is defined P S as kJk1,c = s c(s)|J(s)|. Note that here and in what follows we identify elements of R (functions, mapping S = {1, . . . , S} to the reals) with elements of RS in the obvious way. This P allows us to write e.g. c> J, which denotes s c(s)J(s). To introduce the optimization problem we study, first recall that the optimal value function J ∗ is the solution of the fixed point equation T J ∗ = J ∗ . It follows from the definition of T that J ∗ = maxu Tu J ∗ ≥ Tu J ∗ for any u, where ≥ is the componentwise partial ordering of vectors (≤ is the reverse relation). With some abuse of notation, we also introduce Ta to denote Tu where u(s) = a for any s ∈ S. It follows that J ∗ ≥ Ta J ∗ for any a ∈ A and also that T = maxa Ta , where again the maximization is componentwise. We call a vector J that satisfies J ≥ Ta J for any a ∈ A superharmonic. Note that this is a set of linear inequalities. By our note on T and (Ta )a , these inequalities can also be written compactly as J ≥ T J. It is not hard to show then that J ∗ is the smallest superharminoc function (i.e., for any J superharmonic, . J ≥ J ∗ ). It also follows that for any c ∈ RS++ = (0, ∞)S , the unique solution to the linear program min{c> J : J ≥ T J} = min{c> J : J ≥ Ta J, a ∈ A} is J ∗ . Now, let φ1 , . . . , φk : S → R be k basis functions. The Approximate Linear Program (ALP) P of Schweitzer and Seidmann [SS85] is obtained by adding the linear constraints J = ki=1 ri φi to the above linear program. Eliminating J gives X X X min{ ri c> φi : ri φi ≥ ga + α ri Pa φi , a ∈ A, r = (ri ) ∈ Rk } . i i i As noted by Schweitzer and Seidmann [SS85], the linear program is feasible as long as 1, defined as the vector with all components being identically equal to one, is in the span of {φ1 , . . . , φk }. For the purpose of computations, it is assumed that the values c> φi , i = 1, . . . , k and the values (Pa φi )(s) and ga (s) can be accessed in constant time. This assumption can be relaxed to assuming that one can access ga (s) and φi (s) for any (s, a) in constant time, as well as to that one can efficiently sample from c, from Pa (s, ·) for any (s, a) pair, but the details of this are the beyond the scope of the present work. As shown by de Farias and Van Roy [FV03], April 11, 2017 DRAFT 8 . . P if rALP denotes the solution to the above ALP then for JALP = i rALP (i)φi = ΦrALP it holds that kJALP − J ∗ k1,c ≤ 2ε , 1−α where ε = inf r kJ ∗ − Φrk∞ is the error of approximating the optimal value with the span of the basis functions φ1 , . . . , φk and kJk∞ = maxs |J(s)| is the maximum norm and Φ ∈ RS×k is the matrix formed by (φ1 , . . . , φk ). That the error of approximating J ∗ with JALP is O(ε) is significant: The user can focus on finding a good basis, leaving the search for the “right” coefficients to a linear program solver. While solving the ALP can be significantly cheaper than solving the LP underlying the MDP and thus it can be advantageous for moderate-scale MDPs, the number of constraints in the ALP is SA, hence the ALP is still intractable for huge-scale MDPs. To reduce the number of constraints, we consider a relaxation of ALP where the constraints are replaced with positive linear combinations of them. Recalling that the constraints took the form J ≥ ga + αPa J (with J = Φr), choosing m to be target number of constraints, for 1 ≤ i ≤ m, the ith new constraint P > P > is given by a wi,a J ≥ a wi,a (ga + αPa J), where the choice of m and that of the vectors wi,a ∈ RS+ is left to the user. Note that this results in a linear program with k variables and m constraints, which can be written as min c> Φr r∈Rk s.t. X a Wa> Φr ≥ X Wa> (ga + αPa )Φr , (1) a where Wa = (w1,a , . . . , wm,a ) ∈ RS×m . Note that the (i, j)th entry of the m × k constraint + P > P > matrix of the resulting LP is a wi,a φj −α a wi,a Pa φj and assuming that (wi,a )a has p nonzero elements, this can be calculated in O(p) time, making the total cost of obtaining the constraint matrix to be O(mkp) regardless the value of S and A. We will call the LP in (1) the linearly relaxed approximate linear program (LRALP). Any LP obtained using any constraint selection/generation process can be represented by choosing an appropriate binary-valued matrix W > = (W1> , . . . , WA> ) ∈ Rm×SA . In particular, when the + constraints are selected in a random process as suggested by de Farias and Van Roy [FV04], the matrix W would be a random, binary-valued matrix. Note that the LRALP may be unbounded. Unboundedness could be avoided by adding an April 11, 2017 DRAFT 9 extra constraint of the form r ∈ N to the LRALP, for a properly chosen polyhedron N ⊂ Rk .3 However, it seems to us that it is downright misleading to think that guaranteeing a bounded solution will also lead to reasonable solutions. Thus we will stick to the above simple form, forcing a discussion of how W should be chosen to get meaningful results.4 Further insight into the choice of W can be gained by considering the Lagrangians of the ALP and LRALP. To write both LP’s in a similar form let us introduce E = (IS×S , . . . , IS×S )> , where IS×S is the S × S identity matrix. Further, let H : RS → RSA be the operator defined by (HJ)> = ((T1 J)> , . . . , (TA J)> ) . Note that H, which we call the linear Bellman operator, is a linear operator. Then, the ALP can be written as min{c> Φr | EΦr ≥ HΦr} , (ALP) while LRALP takes the form min{c> Φr | W > EΦr ≥ W > HΦr} . (LRALP) Hence, their Lagrangians are LALP (r, λ) = c> Φr + λ> (HΦr − EΦr) LLRALP (r, q) = c> Φr + q > W > (HΦr − EΦr). Thus, we can view W q as a “linear approximation” to the dual variable λ ∈ RSA + . This suggests that perhaps W should be chosen such that it approximates well the optimal dual variable. If Φ spans RS , the optimal dual variable λ∗ is known to be the discounted occupancy measure underlying the optimal policy (Theorem 3.18, [Kal17]), suggesting that the role of W is very similar to the role of Φ excepts that the subspace spanned by the columns of W should ideally be close to λ∗ . 3 In particular, to obtain their theoretical result, de Farias and Van Roy [FV04] need the assumption that the set N is bounded and that it contains rALP . In fact, the error bound derived by de Farias and Van Roy depends on the worst error of approximating J ∗ with Φr when r ranges over N . Hence, if N is unbounded, their bound is vacuous. In the context of a particular application, de Farias and Van Roy [FV04] demonstrate that N can be chosen properly to control this term. However, no general construction is presented to choose N . 4 The only question is whether there is some value in adding constraints beyond choosing W properly. Our position is that the set N would most likely be chosen based on very little and general information; the useful knowledge is in choosing W , not in choosing some general set N . Since randomization does not guarantee bounded solutions, de Farias and Van Roy [FV03] must use N : In their case, N incorporates all the knowledge that makes the LP bounded. April 11, 2017 DRAFT 10 IV. M AIN R ESULTS The purpose of this section is to present our main results. Let rLRA be a solution to the LRALP given by (1) and let JLRA = ΦrLRA . When multiple solutions exist, we can choose any of them. For the result, we assume that the LRALP is not unbounded, and hence a solution exist. In fact, we will assume something much stronger. The discussion of why our assumptions are reasonable and how to ensure that they hold is postponed to after the presentation of our results. Our main results bounds the error kJ ∗ − JLRA k1,c . The bound is given in terms of the approximation error of J ∗ with the basis functions Φ = ∗ ∗ (φ1 , . . . , φk ), as well as the deviation between two functions, JALP , JLRA : S → R, which we define next. In particular, ∗ JALP (s) = min{r> φ(s) | Φr ≥ J ∗ , r ∈ Rk } , ∗ JLRA (s) = min{r> φ(s) | W > EΦr ≥ W > EJ ∗ , r ∈ Rk } , where s ∈ S. Recall that E : RS → RSA is defined so that (EJ)> = (J > , . . . , J > ), i.e., E P ∗ stacks its argument A-fold. Hence, W > E = a Wa> . Our strong assumption is that JLRA is ∗ finite-valued. Note that JALP ≥ J ∗ reflects the error due to using the basis functions (φj )j , and ∗ ∗ the magnitude of the deviation JLRA − JALP reflects the error introduced due to the relaxed constraint system. Following de Farias and Van Roy [FV03; FV04], we will quantify the magnitude of the error ∗ ∗ JLRA − JALP and also that of the error of approximating J ∗ with the subspace spanned by Φ, in terms of a weighted maximum norm, kJk∞,ψ = maxs∈S |J(s)|/ψ(s), where ψ : S → R++ is a positive-valued weighting function.5 As also stressed by de Farias and Van Roy, the appropriate choice of ψ is crucial for MDPs with huge state-spaces: The problem is that if the range of values of |J ∗ (s)| in different parts of the state space differ in orders of magnitude, we do not expect to be able to control the error of approximating J ∗ uniformly over S. By choosing the weighting function to reflect the magnitude of J ∗ , the weighted maximum norm is controlled as soon as the relative errors are and this latter goal may be much easier to achieve than controlling absolute errors. 5 As opposed to de Farias and Van Roy [FV03] and others, our definition uses division and not multiplication with the weights. We choose this form for mathematical convenience: With this definition, nice duality results hold between weighted 1-norms and weighted maximum norms. April 11, 2017 DRAFT 11 Just like de Farias and Van Roy [FV03], we will also require that ψ is a stochastic Lyapunovfunction for the MDP. In particular, we require that the α-discounted stability coefficient . βψ = α max kPa ψk∞,ψ a (2) is strictly less than one. This can be seen to imply that H : (RS , k · k∞,ψ ) → (RSA , k · k∞,ψ ) is a contraction, where for J = (J1> , . . . , JA> )> ∈ RSA we let kJk∞,ψ = maxa kJa k∞,ψ . That H is a contraction will play a crucial role in our results. Note that the condition βψ < 1 is closely related to the condition that for any policy u, Pu ψ ≤ ψ, which can be viewed as a stability condition on the MDP and which appeared in a slightly altered form in studying the stability of MDPs with infinite state spaces [e.g., CM99]. Note also that one can always choose ψ = 1, which gives β1 = α < 1. With this, we are ready to state our main result: Theorem IV.1 (Error Bound for LRALP). Assume that c ∈ RS+ is such that 1> c = 1 and that W ∈ RSA×m is nonnegative valued. Let ψ ∈ RS+ be in the column span of Φ and assume that + the α-discounted stability coefficient of ψ is βψ < 1. Let ε = inf r∈Rk kJ ∗ − Φrk∞,ψ be the error of approximation J ∗ using the basis functions in Φ. Then, kJ ∗ − JLRA k1,c ≤ 2c> ψ ∗ ∗ (2.5ε + kJALP − JLRA k∞,ψ ) . 1 − βψ Note that the result implicitly assumes that JLRA exists, because if JLRA does not exist then ∗ JLRA is necessarily unbounded, making the last error term infinite. To ensure that ψ is in the span of Φ, after choosing ψ, one can add ψ as one of the basis functions. Alternatively, the bound can also be interpreted to hold for any ψ in the span of Φ with βψ < 1. As noted earlier, de Farias and Van Roy [FV03] prove a similar error bound for JALP , the solution of the ALP. In particular, their Theorem 3 states that under identical assumptions as in our result, kJ ∗ − JALP k1,c ≤ 2c> ψε 1−βψ for ε defined as above (the result we cited previously is a simplified form of this bound). The larger coefficient of ε is probably an artifact of our analysis. Note that when W does not reduce the constraints, our bound is only a constant factor larger ∗ ∗ than this previous result. The extra term kJALP − JLRA k∞,ψ can be seen as the price paid for relaxing the constraints. From linear programming theory, it follows that primal boundedness is equivalent to dual feasibility. Since the dual of min{c> x : Ax ≥ b} is max{y > b : y ≥ 0, c = A> y}, we get ∗ that a necessary and sufficient condition for JLRA to be finite-valued is that for any s ∈ S, > > φ(s) lies in the conic span, {U λ : λ ∈ RSA + }, of (the columns) of U = Φ E W . When W April 11, 2017 DRAFT 12 is such that its constituents W1 , . . . , WA are all identical, the conic span of U is equal to the conic span of Φ> W1 . It is particularly instructive to consider the case when the common matrix Wa = (w1,a , . . . , wm,a ) “selects” the m states, i.e., when {w1,a , . . . , wm,a } = {es : s ∈ S0 } for some S0 ⊂ S, |S0 | ≤ m, where es ∈ {0, 1}S are the s ∈ S vectors in the standard Euclidean basis. In this case, the condition that φ(s) lies in the conic span of U is equivalent to that φ(s) . ∗ lies in the conic span of φ(S0 ) = {φ(s0 ) : s0 ∈ S0 }. Thus, to ensure boundedness of JLRA , the chosen states should be selected to “conicly cover” all the vectors in φ(S) ⊂ Rk .6 The next theorem shows that magnitudes of the coefficients used in the conic cover control the ∗ ∗ 0 be the matrix of conic coefficients: size of kJALP − JLRA k∞,ψ . For the theorem we let Λ ∈ RS×S + P For any s ∈ S, φ(s) = s0 ∈S0 Λ(s, s0 )φ(s0 ). After the theorem we give constructions for creating conic covers. Theorem IV.2. Assume that W1 = · · · = WA , {w1,a , . . . , wm,a } = {es : s ∈ S0 } and that φ(S) lies in the conic span of φ(S0 ) with conic coefficients given by Λ. Let ε = inf r kJ ∗ − Φrk∞,ψ . Then, ∗ ∗ ∗ kJALP − JLRA k∞,ψ ≤ kJALP − J ∗ k∞,ψ + (1 + kΛψkψ,∞ )ε . Proof. Let r∗ be such that kJ ∗ − Φr∗ k∞,ψ = ε (this exists by continuity) and let δ = J ∗ − Φr∗ . ∗ Pick any s ∈ S and let rs = argmin{r> φ(s) : W > EΦr ≥ W > EJ ∗ , r ∈ Rk } so that JLRA (s) = ∗ rs> φ(s). Note that by assumption, for any s0 ∈ S0 , JLRA (s0 ) = rs> φ(s0 ) ≥ J ∗ (s0 ). Now, notice ∗ ∗ ∗ ∗ that by definition, JLRA ≤ JALP (the LP defining JLRA is the relaxation of the LP defining JALP ). Hence, ∗ ∗ ∗ ∗ 0 ≤ JALP (s) − JLRA (s) = JALP (s) − J ∗ (s) + J ∗ (s) − JLRA (s) ∗ and JLRA (s) = rs> φ(s) = rs> P s0 ∈S0 Λ(s, s0 )φ(s0 ) = P s0 ∈S0 ∗ Λ(s, s0 )JLRA (s0 ) ≥ P s0 ∈S0 Λ(s, s0 )J ∗ (s0 ). Combining this with the previous inequality we get ∗ J ∗ (s) − J ∗ (s) J ∗ (s) − J ∗ (s) − JLRA (s) ≤ ALP + 0 ≤ ALP ψ(s) ψ(s) 6 P Λ(s, s0 )J ∗ (s0 ) . ψ(s) s0 ∈S0 The same implies that, under the same condition on W , boundedness of the LRALP holds if and only if P s c(s)φ(s) is in the conic span of φ(S0 ). Note that this is easy to fulfill if the support of c has a small cardinality by add all states in the support of c to S0 . April 11, 2017 DRAFT 13 Plugging in J ∗ (s) = φ(s)> r∗ +δ(s), using again that φ(s) = P s0 ∈S0 Λ(s, s0 )φ(s0 ), and also using the triangle inequality after taking absolute values, we get P P |J ∗ (s) − s0 ∈S0 Λ(s, s0 )J ∗ (s0 )| Λ(s, s0 )|δ(s0 )| |δ(s)| 0 ≤ + s ∈S0 ψ(s) ψ(s) ψ(s) 1 X |δ(s0 )| |δ(s)| + Λ(s, s0 )ψ(s0 ) ≤ ψ(s) ψ(s) s0 ∈S ψ(s0 ) 0 P Λ(s, s0 )ψ(s0 ) |δ(s)| 0 ≤ + kδk∞,ψ s ∈S0 . ψ(s) ψ(s) Combining this with the previous display and noting that kδk∞,ψ = ε finishes the proof. Given φ : S → Rk , what is the minimum cardinality set S0 that conicly covers φ(S) and how to find such a set? Further, how to keep the magnitude of kΛψk∞,ψ small? To control this latter quantity it seems essential to make sure S0 contains states with high ψ-values. However, if one is content with a bound that depends on kψk∞ , one can bound kΛψk∞,ψ by kψk∞ ζ where P ζ = maxs s0 ∈S0 Λ(s, s0 ), hence, the second term in the previous bound will be bounded by (1 + kψk∞ ζ)ε. Let us now return to the problem of finding conic covers. We will proceed by considering some illustrative examples. As a start, consider the case when the basis functions are binary valued. In this case, it is sufficient and necessary to choose one state for each binary vector . that appears in φ(S) ⊂ {0, 1}k . This gives that m0 = |S0 | ≤ 2k representative states will be sufficient regardless of the cardinality of S. Further, in this case ζ = 1. For moderate to large k (e.g., k  20), it will quickly become infeasible to keep 2k constraints. In this case we may need to restrict what features are considered to guarantee the conic cover condition. Letting Ai = {s ∈ S : φi (s) = 1}, if for a many pairs i 6= j, Ai and Aj do not overlap then N = |φ(S)| can be much smaller than 2k . For example, in the commonly used state aggregation procedures Ai ∩Aj = ∅ for any i 6= j, giving N = k. In the more interesting case of hierarchical aggregation (when the sets {Ai } form a nested hierarchical partitioning of S), we have m0 ≤ D · k where D is the depth of the hierarchy. Another favourable example is the case of separable bases. In this case, the states are assumed to be factored and the basis functions depend only on a few factors. Let us consider a simple illustration. By abusing notation (redefining S), let S = S1 ×S2 , let there be k = 2 basis functions and assume that φi (s) = hi (s) for some hi : Si → R, i = 1, 2. Assume further that 0 ∈ hi (Si ) for both i and specifically let si0 be such that hi (si0 ) = 0. In this case it is not hard to verify that April 11, 2017 DRAFT 14 if Si0 is such that hi (Si ) is in the conic span of hi (Si0 ) then φ(S) is also in the conic span of . S0 = S1 × {s20 } ∪ {s10 } × S2 . The point is that |S0 | ≤ |S1 | + |S2 |, which is a tolerable increase of growth. This example is not hard to generalize to more general, ANOVA-like basis expansions. The moral is that as long as their limited order of interaction (which is usually necessary for information theoretic reasons as well), the number of constraints may grow moderately with the number of factors (dimensionality) of the state space. In some cases, finding a conic cover with a small cardinality is not possible. This can already happen in simple examples such as when S = {1, . . . , S} (as before) and φ(s) = (1, s, s2 )> . In this case, the only choice is S0 = S. In examples similar to this one one possibility is to quantize the range of φ, which may loose little on approximation quality, while it creates the opportunity to construct a small cardinality conic cover. Note that the bound of [FV04] and our main result can be seen as largely complementary. Recall that de Farias and Van Roy consider adding an extra constraint r ∈ N , while they propose to select all A constraints from the ALP corresponding to m states chosen at random from some distribution µ. Then, with high probability, they show that, provided that rALP ∈ N , the extra price paid for relaxing the constraints of the ALP is O(ρεN k/m), where ρ = maxs µ∗ (s) , µ(s) µ∗ = (1 − α)c> (I − αPu∗ )−1 , u∗ is an optimal policy, and εN = supr∈N kJ ∗ − Φrk∞,ψ .7 The bound is nontrivial when m ≥ ρεN k. In general, it may be hard to control ρ, or even εN while ensuring that rALP ∈ N . V. P ROOF OF T HEOREM IV.1 In this section we present the proof of the main result, Theorem IV.1. The proof uses contraction-arguments. We will introduce a novel contraction operator, Γ̂ : RS → RS , that captures the distortion introduced by the extra constraint in ALP and the relaxation in LRALP, respectively. Then we relate the solution of LRALP to the fixed point of Γ̂. ∗ Note that for the proof it suffices to consider the case when JLRA is finite-valued because otherwise the bound is vacuous. Also, recall that it was assumed that ψ lies in the column space of Φ, while βψ , the α-discounted stability of ψ w.r.t. the MDP (cf. (2)) is strictly below one. We will let r0 ∈ Rk be such that ψ = Φr0 . We also assumed that the matrix W is nonnegative P valued, while c specifies a probability distribution over S: s c(s) = 1 and c ∈ RS+ . 7 The paper presents the results for µ = µ∗ giving ρ = 1, but the analysis easily extends to the general case. April 11, 2017 DRAFT 15 The operator Γ̂ are defined as follows: For J ∈ RS , s ∈ S, (Γ̂J)(s) = min{r> φ(s) : W > EΦr ≥ W > EHJ, r ∈ Rk } . Note that (Γ̂J)(s) mimics the definition of ALP with c = es , except that the constraint J = Φr is dropped. Let us now recall some basic results from the theory of contraction maps. First, let us recall the definition of contractions. Let k · k be a norm on RS and ρ > 0. We say that the map B : RS → RS is (ρ, k · k)-Lipschitz if for any J, J 0 ∈ RS , kBJ − BJ 0 k ≤ ρkJ − J 0 k. We say that B is a k · k-contraction with factor ρ if it is (ρ, k · k)-Lipschitz and ρ < 1. It is particularly easy to check whether a map is a contraction map with respect to a weighted maximum norm if it is known to be monotone. Here, B is said to be monotone if for any J ≤ J 0 , J, J 0 ∈ RS , BJ ≤ BJ 0 also holds, where ≤ is the componentwise partial order between vectors. We start with the following characterization of monotone contractions with respect to weighted maximum norms: Lemma V.1. Let B : RS → RS , ψ : S → R++ , β ∈ (0, 1). The following are equivalent: (i) B is a monotone contraction map with contraction factor β with respect to k · kψ,∞ . (ii) For any J, J 0 ∈ RS , t ≥ 0, J ≤ J 0 + tψ implies that BJ ≤ BJ 0 + βtψ. The proof, which essentially copies that of Lemma 3.1 of [Kal17], is given for completeness: Proof. Introduce · to denote elementwise products: Thus, (ψ · J)(s) = ψ(s)J(s). We also let ψ −1 (s) = 1/ψ(s) and we will use the shorthand k · k = k · k∞,ψ . Let us first prove (i) ⇒ (ii). Thus, assume that B is a monotone contraction map with factor β. Take any J, J 0 , t > 0, J ≤ J 0 + tψ. We have BJ = B(J + tψ) − BJ 0 + BJ 0 ≤ (ψ −1 · (B(J + tψ) − BJ 0 )) · ψ + BJ 0 ≤ kB(J + tψ) − BJ 0 kψ + BJ 0 ≤ βtkJ − J 0 kψ + BJ 0 . For the reverse direction, note that monotonicity follows by taking t = 0. Now, let ε = kJ−J 0 k. Then, J ≤ J 0 + εψ and J 0 ≤ J + εψ. By monotonicity and the assumed property of B (using t = ε ≥ 0), −βεψ ≤ BJ − BJ 0 ≤ βεψ, which implies that kBJ − BJ 0 k ≤ β. Corollary V.2. If B is monotone and there exists some β ∈ [0, 1) such that for any J ∈ RS and any t > 0, B(J + tψ) ≤ BJ + βtψ April 11, 2017 (3) DRAFT 16 then B is a k · k∞,ψ contraction with factor β. Proof. Let J, J 0 ∈ RS , t ≥ 0 and assume that J ≤ J 0 + tψ. By monotonicity BJ ≤ B(J 0 + tψ), while by (3), B(J 0 + tψ) ≤ BJ 0 + βtψ. Hence, BJ ≤ BJ 0 + βtψ. This shows that (ii) of Lemma V.1 holds. Hence, by this lemma, B is a contraction with factor β with respect to k · k∞,ψ . Let us now return to the proof of our main result. Recall that the goal is to bound kJ ∗ − JLRA k1,c through relating this deviations from the fixed point of Γ̂, which was promised to be a contraction. Let us thus now prove this. For this, it suffices to show that Γ̂ satisfies the conditions of Corollary V.2. In fact, we will see this holds with β = βψ . Proposition V.3. The operator Γ̂ satisfies the conditions of Corollary V.2 with β = βψ , and is thus a k · k∞,ψ -contraction with coefficient βψ . Proof. First, note that (as it is well known) H is monotone (all the Pa matrices in the definition of H are nonnegative valued) and that it satisfies an inequality similar to (3): For any t ≥ 0, J ∈ RS , H(J + tψ) ≤ HJ + βψ t Eψ . (4) This follows again because our assumption on ψ implies that for any a ∈ A, αPa ψ ≤ βψ ψ. . Let us now prove that Γ̂ is monotone. Given J ∈ RS , let F 0 (J) = { Φr : W > EΦr ≥ W > HJ, r ∈ Rk } . Choose any s ∈ S. Since J1 ≤ J2 , W is nonnegative valued and H is monotone, we have W > HJ1 ≤ W > HJ2 . Hence, FJ2 ⊂ FJ1 and thus (Γ̂J1 )(s) ≤ (Γ̂J2 )(s). Since s was arbitrary, monotonicity of Γ̂ follows. Let us now turn to proving that (3) holds with β = βψ . By definition, for s ∈ S, t ≥ 0, J ∈ RS , (Γ̂(J + tψ))(s) = min{r> φ(s) : W > EΦr ≥ W > H(J + tψ), r ∈ Rk }. By (4), H(J + tψ) ≤ HJ + tβψ Eψ and hence W > H(J + tψ) ≤ W > (HJ + tβψ Eψ). Thus, (Γ̂(J + tψ))(s) ≤ min{r> φ(s) : W > EΦr ≥ W > (HJ + tβψ Eψ), r ∈ Rk }. To finish, we need the following elementary observation: Claim V.4. Let A ∈ Ru×v , b ∈ Ru , d ∈ Rv and b0 = Ax0 for some x0 ∈ Rv . Then min{d> x : Ax ≥ b + b0 , x ∈ Rv } = min{d> y : Ay ≥ b, y ∈ Rv } + d> x0 . April 11, 2017 DRAFT 17 Proof of Claim V.4. Set y = x − x0 . Now, using Claim V.4 with A = W > EΦ, b = W > HJ, d = φ(s), b0 = tβψ W > Eψ and x0 = tβψ r0 , thanks to Φr0 = ψ we have Ax0 = b0 . Hence the desired statement follows from the claim. Let us now return to bounding kJ ∗ − JLRA k1,c . For x ∈ R, let (x)− be the negative part of x: (x)− = max(−x, 0). Then, |x| = x + 2(x)− . For a vector J ∈ RS , we will write (J)− to denote the vector obtained by applying the negative part componentwise. We consider the decomposition kJLRA − J ∗ k1,c = c>(JLRA − J ∗ ) + 2c>(JLRA − J ∗ )− . (5) Let VLRA be the fixed point Γ̂. We know claim the following: Claim V.5. We have JLRA ≥ VLRA , c> JALP ≥ c> JLRA . Proof. The inequality c> JALP ≥ c> JLRA follows immediately from the definitions of JALP and JLRA . To prove the first part let s ∈ S, c = es and let rs be a solution to LRALP in (1). For s ∈ S, let V0 (s) = mins0 ∈S rs>0 φ(s). . It suffices to show that V1 = Γ̂V0 ≤ V0 ≤ JLRA . Indeed, if this holds then Vn+1 = Γ̂Vn , n ≥ 1, satisfies Vn+1 ≤ Vn and Vn → VLRA as n → ∞ since Γ̂ is a monotone contraction mapping. Since rs>0 φ(s) ≥ rs> φ(s) also holds for any s, s0 ∈ S, we have V0 (s) = rs> φ(s). Also, since JLRA (s) ≥ rs> φ(s), it follows that JLRA ≥ V0 . Now, fix some s ∈ S and define re0 s ,V0 be the solution to the linear program defining (Γ̂V0 )(s). We need to show that V1 (s) = (Γ̂V0 )(s) = (re0 s ,V0 )> φ(s) ≤ V0 (s). By the definition of re0 s ,V0 we know that (re0 s ,V0 )> φ(s) ≤ r> φ(s) holds for any r ∈ Rk such that W > EΦr ≥ W > HV0 . Thus, it suffices to show that rs satisfies W > EΦrs ≥ W > HV0 . By definition, rs satisfies W > EΦrs ≥ W > HΦrs . Hence, by the monotone property of H and since W is nonnegative valued, it is sufficient if Φrs ≥ V0 . This however follows from the definition of V0 . Thanks to the previous claim, (JLRA − J ∗ )− ≤ (VLRA − J ∗ )− and c> JLRA ≤ c> JALP . Hence, from (5) we get kJLRA − J ∗ k1,c ≤ c>(JALP − J ∗ ) + 2c>(VLRA − J ∗ )− . April 11, 2017 DRAFT 18 > c ψ ε, where recall that ε = inf r kJ ∗ − By Theorem 3 of [FV03], the first term is bounded by 2 1−β ψ Φrk∞,ψ . Hence, it remains to bound the second term. For this, note that for any J ∈ RS , (J)− ≤ |J| and also that kJk1,c ≤ c> ψkJk∞,ψ . Hence, we switch to bounding kJ ∗ − VLRA k∞,ψ . A standard contraction argument gives kJ ∗ − VLRA k∞,ψ = kJ ∗ − Γ̂J + Γ̂J ∗ − Γ̂VLRA k∞,ψ ≤ kJ ∗ − Γ̂J ∗ k∞,ψ + kΓ̂J ∗ − VLRA k∞,ψ ≤ kJ ∗ − Γ̂J ∗ k∞,ψ + βψ kΓ̂J ∗ − VLRA k∞,ψ . Reordering and using another triangle inequality we get kJ ∗ − VLRA k∞,ψ ≤ ∗ ∗ kJ ∗ − JALP k∞,ψ + kJALP − Γ̂J ∗ k∞,ψ . 1 − βψ ∗ We bound the term kJ ∗ − JALP k∞,ψ in the following lemma: ∗ Lemma V.6. We have kJ ∗ − JALP k∞,ψ ≤ 2ε, where recall that ε = inf r∈Rk kJ ∗ − Φrk∞,ψ . . ∗ ∗ Proof. Let r∗ = argminr∈Rk kJ ∗ − Φrk∞,ψ . First, notice that JALP ≥ J ∗ . Hence, 0 ≤ JALP − J ∗. Now let r0 = r∗ + εr0 . Then, Φr0 = Φr∗ + εψ ≥ J ∗ , where the equality follows by the definition of r0 and the inequality follows by the definition of ε. Hence, r0 is in the feasible set of the ∗ ∗ ∗ LP defining JALP and thus JALP ≤ Φr0 . Thus, 0 ≤ JALP − J ∗ ≤ Φr∗ − J ∗ + εψ. Dividing componentwise by ψ, taking absolute value and then taking maximum of both sides gives the result. ∗ The proof of the main result is finished by noting that Γ̂J ∗ = JLRA and the chaining the inequalities we derived. VI. N UMERICAL I LLUSTRATION In this section, we show via an example in the domain of controlled queues the consequences of Theorem IV.2, which bounded the error when the constraints are chosen based on selecting a set of representative states (further preliminary experimental results have been reported in [LB15]). Model: We ran the experiments in the context of a queuing model similar to the one in Section 5.2 of [FV03]. We consider a (simple) small scale model so that we can compare with the optimal policy. At the same time, we will use a small number of basis functions and constraints, to “stress-test” the algorithm. The queuing system has a single queue with random April 11, 2017 DRAFT 19 arrivals and departures. The state of the system is the queue length with the state space given by S = {0, . . . , S − 1}, where S − 1 is the buffer size of the queue. The action set A = {1, . . . , A} is related to the service rates. We let st denote the state at time t. The state at time t + 1 when action at ∈ A is chosen is given by st+1 = st + 1 with probability p, st+1 = st − 1 with probability q(at ) and st+1 = st , with probability (1−p−q(at )). For states st = 0 and st = S −1, the system dynamics is given by st+1 = st + 1 with probability p when st = 0 and st+1 = st − 1 with probability q(at ) when st = S − 1. The service rates satisfy 0 < q(1) ≤ . . . ≤ q(A) < 1 with q(A) > p so as to ensure ‘stabilizability’ of the queue. The reward associated with action a ∈ A and state s ∈ S is given by ga (s) = −(s/N + q(a)3 ) (the idea here is to penalize higher queue lengths and higher service rates). Parameter Settings: We ran our experiments for S = 1000, A = 4 with q(1) = 0.2, q(2) = 0.4, q(3) = 0.6, q(4) = 0.8, p = 0.4 and α = 1 − S1 . The moderate size of S = 1000 enabled us to compute the exact value of J ∗ (the most expensive part of the computation). We made use of polynomial features in Φ (i.e., 1, s, . . . , sk−1 ) since they are known to work reasonably well for this domain [FV03]. Note hat the conic span conditions will only be met with some lag, unless all the constraints are selected. Hence, these features allow us to test the limits of the theory. We chose k = 4, a low number, to counteract that the MDP is small scale. Experimental Methodology: We compare two different sampling strategies (i) based on the cone conditions, and (ii) based on constraint sampling. The two strategies are compared via lookahead policies, wherein, the action at state s is obtained by computing the approximate value functions of the next states and selecting the action that leads to the larger estimated value. The details are as follows: Case (i): Except for the corner states i.e., s = 0 and s = 999, each state 0 < s < S − 1 has two next states namely s0 = s − 1 and s0 = s + 1. We formulate two separate LRALPs (or just one LRALP for s = 0 and s = S −1) for next states. When formulating the LRALP for state s0 , we let c = es0 and choose the constraint corresponding to state s0 to ensure the cone condition to be met for LRALP. We choose 5 more constraints corresponding to states 1, 200, 400, 600, 800, 999 (uniformly spaced across the state space) and compute Jˆe 0 . The s number of constraints is kept very small as a way of emulating that in large-scale problems we cannot expect a dense covering of the state-space when selecting the constraints. The lookahead P policy is formulated as uLRA (s) = argmina∈A ga (s) + s0 ∈S pa (s, s0 )Jˆes0 (s0 ). Case (ii): In a manner similar to Case (i), we formulate two separate LRALPs for next states. However, as opposed to the previous case, when formulating the LRALP for state s0 , we sample m = 6 April 11, 2017 DRAFT 20 states (defining the constraints) from a distribution dependent on s0 . We experimented with two sampling distributions that lead to two the lookahead policies that we denote by uCS−ideal and uCS , respectively. The sampling distribution that defines uCS−ideal is the sampling distribution that minimizes the upper bound proved by de Farias and Van Roy [FV04]. In particular, the −1 sampling distribution used at state s0 is cs0 = e> s0 (1−α)(I −αPu∗ ) , with es denoting the standard basis vector which is 1 in the sth co-ordinate and 0 in all the other co-ordinates. This sampling distribution is used as a baseline; it is unrealistic to assume that one would be able to sample from this distribution without access to the optimal policy u∗ , which is the quantity of ultimate 0 interest. As a more realistic approach, we also consider sampling from cs0 (s) = κ(1−α)(α)|s −s| , where κ > 0 is a normalization factor that ensures that cs0 is a distribution. Again, we sample m = 6 states. This leads to the policy uCS . 0 4 −200 3 −400 −600 2 −800 1 0 200 400 600 J∗ JCS JCS−ideal JLRA 800 0 200 400 600 800 1,000 u∗ uCS uCS−ideal uLRA Fig. 1. Results for a single-queue with polynomial features. On both figures the x axis represents the state space: the length of the queue. The left-hand-side figure shows the value functions of the various policies computed, alongside with the optimal value function (higher values are better), while the right-hand side subfigure shows the underlying policies. “CS” and “CS-ideal” stand for constraint sampling, while LRA stands for choosing the constraints based on geometric principles proposed in the paper. For further details, see the text. The results are shown in Fig. 1. The right-hand-side figure shows the policies computed, while the left-hand-side figure shows their value functions. Since constraint sampling (CS) produces randomized results, we repeated the simulations 10 times. The results in all cases were quite April 11, 2017 DRAFT REFERENCES 21 close, hence we show the plot for a typical run. The plots show that the CS case with the ideal sampler is slightly worse, which can be attributed to the fact that the in the case of ideal sampler, the sampling distribution is concentrated near the start state s0 in comparison to the behaviour 0 of the distribution cs0 (s) = (1 − α)(α)|s −s| which distributes the mass more evenly. As can be seen from the figure, choosing the constraints to (approximately) satisfy the constraint of the theoretical results reliably produces better results: In fact, the value functions J ∗ and JLRA are mostly on the top of each other. We expect that in larger domains, differences between constraints chosen based on the principles discovered in this paper and choosing constraints in more heuristic ways will lead to similar, or even larger differences. However, the study of this is left for future work. VII. C ONCLUSION In this paper, we introduced and analyzed the linearly relaxed approximate linear program (LRALP) whose constraints were obtained as positive linear combination of the original constraints of the ALP. The main novel contribution is a theoretical result which gives a geometrically interpretable bound on the performance loss due to relaxing the constraint sets. Possibilities for future work include extending the results to other forms of approximate linear programming in MDPs (e.g., [DFM09]), exploring the idea of approximating dual variables and designing algorithms that use the newly derived results to actively compute what constraints to select. R EFERENCES [AA+15] M. Abu Alsheikh, D. T. Hoang, D. Niyato, H.-P. Tan, and S. Lin, “Markov decision processes with applications in wireless sensor networks: A survey,” IEEE Comm. Surveys & Tutorials, vol. 17, pp. 1239–1267, 2015. [AYBM14] Y. Abbasi-Yadkori, P. Bartlett, and A. Malek, “Linear programming for large-scale Markov decision problems,” in ICML, 2014, pp. 496–504. [BD17] R. J. Boucherie and N. M. van Dijk, Eds., Markov decision processes in practice. Springer, 2017, vol. 248. [BFM12] N. Bhat, V. Farias, and C. C. Moallemi, “Non-parametric approximate dynamic programming via the kernel method,” in NIPS, 2012, pp. 386–394. [BR11] N. Bäuerle and U. Rieder, Markov decision processes with applications to finance. Springer, 2011. April 11, 2017 DRAFT REFERENCES [BT00] 22 V. D. Blondel and J. N. Tsitsiklis, “A survey of computational complexity results in systems and control,” Automatica, vol. 36, pp. 1249–1274, 2000. [CM99] R.-R. Chen and S. P. Meyn, “Value iteration and optimization of multiclass queueing networks,” Queueing Systems, vol. 32, no. 1-3, pp. 65–97, 1999. [DFM09] V. V. Desai, V. F. Farias, and C. C. Moallemi, “A smoothed approximate linear program,” in NIPS, 2009, pp. 459–467. [FS02] E. A. Feinberg and A. Shwartz, Handbook of Markov decision processes: Methods and applications. Kluwer Academic Publishers, 2002. [FV03] D. P. de Farias and B. Van Roy, “The linear programming approach to approximate dynamic programming,” Operations Research, vol. 51, pp. 850–865, 2003. [FV04] ——, “On constraint sampling in the linear programming approach to approximate dynamic programming,” Mathematics of Operations Research, vol. 29, pp. 462– 478, 2004. [Gue+03] C. Guestrin, D. Koller, R. Parr, and S. Venkataraman, “Efficient solution algorithms for factored MDPs,” J. of Artificial Intelligence Research, vol. 19, pp. 399–468, 2003. [HY07] Q. Hu and W. Yue, Markov decision processes with their applications. Springer, 2007. [Kal17] L. Kallenberg. (2017). Markov decision processes: Lecture notes, [Online]. Available: https://goo.gl/yhvrph (visited on 03/16/2017). [KH04] B. Kveton and M. Hauskrecht, “Heuristic refinements of approximate linear programming for factored continuous-state Markov decision processes,” in ICAPS, 2004, pp. 306–314. [KM12] A. Kolobov and Mausam, “Planning with Markov decision processes: An AI perspective,” Synthesis Lectures on Artificial Intelligence and Machine Learning, 2012. [KMN02] M. Kearns, Y. Mansour, and A. Y. Ng, “A sparse sampling algorithm for nearoptimal planning in large Markov decision processes,” Machine learning, vol. 49, pp. 193–208, 2002. [LB15] C. Lakshminarayanan and S. Bhatnagar, “A generalized reduced linear program for Markov Decision Processes,” in AAAI, 2015, pp. 2722–2728. April 11, 2017 DRAFT 23 [LL12] F. L. Lewis and D. Liu, Eds., Reinforcement learning and approximate dynamic programming for feedback control. Wiley-IEEE Press, 2012. [PP11] J. Pazis and R. Parr, “Non-parametric approximate linear programming for MDPs,” in AAAI, 2011. [Put94] M. L. Puterman, Markov decision processes: Discrete stochastic programming. New York: John Wiley, 1994. [PZ09] M. Petrik and S. Zilberstein, “Constraint relaxation in approximate linear programs,” in ICML, 2009, pp. 809–816. [Rus96a] J. Rust, “Numerical dynamic programming in economics,” in Handbook of Computational Economics, vol. 1, Elsevier, North Holland, 1996, pp. 619–729. [Rus96b] ——, “Using randomization to break the curse of dimensionality,” Econometrica, vol. 65, pp. 487–516, 1996. [SB10] O. Sigaud and O. Buffet, Eds., Markov decision processes in artificial intelligence. Wiley-ISTE, 2010. [SP01] D. Schuurmans and R. Patrascu, “Direct value-approximation for factored MDPs,” in NIPS, 2001, pp. 1579–1586. [SS85] P. J. Schweitzer and A. Seidmann, “Generalized polynomial approximations in Markovian decision processes,” Journal of Mathematical Analysis and Applications, vol. 110, pp. 568–582, 1985. [Sze01] Cs. Szepesvári, “Efficient approximate planning in continuous space Markovian decision problems,” AI Communications, vol. 13, no. 3, pp. 163–176, 2001. [Tay+10] G. Taylor, M. Petrik, R. Parr, and S. Zilberstein, “Feature selection using regularization in approximate linear programs for Markov decision processes,” in ICML, 2010, pp. 871–878. [Whi93] D. J. White, “A survey of applications of markov decision processes,” The Journal of the Operational Research Society, vol. 44, no. 11, pp. 1073–1096, 1993. April 11, 2017 DRAFT
3cs.SY
A Systematic Aspect-Oriented Refactoring and Testing Strategy, and its Application to JHotDraw Arie van Deursen1,2 , Marius Marin2 , and Leon Moonen2,1 arXiv:cs/0503015v1 [cs.SE] 5 Mar 2005 1 2 Centrum voor Wiskunde en Informatica (CWI), The Netherlands Software Evolution Research Lab, Delft Univ. of Technology, The Netherlands [email protected], [email protected], and [email protected] Abstract. Aspect oriented programming aims at achieving better modularization for a system’s crosscutting concerns in order to improve its key quality attributes, such as evolvability and reusability. Consequently, the adoption of aspect-oriented techniques in existing (legacy) software systems is of interest to remediate software aging. The refactoring of existing systems to employ aspectorientation will be considerably eased by a systematic approach that will ensure a safe and consistent migration. In this paper, we propose a refactoring and testing strategy that supports such an approach and consider issues of behavior conservation and (incremental) integration of the aspect-oriented solution with the original system. The strategy is applied to the JH OT D RAW open source project and illustrated on a group of selected concerns. Finally, we abstract from the case study and present a number of generic refactorings which contribute to an incremental aspect-oriented refactoring process and associate particular types of crosscutting concerns to the model and features of the employed aspect language. The contributions of this paper are both in the area of supporting migration towards aspect-oriented solutions and supporting the development of aspect languages that are better suited for such migrations. 1 Introduction Aspect-oriented software development is a programming paradigm that addresses crosscutting concerns: behavior of a software system that is hard to decompose and isolate in existing paradigms (as object orientation) and requires its implementation to be spread across many different modules. Aspect-oriented software development aims to overcome these limitations by capturing such crosscutting behavior in a new modularization unit, the aspect, and offers (compile time) code generation facilities to weave aspect code into the rest of the system. Claimed benefits include improved evolvability and reusability of (parts of) the software system [12, 23]. Addressing the aforementioned modularization limitations and the resulting code scattering and tangling does not only pay off in the development of new applications but it will also have major benefits in existing software systems where these, and associated, problems have become known as software aging [33] or software entropy [24–26]. The adoption of aspect-orientation in existing software requires refactoring: code transformations that improve the internal structure of a system while preserving its external behavior. Existing work on aspect-introducing-refactorings has mainly focused on presenting aspect-oriented solutions to typical crosscutting problems, especially in the context of design patterns, and showing that this results in a better separation of concerns [19, 23, 31, 32]. Also tool support for aspect extensions of refactorings, such as method extraction, has been investigated [13]. We argue, however, that widespread adoption of aspect-oriented techniques in existing software systems is still hindered by a number of open issues: – Lack of a systematic approach to refactor legacy code to employ aspect-oriented solutions; – Proper understanding of the testing challenges that rise from behavior preserving migration towards a new or extended language, such as the development of an aspect-oriented fault model and the definition of an explicit test adequacy criterion; – Suitability of aspect languages. Analysis of crosscutting concerns that were identified in various object-oriented systems in earlier work ([29]) suggested that we might encounter difficulties when trying to refactor those concerns into aspects: the mechanisms offered by particular aspect languages, or the joint point model behind the language were not always sufficient to capture all types of concerns that were encountered; – Availability of aspect-oriented and non-aspect-oriented implementations of the same software system which can be used to show the evolution benefits of proposed solutions; and, more generally, – An overall assessment of the benefits of aspect-oriented software development. These issues are the principal motivation for the work described in this paper. To address them, we propose a language and system independent refactoring and testing strategy to adopt aspect-oriented solutions in legacy code. The strategy consists of a number of systematic steps that guide the transformation, ensure conservation of observable behavior and help one deal with the intricacies of aspect-oriented migrations. We demonstrate suitability of the proposed strategy in a case study in which we migrate JH OT D RAW, a (relatively) large and well-designed open source Java application, to AJ HOT D RAW, a corresponding aspect-oriented version which is based on A SPECT J, an aspect language extending Java with crosscutting functionality. Based on the difficulties that were encountered during our refactorings, we reflect on the suitability of particular (features of) aspect languages for this type of work (i.e. evolution of legacy systems as opposed to greenfield development). This provides designers of aspect languages with valuable insights into situations that require model or feature extensions to address these concerns. The remainder of the paper is structured as follows: In the next section we propose an aspect-oriented refactoring and testing strategy together with its accompanying fault model and test adequacy criterion. This is followed by a section that presents general considerations about the case study. Next, a number of selected crosscutting concerns are discussed on an individual basis, depicting the context in which they occur, the original and refactored implementation together with the benefits and drawbacks. In 2 Section 5, a number of generic refactorings are abstracted from the case study and associations are made between types of crosscutting functionality and the aspect language model and features. We conclude with a general discussion followed by an overview of related work, summary of our contributions and present some directions for future work. 2 The B ETTAR Refactoring Strategy The refactoring strategy we propose is called B ETTAR: its objective is to obtain Better Evolvability Through Tested Aspect Refactorings. We distinguish the following steps: Identification of Crosscutting Concerns: Search for candidate aspects using “aspect mining” techniques such as fan-in analysis or clone detection [6, 29, 36]. Assess the scattering and tangling implications of the current non-aspect-oriented solution to the crosscutting concerns identified. Aspect Design: Identify how the concern could be implemented as an aspect. Assess the pros and cons and compare these with the existing solution. Refactoring Design: Devise a sequence of (small) steps, refactoring the object solution to the aspect solution. This may involve various traditional object-oriented refactorings, in order to unplug the crosscutting concern from code implementing other concerns, in addition to refactorings moving functionality to aspects. Conduct trade-off analysis to determine whether the aspect benefits outweigh the refactoring costs. Test Suite Design: Conduct a baseline test on the existing implementation, and analyze the test adequacy of the current test suite with respect to the risks introduced by the aspect-oriented solution as well as by the refactoring process itself. If necessary, create or extend the test suite – see the next section for further details on this step. Execute and Test: Carry out the refactorings, and verify that the behavior of the system is unaltered by means of the test suite. In Section 4 we will apply these steps to various cross cutting concerns as occurring in the open source JH OT D RAW system. As the interplay between refactoring and testing, in particular in an aspect-oriented setting, has received very little attention in the literature so far, we start by elaborating the testing steps. 2.1 Ensuring Behavior Preservation while Refactoring to Aspects Refactoring is the process of changing a software system in such a way that it improves the code’s internal structure, without altering its external behavior [14]. In order to ensure the latter constraint, most literature on refactoring assumes the presence of a test suite that verifies the correct functional behavior of the system to be refactored. As long as this test suite is executed before and after each refactoring, we can assume that we will be warned as soon as one of our refactorings affects the correct behavior of the system. 3 In practice, however, the creation of such a test suite is challenged by a number of issues. These hold in the general (pure object-oriented) situation, as well as in a setting where the refactoring includes the introduction of aspects. These issues are: – To test effectively, testing should be based on a fault model. Such a fault model guides our search for test cases that give the highest probability of finding typical faults [4]. The adoption of aspects opens opportunities for different types of faults, calling for an explicit aspect-oriented fault model. – Systematic testing makes use of an explicit test adequacy criterion (see, e.g., [4]), usually expressed as a coverage percentage to be achieved in some coverage model. Refactoring changes the internal structure of the code. Since test adequacy is expressed in terms of code structures covered, a refactoring may very well affect coverage negatively — a phenomenon referred to as the antiextensionality axiom by Weyuker [38]. – In addition to new faults introduced by using aspects, the mechanics of actually carrying out a refactoring may lead to a new fault. For example, when we moved part of a method from a class to an aspect, we did not copy-paste all statements. At other times, refactorings affect the public interface of classes, for example when moving a public method. This implies that the test suite needs to be adapted as well, causing an extra risk of letting errors pass [11]. This calls for a testing approach that is dedicated to refactorings involving the introduction of aspects. In this section, we provide such an approach. In order to do so, we first propose an aspect-oriented fault model, as well as aspect-oriented test adequacy criteria. Note that such a model and criteria can never be complete: we believe, however, that our proposals represent an important first step. The specific faults that can be made while refactoring depend on the actual refactoring applied. Therefore, we will not provide a general fault model for refactorings, but will indicate typical faults and testing implications when discussing some of the individual refactorings that we have used. We will then also indicate whether the refactoring may require changes to existing test cases. The test strategy presented below is applicable to any development project making use of aspects, and as such is independent of our case study on JH OT D RAW. In the later sections we will discuss how we actually applied the proposed fault model and adequacy criteria when while refactoring JH OT D RAW to AJ HOT D RAW. 2.2 An Aspect-Oriented Fault Model A fault model identifies relationships and components of the system under test that are most likely to have faults [4]. We distinguish faults for inter-type declarations, pointcuts, and advice. Inter-type declarations are most error-prone (and most powerful) when used to create polymorphic functions. Therefore, our fault model for introductions is based on Binder’s existing fault models for polymorphism and inheritance [4, p.501]. Our model distinguishes the following faults that are specifically related to polymorphism in introductions and inter-type declarations: 4 – Wrong method name in introduction, leading to a missing or unanticipated method override. – Wrong class name in a member-introduction, leading to a method body in the wrong place in the class hierarchy. – Inconsistent parent declaration, resulting in a (sub)class that violates Liskov’s and Wing’s behavioral notion of subtyping [27] and/or Meyer’s design-by-contract rules for inheritance (such as require no more, ensure no less) [30]. – Inconsistent overridden method introduction, also resulting in a violation of behavioral subtyping. – Omitted parent interface resulting in a method that was intended to implement an interface method, but which now stands on its own. Faults in pointcuts will have the effect that advice code is activated at the wrong program execution points. Such faults include: – Wrong primitive pointcut, using, for example, a call instead of an execution construct. – Errors in the conditional logic combining the individual pointcut conditions. – Wrong type, method, field, or constructor pattern in pointcut. In particular, the use of * as a pattern wildcard or in string matching easily leads to too many join points. Furthermore, if the underlying classes are modified or extended, the wildcard may become erroneous without the compiler being able to notice this. Faults in advice will result in the wrong action at a certain point of execution. Such faults include: – Wrong advice specification (using before instead of after, using after with the wrong argument, etc.). – Wrong or missing proceed in around advice. – Wrong or missing advice precedence. – Advice code causing a method to break its class invariant or to fail to meet its postcondition. The fault model above states that aspect weaving should not conflict with class invariants or method pre- and postconditions. The safe route to follow is that class resulting from weaving is a proper subtype of the original class. Put in terms of design by contract, the class invariant of the resulting class cannot be weaker, its method preconditions cannot be stronger, and the postconditions cannot be weaker. Typical examples are “harmless” aspects which add logging or tracing. In this situation, existing code using the class need not be aware that new functionality has been woven into it. In other words, the test suite for the original classes should pass on the classes extended by introduction or advice as well, and doing so will help to find faults originating from improper extensions. An alternative route is that the aspect actually modifies the contract in a way that conflicts with the inheritance rules from design-by-contract. This may include changes in method pre- or postconditions, and may thus require weaving in additional code at all affected call sites. A typical example is an aspect that adds security checks: this may lead to additional exceptions which at some point should be handled in the original 5 application. Faults in this approach will not be restricted to the newly woven class, but may be at any call site in the application. This setting is much harder to test and immediate reuse of the test suite will not be possible. Similar distinctions are made by Clifton and Leavens [7], who discuss the relation between behavioral subtyping and aspect weaving, and distinguish observers from assistants. Rinard et al [34] classifies interactions between woven code and the original code, recognizing augmentation, narrowing, replacement, and combinations between them. The key concern of these authors is modular reasoning: in our setting it is modular testing, and reuse of test suites to woven classes. 2.3 Aspect-Oriented Test Adequacy A test adequacy criterion prescribes the elements of the implementation under test that need to be exercised by a test suite. The coverage achieved by a test suite is the percentage of elements actually exercised. In this section we formulate adequacy criteria for aspects targeting the faults presented in the previous section. Due to the mixed nature of an aspect definition, which can address both static and dynamic crosscutting using pointcuts, intertype declarations, and advice, it is not so easy to obtain a single criterion that allows us to make meaningful statements of the form “we have tested 75% of this aspect”. Instead, we will define different criteria for the various elements in an aspect definition. Introducing a new method m in a class C is akin to directly adding the method to C. Therefore, normal coverage goals such as statement or branch coverage apply. However, as we have seen in the fault model, the most powerful and dangerous introductions are those where polymorphic methods are added. Therefore, adequacy criteria explicitly based on exercising all possible polymorphic bindings are in place as well. Rountev et al [35] include an up to date overview of criteria for polymorphic bindings. They distinguish the all-receiver-classes criterion which requires exercising all possible classes of the receiver object at a call site, and the all-target-methods criterion which requires exercising all possible bindings between a call site and the methods that may be invoked by that site. The intertype declaration of a new supertype or interface for a given class changes the inheritance hierarchy it belongs to. This, again, calls for adequacy criteria taking polymorphic calls into account. Observe that these adequacy criteria take into account all call sites within the rest of the application. Thus, polymorphic coverage goals are not just a percentage of the aspect definition itself, but a percentage of how well affected call sites are covered. To deal with adequacy for pointcuts, we will say that a test case T exercises a pointcut P if T activates advice at a join point captured by P . An adequate test suite for a pointcut should maximize our chance of finding errors in the pointcut. We distinguish primitive pointcuts and compound pointcuts built from conditional operators. Primitive pointcut operators (such as call, cflow, and so on) can capture a multitude of join points. Which of these should we ensure we execute in order to maximize our chance of finding errors in the pointcut? In most cases we cannot answer this question, so an arbitrary join point will do. For signature or type matching involving 6 wild cards, we can arrive at the equivalent of traditional boundary testing by ensuring we have one case where the asterisk matches the empty string, and one where its match is non-empty. When matching types in a hierarchy, for example in a call(* Class+.*) expression, the class named is a boundary. Using the one × one criterion [4] insisting on one point on the boundary, and one just outside it, we would obtain one test case for Class, and one for each immediate superclass (interface) above it in the hierarchy. Tests for pointcut expressions composed from multiple conditions should exercise every relevant condition combination. In traditional testing, the most rigorous approach is to test each true/false combination, leading to 2N test cases for an expression with N conditions. Alternatively, the Each-Condition/All-Conditions criterion can be used which leads to N + 1 test cases by insisting on one test case for each condition making that condition true and all others false, in addition to one making all conditions true (for and logic, replacing true and false for or logic) [4]. Pointcut logic, however, is different from normal Boolean logic, for example in that certain operators (such as target) are primarily meaningful in combinations with others. Moreover, there are typical idioms for using pointcuts, such as a sequence of a general pointcut (such as all public calls) conjuncted with several exceptions (each using the negation operator) for classes or methods that are to be excluded from the pointcut. Test adequacy for advice itself can again be based on branch or statement coverage. It is most natural to compare advice with a method that is called at relevant join points. Thus, to achieve branch coverage for the advice, we do not need to exercise all branches at every join point: it suffices to find one join point at which we exercise all branches. Furthermore, it is natural to insist that each join point at which the advice is activated is exercised. Typically, a test suite achieving statement coverage for the full unwoven application will get a far way in covering all join points. One may be tempted to think that covering all captured join points also achieves adequate pointcut coverage. This, however, is not the case, since the pointcut may be defined as a complex expression, parts of which are used to prevent firing at a particular join point. Last but not least, there may be (abstract) reusable aspects whose pointcuts do not refer to particular (named) classes or methods they should be woven into. To test such aspects, a stub application needs to be created, to which the aspect can be applied. When creating these stubs, the test adequacy issues presented above can be used as a guideline, ensuring for example that it is indeed possible to exercise all conditions in the pointcut. As far as we can see, reusable aspects themselves provide no further test adequacy constraints. 2.4 The B ETTAR Testing Strategy The test strategy combining the fault model and various adequacy criteria consists of three steps: Responsibility-Based Testing (Black Box): Create or identify a functional test suite for the concern at hand. Focus on answering the question whether the implementation of the concern does what it is supposed to do. 7 Risk-Based Testing (Grey Box): Use the fault model to refine the test suite so that faults due to the refactoring process as well as the (aspect-oriented) target solution are most likely to be captured. Source-Based Test Adequacy Validation (White Box): Inspect the coverage of the test suite developed so far (either by running it on instrumented code or by manual analysis), and verify that relevant test adequacy criteria are indeed met. If not, return to the previous steps to create additional responsibility- or risk-based test cases until the adequacy criteria are fullfilled. If the refactorings do not affect the external interfaces of the classes under test, the test suite can be applied to both the original and the refactored system. This has the advantage that one can be certain that each new test also successfully passes on the old implementation. If refactoring does require making adaptations to the test suite, the following approaches are possible: – Refactor the test suite so that it exercises more global functionality instead of invoking the modified methods directly, making it more robust to future implementation changes but potentially making it harder to achieve the desired coverage; – Apply an additional refactoring to the application offering for example an additional interface abstracting away from implementation differences between the original and target solution; – As a last resort, we could give up on our attempt to apply the test suite to the original system, and apply new tests to the new system only, thereby losing them as safeguard against behavior modification during refactoring. In our case study we were never forced to do this, and could always refactor the test suite to permit testing of both versions. 3 AJ HOT D RAW: An Open Source Aspect-Oriented Showcase To experiment with the feasibility of adopting aspect-oriented solutions in existing software and demonstrate the strategy proposed earlier, we have created AJ HOT D RAW: an aspect-oriented refactoring of JH OT D RAW,3 a relatively large and well-designed open source Java application. In order to allow other researchers to benefit from our work and to enable comparative software evolution research on a real-life aspect-oriented system, we decided to release AJ HOT D RAW as an open source project.4 The next sections give a description of the case study and motivate the choice for both the application and the refactoring language. 3.1 The JH OT D RAW Drawing Framework JH OT D RAW is a (GUI-based) framework for drawing technical and structured 2D graphics. The application was originally developed as an exercise to show a good use of 3 4 jhotdraw.org, version 5.4b1 ajhotdraw.sourceforge.net Note for the reviewer: we are currently in the process of cleaning up our refactored code, upgrading it to JHotDraw 6.0, and moving it to the sourceforge server (see the release plan on sourceforge). Our internal version is available upon request. 8 object oriented design patterns in a Java implementation. The fact that JH OT D RAW is considered a well-designed application makes it an ideal candidate for aspect-oriented migration as it is unlikely that evolvability improvements can be made otherwise. The version of JH OT D RAW analyzed consists of approximately 40,000 lines of code, 300 classes, and 2800 methods. The JH OT D RAW editor comprises drawing tools, a set of user defined (geometrical, image, text, etc.) figures, drawing views, and a collection of (tool and menu-associated) commands. A number of additionally supported features include (re-)storing drawings (from/)to storage devices, undo/redo activities for commands, and animation functions. 3.2 Evolving a JH OT D RAW Test Suite The version of JH OT D RAW under study was shipped without a test suite. At the time of writing, the most recent version (v6.0beta1) has a number of empty test classes, automatically generated using a Java doclet. The intent is to fill them with test cases, but so far these have not been made available.5 To safeguard our refactorings, we have developed our own functional test cases on a by need basis. Since we were, initially, not familiar with the JH OT D RAW code, the development of these test cases served as our program comprehension strategy ([10]): We formulated hypotheses on JH OT D RAW’s implementation, expressed them as test cases, and then attempted to refute them by running these test cases. The test suite that was developed passes on the original, pure object oriented version of JH OT D RAW, as well as on AJ HOT D RAW, the refactored, aspect-oriented version. Our test suite is based on the JUnit framework [3]. Moreover, where needed, we make use of Java 1.4 assertions to ensure that the alterations did not break invariants or pre- and postconditions. Since we did wanted to minimize the number of changes to the JH OT D RAW code, we injected these assertions by means of aspects. For ensuring invariants, the aspect contains an inter-type declaration giving relevant classes a boolean invariant method, as well as a pointcut ensuring this method is indeed checked before and after each public method. Observe that the assertion aspects are independent of our test suite, and can be woven into the production version of JH OT D RAW as well in order to simplify debugging. 3.3 AJ HOT D RAW Organization AJ HOT D RAW is organized into two parts: (1) the main project is the A SPECT J implementation of the system, where the identified crosscutting concerns are refactored to aspects; (2) the test subproject (JHDTest) comprises all the test cases aimed at ensuring equivalence between the the original Java solution and the refactored A SPECT J one. The aspects are put in separate packages, one per concern. Changes to the original files are restricted just to removing concerns that have been migrated to aspects. 5 We have agreed with the JH OT D RAW maintainers that our test suite will be integrated in their project. 9 The tests suite can be compiled with and executed on the archived binary files (jar) of any of the two solutions. Building and executing the test suite is automated using A NT.6 4 Refactoring of Selected Concerns from JH OT D RAW Previously, we have employed fan-in analysis for the identification of crosscutting concerns in JH OT D RAW [29]. This resulted in 10 types of concerns that were candidates for refactoring into an aspect. In this section we discuss three of these concerns (persistence, contract enforcement, and undo) in considerable detail, covering the B ETTAR steps aspect design, refactoring design, and test suite design. A transparent, gradual process of refactoring is important for building confidence in the aspect-oriented solution. Therefore, our refactorings aim at maintaining the conceptual integrity and stay close to the original design. An additional advantage of this approach is that this preserves the understandability of the refactored system for the original maintainers. 4.1 Refactoring The Persistence Concern Aspect Design Drawings in JH OT D RAW are collections of figures that can optionally be stored and recovered (write/read operations) by the application. The concern denoting this functionality, persistence, is defined by the Storable interface that declares two methods, write(StorableOutput) and read(StorableInput). The entire hierarchy of storable elements in a drawing comprises 94 interfaces and classes, of which 40 belong to the Figure class hierarchy. Because the persistence concern is already distinguished in the original design, refactoring it to an aspect is fairly straightforward. The aspect can use introductions in order to have the persistent elements of a drawing (e.g., figures) implement the Storable interface. If not all variables comprising the state of the class are accessible through public getters and setters, the aspect will need access to private members as well. The A SPECT J way to achieve this is by declaring the aspect privileged. The implementation of the Storable interface also implies an interesting enforcement constraint: “Objects that implement this interface and that are resurrected by StorableInput have to provide a default constructor with no arguments.” This constraint cannot be enforced by A SPECT J. A similar situation occurs when refactoring bean objects (see the “Bean Aspect” example in [2]) that must define no-argument constructors. A concern related to persistence is serialization, which in JH OT D RAW is also implemented for the Figure hierarchy. According to Java API specification, classes requiring special handling during de-serialization, such as a number of figures in JH OT D RAW, must implement a special private method (readObject(ObjectInputStream)). A SPECT J does not support introduction of private members into target classes. The visibility of the inter-type declarations relates to the aspect and not to the target class. Although 6 ant.apache.org 10 already acknowledged as a shortcoming (see [2]) the language interpretation of visibility prevents a consistent refactoring of similar kinds (persistence and serialization) of crosscutting concerns. A summary of the various issues is provided in Figure 1. Refactoring Design The refactoring itself is fairly straightforward, and just consists of moving read and write method implementations to the persistence aspect. The complete refactoring of the persistence concern can generally be described as Extract Interface Implementation as discussed by [22]. Old situation Aspect solution Objects requiring persistence implement the Storable interface. Implementation of Storable interface moved to aspect by means of introductions. Code size Remains the same Benefits All persistence related code in one aspect; classes oblivious of whether they can be made persistent. Risks Encapsulation broken since persistence aspect requires privileged access. A SPECT J issues Zero-argument constructor cannot be enforced; Private methods cannot be introduced. Fig. 1. Refactoring of the Persistence Concern Test Suite Design Testing the persistence aspect is relatively simple. We nevertheless discuss it in some detail, since the way of testing can be reused for other more complicated concerns that we will discuss next. When refactoring persistence to an aspect we run a number of risks: The first is that in our aspect, we accidentally introduce a read or write method body for a given figure in the wrong class. The second is that we make an error when copy-pasting the body of a method to an aspect. Last but not least, our removal of the persistence code from, e.g., figures may be incomplete. In order to test persistence we proceed as follows: First, we create a top level StorableTest class, which has a test method that (1) creates a Storable (typically a figure), (2) writes it to a stream, (3) reads it back into a different object, and (4) checks the equivalence between the two. Next, the creation of the actual figure is deferred to subclasses of the StorableTest class using a virtual factory method. Thus, the test hierarchy mimics the hierarchy of classes to be stored. Finally, our equivalence checking method should be based on structure, not on object identity. Such a method is not included in the JH OT D RAW implementation. We injected this method into the class hierarchy using an aspect. Observe that a collection of static equivalence methods included in, for example the test class, would not work, since the equivalence method must be polymorphic – which can be achieved by means of introductions in an aspect but not by means of static methods. This strategy implements Binder’s Polymorphic Server Test test design pattern [4]. It can be used to verify that subclasses conform with superclass behavior, and that we are 11 setting up a correct polymorphic hierarchy. It requires exercising each superclass test case to every possible subclass. In other words, we can reuse the write-read-compare test case for every subclass of Storable. 4.2 Contract Enforcement in Commands Aspect Design JH OT D RAW makes use of the Command design pattern in order to separate the user interface from the underlying model, and in order to support such features as undoing and redoing user commands. Each command has to realize the Command interface, for which a default implementation is provided in the AbstractCommand class. The key method is execute, which takes care of actually carrying out the command (such as pasting text, inserting an image, etc.). Each execute method should start with a consistency check verifying that the underlying “view” exists. Therefore, each concrete implementation of execute starts with a call to the execute implementation in the superclass, which is always the one from the AbstractCommand. This is illustrated in Figure 2. public class AbstractCommand implements Command { ... public void execute() { if (view() == null) { throw new JHotDrawRuntimeException( "execute should NOT be getting called when view() == null"); } } } public class PasteCommand extends AbtractCommand { ... public void execute() { super.execute(); ... } } Fig. 2. Contract Enforcement using a super method idiom. This is a typical example of what is called “contract enforcement” in the A SPECT J manual [2]. We implemented it using a pointcut capturing all execute methods, putting the check itself in the advice. Observe that mimicking the implementation where the check is in a super method is not possible in A SPECT J: super methods cannot be accessed when advising a method. The resulting solution is shown in Figure 3. The only surprise in this figure may be the within clause in the pointcut. It turns out that anonymous subclasses of AbstractCommand do not implement the consistency check. Such classes are used for simple commands such as printing, saving, and exiting the application. Since A SPECT J does not provide a direct way to exclude anonymous classes in a pointcut, we used the within operator to exclude executions occurring in the context of the top level object creating the full user interface. One can also argue that the anonymous classes should include the check (in which case the exclusion can be omitted from the pointcut), but at present we focus on keeping the behavior as it was, not on modifying it. 12 pointcut commandExecute(AbstractCommand aCommand) : this(aCommand) && execution(void AbstractCommand.execute()) && !within(*..DrawApplication.*); before(AbstractCommand aCommand) : commandExecute(aCommand) { if (aCommand.view() == null) { throw new JHotDrawRuntimeException("..."); } } Fig. 3. Enforcing the consistency check using before advice. The main benefit of the aspect approach is that consistency checks cannot be forgotten. This is illustrated by the anonymous classes, but also by one non-anoymous command,7 which does not extend the AbstractCommand default implementation. Consequently, it cannot reuse the consistency check using a supercall. Inspection of the execute implementation, however, clearly shows that the code exits with a null pointer exception in case the check fails. This suggests that the aspect that we are looking for should implement the check not only for the AbstractCommand class, but for all implementations of the Command interface. Again, our current implementation does not yet do this, but only injects the implementation in subclasses of AbstractCommand. A summary of the main issues in the Contract Enforcement refactoring is provided in Figure 4. Old situation Each concrete execute invokes its super execute in order to conduct certain consistency checks. Aspect solution The consistency check is implemented as advice, which is invoked before each call to execute, as captured in a simple pointcut. Code size 17 explicit consistency calls replaced by one pointcut; consistency check itself moved from class to advice. Benefits Reliability: it becomes impossible to forget the consistency check. Omitted checks can be fixed automatically thanks to the refactoring. Risks Check required that omissions are not on purpose. A SPECT J issues No direct support to capture anonymous classes; Cannot refer to super methods in method advice. Fig. 4. Refactoring Contract Enforcement for Commands. Refactoring Design The restructuring can generally be described as an Advise Method Overrides refactoring, as presented in Section 5. Test Suite Design Simple as the pointcut in Figure 3 may be, it nevertheless illustrates some of the issues involved in testing refactorings that make use of pointcuts. 7 Namely, the UndoableCommand. 13 First of all, adequate testing of the consistency check in the original (non-aspect) JH OT D RAW version would typically correspond to branch coverage. This yields two test cases for the top level execute method (one in which the consistency check passes, and one in which it fails) in addition to one dedicated test for the execute implementation in each subclass. Since the super call can be resolved statically, even polymorphic adequacy models will not add test cases to this. It is interesting to observe that such a test suite would not capture the subtleties involved in designing the aspect from Figure 3. For example, the test suite does not exercise anonymous classes, nor execute methods occurring outside the scope of AbstractCommand. The aspect-specific test adequacy criteria as discussed in Section 2.1, however, do suggest creating the relevant additional test cases. Inspection of the pointcut leads to the following tests: – Since AbstractCommand occurs in a type match, we would like to test classes just off this boundary as well, leading to a test case checking what happens for the Command interface itself. – Since the pointcut is a conditional expression, we also want to investigate what happens if one of the conditions fails. This means that we want to verify that the within clause does fire for anonymous classes. Actually creating these test cases may, however, not be as easy as it seems. Testability is affected by controllability and observability, which are poor for anonymous classes and join point execution. In order to verify (observe) that our pointcut from Figure 3 does indeed capture anonymous classes correctly, we created special advice used for testing purposes only, which keeps track where a certain pointcut expression has fired. To do this, we first refactored the aspect so that the individual conditions are in separate pointcuts, as shown in Figure 5. The production aspect uses these pointcuts to perform the consistency check at the right places. The testing aspect uses exactly the same pointcut definitions to weave in code that keeps track of where (i.e. at which joinpoints) those pointcuts have fired. This set of joinpoints is then used to verify intended behavior. abstract aspect ContractEnforcementPointcut { pointcut commandExecute(AbstractCommand aCommand) : this(aCommand) && inExecuteMethod() && ! inAbstractClass() pointcut inAbstractClass() : within(*..DrawApplication.*); pointcut inExecuteMethod() { execution(void AbstractCommand.execute()); } } Fig. 5. Separate pointcuts for each condition to improve aspect testability. 14 Concerning controllability, the instances of the anonymous classes are hard to access. They are normally activated via a mouse event, which must be mimicked in order to trigger the command’s execute method. We avoided the need for generating mouse events by using an aspect: we intercept the constructors for anonymous command classes, and collect them in a set: after the full application has been built we can apply the execute method to each command. 4.3 Refactoring the Undo Concern Background and Current Approach Support for “undo” is a newly added feature in the analyzed version of JH OT D RAW. As can be imagined, it is a concern that crosscuts across many different classes. More than 30 elements of the JH OT D RAW framework, comprising commands, tools and handles, have associated undo constructs to revert the changes spawned by their underlying activities. The discussion here will focus on the commands group, as it is the largest in terms of defined undo activities. Some participants in JH OT D RAW’s undo implementation are shown in Figure 6: – Each command is associated with one undo activity, whose method undo can be invoked to revert the command. – The undo activity is implemented in a nested class of the command, which is instantiated using a factory method called createUndoActivity. – The primary abstraction in the undo activity is the list of affected figures: when the command’s execute method is invoked, the relevant state of the affected figures is stored in the undo activity. – Undo activities are maintained on a stack by the undo manager. DrawingEditor UndoManager * <interface> Command execute() createUndoActivity() undoActivity AbstractCommand ConcreteCommand <interface> Undoable undo() * affectedFigures UndoableAdapter has nested class ConcreteUndoable Fig. 6. Participants in JH OT D RAW’s undo implementation. 15 Figure public class PasteCommand extends FigureTransferCommand { public void execute() { ... FigureSelection selection = (FigureSelection)Clipboard.getClipboard().getContents(); if (selection != null) { setUndoActivity(createUndoActivity()); ... //core command logic and other undo setup FigureEnumeration fe = insertFigures(...); getUndoActivity().setAffectedFigures(fe); ... } } } Fig. 7. The original PasteCommand class. Aspect Design The aspect solution to undo we propose consists of associating an undodedicated aspect to each undo-able command. The aspect implements the entire undo functionality for the given command, while the associated class remains oblivious to its secondary concern. By convention, for enforcing the relation with the command class, each aspect will consistently be named by appending “UndoActivity” to the name of the command class. In a successive step, the command’s nested UndoActivity class moves to the aspect. The factory methods for the undo activities (createUndoActivity()) also move to the aspect, from where they are introduced back into the associated command classes using inter-type declarations. The statements in the execute method that are responsible for setting up the undo activity, are taken out of the execute method, and woven into it by means of advice. In some cases the corresponding pointcut simply needs to capture all execute method calls; in other cases the pointcut is more complex, depending on the way the undo code is mixed with the regular code. As an example, consider the paste command, whose execute method consists of retrieving the selected figures from the clipboard, inserting them into the current view, and clearing the clipboard. All this is done in a single method, using local variables and if-then-else statements to deal with such situations as an empty clipboard. The undo aspect will require the same conditional logic, and access to the same data in the same order. The following aspect solutions are possible: – If all getters are side effect free, an approach is to setup the undo activity in a simple before advice. In JH OT D RAW, however, this is not the case, for example because of figure enumerators that have an internal state. – The alternative route is to intercept relevant getters, keep track of the data locally in the advice as well, and inject advice after all data has been collected. This is the approach we follow, but some of the pointcuts are somewhat artificial. Figure 8 illustrates such a pointcut in the undo aspect for the PasteCommand, which is also shown in figure 7. The execute callClipboardgetContents() pointcut captures the call that sets the reference to be checked by both the command’s core logic and the undo functionality in the aspect. – The last possibility is to refactor the long execute method into smaller steps using non-private methods. The extra method calls can be intercepted allowing smooth extension with setting up the undo activity, at the cost of creating a larger interface and breaking encapsulation. 16 public aspect PasteCommandUndoActivity { //store the Clipboard’s contents - common condition FigureSelection selection; pointcut execute_callClipboardgetContents() : call(Object Clipboard.getContents()) && withincode(void PasteCommand.execute()); after() returning(Object select) : execute_callClipboardgetContents() { selection = (FigureSelection)select; } ... pointcut executePasteCommand(PasteCommand cmd) : this(cmd) && execution(void PasteCommand.execute()); } // Execute undo setup void after(PasteCommand cmd) : executePasteCommand(cmd) { // the same condition as in the advised method if(selection != null) { cmd.setUndoActivity(cmd.createUndoActivity()); ... cmd.getUndoActivity().setAffectedFigures(...); } } Fig. 8. The undo aspect for PasteCommand. The resulting system differs in two ways from the original design. First, the original design uses static nested classes to enforce a syntactical relation between the undo activity and its enclosing command class. Since the A SPECT J mechanisms do not allow introduction of nested classes, the post-refactoring association will only be an indirect one, based on naming conventions. This is a weaker connection than the one provided by the original solution. A second difference is that the visibility of certain methods has been altered, since A SPECT J cannot be used to introduce, for example, the required factory method as protected. Refactoring Design The complexity of the refactoring is determined by the complexity of unplugging undo from the commands themselves. We distinguish different levels of unpluggability: 1. The nested undo activity class of the command, and all its uses can be safely removed from the command. The fairly simple ChangeAttributeCommand class is an example in this category. 2. The command’s core logic makes use of some of the data stored in the undo activity. This is typically done for the list of affected figures. Since there is no real need for this, we could easily refactor the core logic so that it does not refer to the undo activity anymore. 3. The nested undo activity not only deals with undo, but also contains core logic needed for the proper execution of the command. An example is the InsertImageCommand: its undo activity contains a method called insertImage which actually inserts the image (instead of undoing it). We consider this a design violation. Our solution consists of applying traditional refactorings before starting with the aspect refactoring, so that the command does not depend on the undo activity anymore. 17 4. The nested undo activity is not only used for this particular command, but also for similar commands. This is the case for the PasteCommand. Our aspect refactoring will rename the undo activity, and hence requires a simple change to these commands. We anticipate that any non-trivial aspect refactoring will require similar objectoriented refactorings, before the crosscutting concern can be taken out of the available system. A more detailed discussion of the undo concern refactoring, accompanied by code snippets, is presented in [28]. Old situation Each command’s execute sets up a corresponding undo activity, which is implemented through a nested class. Aspect solution One aspect per command, which contains the undo activity implementation, and introduces the association into the command. Execute method intercepted to setup the proper undo activity state. Code size Remains the same. Benefits Strong tangling between commands and their undo activity eliminated; commands are easier to understand. Risks Undo activity may require sophisticated pointcuts to intercept all relevant state modifications of the command; Refactoring of commands needed in order to unplug undo support from them. A SPECT J issues No support for introducing nested classes. Visibility affected since protected methods cannot be introduced. Modular reasoning affected by keeping track of data set in the advised method. Fig. 9. Refactoring Undo. Test Suite Design In testing undo, we essentially combine the testing approaches of the persistence and contract enforcement concerns discussed previously. First of all, we create a reusable test suite at the Command level. This test can be used for any command subclass, and ensures that each subclass complies with then intended semantics. This test set takes care of: – Setting up an appropriate JH OT D RAW application in which a concrete command can be created. The actual command created is deferred to subclasses of the test class. – Bringing the application in a setting in which the execute can be carried out (for example, many commands require that some figures in the drawing are selected), and actually invoking it. – Comparing the effects of the command execution with the intended behavior — this step is specific to the actual command and deferred to subclasses. It usually consists of comparing the modified selected figures with a set of figures actually constructed in the test case. – Invoking the undo method on the command’s undo-activity, and comparing that the effects are indeed canceled. Again, this comparison typically involves the set of affected figures. 18 Thus, the test case follows the template method design pattern, and defers the details of certain steps to its subclasses. To test the various pointcuts, the approach described for contract enforcement was adopted, weaving in special advice that allowed us to observe which pointcut actually fires. 5 Contributing to the Catalog of Refactorings Several authors have proposed catalogs of aspect-oriented refactorings [22, 31, 32], in the spirit of Fowler’s catalog of object-oriented refactorings [14]. We were able to reuse several of these existing refactorings, such as Monteiro’s Encapsulate Implements with Declare Parents, and Move Method from Class to Inter-type, or Laddad’s Extract Method Calls refactoring which encapsulates calls to a method from multiple places into an aspect. In this section we add our contribution to these existing catalogs, casting some of the experiences we obtained from building AJ HOT D RAW into generally reusable refactorings. An open question is at what level of abstraction such refactorings should be defined. Is introducing some design pattern considered a refactoring? It is, but Fowler’s book has explicit refactorings described for just a few design patterns, not all. The reason for this is, most likely, that the mechanics for introducing such a design pattern can hardly be described in a reusable way, and for that reason the refactoring description would not add much useful information to the pattern description. In this respect an interesting approach is taken by Kerievsky [21], who explicitly addresses refactorings to patterns. He focuses on a subset of the design patterns, namely those for which common coding tricks are known that do not yet provide the benefits of using the full pattern, such as in his Replace Hard-Coded Notifications with Observer refactoring. A similar distinction holds for aspect refactorings. Introducing refactorings for each of the prototypical concerns listed in, for example, the A SPECT J programming guide [2] may not be particularly useful. But in some cases, the “old”, non-aspect solution can be reasonably well described (for example an Observer implementation following the guidelines from [15]), and it does make sense to describe how such an implementation can be refactored into an aspect solution (such as the one from [19]). If we look at the refactorings from Monteiro, these can be categorized as fairly technical, elementary refactorings, such as introducing an inter-type declaration [31]. The refactorings from Laddad [22] are more of a mixed style, some being elementary, others being closer to typical concerns from the A SPECT J manual. Below we try to provide some building blocks for creating refactoring descriptions that give concrete advice how certain concerns can be turned into aspects. Move Role to Aspect Though not discussed in the previous section, several of our refactorings involve the creation of an aspect-oriented implementation of a design pattern. As an example, JH OT D RAW contains several instantiations of the Observer pattern, which we essentially implemented according to the approach proposed by Hannemann and Kiczales [19]. 19 The participants in this pattern can be an observer or a subject. The existing JH OTD RAW implementation does have a separate interface for the observer role, but not for the subject role. We propose to refactor this and introduce a subject interface via an aspect in order to: (a) make the two different roles explicit, and (b) remove the observer pattern details from the primary concerns. Note that in some cases, one class can be involved in multiple design patterns adopting different roles for them. For example, a composite figure is a subject as well as an observer, listening to changes in its subfigures while being listened to by, for example, drawings. The total number of methods implemented by such multi-role classes can be substantial, making them hard to understand; a problem addressed by moving the roles to aspects. Thus, Move Role to Aspect creates an interface for a particular role in a design pattern, and superimposes this role on an existing class by means of an aspect. Move Observer to Aspect A more high level refactoring is to move an observer implementation into an aspect. This is a compound refactoring, involving three elementary steps: first, the Move Role to Aspect refactoring is applied twice, once for the subject and once for the observer role. Subsequently, the calls made in subjects to notify the observers of changes are captured into a pointcut and extracted into advice. Override Method with Advice for Overlapping Roles Just like one class can fullfil multiple roles from one or more different design patterns, one method can implement features related to multiple roles. This is common in Java Swing design and also occurs in one of our JH OT D RAW refactorings. This refactoring dealt with the CommandMenu, which acts as both view and controller for the interactive drawing editor of the application. The method exhibiting the overlapping roles, checkEnabled(), enables/disables menu items according to the status (executable/non-executable) of the command to be activated when the item is selected. Although the method belongs to the interface of the view component, allowing to set the view’s elements status, its implementation relies on controller decisions. The proposed refactoring places the method’s definition into the interface for the role to which it belongs, in this case, the view role, making it accessible to the developer of the GUI. Furthermore, the controller aspect uses an around advice to override the default behavior of the method and to make it context(command)-aware. Advise Method Overrides This refactoring aims at removing duplication arising from statements that are common to (the start or end of) all method overrides of a given (superclass) method. Such statements are replaced by advice to any refinement of the superclass method. Examples in JH OT D RAW include the contract enforcement we discussed previously (the check at the beginning of each execute method), as well as a call to the checkDamage method that is contained at the end of each execute method. 6 Discussion What did we learn from refactoring JH OT D RAW to aspects and validating behavior conservation by means of testing? 20 First of all, we once again learned that testing is actually needed for such refactorings. In several cases, we detected errors in our pointcuts, introductions, and copy-paste activities thanks to our test suite. Although all of us will agree with this need for testing, it is alarming, to say the least, that neither the popular textbooks on aspect-oriented programming (such as [23, 2, 16]) nor the existing work on aspect-oriented refactoring [22, 32] provides any advice on how to approach aspect-oriented testing in a systematic way. Second, our fault model as well as our adequacy criteria illustrate how easy it is to make errors during aspect-oriented programs, and how much needs to be done in order to have a reasonable chance of finding these errors using tests. Moreover, both the observability (did this pointcut fire?) and the controllability (which inputs will cause a pointcut to be exercised?) of aspect-oriented programs typically are problematic. Admittedly, at several points in time we were tempted to omit the testing since it seemed too complicated to create a test suite capable of achieving the required coverage. Testing tool support may very well help here: but this requires an adequacy model first, which is what we proposed in the paper. Concerning the refactorings themselves, our experiments illustrate that being oblvious to future extensions is not as easy as it may seem. For example, the undo concern was added only in version 5.4 of JH OT D RAW. Could this have been implemented as a separate aspect without modifying JH OT D RAW version 5.3? Our refactoring shows the direction this would take. But for some commands, such as the paste command, artificial pointcuts are needed, which are very brittle if the underlying primary logic in the command changes. For most cases, assessing the benefits of an aspect-oriented refactoring turned out to be a fairly subjective process that is hard to quantify. The aspect design step looks for such solutions that would enhance the system’s evolvability; that is, to achieve a better modularization for the, otherwise, scattered and tangled parts of a concern, and to provide an implementation that better reflects the concern-based reasoning over the system. It is not always apparent, however, in the context of a (relatively) large system as the analyzed case study, that the new, aspect solution surpasses the legacy one. Although we argue to have improved the separation of concerns, for some more complex refactorings, e.g, undo, the downfalls of the aspect-oriented implementation make it difficult to asses the improvements for the overall system, or even the gains in modular reasoning over the refactored crosscutting concern. Difficulties could also occur for less demanding refactorings as for example, contract enforcement, depending on the uniformity of the places where the contract needs to be enforced. Last but not least, it is striking that almost every refactoring we experimented with raised one or more issues concerning A SPECT J (such as visibility modifiers, nested classes, or anymous classes). Some of these limitations are quite technical in nature, and are likely to be resolved in future versions of A SPECT J. Also, other aspect-oriented frameworks, such as AspectWerkz 28 , may offer solutions to some of the issues. Other limitations are more fundamental (such as the constraint that a class should offer a zero-argument constructor or the inability to access super methods), and call for a more rigorous reconsideration of existing aspect-oriented models. 8 aspectwerkz.codehaus.org 21 7 Related Work An important part of research into the area of refactoring to aspect-orientation has analyzed aspect solutions to a number of (sometimes complex) concerns that typically crosscut the primary decomposition of a system [22, 19, 23]. The association between the concern and its aspect solution is an important indication of how a specific language model is intended to address types of crosscuttings. However, the specific implications of applying the refactorings in the context of a large system, where deviations from the examples used to describe the refactorings are very likely, are not considered. In this paper we showed some of the difficulties that arise when these solutions are applied to concerns in a large system. A number of authors investigated the possibility of building catalogs of aspect refactorings. Monteiro and Fernandes [32] proposed a set of code transformations from Java to A SPECT J specific modularization units, describing steps in a feature extraction process. The approach has followed the format used by Fowler [14] to describe objectoriented refactorings, and was further significantly extended [31]. The study emphasized the mechanics associated to code transformations as opposed to the relation with typical crosscutting concerns [22, 2, 19]. A similar list is also proposed by Iwamoto and Zhao [20], but the authors do not provide details about any of the specific refactorings. The attention tends to focus on potential conflicts between the aspect refactorings and the traditional, object-oriented ones. This issue is also addressed by Hanenberg et al [17], as well as Hannemann et al, who discuss the possibility of a refactoring approach based on a developer-tool dialog [18]. Specific techniques, like program slicing, are employed by Ettinger and Verbaere [13] to extract tangled code into method and further into advice, as an extension of the object-oriented refactoring to aspects. Closely related to the work described in this paper, Coady et al investigate the benefits of aspect-oriented solutions for evolving operating system code and for better managing its variability [8, 5]. To that end they describe, for example, how the prefetching concern can be separated from the page handling code in the FreeBSD kernel code [9]. Although their work aims at assessing the benefits of aspect-oriented software development, in contrast to the work presented in this paper, it has not led to a publicly available aspect-oriented and non-aspect-oriented version of the same software system which can be used for comparative experimental software evolution research by other researchers. However, none of this refactoring work mentions a testing strategy that accompanies the migration process. The attention given to testing in the context of aspect-orientation is limited and not with concerns to refactoring. Few published test adequacy criteria for aspect-oriented programming have been formulated: the only work we are aware of is by Alexander et al, who propose a candidate model and raise a number of research questions [1]. Ubayashi and Tamai [37] use model checking to verify object crosscutting properties in aspect-oriented programs. As a first attempt to define an approach for testing aspect-oriented programs, Zhao [39] proposes a data-flow-based unit testing. The tests are oriented towards aspect and class modules that can potentially be targeted by multiple aspects. Based on the modules’ accessibility three levels of testing are considered, i.e., intra-module, inter-module, and intra-aspect or intra-class. 22 8 Concluding Remarks Refactoring to aspect-orientation aims at improving the evolvability and reusability of a system. Important issues to be considered in this context are (1) the adequacy of the aspect solutions discussed by a number of authors when applied to a large application, (2) the assessment of the support for and improvements brought by refactoring to aspects, and (3) the challenges of behavior conservation when migrating to aspect-supported implementations. This paper addresses these problems by proposing a refactoring and testing strategy to guide the migration process, and successively by applying it to an open source Java system. The testing strategy aimed at ensuring migration consistency, introduces an aspect-oriented fault model and adequacy criteria. Further, aspect and refactoring designs are analyzed for selected concerns in the system under investigation, which also include new, complex examples of crosscuttings. The analysis consists of a proposed aspect solution, associated validating tests, and a trade-off review of the pre- and postrefactoring implementations. The difficulties in assessing overall improvements due to refactoring are turned into considerations about the suitability of the language features and model for better supporting the types of identified crosscutting concerns. We believe that the development of aspect languages could benefit from catalogs that associate types of crosscutting concerns to language mechanisms, and we provide further input for such catalogs. The paper’s main contributions are (1) an aspect-oriented fault model and adequacy criteria; (2) a refactoring strategy that emphasizes testing and the use of aspect-oriented solutions; (3) a detailed discussion of aspect refactorings and their testing implications, as carried out on an existing system; and (4) the initiation of an open source project that can be used to experiment with aspect-oriented testing and refactoring, and that can be used to compare an object with an aspect solution. The work described in this paper can be extended in various ways. First, we will continue to experiment with AJ HOT D RAW and other case studies, in order to further extend the fault model, adequacy criteria, and refactoring catalogs. Second we will use the proposed models and the experience gained from these case studies to come up with automated tool support for both testing and refactoring of aspect-oriented programs. Last but not least, we will analyze the risks and benefits of the various aspect solutions, and reflect on ways in which some of the limitations of the current solutions can be resolved. In order to put our work in a broader perspective, we would like to refer to Bray et al who state: “assessment of aspect-oriented software development in general is still arguably in its early days” [5]. We argue that one of the prerequisites for such an assessment is the availability of an aspect-oriented and non-aspect oriented version of the same software system. Our work aims to create such versions for a publicly available open source software system and thereby enables experimental comparative software evolution research to asses the benefits of aspect-orientation. Acknowledgments We would like to thank Magiel Bruntink (CWI), Hylke van Dijk (TU Delft), Marco Lormans (TU Delft), and Tom Tourwé (CWI), for reading earlier drafts of this paper. 23 Partial support was received from SENTERNovem, (Delft University of Technology, project MOOSE, ITEA 01002, and CWI, project IDEALS, hosted by the Embedded Systems Institute). References 1. R. Alexander, J.M. Bieman, and A. A. Andrews. Towards the systematic testing of aspectoriented programs. Technical Report CS-4-105, Colorado State University, 2004. 2. The AspectJ Team. The AspectJ Programming Guide. Palo Alto Research Center, 2003. Version 1.2. 3. K. Beck and E. Gamma. Test infected: Programmers love writing tests. Java Report, 3(7):51– 56, 1998. www.junit.org. 4. R. V. Binder. Testing Object-Oriented Systems: Models, Patterns, and Tools. AddisonWesley, 2000. 5. S. Bray, M. Yuen, Y. Coady, and M. E. Fiuczynski. Managing variability in systems: Oh what a tangled OS we weave. In D. Beuche, K. Czarnecki, M. Mezini, C. Schwanninger, and M. Voelter, editors, Managing Variabilities Consistently in Design and Code (MVCDC OOPSLA04), 2004. 6. M. Bruntink, A. van Deursen, R. van Engelen, and T. Tourwé. An evaluation of clone detection techniques for identifying cross-cutting concerns. In Proc. of Int. Conf. on Software Maintenance (ICSM 2004). IEEE CS, 2004. 7. C. Clifton and G. Leavens. Obliviousness, modular reasoning, and the behavioral subtyping analogy. In Workshop on Software-Engineering Properties of Languages for Aspect Technologies (SPLAT’03), 2003. http://www.daimi.au.dk/˜eernst/splat03/. 8. Y. Coady and G. Kiczales. Back to the future: A retroactive study of aspect evolution in operating system code. In Mehmet Akşit, editor, Proc. of 2nd Int. Conf. on Aspect-Oriented Software Development (AOSD), pages 50–59. ACM Press, March 2003. 9. Y. Coady, G. Kiczales, M. Feeley, and G. Smolyn. Using AspectC to improve the modularity of path-specific customization in operating system code. In Proc. of 8th European Softw. Eng. Conf. (ESEC/FSE), pages 88–98. ACM Press, 2001. 10. A. van Deursen. Program comprehension risks and benefits in extreme programming. In E. Burd, P. Aiken, and R. Koschke, editors, Proc. 8th Working Conf. on Reverse Engineering (WCRE 2001), pages 176–185. IEEE CS Press, 2001. 11. A. van Deursen and L. Moonen. The video store revisited - thoughts on refactoring and testing. In M. Marchesi and G. Succi, editors, Proc. of 3nd Int. Conf. on Extreme Programming and Flexible Processes in Software Engineering (XP2002), pages 71–76. University of Cagliari, May 2002. 12. T. Elrad, M. Aksit, G. Kiczales, K. Lieberherr, and H. Ossher. Discussing aspects of AOP. Communcations of the ACM, 44(10):33–38, 2001. 13. R. Ettinger and M. Verbaere. Untangling: A slice extraction refactoring. In Proc. of 3rd Int. Conf. on Aspect-Oriented Software Development. ACM Press, 2004. 14. M. Fowler. Refactoring: Improving the Design of Existing Code. Addison Wesley, 1999. 15. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994. 16. J. D. Gradecki and N. Lesiecki. Mastering AspectJ - Aspect Oriented Programmingin Java. Wiley Publishing, Inc., 2003. 17. S. Hanenberg, C. Oberschulte, and R. Unland. Refactoring of aspect-oriented software. In Proc. of Net.ObjectDays Conference, pages 19–35. Springer-Verlag, 2003. 24 18. J. Hannemann, T. Fritz, and G. C. Murphy. Refactoring to aspects: an interactive approach. In Proc. of 2003 OOPSLA Workshop on Eclipse technology eXchange, pages 74–78. ACM Press, 2003. 19. J. Hannemann and G. Kiczales. Design pattern implementation in Java and AspectJ. In Proc. of 17th Annual ACM conf. on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 161–173. ACM Press, 2002. 20. M. Iwamoto and J. Zhao. Refactoring aspect-oriented programs. In Proc. of 4th AOSD Modeling With UML Workshop, UML’2003, San Francisco, California, USA, 2003. 21. J. Kerievsky. Refactoring to Patterns. Addison-Wesley, 2004. 22. R. Laddad. Aspect-oriented refactoring. www.theserverside.com, December 2003. 23. R. Laddad. AspectJ in Action - Practical Aspect Oriented Programming. Manning, 2003. 24. M. M. Lehman. On understanding laws, evolution and conservation in the large program life cycle. Journal of Systems and Software, 1(3):213–221, 1980. 25. M. M. Lehman. Programs, life cycles and laws of software evolution. Proceedings of the IEEE, 68(9):1060–1076, September 1980. Special Issue on Software Engineering. 26. M. M. Lehman, D. E. Perry, and J. F. Ramil. Implications of evolution metrics on software maintenance. In T. M. Koshgoftaar and K. Bennett, editors, Proc. of Int. Conf. on Softw. Maintenance (ICSM 1998), pages 208–217. IEEE CS Press, 1998. 27. B. Liskov and J. M. Wing. A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst., 16(6):1811–1841, 1994. 28. M. Marin. Refactoring JHotDraw’s Undo concern to AspectJ. In Proc. of First Workshop on Aspect Reverse Engineering (WARE). Delft University of Technology, 2004. 29. M. Marin, A. van Deursen, and L. Moonen. Identifying aspects using fan-in analysis. In Proc. of 11th Working Conf. on Reverse Engineering (WCRE2004). IEEE CS, 2004. 30. B. Meyer. Object-Oriented Software Construction. Prentice-Hall, 2nd edition, 1997. 31. M.P. Monteiro. Catalogue of refactorings for AspectJ. Technical Report UM-DI-GECSD200401, Universidade do Minho, 2004. 32. M.P. Monteiro and J.M. Fernandes. Object-to-aspect refactorings for feature extraction. In Proc. of 3rd Int. Conf. on Aspect-Oriented Software Development. ACM Press, 2004. Industry paper. 33. D. L. Parnas. Software aging. In Proc. of 16th Int. Conf. on Softw. Eng. (ICSE), pages 279–287. IEEE CS Press, 1994. 34. M. C. Rinard, A. Salcianu, and S. Bugrara. A classification system and analysis for aspectoriented programs. In Proc. of 12th ACM SIGSOFT Int. Symp. on Foundations of Software Engineering (FSE), pages 147–158. ACM Press, 2004. 35. A. Rountev, A. Milanova, and B. G. Ryder. Fragment class analysis for testing of polymorphism in Java software. IEEE Trans. Softw. Eng., 30(6):372–387, 2004. 36. P. Tonella and M. Ceccato. Migrating interface implementation to aspect oriented programming. In Proc. of Int. Conf. on Softw. Maintenance (ICSM 2004). IEEE CS Press, 2004. 37. N. Ubayashi and T. Tamai. Aspect-oriented programming with model checking. In Proc. of 1st Int. Conf. on Aspect-oriented software development (AOSD), pages 148–154. ACM Press, 2002. 38. E. Weyuker. The evaluation of program-based software test data adequacy criteria. Communications of the ACM, 31(6):668–675, June 1988. 39. J. Zhao. Data-flow-based unit testing of aspect-oriented programs. In Proc. of the 27th Annual IEEE Int. Computer Software and Applications Conference (COMPSAC), pages 188– 197. IEEE CS, 2003. 25
2cs.AI
An Empirical Study of Online Packet Scheduling Algorithms Nourhan Sakr? and Cliff Stein?? arXiv:1603.07947v1 [cs.DS] 25 Mar 2016 Industrial Engineering and Operations Research, Columbia University, NY 10027 Abstract. This work studies online scheduling algorithms for buffer management, develops new algorithms, and analyzes their performances. Packets arrive at a release time r, with a non-negative weight w and an integer deadline d. At each time step, at most one packet is scheduled. The modified greedy (MG) algorithm is 1.618-competitive for the objective of maximizing the sum of weights of packets sent, assuming agreeable deadlines. We analyze the empirical behavior of MG in a situation with arbitrary deadlines and demonstrate that it is at a disadvantage when frequently preferring maximum weight packets over early deadline ones. We develop the MLP algorithm, which remedies this problem whilst mimicking the behavior of the offline algorithm. Our comparative analysis shows that, although the competitive ratio of MLP is not as good as that of MG, it performs better in practice. We validate this by simulating the behavior of both algorithms under a spectrum of simulated parameter settings. Finally, we propose the design of three additional algorithms, which may help in improving performance in practice. 1 Introduction Efficient buffer management at a network router is a critical issue that motivates the online packet scheduling problem. Kesselman et al. [13] introduce a buffer management delay model and give algorithms to minimize end-to-end delay. We adopt a similar model to analyze the empirical behavior of the modified greedy (MG) algorithm introduced in [12], and propose new algorithms that do not have as strong worst-case guarantees, yet perform better in our simulated settings. Model. For simplicity, we investigate a network router with two nodes. Studying a two node router is a first step towards understanding more complicated and realistic models. In § 7 we briefly discuss possible model modifications. At each integer time step, packets are buffered upon arrival at the source node, then at most one packet is chosen from the buffer to be sent to the target node. A packet (r,d,w) arrives at a release date r, has a non-negative weight w, and needs to be sent by an integer deadline d. A packet not sent by d expires, and is dropped from the buffer. The objective of a packet-scheduling algorithm A is to maximize ? ?? [email protected] Supported in part by NSF grant CCF-1421161. [email protected] its weighted throughput, ζA , defined as the total weight of packets sent by A. It is easy to relate our model to an online version of the classical offline unit-job scheduling problem where the input is a set of n unit-length jobs, each specified by a similar triple (r,d,w) and the objective is to maximize weighted througput, that is the total weight of jobs that are processed before their deadlines. Parameters. We will typically be generating our input according to some type of distribution. Let T denote the number of time steps during which the system can generate arriving packets, and let λ denote an arrival rate. We choose values for T and λ. Then at each integer time step t = 1, . . . , T , we first generate the number of arriving packets according to a Poisson distribution with rate λ. For each arriving packet, we set r = t and generate w from a uniform (integer) distribution U (1, wmax ). To find d, we first generate τ , a time to expire, from a uniform (integer) distribution U (0, dmax ), and set d = r + τ . We call this Model 1. We also consider a bimodal distribution for τ with weights p and 1 − p, respectively, for two distinct distributions centered on different means and call this Model 2. Although a network may induce correlations between packets, we use i.i.d. distributions as a first step in modeling the behavior of our algorithms. In order to evaluate the performance of an online scheduling algorithm (A), we use an offline algorithm (OFF) for comparison, which given all future arrivals and packet characteristics, is able to statically find the optimal solution (e.g. using maximum-weight bipartite matching). Its solution gives the highest possible throughput the system can achieve. The online algorithm is k-competitive if ζA on any instance is at least 1/k of ζOF F on this instance. The smallest k for which an algorithm is k-competitive is called the competitive ratio [3]. According to [11], k will be at most 2 for any algorithm that uses a static priority policy. In this paper, we will simulate the online algorithm and evaluate the ratio ζA /ζOF F . The average of these ratios across each batch of simulations will be denoted by ρA , where A is the corresponding online algorithm. Related Work. The literature is rich with works that acknowledge the importance of buffer management and present algorithms aiming at better router performance. Motivated by [13], [7] gives a randomized algorithm, RMIX, while [4] e -competitive against an adaptive-online adversary. proves that it remains e−1 Many researchers attempt to design algorithms with improved competitive ratios. The best lower bound on the competitive ratio of deterministic algorithms is the golden ratio φ [11, 5]. A simple greedy algorithm that schedules a maximumweight pending packet for an arbitrary deadline instance is 2-competitive [11, 13]. Chrobak et al. [8] introduce the first deterministic algorithm to have a competitive ratio strictly less than 2, namely 1.939. Li et al. [15] use the idea of dummy packets in order to design the DP algorithm with competitive ratio at most 1.854. Independently, [10] gives a 1.828-competitive algorithm. Further research considers natural restrictions on packet deadlines with hopes of improving the competitive ratio. One type of restriction is the agreeable deadline model considered in [12], i.e. deadlines are (weakly) increasing in their release times. Motivated by a more general greedy algorithm, EDFα [7], that schedules the earliest-deadline pending packet with weight at least 1/α of the maximumweight pending packet, [12] develop the MG algorithm which will be described in § 2. In other models, researchers enforce the FIFO discipline using a model where packets have no deadlines and the buffer is finite. One of the earliest such algorithms is the FIFO preemptive model studied by [2]. Works such as [9, 14, 16] adopt similar ideas. We do not consider the FIFO discipline in this paper. Our Contribution. We observe that while MG is φ-competitive for the case of agreeable deadlines, it may not be the best option to apply in practice. We demonstrate the undesirable performance of MG under certain scenarios, e.g. frequently preferring maximum weight (late deadline) packets over early deadline ones. Our proposed MLP algorithm remedies this drawback, as it outperforms MG on most simulated instances. However, we are able to develop hard instances to prove that MLP does not provide better worst-case guarantees, whereas on those instances MG would produce the same results as an offline solution. Contrasting the advantages of MG and MLP motivates us to explore further algorithmic adjustments which may improve performance, at least in practice, as supported by our preliminary analysis. Finally, we justify that a two-node model with an infinite buffer is a sufficient model for our analysis. Moreover, extending the model to multiple nodes or imposing a threshold on the capacity of the buffer does not significantly alter the performance of the online algorithms. 2 Modified Greedy Algorithm (MG) MG is a φ-competitive deterministic online algorithm for the agreeable deadline model [12]. It focuses on two packets at each time step: the earliest deadline nondominated packet e (i.e. maximum weight among all earliest-deadline packets) and the maximum weight non-dominated packet h (i.e. earliest deadline among all maximum-weight packets in the buffer). Packet e is chosen if we ≥ wφh (φ ≈ 1.618) and h is chosen otherwise. While [12] consider an agreeable deadline model, we relax this assumption and explore MG in a more general setting. MG analysis. Although MG has the best competitive ratio among deterministic online algorithms, we believe that by better understanding MG, we can improve on it in practice. Intuitively, if MG, at early stages, chooses packets with longer deadlines (due to higher weights) over those with early deadlines, then as time passes, many early packets expire while most of the heavy later-deadline packets will have already been sent. Therefore, the algorithm may resort to choosing packets with even smaller weights, thereby wasting an opportunity to send a higher weight packet that has already expired. We, hence, explore the decisions made by MG by observing its relative frequency of choosing h over e. In order to consider a diverse set of instances, we set T to 200 and define ranges [0.7,20], [1,20] and [1,40] for λ, wmax and dmax , respectively. Under the assumptions of Model 1, we run a batch of 200 simulations each for 8000 sampled parameter combinations. Given each parameter combination, we calculate the relative frequency of choosing h over e and average the frequencies over λ to obtain the empirical probability of P (wh > 1.618we ), denoted by ψ. We suspect that when ψ is high, especially if h expires at later deadlines, MG will be at a major disadvantage. Figure 1 plots ψ vs. wmax , where each curve corresponds to a fixed level for dmax . In general, ψ increases with wmax and dmax . The decreasing curve slope implies that ψ is more sensitive to lower values of wmax . Further analysis shows that at any level of wmax , MG will choose h over e at most 66% of the time. We also observe that regardless the average number of packets in the buffer, if wmax is small (less than 3), the event of interest occurs at most 40% of the time. Fig. 1: ψ vs. wmax , colored by dmax (a) ρM G vs. λ (b) ρM G vs. dmax Fig. 2: Performance of MG under Scenario 1 From this probability analysis, we conclude that unless wmax or λ are small, MG tends to choose packet h too frequently. To show that this property may ”fire back”, we construct Scenario 1, forcing MG to favor later deadlines. We reuse the data of the generated packets above and adjust the weight of each packet by multiplying it by its deadline. We let MG run on the new data and plot ρM G against different parameters. Figure 2 depicts lower ratios for the new dataset. While ρM G originally increased with λ, it now decreases with λ and dmax . wmax does not affect the performance much. A gradient boosted tree predictive model (i.e. a sequence of decision tree models where the next model is built upon the residuals of the previous one) shows that dmax is the most important factor under Scenario 1, as it accounts for 30% of the variability in the model. 3 Mini LP Algorithm (MLP) Description. In light of the previous analysis, we develop a new online algorithm that is more likely to send early deadline packets. The mini LP Algorithm (MLP) runs a ”mini” assignment LP at each time step in order to find the optimal schedule for the current content of the buffer, assuming no more arrivals. Assuming nt is the number of packets in the buffer at current time t, we search for the packet with the latest deadline (dt,max ) and set a timeline from t̂= 0 to dt,max − t. We then solve the following optimization problem, where wi is the weight of packet i and xit̂ is 1 if packet i is sent at time t̂ and 0 otherwise: min X wi xit̂ i,t̂ s.t. X xit̂ ≤ 1 t̂ = 0, . . . , dt,max − t xit̂ ≤ 1 i = 1, . . . , nt xit̂ ≥ 0 i = 1, . . . , nt i X t̂ MLP then uses the optimal solution to send the packet that receives the first assignment, i.e. the packet i for which xi0 =1, while the rest of the schedule is ignored and recomputed in subsequent time steps. 3.1 Initial Analysis Similar to the MG analysis, we compute ρM LP and are interested in its behavior as the load varies. A way to measure load is to define the average number of packets in the buffer as n̄, which is a byproduct of λ. We expect higher ρM LP at low n̄, since the online algorithm would not have many packets to choose from and hence, is more likely to choose the same packet as the offline algorithm at each time step. However, we expect ρM LP to decrease as n̄ increases, since the discrepancy between online and offline solutions increases. To test this, we sample parameter combinations from T ∈ [100, 500], λ ∈ [0.7, 20] and wmax , dmax ∈ [1, 20] and run a batch of 1000 simulations per combination. Figure 3 plots ρM LP vs. n̄ and interestingly shows a dip-shaped graph: ρM LP starts at a very high value (≈ 1), decreases as expected with increasing n̄ until eventually it increases again, thereby forming a dip, and finally converges to 1. Our claim is true at first, when λ is relatively low, as the first range for λ is quite sensitive (λ = 2.3 vs. 2.8 makes a difference). However, when λ increases, the problem loses its sensitivity. An explanation for such beFig. 3: ρM LP vs. n̄ havior may be that as n̄ increases (with increasing λ), we are more likely to have multiple packets achieving maximum weight, in which case both the online and offline algorithms are likely to choose those packets and have less discrepancy between their choices, especially if the weight or deadline ranges are not wide enough. We conclude that when the system is heavily or lightly loaded, both algorithms perform well. The dip happens in the interesting area. Consequently, we will investigate how the dip moves and what the effect of parameter choices will have on such graph. 3.2 Parameter Effect on MLP Behavior Changing the parameters to generate different graphs did not change the structure of the dip-shaped graph that we have seen in Figure 3. Nonetheless, the dip gets narrower/wider and shifts to the left/right, as parameters change. In this section, we will only focus on a restricted range for the values of λ, namely 0.7 to 10. However, we believe that the restriction does not mask any interesting results, since MLP converges at higher values of λ, as we have seen before. Therefore, a heavily loaded system is not significant for our analysis. Arrival Rates. The graph inevitably depends on λ, as it directly affects n̄, i.e. the x-axis. However, λ does not have a direct effect on the shape of the graph. By tuning the range for λ, we are able to “zoom in” onto the dip area and monitor the behavior more accurately where the system is neither lightly nor heavily loaded. The range for such sensitive values is on average between 1.3 and 4.2. Figure B.1.1a (in the appendix) zooms in on the dip where λ is most sensitive. Weight Ranges. The range of the weights moves the dip to the right (left), as it gets narrower (wider). Very narrow ranges (i.e. low values for wmax ) are the most influential. As wmax increases, its impact decreases. In fact, this result seems intuitive and one can see an example in Figure B.1.1b where the weight range is designed to be very narrow (wmax is set at 2). Some experimentation led us to the explanation of this phenomenon: When there are few options for weights, both algorithms converge together. Let’s say weights are only 1 and 2, then the higher the n̄, the more likely we will have packets of weight 2. In this case both algorithms find the optimal choice to be the packet with higher weight (we don’t have much choice here so it must be 2). Hence, both behave alike. We note that it is not in particular the range of weights that has this effect but rather the number of distinct weights available, i.e. choosing between weights 1 and 2 vs. 100 and 200, would depict the same behavior. Time Period and Deadline Range. T and dmax have a combined effect. Figures B.1.1c and B.1.1d give two examples: Allowing a longer timeline T results in a second but higher dip and slows down convergence, such that suddenly higher values of λ become slightly more interesting. Meanwhile lower dmax values (combined with shorter T ’s) result in a graph with one sharp dip as well as much faster convergence to 1. 3.3 Influence of maximum-weight packets The motivation of MLP was mainly to remedy the drawback we observed for MG when later deadline packets are preferred. Therefore, it is essential to verify that MLP outperforms MG under Scenario 1. In fact, one-sided 99% confidence intervals (CI) imply that ρM G is at most 91.98% while ρM LP is at most 96.28%. The difference in performance between both algorithms increases with λ. Figure 4a shows the behavior of ρ against n̄ for both algorithms. While MLP is not influenced by n̄ under this scenario, the performance of MG gets worse as , denoted by ρ̂, is (1.0443,1.0552), n̄ increases. A 99% two-sided CI for ρρMMLP G implying that MLP produces a total weight at least 4.43% more than that of MG under this scenario. Better performance is observed with higher T or lower dmax , but wmax does not seem to influence the algorithms’ performances. (a) ρ vs. n̄ under Scenario 1 (b) ρ vs. λ under Scenario 2 Fig. 4: ρM LP (red) and ρM G (green) 4 Comparative Analysis In this section, we contrast the behavior of MG and MLP under a spectrum of parameter settings. We are interested in the behavior of the ratios against our parameters and expect MLP to perform better in our simulations. The general procedure for our simulations is based on sampling parameter combinations from a predefined parameter space. we impose the following parameter range restrictions: T ∈ (50, 750), λ ∈ (0.5, 50), wmax ∈ (2, 50) and dmax ∈ (1, 50) (Scenario 2). For each combination, we run MG, MLP (5 times each) and the offline algorithm in order to obtain values for ρM G , ρM LP , as well as ρ̂ = ζζMMLP . Detailed G steps for simulations are given in § A.1. 4.1 Ratio behavior w.r.t. model parameters Comparing ρM LP and ρM G against values of λ implies that on average MLP outperforms MG (Figure 4b). As λ increases, both algorithms perform better. A 99% one-sided CI for ρM G is (0,0.9734), implying that we are 99% confident that ζM G is at most 97.34% of ζOF F , while the one-sided CI for ρM LP is (0,0.9926). In Figure B.2.1, it is evident that MG produces a wider spread of the ratios. All (a) under Scenario 2 (b) under Scenario 3 Fig. 5: ρ̂ vs. λ and colored by T else constant, the performance of each algorithm improves with higher T , lower dmax or higher n̄, whereas it is not influenced by the values of wmax . Figure 5a plots ρ̂ vs. λ, colored by T . For very small λ’s, there is the possibility that MLP and MG perform similarly; in some cases, MG outperforms MLP, regardless of the value of T . However, for large λ, MLP tends to outperform MG. A 99% two-sided CI for ρ̂ is (1.0188, 1.0216), implying that we are 99% confident that ζM LP is at least 1.88% more than ζM G . However, both algorithms have similar performance as the upper bound of the CI shows that ζM LP is at most 2.16% more. Whether this is beneficial depends on the use case as well as time constraints (see § 5). § A.2 presents a brief analysis where we construct gradient booted tree predictive models on the ratios for inference purposes. 4.2 Changing the distribution of τ So far, we have only considered uniform distributions, however, real inputs are more complicated. Here we make one step towards modeling more realistic inputs and consider a τ that follows a bimodal distribution of two distinct peaks (recall Model 2); with probability p, τ is N (2, 0.52 ) and with probability 1 − p, τ is N (8, 0.752 ). We restrict our parameters to the following ranges: T ∈ (100, 300), Fig. 6: ρM LP (red) and ρM G (green) vs. λ under Scenario 3 λ ∈ (0.7, 6), wmax ∈ (2, 7) and p ∈ (0.75, 0.95) (Scenario 3). We choose a bimodal distribution because these distributions are often hard for scheduling algorithms. Indeed, we see that the results for Scenario 3 are slightly different. While MG performs worse with increasing λ, ρM LP improves with λ and still outperforms ρM G (Figure 6).The graph for ρM LP resembles a dip-shaped graph, yet we find this dip to be entirely above the confidence interval of ρM G . All else constant, neither algorithm is influenced greatly by any of the parameters T , dmax or p. Figure 5b plots ρ̂ vs. λ, where lighter points correspond to longer T ’s. For very small λ, MLP and MG perform similarly. In some cases, MG outperforms MLP, regardless of the value of T . However, for large λ, a 95% CI shows that MLP outperforms MG by at least 2.80% and at most 3.30%. 5 Hard Instances The previous analysis presents evidence that MLP gives better competitive ratios than MG. An index plot (Figure 7) of ρM G and ρM LP shows that, for the same instances, MLP not only outperforms MG, but also gives a ratio of 1 for most of the instances that are hard for MG. However, it would be incorrect to conclude that MLP always has a better competitive ratio than MG. In fact, we are able to create hard instances for MLP where it performs worse than MG. A small example is given in Table 1. Fig. 7: Index plot of ρM LP (red) and ρM G (green) Packet(r,d,w) (1, 1, w1 ) (1, 2, w2 ) (2, 2, w2 ) Throughput MLP MG Offline Assign to t = 1 Assign to t = 2 w1 + w2 Assign to t = 1 Assign to t = 2 2w2 Assign to t = 1 Assign to t = 2 2w2 Table 1: Hard Instance for MLP For w2 > w1 , we can easily see that MLP is 2-competitive, while ρM G on those instances is 1. However, such worst-case instances may be rare and our results show that MLP performs better on a varied set of data. On the other hand, MG, which bases its decisions on simple arithmetic, is simpler than MLP which solves an LP at each time step. In our experiments, MLP was as much as 140 times slower than MG. In the next section, we consider some modifications to take advantage of the strengths of both approaches. 6 Algorithm Modifications In an attempt to find faster solutions, we introduce some possible algorithmic modifications. Preliminary results show slight performance improvement when these modifications are applied. However, more analysis is needed to verify the results and choose the best parameters for improvement. 6.1 The Mix and Match Algorithm (MM) Algorithm. The Mix and Match Algorithm (MM) combines both MG and MLP. At each time step, MM chooses to either run MG or MLP-according to n̄. If n̄ is high, then by previous analysis, MG and MLP each converges to 1 (assuming Model 1), and MM runs MG, as it is faster and has a competetive ratio that is as good as that of MLP. If n̄ is low, MM runs MLP, as it is more accurate and the running time is also small since n̄ is low. To distinguish between ”high” and ”low”, we define a threshold N̄ . Although MM suffers from the same limitations as MLP, it might still be preferred due to its smaller computation time. Simulation. We set T to 200 and define ranges [0.7,15], [1,30], [1,23] and [5,20] for λ, wmax , dmax and N̄ , respectively. We compare ζM M under different values of N̄ . We also average ζM M , use the same simulations to run MG and average ζM G . We take the ratio of both averages and plot it against n̄ (Figure 8). Preliminary results show that that for small n̄, the algorithm, at higher N̄ , does slightly worse than at lower N̄ . However, the opposite is true for large n̄. (a) N̄ = 5 (b) N̄ = 20 Fig. 8: Average ζM M over average ζM G vs. n̄ Future work. Further ideas are needed to set the optimal choice for N̄ . We may want to look at the percentage of times the algorithm chose to run MG over MLP in order to monitor time complexity. Another idea would be to take hard instances of MG into consideration and explore how to derive conditions such that the algorithm switches to MLP in such cases. 6.2 The Learning Modified Greedy Algorithm (LMG) Algorithm. MG and MLP are memoryless [12], i.e. the assignment of packets at time t uses no information about assignments at times t0 < t. We introduce a non-memoryless modification to MG. Recall that MG compares we to wφh . In the learning MG (LMG) algorithm, we try to make use of the past performance of MG, in order to replace φ by a more suitable divisor. If f defines the frequency of learning, then every f steps, we calculate the throughput at the current divisor, φ∗ . Then we search for a divisor, φbetter , which lies in the vicinity of φ∗ , but yields higher throughput using the previous data. Finally, we proceed with the new divisor φ∗new , given by (αφ∗ + (1 − α)φbetter ) for some smoothing factor α ∈ [0, 1]. The detailed procedure for LMG is given below: Step 0. Set the frequency of learning, f , i.e. the time window needed to define a learning epoch. Then run MG and use the following procedure every f steps in order to replace the divisor, φ, by a sequence of better divisors as follows: 1. Generate a sequence of divisors φi ’s starting at the current divisor φ∗ and having jumps of ±0.05, without going below 1 or above 2.5. For instance, if φ∗ =1.62, we generate the following sequence: 1.02, 1.07, . . ., 1.57, 1.62, 1.67, . . ., 2.47. 2. Start with the throughput associated with φ∗ and move left in our generated sequence. At each φi , we calculate the throughput of MG on the previous data. We keep moving to subsequent divisors as long as there is an increase in throughput. Next, we do the same with divisors to the right. Given a left endpoint and a right one, we choose the divisor associated with the higher throughput and denote it by φbetter . Some toy examples are shown in Table 2. For simplicity, we only observe the weighted throughput for four values of φ. Thruput/φi 1.57 φ∗ =1.62 Case 1 2 4 Case 2 2 4 Case 3 6 4 Case 4 4 4 Case 5 6 4 1.67 4 2 5 4 3 1.72 φbetter 2 1.62 6 1.62 7 1.72 4 1.62 7 1.57 Table 2: Examples for choosing φbetter 3. The new divisor φ∗new is given by smoothing φ∗ with φbetter , i.e. for some α ∈ [0, 1] φ∗new = αφ∗ + (1 − α)φbetter Simulation. We use the same parameter space as in § 6.1. We set f = max(0.1 ∗ 30 ) and for simplicity, α = 0.5. The choice for α in general must ensure T, min(1,λ) that the process of finding an optimal divisor φ does not generate a jumpy sequence of divisors. Our analysis for 8000 sampled scenarios shows that LMG outperforms MG 83.3% of the time. The range of the improvement is [-0.6%, 2.8%], implying that LMG brings as much as 2.8% increase in the ratio over MG. Performance is worse when the sequence of φ∗new ’s is around 1.618, implying that LMG is picking up on some noise and should not change the divisor. Future work. One can avoid this noise by statistically testing and justifying the significance of changing the divisor. In terms of time complexity, LMG is not slower than MG, as it can be done while the regular process is running. Finally, no direct conclusion is made about a threshold on the number of packets beyond which LMG is particularly effective. Further analysis could yield such conclusion, thereby indicating at which instances LMG should be used. 6.3 The Second Max Algorithm (SMMG) Algorithm. Inspired by the dummy packet (DP) algorithm discussed in [15] for cases of non-agreeable deadlines, we realize the importance of extending the comparison to a pool of more than two packets. The key idea in SMMG is to prevent the influence a single heavy packet may have on subsequent steps of the algorithm. We try to find an early-deadline packet that is sufficiently large compared to the heaviest packet. We set a value for p ∈ (0, 1) and the iterations are as follows: 1. If MG chooses e, send e and STOP. 2. Else find the earliest second largest packet in the buffer, denoted by s. 3. If ds < dh and ws ≥ max(we , p ∗ wh ), send s. Else send h. The intuition here is that sending packet e is always a good choice, so we need no modification. However, we limit over-choosing packet h by finding the earliest second-largest packet s. The concern is that keeping s in the buffer may bias the choice of the packets. Hence, we send s, if its weight is significant enough, in order to eliminate its influence and keep the possibility of sending h for a subsequent iteration (as h expires after s). To evaluate that ws is significant enough, we verify that it exceeds we (otherwise, we should have sent e), as well as p ∗ wh , a proportion of wh . Note that for instance, if p = 0.95, it means that SMMG is very conservative allowing the fewest modifications to MG. Simulation. We use the same parameter space as in § 6.1 and try values for p as follows: 0.65, 0.75, 0.85, 0.95. Figure 9 plots the improvement of SMMG over MG (ρM G - ρSM M G ) vs. n̄, colored by p. As expected, the lower the value of p, the bigger the deviation from MG. At very low n̄, we see that applying SMMG is not useful, however, as n̄ increases, the improvement remains positive. At all values of p, the improvement is at its highest when n̄ is between 8 and 12 packets. Hence, SMMG is useful when n̄ is in the vicinity of the interval between 4 and 17. Whether this is a significant result, depends on the nature of our problem. Even if p = 0.95, the minimum improvement within that interval is around 0.8%. However, the maximum improvement is 1.5% (at p = 0.95). Fig. 9: (ρM G - ρSM M G ) vs. n̄, colored by p 7 Model Discussion The two-node model with no buffer limitations clearly does not capture all aspects of realistic network models. Thus, in this section, we will consider a multinode model and also the case of finite buffer capacity. Multi-node model. In the previous analysis, we only considered a two-nodesystem, namely the source and the target nodes. In order to understand multinode systems, we consider first a three node system, that is a system of two tandem queues and see how the throughput behaves. Assume the arrival rate at node 1 is λ1 and that each packet has to be sent to visit node 2 then reach node 3 by its deadline. Some packets will be lost at node 1, as they expire before being sent. Node 2 will, hence, have less traffic. We assume as before that we can send at most one packet per node at each time step. Within this framework, we are interested to know whether this setup results in a deterministic online algorithm of better performance. Our simulation shows that node 2 either has the same throughput as node 1 or lower. After tracing packets, it turns out that this is a fairly logical result because node 2 only receives packets from node 1. The packet will either expire at stage 2 or go through to node 3. So the throughput can only be at most the same as that of node 1. The following minor adjustment slightly improves the performance at node 2: Each arriving packet has a deadline to reach node 3, denoted by d. We introduce a temporary deadline for that packet to reach node 2 by d − 1. This modification guarantees that we only send packets to node 2 if after arriving at node 2 there is at least one more time unit left to its expiration in order to give the packet a chance to reach node 3. Here is a trivial example: A packet arrives with deadline 7, i.e. it should arrive at node 3 by 7. Before the adjustment it was possible for this packet at time 7 to be still at node 1 and move to node 2, then be expired at node 2 and get lost. After the adjustment, this packet will have a deadline of 6 for node 2. So if by time 6, the packet hasn’t been sent yet, it gets deleted from the buffer of node 1 (one time step before its actual deadline). This adjustment improved the throughput of node 2 to be almost equal to that of node 1 because the arrival rate at node 2 is at most 1 (at most one packet is sent from node 1 at each time step). So node 2 is usually making a trivial decision of sending the only packet it has in its buffer. In conclusion, our model implicitly imposes a restriction on the maximum possible throughput at internal nodes, hence, making the multi-node model, where only one packet is sent at each time step, an uninteresting problem. In § 8, we give, however, a few future directions for more interesting extensions. Finiteness of Buffer. Throughout this paper, we chose not to put any restrictions on the buffer capacity and therefore we now look to verify whether the finiteness of the buffer has a major effect on the algorithm performance and its bounds. We run a set of experiments where, given λ ∈ [2, 100], we find the corresponding Fig. 10: b/λ vs. λ buffer size b, such that the probability of exceeding b is one in a million. We create an index plot for the ratio of b/λ (Figure 10) and conclude that imposing a buffer size is unnecessary. Even when λ = 100, the buffer size needs to be about 1.53 as much, i.e. 153. Furthermore, for the interesting values of λ used throughout this report, a buffer size of around 30 would be more than sufficient. We conclude that imposing a capacity limit on the buffer is not necessary as choosing a reasonable buffer size should not affect the algorithm’s performance. 8 Conclusion In this paper, we consider several old and new packet scheduling algorithms. By analyzing the empirical behavior of MG, we observe that MG chooses packet h over e too frequently. We therefore develop a new algorithm, MLP, which mimics the offline algorithm and gives higher attention to early deadline packets. We then show that on a wide variety of data, including uniform and bimodal distributions, MLP is slower, but has a better empirical competitive ratio than MG. (This is in contrast to the worst-case analysis where MG has a better competitive ratio.) We then propose three new algorithms that may offer an improvement in empirical performance, as they combine features of both algorithms. MM, at each time step, chooses between using MG or MLP in order to make a decision on the packet to send. LMG learns from previous behavior to correct the divisor used in MG, while SMMG is motivated by the idea of influential packets in extending the comparison to a pool of three packets, namely e, h and s. The improvements for these algorithms are small, yet encouraging for further analysis. Moreover, it is important to consider extensions for the network model and run the algorithms on one where induced correlations are captured by more realistic distributions that are not i.i.d. Contrasting the behavior of any of the algorithms mentioned in this paper on an actual router, rather than a simulated environment, would also be important to consider. Several interesting future directions remain. One important extension would be a multi-node model. We showed how the straightforward extension does not yield much insight but other extensions may be more interesting. For example, one could have nodes that process at different rates; this would prevent the first node from being an obvious bottleneck. Another possibility is to allow feedback, that is, if a packet expires somewhere in the multi-node system, it could return to the source to be resent. A final possibility is for each packet to have a vector of deadlines, one per node, so that different nodes could be the bottleneck at different times. Acknowledgments The authors would like to thank Dr. Shokri Z. Selim and Javid Ali. References [1] S. Albers and M. Schmidt. On the performance of greedy algorithms in packet buffering. SIAM Journal on Computing (SICOMP), 35(2):278–304, 2005. [2] N. Andelman, Y. Mansour, and A. Zhu. Competitive queuing polices for QoS switches. In Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 761–770, 2003. [3] A. Borodin and R. El-Yaniv Online Computation and Competitive Analysis. Cambridge University Press, 1998 [4] M. Bieńkowski, M. Chrobak, and L. Jeż. Randomized algorithms for buffer management with 2-bounded delay. In Proceedings of the 6th Workshop on Approximation and Online Algorithms (WAOA), pages 92–104, 2008. [5] F. Y. L. Chin and S. P. Y. Fung Online Scheduling with Partial Job Values: Does Timesharing or Randomization Help? Algorithmica, 37(3): 149–164, 2003 [6] F. Y. L. Chin and S. P. Y. Fung Improved competitive algorithms for online scheduling with partial job values. Theoretical computer science, 325(3): 467-478,2004. [7] F. Y. L. Chin, M. Chrobak, S. P. Y. Fung, W. Jawor, J. Sgall, and T. Tichy. Online competitive algorithms for maximizing weighted throughput of unit jobs. Journal of Discrete Algorithms, 4(2):255–276, 2006. [8] M. Chrobak, W. Jawor, J. Sgall, and T. Tichy Improved Online Algorithms for Buffer Management in QoS Switches In Proceedings of 12th European Symposium on Algorithms (ESA), pages 204–215, 2004. [9] M. Englert and M. Westermann Lower and Upper Bounds on FIFO Buffer Management in QoS Switches. In Proceedings of 14th Annual European Symposium on Algorithms (ESA), pages 352–363, 2006. [10] M. Englert and M. Westermann Considering Suppressed Packets Improves Buffer Management in QoS Switches. In Proceedings of 18th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 209–218, 2007. [11] B. Hajek. On the competitiveness of online scheduling of unit-length packets with hard deadlines in slotted time. In Proceedings of 2001 Conference on Information Sciences and Systems (CISS), pages 434–438, 2001. [12] L. Jeż, F. Li, J. Sethuraman, and C. Stein. Online scheduling of packets with agreeable deadlines. ACM Transactions on Algorithms (TALG), 9(1):5, 2012. [13] A. Kesselman, Z. Lotker, Y. Mansour, B. Patt-Shamir, B. Schieber, and M. Sviridenko. Buffer overflow management in QoS switches. SIAM Journal on Computing (SICOMP), 33(3):563–583, 2004. [14] A. Kesselman, Y. Mansour, R. van Stee. Improved Competitive Guarantees for QoS Buffering. Algorithmica, 43:63–80, 2005. [15] F. Li, J. Sethuraman, and C. Stein. Better online buffer management. In Proceedings of the 18th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 199–208, 2007. [16] Z. Lotker and B. Patt-Shamir Nearly Optimal FIFO Buffer Management for DiffServ. In Proceedings of the 21st ACM Symposium on Principles of Distributed Computing (PODC), pages 134–142, 2002. A Appendix A.1 General Procedure for Simulations in § 4 Our simulations try to avoid any initial bias by starting with a nonempty system. This is the role of the variable κ which ”warms up” the system; that is the simulation will take place for κ time steps before collecting any data. This warmup period allows the content of the buffer to adjust to normal running conditions for the system. The general simulation procedure is as follows: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Identify a parameter range for the parameters T , λ, wmax and dmax . Randomly select a parameter combination within the parameter space. Set κ = max(40, 0.4T ). Generate inputs for T +κ time steps using the chosen parameter combination. Find the optimal offline solution, for the last T steps only, i.e. sum of weights of packets sent from t = κ + 1 to t = κ + T and let that be our ζOF F . Run MG and record the weighted throughput for the last T steps only. Repeat Step 6 five times and let our ζM G be the average weighted throughput over the five runs. Run MLP and record the weighted throughput for the last T steps only. Repeat Step 8 five times and let our ζM LP be the average weighted throughput over the five runs. . Compute ρM G , ρM LP , as well as ρ̂ = ζζMMLP G Repeat Steps 2-10 500 times. Note that the input generation in Step 3 has been described in § 1. A.2 Predictive Model We construct a gradient boosted tree (GBT) predictive model on the results for inference purposes. The predictors were dmax , wmax , T , λ and whether MG or MLP were used and the response was ρ of the respective algorithm. In terms of variable importance (as measured by the model and stated as a percentage), λ and T turn out to be the two most important parameters. Feature λ T dmax wmax MLP? MG? Variable Importance 41% 15% 8% 3% 17% 16% Table A1: Variable Importance for a GBT predictive model Figure A.2.1a plots both model parameters for each of the algorithms, and colors them by ρ. This allows us to view the behavior of the ratio in a multivariate manner: We see here that there is a point where the ratios tend to level off, approximately (as can be seen by the constancy of the colors) around λ > 20 and T > 200. We looked to see if this was perhaps a result of the average number of packets in the buffer but saw slight correlation, as is evident in Figure A.2.1b. (a) Colored ρM LP (right) by ρM G (left) and (b) Colored n̄M LP (right) by n̄M G (left) Fig. A.2.1: T vs. λ (a) acutal ρM LP (b) predicted ρM LP (c) acutal ρM G (d) predicted ρM G Fig. A.2.2: 3D locally smoothed plot of ρ vs. T and λ and Next, we perform predictions from the model for a much larger range of T and λ (risking extrapolation issues). In Figure A.2.2b, ρM LP is well behaved for large values of T and λ: there seems to be a dip but that may be due to randomness. Furthermore, the ratios do not dip as sharply as for MG in Figure A.2.2d. This leads us to investigate more the behavior of ρM G for larger values of λ, which leads us to Scenario 4 where values for λ are extended to (0.5, 250) and the same analysis is run for MG. The results for the behavior of ρM G vs. λ shows an increasing performance under Scenario 4. We are 99% confident that ζM G is at most 98.69% of ζOF F . Plots against other parameters show that the performance of MG, all else constant, would get better with larger T or lower dmax and only slightly better for larger wmax . A gradient boosted tree predictive model again shows that λ and T are the two most important variables. As λ and T get larger, ρM G gets better. B Figures B.1 Parameter Effect on MLP Behavior (a) λ focuses on sensitive values (b) wmax reflects narrow weight ranges (c) longer T (d) smaller dmax Fig. B.1.1: ρM LP vs. n̄ B.2 ρM LP (red) and ρM G (green) vs. different parameters (a) T (b) wmax (c) dmax (d) n̄ Fig. B.2.1: ρM LP (red) and ρM G (green) vs. different parameters
8cs.DS
Distributed Computation of Large-scale Graph Problems Hartmut Klauck∗ arXiv:1311.6209v6 [cs.DC] 16 Sep 2015 Abstract Danupon Nanongkai† Gopal Pandurangan‡ Peter Robinson§ lower bound for connectivity, ST verification and other related problems. Our lower bounds develop and use new bounds in random-partition communication complexity. To complement our lower bounds, we also give algorithms for various fundamental graph problems, e.g., PageRank, MST, connectivity, ST verification, shortest paths, cuts, spanners, covering problems, densest subgraph, subgraph isomorphism, finding triangles, etc. We show that problems such as PageRank, MST, connectivity, and graph covering can be solved in Õ(n/k) time (the notation Õ hides polylog(n) factors and an additive polylog(n) term); this shows that one can achieve almost linear (in k) speedup, whereas for shortest paths, √ we present algorithms that run in Õ(n/ k) time (for (1 + ǫ)-factor approximation) and in Õ(n/k) time (for O(log n)-factor approximation) respectively. Our results are a step towards understanding the complexity of distributively solving large-scale graph problems. Motivated by the increasing need for fast distributed processing of large-scale graphs such as the Web graph and various social networks, we study a number of fundamental graph problems in the message-passing model, where we have k machines that jointly perform a computation on an arbitrary n-node (typically, n ≫ k) input graph. The graph is assumed to be randomly partitioned among the k ≥ 2 machines (a common implementation in many real world systems). The communication is point-to-point, and the goal is to minimize the time complexity, i.e., the number of communication rounds, of solving various fundamental graph problems. We present lower bounds that quantify the fundamental time limitations of distributively solving graph problems. We first show a lower bound of Ω(n/k) rounds for computing a spanning tree (ST) of the input graph. This result also implies the same bound for other fundamental problems such as computing a minimum spanning tree (MST), breadth-first tree (BFS), and shortest paths tree (SPT). We also show an Ω(n/k 2 ) 1 Introduction The emergence of “Big Data” over the last decade or so ∗ Division of Mathematical Sciences, Nanyang Technological has led to new computing platforms for distributed proUniversity, Singapore 637371 & Centre for Quantum Technolo- cessing of large-scale data, exemplified by MapReduce gies, Singapore 117543. E-mail: [email protected]. This work [12] and more recently systems such as Pregel [29] and is funded by the Singapore Ministry of Education (partly through Giraph[34]. In these platforms, the data — which is simthe Academic Research Fund Tier 3 MOE2012-T3-1-009) and by ply too large to fit into a single machine — is distributed the Singapore National Research Foundation. † KTH Royal Institute of Technology, Sweden, and University across a group of machines that are connected via a of Vienna, Austria E-mail: [email protected]. Work done while communication network and the machines jointly proat ICERM, Brown University, USA, and Nanyang Technological cess the data in a distributed fashion. The focus of this University, Singapore. paper is on distributed processing of large-scale graphs ‡ Department of Computer Science, University of Houston, Houston, TX 77204, USA. E-mail: [email protected]. which is increasingly becoming important with the rise Work done while at Division of Mathematical Sciences, Nanyang of massive graphs such as the Web graph, social netTechnological University, Singapore 637371 & Department of works, biological networks, and other graph-structured Computer Science, Brown University, Providence, RI 02912, USA. data and the consequent need for fast graph algorithms Supported in part by the following research grants: Nanyang on such large-scale graph data. Indeed, there has been Technological University grant M58110000, Singapore Ministry of Education (MOE) Academic Research Fund (AcRF) Tier 2 a recent proliferation of systems designed specifically grant MOE2010-T2-2-082, Singapore MOE AcRF Tier 1 grant for large-scale graph processing, e.g., Pregel [29], GiMOE2012-T1-001-094, and a grant from the US-Israel Binational raph [34], GraphLab [26], and GPS [1]. MapReduce Science Foundation (BSF). (developed at Google [12]) has become a very success§ Department of Computer Science, National University of Sinful distributed computing platform for a wide variety gapore. E-mail: [email protected]. Research supported by the grant MOE2011-T2-2-042 “Fault-tolerant Communica- of large-scale computing applications and also has been tion Complexity in Wireless Networks” from the Singapore MoE used for processing graphs [25]. However, as pointed out AcRF-2. by the developers of Pregel (which was also developed at Google), MapReduce may sometimes be ill-suited for implementing graph algorithms; it can lead to “suboptimal performance and usability issues” [29]. On the other hand, they mention that graph algorithms seem better suited to a message-passing distributed computing model [33, 28] and this is the main design principle [29] behind Pregel (and other systems that followed it such as Giraph [34] and GPS [1]). While there is a rich theory for the message-passing distributed computing model [33, 28], such a theory is still in its infancy for distributed graph processing systems. In this work, our goal is to investigate a theory for large-scale graph computation based on a distributed message-passing model. A fundamental issue that we would like to investigate is the amount of “speedup” possible in such a model vis-a-vis the number of machines used: more precisely, if we use k machines, does the run time scale linearly (or even super-linearly) in k? And what are the fundamental time bounds for various graph problems? 1.1 Model We consider a network of k > 1 (distinct) machines N = {p1 , . . . , pk } that are pairwise interconnected by bidirectional point-to-point communication links — henceforth called the k-machine model1 . Each machine executes an instance of a distributed algorithm A. The computation advances in synchronous rounds where, in each round, machines can exchange messages over their communication links. Each link is assumed to have a bandwidth of W , i.e., W bits can be transmitted over the link in one round. (In stating our time bounds, for convenience, we will assume that bandwidth W = 1; in any case, it is easy to rewrite our upper bounds to scale in terms of parameter W — cf. Theorem 4.1). (Note that machines have no other means of communication and do not share any memory.) There is an alternate — but equivalent — way to view our communication restriction: instead of putting bandwidth restriction on the links, we can put a restriction on the amount of information that each machine can communicate (i.e. send/receive) in a round. The results that we obtain in the bandwidth-restricted model will also apply to the latter model (cf. Section 4.2). Local computation within a machine is considered free, while communicating messages between the machines is the costly operation2 . 1 Our results can also be generalized to work if the communication network is a sparse topology as well if one assumes an underlying routing mechanism; details are omitted here. 2 This assumption is reasonable in the context of large-scale data, e.g., it has been made in the context of theoretical analysis of MapReduce, see e.g., [35] for a justification. Indeed, typically We are interested in solving graph problems where we are given an input graph G of n vertices (assume that each vertex has a unique label) and m edges from some input domain G. To avoid trivialities, we will assume that n ≥ k (typically n ≫ k). Unless otherwise stated, we will consider G to be undirected, although all our results can be made to apply in a straightforward fashion to directed graphs as well. Initially, the entire graph G is not known by a single machine, but rather partitioned among the k machines in a “balanced” fashion, i.e., the nodes and/or edges of G must be partitioned approximately evenly among the machines. We will assume a vertex-partition model, where vertices (and their incident edges) are partitioned across machines. One type of partition that we will assume throughout is the random (vertex) partition, i.e., vertices (and its incident edges) of the input graph are assigned randomly to machines. (This is the typical way that many real systems (e.g., Pregel) partition the input graph among the machines; it is simple and and easy to accomplish, e.g., via hashing 3 .) Our upper bounds will also hold (with slight modifications) without this assumption; only a “balanced” partition of the input graph among the machines is needed. On the other hand, our lower bounds apply even under random partitioning, hence they apply to worst-case partition as well. It can be shown that (cf. Lemma 4.1) a random partition gives rises to an (approximately) balanced partition. Formally, in the random vertex partition (RVP) model, each vertex of G is assigned independently and randomly to one of the k machines. If a vertex v is assigned to machine pi we call pi the home machine of v. Note that when a vertex is assigned to a machine, all its incident edges are assigned to that machine as well; i.e., the home machine will know the labels of neighbors of that vertex as well as the identity of the home machines of the neighboring vertices. A convenient way to implement the above assignment is via hashing: each vertex (label) is hashed to one of the k machines. Hence, if a machine knows a vertex label, it also knows where it is hashed to. Depending on the problem P, the vertices and/or edges of G have labels chosen from a set of polynomial (in n) size. Eventually, each machine pi (1 ≤ i ≤ k) in practice, even assuming the links have a bandwidth of order of gigabytes of data per second, the amount of data that have been to be communicated can be in order of tera or peta bytes which generally dominates the overall computation cost [35]. 3 Partitioning based on the structure of the graph — with the goal of minimizing the amount of communication between the machines — is non-trivial; finding such a “good” partition itself might be prohibitively expensive and can be problem dependent. Some papers address this issue, see e.g., [40, 3, 39]. must (irrevocably) set a designated local output variable oi (which will depend on the set of vertices assigned to machine pi ) and the output configuration o = ho1 , . . . , ok i must satisfy certain feasibility conditions w.r.t. problem P. For example, when considering the minimum spanning tree (MST) problem, each oi corresponds to a set of edges (which will be a subset of edges incident on vertices mapped to machine) pi and the edges in the union of the sets oi must form an MST of the input graph G; in other words, each machine pi will know all the MST edges incident on vertices mapped to pi . (Note that this is a natural generalization of the analogous assumption in the standard distributed message passing model, where each vertex knows which of its incident edges belong to the MST [33].) We say that algorithm A solves problem P if A maps each G ∈ G to an output configuration that is feasible for P. The time complexity of A is the maximum number of rounds until termination, over all graphs in G. In stating our time bounds, for convenience, we will assume that bandwidth W = 1; in any case, it is easy to rewrite our upper bounds to scale in terms of parameter W (cf. Theorem 4.1). Notation. For any 0 ≤ ǫ ≤ 1, we say that a protocol has ǫ-error if, for any input graph G, it outputs the correct answer with probability at least 1 − ǫ, where the probability is over the random partition and the random bit strings used by the algorithm (in case it is randomized). For any n > 0 and function T (n), we say that an algorithm A terminates in O(T (n)) rounds if, for any nnode graph G, A always terminate in O(T (n))) rounds, regardless of the choice of the (random) input partition. For any n and problem P on n node graphs, we let the time complexity of solving P with ǫ error probability in the k-machine model, denoted by Tǫk (P), be the minimum T (n) such that there exists an ǫ-error protocol that solves P and terminates in T (n) rounds. For any 0 ≤ ǫ ≤ 1, graph problem P and function T : Z+ → Z+ , we say that Tǫk (P) = O(T (n)) if there exists integer n0 and c such that for all n ≥ n0 , Tǫk (P) ≤ cT (n). Similarly, we say that Tǫk (P) = Ω(T (n)) if there exists integer n0 and real c such that for all n ≥ n0 , Tǫk (P) ≥ cT (n). For our upper bounds, we will usually use ǫ = 1/n, which will imply high probability algorithms, i.e., succeeding with probability at least 1 − 1/n. In this case, we will sometimes just omit ǫ and simply say the time bound applies “with high probability”. We use ∆ to denote the maximum degree of any node in the input graph, and D for the diameter of the input graph. of distributed “rounds”, for solving various fundamental graph problems. The time complexity not only captures the (potential) speed up possible for a problem, but it also implicitly captures the communication cost of the algorithm as well, since links can transmit only a limited amount of bits per round; equivalently, we can view our model where instead of links, machines can send/receive only a limited amount of bits per round. We develop techniques to obtain non-trivial lower and upper bounds on the time complexity of various graph problems. Lower Bounds. Our lower bounds quantify the fundamental time limitations of distributively solving graph problems. They apply essentially to distributed data computations in all point-to-point communication models, since they apply even to a synchronous complete network model where the graph is partitioned randomly (unlike some previous results, e.g., [41], which apply only under some worst-case partition). We first give a tight lower bound on the complexity of computing a spanning tree (cf. Section 2). The proof shows that Ω(n/k) rounds of communication are needed even for unweighted and undirected graphs of diameter 2, and even for sparse graphs. We give an information theoretic argument for this result. This result also implies the same bound for other fundamental problems such as computing a minimum spanning tree, breadth-first tree, and shortest paths tree. This bound shows that one cannot hope to obtain a run time that scales (asymptotically) faster than 1/k. This result, in conjunction with our upper bound of Õ(n/k) for computing a MST, shows that this lower bound is essentially tight. We then show an Ω(n/k 2 ) lower bound for connectivity, spanning tree (ST) verification and other related verification problems (cf. Section 3). To analyze the complexity of verification problems we give reductions from problems in the 2-player communication complexity model using random partitions of the input variables. As opposed to the standard fixed partition model here all input bits are randomly assigned to Alice and Bob. We give a tight lower bound for randomized protocols for the well-studied disjointness problem in this setting. In particular, we show a lower bound on the randomized average partition communication complexity of the disjointness problem which might be of independent interest. Random partition communication complexity has also been studied by Chakrabarti et al. [8], but their results apply to the promise disjointness problem in the multiparty number in hand model for a sufficiently large number of players only. In our proof we apply the rectangle based arguments of Razborov [36], but we need 1.2 Our Results and Techniques Our main goal to take care of several issues arising. A core ingrediis to investigate the time complexity, i.e., the number ent of Razborov’s proof is the conditioning that turns the input distribution into a product distribution. With randomly assigned inputs we need to recover the necessary product properties by conditioning over badly assigned input bits. Even when doing so the size of the sets in the input are no longer exactly as in Razborov’s proof. Furthermore, there is a large probability that the set intersection is visible to a single player right from the start, but with a small enough error probability the communication still needs to be large. pute exact shortest paths, this might take significantly longer (e.g., using Bellman-Ford — cf. Section 4.3). For graph covering problems such a Maximal Independent Set (MIS) and (approximate) Minimum Vertex cover (MVC), we show a bound of Õ(min(n/k, m/k 2 + ∆/k)); note that this implies a bound of Õ(n/k 2 ) for (constant) bounded degree graphs, i.e., we can get a speed up that scales superlinearly in k. We finally note that our results also directly apply to an alternate (but equivalent) model, where instead Algorithms and Upper Bounds. We introduce techof having a restriction on the number of bits individual niques to obtain fast graph algorithms in the k-machine links can transmit in a round, we restrict the number model (cf. Section 1.1). We first present a general reof bits a machine can send/receive (in total) per round sult, called the Conversion Theorem (cf. Theorem 4.1) (cf. Section 4.2). that, given a graph problem P, shows how fast algorithms for solving P in the k-machine model can be 1.3 Related Work The theoretical study of (largedesigned by leveraging distributed algorithms for P in scale) graph processing in distributed systems is relathe standard CONGEST message-passing distributed tively recent. Several works have been devoted to decomputing model (see e.g., [33]). We note that fast veloping MapReduce graph algorithms (e.g., see [25, 35] distributed algorithms in the standard model do not diand the references therein). There also have been sevrectly imply fast algorithms in the k-machine model. To eral recent theoretical papers analyzing MapReduce alachieve this, we consider distributed algorithms in an ingorithms in general, including Mapreduce graph algotermediate clique model (cf. Section 4.2) and then show rithms see e.g., [24, 35, 19] and the references therein. two ways — parts (a) and (b) respectively of the ConWe note that the flavor of theory developed for MapReversion Theorem — to efficiently convert algorithms in duce is quite different compared to the distributed comthe clique model to the k-machine model. Part (b) applexity results of this paper. Minimizing communicaplies to converting distributed algorithms (in the clique tion (which leads in turn to minimizing the number of model) that only uses broadcast, while part (a) applies communication rounds) is a key motivation in MapReto any algorithm. Part (a) will sometimes give better duce algorithms (e.g., see [35]); however this is gentime bounds compared to part (b) and vice versa — erally achieved by making sure that the data is made this depends on the problem at hand and the type of small enough quickly (in a small number of MapReduce distributed algorithm considered, as well as on the graph rounds) to fit into the memory of a single machine. An parameters. (The latter can be especially useful in apexample of this idea is the filtering technique of [24] applications where we might have some information on the plied to graph problems. The main idea behind filtering graph parameters/topology as explained below.) Using is to reduce the size of the input in a distributed fashion this theorem, we design algorithms for various fundaso that the resulting, much smaller, problem instance mental graph problems, e.g., PageRank, minimum spancan be solved on a single machine. Filtering allows for ning tree (MST), connectivity, spanning tree (ST) vera tradeoff between the number of rounds and the availification, shortest paths, cuts, spanners, covering probable memory. Specifically, the work of [24] shows that lems, densest subgraph, subgraph isomorphism, Trianfor graphs with at most n1+c edges and machines with gle finding (cf. Table 1). We show that problems such as memory at least n1+ε will require O(c/ǫ) (MapReduce) PageRank, MST, and connectivity, graph covering etc. rounds. can be solved in Õ(n/k) time; this shows that one can The work that is closest in spirit to ours is the reachieve almost linear (in k) speedup. For graph conneccent work of [41]. The above work considers a number tivity, BFS tree construction, and ST verification, we of basic statistical and graph problems in the messageshow Õ(min(n/k, m/k 2 + D∆/k)) bound — note that passing model (where the data is distributed across a set the second part of the above bound may be better in of machines) and analyzes their communication comsome cases, e.g., if the graph is sparse (i.e., m = O(n)) plexity — which denotes the total number of bits exand D and ∆ are small (e.g., bounded by O(log n)) changed in all messages across the machines during a 2 — then we get a bound of Õ(n/k ). For single-source computation. Their main result is that exact compushortest paths, another classic √ and important problem, tation of many statistical and graph problems in the we show a bound of Õ(n/ k) for a (1 + ǫ)-factor apdistributed setting is very expensive, and often one canproximation and a bound of Õ(n/k) for O(log n)-factor not do better than simply having all machines send approximation. We note that if one wants to com- Problem Upper Bound Lower Bound Minimum Spanning Tree (MST) Connectivity, Spanning Tree Verification (Conn,ST) Breadth First Search Tree (BFS) Single-Source Shortest-Paths Distances (SSSP) Single-Source Shortest-Paths Tree (SPT) All-Pairs Shortest-Paths Distances (APSP) PageRank with reset prob. γ (PageRank) Graph Covering Problems (MIS, MVC) Maximal Ind. Set on Hypergraphs (HMIS) (2δ − 1)-Spanner (Spanner) (δ ∈ O(log n)) Densest Subgraph (DSGraph) Triangle Verification (Tri) Subgraph Isomorphism (SubIso) (d-vertex subgraph) Õ(n/k) Õ(min(n/k, m/k 2 + D⌈∆/k⌉)) 2 Õ(min(n/k + D⌈∆/k⌉)) √ † + D, m/k $ Õ(n/√k) , Õ(n/k) Õ(n/ k)† , Õ(n/k)$ √ Õ(n n/k)# , Õ(n/k)$ Õ(n/γk) Õ(min(n/k, m/k 2 + ∆/k)) Õ(n/k + k) Õ(n/k) Õ(n/k) (for (2 + ǫ)-approx.) Õ(min(n∆2 /k 2 + ∆⌈∆/k⌉, n7/3 /k 2 + n4/3 /k)) Õ(n2+(d−2)/d /k 2 + n1+(d−2)/d /k) Ω̃(n/k)∗ Ω̃(n/k 2 ) Ω̃(n/k) † (1 + ǫ)-approximation. # (2 + ǫ)-approximation. $ O(log n)-approximation. ∗ Ω̃(n/k)∗ For any approx. ratio. Table 1: Complexity bounds in the k-machine model for an n-node input graph with m edges, max degree ∆, and diameter D. ǫ > 0 is any small constant. The notation Õ hides polylog(n) factors and an additive polylog(n) term. For clarity of presentation, we assume a bandwidth of Θ(log n) bits. their data to a centralized server. The graph problems considered are computing the degree of a vertex, testing cycle-freeness, testing connectivity, computing the number of connected components, testing bipartiteness, and testing triangle-freeness. The strong lower bounds shown for these assume a worst-case distribution of the input (unlike ours, which assumes a random distribution). They posit that in order to obtain protocols that are communication-efficient, one has to allow approximation, or investigate the distribution or layout of the data sets and leave these as open problems for future. Our work, on the other hand, addresses time (round) complexity (this is different from the notion of round complexity defined in [41]) and shows that nontrivial speed up is possible for many graph problems. As posited above, for some problems such as shortest paths and densest subgraph etc., our model assumes a random partition of the input graph and also allows approximation to get good speedup, while for problems such as MST we get good speedups for exact algorithms as well. For spanning tree problems we show tight lower bounds as well. The k-machine model is closely related to the wellstudied (standard) message-passing CONGEST model [33], in particular to the CONGEST clique model (cf. Section 4). The main difference is that while many vertices of the input graph are mapped to the same machine in the k-machine model, in the standard model each vertex corresponds to a dedicated machine. More “local knowledge” is available per vertex (since it can access for free information about other vertices in the same machine) in the k-machine model compared to the standard model. On the other hand, all nodes assigned to a machine have to communicate through the links incident on this machine, which can limit the bandwidth (unlike the standard model where each vertex has a dedicated processor). These differences manifest in the time complexity — certain problems have a faster time complexity in one model compared to the other (cf. Section 4). In particular, the fastest known distributed algorithm in the standard model for a given problem, may not give rise to the fastest algorithm in the k-machine model. Furthermore, the techniques for showing the complexity bounds (both upper and lower) in the k-machine model are different compared to the standard model. The recently developed communication complexity techniques (see e.g, [37, 32, 15]) used to prove lower bounds in the standard CONGEST model are not applicable here. 2 Tight Lower Bounds for Spanning Tree Computation In this section, we show that any ε-error algorithm takes Ω(n/k) rounds to compute a spanning tree (STC). Recall that in the STC problem, for every edge uv, the home machines of u and v must know whether uv is in the ST or not. Theorem 2.1. (Lower bound for STC) Every public-coin ǫ-error randomized protocol on a k-machine network that computes a spanning tree of an n-node input graph has an expected round complexity of  More specifically, there exists a constant Ω nk . ǫ > 0 such that, for any k ≥ 3 and large enough n,  Tǫk (STC), Tǫk (MST), Tǫk (BFS), Tǫk (SPT) ∈ Ω nk . Observation 1. For any X, Y chosen as described above, and all 1 ≤ i ≤ b such that Xi = Yi = 1 exactly one of the edges uvi or vi w must be part of any spanning tree, except for exactly one such i, for which both edges Proof. We first show the theorem for Tǫk (STC) using are in the spanning tree. For all other i the one edge uvi an information theoretic argument. Assume for a or vi w that is in the graph must also be in the spanning contradiction that there exists a distributed algorithm tree. in the k-machine model, denoted by R, that violates Theorem 2.1. In other words, R solves STC correctly Since all edges are adjacent to either u or w, and with probability at least 1 − ǫ and always terminates in any spanning tree must have b + 1 edges, one of p1 or p2 δn k rounds, for some δ ∈ o(1). We will show that the must output at most b/2 edges. Before the first round information flow to at least one machine must be large. of communication the entropy H(Y |X) is 2b/3 by the following calculation: Graph Gb (X, Y ). Let b = n − 2. For any X, Y ⊆ [b], X we construct the following graph, denoted by Gb (X, Y ). H(Y |X) = Pr(X = x) · H(Y |X = x) The vertices (and adjacent edges of Gb (X, Y )) will be x assigned to a random machine. b   X Gb (X, Y ) consists of b + 2 nodes, denoted by b ℓ = 3−b 2 · log 2ℓ v1 , . . . , vb and u, w. For each 1 ≤ i ≤ b, we add edge uvi ℓ ℓ=0 to Gb (X, Y ) if i ∈ X, and we add edge vi w to Gb (X, Y )  b−1  X b − 1 ℓ+1 if i ∈ Y . = 3−b b 2 The random strings X, Y will be drawn from a disℓ ℓ=0 tribution that will ensure that Gb (X, Y ) is connected. = 2b/3. Furthermore the graph will contain roughly 4b/3 edges with high probability (2b/3 adjacent to u, w respectively), hence roughly b/3 edges must be removed to Besides X the machine p1 also knows some vertices obtain a spanning tree. vi and their edges, giving it access to some bits of Y . To produce the correct output in R the machine It is easy to see via the Chernoff bound that with very that receives u must know which edges uvi are included high probability p1 knows at most (1 + ζ)b/k bits of in the spanning tree, and similarly the machine that Y for ζ = 0.01, lowering the conditional entropy of Y receives w must know which edges vi w are included given those bits to no less than 2b/3 − (1 + ζ)b/k. The in the spanning tree. Since X, Y are encoded in the event where p1 knows more cannot influence the entropy graph, the machine p1 who receives u knows X via 2 by more than 2−ζ b/(3k) · b = o(1) (for b large enough). the edges uvi at the start, but has initially limited Hence the entropy of Y given the initial information information about Y , unless it also receives w, which of p1 , which we denote by a random variable A, is happens with probability 1/k. With probability 1 − 1/k H(Y |A) ≥ 2b/3 − (1 + ζ)b/k − o(1). the information about Y initially held by p1 comes from Assume that p1 outputs at most b/2 edges. This the set of vertices vi held by p1 which is of size ≈ b/k event or the corresponding event for p2 must happen with high probability, giving p1 at most ≈ b/k bits of with probability 1 − ǫ assuming failure probability ǫ. information about Y . Hence all information needed to Conditioned on the event that p1 outputs b/2 or fewer decide which edges to not include must come into p1 via edges we can estimate the entropy H(Y |A, T0 ) for the communication with the other k − 1 machines. We show random variable T0 containing the transcript of all that this communication is Ω(b), if p1 outputs at most messages to p1 . H(Y |A, T0 ) ≤ H(Y |X, E) where E is b/2 edges as part of the spanning tree (and a symmetric the random variables of edges in the output of p1 (we argument holds for the machine p2 that holds w). Hence use that X and E can be computed from A, T0 ). Given the number of rounds is Ω(b/k) = Ω(n/k). that X = x there are |x| possible edges for E. With In order to give a clean condition on which edges probability 1 − o(1) we have |y| < 2b/3 + ζb. are necessary for a spanning tree we use the following For at most b/2 edges in E there are at most distribution on X, Y . X, Y (viewed as characteristic b b   vectors) are chosen uniformly from {0, 1} × {0, 1} X b/2 b/2 under the condition that for every i ∈ [b] we have ≤b· ℓ b/6 + ζb Xi + Yi ≥ 1. Hence there are exactly 3b possible values ℓ<b/6+ζb for X, Y . The following simple observation is crucial to our proof. possibilities for Y = y such that |y| ≤ 2b/3 + ζb. Hence we can estimate the remaining entropy of Y as follows:   b/2 H(Y |X, E) ≤ Pr(|Y | < 2b/3 + ζb)(log b/6 + ζb + log b) + o(1) n o( k2 log n ) expected rounds, and no (ǫ, ǫ)-error protocol n that solves Conn correctly in o( k2 log n ) rounds. To prove Theorem 3.1, we introduce a new model called random-partition (two-party) communication complexity and prove some lower bounds in this ≤ H(1/3 + 2ζ)b/2 + o(b) model. This is done in Section 3.1. We then use these for the binary entropy function H. For k ≥ 7 we lower bounds to show lower bounds for the k-machine can simply use the upper bound b/2 for the above model in Sections 3.1.1 and 3.1.2. quantity and conclude that I(T0 : Y |A) = H(Y |A) − H(Y |A, T0 ) ≥ 2b/3 − (1 + ζ)b/k − o(1) − b/2 ≥ Ω(b), and 3.1 Random-Partition Communication Comhence p1 must have received messages of length Ω(b). plexity We first recall the standard communication This happens with some probability γ for p1 and with complexity model, which we will call worst-partition probability (1 − ǫ) − γ for p2 . Hence |T0 | + |T1 | ≥ Ω(b). model, to distinguish it from our random-partition The above analysis is under the assumption that model. (For a comprehensive review of the subject, we different machines hold u, w, which happens with proba- refer the reader to [22].) In the worst-partition communication complexity bility 1 − 1/k. Without this assumption the information model, there are two players called Alice and Bob. flow must be at least (1 − 1/k) · Ω(b). Each player receives a b-bit binary string, for some For k < 7 we need to make a more careful analysis. integer b ≥ 1. We denote the string received by For instance, p1 actually gets only around 2b/(3k) bits Alice and Bob by x and y respectively. Together, they of information from knowing b/k bits of Y , and the both want to compute f (x, y) for a Boolean function estimate on H(Y |A, E) needs to be made more precise. b b f : {0, 1} × {0, 1} → {0, 1}. At the end of the We skip the details. This completes the proof of  n k process, we want both Alice and Bob to know the value Tǫ (STC) = Ω k . of f (x, y). We are interested in the number of bits To see that this also implies  n k k k exchanged between Alice and Bob in order to compute Tǫ (MST), Tǫ (BFS), Tǫ (SPT) ∈ Ω k , it is suffif . We say that a protocol R has complexity t if it cient to observe that any BFS tree (resp. MST, and 4 always uses at most t bits in total . For any function SPT, for any approximation ratio) is also a spanning f , the worst-partition communication complexity for tree. (f ), computing f with (ǫ0 , ǫ1 )-error, denoted by Rǫcc−pub 0 ,ǫ1 is the minimum t such that there is an (ǫ , ǫ )-error 0 1 3 Lower Bounds for Verification Problems protocol with complexity t. (Note that a protocol is In this section, we show lower bounds for the spanning (ǫ0 , ǫ1 )-error if it outputs 0 with probability at least tree (ST) and connectivity (Conn) verification problems. 1 − ǫ0 when f (x, y) = 0 and outputs 1 with probability An algorithm solves the Conn verification problem in at least 1 − ǫ1 when f (x, y) = 1.) our model if the machines output 1 if and only if the The random-partition model is slightly different input graph G is connected; the ST problem is defined from the worst-partition model in that, instead of giving similarly. We note that our lower bounds hold even every bit of x to Alice and every bit of y to Bob, each when we allow shared randomness, i.e. even when all of these bits are sent to one of the players randomly. machines can read the same random string. For a To be precise, let xi be the ith bit of x and yi be the problem P where a two-sided error is possible, we define th i bit of y. For any pair of input strings (x, y), we the time complexity of solving P with (ǫ0 , ǫ1 ) error partition it by telling the value of each xi and yi (by k probabilities, denoted by Tǫ0 ,ǫ1 (P), be the minimum sending a message of the form “xi = 0” or “xi = 1”) T (n) such that there exists a protocol that solves to a random player. As before, we say that a protocol P, terminates in T (n) rounds, and errs on 0-input R has complexity t if it always uses at most t bits in with probability at most ǫ0 and errs on 1-input with total, regardless of the input and its partition. We note probability at most ǫ1 . that the error probability of a protocol R is calculated over all possible random choices made by the algorithm Theorem 3.1. (ST verification and Conn) There exists a constant ǫ > 0 such that,  for any kk ≥ 2 and k and Tǫ,ǫ (Conn) = large enough n, Tǫ,0 (ST) = Ω̃ kn2  Ω̃ kn2 . In other words, there is no public-coin (ǫ, 0)error randomized protocol on a k-machine model that, on any n-node input graph, solves ST correctly in 4 We emphasize that we allow R to incur at most t bits of communication regardless of the input and random choices made by the protocol. We note a standard fact that one can also define the complexity t to be the expected number of bits. The two notions are equivalent up to a constant factor. and all possible random partitions; e.g., it is possible that an (ǫ0 , ǫ1 )-error protocol never answers a correct answer for some input partition. Also note that, while we pick the input partition randomly, the input pair itself is picked adversarially. In other words, an (ǫ0 , ǫ1 )error protocol must, for any input (x, y), output 0 with probability at least 1 − ǫ0 when f (x, y) = 0 and output 1 with probability at least 1 − ǫ1 when f (x, y) = 1, where the probability is over all possible random strings given to the protocol and the random partition. For any function f , the random-partition communication complexity for computing f with (ǫ0 , ǫ1 )-error, denoted (f ), is the minimum t such that there is an by Rǫrcc−pub 0 ,ǫ1 (ǫ0 , ǫ1 )-error protocol with complexity t. The problems of our interest are equality and disjointness. In the rest of Section 3.1, we show that the communication complexity of these problems are essentially the same in both worst-partition and randompartition models. The techniques used to prove these results are different between the two problems, and might be of an independent interest. 3.1.1 ST Verification and Random-Partition Communication Complexity of Eq. The equality function, denoted by eq, is defined as eq(x, y) = 1 if x = y and eq(x, y) = 0 otherwise. Note that this problem can be solved by the fingerprinting technique which makes a small error only when x 6= y, i.e. cc−pub Rǫ,0 (eq) = O(log b) (see, e.g. [22]). Interestingly, if we “switch” the error side, the problem becomes hard: cc−pub R0,ǫ (eq) = Ω(b). We show that this phenomenon remains true in the random-partition setting. Lemma 3.1 is proved in Appendix B. Lemma 3.1. (Random-Partition Equality) For rcc−pub some ǫ > 0, R0,ǫ (eq) = Ω(b). This lower bound holds even when Alice knows x and Bob knows y. Lower bound for ST verification. We now show a lower bound of Ω̃(n/k 2 ) on (0, ǫ)-error algorithms for ST verification. For the b-bit string inputs x and y of the equality problem, we construct the following graph G(x, y): The nodes are u0 , . . . , ub and v0 , . . . , vb . For any i, there is an edge between u0 and ui if and only if xi = 1, and there is an edge between v0 and vi if and only if yi = 0. Additionally, there is always an edge between uj and vj , for 0 ≤ j ≤ b. Observe that G(x, y) is a spanning tree if and only if x = y. Also note that G(x, y) has n = Θ(b) nodes. Now assume that there is a (0, ǫ)-error algorithm R in the k-machine model that finishes in õ(n/k 2 ) rounds. Alice and Bob simulate R as follows. Let p1 , . . . , pk be machines in the k-machine model, and assume that k is even. First, Alice and Bob generate a random partition of nodes in G(x, y) using the random partition of input (x, y) and shared randomness. Using shared randomness, they decide which machine the nodes u0 and v0 should belong to. Without loss of generality, we can assume that u0 belongs to p1 . Moreover, with probability 1 − 1/k, v0 is not in p1 , and we can assume that v0 is in p2 without loss of generality. (If u0 and v0 are in the same machine then Alice and Bob stop the simulation and output 0 (i.e. x 6= y).) Alice will simulate machines in PA = {p1 , p3 , p5 . . . , pk−1 } and Bob will simulate machines in PB = {p2 , p4 , . . . , pk }. This means that Alice (Bob respectively) can put and get any information from PA (PB respectively) with no cost. At this point, Alice assigns node u0 on p1 ; i.e., she tells p1 whether ui has an edge to u0 or not, for all i (this can be done since she knows x). Similarly, Bob assigns node v0 on p2 . (Note that to do this we need Alice to know x and Bob to know y in addition to the random partition of x and y. We have the lower bound of this as claimed in Lemma 3.1.) Next, they randomly put every node in a random machine. For any i, if Alice gets xi , then she assigns ui in a random machine in PA , i.e., she tells such a random machine whether ui has an edge to u0 or not. Otherwise, Bob puts ui in a random machine in PB in the same way. Since each xi and yi belongs to Alice with probability 1/2, it can be seen that each ui and vi will be assigned to a random machine. Similarly, node vi is assigned to a random machine depending on who gets yi . Note that both Alice and Bob know which machine each node is assigned to since they use shared randomness. Now Alice and Bob simulate R where Alice simulates R on machines in PA and Bob simulates R on machines in PB . To keep this simulation going, they have to send messages to each other every time there is a communication between machines in PA and PB . This means that they have to communicate Õ(k 2 ) bits in each round of R. Since R finishes in õ(n/k 2 ) rounds, Alice and Bob have to communicate õ(n) = õ(b) bits. Once they know whether G(x, y) is an ST or not, they can answer whether x = y or not. Since R is (0, ǫ)-error, Alice and Bob’s error will be (0, ǫ + 1/k), where the extra 1/k term is because they answer 0 when u0 and v0 are in the same machine. For large enough k, this error is smaller than the error in Lemma 3.1, contradicting Lemma 3.1. This implies that such an algorithm R does not exist. 3.1.2 Conn and Random-Partition Communication Complexity of Disjointness The disjointness function, denoted by disj, is defined as disj(x, y) = 1 if there is i such that xi = yi and disj(x, y) = 0 otherwise. This problem in the worst-partition model is a fundamental problem in communication complexity, having tons of application (e.g. [9]). Through a series of results (e.g. [2, 4, 7, 18, 36]), it is known that cc−pub Rǫ,ǫ (disj) = Ω(b). By adapting the previous proof of Razborov [36], we show that this lower bound remains true in the random-partition setting. Lemma 3.2 is proved in Appendix A. machine each node is assigned to since they use shared randomness. Now Alice and Bob simulate R where Alice simulates R on machines in PA and Bob simulates R on machines in PB . To keep this simulation going, they have to send messages between each other every time there is a communication between machines in PA and PB . This means that they have to communicate Õ(k 2 ) Lemma 3.2. (Random-Partition Disjointness) bits in each round of R. Since R finishes in õ(n/k 2 ) rcc−pub For some ǫ > 0, Rǫ,ǫ (disj) = Ω(b). This lower rounds, Alice and Bob have to communicate õ(n) = õ(b) bound holds even when Alice knows x and Bob knows y. bits. Once they know whether G(x, y) is connected or not, they can answer whether x and y are disjoint or Lower bound for Conn verification. We now show not. Since R is (ǫ, ǫ)-error, Alice and Bob’s error will a lower bound of Ω̃(n/k 2 ) on (ǫ, ǫ)-error algorithms for be (ǫ, ǫ+ 1/k), where the extra 1/k term is because they Conn verification, for a small enough constant ǫ > 0. answer 0 when u0 and v0 are in the same machine. For For the b-bit string inputs x and y of the disjointness large enough k, this error is smaller than the error in problem, we construct the following graph G(x, y): The Lemma 3.2, contradicting Lemma 3.2. This implies that nodes are u0 , . . . , ub and v0 , . . . , vb . For any i, there such an algorithm R does not exist. is an edge between u0 and ui if and only if xi = 0, and there is an edge between v0 and vi if and only if 4 Algorithms and Techniques yi = 0. Additionally, there is always an edge between uj and vj , for 0 ≤ j ≤ b. Observe that G(x, y) is 4.1 A Mapping Lemma We first prove a “mapconnected if and only if x and y are disjoint. Also ping” lemma for the random vertex partition model, note that G(x, y) has n = Θ(b) nodes. Assume that which we will use in our Conversion theorem (cf. Thethere is an (ǫ, ǫ)-error algorithm R in the k-machine orem 4.1). Consider an input graph G = (V, E) that is model that finishes in õ(n/k 2 ) rounds. Alice and Bob partitioned (according to the random vertex partition simulate R as follows. Let p1 , . . . , pk be machines in model) among the k machines in N = {p1 , . . . , pk } of the k-machine model, and assume that k is even. First, the network. Let |V | = n and |E| = m. We will assume Alice and Bob generate a random partition of nodes (without loss of generality) throughout that n ≥ k. We in G(x, y) using the random partition of input (x, y) say that a vertex v of G is mapped to a machine h of and shared randomness. Using shared randomness, they N if v is assigned to N , i.e., h is the home machine of decide which machine the nodes u0 and v0 should belong v (cf. Section 1.1). We say that an edge e = (u, v) of G to. Without loss of generality, we can assume that u0 is mapped to a link (pi , pj ) of the k-machine network, if belongs to p1 . Moreover, with probability 1 − 1/k, v0 is u is mapped to pi and v is mapped to vj or vice versa. not in p1 , and we can assume that v0 is in p2 without loss The following Mapping Lemma gives a concentration of generality. (If u0 and v0 are in the same machine then bound on the number of edges mapped to any link of Alice and Bob stop the simulation and output 0.) Alice the network. will simulate machines in PA = {p1 , p3 , p5 . . . , pk−1 } and Bob will simulate machines in PB = {p2 , p4 , . . . , pk }. This means that Alice (Bob respectively) can put and get any information from PA (PB respectively) with no cost. At this point, Alice assigns node u0 on p1 ; i.e., she tells p1 whether ui has an edge to u0 or not, for all i (this can be done since she knows x). Similarly, Bob assigns node v0 on p2 . Next, they randomly put every node in a random machine. For any i, if Alice gets xi , then she assigns ui in a random machine in PA , i.e., she tells such a random machine whether ui has an edge to u0 or not. Otherwise, Bob puts ui in a random machine in PB in the same way. Since each xi and yi belongs to Alice with probability 1/2, it can be seen that each ui and vi will be assigned to a random machine. Similarly, node vi is assigned to a random machine depending on who gets yi . Note that both Alice and Bob knows which Lemma 4.1. (Mapping Lemma) Let an n-node, medge graph G be partitioned among the k machines in N = {p1 , . . . , pk }, according to the random vertex partition model (assume n ≥ k). Then with probability at least 1 − 1/nα , where α > 1 is an arbitrary fixed constant, the following bounds hold: (1) The number of vertices of G mapped to any machine is Õ(n/k). (2) The number of edges of G mapped to any link of the network is Õ(m/k 2 + ∆/k), where ∆ is the maximum node degree of G. Proof. (1) This follows easily from a direct Chernoff bound application. Since each vertex of G is mapped independently and uniformly to the set of k machines, the expected number of vertices mapped to a machine is n/k. The concentration follows from a standard mapped to link ℓ; the total number of edges mapped pto X ⌉ Chernoff bound [14]. ℓ is bounded by Zℓp + Zℓq . We have, E[Zℓp |X p ] ≤ ⌈ k−1 q q p X q (2) We first note that we cannot directly apply a and similarly E[Zℓ |X ] ≤ ⌈ k−1 ⌉. We next show that Zℓ q 2 Chernoff bound to show concentration on the number and Zℓ are both bounded by Õ(m/k +∆/k) whp which p of edges mapped, as these are not independently dis- will complete the proof. We focus on Zℓ ; (the case of q p Zℓ is similar). By proof of (a), X < Φ with probability tributed. We show the bound in two steps: at least 1 − 1/n2α , where Φ = c log n(m/k + ∆) for some 1. (a) We first show a concentration bound on the total degree of the vertices assigned to any machine; sufficiently large constant c > 0, depending on constant 2. (b) then we bound the number of edges assigned to α. Observe that an edge that has one endpoint mapped to p is mapped to link ℓ independently. Hence we can any link. p ′ To show (a) we use Bernstein’s inequality [14]. Fix apply a standard Chernoff bound [14]: Pr(Zℓ < c Φ/k+ p p ′ p p a machine p. Let random variable Xi be defined as 1) ≤ Pr(X > Φ) + Pr(Zℓ < c Φ/k + 1)|X < Φ) ≤ ′ follows: Xip = d(vi ) (d(vi ) is the degree of vi ) if 1/n2α + 2−c Φ/k+1 ≤ 1/n2α + 2−3 log n+Ω(1) = O(1/n2α ), p ′ vertex vi is assigned Pn to pmachine p, otherwise Xi = for a sufficiently large constant c > 0. p Thus, with probability 1 − 1/n2α , the number of 0. Let X = i=1 Xi denote the total degree of the vertices assigned to machine p; in other words, it edges mapped to link ℓ is c′ Φ/k = Õ(m/k 2 + ∆/k). is the total number of edges that have at least one Applying a union bound over all k(k − 1)/2 links, yields endvertex assigned to P machine p. WeP have E[Xip ] = the result. n n p d(vi )/k and E[X p ] = i=1 d(vi )/k = i=1 E[Xi ] = p p 2 2m/k. Furthermore, V ar(Xi ) = E[(Xi ) ] − E[Xip ]2 = 4.2 The Conversion Theorem We now present a 2 1 2 general conversion theorem that enables us to leverage ( d(vk i ) )2 = (d(vki )) (1 − 1/k) k (d(vi )) − P Pn and hence n p 1 1 2 p V ar(X ) P = i=1 V ar(Xi ) = k (1 − k ) i=1 (d(vi )) ≤ results from the standard message-passing model [33]. n 1 1 1 1 Our conversion theorem allows us to use distributed i=1 ∆d(vi ) = k (1 − k )∆m. k (1 − k ) Using Bernstein’s inequality, we have (for some algorithms that leverage direct communication between nodes, even when such an edge is not part of the t > 0): input graph. More specifically, we can translate any t2 distributed algorithm that works in the following clique Pr(X p > E[X p ] + t) ≤ e− 2V ar(X p )+(2/3)bt) model to the k-machine model. where b = max1≤i≤n |Xip − E[Xip ]|. Now, |Xip − E[Xip ]| ≤ d(vi )(1 − 1/k) ≤ ∆(1 − 1/k) = b. Let γ > 0 and let A be the event that X p > 2m/k + γ(2m/k + ∆). Hence, for any γ > 0 and letting t = γ(2m/k + ∆), we have: t2 t2 Pr(A) ≤ e− 2(1/k)(1−1/k)∆m+(2/3)∆(1−1/k)t ≤ e− Θ(m∆/k+∆t) γ 2 (2m/k+∆)2 ≤e − Θ(m∆/k+∆2 ) ≤ e−γ 2 m Θ( ∆k + ∆k m +1) = O(1/n3α ), √ if γ = Θ(α log n). The above tail bound applies to a single machine p; applying a union bound over all the k machines, we have X p = Õ(m/k + ∆) whp for every machine p ∈ N . We now show (b) which will complete the proof of Part 2. Fix a link ℓ = (p, q) of the k-machine network. Let X p (resp. X q ) be defined as before, i.e., the total number of edges of G with at least one endvertex assigned to p (resp. q). Note that each such edge mapped to p has probability of 1/(k − 1) of being mapped to link ℓ (independently of other edges mapped to p). A similar statement holds for edges mapped to q as well. Let r.v. Zℓp (resp. Zℓq ) denote the number of edges, among those mapped to p (resp. q), that are The Clique Model. Consider a complete n-node network C and a spanning subgraph G of C determined by a set of (possibly weighted) edges E(G). The nodes of C execute a distributed algorithm and each node u is aware of the edges that are incident to u in G. Each node can send a message of at most W ≥ 1 bits over each incident link per round. For a graph problem P , we are interested in distributed algorithms that run on the network C and, given input graph G, compute a feasible solution of P . In addition to time complexity (the number of rounds in the worst case), we are interested in the message complexity of an algorithm in this model which is the number of messages (in the worst case) sent over all links. Additionally, we are also interested in communication degree complexity which is the maximum number of messages sent or received by any node in any round; i.e., it is the minimum integer M ′ such that every node sends a message to at most M ′ other nodes in each round. Note that we can simulate any “classic” distributed algorithm running on a network G of an arbitrary topology that uses messages of O(log n) size in the clique model by simply restricting the communication to edges in E(G) ⊂ E(C) and by splitting messages into packets of size W . In Let Gi be the graph whose node set is the same as the input graph (as well as the clique model), and there is an edge between nodes u and v if and only if a message is sent between u and v in round i of the algorithm; in other words, Gi captures the communications happening in round i. From Lemma 4.1(2), we know that (w.h.p.) each communication link of N is mapped to at most Õ(|E(Gi )|/k 2 + ∆i /k) edges of Gi , where ∆i is the maximum degree of Gi . This means that each machine needs to send at most Õ(|E(Gi )|/k 2 + ∆i /k) Theorem 4.1. (Conversion Theorem) Suppose messages over a specific communication link with high that there is an ε-error algorithm AC that solves probability. In other words, the ith round of AC can be problem P in time TC (n) ∈ Õ(n) in the clique model, simulated in Õ(|E(Gi )|/k 2 W +∆i /kW ) rounds, and, by for any n-node input graph. Then there exists an taking a union bound, the same is true for all rounds in ε-error algorithm A that solves P in the k-machine [1, TC (n)]. By summing up over all rounds of AC , we model with bandwidth W satisfying the following time can conclude that the number rounds needed to simucomplexity bounds with high probability: late AC is   (a) If AC uses point-to-point communication with mes   ′  TC (n)  X |E(Gi )| ∆i  M ∆ sage complexity M and communication degree com   Õ = Õ + + T (n) C ∆′ 2W 2W k kW k kW + T (n)⌈ ⌉ plexity ∆′ , then A runs in Õ kM C 2W kW i=1 time. the equality is because of the following facts: (1) (b) If AC is a broadcast algorithm with broadcast com- where PTC (n) B |E(Gi )| = O(M ) since |E(Gi )| is at most two plexity B, then A takes Õ( kW + TC (n)) time. i=1 times the number of messages sent by all nodes in the Proof. Consider any n-node input graph G with m ith round, and (2) ∆i ≤ ∆′ . This proves (a). edges and suppose that nodes in G are assigned to the Proof of (b): We first slightly modify the previous k machines of the network N according to the vertex simulation to simulate broadcast algorithms: Note that partitioning process (cf. Section 1.1). if AC is a broadcast algorithm, then for the ith round We now describe how to obtain algorithm A for the (i ≥ 1) of algorithm AC , if a node u belonging to k-machine model from the clique model algorithm AC : machine p1 sends messages to nodes v1 , . . . , vj (j ≥ 1) Each machine locally simulates the execution of AC at belonging to machine p2 , we know that u sends the each hosted vertex. First of all, we only need to consider same message to v1 , . . . , vj . Thus, when we simulate inter-machine communication, since local computation this round AC , we will let machine p1 send only one at each machine happens instantaneously at zero cost. message to p2 , instead of j messages. Then, machine If algorithm AC requires a message to be sent from a p2 will pretend that this message is sent from u1 to node u1 ∈ C hosted at machine p1 to some node u2 ∈ C all nodes belonging to p2 that have an edge to node u. hosted at p2 , then p1 sends this message directly to p2 (We cannot specify the destination nodes v1 , . . . , vj in via the links of the network N . (Recall that a machine this message as this might increase the length of the p1 knows the hosting machines of all endpoints of all message significantly.) edges (in G) that are incident to a node hosted at p1 .) We now analyze this new simulation. We show that Moreover, p1 adds a header containing the IDs of u1 and this simulation finishes in Õ( B + TC (n)) rounds. Let k u2 to ensure that p2 can correctly deliver the message Bi be the number of nodes that perform a broadcast to the simulation of AC at u2 . Each message is split in round i of the run of AC in the clique model, and into packets of size W , which means that sending all note that B = PTC (n) Bi . According to Lemma 4.1(a), i=1 packages that correspond to such a message requires the number of nodes contributing to Bi broadcasts ⌈O(log n)/W ⌉ rounds. In the worst case (i.e. W = 1), that are assigned to a single machine is Õ(⌈Bi /k⌉) this requires additional O(log n) rounds, which does not w.h.p.; in other words, w.h.p., each machine contains change our complexity bounds. Thus, for the remainder ℓi = Õ(⌈Bi /k⌉) of the Bi nodes. Thus, for every i, we of the proof, we assume that W is large enough such that instruct algorithm A to simulate these Bi broadcasts in any message generated by AC can be sent in 1 round in the k-machine model in ⌈ℓi /W ⌉ rounds. Since AC takes the k-machine model. at most TC (n) rounds, we can take a union bound, and B Proof of (a): We will bound the number of messages sent it follows that algorithm A takes Õ( kW +TC (n)) rounds in each round through each link using Lemma 4.1(2). in the k-machine model. this case, the time and message complexities remain the same (up to log-factors) while the communication degree complexity can be bounded by the maximum degree of G. We say that an algorithm is a broadcast algorithm if, in every round and for every node u, it holds that u broadcasts the same message to other nodes (or remains silent). We define the broadcast complexity of an algorithm as the number of times nodes broadcast messages. It is easy to see that a simulation similar to the one employed in the proof of Theorem 4.1 provides the same complexity bounds, if we limit the total communication of each machine (i.e. bits sent/received) to at most kW bits per round, instead of restricting the bandwidth of individual inter-machine links to W bits. To see why this is true, observe that throughout the above simulation, each machine is required to send/receive at most kW bits in total per simulated round with high probability. 4.3 Algorithms We now consider various important graph problems in the k-machine model. For the sake of readability, we assume a bandwidth of Θ(log n) bits, i.e., parameter W = Θ(log n). Observe that the simple solution of aggregating the entire information about the input graph G at a single machine takes O(m/k) rounds; thus we are only interested in algorithms that beat this trivial upper bound. Our results are summarized in Table 1. Breadth-First Search Tree (BFS). To get an intuition for the different bounds obtained by applying either Theorem 4.1(a) or Theorem 4.1(b) to an algorithm in the clique model, consider the problem of computing a breadth-first search (BFS) tree rooted at a fixed source node. If we use Theorem 4.1(a) we get a bound of Õ(m/k 2 + D⌈∆/k⌉) rounds. In contrast, recalling that each node performs O(1) broadcasts, Theorem 4.1(b) k (BFS) ∈ Õ(n/k + D). We will leverage these yields T1/n bounds when considering graph connectivity and spanning tree verification below. Minimum Spanning Tree (MST), Spanning Tree Verification (ST) and Graph Connectivity (Conn). An efficient algorithm for computing the MST of an input graph was given by [16], which proceeds by merging “MST-fragments” in parallel; initially each vertex forms a fragment by itself. In each of the O(log n) phases, each fragment computes the minimum outgoing edge (pointing to another fragment) and tries to merge with the respective fragment. Since any MST has n − 1 edges, at most n − 1 edges need to be added in total. This yields a total broadcast complexity of Õ(n) and thus Theorem 4.1(b) readily implies the bound of Õ(n/k). We can use an MST algorithm for verifying graph connectivity which in turn can be used for ST. We assign weight 1 to all edges of the input graph G and then add an edge with infinite weight between any pair of nodes u, v where (u, v) ∈ / E(G), yielding a modified graph G′ . Clearly, G is disconnected iff an MST of G′ contains an edge with infinite weight. This yields the first part of the upper bound for graph connectivity stated in Table 1. We now describe how to verify whether an edge set S is an ST, by employing a given algorithm A for Conn. Note that, for ST verification, each machine p initially knows the assumed status of the edges incident to its nodes wrt. being part of the ST, and eventually p has to output either yes or no. First, we run A on the graph induced by S and then we compute the size of S as follows: Each machine locally adds 1 to its count for each edge (u, v) ∈ S, if p is the home machine for vertices u, v. Otherwise, if one of u or v reside on a different machine, then p adds 1/2. Then, all machines exchange their counts via broadcast, which takes 1 round (since each count is at most n and W ∈ Θ(log n)) and determine the final count by summing up over all received counts including their own. Each machine outputs yes iff (1) the output of the Conn algorithm A returned yes and (2) the final count is n − 1. Thus we get the same bounds for ST verification as for graph connectivity. Recalling that we can compute a BFS in Õ(m/k 2 + D⌈∆/k⌉) rounds, it is straightforward to see that the same bound holds for Conn (and thus also ST verification): First, we run a leader election algorithm among the√k machines. This can be done in O(1) rounds (and Õ( k) messages) by using the algorithm of [23] (whp). The designated leader machine then chooses an arbitrary node s as the source node and executes a BFS algorithm. Once this algorithm has terminated, each machine locally computes the number of its vertices that are part of the BFS and then computes the total number of vertices in the BFS by exchanging its count (similarly to the ST verification above). The input graph is connected iff the BFS contains all vertices. PageRank. The PageRank problem is to compute the PageRank distribution of a given graph (may be directed or undirected). A distributed page rank algorithm was presented in [10], based on the distributed random walk algorithm: Initially, each node generates Θ(log n) random walk tokens. A node forwards each token with probability 1−δ and terminates the token with probability δ (called the reset probability). Clearly, every token will take at most O(log n/δ) steps with high probability before being terminated. From Lemma 2.2 of [11] we know that these steps can be implemented in O(log2 n) rounds in the clique model, and since this requires O(n log2 n/δ) messages to be sent in total, Theorem 4.1(a) yields that, for any δ > 0, there is a randomized algorithm for computing PageRank in the kn k ). machine model such that T1/n (PageRank) ∈ Õ( δk Computing a (2δ − 1)-Spanner. The algorithm of [5] computes a (2δ − 1)-spanner, for some (δ ∈ O(log n)), of the input graph G in δ 2 rounds (using messages of O(log n) size) that has an expected number of δm1+1/δ edges (cf. Theorem 5.1 in [5]). That is, each node needs to broadcast δ 2 times, for a total broadcast complexity of nδ 2 . Applying Theorem 4.1(b) yields a bound of Õ(n/k) rounds in the k machine model. Single-Source Shortest Paths (SSSP, SPT), and All-Pairs Shortest Paths(APSP). We show that, in the k-machine model, SSSP √ and APSP can be (1 + ǫ)-approximated√in Õ(n/ k) time, and (2 + ǫ)approximated in Õ(n n/k) time, respectively. Recall that, for SSSP, we need to compute the distance between each node and a√designated source node. 1/4 Nanongkai [31] presented a Õ( √ nD )-time algorithm for SSSP, which implies a Õ( n)-time algorithm in the clique model. We show that the ideas √ in [31], along with Theorem 4.1(b), leads to a Õ(n/ k)-time (1 + ǫ)approximation algorithm in the k-machine model. We sketch the algorithm in [31] here5 . First, every node broadcasts ρ edges incident to it of minimum weight (breaking tie arbitrarily), for some parameter ρ which will be fixed later. Using this information, every node internally compute Õ(1) integral weight functions (without communication). For each of these weight functions, we compute a BFS tree of depth n/ρ from the source node, treating an edge of weight w as a path of length w. Using two techniques called light-weight SSSP and shortest-path diameter reduction, the algorithm of [31] gives a (1 + ǫ)-approximation solution. Observe that this algorithm uses broadcast communication. Its time complexity √ is clearly TC (n) = Õ(ρ + n/ρ). n, we have the running time of (Thus, by setting ρ = √ Õ( n) in the clique model.) Its broadcast complexity is B = Õ(nρ) since every node has to broadcast ρ edges in the first step and the BFS tree algorithm has O(n) broadcast complexity. Its message complexity is M = Õ(n2 ρ) (the BFS tree algorithm has O(n2 ) message complexity since a message will be sent through each edge once). By Theorem 4.1(b), we have that in the k-machine model, the time√we need to solve SSSP is Õ( nρ + n/ρ). Using ρ = k, we have the running k + ρ√ √ √ time of Õ( k + n/ k) = Õ(n/ k) where the equality is because k ≤ n. In [31], a similar √ idea was also used to obtain a (2 + ǫ)-approximation n-time algorithm for APSP on the clique model. This algorithm is almost identical to the above algorithm except that it creates BFS trees of depth n/ρ from n/ρ centers instead of just the source. By this modification, it can be shown that the running time remains the same, √ i.e. TC (n) = Õ(ρ + n/ρ). n, we have the running time of (Thus, by setting ρ = √ Õ( n) in the clique model.) The broadcast complexity 5 The algorithm is in fact a simplification of the algorithm in [31] since we only have to deal with the clique model becomes B = Õ(nρ + n2 /ρ) since each BFS tree algorithm has O(n) broadcast complexity. Its message complexity becomes M = Õ(n2 ρ + n3 /ρ) since each BFS tree algorithm has O(n2 ) message complexity. By Theorem 4.1(b), we have that in the k-machine model, 2 /ρ the time we need to solve APSP is Õ( nρ+n +ρ+n/ρ). k √ √ Using ρ = n, we have the running time of Õ( n k n ). Since the algorithm of [31] also constructs a shortest path tree while computing the shortest path distances, we get analogous bounds for the SPT problem, which requires each machine to know which of its edges are part of the shortest path tree to the designated source. We can leverage the technique of computing a (2δ − 1)-spanner in Õ(n/k) rounds that has an expected number of Õ(m1+1/δ ) edges. We can simply collect all edges at one designated machine p, which takes time Õ(m1+1/δ /k) and then locally compute a (2δ − 1)-approximation for the shortest path problems at machine p. In particular, for δ = Θ(log n), we have a spanner of (expected) O(n) edges and thus we get a O(log n)-approximation for the shortest path problems in expected Õ(n/k) rounds. For computing the exact APSP (resp. SSSP) problems, we can use a distributed algorithm by BellmanFord ([33, 28]). This algorithm takes S rounds, where S is the shortest path diameter, and thus the broadcast complexity is nS. By virtue of Theorem 4.1(b), we get a round complexity of Õ(nS/k + S) in the k-machine model. Densest Subgraph. We show that Theorem 4.1 implies that the densest subgraph problem can be approximated in Õ(min( km2 , nk )) time in the k-machine model. In [38], Das Sarma et al. presented a (2 + ǫ)-approximation algorithm for the densest subgraph problem. The idea is very simple: In every round, they compute the average degree of the network and delete nodes of degree less than (1 + ǫ) times of the average degree. This process generates several subgraphs of the original network, and the algorithm output the densest subgraph among the generated subgraphs. It was shown in [38] that this algorithm produces a (2+ǫ)approximate solution. They also proved that this algorithm stops after log1+ǫ n rounds, implying a time complexity of TC (n) = O(log n) in the clique model. The message complexity is M = Õ(m) since every node has to announce to its neighbors in the input graph that it is deleted at some point. For the same reason, the broadcast complexity is B = Õ(n). Note that this algorithm is broadcast. So, By Theorem 4.1, we have that in the k-machine model, the time we need to solve this problem is Õ( nk ) as desired. Cut Sparsifier, Min Cut, Sparsest Cut, etc.. An ǫ-cut-sparsification of a graph G is a graph G′ on the same set of nodes such that every cut in G′ is within (1 ± ǫ) of the corresponding cut in G. We show that we can use the technique called refinement sampling of Goel et al. [17], to compute an ǫ-sparsification of Õ(n) edges in Õ(n/k) time in the k-machine model. By aggregating this sparsification to a single machine, we can approximately solve cut-related problems such as a (1 ± ǫ)-approximate solution to the minimum cut and sparsest cut problems. The main component of the algorithm of Goel et al. is repetitively sparsify the graph by keeping each edge with probability 2−ℓ for some ℓ, and compute the connected components after every time we sparsify the graph. By doing this process for Õ(1) times, we can compute a probability z(e) on each edge e. Goel et al. showed that we can use this probability z(e) to (locally) sample edges and assign weights to them to obtain an ǫ-sparsification. It is thus enough to be able to compute the connected components quickly in the k-machine model. This can be done by simply invoke the MST algorithm, which takes Õ(n/k) rounds. We have to runs this algorithm for Õ(1) times, so the total running time is Õ(n/k). Covering Problems on Graphs. We now describe how to solve covering problems like maximal independent set (MIS) in our model. We first consider MIS and related covering problems on simple graphs, and then describe how to obtain an MIS on an input hypergraph. A well known distributed algorithm for computing a maximal independent set (MIS) is due to [27]: The algorithm proceeds in phases and in each phase, every active node v—initially every node—marks itself with probability 1/2dv where dv is the degree of v. If v turns out to be the only marked node in its neighborhood, v enters the MIS, notifies all of its neighbors who no longer participate (i.e. become inactive) in future phases and terminates. When 2 neighboring nodes both mark themselves in the same phase, the lower degree node unmarks itself. Nodes that were not deactivated proceed to the next phase and so forth. It was shown in [27] that this algorithm terminates in O(log n) rounds with high probability. Since each node sends the same messages to all neighbors, we can analyze the communication in terms of broadcasts, yielding a broadcast complexity of O(n log n) (whp). Applying Theorem 4.1(b) yields a round complexity of Õ(n/k). Alternatively, for bounded degree graphs, applying Theorem 4.1(a) gives us a running time of Õ(m/k 2 + ∆/k), which is faster when ∆ ≪ k. Considering the locality preserving reductions (cf. [21]) between MIS, maximal matching (MM), minimal dominating set (MDS), and computing a 2approximation of the minimum vertex cover (MVC), we k k k k get that T1/n (MIS), T1/n (MM), T1/n (MVC), T1/n (MDS) are Õ(min(n/k, m/k 2 + ∆/k)). We now describe how to obtain an Õ(n/k + k) time algorithm for all graph covering problems directly in the k-machine model, without resorting to Theorem√4.1; note that this translates to Õ(n/k) when k ≤ Õ( n). In particular, this yields an Õ(n/k + k) algorithm for the problem of finding a maximal independent set in a hypergraph (HMIS), which has been studied extensively in the PRAM model of computation (cf. [20, 6]). Note that, for the hypergraph setting, the input graph G is a hypergraph and if some node u has home machine p1 , then p1 knows all hyperedges (and the corresponding machines) that contain u. To the best of our knowledge, there is no efficient distributed algorithm known for HMIS. First assume that there is an ordering of the machines with ids 1, . . . , k. Such an ordering can be obtained by running the O(1)-time leader election algorithm of [23]. The elected leader (machine) then arbitrarily assigns unique ids to all the other machines. Then, we sequentially process the nodes at each machine and proceed in k phases. In the first phase, machine 1 locally determine the membership status of being in the HMIS, for all of its nodes. Next, machine 1 computes an arbitrary enumeration of its nodes and sends the status (either 0 or 1) and node id of the first k nodes over its k links (i.e. a single status is sent over exactly 1 link). When a machine receives this message from machine 1, it simply broadcasts this message to all machines in the next round. Thus, after 2 rounds, all machines know the status of the first k nodes of machine 1. Then, machine 1 sends the status of the next k nodes and so forth. By Lemma 4.1, there will be Õ(n/k) nodes with high probability, and therefore every machine will know the status of all the nodes of machine 1 after Õ(n/k 2 ) rounds. After machine 1 has completed sending out all statuses, all other machines locally use this information to compute the statuses of their nodes (if possible). For example, if some node u at machine 1 is in the HMIS (i.e. has status 1) and adjacent to some node v at machine 2, then machine 2 sets the status of v to 0. Then, machine 2 locally computes the status of its remaining undetermined nodes such that they are consistent with the previously received statuses, and starts sending this information to all other machines in the same fashion. Repeating the same process for each of the k machines yields a total running time of Õ(n/k + k). Finding Triangles and Subgraphs. For the subgraph isomorphism problem SubIsod , we are given 2 input graphs: the usual n-node graph G and a dvertex graph H, for d ∈ O(1). We want to answer the question whether H ⊆ G. A distributed algorithm for the clique model that runs in O(n(d−2)/d ) rounds was given by [13]. Since the total number of mes- sages sent per round is O(n2 ), Theorem 4.1(a) gives rise to an algorithm for the k-machine model that runs in Õ(n2+(d−2)/d /k 2 + n1+(d−2)/d /k) rounds. We use Tri to denote the restriction of SubIso3 to the case where H is a triangle. The following is a simple algorithm for the clique model: Each node locally collects its 2-neighborhood information, checks for triangles and then either outputs yes or no. This requires each node to send a message for each of its at most ∆ neighbors. The total number of messages sent is n∆2 , and the algorithm takes ∆ rounds to send all messages. Applying Theorem 4.1(a), we get a distributed algorithm in the k-machine model with round complexity of Õ(n∆2 /k 2 + ∆⌈∆/k⌉), which is better than the above bound when ∆ is sufficiently k small. Thus, we have T1/n (Tri) ∈ Õ(min(n∆2 /k 2 + ∆⌈∆/k⌉, n7/3 /k 2 + n4/3 /k)). 5 Conclusion We presented algorithms and lower bounds for distributed computation of several graph problems. Our bounds are (almost) tight for problems such as computing a ST or a MST, while for other problems such as connectivity and shortest paths, there is a non-trivial gap between upper and lower bounds. Understanding these bounds and investigating the best possible can provide insight into understanding the complexity of distributed graph processing. References [1] Gps: A graph processing system, http://infolab.stanford.edu/gps/. 1, 2 [2] L. Babai, P. Frankl, and J. Simon. Complexity classes in communication complexity theory (preliminary version). In FOCS, pages 337–347, 1986. 9 [3] Nikhil Bansal, Kang-Won Lee, Viswanath Nagarajan, and Murtaza Zafer. Minimum congestion mapping in a cloud. In PODC, pages 267–276, 2011. 2 [4] Ziv Bar-Yossef, T. S. Jayram, Ravi Kumar, and D. Sivakumar. An information statistics approach to data stream and communication complexity. J. Comput. Syst. Sci., 68(4):702–732, 2004. Also in FOCS’02. 9 [5] Surender Baswana and Sandeep Sen. A simple and linear time randomized algorithm for computing sparse spanners in weighted graphs. Random Struct. Algorithms, 30(4):532–563, 2007. 12, 13 [6] Paul Beame and Michael Luby. Parallel search for maximal independence given minimal dependence. In SODA, pages 212–218, 1990. 14 [7] Mark Braverman, Ankit Garg, Denis Pankratov, and Omri Weinstein. From information to exact communication. In STOC, pages 151–160, 2013. 9 [8] Amit Chakrabarti, Graham Cormode, and Andrew McGregor. Robust lower bounds for communication and stream computation. Electronic Colloquium on Computational Complexity (ECCC), 18:62, 2011. 3 [9] Arkadev Chattopadhyay and Toniann Pitassi. The Story of Set Disjointness. SIGACT News, 41(3):59–85, 2010. 9 [10] Atish Das Sarma, Anisur Rahaman Molla, Gopal Pandurangan, and Eli Upfal. Fast distributed pagerank computation. In ICDCN, pages 11–26, 2013. 12 [11] Atish Das Sarma, Danupon Nanongkai, and Gopal Pandurangan. Fast distributed random walks. In PODC, pages 161–170, 2009. 12 [12] Jeffrey Dean and Sanjay Ghemawat. Mapreduce: Simplified data processing on large clusters. In OSDI, pages 137–150, 2004. 1 [13] Danny Dolev, Christoph Lenzen, and Shir Peled. ”tri, tri again”: Finding triangles and small subgraphs in a distributed setting - (extended abstract). In DISC, pages 195–209, 2012. 14 [14] Dubhashi and Panconesi. Concentration of Measure for Analysis of Randomized Algorithms. Cambridge University Press, 2012. 10 [15] Michael Elkin, Hartmut Klauck, Danupon Nanongkai, and Gopal Pandurangan. Can quantum communication speed up distributed computation? In PODC, 2014. 5 [16] Robert G. Gallager, Pierre A. Humblet, and Philip M. Spira. A distributed algorithm for minimum-weight spanning trees. ACM Trans. Program. Lang. Syst., 5(1):66–77, 1983. 12 [17] Ashish Goel, Michael Kapralov, and Sanjeev Khanna. Graph sparsification via refinement sampling. CoRR, abs/1004.4915, 2010. 14 [18] Bala Kalyanasundaram and Georg Schnitger. The Probabilistic Communication Complexity of Set Intersection. SIAM J. Discrete Math., 5(4):545–557, 1992. Also in CCC’87. 9 [19] Howard J. Karloff, Siddharth Suri, and Sergei Vassilvitskii. A model of computation for mapreduce. In SODA, pages 938–948, 2010. 4 [20] Pierre Kelsen. On the parallel complexity of computing a maximal independent set in a hypergraph. In STOC, pages 339–350, 1992. 14 [21] Fabian Kuhn, Thomas Moscibroda, and Roger Wattenhofer. Local computation: Lower and upper bounds. CoRR, abs/1011.5470, 2010. 14 [22] E. Kushilevitz and N. Nisan. Communication complexity. Cambridge University Press, New York, NY, USA, 1997. 7, 8, 20 [23] Shay Kutten, Gopal Pandurangan, David Peleg, Peter Robinson, and Amitabh Trehan. Sublinear bounds for randomized leader election. In ICDCN, pages 348–362, 2013. 12, 14 [24] Silvio Lattanzi, Benjamin Moseley, Siddharth Suri, and Sergei Vassilvitskii. Filtering: a method for solving graph problems in mapreduce. In SPAA, pages 85–94, 2011. 4 [25] J. Lin and C. Dyer. Data-Intensive Text Processing with MapReduce. Morgan Claypool Publishers, 2010. 1, 4 [26] Yucheng Low, Joseph Gonzalez, Aapo Kyrola, Danny Bickson, Carlos Guestrin, and Joseph M. Hellerstein. Graphlab: A new framework for parallel machine learning. In UAI, pages 340–349, 2010. 1 [27] Michael Luby. A simple parallel algorithm for the maximal independent set problem. SIAM J. Comput., 15(4):1036–1053, 1986. 14 [28] Nancy Lynch. Distributed Algorithms. Morgan Kaufmann, 1996. 2, 13 [29] Grzegorz Malewicz, Matthew H. Austern, Aart J. C. Bik, James C. Dehnert, Ilan Horn, Naty Leiser, and Grzegorz Czajkowski. Pregel: a system for large-scale graph processing. In SIGMOD Conference, pages 135– 146, 2010. 1, 2 [30] M. Mitzenmacher and E. Upfal. Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, 2005. 20 [31] Danupon Nanongkai. Distributed approximation algorithms for weighted shortest paths. In STOC, pages 565–573, 2014. 13 [32] Danupon Nanongkai, Atish Das Sarma, and Gopal Pandurangan. A tight unconditional lower bound on distributed randomwalk computation. In PODC, pages 257–266, 2011. 5 [33] David Peleg. Distributed computing: a localitysensitive approach. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2000. 2, 3, 4, 5, 10, 13 [34] The Apache Project. Apache Giraph, http://giraph.apache.org/. 1, 2 [35] Anand Rajaraman and Jeff Ullman. Mining of Massive Datasets. Cambridge University Press, October 2011. 2, 4 [36] Alexander A. Razborov. On the Distributional Complexity of Disjointness. Theor. Comput. Sci., 106(2):385–390, 1992. Also in ICALP’90. 3, 9, 16 [37] Atish Das Sarma, Stephan Holzer, Liah Kor, Amos Korman, Danupon Nanongkai, Gopal Pandurangan, David Peleg, and Roger Wattenhofer. Distributed verification and hardness of distributed approximation. SIAM J. Comput., 41(5):1235–1265, 2012. 5 [38] Atish Das Sarma, Ashwin Lall, Danupon Nanongkai, and Amitabh Trehan. Dense subgraphs on dynamic networks. In Distributed Computing - 26th International Symposium, DISC 2012, Salvador, Brazil, October 16-18, 2012. Proceedings, pages 151–165, 2012. 13 [39] Isabelle Stanton. Streaming balanced graph partitioning for random graphs. CoRR, abs/1212.1121, 2012. 2 [40] Isabelle Stanton and Gabriel Kliot. Streaming graph partitioning for large distributed graphs. In KDD, pages 1222–1230, 2012. 2 [41] David P. Woodruff and Qin Zhang. When distributed computation is communication expensive. In DISC, pages 16–30, 2013. 3, 4, 5 A Proof of Lemma 3.2 Our proof adapts the proof of Razborov [36] from the situation of a fixed partition to a random partition of the inputs. In the following we try to keep our notation close to that of Razborov’s. In particular, we use N to replace b as elsewhere in this paper. We first recall the standard definition of deterministic and randomized protocols here. Definition 1. The communication cost of a deterministic protocol P computing a function f : X ×Y → {0, 1} on an input x, y is the number of bits exchanged between Alice and Bob during P on x, y. The communication cost of P is the maximum communication cost over all inputs. The deterministic communication complexity of f is the minimum communication cost (over all protocols) computing f . A randomized protocol has to be correct with probability 2/3 (over the random choices used in the protocol) on every input. The randomized communication complexity is then defined as above. In the above definition, the inputs x, y are partitioned in a fixed way. We are interested in the communication cost over an average partition of the inputs to Alice and Bob. In this situation the communication cost (for a fixed input z) is the average over all partitions of the bits of z to Alice and Bob. More precisely, for every partition ρ of z there is a protocol Pρ computing f , and the communication cost on z is the average over the communication costs of all the Pρ on z. Here the distribution over partitions is the one in which every bit zj is assigned uniformly random to Alice or Bob (but not both). Definition 2. A deterministic average partition protocol P consists of a protocol Pρ for every partition of the inputs z = z1 , . . . , zℓ . Every protocol Pρ has to be correct on all inputs partitioned according to ρ. The average partition communication cost of a deterministic protocol P on an input z is the average number of bits exchanged by Pρ , where the distribution on ρ is defined such that each zj is assigned as input to Alice or Bob uniformly at random. The average partition communication cost of P is then the maximum over all inputs. The deterministic average partition communication complexity of a function f is the minimum average partition communication cost over all protocols for f . For randomized protocols the following correctness criteria must hold: for an input z the probability of P giving the correct output must be at least 2/3, over both the random choices inside the Pρ and the choice of Pρ itself. We note that in the definition above, the notion of average partition is slightly different from the notion of random-partition we define in Section 3.1 in that we are interested in expected communication complexity for the case of average partition, and worst-case communication complexity for the case of random partition. Since a protocol with worst-case communication complexity c also gives an average communication complexity c, a lower bound for the average partition model is also a lower bound for the random partition model. In this section, we will prove a lower bound for the average partition model. We will show a lower bound on the randomized average partition communication complexity of the Disjointness problem disj. This complexity measure is defined as a maximum over all inputs (of the average cost of randomized protocols under a random partition). As usual we can instead (as in the easy direction of the Yao principle) bound the expected complexity of deterministic protocols over a hard distribution on inputs (and over the random partitions). Recall that the partitions ρ of {z1 , . . . , zℓ } are chosen uniformly. Furthermore, inputs z will be chosen from a distribution µ defined by Razborov. It is important that inputs and their partition are chosen independent of each other. Due to independence, when analyzing the error of a protocol, we may also choose the partition first, and then consider the error for random inputs given a fixed partition. This error is the expectation over inputs z (from µ) and over partitions ρ of the input positions {1, . . . , 2N }. We denote the expected error under a fixed partition ρ, i.e., the expected error of Pρ , by ǫρ . The probability (over ρ) that ǫρ is larger than ǫ/δ is at most δ. Besides the error also the communication cost on input z is an expectation, this time over the choice of the partition. Recall that we are dealing with deterministic protocols Pρ . Denote by c the expected communication over the choice of ρ and the choice of z, and by cρ the expectation over z with ρ fixed. In our main lemma we will show that for most partitions ρ this is impossible unless c = Ω(N ). We first define the input distribution used by Razborov for disj on inputs of size N . Definition 3. Set N = 4m−1, the size of the universe of elements. To choose inputs according to Razborov’s distribution one first chooses a frame. The frame consists of a partition of {1, . . . , N } into 3 disjoint subsets zx , zy , {i} such that |zx | = |zy | = 2m − 1. For the distribution µ1 on 1-inputs to disj one then chooses a subset x of size m of zx as an input to Alice, and a subset of size m of zy as an input to Bob. For the distribution µ0 on 0-inputs one chooses a subset x of size m − 1 from zx and lets Alice’s input be x ∪ {i}, and correspondingly for Bob. The distribution µ is the mixture 3/4 · µ0 + 1/4 · µ1. Note that µ is the uniform distribution on all inputs for which both sets are of size m and the intersection size is at most 1. In our setting the partition ρ of input positions (not Theorem A.1. The randomized average partition com- to be confused with the partitions from the definition of munication complexity of the Disjointness problem disj µ) is chosen independent of the inputs (which are chosen is Ω(N ). from µ). We next observe that usually enough inputs The theorem also holds, if Alice also gets to know xi , yi are distributed among Alice and Bob. all of x and Bob gets to know all of y. Lemma A.1. Let ρ be a uniformly random partition of Proof of Theorem A.1 The inputs to Disjointness are z = x1 , . . . , xN , y1 , . . . , yN . We first take a look at a simple property that most partitions have, namely that on most partitions many pairs xj , yj are distributed among Alice and Bob. For simplicity we only care about pairs where xj is with Alice and yj is with Bob. After that we follow Razborov’s proof for the hardness of Disjointness under a fixed distribution µ, but we have to be more flexible with parameters, and restrict attention to a part of the distribution µ that is still hard (for a given partition of the inputs). Furthermore we have to analyze certain parts of rectangles separately to keep the product properties in Razborov’s proof intact. In the following δ will be a small all-purpose constant. Denote the expected error of the protocol by ǫ. the input variables x1 , . . . , xN , y1 , . . . , yN . pThen with probability 1 − δ we have that at least N/4 − N/δ pairs xj , yj are distributed such that Alice holds xi and Bob holds yi . Proof: For each pair xi is on Alice’s side and yi on Bob’s side with probability 1/4. Let C denote number of i’s for which this is the case. The expectation of C is N/4 and the variance is 3N/16. Hence, by Chebyshev’s inequality probability that |C − N/4| is larger than √ √ the √  (1/ δ)( 3/4) N is at most δ. We call partitions ρ under which more than n = N/5 positions j are such that xj is with Alice and yj with Bob good partitions. In the following we analyze protocols under an arbitrary fixed good partition, showing that protocols with low communication cost will have large error. Since the expected communication is at least 1 − δ times the cost under the best good partition, a linear lower bound will follow for a random partition. On the other hand, at most a δ fraction of all partitions is allowed to have larger error than ǫ/δ. So fix any good partition ρ. For notational simplicity assume that x1 , . . . , xn belong to Alice, and y1 , . . . , yn to Bob. The remaining inputs are distributed in any other way. We consider inputs drawn from the distribution µ. Note first, that the probability (under µ) that for the ”intersection position” i is larger than n, i.e., that both xi and yi might belong to Alice (or Bob) is 4/5, and in this case we assume the protocol already knows the answer without communication. So we have to assume that ǫ < 1/20 to get a lower bound, since i is contained in both x and y with probability 1/4, and hence with error 1/20 the problem to be solved is trivial. If the error is smaller than, say 1/50, then the protocol must give the correct output for most inputs with the intersecting position i smaller than n + 1. Define µρ as the distribution µ restricted to i (as part of the frame) being chosen from 1 to n. Note that µ = 1/5 · µρ + 4/5 · σ for some distribution σ. Since the protocols Pρ we consider have error ǫρ on µ (using partition ρ), they can have error at most 5ǫρ on µρ . So we restrict our attention to µρ . µρ,1 is the distribution µ1 restricted to i being from 1 to n, and µρ,0 is the distribution µ0 under the same restriction. We will denote the random variables of inputs chosen from µρ,1 by x0 , y0 (indicating intersection size 0), and the random variables of inputs chosen from µρ,0 by x1 , y1 . x, y is the pair of random variables drawn from µ. Note that x is the random variable corresponding to the marginal of µ on the x-variables. Furthermore we will denote by a, b etc. the random variables x, y grouped into Alice’s and Bob’s inputs. Note that the first n variables in x belong to Alice and the first n variables in y belong to Bob, the other variables are assigned in any way. Subscripts again indicate drawing inputs from µρ,0 or µρ,1 . We can now state the Main Lemma. In other words, all rectangles R that are trying to cover mostly 1-inputs to disj are either small or corrupted by a constant fraction of 0-inputs. A low error cover made up of rectangles hence needs to contain many rectangles. Now we show that the main lemma implies the lower bound for disj. The randomized average partition communication complexity is lower bounded by Eρ Eµ cρ,z (f ), where cρ,z is the communication cost on input z under partition ρ. Since all good partitions together have probability 1 − δ, we just need to show that for any good partition ρ the average communication Eµ cρ,z ≥ Ω(N ). We have Prρ,µ (cρ,z > δc) < δ. Hence, if we stop all protocols Pρ once their communication on an input z exceeds c/δ, we increase the error by at most δ. Hence in the following we can assume that for each ρ and z we have cρ,z ≤ c/δ, and in particular, that cρ ≤ c/δ. The protocol Pρ has communication at most c/δ, and corresponds to a partition of the communication matrix according to ρ into 2c/δ rectangles with total error ǫρ +δ under µ. Since µρ makes up one fifth of µ, the error under µρ can be at most 5(ǫρ + δ). Furthermore, the inputs in the support of µρ (i.e., the inputs with intersection size at most 1 and intersections happening at position n or less) are partitioned into 2c/δ rectangles with error 10(ǫρ +δ). Since µρ puts weight 3/4 on inputs x, y that are disjoint, there must be a single rectangle R that covers (3/12) · 2−c/δ of 1-inputs and at the same time has error at most 30(ǫ/δ + δ) (both under µρ ). The Main Lemma now leads to a contradiction for ζN < c/δ and 30(ǫ/δ + δ) being a suitably small constant. We now proceed to show the main lemma. In Razborov’s proof the rectangles R to be analyzed are product sets with respect to the divide between x and y. For us this is not the case, because Alice and Bob hold both x- and y-inputs. However, Alice holds x1 . . . , xn and Bob y1 , . . . , yn . Call all the remaining variables (that are distributed arbitrarily) O. In the statement of the Main Lemma α/(1 + α) is (a lower bound on) the error of R under µρ . Since α is a constant we will determine later it is enough to show a constant lower bound on the error of any large rectangle Lemma A.2. Let ρ be a good partition. x, y are chosen R. Denote the error of R under µρ by α′ . from µρ (i.e., µ with i < n + 1), and partitioned into The rectangle R can be partitioned into smaller random variables as described above. Let R = Ā × B̄ rectangles by fixing the variables O to some value o. denote a rectangle of size 2−ζN (under µρ ) in the We denote a resulting rectangle by Ro (note that Ro communication matrix induced by disj and ρ, for some is indeed a rectangle). Let γo denote the average error small constant ζ > 0. of Ro under µρ , normalized to Ro (where o is chosen Then according to the size of Ro ). Clearly the expected γo is α′ . Pr ((a1 , a1 ) ∈ R) ≥ α · Pr ((a0 , a0 ) ∈ R) , Ro = Āo ×B̄ o corresponds to a rectangle in {0, 1}n × {0, 1}n by ignoring fixed input variables. R itself is a for some constant α > 0. rectangle in {0, 1}N × {0, 1}N . o fixes x, y on the last N −n input positions, and if we define a as x∩{1, . . . , n} and b = y ∩ {1, . . . , n}, then ma = |a| and mb = |b| are fixed on Ro . For every a, b with fixed ma , mb there are     N −n N − n − m + ma fa,b = · m − ma mb in the same situation as Razborov, except that the sets a, b are not exactly of size n/4. Denote by ma and mb the sizes of a, b respectively. We consider the distribution ν which is defined as follows. Definition 4. n = 4m′ − 1. To choose inputs one first chooses a frame. There are n input positions. The frame consists of a partition of {1, . . . , n} into 3 disjoint extensions o. And hence as many (disjoint) rectangles subsets za , zb , {i} such that |za | = |zb | = 2m′ − 1. For the distribution ν1 on 1-inputs to disj one then Ro in R. Later we will restrict our attention to o for which ma , mb are very close to n/4. Recall that R has chooses a subset a of size ma of za as an input to Alice, size µρ (R) ≥ 2−ζN by the assumptions in the Main and a subset of size mb of zb as an input to Bob. For the distribution µ0 on 0-inputs one chooses a Lemma. To apply a modification of Razborov’s original subset a of size ma − 1 from za and lets Alice’s input be argument for disj on {0, 1}n × {0, 1}n we want to find a ∪ {i}, and correspondingly for Bob. The distribution ν is the mixture 3/4 · ν0 + 1/4 · ν1 . an o such that Ro 1. is large (as a rectangle in {0, 1}n × {0, 1}n) 2. has small error 3. the size of x∩{1, . . . n} and y ∩{1, . . . , n} is roughly n/4 for all inputs in Ro . Note that ν can be obtained from µρ by dropping the last N − n elements of the universe. Since µ is invariant under permuting the last N − n or the first n elements of the universe, for all x, y and a, b obtained from them ν(a, b) = µρ (x, y) · fa,b . In our case all fa,b are within 2O(κn) of each other. This means that our Ro has size ν(Ro ) ≥ 2−2ζN −O(κN ) . What is left to do is to prove Razborov’s Main Lemma under the modification that the sets x, y have fixed sizes that are slightly different from n/4. The argument is almost entirely the same, with some estimates looser than in the original. We now restate that Lemma. In this restatement we re-use the notation a1 etc., which now refer to the domain {0, 1}n × {0, 1}n and ν etc. −1 The rectangles Ro with µρ (R0 ) < fa,b · 2−2ζN contribute at most 2−2ζN to R and can thus be disregarded without changing the error much (even if the small Ro contain only 1-inputs). We choose o now by picking x, y from µρ restricted to R, and removing x1 , . . . , xn , y1 , . . . , yn . This clearly chooses a Ro by size, and hence the expected error is at most 2α′ , and the probability that the error is larger than 2α′ /δ is at most δ. We now have to consider the size of sets a = Lemma A.3. a, b are chosen from ν (as above). Let x ∩ {1, . . . , n} and b = y ∩ {1, . . . , n}. Note that o fixes R = Ā × B̄ denote a rectangle of size 2−ζ ′ , for some some kx of the x-variables to 1 and some ky of the y- small constant ζ ′ > 0. variables, and the size of a is m − kx , the size of b is Then m − ky . Pr ((a1 , a1 ) ∈ R) ≥ α · Pr ((a0 , a0 ) ∈ R) , The following claim follows from a simple application of the Chernoff inequality. for some constant α > 0. Claim 1. Choose o by choosing x, y from µρ and disWe omit the details of this. As discussed above this carding the variables outside O. implies our Main Lemma, and hence the lower bound 2 Pr(| |a| − n/4 | > κn or | |b| − n/4 | > κn) ≤ 2−κ n/3 . for disj. To see that the above proof also applies if Alice 2 knows all of x and Bob knows all of y note that we For a small enough κ (namely κ /3 · n ≪ ζN ) this actually analyze the rectangles R0 , in which the extra means that when we choose o as above (i.e., x, y from R inputs are fixed anyway. according to µ and dropping the unneeded variables), then with probability > 2/3 the size of a and b are B Proof of Lemma 3.1 within ±κn of n/4. Hence we can find o such that the above 3 criteria We will use the following lower bound which can be are satisfied, and all that is left to do is to show that Ro derived using basic facts in communication complexity. must have large error after all. By now we are almost We sketch its proof for completeness. cc−pub Theorem B.1. For some ǫ > 0, R0,ǫ (eq) ≥ b. gives the additional error of 4/b.) Moreover, the number of communication bits that their√simulation requires is √ Proof. [Proof sketch] We need the following additional less than |Sb |+(b−|Sb|)/2+(1/2) 6b ln b+b/4− 6b ln b √ notations. Let N 1 (f ) denote the nondeterminic com- which is less than b since |Sb | ≤ b/2+(1/2) 6b ln b. This munication complexity of computing f (see, e.g., [22, implies that Rcc−pub (eq) < b as desired. 0,ǫ Definition 2.3]). It is well-known that N 1 (eq) ≥ b Note that in the reduction above Alice knows x and (see, e.g. [22, Example 2.5]). Note further that Bob knows y. Thus, the claimed lower bound holds even cc−pub R0,ǫ (f ) ≥ N 1 (f ) (see, e.g., [22, Proposition 3.7]6 ). when Alice and Bob have this information in addition cc−pub Thus, R0,ǫ (eq) ≥ N 1 (eq) ≥ b as claimed. to the random partition. Proof. [Proof Lemma 3.1] prove that if √ We will now cc−pub rcc−pub R0,ǫ (eq) < b/4 − 6b ln b, then R0,ǫ (eq) < b, thus contradicting Theorem B.1. This immedircc−pub ately implies that R0,ǫ (eq) = Ω(b), as claimed in Lemma 3.1. Let A be a protocol in the random-partition model which requires strictly less than b/4 bits of communication. Alice and Bob simulates A as follows. First, they use shared randomness to pick a random partition of x and y, denoted by P. Let SB be the set of positions in x that √ Bob receives in partition P. If |SB | > b/2 + (1/2) 6b ln b, then they stop the simulation and answer 0 (representing “x 6= y”). Note that this could cause an error when x = y; however, by Chernoff’s bound (e.g. [30, Section 4.2.2]), this happens with probability at most 2/b. If Alice and Bob do not stop the simulation, Alice sends to Bob bits in x at positions √ in SB . This causes a communication of b/2 + (1/2) 6b ln b (note that Alice simply sends |SB | bits in order and Bob can figure out which bit belongs to which position since he also knows the partition P). Next, Bob checks whether bits in x sent from Alice is the same as his bits (in the same position). If not, he immediately answers 0 (“x 6= y”); otherwise, we let SA be the set of positions not in SB such that Alice receives bits in y at positions √ in SA . Bob checks if |SA | > (b − |SB |)/2 + (1/2) 6b ln b. If this is the case, then Alice and Bob stops the simulation and answer 0. This again could cause an error but it happens with probability at most 2/b by Chernoff’s bound. If this does not happen, Bob sends bits in y at positions √ in SA to Alice. This causes at most (b−|SB |)/2+(1/2) 6b ln b bits of communication. Then, Alice and √ Bob simulates A, which will finish after less than b/4 − 6b ln b bits of communication and produces an answer that is (ǫ, 0)error. Alice and Bob use this answer as their answer. Combining with the previous errors, we have that Alice and Bob’s answer is (ǫ+ 4/b, 0)-error. (This error comes from the worst-case scenario where A could be always correct for the partitions that Alice and Bob stops. This 6 We note that our notations are slightly different from [22]. It can be checked from [22, Definitions 3.1 and 3.3] that the rcc−pub definition of R0,ǫ is the same as R1 , i.e. they correspond to the case where we allow an error only when f (x, y) = 1.
8cs.DS
1 Spectral analysis for non-stationary audio arXiv:1712.10252v1 [eess.AS] 29 Dec 2017 Adrien Meynard and Bruno Torrésani Abstract A new approach for the analysis of non-stationary signals is proposed, with a focus on audio applications. Following earlier contributions, non-stationarity is modeled via stationaritybreaking operators acting on Gaussian stationary random signals. The focus is here on time warping and amplitude modulation, and an approximate maximum-likelihood approach based on suitable approximations in the wavelet transform domain is developed. This papers provides theoretical analysis of the approximations, and describes and analyses a corresponding estimation algorithm. The latter is tested and validated on synthetic as well as real audio signal. Index Terms Non-stationary signals, deformation, wavelet analysis, local spectrum, Doppler effect I. I NTRODUCTION Non-stationarity is a key feature of acoustic signals, in particular audio signals. To mention a few examples, a large part of information carried by musical and speech signals is encoded by their non-stationary nature, as is the case for environment sounds (think of car noises for example, where non-stationarity informs about speed variations), and many animals (bats, dolphins,...) use non-stationary signals for localization and communication. Beyond acoustics, amplitude and frequency modulation are of prime importance in telecommunication. A. Meynard and B. Torrésani are with Aix Marseille Univ, CNRS, Centrale Marseille, I2M, UMR 7373, Marseille, France. Part of this work was done when the two authors were at Centre de Recherches Mathématiques, UMI 3457, CNRS and Université de Montréal, Canada. Manuscript received ???, 2017; revised ???, 2017. 2 While stationarity can be given rigorous definitions, non-stationarity is a very wide concept, as there are infinitely many ways to depart from stationarity. The theory of random signals and processes (see [1], [2] and references therein) gives a clear meaning to the notion of stationarity. In the context of time series analysis, Priestley [2], [3] was one of the first to develop a systematic theory of non-stationary processes, introducing the class of locally stationary processes and the notion of evolutionary spectrum. A similar approach was followed in [4], who proposed a wavelet-based approach to covariance estimation for locally stationary processes (see also [5]). An alternate theory of locally stationary time series was developed by Dahlhaus [6] (see also [7] for a corresponding stationarity test). In a different context, frequency modulated stationary signal were considered in [8], [9], and time warping models were analyzed in [10]. In several of these approaches, wavelet, time-frequency and similar representations happen to play a key role for the characterization of non-stationarity. In a deterministic setting, a popular non-stationarity model expresses the signal as a sum of K sinusoidal components y(t) = ∑K k=1 Ak (t) cos (2πφk (t)). This model has been largely used in speech processing since early works by McAulay and Quatieri [11] (see also [12] and references therein for more recent developments, and [13], [14] for probabilistic approaches). The instantaneous frequencies φk′ of each mode give important information about the physical phenomenon. Under smoothness assumptions on functions Ak and φk′ , techniques such as ridge/multiridge detection (see [15] and references therein), synchrosqueezing or reassignment have been developed to extract theses quantities from a single signal observation (see [16], [17] for recent accounts). In sound processing, signals often possess an harmonic structure, which corresponds to a special case of the above model where each instantaneous frequency φk′ is multiple of a fundamental frequency φ0′ : φk′ (t) = λk φ0′ (t), λk ∈ R. If the amplitudes Ak are such that Ak (t) = αk A0 (t), we can describe such signals as a stationary signal x (t) = ∑K k=1 α k cos(2πλk t + ϕ k ) modified by time warping and amplitude modulation: y(t) = A0 (t) x (φ0 (t)). A major limit of this model is that each component is purely sinusoidal while audio signals often contain broadband information. However sounds originating from physical phenomena can often be modeled as stationary signals which have been deformed by a stationarity breaking operator (time warping, amplitude modulation,...). For example sounds generated by a variable speed engine or any stationary sound 3 deformed by Doppler effect can be described as such. A stochastic time warping model has been introduced in [18], [19], where wavelet-based approximation and estimation techniques were developed. In [9], [20], an approximate maximum-likelihood approach was proposed for the joint estimation of the time warping and power spectrum of the underlying Gaussian stationary signal, exploiting similar approximations. In this paper, we build on results of [9], [20] which we extend and improve in several ways. We develop an approximate maximum likelihood method for estimating jointly time warping and amplitude modulation from a single realization. While the overall structure of the algorithm is similar, we formulate the problem as a continuous parameter estimation problem, which avoids quantization effects present in [9], [20], and allows computing a Cramér-Rao bound for assessing the precision of the estimate. After completing the estimation, the inverse deformation can be applied to the input signal, which yields an estimate for the power spectrum. The plan of the paper is as follows. After giving some definitions and notations in Section II, we detail in Section III the non-stationary signal models we consider, and specify the assumptions made on the underlying stationary signal. We also analyze the effect of time warping and amplitude modulation in the wavelet domain, which we exploit in designing the estimation procedure. We finally propose an alternate estimation algorithm, and analyze the expected performances of the corresponding estimator. Section IV is devoted to numerical results, on both synthetic signals and real sounds. We also shortly describe in this section an extension published in [21] involving simultaneously time warping and frequency modulation. More mathematical developments are postponed to the Appendix. II. N OTATIONS AND BACKGROUND A. Random signals, stationarity Throughout this paper, we will work in the framework of the theory of random signals. Signals of interest will be modeled as realizations of random processes1 t ∈ R → Xt ∈ C. In this paper, the random processes will be denoted by upper-case letters 1 Signals of interest are real-valued, however we will also use complex-valued functions since we will use complex- valued wavelet transforms later on. 4 while their realizations will be denoted by lower-case letters. The random processes will be assumed to zero mean (E { Xt = 0} for all t) and be second order, i.e. they  have well defined covariance kernel E Xt X s . A particularly interesting class of such stochastic processes is the class of second order (or weakly) stationary processes, for  ∆ which CX (t − s) = E Xt X s is a function of t − s only. Under these assumptions, the Wiener-Khinchin theorem states that the covariance kernel may be expressed as the inverse Fourier transform of a non-negative measure dηX , which we will assume to be continuous with respect to the Lebesgue measure: dηX (ν) = SX (ν)dν, for some nonnegative L1 function SX called the power spectrum. We then write CX ( t ) = Z SX (ν)e2iπνt dν . We refer to textbooks such as [1], [2] for a more complete mathematical account of the theory, and to [20] for an extension to distribution theory setting. B. Elementary operators Our approach rests on non-stationary models obtained by deformations of stationary random signals. We will mainly use as elementary operators the amplitude modulation Aα , translation Tτ , dilation Ds , and frequency modulation Mν defined as follows: Aα x (t) = αx (t) , Ds x (t) = q−s/2 x (q−s t) , Tτ x (t) = x (t − τ ) , Mν x (t) = e2iπνt x (t) . where α, τ, s, ν ∈ R and q > 0 is a fixed number. The amplitude modulation commutes with the other three operators, which satisfy the commutation rules Tτ Ds = Ds Tq−s τ , Tτ Mν = e−2iπντ Mν Tτ , Mν Ds = Ds Mνqs . C. Wavelet transform Our analysis relies heavily on transforms such as the continuous wavelet transform (and discretized versions). In particular, the wavelet transform of a signal X : t ∈ R → Xt is defined as: W X (s, τ ) = hX, ψsτ i , with ψsτ = Tτ Ds ψ . (1) where ψ is the analysis wavelet, i.e. a smooth function, with fast decay away from the origin. It may be shown that for suitable choices of ψ the wavelet transform is invertible 5 (see [15]), we will not use that property here. Notice that when X is a realization of a continuous time random process, it does not need to decay at infinity. However, for a suitably smooth and localized wavelet ψ, the wavelet transform can still be well defined (see [15], [20] for more details). In such a situation the wavelet transform of X is a two-dimensional random field, which we analyze in the next section. Besides, in this paper the analysis wavelet ψ is complex valued and belongs to the set H 2 (R ) =  ψ ∈ L2 (R ) : supp(ψ̂ ) ⊂ R + . In that framework, a useful property is that if X is a real zero mean Gaussian random process then, W X is a complex zero mean circular Gaussian random field. Classical choices of wavelets in H 2 (R ) are (analytic) derivative of Gaussian ψk (which has k vanishing moments), and the sharp wavelet ψ♯ (with infinitely many vanishing moments) introduced in [21]. These can be defined in the positive Fourier domain by ψ̂k (ν) = νk e−kν 2 /2ν2 0 , δ ( ν,ν0 ) ψ̂♯ (ν) = ǫ δ(ν1,ν0 ) , ν > 0 (2) and vanish on the negative Fourier half axis. Here ν0 is the mode of ψ̂. In the expression of ψ̂♯ , ν1 is chosen so that ψ̂♯ (ν1 ) = ǫ (a prescribed numerical tolerance at cutoff   frequency ν1 ), and the divergence δ is defined by δ(a, b) = 12 ba + ba − 1. III. J OINT ESTIMATION OF TIME WARPING AND AMPLITUDE MODULATION A. Model and approximations Let us first describe the deformation model we will mainly be using in the following. As said above, the non-stationary signals of interest are obtained as linear deformations of stationary random signals. The deformations of interest here are amplitude modulations and time warpings. Amplitude modulations are pointwise multiplications by smooth functions, defined as Aa : Aa x (t) = a(t) x (t) , (3) where a ∈ C1 is a real valued function, such that 0 < c a ≤ a(t) ≤ Ca < ∞, ∀t , (4) for some constants c a , Ca ∈ R ∗+ . Time warpings are compositions with smooth and monotonic functions, Dγ : Dγ x ( t ) = q γ′ (t) x (γ(t)) (5) 6 where γ ∈ C2 is a strictly increasing smooth function, satisfying the control condition [20] 0 < cγ ≤ γ′ (t) ≤ Cγ < ∞, ∀t , (6) for some constants cγ , Cγ ∈ R ∗+ . Assume one is given a (unique) realization of a random signal of the form Y = A a Dγ X (7) where X is a stationary zero mean real random process with (unknown) power spectrum SX . The goal is to estimate the deformation functions a and γ from this realization of Y, exploiting the assumed stationarity of X. Remark 1: Clearly enough, the stationarity assumption is not sufficient to yield unambiguous estimates, since affine functions γ(t) = λt + µ do not break stationarity: for any stationary X, Dγ X is stationary too. Therefore, the warping function γ can only be estimated up to an affine function, as analyzed in [19] and [20]. Similarly, the amplitude function a can only be estimated up to a constant factor. A key ingredient of our approach is the smoothness of the deformation functions a and γ, and their slow variations. This allows us to perform a local analysis using smooth and localized test functions, on which the action of Aa and Dγ can be approximated τ g fτ by their so-called tangent operators A a and Dγ (see [19], [9], [20], [22]). More precisely, given a test function g located near t = τ (i.e. decaying fast enough as a function of |t − τ |), Taylor expansions near t = τ yield τ g fτ ∆ Aa g(t) ≈ A a g(t) , with Aa = A a(τ ) , ∆ fγτ g(t) , with D fγτ = Dγ g ( t ) ≈ D Tτ D− logq(γ′ (τ )) T−γ(τ ) . (8) (9) ∆ fY (s, τ ) = Therefore, the wavelet transform of Y will be approximated by WY (s, τ ) ≈ W E D τD τ X, T D ψ , i.e. g f A τ s a γ   ′ f (10) WY (s, τ ) = a(τ )W X s + logq (γ (τ )), γ(τ ) . Here we have used the standard commutation rules of translation and dilation operators given in Section II-B. The result below provides a quantitative assessment of the quality of the approximation. There, we denote by k f k∞ = ess supt | f (t)| the essential absolute supremum of a function f . 7 Theorem 1: Let X be a second order zero mean stationary random process, let Y be the non-stationary process defined in (7). Let ψ be a smooth test function, localized in such a way that |ψ(t)| ≤ 1/(1 + |t| β ) for some β > 2. Let WY denote the wavelet transform of fY its approximation given in (10), and let ε = WY − W fY denote the approximation Y, W error. Assume ψ and SX are such that rZ ∞ (ρ) ∆ IX = 0 ξ 2ρ SX (ξ )dξ < ∞ , where ρ = β−1 . β+2 Then the approximation error ε is a second order, two-dimensional complex random field, and where n o ρ E |ε(s,τ )|2 ≤ Ca2 q3s K1kγ′′ k∞ + K2 qµs kγ′′ k∞ + K3 a′ βσX √ , 2( β − 2) c γ p Cγ βσX , K3 = ( β − 2) c a (ρ) K2 = I X K1 = µ=  π ρ q 2 ∞ Cγ 2 4 , 3ρ β−4 , β+2 σX2 being the variance of X. The proof, which is an extension of the one given in [20], is given in appendix A. Remark 2: The assumption on β ensures that the parameters belong to the following intervals: 1/4 < ρ < 1 and −1/2 < µ < 1. Therefore, the variance of the approximation error tends to zero when the scales are small (i.e. s → −∞). Besides, the error is inversely proportional to the speed of variations of γ′ and a. This is consistent with the approximations of the deformation operators by their tangent operators made in equations (8) and (9). From now on, we will assume the above approximations are valid, and work on the fY , which approximate random fields. The problem is then to estimate jointly a, γ from W is a zero mean random field with covariance o n fY (s′ , τ ′ ) = C(s, s′ , τ, τ ′ ) fY (s, τ )W E W (11) where C(s, s′, τ, τ ′ ) = a(τ )a(τ ′ )q s+s′ 2 q Z ∞ SX (ξ ) γ′ (τ )γ′ (τ ′ ) 0   s′ ′ ′  2iπξ (γ(τ )−γ(τ ′ )) s ′ dξ. ×ψ̂ q γ (τ )ξ ψ̂ q γ (τ )ξ e (12) 8 B. Estimation 1) Estimation procedure: Our goal is to estimate both deformation functions γ and a fy of a realization y of Y, assuming the from the approximated wavelet transform W latter is a reliable approximation of the true wavelet transform. From now on, we fY is a zero mean additionally assume that X is a Gaussian random process. Therefore, W circular Gaussian random field and its probability density function is characterized by the covariance matrix. However, equation (12) shows that besides deformation functions the covariance also depends on the power spectrum SX of the underlying stationary signal X, which is unknown too. Therefore, the evaluation of the maximum likelihood estimate for a and γ requires a guess for SX . This constraint naturally brings the estimation strategy to an alternate algorithm. In [21], an estimate for the power spectrum was obtained at each iteration by computing a Welch periodogram on a “stationarized” signal Aã−1 Dγ̃−1Y, ã and γ̃ being the current estimates for the deformation functions a and γ. We use here a simpler estimate, computed directly from the wavelet coefficients. The two steps of the estimation algorithm are detailed below. Remark 3: The alternate likelihood maximization strategy is reminiscent of the Expectation-Maximization (EM) algorithm, the power spectrum being the nuisance parameter. However, while it would be nice to apply directly the EM paradigm (whose convergence is proven) to our problem, the dimensionality of the latter (and the corresponding size of covariance matrices) forces us to make additional simplifications that depart from the EM scheme. Therefore we turn to a simpler approach with several dimension reduction steps. (a) Deformation estimation. Assume that the power spectrum SX is known (in fact, only an estimate S˜X is known). Thus, we are able to write the likelihood corresponding to the observations of the wavelet coefficients. Then the maximum likelihood estimator is implemented to determine the unknown functions γ and a. The wavelet transform (1) is computed on a regular time-scale grid Λ = s × τ, δs being the scale sampling step and Fs the time sampling frequency. The sizes of s and τ are respectively denoted by Ms and Nτ . Considering the covariance expression (12) we want to estimate the vector of pa∆ fy (Λ ) denote the rameters Θ = (θ1 , θ2 , θ3 ) = (a(τ )2 , logq (γ′ (τ )) , γ(τ )). Let Wy = W 9 discretized transform and let CW (Θ ) be the corresponding covariance matrix. The related log-likelihood is 1 1 L (Θ ) = − ln |det(CW (Θ ))| − CW (Θ )−1 Wy · Wy . 2 2 (13) The matrix CW (Θ) is a matrix of size Ms Nτ × Ms Nτ , which is generally huge. For instance, when the signal is a sound of 5 seconds sampled at frequency Fs = 44.1 kHz and the wavelet transform is computed on 8 scales, the matrix CW (Θ ) has about 3.1 trillion elements which makes it numerically intractable. In addition, due to the redundancy of the wavelet transform, CW (Θ ) turns out to be singular, which makes the evaluation of the likelihood impossible. To overcome these issues, we use a block-diagonal regularization of the covariance matrix, obtained by forcing to zeros entries corresponding to different time indices. In other words, we disregard time correlations in the wavelet domain, which amounts to fy (s, τn ) as independent circular Gaussian vectors consider fixed time vector wy,τn = W with zero mean and covariance matrix C(Θn )ij = θn,1 C0 (θn,2 )ij , 1 ≤ i, j ≤ Ms , where C0 (θn,2 )ij = q(si +s j )/2 Z ∞ 0 SX (q−θn,2 ξ )ψ̂ (qsi ξ )ψ̂ (qs j ξ )dξ . (14) (15) In this situation, the regularized log likelihood L r splits into a sum of independent terms L r (Θ ) = ∑ L (Θn ) , n ∆ where Θn = (θn,1 , θn,2 ) = (θ1 (n), θ2 (n)) corresponds to the amplitude and warping parameters at fixed time τn = τ (n). Notice that in such a formalism, θn,3 = γ(τn ) does not appear any more in the covariance expression. Thus we are led to maximize independently for each n 1 1 L (Θn ) = − ln |det(C(Θn ))| − C(Θn )−1 wy,τn · wy,τn . 2 2 (16) For simplicity, the estimation procedure is done by an iterative algorithm (given in more details in part III-B2), which rests on two main steps. On the one hand, the loglikelihood is maximized with respect to θn,2 using a gradient ascent method, for a fixed 10 value of θn,1 . On the other hand, for a fixed θn,2 , an estimate for θn,1 is directly obtained which reads θ̃n,1 = 1 −1 C (θn,2 )wy,τn · wy,τn , Ms 0 (17) (b) Spectrum estimation. Assume the amplitude modulation and time-warping parameters θ1 and θ2 are known (in fact, only estimates θ̃1 and θ̃2 are known). For any n we can compute the wavelet transform 1 f Wy (s − θn,2 , τn ) = W x (s, γ (τn )) , (18) 1/2 θn,1 For fixed scale sm , w x,sm = W x (sm , γ(τ )) ∈ C Nτ is a zero mean random circular Gaussian vector with time independent variance (as a realization of the wavelet transform of a stationary process). Hence, the empirical variance is an unbiased estimator of the variance. We then obtain ( ) Z ∞ 1 1 2 2 E kwx,sm k = SX (ξ )qsm ψ̂ (qsm ξ ) dξ 2 2 Nτ kψk2 k ψ k2 0 ∆ = SX,ψ (q−sm ω0 ) , (19) where ω0 is the central frequency of |ψ̂ |2 . SX,ψ is a band-pass filtered version of SX centered around frequency νm = q−sm ω0 . Besides, the bandwidth of the filter is propor- tional to the frequency νm . This motivates the introduction of the following estimator S˜X of SX S˜X (q−sm ω0 ) = 1 kwx,sm k2 . Nτ kψk22 (20) Finally, the estimate SX is extended to all ξ ∈ [0, Fs /2] by linear interpolation. 2) Algorithm: The estimation procedure is implemented in an iterative alternate op- timization algorithm, whose pseudo-code is given as Algorithm 1. The initialization requires an initial guess for the power spectrum SX of X. We use for this the spectrum estimator (20) applied to the original observations Y. (k) After k iterations of the algorithm, estimates Θ̃n (k) and S˜X for Θn and SX are (k) available. Hence we can only evaluate the plug-in estimate C̃0 of C0 , obtained by replacing the power spectrum with its estimate in the covariance matrix (15). This yields an approximate expression L (k) for the log-likelihood, which is used in place of L in (16) for maximum likelihood estimation. The influence of such approximations on the performances of the algorithm are discussed in section III-C. 11 To assess the convergence of the algorithm, the relative update of the parameters is chosen as stopping criterion: (k) ( k − 1) 2 θ̃j − θ̃j 2 ( k − 1) 2 θ̃j 2 < T , for j = 1 and 2 , (21) where 0 < T < 1 is a given threshold. Finally, after convergence of the algorithm to the estimated value Θ̃ (k) , logq (γ′ ) and a2 are estimated for all time by cubic spline interpolation. Besides, γ is given by numerical integration assuming that γ(0) = 0. Algorithm 1 Joint spectrum and deformations estimation Initialization: Compute an estimate S˜Y of the power spectrum of Y as an initial (0) guess S˜X for SX . Initialize the estimator of the squared amplitude modulation with (0) θ̃n,1 = 1, ∀n. Compute the wavelet transform Wy of y. k := 1 while criterion (21) is false and k ≤ kmax do ( k + 1) • For each n, subsample wy,τn on scales s p , and estimate θ̃n,2   (k) approximate log-likelihood L (k) θ̃n,1 , θn,2 in (16). by maximizing the ( k + 1) • For each n, estimate θ̃n,1 by maximizing the approximate log-likelihood   ( k + 1) L (k) θn,1 , θ̃n,1 with respect to θn,1 in (16). Or, in absence of noise, directly apply equation (17) using the regularized covariance matrix given by (22). • Construct the estimated wavelet transform W x of the underlying stationary signal (k) by interpolation from Wy and θ̃ with equation (18). Estimate the corresponding ( k + 1) with (20). power spectrum S˜X • k := k + 1 end while • Compute ã and γ̃ by interpolation from Θ̃ (k) . Remark 4: In order to control the variances of the estimators, and the computational cost, two different discretizations of the scale axis are used for θ̃1 or θ̃2 . Indeed, the computation of the log-likelihood involves the evaluation of the inverse covariance matrix. In [20], a sufficient condition for invertibility was given in the presence of 12 noise. The major consequence induced by this condition is that when δs is close to zero (i.e. the sampling period of scales is small), the covariance matrix could not be numerically invertible. The scale discretization must then be sufficiently coarse to ensure good conditioning for the matrix. While this condition can be reasonably fulfilled to estimate θn,2 without impairing the performances of the estimator, it cannot be applied to the estimation of θn,1 because of the influence of Ms on its Cramér-Rao bound (see section III-C below). The choice we made is to maximize L (Θn ) for θn,2 with wy,τn corresponding to a coarse sampling s p which is a subsampled version of the original vector s, the scale sampling step and the size of s p being respectively pδs and ⌊ Ms /p⌋ for some p ∈ N ∗ . While L (Θn ) is maximized for θn,1 on the original fine sampling s, a regularization of the covariance matrix has to be done to ensure its invertibility. The regularized matrix is constructed by replacing covariance matrix C0 (θn,2 ) given by (15) by its regularized version C0,r (θn,2 ), given by C0,r (θn,2 ) = (1 − r )C0,r (θn,2 ) + rI , (22) for some regularization parameter 0 ≤ r ≤ 1. Remark 5: After convergence of the estimation algorithm, the estimated functions ã and γ̃ allow constructing a “stationarized” signal x̃ = Dγ̃−1 Aã−1 y . x̃ is an estimation of the original underlying stationary signal x. Furthermore, the Welch periodogram [23] may be computed from x̃ to obtain an estimator of SX whose bias is not depending on frequency (unlike the estimator used within the iterative algorithm). Remark 6: In order to accelerate the speed of the algorithm, the estimation can be done only on a subsampled time. The main effect of this choice on the algorithm concerns the final estimation of a and γ which is more sensitive to the interpolation operation. In the following section, we analyze quantities that enable the evaluation of the expected performances of the estimators, and their influence of the algorithm. The reader who is not directly interested in the statistical background may skip these section and jump directly to the numerical results in part IV. 13 C. Performances of the estimators and the algorithm (a) Bias. For θn,1 , the estimator is unbiased when the actual values of θn,2 and SX are n o (k) (k) known. In our case, the bias bn,1 (θn,1 ) = E θ̃n,1 − θn,1 is written as     θn,1 (k) (k) −1 (k) C0 (θn,2 ) − I . (23) Trace C̃0 θ̃n,2 bn,1 (θn,1 ) = Ms (k) As expected, the better the covariance matrix estimation, the lower the bias bn,1 . For θn,2 , as we do not have a closed-form expression for the estimator we are not able to give an expression of the bias. Nevertheless, if we assume that the two other true variables are known, as a maximum likelihood estimator we make sure that θ̃n,2 is asymptotically unbiased (i.e. θ̃n,2 → θn,2 when Ms → ∞). Regarding SX , equation (19) shows that the estimator yields a smoothed, thus biased version of the spectrum. Besides, proposition 1 below shows that the estimated spectrum converges to this biased version when the deformation parameters converge to their actual values. Proposition 1: Let ψ ∈ H 2 (R ) be an analytic wavelet such that ψ̂ is bounded and ψ̂(u) = Ou→∞ (u−η ) with η > 2. Let ϕ1 and ϕ2 be bounded functions defined on R + by ϕ1 (u) = u ψ̂(u) 2 and ϕ2 (u) = u2 ψ̂ (u) . Assume SX is such that JX = (k) Let SX Z ∞ 0 ξ −1 SX (ξ )dξ < ∞. denote the estimation of the spectrum after k iterations of the algorithm. Let (k) bSX denote the bias defined for all m ∈ [[1, Ms ]] by n o (k) (k) − sm ˜ bSX (m) = E SX (q ω0 ) − SX,ψ (q−sm ω0 ) . (k) Assume there exists a constant cθ1 > 0 such that θn,1 > cθ1 , ∀n, k. Then  J  (k) (k) (k) ≤ X 2 K1′ θ1 − θ̃1 bSX + K2′ θ̃2 − θ2 , ∞ ∞ ∞ k ψ k2 where K1′ = k ϕ1 k ∞ <∞, c θ1  K2′ = ln(q) k ϕ1 k∞ + 2kψ̂′ k∞ k ϕ2 k∞ < ∞ . The proof is given in appendix B. (24) 14 Remark 7: If (k) θ1 → θ1 and (k) θ2 n (k) → θ2 as k → ∞, we have E S˜X (νm ) which is the expected property. o → SX,ψ (νm ) k Formula (24) enables the control of the bias of the spectrum at frequencies νm = q−sm ω0 only. We can also notice the required property JX < ∞ forces SX to vanish at zero frequency. (b) Variance. The Cramér-Rao lower bound (CRLB) gives the minimum variance that can be attained by unbiased estimators. The Slepian-Bangs formula (see [24]) directly gives the following CRLB for component θn,i ( CRLB(θn,i ) = 2 Trace C(Θn ) −1 ∂C(Θn ) ∂θn,i 2 )!−1 . This bound gives information about the variance of the estimator at convergence of the algorithm, i.e. when both SX and the other parameters are well estimated. Applying this formula to θn,1 gives 2 n 2θn,1 2 o  ≥ CRLB(θn,1 ) = E θ̃n,1 − E θ̃n,1 . Ms This implies that the number of scales Ms of the wavelet transform must be large enough to yield an estimator with sufficiently small variance. For θn,2 , no closed-form expression is available for the CRLB. Therefore, the evaluation of this bound and its comparison with the variance of the estimator θ̃n,2 can only be based on numerical results, see section IV. (c) Robustness to noise. Assume now the observations are corrupted by a random 2 (supposed to be known). The model becomes Gaussian white noise W with variance σW Y = A a Dγ X + W . (25) The estimator θ̃n,1 is not robust to noise. Indeed, if the maximum likelihood estimator (k) of model (7) in the presence of such white noise, a new term bn,1| (θn,1 ) must be added W to the bias expression (23), which becomes     1 (k) −1 (k) (k) Cwn , Trace C̃0 θ̃n,2 bn,1| (θn,1 ) = W Ms R 2 q(si + s j )/2 ∞ ψ̂ (qsi ξ )ψ̂ (qs j ξ )dξ. In practice, this term can take large where (Cwn )ij = σW 0 values, therefore noise has to be taken into account. To do so, the covariance matrix is now written as C(Θn)ij = q si +s jZ 2 ∞ 0 (θn,2 SX (q−θn,1 ξ ) + σW2 )ψ̂ (qsi ξ )ψ̂ (qs j ξ )dξ , (26) 15 and the likelihood is modified accordingly. Formula (17) is no longer true and no closedform expression can be derived any more, the maximum likelihood estimate θ̃n,1 must be computed by a numerical scheme (here we use a simple gradient ascent). The estimator θ̃n,2 is very robust to noise. Indeed, equation (26) shows that the only change in the covariance matrix formula is to replace the power spectrum SX by SZ = σ2 W . The additive constant term is not impairing the estimator as long as it is small SX + θn,2 in comparison with the maximum values of SX . Moreover, the estimator S˜X is modified because when computing on scale sm , we compute: wz,sm = w x,sm + ww∗ ,sm , 1 f Ww (sm − θ2 , τ ) is the wavelet transform of a θ1/2 1 by a−1 . Thus a constant term σ̃W independent of 1 f 1/2 W y θn,1 (s − θn,2 , τn ) where ww∗ ,sm = white noise modulated in amplitude frequency is added to the new spectrum estimator S˜Z , so that  2 E S˜Z = SX,ψ + σ̃W where 2 2 σ̃W = σW 1 Nτ Nτ ∑ 1 θ n =1 n,1 . D. Extension: estimation of other deformations To describe other non-stationary behaviors of audio signals, other operators can be investigated. For example, combination of time warping and frequency modulation can be considered, as was done in [21], we shortly account for this case here for the sake of completeness. Let α ∈ C2 be a smooth function, and set Mα : Mα x (t) = e2iπα(t) x (t) , (27) The deformation model in [21] is of the form Y = A a M α Dγ X . (28) To perform joint estimation of amplitude and frequency modulation and time warping for each time, a suitable time-scale-frequency transform V is introduced, defined as V X (s, ν, τ ) = hX, ψsντ i, with ψsντ = Tτ Mν Ds ψ. In that case, an approximation theorem similar to 1 can be obtained from which the corresponding log-likelihood can be written. At fixed time τ, the strategy of estimation is the same as before, but the parameter space is of higher dimension, and the extra parameter θ3 = α′ (τ ) complicates the loglikelihood maximization. In particular, the choice of the discretization of the two scale 16 and frequency variables s and ν influences performances of the estimator, in particular the Cramér-Rao bound. IV. N UMERICAL RESULTS We now turn to numerical simulations and applications. A main ingredient is the choice of the wavelet transform. Here we shall always use the sharp wavelet ψ♯ defined in (2) and set the scale constant q to q = 2. We will systematically compare our approach to simple estimators for amplitude modulation and time warping, commonly used in applications, defined below. • Amplitude modulation: we use as baseline estimator of a(τn )2 the average energy (B) θ̃n,1 defined as follows: (B) θ̃n,1 = 1 kwy,τn k2 . Ms This amounts to replace the estimated covariance matrix in (17) by the identity (B) matrix. Notice that θ̃n,1 does not depend on the time warping estimator, and can be computed directly on the observation. • (B) Time warping: the baseline estimator θ̃n,2 is the scalogram scale center of mass defined as follows: (B) θ̃n,2 = C0 + 1 kwy,τn k2 Ms ∑ s[m]|wy,τn [m]|2 . m=1 (B) C0 is chosen such that θ̃n,2 is a zero mean vector. Numerical evaluation is performed on both synthetic signals and deformations and real audio signals. A. Synthetic signal We first evaluate the performances of the algorithm on a synthetic signal. This allows us to compare variance and bias with their theoretical values. The simulated signal has length Nτ = 216 samples, sampled at Fs = 8 kHz (meaning the signal duration is t F = ( Nτ − 1)/Fs ≈ 8.2 s). The spectrum SX is written   (l ) (l ) (l ) (l ) if |ν − ν0 | < ∆ν /2 as SX = S1 + S2 where Sl (ν) = 1 + cos 2π (ν − ν0 )/∆ν and vanishes elsewhere (for l ∈ {1, 2}). The amplitude modulation a is a sine wave R 1 tF 2 a(t) = a0 (1 + a1 cos(2πt/T1 )), where a0 is chosen such that t− F 0 a (t)dt = 1. The 17 3 2.5 2 1.5 1 0.5 0 0 1 2 3 4 5 6 7 8 5 6 7 8 Time (s) 1 0.5 0 -0.5 0 1 2 3 4 Time (s) Fig. 1. Joint amplitude modulation/time warping estimation on a synthetic signal. Top: amplitude modulation estimation (a1 = 0.4 and T1 = t F /3). Bottom: warping estimation (T2 = t F /2 and T3 = t F /2). Estimation Amplitude Time method modulation warping Baseline 2.01 × 10−1 2.32 × 10−2 Algorithm 1 7.01 × 10−2 4.91 × 10−4 TABLE I M EAN SQUARE ERROR OF THE ESTIMATION METHODS FOR BOTH DEFORMATIONS time warping function γ is such that logq (γ′ (t)) = Γ + cos(2πt/T2 )e−t/T3 , where Γ is R 1 tF ′ chosen such that t− F 0 γ (t)dt = 1. The estimation algorithm is implemented with Ms = 106 and p = 7. Results are shown in Fig. 1 and compared with baseline estimations. For the sake of visibility, the baseline estimator of the amplitude modulation (which is very oscillatory) is not displayed, but numerical assessments are provided in Table I, which gives MSEs for the different estimations. The proposed algorithm is clearly more precise than the baseline algorithm, furthermore its precision is well accounted for by the Cramér-Rao bound: in Fig. 1, the estimate is essentially contained within the 95 % confidence interval provided by the CRLB (assuming gaussianity and unbiasedness). The left hand side of Fig. 2 displays the estimated spectrum given by the algorithm with formula (20). The agreement with the actual spectrum is very good, with a slight enlargement effect due to to the filtering by |ψ̂|2 . The right hand side of Fig. 2 gives 18 10 0 2 1.8 10 -1 1.6 Relative update Spectrum 1.4 1.2 1 0.8 0.6 10 -2 10 -3 10 -4 0.4 0.2 0 400 600 800 1000 1200 1400 1600 1 T =0.1 % Time warping Amplitude modulation Spectrum 2 3 Frequency (Hz) ( 1) Fig. 2. Left: Spectrum estimation (ν0 4 5 6 7 Iteration ( 1) = 600 Hz, ∆ ν ( 2) = 200 Hz, ν0 ( 2) = 1.2 kHz, ∆ ν = 400 Hz): actual (dash-dot blue line) and estimated (solid red line) spectra. Right: Stopping criterion evolution. the evolution of the stopping criterion (21) with iterations. Numerical results show that time warping estimation converges faster than amplitude modulation estimation. Nevertheless, when fixing a stopping criterion to 0.1 % only 7 iterations are necessary for the algorithm to converge. B. Application to Doppler estimation After studying the influence of the various parameters, let us now turn to a real life audio example. The analyzed sound is a recording (from a fixed location) from a racing car, moving with constant speed. The car engine sound is then deformed by the Doppler effect, which results in time warping the sound emitted by the car. Besides, as the car is moving, the closer the car to the microphone, the larger the amplitude of the recorded sound. Thus, our model fits well this signal. The wavelet transforms of the original signal and the two estimations of the underlying stationary signal are shown in Fig. 3. While the estimation of time warping only corrects the displacement of wavelet coefficients in the time-scale domain, the joint estimation of time warping and amplitude modulation also approximately corrects nonstationary variations of the amplitudes. The physical relevance of the estimated time warping function can be verified. Indeed, denote by V the (constant) speed of the car and by c the sound velocity. Fixing the time origin to the time at which the car passes in front of the observer at distance d, the time 19 5513 2756 1378 689 345 172 0 0.5 1 1.5 Time (s) 2 0 0.5 1 1.5 2 Time (s) 1.15 1.1 1.05 1 0.95 0.9 0.85 0.2 0.4 0.6 0.8 1 Fig. 3. Doppler estimation. Top left: Scalogram of the original signal. Top right: Scalogram of the unwarped and unmodulated signal. Bottom left: Scalogram of the unwarped signal. Bottom right: Estimated time warping compared with the theoretical value given in (29). warping function due to Doppler effect can be shown to be c2 γ′ (t) = 2 c − V2 1− p V 2t d2 (c2 − V 2 ) + (cVt)2 ! (29) . We plot in Fig. 3 (bottom right) the estimation γ̃′ compared with its theoretical value where d = 5 m and V = 54 m/s. Clearly the estimate is close to the corresponding theoretical curve obtained with these data, which are therefore realistic values. Nevertheless, a closer look at scalograms in Fig. 3 shows that the amplitude correction is not perfect, due to the presence of noise, and the fact that the model is still too simple: the amplitude modulation actually depends on frequency, which is not accounted for. V. C ONCLUSIONS We have discussed in this paper extensions of methods and algorithms described earlier in [9], [22], [20], [21] for the joint estimation of deformation operator and power spectrum for deformed stationary signals, a problem already addressed in [19] with a different approach. The main improvements described in this paper concern the following two points 1) the extension of the algorithm to the joint estimation of deformations including amplitude modulation to the model and its estimation; 2) a statistical study of the estimators and of the performances of the algorithm. 20 The proposed approach was validated on numerical simulations and an application to Doppler estimation. The results presented here show that the proposed extensions result in a significant improvement in terms of precision, and a better theoretical control. In particular, the continuous parameter estimation procedure avoids quantization effects that were present in [20] where the parameter space was discrete and the estimation based on exhaustive search. Regarding the approach of [19], its domain of validity seems to be limited to small scales (i.e. high frequency) signals, which is not the case here. Contrary to [19] our approach is based on (approximate) maximum likelihood estimation in the Gaussian framework. Because of our choice to disregard time correlations, the estimates obtained here generally present spurious fluctuations, which can be smoothed out by appropriate filtering. A natural extension of our approach would be to introduce a smoothness prior that would avoid such filtering steps when necessary. The code and datasets used to produce the numerical results of this paper are available at the web site https://cv.archives-ouvertes.fr/bruno-torresani A PPENDIX A P ROOF OF THEOREM 1 √ To simplify notations, let Bγ denote the operator Dγ / γ′ . We split the approximation error as τ fτ g ε(s, τ ) = hAa Dγ X, ψsτ i − hA a Dγ X, ψsτ i   q (2) (3) (1) ′ = a(τ ) ε (s, τ ) + γ (τ ) ε (s, τ ) + ε (s, τ ) , where (1)  p q   γ′ − γ′ (τ ) Bγ X, ψsτ     q p ′ ′ γ − γ (τ ) ψsτ , = X, Bγ−1 D  E (2) τ f ε (s, τ ) = Bγ − Bγ X, ψsτ  E D  −1 τ f ψsτ , = X, Bγ−1 − Bγ ε (s, τ ) = 21 ε (3)  E −1 τ g − 1 Dγ X, ψsτ (s, τ ) = Aa Aa  E D  −1 τ g − 1 ψsτ . = X, Dγ−1 Aa Aa D Furthermore, the triangle inequality gives: r n o n E |ε(s,τ)| 2 ≤ Ca2 2 ε(1) (s,τ) E o r n o 2 + Cγ E ε(2) (s,τ) ! r n o 2 2 . + E ε(3) (s, τ ) (30) Let us now determine an upper bound for each error term. To this end, they are written as follows: E  ε (k) (s, τ ) 2  = Z ∞ 0 2 (k) SX (ξ ) fˆsτ (ξ ) dξ , with k ∈ {1, 2, 3}. √ Concerning the first error term, a Taylor expansion of γ′ around τ gives  Z q q ( 1 ) fˆsτ (ξ ) = γ′ (t) − γ′ (τ ) ψsτ (t)e−2iπγ(t)ξ dt R where Iψ = write R ≤ R Z R γ′′ √ ′ 2 γ 3s ∞ |t − τ | |ψsτ (t)|dt ≤ q 2 kγ′′ k∞ Iψ , √ 2 cγ |tψ(t)|dt. Furthermore, the localization assumption on ψ allows us to Iψ ≤ 2 Z ∞ 0 t dt ≤ 2 1 + tβ Z 1 0 tdt + Z ∞ 1 1 t β−1 dt  = β . β−2 Finally, we can control the first error term as follows: 2    ′′ 2 βσX 3s/2 kγ k∞ (1) . ≤ q E ε (s, τ ) √ c γ 2( β − 2) Concerning the second error term, we have Z  ′ (2) ˆf sτ e−2iπγ(t)ξ − e−2iπ (γ(τ )+(t−τ )γ (τ ))ξ ψsτ (t)dt (ξ ) = Z R ′ 1 − e−2iπ (γ(τ )+(t−τ )γ (τ )−γ(t))ξ |ψsτ (t)| dt R Z π  ≤ 2 sin ξ (t − τ )2 γ′′ (t∗ ) |ψsτ (t)| dt , 2 R ≤ for some t∗ between t and τ. Besides, we have | sin(u)| ≤ |u| and | sin(u)| ≤ 1 so that:  Z Z π ( 2 ) ′′ 2s 2 s/2 ξ kγ k∞ q t |ψ(t)| dt + fˆsτ (ξ ) ≤ 2q | ψ(t)| dt . R\ J J2 22 where J = [− T, T ]. One can prove that the value of T minimizing the the right-hand −1/( β+2) . Therefore, we have: side of the latter equation is T = π2 ξ kγ′′ k∞ q2s 4( β + 2) (2) fˆsτ (ξ ) ≤ q 2( β+2) 3( β − 1) 5β−2 π 2 ′′ ξ kγ k∞ Finally, we can control the second error term as follows: E  ε (2) (s, τ ) 2  ≤ q 5β−2 2( β +2)  β +2 β −1 . β +2 4( β + 2)π ′′  β−1 (ρ) kγ k∞ IX 3( β − 1) 2 !2 . Concerning the third error term, we have   Z q a ( t ) ( 3 ) fˆsτ (ξ ) = γ′ (t) − 1 ψsτ (t)e−2iπγ(t)ξ dt a ( τ ) R Z 1 k a′ k 1 3s k a′ k∞ ∞ 2 |t − τ | |ψsτ (t)|dt = q 2 Cγ2 Iψ , ≤ Cγ ca R ca Finally, we can control the third error term as follows: !2 p   2 C γ βσX E ε(3) (s, τ ) ≤ q3s/2 k a′ k∞ . ca β − 2 To conclude the proof, the three errors terms in equation (30) are replaced by their upper bounds to obtain the approximation error given in the theorem.  A PPENDIX B P ROOF OF PROPOSITION 1 (k) Let w̃ x,sm ∈ C Nτ denote the estimation of w x,sm after k iterations of the algorithm.   (k) (k) 1 f q Considering equation (18), we have w̃ x,s = Wy sm − θ̃ , τ , thus m E n (k) S˜X (q−sm ω0 ) o 2 (k) θ̃1 1 = E Nτ kψk22  (k) 2 w̃ x,sm  . (ξ ) To simplify notations, let us introduce some variables. We define sm = sm + logq (ξ ) and h( x ) = ϕ1 (qx ) = qx |ψ̂ (qx )|2 for x ∈ R. By means of the covariance expression given in equation (12) we can write    Nτ     1 ( k ) ( k ) (k) 2 fy sm − θ̃ , τn fy sm − θ̃ , τn W E w̃x,sm =∑ (k)E W n,2 n,2 n =1 θ̃n,1 Nτ = ∑ θn,1 (k) n =1 θ̃n,1 Z ∞ SX (ξ )  (ξ ) 0 ξ  (k) h sm + θn,2 − θ̃n,2 dξ 23  Z ∞ SX (ξ ) Nτ θn,1  (ξ ) = ξ 0 ∑ (k) n =1 θ̃n,1 h sm (k)   (k) + θn,2 − θ̃ dξ. n,2 Let us now split the bias into two terms such that bSX (m) = g1 (m) + g2 (m), where g1 and g2 are defined as     Z  N −1 ∞SX (ξ ) Nτθn,1   (ξ ) (k)  − 1 + θ − θ̃ h s g1 ( m ) = τ 2 n,2 m n,2 dξ, (k) ξ k ψ k2 0 θ̃ n =1 n,1 ∑ N −1 g2 ( m ) = τ 2 k ψ k2 Z ∞ SX (ξ ) 0 ξ Nτ   ∑ n =1  (k) (ξ ) h sm + θn,2 − θ̃n,2 !   (ξ ) − h sm dξ. Regarding the first term, we directly have (k) Z ∞ S (ξ ) khk∞ 1 Nτ θn,1 − θ̃n,1 X | g1 (m)| ≤ dξ ∑ 2 ( k ) ξ kψk2 Nτ n=1 0 θ̃n,1 ≤ khk∞ (k) θ1 − θ̃1 2 k ψ k 2 c θ1 ∞ JX . Besides, we have khk∞ = k ϕ1 k∞ and the smoothness and decay assumptions on ψ̂ allow us to write ϕ1 (u) = Ou→∞ (u1−2η ) → 0. Then ϕ1 is bounded and K1′ < ∞. This yields u→∞ JX K1′ (k) | g1 (m)| ≤ . θ1 − θ̃1 2 ∞ k ψ k2 (ξ ) Regarding the second term, a Taylor expansion of h around sm gives Z    N −1 ∞SX(ξ ) Nτ  (ξ ) (ξ ) (k) + θ − θ̃ | g2 (m)| ≤ τ 2 h s n,2 m ∑ n,2 − h s m dξ ξ k ψ k2 0 n =1 ≤ ≤ Furthermore, ∀ x ∈ R kh′ k∞ 1 kψk22 Nτ kh′ k ∞ kψk22 Nτ ∑ n =1 (k) θn,2 − θ̃n,2 (k) θ2 − θ̃2 ∞ Z ∞ SX (ξ ) ξ 0 dξ JX . 2 |h′( x )|ln (q)−1 = qxϕ1′ (qx ) ≤ qx ψ̂(qx ) + 2q2x ψ̂ (qx )ψ̂′(qx ) ≤ k ϕ1 k∞ + 2kψ̂′ k∞ k ϕ2 k∞ = ln(q)−1 K2′ . Besides, the decay assumption on ψ̂ gives | ϕ2 (u)| = Ou→∞ (u2−η ) → 0 because η > 2. Then ϕ2 is bounded and K2′ < ∞. This yields JX K2′ (k) | g2 (m)| ≤ θ2 − θ̃2 2 k ψ k2 u→∞ ∞ . The proof is concluded by summing up the upper bounds of | g1 | and | g2 | to obtain the (k) upper bound of bSX . Notice that this bound does not depends on m.  24 R EFERENCES [1] L. H. Koopmans, The spectral analysis of time series, 2nd ed., ser. Probability and mathematical statistics, Z. W. Birnbaum and E. Lukacs, Eds. Elsevier, 1995, vol. 22. [2] M. B. Priestley, Spectral analysis and time series, ser. Probability and mathematical statistics. Academic Press, 1982, no. v. 1-2. [3] ——, Non-linear and non-stationary time series analysis, 1988. [4] S. Mallat, G. Papanicolaou, and Z. Zhang, “Adaptive covariance estimation of locally stationary processes,” Ann. Statist., vol. 26, no. 1, pp. 1–47, 02 1998. [Online]. Available: http://dx.doi.org/10.1214/aos/1030563977 [5] G. P. Nason, R. von Sachs, and G. Kroisandt, “Wavelet processes and adaptive estimation of the evolutionary wavelet spectrum,” Journal of the Royal Statistical Society. Series B (Statistical Methodology), vol. 62, no. 2, pp. 271–292, 2000. [Online]. Available: http://www.jstor.org/stable/3088859 [6] R. Dahlhaus, “A likelihood approximation for locally stationary processes,” Ann. Statist., vol. 28, no. 6, pp. 1762–1794, 12 2000. [Online]. Available: http://dx.doi.org/10.1214/aos/1015957480 [7] R. von Sachs and M. H. Neumann, “A wavelet-based test for stationarity,” Journal of Time Series Analysis, vol. 21, no. 5, pp. 597–613, 2000. [Online]. Available: http://dx.doi.org/10.1111/1467-9892.00200 [8] S. Wisdom, L. Atlas, and J. Pitton, “Extending coherence time for analysis of modulated random processes,” in 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), May 2014, pp. 340–344. [9] H. Omer and B. Torrésani, “Estimation of frequency modulations on wideband signals; applications to audio signal analysis,” in Proceedings of the 10th International Conference on Sampling Theory and Applications (SampTA), G. Pfander, Ed. Eurasip Open Library, 2013, pp. 29–32. [Online]. Available: http://hal.archives-ouvertes.fr/hal-00822186 [10] S. T. Wisdom, “Improved statistical signal processing of nonstationary random processes using time-warping,” Master’s thesis, School of Electrical Engineering, University of Washington, USA, March 2014. [11] R. J. McAulay and T. F. Quatieri, “Speech analysis/synthesis based on a sinusoidal representation,” IEEE Transactions on Acoustics, Speech, Signal Processing, vol. 34, pp. 744–754, August 1986. [12] M. Lagrange, S. Marchand, and J. B. Rault, “Enhancing the tracking of partials for the sinusoidal modeling of polyphonic sounds,” IEEE Transactions on Audio, Speech, and Language Processing, vol. 15, no. 5, pp. 1625–1634, July 2007. [13] P. Depalle, G. Garcı́a, and X. Rodet, “Tracking of partials for additive sound synthesis using hidden markov models,” in Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP-93), vol. 1, April 1993, pp. 225–228. [14] S. Godsill and M. Davy, “Bayesian harmonic models for musical pitch estimation and analysis,” in The IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP 02), 2002, pp. 1769–1772. [15] R. Carmona, W. L. Hwang, and B. Torrésani, Practical time-frequency analysis: Gabor and Wavelet Transforms With an Implementation in S, C. K. Chui, Ed. Academic Press, 1998. [16] F. Auger, P. Flandrin, Y.-T. Lin, S. McLaughlin, S. Meignen, T. Oberlin, and H.-T. Wu, “Time-frequency reassignment and synchrosqueezing: An overview,” IEEE Signal Processing Magazine, vol. 30, no. 6, pp. 32–41, 2013. [17] H.-T. Wu, “Instantaneous frequency and wave shape function (i),” Applied and Computational Harmonic Analysis, vol. 35, pp. 181–199, 2013. 25 [18] M. Clerc and S. Mallat, “The texture gradient equation for recovering shape from texture,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 4, pp. 536–549, 2002. [19] ——, “Estimating deformations of stationary processes,” Ann. Statist., vol. 31, no. 6, pp. 1772–1821, 12 2003. [Online]. Available: http://dx.doi.org/10.1214/aos/1074290327 [20] H. Omer and B. Torrésani, “Time-frequency and time-scale analysis of deformed stationary processes, with application to non-stationary sound modeling,” Applied and Computational Harmonic Analysis, vol. 43, no. 1, pp. 1 – 22, 2017. [Online]. Available: https://hal.archives-ouvertes.fr/hal-01094835 [21] A. Meynard and B. Torrésani, “Spectral estimation for non-stationary signal classes,” in Sampling Theory and Applications, ser. Proceedings of SampTA17, Tallinn, Estonia, Jul. 2017. [Online]. Available: https://hal.archives-ouvertes.fr/hal-01475534 [22] H. Omer, “Modèles de déformation de processus stochastiques généralisés. application à l’estimation des non stationnarités dans les signaux audio.” Ph.D. dissertation, Aix-Marseille Université, 2015. [23] P. Welch, “The use of fast fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms,” IEEE Transactions on Audio and Electroacoustics, vol. 15, no. 2, pp. 70–73, Jun 1967. [24] P. Stoica and R. Moses, Introduction to Spectral Analysis. Prentice Hall, 1997.
10math.ST
Doubly Balanced Connected Graph Partitioning arXiv:1607.06509v1 [math.CO] 21 Jul 2016 Saleh Soltan∗ Electrical Engineering Columbia University New York, NY [email protected] Mihalis Yannakakis† Computer Science Columbia University New York, NY [email protected] Gil Zussman∗ Electrical Engineering Columbia University New York, NY [email protected] Abstract We introduce and study the Doubly Balanced Connected graph Partitioning (DBCP) problem: Let G=(V, E) be a P connected graph with a weight (supply/demand) function p:V → {−1, +1} satisfying p(V )= j∈V p(j)=0. The objective is to partition G into (V1 , V2 ) such that 1 | |V2 | G[V1 ] and G[V2 ] are connected, |p(V1 )|, |p(V2 )|≤cp , and max{ |V |V2 | , |V1 | }≤cs , for some constants cp and cs . When G is 2-connected, we show that a solution with cp =1 and cs =3 always exists and can be found in polynomial time. Moreover, when G is 3-connected, we show that there is always a ‘perfect’ solution (a partition with p(V1 )=p(V2 )=0 and |V1 |=|V2 |, if |V |≡0(mod 4)), and it can be found in polynomial time. Our techniques can be extended, with similar results, to the case in which the weights are arbitrary (not necessarily ±1), and to the case that p(V )6=0 and the excess supply/demand should be split evenly. They also apply to the problem of partitioning a graph with two types of nodes into two large connected subgraphs that preserve approximately the proportion of the two types. ∗ Research partially supported by DTRA grant HDTRA1-13-1-0021 and CIAN NSF ERC under grant EEC0812072. † Research partially supported by NSF grant CCF-1320654. 1 Introduction Power Grid Islanding is an effective method to mitigate cascading failures in power grids [17]. The challenge is to partition the network into smaller connected components, called islands, such that each island can operate independently for a while. In order for an island to operate, it is necessary that the power supply and demand at that island are almost equal.1 Equality of supply and demand in an island, however, may not be sufficient for its independent operation. It is also important that the infrastructure in that island has the physical capacity to safely transfer the power from the supply nodes to the demand nodes. When the island is large enough compared to the initial network, it is more likely that it has enough capacity. This problem has been studied in the power systems community but almost all the algorithms provided in the literature are heuristic methods that have been shown to be effective only by simulations [8, 14, 16, 17]. Motivated by this application, we formally introduce and study the Doubly Balanced Connected graph Partitioning (DBCP) problem: Let G=(V, P E) be a connected graph with a weight (supply/demand) function p:V →Z satisfying p(V )= j∈V p(j)=0. The objective is to partition V |V1 | |V2 | into (V1 , V2 ) such that G[V1 ] and G[V2 ] are connected, |p(V1 )|, |p(V2 )|≤cp , and max{ |V , }≤cs , 2 | |V1 | for some constants cp and cs . We also consider the case that p(V )6=0, in which the excess supply/demand should be split roughly evenly. The problem calls for a partition into two connected subgraphs that simultaneously balances two objectives, (1) the supply/demand within each part, and (2) the sizes of the parts. The connected partitioning problem with only the size objective has been studied previously. In the most well-known result, Lováz and Gyori [9,13] independently proved, using different methods, that every k-connected graph can be partitioned into k arbitrarily sized connected subgraphs. However, neither of the proofs is constructive, and there are no known polynomial-time algorithms to find such a partition for k>3. For k=2, a linear time algorithm is provided in [18] and for k=3 an O(|V |2 ) algorithm is provided in [20].2 The complexity of the problem with the size objective and related optimization problems have been studied in [3, 5, 6] and there are various NP-hardness and inapproximability results. Note that the size of the cut is not of any relevance here (so the extensive literature on finding balanced partitions, not necessarily connected, that minimize the cut is not relevant.) The objective of balancing the supply/demand alone, when all p(i) are ±1, can also be seen as an extension for the objective of balancing the size (which corresponds to p(i)=1). Our bi-objective problem of balancing both supply/demand and size, can be seen also as an extension of the problem of finding a partition that balances the size for two types of nodes simultaneously: Suppose the nodes of a graph are partitioned into red and blue nodes. Find a partition of the graph into two large connected subgraphs that splits approximately evenly both the red and the blue nodes. We now summarize our results and techniques. Since the power grids are designed to withstand a single failure (“N −1” standard) [1], and therefore 2-connected, our focus is mainly on the graphs that are at least 2-connected. We first, in Section 3, study the connected partitioning problem with only the supply/demand balancing objective, and show results that parallel the results for balancing size alone, using similar techniques: The problem is NP-hard in general. For 2-connected graphs and weights p(i)=±1, there is always a perfectly balanced partition and we can find it easily using an st-numbering. For 3-connected graphs and weights p(i)=±1, there is a perfectly balanced partition into three connected graphs, and we can find it using a nonseparating ear decomposition 1 If the supply and demand are not exactly equal but still relatively close, load shedding/generation curtailing can be used in order for the island to operate. 2 For k=2, a much simpler approach than the one in [18] is to use the st-numbering [11] for 2-connected graphs. 1 of 3-connected graphs [4] and similar ideas as in [20]. The problem is more challenging when we deal with both balancing objectives, supply/demand and size. This is the main focus and occupies the bulk of this paper. Our main results are existence results and algorithms for 2- and 3-connected graphs. It is easy to observe that we cannot achieve perfection in one objective (cp =0 or cs =1) without sacrificing completely the other objective. We show that allowing the supply/demand of the parts to be off balance by at most the weight of one node suffices to get a partition that is roughly balanced also with respect to size. First, in Section 3.1, we study the case of 3-connected graphs since we use this later as the basis of handling 2-connected graphs. We show that if ∀i, p(i)=±1, there is a partition that is perfectly balanced with respect to both objectives, if |V |≡0(mod 4) (otherwise the sizes are slightly off for parity reasons); for general p, the partition is perfect in both objectives up to the weight of a single node. Furthermore, the partition can be constructed in polynomial time. Our approach uses the convex embedding characterization of k-connectivity studied by Linial, Lováz, and Wigderson [12]. We need to adapt it for our purposes so that the convex embedding also has certain desired geometric properties, and for this purpose we use the nonseparating ear decomposition of 3-connected graphs of [4] to obtain a suitable embedding. Then, in Section 3.2, we analyze the case of 2-connected graphs. We reduce it to two subcases: either (1) there is a separation pair that splits the graph into components that are not very large, or (2) we can perform a series of contractions to achieve a 3-connected graph whose edges represent contracted subgraphs that are not too large. We provide a good partitioning algorithm for case (1), and for case (2) we extend the algorithms for 3-connected graphs to handle also the complications arising from edges representing contracted subgraphs. Finally, in Section 4, we briefly discuss the problem of finding a connected partitioning of a graph with two types of nodes that splits roughly evenly both types. The body of the paper contains proofs and sketches for some of the results, and Appendices B, C, and D contain the remaining proofs. Graph-theoretic background and definitions (e.g., the notions of st-numbering, nonseparating ear decomposition, convex embedding of k-connected graphs) are given in Appendix A. 2 Balancing the Supply/Demand Only In this section, we study the single objective problem of finding a partition of the graph into connected subgraphs that balances (approximately) the supply and demand in each part of the partition, without any regard to the sizes of the parts. We can state the optimization problem as follows, and will refer to it as the Balanced Connected Partition with Integer weights (BCPI) problem. Definition 1. Given a graph G=(V, E) with a weight (supply/demand) function p : V → Z satisP fying j∈V p(j)=0. The BCPI problem is the problem of partitioning V into (V1 , V2 ) such that 1. V1 ∩V2 =∅ and V1 ∪V2 =V , 2. G[V1 ] and G[V2 ] are connected, P 3. |p(V1 )|+|p(V2 )| is minimized, where p(Vi )= j∈Vi p(j). Clearly, the minimum possible value for |p(V1 )|+|p(V2 )| that we can hope for is 0, which occurs iff p(V1 )=p(V2 )=0. It is easy to show that the problem of determining whether there exists such a ‘perfect’ partition (and hence the BCPI problem) is strongly NP-hard. The proof is very similar 2 to analogous results concerning the partition of a graph into two connected subgraphs with equal sizes (or weights, when nodes have positive weights) [3, 6] Proposition 1. (1) It is strongly NP-hard to determine whether there is a solution to the BCPI problem with value 0, even when G is 2-connected. (2) If G is not 2-connected, then this problem is NP-hard even when ∀i, p(i)=±1. Although it is NP-hard to tell whether there is a solution satisfying p(V1 )=p(V2 )=0, even when ∀i, p(i)=±1, in this case, if the graph G is 2-connected there is always such a solution. For general weights p, there is a solution such that |p(V1 )|, |p(V2 )|≤maxj∈V |p(j)|/2 and it can be found easily in linear time using the st-numbering between two nodes (see the Appendix B). Proposition 2. Let G be a 2-connected graph and u, v any two nodes in V such that p(u)p(v)>0. (1) There is a solution such that u∈V1 , v∈V2 , and |p(V1 )|=|p(V2 )|≤maxj∈V |p(j)|/2. (2) If ∀i, p(i)=±1, we can find a solution such that u∈V1 , v∈V2 , and p(V1 )=p(V2 )=0. In both cases, the solution can be found in O(|E|) time. Remark. The bound in Proposition 2 (1) is tight. A simple example is a cycle of length 4 like (v1 , v2 , v3 , v4 ) with p(v1 )=−p, p(v2 )=−p/2, p(v3 )=p, and p(v4 )=p/2. It is easy to see that in this example |p(V1 )|+|p(V2 )|=maxj∈V |p(j)|=p is the best that one can do. 2.1 Connected Partitioning into Many Parts The BCPI problem can be extended to partitioning a graph P into k=3 or more parts. Let G=(V, E) be a graph with a weight function p : V → Z satisfying j∈V p(j)=0. The BCPIk problem is the problem of partitioning G into (V1 , V2 , . . . , Vk ) such that for any 1≤i≤k, G[Vi ] is connected and P k i=1 |p(Vi )| is minimized. In the following proposition, we show that for k=3, if p(i)=±1, ∀i, then there is always a perfect partition (i.e., with p(V1 )=p(V2 )=p(V3 )=0) and it can be found efficiently. For general p, we can find a partition such that |p(V1 )|+|p(V2 )|+|p(V3 )|≤2 maxj∈V |p(j)|. The proof and the algorithm use a similar approach as the algorithm in [20] for partitioning a 3-connected graph to three connected parts with prescribed sizes, using the nonseparating ear decomposition of 3-connected graphs as described in Subsection A.4. The proof is given in the Appendix B. Proposition 3. Let G be a 3-connected graph and u, v, w three nodes in V such that p(u), p(v), p(w)> 0 or p(u), p(v), p(w)<0. (1) There is a solution such that u∈V1 , v∈V2 , w∈V3 , and |p(V1 )|+|p(V2 )|+|p(V3 )|≤2 maxj∈V |p(j)|. (2) If ∀i, p(i)=±1, then there is a solution such that u∈V1 , v∈V2 , w∈V3 , and |p(V1 )|=|p(V2 )|= |p(V3 )|=0. In both cases, the solution can be found in O(|E|) time. 3 Balancing Both Objectives In this section, we formally define and study the Doubly Balanced Connected graph Partitioning (DBCP) problem. Definition 2.PGiven a graph G=(V, E) with a weight (supply/demand) function p : V → Z satisfying p(V )= j∈V p(j)=0 and constants cp ≥0, cs ≥1. The DBCP problem is the problem of partitioning V into (V1 , V2 ) such that 1. V1 ∩V2 =∅ and V1 ∪V2 =V , 3 2𝑠 + 1 −1 −1 −1 −1 +1 +1 +1 −1 −1 −1 +1 +1 +1 −1 −1 −1 +1 +1 +1 −1 −1 +1 +1 +1 −1 2𝑡 + 1 +1 2𝑡 + 1 Figure 1: Series-parallel graphs with 2s+1 paths of length 4t+2 used in Observations 1 and 2. 2. G[V1 ] and G[V2 ] are connected, |V1 | |V2 | 3. |p(V1 )|, |p(V2 )|≤cp and max{ |V , }≤cs , where p(Vi )= 2 | |V1 | P j∈Vi p(j). Remark. Our techniques apply also to the case that p(V )6=0. In this case, the requirement 3 on p(V1 ) and p(V2 ) is |p(V1 )−p(V )/2|, |p(V2 )−p(V )/2|≤cp , i.e., the excess supply/demand is split approximately evenly between the two parts. We will concentrate on 2-connected and 3-connected graphs and show that we can construct efficiently good partitions. For most of the section we will focus on the case that p(i)=±1, ∀i∈V . This case contains all the essential ideas. All the techniques generalize to the case of arbitrary p, and we will state the corresponding theorems. We observed in Section 2 that if the graph is 2-connected and p(i)=±1, ∀i∈V then there is always a connected partition that is perfect with respect to the weight objective, p(V1 )=p(V2 )=0, i.e., (3) is satisfied with cp =0. We know also from [9, 13] that there is always a connected partition that is perfect with respect to the size objective, |V1 |=|V2 |, i.e., condition 3 is satisfied with cs = 1. The following observations show that combining the two objectives makes the problem more challenging. If we insist on cp =0, then cs cannot be bounded in general, (it will be Ω(|V |)), and if we insist on cs =1, then cp cannot be bounded. The series-parallel graphs of Figure 1 provide simple counterexamples. Observation 1. If cp =0, then for any cs <|V |/2−1, there exist a 2-connected graph G such that the DBCP problem does not have a solution even when ∀i, p(i)=±1. Proof. In the graph depicted in Figure 1, set t=0. Observation 2. If cs =1, then for any cp <|V |/6, there exist a 2-connected graph G such that the DBCP problem does not have a solution even when ∀i, p(i)=±1. Proof. In the graph depicted in Figure 1, set s=1. Thus, cp has to be at least 1 to have any hope for a bounded cs . We show in this section that cp =1 suffices for all 2-connected graphs. We first treat 3-connected graphs. 3.1 3-Connected Graphs Let G=(V, E) be a 3-connected graph. Assume for the most of this section that ∀i, p(i)=±1 and p(V )=0 (we will state the results for general p at the end). We show that G has a partition that is essentially perfect with respect to both objectives, i.e., with cp =0 and cs =1. We say “essentially”, 4 because p(V1 )=p(V2 )=0 and |V1 |=|V2 | imply that |V1 |=|V2 | are even, and hence V must be a multiple of 4. If this is the case, then indeed we can find such a perfect partition. If |V |≡2(mod 4) (|V | has to be even since p(V )=0), then we can find an ‘almost perfect’ partition, one in which |p(V1 )|=|p(V2 )|=1 and |V1 |=|V2 | (or one in which p(V1 )=p(V2 )=0 and |V1 |=|V2 |+2). We first treat the case that G contains a triangle (i.e., cycle of length 3). In the following Lemma, we use the embedding for k-connected graphs introduced in [12] and as described in Subsection A.6, to show that if G is 3-connected with a triangle and all weights are ±1, then the DBCP problem has a perfect solution. Lemma 1. If G is 3-connected with a triangle, ∀i, p(i)=±1, and |V |≡0(mod 4), then there exists a solution to the DBCP problem with p(V1 )=p(V2 )=0 and |V1 |=|V2 |. If |V |≡2(mod 4), then there is a solution with p(V1 )=p(V2 )=0 and |V1 |=|V2 |+2. Moreover, this partition can be found in polynomial time. Proof. Assume that |V |≡0(mod 4); the proof for the case |V |≡2(mod 4) is similar. In [12] as described in Subsection A.6, it is proved that if G is a k-connected graph, then for every X⊂V with |X|=k, G has a convex X-embedding in general position. Moreover, this embedding can be found by solving a set of linear equations of size |V |. Now, assume v, u, w∈V form a triangle in G. Set X={v, u, w}. Using the theorem, G has a convex X-embedding f :V →R2 in general position. Consider a circle C around the triangle f (u), f (v), f (w) in R2 as shown in an example in Fig. 2. Also consider a directed line L tangent to the circle C at point A. If we project the nodes of G onto the line L, since the embedding is convex and also {u, v}, {u, w}, {w, v}∈E, the order of the nodes’ projection gives an st-numbering between the first and the last node (notice that the first and last nodes are always from the set X). For instance in Fig. 2, the order of projections give an st-numbering between the nodes u and v in G. Hence, if we set V1 to be the |V |/2 nodes whose projections come first and V2 are the |V |/2 nodes whose projections come last, then G[V1 ] and G[V2 ] are both connected and |V1 |=|V2 |=|V |/2. The only thing that may not match is p(V1 ) and p(V2 ). Notice that for each directed line tangent to the circle C, we can similarly get a partition such that |V1 |=|V2 |=|V |/2. So all we need is a point D on the circle C such that if we partition based on the directed line tangent to C at point D, then p(V1 )=p(V2 )=0. To find such a point, we move L from being tangent at point A to point B (AB is a diameter of the circle C) and consider the resulting partition. Notice that if at point A, p(V1 )>0, then at point B since V1 and V2 completely switch places compared to the partition at point A, p(V1 )<0. Hence, as we move L from being tangent at point A to point B and keep it tangent to the circle, in the resulting partitions, p(V1 ) goes from some positive value to a non-positive value. Notice that the partition (V1 , V2 ) changes only if L passes a point D on the circle such that at D, L is perpendicular to a line that connects f (i) to f (j) for some i, j∈V . Now, since the embedding is in general position, there are exactly two points on every line that connects two points f (i) and f (j), so V1 changes at most by one node leaving V1 and one node entering V1 at each step as we move L. Hence, p(V1 ) changes by either ±2 or 0 value at each change. Now, since |V |≡0(mod 4), p(V1 ) has an even value in all the resulting partitions. Therefore, as we move L from being tangent at point A to point B, there must be a point D such that in the resulted partition p(V1 )=p(V2 )=0. It is also easy to see that since V1 may change only when a line that passes through 2 nodes of graph G is perpendicular to L, we can find D in at most O(|V |2 ) steps. When G is a triangle-free 3-connected graph, however, the proof in Lemma 1 cannot be directly used anymore. The reason is if for example {u, v}∈E / and we project the nodes of G onto the line L, this time the order of the nodes projection does not give an st-numbering between the first and the last node if for example u and w are the first and last node, since some of the middle nodes may 5 𝑉2 𝑉1 𝑢′ ℒ 𝑤′ 𝑣′ 𝐴 𝑤 𝒞 𝑢 𝑣 𝐵 Figure 2: Proof of Lemma 1. only be connected to v. To prove a similar result for triangle-free 3-connected case, we first provide the following two Lemmas. The main purpose of the following two Lemmas are to compensate for the triangle-freeness of G in the proof of Lemma 1. The idea is to show that in every 3-connected graph, there is a triple {u, w, v}∈V , such that {u, w}, {w, v}∈E and in every partition that we get by the approach used in the proof of Lemma 1, if u and v are in Vi , so is a path between u and v. Lemma 2. If G is 3-connected, then there exists a set {u, v, w}∈V and a partition of V into (V10 , V20 ) such that: 1. V10 ∩V20 =∅ and V10 ∪V20 =V , 2. G[V10 ] and G[V20 ] are connected, 3. {u, w}, {v, w}∈E, 4. w∈V10 , u, v∈V20 , 5. |V20 |≤|V |/2. Moreover, such a partition and {u, v, w} can be found in O(|E|) time. Proof. Using the algorithm presented in [4], we can find a non-separating cycle C0 in G such that every node in C0 has a neighbor in G\C0 . Now, we consider two cases: (i) If |C0 |≤|V |/2+1, then select any three consecutive nodes (u, w, v) of C0 and set V20 =C0 \{w} and V10 =V \V20 . (ii) If |C0 |>|V |/2+1, since every node in C0 has a neighbor in G\C0 , there exists a node w∈V \C0 such that |N (w)∩C0 |≥2. Select two nodes u, v∈N (w)∩C0 . There exists a path P in C0 between u and v such that |P |<|V |/2−1. Set V20 ={u, v}∪P and V10 =V \V20 . Lemma 3. Given a partition (V10 , V20 ) of a 3-connected graph G with properties described in Lemma 2, G has a convex X-embedding in general position with mapping f :V →R2 such that: 1. X={u, w, v}, f (u)=(0, 0), f (v)=(1, 0), and f (w)=(0, 1), 2. Every node i in V10 is mapped to a point (f1 (i), f2 (i)) with f2 (i)≥1/2, 3. Every node i in V20 is mapped to a point (f1 (i), f2 (i)) with f1 (i)≥f2 (i) and f1 (i)+2f2 (i)≤1. 6 ℒ 𝐴 𝑤 ℒ3 (0,1) ℒ2 ℒ1 𝒞 𝑉1 ′ (0.5,0.5) (0,0.5) 𝑉2 ′ (0,0) (1,0) 𝑣 𝑢 𝐵 Figure 3: Proof of Lemma 3 and Theorem 1. Moreover, such an embedding can be found in in polynomial time. Sketch of the proof. Set X={v, u, w}. Using [12], G has a convex X-embedding in R2 in general position with mapping f :V →R2 such that f (u)=(0, 0), f (v)=(1, 0), and f (w)=(0, 1). In the Xembedding of the nodes, we have a freedom to set the elasticity coefficient vector ~c to anything that we want (except a measure zero set of vectors). So for any edge {i, j}∈G[V1 ]∪G[V2 ], set cij =g; and for any {i, j}∈E[V10 , V20 ], set cij =1. Since both G[V10 ] and G[V20 ] are connected, as we increase g, nodes in V10 get closer to w and nodes in V20 get closer to the line uv (as g→∞, nodes in V10 get in the same position as w and node in V20 get on the line uv). Hence, intuitively there exists a value g, for which all the nodes in V1 are above line L1 and all the nodes in V20 are below the lines L2 and L3 as depicted in Fig. 3. In the appendix we give the detailed proof and show that a g with polynomially many bits suffices. Using Lemmas 2 and 3, we are now able to prove that for any 3-connected graph G such that all the weights are ±1, the DBCP problem has a solution for cp =0 and cs =1. The idea of the proof is similar to the proof of Lemma 1, however, we need to use Lemma 2 to find a desirable partition (V10 , V20 ) and then use this partition to find an embedding with properties as described in Lemma 3. By using this embedding, we can show that in every partition that we obtain by the approach in the proof of Lemma 1, if u and v are in Vi , so is a path between u and v. This implies then that G[V1 ] and G[V2 ] are connected. So we can use similar arguments as in the proof of Lemma 1 to prove the following theorem (see the Appendix C for the proof details). Theorem 1. If G is 3-connected, ∀i, p(i)=±1, and |V |≡0(mod 4), then there exists a solution to the DBCP problem with p(V1 )=p(V2 )=0 and |V1 |=|V2 |. If |V |≡2(mod 4), then there is a solution with p(V1 )=p(V2 )=0 and |V1 |=|V2 |+2. Moreover, this partition can be found in polynomial time. It is easy to check for a 3-connected graph G, by using the same approach as in the proof of Lemma 1 and Theorem 1, that even when the weights are arbitrary (not necessarily ±1) and also p(V )6=0, we can still find a connected partition (V1 , V2 ) for G such that |p(V1 )−p(V )/2|, |p(V1 )− p(V )/2|≤maxi∈V |p(i)| and |V1 |=|V2 |. Corollary 1. If G is 3-connected, then the DBCP problem (with arbitrary p, and not necessarily satisfying p(V )=0) has a solution for cp =maxi∈V |p(i)| and cs =1. Moreover, this solution can be found in polynomial time. 7 3.2 2-Connected Graphs We first define a pseudo-path between two nodes in a graph as below. The definition is inspired by the definition of the st-numbering. Definition 3. A pseudo-path between nodes u and v in G=(V, E), is a sequence of nodes v1 , . . . , vt such that if v0 =u and vt+1 =v, then for any 1≤i≤t, vi has neighbors vj and vk such that j<i<k. Using the pseudo-path notion, in the following lemma we show that if G is 2-connected and has a separation pair such that none of the resulting components are too large, then the DBCP problem always has a solution for some cp =cs =O(1). The idea used in the proof of this lemma is one of the building blocks of the proof for the general 2-connected graph case. Lemma 4. Given a 2-connected graph G and an integer q>1, if ∀i:p(i)=±1 and G has a separation pair {u, v}⊂V such that for every connected component Gi =(Vi , Ei ) of G[V \{u, v}], |Vi |< (q−1)|V |/q, then the DBCP problem has a solution for cp =1, cs =q−1, and it can be found in O(|E|) time. Proof. Assume for simplicity that |V | is divisible by q. There is a separation pair {u, v}∈V such that if G1 , . . . , Gk are the connected components of G\{u, v}, for any i, |Vi |<(q−1)|V |/q. Since G is 2-connected, G1 , . . . , Gk can be presented by pseudo-paths P1 , . . . , Pk between u and v. Assume P1 , . . . , Pk are in increasing order based on their lengths. There exists two subsets of the pseudoP paths S1 and S2 such that S1 ∩S2 =∅, S1 ∪S2 ={P1 , . . . , Pk } and Pj ∈Si |Pj |≥|V |/q−1 for i=1, 2. The proof is very simple. If |Pk |<|V |/q, the greedy algorithm for the partition problem gives the desired partition of {P1 , . . . , Pk }. If |Pk |≥|V |/q, since |Pk |<(q−1)|V |/q, S1 ={P1 , . . . , Pk−1 } and S2 ={Pk } is the desired partition. Now, if we put all the pseudo-paths in S1 back to back, they will form a longer pseudo-path Q1 between u and v. Similarly, we can form another pseudo-path Q2 from the paths in S2 . Without loss of generality we can assume |Q1 |≥|Q2 |. From u, including u itself, we count |V |/q of the nodes in Q1 towards v and put them in a set V 0 . Without loss of generality, we can assume p(V 0 )≥0. If p(V 0 )=0, then (V 0 , V \V 0 ) is a good partition and we are done. Hence, assume p(V 0 )>0. We keep V 0 fixed and make a new set V 00 by continuing to add nodes from Q1 to V 0 one by one until we get to v. If p(V 00 ) hits 0 as we add nodes one by one, we stop and (V 00 , V \V 00 ) is a good partition and we are done. So, assume V 00 =Q1 ∪{u} and p(V 00 )>0. Since |Q2 ∪{v}|≥|V |/q, |V 00 |≤ (q−1)|V |/q. If |V 00 |<(q−1)|V |/q, we add nodes from Q2 one by one toward u until either |V 00 |=0 or |V 00 |=(q−1)|V |/q. If we hit 0 first (i.e., p(V 00 )=0) and |V 00 |≤(q−1)|V |/q, define V1 =V 00 \{u}, then (V1 , V \V1 ) is a good partition. So assume |V 00 |=(q−1)|V |/q and p(V 00 )>0. Define V 000 =V \V 00 . Since p(V 00 )>0 and |V 00 |=(q−1)|V |/q, then p(V 000 )<0 and |V 000 |=|V |/q. Also notice that V 000 ⊆Q2 . We consider two cases. Either |p(V 0 )|≥|p(V 000 )| or |p(V 0 )|<|p(V 000 )|. If |p(V 0 )|≥|p(V 000 )|, then if we start from u and pick nodes one by one from Q1 in order, we can get a subset V10 of V 0 such that |p(V10 )|=|p(V 000 )|. Hence, if we define V1 =V10 ∪V 000 , then (V1 , V \V1 ) is a good partition. If |p(V 0 )|<|p(V 000 )|, then we can build a new set V1 by adding nodes one by one from Q2 to V 0 until P (V1 )=0. It is easy to see that since |p(V 0 )|<|p(V 000 )|, then V1 \V 0 ⊆V 000 . Hence, (V1 , V \V1 ) is a good partition. Corollary 2. If G is a 2-connected series-parallel graph and ∀i:p(i)=±1, then the DBCP problem has a solution for cp =1, cs =2, and the solution can be found in O(|E|) time. The graph in Figure 1 with s=1 shows that these parameters are the best possible for series parallel graphs: if cp =O(1) then cs must be at least 2. 8 𝑣1 𝑣3 𝑣4 𝑣5 𝑣2 𝐺1 𝑣3 𝑣6 𝐺2 𝐺3 𝑣7 𝑣7 𝐺 (a) 𝑣1 𝑣13 𝑣12 𝑣11 𝑣2 𝑣3 𝑣4 𝑣7 𝑣8 𝑣9 𝑣5 𝑣4 𝑣10 𝑣14 𝑣15 𝑣1 𝑣13 𝑣12 𝑣11 𝑣2 𝑣3 𝑣13 𝑣12 𝑣11 3 𝑣7 𝑣7 3 3 𝑣6 𝐺 𝑣1 𝑣5 𝑣6 𝑣14 𝑣15 𝑣5 𝑣6 𝑣14 𝑣15 𝐺∗ (b) Figure 4: Lemma 5. To generalize Lemma 4 to all 2-connected graphs, we need to define the contractible subgraph and the contraction of a given graph as below. Definition 4. We say an induced subgraph G1 of a 2-connected graph G is contractible, if there is a separating pair {u, v}⊂V such that G1 =(V1 , E1 ) is a connected component of G[V \{u, v}]. Moreover, if we replace G1 by a weighted edge e0 with weight w(e0 )=|V1 | between the nodes u and v in G to obtain a smaller graph G0 , we say G is contracted to G0 . Remark. Notice that every contractible subgraph of a 2-connected graph G can also be represented by a pseudo-path between its associated separating pair. We use this property in the proof of Theorem 2. Using the notion of the graph contraction, in the following lemma, we show that to partition a 2-connected graph, we can reduce it to one of two cases: either G can be considered as a graph with a set of short pseudo-paths between two nodes, or it can be contracted into a 3-connected graph as illustrated in Fig. 4. Lemma 5. In every 2-connected graph G=(V, E), given an integer q≥3, one of the following cases holds, and we can determine which in O(|E|) time: 1. There is a separation pair {u, v}⊂V such that if G1 , . . . , Gk are the connected components of G[V \{u, v}], for all i, |Vi |<(q−1)|V |/q. 2. After a set of contractions, G can be transformed into a 3-connected graph G∗ =(V ∗ , E ∗ ) with weighted edges representing contracted subgraphs such that for every e∗ ∈E ∗ , w(e∗ )<|V |/q. Proof. If there is no separation pairs in G, then G is 3-connected and there is nothing left to prove. So assume {u, v}⊂V is a separation pair and G1 , . . . , Gk are the connected components of G[V \{u, v}]. If ∀i, |Vi |<(q−1)|V |/q, we are done. So let’s assume there is a connected component 9 Gj such that |Vj |≥(q−1)|V |/q. Then for every i6=j, Gi can be contracted and represented by an edge of weight less than |V |/q between u and v. Now, we repeat the process by considering the weight of the edges in the size of each connected component. An example for each case is shown in Fig. 4 for q=3. We can find either a suitable separation pair as in case 1 or a suitable contracted graph G∗ as in case 2 in linear time using the Hopcroft-Tarjan algorithm for finding the triconnected components [10]. Using Lemma 5 for q=4, then Lemma 4, and the idea of the proof for Theorem 1, we can prove that when G is 2-connected and all p(i)=±1, the DBCP problem has a solution for cp =1 and cs =3. There are some subtleties in adapting Lemma 2 for this case to account for the fact that the edges of G∗ are now weighted, and the partition (V10 , V20 ) has to take into account the edge weights. We find a suitable convex embedding of the 3-connected graph G∗ and then embed the nodes of the contracted pseudopaths appropriately along the segments corresponding to the weighted edges. Some care is needed to carry out the argument of the 3-connected case, since as the line tangent to the circle rotates, the order of the projections of many nodes may change at once, namely the nodes on an edge perpendicular to the rotating line. The details of the proof are given in Appendix C. We have: Theorem 2. If G is 2-connected, ∀i, p(i)=±1, then the DBCP problem has a solution for cp =1 and cs =3. Moreover, this solution can be found in polynomial time. Similar to Corollary 1, the approach used in the proof of Theorem 2, can also be used for the case when the weights are arbitrary (not necessarily ±1) and p(V )6=0. It is easy to verify that in this case, if G is 2-connected, the DBCP problem has a connected partition (V1 , V2 ) such that |p(V1 )−p(V )/2|, |p(V2 )−p(V )/2|≤maxj∈V |p(j)| and |V1 |, |V2 |≥|V |/4. Corollary 3. If G is 2-connected, then the DBCP problem (with general p and not necessarily satisfying p(V )=0) has a solution for cp =maxj∈V |p(j)| and cs =3. Moreover, this solution can be found in polynomial time. 4 Graphs with Two Types of Nodes Assume G is a connected graph with nodes colored either red (R⊆V ) or blue (B⊆V ). Let |V |=n, |R|=nr , and |B|=nb . If G is 3-connected, set p(i)=1 if i∈R and p(i)=−1 if i∈B. Corollary 1 implies then that there is always a connected partition (V1 , V2 ) of V that splits both the blue and the red nodes evenly (assuming nr and nb are both even), i.e., such that |V1 |=|V2 |, |R∩V1 |=|R∩V2 |, and |B∩V1 |=|B∩V2 |. (If nr and/or nb are not even, then one side will contain one more red or blue node.) Corollary 4. Given a 3-connected graph G with nodes colored either red (R⊆V ) or blue (B⊆ V ). There is always a partition (V1 , V2 ) of V such that G[V1 ] and G[V2 ] are connected, |V1 |=|V2 |, |R∩V1 |=|R∩V2 |, and |B∩V1 |=|B∩V2 | (assuming |R| and |B| are both even). Such a partition can be computed in polynomial time. If G is only 2-connected, we may not always get a perfect partition. Assume wlog that nr ≤nb . If for every v∈R and u∈B, we set p(v)=1 and p(u)=−nr /nb , Corollary 3 implies that there is always a connected partition (V1 , V2 ) of V such that both |(|R∩V1 |−nr /nb |B∩V1 |)|≤1 and |(|R∩ 1 | |V2 | V2 |−nr /nb |B∩V2 |)|≤1, and also max{ |V |V2 | , |V1 | }≤3. Thus, the ratio of red to blue nodes in each side Vi differs from the ratio nr /nb in the whole graph by O(1/n). Hence if the numbers of red and blue nodes are ω(1), then the two types are presented in both sides of the partition in approximately the same proportion as in the whole graph. 10 Corollary 5. Given a 2-connected graph G with nodes colored either red (R⊆V ) or blue (B⊆V ), and assume wlog |R|≤|B|. We can always find in polynomial time a partition (V1 , V2 ) of V such that G[V1 ] and G[V2 ] are connected, |V1 |, |V2 |≥|V |/4, and the ratio of red to blue nodes in each side Vi differs from the ratio |R|/|B| in the whole graph by O(1/n). 5 Conclusion In this paper, we introduced and studied the problem of partitioning a graph into two connected subgraphs that satisfy simultaneouly two objectives: (1) they balance the supply and demand within each side of the partition (or more generally, for the case of p(V )6=0, they split approximately equally the excess supply/demand between the two sides), and (2) the two sides are large and have roughly comparable size (they are both Ω(|V |)). We showed that for 2-connected graphs it is always possible to achieve both objectives at the same time, and for 3-connected graphs there is a partition that is essentially perfectly balanced in both objectives. Furthermore, these partitions can be computed in polynomial time. This is a paradigmatic bi-objective balancing problem. We observed how it can be easily used to find a connected partition of a graph with two types of nodes that is balanced with respect to the sizes of both types. Overall, we believe that the novel techniques used in this paper can be applied to partitioning heterogeneous networks in various contexts. There are several interesting further directions that suggest themselves. First, extend the theory and algorithms to find doubly balanced connected partitions to more than two parts. Second, even considering only the supply/demand objective, does the analogue of the results of Lováz and Gyori [9,13] for the connected k-way partitioning of k-connected graphs with respect to size (which corresponds to p(i)=1) extend to the supply/demand case (p(i)=±1) for k>3? And is there a polynomial algorithm that constructs such a partition? Finally, extend the results of Section 4 to graphs with more than two types of nodes, that is, can we partition (under suitable conditions) a graph with several types of nodes to two (or more) large connected subgraphs that preserve approximately the diversity (the proportions of the types) of the whole population? 11 A Definitions and Background In this section, we provide a short overview of the definitions and tools used in our work. Most of the graph theoretical terms used in this paper are relatively standard and borrowed from [2] and [21]. All the graphs in this paper are loopless. A.1 Terms from Graph Theory Cutpoints and Subgraphs: A cutpoint of a connected graph G is a node whose deletion results in a disconnected graph. Let X and Y be subsets of the nodes of a graph G. G[X] denotes the subgraph of G induced by X. We denote by E[X, Y ] the set of edges of G with one end in X and the other end in Y . The neighborhood of a node v is denoted N (v). Connectivity: The connectivity of a graph G=(V, E) is the minimum size of a set S⊂V such that G\S is not connected. A graph is k-connected if its connectivity is at least k. A.2 st-numbering of a Graph Given any edge {s, t} in a 2-connected graph G, an st-numbering for G is a numbering for the nodes in G defined as follows [11]: the nodes of G are numbered from 1 to n so that s receives number 1, node t receives number n, and every node except s and t is adjacent both to a lower-numbered and to a higher-numbered node. It is shown in [7] that such a numbering can be found in O(|V |+|E|). A.3 Series-Parallel Graphs A Graph G is series-parallel, with terminals s and t, if it can be produced by a sequence of the following operations: 1. Create a new graph, consisting of a single edge between s and t. 2. Given two series parallel graphs, X and Y with terminals sX , tX and sY , tY respectively, form a new graph G=P (X, Y ) by identifying s=sX =sY and t=tX =tY . This is known as the parallel composition of X and Y . 3. Given two series parallel graphs X and Y , with terminals sX , tX and sY , tY respectively, form a new graph G=S(X, Y ) by identifying s=sX , tX =sY and t=tY . This is known as the series composition of X and Y . It is easy to see that a series-parallel graph is 2-connected if, and only if, the last operation is a parallel composition. A.4 Nonseparating Induced Cycles and Ear Decomposition Let H be a subgraph of a graph G. An ear of H in G is a nontrivial path in G whose ends lie in H but whose internal vertices do not. An ear decomposition of G is a decomposition G=P0 ∪· · ·∪Pk of the edges of G such that P0 is a cycle and Pi for i≥1 is an ear of P0 ∪P1 ∪· · ·∪Pi−1 in G. It is known that every 2-connected graph has an ear decomposition (and vice-versa), and such a decomposition can be found in linear time. A cycle C is a nonseparating induced cycle of G if G\C is connected and C has no chords. We say a cycle C avoids a node u, if u∈C. / 12 Theorem 3 (Tutte [19]). Given a 3-connected graph G(V, E) let {t, r} be any edge of G and let u be any node of G, r6=u6=t. Then there is a nonseparating induced cycle of G through {t, r} and avoiding u. Notice that since G is 3-connected in the previous theorem, every node in C has a neighbor in G\C. Cheriyan and Maheshwari showed that the cycle in Theorem 3 can be found in O(E) [4]. Moreover, they showed that any 3-connected graph G has a nonseparating ear decomposition G=P0 ∪· · ·∪Pk defined as follows: Let Vi =V (P0 )∪V (P1 ) · · ·∪V (Pi ), let Gi =G[Vi ] and Gi =G[V \Vi ]. We say that G=P0 ∪P1 ∪· · ·∪Pk is an ear decomposition through edge {t, r} and avoiding vertex u if the cycle P0 contains edge {t, r}, and the last ear of length greater than one, say Pm , has u as its only internal vertex. An ear decomposition P0 ∪P1 · · ·∪Pk of graph G through edge {t, r} and avoiding vertex u is a nonseparating ear decomposition if for all i, 0≤i<m, graph Gi is connected and each internal vertex of ear Pi has a neighbor in Gi . Theorem 4 (Cheriyan and Maheshwari [4]). Given an edge {t, r} and a vertex u of a 3-connected graph G, a nonseparating induced cycle of G through {t, r} and avoiding u, and a nonseparating ear decomposition can be found in time O(|V |+|E|). A.5 Partitioning of Graphs to Connected Subgraphs The following theorem is the main existing result in partitioning of graphs into connected subgraphs and is proved independently by Lováz and Gyori [9, 13] by different methods. Theorem 5 (Lováz and Gyori [9,13]). Let G=(V, E) be a k-connected graph. Let n=|V |, v1 , v2 , . . . , vk ∈ V and let n1 , n2 , . . . , nk be positive integers satisfying n1 +n2 +· · ·+nk =n. Then, there exists a partition of V into (V1 , V2 . . . , Vk ) satisfying vi ∈Vi , |Vi |=ni , and G[Vi ] is connected for i=1, 2, . . . , k. Although the existence of such a partition has long been proved, there is no polynomial-time algorithm to find such a partition for k>3. For k=2, it is easy to find such partition using stnumbering. For k=3, Wada and Kawaguchi [20] provided an O(n2 ) algorithm using the nonseparating ear decomposition of 3-connected graph. A.6 Convex Embedding of Graphs In this subsection, we provide a short overview of the beautiful work by Linial, Lováz, and Wigderson [12] on convex embedding of the k-connected graphs. Let Q={q1 ,P q2 , . . . , qm } be P a finite set of points in Rd . The convex hull conv(Q) of Q is the set of all points m λ q with i=1 i i i=1 λi =1. The rank of Q is defined by rank(Q)=1+dim(conv(Q)). Q is in general position if rank(S)=d+1 for every (d+1)-subset S⊆Q. Let G be a graph and X⊂V . A convex X-embedding of G is any mapping f :V →R|X|−1 such that for each v∈V \X, f (v)∈conv(f (N (v))). We say that the convex embedding is in general position if the set f (V ) of the points is in general position. Theorem 6 (Linial, Lováz, and Wigderson [12]). Let G be a graph on n vertices and 1<k<n. Then the following two conditions are equivalent: 1. G is k-connected 2. For every X⊂V with |X|=k, G has a convex X-embedding in general position. Notice that the special case of the Theorem for k=2 asserts the existence of an st-numbering of a 2-connected graph. The proof of this theorem is inspired by physics. The embedding is 13 found by letting the edges of the graph behave like ideal springs and letting its vertices settle. A formal summary of the proof (1→2) is as follows (for more details see [12]). For each vi ∈X, define f (vi ) arbitrary in Rk−1 such that f (X) is in general position. Assign to every edge (u, v)∈E a positive elasticity coefficient cuv and let c∈R|E| be the vector of coefficients. It is proved in [12] that vector c, an embedding f that minimizes the potential function P = P for almost any coefficient 2 provides a convex X-embedding in general position (k.k is the Euclidean c kf (u)−f (v)k {u,v}∈E uv norm). Moreover, the embedding that minimizes P can be computed as follows, f (v)= 1 X cuv f (u) for all v∈V \X, cv u∈N (v) P in which cv = u∈N (v) cuv . Hence, the embedding can be found by solving a set of linear equations in at most O(|V |3 ) time (or matrix multiplication time). B Missing Proofs from Section 2 Proof of Proposition 1. We use the proof of [3, Theorem 2] with a modest change. The reduction is from the X3C problem [15], which is a variant of the Exact Cover by 3-sets and defined as follows: Given a set X with |X|=3q and a family C of 3-element subsets of X such that |C|=3q and each element of X appears in exactly 3 sets of C, decide whether C contains an exact cover for X. Given an instance set V =X∪C∪{a, b} and edge S (X, C) of X3C, let G=(V, E) be the graph with the vertex 2 +q, p(C )=−1, and p(x )=−3q. set E= 3q [{C x |x ∈C }∪{C a}∪{C b}]. Set p(a)=2q, p(b)=9q j i i j j j j i j=1 It is easy to verify that C contains an exact cover for X if and only if the BCPI problem has a solution such that p(V1 )=p(V2 )=0. This shows the first claim. For the second claim, attach to nodes a, b, and the xi s, paths of length 2q, 9q 2 +q, and 3q, respectively, and set the supply/demand values of a, b, the xi ’s and the new nodes equal to +1 (for the paths for a and b) or −1 (for the xi ’s). Proof of Proposition 2. Clearly, part (2) follows immediately from part (1) because in this case, p(V1 ), p(V2 ) are integer and maxj∈V |p(j)|/2=1/2. To show part (1), pick two arbitrary nodes u, v∈V with p(u)p(v)>0. Since we want to separate u and v, we can assume wlog that initially {u, v}∈G. Since G is 2-connected, an st-numbering between nodes u and v as u=v1 , v2 , . . . , vn =v (i) (1) can be found in O(|V |+|E|) [7]. Define V1 :={v1 , v2 , . . . , vi }. It is easy to see that p(V1 )=p(u)>0 (n−1) (i∗ ) and p(V1 )=−p(v)<0. Hence, there must exist an index 1≤i∗ <n such that |p(V1 )|>0 and (i∗ +1) (i) (i+1) (i∗ ) (i∗ +1) |p(V1 )|≤0. Since |p(V1 )−p(V1 )|=|p(i∗ +1)|, either |p(V1 )|≤|p(i∗ +1)|/2 or |p(V1 )|≤ (i∗ ) (i∗ +1) ∗ |p(i +1)|/2; Accordingly set V1 =V1 or V1 =V1 . Let V2 =V \V1 . Hence, (V1 , V2 ) is a solution ∗ with |p(V1 )|=|p(V2 )|≤|p(i +1)/2|≤maxj∈V |p(j)|/2. It is easy to see that i∗ can be found in O(|V |). Proof of Proposition 3. Consider the case of general function p, and let pmax =maxj∈V |p(j)|. We will show that we can find a solution such that u∈V1 , v∈V2 , w∈V3 with |p(V1 )|, |p(V2 )|≤pmax /2. Since |p(V3 )|=|p(V1 )+p(V2 )| (recall p(V )=0), this implies that |p(V3 )|≤pmax , and hence |p(V1 )|+|p(V2 )|+ |p(V3 )|≤2pmax . Furthermore, if p(i)=±1 for all i∈V , hence pmax =1, then |p(V1 )|, |p(V2 )|≤pmax /2 implies that p(V1 )=p(V2 )=0, and therefore also p(V3 )=0. Thus, both claims will follow. Assume u, v, w∈V and p(u), p(v), p(w)>0 (the case of negative p(u), p(v), p(w) is symmetric). Since we want to separate u from v, we can assume without loss of generality that {u, v}∈E. 14 Using [4], there is a non-separating ear decomposition through the edge {u, v} and avoiding node w. Ignore the ears that do not contain any internal nodes, and let Q0 ∪Q1 ∪· · ·∪Qr be the decomposition consisting of the ears with nodes; we have w∈Qr . Let Vi =V (Q0 )∪V (Q1 ) · · ·∪V (Qi ), let Gi =G[Vi ] and Gi =G[V \Vi ]. We distinguish two cases, depending on whether p(V0 )≤0 or p(V0 )>0. (i) If p(V0 )≤0, then consider an st-numbering between u and v in V0 , say u=v1 , v2 , . . . , vs =v. (i) Define V0 ={v1 , v2 , . . . , vi }. Since p(u), p(v)>0 and p(V0 )≤0, there must exist indices 1≤i∗ ≤ (i∗ ) (i∗ +1) (j ∗ +1) (j ∗ ) j ∗ <s such that p(V0 )>0, p(V0 )≤0 and p(V0 \V0 )>0, p(V0 \V0 )≤0. (i∗ ) (i∗ +1) (i∗ ) (a) If i∗ =j ∗ , since p(V0 )+p(vi∗ +1 )+p(V0 \V0 )=p(V0 )<0, we have p(V0 |p(vi∗ +1 )|. Now, one of the following three cases happens: (i∗ ) (i∗ +1) )+p(V0 \V0 )≤ (i∗ +1) - If p(V0 )≤|p(vi∗ +1 )|/2 and p(V0 \V0 )≤|p(vi∗ +1 )|/2, then it is easy to see that (i∗ ) (i∗ +1) V1 =V0 , V2 =V0 \V0 , and V3 =V \(V1 ∪V2 ) is a good partition. (i∗ ) (i∗ +1) (i∗ ) - If p(V0 )>|p(vi∗ +1 )|/2 and p(V0 \V0 )≤|p(vi∗ +1 )|/2, then p(V0 )+p(vi∗ +1 )= (i∗ +1) (i∗ +1) (i∗ +1) ∗ p(V0 )≤|p(vi +1 )|/2. Hence, V1 =V0 , V2 =V0 \V0 , and V3 =V \V0 is a good partition. (i∗ ) (i∗ +1) (i∗ +1) - If p(V0 )≤|p(vi∗ +1 )|/2 and p(V0 \V0 )>|p(vi∗ +1 )|/2, then p(V0 \V0 )+p(vi∗ +1 )= (i∗ ) (i∗ ) (i∗ ) p(V0 \V0 )≤|p(vi∗ +1 )|/2. Hence, V1 =V0 , V2 =V0 \V0 , and V3 =V \V0 is a good partition. (i∗ ) (i∗ +1) (b) If i∗ <j ∗ , then either p(V0 )≤|p(vi∗ +1 )|/2 or |p(V0 )|≤|p(vi∗ +1 )|/2, accordingly set (i∗ ) (i∗ +1) (j ∗ +1) (j ∗ ) V1 =V0 or V1 =V0 . Similarly, either p(V0 \V0 )≤|p(vj ∗ +1 )|/2 or |p(V0 \V0 )|≤ (j ∗ +1) (j ∗ ) |p(vj ∗ +1 )|/2, so accordingly set V2 =V0 \V0 or V2 =V0 \V0 . Set V3 =V \(V1 ∪V2 ). It is easy to check that (V1 , V2 , V3 ) is a good partition. (ii) If p(V0 )>0, then since p(w)>0 and therefore p(Vr−1 )<0, there must exist an index 0≤j<r−1 such that p(Vj )>0 and p(Vj+1 )≤0. Consider an st-numbering between u and v in G[Vj ] (i) as u=v1 , v2 , . . . , vs =v and define Vj ={v1 , v2 , . . . , vi }. The ear Qj+1 is a path of new nodes q1 , q2 , . . . , qt attached to two (distinct) nodes vx , vy of G[Vj ] through edges {vx , q1 }, {qt , vy }∈E; assume wlog that 1≤x<y≤s. For simplicity, we will use below Qj+1 to denote also the (i) set {q1 , q2 , . . . , qt } of internal (new) nodes of the ear. Also define Qj+1 ={q1 , q2 , . . . , qi } and (0) Qj+1 =∅. One of the following cases must happen: (i∗ ) (a) Suppose there is an index 1≤i∗ <(y−1) such that p(Vj (i∗ +1) )>0 and p(Vj )≤0 or there is (i∗ −1) (i∗ ) an index such that p(Vj \Vj )>0 and p(Vj \Vj )≤0. Let’s assume there is (i∗ ) (i∗ +1) an index 1≤i∗ <(y−1), such that p(Vj )>0 and p(Vj )≤0 (the other case is exactly (i∗ ) (i∗ +1) similar). Then either p(Vj )≤|p(vi∗ +1 )|/2 or |p(Vj )|≤|p(vi∗ +1 )|/2, accordingly set (i∗ ) (i∗ +1) 0 either V1 =Vj or V1 =Vj . Set V2 =Vj \V1 . One of the following cases happens: x+1<i∗ <s (i∗ ) (i∗ +1) (i∗ +1) - If V1 =Vj and p(V20 )≤0, then since p(Vj )≤0, we have p(Vj \Vj )>0. Hence, 0 0 0 p(V2 \{vi∗ +1 })>0. So, it is either |p(V2 )|≤|p(vi∗ +1 )|/2 or p(V2 \{vi∗ +1 })≤|p(vi∗ +1 )|/2. Now if p(V20 \{vi∗ +1 })≤|p(vi∗ +1 )|/2, since also p(V1 )≤|p(vi∗ +1 )|/2, p(Vj )≤0 which contradicts with the assumption. Therefore, |p(V20 )|≤|p(vi∗ +1 )|/2. Set V2 =V20 and V3 =V \(V1 ∪V2 ). It is easy to check that (V1 , V2 , V3 ) is a good partition. (i∗ ) - If V1 =Vj and p(V20 )>0, then since p(Vj ∪Qj+1 )<0, there is an index 0<t∗ ≤t, (t∗ ) (t∗ −1) such that p(V20 ∪(Qj+1 \Qj+1 ))>0 and p(V20 ∪(Qj+1 \Qj+1 ))≤0. Hence, either p(V20 ∪ 15 (t∗ ) (t∗ −1) (Qj+1 \Qj+1 ))≤|p(qt∗ )|/2 or |p(V20 ∪(Qj+1 \Qj+1 ))|≤|p(qt∗ )|/2, accordingly set V2 = (t∗ ) (t∗ −1) V20 ∪(Qj+1 \Qj+1 ) or V2 =V20 ∪(Qj+1 \Qj+1 ). Set V3 =V \(V1 ∪V2 ). It is easy to see that (V1 , V2 , V3 ) is a good partition. (i∗ +1) - If V1 =Vj , then since p(V1 )≤0, we have p(V20 )>0. The rest is exactly like the (i∗ ) previous case when V1 =Vj and p(V20 )>0. (i) (i) (b) Suppose that for every 1≤i<y, p(Vj )>0 and for every x<i<s, p(Vj \Vj )>0. Set (y−1) V10 =Vj and V20 =Vj \V10 . Based on the assumption p(V10 ), p(V20 )>0. Since p(Vj+1 )≤ (i∗ ) (i∗ +1) 0, there are indices 0≤i∗ ≤j ∗ <t such that p(V10 ∪Qj+1 )>0, p(V10 ∪Qj+1 )≤0 and p(V20 ∪ (j ∗ +1) (j ∗ ) (Qj+1 \Qj+1 ))>0, p(V20 ∪(Qj+1 \Qj+1 ))≤0. The rest of the proof is similar to case (i) when p(V0 )≤0. C Missing Proofs from Section 3 Proof of Lemma 3. Set X={v, u, w}. Using [12], G has a convex X-embedding in R2 in general position with mapping f :V →R2 such that f (u)=(0, 0), f (v)=(1, 0), and f (w)=(0, 1). In the Xembedding of the nodes, we have a freedom to set the elasticity coefficient vector ~c to anything that we want (except a measure zero set of vectors). So for any edge {i, j}∈G[V10 ]∪G[V20 ], set cij =g; and for any {i, j}∈E[V10 , V20 ], set cij =1. Assume L1 is the line y=0.5, L2 is the line x+2y=1, and L3 is the line x=y. First, we show that there exist a g for which all the nodes in V10 will be embedded above the line L1 . To show P this, from [12], we know the embedding is such that it minimizes the total potential P (f, ~c)= {i,j}∈E cij kf (i)−f (j)k2 . Notice that we can independently minimize P on x-axis values and y-axis values as below: min P f = min Px +min Py f1 f2 X X = min cij (f1 (i)−f1 (j))2 +min cij (f2 (i)−f2 (j))2 f1 f2 {i,j}∈E {i,j}∈E Now, notice that if we place all the nodes in V10 at point (0,1) and all the nodes in V20 on the line uv, then Py ≤|E|. Hence, if f2 minimizes Py , then Py (f2 , c)≤|E|. Set g≥4|V |2 |E|. We show that if f2 minimizes Py , then for all edges {i, j}∈G[V10 ]∪G[V20 ], (f2 (i)−f2 (j))2 ≤1/(4|V |2 ). By contradiction, assume there is an edge {i, j}∈G[V10 ]∪G[V20 ] such that (f2 (i)−f2 (j))2 >1/(4|V |2 ). Then, cij (f2 (i)−f2 (j))2 =g(f2 (i)−f2 (j))2 >|E|. Hence, Py (f2 , c)>|E| which contradicts with the fact the f2 minimizes Py . Therefore, if g≥4|V |2 |E|, then for all {i, j}∈G[V10 ]∪G[V20 ], |f2 (i)−f2 (j)|≤ 1/(2|V |). Now, since G[V10 ] is connected, all the nodes in V10 are connected to w with a path of length (in number of hops) less than |V |−1. Hence, using the triangle inequality, for all i∈V10 : |f2 (w)−f2 (i)|≤(|V |−1)/(2|V |)<1/2⇒|1−f2 (i)|<1/2, which means that all the nodes in V10 are above L1 . With the very same argument, if g≥t2 |V |2 |E|, then for all i∈V20 , f2 (i)<1/t. Now, we want to prove that there is a g such that all the nodes in V20 will be embedded below the lines L2 and L3 . Define n1 (i):=|N (i)∩V10 | and n2 (i):=|N (i)∩V20 |. From [12], we know the 16 P P embedding is such that for all i∈V \{u, v, w}, f (i)=1/ci j∈N (i) cij f (j), where cj = j∈N (i) cij f (j). Since G[V20 ] is connected, for any i∈V20 there is a path i=v1 , v2 , . . . , vr =v in V20 . Using this ordering: ( 1 f1 (vj )≥ n2 (vj )g+n gf1 (vj+1 )≥(1/|V |)f1 (vj+1 ), ∀j∈{1, . . . , r−1} 1 (vj ) f1 (vr )=f1 (v)=1 ⇒∀i∈V20 \{u, v}: f1 (i)≥(1/|V |)r ≥(1/|V |)|V | . On the other hand, from the previous part, if we set g≥|V |2|V |+2 |E|, then for all i∈V20 , f2 (i)≤ (1/|V |)|V | . Hence, for all i∈V20 , f2 (i)≤f1 (i), which means that all the nodes in V20 will be placed below the line L3 . With the very same idea, we show that there exist a g for which all the nodes in V20 will be placed below the line L2 . Since G[V20 ] is connected, for P any i∈V20 there is a path u=u1 , v2 , . . . , ut =i in V20 . Notice that for all i∈V \{u, v, w}, 1−f1 (i)=1/ci j∈N (i) cij (1−f1 (j)). Hence, since ∀j∈V :f1 (j)≤1, we have, ( 1 1−f1 (uj )≥ n2 (uj )g+n g(1−f1 (ui−1 ))≥(1/|V |)(1−f1 (ui−1 )), ∀j∈{2, . . . , t} 1 (uj ) 1−f1 (u)=1−f1 (u1 )=1 ⇒∀i∈V20 \{u, v}: 1−f1 (i)≥(1/|V |)t ≥(1/|V |)|V | . From the previous part, if we set g≥4|V |2|V |+2 |E|, then for all i∈V20 , f2 (i)≤1/2(1/|V |)|V | . Hence, for i∈V20 , f1 (i)+2f2 (i)≤1, which means that all the nodes in V20 will be placed below the line L3 . Therefore, if we set g≥4|V |2|V |+2 |E|, then we will get an embedding as depicted in Fig. 3. Note that a polynomial number of bits suffices for g. Notice that if ~c is a “good” vector, then so is ~c+~ in which ~ is a vector with very small Euclidean norm. Hence, we can always find a “good” vector ~c which result in a X-embedding in general position. Proof of Theorem 1. Assume that |V |≡0(mod 4); the proof for the case |V |≡2(mod 4) is similar. Using Lemma 2, we can find {u, v, w}∈V and a partition (V10 , V20 ) of V with properties described in the Lemma. Set X={u, v, w}. Using Lemma 3, we can find a convex X-embedding of G in general position with properties described in the Lemma as depicted in Fig. 3. The rest of the proof is very similar to the proof of Lemma 1. We consider again a circle C around f (u), f (v), f (w) in R2 as shown in Fig. 3. Also consider a directed line L tangent to the circle C at point A. If we project the nodes of G onto the line L, this time the order of the nodes projection gives an st-numbering between the first and the last node only if u and v are the first and last node. However, if we set V1 to be the |V |/2 nodes whose projections come first and V2 are the |V |/2 nodes whose projections come last, then G[V1 ] and G[V2 ] are both connected even when u and v are not the first and last nodes. The reason lies on the special embedding that we considered here. Assume for example w and v are the first and the last projected nodes, and V1 and V2 are set of the |V |/2 nodes which projections come first and last, respectively. Two cases might happen: (i) If u, w∈V1 and v∈V2 , then since {u, w}∈E, both G[V1 ] and G[V2 ] are connected because of the properties of the embedding. (ii) If w∈V1 and u, v∈V2 , since |V20 |≤|V |/2 and |V2 |=|V |/2, then either V2 =V20 or V2 ∩V10 6=∅. If V2 =V20 , and hence V1 =V10 then there is nothing to prove. So assume there is a node z∈V2 ∩V10 . From the properties of the embedding, the triangle {z, u, v} contains all the nodes of V20 . 17 Since {z, u, v}∈V2 , and V2 contains all the nodes that are on a same side of a halfplane, we should also have V20 ⊂V2 . Now, from the properties of the embedding, it is easy to see that every node in V2 has a path either to u or v. Since V20 ⊂V2 , there is also a path between u and v. Thus, G[V2 ] is connected. From the properties of the embedding, G[V1 ] is connected as before. The rest of the proof is exactly the same as the proof of Lemma 1. We move L from being tangent at point A to point B (AB is a diameter of the circle C) and consider the resulting partition. Notice that if at point A, p(V1 )>0, then at point B since V1 and V2 completely switch places compared to the partition at point A, p(V1 )<0. Hence, as we move L from being tangent at point A to point B and keep it tangent to the circle, in the resulted partitions, p(V1 ) goes from some positive value to a negative value. Notice that the partition (V1 , V2 ) changes only if L passes a point D on the circle such that at D, L is perpendicular to a line that connects f (i) to f (j) for i, j∈V . Now, since the embedding is in general position, there are exactly two points on every line that connects two points f (i) and f (j), so V1 changes at most by one node leaving V1 and one node entering V1 . Hence, p(V1 ) changes by either ±2 or 0 value at each change. Now, since |V |≡0(mod 4), p(V1 ) has an even value in all the resulting partitions. Therefore, as we move L from being tangent at point A to point B, there should be a point D such that in the resulted partition p(V1 )=p(V2 )=0. Proof of Corollary 2. Every series-parallel graph G has a separation pair {u, v} such that every connected component of G[V \{u, v}] has less that 2|V |/3 nodes, and furthermore, such a separation pair can be found in linear time. To see this, consider the derivation tree T of the construction of G. The root of T corresponds to G, the leaves correspond to the edges, and every internal node i corresponds to a subgraph Gi =(Vi , Ei ) that is the series or parallel composition of the subgraphs corresponding to its children. Starting at the root of T , walk down the tree following always the edge to the child corresponding to a subgraph with the maximum number of nodes until the number of nodes becomes ≤2|V |/3. Thus, we arrive at a node i of the tree such that |Vi |>2|V |/3 and |Vj |≤2|V |/3 for all children j of i. Let ui , vi be the terminals of Gi . Note that ui , vi separate all the nodes of Gi from all the nodes that are not in Gi . Since |Vi |>2|V |/3, we have |V \Vi |<|V |/3. If Gi is the parallel composition of the graphs corresponding to the children of i, then the separation pair {ui , vi } has the desired property, i.e. all the components of G[V \{u, v}] have less than 2|V |/3 nodes. Suppose Gi is the series composition of the graphs Gj , Gk corresponding to the children j, k of i, and let w be the common terminal of Gj , Gk ; thus, Gi has terminals ui , w, and Gk has terminals w, vi . Assume wlog that |Vj |≥|Vk |. Then |V |/3<|Vj |≤2|V |/3. The pair {ui , w} of terminals of Gj separates all the nodes of Vj \{ui , w} from all the nodes of V \Vj , and both these sets have less than 2|V |/3 nodes. Thus, {ui , w} has the required property. Proof of Theorem 2. Using Lemma 5 for q=4, we consider two cases: (i) There is a separation pair {u, v}∈V such that if G1 , . . . , Gk are the connected components of G\{u, v}, for any i, |Vi |<3|V |/4. In this case Lemma 4 for q=4 proves the theorem. (ii) After a set of contractions, G can be transformed into a 3-connected graph G∗ =(V ∗ , E ∗ ) with weighted edges such that for any edge e∗ ∈E ∗ , w(e∗ )<|V |/4. In this case the proof is similar to the proof of Theorem 1. Notice that if G∗ contains a triangle then the proof is much simpler 18 as in the proof of Lemma 1 but here to avoid repetition, we use the approach in the proof of Theorem 1 and prove the theorem once for all cases of G∗ . Recall that for each edge in G∗ , its weight represents the number of nodes in the contracted subgraph that it represents. So if e∗ ∈E ∗ represents an induced subgraph of G with l nodes, then w(e∗ )=l; and if e∗ ∈E∩E ∗ then w(e∗ )=0. Using Lemma 2, we can find {u, v, w}∈V ∗ and a partition (V1∗ , V2∗ ) of V ∗ with properties described in the Lemma. Since in G∗ edges have weights that actually represent nodes in G, we want a partition such that we also have P |V2∗ |+ e∈G[V ∗ ] w(e)≤|V |/2. Notice that we can modify the proof of Lemma 2 to take into 2 P account the weights for the edges and find a partition such that |V2∗ |+ e∈G[V ∗ ] w(e)≤|V |/2 2 as follows. Again, using the algorithm presented in [4], we can find a non-separating proper cycle C0 in G∗ such that every node in C0 has a neighbor in G∗ \C0 . We consider three cases: P (a) If |C0 |+ e∈G[C0 ] w(e)≤|V |/2+1, then the proof is as in the proof of Lemma 2. Select any three consecutive nodes (u, w, v) of C0 and set V2∗ =C0 \{w} and V1∗ =V ∗ \V2∗ . P (b) If |C0 |>|V ∗ |/2 and |C0 |+ e∈G[C0 ] w(e)>|V |/2+1, then as in the proof of Lemma 2, since |C0 |>|V ∗ \C0 | and every node is C0 has a neighbor in V ∗ \C0 , there exist a node w∈V ∗ \C0 such that |N (w)∩C0 |≥2. Select two P nodes u, v∈N (w)∩C0 . There exists a path P in C0 between u and v such that |P |+ e∈G[P ] w(e)<|V |/2−1. Set V2∗ ={u, v}∪P and V1∗ =V ∗ \V2∗ . P (c) If |C0 |≤|V ∗ |/2 and |C0 |+ e∈G[C0 ] w(e)>|V |/2+1, then if there exist a node w∈V ∗ \C0 such that |N (w)∩C0 |≥2, the proof is as in the previous part. So assume for all w∈V ∗ \C0 , |N (w)∩C0 |≤1. Assume w1 , w2 , . . . , wt ∈V ∗ \C0 are all the nodes with |N (wi )∩C0 |=1. We show that there is a 1≤i≤t, such that wi is not a cut-point of G∗ [V ∗ \C0 ]. Let T be a spanning tree of G∗ [V ∗ \C0 ]. If there is a 1≤i≤t, such that wi is a leaf of T , then wi is not a cut-point of G∗ [V ∗ \C0 ] and there is nothing left to prove. So assume none of wi s is a leaf of T . Suppose 1≤p, q≤t are such that the path between wp and wq in T is the longest between all pairs of wi s. We show that wp and wq cannot be cut-points of G∗ [V ∗ \C0 ]. Assume for example wp is a cut-point of G∗ [V ∗ \C0 ] and G∗q̄ is a connected component of G∗ [V ∗ \C0 ]\{wp } such that wq ∈G / ∗q̄ . Since the path between wp and wq in T is the longest between all pairs of wi s, ∀1≤i≤t:wi ∈G / ∗q̄ , otherwise we can find a longer path from wq to some other wi . On the other hand, if ∀1≤i≤t:wi ∈G / q̄ , in G∗ \{wp } the cycle C0 is ∗ disconnected from Gq̄ which contradicts with the 3-connectedness of G∗ . Hence, there should be at least a noncut-point w∈V ∗ \C0 with |N (w)∩C0 |=1. Since G∗ is 3-connected, each node has degree at least 3. Hence, there are two nodes u, v∈N (w)∩(V ∗ \C0 ). Set V1∗ =C0 ∪{w} and V2∗ =V ∗ \V1∗ . (V1∗ , V2∗ ) is a desirable partition for V ∗ . Hence, we can find {u, v, w}∈V ∗ andPa partition (V1∗ , V2∗ ) of V ∗ with properties described in the Lemma 2 as well as having |V2∗ |+ e∈G[V ∗ ] w(e)≤|V |/2. Set X={u, v, w}. Using Lemma 3, 2 G∗ has a convex X-embedding in general position like f ∗ :V ∗ →R2 as described in the lemma and depicted in Fig. 3. Now, from this embedding, we get a convex X-embedding for G like f :V →R2 as follows. For any i∈V ∩V ∗ , f (i)=f ∗ (i). For any edge {i, j}∈E ∗ such that {i, j} represents an induced subgraph of G, we represent it by a pseudo-path between i and j in G like P and place the nodes in P in order on random places on the line segment that connects f (i) to f (j). If the edge {i, j}∈E ∗ is between a node in V1∗ and a node in V2∗ and represents a pseudo-path P in G , we place the nodes in P in order on random places on the segment that connects f (i) to f (j) but above the line L1 . Hence, by this process, we get a convex X-embedding for G which is in general position (almost surely) except for the nodes 19 that are part of a pseudo-path (which we know have length less than |V |/4). Notice that if V20 ⊂V contains all the nodes in V2∗ and all the nodes that are part of a pseudo-path between the nodes of V2∗ (represented by weighted edges in G∗ ) in G, and V10 =V \V20 , then (V10 , V20 ) is partition of G with all the properties of Lemma 2. Moreover, the X-embedding f of G that we derived from f ∗ for G∗ , has all the properties of Lemma 3 for the partition (V10 , V20 ). The rest of the proof is similar to the proof of Theorem 1. We consider again a circle C around f (u), f (v), f (w) in R2 as shown in Fig. 3. Also consider a directed line L tangent to the circle C at point A and project nodes of G onto the line L. With the same argument as in the proof of Theorem 1, since the embedding f has the properties in Lemma 2 and 3, if we set V1 to be the |V |/2 nodes whose projections come first and V2 are the |V |/2 nodes whose projections come last, then G[V1 ] and G[V2 ] are both connected. If |p(V1 )|≤1, then (V1 , V2 ) is a good partition and there is nothing left to prove. Otherwise, we move L from being tangent at point A to point B (AB is a diameter of the circle C) and consider the resulting partition. Notice that if at point A, p(V1 )>0, then at point B since V1 and V2 completely switch places compared to the partition at point A, p(V1 )<0. Hence, as we move L from being tangent at point A to point B and keep it tangent to the circle, in the resulting partitions, p(V1 ) goes from some positive value to a negative value. Notice that the partition (V1 , V2 ) changes only if L passes a point D on the circle such that at D, L is perpendicular to a line that connects f (i) to f (j) for i, j∈V . Now, since the embedding is in general position except for few lines ∗ or {i, j}∈E∩E ∗ there are exactly two points on that contain a pseudo-path, if {i, j}∈E∪E / the line that connects f (i) and f (j), so V1 changes at most by one node leaving V1 and one node entering V1 . Thus, in this case p(V1 ) changes by at most 2. However, if {i, j}∈E ∗ , then since there can be at most |V |/4−1 points on the line that connects f (i) to f (j), p(V1 ) may change by |V |/4−1. So let’s consider that L is perpendicular to the line that connects f (i) and f (j) at point D and p(V1 )>0 slightly before L passes point D and p(V1 )≤0 slightly after L passes point D. We consider 2 cases: ∗ or {i, j}∈E∩E ∗ . In this case since V changes by at most 2, (a) Suppose {i, j}∈E∪E / 1 therefore, p(V1 ) slightly after L passes D is either 0 or −1. Hence, the partition (V1 , V2 ) that we get after L passes D is a good partition with |V1 |=|V2 |=|V |/2. (b) Suppose {i, j}∈E ∗ . Let (Vb1 , Vb2 ) be the partition slightly before L passes D and let (Va1 , Va2 ) be the partition slightly after. Assume P0 is the pseudo-path between i and j and P =P0 ∪{i, j}. It is easy to see that (Vb1 \P, Vb2 \P )=(Va1 \P, Va2 \P ). If p(Vb1 \P )=0, since |P0 |<|V |/4, then V1 =Vb1 \P and V2 =V \V1 is a good partition and there is nothing left to prove. So either p(Vb1 \P )>0 or p(Vb1 \P )<0. If p(Vb1 \P )>0, since p(Va1 )≤0 and Vb1 \P =Va1 \P , we can add a set of nodes from P ∩Va1 , say P 0 , to Va1 \P to get p((Va1 \P )∪P 0 )=0. Now since |P0 |<|V |/4, V1 =(Va1 \P )∪P 0 and V2 =V \V1 is a good partition. If p(Vb1 \P )<0, since p(Vb1 )>0, we can add a set of nodes from P ∩Vb1 , say P 0 , to Vb1 \P to get p((Vb1 \P )∪P 0 )=0. Now since |P0 |<|V |/4, V1 =(Vb1 \P )∪P 0 and V2 =V \V1 is a good partition. 20 D Missing Proofs from Section 4 Proof of Corollary 4. Suppose without loss of generality that nr ≥nb and let nr −nb =2t and nr +nb = n=2m. Set p(i)=1 for i∈R and p(i)=−1 for i∈B. Then p(V )=2t. From the equations, we have nr =m+t and nb =m−t. From Corollary 1 we can find a partition (V1 , V2 ) such that |V1 |=|V2 | and |p(V1 )−p(V )/2|, |p(V1 )− p(V )/2|≤1. Let r1 =|R∩V1 | and b1 =|B∩V1 |. We have r1 +b1 =n/2=m and t−1≤r1 −b1 ≤t+1. Therefore, (m+t)/2−(1/2)≤r1 ≤(m+t)/2+(1/2). Since r1 is an integer and nr =m+t is even, it follows that r1 =(m+t)/2=nr /2. Hence, b1 =(m−t)/2=nb /2. Therefore, V2 also contains nr /2 red nodes and nb /2 blue nodes. References [1] D. Bienstock. Electrical Transmission System Cascades and Vulnerability: An Operations Research Viewpoint, volume 22. SIAM, 2016. [2] J. Bondy and U. Murty. Graph theory, 2nd printing, 2008. [3] F. Chataigner, L. R. Salgado, and Y. Wakabayashi. Approximation and inapproximability results on balanced connected partitions of graphs. DMTCS, 9(1):177–192, 2007. [4] J. Cheriyan and S. Maheshwari. Finding nonseparating induced cycles and independent spanning trees in 3-connected graphs. J. Algorithms, 9(4):507–537, 1988. [5] J. Chlebı́ková. Approximating the maximally balanced connected partition problem in graphs. Inform. Process. Lett., 60(5):225–230, 1996. [6] M. Dyer and A. Frieze. On the complexity of partitioning graphs into connected subgraphs. Discrete Applied Math., 10:139–153, 1985. [7] S. Even and R. E. Tarjan. Computing an st-numbering. Theoretical Computer Science, 2(3):339–344, 1976. [8] N. Fan, D. Izraelevitz, F. Pan, P. M. Pardalos, and J. Wang. A mixed integer programming approach for optimal power grid intentional islanding. Energy Systems, 3(1):77–93, 2012. [9] E. Gyori. On division of graphs to connected subgraphs. In Combinatorics (Proc. Fifth Hungarian Colloq., Keszthely, 1976), volume 1, pages 485–494, 1976. [10] J. E. Hopcroft and R. E. Tarjan. Dividing a graph into triconnected components. SIAM J. Comput., 2(3):135–158, 1973. [11] A. Lempel, S. Even, and I. Cederbaum. An algorithm for planarity testing of graphs. In Theory of graphs: International symposium, volume 67, pages 215–232. Gordon and Breach, New York, 1967. [12] N. Linial, L. Lovasz, and A. Wigderson. Rubber bands, convex embeddings and graph connectivity. Combinatorica, 8(1):91–102, 1988. [13] L. Lovász. A homology theory for spanning tress of a graph. Acta Mathematica Hungarica, 30(3-4):241–251, 1977. 21 [14] S. Pahwa, M. Youssef, P. Schumm, C. Scoglio, and N. Schulz. Optimal intentional islanding to enhance the robustness of power grid networks. Physica A, 392(17):3741–3754, 2013. [15] C. H. Papadimitriou and M. Yannakakis. The complexity of restricted spanning tree problems. JACM, 29(2):285–309, 1982. [16] R. J. Sánchez-Garcı́a, M. Fennelly, S. Norris, N. Wright, G. Niblo, J. Brodzki, and J. W. Bialek. Hierarchical spectral clustering of power grids. IEEE Trans. Power Syst., 29(5):2229–2237, 2014. [17] K. Sun, Q. Zhao, D.-Z. Zheng, J. Ma, and Q. Lu. A two-phase method based on obdd for searching for splitting strategies of large-scale power systems. In Proc. IEEE PowerCon’02, 2002. [18] H. Suzuki, N. Takahashi, and T. Nishizeki. A linear algorithm for bipartition of biconnected graphs. Inform. Process. Lett., 33(5):227–231, 1990. [19] W. T. Tutte. How to draw a graph. Proc. London Math. Soc, 13(3):743–768, 1963. [20] K. Wada and K. Kawaguchi. Efficient algorithms for tripartitioning triconnected graphs and 3-edge-connected graphs. In Graph-Theoretic Concepts in Computer Science, pages 132–143. Springer, 1994. [21] D. B. West et al. Introduction to graph theory, volume 2. Prentice hall Upper Saddle River, 2001. 22
8cs.DS
arXiv:cs/0703155v1 [cs.PL] 30 Mar 2007 Replace this file with prentcsmacro.sty for your meeting, or with entcsmacro.sty for your meeting. Both can be found at the ENTCS Macro Home Page. Liveness of Heap Data for Functional Programs Amey Karkare1 Uday Khedker Amitabha Sanyal {karkare,uday,as}@cse.iitb.ac.in Department of CSE, IIT Bombay Mumbai, India Abstract Functional programming languages use garbage collection for heap memory management. Ideally, garbage collectors should reclaim all objects that are dead at the time of garbage collection. An object is dead at an execution instant if it is not used in future. Garbage collectors collect only those dead objects that are not reachable from any program variable. This is because they are not able to distinguish between reachable objects that are dead and reachable objects that are live. In this paper, we describe a static analysis to discover reachable dead objects in programs written in first-order, eager functional programming languages. The results of this technique can be used to make reachable dead objects unreachable, thereby allowing garbage collectors to reclaim more dead objects. Keywords: Compilers, Liveness, Garbage Collection, Memory Management, Data Flow Analysis, Context Free Grammars 1 Introduction Garbage collection is an attractive alternative to manual memory management because it frees the programmer from the responsibility of keeping track of object lifetimes. This makes programs easier to implement, understand and maintain. Ideally, garbage collectors should reclaim all objects that are dead at the time of garbage collection. An object is dead at an execution instant if it is not used in future. Since garbage collectors are not able to distinguish between reachable objects that are live and reachable objects that are dead, they conservatively approximate the liveness of an object by its reachability from a set of locations called root set (stack locations and registers containing program variables) [14]. As a consequence, many dead objects are left uncollected. This has been confirmed by empirical studies for Haskell [19], Scheme [16] and Java [22,23,24]. Compile time analysis can help in distinguishing reachable objects that are live from reachable objects that are dead. This is done by detecting unused references to objects. If an object is dead at a program point, none of its references are used by the program beyond that program point. If every unused reference is nullified, then the dead objects may become unreachable and may be claimed by garbage collector. 1 Supported by Infosys Technologies Limited, Bangalore, under Infosys Fellowship Award. c 2018 Published by Elsevier Science B. V. Karkare, Khedker and Sanyal (define (app list1 list2) π1 :(if π2 :(null? π3 :list1) π4 :list2 π5 :(cons π6 :(car π7 :list1) π8 :(app π9 :(cdr π10 :list1) π11 :list2)))) (let z ←(cons (cons 4 (cons 5 Nil)) (cons 6 Nil)) in (let y ← (cons 3 Nil) in π12 :(let w ← π13 :(app y z) in π14 :(car (car (cdr w)))))) y w × z × × 3 × Nil × 6 4 5 Nil Nil (b) Memory graph at π14 . (b) Thick edges denote live links. (b) Edges marked × can be nullified. (a) Example program. Fig. 1. Example Program and its Memory Graph. Example 1.1 Figure 1(a) shows an example program. The label π of an expression e denotes the program point just before the evaluation of e. At a given program point, the heap memory can be viewed as a (possibly unconnected) directed acyclic graph called memory graph. The locations in the root set form the entry nodes for the memory graph. Figure 1(b) shows the memory graph at π14 . Each cons cell is an intermediate node in the graph. Elements of basic data types and the 0-ary constructor Nil form leaf nodes of the graph. They are assumed to be boxed, i.e. stored in separate heap cells and are accessed through references. The edges in the graph are called links. If we consider the execution of the program starting from π14 , the links in the memory graph that are traversed are shown by thick arrows. These links are live at π14 . Links that are not live can be nullified by the compiler by inserting suitable statements. If an object becomes unreachable due to nullification, it can be collected by the garbage collector. In the figure, the links that can be nullified are shown with a ×. Note that a link need not be nullified if nullifying some other link makes it unreachable from the root set. If a node becomes unreachable from the root set as a consequence of nullifying the links, it will be collected during the next invocation of garbage collector. ✷ In this example, starting at π14 , there is only one execution path. In general, there could be multiple execution paths starting from a program point π. The liveness information at π is a combination of liveness information along every execution path starting at π. In this paper, we describe a static analysis for programs written in first-order, eager functional programming languages. The analysis discovers live references at every program point, i.e. the references that may be used beyond the program point in any execution of the program. We use context free grammars as a bounded representation for the set of live references. The result of the analysis can be used by the compiler to decide whether a given reference can be nullified at a given program point. Our analysis is context-sensitive yet modular in that a function is analyzed only once. The rest of the paper is organized as follows: Section 2 describes the language used to explain our analysis along with the basic concepts and notations. The analysis in Section 3 captures the liveness information of a program as a set of equations. The method to solve 2 Karkare, Khedker and Sanyal p ::= d1 . . . dn e1 — program d ::= (define ( f v1 . . . vn ) e1 ) — function definition e ::= — expression κ — constant |v — variable | Nil — primitive constructor — primitive constructor | (cons e1 e2 ) | (car e1 ) — primitive selector | (cdr e1 ) — primitive selector | (pair? e1 ) — primitive tester | (null? e1 ) — primitive tester | (+ e1 e2 ) — generic primitive | (if e1 e2 e3 ) — conditional | (let v1 ← e2 in e3 ) — let binding | ( f e1 . . . en ) — function application Fig. 2. The syntax of our language these equations is given in Section 4. Section 5 describes how the result of the analysis can be used to nullify unused references. Finally, we compare our approach with related work in Section 6 and conclude in Section 7. 2 Language, Concepts and Notations The syntax of our language is described in Figure 2. The language has call-by-value semantics. The argument expressions are evaluated from left to right. We assume that variables in the program are renamed so that the same name is not defined in two different scopes. For notational convenience, the left link (corresponding to the car) of a cons cell is denoted by 0 and the right link (corresponding to the cdr) is denoted by 1. We use e.0 to denote the link corresponding to (car e) for an expression e (assuming e evaluates to a list) and e.1 to denote the link corresponding to (cdr e). A composition of several cars and cdrs is represented by a string α ∈ {0, 1}∗ . If an expression e evaluates to a cons cell then e.ε corresponds to the reference to the cons cell. For an expression e, let [e] denote the location in the root set holding the value of e. Given a memory graph, the string e.α describes a path in the memory graph that starts at [e]. We call the string e.α an access expression, the string α an access pattern, and the path traced in the memory graph an access path. In Figure 1, the access expression w.100 represents the access path from w to the node containing the value 4. Most often, the memory graph being referred to is clear from the context, and therefore we shall use access expressions to refer to access paths. When we use an access path to refer to a link in the memory graph, it denotes the last link in the access path. Thus, w.100 denotes the link incident on the node containing the value 4. If σ denotes a set of access patterns, then e.σ is the set of access paths rooted at [e] and corresponding to σ. i.e. e.σ = {e.α | α ∈ σ} A link in a memory graph is live at a program point π if it is used in some path from π 3 Karkare, Khedker and Sanyal to the program exit. An access path is defined to be live if its last link is live. In Example 1, the set of live access paths at π14 is {w.ε, w.1, w.10, w.100, z.0, z.00}. Note that the access paths z.0 and z.00 are live at π14 due to sharing. We do not discover the liveness of such access paths directly. Instead, we assume that an optimizer using our analysis will use alias analysis to discover liveness due to sharing. The end result of our analysis is the annotation of every expression in the program with a set of access paths rooted at program variables. We call this liveness environment, denoted L . This information can be used to insert nullifying statements before expressions. The symbols 0 and 1 extend the access patterns of a structure to describe the access patterns of a larger structure. In some situations, we need to create access patterns of a substructure from the access patterns of a larger structure. For this purpose, we extend our alphabet of access patterns to include symbols 0̄ and 1̄. The following example motivates the need for these symbols. Example 2.1 Consider the expression at program point π1 in π1 :(let w ← π2 :(cons x y) in π3 :· · ·) Assuming Lπ3 = {w.α}, we would like to find out which reference of the list x and y are live at π1 . Let x.α′ be live at π1 . Then, the two possible cases are: • If α = 1β or α = ε, no link in the structure rooted at x is used. We use ⊥ to denote the access pattern describing such a situation. Thus, α′ = ⊥. • If α = 0β then the link represented by w.α that is x rooted and live at π1 can be represented by x.β. Thus, α′ = β. This relation between α and α′ is expressed by α′ = 0̄α. 1̄ can be interpreted similarly. ✷ With the inclusion of 0̄, 1̄ and ⊥ in the alphabet for access patterns, an access pattern does not directly describe a path in the memory graph. Hence we define a Canonical Access Pattern as a string restricted to the alphabet {0, 1}. As a special case, ⊥ is also considered as a canonical access pattern. We define rules to reduce access patterns to their canonical forms. For access patterns α1 and α2 :  α1 α′2 if α2 ≡ 0α′2 (1) α1 0̄α2 → ⊥ if α2 ≡ 1α′2 or α2 ≡ ε  α1 α′2 if α2 ≡ 1α′2 (2) α1 1̄α2 → ⊥ if α2 ≡ 0α′2 or α2 ≡ ε (3) α1 ⊥α2 → ⊥ k α → α′ denotes the reduction of α to α′ in k steps, and → denotes the reflexive and transitive closure of →. The concatenation (·) of a set of access patterns σ1 with σ2 is defined as a set containing concatenation of each element in σ1 with each element in σ2 , i.e. ⋆ σ1 · σ2 = {α1 α2 | α1 ∈ σ1 , α2 ∈ σ2 } 3 Computing Liveness Environments Let σ be the set of access patterns specifying the liveness of the result of evaluating e. Let L be the liveness environment after the evaluation of e. Then the liveness environment 4 Karkare, Khedker and Sanyal before the computation of e is discovered by propagating σ backwards through the body of e. This is achieved by defining an environment transformer for e, denoted X E . Since e may contain applications of primitive operations and user defined functions, we also need transfer functions that propagate σ from the result of the application to the arguments. These functions are denoted by X P and X F . While X P is given directly based on the semantics of the primitive, X F is inferred from the body of a function. 3.1 Computing X E For an expression e at program point π, X E (e, σ, L ) computes liveness environment at π where σ is the set of access patterns specifying the liveness of the result of evaluating e and L is the liveness environment after the evaluation of e. Additionally, as a side effect, the program point π is annotated with the value computed. However, we do not show this explicitly to avoid clutter. The computation of X E (e, σ, L ) is as follows. (4) (5) (6) (7) (8) (9) (10) X E (κ, σ, L ) = L X E (v, σ, L ) = L ∪ v.σ X E ((P e1 e2 ), σ, L ) = let L ′ ← X E (e2 , X PP2 (σ), L ) in X E (e1 , X PP1 (σ), L ′ ) where P is one of cons, + X E ((P e1 ), σ, L ) = X E (e1 , X PP1 (σ), L ) where P is one of car, cdr, null?, pair? X E ((if e1 e2 e3 ), σ, L ) = let L ′ ← X E (e3 , σ, L ) in let L ′′ ← X E (e2 , σ, L ) in X E (e1 , {ε}, L ′ ∪ L ′′) X E ((let v1 ← e1 in e2 ), σ, L ) = let L ′ ← X E (e2 , σ, L ) in X E (e1 , σ′ , L ′ − v1 .σ′ ) where σ′ = {α | v1 .α ∈ L ′ } X E (( f e1 . . . en ), σ, L ) = let L1 ← X E (en , X F fn (σ), L ) in .. . let Ln−1 ← X E (e2 , X F f2 (σ), Ln−2 ) in X E (e1 , X F f1 (σ), Ln−1 ) We explain the definition of X E for the if expression. Since the value of the conditional expression e1 is boolean and this value is used, the liveness access pattern with respect to which e1 is computed is {ε}. Further, since it is not possible to statically determine whether e2 or e3 will be executed, the liveness environment with respect to which e1 is computed is the union of the liveness environments arising out of e2 and e3 . 3.2 Computing X P and X F If σ is the set of access patterns specifying the liveness of the result of evaluating (P e1 . . . en ), where P is a primitive, then X PPi (σ) gives the set of access patterns specifying the liveness of ei . We describe the transfer functions for the primitives in our language: car, cdr, cons, null?, pair? and +. The 0-ary constructor Nil does not accept any argument and is ignored. 5 Karkare, Khedker and Sanyal Assume that the live access pattern for the result of the expression (car e) is α. Then, the link that is denoted by the path labeled α starting from location [(car e)] can also be denoted by a path 0α starting from location [e]. We can extend the same reasoning for set of access patterns (σ) of result, i.e. every pattern in the set is prefixed by 0 to give live access pattern of e. Also, since the cell corresponding to e is used to find the value of car, we need to add ε to the live access patterns of e. Reasoning about (cdr e) similarly, we have 1 (σ) = {ε} ∪ {0} · σ, (11) X Pcar 1 X Pcdr (σ) = {ε} ∪ {1} · σ As seen in Example 2.1, an access pattern of α for result of cons translates to an access pattern of 0̄α for its first argument, and 1̄α for its second argument. Since cons does not read its arguments, the access patterns of the arguments do not contain ε. 1 (12) X Pcons (σ) = {0̄} · σ, 2 X Pcons (σ) = {1̄} · σ Since the remaining primitives read only the value of the arguments, the set of live access patterns of the arguments is {ε}. 1 (13) X Pnull? (σ) = {ε}, 1 X Ppair? (σ) = {ε}, X P+1 (σ) = {ε}, X P+2 (σ) = {ε} We now consider the transfer function for a user defined function f . If σ is the set of access patterns specifying the liveness of the result of evaluating ( f e1 . . . en ), then X F fi (σ) gives the set of access patterns specifying the liveness of ei . Let f be defined as: (define ( f v1 . . . vn ) π : e) Assume that σ is the live access pattern for the result of f . Then, σ is also the live access / computes live access patterns for vi (1 ≤ i ≤ n) at π. Thus, the pattern for e. X E (e, σ, 0) transfer function for the ith argument of f is given by: / (14) X F fi (σ) = {α | vi .α ∈ X E (e, σ, 0)} 1≤i≤n The following example illustrates our analysis. Example 3.1 Consider the program in Figure 1. To compute the transfer functions for app, / in terms of a variable σ. Here e is we compute the environment transformer X E (e, σ, 0) the body of app. The value of the liveness environment at each point in the body of app is shown in Appendix A. From the liveness information at π1 we get: 1 1 X F app (σ) = {ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ) 2 2 X F app (σ) = σ ∪ X F app ({1̄} · σ) Let epgm represent the entire program being analyzed and σpgm be the set of access patterns describing the liveness of the result. Then, the liveness environment at various / The liveness environments at points in the epgm can be computed as X E (epgm , σpgm , 0). π14 and π12 are as follows: Lπ14 = { w.({ε, 1, 10} ∪ {100} · σpgm ) } Lπ12 = ( 1 ({ε, 1, 10} ∪ {100} · σpgm ), y.X F app 2 z.X F app ({ε, 1, 10} ∪ {100} · σpgm ) ) ✷ We assume that the entire result of the program is needed, i.e., σpgm is {0, 1}∗. 6 Karkare, Khedker and Sanyal 4 Solving the Equations for X F In general, the equations defining the transfer functions X F will be recursive. To solve such equations, we start by guessing that the solution will be of the form: (15) X F fi (σ) = I fi ∪ D if · σ, where I fi and D if are sets of strings over the alphabet {0, 1, 0̄, 1̄}. The intuition behind this form of solution is as follows: The function f can use its argument locally and/or copy a part of it to the return value being computed. I fi is the live access pattern of ith argument due to local use in f . D if is a sort of selector that selects the liveness pattern corresponding to the ith argument of f from σ, the liveness pattern of the return value. If we substitute the guessed form of X F fi in the equations describing it and equate the terms containing σ and the terms without σ, we get the equations for I fi and D if . This is illustrated in the following example. 1 (σ) from Example 3.1: Example 4.1 Consider the equation for X F app 1 1 X F app (σ) = {ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ) Decomposing both sides of the equation, and rearranging the RHS gives: 1 1 1 1 Iapp ∪ Dapp · σ = {ε} ∪ {00̄} · σ ∪ {1} · (Iapp ∪ Dapp · {1̄} · σ) 1 1 = {ε} ∪ {1} · Iapp ∪ {00̄} · σ ∪ {1} · Dapp · {1̄} · σ Separating the parts that are σ dependent and the parts that are σ independent, and equating them separately, we get: 1 1 Iapp = {ε} ∪ {1} · Iapp 1 1 · {1̄}σ Dapp · σ = {00̄} · σ ∪ {1} · Dapp 1 = ({00̄} ∪ {1} · Dapp · {1̄}) · σ As the equations hold for any general σ, we can simplify them to: 1 1 1 1 Iapp = {ε} ∪ {1} · Iapp and Dapp = {00̄} ∪ {1} · Dapp · {1̄} 2 (σ), we get: Similarly, from the equation describing X F app 2 2 2 2 Iapp = Iapp and Dapp = {ε} ∪ Dapp · {1̄} The liveness environment at π12 and π14 in terms Iapp and Dapp are: Lπ14 = { w.{100} · σpgm }   1 1 y.(Iapp ∪ Dapp · ({ε, 1, 10} ∪ {100} · σpgm )), Lπ12 = 2 2 · ({ε, 1, 10} ∪ {100} · σpgm )) ∪ Dapp z.(Iapp Solving for Iapp and Dapp gives us the desired liveness environments at these program points. 4.1 ✷ Representing Liveness by Context Free Grammars The values of I and D variables of a transfer function are sets of strings over the alphabet {0, 1, 0̄, 1̄}. We use context free grammars (CFG) to describe these sets. The set of terminal symbols of the CFG is {0, 1, 0̄, 1̄}. Non-terminals and associated rules are constructed as illustrated in Examples 4.2 and 4.3. 7 Karkare, Khedker and Sanyal Example 4.2 Consider the following constraint from Example 4.1: 1 1 Iapp = {ε} ∪ {1} · Iapp 1 i and the productions with right hand sides directly derived We add non-terminal hIapp from the constraints: 1 i → ε | 1hI 1 i hIapp app The productions generated from other constraints of Example 4.1 are: 1 1 hDapp i → 00̄ | 1hDapp i1̄ 2 i → hI 2 i hIapp app 2 2 hDapp i → ε | hDapp i1̄ These productions describe the transfer functions of app. ✷ The liveness environment at each program point can be represented as a CFG with a start symbol for every variable. To do so, the analysis starts with hSpgm i, the non-terminal describing the liveness pattern of the result of the program, σpgm . The productions for hSpgm i are: hSpgm i → ε | 0hSpgm i | 1hSpgm i Example 4.3 Let Sπv denote the non-terminal generating liveness access patterns associated with a variable v at program point π. For the program of Figure 1: hSπw14 i → ε | 1 | 10 | 100hSpgm i 2 i | hD 2 2 2 2 hSπz 12 i → hIapp app i | hDapp i1 | hDapp i10 | hDapp i100hSpgm i 1 1 1 1 i | hD 1 hSπy12 i → hIapp app i | hDapp i1 | hDapp i10 | hDapp i100hSpgm i ✷ The access patterns in the access paths used for nullification are in canonical form but the access patterns described by the CFGs resulting out of our analysis are not. It is not obvious how to check the membership of a canonical access pattern in such CFGs. To solve this problem, we need equivalent CFGs such that if α belongs to an original ⋆ CFG and α → β, where β is in canonical form, then β belongs to the corresponding new CFG. Directly converting the reduction rules (Equations (1, 2, 3)) into productions and adding it to the grammar results in unrestricted grammar [11]. To simplify the problem, we approximate original CFGs by non-deterministic finite automata (NFAs) and eliminate 0̄ and 1̄ from the NFAs. 4.2 Approximating CFGs using NFAs The conversion of a CFG G to an approximate NFA N should be safe in that the language accepted by N should be a superset of the language accepted by G. We use the algorithm described by Mohri and Nederhof [18]. The algorithm transforms a CFG to a restricted form called strongly regular CFG which can be converted easily to a finite automaton. Example 4.4 We show the approximate NFAs for each of the non-terminals in Example 4.2 and Example 4.3. 1 0 hSpgm i: start 1 i: hIapp 1 8 start Karkare, Khedker and Sanyal 1̄ 1 1 hDapp i: start 0 1̄ 0̄ 2 hDapp i: 1̄ 0 hSπw14 i: start 1 start 0 0̄ hSπz 12 i : start 0 1 0 0 1 1̄ 1 hSπy12 i: 0 0 start 1 0 1 0 0 1 2 i. This is because the least solution of the equaNote that there is no automaton for hIapp 2 i → hI 2 i is 0. 1 / Also, the language accepted by the automaton for Dapp tion hIapp is app approximate as it does not ensure that there is an equal number of 1 and 1̄ in the strings 1 generated by rules for hDapp i. ✷ 4.3 Eliminating 0̄ and 1̄ from NFA We now describe how to convert an NFA with transitions on symbols 0̄ and 1̄ to an equivalent NFA without any transitions on these symbols. Input: An NFA N with underlying alphabet {0, 1, 0̄, 1̄} accepting a set of access patterns Output: An NFA N with underlying alphabet {0, 1} accepting the equivalent set of canonical access patterns Steps: i←0 N0 ← Equivalent NFA of N without ε-moves [11] do { N′i+1 ← Ni foreach state q in Ni such that q has an incoming edge from q′ with label 0̄ and outgoing edge to q′′ with label 0 { /⋆ bypass 0̄0 using ε ⋆/ add an edge in N′i+1 from q′ to q′′ with label ε. } foreach state q in Ni such that q has an incoming edge from q′ with label 1̄ and outgoing edge to q′′ with label 1 { /⋆ bypass 1̄1 using ε ⋆/ add an edge in N′i+1 from q′ to q′′ with label ε. } Ni+1 ← Equivalent NFA of N′i+1 without ε-moves i ← i+1 } while (Ni 6= Ni−1 ) N ← Ni delete all edges with label 0̄ or 1̄ in N. The algorithm repeatedly introduces ε edges to bypass a pair of consecutive edges labeled 0̄0 or 1̄1. The process is continued till a fixed point is reached. When the fixed point is reached, the resulting NFA contains the canonical access patterns corresponding to all the 9 Karkare, Khedker and Sanyal access patterns in the original NFA. The access patterns not in canonical form are deleted by removing edges labeled 0̄ and 1̄. Note that by our reduction rules if α is accepted by ⋆ N and α → ⊥, then ⊥ should be accepted by N, However, N returned by our algorithm does not accept ⊥. This is not a problem because the access patterns which are tested for membership against N do not include ⊥ as well. Example 4.5 We show the elimination of 0̄ and 1̄ for the automata for hSπy12 i and hSπz 12 i. The automaton for hSπw14 i remains unchanged as it does not contain transitions on 0̄ and 1̄. The automata at the termination of the loop in the algorithm are: 1̄ 1 hSπy12 i: start 0 0̄ 0 0 0 1 0 0 1 1̄ hSπz 12 i : start 0 0 0 1 0 1 Eliminating the edges labeled 0̄ and 1̄, and removing the dead states gives: 1 hSπy12 i: start 0 0 0 0 hSπz 12 i : start 0 1 0 0 1 1 The language accepted by these automata represent the live access paths corresponding to y and z at π12 . ✷ We now prove the termination and correctness of our algorithm. Termination Termination of the algorithm follows from the fact that every iteration of do-while loop adds new edges to the NFA, while old edges are not deleted. Since no new states are added to NFA, only a fixed number of edges can be added before we reach a fix point. Correctness The sequence of obtaining N from N can be viewed as follows, with Nm denoting the NFA at the termination of while loop: N deletion of ε-edges N0 addition of ε-edges N′1 deletion of ε-edges N1 addition ··· addition of ε-edges of ε-edges deletion of Nm N 0̄, 1̄ edges N′i deletion of ε-edges Ni · · · deletion of ε-edges Nm Then, the languages accepted by these NFAs have the following relation: L(N) = L(N0 ) ⊆ L(N′1 ) = L(N1 ) ⊆ · · · ⊆ L(N′i ) = L(Ni ) ⊆ · · · = L(Nm ) L(N) ⊆ L(Nm ) We first prove that the addition of ε-edges in the while loop does not add any new information, i.e. any access pattern accepted by the NFA after the addition of ε-edges is a reduced version of some access pattern existing in the NFA before the addition of ε-edges. 10 Karkare, Khedker and Sanyal Lemma 4.6 for i > 0, if α ∈ L(Ni ) then there exists α′ ∈ L(Ni−1 ) such that α′ → α. ⋆ Proof. As L(Ni ) = L(N′i ), we have α ∈ L(N′i ). Only difference between N′i and Ni−1 is that N′i contains some extra ε-edges. Thus, any ε-edge free path in N′i is also in Ni−1 . Consider a path p in N′i that accepts α. Assume the number of ε edges in p is k. The proof is by induction on k. (BASE) k = 0, i.e. p does not contains any ε-edge: As the path p is ε-edge free, it must be ⋆ present in Ni−1 . Thus, Ni−1 also accepts α. α → α. (HYPOTHESIS) For any α ∈ L(Ni ) with accepting path p having less than k ε-edges there ⋆ exists α′ ∈ L(Ni−1 ) such that α′ → α. (INDUCTION) p contains k ε-edges e1 , . . . , ek : Assume e1 connects states q′ and q′′ in N′i . By construction, there exists a state q in N′i such that there is an edge e′1 from q′ to q with label 0̄(1̄) and an edge e′′1 from q to q′′ with label 0(1) in N′i . Replace e1 by e′1 e′′1 in p to get a 1 new path p′′ in N′i . Let α′′ be the access pattern accepted by p′′ . Clearly, α′′ → α. Since p′′ has k − 1 ε-edges, α′′ is accepted by N′i along a path (p′′ ) that has less than k ε-edges. By 1 induction hypothesis, we have α′ ∈ L(Ni−1 ) such that α′ → α′′ . This along with α′′ → α ⋆ ✷ gives α′ → α. ⋆ Corollary 4.7 for each α ∈ L(Nm ), there exists α′ ∈ L(N) such that α′ → α. ⋆ Proof. The proof is by induction on m, and using Lemma 4.6. ✷ The following lemma shows that the the language accepted by Nm is closed with respect to reduction of access patterns. Lemma 4.8 For α ∈ L(Nm ), if α → α′ and α′ 6= ⊥, then α′ ∈ L(Nm ). ⋆ k Proof. Assume α → α′ . The Proof is by induction on k, number of steps in reduction. 0 (BASE) case k = 0 is trivial as α → α. k−1 (HYPOTHESIS) Assume that for α ∈ L(Nm ), if α → α′ , then α′ ∈ L(Nm ). k k−1 1 (INDUCTION) α ∈ L(Nm ), α → α′ . There exists α′′ such that: α → α′′ → α′ . By induction hypothesis, we have α′′ ∈ L(Nm ). 1 For α′′ → α′ to hold we must have α′′ = α1 0̄0α2 and α′ = α1 α2 , or α′′ = α1 1̄1α2 and α′ = α1 α2 . Consider the case when α′′ = α1 0̄0α2 . Any path in Nm accepting α′′ must have the following structure (The states shown separately may not necessarily be different): start q0 α1 q′ 0̄ q 0 q′′ α2 qF As Nm is the fixed point NFA for the iteration process described in the algorithm, adding an ε-edge between states q′ and q′′ will not change the language accepted by Nm . But, the access pattern accepted after adding an ε-edge is α1 α2 = α′ . Thus, α′ ∈ L(Nm ). The case when α′′ = α1 1̄1α2 is identical. ✷ Corollary 4.9 For α ∈ L(N), if α → α′ and α′ 6= ⊥, then α′ ∈ L(Nm ). ⋆ Proof. L(N) ⊆ L(Nm ) ⇒ α ∈ L(Nm ). The proof follows from Lemma 4.8. ✷ The following theorem asserts the equivalence of N and N with respect to the equivalence of access patterns, i.e. every access pattern in N has an equivalent canonical access 11 Karkare, Khedker and Sanyal pattern in N, and for every canonical access pattern in N, there exists an equivalent access pattern in N. Theorem 4.10 Let N be an NFA with underlying alphabet {0, 1, 0̄, 1̄}. Let NFA N be the NFA with underlying alphabet {0, 1} returned by the algorithm. Then, (i) if α ∈ L(N), β is a canonical access pattern such that α → β and β 6= ⊥, then β ∈ L(N). ⋆ (ii) if β ∈ L(N) then there exists an access pattern α ∈ L(N) such that α → β. ⋆ Proof. (i) From Corollary 4.9: α ∈ L(N), α → β and β 6= ⊥ ⇒ β ∈ L(Nm ). As β is in canonical form, the path accepting β in Nm consists of edges labeled 0 and 1 only. The same path exists in N. Thus N also accepts β ⇒ β ∈ L(N). ⋆ (ii) L(N) ⊆ L(Nm ) ⇒ β ∈ L(Nm ). Using Corollary 4.7, there exists α ∈ L(N) such that ⋆ α → β. ✷ 5 An Application of Liveness Analysis The result of liveness analysis can be used to decide whether a given access path v.α can be nullified at a given program point π. Let the link corresponding to v.α in the memory graph be l. A naive approach is to nullify v.α if it does not belongs to the liveness environment at π. However, the approach is not safe because of two reasons: (a) The link l may be used beyond π through an alias, and may therefore be live. (b) a link l ′ in the access path from the root variable v to l may have been created along one execution path but not along another. Since the nullification of v.α requires the link l ′ to be dereferenced, a run time exception may occur. To solve the first problem, we need an alias analysis phase to detect sharing of links among access paths. A link in the memory graph can be nullified at π if none of the access paths sharing it are live at π . To solve the second problem, we need an availability analysis phase. It detects whether all links in the access path have been created along all execution paths reaching π. The results of these analysis are used to filter out those access paths whose nullification may be unsafe. We do not address the descriptions of these analyses in this paper. 6 Related Work In this paper, we have described a static analysis for inferring dead references in first order functional programs. We employ a context free grammar based abstraction for the heap. This is in the spirit of the work by Jones and Muchnick [13] for functional programs. The existing literature related to improving memory efficiency of programs can be categorized as follows: Compile time reuse. The method by Barth [2] detects memory cells with zero reference count and reallocates them for further use in the program. Jones and Le Metayer [15] describe a sharing analysis based garbage collection for reusing of cells. Their analysis incorporates liveness information: A cell is collected even when it is shared provided expressions sharing it do not need it for their evaluation. 12 Karkare, Khedker and Sanyal Explicit reclamation. Shaham et. al. [25] use an automaton called heap safety automaton to model safety of inserting a free statement at a given program point. The analysis is based on shape analysis [20,21] and is very precise. The disadvantage of the analysis is that it is very inefficient and takes large time even for toy programs. Free-Me [7] combines a lightweight pointer analysis with liveness information that detects when short-lived objects die and insert statements to free such objects. The analysis is simpler and cheaper as the scope is limited. The analysis described by Inoue et. al. [12] detects the scope (function) out of which a cell becomes unreachable, and claims the cell using an explicit reclaim procedure whenever the execution goes out of that scope. Like our method, the result of their analysis is also represented using CFGs. The main difference between their work and ours is that we detect and nullify dead links at any point of the program, while they detect and collect objects that are unreachable at function boundaries. Cherem and Rugina [5] use a shape analysis framework [8] to analyze a single heap cell at a time for deallocation. However, multiple iterations of the analysis and the optimization steps are required, since freeing a cell might result in opportunities for more deallocations. Making dead objects unreachable. The most popular approach to make dead objects unreachable is to identify live variables in the program to reduce the root set to only the live reference variables [1]. The major drawback of this approach is that all heap objects reachable from the live root variables are considered live, even if some of them may not be used by the program. Escape analysis [3,4,6] based approaches discover objects escaping a procedure (an escaping object being an object whose lifetimes outlives the procedure that created it). All non-escaping objects are allocated on stack, thus becoming unreachable whenever the creating procedure exits. In Region based garbage collection [9], a static analysis called region inference [26] is used to identify regions that are storage for objects. Normal memory blocks can be allocated at any point in time; they are always allocated in a particular region and are deallocated at the end of that region’s lifetime. Approaches based on escape analysis and region inference detect garbage only at the boundaries of certain predefined areas of the program. In our previous work [17], we have used bounded abstractions of access paths called access graphs to describe the liveness of memory links in imperative programs and have used this information to nullify dead links. A related work due to Heine and Lam [10] attempts to find potential memory leaks in C/C++ programs by detecting the earliest point in a program when an object becomes unreachable. 7 Conclusions In this paper we presented a technique to compute liveness of heap data in functional programs. This information could be used to nullify links in heap memory to improve garbage collection. We have abstracted the liveness information in the form of a CFG, which is then converted to NFAs. This conversion implies some imprecision. We present a novel way to simplify the NFAs so they directly describe paths in the heap. Unlike the method described by Inoue et. al. [12], our simplification does not cause any imprecision. In future, we intend to take this method to its logical conclusion by addressing the issue of nullification. This would require us to perform alias analysis which we feel can be done in a similar fashion. We also feel that with minor modification our method can be used for dead code elimination and intend to extend our analysis to higher order languages. 13 Karkare, Khedker and Sanyal References [1] Agesen, O., D. Detlefs and J. E. Moss, Garbage collection and local variable type-precision and liveness in Java virtual machines, in: PLDI ’98: Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation (1998), pp. 269–279. [2] Barth, J. M., Shifting garbage collection overhead to compile time, Commun. ACM 20 (1977), pp. 513–518. [3] Blanchet, B., Escape analysis for object-oriented languages: application to Java, in: OOPSLA ’99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (1999), pp. 20–34. [4] Blanchet, B., Escape analysis for JavaT M : Theory and practice, ACM Transactions on Programming Languages and Systems 25 (2003), pp. 713–775. [5] Cherem, S. and R. Rugina, Compile-time deallocation of individual objects, in: ISMM ’06: Proceedings of the 2006 international symposium on Memory management (2006), pp. 138–149. [6] Choi, J.-D., M. Gupta, M. Serrano, V. C. Sreedhar and S. Midkiff, Escape analysis for Java, in: OOPSLA ’99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (1999), pp. 1–19. [7] Guyer, S. Z., K. S. McKinley and D. Frampton, Free-me: a static analysis for automatic individual object reclamation, in: PLDI ’06: Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation (2006), pp. 364–375. [8] Hackett, B. and R. Rugina, Region-based shape analysis with tracked locations, in: POPL ’05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages (2005), pp. 310–323. [9] Hallenberg, N., M. Elsman and M. Tofte, Combining region inference and garbage collection, in: PLDI ’02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation (2002), pp. 141–152. [10] Heine, D. L. and M. S. Lam, A practical flow-sensitive and context-sensitive c and c++ memory leak detector, in: PLDI ’03: Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation (2003), pp. 168–181. [11] Hopcroft, J. E. and J. D. Ullman, “Introduction To Automata Theory, Languages, And Computation,” Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1990. [12] Inoue, K., H. Seki and H. Yagi, Analysis of functional programs to detect run-time garbage cells, ACM Trans. Program. Lang. Syst. 10 (1988), pp. 555–578. [13] Jones, N. D. and S. S. Muchnick, Flow analysis and optimization of lisp-like structures, in: POPL ’79: Proceedings of the 6th ACM SIGACT-SIGPLAN symposium on Principles of programming languages (1979), pp. 244–256. [14] Jones, R. and R. Lins, “Garbage collection: algorithms for automatic dynamic memory management,” John Wiley & Sons, Inc., New York, NY, USA, 1996. [15] Jones, S. B. and D. L. Metayer, Compile-time garbage collection by sharing analysis, in: FPCA ’89: Proceedings of the fourth international conference on Functional programming languages and computer architecture (1989), pp. 54–74. [16] Karkare, A., A. Sanyal and U. Khedker, Effectiveness of garbage collection in MIT/GNU scheme, http://arxiv.org/abs/cs/0611093 (2006). [17] Khedker, U., A. Sanyal and A. Karkare, Heap reference analysis using access graphs, Submitted to ACM Transactions on Programming Languages and Systems, copy available at http://arxiv.org/abs/cs.PL/0608104 (2006). [18] Mohri, M. and M.-J. Nederhof, Regular approximation of context-free grammars through transformation, in: J.-C. Junqua and G. van Noord, editors, Robustness in Language and Speech Technology, Kluwer Academic Publishers, Dordrecht, 2000 pp. 251–261. [19] Röjemo, N. and C. Runciman, Lag, drag, void and use—heap profiling and space-efficient compilation revisited, in: ICFP ’96: Proceedings of the first ACM SIGPLAN international conference on Functional programming (1996), pp. 34–41. [20] Sagiv, M., T. Reps and R. Wilhelm, Parametric shape analysis via 3-valued logic, in: POPL ’99: Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages (1999), pp. 105–118. [21] Sagiv, M., T. Reps and R. Wilhelm, Parametric shape analysis via 3-valued logic, ACM Transactions on Programming Languages and Systems 24 (2002), pp. 217–298. [22] Shaham, R., E. K. Kolodner and M. Sagiv, On the effectiveness of gc in java, in: ISMM ’00: Proceedings of the 2nd international symposium on Memory management (2000), pp. 12–17. [23] Shaham, R., E. K. Kolodner and M. Sagiv, Heap profiling for space-efficient java, in: PLDI ’01: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation (2001), pp. 104–113. [24] Shaham, R., E. K. Kolodner and M. Sagiv, Estimating the impact of heap liveness information on space consumption in Java, in: ISMM ’02: Proceedings of the 3rd international symposium on Memory management (2002), pp. 64–75. [25] Shaham, R., E. Yahav, E. K. Kolodner and M. Sagiv, Establishing local temporal heap safety properties with applications to compile-time memory management, Sci. Comput. Program. 58 (2005), pp. 264–289. [26] Tofte, M. and L. Birkedal, A region inference algorithm, ACM Transactions on Programming Languages and Systems 20 (1998), pp. 724–767. 14 A Live Access Patterns Liveness Environment Liveness Environment Point for e at π after e at π (π) (σ) (L ) π1 π4 15 π5 π7 π8 π9 ) ( 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), ) ( 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), ) 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), ) ( 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), ) ( 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), ) ( 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), ) ( 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), 0/ {ε} ( {ε} ( σ ( 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), 2 list2.(σ ∪ X F app ({1̄} · σ)) 2 list2.(σ ∪ X F app ({1̄} · σ)) 2 list2.X F app ({1̄} · σ) 0/ σ {0̄} · σ ( {ε} ∪ {00̄} · σ ( {1̄} · σ X F app ({1̄} · σ) 1 1 list1.{1} · X F app ({1̄} · σ), 2 list2.X F app ({1̄} · σ) 1 list1.{1} · X F app ({1̄} · σ), 2 list2.X F app ({1̄} · σ) 2 list2.(σ ∪ X F app ({1̄} · σ)) 2 list2.(σ ∪ X F app ({1̄} · σ)) 2 list2.(σ ∪ X F app ({1̄} · σ)) 2 list2.X F app ({1̄} · σ) 2 list2.X F app ({1̄} · σ) 2 list2.X F app ({1̄} · σ) 0/ ( 1 list1.{1} · X F app ({1̄} · σ), ) {list2.X F app ({1̄} · σ)} ( 1 list1.{1} · X F app ({1̄} · σ), ) ( 1 list1.{1} · X F app ({1̄} · σ), 2 π10 {1} · X F app ({1̄} · σ) {list2.X F app ({1̄} · σ)} π11 2 X F app ({1̄} · σ) 0/ 2 2 list2.(σ ∪ X F app ({1̄} · σ)) 2 2 list2.X F app ({1̄} · σ) 2 list2.X F app ({1̄} · σ) 2 list2.X F app ({1̄} · σ) 2 {list2.X F app ({1̄} · σ)} ) ) ) ) ) ) Karkare, Khedker and Sanyal π3 π6 1 list1.({ε} ∪ {00̄} · σ ∪ {1} · X F app ({1̄} · σ)), σ π2 (X E (e, σ, L )) ( Computation of Liveness for app Program
6cs.PL
Exact 3D seismic data reconstruction using Tubal-Alt-Min algorithm Feng Qian1 , Quan Chen2 , Ming-Jun Su3 , Guang-Min Hu2 , Xiao-Yang Liu∗ 1 Center of Information Geoscience, University of Electronic Science and Technology of China, 2 School of Rresources and Environment, University of Electronic Science and Technology of China, 3 PetroChina Research Institute of Petroleum Exploration and Development (RIPED)-Northwest, Lanzhou, China, ∗ Department of Electrical Engineering, Columbia University, NY, USA arXiv:1704.02445v1 [cs.CE] 8 Apr 2017 SUMMARY Data missing is an common issue in seismic data, and many methods have been proposed to solve it. In this paper, we present the low-tubal-rank tensor model and a novel tensor completion algorithm to recover 3D seismic data. This is a fast iterative algorithm, called Tubal-Alt-Min which completes our 3D seismic data by exploiting the low-tubal-rank property expressed as the product of two much smaller tensors. TubalAlt-Min alternates between estimating those two tensor using least squares minimization. We evaluate its reconstruction performance both on synthetic seismic data and land data survey. The experimental results show that compared with the tensor nuclear norm minimization algorithm, Tubal-Alt-Min improves the reconstruction error by orders of magnitude. INTRODUCTION Seismic data quality is vital to various geophysical processing. However, due to the financial and physical constraints, the real seismic survey data are usually incomplete. Seismic data reconstruction is a complex problem, and a large number of researchers have devoted themselves to the research of this field. Consequently, many approaches have been proposed to handle this problem. From the point of view of data organization, these methods can be divided into two categories. The low dimensional based methods, such as transform-based methods which utilize the properties of the seismic trace in an auxiliary domain (Hennenfent et al., 2010). Liner prediction theory use the predictability of the signal in the f-x or t-x domain (Naghizadeh and Sacchi, 2007). And methods which exploit the low-rank nature of seismic data embedded in Hankel matrices (Oropeza and Sacchi, 2011). Those low dimensional based methods usually ignores the spatial structure of the seismic traces. While the spatial structure coherence is very important for the seismic data completion, hence recent developments in high dimensional tensor completion approaches exploit various tensor decomposition model are widely used in seismic data reconstruction (Kreimer et al., 2013; Ely et al., 2015a). Those high-order tensor decomposition approaches have became a trend for seismic data completion, and the exist different definitions for tensor decomposition that lead to different tensor completion model, i.e. the higher-order singular value decomposition (HOSVD) (Kreimer and Sacchi, 2011), the tuker decomposition (Da Silva and Herrmann, 2013), and tensor SVD (tSVD) decomposition (Ely et al., 2015b). In this paper, we focus on a new seismic data reconstruction algorithm which based on low-tubal-rank tensor decomposition model possesses extremely high precision seismic data recovery performance. Because of the high redundancy or coherence between one seismic trace to the others (Ely et al., 2015a), we assume that the fulled sampled seismic volume has low-tubal-rank property in the tSVD domain. Therefore, we can solve the seismic tensor completion problem through an alternating minimization algorithm for low-tubal-rank tensor completion (Tubal-Alt-Min) (Liu et al., 2016a,b). We have evaluated the performance of this approach on both synthetic and field seismic data. NOTATIONS The data in seismic survey is a natural high-dimensional tensor, such as the 3D poststack seismic data which consists of one time or frequency dimension and two spatial dimensions corresponding to xline and inline directions. Throughout the paper, we denote those 3D seismic tensor in time domain by uppercase calligraphic letter, T ∈ Rm×n×k , and denote the frequency domain 3D seismic tensor by Te ∈ Rm×n×k correspondingly. Uppercase letter A ∈ Rm×n denotes matrix, and lowercase boldface letter x ∈ Rn denotes vector. Let [n] denotes the set {1, 2, . . . , n}. In addition, we introduce an important tensor operator t-product (Kilmer et al., 2013). t-product. The tensor-product T = X ∗ Y of X ∈ Rn1 ×n2 ×k n2 ×n3 ×k is a tensor of size n × n × k, T (i, j, :) = and 1 2 Pn2Y ∈ R s=1 X (i, s, :) ∗ Y(s, j, :), for i ∈ [n1 ] and j ∈ [n3 ]. PROBLEM SETUP From what we have stated above, we know that seismic data comprises many traces that provide a spatio-temporal sampling of the reflected wavefield. However, caused by various factors, such lost many important informations. Such as the exist of reservoir, residential or any other obstacle in the seismic data acquisition areas will lead to under-sampled seismic record. The missing traces will complicate certain data processing steps such as the prediction accuracy of underground reservoirs. Hence, the completion step in seismic data processing is of grate significance. In this paper, we explored the relationship between low-tubalrank and under-sampled rate firstly, and found that low-tubal property is positively correlated with the sampling rate. Figure 1 shows the detail experiment result. Base on this work, we as- Empirical CDF 100 SOLUTION 90 In the Tubal-Alt-Min algorithm, the target 3D seismic volume Tb ∈ Rm×n×k can be decomposed as Tb = X ∗ Y, X ∈ Rm×r×k , Y ∈ Rr×n×k , and r is the target tubal-rank. With this decomposition, the problem (1) reduces to 80 70 CDF 60 50 Tb = 40 20% sampling rate 40% sampling rate 60% sampling rate 80% sampling rate 100% sampling rate 30 20 10 10 20 30 40 50 60 70 80 90 kPΩ (T ) − PΩ (X ∗ Y)k2F . (2) This cost function can be solved by the alternating minimization algorithm for low tubal rank tensor completion designed by Liu. The main algorithm steps are showing as Alg 1. 0 0 argmin X ∈Rm×r×k ,Y∈Rr×n×k 100 Top portion of singular value % Figure 1: The empirical CDF of singular value. Alg. 1 Tubal Alternating Minimization: AM(PΩ (T ), Ω, L, r) Input: Observation set Ω ∈ [n] × [m] × [k] and the corresponding elements PΩ (T ) , number of iterations L, target tubal-rank r. 1: X0 ← Initialize(PΩ (T ), Ω, r), 2: Xe0 ← fft(X0 , [], 3), TeΩ ← fft(TΩ , [], 3), eΩ ← fft(PΩ , [], 3), P 3: for l = 1 to L do eΩ , Xel−1 , r ), el ← LS Y( TeΩ , P Y eΩ , Y el , r), Xel ← LS X( TeΩ , P 4: end for eL , [], 3), 5: X ← ifft( XeL , [], 3); Y ← ifft( Y The key problem of Alg. 1 is the tensor least square minimization, which was solved by the providing methods in Liu’s paper. The main ideal is to decompose (2) into n separate standard least squares minimization problem in the frequency domain. Then, we just need to solve a least square problem like the following form each step: b x = argmin kb − A1 A2 xk2F . (3) x∈Rrk×1 PERFORMANCE EVALUATION To evaluate the performance of the algorithm we adopted, two commonly used evaluation criteria in seismic data completion filed have been used for comparison - the reconstruction error and the convergence speed. • Reconstruction error: here we adopted the relative square error as a scale standard which defined as RSE = kTb − T kF /kT kF . Output: Pair of tensors ( X , Y ). sume that the full sampled seismic data volume has low-tubalrank property and under-sampled traces will increase the tubal rank. Therefore, the poststack 3D seismic data reconstruction can be tackled with tensor completion tools that using the low tubal rank property. The statement above transform to mathematical representation is that T ∈ Rm×n×k is a 3D seismic data with tubal-rank equal to r. Then, by observing a set Ω ⊂ Rm×n×k of T ’s elements, we get the under-sampled seismic data TΩ . Then, our aim is to recover T from TΩ . The tensor reconstruction problem can be formulated as following • Convergence speed: we measure decreasing rate of the RSE across iterations by linearly fitting the measured RSEs. In order to have an intuitive performance comparison, we compared with two other seismic data volume completion algorithm. The Parallel matrix factorization algorithm (PMF) (Gao et al., 2015) and the tensor singular value decomposition based algorithm, also called tensor nuclear norm algorithm (TNN) (Ely et al., 2015b) for seismic reconstruction. We applied those algorithm both on synthetic and real seismic data, the following subsections will demonstrate the detail performance comparison. optimization function: Tb = argmin rank(X ), X ∈Rm×n×k (1) s.t. PΩ (X ) = PΩ (T ). Here, PΩ (·) denote the projection of a tensor onto the observed set Ω, TΩ = PΩ (T ). The Tubal-Alt-Min algorithm proposed by Liu recently, which can complete the low tubal rank tensor with very high currency in several iterations is a perfect approach to solve this problem. Synthetic data example We use a Ricker wavelet with central frequency of 40 Hz to generate a simple 3D seismic model with two dipping planes. The seismic data corresponds to a spatial tensor of size 64 × 64 × 256, 256 time samples with the time sampling rate of 1 ms and 64 corresponding to inline and xline direction. Then, through tSVD decomposition we get U, S, and V. According to the decomposition result, we choose the first 2 tubes of S, and make other tubes elements equate to zeros, form a new b Then we get the tensor Tb = U ∗ Sb ∗ V which tubaltensor S. rank is 2. Reconstruction error RSE in log-scale 100 PMF TNN Tuabl-Alt-Min 10-5 10-10 10-15 (a) 0 10 20 30 40 50 60 70 80 90 (b) 100 Sampling rate % Trace number 0 20 40 60 0 Figure 2: Reconstruction error for the synthetic data set as a function of the downsampling rate. Time(ms) 50 Convergence speed 100 PMF TNN Tubal-Alt-Min 150 200 10-1 RSE in log-scale 100 250 10-2 (c) Figure 4: (a) Full sampled synthetic data. (b) Under-sampled measured data for the case when 40% of the traces in (a) was removed. (c) The recovered traces of (b), it’s RSE< 1e − 4. (d) The relative residual between (c) and (a), when sampling rate equal to 40%, there almost no residual between original data and reconstruction data. 10-3 10-4 (d) 0 10 20 30 40 50 60 70 80 Iterations Figure 3: Convergence speed for the three algorithms on synthetic data. Firstly, we apply Algorithm 1 to decompose the low-tuabl-rank tensor of our data set at different sampling rate vary from 5% to 95% and set the tubal-rank equate to 2. Using these decompositions, we generate our reconstructed data and compare the error between the low-tubal-rank reconstruction and full sampled data. Applying two other algorithm we stated above to reconstruct the data at the same condition. Because of all of the three algorithms include random sampling operator, we averaged those algorithms’ performance under 20 above experiments. Figure 2 shows the relative square error (RSE) of the three algorithms. From these curves, we see that the performance of our algorithm is very outstanding. Even there are only 30% sampling traces, it can also get a relative perfect reconstruction data. As the increase of sampling rate, the reconstruction error of Tubal-Alt-Min algorithm decrease rapidly. Comparing with TNN, when the sampling rate over 50%, it improves the recovery error by orders of magnitude. It’s recovery error also better than the other algorithm almost in the whole sampling rate range. Secondly, to evaluate the reconstruction error, we fixed the sa- mpling rate to be 40% and set the RSE tolerance of the three algorithms equal to 1e-4. Then evaluate relative square error and convergence speed for the three algorithms. Figure 3 shows that Tubal-Alt-Min convergence at 9th iteration, TNN-ADMM terminates at the 60-th iteration, PMF used 77-th iterations to reach the preset threshold. The convergence speed of our algorithm is obviously better than other algorithms. Then, we fixed the sampling rate at 40% to evaluate the completion performance on seismic data. The portion of reconstruction result shows in figure 4. From figure 4 (b), 4 (c) and 4 (d), we observe that the missing traces are effectively recovered. Filed data example We also test the performance of the reconstruction method on a land data set that was acquired to monitor a heavy oil field in Anyue mountain, China. Our test data is a 25 × 200 × 600 tensor cut from the full-sampled area of the filed data. On this basis, we randomly sample 50% traces in the seismic tensor, then reconstruct it. To reconstruct the traces, we evaluated the low-tubal-rank of the data manually. Determined by the tSVD, we found it’s first 16 eigentubes’s l2 norm is much larger than the rest in almost 40 times. Consequently, we set the parameter of Alg. 1 r = 16. Figure 4 shows portion of the result cut along inline direction. From the comparison of figure 5 (a), 5 (c) and Columns 100 Columns 150 200 50 100 100 200 200 Time(ms) Time(ms) 50 300 100 150 200 is that it can achieve very high recovery accuracy in several it- 300 400 400 500 500 (a) 600 600 (b) Columns 100 150 200 50 100 100 200 200 Time(ms) Time(ms) 50 (a) Columns 300 150 200 300 400 400 500 500 600 100 (b) 600 (c) (d) Figure 6: The reconstruction result of filed data. (a) The horizontal-slice of filed data from Anyue survey areas. (b) Randomly sampled 40% trances from (a). (c) The data recovered by Tubal-Alt-Min algorithm, it’s RSE reached 1e-7. (d) The data recovered by TNN whose RSE converged to 1e-3. (c) 5 (d), the reconstruction performance is such amazing that almost no residual between 5 (a) and 5 (c) Compared with the reconstruction result of TNN, it seems no difference. However, the RSE gap between them almost have a few orders of magnitude. Figure 5 shows the difference between the specific details of the seismic data traces restored by the two algorithms. Figure 7: The reconstruction traces of filed data. (a) The lateral-slices of filed data from Anyue survey areas. (b) Traces recovered by TNN. (c) Traces recovered by our algorithm. From the recovered traces in the blue rectangles, our algorithm has an obvious performance advantages, which can recover more details of the seismic traces. CONCLUSION In this article, we formulate the problem of poststack seismic data reconstruction as an low-tubal-rank decomposition problem. The adopted method is based on the alternating minimization approach for low-tubal rank tensor completion. The unknown low-tubal-rank tensor is parameterized as the product of two much smaller tensors with the low-tubal-rank property being automatically incorporated, and Tubal-Alt-Min alternates between estimating those two tensors using tensor least squares minimization. The biggest advantage of our algorithm erations. From the experimental result, it potently proved that compared with contrast algorithms our algorithm improves the recovery error by orders of magnitude with much better convergence speed for higher sampling rates. ACKNOWLEDGMENTS We would like to acknowledge financial support from the National Natural Science Foundation of China (Grant No.U1562218). REFERENCES Da Silva, C., and F. Herrmann, 2013, Hierarchical tucker tensor optimization-applications to 4d seismic data interpolation: Presented at the 75th EAGE Conference & Exhibition incorporating SPE EUROPEC 2013. Ely, G., S. Aeron, N. Hao, and M. E. Kilmer, 2015a, 5d and 4d pre-stack seismic data completion using tensor nuclear norm (tnn), in SEG Technical Program Expanded Abstracts 2013: Society of Exploration Geophysicists, 3639–3644. Ely, G. T., S. Aeron, N. Hao, and M. E. Kilmer, 2015b, 5d seismic data completion and denoising using a novel class of tensor decompositions: Geophysics, 80, V83–V95. Gao, J., A. Stanton, and M. D. Sacchi, 2015, Parallel matrix factorization algorithm and its application to 5d seismic reconstruction and denoising: Geophysics, 80, V173–V187. Hennenfent, G., L. Fenelon, and F. J. Herrmann, 2010, Nonequispaced curvelet transform for seismic data reconstruction: A sparsity-promoting approach: Geophysics, 75, WB203–WB210. Kilmer, M. E., K. Braman, N. Hao, and R. C. Hoover, 2013, Third-order tensors as operators on matrices: A theoretical and computational framework with applications in imaging: SIAM Journal on Matrix Analysis and Applications, 34, 148–172. Kreimer, N., and M. D. Sacchi, 2011, A tensor higher-order singular value decomposition (hosvd) for pre-stack simultaneous noise-reduction and interpolation: Seg Technical Program Expanded Abstracts, 3069–3074. Kreimer, N., A. Stanton, and M. D. Sacchi, 2013, Tensor completion based on nuclear norm minimization for 5d seismic data reconstruction: Geophysics, 78, V273–V284. Liu, X.-Y., S. Aeron, V. Aggarwal, and X. Wang, 2016a, Low-tubal-rank tensor completion using alternating minimization: SPIE Defense+ Security, International Society for Optics and Photonics, 984809–984809. ——–, 2016b, Low-tubal-rank tensor completion using alternating minimization: 9848, 984809. Naghizadeh, M., and M. D. Sacchi, 2007, Multistep autoregressive reconstruction of seismic records: Geophysics, 72, V111–V118. Oropeza, V., and M. Sacchi, 2011, Simultaneous seismic data denoising and reconstruction via multichannel singular spectrum analysis: Geophysics: Geophysics, 76, V25–V32.
5cs.CE
1 When Traffic Flow Prediction Meets Wireless Big Data Analytics arXiv:1709.08024v1 [cs.AI] 23 Sep 2017 Yuanfang Chen∗† , Mohsen Guizani‡ , Yan Zhang§ , Lei Wang¶ , Noel Crespi∗ , Gyu Myoung Leek ∗ Institut Mines-Télécom, Télécom SudParis, France † Department of Computer, Université Pierre et Marie CURIE, France ‡ Electrical and Computer Engineering, University of Idaho, USA § University of Oslo, Norway ¶ School of Software, Dalian University of Technology, Dalian, China k Liverpool John Moores University, Liverpool, UK Abstract—Traffic flow prediction is an important research issue for solving the traffic congestion problem in an Intelligent Transportation System (ITS). Traffic congestion is one of the most serious problems in a city, which can be predicted in advance by analyzing traffic flow patterns. Such prediction is possible by analyzing the real-time transportation data from correlative roads and vehicles. This article first gives a brief introduction to the transportation data, and surveys the state-ofthe-art prediction methods. Then, we verify whether or not the prediction performance is able to be improved by fitting actual data to optimize the parameters of the prediction model which is used to predict the traffic flow. Such verification is conducted by comparing the optimized time series prediction model with the normal time series prediction model. This means that in the era of big data, accurate use of the data becomes the focus of studying the traffic flow prediction to solve the congestion problem. Finally, experimental results of a case study are provided to verify the existence of such performance improvement, while the research challenges of this data-analytics-based prediction are presented and discussed. I. I NTRODUCTION Traffic flow prediction is an important research issue in an Intelligent Transportation System (ITS), and it can be used as an important metric to solve the traffic congestion problem. Traffic congestion is considered a serious problem in big cities around the world. In a study of 471 U.S. urban areas in 2014 [1], the extra energy cost due to the traffic congestion was estimated at $160 billion (3.1 billion gallons of fuel). In addition, long periods of traffic congestion force the release of more carbon dioxide (CO2 ) greenhouse gases into the atmosphere and increase the number of accidents. This can in turn produce severe public health risks which will dramatically increase medical treatments’ costs. Predicting traffic flow patterns can help reduce traffic congestion and therefore reduce the amount of CO2 emissions as well as save lives. A scenario of using traffic flow prediction to avoid traffic congestion is illustrated in Figure 1. Figure 1 illustrates a scenario: how to avoid congestion in an Intelligent Transportation System (ITS), and what can be achieved by avoiding congestion? In this scenario, the transportation and driving data are collected from various devices of the ITS. This data is then analyzed to help the navigation of vehicles. Meanwhile, other vehicles that are preparing to hit the road want to know the current traffic conditions to make a decision of: (i) whether to start the journey and when? and (ii) which routes can be used and which is the best? On this basis, the congestion can be reduced to achieve eco-friendly routing (low-carbon transportation). The traffic flow is predictable by analyzing the relevance of traffic conditions between different traffic roads, as shown in Figure 2. Figure 2 illustrates the possibility of knowing whether or not there is a potential congestion point in advance. Such knowledge is acquired by predicting the traffic flow for the specific route. This is due to the continuity of traffic flow among different traffic roads. It means that the flow of a traffic road comes from other roads that connect to it. It is possible to analyze the relevance of the traffic conditions between different traffic roads by tracing the change of the traffic flow, and such tracing can be achieved by analyzing the real-time transportation data submitted by the wireless devices embedded into the vehicles and road side units (RSUs) installed in the correlative roads [2]. The trajectory data of vehicles (a kind of transportation data) is the most commonly used by the traffic flow prediction. Trajectories provide important information on the mobility of vehicles, where the moving pattern of vehicles characterizes the traffic flow of a transportation system. The trajectory data of vehicles is becoming easily available in current transportation systems due to the prevalence of the global positioning system (GPS) and other localization technologies. A trajectory generated by a moving vehicle is usually described by a temporal sequence of spatial locations with their timestamps. These trajectories convey underlying information about how the traffic flow of the transportation system changes. From the traffic congestion problem to traffic flow prediction, and then further to this kind of transportation data: trajectory, the research issue becomes how to analyze and mine the trajectory data to solve the congestion problem. Analyzing and mining trajectory data can extract and reveal inherent information or knowledge about potential congestion. It will benefit broad applications, for example, (i) it is possible to reduce exhaust emission by congestion knowledge based path planning to enhance the level of public health; (ii) improving the public security in transportation systems is possible by 2 To Achieve Eco-friendly Routing (eRouting): Reducing Congestion eRouting is based on analyzing transportation data Navigation System Transportation and driving data Smart Parking [Big Data Analytics] based This system helps to implement the eco-friendly routing Navigation by analyzing real-time data Depart? but when and which routes? Fig. 1: Traffic congestion avoidance. This scenario shows how to avoid congestion by analyzing transportation data, where the data comes from? where does the data go? how the data is used? and what can be achieved by analyzing the data? Transportation Planning City Planning Transportation Controlling City Management Applications Prediction-Supportive Knowledge Time-Series Model Deep Learning based Predictor Markov Chain Model Combination of NNs (Neural Networks) and ARIMA Prediction: Analysis and Mining: Deep Learning, Classification, Ranking, Regression Feature: Trajectories: Spatio-Temporal Data Availability: Time Sequence Location Time Stamp Location Semantics Geographical Information Transportation Data: GPS, GSM, WiFi, Bluetooth, RFID Fig. 2: In this scenario, the traffic flow in an intersection is predictable. The traffic flow of the intersection comes from the traffic roads connecting at the intersection. avoiding the traffic accidents caused by congestion. Figure 3 illustrates the general framework of such data analytics based traffic flow prediction. Fig. 3: General framework of data analytics based traffic flow prediction. The general framework consists of three modules: (i) data collection module: transportation data is able to be collected from vehicle-mounted GPS, GSM, WiFi, Bluetooth and RFID, for example, sharing bikes can be embedded GPS, GSM, WiFi, Bluetooth, and even RFID to track and record: when and where the bikes are shared, and the traveling trajectories of these bikes. The trajectory is a kind of spatio-temporal data, and this kind of data is with the time sequence feature. In such data, this information is available: location, location semantics, geographical information and time stamp; (ii) data 3 analytics based prediction module: the collected transportation data is analyzed by deep learning, classification, ranking and regression to acquire useful knowledge as the basis of traffic flow prediction. These four technologies are able to be used to conduct the data analytics based prediction: time-series model, deep learning based predictor, markov chain model, and combination of Neural Networks (NNs) and Autoregressive Integrated Moving Average (ARIMA); and (iii) application module: the predicted results are able to be used to support many special applications to improve the life experience in cities, for example, transportation planning, transportation controlling, city planning, and city management. II. T RANSPORTATION DATA What is transportation data and what kind of transportation data is used in this article? What is transportation data? Transportation data is a kind of data that describes the information related to transportation systems, and it contains various vehicle and road information, e.g., the trajectory and speed information of vehicles, and the length information of traffic roads. It is helpful to improve the performance of transportation related applications by analyzing such data, for example, (i) traffic flow prediction; it is the attempt to estimate the number of vehicles that will travel on the traffic roads of a transportation system in the future. This prediction enables us to understand and develop an optimal transportation system with efficient movement of traffic. It will also allow us to minimize the traffic congestion by designing optimal overall route planning for vehicles based on the predicted traffic flow. The flow of a traffic road has a connection with the flows of prior roads which are connected to this traffic road. It means that it is possible to predict the flow of the current traffic road by calculating the potential fractional flows from the prior roads and the previous time period. The potential fractional flow is able to be calculated by analyzing the transportation data (the trajectory and speed data of vehicles); (ii) transportation planning; it is the process of defining the future design for transportation systems to prepare for the future needs on moving people and goods to destinations. In this application, it is possible to acquire the underlying knowledge of transportation systems by mining the transportation data from the systems. With the acquired knowledge, the transportation planning will be more reasonable. What kind of transportation data is used in this article? In this study, trajectory data of vehicles is used, which is a kind of series transportation data. This data can be used to calculate and predict the traffic flow of a transportation system. It is collected from the transportation system in England. This transportation system has 2501 traffic roads1 covering 300 miles of England highways and arterial roads, which is illustrated in Figure 4. The important part of trajectory data is the location information. With the location information, trajectory data can provide actual semantics to make such data be used by traffic flow prediction. Flow information of a traffic road is acquired by 1A two-way highway/arterial road is counted as two traffic roads. Fig. 4: Flow information of traffic roads is acquired by analyzing the trajectory data of the vehicles driving on these traffic roads. The update period of this information is 15 minutes. Highways and arterial roads are marked by different color depths, and the deeper color denotes the heavier traffic load on the corresponding road. counting the number of vehicles being driven on the current road. So in trajectory data, the location information is required to filter out the vehicle driving records on the current road rather than other roads. Moreover, for traffic flow prediction, the traffic flow of the current road converges from the traffic flow of prior roads. So the location information becomes important to track the traffic flow changes. Trajectory data relies on localization technology to provide location information. The commonly used measurement methods of localization to generate location-containing trajectory data include GPS, WiFi, GSM, Bluetooth, and RFID. III. S TATE - OF - THE - ART P REDICTION M ETHODS Many kinds of techniques have been proposed to address the traffic flow prediction problem. The details are summarized in the following literature list. Many specific methods have been proposed to make prediction in different situations, and it emerges that traditionally there is no single best method for every situation. It is better to combine several suitable techniques to improve the accuracy of prediction under considering different situations. It means that the traditional traffic flow prediction methods are not able to satisfy most real-world application requirements. During the last five years, some studies have tried to use data analytics to solve the traffic flow prediction problem, and the results demonstrate that such schemes are feasible and are able to 4 Techniques Typical Works and Advantages Bayesian Networks [3] this work presented a spatio-temporal Bayesian network predictor. This work employed the Gaussian Mixture Model and the Competitive Expectation Maximization algorithm in order to approximate the joint probability distribution of the nodes in the Bayesian network. [4] this work proposed a model: (i) this model has the ability to create a Bayesian network to the traffic flow on a given road at a given time; (ii) this model has an ability to cope with the data-incomplete problem. [5] the technique of the traffic prediction, which was presented in this work, used the capability of traffic flows to reproduce the real behavior of vehicles and to construct the Gaussian Bayesian network employing the special characteristics of the variables of the traffic flow. [6] this work utilized a linear conditional Gaussian Bayesian Network (BN) model to consider the impacts of both spatial and temporal dimensions of traffic as well as speed information for short-term traffic flow prediction. Neural Networks [7] this work proposed a method to make short-term prediction based on Neural Networks (NNs). [8] this work provided a traffic flow predictor based on the architecture of fuzzy neural networks. Time-Series Models [9] the statistical time-series model, ARIMA is fitted to time series data either to better understand the data or to predict future points in the series. The ARIMA model is not suited for the prediction which is based on this kind of data: (i) there is the information missing problem in the data, and (ii) the filling of data is problematic as the situation is complex. [10] this work presented the theoretical basis for modelling univariate traffic conditions as Seasonal Autoregressive Integrated Moving Average (SARIMA) processes. Fitted SARIMA models provide equations which can be used to produce single and multiple interval prediction. [11] the focus in this work was on producing time-series state space models which are flexible and explicitly multivariate. The models enable to jointly consider the data from different detectors, and are able to model a wide variety of univariate models, for instance, ARIMA. The results were compared to those achieved from the ARIMA model and were found to be superior. Kalman Filtering Theory [12] this work investigated the performance of the adaptive Kalman Filter for short-term traffic flow prediction. Moreover, this work presented the empirical results from the application of the adaptive Kalman Filter to real-world data. Kalman Filtering is applicable to short-term stationary or non-stationary stochastic phenomena and it yields good traffic prediction accuracy. Markov Chain Model [13] this work modelled the traffic flow as a high-ordered Markov Chain. The method proposed in this work employs current and recent values of the traffic flow, and describes the future value. This future value is assumed that the predicted state has a probability distribution, and both current state and most recent states determine the next state. Combination of NNs and ARIMA [14] this work proposed a hybrid model combining NNs and ARIMA, which is capable of exploiting the strengths of traditional time series approaches and artificial neural networks. Deep Learning based Predictor [15] this work proposed a deep learning based traffic flow prediction method, which considers the spatial and temporal inherent correlations of traffic records. improve the accuracy of prediction, as the method proposed in [15]. Such kind of data analytics based prediction method is able to satisfy the requirements of different applications by analyzing the data from each corresponding specific applica- tion. IV. P ERFORMANCE C OMPARISON This section compares the performance of two kinds of time series prediction models: (i) optimized time series prediction 5 model, and (ii) normal time series prediction model. To verify this fact: the prediction performance of a prediction model can be improved by fitting data to optimize model parameters. ARIMA model is used in this study to make this verification. Predicting a stationary time series by ARIMA depends on the parameters (p, d, q) of the ARIMA: • The parameter p is the number of Auto-Regressive (AR) terms, for example, if p is 5, the predictors for x(t) will be x(t − 1), ..., x(t − 5); • The parameter q is the number of Moving Average (MA) terms. MA terms are lagged prediction errors in the prediction equation, for example, if q is 5, the predictors for x(t) will have such lagged prediction errors e(t − 1), ..., e(t − 5), where e(i) is the difference between the moving average and the actual value at the ith instant. • The parameter d is the number of differences when the time series becomes stable. An important concern here is how to determine the values of ‘p’ and ‘q’. Determining the values of ‘p’ and ‘q’ will affect the performance of the prediction model. This study uses Bayesian Information Criterion (BIC) to determine the optimum values of parameters ‘p’ and ‘q’ to avoid over-fitting, when fitting a model by training data. BIC is a criterion for model selection among a finite set of models, and the model with the lowest BIC value is preferred. It is based, in part, on the likelihood function. Comparative results are illustrated in Figure 5. Each line is the average of 2501 traffic roads. The RMSE of a model with respect to the “Traffic Flow” is defined as: the square root of the mean square error between the values actually observed and the values predicted by a model. The RMSE estimated from the optimized ARIMA is less than the estimated result from the normal ARIMA. The prediction accuracy of the time series model ARIMA is able to be obviously improved by optimizing relevant parameters. Figure 5a and Figure 5b illustrate the comparative results with the data of two selected dates, March 15th and 31st, 2015. For the RMSE, the optimized ARIMA is much better than the normal ARIMA. Figure 5c provides the average results for 31 days of March, 2015. On these basis, it is observed that improving the performance of a prediction model is possible by optimizing model parameters with analyzing sequential transportation data. V. R ESEARCH C HALLENGES The pattern prediction of traffic flow, which is supported by data analytics, strongly relies on the transportation data which records the vehicle mobility of transportation systems. Moreover, transportation data implies the underlying patterns and laws of the vehicle mobility. It means that the data is embedded with the rich information of the traffic dynamics of a city. Meanwhile, transportation information may cause privacy issues. This article classifies the research challenges of data analytics supportive traffic flow prediction, as shown in Figure 6. There are two important aspects for the research challenges of this kind of prediction: data and data based prediction. Data: i) Privacy Protection: it is necessary and important to protect the personal privacy information which is contained in transportation data. Such information includes the locations, driving trajectories, properties and vehicles’ plate numbers. It is a worthy research challenge to protect this information when the transportation data is analyzed to obtain useful information and knowledge. ii) Mobility: in transportation systems, understanding and predicting the patterns of mobility is the basis of studying and solving a variety of practical problems, e.g., traffic congestion problems. The mobility produces large amounts of spatio-temporal data, and this kind of data is accompanied with time and location information. It is a worthy research challenge to analyze the spatiotemporal data for learning and predicting the patterns of mobility. Moreover, traffic flow is an important reflection for the mobility in transportation systems. Therefore, traffic flow prediction is also an important and worthy research challenge. Analyzing the spatio-temporal data is another research challenge as the basis of understanding, learning and predicting the patterns of mobility and traffic flow. Spatio-temporal data is a kind of time series data. To analyze this kind of data, a time series analysis model is necessary, and for different applications, the objective functions are different because of the different requirements, and how to combine a time series analysis model with an objective function for special requirements is an important challenge that requires further investigation. iii) Vehicle: the vehicles in a transportation system produce large amounts of trajectory data. This kind of data can be used to mine vehicle behaviors and relations. If we know the behaviors of vehicles and the relations between these vehicles, it is possible to predict the change of traffic flow and then to avoid congestion by traffic control and management. For example, if there is congestion at a certain intersection and the relevant vehicles have the same destination, these vehicles have great possibility to use the same route, and the congestion will happen again at the next intersection, if there are no control measures in advance. Big Data: In these applications, “big data” can be achieved whether from “mobility” and/or from “vehicles”: (i) the mobility produces large amounts of spatio-temporal data, and (ii) the vehicles produce large amounts of trajectory data. Such “large amounts of” is a kind of “big”, and for analyzing this kind of data, big data analytics is needed. Such analytics is different from traditional data analysis. For example, deep learning and NNs can be used to analyze such big data, but how to learn such data to extract useful information and knowledge, and learning for what, are worthy challenges which need to be studied. Wireless Big Data: Most of the big data of an intelligent transportation system (the trajectory data of vehicles) is collected using wireless devices. These devices can be wireless sensor nodes which are embedded on the traffic 6 (a) Actual traffic flow data of March 15th, 2015, and the predicted results by normal and optimized ARIMA models. (b) Actual traffic flow data of March 31st, 2015, and the predicted results by normal and optimized ARIMA models. (c) Average results for 31 days of March: actual traffic flow and the predicted results by normal and optimized ARIMA models. Fig. 5: Comparing with the normal ARIMA, optimized ARIMA achieves better prediction results in the aspect of the changing trend and values of traffic flow. Root-Mean-Square Errors (RMSE) are marked in each subfigure to indicate the prediction performance of the normal and optimized ARIMA models. Mobility Mobility of Transportation Systems Privacy Transportation Data Vehicle Protection Vehicle Behaviors and Relations Data based Prediction City City Planning and Management Fig. 6: Research challenges of data supportive prediction for traffic flow. road surfaces to detect passing vehicles. There will have data missing problems in this kind of wireless data because of some unpredictable problems, e.g., sensor node failure. In some scenarios, if the critical data is missing or has errors, it will make the analysis results gravely deviate from making correct conclusions. For example, if the data from a device is not correct and the data is used to perform analysis, the result will be incorrect and cannot be used as useful information or knowledge to aid decision making. Ensuring the integrity of the wireless big data information is still a great challenge that needs to be addressed by experts in the field. City Data Based Prediction: The prediction results in analyzing transportation data can help in city planning and management. The large trajectory data produced by moving vehicles can help predict the traffic flow that in turn can greatly improve lives. In addition, this can motivate the design of intelligent traffic lights that can achieve automatic traffic flow global scheduling. Such scheduling is based on the understanding and prediction of global traffic conditions. So, it is important to know whether the current traffic flow will impact roads during the next time period or not. These issues are still a challenge that need researchers’ attention in the near future. VI. C ONCLUSION Transportation data is the sampling of dynamics of moving objects in the temporal and spatial dimensions. Analysis and mining of such time series data is becoming a promising way to discover the underlying knowledge on vehicular activities, vehicles’ relations and even city dynamics. It helps to well understand and predict the pattern of traffic flow which is an important aspect of traffic dynamics. Traffic flow prediction can be exploited in a wide range of potential applications to make a city smarter, safer, more livable, and can help reduce congestion and pollution. However, it remains challenging 7 to analyze time series data to acquire useful knowledge for problem solving, because of data heterogeneity and data incompleteness in a complex and dynamic transportation system. So, in this article we have introduced the transportation data. Then, we discussed state-of-the-art prediction methods. We run some experiments in order to compare the optimized time series prediction model with the normal time series prediction model. Our results show that the prediction performance is able to be improved by fitting actual data to optimize the parameters of the prediction model. In addition, we have discussed typical techniques to address the traffic flow prediction problem. Finally, we listed some challenges that will provide leads to future researchers in this area. R EFERENCES [1] D. Schrank, B. Eisele, T. Lomax, and J. Bak, “2015 urban mobility scorecard,” The Texas A&M Transportation Institute and INRIX, Tech. Rep., 2015. [2] A. Al-Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari, and M. Ayyash, “Internet of things: A survey on enabling technologies, protocols, and applications,” IEEE Communications Surveys & Tutorials, vol. 17, no. 4, pp. 2347–2376, 2015. [3] S. Sun, C. Zhang, and Y. Zhang, “Traffic flow forecasting using a spatiotemporal bayesian network predictor,” in International Conference on Artificial Neural Networks. Springer, 2005, pp. 273–278. [4] S. Sun, C. Zhang, and G. Yu, “A bayesian network approach to traffic flow forecasting,” IEEE Transactions on intelligent transportation systems, vol. 7, no. 1, pp. 124–132, 2006. [5] E. Castillo, J. M. Menéndez, and S. Sánchez-Cambronero, “Predicting traffic flow using bayesian networks,” Transportation Research Part B: Methodological, vol. 42, no. 5, pp. 482–509, 2008. [6] Z. Zhu, B. Peng, C. Xiong, and L. Zhang, “Short-term traffic flow prediction with linear conditional gaussian bayesian network,” Journal of Advanced Transportation, vol. 50, no. 6, pp. 1111–1123, 2016. [7] K. Y. Chan, T. S. Dillon, J. Singh, and E. Chang, “Neural-network-based models for short-term traffic flow forecasting using a hybrid exponential smoothing and levenberg–marquardt algorithm,” IEEE Transactions on Intelligent Transportation Systems, vol. 13, no. 2, pp. 644–654, 2012. [8] K. Y. Chan and T. S. Dillon, “On-road sensor configuration design for traffic flow prediction using fuzzy neural networks and taguchi method,” IEEE Transactions on Instrumentation and Measurement, vol. 62, no. 1, pp. 50–59, 2013. [9] R. N. Calheiros, E. Masoumi, R. Ranjan, and R. Buyya, “Workload prediction using arima model and its impact on cloud applications’ qos,” IEEE Transactions on Cloud Computing, vol. 3, no. 4, pp. 449–458, 2015. [10] B. M. Williams and L. A. Hoel, “Modeling and forecasting vehicular traffic flow as a seasonal arima process: Theoretical basis and empirical results,” Journal of transportation engineering, vol. 129, no. 6, pp. 664– 672, 2003. [11] A. Stathopoulos and M. G. Karlaftis, “A multivariate state space approach for urban traffic flow modeling and prediction,” Transportation Research Part C: Emerging Technologies, vol. 11, no. 2, pp. 121–135, 2003. [12] J. Guo, W. Huang, and B. M. Williams, “Adaptive kalman filter approach for stochastic short-term traffic flow rate prediction and uncertainty quantification,” Transportation Research Part C: Emerging Technologies, vol. 43, pp. 50–64, 2014. [13] G. Yu, J. Hu, C. Zhang, L. Zhuang, and J. Song, “Short-term traffic flow forecasting based on markov chain model,” in Intelligent Vehicles Symposium, 2003. Proceedings. IEEE. IEEE, 2003, pp. 208–212. [14] A. K. Fard and M.-R. Akbari-Zadeh, “A hybrid method based on wavelet, ann and arima model for short-term load forecasting,” Journal of Experimental & Theoretical Artificial Intelligence, vol. 26, no. 2, pp. 167–182, 2014. [15] Y. Lv, Y. Duan, W. Kang, Z. Li, and F.-Y. Wang, “Traffic flow prediction with big data: a deep learning approach,” IEEE Transactions on Intelligent Transportation Systems, vol. 16, no. 2, pp. 865–873, 2015.
2cs.AI
ELT LINEAR ALGEBRA II arXiv:1705.00266v1 [math.RA] 30 Apr 2017 GUY BLACHAR AND EREZ SHEINER Abstract. This paper is a continuation of [4]. Exploded layered tropical (ELT) algebra is an extension of tropical algebra with a structure of layers. These layers allow us to use classical algebraic results in order to easily prove analogous tropical results. Specifically we prove and use an ELT version of the transfer principal presented in [2]. In this paper we use the transfer principal to prove an ELT version of Cayley-Hamilton Theorem, and study the multiplicity of the ELT determinant, ELT adjoint matrices and quasi-invertible matrices. We also define a new notion of trace – the essential trace – and study its properties. Contents 0. Introduction 0.1. ELT Algebras 0.2. The Element −∞ 0.3. Non-Archimedean Valuations and Puiseux Series 0.4. ELT Algebras and Puiseux Series 0.5. Semirings with a Negation Map and ELT Rings 1. ELT Transfer Principle 1.1. The Transfer Principle 1.2. Formulation and Proof of the ELT Transfer Principle 1.3. Multiplicity of the ELT Determinant 1.4. The ELT Adjoint Matrix and Quasi-Invertible Matrices 1.5. The ELT Characteristic Polynomial and ELT Eigenvalues 2. ELT Traces 2.1. Trace of ELT Matrices 2.2. ELT Nilpotent Matrices 2.3. The Essential Trace References Page 1 2 3 3 4 5 5 5 7 8 9 11 13 13 13 13 17 0. Introduction Tropical linear algebra, also known as Max-Plus linear algebra, has been studied for more than 50 years (ref. [5]). While tropical geometry mainly deals with geometric combinatorial problems, tropical linear algebra deals with algebraic non-linear combinatorial problems (for instance, the assignment problem [18]). Tropical linear algebra may also be used as a mean to study the tropical algebraic geometry (for instance, the tropical resultant). Notable work in this field can be found at Date: 19th February 2018. 2010 Mathematics Subject Classification. Primary: 15A03, 15A09, 15A15, 15A63; Secondary: 16Y60, 14T05. Key words and phrases. Tropical algebra, ELT algebra, matrix theory, characteristic polynomial, trace, transfer principle. This article contains work from Erez Sheiner’s Ph.D. Thesis, which was accepted on 1.1.16, and from Guy Blachar’s M.Sc. Thesis, both submitted to the Math Department at Bar-Ilan University. Both works were carried under the supervision of Prof. Louis Rowen from Bar-Ilan University, to whom we thank deeply for his help and guidance. 1 2 GUY BLACHAR AND EREZ SHEINER [5], [6], [13], [15] and [21]. In our previous paper ([4]) we introduced a new structure, which we call exploded layered tropical algebra (or ELT algebra for short). This structure is a generalization of the work of Izhakian and Rowen ([14]), and is similar to Parker’s exploded structure ([19]). The layers enable us to use “classical language” even when dealing with tropical questions. Our work in this paper can be divided into two main parts. The first one uses the theory of semirings with a negation map to study the ELT structure. We formulate and prove an ELT version of the transfer principles written in [2], and use them to study ELT matrix theory, such as the ELT adjoint matrix (Theorem 1.9 and Theorem 1.10). The second part of our work deals with a new notion of trace. Whereas the trace can be defined as in the classical theory, it lacks some important properties in the ELT theory. For example, the trace of an ELT nilpotent matrix need not be of layer zero. We define the essential trace of an ELT matrix (subsection 2.3) to deal with such cases. 0.1. ELT Algebras. Definition 0.1. Let L be a semiring, and F a totally ordered semigroup. An ELT algebra is the pair R = R (L , F ), whose elements are denoted [ℓ]a for a ∈ F and ℓ ∈ L , together with the semiring (without zero) structure:  [ℓ ]  a1 > a2  1 a1 [ℓ ] [ℓ ] [ℓ ] 1 2 2 (1) a1 + a2 := a2 a1 < a2 .  [ℓ1 +L ℓ2 ] a1 a1 = a2 (2) [ℓ1 ]a1 · [ℓ2 ]a2 := [ℓ1 ·L ℓ2 ] (a1 +F a2 ). We write . For [ℓ]a, ℓ is called the layer, whereas a is called the tangible value. ELT algebras originate from [19], and are also discussed in [22]. Let R be an ELT algebra. We write s : R → L for the projection on the first component (the sorting map):  s [ℓ]a = ℓ We also write τ : R → F for the projection on the second component:  τ [ℓ]a = a We denote the zero-layer subset [0]R = {α ∈ R|s (α) = 0} and R× = {α ∈ R|s (α) 6= 0} = R \ [0]R We note some special cases of ELT algebras. Example 0.2. Let (G, ·) be a totally ordered group. We denote by Gmax the max-plus algebra defined over G, i.e. the set G endowed with the operation a ⊕ b = max {a, b} , a ⊙ b = a · b. Then Gmax is equivalent to the trivial ELT algebra with F = G and L = {1}. Example 0.3. Zur Izhakian’s supertropical algebra ([11]) is equivalent to an ELT algebra with a layering set L = {1, ∞}, where 1 + 1 = ∞, 1 + ∞ = ∞ + 1 = ∞, ∞ + ∞ = ∞ ELT LINEAR ALGEBRA II 3 and 1 · 1 = 1, 1 · ∞ = ∞ · 1 = ∞, ∞ · ∞ = ∞. The supertropical ”ghost” elements aν correspond to [∞]a in the ELT notation, whereas the tangible elements a correspond to [1]a. We define a partial order relation  on R in the following way: x  y ⇐⇒ ∃z ∈ [0]R : x = y + z Lemma 0.4 ([4, Lemma 0.4]).  is a partial order relation on R. Let us point out some important elements in any ELT algebra R: (1) [1]0, which is the multiplicative identity of R. (2) [0]0, which is idempotent for both operations of R. (3) [−1]0, which has the role of “−1” in our theory. Note that [0]0 · [ℓ]a = [0]a. Therefore, [0]R = [0]0 R. In particular, [0]R is an ideal of R. Throughout this paper, unless otherwise noted, we work under more general assumptions than in [4]. Out underlying ELT algebras R = R (L , F ) will be commutative ELT rings, meaning that F is an abelian group, and L is a commutative ring. 0.2. The Element −∞. As in the tropical algebra, ELT algebras lack an additive identity. Therefore, we adjoin a formal element to the ELT algebra R, denoted by −∞, which satisfies ∀α ∈ R: −∞ + α = α + −∞ = α −∞ · α = α · −∞ = −∞ We also define s (−∞) = 0. We denote R = R ∪ {−∞}. We note that R is now a semiring, with the following property: α + β = −∞ =⇒ α = β = −∞ Such a semiring is called an antiring. Antirings are dealt with in [23] and [7]. 0.3. Non-Archimedean Valuations and Puiseux Series. We recall the definition of a (nonArchimedean) valuation (see [8] and [24]). Definition 0.5. Let K be a field, and let (Γ, +, ≥) be an abelian totally ordered group. Extend Γ to Γ ∪ {∞} with γ < ∞ and γ + ∞ = ∞ + γ = ∞ for all γ ∈ Γ. A function v : K → Γ ∪ {∞} is called a valuation, if the following properties hold: (1) v (x) = ∞ ⇐⇒ x = 0. (2) ∀x, y ∈ K : v (xy) = v (x) + v (y). (3) ∀x, y ∈ K : v (x + y) ≥ min {v (x) , v (y)}. Given a valuation v over a field K, we recall some basic properties: (1) v (1) = 0. (2) ∀x ∈ K : v (−x) = v (x). (3) ∀x ∈ K × : v x−1 = −v (x). (4) If v (x + y) > min {v (x) , v (y)}, then v (x) = v (y). (For this reason, the equality between the valuation of two elements is central in out theory.) One may associate with v the valuation ring Ov = {x ∈ K|v (x) ≥ 0} This is a local ring with the unique maximal ideal mv = {x ∈ K|v (x) > 0}  The quotient kv = Ov mv is called the residue field of the valuation. 4 GUY BLACHAR AND EREZ SHEINER Let us present another key construction related to valuations. For γ ∈ Γ, let D≥γ = {x ∈ K|v (x) ≥ γ} and D>γ = {x ∈ K|v (x) > γ}. It is easily seen that D≥γ is an abelian additive group, and . that D D>γ is a subgroup of D≥γ . Note that for γ = 0, D≥0 = Ov and D>0 = mv . Set Dγ = ≥γ D . >γ The associated graded ring of K with respect to v is M grv (K) = Dγ γ∈Γ Given γ1 , γ2 ∈ Γ, the multiplication in K induces a well-defined multiplication Dγ1 × Dγ2 → Dγ1 +γ2 given by (x1 + D>γ1 ) · (x2 + D>γ2 ) = x1 x2 + D>(γ1 +γ2 ) This multiplication can be extended to a multiplication map in grv (K), endowing it with a structure of a graded ring. We will now focus on Puiseux series, which is the central example for our theory. The field of Puiseux series with coefficients in a field K and exponents in an abelian ordered group Γ is ( ) X i K{{t}} = αi t αi ∈ K, I ⊆ Γ is well-ordered i∈I The resulting set, equipped with the natural operations, is a field; in addition, if K is algebraically closed and Γ is divisible, then K{{t}} is also algebraically closed. Assuming Γ is also totally ordered, one may define a valuation on the field of Puiseux series v : K{{t}} → Γ ∪ {∞} as follows: v (0) = ∞, and ! X i v αi t = min {i ∈ I|αi 6= 0} i∈I Let us examine the associated graded ring with respect to this valuation. For each γ ∈ Γ, we first claim that Dγ ∼ = K. Indeed, the kernel of the homomorphism f : D≥γ → K defined by   X f αi ti  = αγ γ≤i∈I is precisely D>γ (since D>γ is the subgroup of D≥γ of Puiseux series whose minimal degree is bigger than γ). 0.4. ELT Algebras and Puiseux Series. Let R = R (L , F ) be an ELT algebra. In [4] we introduced the EL tropicalization function ELTrop : L {{t}} → R, which is defined in the following way: if x ∈ L {{t}}\ {0} has a leading monomial ℓta , then ELTrop (x) = [ℓ] (−a) . In addition, ELTrop (0) = −∞. Lemma 0.6 ([4, Lemma 0.9]). The following properties hold: (1) ∀x, y ∈ L {{t}} : ELTrop (x) + ELTrop (y)  ELTrop (x + y). (2) ∀α ∈ L ∀x ∈ L {{t}} : ELTrop (αx) = [α]0 ELTrop (x). (3) ∀x, y ∈ L {{t}} : ELTrop (x) ELTrop (y)  ELTrop (xy). We remark that in the case in which R is an ELT integral domain, meaning L is an integral domain, we have ELTrop (x) ELTrop (y) = ELTrop (xy) for all x, y ∈ L {{t}}. Let us examine the relation x  ELTrop (y) a bit more deeply. If x = ELTrop (y), it means that x can be lifted to a Puiseux series which has x as its leading monomial. Otherwise, we have that x is of layer zero, and its tangible value is bigger than the tangible value of ELTrop (y); so one may say that x can also be lifted to a Puisuex series with leading coefficient x, where we allow it to have a zero coefficient in its leading monomial. ELT LINEAR ALGEBRA II 5 0.5. Semirings with a Negation Map and ELT Rings. Semirings need not have additive inverses to all of the elements. While some of the theory of rings can be copied “as-is” to semirings, there are many facts about rings which use the additive inverses of the elements. The idea of negation maps on semirings (sometimes called symmetrized semirings) is to imitate the additive inverse map. Semirings with negation maps are discussed in [1], [9], [10], [2], [3], [20]. Definition 0.7. Let R be a semiring. A map (−) : R → R is a negation map (or a symmetry) if the following properties hold: (1) ∀a, b ∈ R : (−) (a + b) = (−)a + (−)b. (2) (−)0R = 0R . (3) ∀a, b ∈ R : (−) (a · b) = a · ((−)b) = ((−)a) · b. (4) ∀a ∈ R : (−) ((−)a) = a. We say that (R, (−)) is a semiring with a negation map (or a symmetrized semiring). If (−) is clear from the context, we will not mention it. We give several examples of semirings with negation maps: • A trivial example of a negation map (over any semiring) is (−)a = a. • If R is a ring, it has a negation map (−)a = −a. • If R is an ELT algebra, we have a negation map given by (−)a = [−1]0a. The last example is the central example for our theory, since it shows that any ELT algebra is equipped with a natural negation map. Thus, the theory of semirings with negation maps can be used when dealing with ELT algebras. We now present several notations from this theory: • a + (−)a is denoted a◦ . • R◦ = {a◦ |a ∈ R}. • We define two partial orders on R: – The relation ◦ defined by a ◦ b ⇔ ∃c ∈ R◦ : a = b + c – The relation ∇ defined by a∇b ⇔ a + (−)b ∈ R◦ If R is an ELT algebra, then some of these notations have already been defined. For example, a◦ = [0]0a, R◦ = [0]R and the relation ◦ is the relation . 1. ELT Transfer Principle The transfer principles are two theorems, presented in [2], which allows to conveniently transfer equalities between polynomial expressions in the classical theory to theorems about semirings with a negation map. We recall that any ELT algebra R has a negation map (−) [ℓ]a = [−ℓ]a and thus we may view each ELT algebra as a semiring with a negation map. In this section, we use the transfer principles to prove two transfer principles for the ELT theory, and use these transfer principles to study the ELT adjoint matrix. 1.1. The Transfer Principle. In this subsection, we briefly introduce the two classical transfer principles given in [2]. Definition 1.1. A positive polynomial expression in the variables λ1 , . . . , λm is a formal expression produced by the context-free grammar E 7→ E +E, (E)×(E), where the symbols 0, 1, λ1 , . . . , λm are thought of as terminal symbols of the grammar. A monomial in a positive polynomial expression is a sum of expressions of the form cI λi11 . . . λimm , where I = (i1 , . . . , in ) is fixed. 6 GUY BLACHAR AND EREZ SHEINER That means that 0, 1, λ1 , . . . , λm are positive polynomial expressions. Also, λ1 + (λ2 ) × (λ1 + λ3 ) is a positive polynomial expression. Any positive polynomial expression E can be interpreted as a polynomial in N [λ1 , . . . , λm ]. We say that a monomial λi11 . . . λimm appears in the expression E if there exists a positive integer c such that cλi11 . . . λimm appears in the expansion of the polynomial obtained by interpreting E in N [λ1 , . . . , λm ]. im If R is a semiring with a negation map, and if cλi11 . . . λm is a monomial, we define  i1 i1 im (−) cλ1 . . . λm = ((−) c) λ1 . . . λimm Definition 1.2. Let R be a semiring with a negation map. A polynomial expression is a formal expression of the form P + − P − , where P + and P − are positive polynomial expressions. A monomial in P is a sum of the monomials cI λi11 . . . λimm from P + and c′I λi11 . . . λimm from P − , where I = (i1 , . . . , in ) is fixed. We say that a monomial appears in the polynomial expression P , if it appears either in P + or in P − . Definition 1.3. Let P and Q be polynomial expressions. We say that the identity P = Q is valid in a semiring with a negation map R, if it holds for any semiring with a negation map R and for any substitution λ1 = r1 , . . . , λm = rm of r1 , . . . , rm ∈ R. Recall the relations ◦ and ∇ from subsection 0.5. Definition 1.4. Let P and Q be polynomial expressions. (1) We say that the identity P ∇Q holds in all commutative semirings with a negation map, if for any semiring with a negation map R and for any substitution λ1 = r1 , . . . , λm = rm of r1 , . . . , rm ∈ R, P (r1 , . . . , rn ) ∇Q (r1 , . . . , rn ) (2) We say that the identity P ◦ Q holds in all commutative semirings with a negation map, if for any semiring with a negation map R and for any substitution λ1 = r1 , . . . , λm = rm of r1 , . . . , rm ∈ R, P (r1 , . . . , rn ) ◦ Q (r1 , . . . , rn ) We recall the transfer principle ([2, Theorems 4.20 and 4.21]): Theorem 1.5 (Transfer principle, weak form). Let P and Q be polynomial expressions. If the identity P = Q holds in all commutative rings, then the identity P ∇Q holds in all commutative semirings with negation map. Theorem 1.6 (Transfer principle, strong form). Let P and Q be polynomial expressions. If the identity P = Q holds in all commutative rings, and if Q = Q+ − Q− for some positive polynomial expressions such that there is no monomial appearing simultaneously in Q+ and Q− , then the identity P ◦ Q holds in all commutative semirings with negation map. The transfer principle allows us to prove several important theorems in a rather convenient way. Corollary 1.7 (Multiplicativity of determinant). Let R be a semiring with a negation map, and let A ∈ Rn×n . We define: X a1,σ(1) . . . an,σ(n) det (A)+ = σ∈An − det (A) = X a1,σ(1) . . . an,σ(n) σ∈Sn \An det (A) = + det (A) − det (A) − In [2, Corollary 4.8], it is proven that if R is a semiring with a negation map, then ∀A, B ∈ Rn×n : det (AB) ◦ det (A) det (B) Corollary 1.8 (Cayley-Hamilton theorem). Let R be a semiring with a negation map, and let A ∈ Rn×n . We know that over a commutative ring, fA (A) = 0. We can use the strong form of the transfer principle componentwise, and thus fA (A) ◦ 0 ELT LINEAR ALGEBRA II 7 In other words, fA (A) ∈ (R◦ ) n×n 1.2. Formulation and Proof of the ELT Transfer Principle. We first recall that all of our ELT algebras are commutative ELT rings, meaning R = R (L , F ) where F is an abelian group and L is a commutative ring. We would like to have a tool of proving polynomial identities over commutative ELT rings. Recall that any ELT ring is a semiring with a negation map a 7→ [−1]0a (subsection 0.5), and thus we may apply the transfer principle. In order to strengthen the general transfer principle, we will use results from tropical linear algebra. This is formulated in the following theorems: Theorem 1.9 (ELT Transfer Principle for equality). Let P and Q be polynomial expressions. Assume that the identity P = Q holds in all commutative rings. If the identity P = Q holds in all commutative tropical algebras, then the identity P = Q holds in all commutative ELT rings. Theorem 1.10 (ELT Transfer Principle for surpassing). Let P and Q be polynomial expressions. Assume that the identity P = Q holds in all commutative rings. If the identity P ≥ Q holds in all commutative tropical algebras, then the identity P  Q holds in all commutative ELT rings. We prove two lemmas which will help us prove the theorems:  Lemma 1.11. Let R be an ELT algebra, and let α, β ∈ R. If s α + [−1]0β = 0, and if τ (α) ≥ τ (β), then α  β. Proof. Denote α = [ℓ]a, β = [k]b. τ (α) ≥ τ (β) means a ≥ b. We have two options: (1) If a = b, then α + [−1]0β = [ℓ−k]a ∈ [0]R. Thus, ℓ = k, which implies α = β. (2) If a > b, then α + [−1]0β = α ∈ [0]R. Thus, ℓ = 0, and α = α + β  β. In any case α  β, and thus we are finished.  Lemma 1.12. Let R = R (L , F ) be an ELT algebra. Endow F with a max-plus algebra, Fmax . Then the function τ : R → Fmax is a “homomorphism”, in the sense that: (1) ∀x, y ∈ R : τ (x + y) = τ (x) ⊕ τ (y). (2) ∀x, y ∈ R : τ (xy) = τ (x) ⊙ τ (y). Proof. Take [ℓ1 ]a1 , [ℓ2 ]a2 ∈ R. (1) If a1 = a2 , then τ [ℓ1 ]a 1  + [ℓ2 ]a2 = τ [ℓ1 +L ℓ2 ]a 1  = a1 = a1 ⊕ a2 = τ [ℓ1 ]a 1  ⊕τ Otherwise, without loss of generality, a1 > a2 , and thus    τ [ℓ1 ]a1 + [ℓ2 ]a2 = τ [ℓ1 ]a1 = a1 = a1 ⊕ a2 = τ [ℓ1 ]a1 ⊕ τ   (2) τ [ℓ1 ]a1 · [ℓ2 ]a2 = τ [ℓ1 ·L ℓ2 ] (a1 +F a2 ) = a1 +F a2 = a1 ⊙ a2 = τ [ℓ2 ]a [ℓ2 ]a [ℓ1 ]a 2 1   2  ⊙τ [ℓ2 ]a 2   We now prove these theorems. We note that since Theorem 1.9 follows from Theorem 1.10, we will only prove the latter.  Proof of Theorem 1.10. By the weak form of the general transfer principle, s P + [−1]0Q = 0. Let R = R (L , F ) be a commutative ELT ring. We will now prove that for any substitution λ1 = r1 , . . . , λm = rm of r1 , . . . , rm ∈ R, τ (P (r1 , . . . , rm )) ≥ τ (Q (r1 , . . . , rm )) We endow F with the max-plus operations. By Lemma (Lemma 1.12) τ : R → Fmax is a homomorphism. Therefore, for any ELT polynomial p ∈ R [λ] and for any substitution λ1 = r1 , . . . , λm = rm of r1 , . . . , rm ∈ R, τ (p (r1 , . . . , rm )) = p (τ (r1 ) , . . . , τ (rm )) 8 GUY BLACHAR AND EREZ SHEINER Thus, for any substitution λ1 = r1 , . . . , λm = rm of r1 , . . . , rm ∈ R, τ (P (r1 , . . . , rm )) = P (τ (r1 ) , . . . , τ (rm )) ≥ Q (τ (r1 ) , . . . , τ (rm )) = τ (Q (r1 , . . . , rm ))  We have proven that s P + [−1]0Q = 0 and that τ (P ) ≥ τ (Q); by Lemma 1.11, we are finished.  Remark 1.13. Throughout the uses of the ELT transfer principle for equality, we need to check the corresponding identity in commutative tropical algebras. However, since major work has been done in the supertropical theory (see [15], [16] and [17]), we usually check that one of the following conditions holds: (1) The identity P = Q holds in all commutative supertropical algebras. (2) The identity ν (P ) = ν (Q) holds in all commutative supertropical algebras. Similarly, to prove a surpassing relation, we usually check that one of the following conditions holds: (1) The identity P  Q holds in all commutative supertropical algebras. gs (2) The identity P ≥ν Q holds in all commutative supertropical algebras. This tool allows us to prove many polynomial surpassing and equalities without effort. An example is given in the next subsection. 1.3. Multiplicity of the ELT Determinant. We return to Corollary 1.7, which holds in particular over commutative ELT rings. We first formulate this corollary in the “ELT language”: Corollary 1.14 (Multiplicativity of the ELT determinant). Let R be a commutative ELT ring. n×n If A, B ∈ R , then det (AB)  det (A) · det (B) We now present several corollaries from the multiplicativity of the ELT determinant, which are two cases in which the ELT determinant is strictly multiplicative. First, we prove a lemma that will be helpful for the first case: Lemma 1.15. If x, y ∈ R satisfy x  y, and if s (x) 6= 0, then x = y. Proof. Write x = [ℓ]a, y = [k]b. Since x  y, there is c ∈ F such that x = y + [0]c. In other words, [ℓ]a = [k]b + [0]c By the definition of addition, a ≥ b, and a = max {b, c}. If a > b, then a = c > b, and thus [ℓ]a = [k]b + [0]c = [0]c in contradiction to the fact that ℓ = s (x) 6= 0. Thus, x = y.  Corollary 1.16. If s (det (AB)) 6= 0, then det (AB) = det (A) · det (B) Proof. From Corollary 1.14, det (AB)  det (A) · det (B) By Lemma 1.15, we get equality.  Another case in which the determinant is multiplicative is when either A or B are invertible: n×n Theorem 1.17. If A, B ∈ R , such that A or B are invertible. Then det (AB) = det (A) · det (B) Proof. Assume that B is invertible (the second direction is proved similarly). We note that by Corollary 1.14, det (AB)  det (A) · det (B) but also   −1 det (A) = det (AB) B −1  det (AB) · det B −1 = det (AB) · (det (B)) . ELT LINEAR ALGEBRA II 9 The latter surpassing implies that det (A) · det (B)  det (AB) . Since  is antisymmetric on R, the conclusion follows.  Although the determinant is not multiplicative, a natural question is: if AB is non-singular, is BA also non-singular? The answer to this question is negative, as the following example demonstrates: Example 1.18. In R = R (C, R), consider A=   [1]1 [1]1 [1]2 [1]3 Then det (AAt ) = [1]8, yet det (At A) = [0]10. 1.4. The ELT Adjoint Matrix and Quasi-Invertible Matrices. As we have seen, the invertible matrices in the ELT sense are limited. So, we shall try to generalize this. Our goal is to find an equivalent condition to the fact that det (A) is invertible. Definition 1.19. Let R be a commutative ELT ring. A quasi-identity matrix is a matrix n×n , which is idemopotent, nonsingular and defined by I˜ ∈ R (   [1]0 i=j I˜ = i,j αi,j i 6= j where αi,j ∈ R, s (αi,j ) = 0. n×n n×n Definition 1.20. Let R be a commutative ELT ring, and let A ∈ R . A matrix B ∈ R is a quasi-inverse for A, if AB and BA are quasi-identity matrices. In this case, A is called quasi-invertible. Note that AB and BA may differ. n×n . The (i, j)-minor A′i,j of Definition 1.21. Let R be a commutative ELT ring, and let A ∈ R a matrix A = (ai,j ) is obtained by deleting the i-th row and the j-th column. Its ELT determinant is a′i,j = det A′i,j . n×n Definition 1.22. Let R be a commutative ELT ring, and let A ∈ R . The adjoint matrix of A is (adj (A))i,j = [ε(i,j)]0 a′j,i where ε (i, j) = (−1)i+j . −1 We would like to prove that when det (A) is invertible in R, (det (A)) adj (A) is a quasi-inverse of A. We present here some corollaries from the ELT transfer principle, which together will prove the assertion (Theorem 1.26). We use the ELT transfer principles componentwise. Corollary 1.23. A · adj (A) = det (A) IA , where IA  I. Proof. We use the ELT transfer principle for surpassing. This result is known in ring theory, and is proved in the supertropical theory (see [15, Remark 4.5]).  Corollary 1.24. det (A · adj (A)) = det (A) n Proof. We use the ELT transfer principle for equalities. This result is known in ring theory, and is proved in the supertropical theory (see [15, Theorem 4.9]).  Corollary 1.25. 2 (A · adj (A)) = det (A) · A · adj (A) Proof. We use the ELT transfer principle for equalities. This result is known in ring theory, and is proved in the supertropical theory (see [15, Theorem 4.12]).  Theorem 1.26. If det (A) is invertible in R, then A is quasi-invertible. 10 GUY BLACHAR AND EREZ SHEINER Proof. By Corollary 1.23, A · adj (A) = det (A) · IA , where IA  I. It is left to prove that IA is nonsingular and idempotent. By Corollary 1.24, det (A · adj (A)) = det (A)n . But n n det (A) = det (A · adj (A)) = det (det (A) IA ) = det (A) det (IA ) Since det (A) is invertible, det (IA ) = [1]0. To prove that IA is idempotent, we use Corollary 1.25:  2  −1 −1 2 2 2 = (det (A)) A · adj (A) = det (A) IA (A · adj (A)) = −1  = det (A)2 det (A) · A · adj (A) = (det (A))−1 A · adj (A) = IA as required.  Remark 1.27. Using the same arguments, one may show that adj (A) · A is det (A) times a quasiidentity matrix. Corollary 1.28. Let R be a commutative ELT ring. Then A is quasi-invertible if and only if det (A) is invertible. We will now use the theory of the ELT adjoint matrix to study the connection between matrix singularity and linear dependency. We recall the following theorem: Theorem ([4, Theorem 1.6]). Let R = R (F, R) be an ELT algebra, where F is an algebraically n×n closed field. Consider A ∈ R . Then the rows of A are linearly dependent, iff the columns of A are linearly dependent, iff s (det A) = 0F . This theorem was proved using the Fundamental Theorem, thus only in the case of R = R (F, R) where F is an algebraically closed field. We will prove the following: n×n an ELT matrix. If det A Theorem 1.29. Let R be a commutative ELT ring, and let A ∈ R is invertible in R, then the columns (respectively, rows) of A are linearly independent. Before proving this theorem, we recall the Hungarian algorithm ([18]): n×n Definition 1.30. An entry ai,j of a tropical matrix A ∈ Gmax is called column-critical if it is maximal within its columns, i.e., if ∀k : ai,j ≥ ak,j . A matrix A is called critical if there exists a permutation σ ∈ Sn such that a1,σ(1) , . . . , an,σ(n) are column-critical. n×n be a tropical matrix. Then there Theorem 1.31 (The Hungarian Algorithm). Let A ∈ Gmax are scalars α1 , . . . , αn ∈ R× such that   α1 ⊙ R1 (A)   ..   . αn ⊙ Rn (A) n×n is critical. In other words, there exists a diagonal matrix D ∈ Gmax , whose diagonal entries are not −∞, such that A ⊙ D is critical. n×n n×n is critical if τ (A) = (τ (ai,j )) ∈ Gmax In the ELT case, we say that a matrix A ∈ R is critical. n×n n×n Corollary 1.32. Let A ∈ R . Then there exists an invertible diagonal matrix D ∈ R such that DA is critical.  n×n Proof. Let D′ = d′i,j ∈ Gmax be a diagonal matrix such that D′ ⊙ τ (A) is a critical tropical n×n matrix. We define D = (di,j ) ∈ R as  ′ [1]d , i = j i,i di,j = −∞, i 6= j Obviously, DA is critical (since τ (DA) = τ (D) ⊙ τ (A) = D′ ⊙ τ (A) is critical), as required.  ELT LINEAR ALGEBRA II 11 We are now ready to prove Theorem 1.29. Proof of Theorem 1.29. We prove the assertion on the columns of A. The assertion that the rows of A are linearly independent can be proven by replacing A with At . n  t Suppose that s (Av) = (0, . . . , 0) for some v ∈ R× . If A∇ = (det A) −1 adj (A) , ′ there exists a quasi-identity matrix IA such that ′ A∇ A = IA Thus,  t ′ s (IA v) = s A∇ A · v = (0, . . . , 0) . n×n ′ t We apply Corollary 1.32 for (IA ) to find a diagonal invertible matrix D ∈ R such that ′ t ′ D (IA ) is critical. By transposing this matrix, we get a matrix IA D such that there is a permutation ′ ′ σ ∈ Sn for which (IA D) i, j is row-critical in IA D. By Theorem 1.17, ′ ′ det (IA D) = det IA · det D = det D ′ ′ is not of layer zero, i.e. IA D is nonsingular. We note that the only non-zero layered track in IA is ′ the diagonal track, since any entry of IA which is not on the diagonal is of layer zero; hence, we may assume σ = Id, that is the diagonal entries are row-critical. ′ ′ ′ Returning to the original equation s (IA v) = (0, . . . , 0)t , we replace IA by B = IA D and v ′ −1 by v = D v to get s (Bv ′ ) = (0, . . . , 0)t Let 1 ≤ k ≤ n such that τ (vk′ ) = max τ (vi′ ) . 1≤i≤n Then (Bv ′ )k = n X i=1 bk,i vi′ = n X bk,i vi′ + bk,k vk′ . i=1 i6=k ′ ′ We recall that B = IA D, where IA is a quasi-identity matrix and D is an invertible diagonal matrix. Thus, every entry of B which is not on its diagonal is of layer zero. Furthermore, for any i 6= k we have τ (vi′ ) ≤ τ (vk′ ) and τ (bk,i ) ≤ τ (bk,k ). Therefore each summand bk,i vi′ cannot dominate bk,k vk′ , implying (Bv ′ )k = bk,k vk′ ′ which implies s (bk,k vk′ ) = 0. Since bk,k = (IA )k,k dk,k = dk,k is not of layer zero (because D is ′ ′ invertible), we must have s (vk ) = 0. Now, vk = d−1 k,k vk implies s (vk ) = 0. n  But v ∈ R× , therefore s (vk ) = 0 implies vk = −∞. By the choice of k, we must have v = (−∞, . . . , −∞), which proves that the columns of A are linearly independent.  1.5. The ELT Characteristic Polynomial and ELT Eigenvalues. n×n Definition 1.33. Let A ∈ R be a matrix. The ELT characteristic polynomial of A is defined to be  pA (λ) = det λIn + [−1]0A n×n be a matrix. A vector v ∈ (R× )n is called an eigenvector of A Definition 1.34. Let A ∈ R with an eigenvalue x ∈ R if v 6= (−∞, ..., −∞) and Av = xv. Proposition 1.35. Let A ∈ R n×n be a matrix with eigenvalue x. Then s (pA (x)) = 0L . 12 GUY BLACHAR AND EREZ SHEINER Proof. Choose v to be an eigenvector of the eigenvalue v, then Av = xv. Therefore Av + [−1]0 · xv = [0]0 · xv. In other words,  s xv + [−1]0Av = (0L , ..., 0L ). Thus  s (xIn + [−1]0A)v = (0L , ..., 0L ).  By Theorem 1.29, we conclude that s det xIn + [−1]0A = 0L , i.e., s (pA (x)) = 0L .  Note that the other direction is not necessarily true, i.e., there could be an ELT root of the characteristic polynomial which is not an eigenvalue. Indeed, if one tried to prove that direction, he would encounter the following difficulty: Av 6= Av + [−1]0 · xv + xv. 2×2 Example 1.36. Consider the matrix A ∈ R ,   [1]1 [1]2 A = [1] , 2 [1]3 Its ELT characteristic polynomial is pA (λ)  [−1]0A   [−1]2 λ + [−1]1 = det [−1]2 λ + [−1]3 = det λI2 + = (λ + [−1]1)(λ + [−1]3) + [−1]4 = λ2 + [−1]3 · λ + [0]4. If λ = [0]1, λ = [ℓ]α with α < 1 or λ = [1]3, then s (pA (λ)) = 0. The only eigenvalue of A is λ = [1]3, with        [1]1 [1]2 [1]0 [1]3 [1]0 [1]3 = = . [1]2 [1]3 [1]1 [1]4 [1]1 One may also define an ELT eigenvalue and an eigenvector in the following way: n×n be a matrix. A vector v ∈ (R× )n is called an ELT eigenvector Definition 1.37. Let A ∈ R of A with an ELT eigenvalue x ∈ R if v 6= (−∞, ..., −∞) and  s Av + [−1]0xv = (0L , ..., 0L ). This definition is similar to the concept of ’ghost surpass’ given by Izhakian, Knebusch and Rowen (ref. [12]). Proposition 1.38. Let R = R (F, R) be an ELT algebra, where F is an algebraically closed field, n×n and let A ∈ R be a matrix. Then x is an ELT eigenvalue of A if and only if s (pA (x)) = 0L . Proof. By Definition 1.37, x is an eigenvalue of A if and only if there exists a vector v ∈ (R× )n such that v 6= (−∞, ..., −∞) and  s xv + [−1]0Av = (0L , ..., 0L ), if and only if the columns of pA (x) = x · In + [−1]0A are linearly dependent, if and only if pA (x) is singular ([4, Theorem 1.7]).  We finish by reformulating Cayley-Hamilton theorem (Corollary 1.8) in the “ELT language”. Corollary 1.39 (ELT Cayley-Hamilton theorem). Let R be a commutative ELT ring, and let n×n be an ELT matrix. Then A∈ R s (pA (A)) = 0 ELT LINEAR ALGEBRA II 13 2. ELT Traces 2.1. Trace of ELT Matrices. n×n Definition 2.1. Let R be a commutative ELT ring, and take A ∈ R , A = (ai,j ). The trace of A is n X ai,i tr (A) = i=1 Lemma 2.2. The ELT trace satisfies the following relations: n×n : tr (A + B) = tr (A) + tr (B). (1) ∀A, B ∈ R n×n (2) ∀α ∈ R ∀A ∈ R : tr (αA) = αtr (A). n×n (3) ∀A, B ∈ R : tr (AB) = tr (BA). Proof. These properties can be proved just as the classical theory.  2.2. ELT Nilpotent Matrices. Definition 2.3. Let R be a commutative ELT ring. A matrix A ∈ R n×n if there exists m ∈ N such that Am ∈ [0] R . n×n is called ELT nilpotent, Similarly to the classical theory, one would expect that the trace of a nilpotent matrix would be of layer zero; however, this is wrong. For this reason, we define the essential trace in the next subsubsection.   [1]0 [0]1 Example 2.4. Let R = R (C, R), and consider the following matrix: A = [0] . Then 0 [1]0 tr (A) = [2]0, while      [1]0 [0]1 [1]0 [0]1 [0]1 [0]1 A2 = [0] [1] = . [0]0 [1]0 [0]0 [0]1 0 0 Therefore, ELT nilpotent matrices don’t necessarily have zero-layered trace. Another interesting example is an ELT nilpotent matrix, whose determinant is not of layer zero. Example 2.5. Let R be a commutative ELT ring, and take a, b, c, d ∈ R such that   τ a2 < τ (bc) < τ d2   a b and s (d) = 0. Consider the matrix A = . We have c d  2    a + bc ab + bd bc bd 2 A = = ac + cd bc + d2 cd d2 and     abc + bcd abd + bd2 bcd bd2 = bc2 + cd2 bcd + d3 cd2 d3 which is of layer zero, since s (d) = 0. But we may choose a, b, c, d such that τ (bc) > τ (ad) and s (bc) 6= 0; in that case, A is quasiinvertible and ELT nilpotent. A3 = 2.3. The Essential Trace. Before defining the new notion of trace, we give an important definition, which is significant in our construction of the new trace. n X hi ∈ R [λ] be an ELT X polynomial, where each hi is a monomial. For a monomial h, define ph (λ) = hi . Definition 2.6. Let R be a commutative ELT ring, and let p (λ) = i=1 hi 6=h (1) The monomial h is called inessential at a point a ∈ R, if p (a) = ph (a) and τ (h (a)) < τ (p (a)). If h is inessential at every point of R, it is called inessential. 14 GUY BLACHAR AND EREZ SHEINER (2) The monomial h is called essential at a point a ∈ R, if p (a) = h (a) and τ (ph (a)) < τ (p (a)). If h is essential at some point of R, it is called essential. (3) The monomial h is called quasi-essential at a point a ∈ R, if it is neither inessential at a nor essential at a. If h is quasi-essential at some point of R, it is called quasi-essential. Throughout the rest of the section, we need a stronger assumption on our ELT algebras. We require them to be divisible ELT fields, that is ELT algebras of the form R = R (L , F ), where F is a divisible group and L is a field. n×n . We define Definition 2.7. Let R be a divisible ELT field, and let A ∈ R   τ (cℓ ) τ (ck ) L (A) = ℓ ≥ 1 ∀k ≤ n : ≥ ℓ k µ (A) = min (L (A)) We write µ for µ (A), if A is given. n Lemma 2.8. Let R be a divisible ELT field, and let p (λ) = λ + n X αi λn−i ∈ R [λ] be an ELT i=1 polynomial. Then the first monomial after λn that is not inessential is αµ λn−µ . Proof. We need to find the monomial for which the intersection between λn and αℓ λn−ℓ is maximal (in the sense that its tangible value is maximal). First, we compute the tangible value of the intersection: λn = αℓ λn−ℓ ⇒ τ (λ) = τ (αℓ ) ℓ ℓ) The tangible value of the value of the polynomial at that point is nτ (α . ℓ So, if τ (αℓ ) τ (αk ) ∀k ≤ n : ≥ ℓ k ℓ satisfies our conditions. Take such ℓ minimal, which is µ, and we are done.  Remark 2.9. If |L (A)| ≥ 2, then αµ λn−µ is only quasi-essential in pA (λ). n×n Definition 2.10. Let R be a divisible ELT field, and let A ∈ R be a matrix. Assume n X αi λn−i . αµ is called the dominant characteristic coefficient. The essential pA (λ) = λn + i=1 trace of A, denoted etr (A), is given by the formula ( [−1]0tr (A) λn−1 is essential in p (λ) tr (A) A etr (A) = [0]  τ (αµ )  Otherwise µ Lemma 2.11. If s (tr (A)) = 0, then s (etr (A)) = 0. Proof. If [−1]0tr (A) λn−1 is essential in pA (λ), then etr (A) = tr (A). which is of layer zero. Otherwise, [−1]0tr (A) λn−1 is not essential in pA (λ), and thus, by the definition of essential trace, s (etr (A)) = 0.  n×n be a matrix over a commutative ELT ring R. A path from i Definition 2.12. Let A ∈ R to j is an expression of the form s = ai,i2 ai2 ,i3 . . . aik ,j where 1 ≤ i1 , . . . , ik+1 ≤ n. If i = j, we call it a multicycle. The length of s is |s| = k. The τ (s) tangible average value of s is . A simple cycle is a multicycle from i to i, such that ij 6= ij ′ |s| for j 6= j ′ (with i1 = i). Fact 2.13. Every multicycle can be written as a product of simple cycles. ELT LINEAR ALGEBRA II 15 Lemma 2.14. The (i, j) element in Ak is the sum of all paths from i to j. That is, X  ai,i2 ai2 ,i3 . . . aik ,j Ak i,j = 1≤i2 ,...,ik ≤n Proof. By induction on k, where the case k = 1 is clear. If the assertion is true for some k, then Ak+1  i,j = n X ℓ=1 ai,ℓ Akℓ,j = n X X ai,ℓ aℓ,i2 ai2 ,i3 . . . aik ,j = j=1 1≤i2 ,...,ik ≤n X ai,i2 ai2 ,i3 . . . aik+1 ,j 1≤i2 ,...,ik+1 ≤n  Lemma 2.15. The coefficient of λn−k in pA (λ) is X X k [−1]0 [sgnσ]0 a i1 ,iσ(1) ai2 ,iσ(2) . . . aik ,iσ(k) 1≤i1 ,...,ik ≤n σ∈Sk  Proof. We must choose n − k indices from which we “take” λ in the expansion of det λI + [−1]0A ; we are left with a k × k submatrix, with rows i1 , . . . , ik from A. Its determinant is the inner sum.  Lemma 2.16. Any multicycle contributing to the dominant characteristic coefficient must be a simple cycle. Proof. Otherwise, assume it is not a simple cycle. Since it can be written as a product of simple (s) ≥ etr (A), and a shorter length. Thus, s would give cycles, at least one of which, s, would have τ|s| a dominant characteristic coefficient of lower degree, in contradiction to our assumption.  Lemma 2.17. If s (etr (A + B)) 6= 0, then etr (A + B) = etr (A) + etr (B). Proof. The assumption can only happen if [−1]0tr (A + B) λn−1 is essential in pA+B (λ), and etr (A + B) = tr (A + B). The multicycles of A + B are products of sums of elements from A and from B. In particular, every multicycle of A and of B is a part of a multicycle of A + B. We know that tr (A + B) = tr (A) + tr (B); if τ (tr (A + B)) = τ (tr (A)), then τ (tr (A)) >every average value of a multicycle of A; so etr (A) = tr (A). We are almost finished: Case 1. If τ (tr (A + B)) = τ (tr (A)) = τ (tr (B)), then etr (A) = tr (A), etr (B) = tr (B), and etr (A + B) = tr (A + B) = tr (A) + tr (B) = etr (A) + etr (B) Case 2. If τ (tr (A + B)) = τ (tr (A)) > τ (tr (B)), then etr (A) = tr (A), and etr (A + B) = tr (A + B) = tr (A) + tr (B) = tr (A) = etr (A) In particular, τ (etr (A)) > τ (etr (B)); otherwise, there would have been a multicycle from B with τ (average value) ≥ τ (etr (A)) = τ (etr (A + B)), and thus s (etr (A + B)) = 0, which is a contradiction. So etr (A + B) = etr (A) = etr (A) + etr (B)  Example 2.18. In general, it is not true that  etr (A + B)   etr (A) + etr (B). For example, take [1]0 [1]0 in (R (C, R))2×2 the following matrices: A = , B = At . Then etr (A) = etr (B) = [2]0. −∞ [1]0   [2]0 [1]0 However, A + B = [1] , and pA+B (λ) = λ2 + [−4]0λ + [3]0. The monomial [−4]0λ is quasi0 [2]0 essential, and thus etr (A + B) = [0]0. Lemma 2.19. etr (AB) = etr (BA). 16 GUY BLACHAR AND EREZ SHEINER Proof. By Lemma 2.16, it is enough to check only simple cycles. Assume (AB)i1 ,i2 (AB)i2 ,i3 . . . (AB)ik ,i1 contributes to the dominant characteristic coefficient, where ij 6= ij ′ for j 6= j ′ . So there are ℓ1 , . . . , ℓk such that s = ai1 ,ℓ1 bℓ1 ,i2 ai2 ,ℓ2 bℓ2 ,i3 . . . aik ,ℓk bℓk ,i1 contributes to the dominant characteristic coefficient, i.e. τ (s) = etr (AB). If ℓj = ℓj ′ for j < j ′ , write    s = ai1 ,ℓ1 bℓ1 ,i2 . . . aij ,ℓj bℓj ,ij′ +1 . . . aik ,ℓk bℓk ,i1 bℓj ,ij+1 aij+1 ,ℓj+1 . . . aij′ ,ℓj′ =    = ai1 ,ℓ1 bℓ1 ,i2 . . . aij ,ℓj bℓj ,ij′ +1 . . . aik ,ℓk bℓk ,i1 aij+1 ,ℓj+1 . . . aij′ ,ℓj′ bℓj ,ij+1 {z }| {z } | s1 s2 Since τ (s) = τ (etr (AB)), τ (s1 ) ≥ τ (etr (AB)) or τ (s2 ) ≥ τ (etr (AB)). Since s1 and s2 are shorter, we get a contradiction. So ℓj 6= ℓj ′ for j 6= j ′ . So s = bℓ1 ,i2 ai2 ,ℓ2 bℓ2 ,i3 . . . aik ,ℓk bℓk ,i1 ai1 ,ℓ1 is a part of the simple cycle (BA)ℓ1 ,ℓ2 (BA)ℓ2 ,ℓ3 . . . (BA)ℓk ,ℓ1 in BA. So every simple cycle contributing to etr (AB) also contributes to etr (BA). By symmetry, the opposite is true as well; so etr (AB) = etr (BA).  Lemma 2.20. If there is a multicycle s = ai1 ,i2 ai2 ,i3 . . . aik ,i1 of length k ≥ 2 such that   τ tr (A)k < τ (s) then [−1]0tr (A) λn−1 is not essential in pA (λ) (meaning, it is either inessential or quasi-essential). In other words, µ (A) ≥ 2. Proof. Firstly, we may assume that k ≤ n; otherwise, write s as a product of multicycle, s = s1 . . . sj . Since j   X τ tr (A)k < τ (s) = τ (sℓ )  |sℓ |  ℓ=1 < τ (sℓ ), and we may replace k by ℓ. n X αi λn−i . By Lemma 2.15, Therefore, we assume k ≤ n. Write pA (λ) = λn + At least one sℓ should satisfy τ tr (A) i=1 ck = ai1 ,i2 ai2 ,i3 . . . aik ,i1 + · · · = s + · · · In particular, τ (ck ) ≥ τ (s). Also recall that c1 = [−1]0tr (A). Therefore,   k τ tr (A) τ (s) τ (ck ) τ (c1 ) = τ (tr (A)) = < ≤ k k k An thus µ (A) ≥ k ≥ 2, as required.  [−1]0tr (A) λn−1 Lemma 2.21. If A is ELT nilpotent, and if s (tr (A)) 6= 0, then is not essential in pA (λ). In other words, [−1]0tr (A) λn−1 is either quasi-essential or inessential in pA (λ). Proof. For this proof, write a ≤τ b if τ (a) ≤ τ (b), a <τ b if τ (a) < τ (b), and a ≡τ b if τ (a) = τ (b). We take some ai,i such that ai,i ≡τ tr (A) and s (ai,i ) 6= 0; without loss of generality, let i = 1. n X αi λn−i . Write pA (λ) = λn + i=1   By Lemma 2.14, Ak 1,1 = ak1,1 + · · · . Take k minimal such that s Ak = 0. In particular,    s Ak 1,1 = 0, so we have two cases: ELT LINEAR ALGEBRA II Case 1. 17 There is a multicycle s = a1,i2 ai2 ,i3 . . . aik ,1 with ak1,1 <τ s. Firstly, we may assume that k ≤ n; otherwise, write s as a product of multicycle, s = s1 . . . sj . Since  τ tr (A) k  < τ (s) = j X τ (sℓ ) ℓ=1   At least one sℓ should satisfy τ tr (A)|sℓ | < τ (sℓ ), and we may replace k by ℓ. n X αi λn−i . By Lemma 2.15, Therefore, we assume k ≤ n. Write pA (λ) = λn + i=1 ck = ai1 ,i2 ai2 ,i3 . . . aik ,i1 + · · · = s + · · · Case 2. In particular, τ (ck ) ≥ τ (s). Also recall that c1 = [−1]0tr (A). Therefore,   k τ tr (A) τ (s) τ (ck ) τ (c1 ) = τ (tr (A)) = < ≤ k k k An thus µ (A) ≥ k ≥ 2, as required. There is no multicycle with ak1,1 <τ a1,i2 ai2 ,i3 . . . aik ,1 . Then there has to be a multicycle    for which ak1,1 ≡τ a1,i2 ai2 ,i3 . . . aik ,1 = s (since s Ak 1,1 = 0, and ak1,1 is a summand in  the sum defining Ak 1,1 ). By writing s as a product of simple cycles, we may assume that each simple cycle aj1 ,j2 aj2 ,j3 . . . ajℓ ,j1 ≡τ aℓ1,1 (Otherwise, we are finished by the first case). Since ℓ < n, we get that |L (A)| ≥ 2, meaning [−1]0tr (A) λn−1 is quasi-essential in pA (λ).  Corollary 2.22. If A is ELT nilpotent, then s (etr (A)) = 0. Proof. There are two cases: (1) If s (tr (A)) = 0, then s (etr (A)) = 0 by Lemma 2.11. (2) Otherwise, s (tr (A)) 6= 0; but then s (etr (A)) = 0 by Lemma 2.21.  References [1] Marianne Akian, Guy Cohen, Stephane Gaubert, R Nikoukhah, and Jean Pierre Quadrat. Linear systems in (max,+) algebra. In Decision and Control, 1990., Proceedings of the 29th IEEE Conference on, pages 151–156. IEEE, 1990. [2] Marianne Akian, Stéphane Gaubert, and Alexander Guterman. Linear independence over tropical semirings and beyond. Contemporary Mathematics, 495:1, 2009. [3] Marianne Akian, Stéphane Gaubert, and Alexander Guterman. Tropical cramer determinants revisited. Tropical and Idempotent Mathematics and Applications, 616:45, 2014. [4] Guy Blachar and Erez Sheiner. Elt linear algebra. arXiv preprint arXiv:1603.02204, 2016. [5] Peter Butkovič. Max-algebra: the linear algebra of combinatorics? Linear Algebra and its applications, 367:313– 335, 2003. [6] Mike Develin, Francisco Santos, and Bernd Sturmfels. On the rank of a tropical matrix. Combinatorial and computational geometry, 52:213–242, 2005. [7] David Dolžan and Polona Oblak. Invertible and nilpotent matrices over antirings. arXiv preprint arXiv:0806.2996, 2008. [8] Ido Efrat. Valuations, orderings, and Milnor K-theory. Number 124. American Mathematical Soc., 2006. [9] Stéphane Gaubert. Théorie des systèmes linéaires dans les dioı̈des. PhD thesis, 1992. [10] Stephane Gaubert. Methods and applications of (max,+) linear algebra. In STACS 97, pages 261–282. Springer, 1997. [11] Zur Izhakian. Tropical arithmetic and matrix algebra. Communications in Algebra R , 37(4):1445–1468, 2009. [12] Zur Izhakian, Manfred Knebusch, and Louis Rowen. Dual spaces and bilinear forms in supertropical linear algebra. Linear and Multilinear Algebra, 60(7):865–883, 2012. [13] Zur Izhakian and Louis Rowen. The tropical rank of a tropical matrix. Communications in Algebra R , 37(11):3912–3927, 2009. [14] Zur Izhakian and Louis Rowen. Supertropical algebra. Advances in Mathematics, 225(4):2222–2286, 2010. 18 GUY BLACHAR AND EREZ SHEINER [15] Zur Izhakian and Louis Rowen. Supertropical matrix algebra. Israel Journal of Mathematics, 182(1):383–424, 2011. [16] Zur Izhakian and Louis Rowen. Supertropical matrix algebra II: Solving tropical equations. Israel Journal of Mathematics, 186(1):69–96, 2011. [17] Zur Izhakian and Louis Rowen. Supertropical matrix algebra III: Powers of matrices and their supertropical eigenvalues. Journal of Algebra, 341(1):125–149, 2011. [18] Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(12):83–97, 1955. [19] Brett Parker. Exploded manifolds. Advances in Mathematics, 229(6):3256–3319, 2012. [20] Louis Halle Rowen. Algebras with a negation map. arXiv preprint arXiv:1602.00353, 2016. [21] Sergei Sergeev. Max-plus definite matrix closures and their eigenspaces. Linear algebra and its applications, 421(2-3):182–201, 2007. [22] Erez Sheiner. Exploded Layered Tropical Algebra. PhD thesis, Bar-Ilan University, 2015. [23] Yijia Tan. On invertible matrices over antirings. Linear algebra and its applications, 423(2):428–444, 2007. [24] Jean-Pierre Tignol and R Adrian. Value functions on simple algebras, and associated graded rings. Springer, 2015. Department of Mathematics, Bar-Ilan University, Ramat-Gan 52900, Israel. E-mail address: [email protected] Department of Mathematics, Bar-Ilan University, Ramat-Gan 52900, Israel. E-mail address: [email protected]
0math.AC
arXiv:1707.05258v4 [math.AG] 28 Jul 2017 ON RATIONAL CUSPIDAL PLANE CURVES, AND THE LOCAL COHOMOLOGY OF JACOBIAN RINGS ALEXANDRU DIMCA1 Abstract. This note gives the complete projective classification of rational, cuspidal plane curves of degree at least 6, and having only weighted homogeneous singularities. It also sheds new light on some previous characterizations of free and nearly free curves in terms of Tjurina numbers. Finally, we suggest a stronger form of Terao’s conjecture on the freeness of a line arrangement being determined by its combinatorics. 1. Introduction The main result we prove in this note is the following. Theorem 1.1. Let C be a rational, cuspidal plane curve of degree d ≥ 6 such that C has only weighted homogeneous singularities. Then C is projectively equivalent to exactly one of the following φ(d)/2 models Cd,k : y d + xk z d−k = 0, where the integer k satisfies 1 ≤ k < d/2 and k is relatively prime to d. Here φ denotes the Euler function, with φ(d) counting the number of integers m, where 1 ≤ m ≤ d − 1 and m relatively prime to d. A slightly stronger result is stated and proved below, see Propositions 4.1 and 4.3. For detailed information on the rational, cuspidal plane curves of degree ≤ 5, we refer to [14] and the references given there. The curves Cd,k above are called binomial cuspidal curves in [14, Section 7.1]. The necessary restriction d ≥ 6 in Theorem 1.1 is discussed in Example 4.4 below. Theorem 1.1 is quite surprising, given that the classification of rational, cuspidal plane curves, even of those having at most two singularities, is rather complicated, see Sakai-Tono paper [16], or Propositions 3.1 and 3.2 in [9] where their results are quoted. It is known that there are no rational, cuspidal free curves of degree d ≥ 6 having only weighted homogeneous singularities, see [9, Theorem 2.8]. Theorem 1.1 says that if the word free is deleted from the above statement, only the binomial cuspidal curves may occur, and they are all nearly free. Note also that a weighted 2010 Mathematics Subject Classification. Primary 14H50; Secondary 14B05, 13D02, 32S22. Key words and phrases. Jacobian ideal, Tjurina number, free curve, nearly free curve. 1 This work has been supported by the French government, through the UCAJEDI Investments in the Future project managed by the National Research Agency (ANR) with the reference number ANR-15-IDEX-01. 1 2 ALEXANDRU DIMCA homogeneous cusp has only one Puiseux pair, but the class of plane curve singularities with exactly one Puiseux pair is much larger. This explains the complicated classification of rational unicuspidal curves with a unique Puiseux pair in [13]. To prove Theorem 1.1, we use a number of key results, proved by A. A. du Plessis and C.T.C. Wall in [11, 12], the main one being stated below in Theorem 3.1. To make our note more self-contained, we include a short proof of a similar result to Theorem 3.1, which we explain now. Let S = C[x, y, z] be the graded polynomial ring in three variables x, y, z and let C : f = 0 be a reduced curve of degree d in the complex projective plane P2 . The minimal degree of a Jacobian relation, or Jacobian syzygy, for the polynomial f is the integer mdr(f ) defined to be the smallest integer m ≥ 0 such that there is a nontrivial relation (1.1) afx + bfy + cfz = 0 among the partial derivatives fx , fy and fz of f with coefficients a, b, c in Sm , the vector space of homogeneous polynomials of degree m. When mdr(f ) = 0, then C is a union of lines passing through one point, a situation easy to analyse. We assume from now on that mdr(f ) ≥ 1. Denote by τ (C) the global Tjurina number of the curve C, which is the sum of the Tjurina numbers of the singular points of C. We denote by Jf the Jacobian ideal of f , i.e. the homogeneous ideal in S spanned by fx , fy , fz , and by M(f ) = S/Jf the corresponding graded ring, called the Jacobian (or Milnor) algebra of f . Let If denote the saturation of the ideal Jf with respect to the maximal ideal m = (x, y, z) in S and consider the local cohomology group 0 N(f ) = If /Jf = Hm (M(f ). It was shown in [6] that the graded S-module N(f ) satisfies a Lefschetz type property with respect to multiplication by generic linear forms. This implies in particular the inequalities 0 ≤ n(f )0 ≤ n(f )1 ≤ ... ≤ n(f )[T /2] ≥ n(f )[T /2]+1 ≥ ... ≥ n(f )T ≥ 0, where T = 3d − 6 and n(f )k = dim N(f )k for any integer k. We set ν(C) = max{n(f )j }. j When d = 2m is even, then the above implies that n(f )3m−3 = ν(C). When d = 2m + 1 is odd, then the above and the self duality of the graded S-module N(f ), see [17, 19], implies that n(f )3m−2 = n(f )3m−1 = ν(C). The second main result of this note is the following. Theorem 1.2. Let C : f = 0 be a reduced plane curve of degree d and let r = mdr(f ). Then the following hold. (1) If r < d/2, then ν(C) = (d − 1)2 − r(d − 1 − r) − τ (C). RATIONAL CUSPIDAL CURVES AND LOCAL COHOMOLOGY OF JACOBIAN RINGS 3 (2) If r ≥ (d − 2)/2, then ν(C) = ⌈ 3 (d − 1)2 ⌉ − τ (C). 4 Here, for any real number u, ⌈u⌉ denotes the round up of u, namely the smallest integer U such that U ≥ u. Written down explicitly, this means that for d = 2m is even and r ≥ m − 1, one has ν(C) = 3m2 − 3m + 1 − τ (C), while for d = 2m + 1 is odd and r ≥ m, one has ν(C) = 3m2 − τ (C). For (d − 2)/2 ≤ r < d/2, both formulas in (1) and (2) apply, and they give the same result for ν(C). The relation between Theorem 1.2 and du Plessis-Wall result in Theorem 3.1 is discussed in Remark 3.2 below. When C : f = 0 is a line arrangement, examples due to G. Ziegler show that the invariant mdr(f ) is not combinatorially determined, see [1, Example 4.3]. The above result suggests that the following stronger version of H. Terao’s conjecture, saying that the freeness of a line arrangement is combinatorially determined, might be true. For more on Terao’s conjecture and free hyperplane arrangements we refer to [3]. Conjecture 1.3. Let C : f = 0 be a line arrangement in P2 . Then the invariant ν(C) is combinatorially determined. For a reduced plane curve one may state the following. Conjecture 1.4. Let C : f = 0 be a reduced plane curve P2 . Then the invariant ν(C) is determined by the degree of C and the list of the analytic types of the isolated singularities of C. Some cases where these conjecture hold are described in Example 4.4 (i) (where the corresponding invariant mdr(f ) is not determined by the data stated in Conjecture 1.4), and in Proposition 3.5. 2. The proof of Theorem 1.2 Consider the graded S−submodule AR(f ) ⊂ S 3 of all relations involving the partial derivatives of f , namely ρ = (a, b, c) ∈ AR(f )m if and only if afx + bfy + cfz = 0 and a, b, c are in Sm . We set ar(f )k = dim AR(f )k for any integer k. Consider the rank two vector bundle T hCi = Der(−logC) of logarithmic vector fields along C, which is the coherent sheaf associated to the graded S-module AR(f )(1). Using the results in the third section of [7], for any integer k one has     d+k+2 k+3 + τ (C). − (2.1) χ(T hCi(k)) = 3 2 2 Moreover, one has the following for E = T hCi and any integer k, see [7], [17]. (2.2) h0 ((E(k)) = ar(f )k+1, h1 ((E(k)) = n(f )d+k and h2 ((E(k)) = ar(f )d−5−k . 4 ALEXANDRU DIMCA Assume that we are in the case d = 2m and apply the formulas (2.1) and (2.2) for k = m − 3. We get 2ar(f )m−2 − ν(C) = τ (C) − 3m2 + 3m − 1. Let r = mdr(f ) and note that ar(f )m−2 = 0 if r ≥ m − 1 = [(d − 1)/2] and   m−r ar(f )m−2 = dim Sm−2−r = 2 if r ≤ m − 2. Indeed, it follows from [18, Lemma 1.4] that the S-module AR(f ) cannot have two independent elemens of degree d1 and d2 satisfying d1 + d2 < d − 1. Assume next that we are in the case d = 2m + 1 and apply the formulas (2.1) and (2.2) again for k = m − 3. We get ar(f )m−2 − ν(C) + ar(f )m−1 = τ (C) − 3m2 . As above, if r = mdr(f ), we have ar(f )m−2 = ar(f )m−1 = 0 if r ≥ m = [(d − 1)/2] and     m−r+1 m−r and ar(f )m−1 = dim Sm−1−r = ar(f )m−2 = dim Sm−2−r = 2 2  if r ≤ m − 1, with the convention 12 = 0. These formulas, plus some simple computation, prove Theorem 1.2 stated in the Introduction. Remark 2.1. An alternative proof of Theorem 1.2 can be obtained using the results in [1]. Indeed, Proposition 3.2 in [1] implies that dL1 0 = r for r < (d − 2)/2 and dL1 0 = ⌊(d − 1)/2⌋ for r ≥ (d − 2)/2. Here (dL1 0 , dL2 0 ), with dL1 0 ≤ dL2 0 , denotes the splitting type of the vector bundle T hCi(−1) along a generic line L0 in P2 . Then [1, Theorem 1.1] says that (d − 1)2 − dL1 0 dL2 0 = τ (C) + ν(C). Since dL1 0 + dL2 0 = d − 1 by [1, Proposition 3.1], these facts give a new proof of Theorem 1.2. In view of this remark, Conjecture 1.3 may be restated as follows. Conjecture 2.2. Let C : f = 0 be a line arrangement in P2 . Then the generic splitting type (dL1 0 , dL2 0 ) of the vector bundle T hCi(−1) is combinatorially determined. 3. Some related results and direct applications We start this section by recalling the following result due to du Plessis and Wall, see [11, Theorem 3.2]. Theorem 3.1. For positive integers d and r, define two new integers by τ (d, r)min = (d − 1)(d − r − 1) and τ (d, r)max = (d − 1)2 − r(d − r − 1). Then, if C : f = 0 is a reduced curve of degree d in P2 and r = mdr(f ), one has τ (d, r)min ≤ τ (C) ≤ τ (d, r)max . RATIONAL CUSPIDAL CURVES AND LOCAL COHOMOLOGY OF JACOBIAN RINGS 5 Moreover, for r = mdr(f ) ≥ d/2, the stronger inequality   2r + 2 − d τ (C) ≤ τ (d, r)max − 2 holds. Remark 3.2. Let C : f = 0 be a reduced curve of degree d in P2 and r = mdr(f ). Note that the function τ (d, r)max , regarded as a function of r, occurs also in Theorem 1.2 (1), which can be restated as (3.1) τ (C) + ν(C) = τ (d, r)max , for r = mdr(f ) < d/2. The inequality τ (C) ≤ τ (d, r)max in Theorem 3.1 is made more precise, when r < d/2, by the result in Theorem 1.2 (1). On the other hand, note that τ (d, r)max is a decreasing (resp. increasing) function of r on the interval [0, (d − 1)/2] (resp. on the interval [(d − 1)/2, +∞)), and the number ⌈ 43 (d − 1)2 ⌉ that occurs in Theorem 1.2 (2) is precisely the minimum of the values of the function τ (d, r)max for r ∈ [0, (d − 1)/2] ∩ N. Hence Theorem 1.2 (2) implies only 3 τ (C) ≤ ⌈ (d − 1)2 ⌉, 4 for r ≥ d/2, which is weaker than the inequality in Theorem 3.1, though enough for many applications. At the end of the proof of Theorem 3.1, in [11], the authors state the following very interesting consequence (of the proof, not of the statement) of Theorem 3.1. Corollary 3.3. Let C : f = 0 be a reduced curve of degree d in P2 and r = mdr(f ). One has τ (C) = τ (d, r)max if and only if C : f = 0 is a free curve, and then r < d/2. Since a plane curve C is free if and only if ν(C) = 0, this characterization of free curves follows also from Theorem 1.2, as explained in Remark 3.2. In the paper [4], we have given an alternative proof of Corollary 3.3 and have shown that a plane curve C is nearly free, which can be defined by the property ν(C) = 1, if and only if a similar property holds. Namely, one has the following result, an obvious consequence of Theorem 1.2. Proposition 3.4. Let C : f = 0 be a reduced curve of degree d in P2 and r = mdr(f ). One has τ (C) = τ (d, r)max − 1 if and only if C : f = 0 is a nearly free curve, and then r ≤ d/2. Concerning Conjecture 1.3 in Introduction we have the following. 6 ALEXANDRU DIMCA Proposition 3.5. Let C be a plane curve of degree d such that, for d = 2m (resp. d = 2m + 1) one has τ (C) < τ (d, m − 2)min = (m + 1)(2m − 1) (resp. τ (C) < τ (d, m − 1)min = 2m(m + 1)). Then 3 (d − 1)2 ⌉ − τ (C). 4 In particular, if C be a line arrangement (resp. a reduced plane curve) satisfying these inequalities, then Conjecture 1.3 (resp. Conjecture 1.4) holds for C. ν(C) = ⌈ Proof. We give the proof only in the case d = 2m even. The function τ (d, r)min is a strictly decreasing function of r on R, so Theorem 3.1 implies that r = mdr(f ) ≥ m − 1. But then Theorem 1.2 (2) implies that ν(C) is determined by d and τ (C). When C is a line arrangement, d and τ (C) are both combinatorially determined. For a plane curve in general, τ (C) is determined by the analytic type of the local singularities, but not by their topological type.  Example 3.6. Let C = A : f = 0 be a line arrangement consisting of d lines. For d = 6, there are 10 possibilities for the intersection lattice L(A), see for details [5, Section 5.6]. Out of them, 8 satisfy the inequality τ (A) < 20 from Proposition 3.5. For d = 6, r = mdr(f ) is determined by the intersection lattice L(A), and there are exactly 8 lattices with r ≥ 2. For d = 7, there are 23 possibilities for the intersection lattice L(A). Out of them, only 4 satisfy the inequality τ (A) < 24 from Proposition 3.5. For d = 7, r = mdr(f ) is again determined by the intersection lattice L(A), and there are exactly 19 lattices with r ≥ 3, for which ν(C) = ν(A) is given by the formula in Proposition 3.5. It would be interesting to find a lower bound for τ (A) in terms of d and r, in the case of line arrangements, which is better than the bound τ (r)min given by Theorem 3.1. 4. The proof of Theorem 1.1 The following result is related to the main conjecture in [10], namely that a rational, cuspidal plane curve is either free or nearly free. It is also the first step in proving Theorem 1.1. Recall that a plane curve C has only weighted homogeneous singularities if and only if µ(C) = τ (C), where µ(C) denotes the sum of all the Milnor numbers of the singularities of C, see [15]. In general one has the obvious inequality τ (C) ≤ µ(C). Proposition 4.1. Let C : f = 0 be an irreducible curve in P2 , of degree d ≥ 6. Then the following properties are equivalent. (1) τ (C) ≥ d2 − 4d + 8. (2) r = mdr(f ) = 1 (3) C is a rational, cuspidal plane curve such that µ(C) = τ (C), i.e. C has only weighted homogeneous singularities. If any of these properties hold, then C is a nearly free curve. RATIONAL CUSPIDAL CURVES AND LOCAL COHOMOLOGY OF JACOBIAN RINGS 7 Proof. To prove that (1) implies (2), recall that the function τ (d, r)max is a decreasing function of r on the interval [1, (d − 1)/2] and note that τ (d, r)max = τ (d, r ′ )max for r + r ′ = d − 1. For r = 2 we get τ (d, 2)max = d2 − 4d + 7. Then (1) implies that r = mdr(f ) has to be 1. Indeed, the value r = d − 2 is excluded using the stronger final inequality in Theorem 3.1. Note that Theorem 1.2 (2) is also enough for this purpose, as discussed in Remark 3.2. To prove that (2) implies (3), note that τ (d, 1)min = d2 − 3d + 2 ≤ τ (C) ≤ τ (d, 1)max = d2 − 3d + 3. The genus g(C) is given by 2g(C) = (d − 1)(d − 2) − X (µ(C, p) + r(C, p) − 1), p where p runs through the singular points of C, µ(C, p) is the Milnor number of the singularity (C, p) and r(C, p) is the number of its branches. It follows that X µ(C, p) ≤ (d − 1)(d − 2), µ(C) = p with equality if and only if C is a rational cuspidal curve. Then the inequality τ (C) ≤ µ(C) ≤ (d − 1)(d − 2) forces the equality τ (d, 1)min = d2 − 3d + 2 = τ (C) and we see that C is nearly free using Proposition 3.4. The fact that (3) implies (1) is obvious as soon as d ≥ 6.  Remark 4.2. Irreducible, cuspidal nearly free curves satisfying µ(C) = τ (C), but not rational have been constructed in [2]. For instance, for any odd integer k ≥ 1, it is shown that the irreducible curve C2k : f = x2k + y 2k + z 2k − 2(xk y k + xk z k + y k z k ) = 0, has 3k singular points of type Ak−1 as singularities, it is a nearly free curve with mdr(f ) = k and has genus g(C2k ) = (k − 1)(k − 2) . 2 For k = 3, we have in this case τ (C) = 18 < τ (d, 2)max + 1 = 20. The following result completes the proof of Theorem 1.1. Proposition 4.3. Let C : f = 0 be an irreducible plane curve of degree d ≥ 6 such that mdr(f ) = 1. Then C is projectively equivalent to exactly one of the following φ(d)/2 models Cd,k : y d + xk z d−k = 0, where the integer k satisfies 1 ≤ k < d/2 and k is relatively prime to d. 8 ALEXANDRU DIMCA Proof. Using Proposition 4.1 and [12, Proposition 1.1], we see that C has a 1dimensional symmetry, i.e. it admits a 1-dimensional algebraic subgroup H ′ of P GL2 (C) as automorphism group. This group lifts uniquely to an algebraic 1parameter subgroup H of GL3 (C), not contained in the center and preserving not only the curve C, but also its defining equation f . Such a subgroup H may be either semi-simple or nilpotent, and [12, Proposition 3.1] tells us that only the semi-simple case can occur for our situation. Indeed, as in the proof above, we know that τ (C) = (d − 1)(d − 2) = d2 − 3d + 2. Note that the statement of [12, Proposition 3.1] should be slightly corrected, namely the part ” if y d has non-zero coefficient in f ” is to be replaced by ” if y d has zero coefficient in f ”. Once we know that H is semi-simple, we can assume that H = C∗ acting on P2 via t · [x : y : z] = [tw1 x : tw2 y : tw3 z], for some integers wj . Then using the discussion and the notation on page 120 in [12], we see that the only possibilities to get irreducible curves correspond to line segments Aαk for 1 ≤ k < d/2 and k relatively prime to d.  Example 4.4. (i) Consider the following two rational cuspidal quartics C : f = y 4 − xz 3 = 0 and C ′ : f ′ = y 4 − xz 3 − y 3z. Then both curves have an E6 -singularity located at [1 : 0 : 0], hence they have only weighted homogeneous singularities. However, as noticed in [14, Section 7.1], in the final part on semi-binomial curves, C and C ′ are not projectively equivalent. This follows there from the fact that C (resp. C ′ ) has one (resp. two) inflection points. From our point of view, the difference between C and C ′ is that mdr(f ) = 1, while mdr(f ′ ) = 2, as a direct computation shows. Note that both curves C and C ′ are nearly free, since one has τ (C) = τ (C ′ ) = 6 = τ (4, 1)max − 1 = τ (4, 2)max − 1. Similar semi-binomial rational cuspidal curves C : f = 0 of arbitrary degree d, with a unique Puiseux pair and τ (C) < µ(C), and with all the possible values for r = mdr(f ) ∈ [2, d/2], are discussed in [8]. (ii) For d = 5, any rational cuspidal curve with 4 cusps is projectively equivalent to C : f = 16x4 y + 128x2 y 2z − 4x3 z 2 + 256y 3z 2 − 144xyz 3 + 27z 5 = 0, see for instance the discussion of the curve C8 = [(23 ), (2), (2), (2)] in [14, Section 6.3]. This curve has three A2 cusps and one A6 cusp, hence only weighted homogeneous singularities. A direct computation shows that mdr(f ) = 2 and that τ (C) = τ (5, 2)max , and therefore C is a free curve. It is surprizing that the condition d ≥ 6 in our results above avoids complicated situations as (i) and (ii) in this example. RATIONAL CUSPIDAL CURVES AND LOCAL COHOMOLOGY OF JACOBIAN RINGS 9 References [1] T. Abe, A. Dimca, On the splitting types of bundles of logarithmic vector fields along plane curves, arXiv:1706.05146 1, 2.1 [2] E. Artal Bartolo, L. Gorrochategui, I. Luengo, A. Melle-Hernández, On some conjectures about free and nearly free divisors, in: Singularities and Computer Algebra, Festschrift for Gert-Martin Greuel on the Occasion of his 70th Birthday, pp. 1–19, Springer (2017) 4.2 [3] A. Dimca, Hyperplane Arrangements: An Introduction, Universitext, Springer, 2017 1 [4] A. Dimca, Freeness versus maximal global Tjurina number for plane curves, Math. Proc. Cambridge Phil. Soc. 163 (2017), 161–172. 3 [5] A. Dimca, D. Ibadula, A. Măcinic, Numerical invariants and moduli spaces for line arrangements, arXiv:1609.06551. 3.6 [6] A. Dimca, D. Popescu, Hilbert series and Lefschetz properties of dimension one almost complete intersections, Comm. Algebra 44 (2016), 4467–4482. 1 [7] A. Dimca, E. Sernesi, Syzygies and logarithmic vector fields along plane curves, Journal de l’École polytechnique-Mathématiques 1(2014), 247-267. 2, 2 [8] A. Dimca, G. Sticlaru, On the exponents of free and nearly free projective plane curves, Rev. Mat. Complut. 30(2017), 259–268. 4.4 [9] A. Dimca, G. Sticlaru, Free divisors and rational cuspidal plane curves, arXiv:1504.01242, to appear in MRL. 1 [10] A. Dimca, G. Sticlaru, Nearly free divisors and rational cuspidal curves, arXiv:1505.00666. 4 [11] A.A. du Plessis, C.T.C. Wall, Application of the theory of the discriminant to highly singular plane curves, Math. Proc. Cambridge Phil. Soc., 126(1999), 259-266. 1, 3, 3 [12] A.A. du Plessis and C.T.C. Wall, Curves in P 2 (C) with 1-dimensional symmetry, Revista Mat Complutense 12 (1999), 117–132. 1, 4 [13] J. Fernandez de Bobadilla, I. Luengo, A. Melle-Hernandez, A. Nemethi, Classification of rational unicuspidal projective curves whose singularities have one Puiseux pair, in: Real and Complex Singularities Sao Carlos 2004, Trends in Mathematics, Birkhauser 2006, pp. 31-45. 1 [14] T. K. Moe, Rational Cuspidal Curves, arXiv:1511.02691 (139 pages, Master thesis 2008) 1, 4.4 [15] K. Saito, Quasihomogene isolierte Singularitäten von Hyperflächen, Invent. Math., 14 (1971), 123–142. 4 [16] F. Sakai, K. Tono, Rational cuspidal curves of type (d,d-2) with one or two cusps, Osaka J. Math. 37(2000), 405-415. 1 [17] E. Sernesi, The local cohomology of the jacobian ring, Documenta Mathematica, 19 (2014), 541-565. 1, 2 [18] A. Simis, S.O. Tohăneanu, Homology of homogeneous divisors, Israel J. Math. 200 (2014), 449-487. 2 [19] D. van Straten, T. Warmt, Gorenstein duality for one-dimensional almost complete intersections–with an application to non-isolated real singularities, Math. Proc.Cambridge Phil. Soc.158(2015), 249–268. 1 Université Côte d’Azur, CNRS, LJAD, France E-mail address: [email protected]
0math.AC
1 Compact Hash Code Learning with Binary Deep Neural Network arXiv:1712.02956v2 [cs.CV] 6 Feb 2018 Thanh-Toan Do, Dang-Khoa Le Tan, Tuan Hoang, Ngai-Man Cheung Abstract—In this work, we firstly propose deep network models and learning algorithms for learning binary hash codes given image representations under both unsupervised and supervised manners. Then, by leveraging the powerful capacity of convolutional neural networks, we propose an end-to-end architecture which jointly learns to extract visual features and produce binary hash codes. Our novel network designs constrain one hidden layer to directly output the binary codes. This addresses a challenging issue in some previous works: optimizing nonsmooth objective functions due to binarization. Additionally, we incorporate independence and balance properties in the direct and strict forms into the learning schemes. Furthermore, we also include similarity preserving property in our objective functions. Our resulting optimizations involving these binary, independence, and balance constraints are difficult to solve. We propose to attack them with alternating optimization and careful relaxation. Experimental results on the benchmark datasets show that our proposed methods compare favorably with the state of the art. I. I NTRODUCTION We are interested in learning binary hash codes for visual search problems. Given an input image treated as a query, the visual search systems search for visually similar images in a database. In the state-of-the-art image retrieval systems [1], [2], [3], [4], images are represented as high-dimensional feature vectors which later can be searched via classical distance such as the Euclidean or Cosin distance. However, when the database is scaled up, there are two main requirements for retrieval systems, i.e., efficient storage and fast search. Among solutions, binary hashing is an attractive approach for achieving those requirements [5], [6], [7], [8] due to its fast computation and efficient storage. Briefly, in binary hashing problem, each original high dimensional vector x ∈ RD is mapped into a very compact binary vector b ∈ {−1, 1}L , where L  D. Many hashing methods have been proposed in the literature. They can be divided into two categories: data-independence methods and data-dependence methods. The former ones [9], [10], [11], [12] rely on random projections to construct hash functions. The representative methods in this category are Locality Sensitive Hashing (LSH) [9] and its kernelized or discriminative extensions [10], [11]. The latter ones use the available training data to learn the hash functions in unsupervised [13], [14], [15], [16], [17] or (semi-)supervised [18], [19], [20], [21], [22], [23], [24] manners. The prepresentative Thanh-Toan Do is with The University of Adelaide, Australia. Dang-Khoa Le Tan, Tuan Hoang, Ngai-Man Cheung are with Singapore University of Technology and Design, Singapore. Email: thanhtoan [email protected]; {letandang khoa, nguyenanhtuan hoang, ngaiman cheung}@sutd.edu.sg. unsupervised hashing methods, e.g. Spectral Hashing [13], Iterative Quantization (ITQ) [14], K-means Hashing [15], Spherical Hashing [16], try to learn binary codes which preserve the distance similarity between samples. The prepresentative supervised hashing methods, e.g., ITQ-CCA [14], Binary Reconstructive Embedding [23], Kernel Supervised Hashing [19], Two-step Hashing [22], Supervised Discrete Hashing [24], try to learn binary codes which preserve the label similarity between samples. The detailed review of data-independent and data-dependent hashing methods can be found in the recent surveys [5], [6], [7], [8]. One difficult problem in hashing is to deal with the binary constraint on the codes. Specifically, the outputs of the hash functions have to be binary. In general, this binary constraint leads to an NP-hard mixed-integer optimization problem. To handle this difficulty, most aforementioned methods relax the constraint during the learning of hash functions. With this relaxation, the continuous codes are learned first. Then, the codes are binarized (e.g., by thresholding). This relaxation greatly simplifies the original binary constrained problem. However, the solution can be suboptimal, i.e., the binary codes resulting from thresholded continuous codes could be inferior to those that are obtained by directly including the binary constraint in the learning. Furthermore, a good hashing method should produce binary codes with the following properties [13]: (i) similarity preserving, i.e., (dis)similar inputs should likely have (dis)similar binary codes; (ii) independence, i.e., different bits in the binary codes are independent to each other so that no redundant information is captured; (iii) bit balance, i.e., each bit has a 50% chance of being 1 or −1. Note that direct incorporation of the independent and balance properties can complicate the learning. Previous works have used some relaxation or approximation to overcome the difficulties [14], [20], but there may be some performance degradation. Recently, the deep learning has given great attention to the computer vision community due to its superiority in many vision tasks such as classification, detection, segmentation [25], [26], [27]. Inspired by the success of deep learning in different vision tasks, recently, some researchers have used deep learning for joint learning image representations and binary hash codes in an end-to-end deep learning-based supervised hashing framework [28], [29], [30], [31]. However, learning binary codes in deep networks is challenging. This is because one has to deal with the binary constraint on the hash codes, i.e., the final network outputs must be binary. A naive solution is to adopt the sign activation layer to produce binary codes. However, due to the 2 non-smoothness of the sign function, it causes the vanishing gradient problem when training the network with the standard back propagation [32]. Contributions: In this work, firstly, we propose a novel deep network model and a learning algorithm for unsupervised hashing. In order to achieve binary codes, instead of involving the sgn or step function as in recent works [33], [34], our proposed network design constrains one layer to directly output the binary codes (therefore, the network is named as Binary Deep Neural Network). In addition, we propose to directly incorporate the independence and balance properties. Furthermore, we include the similarity preserving in our objective function. The resulting optimization with these binary and direct constraints is NP-hard. We propose to attack this challenging problem with alternating optimization and careful relaxation. Secondly, in order to enhance the discriminative power of the binary codes, we extend our method to supervised hashing by leveraging the label information so that the binary codes preserve the semantic similarity between samples. Finally, to demonstrate the flexibility of our proposed method and to leverage the powerful capacity of convolution deep neural networks, we adapt our optimization strategy and the proposed supervised hashing model to an end-to-end deep hashing network framework. The solid experiments on various benchmark datasets show the improvements of the proposed methods over state-of-the-art hashing methods. A preliminary version of this work has been reported in [35]. In this work, we present substantial extension to our previous work. In particular, the main extension is that we propose the end-to-end binary deep neural network framework which jointly learns the image features and the binary codes. The experimental results show that the proposed end-to-end hashing framework significantly boosts the retrieval accuracy. Other minor extensions are we conduct more experiments (e.g., new experiments on SUN397 dataset [36], comparison to state-of-the-art end-to-end hashing methods) to evaluate the effectiveness of the proposed methods. The remaining of this paper is organized as follows. Section II presents related works. Section III presents and evaluates the proposed unsupervised hashing method. Section IV presents and evaluates the proposed supervised hashing method. Section V presents and evaluates the proposed endto-end deep hashing network. Section VI concludes the paper. II. R ELATED WORK Our work is inspired by the recent successful hashing methods which define hash functions as a neural network [37], [33], [38], [34], [28], [29], [30]. We propose an improved design to address their limitations. In Semantic Hashing [37], the model is formed by a stack of Restricted Boltzmann Machine, and a pretraining step is required. Additionally, this model does not consider the independence and balance of the codes. In Binary Autoencoder [34], a linear autoencoder is used as hash functions. As this model only uses one hidden layer, it may not well capture the information of inputs. Extending [34] with multiple, nonlinear layers is not straight-forward because of the binary constraint. They also do not consider the independence and balance of codes. In Deep Hashing [33], [38], a deep neural network is used as a hash function. However, this model does not fully take into account the similarity preserving. They also apply some relaxation in arriving the independence and balance of codes and this may degrade the performance. In the end-to-end deep hashing [29], [30], the independence and balance of codes are not considered. In order to handle the binary constraint, Semantic Hashing [37] first solves the relaxed problem by discarding the constraint and then thresholds the solved continuous solution. In Deep Hashing (DH) [33], [38], the output of the last layer, H(n) , is binarized by the sgn function. They include a term in the objective function to reduce this binarization  loss: sgn(H(n) ) − H(n) . Solving the objective function of DH [33], [38] is difficult because the sgn function is non-differentiable. The authors in [33], [38] overcome this difficulty by assuming that the sgn function is differentiable everywhere. In Binary Autoencoder (BA) [34], the outputs of the hidden layer are passed into a step function to binarize the codes. Incorporating the step function in the learning leads to a non-smooth objective function, hence the optimization is NP-complete. To handle this difficulty, the authors [34] use binary SVMs to learn the model parameters in the case when there is only a single hidden layer. Joint learning image representations and binary hash codes in an end-to-end deep learning-based supervised hashing framework [28], [29], [30] has shown considerable boost in retrieval accuracy. By joint optimization, the produced hash codes are more sufficient to preserve the semantic similarity between images. In those works, the network architectures often consist of a feature extraction sub-network and a subsequent hashing layer to produce hash codes. Ideally, the hashing layer should adopt a sign activation function to output exactly binary codes. However, due to the vanishing gradient difficulty of the sign function, an approximation procedure must be employed. For example, sign can be approximated by a tanh-like function y = tanh(βx), where β is a free parameter controlling the trade off between the smoothness and the binary quantization loss [29]. However, it is nontrivial to determine an optimal β. A small β causes large binary quantization loss while a big β makes the output of the function close to the binary values, but the gradient of the function almost vanishes, making back-propagation infeasible. The problem still remains when the logistic-like functions [28], [30] are used. III. U NSUPERVISED H ASHING WITH B INARY D EEP N EURAL N ETWORK (UH-BDNN) A. Formulation of UH-BDNN For easy following, we first summarize the notations in Table I. In our work, the hash functions are defined by a deep neural network. In our proposed architecture, we use different activation functions in different layers. Specifically, we use the sigmoid function as the activation function for layers 2, · · · , n − 2, and the identity function as the activation 3 codes. The second term is a regularization that tends to decrease the magnitude of the weights, and this helps to prevent overfitting. Note that in our proposed design, we constrain the network to directly output the binary codes at one layer, which avoids the difficulty of the sgn / step function which is nondifferentiability. On the other hand, our formulation with (1) under the binary constraint (2) is very difficult to solve. It is a mixed-integer problem which is NP-hard. In order to attack the problem, we propose to introduce an auxiliary variable B and use alternating optimization. Consequently, we reformulate the objective function (1) under constraint (2) as the following TABLE I N OTATIONS AND THEIR CORRESPONDING MEANINGS . Notation X Meaning D×m : set of m training samples; X = {xi }m i=1 ∈ R each column of X corresponds to one sample L×m : binary code of X B = {bi }m i=1 ∈ {−1, +1} Number of required bits to encode a sample Number of layers (including input and output layers) Number of units in layer l Activation function of layer l W(l) ∈ Rsl+1 ×sl : weight matrix connecting layer l + 1 and layer l c(l) ∈ Rsl+1 :bias vector for units in layer l + 1 H(l) = f (l) W(l−1) H(l−1) + c(l−1) 11×m : output values of layer l; convention: H(1) = X Matrix has a rows, b columns and all elements equal to 1 B L n sl f (l) W(l) c(l) H(l) 1a×b min J W,c,B = 1 X − W(n−1) B − c(n−1) 11×m 2m + Layer 1 (input layer) Layer 2 Layer 𝑛 − 2 𝑾(1) Layer 𝑛 − 1 Output 𝑯(𝑛−1) ∈ −1,1 and is used as binary code 𝑾(𝑛−2) Layer 𝑛 (reconstruction layer) Output 𝐇 (n) ≈ 𝑿 𝑾(𝑛−1) W,c   1 X − W(n−1) H(n−1) + c(n−1) 11×m 2m + n−1 λ1 X W(l) 2 l=1 2 2 s.t. H(n−1) ∈ {−1, 1}L×m (3) (4) B ∈ {−1, 1}L×m . function for layer n − 1 and layer n. Our idea is to learn the network such that the output values of the penultimate layer (layer n − 1) can be used as the binary codes. We introduce constraints in the learning algorithm such that the output values at the layer n − 1 have the following desirable properties: (i) belonging to {−1, 1}; (ii) similarity preserving; (iii) independence and (iv) balancing. Fig. 1 illustrates our network for the case D = 4, L = 2. Let us start with first two properties of the codes, i.e., belonging to {−1, 1} and similarity preserving. To achieve the binary codes having these two properties, we propose to optimize the following constrained objective function = 2 s.t. B = H(n−1) , Fig. 1. The illustration of our UH-BDNN (D = 4, L = 2). In our proposed network design, the outputs of layer n − 1 are constrained to {−1, 1} and are used as the binary codes. During training, these codes are used to reconstruct the input samples at the final layer. min J n−1 λ1 X W(l) 2 l=1 2 (1) (2) The constraint (2) is to ensure the first property. As the activation function for the last layer is the identity function, the term W(n−1) H(n−1) + c(n−1) 11×m is the output of the last layer. The first term of (1) makes sure that the binary code gives a good reconstruction of X. It is worth noting that the reconstruction criterion has been used as an indirect approach for preserving the similarity in state-ofthe-art unsupervised hashing methods [14], [34], [37], i.e., it encourages (dis)similar inputs map to (dis)similar binary (5) The benefit of introducing the auxiliary variable B is that we can decompose the difficult constrained optimization problem (1) into two sub-optimization problems. Consequently, we are able to iteratively solve the optimization problem by using alternating optimization with respect to (W, c) and B while holding the other fixed. Inspired from the quadratic penalty method [39], we relax the equality constraint (4) by converting it into a penalty term. We achieve the following constrained objective function min J = W,c,B 1 X − W(n−1) B − c(n−1) 11×m 2m + n−1 λ1 X W(l) 2 l=1 2 + 2 λ2 H(n−1) − B 2m 2 (6) s.t. B ∈ {−1, 1}L×m , (7) in which, the third term in (6) measures the (equality) constraint violation. By setting the penalty parameter λ2 sufficiently large, we penalize the constraint violation severely, thereby forcing the minimizer of the penalty function (6) closer to the feasible region of the original constrained function (3). We now consider the two remaining properties of the codes, i.e., independence and balance. Unlike previous works which use some relaxation or approximation on the independence and balance properties [14], [33], [20], we propose to encode these properties strictly and directly based on the binary outputs of our layer n − 1. Specifically, we encode the independence and balance properties of the codes by introducing the fourth and the fifth terms respectively in the following constrained objective function min J W,c,B = 1 X − W(n−1) B − c(n−1) 11×m 2m + n−1 λ1 X W(l) 2 l=1 + λ3 2 2 + λ2 H(n−1) − B 2m 1 (n−1) (n−1) T H (H ) −I m s.t. B ∈ {−1, 1}L×m . 2 + 2 2 λ4 H(n−1) 1m×1 2m 2 (8) (9) 4 The objective function (8) under constraint (9) is our final formulation. Before discussing how to solve it, let us present the differences between our work and the recent deep learning based hashing models Deep Hashing [33], Binary Autoencoder [34], and end-to-end hashing methods [28], [29], [30]. The main important difference between our model and other deep learning-based hashing methods Deep Hashing [33], Binary Autoencoder [34], end-to-end hashing [28], [29], [30] is the way to achieve the binary codes. Instead of involving the sgn, step function as in [33], [34] or the relaxation of sgn as sigmoid [28], [30], tanh [29], we constrain the network to directly output the binary codes at one layer. Other differences to the most related works Deep Hashing [33] and Binary Autoencoder [34] are presented as follows. a) Comparison to Deep Hashing (DH) [33], [38]: the deep model of DH is learned by the following objective function α1  (n) (n) T  tr H (H ) W,c 2m  n−1 n−1  2 2 2 α3 X α2 X W(l) (W(l) )T − I + W(l) + c(l) + 2 l=1 2 l=1 min J = 1 sgn(H(n) ) − H(n) 2 2 − The DH’s model does not have the reconstruction layer. The authors apply the sgn function to the outputs at the top layer of the network to obtain the binary codes. The first term aims to minimize quantization loss by applying the sgn function to the outputs at the top layer. The balancing and the independent properties are presented in the second and the third terms. It is worth noting that minimizing DH’s objective function is difficult due to the non-differentiability of the sgn function. The authors work around this difficulty by assuming that the sgn function is differentiable everywhere. Contrary to DH, we propose a different model design. In particular, our model encourages the similarity preserving by obtaining the reconstruction layer in the network.For the balancing property, they maximize tr H(n) (H(n) )T . According to [20], maximizing this term is only an approximation in arriving the balancing property. In our objective function, the balancing property is directly enforced on the codes 2 by the term H(n−1) 1m×1 . For the independent property, DH uses a relaxed orthogonality constraint on the network 2 weights W, i.e., W(l) (W(l) )T − I . On the contrary, we (once again) directly constrain the code independence using 2 1 (n−1) (H(n−1) )T − I . Incorporating the direct conmH straints can lead to better performance. b) Comparison to Binary Autoencoder (BA) [34]: the differences between our model and BA are quite clear. Firstly, BA, as described in [34], is a shallow linear autoencoder network with one hidden layer. Secondly, the BA’s hash function is a linear transformation of the input followed by the step function to obtain the binary codes. In BA, by treating the encoder layer as binary classifiers, they use binary SVMs to learn the weights of the linear transformation. On the contrary, our hash function is defined by multiple, hierarchical layers of nonlinear and linear transformations. It is not clear if the binary SVMs approach in BA can be used to learn the weights in our deep architecture with multiple layers. Instead, we use alternating optimization to derive a backpropagation algorithm to learn the weights in all layers. Additionally, another difference is that our model ensures the independence and balance of the binary codes while BA does not. Note that independence and balance properties may not be easily incorporated in their framework, as these would complicate their objective function and the optimization problem may become very difficult to solve. B. Optimization In order to solve (8) under constraint (9), we propose to use alternating optimization over (W, c) and B. 1) (W, c) step: When fixing B, the problem becomes the unconstrained optimization. We use L-BFGS [40] optimizer with backpropagation for solving. The gradients of the objective function J (8) w.r.t. different parameters are computed as follows. At l = n − 1, we have −1 ∂J (X − W(n−1) B − c(n−1) 11×m )BT + λ1 W(n−1) = m ∂W(n−1) (10)  ∂J −1  (n−1) (n−1) (X − W B)1 − mc = (11) m×1 m ∂c(n−1) For other layers, let us define ∆(l)   λ2  (n−1) H −B m   2λ3 1 (n−1) (n−1) T + H (H ) − I H(n−1) m m  0 λ4  (n−1) H 1m×m f (n−1) (Z(n−1) ) (12) + m   0 = (W(l) )T ∆(l+1) f (l) (Z(l) ), ∀l = n − 2, · · · , 2 (13) ∆(n−1) = where Z(l) = W(l−1) H(l−1) + c(l−1) 11×m , l = 2, · · · , n; denotes the Hadamard product. Then, ∀l = n − 2, · · · , 1, we have ∂J = ∆(l+1) (H(l) )T + λ1 W(l) ∂W(l) (14) ∂J = ∆(l+1) 1m×1 ∂c(l) (15) 2) B step: When fixing (W, c), we can rewrite problem (8) as min J B = X − W(n−1) B − c(n−1) 11×m +λ2 H(n−1) − B 2 2 s.t. B ∈ {−1, 1}L×m . (16) (17) We adaptively use the recent method discrete cyclic coordinate descent [24] to iteratively solve B, i.e., row by row. The advantage of this method is that if we fix L − 1 rows of B and only solve for the remaining row, we can achieve a closed-form solution for that row. Let V = X−c(n−1) 11×m ; Q = (W(n−1) )T V+λ2 H(n−1) . For k = 1, · · · L, let wk be k th column of W(n−1) ; W1 be matrix W(n−1) excluding wk ; qk be k th column of QT ; bTk be k th row of B; B1 be matrix of B excluding bTk . We have closed-form for bTk as T T bT k = sgn(q − wk W1 B1 ). (18) 5 Algorithm 1 Unsupervised Hashing with Binary Deep Neural Network (UH-BDNN) Input: D×m : training data; L: code length; T : maximum X = {xi }m i=1 ∈ R iteration number; n: number of layers; {sl }n l=2 : number of units of layers 2 → n (note: sn−1 = L, sn = D); λ1 , λ2 , λ3 , λ4 . Output: Parameters {W(l) , c(l) }n−1 l=1 1: Initialize B(0) ∈ {−1, 1}L×m using ITQ [14] (l) n−2 2: Initialize {c(l) }n−1 l=1 = 0sl+1 ×1 . Initialize {W }l=1 by getting the top sl+1 eigenvectors from the covariance matrix of H(l) . Initialize W(n−1) = ID×L 3: Fix B(0) , compute (W, c)(0) with (W, c) step using initialized {W(l) , c(l) }n−1 l=1 (line 2) as starting point for L-BFGS. 4: for t = 1 → T do 5: Fix (W, c)(t−1) , compute B(t) with B step 6: Fix B(t) , compute (W, c)(t) with (W, c) step using (W, c)(t−1) as starting point for L-BFGS. 7: end for 8: Return (W, c)(T ) The proposed UH-BDNN method is summarized in Algorithm 1. In the Algorithm 1, B(t) and (W, c)(t) are values of B and {W(l) , c(l) }n−1 l=1 at iteration t, respectively. C. Evaluation of Unsupervised Hashing with Binary Deep Neural Network (UH-BDNN) This section evaluates the proposed UH-BDNN and compares it with the following state-of-the-art unsupervised hashing methods: Spectral Hashing (SH) [13], Iterative Quantization (ITQ) [14], Binary Autoencoder (BA) [34], Spherical Hashing (SPH) [16], K-means Hashing (KMH) [15]. For all compared methods, we use the implementations and the suggested parameters provided by the authors. 1) Dataset, evaluation protocol, and implementation notes: a) Dataset: CIFAR10 [41] dataset consists of 60,000 images of 10 classes. The training set (also used as the database for the retrieval) contains 50,000 images. The query set contains 10,000 images. Each image is represented by a 800-dimensional feature vector extracted by PCA from 4096dimensional CNN feature produced by the AlexNet [25]. MNIST [42] dataset consists of 70,000 handwritten digit images of 10 classes. The training set (also used as database for retrieval) contains 60,000 images. The query set contains 10,000 images. Each image is represented by a 784 dimensional gray-scale feature vector by using its intensity. SIFT1M [43] dataset contains 128 dimensional SIFT vectors [44]. There are 1M vectors used as database for retrieval; 100K vectors for training (separated from retrieval database) and 10K vectors for query. b) Evaluation protocol: We follow the standard setting in unsupervised hashing methods [14], [16], [15], [34] which use Euclidean nearest neighbors as the ground truths for queries. The number of ground truths are set as in [34], i.e., for CIFAR10 and MNIST datasets, for each query, we use 50 its Euclidean nearest neighbors as the ground truths; for large scale dataset SIFT1M, for each query, we use 10, 000 its Euclidean nearest neighbors as the ground truths. We use the following evaluation metrics which have been used in the state of the art [14], [34], [33] to measure the performance of methods. 1) mean Average Precision (mAP); 2) precision of Hamming radius 2 (precision@2) which measures precision on retrieved images having Hamming distance to query ≤ 2 (if no images satisfy, we report zero precision). Note that as computing mAP is slow on large dataset SIFT1M, we consider top 10, 000 returned neighbors when computing mAP. c) Implementation notes: In our deep model, we use n = 5 layers. The parameters λ1 , λ2 , λ3 and λ4 are empirically set by cross validation as 10−5 , 5 × 10−2 , 10−2 and 10−6 , respectively. The max iteration number T is empirically set to 10. The number of units in hidden layers 2, 3, 4 are empirically set as [90 → 20 → 8], [90 → 30 → 16], [100 → 40 → 24] and [120 → 50 → 32] for the code length 8, 16, 24 and 32 bits, respectively. 2) Retrieval results: Fig. 2 and Table II show comparative mAP and precision of Hamming radius 2 (precision@2) of methods, respectively. We find the following observations are consistent for all three datasets. In term of mAP, the proposed UH-BDNN is comparable to or outperforms other methods at all code lengths. The improvement is more clear at high code length, i.e., L = 24, 32. The best competitor to UH-BDNN is binary autoencoder (BA) [34] which is the current stateof-the-art unsupervised hashing method. Compare to BA, at high code length, UH-BDNN consistently outperforms BA on all datasets. In term of precision@2, UH-BDNN is comparable to other methods at low code lengths, i.e., L = 8, 16. At L = 24, 32, UH-BDNN significantly achieve better performance than other methods. Specifically, the improvements of UH-BDNN over the best competitor BA [34] are clearly observed at L = 32 on the MNIST and SIFT1M datasets. Comparison with Deep Hashing (DH) [33], [38] As the implementation of DH is not available, we set up the experiments on CIFAR10 and MNIST similar to [33] to make a fair comparison. For each dataset, we randomly sample 1,000 images (i.e., 100 images per class) as query set; the remaining images are used as training and database set. Follow [33], for CIFAR10, each image is represented by 512-D GIST descriptor [45]. Follow Deep Hashing [33], the ground truths of queries are based on their class labels1 . Similar to [33], we report comparative results in term of mAP and the precision of Hamming radius r = 2. The results are presented in the Table III. It is clearly showed that the proposed UH-BDNN outperforms DH [33] at all code lengths, in both mAP and precision of Hamming radius. IV. S UPERVISED H ASHING WITH B INARY D EEP N EURAL N ETWORK (SH-BDNN) In order to enhance the discriminative power of the binary codes, we extend UH-BDNN to supervised hashing by 1 It is worth noting that in the evaluation of unsupervised hashing, instead of using class label as ground truths, most state-of-the-art methods [14], [16], [15], [34] use Euclidean nearest neighbors as ground truths for queries. 6 mAP 8 25 UH−BDNN BA ITQ SH SPH KMH 20 mAP 10 6 15 25 UH−BDNN BA ITQ SH SPH KMH 20 mAP 12 10 15 UH−BDNN BA ITQ SH SPH KMH 10 4 5 2 0 8 16 24 0 8 32 5 16 24 0 8 32 16 24 32 number bits (L) number bits (L) number bits (L) (a) CIFAR10 (b) MNIST (c) SIFT1M Fig. 2. mAP comparison between UH-BDNN and state-of-the-art unsupervised hashing methods on CIFAR10, MNIST, and SIFT1M. TABLE II P RECISION AT H AMMING DISTANCE r = 2 COMPARISON BETWEEN UH-BDNN AND STATE - OF - THE - ART UNSUPERVISED HASHING METHODS ON CIFAR10, MNIST, AND SIFT1M. L UH-BDNN BA[34] ITQ[14] SH[13] SPH[16] KMH[15] 8 0.55 0.55 0.54 0.39 0.43 0.53 CIFAR10 16 24 5.79 22.14 5.65 20.23 5.05 18.82 4.23 14.60 3.45 13.47 5.49 19.55 32 18.35 17.00 17.76 15.22 13.67 15.90 8 0.53 0.51 0.51 0.43 0.44 0.50 MNIST 16 24 6.80 29.38 6.44 27.65 5.87 23.92 6.50 27.08 5.02 22.24 6.36 25.68 32 38.50 35.29 36.35 36.69 30.80 36.24 8 4.80 3.85 3.19 4.67 4.25 3.74 SIFT1M 16 24 25.20 62.20 23.19 61.35 14.07 35.80 24.82 60.25 20.98 47.09 20.74 48.86 32 80.55 77.15 58.69 72.40 66.42 76.04 TABLE III C OMPARISON WITH D EEP H ASHING (DH) [33]. CIFAR10 precision@2 32 16 32 16.62 23.33 15.77 18.52 24.97 18.85 mAP L DH [33] UH-BDNN 16 16.17 17.83 leveraging the label information. There are several approaches proposed to leverage the label information, leading to different criteria on binary codes. In [18], [46], binary codes are learned such that they minimize Hamming distances between samples belonging to the same class, while maximizing the Hamming distance between samples belonging to different classes. In [24], the binary codes are learned such that they are optimal for linear classification. In this work, in order to exploit the label information, we follow the approach proposed in Kernel-based Supervised Hashing (KSH) [19]. The benefit of this approach is that it directly encourages the Hamming distances between binary codes of within-class samples equal to 0, and the Hamming distances between binary codes of between-class samples equal to L. In the other words, it tries to perfectly preserve the semantic similarity. To achieve this goal, it enforces the Hamming distances between learned binary codes to be highly correlated with the pre-computed pairwise label matrix. In general, the network structure of SH-BDNN is similar to UH-BDNN, excepting that the last layer preserving the reconstruction of UH-BDNN is removed. The layer n − 1 in UH-BDNN becomes the last layer in SH-BDNN. All desirable properties, i.e., semantic similarity preserving, independence, and balance, in SH-BDNN are constrained on the outputs of its last layer. MNIST precision@2 32 16 32 44.97 66.10 73.29 47.21 69.13 75.26 mAP 16 43.14 45.38 A. Formulation of SH-BDNN We define the pairwise label matrix S as  1 −1 Sij = if xi and xj are same class if xi and xj are not same class (19) In order to achieve the semantic similarity preserving property, we learn the binary codes such that the Hamming distance between learned binary codes highly correlates with the matrix S, i.e., we want to minimize the quantity 2 1 (n) T ) H(n) − S . In addition, to achieve the indepenL (H dence and balance properties of codes, we want to minimize 2 2 1 the quantities m H(n) (H(n) )T − I and H(n) 1m×1 , respectively. Follow the same reformulation and relaxation as UH-BDNN (Sec. III-A), we solve the following constrained optimization which ensures the binary constraint, the semantic similarity preserving, the independence, and the balance properties of codes. min J W,c,B = 1 2m 1 (H(n) )T H(n) − S L 2 λ2 λ3 H(n) − B + 2m 2 2 λ4 (n) + H 1m×1 2m + s.t. B ∈ {−1, 1}L×m 2 + n−1 λ1 X W(l) 2 l=1 2 1 (n) (n) T H (H ) − I m 2 (20) (21) 7 Algorithm 2 Supervised Hashing with Binary Deep Neural Network (SH-BDNN) Input: D×m : labeled training data; L: code length; T : X = {xi }m i=1 ∈ R maximum iteration number; n: number of layers; {sl }n l=2 : number of units of layers 2 → n (note: sn = L); λ1 , λ2 , λ3 , λ4 . Output: Parameters {W(l) , c(l) }n−1 l=1 It is easy to see that the optimal solution for (26) under constraint (27) is B = sgn(H(n) ). The proposed SH-BDNN method is summarized in Algorithm 2. In Algorithm 2, B(t) and (W, c)(t) are values of B and {W(l) , c(l) }n−1 l=1 at iteration t, respectively. 1: Compute pairwise label matrix S using (19). 2: Initialize B(0) ∈ {−1, 1}L×m using ITQ [14] (l) n−1 3: Initialize {c(l) }n−1 l=1 = 0sl+1 ×1 . Initialize {W }l=1 by getting the top sl+1 eigenvectors from the covariance matrix of H(l) . 4: Fix B(0) , compute (W, c)(0) with (W, c) step using initialized {W(l) , c(l) }n−1 l=1 (line 3) as starting point for L-BFGS. 5: for t = 1 → T do 6: Fix (W, c)(t−1) , compute B(t) with B step 7: Fix B(t) , compute (W, c)(t) with (W, c) step using (W, c)(t−1) as starting point for L-BFGS. 8: end for 9: Return (W, c)(T ) C. Evaluation of Supervised Hashing with Binary Deep Neural Network (20) under constraint (21) is our formulation for supervised hashing. The main difference in formulation between UHBDNN (8) and SH-BDNN (20) is that the reconstruction term preserving the neighbor similarity in UH-BDNN (8) is replaced by the term preserving the label similarity in SHBDNN (20). a) Dataset: We evaluate and compare methods on CIFAR-10 and MNIST, and SUN397 datasets. The descriptions of the first two datasets are presented in section III-C1. SUN397 [36] dataset contains about 108K images from 397 scene categories. We use a subset of this dataset including 42 largest categories in which each category contains more than 500 images. This results about 35K images in total. The query set contains 4,200 images (100 images per class) randomly sampled from the dataset. The rest images are used as the training set and also the database set. Each image is represented by a 800-dimensional feature vector extracted by PCA from 4096-dimensional CNN feature produced by the AlexNet [25]. b) Evaluation protocol: Follow the literature [24], [14], [19], we report the retrieval results in two metrics: 1) mean Average Precision (mAP) and 2) precision of Hamming radius 2 (precision@2). c) Implementation notes: The network configuration is same as UH-BDNN except the final layer is removed. The values of parameters λ1 , λ2 , λ3 , and λ4 are empirically set using cross validation as 10−3 , 5, 1, and 10−4 , respectively. The max iteration number T is empirically set to 5. Follow the settings in ITQ-CCA [14], SDH [24], all training samples are used in the learning for these two methods. For SH-BDNN, KSH [19] and BRE [23] where the label information is leveraged by the pairwise label matrix, we randomly select 3, 000 training samples from each class and use them for learning. The ground truths of queries are defined by the class labels from the datasets. 2) Retrieval results: Fig. 3 and Table IV show comparative results between the proposed SH-BDNN and other supervised hashing methods on CIFAR10, MNIST, and SUN397 datasets. On the CIFAR10 dataset, Fig. 3(a) and Table IV clearly show that the proposed SH-BDNN outperforms all compared methods by a fair margin at all code lengths in both mAP and precision@2. The best competitor to SH-BDNN on this dataset is CCA-ITQ [14]. The more improvements of SH-BDNN over CCA-ITQ are observed at high code lengths, i.e., SH-BDNN outperforms CCA-ITQ about 4% at L = 24 and L = 32. B. Optimization In order to solve (20) under constraint (21), we use alternating optimization, which comprises two steps over (W, c) and B. 1) (W, c) step: When fixing B, (20) becomes unconstrained optimization. We used L-BFGS [40] optimizer with backpropagation for solving. The gradients of objective function J (20) w.r.t. different parameters are computed as follows. Let us define ∆(n) where V = ∆(l)  =    λ  1 2 H(n) V + VT + H(n) − B mL m   2λ3 1 (n) (n) T H (H ) − I H(n) + m m  0 λ4  (n) + H 1m×m f (n) (Z(n) ) m 1 (H(n) )T H(n) L (22) − S.   = (W(l) )T ∆(l+1) 0 f (l) (Z(l) ), ∀l = n − 1, · · · , 2 (23) where Z(l) = W(l−1) H(l−1) + c(l−1) 11×m , l = 2, · · · , n; denotes the Hadamard product. Then ∀l = n − 1, · · · , 1, we have ∂J = ∆(l+1) (H(l) )T + λ1 W(l) ∂W(l) (24) ∂J = ∆(l+1) 1m×1 ∂c(l) (25) 2) B step: When fixing (W, c), we can rewrite problem (20) as min J = H(n) − B 2 B s.t. B ∈ {−1, 1}L×m (26) (27) This section evaluates our proposed SH-BDNN and compares it to the following state-of-the-art supervised hashing methods including Supervised Discrete Hashing (SDH) [24], ITQ-CCA [14], Kernel-based Supervised Hashing (KSH) [19], Binary Reconstructive Embedding (BRE) [23]. For all compared methods, we use the implementations and the suggested parameters provided by the authors. 1) Dataset, evaluation protocol, and implementation notes: 8 SH−BDNN SDH ITQ−CCA KSH BRE 50 40 mAP mAP 60 100 70 90 60 80 50 mAP 70 70 20 8 SH−BDNN SDH ITQ−CCA KSH BRE 50 16 24 32 40 8 number bits (L) 40 30 60 30 SH-BDNN SDH ITQ-CCA KSH BRE 16 24 20 10 8 32 (a) CIFAR10 16 24 32 number bits (L) number bits (L) (b) MNIST (c) SUN397 Fig. 3. mAP comparison between SH-BDNN and state-of-the-art supervised hashing methods on CIFAR10, MNIST and SUN397 datasets. TABLE IV P RECISION AT H AMMING DISTANCE r = 2 COMPARISON BETWEEN SH-BDNN AND STATE - OF - THE - ART SUPERVISED HASHING METHODS ON CIFAR10, MNIST, AND SUN397 DATASETS . L SH-BDNN SDH[24] ITQ-CCA[14] KSH[19] BRE[23] 8 54.12 31.60 49.14 44.81 23.84 CIFAR10 16 24 67.32 69.36 62.23 67.65 65.68 67.47 64.08 67.01 41.11 47.98 32 69.62 67.63 67.19 65.76 44.89 8 84.26 36.49 54.35 68.07 37.67 DR Layer Binary Optimizer AlexNet Fig. 4. The illustration of the end-to-end hashing framework (E2E-BDNN). On the MNIST dataset, Fig. 3(b) and Table IV show that the proposed SH-BDNN significant outperforms the current stateof-the-art SDH [24] at low code length, i.e., L = 8. When L increases, SH-BDNN and SDH [24] achieve similar performance. SH-BDNN significantly outperforms other methods, i.e., KSH [19], ITQ-CCA [14], BRE [23], on both mAP and precision@2. On the SUN397 dataset, the proposed SH-BDNN outperforms other competitors at all code lengths in terms of both mAP and precision@2. The best competitor to SH-BDNN on this dataset is SDH [24]. At high code lengths (e.g., L = 24, 32), SH-BDNN achieves more improvements over SDH. V. S UPERVISED H ASHING WITH E ND - TO -E ND B INARY D EEP N EURAL N ETWORK (E2E-BDNN) Even though the proposed SH-BDNN can significantly enhance the discriminative power of the binary codes, similar to other hashing methods, its capability is partially depended on the discriminative power of image features. The recent endto-end deep learning-based supervised hashing methods [28], MNIST 16 24 94.67 94.69 93.00 93.98 79.99 84.12 90.79 92.86 69.80 83.24 32 95.51 94.43 84.57 92.41 84.61 8 15.52 13.89 13.22 12.64 9.26 SUN397 16 24 41.98 52.53 40.39 49.54 37.53 50.07 40.67 49.29 26.95 38.36 32 56.82 53.25 53.12 46.45 40.36 [29], [30] have shown that joint learning image representations and binary hash codes in an end-to-end fashion can boost the retrieval accuracy. Therefore, in this section, we propose to extend the proposed SH-BDNN to an end-to-end framework. Specifically, we integrate the convolutional neural network (CNN) with our supervised hashing network (SH-BDNN) into a unified end-to-end deep architecture, namely End-to-End Binary Deep Neural Network (E2E-BDNN), which can jointly learn visual features and binary representations of images. In the following, we first introduce our proposed network architecture. We then describe the training process. Finally, we present experiments on various benchmark datasets. A. Network architecture Fig. 4 illustrates the overall architecture of the end-toend binary deep neural network – E2E-BDNN. In details, the network consists of three main components: (i) a feature extractor, (ii) a dimensional reduction layer, and (iii) a binary optimizer component. We utilize AlexNet [25] as the feature extractor component of the E2E-BDNN. In our configuration, we remove the last layer of AlexNet, namely the softmax layer, and consider its last fully connected layer (fc7) as the image representation. The dimensional reduction component (the DR layer) involves a fully connected layer for reducing the high dimensional image representations outputted by the feature extractor component into lower dimensional representations. We use the identity function as the activation function for this DR layer. The reduced representations are then used as inputs for the following binary optimizer component. The binary optimizer component of E2E-BDNN is similar to SH-BDNN. It means that we also constrain the output codes of E2E-BDNN to be binary. These codes also have desired properties such as semantic similarity preserving, 9 Algorithm 3 End-to-End Binary Deep Neural Network (E2EBDNN) Learning Input: X = {xi }n i=1 : labeled training images; m: minibatch size; L: code length; K, T : maximum iteration. λ1 , λ2 , λ3 , λ4 : hyperparameters. Output: Network parameters W (0) 1: Initialize the network W(0) 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: Initialize B(0) ∈ {−1, 1}L×n via ITQ [14] for k = 1 → K do for t = 1 → T do A minibatch X(t) is sampled from X Compute the corresponding similarity matrix S(t) From B(k−1) , sample B(t) corresponding to X(t) (k) Fix B(t) , optimize W(t) via SGD end for (k) Update B(k) by W(T ) end for (K) Return W(T ) WP CA = [v1T v2T · · · vkT ] cP CA = −WP CA m independence, and balance. By using the same design as SHBDNN for the last component of E2E-BDNN, it allows us to observe the advantages of the end-to-end architecture over SH-BDNN. The training data for the E2E-BDNN is labelled images, which contrasts to SH-BDNN which uses visual features such as GIST [45], SIFT [44] or deep features from convolutional deep networks. Given the input labeled images, we aim to learn binary codes with aforementioned desired properties, i.e., semantic similarity preserving, independence, and balance. In order to achieve these properties on the codes, we use the similar objective function as SH-BDNN. However, it is important to mention that in SH-BDNN, by its non end-to-end architecture, we can feed the whole training set to the network at a time for training. This does not hold for E2E-BDNN. Due to the memory consuming of the end-to-end architecture, we can only feed a minibatch of images to the network at a time for training. Technically, let H be the output of the last fully connected layer of E2E-BDNN for a minibatch of size m; S be similarity matrix defined over the minibatch (using equation (19)); B is an auxiliary variable. Similar to SH-BDNN, we train the network to minimize the following constrained loss function min J W,B = λ1 2m 1 T H H−S L 2 λ2 λ3 kH − Bk2 + 2m 2 λ4 2 kH1m×1 k + 2m + L×m s.t. B ∈ {−1, 1} 1 HHT − I m At beginning (line 1 in the Algorithm 3), we initialize (0) the network parameter W(0) as follows. For the feature extractor component, we initialize it by the pretrained AlexNet model [25]. The dimensional reduction (DR) layer is initialized by applying PCA on the AlexNet features, i.e. the outputs of fc7 layer, of the training set. Specifically, let WP CA and cP CA be the weights and bias of the DR layer, respectively, we initialize them as follows, where v1 , v2 , . . . , vk are the top eigenvectors corresponding to the largest eigenvalues extracted from the covariance matrix of training features; m is the mean of the training features. The binary optimizer component is initialized by training SH-BDNN using AlexNet features (of training set) as inputs. We then initialize the binary code matrix of the whole dataset B(0) ∈ {−1, 1}L×n via ITQ [14] (line 2 in the Algorithm 3). Here, AlexNet features are used as training inputs for ITQ. In each iteration t of the Algorithm 3, we only sample a minibatch X(t) from the training set to feed to the network (line 5 in the Algorithm 3). So after T iterations, we exhaustively sample all training data. In each iteration t, we first create the similarity matrix S(t) (using equation (19)) corresponding to X(t) as well as the B(t) matrix (line 6 and line 7 in the Algorithm 3). Since B(t) has been already computed, we can fix that variable and update the network (k) parameter W(t) by standard backpropagation with Stochastic Gradient Descent (SGD) (line 8 in the Algorithm 3). After T iterations, since the network was exhaustively learned from the whole training set, we update B(k) = sgn(F) (line 10 in the Algorithm 3), where F is the outputs of the last fully connected layer for all training samples. We then repeat the optimization procedure until it reaches a criterion, i.e., after K iterations. Implementation details The proposed E2E-BDNN is implemented in MATLAB with MatConvNet library [47]. All experiments are conducted on a workstation machine with a GPU Titan X. Regarding the hyperparameters of the loss function, we empirically set λ1 = 10−1 , λ2 = 10−2 , λ3 = 10−2 and λ4 = 10−3 . The learning rate is set to 10−4 and the weight decay is set to 5 × 10−4 . The minibatch size is 256. 2 C. Evaluation of End-to-End Binary Deep Neural Network (E2E-BDNN) (28) (29) B. Training The training procedure of E2E-BDNN is presented in the Algorithm 3. In the Algorithm 3, X(t) and B(t) ∈ {−1, 1}L×m are a minibatch sampled from the training set at iteration t and its corresponding binary codes, respectively. B(k) is the binary (k) codes of the whole training set X at iteration k; W(t) is the network weight when learning up to iterations t and k. Since we have already compare SH-DBNN to other supervised hashing methods in Section IV-C, in this experiment we focus to compare E2E-BDNN with SH-BDNN. We also compare the proposed E2E-BDNN to other end-to-end hashing methods [29], [28], [30], [31]. a) Comparison between SH-BDNN and E2E-BDNN: Table V presents comparative mAP between SH-BDNN and E2E-BDNN. The results shows that E2E-BDNN consistently improves over SH-BDNN at all code lengths on all datasets. The large improvements of E2E-BDNN over SH-BDNN are observed on the CIFAR10 and MNIST datasets, especially at 10 M AP COMPARISON BETWEEN L SH-BDNN E2E-BDNN 8 57.15 64.83 TABLE V SH-BDNN AND E2E-BDNN ON CIFAR10, MNIST, AND SUN397 DATASETS . CIFAR10 16 24 66.04 68.81 71.02 72.37 32 69.66 73.56 8 84.65 88.82 low code lengths, i.e., on CIFAR10, E2E-BDNN outperforms SH-BDNN 7.7% and 5% at L = 8 and L = 16, respectively; on MNIST, E2E-BDNN outperforms SH-BDNN 4.2% and 3.8% at L = 8 and L = 16, respectively. On SUN397 dataset, the improvements of E2E-BDNN over SH-BDNN are more clear at high code length, i.e., E2E-BDNN outperforms SHBDNN 2.5% and 2.7% at L = 24 and L = 32, respectively. The improvements of E2E-BDNN over SH-BDNN confirm the effectiveness of the proposed end-to-end architecture for learning discriminative binary codes. b) Comparison between E2E-BDNN and other end-toend supervised hashing methods: We also compare our proposed deep networks SH-BDNN and E2E-BDNN with other end-to-end supervised hashing architectures, i.e., Hashing with Deep Neural Network (DNNH) [30], Deep Hashing Network (DHN) [48], Deep Quantization Network (DQN) [31], Deep Semantic Ranking Hashing (DSRH) [28], and Deep Regularized Similarity Comparison Hashing (DRSCH) [29]. In those works, the authors propose the frameworks in which the image features and hash codes are simultaneously learned by combining CNN layers and a binary quantization layer into a large model. However, their binary mapping layer only applies a simple operation, e.g., an approximation of sgn function (logistic [28], [30], tanh [29]), l1 norm approximation of binary constraints [48]. Our SH-BDNN and E2EBDNN advances over those works in the way to map the image features to the binary codes. Furthermore, our learned codes ensure good properties, i.e. independence and balance, while [30], [29], [31] do not consider such properties, and [28] only considers the balance of codes. It is worth noting that, in [30], [28], [29], [48], different settings are used when evaluating. For fair comparison, follow those works, we setup two different experimental settings as follows • • Setting 1: according to [30], [31], [48], we randomly sample 100 images per class to form 1K testing images. The remaining 59K images are used as database images. Furthermore, 500 images per class are sampled from the database to form 5K training images. Setting 2: following [28], [29], we randomly sample 1K images per class to form 10K testing images. The remaining 50K images are served as the training set. In the test phase, each test image is searched through the test set by the leave-one-out procedure. Table VI shows the comparative mAP between our methods and DNNH [30], DHN [48], DQN [31] on the CIFAR10 dataset with the setting 1. Interestingly, even with non end-toend approach, our SH-BDNN outperforms DNNH and DQN at all code lengths. This confirms the effectiveness of the proposed approach for dealing with binary constrains and the having of desire properties such as independence and balance MNIST 16 24 94.24 94.80 98.03 98.26 32 95.25 98.21 8 33.06 34.15 SUN397 16 24 47.13 57.02 48.21 59.51 32 61.89 64.58 TABLE VI M AP COMPARISON BETWEEN E2E-BDNN, SH-BDNN AND DQN[31] ON CIFAR10 (S ETTING 1). L SH-E2E SH-BDNN DNNH[30] DQN[31] DHN[48] 24 60.02 57.30 56.60 55.80 59.40 32 61.35 58.66 55.80 56.40 60.30 DNNH[30], 48 63.59 60.08 58.10 58.00 62.10 TABLE VII M AP COMPARISON BETWEEN E2E-BDNN, SH-BDNN AND END - TO - END HASHING METHODS DSRH[28], DRSCH[29] ON CIFAR10 (S ETTING 2). L SH-E2E SH-BDNN DSRH [28] DRSCH [29] 24 67.16 65.21 61.08 62.19 32 68.72 66.22 61.74 62.87 48 69.23 66.53 61.77 63.05 on the produced codes. With the end-to-end approach, it helps to boost the performance of the SH-BDNN. The proposed E2E-BDNN outperforms all compared methods, DNNH [30], DHN [48], DQN [31]. It is worth noting that in Lai et al. [30], increasing the code length does not necessary boost the retrieval accuracy, i.e., they report a mAP 55.80 at L = 32, while a higher mAP, i.e., 56.60 is reported at L = 24. Different from [30], both SH-BDNN and E2E-BDNN improve mAP when increasing the code length. Table VII presents the comparative mAP between the proposed SH-BDNN, E2E-BDNN and the competitors DSRH [28], DRSCH [29] on the CIFAR10 dataset with the setting 2. The results clearly show that the proposed E2E-BDNN significantly outperforms the DSRH [28] and DRSCH [29] at all code lengths. Compare to the best competitor DRSCH [29], the improvements of E2E-BDNN over DRSCH are from 5% to 6% at different code lengths. Furthermore, we can see that even with non end-to-end approach, the proposed SH-BDNN also outperforms DSRH [28] and DRSCH [29]. VI. C ONCLUSION In this paper, we propose three deep hashing neural networks for learning compact binary presentations. Firstly, we introduce UH-BDNN and SH-BDNN for unsupervised and supervised hashing respectively. Our network designs constrain to directly produce binary codes at one layer. The designs also ensure good properties for codes: similarity preserving, independence and balance. Together with designs, we also propose alternating optimization schemes which allow to effectively deal with binary constraints on the codes. We then propose to extend the SH-BDNN to an end-to-end binary deep neural network (E2E-BDNN) framework which jointly 11 learns the image representations and the binary codes. The solid experimental results on various benchmark datasets show that the proposed methods compare favorably or outperform state-of-the-art hashing methods. R EFERENCES [1] R. Arandjelovic and A. Zisserman, “All about VLAD,” in CVPR, 2013. [2] H. Jégou, M. Douze, C. Schmid, and P. Pérez, “Aggregating local descriptors into a compact image representation,” in CVPR, 2010. [3] T.-T. Do and N.-M. Cheung, “Embedding based on function approximation for large scale image search,” TPAMI, 2017. [4] H. Jégou and A. Zisserman, “Triangulation embedding and democratic aggregation for image search,” in CVPR, 2014. [5] K. Grauman and R. Fergus, “Learning binary hash codes for large-scale image search,” Machine Learning for Computer Vision, 2013. [6] J. Wang, H. T. Shen, J. Song, and J. Ji, “Hashing for similarity search: A survey,” CoRR, 2014. [7] J. Wang, T. Zhang, J. Song, N. Sebe, and H. T. Shen, “A survey on learning to hash,” TPAMI, 2017. [8] J. Wang, W. Liu, S. Kumar, and S. Chang, “Learning to hash for indexing big data - A survey,” Proceedings of the IEEE, pp. 34–57, 2016. [9] A. Gionis, P. Indyk, and R. Motwani, “Similarity search in high dimensions via hashing,” in VLDB, 1999. [10] B. Kulis and K. Grauman, “Kernelized locality-sensitive hashing for scalable image search,” in ICCV, 2009. [11] M. Raginsky and S. Lazebnik, “Locality-sensitive binary codes from shift-invariant kernels,” in NIPS, 2009. [12] B. Kulis, P. Jain, and K. Grauman, “Fast similarity search for learned metrics,” TPAMI, pp. 2143–2157, 2009. [13] Y. Weiss, A. Torralba, and R. Fergus, “Spectral hashing,” in NIPS, 2008. [14] Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin, “Iterative quantization: A procrustean approach to learning binary codes for large-scale image retrieval,” TPAMI, pp. 2916–2929, 2013. [15] K. He, F. Wen, and J. Sun, “K-means hashing: An affinity-preserving quantization method for learning binary compact codes,” in CVPR, 2013. [16] J.-P. Heo, Y. Lee, J. He, S.-F. Chang, and S.-e. Yoon, “Spherical hashing,” in CVPR, 2012. [17] W. Kong and W.-J. Li, “Isotropic hashing,” in NIPS, 2012. [18] C. Strecha, A. M. Bronstein, M. M. Bronstein, and P. Fua, “LDAhash: Improved matching with smaller descriptors,” TPAMI, pp. 66–78, 2012. [19] W. Liu, J. Wang, R. Ji, Y.-G. Jiang, and S.-F. Chang, “Supervised hashing with kernels,” in CVPR, 2012. [20] J. Wang, S. Kumar, and S. Chang, “Semi-supervised hashing for largescale search,” TPAMI, pp. 2393–2406, 2012. [21] M. Norouzi, D. J. Fleet, and R. Salakhutdinov, “Hamming distance metric learning,” in NIPS, 2012. [22] G. Lin, C. Shen, D. Suter, and A. van den Hengel, “A general two-step approach to learning-based hashing,” in ICCV, 2013. [23] B. Kulis and T. Darrell, “Learning to hash with binary reconstructive embeddings,” in NIPS, 2009. [24] F. Shen, C. Shen, W. Liu, and H. Tao Shen, “Supervised discrete hashing,” in CVPR, 2015. [25] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in NIPS, 2012. [26] A. S. Razavian, H. Azizpour, J. Sullivan, and S. Carlsson, “CNN features off-the-shelf: An astounding baseline for recognition,” in CVPRW, 2014. [27] J. Long, E. Shelhamer, and T. Darrell, “Fully convolutional networks for semantic segmentation,” in CVPR, 2015. [28] F. Zhao, Y. Huang, L. Wang, and T. Tan, “Deep semantic ranking based hashing for multi-label image retrieval,” in CVPR, 2015. [29] R. Zhang, L. Lin, R. Zhang, W. Zuo, and L. Zhang, “Bit-scalable deep hashing with regularized similarity learning for image retrieval and person re-identification,” TIP, pp. 4766–4779, 2015. [30] H. Lai, Y. Pan, Y. Liu, and S. Yan, “Simultaneous feature learning and hash coding with deep neural networks,” in CVPR, 2015. [31] Y. Cao, M. Long, J. Wang, H. Zhu, and Q. Wen, “Deep quantization network for efficient image retrieval,” in AAAI, 2016. [32] G. E. Hinton, S. Osindero, and Y. W. Teh, “A fast learning algorithm for deep belief nets,” Neural Computation, pp. 1527–1554, 2006. [33] V. Erin Liong, J. Lu, G. Wang, P. Moulin, and J. Zhou, “Deep hashing for compact binary codes learning,” in CVPR, 2015. [34] M. A. Carreira-Perpinan and R. Raziperchikolaei, “Hashing with binary autoencoders,” in CVPR, 2015. [35] T.-T. Do, A.-D. Doan, and N.-M. Cheung, “Learning to hash with binary deep neural network,” in ECCV, 2016. [36] J. Xiao, J. Hays, K. A. Ehinger, A. Oliva, and A. Torralba, “SUN database: Large-scale scene recognition from abbey to zoo,” in CVPR, 2010. [37] R. Salakhutdinov and G. E. Hinton, “Semantic hashing,” Int. J. Approx. Reasoning, pp. 969–978, 2009. [38] J. Lu, V. E. Liong, and J. Zhou, “Deep hashing for scalable image search,” TIP, 2017. [39] J. Nocedal and S. J. Wright, Numerical Optimization, Chapter 17, 2nd ed. World Scientific, 2006. [40] D. C. Liu and J. Nocedal, “On the limited memory bfgs method for large scale optimization,” Mathematical Programming, vol. 45, pp. 503–528, 1989. [41] A. Krizhevsky, “Learning multiple layers of features from tiny images,” University of Toronto, Tech. Rep., 2009. [42] Y. Lecun and C. Cortes, “The MNIST database of handwritten digits,” http://yann.lecun.com/exdb/mnist/. [43] H. Jégou, M. Douze, and C. Schmid, “Product quantization for nearest neighbor search,” TPAMI, pp. 117–128, 2011. [44] D. G. Lowe, “Distinctive image features from scale-invariant keypoints,” IJCV, pp. 91–110, 2004. [45] A. Oliva and A. Torralba, “Modeling the shape of the scene: A holistic representation of the spatial envelope,” IJCV, pp. 145–175, 2001. [46] V. A. Nguyen, J. Lu, and M. N. Do, “Supervised discriminative hashing for compact binary codes,” in ACM Multimedia, 2014. [47] A. Vedaldi and K. Lenc, “Matconvnet: Convolutional neural networks for matlab,” in ACM Multimedia, 2015. [48] H. Zhu, M. Long, J. Wang, and Y. Cao, “Deep hashing network for efficient similarity retrieval,” in AAAI, 2016.
1cs.CV
Synthesizing Imperative Programs for Introductory Programming Assignments Hakjoo Oh Korea University hakjoo [email protected] arXiv:1702.06334v2 [cs.PL] 13 Jun 2017 Sunbeom So Korea University sunbeom [email protected] Abstract We present a novel algorithm that synthesizes imperative programs for introductory programming courses. Given a set of input-output examples and a partial program, our algorithm generates a complete program that is consistent with every example. Our key idea is to combine enumerative program synthesis and static analysis, which aggressively prunes out a large search space while guaranteeing to find, if any, a correct solution. We have implemented our algorithm in a tool, called S IMPL, and evaluated it on 30 problems used in introductory programming courses. The results show that S IMPL is able to solve the benchmark problems in 6.6 seconds on average. 1 Introduction Our long-term goal is to build an intelligent tutoring system that helps students to improve their programming skills. Our experience in introductory programming courses is that students, who learn programming for the first time, often struggle with solving programming problems for themselves. Manually providing guidance simply does not scale for the increasingly large number of students. To make matters worse, we found that even instructors sometimes make mistake and shy students are reluctant to ask questions. Motivated by this experience, we aim to build an automatic system that helps students to improve their skills without human teachers. In this paper, we present a key component of the system, which automatically generates complete programs from students’ incomplete programs. The inputs of the algorithm are a partial program with constraints on variables and constants, and input-output examples that specify the program’s behavior. The output is a complete program whose behavior matches all of the given input-output examples. The key novelty of our algorithm is to combine enumerative program synthesis and program analysis techniques. It basically enumerates every possible candidate program in increasing size until it finds a solution. This algorithm, however, is too slow to be interactively used with students due to the huge search space of programs. Our key idea to accelerate the speed is to perform static analysis alongside the enumerative search, in order to “statically” identify and prune out interim programs that eventually fail to be a solution. We formalize our pruning technique and its safety property. The experimental results show that our algorithm is remarkably effective to synthesize introductory imperative programs. We have implemented the algorithm in a tool, S IMPL, and evaluated its performance on 30 programming tasks used in introductory courses. With our pruning technique, S IMPL is fast enough to solve each problem in 6.6 seconds on average. However, without the pruning, the baseline algorithm, which already adopts well-known optimization techniques, takes 165.5 seconds (25x slowdown) on average. We summarize our contributions below: • We present a new algorithm for synthesizing imperative programs from examples. To our knowledge, our work is the first to combine enumerative program synthesis and static analysis technologies. • We prove the effectiveness of our algorithm on 30 real programming problems used in introductory courses. The results show that our algorithm quickly solves the problems, including ones that most beginner-level students have hard times to solve. • We provide a tool, S IMPL , which is publicly available and open-sourced.1 2 Showcase In this section, we showcase S IMPL with four programming problems that most beginners feel difficult to solve. To use S IMPL, students need to provide (1) a partial program, (2) a set of input-output examples, and (3) resources that S IMPL can use. The resources consist of a set of integers, a set of integer-type variables, and a set of array-type variables. The goal of S IMPL is to complete the partial program w.r.t. the input-output examples, using only the given resources. Problem 1 (Reversing integer) The first problem is to write a function that reverses a given integer. For example, given integer 12, the function should return 21. Suppose a partial program is given as reverse (n){ r := 0; while(?){?}; return r;} 1 Hidden for double-blind reviewing. reverse(n){ r := 0; while ( n > 0 ){ x := n % 10; r := r * 10; r := r + x; n := n / 10; }; return r; } (a) Problem1 sum(n){ r := 0; while ( n > 0 ){ t := n; while (t > 0){ r := r + t; t := t - 1; }; n := n - 1; }; return r; } (c) Problem 3 count(n,a){ while ( n > 0 ){ t := n % 10; a[t] := a[t] + 1; n := n / 10; }; return a; } (b) Problem 2 abssum(a, len){ r := 0; i := 0; while (i < len){ if ( a[i] < 0 ) { r := r - a[i]; } else { r := r + a[i]; } i := i + 1; }; return r; } (d) Problem 4 Figure 1: Synthesized results by S IMPL (in the boxes) where ? denotes holes that need to be completed. Suppose further S IMPL is provided with input-output examples {1 7→ 1, 12 7→ 21, 123 7→ 321}, integers {0, 1, 10}, and integer variables {n, r, x}. Given this problem, S IMPL produces the solution in Figure 1(a) in 2.5 seconds. Note that, S IMPL finds out that the integer ‘1’ is unnecessary and the final program does not contain it. Also, S IMPL does not require sophisticated examples, so that S IMPL can be easily used by inexperienced students. Problem 2 (Counting) The next problem is to write a function that counts the number of each digit in an integer. The program takes an integer and an array as inputs, where each element of the array is initially 0. As output, the program returns that array but now each array element at index i stores the number of is that occur in the given integer. For example, when a tuple (220, h0, 0, 0i) is given, the function should output h1, 0, 2i; 0 occurs once, 1 does not occur, and 2 occurs twice in ‘220’. Suppose the partial program is given as count(n,a){ while(?){?}; return a;} with examples {(11, h0, 0i) 7→ h0, 2i, (220, h0, 0, 0i) 7→ h1, 0, 2i}, integers {0, 1, 10}, integer variables {i, n, t}, and an array variable {a}. For this problem, S IMPL produces the program in Figure 1(b) in 0.2 seconds. Note that S IMPL uses a minimal set of resources; i is not used though it is given as usable. Problem 3 (Sum of sum) The third problem is to compute 1 + (1 + 2) + ... + (1 + 2 + ... + n) for a given integer n. Suppose the partial program sum(n){ r := 0; while(?){?}; return r;} is given with examples {1 7→ 1, 2 7→ 4, 3 7→ 10, 4 7→ 20}, integers {0, 1}, and integer-type variables {n, t, r}. Then, S IMPL produces the program in Figure 1(c) in 37.6 seconds. Note that S IMPL newly introduced a nested loop, which is absent in the partial program. Problem 4 (Absolute sum) The last problem is to sum the absolute values of all the elements in a given array. We provide the partial program: abssum(a, len){ r := 0; i := 0; while(i < len){ if(?){?} else{?}; i:=i+1;}; return r;} where the goal is to complete the condition and bodies of the if-statement. Given a set of input-output examples {(h−1, −2i, 2) 7→ 3, (h2, 3, −4i, 3) 7→ 9}, an integer {0}, integer variables {r, i}, and an array variable {a}, S IMPL produces the program in Figure 1(d) in 12.1 seconds. 3 Problem Definition Language We designed an imperative language that is small yet expressive enough to deal with various programming problems in introductory courses. The syntax of the language is defined by the following grammar: ⊕ → + | − | ∗ | / | %, ≺→ =|>|< l → x | x[y], a → n | l | l1 ⊕ l2 | l ⊕ n | ♦ b → true | false | l1 ≺ l2 | l ≺ n | b1 ∧ b2 | b1 ∨ b2 | ¬b | △ c → l := a | skip | c1 ; c2 | if b c1 c2 | while b c |  An l-value (l) is a variable (x) or an array reference (x[y]). An arithmetic expression (a) is an integer constant (n), an l-value (l), or a binary operation (⊕). A boolean expression (b) is a boolean constant (true, false), a binary relation (≺), a negation (¬b), or a logical conjunction (∧) and disjunction (∨). Commands include assignment (l := a), skip (skip), sequence (c1 ; c2 ), conditional statement (if b c1 c2 ), and whileloop (while b c). A program P = (x, c, y) is a command with input and output variables, where x is the input variable, c is the command, and y is the output variable. The input and output variables x and y can be either of integer or array types. For presentation brevity, we assume that the program takes a single input, but our implementation supports multiple input variables as well. An unusual feature of the language is that it allows to write incomplete programs. Whenever uncertain, any arithmetic expressions, boolean expressions, and commands can be left out with holes (♦, △, ). The goal of our synthesis algorithm is to automatically complete such partial programs. The semantics of the language is defined for programs without holes. Let X be the set of program variables, which is partitioned into integer and array types, i.e., X = Xi ⊎ Xa . A memory state m ∈ M = X → V, v ∈ V = Z + Z∗ is a partial function from variables to values (V). A value is either an integer or an array of integers. An array a ∈ Z∗ is a sequence of integers. For instance, we write h1, 2, 3i A[[n]](m) = n A[[x]](m) = m(x) A[[x[y]]](m) = m(x)m(y) A[[l1 ⊕ l2 ]](m) = A[[l1 ]](m) ⊕ A[[l2 ]](m) A[[l ⊕ n]](m) = A[[l]](m) ⊕ n B[[true ]](m) = true B[[false]](m) = false B[[l1 ≺ l2 ]](m) = A[[l1 ]](m) ≺ A[[l2 ]](m) B[[l ≺ n]](m) = A[[l]](m) ≺ n B[[b1 ∧ b2 ]](m) = B[[b1 ]](m) ∧ B[[b2 ]](m) B[[b1 ∨ b2 ]](m) = B[[b1 ]](m) ∨ B[[b2 ]](m) B[[¬b]](m) = ¬B[[b]](m) C[[x := a]](m) = m[x 7→ A[[a]](m)] A[[a]](m) C[[x[y] := a]](m) = m[x 7→ m(x)m(y) ] C[[skip]](m) = m C[[c1 ; c2 ]](m) = (C[[c2 ]] ◦ C[[c1 ]])(m) C[[if b c1 c2 ]](m) = cond(B[[b]], C[[c1 ]], C[[c2 ]])(m) C[[while b c]](m) = (fix F )(m) where F (g) = cond(B[[b]], g ◦ C[[c]], λx.x)  f (m) if p(m) = true cond(p, f, g)(m) = g(m) if p(m) = false Figure 2: Semantics of the language for the array of integers 1, 2, and 3. We write |a|, ai , and aki for the length of a, the element at index i, and the array a0 . . . ai−1 kai+1 . . . a|a|−1 , respectively. The semantics of the language is defined by the functions: A[[a]] : M → V, B[[b]] : M → B, C[[c]] : M → M where A[[a]], B[[b]], and C[[c]] denote the semantics of arithmetic expressions, boolean expressions, and commands, respectively. Figure 2 presents the denotational semantics, where fix is a fixed point operator. Note that the semantics for holes is undefined. Synthesis Problem A synthesis task is defined by the five components: ((x, c, y), E, Γ, Xi , Xa ) where (x, c, y) is an incomplete program with holes, E ⊆ V × V is a set of input-output examples. Γ ⊆ Z is a set of integers, Xi is a set of integer-type variables, and Xa is a set of array-type variables. The goal of our synthesis algorithm is to produce a complete command c without holes such that • c uses constants and variables in Γ and Xi ∪ Xa , and • c is consistent with every input-output example:  ∀(vi , vo ) ∈ E. C[[c]]([x 7→ vi ]) (y) = vo . 4 Synthesis Algorithm In this section, we present our synthesis algorithm that combines enumerative search with static analysis. 4.1 Synthesis as State-Search We first reduce the synthesis task into a state-search problem. Consider a synthesis task ((x, c, y), E, Γ, Xi , Xa ). The corresponding search problem is defined by the transition system (S, →, s0 , F ) where S is a set of states, (→) ⊆ S × S is a transition relation, s0 ∈ S is an initial state, and F ⊆ S is a set of solution states. Algorithm 1 Synthesis Algorithm Input: A synthesis problem ((x, c0 , r), E, Γ, Xi , Xa ) Output: A complete program consistent with E 1: W ← {c0 } 2: repeat 3: Pick the smallest state s from W 4: if s is a terminal state then 5: if solution(s) then return s 6: else 7: if ¬prune(s) then W ← W ∪ next(s) 8: until W 6= ∅ • States : A state s ∈ S is a command possibly with holes, which is defined by the grammar in Section 3. • Initial state : An initial state s0 is a partial command c0 . • Transition relation : Transition relation (→) ⊆ S × S determines the state that is immediately reachable from a state. The relation is defined as a set of inference rules in Figure 3. Intuitively, a hole can be replaced by an arbitrary expression (or command) of the same type. Given a state s, we write next(s) for the set of all immediate next states, i.e., next(s) = {s′ | s → s′ }. We write s 6→ for terminal states, i.e., states with no holes. • Solution states : A state s is a solution iff s is a terminal state and it is consistent with all input-output examples: solution(s) ⇐⇒  s 6→ ∧ ∀(vi , vo ) ∈ E. C[[s]]([x 7→ vi ]) (y) = vo . 4.2 Baseline Search Algorithm Algorithm 1 shows the basic architecture of our enumerative search algorithm. The algorithm initializes the workset W with c0 (line 1). Then, it picks a state s with the smallest size and removes the state from the workset (line 3). If s is a solution state, the algorithm terminates and s is returned (line 5). For a non-terminal state, the algorithm attempts to prune the state by invoking the function prune (line 7). If pruning fails, the next states of s are added into the workset and the loop repeats. The details of our pruning technique is described in Section 4.3. At the moment, assume prune always fails. The baseline algorithm implicitly performs two wellknown optimization techniques. First, it maintains previously explored states and never reconsider them. Second, more importantly, it normalizes states so that semantically-equivalent programs are also syntactically the same. For instance, suppose (r := 0; r := x ∗ 0; ) is the current state. Before pushing it to the workset, we first normalize it to (r := 0; ). To do so, we use four code optimization techniques: constant propagation, copy propagation, dead code elimination, and expression simplification [Aho et al., 1986]. These two techniques significantly improve the speed of enumerative search. In addition, the algorithm considers terminating programs only. Our language has unrestricted loops, so the basic algorithm may synthesize non-terminating programs. To exclude them from the search space, we use syntactic heuristics to detect potentially non-terminating loops. The heuristics are: 1) c1 → c′1 c2 → c′2 c1 → c′1 c2 → c′2 b → b b′ b → b b′ a →a a ′ ′ ′ ′ ′ ′ ′ l := a → l := a c1 ; c2 → c1 ; c2 c1 ; c2 → c1 ; c2 if b c1 c2 → if b c1 c2 if b c1 c2 → if b c1 c2 if b c1 c2 → if b c1 c2 ¬b →b ¬b′ b1 →b b′1 b2 →b b′2 b2 →b b′2 b1 →b b′1 b → b b′ c → c′ while b c → while b′ c while b c → while b c′ b1 ∧ b2 →b b′1 ∧ b2 b1 ∧ b2 →b b1 ∧ b′2 b1 ∨ b2 →b b′1 ∨ b2 b1 ∨ b2 →b b1 ∨ b′2  → l := ♦  → skip △ →b l ≺ n  → ;  △ →b △ ∧ △  → if △   △ →b △ ∨ △  → while △  △ →b ¬△ ♦ →a n △ →b true △ →b f alse △ →b l1 ≺ l2 ♦ →a l ♦ → a l1 ⊕ l2 ♦ →a l ⊕ n Figure 3: Transition Relation (n ∈ Γ, l ∈ Xi ∪ {x[y] | x ∈ Xa ∧ y ∈ Xi }) example1(n){ r := 0; while (n > 0){ r := n + 1; n := ♦; }; return r; } example2(n) { r := 0; while (n > 0){ ; r := x * 10; n := n / 10; }; return r; } (a) (b) Figure 4: States that are pruned away we only allow boolean expressions of the form x < y (or x > n) in loop conditions, 2) the last statement of the loop body must increase (or decrease) the induction variable x, and 3) x and y are not defined elsewhere in the loop. 4.3 Pruning with Static Analysis Now we present the main contribution of this paper, pruning with static analysis. Static analysis allows to safely identify states that eventually fail to be a solution. We first define the notion of failure states. Definition 1. A state s is a failure state, denoted fail(s), iff every terminal state s′ reachable from s is not a solution, i.e., fail(s) ⇐⇒ ((s →∗ s′ ) ∧ s′ 6→ =⇒ ¬solution(s′ )). Our goal is to detect as many failure states as possible. We observed two typical cases of failure states that often show up during the baseline search algorithm. Example 1. Consider the program in Figure 4(a) and inputoutput example (1, 1). When the program is executed with n = 1, no matter how the hole (♦) gets instantiated, the output value r is no less than 2 at the return statement. Therefore, the program cannot but fail to satisfy the example (1, 1). Example 2. Consider the program in Figure 4(b) and inputoutput example (1, 1). Here, we do not know the exact values of x and r, but we know that 10 ∗ x = 1 must hold at the end of the program. However, there exists no such integer x, and we conclude the partial program is a failure state. Static Analysis We designed a static analysis that aims to effectively identify these two types of failure states. To do so, our analysis combines numeric and symbolic analyses; the numeric analysis is designed to detect the cases of Example 1 and the symbolic analysis for the cases of Example 2. The abstract domain of the analysis is defined as follows: b = X → V, b m b ∈M b =I×S vb ∈ V An abstract memory state m b maps variables to abstract b values (V). An abstract value is a pair of intervals (I) and symbolic values (S). The domain of intervals is standard [Cousot and Cousot, 1977]: I = ({⊥} ∪ {[l, u] | l, u ∈ Z ∪ {−∞, +∞} ∧ l ≤ u}, ⊑I). For symbolic analysis, we define the following flat domain: S = (SE⊤ ⊥ , ⊑S ) where SE → n | βx (x ∈ Xi ) | SE ⊕ SE A symbolic expression se ∈ SE is a constant (n), a symbol (βx ), or a binary operation with symbolic expressions. We introduce symbols one for each integer-type variable in the program. The symbolic domain is flat and has the partial order: s1 ⊑S s2 ⇐⇒ (s1 = ⊥) ∨ (s1 = s2 ) ∨ (s2 = ⊤). We b that transforms define the abstraction function α : V → V concrete values to abstract values: α(n) = ([n, n], n) α(n1 . . . nk ) = ([min{n1 , . . . , nk }, max{n1 , . . . , nk }], ⊤). The abstract semantics is defined in Figure 5 by the functions: b → V, b b A[[a]] :M b → B, b b :M B[[b]] b →M b b :M C[[c]] b = {true, [ ⊤ is the abstract boolean lattice. d false} where B ⊥ Intuitively, the abstract semantics over-approximates the concrete semantics of all terminal states that are reachable from the current state. This is done by defining the sound b b b semantics for holes: A[[♦]]( m), b B[[△]]( m), b and C[[]]( m). b An exception is that integer variables get assigned symbols, rather than ⊤, in order to generate symbolic constraints on integer variables. In our analysis, array elements are abstracted into a single b b element. Hence, the definitions of A[[x[y]]] and C[[x[y] := a]] do not involve y. Because an abstract array cell may represent multiple concrete cells, arrays are weakly updated by joining (⊔) old and new values. For example, in memory state m b = b [x 7→ ([5, 5], ⊤), ...], C[[x[y] := 1]](m) b evaluates to [x 7→ ([1, 5], ⊤), ...]. For while-loops, the analysis performs a sound fixed point computation. If the computation does not reach a fixed point after a fixed number of iterations, we apply widening for b A[[n]]( m) b b m) A[[l]]( b = = = = = b B[[true ]](m) b b B[[l1 ≺ l2 ]](m) b b ≺ n]](m) B[[l b b B[[b1 ∧ b2 ]](m) b b 1 ∨ b2 ]](m) B[[b b b B[[¬b]]( m) b b B[[△]]( m) b = = = = = = = b 1 ⊕ l2 ]](m) A[[l b b ⊕ n]](m) A[[l b b A[[♦]]( m) b b := ♦]](m) C[[x b b C[[x[y] := ♦]](m) b b := a]](m) C[[x b b C[[x[y] := a]](m) b b C[[skip]]( m) b b 1 ; c2 ]](m) C[[c b b b c1 c2 ]](m) C[[if b b C[[while b c]](m) b where Fb (g) b C[[]]( m)(x) b = = = = = = = = = = ([n, n], n) m(x) b (l = x or x[y]) b 1 ]](m) b 2 ]](m) b A[[l A[[l b ⊕ b b bn A[[l1 ]](m) b ⊕ ([−∞, +∞], ⊤) b [ d (B[[false]]( true m) b = false) b b b A[[l1 ]](m) b ≺ A[[l2 ]](m) b b m) b n A[[l]]( b ≺ b 1 ]](m) b 2 ]](m) b B[[b B[[b b ∧ b b 1 ]](m) b 2 ]](m) b B[[b B[[b b ∨ b b ¬ b B[[b]]( m) b ⊤ m[x b 7→ ([−∞, +∞], βx )] m[x b 7→ ([−∞, +∞], ⊤)] b m[x b 7→ A[[a]]( m)] b b m[x b 7→ A[[a]]( m) b ⊔ m(x)] b m b b 2 ]] ◦ C[[c b 1 ]])(m) (C[[c b b b 1 ]], C[[c b 2 ]])(m) [ cond(B[[b]], C[[c b b b (fix F )(m) b b b [ B[[b]], cond( g ◦ C[[c]], λx.x)  ([−∞, +∞], βx ) x ∈ Xi ([−∞, +∞], ⊤) x ∈ Xa Figure 5: Abstract semantics infinite interval domain, in order to guarantee the termination of the analysis. We use the standard widening operator b and cond d in in [Cousot and Cousot, 1977]. The function fix Figure 5 denote a post-fixed point operator and a sound abstraction of cond, respectively. Pruning Next we describe how we do pruning with the static analysis. Suppose we are given examples E ⊆ V × V and a state s with input (x) and output (y) variables. For each example (vi , vo ) ∈ E, we first run the static analysis with the input α(vi ) and obtain the analysis result (itvs , se s ) : b (itvs , se s ) = (C[[s]]([x 7→ α(vi )])(y). We only consider the case when itvs = [ls , us ] (when itvs = ⊥, the program is semantically ill-formed and therefore we just prune out the state). Then, we obtain the interval abstraction [lo , uo ] of the output vo , i.e., ([lo , uo ], −) = α(vo ), and s generate the constraints C(v : i ,vo ) s C(v = (ls ≤ lo ∧ uo ≤ us ) ∧ (se ∈ SE =⇒ lo ≤ se ≤ uo ). i ,vo ) The first (resp., second) conjunct means that the interval (resp., symbolic) analysis result must over-approximate the s output example. We prune out a state s iff C(v is unsatisi ,vo ) fiable for some example (vi , vo ) ∈ E: Definition 2. The predicate prune is defined as follows: s prune(s) ⇐⇒ C(v is unsatisfiable for some (vi , vo ) ∈ E. i ,vo ) The unsatisfiability can be easily checked, for instance, with an off-the-shelf SMT solver. Our pruning is safe: Theorem 1 (Safety). ∀s ∈ S. prune(s) =⇒ fail(s). That is, we prune out a state only when it is a failure state, which formally guarantees that the search algorithm with our pruning finds a solution if and only if the baseline algorithm (Section 4.2) does so. 5 Evaluation Experimental setup To evaluate our synthesis algorithm, we gathered 30 introductory level problems from several online forums (Table 1).2 The problems consist of tasks manipulating integers and arrays. Some problems are non-trivial for novice students to solve; they require students to come up with various control structures such as nested loops and combinations of loops and conditional statements. The partial programs we used are similar to those shown in Section 2; they have one boolean expression hole (△), and one or two command holes (). For each benchmark, we report the number of integer variables (IVars), array variables (AVars), integer constants (Ints), and examples (Exs) provided, respectively. All benchmark problems are publicly available with our tool. Experiments were conducted on MacBook Pro with Intel Core i7 and 16GB of memory. Baseline Algorithm Table 1 shows the performance of our algorithm. The column “Base” shows the running time of our baseline algorithm that performs enumerative search without state normalization. In that case, the average runtime was longer than 616 seconds, and three of the benchmarks timed out (> 1 hour). The column “Base+Opt” reports the performance of the baseline with normalization. It shows that normalizing states succeeds to solve all benchmark problems and improves the speed by more than 3.7 times on average, although it degrades the speed for some cases due to runtime normalization overhead. Pruning Effectiveness On top of “Base+Opt”, we applied our static-analysis-guided pruning technique (the column “Ours”). The results show that our pruning technique is remarkably effective. It reduces the average time to 6.6 seconds, improving the speed of “Base+Opt” by 25 times. Note that S IMPL is able to synthesize the desired programs from a few examples (Exs), requiring up to 4 examples. 6 Related Work Computer-aided education Recently, program synthesis technology has revolutionized computer-aided education. For instance, the technology has been used in automatic problem generation [Singh et al., 2012; Ahmed et al., 2013; Alvin et al., 2014; Polozov et al., 2015], automatic grading [Alur et al., 2013], and automatic solution generation [Gulwani et al., 2011]. Our work is to use program synthesis for automated programming education system. A large amount of work has been done to automate programming education [Adam and Laurent, 1980; Soloway et al., 1981; Farrell et al., 1984; Johnson and Soloway, 1984; Murray, 1989; Singh et al., 2013; Gulwani et al., 2014; Kaleeswaran et al., 2016; Kim et al., 2016], which focuses 2 E.g., http://www.codeforwin.in Domain Integer Array Vars No Description 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Given n, return n!. Given n, return n!! (i.e., double factorial). P Given n, return ni=1 i. P Given n, return ni=1 i2 . Q Given n, return ni=1 i2 . Given a and n, return an . P Given n and m, return m i. Q i=n Given n and m, return m i=n i. Count the number of digit for an integer. Sum the digits of an integer. Calculate product of digits of an intger. Count the number of binary digit of an integer. Find the nth Fibonacci number. P P Given n, return ni=1 ( im=1 m)). Qn Qi Given n, return i=1 ( m=1 m)). Reverse a given integer. Find the sum of all elements of an array. Find the product of all elements of an array. Sum two arrays of same length into one array. Multiply two arrays of same length into one array. Cube each element of an array. Manipulate each element into 4th power. Find a maximum element. Find a minimum element. Add 1 to each element. Find the sum of square of each element. Find the multiplication of square of each element. Sum the products of matching elements of two arrays. Sum the absolute values of each element. Count the number of each element. Average IVars AVars 2 3 3 4 4 4 3 3 3 3 3 2 3 3 3 3 3 3 3 3 3 3 3 3 2 3 3 3 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2 2 1 1 1 1 1 1 1 2 1 1 Ints Exs 2 3 2 2 2 2 2 2 3 3 3 3 3 2 2 3 2 2 2 2 1 1 2 2 1 2 1 1 1 3 4 4 4 3 3 4 3 3 3 4 3 3 4 4 4 3 2 2 2 2 2 2 2 2 3 2 2 3 2 2 Base 0.0 0.0 0.1 122.4 102.9 0.7 0.2 0.2 0.0 5.2 0.7 0.0 98.7 ⊥ ⊥ ⊥ 8.1 7.6 44.6 47.4 1283.3 1265.8 0.9 0.8 0.3 2700.0 1709.8 20.5 45.0 238.9 > 616.8 Time (sec) Base+Opt 0.0 0.0 0.0 18.1 13.6 0.1 0.0 0.0 0.0 2.2 2.3 0.0 13.9 324.9 316.6 367.3 3.6 3.9 29.9 26.4 716.1 715.5 0.7 0.3 0.0 186.2 1040.3 38.7 50.5 1094.1 165.5 Ours 0.0 0.0 0.0 0.3 0.2 0.1 0.0 0.1 0.0 1.3 0.3 0.0 2.6 37.6 86.9 2.5 0.9 0.9 0.2 0.3 13.0 13.0 0.4 0.1 0.0 11.5 12.6 1.5 12.1 0.2 6.6 Table 1: Performance of S IMPL . ⊥ denotes timeout (> 1 hour). Assume ⊥ as 3,600 seconds for the average of “Base”. primarily on providing feedback on students’ programming submissions. Our system, S IMPL , has the following advantages over prior works: • Feedback on incomplete programs: Existing systems produce feedback only for complete programs; they cannot help students who do not know how to proceed further. In this case, S IMPL can help by automatically generating solutions starting from incomplete solutions. • No burden on instructor: Existing systems require instructor’s manual effort. For example, the system in [Singh et al., 2013] needs a correct implementation and a set of correction rules manually designed by the instructor. On the other hand, S IMPL does not require anything from the instructor. An exception is [Farrell et al., 1984], where an automatic LISP feedback system is presented. However, the system produces feedback by relying on ad-hoc rules. Programming by example Our work differs from prior programming-by-example (PBE) techniques in two ways. First, to our knowledge, our work is the first to synthesize imperative programs with loops. Most of the PBE approaches focus on domain-specific languages for string transformation [Gulwani, 2011; Kini and Gulwani, 2015; Raza et al., 2015; Manshadi et al., 2013; Wu and Knoblock, 2015], number transformation [Singh and Gulwani, 2012], XML transformation [Raza et al., 2014], and extracting relational data [Le and Gulwani, 2014], etc. Several others have studied synthesis of functional programs [Albarghouthi et al., 2013; Osera and Zdancewic, 2015; Frankle et al., 2016]. Second, our algorithm differs from prior work in that we combine semantic-based static analysis technology with enumerative program synthesis. Existing enumerative synthesis technology used pruning techniques such as type systems [Osera and Zdancewic, 2015; Frankle et al., 2016] and deductions [Feser et al., 2015], which are not applicable to our setting. 7 Conclusion In this paper, we have shown that combining enumerative synthesis and static analysis is a promising way of synthesizing introductory imperative programs. The enumerative search allows us to find the smallest possible, therefore general, program while the semantics-based static analysis dra- matically accelerates the process in a safe way. We demonstrated the effectiveness on 30 real programming problems gathered from online forums. References [Adam and Laurent, 1980] Anne Adam and Jean-Pierre Laurent. Laura, a system to debug student programs. Artificial Intelligence, 15(1-2), November 1980. [Ahmed et al., 2013] Umair Z. Ahmed, Sumit Gulwani, and Amey Karkare. Automatically generating problems and solutions for natural deduction. In IJCAI, 2013. [Aho et al., 1986] Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1986. [Albarghouthi et al., 2013] Aws Albarghouthi, Sumit Gulwani, and Zachary Kincaid. Recursive program synthesis. In CAV, 2013. [Alur et al., 2013] Rajeev Alur, Loris D’Antoni, Sumit Gulwani, Dileep Kini, and Mahesh Viswanathan. Automated grading of dfa constructions. In IJCAI, 2013. [Alvin et al., 2014] Chris Alvin, Sumit Gulwani, Rupak Majumdar, and Supratik Mukhopadhyay. Synthesis of geometry proof problems. In AAAI, 2014. [Cousot and Cousot, 1977] Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL, 1977. [Farrell et al., 1984] Robert G. Farrell, John R. Anderson, and Brian J. Reiser. An interactive computer-based tutor for lisp. In AAAI, 1984. [Feser et al., 2015] John K. Feser, Swarat Chaudhuri, and Isil Dillig. Synthesizing data structure transformations from input-output examples. In PLDI, 2015. [Frankle et al., 2016] Jonathan Frankle, Peter-Michael Osera, David Walker, and Steve Zdancewic. Exampledirected synthesis: A type-theoretic interpretation. In POPL, 2016. [Gulwani et al., 2011] Sumit Gulwani, Vijay Anand Korthikanti, and Ashish Tiwari. Synthesizing geometry constructions. In PLDI, 2011. [Gulwani et al., 2014] Sumit Gulwani, Ivan Radiček, and Florian Zuleger. Feedback generation for performance problems in introductory programming assignments. In FSE, 2014. [Gulwani, 2011] Sumit Gulwani. Automating string processing in spreadsheets using input-output examples. In POPL, 2011. [Johnson and Soloway, 1984] W. Lewis Johnson and Elliot Soloway. Proust: Knowledge-based program understanding. In ICSE, 1984. [Kaleeswaran et al., 2016] Shalini Kaleeswaran, Anirudh Santhiar, Aditya Kanade, and Sumit Gulwani. Semisupervised verified feedback generation. In FSE, 2016. [Kim et al., 2016] Dohyeong Kim, Yonghwi Kwon, Peng Liu, I. Luk Kim, David Mitchel Perry, Xiangyu Zhang, and Gustavo Rodriguez-Rivera. Apex: Automatic programming assignment error explanation. In OOPSLA, 2016. [Kini and Gulwani, 2015] Dileep Kini and Sumit Gulwani. Flashnormalize: Programming by examples for text normalization. In IJCAI, 2015. [Le and Gulwani, 2014] Vu Le and Sumit Gulwani. Flashextract: A framework for data extraction by examples. In PLDI, 2014. [Manshadi et al., 2013] Mehdi Manshadi, Daniel Gildea, and James Allen. Integrating programming by example and natural language programming. In AAAI, 2013. [Murray, 1989] William R. Murray. Automatic Program DeBugging for Intelligent Tutoring Systems. Morgan Kaufmann Publishers Inc., 1989. [Osera and Zdancewic, 2015] Peter-Michael Osera and Steve Zdancewic. Type-and-example-directed program synthesis. In PLDI, 2015. [Polozov et al., 2015] Oleksandr Polozov, Eleanor O’Rourke, Adam M. Smith, Luke Zettlemoyer, Sumit Gulwani, and Zoran Popovic. Personalized mathematical word problem generation. In IJCAI, 2015. [Raza et al., 2014] Mohammad Raza, Sumit Gulwani, and Natasa Milic-Frayling. Programming by example using least general generalizations. In AAAI, 2014. [Raza et al., 2015] Mohammad Raza, Sumit Gulwani, and Natasa Milic-Frayling. Compositional program synthesis from natural language and examples. In IJCAI, 2015. [Singh and Gulwani, 2012] Rishabh Singh and Sumit Gulwani. Synthesizing number transformations from inputoutput examples. In CAV, 2012. [Singh et al., 2012] Rohit Singh, Sumit Gulwani, and Sriram Rajamani. Automatically generating algebra problems. In AAAI, 2012. [Singh et al., 2013] Rishabh Singh, Sumit Gulwani, and Armando Solar-Lezama. Automated feedback generation for introductory programming assignments. In PLDI, 2013. [Soloway et al., 1981] Elliot M. Soloway, Beverly Woolf, Eric Rubin, and Paul Barth. Meno-ii: An intelligent tutoring system for novice programmers. In IJCAI. Morgan Kaufmann Publishers Inc., 1981. [Wu and Knoblock, 2015] Bo Wu and Craig A. Knoblock. An iterative approach to synthesize data transformation programs. In IJCAI, 2015.
2cs.AI
Finite subsemigroups of free left regular bands Artem N. Shevlyakov arXiv:1406.3429v6 [math.AG] 29 Feb 2016 December 26, 2017 Abstract We describe all finite subsemigroups of free left regular bands. Moreover, we show applications of this result in algebraic geometry and model theory. 1 Introduction A semigroup is a left regular band if it satisfies the identities x2 = x, xyx = xy. Left regular bands have important applications in hyperplane arrangements, random walks and matroid theory, see e.g. [1, 2, 3, 4, 5, 6, 7, 8]. In the current paper we describe all finite subsemigroups of free left regular bands (Theorems 6.1 and 6.2). Actually, our proof is not short and easy. For example, we had to introduce about six partial orders over left regular bands (remark that all our orders are not compatible with the multiplication over left regular bands). Let us give the plan of our paper. The first tree sections contain all necessary definitions and simple statements devoted to left regular bands and semilattices. In particular, we give here the important definitions of local linear order and right hereditary property. In Section 5 we prove (Theorem 5.4) that any finite subband of a free left regular band has a local linear order. Thus, the local linear order is the necessary condition of the embeddability into free left regular bands. In Section 6 we prove that any right hereditary left regular band S with a local linear order is embeddable into a free left regular band of an appropriate rank. Firstly, we define a map h : S → F, where F is a free left regular band of infinite rank, and prove (Lemma 6.9) that h is a homomorphism. However, h may be not injective. Therefore, in Subsection 6.2 we define a procedure which takes h and obtains an embedding h′ after a finite number of iterations. Thus, the embedding h′ proves the main result of our paper (Theorem 6.1). In the last section of our paper we talk about open problems and possible applications of Theorem 6.1. Moreover, we discuss how to simplify the proof of Theorem 6.1 and why we do not do it. 2 Semilattices Below we shall consider join semilattices, and denote multiplication by ∪. Elements of semilattices are denoted below by bold letters x, y, z, . . . One can define a partial order over any join semilattice by x ⊆ y ⇔ y ∪ x = y. (1) Let M be a set, and FM be the family of all finite subsets (including ∅) of M . Let us define over FM a multiplication as a set union. Obviously, FM is isomorphic 1 to the join free semilattice of rank |M | with the adjoined identity. We denote the free basis of FM by {am |m ∈ M }. Sometimes elements of FM (free generators am ) will be called words (respectively, letters). By am ∈ c we shall denote that a letter am belongs to a word c ∈ FM . For any b, c ∈ FM one can define c\b ∈ FM as the set difference. The length |a| of a ∈ FM is the length of a word representing a. Let F denote the free semilattice generated by an infinite set of generators {ai |i ∈ I}. Take a finite join semilattice L. According to semilattice theory, L is embeddable into a free semilattice of an appropriate rank. The following embedding will play a crucial role in our study. Let us define a map ν : L → FL by [ ν(x) = at . x*t Lemma 2.1. ν is an embedding of L into FL . Proof. First, we prove that ν is a homomorphism of L. Let us take x, y and z = x∪y. We have [ [ ν(x) = at , ν(y) = ar , x*t y*r ν(z) = [ ap . z*p It is sufficient to prove {t|x * t} ∪ {r|y * r} = {p|z * p}. The relation x * t (y * r) implies z * t (respectively, z * r). Hence, {t|x * t} ∪ {r|y * r} ⊆ {p|z * p}. Let z * p. If x ⊆ p and y ⊆ p then z = x ∪ y ⊆ p, a contradiction. Therefore, either x * p or y * p. Thus, we obtained {t|x * t} ∪ {r|y * r} ⊇ {p|z * p}. Second, we prove that ν is an embedding. Suppose that Fx = Fy for some distinct x, y, where Fx = {t|x * t}, Fy = {r|y * r}. Since x ∈ / Fx , y ∈ / Fy , we have x ∈ / Fy , y ∈ / Fx . It follows that x ⊆ y and y ⊆ x, hence x = y. By the definition of ν, we have the next statement. Lemma 2.2. If ν(x) does not contain a letter ay , then x ⊆ y in L. Lemma 2.3. Let x, x′ , y, y′ ∈ L, x ⊂ x′ , y ⊂ y′ and d(x′ ) = ν(x′ ) \ ν(x) ⊆ ν(y′ ) \ ν(y) = d(y′ ). Then y ⊆ x. Moreover, the equality d(x′ ) = d(y′ ) implies x = y and x′ = y′ . 2 Proof. By the definition of ν, ν(x) does not contain ax . However x ⊂ x′ implies ax ∈ ν(x′ ). Hence, ax ∈ d(x′ ) ⇒ ax ∈ d(y′ ) ⇒ ax ∈ / ν(y). By Lemma 2.2, the last expression gives y ⊆ x. Suppose d(x′ ) = d(y′ ). By above, it follows x = y and therefore x′ = y′ . 3 Left regular bands A semigroup S is a left regular band if the next identities x2 = x, xyx = xy hold in S. Remark that we always consider left regular bands with the identity ε adjoined. By F we denote the free left regular of infinite rank. The elements of F are all words w in an infinite alphabet {ai |i ∈ I} such that any letter ai occurs at most one time in w. The product of two elements w1 , w2 ∈ F is defined as follows: w1 w2 = w1 ◦ (w2 )∃ , where ◦ is the word concatenation and the operator ∃ is the deletion of all letters which occur earlier. For example, (a1 a2 a3 )(a2 a3 a4 ) = a1 a2 a3 a4 . Below elements of F (free generators ai ) are called words (respectively, letters), and we shall use the denotation ai ∈ w if a letter ai belongs to a word w ∈ F. Remark that in our denotations free generators of the semilattice F and the left regular band F are indexed by the common set I. For elements x, y of a left regular band S one can define a relation x ≤ y ⇔ xy = y. It is easy to check that ≤ is a partial order over S. Remark that in some papers (e.g. see [4]) ≤ defines the contrary relation: yx = x. For elements x, y ∈ F the relation x ≤ y means that the word x is a prefix of y. The next lemma contains simple statements about the structure of free left regular bands F. Lemma 3.1. 1. The Hasse diagram of the order ≤ is a tree for F. The root of this tree is the identity ε. For example, the Hasse diagram for the free left regular band generated by three elements a1 , a2 , a2 is a1 a2 a3 a1 a3 a2 a2 a1 a3 a2 a3 a1 a1 a2 ❆ ❆ ✁ ✁ a1 a3 a2 a1 ❆ ❆ ✁ ✁ a3 a1 a2 a3 a2 a1 a2 a3 ❆ a3 a1 ✁ ❆ ✁ ❆ ✁ ❆ ✁ ❆ ✁ ❆✁a1 ❅ ❆✁a2 ❆✁a3 ✏✏ ✁ ✏ ❅ ✏✏ ✁ ❅ ✏✏ ✏ ❅ ✁ ✏✏ ε❅✁✏✏ Fig. 1 3 a3 a2 2. Let x1 , x2 , y1 , y2 ∈ F, xi ≤ yi and x1 , x2 are not ≤-comparable. Then y1 , y2 are not ≤-comparable. Define the another relation on elements of a left regular band S by x  y ⇔ yx = y. This relation is reflexive and transitive, but not necessarily antisymmetric. For a free left regular band F the relation x  y means that the word y contains all letters of a word x. For example, a1 a2  a2 a1 , a2  a1 a2 a3 . Obviously, the relation x ≤ y implies x  y in any left regular band. We shall write x ≈ y iff x  y and y  x. One can get a join semilattice L by identifying x and y if x ≈ y. Let σ : S → L denote the quotient map. L is called the support semilattice of S and for all x, y ∈ S we have σ(xy) = σ(x) ∪ σ(y). It is easy to see that for any s ∈ F the map σ(s) gets the set of all letters occurring in s. Thus, we obtain σ(F) = F, where σ(ai ) = ai (i ∈ I). F Let S∞us define a linear order < over the semilattice F as follows. We have F = n=0 Ln , where Ln = {a ∈ F | |σ(a)| = n} and each set Ln has a linear order <Ln . Thus, we put a <F b ⇔ |σ(a)| < |σ(b)| or a <Ln b for a, b ∈ Ln . Notice that x ≺ y implies x <F y for all x, y ∈ F. → − Let us define a map () : F → F as follows. Let {ai1 , ai2 , . . . , ain } be the set of all letters of a word a ∈ F. The letters of a correspond to free generators {ai1 , ai2 , . . . , ain } ⊆ F and the order <F is given by ai1 <F ai2 <F . . . <F ain . −→ Then the word (a) ∈ F is the product ai1 ai2 . . . ain . −→ Roughly speaking, (a) replaces the letters of a to the corresponding generators of F and sorts them in the given order <F . Following [4], a left regular band S is called right hereditary if the Hasse diagram of ≤ is a tree with the root element ε. By Lemma 3.1, any free left regular band is right hereditary. Let x, y, z be elements of a left regular band S, and the equivalence relation ∼z be as follows: x ∼z y ⇔ xz = yz. Clearly, the relation x ≤ y is equivalent to x ∼y y. Lemma 3.2. Let S, T be left regular bands. Suppose a map h : S → T preserves the relations , ∼c for each c ∈ S, i.e. for any a, b, c ∈ S we have: a  b ⇒ h(a)  h(b), a ∼c b ⇒ h(a) ∼h(c) h(b). Then h is a homomorphism. 4 Proof. Let us prove h(xy) = h(x)h(y) for all x, y ∈ S. Denote z = xy, hence zy = xy and z ∼y x. By the condition, h(z)h(y) = h(x)h(y). Since y  z, we have h(y)  h(z) and obtain h(z) = h(x)h(y). Example 3.3. Let us define a right hereditary band B = {x1 , x2 , x3 , y0 , y1 , y2 } defined by the following multiplication table (the identity ε is omitted): x1 x2 x3 y 0 y 1 y 2 x1 x1 y 0 y 1 y 0 y 1 y 1 x2 x2 x2 y 2 x2 y 2 y 2 x3 x3 x3 x3 x3 x3 x3 y0 y0 y0 y1 y0 y1 y1 y1 y1 y1 y1 y1 y1 y1 y2 y2 y2 y2 y2 y2 y2 The order ≤ over B is defined by the following Hasse diagram: y2 y1 y0 x 2 ✑ ✁ ✑ ✁ ✑ ❅ ❅ ✁✑✑ ε❅✁✑ x1 x3 Fig. 2 The support semilattice of B is a linear ordered semilattice 1 < 2 < 3 < 4, where σ(ε) = 1, σ(x1 ) = 2, σ(x2 ) = σ(y0 ) = 3, σ(x3 ) = σ(y1 ) = σ(y2 ) = 4. The embedding ν gives: ν(σ(x1 )) = a1 , ν(σ(x2 )) = ν(σ(y0 )) = a1 a2 , ν(σ(x3 )) = ν(σ(y1 )) = ν(σ(y2 )) = a1 a2 a3 . Thus, ν embeds σ(B) into F. The multiplication over B generates the following equivalence classes: x Equivalence classes of ∼x x1 {ε, x1 }, {x2 }, {y2 }, {y0 }, {y1 }, {x3 } x2 {ε, x2 }, {x1 , y0 }, {x3 }, {y1 }, {y2 } x3 {ε, x3 }, {x2 , y2 }, {x1 , y0 , y1 } y0 {ε, x1 , y0 }, {x2 }, {x3 }, {y2 }, {y1 } y1 {ε, x1 , y0 , y1 }, {x2 , y2 }, {x3 } y2 {ε, x2 , y2 }, {x3 }, {x1 , y0 , y1 }  4 Properties of right hereditary bands Below S is a right hereditary band and L = σ(S). The following lemma describes the main property of left regular bands. Lemma 4.1. The equality x1 x2 = x3 x4 (xi ∈ S) implies x1 ≤ x3 or x3 ≤ x1 . Proof. Let x = x1 x2 = x3 x4 and we have x1 ≤ x, x3 ≤ x. Since the Hasse diagram of the order ≤ is a tree, the elements x1 , x3 should be ≤-comparable. 5 Lemma 4.2. Let S be a right hereditary band and x, y, z ∈ S. Then x ≤ y ≤ xz or y ≤ x ≤ yz iff x ∼z y. Proof. Let us prove the “only if” part of the lemma. Let x ≤ y ≤ xz. By the definition of the order ≤ we have: xy = y, yxz = xz. Therefore, (xy)xz = xz ⇔ (xy)z = xz ⇔ yz = xz ⇔ x ∼z y. Let us prove the “if” part of the lemma. Since S is right hereditary, the relation xz = yz implies either x ≤ y or y ≤ x. So x ≤ y ≤ yz = xz or y ≤ x ≤ xz = yz. Since the Hasse diagram of the order ≤ is a tree with the root ε, it allows us to define the ancestor α(s) ∈ S for any s 6= ε as follows: α(s) = max{x ∈ S|x < s}. An element s′ with α(s′ ) = s is called a descendant of s. For any c 6= ε let us define a set Sc ⊆ S by Sc = {s ∈ S \ {ε}|s ∼c α(s), s ≁c′ α(s) for any c′ < c} (2) Notice that Sc 6= ∅, since c ∈ Sc . Example 4.3. For the left regular band B we have: Sx1 = {x1 }, Sx2 = {x2 , y0 }, Sx3 = {x3 , y0 , y1 , y2 }, Sy0 = {y0 }, Sy1 = {y1 , y2 }, Sy2 = {y1 , y2 }.  Lemma 4.4. For any x ∈ Sb , a < b we have a  α(x). Proof. By the condition, a ≤ α(b) < b. By Lemma 4.2 we have α(x) ≤ x ≤ α(x)b. Also we have α(x) ≤ α(x)a ≤ α(x)ab = α(x)b. Since the Hasse diagram of ≤ is a tree, the first chain above should contain α(x)a. If α(x) ≤ x ≤ α(x)a Lemma 4.2 gives α(x) ∼a x that contradicts the definition of the set Sb . Thus, α(x) ≤ α(x)a < x. By the definition of the ancestor, it holds α(x) = α(x)a, hence a  α(x). Lemma 4.5. comparable. For all x, y ∈ Sc the elements α(x)α(y)x, α(x)α(y)y are ≤- 6 Proof. By the definition of Sc , we have α(x)c = xc, α(y)c = yc. Let us multiply both equalities by α(x)α(y) and obtain α(x)α(y)c = α(x)α(y)xc, α(x)α(y)c = α(x)α(y)yc. Therefore, α(x)α(y)xc = α(x)α(y)yc. Since S is right hereditary, the prefixes α(x)α(y)x, α(x)α(y)y are ≤-comparable. Let s ∈ S \ {ε} and denote δν (s) = ν(σ(s)) \ ν(σ(α(s))) ∈ FL . (3) A band S has a local linear order if for each b the set Sb admits a linear order ⊏b such that for all x, y ∈ Sb it holds: 1. δν (x) ⊂ δν (y) ⇒ x ⊏b y; (4) σ(x) ⊆ σ(α(y)) ⇒ x ⊏b y. (5) 2. 3. for arbitrary Sc ⊇ Sb we have: x ⊏b y ⇒ x ⊏c y. (6) Finite subbands of F 5 Below in this section we assume S ⊆ F, |S| < ∞, L = σ(S) ⊆ F and ν embeds L into FL . Let {w} denote the set of all letters of a word w ∈ F. By the properties of F, for each x ∈ S \ {ε} ⊆ F there exists a unique ∆(x) ∈ F such that x = α(x)∆(x) and {α(x)} ∩ {∆(x)} = ∅. Lemma 5.1. The following correspondences between δν and ∆ hold: 1. δν (x) ⊆ δν (y) ⇒ ∆(x)  ∆(y) (7) δν (x) ⊂ δν (y) and ∆(x) ≈ ∆(y) ⇒ y ≺ x. (8) 2. Proof. 1. By Lemma 2.3, we have α(y)  α(x). Let s1 = α(x)α(y)x = α(x)x = α(x)∆(x), s2 = α(x)α(y)y = α(x)y = α(x)α(y)∆(y) = α(x)∆(y). The images of the support mapping are: ν(σ(s1 )) = ν(σ(α(x))) ∪ ν(σ(α(y)) ∪ ν(σ(x)) = ν(σ(α(x))) ∪ ν(σ(α(y)) ∪ δν (x) ν(σ(s2 )) = ν(σ(α(x))) ∪ ν(σ(α(y)) ∪ ν(σ(y)) = ν(σ(α(x))) ∪ ν(σ(α(y)) ∪ δν (y) Since δν (x) ⊆ δν (y), we have ν(σ(s1 )) ⊆ ν(σ(s2 )), and therefore s1  s2 . By Lemma 4.5 s1 , s2 are ≤-comparable, hence s1 ≤ s2 and α(x)∆(x) ≤ α(x)∆(y). Let a be a letter form ∆(x). Since a ∈ / α(x), we have a ∈ ∆(y). Thus, ∆(x)  ∆(y). 7 2. According to Lemma 2.3, we have α(y)  α(x). (9) By ∆(x) ≈ ∆(y) we obtain y = α(y)∆(y)  α(x)∆(x) = x. Thus, y  x. Assume x ≈ y, (10) then yx = y ⇒ α(y)∆(y)α(x)∆(x) = α(y)∆(y) ⇒ α(y)∆(y)α(x) = α(y)∆(y) ⇒ α(x)  α(y)∆(y). By ∆(x) ≈ ∆(y), the words α(x) and ∆(y) have no common letters, therefore, α(x)  α(y). By (9), it follows α(x) ≈ α(y). Using (10), we obtain δν (x) = δν (y) that contradicts the condition. Let us define relations ⊏= , ⊏6= b over a set Sb as follows: x ⊏= y ⇔ ∆(x) ≈ ∆(y), and y <F x, where the linear order <F over F was defined above. Define x ⊏6= b y iff b contains a letter a ∈ {∆(y)} \ {∆(x)} and there is not any letter a′ ∈ {∆(x)} \ {∆(y)} occurring after a in the word b. The letter a with such property is called the (x, y)-separator if b does not contain any letter with the same property after a. Example 5.2. If ∆(x) = a1 a2 a3 a5 , ∆(y) = a2 a4 a5 for some x, y ∈ Sb , b = a1 a2 a3 a4 a5 then x ⊏6= b y and a4 is the (x, y)-separator.  Obviously, ⊏6= b is defined for all x, y ∈ Sb with distinct sets {∆(x)}, {∆(y)}. The relation x ⊏b y holds iff 1. x ⊏6= b y or 2. x ⊏= y for undefined x ⊏6= b y. Clearly, ⊏b is defined for any pair (x, y) ∈ Sb2 . Lemma 5.3. If x ∈ Sb then ∆(x)  ∆(b). Proof. We have α(x)b = xb and Lemma 4.4 gives α(b)  α(x). Therefore, α(x)b = xb ⇔ α(x)∆(b) = α(x)∆(x)∆(b). Let a be a letter from the word ∆(x). Hence, a should occur in the left part of the last equality. Since α(x), ∆(x) have no common letters, we obtain a ∈ ∆(b). Thus, ∆(x)  ∆(b). Theorem 5.4. Any finite subband S ⊆ F has a local linear order. Proof. By the definition of the local linear order, one should prove the following. Let us prove that ⊏b satisfies all conditions of a local linear order. 8 1. ⊏b is a linear order. By the definition, ⊏b is irreflexive and asymmetric and it is defined for any pair (x, y) ∈ Sb2 . Let us prove the transitivity and take x ⊏b y, y ⊏b z. We have the following cases. 6= 6= (a) x ⊏6= b y, y ⊏b z. Let us prove x ⊏b z. It follows there exist the (x, y)-separator a and the (y, z)-separator a′ . By the definition of a separator, we have a ∈ {∆(y)} \ {∆(x)}, a′ ∈ {∆(z)} \ {∆(y)}. Suppose a is before a′ in the word b (or a = a′ ). It follows that a′ ∈ / ∆(x). ′ ′′ Let us prove that a is the (x, z)-separator. Take an arbitrary a ∈ {∆(x)} 6= ′′ ′′ after a′ in the word b. By x ⊏6= b y, a ∈ {∆(y)}. Since y ⊏b z, a should belong to {∆(z)}. Thus, a′ is the (x, z)-separator and x ⊏6= b z. 6= ′ Suppose a is after a in the word b. Since y ⊏b z, then a ∈ {∆(z)}. Let us prove that a is the (x, z)-separator. Take an arbitrary a′′ ∈ {∆(x)} 6= ′′ after a in the word b. By x ⊏6= b y, we have a ∈ ∆(y). Since y ⊏b z ′′ ′′ and a occurs in b after a, a should belong to {∆(z)}. Thus, a is the (x, z)-separator, and therefore x ⊏6= b z. = = (b) x ⊏ y, y ⊏ z. It easily follows ∆(x) ≈ ∆(z), z <F y <F x. Thus, x ⊏= z. = (c) x ⊏6= b y, y ⊏ z. We have ∆(y) ≈ ∆(z). Let a be the (x, y)-separator. Hence, there is not any a′ ∈ {∆(x)} \ {∆(y)} = {∆(x)} \ {∆(z)} after a in the word b. Thus, a is the (x, z)-separator, and x ⊏6= b z. (d) x ⊏= y, y ⊏6= b z. This case is similar to the previous one. 2. Prove (4). Take x, y with δν (x) ⊂ δν (y). By (7), we have ∆(x)  ∆(y). Assume ∆(x) ≺ ∆(y). By Lemma 5.3, all letters of ∆(y) belong to the word b. Thus, the last letter a ∈ {∆(y)} \ {∆(x)} in the word b is the (x, y)-separator, and x ⊏6= b y. If ∆(x) ≈ ∆(y) then (8) gives y ≺ x ⇒ y <F x ⇒ x ⊏= y. 3. Prove (5). By Lemma 5.3, all letters of ∆(x), ∆(y) belong to the word b. Since x  α(y), the sets of letters {x}, {∆(y)} do not intersect. Let a (a′ ) be the last letter from {∆(x)} (respectively, {∆(y)}) in the word b. If a is before a′ in b we immediately obtain x ⊏b y. Let us assume the converse: ∆(b) = d1 a′ d2 ad3 for some di ∈ F. Using Lemma 4.4, we have α(b)  α(x) and α(x)b = xb ⇒ α(x)∆(b) = x∆(b) ⇒ α(x)d1 a′ d2 ad3 = xd1 a′ d2 ad3 . The word α(x)d1 a′ does not contain a, and x does not contain a′ . Therefore, the words α(x)d1 a′ , x are not ≤-comparable, and the last equality does not hold. 4. Prove (6). Suppose x ⊏= y. Since the relation ⊏= does not depend on b, we immediately obtain x ⊏c y. Let us put x ⊏6= b y, and a is the (x, y)-separator. By Lemma 4.4, α(b)  α(x), α(b)  α(y), and α(c)  α(b) (since b ∈ Sb ⊆ Sc ). Hence, {∆(x)} ∩ {α(b)} = {∆(y)} ∩ {α(b)} = ∅ and a ∈ / {α(b)}. The equality α(b)c = bc gives α(b)∆(c) = α(b)∆(b)∆(c). By Lemma 5.3, ∆(y)  ∆(y) and therefore a ∈ ∆(b). Therefore, the left part of the last equality should contain a, hence, a ∈ {∆(c)}. The relation x ⊏6= c y fails if there exists a letter a′ ∈ {∆(x)} \ {∆(y)} and a′ occurs after a in ∆(c). 9 ′ By Lemma 5.3, a′ ∈ {∆(x)} ⊆ {∆(b)}. Since x ⊏6= b y, a occurs before a in the word b. Thus, ∆(c) = c1 ac2 a′ c3 and ∆(b) = b1 a′ b2 ab3 for some ci , bi ∈ F and we have α(b) ∼c b ⇔ α(b)c1 ac2 a′ c3 = α(b)b1 a′ b2 ab3 c1 c2 c3 . The prefixes s1 = α(b)c1 a, s2 = α(b)b1 a′ are not ≤-comparable (s1 does not contain a′ , s2 does not contain a), a contradiction. Thus, we proved x ⊏c y. 6 Main result Recall that F = {ai |i ∈ I} is the free left regular band of infinite rank with the identity adjoined. The aim of this paper is to prove the next theorem. Theorem 6.1. equivalent: For any finite left regular band S the following conditions are 1. S is embeddable into F; 2. S is right hereditary and has a local linear order. Obviously, Theorem 6.1 immediately gives the following result for free left regular bands of finite ranks. Theorem 6.2. equivalent: For any finite left regular band S the following conditions are 1. S is embeddable into a free left regular band Fn of an appropriate rank n; 2. S is right hereditary and has a local linear order. Let us come back to the proof of Theorem 6.1. The implication (1) ⇒ (2) follows from Theorem 5.4. The implication (2) ⇒ (1) is quite complicated, so its proof is divided into two parts. Below S is a finite right hereditary band with a local linear order. 6.1 Orderings and homomorphisms Let L = σ(S). One can initially assume that L is a subsemilattice of F. Thus, below we consider elements of L as words of F. Let s ∈ S \ {ε} and δ(s) = σ(s) \ σ(α(s)) ∈ F (obviously, δ(s) coincides with δν (s) defined in (3) if we embed L into F via the embedding ν). For any c ∈ S we define a vector χ(c) = (χ(α(c)), y1 , y2 , . . . , ync ) such that 1. χ(c) is a recursive structure, since it contains a subvector χ(α(c)); 2. Sc = {y1 , y2 , . . . , ync }; 3. yi ⊏c yi+1 ; 10 (11) 4. χ(ε) is the empty vector. Example 6.3. Let us show that the left regular band B from the previous examples has a local linear order and compute the vectors χ(c) for each c ∈ Sc . For elements of B we have δ(x1 ) = a1 , δ(x2 ) = a1 a2 , δ(x3 ) = a1 a2 a3 , δ(y0 ) = a2 , δ(y1 ) = a3 , δ(y2 ) = a3 (since ν embeds σ(B) into F we have δ(s) = δν (s) for each s ∈ B). One of the possible definitions of ⊏b is in the following table (if a set Sb consists of a unique element the definition of ⊏b is omitted). Using the definition of ⊏b , one can define vectors χ(b). x ⊏x over Sx χ(x) x1 — (x1 ) x2 y 0 ⊏ x2 (y0 , x2 ) x3 y0 ⊏ y1 ⊏ y2 ⊏ x3 (y0 , y1 , y2 , x3 ) y0 — (χ(x1 ), y0 ) y1 y1 ⊏ y2 (χ(y0 ), y1 , y2 ) y2 y1 ⊏ y2 (χ(x2 ), y1 , y2 )  One can recursively apply (11) to α(c) and obtain a new vector χ(c) = (χ(α(α(c))), x1 , x2 , . . . , xnα(c) , y1 , y2 , . . . , ync ). It allows us to descend to any element a ≤ c obtaining the vector: χ(c) = (χ(a), . . . , y1 , y2 , . . . , ync ). (12) We shall say y ∈ χ(c) if y ∈ Sc or y ∈ χ(α(c)). Lemma 6.4. Let χ(c) be the vector (11). Then any element y with y ∼c α(y) belongs to χ(c). Proof. Let c′ ≤ c be the maximal element such that α(y) ≁α(c′ ) y and α(y) ∼c′ y (such element always exists in the set {s ∈ S|ε < s ≤ c}). Therefore, y ∈ Sc′ and y ∈ χ(c′ ) ⊆ χ(c). Now we are able to define a map h : S → F of a right hereditary band S. ( ε, if c = ε, h(c) = , (13) h(α(c))c1 c2 . . . cn , otherwise −−→ − → where χ(c) = (χ(α(c)), y1 , y2 , . . . , yn ) and ci = δ(yi ) (the operator () was defined in Section 3). Example 6.5. Let us compute the images of h for elements of the left regular band B defined in examples above. Let us fix an order over the free generators a1 <F a2 <F a3 and obtain −−→ δ(x) x h(x) x1 a1 a1 x2 a1 a2 (a2 ) · (a1 a2 ) = a2 a1 x3 a1 a2 a3 (a2 ) · (a3 ) · (a3 )(a1 a2 a3 ) = a2 a3 a1 y0 a2 h(x1 ) · (a2 ) = a1 a2 y1 a3 h(y0 ) · (a3 ) · (a3 ) = a1 a2 a3 y2 a3 h(x2 ) · (a3 ) · (a3 ) = a2 a1 a3 11 One can directly check that h embeds B into F.  Since h(c) is recursively defined by the image h(α(c)) and h(α(c)) ≤ h(c), we obtain the next simple statement. Lemma 6.6. The map h preserves the order ≤: if a ≤ b then h(a) ≤ h(b). Lemma 6.7. For any c ∈ S it holds σ(h(c)) = σ(c) (recall that both elements σ(s), σ(h(s)) belong to F). Proof. If c = ε the equality obviously holds. Assume the equality holds for the ancestor α(c): σ(h(α(c))) = σ(α(c)) Let χ(c) be the vector (11), and the image h(c) is defined by (13). Since c ∈ Sc , there exists an index i such that yi = c, hence σ(h(c)) ⊇ σ(h(α(c))) ∪ δ(c) = σ(α(c)) ∪ δ(c) = σ(c). Let us prove the contrary inclusion. By the choice of the elements yi , we have yi c = α(yi )c, hence σ(yi ) ∪ σ(c) = σ(α(yi )) ∪ σ(c) and it follows δ(yi ) ⊆ σ(c). Thus, σ(h(c)) = σ(h(α(c))) [ δ(yi ) ⊆ σ(α(c)) ∪ σ(c) = σ(c). i We need the next auxiliary lemma. Lemma 6.8. chain Let y, z, c ∈ S \ {ε}, z ∼c α(z), s = α(z)yz, s 6= α(z)y and in the s = s0 > s1 > . . . > sk−1 > sk = α(z)y each si is the ancestor of si−1 (1 ≤ i ≤ k). Then 1. si ∼c si−1 ; 2. σ(s) \ σ(α(z)y) ⊆ δ(z); 3. δ(si ) ⊆ σ(s) \ σ(α(z)y); 4. δ(si ) ⊆ δ(z); 5. k [ δ(si ) = σ(s) \ σ(α(z)α(b)); (14) i=0 6. the equality δ(si ) = δ(z) implies k = 1; 7. suppose z ∈ Sc′ (it follows c′ ≤ c). Then si ∈ Sci for some ci ≤ c′ ; 8. if δν (si ) ⊂ δν (z) then si occurs before z in the vector χ(c). Proof. 1. We have the chain α(z)y = sk < sk−1 < . . . < s0 = α(z)yz ≤ α(z)yzc = α(z)yα(z)c = α(z)yc. By Lemma 4.2, si ∼c α(z)y and therefore si ∼c si−1 . 12 2. Suppose a letter a belongs to σ(α(z)yz) \ σ(α(z)y) ∈ F. Then a ∈ σ(z) but a∈ / σ(α(z)). Thus, a ∈ δ(z). 3. Consider a letter a ∈ δ(si ). Hence, a ∈ σ(si ) ⊆ σ(s), a ∈ / σ(si+1 ). Since si+1 ≥ α(z)y, we have a ∈ / σ(α(z)y). Thus, a ∈ σ(s) \ σ(α(z)y). 4. The statement immediately follows from the previous ones. 5. We have σ(si−1 ) = δ(si−1 ) ⊔ σ(si ) (x ⊔ y is the join of words x, y ∈ F which do not have common letters). Thus, σ(s0 ) = δ(s0 ) ⊔ σ(s1 ) = δ(s0 ) ⊔ δ(s1 ) ⊔ σ(s2 ) = . . . = k [ δ(si ) ⊔ σ(α(z)y) i=0 and we obtain (14). 6. Immediately follows from (14) and previous statements of the lemma. 7. We have z ∼c′ α(z). One can repeat the proof of the first statement of the lemma for c′ instead of c and obtain si ∼c′ si−1 . Therefore, si ∈ Sci for some ci ≤ c′ ≤ c 8. By the previous statement of the lemma, each si belongs to Sci for some ci ≤ c′ . Therefore, the element si (z) belongs to the vector χ(ci ) (respectively, χ(c′ )). If ci < c′ , then the contents of χ(ci ) occur before the contents of χ(c′ ) in the vector χ(c), and therefore si occur before z in the vector χ(c). If ci = c′ then, according to (4), the condition δν (si ) ⊂ δν (z) implies si ⊏c′ z. Therefore, si occurs before z in the vector χ(c′ ). Since the vector χ(c′ ) is included in χ(c), si occurs before z in χ(c). Recall that Lemma 6.8 holds for any embedding of σ(S) into F. If we replace all occurrences of δ to δν we obtain true statements about the embedding ν. Lemma 6.9. S. The map h : S → F is a homomorphism of a right hereditary band Proof. Using Lemmas 3.2, 6.7, it is sufficient to prove the implication a ∼c b ⇒ h(a) ∼h(c) h(b). (15) α(b) ∼c b ⇒ h(α(b)) ∼h(c) h(b). (16) First, we prove By the definition of h, one can write h(b) = h(α(b))b1 b2 . . . bn , h(c) = c1 c2 . . . cm (in the last expression we iterate the definition of h(c) to the identity ε), and there exist vectors χ(b) = (χ(α(b)), y1 , y2 , . . . , yn ), χ(c) = (z1 , z2 , . . . , zm ), −−→ −−−→ such that bi = δ(yi ), cj = δ(zj ). Lemma 6.4 states zj ∼c α(zj ) (1 ≤ j ≤ m), yi ∼b α(yi ) (1 ≤ i ≤ n). Using Lemmas 4.2, 4.4, we have the following chain α(yi ) ≤ yi ≤ α(yi )b ≤ α(yi )bc = (α(yi )α(b))c = α(yi )c. 13 By Lemma 4.2, it follows α(yi ) ∼c yi . Thus, the vector χ(c) contains all yi . In other words, there exists a function f : {1, 2, . . . , n} → {1, 2, . . . , m} which embeds {y1 , y2 , . . . , yn } into χ(c) (yi = zf (i) ). By (6), the function f is monotone: i1 < i2 → f (i1 ) < f (i2 ). Let z ∈ χ(c) and below we prove that one of the following holds: 1. δ(z) ⊆ [ δ(zj ) ∪ σ(α(b)), (17) j where elements zj occur in χ(c) before z; 2. z is after b in χ(c); 3. z belongs to χ(b), i.e. z = yi or z ∈ χ(α(b)). Assume for some z ∈ χ(c) all conditions above fail. Let s = α(z)α(b)z. If s = α(z)α(b) then δ(z) ⊆ σ(α(b)), and (17) holds. Therefore, we assume below s > α(z)α(b), and we have a nontrivial chain s = s0 > s1 > . . . > sk > α(z)α(b), where each si is the ancestor of the previous one. By Lemma 6.8 we have si ∼c α(si ), and all si belong to the vector χ(c) (Lemma 6.4). We have the following cases. 1. Let s = z and denote s′ = α(z)b (we use z ∼c α(z) below): α(z)α(b)z = z ⇒ α(z)α(b)zc = zc ⇒ α(z)α(b)α(z)c = zc ⇒ α(z)(α(b)c) = zc ⇒ α(z)bc = zc ⇒ s′ c = zc. Since S is right hereditary, the elements z, s′ are ≤-comparable. Thus, we have the following cases. (a) If z ≤ s′ then α(z) ≤ z ≤ α(z)b and Lemma 4.2 gives α(z) ∼b z. Thus, z should occur in the χ(b), a contradiction. (b) Let s′ = α(z)b < z. By the definition of the ancestor (there are not elements between α(z) and z), we obtain s′ = α(z). Thus, b  α(z). By (5), we have b ⊏c z, therefore z occurs after b in χ(c), a contradiction with the choice of z. 2. Let s 6= z and Lemma 6.8 gives δν (s) ⊆ δν (z). If we assume δν (s) = δν (z) then α(z) ≈ α(s)  α(z)α(b) (Lemma 2.3) and we have α(b)  α(z). Therefore s = (α(z)α(b))z = α(z)z = z, a contradiction. Thus, δν (s) ⊂ δν (z), and Lemma 6.8 provides δν (si ) ⊂ δν (z). By the last statement of Lemma 6.8, all si occur before z in χ(c). Let c = σ(α(b)) ∪ k [ i=0 By (14), c = σ(α(b)) ∪ (σ(s) \ σ(α(z)α(b))). 14 δ(si ). Let us prove c ⊇ δ(z). Suppose a letter a belongs to the word δ(z). Therefore, a ∈ σ(z), a ∈ / σ(α(z)). If a ∈ σ(α(b)) we immediately obtain a ∈ c. Otherwise (a ∈ / σ(α(b))), we have a ∈ σ(z) \ σ(α(z)α(b)) ⇒ a ∈ c. Thus, we have proved (17) that contradicts the choice of z. Let us come back to the equality (16). One should prove h(α(b))c1 c2 . . . cm = h(α(b))b1 b2 . . . bn c1 c2 . . . cm . (18) −−→ −−−−→ Since b ∈ χ(b) and b ∈ χ(c), there exists an index i such that δ(yi ) = δ(zf (i) ) = −−→ δ(b). For each zk , k < f (i) we have one of the following 1. zk ∈ χ(b) (probably, zk ∈ χ(α(b))); 2. zk satisfies (17). In the second case all letters of ck are eliminated by letters of previous elements and one can remove such ck from (18). If zk ∈ χ(α(b)) then all letters of ck occur in h(α(b)) (Lemma 6.7) and ck can be removed from (18). Thus one can reduce (18) to −−→ h(α(b))b1 b2 . . . bi−1 δ(b)cf (i)+1 cf (i)+2 . . . cm = −−→ −−→ h(α(b))b1 b2 . . . bi−1 δ(b)bi+1 . . . bn b1 b2 . . . bi−1 δ(b)cf (i)+1 cf (i)+2 . . . cm ⇔ −−→ −−→ h(α(b))b1 b2 . . . bi−1 δ(b)cf (i)+1 cf (i)+2 . . . cm = h(α(b))b1 b2 . . . bi−1 δ(b)bi+1 . . . bn cf (i)+1 cf (i)+2 . . . cm . (19) Relations α(yi ) ∼b yi implies σ(yi ) ∪ σ(b) = σ(α(yi )) ∪ σ(b) ⇒ δ(yj ) ⊆ σ(b) = σ(α(b)) ∪ δ(b) = σ(h(α(b))) ∪ δ(b). Therefore, the elements bi+1 , bi+2 , . . . , bn in (19) are eliminated by letters of −−→ h(α(b)), δ(b), and (19) becomes a true equality: −−→ −−→ h(α(b))b1 b2 . . . bi−1 δ(b)cf (i)+1 cf (i)+2 . . . cm = h(α(b))b1 b2 . . . bi−1 δ(b)cf (i)+1 cf (i)+2 . . . cm . Thus, we have proved (16). Let us prove (15) using (16). Since S is right hereditary, a < b (similarly, one can assume b < a). Therefore, there exists a chain b = b0 > b1 > . . . > br = a, where bi = α(bi−1 ). Since a ≤ bi ≤ b ≤ ac, Lemma 4.2 gives a ∼c bi . The transitivity of ∼c provides bi+1 ∼c bi . Above we proved h(bi+1 ) ∼h(c) h(bi ), and the transitivity of ∼h(c) gives h(a) ∼h(c) h(b). 15 6.2 Improving the homomorphism The homomorphism h : S → F defined above is not necessarily an embedding of S into F. In other words, it is possible ker(h) = {(s1 , s2 )|s1 6= s2 , h(s1 ) = h(s2 )} = 6 ∅. Example 6.10. Let us define a right hereditary band B ′ = {x1 , x2 , x3 , y1 , y2 , y3 } by the following multiplication table (the identity ε is omitted): x1 x2 x3 y 1 y 2 y 3 x1 x1 x1 y 1 y 1 y 2 y 3 x2 x2 x2 y 3 y 3 y 3 y 3 x3 x3 x3 x3 x3 x3 x3 y1 y1 y1 y1 y1 y1 y1 y2 y2 y2 y2 y2 y2 y2 y3 y3 y3 y3 y3 y3 y3 The order ≤ over B ′ is defined by: y3 y1 y2 x 2 ✑ ✁ ✑ ✁ ✑ ❅ ❅ ✁✑✑ ε❅✁✑ x1 x3 Fig. 3 The support semilattice of B ′ is a linear ordered semilattice 1 < 2 < 3, where σ(ε) = 1, σ(x1 ) = σ(x2 ) = 2, σ(x3 ) = σ(y1 ) = σ(y2 ) = σ(y3 ) = 3. The embedding ν gives: σ(x1 ) = σ(x2 ) = a1 , σ(x3 ) = σ(y1 ) = σ(y2 ) = σ(y3 ) = a1 a2 . −−→ Thus, the embedding ν embeds σ(B ′ ) into F. We have (computing δ(x), we use a1 <F a2 ): −−→ x Sx ⊏x χ(x) h(x) δ(x) x1 {x1 } — a1 (x1 ) a1 x2 {x2 } — a1 (x2 ) a1 x3 {x3 , y1 , y3 } y1 ⊏ y2 ⊏ x3 a1 a2 (y1 , y2 , x3 ) a2 a1 y1 {y1 , y3 } y1 ⊏ y3 a2 (χ(x1 ), y1 , y3 ) a1 a2 y2 {y2 , y3 } y2 ⊏ y3 a2 (χ(x1 ), y2 , y3 ) a1 a2 y3 {y2 , y3 } y2 ⊏ y3 a2 (χ(x2 ), y2 , y3 ) a1 a2 Thus, we have a nonempty kernel ker(h) = {(x1 , x2 ), (y1 , y2 ), (y1 , y3 ), (y2 , y3 )}.  Below we define a series of homomorphisms h1 , h2 , . . . , hm such that ker(h) ⊃ ker(h1 ) ⊃ ker(h2 ) ⊃ . . . ⊃ ker(hm ) = ∅. using the next algorithm. 16 Embedding algorithm INPUT: a homomorphism h : S → F. OUTPUT: an embedding h′ : S → F. 1. Put h′ = h, and F ′ is the free left regular band generated by letters {ai | ∃s ∈ S, ai ∈ h(s)}. 2. Take c ∈ S such that b1 , b2 , . . . , bk are all descendants of c (α(bi ) = c), and h′ (bi ) ≤ h′ (bj ) for some distinct i, j; Apply Modification(h′ , F ′ , c, b1 , b2 , . . . , bk ) (see below) and obtain a new homomorphism h′ and a new free left regular band F ′ . 3. If there is not any c ∈ S from the previous step, we terminate the algorithm. Modification(h, F, c, b1 , b2 , . . . , bk ) INPUT: a homomorphism h : S → F , free left regular band F , c ∈ S, and all descendants b1 , b2 , . . . , bk of c. OUTPUT: a homomorphism h′ : S → F ′ , where F ′ ⊇ F is a free left regular band, and h′ is defined as follows. Let C ⊆ F be the set of all letters a ∈ / h(c). Let F ′ be the free left regular band generated by F and new free generators {t∅c , tbc1 , tbc2 , . . . , tbck }. Let t′c = t∅c tbc1 tbc2 . . . tbck , Hc = {s ∈ S | h(s) contains a letter from C}, Scbi = {s | ∃y ≥ bi cs = ys}, ! [ Scbi . Sc∅ = Hc \ i First, one should prove the following statement. Lemma 6.11. For all i 6= j Scbi ∩ Scbj = ∅ and Scbi ⊆ Hc . Proof. Assume s ∈ Scbi ∩ Scbj . It follows that there exist yi , yj such that bi ≤ yi , bj ≤ yj , cs = yi s, cs = yi s. Therefore, yi s = yj s and yi , yj should be ≤-comparable. However it is impossible, since S is right hereditary. Let us prove Scbi ⊆ Hc . Any s ∈ Scbi satisfies h(c)h(s) = h(y)h(s) for some y ≥ bi > c. If assume s ∈ / Hc then h(s)  h(c) ≤ h(y) and the last equality becomes h(c) = h(y), a contradiction. Now we are ready to define a new mapping h′ by the following substitutions in images of h: ( h(s), if s ∈ / Hc , h′ (s) = h(s)|a:=atxc t′c , for all a ∈ C if s ∈ Scx (x ∈ {b1 , b2 , . . . , bk , ∅}) 17 After the definition of h′ Modification algorithm stops. Example 6.12. Let us explain the work of Embedding and Modification algorithms at the semigroup B ′ . First, we take c = ε. Then C = {a1 , a2 }, b1 = x1 , b2 = x2 , b3 = x3 , Sεx1 = {x1 , y1 , y2 }, Sεx2 = {x2 , y3 }, Sεx3 = {x3 }, Sε∅ = ∅. By the Modification algorithm, we obtain t′ε = t∅ε txε 1 txε 2 txε 3 . Thus, h′ (x1 ) = x a1 tε 1 t∅ε txε 2 txε 3 , h′ (x2 ) = a1 txε 2 t∅ε txε 1 txε 3 , h′ (x3 ) = a2 txε 3 t∅ε txε 1 txε 2 a1 txε 3 t∅ε txε 1 txε 2 = a2 txε 3 t∅ε txε 1 txε 2 a1 , h′ (y1 ) = h′ (y2 ) = a1 txε 1 t∅ε txε 2 txε 3 a2 txε 1 t∅ε txε 2 txε 3 = a1 txε 1 t∅ε txε 2 txε 3 a2 , h′ (y3 ) = a1 txε 2 t∅ε txε 1 txε 3 a2 txε 2 t∅ε txε 1 txε 3 = a1 txε 2 t∅ε txε 1 txε 3 a2 . We have ker(h′ ) = {(y1 , y2 )}, so one should repeat an iteration of Embedding algorithm. We take c = x1 and obtain C = a2 b1 = y1 , b2 = y2 , Sx1 y1 = {y1 , x3 } (since x1 x3 = y1 x3 ), Sx1 y2 = {y2 }, Sx1 ∅ = {y3 }. Modification algorithm now gives: t′x1 = t∅x1 tyx11 tyx21 , h′′ (x1 ) = h′ (x1 ), h′′ (x2 ) = h′ (x2 ), h′′ (x3 ) = a2 tyx11 t∅x1 tyx21 txε 3 t∅ε txε 1 txε 2 a1 , h′′ (y1 ) = a1 txε 1 t∅ε txε 2 txε 3 a2 tyx11 t∅x1 tyx21 , h′′ (y2 ) = a1 txε 1 t∅ε txε 2 txε 3 a2 tyx21 t∅x1 tyx11 , h′′ (y3 ) = a1 txε 2 t∅ε txε 1 tεx3 a2 t∅x1 tyx11 tyx21 . Thus, we obtained an embedding h′′ : S → F after two iterations of Embedding algorithm.  Lemma 6.13. Let B = {b1 , b2 , . . . , bk , ∅}. 1. Let us consider x, y ∈ S such that x ∈ Scd for some d ∈ B. Then h′ (x)h′ (y) = h(x)|a:=atdc t′c h(y), (20) where a is the first letter of h(x) from the set C. 2. Suppose x, y ∈ S satisfy h(x) < h(y). The inequality h′ (x) < h′ (y) fails only if x ∈ Scd , y ∈ Sce for distinct e, d ∈ B. 3. Suppose x, y, z ∈ S satisfy h(x) ∼h(z) h(y), h(x) ≤ h(y) and h′ (x) ≤ h′ (y). The relation h′ (x) ∼h′ (z) h′ (y) fails only if y ∈ Scd , z ∈ Sce for distinct e, d ∈ B and x ∈ / Hc . Proof. 1. Let a′ ∈ C be a letter of the word h(x)h(y) which occurs after a. By the definition of the map h′ , the letter a (a′ ) will be replaced to the expression a′ tdc t′c for some d ∈ B (respectively, a′ tec t′c for some e ∈ B). However the subword tec t′c is eliminated by tdc t′c which occurs earlier. Thus, t-letters will be occur only after a in h′ (x)h′ (y) and we immediately obtain (20). 2. If y ∈ / Hc then x ∈ / Hc (since h(x) < h(y)) and h′ (x) = h(x), h′ (y) = h(y). In this case the inequality h′ (x) < h′ (y) holds. Since the case x ∈ / Hc , y ∈ Hc is impossible, it is sufficient to consider the case x ∈ Hc , i.e. x ∈ Scd for some d ∈ B. Since h(x) < h(y), we have y ∈ Hc and x ∈ Sce for some e ∈ B. If d = e then the inequality h′ (x) < h′ (y) remains true. Thus, d 6= e. 3. If x ∈ Hc then x ∈ Scf for some f ∈ B. Since h′ (x) ≤ h′ (y), y belongs to the same set Scf . Let a be the first letter from h(x) with a ∈ C (since h(x) ≤ h(y), a is the first letter from C in the word h(y) = h(x)w). By (20) we have h′ (x)h′ (z) = h(x)|a:=atf t′ h(z), c c 18 h′ (y)h′ (z) = h(y)|a:=atf t′ h(z) = h(x)|a:=atf t′ wh(z), c c c c and the equality h(x)|a:=atf t′ h(z) = h(x)|a:=atf t′ wh(z) c c c c obviously holds, since we have the condition h(x)h(z) = h(x)wh(z). Thus, below we assume x ∈ / Hc , i.e. h(x) does not contain letters from C and ′ hence h (x) = h(x). Suppose y ∈ Hc , i.e. y ∈ Scd for some d ∈ B. We have that the right part of the equality h(x)h(z) = h(y)h(z) contains letters from C. Therefore, h(z) should contain a letter from C, i.e. z ∈ Sce for some e ∈ B. Let a ∈ C (a′ ∈ C) be the first letter in the word h(y) (respectively, h(z)). By (20), we have h′ (y)h′ (z) = h(y)|a:=atdc t′c h(z), h′ (x)h′ (z) = h(x)h(z)|a′ :=a′ tec t′c . It is easy to see that for d = e the equality h′ (x)h′ (z) = h′ (y)h′ (z) holds, and we came to the contradiction. Thus, d 6= e. It is sufficient to consider the case x, y ∈ / Hc , i.e. h′ (x) = h(x), h′ (y) = h(y). ′ If assume z ∈ / Hc then h (z) = h(z), and the equality h′ (x)h′ (z) = h′ (y)h′ (z) holds. Thus, we put z ∈ Hc , i.e. z ∈ Sce for some e ∈ B. Therefore, h′ (x)h′ (z) = h(x)h(z)|a:=atec t′c , h′ (y)h′ (z) = h(y)h(z)|a:=atec t′c for some letter a ∈ C of the word h(z). Obviously, we obtain the equality h′ (x)h′ (z) = h′ (y)h′ (z) (since h(x)h(z) = h(y)h(z)), a contradiction. Let us prove that the map h′ defined in Modification procedure is a homomorphism. Lemma 6.14. If x < y (x, y ∈ S) then h′ (x) < h′ (y) (21) Proof. Since h is a homomorphism and h satisfies Lemma 6.7, we have h(x) < h(y) (22) According to Lemma 6.13, the relation (21) fails only if x ∈ Scd , y ∈ Sce , where e, d ∈ {b1 , b2 , . . . , bk , ∅} and e 6= d. 1. Let x ∈ Scbi , i.e. there exists x′ ≥ bi such that cx = x′ x. Let us multiply the last equality by y and obtain cy = x′ y. Thus, y ∈ Scbi . 2. Suppose y ∈ Scbi . There exists y ′ ≥ bi such that cy = y ′ y. Since x ≤ y, we have cxy = y ′ xy and the elements cx, y ′ x are ≤-comparable. For the inequality cx ≥ y ′ x we have y ′ xcx = cx ⇔ y ′ x = cx (we use y ′ ≥ c) ⇒ x ∈ Scbi . The relation cx ≤ y ′ x implies (we use α(bi ) = c and y ′ x ≥ bi ) either cx = c or cx ≥ bi . We have: 19 (a) cx ≥ bi , therefore bi x = cx and x ∈ Scbi ; (b) cx = c (x  c), then the word h(x) does not contain any letter from C. Hence, x ∈ / Hc that gives a contradiction with x ∈ Scd (Lemma 6.11 provides x ∈ Hc ). Lemma 6.15. h′ is a homomorphism. Proof. Following Lemma 3.2, it is sufficient to check that h′ preserves the relations , ∼x . Actually h′ is a substitution of letters in images of h. Hence, it obviously preserves -relation. Let us prove h′ (x) ∼h′ (z) h′ (y) (23) if x ∼z y. Below we assume x ≤ y. Since h is a homomorphism, we have h(x) ∼h(z) h(y), (24) h′ (x) ≤ h′ (y). (25) where h(x) ≤ h(y). By Lemma 6.14, we have According to Lemma 6.13, the relation (23) fails only if the word h(x) does not contain letters from C, but y ∈ Scd , z ∈ Sce for distinct d, e ∈ {∅, b1 , b2 , . . . , bk }. By the definition of C, we have x  c. Suppose y ∈ Scbi . It follows there exist y ′ ≥ bi such that cy = y ′ y. Multiplying the last equality by z, we obtain cyz = y ′ yz. Applying x ∼y z and x  c ≤ y ′ , we have cyz = y ′ yz ⇒ cxz = y ′ xz ⇒ cz = y ′ z. The last equality states that z ∈ Scbi and (23) holds. Suppose now z ∈ Scbi . There exists z ′ ≥ bi such that cz = z ′ z. Since x  c ≤ z ′ , we have cz = z ′ z ⇒ cxz = z ′ xz ⇒ cyz = z ′ yz. Since S is right hereditary, the elements cy, z ′ y are ≤-comparable. 1. If z ′ y ≤ cy, then (below we use c  z ′ ) z ′ y ≤ cy ⇒ z ′ yc = cy ⇒ z ′ y = cy. The last equality gives y ∈ Scbi , and (23) holds. 2. If z ′ y ≥ cy, then (we use z ′ y ≥ bi ) either cy = c or cy ≥ bi . The first alternative gives y  c. It follows that h(y) does not contain new letters t∅c , tbc1 , tbc2 , . . . , tbck , and (23) holds. Let us put cy ≥ bi then cy ≥ bi ⇔ (bi c)y = cy ⇔ bi y = cy ⇒ y ∈ Scbi and (23) holds. 20 Lemma 6.16. Let bi , bj ∈ S (i = 6 j) be elements from Modification procedure. ′ ′ Then the elements h (bi ), h (bj ) are not ≤-comparable. Proof. Clearly, we have bi ∈ Scbi , bj ∈ Scbj , and the words h(bi ), h(bj ) are h(bi ) = h(c)awi , h(bj ) = h(c)a′ wj for some wi , wj ∈ F and some letters a, a′ (probably, a = a′ ). The images h′ (bi ), h′ (bj ) are b h′ (bi ) = h(c)atbci t′c h′ (wi ), h′ (bj ) = h(c)a′ tcj t′c h′ (wj ), b and h′ (bi ), h′ (bj ) have ≤-incomparable prefixes h(c)atbci , h(c)atcj . Thus, the words h′ (bi ), h′ (bj ) are ≤-incomparable. By the definition of h′ it immediately follows the next statement. Lemma 6.17. If h(x), h(y) are not ≤-comparable, so are h′ (x), h′ (y). By Lemmas 6.16, 6.17, it follows ker(h) ⊃ ker(h′ ). (26) Let us come back to the definition of Embedding Algorithm. Let h′i be the homomorphism defined by the Modification algorithm at i-th iteration of Embedding algorithm. By (26), we have ker(h) ⊃ ker(h′1 ) ⊃ ker(h′2 ) ⊃ . . . (27) Since the left regular band S is finite, the chain (27) terminates after finite steps. It means that Embedding algorithm terminates after finite number of iterations. Lemma 6.18. Let m be the last iteration of Embedding algorithm, then ker(h′m ) = ∅, i.e. h′m is an embedding of S into F ′ . Proof. Let us take distinct s1 , s2 with s1 < s2 . Lemma 6.7 gives h(s1 ) < h(s2 ), and Lemma 6.14 provides h′m (s1 ) < h′m (s2 ) . Let us take two ≤-incomparable elements s1 , s2 . Therefore, there exist the maximal element c with c < si , and distinct b1 , b2 such that bi ≤ si , α(bi ) = c. By the termination condition of Embedding algorithm, we have that the words ′ hm (b1 ), h′m (b2 ) are not ≤-comparable. Thus, the words h′m (s1 ), h′m (s2 ) have incomparable prefixes h′m (b1 ), h′m (b2 ), therefore h′m (s1 ) 6= h′m (s2 ). 7 Open problems and further research 7.1 Algebraic geometry: equations with no constants. How to simplify our proof Theorem 6.1 has a natural application in the study of equations over F. Let us remind main definitions of universal algebraic geometry (for more details see [9, 10, 11]). Let X = {x1 , x2 , . . . , xn } be a finite set of variables, and F(X) be the free left regular band generated by the set X. The elements of F(X) are called terms. 21 An equality of two terms t(X) = s(X) is called an equation. For example, the next expressions are equations x1 x2 = x2 x1 , x1 x2 x3 = x3 x4 . A set Y ⊆ F n is called algebraic if there exists a system of equations in variables X with the solution set Y . An algebraic set is irreducible if it is not a proper finite union of algebraic sets. For any algebraic set Y one can define a left regular band Γ(Y ) which is called the coordinate band of Y (see [9] for more details). Coordinate bands are analogues of coordinate rings in commutative algebra, so the description of all algebraic sets over F may be approximated by the description of their coordinate bands. Notice that any coordinate band Γ(Y ) is always finitely generated, so all Γ(Y ) over F are finite (the variety of left regular bands is locally finite). In [3] submonoids of face monoids were studied. However, applying results of [9] to [3], one can easily obtain the description of all coordinate bands over F. Theorem 7.1. band S: The following conditions are equivalent for a finite left regular 1. S is a coordinate band of an algebraic set over F; 2. S ∈ Qvar(F); 3. S satisfies the formulas Qn (see [4]); 4. S is embedded into a direct power of the semigroup H = {+, −, 0} defined by: + − 0 + + + + − − − − 0 + − 0 Actually Theorem 7.1 was proved in [3] with the second condition S ∈ Qvar(H), but one can prove Qvar(F) = Qvar(H) and obtain the theorem above. A coordinate band which corresponds to an irreducible algebraic set is called irreducible. The study of irreducible coordinate bands is important, since any algebraic set over F is a finite union of algebraic ones (it follows from the Noetherian property of F, see [9] for details). Theorem 7.1 describes all coordinate bands over F, but the class of irreducible coordinate bands is described by the following theorem. Theorem 7.2. band S: The following conditions are equivalent for a finite left regular 1. S is a coordinate band of an irreducible algebraic set over F; 2. S is discriminated by F; 3. S ∈ Ucl(F); 4. S is right hereditary and has a local linear order; 5. S is embedded into F. Proof. The implications (1) ⇔ (2) ⇔ (3) follows from the general results of [9]. The implication (4) ⇔ (5) is the statement of Theorem 6.1. Let us prove (2) ⇒ (5). By the definition, a band S is discriminated by F if for any finite set {s1 , s2 , . . . , sn } ⊆ S there exists a homomorphism h : S → F such that h(si ) 6= h(sj ) for all i 6= j. Since any finitely generated left regular band is finite, we have S = {s1 , s2 , . . . , sn }. By the condition, there exists a homomorphism h : S → F which is injective on S, i.e. h is an embedding. 22 The implication (5) ⇒ (2) clearly follows from the definition of the discrimination. Thus, the theorem is proved. Let us explain the class Ucl(F). Let ϕ be a first-order sentence (formula) of the multiplicative language L = {·}. A formula ϕ is universal if it is equivalent to ∀x1 ∀x2 . . . ∀xn ϕ′ (x1 , x2 , . . . , xn ), where ϕ′ is quantifier-free. The universal closure of F consists of all left regular bands S such that S |= ϕ for any universal formula ϕ with F |= ϕ. According to Theorem 7.2, the embedability of a finite band into F can be defined by a set of universal formulas. Therefore, the right hereditary and local linear order properties can be written as universal formulas. A universal formula defining the right hereditary property is simple: ∀x1 , x2 , x3 (x1 ≤ x3 )&(x2 ≤ x3 ) → (x1 ≤ x2 ∨ x2 ≤ x1 ). Problem 7.3. Find a set Σ of universal formulas in the language L = {·} such that the following holds: a finite right hereditary band has a local linear order iff it satisfies Σ. We guess the positive solution of Problem 7.3 allows to simplify the proof of Theorem 6.1. In particular, we will be able to prove it with no the properties of the embedding ν. 7.2 Algebraic geometry: equations with constants. Advantages of the complicated proof The current proof of Theorem 6.1 is complicated but it has an advantage. In Lemma 6.9 we found a homomorphism h : S → F with σ(h(s)) = σ(s), where σ(s), σ(h(s)) ∈ F. Let us show that this homomorphism property is useful in the study of equations with constants. Let X = {x1 , x2 , . . . , xn } be a finite set of variables, and F[X] be the free left regular band generated by F and X. Elements of F[X] are called F-terms. An equality of two F-terms t(X) = s(X) is called an F-equation. For example, the next expressions are F-equations x1 a1 x2 a2 a3 = a3 x2 a4 a1 x1 a2 , x1 x2 a1 x3 a2 a3 = x3 a4 x4 , x1 x2 = a1 a2 a3 . One can naturally define algebraic sets and coordinate bands for systems of equations with constants. Following [9], any coordinate band of such algebraic set contains a subband isomorphic to F (subband of constants), and any homomorphism between coordinate bands Γ1 , Γ2 should map F ⊆ Γ1 onto F ⊆ Γ2 (constants are mapped into constants). Thus, we need homomorphisms which act trivially on F. Fortunately, the homomorphism h has the required property, and we hope h will play a crucial role in the solution of the next problem. Problem 7.4. Describe coordinate bands of irreducible algebraic sets over F defined by equations with constants. 7.3 “Almost free” left regular bands Following Theorem 7.2, the universal closure Ucl(F) consists of right hereditary bands with a local linear order. According to model theory, Ucl(F) is the “logical 23 neighbourhood” of F, i.e. a structure of each S ∈ Ucl(F) is highly close to F. So we formulate Problem 7.5. Prove theorems about the structure of bands from Ucl(F) (right hereditary bands with a local linear order) and solve uniformly algorithmic problems (e.g. the word problem) for each band from Ucl(F). We hope this problem should be solved, since we have a similar result in group theory. In [12] it was proved the analogue of Theorem 7.2 for a free non-abelian group F . Theorem 7.6. group G: The following conditions are equivalent for a finitely generated 1. G is a coordinate group of an irreducible algebraic set over F ; 2. G is fully residually free; 3. G ∈ Ucl(F ); 4. G is embedded into Lyndon group F Z[t] . There are results about the structure and algorithms for fully residually groups (see [13, 14]), and it follows that all groups from Ucl(F ) inherits many properties of the free group F . Thus, we hope all semigroups from Ucl(F) have many nice properties. 7.4 Approximation with left regular bands Many objects (e.g. hyperplane arrangements, matroids) are approximated by left regular bands (see [1]). In other words, any hyperplane arrangement H (matroid M ) admits a multiplication such that H (respectively, M ) becomes a left regular band. Below we shall talk only about matroids, but one can easily reformulate the following problem for hyperplane arrangements and other objects. Let S(M ) be the left regular band corresponding to a matroid M . Following [1], S(M ) of a free matroid of rank n is the free left regular band of the same rank. Free matroids have a simple structure (the free matroid Mn of rank n is isomorphic to all subsets of n linearly independent vectors). Thus, it is interesting to describe matroids which are “almost free”. Problem 7.7. What can we say about a matroid M with S(M ) ∈ Ucl(F) (i.e. S(M ) is right hereditary with a local linear order)? References [1] K. S. Brown, Semigroups, rings, and Markov chains, J. Theoret. Probab., 13(3), 2000, 871-938. [2] S. Margolis, F. Saliola, B. Steinberg, Poset topology and homological invariants of algebras arising in algebraic combinatorics, arXiv:1311.6680. [3] S. Margolis, F. Saliola, B. Steinberg, Semigroups embeddable in hyperplane monoids, Semigroup Forum, August 2014, Volume 89, Issue 1, pp 236-248. [4] S. Margolis, F. Saliola, B. Steinberg, Combinatorial topology and the global dimension of algebras arising in combinatorics, J. Eur. Math. Soc., to appear. 24 [5] F. Saliola, The quiver of the semigroup algebra of a left regular band, Internat. J. Algebra Comput., 17(8), 2007, 1593–1610. [6] F. Saliola, The face semigroup algebra of a hyperplane arrangement, Canad. J. Math., 61(4), 2009, 904–929. [7] F. Saliola, The quiver of the semigroup algebra of a left regular band, Int. J. Algebra Comput., 17(8), 2007, 1593–1610. [8] F. Saliola, The face semigroup algebra of a hyperplane arrangement, Can. J. Math. 61(4), 2009, 904–929. [9] E. Daniyarova, A. Miasnikov, V. Remeslennikov, Unification theorems in algebraic geometry, Algebra and Discrete Mathematics, 1, 2008, 80–111. [10] E. Yu. Daniyarova, A. G. Myasnikov, V. N. Remeslennikov, Algebraic geometry over algebraic structures. II. Foundations, Fundam. Prikl. Mat., 17:1, 2012, 65– 106 [11] E. Daniyarova, A. Miasnikov, V. Remeslennikov, Algebraic geometry over algebraic structures III: equationally Noetherian property and compactness, Southeast Asian Bulletin of Mathematics, 2011, 35:1, 35-68 [12] O. Kharlampovich, A. Myasnikov, Irreducible affine varieties over free group II: Systems in trangular quasi-quadratic form and description of residually free groups, J. Algebra, 200(2), 1998, 517-570. [13] O. Kharlampovich, A. Myasnikov, V. Remeslennikov, D. Serbin, Subgroups of fully residually free groups: algorithmic problems, Contemp. Math. series of the AMS, Group theory, Statistics and Cryptography, 360, 2004, 63–101. [14] I. Bumagin,O. Kharlampovich, A. Miasnikov, Isomorphism problem for fully residually free groups , J. Pure and Applied Algebra, 208 (3), 2007, 961–977. The information of the author: Artem N. Shevlyakov Sobolev Institute of Mathematics 644099 Russia, Omsk, Pevtsova st. 13 Phone: +7-3812-23-25-51. e-mail: a [email protected] 25
4math.GR
arXiv:1611.06393v1 [math.GR] 19 Nov 2016 THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS EDUARD SCHESLER Abstract. In this paper we prove that the relative exponential growth rate of any subgroup H of a finitely generated group G exists with respect to every finite generating set of G if H contains a generalized loxodromic element. We will prove that the relative exponential growth rate of any subexponentially distorted embedding of an acylindrically hyperbolic group H in a finitely generated group G exists with respect to every finite generating set of G. We introduce a new invariant of finitely generated groups, the ambiguity function, and we show that every finitely generated acylindrically hyperbolic group G possesses a linearly bounded ambiguity function. We also extend these results to the case of direct products of finitely generated acylindrically hyperbolic groups. Contents 1. Introduction 2. Weak Supermultiplicativity 3. Hyperbolic spaces 4. Acylindrically hyperbolic groups 5. Existence of the growth rate 6. The case of products References 1 3 7 8 9 14 18 1. Introduction Given a finitely generated group G and a finite symmetric generating set X X of G, the growth function βG : N Ñ N of G with respect to X is defined by X X X βG pnq “ |BG pnq|, where BG pnq denotes the set of all elements of G which are represented by words of length ď n in the generators of X. By definition, G has X exponential growth if there is a constant a ą 1 such that βG pnq ą an for every n P N. Using the submultiplicativity X X X βG pm ` nq ď βG pmqβG pnq, 1 X Milnor proved in [M` 68] that the limit lim βG pnq n exists for every finitely genernÑ8 ated group G and every finite generating set X of G. Thus, if this limit a is larger than 1, then for every ε ą 0, there is a number N P N such that for every n ě N we have (1.1) X pa ´ εqn ď βG pnq ď pa ` εqn . Date: NOVEMBER 19, 2016. 1 2 EDUARD SCHESLER This justifies the notion of exponential growth. In this paper we study the following relative analogue of the growth function. Definition 1.1. Let G be a finitely generated group with a finite generating set X and let H ď G be an arbitrary subgroup of G. Then X BH pnq “ th P H : |h|X ď nu (1.2) X X denotes the dX -ball of radius n P N inside of H. We write βH pnq “ |BH pnq| for X the cardinality of this ball. The function βH : N Ñ N is called the relative growth function of H in G with respect to X. 1 X Again we can ask for the existence of the limit of the sequence pβH pnq n qnPN . 1 X n If the limit lim βH pnq exists we will say that the relative exponential growth rate nÑ8 of H in G exists with respect to X. Grigorchuk [Gri80] proved that the relative exponential growth rate of every normal subgroup of a finitely generated free group F exists with respect to a free generating set of F . This result was extended by Olshanski [Ols13, Theorem 1.5] by showing that the relative exponential growth rate of any subgroup of a finitely generated free group F exists with respect to a free generating set of F . Further Olshanski [Ols13, Remark 3.1] pointed out that the relative exponential growth rate does not exist in general. He showed that there is a finitely generated solvable group G and an infinite cyclic subgroup H ď G such that (1.3) lim inf nÑ8 X βH pnq “ 0 @ε ą 0 and 1`ε n 1 X lim sup βH pnq n ą 1. nÑ8 The main result of this paper is the following theorem. Theorem 5.9. Let G be a finitely generated group and H ď G a subgroup of G. If H contains a generalized loxodromic element h P H, then the relative exponential growth rate of H in G exists with respect to every finite generating set of G. In Section 2 we introduce a new invariant of a finitely generated group, the ambiguity function, that seems to be useful in studying of the relative exponential growth rate. We prove the following theorem. Theorem 5.10. Let G be a finitely generated acylindrically hyperbolic group. Then G possesses a linearly bounded ambiguity function with respect to every finite generating set of G. We deduce from this theorem the following result. Theorem 5.11. Let H be a finitely generated acylindrically hyperbolic group. Let ι : H Ñ G be a subexponentially distorted embedding in a finitely generated group G. Then the relative exponential growth rate of H in G exists with respect to every finite generating set of G. In Section 6 we give an extension of Theorem 5.10 to direct products of acylindrically hyperbolic groups. THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 3 Theorem 6.6. Let G “ m ś Gi be a finite direct product of finitely generated i“1 acylindrically hyperbolic groups Gi and let H be a subgroup of G. Suppose that, for each i “ 1, . . . , m, the image of the canonical projection of H to Gi contains a generalized loxodromic in Gi . Then the relative exponential growth rate of H in G exists with respect to every finite generating set X of G. 2. Weak Supermultiplicativity In this section we give analytical tools which will be used later in the proof of existence of the relative exponential growth rate. The distortion function of a subgroup, recalled in Definition 2.2, is a well known invariant of a finitely generated subgroup. In Definition 2.3, we introduce the ambiguity function of a finitely generated group with respect to a finite generating set. In Corollaries 2.12 and 2.13 we give a sufficient condition for the existence of the relative exponential growth rate in terms of the distortion and the ambiguity functions of a subgroup. Definition 2.1. A function f : N Ñ N is called sublinear, if lim nÑ8 subexponential, if lim f pnq n nÑ8 a f pnq n “ 0 and “ 0 for every a ą 1. Definition 2.2. Let G be a finitely generated group with a finite generating set X. Let H be a finitely generated subgroup of G with a finite generating set Y . The distortion function of H in G with respect to X and Y is defined by (2.1) ∆G H : N Ñ N, n ÞÑ maxt|h|Y : h P H, |h|X ď nu. The subgroup H is called linearly, polynomially, or subexponentially distorted in G, if ∆G H pnq is bounded, respectively, by a linear, polynomial, or subexponential function. A linearly distorted subgroup H of G is also said to be an undistorted subgroup of G. It is easy to see that the property of a subgroup H ď G to be linearly, polynomially, or subexponentially distorted in G does not depend on a choice of finite generating sets of H and G. The following maps (indexed by m, n P N) are important in studying of exponential growth rates: X X X pnq Ñ BG pm ` nq, Φm,n : BG pmq ˆ BG pu, vq ÞÑ uv. The main difficulty is that, given natural numbers m, n P N and an element w P X BG pm ` nq, there may be many different representations of the form w “ uv X X with u P BG pmq and v P BG pnq. It would be useful to give a subexponential upper bound on the cardinality of the preimage Φ´1 m,n pwq in terms of n only, i.e., independent of m and w. However, such a bound does not exist even in the case of free groups Fk with basis X. Indeed, consider the preimage of the identity ´1 1 P BFXk pm ` nq. Then Φ´1 q P BFXk pmq ˆ BFXk pnq : |u|X ď m, nu m,n p1q “ tpu, u ´1 X and thus |Φ2n,n p1q| “ |BFk pnq| “ 2kp2k ´ 1qn´1 has exponential growth with respect to n. This also shows that we cannot guarantee that |uv|X is approximately |u|X ` |v|X . In [Ols13, Theorem 1.5] Olshanski considers the free group case and suggests to modify the map Φm,n by insertion a word from a ball BFXk pcq between u and v. In the following definition we promote this idea in the general case. 4 EDUARD SCHESLER Definition 2.3. Let G be a finitely generated group with a finite generating set X. A function f : N Ñ N is an ambiguity function of G with respect to X, if there is a finite subset M Ă G and a map of the form Φ : G ˆ G Ñ G, pu, vq ÞÑ ugu,v v with gu,v P M , which, with notation below, satisfies the following property (˚): Denote c :“ max |g|X , and, for every m, n P N, consider the restriction: gPM X X X Φm,n : BG pmq ˆ BG pnq Ñ BG pm ` n ` cq, pu, vq ÞÑ Φppu, vqq. X Property p˚q: For every m, n P N and every z P BG pm ` n ` cq, we have |Φ´1 m,n pzq| ď f pnq. The set M is called the set of connecting pieces and the map Φ is called the concatenation map corresponding to f . Remark 2.4. It is easily seen that, up to equivalence, an ambiguity function of a group G does not depend on the choice of the finite generating set of G. Indeed, let f be an ambiguity function of G with respect to a finite generating set X of G. Let Φ be the concatenation map and M the set of connecting pieces corresponding to f . Let c :“ max |g|X . For an arbitrary finite generating set Y of G we define gPM p “ max |y|X . Then the inclusion yPY Y Y X X BG pmq ˆ BG pnq Ă BG ppmq ˆ BG ppnq is well defined and by definition the preimage of X X X Φpm,pn : BG ppmq ˆ BG ppnq Ñ BG ppm ` pn ` cq Y is bounded by f ppnq. Thus the preimage of the restriction of Φpm,pn to BG pmq ˆ Y BG pnq is also bounded by f ppnq. Therefore the function g : N Ñ N, n ÞÑ f ppnq is an ambiguity function of G with respect to Y . We use the following simple remarks. Remark 2.5. Let X and Y be two sets and f : X Ñ Y a function such that the cardinality of every preimage f ´1 pyq with y P Y is uniformly bounded by a number n P N. Then we have |X| ď n ¨ |Y |. Remark 2.6. Let f : N Ñ N be a subexponential function and let g : N Ñ N be a polynomially bounded function. Then the composition g ˝ f is subexponential. Remark 2.7. Let f : N Ñ N be a linearly bounded function and let g : N Ñ N be a subexponential function. Then the composition g ˝ f is subexponential. Proposition 2.8. Let G be a finitely generated group with a finite generating set X and let H ď G be a finitely generated, subexponentially distorted subgroup with a finite generating set Y . If H possesses a polynomially bounded ambiguity function with respect to Y , then there is a subexponential function ε : N Ñ N and a constant c P N such that (2.2) X X X βH pmqβH pnq ď εpnq ¨ βH pm ` n ` cq for all m, n P N. THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 5 Proof. Let f be a subexponential distortion function of H in G with respect to X and Y . Then the trivial inclusion (2.3) X X Y Y ι : BH pmq ˆ BH pnq Ñ BH pf pmqq ˆ BH pf pnqq. is well defined. Let P be a polynomially bounded ambiguity function of H with respect to Y , let M Ă H be the finite set of connecting pieces and let Φ : HˆH Ñ H be the concatenation map corresponding to P . We set p c “ max |h|Y . By restricting hPM Y Y Φ to subsets of the form BH pmq ˆ BH pnq, we obtain the maps (2.4) Y Y Y Φm,n : BH pmq ˆ BH pnq Ñ BH pm ` n ` p cq pu, vq ÞÑ Φppu, vqq “ ugu,v v Y such that gu,v P M and |Φ´1 cq and every m,n pzq| ď P pnq for every z P BH pm ` n ` p pm, nq P N ˆ N. In particular we get (2.5) |Φ´1 f pmq,f pnq pzq| ď P pf pnqq Y for all m, n P N and every z P BH pf pmq ` f pnq ` p cq. By combining (2.3) and (2.5) we note that the cardinality of every preimage Ψ´1 m,n pzq of (2.6) Y X X pmq ˆ BH pnq Ñ BH pf pmq ` f pnq ` p cq Ψm,n :“ Φf pmq,f pnq ˝ ι : BH is bounded by P pf pnqq. Now let c “ max |h|X be the diameter of M in ΓpG, Xq. hPM The definition of Φ immediately implies that (2.7) X impΨm,n q Ă BH pm ` n ` cq. Thus the cardinality of the preimage of an arbitrary element with respect to the map (2.8) X X X Ψm,n : BH pmq ˆ BH pnq Ñ BH pm ` n ` cq is bounded by the function εpnq :“ P ˝ f pnq. Due to Remark 2.6 this function is subexponential and the desired inequalities follow with the help of Remark 2.5.  If the distortion function f is polynomial the ambiguity function g is subexponential, then the composition? ε “ g ˝ f does not have to be subexponential. Just consider the case of gpnq “ 2 n and f pnq “ n2 . In the case that the subgroup H is undistorted, we get the following analogue of Proposition 2.8. Proposition 2.9. Let G be a finitely generated group and let H ď G be a finitely generated, undistorted subgroup of G. If H possesses a subexponential ambiguity function, then there exists a subexponential function ε : N Ñ N and a constant c ě 0 such that (2.9) X X X pmqβH pnq ď εpnq ¨ βH pm ` n ` cq for all m, n P N. βH The proof is essentially the same as the proof of Proposition 2.8. One only has to replace Remark 2.6 by Remark 2.7 in the argumentation. The following lemma provides us with an alternative definition of a subexponential function which will be easier to apply for our purposes. Lemma 2.10. A function f : N Ñ N is subexponential if and only if (2.10) 1 lim f pnq n “ 1. nÑ8 6 EDUARD SCHESLER Proof. First we assume that f is subexponential. Then for every a ą 1 and every 1 ď ε for all but finitely many n P N. Due to lim ε n “ 1 we ε ą 0 we have fapnq n nÑ8 1 1 therefore obtain f pnq n ď pan εq n for all but finitely many n P N. Since we can chose 1 a ą 1 and ε ą 0 arbitrary close to 1 and 0, respectively, we get lim f pnq n “ 1. nÑ8 1 Now we assume lim f pnq n “ 1. Thus, for every ε ą 0 we have f pnq ď p1 ` εqn nÑ8 for all but finitely many n P N. Let δ ą 0 and a “ 1 ` δ ą 1. By setting ε “ obtain ´ 1 ` δ ¯n f pnq p1 ` εqn 2 (2.11) lim sup n ď lim sup “ lim sup “ 0. a an 1`δ nÑ8 nÑ8 nÑ8 f pnq n nÑ8 a Since f pnq ą 0 we get lim “ 0. δ 2 we  The crucial analytical ingredient for the proof of the existence of some relative exponential growth rates is provided by the following proposition. This is essentially the analytical part of the proof of Lemma 1.6 in [Ols13]. For convenience we shall include a proof here. Proposition 2.11. Let B, C ą 0 be two real numbers, ε : N Ñ N a subexponential function and l : N Ñ N a sublinear function. If f : N Ñ N is a monotonically increasing function with the properties 1) f pmqf pnq ď εpnqf pm ` n ` lpnqq for all n ě C and all m P N and 2) 1 ď f pnq ď B n for all n P N, 1 then the limit lim f pnq n exists. nÑ8 1 Proof. First we see that lim sup f pnq n exists due to the second property of f . nÑ8 1 Without loss of generality we may assume that a :“ lim sup f pnq n ą 1. Indeed, nÑ8 since f pnq ě 1 for every n P N we would obtain 1 1 1 ď lim inf f pnq n ď lim sup f pnq n ď 1 (2.12) nÑ8 nÑ8 1 otherwise. Let δ P p0, a ´ 1q and let an :“ f pnq n . With Lemma 2.10 we get ´1 1 lim εpsq s “ 1. Thus we obtain lim εpsq s “ 1. Since l is sublinear, we further sÑ8 sÑ8 get s ` lpsq s lpsq “ lim ` “ lim 1 ` 0 “ 1. sÑ8 sÑ8 s sÑ8 s s So there is a natural number s ě C such that s`lpsq ´ ´1 δ δ 2δ ¯ s ăa´ . (2.14) |as εpsq s ´ a| ď and a ´ 3 3 3 In the following, a natural number n will be written an n “ qps ` lpsqq ` r with r ă s ` lpsq and q P N. Since f is monotonically increasing and ´ 2δ ¯n´s´lpsq (2.15) a´ ą pa ´ δqn 3 holds for all but finitely many n P N we have (2.13) lim THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 7 f pnq ě f pqps ` lpsqqq ě εpsq´1 f psqf ppq ´ 1qps ` lpsqqq ě εpsq´q`1 f psqq´1 f ps ` lpsqq ě ... ě εpsq´q f psqq . ´1 1 The definition an “ f pnq n gives us εpsq´q f psqq “ pεpsq s as qsq . In view of the inequalities above this gives us ´ ´ ¯sq ´ ´1 δ ¯sq 2δ ¯ps`lpsqqq f pnq ě as εpsq s ě a´ ě a´ 3 3 ´ ´ 2δ ¯n´r 2δ ¯n´s´lpsq “ a´ ą a´ ą pa ´ δqn . 3 3 Altogether we obtain an ą a ´ δ for almost every n P N. Since δ was chosen arbitrarily small, the claim follows.  Due to Proposition 2.11 and the two Propositions 2.8 and 2.9 we get immediately the two following corollaries, which we use later to show the existence of some relative exponential growth rates. Corollary 2.12. Let G be a finitely generated group and H ď G a finitely generated, subexponentially distorted subgroup of G. If H possesses a polynomially bounded ambiguity function, then the relative exponential growth rate of H in G exists with respect to every finite generating set of G. It would be interesting to know, whether there is an undistorted subgroup H of a finitely generated group G such that the relative exponential growth rate of H in G does not exist with respect to some finite generating set of G. The following corollary gives an obstruction to this case. Corollary 2.13. Let G be a finitely generated group and H ď G a finitely generated undistorted subgroup of G. If H possesses a subexponential ambiguity function, then the relative exponential growth rate of H in G exists with respect to every finite generating set of G. 3. Hyperbolic spaces In this section we summarize some properties of hyperbolic metric spaces. We follow the book of Bridson and Haefliger [BH99, III.H]. First we recall the definition of Gromov product. Definition 3.1. Let pΩ, dq be a metric space and let o, x, y P Ω be arbitrary points of Ω. The Gromov product of x and y at o is defined by (3.1) px.yqo “ 1 pdpx, oq ` dpy, oq ´ dpx, yqq. 2 Definition 3.2 (Gromov). A metric space pΩ, dq is called δ-hyperbolic for some constant δ ě 0 if all points o, x, y, z P Ω satisfy (3.2) px.yqo ě minppx.zqo , pz.yqo q ´ δ. Further pΩ, dq is said to be hyperbolic if pΩ, dq is δ-hyperbolic for some δ. In the following, the condition (3.2) will be referred to as the Gromov condition. 8 EDUARD SCHESLER Definition 3.3. Let pΩ, dq be a metric space and I Ă R an (not necessary bounded) interval. Let λ ě 1 and ε ě 0 be some constants. A map c : I Ñ Ω is called pλ, εqquasigeodesic, if 1 1 (3.3) |t ´ t| ´ ε ď dpcpt1 q, cptqq ď λ|t1 ´ t| ` ε λ for every t1 , t P I. We can replace I by I X Z to get a discrete version of a pλ, εqquasigeodesic which will be used later. Definition 3.4. Let pΩ, dq be a metric space. For any subset X Ă Ω and any number ε ą 0 we denote by Vε pXq the ε-neighbourhood of X in Ω. Given two subsets A, B Ă Ω, the Hausdorff-distance between them is defined by (3.4) HdpA, Bq :“ inftε P Rě0 | A Ă Vε pBq, B Ă Vε pAqu. Although geodesics in hyperbolic spaces are not uniquely determined by their endpoints in general, we will denote a geodesic segment connecting to points x, y of a hyperbolic space pΩ, dq by rx, ys. The following proposition gives us a legitimization for that. Proposition 3.5. [BH99, III.H.1.7] For all δ ą 0, λ ě 1 and ε ě 0 there is a constant K “ Kpδ, λ, εq with the following property: Let pΩ, dq be a δ-hyperbolic space and let c be a finite pλ, εq-quasigeodesic in Ω. Let rp, qs be a geodesic segment connecting the endpoints of c. Then the Hausdorff-distance between rp, qs and the image of c is bounded by K. Using this result, it is not hard do derive the following lemmas. Lemma 3.6. Let pΩ, dq be a δ-hyperbolic space and let γ : ra, bs Ñ Ω be a pλ, εqquasigeodesic. Then for every m P ra, bs the Gromov product pγpaq.γpbqqγpmq is bounded by Kpδ, λ, εq. Lemma 3.7. Let pΩ, dq be a δ-hyperbolic space and let x, y, z, w P Ω such that (3.5) px.zqy ď C1 , py.wqz ď C2 and N :“ dpy, zq ą C1 ` C2 ` δ. Then every geodesic rx, ws runs through the p2C1 ` 5δ ` 1q-neighbourhood of y. 4. Acylindrically hyperbolic groups In this chapter we recall some known results on acylindrically hyperbolic groups which will be used in the next section. Definition 4.1. Let G be a group which acts by isometries on a metric space pΩ, dq. The action is called acylindrical, if for every ε ą 0 there are constants R, N ą 0 such that for every two points x, y P Ω with dpx, yq ě R, there are at most N elements g P G such that dpx, gxq ď ε and dpy, gyq ď ε. Remark 4.2. Let G be a group which acts acylindrically on a metric space pΩ, dq. Then the induced action of every subgroup K ď G on Ω is acylindrical. Definition 4.3. Let G be a group which acts on a hyperbolic space pΩ, dq. An element g P G is called ‚ elliptic, if the set tg n x | n P Zu is bounded for some (equivalently, any) x P Ω. THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 9 ‚ loxodromic, if the map Z Ñ Ω, n ÞÑ g n x is a quasigeodesic for some (equivalently, any) x P Ω. Recall that two loxodromic elements are independent if their fixed point sets in the Gromov boundary BΩ of Ω are disjoint. Osin [Osi16, Theorem 1.1] classifies acylindric actions on hyperbolic spaces as follows: Theorem 4.4. Let G be a group which acts acylindrically on a hyperbolic space pΩ, dq. Then exactly one of the following statements is true: 1) G has bounded orbits. 2) G is virtually cyclic and contains a loxodromic element. 3) G contains infinitely many independent loxodromic elements. Definition 4.5. A group G is called acylindrically hyperbolic if G acts acylindrically on a hyperbolic space pΩ, dq such that G contains infinitely many independent loxodromic elements. The following theorem is a part of a result obtained by Osin [Osi16, Theorem 1.4]. Theorem 4.6. Let G be a group and let g P G be an arbitrary element. The following conditions are equivalent. 1) There exists a (possibly infinite) generating set X of G such that the corresponding Cayley graph ΓpG, Xq is hyperbolic, the natural action of G on ΓpG, Xq is acylindrical and g is loxodromic. 2) There exists an acylindrical action of G on a hyperbolic space pΩ, dq such that g is loxodromic. In general in may happen that there are two non elementary acylindrical actions of a group G on two hyperbolic spaces such that an element g P G is loxodromic for exactly one of these actions. For our purposes we need an element which is loxodromic for some action. Such elements are called generalized loxodromic, see [Osi16, Definition 6.4]. Definition 4.7. Let G be an arbitrary group. An element g P G is called generalized loxodromic, if there is an acylindrical action of G on a hyperbolic space pΩ, dq, such that g P G is a loxodromic element for this action. 5. Existence of the growth rate We start with the following simple observations which follow right from the definitions. Lemma 5.1. Let G be a group which acts by isometries on a metric space pΩ, dq. Then for every g P G and every x, y, z P Ω we get (5.1) px.yqz “ pgx.gyqgz . Lemma 5.2. Let G be a group with a generating set Y such that ΓpG, Y q is hyperbolic and the canonical action of G on ΓpG, Y q is acylindrical. Let g, h P G be two independent loxodromic elements. Then there is a constant C ě 0, such that for every n P Z and every two elements x, y P tg n , g ´n , hn , h´n u with x ‰ y ˘1 the inequality px.yq1 ď C holds. 10 EDUARD SCHESLER Lemma 5.3. Let G be a group with a generating set Y such that ΓpG, Y q is hyperbolic and the canonical action of G on ΓpG, Y q is acylindrical. Let g, h P G be two independent loxodromic elements. Then there is a constant A ě 0 such that for every n P N and every pair of elements pu, vq P G ˆ G there is at least one xu,v P tg n , g ´n , hn , h´n u such that (5.2) pu´1 .xu,v q1 ď A and pv.x´1 u,v q1 ď A. Proof. First we observe that there is a constant C0 such that (5.3) mintpg n .uq1 , pg ´n .uq1 u ď C0 and mintphn .uq1 , ph´n .uq1 u ď C0 for every n P N and every u P G. Indeed, since the maps n ÞÑ hn and n ÞÑ g n are quasiisometric embeddings of Z into G, Lemma 3.6 implies that there is a constant C1 such that pg ´n .g n q1 , ph´n .hn q1 ď C1 for every n P Z. The Gromov condition implies (5.4) C1 ě ph´n .hn q1 ě mintph´n .uq1 , pu.hn q1 u ´ δ. Thus the claim follows by setting C0 :“ C1 ` δ. Next, there is a constant C2 ě 0, such that for every n P N and every u P G at least one of the following statements holds. 1) pg n .uq1 ď C2 and pg ´n .uq1 ď C2 . 2) phn .uq1 ď C2 and ph´n .uq1 ď C2 . Indeed, due to Lemma 5.2 there is a constant C3 ě 0 such that the Gromov product px.yq1 of two elements x, y P tg n , g ´n , hn , h´n u with x ‰ y ˘1 is bounded by C3 . The Gromov condition gives us C3 ě pg n .hn q1 ě mintpg n .uq1 , pu.hn q1 u ´ δ, C3 ě pg ´n .hn q1 ě mintpg ´n .uq1 , pu.hn q1 u ´ δ, C3 ě pg n .h´n q1 ě mintpg n .uq1 , pu.h´n q1 u ´ δ, C3 ě pg ´n .h´n q1 ě mintpg ´n .uq1 , pu.h´n q1 u ´ δ. If pg n .uq1 ą C3 ` δ or pg ´n .uq1 ą C3 ` δ we thus obtain (5.5) C3 ` δ ě phn .uq1 and C3 ` δ ě ph´n .uq1 . In the same way if phn .uq1 ą C3 ` δ or ph´n .uq1 ą C3 ` δ we obtain (5.6) C3 ` δ ě pg n .uq1 and C3 ` δ ě pk ´n .uq1 . The claim now follows by setting C2 :“ C3 ` δ. To prove the lemma, let u´1 , v P G be arbitrary. Then, on the one hand there is an element x P tg n , g ´n , hn , h´n u such that (5.7) px.u´1 q1 ď C2 and px´1 .u´1 q1 ď C2 . And on the other hand we have mintpx.vq1 , px´1 .vq1 u ď C0 . Without loss of generality we may assume that px´1 .vq1 ď C0 . Then the statement of the lemma follows by setting A :“ maxtC0 , C2 u and xu,v :“ x.  We are now ready to define the concatenation map and the set of connecting pieces corresponding to the predicted linear ambiguity function for acylindrically hyperbolic groups. THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 11 Definition 5.4. Let G be a finitely generated group with a finite generating set X and a generating set Y such that ΓpG, Y q is hyperbolic and the canonical action of G on ΓpG, Y q is acylindrical. Let g and h be two independent loxodromic elements and let (5.8) cn :“ maxt|g n |X , |g ´n |X , |hn |X , |h´n |X u for every n P N. Due to Lemma 5.3 there exists a constant A such that for every n P N there is a map Φn : G ˆ G Ñ G, pu, vq ÞÑ uxu,v v (5.9) with xu,v P tg , g , h , h´n u and maxtpu´1 .xu,v q1 , pv.x´1 u,v q1 u ď A for every pair X X of elements pu, vq P G ˆ G. By restriction to subsets of the form BG psq ˆ BG ptq we obtain well defined maps n (5.10) ´n n X X X BG psq ˆ BG ptq Ñ BG ps ` t ` cn q, pu, vq ÞÑ uxu,v v. To keep the notation simple, these restrictions are also denoted by Φn . The construction of Φn depends on some specific loxodromic elements g and h. If it is clear from the context to which elements Φn corresponds to, we will not mention this correspondence explicitly. Proposition 5.5. Let G be a group with a generating set Y such that ΓpG, Y q is hyperbolic and the canonical action of G on ΓpG, Y q is acylindrical. Let g, h P G be two independent loxodromic elements. Then there are two constants N P N and ε ě 0 such that for every natural number n ě N every geodesic r1, Φn pu, vqs Ă ΓpG, Y q runs through the ε-neighbourhoods of u and uxu,v with respect to dY . Proof. We want to apply Lemma 3.7 on the points 1, u, uxu,v and uxu,v v. Let A be the constant from definition 5.4. Then Lemma 5.1 implies p1.uxu,v qu “ pu´1 .xu,v q1 ď A and pu.uxu,v vquxu,v “ ppuxu,v q´1 u.puxu,v q´1 uxu,v vqpuxu,v q´1 uxu,v “ ppxu,v q´1 .vq1 ď A. Since g and h are loxodromic, we can choose N big enough to satisfy (5.11) mint|g n |Y , |g ´n |Y , |hn |Y , |h´n |Y u ą 2A ` δ for every n P Z with |n| ě N . Thus we obtain (5.12) dY pu, uxu,v q “ |xu,v |Y ą 2A ` δ. Setting ε “ 2A ` 5δ ` 1, Lemma 3.7 implies that every geodesic r1, uxu,v vs runs through the ε-neighbourhood of u. Symmetric argumentation shows that every geodesic ruxu,v v, 1s runs through the ε-neighbourhood of uxu,v .  The following lemma implies in particular that finite changes of generating sets X and Y of a group G don’t affect the acylindricity of the action of G on its Cayley graph with respect to X and Y . Lemma 5.6. [Osi16, Lemma 5.1] For any group G and any generating sets X and Y of G such that (5.13) sup |x|Y ă 8 and sup |y|X ă 8, xPX the following hold. yPY 12 EDUARD SCHESLER 1) ΓpG, Xq is hyperbolic if and only if ΓpG, Y q is hyperbolic. 2) G acts acylindrically on ΓpG, Xq if and only if G acts acylindrically on ΓpG, Y q. Proposition 5.7. Let G be a finitely generated group with a finite generating set X and a generating set Y such that ΓpG, Y q is hyperbolic and the canonical action of G on ΓpG, Y q is acylindrical. Let g and h be two independent loxodromic elements. Then there is a number n and a linearly bounded function ln : N Ñ N such that for X every pair of natural numbers ps, tq P N ˆ N and every element w P BG ps ` t ` cn q, the cardinality of the preimage of w with respect to the concatenation map X X X psq ˆ BG ptq Ñ BG ps ` t ` cn q Φn : BG (5.14) is bounded by ln ptq. Proof. Due to Lemma 5.6 we can assume that X is a subset of Y . Further Proposition 5.5 provides us with a number N P N and a constant ε ą 0, such that for every number n ě N and every pair of elements pu, vq P G ˆ G, every geodesic r1, Φn pu, vqs runs through the ε-neighbourhoods of the elements u and uxu,v with respect to dY . Since the action of G on ΓpG, Y q is acylindrical, we can choose positive constants R and L such that for every two points x, y P ΓpG, Y q with dY px, yq ě R there are at most L elements g P G satisfying the inequalities dY px, gxq ď 6ε and dY py, gyq ď 6ε. The definition of a loxodromic element implies immediately that there is a number Θ ě N such that for every number n ě Θ, and every x P Mn “ tg n , g ´n , hn , h´n u we have |x|Y ě R. From now on we fix such a number n ě Θ. Let s, t P N and X w P BG ps ` t ` cn q. We want to bound the cardinality of the set of all pairs X X pu, vq P BG psq ˆ BG ptq which satisfy the equation Φn pu, vq “ w. For this we fix a geodesic r1, ws in ΓpG, Y q. X X Let u P BG psq be an element such that there exists an element v P BG ptq with the property Φn pu, vq “ w. Then there are elements z and ζ on the geodesic r1, Φn pu, vqs “ r1, ws such that dY pu, zq ď ε and dY puxu,v , ζq ď ε. We obtain dY pu, wq “ dY pu, Φn pu, vqq “ dY pu, uxu,v vq “ dY p1, xu,v vq ď dX p1, xu,v q ` dX p1, vq ď t ` cn . Thus we get (5.15) dY pz, wq ď dY pz, uq ` dY pu, wq ď ε ` t ` cn . So there are at most ε`t`cn points z on the fixed geodesic r1, ws with the property dY pu, zq ď ε. Now let z P G be an arbitrary point on the geodesic r1, ws. We want X Y to estimate the cardinality of the set of elements u P BG psq X BG pz, εq that satisfy X the equation Φn pu, vq “ w for some v P BG ptq. To get a contradiction we assume that there are more than 4 ¨ L such elements u. By definition Mn contains 4 elements. Thus Dirichlet’s box principle implies that X X there are L ` 1 pairs pu1 , v1 q, . . . , puL`1 , vL`1 q P BG psq ˆ BG ptq satisfying xui ,vi “ x0 P Mn and Φn pui , vi q “ w for every i P t1, . . . , L ` 1u. Let i, j P t1, . . . , L ` 1u. Due to the triangle inequality we get the inequalities dY pui , uj q ď dY pui , zq ` dY pz, uj q ď 2ε. THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 13 We fix elements ζi , ζj P r1, ws such that dY pζi , ui x0 q, dY pζj , uj x0 q ď ε. Then dY pz, ζi q ď dY pz, ui q ` dY pui , ui x0 q ` dY pui x0 , ζi q ď 2ε ` |x0 |Y and dY pz, ζi q ě dY pui , ui x0 q ´ dY pz, ui q ´ dY pui x0 , ζi q ď |x0 |Y ´ 2ε. Analogously we obtain |x0 |Y ´ 2ε ď dY pz, ζj q ď |x0 |Y ` 2ε Since ζi and ζj lie on the same geodesic r1, ws, we obtain dY pζi , ζj q ď 4ε. Finally this implies dY pui x0 , uj x0 q ď dY pui x0 , ζi q ` dY pζi , ζj q ` dY pζj , uj x0 q ď 6ε. By defining ûj :“ u´1 j u1 , the obtained inequalities can be rewritten as dY pûj , 1q ď 2ε and dY pûj x0 , x0 q ď 6ε for every j P t1, . . . , L ` 1u. This is a contradiction to the acylindricity of the action X since dY p1, x0 q ě R. So there are at most 4L ¨ pε ` t ` cn q elements u P BG psq X which satisfy the equation Φn pu, vq “ w for some appropriate elements v P BG ptq. Due to construction there are just 4 possible choices for xu,v P Mn . But if we fix u X ptq satisfying uxu,v v “ w. Thus the and xu,v , there is at most one element v P BG X cardinality of the preimage of an element of BG ps ` t ` cn q with respect to Φn is bounded by 16L ¨ pε ` t ` cn q.  Together with Remark 2.5, Proposition 5.7 immediately implies the following corollary: Corollary 5.8. Let G be a finitely generated group with a finite generating set X and a generating set Y such that ΓpG, Y q is hyperbolic and the canonical action of G on ΓpG, Y q is acylindric. Let H be a subgroup of G which contains two independent loxodromic elements g and h. Then there is a constant c and a linearly bounded function l : N Ñ N such that the inequality X X X βH psq ¨ βH ptq ď lptq ¨ βH ps ` t ` cq (5.16) holds for all s, t P N. Proof. By considering Proposition 5.7, one only has to notice that Φn restricts to X X X BH psq ˆ BH ptq Ñ BH ps ` t ` cn q since g, h P H.  Theorem 5.9. Let G be a finitely generated group and H ď G a subgroup of G. If H contains a generalized loxodromic element h P H, then the relative exponential growth rate of H in G exists with respect to every finite generating set of G. Proof. First Theorem 4.6 gives us a generating set Y of G such that ΓpG, Y q is hyperbolic and the canonical action of G on ΓpG, Y q is acylindrical and h is a loxodromic element for this action. Then Theorem 4.4 implies that there are two cases to consider for H. Either H is virtually cyclic or H contains infinitely many independent loxodromic elements. In the first case H is quasiisometrically embedded in ΓpG, Y q. In particular H is quasiisometrically embedded in ΓpG, Xq and there is X a constant c ą 0 such that βH pnq ď c ¨ n for every n P N. Thus we see immediately 1 X that the limit lim βH pnq n exists and is equal to 1. For the second case we can nÑ8 14 EDUARD SCHESLER choose a finite generating set X of G. Then we can apply Corollary 5.8 and we get the inequality (5.17) X X X βH pmq ¨ βH pnq ď lpnq ¨ βH pm ` n ` cq for all m, n P N. Now the statement follows from Proposition 2.11.  In the same way we get the following invariant of acylindrically hyperbolic groups. Theorem 5.10. Let G be a finitely generated acylindrically hyperbolic group. Then G possesses a linearly bounded ambiguity function with respect to every finite generating set of G. The following result is an immediate consequence of Theorem 5.10 and Corollary 2.12. Theorem 5.11. Let H be a finitely generated acylindrically hyperbolic group. Let ι : H Ñ G be a subexponentially distorted embedding in a finitely generated group G. Then the relative exponential growth rate of H in G exists with respect to every finite generating set of G. 6. The case of products In this section we shall see that the relative exponential growth rate of a subgroup of a direct product of finitely generated acylindrically hyperbolic groups exists if the projection of the subgroup on each coordinate contains a generalized loxodromic element. First we shall introduce some notation, which we will use throughout this section. Notation. To each element i of an indexset I “ t1, . . . , mu we associate a finitely generated group Gi and a finite generating set Xi for Gi . For a subset J Ă I we define ś ś ś ś Gj Gi Ñ Gi and ψJ : Gj Ñ ιJ : jPJ iPI iPI jPJ canonically. We will write ιi :“ ιtiu and ψi :“ ψtiu . Remark 6.1. Let X “ Ť ιi pXi q. Then |pg1 , . . . , gm q|X “ m ř |gi |Xi . i“1 iPI The following definition is a relative analogue of the ordinary ambiguity function. Definition 6.2. Let G be a finitely generated group with a finite generating set X. Let H ď G be an arbitrary subgroup. A function f : N Ñ N is a relative ambiguity function of H in G with respect to X, if there is a finite subset M Ă H and a map of the form (6.1) Φ : H ˆ H Ñ H, pu, vq ÞÑ ugu,v v with gu,v P M such that by setting c :“ max |g|X the following property is satisfied. gPM ‚ For all m, n P N and all restrictions (6.2) X X X Φm,n : BH pmq ˆ BH pnq Ñ BH pm ` n ` cq, pu, vq ÞÑ Φppu, vqq, X the cardinality of every preimage Φ´1 m,n pzq with z P BH pm`n`cq is bounded by f pnq. THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 15 In the following we will refer to M as the set of connecting pieces and to Φ as the concatenation map corresponding to f . Lemma 6.3. Let G be a finitely generated group with a finite generating set X. Let H, K ď G be subgroups such that there is an epimorphism ψ : H Ñ K satisfying X |ψphq|X ď |h|X for every h P H. If βkerpψq is a subexponential function and K possesses a subexponential relative ambiguity function ε with respect to X, then H possesses a subexponential relative ambiguity function with respect to X. Proof. Let MK be the set of connecting pieces corresponding to ε. For each x P MK weŤpic a preimage x1 of x with respect to ψ. We will show that the set MH :“ tx1 u gives rise to a subexponential relative ambiguity function δ for H. To do xPMK so, we define the concatenation map for H by ΦH : H ˆ H Ñ H, pu, vq ÞÑ ux1u,v v, where x1u,v is the chosen preimage of xψpuq,ψpvq P MK . As in the previous sections, the element xψpuq,ψpvq is the connecting piece defined by the (relative) ambiguity function ΦK : K ˆ K Ñ K, pu, vq ÞÑ uxu,v v corresponding to ε. Let cH :“ max |g|X . As in the non relative case, we shall gPMH denote the restrictions X X X BH psq ˆ BH ptq Ñ BH ps ` t ` cH q, pu, vq ÞÑ ux1u,v v X by ΦK . We fix two numbers s, t P N and an element w P BH ps ` t ` cH q. We X want to bound the number of elements v P BH ptq, such that there is an element X u P BH psq satisfying ux1u,v v “ w. Let N :“ kerpψq. Due to our assumption, the X set of distinct classes rvs P H{N satisfying ux1u,v v “ w for some u P BH psq and X a representative element v P BH ptq is bounded by εptq. This is because distinct classes vN are associated to distinct solutions ψpuqxψpuq,ψpvq ψpvq “ ψpwq with X ψpvq P BH ptq. Indeed, due to our assumption we have |ψpvq|X ď |v|X ď t. Now X X we fix an element v P BH ptq. We shall bound the number of elements v̂ P BH ptq X representing v modulo N . Every such v̂ has the form v̂ “ vg P BH ptq for some X g P N . Thus we have to bound the cardinality of the set N X v ´1 BH ptq. Since ´1 X X ´1 X X |v|X ď t we have v BH ptq Ă BH p2tq and thus |N Xv BH ptq| ď βN p2tq. It is easy X X to verify that t ÞÑ βN p2tq is a subexponential function since βN is a subexponential X function. Putting these bounds together, we see that the set of elements v P BH ptq 1 X X satisfying uxu,v v for some u P BH psq is bounded by εptqβN p2tq, which is easily seen to grow subexponentially with respect to t.  Lemma 6.4. Let I “ t1, . . . , mu be a finite set of indices. To each i P I we associate a group Gi and a generating set Yi such ś that ΓpGi , Yi q is hyperbolic and Gi acts Gi be a subgroup, such that ψi pHq ď Gi acylindrically on ΓpGi , Yi q. Let H ď iPI contains a loxodromic element hi for each i P I. Then there is a decomposition of I into disjoint subsets I1 and I2 , such that the following properties are satisfied. 1) The kernel of the restricted projection ψI1 |H is finite. 2) For every index i P I1 there is a loxodromic element gi P Gi such that H contains an element of the form pg1 , . . . , gm q with gj “ 1 for j P I1 ztiu. 16 EDUARD SCHESLER Proof. Let I1 Ă I be a minimal subset such that ψI1 |H has a finite kernel. Thus, if we take i P I1 , the kernel of ψI1 ztiu|H has to be infinite. This implies that there is an infinite subset Ai Ă Gi with the following property. For every element h P Ai there is an element of the form pg1 , . . . , gm q P H with gj “ 1 for j P I1 ztiu and gi “ h. Due to our assumption there is an element ph1 , . . . , hm q P H such that hi is loxodromic. We note that ´n phn1 , . . . , hnm qpg1 , . . . , gm qph´n 1 , . . . , hm q “: pk1 , . . . , km q P H satisfies kj “ 1 for j P I1 ztiu and ki “ hni gi h´n “ hni hh´n i i . It remains to show ´n n that the set thi hhi | n P N, h P Ai u contains a loxodromic element. Due to Theorem 4.4 this is equivalent to show that there is no uniform bound ε ą 0 such that |hni hh´n i |Y ď ε for every element h P Ai and every number n P N. To get a contradiction, we assume that there is such a bound ε. Since the action of G on ΓpG, Y q is acylindrical there are constants L, R ą 0 such that for every pair of elements x, y P G with dY px, yq ě R we have |tg P G | dY px, gxq ď ε and dY py, gyq ď εu| ď N. Since hi is loxodromic, we can choose n P N big enough to satisfy |hni |Y ě R. Then, by setting x “ 1 and y “ hni , we see that every element h P Ai satisfies dY p1, h1q ď ε and dY phni , hhni q ď ε. This is a contradiction since Ai is infinite.  Proposition 6.5. Let I “ t1, . . . , mu be a finite set of indices. To each i P I we associate a finitely generated group Gi and a generating set Yi such ś that ΓpGi , Yi q Gi “: G be a is hyperbolic and Gi acts acylindrically on ΓpGi , Yi q. Let H ď iPI subgroup with the following property. For each i P I there are elements g piq “ piq piq piq piq piq piq pg1 , . . . , gm q P H and hpiq “ ph1 , . . . , hm q P H such that gi and hi are inpiq piq dependent loxodromic elements and gj , hj “ 1 for j ‰ i. Then the relative exponential growth rate of H in G exists with respect to every finite generating set of G. Proof. Let X be a finite generating set of G. Using Lemma 5.6 we may assume that Yi contains ψi pXq “ Xi for each i P I. We shall proceed with each factor Gi as in Proposition 5.7. To do so, we define ś ś Mn “ t pg piq qεn | ε P t1, ´1uu Y t phpiq qεn | ε P t1, ´1uu iPI iPI to be the set of connecting pieces and cn “ max |z|X . For each i P I we define zPMn Φnpiq : Gi ˆ Gi Ñ Gi , pu, vq ÞÑ uxpiq u,v v as in Definition 5.4. Thus, using Proposition 5.5 for large enough n P N, we see that there is a constant ε ě 0 such that by defining piq piq Φn : G ˆ G Ñ G, ppui qiPI , pvi qiPI q ÞÑ pΦn pui , vi qqiPI “ pui xu,v vi qiPI , the projections of the geodesics r1, Φn ppui qiPI , pvi qiPI qs Ă ΓpG, Ť iPI piq ιi pYi qq onto r1, Φn pui , vi qs Ă ΓpGi , Yi q THE RELATIVE EXPONENTIAL GROWTH RATE OF SUBGROUPS OF ACYLINDRICALLY HYPERBOLIC GROUPS 17 run through the ε-neighbourhoods of ui and ui xui ,vi with respect to dYi . Then, by the same arguments as in Proposition 5.7, we see that the set of possible choices for piq Xi Yi Xi u i P BG ptq Ă BG ptq satisfying Φn pui , vi q “ wi for a fixed wi P BG ps ` t ` cn q, i i i X is bounded by a linear function in t. Now let w P BG ps ` t ` cn q be fixed. Then Xi we obviously have |ψi pwq|Xi ď |w|X and hence wi :“ ψi pwq P BG ps ` t ` cn q. i Xi X Thus, the possible different images ui :“ ψi puq P BGi psq for u P BG psq satisfying piq Xi Φn pui , vi q “ wi for some appropriate vi P BG ptq is bounded by a linear function i li in t. Since u is uniquely determined by its images ui and there is at most one X element v P BG ptq satisfying uxu,v v “ w for fixed elements u, xu,v and w, wee see that the cardinality of the preimage of w with respect to the restriction X X X Φn : BH psq ˆ BH ptq Ñ BH ps ` t ` cn q is bounded by |Mn | ś iPI li ptq “ 2n`1 ś li ptq. iPI This is a polynomial function of degree |I|. Using Remark 2.5, the claim follows by X applying Proposition 2.11 on the relative growth function βH .  Theorem 6.6. Let G “ m ś Gi be a finite direct product of finitely generated acylin- i“1 drically hyperbolic groups Gi and let H be a subgroup of G. Suppose that, for each i “ 1, . . . , m, the image of the canonical projection of H to Gi contains a generalized loxodromic in Gi . Then the relative exponential growth rate of H in G exists with respect to every finite generating set X of G. Proof. Let I “ t1, . . . , mu be the set of indices. It remains to reduce the general case to the case considered in Proposition 6.5. For this we choose generating sets Yi for Gi such that ΓpGi , Yi q is hyperbolic, Gi acts acylindrically on ΓpGi , Yi q and hi is a loxodromic element in ψi pHq. Indeed, this is possible due to Theorem 4.6. Further Lemma 6.4 provides us with a decomposition of the indexset I into two disjoint subsets I1 and I2 such that the kernel of the map ψI1 |H is finite and for every index i P I1 , there is a loxodromic element gi P Gi such that H contains an element of the form ph1 , . . . , hm q with hj “ 1 for j P I1 ztiu and hi “ gi . Due to Lemma 6.3 we can restrict out attention to the case of I “ I1 . We have to consider two cases. Since ψi pHq contains a loxodromic element, Theorem 4.4 says that ψi pHq is either virtually cyclic or it contains infinitely many independent loxodromix elements. Let I “ I1 “ J1 Y J2 be a disjoint decomposition such that ψi pHq is virtually cyclic if i P J1 , or contains infinitely many independent loxodromic elements if i P J2 . In the case of i P J1 , the virtually cyclic subgroup ψi pHq contains a loxodromic element and hence it is quasiisometrically embedded in ΓpGi , Xi q. From this, it is easily seen that ψi pHq is also quasiisometrically embedded in ΓpG, Xq via ιi . This provides us with a constant C ě 0 such that βιXi pψi pHqq ptq ď Ct for every t P N. We X note that Ni :“ kerpψIztiu|H q is a subgroup of ιi pψi pHqq and hence βN ptq ď Ct i for every t P N. A further application of Lemma 6.3 reduces the problem to the case of I “ pJ1 ztiuq Y J2 . Now we see, that an inductive application of Lemma 6.3 reduces the general case to the case of I “ J2 . But this case was already proven in Proposition 6.5.  18 EDUARD SCHESLER Acknowledgments. I would like to thank my PhD supervisor Prof. Oleg Bogopolski for guidance in writing this paper. References [BH99] Martin R Bridson and André Haefliger. Metric spaces of non-positive curvature, volume 319. Springer Science & Business Media, 1999. [Gri80] Rostislav I Grigorchuk. Symmetrical random walks on discrete groups. Adv. Probab. Related Topics, 6:285–325, 1980. [M` 68] John Milnor et al. A note on curvature and fundamental group. Journal of Differential geometry, 2(1):1–7, 1968. [Ols13] A. Olshanskii. Subnormal subgroups in free groups, their growth and cogrowth. ArXiv e-prints, November 2013. [Osi16] Denis Osin. Acylindrically hyperbolic groups. Transactions of the American Mathematical Society, 368(2):851–888, 2016.
4math.GR
1 An improvement of the asymptotic Elias bound for non-binary codes. Krishna Kaipa arXiv:1705.07785v3 [cs.IT] 27 Feb 2018 Abstract For non-binary codes the Elias bound is a good upper bound for the asymptotic information rate at low relative minimum distance, where as the Plotkin bound is better at high relative minimum distance. In this work, we obtain a hybrid of these bounds which improves both. This in turn is based on the anticode bound which is a hybrid of the Hamming and Singleton bounds and improves both bounds. The question of convexity of the asymptotic rate function is an important open question. We conjecture a much weaker form of the convexity, and we show that our bounds follow immediately if we assume the conjecture. Index Terms information rate, size of a code, anticode. I. I NTRODUCTION Let Aq (n, d; L) denote the maximum size of a code of length n, minimum distance at least d, and contained in a subset L ⊂ F n , where F is an alphabet of finite size q. A central problem in coding theory is to obtain good upper and lower bounds for Aq (n, d) = Aq (n, d; F n ). The asymptotic version of this quantity is the asymptotic information rate function: α(x) = lim sup n−1 logq Aq (n, xn), x ∈ [0, 1]. (1) n→∞ The quantities Aq (n, d; L) and Aq (n, d) are related by the inequality Aq (n, d) ≤ q n Aq (n, d; L)/|L|, (2) known as the Bassalygo-Elias lemma. Taking L to be a Hamming ball of diameter w, and choosing w optimally gives, at the asymptotic level the Hamming and the Elias upper bounds. αH (x) = 1 − Hq (x/2), x ∈ [0, 1]. p αE (x) = αH (2θ(1 − 1 − x/θ)), x ∈ [0, θ]. (3) (4) The bound αE is better than αH for all x. Here Hq (x) is the entropy function (9), and θ := 1 − q −1 . An anticode of diameter w in F n is any subset of F n with Hamming diameter w. Let A∗q (n, w) denote the maximum size of an anticode of diameter at most w in F n . In contrast to the situation with Aq (n, d), the quantity A∗q (n, d) was explicitly determined by Ahlswede and Khachatrian in [1]. From their result, it is easy to determine the asymptotic quantity α∗ (x) = limn→∞ n−1 logq A∗q (n, xn). We actually do not need the results of [1], however it is the main inspiration for this work. Taking L to be an A∗q (n, w) anticode in (2), and choosing w optimally, we get the following two bounds which improve αH and αE respectively. Theorem 1. (hybrid Hamming-Singleton bound) ( 1 − Hq ( x2 ) if x ∈ [0, 2/q] αHS (x) = (1 − x)Hq (1) if x ∈ [2/q, 1]. K. Kaipa is with the Department of Mathematics at the Indian Institute of Science and Education Research, Pune 411008, India (email: [email protected]). The author was supported by the Science and Engineering Research Board, Govt. of India, under Project EMR/2016/005578. 2 The bound αHS improves the Hamming and the Singleton bounds. It is ∪-convex and continuously differentiable. Theorem 2. (hybrid Elias-Plotkin bound) Let q > 2. ( √ 2q−3 ] 1 − Hq (θ − θ2 − xθ) if x ∈ [0, q(q−1) αEP (x) = (q−1)Hq (1) 2q−3 (θ − x) q−2 if x ∈ [ q(q−1) , θ] The bound αEP improves the Elias and Plotkin bounds. It is ∪-convex and continuously differentiable. It is not known if the function α(x) itself is ∪-convex, although it is tempting to believe that it is. We propose a weaker conjecture: Conjecture 1. The function α(x) θ−x is decreasing. In other words α(tx + (1 − t)θ) ≤ tα(x) + (1 − t)α(θ), t ∈ [0, 1]. As evidence for this conjecture, we will show that theorems 1 and 2 follow very easily if we admit the truth of the conjecture. The bound αEP in Theorem 2 is an elementary and explicit correction to the classical Elias bound. It does not however improve the upper-bounds obtained by the linear programming approach, like the second MRRW bound αM RRW 2 (due to Aaltonen [2]) or the further improvement of αM RRW 2 due to Ben-Haim and Litsyn [3, Theorem 7]. The reasons for this are as follows: For small δ we have αEP (δ) = αE (δ) ≥ αM RRW 2 (δ). For large δ, the inequality αEP (δ) > αM RRW 2 (δ) follows from the fact that αEP (δ) has a non-zero slope at δ = 1 − 1/q where as the actual function α(δ) and the bound αM RRW 2 have zero slope at δ = 1 − 1/q. The paper is organized as follows. In section II, we collect some results on size of anticodes, which we use in section III to prove Theorems 1 and 2. We discuss Conjecture 1 in section IV. II. S IZE OF ANTICODES We recall that A∗q (n, d) is the maximum size of an anticode of diameter at most d in F n . If we take L to be an anticode of size A∗q (n, d − 1) then clearly Aq (n, d; L) = 1. Using this in (2), we get a bound Aq (n, d) ≤ q n /A∗q (n, d − 1), (5) known as Delsarte’s code-anticode bound [4]. Taking d = xn where x ∈ [0, 1] we get n−1 logq Aq (n, xn) ≤ 1 − n−1 logq A∗q (n, xn − 1). Taking lim supn→∞ we get: α(x) ≤ 1 − α∗ (x), (6) α∗ (x) = lim inf n−1 logq A∗q (n, xn). (7) where n→∞ This is the the asymptotic form of (5). We use the notation B(r; n) and Vq (n, r) to denote a Hamming ball of radius r in F n and its volume respectively. The ball B(t; n) where t = b(d − 1)/2c in F n is an anticode of diameter at most d − 1. Let F n = F d−1 × F n−d+1 and let v ∈ F n−d+1 be a fixed word. Sets of the form F d−1 × {v} of size q d−1 are also anticodes of diameter d − 1. It follows that: α∗ (x) ≥ max{Hq (x/2), x}. Here, we have used the well known formula: lim n−1 logq Vq (n, tn) = Hq (t), t ∈ [0, θ], n→∞ (8) 3 where, 1 ) + (1 − x) logq ( 1−x ), x ∈ [0, 1]. Hq (x) = x logq ( q−1 x (9) While the convexity of α(x) is an open question, it is quite easy to see that: Lemma 1. The function α∗ (x) is ∩-convex. F n1 Proof: If S1 ⊂ F n1 and S2 ⊂ F n2 are anticodes of diameters d1 and d2 respectively, then S1 × S2 ⊂ × F n2 is an anticode of diameter d1 + d2 . Taking Si to be A∗q (ni , di ) anticodes, we immediately get A∗q (n1 + n2 , d1 + d2 ) ≥ A∗q (n1 , d1 )A∗q (n2 , d2 ). Let n = n1 + n2 go to infinity with n1 /n = t + o(1), d1 /n1 = x + o(1) and d2 /n2 = y + o(1). Applying lim inf n→∞ n−1 logq to this inequality we get: α∗ (tx + (1 − t)y) ≥ tα∗ (x) + (1 − t)α∗ (y), t ∈ [0, 1]. We note that with codes we have d(C1 ×C2 ) = min{d(C1 ), d(C2 )}, which is why the above proof method does not apply to the question of convexity of α(x). From (8) and Lemma 1 we get: α∗ (tx + (1 − t)y) ≥ tHq (x/2) + (1 − t)y, t ∈ [0, 1]. Let δ = tx + (1 − t)y. We can rewrite this as α∗ (δ) ≥ f (x, y), where f : [0, δ) × (δ, 1] is defined by f (x, y) = y−δ (Hq (x/2) y−x − x) + δ. (10) We note that (y−x)2 ∂f (x, y) δ−x ∂y x(y−x)2 ∂f (x, y) y(y−δ) ∂x = Hq (x/2) − x, = Hq ( x2 ) − x + (1 − xy ) logq (1 − x2 ). There is a unique positive number b > 0 satisfying Hq (b/2) = b (where the Hamming and Singleton bounds intersect). Therefore, Hq (x/2) − x has the same sign as b − x. Using this in (10), we see that f (x, y) ≤ δ for x ≥ b. Therefore, in order to maximize f (x, y) it suffices to consider x < b. We note that ∂f (x, y) has the same sign as H(x/2) − x and hence that of b − x. Since x < b, we see that for fixed ∂y x < b, the function f (x, y) is maximized for y = 1. We are now reduced to maximizing q (x/2) f (x, 1) = 1 − (1 − δ) 1−H1−x , x ∈ [0, δ]. Lemma 2. Let g(x) = 1−Hq (x/2) 1−x for x ∈ [0, 1]. sign(g 0 (x)) = sign(x − 2q ). Proof: We calculate: g 0 (x) = 1 2(1−x)2 2 x(2−x) logq ( q 4(q−1) ). 2 x(2−x) Therefore sign(g 0 (x)) = sign( q 4(q−1) − 1). Next, we note that q 2 x(2−x) 4(q−1) − 1 = q(x − 2q ) (q−2)+q(1−x) 4(q−1) has the same sign as x − 2/q, as was to be shown. A stronger assertion is that g(x) is in fact ∪-convex: differentiating once more, we get: 2 /4 1 1 ln(q)(1 − x)3 g 00 (x) = ln( qq−1 ) + ( 2x−x 2 − 1 − ln( 2x−x2 )) 4 We note that q 2 ≥ 4(q − 1), and hence the first term is non-negative. The remaining parenthetical term is non-negative using the inequality t − 1 − ln(t) ≥ 0 for t ≥ 1, (11) and the fact that t = 1/(2x − x2 ) ≥ 1 for x ∈ (0, 1]. It follows from Lemma 2 that q (x/2) argminx∈[0,δ] 1−H1−x = min{δ, 2/q}. (12) ( Hq (x/2) if x ∈ [0, 2/q] β(x) = 1 − (1 − x)Hq (1) if x ∈ [2/q, 1]. (13) Therefore we obtain the bound: Theorem 3. α∗ (x) ≥ β(x) where Moreover, β(x) is continuously differentiable and ∩-convex. We have used the relation 1−Hq (1/q) 1−2/q = Hq (1) = logq (q − 1). (14) The function β(x) is continuously differentiable because the component for x ≥ 2/q is just the tangent line at x = 2/q to the component for x ≤ 2/q, i.e. to Hq (x/2). We note that β 0 (x) equals Hq0 (x/2)/2 for x ≤ 2/q and Hq0 (1/q)/2 for x ≥ 2/q. Since β 0 (x) is non-increasing, it follows that β(x) is ∩-convex. In the next lemma, we show that there is a sequence of anticodes Sn ⊂ F n of diameter at most δn such that limn→∞ n−1 logq |Sn | equals β(δ), i.e. the lower bound on α∗ (δ) given in theorem 3. Lemma 3. Consider the anticodes S(d, n) of diameter d in F n (taken from [1]) given by S(d, n) = B(rd,n ; n − d + 2rd,n ) × F d−2rd,n , where rd,n = max{0, min{d d−1 e, d n−d−q+1 e}}. 2 q−2 Then limn→∞ n−1 logq |S(δn, n)| = β(δ). Proof: We note that ( rδn,n n→∞ n ρ = lim = δ 2 1−δ q−2 if δ ∈ [0, 2/q] if δ ∈ [2/q, 1]. Also limn→∞ n−1 logq |S(δn, n)| equals ρ (1 − δ + 2ρ)Hq ( 1−δ+2ρ ) + (δ − 2ρ), which simplifies to Hq (δ/2) if δ ≤ 2/q and (on using (14)) to 1 − (1 − δ)Hq (1) if δ ≥ 2/q. This is the same as β(δ). We now have all the results we need for proving theorems 1 and 2. However, we will state a remarkable theorem due to Ahlswede and Khachatrian [1], which we will not need. We also obtain an asymptotic version of their result and record it as a corollary, as it does not seem to have appeared in literature. In brief their theorem states that A∗q (n, d) equals |S(d, n)|. Moreover any A∗q (n, d) anticode is Hamming isometric to the anticode S(d, n) (with some exceptions). At the asymptotic level, the result is again remarkable: The lower bound β(δ) for α∗ (δ) given in theorem 3 is actually the exact value of α∗ (δ). Moreover α∗ (δ) need not have been defined using lim inf n→∞ as limn→∞ n−1 logq A∗q (n, δn) already exists. Theorem. [1] Given q ≥ 2 and integers 0 ≤ d ≤ n, let rd,n and S(d, n) be as in Lemma 3. Then, A∗q (n, d) = |S(d, n)|. 5 Moreover, up to a Hamming isometry of F n an anticode S of size A∗q (n, d) must be: • S(d, n) • or S(d, n) with rd,n replaced with rd,n − 1. This case is possible only if (n − d − 1)/(q − 2) is a positive integer not exceeding d/2. Corollary 1. ( Hq (x/2) α∗ (x) = 1 − (1 − x)Hq (1) if 0 ≤ x ≤ 2/q if 2/q ≤ x ≤ 1. Proof: It follows from the theorem of Ahlswede and Khachatrian, together with Lemma 3 that logq A∗q (n,δn) n n→∞ lim Therefore α∗ (δ) = lim inf n→∞ = lim n→∞ logq A∗q (n,δn) n logq |S(δn,n)| n = βq (δ). logq A∗q (n,δn) n n→∞ = lim = β(δ). III. P ROOFS OF THEOREMS 1 AND 2 A. Proof of Theorem 1 If we use the bound α∗ (x) ≥ β(x) of Theorem 3 in the inequality α(x) ≤ 1 − α∗ (x) (see (6)), we obtain the bound α(x) ≤ 1 − β(x) =: αHS (x). Since β(x) is ∩-convex and continuously differentiable (see Theorem 3), it follows that αHS (x) is ∪convex and continuously-differentiable. To show that αHS (x) ≤ αS (x) = 1 − x, we note that αS (x) being the secant line to αHS (x) between (0, αHS (0)) and (1, αHS (1)), lies above the graph of αHS (x) as the latter is ∪-convex. To prove that αHS (x) improves αH (x) we note that αHS (x) coincides with αH (x) for x ≤ 2/q, and for x ≥ 2/q, Lemma 2 implies that αH (x) ≥ (1 − x)Hq (1) = αHS (x). This finishes the proof of Theorem 1. It is worth noting that (12) implies the following formula for αHS (δ): αH (x)(1−δ) . 1−x x∈[0,δ] αHS (δ) = min Since θ−δ θ−x ≤ 1−δ 1−x (15) for x ∈ [0, δ] and δ ≤ θ, we get αHS (δ) ≥ αHP (δ) := min x∈[0,δ] αH (x)(θ−δ) . θ−x (16) It can be shown (see subsection III-C) that αHP (δ) is an upper bound for α(δ) which improves both the Hamming and Plotkin bounds. B. Proof of Theorem 2 It will be convenient to identify the alphabet F with the abelian group Z/qZ. Given 0 ≤ δ ≤ ω, let wn = bωnc and dn = bδnc. We take Ln ⊂ F n to be the anticode (from Lemma 3): Ln = B(rn ; n − wn + 2rn ) × F wn −2rn , where n −q+1 e}}. rn = max{0, min{d wn2−1 e, d n−wq−2 (17) 6 We will take the balls B(r; m) to be centered at (0, . . . , 0) ∈ F m . As in Lemma 3, we have ( ω if ω ∈ [0, 2/q] 2 ρ := lim rnn = 1−ω n→∞ if ω ∈ [2/q, 1]. q−2 (18) We also note that Lemma 3 gives lim n−1 logq |Ln | = β(ω) = 1 − αHS (ω). (19) n→∞ Let Aq (n, dn ; Ln ) be the maximum possible size of a code contained in Ln and having minimum distance at least dn . Theorem 4. limn→∞ n−1 logq Aq (n, dn ; Ln ) = 0 if ρ θ(1−ω+2ρ) ≤1− q 1−δ/θ . 1−ω+2ρ (20) Proof: Our proof is similar to the standard proof of the analogous result for the Elias bound (which corresponds to taking ρ = ω/2 instead of the prescription (18)). First let C ⊂ L be a code of size M = Aq (n, d; L), where L ⊂ F n is the anticode L = B(r; n − w + 2r) × F w−2r for some r ≤ w/2. Let γ1 (C) = (M n) −1 n X X m(i, a)2 , i=1 a∈F P where m(i, a) = #{c ∈ C : ci = a}. We note that M = a∈F m(i, a), and that XX γ1 ). M (M − 1)d ≤ d(c, c0 ) = nM 2 (1 − M c∈C c0 ∈C We can rewrite this as: M≤ γ1 M d/n , provided − (1 − nd ) γ1 M > 1 − nd . For n − w + 2r < i ≤ n we use Cauchy-Schwarz inequality to get n X 1 M 2 (w−2r) X P a∈F (21) m(i, a)2 ≥ M 2 /q. In particular m(i, a)2 ≥ 1q . (22) i=n−w+2r+1 a∈F Let π1 be the projection of F n = F n−w+2r × F w−2r on to the factor F n−w+2r . We note that for c ∈ C, we have wt(π1 (c)) < r because π1 (C) ⊂ B(r; n − w + 2r). Here wt(v) is the number of nonzero entries of v. Therefore n−w+2r X X m(i, a) ≤ M r. i=1 Since Pn−w+2r P i=1 a a6=0 m(i, a) = M (n − w + 2r) we get: S= n−w+2r X m(i, 0) ≥ (n − w + r)M. i=1 In particular S M (n−w+2r) We note that P a6=0 − 1 q ≥ n−w+r n−w+2r − 1 q =θ− r . n−w+2r m(i, a) = M − m(i, 0). By Cauchy-Schwarz inequality: n−w+2r X i=1 m(i, 0)2 ≥ S 2 /(n − w + 2r), and (23) 7 X m(i, a)2 ≥ (M − m(i, 0))2 /(q − 1) a6=0 Since Pn−w+2r P i=1 a∈F m(i, a)2 equals ! n−w+2r X m(i, 0)2 + i=1 X m(i, a)2 , a6=0 we get: n−w+2r X X i=1 n−w+2r X  2 m(i, a) ≥ qm(i,0)2 +M 2 −2M m(i,0) q−1  i=1 a∈F This can be rewritten as: 1 M 2 (n−w+2r) n−w+2r X X i=1 S m(i, a)2 ≥ 1θ ( M (n−w+2r) − 1q )2 + 1 q a∈F Combining this with (22) we get: γ1 M ≥ n−w+2r S ( M (n−w+2r) nθ γ1 M − − q −1 )2 + 1q . Using (23) this can be written as: 1 q ≥ n−w+2r nθ r )2 . n−w+2r (θ − Now let Cn ⊂ Ln be a sequence of codes of size Mn = Aq (n, dn ; Ln ). The preceding inequality gives: γ1 (Cn ) Mn − 1 q ≥ 1−ω+2ρ θ (θ − ρ )2 1−ω+2ρ + o(1). Using this in (21), we get: Mn ≤ 1−ω+2ρ θ δ + o(1) , ρ (θ − 1−ω+2ρ )2 − (θ − δ) + o(1) provided the denominator is a positive number. Therefore, limn→∞ n−1 logq Mn = 0 provided 1−ω+2ρ θ (θ − ρ )2 1−ω+2ρ This condition is the same as ρ θ(1−ω+2ρ) ≤1− q ≥ θ − δ. 1−δ/θ 1−ω+2ρ Since Mn = Aq (n, dn ; Ln ) this finishes the proof. Using (2) we get: logq Aq (n,dn ) log |L | ≤ 1 − qn n + n logq Aq (n,dn ;Ln ) . n Taking lim sup as n → ∞ and using the result of Theorem 4 and (19) we get: α(δ) ≤ αHS (ωmax (δ)), (24) where ωmax (δ) is the largest value of ω for which the inequality (20) holds. In order to determine ωmax (δ), we introduce functions f1 , f2 on [0, θ] defined by: p f1 (δ) = 2θ(1 − 1 − δ/θ) (25) 2 f2 (δ)= 1 − (1 − δ/θ) (q−1) q(q−2) Lemma 4. Let q > 2. 1) f1 (δ) ≥ f2 (δ) with equality only at δ = 2q−3 . q(q−1) (26) 8 2q−3 . 2) f2 (δ) is the tangent line to f1 (δ) at δ = q(q−1) 2q−3 3) sign(f1 (δ) − 2/q) = sign(f2 (δ) − 2/q) = sign(δ − q(q−1) ). p Proof: Let f3 (δ) := 1 − q−1 1 − δ/θ. We observe that q−2 sign(f3 (δ)) = sign(δ − 2q−3 ). q(q−1) The three assertions to be proved follow respectively from the following three relations: f1 (δ)−2/q 2(1−2/q) = f1 (δ) − f2 (δ) = (1 − 2/q) f3 (δ)2 , p f10 (δ) − f20 (δ) = f3 (δ)/ 1 − δ/θ, f2 (δ)−2/q √ = f3 (δ). (1−2/q)+θ 1−δ/θ Proposition 1. ωmax (δ) = ( p 2θ(1 − 1 − δ/θ) 2 1 − (1 − δ/θ) (q−1) q(q−2) 2q−3 if δ ∈ [0, q(q−1) ] 2q−3 if δ ∈ [ q(q−1) , 1]. The function ωmax (δ) is increasing, continuously differentiable, and ∪-convex on [0, θ]. Proof: The inequality (20) reduces to ( f1 (δ) ω≤ f2 (δ) if ρ = ω/2 if ρ = (1 − ω)/(2 − q), where ρ is as given in (18). Therefore, for a given δ ∈ [0, θ], the quantity ωmax (δ) is the maximum element of the set {ω : δ ≤ ω ≤ min{f1 (δ), 2/q}} ∪ {ω : max{δ, 2/q} ≤ ω ≤ f2 (δ)}. 2q−3 2q−3 If δ ≥ q(q−1) , then f2 (δ) ≥ 2/q (by Lemma 4) and hence, the maximum of this set is f2 (δ). If δ ≤ q(q−1) , then f2 (δ) ≤ f1 (δ) ≤ 2/q (by Lemma 4) and hence, the maximum of this set is f1 (δ). This proves the asserted formula for ωmax (δ). 2q−3 We note that the second component of ωmax (δ) is the tangent line to the first component at x = q(q−1) . p 2q−3 Therefore ωmax (δ) is continuously differentiable. The derivative of ωmax (x) is 1/ 1 − x/θ for x ≤ q(q−1) , 2q−3 and constant at q−1 for x ≥ q(q−1) . Since the derivative is positive, the function is increasing. Since the q−2 derivative is non-decreasing, we see that the function is ∪-convex. Proof of αEP being an upper bound: We note from lemma 4 that sign(ωmax (δ) − 2/q) = sign(δ − 2q−3 ). q(q−1) Therefore αHS (ωmax (δ)) is just the function αEP (δ) defined in of theorem 2. The bound α(x) ≤ αEP (x) now follows from (24). Proof of αEP being continuously differentiable: The function αEP (x) = αHS (ωmax (x)) being a composition of continuously differentiable functions, is itself continuously differentiable. Proof of αEP being ∪-convex: Both the functions αHS and ωmax are ∪-convex, but αHS is decreasing and hence it is not obvious that αEP (x) = αHS (ωmax (x)) is ∪-convex. We will show instead that the 2q−3 0 0 00 derivative αEP is non-decreasing. Since αEP is constant for x ≥ q(q−1) , it suffices to show that αE (x) > 0 2q−3 for x ∈ (0, q(q−1) ]. This follows from the next lemma. 9 Lemma 5. The Elias bound αE (x) is ∪-convex on [0, δE ] and ∩-convex on [δE , θ] where δE satisfies: 2q−3 q(q−1) Proof: Let Z(x) = θ(1 − < δE < 43 ( q−4/3 ). q−1 p 1 − x/θ). A calculation shows that 4θ ln(q)(1 − Z(x) 3 00 ) αE (x) θ Z ϕ(z) = θ z 1−θ 1−z = ϕ(Z(x)), where (1 − 1/t)dt. To see this, we note: αE (x) = Hq (Z(x)) and hence 00 (x) = ln(q)αE Z0 Z(1−Z) + Z 00 ln( (q−1)(1−Z) ). Z Since Z 0 = 1/(2(1 − Z/θ)) and Z 00 = Z 0 /(2θ(1 − Z/θ)2 ), we get Z θ Z(x) Z(x) 3 00 (1 − 1/t)dt, 4θ ln(q)(1 − θ ) αE (x) = 1−θ 1−Z(x) 00 as desired. It follows that sign(αE (x)) = sign(ϕ(Z(x)). Next we note that Z(x) is increasing on [0, θ] and 2q−3 ) = 1/q, Z( 43 ( q−4/3 )) = 1/2. Z( q(q−1) q−1 It now suffices to show that sign(ϕ(z)) = sign(zE − z), for some zE ∈ ( 1q , 12 ). We note that ϕ0 (z) = (z − 21 ) z2(θ−z) 2 (1−z)2 . Thus ϕ(z) is decreasing on [0, 1/2] and increasing on [1/2, θ]. In order to show sign(ϕ(z)) = sign(zE − z) for some zE ∈ (1/q, 1/2), it suffices to show that ϕ(1/q) > 0 and ϕ(1/2) < 0. We calculate 1 ϕ(1/q) 2 2q−3 = ( q−1 − 1 − ln( q−1 )) + ( 2q−2 − ln(2)). 2 2 Since q ≥ 3, we have q−1 ≥ 1. The inequality (11) implies that the first parenthetical term above is 2 non-negative. Again q ≥ 3 implies 2q−3 2q−2 − ln(2) ≥ 3 4 − ln(2) > 0, and hence the second parenthetical term is positive. Thus ϕ(1/q) > 0. Next, we note that ϕ(1/2) = 2 − 4/q − ln(q − 1). The function a(t) = 2 − 4/t − ln(t − 1) satisfies 2 a0 (t) = − t(t−2) 2 (t−1) , and a(3) = 2/3 − ln(2) < 0. Therefore a(t) < 0 for t ≥ 3, and hence ϕ(1/2) < 0 for all q ≥ 3. Proof that αEP improves the Plotkin bound: We have already shown that αEP (x) is ∪-convex, and hence αEP (x) lies below the secant line between x = 0 and x = θ, which is the Plotkin bound. Proof that αEP improves the Elias bound: This does not readily follow from our results thus far, and requires more work. The characterization of αEP (x) given in the next theorem clearly implies αEP (x) ≤ αE (x). αE (x)(θ−δ) . θ−x x∈[0,δ] Theorem 5. αEP (δ) = min 10 1 0.8 0.6 αE (δ) αEP (δ) 0.4 0.2 0 0 0.2 0.4 0.6 0.8 δ Fig. 1. αE (δ) and αEP (δ) for q = 16. 2q−3 E (x) is decreasing on [0, q(q−1) ] and Proof: The theorem immediately follows if we show that αθ−x 2q−3 increasing on [ q(q−1) , θ]. We will use the notation from the proof of Lemma 5. Since αE (x) is ∩-convex for x ≥ δE , it follows that the slope αE (x)/(θ − x) of the secant between x and θ is increasing. It remains 2q−3 2q−3 E (x) is decreasing on [0, q(q−1) ] and increasing on [ q(q−1) , δE ]. Since Z(x) is an increasing to show that αθ−x 2q−3 2 function, with Z(0) = 0, Z( q(q−1) ) = 1/q, and (1 − x/θ) = (1 − z/θ) , it suffices to show that h(z) = 1−Hq (z) , (θ−z)2 is decreasing on [0, 1/q] and increasing on [1/q, zE ] where zE = Z(δE ). A calculation shows that Z z 3 0 ln(q)(θ − z) h (z) = ϕ(t)dt. 1/q z To see this we note that either side of this equation evaluates to (θ + z) ln( (1−z)(q−1) ) + 2 ln(q(1 − z)). Since ϕ(t) > 0 for t ∈ (0, zE ), we see sign(h0 (z)) = sign(z − 1/q), z ∈ [0, zE ]. Thus we have also shown that h(z) is decreasing for z ∈ [0, 1/q] and increasing on [1/q, zE ] as required. The bounds αHS , αHP and αEP are related as αEP (δ) ≤ αHP (δ) ≤ αHS (δ). We have already shown αHP (δ) ≤ αHS (δ) in (16). Since αE (x) ≤ αH (x) for all x, we note that min x∈[0,δ] αE (x)(θ−δ) θ−x ≤ min x∈[0,δ] αH (x)(θ−δ) . θ−x Thus αEP (δ) ≤ αHP (δ). We end this section with a plot comparing αE (x) and αEP (x) for q = 16. C. Another proof of Theorem 1 Another proof of αHS (x) being an upper bound for α(x) can be given using the following theorem of Laihonen and Litsyn: Theorem. [5] Let δ1 , δ2 , µ ∈ [0, 1]. α((1 − µ)δ1 + µδ2 ) ≤ (1 − µ)αH (δ1 ) + µα(δ2 ). (27) 11 Proof: We give a quick proof. The result follows from the inequality: q n1 Aq (n2 , d2 ) , Aq (n1 + n2 , d1 + d2 ) ≤ Vq (n1 , d1 /2) by taking n1 + n2 = n → ∞, and n1 /n, n2 /n, d1 /n1 and d2 /n2 going to 1 − µ, µ, δ1 and δ2 respectively. The above inequality in turn comes from the Bassalygo-Elias lemma (2) q n1 +n2 Aq (n1 + n2 , d1 + d2 ; L) Aq (n1 + n2 , d1 + d2 ) ≤ , |L| by taking L = B(d1 /2; n1 ) × F n2 , and observing that Aq (n1 + n2 , d1 + d2 ; L) ≤ Aq (n2 , d2 ). (If C is a Aq (n1 + n2 , d1 + d2 ; L) code, and π2 : F n1 × F n2 → F n2 is the projection on the second factor, then the restriction of π2 to C is injective, and π2 (C) has minimum distance at least d2 .) If we set δ2 = 1, δ1 = x and µ = (δ − δ1 )/(1 − δ1 ) in (27), we get: α(y) αH (x) ≤ for x ≤ y. 1−y 1−x Thus, = αHS (δ), α(δ) ≤ min αH (x)(1−δ) 1−x x∈[0,δ] where we have used (15). We now prove that the function αHP (δ) defined in (16) is an upper bound for α(δ). Taking δ2 = θ, δ1 = x, and µ = (y − δ1 )/(θ − δ1 ) in (27), we get: α(y) αH (x) ≤ for x ≤ y θ−y θ−x Thus α(δ) ≤ min αH (x)(θ−δ) = αHP (δ). (28) θ−x x∈[0,δ] It is not known if the inequality (27) (the theorem of Laihonen-Litsyn) holds if we replace αH by αE . If such a result were true, then the derivation of the bound αHP (x) above with αH replaced with αE would immediately yield Theorem 5. We believe that such an inequality α((1 − µ)δ1 + µδ2 ) ≤ (1 − µ)αE (δ1 ) + µα(δ2 ), (29) must be true (it would surely be true if α(x) is ∪-convex), but we believe it cannot be obtained just by a simple application of the Bassalygo-Elias lemma (2). If (29) holds, we can obtain an upper bound which improves the Laihonen-Litsyn bound [5]. We recall that the Laihonen-Litsyn bound, which we denote αHM RRW is a hybrid of the Hamming and MRRW bounds. It coincides with the Hamming bound for δ ∈ [0, a] and with the MRRW bound for [b, θ] where a < b are points such that the straight line joining (a, αH (a)) and (b, αM RRW (b)) is a common tangent to both αH at a and αM RRW at b. Since the Hamming bound is good for small δ and the MRRW bound good for large δ, the Laihonen-Litsyn bound combines the best features of both bounds in to a single bound. To obtain this bound, we note that (27) implies the inequality α((1 − µ)δ1 + µδ2 ) ≤ (1 − µ)αH (δ1 ) + µαM RRW (δ2 ). We fix δ = (1 − µ)δ1 + µδ2 and choose δ1 and δ2 optimally in order to minimize the right hand side. This yields the αHM RRW bound. Since the second MRRW bound αM RRW 2 improves the first MRRW bound αM RRW , a better version αHM RRW 2 of the Laihonen-Litsyn bound (see [3, Theorem 2]) can be obtained by using αM RRW 2 in place of αM RRW 2 . Since the Elias bound αE (δ) is better than the Hamming bound αH (δ) for all δ, in case (29) is true, repeating this procedure with αE replacing αH , would yield the hybrid Elias-MRRW bounds αEM RRW (δ), αEM RRW 2 (δ) which would improve the respective LaihonenLitsyn bounds αHM RRW , αHM RRW 2 (δ). We leave the question of the truth of (29) open. 12 IV. O N THE CONVEXITY OF α(x) A fundamental open question about the function α(x) is whether it is ∪-convex. In other words is it true that α((1 − t)x + ty) ≤ (1 − t)α(x) + tα(y), t ∈ [0, 1]. (30) It is worth noting that non-convex upper bounds like the Elias bound and the MRRW bound admit corrections to the non-convex part: the bound αEP (x) for the Elias bound and the Aaltonen straight-line bound (see the theorem below and the Appendix) for the MRRW bound. This may be viewed as some kind of evidence supporting the truth of (30). It is known that (30) holds for x = 0 (for example by taking δ1 = 0 in (27)). Another way to state this is that (1 − α(x))/x is decreasing on [0, 1]. As a consequence, if αu (x) is any upper bound for α(x) we obtain a better upper bound (1 − αu (x))δ x∈[δ,θ] x α(δ) ≤ α̃u (δ) = 1 − max (31) To see this we use: 1−α(δ) δ ≥ 1−α(x) x ≥ 1−αu (x) , for x x ∈ [δ, θ]. Thus 1−α(δ) ≥ maxx∈[δ,θ] (1−αxu (x)) as desired. If (1 − αu (x))/x is a decreasing function then the improved δ bound α̃u (x) coincides with αu (x), but otherwise α̃u (x) improves αu (x). For example let αu (x) be the first MRRW bound αM RRW (x) = p p Hq (( θ(1 − x) − x(1 − θ))2 ), x ∈ [0, θ]. It can be shown that that (1 − αM RRW (x))/x fails to be decreasing near x = 0, and similarly αM RRW (x) fails to be ∪-convex near x = 0. This is immediately rectified by passing to the improved bound α̃M RRW (x), resulting in the following theorem of Aaltonen. Theorem. (Aaltonen bound) [6] [7, p.53] Let q > 2. α(x) ≤ α̃M RRW (x) where ( q (1) 1 − xH if x ∈ [0, (1 − 2q )2 ] 1−2/q α̃M RRW (x) = αM RRW (x) if x ∈ [(1 − 2q )2 , θ] (32) This bound is ∪-convex, continuously differentiable, and improves the MRRW bound. We note that for x ≤ (1 − 2/q)2 the bound α̃M RRW (x) coincides with the tangent line to αM RRW (x) at (1−2/q)2 . In particular α̃M RRW (x) is continuously differentiable. The assertion that α̃M RRW (x) improves αM RRW (x) follows from the fact that α̃u (x) ≤ αu (x) for any upper bound αu (x) for α(x). The other assertions are proved in the appendix. On the other hand, it is not known if the convexity condition (30) holds for y = θ, in other words if α(x)/(θ − x) is a decreasing function of x. We conjecture that this is true (see Conjecture 1). As evidence for this conjecture, we now show that the bounds αEP , αHP and αHS can be obtained without doing any work, if we assume the truth of Conjecture 1: if αu (x) is any upper bound for α(x) we obtain a better upper bound αu (x)(θ − δ) α(δ) ≤ αu† (δ) := min (33) x∈[0,δ] θ−x To see this we use: α(δ) θ−δ ≤ α(x) θ−x ≤ αu (x) θ−x for x ∈ [0, δ]. u (x) Thus α(δ) ≤ minx∈[0,δ] αu (x)(θ−δ) as desired. In case αθ−x is a decreasing function then the improved θ−x † † bound αu (x) coincides with αu (x), but otherwise αu (x) improves αu (x). Taking αu (x) to be the Elias 13 bound, we get αu† (x) to be the bound αEP . This is the content of Theorem 5. Taking αu (x) to be the Hamming bound, we get αu† (x) to be the bound αHP . This is the content of (28). Moreover, if α(x)/(θ−x) is decreasing then α(x)/(1 − x) being the product of the non-negative decreasing functions α(x)/(θ − x) . Taking αu (x) to be and (θ − x)/(1 − x) is itself decreasing. Thus we obtain α(δ) ≤ minx∈[0,δ] αu (x)(1−δ) 1−x αu (x)(1−δ) is αHS (δ). This is the content of (15). the Hamming bound, the bound minx∈[0,δ] 1−x A PPENDIX A A ALTONEN ’ S STRAIGHT- LINE BOUND The bound α̃M RRW presented above was obtained by Aaltonen in [6, p.156]. The bound follows from (31) and the following result (x) argmaxx∈[δ,θ] 1−αM RRW = max{δ, (1 − 2/q)2 }. x (34) The argmax above is not straightforward to obtain, and to quote from [6], was found by a mere chance. The derivation is not presented in [6]. The purpose of this appendix is to i) record a proof of (34), and ii) to prove that α̃M RRW (x) is ∪-convex. The author thanks Tero Laihonen for providing a copy of Aaltonen’s work [6], which is not easily available. p p Let ξ : [0, θ] → [0, θ] be the function defined by ξ(x) = ( θ(1 − x) − x(1 − θ))2 . We note that αM RRW (x) = Hq (ξ(x)), and that ξ(x) decreases from θ to 0 as x runs from 0 to θ. It is easy to check that ξ(ξ(x)) = x for x ∈ [0, θ]. Therefore we can invert the relation y = ξ(x) as x = ξ(y). We also note that ξ((1 − 2/q)2 ) = 1/q. Therefore (34) is equivalent to the assertion: q (y) argmaxy∈[0,t] 1−H = min{t, 1/q}. ξ(y) In terms of hA (y) := 1−Hq (y) ξ(y) (35) we must show sign(h0A (y)) = sign(1/q − y), y ∈ (0, θ). q q A calculation shows that: h0A (y)ξ(y)3/2 y(1−y) θ(1−θ) ln(q) = q y 1−θ ln( yθ ) + 1−y θ ln( 1−y ) := G(y) 1−θ Clearly sign(h0A (y)) = sign(G(y)). Therefore, we must show that sign(G(y)) = sign(1/q − y) for y ∈ (0, θ). Clearly G(1/q) = G(1 − θ) = 0. First we will prove that G(y) > 0 on [0, 1/q). We calculate: r p − θ(1 − θ) G0 (y) = Z r r θ y Z 1−θ 1−y ln(t)dt = 1 r Z 1−θ 1−y ln(t)dt + θ y ln(t)dt. 1 We make the substitution t = 1/τ in the first integral to obtain: r p − θ(1 − θ) G0 (y) = Z 1 1−y 1−θ r ln(t)(1 − 1 )dt t2 Z + r θ y 1−y 1−θ ln(t)dt. We note that t ≥ 1 in both the integrals, and hence both the integrands p are non-negative. Consequently, p the first integral is positive, and the second integral is also positive when θ/y > (1 − y)/(1 − θ). For y ∈ [0, θ], this inequality is equivalent to (θ −y)(1−θ −y) > 0 which in turn is equivalentp to y < 1−θ i.e. 0 y ∈ [0, 1/q). Thus, for y ∈ (0, 1/q), we have shown that G (y) < 0. Since G(0) = ln(q) q/(q − 1) > 0 and G(1/q) = 0, the fact that G(y) is strictly decreasing on [0, 1/q] implies G(y) > 0 on [0, 1/q). 14 Next we prove G(y) < 0 on (1/q, θ). Differentiating the expression for G0 (y) we get: √ √ p 1−θ θ 1−θ 4 θ(1 − θ) G00 (y) = ln( yθ ) y3/2 + ln( 1−y ) (1−y) 3/2 . Differentiating once more, we get: p 4 θ(1 − θ) G000 (y) = √ 1−θ (1 (1−y)5/2 1−θ + 23 ln( 1−y )) − √ θ (1 y 5/2 + 32 ln( yθ )) √ θ The second term − y5/2 (1 + 23 ln( yθ )) is negative on [1/q, θ) because θ/y > 1 on this interval. The first term √ 1−θ (1 + 32 (1−y)5/2 1−θ ln( 1−y )) has the same sign as y − (1 − q −1 e2/3 ) for y ∈ [1/q, θ). It follows that G000 (y) < 0 for y ∈ [1/q, 1 − q −1 e2/3 ]. (We note that the condition for 1/q < 1 − q −1 e2/3 , is q ≥ 3, which is the case here). √ 1−θ 1−θ 3 For y ∈ (1 − q −1 e2/3 , θ), as above (1−y) 5/2 (1 + 2 ln( 1−y )) is positive. It is also an increasing function of y, because (1−θ)/(1−y) increases with y. For y ∈ [1−q −1 e2/3 , θ], we note that θ/y decreases with y and √ θ θ/y ≥ 1. Therefore the term − y5/2 (1 + 23 ln( yθ )) increases with y. Thus G000 (y) is an increasing function of y for y ∈ [1 − q −1 e2/3 , θ]. We note the boundary conditions on G000 (y): we have G000 (1/q) < 0 < G000 (θ). To see this we note that −4(θ(1 − θ))3 G000 (1/q) = 23 ln(q − 1)(θ3 + (1 − θ)3 ) + (θ3 − (1 − θ)3 ) > 0 because q > 2 is equivalent to θ > 1 − θ as well as ln(q − 1) > 0. Also G000 (θ) = 2θ−1 4(θ(1−θ))2.5 > 0. Since G000 (1 − q −1 e2/3 ) < 0 < G000 (θ) and G000 (y) is increasing on [1 − q −1 e2/3 , θ], we conclude that there is a unique y0 in the interior of this interval such that G000 (y) has the same sign as y − y0 on this interval. Together with the fact that G000 (y) < 0 on [1/q, 1 − q −1 e2/3 ], we obtain: sign(G000 (y)) = sign(y − y0 ) on [1/q, θ]. This is illustrated in Figure 2, which shows the graphs of G(y) (dashed plot) and G000 (y) on [1/q, θ] for q = 8. The point (y, G000 (y)) for y = 1 − q −1 e2/3 is marked. (In this plot, the values of G000 (y) are indicated on the right-vertical axis, and the values of G(y) are indicated on the left-vertical axis). Thus G00 (y) is decreasing on [1/q, y0 ] and increasing on [y0 , θ]. Since G00 (θ) = 0, it follows that G00 (y) < 0 on [y0 , θ). We note that G00 (1/q) = ln(q−1)(2θ−1) > 0. 4(θ(1−θ))2 Thus G00 (1/q) > 0 > G00 (y0 ) together with the fact that G00 (y) is decreasing on [1/q, y0 ] implies that there is a unique y1 in the interior of this interval such that G00 (y) has the same sign as y1 − y on this interval. We have already shown that G00 (y) < 0 on [y0 , θ]. Thus we conclude sign(G00 (y)) = sign(y1 − y) on [1/q, θ). This implies G0 (y) is increasing on [1/q, y1 ] and decreasing on [y1 , θ]. Since G0 (θ) = 0, we conclude that G0 (y) > 0 on [y1 , θ). We note that Z √q−1 G0 (1/q) = √ −1 ln(t)(1 − t12 )dt < 0. θ(1−θ) 0 1 0 Since G (y) is increasing on [1/q, y1 ] and G (1/q) < 0 < G0 (y1 ), we conclude that there is a unique y2 in the interior of the interval [1/q, y1 ] such that G0 (y) has the same sign as y − y2 on this interval. Also G0 (y) > 0 on [y1 , θ]. Thus we conclude: sign(G0 (y)) = sign(y − y2 ) on [1/q, θ). 15 100 -0.02 0 -0.04 -100 -0.06 -200 -0.08 -300 -0.1 -400 -0.12 0.2 0.4 y 0.6 G000(y) G(y) 0 -500 0.8 Fig. 2. Graphs of G(y) and G000 (y) on [1/q, θ] for q = 8. This implies that G(y) is decreasing on [1/q, y2 ] and increasing on [y2 , θ]. Since G(1/q) = G(θ) = 0, we see that G(y) is negative on (1/q, y2 ] as well as [y2 , θ). This finishes the proof of the assertion G(y) < 0 on (1/q, θ), and hence of (35). 0 Next, we prove the ∪-convexity of α̃M RRW (x). We must show that the derivative α̃M RRW (x) is non2 decreasing. Since the derivative is constant on [0, (1 − 2/q) ], the problem reduces to showing that αM RRW (x) is ∪-convex for x ∈ [(1 − 2/q)2 , θ]. This follows from the next lemma: Lemma 6. The first MRRW bound αM RRW (δ) is ∪-convex if q = 2. For q > 2, it is ∩-convex on [0, δM RRW ] and ∪-convex on [δM RRW , θ] where δM RRW satisfies: 1 2 √ − q−1 q < δM RRW < (1 − 2q )2 . Proof: Let y = ξ(x). Let χ(y) = 1 − 2y + (2θ − 1) We calculate: y 02 2y 00 y(1−y) = q x(1−x) θ(1−θ) q y(1−y) θ(1−θ) = χ(y) (36) p Since x(1 − x)/(θ(1 − θ)) is non-negative, we also make the observation that that χ(y) > 0 for all y ∈ [0, θ). Since αM RRW (x) = Hq (y), we get: 00 ln(q)αM RRW (x) = −y 02 y(1−y) + y 00 ln (q−1)(1−y) . y Since ξ(ξ(x)) = x, we get y 0 = ξ 0 (x) = 1/ξ 0 (y). Using this we get: 00 0 2 αM RRW (x)(ξ (y)) y(1 − y) ln(q) = −1 + 2y 00 y(1−y) y 02 ln q (q−1)(1−y) . y Using (36), we obtain: r 00 0 2 αM RRW (x)(ξ (y)) y(1 − y) ln(q) = −1 + ln (1−y)(q−1) y χ(y) 00 Let y ∈ (0, θ). We recall note χ(y) > 0 for y ∈ (0, θ). Thus for αM RRW (x) has the same sign as q G2 (y) := ln( (1−y)(q−1) ) − χ(y). y 16 We calculate: G02 (y)y(1 − y) = χ(y)(y − 12 ). Therefore, sign(G02 (y)) = sign(y − 1/2). In other words G2 (y) is decreasing on [0, 1/2] and increasing on [1/2, θ). We note G2 (1/q) = ln(q − 1) − 2(1 − 2q ). The function t 7→ ln(t − 1) − 2(1 − 2/t), evaluates to 0 at t = 2, and is an increasing function of t for t ≥ 2 (because its derivative (1−2/t)2 /(t−1) is positive). Thus G2 (1/q) > 0 for q > 2 and G2 (1/q) = 0 for q = 2. Since G2 (0) = +∞ and G2 (y) is decreasing on [0, 1/q], we conclude that G2 (y) > 0 on [0, 1/q] if q > 2. If q = 2, then G2 (y) ≥ 0 on [0, 1/q] = [0, θ]. In particular, for q = 2 the bound αM RRW (x) is ∪-convex on [0, θ]. √q−2 ). q−1 √ 2 t−1−t < 4(t−1)3/2 For q > 2, we note that G2 (1/2) = 21 (ln(q − 1) − The function b(t) = 12 (ln(t − 1) − √t−2 ) t−1 satisfies b(3) = 12 (ln(2) − √22 ) < 0 and b0 (t) = 0 for t ≥ 3. Thus G2 (1/2) < 0 for all q > 2. Since G2 (1/q) > 0 and G2 (1/2) < 0 and G2 (y) is decreasing on [1/q, 1/2], we conclude that there is a yM RRW ∈ (1/q, 1/2) such that sign(G2 (y)) = sign(yM RRW − y) for y ∈ [0, 1/2]. Also G2 (θ) = 0, G2 (1/2) < 0 and G2 (y) is increasing on [1/2, θ], which shows that G2 (y) < 0 on [1/2, θ). Thus 00 sign(G2 (y)) = sign(yM RRW − y) for y ∈ (0, θ). Since αM RRW (x) has the same sign as G2 (y) (where 00 y = ξ(x)), we finally obtain sign(αM RRW (x)) = sign(x − δM RW W ) for √ x ∈ (0, θ), where δM RW W = 1 ξ(yM RRW ) satisfies ξ(1/2) < δM RW W < ξ(1/q), or in other words: 2 − q−1 < δM RRW < (1 − 2q )2 . This q completes the proof of the lemma. R EFERENCES [1] R. Ahlswede and L. H. Khachatrian, “The diametric theorem in Hamming spaces—optimal anticodes,” Adv. in Appl. Math., vol. 20, no. 4, pp. 429–449, 1998. [2] M. Aaltonen, “A new upper bound on nonbinary block codes,” Discrete Math., vol. 83, no. 2-3, pp. 139–160, 1990. [3] Y. Ben-Haim and S. Litsyn, “A new upper bound on the rate of non-binary codes,” Adv. Math. Commun., vol. 1, no. 1, pp. 83–92, 2007. [4] P. Delsarte, “An algebraic approach to the association schemes of coding theory,” Philips Res. Rep. Suppl., no. 10, pp. vi+97, 1973. [5] T. Laihonen and S. Litsyn, “On upper bounds for minimum distance and covering radius of non-binary codes,” Des. Codes Cryptogr., vol. 14, no. 1, pp. 71–80, 1998. [6] M. Aaltonen, “Bounds on the information rate of a tree code as a function of the code’s feedback decoding minimum distance,” Ann. Univ. Turku. Ser. A I, no. 181, 1981. [7] M. Tsfasman, S. Vlăduţ, and D. Nogin, Algebraic geometric codes: basic notions, ser. Mathematical Surveys and Monographs. Providence, RI: American Mathematical Society, 2007, vol. 139.
7cs.IT
arXiv:1803.08961v1 [math.AC] 23 Mar 2018 COHEN-MACAULAY CRITERIA FOR PROJECTIVE MONOMIAL CURVES VIA GRÖBNER BASES JÜRGEN HERZOG, DUMITRU I. STAMATE Abstract. We prove new characterizations based on Gröbner bases for the CohenMacaulay property of a projective monomial curve. Contents Introduction 1. A Cohen-Macaulay criterion via Gröbner bases 2. Dual sequences 3. A bound for the number of generators of in(I(a)), when C(a) is arithmetically Cohen-Macaulay 4. Applications References 1 3 5 10 12 14 Introduction Let K be any field. For any sequence of distinct positive integers a : a1 , . . . , an we denote I(a) the kernel of the K-algebra homomorphism φ : S → K[t] where S = K[x1 , . . . , xn ] and φ(xi ) = tai for i = 1, . . . , n. The image of this map is the semigroup ring over K of the semigroup H generated by a1 , . . . , an . We no not insist that a is a minimal generating set for H. In the following, we assume that gcd(a1 , . . . , an ) = 1 and an > ai for all i < n. We note that the homogenization of I(a) with respect to the variable x0 is again a toric ideal, namely it is the kernel of the K-algebra map ψ : S[x0 ] → K[s, t] where ψ(xi ) = tai san −ai for 1 ≤ i ≤ n and ψ(x0 ) = san . The image of the map ψ is the subalgebra K[A] of K[t, s] generated by the monomials whose exponents are read from the columns of the matrix   0 a1 ... an−1 an (1) A= . an an − a1 . . . an − an−1 0 In case K is an algebraically closed field, I(a) is the vanishing ideal of the affine curve C(a) given parametrically by t 7→ (ta1 , . . . , tan ), while I(a)h is the vanishing 2010 Mathematics Subject Classification. Primary 13H10, 13P10, 16S36; Secondary 13F20, 14M25. Key words and phrases. arithmetically Cohen-Macaulay, projective monomial curve, revlex, Gröbner basis, numerical semigroup, Apéry set. 1 ideal of the projective closure C(a) of C(a) in Pn , given parametrically by [s : t] 7→ [tan : sa1 tan −a1 : · · · : san−1 tan −an−1 : san ]. Curves of this type are called projective monomial curves. The projective monomial curve C(a) is called arithmetically Cohen-Macaulay if its vanishing ideal I(a)h is a Cohen-Macaulay ideal. It is known that this is the case if and only if tan , san is a regular sequence on K[A]. This fact is a special case of [10, Theorem 2.6]. Arithmetically Cohen-Macaulay curves are not rare among the projective monomial curves. It follows from Vu’s [18, Theorem 5.7] that for any fixed a, the curve C(a1 + k, . . . , an + k) is arithmetically Cohen-Macaulay for all k ≫ 0. In small embedding dimension, Bresinsky, Schenzel and Vogel [4] characterized the arithmetically Cohen-Macaulay projective monomial curves in P3 by the property that I(a)h is generated by at most 3 elements. In the context of numerical semigroups, Gröbner bases have been used in algorithms in [16] and [17] to find the Frobenius number of the numerical semigroup H generated by a, or to characterize when is the tangent cone of the semigroup algebra K[H] Cohen-Macaulay, see [1], [2]. One of the main results in this paper is that C(a) is arithmetically Cohen– Macaulay if and only if in(I(a)h ), respectively in(I(a)), is a Cohen-Macaulay ideal, see Theorem 1.2 (b) and (c). Here the initial ideals are taken for a reverse lexicographic order for which xn , x0 , respectively xn are the smallest variables. These conditions are also equivalent to condition (f) which says that in(xn , I(a)) = (xn , in(I(a))). Yet other equivalent properties are (d) and (e), namely that xn , respectively x0 , xn , do not divide any minimal monomial generator of in(I(a)) and of in(I(a)h ), respectively, where the monomial orders are as before. A Cohen-Macaulay criterion for a simplicial semigroup ring in terms of the Gröbner basis of its defining ideal is given by Kamoi in [15, Corollary 2.9] and [14, Theorem 1.2]. In the particular case considered in this paper, equivalences (a), (d) and (e) in Theorem 1.2 sharpen Kamoi’s mentioned results and his [14, Corollary 3.6]. The dual sequence of a is defined to be the sequence a′ : an − a1 , . . . , an − an−1 , an . The projective monomial curves associated to the sequences a and a′ are obviously isomorphic. So it is natural to compare the ideals I(a) and I(a′ ) and their reduced Gröbner bases. That is the focus of Section 2. P For w = (w1 , . . . , wn ) ∈ Zn we denote hw, ai = ni=1 wi ai , and we set L(a) = {w ∈ Zn : hw, ai = 0}. Obviously, I(a) is just the lattice ideal of the lattice + − L(a). Indeed, I(a) is generated by the binomials fw = xw − xw with wP∈ L(a). Let σ : Zn → Zn be the map given by σ(w1 , . . . , wn ) = (w1 , . . . , wn−1 , − ni=1 wi ). Then σ is an automorphism of the group Zn such that σ 2 = idZn which induces an isomorphism between L(a) and L(a′ ). In particular, L(a′ ) = (fσ(w) : w ∈ L(a)). In general, a minimal set of binomial generators of L(a) is not mapped to a minimal set of binomial generators of L(a′ ), see Remark 3.2. However, in Theorem 2.2 we show that C(a) is arithmetically Cohen-Macaulay if and only if in(fσ(w) ) = in(fw ) 2 for all fw ∈ G, where G denotes the reduced Gröbner basis of I(a) with respect to a reverse lexicographic monomial order with xn the smallest variable. Moreover, these conditions are also equivalent to the fact that fw ∈ G if and only if fσ(w) ∈ G ′ , for all w ∈ Zn , where G ′ is the reduced Gröbner basis of I(a′ ) with respect to the same monomial order. Let H denote the numerical semigroup generated by a. For any nonzero element h in H its Apéry set is defined as Ap(H, h) = {x ∈ H : x−h ∈ / H}. For h ∈ Ap(H, an ) we denote ϕa (h) the smallest monomial in S for the reverse lexicographic order such that its a-degree equals h. The close relationship between the ideals I(a) and I(a′ ) is also outlined by the fact that the curve C(a) is arithmetically Cohen-Macaulay if and only if in(xn , I(a)) = in(xn , I(a′ )), see Theorem 2.6. Here one uses a reverse lexicographic order with xn the smallest variable. For the proof, a key observation is that the latter equation is equivalent to the fact that for all h in Ap(H, an ) the a′ -degree of ϕa (h) is in Ap(H ′ , an ), where H ′ denotes the semigroup generated by the dual sequence a′ . As a consequence, in Corollary 2.7 we recover a criterion of Cavaliere and Niesi ([5]) for C(a) to be arithmetically Cohen-Macaulay. When n = 3, it is known from [11] that µ(I(a)) ≤ 3. However, we give examples showing that a reduced Gröbner basis may be arbitrarily large, see Proposition 3.1. In case C(a) is arithmetically Cohen-Macaulay, in Proposition 3.4 we show that  an µ(in(I(a))) ≤ n−2 . In Section 4 we apply Theorem 1.2 to test the arithmetically Cohen-Macaulay property for two families of projective monomial curves in P3 that have appeared in the literature. For these families of 4-generated numerical semigroups which were introduced by Arslan ([1]) and by Bresinsky ([3]), respectively, we show that the corresponding projective monomial curve is (respectively, is not) arithmetically Cohen-Macaulay. 1. A Cohen-Macaulay criterion via Gröbner bases The following lemma appears in [7, Exercise 5, page 392]. Lacking reference to a proof, we prefer to provide one. Lemma 1.1. Let I be an ideal in the polynomial ring S = K[x1 , . . . , xn ] and I h ⊂ S[x0 ] its homogenization with respect to the variable x0 . We denote < any reverse lexicographic monomial order on S and <0 the reverse lexicographic monomial order on S[x0 ] extended from S and such that x0 is the least variable. If f1 , . . . , fr is the reduced Gröbner basis for I with respect to <, then f1h , . . . , frh is the reduced Gröbner basis for I h with respect to <0 . Moreover, in<0 (I h ) = (in< (I))S[x0 ]. Proof. Let F h = {f1h , . . . , frh }. It is proved in [9, Proposition 3.15] that F h is a Gröbner basis for I h with respect to the block order <′ on S[x0 ] which is defined as xα xa0 <′ xβ xb0 if (xα < xβ ) or (xα = xβ and a < b) 3 for all α, β ∈ Nn and all nonnegative integers a, b. Let f be a nonzero polynomial in I. We write f = m1 + · · · + mq as a sum of monomials with mi > mi−1 for 2 ≤ i ≤ q. Then deg mi ≥ deg mi−1 for 2 ≤ i ≤ q and ε f h = m1 + m2 xε02 + · · · + mq x0q , where εi = deg m1 − deg mi for i = 2, . . . , q. Moreover, in the above decomposition of f h the monomials are listed decreasingly with respect to <0 . Thus in<0 (f h ) = m1 = in< (f ) = in<′ (f h ) for all f in I. It follows that in<′ (I h ) = in<′ (fih : 1 ≤ i ≤ r) = (in<′ (fih ) : 1 ≤ i ≤ r) = (in<0 (fih ) : 1 ≤ i ≤ r) ⊆ in<0 (I h ). Since the homogeneous ideals in<′ (I h ) and in<0 (I h ) have the same Hilbert function, we conclude that they are equal and that F h is a Gröbner basis for I h with respect to <0 . Assume there exist i, j such that in<0 (fih ) divides a monomial in tail(fjh ), i.e. in< (fi ) divides mxε0 with m a monomial in tail(fj ). This implies that in< (fi ) divides m, which contradicts the fact that F is the reduced Gröbner basis for I with respect to <. Therefore F h is the reduced Gröbner basis for I h with respect to <0 .  The following theorem is one of the main results of this paper. Theorem 1.2. Let a : a1 , . . . , an be a sequence of positive integers with an > ai for all i < n. Denote < any reverse lexicographic order on S = K[x1 , . . . , xn ] such that xn is the smallest variable and <0 the induced reverse lexicographic order on S[x0 ], where xn > x0 . The following conditions are equivalent: (a) the projective monomial curve C(a) is arithmetically Cohen-Macaulay; (b) in<0 (I(a)h ) is a Cohen-Macaulay ideal; (c) in< (I(a)) is a Cohen-Macaulay ideal; (d) xn does not divide any element of G(in< (I(a))); (e) xn and x0 do not divide any element of G(in<0 (I(a)h )); (f) in< (xn , I(a)) = (xn , in< (I(a)). Proof. Lemma 1.1 implies that G(in< (I(a))) = G(in<0 (I(a)h )). Therefore (b) ⇐⇒ (c) and (d) ⇐⇒ (e). The implication (b) ⇒ (a) is a general fact, see for example [12, Corollary 3.3.5]. Assuming (e), we get that x0 , xn is a regular sequence modulo in<0 (I(a)h ), which implies (b). Since xn is regular on S/I(a) which is a domain, using [6, Proposition 1.4] we have that xn is regular on S/ in< (I(a)) if and only if in< (xn , I(a)) = (xn , in< (I(a)). This shows (d) ⇐⇒ (f). It remains to prove that (a) ⇒ (e). It is known that the ring K[A] is CohenMacaulay if and only if san , tan is a regular sequence on it, see [10, Lemma 2.4]. That is equivalent to x0 , xn being a regular sequence on S[x0 ]/I(a)h . Let F = {f1 , . . . , fr } be the reduced Gröbner basis of I(a) with respect to <. For all i = 1, . . . , r, fi is a binomial of the form ui − vi , where ui = in< (fi ), and ui and vi have disjoint supports. After a reordering, we may assume that there exists ℓ ≤ r such that fi is homogeneous if and only if i ≤ ℓ. 4 Using Lemma 1.1, we see that G(in<0 (I(a)h )) = {u1, . . . , ur }. Clearly, x0 does not divide ui for any i, since deg ui ≥ deg vi . We first show that for i ≤ ℓ, ui is not divisible by xn . Indeed, if that were not the case, by the properties of the chosen monomial order <, we would have that xn divides vi , as well, hence ui and vi do not have disjoint supports, which is false. It remains to prove that xn does not divide ui for any i > ℓ. For that, we set gi = fih |x0 =0 for all i = 1, . . . , r and J = (g1 , . . . , gr )S. Then K[A]/(san ) ∼ = S/J. For i ≤ ℓ, since fi is homogeneous we obtain that x0 does not divide vi . Therefore, J = (f1 , . . . , fℓ , uℓ+1, . . . , ur ). Since xn is regular on S/J, we infer that xn is not in the support of any of the monomials ui with i > ℓ. This finishes the proof of (a) ⇒ (e).  2. Dual sequences Given a : a1 , . . . , an a sequence of distinct nonnegative integers such that an > ai for all i < n, the dual sequence is defined to be a′ : an − a1 , . . . , an − an−1 , an . It is clear that this procedure is a duality: (a′ )′ = a. The projective monomial curves associated to the sequences a and a′ are isomorphic. Indeed, the ideals I(a)h and I(a′ )h are the kernel of the maps on S[x0 ] sending x0 , . . . , xn to the monomials having as exponent vectors the columns of the matrix A in (1), and respectively the columns of the matrix   0 an − a1 . . . an − an−1 an ′ A = . an a1 ... an−1 0 This implies that the polynomials in the ideal I(a′ )h are obtained from those in I(a)h by switching the variables x0 and xn . In this section we compare the Gröbner bases of the ideals I(a) and I(a′ ) with respect to a reverse lexicographic order, in connection to the Cohen-Macaulay property of the associated projective monomial curve. P Let σ : Zn → Zn be the map given by σ(w1 , . . . , wn ) = (w1 , . . . , wn−1 , − ni=1 wi ). It is easy to see that σ is an automorphism P of the group Zn and that σ 2 = idZn . For n w = (w1 , . . . , wn ) ∈ Z we denote hw, ai = ni=1 wi ai . We set L(a) = {w ∈ Zn : hw, ai = 0}. Lemma 2.1. With notation as above, the map σ induces an isomorphism between the groups L(a) and L(a′ ). P Proof. If w = (w1 , . . . , wn ) ∈ Zn with ni=1 wi ai = 0 then ! ! n n X X (an − ai )wi − wi an = 0, i=1 i=1 ′ ′ equivalently hσ(w), a i = 0 and σ(w) ∈ L(a ). Similarly, if w ′ ∈ L(a′ ) then σ(w ′ ) ∈ L(a′′ ) = L(a).  If the entries of the vector α = (α1 , . . . , αn ) are nonnegative integers we let xα = · · · xαnn . For w = (w1 , . . . , wn ) ∈ Zn , let w + and w − be the unique vectors with xα1 1 5 nonnegative entries and disjoint supports such that w = w + − w − . We denote + − fw = xw − xw . It is clear that f−w = −fw . Therefore, a difference of two monomials with disjoint supports can be identified with a vector w ∈ Zn . It is known that I(a) = (fw : w ∈ L(a)), hence I(a′ ) = (fσ(w) : w ∈ L(a)). However, it is not always true that σ maps a minimal generating set (or a Gröbner basis) for I(a) into a minimal generating set (or a Gröbner basis) for I(a′ ), see Proposition 3.1 and Remark 3.2. Theorem 2.2. Let a : a1 , . . . , an be a sequence of nonnegative integers with an > ai for all i < n. Let G and G ′ be the reduced Gröbner bases of I(a) and I(a′ ), respectively, with respect to a reverse lexicographic monomial order on S = K[x1 , . . . , xn ] such that xn is the smallest variable. The following conditions are equivalent: (a) the projective monomial curve C(a) is arithmetically Cohen-Macaulay; (b) in(fσ(w) ) = in(fw ), for all fw ∈ G; (c) fw ∈ G ⇐⇒ fσ(w) ∈ G ′ , for all w ∈ Zn . Proof. We first prove that conditions (a) and (b) are equivalent. (a) ⇒ (b): We assume that I(a)h is a Cohen-Macaulay ideal in S[x0 ]. We pick fw in G, where w = (w1 , . . . , wn ). We denote w ′ = σ(w) = (w1′ , . . . , wn′ ). Since the P + leading coefficient LC(fw ) = 1 we get that in(fw ) = xw , hence d = ni=1 wi ≥ 0 P and wn′ = − ni=1 wi = −d ≤ 0. By Theorem 1.2 we obtain that xn does not divide in(fw ), hence wn ≤ 0. ConseP ′ + ′ − quently, (w ′ )+ = w + . Also, ni=1 wi′ = −wn ≥ 0, and hence deg x(w ) ≥ deg x(w ) . We distinguish two cases. ′ + + ′ + ′ − Firstly, if wn < 0 then deg x(w ) > deg x(w ) , hence in(fw′ ) = x(w ) = xw = − ′ − n in(fw ). Moreover, x(w ) = xw · xd+w . n ′ + ′ − Secondly, in case wn = 0 we get that deg x(w ) = deg x(w ) . Now, if d = 0 then ′ + ′ − w ′ = w. If d > 0, for the chosen monomial order we obtain that x(w ) > x(w ) , ′ − − because x(w ) = xw · xdn . + Thus in(fw′ ) = xw = in(fw ) in all cases, and property (b) holds. (b) ⇒ (a): If I(a)h is not a Cohen-Macaulay ideal, by Theorem 1.2 there exists fw in G such that xn divides in(fw ). Let w = (w1 , . . . , wn ) and w ′ = σ(w) = + (w1′ , . . . , wn′ ). Since LC(fw ) = 1 we get that in(fw ) = xw , hence wn > 0 and P n i=1 wi ≥ 0. There exists i0 6= n such that wi0 > 0, otherwise, since hw, ai = 0 we get that Pn−1 Pn−1 i=1 ai (−wi ) = wn an ≥ −(w1 + · · · + wn−1 )an > − i=1 ai wi , which is a contradiction. P ′ − ′ + Since ni=1 wi′ = −wn < 0, we obtain that deg x(w ) > deg x(w ) and in(fw′ ) = ′ − ′ + x(w ) . As i0 < n, we have that wi′0 = wi0 > 0, hence xi0 divides x(w ) . On the other ′ − hand, condition (b) implies that in(fσ(w) ) = in(fw ), and therefore xi0 divides x(w ) as well, which gives a contradiction. We conclude that the projective monomial curve C(a) is Cohen-Macaulay. Next we prove that (a),(b) ⇒ (c). From the proof above of the equivalence (a) ⇐⇒ (b), we see that under the assumption that (a) (hence also (b)) holds, for 6 all fw in G one has (2) tail(fσ(w) ) = tail(fw ) · xan for some integer a. From Theorem 1.2 we have that in(I(a′ )) = in(I(a)), therefore property (b) implies that G ′′ = {fσ(w) : fw ∈ G} is a minimal Gröbner basis for I(a′ ). We show that it is reduced. + Let fw ∈ G with w = (w1 , . . . , wn ) and σ(w) = (w1′ , . . . , wn′ ). Then in(fw ) = xw + − and deg(xw ) ≥ deg(xw ). Condition (a) and Theorem 1.2 imply that wn ≤ 0. Thus Pn ′ )− ′ (w ′ )+ ) ≥ deg(x(w P ). i=1 wi = −wn ≥ 0, which implies that deg(x ′ ′ If wn = 0 then w is homogeneous and either w = w (if ni=1 wi = 0), or xn P ′ + ′ − divides x(w ) (if ni=1 wi > 0), hence x(w ) = in(fσ(w) ) and LC(fσ(w) ) = 1. ′ + ′ − If wn < 0 then deg(x(w ) ) > deg(x(w ) ), and again LC(fσ(w) ) = 1. If there are fw and fwe in G such that in(fσ(w) ) divides tail(fσ(w) e ), then, since xn is not in the support of in(fw ) = in(fσ(w) ), by using (2) we get that in(fw ) divides tail(fwe ). This contradicts the fact that G is the reduced Gröbner basis for I(a). Hence G ′′ = G ′ , which proves (c). For (c) ⇒ (a): If we assume that (c) holds, but I(a)h is not Cohen-Macaulay, then + by Theorem 1.2 there exists fw in G such that xn divides in(fw ) = xw . Let σ(w) = P − + (w1′ , . . . , wn′ ). Since ni=1 wi′ = −wn < 0, it follows that deg(xσ(w) ) > deg(xσ(w) ), − hence in(fσ(w) ) = xσ(w) . On the other hand, property (c) implies that fσ(w) ∈ G ′ , + hence in(fσ(w) ) = xσ(w) , which is a contradiction. Therefore, property (a) holds. This ends the proof of the theorem.  Remark 2.3. The fact that the involution σ maps some (minimal) Gröbner basis for I(a) into a (minimal) Gröbner basis for I(a′ ) is not enough to imply that the curve C(a) is arithmetically Cohen-Macaulay. Indeed, let a : 4, 13, 19. Then a′ : 15, 6, 19. A Singular [8] computation shows that G = {y 5 − x2 z 3 , x3 y 2 − z 2 , x5 z − y 3 , x8 − yz}, and G ′ = {y 5 − x2 , x3 y 2 − z 3 , y 3z 3 − x5 , x8 − yz 6 } are the reduced Gröbner bases with respect to the reverse lexicographic order with x > y > z > t for the ideals I(a) and I(a′ ), respectively. One has G = {fw1 , fw2 , fw3 , fw4 }, where w1 = (−2, 5, −3), w2 = (3, 2, −2), w3 = (5, −3, 1) and w4 = (8, −1, −1). Since σ(w1 ) = (−2, 5, 0), σ(w2 ) = (3, 2, −3), σ(w3 ) = (5, −3, −3) and σ(w4 ) = (8, −1, −6) we note that G ′ = {fσ(w1 ) , fσ(w2 ) , −fσ(w3 ) , fσ(w4 ) }. This means that {fσ(w1 ) , fσ(w2 ) , fσ(w3 ) , fσ(w4 ) } is a minimal Gröbner basis for I(a′ ), although different from the reduced one G ′ . Let a = a1 , . . . , an be a sequence of nonnegative integers with gcd(a1 , . . . , an ) = 1 and an > ai for all i = 1, . . . , n−1. Our next goal is to describe the Cohen-Macaulay property of C(a) in terms of the Apéry sets of the semigroup generated by a or the 7 dual sequence a′ . We recall that for a numerical semigroup H and 0 6= h in H, the Apéry set of H with respect to h is Ap(H, h) = {x ∈ H : x − h ∈ / H}. It is known that | Ap(H, h)| = h and that the elements of Ap(H, h) have distinct residues modulo h. The sequence a induces a grading on S = k[x1 , . . . , xn ] by letting deg(xi ) = ai for all i = 1,P. . . , n. For any monomial xα = xr11 · · · xrnn we denote its a-degree by dega (xα ) = ni=1 ri ai . We denote H the numerical semigroup generated by a. For any h in Ap(H, an ) we denote ϕa (h) the smallest monomial in S (with respect to a reverse lexicographic monomial order where xn is the smallest variable) such that its a-degree equals h. Since h − an ∈ / H we see that the monomial ϕa (h) is in ′ S = k[x1 , . . . , xn−1 ]. Proposition 2.4. With notation as above, for any h in Ap(H, an ) the monomial ϕa (h) ∈ / (xn , in(I(a)))S. Proof. Let h ∈ Ap(H, an ) and ϕa (h) = xα . Assume that xα ∈ in(xn , I(a)). Then xα = in(F ) for some F in (xn , I(a)). Since the ideal (xn , I(a)) is generated by monomials and binomials which are the difference of two monomials with the same a-degree, without loss of generality we may assume that F is a-homogeneous. Thus we may write xα = in(xn f + f1 fw1 + · · · + fq fwq ), where w1 , . . . , wq ∈ L(a), and f, f1 , . . . , fq are a-homogeneous with dega (xn f ) = dega (f1 fw1 ) = · · · = dega (fq fwq ). We notice that f = 0, otherwise h = dega (xα ) = dega (xn f ) = an + dega (f ), gives that h − an ∈ H, which is false. Hence xα ∈ in(I(a)). The ideal I(a) has a Gröbner basis of binomials, hence we can write xα = m · in(fw ) for some binomial fw ∈ I(a) and m a monomial in S ′ . Without loss of generality, we may + + − − assume in(fw ) = xw . Thus xw > xw , which gives ϕa (h) = xα > xw m. But − dega (w + ) = dega (w − ), hence dega (xα ) = dega (xw m), which contradicts the choice of xα . Therefore, ϕa (h) ∈ / (xn , in(I(a))).  If we identify a monomial which is in S and not in in(xn , I(a)) with its residue class modulo the monomial ideal in(xn , I(a)), by Proposition 2.4 the assignment ϕa (−) defines a map from Ap(H, an ) into Mon(S/ in(xn , I(a))), the K-basis of monomials of S/ in(xn , I(a)). We prove that this is a bijection. Proposition 2.5. The map ϕa : Ap(H, an ) → Mon(S/ in(xn , I(a))) is bijective. Proof. Let h, h′ in Ap(H, an ) with ϕa (h) = ϕa (h′ ). Then h = dega (ϕa (h)) = dega (ϕa (h′ )) = h′ , and the map ϕa is injective. By Macaulay’s theorem ([9, Theorem 2.6]) the monomials in S which do not belong to in(xn , I(a)) form a K-basis for S/(xn , I(a)). Therefore, | Mon(S/ in(xn , I(a)))| = dimK S/(xn , I(a)) = dimK K[H]/(tan ) = an . Since | Ap(H, an )| = an , we conclude that the map ϕa is bijective. 8  Theorem 2.6. Let a : a1 , . . . , an be a sequence of distinct positive integers such that gcd(a1 , . . . , an ) = 1 and an > ai for all i = 1, . . . , n − 1. We denote a′ the dual sequence of a. Let H and H ′ be the numerical semigroups generated by a and a′ , respectively. The following statements are equivalent: (a) the projective monomial curve C(a) is arithmetically Cohen-Macaulay; (b) in(xn , I(a)) = in(xn , I(a′ )); (c) Mon(S/ in(xn , I(a))) = Mon(S/ in(xn , I(a′ ))); (d) dega′ (ϕa (h)) ∈ Ap(H ′ , an ) for all h in Ap(H, an ), where the initial ideals are taken with respect to the reverse lexicographic term order on S. Proof. Assume (a) holds. It follows from Theorem 1.2 that in(xn , I(a)) = (xn , in(I(a))) and in(xn , I(a′ )) = (xn , in(I(a′ ))). We get from Lemma 1.1 that G(in(I(a))) = G(in(I h (a))) = G(in(I h (a′ ))) = G(in(I(a))), hence the statement (b) is true. Clearly, the properties (b) and (c) are equivalent. We now prove that (b) ⇐⇒ (d). Assume that (b) holds. Let h ∈ Ap(H, an ). By Proposition 2.4 we have that the monomial ϕa (h) is not in in(xn , I(a)), hence it is not in in(xn , I(a′ )). Using Proposition 2.5 we get that ϕa (h) = ϕa′ (h′ ) for some h′ in Ap(H ′ , an ). Hence dega′ (ϕa (h)) ∈ Ap(H ′, an ), which proves (d). Conversely, we assume that (d) holds and we consider the monomial xα not in in(xn , I(a)). By Proposition 2.5 there exists h in Ap(H, an ) such that ϕa (h) = xα . Property (d) implies that there exists h′ in Ap(H ′, an ) such that h′ = dega′ (xα ), which by Proposition 2.4 gives that xα ∈ / in(xn , I(a′ )). Hence (d) ⇒ (b). To finish the proof of the theorem we are left to show that (b) ⇒ (a). Assume in(xn , I(a)) = in(xn , I(a′ )). By Theorem 1.2, it is enough to prove that xn does not divide any monomial in G(in(I(a))). Assume there exists a monomial u · xcn in G(in(I(a))) with u not divisible by xn and c > 0. Then u is not a constant, otherwise, rn−1 in since I(a) has a Gröbner basis of binomials, there exists f = xcn − xr11 . . . xn−1 Pn−1 c I(a) with xn = in(f ). This implies that we have a relation c · an = i=1 ri ai with Pn−1 ri , which is false since an > ai for all i < n. c ≥ i=1 Let u · xcn = in(fw ), where w = (w1 , . . . , wn ) ∈ L(a). Without loss of generality we + − may assume in(fw ) = xw , hence wn = c. Set v = xw and d = deg(u · xcn ) − deg v. Then d > 0 by the above discussion. The sum of the components of σ(w) equals Pn−1 Pn − σ(w)+ ) < deg(xσ(w) ) and i=1 wi + (− i=1 wi ) = −wn = −c < 0, hence deg(x fσ(w) = u − xdn · v. This gives that u = xdn · v + fσ(w) ∈ (xn , I(a′ )), and also that u ∈ in(xn , I(a′ )), which by our hypothesis (b) implies that u ∈ in(xn , I(a)). Since the ideal I(a) is a-homogeneous we can write u = in(xn f + f1 fz1 + · · · + fq fzq ), where z1 , . . . , zq ∈ L(a), and f, f1 , . . . , fq are a-homogeneous with dega (xn f ) = dega (f1 fz1 ) = · · · = dega (fq fzq ). We see that f 6= 0, otherwise u ∈ in(I(a)), which contradicts the fact that u · xcn is a minimal monomial generator for in(I(a)). 9 Let h = dega (u). Since f 6= 0 we get that h − an ∈ H. We may write h = h1 + λn an with λn a maximal positive integer and h1 ∈ H, i.e. h1 ∈ Ap(H, an ). Let λn−1 u1 = ϕa (h1 ) = xλ1 1 . . . xn−1 . Then the binomial f1 = u1 xλnn −u is in I(a). As u · xcn ∈ G(in(I(a))) with c > 1, we get that u ∈ / in(I(a)), hence in(f1 ) = u1 · xλnn ∈ in(I(a)). By Proposition 2.4, u1 ∈ / in(xn , I(a)), hence u1 ∈ / in(I(a)), as well. This implies that u1 · xλnn is divisible by a monomial u2 xen ∈ G(in(I(a)) with xn and u2 coprime, e > 0. Therefore u2 divides u1 , hence dega (u2 ) + h2 = dega (u1 ) for some positive h2 in H. This gives dega (u2 ) ∈ Ap(H, an ). We may write u2 · xen = in(fwe ) with w e ∈ L(a), and arguing as before we get that d′ ′ u2 = xn · v1 + fσ(w) e ∈ in(xn , I(a)) for some positive d . Thus u2 = in(xn f ′ + f1′ fz1′ + · · · + fℓ′ fzℓ′ ), where z1′ , . . . , zℓ′ ∈ L(a), and f ′ , f1′ , . . . , fq′ are a-homogeneous with dega (xn f ′ ) = dega (f1′ fz1′ ) = · · · = dega (fℓ′ fzℓ′ ). If f ′ = 0, then u2 ∈ in(I(a)), which is false since u2 · xen ∈ G(in(I(a))). On the other hand, f ′ 6= 0 implies that an + dega (f ′ ) = dega (u2 ), hence dega (u2 ) ∈ / Ap(H, an ), which is also false. Therefore xn does not divide any monomial in G(in(I(a))). This concludes the proof of the implication (b) ⇒ (a) and of the theorem.  Let Ap(H, an ) = {0, ν1 , . . . , νan −1 }. We may assume that νi ≡ i mod an for e all i. For each νi , let µi ∈ H ′ be the smallest element such that (νi , µi ) ∈ H. Note that µi ≡ −i mod an for all i. Cavalieri and Niesi [5] call Ap(H, an ) good, if {0, µ1 , . . . , µnd −1 } = Ap(H ′ , an ). As a consequence of Theorem 2.6 we obtain Corollary 2.7. (Cavaliere-Niesi, [5, Theorem 4.6]) The projective monomial curve C(a) is arithmetically Cohen-Macaulay if and only if Ap(H, an ) is good. Pn−1 Pn−1 Proof. Let νi = j=1 rj (an − aj ) j=1 rj aj with integer coefficients rj ≥ 0 and Pn−1 Pn−1 Pn−1 minimal. Then µi = j=1 rj (an − aj ). Thus µi = ( j=1 rj )an − νi with j=1 rj Pn−1 minimal and j=1 rj aj = νi . Qn−1 sj Pn−1 xj , then dega′ (ϕa (νi )) = i=1 This shows that if ϕa (νi ) = j=1 sj (an − aj ) = Pn−1 Pn−1 Pn−1 ( j=1 sj )an − j=1 sj aj = ( j=1 rj )an − νi = µi . Hence Theorem 2.6(a) ⇐⇒ (d) yields the desired conclusion.  3. A bound for the number of generators of in(I(a)), when C(a) is arithmetically Cohen-Macaulay In this section we show by examples that the number of generators of in(I(a)) may be arbitrarily large, already if a has only 3 elements. Proposition 3.1. For the integer h ≥ 2, let a = 4, 6h+1, 6h+7. Then µ(in(I(a))) = h + 2, where the initial ideal is computed with respect to the reverse lexicographic monomial order with x1 > x2 > x3 . 10 Proof. We first find I(a) using the method from [11]. For 1 ≤ i ≤ 3 we let ci be the smallest prositive integer such that (3) ci ai = rij aj + rik ak , with rij , rik nonnegative integers and {i, j, k} = {1, 2, 3}. Since a1 , a2 , a3 are pairwise coprime, it is known from [11] that the rij ’s are unique and positive, and ci = rji +rki for all {i, j, k} = {1, 2, 3}. From the equations (3h + 2)a1 = a2 + a3 and 2a3 = 3a1 + 2a2 we find c1 = 3h + 2, c3 = 2 and the corresponding rij ’s from (3). Hence c2 = 3 and 3a2 = (3h−1)a1 +a3 is the corresponding equation from (3). According to [11], the ideal I(a) is minimally generated by f1 = x3h+2 − x2 x3 , f3 = x31 x22 − x23 and g1 = x3h−1 x3 − x32 . 1 1 We introduce recursively the polynomials gi+1 = S(gi , f3 ) for 1 ≤ i ≤ h − 1. It 3(h−i)+2 2i−1 follows easily by induction that gi = x1 x3 − x2i+1 , for 1 ≤ i ≤ h. We claim 2 that (4) G = {f1 , g1 , . . . , gh , f3 } is the reduced Gröbner basis of I(a). To prove that G is a Gröbner basis we need to check that the S-pairs of elements in G reduce to zero with respect to G, see [9, Theorem 2.14]. Here are the relevant computations. G S(f1 , f3 ) = x22 − x3h−1 f3 = x3 (x32 − x3h−1 x3 ) = −x3 g1 → 0. 1 1 G S(gh , f1 ) → 0 since gcd(in(gh )), in(f1 )) = 1. G S(gh , f3 ) = x31 gh − x2h−1 f3 = x23 gh−1 → 0. 2 For 1 ≤ i ≤ h − 1 : G 2i−1 3i 2i 2 3 2 S(gi , f1 ) = x3i f1 = x2 (x2i 1 gi −x3 3 −x1 x2 ) = x2 ·(x3 −x1 x2 )·(. . . ) = x2 ·f3 ·(. . . ) → 0, and G S(gi , f3 ) = gi+1 → 0. For 1 ≤ i < j < h: 2(i+1) 3(j−i) 2(j−i) 2(j−i) 2i+1 2(j−i) 3(j−i) 3(j−i) 2j+1 x2 = x2 (x1 x2 − S(gi , gj ) = x3 gi −x1 gj = x1 x2 −x3 G 2(j−i) 2(i+1) x3 ) = x2 · f3 · (· · · ) → 0. G For 1 ≤ i < h we have that S(gi , gh ) → 0, since gcd(in(gi ), in(gh )) = 1. By inspecting the binomials in G it follows that they are in fact the reduced Gröbner basis for I(a). This shows that µ(in(I(a)) = |G| = h + 2.  Remark 3.2. The sequence dual to the one from Proposition 3.1 is a′ = 6h + 3, 6, 6h + 7. It is easy to check (using [11]) that the corresponding toric ideal is a complete intersection I(a′ ) = (x2h+1 − x21 , x31 x22 − x33 ). In particular, this shows that the image 2 through the involution σ of a minimal set of binomial generators for I(a) may no longer be a minimal generating system for I(a′ ). Arguing as in the proof of Proposition 3.1, it is routine to verify that for the reduced Gröbner basis G in (4), the set {fσ(w) : fw ∈ G} is a minimal Gröbner basis for I(a′ ). The latter set of binomials is fully interreduced, yet it is not the reduced 11 Gröbner basis for I(a′ ) since the leading coefficients of the binomials coming from g1 , . . . , gh−1 equal −1. From Theorem 2.2 we infer that C(a) is not arithmetically Cohen–Macaulay. This can also be seen from the fact that in(g1 ) = x3h−1 x3 ∈ G(in(I(a))) (as h > 1) and 1 using Theorem 1.2. If C(a) is arithmetically Cohen-Macaulay, we give an explicit bound for µ(in< (I(a))) depending on an , the largest element of the sequence a. To prove this we first show Lemma 3.3. Let n ≥ 2 and I ⊂ S = K[x1 , . . . , xn ] be a graded ideal with mk ⊂ I, where m = (x1 , .. . , xn ). Let < be a monomial order on S. Then µ(I) ≤ µ(in< (I)) ≤  n+k−1 µ(mk ) = n+k−1 , and µ(I) = if and only if I = mk . n−1 n−1 Proof. It suffices to show that for a monomial ideal J ⊂ S with mk ⊂ J, one has µ(J) ≤ µ(mk ), and µ(J) = µ(mk ), if and only if J = mk . We prove this by induction on k − a, where a is the least degree of a monomial generator of J. If a = k, the assertion is trivial. Suppose now that a < k. We denote by G(J) the unique minimal set of monomial generators of J, and set G(J)j = {u ∈ G(J) : deg u = j} for all j, and let J ′ = mJa + J≥a+1 , where J≥a+1 = (u ∈ J : deg u ≥ a + 1). Then G(J ′ )j = 0 for j < a + 1 and mk ⊂ J ′ . Therefore, by our induction hypothesis, we have µ(J ′ ) ≤ µ(mk ). On the other hand, G(J ′ )a+1 is the disjoint union of G(mJ)a+1 and G(J)a+1 . Furthermore, G(J ′ )j = G(J)j for j > a + 1. Hence, since |G(J)a | < |G(mJ)a+1 |, it follows that µ(J) = |G(J)| < |G(J ′ )| = µ(J ′ ) ≤ µ(mk ), as desired.  Proposition 3.4. Suppose that the monomial curve C(a) is arithmetically Cohen– an . Macaulay. Then µ(in(I(a)) ≤ n−2 Proof. As before we assume that a = a1 , . . . , an with an > ai for all i, and we let H be the numerical semigroup generated by a. Then I(a) ⊂ S = K[x1 , . . . , xn ] and G(in< (I(a)) ⊂ S̄ = K[x1 , . . . , xn−1 ], by Theorem 1.2. Therefore, length(S̄/ in< (I(a)) = length(S/(xn , in< (I(a)))) = length(S/(xn , I(a))) = length(K[H]/(tan )) = an . Let k be the smallest number such that (x1 , . . . , xn−1 )k ⊂ in< (I(a)). Then an = k−1 X dimK (S̄/ in< (I(a))j = 1 + (n − 1) + j=0 k−1 X dimK (S̄/ in< (I(a))j j=2 ≥ 1 + (n − 1) + (k − 2) = (n − 2) + k. Thus, k ≤ (n  − 1) + 1, and hence by Lemma 3.3 we get µ(in< (I(a))) ≤  an − (n−1)+k−1 an  ≤ n−2 . n−2 4. Applications In this section we use the criteria in Theorem 1.2 to test the arithmetically CohenMacaulay property for two families of projective monomial curves. 12 4.1. Bresinsky semigroups. In [3] Bresinsky introduced the semigroup Bh = h(2h − 1)2h, (2h − 1)(2h + 1), 2h(2h + 1), 2h(2h + 1) + 2h − 1i, where h ≥ 2. He showed that the toric ideal IBh ⊂ S = K[x, y, z, t] is minimally generated by more than 2h binomials. Based on that, in [13, Section 3.3] it is proved that F = {xt−yz}∪{z i−1 t2h−i −xi+1 y 2h−i : 1 ≤ i ≤ 2h}∪{x2h+1−j z j −y 2h−j tj : 0 ≤ j ≤ 2h−2} is a minimal generating set for IBh . Combining the generators corresponding to i = 2h and j = 1 we get that u = −z(z 2h−1 − x2h+1 ) − x(x2h z − y 2h−1t) = xy 2h−1 t − z 2h ∈ IBh , hence in(u) = xy 2h−1 t ∈ in(IBh ), where one uses the reverse lexicographic monomial order with x > y > z > t. If the projective monomial curve associated to Bh were Cohen-Macaulay, then, as the generators of Bh above are listed increasingly, by Theorem 1.2 we obtain that xy 2h−1 ∈ in(IBh ). The ideal IBh is generated by binomials with disjoint support, hence in the reduced Gröbner basis of IBh there exists v = xy d − z α tβ with in(v) = xy d , 0 < d ≤ 2h − 1 and α, β nonnegative integers. We denote a1 , . . . , a4 the generators of Bh in the given order. Since a1 < a2 < a3 < a4 we have (d + 1)a2 > a1 + da2 = αa3 + βa4 > (α + β)a2 , hence α + β ≤ 2h − 1. If α + β = 2h − 1, after adding to v the binomial z α tβ − y β xα+2 from the given minimal generating set of IBh , we obtain that xy d − xα+2 y β ∈ IBh . Thus β ≤ d and y d−β − xα+1 ∈ IBh , which is false, since d < 2h and one can see from F that 2h · a2 is the smallest positive multiple of a2 which is in the semigroup generated by a1 , a3 , a4 . Thus α + β < 2h − 1. If we denote I¯ = IBh mod x ⊂ K[y, z, t], then given F it follows that I¯ = (yz) + (t, z)2h−1 + y 2(y, t)2h−1. It is easy to see that the monomial ¯ which is a contradiction. v̄ = z α tβ is not in I, Therefore, we proved the following proposition, which was first obtained by Cavaliere and Niesi in [5, Remark 5.4], as an application of their criterion from Corollary 2.7. Proposition 4.1. (Cavaliere and Niesi, [5]) The projective monomial curve associated to Bh is not arithmetically Cohen-Macaulay, for any h ≥ 2. 4.2. Arslan semigroups. For h ≥ 2, let Ah = hh(h + 1), h(h + 1) + 1, (h + 1)2 , (h + 1)2 + 1i. This family of numerical semigroups was studied by Arslan who shows in [1, Proposition 3.2] that the defining ideal of K[Ah ] is (5) IAh = (xh−i z i+1 − y h−i+1ti : 0 ≤ i < h)+ (xi+1 y h−i − z i th−i : 0 ≤ i ≤ h) + (xt − yz). Proposition 4.2. The projective monomial curve associated to Ah is aritmetically Cohen-Macaulay, for any h ≥ 2. 13 Proof. Letting gi = xh−i z i+1 − y h−i+1ti for 0 ≤ i ≤ h, fi = xi+1 y h−i − z i th−i for 0 ≤ i ≤ h and f = xt − yz, we claim that G = {g0 , . . . , gh , f0 , . . . , fh , f } is the reduced Gröbner basis of IAh with respect to the reverse lexicographic term order with x > y > z > t. As a consequence, by inspecting the leading monomials we may use Theorem 1.2 to conclude the following statement. We show that all the S-pairs of binomials in G reduce to 0 with respect to G, and consequently by Buchberger’s criterion ([9, Theorem 2.14]) it follows that G is a Gröbner basis for IAh . G S(g0 , f ) = zg0 + y h f = xh z 2 − xy h t = xg1 → 0. For 1 ≤ i ≤ h: G S(gi , f ) = ygi − xh−i z i f = xh−i+1 z i t − y h−i+2ti = tgi−1 → 0. For 0 ≤ i < h: G S(fi , f ) = zfi − xi+1 y h−i−1f = xi+2 y h−i−1t − z i+1 th−i = tfi+1 → 0. G Also, S(fh , f ) → 0 since gcd(in(fh ), in(f )) = gcd(xh+1 , yz) = 1. For 1 ≤ i ≤ h: G S(gi , g0 ) → 0 since gcd(in(gi ), in(g0 )) = 1. For 0 ≤ i ≤ h: S(fi , g0 ) = y i+1fi + xi+1 g0 = xh+i+1 z − y i+1 z i th−i = xi (xh+1 − z h )z + z i (xi z h−i+1 − G y i+1 th−i ) = xi zfa + z i gh−i → 0. For 0 ≤ j < i ≤ h: S(gj , gi ) = z i−j gj − xi−j gi = y h−j+1z i−j tj − xi−j y h−i+1ti = y h−i+1tj (y i−j z i−j − G xi−j ti−j ) = y h−i+1tj · f · (. . . ) → 0. For 1 ≤ i ≤ a, 0 ≤ j ≤ a with i ≤ h − j − 1, i.e. i + j < h: S(fj , gi ) = xh−i−j−1z i+1 fj −y h−j gi = y 2h−i−j+1ti −xh−i−j−1 z i+j+1 th−j = y h−i−j ti (y h+1− G xh z) + xh−i−j−1 zti (xi+j+1 y h−i−j − z j+i th−j−i ) = −ti y h−i−j g0 + xh−i−j−1zti fi+j → 0. For 1 ≤ i ≤ a, 0 ≤ j ≤ a with i > h − j − 1, i.e. i + j ≥ h: S(fj , gi ) = z i+1 fj − xi+j+1−h y h−j gi = xi+j+1−h y 2h−i−j+1ti − z i+j+1 th−j = G yti (xi+j+1−h y 2h−i−j −z i+j−h t2h−i−j )+z i+j−h th−j (yth −z h+1 ) = yti fi+j−h +z i+j−h th−j gh → 0. For 0 ≤ j < i ≤ a: S(fj , fi ) = xi−j fj − y i−j fi = y i−j z i th−i − xi−j z j th−j = z j th−i (y i−j z i−j − xi−j ti−j ) = G z j th−i (yz − xt) · (. . . ) = z j th−i · f · (. . . ) → 0.  Acknowledgement. We gratefully acknowledge the use of the Singular ([8]) software for our computations. Dumitru Stamate was supported by the University of Bucharest, Faculty of Mathematics and Computer Science, through the 2017 Mobility Fund. References [1] F. Arslan, Cohen-Macaulayness of tangent cones, Proc. Amer. Math. Soc. 128 (1999), 2243– 2251. 14 [2] F. Arslan, P. Mete, M. Şahin, Gluing and Hilbert functions of monomial curves, Proc. Amer. Math. Soc. 137 (2009), 2225–2232. [3] H. Bresinsky, On prime ideals with generic zero xi = tni , Proc. Amer. Math. Soc. 47 (1975), 329–332. [4] H. Bresinsky, P. Schenzel, W. Vogel, On Liaison, Arithmetical Buchsbaum Curves and Monomial Curves in P3 , J. Algebra 86 (1984), 283–301. [5] M.P. Cavaliere, G. Niesi, On monomial curves and Cohen-Macaulay type, Manuscripta math. 42 (1983), 147–159. [6] M. Cimpoeaş, D.I. Stamate, Gröbner–nice pairs of ideals, in preparation. [7] D. Cox, J. Little, D. O’Shea, Ideals, Varieties, and Algorithms, Third Edition, Springer, 2007. [8] W. Decker, G.-M. Greuel, G. Pfister, H. Schönemann, Singular 3-1-6 — A computer algebra system for polynomial computations. http://www.singular.uni-kl.de (2012). [9] V. Ene, J. Herzog, Gröbner bases in commutative algebra, Graduate Studies in Mathematics 130, American Mathematical Society, 2012. [10] S. Goto, N. Suzuki, K.-i Watanabe, On affine semigroup rings, Japan J. Math. 2 (1976), 1–12. [11] J. Herzog, Generators and relations of Abelian semigroups and semigroup rings, Manuscripta Math. 3 (1970), 175–193. [12] J. Herzog, T. Hibi, Monomial Ideals, Graduate Texts in Mathematics 260, Springer–Verlag, London, 2011. [13] J. Herzog, D.I. Stamate, On the defining equations of the tangent cone of a numerical semigroup ring, J. Algebra 418 (2014), 8–28. [14] Y. Kamoi, Defining ideals of Cohen-Macaulay semigroup rings, Comm. Alg. 20 (1992), 3163– 3189. [15] Y. Kamoi, Defining ideals of Buchsbaum semigroup rings, Nagoya Math. J. 136 (1994), 115– 131. [16] M. Morales, N. Thi Dung, Gröbner basis, a “pseudo-polynomial” algorithm for computing the Frobenius number, Preprint 2015, arXiv:1510.01973 [math.AC]. [17] B.H. Roune, Solving thousand-digit Frobenius problems using Gröbner bases, J. Symb. Comput. 43 (2008), 1–7. [18] T. Vu, Periodicity of Betti numbers of monomial curves, J. Algebra 418 (2014), 66–90. Jürgen Herzog, Fachbereich Mathematik, Universität Duisburg-Essen, Campus Essen, 45117 Essen, Germany E-mail address: [email protected] Dumitru I. Stamate, Faculty of Mathematics and Computer Science, University of Bucharest, Str. Academiei 14, Bucharest – 010014, Romania E-mail address: [email protected] 15
0math.AC
ON FEEBLY COMPACT SEMITOPOLOGICAL SYMMETRIC INVERSE SEMIGROUPS OF A BOUNDED FINITE RANK arXiv:1708.02064v2 [math.GR] 30 Jan 2018 OLEG GUTIK Abstract. We study feebly compact shift-continuous T1 -topologies on the symmetric inverse semigroup Iλn of finite transformations of the rank 6 n. For any positive integer n > 2 and any infinite cardinal λ a Hausdorff countably pracompact non-compact shift-continuous topology on Iλn is constructed. We show that for an arbitrary positive integer n and an arbitrary infinite cardinal λ for a T1 -topology τ on Iλn the following conditions are equivalent: (i) τ is countably pracompact; (ii) τ is feebly compact; (iii) τ is d-feebly compact; (iv) (Iλn , τ ) is H-closed; (v) (Iλn , τ ) is Nd -compact for the discrete countable space Nd ; (vi) (Iλn , τ ) is R-compact; (vii) (Iλn , τ ) is infra H-closed. Also we prove that for an arbitrary positive integer n and an arbitrary infinite cardinal λ every shift-continuous semiregular feebly compact T1 -topology τ on Iλn is compact. We follow the terminology of [6, 7, 8, 26, 27]. If X is a topological space and A ⊆ X, then by clX (A) and intX (A) we denote the topological closure and interior of A in X, respectively. By |A| we denote the cardinality of a set A, by A△B the symmetric difference of sets A and B, by N the set of positive integers, and by ω the first infinite cardinal. A semigroup S is called inverse if every a in S possesses an unique inverse a−1 , i.e. if there exists an unique element a−1 in S such that aa−1 a = a a−1 aa−1 = a−1 . and A map which associates to any element of an inverse semigroup its inverse is called the inversion. A topological (inverse) semigroup is a topological space together with a continuous semigroup operation (and an inversion, respectively). Obviously, the inversion defined on a topological inverse semigroup is a homeomorphism. If S is a semigroup (an inverse semigroup) and τ is a topology on S such that (S, τ ) is a topological (inverse) semigroup, then we shall call τ a semigroup (inverse) topology on S. A semitopological semigroup is a topological space together with a separately continuous semigroup operation. If S is a semigroup (an inverse semigroup) and τ is a topology on S such that (S, τ ) is a semitopological semigroup (with continuous inversion), then we shall call τ a shift-continuous (inverse) topology on S. If S is a semigroup, then by E(S) we denote the subset of all idempotents of S. On the set of idempotents E(S) there exists a natural partial order: e 6 f if and only if ef = f e = e. A semilattice is a commutative semigroup of idempotents. A topological (semitopological) semilattice is a topological space together with a continuous (separately continuous) semilattice operation. If S is a semilattice and τ is a topology on S such that (S, τ ) is a topological semilattice, then we shall call τ a semilattice topology on S. Every inverse semigroup S admits a partial order: a4b if and only if there exists e ∈ E(S) such that a = eb. We shall say that 4 is the natural partial order on S. Let λ be an arbitrary non-zero cardinal. A map α from a subset D of λ into λ is called a partial transformation of λ. In this case the set D is called the domain of α and is denoted by dom α. The image of an element x ∈ dom α under α is denoted by xα Also, the set {x ∈ λ : yα = x for some y ∈ Y } is called the range of α and is denoted by ran α. The cardinality of ran α is called the rank of α and is Date: January 31, 2018. 2010 Mathematics Subject Classification. Primary 22A15, 54D45, 54H10; Secondary 54A10, 54D30, 54D40. Key words and phrases. Semigroup, inverse semigroup, semitopological semigroup, compact, countably compact, countably pracompact, feebly compact, H-closed, infra H-closed, X-compact, semiregular space. 1 2 OLEG GUTIK denoted by rank α. For convenience we denote by ∅ the empty transformation, a partial mapping with dom ∅ = ran ∅ = ∅. Let Iλ denote the set of all partial one-to-one transformations of λ together with the following semigroup operation: x(αβ) = (xα)β if x ∈ dom(αβ) = {y ∈ dom α : yα ∈ dom β}, for α, β ∈ Iλ . The semigroup Iλ is called the symmetric inverse semigroup over the cardinal λ (see [7]). The symmetric inverse semigroup was introduced by V. V. Wagner [29] and it plays a major role in the theory of semigroups. Put Iλn = {α ∈ Iλ : rank α 6 n}, for n = 1, 2, 3, . . .. Obviously, Iλn (n = 1, 2, 3, . . .) are inverse semigroups, Iλn is an ideal of Iλ , for each n = 1, 2, 3, . . .. The semigroup Iλn is called the symmetric inverse semigroup of finite transformations of the rank 6 n. By   x1 x2 · · · xn y1 y2 · · · yn we denote a partial one-to-one transformation which maps x1 onto y1 , x2 onto y2 , . . ., and xn onto yn . Obviously, in such case we have xi 6= xj and yi 6= yj for i 6= j (i, j = 1, 2, 3, . . . , n). The empty partial map ∅ : λ ⇀ λ is denoted by 0. It is obvious that 0 is zero of the semigroup Iλn . Let λ be a non-zero cardinal. On the set Bλ = (λ ×λ) ∪{0}, where 0 ∈ / λ ×λ, we define the semigroup operation “ · ” as follows  (a, d), if b = c; (a, b) · (c, d) = 0, if b 6= c, and (a, b) · 0 = 0 · (a, b) = 0 · 0 = 0 for a, b, c, d ∈ λ. The semigroup Bλ is called the semigroup of λ × λ-matrix units (see [7]). Obviously, for any cardinal λ > 0, the semigroup of λ × λ-matrix units Bλ is isomorphic to Iλ1 . A subset A of a topological space X is called regular open if intX (clX (A)) = A. We recall that a topological space X is said to be • functionally Hausdorff if for every pair of distinct points x1 , x2 ∈ X there exists a continuous function f : X → [0, 1] such that f (x1 ) = 0 and f (x2 ) = 1; • semiregular if X has a base consisting of regular open subsets; • quasiregular if for any non-empty open set U ⊂ X there exists a non-empty open set V ⊂ U such that clX (V ) ⊆ U; • compact if each open cover of X has a finite subcover; • sequentially compact if each sequence {xi }i∈N of X has a convergent subsequence in X; • countably compact if each open countable cover of X has a finite subcover; • H-closed if X is a closed subspace of every Hausdorff topological space in which it is contained; • infra H-closed provided that any continuous image of X into any first countable Hausdorff space is closed (see [20]); • countably compact at a subset A ⊆ X if every infinite subset B ⊆ A has an accumulation point x in X; • countably pracompact if there exists a dense subset A in X such that X is countably compact at A; • feebly compact if each locally finite open cover of X is finite; • d-feebly compact (or DFCC ) if every discrete family of open subsets in X is finite (see [24]); • pseudocompact if X is Tychonoff and each continuous real-valued function on X is bounded; • Y -compact for some topological space Y , if f (X) is compact, for any continuous map f : X → Y . According to Theorem 3.10.22 of [8], a Tychonoff topological space X is feebly compact if and only if X is pseudocompact. Also, a Hausdorff topological space X is feebly compact if and only if every locally finite family of non-empty open subsets of X is finite. Every compact space and every sequentially compact space are countably compact, every countably compact space is countably pracompact, every ON FEEBLY COMPACT SEMITOPOLOGICAL SYMMETRIC INVERSE SEMIGROUPS OF ... 3 countably pracompact space is feebly compact (see [3]), every H-closed space is feebly compact too (see [15]). Also, every space feebly compact is infra H-closed by Proposition 2 and Theorem 3 of [20]. Topological properties of an infinite (semi)topological semigroup λ × λ-matrix units were studied in [12, 13, 14]. In [13] it was shown that on the infinite semitopological semigroup λ × λ-matrix units Bλ there exists a unique Hausdorff topology τc such that (Bλ , τc ) is a compact semitopological semigroup and it was also shown that every pseudocompact Hausdorff shift-continuous topology τ on Bλ is compact. Also, in [13] it was proved that every non-zero element of a Hausdorff semitopological semigroup λ × λmatrix units Bλ is an isolated point in the topological space Bλ . In [12] it was shown that the infinite semigroup λ × λ-matrix units Bλ cannot be embedded into a compact Hausdorff topological semigroup, every Hausdorff topological inverse semigroup S that contains Bλ as a subsemigroup, contains Bλ as a closed subsemigroup, i.e., Bλ is algebraically complete in the class of Hausdorff topological inverse semigroups. This result in [11] was extended onto so called inverse semigroups with tight ideal series and, as a corollary, onto the semigroup Iλn . Also, in [16] it was proved that for every positive integer n the semigroup Iλn is algebraically h-complete in the class of Hausdorff topological inverse semigroups, i.e., every homomorphic image of Iλn is algebraically complete in the class of Hausdorff topological inverse semigroups. In the paper [17] this result was extended onto the class of Hausdorff semitopological inverse semigroups and it was shown therein that for an infinite cardinal λ the semigroup Iλn admits a unique Hausdorff topology τc such that (Iλn , τc ) is a compact semitopological semigroup. Also, it was proved in [17] that every countably compact Hausdorff shift-continuous topology τ on Bλ is compact. In [14] it was shown that a topological semigroup of finite partial bijections Iλn with a compact subsemigroup of idempotents is absolutely H-closed (i.e., every homomorphic image of Iλn is algebraically complete in the class of Hausdorff topological semigroups) and any countably compact topological semigroup does not contain Iλn as a subsemigroup for infinite cardinal λ. In [14] there were given sufficient conditions onto a topological semigroup Iλ1 to be non-H-closed. Also in [10] it was proved that an infinite semitopological semigroup of λ × λ-matrix units Bλ is H-closed in the class of semitopological semigroups if and only if the space Bλ is compact. For an arbitrary positive integer n and an arbitrary non-zero cardinal λ we put expn λ = {A ⊆ λ : |A| 6 n} . It is obvious that for any positive integer n and any non-zero cardinal λ the set expn λ with the binary operation ∩ is a semilattice. Later in this paper by expn λ we shall denote the semilattice (expn λ, ∩). It is easy to see that expn λ is isomorphic to the subsemigroup of idempotents (the band) of the semigroup Iλn for any positive integer n. We observe that for every positive integer n the band of the semigroup Iλn is isomorphic to the semilattice expn λ by the mapping E(Iλn ) ∋ ε 7→ dom ε. In the paper [18] feebly compact shift-continuous topologies τ on the semilattice expn λ were studied, and all compact semilattice topologies on expn λ were described. In [18] it was whown that for an arbitrary positive integer n and an arbitrary infinite cardinal λ for a T1 -topology τ on expn λ the following conditions are equivalent: (i) (expn λ, τ ) is a compact topological semilattice; (ii) (expn λ, τ ) is a countably compact topological semilattice; (iii) (expn λ, τ ) is a feebly compact topological semilattice; (iv) (expn λ, τ ) is a compact semitopological semilattice; (v) (expn λ, τ ) is a countably compact semitopological semilattice. Also, in [18] there was constructed a countably pracompact H-closed quasiregular non-semiregular topology τfc2 such that (exp2 λ, τfc2 ) is a semitopological semilattice with the discontinuous semilattice operation and it was proved that for an arbitrary positive integer n and an arbitrary infinite cardinal λ a semiregular feebly compact semitopological semilattice expn λ is a compact topological semilattice. In [19] it was shown that for an arbitrary positive integer n and an arbitrary infinite cardinal λ for a T1 -topology τ on expn λ the following conditions are equivalent: (i) τ is countably pracompact; (ii) τ is feebly compact; (iii) τ is d-feebly compact; (iv) (expn λ, τ ) is an H-closed space. This paper is a continuation of [11, 13, 16, 17]. We study feebly compact shift-continuous T1 -topologies on the semigroup Iλn . For any positive integer n > 2 and any infinite cardinal λ a Hausdorff countably pracompact non-compact shift-continuous topology on Iλn is constructed. We show that for an arbitrary positive integer n and an arbitrary infinite cardinal λ for a T1 -topology τ on Iλn the following conditions 4 OLEG GUTIK are equivalent: (i) τ is countably pracompact; (ii) τ is feebly compact; (iii) τ is d-feebly compact; (iv) (Iλn , τ ) is H-closed; (v) (Iλn , τ ) is Nd -compact for the discrete countable space Nd ; (vi) (Iλn , τ ) is Rcompact; (vii) (Iλn , τ ) is infra H-closed. Also we prove that for an arbitrary positive integer n and an arbitrary infinite cardinal λ every shift-continuous semiregular feebly compact T1 -topology τ on Iλn is compact. Later we shall assume that n is an arbitrary positive integer. For every element α of the semigroup Iλn we put   ↑l α = β ∈ Iλn : αα−1 β = α and ↑r α = β ∈ Iλn : βα−1α = α . Then Proposition 5 of [17] implies that ↑l α = ↑r α and by Lemma 6 of [23, Section 1.4] we have that α 4 β if and only if β ∈ ↑l α for α, β ∈ Iλn . Hence we put ↑4 α = ↑l α = ↑r α for any α ∈ Iλn . The definition of the semigroup operation of Iλn implies the following trivial lemma. Lemma 1. Let n be an arbitrary positive integer and λ be any cardinal. Then for any elements α and β of the semigroup Iλn the sets αIλn β and ↓4 α = {γ ∈ Iλn : γ 4 α} are finite. Proof. For any elements α and β of Iλn we have that αIλn β = αIλn ∩ Iλn β = {γ ∈ Iλn : dom γ ⊆ dom α and ran γ ⊆ ran β} . Since the sets dom α and ran β are finite, αIλn β is finite, as well. For every γ ∈ ↓4 α the definition of the natural partial order 4 on the semigroup Iλn (see [23, Chapter 1]) implies that the finite partial map γ is a restriction of the finite partial map α onto the set A = dom α ∩ dom ε, where ε is an idempotent of Iλn such that γ = εα. This implies that the set ↓4 α is finite.  Lemma 2. Let n be an arbitrary positive integer, λ be any infinite cardinal and τ be a shift-continuous T1 -topology on semigroup Iλn . Then for every element α of the semigroup Iλn the set ↑4 α is open-andclosed in (Iλn , τ ), the space (Iλn , τ ) is functionally Hausdorff and hence it is quasi-regular. Proof. Fix an arbitrary α ∈ Iλn . Then α ∈ αIλn α and αIλn α = αIλn ∩ Iλn α = αα−1 Iλn ∩ Iλn α−1 α = αα−1 Iλn α−1 α, because Iλn is an inverse semigroup. Since the topology τ is T1 , Lemma 1 implies that the set (αIλn α) \ {α} is closed in (Iλn , τ ). By the separate continuity of the semigroup operation in (Iλn , τ ) we have that there exists an open neighbourhood U(α) of the point α in (Iλn , τ ) such that αα−1 · U(α) · α−1 α ⊆ Iλn \ ((αIλn ∪ Iλn α) \ {α}) . The last inclusion implies that U(α) ⊆ ↑α. Again, since the semigroup operation in (Iλn , τ ) is separately continuous the set ↑4 α is open in (Iλn , τ ) as a full preimage of U(α) and the set ↑4 α is closed in (Iλn , τ ) as a full preimage of the singleton set {α}. Fix arbitrary distinct elements α and β of the semigroup Iλn . Then either α and β are comparable or not with respect to the natural partial order on Iλn . If α 4 β or α and β are incomparable in (Iλn , 4) then it is obvious that the map g : Iλn → [0, 1] defined by the formula  1, if γ ∈ ↑4 β; (γ)f = 0, if γ ∈ / ↑4 β is continuous. We observe that quasi-regularity of (Iλn , τ ) follows from the fact that every non-empty open subset U of (Iλn , τ ) contains a maximal element δ with respect to the natural partial order 4 on Iλn such that ↑4 α is an open-and-closed subset of (Iλn , τ ) and hence, since τ is a T1 -topology, {α} ⊆ U is an open-and-closed subset of (Iλn , τ ).  A topological space X is called ON FEEBLY COMPACT SEMITOPOLOGICAL SYMMETRIC INVERSE SEMIGROUPS OF ... 5 • totally disconnected if the connected components in X are singleton sets; • scattered if X does not contain non-empty dense in itself subset, which is equivalent that every non-empty subset of X has an isolated point in itself. Lemma 2 implies the following corollary: Corollary 3. Let n be an arbitrary positive integer, λ be any infinite cardinal and τ be a shift-continuous T1 -topology on the semigroup Iλn . Then (Iλn , τ ) is a totally disconnected scattered space. A partial order ≤ on a topological space X is called closed if the relation ≤ is a closed subset of X × X in the product topology. In this case (X, ≤) is called a pospace [9]. Lemma 2 and Proposition VI-1.4 from [9] imply the following corollary: Corollary 4. Let n be an arbitrary positive integer, λ be any infinite cardinal and τ be a shift-continuous T1 -topology on semigroup Iλn . Then (Iλn , τ, 4) is a pospace The following example shows that the statement of Lemma 2 does not hold in the case when (Iλn , τ ) is a T0 -space. Example 5. For an arbitrary positive integer n and an arbitrary infinite cardinal λ we define a topology τ0 on Iλn in the following way: (i) all non-zero elements of the semigroup Iλn are isolated points in (Iλn , τ0 ); and (ii) Iλn is the unique open neighbourhood of zero in (Iλn , τ0 ). Simple verifications show that the semigroup operation and inversion on (Iλn , τ0 ) are continuous. We need the following example from [17]. Example 6 ([17]). Fix an arbitrary positive integer n. The following family  Bc = Uα (α1 , . . . , αk ) = ↑4 α \ (↑4 α1 ∪ · · · ∪ ↑4 αk ) : αi ∈ ↑4 α \ {α}, α, αi ∈ Iλn , i = 1, . . . , k determines a base of the topology τc on Iλn . By Proposition 10 from [17], (Iλn , τc ) is a Hausdorff compact semitopological semigroup with continuous inversion. By Theorem 7 from [17], for an arbitrary infinite cardinal λ and any positive integer n every countably compact Hausdorff semitopological semigroup Iλn is topologically isomorphic to (Iλn , τc ). By Corollary 3 the topological space (Iλn , τc ) is scattered. Since every countably compact scattered T3 -space is sequentially compact (see [28, Theorem 5.7]), (Iλn , τc ) is a sequentially compact space. Next we summarise the above results in the following theorem. Theorem 7. Let n be an arbitrary positive integer, λ be any infinite cardinal and τ be a T1 -shift continuous topology on the semigroup Iλn . Then the following conditions are equivalent: (i) τ is compact; (ii) τ = τc ; (iii) τ is countably compact; (iv) τ is sequentially compact. Since every feebly compact Hausdorff topology on the semigroup Iλ1 is compact, it is natural to ask: Does there exist a shift-continuous Hausdorff non-compact feebly compact topology τ on the semigroup Iλn for n > 2? The following example shows that for any infinite cardinal λ and any positive integer n > 2 there exists a Hausdorff feebly compact topology τ on the semigroup Iλn such that (Iλn , τ ) is a non-compact semitopological semigroup. Example 8. Let λ be any infinite cardinal and τc2 = τc be the topology on the semigroup Iλ2 which is defined in Example 6. We construct a stronger topology τfc2 on Iλ2 then τc2 in the following way. By π : λ → Iλ2 : a 7→ εa we denote the map which assigns to any element a ∈ λ the identity partial map 6 OLEG GUTIK εa : {a} → {a}. Fix an arbitrary infinite subset A of λ. For every non-zero element x ∈ Iλ2 we assume that the base Bfc2 (x) of the topology τfc2 at the point x coincides with the base of the topology τc2 at x, and  Bfc2 (0) = UB (0) = U(0) \ ((B)π ∪ {α1 , . . . , αs }) : U(0) ∈ Bc2 (0), α1, . . . , αs ∈ Iλ2 \ {0} and B ⊆ λ such that |A△B| < ∞} form a base of the topology τfc2 at zero 0 of the semigroup Iλ2 . Simple verifications show that the family {Bfc2 (x) : x ∈ Iλ2 } satisfies conditions (BP1)–(BP4) of [8], and hence τfc2 is a Hausdorff topology on Iλ2 . Proposition 9. Let λ be an arbitrary infinite cardinal. Then (Iλ2 , τfc2 ) is a countably pracompact semitopological semigroup with continuous inversion. Proof. It is obvious that the inversion in (Iλ2 , τfc2 ) is continuous and later we shall show that all translations in (Iλ2 , τfc2 ) are continuous maps. We consider the following possible cases. (1) 0 · 0 = 0. For every basic open neighbourhood UB (0) of zero in (Iλ2 , τfc2 ) we have that UB (0) · 0 = 0 · UB (0) = {0} ⊂ Uπ (0). (2) α · 0 = 0. For all basic open neighbourhoods UB (0) and Uα (β1 , . . . , βk ) of zero and an element α 6= 0 in (Iλ2 , τfc2 ), respectively, we have that Uα (β1 , . . . , βk ) · 0 = {0} ⊂ UB (0). Iλ2 Let VB (0) = \ (↑4 α1 ∪ · · · ∪ ↑4 αk ∪ (B)π) be an arbitrary basic neighbourhood of zero in (Iλ2 , τfc2 ). Without loss of generality we may assume that rank α1 = . . . = rank αk = 1 6 rank α. Put  Cl = γ ∈ Iλ2 : rank γ = 1 such that αγ = αi for some i = 1, . . . , k or αγ ∈ E(Iλ2 ) \ {0} . The definition of the semigroup Iλ2 implies that the set Cl is finite. Then we have that α·WB (0) ⊆ VB (0)  S ↑4 γ : γ ∈ Cl . for WB (0) = Iλ2 \ (3) 0 ·α = 0. For all basic open neighbourhoods UB (0) and Uα (β1 , . . . , βk ) of zero and an element α 6= 0 in (Iλ2 , τfc2 ), respectively, we have that 0 ·Uα (β1 , . . . , βk ) = {0} ⊂ UB (0). Iλ2 Let VB (0) = \ (↑4 α1 ∪ · · · ∪ ↑4 αk ∪ (B)π) be an arbitrary basic neighbourhood of zero in (Iλ2 , τfc2 ). Without loss of generality we may assume that rank α1 = . . . = rank αk = 1 6 rank α. Put  Cr = γ ∈ Iλ2 : rank γ = 1 such that γα = αi for some i = 1, . . . , k or γα ∈ E(Iλ2 ) \ {0} . The definition of the Iλ2 implies that the set Cr is finite. Then we have that WB (0)·α ⊆ VB (0)  S semigroup 2 ↑4 γ : γ ∈ Cr . for WB (0) = Iλ \ (4) α · β = γ 6= 0 and rank α = rank β = rank γ, i.e., ran α = dom β. Then for any open neighbourhoods Uα (α1 , . . . , αk ), Uβ (β1 , . . . , βn ), Uγ (γ1 , . . . , γm ) of the points α, β and γ in (Iλ2 , τfc2 ), respectively, we have that Uα (α1 , . . . , αk ) · β = α · Uβ (β1 , . . . , βn ) = {γ} ⊆ Uγ (γ1 , . . . , γm). (5) α · β = γ 6= 0 and rank α = rank γ = 1 and rank β = 2, i.e., ran α $ dom β. Then for any open neighbourhoods Uβ (β1 , . . . , βn ) and Uγ (γ1 , . . . , γm ) of the points β and γ in (Iλ2 , τfc2 ), respectively, we have that α · Uβ (β1 , . . . , βn ) = {γ} ⊆ Uγ (γ1 , . . . , γm). ON FEEBLY COMPACT SEMITOPOLOGICAL SYMMETRIC INVERSE SEMIGROUPS OF ... 7 Let Uγ (γ1 , . . . , γk ) be an arbitrary open neighbourhood of the point γ in (Iλ2 , τfc2 ) for some γ1 , . . . , γk ∈ ↑4 γ, i.e., rank γ1 = . . . = rank γk = 2. Put  Q = δ ∈ ↑4 α : δβ ∈ {γ1 , . . . , γk } . The definition of the semigroup Iλ2 implies that the set Q is finite. Then we have that Uα (Q) · β ⊆ Uγ (γ1 , . . . , γk )  for Uα (Q) = ↑4 α \ δ ∈ ↑4 α : δ ∈ Q . (6) α · β = γ 6= 0 and rank β = rank γ = 1 and rank α = 2, i.e., dom β $ ran α. In this case the proof of separate continuity of the semigroup operation on (Iλ2 , τfc2 ) is dual to case (5). (7) α · β = γ 6= 0, rank γ = 1 and rank α = rank β = 2. Then α and β are isolated points in (Iλ2 , τfc2 ) and hence α · β = γ ⊆ Uγ (γ1 , . . . , γk ), for any basic open neighbourhood Uγ (γ1 , . . . , γk ) of γ in (Iλ2 , τfc2 ). (8) α · β = 0. Then dom β ∩ ran α = ∅ and hence Uα (α1 , . . . , αk ) · β = α · Uβ (β1 , . . . , βn ) = {0} ⊂ UB (0), for any basic open neighbourhoods Uα (α1 , . . . , αk ), Uβ (β1 , . . . , βn ) and UB (0) of α, β and zero 0 in (Iλ2 , τfc2 ), respectivelly. Thus we have shown that the translations in (Iλ2 , τfc2 ) are continuous maps. Also, the definition of the topology τfc2 on Iλ2 implies that the set Iλ2 \ Iλ1 is dense in (Iλ2 , τfc2 ) and every infinite subset of Iλ2 Iλ1 has an accumulation point in (Iλ2 , τfc2 ), and hence the space (Iλ2 , τfc2 ) is countably pracompact.  Proposition 10. Let n be an arbitrary positive integer and λ be an arbitrary infinite cardinal. Then for every d-feebly compact shift-continuous T1 -topology τ on Iλn the subset Iλn \ Iλn−1 is dense in (Iλn , τ ). Proof. Since every quasi-regular d-feebly compact space is feebly compact (see [19, Theorem 2]), by Lemma 2 the topology τ is feebly compact. Suppose to the contrary that there exists a feebly compact shift-continuous T1 -topology τ on Iλn in (Iλn , τ ). Then there exists a point α ∈ Iλn−1 of the space (Iλn , τ ) such that Iλn \ Iλn−1 is not dense  n−1 . This implies that there exists an open neighbourhood U(α) of α in such that α ∈ / clIλn Iλn \ Iλ  n n (Iλ , τ ) such that U(α) ∩ Iλ \ Iλn−1 = ∅. Lemma 2 implies that ↑4 α is an open-and-closed subset of (Iλn , τ ) and hence by Theorem 14 of [4], ↑4 α is feebly compact. This implies that without loos of generality we may assume that U(α) ⊆ ↑4 x ∩ Iλn−1 . By the definition of the semigroup Iλn we have that there exists a point β ∈ U(α) such that ↑4 β ∩ U(α) = {β}. Again, by Lemma 2 we have that ↑4 β is an open-and-closed subset of (Iλn , τ ) and hence by Theorem 14 of [4], ↑4 β is feebly compact. Moreover, our choice implies that β is an isolated point in the subspace ↑4 β of (Iλn , τ ). Suppose that   x1 · · · xk β= , y1 · · · yk for some finite subsets {x1 , · · · , xk } and {y1 , · · · , yk } of distinct points from λ. Then the above arguments imply that k < n. Put p = n − k. Next we fix an arbitrary infinite sequence {ai }i∈N of distinct elements of the set λ \ ({x1 , · · · , xk } ∪ {y1 , · · · , yk }). For arbitrary positive integer j we put   x1 · · · xk ap(j−1)+1 · · · apj . βj = y1 · · · yk ap(j−1)+1 · · · apj Then βj ∈ Iλn for any positive integer j. Moreover, we have that βj ∈ Iλn \ Iλn−1 and βj ∈ ↑4 β for any positive integer j. 8 OLEG GUTIK We claim that the set ↑4 γ ∩ {βj : j ∈ N} is finite for any γ ∈ ↑4 β \ {β}. Indeed, if the set ↑4 γ ∩ {βj : j ∈ N} is infinite for some γ ∈ ↑4 β \ {β} then dom γ contains infinitely many points of the set {ai : i ∈ N}, which contradicts that γ ∈ Iλn . By Lemma 2 for every γ ∈ Iλn the set ↑4 γ is open in (Iλn , τ ). Then since β is an isolated point in ↑4 β, our claim implies that the infinite family of isolated points U = {{bj } : j ∈ N} is locally finite in ↑4 β, which contradicts that the subspace ↑4 β of (Iλn , τ ) is feebly compact. The obtained contradiction implies the statement of the proposition.  Remark 11. The following three examples of topological semigroups of matrix units (Bλ , τmv ), (Bλ , τmh ) and (Bλ , τmi ) from [12] imply that the converse to Proposition 10 is not true for any infinite cardinal λ. Later by Nd and R we denote the sets of positive integers with the discrete topology and the real numbers with the usual topology. Theorem 12. Let n be an arbitrary positive integer and λ be an arbitrary infinite cardinal. Then for every shift-continuous T1 -topology τ on the semigroup Iλn the following statements are equivalent: (i) τ is countably pracompact; (ii) τ is feebly compact; (iii) τ is d-feebly compact; (iv) (Iλn , τ ) is H-closed; (v) (Iλn , τ ) is Nd -compact; (vi) (Iλn , τ ) is R-compact; (vii) (Iλn , τ ) is infra H-closed. Proof. Implications (i) ⇒ (ii) and (ii) ⇒ (iii) are trivial. (iii) ⇒ (ii) Suppose that a space (Iλn , τ ) is d-feebly compact. By Lemma 2 it is quasi-regular. Then by Theorem 1 of [19] every quasiregular d-feebly compact space is feebly compact and hence so is (Iλn , τ ). (ii) ⇒ (i) Suppose that a space (Iλn , τ ) is feebly compact. By Lemma 2 the topological space (Iλn , τ ) is Hausdorff. Then by Lemma 1 of [19] every Hausdorff feebly compact space with a dense discrete subspace is countably pracompact (also see Lemma 4.5 of [5] or Proposition 1 from [2] for Tychonoff spaces) and hence so is (Iλn , τ ). Implication (iv) ⇒ (ii) follows from Proposition 4 of [15]. (ii) ⇒ (iv) We shall show by induction that if τ is a shift-continuous feebly compact T1 -topology on the semigroup Iλn then the subspace ↑4 α of (Iλn , τ ) is H-closed for any α ∈ Iλn . It is obvious that for any α ∈ Iλn with rank α = n the set ↑4 α = {α} is singleton, and since (Iλn , τ ) is a T1 -space, ↑4 α is H-closed. Fix an arbitrary α ∈ Iλn with rank α = n − 1. By Lemma 2, ↑4 α is an open-and-closed subset of (Iλn , τ ) and hence by Theorem 14 from [4] the space ↑4 α is feebly compact. Since by Lemma 2 every point β of ↑4 α with rank α = n is isolated in (Iλn , τ ), the feeble compactness of ↑4 α implies that α is a non-isolated point of (Iλn , τ ) and the space ↑4 α is compact. This implies that ↑4 α is H-closed. Next we shall prove the following statement: if for some positive integer k < n for any α ∈ Iλn with rank α 6 k the subspace ↑4 α is H-closed then ↑4 β is H-closed for any β ∈ Iλn with rank β = k − 1. Suppose to the contrary that there exists a shift-continuous feebly compact T1 -topology τ on the semigroup Iλn such that for some positive integer k < n for any α ∈ Iλn with rank α = k the subspace ↑4 α is H-closed and ↑4 β is not an H-closed space for some β ∈ Iλn with rank β = k − 1. Then there exists a Hausdorff topological space X which contains the space ↑4 β as a dense proper subspace. We observe that by Lemma 2 and Theorem 14 of [4] the space ↑4 β is feebly compact. Fix an arbitrary x ∈ X \ ↑4 β. The Hausdorffness of X implies that there exist open neighbourhoods UX (x) and UX (β) of the points x and β in X, respectively, such that UX (x) ∩ UX (β) = ∅. Then the assumption of induction implies that without loss of generality we may assume that there do not exist finitely many α1 , . . . , αm ∈ ↑4 β with rank α1 = . . . = rank αm = k such that UX (x) ∩ ↑4 β ⊆ ↑4 α1 ∪ · · · ∪ ↑4 αm . ON FEEBLY COMPACT SEMITOPOLOGICAL SYMMETRIC INVERSE SEMIGROUPS OF ... 9 Fix an arbitrary α1 ∈ ↑4 β such that rank α1 = k and ↑4 α1 ∩ UX (x) 6= ∅. Proposition 1.3.1 of [8], Lemma 2 and Proposition 10 imply that there exists γ1 ∈ Iλn \ Iλn−1 such that γ1 ∈ ↑4 α1 ∩ UX (x). Next, by induction using Proposition 1.3.1 of [8], Lemma 2 and Proposition 10 we construct sequences {αi }i∈N and {γi }i∈N of distinct points of the set ↑4 β such that the following conditions hold:  (a) rank αi+1 = k and ↑4 αi+1 \ ↑4 α1 ∪ · · · ∪ ↑4 αi ∩ UX (x) 6= ∅; and (b) γi+1 ∈ Iλn \ Iλn−1 and γi+1 ∈ ↑4 αi+1 \ ↑4 α1 ∪ · · · ∪ ↑4 αi ∩ UX (x), for all positive integers i > 1. Then Lemma 1 implies that the infinite family of non-empty open subsets U = {{γi } : i ∈ N} is locally finite, which contradicts the feeble compactness of ↑4 β. The obtained contradiction implies the statement of induction which completes the proof of the statement that the space (Iλn , τ ) is H-closed. (iv) ⇒ (v) By Katětov’s Theorem every continuous image of an H-closed topological space into a Hausdorff space is H-closed (see [8, 3.15.5 (b)] or [22]). Hence the image f (Iλn ) is H-closed for every continuous map f : (Iλn , τ ) → Nd , which implies that f (Iλn ) is compact (see [8, 3.15.5 (a)]). (v) ⇒ (ii) Suppose to the contrary that there exists a Hausdorff shift-continuous Nd -compact topology τ on Iλn which is not feebly compact. Then there exists an infinite locally finite family U = {Ui } of open non-empty subsets of (Iλn , τ ). Without loss of generality we may assume that the family U = {Ui } is countable., i.e., U = {Ui : i ∈ N}. Then the definition of the semigroup Iλn and Lemma 2 imply that for every Ui ∈ U there exists αi ∈ Ui such that ↑4 αi ∩ Ui = {αi } and hence U ∗ = {{αi } : i ∈ N} is a family of isolated points of (Iλn , τ ). Since the family U is locally finite, without loss of generality we may assume that αi 6= αj for distinct i, j ∈ N. We claim that the family U ∗ is locally finite. Indeed, if we assume the contrary then there exists α ∈ Iλn such that every open neighbourhood of α contains infinitely many elements of the family U ∗ . This implies that the family U is not locally S finite, ∗ n a contradiction. Since (Iλ , τ ) is a T1 -space and the family U is locally finite, we have that U ∗ is a closed subset in (Iλn , τ ) and hence the map f : (Iλn , τ ) → Nd defined by the formula  S 1, if β ∈ Iλn \ U ∗ ; f (β) = i + 1, if β = αi for some i ∈ N, is continuous. This contradicts that the space (Iλn , τ ) is Nd -compact. The proofs of implications (iv) ⇒ (vi) and (vi) ⇒ (ii) are same as the proofs of (iv) ⇒ (v) and (v) ⇒ (ii), respectively. Implication (ii) ⇒ (vii) follows from Proposition 2 and Theorem 3 of [20]. (vii) ⇒ (ii) Suppose to the contrary that there exists a Hausdorff shift-continuous infra H-closed topology τ on Iλn which is not feebly compact. Then similarly as in the proof of implication (v) ⇒ (ii) we choice a locally finite family U ∗ = {{αi } : i ∈ N} of isolated points of (Iλn , τ ). Then the map f : (Iλn , τ ) → R defined by the formula S ( 1, if β ∈ Iλn \ U ∗ ; 1 f (β) = , if β = αi for some i ∈ N, i+1 is continuous. This contradicts that the space (Iλn , τ ) is infra H-closed.  Remark 13. By Theorem 5 from [20] conditions (ii) and (vii) of Theorem 12 are equivalent for any Tychonoff space X. It is not, however, the case that feebly compact and infra H-closed are equivalent in general. In [21] Herrlich, beginning with a T1 -space Y , constructs a regular space X such that the only continuous functions from X into Y are constant. His construction involves the cardinality of Y , but only as the cardinality of collections of open sets whose intersections are singletons. Thus only the most trivial modifications are needed in his argument to produce a regular Hausdorff infra H-closed space. It is also easily shown that the space constructed in this manner is not feebly compact. Any regular lightly compact space must be a Baire space [25, Lemma 3], and thus it is of interest to note that the space constructed in [21] can be shown to be the countable union of nowhere dense subsets using essentially the same argument as can be used to show it is not feebly compact. 10 OLEG GUTIK Later we need the following technical lemma. Lemma 14. Let n be an arbitrary positive integer and λ be an arbitrary infinite cardinal. Let τ be a feebly compact shift-continuous T1 -topology on the semigroup Iλn . Then for every α ∈ Iλn and any open neighbourhood U(α) of α in (Iλn , τ ) there exist finitely many α1 , . . . , αk ∈ ↑4 α \ {α} such that Iλn \ Iλn−1 ∩ ↑4 α ⊆ U(α) ∪ ↑4 α1 ∪ · · · ∪ ↑4 αk . Proof. Suppose to the contrary that there exists a feebly compact shift-continuous T1 -topology on the semigroup Iλn which satisfies the following property: some element α of the semigroup Iλn has an open neighbourhood U(α) of α in (Iλn , τ ) such that Iλn \ Iλn−1 ∩ ↑4 α * U(α) ∪ ↑4 α1 ∪ · · · ∪ ↑4 αk , for any finitely many α1 , . . . , αk ∈ ↑4 α \ {α}. We observe that Lemma 2 implies that without loss of generality we may assume that U(α) ⊆ ↑4 α. Fix such an element α of Iλn and its open neighbourhood U(α) with the above determined property. Then our assumption implies that there exists α1 ∈ ↑4 α \ U(α) such that the set Iλn \ Iλn−1 ∩ ↑4 α1 \ U(α) is infinite and fix an arbitrary γ1 ∈ Iλn \ Iλn−1 ∩ ↑4 α1 \ U(α). Next, by induction using our assumption we construct sequences {αi }i∈N and {γi }i∈N of the distinct points of the set ↑4 α such that the following conditions hold:  (a) αi+1 ∈ ↑4 α \ U(α) ∪ ↑4 α1 ∪ · · · ∪ ↑4 αi and the set  Iλn \ Iλn−1 ∩ ↑4 α ∩ ↑4 α1+1 \ U(α) ∪ ↑4 α1 ∪ · · · ∪ ↑4 αi is infinite;  (b) γi+1 ∈ Iλn \ Iλn−1 ∩ ↑4 α ∩ ↑4 α1 \ U(α) ∪ ↑4 α1 ∪ · · · ∪ ↑4 αi , for all positive integers i. By Lemma 2 and Theorem 14 of [4] the space ↑4 α is feebly compact. Then Lemma 1 implies that the infinite family of non-empty open subsets U = {{γi } : i ∈ N} is locally finite, which contradicts the feeble compactness of ↑4 α. The obtained contradiction implies the statement of the lemma.  Theorem 15. Let n be an arbitrary positive integer and λ be an arbitrary infinite cardinal. Then every shift-continuous semiregular feebly compact T1 -topology τ on Iλn is compact. Proof. We shall prove the statement of the theorem by induction. First we observe that for every element α of a semiregular feebly compact T1 -semitopological semigroup (Iλn , τ ) with rank α = n − 1, n the set ↑4 α is compact. Indeed, by Lemma 2 for every β ∈ Iλn the set ↑4 β is open-and-closed in (Iλn , τ ), and hence we have that Iλn \ Iλn−1 is an open discrete subspace of (Iλn , τ ) and using Theorem 14 of [4] we obtain that ↑4 α is feebly compact, which implies that the space ↑4 α is compact. Next we shall prove a more stronger step of induction: if for every element α of a semiregular feebly compact T1 -semitopological semigroup (Iλn , τ ) with rank α > l 6 n the set ↑4 α is compact, then ↑4 β is compact for every β ∈ Iλn with rank α = l. Suppose to the contrary that there exists a semiregular feebly compact T1 -semitopological semigroup (Iλn , τ ) such that for some positive integer l 6 n the set ↑4 α is compact for every α ∈ Iλn with rank α > l, but there exists β ∈ Iλn with rank β = l such that the set ↑4 β is not compact. First we observe that our assumption that the set ↑4 α is compact and Corollary 3.1.14 of [8] imply that the following family  Bc (α) = Uα (α1 , . . . , αk ) = ↑4 α \ (↑4 α1 ∪ · · · ∪ ↑4 αk ) : αi ∈ ↑4 α \ {α}, i = 1, . . . , k is a base of topology at the point α of (Iλn , τ ) for every α ∈ Iλn with rank α > l. Then the Alexander Subbase Theorem (see [1, Theorem 1] or [8, p. 221, 3.12.2(a)]) and Lemma 2 imply that there exists a base B of the topology τ on Iλn with the following properties: S (i) B = {B(γ) : γ ∈ Iλn } and for every γ ∈ Iλn the family B(γ) is a base at the point γ; ON FEEBLY COMPACT SEMITOPOLOGICAL SYMMETRIC INVERSE SEMIGROUPS OF ... 11 (ii) U(γ) ⊆ ↑4 γ for any U(γ) ∈ B(γ); (iii) B(γ) = Bc (γ) for every γ ∈ Iλn with rank γ > l; (iv) there exists a cover U of the set ↑4 β by members of the base B which has not a finite subcover. We claim that the subspace ↑4 β of (Iλn , τ ) contains an infinite closed discrete subspace X. Indeed, let U0 be a subfamily of U such that  [ U0 . {β} ∪ ↑4 β ∩ Iλn \ Iλn−1 ⊆ Since the set ↑4 β is not compact and ↑4 γ is compact for any γ ∈ ↑4 β \ {β}, without loss of generality we may assume that there exists k > rank β such that the following conditions hold: S (a) there exist infinitely many elements ζ ∈ ↑ β with rank ζ = k such that ζ ∈ / U0 ; 4 S (b) ς ∈ U0 for all ς ∈ ↑4 β with rank ς < k. It is obvious that the set [  [ X = ↑4 β \ U0 \ ↑4 ς : rank ς > k is requested. Fix an arbitrary regular open neighbourhood U(β) of the point β in (Iλn , τ ) such that U(β) ∩ X = ∅. By Lemma 14 there exist finitely many β1 , . . . , βs ∈ ↑4 β such that Iλn \ Iλn−1 ∩ ↑4 β ⊆ U(β) ∪ ↑4 β1 ∪ · · · ∪ ↑4 βs . It is obvious that the set X \ (↑4 β1 ∪ · · · ∪ ↑4 βs ) is infinite. For every δ ∈ X the set ↑4 δ is compact and  open, and moreover by Lemma 1 the set ↑4 δ \ ↑4 β1 ∪ · · · ∪ ↑4 βs contains infinitely many points of the neighbourhood U(β). This implies that intIλn clIλn (U(β)) ∩ X 6= ∅, which contradicts the assumption that U(0) ∩ X = ∅. The obtained contradiction implies that the subspace ↑4 β of (Iλn , τ ) is compact, which completes the proof of the theorem.  Acknowledgements. The author acknowledges Taras Banakh and the referee for useful important comments and suggestions. References [1] J. W. Alexander, Ordered sets, complexes and the problem of compactification, Proc. Natl. Acad. Sci. USA 25 (1939), 296–298. [2] A. V. Arhangel’skii, On spaces with point-countable base, Topological spaces and their mappings, Riga, 1985, P. 3–7 (in Russian). [3] A. V. Arkhangel’skii, Topological function spaces, Kluwer Publ., Dordrecht, 1992. [4] R. W. Bagley, E. H. Connell, and J. D. McKnight, Jr., On properties characterizing pseudo-compact spaces, Proc. Amer. Math. Soc. 9 (1958), no. 3, 500–506. [5] S. Bardyla and O. Gutik, On a semitopological polycyclic monoid, Algebra Discrete Math. 21 (2016), no. 2, 163–183. [6] J. H. Carruth, J. A. Hildebrant, and R. J. Koch, The theory of topological semigroups, Vols. I and II, Marcell Dekker, Inc., New York and Basel, 1983 and 1986. [7] A. H. Clifford and G. B. Preston, The algebraic theory of semigroups, Vols. I and II, Amer. Math. Soc. Surveys 7, Providence, R.I., 1961 and 1967. [8] R. Engelking, General topology, 2nd ed., Heldermann, Berlin, 1989. [9] G. Gierz, K. H. Hofmann, K. Keimel, J. D. Lawson, M. W. Mislove, and D. S. Scott, Continuous lattices and domains, Cambridge Univ. Press, Cambridge, 2003. 12 OLEG GUTIK [10] O. Gutik, On closures in semitopological inverse semigroups with continuous inversion, Algebra Discrete Math. 18 (2014), no. 1, 59-85. [11] O. Gutik, J. Lawson, and D. Repovš, Semigroup closures of finite rank symmetric inverse semigroups, Semigroup Forum 78 (2009), no. 2, 326–336. [12] O. V. Gutik and K. P. Pavlyk, On topological semigroups of matrix units, Semigroup Forum 71 (2005), no. 3, 389–400. [13] O. V. Gutik and K. P. Pavlyk, Topological semigroups of matrix units, Algebra Discrete Math. (2005), no. 3, 1–17. [14] O. Gutik, K. Pavlyk, and A. Reiter, Topological semigroups of matrix units and countably compact Brandt λ0 extensions, Mat. Stud. 32 (2009), no. 2, 115–131. [15] O. V. Gutik and O. V. Ravsky, Pseudocompactness, products and topological Brandt λ0 –extensions of semitopological monoids, Math. Methods and Phys.-Mech. Fields 58 (2015), no. 2, 20–37; reprinted version: J. Math. Sc. 223 (2017), no. 1, 18–38. [16] O. V. Gutik and A. R. Reiter, Symmetric inverse topological semigroups of finite rank 6 n, Math. Methods and Phys.-Mech. Fields 52 (2009), no. 3, 7–14; reprinted version: J. Math. Sc. 171 (2010), no. 4, 425–432. [17] O. Gutik and A. Reiter, On semitopological symmetric inverse semigroups of a bounded finite rank, Visnyk Lviv Univ. Ser. Mech. Math. 72 (2010), 94–106 (in Ukrainian). [18] O. Gutik and O. Sobol, On feebly compact topologies on the semilattice expn λ, Mat. Stud. 46 (2016), no. 1, 29–43. [19] O. Gutik and O. Sobol, On feebly compact shift-continuous topologies on the semilattice expn λ, Visnyk Lviv Univ. Ser. Mech. Math. 82 (2016), 128–136. [20] D. W. Hajek and A. R. Todd, Compact spaces and infra H-closed spaces, Proc. Amer. Math. Soc. 48 (1975), no. 2, 479–482. [21] H. Herrlich, Wann sind alle stetigen Abbildungen in Y konstant?, Math. Z. 90 (1965), 152–154. [22] M. Katětov, Über H-abgeschlossene und bikompakte Räume, Čas. Mat. Fys. 69 (1940), no. 2, 36–49. [23] M. V. Lawson, Inverse semigroups. The theory of partial symmetries, World Scientific, Singapore, 1998. [24] M. Matveev, A survey of star covering properties, Topology Atlas preprint, April 15, 1998. [25] R. A. McCoy, A filter characterization of regular Baire spaces, Proc. Amer. Math. Soc. 40 (1973), 268–270. [26] M. Petrich, Inverse semigroups, John Wiley & Sons, New York, 1984. [27] W. Ruppert, Compact semitopological semigroups: an intrinsic theory, Lect. Notes Math., 1079, Springer, Berlin, 1984. [28] J. E. Vaughan, Countably compact and sequentially compact spaces, Handbook of set-theoretic topology, K. Kunen and J. E. Vaughan (eds.), North-Holland, Amsterdam, 1984, pp. 569–602. [29] V. V. Wagner, Generalized groups, Dokl. Akad. Nauk SSSR 84 (1952), 1119–1122 (in Russian). Faculty of Mathematics, National University of Lviv, Universytetska 1, Lviv, 79000, Ukraine E-mail address: o [email protected], [email protected]
4math.GR
Soft-Robust Actor-Critic Policy-Gradient Esther Derman 1 , Daniel J. Mankowitz1 , Timothy A. Mann2 and Shie Mannor1 arXiv:1803.04848v1 [cs.LG] 11 Mar 2018 1 Technion Israel Institute of Technology, Haifa, Israel 2 Google Deepmind, London, UK [email protected], [email protected], [email protected], [email protected] Abstract Robust Reinforcement Learning aims to derive an optimal behavior that accounts for model uncertainty in dynamical systems. However, previous studies have shown that by considering the worst case scenario, robust policies can be overly conservative. Our soft-robust framework is an attempt to overcome this issue. In this paper, we present a novel Soft-Robust ActorCritic algorithm (SR-AC). It learns an optimal policy with respect to a distribution over an uncertainty set and stays robust to model uncertainty but avoids the conservativeness of robust strategies. We show convergence of the SR-AC and test the efficiency of our approach on different domains by comparing it against regular learning methods and their robust formulations. 1 Introduction Markov Decision Processes (MDPs) are commonly used to model sequential decision making in stochastic environments. A strategy that maximizes the accumulated expected reward is then considered as optimal and can be learned from sampling. However, besides the uncertainty that results from stochasticity of the environment, model parameters are often estimated from noisy data or can change during testing [Mannor et al., 2007; Roy et al., 2017]. This second type of uncertainty can significantly degrade the performance of the optimal strategy from the model’s prediction. Robust MDPs were proposed to address this problem [Iyengar, 2005; Nilim and El Ghaoui, 2005; Tamar et al., 2014]. In this framework, a transition model is assumed to belong to a known uncertainty set and an optimal strategy is learned under the worst parameter realizations. Although the robust approach is computationally efficient when the uncertainty set is state-wise independent, compact and convex, it can lead to overly conservative results [Mannor et al., 2012, 2016; Xu and Mannor, 2012; Yu and Xu, 2016]. For example, consider a business scenario where an agent’s goal is to make as much money as possible. It can either create a startup which may make a fortune but may also result in bankruptcy. Alternatively, it can choose to live off school teaching and have almost no risk but low reward. By choosing the teaching strategy, the agent may be overly conservative and not account for opportunities to invest in his own promising projects. Our claim is that one could relax this conservativeness and construct a softer behavior that interpolates between being aggressive and robust. Ideally, the soft-robust agent should stay agnostic to outside financing uncertainty but still be able to take advantage of the startup experience. This type of dilemma can be found in various domains. In the financial market, investors seek a good trade-off between low risk and high returns regarding portfolio management [Mitchell and Smetters, 2013]. In strategic management, product firms must choose the amount of resources they put into innovation. A conservative strategy would then consist of innovating only under necessary conditions [Miller and Friesen, 1982]. In this paper, we focus on learning a soft-robust policy (defined below) by incorporating soft-robustness into an online actor-critic algorithm and show its convergence properties. Existing works mitigate conservativeness of robust MDP either by introducing coupled uncertainties [Mannor et al., 2012, 2016] or by assuming prior information on the uncertainty set [Xu and Mannor, 2012; Yu and Xu, 2016]. They use dynamic programming techniques to estimate a robust policy. However, these methods present some limiting restrictions such as non-scalability and offline estimation. Besides being computationally more efficient than batch learning [Wiering and van Otterlo, 2012], the use of an online algorithm is of significant interest in robust MDPs because it can detect non-adversarial stateactions pairs along a trajectory and result in less conservative results, something which cannot be performed when solving the planning problem [Lim et al., 2016]. Other works have attempted to incorporate robustness into an online algorithm for policy optimization [Mankowitz et al., 2018; Tamar et al., 2015]. Although these approaches can deal with large domains, a sampling procedure is required for each critic estimate in Tamar et al. [2015], which differs from the strictly-speaking actor-critic. In Mankowitz et al. [2018], the authors introduce a robust version of actor-critic policy-gradient but its convergence results are only shown for the actor updates. Moreover, these works target the robust solution which may be too conservative. We review all existing methods in Section 7 and compare them to our approach. To the best of our knowledge, our proposed work is the first attempt to incorporate a soft form of robustness into an online algorithm that has convergence guarantees besides being computationally scalable. We deal with the curse of dimensionality by using function approximation that parameterizes the expected value within a space of much smaller dimension than the state space. By fixing a distribution over the uncertainty set, the induced softrobust actor-critic learns a locally optimal policy in an online manner. Under mild assumptions on the set of distributions and uncertainty set, we show that our novel Soft-Robust Actor-Critic (SR-AC) algorithm converges. Our specific contributions are: (1) A soft-robust derivation of the objective function for policy-gradient; (2) An SR-AC algorithm that uses stochastic approximation to learn a variant of distributionally robust policy in an online manner; (3) Convergence proofs of SR-AC; (4) An experiment of our framework to different domains that shows the efficiency of soft-robustness. All proofs can be found in the Appendix. 2 Background In this section, we introduce the background material related to our soft-robust approach. Robust MDP A robust MDP is a tuple hX , A, r, Pi where X is a finite state-space, A is a finite set of actions, r : X × A → R is the immediate reward function which is deterministic and bounded and P is a set of transition matrices. N We assume that P is structured as a cartesian product x∈X Px , which is known as the rectangularity assumption [Nilim and El Ghaoui, 2005]. Given a state x ∈ X , the uncertainty set Px is a family of transition models px ∈ Px we represent as vectors in which the transition probabilities of each action are arranged in the same block. For x, y ∈ X and a ∈ A, denote by p(x, a, y) the probability of getting from state x to state y given action a. At timestep t, the agent is in state xt and chooses an action at according to a stochastic policy π : X → M(A) that maps each state to a probability distribution over the action space, M(A) denoting the set of distributions over A. It then gets a reward rt+1 and is brought to state xt+1 with probability p(xt , at , xt+1 ). Policy-Gradient Policy-gradient methods are commonly used to learn an agent policy. A policy π is parametrized by θ and estimated by optimizing an objective function using stochastic gradient descent. A typical objective to be considered is the average reward function T −1 1 X rt+1 | π] T →+∞ T t=0 X X = dπp (x) π(x, a)r(x, a) Jp (π) = lim Ep [ x∈X a∈A where rt is the reward at time t, p an aperiodic and irreducible transition model under which the agent operates and dπp is the stationary distribution of the Markov process induced by p under policy π. The gradient objective has previously been shown to be X X ∇θ Jp (π) = dπp (x) ∇θ π(x, a)Qπp (x, a) x∈X a∈A where Qπp (x, a) is the expected differential reward associated with state-action pair (x, a). This gradient is then used to update the policy parameters according to: θt+1 = θt + βt ∇θ Jp (π), with βt a positive step-size [Sutton et al., 2000]. Actor-Critic Algorithm Theoretical analysis and empirical experiments have shown that regular policy-gradient methods present a major issue namely high variance in the gradient estimates that results in slow convergence and inefficient sampling [Grondman et al., 2012]. First proposed by Barto et al. [1983], actor-critic methods attempt to reduce the variance by using a critic that estimates the value function. They borrow elements from both value function and policy-based methods. The value function estimate plays the role of a critic that helps evaluating the performance of the policy. As in policy-based methods, the actor then uses this signal to update policy parameters in the direction of a gradient estimate of a performance measure. Under appropriate conditions, the resulting algorithm is tractable and converges to a locally optimal policy [Bhatnagar et al., 2009; Konda and Tsitsiklis, 2000]. Deep Q-networks Deep Q-Networks (DQNs) have proven their capability of solving complex learning tasks such as Atari video games [Mnih et al., 2013]. The Qlearning of Watkins and Dayan [1992] typically learns a greedy or -greedy policy by updating the Q-function based on a TD-error. In Deep Q-learning [Mnih et al., 2013, 2015], a non-linear function such as a neural network is used as an approximator of the Q-function. It is referred to as a Q-network. The agent is then trained by optimizing the induced TD loss function thanks to stochastic gradient descent. Like actor-critic, DQN is an online algorithm that aims at finding an optimal policy. The main difference with actor-critic is that it is off-policy: it learns a greedy strategy while following an arbitrary behavior [Mnih et al., 2013]. 3 Soft-Robustness Soft-Robust Framework Unlike robust MDPs that maximize the worst-case performance, we fix a prior on how transition models are distributed over the uncertainty set. A distribution over N P is denoted by ω and is structured as a cartesian product x∈X ωx . We find the same structure in Xu and Mannor [2012]; Yu and Xu [2016]. Intuitively, ω can be thought as the way the adversary distributes over different transition models. The product structure then means that this adversarial distribution only depends on the current state of the agent without taking into account its whole trajectory. This defines a probability distribution ωx over Px independently for each state. We further assume that ω is non-diffuse. This implies that the uncertainty set is non-trivial with respect to ω in a sense that the distribution does not affect zero mass to all of the models. Soft-Robust Objective Throughout this paper, we make the following assumption: Assumption 3.1. Under any policy π, the Markov chains resulting from any of the MDPs with transition laws p ∈ P are irreducible and aperiodic. Define dπp as the stationary distribution of the Markov chain that results from following policy π under transition model p ∈ P. Definition 3.1. We call soft-robust objective or ¯ soft-robust average reward the function J(π) := Ep∼ω [Jp (π)]. The distribution ω introduces a softer form of robustness in the objective function because it averages over the uncertainty set instead of considering the worst-case scenario. It also gives flexibility over the level of robustness one would like to keep. A robust strategy would then consist of putting more mass on pessimistic transition models. Likewise, a distribution that puts all of its mass on one target model would lead to an aggressive behavior and result in model misspecification. The soft-robust differential reward is given by Q̄π (x, a) := Ep∼ω Qπp (x, a) where Qπp (x, a) p := E X +∞  rt+1 − Jp (π)|x0 = x, a0 = a, π . t=0 Similarly, we introduce the quantity V̄ π (x) := X   π(x, a)Q̄π (x, a) = Ep∼ω Vpπ (x) a∈A P π with Vpπ (x) := a∈A π(x, a)Qp (x, a). We will interchangeably term it as soft-robust expected differential reward or soft-robust value function. Soft-Robust Stationary Distribution The above perfor¯ cannot as yet be written as an expecmance objective J(π) tation of the reward over a stationary distribution because of the added measure ω on transition models. Define the average transition model as p̄ := Ep∼ω [p]. It corresponds to the transition probability that results from distributing all transition models according to ω. In analogy to the transition probability that minimizes the reward for each given state and action in the robust transition function [Mankowitz et al., 2018], our average model rather selects the expected distribution over all the uncertainty set for each state and action. Under Assumption 3.1, we can show that the transition p̄ as defined is irreducible and aperiodic, which ensures the existence of a unique stationary law we will denote by d¯π . Proposition 3.1 (Stationary distribution in the average transition model). Under Assumption 3.1, the average transition matrix p̄ := Ep∼ω [p] is irreducible and aperiodic. In particular, it admits a unique stationary distribution. As in regular MDPs, the soft-robust average reward satisfies a Poisson equation, as it was first stated in the discounted reward case in Lemma 3.1 of Xu and Mannor [2012]. The following proposition reformulates this result for the average reward. Proposition 3.2 (Soft-Robust Poisson equation). ¯ J(π) + V̄ π (x) ! = X a∈A π(x, a) r(x, a) + X 0 π 0 p̄(x, a, x )V̄ (x ) x0 ∈X This Poisson equation enables us to establish an equivalence between the expectation of the stationary distributions over the uncertainty set and the stationary distribution of the average transition model, naming d¯π (x) = Ep∼ω [dπp (x)] with x ∈ X . Indeed, we have the following: Corollary 3.1. Recall d¯π the stationary distribution for the average transition model p̄. Then X X ¯ J(π) = d¯π (x) π(x, a)r(x, a). x∈X a∈A The goal is to learn a policy that maximizes the soft-robust ¯ We use a policy-gradient method for average reward J. that purpose. 4 approximator of the soft-robust differential reward Q̄π . If fw minimizes the mean squared error  2 X X π π π ¯ E (w) := d (x) π(x, a) Q̄ (x, a)−fw (x, a) x∈X and is compatible in a sense that ∇w fw (x, a) = ∇θ log π(x, a), then ¯ ∇θ J(π) = Soft-Robust Policy-Gradient In policy-gradient methods, we consider a class of parametrized stochastic policies πθ : X → M(A) with θ ∈ Rd1 and estimate the gradient of the objective function J¯ with respect to policy parameters in order to update ¯ the policy in the direction of the estimated gradient of J. The optimal set of parameters thus obtained is denoted by ¯ θ ). θ∗ := arg max J(π θ When clear in the context, we will omit the subscript θ in πθ for notation ease. We further make the following assumption, which is standard in policy-gradient litterature: Assumption 4.1. For any (x, a) ∈ X × A, the mapping θ 7→ πθ (x, a) is continuously differentiable with respect to θ. Using the same method as in Sutton et al. [2000], we can derive the gradient of the soft-robust average reward thanks to the previous results. Theorem 4.1 (Soft-Robust Policy Gradient). For any MDP satisfying previous assumptions, we have X X ¯ ∇θ J(π) = d¯π (x) ∇θ π(x, a)Q̄π (x, a). x∈X a∈A In order to manage with large state spaces, we also introduce a linear approximation of Q̄π we define as fw (x, a) := wT ψxa . Sutton et al. [2000] showed that if the features ψxa satisfy a compatibility condition and the approximation is locally optimal, then we can use it in place of Q̄π and still point roughly in the direction of the true gradient. a∈A X d¯π (x) x∈X X ∇θ π(x, a)fw (x, a) a∈A We can further improve our gradient estimate by reducing its variance. One direct method to do so is to subtract a baseline b(x) from the previous gradient update. It is easy to show that this will not affect the gradient derivation. In particular, Bhatnagar et al. [2009] proved that the value function minimizes the variance. It is therefore a proper baseline to choose. We can thus write the following:   X X ¯ ∇θ J(π) = d¯π (x) ∇θ π(x, a) Q̄π (x, a) − V̄ π (x) x∈X = X x∈X a∈A ¯π d (x) X π(x, a)ψxa Āπ (x, a), a∈A (1) where Āπ (x, a) is the soft-robust advantage function defined by Āπ (x, a) := Q̄π (x, a) − V̄ π (x). 5 Soft-Robust Actor-Critic Algorithm In this section, we present our SR-AC algorithm which is defined as Algorithm 1. This novel approach incorporates a variation of distributional robustness into an online algorithm that effectively learns an optimal policy in a scalable manner. Under mild assumptions, the resulting two-timescale stochastic approximation algorithm converges to a locally optimal policy. 5.1 SR-AC algorithm In the case of soft-robust average reward, this defines a soft-robust gradient update that possesses the ability to incorporate function approximation, as stated in the following result. The main difference with that of Sutton et al. [2000] is that we combine the dynamics of the system with distributed transitions over the uncertainty set. An uncertainty set and a nominal model without uncertainty are provided as inputs. In practice, the nominal model and the uncertainty set can respectively be an estimate of the transition model resulting from data sampling and its corresponding confidence interval. A distribution ω over the uncertainty set is also provided. It corresponds to our prior information on the uncertainty set. The step-size sequences (αt , βt , ξt ; t ≥ 0) consist of small non-negative numbers properly chosen by the user (see Appendix for more details). Theorem 4.2 (Soft-Robust Policy Gradient with Function Approximation). Let fw : X × A → R be a linear At each iteration, samples are generated using the nominal model and the current policy. These are utilized to update the soft-robust average reward (Line 5) and the critic (Line 7) based on an estimate of a soft-robust TDerror we detail further. In our setting, the soft-robust value function plays the role of the critic according to which the actor parameters are updated. We then exploit the critic to improve our policy by updating the policy parameters in the direction of a gradient estimate for the soft-robust objective (Line 8). This process is repeated until convergence. 5.2 Algorithm 1 SR-AC 1: Input: P - An uncertainty set; p̂ ∈ P - A nominal 2: 3: 4: Convergence Analysis 5: We establish convergence of SR-AC to a local maxima of the soft-robust objective function by following an ODE approach [Kushner and Yin, 1997]. Consider V̂ and Jˆ as unbiased estimates of V̄ and J¯ respectively. Calculating δt (Line 6 in Algorithm 1) requires an estimate of the soft-robust average-reward that can be obtained by averaging over samples given immediate reward r and distribution ω (Line 5). In order to get an estimate of the soft-robust differential value V̂ , we use linear function approximation. Considering ϕ as a d2 dimensional feature extractor over the state space X , we may then approximate V̄ π (x) as v T ϕx , where v is a d2 dimensional parameter vector that we tune using linear TD. This results in the following soft-robust TD-error: X δt := rt+1 − Jˆt+1 + p̄(xt , at , x0 )vtT ϕx0 − vtT ϕxt , 6: 7: 8: 9: 10: model; ω - A distribution over P; fx - A feature extractor for the SR value function; Initialize: θ = θ0 - An arbitrary policy parameter; v = v0 - An arbitrary set of value function parameters; α0 , β0 , ξ0 - Initial learning-rates; x0 - Initial state repeat Act under at ∼ πθt (xt , at ) Observe next state xt+1 and reward rt+1 SR Average Reward Update: Jˆt+1 = (1 − ξt )Jˆt + ξt rt+1 SR TD-Error: P δt = rt+1 − Jˆt+1 + x0 ∈X p̄(xt , at , x0 )V̂x0 − V̂xt Critic Update: vt+1 = vt + αt δt ϕxt Actor Update: θt+1 = θt + βt δt ψxt at until convergence Return: SR policy parameters θ and SR valuefunction parameters v We used the existing structure of OpenAI Gym environments to run our experiments [Brockman et al., 2016]. 6.1 6.1.1 Domains A single-step MDP x0 ∈X where vt corresponds to the current estimate of the softrobust value function parameter. As in regular MDPs, when doing linear TD learning, the function approximation of the value function introduces a bias in the gradient estimate [Bhatnagar et al., 2009]. d ¯ Denoting it as eπ , we have E[∇ θ J(π) | θ] = ∇θ J(π) + π e (see Appendix). This bias term then needs to be small enough in order to ensure convergence. Convergence of Algorithm 1 can be established by applying Theorem 2 from Bhatnagar et al. [2009] which exploits Borkar’s work on two-timescale algorithms [1997]. The convergence result is presented as Theorem 5.1. Theorem 5.1. Under all the previous assumptions, given  > 0, there exists δ > 0 such that for a parameter vector θt , t ≥ 0 obtained using the algorithm, if supπt keπt k < δ, then the SR-AC algorithm converges almost surely to an ¯ -neighborhood of a local maximum of J. 6 Numerical Experiments We demonstrate the performance of soft-robustness on two domains of finite as well as continuous state spaces. We consider a simplified formulation of the startup vs teaching dilemma described in Section 1. The problem is modeled as a 7-state MDP in which one action corresponds to one strategy. An illustration of this construction is given graphically in Figure 1. At the starting state s0 , the agent chooses one of three actions. Action a1 [corresponds to the startup adventure] may lead it to a very high reward in case of success but can be catastrophic in case of failure. Action a2 [corresponds to the school teaching carrier] leads it to low positive reward in case of success with no possibility of negative reward. Action a3 [corresponds to an intermediate strategy between entrepreneurship and teaching] can lead to an intermediate positive reward with a slight risk of negative reward. Depending on the action it chose and if it succeeded or not, the agent is brought to one of the six right-hand states and receives the corresponding reward. It is brought back to s0 at the end of each episode. We assume the probability of success to be the same for all three actions. 6.1.2 Cart-Pole In the Cart-Pole system, the agent’s goal consists of balancing a pole atop a cart in a vertical position. It is modeled as a continuous MDP in which each state consists F1 a1 , R = -105 S1 a1 , R = 105 a2 ,R = 0 F2 a2 ,R = 2000 S2 s0 a3 ,R = −100 a3 ,R = 5000 F3 S3 Figure 1: Illustration of the MDP with initial state s0 . States F1 , F2 , F3 correspond to failing scenarios for each action. The succeeding states are represented by states S1 , S2 , S3 . 6.3 Learning Algorithms We trained the agent on the nominal model in each experiment. The soft-robust agent was learned using SR-AC in the single-step MDP. In Cart-Pole, we run a soft-robust version of a DQN algorithm. Soft-Robust AC We analyze the performance of SR-AC by training a soft-robust agent on the single-step MDP. We run a regular AC algorithm to derive an aggressive policy and learn a robust behavior by using a robust formulation of AC which consists in replacing the TD-error with a robust TD-error, as implemented in Mankowitz et al. [2018]. The derived soft-robust agent is then compared with the resulting aggressive and robust strategies respectively. Soft-Robust DQN Robustness has already been incorporated in DQN [Di-Castro Shashua and Mannor, 2017]. The Q-network addressed there performs an online estimation of the Q-function by minimizing at each timestep t the following robust TD-error: X rob δdqn,t : = r(xt , at ) + γ inf p(xt , at , x0 ) max Q(x0 , a0 ) 0 p∈P x0 ∈X a ∈A − Q(xt , at ), where γ is a discount factor. of a 4-tuple hx, ẋ, θ, θ̇i which represents the cart position, the cart speed, the pole angle with respect to the vertical and its angular speed respectively. The agent can make two possible actions: apply a constant force either to the right or to the left of the pole. It gets a positive reward of 1 if the pole has not fallen down and if it stayed in the boundary sides of the screen. If it terminates, the agent receives a reward of 0. Since each episode lasts for 200 timesteps, the maximal reward an agent can get is 200 over one episode. In our experiments, we incorporate a soft-robust TD-error inside a DQN that trains a soft-robust agent according to the induced loss function. The soft-robust TD-error for DQN is given by: X srob δdqn,t : = r(xt , at ) + γ p̄(xt , at , x0 ) max Q(x0 , a0 ) 0 x0 ∈X − Q(xt , at ) We use the Cart-Pole domain to compare the resulting policy with the aggressive and robust strategies that were obtained from a regular and a robust DQN respectively. 6.4 6.2 Uncertainty Sets For each experiment, we generate an uncertainty set P before training. In the single-step MDP, we sample from 5 different probabilities of success using a uniform distribution over [0, 1]. In Cart-Pole, we sample 5 different lengths from a normal distribution centered at the nominal length of the pole which we fix at 0.3. Each length thus generates a different transition function. We then sample the average model by fixing ω as a realization of a Dirichlet distribution. A soft-robust update is applied by taking the optimal action according to this average transition function. a ∈A Implementation For each experiment, we train the agent on the nominal model but incorporate soft-robustness during learning. A soft-robust policy is learned thanks to SR-AC in the single-step MDP. We use a linear function approximation with 5 features to estimate the value function. For CartPole, we run a DQN using a neural network of 3 fullyconnected hidden layers with 128 weights per layer and ReLu activations. We chose the ADAM optimizer to minimize all the induced loss functions. We used constant learning rates which worked well in practice. Each agent was trained over Mtrain = 3000 episodes. For testing, we averaged the performance over Mtest = 600 episodes per parameter setting. Other hyper-parameter values can be found in the Appendix. 6.5 Results Shashua and Mannor [2017]; Mankowitz et al. [2018]. However, it is outperformed by the soft-robust agent around the nominal model. Furthermore, the soft-robust strategy shows an equilibrium between aggressiveness and robustness thus leading to better performance than the non-robust agent on larger pole lengths. We trained a soft-robust agent on other weighting distributions and remarked that depending on its structure, soft-robustness interpolates between aggressive and robust behaviors (see Appendix). Single-step MDP 5 1e3 Average Reward 4 3 2 2.0 1e4 1 Aggressive 0 5 Soft-Robust 10 Training Epoch Robust 1.5 15 Figure 2: Comparison of robust, soft-robust and aggressive agents during training. One training epoch corresponds to 300 episodes. The soft-robust strategy is not as conservative as the robust one. 1.0 Average reward 0 0.5 0.0 0.5 1.0 Aggressive Policy Soft-Robust Policy Robust Policy 1.5 The evaluation of each strategy is represented in Figure 3. As the probability of success gets low, the performance of the aggressive agent drops down below the robust and the soft-robust agents, although it performs best when the probability of success gets close to 1. The robust agent stays stable independently of the parameters but underperforms soft-robust agent which presents the best balance between high reward and low risk. We remarked that depending on the weighting distribution initially set, soft-robustness tends to being more or less aggressive. In fact, high mass put on low probabilities of success leads to less aggressive strategies (see Appendix). Incorporating a distribution over the uncertainty set thus gives significant flexibility on the level of aggressiveness to be assigned to the soft-robust agent. Cart-Pole In Figure 4, we show the performance of all three strategies over different values of pole length. Similarly to our previous example, the non-robust agent performs well around the nominal model but its reward degrades on more extreme values of pole length. The robust agent keeps a stable reward under model uncertainty which is consistent with the results obtained in Di-Castro 2.0 0.0 0.2 0.4 0.6 Probability of Success 0.8 1.0 Figure 3: Average reward for different probabilities of success. Soft-robust policy is less sensitive to uncertainty than aggressive policy and performs better than robustness under optimistic scenarios. 250 200 Average reward Figure 2 shows the evolution of the performance for all three agents during training. It becomes more stable along training time, which confirms convergence of SR-AC in particular. We can see that the aggressive agent performs best due to the highest reward it can reach on the nominal model. The soft-robust agent gets rewards in between the aggressive and the robust agent which performs the worst due to its pessimistic learning method. 150 100 50 0 DQN Robust DQN Soft-Robust DQN 1 2 3 Pole Length 4 5 Figure 4: Average reward performance for DQN, robust DQN and soft-robust DQN 7 Related work This paper is related to several domains in RL such as robust and distributionally robust MDPs, actor-critic methods and online learning via stochastic approximation algorithms. Our work solves the problem of conservativeness encountered in robust MDPs by incorporating a variational form of distributional robustness. The SR-AC algorithm combines scalability to large scale state-spaces and online estimation of the optimal policy in an actor-critic algorithm. Table 1 compares our proposed algorithm with previous approaches. Table 1: Comparison of previous approaches with SR-AC Reference SR-AC (this paper) Mankowitz et al. [2018] Lim et al. [2016] Yu and Xu [2016] Mannor et al. [2012, 2016] Tamar et al. [2015] Xu and Mannor [2012] Bhatnagar et al. [2009] Scalable 3 3 ActorCritic 3 7 SoftlyRobust 3 7 7 7 7 7 7 7 7 3 7 3 7 7 7 7 3 3 3 7 Many solutions have been addressed to mitigate conservativeness of robust MDP. Mannor et al. [2012, 2016] relax the state-wise independence property of the uncertainty set and assume it to be coupled in a way such that the planning problem stays tracktable. Another approach tends to assume a priori information on the parameter set. These methods include distributionally robust MDPs [Xu and Mannor, 2012; Yu and Xu, 2016] in which the optimal strategy maximizes the expected reward under the most adversarial distribution over the uncertainty set. For finite and known MDPs, under some structural assumptions on the considered set of distributions, this max-min problem reduces to classical robust MDPs and can be solved efficiently by dynamic programming [Puterman, 2009]. However, besides becoming untracktable under largesized MDPs, these methods use an offline learning approach which cannot adapt its level of protection against model uncertainty and may lead to overly conservative results [Lim et al., 2016]. The work of Lim et al. [2016] solutions this issue and addresses an online algorithm that learns the transitions that are purely stochastic and those that are adversarial. Although it ensures less conservative results as well as low regret, this method sticks to the robust objective while strongly relying on the finite structure of the state-space. To alleviate the curse of dimensionality, we incorporate function approximation of the objective value and define it as a linear functional of features. First introduced in Barto et al. [1983] and later addressed by Bhatnagar et al. [2009], actor-critic algorithms are online learning methods that aim at finding an optimal policy. We used the formulation of Bhatnagar et al. [2009] as a baseline for the algorithm we proposed. The key difference between their work and ours is that we incorporate soft-robustness. This relates in a sense to the Bayesian Actor-Critic setup in which the critic returns a complete posterior distribution of value functions using Bayes’ rule [Ghavamzadeh and Engel, 2007; Ghavamzadeh et al., 2015, 2016]. Our study keeps a frequentist approach, meaning that our algorithm updates return point estimates of the average value-function which prevents from tracktability issues besides enabling the distribution to be more flexible. Another major distinction is that the Bayesian approach incorporates a prior distribution on one model parameters whereas our soft-robust method considers a prior on different transition models over an uncertainty set. In Mankowitz et al. [2018]; Tamar et al. [2015], the authors incorporate robustness into policy-gradient methods. A sampling procedure is required for each critic estimate in Tamar et al. [2015], which differs from the strictlyspeaking actor-critic. A robust version of actor-critic policy-gradient is introduced in Mankowitz et al. [2018] but its convergence guarantees are only shown for robust policy-gradient ascent. Both of these methods target the robust strategy whereas we seek a soft-robust policy that is less conservative while protecting itself against model uncertainty. 8 Discussion We have presented the SR-AC framework that is able to learn policies which keep a balance between aggressive and robust behaviors. SR-AC requires a stationary distribution under the average transition model and compatibility conditions for deriving a soft-robust policy-gradient. We have shown that this ensures convergence of SR-AC. This is the first work that has attempted to incorporate a soft form of robustness into an online actor-critic method. Our approach has been shown to be computationally scalable to large domains because of its low computational price. In our experiments, we have also shown that the soft-robust agent interpolates between aggressive and robust strategies without being overly conservative which leads it to outperform robust policies under model uncertainty. Subsequent experiments should test the efficiency of soft-robustness on more complex domains with continuous action spaces. Garud N. Iyengar. Robust dynamic programming. Mathematics of Operations Research, 30(2):257–280, 2005. The chosen weighting over the uncertainty set can be thought as the way the adversary distributes over different transition laws. In our current setting, this adversarial distribution stays constant without accounting for the rewards obtained by the agent. Future work should address the problem of learning the sequential game induced by an evolving adversarial distribution to derive an optimal soft-robust policy. Other extensions of our work may also consider non-linear objective functions such as higher order moments with respect to the adversarial distribution. Vijay R. Konda and John N. Tsitsiklis. Actor-critic algorithms. In Advances in Neural Information Processing Systems, volume 12, 2000. References Andrew G. Barto, Richard S. Sutton, and Charles W. Anderson. Neuronlike adaptive elements that can solve difficult learning control problems. IEEE Transactions on Systems, Man, and Cybernetics, SMC-13(5):834 – 846, 1983. Shalabh Bhatnagar, Richard Sutton, Mohammad Ghavamzadeh, and Mark Lee. Natural Actor-Critic Algorithms. Automatica, elsevier edition, 2009. Vivek S. Borkar. Stochastic approximation with two timescales. Systems and Control Letters, 29:291–294, 1997. Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Open{AI} {G}ym. arXiv:1606.01540v1, 2016. Shirli Di-Castro Shashua and Shie Mannor. Deep robust {K}alman filter. arXiv preprint arXiv:1703.02310v1, 2017. Mohammad Ghavamzadeh and Yaakov Engel. Bayesian actor-critic algorithms. Proceedings of the 24th international conference on Machine learning, pages 297–304, 2007. Mohammad Ghavamzadeh, Shie Mannor, Joelle Pineau, and Aviv Tamar. Bayesian reinforcement learning: A survey. Foundations and Trends in Machine Learning, 8(5-6):359–492, 2015. Mohammad Ghavamzadeh, Yaakov Engel, and Michal Valko. Bayesian policy gradient and actor-critic algorithms. Journal of Machine Learning Research, 17(66): 1–53, 2016. Ivo Grondman, Lucian Busoniu, Gabriel A.D. Lopes, and Robert Babuska. A survey of actor-critic reinforcement learning: Standard and natural policy gradients. IEEE Transactions on Systems, Man, and Cybernetics—Part C: Applications and Reviews, 42(1291-1307), 2012. Harold J. Kushner and Dean S. Clark. Stochastic Approximation Methods for Constrained and Unconstrained Systems. Springer Verlag, 1978. Harold J. Kushner and G. George Yin. Stochastic Approximation Algorithms and Applications. Springer Verlag, New York, 1997. Shiau Hong Lim, Huan Xu, and Shie Mannor. Reinforcement learning in robust markov decision processes. Mathematics of Operations Research, 41(4): 1325–1353, 2016. Daniel J Mankowitz, Timothy A Mann, Shie Mannor, Doina Precup, and Pierre-Luc Bacon. Learning robust options. In AAAI, 2018. Shie Mannor, Duncan Simester, Peng Sun, and John N. Tsitsiklis. Bias and variance approximation in value function estimates. Management Science, 53(2):308– 322, 2007. Shie Mannor, Ofir Mebel, and Huan Xu. Lightning does not strike twice: Robust {MDP}s with coupled uncertainty. In ICML, 2012. Shie Mannor, Ofir Mebel, and Huan Xu. Robust {MDP}s with k-rectangular uncertainty. Mathematics of Operations Research, 41(4):1484–1509, 2016. Danny Miller and Peter H. Friesen. Innovation in conservative and entrepreneurial firms: Two models of strategic momentum. Strategic Management Journal, 1982. Olivia S. Mitchell and Kent Smetters. The Market for Retirement Financial Advice. Oxford University Press, first edition edition, 2013. Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing {A}tari with deep reinforcement learning: Technical report. DeepMind Technologies, arXiv:1312.5602, 2013. Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518:529–533, 2015. Arnab Nilim and Laurent El Ghaoui. Robust control of {M}arkov decision processes with uncertain transition matrices. Operations Research, 53(5):783–798, 2005. Martin L. Puterman. Markov decision processes: Discrete stochastic dynamic programming, volume 414. Wiley Series in Probability and Statistics, 2009. Aurko Roy, Huan Xu, and Sebastian Pokutta. Reinforcement learning under model mismatch. 31st Conference on Neural Information Processing Systems, 2017. Richard S. Sutton, David McAllester, Satinger Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in Neural Information Processing Systems, volume 12, pages 1057–1063, 2000. Aviv Tamar, Shie Mannor, and Huan Xu. Scaling up robust {MDP}s using function approximation. ICML, 32:1401–1415, 2014. Aviv Tamar, Yinlam Chow, Mohammad Ghavamzadeh, and Shie Mannor. Policy gradient for coherent risk measures. In Advances in Neural Information Processing Systems, pages 1468–1476, 2015. Christopher J. C. H. Watkins and Peter Dayan. Q-learning. Machine Learning, 8:279–292, 1992. Marco Wiering and Martijn van Otterlo. Reinforcement Learning: State-of-the-Art. 12. Springer-Verlag Berlin Heidelberg, 2012. Huan Xu and Shie Mannor. Distributionally robust {M}arkov decision processes. Mathematics of Operations Research, 37(2):288–300, 2012. Pengqian Yu and Huan Xu. Distributionally robust counterpart in {M}arkov decision processes. IEEE Transactions on Automatic Control, 61(9):2538 – 2543, 2016. Appendix A A.1 Proofs Proposition 3.1 Proof. Fix x, y ∈ X . For any policy π, we denote by p(x, y) the probability of getting from state x to state y, which can be written as Ea∼π(x) [p(x, a, y)]. Since ω is non-diffuse, there exists p0 such that ω(p0 ) > 0. Also, by Assumption 3.1, there exists an integer n such that pn0 (x, y) > 0. We thus have n p̄ (x, y) = Ep∼ω [p] (x, y)  n n p̄ (x, y) ≥ p0 ω(p0 ) (x, y) n  p̄n (x, y) ≥ pn0 (x, y)ω(p0 )n > 0 which shows that p̄ is irreducible. Using the same reasoning, we show {n ∈ N : pn0 (x, x) > 0} ⊂ {n ∈ N : p̄n (x, x) > 0} and then use the fact that p0 is aperiodic to conclude that p̄ is aperiodic too. A.2 Proposition 3.2 This recursive equation comes from the same reasoning as in Lemma 3.1 of Xu and Mannor [2012]. We apply it to the average reward criterion. Proof. For every p ∈ P, we can apply the Poisson equation to the corresponding model: ! Jp (π) + Vpπ (x) = X X π(x, a) r(x, a) + p(x, a, x 0 )Vpπ (x0 ) x0 ∈X a∈A By integrating with respect to ω we obtain: ! ¯ J(π) + V̄ π (x) = X π(x, a) r(x, a) + X Ep∼ω [p(x, a, x 0 )Vpπ (x0 )] x0 ∈X a∈A We then use the statewise independence assumption on ω to make the recursion explicit. We thus have (1) ¯ J(π) + V̄ π (x) = X a∈A (2) =   X Z 0 π 0 0 0 π(x, a) r(x, a)+ p(x, a, x )Vp (x )dωx (px )dωx (px ) x0 ∈X ! X π(x, a) r(x, a) + X Epx ∼ωx [p(x, a, x a∈A x0 ∈X X X 0 )]Epx0 ∼ωx0 [Vpπ (x0 )] ! = a∈A π(x, a) r(x, a) + 0 π 0 p̄(x, a, x )V̄ (x ) , x0 ∈X where (1) results from the rectangularity assumption on ω. (2) Since p(x, a, x0 ) is an element of vector px that only depends on the uncertainty set at state x and Vpπ (x0 ) depends on the uncertainty set at state x0 , we can split the integrals. We slightly abuse notation here because a state can be visited multiple times. In fact, we implicitly introduce dummy N+∞ states and treat multiple visits to a state as visiting different states. More explicitely, we write ω as ω = t=0 ωx,t where ωx,t = ωx , ωx being the distribution at state x. This representation is termed as the stationary model in Xu and Mannor [2012]. A.3 Corollary 3.1 Proof. According to Proposition 3.2 and summing up both sides of the equality with respect to the stationary distribution d¯π , we have ! X X X X π π π 0 π 0 ¯ J(π) + d¯ (x)V̄ (x) = d¯ (x) π(x, a) r(x, a) + Ep ∼ω [p(x, a, x )]V̄ (x ) x x∈X x∈X a∈A x0 ∈X X X x ! X = d¯π (x) x∈X π(x, a) r(x, a) + 0 π 0 p̄(x, a, x )V̄ (x ) x0 ∈X a∈A Since d¯π is stationary with respect to p̄, we can then write X ¯ J(π) + X d¯π (x)V̄ π (x) = x∈X d¯π (x) x∈X X π(x, a)r(x, a) + X d¯π (x0 )V̄ π (x0 ). x0 ∈X a∈A It remains to simplify both sides of the equality in order to get the result. A.4 Theorem 4.1 We use the same technique as in Mankowitz et al. [2018]; Sutton et al. [2000] in order to prove a soft-robust version of policy-gradient theorem. Proof. X ∇θ V̄ π (x) = ∇θ π(x, a)Q̄π (x, a) a∈A  X π π π ∇θ V̄ (x) = ∇θ π(x, a)Q̄ (x, a) + π(x, a)∇θ Q̄ (x, a) a∈A   X X π 0 π 0 ¯ ∇θ V̄ (x) = ∇θ π(x, a)Q̄ (x, a) + π(x, a)∇θ r(x, a) − J(π) + p̄(x, a, x )V̄ (x ) π (1) x0 ∈X a∈A   X X π π 0 π 0 ¯ ∇θ V̄ (x) = ∇θ π(x, a)Q̄ (x, a) + π(x, a) −∇θ J(π) + p̄(x, a, x )∇θ V̄ (x ) x0 ∈X a∈A X  X π 0 π 0 ¯ ∇θ J(π) = ∇θ π(x, a)Q̄ (x, a) + π(x, a) p̄(x, a, x )∇θ V̄ (x ) − ∇θ V̄ π (x) x0 ∈X a∈A X (2) ¯ d¯π (x)∇θ J(π) = X d¯π (x) X x∈X x∈X a∈A X X X ¯ d¯π (x)∇θ J(π) = x∈X d¯π (x) x∈X − ∇θ π(x, a)Q̄ (x, a) + X π(x, a) X π ∇θ π(x, a)Q̄ (x, a) + d¯π (x) x∈X X  X p̄(x, a, x )∇θ V̄ (x ) − d¯π (x)∇θ V̄ π (x) 0 0 π x0 ∈X a∈A a∈A X π X a∈A π(x, a) x∈X X 0 p̄(x, a, x )∇θ V̄ (x0 ) π x0 ∈X d¯π (x)∇θ V̄ π (x) x∈X X (3) ¯ d (x)∇θ J(π) = X ¯ ∇θ J(π) = X ¯π x∈X x∈X d¯π (x) X ∇θ π(x, a)Q̄π (x, a) + X x0 ∈X a∈A d¯π (x0 )∇θ V̄ (x0 ) − X d¯π (x)∇θ V̄ π (x) x∈X π ∇θ π(x, a)Q̄ (x, a) a∈A P ¯π where (1) occurs thanks to the soft-robust Poisson equation. (2) Multiply both sides of the Equation by x∈X d (x). (3) P P P π π 0 π 0 ¯ ¯ ¯ Since d (x) is stationary with respect to p̄, we have that x∈X d (x) a∈A π(x, a)p̄(x, a, x ) = x0 ∈X d (x ). A.5 Theorem 4.2 Proof. Recall the mean squared error: X π E (w) := x∈X d¯π (x) X  2 π π(x, a) Q̄ (x, a) − fw (x, a) a∈A with respect to the soft-robust state distribution d¯π (x). If we derive this distribution with respect to the parameters w and analyze it when the process has converged to a local optimum as in Sutton et al. [2000], then we get:   X X d¯π (x) π(x, a) Q̄π (x, a) − fw (x, a) ∇w fw (x, a) = 0 x∈X a∈A Additionally, the compatibility condition ∇w fw (x, a) = ∇θ log π(x, a) yields:   X X d¯π (x) π(x, a) Q̄π (x, a) − fw (x, a) ∇θ π(x, a) 1 π(x, a) a∈A   X X d¯π (x) ∇θ π(x, a) Q̄π (x, a) − fw (x, a) x∈X x∈X = 0 = 0 a∈A Subtract this quantity from the soft-robust policy gradient (Theorem 4.1). We then have:   X X X X π π π π ¯ ¯ ¯ ∇θ J(π) = d (x) ∇θ π(x, a)Q̄ (x, a) − d (x) ∇θ π(x, a) Q̄ (x, a) − fw (x, a) x∈X = X x∈X A.6 a∈A d¯π (x) X x∈X a∈A ∇θ π(x, a)fw (x, a). a∈A Convergence Proof for SR-AC We define as soft-robust TD-error at time t the following random quantity: X δt := rt+1 − Jˆt+1 + p̄(xt , at , x0 )V̂x0 − V̂xt x0 ∈X ¯ where V̂xt and Jˆt are unbiased estimates that satisfy E[V̂xt | xt , π] = V̄ π (xt ) and E[Jˆt+1 | xt , π] = J(π) respectively. π We can easily show that this defines an unbiased estimate of the soft-robust advantage function Ā [Bhatnagar et al., ¯ 2009]. Thus, using equation (1), an unbiased estimate of the gradient ∇θ J(π) can be obtained by taking d ∇ θ J(π) := δt ψxt at . Similarly, recall the soft-robust TD-error with linear function approximation at time t: X δt := rt+1 − Jˆt+1 + p̄(xt , at , x0 )vtT ϕx0 − vtT ϕxt , x0 ∈X where vt corresponds to the current estimate of the soft-robust value function parameter. As in regular MDPs, when doing linear TD learning, the function approximation of the value function introduces a bias in the gradient estimate Bhatnagar et al. [2009]. Define the quantity Ve π (x) = X a∈A   X ¯ π(x, a) r(x, a) − J(π) + p̄(x, a, x0 )vπT ϕx0 x0 ∈X where vπT ϕx0 is an estimate of the value function upon convergence of a TD recursion, that is vπ = limt→∞ vt . Also, define as δtπ the associated error upon convergence: X δtπ := rt+1 − Jˆt+1 + p̄(xt , at , x0 )vπT ϕx0 − vπT ϕxt . x0 ∈X Similarly to Lemma 4 of Bhatnagar et al. [2009], the bias of the soft-robust gradient estimate is given by eπ := X   d¯π (x) ∇θ Ve π (x) − ∇θ vπT ϕx , x∈X π d ¯ that is E[∇ θ J(π) | θ] = ∇θ J(π) + e . This error term then needs to be small enough in order to ensure convergence of the algorithm. Let denote as V̄ (v) := Φv the linear approximation to the soft-robust differential value function defined earlier, where Φ ∈ Rn×d2 is a matrix and each feature vector ϕx (k) corresponds to the k th column in Φ. We make the following assumption: Assumption A.1. The basis functions ϕx ∈ Rd2 are linearly independent. In particular, Φ has full rank. We also have Φv 6= e for all value function parameters v ∈ Rd2 where e is a vector of all ones. The learning rates αt and 1) Pβt (Lines P7 and 8 in Algorithm P P are established such that αt → 0 slower than βt → 0 as t → ∞. In addition, t αt = t βt = ∞ and t αt2 , t βt2 < ∞. We also set the soft-robust average reward step-size ξt = cαt for a positive constant c. The soft-robust average reward, TD-error and critic will all operate on the faster timescale αt and therefore converge faster. Eventually, define a diagonal matrix D where the steady-state distribution d¯π forms the diagonal of this matrix. We write the soft-robust transition probability matrix as: X P̄ π (x, x0 ) = π(x, a)p̄(x, a, x0 ), a∈A π n where x, P x0 ∈ X and p̄ designates the P average transition model. By denoting R ∈ R the column vector of rewards ( a∈A π(x1 , a)r(x1 , a), · · · a∈A π(xn , a)r(xn , a))T where (x1 , . . . , xn ) is a numbered representation of the state-space and using the following operator T : Rn → Rn , we can express the soft-robust Poisson equation as: ¯ T (J) = Rπ − J(π)e + P̄ π J The soft-robust average reward iterates (Line 5) and the critic iterates (Line 7) defined in Algorithm 1 converge almost surely, as stated in the following Lemma which is a straightforward application of Lemma 5 from Bhatnagar et al. [2009]. Lemma A.1. For any given policy π and {Jˆt }, {vt } as in the soft-robust average reward and critic updates, we have ¯ Jˆt → J(π) and vt → v π almost surely, where X X ¯ J(π) = d¯π (x) π(x, a)r(x, a) x∈X a∈A π is the average reward under policy π and v is the unique solution to ΦT DΦv π = ΦT DT (Φv π ) Thanks to all the previous results, convergence of Algorithm 1 can be established by applying Theorem 2 from Bhatnagar et al. [2009] which exploits Borkar’s work on two-timescale algorithms [1997]. For simplicity, we assume that the iterates resulting from the actor update (Line 10 of Algorithm 1) in SR-AC remain bounded, although one could prove convergence without such an assumption by incorporating an operator that projects any policy parameter to a compact set, as described in Kushner and Clark [1978]. The resulting actor update would then be the projected value of the predefined iterate. The convergence result is presented as Theorem A.1. Theorem A.1. Under all the previous assumptions, given  > 0, there exists δ > 0 such that for a parameter vector θt , t ≥ 0 obtained using the algorithm, if supπt keπt k < δ, then the SR-AC algorithm converges almost surely to an ¯ -neighborhood of a local maximum of J. B B.1 Experiments One-step MDP Model Parameters Nominal probability of success Uncertainty set for probabilities of success Weighting Distribution 1 Weighting Distribution 2 Aggressive rewards Soft robust rewards Robust rewards Value 0.8 [0.1, 0.7, 0.8, 0.3, 0.5] [0.47, 0.22, 0.1, 0.09, 0.12] [0.63, 0.04, 0.05, 0.02, 0.26] 105 ; −105 5000; −100 2000; 0 Hyperparameters Critic Learning rate α Actor Learning rate β Step size ξ Number of linear features Number of episodes for training Mtrain Number of episodes for testing Mtest Value 5e-3 5e-5 3α 5 3000 600 2.0 1e4 1.5 Average reward 1.0 0.5 0.0 0.5 1.0 Aggressive Policy Soft-Robust Policy 2 Robust Policy 1.5 2.0 0.0 0.2 0.4 0.6 Probability of Success 0.8 1.0 Figure 5: Average reward for different probabilities of success (distribution 2). Soft-robust policy interpolates between aggressive and robust strategies. B.2 Cart-Pole example Hyperparameters Discount factor γ Learning rate Mini-batch size Final epsilon Target update interval Max number of episodes for training Mtrain Number of episodes for testing Mtest Value 0.9 1e-4 256 1e-5 10 3000 600 We trained a soft-robust agent on a different weighting over the uncertainty set. Figure 6 shows the performance of the resulting strategy that presents a similar performance as the robust agent. This stronger form of robustness demonstrates the flexibility we have on the way we fix the weights, which leads to more or less aggressive behaviors. 250 Average reward 200 150 100 50 0 DQN Robust DQN Soft-Robust DQN 2 1 2 3 Pole Length 4 5 Figure 6: Average reward performance for DQN, robust DQN and soft-robust DQN (distribution 2). Soft-robust policy interpolates between aggressive and robust strategies.
2cs.AI
Indexing Variation Graphs∗ Jouni Sirén† arXiv:1604.06605v4 [cs.DS] 12 Jan 2017 Abstract Variation graphs, which represent genetic variation within a population, are replacing sequences as reference genomes. Path indexes are one of the most important tools for working with variation graphs. They generalize text indexes to graphs, allowing one to find the paths matching the query string. We propose using de Bruijn graphs as path indexes, compressing them by merging redundant subgraphs, and encoding them with the Burrows-Wheeler transform. The resulting fast, space-efficient, and versatile index is used in the variation graph toolkit vg. 1 Introduction Sequence analysis pipelines typically start with mapping the reads from the sequenced genome to a reference genome of the same species. As reference genomes are usually assembled from the genomes of a small number of individuals, they are biased towards those individuals. This reference bias may affect the results of subsequent analysis, especially when the sequenced individuals are from different populations than the ones behind the reference genome. Variation graphs (also graph genomes, genome graphs, graph references, or reference graphs), which encode the genetic variation within a population as a graph, have been proposed as a solution to the reference bias [37, 28, 6, 8, 29]. These graphs are expected to replace sequences as reference genomes. The shift to graphs will likely take years, as new methods and tools are needed to replace those based on linear references. The variation graph toolkit vg [14] is a community effort to develop such tools. This paper describes GCSA2, the path index used in vg. A path index is a generalization of text indexes for labeled graphs. Given a query string, the index finds the paths with a label matching the query. Indexing graphs is inherently hard, as the number of paths increases exponentially with path length. The design of a path index is hence a tradeoff between maximum query length, index size, query performance, and pruning complex regions of the graph. Mapping reads to a graph was first investigated by Schneeberger et al. [42]. Sirén et al. developed ∗ Supported † Wellcome by the Wellcome Trust grant 098051. Trust Sanger Institute, UK. [email protected]. GCSA [43], which generalized the FM-index [10] (a text index based on the Burrows-Wheeler transform [4]) to directed acyclic graphs. GCSA depends on pruning the complex regions, as there are no limits on query length. Kim et al. [19] combined GCSA with the HISAT read aligner [20]. The result was the first practical graphbased read aligner, though it uses the graph for more accurate mapping to a linear reference. De Bruijn graphs can be used as k-mer indexes of other graphs. There are already read aligners based on them [23, 25]. The succinct de Bruijn graph of Bowe et. al. [3] encodes the graph with a generalization of the FM-index. Rødland [39] proposed another similar generalization. Succinct de Bruijn graphs can simulate order-k de Bruijn graphs for multiple values of k [2], but they still need to store the graph explicitly for the largest value of k. Other representations include compacted [5] and compressed [28] de Bruijn graphs, which represent unary paths in the graph as single nodes or edges. Probabilistic de Bruijn graphs [38] use Bloom filters to support faster queries, at the expense of producing false positives. All these space-efficient representations require several bits per k-mer for the graph, and more for mapping back to the indexed graph. Some path indexes store the graph as a collection of sequences. BWBBLE [17] uses the powerset alphabet for encoding substitutions and creates new sequences with a sufficient amount of context for other variants. vBWT [26] encodes variant sites explicitly in the sequence as X(A|B|C)Y , using distinct separator symbols for each site. Queries in both BWBBLE and vBWT are slower than in ordinary FM-indexes, as variant sites force the search to branch. The hypertext index [44] works with graphs that have string labels on the nodes. The strings are indexed using an FM-index. Partial matches in the strings are combined into full matches with range queries in the edge matrix. While matches crossing one edge are easy to find, the approach becomes impractical with matches crossing multiple edges. There are also structures (e.g. [18, 46, 7, 32, 33]) using graphs as a space-efficient way of indexing similar sequences. While the problem is different from indexing the paths in a graph, the techniques used are similar. The above methods can be classified in three categories based on the data models they use. Many deal with graphs arising from aligned sequences, assuming a shared global sequence with local variation. GCSAbased methods can index directed acyclic graphs, as well as cyclic graphs that are sufficiently similar to de Bruijn graphs. GCSA2, the hypertext index, and indexes based on de Bruijn graphs work with arbitrary graphs. GCSA2 combines ideas from the original GCSA and from succinct de Bruijn graphs. Conceptually it uses a de Bruijn graph as a k-mer index of a variation graph. The de Bruijn graph is pruned (compressed structurally) by using strings shorter than k characters as nodes, if the shorter strings identify the start nodes of the corresponding paths uniquely. The pruned graph is encoded with a generalization of the FM-index. GCSA2 often uses less space (e.g. less than 1 bit per k-mer) than other de Bruijn graph-based indexes, which have to store some information for each k-mer explicitly. The index also includes extensions based on suffix trees. The extensions are used for e.g. finding maximal exact matches in the vg read aligner. The main differences to the original GCSA are: 1. The graph encoding in GCSA2 has been optimized for small alphabets, improving query performance by up to an order of magnitude. 2. The construction algorithm stores the graphs on disk, reducing the memory requirements of building a whole-genome human index from hundreds of gigabytes to tens of gigabytes. and refer to substrings of length k as k-mers. Substring S[i, j] is a proper substring of string S, if S 6= S[i, j]. We say that string S 0 is a substring of string collection S, if it is a substring of a string S ∈ S. Sometimes we consider infinite character sequences S = (si )i∈Z , where set Z is a contiguous infinite subset of Z. The notion of substring generalizes to infinite sequences in a natural way. A substring of an infinite sequence S is left-infinite if it extends infinitely to the left, and right-infinite if it extends infinitely to the right. A substring of a finite or infinite sequence S is left-maximal if it is left-infinite or a prefix, and right-maximal if it is right-infinite or a suffix. We are primarily interested in sequences over the DNA alphabet {$, A, C, G, T, N}. Characters A, C, G, and T are called bases, while character N represents an arbitrary or unknown base. The alphabet may contain other technical characters in addition to the endmarker $. Each character c of the DNA alphabet has a complement c defined as A = T, C = G, G = C, T = A, and c = c for other characters c. Given a DNA sequence ← − S, its reverse complement is the sequence S obtained by reversing the non-technical parts of the sequence and replacing each character with its complement. For ←−−−−−− example, GATTACA$ = TGTAATC$. Given a string S[0, n − 1], we define S.rank(i, c) as the number of occurrences of character c in the prefix S[0, i − 1]. We also define S.select(i, c) = max{j ≤ n | S.rank(j, c) < i} 3. GCSA2 can index denser graphs, including cyclic as the position of the occurrence of character c with graphs, by limiting maximum query length. rank i > 0.1 A bitvector is a binary sequence supporting 4. GCSA2 extends the functionality of the FM-index efficient rank/select queries. Wavelet trees [16] are spacewith suffix tree operations. efficient data structures that use bitvectors to support rank/select queries on arbitrary strings. The first two improvements can also be used with the Let S be a string and S 0 be a string or an infinite original GCSA. The third point represents a different character sequence over alphabet Σ. We say that approach to indexing graphs. It was not possible the sequences S and S 0 prefix-match, if S is a prefix of S 0 or with the original GCSA, as the construction algorithm S 0 is a prefix of S. Set S of strings is prefix-free, if no required a prefix-range-sorted graph. The extended two strings S, S 0 ∈ S (with S 6= S 0 ) prefix-match. functionality depends on the new construction algorithm and on limiting maximum query length. 2.2 Text Indexes The suffix tree [47] is the most This paper describes the GCSA2 data structure. Its fundamental full-text index supporting substring queries. uses in the vg toolkit will be discussed in the vg paper. It is formed by taking the suffixes of the text, storing them in a trie, and compacting unary paths in the trie into single edges. Although fast and versatile, suffix 2.1 Strings A string S[0, n−1] = s0 · · · sn−1 of length trees are impractical with large texts, as they require |S| = n is a sequence of characters over an alphabet much more space than the text itself. Σ = {0, . . . , σ−1}. Text strings T [0, n−1] are terminated Suffix arrays (SA) [27] were introduced as a spaceby an endmarker T [n − 1] = $ = 0 not found anywhere efficient alternative to the suffix tree. The suffix array else in the text. A substring of string S is a sequence of 1 These definitions are used in the SDSL library [15]. We assume the form S[i, j] = si · · · sj . We call substrings of the type S[0, j] and S[i, n − 1] prefixes and suffixes, respectively, for convenience that S.select(0, c) = −1. 2 Background Suffixes $ A$ ATA$ ATCATA$ CATA$ CATCATA$ GCATCATA$ TA$ TCATA$ LF BWT Suffixes 1 7 4 5 8 6 0 2 3 A T C C T G $ A A $ A$ ATA$ ATCATA$ CATA$ CATCATA$ GCATCATA$ TA$ TCATA$ SA LCP 8 7 5 2 4 1 0 6 3 0 0 1 2 0 3 0 0 1 pointer. If we find a sample at SA[LFk (i)], we know that SA[i] = (SA[LFk (i)] + k) mod n. If we have sampled one out of d suffix array pointers at regular intervals, finding each occurrence takes O(d) rank queries. If we also sample one out of d0 inverse suffix array pointers2 , we can extract an arbitrary substring X of the text using O(|X| + d0 ) rank queries. The longest-common-prefix array (LCP array) [27] is an integer array LCP[0, n − 1], where each value LCP[i] tells the length of the longest common prefix of suffixes Figure 1: LF-mapping, BWT, suffix array, and LCP T [SA[i−1], n−1] and T [SA[i], n−1] (with LCP[0] = 0). If array for text GCATCATA$. we have the FM-index, the LCP array, and the topology of the suffix tree, we get the compressed suffix tree, which supports the full functionality of the suffix tree in a spaceof text T [0, n − 1] is an array of pointers SA[0, n − 1] efficient manner [40]. to the suffixes of the text in lexicographic order. We find the occurrences of pattern string X in the text in 2.3 Graphs A graph G = (V, E) consists of a set of O(|X| log n) time by using binary search in the suffix nodes V = {0, . . . , |V |−1} and a set of edges E ⊆ V ×V . array. The suffix array requires n log n bits of space We say that (u, v) ∈ E is an edge from node u to node in addition to the text, while its functionality is more v, and assume that the edges are directed : (u, v) 6= (v, u) limited than that of the suffix tree. See Figure 1 for an for u 6= v. The indegree G.in(v) of node v is the number example of the suffix array and related structures. of incoming edges to v, while the outdegree G.out(v) is The Burrows-Wheeler transform (BWT) [4] of text the number of outgoing edges from v. T [0, n − 1] is a permutation BWT[0, n − 1] such that The graphs we use are labeled with alphabet Σ: BWT[i] = T [(SA[i] − 1) mod n]. Given the lexicographic each node v ∈ V has a label G.label(v) ∈ Σ. A path in rank i of suffix T [SA[i], n−1], we can use LF-mapping on a graph is a sequence of nodes P = v0 · · · v|P |−1 such the BWT to find the lexicographic rank of the previous that (vi , vi+1 ) ∈ E for 0 ≤ i < |P | − 1. We say that v0 suffix T [(SA[i] − 1) mod n, n − 1]. Let is the start node and v|P |−1 is the end node of the path. The label of path P is the concatenation of node labels LF(i) = C[BWT[i]] + BWT.rank(i, BWT[i]), G.label(P ) = G.label(v0 ) · · · G.label(v|P |−1 ). If the graph has nodes with indegree or outdegree where C[c] is the number of occurrences of characters c0 < c in the BWT. Then SA[LF(i)] = (SA[i] − 1) mod n. 0, we add a source node s and a sink node t to it. To distinguish these technical nodes from the actual We generalize the definition to any character c ∈ Σ: nodes, we label them with characters G.label(s) = # LF(i, c) = C[c] + BWT.rank(i, c). and G.label(t) = $, which are not used anywhere else in the graph. We add an edge (s, v) to all nodes v ∈ V \ {s} 0 Let X be a string. If there are i suffixes S of text T with no incoming edges, and an edge (v, t) from all nodes 0 such that S < X in lexicographic order, then there are v ∈ V \ {t} with no outgoing edges. We also add edge LF(i, c) suffixes S 0 such that S 0 < cX. (t, s) to guarantee that G.in(v) ≥ 1 and G.out(v) ≥ 1 for We can use the BWT as a space-efficient text index. all nodes v ∈ V . However, this edge is not considered a The FM-index [10] combines a representation of the real edge, and no path can cross it. BWT supporting rank/select queries, the C array, and We also consider infinite paths P = (vi )i∈Z , genera set of sampled pointers from the suffix array. It uses alizing the definition in a similar way as we did with backward searching to find the lexicographic range of infinite character sequences in Section 2.1. We say that suffixes matching pattern X (having X as a prefix). If path P is left-maximal if it starts at the source node or the lexicographic range matching suffix X[i + 1, |X| − 1] extends infinitely to the left; right-maximal if it ends of the pattern is SA[sp, ep], the range matching suffix at the sink node or extends infinitely to the right; and X[i, |X| − 1] is SA[LF(sp, X[i]), LF(ep + 1, X[i]) − 1]. maximal if it is both left-maximal and right-maximal. Matching the entire pattern takes O(|X|) rank queries. We use the sampled suffix array pointers for finding 2 The suffix array is a permutation of {0, . . . , n − 1}, and the the text positions containing the occurrences. If SA[i] is not sampled, we iterate LF(i) until we find a sampled inverse suffix array is the inverse permutation. Given a graph G = (V, E), we may want to reason about the predecessors of a node with the given label. Let v ∈ V be a node and c ∈ Σ be a character. We write G.pred(v, c) to denote the set of nodes u ∈ V such that G.label(u) = c and there is an edge (u, v) ∈ E. We work with de Bruijn graphs and their generalizations. For that purpose, we define collections of (finite or infinite) sequences suitable for constructing order-k de Bruijn graphs. that includes directed acyclic graphs and de Bruijn graphs. Before indexing, we transform the graph into an equivalent graph, where the nodes can be sorted unambiguously by the labels of the right-maximal paths starting from them. The transformation increases the size of the graph exponentially in the worst case. In addition to sequences BWT and IN, GCSA also uses an outdegree bitvector OUT, which is encoded in the same way as IN. LF-mapping uses select queries on bitvector IN to map nodes to BWT ranges, ordinary LF-mapping Definition 2.1. (k-collection) Let S be a collection with BWT to map incoming edges to the corresponding of character sequences over alphabet Σ, and let k > 0 be outgoing edges, and rank queries on bitvector OUT to a parameter value. We say that S is a k-collection, if map the outgoing edges to the predecessor nodes. each sequence S ∈ S (a) is left-infinite or begins with #k ; (b) is right-infinite or ends with $k ; and (c) contains no 3 Path Indexes other occurrences of characters # and $. A path index is a generalization of text indexes for labeled Definition 2.2. (de Bruijn graph) Let k > 0, and graphs. Given a path index for input graph G = (V, E), let S be a k-collection. The order-k de Bruijn graph of we use the index to find the start nodes v0 ∈ V of the paths P = v0 · · · v|X|−1 matching pattern X (paths P S is a graph G = (V, E) such that with G.label(P ) = X). • each node vX ∈ V represents a distinct k-mer X The proofs of the lemmas can be found in Apoccurring in S, with G.label(vX ) = X[0]; pendix A. • each node vX ∈ V has a key G.key(vX ) = X; and 3.1 De Bruijn Graphs as Path Indexes The • each edge (vX , vY ) ∈ E represents a (k + 1)-mer k-mer index is the simplest path index. It consists X[0]Y = XY [k − 1] occurring in S. of a set of key-value pairs (X, VX ), where X ∈ Σk is a k-mer and VX ⊆ V is the set of the start nodes of the We use #k as the source node s and $k as the sink node paths matching the k-mer. If we store the pairs in a hash t, adding the edge (t, s) in the usual way. table, we can quickly search for patterns of length k. If De Bruijn graphs have several properties that make we use binary search in a sorted list of pairs, queries them useful for indexing purposes. Node keys prefix- become slower, but we gain the ability to search for match the labels of all paths starting from the node. patterns shorter than k characters. The main drawback This makes it possible to sort the nodes unambiguously of these basic k-mer indexes is their size, as they store by path labels. Every substring of the k-collection is the key-value pairs explicitly. We can represent k-mer indexes as de Bruijn graphs. the label of a path in the de Bruijn graph, and every path label of length at most k + 1 is a substring of the For that purpose, we define the de Bruijn graph of graph collection. In Section 3, we develop an index structure G = (V, E) by using the collection S of the labels of the maximal paths in the graph. If sequence S ∈ S is the based on a generalization of de Bruijn graphs. label of path P = (vi )i∈Z , we set S.node(S, i) = vi for 2.4 FM-Index for Graphs Suffix trees, suffix ar- all positions i ∈ Z. We transform S into a k-collection rays, and the FM-index can be generalized to index by inserting characters # to the beginning of each nonmultiple texts. There are also generalizations to other left-infinite sequence when necessary, and characters $ combinatorial structures. The XBW transform [9] is an to the end of each non-right-infinite sequence. If S[i] is a FM-index for labeled trees. The nodes of the tree are # we inserted, we set S.node(S, i) = s : j, where s ∈ V sorted by the path labels from the node to the root. BWT is the source node and j is the distance to the nearest stores the labels of the children of each node, while leaf non-inserted # in S. nodes are marked with special characters. If a node has k children, we encode that as a binary sequence 0k−1 1. We concatenate these sequences to form the indegree bitvector IN. The labels of the children of the ith node are found in BWT[IN.select(i, 1) + 1, IN.select(i + 1, 1)]. The generalized compressed suffix array (GCSA) [43] extends the XBW transform to a class of graphs Definition 3.1. (de Bruijn graph of a graph) Let G be a labeled graph, and let S be the k-collection of maximal path labels in G. The order-k de Bruijn graph of S is the order-k de Bruijn graph of graph G. Let G0 = (V 0 , E 0 ) be a de Bruijn graph of graph G = (V, E), and let S be the k-collection used to define it. We attach a set of nodes of graph G to each node v 0 ∈ V 0 as a value G0 .value(v): {S.node(S, i) | S ∈ S, S[i, i + k − 1] = G0 .key(v)}. Apart from some technicalities near the source/sink nodes, G0 .value(v) is the set of the start nodes of the paths matching pattern G0 .key(v) in graph G. The index produces no false negatives (path labels that exist in the input graph but not in the index). There may be false positives (path labels that exist in the index but not in the input graph) with patterns longer than k, but we can avoid them by verifying the results in the input graph. See Figure 2 for an example. We can encode the de Bruijn graph as a GCSA using (|V 0 | + o(|V 0 |))(log σ + 2) bits. By using a similar sampling scheme for the values as in the FM-index, we get a k-mer index that uses a couple of bytes per k-mer for typical variation graphs (see Section 5). While this is much less than with the basic k-mer indexes, it is still too much for large variation graphs. 3.2 Path Graphs When a path of length k < k has a unique label, its extensions become redundant nodes in the order-k de Bruijn graph, if the path branches after the first k 0 characters. By using shorter keys when possible, we can build a smaller graph that is equivalent to the de Bruijn graph as a path index. 0 Definition 3.2. (Path graph) Let k > 0, let S be the k-collection of the labels of the maximal paths in graph G = (V, E), and let K be a prefix-free set of substrings of length k or less from S. Assume that each right-maximal substring S ∈ S prefix-matches a string K ∈ K and that $k ∈ S. The order-k path graph of graph G with key set K is a graph G0 = (V 0 , E 0 ), where • Pattern X ∈ Σ∗ matches node v ∈ V 0 , if there is a path P 0 in G0 with G0 .label(P 0 ) = X. We use G0 .find(X) to denote the set of nodes VX0 ⊆ V 0 matching the pattern. • If VX0 ⊆ V 0 is the set of nodes matching pattern X, the set of Soccurrences for the pattern is G0 .locate(VX0 ) = v0 ∈V 0 G0 .value(v 0 ). We use X G0 .locate(X) to denote G0 .locate(G0 .find(X)). Lemma 3.1. (No false negatives) Let G0 = (V 0 , E 0 ) be a path graph of G = (V, E), and let X ∈ (Σ \ {#, $})∗ be a pattern. Set G0 .locate(X) contains the start nodes of all paths P in graph G with G.label(P ) = X. Lemma 3.2. (Context length) Let G0 = (V 0 , E 0 ) be a path graph, and let X ∈ (Σ \ {#, $})∗ be a pattern. Set G0 .f ind(X) consists of all nodes v 0 ∈ V 0 such that X[0, m − 1] is a prefix of G0 .key(v 0 ), for a context length m, which depends on the graph and the pattern. Lemma 3.3. (Short keys) Let G0 = (V 0 , E 0 ) be a path graph with |G0 .key(u0 )| ≤ |G0 .key(v 0 )| + 1 for all edges (u0 , v 0 ) ∈ E 0 . Then (a) |G0 .pred(v 0 , c)| ≤ 1 for all nodes v 0 ∈ V 0 and characters c ∈ Σ; and (b) key G0 .key(v 0 ) prefix-matches pattern X ∈ (Σ \ {#, $})∗ for all nodes v 0 ∈ G0 .find(X). A path graph may produce false positives with patterns longer than k 0 characters, where k 0 is the length of the shortest key. In the next section, we define a class of path graphs that can be proven to be equivalent to de Bruijn graphs. 3.3 Pruned de Bruijn Graphs We can compress de Bruijn graphs structurally by merging keys sharing a common prefix, if the corresponding values are identical. • each node vK ∈ V 0 represents a distinct key K ∈ K, These pruned de Bruijn graphs, which arise naturally with G0 .label(vK ) = K[0]; from GCSA construction, are similar to manifold de Bruijn graphs [24]. As path indexes, they are equivalent 0 • each node has a key G .key(vK ) = K and a value to de Bruijn graphs with patterns of length up to k 0 G .value(vK ) = VK , where VK is the set of nodes characters. S.node(S, i) ∈ V for S ∈ S and positions i such that S[i, i + |K| − 1] = K; and Definition 3.4. (Equivalent path graphs) Let G0 00 let k > 0 be a parameter • each edge (vK , vK 0 ) ∈ E 0 represents the occurrence and G be two path graphs, and 0 value. We say that graphs G and G00 are k-equivalent, 0 of substring K[0]K in S such that strings K and 0 00 if we have G .locate(X) = G .locate(X) for all patterns K[0]K 0 prefix-match. X ∈ (Σ \ {#, $})∗ with 1 ≤ |X| ≤ k. We use #k as the source node s and $k as the sink node Definition 3.5. (Pruned de Bruijn graph) Let G t, adding the edge (t, s) in the usual way. be a graph, and let G0 be an order-k path graph of G. Path graph G0 is an order-k pruned de Bruijn graph, if Definition 3.3. (Path graph as an index) 0 0 0 Let G = (V, E) be a graph, and let G = (V , E ) be a it is k-equivalent to the order-k de Bruijn graph of G. path graph of G. ATC 3 GCA 1 3:A 0:# 1:G 2:C 6:C 5:T 4:T CAT 2, 6 TCA 5 ATA 7 ATG 3 7:A 9:T 10:A 11:$ ### 0:2 ##G 0:1 #GC 0 TA$ 9 A$$ 10 $$$ 11 TTC 4 8:G GCT 1 CTT 2 TGT 5 GTA 8 TTG 4 Figure 2: Left: Input graph G = (V, E), with each node v ∈ V labeled with v : G.label(v). Right: The order-3 de Bruijn graph G0 = (V 0 , E 0 ) of graph G, with each node v 0 ∈ V 0 labeled with G0 .key(v 0 ) and G0 .value(v 0 ). Both: Edges (t, s) are not shown. The highlighted path in the de Bruijn graph is a false positive, as it consists of two disjoint paths in the input graph. Lemma 3.4. (No short false positives) Let G = (V, E) be a graph, let G0 = (V 0 , E 0 ) be an order-k pruned de Bruijn graph of graph G, and let X ∈ (Σ \ {#, $})∗ be a pattern with 1 ≤ |X| ≤ k. Then G0 .locate(X) is a set of start nodes v ∈ V of paths matching the pattern in graph G. and outdegrees in bitvectors IN and OUT, and store the predecessor labels in BWT. See Figure 3 for an example. If lexicographic range [spi+1 , epi+1 ] matches suffix X[i + 1, |X| − 1] of pattern X, we can find the range [spi , epi ] matching suffix X[i, |X| − 1] as Lemma 3.5. (Pruning) Let G = (V, E) be a graph, let G0 = (V 0 , E 0 ) be the order-k pruned de Bruijn graph of G with key set K, let K ∈ Σ∗ be a string of length |K| > 0, and let VK0 be the set of nodes v 0 ∈ V 0 having string K as a proper prefix of G0 .key(v 0 ). If |VK0 | > 0 and G0 .value(u0 ) = G0 .value(v 0 ) for all u0 , v 0 ∈ VK0 , the path graph with key set (K \ {G0 .key(v 0 ) | v 0 ∈ VK0 }) ∪ {K} is an order-k pruned de Bruijn graph of G. [spin , epin ] = [IN.select(spi+1 , 1) + 1, We can compress a de Bruijn graph structurally by merging sets of nodes sharing a common prefix of their keys, as long as the conditions of Lemma 3.5 hold. Let G0 = (V 0 , E 0 ) be an order-k pruned de Bruijn graph, and let G00 = (V 00 , E 00 ) be the same graph after further pruning. Each node v 00 ∈ V 00 is an equivalence class of nodes V 0 (v 00 ) ⊆ V 0 corresponding to a shared prefix G00 .key(v 00 ) of keys. For all v 0 ∈ V 0 (v 00 ), we have G0 .value(v 0 ) = G00 .value(v 00 ). See Figure 3 for an example of a pruned de Bruijn graph. Definition 3.6. (Maximally pruned graph) Let G0 be a a pruned de Bruijn graph of graph G. We say that G0 is maximally pruned, if we cannot prune it any further using Lemma 3.5. Lemma 3.6. (Maximal pruning) Let G0 = (V 0 , E 0 ) be a maximally pruned de Bruijn graph of G = (V, E). Then |G0 .key(u0 )| ≤ |G0 .key(v 0 )| + 1 for all (u0 , v 0 ) ∈ E 0 . 4 GCSA2 As in the original GCSA, we sort the nodes of the path graph in lexicographic order, encode the indegrees IN.select(epi+1 + 1, 1)]; [spout , epout ] = [LF(spin , X[i]), LF(epin + 1, X[i]) − 1]; [spi , epi ] = [OUT.rank(spout , 1), OUT.rank(epout , 1)]. In order to support locate queries, we sample the values of a node, if the node has multiple incoming edges or the values cannot be derived from the predecessor. We may also sample other values to improve query performance. The sampled nodes are marked in bitvector BS , the number of values in each sample is encoded in unary in bitvector BV , and the sampled values are stored in integer array VS . A detailed description of the data structure can be found in Appendix B. GCSA2 construction starts from paths of length k in the input graph. We build a maximally pruned order-2k, order-4k, or order-8k de Bruijn graph using a similar prefix-doubling algorithm as in the original GCSA [43], and encode the result as a GCSA. To avoid excessive memory usage, we keep the paths and the graphs on disk, and read only a single chromosome at a time into memory. The details of the construction algorithm can be found in Appendix C. We can improve the query performance with (maximally pruned) de Bruijn graphs by using a simplified encoding (Appendix D). We replace BWT and IN with bitvectors Bc for all c ∈ Σ, where Bc [j] = 1 if and only if node j in lexicographic order has a predecessor with ATC 3 CA 2, 6 TC 5 ATA 7 ATG 3 ### 0:2 ##G 0:1 #G 0 GC 1 TA 9 CT 2 TT 4 TG 5 A$ 10 $$$ 11 GT 8 key OUT BWT IN key BS $$$ A$ ATA ATC ATG CA CT GC GT TA TC TG TT #G ##G ### 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 A T C C C G T G # T A G A T A T C # # $ 1 1 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 1 $$$ A$ ATA ATC ATG CA CT GC GT TA TC TG TT #G ##G ### 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 BV VS 1 1 1 0 1 1 1 1 1 1 1 7 3 3 2 6 8 9 5 5 4 0:2 Figure 3: Left: An order-3 pruned de Bruijn graph G00 3-equivalent to the de Bruijn graph in Figure 2. Right: GCSA for graph G00 . Leftward arrows illustrate backward searching, with the red arrows showing it from T to AT. Rightward arrows mark the samples belonging to each node, with the blue ones showing them for node CAT. label c. This simplifies backward searching to spout = C[X[i]] + BX[i] .rank(spi+1 , 1); epout = C[X[i]] + BX[i] .rank(epi+1 + 1, 1) − 1; [spi , epi ] = [OUT.rank(spout , 1), OUT.rank(epout , 1)]. The compacted trie of keys resembles a suffix tree. We can simulate it space-efficiently by using the LCP array [1, 11], and thus extend GCSA2 to support many suffix tree operations. For example, we can search for maximal exact matches by using LF-mapping and parent queries [35], and use that as a basis for a read aligner similar to BWA-MEM [21]. We can also use document counting techniques [41] to quickly count the number of distinct matches in a lexicographic range. Further details of these extensions can be found in Appendix E. 5 Implementation and Experiments GCSA2 is the path indexing library of vg [14]. The implementation is written in C++, and the source code is available on GitHub.3 It depends on SDSL [15] and libstdc++ parallel mode. We use the simplified encoding (Appendix D) with fast non-compressed bitvectors in most index components. Bitvectors Bc for rare characters (N, #, and $) are compressed as sparse bitvectors [36]. We used a system with two 16-core AMD Opteron 6378 processors and 256 gigabytes of memory for the experiments, and stored all files on a distributed Lustre file system. The system was running Ubuntu 12.04 on Linux kernel 3.2.0. We used vg version 1.3.0 for processing the graphs and GCSA2 version 0.8 using SDSL version 2.1.1 for the benchmarks. All code was compiled with gcc/g++ version 4.9.2. 3 https://github.com/jltsiren/gcsa2 5.1 Construction Variation graphs, as defined in vg, use strings as node labels. A node can be traversed in both forward and reverse complement orientations, and edges may cross between the orientations. For indexing, the graph is implicitly converted into an input graph with single-character labels. We always sample the input graph nodes corresponding to the initial offsets of variation graph node labels. We built vg graphs from the human reference genome (GRCh37) and 1000 Genomes Project variation [45]. To avoid excessive growth, we removed paths where 16-mers crossed more than 4 nontrivial edges with vg mod -p -l -e 4, and subgraphs shorter than 100 bases with vg mod -S -l 100. We extracted all paths of length 16 from the forward strand of the graph. There were a total of 4.80 billion paths with 1.53 billion distinct labels. We then built GCSA with 1–3 doubling steps, producing order-32, order-64, and order-128 indexes. Tables 1 and 2 show construction requirements and index sizes, respectively. We can build a wholegenome index overnight using less than 96 gigabytes of memory, including disk cache. The index contains 1.031k ·2.348 billion k-mers, but the path graph only uses 4.4–5.7 billion nodes to represent them. For k = 128, GCSA2 requires 0.63 bits per k-mer, out of which 0.28 bits is used for the path graph. Extensions based on suffix trees increase the size to 1.08 bits per k-mer. Index construction uses more memory with k = 32 than with larger values of k. The order-32 path graph has more nodes, where we cannot derive the values from the predecessor node. As we sample more values, we need more memory in the final phase of construction. With larger values of k, the path graph resembles the input graph better, and we sample less values. For the same reason, index size decreases with larger values of k, even though the graph requires more space. k k-mers Nodes Graph Index With extensions 32 6.20G 4.37G 2.89 GB / 4.00 bits 9.50 GB / 13.2 bits 13.2 GB / 18.2 bits 64 16.7G 5.24G 3.46 GB / 1.78 bits 8.64 GB / 4.46 bits 13.6 GB / 6.99 bits 5.73G 3.78 GB / 0.28 bits 8.58 GB / 0.63 bits 14.6 GB / 1.08 bits 128 116G Table 2: GCSA2 index sizes. Order of the path graph; number of k-mers and nodes in the path graph in billions; index size in gigabytes and in bits per k-mer for the graph (Bc and OUT), the index (the graph, BS , BV , and VS ), and the index with the extensions from Appendix E. k 32 64 128 Time Memory Disk Read Write 7.44 h 59.8 GB 387 GB 1.37 TB 0.88 TB 10.4 h 51.9 GB 415 GB 2.03 TB 1.51 TB 14.1 h 52.3 GB 478 GB 2.78 TB 2.25 TB Table 1: GCSA2 construction. Order of the path graph; construction time in hours; peak memory and disk usage in gigabytes; and disk I/O volume for reading and writing in terabytes. 5.2 Queries We compared the query performance of the order-128 GCSA2 to several FM-indexes for the reference sequence. SSA is the SDSL implementation (csa_wt<>) of the succinct suffix array [30], using a Huffman-shaped wavelet tree on top of the BWT. As the default FM-index in SDSL, it prioritizes query performance over compression. We used SSA with SA sample period 17 for good locate performance. BWA is the FM-index in the Burrows-Wheeler Aligner [22] (version 0.7.15 with the default SA sample period 32). Optimized for DNA sequences, BWA indexes both the reference and its reverse complement. As building the original GCSA requires around 65n bytes of memory for a path graph with n nodes, we could not compare GCSA and GCSA2 directly on a system with 256 gigabytes of memory. Instead, we used RLCSA [31] (May 2016 version) as a proxy. The RLCSA is an FM-index for repetitive sequence collections using the same basic components as the original GCSA. Under a mixed query load, RLCSA with SA sample period 32 is 1.5x to 3x faster than GCSA, depending on algorithmic overhead and the mix of find and locate queries [43]. We extracted k-mers for k ∈ {16, 32, 64, 128} from the (non-pruned) vg graphs by using vg sim, filtered out k-mers consisting entirely of Ns, and queried for the remaining k-mers using a single thread. The results can be seen in Table 3. Backward searching in an FM-index stops early if there are no matches. In order to compare the find performance of the indexes reliably, we must hence concentrate on the 16-mers, where the fraction of matching patterns is similar for all indexes. GCSA2 and the fast FM-indexes (SSA and BWA) all have similar performance, while RLCSA is several times slower. As a result, we can estimate that find queries in GCSA2 are an order of magnitude faster than in GCSA. When comparing the locate performance of different FM-indexes, the distribution of the query positions should be close to uniform. Otherwise the biases from e.g. different suffix array sampling strategies or the variation in the number of distinct occurrences per node in GCSA2 can make the results unreliable. As the k-mers have been sampled uniformly from the variation graph, we get the best results with the 16-mers, where all indexes can match most of the patterns. GCSA2 uses denser SA sampling than the other indexes, with effective sample period 10.6. On the average, GCSA2 calls locate for 2.84 nodes per distinct value, making the amount of work comparable to sample period 30.2. SSA with sample period 17 is 2.4x faster than GCSA2, mostly because it has to do less work. BWA with sample period 32 is closer to GCSA2 in locate performance. RLCSA is slower than the other indexes, but the difference is smaller than with find queries due to the optimizations for retrieving suffix array ranges. Assuming that locate queries are 3x slower in GCSA than in RLCSA, as GCSA does not use the optimizations, we can estimate that GCSA2 is 4x faster than GCSA. The remaining queries, parent and count, take a fraction of a microsecond. As a parent query takes comparable time to a single step of backward searching, it will not be a bottleneck in finding maximal exact matches. Counting the number of distinct occurrences with a count query is faster than retrieving even a single occurrence. 6 Discussion GCSA2 is a path index for variation graphs. It uses a de Bruijn graph as a k-mer index of the variation graph, prunes it by merging redundant subgraphs, and encodes the result with a generalization of the FM-index. The index supports queries of length up to k exactly, and longer queries with false positives. GCSA2 also includes Patterns Index 351584 GCSA2 SSA BWA RLCSA 32 351555 GCSA2 SSA BWA RLCSA 64 351567 GCSA2 SSA BWA RLCSA 128 351596 GCSA2 SSA BWA RLCSA k 16 Found Nodes Occs find() parent() 347453 2477M 872M 4.75 μs 0.42 μs 301538 – 782M 6.00 μs – 320764 – 1564M 3.64 μs – 301538 – 782M 23.7 μs – 333258 112M 34.3M 10.8 μs 0.28 μs 153957 – 26.6M 10.9 μs – 156080 – 52.9M 6.57 μs – 153957 – 26.6M 47.6 μs – 326101 2.63M 1.35M 22.5 μs 0.26 μs 88184 – 0.84M 17.1 μs – 88786 – 1.60M 10.3 μs – 88184 – 0.84M 74.3 μs – 316500 0.32M 0.37M 45.3 μs 0.26 μs 35678 – 0.08M 23.5 μs – 35741 – 0.12M 14.0 μs – 35678 – 0.08M 91.7 μs – count() 0.87 μs – – – 0.38 μs – – – 0.29 μs – – – 0.26 μs – – – locate() 5.85 μs 2.43 μs 4.65 μs 8.12 μs 5.44 μs 2.16 μs 3.19 μs 5.87 μs 2.92 μs 1.89 μs 2.34 μs 5.97 μs 3.13 μs 3.47 μs 3.46 μs 12.9 μs Table 3: Query benchmarks using an order-128 GCSA2 and various FM-indexes. Pattern length; number of patterns; index type; number matching patterns, matching nodes, and distinct occurrences; average time for [sp, ep] = find(X), parent(sp, ep), and count(sp, ep) queries in microseconds; and average time per value for locate(sp, ep) queries in microseconds. extensions based on suffix trees; other extensions have been considered but not implemented (see Appendix F). The index is used in the variation graph toolkit vg for e.g. read alignment based on maximal exact matches. We can build a whole-genome index overnight on a system with 96 gigabytes of memory and a few hundred gigabytes of fast disk space. The resulting index takes less than 15 gigabytes, or 1.08 bits per k-mer for the order-128 index with extensions. Query performance is comparable to that of fast FM-indexes for sequences. The primary design goals for GCSA2 were query performance and index size. The index works with arbitrary graphs, supports queries that are long enough to map short reads in one piece without false positives, and provides several options for dealing with complex regions. Other path indexes work with a more restricted class of graphs [43, 17, 19, 26], are at least an order of magnitude slower [17, 26], require much more space [3, 38, 5, 28], or are theoretical proposals that have never been implemented [44]. We may want to determine whether a pattern matches known haplotypes or only their recombinations. As GCSA2 does not support this directly, vg must determine it afterwards using a separate structure [34]. The FM-index of alignment [32, 33] embeds the haplotypes directly in a GCSA-like index and reports the haplotypes matching the find query. While the solution depends on specific properties of the graph, it could be possible to extend it to work with any GCSA. Acknowledgements. The author thanks Erik Garrison, Richard Durbin, and Adam Novak for the fruitful discussions while developing the GCSA2 index. A Proofs of Lemmas Proof. [Lemma 3.1: No false negatives] Let S be the k-collection used for building the path graph, and let P be a path starting from v0 ∈ V with G.label(P ) = X. The collection contains a sequence S ∈ S such that S[i, i + |X| − 1] = X and S.node(S, i) = v0 . For all positions j with i ≤ j ≤ i + |X| − 1, there is a node vj0 ∈ V 0 with G0 .label(vj0 ) = S[j] and G0 .key(vj0 ) = S[j, j +|G0 .key(vj0 )|−1]. By definition, path 0 graph G0 has an edge (vj0 , vj+1 ) ∈ E 0 for all such positions 0 0 0 j. Hence P = vi · · · vi+|X|−1 is a path in G0 with G0 .label(P 0 ) = X. As path P 0 starts from node vi0 ∈ V 0 , node vi0 is included in the set G0 .find(X). Furthermore, v0 = S.node(S, i) ∈ G0 .value(vi0 ) ⊆ G0 .locate(X). Proof. [Lemma 3.2: Context length] If |X| ≤ 1, the statement is true by definition for m = |X|. Now let Mi+1 = G0 .find(X[i + 1, |X| − 1]) be the set of all nodes v 0 ∈ V 0 such that substring X[i + 1, i + mi+1 ] is a prefix of key G0 .key(v 0 ), and assume that the set is nonempty. Consider the set [ Mi = G0 .pred(v 0 , X[i]) = G0 .find(X[i, |X| − 1]). v 0 ∈Mi+1 There is an edge (u0 , v 0 ) ∈ E 0 if and only if key G0 .key(u0 ) prefix-matches string G0 .label(u0 ) · G0 .key(v 0 ). Hence key G0 .key(u0 ) prefix-matches string X[i, i + mi+1 ] for all nodes u0 ∈ Mi . Now let u0 ∈ V 0 be a node with key G0 .key(u0 ) prefixmatching string X[i, i + mi+1 ]. If the key is a prefix of string X[i, i + mi+1 ], there is an edge (u0 , v 0 ) ∈ E 0 to all nodes v 0 ∈ Mi+1 , and hence u0 ∈ Mi . Otherwise let S[j, j + |G0 .key(u0 )| − 1] = G0 .key(u0 ) be a substring of the k-collection used for building the path graph. As S[j + 1, j + mi+1 ] = X[i + 1, i + mi+1 ], the substring starting at S[j + 1] is represented by a node v 0 ∈ Mi+1 , and hence u0 ∈ Mi . Set Mi is the set of all nodes u0 ∈ V 0 such that substring X[i, i + mi+1 ] prefix-matches key G0 .key(u0 ). If |Mi | > 1, string X[i, i + mi+1 ] is a proper prefix of key G0 .key(u0 ) for all nodes u0 ∈ Mi due to the prefix-free property, and we can set mi = mi+1 + 1. Otherwise we set mi = min(mi+1 + 1, |G0 .key(u0 )|) for the only node u0 ∈ Mi . Proof. [Lemma 3.3: Short keys] (a) If node v has multiple predecessors with label c, the keys of the predecessors must be longer than string c · G0 .key(v 0 ), as the key set is prefix-free. (b) By the construction in the proof of Lemma 3.2, the context length for pattern X in graph G0 is min(|X|, |G0 .key(v 0 )|). 0 00 or (b) u00 = vK and u0 ∈ VK0 , and the same holds for 00 0 nodes v and v . We can hence transform any path in graph G0 into an equivalent path in graph G00 by 00 replacing nodes v 0 ∈ VK0 with node vK . 00 00 00 Let P = v0 · · · v|P 00 |−1 be a in graph G00 . We 0 transform it into an equivalent path P 0 = v00 · · · v|P 00 |−1 0 00 in graph G . There are two cases for |P | = 1. If 00 v000 = vK , we can replace it with any v00 ∈ VK0 . Otherwise we use the node v00 ∈ V 0 with G0 .key(v00 ) = G00 .key(v000 ). In the general case |P 00 | > 1, assume that we have 00 00 transformed the suffix v100 · · · v|P into 00 |−1 of path P 0 0 0 an equivalent path v1 · · · v|P 00 |−1 in graph G . Because G0 .value(v10 ) = G00 .value(v100 ), node v10 must have a predecessor with label c = G00 .label(v000 ). We can choose any such predecessor as node v00 . Consider the predecessors v 0 ∈ G0 .pred(v10 , c) and 00 v ∈ G00 .pred(v100 , c). Their keys prefix-match string Y = c · K1 . There are three cases: 1. If Y is a prefix of G0 .key(v 0 ), the key G0 .key(w0 ) of every successor w0 of node v 0 prefix-matches K1 and hence has K1 as a prefix. Therefore G0 .value(v 0 ) is the union of sets G.pred(v, c) over v ∈ G0 .value(v10 ). If Y is also a prefix of G00 .key(v 00 ), nodes v 0 and v 00 have identical value sets by the same reasoning. 2. If Y is a prefix of G0 .key(v 0 ) and G00 .key(v 00 ) is a proper prefix of Y , there is only one possible 00 predecessor v 00 = v000 . Hence v 0 ∈ VK0 and v000 = vK . Proof. [Lemma 3.4: No short false positives] We may assume without loss of generality that graph G0 is a 3. If key G0 .key(v 0 ) is a proper prefix of string Y , there de Bruijn graph. Let v 0 ∈ G0 .find(X) be a node. By is only one possible predecessor v 0 = v00 . Because Lemma 3.3, pattern X prefix-matches key G0 .key(v 0 ). key G00 .key(v000 ) prefix-matches string Y , it must For every node v ∈ G0 .value(v 0 ), there is a substring also be a proper prefix of the string. Hence either S[i, i + k − 1] = G0 .key(v00 ) in the k-collection S used 00 . G0 .key(v00 ) = G00 .key(v000 ) or v00 ∈ VK0 and v000 = vK 0 for building graph G , with S.node(S, i) = v. Prefix 0 0 00 00 S[i, i + |X| − 1] = X of the substring corresponds to a In every case, G .value(v0 ) = G .value(v0 ), and we can path with label X starting from node v in graph G. use shorter of strings Y and G00 .key(v000 ) as K0 . We can transform any path P 0 in graph G0 into Definition A.1. (Equivalent paths) an equivalent path P 00 in graph G00 , and the other 0 00 Let G and G be path graphs of the same graph, and way around. Because the labels of equivalent paths 0 00 let P 0 = v00 · · · vn−1 and P 00 = v00 · · · vn−1 be paths in and the value sets of their start nodes are identical, 0 00 graphs G and G , respectively. We say that paths P 0 we have G0 .locate(X) = G00 .locate(X) for all patterns and P 00 are equivalent, if for 0 ≤ i < n, keys G0 .key(vi0 ) X ∈ (Σ \ {#, $})∗ with |X| > 0. and G00 .key(vi00 ) have a common prefix Ki such that G0 .value(v 0 ) = G00 .value(v 00 ) for all nodes v 0 ∈ V 0 and Proof. [Lemma 3.6: Maximal pruning] Let Gd = (Vd , Ed ) the de Bruijn graph of graph G with the same order v 00 ∈ V 00 having Ki as a prefix of their keys. k as graph G0 , and let S be the k-collection used for 00 00 00 Proof. [Lemma 3.5: Pruning] Let G = (V , E ) be building the path graphs. If v 0 ∈ V 0 is a node, then the path graph corresponding to the new key set, let Gd .value(v) = G0 .value(v 0 ) for all nodes v ∈ Vd (v 0 ). 00 vK ∈ V 00 be the node with key K, and let S be the Assume that |G0 .key(u0 )| > |G0 .key(v 0 )| + 1 for an k-collection used to define the path graphs. edge (u0 , v 0 ) ∈ E 0 . String G0 .label(u0 ) · G0 .key(v 0 ) must 0 0 0 Consider the edge (u , v ) ∈ E defined by substring then be a prefix of key G0 .key(u0 ). There cannot be edges 0 S of S. The same substring also defines an edge (u0 , w0 ) to other nodes w0 = 6 v 0 , as keys G0 .key(v 0 ) and 00 00 00 00 00 0 0 0 0 (u , v ) ∈ E , where either (a) G .key(u ) = G .key(u ) G .key(w ) would prefix-match. Let S[i, i + |G0 .key(u0 )| − 1] = G0 .key(u0 ) be a the range [spi , epi ] = G0 .find(X[i, |X| − 1]): substring of S. Because G0 .key(v 0 ) is a substring of [spin , epin ] = [IN.select(spi+1 , 1) + 1, G0 .key(u0 ) and G0 is a pruned de Bruijn graph, the IN.select(epi+1 + 1, 1)]; set of nodes S.node(S, i + 1) over all occurrences of 0 0 0 0 0 substring G .key(u ) in S is G .value(v ). As node u has [spout , epout ] = [LF(spin , X[i]), no other successors, set G0 .value(u0 ) is the union of sets LF(epin + 1, X[i]) − 1]; G.pred(v, G0 .label(u0 )) over all nodes v ∈ G0 .value(v 0 ). [spi , epi ] = [OUT.rank(spout , 1), The above is true for all x0 ∈ G0 .pred(v 0 , G0 .label(u0 )). 0 OUT.rank(epout , 1)]. Hence we can prune graph G further using string 0 0 0 0 G .label(u ) · G .key(v ) as the new key in Lemma 3.5. We can think this as a generalization of LF-mapping: [spi , epi ] = G0 .LF([spi+1 , epi+1 ], X[i]). B GCSA for Path Graphs Query G0 .locate(X) retrieves the values G0 .value(v 0 ) 0 0 0 Let G = (V , E ) be a path graph. We sort the nodes for nodes v 0 ∈ G0 .find(X) and filters out duplicates. V 0 by their keys in lexicographic order and generate the Instead of storing the values explicitly for all nodes, sequences BWT, IN, and OUT from the nodes in that GCSA uses a sampling scheme to save space. We order. For each node v 0 ∈ V 0 , we append BWT with the assume that the nodes of the input graph G = (V, E) are predecessor labels G.label(u0 ) for all edges (u0 , v 0 ) ∈ E 0 ; conveniently chosen integers. If (u, v) ∈ E is the only 0 0 IN with the indegree encoded as 0G .in(v )−1 1; and OUT outgoing edge from node u and the only incoming edge 0 0 with the outdegree as 0G .out(v )−1 1. to node v, it should be that v = u + 1. If node v 0 ∈ V 0 has lexicographic rank i, the range of We sample the values G0 .value(v 0 ) for a node v 0 ∈ V 0 , 0 0 0 incoming edges (u , v ) ∈ E to that node is [spin , epin ] = (a) if there are multiple incoming edges to node v 0 ; [IN.select(i, 1) + 1, IN.select(i + 1, 1)]. The labels of (b) if v 0 is the source node s; or (c) if G0 .value(v 0 ) 6= the predecessor nodes are encoded in BWT[spin , epin ]. {u + 1 | u ∈ G0 .value(u0 )} for the only incoming edge Sorting the incoming edges by pairs (BWT[j], i), where (u0 , v 0 ) ∈ E 0 . We may also sample the values for some BWT[j] corresponds to edge (u0 , v 0 ) ∈ E 0 , is equivalent nodes on long unary paths for performance reasons. If to sorting them by strings G0 .label(u0 ) · G0 .key(v 0 ). As the set G0 .value(v 0 ) has not been sampled, we can derive multiple edges may have the same sort key, our sorting it from sampled values by following the incoming edges. algorithm must be stable. We get the desired sorting If node v 0 ∈ V 0 with lexicographic rank i has only order by using LF-mapping: j 7→ LF(j). one predecessor, the lexicographic rank of the predecessor The range of outgoing edges (u0 , v 0 ) ∈ E 0 from node is G0 .LF(i) = OUT.rank(LF(IN.select(i, 1) + 1), 1). If u0 ∈ V 0 with lexicographic rank i0 is [spout , epout ] = the lexicographic rank G0 .LFk (i) corresponding to node [OUT.select(i0 , 1)+1, OUT.select(i0 +1, 1)]. The edges are w0 ∈ V 0 is the first sampled node we encounter, we know already sorted by keys G0 .key(u0 ). Because graph G0 is a that G0 .value(v 0 ) = {w + k | w ∈ G0 .value(w0 )}. path graph, we know that key G0 .key(u0 ) prefix-matches Let BS [0, |V 0 |−1] be a bitvector. If we have sampled 0 0 0 0 string G .label(u ) · G .key(v ). The sorting orders are the values for the node v 0 ∈ V 0 with lexicographic therefore compatible. For every j ∈ [spin , epin ] for a rank i, we mark that as BS [i] = 1. We can then node v 0 ∈ V 0 , having LF(j) ∈ [spout , epout ] for a node determine the rank of node v 0 among the sampled nodes u0 ∈ V 0 implies an edge (u0 , v 0 ) ∈ E 0 . as j = BS .rank(i, 1). For each sampled node v 0 ∈ V , we 0 We use backward searching for query G .find(X). store the size of the value set |G0 .value(v 0 )| in another Let X ∈ (Σ \ {#, $})∗ be a pattern. If |X| = 0, query bitvector BV , using the same encoding as for bitvectors G0 .find(X) returns the lexicographic range [0, |V 0 | − 1] IN and OUT. We store the samples in array VS in the containing all nodes. Now assume that |X| ≥ 1 and same order, using log|V | bits each. The sampled values that G0 .find(X[i + 1, |X| − 1]) = [spi+1 , epi+1 ]. We want for node v 0 with rank j among the sampled nodes can to find the lexicographic range G0 .find(X[i, |X| − 1]), be found at VS [BV .select(j, 1) + 1, BV .select(j + 1, 1)]. which is the union of sets G0 .pred(v 0 , X[i]) over nodes v 0 ∈ G0 .find(X[i + 1, |X| − 1]). We map the node C Index Construction range [spi+1 , epi+1 ] to the range [spin , epin ] of incoming GCSA construction [43] is based on the prefix-doubling edges; the incoming edges to the corresponding range of algorithm for suffix array construction [27]. The original outgoing edges [spout , epout ]; and the outgoing edges to GCSA started from paths of length 1 in the input graph, and then repeatedly joined paths of length k into paths of length 2k, until each path had a distinct label. The resulting path graph was essentially an order-∞ pruned de Bruijn graph and supported queries of any length. We use a variant of that algorithm with GCSA2. Let G = (V, E) be the input graph. We extract all paths of length k (typically with k = 16) from graph G. For each path P = v0 · · · v|P |−1 , we store several fields. Key P.key encodes G.label(P ) as a sequence of lexicographic ranks of k-mers. If |P | is not an integer multiple of k, the key consists of the k-mer ranks for the lexicographically smallest (d|P |/ke · k)-mer having G.label(P ) as a prefix, followed by the rank of the last k-mer in the largest such (d|P |/ke · k)-mer. Value P.value is the start node v0 of the path. We store the set of predecessor labels {c ∈ Σ | |G.pred(v0 , c)| > 0} as P.pred. For each possible extension node v ∈ {v ∈ V | (v|P |−1 , v) ∈ E}, we create a separate copy of the path and store the node as P.ext = v. The construction uses several supporting structures. We build an order-k de Bruijn graph Gd = (Vd , Ed ) of the path labels and encode it as a GCSA, using the predecessor labels P.pred for determining the edges. Let v0 , . . . , v|Vd |−1 be the nodes of the de Bruijn graph in lexicographic order by their keys. We use two additional arrays: the LCP array LCP[0, |Vd | − 1], where LCP[i] is the length of the longest common prefix of keys Gd .key(vi−1 ) and Gd .key(vi ) (with LCP[0] = 0), and the last character array L[0, |Vd | − 1], where L[i] = Gd .key(vi )[k − 1]. The LCP array is stored as a wavelet tree for fast range minimum queries [13]. Because we store path labels explicitly, we only do a limited number of doubling steps, typically 2 or 3. After d doubling steps, the length of the paths is 2d k, and we can use them to build a maximally pruned order-(2d k) de Bruijn graph. Each doubling step consists of a pruning step, followed by an extension step. The pruning step applies a limited form of Lemma 3.5 to lexicographic ranges of paths. Given two paths P and P 0 , we can determine the length of the longest common prefix of the path labels by using the keys P.key and P 0 .key and the LCP array. If all paths sharing a prefix start from the same node, we merge them into a single path Q with Q.key based on the shared prefix and Q.ext = −1. The extension step transforms the current set of paths of length (up to) k 0 into a set of paths of length (up to) 2k 0 . If P is a path with P.ext = −1, we use it as such. If P.ext = P 0 .value for paths P and P 0 , we create a new path P P 0 . We set (P P 0 ).key according to the concatenation of the path labels, take value and pred from path P , and take ext from path P 0 . If we have another path Q with Q.key = P.key such that QP 0 is a path, and if P 0 .ext = −1, all possible 2k 0 -mer extensions of label G.label(P P 0 ) are also labels of paths starting from node Q.value, and the other way around. Hence paths P P 0 and QP 0 can be represented by a single node in a pruned de Bruijn graph. The doubling steps are followed by the merging step, which transforms the paths into the nodes of a maximally pruned de Bruijn graph G00 = (V 00 , E 00 ). We merge the paths with identical keys into the nodes of a pruned de Bruijn graph G0 = (V 0 , E 0 ). If paths P0 , · · · , Pm−1 all have the same key, we create a node v 0 ∈ V 0 with the shared key as G0 .key(v 0 ) and with Sm−1 G0 .value(v 0 ) = i=0 Pi .value. We also store the union Sm−1 of predecessor labels as v 0 .pred = i=0 Pi .pred. We then apply Lemma 3.5 maximally, transforming graph G0 into graph G00 . Storing the paths and the graphs may require hundreds of gigabytes of memory when indexing wholegenome variation graphs. To avoid that, we keep them on disk when possible. The subgraph corresponding to each chromosome is stored in a separate file, with paths sorted by their labels in lexicographic order. Extension steps are done separately for each of the chromosomes. The pruning step merges the sorted files. It keeps reading paths into a buffer, until it has found a maximal range of paths that can be merged. The merged path is written into the new file for that chromosome, and the original range of paths is removed from the buffer. The merging step works in a similar way. After creating the nodes V 00 of the maximally pruned order-k 0 de Bruijn graph G00 = (V 00 , E 00 ), we build the index. Sequences BWT and IN can be generated from the predecessor sets v 00 .pred, while the outdegree sequence OUT requires further processing. There is an edge (u00 , v 00 ) ∈ E 00 if and only if string c · G00 .key(v 00 ) prefix-matches key G00 .key(u00 ) and c ∈ v 00 .pred. We determine the edges and produce the outdegree sequence by scanning the node file sequentially with σ + 1 pointers. The pointer corresponding to node v 00 scans the entire file, while each of the remaining σ pointers scans only the range of nodes u00 with G00 .label(u00 ) = c for a character c ∈ Σ. We also sample the nodes for locate queries during the same scans. Checking whether key G00 .key(u00 ) prefix-matches string c · G00 .key(v 00 ) can be done by using the GCSA for de Bruijn graph Gd = (Vd , Ed ) and the last character array L. If the lexicographic rank of k-mer X is i, the lexicographic rank of k-mer (cX)[0, k − 1] is Gd .LF(i, c). If 2k-mer X is encoded with k-mer ranks (i, j), we can encode string cX as a lexicographic range of k-mer rank sequences, with (Gd .LF(i, c), Gd .LF(j, L[i]), Gd .LF(0, L[j])) as the lower bound and Gd .LF(|Vd | − 1, L[j]) as the last rank in the upper bound. String c · G00 .key(v 00 ) prefixmatches key G00 .key(u00 ) if and only if the lexicographic ranges of the k-mer rank sequences overlap. Complex regions of the variation graph must be pruned before indexing. While this happens before index construction begins, the construction algorithm has fea- tures that can make the pruning less destructive. Pruning heuristics often create regions that are completely missing from the index. The same mechanism that saves memory by having each chromosome in a separate file can be used to index overlapping subgraphs without indexing any paths between them. By having the pruned graph in one file and the reference path in another file, we can guarantee that no region is completely missing from the index. We can also index selected paths in complex regions by duplicating nodes for prefix-doubling and mapping the duplicates back to the original nodes during the merging step. If we index the paths corresponding to known haplotypes in complex regions, we can guarantee that the index contains all observed variation. D Simplified GCSA Encoding Let G0 = (V 0 , E 0 ) be a path graph with G0 .pred(v 0 , c) ≤ 1 for all nodes v 0 ∈ V 0 and characters c ∈ Σ. This is true for de Bruijn graphs, and also for maximally pruned de Bruijn graphs (Lemmas 3.6 and 3.3). We can use the simplified encoding of the original GCSA [43] with such path graphs. We replace the sequences BWT and IN with indicator bitvectors Bc [0, |V 0 | − 1] for all c ∈ Σ. If node v 0 ∈ V with lexicographic rank i has a predecessor with label c ∈ Σ, we set Bc [i] = 1. The backward step becomes: spout = C[X[i]] + BX[i] .rank(spi+1 , 1); epout = C[X[i]] + BX[i] .rank(epi+1 + 1, 1) − 1; [spi , epi ] = [OUT.rank(spout , 1), OUT.rank(epout , 1)]. Two expensive queries (IN.select() and BWT.rank()) are replaced with a cheap Bc .rank(). Computing G0 .LF(i) can expensive, as we have to look at Bc [i] for all c ∈ Σ to determine the character used in the backward step. If the alphabet is small, this is still faster than the select queries in the general encoding. We can further improve the time/space tradeoff by compressing the bitvectors Bc for rare characters (e.g. N, #, and $) and checking Bc [i] first for the frequent characters (e.g. bases) when computing G0 .LF(i). E Suffix Tree of a Path Graph resented by the lexicographic range [sp, ep] matching the path label `(v) from the root to the node. These ranges can be determined from the LCP array. If we use the FM-index with an LCP array supporting next/previous smaller value queries and range minimum queries, we can support the full functionality of the suffix tree [11]. If we build an x-ary tree over the LCP array, with each internal node storing the minimum LCP value in the corresponding range, we can support the required queries in O(x logx |V 0 |) time with O(logx |V 0 |) random x memory accesses, while using x−1 |V 0 | log k bits of space. Because the nodes of a path graph may match patterns that do not prefix-match their keys, we have to be careful with the suffix tree operations we use. By Lemma 3.2, the ranges returned by find queries always correspond to prefixes of the pattern. Hence we can safely use parent queries with such ranges.4 BWA-MEM [21] aligns reads to a reference genome by finding maximal exact matches between the read and the reference. It indexes both the reference and its reverse complement, allowing it to extend the pattern in both directions. GCSA cannot use similar techniques, as we cannot guarantee that the length of the lexicographic range matching pattern X is the same as the length of ← − the range matching its reverse complement X (that the ← − key set contains key K if and only if it contains key K ). However, we can search for maximal exact matches by using LF-mapping and the parent operation [35]. In an ordinary FM-index, the length of a lexicographic range tells the number of distinct pointers in the range. In GCSA, each node v 0 ∈ V 0 may have multiple values (pointers), and a value may occur in multiple nodes. As locate queries can be slow, we need another way to support efficient counting queries. The problem is similar to determining the document frequency of a pattern. Given a collection of documents, the document frequency of pattern X is the number of distinct documents that contain occurrences of the pattern. We can use a bitvector of length 2n − d − 1, where n is the total size of the document collection and d is the number of documents, to compute the frequencies efficiently [41]. Let v be a suffix tree node corresponding to lexicographic range [sp, ep], and let count(v) be the document frequency of the label `(v). If nodes v0 , . . . , vm−1 are the children of node v,Pthe number of redundant documents m−1 in them is R(v) = i=0 count(vi )−count(v). We create an array R[0, n − 2] based on the inorder traversal of the suffix tree. If the ith internal node we encounter is our first visit to node v, we set R[i] = R(v). We set R[j] = 0 for any subsequent visits to the same node. Range Let G0 = (V 0 , E 0 ) be an order-k path graph, and let 0 v00 , . . . , v|V 0 |−1 be its nodes in lexicographic order. The LCP array of graph G0 is an array LCP[0, |V 0 |−1], where LCP[i] is the length of the longest common prefix of keys 0 G0 .key(vi−1 ) and G0 .key(vi0 ), with LCP[0] = 0. If we build a trie of keys G0 .key(v 0 ) for v 0 ∈ V 0 and compact the unary paths into single edges, the resulting tree can be considered the suffix tree of graph G0 . 4 The shorter query in the variable-order de Bruijn graph [2] is The LCP interval tree [1] is an alternate representation of the suffix tree. Each node v of the suffix tree is rep- essentially a parent query. R[sp, ep − 1] covers the internal nodes in the subtree with node v as the root. We can determine P document frequencies as count(v) = (ep + 1 − sp) − R[sp, ep − 1]. If we encode array R in unary, with value x becoming x 0P 1, we get a bitvector BR , where we can compute sums b i=a R[i] with select queries as (BR .select(b + 1, 1) − b) − (BR .select(a, 1) + 1 − a). For value counting, we use array R to store the number of redundant values as above. We use another array A[0, |V 0 | − 1] to store the number of additional values in each node vi0 ∈ V 0 as A[i] = |G0 .value(vi0 )| − 1, and encode it as a bitvector BA in the same way as array R above. The number of distinct values in range [sp, ep] = G0 .find(X) for a pattern X is G0 .count(X) = G0 .count(sp, ep) = ep X (A[i] + 1) − i=sp ep−1 X R[i]. While graphs are a natural formalism for representing genetic variation, they cannot adequately represent certain types of rearrangements. For example, if sequence S can occur in different positions of the genome (e.g. ASBC and ABSC), we can either have a single copy or multiple copies of S in the graph. Neither option is good in a reference genome. With a single copy, we create paths in the reference that do not correspond to any valid genome. With the second option, we lose the information that both copies of S are the same sequence. One solution is to use context-free grammars. As long as the grammar is non-nested, we can handle it with the hypertext index. We build a hypertext index for a high level graph, where each node is labeled with a nonterminal symbol, while each nonterminal expands into a subgraph indexed in GCSA. References i=sp The bitvectors are often highly compressible [12], but GCSA already uses one of the compression schemes implicitly when it prunes the de Bruijn graph. F Using the Hypertext Index The hypertext index [44] is based on graphs G = (V, E), where the label G.label(v) of a node v ∈ V is a string over alphabet Σ. The labels are indexed in FM-index F , while the reverse labels are indexed in FM-index R. When we search for a pattern X ∈ Σ∗ of length |X| ≥ 2, some of the matches may cross edges. In order to find matches crossing one edge, we search for suffixes X[i, |X| − 1] in the forward index F and the reverses of prefixes X[0, i − 1] in the reverse index R, for all 1 ≤ i ≤ |X| − 1. For each value of i, we combine the partial matches into complete matches with a twodimensional range query in the edge matrix E, using the lexicographic ranges for the reverse of X[0, i − 1] and for X[i, |X| − 1] as the query ranges. We often have to prune complex regions of the input graph before indexing it. This causes false negatives: paths that exist in the input graph but not in the index. We can avoid the false negatives with a generalization of the hypertext index. Instead of pruning the input graph heuristically, we create a primary graph based on known haplotypes and build a GCSA index for both strands of the graph. We then create a matrix of additional edges corresponding to potential recombinations in the path graph, always crossing from the reverse complement strand to the forward strand. We search for pattern X ← − and its reverse complement X in the index, and combine ← − the results find(X[i, |X|−1]) and find( X [|X|−i, |X|−1]) with a range query. [1] M. I. Abouelhoda, S. Kurtz, and E. Ohlebusch. Replacing suffix trees with enhanced suffix arrays. Journal of Discrete Algorithms, 2(1):53–86, 2004. [2] C. Boucher et al. Variable-order de Bruijn graphs. In Proc. 2015 IEEE Data Compression Conference (DCC 2015), pages 383–392. IEEE, 2015. [3] A. Bowe, T. Onodera, K. Sadakane, and T. Shibuya. Succinct de Bruijn graphs. In Proc. 12th Workshop on Algorithms in Bioinformatics (WABI 2012), volume 7534 of LNCS, pages 225–235. Springer, 2012. [4] M. Burrows and D. J. Wheeler. A block sorting lossless data compression algorithm. Technical Report 124, Digital Equipment Corporation, 1994. [5] B. Cazaux, T. Lecroq, and E. Rivals. From indexing data structures to de bruijn graphs. In Proc. 25th Annual Symposium on Combinatorial Pattern Matching (CPM 2014), volume 8486 of LNCS, pages 89–99. Springer, 2014. [6] D. M. Church et al. Extending reference assembly models. Genome Biology, 16:13, 2015. [7] A. Danek, S. Deorowicz, and S. Grabowski. Indexing large genome collections on a PC. PLOS ONE, 9(10):e109384, 2014. [8] A. Dilthey et al. Improved genome inference in the MHC using a population reference graph. Nature Genetics, 47(6):682–688, 2015. [9] P. Ferragina, F. Luccio, G. Manzini, and S. Muthukrishnan. Compressing and indexing labeled trees, with applications. Journal of the ACM, 57(1):4, 2009. [10] P. Ferragina and G. Manzini. Indexing compressed text. Journal of the ACM, 52(4):552–581, 2005. [11] J. Fischer, V. Mäkinen, and G. Navarro. Faster entropybounded compressed suffix trees. Theoretical Computer Science, 410(51):5354–5364, 2009. [12] T. Gagie et al. Document counting in compressed space. In Proc. 2015 IEEE Data Compression Conference (DCC 2015), pages 103–112. IEEE, 2015. [13] T. Gagie, G. Navarro, and S. J. Puglisi. New algorithms on wavelet trees and applications to information retrieval. Theoretical Computer Science, 426-427:25–41, 2012. [14] E. Garrison et al. vg: the variation graph toolkit, 2014– 2016. https://github.com/vgteam/vg. [15] S. Gog, T. Beller, A. Moffat, and M. Petri. From theory to practice: Plug and play with succinct data structures. In Proc. 13th International Symposium on Experimental Algorithms (SEA 2014), volume 8504 of LNCS, pages 326–337. Springer, 2014. [16] R. Grossi, A. Gupta, and J. S. Vitter. High-order entropy-compressed text indexes. In Proc. fourteenth annual ACM-SIAM symposium on Discrete algorithms (SODA 2003), pages 841–850. SIAM, 2003. [17] L. Huang, V. Popic, and S. Batzoglou. Short read alignment with populations of genomes. Bioinformatics, 29(13):i361–i370, 2013. [18] S. Huang et al. Indexing similar DNA sequences. In Proc. The Sixth International Conference on Algorithmic Aspects in Information and Management (AAIM 2010), volume 6124 of LNCS, pages 180–190. Springer, 2010. [19] D. Kim et al. HISAT2, 2015–2016. https://ccb.jhu. edu/software/hisat2/index.shtml. [20] D. Kim, B. Langmead, and S. L. Salzberg. HISAT: a fast spliced aligner with low memory requirements. Nature Methods, 12(4):357–360, 2015. [21] H. Li. Aligning sequence reads, clone sequences and assembly contigs with BWA-MEM. arXiv:1303.3997, 2013. [22] H. Li and R. Durbin. Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics, 25(14):1754–1760, 2009. [23] A. Limasset, B. Cazaux, E. Rivals, and P. Peterlongo. Read mapping on de bruijn graphs. BMC Bioinformatics, 17:237, 2016. [24] Y. Lin and P. A. Pevzner. Manifold de Bruijn graphs. In Proc. 14th Workshop on Algorithms in Bioinformatics (WABI 2014), volume 8701 of LNCS, pages 296–310. Springer, 2014. [25] B. Liu, H. Guo, M. Brudno, and Y. Wang. deBGA: read alignment with de Bruijn graph-based seed and extension. Accepted to Bioinformatics, 2016. [26] S. Maciuca, C. del Ojo Elias, G. McVean, and Z. Iqbal. A natural encoding of genetic variation in a BurrowsWheeler transform to enable mapping and genome inference. bioRxiv, 2016. [27] U. Manber and G. Myers. Suffix arrays: A new method for on-line string searches. SIAM Journal on Computing, 22(5):935–948, 1993. [28] S. Marcus, H. Lee, and M. C. Schatz. SplitMEM: a graphical algorithm for pan-genome analysis with suffix skips. Bioinformatics, 30(24):3476–3483, 2014. [29] T. Marschall et al. Computational pan-genomics: Status, promises and challenges. BioRxiv, 2016. [30] V. Mäkinen and G. Navarro. Succinct suffix arrays based on run-length encoding. Nordic Journal of Computing, 12(1):40–66, 2005. [31] V. Mäkinen, G. Navarro, J. Sirén, and N. Välimäki. Storage and retrieval of highly repetitive sequence collections. Journal of Computational Biology, 17(3):281–308, 2010. [32] J. C. Na et al. FM-index of alignment: A compressed index for similar strings. Theoretical Computer Science, 638:159–170, 2016. [33] J. C. Na et al. FM-index of alignment with gaps. arXiv:1606.03897, 2016. [34] A. M. Novak, E. Garrison, and B. Paten. A graph extension of the positional Burrows-Wheeler transform and its applications. bioRxiv, 2016. [35] E. Ohlebusch, S. Gog, and A. Kügel. Computing matching statistics and maximal exact matches on compressed full-text indexes. In Proc. 17th Symposium on String Processing and Information Retrieval (SPIRE 2010), volume 6393 of LNCS, pages 347–358. Springer, 2010. [36] D. Okanohara and K. Sadakane. Practical entropycompressed rank/select dictionary. In Proc. Ninth Workshop on Algorithm Engineering and Experiments (ALENEX 2007), pages 60–70. SIAM, 2007. [37] B. Paten, A. Novak, and D. Haussler. Mapping to a reference genome structure. arXiv:1404.5010, 2014. [38] J. Pell et al. Scaling metagenome sequence assembly with probabilistic de Bruijn graphs. Proc. National Academy of Sciences of the United States of America, 109(33):13272–13277, 2012. [39] E. A. Rødland. Compact representation of k-mer de Bruijn graphs for genome read assembly. BMC Bioinformatics, 14:313, 2013. [40] K. Sadakane. Compressed suffix trees with full functionality. Theory of Computing Systems, 41(4):589–607, 2007. [41] K. Sadakane. Succinct data structures for flexible text retrieval systems. Journal of Discrete Algorithms, 5(1):12–22, 2007. [42] K. Schneeberger et al. Simultaneous alignment of short reads against multiple genomes. Genome Biology, 10(9):R98, 2009. [43] J. Sirén, N. Välimäki, and V. Mäkinen. Indexing graphs for path queries with applications in genome research. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 11(2):375–388, 2014. [44] C. Thachuk. Indexing hypertext. Journal of Discrete Algorithms, 18:113–122, 2013. [45] The 1000 Genomes Project Consortium. A global reference for human genetic variation. Nature, 526:68– 64, 2015. [46] S. Wandelt, J. Starlinger, M. Bux, and U. Leser. RCSI: Scalable similarity search in thousand(s) of genomes. Proc. VLDB Endowment, 6(13):1534–1545, 2013. [47] P. Weiner. Linear pattern matching algorithms. In Proc. 14th Annual IEEE Symposium on Switching and Automata Theory (FOCS 1973), pages 1–11. IEEE, 1973.
8cs.DS
arXiv:1710.02034v2 [cs.IT] 16 Feb 2018 Simpler proof for nonlinearity of majority function Thomas W. Cusick ∗ Department of Mathematics, University at Buffalo, Buffalo, NY 14260, USA Abstract Given a Boolean function f , the (Hamming) weight wt(f ) and the nonlinearity N (f ) are well known to be important in designing functions that are useful in cryptography. The nonlinearity is expensive to compute, in general, so any formulas giving the nonlinearity for particular functions f are significant. The well known majority function has been extensively studied in a cryptographic context for the last dozen years or so, and there is a formula for its nonlinearity. The known proofs for this formula rely on many detailed results for the Krawtchouk polynomials. This paper gives a much simpler proof. Key words: Hamming weight, nonlinearity, Boolean functions, majority function, Walsh transform. Mathematics Subject Classifications (2010) 94C10 94A60 06E30 1 Introduction Boolean functions have many applications, particularly in coding theory and cryptography. A detailed account of the latter applications can be found in the book [4]. If we define Vn to be the vector space of dimension n over the finite field GF (2) = {0, 1}, then an n variable Boolean function f (x1 , x2 , ..., xn ) = f (x) is a map from Vn to GF (2). Every Boolean function f (x) has a unique polynomial representation (usually called the algebraic normal form [4, p. 8]), and the degree of f is the degree of this polynomial. A function of degree at most 1 is called affine, and if the constant term is 0 such a function is called linear. We let Bn denote the set of all Boolean ∗ Email: [email protected] 1 functions in n variables, with addition and multiplication done mod 2. If we list the 2n elements of Vn as v0 = (0, ..., 0), v1 = (0, ..., 0, 1), ... in lexicographic order (we abbreviate this as lexico order below), then the 2n -vector (f (v0 ), f (v1 ), . . . , f (v2n −1 )) is called the truth table of f. The weight (also called Hamming weight) wt(f ) of f is defined to be the number of 1′ s in the truth table for f . In many cryptographic uses of Boolean functions, it is important that the truth table of each function f has an equal number of 0′ s and 1′ s; in that case, we say that the function f is balanced. The distance d(f, g) between two Boolean functions f and g in the same number of variables is defined by d(f, g) = wt(f + g), where the polynomial addition is done mod 2. An important concept in cryptography is the nonlinearity N (f ) defined by N (f ) = min d(f, a) . a af f ine In order for a Boolean function to be useful in a cryptographic application, it is usually necessary that the function has high nonlinearity (see, for example, [4, p. 122]). So-called Fourier analysis of Boolean functions (see [4, Chapter 2]) is very important in cryptography and other contexts. The efficient computation of values of the nonlinearity is important here, and for this a very important tool is the Walsh transform of a Boolean function fn in n variables. The Walsh transform of fn is the map Wf : Vn → R defined by X (−1)f (x)+w·x , Wf (w) = x∈Vn where the values of f = fn are taken to be the real numbers 0 and 1. This Walsh transform has also been important in physics and other sciences for at least 40 years. In this paper we want the Walsh transform because of the well known formula (see [4, Th. 2.21, p. 17], where fˆ is used instead of f ) N (fn ) = 2n−1 − 1 max |Wf (u)|. 2 u∈Vn We shall use the obvious fact Wf (0) = 2n − 2wt(f ) without comment in the rest of the paper. 2 (1) 2 Weight = nonlinearity if weight is small enough It follows from the definitions that the nonlinearity is always ≤ the weight. The following lemma gives a useful sufficient condition for the weight and nonlinearity to be equal. This lemma is well known to experts, but I have not found a statement of it in the literature. The proof below was shown to me by Claude Carlet; it is much simpler than the proof using the Walsh transform given in [3], which is a preliminary version of this paper. Before [3] was written, this lemma was stated in a version of [7]. Lemma 1. Suppose f is a Boolean function in n variables with wt(f ) ≤ 2n−2 . Then wt(f ) = N (f ). Proof. We give a proof by contradiction. Suppose a is an affine function such that d(a, f ) < wt(f ) ≤ 2n−2 . Then a is not constant and by the triangle inequality (0 is the zero function) wt(a) = d(a, 0) ≤ d(a, f ) + d(f, 0) < 2n−2 + 2n−2 = 2n−1 . This is a contradiction since the nonconstant affine function a is balanced, and so has weight 2n−1 . Lemma 1 is sharp in the sense that it is no longer true if we replace the upper bound on wt(f ) by 2n−2 + 1. For example, the function with n = 3 having truth table (0, 0, 0, 1, 0, 0, 1, 1) (its algebraic normal form is x1 x2 x3 + x1 x2 + x2 x3 ) has weight 3 and nonlinearity 1. However, sometimes we can use Lemma 1 to evaluate the nonlinearity of functions gn in n variables even if wt(gn ) 6= N (gn ), and even if wt(gn ) > 2n−2 . An example of this (Theorem 6) is given in the next section. 3 Finding nonlinearity of the majority function The Boolean majority function Mk (x) can be defined in several slightly different ways, but here we use the most common one, namely Mk (x) = 1 if and only if wt(x) ≥ k/2. The majority function seems to have been first mentioned in a cryptographic context in the 1991 book [8, pp. 70-80], where only the case of k odd was considered. The function has been of special interest in cryptography for 3 the last dozen years or so because this function and variants of it can be proven to have optimal algebraic immunity. We do not need to explain this technical concept here; interested readers can find a discussion of it in [4, pp. 174-176]. A useful recent survey of the applications of majority functions to algebraic immunity is given in [2]. The papers [1, 6, 9, 11, 12, 13] and others referenced in those papers all contain recent work on cryptographic applications of these functions. It is necessary to know the nonlinearity of the majority function to begin such studies. A frequently quoted determination of the nonlinearity of the majority function was given in [6, Th. 3, p. 52], using many detailed results on the Krawtchouk polynomials (these date back to 1929; see [10, pp. 150-154] for a study of these polynomials and proofs of some of their properties). It is convenient to deal with the cases of odd and even k separately, so we define: M2n+1 (x) = 1 if and only if wt(x) ≥ n + 1 (2) M2n (x) = 1 if and only if wt(x) ≥ n. (3) and For any k, we let M (k) denote the truth table of Mk (x). We let A(k) and B(k) denote, respectively, the left and right halves of the truth table, so M (k) = A(k)B(k) (juxtaposition of the truth tables, each one being thought of simply as a bitstring). We give a much simpler proof for the value of the nonlinearity of the majority function in Theorem 5 below, but first we need three preliminary lemmas. We use the notation C(f ) for the complement of f, that is, the function obtained by switching 0 to 1 and 1 to 0 for every entry in the truth table of f. Similarly, if S is a bitstring, then C(S) is its complement. Also, S ∗ denotes the bitstring S in reverse order. Lemma 2. We have M (2n + 1) = C(M (2n))∗ M (2n) for n ≥ 2. Proof. By (2), we can describe the two halves of M (2n + 1) by A(2n + 1) = {0y : wt(y) ≥ n + 1, y in lexico order} (4) B(2n + 1) = {1y : wt(y) ≥ n, y in lexico order}. (5) and Now (4) implies A(2n + 1)∗ = {0y : wt(y) ≥ n + 1, y in reverse lexico order}, 4 so (5) gives B(2n + 1) = C(A(2n + 1))∗ . (6) It follows from (3) and (4) that A(2n + 1) = {C(1y) : wt(y) ≤ n, y in lexico order} = {C(y1) : wt(y) ≤ n, y in reverse lexico order} = C(M (2n))∗ and then (6) gives B(2n + 1) = M (2n). Below is an example, in which we use the notation ai for a string of i symbols a = 0 or 1. Example 1. M (5) = 07 103 1013 03 1013 017 Note that it follows from (4) and (6) that wt(M (2n + 1)) = 22n , so M2n+1 (x) is a balanced function. Lemma 3. For any truth table A, the nonlinearity of the function with truth table A C(A)∗ is given by N (A C(A)∗ ) = 2N (A). Proof. For any affine function a we have d(A, a) = d(C(A), C(a)) = d(C(A)∗ , C(a)∗ ). Hence the lemma follows from the fact that aC(a)∗ is an affine function whenever a is (see the well known Folklore Lemma [4, Lemma 2.2, p. 8]).  Lemma 4. We have wt(A(2n + 1)) = 22n−1 − 21 2n n for n ≥ 2. Proof. If we let b2n denote a bitstring of length 2n, then (4) gives  n  X 2n 2n 2n wt(A(2n + 1)) = 2 − |{b2n : wt(b2n ) ≤ n}| = 2 − j j=0 and now the Binomial Theorem implies the formula in the lemma. Our next example illustrates Lemmas 2 and 4. Example 2. M (6) = 07 103 1013 03 1013 017 03 1013 017 0115 A(7) = 015 1 07 103 1013 07 103 1013 03 1013 017 5 Now the nonlinearity formulas for Mk (x) are given in the following theorem. Theorem 5. The nonlinearity of the majority function for n ≥ 2 is given by   2n 2n N (M (2n + 1)) = 2wt(A(2n + 1)) = 2 − (7) n and   1 1 2n N (M (2n)) = N (M (2n + 1)) = 22n−1 − . (8) 2 2 n  Proof. The value 22n − 2n for M (2n + 1) (in a different notation) was n obtained via (1) in [8, Th. 4.20, p. 74]. The proof uses only elementary properties of binomial coefficients but is long enough so that we will not repeat it here. Now Lemma 4 completes the proof of (7). Finally, Lemmas 2 and 3 imply (8). Note that Lemma 2 gives A(2n + 1) = C(M (2n))∗ (see Example 2) and with (8) plus Lemma 4 we obtain N (A(2n + 1)) = N (M (2n)) = wt(A(2n + 1), which is a weight = nonlinearity result not implied by Lemma 1. We can use Lemma 1 to obtain even more information about the majority function, for example we can determine N (B(2n)), which is given in the next theorem. The next example, which illustrates how the truth tables of M (i) change as i increases, may be helpful in reading the proof. Example 3. M (2n − 1) = A(2n − 1) B(2n − 1) M (2n) = A(2n − 1) B(2n − 1) B(2n) M (2n + 1) = Q1(2n + 1) M (2n − 1) M (2n − 1) B(2n) Theorem 6. The nonlinearity of B(2n) for n ≥ 3 is equal to ∗ wt(C(B(2n)) ) = 2 2n−2 X j=n+1 = 2n−2 X j=n+1      2n − 2 2n − 2 + j n    2n − 2 1 2n − 2 2n−3 . +2 − 2 n−1 j 6 (9) (10) Proof. Let Q1(2n+1) denote the first quarter of the truth table of M (2n+1). It follows from Lemma 2 that Q1(2n + 1) = C(B(2n))∗ . (11) If we let Q1A(2n + 1) and Q1B(2n + 1) denote, respectively, the left and right halves of the truth table for Q1(2n + 1) and we let b2n−2 denote a bitstring of length 2n − 2, then Q1A(2n + 1) = {000b2n−2 : wt(b2n−2 ) ≥ n + 1, b2n−2 in lexico order} and Q1B(2n + 1) = {001b2n−2 : wt(b2n−2 ) ≥ n, b2n−2 in lexico order}. Therefore wt(Q1A(2n + 1)) = 2n−2 X j=n+1 and wt(Q1B(2n + 1)) =  2n−2 X j=n  2n − 2 j (12)  2n − 2 . j (13) Now (9) follows from (11), (12) and (13), and (10) follows from (9) by elementary properties of binomial coefficients. Simple estimates using (10) show that wt(C(B(2n))∗ ) < 22n−2 . Hence Lemma 1 gives wt(C(B(2n))∗ ) = N (C(B(2n))∗ ) = N (B(2n)). The methods in Section 3 can be used to clarify various earlier results in the literature. For example, it is easy to show that the functions φ2k discussed in [5, p. 106] satisfy φ2k = M (2k). References [1] A. Braeken, B. Preneel, On the algebraic immunity of symmetric Boolean functions, Indocrypt 2005 (Berlin: Springer LNCS 3797, 2005), 35–48. Extended version http://eprint.iacr.org/2005/245. [2] C. Carlet: A survey on nonlinear Boolean functions with optimal algebraic immunity suitable for stream ciphers, Vietnam J. Math. 41 (4) (2013), 527–541. 7 [3] T. W. Cusick, Weight=nonlinearity for all small weight Boolean functions, https://arxiv.org/abs/1710.02034, 10 pp., 2017. [4] Thomas W. Cusick, Pantelimon Stănică: Cryptographic Boolean Functions and Applications, Second Edition, Elsevier-Academic Press, San Diego, 2017. [5] D. K. Dalai, K. C. Gupta, S. Maitra: Cryptographically significant Boolean functions: construction and analysis in terms of algebraic immunity, Fast Software Encryption (FSE 2005) (Berlin: Springer LNCS 3557, 2005), 98–111. [6] D. K. Dalai, S. Maitra, S. Sarkar: Basic theory in the construction of Boolean functions with maximum possible algebraic immunity, Designs, Codes Crypto. 40 (2006), 41–58. [7] E. M. Sanger, Rotation Symmetric Boolean Functions, Ph. D. thesis, University at Buffalo, 2017. [8] C. Ding, G. Xiao, W. Shan: The Stability Theory of Stream Ciphers (Berlin: Springer LNCS 561, 1991). [9] S. Fu, C. Li, K. Matsuura, L. Qu: Construction of rotation symmetric Boolean functions with maximum algebraic immunity, Cryptology and Network Security (CANS 2009) (Berlin: Springer LNCS 5888, 2009), 402–412. [10] F. J. McWilliams and N. J. A. Sloane, The Theory of ErrorCorrecting codes, North Holland, Amsterdam, 1978. [11] S. Sarkar, S. Maitra: Construction of rotation symmetric Boolean functions with optimal algebraic immunity, Proceedings of Applied Algebra, Algebraic Algorithms and Error-Correcting Codes (AAECC–17) (Berlin: Springer LNCS 4851, 2007), 271–280. [12] S. Su: Construction of balanced even-variable Boolean functions on odd number of variables with maximum algebraic immunity, Internat. J. Computer Math. 92 (2015), 2219–2232. [13] S. Su, X. Tang: Construction of rotation symmetric Boolean functions with optimal algebraic immunity and high nonlinearity, Designs, Codes Crypto. 71 (2014), 183–199. 8
7cs.IT
Sentence Ordering and Coherence Modeling using Recurrent Neural Networks Lajanugen Logeswaran1 , Honglak Lee1 , Dragomir Radev2 arXiv:1611.02654v2 [cs.CL] 22 Dec 2017 1 Department of Computer Science & Engineering, University of Michigan 2 Department of Computer Science, Yale University [email protected], [email protected], [email protected] Abstract Modeling the structure of coherent texts is a key NLP problem. The task of coherently organizing a given set of sentences has been commonly used to build and evaluate models that understand such structure. We propose an end-to-end unsupervised deep learning approach based on the set-to-sequence framework to address this problem. Our model strongly outperforms prior methods in the order discrimination task and a novel task of ordering abstracts from scientific articles. Furthermore, our work shows that useful text representations can be obtained by learning to order sentences. Visualizing the learned sentence representations shows that the model captures high-level logical structure in paragraphs. Our representations perform comparably to state-of-the-art pre-training methods on sentence similarity and paraphrase detection tasks. 1 Introduction Modeling the structure of coherent texts is an important problem in NLP. A well-written text has a particular high-level logical and topical structure. The actual word and sentence choices and their transitions come together to convey the purpose of the text. Our primary goal is to build models that can learn such structure by arranging a given set of sentences to make coherent text. Multi-document Summarization (MDS) and retrievalbased Question Answering (QA) involve extracting information from multiple documents and organizing it into a coherent summary. Since the relative ordering of sentences from different sources can be unclear, being able to automatically evaluate a particular order is essential. Barzilay and Elhadad (2002) discuss the importance of an ordering component in MDS and show that finding acceptable orderings can enhance user comprehension. More importantly, by learning to order sentences we can model text coherence. It is difficult to explicitly characterize the properties of text that make it coherent. Ordering models attempt to understand these properties by learning high-level structure that causes sentences to appear in a specific order in human-authored texts. Automatic methods for evaluating human/machine generated text have great importance, with applications in essay scoring (Miltsakaki and Kukich 2004; Burstein, Tetreault, and Andreyev 2010) and text generation Copyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. (Park and Kim 2015; Kiddon, Zettlemoyer, and Choi 2016). Coherence models aid the better design of these systems. Exploiting unlabelled corpora to learn semantic representations of data has become an active area of investigation. Self-supervised learning is a typical approach that uses information naturally available as part of the data as supervisory signals (Wang and Gupta 2015; Doersch, Gupta, and Efros 2015). Noroozi and Favaro (2016) attempt to learn visual representations by solving image jigsaw puzzles. Sentence ordering can be considered as a jigsaw puzzle in the language domain and an interesting question is whether we can learn useful textual representations by performing this task. Our approach to coherence modeling is driven by recent success in capturing semantics using distributed representations and modeling sequences using Recurrent Neural Nets (RNN). RNNs are now the dominant approach to sequence learning and mapping problems. The Sequence-to-sequence (Seq2seq) framework (Sutskever, Vinyals, and Le 2014) and its variants have fueled RNN based approaches to a range of problems such as language modeling, text generation, MT, QA, and many others. In this work we propose an RNN-based approach to the sentence ordering problem which exploits the set-to-sequence framework of Vinyals, Bengio, and Kudlur (2015). A wordlevel RNN encoder produces sentence embeddings, and a sentence-level set encoder RNN iteratively attends to these embeddings and constructs a context representation. Initialized with this representation, a sentence-level pointer network selects the sentences sequentially. The most widely studied task relevant to sentence ordering and coherence modeling is the order discrimination task. Given a document and a permuted version of it, the task involves identifying the more coherent ordering. Our proposed model achieves state-of-the-art performance on two benchmark datasets for this task, outperforming several classical approaches and recent data-driven approaches. Addressing the more challenging task of ordering a given collection of sentences, we consider the novel and interesting task of ordering sentences from abstracts of scientific articles. Our model strongly outperforms previous work on this task. We visualize the learned sentence representations and show that our model captures high-level discourse structure. We provide visualizations that help understand what information in the sentences the model uses to identify the next sentence. Finally, we demonstrate that our ordering model learns coherence properties and text representations that are useful for several downstream tasks including summarization, sentence similarity and paraphrase detection. In summary, our key contributions are as follows: • We propose an end-to-end trainable model based on the set-to-sequence framework to address the problem of coherently ordering a collection of sentences. • We consider the novel task of understanding structure in abstract paragraphs and demonstrate state-of-the-art results in order discrimination and sentence ordering tasks. • We show that our model learns sentence representations that perform comparably to recent unsupervised pretraining methods on downstream tasks. 2 Related Work Coherence modeling & sentence ordering. Coherence modeling and sentence ordering have been approached by closely related techniques. Many approaches propose a measure of coherence and formulate the ordering problem as finding an order with maximal coherence. Recurring themes from prior work include linguistic features, centering theory, local and global coherence. Local coherence has been modeled by considering properties of local windows of sentences such as sentence similarity and transition structure. Lapata (2003) represent sentences by vectors of linguistic features and learn the transition probabilities between features of adjacent sentences. The Entity-Grid model (Barzilay and Lapata 2008) captures local coherence by modeling patterns of entity distributions. Sentences are represented by the syntactic roles of entities appearing in the document. Features extracted from the entity grid are used to train a ranking SVM. These two methods are motivated from centering theory (Grosz, Weinstein, and Joshi 1995), which states that nouns and entities in coherent discourses exhibit certain patterns. Global models of coherence typically use HMMs to model document structure. The content model (Barzilay and Lee 2004) represents topics in a particular domain as states in an HMM. State transitions capture possible presentation orderings within the domain. Words of a sentence are modeled using a topic-specific language model. The content model inspired several subsequent work to combine the strengths of local and global models. Elsner, Austerweil, and Charniak (2007) combine the entity grid and the content model using a non-parametric HMM. Soricut and Marcu (2006) use several models as feature functions and define a loglinear model to assign probability to a text. Louis and Nenkova (2012) model the intentional structure in documents using syntax features. Unlike previous approaches, we do not use any handcrafted features and adopt an embedding-based approach. Local coherence is taken into account by a next-sentence prediction component in our model, and global dependencies are naturally captured by an RNN. We demonstrate that our model can capture both logical and topical structure by several evaluation benchmarks. Data-driven approaches. Neural approaches have gained attention recently. Li and Hovy (2014) model sentences as embeddings derived from recurrent neural nets and train a feed-forward neural network that takes an input window of sentence embeddings and outputs a probability which represents the coherence of the sentence window. Coherence evaluation is performed by sliding the window over the text and aggregating the score. Li and Jurafsky (2016) study the same model in a larger scale task and also use a sequence-tosequence approach in which the model is trained to generate the next sentence given the current sentence and vice versa. Nguyen and Joty (2017) learn to model coherence using a convolutional network that operates on the Entity-Grid representation of an input document. These models are limited by their local nature; our experiments show that considering larger contexts is beneficial. Hierarchical RNNs for document modeling. Word-level and sentence-level RNNs have been used in a hierarchical fashion for modeling documents in prior work. Li, Luong, and Jurafsky (2015) proposed a hierarchical autoencoder for generation and summarization applications. More relevant to our work is a similar model considered by Lin et al. (2015). A sentence-level RNN predicts the bag of words in the next sentence given the previous sentences and a word-level RNN predicts the word sequence conditioned on the sentence RNN hidden state. Our model has a hierarchical structure similar to these models, but takes a discriminative approach. Combinatorial optimization with RNNs. Vinyals, Bengio, and Kudlur (2015) equip sequence-to-sequence models with the ability to handle input and output sets, and discuss experiments on sorting, language modeling and parsing. This is called the read, process and write (or set-to-sequence) model. The read block maps input tokens to a fixed length vector representation. The process block is an RNN encoder which, at each time-step, attends to the input token embeddings and computes an attention readout, appending it to the current hidden state. The write block is an RNN which produces the target sequence conditioned on the representation produced by the process block. Their goal is to show that input and output orderings can matter in these tasks, which is demonstrated using small scale experiments. Our work exploits this framework to address the challenging problem of modeling logical and hierarchical structure in text. Vinyals, Fortunato, and Jaitly (2015) proposed pointer-networks for combinatorial optimization problems where the output dictionary size depends on the number of input elements. We use a pointer-network as the decoder to sequentially pick the next sentence. 3 Approach Our proposed model is inspired by the way a human would solve this task. First, the model reads the sentences to capture their meaning and the general context of the paragraph. Given this knowledge, the model tries to pick the sentences one by one sequentially till exhaustion. Our model is based on the read, process and write framework of Vinyals, Bengio, and Kudlur (2015) briefly discussed in the previous section. We use the encoder-decoder terminology that is more common in the following discussion. 1) This is preliminary information, ... 2) Any errors in this report will be ... 3) On March 7, 2000, at 1020 hrs … … 𝑎1 𝑎2 LSTM LSTM 𝑦ො1 ~ 𝑎1′ 𝑦ො2 ~ 𝑎2′ 𝑦ො𝑛 ~ 𝑎𝑛′ 𝑎𝑚 𝑎1′ 𝑎2′ 𝑎𝑛′ LSTM LSTM LSTM n) The aircraft sustained substantial .. <start> … 𝑎1𝑖 𝑠𝑖 𝑖 𝑎𝑚−1 𝑠𝑖 <start> … LSTM 𝑠𝑦ො1 𝑠𝑦ො𝑛−1 Sentence Encoder Pointer Network Decoder Set Encoder Figure 1: Model Overview: The input set of sentences are represented as vectors using a sentence encoder. At each time step of the model, attention weights are computed for the sentence embeddings based on the current hidden state. The encoder uses the attention probabilities to compute the input for the next time-step and the decoder uses them for prediction. The model is comprised of a sentence encoder RNN, an encoder RNN and a decoder RNN (Fig. 1). The sentence encoder takes as input the words of a sentence s sequentially and computes an embedding representation of the sentence. Henceforth, we use s to refer to a sentence or its embedding interchangeably. The embeddings {s1 , s2 , ..., sn } of a given set of n sentences constitute the sentence memory, available to be accessed by subsequent components. The encoder LSTM is identical to the originally proposed process block, defined by Eqs 1-4. At each time step the input to the LSTM is computed by taking a weighted sum over the memory elements, the weights being attention probabilities obtained using the previous hidden state as query (Eqs. 1, 2). This is iterated for a fixed number of times called the read cycles. Intuitively, the model identifies a soft input order to read the sentences. As described in Vinyals, Bengio, and Kudlur (2015) the encoder has the desirable property of being invariant to the order in which the sentence embeddings reside in the memory. t et,i enc = f (si , henc ); i ∈ {1, ..., n} (1) atenc (2) = statt = t+1 ht+1 enc , cenc = Softmax(etenc ) n X at,i enc si i=1 LSTM(htenc , ctenc , statt ) t−1 t−1 htdec , ctdec = LSTM(ht−1 ) dec , cdec , x et,i dec atdec = = f (si , htdec ); i ∈ Softmax(etdec ) {1, ..., n} (4) The decoder is a pointer network that takes a similar form with a few differences (Eqs. 5-7). The LSTM takes the embedding of the previous sentence as input instead of the attention readout. At training time the correct order of sentences (so1 , so2 , ..., son ) = (x1 , x2 , ..., xn ) is known (o represents the correct order) and xt−1 is used as the input. At test time the predicted assignment x̂t−1 is used instead. The attention computation is identical to that of the encoder, but now at,i dec is interpreted as the probability for si being the correct sentence choice at position t, conditioned on the previous sentence assignments p(St = si |S1 , ..., St−1 ). The initial state of the decoder LSTM is initialized with the final hidden state of the encoder. x0 is a vector of zeros. (6) (7) Scoring Function. We consider two choices for the scoring function f in Eqs. 1, 6. The first (Eq. 8) is a single hidden layer feed-forward net that takes s, h as inputs (W, b, W 0 , b0 are learnable parameters). The structure of f is similar to the window network of Li and Hovy (2014). While they used a local window of sentences to capture context, this scoring function exploits the entire history of sentences encoded in the RNN hidden state to score candidates for the next sentence. f (s, h) = W 0 tanh(W [s ; h] + b) + b0 (8) We also consider a bilinear scoring function (Eq. 9). Compared to the previous scoring function, this takes a generative approach to regress the next sentence given the current hidden state (W h + b), enforcing that it be most similar to the correct next sentence. We observed that this scoring function led to better sentence representations (Sec. 4.4). f (s, h) = sT (W h + b) (3) (5) (9) Contrastive Sentences. In its vanilla form, we found that the set-to-sequence model tends to rely on certain word clues to perform the ordering task. To encourage holistic sentence understanding, we add a random set of sentences to the sentence memory when the decoder makes classification decisions. This makes the problem more challenging for the decoder since now it has to distinguish between sentences that are relevant and irrelevant to the current context in identifying the correct sentence. Coherence modeling. We define the coherence score of an arbitrary partial/complete assignment (sp1 , ..., spk ) to the first k sentence positions as Pk (10) i=1 log p(Si = spi |S1,...,i−1 = sp1 ,...,pi−1 ) where S1 , .., Sk are random variables representing the sentence assignment to positions 1 through k. The conditional Table 1: Mean Accuracy comparison on the Accidents and Earthquakes data for the order discrimination task. The reference models are Entity-Grid (Barzilay and Lapata 2008), HMM (Louis and Nenkova 2012), Graph (Guinaudeau and Strube 2013), Window network (Li and Hovy 2014) and sequence-to-sequence (Li and Jurafsky 2016), respectively. Entity-Grid HMM Graph 0.904 0.872 0.842 0.957 0.846 0.635 Accidents Earthquakes probabilities are derived from the network. This is our measure of comparing the coherence of different renderings of a document. It is also used as a heuristic during decoding. Training Objective. The model is trained using the maximum likelihood objective P P|x| max x∈D t=1 log p(xt |x1 , ..., xt−1 ) (11) where D denotes the training set and each training instance is given by an ordered document of sentences x = (x1 , ..., x|x| ). 4 Experimental Results We first consider the order discrmination task that has been widely used in the literature for evaluating coherence models. We then consider the more challenging ordering problem where a coherent order of a given collection of sentences needs to be determined. We then demonstrate that our ordering model learns coherence properties useful for summarization. Finally, we show that our model learns sentence representations that are useful for downstream applications. For all tasks discussed in this section we train the model with the maximum likelihood objective on the training data relevant to the task. We used the single hidden layer MLP scoring function for the order discrimination and sentence ordering tasks. Models are trained end-to-end. We use pretrained 300 dimensional GloVe word embeddings (Pennington, Socher, and Manning 2014) to initialize word vectors. All LSTMs use a hidden layer size of 1000 and the MLP in Eq. 8 has a hidden layer size of 500. The number of read cycles in the encoder is set to 10. The same model architecture is used across all experiments. We used the Adam optimizer (Kingma and Ba 2014) with batch size 10 and learning rate 5e-4 for learning. The model is regularized using early stopping. Hyperparameters were chosen using the validation set. 4.1 Order Discrimination The ordering problem is traditionally formulated as a binary classification task: Given a reference paragraph and its permuted version, identify the more coherent one (Barzilay and Lapata 2008). The datasets widely used for this task in previous work are the Accidents and Earthquakes news reports. In each of these datasets the training and test sets include 100 articles and approximately 20 permutations of each article. In Table 1 we compare our results with traditional approaches and recent data-driven approaches. The entity grid model provides a strong baseline on the Accidents dataset, Window (Recurrent) (Recursive) 0.840 0.864 0.951 0.976 Seq2seq Ours 0.930 0.992 0.944 0.997 only outperformed by our model and Li and Jurafsky (2016). On the Earthquakes data the window approach of Li and Jurafsky (2016) performs strongly. Our approach outperforms prior models on both datasets, achieving near perfect performance on the Earthquakes dataset. While these datasets have been widely used, they are quite formulaic in nature and are no longer challenging. We hence turn to the more challenging task of ordering a given collection of sentences to make a coherent document. 4.2 Sentence Ordering In this task we directly address the ordering problem. We do not assume the availability of a set of candidate orderings to choose from and instead find a good ordering from all possible permutations of the sentences. The difficulty of the ordering problem depends on the nature of the text, as well as the length of paragraphs considered. Evaluation on text from arbitrary text sources makes it difficult to interpret the results, since it may not be clear whether to attribute the observed performance to a deficient model or ambiguity in next sentence choices due to many plausible orderings. Text summaries are a suitable source of data for this task. They often exhibit a clear flow of ideas and have little redundancy. We specifically look at abstracts of conference papers and research proposals. This data has several favorable properties. Abstracts usually have a particular high-level format - They begin with a brief introduction, a description of the problem and proposed approach and conclude with performance remarks. This would allow us to identify if the model can capture high-level logical structure. Second, abstracts have an average length of about 10, making the ordering task more accessible. This also gives us a significant amount of data to train and test our models. We use the following sources of abstracts for this task. • NIPS Abstracts. We consider abstracts from NIPS papers in the past 10 years. We parsed 3280 abstracts from paper pdfs and obtained 3259 abstracts after omitting erroneous extracts. The dataset was split into years 2005-2013 for training and 2014, 2015 respectively for validation, testing. • ACL Abstracts. A second source of abstracts are papers from the ACL Anthology Network (AAN) corpus (Radev et al. 2009). We extracted 12,157 abstracts from the text parses using simple keyword matching for the strings ‘Abstract’ and ‘Introduction’. We use all extracts of papers published up to year 2010 for training, year 2011 for validation and years 2012-2013 for testing. Table 2: Comparison against prior methods on the abstracts data. NIPS Abstracts NSF Abstracts Accuracy τ Accuracy τ Accuracy τ Random 15.59 0 19.36 0 9.46 0 Entity Grid (Barzilay and Lapata 2008) Seq2seq (Uni) (Li and Jurafsky 2016) Window network (Li and Hovy 2014) RNN Decoder Proposed model 20.10 27.18 41.76 48.22 51.55 0.09 0.27 0.59 0.67 0.72 21.82 36.62 50.87 52.06 58.06 0.10 0.40 0.65 0.66 0.73 13.68 18.67 25.79 28.33 0.10 0.28 0.48 0.51 • NSF Abstracts. We also used the NSF Research Award Abstracts dataset (Lichman 2013). It comprises abstracts from a diverse set of scientific areas in contrast to the previous two sources of data and the abstracts are also lengthier, making this dataset more challenging. Years 1990-1999 were used for training, 2000 for validation and 2001-2003 for testing. We capped the parses of the abstracts to a maximum length of 40 sentences. Unsuccessful parses and parses of excessive length were discarded. Further details about the data are provided in the supplement. The following metrics are used to evaluate performance. Accuracy measures how often the absolute position of a sentence was correctly  predicted. Kendall’s tau (τ ) is computed as 1 − 2 · N/ n2 , where N is the number of pairs in the predicted sequence with incorrect relative order and n is the sequence length. Lapata (2006) discusses that this metric reliably correlates with human judgements. The following baselines are used for comparison: • Entity Grid. Our first baseline is the Entity Grid model of Barzilay and Lapata (2008). We use the Stanford parser (Klein and Manning 2003) and Brown Coherence Toolkit1 to derive Entity grid representations. A ranking SVM is trained to score correct orderings higher than incorrect orderings as in the original work. We used 20 permutations per document as training data. Since the entity grid only provides a means of feature extraction we evaluate the model in the ordering setting as follows. We choose 1000 random permutations for each document, one of them being the correct order, and pick the order with maximum coherence. We experimented with transitions of length at most 3 in the entity-grid. • Seq2seq. The second baseline we consider is a sequenceto-sequence model which is trained to predict the next sentence given the current sentence. Li and Jurafsky (2016) consider similar methods and our model is the same as their uni-directional model. These methods were shown to yield sentence embeddings that have competitive performance in several semantic tasks in Kiros et al. (2015). • Window Network. We consider the window approach of Li and Hovy (2014) and Li and Jurafsky (2016) which demonstrated strong performance in the order discrimination task as our third baseline. We adopt the same coherence score interpretation considered by the authors. In 1 AAN Abstracts bitbucket.org/melsner/browncoherence both the above models we consider a special embedding vector which is padded at the beginning of a paragraph and learned during training. This vector allows us to identify the initial few sentences during greedy decoding. • RNN Decoder. Another baseline is our proposed model without the encoder. The decoder hidden state is initialized with zeros. We observed that using a special start symbol as for the other baselines helped obtain better performance with this model. However, a start symbol did not help when the model is equipped with an encoder as the hidden state initialization alone was good enough. We do not place emphasis on the particular search algorithm in this work and thus use beam search with the coherence score heuristic for all models. A beam size of 100 was used. During decoding, sentence candidates that have been already chosen are pruned from the beam. All RNNs use a hidden layer size of 1000. For the window network we used a window size of 3 and a hidden layer size of 2000. We initialize all models with pre-trained GloVe word embeddings. We assess the performance of our model against baseline methods in Table 2. The window network performs strongly compared to the other baselines. Our model does better by a significant margin by exploiting global context, demonstrating that global context is important in this task. While the Entity-Grid model has been fairly successful for the order discrimination task in the past we observe that it fails to discriminate between a large number of candidates. One reason could be that the feature representation is less sensitive to local changes in sentence order (such as swapping adjacent sentences). The computational expense of obtaining parse trees and constructing grids on a large amount of data prohibited experimenting with this model on the NSF abstracts data. The Seq2seq model performs worse than the window network. Interestingly, Li and Jurafsky (2016) observe that the Seq2seq model outperforms the window network in an order discrimination task on Wikipedia data. However, the Wikipedia data considered in their work is an order of magnitude larger than the datasets considered here, and that could have potentially helped the generative model. These models are also expensive during inference since they involve computing and sampling from word distributions. Fig. 2 shows t-SNE embeddings of sentence representations learned by our sentence encoder. These are sentences from test sets, color coded by their positions in the source First Sentence (a) NIPS Abstracts (b) AAN Abstracts Last Sentence (c) NSF Abstracts Figure 2: t-SNE embeddings of representations learned by the model for sentences from the test set. Embeddings are color coded by the position of the sentence in the document it appears. Table 3: Comparison on extractive summarization Table 4: Performance comparison for semantic similarity and paraphrase between models trained from scratch and models detection. The first row shows the best performing purely supervised methpre-trained with the ordering task. ods. The last section shows our models. Model From scratch Pre-train ord. From scratch Pre-train ord. ROUGE-1 ROUGE-2 ROUGE-L Summary length = 75b 18.29 47.56 12.79 18.77 50.32 13.25 Summary length = 275b 35.82 10.67 33.69 36.47 10.99 34.27 Model Supervised Uni-ST (Kiros et al. 2015) Ordering model + BoW + Uni-ST abstract. This shows that our model learns high-level structure in the documents, generalizing well to unseen text. The structure is less apparent in the NSF dataset due to its data diversity and longer documents. While approaches based on the Barzilay and Lee (2004) model explicitly capture topics by discovering clusters in sentences, our neural approach implicitly discovers such structure. 4.3 Sentence Ordering and Summarization In this section we show that sentence ordering models learn coherence properties useful for summarization. We consider a variation of our model where the model takes a set of sentences from several documents as input and sequentially picks summary sentences until it predicts a special ‘stop’ symbol. A key distinction between this model and recent work (Cheng and Lapata 2016; Nallapati, Zhou, and Ma 2016) is that the input order of sentences is assumed to be unknown, making it applicable to multi-document summarization. We train a model from scratch to perform extractive summarization in the above fashion. We then consider a model that is pre-trained on the ordering task and is fine-tuned on the above task. The DailyMail and CNN datasets (Cheng and Lapata 2016) were used for experimentation. We use DailyMail for pre-training purposes and CNN for fine-tuning and evaluation. The labels in DailyMail are not used. We compare ROUGE scores of the two models in Table 3 under standard evaluation settings. We observe that the model pre-trained with the ordering task scores consistently better than the model trained from scratch. The results can be improved further by using larger news corpora. This shows that sentence ordering is an attractive unsupervised objective for exploiting large unlabelled r 0.868 0.848 0.807 0.842 0.860 SICK ρ 0.808 0.778 0.742 0.775 0.795 MSE 0.253 0.287 0.356 0.299 0.270 MSRP (Acc) (F1) 80.4 86.0 73.0 81.9 72.3 81.1 74.0 81.9 74.9 82.5 corpora to improve summarization systems. It further shows that the coherence scores obtained from the ordering model correlates well with summary quality. 4.4 Learned Sentence Representations One of the original motivations for this work is the question of whether we can learn high-quality sentence representations by learning to model text coherence. To address this question we trained our model on a large number of paragraphs using the BookCorpus dataset (Kiros et al. 2015). To evaluate the quality of sentence embeddings derived from the model, we use the evaluation pipeline of Kiros et al. (2015) for tasks that involve understanding sentence semantics. These evaluations are performed by training a classifier on top of the embeddings derived from the model (holding the embeddings fixed) so that the performance is indicative of the quality of sentence representations. We present a comparison for the semantic relatedness and paraphrase detection tasks in Table 4. Results for only uni-directional versions of models are discussed here for a fair comparison. Similar to the skip-thought (ST) paper, we train two models - one predicting the correct order in the forward direction and another in the backward direction. The numbers shown for the ordering model were obtained by concatenating the representations from the two models. Concatenating the above representation with the bag-ofwords representation (using the fine-tuned word embeddings) of the sentence further improves performance. This is because the ordering model can choose to pay less attention to specific lexical information and focus on high-level document structure. Hence, the two representations capture complementary semantics. Adding ST features improves performance Table 5: Visualizing salient words (Abstracts are from the AAN corpus). In this paper , we propose a new method for semantic class induction . First , we introduce a generative model of sentences , based on dependency trees and which takes into account homonymy . Our model can thus be seen as a generalization of Brown clustering . Second , we describe an efficient algorithm to perform inference and learning in this model . Third , we apply our proposed method on two large datasets ( 108 tokens , 105 words types ) , and demonstrate that classes induced by our algorithm improve performance over Brown clustering on the task of semisupervised supersense tagging and named entity recognition . Representation learning is a promising technique for discovering features that allow supervised classifiers to generalize from a source domain dataset to arbitrary new domains . We present a novel , formal statement of the representation learning task . We argue that because the task is computationally intractable in general , it is important for a representation learner to be able to incorporate expert knowledge during its search for helpful features . Leveraging the Posterior Regularization framework , we develop an architecture for incorporating biases into representation learning . We investigate three types of biases , and experiments on two domain adaptation tasks show that our biased learners identify significantly better sets of features than unbiased learners , resulting in a relative reduction in error of more than 16% for both tasks , with respect to state-of-the-art representation learning techniques. further. We observed that the bilinear scoring function and introducing contrastive sentences to the decoder improved the quality of learned representations significantly. Our model has several key advantages over ST. ST has a word-level reconstruction objective and is trained with large softmax output layers. This limits the vocabulary size and slows down training (they use a vocabulary size of 20k and report two weeks of training). Our model achieves comparable performance and does not have such a word reconstruction component. We train with a vocabulary of 400k words; the above results are based on a training time of two days on a GTX Titan X GPU. 4.5 Word Influence We attempt to understand what text-level clues the model uses to perform the ordering task. Inspired by Li et al. (2015), we use gradients of prediction decisions with respect to words of the correct sentence as a proxy for the salience of each word. We feed sentences to the decoder in the correct order and at each time step compute the derivative of the score e (Eq. 6) of the correct next sentence s = (w1 , .., wn ) with respect to its word embeddings. The importance of word wi in correctly ∂e predicting s as the next sentence is defined as k ∂w k. We i assume the hidden states of the decoder to be fixed and only back-propagate gradients through the sentence encoder. Table 5 shows visualizations of two abstracts. Darker shades correspond to higher gradient norms. In the first example the model appears to be using the word clues ‘first’, ‘second’ and ‘third’. A similar observation was made by Chen, Qiu, and Huang (2016). In the second example we observe that the model pays attention to phrases such as ‘We present’, ‘We argue’, which are typical of abstract texts. It also focuses on the word ‘representation’ appearing in the first two sentences. These observations link to centering theory which states that entity distributions in coherent discourses exhibit certain patterns. The model implicitly learns these patterns with no syntax annotations or handcrafted features. 5 Conclusion This work investigated the challenging problem of coherently organizing a set of sentences. Our RNN-based model performs strongly compared to baselines and prior work on sentence ordering and order discrimination tasks. We further demonstrated that it captures high-level document structure and learns useful sentence representations when trained on large amounts of data. Our approach to the ordering problem deviates from most prior work that use handcrafted features. However, exploiting linguistic features for next sentence classification can potentially further improve performance. Entity distribution patterns can provide useful features about named entities that are treated as out-of-vocabulary words. The ordering problem can be further studied at higher-level discourse units such as paragraphs, sections and chapters. 6 Acknowledgments This material is based in part upon work supported by IBM under contract 4915012629. Any opinions, findings, conclusions or recommendations expressed above are those of the authors and do not necessarily reflect the views of IBM. We thank the UMich/IBM Sapphire team and Junhyuk Oh, Ruben Villegas, Xinchen Yan, Rui Zhang, Kibok Lee and Yuting Zhang for helpful comments and discussions. References Barzilay, R., and Elhadad, N. 2002. Inferring strategies for sentence ordering in multidocument news summarization. Journal of Artificial Intelligence Research 35–55. Barzilay, R., and Lapata, M. 2008. Modeling local coherence: An entity-based approach. Computational Linguistics 34(1):1–34. Barzilay, R., and Lee, L. 2004. Catching the drift: Probabilistic content models, with applications to generation and summarization. arXiv preprint cs/0405039. Burstein, J.; Tetreault, J.; and Andreyev, S. 2010. Using entity-based features to model coherence in student essays. In Human language technologies: The 2010 annual conference of the North American chapter of the Association for Computational Linguistics, 681–684. Association for Computational Linguistics. Chen, X.; Qiu, X.; and Huang, X. 2016. Neural sentence ordering. arXiv preprint arXiv:1607.06952. Cheng, J., and Lapata, M. 2016. Neural summarization by extracting sentences and words. arXiv preprint arXiv:1603.07252. Doersch, C.; Gupta, A.; and Efros, A. A. 2015. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE International Conference on Computer Vision, 1422–1430. Elsner, M.; Austerweil, J. L.; and Charniak, E. 2007. A unified local and global model for discourse coherence. In HLT-NAACL, 436–443. Grosz, B. J.; Weinstein, S.; and Joshi, A. K. 1995. Centering: A framework for modeling the local coherence of discourse. Computational linguistics 21(2):203–225. Guinaudeau, C., and Strube, M. 2013. Graph-based local coherence modeling. In ACL (1), 93–103. Kiddon, C.; Zettlemoyer, L.; and Choi, Y. 2016. Globally coherent text generation with neural checklist models. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing (EMNLP). Kingma, D., and Ba, J. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Kiros, R.; Zhu, Y.; Salakhutdinov, R. R.; Zemel, R.; Urtasun, R.; Torralba, A.; and Fidler, S. 2015. Skip-thought vectors. In Advances in Neural Information Processing Systems, 3276– 3284. Klein, D., and Manning, C. D. 2003. Accurate unlexicalized parsing. In Proceedings of the 41st Annual Meeting on Association for Computational Linguistics-Volume 1, 423–430. Association for Computational Linguistics. Lapata, M. 2003. Probabilistic text structuring: Experiments with sentence ordering. In Proceedings of the 41st Annual Meeting on Association for Computational LinguisticsVolume 1, 545–552. Association for Computational Linguistics. Lapata, M. 2006. Automatic evaluation of information ordering: Kendall’s tau. Computational Linguistics 32(4):471– 484. Li, J., and Hovy, E. H. 2014. A model of coherence based on distributed sentence representation. In EMNLP, 2039–2048. Li, J., and Jurafsky, D. 2016. Neural net models for open-domain discourse coherence. arXiv preprint arXiv:1606.01545. Li, J.; Chen, X.; Hovy, E.; and Jurafsky, D. 2015. Visualizing and understanding neural models in nlp. arXiv preprint arXiv:1506.01066. Li, J.; Luong, M.-T.; and Jurafsky, D. 2015. A hierarchical neural autoencoder for paragraphs and documents. arXiv preprint arXiv:1506.01057. Lichman, M. 2013. UCI machine learning repository. Lin, R.; Liu, S.; Yang, M.; Li, M.; Zhou, M.; and Li, S. 2015. Hierarchical recurrent neural network for document modeling. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, 899–907. Louis, A., and Nenkova, A. 2012. A coherence model based on syntactic patterns. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, 1157–1168. Association for Computational Linguistics. Miltsakaki, E., and Kukich, K. 2004. Evaluation of text coherence for electronic essay scoring systems. Natural Language Engineering 10(01):25–55. Nallapati, R.; Zhou, B.; and Ma, M. 2016. Classify or select: Neural architectures for extractive document summarization. arXiv preprint arXiv:1611.04244. Nguyen, D. T., and Joty, S. 2017. A neural local coherence model. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, 1320–1330. Noroozi, M., and Favaro, P. 2016. Unsupervised learning of visual representations by solving jigsaw puzzles. In European Conference on Computer Vision, 69–84. Springer. Park, C. C., and Kim, G. 2015. Expressing an image stream with a sequence of natural sentences. In Advances in Neural Information Processing Systems, 73–81. Pennington, J.; Socher, R.; and Manning, C. D. 2014. Glove: Global vectors for word representation. In EMNLP, volume 14, 1532–43. Radev, D. R.; Joseph, M. T.; Gibson, B.; and Muthukrishnan, P. 2009. A Bibliometric and Network Analysis of the field of Computational Linguistics. Journal of the American Society for Information Science and Technology. Soricut, R., and Marcu, D. 2006. Discourse generation using utility-trained coherence models. In Proceedings of the COLING/ACL on Main conference poster sessions, 803–810. Association for Computational Linguistics. Sutskever, I.; Vinyals, O.; and Le, Q. V. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, 3104–3112. Vinyals, O.; Bengio, S.; and Kudlur, M. 2015. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391. Vinyals, O.; Fortunato, M.; and Jaitly, N. 2015. Pointer networks. In Advances in Neural Information Processing Systems, 2674–2682. Wang, X., and Gupta, A. 2015. Unsupervised learning of visual representations using videos. In Proceedings of the IEEE International Conference on Computer Vision, 2794– 2802.
2cs.AI
Fine-grained Event Learning of Human-Object Interaction with LSTM-CRF arXiv:1710.00262v1 [cs.CV] 30 Sep 2017 Tuan Do and James Pustejovsky ∗ Brandeis University - Department of Computer Science Waltham, Massachusetts - United States of America Abstract. Event learning is one of the most important problems in AI. However, notwithstanding significant research efforts, it is still a very complex task, especially when the events involve the interaction of humans or agents with other objects, as it requires modeling human kinematics and object movements. This study proposes a methodology for learning complex human-object interaction (HOI) events, involving the recording, annotation and classification of event interactions. For annotation, we allow multiple interpretations of a motion capture by slicing over its temporal span; for classification, we use Long-Short Term Memory (LSTM) sequential models with Conditional Randon Field (CRF) for constraints of outputs. Using a setup involving captures of human-object interaction as three dimensional inputs, we argue that this approach could be used for event types involving complex spatio-temporal dynamics. 1 Introduction The study of events has long involved many disciplines, including philosophy, cognitive psychology, linguistics, computer science, and AI. The Gestalt school of philosophy characterized events as whole processes that emerge from the relations between their components. Cognitive psychologists, such as Tulving [1], recognized the importance of events by postulating a separate cognitive process called episodic memory. The representation of events in natural language has been studied from many different approaches, from formal logic and AI [2], and frames [3], to computational linguistics [4]. Combining perspectives from computer science, logic, and linguistics, some recent work suggests that events can be effectively modeled as programs within a dynamic logic (DITL) [5], enabling computer simulations of linguistic expressions [6]. In computer science, there is little consensus about how events should be modeled for learning. They can be represented atomically, i.e., entire events are predicted in a classification manner [7], or as combinations of more primitive actions [8], i.e., complex event types are learned based on recognition of combined primitive actions. For the former type of event representation, there are quantitative approaches based on low-level pixel features such as in [9] and qualitative approaches such as induction from relational states among event participants [10]. For the latter approach, systems such as [11], use state transition graphical models such as Dynamic Bayesian Networks (DBN). ∗ This work is supported by a contract with the US Defense Advanced Research Projects Agency (DARPA), Contract W911NF-15-C-0238. Approved for Public Release, Distribution Unlimited. The views expressed are those of the authors and do not reflect the official policy or position of the Department of Defense or the U.S. Government. We would like to thank Nikhil Krishnaswamy and Keigh Rim for their discussion and input on this topic. All errors and mistakes are, of course, the responsibilities of the authors.. While learning events as a whole works best for human motion signatures such as running, sitting etc., it poses a problem for event types that require distinctions in spatio-temporal relationships between objects. As pointed in [10], it is also difficult to model events as strict orderings of subevents, especially when there are overlapping or during relations between them. Moreover, if the purpose of event learning is to facilitate communication and interaction between human and computational agents, such as robots, to achieve some common goals, these agents need to keep track of multiple events at the same time, involving themselves, other humans, as well as the surrounding environment. From a practical point of view, this calls for a finer-grained treatment of event modeling. It is also the case that a fine-grained analysis of events is strongly supported from a theoretical point of view. For example, it has long been known that event classification needs to take into account what is called extra-verbal factors. Event types should not be semantically defined only by a base verbal expression, such as running or walking, but need to incorporate other components of the expression compositionally, such as objects and adjuncts, which can change the event type of the overall verb phrase or sentence [12]. Motivated by those arguments, we suggest a different approach to event learning. Instead of treating events as whole, or as programs of subevents, we allow multiple interpretations of a motion capture by slicing over its temporal span and give a separate annotation for each slice. In particular, we use an event capture and annotation tool called ECAT [13], which employs Microsoft Kinectr to capture sessions of performers interacting with two types of objects, a cube (which can be slid on a flat surface) and a cylinder (which can be rolled). Objects are tracked using markers fixed to their sides facing the camera. They are then projected into three dimensional space using depth of field. Performers are tracked using the Kinect API, which provides three dimensional inputs of a performer’s joint points (e.g., wrist, palm, shoulder). Sessions are first sliced, and each slice is annotated with a textual description using our event language. Our sequence learning algorithms (LSTM-CRF) will input sequences of feature vectors and output a representation of an event. The main contributions of our study are twofolds. Firstly we created a framework for event recording and annotation that takes into account their temporal dynamics, i.e., different interpretations of events on different temporal spans. Applying a flavor of the popular sequential learning method LSTM that accommodates to output constraints, we achieved good performance in our human-object interaction setup. 2 Learning Framework We used three dimensional coordinates of bodies tracked by KinectrSDK to model human kinematics. Only joint points on the upper body of performers (13 joint points) are kept and concatenated, because their lower parts are occluded when they interact with objects on top of a table. In addition, for each marker detected (using Glyph detection algorithm[14]), we generate 12 features (4 3-D corners). Features of objects are concatenated into a vector of a fixed size (there is always one performer and two objects tracked). A sample in the dataset consists of a sequence of fixed length of feature vectors. Its label is mapped from the textual annotation into an output structure (Subject, Object, Locative, Verb, Preposition). We will call this output structure (Y1 , . . . , Y5 ). 2.1 LSTM LSTM is a flavor of deep Recursive neural network (RNN) that has generally solved the problem of “vanishing gradients” in traditional RNN learning [15, 16] and has found their application in a wide range of problems involving sequential learning, such as hand written recognition, speech recognition, gesture recognition, etc. p1 Y1 Y2 Y3 p2 p3 p4 Y4 Y5 Fig. 1: LSTM model with possible constraints of outputs with CRF. CRF layer is represented as dashed links among predicted labels. We will not describe in detail here our LSTM implementation, as we provide online access to the code and approach 1 . Briefly, however, the model passes each feature vector through a linear layer before feeding each sequence into an LSTM. Each label Yi requires a separate LSTM cell, Xi . Depending on whether we predict each label independently and combine them for final prediction, or we predict on the basis of the sum of outputs from the last layer, two variants are considered, correspondingly LSTM-I and LSTM-W. 2.2 CRF SU BJ V ERB OBJ OBJ ST ART LOC LOC SU BJ P REP V ERB P REP Fig. 2: Reformation from general CRF (left) to Tree-CRF (right) CRF has been used extensively to learn structured output as it allows specification of constraints of output labels[17]. In this model we wish to constrain the 1 https://github.com/tuandnvn/ecat learning outputs so that: one object (Performer or the other objects) is not allowed to fill two different syntactic slots; when there is no verb, all the other slots should be None; locative and preposition are dependent, because if locative is None, preposition must also be None and vice versa. The edges between nodes on the left side of Figure 2 show the dependencies on output labels that we wish to model. However, training and classifying using a full CRF model would be more difficult, especially when implemented with a neural network architecture. We modified the model into a tree-CRF structure (right side of Figure 2) to make the model learnable using dynamic programming. The complexity of the algorithm reduced from O(n5 ) to O(n2 ) ∗ 5) where n is the size of our vocabulary. The learning problem is thereby changed to learning the weights along the edges on the tree-CRF, for example, P locative preposition (together with parameters of LSTM). The directionality of edges is the forward direction of the message passing algorithm used for learning (and in reverse, for testing using the backward direction). 2.3 LSTM-CRF LSTM-CRF is a natural extension of LSTM applied for constrained outputs. For instance it is used for named entities recognition task to model constraints on BIO labels[18]. To put CRF learning on top of LSTM-W, we modify the term t (the term before softmax) produced by outputs of LSTM as followings. t(l, s, o, p, v) = tl + ts + to + tp + tv Original LSTM-W t(l, s, o, p, v) = tl + ts + to + tp + tv Modified + Pstart l + Pls + Plo + Plp + Psv where l, s, o, p, v stand for Locative, Subject, Object, Preposition and Verb respectively. In training, sof tmax is calculated for a predicted label combination, namely (l′ , s′ , o′ , p′ , v ′ ) as below. We can calculate the log of sum using message passing over the tree nodes of the CRF tree. We use cross entropy between predicted distribution and correct output as the cost in training. sof tmax = exp[t(l′ , s′ , o′ , p′ , v ′ ) − log[ XXXXX l = exp[t(l′ , s′ , o′ , p′ , v ′ ) − log[ X v exp(tv + Psv )][ X o X s o p exp(t(l, s, o, p, v))]] v exp(tl + Pstart l )[ l exp(to + Plo )][ X X exp(ts + Pls ) s exp(tp + Plp )]] p In evaluation, a similar message passing algorithm is used, but instead of log sum, we use max to calculate the probabilities and argmax to keep track of the best combination. 3 3.1 Experiments Event Capture and Annotation To demonstrate our model’s capability to learn the spatio-temporal dynamics of object interactions in events, we use a collection of four action types: push, pull, slide, and roll, along with three different spatial prepositions used for space configurations between objects, namely toward (when the trajectory of a moving object is straightly lined up with a destination static object and makes it closer to that target), away from (makes it further from that object) and past (moving object getting closer to static object then further again). Afterwards, for each session, we sliced the events into short segments of 20 frames. Two annotators were assigned to watch and annotate them (segments can be played back). To speed up annotation, only event types related to original captured types are shown for selection. For instance, if the event type of the captured session is “The performer pushes A toward B”, other available event types are “The performer pushes A”, “A slides toward B” or “None”. 3.2 Classification Results Our LSTM models have one hidden layer of 200 features. Two methods are used to combat over-fitting: (i) dropout in LSTM cell with probability of 0.8, and (ii) gradient clipping by a global norm. The network is trained with mini-batch gradient descent optimization for 200 epochs on the Tensorflow library. Most frequent label tagging is used as the baseline for this study: that is, we simply predict any sample with the most frequent tuple seen in the training corpus. Captured sessions are split into training and testing sets on the proportion of 60/40, i.e., 18 sessions of training and 12 sessions for testing for each event type. That gives a total of 2680 training samples and 1840 testing samples. Precisions reported are averaged over 5 runs (each run is obtained with a random initialization). Breakdowns of precision for each label show that verb precision is the lowest, with high confusion between the following pairs: push vs roll, pull vs roll, and slide vs roll. It is likely because of poor tracking result when objects are rolled. In fact, the capture tool could not recognize objects in many frames when objects roll fast, and it compensated by using interpolation. Improvement on tracking of objects, however, is not the target of our study. Model Baseline LSTM-I LSTM-W LSTM-CRF Precision 6% 38% 39% 43% Table 1: Evaluation Label Subject Object Locative Verb Preposition Precision 86% 87% 73% 68% 72% Table 2: Label precision breakdown We observed significant improvement of learning using LSTM over baseline, especially when it is coupled with CRF. Moreover, we also observed a reduction of invalid outputs from 20% to 3% when CRF is used. We consider these results to be quite good, particularly since the sequential learning model we used is both simple and fast, and we did not employ any feature engineering method. 4 Conclusion and Future Directions In this paper, we have demonstrated a methodology that provides reasonable learning results for a set of complex event types. We hope that our study will provide a starting point for further investigations into fine-grained event learning. Currently our learning method requires a fix number of objects in inputs, which could be overcome by incrementally adding object features into a fix size feature vector, possibly by using a recursive neural network. Regarding our annotation framework, a natural extension is that spans of different lengths could be annotated with appropriate re-sampling methods. We leave these as some of our future research topics. We are currently applying this learning pipeline (simple interval annotation + sequential learning with constraint outputs) on a large movie dataset that have event annotations. We are looking to publish our results in the near future. References [1] Endel Tulving. Elements of Episodic Memory. Oxford University Press, 1983. [2] James Allen. Towards a general theory of action and time. Arificial Intelligence, 23:123–154, 1984. [3] C. Fillmore. Santa Cruz Lectures on Deixis. Indiana University Linguistics Club. Bloomington, IN, 1975. [4] James Pustejovsky, Kiyong Lee, Harry Bunt, and Laurent Romary. Iso-timeml: A standard for annotating temporal information in language. In LREC, 2011. [5] James Pustejovsky and Jessica L Moszkowicz. The qualitative spatial dynamics of motion in language. Spatial Cognition & Computation, 11(1):15–44, 2011. [6] James Pustejovsky and Nikhil Krishnaswamy. Generating simulations of motion events from verbal descriptions. Lexical and Computational Semantics (* SEM 2014), page 99, 2014. [7] Amir Shahroudy, Jun Liu, Tian-Tsong Ng, and Gang Wang. Ntu rgb+ d: A large scale dataset for 3d human activity analysis. arXiv preprint arXiv:1604.02808, 2016. [8] Harini Veeraraghavan, Nikolaos Papanikolopoulos, and Paul Schrater. Learning dynamic event descriptions in image sequences. In 2007 IEEE Conference on Computer Vision and Pattern Recognition, pages 1–6. IEEE, 2007. [9] Quoc V Le, Will Y Zou, Serena Y Yeung, and Andrew Y Ng. Learning hierarchical invariant spatio-temporal features for action recognition with independent subspace analysis. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 3361–3368. IEEE, 2011. [10] Krishna Sandeep Reddy Dubba, Anthony G Cohn, David C Hogg, Mehul Bhatt, and Frank Dylla. Learning relational event models from video. Journal of Artificial Intelligence Research, 53:41–90, 2015. [11] Anthony Hoogs and AG Amitha Perera. Video activity recognition in the real world. In AAAI, pages 1551–1554, 2008. [12] James Pustejovsky. The Generative Lexicon. MIT Press, Cambridge, MA, 1995. [13] Tuan Do, Nikhil Krishnaswamy, and James Pustejovsky. Ecat: Event capture annotation tool. Proceedings of ISA-12: International Workshop on Semantic Annotation, 2016. [14] Andrew Kirillov. From glyph recognition to augmented reality. https://www.codeproject.com/articles/258856/from-glyph-recognition-to-augmented-reality. Accessed: 2016-03-15. [15] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9 (8):1735–1780, 1997. [16] Jürgen Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 61: 85–117, 2015. [17] Charles Sutton and Andrew McCallum. An introduction to conditional random fields for relational learning, volume 2. Introduction to statistical relational learning. MIT Press, 2006. [18] Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015.
1cs.CV
Dual Recurrent Attention Units for Visual Question Answering Ahmed Osman 1,2 , Wojciech Samek 1 1 Fraunhofer Heinrich Hertz Institute, Berlin, Germany 2 University of Freiburg, Freiburg, Germany arXiv:1802.00209v1 [cs.AI] 1 Feb 2018 {ahmed.osman, wojciech.samek}@hhi.fraunhofer.de Abstract We propose an architecture for VQA which utilizes recurrent layers to generate visual and textual attention. The memory characteristic of the proposed recurrent attention units offers a rich joint embedding of visual and textual features and enables the model to reason relations between several parts of the image and question. Our single model outperforms the first place winner on the VQA 1.0 dataset, performs within margin to the current state-of-the-art ensemble model. We also experiment with replacing attention mechanisms in other state-of-the-art models with our implementation and show increased accuracy. In both cases, our recurrent attention mechanism improves performance in tasks requiring sequential or relational reasoning on the VQA dataset. Figure 1. Diagram of the DRAU network. tial manner which recurrent layers are better suited due to their ability to capture relevant information over an input sequence. In this paper, we propose a RNN-based joint representation to generate visual and textual attention. We argue that embedding a RNN in the joint representation helps the model process information in a sequential manner and determine what is relevant to solve the task. We refer to the combination of RNN embedding and attention as Recurrent Textual Attention Unit (RTAU) and Recurrent Visual Attention Unit (RVAU) respective of their purpose. Furthermore, we employ these units in a fairly simple network, referred to as Dual Recurrent Attention Units (DRAU) network, and show improved results over several baselines. Finally, we enhance state-of-the-art models by replacing the model’s default attention mechanism with RVAU. Our main contributions are the following: 1. Introduction Although convolutional neural networks (CNNs) and recurrent neural networks (RNNs) have been successfully applied to various image and natural language processing tasks (cf. [1, 2, 3, 4]), these breakthroughs only slowly translate to multimodal tasks such as visual question answering (VQA) where the model needs to create a joint understanding of the image and question. Such multimodal tasks require joint visual and textual representations. Since global features can hardly answer questions about certain local parts of the input, attention mechanisms have been extensively used in VQA recently [5, 6, 7, 8, 9, 10, 11, 12]. It attempts to make the model predict based on spatial or lingual context. However, most attention mechanisms used in VQA models are rather simple, consisting of two convolutional layers followed by a softmax to generate the attention weights which are summed over the image features. These shallow attention mechanisms may fail to select the relevant information from the joint representation of the question and image. Creating attention for complex questions, particularly sequential or relational reasoning questions, requires processing information in a sequen- • We introduce a novel approach to generate soft attention. To the best of our knowledge, this is the first attempt to generate attention maps using recurrent neural networks. We provide quantitative and qualitative results showing performance improvements over the de1 fault attention used in most VQA models. • Our attention modules are modular, thus, they can substitute existing attention mechanisms in most models fairly easily. We show that state-of-the-art models with RVAU “plugged-in” perform consistently better than their vanilla counterparts. 2. Related Work This section discusses common methods that have been explored in the past for VQA. Bilinear representations Fukui et al. [7] use compact bilinear pooling to attend over the image features and combine it with the language representation. The basic concept behind compact bilinear pooling is approximating the outer product by randomly projecting the embeddings to a higher dimensional space using Count Sketch projection [13] and then exploiting Fast Fourier Transforms to compute an efficient convolution. An ensemble model using MCB won first place in VQA (1.0) 2016 challenge. Kim et al. [5] argues that compact bilinear pooling is still expensive to compute and shows that it can be replaced by element-wise product (Hadamard product) and a linear mapping (i.e. fullyconnected layer) which gives a lower dimensional representation and also improves the model accuracy. Recently, Ben-younes et al. [14] proposed using Tucker decomposition [15] with a low-rank matrix constraint as a bilinear representation. They propose this fusion scheme in an architecture they refer to as MUTAN which as of this writing is the current state-of-the-art on the VQA 1.0 dataset. Attention-based Closely related to our work, Lu et al. [9] were the first to feature a co-attention mechanism that applies attention to both the question and image. Nam et al. [6] use a Dual Attention Network (DAN) that employs attention on both text and visual features iteratively to predict the result. The goal behind this is to allow the image and question attentions to iteratively guide each other in a synergistic manner. RNNs for VQA Using recurrent neural networks (RNNs) for VQA has been explored in the past. Xiong et al. [16] build upon the dynamic memory network from Kumar and Varaiya [17] and proposes DMN+. DMN+ uses episodic modules which contain attention-based Gated Recurrent Units (GRUs). Note that this is not the same as what we propose; Xiong et al. generate soft attention using convolutional layers and then uses it to substitute the update gate of the GRU. In contrast, our approach uses the recurrent layers to generate the attention. Noh and Han [8] propose recurrent answering units in which each unit is a complete module that can answer a question about an image. They use joint loss minimization to train the units. However during testing, they use the first answering unit which was trained from other units through backpropagation. Notable mentions Kazemi and Elqursh [18] show that a simple model can get state-of-the-art results with proper training parameters. Wu et al. [19] construct a textual representation of the semantic content of an image and merges it with textual information sourced from a knowledge base. Ray et al. [20] introduce a task of identifying relevant questions for VQA. Kim et al. [21] apply residual learning techniques to VQA and propose a novel attention image attention visualization method using backpropagation. 3. Dual Recurrent Attention in VQA We propose our method in this section. Figure 1 illustrates the flow of information in the DRAU model. Given an image and question, we create the input representations v and q. Next, these features are combined by 1 × 1 convolutions into two separate branches. Then, the branches are passed to an RTAU and RVAU. Finally, the branches are combined using a fusion operation and fed to the final classifier. The full architecture of the network is depicted in Figure 2. 3.1. Input Representation Image representation We use the 152-layer “ResNet” pretrained CNN from He et al. [1] to extract image features. Similar to [7, 6], we resize the images to 448 × 448 and extract the last layer before the final pooling layer (res5c) with size 2048 × 14 × 14. Finally, we use l2 normalization on all dimensions. Recently, Anderson et al. [22] have shown that object-level features can provide a significant performance uplift compared to global-level features from pretrained CNNs. Therefore, we experiment with replacing the ResNet features with FRCNN [23] features with a fixed number of proposals per image (K = 36). Question representation We use a fairly similar representation as [7]. In short, the question is tokenized and encoded using an embedding layer followed by a tanh activation. We also exploit pretrained GloVe vectors [24] and concatenate them with the output of the embedding layer. The concatenated vector is fed to a two-layer unidirectional LSTM that contains 1024 hidden states each. In contrast to Fukui et al., we use all the hidden states of both LSTMs rather than concatenating the final states to represent the final question representation. 3.2. 1 × 1 Convolution and PReLU We apply multiple 1 × 1 convolution layers in the network for mainly two reasons. First, they learn weights from Figure 2. The proposed network. ⊕ denotes concatenation. the image and question representations in the early layers. This is important especially for the image representation, since it was originally trained for a different task. Second, they are used to generate a common representation size. To obtain a joint representation, we apply 1 × 1 convolutions followed by PReLU activations [1] on both the image and question representations. Through empirical evidence, PReLU activations were found to reduce training time significantly and improve performance compared to ReLU and tanh activations. We provide these results in Section 4. 3.3. Recurrent Attention Units The result from the above-mentioned layers is concatenated and fed to two separate recurrent attention units (RAU). Each RAU starts with another 1 × 1 convolution and PReLU activation:  ca = PReLU Wa x (1) where Wa is the 1 × 1 convolution weights, x is the input to the RAU, and ca is the output of the first PReLU. Furthermore, we feed the previous output into an unidirectional LSTM:  ha,n = LSTM ca,n (2) Next, we use the attention weights to compute a weighted average of the image and question features. atta,n = N X Watt,n fn (4) n=1 where fn is the input representation and atta,n is the attention applied on the input. Finally, the attention maps are fed into a fully-connected layer followed by a PReLU activation. Figure 3 illustrates the structure of a RAU.  yatt,n = PReLU Wout atta,n (5) where Wout is a weight vector of the fully connected layer and yatt,n is the output of each RAU. 3.4. Reasoning layer A fusion operation is used to merge the textual and visual branches. For DRAU, we experiment with using elementwise multiplication (Hadamard product) and MCB [7, 25]. The result of the fusion is given to a many-class classifier using the top 3000 frequent answers. We use a single-layer softmax with cross-entropy loss. This can be written as:    Pa = softmax fusion op ytext , yvis Wans (6) where ha,n is the hidden state at time n. To generate the attention weights, we feed all the hidden states of the previous LSTM to a 1 × 1 convolution layer followed by a softmax function. The 1×1 convolution layer could be interpreted as the number of glimpses the model sees.   Watt,n = softmax PReLU Wg ha,n (3) where ytext and yvis are the outputs of the RAUs, Wans represents the weights of the multi-way classifier, and Pa is the probability of the top 3000 frequent answers. The final answer â is chosen according to the following: where Wg is the glimpses’ weights and Watt,n is the attention weight vector. Experiments are performed on the VQA 1.0 and 2.0 datasets [26, 27]. These datasets use images from the â = argmax Pa (7) 4. Experiments and Results VQA 1.0 Validation Split Open Ended Task Baselines Y/N Num. Other Language only Simple MCB Joint LSTM Figure 3. Recurrent Attention Unit. MS-COCO dataset [28] and generate questions and labels (10 labels per question) using Amazon’s Mechanical Turk (AMT). Compared to VQA 1.0, VQA 2.0 adds more imagequestion pairs to balance the language prior present in the VQA 1.0 dataset. The ground truth answers in the VQA dataset are evaluated using human consensus.  P a is in human annotation ,1 (8) Acc(a) = min 3 We evaluate our results on the validation, test-dev, teststd splits of each dataset. Models evaluated on the validation set use train and Visual Genome for training. For the other splits, we include the validation set in the training data. However, the models using FRCNN features do not use data augmentation with Visual Genome. To train our model, we use Adam [29] for optimization with β1 = 0.9, β2 = 0.999, and an initial learning rate of  = 7 × 10−4 . The final model is trained with a small batch size of 32 for 400K iterations. We did not fully explore tuning the batch size which explains the relatively high number of training iterations. Dropout (p = 0.3) is applied after each LSTM and after the fusion operation. All weights are initialized as described in [30] except LSTM layers which use an uniform weight distribution. The pretrained ResNet was fixed during training due to the massive computational overhead of fine-tuning the network for the VQA task. While VQA datasets provide 10 answers per image-question pair, we sample one answer randomly for each training iteration. 4.1. VQA 1.0 Experiments During early experiments, the VQA 2.0 dataset was not yet released. Thus, the baselines and early models were evaluated on the VQA 1.0 dataset. While building the final model, several parameters were changed, mainly, the learning rate, activation functions, dropout value, and other modifications which we discuss in this section. Baselines We started by designing three baseline architectures. The first baseline produced predictions solely from the question while totally ignoring the image. The 78.56 78.64 79.90 27.98 32.98 36.96 30.76 39.79 49.58 All 48.3 54.82 59.34 Table 1. Evaluation of the baseline models on the VQA 1.0 validation split. model used the same question representation described in [7] and passed the output to a softmax 3000-way classification layer. The goal of this architecture was to assess the extent of the language bias present in VQA. The second baseline is a simple joint representation of the image features and the language representation. The representations were combined using the compact bilinear pooling from [25]. We chose this method specifically because it was shown to be effective by Fukui et al. [7]. The main objective of this model is to measure how a robust pooling method of multimodal features would perform on its own without a deep architecture or attention. We refer to this model as Simple MCB. For the last baseline, we substituted the compact bilinear pooling from Simple MCB with an LSTM consisting of hidden states equal to the image size. A 1 × 1 convolutional layer followed by a tanh activation were used on the image features prior to the LSTM, while the question representation was replicated to have a common embedding size for both representations This model is referred to as Joint LSTM. We begin by testing our baseline models on the VQA 1.0 validation set. As shown in Table 1, the language-only baseline model managed to get 48.3% overall. More impressively, it scored 78.56% on Yes/No questions. The Simple MCB model further improves the overall performance, although little improvement is gained in the binary Yes/No tasks. Replacing MCB with our basic Joint LSTM embedding improves performance across the board. Modifications to the Joint LSTM Model We test several variations of the Joint LSTM baseline which are highlighted in Table 2. Using PReLU activations has helped in two ways. First, it reduced time for convergence from 240K iterations to 120K. Second, the overall accuracy has improved, especially in the Other category. The next modifications were inspired by the results from [18]. We experimented with appending positional features which can be described as the coordinates of each pixel to the depth/feature dimension of the image representation. When unnormalized with respect to the other features, it worsened results significantly, dropping the overall accuracy by over 2 points. Model VQA 1.0 Validation Split Open Ended Task Y/N Num. Other Joint LSTM baseline PReLU Pos. features Pos. features (norm.) High dropout Extra FC 79.90 79.61 79.68 79.69 79.03 78.86 36.96 36.21 36.52 36.36 34.84 33.51 49.58 50.77 46.59 50.69 47.25 45.57 All 59.34 59.74 57.71 59.75 57.59 56.51 Table 2. Evaluation of the Joint LSTM model and its modifications on the VQA 1.0 validation split. Normalizing positional features did not have enough of a noticeable improvement (0.01 points overall) to warrant its effectiveness. Next, all dropout values are increased from 0.3 to 0.5 deteriorated the network’s accuracy, particularly in the Number and Other categories. The final modification was inserting a fully connected layer with 1024 hidden units before the classifier, which surprisingly dropped the accuracy massively. 4.2. VQA 2.0 Experiments After the release of VQA 2.0, we shifted our empirical evaluation towards the newer dataset. First, we retrain and retest our best performing VQA 1.0 model Joint LSTM as well as several improvements and modifications. Since VQA 2.0 was built to reduce the language prior and bias inherent in VQA, the accuracy of Joint LSTM drops significantly as shown in Table 3. Note that all the models that were trained so far do not have explicit visual or textual attention implemented. Our first network with explicit visual attention, RVAU, shows an accuracy jump by almost 3 points compared to the Joint LSTM model. This result highlights the importance of attention for good performance in VQA. Training the RVAU network as a multilabel task (RVAUmultilabel ), i.e. using all available annotations at each training iteration, drops the accuracy horribly. This is the biggest drop in performance so far. This might be caused by the variety of annotations in VQA for each question which makes the task for optimizing all answers at once much harder. DRAU Evaluation The addition of RTAU marks the creation of our DRAU network. The DRAU model shows favorable improvements over the RVAU model. Adding textual attention improves overall accuracy by 0.56 points. Substituting the PReLU activations with ReLU (DRAUReLU ) massively drops performance. While further training might have helped the model improve, PReLU offers much faster 1 Concurrent Work Model VQA 2.0 Validation Split Open Ended Task Y/N Num. Other All Joint LSTM w/PReLU 72.04 37.95 48.58 56.00 RVAU RVAUmultilabel 74.59 77.53 37.75 36.05 52.81 40.18 59.02 53.67 DRAUHadamard fusion DRAUanswer vocab = 5k DRAUReLU DRAUno final dropout DRAUhigh final dropout 76.62 76.33 72.69 77.02 76.47 38.92 38.21 34.92 38.26 38.71 52.09 51.85 45.05 50.17 52.52 59.58 59.27 54.11 58.69 59.71 - - - 59.14 59.67 MCB [26] Kazemi and Elqursh [18]1 Table 3. Evaluation of RVAU and DRAU-based models on the VQA 2.0 validation split. convergence. Increasing the value of the dropout layer after the fusion operation (DRAUhigh final dropout ) improves performance by 0.13 points, in contrast to the results of the Joint LSTM model on VQA 1.0. Note that on the VQA 1.0 tests, we changed the values of all layers that we apply dropout on, but here we only change the last one after the fusion operation. Totally removing this dropout layer worsens accuracy. This suggests that the optimal dropout value should be tuned per-layer. We test a few variations of DRAU on the test-dev set. We can observe that VQA benefits from more training data; the same DRAU network performs better (62.24% vs. 59.58%) thanks to the additional data. Most of the literature resize the original ResNet features from 224 × 224 to 448 × 448. To test the effect of this scaling, we train a DRAU variant with the original ResNet size (DRAUsmall ). Reducing the image feature size from 2048 × 14 × 14 to 2048 × 7 × 7 adversely affects accuracy as shown in Table 4. Adding more glimpses significantly reduces the model’s accuracy (DRAUglimpses = 4 ). A cause of this performance drop could be related to the fact that LSTMs process the input in a onedimensional fashion and thus decide that each input is either relevant or non-relevant. This might explain why the attention maps of DRAU separate the objects from the background in two glimpses as we will mention in Section 5. 2D Grid LSTMs [31] might help remove this limitation. Removing the extra data from Visual Genome hurts the model’s accuracy. That supports the fact that VQA is very diverse and that extra data helps the model perform better. Finally, substituting Hadamard product of MCB in the final fusion operation boosts the network’s accuracy significantly by 1.17 points (DRAUMCB fusion ). As mentioned in Section 3.1, we experiment replacing the global ResNet features with object-level features as sug- VQA 2.0 Test-Dev Split Open Ended Task Y/N Num. Other Model DRAUHadamard fusion DRAUsmall DRAUglimpses = 4 DRAUno genome DRAUMCB fusion DRAUFRCNN features 78.27 77.53 76.82 79.63 78.97 82.85 40.31 38.78 39.15 39.55 40.06 44.78 53.57 49.93 51.07 51.81 55.47 57.4 4.4. DRAU versus the state-of-the-art All 62.24 60.03 60.32 61.88 63.41 66.45 Table 4. Evaluation of later DRAU-based models on the VQA 2.0 test-dev split. VQA 2.0 Test-dev Split Open Ended Task Y/N Num. Other Model All 3 MCB [7] MCB w/RVAU 78.41 77.31 38.81 40.12 53.23 54.64 61.96 62.33 MUTAN [14] MUTAN w/RVAU 79.06 79.33 38.95 39.48 53.46 53.28 62.36 62.45 Table 5. Results of state-of-the-art models with RVAU. gested by [22]. This change provides a significant performance increase of 3.04 points (DRAUFRCNN features ). 4.3. Transplanting RVAU in other models To verify the effectiveness of the recurrent attention units, we replace the attention layers in MCB and MUTAN [14] with RVAU. For MCB [7] we remove all the layers after the first MCB operation until the first 2048-d output and replace them with RVAU. Due to GPU memory constraints, we reduced the size of each hidden unit in RVAU’s LSTM from 2048 to 1024. In the same setting, RVAU significantly helps improve the original MCB model’s accuracy as shown in Table 5. The most noticeable performance boost can be seen in the number category, which supports our hypothesis that recurrent layers are more suited for sequential reasoning. Furthermore, we test RVAU in the MUTAN model [14]. The authors use a multimodal vector with dimension size of 510 for the joint representations. For coherence, we change the usual dimension size in RVAU to 510. At the time of this writing, the authors have not released results on VQA 2.0 using a single model rather than a model ensemble. Therefore, we train a single-model MUTAN using the authors’ implementation.2 The story does not change here, RVAU improves the model’s overall accuracy. 2 https://github.com/Cadene/vqa.pytorch 3 http://www.visualqa.org/roe_2017.html VQA 1.0 Table 6 shows a comparison between DRAU and other state-of-the-art models. Excluding model ensembles, DRAU performs favorably against other models. To the best of our knowledge, [5] has the best single model performance of 65.07% on the test-std split which is very close our best model (65.03%). Small modifications or hyperparameter tuning could push our model further. Finally, the FRCNN image features boosts the model’s performance close to the state-of-the-art ensemble model. VQA 2.0 Our model DRAUMCB fusion landed the 8th place in the VQA 2.0 Test-standard task.4 . Currently, all reported submissions that outperform our single model use model ensembles. Using FRCNN features boosted the model’s performance to outperform some of the ensemble models (66.85%). The first place submission [22] reports using an ensemble of 30 models. In their report, the best single model that uses FRCNN features achieves 65.67% on the test-standard split which is outperformed by our best single model DRAUFRCNN features . 5. DRAU versus MCB In this section, we provide qualitative results that highlight the effect of the recurrent layers compared to the MCB model. The strength of RAUs is notable in tasks that require sequentially processing the image or relational/multi-step reasoning. In the same setting, DRAU outperforms MCB in counting questions. This is validated in a subset of the validation split questions in the VQA 2.0 dataset as shown in Figure 4. Figure 5 shows some qualitative results between DRAU and MCB. For fair comparison we compare the first attention map of MCB with the second attention map of our model. We do so because the authors of MCB [7] visualize the first map in their work5 . Furthermore, the first glimpse of our model seems to be the complement of the second attention, i.e. the model separates the background and the target object(s) into separate attention maps. We have not tested the visual effect of more than two glimpses on our model. In Figure 5, it is clear that the recurrence helps the model attend to multiple targets as apparent in the difference of the attention maps between the two models. DRAU seems to also know how to count the right object(s). The top right example in Figure 5 illustrates that DRAU is not easily fooled by counting whatever object is present in the image but rather the object that is needed to answer the question. This 4 https://evalai.cloudcv.org/web/challenges/ challenge-page/1/leaderboard 5 https://github.com/akirafukui/vqa-mcb/blob/ master/server/server.py#L185 Model VQA 1.0 Open Ended Task Test-dev Y/N Num. Other All Y/N Test-standard Num. Other SAN [10] DMN+ [16] MRN [21] HieCoAtt [9] RAU [8] DAN [6] MCB [7] (e = 7) MLB [5] (1 model) MLB [5] (e = 7) MUTAN [14] (e = 5) 79.3 80.5 82.28 79.7 81.9 83.0 83.4 84.57 85.14 36.6 36.8 38.82 38.7 39.0 39.1 39.8 39.21 39.81 46.1 48.3 49.25 51.7 53.0 53.9 58.5 57.81 58.52 58.7 60.3 61.68 61.8 63.3 64.3 66.7 66.77 67.42 82.39 81.7 82.8 83.24 84.02 84.61 84.91 38.23 38.2 38.1 39.47 37.90 39.07 39.79 49.41 52.8 54.0 58.00 54.77 57.79 58.35 58.9 60.4 61.84 62.1 63.2 64.2 66.47 65.07 66.89 67.36 DRAUHadamard fusion DRAUMCB fusion DRAUFRCNN features 82.73 82.44 84.92 38.18 38.22 39.16 54.43 56.30 57.70 64.3 65.1 66.86 82.41 84.87 38.33 40.02 55.97 57.91 65.03 67.16 All Table 6. DRAU compared to the state-of-the-art on the VQA 1.0 dataset.e = n corresponds to a model ensemble of size n. Model VQA 2.0 Open Ended Task Test-dev Y/N Num. Other All Y/N Test-standard Num. Other UPC MIC TJ neural-vqa-attention[10] CRCV REU VQATeam MCB [26] DCD ZJU[32] VQAMachine [33] POSTECH UPMC-LIP6[14] LV NUS[34] DLAIT HDU-USYD-UNCC[35] Adelaide-Teney ACRV MSR[36] 67.1 69.02 70.1 73.91 78.41 79.84 79.4 78.98 81.96 81.95 82.94 84.39 85.24 31.54 34.52 35.39 36.82 38.81 38.72 40.95 40.9 41.62 48.31 47.08 45.76 48.19 25.46 35.76 47.32 54.85 53.23 53.08 53.24 55.35 57.07 59.99 59.94 59.14 59.88 43.3 49.32 55.35 60.65 61.96 62.47 62.62 63.45 65.57 67.71 67.95 68.02 69.00 66.97 69.22 69.77 74.08 78.82 79.85 79.82 79.32 82.07 81.92 83.17 84.5 85.54 31.38 34.16 35.65 36.43 38.28 38.64 40.91 40.67 41.06 48.38 46.66 45.39 47.45 25.81 35.97 47.18 54.84 53.36 52.95 53.35 55.3 57.12 59.63 60.15 59.01 59.82 43.48 49.56 55.28 60.81 62.27 62.54 62.97 63.66 65.71 67.64 68.22 68.09 69.13 DRAUHadamard fusion DRAUMCB fusion DRAUFRCNN features 78.27 78.97 82.85 40.31 40.06 44.78 53.58 55.48 57.4 62.24 63.41 66.45 78.86 79.27 83.35 39.91 40.15 44.37 53.76 55.55 57.63 62.66 63.71 66.85 All Table 7. DRAU compared to the current submissions on the VQA 2.0 dataset. property also translates to questions that require relational reasoning. The second column in Figure 5 demonstrates how DRAU can attend the location required to answer the question based on the textual and visual attention maps. 6. Conclusion We proposed an architecture for VQA with a novel attention unit, termed the Recurrent Attention Unit (RAU). The recurrent layers help guide the textual and visual atten- tion since the network can reason relations between several parts of the image and question. We provided quantitative and qualitative results indicating the usefulness of a recurrent attention mechanism. Our DRAU model showed improved performance in tasks requiring sequential/complex reasoning such as counting or relational reasoning over [7], the winners of the VQA 2016 challenge. In VQA 1.0, we achieved near state-of-the-art results for single model performance with our DRAU network (65.03 vs. 65.07 [5]). Adding the FRCNN features gets the model within margin Question Type (Occurrence) Accuracy(%) 47.28 46.31 43.98 42.06 DRAU MCB 44.30 42.57 Visual Question Answering and Visual Grounding,” in Empirical Methods in Natural Language Processing (EMNLP), 2016, pp. 457–468. [8] H. Noh and B. Han, “Training Recurrent Answering Units with Joint Loss Minimization for VQA,” arXiv:1606.03647, 2016. [9] J. Lu, J. Yang, D. Batra, and D. Parikh, “Hierarchical Question-Image Co-Attention for Visual Question Answering,” in Advances in Neural Information Processing Systems (NIPS), 2016, pp. 289–297. how many people are in (905) how many people are (2,005) how many (20,462) Figure 4. Results on questions that require counting in the VQA 2.0 validation set. of the state-of-the-art 5-model ensemble MUTAN [14]. Finally, we demonstrated that substituting the visual attention mechanism in other networks, MCB [7] and MUTAN [14], consistently improves their performance. In future work we will investigate implicit recurrent attention mechanism using recently proposed explanation methods [37, 38]. References [1] K. He, X. Zhang, S. Ren, and J. Sun, “Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification,” in IEEE International Conference on Computer Vision (ICCV), 2015, pp. 1026–1034. [2] S. Bosse, D. Maniry, K.-R. Müller, T. Wiegand, and W. Samek, “Deep neural networks for no-reference and fullreference image quality assessment,” IEEE Transactions on Image Processing, vol. 27, no. 1, pp. 206–219, 2018. [10] Z. Yang, X. He, J. Gao, L. Deng, and A. Smola, “Stacked Attention Networks for Image Question Answering,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 21–29. [11] K. Chen, J. Wang, L.-C. Chen, H. Gao, W. Xu, and R. Nevatia, “ABC-CNN: An Attention Based Convolutional Neural Network for Visual Question Answering,” arXiv:1511.05960, 2015. [12] H. Xu and K. Saenko, “Ask, Attend and Answer: Exploring Question-Guided Spatial Attention for Visual Question Answering,” in European Conference on Computer Vision (ECCV), 2016, pp. 451–466. [13] M. Charikar, K. Chen, and M. Farach-Colton, “Finding frequent items in data streams,” Theoretical Computer Science, vol. 312, no. 1, pp. 3–15, 2004. [14] H. Ben-younes, R. Cadene, M. Cord, and N. Thome, “MUTAN: Multimodal Tucker Fusion for Visual Question Answering,” arXiv:1705.06676, 2017. [15] L. R. Tucker, “Some mathematical notes on three-mode factor analysis,” Psychometrika, vol. 31, no. 3, pp. 279–311, 1966. [3] D. Bahdanau, K. Cho, and Y. Bengio, “Neural Machine Translation by Jointly Learning to Align and Translate,” in International Conference on Representation Learning (ICLR), 2015. [16] C. Xiong, S. Merity, and R. Socher, “Dynamic Memory Networks for Visual and Textual Question Answering,” in International Conference on Machine Learning (ICML), 2016, pp. 2397–2406. [4] R. Nallapati, B. Zhou, C. Gulcehre, B. Xiang et al., “Abstractive text summarization using sequence-to-sequence rnns and beyond,” arXiv:1602.06023, 2016. [17] P. R. Kumar and P. Varaiya, Stochastic systems: Estimation, identification, and adaptive control. SIAM, 2015. [5] J.-H. Kim, K.-W. On, J. Kim, J.-W. Ha, and B.-T. Zhang, “Hadamard Product for Low-rank Bilinear Pooling,” in International Conference on Representation Learning (ICLR), 2017. [6] H. Nam, J.-W. Ha, and J. Kim, “Dual Attention Networks for Multimodal Reasoning and Matching,” in IEEE International Conference on Computer Vision (CVPR), 2017, pp. 299–307. [7] A. Fukui, D. H. Park, D. Yang, A. Rohrbach, T. Darrell, and M. Rohrbach, “Multimodal Compact Bilinear Pooling for [18] V. Kazemi and A. Elqursh, “Show, Ask, Attend, and Answer: A Strong Baseline For Visual Question Answering,” arXiv:1704.03162, 2017. [19] Q. Wu, P. Wang, C. Shen, A. Dick, and A. van den Hengel, “Ask Me Anything: Free-form Visual Question Answering Based on Knowledge from External Sources,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 4622–4630. [20] A. Ray, G. Christie, M. Bansal, D. Batra, and D. Parikh, “Question Relevance in VQA: Identifying Non-Visual And False-Premise Questions,” in Empirical Methods in Natural Language Processing (EMNLP), 2016, pp. 919–924. How many How many camels are in lanterns hang the photo? DRAU: 0 off the clock tower ? DRAU: 4 How many lanterns hang off the clock tower? GT: 4 MCB: 1 How many camels are in the photo? GT: 0 What is on the floor leaning on the bench in How many people are between the shown ? DRAU: 3 How many people are shown? GT: 3 MCB: 2 people ? DRAU: racket What is on the floor leaning on the bench in between the people? GT: racket does the vase animals are depict ? DRAU: owl there ? DRAU: 2 MCB: one MCB: backpack What animal How many How many animals are there? GT: 2 MCB: 1 What animal does the vase depict? GT: owl MCB: elephant Figure 5. DRAU vs. MCB Qualitative examples. Attention maps for both models shown, only DRAU has textual attention. [21] J.-H. Kim, S.-W. Lee, D. Kwak, M.-O. Heo, J. Kim, J.-W. Ha, and B.-T. Zhang, “Multimodal Residual Learning for Visual QA,” in Advances in Neural Information Processing Systems 29, 2016, pp. 361–369. [22] P. Anderson, X. He, C. Buehler, D. Teney, M. Johnson, S. Gould, and L. Zhang, “Bottom-Up and Top-Down At- tention for Image Captioning and VQA,” arXiv:1707.07998, 2017. [23] S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks,” arXiv:1506.01497, Jun. 2015. [24] J. Pennington, R. Socher, and C. D. Manning, “GloVe: Global Vectors for Word Representation,” in Empirical Methods in Natural Language Processing (EMNLP), 2014, pp. 1532–1543. [25] Y. Gao, O. Beijbom, N. Zhang, and T. Darrell, “Compact bilinear pooling,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 317–326. [26] Y. Goyal, T. Khot, D. Summers-Stay, D. Batra, and D. Parikh, “Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answering,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017, pp. 6904–6913. [27] S. Antol, A. Agrawal, J. Lu, M. Mitchell, C. L. Zitnick, D. Batra, and D. Parikh, “VQA: Visual Question Answering,” in IEEE International Conference on Computer Vision (CVPR), 2015, pp. 2425–2433. [28] 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 – ECCV 2014, 2014, pp. 740–755. [29] D. P. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” arXiv:1412.6980, 2014. [30] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks,” in AISTATS, 2010, pp. 249–256. [31] N. Kalchbrenner, I. Danihelka, and A. Graves, “Grid long short-term memory,” arXiv:1507.01526, 2015. [32] Y. Lin, Z. Pang, D. Wang, and Y. Zhuang, “Task-driven Visual Saliency and Attention-based Visual Question Answering,” arXiv:1702.06700, 2017. [33] P. Wang, Q. Wu, C. Shen, and A. van den Hengel, “The VQA-Machine: Learning How to Use Existing Vision Algorithms to Answer New Questions,” arXiv:1612.05386, 2016. [34] I. Ilievski and J. Feng, “A Simple Loss Function for Improving the Convergence and Accuracy of Visual Question Answering Models,” arXiv:1708.00584, 2017. [35] Z. Yu, J. Yu, C. Xiang, J. Fan, and D. Tao, “Beyond Bilinear: Generalized Multi-modal Factorized High-order Pooling for Visual Question Answering,” arXiv:1708.03619, 2017. [36] D. Teney, P. Anderson, X. He, and A. van den Hengel, “Tips and Tricks for Visual Question Answering: Learnings from the 2017 Challenge,” arXiv:1708.02711, 2017. [37] G. Montavon, W. Samek, and K.-R. Müller, “Methods for interpreting and understanding deep neural networks,” Digital Signal Processing, vol. 73, pp. 1–15, 2018. [38] L. Arras, G. Montavon, K.-R. Müller, and W. Samek, “Explaining recurrent neural network predictions in sentiment analysis,” in EMNLP’17 Workshop on Computational Approaches to Subjectivity, Sentiment & Social Media Analysis (WASSA), 2017, pp. 159–168.
1cs.CV
Evorus: A Crowd-powered Conversational Assistant Built to Automate Itself Over Time Ting-Hao (Kenneth) Huang, Joseph Chee Chang, and Jeffrey P. Bigham Language Technologies Institute and Human-Computer Interaction Institute Carnegie Mellon University {tinghaoh, josephcc, jbigham}@cs.cmu.edu arXiv:1801.02668v2 [cs.HC] 10 Jan 2018 ABSTRACT Crowd-powered conversational assistants have been shown to be more robust than automated systems, but do so at the cost of higher response latency and monetary costs. A promising direction is to combine the two approaches for high quality, low latency, and low cost solutions. In this paper, we introduce Evorus, a crowd-powered conversational assistant built to automate itself over time by (i) allowing new chatbots to be easily integrated to automate more scenarios, (ii) reusing prior crowd answers, and (iii) learning to automatically approve response candidates. Our 5-month-long deployment with 80 participants and 281 conversations shows that Evorus can automate itself without compromising conversation quality. Crowd-AI architectures have long been proposed as a way to reduce cost and latency for crowd-powered systems; Evorus demonstrates how automation can be introduced successfully in a deployed system. Its architecture allows future researchers to make further innovation on the underlying automated components in the context of a deployed open domain dialog system. ACM Classification Keywords H.5.m. Information Interfaces and Presentation (e.g. HCI): Miscellaneous Author Keywords crowd-powered system; crowdsourcing; real-time crowdsourcing; conversational assistant; chatbot INTRODUCTION Conversational assistants, such as Apple’s Siri, Amazon’s Echo, and Microsoft’s Cortana, are becoming increasingly popular, but are currently limited to specific speech commands that have been coded for pre-determined domains. As a result, substantial effort has been placed on teaching people how to talk to these assistants, e.g., via books to teach Siri’s language [36], and frequent emails from Amazon advertising Alexa’s new skills [1]. To address the problem of users not knowing what scenarios are supported, AI2 recently built an Alexa skill designed to help people find skills they could use, only to have it rejected by Amazon [8]. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. CHI 2018, April 21–26, 2018, Montreal, QC, Canada © 2018 Copyright is held by the owner/author(s). Publication rights licensed to ACM. ACM 978-1-4503-5620-6/18/04...$15.00 https://doi.org/10.1145/3173574.3173869 Figure 1. Evorus is a crowd-powered conversational assistant that automates itself over time by (i) learning to include responses from chatterbots and task-oriented dialog systems over time, (ii) reusing past responses, and (iii) gradually reducing the crowd’s role in choosing highquality responses by partially automating voting. Crowd-powered assistants are more robust to diverse domains, and are able to engage users in rich, multi-turn conversation. Some systems use professional employees, such as Facebook M [15], while others use crowd workers, such as Chorus [25]. Despite their advantages, crowd-powered agents remain largely impractical for deployment at large scale because of their monetary cost and response latency [3, 19]. On the other hand, crowd-powered systems are often touted as a path to fully automated systems, but transitioning from the crowd to automation has been limited in practice. The most straightforward approach is to use data from prior conversations to train an automated replacement. This can work in specific domains [46], or on so-called “chit-chat” systems [2]. Fully automating a general conversational assistant this way can be difficult because of the wide range of domains to cover and the large amount of data needed within each to train automated replacements. Such automated systems only become useful once they can completely take over from the crowd-powered system. Such abrupt transition points mean substantial upfront costs must be paid for collecting training examples before any automation can be tested in an online system. In this paper, we explore an alternative approach of a crowdpowered system architecture that supports gradual automation over time. In our approach, the crowd works with automated components as they continue to improve, and the architecture provides narrowly scoped points where automation can be introduced successfully. For instance, instead of waiting until an automated dialog system is able to respond completely on its own, one component that we developed recommends responders from a large set of possible responders that might be relevant based on the on-going conversation. Those responses are then among the options available to the crowd to choose. Another component learns to help select high-quality responses. Each problem is tightly scoped, and thus potentially easier for machine learning algorithms to automate. This paper introduces Evorus, a crowd-powered conversational agent that provides a well-scoped path from crowd-powered robustness to automated speed and frugality. Users can converse with Evorus in open domains, and the responses are chosen from suggestions offered by crowd workers and any number of automated systems that have been added to Evorus. Evorus supports increased automation over time in three ways (Figure 1): (i) allowing third-party developers to easily integrate automated chatterbots or task-oriented dialog systems to propose response candidates, (ii) reusing crowd-generated responses from previous conversations as response candidates, and (iii) learning to automatically select high-quality response candidates to reduce crowd oversight over time. In Evorus, existing dialog systems can be incorporated via simple REST (REpresentational State Transfer) interfaces that take in the current conversation context, and respond with a response candidate. Over time, Evorus learns to select a subset of the automated components that are most likely to generate high-quality responses for different context. The responses are then forwarded to crowd workers as candidates. Workers then choose which of the responses to present to the users. Evorus sees workers selecting responses from candidates as signals that enable it to learn to select both automated components and response candidates in the future. It is important to note that while Evorus is a functioning and deployed system, we do not see the current version and its constituent components to be final. Rather, its architecture is designed to allow future researchers to improve on its performance and the extent to which it is automated, by working on constituent problems, which are each challenging in their own right. The structure of Evorus provides distinct learning points that can be bettered by other researchers. Others may include additional dialog systems or chatterbots, and improve upon its learning components, driven by the collected data and its modular architecture. We deployed the current version of Evorus over time to better understand how well it works. During our deployment, automated response were chose 12.44% of time, Evorus reduced the crowd voting by 13.81%, and the cost of each non-user message reduced by 32.76%. In this paper, we explore when the system was best able to automate itself, and present clear opportunities for future research to improve on these areas. This paper makes four primary contributions: • Evorus Architecture: a crowd-powered conversational assistant that is designed to gradually automate itself over time by including more responses from existent chatbots and reduce the oversight needed from the crowd; • Learning to Choose Chatbots Over Time: we introduced a learning framework that uses crowd votes and prior accepted message to estimate the likelihood of each chatbots when receiving a user message; • Automatic Voting: we implemented a machine learning model for automatically reducing the amount of crowd oversight needed, evaluated its performance on a dataset of real conversations, and developed a mathematical framework to estimate the expected reward of using the model; and • Deployment: we deployed Evorus for over 5 months with 80 participants and 281 conversations to understand how the automatic components we developed could gradually take over from the crowd in a real setting. RELATED WORK Our work draws from research on conversational agents, general purpose dialog systems and crowd-machine systems. General Purpose Dialog System: A number of general purpose dialog systems such as IRIS [2] have been proposed. Wen et al. [43] designed a neural network language generation model for multi-domain dialog systems. A deeplearning-based domain adaptation model was also proposed recently [11]. Project DialPort [50] introduced a multi-agent framework that has the capability to include multiple taskoriented dialog systems to hold a multiple domain conversation. On the other hand, in the field of natural language processing, general response generation technologies were also developed. Ritter et al. [35] generated responses based on phrase-based statistical machine translation based on Twitter data. Li et al. [26] introduced a response generator based on speaker model that encodes personas with background information and speaking style. Recently, researchers started exploring end-to-end joint learning of language understanding in dialogue systems [6, 48, 27]. However, after decades of developments, sophisticated artificial “conversational intelligence” are largely absent in modern digital products. Crowd-powered Conversational Agents: Building fullyautomated, open-domain conversational assistants is a widely researched topic in the field of artificial intelligence (AI), but has thus far remained an open challenge. In response to this, the Chorus [25] conversational agent is powered by a crowd of human actors, which enables it to work robustly across domains [24]. To help users manage information and services through crowd-powered conversational agents, Guardian takes as input a Web API and a desired task from the user and the crowd determines the parameters necessary to complete the task [20, 18]; IntructableCrowd helps users automate the management of sensors and tasks in their mobile phones through a conversational agent [16]; and WearMail enables users to access their emails by talking to the crowd-powered assistant via smartwatch [39]. Conversational assistants powered by trained human operators, such as Facebook M [15] and Magic Assistant [29], have emerged in the recent years. While most crowd-powered conversational systems function well in laboratory settings, Chorus was deployed in the real world [19] and revealed a range of problems such as determining when to terminate a conversation or protecting workers from abusive content introduced by end users. Microsoft Tey [45] introduced an AI-powered agent which encountered problems when deployed publicly, because some users realized that they could influence what Tey would say because it mimicked them. Unlike Tey, Evorus does not learn only by mimicking users, and paid crowd workers are kept in the loop to verify responses in order to maintain quality. Our deployment did not reveal such problems and we believe the structure of Evorus makes such problems less likely. Crowd-Machine Hybrid Systems: Crowd and machine hybrid systems have enabled us to solve a wide range of tasks that were difficult for machines or humans to solve alone, making impacts in areas including crowdsourcing, machine learning, databases and computer vision [10, 21, 37, 34, 22]. For instance, Flock and Alloy [7, 5] use crowds to suggest predictive features, label data, and weigh these features with machine learning techniques to produce coherent categories and accurate models. The Knowledge Accelerator [12] uses crowds to synthesize such crowd-machine structures into coherent articles. Zensors creates custom computer vision sensors bootstrapped by the crowd [23]. Similarly, CrowdDB [10] uses human input for providing information that is missing from the database, for performing computationally difficult functions, and for matching, ranking, or aggregating results based on fuzzy criteria. JellyBean [37] introduces a suite of crowd-vision hybrid counting algorithms that can perform in independent or hybrid modes returning more accurate counts that either workers or computer vision could do alone. EVORUS’ CONVERSATIONAL ASSISTANT FRAMEWORK Evorus obtains multiple responses from multiple sources, including crowd workers and chatbots, and uses a voting mechanism to decide which responses to send to the end-user. Worker Interface Evorus’ worker interface contains two major parts (Figure 2): the chat box in the middle and the fact board on the side. Chat box’s layout is similar to an online chat room. Crowd workers can see the messages sent by the user and the responses candidates proposed by workers and bots. The role label on each message indicates it was sent by the user (blue label,) a worker (red label,) or a bot (green label.) Workers can click on the check mark (4) to upvote on the good responses, click on the cross mark (6) to downvote on the bad responses, or type text to propose their own responses. Beside the chat box, workers can use the fact board to keep track of important information of the current conversation. To provide context, chat logs and the recorded facts from previous conversations with the same user were also shown to workers. The score board on the upper right corner displays the current reward points the worker have earned in this conversation. If the conversation is over, the worker can click the long button on the top of the interface to leave and submit this task. Selecting Responses using Upvotes and Downvotes Crowd workers and bots can upvote or downvote on a response candidate. As shown in Figure 2, on the interface, the upvoted responses turned to light green, and the downvoted responses turned to gray. Crowd workers automatically upvote their own candidates whenever they propose new responses. Upon calculating the voting results, we assigned a negative weight to a downvote while an upvote have a positive weights. We empirically set the upvote weight at 1 and downvote’s weight at 0.5, which encourages the system to send more responses to the user. We inherited the already-working voting threshold from deployed Chorus [19], which accepts a response candidate when it accumulates a vote weight that is larger or equal to 0.4 times number of active workers in this conversation. Namely, Evorus accepts a response candidate and sends it to the user when Equation (1) holds: #upvote ×Wupvote − #donwvote ×Wdownvote > #active_workers × threshold Wupvote = 1.0, Wdownvote = 0.5, threshold = 0.4 (1) We formally defined the #active_workers in the later subsection of real-time recruiting. Evorus does not reject a message, so it does not have a threshold for negative vote weight. Expiring Unselected Messages to Refresh Context When Evorus accepts a response, the system turns the accepted message to a white background, and also expires all other response candidates that have not been accepted by removing them from the chat box in the worker interface. This feature ensures all response candidates displayed on the interface were proposed based on the latest context. We also created a “proposed chat history” box on the left side of worker interface, which automatically records the worker’s latest five responses. Workers can copy his/her previously-proposed response and send it again if the message expired too fast. A Proposed, Accepted, or Expired Message In Evorus, non-user messages are in one of three states: [Proposed], [Accepted], or [Expired]. [Proposed] messages are open to be up/downvoted. These messages were proposed by either a worker or a bot, has not yet received sufficient votes to be accepted, and has not yet expired; [Accepted] messages received sufficient votes before they expired and were sent to the user; and [Expired] messages did not receive sufficient votes before they expired. These messages were not sent to the users, and were removed from the worker interface. A [Rejected] state does not exist since Evorus does not reject a message proactively. Worker’s Reward Point System To incentivize workers, Evorus grants reward points to workers for their individual actions such as upvoting on a message or proposing a response candidate, and also for their collective decisions such as agreeing on accepting a message or proposing a message that were accepted. The score box on the right top corner of the interface shows the current reward points to the worker in real-time. Reward points are later converted to bonus pay for workers. Without compromising output quality, if some of these crowd actions can be successfully replaced by automated algorithms, the cost of each conversation can be reduced. Evorus’ reward point schema was extended from the Chorus reward schema, which was previously used during Figure 2. The Evorus worker interface allows workers to propose responses and up/down vote candidate responses. The up/down votes give Evorus labels to use to train its machine-learning system to automatically gauge the quality of responses. Evorus automatically expires response candidates upon acceptance of another in order to prevent workers from voting through candidate responses that are good but no longer relevant. Workers can tell each message is sent by the end-user (blue label), a worker (red label), or a chatbot (green label) by the colored labels. its year-long deployment [19]. This schema encodes the importance of each action, and thus provides a good guide for algorithms to estimate the benefit and risk when automating a crowd action. Moreover, this reward schema will be used to estimate the expected reward points (and corresponding costs) an automatic voting bot can save, which we describe later. votes. To coordinate with human workers’ speed, Evorus often needs to set constraints on the frequency or capability (e.g., in which condition can a chatbot propose responses) of bots. More importantly, Evorus can learn from the crowd feedback to automate itself over time via three primary mechanisms: (i) the chatbot selector, (ii) the retrieval-based chatbot that can reuse old responses, and (iii) the automatic voting bot. Real-time Recruiting & Connecting to Google Hangouts When a conversation starts, Evorus uses the Ignition model [17] to recruit workers quickly and economically from Amazon Mechanical Turk, and uses the Hangoutsbot [14] library to connect with the Google Hangout servers so that users can use its clients to talk with Evorus on computers or mobile devices. Each conversation starts with 1 worker and incorporates 5 workers at most. Workers may reach a conversation at different times, but typically stay to the end of the conversation (average duration ' 10 minutes). The #active_workers in Equation 1 is defined as “the number of crowd workers who were working on this conversation when the message was proposed,” which varies as workers arrive (or drop out) at different times. In our deployment, the average #active_workers of all crowd messages is 3.56 (SD=1.29,) and 77.56% of the crowd messages had #active_workers >= 3. EVORUS’ AUTOMATION AND LEARNING FRAMEWORK Evorus is a conversational assistant that is collaboratively run by real-time crowdsourcing and artificial intelligence. The core concept of Evorus is to have crowd workers work with automated virtual agents (referred to as “bots”) on the fly to hold sophisticated conversations with users. To test this, we developed two types of bots: the automatic response generators, i.e., chatbots, and the automatic voting algorithms, i.e., vote bots. Evorus monitored all ongoing conversations, and periodically called chatbots and vote bots to participate in active conversations. Both chatbots and vote bots take the entire chat log as input, and based on the chat log to generate responses or Part I: Learning to Choose Chatbots Over Time In Evorus, existing dialog systems or chatbots can be incorporated by defining a simple REST interface on top of them that accepts information about the current conversation state, and responses with a suggested response. When a sufficient amount of chatbots are included in the bot pool, selecting the most appropriate chatbots to answer different questions becomes critical. For instance, a simple “ping-pong” chatbot that always responds with what it was told can be selected to reply echo questions such as “Hi” or “How are you?”; a restaurant recommendation bot can be selected when the user is looking for food; and a chatbot that was built on a friend’s chat log can be selected when the user feels lonely [31]. In this paper, we introduce a learning framework that uses crowd votes and prior accepted messages to estimate the likelihood of each chatbot when receiving a user message. The learning framework naturally assigns a slightly higher likelihood to newly-added chatbots to collect more data. The beauty of this design is that any chatbot can contribute, as long as it can effectively respond to – even a small – set of user messages. Part II: Reusing Prior Answers Upon receiving a message from the user, Evorus uses a retrieval-based approach to find the most similar message in prior conversations and populates its prior response for the crowd to choose from. By doing so, Evorus is capable to reuse the answer of prior similar questions to respond to users. The advantage of using a retrieval-based method is that it naturally increases its capability of answering questions with the growth of the collected conversations, without the need of recreation or retraining of machine-learning models. With the oversight of the crowd, the retrieval-based approaches also do not need to be perfect to contribute. As long as it find good responses to a portion of user conversations, the learning framework described in Part I can gradually learn when to use it. Part III: Automatic Voting Closing the loop of automating the entire system, the last piece is to automate the oversight of the crowd that are necessary for quality control, i.e., the voting process in Evorus. We formulated response voting as a classification task and tackled it with a supervised machine-learning approach. A set of features based on literature, including the word, the speaker, and the time of the proposed messages are used to develop a machine-learning model, and the prior collected crowd votes are used as gold-standard labels. While the overall classifier performance is efficient in the dataset, a misfired vote (a falsepositive) that mistakenly accepts a low-quality response will not only disturb the conversation, but also waste extra bonus money to crowd workers who proposed and voted for it. In this paper we propose a mathematical framework to estimate expected benefits of using an automatic voting classifier. In Evorus, both workers and the vote bot can upvote suggested responses. When a new suggestion is offered, the vote bot is called. It first calculates its confidence score, and, if the confidence is greater than a threshold, which is estimated by our proposed mathematical framework, the vote bot automatically upvotes the message. Evorus monitors the latest down/upvotes and calculates voting results in real-time. When a crowd message collects sufficient vote weight, Evorus (i) accepts it and sends it to the user, and (ii) removes all other candidate messages from the worker interface to refresh context. In the following three sections, we describe in detail the three main parts of the Evorus framework. PART I: LEARNING TO CHOOSE CHATBOTS OVER TIME Evorus’ chatbot selector learns over time from the crowd’s feedback to choose the right chatbots to respond to user messages. Evorus also regularly populates lower-ranking chatbots to allow the model to learn about new chatbots and tp keep the model up-to-date. Ranking and Sampling Chatbots Upon receiving a message from a user, Evorus uses both the text and prior collected data to estimate how likely each chatbot is capable of responding the user (i.e., P(bot|message)). We used a conditional probability, as shown in Equation 2, to characterize the likelihood of selecting a chatbot (bot) after receiving a user message. P(bot|message) = P(bot) × P(message|bot) ≈ P(bot) × similarity(message, historybot ) (2) P(bot) is the prior probability of the chatbot, and P(message|bot) is the likelihood of the user message given the chatbot’s history (i.e., previous user messages that the bot has successfully responded). While training an n-gram language model using previous messages to estimate P(message|bot) is intuitive [13], sufficient data for building such model is often unavailable for newly-added bots. To generalize, we used a similarity measure based on distance between word vectors (similarity(message, historybot )) to approximate this likelihood. We will explain how we calculate these two components in the following subsection. Equipped with the estimates, Evorus ranks all the chatbots based on the likelihood values, and always calls the firstranking chatbot to provide its response. More interestingly, in addition to the top chatbot, Evorus also randomly selects a lower-ranking chatbot to provide responses. By doing so, Evorus is capable to gradually update its estimates of each bot based on the crowd feedback and learn over time the best scenario to call each chatbot. Similar strategies, such as the epsilon-greedy strategy that yields a small portion of probability for random outcomes and collects feedback, have been used in models that learn to select crowd workers [40] and dialogue actions [38]. For the new chatbot, Evorus initially assigns a starting probability to it to allow the system to collect data about it, which we describe in the following subsection. Estimating Likelihood of a Chatbot We aimed at designing a learning framework that is (i) inexpensive to update, since we want the model to be updated every single time when the system receives a new label, and (ii) allows new bots to be added easily. Prior Probability of Chatbots: To generate more reliable prior estimation for newly-added bots with limited histories, we used a beta distribution with two shape parameters α and β (Equation 3) to model the prior probability of each chatbot. P(bot) ≈ (#accepted messages from bot) + α (#user messages since bot online) + α + β (3) P(bot) can be interpreted as the overall acceptance rate of the chatbot without conversation contexts. The two shaping parameters α and β can be viewed as the number of accepted (positive) and not-accepted (negative) messages that will be assigned to each new chatbot to begin with, respectively. Namely, any new chatbot’s prior probability P(bot) will be initially assigned as α/(α + β ), and then later be updated over time. The beta distribution’s α and β are both functions of the mean (µ) and variance (σ 2 ) of the distribution. In our pilot study, in which each automatic response requires only one vote to be accepted, four chatterbots had an average message acceptance rate of 0.407 (SD=0.028.) Since we increased the required vote count from 1 to 2 in the final deployment, a lower acceptance rate is expected. We used µ = 0.3 and σ = 0.05 to estimate the shape parameters, where α = 24.9 and β = 58.1. Similarity between Messages and Chatbots: To estimate similarity(message, bot), we first used the pre-trained 200dimension GloVe word vector representation trained on Wikipedia and Gigaword [32] to calculate the average word vector of each message. We then used previous user messages that were successfully responded by the chatbot as the bot vector ~wbot that represents the chatbot in the word-vector space. We also calculated the centroid vector of all user messages, ~woverall , to represent general user messages. Finally, as shown in Equation 4, the similarity between a message and a chatbot is defined as the distance ratio between the vectors. similarity(message, historybot ) (4) dist(~wmessage ,~woverall ) B dist(~wmessage ,~wbot ) + dist(~wmessage ,~woverall ) While ~wbot can be calculated as the centroid vector of prior user messages that were successfully responded to by the chatbot, in cold-start scenarios, a chatbot will not have sufficient accepted messages to calculate the vector. We provide two solutions for chatbot developers: First, the developer can provide a small set of example messages where their chatbots should be called. For instance, the developer of an Yelp chatbot can list “Find me a sushi restaurant in Seattle!” as an example. Evorus will treat these example messages as the user messages that the chatbot successfully responded to, and use their centroid vector as the initial ~wbot . When more messages are accepted, they will be added into this set and update the vector. Second, for some chatbots, especially non-task chatterbots, it could be difficult to provide a set of examples. Therefore, if the developer decided not to provide any example messages, we set the initial dist(~wmessage ,~wbot ) = 0 for new chatbots. PART II: REUSING PRIOR RESPONSES Evorus uses an information-retrieval-based (IR-based) method to find answers to similar queries in prior conversations to suggest as responses to new queries. To do so, Evorus first extracts query-response pairs from all the old conversations, and then performs a similarity-based sorting over these pairs. Extracting Query-Response Pairs: One advantage Evorus has is that each accepted response has crowd votes, which can be used as a direct indicator of the response’s quality. For each turn of a conversation between one user and Evorus, we extracted the accepted crowd response which did not receive any downvotes, along with the user message (query) it responded to, as a (query, response) pair. Since the deployed Evorus has not had any prior conversation with users yet, we obtained conversation data that were collected by the deployed Chorus, which also used crowd voting to select responses, during May, 2016 to March, 2017 to start with. We further removed the messages from known malicious workers and users, also removed all conversations where the users are co-authors or collaborators of Chorus [19]. At the beginning of the Evorus deployment, 3,814 user messages were included, and each of these user message is paired with 1 to 5 crowd responses. Searching for the Most Similar Query: For the query message in each query-response pair, we calculated its average word vector by using the pre-trained 200-dimension GloVe word vector representation based on Wikipedia and Gigaword [32] and stores the vector in the database. When Evorus receives a user message, the system first calculates its average word vector ~wmessage using the same GloVe representation, and then searches in the database to look for the top k responses that their corresponding queries’ word vectors had the shortest Euclidean distances with ~wmessage . Finally, for increasing answer’s diversity, the system randomly selects one from top k responses to send back to Evorus for the crowd to choose from. We empirically set k = 2 in our deployment. PART III: AUTOMATIC VOTING Evorus uses supervised learning to vote on responses. Data Preparation: The voting mechanism has been proven to be useful in selecting good responses and holding conversations in the lab prototype [25] and deployed system [19]. The final status (i.e., accepted or not) of a messages is a strong signal to indicate its quality. However, when we used this data to develop an AI-powered automated voting algorithm, it is noteworthy that expired messages were not all of lower quality. In some cases the proposed response was good and fitted in the old context well, but the context changed shortly after the message was sent; Some messages were automatically accepted and bypassed the voting process because Evorus does not have enough active workers, i.e., when 0.4 × #active_workers < 1 in Equation 1); Furthermore, since downvotes can cancel out upvotes, the voting results in Evorus could be influenced by race conditions among workers. For instance, when two upvotes of a message has been sent to the server, Evorus might decide that this message’ vote weight is sufficient and sent it to the user, in which a belated downvote would deduct its vote weight to lower than the threshold. Therefore, the training data needs to be carefully developed. Similar to Part II, we used voting data collected during the Chorus deployment [19] to train the initial machine learning model for voting. We first extracted the expired messages with one or more downvote(s) as examples of “downvote”, and extracted the accepted crowd messages with both one or more upvote(s) and zero downvote as examples of “upvote.” We excluded the automatically-accepted messages that were sent when the task did not have sufficient number of active workers (0.4 × #active_workers < 1) From all the messages collected by the deployed Chorus during September 2016 to March 2017, 1,682 “upvote” messages 674 “downvote” messages were extracted to from the dataset. Model & Performance: We then used this dataset to train a LibLinear [9] classifier. For each message, Evorus extracted features in message, turn, and conversation levels to capture the dialogic characteristics [33], and also used GloVe word vector, which is identical as that of our retrieval-based response generation, to represent the content. Our approach reached to a precision of 0.740 and a recall of 0.982 (F1-score = 0.844) on the “upvote” class in a 10-fold cross-validation experiment. The feature analysis using the Weka toolkit [47] showed that the top 3 features were about the historical performance of the worker who proposed the message, and also 13 out of 20 top features were of a particular dimension of one of the word vectors. On the other hand, the performance of the “downvote” class is less effective. Its precision is 0.714 but recall is only 0.134. This could be caused by the insufficient amount of training data, since Chorus promoted upvote more than downvote by design. According to this result, in the deployed Evorus, the system only automatically upvoted when the classifier ouput “upvote,” but did not downvote otherwise. Optimizing Automatic Voting Automatic voting directly participates in the process of deciding which messages to send. While our machine-learning model resulted in good performance on our dataset, we would upvoted message is sent ([Misfire]). Therefore, E[Bad] is decided by (i) how often one mistaken upvote triggers a misfire, and (ii) how expensive is one misfire, as follows: E[Bad] = P(Misfire|Bad) × E[RMisfire ] P(Misfire|Bad) is the conditional probability of a message being sent to the user given the classifier has mistakenly upvoted on it. E[RMisfire ] is the expected reward points that were granted to workers in a single [Misfire] event. Figure 3. (A) The precision-recall curve of the LibLinear classifier for automatic upvoting. (B) Using our model (Equation (5)) to estimate the precision and recall at different thresholds and their corresponding expected reward amount saved. like to use Evorus’ worker reward point schema to find the right confidence threshold for the automatic voting classifier. If the threshold is set too low, the classifier would vote frequently even when it is not confident about the prediction, and thus many low-quality responses would be accepted and disturb the conversation; if the threshold is set too high, the classifier would rarely vote, and the system will not gain much from using it. Liblinear can output the probability estimates of each class when performing prediction, which we used as the notion of confidence of the classifier. Thresholding out the predictions with lower confidences increased the precision but reduced the recall of the classifier. Figure 3(A) shows the Precision-Recall curve of Evorus’ upvoting classifier. Possible Outcomes When the Classifier Upvotes: To find confidence thresholds for Evorus, we introduced the following heuristics to estimate reward points saved per message by using the upvoting classifier. Consider the following cases: 1. [Good Vote] The classifier upvoted on a message that would originally be selected by the crowd. It saves 1 upvote reward (Rupvote × 1) and 1 agreement reward (Ragreement × 1) that would originally be granted to one human worker. 2. [Bad Vote] The classifier upvoted on a message that would originally not be selected by the crowd. In this case, one of the two following consequences will occur: (i) [Misfire] The message is sent to the user. The system grants agreement rewards to all human workers who upvoted on this message (Ragreement × #upvoted_workers) and 1 successful proposal reward to the worker who proposed the message (R proposal × 1); and (ii): [No Difference] The message remains not sent. Even with one extra upvote, this message’s vote count was still insufficient to get accepted. Our training dataset only used the not-accepted messages with at least one downvote to form the “Downvote” class, which were less likely to be misfired after adding one extra automatic vote. For better estimating P(Misfire|Bad), we first ran the classifier on all messages that were not included in our training set, and within all the messages that the classifier decided to upvote, we then calculated the proportion of messages that would be sent to the user if one extra upvote were added. The rate was 0.692, which we used to approximate P(Misfire|Bad). Furthermore, based on Evorus’ mechanism, E[RMisfire ] can be calculated as follows : E[RMisfire ] = Ragreement × E[#upvoted_workers] + R proposal E[#upvoted_workers] is the expected number of human workers who upvoted on the message in an [Misfire] event. Similarly, we ran the classifier on the unlabelled data, and calculated the average number of workers who upvoted on the messages that the classifier decided to upvote on. The number is 0.569 (SD = 0.731), which we used to approximate E[#upvoted_workers]. Finally, E[Hit] = 100 + 500 = 600, and E[RBad ] = 0.692 × (500 × 0.569 + 1000) = 888.874. Using Equation (5), we can estimate the precision and recall at different thresholds and their corresponding reward amount (Figure 3(B)). According to the estimation, the best confidence threshold is at 0.65. In the deployed Evorus we selected a slightly higher precision and set the threshold at 0.7 (P = 0.823 and R = 0.745.) DEPLOYMENT STUDY AND RESULTS T PR is the true positive rate and FPR is the false positive rate of the classifier. E[Good] is the expected reward points saved per [Good Vote] event, and E[Bad] is the expected reward points wasted per [Bad Vote] event. Evorus was launched to the public as a Google Hangouts chatbot in March 2017. While the end-users were not aware of the changes of the system from the client side, behind the scenes, our deployment had 3 phases: (i) Phase 1, (ii) Control Phase, and (iii) Phase 2. Phase-1 deployment started in March, 2017. We launched the system with only four chatterbots and one vote bot, without the learning component described in Part I, to understand the basics of having virtual bots working with human workers on the fly. For comparison, in May 2017 we then temporarily turned off all automation components and had the system solely run by the crowd till late August 2017, which we referred to as the Control Phase. Finally, for testing the capability of learning to select chatbots, we started Phase 2 deployment in early September. The Phase-2 deployment included several significant changes: (i) increasing the frequency of calling chatbots for responses, (ii) increasing the vote count needed to accept a response from 1 to 2, and (iii) incorporating the Part I learning. In Evorus, E[Good] is a constant (Rupvote + Ragreement ). Meanwhile, [Bad Vote] event costs reward points only when the To recruit users, we periodically sent emails to mailing lists at several universities and posted on social media sites, such Estimating System’s Expected Gain: Given these setups, the expected reward points E[Rsave ] saved per message by using the classifier can be estimated as follows: E[Rsave ] = T PR × E[Good] − FPR × E[Bad] (5) as Facebook and Twitter. Participants who volunteered to use our system were asked to sign a consent form first, and no compensation was offered. After the participants submitted the consent form, a confirmation email was automatically sent to them to instruct them how to send messages to Evorus via Google Hangouts. The users can use Evorus as many times as they want to, for anything, via any devices that are available to them. Eighty users total talked with Evorus during 281 conversations. The Phase-1 deployment had 34 users talked to Evorus during 113 conversations, and Phase-2 deployment (till 17th September, 2017) had 26 users with 39 conversations. The Control Phase had 42 users with 129 conversations. Phase 1: Chatterbots & Vote bot Our Phase-1 deployment explored how chatbots and our vote bot could work together synchronously with crowd workers. We implemented four chatterbots (including the IR-based chatterbot using Chorus conversation data described in Part II) and a vote bot. During the Phase-1 deployment, the system only randomly selects one of four chatterbots to respond every half a minute, where the learning component described in Part I will be later included in Phase-2 deployment. Implementing Four Chatterbots: In our Phase-1 deployment, we implemented the following four chatterbots. 1. Chorus Bot (shown as Part II): A chatterbot that is powered by a retrieval-based method to reuse prior conversations to respond to users, which was described in Part II. 2. Filler Bot: A chatterbot that randomly selects one response from a set of candidates, regardless of context. We manually selected 13 common “conversation filler” in the Chorus dataset (e.g., “Is there anything else I can help you with?”, or “Thanks”) to form the candidate pool. 3. Interview Bot: A chatterbot that uses a retrieval-based method, which is identical to Chorus Bot, to find the best response from 27,894 query-response pairs extracted from 767 transcripts of TV celebrity interview [30]. 4. Cleverbot: Cleverbot is a third-party AI-powered chatbot which reuses more than 200 million conversations it had with users to generate responses [44, 4]. Vote Bot Setup: Currrently, The vote bot only votes on human-proposed messages, but not messages proposed by chatbots. In Phase 1, Evorus requires each automatic vote to have at least one extra human upvote to be accepted. Vote bots also skipped messages if the same worker proposed identical content earlier in the conversation but did not get accepted. We believe that worker’s re-sending is a strong signal of the poor quality of the message. Vote bots can decide not to vote if the confidence is too low (Part III.) Automating Human Labors: During Phase-1 deployment, a conversation on average contained 9.90 user messages (SD = 11.69), 13.6 accepted messages proposed by the crowd workers (SD = 10.44), and 13.58 accepted messages proposed by automatic chatterbots (SD = 2.81). Thus, automated responses were chosen 12.44% of the time. As a comparison (Figure 4(A)), in the Control Phase (42 users and 129 conversations), a conversation on average contained 8.73 user messages (SD = 10.05) and 12.98 accepted crowd messages Figure 4. Phase-1 Deployment: (A) Average number of accepted messages per conversation. Automated responses were chosen 12.44% of the time. (B) Average number of upvotes per accepted non-user message. Human upvotes were reduced by 13.81% by using automatic voting. (SD = 11.39). In terms of upvotes, each accepted non-user message received 1.06 human upvotes (SD = 0.73) and 0.11 automatic upvotes (SD = 0.18) In comparison, in the Control Phase, each accepted non-user message received 1.23 human upvotes (SD = 0.70.) Crowd voting was thus reduced by 13.81%. The comparison is shown in Figure 4(B). Moreover, an accepted non-user message sent by Evorus costed $0.142 in Phase-1 deployment on average, while it costed $0.211 during the Control Phase. Namely, with automated chatbots and the vote bot, the cost of each message is reduced by 32.76%. We also calculated the acceptance rate of messages proposed by each chatbot. The Filler Bot, which ignores context and proposes responses randomly, had the highest acceptance rate, 41.67%. The Chorus Bot’s acceptance rate was 30.99%, that of the Interview Bot was 33.33%, and that of the Cleverbot was 30.99%. This might be because Filler Bot’s commonplace responses (e.g., “I don’t know”) were often considered acceptable by human raters. In Phase 2, where an automatic response needed 2 human votes to go through, the Chorus Bot had the highest acceptance rate among all four chatterbots (Figure 6). While human workers, whose acceptance rate was 72.04% during Phase 1, still outperformed all chatbots by a large margin, chatbots with low accuracy can still contribute to the conversation. For instance, the Filler Bot, while being very simple and ignoring any context, nevertheless, often produces reasonable responses: [The user asked information about the wildfire and smoke in Emory university campus.] user Do you know where they are happening exactly? (The wildfires I mean) bot Can you provide some more details? Compared with Filler Bot, Chorus Bot better targets its responses because it chooses messages based on similarity with previous human responses: user Hey how many people like bubble tea here? bot Ask for their feedback when you talk with them Conversation Quality: We sampled conversations with accepted automatic responses and a matching set without automated contributions. For each, 8 MTurk workers rated [Satisfaction, Clarity, Responsiveness, Comfort], which was based on the PARADISE’s objectives for evaluating dialogue performance [42] and the Quality of Communication Experience metric [28], on a 5-point Likert scale (5 is best.) The original conversations (N=46) had an average rating of [3.47, 4.04, 3.88, 3.56], while those with automatic responses (N=54) had [3.57, 3.74, 3.52, 3.66]. The similar results suggest that the automatic components did not make conversations worse. Figure 5. (A) An actual conversation of Evorus. Conversations in Evorus tend to combine multiple chatbots and workers together. (B) User questionnaire used in Phase-2 deployment. The average user satisfaction rating of automated and non-automated conversations had no significant difference. Phase 2: Learning to Select Chatbots Our Phase-2 deployment explored how the learning component, described in Part I, can select the right chatbots in context, and how integrating additional chatbots affects performance. We implemented two additional utility bots, a Yelp Bot and a Weather Bot, that can perform information inquiry tasks for different contexts, in addition to the four chatterbots and one vote bot from Phase 1. We first launched the learning system with four chatterbots for two days, and then added the two utility bots for observing the changes of the model. Furthermore, in order to directly compare user satisfaction levels, all the automated components (including the chatbots, the vote bot, and the learning component) were only applied to 50% of the conversations randomly, and the other half of the conversations were solely run by the crowd as a baseline. To efficiently collect crowd feedbacks to update our model, we increased the frequency Evorus called chatbots from randomly calling one chatbot and one vote bot every 30 seconds (Phase 1) to calling two chatbots (top-1 ranked plus random) and one vote bot every 10 seconds (Phase 2.) To compensate for the possible drop in quality caused by higher calling frequency and randomly selecting one of the two bots, we increased the required upvote count for accepting an automatic response from 1 vote to 2 votes. Namely, while Evorus obtained more automatic responses with a much higher frequency in Phase 2, it also required more human upvotes to approve each automatic response at the same time. As a result, among the conversations that had automation in Phase 2, automated responses were chosen 13.25% of the time, in which a conversation on average contained 10.68 user messages (SD = 8.90), 15.74 accepted messages proposed by the crowd workers (SD = 11.92), and 2.40 accepted messages proposed by automatic chatterbots (SD = 2.40). Each accepted non-user message received 1.90 human upvotes (SD = 1.13) and 0.30 automatic upvotes (SD = 0.22). We did not compare Phase 2’s results in detail to that of the Control Phase because the high-frequency setup of Phase 2 is primarily for experimental exploration. Implementing Two Utility Bots: In addition to the four chatterbots in the Phase-1 deployment, we implemented the following two task-oriented utility bots: 1. Yelp Bot: A chatbot that suggests restaurants near the location mentioned by the user powered by the Yelp API [49]. If the user did not mention any location, it replies with “You’re looking for a restaurant. What city are you in?”. 2. Weather Bot: A chatbot that reports the current weather of a mentioned city powered by the WeatherUnderground API [41]. If the user did not mention any city names, it replies, “Which city’s weather would you like to know?” The chatbots’ developer (the first author) also provided three example chat messages for each that should trigger the corresponding chatbot, to initiate the learning process. For example, “Any restaurant recommendations in NYC?” for the Yelp Bot. Similar User Satisfaction Level: In Phase 2 we implemented an exit survey to measure end user satisfaction (Figure 5(B)). At the end of each conversation, the user had 10 minutes to report their satisfaction using a Likert-scale ranging from 1 (Very Dissatisfied) to 5 (Very Satisfied). 13 of 30 users provided feedback (response rate = 43%). The automated conversations’ average user satisfaction rating was 4.50 (SD=0.5, N=4); the crowd conversations’ average user satisfaction rating was 4.00 (SD=0.47, N=9), a difference that was not significant. Updating Estimates of Chatbot’s Prior Over Time: While our deployment is of a medium scale, the dynamics of our likelihood model can still be observed. For instance, the estimated prior probability described in Equation 3 was continuously updated with the growth of conversation that Evorus had. Our model assigned a starting probability of 0.3 to each chatbots (Figure 6). When users started talking with Evorus, crowd workers provided their feedback by upvoting and downvoting, and thus changed the estimation over time. When new chatbots were added, Evorus intentionally assigned them a higher prior probabilities to allow quicker crowd feedback. user hi! Can you summarize the features of the new iPhone for me? [Multiple messages list the features of the iPhone X.] bot There is no iPhone 7. [The crowd lists more features, and the user says thank you.] crowd No problem! crowd Some Auto replies don’t even make sense DISCUSSION AND CONCLUSION Figure 6. The estimated prior probability (Equation 3) of each chatbot was continuously updated with the growth of user messages. Utility Bots in Cold-Start Scenarios: We would like to understand if Evorus can select appropriate chatbots to obtain responses in corresponding context. Since non-task chatterbots such as the Cleverbot could be difficult for humans to judge if it should be called given a message, we focused only on task-oriented utility bots in the evaluation. For each user message in the automated conversations in Phase 2, the researchers manually annotated if it is relevant to the topic of “weather” and “restaurant,” respectively. With the assumption that each utility bot should be called when its topic comes up, we compared the human-labelled topic against the top chatbot that were suggested by Evorus and calculated the precision, recall, and F1-score. It is noteworthy that we only evaluated when the appropriate chatbot was called, regardless of the quality of the responses it generated. As a result, two newly-added utility bots both had a high precision and a lower recall. The Weather Bot’s precision was 1.00 and the recall was 0.47 (F1=0.64); and the Yelp Bot’s precision was 0.67 and the recall was 0.20 (F1=0.31.) This result shows the nature of new bots in our learning framework: Evorus uses the expertgenerated small set of examples to calculate the initial vector of each chatbot, which could result in precise predictions but with lower coverage. Over time, when Evorus collects more examples that each bot has successfully responded to and the recall increases. Moreover, conversations in Evorus tend to combine multiple chatbots and workers together. For instance, in the following conversation, the crowd had the user to narrow down the query, and then the Weather Bot was able to answer it. An additional detailed example is shown in Figure 5(A). [The user asked about the weather in Afghanistan.] crowd What city in Afghanistan?) [The crowd sends a website about Afghanistan weather.] user Kabul bot Friday’s weather forecast for [Kabul, Afghanistan]: Cloudy with a few showers. High 79F. Winds NW at 5 to 10 mph. Chance of rain 30%. Error Cases: Our bot-selection algorithm starts with high precision and low recall, and increases recall as it gradually gathers examples. Therefore, most errors we observed were false-negatives, where a chatbot should have been triggered but was not. Other errors came from the chatbot, where the bot was correctly triggered but its response was invalid. Workers usually downvoted or ignored these suggestions. In the rare cases where invalid automatic responses were mistakenly sent to the user, the crowd often tried to explain how the response was automatically generated to the user afterward. We introduced Evorus, a crowd-powered system conversational assistant built to automate itself over time. Informed by two phases of public field deployment and testing with real users, we iteratively designed and refined its flexible framework for open-domain dialog. We imagine a future where thousands of online service providers can develop their own chatbots, not only to serve their own users in a task-specific context, but also to dynamically integrate their services into Evorus with the help of the crowd, allowing users to interact freely with thousands of online services via a universal portal. Supporting this scale offers opportunities for future research. For example, one direction is to improve the learning framework to support third-party chatbots that also improves overtime, or to better balance between the exploitation and exploration phases (like in a multi-armed bandit problem). Evorus could also be used to collect valuable fail cases to enable third-party developers to improve their bots (i.e., when a bot was triggered, but its proposed response was rejected). Evorus has three main advantages as compared to previous approaches. First, it is a working system that can serve as a scaffold for automation over time. A core advantage of starting with a working system is that users can talk to Evorus naturally from day one, ensuring conversation quality while collecting training data for automation. Second, given the oversight of the crowd, Evorus has a high tolerance for errors from its automated components. Even an imperfect automation component (e.g., chatbots) can contribute to a conversation without hurting quality, which yields more space for algorithms to “explore” different actions (e.g., selecting a chatbot with medium confidence.) Finally, Evorus allows a mixed group of humans and bots to collaboratively hold open conversations. Most automated systems created from crowd work simply use the crowd for data; Evorus tightly integrates crowds and machine learning, and provides specific points where automated components can be introduced. This architecture allows each component to be improved, providing a common research harness on which researchers specializing in different areas may innovate and compete. For instance, “response generation” has long been developed in the NLP community; Evorus provides a natural evaluate it within a larger conversational system. The flexibility of the Evorus framework potentially allows for low cost integration between many online service providers and fluid collaboration between chatbots and human workers to form a single user-facing identity. Given the complexity of conversational assistance, Evorus is likely to be crowd-powered in part for some time, but we expect it to continue to increasingly rely on automation. ACKNOWLEDGEMENTS We thank Walter S. Lasecki and also the workers who participated in our studies. This project has been funded as part of the Yahoo!/Oath InMind Project at Carnegie Mellon University. REFERENCES 1. Amazon. 2017. Meet Alexa. (2017). https://www.amazon.com/meet-alexa/b?ie= UTF8&node=16067214011 2. Rafael E Banchs and Haizhou Li. 2012. IRIS: a chat-oriented dialogue system based on the vector space model. In Proceedings of the ACL 2012 System Demonstrations. Association for Computational Linguistics, 37–42. 3. Jeffrey P. Bigham, Chandrika Jayant, Hanjie Ji, Greg Little, Andrew Miller, Robert C. Miller, Robin Miller, Aubrey Tatarowicz, Brandyn White, Samual White, and Tom Yeh. 2010. VizWiz: Nearly Real-time Answers to Visual Questions. In Proceedings of the 23Nd Annual ACM Symposium on User Interface Software and Technology (UIST ’10). ACM, New York, NY, USA, 333–342. DOI: http://dx.doi.org/10.1145/1866029.1866080 4. Rollo Carpenter. 2006. Cleverbot. (2006). https://www.cleverbot.com/ [Online; accessed 08-March-2017]. 5. Joseph Chee Chang, Aniket Kittur, and Nathan Hahn. 2016. Alloy: Clustering with crowds and computation. In Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems. ACM, 3180–3191. 6. Yun-Nung Chen, Dilek Hakkani-Tür, Gökhan Tür, Jianfeng Gao, and Li Deng. 2016. End-to-End Memory Networks with Knowledge Carryover for Multi-Turn Spoken Language Understanding.. In INTERSPEECH. 3245–3249. 7. Justin Cheng and Michael S Bernstein. 2015. Flock: Hybrid crowd-machine learning classifiers. In Proceedings of the 18th ACM Conference on Computer Supported Cooperative Work & Social Computing. ACM, 600–611. 8. Josh Constine. 2017. Amazon rejects AI2’s Alexa skill voice-search engine. Will it build one? (May 2017). https://techcrunch.com/2017/05/31/amazon-skillsearch-engine/ 9. Rong-En Fan, Kai-Wei Chang, Cho-Jui Hsieh, Xiang-Rui Wang, and Chih-Jen Lin. 2008. LIBLINEAR - A Library for Large Linear Classification. (2008). http://www.csie.ntu.edu.tw/~cjlin/liblinear/ The Weka classifier works with version 1.33 of LIBLINEAR. 10. Michael J. Franklin, Donald Kossmann, Tim Kraska, Sukriti Ramesh, and Reynold Xin. 2011. CrowdDB: Answering Queries with Crowdsourcing. In Proceedings of the 2011 ACM SIGMOD International Conference on Management of Data (SIGMOD ’11). ACM, New York, NY, USA, 61–72. DOI: http://dx.doi.org/10.1145/1989323.1989331 11. Milica Gasic, Nikola Mrksic, Lina M Rojas-Barahona, Pei-Hao Su, Stefan Ultes, David Vandyke, Tsung-Hsien Wen, and Steve Young. 2016. Dialogue manager domain adaptation using Gaussian process reinforcement learning. arXiv preprint arXiv:1609.02846 (2016). 12. Nathan Hahn, Joseph Chang, Ji Eun Kim, and Aniket Kittur. 2016. The Knowledge Accelerator: Big picture thinking in small pieces. In Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems. ACM, 2258–2270. 13. Bo Han and Timothy Baldwin. 2011. Lexical Normalisation of Short Text Messages: Makn Sens a #Twitter. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies - Volume 1 (HLT ’11). Association for Computational Linguistics, Stroudsburg, PA, USA, 368–378. http://dl.acm.org/citation.cfm?id=2002472.2002520 14. Hangoutsbot. 2017. hangoutsbot/hangoutsbot. (Apr 2017). https://github.com/hangoutsbot/hangoutsbot 15. Jessi Hempel. 2015. Facebook Launches M, Its Bold Answer to Siri and Cortana. (Aug 2015). https://www.wired.com/2015/08/facebook-launchesm-new-kind-virtual-assistant/ 16. Ting-Hao Kenneth Huang, Amos Azaria, and Jeffrey P. Bigham. 2016. InstructableCrowd: Creating IF-THEN Rules via Conversations with the Crowd. In Proceedings of the 2016 CHI Conference Extended Abstracts on Human Factors in Computing Systems (CHI EA ’16). ACM, New York, NY, USA, 1555–1562. DOI: http://dx.doi.org/10.1145/2851581.2892502 17. Ting-Hao K. Huang and Jeffrey P. Bigham. 2017. A 10-Month-Long Deployment Study of On-Demand Recruiting for Low-Latency Crowdsourcing. In In Proceedings of The fifth AAAI Conference on Human Computation and Crowdsourcing (HCOMP 2017). AAAI, AAAI. 18. Ting-Hao K. Huang, Yun-Nung Chen, and Jeffrey P. Bigham. 2017. Real-time On-Demand Crowd-powered Entity Extraction. In In Proceedings of the 5th Edition Of The Collective Intelligence Conference (CI 2017, oral presentation). 19. Ting-Hao Kenneth Huang, Walter S. Lasecki, Amos Azaria, and Jeffrey P. Bigham. 2016. “Is there anything else I can help you with?”: Challenges in Deploying an On-Demand Crowd-Powered Conversational Agent. In Proceedings of AAAI Conference on Human Computation and Crowdsourcing 2016 (HCOMP 2016). AAAI. 20. Ting-Hao Kenneth Huang, Walter S Lasecki, and Jeffrey P Bigham. 2015. Guardian: A Crowd-Powered Spoken Dialog System for Web APIs. In Third AAAI Conference on Human Computation and Crowdsourcing. 21. Ece Kamar, Severin Hacker, and Eric Horvitz. 2012. Combining human and machine intelligence in large-scale crowdsourcing. In Proceedings of the 11th International Conference on Autonomous Agents and Multiagent Systems-Volume 1. International Foundation for Autonomous Agents and Multiagent Systems, 467–474. 22. Ece Kamar and Lydia Manikonda. 2017. Complementing the Execution of AI Systems with Human Computation. In AAAI Workshop on Crowdsourcing, Deep Learning and Artificial Intelligence Agents 2017. AAAI. 23. G. Laput, W. S. Lasecki, J. Wiese, R. Xiao, J. P. Bigham, and C. Harrison. 2015. Zensors: Adaptive, Rapidly Deployable, Human-Intelligent Sensor Feeds. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI ’15). ACM, New York, NY, USA, 10. http://www.cs.cmu.edu/~jbigham/ pubs/pdfs/2015/zensors.pdf 24. Walter S. Lasecki, Phyo Thiha, Yu Zhong, Erin Brady, and Jeffrey P. Bigham. 2013a. Answering Visual Questions with Conversational Crowd Assistants. In Proceedings of the 15th International ACM SIGACCESS Conference on Computers and Accessibility (ASSETS ’13). ACM, New York, NY, USA, Article 18, 8 pages. DOI:http://dx.doi.org/10.1145/2513383.2517033 25. Walter S. Lasecki, Rachel Wesley, Jeffrey Nichols, Anand Kulkarni, James F. Allen, and Jeffrey P. Bigham. 2013b. Chorus: A Crowd-powered Conversational Assistant. In Proceedings of the 26th Annual ACM Symposium on User Interface Software and Technology (UIST ’13). ACM, New York, NY, USA, 151–162. DOI: http://dx.doi.org/10.1145/2501988.2502057 26. Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. 2016. A Persona-Based Neural Conversation Model. arXiv preprint arXiv:1603.06155 (2016). 27. Xuijun Li, Yun-Nung Chen, Lihong Li, Jianfeng Gao, and Asli Celikyilmaz. 2017. End-to-End Task-Completion Neural Dialogue Systems. In Proceedings of The 8th International Joint Conference on Natural Language Processing (IJCNLP 2017). AFNLP. 28. Leigh Anne Liu, Chei Hwee Chua, and Günter K Stahl. 2010. Quality of communication experience: definition, measurement, and implications for intercultural negotiations. Journal of Applied Psychology 95, 3 (2010), 469. 29. Matthew Lynley. 2016. Make Magic’s Assistants Do Almost Anything With $100/Hour And A Text Message. (Jan 2016). https://techcrunch.com/2016/01/05/ make-magics-assistants-do-almost-anything-with100hour-and-a-text-message/ 30. Cable News Network. 2017. (2017). http://transcripts.cnn.com/TRANSCRIPTS/ 31. Casey Newton. 2016 (accessed October 24th, 2016). SPEAK, MEMORY: When her best friend died, she rebuilt him using artificial intelligence. https://www.theverge.com/a/luka-artificialintelligence-memorial-roman-mazurenko-bot 32. Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global Vectors for Word Representation. In Empirical Methods in Natural Language Processing (EMNLP). 1532–1543. http://www.aclweb.org/anthology/D14-1162 33. Antoine Raux and Maxine Eskenazi. 2008. Optimizing endpointing thresholds using dialogue features in a spoken dialogue system. In Proceedings of the 9th SIGdial Workshop on Discourse and Dialogue. Association for Computational Linguistics, 1–10. 34. Daniela Retelny, Sébastien Robaszkiewicz, Alexandra To, Walter S Lasecki, Jay Patel, Negar Rahmati, Tulsee Doshi, Melissa Valentine, and Michael S Bernstein. 2014. Expert crowdsourcing with flash teams. In Proceedings of the 27th annual ACM symposium on User interface software and technology. ACM, 75–85. 35. Alan Ritter, Colin Cherry, and William B Dolan. 2011. Data-driven response generation in social media. In Proceedings of the conference on empirical methods in natural language processing. Association for Computational Linguistics, 583–593. 36. Erica Sadun and Steve Sande. 2012. Talking to Siri: Learning the Language of Apple’s Intelligent Assistant. Que Publishing. 37. Akash Das Sarma, Ayush Jain, Arnab Nandi, Aditya Parameswaran, and Jennifer Widom. 2015. Surpassing humans and computers with JELLYBEAN: Crowd-vision-hybrid counting algorithms. In Third AAAI Conference on Human Computation and Crowdsourcing. 38. Konrad Scheffler and Steve Young. 2002. Automatic Learning of Dialogue Strategy Using Dialogue Simulation and Reinforcement Learning. In Proceedings of the Second International Conference on Human Language Technology Research (HLT ’02). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 12–19. http://dl.acm.org/citation.cfm?id=1289189.1289246 39. Saiganesh Swaminathan, Raymond Fok, Fanglin Chen, Ting-Hao K. Huang, Irene Lin, Rohan Jadvani, Walter Lasecki, and Jeffrey Bigham. 2017. WearMail: On-the-Go Access to Information in Your Email with a Privacy-Preserving Human Computation Workflow. In 30th ACM Symposium on User Interface Software and Technology (UIST 2017). 40. Long Tran-Thanh, Sebastian Stein, Alex Rogers, and Nicholas R Jennings. 2014. Efficient crowdsourcing of unknown experts using bounded multi-armed bandits. Artificial Intelligence 214 (2014), 89–111. 41. Weather Underground. 2017. A Weather API Designed for Developers. (2017). https://www.wunderground.com/weather/api/ 42. Marilyn A Walker, Diane J Litman, Candace A Kamm, and Alicia Abella. 1997. PARADISE: A framework for evaluating spoken dialogue agents. In Proceedings of the eighth conference on European chapter of the Association for Computational Linguistics. Association for Computational Linguistics, 271–280. 43. Tsung-Hsien Wen, Milica Gasic, Nikola Mrksic, Lina M Rojas-Barahona, Pei-Hao Su, David Vandyke, and Steve Young. 2016. Multi-domain Neural Network Language Generation for Spoken Dialogue Systems. arXiv preprint arXiv:1603.01232 (2016). 44. Wikipedia. 2017a. Cleverbot — Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/w/index.php?title= Cleverbot&oldid=771836990. (2017). [Online; accessed 02-April-2017]. 45. Wikipedia. 2017b. Tay (bot) — Wikipedia, The Free Encyclopedia. http://en.wikipedia.org/w/index.php?title= Tay%20(bot)&oldid=769762463. (2017). [Online; accessed 04-April-2017]. 46. Jason D Williams and Steve Young. 2007. Partially observable Markov decision processes for spoken dialog systems. Computer Speech & Language 21, 2 (2007), 393–422. 47. Ian H Witten, Eibe Frank, Mark A Hall, and Christopher J Pal. 2016. Data Mining: Practical machine learning tools and techniques. Morgan Kaufmann. 48. Xuesong Yang, Yun-Nung Chen, Dilek Hakkani-Tür, Paul Crook, Xiujun Li, Jianfeng Gao, and Li Deng. 2017. End-to-end joint learning of natural language understanding and dialogue manager. In Acoustics, Speech and Signal Processing (ICASSP), 2017 IEEE International Conference on. IEEE, 5690–5694. 49. Yelp. 2017. Yelp API Documentation. (2017). https://www.yelp.com/developers/documentation/ v2/overview 50. Tiancheng Zhao, Kyusong Lee, and Maxine Eskenazi. 2016. DialPort: Connecting the Spoken Dialog Research Community to Real User Data. arXiv preprint arXiv:1606.02562 (2016).
2cs.AI
Property-driven State-Space Coarsening for Continuous Time Markov Chains ? Michalis Michaelides1 , Dimitrios Milios1 , Jane Hillston1 , and Guido Sanguinetti12 arXiv:1606.01111v2 [cs.SY] 29 Oct 2016 2 1 School of Informatics, University of Edinburgh SynthSys, Centre for Synthetic and Systems Biology, University of Edinburgh Abstract. Dynamical systems with large state-spaces are often expensive to thoroughly explore experimentally. Coarse-graining methods aim to define simpler systems which are more amenable to analysis and exploration; most current methods, however, focus on a priori state aggregation based on similarities in transition rates, which is not necessarily reflected in similar behaviours at the level of trajectories. We propose a way to coarsen the state-space of a system which optimally preserves the satisfaction of a set of logical specifications about the system’s trajectories. Our approach is based on Gaussian Process emulation and Multi-Dimensional Scaling, a dimensionality reduction technique which optimally preserves distances in non-Euclidean spaces. We show how to obtain low-dimensional visualisations of the system’s state-space from the perspective of properties’ satisfaction, and how to define macro-states which behave coherently with respect to the specifications. Our approach is illustrated on a non-trivial running example, showing promising performance and high computational efficiency. 1 Introduction Reasoning about behavioural properties of dynamical systems is a central goal of formal modelling. Recent years have witnessed considerable progress in this direction, with the definition of formal languages [10,9] and logics [12] which enable compact representations of dynamical systems, and mature reasoning tools to model-check properties in an exact [15] or statistical way [20,14]. While such advances are indubitably improving our understanding of dynamical systems, the applicability of these techniques in practical scenarios is still largely hindered by computational issues. In particular, systems with large state-spaces quickly become infeasible to analyse via exact methods due to the phenomenon of state-space explosion; even statistical methods may require computationally expensive and extensive simulations. State-space reduction methodologies aim ? M.M., D.M. and G.S. are supported by the European Research Council under grant MLCS 306999. J.H. is supported by the EU project, QUANTICOL 600708. to construct more compact representations for complex systems. Such reducedstate systems are generally amenable to more effective analysis and may yield deeper insights into the structure and dynamics of the system. Broadly speaking, state-space reduction can be achieved by either model simplification, usually by abstracting some system behaviours into a simpler system, or state aggregation, often by exploiting symmetries or approximate invariances. A prime example of model simplification is the technique of time-scale separation, which replaces a large system with multiple weakly dependent sub-systems [5]. Most aggregation methods, instead, are based on grouping different states with similar behaviour with respect to their transition probabilities. This idea is at the core of the concept of approximate lumpability, which extends the exact lumpability relationship by aggregating states based on a pre-defined metric on the outgoing exit rates [11,7,1,19,17]. In this paper we propose a novel state-space reduction paradigm by shifting the focus from the infinitesimal properties of states (i.e. their transition rates) to the global properties of trajectories. Namely, we seek to aggregate states that yield behaviourally similar trajectories according to a set of pre-defined logical specifications. Intuitively, two states will be aggregated if trajectories starting from either state exhibit similar probabilities of satisfying the logical specifications. We define a statistical algorithm based on statistical model checking and Gaussian Process emulation to define this behavioural similarity across the whole state-space of the system. We then propose a dimensionality reduction and clustering pipeline to aggregate states and define reduced (non-Markovian) dynamics. To illustrate our approach, we give a running example of model reduction for the Susceptible-Infected-Recovered-Susceptible (SIRS) model, a non-trivial, non-linear stochastic system widely used in epidemiology. Our results show that property-driven aggregation can yield an effective tool to reduce the complexity of stochastic dynamical systems, leading to non-trivial insights in the structure of their state-space. 2 2.1 Background Population Continuous Time Markov Chains A Continuous Time Markov Chain (CTMC) is a continuous-time Markovian stochastic process over a discrete state-space S. We will consider only population models, where the state-space is organised along populations: in this case, the state-space is indexed by the counts of each population ni ∈ N ∪ {0}. Population CTMCs (pCTMCs) are frequently used in many scientific and engineering domains; we will use here the notation of chemical reactions as it is widespread and intuitively appealing. Transitions in a pCTMC are denoted as τ (X) r1 X1 + . . . rn Xn −−−→ s1 X1 + . . . sn Xn 2 meaning that ri particles of type Xi are consumed and sj particles of type Xj are produced when the specific transition takes place. τ (X) is a transition rate which depends on the current state of the system. It is easy to show that waiting times between transitions are exponentially distributed random variables; this observation is the basis of exact simulation algorithms for pCTMCs, such as the celebrated Gillespie algorithm [13]. The Gillespie algorithm generates trajectories of a pCTMC by randomly choosing the next reaction to occur and the time to elapse until the reaction occurs. Example 1.1 We introduce here our running example, the Susceptible-InfectedRecovered-Susceptible (SIRS) model of epidemic spreading. The SIRS model is a discrete stochastic model of disease spread in a population, where individuals in the population can be in one of three states, Susceptible, Infected and Recovered. There are different variations of the model, some open (individuals can enter and exit the system), others with individuals relapsing to a susceptible state after having recovered. Here, we consider a relapsing, closed system, which evolves in a discrete, 2-dimensional state-space, where dimensions are the number of Susceptible and Infected individuals in the population (Recovered numbers are uniquely determined since the total population is constant). We also introduce a spontaneous infection of a susceptible individual with constant rate, independent of the number of infected individuals, to eliminate absorbing states. With a population size of N , states in the 2D space can be represented by x = (S, I), S ∈ {0, · · · , N }, I ∈ {0, · · · , N − S} for a total of (N + 1)(N + 2)/2 states. The chemical reactions for this system are: α infection S + I − → 2I; β/5 spontaneous infection S −−→ I; β recovery I − → R; β relapsing R − → S. We set the infection rate α = 0.005, recovery rate β = 0.01, and population size N = S + I + R = 100, for a total of 5151 states in this SIRS system. Sample trajectories of the system were simulated using the Gillespie algorithm. 2.2 Temporal Logic and Model Checking We formally specify trajectory behaviours by using temporal logic properties. We are particularly interested in properties that can be verified on single trajectories, and assume metric bounds on the trajectories, so that they are observed only for a finite amount of time. Metric Interval Temporal logic (MITL) offers a convenient way to formalise such specifications. 3 Formally, MITL has the following grammar: φ ::= tt | µ | ¬φ | φ1 ∧ φ2 | φ1 U[T1 ,T2 ] φ2 , where tt is the true formula, conjunction and negation are the standard boolean connectives, and the time-bounded until U[T1 ,T2 ] is the only temporal modality. Atomic propositions µ are (non-linear) inequalities on population variables. A MITL formula is interpreted over a function of time x, and its satisfaction relation is given as in [16]. More temporal modalities, such as the timebounded eventually and always, can be defined in terms of the until operator: F[T1 ,T2 ] φ ≡ ttU[T1 ,T2 ] φ and G[T1 ,T2 ] φ ≡ ¬F[T1 ,T2 ] ¬φ. MITL formulae evaluate as true or false on individual trajectories; when trajectories are sampled from a stochastic process, the truth value of a MITL formula is a Bernoulli random variable. Computing the probability of such a random variable is a model checking problem. Model checking for MITL properties evaluated on trajectories from a CTMC requires the computation of transient probabilities; despite major computational efforts [15], this is seldom possible exactly due to state-space explosion. Statistical model checking (SMC) methods circumvent such problems by adopting a Monte Carlo perspective: by drawing repeatedly and independently sample trajectories, one may obtain an unbiased estimate of the truth probability, and statistical error bounds can be obtained by employing either frequentist or Bayesian statistical approaches [20,14]. It should be pointed out that such bounds do not carry the same guarantees as numerical results obtained say by transient analysis; however, simply by drawing more samples one may reduce the uncertainty in the bounds arbitrarily. Example 1.2 MITL formulae can be used effectively to obtain behavioural characterisations of the system’s trajectory. We turn again to the SIRS model to illustrate this concept. Assume one may want to express a global bound on the virulence of the infection, so that the fraction of infected population never exceeds λ. This can be done by considering the formula φ1 , defined as φ1 ::= G[0,100] (I < λN ) (1) which translates to: ( φ1 (x) = tt if It < λN ∀t ∈ [0, 100], ¬tt otherwise. Statistical model checking of this formula is trivial: one simply draws a trajectory using Gillespie’s algorithm, and monitors that the maximal number of infected does not exceed the specified threshold in the [0, 100] interval. 4 NI 3 1 Initial state space NS 2 φ-calculation GP imputation NR P (φ2 ) 1 Property space (φ-space) 2 1 3 P (φ1 ) 1 MDS projection JSD as metric 1 P (φn ) MDS extension θm<n 2 3 JSD space 1 θ1 Clustering Cluster labelling θm<n 2 3 JSD space 1 θ1 Fig. 1. The sequence of transformations from space to space are shown in the figure. States from the original state-space (blue circles 1-3) are projected to φ-space according to satisfaction rate of set properties (found via simulation of the system). MDS is used to project from φ-space to a space where JSD of φ satisfaction probability distributions between states is preserved as Euclidean distance (in the figure, JSD[Pφ (2) k Pφ (3)] < JSD[Pφ (1) k Pφ (2)], JSD[Pφ (1) k Pφ (3)] so states 2, 3 are placed closer together than 1). The states are then clustered to produce macro-states. Out-ofsample states (red cross) can be projected to φ-space, using GP imputation to estimate satisfaction probabilities. MDS extension allows projecting from φ-space to JSD space without moving the sampled states. The most likely cluster for the state to belong to (nearest centroid) is the macro-state it belongs to. 5 3 3.1 Methodology High level method description We first present a high-level description of the proposed methodology; the technical ingredients will be introduced in the following subsections. Figure 1 provides an intuitive roadmap of the approach. The overarching idea is to provide a state-space aggregation algorithm which uses behavioural similarities as an aggregation criterion. The input to the approach is a CTMC model and a set of MITL formulae φ1 , . . . , φn which define the behavioural traits we are interested in. We formalise some of the key concepts through the following definitions. Definition 1. A coarsening map C for a CTMC M is a surjective map M:S→ − R, (2) from the state-space S of M to a finite set R, such that card(S) ≥ card(R). Definition 2. The macro-states of the coarsened system are the elements of the image of the coarsening map C. Therefore, the set of all macro-states is a partition of the set of initial states S, where each element in the partition is a macro-state. In general, there is no way to retrieve the initial state configuration of the system only from information of the macro-state configuration, i.e., the coarsening entails an information loss. We illustrate the various steps of the proposed procedure in Figure 1. The first step is to take a sample of possible initial states; we then evaluate the joint satisfaction of the n formulae, given a particular state as initial condition. This implicitly defines a map n Φ : S → [0, 1]2 (3) which associates each initial state with the probability of each possible satisfaction pattern of the n formulae. Notice that all of the 2n possible truth values are needed to ensure correlations between properties are captured. Constructing such a property map by exhaustive exploration of the state-space is clearly computationally infeasible; we therefore evaluate it (by SMC) on a subset of possible initial states, and then extend it using a statistical surrogate, a Gaussian Process (Figure 1 top). The property representation contains the full information over the dependence of the properties of interest on the initial state. It can be endowed with an information-theoretic metric by using the JSD between the resulting probability distributions. However, the high dimensionality and likely very non-trivial structure of the property representation may make this unwieldy. We therefore propose a dimensionality reduction strategy which maintains approximately the 6 metric structure of the property representation using Multi-Dimensional Scaling (MDS; Figure 1 middle). MDS will also have the advantage of automatically identifying potentially redundant characterisations, as implied for example by logically dependent formulae. The low-dimensional output of the MDS projection can then be visually inspected for groups of initial states (macro-states) with similar behaviours with respect to the properties. This operation is a coarsening map, which can also be automated by using a variety of clustering algorithms. The model dynamics induce, in principle, a dynamics on this reduced space R. In practice, such dynamics will be non-Markovian and not easily expressible in a compact form; we propose a simple, simulation-based alternative definition which re-uses some of the computation performed in the previous steps to define an empirical, coarse-grained dynamics on the macro-states. 3.2 Satisfaction probability as a function of initial conditions The starting point for our approach consists of embedding the initial state-space into the property space, φ-space. This is achieved by computing satisfaction probabilities for the 2n possible truth patterns of the n properties we consider. As in general these satisfaction probabilities can only be computed via SMC, this is potentially a tremendous computational bottleneck. To obviate this problem, we turn the computation of the property map into a machine learning problem: we evaluate the 2n functions on a (sparse) subset of initial states, and predict their values on the remaining initial states using a Gaussian Process (GP). GPs have extensively been used in machine learning for regression purposes and it is in this context they are used here. A GP is a generalisation of the multivariate normal distribution to function spaces with infinitely many dimensions; within a regression context, GPs are used to provide a flexible prior distribution over the set of candidate functions underpinning the hypothesised input-output relationship. Given a number of input-output observations (training set), one can use Bayes’s rule to condition the GP on the training set, obtaining a posterior distribution over the regression function at other input points. For a review of GPs and their uses in machine learning, we refer the reader to [18]. In our setting, the input-output relationship is the property map from initial states to satisfaction probabilities of the properties. This function is defined over a discrete space, but we can use the population structure of the pCTMC to embed the state-space S in a (subset) of RD for some D. We can then treat the problem n as a standard regression problem, learning a function fφ : RD → R2 . Remark. GPs have already been used to explore the dependence of the satisfaction probability of a formula on model parameters in the so-called Smoothed Model Checking approach [6]. There, the authors proved a smoothness result 7 which justified the use of smoothness-inducing GPs for the problem. It is easy to see that such smoothness does not hold in general for the function fφ ; for example, the probability of satisfying the formula x(0) > N has a discontinuity at x = N . However, since we only ever evaluate fφ on a discrete set of points, the lack of smoothness is not an issue, as a continuous function can approximate arbitrarily well a discontinuous function when restricted to a discrete set. Example 1.3 We exemplify this procedure on the SIRS example. We consider here three properties of interest: the global bound encoded in formula φ1 defined in equation (1), and two further properties encoded as φ2 ::= F[0,60] G[0,40] (0.05N ≤ I ≤ 0.2N ), (4) φ3 ::= F[30,50] (I > 0.3N ). (5) Satisfaction of φ2 requires that the infection has remained within 5 to 20% of the total population for 40 consecutive time units, starting anytime in the first 60 time units; satisfaction of φ3 requires that the infection peaks at above 30% between time 30 and time 50. The property map in this case would have an 8-dimensional co-domain, representing the probability of satisfaction for each of the 23 possible truth values of the three formulae. Figure 2 plots the probability of satisfaction for the three formulae individually, as we vary the initial state. In this case, 10% of all possible initial states were randomly selected and numerically mapped to the property space via SMC, while the satisfaction probabilities for the remaining 90% were imputed using GPs. We see that throughout most of the state-space the second property has low probability. Also it is of interest to observe the strong anti-correlation between the first and third properties: intuitively, if there is very high probability that the infection will be globally bounded below 40% of individuals, it becomes more difficult to reach a peak at above 30%. 3.3 Dimensionality reduction of behaviours Once states are mapped onto φ-space, reducing dimensionality of this space is useful to remove correlations and redundancies in the properties tracked. Properties may often capture similar behaviour, leading to strong correlations in their satisfaction probability. Reducing the dimensionality of the property space mostly retains the information of how behaviour differs from state to state, eliminating redundancies. Moreover, reduced dimensional mappings can aid practitioners to visually identify structures within the state-space of the system. In order to quantify the similarity of different initial states with respect to property satisfaction, the Jensen-Shannon Divergence (JSD) between the probability distributions of property satisfaction is used as a metric. JSD is an information theoretic symmetric distance between probability distributions — the higher the 8 difference between the distributions, the higher JSD is. Between two distributions, P, Q, JSD is defined as JSD[P k Q] = 1 (KL[P k M ] + KL[Q k M ]), 2 where M = 0.5(P + Q) the average of the distributions, and KL[P k Q] = P P (i) i P (i) log Q(i) , the Kullback-Leibler divergence. The JSD enables us to derive a matrix of pairwise distances in property space between different initial states. Such a distance is not Euclidean, and is defined in the high-dimensional property space. To map the initial states in a more convenient, low-dimensional space, we employ a dimensionality reduction technique known as Multi-Dimensional Scaling (MDS) [4]. MDS has its roots in the social science literature; it is a valuable and widely used tool in psychology and similar fields where data is collected by assessing similarity between pairs. Given some points X in an m-dimensional space, MDS finds the position of corresponding points Z in an n-dimensional space, where usually n < m, such that a given metric between points is optimally preserved. In the most common case, (also known as Torgerson–Gower scaling or Principal Component Analysis), the metric to be preserved is the Euclidean distance, and is preserved by minimisation of a loss function. This function is generally known as stress for metric MDS, but specifically for classical MDS as strain. For the classical MDS case, the projection is achieved by eigenvalue decomposition of a distance matrix of the (normalised) points XX > , and subsequently reconstructing the points from the n largest (eigenvector, eigenvalue) pairs. This results in Z, a projection of the points to an n-dimensional space, where Euclidean distance is optimally preserved. In the classical MDS definition, the MDS projection is defined statically for the available data points, and needs ab initio re-computation if new points become available. In [2], the method is extended to new points by constructing a new dissimilarity matrix of new points to old ones, by which the projection of new points will be consistent to that of the old points. The kernel for this new matrix achieves this by replacing the means required for centring with expectations over the old points; such that for points x, y ∈ X   1X 2 0 1X 2 1 X 2 0 0 1 d (x , y) − d (x, y 0 ) + 2 d (x , y )] , K̃(x, y) = − d2 (x, y) − 2 n 0 n 0 n 0 0 x y x ,y where K̃(x, y) is the kernel used for the dissimilarity matrix, is replaced by   1 2 2 2 0 2 0 K̃(a, b) = − d (a, b) − Ex [d (x, a)] − Ex0 [d (b, x )] + Ex,x0 [d (x, x )] , 2 where a can be an out-of-sample point (a ∈ / X, b ∈ X). 9 This reconstructs the dissimilarity matrix for the original points exactly, and allows us to generalise to out-of-sample points and find their positions in the embedding learned, as described in [2]. Extending MDS allows us to create macro-states based on samples of points, and then project new points on the space created by MDS to find in which clusters they belong. Example 1.4 We have introduced three properties in Equations (1), (4) and (5), and the associated property map. This has an eight-dimensional co-domain, but already some of its properties can be gleaned by the three-dimensional plot of the single-formula probabilities shown in Figure 2. Particularly, these reveal strong negative correlations, indicating that MDS may prove fruitful. Fig. 2. Left: Projection of states in φ-space via SMC (trajectory simulations for each initial state). Notice the non-trivial state distribution structure. Right: Projection of states in φ-space using SMC for 10% of the states, and GP regression to estimate P (φ) for the rest 90% of states (red crosses). Fig. 3. Left: P (φ1 , φ2 , φ3 ) estimated via SMC for each state. MDS was then used to project them from an 8D to a 2D space. Right: GP estimates of P (φ1 , φ2 , φ3 ) for 90% of states (red crosses) produce an almost identical MDS projection. 10 Figure 3 shows the states projected to a 2D space were proximity implies similar probability distribution over property satisfaction. This was achieved using MDS to project the states, with JSD used as the metric to be preserved as Euclidean distance in the new 2D space. Elements of the square-shaped structure visible in φ-space (figure 2) are preserved, with the subset of states giving rise to higher probabilities for property φ2 (top of Figure 2) appearing further from the connected outline (bottom left group in Figure 3). 3.4 Clustering and structure discovery The MDS projection enables us to visually appreciate the existence of non-trivial structures within the state-space, such as clusters of initial states that produce similar behaviours with respect to the property specification. Our intuition is that such structures should form the basis to define macro-states of the system, groups of states that will exhibit similar satisfaction probabilities for the properties defined. To automate this process, we propose to use a clustering algorithm to define macro-states. Since our goal is to group states with similar behaviours, we adopt k-means clustering [3], which is based on the Euclidean distance of the states in the MDS space (representative of the JSD between the probability satisfaction distributions). k-means requires specification of the desired number of clusters (the k parameter); this allows the user to select the level of coarsening required. Figure 4 shows the clusters produced in the reduced MDS space for the running SIRS model example, where we set the number of clusters k = 10. k-Means 0.2 0.1 0.0 0.1 0.2 0.0 0.2 0.4 0.6 0.8 Fig. 4. The states were clustered in the space created by the MDS projection and coloured accordingly, using k-means (10 clusters). Since the Euclidean distance in this space is representative of distance in probability distributions over properties, states with different behaviour should be in different clusters. 11 3.5 Constructing coarse dynamics Once states have been grouped into macro-states, a major question is how to construct dynamics for the now coarsened system. The coarsened system naturally inherits dynamics from the original (fine-grained) system; however, such dynamics are non-Markovian, and in general fully history dependent so that transition probabilities would have the form p(k 0 , t|k, h) = p(k 0 |k, t, h)p(t|k, h), (6) where h denotes the history of the process. Simulating such a non-Markovian system is very difficult and likely to be much more computationally expensive than simulating the original system. We therefore seek to define approximate dynamics which are amenable to efficient simulation, but still capture aspects of the non-Markovian dynamics. The most natural approximation is to replace the system with a semi-Markov system: transitions are still history-independent, but the distribution of sojourn times is non-exponential. To evaluate the sojourn-time distribution, we resort to an empirical strategy, and construct an empirical distribution of sojourn times by re-using the simulated trajectories of the fine system that were drawn to define the coarsening. In other words, once a clustering is defined, we retrospectively inspect the trajectories to construct a histogram distribution of sojourn times, approximating p(t|k). A possible drawback of this semi-Markov approximation is that it may introduce transitions which are actually impossible in the original state-space. This is because states were clustered based on behaviour rather than transition rates, and therefore states that are actually quite far in the original state-space may end up being clustered together. Since the identity of the original states is lost after the coarse graining, impossible transitions may be introduced. Retrospectively inspecting whole system trajectories, rather than agnostically examining cluster transitions of the original system with a uniform initial state distribution within the cluster, ameliorates this problem. Similarly, estimates of p(k 0 |t, k) are produced from the same trajectories; these are the macro-state transition frequencies in each bin of the sojourn time probability histogram. This method avoids a lot of impossible trajectories one might generate, if the above probabilities were estimated by sampling randomly from initial states in a macro-state and looking at when the macro-state is exited and to which macrostate the system transitions. Assuming the original system has a steady state, the empirical dynamics constructed here capture this steady state macro-state distribution; however, accuracy of transient dynamics suffers, and the coarsened system enters the steady state faster than the original system. Example 1.5 We illustrate and evaluate the quality of the coarsened trajectories with respect to the original ones on the SIRS example. In particular, we examine 12 the probability distribution over the macro-states at different times in the evolution of the system. The macro-state distribution has been estimated empirically by sampling trajectories using the Gillespie algorithm for the fine system, and our coarse simulation scheme for the coarsened system. We have then constructed histograms to capture the distribution of the categorical random variables that represent the macro-state. Finally, we measure the histogram distance between histograms obtained from the fine and the coarse systems. Figure 5 depicts the evolution of the macro-state histograms over time. cluster Fine system cluster distribution 10 9 8 7 6 5 4 3 2 1 0.6 0.4 0.2 20 40 60 80 100 120 140 0 time cluster Coarse system cluster distribution 10 9 8 7 6 5 4 3 2 1 0.6 0.4 0.2 20 40 60 80 100 120 140 0 time Fig. 5. Evolution of the macro-state histograms over time Quality of Approximation In order to put any distance between empirical distributions into context, this has to be compared with the corresponding average self-distance, which is the expected distance value when we compare two samples from the same distribution. In this work, we estimate the self-distance using the result of [8]: given N samples and K bins in the p histogram, an upper bound for the average histogram self-distance is given by (4K)/(πN ). In our example, we have K = 10 histogram bins, which are as many as the macro-states. In practice, a distance value smaller than the self-distance implies that the distributions compared are virtually identical for a given number of samples. In Figure 6, we see the estimated distances for N = 10000 simulation runs for times t ∈ [0, 150]. It can be seen that the steady-state behaviour of the system is captured accurately, as the majority of the distances recorded after time t = 60 lie below the self-distance threshold. However, the transient behaviour of the system is not captured as accurately. Upon a more careful inspection of the shape of the histograms in Figure 5, we see that the coarsened system simply converges more quickly to steady-state. To conclude, we think that the the approximation 13 quality of the steady-state dynamics is a promising result, but a more accurate approximation of the transient behaviour is subject of future work. 0.25 Estimated distance Upper bound for average self−distance Distance 0.2 0.15 0.1 0.05 0 0 50 100 150 Time Fig. 6. Evolution of the macro-state histogram distances over time Computational Savings State-space coarsening results in a more efficient simulation process, since the coarse system is characterised by lower complexity as opposed to the fine system. We demonstrate these computational savings empirically in terms of the average number of state transitions invoked during simulation. More specifically, we consider a sample of 5000 trajectories of the fine and the coarse system. We have recorded 320 ± 25 initial state transitions on average in each trajectory of the fine system, compared to 56±31 macro-state transitions in trajectories of the coarsened system. The number of transitions in the coarse system is an order of magnitude lower than in the fine one, owing to the reduction of states in the system from a total of 5151 to 10 (the number of macro-states). Clearly, our procedure, particularly the GP imputation, incurs some computational overheads. Table 1 presents the computational savings of using GPs to estimate satisfaction probability distributions for most states, instead of exhaustively exploring the state-space. All simulations were performed using a Gillespie algorithm implementation, taking 1000 trajectories starting at each examined state, running on 10 cores. Sample size GP & MDS time (s) Simulation time (s) Total time (s) 100% 50% 40% 30% 20% 10% 1616* 1133 884 595 354 170 6900 3450 2760 2070 1380 690 8516 4583 3644 2665 1734 860 Percentage of exhaustive total time (Total time/8516s) 100% 54% 43% 31% 20% 10% * No GP was performed here, just the MDS. Table 1. Real running times for simulations of varying sample size (percentage of state-space) and GP estimation of remaining states. 14 4 Discussion We presented a novel approach to the coarsening of a CTMC, in order to gain a stochastic process with a much smaller state-space. Unlike previous approaches to CTMC aggregation, which are based on structural properties of the statespace, our approach is based on property satisfaction, allowing the coarse-grained system to focus on abstracting the dynamics in terms of aspects of behaviour that are important in the modelling study. The further steps are to identify key clusters of states in property space, or a lower-dimensional representation of it, and approximate the transition dynamics between them. For example, this approach might be used within multi-scale modelling to reduce the state-space of a lower level model before embedding in a higher-level representation. Common aggregation techniques, such as exact or approximate lumpability, often impose stringent conditions on the symmetries and transition rates within the original state-space. Moreover, the macro-states produced can be difficult to interpret when the reduction is applied directly at the state-space level (i.e. without a corresponding bisimulation over transition labels). In contrast, the propertybased approach allows macro-states to be defined by high-level behaviour, rather than them emerging from an algorithm applied to low-level structure. The GP regression we employed for estimating satisfaction probability of properties for out-of-sample states proved quite accurate; simulation estimates for 10% of the states were sufficient to reconstruct the state distribution in the space defined by the probability of property satisfaction, φ-space, without substantial loss of structure. Therefore, the proposed approach may be helpful in effectively understanding the behavioural structure of large and complex Markovian systems, with implications for design and verification. Initial experiments on a simple system show that our approach can be practically deployed, with considerable computational savings. The approach induces coarsened dynamics which empirically match the original system’s dynamics in terms of steady-state behaviour. However, the recovery of transient coarse-grained dynamics poses more of a challenge and this will provide a focus for future work. In particular, we will seek to explore the possibility of quantifying the information lost through the coarsening approach, at least asymptotically, for systems which admit a steady state. Exploring the scalability of the approach on more complex, higher dimensional examples will also be an important priority. In general, we expect our approach to be beneficial when simulation costs dominate the overheads incurred by the GP regression approach. This condition will be mostly met for systems with moderately large state spaces but complex (e.g. stiff) dynamics. For extremely large state spaces, the cubic complexity (in the number of retained states) of GP regression may force users to adopt excessively sparse sub-sampling schemes, and it may be preferable to replace the GP regression step with alternative schemes with better scalability. Exploration of these computational trade-offs would likely prove insightful for the methodology. 15 References 1. A. Abate, L. Brim, M. Ceska, and M. Z. Kwiatkowska. Adaptive aggregation of Markov chains: Quantitative analysis of chemical reaction networks. In Proc. of CAV, pages 195–213, 2015. 2. Y. Bengio, J.-F. Paiement, P. Vincent, O. Delalleau, N. Le Roux, and M. Ouimet. Out-of-sample extensions for lle, isomap, mds, eigenmaps, and spectral clustering. In Proc. of NIPS, pages 177–184, 2004. 3. C. M. Bishop. Pattern Recognition and Machine Learning. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2006. 4. I. Borg and P. Groenen. Modern Multidimensional Scaling: Theory and Applications. Springer, 2005. 5. L. Bortolussi, D. Milios, and G. Sanguinetti. Efficient stochastic simulation of systems with multiple time scales via statistical abstraction. In Proc. of CMSB, pages 40–51, 2015. 6. L. Bortolussi, D. Milios, and G. Sanguinetti. Smoothed model checking for uncertain continuous-time Markov chains. Inf. Comput., pages 235–253, 2016. 7. P. Buchholz and J. Kriege. Approximate aggregation of Markovian models using alternating least squares. Perform. Eval., 73:73–90, 2014. 8. Y. Cao and L. Petzold. Accuracy limitations and the measurement of errors in the stochastic simulation of chemically reacting systems. J. Comput. Phys., 212(1):6– 24, 2006. 9. F. Ciocchetta and J. Hillston. Bio-PEPA: A framework for the modelling and analysis of biological systems. Theor. Comput. Sci., 410(33):3065–3084, 2009. 10. V. Danos, J. Feret, W. Fontana, R. Harmer, and J. Krivine. Rule-based modelling of cellular signalling. In In Proc. of CONCUR, pages 17–41, 2007. 11. K. Deng, P. G. Mehta, and S. P. Meyn. Optimal Kullback-Leibler aggregation via spectral theory of Markov chains. Automatic Control, IEEE Transactions on, 56(12):2793–2808, 2011. 12. A. Donzé and O. Maler. Robust satisfaction of temporal logic over real-valued signals. Springer, 2010. 13. D. Gillespie. Exact stochastic simulation of coupled chemical reactions. J. Phys. Chem., 81(25), 1977. 14. S. K. Jha, E. M. Clarke, C. J. Langmead, A. Legay, A. Platzer, and P. Zuliani. A Bayesian approach to model checking biological systems. In Proc. of CMSB, pages 218–234, 2009. 15. M. Kwiatkowska, G. Norman, and D. Parker. PRISM 4.0: Verification of probabilistic real-time systems. In Proc. of CAV, pages 585–591, 2011. 16. O. Maler and D. Nickovic. Monitoring temporal properties of continuous signals. In Proc. of FORMATS, pages 152–166, 2004. 17. D. Milios and S. Gilmore. Component aggregation for pepa models: An approach based on approximate strong equivalence. Perform. Eval., 94:43–71, 2015. 18. C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. 19. M. Tschaikowski and M. Tribastone. A unified framework for differential aggregations in Markovian process algebra. J. Log. Algebr. Meth. Program., 84(2):238–258, 2015. 20. H. L. S. Younes and R. G. Simmons. Statistical probabilistic model checking with a focus on time-bounded properties. Inf. Comput., 204(9):1368–1409, 2006. 16
3cs.SY
Inverse Modeling of Climate Responses of Monumental Buildings R.P. Kramer, A.W.M. van Schijndel & H.L. Schellen Eindhoven University of Technology ABSTRACT The indoor climate conditions of monumental buildings are very important for the conservation of these objects. Simplified models with physical meaning are desired that are capable of simulating temperature and relative humidity. In this paper we research state-space models as methodology for the inverse modeling of climate responses of unheated monumental buildings. It is concluded that this approach is very promising for obtaining physical models and parameters of indoor climate responses. Furthermore state space models can be simulated very efficiently: the simulation duration time of a 100 year hourly based period take less than a second on an ordinary computer. INTRODUCTION Effects of climate change on ecosystems and on the global economy have been researched intensively during the past decades but almost nothing is known about the influence to our cultural heritage. Although these historical monuments are exposed to extensive loads caused by stampedes of visitors, there are many other factors deteriorating World Heritage Sites. The impacts of climate change are a longterm and substantial menace to the sites. Lots of monumental buildings are used as museum or storage for paintworks, books and artefacts. The indoor climate conditions of monumental buildings are very important for the conservation of these objects (ASHRAE, 2007). The influence of the changing climate on the indoor climate of monumental buildings is unknown. It is impossible to prepare adequately for the future, by anticipating on this change and adapting the installations, because of this lack of knowledge (CIBSE, 2005). The result is that the conservation of the buildings and the collections are at risk. Furthermore, the worldwide energy problem also affects these monumental buildings. Due to the ancient building techniques used, which result in huge transmission and infiltration losses, the energy consumption of these buildings is high. Three problems can be identified with respect to the current research methods: Firstly, due to the long simulation period (hundred years with time step 1h), combined with detailed physical models, the simulation run time is long. Secondly, the detailed modeling of the buildings itself requires much effort: the monumental buildings are old and protected. Therefore, blueprints are hard to find and; destructive methods to obtain building material properties are not allowed. Thirdly, the used modeling approach does neither facilitate in an easy characterization of the building nor in an easy characterization of the energy performance. A simplified model with physical meaning is desired which is capable of simulating both temperature and relative humidity. The objective is the successful application of inverse modeling on a simplified thermal and hygric building model, in order to determine the parameters with physical meaning. The simplified model is needed for the prediction of the indoor temperature and the indoor relative humidity and for characterization of the building parameters and the energy performance. The paper is organised as follows. We start with a literature study on simplified models. The methodology of the inverse modeling development for climate responses is presented and applied for a group of four unheated monumental buildings in The Netherlands and Belgium. The approach is evaluated and conclusions are drawn. Inverse Modeling of Climate Responses of Monumental Buildings Page 1 of 12 LITERATURE Due to the increase of computational power, the attention for simplified models has decreased. However, through the years it became clear that simplified models have benefits over complex models (Wang & Chen, 2001), (Mathews, et al., 1994): user friendliness, straight forward, fast calculation. The response factor method and lumped capacitance method are suitable for simplified modeling. More recently, linear parametric models and neural network models are used for simplified models. Neural network models, e.g. (Mustafaraj, et al., 2011), can be classified as black box models. The parameters have no direct physical meaning, but the output is generated by the hidden layers (black box) from the input. Some models are referred to as gray box models. An example in the field of simplified building models is the use of linear parametric models (Mustafaraj, et al., 2010).The linear model itself is a black box model, but the parameters can be determined using physical data (Jimenez, et al., 2008). Some researchers stress out the importance of simplified models with physical meaning (Kopecký, 2011), so called white box models. The lumped capacitance model can be classified as a white box model. Another advantage of this approach is the representation of building elements using R (resistance) and C (capacitance), according to the electrical analogy, which makes a graphical representation of the model possible. Most of the simplified building models are based on this approach. There are three approaches to create a simplified model: (1) Create a detailed comprehensive model from known building properties and perform afterwards a model order reduction technique, e.g. (Gouda, et al., 2002); (2) Create directly a simplified model from building properties, e.g. (Nielsen, 2005); (3) Create a simplified model and identify the parameter values with an inverse modeling technique (Balan, et al., 2011). Technique 1 is obviously the most labor intensive: building a detailed model and simplifying it afterwards. Detailed construction properties need to be available together with a methodology for simplifying an existing model. The lumped capacitance model can be used for this model order reduction (Mathews, et al., 1994) and neural network models can be used to filter out unimportant parameters (Mustafaraj, et al., 2011), called pruning. Technique 2 is faster, but a validated methodology should be known how to identify the parameters. Therefore, it is difficult to achieve good results with this technique. (Fraisse, et al., 2002) has demonstrated a methodology how to incorporate multiple walls into one single order model. Technique 3 is not labor intensive and identification of the model parameters is done by an optimization algorithm. This technique can be used with the lumped capacitance model (Wang & Xu, 2006), neural network model, e.g. (Mustafaraj, et al., 2011), and linear parametric model, e.g. (Moreno, et al., 2007). Technique 3 is used for the work in this paper. INVERSE MODEL DEVELOPMENT FOR CLIMATE RESPONSES A linear model is often sufficient to accurately describe the system dynamics and, in most cases, one should first try to fit linear models (Ljung, 1999). State Space models are Linear Time Invariant (LTI) models. State Space models are models that use state variables to describe the system dynamics by a set of first order differential equations. To understand the concept of State Space, think of the system as spanning a space where the axes (i.e. dimensions, i.e. orders) represent the state variables. Even if some of the systems differential equations are higher order, they should be converted to multiple first order equations. The state of the system can be represented as a vector within that space. The system of first order differential equations can be represented according to: Inverse Modeling of Climate Responses of Monumental Buildings Page 2 of 12 𝒙̇ (𝑡) = 𝑨𝒙(𝑡) + 𝑩𝒖(𝑡) 𝒚(𝑡) = 𝑪𝒙(𝑡) + 𝑫𝒖(𝑡) The first part of equation (1) is known as state equation where x(t) is the state vector and u(t) is the input vector. The second equation is referred to as the output equation. A is the state matrix, B is the input matrix, C the output matrix and D the direct transition matrix. The main advantage is that the calculation speed is very high, especially compared to solving the differential equations. To show this advantage, a first order RC-network is simulated as a State Space model and with the ode23 routine for different simulation periods. The results are shown in Table 1. Table 1: calculation time of State-Space and ode23 for different periods. 1month 1 year 10 year 100 year time [s] time [s] time [s] time [s] ODE23 5 89 State-Space 0.016 0.016 0.050 0.45 The results show the huge advantage of the State Space model regarding simulation time. While the simulation time increases almost linearly when using the ode23 routine to solve the differential equation, the simulation time of the State Space model is less predictable. However, especially if the task requires a repeated simulation for a long period, e.g. hundred years, the State Space model has a very limited calculation time of half a second on an ordinary computer. We proceed with the thermal and hygric modeling. Due to space limitation we summarize the work of Kramer (2012). He investigated several thermal models including solar irradiation. Also several hygric models have been developed and tested. In this paper we present the optimal models according to Kramer (2012). The thermal model is shown in Figure 1. There are thermal capacitances for the interior (Cint), indoor air (Ci) and envelope (Cw). The sun irradiation is connected to Cint (interior) and Ci (indoor air). Thermal resistances represent ventilation (1/Gfast), wall to external air (1/Gw), wall to indoor air (1/Gi) and indoor air to interior constructions (1/Gint). Figure 1. The thermal network The ODEs are, Inverse Modeling of Climate Responses of Monumental Buildings Page 3 of 12 𝑑𝑇𝑤 = 𝐺𝑤 (𝑇𝑒 − 𝑇𝑤 ) − 𝐺𝑖 (𝑇𝑤 − 𝑇𝑖 ) 𝑑𝑡 𝑑𝑇𝑖 ���⃗ • ������������⃗ 𝐶𝑖 = 𝐺𝑖 (𝑇𝑤 − 𝑇𝑖 ) − 𝐺𝑓 �𝑇𝑖 − 𝑇𝑓 � − 𝐺𝑖𝑛𝑡 (𝑇𝑖 − 𝑇𝑖𝑛𝑡 ) + 𝐺𝑓𝑎𝑠𝑡 (𝑇𝑒 − 𝑇𝑖 ) + 𝑓𝐼 𝐼𝑟𝑟𝑎𝑑 (𝑏) 𝑑𝑡 𝑑𝑇𝑖𝑛𝑡 ���⃗ • �����������⃗ 𝐶𝑖𝑛𝑡 = 𝐺𝑖𝑛𝑡 (𝑇𝑖 − 𝑇𝑖𝑛𝑡 ) + 𝑓𝐼 𝐼𝑟𝑟𝑎𝑑(𝑎) 𝑑𝑡 𝐶𝑤 The State Space matrices are, −𝐺𝑤 −𝐺𝑖 𝐺𝑖 ⎡ 0 ⎤ 𝐶𝑤 ⎢ 𝐶𝑤 ⎥ −𝐺𝑖 −𝐺𝑓 −𝐺𝑖𝑛𝑡 − 𝐺𝑓𝑎𝑠𝑡 𝐺𝑖𝑛𝑡 ⎥ ⎢ 𝐺𝑖 𝐴=⎢ 𝐶𝑖 𝐶𝑖 𝐶𝑖 ⎥ ⎢ ⎥ 𝐺𝑖𝑛𝑡 −𝐺𝑖𝑛𝑡 ⎥ ⎢ 0 ⎣ 𝐶𝑖𝑛𝑡 𝐶𝑖𝑛𝑡 ⎦ 𝐺𝑤 ⎡ 0 0 0 0 0⎤ ⎢ 𝐶𝑤 ⎥ 𝐺𝑓 ⎥ 𝑓𝐼1 𝑓𝐼2 𝑓𝐼3 𝑓𝐼4 𝐵 = ⎢𝐺𝑓𝑎𝑠𝑡 ⎢ ⎥ 𝐶𝑖 𝐶𝑖 𝐶𝑖 𝐶𝑖 𝐶𝑖 ⎥ ⎢ 𝐶𝑖 ⎣ 0 0 0 0 0 0⎦ 0 𝐶=� 0 0 0 1 0 0 0 𝐷=� 0 0 � 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 � 0 The hygric model is shown in Figure 2. The hygric capacitances and resistances represent are analog to the thermal network, but now for vapour pressures instead of temperatures. Figure 2. The hygric model The ODEs are 𝑑𝑃𝑤 = 𝐺𝑤 (𝑃𝑒 − 𝑃𝑤 ) − 𝐺𝑖 (𝑃𝑤 − 𝑃𝑖 ) 𝑑𝑡 𝑑𝑃𝑖 𝐶𝑖 = 𝐺𝑖 (𝑃𝑤 − 𝑃𝑖 ) + 𝐺𝑓𝑎𝑠𝑡 (𝑃𝑒 − 𝑃𝑖 ) 𝑑𝑡 𝐶𝑤 Inverse Modeling of Climate Responses of Monumental Buildings Page 4 of 12 The State Space matrices are, −𝐺𝑤 −𝐺𝑖 𝐶𝑤 𝐺𝑖 𝐶𝑖 ⎡ 𝐴=⎢ ⎢ ⎣ 𝐺𝑖 𝐺𝑤 ⎤ ⎡ ⎤ 𝐶𝑤 ⎥ 𝐵 = ⎢ 𝐶𝑤 ⎥ 𝐶 = � 0 −𝐺𝑖 −𝐺𝑓𝑎𝑠𝑡 ⎥ 0 ⎢ 𝐺𝑓𝑎𝑠𝑡 ⎥ 𝐶𝑖 ⎦ ⎣ 𝐶𝑖 ⎦ 0 0 �𝐷 = � � 1 0 This completes the modeling part. We proceed with the inverse modeling methodology. Inverse modeling is the inverse of traditional modeling. In traditional modeling, the system is known and the output is unknown. By modeling the system, the output can be simulated. In inverse modeling, the output is known (e.g. measured), but little is known about the system. The objective is to identify the parameter values of the model by repeatedly trying different parameter values and comparing the simulated output with the measured output. The goal is to minimize the simulation error, formulated as an objective function (e.g. summed squared error). The process of finding the parameter set which minimizes the objective function is called optimization. If the solution space includes multiple minima, the goal is to find the global minimum, called global optimization. These solvers are all very different, each having its advantages and disadvantages. One important aspect is whether a solver is gradient based or gradient free. Gradient based solvers are the most efficient in finding quickly a minimum. However, the solution space should be smooth and continuous. If not, the solver fails. The second aspect is whether the solver handles constraints or it is only intended for unconstrained problems. The inverse problem in this research is a typical example of a constrained problem, since all variables are not allowed to be negative. Moreover, constraining the problem helps in finding the global minimum since it scales down the solution space. The third aspect is whether a solver is deterministic or stochastic: all solvers are deterministic except for the Genetic Algorithm. To maximize the speed of the optimization process, all calculations which do not need to be repeated are executed in the initialization step: preparing climate data, include measured data, set constraints, set initial values and assign a function handle for the optimization algorithm. Then the optimization algorithm determines the parameter set, the first time it’s the initial value vector, and passes the parameter set to the function file: the function file includes the model and simulates the model with the given parameter set and calculates the objective function by comparing the simulated output with the measured data. The objective function is passed to the Global Optimization Algorithm which calculates the new parameter set which is likely to minimize the objective function. RESULTS FOR A GROUP OF UNHEATED MONUMENTAL BUILDINGS An important validation method is the performance assessment of the developed models on multiple other buildings: By fitting both the thermal and hygric model to these buildings, their general performance is tested. General applicability is an important aspect in this study. Moreover, it is important to chose a strategic set of buildings and rooms to gain maximum added value of this validation method: included in the set of buildings are (i) Room which is surrounded by a water canal; (ii) Room with much thermal mass and hygric mass (iii) Room with significant sun irradiation (iv) Room with sun irradiation on roof, but no windows (v) Rooms with Inverse Modeling of Climate Responses of Monumental Buildings Page 5 of 12 ground contact and no sun irradiation. The physical aspects of the buildings and rooms and the argumentation why they are included, is explained in the next Section. The performance per room is visualized in graphs and explained in word. The performance of the rooms is compared by three performance criteria (MSE, MAE & Goodness of Fit) at the end of the section. Figure 3 presents the monumental buildings involved in the study. Figure 3. The Monumental buildings involved in this study. Top Left: Castle of Amerongen, Top Right: Castle of Gaasbeek, Bottom Left: Castle Keukenhof, Bottom Right: St. Baafs Cathedral Castle of Amerongen: Washing room The washing room is situated in the basement of the castle of Amerongen. The castle is surrounded by a canal: the external walls of the washing room are in direct contact with water. Moreover, the basement has been flooded multiple times. The performance of the thermal model is shown in Figure 4 (top). The model performs good over the seasons resulting in a good fit. The detail at the right side of the figure shows that the delicate fluctuations of the measured signal are not reproduced by the model, which is a good thing: the sensors have an accuracy of ± 0.5°C meaning that the observed fluctuations are cover by the uncertainty of the measurement. The reason of these delicate fluctuations is unclear and considered to be unimportant for the performance assessment of the model. The performance of hygric model 3 is shown in Figure 4 (bottom). There seems to be a problem analogous to the thermal model which has been observed earlier: the signal lies locally above, but mostly below the measured signal. The result is that the model can’t be fitted accurately. A new parameter is introduced for the hygric model, which is analogous to the thermal model: a node with a fixed vapour pressure. The performance of this hygric model with fixed vapour pressure is shown in Figure 4 (middle). The fixed vapour pressure Inverse Modeling of Climate Responses of Monumental Buildings Page 6 of 12 improves the fit significantly. The necessity of such a fixed vapour pressure suggest the existence of a vapour source. Physically, the external wall which is connected to a canal is analogous to the thermal situation with ground contact. Figure 4. The thermal model (top), hygric model with additional fixed vapour pressure node in model (middle) and hygric model without fixed pressure (bottom) fitted to washing room (This figure relies on color see digital version of the paper). Castle of Gaasbeek - Scockaert chamber The Scockaert chamber is situated at the second floor in the castle of Gaasbeek (Belgium). It has windows which allow a significant amount of sun irradiation into the room. The room is richly decorated with antique furniture which adds to the thermal, and mostly, the hygric capacity. The difficulty here: the irregular disturbances by visitors. Because this effect can’t be captured by a linear time invariant model, the Scockaert chamber is a good candidate for the models performance assessment. The result of the thermal model is shown in Figure 5 (top). The overall performance is good, but incidentally, some measured peaks are observed which are not reproduced by the model. These peaks might be a result of internal heat sources like visitors. The result of the hygric model (with fixed vapour pressure node) is shown in Figure 6 (bottom). The same observation holds as for the thermal result. The overall performance is good, but identical series of peaks are not reproduced. These peaks are due to inputs which are not included, e.g. moisture production by visitors. Inverse Modeling of Climate Responses of Monumental Buildings Page 7 of 12 Figure 5. The thermal model (top) and hygric model with additional fixed vapour pressure node (bottom) fitted to Scockaert chamber (This figure relies on color see digital version of the paper). Castle of Gaasbeek - Gothic chamber The Gothic chamber is also situated at the second floor of the castle of Gaasbeek. The room is decorated richly with much furniture and decorations which contribute to the thermal, but mostly hygric capacity. Also this room is frequently visited by tourists. The performance of the thermal model is shown in Figure 6 (top). The incidental peaks are less intense compared to those in the Scockaert chamber, but are still visible. The detail at the right side of the figure shows that the model reproduces the measured signal accurately. The delicate quick fluctuations which are present in the measurements of the washing room are totally absent in the measurements of the Gothic chamber. Figure 6. The thermal model (top) and hygric model with additional fixed vapour pressure node (bottom) fitted to Gothic chamber (This figure relies on color see digital version of the paper). Inverse Modeling of Climate Responses of Monumental Buildings Page 8 of 12 The hygric model performance is shown in Figure 6 (bottom). The overall performance is good, but small disturbances which are not reproduced are probably due to time-variant phenomena. At least, the phenomena which could change over the seasons turn out to be no source of error: think of possible use of sun blinds in summer. Castle Keukenhof - the loft The castle Keukenhof is situated a few kilometers from the Dutch coast. Therefore the building is exposed to a sea climate. The observed room is the loft which is situated directly underneath the roof. This room is specifically interesting because the overheating risk during summer. This situation will be a real test for the model since the influence of sun irradiation is significantly present, but windows are absent. The thermal model performance is visualized in Figure 7(top). The risk of overheating is clearly present and is reproduced good by the model. Although the sun irradiation is modeled by 4 input signals, each representing the sun irradiation on a vertical wall oriented respectively to the north, east, south and west, the sun irradiation on the roof and the resulting heat flux to the loft is simulated correctly. This significant heat flux resulting from sun irradiation results in an indoor temperature of reaching 35°C in summer. The detail at the right side of the figure shows how accurate the models output has been fitted to the measured temperature. The performance assessment of the hygric model is shown in Figure 7 (bottom). The hygric reproducibility is poor. Besides the indoor temperature, also the indoor moisture content (or vapour pressure) fluctuates heavily. These fluctuations good not be reproduced with the only given input of the outdoor vapour pressure. This casus is interesting for a follow-up research. Figure 7. thermal model (top) and hygric model with additional fixed vapour pressure node (bottom) fitted to Keukenhof-Loft (This figure relies on color see digital version of the paper). St. Baafs cathedral – South transept The St. Baafs cathedral is situated in Gent (Belgium). The building consists of several parts, e.g. the choir, the entrance, the transepts. Most of the parts are openly connected. The building is totally free floating and has huge thermal mass and hygric mass. Inverse Modeling of Climate Responses of Monumental Buildings Page 9 of 12 The measurements to which the model has been fitted are performed by a sensor in the south transept. The south transept includes a huge window with colored glass which is oriented to the south resulting in a significant amount of incoming sun irradiation. The performance of the thermal model is shown in Figure 8 (top). The measured indoor temperature is reproduced very accurately, also visualized clearly in the detailed graph on the right side. Although there are visitors, the influence on the indoor climate seems to be small due to the large dimensions of the cathedral. The performance of hygric model is shown in Figure 8 (bottom). The measured signal is reproduced perfectly by the model. The same holds for the hygric part: although there are visitors, they hardly influence the indoor moisture content due to the vast space in the cathedral. Moreover, the quality of the measurements are high without signal noise. Figure 8. The thermal model(top) and hygric model with additional fixed vapour pressure node (bottom) fitted to St. Baafs cathedral-South transept (This figure relies on color see digital version of the paper). ASSESMENT OF THE METHODOLOGY This section deals with the performance assessment of the models and the used methods. The performance of the models relates to two things: i) how accurately can the measured signal be reproduced ii) how accurately can the parameters be identified (in validation section) This implies a contradiction. Usually, the rule holds that a higher order model with more parameters yields a higher accuracy. On the other hand, more parameters result in a higher uncertainty in parameter identification (Ljung, 1999). To be able to compare and rate how accurately the different models can reproduce a measured temperature or vapour pressure, three performance criteria are used: the MSE (Mean Squared Error), MAE (Mean Absolute Error) and FIT (goodness of FIT). The MSE is calculated according to, 𝑁 1 𝑀𝑆𝐸 = �(𝑦 ′ − 𝑦)2 𝑁 𝑘=1 where 𝑦 ′ is the measured signal and 𝑦 is the simulated signal. Inverse Modeling of Climate Responses of Monumental Buildings Page 10 of 12 The MAE is calculated according to, 𝑁 1 𝑀𝐴𝐸 = �|𝑦 ′ − 𝑦| 𝑁 𝑘=1 The Goodness of Fit is calculated according to, 𝐹𝐼𝑇 = 100 ∙ �1 − 𝑛𝑜𝑟𝑚(𝑦 ′ − 𝑦) � 𝑛𝑜𝑟𝑚(𝑦 ′ − 𝑦�′) 𝑛𝑜𝑟𝑚(𝑦) is the Euclidean length of the vector 𝑦, also known as the magnitude. The above equation therefore calculates in the numerator the magnitude of the error between measured and simulated signal. This is divided by the denominator, calculating how much the measured signal fluctuates around its mean. Consequently, the Goodness of Fit criterion is robust with respect to the fluctuation level of the signal. All three are used independently in several studies, e.g. (Boaventura Cunha, et al., 1997) (Crabb, et al., 1987) (Frausto, et al., 2003). However, (Mustafaraj, et al., 2010) stresses the strength of using the three together. For example, the MSE gives more weight to bigger errors. Consequently, it is a good criterion to express the amount of big errors. The MAE expresses the overall mean error. Table 2. results of fit summarized in three performance criteria (MSE, MAE & FIT). thermal model 4a hygric model 3 MSE MAE FIT MSE MAE FIT 2 2 building room [°C ] [°C] [%] [Pa ] [Pa] [%] washing room* 4938 58 72 Amerongen 0.09 0.24 91 washing room 2468 39 81 Scockaert 1.03 0.73 84 5369 57 77 Gaasbeek chamber Gothic chamber 0.66 0.59 87 5316 56 78 Keukenhof loft 1.33 0.88 84 23785 113 58 south transept 0.17 0.32 91 St. Baafs south 1870 32 86 cathedral 0.74 0.69 81 transept** dungeon of pain 0.30 0.41 87 3686 47 84 museum iron chamber 0.10 0.26 82 462 18 85 Gevangenknight chamber 0.34 0.45 88 3710 47 84 poort stock loft 1.41 0.96 81 6954 65 78 *model without node for fixed vapour pressure **no solar input CONCLUSIONS It is concluded that this approach is very promising for obtaining physical models and parameters of indoor climate responses. Furthermore by using state space models, the simulation duration time of a 100 year hourly based period take less than a second on an ordinary computer. Inverse Modeling of Climate Responses of Monumental Buildings Page 11 of 12 REFERENCES ASHRAE, 2007. Museums, Archives and Libraries. In: ASHRAE handbook Heating, Ventilation and Air Conditioning applications. SI edition ed. s.l.:American Society of Heating Refrigaration and AirConditioning Engineers, pp. 21.1-21.23. Balan, R. et al., 2011. Parameter identification and model based predictive control of temperature inside a house. Energy and Buildings, Volume 43, pp. 748-758. Boaventura Cunha, B., Couto, C. & Ruano, A., 1997. Real time estimation of dynamic temperature models for greenhouse environment control. Control Engineering Practice, 5(10), p. 1473–1481. CIBSE, T., 2005. Climate change and the indoor environment impacts and adaption. s.l.:s.n. Crabb, J., Murdoch, N. & Pennman, J., 1987. A simplified thermal response model. Building Services Engineering Research and Technology, Volume 8, pp. 13-19. de Wit, M., 2006. Heat Air and Moisture model for building and systems evaluation. Bouwstenen, Volume 100, p. 100 pages. de Wit, M. & Driessen, H., 1998. ELAN: a computer model for building energy design. Building and Environment, Volume 23, pp. 285-289. Fraisse, G., Viardot, C., Lafabrie, O. & Achard, G., 2002. Development of a simplified and accurate building model based on electrical analogy. Energy and Buildings, Volume 34, pp. 1017-1031. Frausto, H., Pieters, J. & Deltour, J., 2003. Modelling greenhouse temperature by means of auto regressive models. Biosystems Engineering, 84(2), p. 147–157. Gouda, M., Danaher, S. & Underwood, C., 2002. Building thermal model reduction using nonlinear constrained optimization. Building and Environment, Volume 37, pp. 1255-1265. Jimenez, M., Madsen, H. & Andersen, K., 2008. Identification of the main thermal characteristics of building components using Matlab. Building and Environment, Volume 43, pp. 170-180. Kramer, R.P., 2012. The application of inverse modeling for the prediction and characterization of indoor climates and energy performances, MSc Report, Eindhoven University of Technology Kopecký, P., 2011. Experimental validation of two simplified thermal zone models. Tampere (Finland), s.n. Ljung, L., 1999. System Identification: Theory for the User. 2nd edition ed. Upper Saddle River(New York): Prentice-Hall. Mathews, E., Richards, P. & Lombard, C., 1994. A first-order thermal model for building design. Energy and Buildings, Volume 21, pp. 133-145. Moreno, G. et al., 2007. Modelling temperature in intelligent buildings by means of autoregressive models. Automation in Construction, 16(5), p. 713–722. Mustafaraj, G., Chen, J. & Lowry, G., 2010. Development of room temperature and relative humidity linear parametric models for an open office using BMS data. Energy and Buildings, Volume 42, pp. 348-356. Mustafaraj, G., Lowry, G. & Chen, J., 2011. Prediction of room temperature and relative humidity by autoregressive linear and nonlinear neural network models for an open office. Energy and Buildings, Volume 43, pp. 1452-1460. Nielsen, T., 2005. Simple tool to evaluate energy demand and indoor environment in the early stages of building design. Solar Energy, Volume 78, pp. 73-83. van Schijndel, A., 2007. Integrated heat air and moisture modeling and simulation, Eindhoven: s.n. van Schijndel, A., 2009. The exploration of an inversed modeling technique to obtain material properties of a building construction. Istanbul, s.n., pp. 91-98. van Schijndel, A. & Schellen, H., 2011. Inverse modeling of the indoor climate using a 2-state 5parameters model in Matlab. Visby, s.n., pp. 1-12. van Schijndel, A., Schellen, H., Martens, M. & van Aarle, M., 2010. Modeling the effect of climate change in historic buildings at several scale levels. Eindhoven, s.n., pp. 161-180. Wang, S. & Chen, Y., 2001. A novel and simple building load calculation model for building and system dynamic simulation. Applied Thermal Engineering, Volume 21, pp. 683-702. Wang, S. & Xu, X., 2006. Parameter estimation of internal thermal mass of building dynamic models using genetic algorithm. Energy Conversion and Management, Volume 47, pp. 1927-1941. Wang, S. & Xu, X., 2006. Simplified building model for transient thermal performance estimation using GA-based parameter identification. International Journal of Thermal Sciences, Volume 45, pp. 419432. Inverse Modeling of Climate Responses of Monumental Buildings Page 12 of 12
5cs.CE
A family of OWA operators based on Faulhaber’s formulas arXiv:1801.10545v1 [cs.AI] 31 Jan 2018 O.G. Duartea,∗, S.M. Télleza,∗∗ a Universidad Nacional de Colombia, Facultad de Ingeniería, Bogotá, Colombia Abstract In this paper we develop a new family of Ordered Weighted Averaging (OWA) operators. Weight vector is obtained from a desired orness of the operator. Using Faulhaber’s formulas we obtain direct and simple expressions for the weight vector without any iteration loop. With the exception of one weight, the remaining follow a straight line relation. As a result, a fast and robust algorithm is developed. The resulting weight vector is suboptimal according with the Maximum Entropy criterion, but it is very close to the optimal. Comparisons are done with other procedures. Keywords: Data fussion, Aggregation operators, Ordered Weighted Averaging 1. Introduction Ordered Weighted Averaging (OWA) operators are well known aggregation operators [1] that have received great attention in recent years. Although OWA operators were proposed by Yager since 1988 [3], a great amount of research arises since 2008. [9] provides a collection of recent developments around OWA operators. A systematic review of literature about OWA is done in [2]; it reveals some great research lines, one of them is to solve the weight vector determination problem. Another wide area of research deals with generalizations to fuzzy set theory. The weight vector determines the way in which the OWA operator aggregates information. For some applications we need to adjust the behaivor of the OWA operator to resemble the Minimum or Maximum operators. Those operators are numerical implementations of logical operators AN D and OR. To handle that, the orness of the OWA operator was defined by Yager as a measure of how close to the OR operator the OWA is. A common problem is to determine the vector weight of an OWA operator that meets a desired orness. A lot of methods have been proposed to solve this problem [7]. In this paper we propose another one. Our method is fast, robust, ∗ Corresponding ∗∗ This author work was partially supported by Colciencias, call number 617 Preprint submitted to Elsevier 1 de febrero de 2018 has good performance and is easy to interpret by non-experts. Some of these features appear in some methods, and other features in others, but our method accomplishes all of them. As an example, consider the exponential method [3]: it is fast and robust, but its performance (measured with the entropy index) is not the best; our method is faster, as robust and performs better than the exponential. As another example, consider the Maximum Entropy method [5], whose performance is optimal, but it is slow and have numerical problems; our method is faster and more robust than it, and its performance is very close to the optimal. The structure of the paper is the following: section 2 summarizes the background about OWA operators. In section 3 we propose a new method to obtain the weight vector of an OWA operator that meets a desired orness. We explore the behaivor and results of the proposed method in section 4. Some conclusions are done in section 5. 2. OWA operators OWA operators are aggregation operators defined by [3, 1]: OW A : Rn → R y = f (x1 , x2 , · · · , xn ) y= Pn i=1 wi x̄i Pn i=1 wi = 1 (1) 0 ≤ wi ≤ 1 ∀i Where x̄i is the i−th element of {x1 , x2 , · · · , xn } previously ordered from highest to lowest. The selection of the weight vector w = {w1 , · · · , wn } stablishes different kind of aggregations; remarkable OWA operators are: Maximum: with w = {1, 0, 0, · · · , 0} Minimum: with w = {0, 0, · · · , 0, 1} Simple average: with w = {1/n, 1/n, · · · , 1/n} 2.1. Orness and entropy Yager define orness(w) and disp(w) (dispersion or entropy) as: n orness(w) = 1 X (n − i)wi n − 1 i=1 disp(w) = − n X wi ln wi (2) (3) i=1 Orness refers to the degree to which the aggregation is like an or operation where as dispersion measures the degree to which w takes into account all information in the aggregation. 2 2.2. Families of OWA operators There are a lot of strategies to compute the weight vector of an OWA operator. An extensive review is found in [7] where they are classified in 5 groups: 1. Optimization methods. The problem is stated as the optimization of a performance index subject to restrictions. Shanon entropy, dispersion, Rényi entropy are some of the indexes used. One of the most remarkable method is the Maximum Entropy method proposed by O’Hagan [8] that was reformulated in [5] in an analytical way. 2. Empirical data methods. This group of methods are usually intended to model the risk attitude of a decision maker: from a set of recorderd decisions we must find the OWA that better reflects them. 3. Regular Increasing Monotone (RIM) quantifier methods. RIMs are lingüistic quantifiers that can be used to guide the selection of the weight vector. 4. The argument dependent methods. These are methods that use the input data vector x as useful information in the weight vetor determination problem. Unlike the classical OWA operators, inputs do not have to be ordered. 5. Preference relation methods. These methods are an extension of the empirical data methods. Empirical data is replaced by a preference matrix provided by the experts. A sixth group of methods can be added. It can be called Shaped based methods, because they use a predefined shape of the weight distribution to solve the problem. Notable methods are the exponential proposed by Yager in [3] and the linear proposed by Lamata in [6]. 3. A family of OWA operators We now address the issue to find the weights of an OWA operator with a desired orness. The operator must aggregate the information of n individual values. We define α ∈ [0, 1] as a variable that equals the desired orness. However, in a more general perspective, α = g(orness) ∈ [0, 1] with g(·) a monotonically increasing function with g(0) = 0 and g(1) = 1. We impose the following restrictions, intended to construct a family whose behaivor is easy to understand: OWA.1 if α = 0.0 the operator must be equivalent to the Mimimum operator. OWA.2 if α = 0.5 the operator must be equivalent to the Simple Average operator. OWA.3 if α = 1.0 the operator must be equivalent to the Maximum operator. 3 OWA.4 operator’s behaivor must be symetrical respect to α = 0.5. In other words, the way in which the operator evolves from Minimum to Simple average when α varies from 0.0 to 0.5 must be the same way in which it evolves from Maximum to Simple Average when α varies from 1.0 to 0.5. Last restriction is easy to acomplish if we define a family for 0 ≤ α ≤ 0.5 and then we use simetry to define the behaivor for 0.5 < α ≤ 1.0. 3.1. And-like operators (0 ≤ α ≤ 0.5) Be α the desired orness, and consider first the case 0 ≤ α ≤ 0.5. The rationale of our proposal is the following: as α varies from 0 to 0.5 the weights must vary from those shown in figure 1(a) to those in figure 1(b). We first vary wn monotonically from 1.0 to 1/n. The amount in which we diminishes wn is distributed into the other weights to keep unchanged the sum of weights. We distribute this amount using an straight line whose parameters are easy to compute, as we show in the following paragraphs. We define f (x) : [0, 0.5] → [0, 1] a monotonically increasing function with f (0) = 0 y f (0.5) = 1. Other conditions for f (x) are developed later. The value of wn must vary from 1 to 1/n when α varies from 0 to 0.5. We use f (·): wn = 1 − ∆ ∆ = f (α)(1 − 1/n) = f (α)(n − 1)/n (4) Under this conditions, the sum of the other weights must be n−1 X i=1 wi = m X wi = ∆ m=n−1 (5) i=1 According with equation 2 the orness is n orness(w) = m 1 X 1 X (n − i)wi = (n − i)wi = α n − 1 i=1 m i=1 (6) We propose a distribution of ∆ following the linear relation: wi = Ki + b i = 1, 2, · · · , m (7) Notice that this proposal is different from the linear proposal of Lamata [6], because we use the linear relation for n − 1 weights and Lamata uses it for all the n weights. Equations 5 and 6 turns into  Pm  i=1 (Ki + b) = ∆ (8)  1 Pm (n − i)(Ki + b) = α i=1 m 4 That can be arranged as    K m n Pm i=1 i− K Pm i=1 b m  i2 + ( Pm i=1 Pm i=1 i+ n− Pm i=1 Pm i=1 b =∆ (9) i) = α We compute the sums using Faulhaber’s formulas m X i= i=1      K m  m(m+1)2 2 m X m(m + 1) 2 − i2 = i=1 m(m+1)(2m+1) 6  b m +  m(m + 1)(2m + 1) 6 + mb K m(m+1) 2 =∆  =α m(m + 1) − m(m+1) 2 (10) And rearrange the terms in order to show explicitly a system of 2 linear equations and 2 unknows  + bm = ∆ K m(m+1)  2 (11)  m+1 + b = α K (m+1)(m+2) 6 2 From 11 we get direct expressions for K and b  ∆n/m−2α   K = 6 m2 −1   b= ∆ m (12) − K (m+1) 2 Using equation 4 we can compute K and b from α and m or n  f (α)−2α (α)−2α  = 6 fn(n−2)  K = 6 m2 −1   b= f (α) m+1 − K (m+1) 2 5 = f (α) n − K n2 (13) 3.2. Selection of f (·) As all weights must be non-negative, lets consider the first weight w1 = K ×1+b K +b ≥0 K+ ∆ m − K m+1 2 K 1−m 2 + ∆ m ≥0 ≥0 K 1−m 2 ∆ ≥ −m 3(1 − m) ∆n/m−2α m2 −1 ∆ ≥ −m n − 2α) − n3 (∆ m ∆ ≥ −m 2mα − n∆ (14) ≥ −n∆/3 2mα ≥ 2n∆/3 3α ≥ ∆n/m 3α ≥ f (α) To ensure that the other weights are also non-negative, we impose the condition K ≥ 0. Directly from equation 13 we get f (α) ≥ 2α. We have found the following restrictions for f (α): 2α ≤ f (α) ≤ 3α (15) If we choose f (α) = 1 − (1 − 2α)β with some 0 ≤ β ≤ 1 (figure 2), those restrictions are satisfied if the slope at 0 is in [2, 3] 2≤ df (α) dα |α=0 ≤3 2 ≤ 2β(1 − 2α)β−1 |α=0 ≤3 2≤ 2β ≤3 1.0 ≤ β ≤ 1.5 (16) Notice that the limit case with β = 1.0 makes f (α) = 2α. It makes K = 0 and b = 1/n meaning that ∆ is homogeneously distributed between w1 , · · · , wn−1 . 6 3.3. Or-like operators (0.5 ≤ α ≤ 1) To ensure a symetrical behaivor of the family, we need to adapt the previous result when 0.5 ≤ α ≤ 1.0 in the following way: Compute the weights for ᾱ = 1 − α Reverse the order of the weights. Algorithm 1 implements the above results in pseudocode. 4. Examples and analysis In order to analyze the algorithm performance, we compare their results for 3 values of β (1.0, 1.25 and 1.5) against two well known algorithms: exponential method [3] and maximum entropy method [5]. Exponential method is similar to our proposal in the sense that it also propose a shape for the distribution of ∆ (an exponential distribution); however, to fit the desired orness, α must be preset according to pre-computed figures. Maximum entropy method has an optimization approach, and it involves the numerical solution of an equation. Figure 3 shows the weights obtained for n = 5 when the desired orness is 0.6. Notice the linear distribution from w2 to w5 in figure 3(a) and the Homogeneous distribution when β = 1.0. Notice also that the linear method approaches better than the exponential the weight distribution of the optimal entropy method. In fact, the exponential method provides an increasing distribution where as entropy and linear methods provide decreasing distributions. Figure 4 shows how fast varies w1 when we change the desired orness for n = 5. We have added the case of the exponential method without preset, in order to stress the presetting effect. Curves in figure 4(b) has a change when orness is 0.5, caused by the strategy adopted to ensure simetry. These figures also show that linear method behaves closer to entropy method than the exponential one. Figure 5 shows the change in all the weights when we change the desired orness for n = 5. It is important to remark the simetry of the entropy and linear methods. Similarity between figures 5(a) and 5(b) reinforces the idea that linear method with β = 1.5 is very similar to maximum entropy method. Figure 6 shows how varies dispersion (entropy) when we change the desired orness for n = 5. Variations of entropy with the linear method for different β are minimal. Notice also that the entropy obtained by the linear method with β = 1.5 is very close to the optimal obtained by the entropy method. Table 1 shows a comparison of computing times. Algorithms have been implemented in OpenModelica [4]. We have run every algorithm 20 times for n = 10 and n = 100. The average simulation times are in table 1, as relative times to the minimal average time. Exponential method, as described in [3], involves a graphical procedure for the preset of α; we have implemented it using an exhaustive search procedure, which explains the high times for this method. It is an unfair comparison, and we prefer to compare exponentials method times using an implementation without preseting α. 7 Table 1 shows that the linear method is the fastest one. It is faster than the entropy method, because it doesn’t need any iteration loop and it is faster than the exponential method because arithmetic operations are simpler. Moreover, entropy method has important lacks (see remark 1 in [7]): objective function definition implies wi > 0 and as Maximum and Minimum operators are OWA’s with most of the weights equal to zero, those cases can not be included. Even for α close to 0 or 1 numerical problems may arise: Figure 7 shows the dispersion (entropy) and orness for the Maximum entropy method for desired orness ∈ [0.9, 1.0] obtained with our OpenModelica implementation. Notice the numerical problems thah appear near α = 0.98. Those numerical problems are not present in the linear method, because there are not iteration loops. 5. Conclusions The linear method is a fast and reliable method for computing weights of OWA operators with a desired orness. It is as fast or faster than the exponential method. It is also more suitable for software implementations than the exponential method because does not use precomputed curves for presettings. It is more robust than optimization methods because there are no iterations loops. And it provides a suboptimal result, very close to the optimal. References Referencias [1] Detyniecki, M., 2001. Fundamentals on Aggregation Operators. Computer Science division, University of California, Berkeley. [2] Emrouznejad, A., Marra, M., 2014. Ordered weighted averaging operators 1988–2014: A citation-based literature survey. International Journal of Intelligent Systems 29 (11), 994–1014. URL http://dx.doi.org/10.1002/int.21673 [3] Filev, D., Yager, R. R., 1998. On the issue of obtaining owa operator weights. Fuzzy Sets and System 94, 157–169. [4] Fritzson, P., 2014. Principles of Object Oriented Modeling and Simulation with Modelica 3.3. Wiley-IEEE Press. [5] Fullér, R., Majlender, P., 2000. An analytic approach for obtaining maximal entropy owa operator weights. Tech. rep., Turku Centre for Computer Science. [6] Lamata, M. T., Perez, E. C., 2009. Owa weights determination by means of linear functions. Mathware and soft computing 16 (2). 8 [7] Liu, X., 2011. Recent Developments in the Ordered Weighted Averaging Operators: Theory and Practice. Vol. 265 of Studies in Fuzziness and Soft Computing. Springer, Ch. A Review of the OWA Determination Methods: Classification and Some Extensions, pp. 60–90. [8] O’Hagan, M., 1988. Aggregating template or rule antecedents in real-time expert systems with fuzzy set logic. In: Twenty-Second Asilomar Conference on Signals, Systems and Computers. Vol. 2. pp. 681–689. [9] Yager, R. R., Kacprzyk, J., Beliakov, G. (Eds.), 2011. Recent Developments in the Ordered Weighted Averaging Operators: Theory and Practice. Vol. 265 of Studies in Fuzziness and Soft Computing. Springer. 9 input : n the size of the OWA operator input : orness the desired orness of the OWA operator output: w a vector of size n with the weights of the OWA operator Define f (x) = 1 − (1 − 2x)β with β ∈ [1, 1.5]. By default β = 1.5 2 if orness ≤ 0.5 then 3 α ← orness 4 else 5 α ← 1 − orness 6 end 7 m←n−1 8 ∆ ← f (α)m/n 2 9 K ← 6(f (α) − 2α)/(m − 1) 10 b ← f (α)/n − Kn/2 11 if orness ≤ 0.5 then 12 wn ← 1 − ∆ 13 for i ← 1 to m do 14 wi ← Ki + b 15 end 16 else 17 w1 ← 1 − ∆ 18 for i ← 1 to m do 19 wi+1 ← K(n − i) + b 20 end 21 end Algorithm 1: Algorithm to get the weights of an OWA operator using the linear method 1 10 Weight Weight Weight 1.0 1.0 1.0 1 n 1 n 1 n w1 w2 w3 w4 w5 w1 (a) Mínimum w2 w3 w4 w5 (b) Simple average f (α) 3α 1 2α α 0 0.5 Figura 2: Function f (α) = 1 − (2α − 1)β and its restrictions 11 w2 w3 (c) Maximum Figura 1: Weigths for 3 OWAs with n = 5 0 w1 w4 w5 Weight 1.0 Maximum entropy Exponential with preset 0.8 0.6 0.4 0.2 0 w1 w2 w3 w4 w5 (a) Exponential and Entropy methods Weight 1.0 Linear with β = 1.00 Linear with β = 1.25 Linear with β = 1.50 0.8 0.6 0.4 0.2 0 w1 w2 w3 w4 w5 (b) Linear method Figura 3: Weights for n = 5 and desired orness 0.6. 12 w1 Maximum entropy Exponential with preset Exponential without preset 1.00 0.75 0.50 0.25 0 Orness 0 0.2 0.4 0.6 0.8 1.0 (a) Exponential and Entropy methods w1 Linear with β = 1.00 Linear with β = 1.25 Linear with β = 1.50 1.00 0.75 0.50 0.25 0 Orness 0 0.2 0.4 0.6 0.8 1.0 (b) Linear method Figura 4: Variation of w1 for n = 5 as a function of the desired orness 13 W eight 1.00 w1 w2 w3 w4 w5 0.75 0.50 0.25 W eight 1.00 w1 w2 w3 w4 w5 0.75 0.50 0.25 0 Orness 0 0.2 0.4 0.6 0.8 0 1.0 Orness 0 (a) Maximum entropy 0.2 0.4 0.6 0.8 1.0 (b) Linear with β = 1.50 W eight 1.00 w1 w2 w3 w4 w5 0.75 0.50 0.25 W eight 1.00 w1 w2 w3 w4 w5 0.75 0.50 0.25 0 Orness 0 0.2 0.4 0.6 0.8 0 1.0 Orness 0 (c) Exponential with preset 0.2 0.4 0.6 0.8 1.0 (d) Linear with β = 1.25 W eight 1.00 w1 w2 w3 w4 w5 0.75 0.50 0.25 W eight 1.00 w1 w2 w3 w4 w5 0.75 0.50 0.25 0 Orness 0 0.2 0.4 0.6 0.8 1.0 0 Orness 0 (e) Exponential without preset 0.2 0.4 0.6 0.8 (f) Linear with β = 1.00 Figura 5: Comparison of Weights for n = 5 as a function of desired Orness 14 1.0 Dispersion 2.00 1.75 1.50 1.25 1.00 0.75 0.50 0.25 0 0 0.2 Maximum entropy Exponential with preset Exponential without preset Orness 0.4 0.6 0.8 1.0 (a) Exponential and Entropy methods Dispersion 2.00 1.75 1.50 1.25 1.00 0.75 0.50 0.25 0 0 0.2 Linear with β = 1.00 Linear with β = 1.25 Linear with β = 1.50 Orness 0.4 0.6 0.8 1.0 (b) Linear method Dispersion 2.00 1.75 1.50 1.25 1.00 0.75 0.50 0.25 0 0 0.2 Maximum entropy Exponential with preset Linear with β = 1.50 Orness 0.4 0.6 0.8 1.0 (c) Exponential, Entropy and Linear method Figura 6: Comparison of Orness and Dispersion (Entropy) for n = 5 as a function of desired Orness 15 Dispersion 4.0 Real Orness 1.0 3.5 3.0 2.5 2.0 0.5 1.5 1.0 0.5 0 Orness 0.90 0.92 0.94 0.96 0.98 0 Orness 1.0 0.90 (a) Dispersion 0.92 0.94 0.96 0.98 1.0 (b) Real orness Figura 7: Dispersion (Entropy) and Real Orness for the Maximum entropy method with desired orness close to Maximum, for n = 100 16 Cuadro 1: Relative computing times. Averages from 20 samples Method Maximum entropy Exponential with preset Exponential without preset Linear with β = 1.00 Linear with β = 1.25 Linear with β = 1.50 17 n = 10 2.91 108.81 1.05 1.05 1.03 1.00 n = 100 2.26 366.22 2.04 1.01 1.02 1.00
2cs.AI
Fast Shortest Path Routing in Transportation Networks with Time-Dependent Road Speeds Costas K. Constantinou∗ , Georgios Ellinas∗† , Christos Panayiotou∗† and Marios Polycarpou∗† ∗ KIOS Research Center for Intelligent Systems and Networks of Electrical and Computer Engineering University of Cyprus Emails: {constantinou.k.costas, gellinas, christosp, mpolycar}@ucy.ac.cy † Department arXiv:1408.4113v6 [cs.DS] 7 Jan 2016 Abstract The current paper deals with the subject of shortest path routing in transportation networks (in terms of travelling time), where the speed in several of the network’s roads is a function of the time interval. The main contribution of the paper is a procedure that is faster compared to the conventional approaches, that derives the road’s traversal time according to the time instant of departure, for the case where the road’s speed has a constant value inside each time interval (in general, different value for each time interval). Furthermore, the case where the road’s speed is a linear function of time inside each time interval (in general, different linear function for each time interval) is investigated. A procedure that derives the road’s traversal time according to the time instant of departure is proposed for this case as well. The proposed procedures are combined with Dijkstra’s algorithm and the resulting algorithms, that are practically applicable and of low complexity, provide optimal shortest path routing in the networks under investigation. I. I NTRODUCTION In the current paper, the subject of shortest path routing in transportation networks where the roads’ speed is function of time, is investigated. This category of networks is met in practice, since the speed in network’s roads can be available for several time instants, either directly measured, or derived from vehicle density measurements [1]. The objective of this work was the development of low-complexity, practically applicable algorithms for fast derivation of shortest paths (in terms of travelling time) in the networks under investigation. Section II gives the notation, definitions and assumptions used throughout the paper. In general, a transportation network is modelled as a directed graph, where the nodes, arcs of the graph represent the network junctions, roads respectively. A cost is assigned to each arc, that in the current work represents the travelling time on the arc (called “traversal time” as well). For the classical case, where the network is time-independent (called static as well), this cost is constant over time for every arc, derived by dividing the length of the arc with the speed in it. For the case investigated here, the network is time-dependent, i.e., this cost is a function of time, depending on the time instant of departure. Therefore, for shortest path routing in time-dependent networks an additional calculation must be performed compared to static networks: the calculation of the travelling time on the network’s arcs according to the time instant of departure. Throughout the paper it is considered that the time horizon is split into non-overlapping time intervals, and the speed in a network’s arc depends on the time interval. This model was firstly presented in [2]. More details on this, as well as the reasons why this model was adopted for the work proposed here, can be found in Section III, where the main models for the networks under investigation, are presented. The main contribution of the current paper can be found in Sections IV and V. In Section IV, a procedure is proposed, that derives the arc’s (road’s) traversal time according to the time instant of departure, for the case where the speed in the arc has a constant value inside each time interval (in general, a different value for each time interval). The proposed procedure is faster compared to the conventional approaches. More precisely, if we consider that the time horizon is split into K time slots, the computational complexity of the proposed procedure is of order O(log K), whereas the complexity of the fastest existing approach is of order O(K). Special cases are also investigated, where the complexity of the proposed procedure can be further decreased if certain constraints are valid for the network graph. In Section V, the general case of speed being an arbitrary function of time inside the time interval is investigated, and a procedure is proposed that derives the road’s traversal time according to the time instant of departure, for the case where the speed in the arc is linear function of time inside each time interval (in general, a different linear function for each time interval). To the best of our knowledge, relevant methods for this case do not exist in the literature. The proposed methods are combined with Dijkstra’s algorithm and the resulting algorithms, that are practically applicable and of low complexity, provide optimal shortest path routing in the networks under investigation. The paper finishes with Section VI, where the conclusions are presented, as well as possible future research. II. N OTATION , D EFINITIONS , A SSUMPTIONS Throughout the paper the network is modelled as a directed graph G = (N, A), consisting of n = |N | nodes (road junctions) and m = |A| arcs (roads). The arc originating from node x and end at node y is denoted by < xy >, and its length (i.e., actual length of the corresponding road) by dxy . The speed in < xy > is denoted by v xy . A node y is considered to be adjacent to x if < xy > exists in the graph. The cost cxy (or “traversal time” or “travelling time”) of arc < xy > is defined as the time needed to traverse it, i.e., to move from node x to y. Consequently, the term “shortest path” from node x to node y refers to the path of the minimum travelling time from x to y. For the case of static networks, the cost of an arc is constant over time, equal to dxy /v xy for arc < xy >. For time-dependent networks, it is a function of the time instant of departure (τ ) from node x, and it is denoted by cxy (τ ). Therefore, for shortest path routing in time-dependent networks an additional calculation must be performed compared to static networks: the calculation of cxy (τ ) according to the time instant of departure from x. Throughout the paper, it is considered that the speed in the network’s roads has been measured for certain time instants1 , during a large time interval (e.g., an entire year). In this way, a speed-pattern can be derived for each road. These patterns constitute an estimation of the time-dependent network graph. III. E XISTING M ODELS OF T IME -D EPENDENT T RANSPORTATION N ETWORKS In this Section, the two main models of time-dependent transportation networks are presented. A. Flow Speed Model (FSM) One approach to model a time-dependent network is to use the Flow Speed Model (FSM), proposed in [2]. In the FSM, for each network arc a temporal area from t = 0 to t = T is partitioned into (in general not equal) non-overlapped time intervals, and the speed depends on the time interval. The time division is the same for every network arc. The (k + 1)th time interval is denoted by [τk , τk+1 ), with k ∈ N and 0 ≤ k ≤ K − 1, τ0 = 0 and τK = T . The number of time intervals is equal to K. The speed in arbitrary arc < xy > is considered to be constant inside each time interval and it is denoted by vkxy for time interval [τk , τk+1 ). Let the set of speeds vkxy and time intervals [τk , τk+1 ), 0 ≤ k ≤ K − 1, for arc < xy > be denoted by V xy and T xy respectively, and V = ∪∀<xy>∈A V xy and T = ∪∀<xy>∈A T xy . Then, for the FSM the network graph is denoted by G = (N, A, T, V ). xy For t > T , it can be considered either that vkxy = vK−1 (i.e., the network is static for t > T ), or that vkxy is periodic with period equal to T . The FSM always satisfies the First-In-First-Out (FIFO) property, as proven in [2]. In simple words, the FIFO property has the following meaning: Consider two vehicles A and B that depart from node x and traverse arc < xy >, with B having greater time instant of departure from x, compared to A. Then, B will have greater time instant of arrival at y, compared to A. As stated in Section II, for routing purposes in time-dependent networks, the derivation of arc traversal time must be performed. In the FSM, this is performed as follows. 1) Procedure for Derivation of Arc Traversal Time (AT T ): The traversal time cxy (τ ) of arc < xy > if τ is the time instant of departure from x can be derived as follows (AT T xy (τ ) procedure2 ): 1) Locate index k such that τk ≤ τ < τk+1 xy 2) If (vkxy · (τk+1 − τ ) ≥ dxy ) cxy (τ ) = vdxy k Else { 3) a) i) a = dxy − vkxy · (τk+1 − τ ) ii) k ∗ = k + 1 b) While (vkxy∗ · (τk∗ +1 − τk∗ ) < a) { i) a ← a − vkxy∗ · (τk∗ +1 − τk∗ ) ii) k ∗ ← k ∗ + 1 } 4) cxy (τ ) = (τk∗ − τ ) + vaxy∗ } k The necessity of the aforementioned procedure is due to the fact that a single time interval may not be enough for the derivation of the arc traversal time. This occurs when the distance that can be traversed from the time instant of departure till the end of the corresponding time interval, is less than the length of the arc. Step 1 of the AT T procedure needs O(K) time, if the time intervals are checked sequentially. The order of the number of the time intervals that are checked during the while loop (step 3b) is O(K). Therefore, the order of the computational complexity of the AT T procedure is O(K). 1 Either 2 This directly measured, or derived from vehicle density measurements [1] procedure was initially proposed in [2]; the one presented in the current paper is an equivalent form of the one in [2]. m/s 12 v 10 8 6 4 2 0 Fig. 1. 0 5 10 15 20 25 30 35 40 45 50 t s Example of derivation of arc traversal time (d = 250m, τ = 2s) The example of Figure 1 illustrates the operation of the AT T procedure. Here, the length dxy of arc < xy > is equal to 170m and the departure time τ from x is equal to 6s. The first five time intervals are [τ0 , τ1 ) = [0, 10), [τ1 , τ2 ) = [10, 15), [τ2 , τ3 ) = [15, 30), [τ3 , τ4 ) = [30, 40), [τ4 , τ5 ) = [40, 50). These along with their corresponding speed are given in Figure 1. For this example, the AT T procedure performs as follows: 1) The departure time τ = 6s lies into time interval [τ0 , τ1 ) = [0, 10) ⇒ k = 0 2) The distance that can be traversed from τ = 6s until the end of this time interval is equal to v0xy ·(τ1 −τ ) = 10·(10−6) = 40m. Since it is smaller than the length of the arc, the procedure is continued. 3) a) i) a = dxy − v0xy · (τ1 − τ ) = 170 − 40 = 130m ii) k ∗ = 1 b) • v1xy · (τ2 − τ1 ) = 6 · (15 − 10) = 30m < a = 130m ⇒ i) a = 130 − 30 = 100m ii) k ∗ = 2 xy • v2 · (τ3 − τ2 ) = 8 · (30 − 15) = 120m > a = 100m ⇒ exit from the while loop xy 4) c (6) = (τ2 − τ ) + a/v2xy = (15 − 6) + 100/8 = 9 + 12.5 = 21.5s The traversal time is equal to 21.5s and the time instant of arrival at node y is equal to 6 + 21.5 = 27.5s. 2) Applicability of the FSM for Networks under Investigation: The application of the FSM for the networks investigated in the current paper, is straightforward. The time instants for partitioning the temporal area are the ones where the speed has been measured. As stated previously, in [2] the time division is the same for every network arc. In general, it may be different. In the current paper, for simplicity, we make the same assumption as in [2], i.e., that the time division is the same for every arc. Nevertheless, the generalisation is straightforward, as can be seen from the description of the AT T procedure. In [2], as stated previously, the speed is considered to be constant in every time interval. Up to Section IV, this assumption is adopted. The general case of the speed being a function of time inside a time interval, is investigated in Section V. In [2], the AT T procedure is combined with Dijkstra’s algorithm [3], and the resulting algorithm (called Time-DependentDijkstra (TD-Dijkstra) hereafter) is as follows. 3) Time-Dependent Dijkstra’s Algorithm: As stated in Section II, for the networks under investigation, the calculation of cxy (τ ) must be performed during the execution of any shortest path routing algorithm. In [2], where the FSM model and the AT T procedure were proposed, the latter is combined with Dijkstra’s algorithm [3] and the resulting algorithm (TD-Dijkstra) is suitable for shortest path routing in networks with time-dependent road speeds. The input of TD-Dijkstra is the network graph G = (N, A, T, V ) and the source node, and the output is the shortest path from the source to every other network node. For the execution of TD-Dijkstra, the following are used. • s: Source. • W (x): Label of node x. • p(x): Predecessor of node x. • Gx : Set of nodes adjacent to node x. • gx : Number of nodes adjacent to node x (i.e., gx = |Gx |). The exact steps of TD-Dijkstra are: 1) a) W (s) = 0 b) p(s) = 0 c) N ∗ = N − {s} d) ∀x ∈ N ∗ : i) If (x ∈ Gs ) { Run AT T sx (W (s)); W (x) = csx (W (s)); p(x) = s } ii) Else { W (x) = ∞; p(x) = 0 } 2) While (N ∗ 6= ∅){ a) Find x ∈ N ∗ such that ∀x0 ∈ N ∗ : W (x) ≤ W (x0 ) b) N ∗ ← N ∗ − {x} c) ∀x0 ∈ (N ∗ ∩ Gx ): 0 i) Run AT T xx (W (x)) 0 ii) If (W (x) + cxx (W (x)) < W (x0 )) 0 { W (x0 ) = W (x) + cxx (W (x)); p(x0 ) = x } } The TD-Dijkstra algorithm functions as the classical Dijkstra’s algorithm, with the difference that the AT T procedure is used in steps 1(d)i and 2(c)i for the derivation of the arc’s cost according to the time instant of departure. On termination of the algorithm, the label W (x) of a node x gives the cost of the shortest path from the source to this node, and p(x) gives its predecessor in this path. Since the computational complexity of the AT T procedure is of order Pn O(K), step 1 requires O(nK) time and each iteration of step 2 requires O(n + gx K) time. Therefore, due to the fact that x=1 gx = m, the complexity of TD-Dijkstra is of order O(nK + n2 + mK) = O(n2 + mK). The D-Dijkstra is, to the best of our knowledge, the fastest existing algorithm for shortest path routing in the networks investigated in the current paper. B. Traversal Time Model (TTM) Another approach to model a time-dependent network, is to use the Traversal Time Model (TTM). In the TTM, the traversal time function f xy (τ ) is utilised, where f xy (τ ) is equal to the time needed to traverse arc < xy >, if τ is the time instant of departure from node x. The TTM may or may not satisfy the FIFO property. This model was initially proposed in [4] and was exploited in several other papers, such as in [5], [6], [7], [8], [9], [10], [11], [12]. Function f xy (τ ) can be defined so as to have either integer-valued or real-valued domain and range, leading to discrete- or continuous-time-dependent networks respectively. If f xy (τ ) is defined so as to have integer-valued domain and range (first variation of the TTM), the network is discrete-time and f xy (τ ) is known for every τ ∈ N , 0 ≤ τ ≤ T . This variation can be found in [12] as well as other sources. For real-valued domain and range of f xy (τ ) (second variation of the TTM), the network is continuous-time and f xy (τ ) is known for several time instants denoted by τk , with 0 ≤ τk ≤ T , k ∈ N and 0 ≤ k ≤ K, τ0 = 0 and τK = T . These time instants, in general, are different for each arc. Work that utilises this variation of the TTM can be found in [5]-[11] and possibly in other sources. In the aforementioned papers, f xy (τ ) is considered to be a piecewise linear function of time, having the time instants τk where it is known, as breakpoints. For a time instant τ for which f xy (τ ) is unknown, it is derived by linear interpolation between the consecutive breakpoints τk , τk+1 such that τk < τ < τk+1 : ⇒ xy )−f xy (τk ) f xy (τ )−f xy (τk ) = f (ττk+1 τ −τk k+1 −τk xy )−f xy (τk ) f xy (τ ) = f (ττk+1 · (τ − τk ) + f xy (τk ) k+1 −τk (1) (2) Equation 1 can be derived from the tangent of angle θ of Figure 2. For both variations, for τ > T either it can be considered that f xy (τ ) = f xy (T ) (i.e., the network is static for τ > T ), or it can be considered that f xy (τ ) is periodic with period equal to T . 1) Applicability of the TTM for Networks Under Investigation: For optimal routing in the networks under investigation the continuous-time variation of the TTM must be used, since the time instant of departure from a network node can have any arbitrary value. The derivation of f xy (τ ) for the time instants the speed has been measured, can be performed using the AT T procedure of the FSM. For the calculation of cxy (τ 0 ) for τ 0 not equal to one of the aforementioned time instants, the assumption that f xy (τ ) is piecewise linear, must be valid. However, the following example shows that for the networks investigated in the current paper, this is not always true. Consider the example of Figure 1. Here, if the AT T procedure is applied for τ equal to 0s, 10s, the derived f xy (τ ) is equal to 20s, 22s, respectively. Using equation 2, f xy (6) = 21.2s. However, cxy (6) = 21.5s 6= f xy (6), as derived in Section III-A1. Therefore, for this example, the assumption that f xy (τ ) is piecewise linear, is not valid. Consequently, the FSM is utilised for the routing algorithms proposed in the following Section. f(t) f(τk+1) f(τ) θ f(τk) τk τ Fig. 2. τk+1 t Derivation of equation 1 IV. FAST S HORTEST PATH ROUTING A LGORITHMS The design of a procedure that functions as the AT T 3 but with lower computational complexity compared to the AT T , can lead to algorithms for faster shortest path routing in the networks under investigation, compared to TD-Dijkstra. As stated in Section III-A1, the complexity of the AT T procedure is of order O(K) due to steps 1 and 3b. When the AT T procedure is executed, the index of the time interval where the time instant of arrival lies in, can be kept [2]. In more detail, after the execution of the AT T for the derivation of the time instant τ ∗ = τ + cxy (τ ) of arrival at node y of the arbitrary arc < xy >, the index k ∗ such that tk∗ ≤ τ ∗ < tk∗ +1 can be kept, since it is known from the last iteration of step 3(b)ii of the AT T (let the index that is kept, be denoted by I). For each one of the upcoming executions of the AT T in step 2(c)i of TD-Dijkstra, performed for every z such that z ∈ (N ∗ ∩ Gy ), index k at step 1 is equal to I. Therefore, • For the first execution of the AT T (step 1(d)i of TD-Dijkstra) the index k of step 1 of the AT T is known (it is equal to 0), and • For any upcoming execution of the AT T (step 2(c)i of TD-Dijkstra) the index k of step 1 of the AT T is known as described previously The result is that the complexity of step 1 of the AT T is of order O(1) if for every execution of the AT T , the index of the time interval where the time instant of arrival lies in, is kept. Consequently, any attempt to decrease the complexity of the AT T procedure must concentrate on the reduction of the complexity of step 3b of it. At this step, variable k ∗ is increased by one at each iteration, (sequential search is performed over k ∗ ) until the last necessary time interval is located, i.e., the time interval where the time instant of arrival τ ∗ at node y (of < xy >), lies in (i.e., [tk∗ , tk∗ +1 ) such that tk∗ ≤ τ ∗ < tk∗ +1 ). An initial thought for decreasing the complexity would be to perform binary search [13] over variable k ∗ instead of sequential search, to locate the last necessary time interval. However, this will not lead to lower complexity, since at each iteration of the binary search, the check whether tk∗ ≤ τ ∗ < tk∗ +1 will need O(K) time4 , thus not decreasing the complexity of the AT T procedure. To achieve reduction of the complexity of the AT T procedure using binary search over k, a pair of new variables, named effective length and additive effective length, are introduced in the current paper. They are defined as follows. A. Effective Length, Additive Effective Length • The effective length lkxy is defined as the distance that can be traversed on arc < xy > during the time interval [tk , tk+1 ). Therefore, lkxy = vkxy · (tk+1 − tk ) Note that in general, lkxy can be greater, equal or less than the actual length dxy of arc < xy >. 3 i.e., that derives the cost of an arc according to the time instant of departure at each iteration of this check, the initial while loop, i.e., with sequential search on k∗ , must be executed. 4 Since (3) • Pi xy xy The additive effective length Lxy i of the time interval [ti , ti+1 ) for arc < xy > is defined as Li = k=0 lk , i.e., is the sum of the effective lengths from the first time interval [t0 , ti+1 ) up to the [ti , ti+1 ), including the latter. In other words, it is equal to the distance that is traversed from time instant t0 to ti+1 . For i ≤ j, Lxy j − Lxy i = j X k=0 lkxy − i X k=0 lkxy = j X lkxy (4) k=i+1 xy Therefore, the difference Lxy j − Li is equal to the distance that is traversed from time instant ti+1 to tj+1 . In the following Section, a new procedure is proposed, named Fast AT T procedure (F AT T ), that utilises the additive effective length for fast calculation of the arc traversal time. B. Fast AT T Procedure (F AT T ) The exact steps of the F AT T xy (τ ) procedure for arc < xy > and τ as time instant of departure from node x, are as follows. 1) Steps of the F AT T xy (τ ) Procedure: 1) Locate index k such that τk ≤ τ < τk+1 xy 2) If (vkxy · (τk+1 − τ ) ≥ dxy ) cxy (τ ) = vdxy k Else { 3) a) i) a = dxy − vkxy · (τk+1 − τ ) c ii) k ∗ = b (k+1)+K 2 iii) a0 = 0 b) While (a0 = 0) { (k+1)+k∗ xy xy ∗ • If (a < Lk∗ −1 − Lk ) k ← b c 2 xy xy k∗ +K ∗ • Else If (a > Lk∗ − Lk ) k ← b 2 c xy xy xy xy xy xy 0 • Else If (Lk∗ −1 − Lk ≤ a ≤ Lk∗ − Lk ) a = Lk∗ −1 − Lk } 0 } 4) cxy (τ ) = (τk∗ − τ ) + a−a xy vk ∗ τ 2) Description of F AT Txy Procedure: • Steps 1 and 2: They are identical to the ones of the AT T procedure. • Step 3(a): (i) If the procedure is continued to step 3, a is set so as to be equal to the residual distance of arc < xy >, if the distance traversed from time instant τ to τk+1 is subtracted from dxy . The traversal of distance dxy with τ as the time instant of departure, is equivalent to traversing distance a with τk+1 as the time instant of departure. (ii) For the binary search over k ∗ (i.e., the index of the time interval [τk∗ , τk∗ +1 ) where the time instant of arrival lies in), k ∗ is initialised with the value b (k+1)+K c. 2 (iii) Variable a0 is set to zero and it is used in steps 3(b) and 4. ∗ • Step 3(b): Binary search over k is performed, to locate the time interval [τk∗ , τk∗ +1 ) where the time instant of arrival xy ∗ lies in. According to equation 4, Lxy k∗ − Lk is equal to the distance traversed on < xy > from τk+1 to τk +1 . xy xy – If a < Lk∗ −1 − Lk , then distance a (with τk+1 as time instant of departure) will be traversed prior to τk∗ . Index k ∗ ∗ c. is too large, consequently, k ∗ ← b (k+1)+k 2 ∗ xy – If a > Lxy − L , then distance a will be traversed after τk∗ +1 . Index k ∗ is too small, consequently, k ∗ ← b k +K k∗ k 2 c. xy xy xy xy ∗ ∗ – If Lk∗ −1 − Lk ≤ a ≤ Lk∗ − Lk , index k is the “correct” one (i.e., for the time instant of arrival τ , τk∗ ≤ τ ∗ ≤ xy τk∗ +1 ). Consequently, binary search is terminated and variable a0 is set to Lxy k∗ −1 − Lk . The procedure exits the while loop. 0 0 • Step 4: Distance a is the part of a that is traversed from τk+1 to τk∗ . The residual distance, i.e., a − a , will be traversed in time interval [τk∗ , τk∗ +1 ), i.e., with speed vkxy∗ . Therefore, the traversal time of < xy > with τ as time instant of 0 0 xy departure, is equal to the traversal time up to time instant τk∗ , plus a−a (τ ) = (τk∗ − τ ) + a−a xy , i.e., c xy . vk vk ∗ ∗ To further clarify the proposed procedure, note that: xy xy xy xy xy xy a−a0 a−a0 a−a0 a−a0 • For the quantity xy , 0 ≤ xy ≤ l ∗ . If a = L ∗ xy = 0. If a = L ∗ − L xy = l ∗ . k k −1 − Lk , then vk k k , then vk k vk vk ∗ ∗ ∗ ∗ ∗ • The way values are assigned to k , permits the latter to vary from k + 1 to K − 1, i.e., being in accordance to the fact that the arrival time (if the procedure has moved to step 3) will lie in a time interval from [τk+1 , τk+1 ) to [τK−1 , τK ). The utilisation of the additive effective length in the proposed F AT T procedure leads to O(1) time for each iteration of the while loop of step 3(b). Therefore, the complexity of the F AT T procedure is of order O(log K), since O(log X) is the complexity of binary search over X ordered objects [13]. If the F AT T procedure is used in TD-Dijkstra instead of the AT T , the resulting algorithm, called Fast Time-DependentDijkstra (FTD-Dijkstra), has complexity of order O(n2 + m log K), compared to O(n2 + mK) of TD-Dijkstra. The derivation of the additive effective length for arc < xy > can be performed using the following proposed AELxy procedure, applied to arc < xy >. TABLE I C OMPLEXITY OF EXISTING AND PROPOSED ALGORITHMS ALGORITHM Exist. Prop. Prop. Prop. Prop. TD-Dijkstra FTD-Dijkstra B-FTD-Dijkstra (Q ≥ K) B-FTD-Dijkstra (1 < Q < K) B-FTD-Dijkstra (Q ≤ 1) PREPROC. SPACE QUERY O(mK) O(mK) O(mK) O(mK) O(mK) O(mK) O(mK) O(mK) O(mK) O(mK + n2 ) O(m log K + n log n) O(m log K + n log n) O(m log Q + n log n) O(m + n log n) C. AELxy Procedure xy 1) Lxy 0 = l0 , i = 1 2) While (i ≤ K − 1) xy xy a) Lxy i = Li−1 + li b) i ← i + 1 Procedure AEL has O(K) computational complexity; the same stands for space complexity. Therefore, the preprocessing computational complexity of FTD-Dijkstra is O(mK). The space complexity is also O(mK), equal to the case where the AEL procedure is not applied, since the network consists of m arcs, each one consisting of K time intervals with their corresponding speeds. A faster implementation can be performed, if Fibonacci heaps are utilised [14], [13]. Under this data structure, the amortised complexity of the selection of the node with the minimum cost (step 2a of TD-Dijkstra) is O(log n), leading to computational complexity of O(m log K + n log n) for FTD-Dijkstra. The latter complexity can be further decreased if specific constraints are valid for the network graph, as detailed below. D. Special Cases xy Consider the case where the effective lengths are bounded below, i.e., lixy ≥ dQ ∀ < xy >∈ A and ∀i : 0 ≤ i ≤ K − 1. Without loss of generality, consider that Q is integer. Then, in step 3(b) of the F AT T procedure, Q consecutive time intervals are enough for the traversal of distance a5 , since: P(k+1)+(Q−1) k+1 lixy ≥ ≥ ((k + 1) + (Q − 1) − (k + 1) + 1) · =Q· dxy Q =d xy dxy Q = >a (5) Therefore, the binary search in step 3(b) of the F AT T procedure can be constrained in the area from k + 1 up to k + 1 + Q, instead of up to K. This leads to computational complexity of order O(log Q) for the F AT T procedure and, consequently to O(m log Q + n log n) for FTD-Dijkstra. If Q < K, then this complexity is lower compared to O(m log K + n log n). The resulting algorithm is named Bounded-FTD-Dijkstra (B-FTD-Dijkstra). If the network has the property that for every arc, every time interval has effective length at least as large as the distance i of the arc, i.e., lxy ≥ dxy ∀ < xy >∈ A and ∀i : 0 ≤ i ≤ K − 1, then Q ≤ 1 and B-FTD-Dijkstra has complexity of O(m + n log n), i.e., equal to the one of classical Dijkstra’s algorithm [3], [14]. The complexity of the existing TD-Dijkstra algorithm as well as of the proposed FTD-Dijkstra and B-FTD-Dijkstra algorithms, is given in Table I. It must be stated that all the algorithms of Table I (existing and proposed) are optimal for the networks under investigation. V. G ENERAL C ASE OF S PEED AS F UNCTION OF T IME I NSIDE THE T IME I NTERVAL Up to this point, it was assumed (as in [2]) that the speed is considered to be constant inside every time interval. In this Section, the manipulation of the general case of speed being a function of time inside a time interval is proposed. Let this R function be gkxy (t) for time interval [τk , τk+1 ) and arc < xy >, and gkxy (t) = Gxy k (t). This general case can be handled by generalising the notion of effective length (equation 3) as follows: Z τk+1 xy xy lk = gkxy (t)dt = Gxy (6) k (τk+1 ) − Gk (τk ) τk 5 with τk+1 as time instant of departure, as explained previously A. Special Case: Constant Speed Inside the Time Interval The (already investigated) special case of speed being constant in every time interval [τk , τk+1 ), equal to the one measured at time instant τk (i.e., gkxy (t) = vkxy ) is derived from equation 6 as follows: lkxy Z τk+1 = τk gkxy (t)dt = vkxy τk+1 Z τk dt = vkxy · (tk+1 − tk ) (7) Let the F AAT procedure for this case be Constant F AAT (C − F AAT ). Then, C − F AAT is exactly the one presented in Section IV-B. B. Special Case: Linear Speed Inside the Time Interval For the case of speed measurements (as described in Section II), it is more natural to assume that the speed in the arbitrary time xy interval [τk , τk+1 ) of arc < xy >6 is a linear function of time (gkxy (t)), taking the values gkxy (τk ) = vkxy and gkxy (τk+1 ) = vk+1 , xy rather than being constant, equal to vk for the entire time interval [τk , τk+1 ). To the best of our knowledge, work on this case cannot be found in the literature for the networks under investigation. Under the aforementioned assumption, gkxy (t) is derived as follows: xy xy vk+1 −vk τk+1 −τk xy vk+1 −v xy xy xy ⇒ gk (t) − vk = τk+1 −τkk · (t − τk ) xy xy xy v xy −vk vk+1 −vk xy ⇒ gkxy (t) = τk+1 t + (v − k τk+1 −τk τk ) k+1 −τk xy xy xy xy v v −v τ k+1 −vk+1 τk k k ⇒ gkxy (t) = τk+1 t + τk+1 −τk k+1 −τk xy xy gk (t)−vk t−τk = (8) (9) If we set, xy xy vk+1 −vk τk+1 −τk = xy xy vk τk+1 −vk+1 τk τk+1 −τk Rkxy (10) = Skxy (11) gkxy (t) = Rkxy t + Skxy (12) then, ⇒ Gxy k (t) = 2 Rkxy t2 + Skxy t (13) From equations 6 and 13, the effective length is derived as follows: lkxy = Rkxy 2 τk+1 2 + Skxy τk+1 − Rkxy τk2 2 − Skxy τk (14) Let the F AAT procedure for the current case be Linear F AAT (L − F AAT ). Then, L − F AAT is derived from F AAT as follows. • • Step 1 remains the same as in F AAT . In step 2 of the F AAT , vkxy · (τk+1 − τ ) is equal to the distance traversed from τ to τk+1 . This distance in L − F AAT is given by R τk+1 τ gkxy (t)dt = Rkxy 2 τk+1 2 2 + Skxy τk+1 − Rkxy τ2 − Skxy τ (15) – If this distance is equal to or larger than dxy , then the traversal time cxy (τ ) is given by the solution of equation 16, as follows (where for simplicity, in the intermediate steps for the derivation of equation 17 from equation 16, cxy (τ ), Rkxy , Skxy and dxy are written as c, R, S and d respectively). 6 where xy the speed has been measured at time instants τk and τk+1 with measured values equal to vkxy and vk+1 respectively R τ +cxy (τ ) ⇒ τ (τ +c)2 R 2 2 gkxy (t)dt = dxy k + S(τ + c) − 2 R τ2 − 2 (16) Sτ = d ⇒ R(τ + c) + 2S(τ + c) − Rτ − 2Sτ = 2d ⇒ Rτ 2 + Rc2 + 2Rτ c + 2Sτ + 2Sc − Rτ 2 − 2Sτ = 2d ⇒ Rc2 + 2(Rτ + S)c − 2d = 0 √ −2(Rτ +S)± 4(Rτ +S)2 +8Rd ⇒c= 2R √ xy xy xy xy τ +Skxy )2 +2Rk d −(Rk τ +Skxy )± (Rk xy ⇒ c (τ ) = xy R (17) k – If this distance is less than dxy , the procedure continues to step 3. • • τ2 2 In step 3(a)i, a is set to dxy − Rkxy k+1 Skxy τk+1 − Rkxy τ2 − Skxy τ . Steps 3(a)ii, 3(a)iii and 3(b) remain the same. 2 + 0 is the time needed to traverse distance a − a0 , where this distance is traversed In step 4 of the F AAT , the quantity a−a xy vk ∗ inside time interval [τk∗ , τk∗ +1 ). This time in L − F AAT is given by R τk∗ +cxy (τ ) τk ∗ ⇒ cxy (τk∗ ) = gkxy∗ (t)dt = a − a0 √ xy xy xy xy −(Rk ∗ τk∗ +Sk∗ )± xy 0 (Rk∗ τk∗ +Sk∗ )2 +2Rk ∗ (a−a ) xy Rk ∗ (18) (19) The intermediate steps for derivation of equation 19 from eq. 18 are omitted since they are analogous to derivation of equation 17 from eq. 16. Considering the above analysis, the exact steps of the proposed L − F AAT procedure are as follows. 1) Steps of the L − F AT T xy (τ ) Procedure: 1) Locate index k such that τk ≤ τ < τk+1 τ2 xy xy xy τ 2 xy 2) If (Rkxy k+1 2 + Sk τk+1 − Rk 2 − Sk τ ≥ d ) cxy (τ ) = xy −(Rk τ +Skxy )± √ xy xy xy (Rk τ +Skxy )2 +2Rk d xy Rk Else { τ2 xy xy τ 2 xy 3) a) i) a = dxy − Rkxy k+1 2 + Sk τk+1 − Rk 2 − Sk τ (k+1)+K ∗ ii) k = b c 2 iii) a0 = 0 b) While (a0 = 0) { (k+1)+k∗ xy xy ∗ • If (a < Lk∗ −1 − Lk ) k ← b c 2 xy xy k∗ +K ∗ • Else If (a > Lk∗ − Lk ) k ← b 2 c xy xy xy xy xy xy 0 • Else If (Lk∗ −1 − Lk ≤ a ≤ Lk∗ − Lk ) a = Lk∗ −1 − Lk } 4) √ xy xy xy xy 2 0 −(Rk (Rk∗ τk∗ +Skxy ∗ τk∗ +Sk∗ )± ∗ ) +2Rk∗ (a−a ) cxy (τk∗ ) = xy R ∗ k } The computational complexity of the proposed L − F AAT procedure is O(log K). The routing algorithms for this case are derived from the ones proposed for the case of constant speeds inside the time interval (Section IV) just by substituting the F AAT procedure with the L − F AAT . Note that the F AAT procedure can be modified analogously for the case of speed being an alternative function of time (rather than linear) inside the time interval. C. Validity of the FIFO Property for the Generalised Case In [2], it was proven that the FSM satisfies the FIFO property for the case of constant speeds inside the time interval. In this Section, it is proven that the FIFO property is also valid for the general case of speed being an arbitrary function of time (gkxy (t)) inside the time interval. Consider that for the arbitrary arc < xy >, two vehicles 1, 2 depart from node x on time instants τ1 , τ2 > τ1 respectively, and arrive at node y on time instants τ10 , τ20 respectively. Obviously, τ10 > τ1 and τ20 > τ2 . TABLE II C OMPLEXITY OF EXISTING AND PROPOSED PROCEDURES Speed inside the time interval Existing procedure Proposed procedure constant value linear function of time O(K) − O(log K) O(log K) To prove that the FIFO property is valid, it must be proven that τ20 > τ10 . The following cases are possible: • • τ 0 >τ2 2 τ2 ≥ τ10 == =⇒ τ20 > τ10 τ1 < τ2 < τ10 . The distance dxy is traversed from time instant τ1 to τ10 , and it can be split into distances a and b (a + b = dxy ), where a is the distance traversed from τ1 to τ2 and b is the distance traversed from τ2 to τ10 . Then, τ2 > τ1 ⇒ a > 0 ⇒ b < dxy (20) From equation 20, it is concluded that the time from τ2 to τ10 is not enough to traverse the whole arc < xy >. Therefore, vehicle 2 that departs from node x at time instant τ2 will arrive at node y at τ20 > τ10 . The computational complexity of the existing and proposed procedures for the derivation of the road’s traversal time according to the time instant of departure, for both the investigated cases of speed having constant value or being a linear function of time inside the time interval, are presented in Table II. VI. C ONCLUSIONS In the current paper, the problem of shortest path routing in transportation networks (in terms of travelling time) where the speed in several of the network’s roads is a function of the time interval, was investigated. More precisely, it was considered that the time horizon was split into time intervals, and the speed depended on the time interval. Fast procedures for the derivation of the road’s traversal time according to the time instant of departure have been proposed. For the case of the speed having a constant value inside each time interval (in general, different value for each time interval), the proposed procedure is faster compared to the conventional approaches. Furthermore, for the case of the speed being a linear function of time inside each time interval (in general, different linear function for each time interval), a procedure is also proposed and, to the best of our knowledge, relevant approaches cannot be found in the literature. The proposed procedures were combined with Dijkstra’s algorithm and the resulting algorithms, that are practically applicable and of low complexity, provide optimal shortest path routing in the networks under investigation. Future research will focus on the combination of the proposed procedures with more advanced shortest path routing algorithms that were designed for static networks, in order to derive their versions for time-dependent networks as modelled in the current paper. Examples of such algorithms are A* [15], Contraction Hierarchies [16], SHARC routing [17]. Although time-dependent versions of these algorithms can be found in the literature (e.g., [11] for the time-dependent version of Contraction Hierarchies), these have been designed under the assumption that the traversal time function f xy (τ ) (Section III-B) is a piecewise linear function of τ . However, as shown in Section III-B1, for time-dependent networks as modelled in the current paper, this is not always valid. ACKNOWLEDGMENTS This work was co-funded by the European Regional Development Fund and the Republic of Cyprus through the Research Promotion Foundation (Project New Infrastructure/Strategic/0308/26). R EFERENCES [1] A. D. May, Traffic flow fundamentals, Prentice Hall, 1990. [2] K. Sung, M. G. Bell, M. Seong, and S. Park, Shortest paths in a network with time-dependent flow speeds, European Journal of Operational Research, vol. 121, no. 1, pp. 3239, 2000. [3] E. W. Dijkstra, A note on two problems in connexion with graphs, Numerische Mathematik, vol. 1, pp. 269271, 1959 [4] K. Cooke and E. Halsey, The shortest route through a network with time-dependent internodal transit times, Journal of Mathematical Analysis and Applications, vol. 14, no. 3, pp. 493498, 1966. [5] D. Delling, Time-dependent SHARC-routing, Algorithmica, vol. 60, no. 1, pp. 6094, 2011. [6] G. Nannicini, D. Delling, D. Schultes, and L. Liberti, Bidirectional A* search on time-dependent road networks, Networks, vol. 59, no. 2, pp. 240251, 2012. [7] D. Delling and G. Nannicini, Core routing on dynamic time-dependent road networks, INFORMS J. on Computing, vol. 24, no. 2, pp. 187201, Apr. 2012. [8] D. Delling, P. Sanders, D. Schultes, and D. Wagner, Algorithmics of large and complex networks, J. Lerner, D. Wagner, and K. A. Zweig, Eds. Berlin, Heidelberg: Springer-Verlag, 2009, ch. Engineering Route Planning Algorithms, pp. 117139. [9] D. Delling and D. Wagner, Time-dependent route planning, in Robust and Online Large-Scale Optimization, ser. Lecture Notes in Computer Science, R. Ahuja, R. Mhring, and C. Zaroliagis, Eds. Springer Berlin Heidelberg, 2009, vol. 5868, pp. 207230. [10] B. Ding, J. X. Yu, and L. Qin, Finding time-dependent shortest paths over large graphs, in Proceedings of the 11th International Conference on Extending Database Technology: Advances in Database Technology, ser. EDBT 08. New York, NY, USA: ACM, 2008, pp. 205216. [11] G. V. Batz, R. Geisberger, P. Sanders, and C. Vetter, Minimum time-dependent travel times with contraction hierarchies, J. Exp. Algorithmics, vol. 18, pp. 1.4:1.11.4:1.43, Apr. 2013. [12] I. Chabini and S. Lan, Adaptations of the A* algorithm for the computation of fastest paths in deterministic discrete-time dynamic networks, Trans. Intell. Transport. Sys., vol. 3, no. 1, pp. 6074, Mar. 2002. [13] R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, Network Flows: Theory, Algorithms, and Applications, Upper Saddle River, NJ, USA: Prentice-Hall, Inc., 1993. [14] M. L. Fredman and R. E. Tarjan, Fibonacci heaps and their uses in improved network optimization algorithms, J. ACM, vol. 34, no. 3, pp. 596615, Jul. 1987. [15] P. E. Hart, N. J. Nilsson, and B. Raphael, A formal basis for the heuristic determination of minimum cost paths, IEEE Transactions on Systems Science and Cybernetics, vol. SSC-4(2), pp. 100107, 1968. [16] R. Geisberger, P. Sanders, D. Schultes, and D. Delling, Contraction hierarchies: Faster and simpler hierarchical routing in road networks, in Proceedings of the 7th International Conference on Experimental Algorithms, ser. WEA08. Berlin, Heidelberg: Springer-Verlag, 2008, pp. 319333. [17] R. Bauer and D. Delling, SHARC: Fast and robust unidirectional routing, J. Exp. Algorithmics, vol. 14, pp. 4:2.44:2.29, Jan. 2010.
8cs.DS
Mon. Not. R. Astron. Soc. 000, 1–18 (2007) Printed 7 January 2013 (MN LATEX style file v2.2) Clustered Calibration: An Improvement to Radio Interferometric Direction Dependent Self-Calibration S. Kazemi1⋆, S. Yatawatta2 , S. Zaroubi1 1 Kapteyn Astronomical Institute, University of Groningen, P.O. Box 800, 9700 AV Groningen, the Netherlands Postbus 2, 7990 AA Dwingeloo, the Netherlands arXiv:1301.0633v1 [astro-ph.IM] 3 Jan 2013 2 ASTRON, 7 January 2013 ABSTRACT The new generation of radio synthesis arrays, such as LOFAR and SKA, have been designed to surpass existing arrays in terms of sensitivity, angular resolution and frequency coverage. This evolution has led to the development of advanced calibration techniques that ensure the delivery of accurate results at the lowest possible computational cost. However, the performance of such calibration techniques is still limited by the compact, bright sources in the sky, used as calibrators. It is important to have a bright enough source that is well distinguished from the background noise level in order to achieve satisfactory results in calibration. This paper presents “clustered calibration” as a modification to traditional radio interferometric calibration, in order to accommodate faint sources that are almost below the background noise level into the calibration process. The main idea is to employ the information of the bright sources’ measured signals as an aid to calibrate fainter sources that are nearby the bright sources. In the case where we do not have bright enough sources, a source cluster could act as a bright source that can be distinguished from background noise. For this purpose, we construct a number of source clusters assuming that the signals of the sources belonging to a single cluster are corrupted by almost the same errors. Under this assumption, each cluster is calibrated as a single source, using the combined coherencies of its sources simultaneously. This upgrades the power of an individual faint source by the effective power of its cluster. The solutions thus obtained for every cluster are assigned to each individual source in the cluster. We give performance analysis of clustered calibration to show the superiority of this approach compared to the traditional un-clustered calibration. We also provide analytical criteria to choose the optimum number of clusters for a given observation in an efficient manner. Key words: methods: statistical, methods: numerical, techniques: interferometric 1 INTRODUCTION Low frequency radio astronomy is undergoing a revolution as a new generation of radio interferometers with increased sensitivity and resolution, such as the LOw Frequency ARray (LOFAR)1 , the Murchison Wide-field Array (MWA) 2 and the Square Kilometer Array (SKA)3 are being devised and some are already becoming operational. These arrays form a large effective aperture by the combination of a large number of antennas using aperture synthesis (Thompson et al. 2001). In order to achieve the full potential of such an interferometer, it is essential that the observed data is properly calibrated before any imaging is done. Calibration of radio interferometers refers to the estimation and reduction of errors introduced by the atmosphere and also by the receiver hardware, ⋆ 1 2 3 E-mail: [email protected] http://www.lofar.org http://www.mwatelescope.org http://www.skatelescope.org c 2007 RAS before imaging. We also consider the removal of bright sources from the observed data part of calibration, that enable imaging the weak background sources. For low frequency observations with a wide field of view, calibration needs to be done along multiple directions in the sky. Proper calibration across the full field of view is required to achieve the interferometer’s desired precision and sensitivity giving us high dynamic range images. Early radio astronomy used external (classical) calibration which estimates the instrumental unknown parameters using a radio source with known properties. This method has a relatively low computational cost and a fast execution time, but it generates results strongly affected by the accuracy with which the source properties are known. In addition, existence of an isolated bright source, which is the most important requirement of external calibration, in a very wide field of view is almost impractical, and even when it does, external calibration would only give information along the direction of the calibrator. The external calibration was then improved by self-calibration (Pearson & Readhead 1984). Self-calibration has the advantage of estimating both the source 2 Kazemi et al. and instrumental unknowns, without the need of having a prior knowledge of the sky, only utilizing the instrument’s observed data. Moreover, it can achieve a superior precision by iterating between the sky and the instrumental parameters. The accuracy of any calibration scheme, regardless of the used technique, is determined by the level of Signal to Noise Ratio (SNR). This limits the feasibility of any calibration scheme to only bright sources that have a high enough SNR to be distinguished from the background noise (Bernardi et al. 2010; Liu et al. 2009; Pindor et al. 2010). Note that interferometric images are produced using the data observed during the total observation (integration) time. However, calibration is done at shorter time intervals of that total duration. This increases the noise level of the data for which calibration is executed compared to the one in the images. In other words, there are some faint sources that appear well above the noise in the images while they are well below the noise level during calibration. It has been a great challenge to calibrate such faint sources having a very low SNR. In this paper we present clustered self-calibration, introduced in Kazemi et al. (2011a), and emphasize its better performance compared to un-clustered calibration below the calibration noise level. Existing un-clustered calibration approaches (Intema et al. 2009; Smirnov 2011) can only handle a handful of directions where strong enough sources are present and we improve this, in particular for subtraction of thousands of sources over hundreds of directions in the sky, as in the case for LOFAR (Bregman 2012). The implementation of clustered calibration is performed by clustering the sources in the sky, assuming that all the sources in a single cluster have the same corruptions, and calibrating each cluster as a single source. At the end, the obtained calibration solutions for every source cluster is assigned to all the sources in that cluster. This procedure improves the information used by calibration by incorporating the total of signals observed at each cluster instead of each individual source’s signal. Therefore, when SNR is very low, it provides a considerably better result compared to un-clustered calibration. Moreover, calibrating for a set of source clusters instead of for all the individual sources in the sky reduces the number of directions along which calibration has to be performed, thus considerably cutting down the computational cost. However, there is one drawback in clustered calibration: The corruptions of each individual source in one given cluster will almost surely be slightly different from the corruptions estimated for the whole cluster by calibration. We call this additional error as “clustering error” and in order to get the best performance in clustered calibration, we should find the right balance between the improvement in SNR as opposed to degradation by clustering error. Recently, clustering methods have gained a lot of popularity in dealing with large data sets (Kaufman & Rousseeuw 1990). There are various clustering approaches that could be applied to calibration based on their specific characteristics. An overview of different clustering methods is given in Xu & Wunsch (2008). Clustering of radio sources should take into account (i) their physical distance from each other and (ii) their individual intensity. The smaller the angular separations of sources are, the higher the likelihood that they share the same corruptions in their radiated signals. Moreover, in order to get the best accuracy in the calibration results, there should be a balance between effective intensities of different clusters. Thus, in the clustering procedure, every source should be weighted suitably according to its brightness intensity. The brightness distribution of radio source in the sky is a power law and the spatial distribution is Poisson. Therefore, clustering the sources via probabilistic clustering approaches is com- putationally complex. Hierarchical clustering (Johnson 1967) is a well-known clustering approach with a straight forward implementation suitable for our case. But, its computational cost grows exponentially with the size of its target data set which can be a disadvantage when the number of sources is huge. Weighted K-means clustering (Kerdprasop et al. 2005; MacQueen 1967) is also one of the most used of clustering schemes applicable in clustered calibration. The advantage of this clustering technique is its low computational cost, which is proportional to the number of clusters and the size of the target data set. Nonetheless, we emphasize that the computational time taken by any of the aforementioned clustering algorithms is negligible compared with the computational time taken by the actual calibration. Therefore, we pursue all clustering approaches in this paper. However, the use of Fuzzy C-means clustering (Bezdek 1981) in clustered calibration requires major changes in the calibration data model and will be explored in future work. This paper is organized as follows: First, in section 2 we present the general data model used in clustered calibration. In section 3, we present modified weighted K-means and divisive hierarchical clustering for clustering sources in the sky. Next, in section 4, we focus on analyzing the performance of clustered calibration, with an a priori clustered sky model, and compare the results with un-clustered calibration. In clustered calibration, there is contention between the improvement of SNR by clustering sources and the errors introduced by the clustering of sources itself. Thus, we relate the clustered calibration’s performance to the effective Signal to Interference plus Noise Ratio (SINR) obtained for each cluster. For this purpose, we use statistical estimation theory and the Cramer-Rao Lower Bounds (CRLB) (Kay 1993). In section 5, we derive criteria for finding the optimum number of clusters for a given sky. We use the SINR analysis and adopt Akaike’s Information Criterion (AIC) (Akaike 1973) and the Likelihood Ratio Test (LRT) (Graves 1978) to estimate the optimum number of clusters. We present simulation results in section 6 to show the superiority of clustered calibration to un-clustered calibration and the performance of the presented criteria in detecting the optimum number of clusters. Finally, we draw our conclusions in section 7. Through this paper, calibration is executed by the Space Alternating Generalized Expectation maximization (SAGE) (Fessler & Hero 1994; Yatawatta et al. 2009; Kazemi et al. 2011b) algorithm. Moreover, in our simulations, radio sources are considered to be uniformly distributed in the sky and their flux intensities follow Raleigh distribution, which is the worst case scenario. In real sky models, there usually exist only a few (two or three) number of bright sources which dominate the emission. In the presence of these sources and the background noise, it is impractical to solve for the other faint sources in the field of view individually. Therefore, obtaining a better calibration performance via the clustered calibration approach, compared to the un-clustered one, is guaranteed. Therefore, in section 6 we illustrate this using simulations in which the brightness distribution of sources is a power law with a very steep slope. On top of that, Kazemi et al. (2012); Yatawatta et al. (submitted 2012) also present the performance of clustered calibration on real observations using LOFAR. The following notations are used in this paper: Bold, lowercase letters refer to column vectors, e.g., y. Upper case bold letters refer to matrices, e.g., C. All parameters are complex numbers, unless stated otherwise. The inverse, transpose, Hermitian transpose, and conjugation of a matrix are presented by (.)−1 , (.)T , (.)H , and (.)∗ , respectively. The statistical expectation operator is referred to as E{.}. The matrix Kronecker product and the proper (strict) subset are denoted by ⊗ and (, respectively. In is the n × n identity c 2007 RAS, MNRAS 000, 1–18 Clustered Radio Interferometric Calibration matrix and ∅ is the empty set. The Kronecker delta function is presented by δij . R and C are the sets of Real and Complex numbers, respectively. The Frobenius norm is shown by ||.||. Estimated pac All logarithmic calculations are rameters are denoted by a hat, (.). to the base e. The multivariate Gaussian and Complex Gaussian distributions are denoted by N and CN , respectively. 2 CLUSTERED SELF-CALIBRATION DATA MODEL In this section, we present the measurement equation of a polarimetric clustered calibration in detail (Hamaker et al. 1996; Hamaker 2006). Suppose we have a radio interferometer consisting of N polarimetric antennas where each antenna is composed of two orthogonal dual-polarization feeds that observe K compact sources in the sky. Every i-th source signal, i ∈ {1, 2, . . . , K}, e pi = [vXpi vY pi ]T at X and Y causes an induced voltage of v dipoles of every p-th antenna, p ∈ {1, 2, . . . , N }. In practice, T epi = Jpi ei , v (1) where ei = [eXi eY i ] is the source’s electric field vector and Jpi represents the 2 × 2 Jones matrix (Hamaker et al. 1996) corresponding to the direction-dependent gain corruptions in the radiated signal. These corruptions are originated from the instrumental (the beam shape, system frequency response, etc.) and the propagation (tropospheric and ionospheric distortions, etc.) properties which later on, in this section, will be explained in more detail. The signal vp obtained at every antenna p is a linear suepi where i ∈ perposition of the K sources corrupted signals, v {1, 2, . . . , K}, plus the antenna’s thermal noise. The multitude of ignored fainter sources also contributes to this additive noise. The voltages collected at the instrument antennas get corrected for geometric delays, based on the location of their antennas, and some instrumental effects, like the antenna clock phases and electronic gains. Then, they are correlated in the array’s correlator to generate visibilities (Hamaker et al. 1996). The visibility matrix of the baseline p − q, E{vp ⊗ vqH }, is given by ! K X H Vpq = Gp Jpi (θθ )Ci{pq} Jqi (θθ ) GH (2) q + Npq . i=1 In Eq. (2), θ ∈ CP , P = 4KN , is the unknown instrumental and sky parameter vector, Npq is the additive 2 × 2 noise matrix of the baseline p − q, and Ci{pq} is the Fourier transform of the i-th source coherency matrix Ci = E{ei ⊗ eH i } (Born & Wolf 1999; Hamaker et al. 1996). If the i-th source radiation intensity is Ii , then Ci = I2i I2 . Considering this source to have equatorial coordinate, (Right Ascension α, Declination δ), equal to (αi , δi ), and the geometric components of baseline p − q to be (u, v, w), then √ 2 2 (3) Ci{pq} = e−2π(ul+vm+w( 1−l −m −1)) Ci , where 2 = −1 and, l = sin(αi − α0 )cos(δi ), m = cos(δ0 )sin(δi ) − cos(αi − α0 )cos(δi )sin(δ0 ), are the source direction components corresponding to the observation phase reference of (α0 , δ0 ) (Thompson et al. 2001). The errors common to all directions, such as the receiver delay and amplitude errors, are given by Gp and Gq . Initial calibration at a finer time c 2007 RAS, MNRAS 000, 1–18 3 and frequency resolution is performed to estimate and correct for Gp -s and the corrected visibilities are obtained as −H e pq = G−1 V . p Vpq Gq (4) The remaining errors are unique to a given direction, but residual errors in Gp -s are also absorbed into these errors, which are denoted by Jpi in the usual notation. Vectorizing Eq. (4), the final visibility vector of the baseline p − q is given by vpq = K X i=1 J∗qi (θθ ) ⊗ Jpi (θθ )vec(Ci{pq} ) + npq . (5) Stacking up all the cross correlations (measured visibilities) and noise vectors in y and n, respectively, the un-clustered selfcalibration measurement equation is given by y= K X si (θθ ) + n. (6) i=1 In Eq. (6), y, n ∈ CM , M = 2N (N − 1), the noise vector is considered to have a zero mean Gaussian distribution with covariance Π , n ∼ N (0, Π M ×M ), and the nonlinear function si (θθ ) is defined as   J∗2i (θθ ) ⊗ J1i (θθ )vec(Ci{pq} )   J∗3i (θθ ) ⊗ J1i (θθ )vec(Ci{pq} )   (7) si (θθ ) ≡  . ..   . J∗Ni (θθ ) ⊗ J(N−1)i (θθ )vec(Ci{pq} ) Calibration is essentially the Maximum Likelihood (ML) estimation of the unknown parameters θ (P complex values or 2P real values), or of the Jones matrices J(θθ ), from Eq. (6) and removal of the K sources. Note that calibration methods could also be applied to the uncorrected visibilities of (4) to estimate Gp and Gq errors as well. The Jones matrix Jpi , for every i-th direction and at every p-th antenna, is given as Jpi ≡ Epi Zpi Fpi . (8) In Eq. (8), Epi , Zpi , and Fpi are the antenna’s voltage pattern, ionospheric phase fluctuation, and Faraday Rotation Jones matrices, respectively. In practice, the E, Z, and F Jones matrices obtained for nearby directions and for a given antenna are almost the same. Thus, for every antenna p, if the i-th and j-th sources have a small angular separation from each other, we may consider Jpi ∼ = Jpj . (9) This is the underlying assumption for clustered calibration. Clustered calibration first assigns source clusters, Li for i ∈ {1, 2, . . . , Q} where Q ≪ K, on which the sky variation is considepi which ered to be uniform. Then, it assumes there exists a unique J is shared by all the sources of the i-th cluster Li , i ∈ {1, 2, . . . , Q}, at receiver p, p ∈ {1, 2, . . . , N }. Based on that, the visibility at every baseline p − q, given by Eq. (4), is reformulated as e pq = V Q X i=1 epi (θe){ J X l∈Li e eH e Cl{pq} }J qi (θ ) + Npq . (10) e pq is the clustered calibration’s effective noise at In Eq. (10), N baseline p − q which will be explicitly discussed at section 4. Note that clustered calibration estimates the new unknown parameter 4 Kazemi et al. e θe ∈ CP where Pe = 4QN . Denoting the effective signal of every i-th cluster at baseline p − q by X e i{pq} ≡ C Cl{pq} , (11) l∈Li the clustered calibration visibility vector at this baseline (vectorized form of Eq. (10)) is vpq = Q X i=1 epi (θe)vec(C e i{pq} ) + n e∗qi (θe) ⊗ J e pq . J (12) Finally, stacking up the visibilities of all the instrument’s baselines in vector y, clustered calibration’s general measurement equation is resulted as y= Q X i=1 e e. si (θe) + n (13) In Eq. (13) e si is defined similar to si in Eq. (7) where J and C are e and C, e respectively. replaced by J Because of the similarity between the clustered and the unclustered calibration’s measurement equations presented by Eq. (13) and Eq. (6), respectively, they could utilize the same calibration techniques. Thus, the only difference between these two types of calibration is that clustered calibration solves for clusters of sources instead of for the individual ones. That upgrades the signals which should be calibrated for from Eq. (3) to Eq. (11). 3 CLUSTERING ALGORITHMS Clustering is grouping a set of data so that the members of the same group (cluster) have some similarities (Kaufman & Rousseeuw 1990). This similarity is defined based on the application of the clustering method. We need to define clustering schemes in which two radio sources merge to a single cluster based on the similarity in their direction dependent gain errors ( Eq. (8) ). Radiations of sources that are close enough to each other in the sky are assumed to be affected by almost the same corruptions ( Eq. (9) ). Based on that, we aim to design source clusters with small angular diameters. On the other hand, every cluster’s intensity is the sum of the intensities of its members ( Eq. (11) ). In order to keep a balance between different clusters’ intensities, we intend to apply weighted clustering techniques in which the sources are weighted proportional to their intensities. Suppose that the K sources, x1 , x2 , . . . , xK have (α1 , δ1 ), (α2 , δ2 ), . . . , (αK , δK ) equatorial coordinates, respectively. TheP aim is to provide Q clusters so that the objective Q function f = q=1 D(Lq ) is minimized. D(Lq ) is the angular diameter of cluster Lq , for q ∈ {1, 2, . . . , Q}, defined as D(Lq ) ≡ max {d(xi , xj )|xi , xj ∈ Lq }, For defining the centroids, we associate a weight to every source xi , as wi = w(xi ) ≡ Ii , I∗ for i ∈ {1, 2, . . . , K}, (16) where Ii is the source’s intensity and I ∗ = min {I1 , I2 , . . . , IK }. Applying the weights to the clustering procedure, the centroids of the clusters lean mostly towards the brightest sources. That causes a tendency in faint sources to gather with brighter sources close to them into one cluster. Thus, their weak signals are promoted being added up with some brighter sources’ signals. Moreover, very strong sources will be isolated such that their signals are calibrated individually, without being affected by the other faint sources. We cluster radio sources using weighted K-means (Kerdprasop et al. 2005) and divisive hierarchical clustering (Johnson 1967) algorithms. Since the source clustering for calibration is performed offline, its computational complexity is negligible compared with the calibration procedure itself. 3.1 Weighted K-means clustering Step 1. Select the Q brightest sources, x1∗ , x2∗ , . . . , xQ∗ , and initialize the centroids of Q clusters by their locations as for q ∈ {1, 2, . . . , Q}, q ∗ ∈ {1∗ , 2∗ , . . . , Q∗ }. (17) Step 2. Assign each source to the cluster with the closest centroid, defining the membership function ( 1, if d(xi , cq ) = min{d(xi , cj )|j = 1, . . . , Q} mLq (xi ) = 0, Otherwise cq ≡ [αq∗ , δq∗ ], Step 3. Update the centroids by PK mLq (xi ) wi xi cq = Pi=1 , K i=1 mLq (xi ) wi for q ∈ {1, 2, . . . , Q}. (18) Repeat steps 2 and 3 until there are no reassignments of sources to clusters. 3.2 Divisive hierarchical clustering Step 1. Initialize the cluster counter Q′ to 1, assign all the K sources to a single cluster L1 and ∅ to a set of null clusters A. Step 2. Choose cluster Lq∗ , for q ∗ ∈ {1, 2, . . . , Q′ } − A, with the largest angular diameter D(Lq∗ ) = max{D(Lq )|q ∈ {1, 2, . . . , Q′ } − A}. (19) Step 3. Apply the presented weighted K-means clustering technique to split Lq∗ into two clusters, L′q∗ and L′′q∗ . Step 4. If D(L′q∗ ) + D(L′′q∗ ) < D(Lq∗ ), then set Q′ = Q′ + 1, Lq∗ ≡ L′q∗ , LQ′ ≡ L′′q∗ , and A = ∅, otherwise set A = A∪{q ∗ }. Repeat steps 2, 3, and 4 until Q′ = Q. (14) and d(., .) is the angular separation between any two points on the celestial sphere. Having two radio sources a and b with equatorial coordinates (αa , δa ) and (αb , δb ), respectively, the angular separation d(a, b), in radians, is obtained by p cos2 δb sin2 ∆α + [cosδa sinδb − sinδa cosδb cos∆α]2 −1 tan , sinδa sinδb + cosδa cosδb cos∆α (15) where ∆α = αb − αa . 3.3 Comparison of clustering methods Hierarchical clustering method tends to design clusters with almost the same angular diameters, whereas, the K-means clustering method tends to keep the same level of intensity at all its clusters. In practice, since hierarchical clustering method makes less errors in dedicating the same solutions to sources in small clusters, it performs better than Weighted K-means clustering in a clustered calibration procedure. But, when the number of sources (and clusters) c 2007 RAS, MNRAS 000, 1–18 42 42 41 41 40 40 δ [deg.] δ [deg.] Clustered Radio Interferometric Calibration 39 38 39 38 37 37 36 36 35 278 276 274 α [deg.] 272 35 270 Figure 1. A simulated 8 by 8 degrees sky of fifty point sources with intensities below 3 Jy. The source positions and their brightness are following uniform and Rayleigh distributions, respectively. The marker sizes are proportional to sources intensities. In this section, we explain the reasons for clustered calibration’s better performance, compared to un-clustered calibration, at a low c 2007 RAS, MNRAS 000, 1–18 276 274 α [deg.] 272 270 42 41 3.3.1 Example 1: Weighted K-means and hierarchical clustering 4 PERFORMANCE ANALYSIS 278 Figure 2. Fifty point sources are clustered into ten source clusters by Weighted K-means clustering technique. There is not a good balance between different clusters angular diameters. is very large (Q > 100), its prohibitive computational costs makes the fast K-means clustering method preferable. 40 δ [deg.] We simulate an 8 by 8 degrees sky with fifty point sources with intensities below 3 Jansky (Jy). The source positions and their brightness follow uniform and Rayleigh distributions, respectively. The result is shown by Fig. 1 in which the symbol sizes are proportional to intensities of sources. Weighted K-means and divisive hierarchical clustering methods are applied to cluster the fifty sources into ten source clusters. The results are presented in Fig. 2 and Fig. 3, respectively. Fig. 2 shows that the Weighted K-means clustering could design source clusters with considerably large angular diameters. Assigning the same calibration solutions to the sources of these large clusters could cause significant errors. However, as Fig. 3 shows, this is not the case for the hierarchical clustering and it constructs clusters with almost the same angular diameters. Since the number of sources in this simulation is not that large (K = 50), the difference between execution time of the two clustering methods is not significant. Hence in such a case, the use of hierarchical clustering method, rather than the Weighted K-means, is advised. However, this is not the case when we have a large number of sources, and subsequently a large number of source clusters, in the sky. To demonstrate this, we use the two clustering techniques for clustering thousand of sources (K = 1000) into Q source clusters, Q ∈ {3, 4, . . . , 100}. The methods’ computational times versus the number of clusters are plotted in Fig. 4. As Fig. 4 shows, for large Qs, the computational cost of Weighted K-means is much cheaper than the one of the hierarchical clustering. That can make the Weighted K-means clustering method more suitable than the hierarchical clustering for such a case. 5 39 38 37 36 35 278 276 274 α [deg.] 272 270 Figure 3. Fifty point sources are clustered into ten source clusters via hierarchical clustering method. Different clusters have almost the same angular diameters. SNR (Kazemi et al. 2012). This superiority is in the sense of achieving an unprecedented precision in solutions with a considerably low computational complexity, given the optimum clustering scheme. In the next section, we present different criteria for finding the optimum number of clusters at which the clustered calibration performs the best. 4.1 Cramer-Rao Lower Bounds The most fundamental assumption in clustered calibration is that the sources at the same cluster have exactly the same corruptions in their radiated signals. This assumption is of course incorrect, nonetheless, it provides us with a stronger signal, the sum of the signals in the whole cluster. We present an analytic comparison of clustered and un-clustered calibration where we use the Cramer- 6 Kazemi et al. Computational time (s) 800 In other words, the variance of any unbiased estimator of the unknown parameter vector θ is bounded from below by the diagonal elements of [I(θθ )]−1 . Using (23) and (26), the Fisher information matrix of the visibility vector y is obtained as Weighted K−means Divisive Hierarchical 600 I(θθ ) = 2σ −2 Re(JsH Js ), 400 where Js is the Jacobian matrix of s with respect to θ Js (θθ ) = 200 0 0 (27) 20 40 60 Number of clusters 80 100 Figure 4. Weighted K-means and divisive hierarchical clustering methods computational costs. For small number of source clusters, there is no difference between execution times of the two clustering methods. But, when the number of source clusters is large, the computational cost of Weighted K-means becomes much cheaper than the one of the hierarchical clustering. Rao Lower Bound (CRLB) (Kay 1993) as a tool to measure the performance of the calibration. 4.1.1 Estimations of CRLB for two sources at a single cluster For simplicity, first consider observing two point sources at a single baseline, lets say baseline p − q. Based on Eq. (4), the visibilities are given by H e pq = Jp1 C1{pq} JH V q1 + Jp2 C2{pq} Jq2 + Npq , (20) e pq , the visiin the un-clustered calibration strategy. Vectorizing V bility vector is y = J∗q1 ⊗ Jp1 vec(C1{pq} ) + J∗q2 ⊗ Jp2 vec(C2{pq} ) + npq . Assuming npq ∼ CN (0, σ 2 I4 ), we have y ∼ CN (s(θθ ), σ 2 I4 ), (21) where s(θθ ) ≡ X i=1,2 J∗qi (θθ ) ⊗ Jpi (θθ )vec(Ci{pq} ). (22) Using Eq. (21), the log-likelihood function of the visibility vector y is given by π L(θθ |y) = −4ln{ 2 } − σ −2 (y − s(θθ ))H (y − s(θθ )). (23) σ CRLB is a tight lower bound on the error variance of any unbiased parameter estimators (Kay 1993). Based on its definition, if the log-likelihood function of the random vector y, L(θθ |y), satisfies the “regularity” condition   ∂ Ey L(θθ |y) = 0, for all θ , (24) ∂θθ then for any unbiased estimator of θ , θb, var(θbi ) > [I −1 (θθ )]ii , for i ∈ {1, . . . , M }, where I(θθ ) is the Fisher information matrix defined as  2  ∂ L(θθ |y) I(θθ ) = − Ey . ∂θθ ∂θθ T (25) (26) 2 X ∂ {J∗ ⊗ Jpi }[I4 ⊗ vec(Ci{pq} )]. θ qi ∂θ i=1 (28) Thus, variations of any unbiased estimator of parameter vector θ , lets say θb, is bounded from below by the CRLB as Var(θb) > [2σ −2 Re(JsH Js )]−1 . (29) Lets try to bound the error variations of the clustered calibration parameters assuming that the two sources construct a single cluster, called cluster number 1. We reform Eq. (20) as e p1 (C1{pq} +C2{pq} )J eH Vpq = J q1 +Γ1{pq} +Γ2{pq} +Npq , (30) where Γi{pq} , referred to as the “clustering error” matrices, are given by e eH Γi{pq} = Jpi Ci{pq} JH qi − Jp1 Ci{pq} Jq1 , (31) e pq ≡ Γ1{pq} + Γ2{pq} + Npq . N (32) e∗q1 ⊗ J ep1 vec(C1{pq} + C2{pq} ) + n e pq , y=J (33) ep1 (θe) is the clustered calibration solution at receiver p. and J e pq in Eq. (30) implies that what is considered as the noise matrix N the clustered calibration data model, Eq. (10), is in fact Vectorizing Eq. (30), the clustered calibration visibility vector is obtained by e pq ). e pq = vec(N where n We point out that depending on the observation as well as the positions of the two sources on the sky, the clustering error Γi{pq} will have different properties. However, in order to study the performance of the clustered calibration in a statistical sense, and to simplify our analysis, we make the following assumptions. (i) Consider statistical expectation over different observations and over different sky realizations where the sources are randomly e → E{J} distributed on the sky. In that case, almost surely E{J} and consequently E{Γi{pq} } → 0. (34) In other words, we assume the clustering error to have zero mean over many observations of different parts of the sky. (ii) We assume that the closer the sources are together in the sky, the smaller the errors introduced by clustering would be. Therefore, given a set of sources, the clustering error will reduce as the number of clusters increase. In fact this error introduced by clustering vanishes when the number of clusters is equal to the number of sources (each cluster contains only one source). Therefore, given a set of sources, the variance of Γi{pq} will decrease as the number of clusters increase. Using Eq. (34) and bearing in mind that E{Npq } = 0, we eH e pq ∼ CN (0, σ e 2 I4 . can consider n e 2 I4 ) where E{e npq n pq } = σ Therefore, y ∼ CN (e s, σ e 2 I4 ), c 2007 RAS, MNRAS 000, 1–18 Clustered Radio Interferometric Calibration The CRLBs obtained for the un-clustered and clustered calibrations in Eq. (29) and Eq. (35), respectively, are both almost equal to the inverse of the Signal to Interference plus Noise Ratio (SINR), SINR−1 . In un-clustered calibration, the effective signal for the faintest source is C2{pq} where the noise is Npq . Therefore, SINR for this source is 2000 Clustered calibration Un−clustered calibration CRLB 1500 1000 ||C2{pq} ||2 . ||Npq ||2 SINR2 = (36) But, in clustered calibration, the effective signal and noise are e {pq} ≡ C1{pq} + C2{pq} and N e pq , respectively. Thus, SINR C for the cluster is 500 0 0 7 1000 2000 3000 4000 Clustered calibration effective noise power 5000 Figure 5. Clustered and un-clustered calibrations CRLB. When the effece 2 , is small enough, then tive noise power of the clustered calibration, ||N|| its CRLB is lower than of the un-clustered calibration’s and it reveals a superior performance. e∗q1 ⊗ J e p1 vec(C1{pq} + C2{pq} ), e s≡J and similar to Eq. (29), we have b σ −2 Re(JesH Jes )]−1 . Var(θe) > [2e (35) We use numerical simulations to compare the un-clustered and clustered calibrations performances via their CRLBs which are given by Eq. (29) and Eq. (35), respectively. 4.1.2 Example 2: CRLB for two sources and one cluster We simulate a twelve hour observation of two point sources with intensities I1 = 11.25 and I2 = 2.01 Jy at sky coordinates (l, m) equal to (−0.014, −0.005) and (−0.011, −0.010) radians, respectively. We use the uv-coverage of Westerbork Synthesis Radio Telescope (WSRT) with 14 receivers in this simulation. We Consider the J Jones matrices in Eq. (20) to be diagonal. Their amplitude and phase elements follow U(0.75, 0.95) and U(0.003, 0.004) distributions, respectively. The background noise is N ∼ CN (0, 10I). Jones matrices of the clustered calibration, e p1 for p = 1, 2, are obtained as Jp1 + U(0.02, 0.40)ejU (0.5,2) . J e matrices, we calculated CRLB of the unFor 20 realizations of J clustered and clustered calibrations using Eq. (29) and Eq. (35), respectively. The results are presented in Fig. 5. As shown in this figure, for small enough errors matrices Γ of Eq. (31), the clustered calibration’s CRLB stands below the un-clustered calibration’s CRLB. On the other hand, with increasing power of error mae the un-clustered calibratrices, or the power of effective noise N, tion’s CRLB becomes lower than the clustered calibration’s CRLB. 4.1.3 Analysis of CRLB Generally, if source 1 is considerably brighter than source 2, ||C1{pq} || ≫ ||C2{pq} ||, and if the weak source power is much lower than the noise level, ||C2{pq} || ≪ ||Npq ||, then clustered calibration’s performance is better than un-clustered calibration. Note that the worst performance of both calibrations is at the faintest source and we are more concerned to compare the CRLBs for this source. c 2007 RAS, MNRAS 000, 1–18 SINRc = e {pq} ||2 ||C . e pq ||2 ||N (37) Clustered calibration has an improved performance when SINRc ≫ SINR2 . (38) Consider the two possible extremes in a clustered calibration procedure: (i) Clustering many sources in a large field of view to a very small number of clusters. In this case, the angular diameter of a cluster is probably too large for the assumption of uniform corruptions to apply. Subsequently, dedicating a single solution to all the sources of every cluster by clustered calibration introduces clustering error matrices Γ with a large variance (see Eq. (31)). Having high interference power, the clustered calibration effective noise e of Eq. (32) becomes very large. Therefore, clustered calibration N SINR will be very low and it does not produce high quality results. (ii) Clustering sources in a small field of view to a very large number of clusters. In this case, the variance of Γ matrices are almost zero while the signal powers of source clusters are almost as low as of the individual sources. Therefore, the SINR of clustered calibration is almost equal to the un-clustered calibration SINR and the calibration performance is expected to be almost the same as well. Thus, the best efficiency of clustered calibration is obtained at the smallest number of clusters for which Eq. (38) is satisfied. We use the SINR of Eq. (38) as an efficient criterion for detecting the optimum number of clusters. 4.1.4 Generalization to many sources and many clusters For the visibility vector y of un-clustered calibration’s general data model, presented by Eq. (6), we have y ∼ CN ( K X si (θθ ), Π ). (39) i=1 Therefore, the CRLB of un-clustered calibration is  X −1 K K X var(θθ ) > 2 Re ( , Jsi (θθ ))H Π −1 ( Jsi (θθ )) i=1 i=1 where Jsi is the Jacobian matrix of si with respect to θ . Computing the exact CRLB is more complicated when we have clustered calibration. In the clustered calibration measurement equation, given by Eq. (13), we have e≡ n K X i=1 Γ i + n, (40) 8 Kazemi et al. −10 where n is the un-clustered calibration’s noise vector, (41) and Γ i{pq} is given by Eq. (31). Due to the existence of the nuisance parameters Γ i in the clustered calibration data model, calculation of its conventional CRLB is impractical. This leads us to the use of Cramer-Rao like bounds devised in the presence of the nuisance parameters (Gini & Reggiannini 2000). We apply the Modified CRLB (MCRLB) (Gini et al. 1998) to the performance of clustered calibration. b̃ The MCRLB for estimating the errors of θ in the presence of the nuisance parameters Γ (clustering error) is defined as    −1 ∂ ∂ b̃ Γ θ var(θ ) > Ey,ΓΓ − Ey|ΓΓ ln{P (y|Γ ; θ̃ )} , T ∂θ̃θ ∂θ̃θ (42) Γ; θ̃θ ) is the Probability Density Function (PDF) of the where P (y|Γ visibility vector y assuming that the Γ matrices of Eq. (41) are a priori known. Since n ∼ CN (0, Π ), from Eq. (13) we have Q K X X Γ ∼ CN ([ Γ i ], Π ), y|Γ s̃i + 2 1 0  ∂ ∂ T θ ∂θ̃ ∂θ̃ θ  Γ θ ln{P (y|Γ ; θ̃ )} , which 20 30 Number of clusters 40 50 −6 10 Q Q K K X X X X JΓ i (θ̃θ )]}. JΓ i (θ̃θ )]H Π −1 [ Js̃i (θ̃θ ) + 2Re{[ Js̃i (θ̃θ ) + i=1 Clustered calibration Un−clustered calibration i=1 Note that Ey,ΓΓ in Eq. (42) could be estimated by Monte-Carlo method. As a rule of thumb, reducing the heavy computational cost of MCRLB, one can interpret the SINR test of Eq. (38) as follows: If in average the effective SINR of clustered calibration, SINRc , gets higher than the effective SINR of un-clustered calibration obtained for the weakest observed signal, SINRw , E{SINRc } ≫ E{SINRw }, x 10 9 8 SINR i=1 10 Figure 6. Clustered calibration’s MCRLB. For very small Q, where the effect of interference is large, MCRLB is high. By increasing the number of clusters, MCRLB decreases and reaches its minimum where the best performance of the clustered calibration is expected. After that, due to the dominant effect of the background noise, MCRLB starts to increase until it reaches the un-clustered calibration CRLB. is called the modified Fisher information, is equal to i=1 3 i=1 i=1 and therefore in Eq. (42), − Ey|ΓΓ (43) Clustered calibration Un−clustered calibration 4 MCRLB Γi{12} )T . . . vec(Γ Γi{(N−1)N} )T ]T , Γ i = [vec(Γ 5 x 10 7 6 5 4 (44) then clustered calibration can achieve a better results. In Eq. (44), the expectation is taken with respect to the noise N, error matrices Γ , and all the baselines. 4.1.5 Example 3: MCRLB and SINR estimations We simulate WSRT including N = 14 receivers which observe fifty sources with intensities below 15 Jy. The source positions and their brightness follow uniform and Rayleigh distributions, respectively. The background noise is N ∼ CN (0, 15IM ), where M = 2N (N − 1) = 364. We cluster sources using divisive hierarchical clustering, into Q number of clusters where Q ∈ e are gener{3, 4, . . . , 50}. Clustered calibration’s Jones matrices, J, jU (0,0.2) ated as U(0.9, 1.1)e . Since for smaller number of clusters, we expect larger interference (errors) soP in clustered calibration’s 150 lutions, for every Q, we consider 50 i=1 Γi ∼ CN (0, Q IM ). The choice of the complex Gaussian distribution for the error matrices Γ is due to the central limit theorem and the assumptions made in section 4.1.1. We proceed to calculate the clustered calibration’s MCRLB, given by Eq. (42), and E{SINRc }, utilizing the Monte-Carlo method. Jacobian matrices for MCRLB are calculated numerically and in computation of E{SINRc }, signal power of every cluster is obtained only using the cluster’s brightest and faintest sources. The 3 0 10 20 30 Number of clusters 40 50 Figure 7. Clustered calibration’s SINR. SINR is low for small Q, when the interference is large. By increasing the number of clusters the SINR increases and gets its highest level for which the best performance of the calibration is expected. After that, it decreases due to the dominant effect of the background noise, and converges to the un-clustered calibration SINR. estimated results of MCRLB and E{SINRc } are presented by Fig. 6 and Fig. 7, respectively. As we can see in Fig. 6, for very small Q, where the effect of interference is large, MCRLB is high. By increasing the number of clusters, MCRLB decreases and reaches its minimum where the best performance of the clustered calibration is expected. After that, due to the dominant effect of the background noise, MCRLB starts to increase until it reaches the CRLB of unclustered calibration. The same result is derived from E{SINRc } plot of Fig. 7. As Fig. 7 shows, E{SINRc } is low for very small Q, when the interference (i.e., the error due to clustering) is large. By increasing the number of clusters, E{SINRc } increases and gets its peak for which the clustered calibration performs the best. After that, it decreases and converges to the E{SINR} of un-clustered calibration. c 2007 RAS, MNRAS 000, 1–18 Clustered Radio Interferometric Calibration 4.2 Computational cost In the measurement equation of un-clustered calibration, presented in Eq. (6), we have M = 2N (N − 1) constraints given by the visibility vector y, and need to solve for P = 4KN unknown parameters θ . If P > M , then Eq. (6) will be an under-determined non-linear system. This clarifies the need of having a small enough N (number of antennas) and a large enough K (number of sources) for estimating θ . However, clustered calibration, Eq. (13), has the advantage of decreasing the number of directions, K, relative to the number of source clusters, Q ≪ K. This considerably cuts down the number of unknown parameters P that needs to be calibrated, thus reducing the computational cost of calibration. 5 SELECTION OF NUMBER OF CLUSTERS Consider a clustered calibration procedure with a predefined clustering scheme. There is no guarantee that the calibration results for Q number of clusters, where Q ∈ {1, 2, . . . , K} is randomly chosen, is the most accurate. Thus, we seek the optimum number of clusters at which the clustered calibration performs the best. In this section, we describe the use of: (i) Akaike’s Information Criterion (AIC) (Akaike 1973), as well as (ii) Likelihood-Ratio Test (LRT) (Graves 1978), in finding this optimum Q for a given observation. Some other alternative criteria could also be found in Wax & Kailath (1985). Note that for different clustering schemes the optimum Q is not necessarily the same. We utilize Akaike’s Information Criterion (AIC) to find the optimum Q for clustered calibration. e ∼ CN (0, σ Consider having n e 2 IM ) in the general data model of clustered calibration, Eq. (13). Then, the log-likelihood of the visibility vector y is given by = − −M log π − M log σ e2 Q Q X X 1 e))H (y − e e (y − s ( θ si (θe)). i σ e2 i=1 i=1 1 c (y − σ e2 = M i=1 e si (θe))H (y − Q X i=1 = −M log π − M − M log{ e si (θe)). (46) Q Q X X 1 e e (y − si (θe))H (y − si (θe))}. (47) M i=1 i=1 Using Eq. (47), the AIC is given by b AIC(Q) = −2L(θe|y) + 2(2Pe). (48) The optimum Q is selected as the one that minimizes AIC(Q). 5.2 Likelihood-Ratio Test (LRT) Errors in clustered calibration originate from the system (sky and instrumental) noise, “clustering errors” introduced in section 4.1.1, c 2007 RAS, MNRAS 000, 1–18 θepi = [Re(Je11,p ) Im(Je11,p ) . . . Re(Je22,p ) Im(Je22,p )]Ti . (50) T T zpkl = [θepk θepl ]T . (51) In fact, we are concatenating the solutions of the same antenna for two different directions (clusters) together. We define the null H0 model as (45) Substituting Eq. (46) in Eq. (45), we arrive at the maximum likelihood estimation of θe, b L(θe|y) i Then, the parameter vector θepi (corresponding to the i-th direction and p-th antenna) is obtained by H0 : zpkl ∼ N (m, Σ0 ). (52) m = [m̄(θepk )T m̄(θepl )T ]T , (53) where The maximum likelihood estimation of the noise variance σ e 2 is Q X and “solver noise” which is referred to as errors produced by the calibration algorithm itself. We assume that the true Jones matrices along different directions (clusters) at the same antenna are statistically uncorrelated. Note that this assumption is only made for the LRT to produce reasonable results and this assumption is not needed for clustered calibration to work. Therefore, if such correlations exist, they are caused by the aforementioned errors. Consequently, the more accurate the clustered calibration solutions are, the smaller their statistical similarities would be. Based on this general statement, the best number of clusters in a clustered calibration procedure is the one which provides us with the minimum correlations in the calibrated solutions. Note that for a fixed measurement, the correlation due to the system noise is fixed. Therefore, differences in the statistical similarities of solutions obtained by different clustering schemes are only due to “clustering errors” and “solver noise”. To investigate the statistical interaction between the gain solutions we apply the Likelihood-Ratio Test (LRT). e pi (θe) for directions i, Consider the clustered calibration solution J i ∈ {1, 2, . . . , Q}, at antennas p, where p ∈ {1, 2, . . . , N }, " # Je11,p Je12,p e . (49) Jpi = Je21,p Je22,p Let us define for each antenna p and each pair of directions k and l, where k and l are belong to {1, 2, ..., Q}, a vector zpkl as 5.1 Akaike’s Information Criterion (AIC) L(θe|y) 9 and Σ0 = " s2 (θepk ) 0 0 s2 (θepl ) # . (54) In Eq. (53) and Eq. (54), m̄ and s2 are denoting sample mean and sample variance, respectively. Note that having a large number of samples in hand, the assumption of having a Gaussian distribution for solutions is justified according to the Central Limit theorem. The structure of the variance matrix Σ0 tells us that the statistical correlation between the components of the random vector zqkl , or between the solutions θepk and θepl , is zero. This is the ideal case in which there are no estimation errors. To investigate the validity of the null model compared with the case in which there exists some correlation between the solutions, we define the alternative H1 model as H1 : zpkl ∼ N (m, Σ1 ), where the variance matrix Σ1 is given by   s2 (θepk ) Cov(θepk , θepl ) . Σ1 =  Cov(θepk , θepl )T s2 (θepl ) (55) (56) 10 Kazemi et al. Cov(θepk , θepl ) in Eq. (56) is the 8 × 8 sample covariance matrix. Using the above models, the Likelihood-Ratio is defined as   Likelihood for null model Λ = −2ln , (57) Likelihood for alternative model which has a χ2 distribution with 64 degrees of freedom. As Λ becomes smaller, the null model, in which the statistical correlation between the solutions is zero, becomes more acceptable rather than the alternative model. Therefore, the smaller the Λ is, the less the clustered calibration’s errors are, and vice-versa. 6 SIMULATION STUDIES We use simulations to compare the performance of un-clustered and clustered calibration. Working with simulations has the advantage of having the true solutions available, which is not the case in real observations. That makes the comparison much more objective. Nevertheless, the better performance of the clustered calibration in comparison with the un-clustered ones in calibrating for real observations of LOFAR is also shown by Kazemi et al. (2011a); Yatawatta et al. (submitted 2012). We simulate an East-West radio synthesis array including 14 antennas (similar to WSRT) and an 8 by 8 degrees sky with fifty sources with low intensities, below 3 Jy. The source positions and their brightness follow uniform and Rayleigh distributions, respectively. The single channel simulated observation at 355 MHz is shown in Fig. 8. We proceed to add gain errors, multiplying source coherencies by the Jones matrices, as it is shown in Eq. (2), to our simulation. The amplitude and phase of the Jones matrices’ elements are generated using linear combination of sine and cosine functions. We aim at simulating a sky with almost uniform variations on small angular scales. In other words, we provide very similar Jones matrices for sources with small angular separations. To accomplish this goal, for every antenna, we first choose a single direction as a reference and simulate its Jones matrix as it is explained before. Then, for the remaining forty nine sources, at that antenna, the Jones matrices (amplitude and phase terms) are that initial Jones matrix multiplied by the inverse of their corresponding angular distances from that reference direction. The result of adding such gain errors to our simulation is shown in Fig. 9. 6.1 Performance comparison of the Clustered and un-clustered calibrations at SNR=2 We add noise n ∼ CN (0, σ 2 I) with σ 2 = 28, as it is shown in Eq. (6), to our simulation. The result has a SN R = 2 and is presented in Fig. 10. We have chosen to present the case of SN R = 2 since for this particular simulated observation both the divisive hierarchical and the weighted K-means clustered calibrations achieve their best performances at the same number of clusters, as will be shown later in this section. We apply un-clustered and clustered calibration on the simulation to compare their efficiencies. The fifty sources are grouped into Q ∈ {3, 4, . . . , 49} number of clusters, using the proposed divisive hierarchical and weighted K-means clustering algorithms. Self-calibration is implemented via Space Alternating Generalized Expectation Maximization (SAGE) algorithm (Fessler & Hero 1994; Yatawatta et al. 2009; Kazemi et al. 2011b) with nine iterations. Plots of the averaged Frobenius distance between the simulated (true) Jones matrices and the obtained solutions is shown in Fig. 11. As we can see in Fig. 11, for both clustering schemes, increasing the number of clusters decreases this distance and the minimum is reached at approximately thirty three clusters (Q = 33). Beyond this number of clusters, it increases until the fifty individual sources become individual clusters. This shows that the best performance of both the divisive hierarchical and the weighted K-means clustered calibrations is approximately at thirty three clusters and is superior to that of the un-clustered calibration. The Frobenius distance curves in Fig. 11, the MCRLB curve in Fig. 6, and the SINR curve in Fig. 7 illustrate that clustered calibration with an extremely low number of clusters does not necessarily perform better than the un-clustered calibration. The reason is that when there are only a small number of clusters, the interference, or the so-called “clustering errors” introduced in section 4.1.1, is relatively large. Therefore, the effect of this interference dominates the clustering of signals. On the other hand, we reach the theoretical performance limit approximately after twenty five number of clusters and therefore increasing the number beyond this point gives highly variable results, mainly because we are limited by the number of constraints as opposed to the number of parameters that we need to solve for. But, this is not the case for the plots in Fig. 6 and Fig. 7. The reason is that the MCRLB results of Fig. 6 as well as the SINR results of Fig. 7 are obtained by Monte-Carlo method with iterations over fifty different sky and noise realizations. However, Fig. 11 is limited to the presented specific simulation with only one sky and one noise realization. The residual images of the un-clustered calibration as well as the divisive hierarchical and weighted K-means clustered calibrations for Q = 33 are shown by Fig. 12 and Fig. 13, respectively. As it is shown by Fig. 12, in the result of un-clustered calibration, the sources are almost not subtracted at all and there is a significant residual error remaining. The residuals have asymmetric Gaussian distribution with variance σ 2 = 82.29 which is much larger than the simulated (true) noise variance σ 2 = 10.85. On the other hand, the sources have been perfectly subtracted in the case of clustered calibration, Fig. 13, and the residuals converge to the simulated background noise distribution. The residuals of the divisive hierarchical and Weighted K-means clustered calibrations follow symmetric zero mean Gaussian distributions with σ 2 = 20.17 and σ 2 = 18.76, respectively. These variances are closer to the simulated one σ 2 = 10.85 and this indicates the promising performance of clustered calibration. As we can see, hierarchical clustered calibration provides a slightly better result compared to the K-means one. This is due to the fact that hierarchical clustering constructs clusters of smaller angular diameters and thus it assigns the same calibration solutions to the sources with smaller angular separations. We also calculate the Root Mean Squared Error of Prediction (RMSEP) to assess the performance of clustered and un-clustered calibrations’ non-linear regressions. The results of log(RMSEP), presented by Fig. 14, also justify that the best efficiencies of the hierarchical and K-means clustered calibrations are obtained at thirty three number of clusters. But, note that there is a difference between the behavior of log(RMSEP) plot of Fig. 14 and the plots of MCRLB, SINR, and Frobenius distance between the simulated Jones matrices and solutions in Fig. 6, Fig. 7, and Fig. 11, respectively. In Fig. 14, log(RMSEP) of clustered calibration is less than that of un-clustered calibration, even for extremely low number of clusters. This means that even with those low number of clusters, c 2007 RAS, MNRAS 000, 1–18 Clustered Radio Interferometric Calibration 11 Jy 1.4 1.2 1 0.8 0.6 0.4 0.2 0 −0.2 Figure 8. Single channel simulated observation of fifty sources, with intensities below 3 Jy. The source positions and their brightness are following uniform and Rayleigh distributions, respectively. The image size is 8 by 8 degrees at 355 MHz. There are no gain errors and noise in the simulation. Jy 0.6 0.5 0.4 0.3 0.2 0.1 0 −0.1 Figure 9. Simulated image with added gain errors. The errors, the complex 2 × 2 Jones matrices, are generated as linear combinations of sin and cos functions. The variation of the sky is almost uniform on small angular scales. c 2007 RAS, MNRAS 000, 1–18 12 Kazemi et al. Jy 0.6 0.5 0.4 0.3 0.2 0.1 0 −0.1 −0.2 Figure 10. Simulated image of sky, corrupted by gain errors and by noise, as in Eq. (6). The simulated noise vector n has zero mean complex Gaussian distribution and the SNR is equal to 2. Jy 0.1 0.08 0.06 0.04 0.02 0 −0.02 −0.04 −0.06 −0.08 −0.1 Figure 12. Residual image of the un-clustered SAGE calibration for fifty sources. The sources are almost not subtracted at all and there are significant residual errors around them. The residuals have asymmetric Gaussian distribution with variance σ2 = 82.29 which is much larger than the true noise variance σ2 = 10.85. c 2007 RAS, MNRAS 000, 1–18 Clustered Radio Interferometric Calibration 13 Jy 0.1 0.08 0.06 0.04 0.02 0 −0.02 −0.04 −0.06 −0.08 −0.1 ||True Jones−Calibration solutions|| Figure 13. The residual images of the clustered calibration using hierarchical (right) and Weighted K-means (left) clustering methods with thirty three source clusters. Calibration is implemented by SAGE algorithm. The sources are subtracted perfectly and the residuals converge to the simulated background noise distribution. The hierarchical clustering and Weighted K-means residuals follow symmetric zero mean Gaussian distributions with σ2 = 20.17 and σ2 = 18.76, respectively, where the simulated noise distribution is, CN (0, 10.85I). we have 35 Weighted K−means Divisive Hierarchical un−clustered 30 y= i=1 25 20 e si (θe) + K X Γ i + n, (58) i=1 After executing a calibration for the above data model, there is a distance between the target parameters θe and the estimated solub tions θe. This is the so-called “solver noise”, mentioned in section 15 5.2. Thus, the residuals are given as 10 5 0 0 Q X 10 20 30 Number of Clusters 40 50 Figure 11. The average Frobenius distance between the simulated (true) Jones matrices and the solutions of clustered and un-clustered calibrations. The two curves represent clustered calibration via divisive hierarchical and weighted K-means clustering algorithms. By increasing the number of clusters, for both clustering methods, this distance is decreased and gets its minimum approximately at thirty three clusters. After that, it is increased till the fifty individual sources. That shows that the best performance of the clustered calibration is at around thirty three clusters. clustered calibration performs better than the un-clustered calibration. This is somewhat in disagreement with the scenarios shown in Fig. 6, Fig. 7, and Fig. 11. For a better understanding of the reason behind this contrast, first lets see how the residual errors are originated. Based on Eq. (13) and Eq. (40), in the clustered calibration strategy, c 2007 RAS, MNRAS 000, 1–18 y− Q X i=1 Q K i=1 i=1 X X b b e Γ i + n. {e si (θe) − e si (θe)} + si (θe) = (59) From Eq. (59), we immediately see that the background noise n is fixed Pand the “clustering errors” are calculated for all the sources as K i=1 Γ i . However, since we solve only for Q directions and not for all the K sources individually, the “solver noise” part, PQ b {e si (θe) − e si (θe)}, is also calculated only for Q clusters and i=1 not for all the K sources. It is clear that for a very small Q, this term could be much less than for Q ≃ K. Therefore, in Fig. 11, the result of RMSEP at a very low number of clusters is still less than the ones at Q = K. When Q is not at the two extremes of being very small or very large (almost equal to the number of individual sources), then the result of RMSEP is promising. Moreover, applying more accurate calibration methods or increasing the number of iterations, the “solver noise” will decrease and subsequently, we expect the RMSEP curve to have the same behavior as the curves of Fig. 7 and Fig. 11. 14 Kazemi et al. 6 −0.5 x 10 3 Weighted K−means Divisive Hierarchical un−clustered Weighted K−means Divisive Hierarchical un−clustered −1 1 −1.5 AIC log(RMSEP) 2 0 −2 −1 −2.5 −2 −3 0 10 20 30 Number of clusters 40 −3 0 50 Figure 14. The RMSEP for clustered and un-clustered calibrations. The results are obtained using a base ten logarithmic scale. The two curves are corresponding to clustered calibration via divisive hierarchical and weighted K-means clustering algorithms. By increasing the number of clusters, the results are decreased and the minimum result is obtained at around thirty three clusters. After that, the results are increased till the fifty individual sources. That shows the superior performance of the clustered calibration compared to the un-clustered one. The best performance of the clustered calibration for both of the applied clustering methods is at around thirty three number of clusters. 40 50 1800 We utilize AIC and LRT to select the optimum number of clusters for which clustered calibration achieves its best performance. The methods are applied to our simulation for the case of SNR=2. The AIC and LRT results are shown in Fig. 15 and Fig. 16, respectively. They both agree on Q = 33 as the optimum number of clusters for the divisive hierarchical and Weighted K-means clustered calibrations. Likelihood-Ratio plot of Fig. 16 has almost the same behavior as the plot of Frobenius distance between the simulated Jones matrices and the obtained solutions presented by Fig. 11. The reason is that the results of the both plots are obtained using the solutions themselves as the input data. However, since AIC results are computed using the residual errors as inputs, which is also the case for obtaining the RMSEP curves of Fig. 14, AIC curves of Fig. 15 are slightly steeper than the Frobenius distance between the simulated Jones matrices and solutions and the Likelihood-Ratio curves of Fig. 11 and Fig. 16, respectively. 1400 Likelihood−Ratio 1600 We start changing the noise in our simulation to see how it effects the clustered calibration’s efficiency. We simulate the cases for which SNR∈ {1, 2, . . . , 15} and apply clustered calibration on them. Since the sky model does not change, the clusters obtained by divisive hierarchical and weighted K-means methods for the case of SNR= 2 remain the same. Fig. 17 shows the optimum number of clusters, on which the best performances of clustered calibrations are obtained for those different SNRs. As we can see in Fig. 17, for low SNRs, the optimum Q is small. By increasing the SNR, the optimum Q is increased till it becomes equal to the number of all the individual sources that we have in the sky, i.e., K. This means that when the SNR is very low, the benefit of improving signals by clustering sources is much higher than the payoff of introducing “clustering errors” in a clustered calibration procedure. Therefore, clustered calibration for Q ≪ K has a superior performance com- 20 30 Number of clusters Figure 15. AIC plot for clustered and un-clustered calibrations. Both the weighted K-means and divisive hierarchical clustered calibrations get their minimum AIC at about thirty three clusters. This illustrates that their best performances are obtained at this number of clusters. Also, their AIC results at thirty three clusters is lower than the un-clustered calibration’s AIC, which shows their better performances compared to the un-clustered calibration. 6.2 Optimum number of clusters for SNR=2 6.3 Clustered calibration’s efficiency at different SNRs 10 Weighted K−means Divisive Hierarchical un−clustered 1200 1000 800 600 400 200 0 10 20 30 Number of clusters 40 50 Figure 16. Likelihood-ratio of the gain solutions obtained by clustered and un-clustered calibrations. In the both cases of weighted K-means and divisive hierarchical clustered calibrations, the minimum Likelihood-ratio values belong to approximately thirty three number of clusters. These minimums are also lower than the un-clustered calibration’s Likelihood-ratio result. Therefore, clustered calibration via both the clustering methods performs better than the un-clustered calibration and it achieves the best accuracy in its solutions at thirty three clusters. pared to the un-clustered calibration. While for a high enough SNR, the situation becomes the opposite. In this case, the un-clustered calibration achieves better results compared to clustered calibration having the disadvantage of introducing “clustering errors”. 6.3.1 Empirical estimation of SINR Having the results of Fig. 17 in hand, we could find an empirical model for estimating the optimum number of clusters for various SNRs. Note that by changing the observation and the instrument characteristics, this model will also be changed. As it is explained in section 4.1.3, the best performance of clustered calibration is obtained when the SINR is at its highest c 2007 RAS, MNRAS 000, 1–18 Divisive Hierarchical optimum Q 55 50 45 40 35 30 25 Weighted K−means Divisive Hierarchical un−clustered 20 15 0 5 SNR 10 Figure 17. The optimum number of clusters, on which the best performance of clustered calibration is obtained, at different SNRs. For low SNRs, the efficiency of the clustered calibration is superior to the un-clustered calibration. As the SNR gets higher, clustered calibrations achieve their best solutions utilizing a higher number of clusters. Finally, when the SNR is high enough, the performance of un-clustered calibration becomes better than the clustered one. level. Fig. 17 shows the number of clusters on which the maximum SINR was obtained, where the signal (sky) and the noise powers are known a priori. Thus, the only unknown for estimating the SINR is the interference, or the “clustering errors”, for which we need to have a prediction model. After estimating the SINR using this model, finding the optimum Q will be straightforward. Consider the definition of “clustering errors” given by Eq. (31). It is logical that for every source, the difference between its e is true Jones matrix and the clustered calibration solution, ||J − J||, a function of the angular distance between the source and the centroid of the cluster that it belongs to. Based on this and using Eq. (31) and Eq. (34), for the interference of the i-th cluster at baseline p − q we assume that X e i{pq} ||2 {D(Li )}ν I2 ), Γl{pq} ∼ CN (0, η||C (60) l∈Li where η and ν are unknowns. Eq. (60), in fact, considers an intere i{pq} ||2 {D(Li )}ν for every i-th ference power (variance) of η||C cluster, i ∈ {1, 2, . . . , Q}, at baseline p − q. Assuming the interferences of different clusters to be statistically independent from each other, and bearing in mind that the baseline’s additive noise Npq has also a complex Gaussian distribution independent from those interferences’, then the noise plus interference power for the i-th cluster at baseline p − q is obtained by e i{pq} ||2 {D(Li )}ν + ||Npq ||2 . η||C (61) Fitting suitable η and ν to Eq. (61), the SINR for the i-th cluster at e i{pq} ||2 , baseline p − q is equal to the cluster’s signal power, ||C divided by the result of Eq. (61). Subsequently, estimation of E{SINRc } will be straight forward where the expectation is calculated with respect to all the source clusters and all the baselines. Note that simulation provides us with the true noise power, ||Npq ||2 . In the case of having a real observation, this power could be estimated by Eq. (46). Fig. 18 shows the number of clusters on which divisive hierarchical and weighted K-means clustered calibrations achieve their maximum estimated E{SINRc }. The results are calculated for SNR∈ {1, 2, . . . , 15}. For the hierarchical clustering η = 1550 c 2007 RAS, MNRAS 000, 1–18 15 50 40 30 20 True value SINR estimation 10 0 15 Weighted K−means optimum Q Optimum number of clusters (Q) Clustered Radio Interferometric Calibration 5 SNR 10 15 50 40 30 20 True value SINR estimation 10 0 5 SNR 10 15 Figure 18. Optimum number of clusters at which the divisive hierarchical (top) and Weighted K-means (bottom) clustered calibrations perform the best. For both of the clustering methods, the results obtained by SINR estimations mostly match the true optimum number of clusters. and ν = 0.3, and for the K-means clustering η = 2500 and ν = 0.003. As we can see, for both the clustering methods, these maximum E{SINRc }s are mostly obtained at the true optimum number of clusters for which clustered calibration performed the best. Introducing more refined models compared to Eq. (60) could even improve the current result. 6.4 Realistic sky models So far, we have limited our studies to sky models in which the brightness and position of the radio sources follow Rayleigh and uniform distributions, respectively. These characteristics provide us with a smooth and uniform variation of flux intensities in our simulated skies. In such a case, the effects of the background noise on the faintest and the strongest signals are almost the same. Therefore, if clustered calibration performs better than the un-clustered calibration that would be only based on upgrading the signals against the noise. Although, in nature, we mostly deal with the sky models in which the distribution of the flux intensities is a power law, with a steep slope, and the spatial distribution is Poisson. Hence, there exist a few number of very bright sources, whose signals are considerably stronger than the others, and they are sparse in the field of view. The corruptions of the background noise plus the interferences of the strong signals of those few bright sources make Kazemi et al. the calibration of the other faint point sources impractical. Thus, there is the need for utilizing the clustered calibration which applies the solutions of the bright sources to their closed by fainter ones or solves for upgraded signals obtained by adding up a group of faint signals together. This has been shown by Kazemi et al. (2011a); Yatawatta et al. (submitted 2012), when comparing the efficiency of the clustered and un-clustered calibrations on LOFAR real observations. In this section, using simulations, we also reveal the superiority of clustered calibration compared to the un-clustered calibration for such sky models. We simulate a sky of 52 radio point sources which are obtained by modified Jelić et al. (2008) foreground model. The brightness distribution of the point sources follows the source count function obtained at 151 MHz (Willott et al. 2001), while the angular clustering of the sources are characterized by a typical two-point correlation function, ρ(d) = Ad−0.8 . (62) In (62), ρ is the two point correlation function, d is the angular separation, and A is the normalization amplitude of ρ. The flux cut off is 0.1 Jy. We corrupt the signals with gain errors which are linear combinations of sin and cos functions, as in our previous simulations. At the end, a zero mean Gaussian thermal noise with a standard deviation of 3 mJy is added to the simulated data. The result is shown in Fig. 19. In Fig. 19, all the bright sources are concentrated on the right side of the image, rather than being uniformly distributed in the field of view, and the rest of the sources are so faint that are almost invisible. We apply the clustered and un-clustered calibrations on Q ∈ {3, 4, . . . 51} number of clusters and K = 52 number of individual sources, respectively. The clustering method used is the divisive hierarchical and the calibrations are executed via SAGE algorithm with nine number of iterations. The residual noise variances obtained are demonstrated in Fig. 20. As Fig. 20 shows, the level of the residual noise obtained by the clustered calibration for Q ∈ {15, 16, . . . 45} number of clusters is always below the result of the un-clustered calibration. This proves the better performance of the clustered calibration. The best result of the clustered calibration, with the minimum noise level, is achieved for Q = 27 number of clusters. The residual images of the clustered calibration with Q = 27 number of source clusters, and the un-clustered calibration for K = 52 individual sources are shown by Fig. 21. In the right side of the residual image of the un-clustered calibration there exist artificial stripes caused by over and under estimating the brightest sources of the field of view. That shows the problematic performance of the un-clustered calibration. However, clustered calibration has generated much less artificial effects after subtracting these sources. On top of that, the zoomed in window in the left side of the images of Fig. 21 show that the faint sources are not removed by the un-clustered calibration at all, while being almost perfectly subtracted by the clustered calibration. Moreover, the residual noise of the clustered calibration follows a symmetric zero mean Gaussian distributions with a standard deviation of 4.2 mJy, while the one from the un-clustered calibration has an asymmetric Gaussian distribution with mean and standard deviation equal to -1.2 and 5.3 mJy, respectively. Taking to account that the simulated noise distribution is a zero mean Gaussian distribution with a variance of 3 mJy, the superior performance of the clustered calibration compared to the un-clustered one is evident. As the final conclusion of this simulation, calibrating below 8 Divisive Hierarchical Un−clustered Noise variance 16 7 6 5 4 0 10 20 30 Number of clusters 40 50 Figure 20. The noise variances of the residual images, obtained by clustered and un-clustered calibrations, in mJy. The level of the residual noise obtained by the clustered calibration for Q ∈ {15, 16, . . . 45} number of clusters stands below the result of the un-clustered calibration. That reveals the superior performance of the clustered calibration in comparison with the un-clustered one. The best result of the clustered calibration which achieves the minimum noise level is at Q = 27 number of clusters. the noise level, clustered calibration always performs better than the un-clustered calibration. This is regardless of the sky model and is only based on the fact that solving for individual sources with very poor signals is impractical. Nevertheless, when some sources are very close to each other, the sky corruption on their signals would be exactly the same and there is no point in solving for every of them individually. 7 CONCLUSIONS In this paper, we demonstrate the superior performance of “clustered calibration” compared to un-clustered calibration especially in calibrating sources that are below the calibration noise level. The superiority is in the sense of having more accurate results by the enhancement of SNR as well as by the improvement of computational efficiency by reducing the number of directions along which calibration has to be performed. In a “clustered calibration” procedure, sky sources are grouped into some clusters and every cluster is calibrated as a single source. That replaces the coherencies of individual sources by the total coherency of the cluster. Clustered calibration is applied to these new coherencies that carry a higher level of information compared with the individual ones. Thus, for the calibration of sources below the noise level it has a considerably better performance compared to un-clustered calibration. Another way of looking at clustering is to consider the distribution of source flux densities, i.e. the number of sources vs. the source flux density curve. Regardless of the intrinsic flux density distribution, clustering makes the number of clusters vs. the cluster flux density curve more uniform, thus yielding superior performance. An analytical proof of this superiority, for an arbitrary sky model, is presented using MCRLB and SINR analysis. KLD and LRT are utilized to detect the optimum number of clusters, for which the clustered calibration accomplishes its best performance. A model for estimating SINR of clustered calibration is also presented by which we could find the optimum number of clusters at low computational cost. c 2007 RAS, MNRAS 000, 1–18 Clustered Radio Interferometric Calibration 17 Jy 0.8 0.6 0.4 0.2 0 −0.2 Figure 19. Simulated observation of fifty two sources which are obtained by modified Jelić et al. (2008) foreground model. The corrupting gain errors are generated as linear combinations of sin and cos functions. The image size is 8 by 8 degrees and the additive thermal noise is a zero mean Gaussian noise with a standard deviation of 3 mJy. Divisive hierarchical as well as Weighted K-means clustering methods are used to exploit the spatial proximity of the sources. Simulation studies reveal clustered calibration’s improved performance at a low SNR, utilizing these clustering algorithms. Both the clustering methods are hard clustering techniques which divide data to distinct clusters. However, we expect more accurate results using fuzzy (soft) clustering, which constructs overlapping clusters with uncertain boundaries. Application and performance of this type of clustering for clustered calibration will be explored in future work. ACKNOWLEDGMENT The first author would like to gratefully acknowledge NWO grant 436040 and to thank N. Monshizadeh for the useful discussions. We also thank the referee for a careful review and valuable comments that helped enhance this paper. REFERENCES Akaike H., 1973, in Second International Symposium on Information Theory (Tsahkadsor, 1971), Akadémiai Kiadó, Budapest, pp. 267–281 Bernardi G., Mitchell D. A., Ord S. M., Greenhill L. J., Pindor B., Wayth R. B., Wyithe J. S. B., 2010, ArXiv e-prints Bezdek J. C., 1981, Pattern Recognition with Fuzzy Objective Function Algorithms. Kluwer Academic Publishers, Norwell, MA, USA Born M., Wolf E., 1999, Principles of Optics. Cambridge University Press Bregman J. D., 2012, PhD Thesis, University of Groningen c 2007 RAS, MNRAS 000, 1–18 Fessler J. A., Hero A. O., 1994, IEEE Transactions on Signal Processing, 42, 2664 Gini F., Reggiannini R., 2000, IEEE Transactions on Communications, 48, 2120 Gini F., Reggiannini R., Mengali U., 1998, IEEE, 46, 52 Graves S., 1978, British J. Philos. Sci., 29, 1 Hamaker J. P., 2006, A&A, 456, 395 Hamaker J. P., Bregman J. D., Sault R. J., 1996, A&AS, 117, 137 Intema H. T., van der Tol S., Cotton W. D., Cohen A. S., van Bemmel I. M., Röttgering H. J. A., 2009, A&A, 501, 1185 Jelić V., Zaroubi S., Labropoulos P., Thomas R. M., Bernardi G., Brentjens M. A., de Bruyn A. G., Ciardi B., Harker G., Koopmans L. V. E., Pandey V. N., Schaye J., Yatawatta S., 2008, MNRAS, 389, 1319 Johnson S. C., 1967, Psychometrika, 32, 241 Kaufman L., Rousseeuw P., 1990, Finding Groups in Data An Introduction to Cluster Analysis. Wiley Interscience, New York Kay S., 1993, Fundamentals of Statistical Signal Processing: Estimation theory, Prentice Hall signal processing series. PrenticeHall PTR Kazemi S., Yatawatta S., Zaroubi, 2012, IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2533 Kazemi S., Yatawatta S., Zaroubi S., 2011a, IEEE Workshop on StatisticalSignal Processing, SSP2011, 414, 597 Kazemi S., Yatawatta S., Zaroubi S., de Bruyn A. G., Koopmans L. V. E., Noordam J., 2011b, MNRAS, 414, 1656 Kerdprasop K., Kerdprasop N., Sattayatham P., 2005, in In DaWaK, pp. 488–497 Liu A., Tegmark M., Zaldarriaga M., 2009, MNRAS, 394, 1575 MacQueen J. B., 1967, in Proc. of the fifth Berkeley Symposium on Mathematical Statistics and Probability, Cam L. M. L., Ney- 18 Kazemi et al. Jy 0.03 0.025 0.02 0.015 0.01 0.005 0 −0.005 −0.01 −0.015 Figure 21. The residual images of the clustered calibration for Q = 27 number of clusters (right) and the un-clustered calibration for K = 52 (left). Calibration is implemented by SAGE algorithm with nine number of iterations and the clustering method applied is divisive hierarchical. In the right side of the residual image of the un-clustered calibration we see stripes of over and under estimations due to problematic performance of the un-clustered calibration in subtracting the brightest sources. The zoomed in window in the left side of the image also shows that the faint sources are not removed at all. However, clustered calibration could remove all the faint sources almost perfectly and has generated much less artefacts after subtracting for the brightest sources in the right side of the field of view. Moreover, the residual noise of the clustered calibration follows a symmetric zero mean Gaussian distributions with a standard deviation of 4.2 mJy, while the one from the un-clustered calibration has an asymmetric Gaussian distribution with mean and standard deviation equal to -1.2 and 5.3 mJy, respectively. Taking to account that the simulated noise distribution is a zero mean Gaussian distribution with a standard deviation of 3 mJy, the better performance of the clustered calibration compared to the un-clustered one is evident. man J., eds., Vol. 1, University of California Press, pp. 281–297 Pearson T. J., Readhead A. C. S., 1984, ARA&A, 22, 97 Pindor B., Wyithe J. S. B., Mitchell D. A., Ord S. M., Wayth R. B., Greenhill L. J., 2010, PASA, 28, 46 Smirnov O. M., 2011, A&A, 527, A108 Thompson A. R., Moran J. M., Swenson G. W., 2001, Interferometry and Synthesis in Radio Astronomy, 2nd edn. Wiley-VCH Wax M., Kailath T., 1985, Acoustics, Speech and Signal Processing, IEEE Transactions on, 33, 387 Willott C. J., Rawlings S., Blundell K. M., Lacy M., Eales S. A., 2001, MNRAS, 322, 536 Xu R., Wunsch D., 2008, Clustering. John Wiley and Sons Yatawatta S., de Bruyn A. G., LOFAR Collaboration, submitted 2012, Astronomy and Astrophysics Yatawatta S., Zaroubi S., de Bruyn G., Koopmans L., Noordam J., 2009, Digital Signal Processing Workshop and 5th IEEE Signal Processing Education Workshop, 2009. DSP/SPE 2009. IEEE 13th, 150 This paper has been typeset from a TEX/ LATEX file prepared by the author. c 2007 RAS, MNRAS 000, 1–18
5cs.CE
Checks and Balances: A Low-complexity High-gain Uplink Power Controller for CoMP arXiv:1610.08491v1 [cs.SY] 26 Oct 2016 Fangzhou Chen†§ , Yin Sun†§ , Yiping Qin‡ , and C. Emre Koksal† † Dept. of ECE, The Ohio State University, Columbus, OH ‡ Huawei Technologies Co., Shanghai, China § Co-primary authors Abstract—Coordinated Multipoint (CoMP) promised substantial throughput gain for next-generation cellular systems. However, realizing this gain is costly in terms of pilots and backhaul bandwidth, and may require substantial modifications in physicallayer hardware. Targeting efficient throughput gain, we develop a novel coordinated power control scheme for uplink cellular networks called Checks and Balances (C&B), which checks the received signal strength of one user and its generated interference to neighboring base stations, and balances the two. C&B has some highly attractive advantages: C&B (i) can be implemented easily in software, (ii) does not require to upgrade non-CoMP physicallayer hardware, (iii) allows for fully distributed implementation for each user equipment (UE), and (iv) does not need extra pilots or backhaul communications. We evaluate the throughput performance of C&B on an uplink LTE system-level simulation platform, which is carefully calibrated with Huawei. Our simulation results show that C&B achieves much better throughput performance, compared to several widely-used power control schemes. Index Terms—Uplink power control, coordinated multipoint (CoMP), LTE, system-level simulation, throughput improvement I. I NTRODUCTION Next generation of cellular communication, e.g., Long Term Evolution Advanced (LTE-A) and 5G, is expected to significantly improve the average throughput and cell-edge throughput for serving user equipments (UEs). One important candidate technique for achieving such throughput improvement is Coordinated Multipoint (CoMP), which refers to the cooperation among different Base Stations (BSs). The promised benefits of CoMP are hard to realize because of many issues in practical systems [1], [2]. In particular, the uplink CoMP techniques (such as distributed interference cancellation/alignment, joint detection, coordinated scheduling) all require nearby BSs to communicate received signals, control messages, and channel state information through backhaul links. In addition, these CoMP techniques are costly in terms of power and pilot resources, which considerably decreases the resources allocated for data transmissions. Therefore, the realized throughput performance is greatly degraded. Aiming to realize the potential benefits of CoMP in practical systems, we propose a novel coordinated power control design for uplink cellular networks. The task of uplink power control is to make the signal received at the base station sufficiently This work was supported in part by Huawei, Inc. under Agreement YB 2013110091, National Science Foundation under Grants CNS-1054738 and CNS-1514260. TABLE I: Performance of FPC [5], Max Power [6], RLPC [7] and C&B in Macrocell system-level simulations. Average Throughput (Mbits/s) 5%-Edge Throughput (Mbits/s) Power Efficiency (Mbits/J) FPC 8.05 0.23 751 Max Power 12.01 0.09 6.77 RLPC 9.78 0.22 226 C&B 12.23 0.23 387 strong, and in the meanwhile keep the interference generated to nearby base stations not severe. In practice, overly high and low transmission powers are both harmful. Specifically, increasing the transmission power of one UE can increase its throughput, but it causes some strong interference to nearby cells, which will degrade the throughput of other UEs. Hence, finding the correct balance between a UE’s own performance and its incurred cost to the other UEs is crucial to achieve a satisfying performance. In practical uplink cellular networks, each BS receiver experiences the interference from hundreds of UEs from neighboring cells. Even if perfect CSI knowledge of the signal and interference channels are available, the optimal power control problem is strongly NP hard [8], [9]. To make things worse, the base station in current systems typically estimates the signal channel of its served UEs, but the channel coefficients of interfering UEs are mostly unavailable. These practical limitations make the power control problem even more challenging. In our research, we develop a low-complexity Coordinated power control scheme that provides significant throughput gains, with minimum cost and modifications. To that end, the following are the contributions of this paper: • We develop a novel coordinated power control scheme, named Checks and Balances (C&B). C&B requires very little information, including the large-scale path loss from one UE to several nearby BSs, coarse power level of cochannel interference, and the throughput vs SINR curve of Adaptive Modulation and Coding (AMC). Based on this information, C&B checks the SNR of one UE and its generated INR to nearby BSs, and balances the two. • C&B has some highly attractive advantages: C&B (i) can be implemented easily in software, (ii) does not require to upgrade non-CoMP physical-layer hardware, (iii) allows for fully distributed implementation for each UE, and (iv) does not need extra pilots or backhaul communications. • We evaluate the throughput performance of C&B on a system-level simulation platform for LTE uplink, which is carefully calibrated with Huawei. As shown in Table I, C&B increases the average throughput by 51.9% over Fractional Power Control (FPC) [5] and 21.5% over Reverse Link Power Control (RLPC) [7], and achieves similar cell-edge throughput with FPC and RLPC. Compared to Max Power Control [6], C&B increases the average throughput and cell-edge throughput by 1.8% and 156%, respectively, together with greatly improved power efficiency. We expect C&B to achieve even better throughput performance when working with physical-layer CoMP techniques, which will be considered in future work. Related Studies: Non-coordinated power control is standardized in 3GPP protocols [3] and has attracted vast research interests [5], [6], [10]–[15]. There exist three mainstream schemes: 1) Full Compensation Power Control (FCPC) [10] allocates transmission power to one UE by making full compensation of its large-scale path loss such that all UEs have the same received signal strength, which results in poor performance in per-cell average throughput and inter-cell interference management. 2) Max Power scheme [6] let all UEs transmit at their maximum allowable power. It provides high average percell throughput, but performs poorly in power efficiency and throughput of UEs at the cell edge. 3) Fractional Power Control (FPC) [5] is currently the most widely adopted scheme [12]– [15], which allocates transmission power by making fractional compensation of UEs’ large-scale path losses, such that UEs in the interior of one cell have stronger received signal strength than UEs at the cell edge. The key drawback remains in the unsatisfying average throughput per cell. Two coordinated power control schemes have been proposed [7], [16], which make additional compensation for large-scale path losses from one UE to its neighboring cells. These schemes are essentially variations of FCPC. Hence, they partially inherit the drawbacks of FCPC which significantly limits the throughput gain. II. S YSTEM M ODEL AND P ROBLEM D ESCRIPTION We consider an LTE uplink multicellular network. In such network, each UE transmits to its serving cell and meanwhile generates interference to its neighboring cells. Consider UE u transmits signal x at power P on a single subcarrier, its received signal y at the serving cell c can be expressed as: Xp √ y = P · hx + Pj · hj xj + n, (1) j where h and hj denotes the instantaneous complex channel gain from UE u and uj (served in neighboring cell cj ) to cell c, respectively, n denotes the experienced noise.P Hence p the total inter-cell interference experienced by UE u is j Pj · hj xj . Assuming the transmitted signals x and xj have unit variance, the signal-to-interference-plus-noise ratio (SINR) can thereby be calculated as: sinr = P P · |h|2 , 2 2 j Pj · |hj | + σn (2) where σn2 denotes the variance of noise. The power controller decides the transmission power of UEs across all cells, which heavily affects their SINR. Unlike Noncoordinated power control that only exploits the CSI of UEs to their serving cells, coordinated power control additionally utilizes the CSI of UEs to multiple neighboring cells. The problem we are tackling is to come up with a coordinated power control design with low complexity and high throughput gain over all existing solutions. Besides the strong impact from power controller, the throughput performance is also influenced by how each cell picks the modulation and coding scheme (MCS) for active UEs. In LTE networks, the existing Turbo-coded modulation techniques are paired with associated bit rate selections to form 29 different available MCS options [3]. For each SINR value, one of these MCS options is chosen by an Adaptive Modulation and Coding (AMC) module. The selected MCS should provide a sufficient high throughput and meanwhile guarantee a low decoding error probability. Usually, the block decoding error rate is required to be less than 10%, which will be later compensated by hybrid automatic repeat request (HARQ). The stairs in the throughput curve are due to the AMC module. In particular, when the SINR is lower than −6.5 dB, no MCS can decode successfully and hence the throughput is zero. When the SINR is higher than 18 dB, the maximum MCS can decode perfectly, achieving a maximum throughput. Hence, the SINR region for effective AMC selection is [−6.5 dB, 18 dB]. III. C HECKS AND BALANCES : A P OWER C ONTROL D ESIGN In this section, we present a novel power controller design, called Checks and balances (C&B), for uplink cellular systems. This power controller requires very little information, including the throughput versus SINR curve of the receiver design, the large-scale path loss from one UE to several nearby BSs, and some coarse distribution information of the co-channel interference in the cellular system. The key idea in C&B is to cooperatively balance the SNR of a UE and its generated INR to nearby BSs. The complexity of C&B is very low, and the throughput gain is huge. One can consider C&B as the simplest implementation of CoMP, which provides significant throughput improvement without incurring huge cost in pilots or backhaul. There is no upgrade of the physical layer design, except for the change of uplink transmission power. A. Approximations of SINR and Throughput C&B can operate in the open-loop mode, when only large scale CSI is utilized, whereas small scale CSI is unavailable due to the lack of instantaneous channel estimation pilot. The large-scale path loss between UE uj and cell c is defined as: −1  , (3) PLj , E |hj |2 1 SINR-Throughput Mapping Piece-wise Approximation f(SINR) 4 0.8 3 0.6 SNR IoT cdf Spectrum Efficiency (bits/s/Hz) 5 2 0.4 1 0.2 0 -20 -10 0 SINR (dB) 10 0 -10 20 0 10 Time-average (dB) 20 Fig. 1: Throughput Curve Approximation. Fig. 2: Time-average SNR and IoT distributions. where E[·] denotes the expectation. When we only consider such large-scale path losses, u’s received signal-to-noise ratio (SNR) and interference over thermal noise (IoT) at c, and generated interference-to-noise ratio (INR) to cj can be respectively approximated as: Hence, we propose a method to estimate IoTS . In the simulation environment described in Section IV, the distribution of the IoT in the uplink cellular system is illustrated in Fig. 2. We select IoTS to be the 95th percentile of IoT that experienced by an arbitrary UE, which is IoTS = 9 dB. Note that this statistical distribution can be collected at the BS. In practical applications, we recommend to initialize the system with this value and update it according to the measured IoT distribution. The approximated throughput RS (P ) is plotted in Fig. 3a, which increases with the transmission power P . SNR(P ) = IoT = INRj (P ) = PL−1 · P , N0 P N0 + j Pj · PL−1 j PL−1 u→j N0 N0 ·P , (4) , (5) (6) where N0 denotes the average noise power and is assumed to be the same and known for all UEs. We also define PLu→j as the large-scale path loss from UE u to cell cj . Derived from Eq. (4) and (5), we can approximate the received SINR of UE u as: SNR(P ) . (7) SINR = IoT As C&B only acquires large scale CSI and approximated SINR information, there is no need to use an accurate throughput curve to determine the transmission power. Therefore, we introduce a piece-wise function to approximate the foregoing throughput curve:   f (SINR) = min Tmax , a · log2 (1 + b · SINR) , (8) where Tmax = 4.18, a = 0.7035 and b = 0.7041. These parameters are achieved by curve fitting as shown in Fig. 1. Note that for different physical layer designs, we can always find such an approximated throughput function f (SINR). Next, we use function f (SINR) to evaluate the throughput of one UE u and the throughput of the UEs interfered by UE u. B. Checking the Influence of SNR and INR Consider an arbitrarily chosen UE u, its uplink throughput can be approximated as   SNR(P ) RS (P ) = f , (9) IoTS where IoTS denotes a prior estimation of the interference experienced by UE u. In fully distributed power control, the instantaneous interference power that UE u will experience during its transmissions is not available at the power controller. Consider the UEs that are notably interfered by UE u, their sum uplink throughput can be approximated as:   X SNRI . (10) f RI (P ) = IoTI + INRj (P ) PL <PL u→j th Note that we only consider the non-negligible interference generated by UE u. To this end, we set the threshold PLth in (10) as the path loss of a interference link such that the interference power generated by UE u with the maximum power Pmax is stronger than noise, i.e., PL−1 th · Pmax > 1, N0 (11) where Pmax = 200 mW (23 dBm) [18]. Furthermore, in fully distributed power control, the received SNR and IoT (excluding the interference generated by u) of these UEs, denoted by SNRI and IoTI , are unknown to the power controller of UE u. We also propose methods to estimate SNRI and IoTI by using the SINR region [−6.5 dB, 18 dB] in Fig. 1 for effective AMC selection. Their values are given by SNRI = 24 dB and IoTI = 5 dB. Due to space limitations, the details for computing these parameters will be explained in the journal version. The approximated sum throughput RI (P ) is plotted in Fig. 3b, which decreases with the transmission power P . C. Balancing the Two In order to find a proper balance between SNR and INR, we consider the following weighted sum throughput maximization problem: max 0≤P ≤Pmax RS (P ) + ζ · RI (P ), (12) 27 4 26 28 27.5 Weighted Sum Utility 5 3 UI(P) US(P) 25 2 24 0 -5 22 0 5 10 15 P (dBm) 20 25 (a) Approximated throughput of UE u. 21 -5 26 25.5 23 1 27 26.5 25 24.5 0 5 10 15 P (dBm) 20 25 24 -5 0 5 10 15 P (dBm) 20 25 (b) Approximated total throughput of UEs that (c) Weighted sum throughput approximation. are interfered by UE u. Fig. 3: Approximated throughput functions for C&B power controller design. where ζ is the weight parameter that adjusts the relative importance of SNR and INR, which is chosen around 1. Large ζ (e.g. ζ > 1) indicates more focus on mitigating INR rather than enhancing SNR, which leads to more conservative transmission power. This benefits the UEs with poor channel states due to the reduced interference, while constraining the transmission power of UEs with good channel states that prevents them from achieving better throughput. It works the other way around when we choose small ζ (e.g. ζ < 1). Tending to suppress strong interference, we initially select ζ to be 1.3. As shown in Fig. 3c, the weighted sum throughput is maximized at a unique transmission power, i.e., the balance we choose between SNR and INR. IV. P ERFORMANCE E VALUATION ON S YSTEM - LEVEL S IMULATION P LATFORM A. Simulation Platform Configuration (13) We consider an LTE uplink cellular network [19], where the BSs are located on a typical hexagonal lattice including 19 BS sites, 3 sectors per site. Each sector is regarded as a cell. The minimal distance between two neighboring sites is 500 meters (Macrocell) [19]. The UEs are uniformly distributed in the entire network area. The distance from a UE to a nearest BS is no smaller than 35 meters [18]. Each UE has a single antenna, and the BSs are equipped with 2 antennas per sector. The wireless channel coefficients and BS antenna pattern are generated by following the SCM model for Urban Macro environments in 3GPP TR 25.996 [18], where 3D antenna pattern and Rayleigh fading [23] are adopted. We set the maximum doppler shift frequency at 7 Hz according to moving speed 3 km/h and carrier frequency 2.5 GHz. The receivers employ nonCoMP maximum mean square error (MMSE) estimation [25] with interference rejection combination (IRC) techniques [24]. To obtain the channel coefficients, we estimate the pilots, i.e., demodulation reference signals (DMRS) [3], with DFT-based estimation [22]. Adaptive Transmission Bandwidth (ATB) [21] non-CoMP packet scheduling scheme is implemented. The frequency bandwidth is 10MHz, and the noise figure of each BS receiver is 5 dB [3]. We set a uniform penetration loss of 20 dB [18] for all users. The delay of control signaling is uniformly set as 6 ms (i.e., 6 time slots) [17]. The wrap around technique is employed to avoid the border effect. The parameters of our system level simulation platform are listed in Table II. We use the proportional-fair (PF) policy [25] in stochastic network control in which the weight of UE u used in the ATB scheduler at time-slot t is (ru [t])α , (14) (r̄u )β We use bisection method to find the solution of (13), with the detailed steps presented in Algorithm 1. This algorithm is easy to implement in software, and the number of iterations for convergence is no more than 10. We note that Algorithm 1 is a fully distributed algorithm, where each UE can choose its transmission power independently. where ru [t] and r̄u denote the UE u’s potentially achieved data rate in time slot t and long-term average data rate, respectively. We set the two associated parameters at: α = 1, β = 1. We compare C&B with three reference policies: One policy is the widely used fractional power control (FPC) scheme, which determines the transmission power P F P C of UE u for Algorithm 1: Bisection method for solving (13). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Given l = −10 dBm, r = Pmax , tolerance ǫ = 0.1; if r − l < ǫ then m := Pmax ; else while r − l ≥ ǫ do m := (l + r)/2; if RS′ (m) + ζ · RI′ (m) < 0 then l := m; else r := m; end end end return P := m. It is easy to show that Problem (12) is a one-dimensional quasi-convex optimization problem, and thereby can be obtained by solving the following problem: RS′ (P ) + ζ · RI′ (P ) = 0. TABLE II: SYSTEM LEVEL SIMULATION PARAMETERS Parameter Deployment Scenario Inter-site Distance System Bandwidth Avg. UEs per Cell UE/BS Antennas Distance-dependent Path Loss Shadowing Standard Deviation Antenna Pattern Penetration Loss Scheduling Decision Delay Target BLER Traffic Model Scheduling Algorithm Power Control (PC) scheme Stochastic Network Control Scheme Link Adaptation BS Receiver Type Channel Estimation Maximum Doppler Shift α (PF) β (PF) Pmax P0F P C (FPC) κ (FPC) P0RL (RLPC) φ (RLPC) Setting 19 BS sites, 3 sectors (cells) per site, wrap-around 500m (Macrocell) 10MHz [50 PRBs, 2 used for control] 10 1/2 per cell According to 3GPP 36.814 [19] 8 dB 3D 20 dB 6 ms 10% Fully backlogged queues ATB FPC, Max Power, RLPC, C&B Proportional Fair (PF) AMC, based on 3GPP TS 36.213 [3] IRC MMSE DFT-based Estimation 7Hz 1 1 23 dBm −87 dBm 0.8 −102 dBm 0.8 each resource block by [3]: P F P C = min(Pmax , P0F P C + κ · PL), (15) P0F P C where Pmax is the maximum power constraint, is the default transmission power, and PL is the large-scale path loss from UE u to its serving cell. The values of the parameters are Pmax = 23 dBm, P0F P C = −87 dBm and κ = 0.8. The second policy is Max Power, which sets all UEs at their maximum allowable transmission power Pmax . The third reference policy is the coordinated Reverse Link Power Control (RLPC) scheme, where the transmission power P RL is decided by [7]:  P RL = min Pmax , P0RL + φ · PL + (1 − φ) · PLmin , (16) where PLmin denotes the measured minimum path loss from u to its neighboring cells. The rest parameters are selected as P0RL = −102 dBm and φ = 0.8. The parameters of C&B are chosen as we discussed in Section III. B. Simulation Results We compare the performance of different power control schemes in terms of three key metrics: cell average throughput (i.e. sum average throughput per cell), cell edge throughput and power efficiency. In particular, cell-edge throughput is defined as the 5th percentile throughput performance among all UEs, denoted as 5%-Edge, which is widely used in evaluating the performance of UE fairness [6], [11], [15]. 1) Performance Comparison in Macrocell Scenario: First, we investigate the performance in enhancing received signal strength, which is evaluated by time-average SNR as illustrated in Fig. 4a. It can be seen that C&B, with the weight parameter set as ζ = 1.3, is able to significantly boost UEs’ timeaverage SNR over FPC. Particularly, more than 40% UEs have gained at least 3.5 dB and approximately 20% UEs even achieve more than 10 dB SNR increase. C&B also improves the SNR of the top 20% UEs compared to RLPC, which greatly benefit the UEs with good channel conditions. It is clear that Max Power has the best SNR performance due to the maximum transmission power. Nevertheless, it simultaneously incurs severe interference which is quite undesirable. Next, we switch our attention on the interference mitigation performance, which is represented by the time-average IoT as shown in Fig. 4b. Compared with FPC, C&B only slightly increase the UEs’ average IoT by 1.5 dB. On the other hand, C&B performs a lot better than Max Power and shows clear advantage over RLPC in suppressing the inter-cell interference. Now we concentrate on the throughput performance, which is the comprehensive result of signal enhancement and interference mitigation. In comparison with FPC and RLPC, C&B noticeably improves the throughput of UEs with good channel condition (the top 30%), as illustrated in Fig. 4c. In particular, the top 20% UEs have even achieved throughput gain of at least 1 Mbits/s. As for UEs with poor channel condition (bottom 10%), C&B shows great advantage over Max Power. Finally, we present C&B’s advantages over all other candidate power control schemes based on the detailed performance summary in Table I. C&B shows desirable advantage over FPC by providing 51.9% improvement on cell average throughput, while keeping the same 5%-Edge throughput performance and only dropping the power efficiency by 48%. Further, C&B beats Max Power in significantly improving 5%-Edge throughput and power efficiency by 156% and 5, 716% respectively, with slightly increased cell average throughput. Comparison with a CoMP power control scheme called RLPC, C&B achieves appreciable gains in cell average throughput and power efficiency respectively by 25.1% and 71.2%, and simultaneous keeps 5%Edge throughput slightly improved. Note that the performance improvement of C&B is solely obtained by power control. One can further incorporate coordinated transceiver and scheduling techniques to achieve even higher gain. For example, it is known that CoMP receiving techniques can enhance the edge throughput significantly [2]. As shown in Table I, the throughput gain of C&B is more evident in the high throughput UEs. Hence, additional improvement is promising by combining C&B with other CoMP techniques. 2) Tradeoff between cell average throughput and cell edge throughput: Recall the utility maximization problem (12), we can vary the weight parameter ζ to adjust the balance between received signal enhancement and interference mitigation. As we gradually decrease ζ from 1.3 to 0.7, the cell average throughput keeps improving in pair with the continuously degrading 5%-Edge throughput, as summarized in Table III. This tradeoff between average and edge throughput can be explained as follows: (a) the UEs with good channel conditions contribute most part of the average throughput. Increasing such UEs’ transmission power by decreasing ζ greatly helps them to achieve stronger received signal, which results in their throughput gains. Such gains lead the cell average throughput 1 0.8 0.8 0.8 0.6 0.6 0.6 0.4 cdf cdf 1 cdf 1 0.4 FPC Max Power RLPC C&B 0.2 0 -20 0 20 SNR (dB) 0.4 FPC Max Power RLPC C&B 0.2 40 60 (a) Time-average received SNR. 0 0 5 10 UE IoT (dB) 15 FPC Max Power RLPC C&B 0.2 20 0 0 (b) Time-average experienced IoT. 1 2 3 4 Average Throughput (Mbits/s) 5 (c) Time-average throughput. Fig. 4: Simulation results in Macrocell scenario. to improve. (b) In contrast, boosting transmission power incurs stronger inter-cell interference, which especially jeopardizes those vulnerable UEs with poor channel states. As a result, the 5%-Edge throughput is decreased. TABLE III: Throughput performance comparison between different weight factor ζ selections. Average Throughput (Mbits/s) 5%-Edge Throughput (Mbits/s) ζ = 1.3 12.23 0.23 ζ = 1.1 12.41 0.21 ζ = 0.9 12.95 0.18 ζ = 0.7 13.17 0.15 Note that when ζ = 0.7, C&B is remarkably better than the Max Power policy in terms of both average and edgethroughput. In addition, when ζ = 1.3, C&B is significantly better than the FPC and RLPC in term of cell average throughput. Therefore, one can adjust the weight parameter in order to adapt different system requirements. V. C ONCLUSION AND F UTURE W ORK We investigate how to use limited large scale CSI to achieve the throughput gain of CoMP through the design of a power controller named C&B. The optimal power control by itself is an NP hard problem, which has been open up to date. Further, as very limited coordination is possible in the openloop mode, the power controllers of different BSs are not allowed to communicate. C&B satisfies all practical constraints in cellular systems, and can significantly improve the average and edge throughput over existing power control schemes with very low complexity and almost no cost. Further throughput enhancement is promising by combining C&B with other coordinated transceiver and scheduling techniques. R EFERENCES [1] A. Lozano, R. W. Heath, and J. G. Andrews, “ Fundamental limits of cooperation, ” IEEE Trans. Inform. Theory, vol. 59, no. 9, pp. 5213-5226, Sep. 2013. [2] M. H. C. Suh and D. N. C. Tse, “ Downlink interference alignment, ” IEEE Trans. Commun., vol. 59, no. 9, pp. 2616-2626, Sep. 2011. [3] 3GPP TS 36.213, “ E-UTRA Physical Layer Procedures.” [4] A. Barbieri, P. Gaal, S. Geirhofer, T. Ji, D. Malladi, Y. Wei, and F. Xue, “ Coordinate downlink multi-point communications in heterogeneous 4g cellular networks, ” in Proc. Inform. Theory and Appl. Workshop, San Diego, CA, Feb. 2012. [5] J. F. Whitehead, “ Signal-Level-Based Dynamic Power Control for Cochannel Interference Management, ” 43rd IEEE Vehicular Technology Conference, pp. 499-502, May 1993. [6] A. Simonsson and A. Furuskar, “ Uplink Power Control in LTE Overview and Performance, Subtitle: Principles and Benefits of Utilizing rather than Compensating for SINR Variations, ” Vehicular Technology Conference, 2008. [7] A. M. Rao, “ Reverse Link Power Control for Managing Inter-cell Interference in Orthogonal Multiple Access Systems, ” Vehicular Technology Conference, 2007. [8] D. Shah, D. N. C. Tse, and J. N. Tsitsiklis, “ Hardness of low delay network scheduling, ” IEEE Trans. Inf. Theory, vol. 57, no. 12, pp. 78107817, Dec. 2011. [9] Z.-Q. Luo and S. Zhang, “ Dynamic spectrum management: Complexity and duality, ” IEEE Journal of Selected Topics in Signal Processing, vol. 2, no. 1, pp. 57-73, Feb 2008. [10] J.G.Gipson, “ The Communication Handbook, ” CRC Press, IEEE Press 1996. [11] C. U. Castellanos, D. L. Villa, C. Rosa, K. I. Pedersen, F. D. Calabrese, P. Michaelsen, and J. Michel, “ Performance of Uplink Fractional Power Control in UTRAN LTE, ” Vehicular Technology Conference, 2008. [12] T. D. Novlan, H. S. Dhillon and J. G. Andrews, “ Analytical Modeling of Uplink Cellular Networks, ” IEEE Transactions on Wireless Communications, vol. 12, no. 6, Jun 2013. [13] T. D. Novlan and J. G. Andrews, “ Analytical Evaluation of Uplink Fractional Frequency Reuse, ” IEEE Transactions on Communications, vol. 61, no. 5, May 2013. [14] W. Xiao, R. Ratasuk, A. Ghosh, R. Love, Y. Sun, and R. Nory, “ Uplink Power Control, Interference Coordination and Resource Allocation for 3GPP E-UTRA, ” Vehicular Technology Conference, 2006. [15] M. Coupechoux and J. -M. Kelif, “ How to Set the Fractional Power Control Compensation Factor in LTE, ” IEEE Sarnoff Symposium, 2011. [16] R. Yang, A. Papathanassiou, W. Guan, A. T. Koc, H. Yin, Y. Chio, “ Supporting Material for UL OLPC Proposal, ” IEEE C80216m-09-0844, 2009. [17] 3GPP TS 36.321, “ E-UTRA Medium Access Control (MAC) Protocol Specification. ” [18] 3GPP TR 25.996 v9.0.0., “ Channel Model for Multiple Input Multiple Output (MIMO) Simulations, ” 2009. [19] 3GPP TR 36.814, “ E-UTRA Further Advancements for E-UTRA Physical Layer Aspects. ” [20] 3GPP TS 36.133, “ E-UTRA Requirements for Support of Radio Resource Management. ” [21] F. Calabrese, C. Rosa, M. Anas, P. Michaelsen, K. Pedersen, and P. Mogensen, “ Adaptive transmission bandwidth based packet scheduling for lte uplink, ” in VTC 2008-Fall, Sept 2008, pp. 1-5. [22] G. Huang, A. Nix, and S. Armour, “ DFT-Based Channel Estimation and Noise Variance Estimation Techniques for Single-Carrier FDMA, ”in VTC 2010-Fall, 2010. [23] Y. R. Zheng and C. Xiao, “ Simulation Models with Correct Statistical Properties for Rayleigh Fading Channels, ” IEEE Transactions on Communications, vol. 51, issue 6, pp. 920-928, 2003. [24] Y. Leost, M. Abdi, R. Richter and M. Jeschke, “ Interference Rejection Combining in LTE Networks, ” Bell Labs Technical Journal, pp. 25-50, 2012. [25] D. Tse and P. Viswanath, “ Fundamentals of Wireless Communication, ” Cambridge University Press, 2005.
3cs.SY
1 Superimposed Pilots are Superior for Mitigating Pilot Contamination in Massive MIMO arXiv:1603.00648v3 [cs.IT] 2 Aug 2017 Karthik Upadhya, Student Member, IEEE, Sergiy A. Vorobyov, Senior Member, IEEE, Mikko Vehkapera, Member, IEEE Abstract—In this paper, superimposed pilots are introduced as an alternative to time-multiplexed pilot and data symbols for mitigating pilot contamination in massive multiple-input multipleoutput (MIMO) systems. We propose a non-iterative scheme for uplink channel estimation based on superimposed pilots and derive an expression for the uplink signal-to-interference-plusnoise ratio (SINR) at the output of a matched filter employing this channel estimate. Based on this expression, we observe that power control is essential when superimposed pilots are employed. Moreover, the quality of the channel estimate can be improved by reducing the interference that results from transmitting data alongside the pilots, and an intuitive iterative data-aided scheme that reduces this component of interference is also proposed. Approximate expressions for the uplink SINR are provided for the iterative data-aided method as well. In addition, we show that a hybrid system with users utilizing both timemultiplexed and superimposed pilots is superior to an optimally designed system that employs only time-multiplexed pilots, even when the non-iterative channel estimate is used to build the detector and precoder. We also describe a simple approach to implement this hybrid system by minimizing the overall inter and intra-cell interference. Numerical simulations demonstrating the performance of the proposed channel estimation schemes and the superiority of the hybrid system are also provided. Index Terms—Massive MIMO, pilot contamination, superimposed pilots. I. I NTRODUCTION Massive multiple-input multiple-output (MIMO) systems, proposed in [1], have received significant interest in recent years as a candidate for fifth-generation mobile communication technologies [2]–[4]. These systems are a variation of multi-user MIMO (MU-MIMO) and have a large number of base station (BS) antennas that result in an improved spectral efficiency through spatial multiplexing [5], [6]. Under favorable propagation conditions [1], significant gains in throughput can be achieved by employing simple linear processing at the Manuscript received June 10, 2016; revised Dec. 5, 2016; accepted Feb. 8, 2017. The associate editor coordinating the review of this manuscript and approving it for publication was Dr. Marios Kountouris. Copyright (c) 2017 IEEE. Personal use of this material is permitted. However, permission to use this material for any other purposes must be obtained from the IEEE by sending a request to [email protected]. Part of this work has been presented at the 2016 IEEE International Conf. Acoustics, Speech, and Signal Processing, Shanghai, China. This work was supported in part by the Academy of Finland research grant No. 299243. K. Upadhya and S. A. Vorobyov are with the Department of Signal Processing and Acoustics, Aalto University, FI-00076 Aalto, Finland (E-mails: [email protected], [email protected]). M. Vehkapera is with the Department of Electronic and Electrical Engineering, University of Sheffield, Sheffield, S1 3JD, UK (E-mail: [email protected]). BS [7], [8]. In addition, large numbers of antennas result in an improved uplink (UL) energy-efficiency [9] and render the system performance resilient to hardware impairments [10]. However, all the above mentioned benefits of a massive MIMO communication system hinge on the assumption that the BS has access to accurate estimates of the channel state information (CSI). For systems that employ either frequency division duplexing (FDD) or time division duplexing (TDD), the channel estimates are obtained using orthogonal pilot sequences. In FDD systems, each antenna at the BS transmits a pilot sequence that is orthogonal to the pilot sequences transmitted by the other antennas. Since the number of orthogonal pilot sequences required becomes proportional to the number of BS antennas, FDD is considered impractical for channel estimation in massive MIMO [5], [11]. Moreover, since the CSI corresponding to each antenna is estimated by the users, it has to be fedback from the users to the BS, consuming additional bandwidth. Consequently, massive MIMO systems are typically assumed to employ TDD with full frequency-reuse and utilize channel reciprocity to obtain CSI. In these systems, each user in a cell is assigned a different pilot sequence and these pilots are time-multiplexed with data in each coherence block. When using time-multiplexed pilots and data, the requirement for high spectral efficiency necessitates sharing of pilot sequences between adjacent cells, resulting in the channel estimates of the users in a cell being corrupted by the channel vectors of users in the adjacent cells. This phenomenon called ‘pilot contamination’ [12] introduces interference in both the UL and downlink (DL), degrading the overall performance of the system. Existing methods to mitigate pilot contamination for massive MIMO are designed for the case wherein the pilots are time-multiplexed with the data, henceforth referred to as time-multiplexed pilots. In [13], it has been observed that the eigenvectors of the autocorrelation matrix of the received data correspond to the channel vectors of the desired and interfering users, and a method for channel estimation has been developed based on this observation. Pilot decontamination has been performed in [14] by projecting the contaminated channel estimate on an interference-free subspace spanned by the channel vectors of the desired users, whereas [15] derives asymptotic conditions for separability between the subspaces of the desired and interfering users. In [16], a coordinated method for pilot allocation has been proposed for separating desired and interfering users in correlated channels. A pilot decontamination method based on the array processing model has been proposed in [17] for use in parametric channels with 2 a finite number of discrete paths. In [18], a resource allocation approach has been proposed for optimizing the number of users scheduled in each cell in order to minimize the effect of pilot contamination. A common theme for the approaches described above, except for [16] and [18], is that they focus on decontaminating the channel estimate at the receiver, which in this case is the BS. However, since pilot contamination results from interfering pilot transmissions, there is a scope for better separating the desired and interfering users by optimizing the pilot transmissions at the user terminal as well. In this paper, we propose using superimposed pilots as an alternative to, and in combination with, time-multiplexed pilots in massive MIMO systems. Methods for channel estimation based on pilots that are embedded in data, such as superimposed pilots, have been extensively studied for MIMO systems [19]–[24]. However, these papers have focused on embedded and superimposed pilots in the context of accommodating a loss in signal-to-noise ratio (SNR) in exchange for a reduced pilot transmission overhead [20], [21]. Particularly, scenarios with high user-mobility, wherein it is impractical to allocate dedicated symbols for training, have been of interest for employing superimposed pilots. In the context of multi-cell massive MIMO, provided that the number of users in the system is smaller than the number of symbols in the UL, superimposed pilots allow for each user in the system to be assigned a unique pilot sequence, enabling the receiver to estimate the channel vectors of both the desired and interfering users. In addition, these pilots mitigate pilot contamination by time-averaging over long sequences and offer a higher efficiency due to a reduced transmission overhead. We obtain expressions for the signal-to-interference-plusnoise ratio (SINR) at the output of a matched filter (MF)based detector when a non-iterative least-squares (LS)-based channel estimate is employed for channel estimation. Based on the SINR expression, we highlight the need for power control when superimposed pilots are employed in a massive MIMO system. Moreover, we discuss the shortcomings of the non-iterative channel estimator and propose an intuitive lowcomplexity iterative channel estimation scheme for superimposed pilots.1 In addition, we introduce the concept of a hybrid system and show by means of theoretical arguments that the hybrid system is superior to its counterpart that employs only time-multiplexed pilots, even when the non-iterative channel estimator is used to obtain the channel estimate from superimposed pilots. A simple approach to design and implement this hybrid system is also detailed. Although the use of superimposed pilots requires some coordination between the BSs in assigning pilot sequences to the users and estimating their path-loss coefficients, these are minor impediments compared to the performance improvements provided by the proposed scheme. The article in the existing literature that is closest to this paper is [26], wherein superimposed pilots have been employed in the context of multi-cell multiuser MIMO systems. 1 The work in this paper is a significant extension of our relevant conference paper [25]. In addition to a detailed exposition, we have included additional results that demonstrate the superiority of massive MIMO systems that use superimposed pilots instead of time-multiplexed pilots. However, unlike [26], the focus of our paper is to demonstrate the superiority of superimposed pilots when used in conjunction with time-multiplexed pilots in a hybrid system. The theoretical results and simulations that have been obtained are in line with this objective. In Section II, the system model for the massive MIMO UL is described. In Section III, time-multiplexed pilots are described and the pilot contamination problem is detailed. Section IV introduces the superimposed pilot scheme and describes the non-iterative method for channel estimation and Section V discusses the iterative data-aided scheme. In Section VI, the concept of a hybrid system that employs both timemultiplexed and superimposed pilots is introduced and in Section VII, a simple approach for implementing this hybrid system is discussed. Section VIII presents simulation results demonstrating the effectiveness of employing superimposed pilots for pilot decontamination. Section IX concludes the paper. Some of the proofs are given in Appendix. Notation : Lower case and upper case boldface letters denote column vectors and matrices, respectively. The notations (·)∗ , (·)T , (·)H , and (·)−1 represent the conjugate, transpose, Hermitian transpose, and inverse, respectively. The notation µ, Σ) stands for the complex normal distribution with CN (µ mean µ and covariance matrix Σ and E {·} is used to denote the expectation operator. The notation IN denotes an N × N identity matrix, and k·k and k·kF denote the Euclidean norm of a vector and Frobenius norm of a matrix, respectively. Upper case calligraphic letters denote sets, and ∅ denotes the empty set. The notation 1{S} represents the indicator function over the set S, whereas Card (S) is used to represent its cardinality. The notation δn,m denotes the Kronecker delta function, and η(·) stands for an element-by-element decision function that replaces each element of the input vector with the constellation point that is closest in Euclidean distance to that element. The big O notation f (x) = O(g(x)) implies that |f (x)|/|g(x)| is bounded as x → ∞. II. S YSTEM M ODEL We consider a TDD massive MIMO UL with L cells and K single-antenna2 users per cell. Each cell has a BS with M  K antennas. The number of symbols C, over which the channel is coherent, is assumed to be divided into Cu and Cd , which are the number of symbols in the UL and DL time slots, respectively. The matrix of received measurements Yj ∈ CM ×Cu at BS j can be written as Yj = L−1 X K−1 X √ µ`,k hj,`,k sT`,k + Wj (1) `=0 k=0 where µ`,k denotes the power with which the vector of symbols s`,k ∈ CCu ×1 are transmitted by user k in cell `, Wj ∈ CM ×Cu is the additive white Gaussian noise at BS j with each column distributed as CN (0, σ 2 IM ). Moreover, the columns of Wj are mutually independent of each other. The vector hj,`,k ∈ CM ×1 represents the channel response 2 For training and channel estimation, users with T > 1 antennas can be treated as T separate single-antenna users. 3 between the antennas at BS j, and user k in cell `, and is assumed to be distributed as3 hj,`,k ∼ CN (0, βj,`,k IM ) the LS estimate of the channel of user m in cell j can be obtained as [1] L−1 (2) where βj,`,k denotes the large-scale path-loss coefficient which depends on the user location in the cell. In addition, the channel vectors hj,`,k are assumed to be mutually independent of each other ∀j, `, k. The aforementioned statistics of the channel vector correspond to the non-line-of-sight scenario with rich scattering [1]. By virtue of their zero mean and mutual independence, the channel vectors are asymptotically orthogonal and the following equation holds almost surely [1] hH j,`,k hm,n,p = βj,`,k δj,m δ`,n δk,p , ∀ j, k, `, m, n, p . M →∞ M (3) Moreover, hj,`,k is assumed to be constant for the duration of C symbols, and βj,`,k is constant for a significantly longer duration which depends on the user mobility. For the sake of simplicity, the effects of shadowing are not taken into account in this paper.4 The transmitted symbols s`,k contain both pilots and data. The pilots could either be time-multiplexed or superimposed pilots, and the elements of the data vector x`,k are assumed to be independent and identically distributed (i.i.d) random variables with zero-mean and unit variance and take values from an alphabet χ, which is a realistic assumption. lim III. T IME -M ULTIPLEXED P ILOTS A ND T HE P ILOT C ONTAMINATION P ROBLEM With time-multiplexed pilots, each user in a cell transmits a τ ≥ K length orthogonal pilot sequence for channel estimation followed by Cu − τ symbols of uplink data. In order to minimize the overhead incurred, it is necessary to reuse these pilot sequences in the adjacent cells. However, this pilot-reuse results in the channel estimates of the desired users being contaminated by the channel vectors of users in adjacent cells, causing interference and in turn, a loss in spectral efficiency. It is assumed here that the transmission of the pilot sequences by the users in the L cells are synchronized, which corresponds to the worst-case scenario for pilot contamination.5 Consider a unitary matrix Φ ∈ Cτ ×τ whose columns φ1 , . . . , φ τ } are the orthogonal pilot sequences that are {φ transmitted by the users, i.e., φ H n φ p = τ δn,p . If φ b`,k is the pilot sequence transmitted by user k of cell `, where b`,k ∈ {1, . . . , τ } is the index of the transmitted pilot, and if each pilot sequence is reused once every r , τ /K cells [18], 3 While, for the sake of simplicity, an environment with rich scattering is assumed, the conclusions made in this paper are independent of the channel distribution and only require the channel vectors of any pair of users to be asymptotically orthogonal. 4 The algorithms and analysis in this paper remain the same in the presence of shadowing, provided that the users are allocated to the strongest BSs. However, the geometric interpretations that are made based on the location of the user in the cell will no longer be valid. 5 No additional improvement in the UL performance can be gleaned by separating the pilot and data transmissions across cells [1], [9], [18]. X 1 (p) b TP , √1 Y(p)φ ∗ = hj,j,m + h hj,`,m + √ Wj φ ∗bj,m bj,m j,j,m j τ pu τ pu `=0 `6=j `∈Lj (r) (4) where the superscript TP indicates that the estimates are computed when using time-multiplexed pilots, the superscript p indicates that the observations are made during pilot transmission, and Lj (r) is the subset of the L cells that use the same set of pilots as cell j. In addition, it is assumed in (4) without loss of generality that the transmit powers are same for all users employing time-multiplexed pilots, i.e., µ`,k = pu , ∀`, k, and any variation in the transmit power of an individual user is absorbed into the corresponding path-loss coefficient β. It can be observed from (4) that the estimates of the channel vectors of the users in cell j are contaminated by the channel vectors of the users in the remaining Card (Lj (r) − 1) cells. When M → ∞, the UL SINR of user m in cell j, at the output of an MF that uses the channel estimate in (4) for detection, can be written as [1] SINRTP−ul = j,m β2 P j,j,m2 . βj,`,m (5) `6=j `∈Lj (r) The corresponding throughput of the user using Gaussian signaling in the UL can then be expressed as [1]   (Cu − τ ) TP−ul TP−ul Rj,m = log2 1 + SINRj,m . (6) C From the above equation, it can be observed that the rate per user is a function of both the overhead τ as well as the loss in SINR due to pilot contamination. A larger value of r would reduce the effect of pilot contamination and increase the SINR at the cost of a reduced transmission efficiency (Cu − τ )/C. IV. S UPERIMPOSED P ILOTS With superimposed pilots, the pilot symbols are transmitted at a reduced power alongside the data symbols, and in its simplest version, the pilot and data symbols are transmitted alongside each other for the entire duration of the uplink data slot Cu . If the total number of users in the system is smaller than the number of symbols in the uplink, i.e., KL ≤ Cu ,6 then with superimposed pilots, each user can be assigned a unique orthogonal pilot p`,k ∈ CCu ×1 . The pilots are taken from the columns of a unitary matrix P ∈ CCu ×Cu such that PH P = Cu ICu , and therefore pH `,k pn,p = Cu δ`,n δk,p . If ρ`,k x`,k + λ`,k p`,k is the transmitted vector from user k in 6 For example, using the orthogonal frequency division multiplexing (OFDM) parameters in long-term evolution (LTE) systems as in [1], i.e., Cu = 7 OFDM symbols, Nsmooth = 14 subcarriers, and assuming the pilots are reused over L = 7 hexagonal cells, the maximum number of supported users in the L cells is Cu Nsmooth = 98 users. Therefore, the number of users per cell is Cu Nsmooth /L = 14 users. However, note that the value of Cu = 7 has been chosen to allow user velocities of 350 km/h [27]. For lower user speeds and with cell sectoring, larger number users can be supported and the assumption KL ≤ Cu will easily be satisfied. 4  SINRSP−ul = j,m 2  ρ2`,k µ`,k βj,`,k  2  Cu λ2j,m ρ2j,m βj,j,m `=0 k=0 + 1   M L−1 X K−1 X `=0 k=0 {`6=j,k6=m} cell `, then the received signal at the j’th BS Yj ∈ CM ×Cu , when using the superimposed pilot scheme, can be written as Yj = L−1 X K−1 X T hj,`,k (ρ`,k x`,k + λ`,k p`,k ) + Wj (7) `=0 k=0 where λ2`,k and ρ2`,k are the fractions of the transmit power reserved for the pilot and data symbols, respectively, and the total transmitted power µ`,k is given as µ`,k = λ2`,k + ρ2`,k . A. Non-Iterative Channel Estimation Treating the data symbols of all users as additive noise, the channel estimate of user k in cell ` can be obtained at the j’th BS using the LS criterion [26] b j,`,k , arg minkYj − λ`,k h pT k2 . h `,k F (8) h Solving (8) yields b j,`,k = Yj λ2 pH p`,k h `,k `,k = hj,`,k + + −1  L−1 X K−1 X −1 λ`,k p∗`,k = 1 Yj p∗`,k Cu λ`,k L−1 X K−1 X 1 ρm,n hj,m,n xTm,n p∗`,k Cu λ`,k m=0 n=0 1 Wj p∗`,k . Cu λ`,k (9) In order to estimate the data from the received observations, it is necessary to remove the term corresponding to the transmitted superimposed pilot λj,m hj,j,m pTj,m from the observation b j,j,m pT as an estimate for this vector in (7). Using λj,m h j,m term, the estimate of xj,m can then be obtained from the observation Yj using an MF and a decision operation as follows   1 T bH b eTj,j,m = h (10) x j,j,m Yj − λj,m hj,j,m pj,m M ρj,m βj,j,m bj,j,m = η (e x xj,j,m ) . (11) The SINR of user m in cell j, at the output of an MF that employs the channel estimate in (9), is derived in Appendix A and is given in (12) (shown at the top of the page). The SINR in (12), when M → ∞, can be written as SINRSP−ul = j,m 1 Cu 2 λ2j,m ρ2j,m βj,j,m . L−1 P K−1 P 2 2 ρ`,k µ`,k βj,`,k (13) `=0 k=0 The corresponding per-user rate in the uplink when using Gaussian signaling is given as   Cu SP−ul Rj,m = log2 1 + SINRSP−ul . (14) j,m C βj,`,k µ`,k + ρ2j,m βj,j,m L−1 X K−1 X L−1 X K−1 X ρ2n,p βj,`,k βj,n,p µ`,k   2  Cu λ2j,m ρ2j,m βj,j,m `=0 k=0 n=0 p=0 {`6=j,k6=m} {n6=`,p6=k} (12) B. Power Control and Choice of Parameters λj,m and ρj,m From (13), it can be seen that the SINR of a user is dependent on the product of the transmit powers and largescale fading coefficients of the remaining LK − 1 users in addition to the product of its own transmit power and largescale fading coefficient. This dependence results in a situation similar to the near-far problem in code division multiple access (CDMA) systems, wherein users that have larger values of large-scale fading coefficient β swamp users that have smaller values of β. Therefore, it becomes necessary to use power control to provide a uniform user experience. While the parameters µ`,k , ρ`,k , and λ`,k can be optimized by maximizing the sum-rate of all the users, i.e., (L−1 K−1 ) XX SP−ul max R`,k (15) µ`,k ,ρ`,k ,λ`,k `=0 k=0 the optimization problem is in general non-convex and requires coordination between the BSs. As an alternative, a suboptimal solution that does not involve coordination between the BSs is obtained here for the parameters µ`,k , ρ`,k , and λ`,k . This suboptimal solution will be shown to maximize a lower bound on the sum-rate, and it is as follows. The received signal in (7) can be equivalently written as   L−1 X K−1 X√ ρ`,k T λ`,k T µ`,k hj,`,k √ x`,k + √ p`,k +Wj Yj = µ`,k µ`,k = `=0 k=0 L−1 X K−1 X h̄j,`,k ρ̄`,k x`,k + λ̄`,k p`,k T + Wj (16)  (17) `=0 k=0 where h̄j,`,k , √ µ`,k hj,`,k ∼ CN 0, β̄j,`,k IM β̄j,`,k , βj,`,k . µ`,k s ρ2`,k ρ̄`,k , >0 µ`,k s λ2`,k λ̄`,k , >0 µ`,k (18) λ̄2`,k + ρ̄2`,k = 1 . (21) (19) (20) From (16), it can be seen that a system having arbitrary values of βj,`,k , µ`,k , ρ`,k , and λ`,k , can be reduced into an equivalent system with parameters β̄j,`,k , ρ̄`,k , and λ̄`,k , such that 0 ≤ ρ̄`,k , λ̄`,k ≤ 1. Substituting (18) – (21) into (12), an equivalent expression for the SINR, as shown in (22) (shown at the top of the next page) can be obtained. To obtain the parameter µ`,k , we propose using the statistics-aware power-control approach detailed in [18], wherein user m in cell j transmits at a power µj,m = ω/βj,j,m 5  2  ρ̄2`,k β̄j,`,k  SINRSP−ul = j,m  C λ̄2 ρ̄2 β̄ 2 `=0 k=0 u j,m j,m j,j,m + 1   M L−1 X K−1 X `=0 k=0 {`6=j,k6=m} β̄j,`,k + ρ̄2j,m β̄j,j,m L−1 X K−1 X L−1 X K−1 X  SINRSP−ul ≥ j,m  ρ̄2`,k Cu λ̄2j,m ρ̄2j,m `=0 k=0 + LK − 1 + M ρ̄2j,m L−1 X K−1 X `=0 k=0 m=0 n=0 {`6=j,k6=m} {m6=`,n6=k} where ω is a design parameter. The parameter ω is chosen such that the transmitted power from a user satisfies a maximum power constraint, and users with severely low SINRs that would need a transmit power larger than this constraint would be denied service. This power control policy results in an identical received power of ω at the j’th BS for all the users in cell j. In addition, as mentioned in [18], the ratio 0 ≤ βj,`,k /β`,`,k ≤ 1 is the relative strength of the interference received at BS j from a user in cell `. This ratio is at most 1, when the user is at the edge of the j’th cell, and reduces to zero as its distance from BS j increases. Therefore, setting µ`,k = ω/β`,`,k and using the definitions of β̄j,`,k , ρ̄`,k , and λ̄`,k , and the inequality 0 ≤ βj,`,k /β`,`,k ≤ 1, the following equations can be obtained β̄j,j,m = βj,j,m . µj,m = ω (23) = βj,`,k . µ`,k ≤ β`,`,k µ`,k = ω = = ≤ ≤ ρ̄2j,m ω λ̄2j,m ω ρ2`,k β`,`,k λ2`,k β`,`,k ∀ ` 6= j (24) (25) (26) = ρ̄2`,k ω = λ̄2`,k ω ∀ ` 6= j ∀ ` 6= j . L−1 X K−1 X (27) (28) Substituting the above equations into (22), a lower bound on the SINR, as shown in (29) (shown at the top of the page), can be obtained. However, the maximization of the lower bound on the SINR and hence, a lower bound on the sum rate, is still a non-convex problem in the parameters ρ̄`,k and λ̄`,k and requires coordination between the BSs. To circumvent this problem, we restrict the parameters ρ̄`,k and λ̄`,k such that ρ̄`,k = ρ̄, ∀ `, k and λ̄`,k = λ̄, ∀ `, k. The choice of this restriction is motivated by the observation from (23) that the statistics-aware power control scheme results in the same large-scale path loss coefficient for all the desired users in the cell, irrespective of their locations. As a result, from the BS’s perspective, each of its users are identical, and therefore, there is no benefit in assigning different values of ρ̄`,k to different users. More importantly, such a restriction renders the choice of ρ̄opt to depend only on L, K, Cu , and M as will be shown next. Setting ρ̄`,k = ρ̄, ∀ `, k and λ̄`,k = λ̄, ∀ `, k in (29), we obtain !! 2 −1 1 LK − 1 (LK − 1) LK SP−ul + + . SINRj,m ≥ Cu (1 − ρ̄2 ) M ρ̄2 Cu (1 − ρ̄2 ) (30) L−1 X K−1 X `=0 k=0 m=0 n=0 {`6=j,k6=m} {m6=`,n6=k} ρ̄2m,n β̄j,`,k β̄j,m,n   2  Cu λ̄2j,m ρ̄2j,m β̄j,j,m (22) −1  β̄j,`,k 2 ρj,m βj,j,m λ2j,m βj,j,m ρ2`,k βj,`,k λ2`,k βj,`,k −1  L−1 X K−1 X  ρ̄2m,n  2 2 M Cu λ̄j,m ρ̄j,m  (29) Differentiating the right hand side of (30) with respect to ρ̄2 and setting the resulting expression to zero, the value of ρ̄2 that maximizes the lower bound on SINRSP−ul and the UL j,m sum rate can be obtained as   v !−1 u LK (LK−1)2 −1 r u M + LK  t Cu + M C u  2 (31) ρ̄opt=1+  ≈ 1+ LK−1 Cu M and the optimal value of λ̄2 can be obtained as !−1 r Cu 2 2 λ̄opt = 1 − ρ̄opt ≈ 1 + M + LK (32) where the approximations in (31) and (32) have been made assuming LK  1 in order to obtain simpler expressions. Based on the fact established in this subsection that systems using ρ, λ, β, h, and ρ̄, λ̄, β̄, h̄ are equivalent, we drop the overbar for ease of notation and adopt the former set of symbols in the rest of the paper. In addition, we set µ`,k = ρ̄2`,k + λ̄2`,k = 1, ∀`, k. C. Impact of Cu on the Performance of Superimposed Pilots Using (13) and a fixed set of parameters r, τ , and K, the following theorem presents an important condition that guarantees the superiority of methods based on superimposed pilots over the LS estimator that is based on time-multiplexed pilots. Theorem 1. With fixed values of K, r, and τ and if M → ∞, there exists a UL duration κj,m beyond which a channel estimator based on superimposed pilots outperforms the LS based channel estimator that utilizes time-multiplexed pilots, in terms of the SINR performance, in any channel scenario {βj,`,m 0 ≤ j, ` ≤ L − 1, 0 ≤ m ≤ K − 1}. Proof. If κj,m is defined as the number of symbols in the uplink such that (5) and (13) are equal, i.e., 1 κj,m λ2j,m ρ2j,m 2 βj,j,m L−1 P K−1 P `=0 k=0 = 2 ρ2`,k βj,`,k β2 P j,j,m2 βj,`,m (33) `6=j `∈Lj (r) then it is evident from (13) and (33) that Cu > κj,m is a sufficient condition for a method that is based on superim- 6 posed pilots to outperform the LS method that employs timemultiplexed pilots. In addition, κj,m is given as 1 κj,m , L−1 P K−1 P 2 ρ2`,k βj,`,k `=0 k=0 P 2 βj,`,m `6=j `∈Lj (r) λ2j,m ρ2j,m . (34) This completes the proof. Remark 1: An important consequence of the above theorem is that in scenarios with negligible pilot contamination, the LS method based on superimposed pilots requires a large value of Cu to outperform the LS method based on time-multiplexed pilots. As an example, consider the case when r = 1, βj,j,m = 1, ∀m, βj,`,m = β, ∀` 6= j, m, and ρ2j,m = λ2j,m , ∀ j, m. For such a scenario, κj,m is given as   1 . (35) κj,m = 2K 1 + (L − 1)β 2 Then, if the LS estimator based on superimposed pilots is required to maintain superiority over the LS estimator employing time-multiplexed pilots, Cu must scale inversely with β 2 . This dependence on Cu is evident from the expression for the channel estimation error, which is given as b j,j,m = − 1 ∆hj,j,m , hj,j,m − h Cu λj,m ! L−1 K−1 XX T × ρ`,k hj,`,k x`,k + Wj p∗j,m . (36) `=0 k=0 Remark 2: We build upon the discussion in [1] on grouping users based on their coherence times. While such a grouping does not offer any performance benefits to users when employing the approach in [1], the use of superimposed pilots offers low-mobility users an increase in throughput, by minimizing the channel estimation error resulting from transmitting the data alongside the pilots. This improvement in performance is a direct consequence of Theorem 1. Remark 3: The type of pilot transmitted by a user can also be chosen based on the coherence time. While users with highmobility or low pilot contamination would find it sufficient to use time-multiplexed pilots, users with low-mobility who suffer from significant pilot contamination due to their proximity to the cell-edge or due to shadowing would significantly benefit from employing superimposed pilots. Remark 4: Superimposed pilots require coordination between BSs when assigning pilot sequences and synchronizing transmissions. In practical cellular networks, the cells are fairly large and therefore, it can be assumed that the interference is restricted to the first tier of cells and the interference from the second and higher tiers of cells can be neglected. Therefore, it is reasonable to assume that practical deployments of superimposed pilots will require pilot assignment only over the first tier of cells, implying that coordination is limited to only this first tier. This overhead is not very different from that required by time-multiplexed pilots in the presence of pilot reuse. The coordination and synchronization requirements of superimposed pilot-based systems that allocate pilots over the first tier of cells are similar to that of time-multiplexed pilotbased systems that have a pilot reuse factor of r = 3 [18]. From (36), it can be seen that the error in the channel estimate includes interference resulting from transmitting data alongside the pilots. Hence, the quality of the channel estimate can be improved by eliminating the interference from the transmitted data through iterative data-aided schemes, thereby increasing the robustness of the proposed method with respect to Cu . V. I TERATIVE DATA -A IDED C HANNEL E STIMATION In the iterative approach to channel estimation developed in this section, the estimated channel and data vectors of both the desired and interfering users are used in feedback in order to eliminate the first term in (36). In addition, to minimize error propagation between the channel estimates of different users, the iteration is started from the user with the highest SINR and is progressed in the decreasing order of the SINRs of the users. It has to be noted that the objective of this section is to demonstrate that iterative methods for channel estimation with superimposed pilots provide a significantly better SINR performance than their non-iterative counterparts, and hence we restrict ourselves to a simple iterative algorithm. However, there is scope for developing improved iterative algorithms in the future. A. Algorithm For the sake of clarity and without loss of generality, we replace the two indices k, ` with a single index m that lies in the range 0 ≤ m ≤ N − 1, where N , KL. The index m is used to index the users in all the L cells. In addition, we drop the index j and implicitly assume that the channel estimation is performed at the j’th BS. Then, (7) can be rewritten as Y= N −1 X T hm (ρm xm + λm pm ) + W . (37) m=0 Since for large M , the SINRs of the users are proportional to the users’ path-loss coefficients, the users are arranged in the decreasing order of their path-loss coefficients, i.e., β0 > β1 > . . . > βN −1 .7 Then, using an estimate of ρm hm xTm p∗m for each user as a correction factor to minimize the interference from other users, the corresponding channel estimate of user m can be written as  b (i) = h m m−1  T X 1  (i) b (i) x Y − b ρ h k k k Cu λm  k=0 (i) k∈Um  − N −1 X k=m (i) k∈Um  T  (i−1) b (i−1) x  p∗m b ρk h k k  (38) 7 It is assumed that the BSs have access to the exact values of the pathloss coefficients βm and that there is no false-ordering. This assumption is reasonable since for large M , the path-loss coefficients can be computed at the BS with negligible error by averaging the power of the channel coefficients over the entire array. 7 (0) (i) (i) (p) b m = 0, ∀ m and Um is the set of users whose (S3) ∆xm is independent of ∆x , ∀p 6= i, m 6= k and the where h k (i) estimated data is used in feedback in the i’th iteration to elements of ∆xm are i.i.d. (p) estimate the channel vector of user m. The approach to obtain (S4) ∆h(i) m is independent of xk , W, and ∆xk , ∀ k, p. (i) Um has been detailed in Appendix C, and involves selecting In scenarios with low interference and with large M , only users such that the interference power, described in the next a few of the received symbols will be erroneous. As a subsection, does not increase with each iteration. The channel (i) result, the elements of ∆xm are sparse with the few nonestimate in the above equation is a modified version of the zero elements restricted to locations that correspond to the LS estimator defined in (9) with an added correction factor. (i) erroneous symbols. Moreover, the vector em represents the Utilizing the resulting channel estimate in an MF and decision error in the estimated data and in such low-interference operation, similar to (10) and (11), the estimate of the data is (i) scenarios, the elements of em take small values. Therefore, the obtained as follows simplifications (S1), (S2), and (S3) are reasonably accurate for  H   T  1 (i) (i) T (i) (i) b b em (39) these scenarios. Although the expression for ∆hm , (given in Y − λm hm pm hm x = (i) M ρ m βm (82) in Appendix B) is explicitly dependent on xk and ∆xm ,   (i) (i) bm = η x em (40) we neglect the correlation between these terms since ∆h(i) x m is inversely proportional to Cu , and the simplification (S4) is (0) bm = 0, ∀ m = 0, . . . , N − 1. where x fairly accurate when Cu is large with respect to N and when (i) Remark 5: If the unitary matrix P, whose columns are the su- scenarios with low interference are considered. Since em is (i) perimposed pilots, is chosen as P = blkdiag{P0 , . . . , PL−1 }, assumed to be a zero-mean random variable, ∆xk is also a where the `’th block P` ∈ CK×K is comprised of the orthog- zero-mean random variable, provided the constellation points onal pilot sequences used by the K users in cell `, then the in χ and their probability density functions are symmetric (i) latency introduced when the non-iterative method is employed about the origin. This is true since by definition, ∆xk and (i) is the same as that for time-multiplexed pilots. However, when em are related to each other through the following equation the iterative method is employed, the channel and the data   (i) vectors of the users are required and therefore, the uplink data ∆xk = xk − η xk − e(i) . (43) m in the entire slot will have to be aggregated before estimating the channel, which introduces a latency of Cu symbols. From (43), an expression for the variance of the elements of (i) Remark 6: From (9), the non-iterative method for channel ∆x(i) k , i.e., αk can be found as estimation requires M Cu operations per user, whereas the MF h i 2 Z and decision operations in (10) and (11) require M and Cu (i) (i) 2 αk , E ∆xk = |∆x| p∆x(i) (∆x)d∆x operations per user, respectively. k n Z Z For the iterative method with ν iterations, the channel esti2 = |x − η (x − e)| pe(i) ,x (e, x) de dx mator, matched filter, and decision operations have a combined k k x∈χ complexity of O(νM Cu ) + O(νM ) + O(νCu ). Z Z B. Interference Power at the BS (i) k=0 k6=m (i) where the expression for ψm is given in (42) on the top of (0) the next page and ψm = 0, ∀m. The detailed derivation of (i) Im can be found in Appendix B. In deriving (41), the following simplifying assumptions have been made in order to obtain a closed form expression: (i) (S1) em is independent of xk and W, ∀ k, i. (i) (S2) ∆xm is independent of xk , W, and hk , ∀ k, i. |x − η (x − e)| pe(i) (e) pxk (x) de dx (44) k x∈χ (i) em be the error in the estimate of the data Let em , xm − x symbols of user m obtained from the MF in the i’th iteration. (i) (i) bm be the corresponding error vector Let ∆xm , xm − x (i) (i) bm after the decision operation and let ∆hm , hm − h be the (i) associated error in the channel estimate. If αn is the variance (i) of the elements of ∆xn and assuming that the elements of (i) em are i.i.d. circular complex-Gaussian random variables with (i) zero mean and variance Im , an approximate expression for the (i) interference power Im can be written as   N −1 2 X 1 1 σ βm 1 (i) (i) Im ≈ 2 2 βk βm + + 2 2 ψm  (41) βm M ρ m M ρ2m M ρm 2 = where pe(i) (·), p∆x(i) (·), and pxk (·) are the probability density k k (i) (i) functions of the elements of ek , ∆xk , and xk , respectively, and pe(i) ,x (·) is the joint density function of the random k k (i) variables ek and xk . The latter has been written as the product of their individual distributions in the final expression of (44), thanks to (S1). (i) Important example of αm : When the elements of xm are uniformly distributed and take values from a unit-power P quarternary amplitude modulation (QAM) constellation, then (i) under the assumption that the symbol errors in ∆xk are dominated by the closest neighboring symbols, the expression (i) for αm can be written as !  r 3  (P −1) √ √ 24 , i≥1 Q (i) (i) P ( P +1) Im (45) αm =   1, i=0 where Q (·) is the Q-function. The detailed derivation of the above expression can be found in Appendix D. 8 2 i≥1 X (i) k∈Um ,m≤k≤N   τ X (i) ρ2k βk2 αk  UTP Uplink Data Pilots 1 + M N −1 X  (i) βn βk αk Cd Downlink Data Cu τ No Transmission (i)    ) N −1 X 1 ρ2k βk2 + + + βn βk 2 M M n=0 (i) (i) n=0 k∈Um ,k<m k∈U / m     ! (i−1) −1 N −1   σ 2 NX 1 + αk X 1 (i−1) (i−1) (i−1) ψk + (42) ρ2k βk2 αk + βn βk αk + βn  . 2   M M M n=0 n=0 M  = Cu λ2m (i) ψm +  USP Uplink Data + Superimposed Pilots Cd Downlink Data 1 + αk ( (i) ψk  X data phase of Cu − τ symbols. Since these users maintain radio silence during the pilot training phase of τ symbols, they do not affect the quality of the channel estimates of the users in UTP . As a result, under the assumption of asymptotic orthogonality of the channels, there is no interference from the users in USP to those in UTP . Therefore, the per-cell sum-rate in the UL for the users in UTP remains unchanged and can be found from (6) to be   Rul j (UTP ) = K−1  (Cu − τ ) X  log2 1 + C  k=0 k∈UTP Cu Fig. 1. Frame structure of a hybrid system with users employing timemultiplexed and superimposed pilots. VI. H YBRID S YSTEM One of the main advantages of superimposed pilots over time-multiplexed pilots is that it does not require a separate set of symbols for pilot transmission. This property can be used to construct a hybrid system that contains two disjoint sets of users, with the users in one of the sets employing timemultiplexed pilots, and the users in the other set employing superimposed pilots. The following theorem shows that this hybrid system has a higher throughput and supports a larger number of users than a system that employs only timemultiplexed pilots. Theorem 2. In a system that employs time-multiplexed pilots and is designed to maximize the UL and DL sum-rate,8 let K be the optimal number of users per cell, L be the total number of cells in the system, τ > 0 be the optimal number of symbols used for pilot training, r be the optimal pilot-reuse factor, and Cu − τ and Cd be the number of data symbols in the UL and DL slots, respectively. Then, with M → ∞, there exists a hybrid system, that uses both time-multiplexed and superimposed pilots, which is capable of supporting Cu − τ additional users and offers a higher sum-rate in the UL than the optimal system that only employs time-multiplexed pilots. Proof. Consider the frame structure in Fig. 1, wherein there are two sets of users UTP and USP . The users in the set UTP employ time-multiplexed pilots, with parameters selected using approaches such as in [18]. The users in the set USP maintain radio silence during the pilot training phase of the users in UTP , i.e., for τ symbols in the frame, and transmit orthogonal pilots superimposed with data during the uplink 8 Such as the scheme described in [18].  β2 P j,j,k2   . βj,`,k  `6=j `∈Lj (r) (46) Assuming, for the sake of simplicity, that all the users in USP are located in the j’th cell, the sum-rate of the users in USP can be found using (13) and (14) as (Cu − τ ) X log2 (1 + SINRm (USP )) (47) Rul j (USP ) = C SINRm (USP ) , P m∈USP 2 βj,j,m 2 ρ2j,k βj,j,k (Cu −τ )ρ2j,m λ2j,m . (48) k∈USP In obtaining the above expression, it has been assumed that the transmit power pu of the users in UTP is small enough such that the interference to the users in USP can be neglected.9 Therefore, from (46) and (48), the combined rate ul ul Rul j (USP ) + Rj (UTP ) is strictly greater than Rj (UTP ). In addition, since the data slot is made up of Cu − τ symbols, it is possible to allocate Cu − τ orthogonal pilots and therefore, the set USP can contain a maximum of Cu − τ users. This concludes the proof. In the above theorem, given a system with users employing time-multiplexed pilots, we have shown that additional users employing superimposed pilots can always be added to the system, resulting in a hybrid system that offers a higher throughput. In the following section, we utilize the concept of the above theorem to partition a given set of users employing time-multiplexed pilots into two disjoint subsets UTP and USP that contain users transmitting time-multiplexed pilots and superimposed pilots, respectively. There are two main benefits of performing such a partition: (i) there is an overall 9 This assumption is valid since the SINR and the rate of the users in U TP are independent of the transmit power pu when M → ∞. It has to be noted that this assumption has been made for the sake of simplicity and the theorem is valid even if this assumption does not hold. 9 improvement in the throughput as a result of the reduced intercell interference; and (ii) there is a reduction in the number of users that use time-multiplexed pilots, thereby allowing for more aggressive pilot reuse since r is a function of the number of users employing time-multiplexed pilots [18]. `=0 k=0 (`,k)∈USP VII. A S IMPLE I MPLEMENTATION OF THE H YBRID S YSTEM Given a set of K users per cell in L cells with channel gains βj,`,k , ∀j, ` = 1, . . . , L, and k = 1, . . . , K, the problem of partitioning users into disjoint sets UTP and USP can be accomplished by minimizing the overall UL inter-cell and intra-cell interference. This choice of objective function is motivated by Theorem 1, wherein it is observed that users at the cell edge cause significant pilot contamination and benefit from being assigned superimposed pilots, whereas users that are close to the BS cause negligible interference and could be assigned time-multiplexed pilots that are potentially shared with users in neighboring cells. A. Framework If the users in UTP transmit pilots with unit power and data at a power pu , then the received signal from the hybrid system in the UL phase at BS j can be written as Yj = YjTP + YjSP + Wj (49) where YjTP and YjSP are the received signals from the users in UTP and USP , respectively. From Fig. 1, YjTP and YjSP can be written as YjTP , L−1 X K−1 X   √ hj,`,k φ T`,k , pu xT`,k (50) `=0 k=0 (`,k)∈UTP YjSP , L−1 X X K−1   hj,`,k 01×τ , ρxT`,k + λpT`,k (51) `=0 k=0 (`,k)∈USP where the tuple (`, k) is used to denote user k in cell `. If user (j, m) is a member of UTP , then the LS estimate of its channel can be written as [1] X 1 b j,j,m = 1 Yj bTP = hj,j,m + h hj,`,m + Wj bTP j,m j,m (52) τ τ `6=j `∈Lj (r) (`,m)∈UTP  H T where bTP . If M  K, the SINR j,m , φ j,m , 0(1×(Cu −τ )) in the UL when using the channel estimate in (52) can be obtained similar to (5) as SINRTP−ul j,m 2 βj,j,m ≈ P 2 βj,`,m If user (j, m) is a member of USP , then the LS estimate of its channel can be written as 1 b j,j,m = Yj bSP h j,m (Cu − τ ) λ L−1 X K−1 X ρ = hj,j,m + hj,`,k xT`,k p∗j,m (Cu − τ ) λ (53) `6=j `∈Lj (r) (`,m)∈UTP where the approximations in (53) is made for the sake of simplicity and is valid when M is sufficiently large. + √ pu L−1 X K−1 X `=0 k=0 (`,k)∈UTP hj,`,k xT`,k p∗j,m + Wj bSP j,m (Cu − τ ) λ (54) T  H . Since it can be seen from where bSP j,m , 0(1×τ ) , pj,m (53) that the UL SINR of the users in UTP is independent of the UL transmit power pu , we assume that pu is small enough with respect to the transmit powers of the users in USP . As a result, the users in USP do not experience significant interference during the data transmission phase of the users in UTP and result in the transmissions of USP and UTP becoming independent of each other.10 Then (54) simplifies as L−1 X hj,`,k xT`,k p∗j,m X K−1 b j,j,m ≈ hj,j,m + ρ + Wj bSP h j,m . λ (Cu − τ ) `=0 k=0 (`,k)∈USP (55) Then the SINR in the UL for the users in USP can be obtained from (13) as SP−ul ≈ SINRj,m 2 βj,j,m L−1 P K−1 P 1 (Cu −τ )λ2 `=0 k=0 (`,k)∈USP (56) 2 βj,`,k where, similar to (53), the approximation in (56) is made for the sake of simplicity and is valid when M is sufficiently large. B. Algorithm to Obtain UTP and USP . The goal in this subsection is to obtain an algorithm for partitioning users into the sets UTP and USP by minimizing the total UL inter-cell and intra-cell interference. In order to accomplish this, we quantify the amount of interference caused by a user that is assigned to either of the sets UTP or USP . TP−ul SP−ul Let Ij,m or Ij,m be the contributions of user (j, m) to the total UL inter/intra-cell interference power when assigned to UTP or USP , respectively. If users (j, m) and (`, k) are members of UTP , then from the denominator of (53), the amount of interference that user (j, m) causes to user (`, k) 2 in the UL is β`,j,k δm,k . Likewise, from (56), if both users are members of USP , then the amount of interference that user  2 (j, m) causes to user (`, k) in the UL is β`,j,m / (Cu − τ ) λ2 . TP−ul SP−ul Therefore, Ij,m and Ij,m can be obtained as X K−1 X X TP−ul 2 2 β`,j,k Ij,m = δm,k = β`,j,m `6=j k=0 `∈Lj (r) (`,k)∈UTP (57) `6=j `∈Lj (r) (`,m)∈UTP 10 This assumption is made for the sake of clarity and simplicity. In the absence of this assumption, the BS will have to estimate and remove YjTP from Yj before estimating the channels of the users in USP . 10 SP−ul Ij,m = L−1 X K−1 X 1 2 β`,j,m . 2 (Cu − τ ) λ (58) `=0 k=0 (`,k)∈USP From the above equations, the total cost due to UL inter/intracell interference can be expressed as I (UTP , USP ) = L−1 X K−1 X `=0 k=0 TP−ul I`,k 1{(`,k)∈UTP } SP−ul + I`,k 1{(`,k)∈USP }  (59) Using (59) as the objective function, the sets UTP and USP can be obtained as the solution of the following optimization problem (UTP , USP ) = arg min I (UTP , USP ) UTP ⊆U USP ⊆U subject to UTP ∪ USP = U UTP ∩ USP = ∅ (60) where U is the set of all users in the L cells. However, the optimization problem in (60) is combinatorial in nature with 2Card(U ) possible choices for UTP and USP , making it computationally hard to obtain the optimal solution. A workaround is to employ a greedy approach to partition U into UTP and USP . Ateach step of this algorithm, given UTP ˜ k̃ in UTP is chosen as and USP , a user `,   ˜ k̃ = arg `, max (`,k)∈UTP TP−ul I`,k . (61)     0 ˜ k̃ and U 0 = USP ∪ `, ˜ k̃ , user Setting UTP = UTP \ `, SP   ˜ k̃ is added to USP if `, 0 0 I (UTP , USP ) ≤ I (UTP , USP ) . (62) The algorithm is initialized with UTP = U and is terminated when (62) is no longer satisfied or when UTP is empty. The approach described above is summarized in Algorithm 1. The complexity of the greedy algorithm used for designing the hybrid system can be obtained as follows. The terms I TP−ul and I SP−ul require a maximum of Card (U) operations to compute, and therefore, computing I (UTP , USP ) 2 requires Card (U) operations. Assuming that the greedy algorithm runs till the condition UTP = ∅ is satisfied, then an upper bound on the computational complexity of the greedy 3 algorithm is Card (U) operations. Moreover, an overhead of 2Card (U) data transmissions is required for sending the largescale path-loss coefficients to a central node and receiving the sets UTP and USP . It has to be noted that Algorithm 1 is sub-optimal, but it is useful for illustrating the concept of the hybrid system. Partitioning algorithms that offer superior performance compared to Algorithm 1 with lower coordination overhead are left as topics for future research. Algorithm 1 Greedy algorithm to select UTP and USP Data: βj,`,k , ∀j, ` = 0, . . . , L − 1, k = 0, . . . , K − 1 Initialize: UTP  ← U, USP ← ∅ ˜ k̃ as in (61) 1: Compute `,     0 ˜ k̃ and U 0 ← USP ∪ `, ˜ k̃ 2: Set UTP ← UTP \ `, SP 0 0 3: if UTP 6= ∅ and if I (UTP , USP ) ≤ I (UTP , USP ) then 0 0 4: UTP := UTP , USP := USP 5: Return to Step (1). 6: else 7: STOP 8: end if VIII. S IMULATION R ESULTS We compare the UL SINR and UL bit-error rate (BER) performance of the LS-based and eigenvalue decomposition (EVD)-based methods (referred to as ‘TP - EVD-based method’ in the plots) that use time-multiplexed pilots to the performance of the channel estimator that uses superimposed pilots, at the output of a MF that employs these channel estimates. Two scenarios are considered for this comparison. Scenario 1: The users are uniformly distributed in hexagonal cells of radius 1km with the BS at the center. In addition, users are located at a distance of at least 100m from the BS. Scenario 2: Users in both the reference and interfering cells are in a fixed configuration and are equally spaced on a circle of a given radius with the BS in the center. The size of the hexagonal cell is 1km and unless otherwise specified, the users are on a circle of radius 800m. Unless otherwise specified, the following parameters are used in both scenarios. The channel estimation methods are tested with L = 7 cells and K = 5 users per cell. A P QAM constellation is employed and the path-loss coefficient is assumed to be 3. The simulations for the superimposed pilots-based iterative channel estimation scheme have been performed for 4 iterations. The number of symbols in the uplink time slot Cu is set to 100, and for computing the rate, C is set to 200 symbols. The values of ρ and λ are computed from (31) and (32), respectively, and ω is set to 1, where ω is the design parameter in the statistics-aware power control scheme. The signal-to-noise ratio (SNR), i.e., ω/σ 2 is set to 10dB. The methods based on time-multiplexed pilots have been simulated with r = 1 and pu = 1. In addition, the chosen channel estimation methods have been observed to perform better with the statistics aware-power control scheme, and therefore, this power control scheme has been employed for both time-multiplexed and superimposed pilots. The plots in Scenario 1 are generated by averaging over 104 realizations of user locations across the cell. For each realization of user location, the channel vectors are generated and 200 bits are transmitted per user. The BER is computed by counting the bit errors for all the users in the reference cell. Similarly, the plots in Scenario 2 are generated for a fixed user location by averaging over 104 channel realizations with 200 bits transmitted per user for each realization. 11 2 22 SP - Ufixed Approximate Rate - bits/s/Hz 18 (i) SINR 14 10 6 2 100 200 300 400 500 Number of antennas at the BS (M ) 1.4 1.2 1 200 300 400 500 Number of antennas at the BS (M ) 600 10−1 (i) Um SP - Optimal SP - Non-iterative TP 10−2 0.7 0.6 BER Cumulative Probability 1.6 Fig. 3. Approximate per-user UL rate obtained using a 16-QAM constellation vs. M in the reference BS in Scenario 2. The maximum UL rate that can be achieved with the 16-QAM constellation, with half the symbols in a coherence blocked used for UL transmission, is 2 bps/Hz. 1 0.8 1.8 0.8 100 600 Fig. 2. The UL SINR of a user in the reference BS vs. M in Scenario 2. The values of ρ and λ are computed from (31) and (32), respectively, and since they are approximations, they result in a non-smooth SINR behavior for the iterative methods. The solid and dashed lines represent simulated and theoretical curves, respectively. 0.9 SP - Optimal Um SP - Ufixed SP - Non-iterative TP (i) SP - Optimal Um SP - Non-iterative TP 0.5 10−3 0.4 (i) 0.3 SP - Optimal Um SP - Ufixed SP - Non-iterative TP - EVD based method in [14] TP - LS Estimate −4 10 0.2 0.1 0 −5 0 5 10 15 20 UL SINR (dB) 10−5 1 2 3 4 5 6 7 8 Number of users per cell (K) 9 10 Fig. 4. Cumulative distribution of the UL SINR in dBs for users in Scenario 1 with M = 300 antennas. The black line indicates SINRs with probability ≥ 0.95. Fig. 5. BER in the UL vs. K in Scenario 1 with M/K = 50 and Cu = 70 symbols. Fig. 2 shows the variation of the UL SINR of an arbitrary user with respect to M in Scenario 2, whereas in Fig. 3, the approximate rate of an arbitrary user, calculated using 16-QAM constellation, is plotted for the same scenario. We compute the achievable rate for 16-QAM signaling, modeling a practical scenario where highly mobile users are requesting moderate-to-high data rates. The SINR when the proposed method is employed, is shown to linearly increase in the number of antennas, whereas the SINR performance is observed to saturate for the LS-based method that uses timemultiplexed pilots. This trajectory of the proposed method could be potentially maintained using techniques such as adaptive modulation and coding, thereby implying that the effects of pilot contamination can be eliminated. over 100 channel and data realizations for each realization of user location. While the LS-based method employing time-multiplexed pilots offers a higher SINR than the LS method employing superimposed pilots with a probability of approximately 0.6, the latter method can be seen to offer a significantly higher minimum SINR compared to the former method. Moreover, the users employing superimposed pilots have a smaller variation in their SINR than those employing time-multiplexed pilots. This is because the SINR of a user when superimposed pilots are employed is limited by the interference from the other users in the same cell, and the statistics-aware power control scheme renders the intra-cell interference power independent of the user location within the cell. The iterative method based on superimposed pilots is observed to offer a remarkably higher SINR performance with respect to its non-iterative counterpart and the LS-based In Fig. 4, the cumulative distribution of the UL SINR in Scenario 1 is plotted. The interference power is averaged 12 ω . SIRRx j , P P 2 βj,`,k (63) `6=j k We assume L = 19 hexagonal cells, i.e., a central cell with two tiers of interfering cells. Each cell has M = 1000 antennas, K = 5 users, and the value of Cu is chosen as 40 symbols. Although L is set to 19, the optimization described in Algorithm 1 and the computation of the performance metrics is performed over 7 cells which consist of the central and the first tier of cells. The value of ω for users in USP is set to 10 and pu for the users in UTP is set to 1. The data symbols are Gaussian distributed and the sum rate in Fig. 6 is obtained by averaging over 103 realizations of the channel and data symbols. In Fig. 6, high and low values of SIR correspond to users located close to the BS and at the cell-edge, respectively. It can be observed that channel estimation methods based only on superimposed pilots (even the non-iterative formulation) are better in high interference scenarios, i.e., when the interfering users are at the cell-edge, whereas time-multiplexed pilots are better in low-interference scenarios. This behavior is a direct consequence of Theorem 1 since higher interference scenarios have smaller values of κ, resulting in superimposed pilots outperforming time-multiplexed pilots. However, at smaller values of user radius, the impact of pilot contamination is low but the self-interference in superimposed pilots resulting from transmitting the data alongside the pilots leads to a poorer performance compared to methods based on time-multiplexed pilots. In addition, it can be seen that the hybrid system adapts to the level of inter and intra-cell interference and offers a performance that is resilient to the location of the user within the cell. 140 Hybrid TP SP - Non-iterative 120 UL Sum Rate - bits/s/Hz method employing time-multiplexed pilots. In Fig. 5, the BER is plotted against the number of users per cell in Scenario 1, with K ranging from 1 to 10 and Cu = 70 symbols. Since L = 7 cells, K = 10 implies that the superimposed pilot-based system cannot support any new users without sharing pilots across cells. The ratio M/K is set to 50. While the non-iterative channel estimator based on superimposed pilots performs better in the UL at lower values of K than the estimators based on time-multiplexed pilots, the non-iterative estimator performs poorly at higher values of K. This is because the data transmitted alongside the pilots causes self-interference and this interference power increases with the number of users in the system. Therefore, it is necessary to resort to iterative techniques to mitigate this additional interference and it can be seen that the iterative methods offer a better performance than methods based on time-multiplexed pilots when LK is close to Cu . In Fig. 6, the users are distributed as in Scenario 2 and the distance of the users from the BS is varied between 0.2 and 0.9 km. For the chosen range of user distance, the total rate in the UL is plotted against the corresponding received signalto-interference ratio (SIR). The received SIR of an arbitrary user m in cell j is defined as 100 80 60 40 20 0 −10 0 10 20 30 40 50 SIRRx (dB) j Fig. 6. UL sum rate vs. SIRRx in Scenario 2 with M = 1000 antennas. j IX. C ONCLUSION AND D ISCUSSION We have proposed superimposed pilots as a superior alternative to time-multiplexed data and pilots for uplink channel estimation in massive MIMO. In the limit of an infinite number of antennas, a hybrid system using both superimposed pilots and time-multiplexed data and pilots offers a higher UL rate and supports larger number of users than the optimal system that utilizes only time-multiplexed data and pilots. The resilience to pilot contamination can be significantly improved with superimposed pilots through the use of an iterative dataaided channel estimation scheme that utilizes the data symbols of both the desired and interfering users in the feedback loop. Computer simulations in both a realistic scenario, in which users are distributed uniformly over the entire cell, and a highinterference scenario, in which users are concentrated at the cell edge, show that channel estimation methods using superimposed pilots offer a significant performance improvement over those that use time-multiplexed pilots. The objective of this paper is to advocate superimposed pilots for practical use in massive MIMO systems by showing their superiority through theoretical and simulation based investigations. In standard MIMO communications, superimposed pilots are typically argued to be useful only for the scenario with high user mobility, and therefore, have not found practical application. On the contrary, in massive MIMO, superimposed pilots in a hybrid system provide superior performance in general. Therefore, there is a strong reason for superimposed pilots to make their way to practical use. The proposed iterative data-aided channel estimation scheme and the greedy algorithm for partitioning users are suboptimal solutions to corresponding non-convex problems. Algorithms that offer performance close to the optimal solution at low computational complexities and overheads are of interest for future research. Moreover, the downlink performance of superimposed pilots is another topic of practical importance, which we have partially addressed in [28]. 13 N −1 N −1 X X  ρ2k βn βk µn E ki2 k2 + ki3 k2 + ki4 k2 ≈ 2 M λ2m ρ2m βm n=0 A PPENDIX A Uplink SINR of the Non-Iterative Channel Estimation Method Using the notation described in Section V-A, (7) can be rewritten as N −1 X T Y= hm (ρm xm + λm pm ) + W (64) k=0 n6=m k6=n N −1 N −1 X X ρ2n ρ2p βp βn ρ2n µn βn2 + + 2 λ2 ρ2 β 2 Cu ρ2m λ2m βm n=0 p=0 n=0 m m m N −1 X n6=m p6=m n6=p m=0 N −1 N −1 X X  ρ2n ρ2p βn βp E ki5 k2 ≈ 2 Cu λ2m ρ2m βm n=0 p=0 From (9), the estimation error of the channel estimate can be obtained as ! N −1 X 1 T bm = − ∆hm , hm − h ρk hk xk + W p∗m . Cu λm k=0 (65) From (10) and (65), the estimate of the received data after MF with the estimated channel can be written as   1 b m pT b H Y − λm h eTm = h x m m M ρ m βm  1 = hH − ∆hH m M ρ m βm m N −1 X T × hk (ρk xk + λk pk ) + W k=0  −λm (hm − ∆hm ) pTm = gT + iT (66) where g and i are the signal and interference components of the matched filtered signal, respectively, which can be written as khm k2 g, xm (67) M βm 5 X in (68) i, i1 , n=1 N −1 X n=0 n6=m (69) λm hH ∆hm pm (70) M ρ m βm m 1 i3 , − ∆hH (71) m hm xm M βm T N −1 X ∆hH 1 mW H ∆hm hn (λn pn + ρn xn ) − i4 , − M ρm βm n=0 M ρ m βm i2 , (77) n6=m p6=m n6=p E  N −1 N −1 X X  ρ2n ρ2p βn βp H i ≈ − iH + i 5 3 4 2 Cu λ2m ρ2m βm p=0 n=0 (78) p6=m n6=m n6=p where the approximation errors in (75) – (78) are proportional to either N/M , N/Cu , or Cu /M . In addition, the remaining terms of the form iH n ip , ∀ n 6= p in the expansion of (74) are proportional to N/M or N/Cu . If M is large with respect to N and Cu , then the approximation errors and terms that are proportional to N/M and N/Cu can be neglected. Similarly, error terms that are proportional to N/Cu can also be dropped, and if σ 2  Cu , then the effect of noise can also be neglected. Then, substituting (75) – (78) into the expansion of (74), the interference power is obtained as N −1 N −1 X X  ρ2n µn βn2 Cu βn µn E kik2 ≈ + 2 ρ2 β 2 λ M ρ2m βm n=0 m m m n=0 n6=m + T hH W hH m hn (λn pn + ρn xn ) + m M ρm β m M ρm β m (76) −1 N −1 N X X ρ2k βn βk µn 2 M λ2m ρ2m βm n=0 k=0 n6=m k6=n . (79) Using (79), the SINR can be obtained as  E kgk2 SINRSP−ul , m E {kik2 } Cu = N −1 . −1 NP −1 2 N −1 P ρ2n µn βn2 P Cu βn µn NP ρk βn βk µn + + λ2 ρ2 β 2 M ρ 2 βm M λ2 ρ2 β 2 n=0 m m m n=0 n6=m m n=0 k=0 n6=m k6=n m m m (80) n6=m (72) λm i5 , − k∆hm k2 pm . M ρ m βm The average interference power can be found as   2 5  X   2 E kik = E in .   (73) (i) (74) Then, using the definitions of in , ∀ n in (69) – (73) and the definition of ∆hm in (65), the following expressions can be easily obtained N −1 X Cu βn µn M ρ2m βm n=0 n6=m A PPENDIX B Interference Power of the Iterative Method n=1  E ki1 k2 ≈ It completes the derivation of (12). (75) To derive the SINR, using the definition of ∆xm , xm − the channel estimate in (38) can be simplified as   T X X (i) b (i) x b (i) = hm + 1  ρk hk xT − bk ρk h h k m k Cu λm k k∈Uj ,k<m   T X (i−1) b (i−1) x bk − ρk h + Wj  p∗m (81) k (i) bm , x k∈Uj ,m≤k≤N 14 where    T 1  X (i) (i) ρk hk ∆xk + ∆hk xTk Cu λm k∈Uj ,k<m    T  T X (i) (i) (i−1) (i−1) T −∆hk ∆xk + ρk hk ∆xk +∆hk xk ∆h(i) m =− k∈Uj ,m≤k≤N (i−1) −∆hk  (i−1) ∆xk T  ! + X ρk hk xTk + W p∗m . k∈U / j (82) The received symbols after MF in (39) are then given as  −1 H  NX  1 T H (i) hm− ∆hm hk (ρk xk + λk pk ) = M ρm  k=0   T p +W − λm hm − ∆h(i) m m bTm x 7 = X 1 khm k2 xTm + aTk M (83) k=1 where N −1 1 X H a1 , hm hk (ρk xk + λk pk ) M ρm T 1 hH mW M ρm λm H a3 , h ∆h(i) m pm M ρm m   H 1 ∆h(i) a4 , − hm xm m M N −1 1 X  (i) H ∆hm a5 , − hk (ρk xk + λk pk ) M ρm (84) (85) (86)  H T 1 ∆h(i) W m M ρm 2 λm a7 , − ∆h(i) pm . m M ρm (87) (88) (89) (90) k=1 where the terms a6 , a7 , and aH p aq , ∀p, q have been dropped. Further, it can be shown straightforwardly that N −1  Cu X β k βm E ka1 k2 = M ρ2m (92) 2 E ka2 k Cu σ 2 βm = . M ρ2m E ka5 k  N −1 N −1  H X X 1 (i) H (i) = 2 2 E ∆hm h` hk ∆hm M ρm `=0 k=0 `6=m k6=m n o H × E (ρ` x` + λ` p` ) (ρk xk + λk pk )       N −1     X H Cu  H (i) h h ∆h . (96) ∆h(i) = 2 2 E  k k  m m  M ρm    k=0 Summing up (94), (95), and (96), we obtain ( 5 ) X Cu 2 E kak k = 2 2 M ρm k=3 ( ! ) −1  H NX (i) H (i) ×E ∆hm hk hk ∆hm . (97) (i) Now, let ψm be defined as the second term in (97), i.e., ( ! ) −1  H NX (i) (i) ψm ,E ∆hm hn hH ∆h(i) . (98) n m i≥1 Using (82) and the simplifications (S1) to (S4), (98) can be simplified to obtain (42). Substituting (92), (93), (97), and (42) (i) into (91), Im can be obtained as (i) Im ≈ N −1 σ 2 βm 1 1 X (i) β β + + 2 2 ψm . k m M ρ2m M ρ2m M ρm (99) k=0 k6=m It completes the derivation of (41). A PPENDIX C (i) Choice of the Set of Users Um Let S be a set of the KL users in the system and let P (S) be its power set. In addition, for the sake of clarity, let the (i) (i) additional argument Um be added to the functions Im and (i) (i) ψm in this section. Now, the optimal set Um can be obtained by solving the following optimization problem n o (i) (i) Um = arg min Im (U) . (100) U ∈P(S) k=0 k6=m  2 n=0 Under the assumption that the interference power at each of the received symbols is the same, the average interference power of the m’th user at the j’th cell is given as   " ( 5 )# 2 7  X  X 1 1 (i) E E kak k2 (91) Im = ak ≈  Cu Cu  k=1  k=0 k=0 k6=m a6 , − and k6=m k=0 k6=m a2 ,    Moreover, E ka3 k2 , E ka4 k2 , and E ka5 k2 can be written as    H  λ2m 2 H (i) T ∗ (i) E ka3 k = 2 2 E hm ∆hm pm pm ∆hm hm M ρm    H Cu λ2 (i) (i) E ∆h hm hH (94) = 2 m m m ∆hm M ρ2m   H  1 (i) E ka4 k2 = 2 E ∆h(i) hm xTm x∗m hH m m ∆hm M   H 1  (i) (i) = 2 E xTm x∗m E ∆hm hm hH ∆h m m M    H Cu (i) = 2E ∆h(i) hm hH (95) m m ∆hm M (93) Substituting (41) into (100) yields n o (i) (i) Um = arg min ψm (U) . U ∈P(S) (101) 15 (i) Now, ψm (U) can be rewritten as (i) ψm (U) = c + N −1 n X n=0 (i) ξn 1{n∈U / } + n (U)1{n∈U ,n<m} +(i−1) (U)1{n∈U ,n≥m} n o (102) (i) where c, ξn , and n (U) are defined as ! N −1 M σ2 X βk c, Cu λ2m k=0 ( ) N −1 1 X M 2 ρ2n 2 βn + βk βn ξn , Cu λ2m M k=0 ( N −1 2 2 X M ρ 1 n 2 (i) (i) β α + βk βn αn(i) n (U) , n n Cu λ2m M k=0    (i)  1 + αn (i) + ψ (U) . n  M2 (103) (i) n∈Um (i) < ψm (i) n∈U / m . The decision rule in (112) results in a set Ufixed that is computed at the beginning of the first iteration and is left unchanged for the subsequent iterations. (104) A PPENDIX D Derivation of (105) (i) αm for a P -QAM constellation For P -QAM constellation and i ≥ 1, the integral over xm in (44) reduces to a summation, which can be written as XZ 2 (i) αm = |x − η (x − e)| pe(i) (e) pxm (x) de . (113) m x∈χ It can be seen from (102) that the optimization problem (101) is separable over the user indices, implying that the decision (i) to include user n in Um is independent of the other N − 1 users. Therefore, the channel and data estimates of user n are used in the i’th iteration if the following condition is satisfied (i) (i) n ∈ Um iff ψm However, since the decision rules are based on approximate SINR expressions, it is worth commenting that the reliability of the decision rule in (108) decreases with increasing user and iteration indices. Alternatively, a fixed and conservative decision rule can be used to obtain U as follows n o (2) (2) (1) Ufixed = m ∈ N Im ({m}) < Im (∅) = Im (∅) . (112) (106) Since the P symbols are equally likely, pxm (x) = 1/P, ∀ x and under the assumption that the errors x − η (x − e) are dominated by the closest neighboring symbols, the above equation reduces to   dx X 1 (i) d2 kx Q  q 2 (i)  (114) αm = P x∈χ x Im 2 (i) From (102) and (106), the set Um is obtained as n (i) Um = n ∈ N (i) n (U) < ξn when n < m o and (i−1) (U) < ξn when n ≥ m . n (107) Equivalently, using (104) and (105), the above expression simplifies to n (i) Um = n ∈ N αn(i) < γn(i) when n < m o and αn(i−1) < γn(i−1) when n ≥ m (108) where ( βn2 γn(i) + 1 M ,( βn2 + 1 M NP −1 k=0 NP −1 k=0 βn βk − (i) ψn ) (i) n∈Um M2 βn βk + (0) ). (i) ψn where dx is the distance between the symbol x and its closest neighbor and kx is the number of symbols at a distance of dx from x. The Q-function in the above equation results from the (i) assumption on the statistics of em . For a unit-power P -QAM p constellation, dx = 6/P − 1, ∀x [29]. In addition, it can be easily verified that kx = 2 for the 4 corner symbols, kx = 3 √ for the ( P − 2)4 symbols √ on the outer edges, and kx = 4 for the remaining P − 4 P + 4 symbols. Substituting these values into (114) yields s  3 24 −1) (i)  .  Q  (P (i) αm = √ √ (115) i≥1 Im P P +1 (109) (i) n∈Um M2 R EFERENCES If xm takes values from the P -QAM constellation, then (i) substituting (45) into (108), the set Um can be obtained as n (i) Um = n ∈ N In(i) < fn(i) when n < m o and In(i) < fn(i−1) when n ≥ m (110) (i) where fn is defined as   √ √  (i) P P + 1 γn 3  . fn(i) , Q2  P −1 24 (0) Moreover, since ∆x`,m = x`,m , the value of αm is 1. It completes the derivation of (45). (111) [1] T. Marzetta, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Trans. Wireless Commun., vol. 9, no. 11, pp. 3590–3600, Nov. 2010. [2] F. Boccardi, R. Heath, A. Lozano, T. Marzetta, and P. Popovski, “Five disruptive technology directions for 5G,” IEEE Commun. Mag., vol. 52, no. 2, pp. 74–80, Feb. 2014. [3] E. Larsson, O. Edfors, F. Tufvesson, and T. Marzetta, “Massive MIMO for next generation wireless systems,” IEEE Commun. Mag., vol. 52, no. 2, pp. 186–195, Feb. 2014. [4] J. Andrews, S. Buzzi, W. Choi, S. Hanly, A. Lozano, A. Soong, and J. Zhang, “What will 5G be?” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1065–1082, Jun. 2014. [5] L. Lu, G. Li, A. Swindlehurst, A. Ashikhmin, and R. Zhang, “An overview of massive MIMO: Benefits and challenges,” IEEE J. Sel. Topics Signal Process., vol. 8, no. 5, pp. 742–758, Oct. 2014. 16 [6] F. Rusek, D. Persson, B. K. Lau, E. Larsson, T. Marzetta, O. Edfors, and F. Tufvesson, “Scaling up MIMO: Opportunities and challenges with very large arrays,” IEEE Signal Process. Mag., vol. 30, no. 1, pp. 40–60, Jan. 2013. [7] J. Hoydis, S. ten Brink, and M. Debbah, “Massive MIMO in the UL/DL of cellular networks: How many antennas do we need?” IEEE J. Sel. Areas Commun., vol. 31, no. 2, pp. 160–171, Feb. 2013. [8] H. Yang and T. Marzetta, “Performance of conjugate and zero-forcing beamforming in large-scale antenna systems,” IEEE J. Sel. Areas Commun., vol. 31, no. 2, pp. 172–179, Feb. 2013. [9] H. Q. Ngo, E. Larsson, and T. Marzetta, “Energy and spectral efficiency of very large multiuser MIMO systems,” IEEE Trans. Commun., vol. 61, no. 4, pp. 1436–1449, Apr. 2013. [10] E. Bjornson, J. Hoydis, M. Kountouris, and M. Debbah, “Massive MIMO systems with non-ideal hardware: Energy efficiency, estimation, and capacity limits,” IEEE Trans. Inf. Theory, vol. 60, no. 11, pp. 7112– 7139, Nov. 2014. [11] E. Björnson, E. G. Larsson, and T. L. Marzetta, “Massive MIMO: ten myths and one critical question,” IEEE Commun. Mag., vol. 54, no. 2, pp. 114–123, Feb. 2016. [12] J. Jose, A. Ashikhmin, T. Marzetta, and S. Vishwanath, “Pilot contamination and precoding in multi-cell TDD systems,” IEEE Trans. Wireless Commun., vol. 10, no. 8, pp. 2640–2651, Aug. 2011. [13] H. Q. Ngo and E. Larsson, “EVD-based channel estimation in multicell multiuser MIMO systems with very large antenna arrays,” in Proc. IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), Kyoto, Mar. 2012, pp. 3249–3252. [14] R. Muller, L. Cottatellucci, and M. Vehkapera, “Blind pilot decontamination,” IEEE J. Sel. Topics Signal Process., vol. 8, no. 5, pp. 773–786, Oct. 2014. [15] J. Vinogradova, E. Björnson, and E. G. Larsson, “On the separability of signal and interference-plus-noise subspaces in blind pilot decontamination,” in Proc. IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), Mar. 2016, pp. 3421–3425. [16] H. Yin, D. Gesbert, M. Filippou, and Y. Liu, “A coordinated approach to channel estimation in large-scale multiple-antenna systems,” IEEE J. Sel. Areas Commun., vol. 31, no. 2, pp. 264–273, Feb. 2013. [17] K. Upadhya and S. A. Vorobyov, “An array processing approach to pilot decontamination for massive MIMO,” in Proc. IEEE 6th Int. Workshop on Computational Advances in Multi-Sensor Adaptive Processing (CAMSAP), Cancun, Dec. 2015, pp. 453–456. [18] E. Björnson, E. G. Larsson, and M. Debbah, “Massive MIMO for maximal spectral efficiency: How many users and pilots should be allocated?” IEEE Trans. Wireless Commun., vol. 15, no. 2, pp. 1293– 1308, Feb. 2016. [19] K. Takeuchi, R. R. Müller, M. Vehkaperä, and T. Tanaka, “On an achievable rate of large rayleigh block-fading MIMO channels with no CSI,” IEEE Trans. Inf. Theory, vol. 59, no. 10, pp. 6517–6541, Oct. 2013. [20] S. He, J. Tugnait, and X. Meng, “On superimposed training for MIMO channel estimation and symbol detection,” IEEE Trans. Signal Process., vol. 55, no. 6, pp. 3007–3021, Jun. 2007. [21] M. Coldrey and P. Bohlin, “Training-based MIMO systems – part I: Performance comparison,” IEEE Trans. Signal Process., vol. 55, no. 11, pp. 5464–5476, Nov. 2007. [22] H. Zhu, B. Farhang-Boroujeny, and C. Schlegel, “Pilot embedding for joint channel estimation and data detection in MIMO communication systems,” IEEE Commun. Lett., vol. 7, no. 1, pp. 30–32, Jan. 2003. [23] T. Cui and C. Tellambura, “Pilot symbols for channel estimation in OFDM systems,” in Proc. IEEE Global Telecommunications Conf. (GLOBECOM), St. Louis, vol. 4, Dec. 2005, pp. 5 pp.–2233. [24] M. Ghogho, D. McLernon, E. Alameda-Hernandez, and A. Swami, “Channel estimation and symbol detection for block transmission using data-dependent superimposed training,” IEEE Signal Process. Lett., vol. 12, no. 3, pp. 226–229, Mar. 2005. [25] K. Upadhya, S. A. Vorobyov, and M. Vehkapera, “Superimposed pilots: An alternative pilot structure to mitigate pilot contamination in massive MIMO,” in Proc. IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), Shanghai, Mar. 2016, pp. 3366–3370. [26] H. Zhang, S. Gao, D. Li, H. Chen, and L. Yang, “On superimposed pilot for channel estimation in multi-cell multiuser MIMO uplink: Large system analysis,” IEEE Trans. Veh. Technol., vol. 65, no. 3, pp. 1492– 1505, Mar. 2016. [27] C. Cox, An introduction to LTE: LTE, LTE-advanced, SAE and 4G mobile communications, 2nd ed. Chichester, UK: John Wiley & Sons, 2012. [28] K. Upadhya, S. A. Vorobyov, and M. Vehkapera, “Downlink performance of superimposed pilots in massive MIMO systems in the presence of pilot contamination,” in Proc. IEEE Global Conf. on Signal and Information Processing (GlobalSIP), Washington D.C., Dec. 2016, pp. 665–669. [29] J. Proakis and M. Salehi, Digital Communications. McGraw-Hill, 2008. Karthik Upadhya received the B.E. degree in electronics and communication engineering from Visvesvaraya Technological University, India in 2007 and the M.Tech degree in communication systems from Indian Institute of Technology Madras, India in 2011. He is currently a Ph.D. student at Aalto University, Finland. His research interests include wireless communications and array signal processing. Before joining the Ph.D. program, he worked as a Member of Technical Staff at Saankhya Labs, India from 2011 to 2013 and as a research assistant at the Indian Institute of Science (IISc), India from 2013 to 2014. Sergiy Vorobyov (M’02-SM’05) received the M.Sc. and Ph.D. degrees in systems and control from Kharkiv National University of Radio Electronics, Ukraine, in 1994 and 1997, respectively. He is a Professor with the Department of Signal Processing and Acoustics, Aalto University, Finland. He has been previously with the University of Alberta, Alberta, Canada as an Assistant Professor from 2006 to 2010, Associate Professor from 2010 to 2012, and became Full Professor there in 2012. Since his graduation, he also held various research and faculty positions at Kharkiv National University of Radio Electronics, Ukraine; the Institute of Physical and Chemical Research (RIKEN), Japan; McMaster University, Canada; Duisburg-Essen University and Darmstadt University of Technology, Germany; and the Joint Research Institute between Heriot-Watt University and Edinburgh University, U.K. His research interests include optimization and liner algebra methods in signal processing and communications; statistical and array signal processing; sparse signal processing; estimation and detection theory; sampling theory; and multi-antenna, very large, cooperative, and cognitive systems. Dr. Vorobyov is a recipient of the 2004 IEEE Signal Processing Society Best Paper Award, the 2007 Alberta Ingenuity New Faculty Award, the 2011 Carl Zeiss Award (Germany), the 2012 NSERC Discovery Accelerator Award, and other awards. He is serving as Area Editor for IEEE Signal Processing Letters since 2016. He served as an Associate Editor for the IEEE Transactions on Signal Processing from 2006 to 2010 and for the IEEE Transactions on Signal Processing Letters from 2007 to 2009. He was a member of the Sensor Array and Multi-Channel Signal Processing and Signal Processing for Communications and Networking Technical Committees of the IEEE Signal Processing Society from 2007 to 2012 and from 2010 to 2016, respectively. He has served as the Track Chair for Asilomar 2011, Pacific Grove, CA, the Technical Co-Chair for IEEE CAMSAP 2011, Puerto Rico, and the Tutorial Chair for ISWCS 2013, Ilmenau, Germany. Mikko Vehkapera (M’10) received the Ph.D. degree from Norwegian University of Science and Technology (NTNU), Trondheim, Norway, in 2010. Between 2010–2013 he was a post-doctoral researcher at School of Electrical Engineering, and the ACCESS Linnaeus Center, KTH Royal Institute of Technology, Sweden, and 2013–2015 an Academy of Finland Postdoctoral Researcher at Aalto University School of Electrical Engineering, Finland. He is now an assistant professor (lecturer) at University of Sheffield, Department of Electronic and Electrical Engineering, United Kingdom. He held visiting appointments at Massachusetts Institute of Technology (MIT), US, Kyoto University and Tokyo Institute of Technology, Japan, and University of Erlangen-Nuremberg, Germany. His research interests are in the field of wireless communications, information theory and signal processing. Dr. Vehkapera was a co-recipient for the Best Student Paper Award at IEEE International Conference on Networks (ICON2011) and IEEE Sweden Joint VT-COM-IT Chapter Best Student Conference Paper Award 2015.
7cs.IT
Communications in Information and Systems Volume 0, Number 0, 1–9, 0000 arXiv:1803.09871v1 [cs.IT] 27 Mar 2018 Rate-distortion functions of non-stationary Markoff chains and their block-independent approximations Mukul Agarwal It is proved that the limit of the normalized rate-distortion functions of block independent approximations of an irreducible, aperiodic Markoff chain is independent of the initial distribution of the Markoff chain and thus, is also equal to the rate-distortion function of the Markoff chain. AMS 2000 subject classifications: Primary 00K00 *, 00K01; secondary 00K02 *. Keywords and phrases: * . 1. Introduction Consider a random source which evolves on a finite set. It follows from existing literature, see for example [1] and [2] (Pages 491-500, in particular, see Definition (9.8.3) and Theorem 9.8.3 for achievability), that the limit of the normalized rate-distortion functions of block-independent approximations of a a stationary, ergodic source is equal to the rate-distortion function of the source. Specializing this theorem to irreducible, aperiodic Markoff chains, it follows that the limit of rate-distortion functions of block-independent approximations of an irreducible, aperiodic Markoff chain which starts in the stationary distribution is equal to the rate-distortion function of this Markoff chain. It is known that the rate-distortion function of an irreducible, aperiodic Markoff chain is independent of its initial distribution (follows from [3]). In this paper, it will be proved that the limit of the normalized ratedistortion functions of block-independent approximations of an irreducible, aperiodic Markoff chain is independent of its initial distribution. It follows, then, that the rate-distortion function of an irreducible, aperiodic Markoff chain and the limit of the normalized rate-distortion functions of its block independent approximations are equal and these functions are independent of the initial distribution of the Markoff chain. Literature on rate-distortion theory is vast. The seminal works are [1] and [4]. A work for rate-distortion theory for random processes is [5]. Much of the 1 2 classical point-to-point literature on rate distortion theory gets subsumed under the books [2] and [3]. Another reference is [6]. The reader is refered to these three books and references therein for the literature on rate-distortion theory. In particular, the reader is referred to [3] because non-stationary sources are dealt with in great detail in this book, and the concern here is with a non-stationary process, albeit, a non-stationary Markoff chain. For understanding Markoff chains, the reader is referred to [7], [8], and [9]. 2. Notation and definitions X and Y denote the source input and source reproduction spaces respectively. Both are assumed to be finite sets. Asume that X = Y. Assume that the cardinality of X is greater than or equal to 2. d : X × Y → [0, ∞) is the single-letter distortion measure. Assume that d(x, x) = 0 ∀x ∈ X and that d(x, y) > 0 if x 6= y. Denote (1) Dmax , max d(x, y), Dmin , x∈X,y∈Y min {x∈X,y∈Y|d(x,y)>0} d(x, y) In what follows, the distortion levels will be assumed to be strictly greater than 0. For xn ∈ Xn , y n ∈ Yn , the n-letter rate-distortion measure is defined additively: (2) dn (xn , y n ) , n X d(xn (i), y n (i)) i=1 where xn (i) denotes the ith component of xn and likewise for y n . Let X1 , X2 , . . ., be a Markoff chain with transition probability matrix P , where each Xi is a random-variable on X. For x, x′ ∈ X, pxx′ denotes the probability that the Markoff chain is in state x′ at time t + 1 given that it is in state x at time t. pxx′ is independent of t. Assume that the Markoff chain is irreducible, aperiodic. This implies that it has a stationary distribution, henceforth denoted by π, which will be reserved exclusively for the stationary distribution. In order to specify the Markoff chain completely, we need to specify its initial distribution. If X1 ∼ π ′ denote the Markoff chain (X1 , X2 , . . .) by X[π′ ,P ] . Recall that P is the transition probability matrix n of the Markoff chain. X[π′ ,P ] will be called the Markoff X[π′ ,P ] chain. X[π ′ ,P ] will denote (X1 , X2 , . . . , Xn ). 3 The above mentioned assumptions that X = Y, d(x, x) = 0 and d(x, y) > 0 is x 6= y, that the distortion levels are strictly greater than zero, and that, the Markoff chain is irreducible, aperiodic, will be made throughtout this paper and will not be re-stated. A rate R source-code is a sequence: n n ⌊nR⌋ } and f n : {1, 2, . . . , 2⌊nR⌋ } → < en , f n >∞ 1 , where e : X → {1, 2, . . . , 2 Yn . We say that rate R is achievable for source-coding the Markoff X[π′ ,P ] source within distortion-level D under the expected distortion criterion if there exists a rate R source code < en , f n >∞ 1 such that (3) lim sup E n→∞   1 n n n n n d (Xπ′ , f (e (X[π′ ,P ] ))) ≤ D n E (D). The infimum of all achievable rates is the rate-distortion function RX [π ′ ,P ] T The block-independent approximation (henceforth shortened to BIA) X[π ′ ,P ] source is a sequence of random vectors (S1 , S2 , . . . , Sn , . . .), where Si are T independent, and ∀i, Si ∼ X[π ′ ,P ] . To simplify notation, we will sometimes n denote (S1 , S2 , . . .) by S. S will denote (S1 , S2 , . . . , Sn ). Note that BIA T X[π ′ ,P ] source is an i.i.d. vector source and will also be called the vector T T i.i.d. X[π ′ ,P ] source. Since the BIA X[π ′ ,P ] source is an i.i.d vector source, the rate-distortion function for it is defined in exactly the same way as for an i.i.d. source. The details are as follows: The source input space for the BIA T T and the source reproduction space is YT . Denote these X[π ′ ,P ] source is X by S and T respectively. A generic point in S is a T -length sequence s. The ith component of s is denoted by s(i). A generic point in T is a T -length sequence t. The ith component of t is denoted by t(i). The single letter distortion P measure is denoted by d′ and is defined as d′ (s, t) , Tj=1 d(s(j), t(j)). For sn ∈ Sn , tn ∈ Tn , the n-letter distortion measure d′n is defined additively: P d′n (sn , tn ) , ni=1 d′ (sn (i), tn (i)). Note that s can be thought of as either a scalar in S or a T dimensional vector in XT . With this identification, d′ = dT and d′n can be thought of as dnT . A rate R source code is a sequence n n ⌊nR⌋ } and f n : {1, 2, . . . , 2⌊nR⌋ } → < en , f n >∞ 1 , where e : S → {1, 2, . . . , 2 T Tn . We say that rate R is achievable for source-coding the BIA X[π ′ ,P ] source within distortion-level D under the expected distortion criterion if there exist 4 a sequence of rate R source codes < en , f n >∞ 1 such that (4)   1 ′n n n n n lim sup E d (S , f (e (S ))) ≤ D n n→∞ The infimum of all achievable rates corresponding to a given distortion level D is the operational rate-distortion function at that distortion level, henceE (D). The normalized rate-distortion function at forth denoted by RX T ′ [π ,P ] block-length T and distortion level D is defined as (5) 1 E R T (T D) T X[π′ ,P ] and the limit is (6) 1 E R T (T D) T →∞ T X[π′ ,P ] lim E (D) and (6), and The theorems in this paper prove the equality of RX [π ′ ,P ] ′ that these functions do not depend on π . The statements of these theorems are stated in Section 3. Before that, we carry out a discussion on the ratedistortion function of a non-stationary Markoff chain. 2.1. Discussion To be entirely correct, the rate-distortion function of a Markoff source should in be defined as follows: Let n be the block-length. Denote Ui , X(i−1)n+1 . n n ∞ Each Ui is thus, a random vector of length n. Let < e , f >1 be a source to code the source X[P,π′ ] . When the block length is n, we would like to use the source-code successively over all intervals of time of block-length n. Thus, it is more logical to define the distortion as:   1 n n n lim sup sup E (7) d (Ui , f (e (Ui ))) n n→∞ i∈N and correspondingly define the rate-distortion function. This does not end up making a difference, and hence, we stick to the originally given definition for distortion. Note that if π ′ = π, the stationary distribution, the sup in the above definition can be removed since the distribution of X(i−1)n+1 is independent of i. 5 3. The theorems E E (D) where π is the stationary distribution (D) = RX Theorem 1. RX [π,P ] [π ′ ,P ] ′ and π is an arbitrary probability distribution on X Proof. Follows from [3] or see Appendix A for an independent proof tailored for Markoff chains. Theorem 2. For D > 0, (8) 1 E R T (T D) exists, and is independent of π ′ T →∞ T X[π′ ,P ] lim This theorem will be proved in Section 5. Theorem 3. (9) E E RX (D) = RX (D) = lim [π,P ] [π ′ ,P ] T →∞ 1 E 1 E R T (T D) = lim RX (T D) T [π ′ ,P ] T →∞ T T X[π,P ] where π is the stationary distribution and π ′ is an arbitrary distribution on X. Proof. Follows from Theorems 1, 2 and [2], Pages 490-500. In order to prove Theorem 2, we need more notation and this is the subject of the next section. The theorem is proved in the section following the next. 4. Further notation T The information-theoretic rate-distortion function of the vector i.i.d. X[π ′ ,P ] source is denoted and defined as I RX T ′ (10) [π ,P ] (D) , inf I(X T ; Y T ) W T where X T ∼ X[π ′ ,P ] and W is the set of W : S → P(T) defined as (11)   W, W  X s∈S,y∈T T (s)W (t|s)d′ (s, t) ≤ D pX[π ′ ,P ]    6 T T denotes the distribution corresponding to X[π where pX[π ′ ,P ] . Note that ′ ,P ] this is the usual definition of the information-theoretic rate-distortion function for an i.i.d. source; just that the source under consideration is vector i.i.d. Let s ∈ S. Denote by Jτ the projection transformation. Jτ (s) , (s(τ + 1), s(τ + 2), . . . s(T )). Fix s. Denote A , {t ∈ S | Jτ (t) = Jτ (s)}. Under the T distribution induced by X[π ′ ,P ] , the probability of the set A is (12) π ′(τ ) (s(τ + 1)) TY −1 ps(i)s(i+1) i=τ +1 for some distribution π ′(τ ) on X which satisfies π ′(τ ) (x) → π(x) as τ → ∞ ∀x ∈ X. Note further, that if π ′ = π, π ′(τ ) = π. For x ∈ X, denote π ′(τ ) (x) = π(x) + δ(τ ) (x) where δ(τ ) (x) → 0 as τ → ∞. δ(τ ) (x) may be negative. T T −τ which causes Denote by Jτ (X[π ′ ,P ] ), the probability distribution on X the probability of a sequence r ∈ XT −τ to be (13) π ′(τ ) (r(1)) TY −1 pr(i)r(i+1) i=1 T T Note that Jτ (X[π ′ ,P ] ) is the marginal of X[π ′ ,P ] on the last T − τ dimensions. T An i.i.d. source can be formed from Jτ (X[π ′ ,P ] ) by taking a sequence of indeT pendent random vectors, each distributed as Jτ (X[π ′ ,P ] ). This will be called T the vector i.i.d. Jτ (X[π′ ,P ] ) source. The rate-distortion function for the vecT tor i.i.d. Jτ (X[π ′ ,P ] ) source in defined in the same way as the rate-distortion T function for the vector i.i.d. X[π ′ ,P ] source: For T − τ length sequences, the P −τ single-letter distortion measure is defined as d′′ (p, q) = Ti=1 d(p(i), q(i)) where p ∈ XT −τ , q ∈ YT −τ . The n-letter rate-distortion measure is defined Pn ′′n n n ′′ n n n T −τ n additively: d (p , q ) = i=1 d (p (i), q (i)) where p ∈ (X ) and q n ∈ T −τ n n n (Y ) . A sequence of rate R source codes is a sequence < e , f >∞ 1 , where n e : (XT −τ )n → {1, 2, . . . , 2⌊nR⌋ } and f n : {1, 2, . . . , 2⌊nR⌋ } → (YT −τ )n . The T rate-distortion functions for i.i.d. Jτ (X[π ′ ,P ] ) source when the distortion meaT sure is d” is defined analogously as for the i.i.d. X[π ′ ,P ] vector source; the details are omitted. Denote the operational rate-distortion function for the T E vector i.i.d. Jτ (X[π ′′ ,P ] ) source by RJ (X T ) (·) and denote the informationτ ′ [π ,P ] theoretic rate-distortion function for the same source by RJI τ (X T ′ [π ,P ] ) (·). 7 For the same reason as that stated before regarding d′ , d′′ = dT −τ and d′′n can be thought of as dn(T −τ ) . 5. Proof of the Theorem 2 Before we prove the theorem, note the following: Lemma 1. Let f : [0, ∞) → [0, ∞) be a convex ∪ non-increasing function. Let f (0) = K. Let 0 < a < a′ . Then, f (a) − f (a′ ) ≤ (14) K ′ (a − a) a Proof. f (a) − f (a′ ) f (0) − f (a) K ′ (a − a) ⇐= ≤ ′ a a −a a  a f (a′ ) − f (a) f (a) − f (0) a ⇐= ≥ ⇐= 1 − ′ f (0) + ′ f (a′ ) ≥ f (a) a′ − a a−0 a a ⇐= Definition of convexity, see for example [10] (15) f (a) − f (a′ ) ≤ This lemma is a direct result of the the definition of convexity and this observation will be used crucially in the proof of the theorem , which follows below. Proof of Theorem 2: E Proof. By the rate-distortion theorem, RX T ′ [π ,P ] I (T D) = RX T ′ (T D). Com- [π ,P ] paring definitions with [2], Page 491, (16) 1 I R T (T D) (notation in this document) = RT (D) (notation in [2]) T X[π,P ] By Theorem 9.8.1 in [2], it follows that (17) 1 E R T (T D) exists T →∞ T X[π,P ] lim (17) will be used crucially towards the end of the proof. 8 The proof follows three steps: 1. Bound the difference between RJEτ (X T ′ [π ,P ] 2. Relate RJEτ (X T ′ ) (·) [π ,P ] and ) (·) and RJEτ (X T [π,P ] ) (·). E (·). RX T [π ′ ,P ] 3. Use these relations to prove the desired result by computing various bounds. The first step in the proof is to come up with a bound for the difference between RJEτ (X T ′ ) (·) and RJEτ (X T ) (·). To this end, we first do the same [π,P ] [π ,P ] for RJI τ (X T ′ [π ,P ] I ) (·) and RJτ (X T [π,P ] ) (·). To this end, denote the distribution cor- T T −τ by Q′ , and the distribution corresponding responding to Jτ (X[π ′ ,P ] ) on X T 1 ′ to Jτ (X[π,P ] ) by Q. The l distance between Q and Q, (18) X l1 (Q′ , Q) , Q′ (xT −τ ) − Q(xT −τ ) xt−τ ∈XT −τ X = |π ′ (τ ) = |δ (τ ) T −τ Y−1 pxt−τ (i)xt−τ (i+1) i=1 xt−τ ∈Xt−τ X (xt−τ (1) − π (τ ) (xt−τ (1)| (x)| x∈X (τ ) ,δ In the above calculation, we have used the fact that if π ′ = π, π ′(τ ) = π. Condition (Z) stated in [11] holds based on the assumptions we have made, Lemma 2 in [11] can be applied, and it follows that for τ sufficiently large (reasoning stated below after a few lines) and any T > τ , (19) 1 1 1 RJI τ (X T ′ ) ((T − τ )D) − RJI τ (X T ) ((T − τ )D) ≤ Kδ(τ ) log (τ ) [π,P ] [π ,P ] T −τ T −τ δ where (20) K=  1 7d∗ log XT −τ YT −τ T − τ d˜ 9 In (19) , δ(τ ) log δ(τ1 ) is defined as zero if δ(τ ) is zero. |XT −τ | and |YT −τ | denote the cardinalities of the input and output spaces on which the random source T ∗ is defined as Jτ (X[π ′ ,P ] ) is defined. d (21) d∗ , max xT −τ ∈XT −τ ,yT −τ ∈YT −τ d′′ (xT −τ , y T −τ = (T − τ )Dmax and d˜ is defined as (22) d˜ , min {xT −τ ∈XT −τ ,y T −τ ∈YT −τ | d′′ (xT −τ ,y T −τ )>0} d′′ (xT −τ , y T −τ ) = (T − τ )Dmin It follows that K=7 (23) Dmax (log(|X|) + log(|Y|)) Dmin Note that K is a constant independent of T, τ, D. Also, we said above that (19) holds for τ sufficiently large: this is because by Lemma 2 in [11], we need τ large enough so that δ(τ ) ≤ 4 (24) Dmin Dmax which is possible considering the fact that δ(τ ) → 0 as τ → ∞, and it is for this reason that we require τ to be sufficiently large. Note that the bound in (24) is independent of T, τ . It then follows from (19) and the equality of information-theoretic and operational rate-distortion functions for i.i.d. sources, that for τ sufficiently large and any T > τ , (25) 1 1 1 RE T ((T − τ )D) − RE T ((T − τ )D) ≤ Kδ(τ ) log (τ ) T − τ Jτ (X[π′ ,P ] ) T − τ Jτ (X[π,P ] ) δ The bound (25) will be used crucially later, towards the end of the proof. E (·). We will argue the followNext step is to relate RJEτ (X T ′ ) (·) and RX T [π ′ ,P ] [π ,P ] ing: (26) E RX T ′ [π ,P ] ((T − τ )D + τ Dmax ) ≤ RJEτ (X T ′ [π ,P ] ) ((T − τ )D) 10 and RJEτ (X T ′ (27) [π ,P ] ) (T D) E (T D) ≤ RX T ′ [π ,P ] Very rough idea to prove (26) is the following: Given a sequence of rate T R source codes for the vector i.i.d. Jτ (X[π ′ ,P ] ) source, we can use the same T sequence of rate R source-codes for the vector i.i.d. X[π ′ ,P ] source by not codT ing the time-slots which were not projected onto when defining Jτ (X[π ′ ,P ] ). These banished slots will incur a maximum distortion of τ Dmax per symbol T of X[π ′ ,P ] . (26) follows. See Appendix B for precise argument. Very rough idea to prove (27) is the following: Consider a two-dimensional random vector (A, B) on some space and the i.i.d. source got by taking i.i.d. copies of (A, B). Consider a distortion measure which is additive over the two dimensions. Consider, also, the i.i.d. source formed by taking identical copies of A. Then, for a given distortion level, the rate-distortion function of the vector i.i.d. (A, B) source is greater than or equal to the rate-distortion function of the i.i.d. A source. This is stated more rigorously in Appendix B. T T Note that Jτ (X[π,P ] ) is a projection of X[π,P ] onto certain dimensions and the distortion measure over these dimensions is additive. (27) follows from this. Next, we get to Step 3. Assuming T D > τ Dmax , by replacing D in (26) by D= (28) T D − τ Dmax T −τ and by (27), it follows that RJEτ (X T ′ (29) [π ,P ] ) (T D) E (T D) ≤ RJEτ (X T ′ ≤ RX T ′ [π ,P ] [π ,P ] ) (T D − τ Dmax ) It follows from (29) by rearranging, that (30) E 0 ≤ RX T ′ [π ,P ] (T D) − RJEτ (X T ′ [π ,P ] By noting that RJEτ (X T ′ [π ,P ] ) (T D) ) (D) ≤ RJEτ (X T ′ [π ,P ] ) (T D − τ Dmax ) − RJEτ (X T ′ [π ,P ] is a non-increasing, convex ∪ function of D which is upper bounded by (T − τ ) log |X| at D = 0, it follows, assuming that T D > τ Dmax , by Lemma 1 that (31) RJEτ (X T ′ [π ,P ] ) (T D − τ Dmax ) − RJEτ (X T ′ [π ,P ] ) (T D) ≤ τ Dmax log |X| ) (T D) 11 From (31) and (30), it follows that lim (32) T →∞   1 E 1 E R T (T D) − RJτ (X T ′ ) (T D) = 0 [π ,P ] T X[π′ ,P ] T E Note further, by noting that RX T ′ (T D) ≤ T log |X|, that [π ,P ] (33) lim T →∞ 1 τ 1 E (T D) ≤ lim RE T (T D) − RX T log |X| = 0 T [π ′ ,P ] T →∞ T (T − τ ) T − τ X[π′ ,P ] T Also, by noting that RJEτ (X T ′ [π ,P ] ) (D) is a non-increasing, convex ∪ function of D which is upper bounded by (T − τ )|X|, it follows by use of Lemma 1 that (34) lim T →∞ 1 1 ((T − τ )D) ≤ RJEτ (X T ′ ) (T D) − RE T [π ,P ] T −τ T − τ Jτ (X[π′ ,P ] ) log |X| lim τ D → 0 as T → ∞ T →∞ (T − τ )D It follows, then, from (32), (33), (34) and by noting that (35) lim an + lim bn + lim cn = lim (an + bn + cn ) n→∞ n→∞ n→∞ n→∞ if the three limits on the left hand side exist (follows from definitions, see for example [10]), that (36) lim T →∞   1 1 E E ((T − τ )D) = 0 R T (T D) − R T T X[π′ ,P ] T − τ Jτ (X[π′ ,P ] ) From (25) and (36), it follows by the use of triangle inequality, that for τ sufficiently large and T > τ , (37) 1 1 1 E RX T ′ (T D) − RJEτ (X T ) ((T − τ )D) ≤ Kδ(τ ) log (τ ) + κτ,T [π,P ] [π ,P ] T T −τ δ for some κτ,T → 0 as T → ∞. 12 The above equation holds for π ′ = π too, that is, for τ sufficiently large and T > τ, (38) 1 E 1 1 RX T (T D) − RJEτ (X T ) ((T − τ )D) ≤ Kδ(τ ) log (τ ) + ητ,T [π,P ] [π,P ] T T −τ δ for some ητ,T → 0 as T → ∞. From (37) and (38), by use of the triangle inequality, it follows, that for τ sufficiently large and T > τ , (39) 1 1 E 1 E (T D) ≤ 2Kδ(τ ) log (τ ) + ητ,T + κτ,T RX T ′ (T D) − RX T [π,P ] [π ,P ] T T δ From (39) and (17), and by noting that δ(τ ) log δ(τ1 ) → 0 as τ → ∞, ητ,T → 0 as T → ∞, and κτ,T → 0 as T → ∞, it follows that (40) lim T →∞ 1 E R T (T D) exists and is independent of π ′ T X[π′ ,P ] This finishes the proof The assumptions X = Y, d(x, x) = 0, d(x, y) > 0 if x 6= y which have been made are not necessary, and can be replaced by weaker assumptions. Nothing is lost in terms of idea of the proof by making these assumptions, and making these assumptions prevents one from thinking of pathological cases; for these reasons they have been made. 6. ψ-mixing sources or a variant? A set of sources to which this result may be generalizable with the proof technique used is ψ-mixing sources or close variants, appropriately defined. See [12], [13] and [14] for mixing of sources and [13], [14], in particular, for results on ψ-mixing sources. The main property (among others) that made ψ-mixing sources amenable to the result in [14] is the decomposition in Lemma 1 in [14], wherein, a stationary ψ-mixing source is written as a convex combination of an i.i.d. distribution and another general distribution 13 where the i.i.d. distribution dominates as memory is lost with time. Precisely, the equation is Equation (19) in [14]: (41) t+τ +T t ′ Pr(Xt+τ +1 ∈ B|X1 ∈ A) = (1 − λτ )PT (B) + λτ Pt,τ,T,A (B) where λτ → 0 as τ → ∞. This lemma, though, required stationarity. If a variant of (41) would hold for non-stationary sources, then, there is a possibility that the result in this paper be generalized to such sources. Irreducible, aperiodic Markoff chains statisfy this property, with PT (B) taken as the stationary distribution, and P ′ is some distribution depending on the initial distribution of the Markoff chain. An important bound in proving Theorem 2 in this paper is the l1 distance between Q and Q′ , see (18). This result will hold for sources which satisfy (41) or a variant. Similarly, proving (26) and (27) in the proof of Theorem 2 or similar equations may also be possible. The rest of the proof of Theorem 2 is bounding various differences of ‘close by’ rate-distortion functions and this may be possible too. This is just an idea at this point and needs to be studied carefully to see if any of this is at all possible. 7. Recapitulation and research directions In this paper, it was proved that the limit of the normalized rate-distortion functions of block independent approximations of an irreducible, aperiodic Markoff chain is independent of the initial distribution and is equal to the rate-distortion function of the Markoff chain. It would be worthwhile trying to generalize this theorem to ergodic sources to the extent possible, not necessarily Markoff sources, in particular, to ψmixing sources; this would not only make the result general, but also shed light on the ‘internal workings’ of rate-distortion theory. Further, it would be worthwhile trying to prove this result using existing literature, in particular, see if it follows directly from some result, for example, in [3]; this would help with generalization and insight into the ‘internal workings’ of rate-distortion theory, too. 8. Acknowledgements The author is infinitely grateful to Prof. Robert Gray for ten’s of hours of his time spent in insightful discussions with the author. 14 References [1] C. E. Shannon, “Coding theorems for a discrete source with a fidelity criterion,” Institute of Radio Engineers, National Convention Record, vol. 7, part 4, pp. 142–163, March 1959. [2] R. G. Gallager, Information theory and reliable communication. Wiley, January 1968. [3] R. M. Gray, Entropy and information theory. Springer-Verlag, February 2011. [4] C. E. Shannon, “A mathematical theory of communication,” Bell System Technical Journal, vol. 27, pp. 379–423 (Part 1) and pp. 623–656 (Part 2), July (Part 1) and October (Part 2) 1948. [5] A. N. Kolmogorov, “Theory of transmission of information,” Acad. R. P. Romine An. Romino-Soviet, vol. 28, no. 1, pp. 5–33, 1959, translated in American Mathematical Society Translations, Series 2, Volume 33, 1963. [6] T. Berger, Rate-distortion theory: mathematical basis for data compression, ser. Prentice-Hall series in information and system sciences. Prentice Hall, October 1971. [7] B. V. Gnedenko, The theory of probability. pany, New York, N. Y., 1962. Chelsea Publishing Com- [8] A. N. Shiryaev, Probability, 2nd ed. Springer, 1984. [9] W. Feller, An introduction to probability theory and its applications, Volume 1, 3rd ed. Wiley, 1968. [10] V. A. Zorich, Mathematical Analysis, I and II. Springer, March 2016. [11] H. Palaiyanur and A. Sahai, “On the uniform continuity of the ratedistortion function,” in 2008 IEEE International Symposium on Information Theory. [12] Y. V. Prohorov and Y. A. Rozanov, Probability theory: basic concepts, limit theorems, random processes, 1st ed., ser. Die Grundlehren der Mathematischen Wissenschaften in Einzeldarstellungen mit besonderer Berucksichtigung der Anwendungsgebiete, Band 157. Springer-Verlag, 1969. [13] R. C. Bradley, “Basic properties of strong mixing conditions. a survey and some open questions,” Probability surveys, vol. 2, pp. 107–144, 2005. 15 [14] M. Agarwal, S. Mitter, and A. Sahai, “Layered black-box, behavioral interconnection perspective and applications to problems in communications, Part II: sources satisfying ψ-mixing criterion,” Communications in Information and Systems, vol. 17, no. 4, 2017. Appendix A. Proof of Theorem 1 Proof. Consider two Markoff chains X[π′ ,P ] = (X1′ , X2′ , . . .) and X[π′′ ,P ] = (X1′′ , X2′′ , . . .), where π ′ and π ′′ probability distributions on X. Denote (X1′ , X2′ , . . . , Xn′ ) by X ′ n and (X1′′ , X2′′ , . . . , Xn′′ ) by X ′′ n . Let τ be an integer. Think of n as large and τ to be much smaller than n. Denote the distribution of Xτ′ by µ′ and the of Xτ′′ by µ′′ . Denote, P distribution P ′′ ′ ′′ ′ ǫ = x∈X |µ (x) − π(x)| , where π is the x∈X |µ (x) − π(x)| and ǫ = stationary distribution of the Markoff chain (note that both Markoff chains have the same transition probability matrix P ). For every ǫ > 0, ∃τǫ∗ such that ǫ′ < 2ǫ and ǫ′′ < 2ǫ ∀τ ≥ τǫ∗ . Let < en , f n >∞ 1 be a source-code. Let ∗ the block-length be n. Think of n large and τǫ << n. Use (en , f n ) to code K ′ n , (Xτ′ ǫ∗ +1 , Xτ′ ǫ∗ +2 , . . . , Xτ′ ǫ∗ +n ) and K ′′ n , (Xτ′′ǫ∗ +1 , Xτ′′ǫ∗ +2 , . . . , Xτ′′ǫ∗ +n ). Note that (42)    1 n ′n n n ′n 1 n ′′ n n n ′ n d (K , f (e (K ))) − E d (K , f (e (K ))) ≤ ǫDmax E n n  For δ > 0 (think of δ small), D > 0, let < e′ n , f ′ n >∞ 1 be a source-code E with rate ≤ R[P,π′ ] (D) + δ to code the X[P,π′ ] source with distortion D. Construct a source code < e′′ n , f ′′ n >∞ 1 to code the X[P,π ′′ ] source as follows. When the block-length is n + τǫ∗ , code X1′′ , X2′′ , . . . , Xτ′′ǫ∗ arbitrarily. and code (Xτ′′ǫ∗ +1 , Xτ′′ǫ∗ +2 , . . . , Xτ′′ǫ∗ +n ) using (e′ n , f ′ n ). It follows, by calculation of the distortion achieved for (X1′′ , X2′′ , . . . , Xτ′′∗ +n ) by use of this code, in the process, using (42)   τǫ∗ E E RX[π′′ ,P ] D + ∗ (43) (D) + δ Dmax + ǫDmax ≤ RX [π ′ ,P ] τǫ + n ǫ can be made arbitrarily small, τǫ∗ will depend on ǫ and n can be made arbiE (D + α) ≤ trarily large. It follows that for every α > 0, every δ > 0, RX [π ′′ ,P ] E E (D) in D, it follows that ∀δ > 0 (D) + δ. By the continuity of RX RX [π ′ ,P ] [π ′ ,P ] 16 E E (D)+ δ. It follows, then, since α > 0 can be arbitrarily (D) ≤ RX RX [π ′ ,P ] [π ′′ ,P ] E E (D). By interchanging π ′ and π ′′ , it follows (D) ≤ RX small, that RX [π ′ ,P ] [π ′′ ,P ] E E E E (D). (D) = RX (D) Thus, RX (D) ≤ RX that, RX [π ′′ ,P ] [π ′ ,P ] [π ′′ ,P ] [π ′ ,P ] Appendix B. Proofs of (26) and (27) To prove (26): T Proof. Let < en , f n >∞ 1 be the source code for the i.i.d. vector Jτ (X[π,P ] ) source. Note that en : (XT −τ )n → {1, 2, . . . , 2⌊nR⌋ } and f n : {1, 2, . . . , 2⌊nR⌋ } → (YT −τ )n . T Let sn ∈ Sn be a realization of S n , the n-blocklength vector i.i.d. X[π,P ] source which needs to be coded. sn = (sn (1), sn (2), . . . sn (n)) where each sn (i) ∈ S: sn (i) = (sn (i)(1), sn (i)(2), . . . , sn (i)(T )). Recall the projection operator, Jτ (sn (i)) = (sn (i)(τ + 1), . . . , sn (i)(T )). Denote Jτn (sn ) = (Jτ (sn (1)), Jτ (sn (2)), . . . , Jτ (sn (n))). Then, Jτn (sn ) is an element of (XT −τ )n . Denote f n (en (Jτn (sn ))) = t′n . Note that t′n = (t′n (1), t′n (2), . . . , t′n (n)) where t′n (i) = (t′n (i)(1), t′n (i)(2), . . . , t′n (i)(T − τ )). Fix a random y ∈ Y. Define the extension transformation, Eτ (t′n (i)) = (y, y, . . . , y, t′n (i)(1), t′n (i)(2), . . . , t′n (i)(T − τ )), where the initial y’s occur τ times. Denote Eτn (t′n ) = (Eτ (t′n (1)), Eτ (t′n (2)), . . . , Eτ (t′n (n))). Note that < en ◦ Jτn , Eτn ◦ f n >∞ 1 is a rate R source code to code the i.i.d. T ′n (sn , E n (f n (en (J n (sn ))))) ≤ d′′n (s′n , t′n ) + vector X[π,P source and that, d τ τ ] nτ Dmax . (26) follows. To prove (27): 17 Proof. Let (A, B) be a random vector on A × B. Let (A1 , B1 ), (A2 , B2 ), . . . be a sequence where (Ai , Bi ) are independent of each other and (Ai , Bi ) ∼ (A, B). This sequence is the vector i.i.d (A, B) source. A × B is the source space. Let the source reproduction space be A′ × B′ . d1 : A × A′ → [0, ∞) is a distortion measure. d2 : B′ × B′ → [0, ∞) is a distortion measure. Assume that A, A′ , B, B′ are finite sets. Define: d0 ((a, b), (a′ , b′ )) , d1 (a, a′ )+d2 (b, b′ ). dn1 and dn2 , dn0 are respectively defined additively from d1 , d2 and d0 . We can then define the rate-distortion functions for the i.i.d. A source and the i.i.d. E (·) and RE (A, B) source, denoted, respectively, by RA (A,B) (·). Then, (44) E E RA (D) ≤ R(A,B) (D) (44) is proved as follows: Given a code to code the i.i.d. (A, B) source, think of Bi s as a source of common randomness, and use the obvious variant of the same code for coding the i.i.d. A source. Since the same code is used, (44) follows. Existence of a random code with a certain distortion implies the existence of a deterministic code with the same or lesser distortion. From this, (44) follows for deterministic codes. Mukul Agarwal Department of Electrical and Computer Engineering Boston University E-mail address: [email protected] Received December 7, 2012
7cs.IT
PROCEEDINGS OF BIOSIGNAL 2010, JULY 14-16, 2010, BERLIN, GERMANY 1 Pituitary Adenoma Segmentation J. Egger, M. H. A. Bauer, D. Kuhnt, B. Freisleben and Ch. Nimsky Abstract—Sellar tumors are approximately 10-15% among all intracranial neoplasms. The most common sellar lesion is the pituitary adenoma. Manual segmentation is a time-consuming process that can be shortened by using adequate algorithms. In this contribution, we present a segmentation method for pituitary adenoma. The method is based on an algorithm we developed recently in previous work where the novel segmentation scheme was successfully used for segmentation of glioblastoma multiforme and provided an average Dice Similarity Coefficient (DSC) of 77%. This scheme is used for automatic adenoma segmentation. In our experimental evaluation, neurosurgeons with strong experiences in the treatment of pituitary adenoma performed manual slice-by-slice segmentation of 10 magnetic resonance imaging (MRI) cases. Afterwards, the segmentations were compared with the segmentation results of the proposed method via the DSC. The average DSC for all data sets was 77.49%±4.52%. Compared with a manual segmentation that took, on the average, 3.91±0.54 minutes, the overall segmentation in our implementation required less than 4 seconds. Index Terms—pituitary adenoma, segmentation, spherical graph, MRI, mincut I. INTRODUCTION Approximately 10-15% of all intracranial neoplasms are sellar tumors. The most common sellar lesion is the pituitary adenoma [1]. The lesions can be classified according to size or hormone-secretion (hormone-active and horme-inactive). Microadenomas are less than 1 cm in diameter, whereas macroadenomas measure more than 1 cm. The rare giantadenomas have more than 4 cm in diametric size. Secreted hormones can be cortisol (cushing's disease), human growthhormone (hGH; acromegaly), follicle-stimulating hormone (FSH), luteinising hormone (LH), thyroid-stimulating hormone (TSH), prolactine or a combination of these. Only for the prolactine-expressing tumors, a pharmacological treatment is the initial treatment of choice in form of dopamine-agonists. Treatment is most commonly followed by a decrease of prolactine-levels and tumor volume. For acromegaly and cushing's disease, surgery remains the first-line treatment, although somatostatin receptor analogues or combined dopamine/somatostatin receptor analogues are a useful secondline therapeutical option for hGH-expressing tumors. Current medical therapies for Cushing's disease primarily focus on adrenal blockade of cortisol production, although pasireotide J.E., M.H.A.B., D.K., Ch.N. are with the Department of Neurosurgery, University of Marburg, Marburg, Germany e-mail: [email protected] J.E., M.H.A.B., B.F. are with the Department of Mathematics and Computer Science, University of Marburg, Marburg, Germany and cabergoline show promise as pituitary-directed medical therapy for Cushing's disease [2]. Thus, not only for the most hormone-active, but also for homone-inactive macroadenomas with mass-effect, surgery is the treatment of choice, most possibly via a transsphenoidal approach [3]. By contrast, for hormone-inactive mircroadenomas (<1cm) there is no need for immediate surgical resection. The follow-up contains endocrine and ophthalmological evaluation as well as magnetic resonance imaging (MRI). In case of continuous tumor volume progress, microsurgical excision becomes the treatment of choice. Thus, the tumor volume should be rigidly registered over the time of follow-up. In this contribution, we present a segmentation method for pituitary adenoma. The method is based on an algorithm we developed recently in a previous work where the novel segmentation scheme was successfully used for segmentation of glioblastoma multiforme and provided an average Dice Similarity Coefficient (DSC) of 77%. For automatic and adequate adenoma segmentation, the original scheme is used, creating a directed 3D-graph within two steps: sending rays through the surface points of a polyhedron and sampling the graph’s nodes along every ray. The center of the polyhedron is user-defined and located inside the adenoma. Then, the minimal cost closed set on the graph is computed via a polynomial time s-t-cut, creating an optimal segmentation of the adenoma’s boundary and volume. For evaluation, neurosurgeons with strong experiences in the treatment of pituitary adenoma performed manual slice-by-slice segmentation of 10 cases. Afterwards, the segmentations were compared with the segmentation results of the proposed method via the Dice Similarity Coefficient (DSC). The average DSC for all data sets was 77.49%±4.52%. Compared with a manual segmentation that took, on the average, 3.91±0.54 minutes, the overall segmentation in our implementation required less than 4 seconds. The paper is organized as follows. Section 3 presents the details of the proposed approach. In Section 4, experimental results are discussed. Section 5 concludes the paper and outlines areas for future work. II. RELATED WORK Based on magnetic resonance imaging, several algorithms have already been proposed for glioma segmentation. An extensive overview of some deterministic and statistical approaches is given by Angelini et al. [4]. The majority of them are region-based approaches; more recent ones are based on deformable models and include edge-information. PROCEEDINGS OF BIOSIGNAL 2010, JULY 14-16, 2010, BERLIN, GERMANY Neubauer et al. [5] and Wolfsberger et al. [6] introduce STEPS, a virtual endoscopy system designed to aid surgeons performing pituitary surgery. STEPS uses a semi-automatic segmentation method that is based on the so-called watershedfrom-markers technique. The watershed-from-markers technique uses user-defined markers in the object of interest and the background. A memory efficient and fast implementation of the watershed-from-markers algorithm – also extended to 3D – has been developed by Felkel et al. [7]. Descoteau et al. [8] have proposed a novel multi-scale sheet enhancement measure and apply it to paranasal sinus bone segmentation. The measure has the essential properties to be incorporated in the computation of anatomical models for the simulation of pituitary surgery. III. METHODS Our overall method starts by setting up a directed 3D graph from a user-defined seed point that is located inside the pituitary adenoma. To set up the graph, the method samples along rays that are sent through the surface points of a polyhedron with the seed point as the center. The sampled points are the nodes n ∈ V of the graph G(V,E) and e ∈ E is the corresponding set of edges. There are edges between the nodes and edges that connect the nodes to a source s and a sink t to allow the computation of an s-t cut (the source and the sink s, t ∈ V are virtual nodes). The idea of setting up the graph with a polyhedron goes back to a catheter simulation algorithm where several polyhedra were used to align the catheter inside the vessel [9]. In the segmentation scheme, this idea is combined with a graph-based method that has been introduced for the semiautomatic segmentation of the aorta [10], [11], [12] and diffusion tensor imaging (DTI) fiber bundle segmentation [13]. However, in this case, setting up the graph was performed by sampling the nodes in several 2D planes and therefore is not useful for the segmentation of spherical or elliptical 3D objects (see Figure 1). 2 In a recent publication [14], the introduced approach for segmenting spherical or elliptical 3D objects was enhanced by an arbitrary number of additional seed points to a semiautomatic method. Thereby, the algorithm is supported with grey value information and geometrical constraints that are used to segment World Health Organization (WHO) grade IV gliomas. The arcs <vi, vj> ∈ E of the graph G connect two nodes vi, vj. There are two types of ∞-weighted arcs: z-arcs Az and r-arcs Ar (Z is the number of sampled points along one ray z=(0,…,Z1) and R is the number of rays sent out to the surface points of a polyhedron r=(0,…,R-1)), where node V(xn,yn,zn) is one neighbor of node V(x,y,z). The arcs Az between two nodes along a ray ensure that all nodes below the polyhedron surface in the graph are included to form a closed set (correspondingly, the interior of the spherical object is separated from the exterior in the data). The arcs Ar between the nodes of different rays constrain the set of possible segmentations and enforce smoothness via the parameter ∆r. The larger this parameter is, the larger the number of possible segmentations is (see Figure 2). Fig. 2. Principle of a cut of edges between two rays for ∆r=1. Left and middle: Same cost for a cut (2·∞). Right: Higher cost for a cut (4·∞). After graph construction, the minimal cost closed set on the graph is computed via a polynomial time s-t cut [15]. A Markov Random Field (MRF) approach where each voxel of the image is a node is definitely too time-consuming for the data we used (512x512xX). A MRF approach in a recent publication needed already several minutes for the cut of one small 2D image [16]. We also thought about using an Active Contour Method (ACM) [17] and [18] approach where the initial contour is a polyhedron with an initial radius definitely smaller than the object (pituitary adenoma). However, ACMs can get stuck in local minima during the iterative segmentation (expansion) process. In contrast, a graph cut approach provides an optimal segmentation for the constructed graph. IV. RESULTS Fig. 1. Upper image: unfolding several 2D slices to segment a cylindrical object. Lower image: unfolding a polyhedron to segment a spherical object. Left: principal of sending rays through the surface of a polyhedron with 32 vertices. Right: Sampling nodes for the graph along the rays (polyhedron with 92 vertices). The presented methods were implemented in C++ within the MeVisLab platform [19]. Using 2432 and 7292 polyhedra surface points, the overall segmentation (sending rays, graph construction and mincut computation) in our implementation took less that 4 seconds on an Intel Core i5-750 CPU, 4x2.66 GHz, 8 GB RAM, Windows XP Professional x64 Version, Version 2003, Service Pack 2. The ray length is a fixed parameter (5 cm), determined via the largest pituitary adenoma of the 10 cases (all pituitary adenoma had a diameter of less that 5 cm). PROCEEDINGS OF BIOSIGNAL 2010, JULY 14-16, 2010, BERLIN, GERMANY 3 Fig. 3. Segmentation results for a pituitary adenoma data set with user-defined seed point (blue). To evaluate the approach, neurological surgeons with several years of experience in resection of brain tumors performed manual slice-by-slice segmentation of 10 pituitary adenomas. Afterwards, the manual segmentations were compared with the one click segmentation results of the proposed method via the Dice Similarity Coefficient (DSC) [20]. The Dice Similarity Coefficient is the relative volume overlap between A and R, where A and R are the binary masks from the automatic (A) and the reference (R) segmentation. V(•) is the volume (in cm3) of voxels inside the binary mask, by means of counting the number of voxels, then multiplying with the voxel size: DSC = 2 ⋅ V ( A ∩ R) V ( A) + V ( R) (1) In Figure 3, several axial slices of a pituitary adenoma are shown. In every slice, the result of the automatic segmentation is drawn (red). Additionally, the user-defined seed point is shown in the middle slice (blue). The average Dice Similarity Coefficient for all data sets was 77.49%±4.52% (see Table I for details). Figure 4 shows an axial slice of a pituitary adenoma (left) and a 3D mask of an automatic segmented pituitary adenoma (right). Figure 5 shows different views of sagittal slices with segmented pituitary adenoma performed with the proposed algorithm. Fig. 4. Axial slice of a pituitary adenoma (left). 3D mask of an automatic segmented pituitary adenoma (right). Fig. 5. Different views of sagittal slices with segmented pituitary adenoma. V. CONCLUSION In this paper, a method for pituitary adenoma segmentation was presented. The method is based on an algorithm we developed recently in a previous work where the novel segmentation scheme was successfully used for segmenting glioblastoma multiforme and provided an average Dice Similarity Coefficient (DSC) of 77%. For automatic and adequate adenoma segmentation, the original scheme was used, creating a directed 3D-graph within two steps: sending rays through the surface points of a polyhedron and sampling the graph’s nodes along every ray. The center of the polyhedron is user-defined and located inside the adenoma. Then, the minimal cost closed set on the graph is computed via a polynomial time s-t-cut, creating an optimal segmentation of the adenoma’s boundary and volume. For evaluation, neurosurgeons with strong experiences in TABLE I SUMMARY OF RESULTS: MIN., MAX., MEAN AND STANDARD DEVIATION FOR 10 PITUITARY ADENOMAS. min max µ ±σ Volume of tumor (cm3) manual algorithm 0.84 1.18 15.57 14.94 6.30 ± 4.07 6.22 ± 4.08 Number of voxels manual algorithm 4492 3461 106151 101902 47462.7 47700.6 DSC (%) manual segmentation time (min) 71.07 84.67 3 5 77.49 ± 4.52 3.91 ± 0.54 PROCEEDINGS OF BIOSIGNAL 2010, JULY 14-16, 2010, BERLIN, GERMANY the treatment of pituitary adenoma performed manual slice-byslice segmentation of 10 cases. Afterwards, the segmentations were compared with the segmentation results of the proposed method via the Dice Similarity Coefficient. The average Dice Similarity Coefficient for all data sets was 77.49%±4.52%. Compared with a manual segmentation that took, on the average, 3.91±0.54 minutes, the overall segmentation in our implementation needed less than 4 seconds. There are several areas of future work. For example, we want to enhance the presented segmentation scheme with statistical information about shape – e.g. Active Shape Models (ASM) [21] – ort texture – e.g. Active Blobs [22] – or shape and texture – e.g. Active Appearance Models [23] and [24] – of the desired object. Furthermore, we want use the approach to segment spherically or elliptically shaped organs like kidneys [25] and pathologies like cerebral aneurysms [26] and [27]. VI. ACKNOWLEDGEMENTS The authors would like to thank Fraunhofer MeVis in Bremen, Germany, for their collaboration and especially Horst K. Hahn for his support. REFERENCES M.- A. Weber, S. Zoubaa, M. Politi, I. Grunwald, and M. Essig, Sellar tumors (in German), Der Radiologe; 47(6):492-500. Springer Berlin / Heidelberg, 2007. [2] B. M. K. Biller, A. Colao, S. Petersenn, V. S. Bonert, and M. Boscaro, Prolactinomas, Cushing's disease and acromegaly: debating the role of medical therapy for secretory pituitary adenomas, BMC Endocrine Disorders; 10(1):10, 2010. [3] M. Buchfelder and S. Schlaffer, Surgical treatment of pituitary tumours, Best Practice & Research Clinical Endocrinology & Metabolism; 23(5):677-92, 2009. [4] E. D. Angelini, O. Clatz, E. Mandonnet, E. Konukoglu, L. Capelle, and H. Duffau, Glioma Dynamics and Computational Models: A Review of Segmentation, Registration, and In Silico Growth Algorithms and their Clinical Applications, Current Medical Imaging Reviews, 3, pp. 262276, 2007. [5] A. Neubauer, S. Wolfsberger, M.-T. Forster, L. Mroz, R. Wegenkittl, and K. Bühler, Advanced virtual endoscopic pituitary surgery, IEEE Transactions on Visualization and Computer Graphics (TVCG), 11(5); pp. 497-507, 2005. [6] S. Wolfsberger, A. Neubauer, K. Bühler, R. Wegenkittl, T. Czech, S. Gentzsch, H.-G. Böcher-Schwarz, and E. Knosp, Advanced Virtual Endoscopy for Endoscopic Transsphenoidal Pituitary Surgery, Neurosurgery 59(5), pp. 1001-1010, 2006. [7] P. Felkel, R. Wegenkittl, and M. Bruckschwaiger, Implementation and Complexity of the Watershed-from-Markers Algorithm Computed as a Minimal Cost Forest, In: Proceedings of Eurographics ’01, pp. 26-35, 2001. [8] M. Descoteaux, M. Audette, K. Chinzei, and K. Siddiqi, Bone enhancement filtering: application to sinus bone segmentation and simulation of pituitary surgery, Computer Aided Surgery, 11(5):247-55, 2006. [9] J. Egger, Z. Mostarkic, S. Großkopf, and B. Freisleben, A Fast Vessel Centerline Extraction Algorithm for Catheter Simulation, In: Proceedings of the 20th IEEE International Symposium on ComputerBased Medical Systems, Maribor, Slovenia, pp. 177-182, IEEE Press, 2007. [10] J. Egger, Pre- and postoperative segmentation and virtual stenting of aneurysms and stenosis (in German), Dissertation, Department of 4 [11] [12] [13] [14] [15] [16] [17] [1] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] Mathematics and Computer Science, University of Marburg, 215 pages, Marburg, Germany, 2009. J. Egger, T. O’Donnell, C. Hopfgartner, and B. Freisleben, Graph-Based Tracking Method for Aortic Thrombus Segmentation, In: Proceedings of the 4th European Congress for Medical and Biomedical Engineering, Engineering for Health, Antwerp, Belgium, Springer-Press, 584-587, 2008. J. Egger, B. Freisleben, R. Setser, R. Renapuraar, C. Biermann, and T. O’Donnell, Aorta Segmentation for Stent Simulation, In: 12th International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI), Cardiovascular Interventional Imaging and Biophysical Modelling Workshop, 10 pages, London, United Kingdom (UK), 2009. M. H. A. Bauer, J. Egger, T. O’Donnell, B. Freisleben, S. Barbieri, J. Klein, H. K. Hahn, and Ch. Nimsky, A Fast and Robust Graph-based Approach for Boundary Estimation of Fiber Bundles Relying on Fractional Anisotropy Maps, In: Proceedings of the 20th International Conference on Pattern Recognition (ICPR), Istanbul, Turkey, IEEE Computer Society, 2010. J. Egger, M. H. A. Bauer, D. Kuhnt, C. Kappus, B. Carl, B. Freisleben and Ch. Nimsky, Flexible Semi-Automatic Approach for Glioblastoma multiforme Segmentation, In: Proceedings of the International Biosignal Processing Conference, DGBMT, IEEE, Berlin, Germany, 2010. Y. Boykov and V. Kolmogorov, An Experimental Comparison of MinCut/Max-Flow Algorithms for Energy Minimization in Vision, IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(9), pp. 1124-1137, 2004. A. Shabou, F. Tupin, and J. Darbon, A graph-cut based algorithm for approximate MRF optimization, International Conference on Image Processing (ICIP), pp. 2413-2416, 2009. M. Kass, A. Witkin, and D. Terzopoulos, Constraints on Deformable Models: Recovering 3D Shape and Nongrid Motion, Artificial Intelligence, 36:91-123, 1988. D. Terzopoulos, A. Witkin, and M. Kass, Constraints on deformable models: Recovering 3D shape and nongrid motion, Artificial Intelligence, 36: 91-123, 1988. MeVisLab – development environment for medical image processing and visualization. MeVis Medical Solutions AG and Fraunhofer MEVIS, Bremen, Germany. http://www.mevislab.de K. H. Zou, S. K. Warfield, A. Bharatha, C. M. C. Tempany, M. R. Kaus, S. J. Haker, W. M. Wells, F. A. Jolesz, and R. Kikinis, Statistical Validation of Image Segmentation Quality Based on a Spatial Overlap Index: Scientific Reports, Academic Radiology, 11(2), pp. 178-189, 2004. T. F. Cootes and C. J. Taylor, Active Shape Models - ‘Smart Snakes’, In: Proceedings of the British Machine Vision Conference, pages 266275, 1992. S. Sclaroff and J. Isidoro, Active Blobs, In: Proceedings of the Sixth International Conference on Computer Vision, IEEE Computer Society, pp. 1146-1153, Washington, DC, USA, 1998. T. F. Cootes, G. J. Edwards, and C. J. Taylor, Active Appearance Models, In: Proceedings of the European Conference on Computer Vision (ECCV), volume 2, pp. 484-498. Springer-Press Berlin / Heidelberg, 1998. K. Greiner, J. Egger, S. Großkopf, J. N. Kaftan, R. Dörner, and B. Freisleben, Segmentation of Aortic Aneurysms in CTA-images with the Statistic Method of the Active Appearance Models (in German), Proceedings of Bildverarbeitung für die Medizin (BVM), Berlin, Germany, Springer-Press, 2008. M. Spiegel, D. A. Hahn, V. Daum, J. Wasza, and J. Hornegger, Segmentation of kidneys using a new active shape model generation technique based on non-rigid image registration, Computerized Medical Imaging and Graphics 33, pp. 29-39, 2009. B. Ma, R. E. Harbaugh, and M. L. Raghavan, Three-Dimensional Geometrical Characterization of Cerebral Aneurysms. Annals of Biomedical Engineering. 32(2): 264-273, 2004. D.-Y. Kim and J.-W. Park, Computer-Aided Detection of Kidney Tumor on Abdominal Computed Tomography Scans, Acta Radiologica, 45(7): 791-795, 2004.
5cs.CE
1 Optimal Control of Large-Scale Networks using Clustering Based Projections arXiv:1609.05265v3 [cs.SY] 4 Oct 2017 Nan Xue, Student Member, IEEE, Aranya Chakrabortty, Senior Member, IEEE Abstract—In this paper we present a set of projection-based designs for constructing simplified linear quadratic regulator (LQR) controllers for large-scale network systems. When such systems have tens of thousands of states, the design of conventional LQR controllers becomes numerically challenging, and their implementation requires a large number of communication links. Our proposed algorithms bypass these difficulties by clustering the system states using structural properties of its closed-loop transfer matrix. The assignment of clusters is defined through a structured projection matrix P , which leads to a significantly lower-dimensional LQR design. The reduced-order controller is finally projected back to the original coordinates via an inverse projection. The problem is, therefore, posed as a model matching problem of finding the optimal set of clusters or P that minimizes the H2 -norm of the error between the transfer matrix of the full-order network with the full-order LQR and that with the projected LQR. We derive a tractable relaxation for this model matching problem, and design a P that solves the relaxation. The design is shown to be implementable by a convenient, hierarchical two-layer control architecture, requiring far less number of communication links than full-order LQR. Index Terms—Clustering, Large-scale networks, Projection, LQR, H2 performance. I. I NTRODUCTION A vast majority of practical networked dynamic systems (NDS), ranging from power system networks to wireless networks to social or biological networks, consist of several hundreds to thousands of nodes that are spatially distributed over wide geographical spans. Developing tractable control designs for such large complex networks, and implementing those designs through affordable communication, continue to be a challenge for network designers. Traditionally, control theorists have addressed the problem of controlling largedimensional systems by imposing structure on controllers. The most promising approach, for example, started with the idea of decentralized control [1], followed by techniques such as singular perturbation theory [2], [3], balanced truncation [4], [5], [6], and ν-gap reduction [7] among others. These methods aim to simplify the design of controllers for large systems by exploiting weak coupling between their state variables, and by ignoring states that are ‘less important’ than others. The tradeoff, however, is that the resulting controllers are often agnostic of the natural coupling between the states, especially the coupling between the closed-loop states, since many of these couplings are forcibly eliminated to facilitate the design itself. N. Xue and A. Chakrabortty are with the Department of Electrical and Computer Engineering, North Carolina State University, Raleigh, NC, 27695 USA, e-mail: [email protected], [email protected] The work is supported partly by the US National Science Foundation (NSF) under grant ECCS 1054394. Therefore, extending these methods to facilitate controller designs for networks, especially to NDS whose states may be defined over highly structured topologies such as clustering, is quite difficult. The literature for developing tangible and yet simple low-dimensional controllers that satisfy global stability and dynamic performance requirements of very large NDS is still unfortunately sparse. Ideas on aggregate control [8], glocal control [9] and hierarchical control [10], [11] have recently been proposed to address this challenge. The goal of these designs, however, is to guarantee stability by modular tuning of local controller gains; their degrees of freedom for guaranteeing performance can be limited. To bridge this gap, in this paper we propose a design method called control inversion. The approach is to cluster the states of an n-dimensional network into r > 0 distinct, non-overlapping groups. We assume n to be a large positive integer, and r ≤ n to be a given design parameter. The grouping is defined by a (r × n) structured projection matrix P whose elements denote the identity of states in the clusters, weighted by certain projection weights. The design thereafter consists of three steps. First, for the full-order network an ndimensional LQR controller is defined for any given choice of Q and R. We refer to this controller as the benchmark LQR. Second, the projection matrix P is used to construct an rdimensional reference model for which an r-dimensional LQR controller is designed. The design matrices for this reducedorder controller, however, are not free; they are constrained by being related to Q and R through P . The important point, however, is that the design dimension reduces to r from n. Finally, this reduced-order controller is projected back to the full-order network by the inverse projection P T . The problem is then to find a projection matrix P that minimizes the H2 norm of the error between the transfer function matrices of the full-order network with the benchmark LQR controller and with the projected LQR controller. This problem by itself, however, is non-convex even without any structural constraint on P . To bypass this intractability, we introduce a relaxation, which is done in two stages. The first stage relaxes the error minimization to the minimization of its upper bound, while the second stage applies a low-rank approximation. We finally design a P that solves this relaxed problem. Three distinct variants of the design are proposed. In the first case, we optimize over cluster assignment while keeping the projection weights fixed, and establish that this minimization can be posed as an unsupervised clustering problem. We use weighted k-means [12] to solve this minimization. In the second case, we fix the cluster identities, and optimize over the projection weights. Depending on the stability of 2 the open-loop system, we show that this minimization can be posed as finding the dominant eigenvector of the controllability Gramian or as finding the Z-eigenvector of a tensor [13]. In the third case, we propose an iterative method to optimize over both cluster assignment and projection weights. The controllers resulting from all three algorithms are shown to be implementable by a convenient, hierarchical two-layer control architecture, requiring far less number of communication links than full-order LQR as well as sparsity-promoting LQR [14]. Recently, [15] and [16] have used structural projectionbased ideas for model reduction of large networks, but not for control designs. Attention has also been drawn to designing LQR controllers for large systems by finding low-rank solutions of algebraic Riccati equations [17]. However, like most Krylov subspace-based reduction methods such as in [6], the controller in [17] is unstructured, and hence demands as many communication links as the full-order LQR itself. Distributed controllers using model matching [18], sparsitypromoting LQR in [14] and structured LQR in [19], [20] promise to reduce the communication density, but their designs inherit the same dimensionality as the full-order design. Unlike all of these methods, the novelty of our algorithms is in the facilitation of closed-loop control from the perspective of both design and implementation. The recent papers [21], [22] also address both goals, but the dimensionality of their controllers is subject to the sparsity structure of the open-loop network while our design does not necessarily require any such sparsity. Preliminary results on this design have been presented in the recent conference paper [23], but only for a consensus model with specific Q and R matrices. The remainder of the paper is organized as follows. Section II formulates the problem of clustering-based optimal control. The relaxation for the original problem is derived in Section III, which is then solved by a clustering algorithm based on weighted k-means optimization in Section IV. The design for cluster weights as well as that for the weights and clusters taken together are discussed in Section V. All three algorithms are illustrated via simulations in Section VI. Section VII concludes the paper. Notation We will use the following notations throughout this paper: |m| absolute value of a scalar m |S|c cardinality of a set S 1n column vector of size n with all 1 entries Ik identity matrix of size k Mi,j the (i, j)th entry of a matrix M diag(m) diagonal matrix with vector m on its principal diagonal M ⊗N Kronecker product of M and N M ◦N Hadamard product of M and N tr(M ) trace operation on a matrix M kM kF Frobenius pnorm of a matrix M , i.e. kM kF = tr(M M T ) ker(M ) kernel of a matrix M σ̄(M ), λ̄(M ) largest singular value, or eigenvalue with largest real part of a matrix M σ(M ), λ(M ) smallest singular value, or eigenvalue with smallest real part of a matrix M v̄(M ) right eigenvector of λ̄(M ) Given a matrix M = [m1 , ..., mn ] ∈ Rn×n , its vector form is defined by vec(M ) = [mT1 , ..., mTn ]T , with the inverse operation defined by unvec(vec(M )) = M . A −1 transfer matrix is defined as g(s) = C(sI  − A) B + D, A B . We rewith a realization form of g(s) = C D fer to g(s) as stable if A is Hurwitz, and unstable otherwise. Furthermore, the H2 and H∞ norms of a stable qR transfer matrix g(s)qare R defined by kg(s)kH2 = ∞ ∞ 1 ∗ ∗ −∞ tr[g (t)g(t)]dt = 2π −∞ tr[g (jω)g(jω)]dω and kg(s)kH∞ = supω σ̄[g(jω)]. From graph theory, a graph G = (V, E) is defined over a node (vertex) set V = {1, ..., n} and an edge set E ⊂ V × V, which contains two-element subsets of V. If {i, j} ∈ E, we call nodes i and j adjacent, and denote the relation by i ∼ j, or simply ij. The set of nodes adjacent to i ∈ V is noted by Ni = {j ∈ V|i ∼ j}. In this paper, G is assumed to be undirected, which implies ij is equivalent to ji, and there are no loops or multiple edges between nodes. II. P ROBLEM F ORMULATION Consider a general LTI system of the form ( ẋ(t) = Ax(t) + Bu(t) + Bd d(t), x(0) = x0 y(t) = Cx(t) , (1) where x(t) ∈ Rn , u(t) ∈ Rm and y(t) ∈ Rp represent the vector of state, control and output variables respectively, and d(t) ∈ Rnb is a disturbance entering into the system. We assume (1) to be defined over a network of ns ≤ n interconnected subsystems, with their network topology represented by a connected graph G = (V, E), V = {1, ..., ns }. The dynamics of each subsystem can be written as  P ẋi (t)=Aii xi (t)+ Aij xj (t)+Bi ui (t)+Bdi di (t) j∈Ni (2) y (t) = C x (t) i i i i = 1, ..., ns , where Aij , Bi , Bdi and Ci are submatrices with compatible dimensions from A, B = diag(B1 , ..., Bns ), Bd = diag(Bd1 , ..., Bdns ) and C = diag(C1 , ..., Cns ). Notice that the dimension of ui (t) can be zero, meaning that the ith subsystem can have no input. In this paper, we consider an LQR design for (1), and assume C = In for full-state feedback. Given two real-valued matrices Q = QT  0 and R = RT ≻ 0, the LQR problem is posed as finding a feedback law u(t) = −Kx(t) such that the cost function Z ∞ J := [xT (t)Qx(t) + uT (t)Ru(t)]dt (3) 0 is minimized. The expression (3), also known as the infinitehorizon continuous-time LQR, can be solved by the following algebraic Riccati equation (ARE) AT X + XA + Q − XGX = 0, (4) 3 where G = BR−1 B T . The feedback matrix can be found through K = R−1 B T X. For such a solution X to exist, we will adhere to the following assumption throughout this paper. T 1 Assumption 2.1: (Q 2 , A) is observable, and (A, BR− 2 ) is stabilizable. According to [7], the assumption above guarantees a unique stabilizing solution X = X T ≻ 0. However, finding this solution from (4) in practice is subject to O(n3 ) computational complexity, which can become unscalable for largescale systems. Moreover, the resulting matrix X is usually an unstructured dense matrix, which demands every subsystem in the network to communicate with every other subsystem for implementing the feedback. These two factors together make both the design and implementation of u = Kx very difficult, especially when G consists of thousands to tens of thousands of nodes. Therefore, we propose a design strategy, which we refer to as control inversion, to repose this LQR problem using a clustering-based projection. A. Control Inversion Definition 2.2: Given an integer r, where 0 < r ≤ n, and a non-zero vector w ∈ Rn , define r non-empty, distinct, and non-overlapping subsets of the state index set Vs = {1, ..., n}, respectively denoted as I = {I1 , ..., Ir }, such that I1 ∪ ... ∪ Ir = Vs . A clustering-based projection matrix P ∈ Rr×n is defined as ( w j j ∈ Ii , (5) Pi,j := kwIi k2 0 otherwise where wIi = [wIi {1} , ..., wIi {|Ii |c } ]T is non-zero, and Ii {j} denotes the j th element in the set Ii . The matrix P has the following three properties: 2) Reduced-order LQR design: We similarly project the LQR parameters by Q̃ = P QP T ∈ Rr×r , and let R̃ = R such that G̃ := B̃ R̃−1 B̃ = P GP T ∈ Rr×r . An LQR problem for the reduced-order model (6) is then posed as to minimize Z ∞ [x̃T (t)Q̃x̃(t) + ũT (t)R̃ũ(t)]dt (7) J˜ := 0 with respect to ũ(t) = −K̃ x̃(t). Here the feedback matrix K̃ = R̃−1 B̃ T X̃ corresponds to the solution X̃ ∈ Rr×r of the reduced-order ARE of (7), which is written as ÃT X̃ + X̃ à + Q̃ − X̃ G̃X̃ = 0. (8) 3) Inverse projection to original coordinates: The solution X̃ from (8) is projected back to the original coordinates through the inverse projection X̂ = P T X̃P. (9) This projected controller can then be implemented in the fullorder model (1) using u = −R−1 B T X̂x, which implies that the effective feedback gain matrix is K̂ = R−1 B T X̂. (10) B. Problem Statement The controller K̂ is dependent on the projection P through equations (6), (7), and (9). The choice of P is guided in the following way. Consider g(s) := (sIn − A + BK)−1 Bd , (11) which is the closed-loop transfer matrix from d to x for (1) with full-order LQR. Similarly, consider ĝ(s) := (sIn − A + B K̂)−1 Bd , (12) which is the closed-loop transfer matrix from d to x for (1) with the projected controller (10). Using (11) and (12), we • next state our main problem of interest. • Main problem: Given system (1) and an integer r > 0, the problem addressed in this paper is to find a clustering set I The construction of P is shown by the following example.  T and a non-zero vector w such that the corresponding projection Example 1: Let w = 1 1 1 2 1 1 1 1 1 1 , matrix P solves the model matching problem1 I1 = {1, 2}, I2 = {3, 4, 5} and I3 = {6, 7, 8, 9, 10}. Then, minimize kg(s) − ĝ(s)kH2 .   1 (13) P √ √1 0 0 0 0 0 0 0 0 2 2  √1 √2 √1 However, finding an exact solution for this optimization 0 0 0 0 0 0 P= 0 . 6 6 6 problem is intractable given that the objective function is an √1 √1 √1 √1 √1 0 0 0 0 0 5 5 5 5 5 implicit and non-convex function of P , and also because P Given P defined over any clustering set I and weight vector is defined over a combinatorial structure. Our main contribuw, the control inversion strategy for the LQR problem (3) is tion, therefore, is finding a tractable relaxation for (13) as a quadratic function of P , and thereafter designing P to solve then composed of the following three steps. 1) Projection to reduced-order system: Using projection P , the relaxed problem. We make the following assumption so that g(s) and ĝ(s) both have minimal realization. we first construct a reduced-order model Assumption 2.3: The pair (A, Bd ) is controllable. ( ˙ x̃(t) = Ãx̃(t) + B̃ ũ(t) + B̃d d(t), x̃(0) = x̃0 Solution Strategy: The outline of our solution strategy is as , (6) follows. In Section III, we derive an upper bound relaxation for ỹ(t) = C̃ x̃(t) (13) such that its objective function is quadratic in P . Ideally where à := P AP T ∈ Rr×r , B̃ := P B ∈ Rr×m , B̃d := 1 The initial condition for the reduced-order model (6) does not need to be P Bd ∈ Rr×nb and C̃ := P CP T = Ir . For this system x̃ ∈ Rr related to that of the full-order model (1). Our goal is to compare (11) and is the state and ũ ∈ Rm is the control input. (12), both of which have zero initial conditions. • It is row orthonormal, i.e. P P T = Ir ; Image of P T P lies in the span of w, i.e. P T P w = w; Given v 6= 0, P v = 0 only if wITi vIi = 0, i = 1, ..., r. 4 speaking, one can solve for P from this relaxed problem. The computational complexity for constructing the objective function is, however, O(n3 ) since it requires the computation of the controllability Gramian of g(s). To bypass this difficulty, a second round of relaxation is applied by exploiting the lowrank (denoted as κ) structure of the controllability Gramian. After these two relaxations, the final objective function, still quadratic in P , can be constructed in O(nκ2 ) complexity, which is near linear if κ ≪ n. The solution to this optimization is then addressed in two ways - first by finding the clustering set I with a fixed weight vector w (Section IV), and second, by finding w while keeping I fixed (Section V). We also propose to combine these two approaches by an iterative algorithm. The overall design flow and the numerical complexities for each step are previewed in Fig. 1. Detailed explanations of these complexities will be provided in the respective sections to follow. E"F&'()2?G A#@4&"=23"4'0) >#092? E"F&'()2??? !"#$%$&'() *!+,-. ङ ࢔ࣄ ૛ ङ ࢔ࣄ࢘࢑ this process no coordinator will be able to infer individual state measurements from other clusters. Finally, the coordinator of Ii computes the control vector ui by taking linear combinations of the elements of X̃P x. The linear combination follows from u = −R−1 B T P T X̃P x. The individual elements of ui are broadcast to the respective input actuators in Ii . Note that since the aggregation is applied to the state x(t), and not on the subsystems, the state vector of any subsystem can be partitioned among different clusters. Thus, in practice, a subsystem may need to transmit its states to more than one coordinator, and also receive control inputs from more than one coordinator. We illustrate the three implementation steps by an example in Fig. 2. In the worst-case scenario when every subsystem has a scalar state xi and a scalar control input ui , the two-layer control implementation will result in a much sparser commu nication topology with n + r2 bidirectionallinks compared to an LQR controller which would require n2 number of links. This reduction, combined with standard networking protocols such as multi-casting [24], makes the implementation of our proposed controller convenient and cheap. E"F&'()2?? A()&=(#2?)B"=4'() ?&"=$&'B" >#092??? *8. C *:D. E"F&'()2G /"'01&23"4'0)5 617 89:2*4&$;#"2(<"),#((<. (=2>#092??2*@)4&$;#"2(<"),#((<. ङ ࢔ ङ ࢔૝ ङ ࢘࢔૛ ൅ ङ ࢘૜ Figure 1: Step-by-step execution of the proposed designs C. Benefits of Control Inversion An important point to note is that the physical meaning of the state x̃(t) of the reduced-order model (6) has no relation to that of the state x(t) of our full-order model (1). This is a key difference of the control inversion design from traditional model-reduction based designs where the reduced-order state vector is typically a direct projection of the full-order state vector. The projection in our design is rather applied on the controller X̃ instead of x(t). Two natural benefits of this approach are as follow: 1. Tractability of design: The computational complexity for constructing the reduced-order ARE in (8) is O(rn2 ), while that for solving this ARE is O(r3 ). The computational complexity required to design P through Sections III, IV and V will be shown to be simpler than the O(n3 ) complexity of a full-order LQR design. Thus, if r ≪ n, the overall control inversion design becomes numerically more tractable than fullorder LQR. 2. Simplicity in implementation: The projected matrix X̂ = P T X̃P is a structured r-ranked matrix, which results in a sequential two-layer hierarchical control architecture. The implementation of the feedback u(t) = −R−1 B T X̂x(t) follows three steps. First, a coordinator is assigned to each cluster Ii , which collects the measurements of all the states belonging to that cluster. Each coordinator then computes the weighted averaged state Pi,: x for its cluster, i = 1, 2, .., r. Next, the coordinators exchange these weighted averages, and each of them compute the r-dimensional vector X̃P x. Note that in III. R ELAXATIONS FOR M ODEL M ATCHING In this section we describe the theoretical derivation of the relaxation for the model matching problem (13). We start by discussing the well-posedness of the projected controller K̂ in Section III.A. The final optimization to be solved is then obtained from two stages of relaxations as detailed in Section III.B and III.C respectively. All proofs are presented in the Appendix B. A. Well-Posedness Conditions The well-posedness of K̂ is equivalent to two conditions namely, if the reduced-order ARE (8) admits a solution X̃, and if ĝ(s) is stable. We discuss these two factors as follows. 1) Existence condition: Similar to the full-order ARE (4), the reduced-order ARE (8) is guaranteed with a unique soT 1 lution X̃ ≻ 0 if (Ã, G̃ 2 ) is stabilizable and (Q̃ 2 , Ã) is observable [7]. However, unlike conventional model reduction techniques that can utilize unstructured projections to preserve the exact stabilizability and observability properties from 1 T (A, G 2 ) and (Q 2 , A), the structured projection P in (5) does not guarantee that. As a result, for a general system the ARE (8) may not admit a unique solution X̃, and therefore K̂ may not exist. To bypass this problem, we modify the definitions of Q̃ and G̃ by using a constant shift. That is, in case the pair T 1 (P AP T , P G 2 ) is not stabilizable and/or (Q 2 P T , P AP T ) is not observable, we let Q̃ = P QP T + αIr and/or G̃ = P GP T + αIr (14) for a small constant shift α > 0. Using (14), Q̃ and G̃ become 1 positive-definite matrices, which yield (Ã, G̃ 2 ) controllable T and/or (Q̃ 2 , Ã) observable. The existence of X̃ and K̂ can thus be guaranteed. The matching error introduced by this shift will be discussed in the next subsection. 5 C1 ‫ݔ‬ଷ ൅ ʹ‫ݔ‬ସ ൅ ‫ݔ‬ହ ‫ݔ‬ଵ ൅ ‫ݔ‬ଶ ʹ ‫ ଺ݔ‬൅ ‫ ଻ݔ‬൅ ‫ ଼ݔ‬൅ ‫ݔ‬ଽ ൅ ‫ݔ‬ଵ଴ 2 ‫ݔ‬ଵ଴ 10 ‫ݔ‬ଽ 9 ‫ݔ‬ଵ 1 ‫ݔ‬ଷ ‫ݔ‬ସ 4 3 ‫଺ݔ‬ 6 ༠ C1 ‫څ‬ ଶ C3 ‫ݔ‬ହ 1 5 ‫଻ݔ‬ ‫ל‬ C2 C1 ͷ C3 ‫ݔ‬ଶ ‫څ‬ ͸ C2 2 ༠ ହ C 2 5 10 9 (a) Step 1 - state averaging P x ‫ל‬ ଺ 7 10 8 ଶ‫ל‬ ଺ 6 3 7 7 ‫଼ݔ‬ C2 4 5 6 ‫ל‬ ଺ 3 ༠ ༠ ହ ༠ ༠ ହ ହ ହ 1 4 3 ‫څ‬ ଶ 8 9 (b) Step 2 - reduced-order control X̃P x = [⋆ ◦ ⋄]T 8 (c) Step 3 - control inversion u = −X̂x Figure 2: Cyber-physical architecture for implementing the feedback controller K̂. Here I1 = {1, 2}, I2 = {3, 4, 5} and I3 = {6, 7, 8, 9, 10}. Solid lines represent physical connections, while dashed lines represent communication links. C1 , C2 , C3 are coordinators for clusters 1, 2 and 3. For the simplicity of illustration, for this example we assume R−1 B T = In . 2) Bound of ARE solution: We first recall a lemma from [27] about the eigenvalue bound of a general ARE solution. Lemma 3.1: (Lemma 1.5 in [27]) The solution X from the ARE (4) satisfies the following upper bound: λ̄(X) ≤ β(A, G, Q) = λ̄(Dt ) λ̄[(Q + KtT Kt )Dt ] , λ(F Dt ) (15) 1 where Kt is any matrix stabilizing A + G 2 Kt , and Dt and F are positive-definite matrices that satisfy 1 1 (A+G 2 Kt )T Dt + Dt (A+G 2 Kt ) ≤ −F. (16) From this lemma, given any stabilizing controller Kt one can always find an upper bound for λ̄(X) using the function β(A, G, Q). This function will be used next to verify stability of ĝ(s). 3) Stability condition: Before stating the main stability criterion for ĝ(s), we first make the following assumption on the projection weight w from Definition 2.2. Assumption 3.2: The weight vector w satisfies wITi vIi 6= 0, i = 1, ..., r for any Av = λv, Re(λ) ≥ 0. Note that from Definition 2.2, if wITi vIi = 0, i = 1, ..., r then P v = 0. This would imply (A − B K̂)v = Av = λv, Re(λ) ≥ 0, which means that the unstable eigenvalues of A are retained in the closed-loop. Assumption 3.2 is made to avoid this situation. With Assumption 3.2, we next state a sufficient condition for the stability of ĝ(s). Theorem 3.3: Given Assumption 2.1 and 3.2, the TFM ĝ(s) is asymptotically stable if σ(Q) − 2σ̄(X)σ̄(G)σ̄(E) + σ(X)2 σ(G) > 0, (17) where E = X − X̂ denotes the error between the full-order ARE solution from (4) and the projected solution from (9). Theorem 3.3 provides two options for achieving stability of ĝ(s). In order to meet the condition (17), one can select Q and R such that σ(Q) ≫ σ̄(G) > 0. In practice, this choice of (Q, R) will make the design more robust towards the uncertainties in A and B [29]. As a drawback, a larger Q will also result in a high feedback gain, making the system vulnerable to noise. An alternative to satisfy (17) is to minimize σ̄(E). As will be shown in the next subsection, σ̄(E) is proportional to the objective function of our proposed upper bound relaxation for (13). Therefore, solving the relaxation problem will also assist in enlarging the inequality gap in (17). The following lemma provides a sufficient condition for (17) by which stability of ĝ(s) can be verified without knowing X. Lemma 3.4: The stability condition (17) holds if σ̄(X̃) < σ(Q) − β(A, G, Q), 2σ̄(G)β(A, G, Q) (18) where function β(A, G, Q) is defined in Lemma 3.1. Remark 1: For the case when A is unstable, computing β(A, G, Q) would require the knowledge of Kt according to Lemma 3.1. Similarly for w to meet Assumption 3.2, one also needs to know the eigenvectors of all unstable modes of A. Verifying stability of ĝ(s) for an unstable A is, therefore, admittedly more computationally expensive than for a stable A. This computational burden obviously does not exist when A is stable, and may not also exist when A, despite having zero eigenvalues, has specific structural properties. One such example is when A is a weighted Laplacian matrix (i.e., when (1) is a consensus network). We will illustrate this special case of consensus network in Appendix A. B. Relaxation I: Upper Bound Minimization We present our first stage of relaxation assuming that the sufficient condition for closed-loop stability from Theorem 3.3 holds. As mentioned before, finding a P that exactly minimizes kg(s)− ĝ(s)kH2 is an intractable problem. To relax this problem, we find an upper bound for kg(s) − ĝ(s)kH2 . We denote the error system by ge (s), which can be written as   Ae Be ge (s) : = g(s) − ĝ(s) = Ce 0   A − GX Bd (19) = A − GX̂ −Bd  . In In 0 6   I I From a similarity transformation of T = n n and T −1 = In 0   0 In , (19) yields In −In     A−GX̂ G(X̂−X) 0 T Ae T −1 T Be ge (s)= = A−GX Bd  Ce T −1 0 In 0 0 −1 = −(sIn − A + GX̂) −1 GE(sIn − A + GX) Bd , (20) where E = X − X̂. By taking norms on both sides of (20), we get kge (s)kH2 ≤ k(sIn − A + GX̂)−1 GkH∞ kEg(s)kH2 , which from the bounded real lemma [7] and the definition of H2 norm reduces to 1 kge (s)kH2 ≤ γkEΦ 2 kF , (21) where γ is any positive real number such that a real-valued matrix Γ = ΓT  0 exists and satisfies   Γ(A − GX̂) + (A − GX̂)T Γ ΓG In  GΓ −γIn 0  ≺ 0, In 0 −γIn R ∞ (A−GX)τ T T 1 Bd BdT e(A−GX) τ dτ ≻ 0 and Φ := Φ 2 Φ 2 = 0 e is the solution of the Lyapunov equation (A − GX)Φ + Φ(A − GX)T + Bd BdT = 0. (22) Inequality (21) shows that kge (s)kH2 is linearly bounded by 1 kEΦ 2 kF . Therefore, one way to solve the original model matching problem (13) will be to find a P that minimizes 1 kEΦ 2 kF . By doing so, σ̄(E) can also be minimized to some 1 1 extent since σ̄(E) ≤ kEkF ≤ σ̄(Φ− 2 )kEΦ 2 kF , which will help in meeting the stability condition (17). This type of bound minimization is common in model and controller reduction, and has been attempted (see [17] and the references therein) under the assumption that P is unstructured, or more specifically P is an r-dimensional Krylov  subspace 1 1 1 1 from K(A, Q 2 , r) = Q 2 AQ 2 · · · Ar−1 Q 2 . By this assumption, E can be found as an explicit function of P associated with a Householder transformation. In our case, however, P has a structure as in (5), due to which this explicit functional relationship does not hold anymore. We, therefore, apply perturbation theory of ARE to further relax the bound in 1 (21), and derive a new upper bound on kEΦ 2 kF as an explicit function of P in the following theorem. 1 Theorem 3.5: Denote ξ = k(In − P T P )Φ 2 kF . The norm 1 of the weighted error EΦ 2 satisfies the inequality 1 2 kEΦ kF ≤ f (ξ) = ǫ1 σ̄(Q)ξ 2 + 2ǫ1 ǫ2 ξ + αǫ1 ǫ3 , (23) 1 where ǫ1 = σ̄(Φ− 2 ) 1 σ[Φ− 2 1 1 (A−GX)Φ 2 ] 1 , ǫ2 = β̃ σ̄(A)σ̄(Φ 2 )+ σ̄(QΦ 2 ), ǫ3 = (β̃ 2 + 1)σ̄(Φ), and β̃ = supP β(Ã, G̃, Q̃) are positive scalars that are independent of P , and α is defined in (14). The constant αǫ1 ǫ3 in (23) represents the matching error introduced by the constant shift α from (14). This error can be disregarded if the reduced-order ARE (8) admits a solution. From (21) and (23), it then follows that kge (s)kH2 ≤ γf (ξ), due to which we approach the minimization of kge (s)kH2 by minimizing f (ξ) with respect to P . Since f (ξ) is a monotonic function of ξ, the minimization of f (ξ) is equivalent to minimizing the value of ξ as minimize P 1 1 ξ = kΦ 2 − P T P Φ 2 kF . (RL-1) The optimization (RL-1), therefore, serves as an upper bound relaxation for the original model matching problem (13). Note that, in general, it is impossible to exactly quantify the optimality gap between (13) and (RL-1) since (13) is nonconvex even without posing any combinatorial constraints on P . The optimality gap will be small if the minimum value of ξ is close to zero, in which case the error kge (s)kH2 in (13) will be nearly zero as well following (21) and (23). 1 1 The ideal case ξ = 0 will happen when Φ 2 = P T P Φ 2 , 1 meaning that Φ 2 is invariant to the mapping P T P . This holds for the trivial case where r = n and P = In . To achieve a sufficiently small minimum for (RL-1) for r < n, we will develop two designs in Sections IV and V. C. Relaxation II: Low-Rank Approximation We next discuss the numerical complexity in constructing the optimization problem (RL-1), and how this complexity can be simplified by making appropriate approximations on Φ. In the most general case, Φ required for (RL-1) needs to be computed through the following procedures. First, recall the definition of the Hamiltonian matrix   A −G H := . (24) −Q −AT The eigenvalues of H are symmetric about the imaginary axis. Suppose  H is diagonalizable and that the columns of Y the matrix span the stable invariant subspace of H, Z 2n×n i.e.     Y Y H = Λ− , (25) Z Z − where Λ− = diag([λ− 1 , ..., λn ]) consists of all the eigenvalues − of H in the left-half plane, i.e. 0 > λ− 1 > ... > λn . The stabilizing solution of ARE can thus be found by X = ZY −1 [7]. The first n rows of (25) are expanded as A − GZY −1 = Y Λ− Y −1 , which means Λ− and Y are the eigenvalues and right eigenspace of the closed-loop state matrix A−GX. Then from the Lyapunov equation (22), we can write Φ directly in terms of Y and Λ− as [6] Φ = Y (Y −1 Bd BdT Y −T ◦ C)Y T , where C ∈ Rn×n is a Cauchy matrix with i h 1 − , Ci,j = − λ− +λ i j 1 (26) and subsequently obtain Φ 2 from the Cholesky decomposition. 1 Therefore, to compute Φ and then Φ 2 , one will need to compute the full stable eigenspace Y from H following (25). This computation is as expensive as solving a full-order LQR with O(n3 ) complexity for both computation and memory [28]. This may defeat the purpose of our design since we 7 want our controller to be numerically much simpler than the full-order LQR. To bypass this difficulty, we next show that Φ can be approximated by a matrix Φκ that follows from a κ-dimensional (κ < n, not necessarily equal to r) invariant subspace of Y . Ideally κ should be at most r to justify the computational benefit of our design while preserving an acceptable accuracy in the error norm ξ. This matrix Φκ is constructed as follows. Definition 3.6: Define Φκ ∈ Rn×n as 1 T Φκ := Φκ2 Φκ2 = Y1 (Ω1 Bd BdT ΩT1 ◦ C1,1 )Y1T , (27) −1 where Y1 =Y:,1:κ , Ω1 =Y1:κ,: and C1,1 =C1:κ,1:κ are respectively the κ-dimensional partitions of Y , Y −1 and C. By definition of Φκ , one only needs to compute the first κ − eigenvalues λ− 1 , ..., λκ of H, and the Y1 component of the first κ eigenvectors. Ω1 can be approximated by the pseudo-inverse of Y1 . These κ smallest eigenvalues and eigenvectors can be solved by Krylov subspace-based techniques such as Arnoldi algorithm in O(nκ2 ) time [28]. Therefore, instead of (RL-1), we consider solving a computationally simpler approximation of (RL-1) as minimize P 1 2 1 2 ξκ = kΦκ − P T P Φκ kF , (RL-2) 1 where Φκ2 ∈ Rn×κ from Definition 3.6 can be computed as 1 1 Φκ2 = Y1 (Ω1 Bd BdT ΩT1 ◦ C1,1 ) 2 . The optimality gap between optimizations (RL-1) and (RL-2) can be quantified by the following lemma. Lemma 3.7: Assume Y −1 has a moderate condition number η, and each column of Bd has a unitary norm. The minimum ξ ∗ from (RL-1) and ξκ∗ from (RL-2) satisfy v u n X u 1 ∗ ∗ (28) − −. ξ − ξκ ≤ tη 2 nb 2λi i=κ+1 From Lemma 3.7, the optimality gap between (RL-1) and (RL-2) will be negligible when the error q Pn η 2 nb i=κ+1 − 2λ1− is kept small. In practice, this i situation happens when there exists κ (κ ≪ n) dominant eigenvalues in the Hamiltonian matrix, i.e., H has the following spectral gap 0< |λ− 1| < ... < |λ− κ| ≪ |λ− κ+1 | < ... < |λ− n |. This gap can exist if the open-loop network (1) exhibits coherent behavior [3]. As a result of this spectral gap, the RHS of (28) can become sufficiently small, in which case the optimal value of (RL-2) will closely resemble that of (RL-1) while the computation of the objective function requiring a much tractable complexity of O(nκ2 ), κ < n. The idea of utilizing a κ-dimensional subspace for computing Φκ is similar in spirit to finding an unstructured approximate ARE solution as proposed in [17]. However, it should be noted that unlike [17] where the selection of the κ eigenvectors is undetermined, for our problem the error bound in Lemma 3.7 clearly guides the choice of the κ eigenvectors in terms of tightening the optimality gap between (RL-1) and (RL-2). IV. D ESIGN I: C LUSTER D ESIGN In this section we present an algorithm to design P by solving (RL-2). Note that P has two degrees of freedom I and w. For the design in this section, we keep w fixed, and minimize (RL-2) over I. Although inherently this is an NPhard problem, fortunately the specific structure of the objective function ξκ , together with the structure imposed on P in (5), enables (RL-2) to be solved by efficient numerical algorithms such as weighted k-means [12]. We show these results as follows. To establish the equivalency of (RL-2) to the weighted kmeans optimization, it is useful to borrow a nominal projection matrix P̄ as ( 1 j ∈ Ii , i = 1, ..., r. (29) P̄i,j := kwIi k2 0 otherwise From Definition 2.2, P̄ satisfies P = P̄ W , where W = diag(w). With this notation, we have 1 1 Φκ2 − P T P Φκ2 = W (Ψ − P̄ T P̄ W 2 Ψ), (30) 1 where Ψ = [ψ1 , ..., ψn ]T denotes the matrix W −1 Φκ2 . Therefore, the entries of the matrix P̄ T P̄ W 2 can be found by ( w2 k j ∈ Ii & k ∈ Ii 2 T 2 [P̄ P̄ W ]j,k = kwIi k2 0 otherwise for i = 1, ..., r. Thus the j th row of the matrix P̄ T P̄ W 2 Ψ can be written as P 2 T k∈Ii wk ψk T 2 T [P̄ P̄ W Ψ]j,: = ci = P (31) 2 , k∈Ii wk for j ∈ Ii . It is clear from above that for all the index j that are assigned to the same cluster Ii , cTi is a weighted average (or a weighted centroid) of the row vectors ψjT . Moreover, the matrix P̄ T P̄ W 2 Ψ will have identical rows for those whose indices are inside the same cluster. Therefore, (RL-2) can be posed as an unsupervised clustering problem minimize I1 ,...,Ir ξκ2 = n X j=1 wj2 kψj − ci k22 . (32) The optimization problem in (32) is in the same form as a weighted k-means optimization, which minimizes the Euclidean distance weighted by wj2 between each data point ψj and its centroid ci . Thus, data points which are close to each other in the weighted distance are assigned to the same cluster. A standard method for solving this problem is Lloyd’s algorithm [12], using which we present the weighted k-means 1 clustering for (32) in Algorithm 1. With Φκ2 ∈ Rn×κ as the input, the running time of Lloyd’s algorithm is O(nκrk), where k is the total number of iterations. As in any heuristic algorithm, Algorithm 1 does not guarantee convergence to a global minimum. Hence, if one is not satisfied by the k-means solution one can apply any state-of-art clustering algorithms for solving (32). Using the resulting clustering set I and the fixed weight w, we can then construct the projection P and execute the control inversion design to get K̂. The 8 clustering weight w can be selected as any vector that satisfies Assumption 3.2. When A is Hurwitz, a simple choice of w can be the vector of all ones. We conclude this section by summarizing the total numerical complexity for our design based on Algorithm 1. The chain of approximations involved in this design till the output of Algorithm 1 follows the sequence of equations: (21), (23), (RL-1), (RL-2) and (32). The total complexity amounts to O(nκ2 ) + O(nκrk) + O(n2 r) + O(r3 ), which includes construction of the objective function for (RL-2), execution of Algorithm 1, computation of reduced-order matrices triple (Ã, Q̃, G̃), and solving the reduced-order LQR (7), respectively. This complexity can be at most O(n2 r) if κ ≤ r, which is more tractable compared to the O(n3 ) complexity of full-order LQR, especially when r and κ are sufficiently small. Algorithm 1: H2 closed-loop clustering 1 1 Input : Φκ2 , w and r Initialization: Assign r random rows from 1 2 Ψ = W −1 Φκ2 = [ψ1 , ..., ψn ]T as the initial centroids c01 , ..., c0r ; Find initial clustering sets I 0 = {j → Ii0 | argmin wj2 kψj − c0i k22 , j = 1, ..., n}; i=1,...,r 3 4 5 6 Update the centroids: c0i = P j∈I 0 i P 8 9 wj2 j∈I 0 i , i = 1, ..., r ; k = 1; while I k−1 6= I k or within maximum iterations do Update clustering sets I k = {j → Iik | argmin wj2 kψj − cik−1 k22 , j = 1, ..., n}; i=1,...,r 7 wj2 ψj Update the centroids: cki = k =k+1 ; end Output: I = I k P j∈I k i P wj2 ψj j∈I k i wj2 , i = 1, ..., r ; V. D ESIGN II: W EIGHT D ESIGN We next state a variant of our proposed controller where we solve (RL-2) by fixing the clustering set I and varying the projection weights in w instead. This type of a controller may be needed when a subsystem prefers to have all of its states assigned to the same cluster. Multiple subsystems in the network may also exhibit spatial clustering based on their geographical proximities, in which case they may prefer to have a dedicated coordinator for themselves. This scenario commonly arises in power system networks. Utility companies always prefer to send the state information of their generators to only their own local control centers instead of sharing that information with any other company. Therefore, in this section we develop a new set of algorithms where we fix I to represent the identities of the desired clusters, and minimize ξκ in (RL-2) over w. A visual interpretation of this approach and its comparison to the design in Section IV are shown in Fig. 3. Note that the optimal values of w so obtained denote the relative importance of the network nodes in the closedloop system with the projected controller. In Fig. 3c we show this relative importance by shrinking or expanding the size of the nodes. We describe the design for two cases depending on whether (1) is stable or not. A. Case I: Stable Open-Loop We consider the same optimization objective as in (RL-2) but now minimize it with respect to w as 1 minimize w 1 ξκ = kΦκ2 − P T P Φκ2 kF . (33) To solve (33), we consider a binary projection matrix P̂ as ( 1 j ∈ Ii P̂ (i, j) := . 0 otherwise As can be verified from Definition 2.2, P̂ here also satisfies P = P̂ Ŵ with Ŵ = diag(ŵ), where this ŵ is defined by wj , j ∈ Ii , (34) ŵj = kwIi k2 such that ŵITi ŵIi = 1, for i = 1, ..., r. Using these notations, we can rewrite the objective function in (33) as ξκ2 = tr(Φκ − P T P Φκ ) = tr(Φκ ) − tr(Ŵ P̂ T P̂ Ŵ Φκ ) = tr(Φκ ) − ŵT (P̂ T P̂ ◦ Φκ )ŵ. Since tr(Φκ ) is a constant number, an equivalent form of (33) follows as maximize ŵT (P̂ T P̂ ◦ Φκ )ŵ subject to kŵIi k2 = 1, i = 1, ..., r. ŵ (35) The Hadamard product P̂ T P̂ ◦Φκ preserves the structure from P̂ T P̂ , or equivalently from the clustering set I in the objective function. As a result, the optimization problem (35) boils down to r decoupled optimizations maximize ŵITi Φκ[Ii ,Ii ] ŵIi subject to kŵIi k2 = 1, ŵIi (opt1) for i = 1, ..., r, where Φκ[Ii ,Ii ] denotes the submatrix of Φ corresponding to the indices in Ii . This decoupling can be illustrated by the same example we used before. Example 2: (Continued) Consider the sets I1 , I2 and I3 , and the matrix   1 1 0 0 0 0 0 0 0 0 P̂ = 0 0 1 1 1 0 0 0 0 0 . 0 0 0 0 0 1 1 1 1 1 The objective function in (35) can be block diagonalized as   Φκ[1:2,1:2] 0 0  ŵ= 0 Φκ[3:5,3:5] 0 ŵ (P̂ P̂ ◦Φκ )ŵ=ŵ  0 0 Φκ[6:10,6:10]   T ŵ1:2 Φκ[1:2,1:2] ŵ1:2 0 0 T .  0 ŵ3:5 Φκ[3:5,3:5] ŵ3:5 0 T 0 0 ŵ6:10 Φκ[6:10,6:10] ŵ6:10 T T T Since Assumption 3.2 holds trivial for this case, we state the following theorem. 9 (a) Spatial groups partitioned by the closeness in terms of geometric distances (b) Node clusters resulting from cluster design as in Section IV (c) Imposing projection weights while fixing the clustering sets to the spatial clusters Figure 3: Illustration of cluster design and weight design. Theorem 5.1: The global optimum for (opt1) is obtained at ŵIi = v̄(Φκ[Ii ,Ii ]), for i = 1, .., r. Proof: Given P̂ T P̂  0 and Φ  0, P̂ T P̂ ◦Φκ is positivesemidefinite according to the Schur product theorem. Also, the objective function in (opt1) is a standard Rayleigh quotient for symmetric eigenvalue problem. Therefore, the maximum of objective function in (opt1) is obtained at the largest singular value of Φκ[Ii ,Ii ] . Since Φκ[Ii ,Ii ]  0, its largest singular value is the same as its largest eigenvalue λ̄(Φκ[Ii ,Ii ] ), and hence the optimum is obtained at its dominant eigenvector v̄(Φκ[Ii ,Ii ] ). Given that Φκ[Ii ,Ii ] is symmetric, the eigenvector of its largest eigenvalue can be computed efficiently by Krylov subspace-based techniques, e.g. Lanczos algorithm [28] in this case. Solving (opt1) for i = 1, ..., r, therefore, requires a worst case complexity of O(n) in total. Once ŵ is solved from Theorem 5.1, one can then choose any w that satisfies (34), and this w would serve as global optimum for (33). B. Case II: Unstable Open-Loop For an unstable open-loop system (1), w solved from Theorem 5.1 is not guaranteed to conform to Assumption 3.2, as a result of which ĝ(s) can become unstable. To avoid such a hazardous situation, we add an extra penalty on (opt1) to restrict w under Assumption 3.2. This penalty term is formulated as follows. Recall the reduced-order ARE (8). By pre- and postmultiplying it with P T and P , and after a few calculations, we get AT X̂ + X̂A + Q̂ − X̂GX̂ = 0, with Q̂ := P T Q̃P − (U T U AT X̂ + X̂AU T U ), (36) where U is the complement of P . The ARE above implies −1 T that our proposed controller R ∞ K̂T = R BT X̂ is equivalent to an LQR problem min 0 (x Q̂x + u Ru)dt. Denote the eigenvalue decomposition of A as       Λ , (37) A V V̄ = V V̄ Λ̄ where Λ̄  0 contains all the unstable eigenvalues of A. Applying the transformation z = [V V̄ ]−1 x, one can write   T V T Q̂V̄ T T V Q̂V z. x Q̂x = z V̄ T Q̂V V̄ T Q̂V̄ The matrix V̄ T Q̂V̄ corresponds to the LQR weight for the unstable dynamics of the state trajectories. Therefore, to assure that the unstable modes of A are indeed penalized by Q̂, we consider finding w that maximizes tr(V̄ T Q̂V̄ ). Given that the matrix U T U AT X̂ + X̂AU T U in (36) is bounded but not sign-definite, we consider maximizing tr(V̄ T Q̂V̄ ) by simply maximizing its first part as maximize fV̄ = tr(V̄ T P T Q̃P V̄ ) subject to kŵIi k2 = 1, i = 1, ..., r. ŵ (opt2) Combining (opt2) with the main optimization (opt1), one can formulate the weight design for the unstable case as maximize [ŵT (P̂ T P̂ ◦ Φκ )ŵ]2 + ρ · fV̄ subject to kŵIi k2 = 1, i = 1, ..., r, ŵ (opt3) where ρ > 0 is a penalty factor. In (opt3), the objective function from (opt1) is squared to match with the order of fV̄ . This optimization problem is in the form of a fourthorder sum of squares (SOS) over r > 1 sphere constraints, for which finding even a local optimal is very difficult. One way to bypass this can be to approximate matrix P T Q̃P in fV̄ as P T Q̃P ◦ P̂ T P̂ , meaning only to retain the block-diagonal component of Q only. In this way, (opt3) is reduced to r SOS sub-problems with one sphere constraint for each as, maximize ŵ subject to (ŵIi ⊗ ŵIi )T (Φκ[Ii ,Ii ] ⊗ Φκ[Ii ,Ii ] + ρQIi ,Ii ⊗ V̄Ii ,: V̄ITi ,: )(ŵIi ⊗ ŵIi ) (opt*) kŵIi k2 = 1, for i = 1, ..., r. While this approximation will follow naturally if Q is block-diagonal, the upshot is that the closed-loop performance of the projected system may suffer if Q has dominant off-block-diagonals. In practical networks, however, it is quite common to simply minimize the energy of a node itself, or the energy within a cluster, which implies that Q is very commonly a diagonal or block diagonal matrix. In fact, Q would indeed be preferred as block-diagonal for the scenario described in this section since network operators will always try to discourage closed-loop coupling of their own cluster nodes with other clusters. In those cases, (opt3) and (opt*) become equivalent problems, yielding the same solution. However, irrespective of whether Q is block-diagonal or not, the following theorem shows that the solution of (opt*) will satisfy Assumption 3.2. Theorem 5.2: Given ŵIi , i = 1, ..., r solved from (opt*) with ρ > 0, Assumption 3.2 holds for any w satisfying (34). 10 Proof: Note that V̄:,j , j = 1, ..., nv represents the eigenvector of the j th unstable eigenvalue. The second part ofPthe objective function in (opt*) can be rewritten as v ρ nj=1 (V̄ITi ,j ŵIi )2 (ŵITi QIi ,Ii ŵIi ). Once (opt*) is solved, each individual scalar (V̄ITi ,j ŵIi )2 has to be maximized away from 0, meaning V̄ITi ,j ŵIi 6= 0, i = 1, ..., r, j = 1, ..., nv for AV̄:,j = λV̄:,j , Re(λ) ≥ 0. This satisfies Assumption 3.2. The following lemma shows the performance trade-off due to the approximation in (opt*) when Q is not block-diagonal. Lemma 5.3: Let the maximum of (opt3) be J1 . The maximum J2 of (opt*) satisfies where Je = J 1 − J e ≤ J2 ≤ J 1 + J e , (38) Pr T max k=1, k6=i ρkQIi (j),Ik k1 kV̄l,: V̄Ik ,: k1 . i=1,..,r j,l=1,...,n Proof: The proof follows directly from the Gershgorin circle theorem [28], and is shown in the Appendix. We next present the solution for (opt*). Since (opt*) is a set of r decoupled problems, we illustrate the solution for just one cluster I = {I1 }. This will also allow us to drop the subscripts in all the variables used in (opt*), making the notations easier to follow. We define a fourth-order tensor F ∈ Rn×n×n×n as Fi,j,k,l = Φκ[i,j] Φκ[k,l] + ρQi,j Sk,l , i, j, k, l=1, ..., n. (39) The proof is omitted as the equations above can be easily verified by matching the coefficients of the polynomials on both sides. In summary, the optimization problem (opt**) can be approached by substituting F with a super-symmetric tensor F s . One can, thereafter, solve (opt**) using techniques developed for Z-eigenvalue problems. We solve (opt**) using the tensor power iteration method [31] in Algorithm 2. The convergence properties of this algorithm can be found in [31]. Due to the super symmetry of F s , the worst case (only one cluster) complexity for each iteration of Algorithm 2 is O(n4 ). Although this computation cost is expensive, the algorithm can be easily parallelized, and is easier to implement than O(n3 ) full-order LQR as the memory required is only O(n2 ). Moreover, the value of n for Algorithm 2 scales down as the number of clusters increases. Algorithm 2: Power iteration for projection weight design 1 2 3 4 T where S denotes the product matrix S = V̄ V̄ . After a few manipulations, it can be shown that (opt*) is equivalent to the following problem maximize F ⊙ (ŵ ⊗ ŵ ⊗ ŵ ⊗ ŵ) subject to kŵk2 = 1, ŵ 5 6 (opt**) 7 where ⊙ denotes the element-wise product. It has been studied in [13] that such a polynomial optimization is equivalent to finding the largest Z-eigenvalue of F , if F is super-symmetric. From the definition in [13], a super-symmetric tensor is one whose entries are invariant to any permutation to the index, i.e. Fi,j,k,l = ... = Fl,k,j,i , which fails for (39) as Fi,j,k,l 6= Fi,k,j,l . However, note that although F is not super symmetric, F ⊙ (ŵ ⊗ ŵ ⊗ ŵ ⊗ ŵ) is a one-dimensional polynomial which is invariant to any index permutations.2 Following this logic, we rewrite the objective function in (opt**) as follows. Proposition 5.4: Given the fourth-order tensor F specified by (39), the polynomial F ⊙ (ŵ ⊗ ŵ ⊗ ŵ ⊗ ŵ) is identical to 8 9 10 11 12 13 Input : Φκ , Q, V̄ , I, ρ and δ Partition Φκ[Ii ,Ii ] , QIi ,Ii and V̄Ii based on I; for i = 1, ..., r do Find F s corresponding to Ii by Proposition 5.4; Initialization: Compute the dominant eigenvector of F s as v̄(F s ), then choose the initial vector v 0 as v 0 = v̄(unvec(v̄(F s ))); k = 1; k k T ) F s (v k ⊗v k ) while (vk−1(v⊗v⊗v k−1 )T F s (v k−1 ⊗v k−1 ) − 1 > δ or within maximum iterations do v k = unvec(F s (v k−1 ⊗ v k−1 ))v k−1 ; k v k = kvvk k2 ; k = k + 1; end ŵIi = v k ; end Construct w and then P by (34); Output: P C. Optimizing (RL-2) with respect to both I and w The designs proposed in Section IV and this section can be combined to optimize (RL-2) as a function of both I and F ⊙ (ŵ ⊗ ŵ ⊗ ŵ ⊗ ŵ) = (ŵ ⊗ ŵ) F (ŵ ⊗ ŵ), w iteratively. In this case, one would start with an arbitrarily chosen w, and minimize ξκ with respect to I using Algorithm where F s is a super-symmetric tensor specified by 1. Say, the optimal cluster set is given as I ∗ . Thereafter, 1 s one would fix I to I ∗ , and minimize ξ with respect to w Fi,j,k,l = (Φκ[i,j] Φκ[k,l] + Φκ[i,k] Φκ[j,l] + Φκ[i,l] Φκ[j,k] )+ 3 using Theorem 5.1 or Algorithm 2 depending on whether 1 ρ(Qi,j Sk,l +Qi,k Sj,l +Qi,l Sj,k +Qj,k Si,l +Qj,l Si,k +Qk,l Si,j ) (1) is stable, and so on. The resulting algorithm is shown in 6 Algorithm 3. 2 2 for i, j, k, l = 1, ..., n, and F s ∈ Rn ×n , the matrix unfolding of F s , can be obtained from VI. N UMERICAL E XAMPLES s s s Fn(i−1)+k,n(j−1)+l = Fi,j,k,l , T s i, j, k, l = 1, ..., n. 2 This is analogous to an unsymmetric matrix whose quadratic form is inT variant to the transpose operation, i.e. z T F 2+F z = z T F z = z T F T z ∈ R. To verify our proposed algorithms, we use a consensus network model defined over a 500-node graph G500 . The graph is randomly generated with 0.5 overall probability for edge attachment, and 6 spatial clusters with a proportion 11 (a) Clusters by coherency clustering (b) Clusters by H2 open-loop clustering (c) Clusters by H2 closed-loop clustering with Q1 (d) Clusters by H2 closed-loop clustering with Q2 Figure 4: Clustering of the 500-node network with r = 6 clusters. Nodes assigned to the same cluster are marked by the same color in one figure. Note that only the node identities are comparable between figures, but not the cluster identities. Table I: Input specifications for Algorithm 1 Algorithm 3: Iterative algorithm for finding P Input : A, B, Bd , Q, R and r 1 2 by Definition 3.6; 1 Compute Φκ 0 0 0 2 Choose w = 1n , and compute W = diag(w ) and the Algorithm H2 closed-loop clustering H2 open-loop clustering [16] Coherency clustering [3] 1 3 4 5 6 7 8 k-means input Ψ0 = (W 0 )−1 Φκ2 ; k = 1; while I k−1 6= I k or within maximum iterations do Solve I k from Algorithm 1 by (Ψk−1 , wk−1 , r) ; Update wk from Theorem 5.1 or Algorithm 2 by I k ; k =k+1 ; end Output: P of 100 for the number of edges within clusters versus the number of edges across clusters. We also apply a random weight 1 ≤ Mi,i ≤ 2 on each node. The resulting state matrix A follows the expression (40) presented in Appendix A. The disturbance is assumed to enter from the 364th node, i.e. Bd equals to the 364th column of I500 . We assume B = R = I500 and two choices of Q as: a scaled identity matrix Q1 = 1000 × I500 , and Q2 = [L(G500 )]2 , which is the square of the unweighted Laplacian matrix of G500 . Both Q1 and Q2 satisfy Assumption 2.1. For this simulation example, solvability of (8) and stability of ĝ(s) are guaranteed by Theorem A.2 and Theorem A.5 in Appendix A, respectively. Data Φ Φo a Φc b Weight w w 1n Number of Clusters r r r 1 T Let vcT be the complement of v̄T , and then Φo := Φo2 Φo2 = R T T T vc [ 0∞ e(vc Avc )τ vcT Bd BdT vc e(vc A vc )τ dτ ]vcT . b Let the eigenvalues of −L(G) be 0 = λ > λ ≥ ... ≥ λ , Ψ = n c 1 2 [v1 , ..., vr ] where vi is the right eigenvector of λi . a A. Cluster Design We start by finding the closed-loop clustering set I with respect to a fixed weight w = v̄ = v̄(A) with r = 6. For comparison, we also apply two other popular clustering algorithms, namely, H2 open-loop clustering proposed in [16], and coherency-based clustering proposed in [3]. Both of these clustering algorithms can be transformed into Algorithm 1, with their equivalent inputs as summarized in Table I. Note that these two algorithms capture only the open-loop characteristics of the network, and hence do not depend on the choice of Q and R. Fig. 4a shows that the clusters identified by coherency based clustering closely resemble the spatial clusters of the open-loop network except for a few discrepancies. For example, two distant groups of nodes are assigned to the same cluster shown in yellow. These discrepancies arise from the fact that the spatial clusters are only based on the edge-weights (that model geographical distance between two 12 0.45 0.35 Closed−loop clustering Open−loop clustering Coherency clustering 0.4 Closed−loop clustering Open−loop clustering Coherency clustering 0.3 0.35 0.25 kg(s)−ĝ(s)k H2 kg(s)k H2 kg(s)−ĝ(s)k H2 kg(s)k H2 0.3 0.25 0.2 0.2 0.15 0.15 0.1 0.1 0.05 0.05 0 0 100 200 300 400 0 0 500 100 r: number of clusters (a) Design with Q1 300 400 500 (b) Design with Q2 kg(s)−ĝ(s)kH2 kg(s)kH2 nodes), while coherent clusters are decided by both edgeweights and node-weights. The H2 open-loop clusters are shown in Fig. 4b. As such, they do not follow any definite pattern with respect to the spatial clusters as they are based on node aggregation following from the H2 -norm distance of their output responses. Figures 4c and 4d, on the other hand, show the clusters identified by our H2 closed-loop algorithm (Algorithm 1) for Q = Q1 and Q = Q2 , respectively. Both of these clusters are different from each other for obvious reasons. They are also different from the spatial clusters, the coherent clusters as well as the H2 open-loop clusters as Algorithm 1 is related to the closed-loop controllability subspace. We also illustrate the effectiveness of H2 closed-loop clustering with respect to the number of clusters r. As evident from the design, the error between the transfer matrices in (11) and (12) will be minimal when r = n, and will degrade with decreasing r while improving tractability of the design. kg(s)−ĝ(s)k We vary r from 1 to 500, and calculate the ratio kg(s)kH H2 2 resulting from the three clustering algorithms. The results are shown in Fig. 5. For both Q1 and Q2 the closed-loop clustering outperforms the other two methods in approaching the H2 performance of g(s). Therefore, even for very small values of r, the projected controller achieves significantly close H2 performance as the full-order LQR controller. In terms of implementation, the projected controller needs far less number of communication links than a full-order standard LQR as well as a full-order L1 sparsity-promoting LQR [14]. For  example, for this system a standard LQR would require 500 = 124750 2 links. Meanwhile as shown in Fig. 6, a sparsity promoting LQR requires from 3104 to as many as 21325 links to retain a performance loss under 5%. By choosing r ≤ 9, the similar performance loss can be maintained by our design using at most 536 links. It is also noted that the H2 closed-loop clusters do not need to strictly follow the spatial geometric clustering of the network. For example, in both Figures (4c) and (4d), a cluster can be one single node as shown by the red, or can be scattered over the network such as yellow. In practice, this means that to implement the proposed control law, nodes from with respect to the number of clusters 0.05 Sparsity-promoting LQR Reduced-order LQR 0.04 kg(s)−ĝ(s)kH2 kg(s)kH2 Figure 5: Performance loss 200 r: number of clusters 0.03 0.02 0.01 0 506 515 528 536 3104 11661 11989 15003 21325 Number of communication links Figure 6: Projected LQR controller from clustering vs. LQR controller from sparsity-promoting algorithm with Q1 . different geographical locations may need to be part of the same cluster for the closed-loop model, i.e., nodes that belong to two different spatial clusters in open-loop may need to collaborate and send their states to a common coordinator. The assignment, therefore, encourages system-wide participation from nodes at various corners of G500 for implementing the controller. B. Weight Design We next apply Algorithm 2 on G500 to find the optimal projection weight w while fixing the clusters to those obtained from coherency. These clusters as previously shown in Fig. 4a closely resemble the spatial clusters, and their clustering sets are given by I1 = {1, ..., 167}, I2 = {168, ..., 178}, I3 = {179, ..., 344}, I4 = {345, ..., 379}, I5 = {380, ..., 463} and I6 = {464, ..., 500}. After running the algorithm with both Q1 and Q2 , we plot the two weight vectors compared with v̄ = v̄(A) in Fig. 7. It can be seen that the weight vectors from Q1 and Q2 are very different than v̄ or between themselves. On the other hand, both of these weights at the 364th node, i.e., the node where the disturbance enters, show a sudden jump in magnitude from the rest of the nodes. To verify the closed-loop performance, we construct the P matrices using these two vectors, and summarize the error ratios with some design parameters in Table II. As expected, by applying the weight design, the closed-loop errors as shown in Table II are significantly reduced from w = v̄. Despite the fact that these 13 Table II: Results of weight design Case Penalty factor ρ Q1 2 0.011 v̄T Qv̄ Q2 2 0.007 v̄kΦk T Qv̄ Relative error kg(s) − ĝ(s)kH2 /kg(s)kH2 with w = v̄ with w from Algorithm 2 29.14% 7.35% kΦk 35.69% 21.79% 1 The convergence threshold for power iteration is chosen as δ = 0.05. is included in the penalty factor to normalize the two objective functions in (opt*) to the same scale. 2 kΦk2 v̄ T Qv̄ Table III. The table verifies the O(n3 ) complexity for fullorder LQR vs. the O(n2 r) complexity for reduced-order LQR. When n = 8000, the full-order LQR is already beyond the capability of our computation facility. The reduced-order LQR design, however, requires remarkably less computation time, while still providing a close performance match to the fullorder LQR controller. Table III: Scalability Results   w from Q1 w from Q2 v̄  n Node 364 1000 2000 4000 6000 8000 10000      Computation time Full-order Reduced-order 16.34 sec 0.79 sec 134.91 sec 2.64 sec 20.36 min 11.61 sec 71.06 min 24.73 sec Out of memory 48.39 sec Out of memory 75.90 sec Perf. loss kg(s)−ĝ(s)kH2 kg(s)kH2 3.74% 1.06% 0.25% 0.13% -  VII. C ONCLUSION ï Cluster 1 ï    Cluster 2    Cluster 3    Cluster 4 Cluster 5 Cluster 6     Figure 7: Weight designs from Q1 and Q2 two errors are much larger than what we get from closedloop clustering (which yields an error of 0.68%), the weight design still grants us with significant improvement over the hard constraint on I. Finally, we compare the closed-loop performance of the iterative Algorithm 3 (where both w and I are free) with Algorithm 1 in Fig. 8. The comparison is shown for Q1 and only r ≤ 6 as the error ratio already becomes under 1% after r = 6. For this example, it is worth mentioning that Algorithm 3 turns out to be surprisingly efficient as it converges right after the first iteration. In this sense, the iterative process reduces to a single weight design after the clustering. Fig. 8 verifies that Algorithm 3 achieves better matching between g(s) and ĝ(s) than Algorithm 1. C. Scalability Results To verify the scalability of Algorithm 1, we increase the size of the network, and compare the computation time with that of solving a full-order LQR controller. We let r = 5 1 and κ = 5 for computing Φκ2 , and present the results in 0.25 v̄ w 0.2 In this paper we developed a set of projection-based algorithms that improve the dynamic response of large-scale network systems with reduced-order LQR controllers. The advantage of these reduced-order controllers is that they are structured, and significantly easier to design and implement compared to regular full-order LQR controllers. Our future work will be to address the robustness of this approach to communication delays, to exploit additional input-output properties such as passivity to further improve performance, and to inspect the influence of network heterogeneity on clustering. A PPENDIX A: S PECIAL C ASE The well-posedness conditions from Section III.A can be relaxed if system (1) is a consensus network. Consensus is commonly used to model the dynamic behavior of many practical networks such as social networks, power networks, and wireless networks. For the same network graph G = (V, E) as in (1), we suppose n = ns . Each node has a real-valued node-weight mi > 0, and each edge ij ∈ E has a real-valued edge-weight aij = aji > 0. A consensus network can then be modeled in its simplest form by letting Aij = m−1 i aij and −1 P a in (2). The overall system writes as Aii = − mi ij j∈Ni ẋM (t) = M −1 L(G)xM (t) + BM u(t) + BdM d(t), where L(G) is the edge-weighted graph Laplacian matrix, and M = diag([m1 , ..., mn ]) is the matrix of node weights. For ease of analysis, let us consider a coordinate transformation 1 x = M 2 xM , in which case the state matrices in (1) become 1 kg(s)−ĝ(s)k H2 kg(s)k H2 C ONSENSUS N ETWORK 1 1 1 A = M − 2 L(G)M − 2 , B = M 2 BM , Bd = M 2 BdM . (40) 0.15 Notice that A here is a negative-semidefinite matrix, with only 1 one zero eigenvalue at Av̄(A) = 0, v̄(A) = √ 1 M 2 1n , 0.1 tr(M) 0.05 0 OF 2 3 4 r: number of clusters 5 Figure 8: Performance loss by weight refinement 6 which we will simply denote as v̄. The state matrix à from the reduced-order system (6) satisfies the following property. Proposition A.1: à is negative-semidefinite (or -definite) if w ∈ span(v̄) (or w 6∈ span(v̄)). 14 Proof: Denote the complement of the projection matrix P by U , such that D = [P T U T ]T is unitary, i.e. DDT = In . Then, à = P AP T is a leading principal of the matrix   P AP T P AU T T DAD = , U AP T U AU T which is similar to A. Given the leading principal of a symmetric positive-definite (or-semidefinite) matrix still being positive-definite (or-semidefinite), it follows that à  0. Moreover, from Definition 2.2, P is defined over w such that P T P w = w. Then if w ∈ span(v̄), à preserves the zero eigenvalue from A since ÃP v̄ = P Av̄ = 0. Therefore, à is negative-semidefinite if w ∈ span(v̄), or negative-definite otherwise. 1) Existence Condition: The next theorem shows that the existence of X̃ for the reduced-order ARE (8) is guaranteed for any w and I, and matrices Q̃ = P QP T and G̃ = P GP T . 1 T Theorem A.2: If (Q 2 , A) is detectable and (A, G 2 ) is stabilizable, then (8) is guaranteed with a unique stabilizing solution X̃ = X̃ T  0. Proof: For Q  0 and G  0, similar to à in the proof of Proposition A.1, we have both Q̃  0 and G̃  0. Recall T that (Q̃ 2 , Ã) is detectable if and only if for all λ and v that T Ãv = λv and λ ≥ 0, Q̃ 2 v 6= 0. If w ∈ span(v̄), à  0 has only one zero eigenvalue, with the corresponding eigenvector P v̄. Under this situation, v̄ T P T Q̃P v̄ = v̄ T Qv̄ 6= 0 since T (Q 2 , A) is detectable. If w 6∈ span(v̄), à is negative-definite, T which means (Q̃ 2 , Ã) is trivially detectable. The same rational 1 applies to showing stabilizability of (Ã, G̃ 2 ). Therefore, both stabilizability and detectability are satisfied, and thus (8) guarantees a unique positive-semidefinite solution. 2) Bound of ARE solution: The following lemma provides a specific value for β(A, G, Q) in Lemma 3.1. Lemma A.3: The bound λ̄(X) ≤ β(A, G, Q) holds for β(A, G, Q) = σ̄(Q + G) . 2σ(G − A) (41) Proof: The expression for β(A, G, Q) above can be T simply obtained by letting Kt = −G 2 , Dt = In and F = 2G − 2A ≻ 0 in Lemma 3.1. Note that the value specified by this Lemma only involves finding two extreme singular values, which can be computed very efficiently by Lanczos algorithm in O(n) complexity. 3) Stability condition: We next state two sufficient conditions that guarantee the stability of ĝ(s) for consensus networks. Theorem A.4: The system ĝ(s) is stable if w = v̄, and I is an almost equitable partition [25] of the graph G, which means for k 6= l, the edge weight aij is equal for all i ∈ Ik and j ∈ Il . Proof: A similarity transformation of D = [P T U T ]T and DT on A − GX̂ yields   à − G̃X̃ P AU T . (42) D(A − GX̂)DT = U AP T − U GP T X̃ U AU T From [25], if G admits an almost equitable partition I, the corresponding matrix P with w = v̄ will satisfy AT P T = P T N for some N ∈ Rr×r . As a result, P AU T = 0, and thus ĝ(s) is stable since à − G̃X̃ and U AU T are both Hurwitz given w = v̄. Theorem A.5: Assume that B is a square invertible matrix. Then, ĝ(s) is stable if G is similar to αIn for some α > 0. Proof: Denote the right eigenspace of G by V . If G is similar to αIn , it follows that V T (GX̂ + X̂G)V = 2αV T X̂V . This means that GX̂ + X̂G is positive-semidefinite. From the matrix majorization property [26], we also have 2λ̄(A − GX̂) ≤ z T (A + AT − GX̂ − X̂G)z hold for any non-zero vector z, with the RHS being nonpositive given A + AT  0 and −GX̂ − X̂G  0. Hence for λ̄(A − GX̂) to be strictly negative, z T Az = 0 should contradict z T GX̂z = 0. To prove the contradiction, we assume z T Az = 0, namely z ∈ span(v̄). Note that z T GX̂z = 0 holds if and only if either one of the following three conditions is satisfied: (1) z ∈ ker(P ), (2) z ∈ ker(G), or (3) P z ∈ ker(X̃). First of all, Assumption 3.2 requires wITi v̄Ii , i = 1, ..., r, which means P v̄ 6= 0 and thus z 6∈ ker(P ). 1 Given that (A, BR− 2 ) is stabilizable, we have v̄ T Gv̄ 6= 0, i.e. z 6∈ ker(G). To this end, the last condition remaining is z ∈ span(v̄) 6⇔ P z ∈ ker(X̃) to complete the contradiction. By assuming a non-zero vector v ∈ ker(X̃), pre- and postmultiplying (8) with v yields v T ÃT X̃v + v T X̃ Ãv + v T Q̃v − v T X̃ G̃X̃v = 0. It can be easily verified that ker(X̃) is an Ã-invariant subspace contained in the null-space of Q̃. Given z ∈ span(v̄), from the proof of Proposition A.1 we know that P z is Ã-invariant, i.e., P z is an eigenvector of Ã, when w ∈ span(v̄). As a T result, z T P T Q̃P z = z T Qz 6= 0 since (Q 2 , A) is detectable. This verifies that P z 6∈ ker(Q̃), which proves P z 6∈ ker(X̃). Therefore, we conclude that z T Az = 0 contradicts z T (GX̂ + X̂G)z = 0, and thus ĝ(s) is stable. A PPENDIX B: P ROOFS A. Proof of Theorem 3.3 Consider a Lyapunov function V (x) = xT Xx > 0, where X ≻ 0 is the solution of ARE (4). For ĝ(s) to be asymptotically stable, V̇ (x) needs to be negative, or equivalently (A − GX̂)T X + X(A − GX̂) ≺ 0. Using the ARE (4), the LMI above reduces to Q ≻ XGE + EGX − XGX, which holds if λ(Q) > λ̄(XGE + EGX − XGX). Notice that the RHS of the eigenvalue inequality follows λ̄(XGE +EGX −XGX) ≤ λ̄(XGE +EGX)+ λ̄(−XGX), where we have respectively λ̄(XGE + EGX) ≤ σ̄(XGE + EGX) ≤ 2σ̄(XGE) ≤ 2σ̄(X)σ̄(G)σ̄(E), and −λ̄(−XGX) = σ(XGX) ≥ σ(X)2 σ(G). Incorporating these two upper bounds yields the condition in (17). 15 B. Proof of Lemma 3.4 From Lemma 3.1, the ARE solution X is bounded by σ̄(X) = λ̄(X) ≤ β(A, G, Q). Note that (17) is satisfied if σ(Q) > 2σ̄(X)σ̄(G)σ̄(E), (43) The eigenvalues of B ⊗ A are counted by λi (A)λj (B) with i, j = 1, ...n, and according to the Weyl’s inequality of eigenvalues [26], we have the lower bound for σ 2 (L) as σ 2 (L) ≥ λ(AAT ) + λ(B T B) + 2λ(B ⊗ A) = σ 2 (A) + σ 2 (B) + 2λ̄(A)λ̄(B) ≥ σ 2 (B). where the RHS is further bounded by 2σ̄(X)σ̄(G)σ̄(E) ≤ 2β(A, G, Q)σ̄(G)[β(A, G, Q)+σ̄(X̃)]. (44) Therefore, (43), and then (17) will hold if σ(Q) is greater than the RHS of (44), which yields (18) in Lemma 3.4. Combining (52) with (53) then yields the following bound where ǫ1 = T The bound in (23) is derived assuming the worst case from (14), where Q̃=P QP T +αIr and G̃=P QP T +αIr for α > 0. We divide the proof into three steps. 1) : We derive an analytical expression for E by recovering the reduced-order ARE (8) to the full dimension as P T (ÃT X̃ + X̃ à + Q̃ − X̃ G̃X̃)P = 0. (45) AT X̂ + X̂A + Q − X̂GX̂ = R, (47) with the residue of the approximate ARE denoted by T T T R := αX̂ + U U A X̂ + X̂AU U + Q − P Q̃P. (48) By subtracting (4) from (47), we get the Sylvester equation (A − GX̂)T E + E(A − GX) = −R. (49) From (49), we are able to explicitly write E as a function of A − GX, A − GX̂ and R, and hence obtain an initial bound 1 for kEΦ 2 kF in the next step. T 1 2) : Pre- and post-multiplying (49) with Φ 2 and Φ 2 respectively, the Sylvester equation takes the form T T 1 1 A1 Φ 2 EΦ 2 + Φ 2 EΦ 2 B1 = −Φ 2 RΦ 2 , T (50) T where we use the notations A1 = Φ 2 (A − GX̂)T Φ− 2 and 1 1 B1 = Φ− 2 (A−GX)Φ 2 for brevity. It can be easily shown that λ(A1 ) < 0 and λ(B1 ) < 0, which implies λi (A) + λj (B) 6= 0 for any i, j = 1, ..., n so that (50) is solvable. Therefore, the 1 weighted error EΦ 2 can be expressed as T 1 T 1 EΦ 2 = Φ− 2 · unvec[L−1 · vec(−Φ 2 RΦ 2 )], (51) where L = In ⊗ A + B T ⊗ In is an n2 × n2 matrix. Since the Frobenius norm is unitary invariant, taking norm on both 1 sides of (51) provides an upper bound on kEΦ 2 kF as 1 T 1 1 ] (54) > 0 is independent of P . In T 1 T 1 T 1 T 1 kEΦ 2 kF ≤ σ̄(L−1 )σ̄(Φ− 2 )kΦ 2 RΦ 2 kF . Note that σ̄(L−1 ) follows σ̄(L−1 ) = calculated by σ 2 (L) = λ(LLT ) with 1 σ(L) , (52) where σ(L) is LLT = In ⊗ AAT + B T B ⊗ In + B T ⊗ AT + B ⊗ A. 1 T 1 + Φ 2 (QU T U + U T U Q − U T U QU T U − αP T P )Φ 2 , (55) contains the inexplicit functional X̂. We then bypass this term in the final step. 3) : Taking norm on both sides of (55), and then isolating the norm of X̂, we can form the bound 1 1 1 + σ̄(Q)ξ 2 + ασ̄(Φ)[σ̄ 2 (X̂) + 1], (46) where U is the complement of P . Thereby substituting ÃP and P T ÃT in terms of (46), and after a few calculations, (45) yields the approximated ARE (for details, please see [30]) 1 1 σ̄(Φ− 2 ) 1 −1 σ[Φ 2 (A−GX)Φ 2 Φ 2 RΦ 2 = αΦ 2 X̂ 2 Φ 2 + Φ 2 U T U AT X̂Φ 2 + Φ 2 X̂AU T U Φ 2 T ÃP = P A − P AU T U, T 1 kΦ 2 RΦ 2 kF ≤2[σ̄(A)σ̄(Φ 2 )σ̄(X̂) + σ̄(QΦ 2 )]ξ Notice that A and à are related by T T 1 kEΦ 2 kF ≤ ǫ1 kΦ 2 RΦ 2 kF , (54), the norm of the weighted residue Φ 2 RΦ 2 , written by C. Proof of Theorem 3.5 2 (53) (56) 1 2 with ξ = kU T U Φ kF . Recall that σ̄(X̂) = σ̄(P T X̃P ) = σ̄(X̃), where X̃ is the solution of the reduced-order ARE (8). The norm σ̄(X̃) can be further bounded by β(Ã, G̃, Q̃) through Lemma 3.1. Theorem 3.5, therefore, follows from (54), (56) and σ̄(X̃) ≤ β(Ã, G̃, Q̃) ≤ supP β(Ã, G̃, Q̃). D. Proof of Lemma 3.7 To prove the error bound (28), we define a matrix Φ̄ as   Φ̄ = Φ̄1 · · · Φ̄nb , (57) 1 where Φ̄i = Y diag(Y −1 bi )C 2 , i = 1, ..., nb and bi is the ith 1 T column of Bd . The matrix Φ̄ satisfies Φ = Φ̄Φ̄T = Φ 2 Φ 2 . Besides Y1 and Ω1 defined in Definition 3.6, we further denote −1 Y2 = Y:,κ+1,n and Ω2 = Yκ+1:n,: , and partition the Cholesky 1 Decomposition C 2 as # " 1 # " 1 2 2 1 0 0 C1:κ,1:κ C1,1 2 = . C = 1 1 1 1 2 2 2 2 C2,1 Cκ+1:n,1:κ C2,2 Cκ+1:n,κ+1:n With these notations, Φ̄i in (57) h can be decomposed i into 1 2 Φ̄i = Φ̄i,s + Φ̄i,f , where Φ̄i,s = Y1 diag(Ω1 bi )C1,1 0 and h i 1 1 2 2 Φ̄i,f = Y2 diag(Ω2 bi )C2,1 , and thus Φκ Y2 diag(Ω2 bi )C2,2 Pnb can be rewritten as Φκ = i=1 Φ̄i,s Φ̄Ti,s . Notice that ξ = 1 k(In − P T P )Φ 2 kF = k(In − P T P )Φ̄kF satisfies 1 ξκ∗ ≤ ξ ≤ k(In − P T P )Φκ2 kF + k(In − P T P )Φ̄f kF , (58)   where Φ̄f = Φ̄1,f · · · Φ̄nb ,f . The second norm on the RHS of (58) is further bounded by k(In − P T P )Φ̄f kF ≤ kΦ̄f kF with v v u nb u n X u X 1 1 u 1 2 2 2 2 t 2 − −. kΦ̄f kF ≤ η (kC2,1 kF + kC2,2 kF ) = tη 2 nb 2λ i i=κ+1 i=1 Inserting this along with P = argminP ξκ to the RHS of (58) yields the error bound (28). 16 E. Proof of Lemma 5.3 Denote ni = |Ii |c , i = 1, ..., r, the objective function fV̄ in (opt2) can be expanded as fV̄ = tr(V̄ T P T P QP T P V̄ ) = (w ∗ w)T (Q ∗ V̄ V̄ T )(w ∗ w) where ∗ is the Khatri-Rao product defined by QI1 ,I1 ⊗ V̄I1 ,: V̄IT1 ,:  .. Q ∗ V̄ V̄ T =  . QIr ,I1 ⊗ V̄Ir ,: V̄IT1 ,:   w ∗ w = wIT1 ⊗ wIT1 ··· .. . ··· ···  QI1 ,Ir ⊗ V̄I1 ,: V̄ITr ,:  .. , . QIr ,Ir ⊗ V̄Ir ,: V̄ITr ,: wITr ⊗ wITr T . Denote the block-diagonal submatrix of Q by Qd , i.e. Qd = diag(QI1 ,I1 , · · · , QIr ,Ir ), and the off-diagonal by Qo = Q − Qd . Therefore, we can find the difference between objective functions of (opt3) and (opt*) as (w∗w)T (ρQo ∗ V̄ V̄ T )(w∗w). According to the Gershgorin circle theorem, the eigenvalues of ρQo ∗ V̄ V̄ T are all bounded inside the range of (−kρQo ∗ V̄ V̄ T k1 , kρQo ∗V̄ V̄ T k1 ). Therefore, the theorem follows when Je = kρQo ∗ V̄ V̄ T k1 . R EFERENCES [1] D. D. Siljak, Decentralized Control of Complex Systems, Courier Corporation, 2011. [2] P. Kokotovic, H. K. Khalil, and J. O’reilly, Singular Perturbation Methods in Control: Analysis and Design, SIAM, 1999. [3] J. Chow and P. Kokotovic, “Time Scale Modeling of Sparse Dynamic Networks,” IEEE Transactions on Automatic Control, vol. 30(8), pp. 714-722, 1985. [4] B. Moore, “Principal Component Analysis in Linear Systems: Controllability, Observability, and Model Reduction,” IEEE Transactions on Automatic Control, vol. 26(1), pp. 17-32, 1981. [5] G. Obinata and B. D. Anderson, Model Reduction for Control System Design, Springer Science & Business Media, 2012. [6] A. C. Antoulas, Approximation of Large-Scale Dynamical Systems, SIAM, 2005. [7] K. Zhou and J. C. Doyle, Essentials of Robust Control, vol. 180, Prentice Hall Upper Saddle River, NJ, 1998. [8] A. M. Boker, T. R. Nudell, and A. Chakrabortty, “On Aggregate Control of Clustered Consensus Networks,” 2015 American Control Conference (ACC), pp. 5527-5532, Chicago, IL, USA, 2015. [9] S. Hara, J. I. Imura, K. Tsumura, T. Ishizaki, and T. Sadamoto, “Glocal (Global/Local) Control Synthesis for Hierarchical Networked Systems,” 2015 IEEE Conference on Control Applications (CCA), pp. 107-112, Sydney, NSW, 2015. [10] T. Sadamoto, T. Ishizaki, and J. I. Imura, “Hierarchical Distributed Control for Networked Linear Systems,” 53rd IEEE Conference on Decision and Control, pp. 2447-2452, 2014. [11] D. Madjidian and L. Mirkin, “Distributed Control with Low-Rank Coordination,” IEEE Transactions on Control of Network Systems, vol. 1(1), pp. 53-63, March 2014. [12] S. Lloyd, “Least Squares Quantization in PCM,” IEEE Transactions on Information Theory, vol. 28(2), pp. 129-137, Mar 1982. [13] L. Qi, F. Wang, and Y. Wang, “Z-Eigenvalue Methods for a Global Polynomial Optimization Problem,” Mathematical Programming, vol. 118, pp. 301-316, 2009. [14] F. Lin, M. Fardad, and M. R. Jovanovic, “Design of Optimal Sparse Feedback Gains via the Alternating Direction Method of Multipliers,” IEEE Transactions on Automatic Control, vol. 58(9), pp. 2426-2431, Sep 2013. [15] N. Monshizadeh, H. L. Trentelman, and M. K. Camlibel, “ProjectionBased Model Reduction of Multi-Agent Systems using Graph Partitions,” IEEE Transactions on Control of Network Systems, vol. 1(2), pp. 145-154, Jun 2014. [16] T. Ishizaki, K. Kashima, A. Girard, J. Imura, L. Chen, and K. Aihara, “Clustered Model Reduction of Positive Directed Networks,” Automatica, vol. 59, pp. 238-247, 2015. [17] P. Benner and Z. Bujanovi, “On the Solution of Large-Scale Algebraic Riccati Equations by Using Low-Dimensional Invariant Subspaces,” Linear Algebra and its Applications, vol. 488, pp. 430-459, 2016. [18] M. Rotkowitz and S. Lall, “A Characterization of Convex Problems in Decentralized Control,” IEEE Transactions on Automatic Control, vol. 51(2), pp. 274-286, Feb. 2006. [19] X. Wu and M. R. Jovanovic, “Augmented Lagrangian Approach to Design of Structured Optimal State Feedback Gains,” IEEE Transactions on Automatic Control, vol. 56, pp. 2923-2929, Dec 2011. [20] S. Fattahi, G. Fazelnia and J. Lavaei, “Transformation of Optimal Centralized Controllers into Near-Global Static Distributed Controllers,” 53rd IEEE Conference on Decision and Control, pp. 4915-4922, 2015. [21] Y. S. Wang, N. Matni, and J. C. Doyle, “Localized LQR Optimal Control,” 53rd IEEE Conference on Decision and Control, pp. 16611668, 2014. [22] Y. S. Wang and N. Matni, “Localized LQG Optimal Control for LargeScale Systems,” 2016 American Control Conference (ACC), pp. 19541961, Boston, MA, USA, 2016. [23] N. Xue and A. Chakrabortty, “H2 -Clustering of Closed-Loop Consensus Networks under Generalized LQR Designs,” 55th IEEE Conference on Decision and Control, pp. 5116-5121, Las Vegas, NV, Dec 2016. [24] A. Helmy, “Architectural Framework for Large-Scale Multicast in Mobile Ad Hoc Networks,” IEEE International Conference on Communications, pp. 2036-2042, vol.4, 2002. [25] D. M. Cardoso, C. Delorme, and P. Rama, “Laplacian Eigenvectors and Eigenvalues and Almost Equitable Partitions,” European Journal of Combinatorics, vol. 28, pp. 665-673, 2007. [26] J. N. Franklin, Matrix Theory, Courier Corporation, 2012. [27] R. Davies, P. Shi, and R. Wiltshire, “New Lower Solution Bounds of the Continuous Algebraic Riccati Matrix Equation,” Linear Algebra and Its Applications, vol. 427(2-3), pp. 242-255, 2007. [28] G. H. Golub and C. F. Van Loan, Matrix Computations, JHU Press, vol. 3, 2012. [29] M. S. Traiantafyllou and F. S. Hover, Maneuvering and Control of Marine Vehicles, Cambridge, MA, 2002. [30] J. Sun, “Perturbation Theory for Algebraic Riccati Equations,” SIAM Journal on Matrix Analysis and Applications, vol. 19, pp. 39-65, 1998. [31] E. Kofidis and P. A. Regalia, “On the Best Rank-1 Approximation of Higher-Order Supersymmetric Tensors,” SIAM Journal on Matrix Analysis and Applications, vol. 23, pp. 863-884, 2002. Nan Xue (S’15) received his B.E. degree in Electrical Engineering from Xi’an Jiaotong University, China in 2013. He is currently pursuing his PhD degree in Electrical Engineering at North Carolina State University, Raleigh, NC. His research interests include analysis, control and model reduction of large-scale networked dynamic systems and power systems. Aranya Chakrabortty (M’08, SM’15) received his PhD degree in Electrical Engineering from Rensselaer Polytechnic Institute, Troy, NY in 2008. From 2008 to 2009 he was a postdoctoral research associate at the Aeronautics and Astronautics department of University of Washington, Seattle. He is currently an Associate Professor in the Electrical and Computer Engineering department of North Carolina State University, Raleigh, NC, where he is also affiliated to the FREEDM Systems Center. His research interests are in all branches of control theory with applications to power systems, especially in wide-area monitoring and control of large power systems using Synchrophasors. He received the NSF CAREER award in 2011.
3cs.SY
1 Diagnose like a Radiologist: Attention Guided Convolutional Neural Network for Thorax Disease Classification arXiv:1801.09927v1 [cs.CV] 30 Jan 2018 Qingji Guan, Yaping Huang, Zhun Zhong, Zhedong Zheng, Liang Zheng and Yi Yang Abstract—This paper considers the task of thorax disease classification on chest X-ray images. Existing methods generally use the global image as input for network learning. Such a strategy is limited in two aspects. 1) A thorax disease usually happens in (small) localized areas which are disease specific. Training CNNs using global image may be affected by the (excessive) irrelevant noisy areas. 2) Due to the poor alignment of some CXR images, the existence of irregular borders hinders the network performance. In this paper, we address the above problems by proposing a three-branch attention guided convolution neural network (AG-CNN). AG-CNN 1) learns from disease-specific regions to avoid noise and improve alignment, 2) also integrates a global branch to compensate the lost discriminative cues by local branch. Specifically, we first learn a global CNN branch using global images. Then, guided by the attention heat map generated from the global branch, we inference a mask to crop a discriminative region from the global image. The local region is used for training a local CNN branch. Lastly, we concatenate the last pooling layers of both the global and local branches for fine-tuning the fusion branch. The comprehensive experiment is conducted on the ChestX-ray14 dataset. We first report a strong global baseline producing an average AUC of 0.841 with ResNet50 as backbone. After combining the local cues with the global information, AG-CNN improves the average AUC to 0.868. While DenseNet-121 is used, the average AUC achieves 0.871, which is a new state of the art in the community. Index Terms—chest X-ray, convolutional neural network, thorax disease classification, visual attention I. I NTRODUCTION T HE chest X-ray (CXR) has been one of the most common radiological examinations in lung and heart disease diagnosis. Currently, reading CXRs mainly relies on professional knowledge and careful manual observation. Due to the complex pathologies and subtle texture changes of different lung lesion in images, radiologists may make mistakes even when they have experienced long-term clinical training and professional guidance. Therefore, it is of importance to develop the CXR image classification methods to support Q. Guan is with the Beijing Key Laboratory of Traffic Data Analysis and Mining, Beijing Jiaotong University, Beijing, 100044, China and Center for Artificial Intelligence, University of Technology Sydney, NSW, 2007, Australia (E-mail: [email protected]). Y. Huang is with the Beijing Key Laboratory of Traffic Data Analysis and Mining, Beijing Jiaotong University, Beijing, 100044, China (E-mail: [email protected]). Z. Zhong is with Cognitive Science Department, Xiamen University and Center for Artificial Intelligence, University of Technology Sydney, NSW, 2007, Australia (E-mail: [email protected]). Z. Zheng, L. Zheng, Y. Yang are with Center for Artificial Intelligence, University of Technology Sydney, NSW, 2007, Australia (E-mail: {zdzheng12, liangzheng06, yee.i.yang}@gmail.com). clinical practitioners. The noticeable progress in deep learning has benefited many trials in medical image analysis, such as lesion segmentation or detection [1], [2], [3], [4], [5], diseases classification [6], [7], [8], [9], noise induction [10], image annotation [11], [12], registration [13], regression [14] and so on. In this paper, we investigate the CXR classification task using deep learning. Several existing works on CXR classification typically employ the global image for training. For example, Wang et al. [9] evaluate four classic CNN architectures, i.e., AlexNet [15], VGGNet [16], GoogLeNet [17], ResNet [18], to tell the presence of multiple pathologies using a global CXR image. In addition, using the same network, the disease lesion areas are located in a weakly supervised manner. Viewing CXR classification as a multi-label recognition problem, Yao et al. [19] explore the correlation among the 14 pathologic labels with global images in ChestX-ray14 [9]. Using a variant of DenseNet [20] as an image encoder, they adopt the Long-short Term Memory Networks (LSTM) [21] to capture the dependencies. Kumar et al. [7] investigate that which loss function is more suitable for training CNNs from scratch and present a boosted cascaded CNN for global image classification. The recent effective method consists in CheXNet [8]. It fine-tunes a 121-layer DenseNet on the global chest X-ray images, which has a modified last fully-connected layer. However, the global learning strategy can be compromised by two problems. On the one hand, as shown in Fig. 1 (the first row), the lesion area can be very small (red bounding box) and position unpredictable (e.g. , “Atelectasis”) compared with the global image, so using the global image for classification may include a considerable level of noise outside the lesion area. This problem is rather different from generic image classification [22], [23] where the object of interest is usually positioned in the image center. Considering this fact, it is beneficial to induce the network to focus on the lesion regions when making predictions. On the other hand, due to the variations of capturing condition, e.g. , the posture of the patient and the small size of children body, the CXR images may undergo distortion or misalignment. Fig. 1 (the second row) presents a misalignment example. The irregular image borders may exist an non-negligible effect on the classification accuracy. Therefore, it is desirable to discover the salient lesion regions and thus alleviate the impact of such misalignment. To address the problems caused by merely relying on the global CXR image, this paper introduces a three-branch 2 our method achieves superior performance over the stateof-the-art approaches. II. R ELATED W ORKS (a) original global image (b) heatmap (c) cropped local image Fig. 1. Two training images from the ChestX-ray14 dataset. (a) The global images. (b) Heat maps extracted from a specific convolutional layer. (c) The cropped images from (a) guided by (b). In this paper, we consider both the original global image and the cropped local image for classification, so that 1) the noise contained in non-lesion area is less influencing, and 2) the misalignment can be reduced. Note that there are some differences between the global images and their heat maps. The reason is that the global images are randomly cropped from 256×255 to 224×224 during training. attention guided convolutional neural network (AG-CNN) to classify the lung or heart diseases. AG-CNN is featured in two aspects. First, it has a focus on the local lesion regions which are disease specific. Generally, such a strategy is particularly effective for diseases such as ”Nodule”, which has a small lesion region. In this manner, the impact of the noise in nondisease regions and misalignment can be alleviated. Second, AG-CNN has three branches, i.e., a global branch, a local branch and a fusion branch. While the local branch exhibits the attention mechanism, it may lead to information loss in cases where the lesion areas are distributed in the whole images, such as Pneumonia. Therefore, a global branch is needed to compensate for this error. We show that the global and local branches are complementary to each other and, once fused, yield favorable accuracy to the state of the art. The working mechanism of AG-CNN is similar to that of a radiologist. We first learn a global branch that takes the global image as input: a radiologist may first browse the whole CXR image. Then, we discover and crop a local lesion region and train a local branch: a radiologist will concentrate on the local lesion area after the overall browse. Finally, the global and local branches are fused to fine-tune the whole network: a radiologist will comprehensively consider the global and local information before making decisions. Our contributions are summarized as follows. • • • We propose an attention guided convolutional neural network (AG-CNN) which diagnoses thorax diseases by combining the global and local information. AG-CNN improves the recognition performance by correcting image alignment and reducing the impact of noise. We introduce a CNN training baseline, which produces competitive results to the state-of-the-art methods by itself. We present comprehensive experiment on the ChestXray14 dataset. The experiment results demonstrate that Chest X-ray datasets. The problem of Chest X-ray image classification has been extensively explored in the field of medical image analysis. Several datasets have been released in this context. For example, the JSRT dataset [24], [25] contains 247 chest X-ray images including 154 lung nodules. It also provides masks of the lung area for segmentation performance evaluation. The Shenzhen chest X-ray set [26] has a total of 662 images belonging to two categories (normal and tuberculosis (TB)). Among them, 326 are normal cases and 336 are cases with TB. The Montgomery County chest X-ray set (MC) [26] collects 138 frontal chest X-ray images from Montgomery Country’s Tuberculosis screen program, of which 80 are normal and 58 are cases with manifestations of TB. These three datasets are generally small for deep model training. In comparison, the Indiana University Chest X-ray Collection dataset [27] has of 3,955 radiology reports and the corresponding 7,470 chest X-ray images. It is publicly available through Open-I [28]. However, this dataset does not provide explicit disease class labels, so we do not use it in this paper. Recently, Wang et al. [9] released the ChestX-ray14 dataset, which is the largest chest X-ray dataset by far. ChestXray14 collects 112,120 frontal-view chest X-ray images of 30,805 unique patients. Each radiography is labeled with one or more types of 14 common thorax diseases. This dataset poses a multi-label classification problem and is large enough for deep learning, so we adopt this dataset for performance evaluation in this paper. Deep learning for chest X-ray image analysis. Recent surveys [29], [30], [31], [32] have demonstrated that deep learning technologies have been extensively applied to the field of chest X-ray image annotation [33], classification [6], [34], [8], [9], and detection (localization) [35], [36]. Islam et al. [34] explore different CNN architectures and find that a single CNN does not perform well across all abnormalities. Therefore, they leverage model ensemble to improve the classification accuracy, at the cost of increased training and testing time. Yao et al. [19] and Kumar et al. [7] classify the chest X-ray images by investigating the potential dependencies among the labels from the aspect of multi-label problems. Rajpurkar et al. [8] train a convolutional neural network to address the multi-label classification problem. This paper departs from the previous methods in that we make use of the attention mechanism and fuse the local and global information to improve the classification performance. Attention models in medical image analysis. The CXR classification problem needs to tell the relatively subtle differences between different diseases. Usually, a disease is often characterized by a lesion region, which contains critical dues for classification. Ypsilantis et al. [37] explore where to look in chest X-rays with recurrent attention model (RAM) [38]. The RAM learns to sample the entire X-ray image sequentially and focus on informative areas. Only one disease enlarged heart is considered in their work. Recently, Pesce et al. [39] 3 Input/224*224*3 112*112*64 56*56*256 pooling Global Branch 28*28*512 14*14*1024 fc 7*7*2048 sigmoid loss ResBlock ResBlock ResBlock ResBlock conv B C E Mask Inference crop X [xmin, ymin, xmax, ymax] mask concat heatmap B C E + Fusion Branch ResBlock ResBlock ResBlock ResBlock conv B C E Local Branch Fig. 2. Overall framework of the attention guided convolutional neural network (AG-CNN). We show an example with ResNet-50 as backbone. AG-CNN consists of three branches. Global and local branches consist of five convolutional blocks with batch normalization and ReLU. Each of them is then connected to a max pooling layer (Pool5), a fully connected (FC) layer, and a sigmoid layer. Different from the global branch, the input of the local branch is a local lesion patch which is cropped by the mask generated from global branch. Then, Pool5 layers of the these two branches are concatenated into the fusion branch. ”BCE” represents binary cross entropy loss. The input image is added to the heat map for visualization. explore a soft attention mechanism from the saliency map of CNN features to locate lung nodule position in radiographies. And a localization loss is calculated by comparing the predicted position with the annotated position. In this paper, AG-CNN locates the salient regions with an attention guided mask inference process, and learns the discriminative feature for classification. Compared with the method which relies on bounding box annotations, Our method only need image-level labels without any extra information. III. T HE P ROPOSED A PPROACH In this section, we describe the proposed attention guided convolutional neural network (AG-CNN) for thorax disease classification. We will first illustrate the architecture of AGCNN in Section III-A. Second, we describe the mask inference process for lesion region discovery in Section III-B. We then present the training process of AG-CNN in Section III-C. Finally, a brief discussion of the AG-CNN is provided. A. Structure of AG-CNN The architecture of AG-CNN is presented in Fig. 2. Basically, it has two major branches, i.e., the global and local branches, and a fusion branch. Both the global and local branches are classification networks that predict whether the pathologies are present or not in the image. Given an image, the global branch is first fine-tuned from a classification CNN using the global image. Then, we crop an attended region from the global image and train it for classification on the local branch. Finally, the last pooling layers of both the global and local branches are concatenated for fine-tuning the fusion branch. Multi-label setup. We label each image with a 15-dim vector L = [l1 , l2 , ..., lC ] in which lc ∈ {0, 1}, C = 15. lc represents whether the there is any pathology, i.e., 1 for presence and 0 for absence. The last element of L represents the label with ”No Finding”. Global and local branches. The global branch informs the underlying CXR information derived from the global image as input. In the global branch, we train a variant of ResNet-50 [18] as the backbone model. It consists of five down-sampling blocks, followed by a global max pooling layer and a 15dimensional fully connected (FC) layer for classification. At last, a sigmoid layer is added to normalize the output vector pg (c|I) of FC layer by peg (c|I) = 1/(1 + exp(−p(c|I))), (1) where I is the global image. peg (c|I) represents the probability score of I belonging to the cth class, c ∈ {1, 2, ..., C}. We optimize the parameter Wg of global branch by minimizing the binary cross-entropy (BCE) loss: C 1 X lc log(peg (c|I)) + (1 − lc )log(1 − peg (c|I)), C c=1 (2) where lc is the groundtruth label of the cth class, C is the number of pathologies. On the other hand, the local branch focuses on the lesion area and is expected to alleviate the drawbacks of only using the global image. In more details, the local branch possesses the same convolutional network structure with the global branch. Note that, these two branches do not share weights since they have distinct purposes. We denote the probability score of local branch as pel (c|Ic ), Wl as the parameters of local branch. Here, Ic is the input image of local branch. We perform the same normalization and optimization as the global branch. L(Wg ) = − 4 Fig. 3. The process of lesion area generation. (Top:) global CXR images of various thorax diseases for the global branch. The manually annotated legion areas provided by [9] are annotated with red bounding boxes. Note that we do not use the bounding boxes for training or testing. (Middle:) corresponding visual examples of the output of the mask inference process. The lesion areas are denoted by green bounding boxes. Higher response is denoted with red, and lower blue. Note that the heat maps are resized to the same size as the input images. (Bottom:) cropped and resized images from the green bounding boxes which are fed to the local branch. Algorithm 1: Attention Guided CNN Procedure Input: Input image I; Label vector L; Threshold τ . Output: Probability score pf f (c|[I, Ic ]). Initialization: the global and local branch weights. 1 Learning Wg with I, computing peg (c|I), optimizing by Eq. 2 (Stage I); 2 Computing mask M and the bounding box coordinates [xmin , ymin , xmax , ymax ], cropping out Ic from I; 3 Learning Wl with Ic , computing p el (c|Ic ), optimizing by Eq. 2 (Stage II); 4 Concentrating P oolg and P ooll , learning Wf , computing pf f (c|[I, Ic ]), optimizing by Eq. 2. Fusion branch. The fusion branch first concatenates the Pool5 outputs of the global and local branches. The concatenated layer is connected to a 15-dimensional FC layer for final classification. The probability score is pf f (c|[I, Ic ]). We denote Wf as the parameters of fusion branch and optimize Wf by Eq. 2. B. Attention Guided Mask Inference In this paper, we construct a binary mask to locate the discriminative regions for classification in the global image. It is produced by performing thresholding operations on the feature maps, which can be regarded as an attention process. This process is described below. Given a global image, let fgk (x, y) represent the activation of spatial location (x, y) in the kth channel of the output of the last convolutional layer, where k ∈ {1, ..., K}, K = 2, 048 in ResNet-50. g denotes the global branch. We first take the absolute value of the activation values fgk (x, y) at position (x, y). Then the attention heat map Hg is generated by counting the maximum values along channels, Hg (x, y) = max(|fgk (x, y)|), k ∈ {1, ..., K}. k (3) The values in Hg directly indicate the importance of the activations for classification. In Fig. 1(b) and Fig. 3 (the second row), some examples of the heat maps are shown. We observe that the discriminative regions (lesion areas) of the images are activated. Heat map can be constructed by computing different statistical values the channel PK across 1 k dimensions,qsuch as L1 distance K (x, y)| or L2 |f g k=1 PK 1 k 2 distance K k=1 (fg (x, y)) . Different statistics result in subtle numerical differences in heat map, but may not effect the classification significantly. Therefore, we computing heat map with Eq. 3 in our experiment. The comparison of these statistics is presented in Section IV-C. We design a binary mask M to locate the regions with large activation values. If the value of a certain spatial position (x, y) in the heat map is larger than a threshold τ , the value at corresponding position in the mask is assigned with 1. Specifically, ( 1, Hg (x, y) > τ M (x, y) = (4) 0, otherwise where τ is the threshold that controls the size of attended region. A larger τ leads to a smaller region, and vice versa. With the mask M , we draw a maximum connected region that covers the discriminative points in M . The maximum connected region is denoted as the minimum and maximum coordinates in horizontal and vertical axis [xmin , ymin , xmax , ymax ]. At last, the local discriminative region Ic is cropped from the input image I and is resized to the same size as I. We visualize the bounding boxes and cropped patches with τ = 0.7 in Fig. 3. The attention informed mask inference method is able to locate the regions (green bounding boxes) which are reasonably close to the groundtruth (red bounding boxes). C. Training Strategy of AG-CNN This paper adopts a three-stage training scheme for AGCNN. 5 Atelectasis Cardiomegaly Effusion Infiltrate Mass Nodule Pneumonia Pneumothorax Fig. 4. Examples of 8 pathologies in ChestX-ray14. The lesion regions are annotated with the red bounding boxes provided by [9]. Note that these groundtruth bounding boxes are only used for demonstration: they are neither used in training nor testing. TABLE I C OMPARISON RESULTS OF VARIOUS METHODS ON C HEST X- RAY 14. Method Wang et al. [9] Yao et al. [19] CNN R-50 D-/ Rajpurkar et al. [8]∗ D-121 Kumar et al. [7]∗ D-161 Global branch (baseline) R-50 Local branch R-50 AG-CNN R-50 Global branch (baseline) D-121 Local branch D-121 AG-CNN D-121 * Atel 0.716 0.772 0.821 0.762 0.818 0.798 0.844 0.832 0.797 0.853 Card 0.807 0.904 0.905 0.913 0.904 0.881 0.937 0.906 0.865 0.939 Effu 0.784 0.859 0.883 0.864 0.881 0.862 0.904 0.887 0.851 0.903 Infi Mass 0.609 0.706 0.695 0.792 0.720 0.862 0.692 0.750 0.728 0.863 0.707 0.826 0.753 0.893 0.717 0.870 0.704 0.829 0.754 0.902 Nodu 0.671 0.717 0.777 0.666 0.780 0.736 0.827 0.791 0.733 0.828 Pne1 0.633 0.713 0.763 0.715 0.783 0.716 0.776 0.732 0.710 0.774 Pne2 0.806 0.841 0.893 0.859 0.897 0.872 0.919 0.891 0.850 0.921 Cons 0.708 0.788 0.794 0.784 0.807 0.805 0.842 0.808 0.802 0.842 Edem 0.835 0.882 0.893 0.888 0.892 0.874 0.919 0.905 0.882 0.924 Emph 0.815 0.829 0.926 0.898 0.918 0.898 0.941 0.912 0.874 0.932 Fibr 0.769 0.767 0.804 0.756 0.815 0.808 0.857 0.823 0.801 0.864 PT 0.708 0.765 0.814 0.774 0.800 0.770 0.836 0.802 0.769 0.837 Hern 0.767 0.914 0.939 0.802 0.889 0.887 0.903 0.883 0.872 0.921 Mean 0.738 0.803 0.842 0.795 0.841 0.817 0.868 0.840 0.810 0.871 We compute the AUC of each class and the average AUC across the 14 diseases. ∗ denotes that a different train/test split is used: 80% for training and the rest 20% for testing. All the Other methods split the dataset with 70% for training, 10% for validation and 20% for testing. Each pathology is denoted with its first four characteristics, e.g., Atelectasis with Atel. Pneumonia and Pneumothorax are denoted as Pneu1 and Pneu2, respectively. PT represents Pleural Thickening. We report the performance with parameter τ = 0.7. ResNet-50 (R-50) and Desnet-121 (D-121) are used as backbones in our approach. For each column, the best and second best results are highlighted in red and blue, respectively. Stage I. Using the global images, we fine-tune the global branch network pretrained by ImageNet. peg (c|I) is normalized by Eq. 1. Stage II. Once the local image Ic is obtained by mask inference with threshold τ , we feed it into the local branch for fine-tuning. pel (c|Ic ) is also normalized by Eq. 1. When we fine-tune the local branch, the weights in the global branch are fixed. Stage III. Let P oolg and P ooll represent the Pool5 layer outputs of the global and local branches, respectively. We concatenate them for a final stage of fine-tuning and normalize the probability score pf f (c|[I, Ic ]) by Eq. 1. Similarly, the weights of previous two branches are fixed when we fine-tune the weights of fusion branch. In each stage, we use the model with the highest AUC on the validation set for testing. The overall AG-CNN training procedure is presented in Algorithm 1. Variants of training strategy may influence the performance of AG-CNN. We discussed it in Section IV-C. IV. E XPERIMENT This section evaluates the performance of the proposed AG-CNN. The experimental dataset, evaluation protocol and the experimental settings are introduced first. Section IV-C demonstrates the performance of global and local branches and the effectiveness of fusing them. Furthermore, comparison of AG-CNN and the state of the art is presented in Table. I. In Section. IV-D, we analyze the parameter impact in mask inference. A. Dataset and Evaluation Protocol Dataset. We evaluate the AG-CNN framework using the ChestX-ray141 dataset [9]. ChestX-ray14 collects 112,120 frontal-view images of 30,805 unique patients. 51,708 images of them are labeled with up to 14 pathologies, while the others are labeled as “No Finding”. Fig. 4 presents some examples of 8 out of 14 thorax diseases and the ground-truth bounding boxes of the lesion regions provided by [9]. We observe that the size of the lesion area varies a lot for different pathologies. Evaluation protocol. In our experiment, we randomly shuffle the dataset into three subsets: 70% for training, 10% for validation and 20% for testing. Each image is labeled with a 15-dim vector L = [l1 , l2 , ..., lC ] in which yc ∈ {0, 1}, C = 15. l15 represents the label with ”No Finding”. B. Experimental Settings For training (any of the three stages), we perform data augmentation by resizing the original images to 256 × 256, 1 https://nihcc.app.box.com/v/ChestXray-NIHCC 6 Fig. 5. ROC curves of the global, local and fusion branches (DenseNet-121 as backbone) over the 14 pathologies. The corresponding AUC values are given in Table. I. We observe that fusing global and local information yields clear improvement. C. Evaluation Fig. 6. ROC curves of AG-CNN on the 14 diseases (ResNet-50 and DenseNet121 as backbones, respectively). randomly resized cropping to 224×224, and random horizontal flipping. The ImageNet mean value is subtracted from the image. When using ResNet-50 as backbone, we optimize the network using SGD with a mini-batch size of 126, 64, 64 for global, local and fusion branch, respectively. But for DenseNet-121, the network is optimized with a mini-batch of 64, 32, and 32, respectively. We train each branch for 50 epochs. The learning rate starts from 0.01 and is divided by 10 after 20 epochs. We use a weight decay of 0.0001 and a momentum of 0.9. During validation and testing, we also resize the image to 256 × 256, and then perform center cropping to obtain an image of size 224 × 224. Except in Section IV-D, we set τ to 0.7 which yields the best performance on the validation set. We implement AG-CNN with the Pytorch framework [40]. We evaluate our method on the ChestX-ray14 dataset. Mostly, ResNet-50 [18] is used as backbone, but the AUC and ROC curve obtained by DenseNet-121 [20] are also presented. Global branch (baseline) performance. We first report the performance of the baseline, i.e., the global branch. Results are summarized in Table. I, Fig. 5 and Fig. 9. The average AUC across the 14 thorax diseases arrives at 0.841 and 0.840, using ResNet-50 and DenseNet-121, respectively. For both backbone networks, this is a competitive accuracy compared with the previous state of the art. Except Herina, the AUC scores of the other 13 pathologies are very close to or even higher than [8]. Moreover, we observe that Infiltration has the lower recognition accuracy (0.728 and 0.717 for ResNet-50 and DenseNet-121). This is because the diagnosis of Infiltration mainly relies on the texture change among the lung area, which is challenging to recognize. The disease Cardiomegaly achieves higher recognition accuracy (0.904 and 0.912 for ResNet-50 and DenseNet-121, respectively), which is characterized by the relative solid region (heart). Performance of the local branch. The local branch is trained on the cropped and resized lesion patches, which is supposed to provide attention mechanisms complementary to the global branch. The performance of the local branch is demonstrated in Table. I, Fig. 5 and Fig. 9 as well. Using ResNet-50 and DenseNet-121, the average AUC score is 0.817 and 0.810, respectively, which is higher than [9], [7]. Despite of being competitive, the local branch yields lower accuracy than the global branch. For example, when using Consolidation ation iltration ysema Classification results Images 7 Effusion Atelectasis Infiltration Consolidation No Finding Pneumonia Mass Nodule Edema Cardiomegaly 0.770 0.732 0.352 0.205 0.127 0.017 0.014 0.014 0.014 0.013 Emphysema Pneumothorax Effusion Infiltration Mass No Finding Atelectasis Nodule PT Consolidation 0.831 0.754 0.106 0.101 0.087 0.082 0.075 0.030 0.027 0.024 Effusion Atelectasis Consolidation Infiltration No Finding Pneumothorax Emphysema PT Mass Cardiomegaly 0.902 0.727 0.207 0.193 0.074 0.058 0.017 0.016 0.012 0.010 Effusion Mass Atelectasis Infiltration Nodule No Finding Consolidation PT Pneumothorax Edema 0.820 0.780 0.201 0.130 0.115 0.065 0.051 0.046 0.028 0.011 Cardiomegaly No Finding Effusion Infiltration Atelectasis Hernia Nodule Fibrosis PT Mass 0.752 0.304 0.133 0.108 0.068 0.054 0.048 0.037 0.035 0.022 Emphysema Pneumothorax Atelectasis Effusion No Finding Infiltration PT Nodule Mass Fibrosis 0.854 0.810 0.264 0.139 0.138 0.085 0.054 0.034 0.018 0.016 Effusion Cardiomegaly Infiltration Edema Atelectasis PT Consolidation Pneumonia Mass Nodule 0.915 0.807 0.415 0.144 0.089 0.078 0.052 0.037 0.029 0.029 Fig. 7. Examples of classification results. We present the top-10 predicted categories and the corresponding probability scores. The ground-truth labels are highlighted in blue. 0.872 Average AUC 0.870 0.868 0.866 0.864 0.862 0.1 0.2 0.3 0.4 0.5 Threshold  0.6 0.7 0.8 0.9 Fig. 8. Average AUC scores of AG-CNN with different settings of τ on the validation set (ResNet-50 as backbone). ResNet-50, the performance gap is 2.4% (0.841 to 0.817). The probable reason for this observation is that the lesion region estimation and cropping process may lead to information loss which is critical for recognition. So the local branch may suffer from inaccurate estimation of the attention area. Among the 14 classes, the largest performance drop is observed at “Pneumonia” (0.067). The reason for the inferior performance at “Pneumonia” is probably that lots of information are lost. Generally, the area where the lung is inflamed is relative large and its corresponding attention heat map shows a scattered distribution. With a higher value of τ , only a very small patch is cropped in original image. For the classes “Hernia” and “Consolidation”, the local branch and global branch yield very similar accuracy. We speculate that the cropped local patch is consist with the lesion area in the global image. Effectiveness of fusing global and local branches. In Table. I, Fig. 5, and Fig. 6, we illustrate the effectiveness of the fusion branch, which yields the final classification results of our model. Table. I shows AUC of AG-CNN over 14 classes. The observations are consistent across different categories and the two backbones. Fig. 5 presents the ROC curve of three branches for each pathologies which illustrates that fusing global and local branches can improve both of them obviously. We presents the ROC curves of 14 pathologies with these two backbones in Fig. 6. It shows the highly consistency which demonstrate that AG-CNN is not sensitive to network architecture of backbone. For both ResNet-50 and DenseNet-121, the fusion branch, i.e., AG-CNN, outperforms both the global branch and local branch. For example, when using ResNet-50, the performance gap from AG-CNN to the global and local branches is 0.027 and 0.051, respectively. Specifically AG-CNN (with DenseNet-121 as backbone) surpasses the global and local branches for all 14 pathologies. The advantage of AG-CNN is consistent across the categories. Using ResNet-50 for example, the largest improvement (0.047) is observed at the class “Nodule”, the disease of which is featured by small lesion areas (see Fig. 4). In fact, under such circumstances, the global branch can be largely affected by the noise within the non-disease areas. By paying attention on the small yet focused lesion areas, our method effectively improves the classification performance of Nodule. On the other hand, we also notice that under the class Pneumonia, AG-CNN is inferior to the global branch, a consistent observation made with the local branch: the local branch is the least effective at this class. Some classification results are presented in Fig. 7. Another experiment, inputing a global image into both global and local branch, is conducted to verify the effectiveness of fusing global and local cues. The same experimental settings with Section IV-B are performed expect that the mini-batchsize is 64 in training. Three branches are trained together with ResNet-50 as backbone. The average AUC of global, local and fusion branches achieve to 0.845, 0.846 and 0.851, respectively. The performance is lower 0.017 compared with inputing a local patch into local branch. The results show that AG-CNN is superior than both global and local branch. In particular, the improvement is benefit from the local discriminative region instead of increasing the number of parameters. Comparison with the state of the art. We compare our results with the state-of-the-art methods [9], [19], [7], [8] on the ChestX-ray14 dataset. Wang et al. [9] classify and localize the thorax disease in a unified weakly supervised framework. This localization method actually compromises the classification 8 local branch 0.90 Average AUC 0.865 0.861 0.86 0.828 0.831 0.82 0.859 0.822 0.819 global branch (baseline) 0.868 0.867 0.858 0.858 0.822 fusion branch 0.825 0.866 0.863 0.841 0.817 0.804 0.78 0.751 0.74 0.1 0.2 0.3 0.4 0.5 Threshold  0.6 0.7 0.8 0.9 Fig. 9. Average AUCs for different settings of τ on the test set (ResNet-50 as backbone). Note that the results from global branch are our baseline. accuracy. The reported results from Yao et al. [19] are based on the model in which labels are considered independent. Kumar et al. [7] try different boosting methods and cascade the previous classification results for multi-label classification. The accuracy of the previous step directly influences the result of the following pathologies. Comparing with these methods, this paper contributes new state of the art to the community: average AUC = 0.871. AG-CNN exceeds the previous state of the art [8] by 2.9%. AUC scores of pathologies such as Cardiomegaly and Infltration are higher than [8] by about 0.03. AUC scores of Mass, Fibrosis and Consolidation surpass [8] by about 0.05. Furthermore, we train AG-CNN with 70% of the dataset, but 80% are used in [7], [8]. In nearly all the 14 classes, our method yields best performance. Only Rajpurkar et al. [8] report higher accuracy on Hernia. In all, the classification accuracy reported in this paper compares favorably against previous art. Variant of training strategy analysis. Training three branches with different orders influences the performance of AG-CNN. We perform 4 orders to train AG-CNN: 1) train global branch first, and then local and fusion branch together (G LF); 2) train global and local branch together, and then fusion branch (GL F); 3) train three branches together (GLF); 4) train global, local and fusion branch sequentially (G L F). Note that G L F is our three-stage training strategy. We limit the batchsize to 64 for training two or three branches together, such as GL F and GLF. And if the global branch is trained first, the batchsize of each branch is set to 128, 64 and 64, respectively. The other experimental settings are same as Section IV-B. We present the classification performance of these training strategies in Table. II. AG-CNN yields better performance (0.868 and 0.854) with strategy of training three branches sequentially (G L F and G L F∗ ). When global branch is trained first, we perform the same model as the baseline in Table. I. Training with G L F, AG-CNN obviously improves the baseline from 0.841 to 0.868. AG-CNN (G L F∗ ) performs a overall fine-tuning when we train the fusion branch. It improves the global branch TABLE II R ESULTS OF DIFFERENT TRAINING STRATEGIES . Strategy GL F GLF G LF G L F∗ G L F * Batchsize 64/64/64 64/64/64 128/64/64 128/64/64 128/64/64 Global 0.831 0.847 0.841 0.852 0.841 Local 0.800 0.815 0.809 0.819 0.817 Fusion 0.833 0.849 0.843 0.854 0.868 ∗ represents that the parameters in global and local branch are fine-tuned when we train the fusion branch. ResNet-50 is used as backbone.) TABLE III R ESULTS CORRESPONDING DIFFERENT STATISTICS . Statistic Max L1 L2 * Global 0.8412 0.8412 0.8412 Local 0.8171 0.8210 0.8213 Fusion 0.8680 0.8681 0.8672 ResNet-50 is used as backbone. performance to 0.852, but not the local and fusion branches. Compared with G L F and G L F∗ , performance of AGCNN (G LF) is much lower because its the inaccuracy of local branch. When AG-CNN is trained with GL F and GLF, it is inferior to G L F or G L F∗ . We infer that local branch is essential to enhance AG-CNN performance. Variant of heat map analysis. In Table. III, we report the performance of using different heat map computing methods. Based on the same baseline, the local branch produce a gap of 0.0042 between Max and L2, but only 0.008 in fusion branch. Max and L1 achieve very close performance on both the local and fusion branch. It illustrates that different statistics result in subtle differences in local branch, but not effect the classification performance significantly. D. Parameter Analysis We analyze the sensitivity of AG-CNN to parameter variations. The key parameter of AG-CNN consists in τ in Eq. 4, which defines the local regions and affects the classification accuracy. Fig. 8 shows the average AUC of AG-CNN over 9 different τ on validation set. AG-CNN achieves the best performance when τ is setting as 0.7. Therefore, we report the results on test set with τ = 0.7. Fig. 9 compares the average AUC of the global, local branch and fusion branch on the test dataset when ResNet-50 is used as basic network. τ changes from 0.1 to 0.9. When τ is small (e.g. , close to 0), the local region is close to the global image. For example, when τ = 0.1, the average AUC of the local branch (0.828) is close to the result of the global branch (0.841). In such cases, most of the entries in the attention heat map are preserved, indicating that the cropped image patches are close to the original input. On the other hand, while τ reaches to 1, e.g., 0.9, the local branch is inferior to the global branch by a large margin (0.9%). Under this circumstance, most of the information in the global image is discarded but only the top 10% largest values in the attention heat map are retained. The cropped image patches reflect very small regions. Unlike the local branch, AG-CNN is relative stable to changes of the threshold τ . When concentrating the global and local branches, AG-CNN outperforms both branches by at least 1.7% at τ = 0.4 and 0.5. AG-CNN exhibits the highest AUC (>0.866) when τ ranges between [0.6, 0.8]. V. C ONCLUSION In this paper, we propose an attention guided two-branch convolutional neural network for thorax disease classification. The proposed network is trained by considering both the global and local cues informed in the global and local branches, respectively. Departing from previous works which merely rely on the global information, it uses attention heat maps to mask the important regions which are used to train the local branch. Extensive experiments demonstrate that combining both global and local cues yields state-of-the-art accuracy on the ChestX-ray14 dataset. We also demonstrate that our method is relatively insensitive to parameter changes. In the future research, we will continue the study from two directions. First, we will investigate more accurate localization of the lesion areas. Second, to tackle with the difficulties in sample collection and annotation, semi-supervised learning methods will be explored. R EFERENCES [1] P. Liskowski and K. Krawiec, “Segmenting retinal blood vessels with¡? pub newline?¿ deep neural networks,” IEEE transactions on medical imaging, vol. 35, no. 11, pp. 2369–2380, 2016. 1 [2] Y. Yuan, M. Chao, and Y.-C. Lo, “Automatic skin lesion segmentation using deep fully convolutional networks with jaccard distance,” IEEE Transactions on Medical Imaging, 2017. 1 [3] H. R. Roth, L. Lu, A. Farag, H.-C. Shin, J. Liu, E. B. Turkbey, and R. M. Summers, “Deeporgan: Multi-level deep convolutional networks for automated pancreas segmentation,” in International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer, 2015, pp. 556–564. 1 [4] H. Fu, J. Cheng, Y. Xu, D. W. K. Wong, J. Liu, and X. Cao, “Joint optic disc and cup segmentation based on multi-label deep network and polar transformation,” IEEE Transactions on Medical Imaging, 2018. 1 [5] H. Fu, Y. Xu, S. Lin, X. Zhang, D. W. K. Wong, J. Liu, A. F. Frangi, M. Baskaran, and T. Aung, “Segmentation and quantification for angleclosure glaucoma assessment in anterior segment oct,” IEEE transactions on medical imaging, vol. 36, no. 9, pp. 1930–1938, 2017. 1 [6] M. Anthimopoulos, S. Christodoulidis, L. Ebner, A. Christe, and S. Mougiakakou, “Lung pattern classification for interstitial lung diseases using a deep convolutional neural network,” IEEE transactions on medical imaging, vol. 35, no. 5, pp. 1207–1216, 2016. 1, 2 [7] P. Kumar, M. Grewal, and M. M. Srivastava, “Boosted cascaded convnets for multilabel classification of thoracic diseases in chest radiographs,” arXiv preprint arXiv:1711.08760, 2017. 1, 2, 5, 6, 7, 8 [8] P. Rajpurkar, J. Irvin, K. Zhu, B. Yang, H. Mehta, T. Duan, D. Ding, A. Bagul, C. Langlotz, K. Shpanskaya et al., “Chexnet: Radiologistlevel pneumonia detection on chest x-rays with deep learning,” arXiv preprint arXiv:1711.05225, 2017. 1, 2, 5, 6, 7, 8 [9] X. Wang, Y. Peng, L. Lu, Z. Lu, M. Bagheri, and R. M. Summers, “Chestx-ray8: Hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases,” arXiv preprint arXiv:1705.02315, 2017. 1, 2, 4, 5, 6, 7 [10] J. M. Wolterink, T. Leiner, M. A. Viergever, and I. Isgum, “Generative adversarial networks for noise reduction in low-dose ct,” IEEE Transactions on Medical Imaging, 2017. 1 [11] S. Albarqouni, C. Baur, F. Achilles, V. Belagiannis, S. Demirci, and N. Navab, “Aggnet: deep learning from crowds for mitosis detection in breast cancer histology images,” IEEE transactions on medical imaging, vol. 35, no. 5, pp. 1313–1321, 2016. 1 [12] Y. Xu, T. Mo, Q. Feng, P. Zhong, M. Lai, I. Eric, and C. Chang, “Deep learning of feature representation with multiple instance learning for medical image analysis,” in Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on. IEEE, 2014, pp. 1626–1630. 1 [13] R. Liao, S. Miao, P. de Tournemire, S. Grbic, A. Kamen, T. Mansi, and D. Comaniciu, “An artificial agent for robust image registration.” in AAAI, 2017, pp. 4168–4175. 1 [14] D. Yang, S. Zhang, Z. Yan, C. Tan, K. Li, and D. Metaxas, “Automated anatomical landmark detection ondistal femur surface using convolutional neural network,” in Biomedical Imaging (ISBI), 2015 IEEE 12th International Symposium on. IEEE, 2015, pp. 17–21. 1 [15] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105. 1 [16] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014. 1 [17] 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, 2015, pp. 1–9. 1 [18] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770–778. 1, 3, 6 [19] L. Yao, E. Poblenz, D. Dagunts, B. Covington, D. Bernard, and K. Lyman, “Learning to diagnose from scratch by exploiting dependencies among labels,” arXiv preprint arXiv:1710.10501, 2017. 1, 2, 5, 7 [20] G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten, “Densely connected convolutional networks,” arXiv preprint arXiv:1608.06993, 2016. 1, 6 [21] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural computation, vol. 9, no. 8, pp. 1735–1780, 1997. 1 [22] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, “Imagenet: A large-scale hierarchical image database,” in Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009, pp. 248–255. 1 [23] A. Krizhevsky and G. Hinton, “Learning multiple layers of features from tiny images,” 2009. 1 [24] J. Shiraishi, S. Katsuragawa, J. Ikezoe, T. Matsumoto, T. Kobayashi, K.i. Komatsu, M. Matsui, H. Fujita, Y. Kodera, and K. Doi, “Development of a digital image database for chest radiographs with and without a lung nodule: receiver operating characteristic analysis of radiologists’ detection of pulmonary nodules,” American Journal of Roentgenology, vol. 174, no. 1, pp. 71–74, 2000. 2 [25] B. Van Ginneken, M. B. Stegmann, and M. Loog, “Segmentation of anatomical structures in chest radiographs using supervised methods: a comparative study on a public database,” Medical image analysis, vol. 10, no. 1, pp. 19–40, 2006. 2 [26] S. Jaeger, S. Candemir, S. Antani, Y.-X. J. Wáng, P.-X. Lu, and G. Thoma, “Two public chest x-ray datasets for computer-aided screening of pulmonary diseases,” Quantitative imaging in medicine and surgery, vol. 4, no. 6, p. 475, 2014. 2 [27] D. Demner-Fushman, M. D. Kohli, M. B. Rosenman, S. E. Shooshan, L. Rodriguez, S. Antani, G. R. Thoma, and C. J. McDonald, “Preparing 10 [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] a collection of radiology examinations for distribution and retrieval,” Journal of the American Medical Informatics Association, vol. 23, no. 2, pp. 304–310, 2015. 2 “Open-i: An open access biomedical search engine.” https://openi.nlm. nih.gov. 2 G. Litjens, T. Kooi, B. E. Bejnordi, A. A. A. Setio, F. Ciompi, M. Ghafoorian, J. A. van der Laak, B. van Ginneken, and C. I. Sánchez, “A survey on deep learning in medical image analysis,” arXiv preprint arXiv:1702.05747, 2017. 2 A. Qayyum, S. M. Anwar, M. Majid, M. Awais, and M. Alnowami, “Medical image analysis using convolutional neural networks: A review,” arXiv preprint arXiv:1709.02250, 2017. 2 D. Shen, G. Wu, and H.-I. Suk, “Deep learning in medical image analysis,” Annual Review of Biomedical Engineering, no. 0, 2017. 2 H.-C. Shin, H. R. Roth, M. Gao, L. Lu, Z. Xu, I. Nogues, J. Yao, D. Mollura, and R. M. Summers, “Deep convolutional neural networks for computer-aided detection: Cnn architectures, dataset characteristics and transfer learning,” IEEE transactions on medical imaging, vol. 35, no. 5, pp. 1285–1298, 2016. 2 H.-C. Shin, K. Roberts, L. Lu, D. Demner-Fushman, J. Yao, and R. M. Summers, “Learning to read chest x-rays: recurrent neural cascade model for automated image annotation,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 2497–2506. 2 M. T. Islam, M. A. Aowal, A. T. Minhaz, and K. Ashraf, “Abnormality detection and localization in chest x-rays using deep convolutional neural networks,” arXiv preprint arXiv:1705.09850, 2017. 2 S. Hwang and H.-E. Kim, “Self-transfer learning for weakly supervised lesion localization,” in International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer, 2016, pp. 239–246. 2 C. Payer, D. Štern, H. Bischof, and M. Urschler, “Regressing heatmaps for multiple landmark localization using cnns,” in International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer, 2016, pp. 230–238. 2 P.-P. Ypsilantis and G. Montana, “Learning what to look in chest x-rays with a recurrent visual attention model,” arXiv preprint arXiv:1701.06452, 2017. 2 V. Mnih, N. Heess, A. Graves et al., “Recurrent models of visual attention,” in Advances in neural information processing systems, 2014, pp. 2204–2212. 2 E. Pesce, P.-P. Ypsilantis, S. Withey, R. Bakewell, V. Goh, and G. Montana, “Learning to detect chest radiographs containing lung nodules using visual attention networks,” arXiv preprint arXiv:1712.00996, 2017. 2 A. Paszke, S. Gross, S. Chintala, and G. Chanan, “Pytorch,” 2017. 6
1cs.CV
arXiv:1403.3369v3 [cs.NE] 22 Apr 2017 Herbert Jaeger Controlling Recurrent Neural Networks by Conceptors Technical Report No. 31 March 2014 School of Engineering and Science Controlling Recurrent Neural Networks by Conceptors (Revision 2) Herbert Jaeger Jacobs University Bremen School of Engineering and Science Campus Ring 28759 Bremen Germany E-Mail: [email protected] http: // minds. jacobs-university. de Abstract The human brain is a dynamical system whose extremely complex sensordriven neural processes give rise to conceptual, logical cognition. Understanding the interplay between nonlinear neural dynamics and concept-level cognition remains a major scientific challenge. Here I propose a mechanism of neurodynamical organization, called conceptors, which unites nonlinear dynamics with basic principles of conceptual abstraction and logic. It becomes possible to learn, store, abstract, focus, morph, generalize, de-noise and recognize a large number of dynamical patterns within a single neural system; novel patterns can be added without interfering with previously acquired ones; neural noise is automatically filtered. Conceptors help explaining how conceptual-level information processing emerges naturally and robustly in neural systems, and remove a number of roadblocks in the theory and applications of recurrent neural networks. Changelog for Revision 1: Besides correcting trivial typos, the following edits / corrections have been made after the first publication on arXiv, leading to the revision 1 version on arXiv: • Apr 7, 2014: updated algorithm description for incremental memory management by documenting W out component. • Jun 15, 2014: added missing parentheses in C update formula given at beginning of Section 3.14. • Oct 11, 2014: added missing Frobenious norms in similarity formulas (3) and (10) (pointed out by Dennis Hamester) • May 2016: re-wrote and extended the section on incremental memory management (Section 3.11) • July 2016: deleted the subsubsection “To be or not to be an attractor” from Section 3.14.3 because this material is repeated later in the text in more detail. Changelog for Revision 2: • April 22, 2017: Proposition 12 was removed - it was wrong. 3 Notes on the Structure of this Report. This report introduces several novel analytical concepts describing neural dynamics; develops the corresponding mathematical theory under aspects of linear algebra, dynamical systems theory, and formal logic; introduces a number of novel learning, adaptation and control algorithms for recurrent neural networks; demonstrates these in a number of case studies; proposes biologically (not too im-)plausible realizations of the dynamical mechanisms; and discusses relationships to other work. Said shortly, it’s long. Not all parts will be of interest to all readers. In order to facilitate navigation through the text and selection of relevant components, I start with an overview section which gives an intuitive explanation of the novel concepts and informal sketches of the main results and demonstrations (Section 1). After this overview, the material is presented in detail, starting with an introduction (Section 2) which relates this contribution to other research. The main part is Section 3, where I systematically develop the theory and algorithms, interspersed with simulation demos. A graphical dependency map for this section is given at the beginning of Section 3. The technical documentation of the computer simulations is provided in Section 4, and mathematical proofs are collected in Section 5. The detailed presentation in Sections 2 – 5 is self-contained. Reading the overview in Section 1 may be helpful but is not necessary for reading these sections. For convenience some figures from the overview section are repeated in Section 3. Acknowledgements. The work described in this report was partly funded through the European FP7 project AMARSi (www.amarsi-project.eu). The author is indebted to Dr. Mathieu Galtier and Dr. Manjunath Ghandi for careful proofreading (not an easy task). 4 Contents 1 Overview 7 2 Introduction 25 2.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.2 Mathematical Preliminaries . . . . . . . . . . . . . . . . . . . . . . 27 3 Theory and Demonstrations 3.1 Networks and Signals . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Driving a Reservoir with Different Patterns . . . . . . . . . . . . . . 3.3 Storing Patterns in a Reservoir, and Training the Readout . . . . . 3.4 Conceptors: Introduction and Basic Usage in Retrieval . . . . . . . 3.5 A Similarity Measure for Excited Network Dynamics . . . . . . . . 3.6 Online Learning of Conceptor Matrices . . . . . . . . . . . . . . . . 3.7 Morphing Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8 Understanding Aperture . . . . . . . . . . . . . . . . . . . . . . . . 3.8.1 The Semantics of α as “Aperture” . . . . . . . . . . . . . . . 3.8.2 Aperture Adaptation and Final Definition of Conceptor Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8.3 Aperture Adaptation: Example . . . . . . . . . . . . . . . . 3.8.4 Guides for Aperture Adjustment . . . . . . . . . . . . . . . 3.9 Boolean Operations on Conceptors . . . . . . . . . . . . . . . . . . 3.9.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9.2 Preliminary Definition of Boolean Operations . . . . . . . . 3.9.3 Final Definition of Boolean Operations . . . . . . . . . . . . 3.9.4 Facts Concerning Subspaces . . . . . . . . . . . . . . . . . . 3.9.5 Boolean Operators and Aperture Adaptation . . . . . . . . . 3.9.6 Logic Laws . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10 An Abstraction Relationship between Conceptors . . . . . . . . . . 3.11 Example: Memory Management in RNNs . . . . . . . . . . . . . . . 3.11.1 General Principle and Algorithm . . . . . . . . . . . . . . . 3.11.2 Demonstration 1: Incremental Loading of Integer-Periodic Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12 Incremental Loading of Integer-Periodic Patterns: Detailed Analysis 3.12.1 Demonstration 2: Incremental Loading of Irrational-Period Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12.2 Integer-Periodic Versus Parametrized Patterns: Close-up Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12.3 Incremental Loading of Arbitrary Patterns . . . . . . . . . . 3.13 Example: Dynamical Pattern Recognition . . . . . . . . . . . . . . 3.14 Autoconceptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14.1 Motivation and Overview . . . . . . . . . . . . . . . . . . . 3.14.2 Basic Equations . . . . . . . . . . . . . . . . . . . . . . . . . 5 29 29 30 34 34 38 38 39 43 43 44 46 46 50 50 51 53 55 56 56 58 59 60 63 65 67 69 72 74 80 80 82 3.15 3.16 3.17 3.18 3.19 3.14.3 Example: Autoconceptive Reservoirs as Content-Addressable Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14.4 Analysis of Autoconceptor Adaptation Dynamics . . . . . . Toward Biologically Plausible Neural Circuits: Random Feature Conceptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Hierarchical Filtering and Classification Architecture . . . . . . . Toward a Formal Marriage of Dynamics with Logic . . . . . . . . . Conceptor Logic as Institutions: Category-Theoretical Detail . . . . Final Summary and Outlook . . . . . . . . . . . . . . . . . . . . . . 84 93 104 121 136 147 158 4 Documentation of Experiments and Methods 161 4.1 General Set-Up, Initial Demonstrations (Section 1 and Section 3.2 - 3.4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 4.2 Aperture Adaptation (Sections 3.8.3 and 3.8.4) . . . . . . . . . . . 162 4.3 Memory Management, Demo 1 (Section 3.11.2) . . . . . . . . . . . 164 4.4 Memory Management, Demo 2 (Section 3.12.1) . . . . . . . . . . . 165 4.5 Memory Management, Close-Up Inspection (Section 3.12.2) . . . . . 165 4.6 Memory Management, Arbitrary Patterns (Section 3.12.3) . . . . . 165 4.7 Content-Addressable Memory (Section 3.14.3) . . . . . . . . . . . . 166 4.8 The Japanese Vowels Classification (Section 3.13) . . . . . . . . . . 166 4.9 Conceptor Dynamics Based on RFC Conceptors (Section 3.15) . . . 167 4.10 Hierarchical Classification and Filtering Architecture (Section 3.16) 168 5 Proofs and Algorithms 5.1 Proof of Proposition 1 (Section 3.4) . . 5.2 Proof of Proposition 6 (Section 3.9.3) . 5.3 Proof of Proposition 7 (Section 3.9.3) . 5.4 Proof of Proposition 8 (Section 3.9.3) . 5.5 Proof of Proposition 9 (Section 3.9.4) . 5.6 Proof of Proposition 10 (Section 3.9.5) 5.7 Proof of Proposition 11 (Section 3.9.6) 5.8 Proof of Proposition 12 (Section 3.9.6) 5.9 Proof of Proposition 13 (Section 3.10) . 5.10 Proof of Proposition 15 (Section 3.14.4) 5.11 Proof of Proposition 17 (Section 3.18) . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 . 171 . 172 . 175 . 175 . 176 . 178 . 181 . 181 . 182 . 186 . 191 192 6 1 Overview Scientific context. Research on brains and cognition unfolds in two directions. Top-down oriented research starts from the “higher” levels of cognitive performance, like rational reasoning, conceptual knowledge representation, command of language. These phenomena are typically described in symbolic formalisms developed in mathematical logic, artificial intelligence (AI), computer science and linguistics. In the bottom-up direction, one departs from “low-level” sensor data processing and motor control, using the analytical tools offered by dynamical systems theory, signal processing and control theory, statistics and information theory. The human brain obviously has found a way to implement high-level logical reasoning on the basis of low-level neuro-dynamical processes. How this is possible, and how the top-down and bottom-up research directions can be united, has largely remained an open question despite long-standing efforts in neural networks research and computational neuroscience [82, 89, 33, 1, 36, 43], machine learning [35, 47], robotics [10, 83], artificial intelligence [85, 106, 7, 9], dynamical systems modeling of cognitive processes [96, 100, 107], cognitive science and linguistics [22, 98], or cognitive neuroscience [4, 26]. Summary of contribution. Here I establish a fresh view on the neuro-symbolic integration problem. I show how dynamical neural activation patterns can be characterized by certain neural filters which I call conceptors. Conceptors derive naturally from the following key observation. When a recurrent neural network (RNN) is actively generating, or is passively being driven by different dynamical patterns (say a, b, c, . . .), its neural states populate different regions Ra , Rb , Rc , . . . of neural state space. These regions are characteristic of the respective patterns. For these regions, neural filters Ca , Cb , Cc , . . . (the conceptors) can be incrementally learnt. A conceptor Cx representing a pattern x can then be invoked after learning to constrain the neural dynamics to the state region Rx , and the network will select and re-generate pattern x. Learnt conceptors can be blended, combined by Boolean operations, specialized or abstracted in various ways, yielding novel patterns on the fly. The logical operations on conceptors admit a rigorous semantical interpretation; conceptors can be arranged in conceptual hierarchies which are structured like semantic networks known from artificial intelligence. Conceptors can be economically implemented by single neurons (addressing patterns by neurons, leading to explicit command over pattern generation), or they may self-organize spontaneously and quickly upon the presentation of cue patterns (content-addressing, leading to pattern imitation). Conceptors can also be employed to “allocate free memory space” when new patterns are learnt and stored in long-term memory, enabling incremental life-long learning without the danger of freshly learnt patterns disrupting already acquired ones. Conceptors are robust against neural noise and parameter variations. The basic mechanisms are generic and can be realized in any kind of dynamical neural network. All taken together, 7 conceptors offer a principled, transparent, and computationally efficient account of how neural dynamics can self-organize in conceptual structures. Going bottom-up: from neural dynamics to conceptors. The neural model system in this report are standard recurrent neural networks (RNNs, Figure 1 A) whose dynamics is mathematically described be the state update equations x(n + 1) = tanh(W ∗ x(n) + W in p(n)), y(n) = W out x(n). Time here progresses in unit steps n = 1, 2, . . .. The network consists of N neurons (typically in the order of a hundred in this report), whose activations x1 (n), . . . , xN (n) at time n are collected in an N -dimensional state vector x(n). The neurons are linked by random synaptic connections, whose strengths are collected in a weight matrix W ∗ of size N × N . An input signal p(n) is fed to the network through synaptic input connections assembled in the input weight matrix W in . The “S-shaped” function tanh squashes the neuronal activation values into a range between −1 and 1. The second equation specifies that an ouput signal y(n) can be read from the network activation state x(n) by means of output weights W out . These weights are pre-computed such that the output signal y(n) just repeats the input signal p(n). The output signal plays no functional role in what follows; it merely serves as a convenient 1-dimensional observer of the high-dimensional network dynamics. The network-internal neuron-to-neuron connections W ∗ are created at random. This will lead to the existence of cyclic (“recurrent”) connection pathways inside the network. Neural activation can reverberate inside the network along these cyclic pathways. The network therefore can autonomously generate complex neurodynamical patterns even when it receives no input. Following the terminology of the reservoir computing [56, 5], I refer to such randomly connected neural networks as reservoirs. For the sake of introducing conceptors by way of an example, consider a reservoir with N = 100 neurons. I drive this system with a simple sinewave input p(n) (first panel in first row in Fig. 1 B). The reservoir becomes entrained to this input, each neuron showing individual variations thereof (Fig. 1 B second panel). The resulting reservoir state sequence x(1), x(2), . . . can be represented as a cloud of points in the 100-dimensional reservoir state space. The dots in the first panel of Fig. 1 C show a 2-dimensional projection of this point cloud. By a statistical method known as principal component analysis, the shape of this point cloud can be captured by an N -dimensional ellipsoid whose main axes point in the main scattering directions of the point cloud. This ellipsoid is a geometrical representation of the correlation matrix R of the state points. The lengths σ1 , . . . , σN of the ellipsoid axes are known as the singular values of R. The directions and lengths of these axes provide a succinct characterization of the geometry of the state point 8 &'('&)"*&! W in W out W p!! *+%#$!! !" #$%&'$( #" y! x! 0+1!"$! )*+$&,-.+&/ / ! " !! ! " !! " !!" ! ! " !! ! " !! " !!" ! ! " !! ! " !! " !!" ! " !!" ! ! " !! " ! " !! 2" " !" !" 2" ! " $" "#$%#$!! !! !! " " " " 3" " " !"" ! !1 !2 " " !! !! ! 3" !"" ! s1 s2 " " ! !! !! " ! Figure 1: Deriving conceptors from network dynamics. A. Network layout. Arrows indicate synaptic links. B. Driving the reservoir with four different input patterns. Left panels: 20 timesteps of input pattern p(n) (black thin line) and conceptor-controlled output y(n) (bold light gray). Second column: 20 timesteps of traces xi (n), xj (n) of two randomly picked reservoir neurons. Third column: the singular values σi of the reservoir state correlation matrix R in logarithmic scale. Last column: the singular values si of the conceptors C in linear plotting scale. C. From pattern to conceptor. Left: plots of value pairs xi (n), xj (n) (dots) of the two neurons shown in first row of B and the resulting ellipse with axis lengths σ1 , σ2 . Right: from R (thin light gray) to conceptor C (bold dark gray) by normalizing axis lengths σ1 , σ2 to s1 , s2 . 9 cloud. The N = 100 lengths σi resulting in this example are log-plotted in Fig. 1 B, third column, revealing an exponential fall-off in this case. As a next step, these lengths σi are normalized to become si = σi /(σi + α−2 ), where α ≥ 0 is a design parameter that I call aperture. This normalization ensures that all si are not larger than 1 (last column in Fig. 1 B). A new ellipsoid is obtained (Fig. 1 C right) which is located inside the unit sphere. The normalized ellipsoid can be described by a N -dimensional matrix C, which I call a conceptor matrix. C can be directly expressed in terms of R by C = R(R + α−2 I)−1 , where I is the identity matrix. When a different driving pattern p is used, the shape of the state point cloud, and subsequently the conceptor matrix C, will be characteristically different. In the example, I drove the reservoir with four patterns p1 – p4 (rows in Fig. 1B). The first two patterns were sines of slightly different frequencies, the last two patterns were minor variations of a 5-periodic random pattern. The conceptors derived from the two sine patterns differ considerably from the conceptors induced by the two 5-periodic patterns (last column in Fig. 1B). Within each of these two pairs, the conceptor differences are too small to become visible in the plots. There is an instructive alternative way to define conceptors. Given a sequence of reservoir states x(1), . . . , x(L), the conceptor C which characterizes this matrix which minimizes the cost function P state point cloud is 2the unique −2 2 2 n=1,...,L kx(n) − Cx(n)k /L + α kCk , where kCk is the sum of all squared matrix entries. The first term in this cost would become minimal if C were the identity map, the second term would become minimal if C would be the all-zero map. The aperture α strikes a balance between these two competing cost components. For increasing apertures, C will tend toward the identity matrix I; for shrinking apertures it will come out closer to the zero matrix. In the terminology of machine learning, C is hereby defined as a regularized identity map. The explicit solution to this minimization problem is again given by the formula C = R (R + α−2 I)−1 . Summing up: if a reservoir is driven by a pattern p(n), a conceptor matrix C can be obtained from the driven reservoir states x(n) as the regularized identity map on these states. C can be likewise seen as a normalized ellipsoid characterization of the shape of the x(n) point cloud. I write C(p, α) to denote a conceptor derived from a pattern p using aperture α, or C(R, α) to denote that C was obtained from a state correlation matrix R. Loading a reservoir. With the aid of conceptors a reservoir can re-generate a number of different patterns p1 , . . . , pK that it has previously been driven with. For this to work, these patterns have to be learnt by the reservoir in a special sense, which I call loading a reservoir with patterns. The loading procedure works as follows. First, drive the reservoir with the patterns p1 , . . . , pK in turn, collecting reservoir states xj (n) (where j = 1, . . . , K). Then, recompute the reservoir connection weights W ∗ into W such that W optimally balances between the fol10 lowing two goals. First, W should be such that W xj (n) ≈ W ∗ xj (n) + W in pj (n) for all times n and patterns j. That is, W should allow the reservoir to “simulate” the driving input in the absence of the same. Second, W should be such that the weights collected in this matrix become as small as possible. Technically this compromise-seeking learning task amounts to computing what is known as a regularized linear regression, a standard and simple computational task. This idea of “internalizing” a driven dynamics into a reservoir has been independently (re)introduced under different names and for a variety of purposes (self-prediction [72], equilibration [55], reservoir regularization [92], self-sensing networks [102], innate training [61]) and appears to be a fundamental RNN adaptation principle. Going top-down: from conceptors to neural dynamics. Assume that conceptors C j = C(pj , α) have been derived for patterns p1 , . . . , pK , and that these patterns have been loaded into the reservoir, replacing the original random weights W ∗ by W . Intuitively, the loaded reservoir, when it is run using x(n + 1) = tanh(W x(n)) (no input!) should behave exactly as when it was driven with input earlier, because W has been trained such that W x(n) ≈ W ∗ x(n) + W in pj (n). In fact, if only a single pattern had been loaded, the loaded reservoir would readily re-generate it. But if more than one patter had been loaded, the autonomous (input-free) update x(n + 1) = tanh(W x(n)) will lead to an entirely unpredictable dynamics: the network can’t “decide” which of the loaded patterns it should re-generate! This is where conceptors come in. The reservoir dynamics is filtered through C j . This is effected by using the augmented update rule x(n + 1) = C j tanh(W x(n)). By virtue of inserting C j into the feedback loop, the reservoir states become clipped to fall within the ellipsoid associated with C j . As a result, the pattern pj will be re-generated: when the reservoir is observed through the previously trained output weights, one gets y(n) = W out x(n) ≈ pj (n). The first column of panels in Fig. 1 B shows an overlay of the four autonomously re-generated patterns y(n) with the original drivers pj used in that example. The recovery of the originals is quite accurate (mean square errors 3.3e-05, 1.4e-05, 0.0040, 0.0019 for the four loaded patterns). Note that the first two and the last two patterns are rather similar to each other. The filtering afforded by the respective conceptors is “sharp” enough to separate these twin pairs. I will later demonstrate that in this way a remarkably large number of patterns can be faithfully re-generated by a single reservoir. Morphing and generalization. Given a reservoir loaded with K patterns pj , the associated conceptors C j can be linearly combined by creating mixture conceptors M = µ1 C 1 + . . . + µK C K , where the mixing coefficients µj must sum to 1. When the reservoir is run under the control of such a morphed conceptor M , the resulting generated pattern is a morph between the original “pure” patterns pj . If all µj are non-negative, the morph can be considered an interpolation between the pure patterns; if some µj are negative, the morph extrapolates beyond the loaded 11 pure patterns. I demonstrate this with the four patterns used in the example above, setting µ1 = (1 − a)b, µ2 = ab, µ3 = (1 − a)(1 − b), µ4 = a(1 − b), and letting a, b vary from −0.5 to 1.5 in increments of 0.25. Fig. 2 shows plots of observer signals y(n) obtained when the reservoir is generating patterns under the control of these morphed conceptors. The innermost 5 by 5 panels show interpolations between the four pure patterns, all other panels show extrapolations. In machine learning terms, both interpolation and extrapolation are cases of generalization. A standard opinion in the field states that generalization by interpolation is what one may expect from learning algorithms, while extrapolation beyond the training data is hard to achieve. Morphing and generalizing dynamical patterns is a common but nontrivial task for training motor patterns in robots. It typically requires training demonstrations of numerous interpolating patterns [90, 16, 68]. Conceptor-based pattern morphing appears promising for flexible robot motor pattern learning from a very small number of demonstrations. b = –0.5 0.0 0.5 1.0 1.5 a = –0.5 0.0 0.5 1.0 1.5! Figure 2: Morphing between, and generalizing beyond, four loaded patterns. Each panel shows a 15-step autonomously generated pattern (plot range between −1 and +1). Panels with bold frames: the four loaded prototype patterns (same patterns as in Fig. 1 B.) 12 Aperture adaptation. Choosing the aperture α appropriately is crucial for regenerating patterns in a stable and accurate way. To demonstrate this, I loaded a 500-neuron reservoir with signals p1 – p4 derived from four classical chaotic attractors: the Lorenz, Rössler, Mackey-Glass, and Hénon attractors. Note that it used to be a challenging task to make an RNN learn any single of these attractors [56]; to my knowledge, training a single RNN to generate several different chaotic attractors has not been attempted before. After loading the reservoir, the regeneration was tested using conceptors C(pj , α) where for each attractor pattern pj a number of different values for α were tried. Fig. 3 A shows the resulting regenerated patterns for five apertures for the Lorenz attractor. When the aperture is too small, the reservoir-conceptor feedback loop becomes too constrained and the produced patterns de-differentiate. When the aperture is too large, the feedback loop becomes over-excited. 11 66 4e+02 2.4e+03 1.4e+04 A 1e+03 1.3e+03 6.3e+02 B Lorenz C Roessler MackeyïGlass Hénon 0 0 0 0 ï5 ï5 ï5 ï5 1 2 3 4 5 log10 aperture 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Figure 3: Aperture adaptation for re-generating four chaotic attractors. A Lorenz attractor. Five versions re-generated with different apertures (values inserted in panels) and original attractor (green). B Best re-generations of the other three attractors (from left to right: Rössler, Mackey-Glass, and Hénon, originals in green). C Log10 of the attenuation criterion plotted against the log10 of aperture. Dots mark the apertures used for plots in A and B. An optimal aperture can be found by experimentation, but this will not be an option in many engineering applications or in biological neural systems. An intrinsic criterion for optimizing α is afforded by a quantity that I call attenuation: the damping ratio which the conceptor imposes on the reservoir signal. Fig. 3 C plots the attenuation against the aperture for the four chaotic signals. The 13 minimum of this curve marks a good aperture value: when the conceptor dampens out a minimal fraction of the reservoir signal, conceptor and reservoir are in good “resonance”. The chaotic attractor re-generations shown in Fig. 3 B were obtained by using this minimum-attenuation criterion. The aperture range which yields visibly good attractor re-generations in this demonstration spans about one order of magnitude. With further refinements (zeroing small singular values in conceptors is particularly effective), the viable aperture range can be expanded to about three orders of magnitude. While setting the aperture right is generally important, fine-tuning is unnecessary. Boolean operations and conceptor abstraction. Assume that a reservoir is driven by a pattern r which consists of randomly alternating epochs of two patterns p and q. If one doesn’t know which of the two patterns is active at a given time, all one can say is that the pattern r currently is p OR it is q. Let C(Rp , 1), C(Rq , 1), C(Rr , 1) be conceptors derived from the two partial patterns p, q and the “OR” pattern r, respectively. Then it holds that C(Rr , 1) = C((Rp + Rq )/2, 1). Dropping the division by 2, this motivates to define an OR (mathematical notation: ∨) operation on conceptors C1 (R1 , 1), C2 (R2 , 1) by putting C1 ∨ C2 := (R1 + R2 )(R1 + R2 + I)−1 . The logical operations NOT (¬) and AND (∧) can be defined along similar lines. Fig. 4 shows two-dimensional examples of applying the three operations. 1 1 1 0 0 0 ï1 ï1 0 ï1 1 ï1 0 ï1 1 ï1 0 1 Figure 4: Boolean operations on conceptors. Red/blue (thin) ellipses represent source conceptors C1 , C2 . Magenta (thick) ellipses show C1 ∨ C2 , C1 ∧ C2 , ¬C1 (from left to right). Boolean logic is the mathematical theory of ∨, ∧, ¬. Many laws of Boolean logic also hold for the ∨, ∧, ¬ operations on conceptors: the laws of associativity, commutativity, double negation, de Morgan’s rules, some absorption rules. Furthermore, numerous simple laws connect aperture adaptation to Boolean operations. Last but not least, by defining C1 ≤ C2 if and only if there exists a conceptor B such that C2 = C1 ∨ B, an abstraction ordering is created on the set of all conceptors of dimension N . 14 Neural memory management. Boolean conceptor operations afford unprecedented flexibility of organizing and controlling the nonlinear dynamics of recurrent neural networks. Here I demonstrate how a sequence of patterns p1 , p2 , . . . can be incrementally loaded into a reservoir, such that (i) loading a new pattern pj+1 does not interfere with previously loaded p1 , . . . , pj ; (ii) if a new pattern pj+1 is similar to already loaded ones, the redundancies are automatically detected and exploited, saving memory capacity; (iii) the amount of still “free” memory space can be logged. Let C j be the conceptor associated with pattern pj . Three ideas are combined to implement the memory management scheme. First, keep track of the “already used” memory space by maintaining a conceptor Aj = C 1 ∨ . . . ∨ C j . The sum of all singular values of Aj , divided by the reservoir size, gives a number that ranges between 0 and 1. It is an indicator of the portion of reservoir “space” which has been used up by loading C 1 , . . . , C j , and I call it the quota claimed by C 1 , . . . , C j . Second, characterize what is “new” about C j+1 (not being already represented by previously loaded patterns) by considering the conceptor N j+1 = C j+1 \ Aj . The logical difference operator \ can be re-written as A \ B = A ∧ ¬B. Third, load only that which is new about C j+1 into the still unclaimed reservoir space, that is, into ¬Aj . These three ideas can be straightforwardly turned into a modification of the basic pattern loading algorithm. For a demonstration, I created a series of periodic patterns p1 , p2 , . . . whose integer period lengths were picked randomly between 3 and 15, some of these patterns being sines, others random patterns. These patterns were incrementally loaded in a 100-neuron reservoir, one by one. Fig. 5 shows the result. Since patterns j = 5, 6, 7 were identical replicas of patterns j = 1, 2, 3, no additional quota space was consumed when these patterns were (re-)loaded. Accuracy was measured by the normalized root mean square error (NRMSE). The NRMSE jumps from very small values to a high value when the last pattern is loaded; the quota of 0.99 at this point indicates that the reservoir is “full”. The re-generation testing and NRMSE computation was done after all patterns had been loaded. An attempt to load further patterns would be unsuccessful, but it also would not harm the re-generation quality of the already loaded ones. This ability to load patterns incrementally suggests a solution to a notorious problem in neural network training, known as catastrophic forgetting, which manifests itself in a disruption of previously learnt functionality when learning new functionality. Although a number of proposals have been made which partially alleviate the problem in special circumstances [32, 42], catastrophic forgetting was still listed as an open challenge in an expert’s report solicited by the NSF in 2007 [21] which collected the main future challenges in learning theory. Recognizing dynamical patterns. Boolean conceptor operations enable the combination of positive and negative evidence in a neural architecture for dynamical pattern recognition. For a demonstration I use a common benchmark, the 15 1 j=1 j=5 j=9 j = 13 0 ï1 0.1 0.0014 1 0.36 0.0014 j=2 0.54 0.019 j=6 0.8 0.075 j = 10 j = 14 0 ï1 0.25 0.008 1 0.36 0.011 j=3 0.59 0.015 j=7 0.83 0.013 j = 11 j = 15 0 ï1 0.29 0.00071 1 0.36 0.00071 j=4 0.65 0.036 j=8 0.94 0.05 j = 12 j = 16 0 ï1 1 0.36 0.003 10 0.42 20 1 0.004 10 0.73 20 1 0.048 10 0.99 20 1 0.95 10 20 Figure 5: Incremental pattern storing in a neural memory. Each panel shows a 20-timestep sample of the correct training pattern pj (black line) overlaid on its reproduction (green line). The memory fraction used up until pattern j is indicated by the panel fraction filled in red; the quota value is printed in the left bottom corner of each panel. Japanese vowel recognition task [60]. The data of this benchmark consist in preprocessed audiorecordings of nine male native speakers pronouncing the Japanese di-vowel /ae/. The training data consist of 30 recordings per speaker, the test data consist of altogether 370 recordings, and the task is to train a recognizer which has to recognize the speakers of the test recordings. This kind of data differs from the periodic or chaotic patterns that I have been using so far, in that the patterns are non-stationary (changing in their structure from beginning to end), multidimensional (each recording consisting of 12 frequency band signals), stochastic, and of finite duration. This example thus also demonstrates that conceptors can be put to work with data other than single-channel stationary patterns. A small (10 neurons) reservoir was created. It was driven with all training recordings from each speaker j in turn (j = 1, . . . , 9), collecting reservoir response signals, from which a conceptor C j characteristic of speaker j was computed. In addition, for each speaker j, a conceptor N j = ¬ (C 1 ∨ . . . ∨ C j−1 ∨ C j+1 ∨ . . . C 9 ) was computed. N j characterizes the condition “this speaker is not any of the other eight speakers”. Patterns need not to be loaded into the reservoir for this application, because they need not be re-generated. In testing, a recording p from the test set was fed to the reservoir, collecting a reservoir response signal x. For each of the conceptors, a positive evidence E + (p, j) = x0 C j x was computed. E + (p, j) is a non-negative number indicating how well the signal x fits into the ellipsoid of C j . Likewise, the negative evidence E − (p, j) = x0 N j x that the sample p was not uttered by any of the eight speakers other than speaker j was computed. Finally, the combined evidence E(p, j) = E + (p, i) + E − (p, i) was computed. This gave nine combined evidences 16 E(p, 1), . . . , E(p, 9). The pattern p was then classified as speaker j by choosing the speaker index j whose combined evidence E(p, j) was the greatest among the nine collected evidences. In order to check for the impact of the random selection of the underlying reservoir, this whole procedure was repeated 50 times, using a freshly created random reservoir in each trial. Averaged over these 50 trials, the number of test misclassifications was 3.4. If the classification would have been based solely on the positive or negative evidences, the average test misclassification numbers would have been 8.4 and 5.9 respectively. The combination of positive and negative evidence, which was enabled by Boolean operations, was crucial. State-of-the-art machine learning methods achieve between 4 and 10 misclassifications on the test set (for instance [93, 99, 81, 14]). The Boolean-logic-conceptorbased classifier thus compares favorably with existing methods in terms of classification performance. The method is computationally cheap, with the entire learning procedure taking a fraction of a second only on a standard notebook computer. The most distinctive benefit however is incremental extensibility. If new training data become available, or if a new speaker would be incorporated into the recognition repertoire, the additional training can be done using only the new data without having to re-run previous training data. This feature is highly relevant in engineering applications and in cognitive modeling and missing from almost all state-of-the-art classification methods. Autoconceptors and content-addressable memories. So far I have been describing examples where conceptors C j associated with patterns pj were computed at training time, to be later plugged in to re-generate or classify patterns. A conceptor C matrix has the same size as the reservoir connection matrix W . Storing conceptor matrices means to store network-sized objects. This is implausible under aspects of biological modeling. Here I describe how conceptors can be created on the fly, without having to store them, leading to content-addressable neural memories. If the system has no pre-computed conceptors at its disposal, loaded patterns can still be re-generated in a two-stage process. First, the target pattern p is selected by driving the system with a brief initial “cueing” presentation of the pattern (possibly in a noisy version). During this phase, a preliminary conceptor C cue is created by an online adaptation process. This preliminary C cue already enables the system to re-generate an imperfect version of the pattern p. Second, after the cueing phase has ended, the system continues to run in an autonomous mode (no external cue signal), initially using C cue , to continuously generate a pattern. While this process is running, the conceptor in the loop is continuously adapted by a simple online adaptation rule. This rule can be described in geometrical terms as “adapt the current conceptor C(n) such that its ellipsoid matches better the shape of the point cloud of the current reservoir state dynamics”. Under this rule one obtains a reliable convergence of the generated pattern toward a highly 17 accurate replica of the target pattern p that was given as a cue. Singular Values 1 0 !1 1 0 1 A 6+:3-;*,<:*/3-.9,,3, 0 23410.56789 0 0 0 y and p 1 0 !1 1 10 1 0 !1 20 0 !0.5 !1 !1.5 5 10 B 1 2 # 4 5 ()**+,-./-0+1 ;./55+<1/*4=46+:--1>3 .,610+)789: !0(# !1 !1(# C 2 " # $ 1&2# #0 100 )*+,-+.,/010+2/331*45 Figure 6: Content-addressable memory. A First three of five loaded patterns. Left panels show the leading 20 singular values of C cue (black) and C auto (gray). Right panels show an overlay of the original driver pattern (black, thin) and the reconstruction at the end of auto-adaptation (gray, thick). B Pattern reconstruction errors directly after cueing (black squares) and at end of auto-adaptation (gray crosses). C Reconstruction error of loaded patterns (black) and novel patterns drawn from the same parametric family (gray) versus the number of loaded patterns, averaged over 5 repetitions of the entire experiment and 10 patterns per plotting point. Error bars indicate standard deviations. Results of a demonstration are illustrated in Figure 6. A 200-neuron reservoir was loaded with 5 patterns consisting of a weighted sum of two irrational-period sines, sampled at integer timesteps. The weight ratio and the phaseshift were chosen at random; the patterns thus came from a family of patterns parametrized by two parameters. The cueing time was 30 timesteps, the free-running autoadaptation time was 10,000 timesteps, leading to an auto-adapted conceptor C auto at the end of this process. On average, the reconstruction error improved from about -0.4 (log10 NRMSE measured directly after the cueing) to -1.1 (at the end of auto-adaptation). It can be shown analytically that the auto-adaptation process pulls many singular values down to zero. This effect renders the combined reservoir-conceptor loop very robust against noise, because all noise components in the directions of the nulled singular values become completely suppressed. In fact, 18 all results shown in Figure 6 were obtained with strong state noise (signal-to-noise ratio equal to 1) inserted into the reservoir during the post-cue auto-adaptation. The system functions as a content-addressable memory (CAM): loaded items can be recalled by cueing them. The paradigmatic example of a neural CAM are auto-associative neural networks (AANNs), pioneered by Palm [82] and Hopfield [48]. In contrast to conceptor-based CAM, which store and re-generate dynamical patterns, AANNs store and cue-recall static patterns. Furthermore, AANNs do not admit an incremental storing of new patterns, which is possible in conceptor-based CAMs. The latter thus represent an advance in neural CAMs in two fundamental aspects. To further elucidate the properties of conceptor CAMs, I ran a suite of simulations where the same reservoir was loaded with increasing numbers of patterns, chosen at random from the same 2-parametric family (Figure 6 C). After loading with k = 2, 3, 5, . . . , 100 patterns, the reconstruction accuracy was measured at the end of the auto-adaptation. Not surprisingly, it deteriorated with increasing memory load k (black line). In addition, I also cued the loaded reservoir with patterns that were not loaded, but were drawn from the same family. As one would expect, the re-construction accuracy of these novel patterns was worse than for the loaded patterns – but only for small k. When the number of loaded patterns exceeded a certain threshold, recall accuracy became essentially equal for loaded and novel patterns. These findings can be explained in intuitive terms as follows. When few patterns are loaded, the network memorizes individual patterns by “rote learning”, and subsequently can recall these patterns better than other patterns from the family. When more patterns are loaded, the network learns a representation of the entire parametric class of patterns. I call this the class learning effect. Toward biological feasibility: random feature conceptors. Several computations involved in adapting conceptor matrices are non-local and therefore biologically infeasible. It is however possible to approximate matrix conceptors with another mechanism which only requires local computations. The idea is to project (via random projection weights F ) the reservoir state into a random feature space which is populated by a large number of neurons zi ; execute the conceptor operations individually on each of these neurons by multiplying a conception weight ci into its state; and finally to project back to the reservoir by another set of random projection weights G (Figure 7). The original reservoir-internal random connection weigths W are replaced by a dyade of two random projections of first F , then G, and the original reservoir state x segregates into a reservoir state r and a random feature state z. The conception weights ci assume the role of conceptors. They can be learnt and adapted by procedures which are directly analog to the matrix conceptor case. What had to be non-local matrix computations before now turns into local, one-dimensional (scalar) operations. These operations are biologically feasible in the modest sense 19 that any information needed to adapt a synaptic weight is locally available at that synapse. All laws and constructions concerning Boolean operations and aperture carry over. G p ci W in r reservoir F' z feature space Figure 7: Random feature conceptors. This neural architecture has two pools of neurons, the reservoir and the feature space. A set of conception weights ci corresponding to a particular pattern can be neurally represented and “stored” in the form of the connections of a single neuron to the feature space. A dynamical pattern thus can be represented by a single neuron. This enables a highly compact neural representation of dynamical patterns. A machine learning application is presented below. I re-ran with such random feature conceptors a choice of the simulations that I did with matrix conceptors, using a number of random features that was two to five times as large as the reservoir. The outcome of these simulations: the accuracy of pattern re-generation is essentially the same as with matrix conceptors, but setting the aperture is more sensitive. A hierarchical classification and de-noising architecture. Here I present a system which combines in a multi-layer neural architecture many of the items introduced so far. The input to this system is a (very) noisy signal which at a given time is being generated by one out of a number of possible candidate pattern generators. The task is to recognize the current generator, and simultaneously to re-generate a clean version of the noisy input pattern. I explain the architecture with an example. It uses three processing layers to de-noise an input signal u[1] (n) = pj (n) + noise, with pj being one of the four patterns p1 , . . . , p4 used before in this report (shown for instance in Figure 1 B). The architecture implements the following design principles (Figure 8 A). (i) Each layer is a random feature based conceptor system (as in Figure 7 B). The four patterns p1 , . . . , p4 are initially loaded into each of the layers, and four prototype conceptor weight vectors c1 , . . . , c4 corresponding to the patterns are computed and stored. (ii) In a bottom-up processing pathway, the noisy external input signal u[1] (n) = pj (n) + noise is stagewise de-noised, leading to signals y[1] , y[2] , y[3] on layers l = 1, 2, 3, where y[3] should be a highly cleaned-up version of the input 20 %&'()*+*,'-./,(0(0 c1, c2, y[3]auto ![12] c[3] ! y[2] y[2]auto u[1] %&'()*1*,'-./,(0(0 $ !"# G ! ![23] c[2]auto %&'()*$*,'-./,(0(0 $ c[2] !"# ! F' /)20/*3&)4&5%(0 $ !"# G ![12] c[1]auto y[1] A $ F' u[3] u[2] c4 !"# y[3] ![23] c3, ! c[1] %.8$!*9:;<=0 ! !$ F' !1 ! 6!!! -&//()>*0&?-%(0 G $ ! !$ !"#$%&#!'()& B ! $! 1! ! 7!!! $! 1! Figure 8: Simultaneous signal de-noising and classification. A. Schema of architecture. B. Simulation results. Panels from above: first three panels: hypothesis j vectors γ[l] (n) in the three layers. Color coding: p1 blue, p2 green, p3 red, p4 cyan. Fourth panel: trust variables τ[1,2] (n) (blue) and τ[2,3] (n) (green). Fifth panel: signal reconstruction errors (log10 NRMSE) of y[1] (blue), y[2] (green) and y[3] (red) versus clean signal pj . Black line: linear baseline filter. Bottom panels: 20-step samples from the end of the two presentation periods. Red: noisy input; black: clean input; thick gray: cleaned output signal y[3] . (subscripts [l] refer to layers, bottom layer is l = 1). (iii) The top layer autoadapts a conceptor c[3] which is constrained to be a weighted OR combination of the four prototype conceptors. In a suggestive notation this can be written as j 1 4 c[3] (n) = γ[3] (n) c1 ∨ . . . ∨ γ[3] (n) c4 . The four weights γ[3] sum to one and represent a hypothesis vector expressing the system’s current belief about the current driver j pj . If one of these γ[3] approaches 1, the system has settled on a firm classification of the current driving pattern. (iv) In a top-down pathway, conceptors c[l] from layers l are passed down to the respective layers l − 1 below. Because higher layers should have a clearer conception of the current noisy driver pattern than lower layers, this passing-down of conceptors “primes” the processing in layer l − 1 with valuable contextual information. (v) Between each pair of layers l, l + 1, a trust variable τ[l,l+1] (n) is adapted by an online procedure. These trust variables range between 0 and 1. A value of τ[l,l+1] (n) = 1 indicates maximal confidence that the signal y[l+1] (n) comes closer to the clean driver pj (n) than the signal y[l] (n) does, 21 that is, the stage-wise denoising actually functions well when progressing from layer l to l + 1. The trust τ[l,l+1] (n) evolves by comparing certain noise ratios that are observable locally in layers l and l + 1. (vi) Within layer l, an internal autoauto and a candidate adaptation process generates a candidate de-noised signal y[l] auto local autoconceptor cauto . The local estimate y is linearly mixed with the signal [l] [l] auto + y[l−1] , where the trust τ[l−1,l] sets the mixing rate. The mixture u[l] = τ[l−1,l] y[l] (1−τ[l−1,l] ) y[l−1] is the effective signal input to layer l. If the trust τ[l−1,l] reaches its maximal value of 1, layer l will ignore the signal from below and work entirely by self-generating a pattern. (vii) In a similar way, the effective conceptor in layer l is a trust-negotiated mixture c[l] = (1 − τ[l,l+1] ) cauto [l] + τ[l,l+1] c[l+1] . Thus if the trust τ[l,l+1] is maximal, layer l will be governed entirely by the passed-down conceptor c[l+1] . Summarizing, the higher the trusts inside the hierarchy, the more will the system be auto-generating conceptor-shaped signals, or conversely, at low trust values the system will be strongly permeated from below by the outside driver. If the trust variables reach their maximum value of 1, the system will run in a pure “confabulation” mode and generate an entirely noise-free signal y[3] – at the risk of doing this under an entirely misguided hypothesis c[3] . The key to make this architecture work thus lies in the trust variables. It seems to me that maintaining a measure of trust (or call it confidence, certainty, etc.) is an intrinsically necessary component in any signal processing architecture which hosts a top-down pathway of guiding hypotheses (or call them context, priors, bias, etc.). Figure 8 B shows an excerpt from a simulation run. The system was driven first by an initial 4000 step period of p1 + noise, followed by 4000 steps of p3 + noise. The signal-to-noise ratio was 0.5 (noise twice as strong as signal). The system successfully settles on the right hypothesis (top panel) and generates very clean de-noised signal versions (bottom panel). The crucial item in this figure is the development of the trust variable τ[2,3] . At the beginning of each 4000 step period it briefly drops, allowing the external signal to permeate upwards through the layers, thus informing the local auto-adaptation loops about “what is going on outside”. After these initial drops the trust rises to almost 1, indicating that the system firmly “believes” to have detected the right pattern. It then generates pattern versions that have almost no mix-in from the noisy external driver. As a baseline comparison I also trained a standard linear transversal filter which computed a de-noised input pattern point based on the preceding K = 2600 input values. The filter length K was set equal to the number of trainable parameters in the neural architecture. The performance of this linear de-noising filter (black line in Figure 8) is inferior to the architecture’s performance both in terms of accuracy and response time. It is widely believed that top-down hypothesis-passing through a processing hierarchy plays a fundamental role in biological cognitive systems [33, 15]. However, the current best artificial pattern recognition systems [39, 59] use purely bottom-up processing – leaving room for further improvement by including top-down guid22 ance. A few hierarchical architectures which exploit top-down hypothesis-passing have been proposed [33, 47, 43, 35]. All of these are designed for recognizing static patterns, especially images. The conceptor-based architecture presented here appears to be the first hierarchical system which targets dynamical patterns and uses top-down hypothesis-passing. Furthermore, in contrast to state-of-the-art pattern recognizers, it admits an incremental extension of the pattern repertoire. Intrinsic conceptor logic. In mathematical logics the semantics (“meaning”) of a symbol or operator is formalized as its extension. For instance, the symbol cow in a logic-based knowledge representation system in AI is semantically interpreted by the set of all (physical) cows, and the OR-operator ∨ is interpreted as set union: cow ∨ horse would refer to the set comprising all cows and horses. Similarly, in cognitive science, concepts are semantically referring to their extensions, usually called categories in this context [75]. Both in mathematical logic and cognitive science, extensions need not be confined to physical objects; the modeler may also define extensions in terms of mathematical structures, sensory perceptions, hypothetical worlds, ideas or facts. But at any rate, there is an ontological difference between the two ends of the semantic relationship. This ontological gap dissolves in the case of conceptors. The natural account of the “meaning” of a matrix conceptor C is the shape of the neural state cloud it is derived from. This shape is given by the correlation matrix R of neural states. Both C and R have the same mathematical format: positive semi-definite matrices of identical dimension. Figure 9 visualizes the difference between classical extensional semantics of logics and the system-internal conceptor semantics. The symbol |= is the standard mathematical notation for the semantical meaning relationship. I have cast these intuitions into a formal specification of an intrinsic conceptor logic (ICL), where the semantic relationship outlined above is formalized within the framework of institutions [37]. This framework has been developed in mathematics and computer science to provide a unified view on the multitude of existing “logics”. By formalizing ICL as an institution, conceptor logic can be rigorously compared to other existing logics. I highlight two findings. First, an ICL cast as an institution is a dynamcial system in its own right: the symbols used in this logic evolve over time. This is very much different from traditional views on logic, where symbols are static tokens. Second, it turns out that ICL is a logic which is decidable. Stated in intuitive terms, in a decidable logic it can be calculated whether a “concept” ψ subsumes a concept ϕ (as in “a cow is an animal”). Deciding concept subsumption is a core task in AI systems and human cognition. In most logic-based AI systems, deciding concept subsumption can become computationally expensive or even impossible. In ICL it boils down to determining whether all components of a certain conception weight vector ci are smaller or equal to the corresponding components c0i of another such vector, which can be done in a single processing step. This may help explaining why humans can make 23 Figure 9: Contrasting the extensional semantics of classical knowledge representation formalisms (upper half of graphics) with conceptor semantics (lower half). classification judgements almost instantaneously. Discussion. The human brain is a neurodynamical system which evidently supports logico-rational reasoning [49]. Since long this has challenged scientists to find computational models which connect neural dynamics with logic. Very different solutions have been suggested. At the dawn of computational neuroscience, McCulloch and Pitts have already interpreted networks of binary-state neurons as carrying out Boolean operations [74]. Logical inferences of various kinds have been realized in localist connectionist networks where neurons are labelled by concept names [84, 98]. In neurofuzzy modeling, feedforward neural networks are trained to carry out operations of fuzzy logic on their inputs [11]. In a field known as neuro-symbolic computation, deduction rules of certain formal logic systems are coded or trained into neural networks [7, 65, 9]. The combinatorial/compositional structure of symbolic knowledge has been captured by dedicated neural circuits to enable tree-structured representations [85] or variable-binding functionality [106]. All of these approaches require interface mechanisms. These interface mechanisms are non-neural and code symbolic knowledge representations into the numerical activation values of neurons and/or the topological structure of networks. One could say, previous approaches code logic into specialized neural networks, while conceptors instantiate the logic of generic recurrent neural networks. This novel, simple, versatile, computationally efficient, neurally not infeasible, bi-directional connection between logic and neural dynamics opens new perspectives for computational neuroscience and machine learning. 24 2 Introduction In this section I expand on the brief characterization of the scientific context given in Section 1, and introduce mathematical notation. 2.1 Motivation Intelligent behavior is desired for robots, demonstrated by humans, and studied in a wide array of scientific disciplines. This research unfolds in two directions. In “top-down” oriented research, one starts from the “higher” levels of cognitive performance, like rational reasoning, conceptual knowledge representation, planning and decision-making, command of language. These phenomena are described in symbolic formalisms developed in mathematical logic, artificial intelligence (AI), computer science and linguistics. In the “bottom-up” direction, one departs from “low-level” sensor data processing and motor control, using the analytical tools offered by dynamical systems theory, signal processing and control theory, statistics and information theory. For brevity I will refer to these two directions as the conceptual-symbolic and the data-dynamical sets of phenomena, and levels of description. The two interact bi-directionally. Higher-level symbolic concepts arise from low-level sensorimotor data streams in short-term pattern recognition and long-term learning processes. Conversely, low-level processing is modulated, filtered and steered by processes of attention, expectations, and goal-setting in a top-down fashion. Several schools of thought (and strands of dispute) have evolved in a decadeslong quest for a unification of the conceptual-symbolic and the data-dynamical approaches to intelligent behavior. The nature of symbols in cognitive processes has been cast as a philosophical issue [97, 29, 44]. In localist connectionistic models, symbolically labelled abstract processing units interact by nonlinear spreading activation dynamics [22, 98]. A basic tenet of behavior-based AI is that higher cognitive functions emerge from low-level sensori-motor processing loops which couple a behaving agent into its environment [10, 83]. Within cognitive science, a number of cognitive pheneomena have been described in terms of self-organization in nonlinear dynamical systems [96, 100, 107]. A pervasive idea in theoretical neuroscience is to interpret attractors in nonlinear neural dynamics as the carriers of conceptual-symbolic representations. This idea can be traced back at least to the notion of cell assemblies formulated by Hebb [45], reached a first culmination in the formal analysis of associative memories [82, 48, 3], and has since then diversified into a range of increasingly complex models of interacting (partial) neural attractors [111, 105, 89, 103]. Another pervasive idea in theoretical neuroscience and machine learning is to consider hierarchical neural architectures, which are driven by external data at the bottom layer and transform this raw signal into increasingly abstract feature representations, arriving at conceptual representations at the top layer of the hierarchy. Such hierarchical architectures mark the state of the art in pattern recognition technology [66, 38]. Many of these systems 25 process their input data in a uni-directional, bottom-to-top fashion. Two notable exceptions are systems where each processing layer is designed according to statistical principles from Bayes’ rule [33, 47, 15], and models based on the iterative linear maps of map seeking circuits [35, 113], both of which enable top-down guidance of recognition by expectation generation. More generally, leading actors in theoretical neuroscience have characterized large parts of their field as an effort to understand how cognitive phenomena arise from neural dynamics [1, 36]. Finally, I point out two singular scientific efforts to design comprehensive cognitive brain models, the ACT-R architectures developed by Anderson et al. [4] and the Spaun model of Eliasmith et al. [26]. Both systems can simulate a broad selection of cognitive behaviors. They integrate numerous subsystems and processing mechanisms, where ACT-R is inspired by a top-down modeling approach, starting from cognitive operations, and Spaun from a bottom-up strategy, starting from neurodynamical processing principles. Despite this extensive research, the problem of integrating the conceptualsymbolic with the data-dynamical aspects of cognitive behavior cannot be considered solved. Quite to the contrary, two of the largest current research initiatives worldwide, the Human Brain Project [18] and the NIH BRAIN initiative [51], are ultimately driven by this problem. There are many reasons why this question is hard, ranging from experimental challenges of gathering relevant brain data to fundamental oppositions of philosophical paradigms. An obstinate stumbling block is the different mathematical nature of the fundamental formalisms which appear most natural for describing conceptual-symbolic versus data-dynamical phenomena: symbolic logic versus nonlinear dynamics. Logic-oriented formalisms can easily capture all that is combinatorially constructive and hierarchically organized in cognition: building new concepts by logical definitions, describing nested plans for action, organizing conceptual knowledge in large and easily extensible abstraction hierarchies. But logic is inherently non-temporal, and in order to capture cognitive processes, additional, heuristic “scheduling” routines have to be introduced which control the order in which logical rules are executed. This is how ACT-R architectures cope with the integration problem. Conversely, dynamical systems formalisms are predestined for modeling all that is continuously changing in the sensori-motor interface layers of a cognitive system, driven by sensor data streams. But when dynamical processing modules have to be combined into compounds that can solve complex tasks, again additional design elements have to be inserted, usually by manually coupling dynamical modules in ways that are informed by biological or engineering insight on the side of the researcher. This is how the Spaun model has been designed to realize its repertoire of cognitive functions. Two important modeling approaches venture to escape from the logic-dynamics integration problem by taking resort to an altogether different mathematical framework which can accomodate both sensor data processing and concept-level representations: the framework of Bayesian statistics and the framework of iterated linear maps mentioned above. Both approaches lead to a unified 26 formal description across processing and representation levels, but at the price of a double weakness in accounting for the embodiment of an agent in a dynamical environment, and for the combinatorial aspects of cognitive operations. It appears that current mathematical methods can instantiate only one of the three: continuous dynamics, combinatorial productivity, or a unified level-crossing description format. The conceptor mechanisms introduced in this report bi-directionally connect the data-dynamical workings of a recurrent neural network (RNN) with a conceptualsymbolic representation of different functional modes of the RNN. Mathematically, conceptors are linear operators which characterize classes of signals that are being processed in the RNN. Conceptors can be represented as matrices (convenient in machine learning applications) or as neural subnetworks (appropriate from a computational neuroscience viewpoint). In a bottom-up way, starting from an operating RNN, conceptors can be learnt and stored, or quickly generated on-the-fly, by what may be considered the simplest of all adaptation rules: learning a regularized identity map. Conceptors can be combined by elementary logical operations (AND, OR, NOT), and can be ordered by a natural abstraction relationship. These logical operations and relations are defined via a formal semantics. Thus, an RNN engaged in a variety of tasks leads to a learnable representation of these operations in a logic formalism which can be neurally implemented. Conversely, in a top-down direction, conceptors can be inserted into the RNN’s feedback loop, where they robustly steer the RNN’s processing mode. Due to their linear algebra nature, conceptors can be continuously morphed and “sharpened” or “defocussed”, which extends the discrete operations that are customary in logics into the domain of continuous “mental” transformations. I highlight the versatility of conceptors in a series of demonstrations: generating and morphing many different dynamical patterns with a single RNN; managing and monitoring the storing of patterns in a memory RNN; learning a class of dynamical patterns from presentations of a small number of examples (with extrapolation far beyond the training examples); classification of temporal patterns; de-noising of temporal patterns; and content-addressable memory systems. The logical conceptor operations enable an incremental extension of a trained system by incorporating new patterns without interfering with already learnt ones. Conceptors also suggest a novel answer to a perennial problem of attractor-based models of concept representations, namely the question of how a cognitive trajectory can leave an attractor (which is at odds with the very nature of an attractor). Finally, I outline a version of conceptors which is biologically plausible in the modest sense that only local computations and no information copying are needed. 2.2 Mathematical Preliminaries I assume that the reader is familiar with properties of positive semidefinite matrices, the singular value decomposition, and (in some of the analysis of adaptation 27 dynamics) the usage of the Jacobian of a dynamical system for analysing stability properties. [a, b], (a, b), (a, b], [a, b) denote the closed (open, half-open) interval between real numbers a and b. A0 or x0 denotes the transpose of a matrix A or vector x. I is the identity matrix (the size will be clear from the context or be expressed as In×n ). The ith unit vector is denoted by ei (dimension will be clear in context). The trace of a square matrix A is denoted by tr A. The singular value decomposition of a matrix A is written as U SV 0 = A, where U, V are orthonormal and S is the diagonal matrix containing the singular values of A, assumed to be in descending order unless stated otherwise. A† is the pseudoinverse of A. All matrices and vectors will be real and this will not be explicitly mentioned. I use the Matlab notation to address parts of vectors and matrices, for instance M (:, 3) is the third column of a matrix M and M (2 : 4, :) picks from M the submatrix consisting of rows 2 to 4. Furthermore, again like in Matlab, I use the operator diag in a “toggling” mode: diag A returns the diagonal vector of a square matrix A, and diag d constructs a diagonal matrix from a vector d of diagonal elements. Another Matlab notation that will be used is “.∗” for the element-wise multiplication of vectors and matrices of the same size, and “.∧ ” for element-wise exponentation of vectors and matrices. R(A) and N (A) denote the range and null space of a matrix A. For linear subspaces S, T of Rn , S ⊥ is the orthogonal complement space of S and S + T is the direct sum {x + y | x ∈ S, y ∈ T } of S and T . PS is the n × n dimensional projection matrix on a linear subspace S of Rn . For a k-dimensional linear subspace S of Rn , BS denotes any n × k dimensional matrix whose columns form an orthonormal basis of S. Such matrices BS will occur only in contexts where the choice of basis can be arbitrary. It holds that PS = BS (BS )0 . E[x(n)] denotes the expectation (temporal average) of a stationary signal x(n) (assuming it is well-defined, for instance, coming from an ergodic source). For a matrix M , kM kfro is the Frobenius norm of M . For real M , it is the square root of the summed squared elements of M . If M is positive semidefinite with SVD M = U SU 0 , kM kfro is the same as the 2-norm of the diagonal vector of S, i.e. kM kfro = ((diagS)0 (diagS))1/2 . Since in this report I will exclusively use the Frobenius norm for matrices, I sometimes omit the subscript and write kM k for simplicity. In a number of simulation experiments, a network-generated signal y(n) will be matched against a target pattern p(n). The accuracy of the p match will be quantified by the normalized root mean square error (NRMSE), [(y(n) − p(n))2 ]/[(p(n)2 ], where [·] is the mean operator over data points n. The symbol N is reserved for the size of a reservoir (= number of neurons) throughout. 28 3 Theory and Demonstrations This is the main section of this report. Here I develop in detail the concepts, mathematical analysis, and algorithms, and I illustrate various aspects in computer simulations. Figure 10 gives a navigation guide through the dependency tree of the components of this section. Basic theory and usage of conceptors: 3.1 – 3.6 Morphing patterns demo: 3.7 How conceptors relate to neural data; aperture; chaotic attractor demo: 3.8 Boolean conceptor logic and abstraction: 3.9, 3.10 Memory management demo: 3.11 Pattern recognition demo: 3.12 Autoconceptors: 3.13 random feature conceptors, biological plausibility: 3.14 Hierarchical filtering architecture: 3.15 Conceptor logic: 3.16, 3.17 Figure 10: Dependency tree of subsections in Section 3. The program code (Matlab) for all simulations can be retrieved from http://minds.jacobs-university.de/sites/default/files/uploads/...\.. .SW/ConceptorsTechrepR1Matlab.zip. 3.1 Networks and Signals Throughout this report, I will be using discrete-time recurrent neural networks made of simple tanh neurons, which will be driven by an input time series p(n). In the case of 1-dimensional input, these networks consist of (i) a “reservoir” of N recurrently connected neurons whose activations form a state vector x = (x1 , . . . , xN )0 , (ii) one external input neuron that serves to drive the reservoir with training or cueing signals p(n) and (iii) another external neuron which serves to read out a scalar target signal y(n) from the reservoir (Fig. 11). The system 29 operates in discrete timesteps n = 0, 1, 2, . . . according to the update equations x(n + 1) = tanh(W x(n) + W in p(n + 1) + b) y(n) = W out x(n), (1) (2) where W is the N × N matrix of reservoir-internal connection weights, W in is the N × 1 sized vector of input connection weights, W out is the 1× N vector of readout weights, and b is a bias. The tanh is a sigmoidal function that is applied to the network state x component-wise. Due to the tanh, the reservoir state space or simply state space is (−1, 1)N . The input weights and the bias are fixed at random values and are not subject to modification through training. The output weights W out are learnt. The reservoir weights W are learnt in some of the case studies below, in others they remain fixed at their initial random values. If they are learnt, they are adapted from a random initialization denoted by W ∗ . Figure 11 A illustrates the basic setup. I will call the driving signals p(n) patterns. In most parts of this report, patterns will be periodic. Periodicity comes in two variants. First, integer-periodic patterns have the property that p(n) = p(n+k) for some positive integer k. Second, irrational-periodic patterns are discretely sampled from continuous-time periodic signals, where the sampling interval and the period length of the continuous-time √ signal have an irrational ratio. An example is p(n) = sin(2 π n/(10 2)). These two sorts of drivers will eventually lead to different kinds of attractors trained into reservoirs: integer-periodic signals with period length P yield attractors consisting of P points in reservoir state space, while irrational-periodic signals give rise to attracting sets which can be topologically characterized as one-dimensional cycles that are homeomorphic to the unit cycle in R2 . 3.2 Driving a Reservoir with Different Patterns A basic theme in this report is to develop methods by which a collection of different patterns can be loaded in, and retrieved from, a single reservoir. The key for these methods is an elementary dynamical phenomenon: if a reservoir is driven by a pattern, the entrained network states are confined to a linear subspace of network state space which is characteristic of the pattern. In this subsection I illuminate this phenomenon by a concrete example. This example will be re-used and extended on several occasions throughout this report. I use four patterns. The first two are irrational periodic and the last two are integer-periodic: (1) a sinewave of period ≈ 8.83 sampled at integer times (pattern p1 (n)) (2) a sinewave p2 (n) of period ≈ 9.83 (period of p1 (n) plus 1), (3) a random 5-periodic pattern p3 (n) and (4) a slight variation p4 (n) thereof (Fig. 12 left column). A reservoir with N = 100 neurons is randomly created. At creation time the input weights W in and the bias b are fixed at random values; these will never be modified thereafter. The reservoir weights are initialized to random values W ∗ ; 30 $" p j (n) x ij (n) W p W ! ! ! !" x lj (n "1) in Wi ! W out y ! x ! ! ! ! ! #" ! ! x kj (n "1) W i* x lj (n "1) j x mj (n "1) ! x kj (n "1) x i (n) ! ! in x mj (n "1) Wi ! ! 11: A. Basic system setup. Through input connections Figure W in , an input neuron feeds a driving signal p to a “reservoir” of N = 100 neurons which are recur! W . From the N -dimensional rently connected to each other through connections neuronal activation state x, an output signal y is read out by connections W out . All broken connections are trainable. B. During the initial driving of the reservoir with driver pj , using initial random weights W ∗ , neuron xi produces its signal (thick gray line) based on external driving input p and feeds from other neurons x from within the reservoir (three shown). C. After training new reservoir weights W , the same neuron should produce the same signal based only on the feeds from other reservoir neurons. in this first demonstration they will not be subsequently modified either. The readout weights are initially undefined (details in Section 4.1). In four successive and independent runs, the network is driven by feeding the respective pattern pj (n) as input (j = 1, . . . , 4), using the update rule xj (n + 1) = tanh(W ∗ xj (n) + W in pj (n + 1) + b). After an initial washout time, the reservoir dynamics becomes entrained to the driver and the reservoir state xj (n) exhibits an involved nonlinear response to the driver pj . After this washout, the reservoir run is continued for L = 1000 steps, and the obtained states xj (n) are collected into N × L = 100 × 1000 sized state collection matrices X j for subsequent use. The second column in Fig. 12 shows traces of three randomly chosen reservoir neurons in the four driving conditions. It is apparent that the reservoir has become entrained to the driving input. Mathematically, this entrainment is captured by the concept of the echo state property: any random initial state of a reservoir is “forgotten”, such that after a washout period the current network state is a 31 function of the driver. The echo state property is a fundamental condition for RNNs to be useful in learning tasks [54, 12, 46, 112, 101, 71]. It can be ensured by an appropriate scaling of the reservoir weight matrix. All networks employed in this report possess the echo state property. driver and y reservoir states 1 0 !1 0.0064 1 0 !1 0.0059 1 0 !1 0.091 1 0 !1 0 0.088 10 20 0 10 log10 PC energy 10 0 !10 !20 0 50 100 10 0 !10 !20 0 50 100 10 0 !10 !20 0 50 100 10 0 !10 !20 20 0 50 100 leading PC energy 40 20 0 0 40 5 10 5 10 5 10 5 10 20 0 0 40 20 0 0 40 20 0 0 Figure 12: The subspace phenomenon. Each row of panels documents situation when the reservoir is driven by a particular input pattern. “Driver and y”: the driving pattern (thin black line) and the signals retrieved with conceptors (broad light gray line). Number inset is the NRMSE between original driver and retrieved signal. “Reservoir states”: activations of three randomly picked reservoir neurons. “Log10 PC energy”: log10 of reservoir signal energies in the principal component directions. “Leading PC energy”: close-up on first ten signal energies in linear scale. Notice that the first two panels in each row show discrete-time signals; points are connected by lines only for better visual appearance. A principal component analysis (PCA) of the 100 reservoir signals reveals that the driven reservoir signals are concentrated on a few principal directions. Concretely, for each of the four driving conditions, the reservoir state correlation matrix was estimated by Rj = X j (X j )0 /L, and its SVD U j Σj (U j )0 = Rj was computed, where the columns of U j are orthonormal eigenvectors of Rj (the principal component (PC) vectors), and the diagonal of Σj contains the singular values of Rj , i.e. the energies (mean squared amplitudes) of the principal signal components. Figure 12 (third and last column) shows a plot of these principal component energies. The energy spectra induced by the two irrational-period sines look markedly different from the spectra obtained from the two 5-periodic signals. The latter lead to nonzero energies in exactly 5 principal directions because the driven reservoir dynamics periodically visits 5 states (the small but nonzero values in the log10 32 plots in Figure 12 are artefacts earned from rounding errors in the SVD computation). In contrast, the irrational-periodic drivers lead to reservoir states which linearly span all of RN (Figure 12, upper two log10 plots). All four drivers however share a relevant characteristic (Figure 12, right column): the total reservoir energy is concentrated in a quite small number of leading principal directions. When one inspects the excited reservoir dynamics in these four driving conditions, there is little surprise that the neuronal activation traces look similar to each other for the first two and in the second two cases (Figure 12, second column). This “similarity” can be quantified in a number of ways. Noting that the geometry of the “reservoir excitation space” in driving condition j is characterized by a hyperellipsoid with main axes U j and axis lengths diag Σj , a natural way to define a similarity between two such ellipsoids i, j is to put simR i,j = k(Σi )1/2 (U i )0 U j (Σj )1/2 k2 . kdiagΣi k kdiagΣj k (3) The measure simR i,j ranges in [0, 1]. It is 0 if and only if the reservoir signals i j x , x populate orthogonal linear subspaces, and it is 1 if and only if Ri = a Rj for some scaling factor a. The measure simR i,j can be understood as a generalized squared cosine between Ri and Rj . Figure 13 A shows the similarity matrix (simR i,j )i,j obtained from (3). The similarity values contained in this matrix appear somewhat counter-intuitive, inasmuch as the reservoir responses to the sinewave patterns come out as having similarities of about 0.6 with the 5-periodic driven reservoir signals; this does not agree with the strong visual dissimilarity apparent in the state plots in Figure 12. In Section 3.5 I will introduce another similarity measure which agrees better with intuitive judgement. A B C Figure 13: Matrix plots of pairwise similarity between the subspaces excited in the four driving conditions. Grayscale coding: 0 = black, 1 = white. A: i similarity simR i,j based on the data correlation matrices R . B,C: similarities based i on conceptors C(R , α) for two different values of aperture α. For explanation see text. 33 3.3 Storing Patterns in a Reservoir, and Training the Readout One of the objectives of this report is a method for storing several driving patterns in a single reservoir, such that these stored patterns can later be retrieved and otherwise be controlled or manipulated. In this subsection I explain how the initial “raw” reservoir weights W ∗ are adapted in order to “store” or “memorize” the drivers, leading to a new reservoir weight matrix W . I continue with the four-pattern-example used above. The guiding idea is to enable the reservoir to re-generate the driven responses j x (n) in the absence of the driving input. Consider any neuron xi (Fig. 11B). During the driven runs j = 1, . . . , 4, it has been updated per xji (n + 1) = tanh(Wi∗ xj (n) + Wiin pj (n + 1) + bi ), where Wi∗ is the i-th row in W ∗ , Wiin is the i-th element of W in , and bi is the ith bias component. The objective for determining new reservoir weights W is that the trained reservoir should be able to oscillate in the same four ways as in the external driving conditions, but without the driving input. That is, the new weights Wi leading to neuron i should approximate tanh(Wi∗ xj (n) + Wiin pj (n + 1) + bi ) ≈ tanh(Wi xj (n) + bi ) as accurately as possible, for j = 1, . . . , 4. Concretely, we optimize a mean square error criterion and compute X X (Wi∗ xj (n) + Wiin pj (n + 1) − W̃i xj (n))2 , (4) Wi = argminW̃i j=1,...,K n=1,...,L where K is the number of patterns to be stored (in this example K = 4). This is a linear regression task, for which a number of standard algorithms are available. I employ ridge regression (details in Section 4.1). The readout neuron y serves as passive observer of the reservoir dynamics. The objective to determine its connection weights W out is simply to replicate the driving input, that is, W out is computed (again by ridge regression) such that it minimizes the squared error (pj (n) − W out xj (n))2 , averaged over time and the four driving conditions. I will refer to this preparatory training as storing patterns pj in a reservoir, and call a reservoir loaded after patterns have been stored. 3.4 Conceptors: Introduction and Basic Usage in Retrieval How can these stored patterns be individually retrieved again? After all, the storing process has superimposed impressions of all patterns on all of the recomputed connection weights W of the network – very much like the pixel-wise 34 addition of different images would yield a mixture image in which the individual original images are hard to discern. One would need some sort of filter which can disentangle again the superimposed components in the connection weights. In this section I explain how such filters can be obtained. The guiding idea is that for retrieving pattern j from a loaded reservoir, the reservoir dynamics should be restricted to the linear subspace which is characteristic for that pattern. For didactic reasons I start with a simplifying assumption (to be dropped later). Assume that there exists a (low-dimensional) linear subspace S j ⊂ RN such that all state vectors contained in the driven state collection X j lie in S j . In our example, this is actually the case for the two 5-periodic patterns. Let PS j be the projector matrix which projects RN on S j . We may then hope that if we run the loaded reservoir autonomously (no input), constraining its states to S j using the update rule x(n + 1) = PS j tanh(W x(n) + b), (5) it will oscillate in a way that is closely related to the way how it oscillated when it was originally driven by pj . However, it is not typically the case that the states obtained in the original driving conditions are confined to a proper linear subspace of the reservoir state space. Consider the sine driver p1 in our example. The linear span of the reservoir response state is all of RN (compare the log10 PC energy plots in Figure 12). The associated projector would be the identity, which would not help to single out an individual pattern in retrieval. But actually we are not interested in those principal directions of reservoir state space whose excitation energies are negligibly small (inspect again the quick drop of these energies in the third column, top panel in Figure 12 – it is roughly exponential over most of the spectrum, except for an even faster decrease for the very first few singular values). Still considering the sinewave pattern p1 : instead of PRN we would want a projector that projects on the subspace spanned by a “small” number of leading principal components of the “excitation ellipsoid” described by the sine-driver-induced correlation matrix R1 . What qualifies as a “small” number is, however, essentially arbitrary. So we want a method to shape projector-like matrices from reservoir state correlation matrices Rj in a way that we can adjust, with a control parameter, how many of the leading principal components should become registered in the projector-like matrix. At this point I give names to the projector-like matrices and the adjustment parameter. I call the latter the aperture parameter, denoted by α. The projectorlike matrices will be called conceptors and generally be denoted by the symbol C. Since conceptors are derived from the ellipsoid characterized by a reservoir state corrlation matrix Rj , and parametrized by the aperture parameter, I also sometimes write C(Rj , α) to make this dependency transparent. There is a natural and convenient solution to meet all the intuitive objectives for conceptors that I discussed up to this point. Consider a reservoir driven by 35 a pattern pj (n), leading to driven states xj (n) collected (as columns) in a state collection matrix X j , which in turn yields a reservoir state correlation matrix Rj = X j (X j )0 /L. We define a conceptor C(Rj , α) with the aid of a cost function L(C | Rj , α), whose minimization yields C(Rj , α). The cost function has two components. The first component reflects the objective that C should behave as a projector matrix for the states that occur in the pattern-driven run of the reservoir. This component is En [kxj (n) − Cxj (n)k2 ], the time-averaged deviation of projections Cxj from the state vectors xj . The second component of L adjusts how many of the leading directions of Rj should become effective for the projection. This component is α−2 kCk2fro . This leads to the following definition. Definition 1 Let R = E[xx0 ] be an N × N correlation matrix and α ∈ (0, ∞). The conceptor matrix C = C(R, α) associated with R and α is C(R, α) = argminC E[kx − Cxk2 ] + α−2 kCk2fro . (6) The minimization criterion (6) uniquely specifies C(R, α). The conceptor matrix can be effectively computed from R and α. This is spelled out in the following proposition, which also lists elementary algebraic properties of conceptor matrices: Proposition 1 Let R = E[x x0 ] be a correlation matrix and α ∈ (0, ∞). Then, 1. C(R, α) can be directly computed from R and α by C(R, α) = R (R + α−2 I)−1 = (R + α−2 I)−1 R, (7) 2. if R = U ΣU 0 is the SVD of R, then the SVD of C(R, α) can be written as C = U SU 0 , i.e. C has the same principal component vector orientation as R, 3. the singular values si of C relate to the singular values σi of R by si = σi /(σi + α−2 ), 4. the singular values of C range in [0, 1), 5. R can be recovered from C and α by R = α−2 (I − C)−1 C = α−2 C (I − C)−1 . (8) The proof is given in Section 5.1. Notice that all inverses appearing in this proposition are well-defined because α > 0 is assumed, which implies that all singular values of C(R, α) are properly smaller than 1. I will later generalize conceptors to include the limiting cases α = 0 and α = ∞ (Section 3.8.1). In practice, the correlation matrix R = E[xx0 ] is estimated from a finite sample X, which leads to the approximation R̂ = XX 0 /L, where X = (x(1), . . . , x(L)) is a matrix containing reservoir states x(n) collected during a learning run. 36 Figure 14 shows the singular value spectra of C(R, α) for various values of α, for our example cases of R = R1 (irrational-period sine driver) and R = R3 (5periodic driver). We find that the nonlinearity inherent in (7) makes the conceptor matrices come out “almost” as projector matrices: the singular values of C are mostly close to 1 or close to 0. In the case of the 5-periodic driver, where the excited network states populate a 5-dimensional subspace of RN , increasing α lets C(R, α) converge to a projector onto that subspace. sine (pattern 1) 10ïperiodic random (pattern 3) 1 0 0 1 50 0 0 100 _=1 _ = 10 _ = 100 _ = 1000 _ = 10000 50 100 Figure 14: How the singular values of a conceptor depend on α. Singular value spectra are shown for the first sinewave pattern and the first 5-periodic random pattern. For explanation see text. If one has a conceptor matrix C j = C(Rj , α) derived from a pattern pj through the reservoir state correlation matrix Rj associated with that pattern, the conceptor matrix can be used in an autonomous run (no external input) using the update rule x(n + 1) = C j tanh(W x(n) + b), (9) where the weight matrix W has been shaped by storing patterns among which there was pj . Returning to our example, four conceptors C 1 , . . . , C 4 were computed with α = 10 and the loaded reservoir was run under rule (9) from a random initial state x(0). After a short washout period, the network settled on stable periodic dynamics which were closely related to the original driving patterns. The network dynamics was observed through the previously trained output neuron. The left column in Figure 12 shows the autonomous network output as a light bold gray line underneath the original driver. To measure the achieved accuracy, the autonomous output signal was phase-aligned with the driver (details in Section 4.1) and then the NRMSE was computed (insets in Figure panels). The NRMSEs indicate that the conceptor-constrained autonomous runs could successfully separate from each other even the closely related pattern pairs p1 versus p2 and p3 versus p4 . A note on terminology. Equation (9) shows a main usage of conceptor matrices: they are inserted into the reservoir state feedback loop and cancel (respectively, dampen) those reservoir state components which correspond to directions in state space associated with zero (or small, respectively) singular values in the 37 conceptor matrix. In most of this report, such a direction-selective damping in the reservoir feedback loop will be effected by way of inserting matrices C like in Equation (9). However, inserting a matrix is not the only way by which such a direction-selective damping can be achieved. In Section 3.15, which deals with biological plausibility issues, I will propose a neural circuit which achieves a similar functionality of direction-specific damping of reservoir state components by other means and with slightly differing mathematical properties. I understand the concept of a “conceptor” as comprising any mechanism which effects a patternspecific damping of reservoir signal components. Since in most parts of this report this will be achieved with conceptor matrices, as in (9), I will often refer to these C matrices as “conceptors” for simplicity. The reader should however bear in mind that the notion of a conceptor is more comprehensive than the notion of a conceptor matrix. I will not spell out a formal definition of a “conceptor”, deliberately leaving this concept open to become instantiated by a variety of computational mechanisms of which only two are formally defined in this report (via conceptor matrices, and via the neural circuit given in Section 3.15). 3.5 A Similarity Measure for Excited Network Dynamics In Figure 13 A a similarity matrix is presented which compares the excitation ellipsoids represented by the correlation matrices Rj by the similarity metric (3). I remarked at that time that this is not a fully satisfactory metric, because it does not agree well with intuition. We obtain a more intuitively adequate similiarity metric if conceptor matrices are used as descriptors of “subspace ellipsoid geometry” instead of the raw correlation matrices, i.e. if we employ the metric simαi,j k(S i )1/2 (U i )0 U j (S j )1/2 k2 , = kdiagS i k kdiagS j k (10) where U S j U 0 is the SVD of C(Rj , α). Figure 13 B,C shows the similarity matrices arising in our standard example for α = 10 and α = 10, 000. The intuitive dissimilarity between the sinewave and the 5-periodic patterns, and the intuitive similarity between the two sines (and the two 5-periodic pattern versions, respectively) is revealed much more clearly than on the basis of simR i,j . R α When interpreting similarities simi,j or simi,j one should bear in mind that one is not comparing the original driving patterns but the excited reservoir responses. 3.6 Online Learning of Conceptor Matrices The minimization criterion (6) immediately leads to a stochastic gradient online method for adapting C: Proposition 2 Assume that a stationary source x(n) of N -dimensional reservoir states is available. Let C(1) be any N × N matrix, and λ > 0 a learning rate. 38 Then the stochastic gradient adaptation  C(n + 1) = C(n) + λ (x(n) − C(n) x(n)) x0 (n) − α−2 C(n) (11) will lead to limλ↓0 limn→∞ C(n) = C(E[x x0 ], α). The proof is straightforward if one employs generally known facts about stochastic gradient descent and the fact that E[kx − Cxk2 ] + α−2 kCk2fro is positive definite quadratic in the N 2 -dimensional space of elements of C (shown in the proof of Proposition 1), and hence provides a Lyapunov function for the gradient descent (11). The gradient of E[kx − Cxk2 ] + α−2 kCk2fro with respect to C is ∂ E[kx − Cxk2 ] + α−2 kCk2fro = (I − C) E[xx0 ] − α−2 C, ∂C (12) which immediately yields (11). The stochastic update rule (11) is very elementary. It is driven by two components, (i) an error signal x(n) − C(n) x(n) which simply compares the current state with its C-mapped value, and (ii) a linear decay term. We will make heavy use of this adaptive mechanism in Sections 3.14.1 ff. This observation is also illuminating the intuitions behind the definition of conceptors. The two components strike a compromise (balanced by α) between (i) the objective that C should leave reservoir states from the target pattern unchanged, and (ii) C should have small weights. In the terminology of machine learning one could say, “a conceptor is a regularized identity map”. 3.7 Morphing Patterns Conceptor matrices offer a way to morph RNN dynamics. Suppose that a reservoir has been loaded with some patterns, among which there are pi and pj with corresponding conceptors C i , C j . Patterns that are intermediate between pi and pj can be obtained by running the reservoir via (9), using a linear mixture between C i and C j :  x(n + 1) = (1 − µ)C i + µC j tanh(W x(n) + b). (13) Still using our four-pattern example, I demonstrate how this morphing works out for morphing (i) between the two sines, (ii) between the two 5-periodic patterns, (iii) between a sine and a 5-periodic pattern. Frequency Morphing of Sines In this demonstration, the morphing was done for the two sinewave conceptors C 1 = C(R1 , 10) and C 2 = C(R2 , 10). The morphing parameter µ was allowed to range from −2 to +3 (!). The four-pattern-loaded reservoir was run from a random initial state for 500 washout steps, using (13) with µ = −2. Then recording was started. First, the run was continued with the intial µ = −2 for 50 steps. Then, µ was linearly ramped up from µ = −2 to µ = 3 during 200 steps. Finally, another 50 steps were run with the final setting µ = 3. 39 Note that morph values µ = 0 and µ = 1 correspond to situations where the reservoir is constrained by the original conceptors C 1 and C 2 , respectively. Values 0 ≤ µ ≤ 1 correspond to interpolation. Values −2 ≤ µ < 0 and 1 < µ ≤ 3 correspond to extrapolation. The extrapolation range on either side is twice as long as the interpolation range. In addition, for eight equidistant values µk in −2 ≤ µ < 3, the reservoir was run with a mixed conceptor C = (1−µk )C 1 +µk C 2 for 500 steps, and the obtained observation signal y(n) was plotted in a delay-embedded representation, yielding “snapshots” of the reservoir dynamics at these µ values (a delay-embedding plot of a 1-dimensional signal y(n) creates a 2-dimensional plot by plotting value pairs (y(n), y(n − d)) with a delay d chosen to yield an appealing visual appearance). # ! !# ! #" "! #!! #"! $!! $"! %!! #! " Figure 15: Morphing between (and beyond) two sines. The morphing range was −2 ≤ µ ≤ 3. Black circular dots in the two bottom panels mark the points µ = 0 and µ = 1, corresponding to situations where the two original conceptors C 1 , C 2 were active in unadulterated form. Top: Delay-embedding plots of network observation signal y(n) (delay = 1 step). Thick points show 25 plotted points, thin points show 500 points (appearing as connected line). The eight panels have a plot range of [−1.4, 1.4] × [−1.4, 1.4]. Triangles in center panel mark the morph positions corresponding to the delay embedding “snapshots”. Center: the network observation signal y(n) of a morph run. Bottom: Thin black line: the period length obtained from morphing between (and extrapolating beyond) the original period lengths. Bold gray line: period lengths measured from the observation signal y(n). Figure 15 shows the findings. The reservoir oscillates over the entire inter/extrapolation range with a waveform that is approximately equal to a sampled sine. At the morph values µ = 0 and µ = 1 (indicated by dots in the Figure), the system is in exactly the same modes as they were plotted earlier in the first two panels of the left column in Figure 12. Accordingly the fit between the original 40 driver’s period lenghtes and the autonomously re-played oscillations is as good as it was reported there (i.e. corresponding to a steady-state NRMSE of about 0.01). In the extrapolation range, while the linear morphing of the mixing parameter µ does not lead to an exact linear morphing of the observed period lengths, still the obtained period lengths steadily continue to decrease (going left from µ = 0) and to increase (going right from µ = 1). In sum, it is possible to use conceptor-morphing to extend sine-oscillatory reservoir dynamics from two learnt oscillations of periods ≈ 8.83, 9.83 to a range between ≈ 7.5 − 11.9 (minimal and maximal values of period lengths shown in the Figure). The post-training sinewave generation thus extrapolated beyond the period range spanned by the two training samples by a factor of about 4.4. From a perspective of machine learning this extrapolation is remarkable. Generally speaking, when neural pattern generators are trained from demonstration data (often done in robotics, e.g. [52, 91]), interpolation of recallable patterns is what one expects to achieve, while extrapolation is deemed hard. From a perspective of neurodynamics, it is furthermore remarkable that the dimension of interpolation/extrapolation was the speed of the oscillation. Among the infinity of potential generalization dimensions of patterns, speedup/slowdown of pattern generation has a singular role and is particularly difficult to achieve. The reason is that speed cannot be modulated by postprocessing of some underlying generator’s output – the prime generator itself must be modulated [110]. Frequency adaptation of neural oscillators is an important theme in research on biological pattern generators (CPGs) (reviews: [40, 50]). Frequency adaptation has been modeled in a number of ways, among which (i) to use a highly abstracted CPG model in the form of an ODE, and regulate speed by changing the ODE’s time constant; (ii) to use a CPG model which includes a pacemaker neuron whose pace is adaptive; (iii) to use complex, biologically quite detailed, modular neural architectures in which frequency adapatation arises from interactions between modules, sensor-motoric feedback cycles, and tonic top-down input. However, the fact that humans can execute essentially arbitrary motor patterns at different speeds is not explained by these models. Presumably this requires a generic speed control mechanism which takes effect already at higher (cortical, planning) layers in the motor control hierarchy. Conceptor-controlled frequency adaptation might be of interest as a candidate mechanism for such a “cognitive-level” generic speed control mechanism. Shape Morphing of an Integer-Periodic Pattern In this demonstration, the conceptors C(R3 , 1000) and C(R4 , 1000) from the 5-periodic patterns p3 and p4 were morphed, again with −2 ≤ µ ≤ 3. Figure 16 depicts the network observer y(n) for a morph run of 95 steps which was started with µ = −2 and ended with µ = 3, with a linear µ ramping in between. It can be seen that the differences between the two reference patterns (located at the points marked by dots) become increasingly magnified in both extrapolation segments. At each of the different 41 points in each 5-cycle, the “sweep” induced by the morphing is however neither linear nor of the same type across all 5 points of the period (right panel). A simple algebraic rule that would describe the geometric characteristics of such morphings cannot be given. I would like to say, it is “up to the discretion of the network’s nonlinear dynamics” how the morphing command is interpreted; this is especially true for the extrapolation range. If reservoirs with a different initial random W ∗ are used, different morphing geometries arise, especially at the far ends of the extrapolation range (not shown). ! " !! !" #" $" %" &" '" (" )" *" Figure 16: Morphing between, and extrapolating beyond, two versions of a 5periodic random pattern. The morphing range was −2 ≤ µ ≤ 3. Bottom: Network observation from a morphing run. Dots mark the points µ = 0 and µ = 1, corresponding to situations where the two original conceptors C 1 , C 2 were active in unadulterated form. The network observation signal y(n) is shown. Top: Delayembedding “snapshots”. Figure layout similar to Figure 15. The snapshots displayed in Figure 16 reveal that the morphing sweep takes the reservoir through two bifurcations (apparent in the transition from snapshot 2 to 3, and from 7 to 8). In the intermediate morphing range (snapshots 3 – 7), we observe a discrete periodic attractor of 5 points. In the ranges beyond, on both sides the attracting set becomes topologically homomorphic to a continuous cycle. From a visual inspection, it appears that these bifurcations “smoothly” preserve some geometrical characteristics of the observed signal y(n). A mathematical characterisation of this phenomenological continuity across bifurcations remains for future investigations. Heterogeneous Pattern Morphing Figure 17 shows a morph from the 5periodic pattern p3 to the irrational-periodic sine p2 (period length ≈ 9.83). This time the morphing range was 0 ≤ µ ≤ 1, (no extrapolation). The Figure shows a run with an initial 25 steps of µ = 0, followed by a 50-step ramp to µ = 1 and a tail of 25 steps at the same µ level. One observes a gradual change of signal shape and period along the morph. From a dynamical systems point of view this gradual change is unexpected. The reservoir is, mathematically speaking, an 42 autonomous system under the influence of a slowly changing control parameter µ. On both ends of the morph, the system is in an attractor. The topological nature of the attractors (seen as subsets of state space) is different (5 isolated points vs. a homolog of a 1-dim circle), so there must be a at least one bifurcation taking place along the morphing route. Such a bifurcations would usually be accompanied by a sudden change of some qualitative characteristic of the system trajectory. We find however no trace of a dynamic rupture, at least not by visual inspection of the output trajectory. Again, a more in-depth formal characterization of what geometric properties are “smoothly” carried through these bifurcations is left for future work. Figure 2 in Section 1 is a compound demonstration of the three types of pattern morphing that I here discussed individually. A possible application for the pattern morphing by conceptors is to effect smooth gait changes in walking robots, a problem that is receiving some attention in that field. " ! !" ! "! #! $! %! &! '! (! )! *! "!! "! & Figure 17: Morphing from a 5-periodic random pattern to an irrational-periodic sine. The morphing range was 0 ≤ µ ≤ 1. Figure layout otherwise is as in Figure 15. 3.8 3.8.1 Understanding Aperture The Semantics of α as “Aperture” Here I show how the parameter α can be interpreted as a scaling of signal energy, and motivate why I call it “aperture”. We can rewrite C(R, α) = C(E[xx0 ], α) as follows: 43 C(E[xx0 ], α) = E[xx0 ](E[xx0 ] + α−2 I)−1 = E[(αx)(αx)0 ](E[(αx)(αx)0 ] + I)−1 = C(E[(αx)(αx)0 ], 1) = C(α2 E[xx0 ], 1). (14) Thus, changing from C(R, 1) to C(R, α) can be interpreted as scaling the reservoir data by a factor of α, or expressed in another way, as scaling the signal energy of the reservoir signals by a factor of α2 . This is directly analog to what adjusting the aperture effects in an optical camera. In optics, the term aperture denotes the diameter of the effective lens opening, and the amount of light energy that reaches the film is proportional to the squared aperture. This has motivated the naming of the parameter α as aperture. 3.8.2 Aperture Adaptation and Final Definition of Conceptor Matrices It is easy to verify that if Cα = C(R, α) and Cβ = C(R, β) are two versions of a conceptor C differing in their apertures 0 < α, β < ∞, they are related to each other by !−1  2 α Cβ = Cα Cα + (I − Cα ) , (15) β where we note that Cα + (α/β)2 (I − Cα ) is always invertible. Cβ is thus a function of Cα and the ratio γ = β/α. This motivates to introduce an aperture adaptation operation ϕ on conceptors C, as follows: ϕ(C, γ) = C (C + γ −2 (I − C))−1 , (16) where ϕ(C, γ) is the conceptor version obtained from C by adjusting the aperture of C by a factor of γ. Specifically, it holds that C(R, α) = ϕ(C(R, 1), α). We introduce the notation RC = C(I − C)−1 , which leads to the following easily verified data-based version of (16): Rϕ(C,γ) = γ 2 RC . (17) When we treat Boolean operations further below, it will turn out that the NOT operation will flip zero singular values of C to unit singular values. Because of this circumstance, we admit unit singular values in conceptors and formally define Definition 2 A conceptor matrix is a positive semidefinite matrix whose singular values range in [0, 1]. We denote the set of all N × N conceptor matrices by CN . Note that Definition 1 defined the concept of a conceptor matrix associated with a state correlation matrix R and an aperture α, while Definition 2 specifies the more general class of conceptor matrices. Mathematically, conceptor matrices (as in Definition 2) are more general than the conceptor matrices associated with a state correlation matrix R, in that the former may contain unit singular values. 44 Furthermore, in the context of Boolean operations it will also become natural to admit aperture adaptations of sizes γ = 0 and γ = ∞. The inversion in Equation (16) is not in general well-defined for such γ and/or conceptors with unit singular values, but we can generalize those relationships to the more general versions of conceptors and aperture adaptations by a limit construction: Definition 3 Let C be a conceptor and γ ∈ [0, ∞]. Then  for 0 < γ < ∞  C (C + γ −2 (I − C))−1 limδ↓0 C (C + δ −2 (I − C))−1 for γ = 0 ϕ(C, γ) =  −2 −1 limδ↑∞ C (C + δ (I − C)) for γ = ∞ (18) It is a mechanical exercise to show that the limits in (18) exist, and to calculate the singular values for ϕ(C, γ). The results are collected in the following proposition. Proposition 3 Let C = U SU 0 be a conceptor and (s1 , . . . , sN )0 = diagS the vector of its singular values. Let γ ∈ [0, ∞]. Then ϕ(C, γ) = U Sγ U 0 is the conceptor with singular values (sγ,1 , . . . , sγ,N )0 , where  si /(si + γ −2 (1 − si )) for 0 < si < 1, 0 < γ < ∞     0 for 0 < si < 1, γ = 0  1 for 0 < si < 1, γ = ∞ sγ,i = (19)   0 for si = 0, 0 ≤ γ ≤ ∞    1 for si = 1, 0 ≤ γ ≤ ∞ Since aperture adaptation of C = U SU 0 only changes the singular values of C, the following fact is obvious: Proposition 4 If V is orthonormal, then ϕ(V CV 0 , γ) = V ϕ(C, γ) V 0 . Iterated application of aperture adaptation corresponds to multiplying the adaptation factors: Proposition 5 Let C be a conceptor and γ, β ∈ [0, ∞]. Then ϕ(ϕ(C, γ), β) = ϕ(C, γβ). The proof is a straightforward algebraic verification using (19). Borrowing again terminology from photography, I call a conceptor with SVD C = U SU 0 hard if all singular values in S are 0 or 1 (in photography, a film with an extremely “hard” gradation yields pure black-white images with no gray tones.) Note that C is hard if and only if it is a projector matrix. If C is hard, the following holds: C = C † = C 0 = CC, ϕ(C, γ) = C for γ ∈ [0, ∞]. 45 (20) (21) The first claim amounts to stating that C is a projection operator, which is obviously the case; the second claim follows directly from (19). Besides the aperture, another illuminating characteristic of a conceptor matrix is the mean value of its singular values, i.e. its normalized trace q(C) = trace(C)/N . It ranges in [0, 1]. Intuitively, this quantity measures the fraction of dimensions from the N -dimensional reservoir state space that is claimed by C. I will call it the quota of C. 3.8.3 Aperture Adaptation: Example In applications one will often need to adapt the aperture to optimize the quality of C. What “quality” means depends on the task at hand. I present an illustrative example, where the reservoir is loaded with very fragile patterns. Retrieving them requires a prudent choice of α. Specifically, I loaded a reservoir of size N = 500 with four chaotic patterns, derived from the well-known Rössler, Lorenz, MackeyGlass, and Hénon attractors (details of this example are given in Section 4.2). Four conceptors CR , CL , CM G , CH were computed, one for each attractor, using α = 1. Then, in four retrieval experiments, the aperture of each of these was adapted using (16) in a geometric succession of five different γ, yielding five versions of each of the CR , CL , CM G , CH . Each of these was used in turn for a constrained run of the reservoir according to the state update rule x(n+1) = C tanh(W x(n)+W in p(n+ 1) + b), and the resulting output observation was plotted in a delay-embedding format. Figure 18 displays the findings. Per each attractor, the five apertures were hand-selected such that the middle one (the third) best re-generated the original chaotic signal, while the first failed to recover the original. One should mention that it is not trivial in the first place to train an RNN to stably generate any single chaotic attractor timeseries, but here we require the loaded network to be able to generate any one out of four such signals, only by constraining the reservoir by a conceptor with a suitably adapted aperture. Number insets in the panels of figure 18 indicate the apertures and quotas used per run. 3.8.4 Guides for Aperture Adjustment The four chaotic attractors considered in the previous subsection were “best” (according to visual inspection) reconstructed with apertures between 630 and 1000. A well-chosen aperture is clearly important for working with conceptors. In all demonstrations reported so far I chose a “good” aperture based on experimentation and human judgement. In practice one will often need automated criteria for optimizing the aperture which do not rely on human inspection. In this subsection I propose two measures which can serve as such a guiding criterion. A criterion based on reservoir-conceptor interaction. Introducing an interim state variable z(n) by splitting the conceptor-constrained reservoir update 46 11 0.053 66 0.12 2.4e+03 0.38 1.4e+04 0.58 4e+02 0.23 A 20 0.033 1.4e+02 0.07 7e+03 0.21 4.9e+04 0.33 13 0.031 90 0.066 4.4e+03 0.24 3.1e+04 0.42 1e+03 0.13 B 26 0.083 1.8e+02 0.18 8.8e+03 0.56 6.2e+04 0.82 1.3e+03 0.34 C 6.3e+02 0.13 D Figure 18: Invoking conceptors to retrieve four chaotic signals from a reservoir. A Lorenz, B Rössler, C Mackey-Glass, and D Hénon attractor. All four are represented by delay-embedding plots of the reservoir observation signal y(n). The plot range is [0, 1] × [0, 1] in every panel. A – C are attractors derived from differential equations, hence subsequent points are joined with lines; D derives from an iterated map where joining lines has no meaning. Each 6-panel block shows five patterns generated by the reservoir under the control of differently aperture-adapted versions of a conceptor (blue, first five panels) and a plot of the original chaotic reference signal (green, last panel). Empty panels indicate that the y(n) signal was outside the [0, 1] range. The right upper panel in each block shows a version which, judged by visual inspection, comes satisfactorily close to the original. First number given in a panel: aperture α; second number: quota q(C). equation (9) into z(n + 1) = tanh(W x(n) + b), x(n + 1) = C(R, α) z(n + 1), (22) I define the attenuation measurable a as aC,α = E[kz(n) − x(n)k2 ]/E[kz(n)k2 ], (23) where the states x(n), z(n) are understood to result from a reservoir constrained by C(R, α). The attenuation is the fraction of the reservoir signal energy which is suppressed by applying the conceptor. Another useful way to conceive of this 47 quantity is to view it as noise-to-signal ratio, where the “noise” is the component z(n) − x(n) which is filtered away from the unconstrained reservoir signal z(n). It turns out in simulation experiments that when the aperture is varied, the attenuation aC,α passes through a minimum, and at this minimum, the pattern reconstruction performance peaks. In Figure 19A the log10 of aC,α is plotted for a sweep through a range of apertures α, for each of the four chaotic attractor conceptors (details in Section 4.2). As α grows, the attenuation aC,α first declines roughly linearly in the log-log plots, that is, by a power law of the form aC,α ∼ α−K . Then it enters or passes through a trough. The aperture values that yielded visually optimal reproductions of the chaotic patterns coincide with the point where the bottom of the trough is reached. Lorenz Roessler 0 ï2 ï2 ï4 ï4 ï6 ï6 2 3 4 5 ï8 1 log10 attenuation A 0 ï2 ï4 ï4 ï6 ï6 ï8 1 ï8 1 2 3 4 log10 aperture 5 4 6 1 !2 0 0 2 4 6 0 !1 !5 !2 !2 2 3 4 !10 5 Hénon 0 2 0 MackeyïGlass ï2 0 !5 2 3 log10 attenuation ï8 1 !2 0 4 5 B !2 0 !3 !10 0 2 4 6 1 !2 0 0 !5 !10 !4 0 2 4 6 1 0 !5 log10 aperture !1 !1 !2 !10 !2 log10 NRMSE 0 Figure 19: Using attenuation to locate optimal apertures. A Dependancy of attenuation on aperture for the four chaotic attractors. The blue dots mark the apertures used to generate the plots in Figure 18. B Dependancy of attenuation on aperture for the two sinewaves (top panels) and the two 5-point periodic patterns (bottom) used in Sections 3.2ff. These plots also provide the NRMSEs for the accuracy of the reconstructed patterns (gray). For explanation see text. Figure 19B gives similar plots for the two irrational-period sines and the two 5point periodic patterns treated in earlier sections. The same reservoir and storing procedures as described at that place were utilized again here. The dependence of attenuation on aperture is qualitatively the same as in the chaotic attractor example. The attenuation plots are overlaid with the NRMSEs of the original drivers vs. the conceptor-constrained reservoir readout signals. Again, the “best” aperture – here quantified by the NRMSE – coincides remarkably well with the trough minimum of the attenuation. Some peculiarities visible in the plots B deserve a short comment. (i) The initial constant plateaus in all four plots result from C(R, α) ≈ 0 for the very small apertures in this region, which leads to x(n) ≈ 0, z(n) ≈ tanh(b). (ii) The jittery climb of the attenuation towards the end of the plotting range in the two bottom panels is an artefact due to roundoff errors in SVD computations which blows up singular values in conceptors which in theory should be zero. Without rounding 48 error involved, the attenuation plots would remain at their bottom value once it is reached. (iii) In the top two panels, some time after having passed through the trough the attenuation value starts to decrease again. This is due to the fact that for the irrational-period sinewave signals, all singular values of the conceptors are nonzero. As a consequence, for increasingly large apertures the conceptors will converge to the identity matrix, which would have zero attenuation. A criterion based on conceptor matrix properties. A very simple criterion for aperture-related “goodness” of a conceptor can be obtained from monitoring the gradient of the squared Frobenius norm ∇(γ) = d kϕ(C, γ)k2 d log(γ) (24) with respect to the logarithm of γ. To get an intuition about the semantics of this criterion, assume that C has been obtained from data with a correlation matrix R with SVD R = U ΣU 0 . Then ϕ(C, γ) = R(R + γ −2 I)−1 and kϕ(C, γ)k2 = kΣ(Σ + γ −2 I)−1 k2 = kγ 2 Σ(γ 2 Σ + I)−1 k2 . That is, ϕ(C, γ) can be seen as obtained from data scaled by a factor of γ compared to ϕ(C, 1) = C. The criterion ∇(γ) therefore measures the sensitivity of (the squared norm of) C on (expontential) scalings of data. Using again photography as a metaphor: if the aperture of a lens is set to the value where ∇(γ) is maximal, the sensitivity of the image (= conceptor) to changes in brightness (= data scaling) is maximal. Figure 20 shows the behavior of this criterion again for the standard example of loading two irrational sines and two integer-periodic random patterns. Its maxima coincide largely with the minima of the attenuation criterion, and both with what was “best” performance of the respective pattern generator. The exception is the two integer-periodic patterns (Figure 20 B bottom panels) where the ∇ criterion would suggest a slightly too small aperture. Comments on criteria for guiding aperture selection: • The two presented criteria based on attenuation and norm gradient are purely heuristic. A theoretical analysis would require a rigorous definition of “goodness”. Since tasks vary in their objectives, such an analysis would have to be carried out on a case-by-case basis for varying “goodness” characterizations. Other formal criteria besides the two presented here can easily be construed (I experimented with dozens of alternatives (not documented), some of which performed as well as the two instances reported here). Altogether this appears to be a wide field for experimentation. • The attenuation-based criterion needs trial runs with the reservoir to be calculated, while the norm-gradient criterion can be computed offline. The former seems to be particularly suited for pattern-generation tasks where the conceptor-reservoir feedback loop is critical (for instance, with respect to stability). The latter may be more appropriate in machine learning tasks 49 0 2 4 6 !2 6 1 0 4 0 2 4 6 0 4 !1 2 norm2 gradient 0 !2 1.5 2 !2 !3 0 !4 1 !2 1.5 !2 0 2 4 1 6 4 6 1 0 0.5 !1 0 !0.5 2 1 0 0.5 0 log10 aperture 0 !2!0.5 !1 log10 NRMSE !2 6 !2 Figure 20: The norm-gradient based criterion to determine “good” apertures for the basic demo example from Sections 3.2 and 3.4. Plots show ∇(γ) against the log10 of aperture γ. Figure layout similar as in Figure 19 B. For explanation see text. where conceptors are used for classifying reservoir dynamics in a “passive” way without coupling the conceptors into the network updates. I will give an example in Section 3.13. 3.9 3.9.1 Boolean Operations on Conceptors Motivation Conceptor matrices can be submitted to operations that can be meaningfully called AND, OR, and NOT. There are two justifications for using these classical logical terms: Syntactical / algebraic: Many algebraic laws governing Boolean algebras are preserved; for hard conceptor matrices the preservation is exact. Semantical: These operations on conceptor matrices correspond dually to operations on the data that give rise to the conceptors via (7). Specifically, the OR operation can be semantically interpreted on the data level by merging two datasets, and the NOT operation by inverting the principal component weights of a dataset. The AND operation can be interpreted on the data level by combining de Morgan’s rule (which states that x ∧ y = ¬(¬x ∨ ¬y)) with the semantic interpretations of OR and NOT. The mathematical structures over conceptors that arise from the Boolean operations are richer than standard Boolean logic, in that aperture adaptation operations can be included in the picture. One obtains a formal framework which one might call “adaptive Boolean logic”. 50 There are two major ways how such a theory of conceptor logic may be useful: A logic for information processing in RNNs (cognitive and neuroscience): The dynamics of any N -dimensional RNN (of any kind, autonomously active or driven by external input), when monitored for some time period L, yields an N × L sized state collection matrix X and its corresponding N × N correlation matrix R, from which a conceptor matrix C = R(R + I)−1 can be obtained which is a “fingerprint” of the activity of the network for this period. The Boolean theory of conceptors can be employed to analyse the relationships between such “activity fingerprints” obtained at different intervals, different durations, or from different driving input. An interesting long-term research goal for cognitive neuroscience would be to map the logical structuring described on the network data level, to Boolean operations carried out by task-performing subjects. An algorithmical tool for RNN control (machine learning): By controlling the ongoing activity of an RNN in a task through conceptors which are derived from logical operations, one can implement “logic control” strategies for RNNs. Examples will be given in Section 3.11, where Boolean operations on conceptors will be key for an efficient memory management in RNNs; in Section 3.13, where Boolean operations will enable to combine positive and negative evidences for finite-duration pattern recognition; and in Section 3.16, where Boolean operations will help to simultaneously de-noise and classify signals. 3.9.2 Preliminary Definition of Boolean Operations Defining Boolean operators through their data semantics is transparent and simple when the concerned data correlation matrices are nonsingular. In this case, the resulting conceptor matrices are nonsingular too and have singular values ranging in the open interval (0, 1). I treat this situation in this subsection. However, conceptor matrices with a singular value range of [0, 1] frequently arise in practice. This leads to technical complications which will be treated in the next subsection. The definitions given in the present subsection are preliminary and serve expository purposes. In the remainder of this subsection, conceptor matrices C, B are assumed to derive from nonsingular correlation matrices. I begin with OR. Recall that a conceptor matrix C (with aperture 1) derives from a data source (network states) x through R = E[xx0 ], C = C(R, 1) = R(R + I)−1 . Now consider a second conceptor B of the same dimension N as C, derived from another data source y by Q = E[yy 0 ], B = B(Q, 1) = Q(Q + I)−1 . I define C ∨ B := (R + Q)(R + Q + I)−1 , 51 (25) and name this the OR operation. Observe that R + Q = E[[x, y][x, y]0 ], where [x, y] is the N × 2 matrix made of vectors x, y. C ∨ B is thus obtained by a merge of the two data sources which previously went into C and B, respectively. This provides a semantic interpretation of the OR operation. Using (7), it is straightforward to verify that C ∨ B can be directly computed from C and B by  −1 −1 C ∨ B = I + C(I − C)−1 + B(I − B)−1 , (26) where the assumption of nonsingular R, Q warrants that all inverses in this equation are well-defined. I now turn to the NOT operation. For C = C(R, 1) = R(R + I)−1 with nonsingular R I define it by ¬C := R−1 (R−1 + I)−1 . (27) Again this can be semantically interpreted on the data level. Consider the SVDs R = U ΣU 0 and R−1 = U Σ−1 U 0 . R and R−1 have the same principal components U , but the variances Σ, Σ−1 of data that would give rise to R and R−1 are inverse to each other. In informal terms, ¬C can be seen as arising from data which co-vary inversely compared to data giving rise to C. Like in the case of OR, the negation of C can be computed directly from C. It is easy to see that ¬C = I − C. (28) Finally, I consider AND. Again, we introduce it on the data level. Let again C = R(R + I)−1 , B = Q(Q + I)−1 . The OR operation was introduced as addition on data correlation matrices, and the NOT operation as inversion. Guided by de Morgan’s law a ∧ b = ¬(¬a ∨ ¬b) from Boolean logic, we obtain a correlation matrix (R−1 + Q−1 )−1 for C ∧ B. Via (7), from this correlation matrix we are led to C ∧ B := (R−1 + Q−1 )−1 (R−1 + Q−1 )−1 + I −1 . (29) Re-expressing R, Q in terms of C, B in this equation, elementary transformations (using (7)) again allow us to compute AND directly: C ∧ B = (C −1 + B −1 − I)−1 . (30) By a routine transformation of equations, it can be verified that the de Morgan’s laws C ∨ B = ¬(¬C ∧ ¬B) and C ∧ B = ¬(¬C ∨ ¬B) hold for the direct computation expressions (26), (28) and (30). 52 3.9.3 Final Definition of Boolean Operations We notice that the direct computations (26) and (30) for OR and AND are only well-defined for conceptor matrices whose singular values range in (0, 1). I now generalize the definitions for AND and OR to cases where the concerned conceptors may contain singular values 0 or 1. Since the direct computation (30) of AND is simpler than the direct computation (26) of OR, I carry out the generalization for AND and then transfer it to OR through de Morgan’s rule. Assume that C = U SU 0 , B = V T V 0 are the SVDs of conceptors C, B, where S and/or T may contain zero singular values. The direct computation (30) is then not well-defined. Specifically, assume that diag(S) contains l ≤ N nonzero singular values and that diag(T ) contains m ≤ N nonzero singular values, i.e. diag(S) = (s1 , . . . , sl , 0, . . . , 0)0 and diag(T ) = (t1 , . . . , tm , 0, . . . , 0)0 . Let δ be a positive real number. Define Sδ to be the diagonal matrix which has a diagonal (s1 , . . . , sl , δ, . . . , δ)0 , and similarly Tδ to have diagonal (t1 , . . . , tm , δ, . . . , δ)0 . Put Cδ = U Sδ U 0 , Bδ = V Tδ V 0 . Then Cδ ∧ Bδ = (Cδ−1 + Bδ−1 − I)−1 is well-defined. We now define C ∧ B = lim(Cδ−1 + Bδ−1 − I)−1 . (31) δ→0 The limit in this equation is well-defined and can be resolved into an efficient algebraic computation: Proposition 6 Let BR(C)∩R(B) be a matrix whose columns form an arbitrary orthonormal basis of R(C) ∩ R(B). Then, the matrix B0R(C)∩R(B) (C † + B † − I)BR(C)∩R(B) is invertible, and the limit (31) exists and is equal to C ∧ B = lim(Cδ−1 + Bδ−1 − I)−1 = δ→0 = BR(C)∩R(B) B0R(C)∩R(B) (C † + B † − I) BR(C)∩R(B) −1 B0R(C)∩R(B) . (32) Equivalently, let PR(C)∩R(B) = BR(C)∩R(B) B0R(C)∩R(B) be the projector matrix on R(C) ∩ R(B). Then C ∧ B can also be written as C ∧ B = PR(C)∩R(B) (C † + B † − I) PR(C)∩R(B) † . (33) The proof and an algorithm to compute a basis matrix BR(C)∩R(B) are given in Section 5.2. The formulas (32) and (33) not only extend the formula (30) to cases where C or B are non-invertible, but also ensures numerical stability in cases where C or B are ill-conditioned. In that situation, the pseudoinverses appearing in (32), (33) should be computed with appropriate settings of the numerical tolerance which one can specify in common implementations (for instance in Matlab) of the SVD. One should generally favor (32) over (30) unless one can be sure that C and B are well-conditioned. 53 The direct computation (28) of NOT is well-defined for C with a singular value range [0, 1], thus nothing remains to be done here. Having available the general and numerically robust computations of AND via (32) or (33) and of NOT via (28), we invoke de Morgan’s rule C ∨B = ¬(¬C ∧¬B) to obtain a general and robust computation for OR on the basis of (32) resp. (33) and (28). Summarizing, we obtain the final definitions for Boolean operations on conceptors: Definition 4 ¬ C := I − C, C ∧ B := PR(C)∩R(B) (C † + B † − I) PR(C)∩R(B) C ∨ B := ¬ (¬ C ∧ ¬ B), † , where PR(C)∩R(B) is the projector matrix on R(C) ∩ R(B). This definition is consistent with the preliminary definitions given in the previous subsection. For AND this is clear: if C and B are nonsingular, PR(C)∩R(B) is the identity and the pseudoinverse is the inverse, hence (30) is recovered (fact 1). We noted in the previous subsection that de Morgan’s laws hold for conceptors derived from nonsingular correlation matrices (fact 2). Furthermore, if C is derived from a nonsingular correlation matrix, then ¬C also corresponds to a nonsingular correlation matrix (fact 3). Combining facts 1 – 3 yields that the way of defining OR via de Morgan’s rule from AND and NOT in Definition 4 generalises (25)/(26). For later use I state a technical result which gives a characterization of OR in terms of a limit over correlation matrices: Proposition 7 For a conceptor matrix C with SVD C = U SU 0 let S (δ) be a version of S where all unit singular values (if any) have been replaced by 1 − δ, (δ) and let C (δ) = U S (δ) U 0 . Let RC = C (δ) (I − C (δ) )−1 . Similarly, for another (δ) conceptor B let RB = B (δ) (I − B (δ) )−1 . Then (δ) (δ) (δ) (δ) (δ) (δ) C ∨ B = I − lim (RC + RB + I)−1 = lim (RC + RB ) (RC + RB + I)−1 . (34) δ↓0 δ↓0 The proof is given in Section 5.3. Finally I note that de Morgan’s rule also holds for AND (proof in Section 5.4): Proposition 8 C ∧ B = ¬ (¬ C ∨ ¬ B). 54 3.9.4 Facts Concerning Subspaces For an N × N matrix M , let I(M ) = {x ∈ RN | M x = x} be the identity space of M . This is the eigenspace of M to the eigenvalue 1, a linear subspace of RN . The identity spaces, null spaces, and ranges of conceptors are related to Boolean operations in various ways. The facts collected here are technical, but will be useful in deriving further results later. Proposition 9 Let C, B be any conceptor matrices, and H, G hard conceptor matrices of the same dimension. Then the following facts hold: 1. I(C) ⊆ R(C). 2. I(C † ) = I(C) and R(C † ) = R(C) and N (C † ) = N (C). 3. R(¬C) = I(C)⊥ and I(¬C) = N (C) and N (¬C) = I(C). 4. R(C ∧ B) = R(C) ∩ R(B) and R(C ∨ B) = R(C) + R(B). 5. I(C ∧ B) = I(C) ∩ I(B) and I(C ∨ B) = I(C) + I(B). 6. N (C ∧ B) = N (C) + N (B) and N (C ∨ B) = N (C) ∩ N (B). 7. I(ϕ(C, γ)) = I(C) for γ ∈ [0, ∞) and R(ϕ(C, γ)) = R(C) for γ ∈ (0, ∞] and N (ϕ(C, γ)) = N (C) for γ ∈ (0, ∞]. 8. A = A ∧ C ⇐⇒ R(A) ⊆ I(C) and A = A ∨ C ⇐⇒ I(A)⊥ ⊆ N (C). 9. ϕ(C, 0) and ϕ(C, ∞) are hard. 10. ϕ(C, 0) = PI(C) and ϕ(C, ∞) = PR(C) . 11. H = H † = PI(H) . 12. I(H) = R(H) = N (H)⊥ . 13. ¬H = PN (H) = PI(H)⊥ . 14. H ∧ G = PI(H) ∩ I(G) . 15. H ∨ G = PI(H) + I(G) . The proof is given in Section 5.5. 55 3.9.5 Boolean Operators and Aperture Adaptation The Boolean operations are related to aperture adaptation in a number of ways: Proposition 10 Let C, B be N × N sized conceptor matrices and γ, β ∈ [0, ∞]. We declare ∞−1 = ∞−2 = 0 and 0−1 = 0−2 = ∞. Then, 1. ¬ϕ(C, γ) = ϕ(¬C, γ −1 ), 2. ϕ(C, γ) ∨ ϕ(B, γ) = ϕ(C ∨ B, γ), 3. ϕ(C, γ) ∧ ϕ(B, γ) = ϕ(C ∧ B, γ), p 4. ϕ(C, γ) ∨ ϕ(C, β) = ϕ(C, γ 2 + β 2 ), 5. ϕ(C, γ) ∧ ϕ(C, β) = ϕ(C, (γ −2 + β −2 )−1/2 ). The proof can be found in Section 5.6. Furthermore, with the aid of aperture adaptation and OR it is possible to implement an incremental model extension, as follows. Assume that conceptor C has been obtained from a dataset X comprised of m data vectors x, via R = XX 0 /m, C = R(R + α−2 I)−1 . Then, n new data vectors y become available, collected as columns in a data matrix Y . One wishes to update the original conceptor C such that it also incorporates the information from Y , that is, one wishes to obtain C̃ = R̃(R̃ + α−2 I)−1 , (35) where R̃ is the updated correlation matrix obtained by Z = [XY ], R̃ = ZZ 0 /(m + n). But now furthermore assume that the original training data X are no longer available. This situation will not be uncommon in applications. The way to a direct computation of (35) is barred. In this situation, the extended model C̃ can be computed from C, Y, m, n as follows. Let CY = Y Y 0 (Y Y 0 + I)−1 . Then,  C̃ = ϕ ϕ(C, m1/2 α−1 ) ∨ CY , (m + n)1/2 α (36) −1  m n (I − C)−1 C + α2 Y Y 0 + I . (37) = I− m+n m+n These formulas can be verified by elementary transformations using (7), (8), (25) and (17), noting that C cannot have unit singular values because it is obtained from a bounded correlation matrix R, thus (I − C) is invertible. 3.9.6 Logic Laws Many laws from Boolean logic carry over to the operations AND, OR, NOT defined for conceptors, sometimes with modifications. 56 Proposition 11 Let I be the N × N identity matrix, 0 the zero matrix, and B, C, D any conceptor matrices of size N × N (including I or 0). Then the following laws hold: 1. De Morgan’s rules: C ∨ B = ¬ (¬ C ∧ ¬ B) and C ∧ B = ¬ (¬ C ∨ ¬ B). 2. Associativity: (B ∧ C) ∧ D = B ∧ (C ∧ D) and (B ∨ C) ∨ D = B ∨ (C ∨ D). 3. Commutativity: B ∧ C = C ∧ B and B ∨ C = C ∨ B. 4. Double negation: ¬(¬C) = C. 5. Neutrality of 0 and I: C ∨ 0 = C and C ∧ I = C. 6. Globality of 0 and I: C ∨ I = I and C ∧ 0 = 0. 7. Weighted p self-absorption for OR: C ∨ C = ϕ(C, ϕ(C, 1/2) = C. p √ 2) and ϕ(C, 1/2) ∨ √ √ 2) and ϕ(C, 2) ∧ 8. Weighted self-absorption for AND: C ∧ C = ϕ(C, 1/ √ ϕ(C, 2) = C. The proofs are given in Section 5.7. From among the classical laws of Boolean logic, the general absorption rules A = A ∧ (A ∨ B) = A ∨ (A ∧ B) and the laws of distributivity do not hold for conceptors. While the absorption rules A = A ∧ (A ∨ B) = A ∨ (A ∧ B) are not valid for conceptor matrices, it is possible to “invert” ∨ by ∧ and vice versa in a way that is reminiscent of absorption rules: Proposition 12 Let A, B be conceptor matrices of size N × N . Then,  † 1. C = PR(A) I + A† − (A ∨ B)† PR(A) is a conceptor matrix and A = (A ∨ B) ∧ C. (38)  † 2. C = I − PI(A)⊥ I + (I − A)† − (I − (A ∧ B))† PI(A)⊥ is a conceptor matrix and A = (A ∧ B) ∨ C. (39) The proof is given in Section 5.8. 57 3.10 An Abstraction Relationship between Conceptors The existence of (almost) Boolean operations between conceptors suggests that conceptors may be useful as models of concepts (extensive discussion in Section 3.17). In this subsection I add substance to this interpretation by introducing an abstraction relationship between conceptors, which allows one to organize a set of conceptors in an abstraction hierarchy. In order to equip the set CN of N × N conceptors with an “abstraction” relationship, we need to identify a partial ordering on CN which meets our intuitive expectations concerning the structure of “abstraction”. A natural candidate is the partial order ≤ defined on the set of N × N real matrices by X ≤ Y if Y − X is positive semidefinite. This ordering is often called the Löwner ordering. I will interpret and employ the Löwner ordering as an abstraction relation. The key facts which connect this ordering to Boolean operations, and which justify to interpret ≤ as a form of logical abstraction, are collected in the following Proposition 13 Let CN be the set of conceptor matrices of size N . Then the following facts hold. 1. An N × N matrix A is a conceptor matrix if and only if 0 ≤ A ≤ IN ×N . 2. 0N ×N is the global minimal element and IN ×N the global maximal element of (CN , ≤). 3. A ≤ B if and only if ¬A ≥ ¬B. 4. Let A, B ∈ CN and B ≤ A. Then C = PR(B) (B † − PR(B) A† PR(B) + I)−1 PR(B) is a conceptor matrix and B = A ∧ C. 5. Let again A, B ∈ CN and A ≤ B. Then C = I − PI(B)⊥ (I − B)† − PI(B)⊥ (I − A)† PI(B)⊥ + I −1 PI(B)⊥ is a conceptor matrix and B = A ∨ C. 6. If for A, B, C ∈ CN it holds that A ∧ C = B, then B ≤ A. 7. If for A, B, C ∈ CN it holds that A ∨ C = B, then A ≤ B. 8. For A ∈ CN and γ ≥ 1 it holds that A ≤ ϕ(A, γ); for γ ≤ 1 it holds that ϕ(A, γ) ≤ A. 9. If A ≤ B, then ϕ(A, γ) ≤ ϕ(B, γ) for γ ∈ [0, ∞]. 58 The proof is given in Section 5.9. The essence of this proposition can be reexpressed succinctly as follows: Proposition 14 For conceptors A, B the following conditions are equivalent: 1. A ≤ B. 2. There exists a conceptor C such that A ∨ C = B. 3. There exists a conceptor C such that A = B ∧ C. Thus, there is an equivalence between “going upwards” in the ≤ ordering on the one hand, and merging conceptors by OR on the other hand. In standard logic-based knowledge representation formalisms, a concept (or class) B is defined to be more abstract than some other concept/class A exactly if there is some concept/class C such that A ∨ C = B. This motivates me to interpret ≤ as an abstraction ordering on CN . 3.11 Example: Memory Management in RNNs In this subsection I demonstrate the usefulness of Boolean operations by introducing a memory management scheme for RNNs. I will show how it is possible 1. to store patterns in an RNN incrementally: if patterns p1 , . . . , pm have already been stored, a new pattern pm+1 can be stored in addition without interfering with the previously stored patterns, and without having to know them; 2. to maintain a measure of the remaining memory capacity of the RNN which indicates how many more patterns can still be stored; 3. to exploit redundancies: if the new pattern is similar in a certain sense to already stored ones, loading it consumes less memory capacity than when the new pattern is dissimilar to the already stored ones. Biological brains can learn new patterns during their lifetime. For artificial neural networks (ANNs) “lifelong learning” presents a notorious difficulty. Training some task into an ANN typically means to adapt connection weights, often by gradient descent optimization. When an ANN has been trained on some task in the past and subsequently is trained on a new task, the new weight adaptations are prone to destroy the previously learnt competences. This catastrophic forgetting (or catastrophic interference) phenomenon has been recognized since long. Although a number of proposals have been made which partially alleviate the problem in special circumstances ([32, 42, 73], skeptical overview: [77]), catastrophic forgetting was still considered a main challenge for neural learning theory in an expert’s hearing solicited by the NSF in 2007 ([21]). 59 3.11.1 General Principle and Algorithm Recall that in the original pattern storing procedure, the initial random weight matrix W ∗ is recomputed to obtain the weight matrix W of the loaded reservoir, such that xj (n + 1) = tanh(W ∗ xj (n) + W in pj (n + 1) + b) ≈ tanh(W xj (n) + b), where pj (n) is the j-th pattern signal and xj (n) is the reservoir state signal obtained when the reservoir is driven by the j-th pattern. For a transparent memory management, it is more convenient to keep the original W ∗ and record the weight changes into an input simulation matrix D, such that xj (n + 1) = tanh(W ∗ xj (n) + W in pj (n + 1) + b) ≈ tanh(W ∗ xj (n) + D xj (n) + b). (40) In a non-incremental batch training mode, D would be computed by regularized linear regression to minimize the following squared error: X X D = argminD̃ kW in pj (n) − D̃ xj (n − 1)k2 , (41) j=1,...,K n=n0 +1,...,L where K is the number of patterns and L is the length of the training sequence (subtracting an initial washout period of length n0 ). Trained in this way, the sum W ∗ + D would be essentially identical (up to differences due to using another regularization scheme) to the weight W matrix obtained in the original storing procedure. In fact, the performance of loading a reservoir with patterns via an input simulation matrix D as in (40) is indistinguishable from what is obtained in the original procedure (not reported). At recall time, the conceptor C j is inserted and the pattern pj is re-generated by running x(n + 1) = C j tanh (W ∗ x(n) + D x(n) + b) , y(n) = W out x(n). (42) Another variant of the loading procedure is even more minimalistic and aims at replacing only the very input pj (n) by minimizing X X kpj (n) − R xj (n)k2 . (43) j=1,...,K n=n0 +1,...,L For d-dimensional input this yields a d × N matrix R of what I call input recreation weights which at recall time is utilized by  x(n + 1) = C j tanh W ∗ x(n) + W in R x(n) + b , y(n) = W out x(n). (44) On the grounds of mathematical intuition, loading patterns by input integration weights W should be superior to the variant with input simulation weights D or input recreation weights R, because of the greater number of re-computed 60 parameters (leading to greater accuracy) and the more comprehensive impact of regularization (leading to greater dynamical stability, among other). However, in all the various simulation experiments that I carried out so far I found only small to negligable deteriorations in performance when using D or R instead of W , both with respect to accuracy and with respect to dynamical stability. With the aid of Boolean operations and input simulation weights it becomes possible to incrementally load a collection of d-dimensional patterns p1 , p2 , . . . into a reservoir, such that (i) loading pm+1 does not interfere with previously loaded p1 , . . . , pm ; (ii) similarities between patterns are exploited to save memory space; (iii) the amount of still free memory space can be monitored. Here when I speak of “memory space”, I am referring to the N -dimensional vector space M = RN spanned by reservoir states x. Furthermore, when I will be speaking of “components” of a reservoir state x, I refer to projections of x on some linear subspace of M, where the subspace will be clear from context. The incremental loading procedure unfolds in loading cycles m = 1, 2, . . .. After completion of the m-th cycle, input simulation weights Dm , output weights W out,m , and conceptors C 1 , . . . , C m are obtained, such that when (42) is run with Dm , W out,m and one of the C j (1 ≤ j ≤ m), the pattern pj is re-generated. Dm+1 and W out,m+1 are computed from the previously obtained Dm and W out,m by adding increments m+1 Dm+1 = Dm + Dinc , out,m+1 W out,m+1 = W out,m + Winc , (45) with zero-weight initialization in the first loading cycle 1 D1 = 0 + Dinc , out,1 W out,1 = 0 + Winc . (46) Conceptors C 1 , C 2 , . . . are computed as usual from reservoir states collected in runs of the native network x(n + 1) = tanh(W ∗ x(n) + W in pj (n) + b). The key for incremental loading is a conceptor-based characterization of the memory space claimed by the m previously loaded patterns. Concretely, in loading cycle m + 1 we make use of the conceptor Am = C 1 ∨ . . . ∨ C m , (47) which due to the associativity of conceptor-OR can be incrementally computed by Am = Am−1 ∨ C m with initialization by the zero conceptor. In intuitive terms, Am characterizes the geometry of the reservoir state cloud induced by all patterns loaded up to cycle m. The complement F m = ¬Am in turn characterizes the memory space that is still “free” for use in loading cycle m + 1. The new input simulation weights Dm+1 and output weights W out,m+1 are computed on the basis of F m and Dm as follows: 1. Drive the native reservoir with pattern pm+1 via xm+1 (n+1) = tanh(W ∗ x(n)m+1 + W in pm+1 (n) + b) for L steps, collect reservoir states xm+1 (n0 ), . . . , xm+1 (L − 61 1) column-wise into a state collection matrix X m+1 of size N × (L − n0 ), furthermore collect time-shifted reservoir states xm+1 (n0 + 1), . . . , xm+1 (L) into X+m+1 , collect pattern samples pm+1 (n0 + 1), . . . , pm+1 (L) into a d × (L − n0 ) matrix P m+1 , and compute C m+1 by (7). m+1 2. Obtain the increment Dinc by regularized linear regression from these states xm+1 as the minimizer of the loss X m+1 m m+1 kW in pm+1 (n) − Dm xm+1 (n − 1) − Dinc F x (n − 1)k2 . (48) n=n0 ,...,L Concretely, this means to compute 0  0 m+1 Dinc = (SS 0 /(L − n0 ) + α−2 I)−1 ST D /(L − n0 ) , (49) where S = F m X m+1 , T D = W in P m+1 − Dm X m+1 contains the targets for m+1 the linear regression leading to Dinc , and α−2 is the Tychonov regularizer. out,m+1 3. Obtain the increment Winc by regularized linear regression as the minimizer of the loss X out,m+1 m m+1 kpm+1 (n) − W out,m xm+1 (n) − Winc F x (n)k2 . (50) n=n0 ,...,L Concretely this means to compute  0 0 out m+1 Winc = (S+ S+0 /(L − n0 ) + a2out I)−1 S+ T out /(L − n0 ) , (51) where S+ = F m X+m+1 , T out = P m+1 − W out,m X+m+1 , and a2out is a regularization coefficient. m+1 4. Update Am+1 = Am ∨C m+1 , F m+1 = ¬Am+1 , Dm+1 = Dm +Dinc , W out,m+1 = out,m+1 W out,m + Winc . It is interesting to note that it is intrinsically impossible to unlearn patterns selectively and “decrementally”. Assume that patterns p1 , . . . , pm have been trained, resulting in Dm . Assume that one wishes to unlearn again pm . As a result of this unlearning one would want to obtain Dm−1 . Thus one would have to comm pute Dinc from Dm , Am and pm (that is, from Dm and C m ), in order to recover m−1 m m D = Dm − Dinc . However, the way to identify Dinc from Dm , Am and C m is barred because of the redundancy exploitation inherent in step 2. Given only Dm , and not knowing the patterns p1 , . . . , pm−1 which must be preserved, there is no way to identify which directions of reservoir space must be retained to preserve those other patterns. The best one can do is to put Ãm−1 = Am −C m = Am ∧¬C m and re-run step 3 using Ãm−1 instead of Am−1 and putting T = W in P j in step 2. m m This leads to a version D̃inc which coincides with the true Dinc only if there was 62 0 no directional overlap between C m and the earlier C m , i.e. if Dm−1 X m = 0 in the original incremental learning procedure. To the extent that pm shared state directions with the other patterns, i.e. to the extent that there was redundancy, unlearning pm will degrade or destroy patterns that share state directions with pm . The incremental pattern learning method offers the commodity to measure how much “memory space” has already been used after the first j patterns have been stored. This quantity is the quota q(Aj ). When it approaches 1, the reservoir is “full” and an attempt to store another pattern will fail because the F m matrix will be close to zero. Two demonstrations, detailed below, illustrate various aspects of the incremental storing procedure. In the first demonstration, the patterns were periodic with integer period lengths. In the second demonstration, the patterns came from a 2-parametric family of created from weighted and phase-shifted sums of sinewaves with irrational period lengths. These two kinds of patterns display interestingly different characteristics in incremental storage. 3.11.2 Demonstration 1: Incremental Loading of Integer-Periodic Patterns In the first demo I loaded K = 16 integer-periodic patterns into an N = 100 sized reservoir, using the incremental loading procedure detailed above. The patterns were sines of integer period length or random periodic signals. Period lengths ranged between 3 and 15 (details documented in Section 4.3). Figure 21 displays characteristic impressions. Comments. When a reservoir is driven with a signal that has an integer period, the reservoir states (after an initial washout time) will entrain to this period, i.e. every neuron likewise will exhibit an integer-periodic activation signal. Thus, if the period length of driver pj is Lj , the state correlation matrix as well as the conceptor C j will be matrices of rank Lj . An aperture α = 1000 was used in this demonstration. The large size of this aperture and the fact that the state correlation matrix has rank Lj leads to a conceptor C j which comes close to a projector matrix, i.e. it has Lj singular values that are close to one and N − Lj zero singular values. Furthermore, if a new pattern pj+1 is presented, the periodic reservoir state vectors arising from it will generically be linearly independent of all state vectors that arose from earlier drivers. Both effects together (almost projector C j and linear independence of nonzero principal directions of these C j ) imply that the sequence A1 , . . . , AK will essentially be a sequence of projectors, where R(Aj+1 ) will comprise Lj+1 more dimensions than R(Aj ). This becomes clearly apparent in Figure 21: the area under the singular value plot of Aj has an almost rectangular shape, and the increments from one plot to the next match the periods of the respective drivers, except for the last pattern, where the network capacity is almost exhausted. Patterns j = 5, 6, 7 were identical to j = 1, 2, 3. As a consequence, when the 63 1 j=1 j=5 j=9 j = 13 0 ï1 0.1 0.0014 1 0.36 0.0014 j=2 0.54 0.019 j=6 0.8 0.075 j = 10 j = 14 0 ï1 0.25 0.008 1 0.36 0.011 j=3 0.59 0.015 j=7 0.83 0.013 j = 11 j = 15 0 ï1 0.29 0.00071 1 0.36 0.00071 j=4 0.65 0.036 j=8 0.94 0.05 j = 12 j = 16 0 ï1 1 0.36 0.003 10 0.42 20 1 0.004 10 0.73 20 1 0.048 10 0.99 20 1 0.95 10 20 Figure 21: Incremental storing, first demonstration (figure repeated from Section 1 for convenience). 13 patterns with integer period lengths ranging between 3 and 15 were stored. Patterns were sinewaves with integer periods or random. Patterns j = 5, 6, 7 are identical to j = 1, 2, 3. Each panel shows a 20-timestep sample of the correct training pattern pj (black line) overlaid on its reproduction (green line). The memory fraction used up until pattern j is indicated by the panel fraction filled in red; this quota value is printed in the left bottom corner of each panel. The red areas in each panel in fact show the singular value spectrum of Aj (100 values, x scale not shown). The NRMSE is inserted in the bottom right corners of the panels. Note that the conceptor-controlled reproduction of all patterns was carried out after the last pattern had been loaded. storage procedure is run for j = 5, 6, 7, Aj remains essentially unchanged – no further memory space is allocated. When the network’s capacity is almost exhausted in the sense that the quota q(Aj ) approaches 1, storing another pattern becomes inaccurate. In this demo, this happens for that last pattern j = 16 (see Figure 21). For a comparison I also loaded all 16 patterns simultaneously in a separate simulation experiment, computing only a single input simulation weight matrix D by minimizing (41). The dots in the left panel in Figure 22 indicate the recall accuracies based on this D. The mean of NRMSEs of this comparison was 0.063, while the mean NRMSE of recalled patterns in the incremental loading condition after the final loading cycle was 0.078. These two mean values do not differ much, but the recall NRMSEs scatter differently in the two conditions. In the non-incremental loading condition, the recall accuracies are much closer to each other than in the incremental condition, where we find many highly precise accuracies and one poor outlier, namely the last pattern which spilled over the remaining memory space. Apparently in simultaneous loading the common D strikes a compromise for all loaded patterns on equal terms, whereas in incremental loading earlier-loaded patterns receive the benefit of competing only with the 64 1 sing. value log10 NRMSE 0 ï2 ï4 4 0.5 0 0 8 12 16 loading cycle 50 dimension number 100 Figure 22: Incremental loading of integer-periodic patterns: detail. Left: Development of re-generation error (log10 of NRMSE) for the 16 patterns from Figure 21 during the incremental loading procedure. Each line corresponds to one pattern. The red diamond marks the NRMSE of the last-loaded pattern. The 16 dots at the right mark the recall errors obtained from non-incremental loading. Right: The essentially rectangular singular value spectra of the conceptors Am , same color code as in left panel. patterns that had been loaded before. 3.12 Incremental Loading of Integer-Periodic Patterns: Detailed Analysis Here I provide a more detailed analysis of the incremental loading of integerperiodic patterns (demo in Section 3.11). I consider the case of incrementally loading patterns p1 , p2 , . . ., which have integer period lengths L1 , L2 , . . ., into an N -dimensional reservoir. I refer to M = RN as the memory space provided by the reservoir. The periodic patterns p1 , p2 , . . . give rise to a sequence of mutually orthogonal linear “excitation” subspaces (E j )j=1,2,... of M, with dimensions Lj , as follows. When the reservoir is driven by pattern p1 , after a washout period it will engage in an L1 -periodic sequence of states, that is, x1 (n) = x1 (n + L1 − 1). Generically (i.e. with probability 1 for random draws of network weights), these L1 states x1 (n), . . . , x1 (n + L1 − 1) are linearly independent and span an L1 -dimensional linear subspace E 1 of M. Define M1 = E 1 . Now assume, by induction, that for the first m patterns p1 , . . . , pm we have found m pairwise orthogonal linear subspaces E 1 , . . . , E m of dimensions L1 , . . . , Lm , with Mm = E 1 ⊕. . .⊕E m being the (L1 +. . . Lm )-dimensional subspace given by the direct sum of these. Now let the native reservoir be driven with the next pattern pm+1 . Provided that this pattern is not a duplicate of any of the previous ones, and provided that L1 +. . .+Lm +Lm+1 ≤ N , the collection of the L1 +. . .+Lm+1 many induced reservoir states x1 (n), . . . , x1 (n+L1 −1), . . . , xm+1 (n), . . . , xm+1 (n+Lm+1 − 1) will again generically be linearly independent, spanning an (L1 + . . . + Lm+1 )- 65 dimensional subspace Mm+1 of M. Define E m+1 to be the orthogonal complement to Mm within Mm+1 . Then E m+1 has dimension Lm+1 . This concludes the induction step in the definition of the sequence (E j )j=1,2,... . Note that this construction only works as long as L1 + . . . + Lm+1 ≤ N , and assumes that the patterns pj are pairwise different. The spaces Mj and E j can be characterized through the conceptors C j associated with the patterns pj . To see this, consider first the conceptor matrix C 1 . It has exactly L1 nonzero eigenvalues corresponding to eigenvectors which span M1 . For large aperture (I used α = 1000 in the demo), the eigenvalue spectrum of C 1 will be approximately rectangular, with L1 eigenvalues close to 1 and N − L1 eigenvalues exactly zero (right panel in Figure 22). In linear algebra terms, C 1 approximately is the projector matrix which projects M on E 1 , and ¬C 1 as the projector matrix that maps M on (E 1 )⊥ . Define A1 = C 1 , F 1 = ¬C 1 , as in the algorithm given in the previous subsection. Again by induction, assume that Am = C 1 ∨ . . . ∨ C m is approximately the projector of M on Mm and F m = ¬Am the complement projector of M on (Mm )⊥ . It holds that Am+1 = Am ∨ C m+1 is (approximately) the projector from M on M m+1 (follows from Proposition 9), and F m+1 = ¬Am+1 the projector on (M m+1 )⊥ . Equipped with these interpretations of Am and F m we turn to the incremental loading procedure. m+1 According to the loss (48), Dinc is optimized to map F m xm+1 (n − 1) to W in pm+1 (n) − Dm xm+1 (n − 1), that is, to the pattern-input term W in pm+1 (n) minus those reservoir state components which are already produced by the input simulation weights Dm . As we have just seen, F m is approximately a projection of reservoir states on the linear subspace of M which was not excited by any of the previous driving patterns, that is, a projection on (Mm )⊥ . Basing the regularized linear regression on arguments F m xm+1 (n − 1) which lie in (Mm )⊥ leads to a m+1 m+1 nulls all reservoir state components that fall in solution for Dinc such that Dinc m the linear subspace M excited by previous patterns. By an easy inductive argument it can be seen that Dm , in turn, nulls all vectors in (Mm )⊥ . Decomposing states excited by pm+1 as xm+1 (n) = u + v, with u ∈ Mm , v ∈ (Mm )⊥ , one obtains (approximately, to the extent that the C j are projectors) Dm u Dm v m+1 Dinc u m+1 Dinc v ≈ ≈ ≈ ≈ ≈ Dm xm+1 (n), 0 0, m+1 m m+1 m+1 m+1 F x (n) Dinc x (n) ≈ Dinc in m+1 m m+1 W p (n + 1) − D x (n), (52) (53) (54) (55) where the approximation (55) is accurate to the extent that the linear regression 66 solution to (48) is accurate. Hence, m+1 Dm+1 xm+1 (n) = (Dm + Dinc ) (u + v) m m+1 = D x (n) + W in pm+1 (n + 1) − Dm xm+1 (n) = W in pm+1 (n + 1), (56) as desired for input simulation weights. The reasoning for output weights computed on the basis of (50) is analog. (56) explains why the input simulation weights Dm+1 can recover the pattern m+1 p at recall time. To see that furthermore Dm+1 also still recovers earlier loaded patterns (avoiding catastrophic forgetting), observe that reservoir states associated with earlier patterns fall in Mm and that by (52)–(54), Dm+1 restricted on Mm operates identically as Dm , and Dm+1 restricted on Mm−1 as Dm−1 , etc. I want to point out a possible misunderstanding of the working principle of this incremental loading procedure. It does not function by splitting the memory space M into orthogonal components E j , and loading the patterns pj separately into these in some way. The states xm+1 (n) obtained by exciting the reservoir with pm+1 are generically non-orthogonal to the excitation space Mm of previously loaded patterns. The re-generation of pm “uses” reservoir state components from all the subspaces E 1 , . . . , E m . In this respect, the incremental loading procedure fundamentally differs from a common strategy adopted to counter catastrophic forgetting by orthogonalizing internal representations of patterns in some way (survey in [32]). 3.12.1 Demonstration 2: Incremental Loading of Irrational-Period Patterns In the second demo I loaded 16 patterns that were randomly taken from the the 2-parametric family of patterns governed by p(n) = a sin(2 π n/P ) + (1 − a) sin(4 π (b + n/P )). (57) These signals are weighted sums of two sines, the first with period length P and the second with period length P/2. The weights of these two components are a and (1−a), and the second component is phase-shifted relative to the first by a fraction √ b of its period length P/2. The reference period length P was fixed to P = 30. The parameters a, b were freshly sampled from the uniform distribution on [0, 1] for each pj , where 16 patterns were used. Because P is irrational, these patterns (when sampled at integer steps) are not integer-periodic but quasi-periodic. As a consequence, the reservoir states xj (n) excited by a driver pj (n) span all of M, and all singular values of C j are nonzero, with a reverse sigmoid-shaped spectrum like we saw earlier for other irrational-period patterns (Figure 14 [left]). Network parameters are reported in Section 4.4. Figures 23 and 24 display the findings. Comments. When the driver has an irrational period length, the excited reservoir states will span the available reservoir space RN . Each reservoir state correlation 67 1 j=1 j=5 j=9 j = 13 0 ï1 0.17 0.11 1 0.59 0.19 j=2 0.69 0.26 j=6 0.76 0.16 j = 10 j = 14 0 ï1 0.3 0.031 1 0.64 0.16 j=3 0.71 0.07 j=7 0.76 0.042 j = 11 j = 15 0 ï1 0.46 0.3 1 0.66 0.25 j=4 0.73 0.16 j=8 0.78 0.084 j = 12 j = 16 0 ï1 1 0.52 0.049 10 0.68 20 1 0.17 10 0.74 20 1 0.074 10 0.78 20 1 0.077 10 20 Figure 23: Incremental storing, second demonstration. 16 sinewave patterns with irrational periods ranging between 4 and 20 were used. Plot layout is the same as in Figure 21. 1 sing. value log10 NRMSE 0 ï1 ï2 4 0.5 0 0 8 12 16 loading cycle 50 dimension number 100 Figure 24: Detail of incremental loading of irrational-periodic patterns. Figure layout as in Fig. 22. matrix will have only nonzero singular values, albeit of rapidly decreasing magnitude (these tails are so small in magnitude that they are not visible in the first few plots of Aj in Figure 23). The fact that each driving pattern excites the reservoir in all directions leads to the “reverse sigmoid” kind of shapes of the singular values of the Aj visible in Figure 23. As the iterated storing progresses, a redundancy exploitation effect becomes apparent: while for the first 4 patterns altogether a quota q(A4 ) = 0.52 was allocated, the remaining 12 patterns only needed an additional quota of q(A16 ) − q(A4 ) = 0.26. Stated in suggestive terms, at later stages of the storing sequence the network had already learnt how to oscillate in sinewave mixes in general, and only needed to learn in addition how to oscillate at the particular newly presented version taken from the parametrized pattern family. An aperture of size α = 1.5 was used in the second demonstration. 68 The mean recall NRMSE for the 16 patterns (testing after loading the last one) was 0.136. The mean NRMSE for these patterns when loaded non-incrementally was 0.131. Like for integer-periodic patterns, these values are not substantially different from each other. 3.12.2 Integer-Periodic Versus Parametrized Patterns: Close-up Inspection Notice the very different shape of the singular value spectra of the Aj in the integerperiodic versus the irrational-periodic patterns (right panels in Figures 22 and 24). This suggests substantial differences in the underlying mechanisms, and it is also obvious that the analysis offered in the previous subsection for integer-periodic patterns does not transfer to the irrational-periodic patterns from a parametrized family which we considered here. To understand better the differences between the incremental loading of integerperiodic versus parametrized patterns, I ran a separate suite of simulations with additional diagnostics, as follows (detail in Section 4.5). The simulation with integer-periodic patterns was repeated 10 times, using the same global network scalings and regularization coefficients as before, but using exclusively 6-periodic patterns throughout. Loading sixteen such patterns into a 100-neuron reservoir should claim a memory quota of about 6·16/100 = 0.96, just short of over-loading. Network weights and patterns were randomly created for each of the 10 simulations. Similarly, the parametric-family simulation was repeated 10 times, using the same pattern family (57) with freshly sampled pattern parameters and network weights in each simulation. Finally, I loaded 100 integer-periodic patterns of period length 3 into the same reservoir that was used for the 6-periodic patterns, again repeating the simulation 10 times. For each individual simulation, the following diagnostic quantities were computed (indicated colors refer to color code in Figure 25): 1. The mean absolute values am of arguments am (n) = F m xm (n−1) that enter m (mean taken over n and vector components, orange). the regression for Dinc 2. The mean absolute values tm of targets tm (n) = W in p(n) − Dm−1 xm (n − 1) m that enter the regression for Dinc (red). m 3. The mean absolute size of matrix entries in the Dinc matrices, normalized by m the inverse of the scaling factor that Dinc has to realize. Concretely, define m m m m Dinc to be the average absolute size of matrix elements in Dinc a /t (blue). 4. The mean absolute size of matrix entries in Dm (gray). 5. The memory quota used up to the current loading cycle (black ). 6. The condition number of the matrix inversion that has to be carried out in m . This is a number the (regularized) linear regression when computing Dinc 69 integer-periodic patterns, period length 6 ("IP6") patterns from parametrized family ("PF") integer-periodic patterns, period length 3 ("IP3") 5 5 5 4 4 4 3 3 3 2 2 2 1 1 1 0 0 0 ï1 ï1 ï1 ï2 ï2 ï2 ï3 4 8 12 loading cycle 16 ï3 4 8 12 loading cycle 16 ï3 20 40 60 80 loading cycle 100 • log10 of average absolute size of Dinc arguments (x 0.5) • normalized size of Dinc (x 100) • log10 of matrix inversion condition • log10 of average absolute size of Dinc targets (x 0.5) • size of D (x 5) • log10 of final NRMSE • memory quota (x 5) • log10 of incremental NRMSE Figure 25: Detailed diagnostics of the incremental loading procedure. Plots show means of 10 simulations, error bars indicate standard deviations (omitted in third panel for clarity). Some curves were scaled to fit the panel, legend indicates scalings. The horizontal axis marks the loading cycles except for the final NRMSE (cyan) where it marks the pattern number. For explanation see text. ≥ 1. Values close to 1 indicate that the linear regression faces a simple task (arguments component signals are orthogonal and have same signal power; regression amounts to linearly combine orthogonal projections) (green). 7. The recall NRMSEs for the 16 patterns p1 , . . . , p16 after the final loading cycle. Gives 16 NRMSE values per simulation (cyan). 8. The recall NRMSEs computed for pattern pj after the j-th loading cycle. Gives 16 NRMSE values per simulation (magenta). For brevity I refer to the integer-periodic pattern simulations as the “IP6” and “IP3” conditions and to the parametric family patterns as the “PF” condition, and to the diagnostic quantities by their colors in Figure 25. Here are some observations that help to gain intuitive insight—future mathematical analyses notwithstanding: • In both IP6 and PF, the reconstruction accuracy for a pattern pj directly after its loading is, by and large, about the same as the reconstruction accuracy after the last loading cycle (cyan, magenta). That is, subsequent loading 70 events do not degrade the representation of previously loaded patterns—this is also manifest in the left panels of Figures 22 and 24. • In IP6 the reconstruction accuracy (cyan, magenta) deteriorates roughly linearly in terms of the log-NRMSE as loading cycles unroll. This might be connected to the circumstance that on the one hand, each new pattern is unrelated to the previous ones and should require the same amount of “coding information” to be stored (apparent in the linear increase of the quota, black ), but on the other hand, increasingly little “free memory space” F m can be recruited for the coding and hence, increasingly less “degrees of freedom for coding” are available. • In PF the final reconstruction quality (cyan) is about the same for all patterns, and it is about the same as the incrementally assessed reconstruction NRMSEs (magenta). In fact, if more patterns from this family were to be added in further loading cycles, the reconstruction NRMSEs still would stay on the same level (not shown). The memory system can learn the entire pattern family. • The condition number (green) of the matrix that has to be inverted in the regression improves in all of IP6, FP and IP3, but to different degrees. Concretely, this matrix is meann {F m xm (n) (F m xm (n))0 } + % I, where % is the ridge regression regularizing coefficient (set to 0.001, 0.02, 0.001 in IP6, FP and IP3). In PF, the condition number swiftly approaches 1. This can be understood as an effect of dominance of regularization: given that the average absolute value of arguments F m xm (n) decreases to an order of magnitude of 0.01 (orange), the spectral radius of meann {F m xm (n) (F m xm (n))0 } will drop to an order of 0.0001, hence the linear regression becomes dominated by the regularization part with coefficient % = 0.02  0.0001. In intuitive terms, in PF the iterated re-computations of Dm soon cease to “learn anything substantially new”. Because the recall accuracies do not degrade, this means that nothing new has to be learned—after a few loading cycles, the memory system has extracted from the examples stored so far almost all that is necessary to represent the entire family. • The situation is markedly different in IP6. Here the condition number never falls below about 100, the spectral radius of meann {F m xm (n) (F m xm (n))0 } is about the same size as % = 0.001, thus substantial novel information becomes coded in each Dm until the end. • The interpretation that in IP6 novel information becomes coded throughout all loading cycles whereas in PF the rate of coding new information falls to zero is further substantiated by the development of the (normalized) sizes m Dinc of the increments that are added to Dm (blue). In IP6 these increments retain approximately the same size through all loading cycles whereas in PF 71 they appear to decay toward zero (in simulations with much larger numbers of loading cycles [not shown] this impression was numerically verified). In the same vein, the mean absolute sizes of elements in the Dm matrices (gray) grows superlinearly in IP6 and levels out in PF. • The two different modes of operation that we find contrasted in the IP6 and PF conditions can occur both together in a pattern loading sequence. In the IP3 condition, the 3-periodic patterns can be viewed as being drawn from a 2parametric family (the random length-3 patterns were normalized to all have the same minimal and maximal values, thus can be described up to period shifts by the binary parameter “the maximal value point follows the minimal value point directly yes/no” and the continuous parameter that gives the non-extremal point value). When the first few (about 20) patterns from this collection are loaded, they lead to a similar phenemenology as in the IP6 condition: each additional pattern is “novel” to the memory system. When more loading cycles are executed, the phenomenology changes to the type seen in the PF condition: the network (more precisely, the input simulation matrix Dm ) has captured the “law” of the entire family and not much further information has to be coded. While these simulations help us to get basic intuitions about the mechanisms that enable incremental pattern loading in different conditions, a formal analysis would be quite complex and is left for future work. Questions that would need to be addressed include the effects of regularization (which are strong), aperture settings, and asymptotic behavior when the number of loaded patterns grows to infinity. 3.12.3 Incremental Loading of Arbitrary Patterns When one tries to store patterns (i) whose conceptor singular value spectra are not close to rectangular and (ii) which do not come from a parametric family, the incremental loading procedure breaks down (not shown). The reason for this failure is clear on intuitive grounds. When the singular value spectra of conceptors C m are “sigmoid-shaped” as e.g. in Figure 24, the memory space claimed by patterns loaded up to loading cycle m will have nonzero components in all directions of M—technically, the singular value spectrum of Am will nowhere be zero. The argument vectors F m xm+1 (n) = ¬ Am xm+1 (n) which enter the regression for m Dinc likewise will have signal components in all directions of M, and executing the procedure for incremental loading will lead to a confounding of already stored with newcoming patterns. This diagnosis directly hints at a solution: make the singular value spectra of the conceptors C m associated with (arbitrary) patterns pj rectangular or approximately rectangular. One possible procedure to achieve this runs like follows: 1. When loading pattern pm , compute the associated conceptor C m as before. 72 1 sing. value log10 NRMSE 0 ï1 ï2 ï3 4 0.5 0 0 8 12 16 loading cycle 50 dimension number 100 Figure 26: Incremental loading of diverse patterns, using conceptors with singular value spectra transformed to approximately rectangular shape. Figure layout as in Figure 22. 2. Compute its SVD U S U 0 = C m . S is a diagonal matrix which contains the singular values of C m on its diagonal. Denote the singular values by σi . 3. Change these σi in a way that yields new σ̃i which are either close to 0 or close to 1. A drastic procedure is thresholding: σ̃i = 1 if σi > 0.5 else σ̃i = 0. A softer procedure is to pass σi through some sufficiently steep sigmoid. 4. Use the “rectangularized” C̃ m = U S̃U 0 instead of the original C m in the incremental loading procedure which otherwise remains unchanged (where S̃ is the diagonal matrix with the σ̃i on its diagonal). For a demonstration, I loaded a sequence of patterns where pm was integerperiodic with period 5 when m was uneven and where pm was one of the patterns from the 2-parametric family used above for even m (simulation detail in Section 4.6). The original incremental loading procedure would fail, but when the singular values of conceptors C m were passed through a steep sigmoid by σ̃i = (tanh(50 (2 σi − 1))) /2, incremental loading functioned well, as revealed in Figure 26. Interestingly, the incremental loading gave better recall accuracies than simultaneous loading: the mean NRMSE for incrementally loaded patterns, assessed after the final loading cycle, was 0.094, whereas the mean NRMSE for the same patterns loaded simultaneously was 0.19 (spending a fair effort on optimizing scaling and regularization parameters in the latter case). This is surprising and further investigations are needed to understand why/when incremental loading may give better results than simultaneous loading. I conclude this section by remarking that when conceptors are computed by the auto-adaptation rule introduced below in Section 3.14, approximately rectangular singular value spectra conducive for incremental loading are automatically obtained. 73 3.13 Example: Dynamical Pattern Recognition In this subsection I present another demonstration of the usefulness of Boolean operations on conceptor matrices. I describe a training scheme for a pattern recognition system which reaches (or surpasses) the classification test performance of state-of-the-art recognizers on a widely used benchmark task. Most high-performing existing classifiers are trained in discriminative training schemes. Discriminative classifier training exploits the contrasting differences between the pattern classes. This implies that if the repertoire of to-be-distinguished patterns becomes extended by a new pattern, the classifier has to be re-trained on the entire dataset, re-visiting training data from the previous repertoire. In contrast, the system that I present is trained in a “pattern-local” scheme which admits an incremental extension of the recognizer if new pattern types were to be included in its repertoire. Furthermore, the classifier can be improved in its exploitation phase by incrementally incorporating novel information contained in a newly incoming test pattern. The key to this local-incremental classifier training is agin Boolean operations on conceptors. Unlike in the rest of this report, where I restrict the presentation to stationary and potentially infinite-duration signals, the patterns here are nonstationary and of short duration. This subsection thus also serves as a demonstration how conceptors function with short nonstationary patterns. I use is the Japanese Vowels benchmark dataset. It has been donated by [60] and is publicly available at the UCI Knowledge Discovery in Databases Archive (http://kdd.ics.uci.edu/). This dataset has been used in dozens of articles in machine learning as a reference demonstration and thus provides a quick first orientation about the positioning of a new classification learning method. The dataset consists of 640 recordings of utterances of two successive Japanese vowels /ae/ from nine male speakers. It is grouped in a training set (30 recordings from each of the speakers = 270 samples) and a test set (370 further recordings, with different numbers of recordings per speaker). Each sample utterance is given in the form of a 12-dimensional timeseries made from the 12 LPC cepstrum coefficients. The durations of these recordings range between 7 and 29 sampling timesteps. The task is to classify the speakers in the test data, using the training data to learn a classifier. Figure 27 (top row) gives an impression of the original data. I preprocessed the raw data into a standardized format by (1) shift-scaling each of the twelve channels such that per channel, the minimum/maximum value across all training samples was 0/1; (2) interpolating each channel trace in each sample by a cubic polynomial; (3) subsampling these on four equidistant support points. The same transformations were applied to the test data. Figure 27 (bottom row) illustrates the normalized data format. The results reported in the literature for this benchmark typically reach an error rate (percentage of misclassifications on the test set) of about 5 – 10 test errors (for instance, [93, 99, 81] report from 5 – 12 test misclassifications, all using specialized versions of temporal support vector machines). The best result that I 74 speaker 4 speaker 6 speaker 8 2 2 2 1 1 1 0 0 0 !1 !1 !1 5 10 15 20 25 5 10 15 20 25 5 1 1 1 0.5 0.5 0.5 0 1 2 3 4 0 1 2 3 4 0 1 10 15 20 25 2 3 4 Figure 27: Three exemplary utterance samples from Japanese Vowels dataset. Plots show values of twelve signal channels against discrete timesteps. Top row: raw data as provided in benchmark repository, bottom row: standardized format after preprocessing. am aware of outside my own earlier attempts [57] is reported by [14] who reaches about 4 errors, using refined hidden Markov models in a non-discriminative training scheme. It is however possible to reach zero errors, albeit with an extraordinary effort: in own work [57] this was robustly achieved by combining the votes of 1,000 RNNs which were each independently trained in a discriminative scheme. Here I present a “pocket-size” conceptor-based classification learning scheme which can be outlined as follows: 1. A single, small (N = 10 units) random reservoir network is initially created. 2. This reservoir is driven, in nine independent sessions, with the 30 preprocessed training samples of each speaker j (j = 1, . . . , 9), and a conceptor Cj+ is created from the network response (no “loading” of patterns; the reservoir remains unchanged throughout). 3. In exploitation, a preprocessed sample s from the test set is fed to the reservoir and the induced reservoir states x(n) are recorded and transformed into a single vector z. For each conceptor then the positive evidence quantity z 0 Cj+ z is computed. This leads to a classification by deciding for j = argmaxi z 0 Ci+ z as the speaker of s. The idea behind this procedure is that if the reservoir is driven by a signal from speaker j, the resulting response z signal will be located in a linear subspace of the (transformed, 75 see below) reservoir state space whose overlap with the ellipsoids given by the Ci+ is largest for i = j. 4. In order to further improve classification quality, for each speaker j W the − + + + also a conceptor Cj = ¬ {C1 , . . . , Cj−1 , Cj+1 , . . . , C9+ } is computed. This conceptor can be understood as representing the event “not any of the other speakers”. This leads to a negative evidence quantity z 0 Cj− z which can likewise be used as a basis for classification. 5. By adding the positive and negative evidences, a combined evidence is obtained which can be paraphrased as “this test sample seems to be from speaker j and seems not to be from any of the others”. In more detail, the procedure was implemented as follows. A 10-unit reservoir system with 12 input units and a constant bias term with the update equation x(n + 1) = tanh(W x(n) + W in s(n) + b) (58) was created by randomly creating the 10 × 10 reservoir weight matrix W , the 10 × 12 input weight matrix W in and the bias vector b (full specification in Section 4.8). Furthermore, a random starting state xstart , to be used in every run in training and testing, was created. Then, for each speaker j, the conceptor Cj+ was learnt from the 30 preprocessed training samples skj (n) (where j = 1, . . . , 9; k = 1, . . . , 30; n = 1, . . . , 4) of this speaker, as follows: 1. For each training sample skj (k = 1, . . . , 30) of this speaker, the system (58) was run with this input, starting from x(0) = xstart , yielding four network states x(1), . . . , x(4). These states were concatenated with each other and with the driver input into a 4 · (10 + 12) = 88 dimensional vector zjk = [x(1); skj (1); . . . ; x(4); skj (4)]. This vector contains the entire network response to the input skj and the input itself. 2. The 30 zjk were assembled as columns into a 88 × 30 matrix Z from which a correlation matrix Rj = ZZ 0 /30 was obtained. A preliminary conceptor C̃j+ = Rj (Rj + I)−1 was computed from Rj (preliminary because in a later step the aperture is optimized). Note that C̃j+ has size 88 × 88. After all “positive evidence” conceptors C̃j+ had been created, preliminary “negative evidence” conceptors C̃j− were computed as C̃j− = ¬ _ + + {C̃1+ , . . . , C̃j−1 , C̃j+1 , . . . , C̃9+ }. (59) An important factor for good classification performance is to find optimal apertures for the conceptors, that is, to find aperture adaptation factors γ + , γ − such 76 that final conceptors Cj+ = ϕ(C̃j+ , γ + ), Cj− = ϕ(C̃j− , γ − ) function well for classification. A common practice in machine learning would be to optimize γ by cross-validation on the training data. This, however, is expensive, and more crucially, it would defy the purpose to design a learning procedure which can be incrementally extended by novel pattern classes without having to re-inspect all training data. Instead of cross-validation I used the ∇ criterion described in Section 3.8.4 to find a good aperture. Figure 28 shows how this criterion varies with γ for an exemplary case of a ϕ(C̃j+ , γ + ) sweep. For each of the nine C̃j+ , the value γ̃j+ which maximized ∇ was numerically computed, and the mean of these nine values was taken as the common γ + to get the nine Cj+ = ϕ(C̃j+ , γ + ). A similar procedure was carried out to arrive at Cj− = ϕ(C̃j− , γ − ). 10 5 0 0 1 2 3 4 5 log2 γ 6 7 8 Figure 28: The criterion ∇ from an exemplary conceptor plotted against the log 2 of candidate aperture adaptations γ. The conceptors Cj+ , Cj− were then used for classification as follows. Assume z is an 88-dimensional combined states-and-input vector as described above, obtained from driving the reservoir with a preprocessed test sample. Three kinds of classification hypotheses were computed, the first only based on Cj+ , the second based on Cj− , and one based on a combination of both. Each classification hypothesis is a 9-dimensional vector with “evidences” for the nine speakers. Call these evidence vectors h+ , h− , h+− for the three kinds of classifications. The first of these was computed by setting h̃+ (j) = z 0 Cj+ z, then normalizing h̃+ to a range of [0, 1] to obtain h+ . Similarly h− was obtained from using z 0 Cj− z, and h+− = (h+ + h− )/2 was simply the mean of the two former. Each hypothesis vector leads to a classification decision by opting for the speaker j corresponding to the largest component in the hypothesis vector. This classification procedure was carried out for all of the 370 test cases, giving 370 hypothesis vectors of each of the three kinds. Figure 29 gives an impression. Results: The outlined classification experiment was repeated 50 times with random new reservoirs. On average across the 50 trials, the optimal apertures γ + / γ − were found as 25.0 / 27.0 (standard deviations 0.48 / 0.75). The number of misclassifications for the three types of classification (positive, negative, combined 77 Figure 29: Collected evidence vectors h+ , h− , h+− obtained in a classification learning experiment. Grayscale coding: white = 0, black = 1. Each panel shows 370 evidence vectors. The (mostly) black segments along the diagonal correspond to the correct classifications (test samples were sorted by speaker). For explanation see text. evidence) were 8.5 / 5.9 / 4.9 (standard deviations 1.0 / 0.91 / 0.85). The training errors for the combined classification (obtained from applying the classification procedure on the training samples) was zero in all 50 trials. For comparison, a carefully regularized linear classifier based on the same z vectors (detail in Section 4.8) reached 5.1 misclassifications across the 50 trials. While these results are at the level of state-of-the-art classifiers on this benchmark, this basic procedure can be refined, yielding a significant improvement. The idea is to compute the evidence for speaker j based on a conceptor C̄j+ which itself is based on the assumption that the test sample s belongs to the class j, that is, the computed evidence should reflect a quantity “if s belonged to class j, what evidence can we collect under this assumption?”. Recall that Cj+ is obtained from the 30 training samples through Cj+ = R (R + (γ + )−2 I)−1 , where R = ZZ 0 /30 is the correlation matrix of the 30 training coding vectors belonging to speaker j. Now add the test vector z to Z, obtaining Z̄ = [Zz], R̄ = Z̄ Z̄ 0 /31, C̄j+ = R̄(R̄ + (γ + )−2 I)−1 , and use C̄j+ in the procedure outlined above instead of Cj+ . Note that, in application scenarios where the original training data Z are no longer available at test time, C̄j+ can be directly computed from Cj+ and z through the model update formulas W (36) or (37). The negative evidence conceptor is accordingly obtained by − + + C̄j = ¬ {C̄1+ , . . . , C̄j−1 , C̄j+1 , . . . , C̄9+ }. Results of refined classification procedure: Averaged over 50 learn-test trials with independently sampled reservoir weights, the number of misclassifications for the three types of classification (positive, negative, combined evidence) were 8.4 / 5.9 / 3.4 (standard deviations 0.99 / 0.93 / 0.61). The training misclassification errors for the combined classification was zero in all 50 trials. The detection of good apertures through the ∇ criterion worked well. A manual 78 grid search through candidate apertures found that a minimum test misclassification rate of 3.0 (average over the 50 trials) from the combined classificator was obtained with an aperture α+ = 20, α− = 24 for both the positive and negative conceptors. The automated aperture detection yielded apertures α+ = 25, α− = 27 and a (combined classificator) misclassification rate of 3.4, close to the optimum. Discussion. The following observations are worth noting. Method also applies to static pattern classification. In the presented classification method, temporal input samples s (short preprocessed nonstationary timeseries) were transformed into static coding vectors z as a basis for constructing conceptors. These z contained the original input signal s plus the state response from a small reservoir driven by s. The reservoir was only used to augment s by some random nonlinear interaction terms between the entries in s. Conceptors were created and used in classification without referring back to the reservoir dynamics. This shows that conceptors can also be useful in static pattern classification. Extensibility. A classification model consisting of learnt conceptors Cj+ , Cj− for k classes can be easily extended by new classes, because the computations + − needed for new Ck+1 , Ck+1 only require positive training samples of the new class. Similarly, an existing model Cj+ , Cj− can be extended by new training samples without re-visiting original training data by an application of the model extension formulae (36) or (37). In fact, the refined classification procedure given above can be seen as an ad-hoc conditional model extension by the test sample. Including an “other” class. Given a learnt classification model Cj+ , Cj− for k classes it appears straightforward to include an “other” class by including W + Cother = ¬ {C1+ , . . . , Ck+ } and recomputing the negative evidence concep+ tors from the set {C1+ , . . . , Ck+ , Cother } via (59). I have not tried this out yet. Discriminative nature of combined classification. The classification of the combined type, paraphrased above as “sample seems to be from class j and seems not to be from any of the others”, combines information from all classes into an evidence vote for a candidate class j. Generally, in discriminative learning schemes for classifiers, too, contrasting information between the classes is exploited. The difference is that in those schemes, these differences are worked in at learning time, whereas in the presented conceptor-based scheme they are evaluated at test time. Benefits of Boolean operations. The three aforementioned points – extensibility, “other” class, discriminative classification – all hinge on the availability of the NOT and OR operations, in particular, on the associativity of the latter. 79 Computational efficiency. The computational steps involved in learning and applying conceptors are constructive. No iterative optimization steps are involved (except that standard implementations of matrix inversion are iterative). This leads to short computation times. Learning conceptors from the 270 preprocessed data samples, including determining good apertures, took 650 ms and classifying a test sample took 0.7 ms for the basic and 64 ms for the refined procedure (on a dual-core 2GHz Macintosh notebook computer, using Matlab). Competitiveness. The test misclassification rate of 3.4 is slightly better than the best rate of about 4 that I am aware of in the literature outside own work [57]. Given that the zero error performance in [57] was achieved with an exceptionally expensive model (combining 1,000 independently sampled classifiers), which furthermore is trained in a discriminative setup and thus is not extensible, the attained performance level, the computational efficiency, and the extensibility of the conceptor-base model render it a competitive alternative to existing classification learning methods. It remains to be seen though how it performs on other datasets. Regularization by aperture adaptation? In supervised classification learning tasks, it is generally important to regularize models to find the best balance between overfitting and under-exploiting training data. It appears that the role of regularization is here played by the aperture adaptation, though a theoretical analysis remains to be done. Early stage of research. The proposed classifier learning scheme was based on numerous ad-hoc design decisions, and quite different ways to exploit conceptors for classification are easily envisioned. Thus, in sum, the presented study should be regarded as no more than a first demonstration of the basic usefulness of conceptors for classification tasks. 3.14 Autoconceptors 3.14.1 Motivation and Overview In the preceding sections I have defined conceptors as transforms C = R(R + α−2 I)−1 of reservoir state correlation matrices R. In order to obtain some conceptor C j which captures a driving pattern pj , the network was driven by pj via x(n + 1) = tanh(W ∗ x(n) + W in pj (n + 1) + b), the obtained reservoir states were used to compute Rj , from which C j was computed. The conceptor C j could then later be exploited via the conceptor-constrained update rule x(n + 1) = C j tanh(W x(n) + b) or its variant x(n + 1) = C j tanh(W ∗ x(n) + D x(n) + b). This way of using conceptors, however, requires that the conceptor matrices C j are computed at learning time (when the original drivers are active), and they have to be stored for later usage. Such a procedure is useful and feasible in engineering 80 or machine learning applications, where the conceptors C j may be written to file for later use. It is also adequate for theoretical investigations of reservoir dynamics, and logical analyses of relationships between reservoir dynamics induced by different drivers, or constrained by different conceptors. However, storing conceptor matrices is entirely implausible from a perspective of neuroscience. A conceptor matrix has the same size as the original reservoir weight matrix, that is, it is as large an entire network (up to a saving factor of one half due to the symmetry of conceptor matrices). It is hard to envision plausible models for computational neuroscience where learning a new pattern by some RNN essentially would amount to creating an entire new network. This motivates to look for ways of how conceptors can be used for constraining reservoir dynamics without the necessity to store conceptors in the first place. The network would have to create conceptors “on the fly” while it is performing some relevant task. Specifically, we are interested in tasks or functionalities which are relevant from a computational neuroscience point of view. This objective also motivates to focus on algorithms which are not immediately biologically implausible. In my opinion, this largely excludes computations which explicitly exploit the SVD of a matrix (although it has been tentatively argued that neural networks can perform principal component analysis [80] using biologically observed mechanisms). In the next subsections I investigate a version of conceptors with associated modes of usage where there is no need to store conceptors and where computations are online adaptive and local in the sense that the information necessary for adapting a synaptic weight is available at the concerned neuron. I will demonstrate the workings of these conceptors and algorithms in two functionalities, (i) content-addressable memory (Section 3.14.3) and (ii) simultaneous de-noising and classification of a signal (Section 3.16). In this line of modeling, the conceptors are created by the reservoir itself at the time of usage. There is no role for an external engineer or superordinate control algorithm to “plug in” a conceptor. I will speak of autoconceptors to distinguish these autonomously network-generated conceptors from the conceptors that are externally stored and externally inserted into the reservoir dynamics. In discussions I will sometimes refer to those “externalistic” conceptors as alloconceptors. Autoconceptors, like alloconceptors, are positive semidefinite matrices with singular values in the unit interval. The semantic relationship to data, aperture operations, and Boolean operations are identical for allo- and autoconceptors. However, the way how autoconceptors are generated is different from alloconceptors, which leads to additional constraints on their algebraic characteristics. The set of autoconceptor matrices is a proper subset of the conceptor matrices in general, as they were defined in Definition 2, i.e. the class of positive semidefinite matrices with singular values ranging in the unit interval. The additional constraints arise from the circumstance that the reservoir states x(n) which shape an autoconceptor C are themselves depending on C. 81 The treatment of autoconceptors will be structured as follows. I will first introduce the basic equations of autoconceptors and their adaptation dynamics (Section 3.14.2), demonstrate their working in a of content-addressable memory task (Section 3.14.3) and mathematically analyse central properties of the adaptation dynamics (Section 3.14.4). The adaptation dynamics however has non-local aspects which render it biologically implausible. In order to progress toward biologically feasible autoconceptor mechanisms, I will propose neural circuits which implement autoconceptor dynamics in ways that require only local information for synaptic weight changes (Section 3.15). 3.14.2 Basic Equations The basic system equation for autoconceptor systems is x(n + 1) = C(n) tanh(W ∗ x(n) + W in p(n + 1) + b) (60) or variants thereof, like x(n + 1) = C(n) tanh(W x(n) + b) (61) x(n + 1) = C(n) tanh(W ∗ x(n) + Dx(n) + b), (62) or the latter two for the situation after having patterns stored. The important novel element in these equations is that C(n) is time-dependent. Its evolution will be governed by adaptation rules that I will describe presently. C(n) need not be positive semidefinite at all times; only when the adaptation of C(n) converges, the resulting C matrices will have the algebraic properties of conceptors. One can conceive of the system (60) as a two-layered neural network, where the two layers have the same number of neurons, and where the layers are reciprocally connected by the connection matrices C and W (Figure 30). The two layers have states r(n + 1) = tanh(W ∗ z(n) + W in p(n + 1) + b) z(n + 1) = C r(n + 1). (63) (64) The r layer has sigmoidal (here: tanh) units and the z layer has linear ones. The customary reservoir state x becomes split into two states r and z, which can be conceived of as states of two pools of neurons. In order to determine an adaptation law for C(n), I replicate the line of reasoning that was employed to motivate the design of alloconceptors in Section 3.4. Alloconceptors were designed to act as “regularized identity maps”, which led to the defining criterion (6) in Definition 1: C(R, α) = argminC E[kx − Cxk2 ] + α−2 kCk2fro . 82 W* W in p r C ! z ! Network representation of a basic autoconceptor system. Bias b and Figure 30: optional readout mechanisms are omitted. ! ! The broken arrow indicates that C connections are online adaptive. For explanation see text. The reservoir states x that appear in this criterion resulted from the update equation x(n + 1) = tanh(W ∗ x(n) + W in p(n + 1) + b). This led to the explicit solution (7) stated in Proposition 1: C(R, α) = R (R + α−2 I)−1 , where R was the reservoir state correlation matrix E[xx0 ]. I re-use this criterion (6), which leads to an identical formula C = R (R + α−2 I)−1 for autoconceptors. The crucial difference is that now the state correlation matrix R depends on C: R = E[zz 0 ] = E[Cr(Cr)0 ] = C E[rr0 ] C =: CQC, (65) where we introduce Q = E[rr0 ]. This transforms the direct computation formula (7) to a fixed-point equation: C = CQC (CQC + α−2 I)−1 , which is equivalent to (C − I)CQC − α−2 C = 0. (66) Since Q depends on r states, which in turn depend on z states, which in turn depend on C again, Q depends on C and should be more appropriately be written as QC . Analysing the fixed-point equation (C − I)CQC C − α−2 C = 0 is a little inconvenient, and I defer this to Section 3.14.4. When one uses autoconceptors, however, one does not need to explicitly solve (66). Instead, one can resort to a version of the incremental adaptation rule (11) from Proposition 2:  C(n + 1) = C(n) + λ (z(n) − C(n) z(n)) z 0 (n) − α−2 C(n) , which implements a stochastic gradient descent with respect to the cost function E[kz − Czk2 ] + α−2 kCk2fro . In the new sitation given by (60), the state z here depends on C. This is, however, of no concern for using (11) in practice. We thus complement the reservoir state update rule (60) with the conceptor update rule (11) and comprise this in a definition: 83 Definition 5 An autoconceptive reservoir network is a two-layered RNN with fixed weights W ∗ , W in and online adaptive weights C, whose dynamics are given by z(n + 1) = C(n) tanh(W ∗ z(n) + W in p(n + 1) + b)  C(n + 1) = C(n) + λ (z(n) − C(n) z(n)) z 0 (n) − α−2 C(n) , (67) (68) where λ is a learning rate and p(n) an input signal. Likewise, when the update equation (67) is replaced by variants of the kind (61) or (62), we will speak of autoconceptive networks. I will derive in Section 3.14.4 that if the driver p is stationary and if C(n) converges under these rules, then the limit C is positive semidefinite with singular values in the set (1/2, 1) ∪ {0}. Singular values asymptotically obtained under the evolution (68) are either “large” (that is, greater than 1/2) or they are zero, but they cannot be “small” but nonzero. If the aperture α is fixed at increasingly smaller values, increasingly many singular values will be forced to zero. Furthermore, the analysis in Section 3.14.4 will also reveal that among the nonzero singular values, the majority will be close to 1. Both effects together mean that autoconceptors are typically approximately hard conceptors, which can be regarded as an intrinsic mechanism of contrast enhancement, or noise suppression. 3.14.3 Example: Autoconceptive Reservoirs as Content-Addressable Memories In previous sections I demonstrated how loaded patterns can be retrieved if the associated conceptors are plugged into the network dynamics. These conceptors must have been stored beforehand. The actual memory functionality thus resides in whatever mechanism is used to store the conceptors; furthermore, a conceptor is a heavyweight object with the size of the reservoir itself. It is biologically implausible to create and “store” such a network-like object for every pattern that is to be recalled. In this section I describe how autoconceptor dynamics can be used to create content-addressable memory systems. In such systems, recall is triggered by a cue presentation of the item that is to be recalled. The memory system then should in some way autonomously “lock into” a state or dynamics which autonomously re-creates the cue item. In the model that will be described below, this “locking into” spells out as running the reservoir in autoconceptive mode (using equations (62) and (68)), by which process a conceptor corresponding to the cue pattern shapes itself and enables the reservoir to autonomously re-generate the cue. The archetype of content-addressable neural memories is the Hopfield network [48]. In these networks, the cue is a static pattern (technically a vector, in demonstrations often an image), which typically is corrupted by noise or incomplete. If the Hopfield network has been previously trained on the uncorrupted complete 84 pattern, its recurrent dynamics will converge to an attractor state which re-creates the trained original from the corrupted cue. This pattern completion characteristic is the essence of the memory functionality in Hopfield networks. In the autoconceptive model, the aspect of completion manifests itself in that the cue is a brief presentation of a dynamic pattern, too short for a conceptor to be properly adapted. After the cue is switched off, the autoconceptive dynamics continues to shape the conceptor in an entirely autonomous way, until it is properly developed and the reservoir re-creates the cue. This autoconceptive adaptation is superficially analog to the convergence to an attractor point in Hopfield networks. However, there are important conceptual and mathematical differences between the two models. I will discuss them at the end of this section. Demonstration of basic architecture. To display the core idea of a contentaddressable memory, I ran simulations according to the following scheme: 1. Loading. A collection of k patterns pj (j = 1, . . . , k) was loaded in an N dimensional reservoir, yielding an input simulation matrix D as described in Equation (40), and readout weights W out , as described in Section 3.3. No conceptors are stored. 2. Recall. For each pattern pj , a recall run was executed which consisted of three stages: (a) Initial washout. Starting from a zero network state, the reservoir was driven with pj for nwashout steps, in order to obtain a task-related reservoir state. (b) Cueing. The reservoir was continued to be driven with pj for another ncue steps. During this cueing period, C j was adapted by using r(n + 1) = tanh(W r(n) + W in pj (n) + b), C j (n + 1) = C j (n) + λcue ((r(n) − C j (n) r(n)) r0 (n) − α−2 C j (n)). At the beginning of this period, C j was initialized to the zero matrix. At the end of this period, a conceptor C j cue was obtained. (c) Autonomous recall. The network run was continued for another nrecall steps in a mode where the input was switched off and replaced by the input simulation matrix D, and where the conceptor C j cue was further adapted autonomously by the autoconceptive update mechanism, via z(n + 1) = C j (n) tanh(W z(n) + Dz(n) + b), C j (n + 1) = C j (n) + λrecall ((z(n) − C j (n) z(n)) z 0 (n) − α−2 C j (n)). At the end of this period, a conceptor C j recall was available. 3. Measuring quality of conceptors. The quality of the conceptors C j cue and C j recall was measured by separate offline runs without conceptor adaptation using r(n) = tanh(W z(n) + Dz(n) + b); z(n + 1) = C j cue r(n) (or 85 z(n + 1) = C j recall r(n), respectively). A reconstructed pattern y(n) = W out r(n) was obtained and its similarity with the original pattern pj was quantified in terms of a NRMSE. I carried out two instances of this experiment, using two different kinds of patterns and parametrizations: 4-periodic pattern. The patterns were random integer-periodic patterns of period 4, where per pattern the four pattern points were sampled from a uniform distribution and then shift-scaled such that the range became [−1 1]. This normalization implies that the patterns are drawn from an essentially 3-parametric family (2 real-valued parameters for fixing the two pattern values not equal to −1 or 1; one integer parameter for fixing the relative temporal positioning of the −1 and 1 values). Experiment parameters: k = 10, N = 100, α = 100, nwashout = 100, ncue = 15, nrecall = 300, γ cue = 0.02, γ recall = 0.01 (full detail in Section 4.7). √ √ Mix of 2 irrational-period sines. Two sines of period lengths 30 and 30/2 were added with random phase angles and random amplitudes, where however the two amplitudes were constrained to sum to 1. This means that patterns were drawn from a 2-parametric family. Parameters: k = 10, N = 200, α = 100, nwashout = 100, ncue = 30, nrecall = 10000, γ cue = γ recall = 0.01. Furthermore, during the auto-adaptation period, strong Gaussian iid noise was added to the reservoir state before applying the tanh, with a signal-tonoise rate of 1. Figure 31 illustrates the outcomes of these two experiments. Main observations: 1. In all cases, the quality of the preliminary conceptor C j cue was very much improved by the subsequent auto-adaptation (Panels B, D), leading to an ultimate pattern reconstruction whose quality is similar to the one that would be obtained from precomputed/stored conceptors. 2. The effects of the autoconceptive adaptation are reflected in the singular value profiles of C j cue versus C j recall (Panels A, C). This is especially well visible in the case of the sine mix patterns (for the period-4 patterns the effect is too small to show up in the plotting resolution). During the short cueing time, the online adaptation of the conceptor from a zero matrix to C j cue only manages to build up a preliminary profile that could be intuitively called “nascent”, which then “matures” in the ensuing network-conceptor interaction during the autoconceptive recall period. 3. The conceptors C j recall have an almost rectangular singular value profile. In the next section I will show that if autoconceptive adaptation converges, singular values are either exactly zero or greater than 0.5 (in fact, typically close to 1), in agreement with what can be seen here. Autoconceptive adaptation has a strong tendency to lead to almost hard conceptors. 86 Singular Values y and p 0 1 1 0 !1 !1 log10 NRMSE 0 1 1 0 0 !1 !3 !4 1 1 !5 0 0 0 5 10 !1 0 5 !6 10 A. B. Singular Values 0 !0.2 0 !0.4 !1 !0.6 1 1 0 0 !1 1 0 0 10 20 1 2 3 4 5 6 7 8 9 10 Pattern index y and p 1 log10 NRMSE 1 C. !2 !0.8 !1 !1.2 1 !1.4 0 !1.6 !1 0 5 !1.8 10 D. 1 2 3 4 5 6 7 8 9 10 Pattern index Figure 31: Basic content-addressable memory demos. A, B: 4-periodic pattern, C, D: mix of sines pattern. Panels A, C show the first three of the 10 patterns. The singular value plots show the first 10 (20, respectively) singular values of C j cue (black) and C j recall (light gray). The “y and p” panels show the reconstructed pattern y obtained with C j recall (bold light gray) and the original training pattern pj (broken black), after optimal phase-alignment. B, D plot the pattern reconstruction NRMSEs in log10 scale for the reconstructions obtained from C j cue (black squares) and from C j recall (gray crosses). For explanation see text. 87 4. The fact that adapted autoconceptors typically have a close to rectangular singular value spectrum renders the auto-adaptation process quite immune against even strong state noise. Reservoir state noise components in directions of the nulled eigenvectors are entirely suppressed in the conceptorreservoir loop, and state noise components within the nonzero conceptor eigenspace do not impede the development of a “clean” rectangular profile. In fact, state noise is even beneficial: it speeds up the auto-adaptation process without a noticeable loss in final pattern reconstruction accuracy (comparative simulations not documented here). This noise robustness however depends on the existence of zero singular values in the adapting autoconceptor C. In the simulations reported above, such zeros were present from the start because the conceptor was initialized as the zero matrix. If it had been initialized differently (for instance, as identity matrix), the auto-adaptation would only asymptotically pull (the majority of) singular values to zero, with noise robustness only gradually increasing to the degree that the singular value spectrum of C becomes increasingly rectangular. If noise robustness is desired, it can be reached by additional adaptation mechanisms for C. In particular, it is helpful to include a thresholding mechanism: all singular values of C(n) exceeding a suitable threshold are set to 1, all singular values dropping below a certain cutoff are zeroed (not shown). Exploring the effects of increasing memory load – patterns from a parametrized family. A central theme in neural memory research is the capacity of a neural storage system. In order to explore how recall accuracy depends on the memory load, I carried out two further experiments, one for each pattern type. Each of these experiments went along the following scheme: 1. Create a reservoir. 2. In separate trials, load this reservoir with an increasing number k of patterns (ranging from k = 2 to k = 200 for the 4-period and from k = 2 to k = 100 for the mixed sines). 3. After loading, repeat the recall scheme described above, with the same parameters. Monitor the recall accuracy obtained from C j recall for the first 10 of the loaded patterns (if less than 10 were loaded, do it only for these). 4. In addition, per trial, also try to cue and “recall” 10 novel patterns that were drawn randomly from the 4-periodic and mixed-sine family, respectively, and which were not part of the collection loaded into the reservoir. Monitor the “recall” accuracy of these novel patterns as well. 5. Repeat this entire scheme 5 times, with freshly created patterns, but re-using always the same reservoir. 88 0 !0.2 !0.5 !0.4 !1 !0.6 log10 NRMSE log10 NRMSE !1.5 !2 !2.5 !3 !0.8 !1 !1.2 !3.5 !1.4 !4 !1.6 !4.5 !5 A. 2 3 5 8 12 16 25 50 Nr of loaded patterns 100 !1.8 200 B. 2 3 5 8 12 16 25 Nr of loaded patterns 50 100 Figure 32: Exploring the effects of memory load. A: 4-periodic patterns, B: mix-of-sines patterns. Each diagram shows the log10 NRMSE of recalling loaded patterns with C cue (black solid line) and with C recall (black broken line), as well as of “recalling” patterns not contained in the loaded set, again obtained from C cue (gray solid line) and with C recall (gray broken line). Error bars indicate 95 % confidence intervals. Both axes are in logarithmic scaling. For explanation see text. Figure 32 shows the results of these experiments. The plotted curves are the summary averages over the 10 recall targets and the 5 experiment repetitions. Each plot point in the diagrams thus reflects an average over 50 NRMSE values (except in cases where k < 10 patterns were stored; then plotted values correspond to averages over 5k NRMSE values for recalling of loaded patterns). I list the main findings: 1. For all numbers of stored patterns, and for both the recall loaded patterns and recall novel patterns conditions, the autoconceptive “maturation” from C cue to C recall with an improvement of recall accuracy is found again. 2. The final C recall -based recall accuracy in the recall loaded pattern condition has a sigmoid shape for both pattern types. The steepest ascent of the sigmoid (fastest deterioration of recall accuracy with increase of memory load) occurs at about the point where the summed quota of all C cue reaches the reservoir size N – the point where the network is “full” according to this criterion (a related effect was encountered in the incremental loading study reported in Section 3.11). When the memory load is further increased beyond this point (one might say the network becomes “overloaded”), the recall accuracy does not break down but levels out on a plateau which still translates into a recall performance where there is a strong similarity between the target signal and the reconstructed one. 89 3. In the recall novel patterns conditions, one finds a steady improvement of recall accuracy with increasing memory load. For large memory loads, the accuracy in the recall novel patterns condition is virtually the same as in the recall loaded patterns conditions. Similar findings were obtained in other simulation studies (not documented here) with other types of patterns, where in each study the patterns were drawn from a parametrized family. A crucial characteristic of these experiments is that the patterns were samples from a parametrized family. They shared a family resemblance. This mutual relatedness of patterns is exploited by the network: for large numbers k of stored patterns, the storing/recall mechanism effectively acquires a model of the entire parametric family, a circumstance revealed by the essentially equal recall accuracy in the recall loaded patterns and recall novel patterns conditions. In contrast, for small k, the recall loaded patterns condition enables a recall accuracy which is superior to the recall novel patterns condition: the memory system stores/recalls individual patterns. I find this worth a special emphasis: • For small numbers of loaded patterns (before the point of network overloading) the system stores and recalls individual patterns. The input simulation matrix D represents individual patterns. • For large numbers of loaded patterns (overloading the network), the system learns a representation of the parametrized pattern family and can be cued with, and will “recall”, any pattern from that family. The input simulation matrix D represents the class of patterns. At around the point of overloading, the system, in a sense, changes its nature from a mere storing-of-individuals device to a learning-of-class mechanism. I call this the class learning effect. Effects of increasing memory load – mutually unrelated patterns. A precondition for the class learning effect is that the parametric pattern family is simple enough to become represented by the network. If the pattern family is too richly structured to be captured by a given network size, or if patterns do not have a family resemblance at all, the effect cannot arise. If a network is loaded with such patterns, and then cued with novel patterns, the “recall” accuracy will be on chance level; furthermore, as k increases beyond the overloading region, the recall accuracy of patterns contained in the loaded collection will decline to chance level too. In order to demonstrate this, I loaded the same 100-unit reservoir that was used in the 4-periodic pattern experiments with random periodic patterns whose periods ranged from 3 through 9. While technically this is still a parametric family, the number of parameters needed to characterize a sample pattern is 8, which 90 renders this family far too complex for a 100-unit reservoir. Figure 33 illustrates what, expectedly, happens when one loads increasingly large numbers of such effectively unrelated patterns. The NRMSE for the recall novel patterns condition is about 1 throughout, which corresponds to entirely uncorrelated pattern versus reconstruction pairs; and this NRMSE is also approached for large k in the recall loaded patterns condition. 0.5 0 log10 NRMSE !0.5 !1 !1.5 !2 !2.5 !3 !3.5 4 6 8 10 14 1822 30 40 50 65 85110 Nr of loaded patterns Figure 33: Effects of memory load on recall accuracy for unrelated patterns. Figure layout as in Figure 32. For explanation see text. Discussion. Neural memory mechanisms – how to store patterns in, and retrieve from, neural networks – is obviously an important topic of research. Conceptorbased mechanisms bring novel aspects to this widely studied field. The paradigmatic model for content-addressable storage of patterns in a neural network is undoubtedly the family of auto-associative neural networks (AANNs) whose analysis and design was pioneered by Palm [82] and Hopfield [48] (with a rich history in theoretical neuroscience, referenced in [82]). Most of these models are characterized by the following properties: • AANNs with N units are used to store static patterns which are themselves N -dimensional vectors. The activity profile of the entire network coincides with the very patterns. In many demonstrations, these patterns are rendered as 2-dimensional images. • The networks are typically employed, after training, in pattern completion or restauration tasks, where an incomplete or distorted N -dimensional pattern is set as the initial N -dimensional network state. The network then should evolve toward a completed or restored pattern state. 91 • AANNs have symmetric connections and (typically) binary neurons. Their recurrent dynamics can be formalized as a descent along an energy function, which leads to convergence to fixed points which are determined by the input pattern. • An auto-associative network is trained from a set of k reference patterns, where the network weights are adapted such that the network state energy associated with each training pattern is minimized. If successful, this leads to an energy landscape over state space which assumes local minima at the network states that are identical to the reference patterns. The comprehensive and transparent mathematical theory available for AANNs has left a strong imprint on our preconceptions of what are essential features of a content-addressable neural memory. Specifically, AANN research has settled the way how the task of storing items in an associative memory is framed in the first place: “given k reference patterns, train a network such that in exploitation, these patterns can be reconstructed from incomplete cues”. This leads naturally to identifying stored memory items with attractors in the network dynamics. Importantly, memory items are seen as discrete, individual entities. For convenience I will call this the “discrete items stored as attractors” (DISA) paradigm. Beyond modeling memory functionality proper, the DISA paradigm is historically and conceptually connected to a wide range of models of neural representations of conceptual knowledge, where attractors are taken as the neural representatives of discrete concepts. To name only three kinds of such models: point attractors (cell assemblies and bistable neurons) in the working memory literature [23]; spatiotemporal attractors in neural field theories of cortical representation [95, 30, 31]; (lobes of) chaotic attractors as richly structured object and percept representations [111, 6]. Attractors, by definition, keep the system trajectory confined within them. Since clearly cognitive processes do not become ultimately trapped in attractors, it has been a long-standing modeling challenge to account for “attractors that can be left again” – that is, to partly disengage from a strict DISA paradigm. Many answers have been proposed. Neural noise is a plausible agent to “kick” a trajectory out of an attractor, but a problem with noise is its unspecificity which is not easily reconciled with systematic information processing. A number of alternative “attractor-like” phenomena have been considered that may arise in high-dimensional nonlinear dynamics and offer escapes from the trapping problem: saddle point dynamics or homoclinic cycles [89, 41]; chaotic itinerancy [105]; attractor relics, attractor ruins, or attractor ghosts [103]; transient attractors [53]; unstable attractors [104]; high-dimensional attractors (initially named partial attractors) [70]; attractor landscapes [78]. All of these lines of work revolve around a fundamental conundrum: on the one hand, neural representations of conceptual entities need to have some kind of stability – this renders them identifiable, noise-robust, and temporally persistent 92 when needed. On the other hand, there must be cognitively meaningful mechanisms for a fast switching between neural representational states or modes. This riddle is not yet solved in a widely accepted way. Autoconceptive plane attractor dynamics may lead to yet another answer. This kind of dynamics intrinsically combines dynamical stability (in directions complementary to the plane of attraction) with dynamical neutrality (within the plane attractor). However, in the next section we will see that this picture, while giving a good approximation, is too simple. 3.14.4 Analysis of Autoconceptor Adaptation Dynamics Here I present a formal analysis of some asymptotic properties of the conceptor adaptation dynamics. Problem Statement We consider the system of the coupled fast network state updates and slow conceptor adaptation given by z(n + 1) = C(n) tanh(W z(n)) (69) and  C(n + 1) = C(n) + λ (z(n + 1) − C(n) z(n + 1)) z 0 (n + 1) − α−2 C(n)  = C(n) + λ (I − C(n)) z(n + 1)z 0 (n + 1) − α−2 C(n) , (70) where λ is a learning rate. When λ is small enough, the instantaneous state correlation z(n)z 0 (n) in (70) can be replaced by its expectation under C fixed at C(n), that is, we consider the dynamical system in time k z(k + 1) = C(n) tanh(W z(k)) and take the expectation of zz 0 under this dynamics, En [zz 0 ] := Ek [C(n) tanh(W z(k)) tanh(W z(k))0 C(n)0 ] = C(n) Ek [tanh(W z(k)) tanh(W z(k))0 ]C(n)0 =: C(n)Q(n)C(n)0 , where Q(n) is a positive semi-definite correlation matrix. Note that Q(n) is a function of C and itself changes on the slow timescale of the C adaptation. For further analysis it is convenient to change to continuous time and instead of (70) consider Ċ(t) = (I − C(t)) C(t)Q(t)C 0 (t) − α−2 C(t). (71) I now investigate the nature of potential fixed point solutions under this dynamics. If C is a fixed point of this dynamics, Q(t) is constant. In order to 93 investigate the nature of such fixed point solutions, we analyse solutions in C for the general fixed point equation associated with (71), i.e. solutions in C of 0 = (I − C) CQC 0 − α−2 C, (72) where Q is some positive semidefinite matrix. We will denote the dimension of C by N throughout the remainder of this section. Let V DV 0 = Q be the SVD of Q, where D is a diagonal matrix containing the singular values of Q on its diagonal, without loss of generality in descending order. Then (72) is equivalent to 0 = V 0 ((I − C) CQC 0 − α−2 C)V = (I − V 0 CV ) V 0 CV D(V 0 CV )0 − α−2 V 0 CV. (73) We may therefore assume that Q is in descending diagonal form D, analyse solutions of 0 = (I − C) CDC 0 − α−2 C, (74) and then transform these solutions C of (74) back to solutions of (72) by C → V CV 0 . In the remainder we will only consider solutions of (74). I will characterize the fixed points of this system and analyse their stability properties. Characterizing the Fixed-point Solutions The case α = 0. In this degenerate case, neither the discrete-time update rule (70) nor the dynamical equation (71) is well-defined. The aperture cannot be set to zero in practical applications where (70) is used for conceptor adaptation. However, it is clear that (i) for any α > 0, C = 0 is a fixed point solution of (71), and that (ii) if we define B(α) = sup{kCk | C is a fixed-point solution of (71)}, then limα→0 B(α) = 0. This justifies to set, by convention, C = 0 as the unique fixed point of (71) in the case α = 0. In practical applications this could be implemented by a reset mechanism: whenever α = 0 is set by some superordinate control mechanism, the online adaptation (70) is over-ruled and C(n) is immediately set to 0. The case α = ∞. In the case α = ∞ (i.e., α−2 = 0) our task is to characterize the solutions C of 0 = (I − C)CDC 0 . (75) We first assume that D has full rank. Fix some k ≤ N . We proceed to characterize rank-k solutions C of (75). CDC 0 is positive semidefinite and has rank k, thus it has an SVD CDC 0 = U ΣU 0 where Σ is diagonal nonnegative and can be assumed to be in descending order, i.e. its diagonal is (σ1 , . . . , σk , 0, . . . , 0)0 with σi > 0. Any solution C of (75) must satisfy U ΣU 0 = CU ΣU 0 , or equivalently, Σ = U 0 CU Σ. It is easy to see that this entails that U 0 CU is of the form   Ik×k 0 0 U CU = 0 A 94 for some arbitrary (n − k) × (n − k) submatrix A. Requesting rank(C) = k implies A = 0 and hence   Ik×k 0 C=U U 0. (76) 0 0 Since conversely, if U is any orthonormal matrix, a matrix C of the form given in (76) satisfies C 2 = C, any such C solves (75). Therefore, the rank-k solutions of (75) are exactly the matrices of type (76). If D has rank l < N , again we fix a desired rank k for solutions C. Again let CDC 0 = U ΣU 0 , with Σ in descending order. Σ has a rank m which satisfies m ≤ k, l. From considering Σ = U 0 CU Σ it follows that U 0 CU has the form   Im×m 0 0 U CU = 0 A for some (N − m) × (N − m) submatrix A. Since we prescribed C to have rank k, the rank of A is k − m. Let U>m be the n × (N − m) submatrix of U made from the columns with indices greater than m. We rearrange U ΣU 0 = CDC 0 to     Im×m 0 Im×m 0 0 Σ= U DU , 0 A 0 A from which it follows (since the diagonal of Σ is zero at positions greater than m) 0 that AU>m DU>m A0 = 0. Since the diagonal of D is zero exactly on positions > l, this is equivalent to A (U (1 : l, m + 1 : N ))0 = A U (m + 1 : N, 1 : l) = 0. (77) We now find that (77) is already sufficient to make C = U (Im×m |0 / 0|A) U 0 solve (75), because a simple algebraic calculation yields   (U (1 : N, 1 : m))0 CD = CCD = U D. 0 We thus have determined the rank-k solutions of (75) to be all matrices of form C = U (Im×m |0 / 0|A) U 0 , subject to (i) m ≤ l, k, (ii) rank(A) = k − m, (iii) A (U (1 : l, m + 1 : N ))0 = 0. Elementary considerations (omitted here) lead to the following generative procedure to obtain all of these matrices: 1. Choose m satisfying l − N + k ≤ m ≤ k. 2. Choose a size N × l matrix Ũ 0 made from orthonormal columns which is zero in the last k − m rows (this is possible due to the choice of m). 3. Choose an arbitrary (N − m) × (N − m) matrix A of SVD form A = V ∆W 0 where the diagonal matrix ∆ is in ascending order and is zero exactly on the first N − k diagonal positions (hence rank(A) = k − m). 95 4. Put Ũ˜ 0 =  Im×m 0 0 W  Ũ 0 . This preserves orthonormality of columns, i.e. Ũ˜ 0 is still made of orthonormal columns. Furthermore, it holds that (0|A) Ũ˜ 0 = 0. 5. Pad Ũ˜ 0 by adding arbitrary N − l further orthonormal colums to the right, obtaining an N × N orthonormal U 0 . 6. We have now obtained a rank-k solution   Im×m 0 C=U U 0, 0 A (78) where we have put U to be the transpose of the matrix U 0 that was previously constructed. The case 0 < α < ∞. We proceed under the assumption that α < ∞, that is, ∞ > α−2 > 0. I first show that any solution C of (74) is a positive semidefinite matrix. The matrix CDC 0 is positive semidefinite and therefore has a SVD of the form U ΣU 0 = CDC 0 , where U is orthonormal and real and Σ is the diagonal matrix with the singular values of CDC 0 on its diagonal, without loss of generality in descending order. From (I − C)U ΣU 0 = α−2 C it follows that U ΣU 0 = α−2 C + C U ΣU 0 = C (α−2 I + U ΣU 0 ) = C (U (α−2 I + Σ)U 0 ). α−2 I + Σ and hence U (α−2 I + Σ)U 0 are nonsingular because α−2 > 0, therefore C = U ΣU 0 (U (α−2 I + Σ)U 0 )−1 = U Σ(α−2 I + Σ)−1 U 0 =: U SU 0 , where S = Σ(α−2 I+Σ)−1 is a diagonal matrix, and in descending order since Σ was in descending order. We therefore know that any solution C of (74) is of the form C = U SU 0 , where U is the same as in CDC 0 = U ΣU 0 . From S = Σ(α−2 I + Σ)−1 it furthermore follows that si < 1 for all singular values si of C, that is, C is a conceptor matrix. We now want to obtain a complete overview of all solutions C = U SU 0 of (74), expressed in terms of an orthonormal real matrix U and a nonnegative real diagonal matrix S. This amounts to finding the solutions in S and U of (S − S 2 )U 0 DU S = α−2 S, (79) subject to S being nonnegative real diagonal and U being real orthonormal. Without loss of generality we furthermore may assume that the entries in S are in descending order. 96 Some observations are immediate. First, the rank of S is bounded by the rank of D, that is, the number of nonzero diagonal elements in S cannot exceed the number of nonzero elements in D. Second, if U, S is a solution, and S ∗ is the same as S except that some nonzero elements in S are nulled, then U, S ∗ is also a solution (to see this, left-right multiply both sides of (79) with a thinned-out identity matrix that has zeros on the diagonal positions which one wishes to null). Fix some k ≤ rank(D). We want to determine all rank-k solutions U, S, i.e. where S has exactly k nonzero elements that appear in descending order in the first k diagonal positions. We write Sk to denote diagonal real matrices of size k × k whose diagonal entries are all positive. Furthermore, we write Uk to denote any N × k matrix whose columns are real orthonormal. It is clear that if S, U solve (79) and rank(S) = k (and S is in descending order), and if U ∗ differs from U only in the last N − k columns, then also S, U ∗ solve (79). Thus, if we have all solutions Sk , Uk of (Sk − Sk2 )Uk0 DUk Sk = α−2 Sk , (80) then we get all rank-k solutions S, U to (74) by padding Sk with N − k zero rows/columns, and extending Uk to full size N × n by appending any choice of orthonormal columns from the orthogonal complement of Uk . We therefore only have to characterize the solutions Sk , Uk of (80), or equivalently, of Uk0 DUk = α−2 (Sk − Sk2 )−1 . (81) To find such Sk , Uk , we first consider solutions S̃k , Uk of Uk0 DUk = S̃k , (82) subject to S̃k being diagonal with positive diagonal elements. For this we employ the Cauchy interlacing theorem and its converse. I restate, in a simple special case adapted to the needs at hand, this result from [27] where it is presented in greater generality. Theorem 1 (Adapted from Theorem 1 in [27], see remark of author at the end of the proof of that theorem for a justification of the version that I render here.) Let A, B be two symmetric real matrices with dim(A) = n ≥ k = dim(B), and singular values σ1 , . . . , σn and τ1 , . . . , τk (in descending order). Then there exists a real n × k matrix U with U 0 U = Ik×k and U 0 AU = B if and only if for i = 1, . . . , k it holds that σi ≥ τi ≥ σn−k+i . This theorem implies that if Uk , S̃k is any solution of (82), with Uk made of k orthonormal columns and S̃k diagonal with diagonal elements s̃i (where j = 1, . . . , k, and the enumeration is in descending order), then the latter “interlace” with the diagonal entries d1 , . . . , dN of D per di ≥ s̃i ≥ dN −k+i . And conversely, any diagonal matrix S̃k , whose elements interlace with the diagonal elements of D, appears in a solution Uk , S̃k of (82). 97 Equipped with this overview of solutions to (82), we revert from (82) to (81). Solving S̃k = α−2 (Sk − Sk2 )−1 for Sk we find that the diagonal elements si of Sk relate to the s̃i by s ! si = 1 2 1± 1− 4α−2 s̃i . (83) Since si must be positive real and smaller than 1, only such solutions S̃k to (82) whose entries are all greater than 4α−2 yield admissible solutions to our original problem (81). The interlacing condition then teaches us that the possible rank of solutions C of (74) is bounded from above by the number of entries in D greater than 4α−2 . For each value s̃i > 4α−2 , (83) gives two solutions si,1 < 1/2 < si,2 . We will show further below that the solutions smaller than 1/2 are unstable while the solutions greater than 1/2 are stable in a certain sense. Summarizing and adding algorithmic detail, we obtain all rank-k solutions C = U SU 0 for (74) as follows: 1. Check whether D has at least k entries greater than 4α−2 . If not, there are no rank-k solutions. If yes, proceed. 2. Find a solution in Uk , S̃k of Uk0 DUk = S̃k , with S̃k being diagonal with diagonal elements greater than 4α−2 , and interlacing with the elements of D. (Note: the proof of Theorem 1 in [27] is constructive and could be used for finding Uk given S̃k .) 3. Compute Sk via (83), choosing between the ± options at will. 4. Pad Uk with any orthogonal complement and Sk with further zero rows and columns to full n×n sized U, S, to finally obtain a rank-k solution C = U SU 0 for (74). Stability Analysis of Fixed-point Solutions The case α = ∞. Note again that α = ∞ is the same as α−2 = 0. We consider the time evolution of the quantity kI −Ck2 as C evolves under the zero-α−2 version of (71): Ċ(t) = (I − C(t)) C(t)Q(t)C 0 (t). (84) We obtain (kI − Ck2 )˙ = = = = trace((I − C)(I − C 0 ))˙ trace((C − C 2 )QC 0 C 0 + CCQ(C 0 − C 02 ) − (C − C 2 )QC 0 − CQ(C 0 − C 02 )) 2 trace((C − C 2 )Q(C 02 − C 0 )) −2 trace((C − C 2 )Q(C 0 − C 02 )) ≤ 0, (85) 98 where in the last line we use that the trace of a positive semidefinite matrix is nonnegative. This finding instructs us that no other than the identity C = I can be a stable solution of (84), in the sense that all eigenvalues of the associated Jacobian are negative. If Q(t) has full rank for all t, then indeed this is the case (it is easy to show that kI − C(t)k2 is strictly decreasing, hence a Lyapunov function in a neighborhood of C = I). The stability characteristics of other (not full-rank) fixed points of (84) are intricate. If one computes the eigenvalues of the Jacobian at rank-k fixed points C (i.e. solutions of sort C = U (Ik×k |0 / 0|0)U 0 , see (76)), where k < N , one finds negative values and zeros, but no positive values. (The computation of the Jacobian follows the pattern of the Jacobian for the case α < ∞, see below, but is simpler; it is omitted here). Some of the zeros correspond to perturbation directions of C which change only the coordinate transforming matrices U . These perturbations are neutrally stable in the sense of leading from one fixed point solution to another one, and satisfy C + ∆ = (C + ∆)2 . However, other perturbations C + ∆ with the property that C +∆ 6= (C +∆)2 lead to (kI −Ck2 )˙ < 0. After such a perturbation, the matrix C + ∆ will evolve toward I in the Frobenius norm. Since the Jacobian of C has no positive eigenvalues, this instability is non-hyperbolic. In simulations one accordingly finds that after a small perturbation ∆ is added, the divergence away from C is initially extremely slow, and prone to be numerically misjudged to be zero. For rank-deficient Q, which leads to fixed points of sort C = U (Im×m |0 / 0|A)U 0 , the computation of Jacobians becomes involved (mainly because A may be nonsymmetric) and I did not construct them. In our context, where Q derives from a random RNN, Q can be expected to have full rank, so a detailed investigation of the rank-deficient case would be an academic exercise. The case 0 < α < ∞. This is the case of greatest practical relevance, and I spent a considerable effort on elucidating it. Note that α < ∞ is equivalent to α−2 > 0. Let C0 = U SU 0 be a rank-k fixed point of Ċ = (I − C)CDC 0 − α−2 C, where α−2 > 0, U SU 0 is the SVD of C and without loss of generality the singular values s1 , . . . , sN in the diagonal matrix S are in descending order, with s1 , . . . , sk > 0 and si = 0 for i > k (where 1 ≤ k ≤ N ). In order to understand the stability properties of the dynamics Ċ in a neighborhood of C0 , we compute the eigenvalues of the Jacobian JC = ∂ Ċ/∂C at point C0 . Notice that C is an N × N matrix whose entries must be rearranged into a vector of size N 2 × 1 in order to arrive at the customary representation of a Jacobian. JC is thus an N 2 × N 2 matrix which should be more correctly written as JC (µ, ν) = ∂ vec Ċ(µ)/∂ vec C(ν), where vec is the rearrangement operator (1 ≤ µ, ν ≤ N 2 are the indices of the matrix JC ). Details are given in Section 5.10 within the proof of the following central proposition: Proposition 15 The Jacobian JC (µ, ν) = ∂ vec Ċ(µ)/∂ vec C(ν) of a rank-k fixed point of (71) has the following multiset of eigenvalues: 99 1. k(N − k) instances of 0, 2. N (N − k) instances of −α−2 , 3. k eigenvalues α−2 (1 − 2sl )/(1 − sl ), where l = 1, . . . , k, 4. k(k − 1) eigenvalues which come in pairs of the form   s 2 −2 sm sm α  sl sl + ± − + 4 , λ1,2 = 2 sm − 1 sl − 1 sm − 1 sl − 1 where m < l ≤ k. An inspection of sort 3. eigenvalues reveals that whenever one of the sl is smaller than 1/2, this eigenvalue is positive and hence the fixed point C0 is unstable. If some sl is exactly equal to 1/2, one obtains additional zero eigenvalues by 3. I will exclude such cases in the following discussion, considering them to be non-generic. If all sl are greater than 1/2, it is straightforward to show that the values of sorts 3. and 4. are negative. Altogether, JP thus has k(N −k) times the eigenvalue 0 and otherwise negative ones. I will call such solutions 1/2-generic. All solutions that one will effectively obtain when conceptor auto-adaptation converges are of this kind. This characterization of the eigenvalue spectrum of 1/2-generic solutions does not yet allow us to draw firm conclusions about how such a solution will react to perturbations. There are two reasons why Proposition 15 affords but a partial insight in the stability of 1/2-generic solutions. (A) The directions connected to zero eigenvalues span a k(N − k)-dimensional center manifold whose dynamics remains un-analysed. It may be stable, unstable, or neutral. (B) When a 1/2generic solution is perturbed, the matrix D which reflects the conceptor-reservoir interaction will change: D is in fact a function of C and should be more correctly written D = D(C). In our linearization around fixed point solutions we implicitly considered D to be constant. It is unclear whether a full treatment using D = D(C) would lead to a different qualitative picture. Furthermore, (A) and (B) are liable to combine their effects. This is especially relevant for the dynamics on the center manifold, because its qualitative dynamics is determined by components from higher-order approximations to (71) which are more susceptible to become qualitatively changed by non-constant D than the dynamical components of (71) orthogonal to the center manifold. Taking (A) and (B) into account, I now outline a hypothetical picture of the dynamics of (71) in the vicinity of 1/2-generic fixed-point solutions. This picture is based only on plausibility considerations, but it is in agreement with what I observe in simulations. 100 First, a dimensional argument sheds more light on the nature of the dynamics in the k(N − k)-dimensional center manifold. Consider a 1/2-generic rank-k solution C = U SU 0 of (79). Recall that the singular values si in S were derived from s̃i which interlace with the diagonal elements d1 , . . . , dN of D by di ≥ s̃i ≥ dN −k+i , and where Uk0 DUk = S̃k (Equation (82)). I call C a 1/2&interlacing-generic solution if the interlacing is proper, i.e. if di > s̃i > dN −k+i . Assume furthermore that D(C) is constant in a neighborhood of C. In this case, differential changes to Uk in (82) will lead to differential changes in S̃k . If these changes to Uk respect the conditions (i) that Uk remains orthonormal and (ii) that S̃k remains diagonal, the changes to Uk lead to new fixed point solutions. The first constraint (i) allows us to change Uk with (N − 1) + (N − 2) + . . . + (N − k) = kN − k(k + 1)/2 degrees of freedom. The second constraint (ii) reduces this by (k − 1)k/2 degrees of freedom. Altogether we have kN − k(k + 1)/2 − (k − 1)k/2 = k(N − k) differential directions of change of C that lead to new fixed points. This coincides with the dimension of the center manifold associated with C. We can conclude that the center manifold of a 1/2&interlacing-generic C extends exactly in the directions of neighboring fixed point solutions. This picture is based however on the assumption of constant D. If the dependency of D on C is included in the picture, we would not expect to find any other fixed point solutions at all in a small enough neighborhood of C. Generically, fixed point solutions of an ODE are isolated. Therefore, in the light of the considerations made so far, we would expect to find isolated fixed point solutions C, corresponding to close approximations of stored patterns. In a local vicinity of such solutions, the autoconceptor adaptation would presumably progress on two timescales: a fast convergence toward the center manifold K associated with the fixed point C, superimposed on a slow convergence toward C within K (Figure 34 A). The situation becomes particularly interesting when many patterns from a dparametric class have been stored. Taking into account what the stability analysis above has revealed about center manifolds of fixed points C, I propose the following picture as a working hypothesis for the geometry of conceptor adaptation dynamics that arises when a d-parametric pattern class has been stored by overloading: • The storing procedure leads to a number of stable fixed point solutions Ci for the autoconceptor adaptation (blue dots in Figure 34 B). These Ci are associated with patterns from the pattern family, but need not coincide with the sample patterns that were loaded. • The k(N − k)-dimensional center manifolds of the Ci merge into a comprehensive manifold K of the same dimension. In the vicinity of K, the autoadaptive C evolution leads to a convergence toward K. • Within K a d-dimensional submanifold M is embedded, representing the learnt class of patterns. Notice that we would typically expect d << k(N −k) (examples in the previous section had d = 2 or d = 3, but k(N − k) in 101 A B " " ! Figure 34: Hypothetical phase portraits of C autoadaptation in the parameter space of C (schematic). Blue points show stable fixed point solutions C. The gray plane in A represents the center manifold K and in B the merged center manifolds of neighboring fixed point C. Green arrows represent sample trajectories of C adaptation. Green crosses mark the starting points of the adaptation trajectories set by the cueing procedure. A. When a small number of patterns has been loaded, individual stable fixed point conceptors C are created. B. In the case of learning a d-parametric pattern class, fixed point solutions Ci become located within a d-dimensional pattern manifold M (bold magenta line). For explanation see text. the order of several 100). Conceptor matrices located on M correspond to patterns from the learnt class. • The convergence of C adaptation trajectories toward K is superimposed with a slower contractive dynamics within K toward the class submanifold M. • The combined effects of the attraction toward K and furthermore toward M appear in simulations as if M were acting as a plane attractor. • On an even slower timescale, within M there is an attraction toward the isolated fixed point solutions Ci . This timescale is so slow that the motion within M toward the fixed points Ci will be hardly observed in simulations. In order to corroborate this refined picture, and especially to confirm the last point from the list above, I carried out a long-duration content-addressable memory simulation along the lines described in Section 3.14.3. Ten 5-periodic patterns were loaded into a small (50 units) reservoir. These patterns represented ten stages of a linear morph between two similar patterns p1 and p10 , resulting in a morph sequence p1 , p2 , . . . , p10 where pi = (1 − (i − 1)/9) p1 + ((i − 1)/9) p10 , thus representing instances from a 1-parametric family. Considering what was found in Section 3.14.3, loading these ten patterns should enable the system to re-generate 102 by auto-adaptation any linear morph ptest between p1 and p10 after being cued with ptest . Figure 35: Numerical exploration of fixed point solutions under C auto-adaptation. Each panel shows pairwise distances of 20 conceptor matrices obtained after n auto-adaptation steps, after being cued along a 20-step morph sequence of cue signals. Color coding: blue – zero distance; red – maximum distance. For explanation see text. After loading, the system was cued with 20 different cues. In each of these j = 1, . . . , 20 conditions, the cueing pattern pjtest was the j-th linear interpolation between the stored p1 and p10 . The cueing was done for 20 steps, following the procedure given at the beginning of Section 3.14.3. At the end of the cueing, the system will be securely driven into a state z that is very accurately connected to re-generating the pattern pjtest , and the conceptor matrix that has developed by the end of the cueing would enable the system to re-generate a close simile of pjtest (a post-cue log10 NRMSE of about −2.7 was obtained in this simulation). After cueing, the system was left running in conceptor auto-adaptation mode using (68) for 1 Mio timesteps, with an adaptation rate of λ = 0.01. At times n = 1, 1000, 10000, 1e6 the situation of convergence was assessed as follows. The pairwise distances between the current twenty autoconceptors C j (n) were compared, resulting in a 20 × 20 distance matrix D(n) = (kC k (n) − C l (n)kfro )k,l=1,...,20 . Figure 35 shows color plots of these distance matrices. The outcome: at the beginning of autoadaptation (n = 1), the 20 autoconceptors are spaced almost equally widely from each other. In terms of the schematic in Figure 34 B, they would all be almost equi-distantly lined up close to M. Then, as the adaptation time n grows, they contract toward three point attractors within M (which would correspond to a version of 34 B with three blue dots). These three point attractors correspond to the three dark blue squares on the diagonal of the last distance matrix shown in Figure 35. This singular simulation cannot, of course, provide conclusive evidence that the qualitative picture proposed in Figure 34 is correct. A rigorous mathematical characterization of the hypothetical manifold M and its relation to the center manifolds of fixed point solutions of the adaptation dynamics needs to be worked out. Plane attractors have been proposed as models for a number of biological neural 103 adaptation processes (summarized in [24]). A classical example is gaze direction control. The fact that animals can fix their gaze in arbitrary (continuously many) directions has been modelled by plane attractors in the oculomotoric neural control system. Each gaze direction corresponds to a (controlled) constant neural activation profile. In contrast to and beyond such models, conceptor auto-adaptation organized along a manifold M leads not to a continuum of constant neural activity profiles, but explains how a continuum of dynamical patterns connected by continuous morphs can be generated and controlled. In sum, the first steps toward an analysis of autoconceptor adaptation have revealed that this adaptation dynamics is more involved than either the classical fixed-point dynamics in autoassociative memories or the plane attractor models suggested in computational neuroscience. For small numbers of stored patterns, the picture bears some analogies with autoassociative memories in that stable fixed points of the autonomous adaptation correspond to stored patterns. For larger numbers of stored patterns (class learning), the plane attractor metaphor captures essential aspects of phenomena seen in simulations of not too long duration. 3.15 Toward Biologically Plausible Neural Circuits: Random Feature Conceptors The autoconceptive update equations z(n + 1) = C(n) tanh(W z(n) + Dz(n) + b)  C(n + 1) = C(n) + λ (z(n) − C(n)z(n)) z 0 (n) − α−2 C(n) could hardly be realized in biological neural systems. One problem is that the C update needs to evaluate C(n)z(n), but z(n) is not an input to C(n) in the z update but the outcome of applying C. The input to C is instead the state r(n) = tanh(W z(n) + Dz(n) + b). In order to have both computations carried out by the same C, it seems that biologically hardly feasible schemes of installing two weight-sharing copies of C would be required. Another problem is that the update of C is nonlocal: the information needed for updating a “synapse” Cij (that is, an element of C) is not entirely contained in the presynaptic or postsynaptic signals available at this synapse. Here I propose an architecture which solves these problems, and which I think has a natural biological “feel”. The basic idea is to (i) randomly expand the reservoir state r into a (much) higher-dimensional random feature space, (ii) carry out the conceptor operations in that random feature space, but in a simplified version that only uses scalar operations on individual state components, and (iii) project the conceptor-modulated high-dimensional feature space state back to the reservoir by another random projection. The reservoir-conceptor loop is replaced by a two-stage loop, which first leads from the reservoir to the feature space (through connection weight vectors fi , collected column-wise in a random neural projection matrix F ), and then back to the reservoir through a likewise random 104 set of backprojection weights G (Figure 36 A). The reservoir-internal connection weights W are replaced by the combination of F and G, and the original reservoir state x known from the basic matrix conceptor framework is split into a reservoir state vector r and a feature space state vector z with components zi = ci fi0 r. The conception weights ci take over the role of conceptors. In full detail, 1. expand the N -dimensional reservoir state r = tanh(W z + W in p + b) into the M -dimensional random feature space by a random feature map F 0 = (f1 , . . . , fM )0 (a synaptic connection weight matrix of size M × N ) by computing the M -dimensional feature vector F 0 r, 2. multiply each of the M feature projections fi0 r with an adaptive conception weight ci to get a conceptor-weighted feature state z = diag(c) F 0 r, where the conception vector c = (c1 , . . . , cM )0 is made of the conception weights, 3. project z back to the reservoir by a random N × M backprojection matrix G̃, closing the loop. Since both W and G̃ are random, they can be joined in a single random map G = W G̃. This leads to the following consolidated state update cycle of a random feature conception (RFC) architecture: r(n + 1) = tanh(G z(n) + W in p(n) + b), z(n + 1) = diag(c(n)) F 0 r(n + 1), (86) (87) where r(n) ∈ RN and z(n), c(n) ∈ RM . From a biological modeling perspective there exist a number of concrete candidate mechanisms by which the mathematical operation of multiplying-in the conception weights could conceivably be realized. I will discuss these later and for the time being remain on this abstract mathematical level of description. The conception vector c(n) is adapted online and element-wise in a way that is analog to the adaptation of matrix autoconceptors given in Definition 5. Per each element ci of c, the adaptation aims at minimizing the objective function E[(zi − ci zi )2 ] + α−2 c2i , (88) which leads to fixed point solutions satisfying ci = E[zi2 ](E[zi2 ] + α−2 )−1 (89) and a stochastic gradient descent online adaptation rule  ci (n + 1) = ci (n) + λi zi2 (n) − ci (n) zi2 (n) − α−2 ci (n) , (90) where i = 1, . . . , M , λi is an adaptation rate, and zi is the i-the component of z. In computer simulations one will implement this adaptation not element-wise but in an obvious vectorized fashion. 105 fi ! G D p u ! ! A "c i W in r reservoir F' ! z ci fi !i fi " !! feature space B !! " ! !Figure 36: An alternative conceptor architecture aiming at greater biological plau! sibility. A Schematic of random feature space architecture. The reservoir state ! r is projected by a feature map F 0 into a higher-dimensional feature space with states z, from where it is back-projected by G into the reservoir. The conceptor dynamics is realized by unit-wise multiplying conception weights ci into fi0 r to obtain the z state. The input unit u is fed by external input p or by learnt input simulation weights D. B Basic idea (schematic). Black ellipse: reservoir state r correlation matrix R. Magenta dumbbell: scaling sample points fi from the unit sphere by their mean squared projection on reservoir states. Green dumbbell: feature vectors fi scaled by auto-adapted conception weights ci . Red ellipse: the resulting virtual conceptor CF . For detail see text. If (90) converges, the converged fixed point is either ci = 0, which always is a possible and stable solution, or it is of the form p (91) ci = 1/2 + (α2 φi − 4)/4α2 φi , which is another possible stable solution provided that α2 φi − 4 > 0. In this formula, φi denotes the expectation φi = Er [(fi0 r)2 ], the mean energy of the feature signal fi0 r. These possible values of stable solutions can be derived in a similar way as was done for the singular values of autoconceptive matrix C in Section 3.14.4, but the derivation is by far simpler (because it can be done element-wise for each ci and thus entails only scalars, not matrices) and is left as an exercise. Like the singular values of stable autoconceptors C, the possible stable value range for conception weights obtainable through (90) is thus {0} ∪ (1/2, 1). Some geometric properties of random feature conceptors are illustrated in Figure 36 B. The black ellipse represents the state correlation matrix R = E[rr0 ] of a hypothetical 2-dimensional reservoir. The random feature vectors fi are assumed to have unit norm in this schematic and therefore sample from the surface of the unit sphere. The magenta-colored dumbbell-shaped surface represents the weigthing of the random feature vectors fi by the mean energies φi = E[(fi0 r)2 ] of the feature signals fi0 r. Under the autoconception adaptation they give rise to conception weights ci according to (91) (green dumbbell surface). For values α2 φi −4 < 0 one obtains ci = 0, which shows up in the illustration as the wedge-shaped indentation in the green curve. The red ellipse renders the virtual conceptor CF (see 106 below) which results from the random feature conception weights. Two properties of this RFC architecture are worth pointing out. First, conceptor matrices C for an N -dimensional reservoir have N (N + 1)/2 degrees of freedom. If, using conception vectors c instead, one wishes to attain a performance level of pattern reconstruction accuracy that is comparable to what can be achieved with conceptor matrices C, one would expect that M should be in the order of N (N + 1)/2. At any rate, this is an indication that M should be significantly larger than N . In the simulations below I used N = 100, M = 500, which worked robustly well. In contrast, trying M = 100 (not documented), while likewise yielding good accuracies, resulted in systems that were rather sensitive to parameter settings. Second, the individual adaptation rates λi can be chosen much larger than the global adaptation rate λ used for matrix conceptors, without putting stability at risk. The reason is that the original adpatation rate λ in the stochastic gradient descent formula for matrix conceptors given in Definition 5 is constrained by the highest local curvature in the gradient landscape, which leads to slow convergence in the directions of lower curvature. This is a notorious general characteristic of multidimensional gradient descent optimization, see for instance [28]. This problem becomes irrelevant for the individual ci updates in (90). In the simulations presented below, I could safely select the λi as large as 0.5, whereas when I was using the original conceptor matrix autoadaption rules, λ = 0.01 was often the fastest rate possible. If adaptive individual adaptation rates λi would be implemented (not explored), very fast convergence of (90) should become feasible. Geometry of feature-based conceptors. Before I report on simulation experiments, it may be helpful to contrast geometrical properties of the RFC architecture and with the geometry of matrix autoconceptors. For the sake of discussion, I split the backprojection N × M matrix G in (86) into a product G = W F where the “virtual” reservoir weight matrix W := GF † has size N ×N . That is, I consider a system z(n+1) = F diag(c(n)) F 0 tanh(W z(n)) equivalent to (86) and (87), where c is updated according to (90). For the sake of simplicity I omit input terms and bias in this discussion. The map F ◦ diag(c) ◦ F 0 : RN → RN then plugs into the place that the conceptor matrix C held in the conceptor systems z(n + 1) = C tanh(W z(n)) discussed in previous sections. The question I want to explore is how F ◦ diag(c) ◦ F 0 compares to C in geometrical terms. A conceptor matrix C has an SVD C = U SU 0 , where U is orthonormal. In order to make the two systems directly comparable, I assume 0 that all feature vectors fi in F have unit norm. Then CF = kF k−2 2 F ◦ diag(c) ◦ F is positive semidefinite with 2-norm less or equal to 1, in other words it is an N ×N conceptor matrix. Now furthermore assume that the adaptation (90) has converged. The adaptation loop (86, 87, 90 ) is then a stationary process and the expectations φi = Er [(fi0 r)2 ] are well-defined. Note that these expectations can equivalently be writ107 ten as φi = fi0 R fi , where R = E[rr0 ]. According to what I remarked earlier, after convergence to a stable fixed point solution we have, for all 1 ≤ i ≤ M ,  {0}, if α2 φi − 4 ≤ 0, p ci ∈ (92) {0, 1/2 + (α2 φi − 4)/4α2 φi }, if α2 φi − 4 > 0. Again for the sake of discussion I restrict my considerations to converged solutions where all ci that can be nonzero (that is, α2 φi − 4 > 0) are indeed nonzero. It would be desirable to have an analytical result which gives the SVD of the 0 N × N conceptor CF = kF k−2 2 F ◦ diag(c) ◦ F under these assumptions. Unfortunately this analysis appears to be involved and at this point I cannot deliver it. In order to still obtain some insight into the geometry of CF , I computed a number of such matrices numerically and compared them to matrix-based autoconceptors C that were derived from the same assumed stationary reservoir state process. The outcome is displayed in Figure 37. Concretely, these numerical investigations were set up as follows. The reservoir dimension was chosen as N = 2 to admit plotting. The number of features was M = 200. The feature vectors fi were chosen as (cos(i 2 π/M ), sin(i 2 π/M ))0 (where i = 1, . . . , M ), that is, the unit vector (1 0)0 rotated in increments of (i/M ) 2 π. This choice mirrors a situation where a very large number of fi would be randomly sampled; this would likewise result in an essentially uniform coverage of the unit circle. The conception weights ci (and hence CF ) are determined by the reservoir state correlation matrix R = E[rr0 ]. The same holds for autoconceptor matrices C. For an exploration of the CF versus C geometries, I thus systematically varied R = U ΣU 0 . The principal directions U were randomly chosen and remained the same through all variations. The singular values Σ = diag(σ1 σ2 ) were chosen as σ1 ≡ 10, σ2 ∈ {0, 1, 5}, which gave three versions of R. The aperture α was selected in three variants as α ∈ {1, 2, 3}, which altogether resulted in nine (R, α) combinations. For each of these combinations, conception weights ci were computed via (92), from which CF were obtained. Each of these maps the unit circle on an ellipse, plotted in Figure 37 in red. The values of the ci are represented in the figure as the dumbbell-shaped curve (green) connecting the vectors ci fi . The wedge-shaped constriction to zero in some of these curves corresponds to angular values of fi where ci = 0. For comparison, for each of the same (R, α) combinations also an autoconceptor matrix C was computed using the results from Section 3.14.4. We saw on that occasion that nonzero singular values of C are not uniquely determined by R; they are merely constrained by certain interlacing bounds. To break this indeterminacy, I selected those C that had the maximal admissible singular values. According p to (83), this means that the singular values of C were set to si = 1/2 + (α2 σi − 4)/4α2 σi (where i = 1, 2) provided the root argument was positive, else si = 0. Here are the main findings that can be collected from Figure 37: 108 !2 = 0 !2 = 1 aperture = 1 1 !2 = 5 0 !1 aperture = 2 1 0 !1 aperture = 3 1 0 !1 !1 0 1 !1 0 1 !1 0 1 Figure 37: Comparing matrix-based autoconceptors (bold blue ellipses) with feature-based autoconceptors CF (red ellipses). Broken lines mark principal directions of the reservoir state correlation matrix R. Each panel corresponds to a particular combination of aperture and the second singular value σ2 of R. The dumbbell-shaped surfaces (green line) represent the values of the conception weights ci . For explanation see text. 1. The principal directions of CF , C and R coincide. The fact that CF and R have the same orientation can also be shown analytically, but the argument that I have found is (too) involved and not given here. This orientation of CF hinges on the circumstance that the fi were chosen to uniformly sample the unit sphere. 2. The CF ellipses are all non-degenerate, that is, CF has no zero singular values (although many of the ci may be zero as becomes apparent in the wedge constrictions in the dumbbell-shaped representation of these values). In particular, the CF are also non-degenerate in cases where the matrix autoconceptors C are (panels in left column and center top panel). The finding that CF has no zero singular values can be regarded as a disadvantage compared to matrix autoconceptors, because it implies that no signal direction 109 in the N -dimensional reservoir signal space can be completely suppressed by CF . However, in the M -dimensional feature signal space, we do have nulled directions. Since the experiments reported below exhibit good stability properties in pattern reconstruction, it appears that this “purging” of signals in the feature space segment of the complete reservoir-feature loop is effective enough. 3. Call the ratio of the largest over the smallest singular value of CF or C the sharpness of a conceptor (also known as eigenvalue spread in the signal processing literature). Then sometimes CF is sharper than C, and sometimes the reverse is true. If sharpness is considered a desirable feature of concepors (which I think it often is), then there is no universal advantage of C over CF or vice versa. System initialization and loading patterns: generic description. Returning from this inspection of geometrical properties to the system (86) – (90), I proceed to describe the initial network creation and pattern loading procedure in generic terms. Like with the matrix conceptor systems considered earlier in this report, there are two variants which are the analogs of (i) recomputing the reservoir weight matrix W ∗ , as in Section 3.3, as opposed to (ii) training an additional input simulation matrix D, as in Section 3.11. In the basic experiments reported below I found that both work equally well. Here I document the second option. A readout weight vector W out is likewise computed during loading. Let K target patterns pj be given (j = 1, . . . , K), which are to be loaded. Here is an outline: Network creation. A random feature map F , random input weights W in , a random bias vector b, and a random backprojection matrix G∗ are generated. F and G∗ are suitably scaled such that the combined N × N map G∗ F 0 attains a prescribed spectral radius. This spectral radius is a crucial system parameter and plays the same role as the spectral radius in reservoir computing in general (see for instance [108, 112]). All conception weights are initialized to cji = 1, that is, diag(cj ) = IM ×M . Conception weight adaptation. The system is driven with each pattern pj in turn for nadapt steps (discarding an initial washout), while cj is being adapted per z j (n + 1) = diag(cj (n)) F 0 tanh(G∗ z j (n) + W in pj (n) + b),  cji (n + 1) = cji (n) + λi zij (n)2 − cji (n) zij (n)2 − α−2 cji (n) , leading to conception vectors cj at the end of this period. State harvesting for computing D and W out , and for recomputing G. The conception vectors cj obtained from the previous step are kept fixed, and for each pattern pj the input-driven system rj (n) = tanh(G∗ z j (n) + W in pj (n) + 110 b); z j (n + 1) = diag(cj ) F 0 rj (n) is run for nharvest time steps, collecting states rj (n) and z j (n). Computing weights. The N × M input simulation matrix D is computed by solving the regularized linear regression X 2 kW in pj (n) − D̃z j (n − 1)k2 + βD kD̃k2fro (93) D = argminD̃ n,j where βD is a suitably chosen Tychonov regularizer. This means that the autonomous system update z j (n+1) = diag(cj ) F 0 tanh(G∗ z j (n)+W in D z j (n)+ b) should be able to simulate input-driven updates z j (n) = diag(cj ) F 0 tanh(G∗ z j (n) + W in pj (n) + b). W out is similarly computed by solving X 2 2 kpj (n) − W̃ rj (n)k2 + βW W out = argminW̃ out kW̃ k . n,j Optionally one may also recompute G∗ by solving the trivial regularized linear regression X kG∗ z j (n) − G̃z j (n)k2 + βG2 kG̃k2fro . G = argminG̃ n,j for a suitably chosen Tychonov regularizer βG . While G∗ and G should behave virtually identically on the training inputs, the average absolute size of entries in G will be (typically much) smaller than the original weights in G∗ as a result of the regularization. Such regularized auto-adaptations have been found to be beneficial in pattern-generating recurrent neural networks [92], and in the experiments to be reported presently I took advantage of this scheme. The feature vectors fi that make up F can optionally be normalized such that they all have the same norm. In my experiments this was not found to have a noticeable effect. If a stored pattern pj is to be retrieved, the only item that needs to be changed is the conception vector cj . This vector can either be obtained by re-activating that cj which was adapted during the loading (which implies that it needs to be stored in some way). Alternatively, it can be obtained by autoadaptation without being previously stored, as in Sections 3.14.1 – 3.14.4. I now describe two simulation studies which demonstrate how this scheme functions (simulation detail documented in Section 4.9). The first study uses stored conception vectors, the second demonstrates autoconceptive adaptation. 111 Figure 38: Using stored random feature coded conceptors in a replication of the basic pattern retrieval experiment from Section 3.4, with M = 500 random feature vectors fi . First column: sorted conception vectors cj . Second column: spectra of virtual conceptors CF . Third column: reconstructed patterns (bold light gray) and original patterns (thin black) after phase alignment. NRMSEs are given in insets. Last column: The adaptation of cj during the 2000 step runs carried out in parallel to the loading process. 50 of 500 traces are shown. For explanation see text. Example 1: pattern retrieval with stored conception vectors cj . This simulation re-used the N = 100 reservoir from Sections 3.2 ff. and the four driver patterns (two irrational-period sines, two very similar 5-periodic random patterns). The results are displayed in Figure 38. The loading procedure followed the generic scheme described above (details 2 = 0.01 and in Section 4), with nadapt = 2000, nharvest = 400, λi = 0.5, βG2 = βD 2 βW out = 1. The aperture was set to α = 8. The left column in Figure 38 shows the resulting cj spectra, and the right column shows the evolution of cj during this adaptation. Notice that a considerable portion of the conception weights evolved toward zero, and that none ended in the range (0 1/2), in agreement with theory. For additional insight into the dynamics of this system I also computed “virtual” matrix conceptors CFj by Rj = E[(rj )0 rj ], CFj = Rj (Rj + α−2 )−1 (second column). The singular value spectrum of CFj reveals that the autocorrelation spectra of rj signals in RFC systems is almost identical to the singular value spectra obtained with matrix conceptors on earlier occasions (compare Figure 14). The settings of matrix scalings and aperture were quite robust; variations in a range of about ±50% about the chosen values preserved stability and accuracy of pattern recall (detail in Section 4.9). For testing the recall of pattern pj , the loaded system was run using the update 112 routine rj (n) = tanh(G z j (n) + W in D z j (n) + b), y j (n) = W out rj (n), z j (n + 1) = diag(cj ) F 0 rj (n), starting from a random starting state z j (0) which was sampled from the normal distribution, scaled by 1/2. After a washout of 200 steps, the reconstructed pattern y j was recorded for 500 steps and compared to a 20-step segment of the target pattern pj . The second column in Figure 38 shows an overlay of y j with pj and gives the NRMSEs. The reconstruction is of a similar quality as was found in Section 3.4 where full conceptor matrices C were used. Example 2: content-addressed pattern retrieval. For a demonstration of content-addressed recall similar to the studies reported in Section 3.14.3, I reused the M = 500 system described above. Reservoir scaling parameters and the loading procedure were identical except that conception vectors cj were not stored. Results are collected in Figure 39. The cue and recall procedure for a pattern pj was carried out as follows: 1. Starting from a random reservoir state, the loaded reservoir was driven with the cue pattern for a washout time of 200 steps by z j (n+1) = F 0 tanh(G z j (n)+ W in pj (n) + b). 2. Then, for a cue period of 800 steps, the system was updated with cj adaptation by z j (n + 1) = diag(cj (n)) F 0 tanh(G z j (n) + W in pj (n) + b),  cji (n + 1) = cji (n) + λi zij (n)2 − cji (n) zij (n)2 − α−2 cji (n) , (1 ≤ i ≤ M ) starting from an all-ones cj , with an adaptation rate λi = 0.5 for all i. At the end of this period, a conception vector cj,cue was obtained. 3. To measure the quality of cj,cue , a separate run of 500 steps without c adapation was done using rj (n) = tanh(G z j (n) + W in D z j (n) + b), y j (n) = W out rj (n), z j (n + 1) = diag(cj,cue ) F 0 rj (n) obtaining a pattern reconstruction y j (n). This was phase-aligned with the original pattern pj and an NRMSE was computed (Figure 39, third column). 113 4. The recall run was resumed after the cueing period and continued for another 10,000 steps in auto-adaptation mode, using z j (n + 1) = diag(cj (n)) F 0 tanh(G z j (n) + W in D z j (n) + b),  cji (n + 1) = cji (n) + λi zij (n)2 − cji (n) zij (n)2 − α−2 cji (n) , (1 ≤ i ≤ K) leading to a final cj,adapted at the end of this period. 5. Another quality measurement run was done identical to the post-cue measurement run, using cj,adapted (NRMSE results in Figure 39, third column). Figure 39: Content-addressed recall using RFC conceptors with M = 500 feature vectors fi . First column: sorted feature projection weight vectors cj after the cue phase (black) and after 10,000 steps of autoadaptation (gray). Second column: spectra of virtual conceptors CF after cue (black) and at the end of autonomous adaptation (gray). Both spectra are almost identical. Third column: reconstructed patterns (bold light gray: after cue, bold dark gray: after autoadaptation; the latter are mostly covered by the former) and original patterns (thin black). NRMSEs are given in insets (top: after cue, bottom: after autoadaptation). Fourth column: The adaptation of cj during the cueing period. Last column: same, during the 10000 autoadaptation steps. 50 of 500 traces are shown. Note the different timescales in column 4 versus column 5. For explanation see text. Like in the matrix-C-based content-addressing experiments from Section 3.14.3, the recall quality directly after the cue further improved during the autoconceptive adaption afterwards, except for the first pattern. Pending a more detailed investigation, this may be attributed to the “maturation” of the cj during autoadaption which reveals itself in the convergence of a number of cji to zero during autoadaptation (first and last column in Figure 39). We have seen similar effects in Section 3.14.3. 114 An obvious difference to those earlier experiments is that the cueing period is much longer now (800 versus 15 – 30 steps). This is owed to the circumstance that now the conceptor adaptation during cueing started from an all-ones cj , whereas in Section 3.14.3 it was started from a zero C. In the latter case, singular values of C had to grow away from zero toward one during cueing, whereas here they had to sink away from one toward zero. The effects of this mirror situation are not symmetrical. In an “immature” post-cue conceptor matrix C started from a zero C, all the singular values which eventually should converge to zero are already at zero at start time and remain there. Conversely, the post-cue feature projection weights cj,cue , which should eventually become zero, have not come close to this destination even after the 800 cue steps that were allotted here (left panels in Figure 39). This tail of “immature” nonzero elements in cj,cue leads to an insufficient filtering-out of reservoir state components which do not belong to the target pattern dynamics. The development of the cji during the autonomous post-cue adapation is not monotonous (right panels). Some of these weights meander for a while before they settle to what appear stable final values. This is due to the transient nonlinear reservoir–cj interactions which remain to be mathematically analyzed. A potentially important advantage of using random feature conceptors c rather than matrix conceptors C in machine learning applications is the faster convergence of the former in online adaptation scenarios. While an dedicated comparison of convergence properties between c and C conceptors remains to be done, one may naturally expect that stochastic gradient descent works more efficiently for random feature conceptors than for matrix conceptors, because the gradient can be followed individually for each coordinate ci , unencumbered by the second-order curvature interactions which notoriously slow down simple gradient descent in multidimensional systems. This is one of the reasons why in the complex hierarchical signal filtering architecture to be presented below in Section 3.16 I opted for random feature conceptors. Algebraic and logical rules for conception weights. The various definitions and rules for aperture adaptation, Boolean operations, and abstraction introduced previously for matrix conceptors directly carry over to random feature conceptor. The new definitions and rules are simpler than for conceptor matrices because they all apply to the individual, scalar conception weights. I present these items without detailed derivations (easy exercises). In the following, let c = (c1 , . . . , cM )0 , b = (b1 , . . . , bM )0 be two conception weight vectors. Aperture adaptation (compare Definition 3) becomes 115 Definition 6 ϕ(ci , γ) := ci /(ci + γ −2 (1 − ci )) for 0 < γ < ∞,  0 if ci < 1, ϕ(ci , 0) := 1 if ci = 1,  1 if ci > 0, ϕ(ci , ∞) := 0 if ci = 0. Transferring the matrix-based definition of Boolean operations (Definition 4) to conception weight vectors leads to the following laws: Definition 7 ¬ ci := 1 − ci ,  ci bi /(ci + bi − ci bi ) if not ci = bi = 0, ci ∧ bi := 0 if ci = bi = 0,  (ci + bi − 2ci bi )/(1 − ci bi ) if not ci = bi = 1, ci ∨ bi := 1 if ci = bi = 1. The matrix-conceptor properties connecting aperture adaptation with Boolen operations (Proposition 10) and the logic laws (Proposition 11) remain valid after the obvious modifications of notation. We define c ≤ b if for all i = 1, . . . , M it holds that ci ≤ bi . The main elements of Proposition 13 turn into Proposition 16 Let a = (a1 , . . . , aM )0 , b = (b1 , . . . , bM )0 be conception weight vectors. Then the following facts hold. 1. If b ≤ a, then b = a ∧ c, where c is the conception weight vector with entries  0 if bi = 0, ci = −1 −1 −1 (bi − ai + 1) if bi > 0. 2. If a ≤ b, then b = a ∨ c, where c is the conception weight vector with entries  1 if bi = 1, ci = −1 −1 −1 1 − ((1 − bi ) − (1 − ai ) + 1) if bi < 1. 3. If a ∧ c = b, then b ≤ a. 4. If a ∨ c = b, then a ≤ b. Note that all of these definitions and rules can be considered as restrictions of the matrix conceptor items on the special case of diagonal conceptor matrices. The diagonal elements of such diagonal conceptor matrices can be identified with conception weights. 116 Aspects of biological plausibility. “Biological plausibility” is a vague term inviting abuse. Theoretical neuroscientists develop mathematical or computational models of neural systems which range from fine-grained compartment models of single neurons to abstract flowchart models of cognitive processes. Assessing the methodological role of formal models in neuroscience is a complex and sometimes controversial issue [1, 36]. When I speak of biological plausibility in connection with conceptor models, I do not claim to offer a blueprint that can be directly mapped to biological systems. All that I want to achieve in this section is to show that conceptor systems may be conceived which do not have characteristics that are decidedly not biologically feasible. In particular, (all) I wanted is a conceptor system variant which can be implemented without state memorizing or weight copying, and which only needs locally available information for its computational operations. In the remainder of this section I explain how these design goals may be satisfied by RFC conceptor architectures. I will discuss only the adaptation of conception weights and the learning of the input simulation weights D, leaving cueing mechanisms aside. The latter was implemented in the second examples above in an ad-hoc way just to set the stage and would require a separate treatment under the premises of biological plausibility. In my discussion I will continue to use the discrete-time update dynamics that was used throughout this report. Biological systems are not updated according to a globally clocked cycle, so this clearly departs from biology. Yet, even a synchronous-update discrete-time model can offer relevant insight. The critical issues that I want to illuminate – namely, no state/weight copying and locality of computations – are independent of choosing a discrete or continuous time setting. I first consider the adaptation of the input simulation weights D. In situated, life-long learning systems one may assume that at given point in (life-)time, some version of D is already present and active, reflecting the system’s learning history up to that point. In the content-addressable memory example above, at the end of the cueing period there was an abrupt switch from driving the system with external input to an autonomous dynamics using the system’s own input simulation via D. Such binary instantaneous switching can hardly be expected from biological systems. It seems more adequate to consider a gradual blending between the input-driven and the autonomous input simulation mode, as per z j (n + 1) = (94)   j 0 j in j = diag(c (n)) F tanh G z (n) + W τ (n) D z (n) + (1 − τ (n)) p(n) + b , where a mixing between the two modes is mediated by a “slide ruler” parameter τ which may range between 0 and 1 (a blending of this kind will be used in the architecture in Section 3.16). As a side remark, I mention that when one considers comprehensive neural architectures, the question of negotiating between an input-driven and an autonomous processing mode arises quite generically. A point in case are “Bayesian 117 brain” models of pattern recognition and control, which currently receive much attention [33, 15]. In those models, a neural processing layer is driven both from “lower” (input-related) layers and from “higher” layers which autonomously generate predictions. Both influences are merged in the target layer by some neural implementation of Bayes’ rule. Other approaches that I would like to point out in this context are layered restricted Boltzmann machines [47], which likewise can be regarded as a neural implementation of Bayes’ rule; hierarchical neural field models of object recognition [113] which are based on Arathorn’s “map seeking circuit” model of combining bottom-up and top-down inputs to a neural processing layer [35]; and mixture of experts models for motor control (for example [109]) where a “responsibility” signal comparable in its function to the τ parameter negotiates a blending of different control signals. zi from feature space D e from external _ d + !" d' 1 1 u !' p W in to reservoir 1 p' 1 Figure 40: An abstract circuit which would implement the τ negotiation between driving a reservoir with external input p versus with simulated input Dz. Abstract neurons are marked by filled gray circles. Connections that solely copy a neural state forward are marked with “1”. Connections marked −• refer to multiplicative modulation. Connections that are inhibitory by their nature are represented by a. Broken arrows indicate a controlling influence on the weight adaptation of D. For explanation see text. Returning to (94), the mathematical formula could be implemented in an abstract neural circuit as drawn in Figure 40. Explanation of this diagram: gray dots represent abstract firing-rate neurons (biologically realized by individual neurons or collectives). All neurons are linear. Activation of neuron d: simulated input d(n) = Dz(n); of p: external driver p(n). Neuron e maintains the value of the “error” p(n) − d(n). d and p project their activation values to d0 and p0 , whose activations are multiplicatively modulated by the activations of neurons τ and τ 0 . The latter maintain the values of τ and τ 0 = 1 − τ from (94). The activations d0 (n) = τ (n) Dz(n) and p0 (n) = (1 − τ (n)) p(n) are additively combined in u, which finally feeds to the reservoir through W in . For a multiplicative modulation of neuronal activity a number of biological 118 mechanisms have been proposed, for example [94, 13]. The abstract model given here is not committed to a specific such mechanism. Likewise I do not further specify the biological mechanism which balances between τ and τ 0 , maintaining a relationship τ 0 = 1 − τ ; it seems natural to see this as a suitable version of mutual inhibition. An in-depth discussion by which mechanisms and for which purposes τ is administered is beyond the scope of this report. Many scenarios are conceivable. For the specific purpose of content-addressable memory recall, the setting considered in this section, a natural option to regulate τ would be to identify it with the (0-1-normalized and time-averaged) error signal e. In the architecture presented in Section 3.16 below, regulating τ assumes a key role and will be guided by novel principles. The sole point that I want to make is that this abstract architecture (or similar ones) requires only local information for the adaptation/learning of D. Consider a synaptic connection Di from a feature neuron zi to d. The learning objective (93) can be achieved, for instance, by the stochastic gradient descent mechanism  Di (n + 1) = Di (n) + λ (p(n) − Di (n)zi (n)) zi (n) − α−2 Di (n) , (95) where the “error” p(n) − Di (n)zi (n) is available in the activity of the e neuron. The learning rate λ could be fixed, but a more suggestive option would be to scale it by τ 0 (n) = 1 − τ (n), as indicated in the diagram. That is, Di would be adapted with an efficacy proportional to the degree that the system is currently being externally driven. I now turn to the action and the adaptation of the conception weights, stated in mathematical terms in equations (87) and (90). There are a number of possibilities to implement these formulae in a model expressed on the level of abstract firingrate neurons. I inspect three of them. They are sketched in Figure 41. !i Di A !i Di fi B ci !i "i Di fi C !i 1 1 " i fi Figure 41: Three candidate neural implementations of conception weight mechanisms. In each diagram, ϕi is an abstract neuron whose activation is ϕ(n) = zi (n) = ci (n) fi0 r(n). In B and C, ζi has activation fi0 r(n). In C, γi has activation ci . For explanation see text. The simplest model (Figure 41 A) represents the quantity zi (n) = ci (n) fi0 r(n) by the activation of a single neuron ϕi . It receives synaptic input fi0 r(n) through connections fi and feeds to the reservoir (or to an input gating circuit as discussed above) through the single synaptic connection Di . The weighting of fi0 r(n) with 119 the factor ci is effected by some self-regulated modulation of synaptic gain. Taking into account that ci changes on a slower timescale than fi0 r(n), the information needed to adapt the strength ci of this modulation (90) is a moving average of the neuron’s own activation energy zi2 (n) and the current synaptic gain ci (n), which are characteristics of the neuron ϕi itself and thus are trivially locally available. In the next model (Figure 41 B), there is a division of labor between a neuron ϕi which again represents ci (n) fi0 r(n) and a preceding neuron ζi which represents fi0 r(n). The latter feeds into the former through a single synaptic connection weighted by ci . The adaptation of the synaptic strength ci here is based on the (locally time-averaged) squared activity of the postsynaptic neuron ϕi , which again is information locally available at the synaptic link ci . Finally, the most involved circuit offered in Figure 41 C delegates the representation of ci to a separate neuron γi . Like in the second model, a neuron ζi which represents fi0 r(n) feeds to ϕi , this time copying its own activation through a unit connection. The γi neuron multiplicatively modulates ϕi by its activation ci . Like in the D adaptation proposal described in Figure 40, I do not commit to a specific biological mechanism for such a multiplicative modulation. The information needed to adapt the activation ci of neuron γi according to (90) is, besides ci itself, the quantity zi = ci (n) fi0 r(n). The latter is represented in ϕi which is postsynaptic from the perspective of γi and therefore not directly accessible. However, the input fi0 r(n) from neuron ζi is available at γi , from which the quantity zi = ci fi0 r(n) can be inferred by neuron γi . The neuron γi thus needs to instantiate an intricate activation dynamics which combines local temporal averaging of (fi0 r(n))2 with an execution of (90). A potential benefit of this third neural circuit over the preceding two is that a representation of ci by a neural activation can presumably be biologically adapted on a faster timescale than the neuron auto-modulation in system A or the synaptic strength adaptation in B. When I first considered content-addressable memories in this report (Section 3.14.3), an important motivation for doing so was that storing entire conceptor matrices C for later use in retrieval is hardly an option for biological systems. This may be different for conception vectors: it indeed becomes possible to “store” conceptors without having to store network-sized objects. Staying with the notation used in Figure 41: a single neuron γ j might suffice to represent and “store” a conception vector cj associated with a pattern pj . The neuron γ j would project to all ϕi neurons whose states correspond to the signals zi , with synaptic connection weights cji , and effecting a multiplicative modulation of the activation of the ϕi neurons proportional to these connection weights. I am not in a position to judge whether this is really an option in natural brains. For applications in machine learning however, using stored conception vectors cj in conjunction with RFC systems may be a relevant alternative to using stored matrix conceptors, because vectors cj can be stored much more cheaply in computer systems than matrices. A speculative outlook. I allow myself to indulge in a brief speculation of how RFC conceptor systems might come to the surface – literally – in mammalian 120 brains. The idea is to interpret the activations of (groups of) neurons in the neocortical sheet as representing conception factors ci or zi values, in one of the versions shown in Figure 41 or some other concrete realization of RFC conceptors. The “reservoir” part of RFC systems might be found in deeper brain structures. When some patches of the neocortical sheet are activated and others not (revealed for instance through fMRI imaging or electro-sensitive dyes), this may then be interpreted as a specific cj vector being active. In geometrical terms, the surface of the hyperellipsoid of the “virtual” conceptor would be mapped to the neocortical sheet. Since this implies a reduction of dimension from a hypothetical reservoir dimension N to the 2-dimensional cortical surface, a dimension folding as in selforganizing feature maps [58, 79, 34] would be necessary. What a cognitive scientist would call an “activation of a concept” would find its neural expression in such an activation of a dimensionally folded ellipsoid pertaining to a “virtual” conceptor CF in the cortical sheet. An intriguing further step down speculation road is to think about Boolean operations on concepts as being neurally realized through the conceptor operations described in Sections 3.9 – 3.13. All of this is still too vague. Still, some aspects of this picture have already been explored in some detail in other contexts. Specifically, the series of neural models for processing serial cognitive tasks in primate brains developed by Dominey et al. [19, 20] combine a reservoir dynamics located in striatal nuclei with cortical context-providing activation patterns which shares some characteristics with the speculations offered here. 3.16 A Hierarchical Filtering and Classification Architecture A reservoir equipped with some conceptor mechanism does not by itself serve a purpose. If this computational-dynamical principle is to be made useful for practical purposes like prediction, classification, control or others, or if it is to be used in cognitive systems modeling, conceptor-reservoir modules need to be integrated into more comprehensive architectures. These architectures take care of which data are fed to the conceptor modules, where their output is channelled, how apertures are adapted, and everything else that is needed to manage a conceptor module for the overall system purpose. In this section I present a particular architecture for the purpose of combined signal denoising and classification as an example. This (still simple) example introduces a number of features which may be of more general use when conceptor modules are integrated into architectures: Arranging conceptor systems in bidirectional hierarchies: a higher conceptor module is fed from a lower one by the output of the latter (bottom-up data flow), while at the same time the higher module co-determines the conceptors associated with the lower one (top-down “conceptional bias” control). Neural instantiations of individual conceptors: Using random feature con121 ceptors, it becomes possible to economically store and address individual conceptors. Self-regulating balance between perception and action modes: a conceptorreservoir module is made to run in any mixture of two fundamental processing modes, (i) being passively driven by external input and (ii) actively generating an output pattern. The balance between these modes is autonomously steered by a criterion that arises naturally in hierarchical conceptor systems. A personal remark: the first and last of these three items constituted the original research questions which ultimately guided me to conceptors. The task. The input to the system is a timeseries made of alternating sections of the four patterns p1 , . . . , p4 used variously before in this report: two sines of irrational period lengths, and two slightly differing 5-periodic patterns. This signal is corrupted by strong Gaussian i.i.d. noise (signal-to-noise ratio = 0.5) – see bottom panels in Fig. 43. The task is to classify which of the four patterns is currently active in the input stream, and generate a clean version of it. This task is a simple instance of the generic task “classify and clean a signal that intermittently comes from different, but familiar, sources”. c1, c2, c3, c4 (&.)2'1".%&#"1'' ,)**"!.' y[3] u[3] ![23] y[2] 3%!"'1".%&#"1'' ,)**"!.' u[2] ![12] y[1] &.&*&)22/'1".%&#"1'' ,)**"!.' u[1] r[3] Win Wout F' 0%1+2"' Dz[3] G D ![23] '''![3]' c[2] F' Win 0%1+2"' Dz[2] G D y[1] z[3] Wout c[2]aut r[2] y[2] c[3] r[1] Win z[2] Wout c aut [1] ![12] '''![2]' c[1] F' 0%1+2"' p G .%&#/'&.,+*' !"#"!$%&!' z[1] ''''![1]' (")*+!"'#,)-"' Figure 42: Schematic of 3-layer architecture for signal filtering and classification. For explanation see text. 122 Architecture. The basic idea is to stack copies of a reservoir-conceptor loop, giving a hierarchy of such modules (compare Figure 42). Here I present an example with three layers, having essentially identical modules M[1] on the lowest, M[2] on the middle, and M[3] on the highest layer (I use subscript square brackets [l] to denote levels in the hierarchy). Each module is a reservoir-conceptor loop. The conceptor is implemented here through the M -dimensional feature space expansion described in the previous section, where a high-dimensional conception weight vector c is multiplied into the feature state (as in Figure 36). At exploitation time the state update equations are u[l] (n + 1) r[l] (n + 1) z[l] (n + 1) y[l] (n + 1) = = = = (1 − τ[l−1,l] (n)) y[l−1] (n + 1) + τ[l−1,l] (n) D z[l] (n), tanh(G z[l] (n) + W in u[l] (n + 1) + b), c[l] (n) .∗ F 0 r[l] (n + 1), W out r[l] (n + 1), where u[l] is the effective signal input to module M[l] , y[l] is the output signal from that module, and the τ are mixing parameters which play a crucial role here and will be detailed later. In addition to these fast timescale state updates there are several online adaptation processes, to be described later, which adapt τ ’s and c’s on slower timescales. The weight matrices D, G, F, W in , W out are identical in all modules. F, W in are created randomly at design time and remain unchanged. D and W out are trained on samples of clean “prototype” patterns in an initial pattern loading procedure. G is first created randomly as G∗ and then is regularized using white noise (all detail in Section 4.10). The effective input signal u[l] (n + 1) to M[l] is thus a mixture mediated by a “trust” variable τ[l−1,l] of a module-external external input y[l−1] (n + 1) and a module-internal input simulation signal D z[l] (n). On the bottom layer, τ[01] ≡ 0 and y[0] (n) = p(n), that is, this layer has no self-feedback input simulation and is entirely driven by the external input signal p(n). Higher modules receive the output y[l−1] (n + 1) of the respective lower module as their external input. Both input mix components y[l−1] and D z[l] represent partially denoised versions of the external pattern input. The component y[l−1] from the module below will typically be noisier than the component Dz[l] that is cycled back within the module, because each module is supposed to de-noise the signal further in its internal reservoirconceptor feedback loop. If τ[l−1,l] were to be 1, the module would be running in an autonomous pattern generation mode and would be expected to re-generate a very clean version of a stored pattern – which might however be a wrong one. If τ[l−1,l] were to be 0, the module would be running in an entirely externally driven mode, with no “cleaning” in effect. It is crucial for the success of this system that these mixing weights τ[l−1,l] are appropriately set. They reflect a “trust” of the system in its current hypothesis about the type of the driving pattern p, hence I call them trust variables. I mention at this point that when the external input p changes from one pattern type to another, the trust variables must quickly decrease 123 in order to temporarily admit the architecture to be in an altogether more inputdriven, and less self-generating, mode. All in all this constitutes a bottom-up flow of information, whereby the raw input p is cleaned stage-wise with an amount of cleaning determined by the current trust of the system that it is applying the right conceptor to effect the cleaning. The output signals y[l] of the three modules are computed from the reservoir states r[l] by output weights W out , which are the same on all layers. These output weights are initially trained in the standard supervised way of reservoir computing to recover the input signal given to the reservoir from the reservoir state. The 3-rd layer output y[3] also is the ultimate output of the entire architecture and should give a largely denoised version of the external driver p. Besides this bottom-up flow of information there is a top-down flow of information. This top-down pathway affects the conception weight vectors c[l] which are applied in each module. The guiding idea here is that on the highest layer (l = 3 in our example), the conceptor c[3] is of the form _ c[3] (n) = ϕ(cj , γ j (n)), (96) j=1,...,4 where c1 , . . . , c4 are prototype conception weight vectors corresponding to the four training patterns. These prototype vectors are computed and stored at training time. In words, at the highest layer the conception weight vector is constrained to be a disjunction of aperture-adapted versions of the prototype conception weight vectors. Imposing this constraint on the highest layer can be regarded as inserting a qualitative bias in the ensuing classification and denoising process. Adapting c[3] (n) amounts to adjusting the aperture adaptation factors γ j (n). At any time during processing external input, the current composition of c[3] as j a γ -weighted disjunction of the four prototypes reflects the system’s current hypothesis about the type of the current external input. This hypothesis is stagewise passed downwards through the lower layers, again mediated by the trust variables. This top-down pathway is realized as follows. Assume that c[3] (n) has been computed. In each of the two modules below (l = 1, 2), an (auto-)conception weight vector caut [l] (n) is computed by a module-internal execution of the standard autoconception adaptation described in the previous section (Equation (90)). To arrive at the effective conception weight vector c[l] (n), this caut [l] (n) is then blended with the current conception weight vector c[l+1] (n) from the next higher layer, again using the respective trust variable as mixing coefficient: c[l] (n) = (1 − τ[l,l+1] (n)) caut [l] (n) + τ[l,l+1] (n) c[l+1] (n). (97) In the demo task reported here, the raw input p comes from either of four sources p1 , . . . , p4 (the familiar two sines and 5-periodic patterns), with additive noise. These four patterns are initially stored in each of the modules M[l] by training input simulation weights D, as described in Section 3.15. The same D is used in all layers. 124 In the exploitation phase (after patterns have been loaded into D, output weights have been learnt, and prototype conceptors cj have been learnt), the architecture is driven with a long input sequence composed of intermittent periods where the current input is chosen from the patterns pj in turn. While being driven with pj , the system must autonomously determine which of the four stored pattern is currently driving it, assign trusts to this judgement, and accordingly tune the degree of how strongly the overall processing mode is autonomously generative (high degree of cleaning, high danger of “hallucinating”) vs. passively input-driven (weak cleaning, reliable coupling to external driver). Summing up, the overall functioning of the trained architecture is governed by two pathways of information flow, • a bottom-up pathway where the external noisy input p is successively denoised, • a top-down pathway where hypotheses about the current pattern type, expressed in terms of conception weight vectors, are passed downwards, and by two online adaptation processes, • adjusting the trust variables τ[l−1,l] , and • adjusting the conception weight vector c[l] in the top module. I now describe the two adaptation processes in more detail. Adapting the trust variables. Before I enter technicalities I want to emphasize that here we are confronted with a fundamental problem of information processing in situated intelligent agents (“SIA”: animals, humans, robots). A SIA continuously has to “make sense” of incoming sensor data, by matching them to the agent’s learnt/stored concepts. This is a multi-faceted task, which appears in many different instantiations which likely require specialized processing strategies. Examples include online speech understanding, navigation, or visual scene interpretation. For the sake of this discussion I will lump them all together and call them “online data interpretation” (ODI) tasks. ODI tasks variously will involve subtasks like de-noising, figure-ground separation, temporal segmentation, attention control, or novelty detection. The demo architecture described in this section only addresses de-noising and temporal segmentation. In many cognitive architectures in the literature, ODI tasks are addressed by maintaining an online representation of a “current best” interpretation of the input data. This representation is generated in “higher” levels of a processing hierarchy and is used in a top-down fashion to assist lower levels, for instance by way of providing statistical bias or predictions (discussion in [15]). This top-down information then tunes the processing in lower levels in some way that enables them to extract from their respective bottom-up input specific features while suppressing others – generally speaking, by making them selective. An inherent problem in such architectures is that the agent must not grow overly confident in its top-down pre-conditioning 125 of lower processing layers. In the extreme case of relying entirely on the current interpretation of data (instead of on the input data themselves), the SIA will be hallucinating. Conversely, the SIA will perform poorly when it relies entirely on the input data: then it will not “understand” much of it, becoming unfocussed and overwhelmed by noise. A good example is semantic speech or text understanding. Linguistic research has suggested that fast forward inferences are involved which predispose the SIA to interpret next input in terms of a current representation of semantic context (for instance, [98]). As long as this current interpretation is appropriate, it enables fast semantic processing of new input; but when it is inappropriate, it sends the SIA on erroneous tracks which linguists call “garden paths”. Generally speaking, for robust ODI an agent should maintain a reliable measure of the degree of trust that the SIA has in its current high-level interpretation. When the trust level is high, the SIA will heavily tune lower levels by higher-level interpretations (top-down dominance), while when trust levels are low, it should operate in a bottom-up dominated mode. Maintaining an adaptive measure of trust is thus a crucial objective for an SIA. In Bayesian architectures (including Kalman filter observers in control engineering), such a measure of trust is directly provided by the posterior probability p(interpretation | data). A drawback here is that a number of potentially complex probability distributions have to be learnt beforehand and may need extensive training data, especially when prior hyperdistributions have to be learnt instead of being donated by an oracle. In mixture of predictive expert models (for instance [109]), competing interpretation models are evaluated online in parallel and are assigned relative trust levels according to how precisely they can predict the current input. A problem that I see here is computational cost, besides the biological implausibility of executing numerous predictors in parallel. In adaptive resonance theory [43], the role of a trust measure is filled by the ratio between the norm of a top-down pattern interpretation over the norm of an input pattern; the functional effects of this ratio for further processing depends on whether that ratio is less or greater than a certain “vigilance” parameter. Adaptive resonance theory however is primarily a static pattern processing architecture not designed for online processing of temporal data. Returning to our demo architecture, here is how trust variables are computed. They are based on auxiliary quantities δ[l] (n) which are computed within each module l. Intuitively, δ[l] (n) measures the (temporally smoothed) discrepancy between the external input signal fed to the module and the self-generated, conceptorcleaned version of it. For layers l > 1 the external input signal is the bottom-up passed output y[l−1] of the lower layer. The conceptor-cleaned, module-generated version is the signal Dz[l] (n) extracted from the conception-weighted feature space signal z[l] (n) = c[l] (n) .∗ F 0 r[l] (n) by the input simulation weights D, where r[l] (n) is the reservoir state in layer l. Applying exponential smoothing with smoothing rate σ < 1, and normalizing by the likewise smoothed variance of y[l−1] , gives 126 update equations ȳ[l−1] (n + 1) = σ ȳ[l−1] (n) + (1 − σ) y[l−1] (n + 1), (running average) (98) var y[l−1] (n + 1) = σ var y[l−1] (n + 1) + (1 − σ) (y[l−1] (n + 1) − ȳ[l−1] (n + 1))2 , (99) (y[l−1] (n + 1) − Dz[l] (n + 1))2 δ[l] (n + 1) = σ δ[l] (n) + (1 − σ) (100) var y[l−1] (n + 1) for the module-internal detected discrepancies δ[l] . In the bottom module M[1] , the same procedure is applied to obtain δ[1] except that the module input is here the external driver p(n) instead the output y[l−1] (n) from the level below. From these three discrepancy signals δ[l] (n) two trust variables τ[12] , τ[23] are derived. The intended semantics of τ[l,l+1] can be stated as “measuring the degree by which the discrepancy is reduced when going upwards from level l to level l+1”. The rationale behind this is that when the currently active conception weights in modules l and l + 1 are appropriate for the current drive entering module l from below (or from the outside when l = 1), the discrepancy should decrease when going from level l to level l+1, while if the the currently applied conception weights are the wrong ones, the discrepancy should increase when going upwards. The core of measuring trust is thus the difference δ[l] (n) − δ[l+1] (n), or rather (since we want the same sensitivity across all levels of absolute values of δ) the difference log(δ[l] (n)) − log(δ[l+1] (n)). Normalizing this to a range of (0, 1) by applying a logistic sigmoid with steepness d[l,l+1] finally gives  τ[l,l+1] (n) = 1+ δ[l+1] (n) δ[l] (n) d[l,l+1] !−1 . (101) The steepness d[l,l+1] of the trust sigmoid is an important design parameter, which currently I set manually. Stated in intuitive terms it determines how “decisively” the system follows its own trust judgement. It could be rightfully called a “metatrust” variable, and should itself be adaptive. Large values of this decisiveness leads the system to make fast decisions regarding the type of the current driving input, at an increased risk of settling down prematurely on a wrong decision. Low values of d[l,l+1] allow the system to take more time for making a decision, consolidating information acquired over longer periods of possibly very noisy and only weakly pattern-characteristic input. My current view on the regulation of decisiveness is that it cannot be regulated on the sole basis of the information contained in input data, but reflects higher cognitive capacities (connected to mental attitudes like “doubt”, “confidence”, or even “stubbornness”...) which are intrinsically not entirely data-dependent. Adapting the top-level conception weight vectors c[l] . For clarity of notation I will omit the level index [l] in what follows, assuming throughout l = 3. By equation (96), the effective conception weight vector used in the top module will 127 W be constrained to be a disjunction c(n) = j=1,...,4 ϕ(cj , γ j (n)), where the cj are prototype conception weight vectors, computed at training time. Adapting c(n) amounts to adjusting the apertures of the disjunctive components cj via γ j (n). This is done indirectly. The training of the prototype conception weights (and of the input simulation matrix D and of the readout weights W out ) is done with a single module that is driven by the clean patterns pj . Details of the training procedure are given in the Experiments and Methods Section 4.10. The prototype conception weight vectors can be written as cj = E[(z j ).∧2 ] .∗ (E[(z j ).∧2 ] + α−2 ).∧−1 , where z j (n) = cj .∗ F 0 rj (n) is the M -dimensional signal fed back from the feature space to the reservoir while the module is being driven with pattern j during training, and the aperture α is a design parameter. Technically, we do not actually store the cj but their constituents α and the corresponding mean signal energy vectors E[(z j ).∧2 ], the latter of which are collected in an M × 4 prototype matrix P = (E[(zij )2 ])i=1,...,M ; j=1,...,4 . (102) I return to the conceptor adaptation dynamics in the top module at exploitation time. Using results from previous sections, equation (96) can be re-written as !.∧−1 ! c(n) = X (γ j (n)).∧2 .∗ E[(z j ).∧2 ] .∗ X (γ j (n)).∧2 .∗ E[(z j ).∧2 ] + α−2 j , j (103) where the +α operation is applied component-wise to its argument vector. The strategy for adapting the factors γ j (n) is to minimize the loss function X L{γ 1 , . . . , γ 4 } = k (γ j ).∧2 E[(z j ).∧2 ] − E[z .∧2 ]k2 , (104) −2 j where z is the feature space output signal z(n) = c(n) .∗ F 0 r(n) available during exploitation time in the top module. In words, the adaptation of c aims at finding a weighted disjunction of prototype vectors which optimally matches the currently observed mean energies of the z signal. It is straightforward to derive a stochastic gradient descent adaptation rule for minimizing the loss (104). Let γ = (γ 1 , . . . , γ 4 ) be the row vector made from the γ j , and let ·.2 denote element-wise squaring of a vector. Then 0 γ(n + 1) = γ(n) + λγ z(n + 1).∧2 − P (γ 0 (n)).∧2 P diag(γ(n)) (105) implements the stochastic gradient of L with respect to γ, where λγ is an adaptation rate. In fact I do not use this formula as is, but add two helper mechanisms, 128 effectively carrying out γ ∗ (n + 1) = γ(n) +   0 λγ z(n + 1).∧2 − P (γ 0 (n)).∧2 P diag(γ(n)) + d (1/2 − γ(n)) (106) γ(n + 1) = γ ∗ (n + 1)/sum(γ ∗ (n + 1)). (107) The addition of the term d (1/2−γ(n)) pulls the γ j away from the possible extremes 0 and 1 toward 1/2 with a drift force d, which is a design parameter. This is helpful to escape from extreme values (notice that if γ j (n) = 0, then γ j would forever remain trapped at that value in the absence of the drift force). The normalization (107) to a unit sum of the γ j greatly reduces adaptation jitter. I found both amendments crucial for a reliable performance of the γ adaptation. Given the γ(n) vector, the top-module c(n) is obtained by  .∧−1 c(n) = P (γ 0 (n)).∧2 .∗ P (γ 0 (n)).∧2 + α−2 . Simulation Experiment 1: Online Classification and De-Noising. Please consult Figure 43 for a graphical display of this experiment. Details (training, initalization, parameter settings) are provided in the Experiments and Methods section 4.10. The trained 3-layer architecture was driven with a 16,000 step input signal composed of four blocks of 4000 steps each. In these blocks, the input was generated from the patterns p1 , p3 , p2 , p4 in turn (black lines in bottom row of Figure 43), with additive Gaussian noise scaled such that a signal-to-noise ratio of 1/2 was obtained (red lines in bottom row of Figure 43). The 3-layer architecture was run for the 16,000 steps without external intervention. The evolution of the four γ j weights in the top layer represent the system’s classification hypotheses concerning the type of the current driver (top row in Figure 43). In all four blocks, the correct decision is reached after an initial “rethinking” episode. The trust variable τ[23] quickly approaches 1 after taking a drop at the block beginnings (green line in fourth row of Figure). This drop allows the system to partially pass through the external driver signal up to the top module, de-stabilizing the hypothesis established in the preceding block. The trust variable τ[12] (blue line in fourth row) oscillates more irregularly but also takes its steepest drops at the block beginnings. j For diagnostic purposes, γ[l] weights were also computed on the lower layers l = 2, 3, using (106) and (107). These quantities, which were not entering the system’s processing, are indicators of the “classification belief states” in lower modules (second and third row in the Figure). A stagewise consolidation of these hypotheses can be observed as one passes upwards through the layers. The four patterns fall in two natural classes, “sinewaves” and “period-5”. Inspecting the top-layer γ j it can be seen that within each block, the two hypothesis indicators associated with the “wrong” class are quickly suppressed to almost zero, 129 1 0.5 0 1 0.5 0 1 0.5 0 1 0.5 0 0 !1 !2 0 4000 8000 12000 16000 2 1 0 !1 !2 0 10 20 0 10 20 0 10 20 0 10 20 Figure 43: Denoising and classification of prototype patterns. Noisy patterns were given as input in the order p1 , p3 , p2 , p4 for 4000 timesteps each. Top row: evolution of γ 1 (blue), γ 2 (green), γ 3 (red), γ 4 (cyan) in top layer module. Rows 2 and 3: same in modules 2 and 1. Fourth row: trust variables τ[12] (blue) and τ[23] (green). Fifth row: NRMSEs for reconstructed signals y[1] (blue), y[2] (green) and y[3] (red). Black line shows the linear filter reference NRMSE. Thin red line: NRMSE of phase-aligned y[3] . The plotting scale is logarithmic base 10. Bottom: pattern reconstruction snapshots from the last 20 timesteps in each pattern presentation block, showing the noisy input (red), the layer-3 output y[3] (thick gray) and the clean signal (thin black). For explanation see text. 130 while the two indicators of the current driver’s class quickly dominate the picture (summing to close to 1) but take a while to level out to their relative final values. Since the top-level c(n) is formally a γ j -weighted disjunction of the four prototype cj conception vectors, what happens in the first block (for instance) can also be rephrased as, “after the initial re-thinking, the system is confident that the current driver is p1 OR p3 , while it is quite sure that it is NOT (p2 OR p4 )”. Another way to look at the same phenomena is to say, “it is easy for the system to quickly decide between the two classes, but it takes more time to distinguish the rather similar patterns within each class”. The fifth row in Figure 43 shows the log10 NRMSE (running smoothed average) of the three module outputs y[l] (n) with respect to a clean version of the driver (thick lines; blue = y[1] , green = y[2] , red = y[3] ). For the 5-periodic patterns (blocks 2 and 4) there is a large increase in accuracy from y[1] to y[2] to y[3] . For the sinewave patterns this is not the case, especially not in the first block. The reason is that the re-generated sines y[2] and y[3] are not perfectly phase-aligned to the clean version of the driver. This has to be expected because such relative phase shifts are typical for coupled oscillator systems; each module can be regarded as an oscillator. After optimal phase-alignment (details in the Experiments and Methods section), the top-level sine re-generation matches the clean driver very accurately (thin red line). The 5-periodic signal behaves differently in this respect. Mathematically, an 5-periodic discrete-time dynamical system attractor is not an oscillation but a fixed point of the 5-fold iterated map, not admitting anything like a gradual phase shift. As a baseline reference, I also trained a linear transversal filter (Wiener filter, see [28] for a textbook treatment) on the task of predicting the next clean input value (details in the Experiments and Methods section). The length of this filter was 2600, matching the number of trained parameters in the conceptor architecture (P has 500 ∗ 4 learnt parameters, D has 500, W out has 100). The smoothed log10 NRMSE of this linear predictor is plotted as a black line. It naturally can reach its best prediction levels only after 2600 steps in each block, much more slowly than the conceptor architecture. Furthermore, the ultimate accuracy is inferior for all four patterns. Simulation Experiment 2: Tracking Signal Morphs. Our architecture can be characterized as a signal cleaning-and-interpretation systems which guides itselft by allowing top-down hypotheses to make lower processing layers selective. An inherent problem in such systems is that that they may erroneously lock themselves on false hypotheses. Top-down hypotheses are self-reinforcing to a certain degree because they cause lower layers to filter out data components that do not agree with the hypothesis – which is the essence of de-noising after all. In order to test how our architecture fares with respect to this “self-locking fallacy”, I re-ran the simulation with an input sequence that was organized as a linear morph from p1 to p2 in the first 4000 steps (linearly ramping up the sine frequency), then in the next block back to p1 ; this was followed by a morph from 131 p3 to p4 and back again. The task now is to keep track of the morph mixture in the top-level γ j . This is a greatly more difficult task than the previous one because the system does not have to just decide between 4 patterns, but has to keep track of minute changes in relative mixtures. The signal-to-noise ratio of the external input was kept at 0.5. The outcome reveals an interesting qualitative difference in how the system copes with the sine morph as opposed to the 5-periodic morph. As can be seen in Figure 44, the highest-layer hypothesis indicators γ j can track the frequency morph of the sines (albeit with a lag), but get caught in a constant hypothesis for the 5-period morph. This once again illustrates that irrational-period sines are treated qualitatively differently from integer-periodic signals in conceptor systems. I cannot offer a mathematical analysis, only an intuition. In the sinewave tracking, the overall architecture can be described as a chain of three coupled oscillators, where the bottom oscillator is externally driven by a frequency-ramping sine. In such a driven chain of coupled oscillators, one can expect either chaos, the occurrence of natural harmonics, or frequency-locking across the elements of the chain. Chaos and harmonics are ruled out in our architecture because the prototype conceptors and the loading of two related basic sines prevent it. Only frequency-locking remains as an option, which is indeed what we find. The 5-periodic morph cannot benefit from this oscillation entrainment. The minute differences in shape between the two involved prototypes do not stand out strongly enough from the noise background to induce a noticable decline in the trust variable τ[23] : once established, a single hypothesis persists. On a side note it is interesting to notice that the linear filter that was used as a baseline cannot at all cope with the frequency sweep, but for the 5-periodic morph it performs as well as in the previous simulation. Both effects can easily be deduced from the nature of such filters. Only when I used a much cleaner input signal (signal-to-noise ratio of 10), and after the decisiveness d was reduced to 0.5, it became possible for the system to also track the 5-period pattern morph, albeit less precisely than it could track the sines (not shown). Variants and Extensions. When I first experimented with architectures of the kind proposed above, I computed the module-internal conception weight vectors caut [l] (compare Equation (97)) on the two lower levels not via the autoconception mechanism, but in a way that was similar to how I computed the top-level conception weight vector c[3] , that is, optimizing a fit to a disjunction of the four prototypes. Abstractly speaking, this meant that a powerful piece of prior information, namely of knowing that the driver was one of the four prototypes, was inserted in all processing layers. This led to a better system performance than what I reported above (especially, faster decisions in the sense of faster convergence of the γ[3] ). However I subsequently renounced this “trick” because the differences in performance were only slight, and from a cognitive modelling perspective I found it more appealing to insert such a valuable prior only in the top 132 1 0.5 0 1 0.5 0 1 0.5 0 1 0.5 0 0 !1 !2 0 4000 8000 12000 16000 2 1 0 !1 !2 0 10 20 0 10 20 0 10 20 0 10 20 Figure 44: Morph-tracking. First 4000 steps: morphing from p1 to p2 , back again in next 4000 steps; steps 8000 – 16,000: morphing from p3 to p4 and back again. Figure layout same as in Figure 43. layer (motto: the retina does not conceptually understand what it sees). Inspecting again the top row in Figure 43, one finds fast initial decision between the alternatives “pattern 1 or 2” versus “pattern 3 or 4”, followed by a much slower differentation within these two classes. This suggests architecture variants where all layers are informed by priors of the kind as in Equation (96), that is, the local conceptor on a layer is constrained to an aperture-weighted disjunction of a finite number of prototype conceptors. However, the number of prototype conceptors would shrink as one goes upwards in the hierarchy. The reduction in number would be effected by merging several distinct prototype conception vectors cj1 , . . . , cjk in W layer l into a single prototype vector cj = {cj1 , . . . , cjk }. In terms of classical AI knowledge representation formalisms this would mean to implement an abstraction 133 hierarchy. A further refinement that suggests itself would be to install a top-down processing pathway by which the current hypothesis on layer l + 1 selects which finer-grained disjunction on layer l is chosen. For instance, when W ofj1prototypes jk j j c[l+1] (n) = c and c = {c , . . . , c }, then the conception weight vector c[l] (n) is W ji constrained to be of the form i=1,...,k ϕ(cji , γ[l] (n)). This remains for future work. The architecture presented above is replete with ad-hoc design decisions. Numerous details could have been realized differently. There is no unified theory which could inform a system designer what are the “right” design decisions. A complete SIA architecture must provide a plethora of dynamical mechanisms for learning, adaptation, stabilization, control, attention and so forth, and each of them in multiple versions tailored to different subtasks and temporal scales. I do not see even a theoretical possibility for an overarching, principled theory which could afford us with rigorous design principles for all of these. The hierarchical conceptor architecture presented here is far from realizing a complete SIA system, but repercussions of that under-constrainedness of design already show. Discussion. Hierarchical neural learning architectures for pattern recognition have been proposed in many variants (examples: [66, 38, 33, 47, 35, 113]), albeit almost always for static patterns. The only example of hierarchical neural architectures for temporal pattern recognition that I am aware of are the localistconnectionistic SHRUTI networks for text understanding [98]. Inherently temporal hierarchical pattern classification is however realized in standard hiddenMarkov-model (HMM) based models for speech recognition. There is one common characteristic across all of these hierarchical recognition systems (neural or otherwise, static or temporal). This shared trait is that when one goes upward through the processing layers, increasingly “global” or “coarsegrained” or “compound” features are extracted (for instance, local edge detection in early visual processing leading through several stages to object recognition in the highest layer). While the concrete nature of this layer-wise integration of information differs between approaches, at any rate there is change of represented categories across layers. For the sake of discussion, let me refer to this as the feature integration principle. From the point of view of logic-based knowldege representation, another important trait is shared by hierarchical pattern recognition systems: abstraction. The desired highest-level output is a class labelling of the input data. The recognition architecture has to be able to generalize from the particular input instance. This abstraction function is not explicitly implemented in the layers of standard neural (or HMM) recognizers. In rule-based decision-tree classification systems (textbook: [76]), which can also be regarded as hierarchical recognition systems, the hierarchical levels however directly implement a series of class abstractions. I will refer to the abstraction aspect of pattern recognition as the categorical abstraction principle. The conceptor-based architecture presented in this section implements categorical abstraction through the γ variables in the highest layer. They yield (graded) 134 class judgements similar to what is delivered by the class indicator variables in the top layers of typical neural pattern recognizers. The conceptor-based architecture is different from the typical neural recognition systems in that it does not implement the feature integration principle. As one progresses upwards through the layers, always the same dynamic item is represented, namely, the current periodic pattern, albeit in increasingly denoised versions. I will call this the pattern integrity principle. The pattern integrity principle is inherently conflicting with the feature integration principle. By decades of theoretical research and successful pattern recognition applications, we have become accustomed to the feature integration principle. I want to argue that the pattern integrity principle has some cognitive plausibility and should be considered when one designs SIA architectures. Consider the example of listening to a familiar piece of music from a CD player in a noisy party environment. The listener is capable of two things. Firstly, s/he can classify the piece of music, for instance by naming the title or the band. This corresponds to performing categorical abstraction, and this is what standard pattern recognition architectures would aim for. But secondly, the listener can also overtly sing (or whistle or hum) along with the melody, or s/he can mentally entrain to the melody. This overt or covert accompaniment has strong de-noising characteristics – party talk fragments are filtered out in the “mental tracing” of the melody. Furthermore, the mental trace is temporally entrained to the source signal, and captures much temporal and dynamical detail (single-note-level of accuracy, stressed versus unstressed beats, etc). That is an indication of pattern integrity. Another example of pattern integrity: viewing the face of a conversation partner during a person-to-person meeting, say Anne meeting Tom. Throughout the conversation, Anne knows that the visual impression of Tom’s face is indeed Tom’s face: categorical abstraction is happening. But also, just like a listener to noiseoverlaid music can trace online the clean melody, Anne maintains a “clean video” representation of Tom’s face as it undergoes a succession of facial expressions and head motions. Anne experiences more of Tom’s face than just the top-level abstraction that it is Tom’s; and this online experience is entrained to Anne’s visual input stream. Pattern integrity could be said to be realized in standard hierarchical neural architectures to the extent that they are generative. Generative models afford of mechanisms by which example instances of a recognition class can be actively produced by the system. Prime examples are the architectures of adaptive resonance theory [43], the Boltzmann Machine [2] and the Restricted Boltzmann Machine / Deep Belief Networks [47]. In systems of this type, the reconstruction of pattern instances occurs (only) in the input layer, which can be made to “confabulate” or “hallucinate” (both terms are used as technical terms in the concerned literature) pattern instances when primed with the right bias from higher layers. Projecting such architectures to the human brain (a daring enterprise) and 135 returning to the two examples above, this would correspond to re-generating melodies in the early auditory cortex or facial expressions in the early visual cortex (or even in the retina). But I do not find this a convincing model of what happens in a human brain. Certainly I am not a neuroscientist and not qualified to make scientific claims here. My doubts rest on introspection (forbidden! I know) and on a computational argument. Introspection: when I am mentally humming along with a melody at a party, I still do hear the partytalk – I dare say my early auditory modules keep on being excited by the entire auditory input signal. I don’t feel like I was hallucinating a clean version of the piece of music, making up an auditory reality that consists only of clean music. But I do not listen to the talk noise, I listen only to the music components of the auditory signal. The reconstruction of a clean version of the music happens – as far as I can trust my introspection – “higher up” in my brain’s hierarchy, closer to the quarters where consciously controllable cognition resides. The computational argument: generative models, such as the ones mentioned, cannot (in their current versions at least) generate clean versions of noisy input patterns while the input is presented. They either produce a high-level classification response while being exposed to input (bottomup processing mode), or they generate patterns in their lowest layer while being primed to a particular class in their highest layer (top-down mode). They can’t do both at the same time. But humans can: while being exposed to input, a cleaned-up version of the input is being maintained. Furthermore, humans (and the conceptor architecture) can operate in an online-entrained mode when driven by temporal data, while almost all existing recognition architectures in machine learning are designed for static patterns. Unfortunately I cannot offer a clear definition of “pattern integrity”. An aspect of pattern integrity that I find important if not defining is that some temporal and spatial detail of a recognized pattern is preserved across processing layers. Even at the highest layers, a “complete” representation of the pattern should be available. This seems to agree with cognitive theories positing that humans represent concepts by prototypes, and more specifically, by exemplars (critical discussion [63]). However, these cognitive theories relate to empirical findings on human classification of static, not temporal, patterns. I am aware that I am vague. One reason for this is that we lack a scientific terminology, mathematical models, and standard sets of examples for discussing phenomena connected with pattern integrity. All I can bring to the table at this point is just a new architecture that has some extravagant processing characteristics. This is, I hope, relevant, but it is premature to connect this in any detail to empirical cognitive phenomena. 3.17 Toward a Formal Marriage of Dynamics with Logic In this subsection I assume a basic acquaintance of the reader with Boolean and first-order predicate logic. So far, I have established that conceptor matrices can be combined with (al- 136 most) Boolean operations, and can be ordered by (a version of) abstraction. In this subsection I explore a way to extend these observations into a formal “conceptor logic”. Before I describe the formal apparatus, I will comment on how I will be understanding the notions of “concept” and “logic”. Such a preliminary clarification is necessary because these two terms are interpreted quite differently in different contexts. “Concepts” in the cognitive sciences. I start with a quote from a recent survey on research on concepts and categories in the cognitive sciences [75]: “The concept of concepts is difficult to define, but no one doubts that concepts are fundamental to mental life and human communication. Cognitive scientists generally agree that a concept is a mental representation that picks out a set of entities, or a category. That is, concepts refer, and what they refer to are categories. It is also commonly assumed that category membership is not arbitrary but rather a principled matter. What goes into a category belongs there by virtue of some law-like regularities. But beyond these sparse facts, the concept CONCEPT is up for grabs.” Within this research tradition, one early strand [87, 17] posited that the overall organization of a human’s conceptual representations, his/her semantic memory, can be formally well captured by AI representation formalisms called semantic networks in later years. In semantic network formalisms, concepts are ordered in abstraction hierarchies, where a more abstract concept refers to a more comprehensive category. In subsequent research this formally clear-cut way of defining and organizing concepts largely dissolved under the impact of multi-faceted empirical findings. Among other things, it turned out that human concepts are graded, adaptive, and depend on features which evolve by learning. Such findings led to a diversity of enriched models of human concepts and their organization (my favourites: [62, 22, 64]), and many fundamental questions remain controversial. Still, across all diversity and dispute, the basic conception of concepts spelled out in the initial quote remains largely intact, namely that concepts are mental representations of categories, and categories are defined extensionally as a set of “entities”. The nature of these entities is however “up to grabs”. For instance, the concept named “Blue” might be referring to the set of blue physical objects, to a set of wavelengths of light, or to a set of sensory experiences, depending on the epistemic approach that is taken. “Concepts” in logic formalisms. I first note that the word “concept” is not commonly used in logics. However, it is quite clear what elements of logical systems are equated with concepts when such systems are employed as models of semantic memory in cognitive science, or as knowledge representation frameworks in AI. There is a large variety of logic formalisms, but almost all of them employ typed symbols, specifically unary predicate symbols, relation symbols of higher arity, constant symbols, and function symbols. In the model-theoretic view on logic, such symbols become extensionally interpreted by sets of elements defined over the domain set of a set-theoretic model. Unary predicate symbols become interpreted 137 by sets of elements; n-ary relation symbols become interpreted by n-tuples of such elements; function symbols by sets of argument-value pairs; constant symbols by individual elements. A logic theory uses a fixed set of such symbols called the theory’s signature. Within a theory, the interpretation of the signature symbols becomes constrained by the axioms of the theory. In AI knowledge representation systems, this set of axioms can be very large, forming a world model and situation model (sometimes called “T-Box” and “A-Box”). In the parlance of logic-oriented AI, the extension of unary predicate symbols are often called classes instead of “categories”. In AI applications, the world model is often implemented in the structure of a semantic network [67], where the classes are represented by nodes labelled by predicate symbols. These nodes are arranged in a hierarchy with more abstract class nodes in higher levels. This allows the computer program to exploit inheritance of properties and relations down the hierarchy, reducing storage requirements and directly enabling many elementary inferences. Class nodes in semantic networks can be laterally linked by relation links, which are labelled by relation symbols. At the bottom of such a hierarchy one may locate individual nodes labelled by constant symbols. A cognitive scientist employing such a semantic network representation would consider the class nodes, individual nodes, and relation links as computer implementations or formal models of class concepts, individual concepts, and relational concepts, respectively. Also, semantic network specification languages are sometimes called concept description languages in AI programming. On this background, I will understand the symbols contained in a logic signature as names of concepts. Furthermore, a logical expression ϕ[x1 , . . . , xn ] containing n free (first-order) variables can be interpreted by the set of all n-tuples satisfying this expression. ϕ[x1 , . . . , xn ] thus defines an n-ary relation. For example, ϕ[x] = Fruit(x) ∧ Yellow(x) ∧ Longish(x) ∧ Curved(x) would represent a class (seems to be the class of bananas). Quite generally, logical expressions formed according to the syntax of a logic formalism can build representations of new concepts from given ones. There is an important difference between how “concepts” are viewed in cognitive modeling versus logic-based AI. In the latter field, concepts are typically named by symbols, and the formal treatment of semantics is based on a reference relationship between the symbols of a signature and their interpretations. However, even in logic-based knowledge representation formalisms there can be un-named concepts which are formally represented as logic expressions with free variables, as for instance the banana formula above. In cognitive science, concepts are not primarily or necessarily named, although a concept can be optionally labelled with a name. Cognitive modeling can deal with conceptual systems that have not a single symbol, for instance when modeling animal cognition. By contrast, AI-style logic modeling typically is strongly relying on symbols (the only exception being mathematical theories built on the empty signature; this is of 138 interest only for intra-mathematical investigations). Remarks on “Logics”. In writing this paragraph, I follow the leads of the PhD thesis [88] of Florian Rabe which gives a comprehensive and illuminating account of today’s world of formal logic research. The field of mathematical logics has grown and diversified enormously in the last three decades. While formal logic historically has been developed within and for pure mathematics, much of this recent boost was driven by demands from theoretical computer science, AI, and semantic web technologies. This has led to a cosmos populated by a multitude of “logics” which sometimes differ from each other even in basic premises of what, actually, qualifies a formal system as a “logic”. In turn, this situation has led to meta-logical research, where one develops formal logical frameworks in order to systematically categorize and compare different logics. Among the existing such logical frameworks, I choose the framework of institutions [37], because it has been devised as an abstraction of model-theoretic accounts of logics, which allows me to connect quite directly to concepts, categories, and the semantic reference link between these two. Put briefly, a formal system qualifies as a logic within this framework if it can be formulated as an institution. The framework of institutions is quite general: all logics used in AI, linguistics and theoretical cognitive sciences can be characterized as institutions. The framework of institutions uses tools from category theory. In this section I do not assume that the reader is familiar with category theory, and therefore will give only an intuitive account of how “conceptor logic” can be cast as an institution. A full categorical treatment is given in Section 3.18. An institution is made of three main components, familiar from the model theory of standard logics like first-order predicate logic: 1. a collection Sign of signatures, where each signature Σ is a set of symbols, 2. for each signature Σ, a set Sen(Σ) of Σ-sentences that can be formed using the symbols of Σ, 3. again for each signature Σ, a collection Mod(Σ) of Σ-models, where a Σ-model is a mathematical structure in which the symbols from Σ are interpreted. Furthermore, for every signature Σ there is a model relation |=Σ ⊆ Mod(Σ) × Sen(Σ). For a Σ-model m and a Σ-sentence χ, we write infix notation m |=Σ χ for (m, χ) ∈ |=Σ , and say “m is a model of χ”, with the understanding that the sentence χ makes a true statement about m. The relationsships between the main elements of an institution can be visualized as in Figure 45. The full definition of an institution includes a mechanism for symbol re-naming. The intuitive picture is the following. If a mathematician or an AI engineer writes down a set of axioms, expressed as sentences in a logic, the choice of symbols should be of no concern whatsoever. As Hilbert allegedly put it, the mathematical theory of geometry should remain intact if instead of “points, lines, surfaces” 139 Sen Sen(Σ) Σ Mod Mod(Σ) Figure 45: How the elements of an institution relate to each other. For explanation see text. one would speak of “tables, chairs, beer mugs”. In the framework of institutions this is reflected by formalizing how a signature Σ may be transformed into another signature Σ0 by a signature morphism φ : Σ → Σ0 , and how signature morphisms are extended to sentences (by re-naming symbols in a sentence according to the signature morphism) and to models (by interpreting the re-named symbols by the same elements of a model that were previously used for interpreting the original symbols). Then, if m0 , χ0 denote the re-named model m and sentence χ, an institution essentially demands that m |=Σ χ if and only if m0 |=Σ0 χ0 . For example, first-order logic (FOL) can be cast as an institution by taking for Sign the class of all FOL signatures, that is the class of all sets containing typed predicate, relation, function and constant symbols; Sen maps a signature Σ to the set of all closed (that is, having no free variables) Σ-expressions (usually called sentences); Mod assigns to each signature the class of all set-theoretic Σstructures; and |= is the satisfaction relation of FOL (also called model relation). For another example, Boolean logic can be interpreted as an institution in several ways, for instance by declaring Sign as the class of all totally ordered countable sets (the elements of which would be seen as Boolean variables); for each signature Σ of Boolean variables, Sen(Σ) is the set of all Boolean expressions ϕ[Xi1 , . . . , Xin ] over Σ and Mod(Σ) is the set of all truth value assignments τ : Σ → {T, F } to the Boolean variables in Σ; and τ |=Σ ϕ if ϕ evaluates to T under the assignment τ . In an institution, one can define logical entailment between Σ-sentences in the familiar way, by declaring that χ logically entails χ0 (where χ, χ0 are Σ-sentences) if and only if for all Σ-models m it holds that m |=Σ χ implies m |=Σ χ0 . By a standard abuse of notation, this is also written as χ |=Σ χ0 or χ |= χ0 . I will sketch two entirely different approaches to define a “conceptor logic”. The first follows in the footsteps of familiar logics. Conceptors can be named by arbitrary symbols, sentences are built by an inductive procedure which specifies how more complex sentences can be constructed from simpler ones by similar syntax rules as in first-order logic, and models are designated as certain mathematical structures built up from named conceptors. This leads to a logic that essentially represents a version of first-order logic constrained to conceptor domains. It would be a logic useful for mathematicians to investigate “logical” characteristics of conceptor mathematics, especially whether there are complete calculi that allow one to systematically prove all true facts concerning conceptors. I call such logics ex140 trinsic conceptor logics. Extrinsic conceptor logics are tools for mathematicians to reason about conceptors. A particular extrinsic conceptor logic as an institution is detailed in Section 3.18. The other approach aims at a conceptor logic that, instead of being a tool for mathematicians to reason about conceptors, is a model of how a situated intelligent agent does “logical reasoning” with conceptors. I call this intrinsic conceptor logic (ICL). An ICL has a number of unconventional properties: • An ICL should function as a model of a situated agent’s conceptor-based information processing. Agents are bound to differ widely in their structure and their concrete lifetime learning histories. Therefore I do not attempt to design a general “fits-all-agents” ICL. Instead, for every single, concrete agent life history there will be an ICL, the private ICL of that agent life. • An agent with a personal learning history is bound to develop its private “logic” over time. The ICL of an agent life thus becomes a dynamical system in its own right. The framework of institutions was not intended by its designers to model temporally evolving objects. Specifying an institution such that it can be considered a dynamical system leads to some particularly unconventional characteristics of an agent life ICL. Specifically, signatures become time-varying objects, and signature morphisms (recall that these model the “renaming” of symbols) are used to capture the temporal evolution of signatures. An agent’s lifetime ICL is formalized differently according to whether the agent is based on matrix conceptors or random feature conceptors. Here I work out only the second case. In the following outline I use the concrete three-layer de-noising and classification architecture from Section 3.16 as a reference example to fill the abstract components of ICL with life. Even more concretely, I use the specific “lifetime history” of the 16000-step adaptation run illustrated in Figure 43 as demonstration example. For simplicity I will refer to that particular de-noising and classification architecture run as “DCA”. Here is a simplified sketch of the main components of an agent’s lifetime ICL (full treatment in Section 3.18): 1. An ICL is designed to model a particular agent lifetime history. A specification of such an ICL requires that a formal model of such an agent life is available beforehand. The core part of an agent life model AL is a set of m conceptor adaptation sequences {a1 (n), . . . , am (n)}, where each ai (n) is an M -dimensional conception weight vector. It is up to the modeler’s discretion which conceptors in a modeled agent become included in the agent life model AL. In the DCA example I choose the four prototype conception weight vectors c1 , . . . , c4 and the two auto-adapted caut [l] on layers l = 1, 2. In 141 this example, the core constituent of the agent life model AL is thus the set aut of m = 6 conceptor adaptation trajectories c1 (n), . . . , c4 (n), caut [1] (n), c[2] (n), where 1 ≤ n ≤ 16000. The first four trajectories c1 (n), . . . , c4 (n) are constant over time because these prototype conceptors are not adapted; the last two evolve over time. Another part of an agent life model is the lifetime T , which is just the interval of timepoints n for which the adaptation sequences ai (n) are defined. In the DCA example, T = (1, 2, . . . , 16000). (n) (n) 2. A signature is a finite non-empty set Σ(n) = {A1 , . . . , Am } of m timeindexed symbols Ai . For every n ∈ T there is a signature Σ(n) . DCA example: In the ICL of this example agent life, the collection Sign of (n) (n) (n) (n) signatures is made of 16000 signatures {C1 , . . . , C4 , A1 , A2 } containing six symbols each, with the understanding that the first four symbols refer to the prototype conceptors c1 (n), . . . , c4 (n) and the last two refer to the aut auto-adapted conceptors caut [1] (n), c[2] (n). 3. For every pair Σ(n+k) , Σ(n) of signatures, where k ≥ 0, there is a signature (n) (n+k) to Ai . These signamorphism φ(n+k,n) : Σ(n+k) → Σ(n) which maps Ai ture morphisms introduce a time arrow into Sign. This time arrow “points backwards”, leading from later times n + k to earlier times n. There is a good reason for this backward direction. Logic is all about describing facts. In a historically evolving system, facts χ(n+k) established at some later time n + k can be explained in terms of facts ζ (n) at preceding times n, but not vice versa. Motto: “the future can be explained in terms of the past, but the past cannot be reduced to facts from the future”. Signature morphisms are a technical vehicle to re-formulate descriptions of facts. They must point backwards in time in order to allow facts at later times to become re-expressed in terms of facts stated for earlier times. Figure 46 illustrates the signatures and their morphisms in an ICL. (n) (n) 4. Given a signature Σ(n) = {A1 , . . . , Am }, the set of sentences Sen(Σ(n) ) which can be expressed with the symbols of this signature is the set of syntactic expressions defined inductively by the following rules (incomplete, full treatment in next subsection): (n) (n) (a) A1 , . . . , Am are sentences in Sen(Σ(n) ). (n) (b) For k ≥ 0 such that n, n + k ∈ T , for Ai Sen(Σ(n) ). (n) (n) ∈ Σ(n) , δk Ai is in (c) If ζ, ξ ∈ Sen(Σ(n) ), then (ζ ∨ ξ), (ζ ∧ ξ), ¬ζ ∈ Sen(Σ(n) ). (d) If ζ ∈ Sen(Σ(n) ), then ϕ(ζ, γ) ∈ Sen(Σ(n) ) for every γ ∈ [0, ∞] (this captures aperture adaptation). (e) If ζ, ξ ∈ Sen(Σ(n) ) and 0 ≤ b ≤ 1, then βb (ζ, ξ) ∈ Sen(Σ(n) ) (this will take care of linear blends bζ + (1 − b)ξ). 142 " (n+1, n – 1) (n+1, n) " (n, n – 1) " !(n) !(n +1) !(n – 1) ... A1(n – 1) A2(n – 1) ... A1(n) A2(n) ... A1(n + 1) ... A2(n + 1) ... time!n Figure 46: Signatures and their morphisms in an ICL (schematic). For explanation see text. In words, sentences express how new conceptors can be built from existing ones by Boolean operations, aperture adaptation, and linear blends. The “seed” set for these inductive constructions is provided by the conceptors that can be directly identified by the symbols in Σ(n) . (n) (n) The sentences of form δk Ai deserve a special comment. The operators (n) (n) (n) δk are time evolution operators. A sentence δk Ai will be made to refer to the conceptor version ai (n + k) at time n + k which has evolved from ai (n). 5. For every time n, the set Mod(Σ(n) ) of Σ(n) -models is the set Z of M dimensional nonnegative vectors. Remarks: (i) The idea for these models is that they represent mean energy vectors E[z .∧.2 ] of feature space states. (ii) The set of models Mod(Σ(n) ) is the same for every signature Σ(n) . DCA example: Such feature space signal energy vectors occur at various places in the DCA, for instance in Equations (102), (103), and conception weight vectors which appear in the DCA evolution are all defined or adapted in one way or other on the basis of such feature space signal energy vectors. 6. Every Σ(n) -sentence χ is associated with a concrete conception weight vector ι(χ) by means of the following inductive definition: (n) (a) ι(Ai ) = ai (n). (n) (n) (b) ι(δk Ai ) = ai (n + k). (c) Case χ = (ζ ∨ ξ): ι(χ) = ι(ζ) ∨ ι(ξ) (compare Definition 7). 143 (d) Case χ = (ζ ∧ ξ): ι(χ) = ι(ζ) ∧ ι(ξ). (e) Case χ = ¬ζ: ι(χ) = ¬ι(ζ). (f) Case χ = ϕ(ζ, γ): ι(χ) = ϕ(ι(ζ), γ) (compare Definition 6). (g) Case χ = βb (ζ, ξ): ι(χ) = b ι(ζ) + (1 − b)ι(ξ). Remark: This statement of the interpretation operator ι is suggestive only. The rigorous definition (given in the next section) involves additional non(n) trivial mechanisms to establish the connection between the symbol Ai and the concrete conceptor version ai (n) in the agent life. Here I simply appeal to the reader’s understanding that symbol Ai refers to object ai . 7. For z .∧2 ∈ Z and χ ∈ Sen(Σ(n) ), the model relationship is defined by z .∧2 |=Σ(n) χ iff z .∧2 .∗ (z .∧2 + 1).∧−1 ≤ ι(χ). (108) Remark: This definition in essence just repeats how a conception weight vector is derived from a feature space signal energy vector. When all category-theoretical details are filled in which I have omitted here, one obtains a formal definition of an institution which represents the ICL of an agent life AL. It can be shown that in an ICL, for all ζ, ξ ∈ Sen(Σ(n) ) it holds that ζ |=Σ(n) ξ iff ι(ζ) ≤ ι(ξ). By virtue of this fact, logical entailment becomes decidable in an ICL: if one wishes to determine whether ξ is implied by ζ, one can effectively compute the vectors ι(ζ), ι(ξ) and then check in constant time whether ι(ζ) ≤ ι(ξ). Returning to the DCA example (with lifetime history shown in Figure 43), its ICL identiefies over time the four prototype conceptors c1 , . . . , c4 and the two auto(n) (n) auto by temporally evolving symbols {C1 , . . . , C4 , adapted conceptors cauto [1] , c[2] (n) (n) A1 , A2 }. All other conceptors that are computed in this architecture can be defined in terms of these six ones. For instance, the top-level conceptor c[3] (n) can be W expressed in terms of the identifiable four prototype conceptors by c[3] (n) = j=1,...,4 ϕ(cj , γ j (n)) by combining the operations of disjunction and aperture adaptation. In ICL syntax this construction would be expressible by a Σ(n) sentence, for instance by (n) (n) (n) (n) (((ϕ(C1 , γ 1 (n)) ∨ ϕ(C2 , γ 2 (n))) ∨ ϕ(C3 , γ 3 (n))) ∨ ϕ(C4 , γ 4 (n))). A typical adaptation objective of a conception vector c(n) occurring in an agent life is to minimize a loss of the form (see Definition 88) Ez [kz − c(n) .∗ zk2 ] + α−2 kc(n)k2 , 144 or equivalently, the objective is to converge to c(n) = E[α2 z .∧2 ] .∗ (E[α2 z .∧2 ] + 1).∧−1 . This can be re-expressed in ICL terminology as “adapt c(n) such that α2 E[z .∧2 ] |=Σ(n) χc(n) , and such that not z .∧2 |=Σ(n) χc(n) for any z .∧2 > α2 E[z .∧2 ]” (here χc(n) is an adhoc notation for an ICL sentence χc(n) ∈ Sen(Σ(n) ) specifying c(n)). In more abstract terms, the typical adaptation of random feature conceptors can be understood as an attempt to converge toward the conceptor that is maximally |=-specific under a certain constraint. Discussion. I started this section by a rehearsal of how the notion of “concept” is understood in cognitive science and logic-based AI formalisms. According to this understanding, a concept refers to a category (terminology of cognitive science); or a class symbol or logical expression with free variables is interpreted by its set-theoretical extension (logic terminology). Usually, but not necessarily, the concepts/logical expressions are regarded as belonging to an “ontological” domain that is different from the domain of their respective referents. For instance, consider a human maintaining a concept named cow in his/her mind. Then many cognitive scientists would identifiy the category that is referred to by this concept with the some set of physical cows. Similarly, an AI expert system set up as a farm management system would contain a symbol cow in its signature, and this symbol would be deemed to refer to a collection of physical cows. In both cases, the concept / symbolic expression cow is ontologically different from a set of physical cows. However, both in cognitive science and AI, concepts / symbolic expressions are sometimes brought together with their referents much more closely. In some perspectives taken in cognitive science, concepts are posited to refer to other mental items, for instance to sensory perceptions. In most current AI proof calculi (“inference engines”), models of symbolic expressions are created which are assembled not from external physical objects but from symbolic expressions (“Herbrand universe” constructions). Symbols from a signature Σ then refer to sets of Σ-terms. In sum, fixing the ontological nature of referents is ultimately left to the modeling scientist in cognitive science or AI. In contrast, ICL is committed to one particular view on the semantic relationship: Σ(n) -sentences are always describing conception weight vectors, and refer to neural activation energy vectors z .∧2 . In the case of matrix conceptor based agents, Σ(n) -sentences describe conceptor matrices and refer to neural activation correlation matrices R by the following variant of (108): R |=Σ(n) χ iff R(R + I)−1 ≤ ι(χ). (109) In Figure 47 I try to visualize this difference between the classical, extensional view on symbols and their referents, and the view adopted by ICL. This figure contrasts how classical logicians and cognitive scientists would usually model an agent’s representation of farm livestock, as opposed to how ICL renders that situation. The semantic relation is here established between the physical world on 145 the one side, and symbols and logical expressions on the other side. The world is idealized as a set of individuals (individual animals in this example), and symbols for concepts (predicate symbols in logic) are semantically interpreted by sets of individuals. In the farmlife example, a logician might introduce a symbol lifestock which would denote the set of all economically relevant animals grown in farms, and one might introduce another symbol poultry to denote the subset of all feathered such animals. The operator that creates “meaning” for concept symbols is the grouping of individuals into sets (the bold “{ }” in Figure 47). With conceptors, the semantic relation connects neural activity patterns triggered by perceiving animals on the one side, with conceptors acting on neural dynamics on the other side. The core operator that creates meaning is the condensation of the incoming data into a neural activation energy pattern z .∧2 (or correlation matrix R for matrix conceptors) from which conceptors are generated via the fundamental construction c = E[z .∧2 ] .∗ (E[z .∧2 ]+1).∧−1 or C = R(R+I)−1 (Figure 47 depicts the latter case). Figure 47: Contrasting the extensional semantics of classical knowledge representation formalisms (upper half of graphics) with the system-internal neurodynamical semantics of conceptors (lower half). In both modeling approaches, abstraction hierarchies of “concepts” arise. For explanation see text. ICL, as presented here, cannot claim to be a model of all “logical reasoning” in a neural agent. Specifically, humans sometimes engage in reasoning activities which are very similar to how syntactic logic calculi are executed in automated theorem proving. Such activities include the build-up and traversal of search trees, 146 creating and testing hypotheses, variable binding and renaming, and more. A standard example is the step-by-step exploration of move options done by a human chess novice. ICL is not designed to capture such conscious combinatorial logical reasoning. Rather, ICL is intended to capture the automated aspects of neural information processing of a situated agent, where incoming (sensor) information is immediately transformed into perceptions and maybe situation representations in a tight dynamical coupling with the external driving signals. The material presented in this and the next section is purely theoretical and offers no computational add-on benefits over the material presented in earlier sections. There are three reasons why nonetheless I invested the effort of defininig ICLs: • By casting conceptor logic rigorously as an institution, I wanted to substantiate my claim that conceptors are “logical” in nature, beyond a mere appeal to the intuition that anything admitting Boolean operations is logic. • The institutional definition given here provides a consistent formal picture of the semantics of conceptors. A conceptor c identified by an ICL sentence χc “means” neural activation energy vectors z .∧2 . Conceptors and their meanings are both neural objects of the same mathematical format, M dimensional nonnegative vectors. Having a clear view on this circumstance helps to relate conceptors to the notions of concepts and their referents, which are so far from being fully understood in the cognitive sciences. • Some of the design ideas that went into casting ICLs as institutions may be of more general interest for mathematical logic research. Specifically, making signatures to evolve over time – and hence, turn an institution into a dynamical system – might be found a mechanism worth considering in scenarios, unconnected with conceptor theory or neural networks, where one wants to analyse complex dynamical systems by means of formal logics. 3.18 Conceptor Logic as Institutions: Category-Theoretical Detail In this section I provide a formal specification of conceptor logic as an institution. This section addresses only readers with a dedicated interest in formal logic. I assume that the reader is familiar with the institution framework for representing logics (introduced in [37] and explained in much more detail in Section 2 in [88]) and with basic elements of category theory. I first repeat almost verbatim the categorical definition of an institution from [37]. Definition 8 An institution I consists of 1. a category Sign, whose objects Σ are called signatures and whose arrows are called signature morphisms, 147 2. a functor Sen : Sign → Set, giving for each signature a set whose elements are called sentences over that signature, 3. a functor Mod : Sign → Catop , giving for each signature Σ a category Mod(Σ) whose objects are called Σ-models, and whose arrows are called Σ(model) morphisms, and 4. a relation |=Σ ⊆ Mod(Σ) × Sen(Σ) for each Σ ∈ Sign, called Σ-satisfaction, such that for each morphism φ : Σ1 → Σ2 in Sign, the Satisfaction Condition m2 |=Σ2 Sen(φ)(χ1 ) iff Mod(φ)(m2 ) |=Σ1 χ1 (110) holds for each m2 ∈ Mod(Σ2 ) and each χ1 ∈ Sen(Σ1 ). The interrelations of these items are visualized in Figure 48. Set Sen Sign Mod !1" Catop Mod(!1) !1 Sen(!) Mod(!) ! !2" Sen(!1) Mod(!2) !2 Sen(!2) Figure 48: Relationships between the constituents of an institution (redrawn from [37]). Remarks: 1. The morphisms in Sign are the categorical model of re-naming the symbols in a logic. The essence of the entire apparatus given in Definition 8 is to capture the condition that the model-theoretic semantics of a logic is invariant to renamings of symbols, or, as Goguen and Burstall state it, “Truth is invariant under change of notation”. 2. The intuition behind Σ-model-morphisms, that is, maps µ : I1Σ → I2Σ , where I1Σ , I2Σ are two Σ-models, is that µ is an embedding of I1Σ in I2Σ . If we take first-order logic as an example, with I1Σ , I2Σ being two Σ-structures, then 148 µ : I1Σ → I2Σ would be a map from the domain of I1Σ to the domain of I2Σ which preserves functional and relational relationships specified under the interpretations of I1Σ and I2Σ . 3. In their original 1992 paper [37], the authors show how a number of standard logics can be represented as institutions. In the time that has passed since then, institutions have become an important “workhorse” for software specification in computer science and for semantic knowledge management systems in AI, especially for managing mathematical knowledge, and several families of programming toolboxes have been built on institutions (overview in [88]). Alongside with the model-theoretic spirit of institutions, this proven usefulness of institutions has motivated me to adopt them as a logical framework for conceptor logic. Logical entailment between sentences is defined in institutions in the traditional way: Definition 9 Let χ1 , χ2 ∈ Sen(Σ). Then χ1 entails χ2 , written χ1 |=Σ χ2 , if for all m ∈ Ob(Mod(Σ)) it holds that m |=Σ χ1 → m |=Σ χ2 . Institutions are flexible and offering many ways for defining logics. I will frame two entirely different kinds of conceptor logics. The first kind follows the intuitions behind the familiar first-order predicate logic, and should function as a formal tool for mathematicians to reason about (and with) conceptors. Since it looks at conceptors “from the outside” I will call it extrinsic conceptor logic (ECL). Although ECL follows the footsteps of familiar logics in many respects, in some aspects it deviates from tradition. The other kind aims at modeling the “logical” operations that an intelligent neural agent can perform whose “brain” implements conceptors. I find this the more interesting formalization; certainly it is the more exotic one. I will call it intrinsic conceptor logic (ICL). Extrinsic conceptor logic. I first give an intuitive outline. I treat only the case of matrix-based conceptors. An ECL concerns conceptors of a fixed dimension N and their logical interrelationships, so one should more precisely speak of N dimensional ECL. I assume some N is fixed. Sentences of ECL should enable a mathematician to talk about conceptors in a similar way as familiar predicate logics allow a mathematician to describe facts about other mathematical objects. For example, “for all conceptors X, Y it holds that X ∧ Y ≤ X and X ∧ Y ≤ Y ” should be formalizable as an ECL sentence. A little notational hurdle arises because Boolean operations appear in two roles: as operators acting on conceptors (the “∧” in the sentence above), and as constituents of the logic language (the “and” in that sentence). To keep these two roles notationally apart, I will use AND, OR, NOT (allowing infix notation) for the role as operators, and ∧, ∨, ¬ for the logic language. The above sentence would then be formally written as “∀x∀y (x AND y ≤ x) ∧ (x AND y ≤ y)”. 149 The definition of signatures and ECL-sentences in many respects follows standard customs (with significant simplifications to be explained after the definition) and is the same for any conceptor dimension N : Definition 10 Let Var = {x1 , x2 , ...} be a fixed countable indexed set of variables. 1. (ECL-signatures) The objects (signatures) of Sign are all countable sets, whose elements are called symbols. For signatures Σ1 , Σ2 , the set of morphisms hom (Σ1 , Σ2 ) is the set of all functions φ : Σ1 → Σ2 . 2. (ECL-terms) Given a signature Σ, the set of Σ-terms is defined inductively by (a) Every variable xi , every symbol a ∈ Σ, and I is a Σ-term. (b) For Σ-terms t1 , t2 and γ ∈ [0, ∞], the following are Σ-terms: NOT t1 , (t1 AND t2 ), (t1 OR t2 ), and ϕ(t1 , γ). 3. (ECL-expressions) Given a signature Σ, the set Exp(Σ) of Σ-expressions is defined inductively by (a) If t1 , t2 are Σ-terms, then t1 ≤ t2 is a Σ-expression. (b) If e1 , e2 are Σ-expressions, and xi a variable, then the following are Σ-expressions: ¬e1 , (e1 ∧ e2 ), (e1 ∨ e2 ), ∀xi e1 . 4. (ECL-sentences) A Σ-expression that contains no free variables is a Σsentence (free occurrence of variables to be defined as usual, omitted here.) Given a Σ-morphism φ : Σ1 → Σ2 , its image Sen(φ) under the functor Sen is the map which sends every Σ1 -sentence χ1 to the Σ2 -sentence χ2 obtained from χ1 by replacing all occurrences of Σ1 symbols in χ1 by their images under φ. I omit the obvious inductive definition of this replacement construction. Notes: • ECL only has a single sort of symbols with arity 0, namely constant symbols (which will be made to refer to conceptors later). This renders the categorical treatment of ECL much simpler than it is for logics with sorted symbols of varying arities. • The operator symbols NOT, AND, OR, the parametrized operation symbol ϕ(·, γ) and the relation symbol ≤ are not made part of signatures, but become universal elements in the construction of sentences. The models of ECL are quite simple. For a signature Σ, the objects of Mod (Σ) are the sets of Σ-indexed N -dimensional conceptor matrices Ob(Mod (Σ)) = {m ⊂ CN ×N × Σ | ∀σ ∈ Σ ∃=1 C ∈ CN ×N : (C, σ) ∈ m} 150 where CN ×N is the set of all N -dimensional conceptor matrices. The objects of Mod (Σ) are thus the graph sets of the functions from Σ to the set of N -dimensional conceptor matrices. The model morphisms of Mod (Σ) are canonically given by the index-preserving maps hom({(C1 , σ)}, {(C2 , σ)}) = {µ : {(C1 , σ)} → {(C2 , σ)} | µ : (C1 , σ) 7→ (C2 , σ)}. Clearly, hom({(C, σ)}, {(C 0 , σ)}) contains exactly one element. φ Given a signature morphism Σ1 → Σ2 , then Mod (φ) is defined to be a map from Mod (Σ2 ) to Mod (Σ1 ) as follows. For a Σ2 -model m2 = {(C2 , σ2 )} let [[σ2 ]]m2 denote the interpretation of σ2 in m2 , that is, [[σ2 ]]m2 is the conceptor matrix C2 for which (C2 , σ2 ) ∈ m2 . Then Mod (φ) assigns to to m2 the Σ1 -model m1 = Mod (φ)(m2 ) = {([[φ(σ1 )]]m2 , σ1 )} ∈ Mod (Σ1 ). The model relations |=Σ are defined in the same way as in the familiar firstorder logic. Omitting some detail, here is how: Definition 11 Preliminaries: A map β : Var → CN ×N is called a variable assignment. B is the set of all variable assignments. We denote by β xCi the variable assignment that is identical to β except that xi is mapped to C. A Σ-interpretation is a pair I = (m, β) consisting of a Σ-model m and a variable assignment β. By I xCi we denote the interpretation (m, β xCi ). For a Σ-term t, the interpretation I(t) ∈ CN ×N is defined in the obvious way. Then |=∗Σ ⊆ (Mod(Σ) × B) × Exp(Σ) is defined inductively by 1. I |=∗Σ t1 ≤ t2 2. I |=∗Σ ¬e iff iff I(t1 ) ≤ I(t2 ), not I |=∗Σ e, 3. I |=∗Σ (e1 ∧ e2 ) iff I |=∗Σ e1 and I |=∗Σ e2 , 4. I |=∗Σ (e1 ∨ e2 ) iff I |=∗Σ e1 or I |=∗Σ e2 , 5. I |=∗Σ ∀xi e iff for all C ∈ CN ×N it holds that I xCi |=∗Σ e. |=Σ then is the restriction of |=∗Σ on sentences. This completes the definition of ECL as an institution. The satisfaction condition obviously holds. While in many respects ECL follows the role model of first-order logic, the associated model theory is much more restricted in that only N -dimensional conceptors are admitted as interpretations of symbols. The natural next step would be to design calculi for ECL and investigate whether this logic is complete or even decidable. Clarity on this point would amount to an insight in the computational tractability of knowledge representation based on matrix conceptors with Boolean and aperture adaptation opertors. Intrinsic conceptor logic. I want to present ICL as a model of the “logics” which might unfold inside a neural agent. All constituents of ICL should be 151 realizable in terms of neurodynamical processes, giving a logic not for reasoning about conceptors, but with conceptors. Taking the idea of placing “logics” inside an agent seriously has a number of consequences which lead quite far away from traditional intuitions about “logics”: • Different agents may have different logics. I will therefore not try to define a general ICL that would fit any neural agent. Instead every concrete agent with a concrete lifetime learning history will need his/her/its own individual conceptor logic. I will use the signal de-noising and classification architecture from Section 3.16 as an example “agent” and describe how an ICL can be formulated as an institution for this particular case. Some general design principles will however become clear from this case study. • Conceptors are all about temporal processes, learning and adaptation. An agent’s private ICL will have to possess an eminently dynamical character. Concepts will change their meaning over time in an agent. This “personal history dynamics” is quintessential for modeling an agent and should become reflected in making an ICL a dynamical object itself – as opposed to introducing time through descriptive syntactical elements in an otherwise static logic, like it is traditionally done by means of modal operators or axioms describing a timeline. In my proposal of ICLs, time enters the picture through the central constituent of an institution, signature morphisms. These maps between signatures (all commanded by the same agent) will model time, and an agent’s lifetime history of adaptation will be modeled by an evolution of signatures. Where the original core motif for casting logics as institutions was that “truth is invariant under change of notation” ([37]), the main point of ICLs could be contrasted as “concepts and their meaning change with time”. The role of signature morphisms in ICLs is fundamentally different in ICLs compared to customary formalizations of logics. In the latter, signature changes should leave meaning invariant; in the former, adaptive changes in conceptors are reflected by temporally indexed changes in signature. • Making an ICL private to an agent implies that the model relation |= becomes agent-specific. An ICL cannot be specified as an abstract object in isolation. Before it can be defined, one first needs to have a formal model of a particular agent with a particular lifelong adaptation history. In sum, an ICL (formalized as institution) itself becomes a dynamical system, defined relative to an existing (conceptor-based) neural agent with a particular adaptation history. The “state space” of an ICL will be the set of signatures. A “trajectory” of the temporal evolution of an ICL will essentially be a sequence of signatures, enriched with information pertaining to forming sentences and models. For an illustration, assume that a neural agent adapts two random feature conceptors a(n), b(n). These are named by two temporally indexed symbols A(n) , B (n) . A signature will be a timeslice of these, Σ(n) = {A(n) , B (n) }. For every pair of 152 integer timepoints (n + k, n) (where k ≥ 0) there will be a signature morphism φ(n+k,n) : Σ(n+k) → Σ(n) . The (strong) reason why signature morphisms point backwards in time will become clear later. Figure 46 visualizes the components of (n) this example. The dotted lines connecting the Ai are suggestive graphical hints (n) that the symbols Ai all name the “same” conceptor ai . How this “sameness of identity over time” can be captured in the institution formalism will become clear presently. Formal definitions of ICLs will vary depending on what kind of conceptors are used (for instance, matrix or random feature based), or whether time is taken to be discrete or continuous. I give a definition for discrete-time, random feature conceptor based ICLs. Because ICLs will be models of an agent’s private logic which evolves over the agent’s lifetime, the definition of an ICL is stated relative to an agent’s lifetime conceptor adaptation history. The only property of such an agent that is needed for defining an ICL is the existence of temporally adapted conceptors owned by the agent. Putting this into a formal definition: Definition 12 An agent life (here: M -dimensional random feature conceptor based, discrete time) is a structure AL = (T, Σ, ιAL ), where 1. T ⊆ Z is an interval (finite or infinite) of the integers, the lifetime of AL, 2. Σ = {A1 , . . . , Am } is a finite nonempty set of conceptor identifiers, 3. ιAL : Σ × T → [0, 1]M , (Ai , n) 7→ ai (n) assigns to every time point and conceptor identifier an adaptation version ai (n) of the conceptor identified by the symbol Ai . As an example of an agent consider the signal de-noising and classification architecture (DCA) presented in Section 3.16, with a “life” being the concrete 16000-step adaptation run illustrated in Figure 43. In this example, the lifetime is T = {1, . . . , 16000}. I will identify by symbols the four prototype conceptors auto c1 , . . . , c4 and the two auto-adapted conceptors cauto [1] , c[2] . Accordingly I choose Σ to be {C1 , . . . , C4 , A1 , A2 }. The map ιAL is constant in time for the four protype conceptors: ιAL (n, Cj ) = cj for all n ∈ T, j = 1, . . . , 4. For the remaining two conceptors, ιAL (n, Ai ) = cauto [i] (n). The stage is now prepared to spell out the definition of an agent’s lifetime ICL (for the case of an agent based on M -dimensional random feature conceptor and discrete time): Definition 13 The intrinsic conceptor logic (ICL) of an agent lifeAL = (T, Σ, ιAL ) is an institution whose components obey the following conditions: (n) (n) 1. The objects (signatures) of Sign are the pairs Σ(n) = ({A1 , . . . , Am }, σ (n) ), (n) (n) where n ∈ T , and σ (n) : Σ → {A1 , . . . , Am } is a bijection. 153 DCA example: The lifetime of this example is T = {1, . . . , 16000}. A (n) (n) (n) (n) signature Σ(n) = ({C1 , . . . , C4 , A1 , A2 }, σ (n) ) at time n ∈ T will later be employed to denote some of the conceptors in the DCA in their adapted versions at time n. These conceptor adaptation versions will thus become identifiable by symbols from Σ(n) . For σ (n) I take the natural projection (n) (n) Cj 7→ Cj , Ai 7→ Ai . (n+k) 2. For every n, n + k ∈ T (where k ≥ 0), φ(n+k,n) : Σ(n+k) → Σ(n) , Ai 7→ (n+k) (n) (n+k) −1 (σ ◦ (σ ) )(Ai ) is a morphism in Sign. There are no other morphisms in Sign besides these. Remark: At first sight this might seem (n+k) (n) unneccessarily complicated. Why not simply require φ(n+k,n) : Ai 7→ Ai ? (n) (n) The reason is that the set of symbols {A1 , . . . Am } of Σ(n) is just that, a (n) (n+k) set of symbols. That over time Ai should correspond to Ai is only visually suggested to us, the mathematicians, by the chosen notation for these symbols, but by no means does it actually follow from that notation. 3. Sen(Σ(n) ) is inductively defined as follows: (n) (n) (a) A1 , . . . , Am and I and 0 are sentences in Sen(Σ(n) ). (n) (n) (n) (b) For k ≥ 0 such that n, n + k ∈ T , for Ai ∈ Σ(n) , δk Ai is in Sen(Σ(n) ). Remark: the δ operators capture the temporal adaptation of (n) conceptors. The symbol Ai will be used to denote a conceptor ai (n) (n) (n) in its adaptation version at time n, and the sentence δk Ai will be made to refer to ai (n + k). (c) If ζ, ξ ∈ Sen(Σ(n) ), then (ζ ∨ ξ), (ζ ∧ ξ), ¬ζ ∈ Sen(Σ(n) ). Remark: unlike in ECL there is no need for a notational distinction between ∧ and AND etc. (d) If ζ ∈ Sen(Σ(n) ), then ϕ(ζ, γ) ∈ Sen(Σ(n) ) for every γ ∈ [0, ∞] (this captures aperture adaptation). (e) If ζ, ξ ∈ Sen(Σ(n) ) and 0 ≤ b ≤ 1, then βb (ζ, ξ) ∈ Sen(Σ(n) ) (this will take care of linear blends bζ + (1 − b)ξ). Remark: Including I and 0 in the sentence syntax is a convenience item. 0 ∧ (n) (n) (n) could be defined in terms of any Ai by 0 = (ϕ(Ai , ∞) ∧ ¬ϕ(Ai , ∞)), ∧ and I by I = ¬0. Likewise, ∨ (or ∧) could be dismissed because it can be expressed in terms of ∧ and ¬ (∨ and ¬, respectively). 4. For a signature morphism φ(n+k,n) : Σ(n+k) → Σ(n) , Sen(φ(n+k,n) ) : Sen(Σ(n+k) ) → Sen(Σ(n) ) is the map defined inductively as follows: (a) Sen(φ(n+k,n) ) : I 7→ I, 0 7→ 0. 154 (n+k) (n) (n+k) (b) Sen(φ(n+k,n) ) : Ai 7→ δk φ(n+k,n) (Ai ). Remark 1: When we use (n) (n) the natural projections σ : Ai 7→ Ai , this rule could be more simply (n+k) (n) (n) written as Sen(φ(n+k,n) ) : Ai 7→ δk Ai . Remark 2: This is the pivotal point in this entire definition, and the point where the difference to customary views on logics comes to the surface most conspicuously. Usually signature morphisms act on sentences by simply re-naming all signature symbols that occur in a sentence. The structure of a sentence remains unaffected, in agreement with the motto “truth is invariant un(n+k) der change of notation”. By contrast, here a signature symbol Ai (n) (n) is replaced by an temporal change operator term δk Ai , reflecting the new motto “meaning changes with time”. The fact that φ(n+k,n) leads (n+k) (n) from Ai to Ai establishes “sameness of identity over time” be(n+k) (n) tween Ai and Ai . Usually one would formally express sameness of identity of some mathematical entity by using the same symbol to name that entity at different time points. Here different symbols are used, and thus another mechanism has to be found in order to establish that an entity named by different symbols at different times remains “the same”. The dotted “identity” lines in Figure 46 are fixed by the signature morphisms φ(n+k,n) , not by using the same symbol over time. Remark 3: At this point it also becomes clear why the signature morphisms φ(n+k,n) : Σ(n+k) → Σ(n) lead backwards in time. A conceptor ai (n + k) in its time-(n + k) version can be expressed in terms of the earlier version ai (n) with the aid of the temporal evolution operator δ, but in general an earlier version ai (n) cannot be expressed in terms of a later ai (n + k). This reflects the fact that, seen as a trajectory of an input-driven dynamical system, an agent life is (typically) irreversible. To put it into everyday language, “the future can be explained from the past, but not vice versa”. (n+k) (c) Sen(φ(n+k,n) ) : δl (n+k) Ai (n) (n+k) 7→ δ(k+l) φ(n+k,n) (Ai ). (d) For ζ, ξ ∈ Sen(Σ(n+k) ), put Sen(φ(n+k,n) ) : (ζ ∨ ξ) (ζ ∧ ξ) ¬ζ ϕ(ζ, γ) βb (ζ, ξ) 7→ 7 → 7→ 7 → 7→ (Sen(φ(n+k,n) )(ζ) ∨ Sen(φ(n+k,n) )(ξ)), (Sen(φ(n+k,n) )(ζ) ∧ Sen(φ(n+k,n) )(ξ)), ¬Sen(φ(n+k,n) )(ζ), ϕ(Sen(φ(n+k,n) )(ζ), γ), βb (Sen(φ(n+k,n) )(ζ), Sen(φ(n+k,n) )(ξ)). 5. For every signature Σ(n) ∈ Sign, Mod(Σ(n) ) is always the same category Z with objects all non-negative M -dimensional vectors z .∧2 . There are no id model morphisms except the identity morphisms z .∧2 → z .∧2 . 155 6. For every morphism φ(n+k,n) ∈ Sign, Mod(φ(n+k,n) ) is the identity morphism of Z. 7. As a preparation for defining the model relationships |=Σ(n) we assign by induction to every sentence χ ∈ Sen(Σ(n) ) an M -dimensional conception weight vector ι(χ) as follows: (a) ι(I) = (1, . . . , 1)0 and ι(0) = (0, . . . , 0)0 . (n) (n) (b) ι(Ai ) = ιAL (n, (σ (n) )−1 Ai ). (n) (n) (n) (c) ι(δk Ai ) = ιAL (n + k, (σ (n) )−1 Ai ). (d) Case χ = (ζ ∨ ξ): ι(χ) = ι(ζ) ∨ ι(ξ) (compare Definition 7). (e) Case χ = (ζ ∧ ξ): ι(χ) = ι(ζ) ∧ ι(ξ). (f ) Case χ = ¬ζ: ι(χ) = ¬ι(ζ). (g) Case χ = ϕ(ζ, γ): ι(χ) = ϕ(ι(ζ), γ) (compare Definition 6). (h) Case χ = βb (ζ, ξ): ι(χ) = b ι(ζ) + (1 − b)ι(ξ). 8. For z .∧2 ∈ Z = Mod(Σ(n) ) and χ ∈ Sen(Σ(n) ), the model relationship is defined by z .∧2 |=Σ(n) χ z iff z .∧2 .∗ (z .∧2 + 1).∧−1 ≤ ι(χ). The satisfaction condition (110) requires that for χ(n+k) ∈ Sen(Σ(n+k) ) and ∈ Mod(Σ(n) ) it holds that .∧2 z .∧2 |=Σ(n) Sen(φ(n+k,n) )(χ(n+k) ) iff Mod(φ(n+k,n) )(z .∧2 ) |=Σ(n+k) χ(n+k) , which is equivalent to z .∧2 |=Σ(n) Sen(φ(n+k,n) )(χ(n+k) ) iff z .∧2 |=Σ(n+k) χ(n+k) (111) because Mod(φ(n+k,n) ) is the identity morphism on Z. This follows directly from the following fact:  Lemma 1 ι Sen(φ(n+k,n) )(χ(n+k) ) = ι(χ(n+k) ), which in turn can be established by an obvious induction on the structure of (n+k) sentences, where the crucial steps are the cases (i) χ(n+k) = Ai and (ii) χ(n+k) = (n+k) (n+k) δl Ai . (n+k) (n) (n+k) (n) In case (i), ι(Sen(φ(n+k,n) )(Ai )) = ι(δk φ(n+k,n) (Ai )) = ι(δk (σ (n) ◦ (n+k) (n+k) (σ (n+k) )−1 )(Ai )) = ιAL (n + k, (σ (n) ))−1 (σ (n) ◦ (σ (n+k) )−1 )(Ai )) = ιAL (n + (n+k) (n+k) (n+k) −1 k, (σ ) (Ai )) = ι(Ai ). 156 (n+k) In case (ii), conclude ι(Sen(φ(n+k,n) )(δl (n) ι(δ(k+l) (σ (n+k) Ai (n) (n+k) )) = ι(δ(k+l) φ(n+k,n) (Ai )) = (n+k) (n+k) ◦(σ ) )(Ai )) = ιAL (n+k+l, (σ (n) ))−1 (σ (n) ◦(σ (n+k) )−1 )(Ai )) (n+k) (n+k) (n+k) + l, (σ (n+k) )−1 (Ai )) = ι(δl Ai ). (n) (n+k) −1 ιAL (n + k An important difference between “traditional” logics and the ICL of an agent AL concerns different intuitions about semantics. Taking first-order logic as an example of a traditional logic, the “meaning” of a first-order sentence χ with signature Σ is the class of all of its models. Whether a set is a model of χ depends on how the symbols from Σ are extensionally interpreted over that set. Firstorder logic by itself does not prescribe how the symbols of a signature have to be interpreted over some domain. In contrast, an ICL is defined with respect to a concrete agent AL, which in turn uniquely fixes how the symbols from an ICL signature Σ(n) must be interpreted – this is the essence of points 7. (a – c) in Definition 13. Logical entailment in an ICL coincides with abstraction of conceptors: Proposition 17 In an ICL, for all ζ, ξ ∈ Sen(Σ(n) ) it holds that ζ |=Σ(n) ξ iff ι(ζ) ≤ ι(ξ). (112) The simple proof is given in Section 5.11. In an agent’s lifetime ICL, for any sentence χ ∈ Sen(Σ(n) ) the concrete interpretation ι(χ) ∈ [0, 1]M can be effectively computed via the rules stated in Nr. 7 in Definition 13, provided one has access to the identifiable conceptors ai (n) in the agent’s life. Since for two vectors a, b ∈ [0, 1]M it can be effectively checked whether a ≤ b, it is decidable whether ι(ζ) ≤ ι(ξ). An ICL is therefore decidable. Seen from a categorical point of view, an ICL is a particularly small-size institution. Since the (only) category in the image of Mod is a set, we can regard the functor Mod as having codomain Setop instead of Catop . Also the category Sign is small, that is, a set. Altogether, an ICL institution nowhere needs proper classes. The ICL definition I gave here is very elementary. It could easily be augmented in various natural ways, for instance by admitting permutations and/or projections of conceptor vector components as model morphisms in Z, or allowing conceptors of different dimensions in the makeup of an agent life. Likewise it is straightforward to spell out definitions for an agent life and its ICL for matrix-based conceptors. In the latter case, the referents of sentences are correlation matrices R, and the defining equation for the model relationship appears as R |=Σ(n) χ iff R(R + I)−1 ≤ ι(χ). In traditional logics and their applications, an important role is played by calculi. A calculus is a set of syntactic transformation rules operating on sentences (and expressions containing free variables) which allows one to derive purely syntactical proofs of logical entailment statements ζ |= ξ. Fundamental properties of 157 = familiar logics, completeness and decidability in particular, are defined in terms of calculi. While it may be possible and mathematically interesting to design syntactical calculi for ICLs, they are not needed because ζ |= ξ is decidable via the semantic equivalent ι(ζ) ≤ ι(ξ). Furthermore, the ICL decision procedure is computationally very effective: only time O(1) is needed (admitting a parallel execution) to determine whether some conception vector is at most as large as another in all components. This may help to explain why humans can so quickly carry out many concept subsumption judgements (“this looks like a cow to me”). 3.19 Final Summary and Outlook Abstracting from all technical detail, here is a summary account of the conceptor approach: From neural dynamics to conceptors. Conceptors capture the shape of a neural state cloud by a positive semi-definite operator. From conceptors to neural dynamics. Inserting a conceptor into a neurodynamical state update loop allows to select and stabilize a previously stored neural activation pattern. Matrix conceptors are useful in machine learning applications and as mathematical tools for analysing patterns emerging in nonlinear neural dynamics. Random feature conceptors are not biologically apriori implausible and can be neurally coded by single neurons. Autoconceptor adaptation dynamics leads to content-addressable neural memories of dynamical patterns and to signal filtering and classification systems. Boolean operations and the abstraction ordering on conceptors establish a bi-directional connection between logic and neural dynamics. From static to dynamic models. Conceptors allow to understand and control dynamical patterns in scenarios that previously have been mostly restricted to static patterns. Specifically this concerns content-addressable memories, morphing, ordering concepts in logically structured abstraction hierarchies, and top-down hypothesis control in hierarchical architectures. The study of conceptors is at an early stage. There are numerous natural directions for next steps in conceptor research: Affine conceptor maps. Conceptors constrain reservoir states by applying a positive semi-definite map. This map is adapted to the “soft-bounded” linear subspace visited by a reservoir when it is driven through a pattern. If the pattern-driven reservoir states do not have zero mean, it seems natural to 158 first subtract the mean before applying the conceptor. If the mean is µ, this would result in an update loop of the form x(n + 1) = µ + C(tanh(...) − µ). While this may be expected to improve control characteristics of pattern re-generation, it is not immediately clear how Boolean operations transfer to such affine conceptors which are characterized by pairs (C, µ). Nonlinear conceptor filters. Even more generally, one might conceive of conceptors which take the form of nonlinear filters, for instance instantiated as feedforward neural networks. Such filters F could be trained on the same objective function as I used for conceptors, namely minimizing E[kz−F (z)k2 ]+ α−2 kF k2 , where kF k is a suitably chosen norm defined for the filter. Like with affine conceptor maps, the pattern specificity of such nonlinear conceptor filters would be greater than for our standard matrix conceptors, but again it is not clear how logical operations would extend to such filters. Basic mathematical properties. From a mathematics viewpoint, there are some elementary questions about conceptors which should be better understood, for instance: • What is the relationship between Boolean operations, aperture adaptation, and linear blending? in particular, can the latter be expressed in terms of the two former? • Given a dimension N , what is the minimial number of “basis” conceptors such that the transitive closure under Boolean operations, aperture adaptation, and/or linear blending is the set of all N -dimensional conceptors? • Are there normal forms for expressions which compose conceptors by Boolean operations, aperture adaptation, and/or linear blending? • Find conceptor analogs of standard structure-building mathematical operations, especially products. These would be needed to design architectures with several conceptor modules (likely of different dimension) where the “soft subspace constraining” of the overall dynamics works on the total architecture state space. Presumably this leads to tensor variants of conceptors. This may turn out to be a challenge because a mathematical theory of “semi positive-definite tensors” seems to be only in its infancy (compare [86]). Neural realization of Boolean operations. How can Boolean operations be implemented in biologically not impossible neural circuits? Complete analysis of autoconceptor adaptation. The analysis of autoconceptor adaptation in Section 3.14.4 is preliminary and incomplete. It only characterizes certain aspects of fixed-point solutions of this adaptation dynamics but remains ignorant about the effects that the combined, nonlinear 159 conceptor-reservoir update dynamics may have when such a fixed-point solution is perturbed. Specifically, this reservoir-conceptor interaction will have to be taken into account in order to understand the dynamics in the center manifold of fixed-point solutions. Applications. The usefulness of conceptors as a practical tool for machine learning and as a modeling tool in the cognitive and computational neurosciences will only be established by a suite of successful applications. 160 4 Documentation of Experiments and Methods In this section I provide details of all simulation experiments reported in Sections 1 and 3. 4.1 General Set-Up, Initial Demonstrations (Section 1 and Section 3.2 - 3.4) A reservoir with N = 100 neurons, plus one input unit and one output unit was created with a random input weight vector W in , a random bias b and preliminary reservoir weights W ∗ , to be run according to the update equations x(n + 1) = tanh(W ∗ x(n) + W in p(n + 1) + b), y(n) = W out x(n). (113) Initially W out was left undefined. The input weights were sampled from a normal distribution N (0, 1) and then rescaled by a factor of 1.5. The bias was likewise sampled from N (0, 1) and then rescaled by 0.2. The reservoir weight matrix W ∗ was first created as a sparse random matrix with an approximate density of 10%, then scaled to obtain a spectral radius (largest absolute eigenvalue) of 1.5. These scalings are typical in the field of reservoir computing [69] for networks to be employed in signal-generation tasks. For each of the four driving signals pj a training time series of length 1500 was generated. The reservoir was driven with these pj (n) in turn, starting each run from a zero initial reservoir state. This resulted in reservoir state responses xj (n). The first 500 steps were discarded in order to exclude data influenced by the arbitrary starting condition, leading to four 100-dimensional reservoir state time series of length L = 1000, which were recorded into four 100 × 1000 state collection matrices X j , where X j (:, n) = xj (n + 500) (j = 1, . . . , 4). Likewise, the corresponding driver signals were recorded into four pattern collection (row) vectors P j of size 1 × 1000. In addition to this, a version X̃ j of X j was built, identical to X j except that it was delayed by one step: X̃ j (:, n) = xj (n + 499). These collections were then concatenated to obtain X = [X 1 |X 2 |X 3 |X 4 ], X̃ = [X̃ 1 |X̃ 2 |X̃ 3 |X̃ 4 ], P = [P 1 |P 2 |P 3 |P 4 ]. The “PC energy” plots in Figure 12 render the singular values of the correlation matrices X j (X j )0 /L. The output weights W out were computed as the regularized Wiener-Hopf solution (also known as ridge regression, or Tychonov regularization) W out = ((XX 0 + %out IN ×N )−1 X P 0 )0 , (114) where the regularizer %out was set to 0.01. Loading: After loading, the reservoir weights W should lead to the approximate equality W xj (n) ≈ W ∗ xj (n) + W in pj (n + 1), across all patterns j, which leads to 161 the objective of minimizing the squared error j (n + 1) = ((tanh−1 (xj (n + 1)) − b) − W xj (n))2 , averaged over all four j and training time points. Writing B for the 100 × (4 ∗ 1000) matrix whose columns are all identical equal to b, this has the ridge regression solution W = ((X̃ X̃ 0 + %W IN ×N )−1 X̃ (tanh−1 (X) − B))0 , (115) where the regularizer %W was set to 0.0001. To assess the accuracy of the weight computations, the training normalized root mean square error (NRMSE) was computed. For the readout weights, the NRMSE between y(n) = W out x(n) and the target P was 0.00068. For the reservoir weights, the average (over reservoir neurons i, times n and patterns j) NRMSE between W (i, :)xj (n) and the target W ∗ (i, :) xj (n) + W in (i) pj (n + 1) was 0.0011. In order to determine the accuracy of fit between the original driving signals pj and the network observation outputs y j (n) = W out C j tanh(W x(n − 1) + b) in the conceptor-constrained autonomous runs, the driver signals and the y j signals were first interpolated with cubic splines (oversampling by a factor of 20). Then a segment length 400 of the oversampled driver (corresponding to 20 timesteps before interpolation) was shifted over the oversampled y j in search of a position of best fit. This is necessary to compensate for the indeterminate phaseshift between the driver data and the network outputs. The NRMSEs given in Figure 12 were calculated from the best-fit phaseshift position, and the optimally phase-shifted version of y j was also used for the plot. 4.2 Aperture Adaptation (Sections 3.8.3 and 3.8.4) Data generation. For the Rössler attractor, training time series were obtained from running simple Euler approximations of the following ODEs: ẋ = −(y + z) ẏ = x + a y ż = b + x z − c z, using parameters a = b = 0.2, c = 8. The evolution of this system was Euler approximated with stepsize 1/200 and the resulting discrete time series was then subsampled by 150. The x and y coordinates were assembled in a 2-dimensional driving sequence, where each of the two channels was shifted/scaled to a range of [0, 1]. For the Lorenz attractor, the ODE ẋ = σ(y − x) ẏ = r x − y − x z ż = x y − b z 162 with σ = 10, r = 28, b = 8/3 was Euler-approximated with stepsize 1/200 and subsequent subsampling by 15. The x and z coordinates were collected in a 2dimensional driving sequence, again each channel normalized to a range of [0, 1]. The Mackey Glass timeseries was obtained from the delay differential equation ẋ(t) = β x(t − τ ) − γ x(t) 1 + x(t − τ )n with β = 0.2, n = 10, τ = 17, γ = 0.1, a customary setting when this attractor is used in neural network demonstrations. An Euler approximation with stepsize 1/10 was used. To obtain a 2-dim timeseries that could be fed to the reservoir through the same two input channels as the other attractor data, pairs x(t), x(t−τ ) were combined into 2-dim vectors. Again, these two signals were normalized to the [0, 1] range. The Hénon attractor is governed by the iterated map x(n + 1) = y(n) + 1 − a x(n) y(n + 1) = b x(n), where I used a = 1.4, b = 0.3. The two components were filed into a 2-dim timeseries (x(n), y(n))0 with no further subsampling, and again normalization to a range of [0, 1] in each component. Reservoir setup. A 500-unit reservoir RNN was created with a normal distributed, 10%-sparse weight matrix W ∗ scaled to a spectral radius of 0.6. The bias vector b and input weights W in (sized 400 × 2 for two input channels) were sampled from standard normal distribution and then scaled by 0.4 and 1.2, respectively. These scaling parameters were found by a (very coarse) manual optimization of the performance of the pattern storing process. The network size was chosen large enough to warrant a robust trainability of the four chaotic patterns. Repeated executions of the experiment with different randomly initialized weights (not documented) showed no significant differences. Pattern storing. The W ∗ reservoir was driven, in turn, by 2500 timesteps of each of the four chaotic timeseries. The first 500 steps were discarded to account for initial reservoir state washout, and the remaining 4 × 2000 reservoir states were collected in a 500 × 8000 matrix X. From this, the new reservoir weights W were computed as in (115), with a regularizer %W = 0.0001. The readout weights were computed as in (114) with regularizer %out = 0.01. The average NRMSEs obtained for the reservoir and readout weights were 0.0082 and 0.013, respectively. Computing conceptors. From each of the four n = 2000 step reservoir state sequences X recorded in the storing procedure, obtained from driving the reservoir with one of the four chaotic signals, a preliminary correlation matrix R̃ = XX 0 /2000 and its SVD U S̃U 0 = R̃ were computed. This correlation matrix was then used to obtain a conceptor associated with the respective chaotic signal, using an aperture α = 1. From these unit-aperture conceptors, versions with differing α were obtained through aperture adaptation per (16). 163 In passing I note that the overall stability and parameter robustness of this simulation can be much improved if small singular values in S̃ (for instance, with values smaller than 1e-06) are zeroed, obtaining a clipped S, from which a “cleanedup” correlation matrix R = U SU 0 would be computed. This would lead to a range of well-working apertures spanning three orders of magnitude (not shown). I did not do this in the reported simulation in order to illustrate the effects of too large apertures; these effects would be partly suppressed when the spectrum of R is clipped. Pattern retrieval and plotting. The loaded network was run using the conceptorconstrained update rule x(n+1) = C tanh(W x(n)+W in p(n+1)+b) with various C = ϕ(C# , γ#,i ) (# = R, L, MG, H, i = 1, . . . , 5) for 800 steps each time, of which the first 100 were discarded to account for initial state washout. The delay embedding plots in Figure 18 were generated from the remaining 700 steps. Embedding delays of 2, 2, 3, 1 respectively were used for plotting the four attractors. For each of the four 6-panel blocks in Figure 18, the five aperture adaptation factors γ#,i were determined in the following way. First, by visual inspection, the middle γ#,3 was determined to fall in the trough center of the attenuation plot of Fig. 19 A. Then the remaining γ#,1 , γ#,2 , γ#,4 , γ#,5 were set in a way that (i) the entire γ sequence was a geometrical progression, and (ii) that the plot obtained from the first γ#,1 was visually strongly corrupted. 4.3 Memory Management, Demo 1 (Section 3.11.2) Data: The patterns were either sines sampled at integer fractions of 2π or random periodic patterns, always scaled to a range of [−0.9, 0.9]. Period lengths were picked randomly between 3 and 15. The length of pattern signals used for loading was L = 100, with an additional washout of the same length. Parameters: Reservoir size N = 100, W ∗ sparse with density approximately 10%, weights sampled from a standard normal distribution, rescaled to a spectral radius of 1.5. The input weights W in were non-sparse, sampled from a standard normal distribution, scaled by 1.5. The bias b was sampled from a standard normal distribution and scaled by 0.25. Ridge regression coefficients 0.01 and 0.001 for computing the increments to W out and D, respectively. Data from 100 reservoir update steps were used for computing conceptors and regressions. Computing test errors: The conceptors C j obtained during the loading procedure were used with an aperture α = 1000 by running the reservoir via x(n + 1) = C j tanh(W ∗ x(n) + D x(n) + b), starting from random initial states. After a washout period of 200 steps, the network outputs y j (n) were recorded for 50 steps. A 20-step portion of the original driver pattern was interpolated (supersampling rate 10) and shifted over a likewise interpolation version of these outputs. The best matching shift position was used for plotting and NRMSE computation. Such shift-search for a good fit is necessary because the autonomous runs are not phase-synchronized with the original drivers. 164 Non-incremental loading: For the standard non-incremental loading experiment that served as comparison and yielded the results marked by dots in the left panel of Figure 22, the same parameters (scalings, aperture) were used as for the incremental loading procedure. 4.4 Memory Management, Demo 2 (Section 3.12.1) The set-up is the same as for the integer-periodic basic demo. Scalings: spectral radius of W ∗ : 1.5; W in : 1.5; b: 1.0. Aperture: 10. Ridge regression coefficients 0.02 both for increments to W out and D. Data collection runlengths in loading: 500 (plus 200 washout). Test runlength: 800 (plus 200 washout). Test output was compared to 20-step sample from original driver after interpolation and shift as described for the integer-periodic basic demo. 4.5 Memory Management, Close-Up Inspection (Section 3.12.2) Integer-periodic patterns, period length 6 (condition IP6): Scalings of reservoirs: spectral radius of W ∗ : 1.5; W in : 1.5; b: 0.5. Aperture: 1000. Ridge regression coefficients 0.01 for W out and 0.001 for D. Data collection runlengths in loading: 100 (plus 100 washout) per pattern. Pattern recall tests were started from random network states and recorded for 50 steps after a washout of 200. Recall NRMSEs were computed as described in Section 4.3. Irrational-period patterns from a parametric family (condition PF): Scalings of reservoirs: spectral radius of W ∗ : 1.5; W in : 1.5; b: 1.0. Aperture: 10. Ridge regression coefficients 0.02 both for W out and D. Data collection runlengths in loading: 100 (plus 100 washout) per pattern. Pattern recall tests were started from random network states and recorded for 80 steps after a washout of 200. Integer-periodic patterns, period 3 (condition IP3): Same as in condition IP6. 4.6 Memory Management, Arbitrary Patterns (Section 3.12.3) Spectral radius of W ∗ : 1.5; W in : 1.5; b: 0.25. Apertures of “raw” conceptors C m (before “rectangularization”) were set to 10 for integer-periodic patterns and to 1.2 for the quasiperiodic patterns. Ridge regression coefficients: 0.001 for increments to W out and 0.005 for increments to D. Data collection runlengths in loading: 500 (plus 100 washout). Test runlength: 200 (plus 100 washout), compared to 20-step sample from original driver as described in Section 4.3. — For the standard nonincremental loading procedure that served as comparison (dots in Figure 26, left panel), manually optimized conceptor apertures of 1000 — 10 were used for the integer-periodic — quasi-periodic patterns. 165 4.7 Content-Addressable Memory (Section 3.14.3) Network setup. Reservoir network matrices W were sampled sparsely (10% nonzero weights) from a normal distribution, then scaled to a spectral radius of 1.5 in all experiments of this section. Reservoir size was N = 100 for all period-4 experiments and the unrelated patterns experiment, and N = 200 for all experiments that used mixtures-of-sines patterns. For all experiments in the section, input weights W in were randomly sampled from the standard normal distribution and rescaled by a factor of 1.5. The bias vector b was likewise sampled from the standard normal distribution and rescaled by 0.5. These scaling parameters had been determined by a coarse manual search for a well-working configuration when this suite experiments was set up. The experiments are remarkably insensitive to these parameters. Storing patterns. The storage procedure was set up identically for all experiments in this section. The reservoir was driven by the k loading patterns in turn for l = 50 steps (period-4 and unrelated patterns) or l = 500 steps (mix-of-sines) time steps, plus a preceding 100 step initial washout. The observed network states x(n) were concatenated into a N × kl sized state collection matrix X, and the onestep earlier states x(n−1) into a matrix X̃ of same size. The driver pattern signals were concatenated into a kl sized row vector P . The readout weights W out were then obtained by ridge regression via W out = ((XX 0 + 0.01 I)−1 XP 0 )0 , and D by D = ((X̃ X̃ 0 + 0.001 I)−1 X̃(W in P )0 )0 . Quality measurements. After the cueing, and at the end of the recall period (or at the ends of the three interim intervals for some of the experiments), the current conceptor C was tested for retrieval accuracy as follows. Starting from the current network state x(n), the reservoir network was run for 550 steps, constrained by C. The first 50 steps served as washout and were discarded. The states x from the last 500 steps were transformed to patterns by applying W out , yielding a 500-step pattern reconstruction. This was interpolated with cubic splines and then sampled at double resolution, leading to a 999-step pattern reconstruction ỹ. A 20-step template sample of the original pattern was similarly interpolatedresampled and then passed over ỹ, detecting the best-fitting position where the the NRMSE between the target template and ỹ was minimal (this shift-search accomodated for unknown phase shifts between the target template and ỹ). This minimal NRMSE was returned as measurement result. Irrational-period sines. This simulation was done exactly as the one before, using twelve irrational-period sines as reference patterns. 4.8 The Japanese Vowels Classification (Section 3.13) Network setup. In each of the 50 trials, the weights in a fully connected, 10 × 10 reservoir weight matrix, a 12-dimensional input weight vector, a 10-dimensional bias vector, and a 10-dimensional start state were first sampled from a normal distribution, then rescaled to a spectral radius of 1.2 for W , and by factors of 0.2, 166 1, 1 for W in , b, xstart respectively. Numerical determination of best aperture. To determine γi+ , the quantities kϕ(C̃i+ , 2g )k2fro were computed for g = 0, 1, . . . , 8. These values were interpolated on a 0.01 raster with cubic splines, the support point gmax of the maximum of the interpolation curve was detected, returning γi+ = 2gmax . Linear classifier training. The linear classifier that serves as a baseline comparison was designed in essentially the same way as the Echo State Networks based classifiers which in [57] yielded zero test misclassifications (when combining 1,000 such classifiers made from 4-unit networks) and 2 test misclassifications (when a single such classifier was based on a 1,000 unit reservoir), respectively. Thus, linear classifiers based on reservoir responses outperform all other reported methods on this benchmark and therefore provide a substantive baseline information. In detail, the linear classifier was learnt from 270 training data pairs of the form (z, yteacher ), where the z were the same 88-dimensional vectors used for constructing conceptors, and the yteacher were 9-dimensional, binary speaker indicator vectors with a “1” in the position of the speaker of z. The classifier consists in a 9 × 88 sized weight matrix V , and the cost function was the quadratic error kV z − yteacher k2 . The classifier weight matrix V which minimized this cost function on average over all training samples was computed by linear regression with Tychonov regularization, also known as ridge regression [108]. The Tychonov parameter which determines the degree of regularization was determined by a grid search over a 5-fold cross-validation on the training data. Across the 50 trials it was found to vary quite widely in a range between 0.0001 and 0.25; in a separate auxiliary investigation it was also found that the effect of variation of the regularizer within this range was very small and the training of the linear classifier can therefore be considered robust. In testing, V was used to determine classification decisions by computing ytest = V ztest and opting for the index of the largest entry in ytest as the speaker. 4.9 Conceptor Dynamics Based on RFC Conceptors (Section 3.15) Network setup. In both experiments reported in this section, the same reservoir made from N = 100 units was used. F and G were full matrices with entries first sampled from the standard normal distribution. Then they were both scaled by an identical factor a such that the product a2 G F attained a spectral radius of 1.4. The input weight vector W in was sampled from the standard normal distribution and then scaled by 1.2. The bias b was likewise sampled from the normal distribution and then scaled by 0.2. These values were determined by coarse manual search, where the main guiding criterion was recall accuracy. The settings were rather robust in the first experiment which used stored cj . The spectral radius could be individually varied from 0.6 to 1.45, the input weight scaling from 0.3 to 1.5, the bias scaling from 0.1 to 167 0.4, and the aperture from 3 to 8.5, while always keeping the final recall NRMSEs for all four patterns below 0.1. Furthermore, much larger combined variations of these scalings were also possible (not documented). In the second experiment with content-addressed recall, the functional parameter range was much narrower. Individual parameter variation beyond ±5% was disruptive. Specifically, I observed a close inverse coupling between spectral radius and aperture: if one of the two was raised, the other had to be lowered. Loading procedure. The loading procedure is described in some detail in the report text. The mean NRMSEs on training data was 0.00081 for recomputing G, 0.0011 for D, and 0.0029 for W out . The mean absolute size of matrix elements in G was 0.021, about a third of the mean absolute size of elements of G∗ . Computing NRMSEs. The NRMSE comparison between the re-generated patterns at the end of the c adaptation and the original drivers was done in the same way as reported on earlier occasions (Section 4.7), that is, invoking spline interpolation of the comparison patterns and optimal phase-alignment. 4.10 Hierarchical Classification and Filtering Architecture (Section 3.16) Module setup. The three modules are identical copies of each other. The reservoir had N = 100 units and the feature space had a dimension of M = 500. The input weight matrix W in was sampled from the standard normal distribution and rescaled by a factor of 1.2. The reservoir-featurespace projection and backprojection matrices F, G∗ (sized N × M ) were first sampled from the standard normal distribution, then linearly rescaled by a common factor such that the N × N matrix G∗ F 0 (which functionally corresponds to an internal reservoir weight matrix) had a spectral radius of 1.4. The bias b was likewise sampled from the standard normal distribution and then scaled by 0.2. A regularization procedure was then applied to G∗ to give G as follows. The preliminary module was driven per z(n + 1) = F 0 r(n), r(n + 1) = tanh(G∗ z(n + 1) + W in u(n) + b), with an i.i.d. input signal u(n) sampled uniformly from [−1, 1], for 1600 steps (after discarding an initial washout). The values obtained for z(n + 1) were collected as columns in a M × 1600 matrix Z. The final G was then computed by a ridge regression with a regularizer a = 0.1 by G = ((ZZ 0 + aI)−1 Z (G∗ Z)0 )0 . In words, G should behave as the initially sampled G∗ in a randomly driven module, but do so with minimized weight sizes. This regularization was found to be important for a stable working of the final architecture. Training. The input simulation weights D (size 1 × M ) and W out (size 1 × N ) were trained by driving a single module with the four target patterns, as follows. 168 The module was driven with clean p1 , . . . , p4 in turn, with auto-adaptation of conception weights c activated: z(n + 1) = c(n) .∗ F 0 r(n), r(n + 1) = tanh(G z(n + 1) + W in pj (n) + b),  c(n + 1) = c(n) + λc (z(n + 1) − c(n) .∗ z(n + 1)) .∗ z(n + 1) − α−2 c(n) , where the c adaptation rate was set to λc = 0.5, and an aperture α = 8 was used. After discarding initial washouts in each of the four driving conditions (long enough for c(n) to stabilize), 400 reservoir state vectors r(n + 1), 400 z vectors z(n) and 400 input values pj (n) were collected for j = 1, . . . , 4, and collected column-wise in matrices R (size N × 1600), Z (size M × 1600) and Q (size 1 × 1600), respectively. In addition, the 400-step submatrices Z j of Z containing the z-responses of the module when driven with pj were registered separately. The output weights were then computed by ridge regression on the objective to recover pj (n) from r(n + 1) by 0 W out = (RR0 + aI)−1 RQ0 , using a regularizer a = 0.1. In a similar way, the input simulation weights were obtained as 0 D = (ZZ 0 + aI)−1 ZQ0 with a regularizer a = 0.1 again. The training NRMSEs for W out and D were 0.0018 and 0.0042, respectively. The M × 4 prototype matrix P was computed as follows. First, a preliminary version P ∗ was constructed whose j-the column vector was the mean of the element-wise squared column vectors in Z j . The four column vectors of P ∗ were then normalized such that the norm of each of them was the mean of the norms of columns in P ∗ . This gave P . This normalization is important for the performance of the architecture, because without it the optimization criterion (104) would systematically lead to smaller values for those γ j that are associated with smaller-norm columns in P . Baseline linear filter. The transversal filter that served as a baseline was a row vector w of size 2600. It was computed to minimize the loss function 4 1 X E[pj (n + 1) − (pj (n − 2600 + 1), . . . , pj (n))2 ] + a2 kwk2 , L(w) = 4 j=1 where pj (n) were clean versions of the four patterns. 400 timesteps per pattern were used for training, and a was set to 1.0. The setting of a was very robust. Changing a in either direction by factors of 100 changed the resulting test NRMSEs at levels below the plotting accuracy in Figure 43. Parameter settings in testing. The adaptation rate λγ was set to 0.002 for the classification simulation and to 0.004 for the morph-tracking case study. The other 169 global control parameters were identical in both simulations: trust smoothing rate σ = 0.99, decisiveness d[12] = d[23] = 8, drift d = 0.01, caut [l] adaptation rate λ = 0.5 (compare Equation (90); I used the same adaptation rate λi ≡ λ for all of the 500 feature units). Computing and plotting running NRMSE estimates. For the NRMSE plots in the fifth rows in Figures 43 and 44, a running estimate of the NRMSE between the module outputs y[l] and the clean input patterns p (unknown to the system) was computed as follows. A running estimate var p(n) of the variance of the clean pattern was maintained like it was done for var y[l] (n) in (98) and (99), using an exponential smoothing rate of σ = 0.95. Then the running NRMSE was computed by another exponential smoothing per  nrmse y[l] (n + 1) = σ nrmse y[l] (n) + (1 − σ) (p(n + 1) − y[l] (n + 1))2 var p(n + 1) 1/2 . The running NRMSE for the baseline transversal filter were obtained in a similar fashion. 170 5 5.1 Proofs and Algorithms Proof of Proposition 1 (Section 3.4) Claim 1. We first re-write the minimization quantity, using R = E[xx0 ]: E[kx − Cxk2 ] + α−2 kCk2fro = = E[tr (x0 (I − C 0 )(I − C)x)] + α−2 kCk2fro = tr ((I − C 0 )(I − C)R + α−2 C 0 C) = tr (R − C 0 R − CR + C 0 C(R + α−2 I)) X = e0i (R − C 0 R − CR + C 0 C(R + α−2 I))ei . i=1,...,N This quantity is quadratic in the parameters of C and non-negative. Because tr C 0 C(R + α−2 I) = tr C(R + α−2 I)C 0 and R + α−2 I is positive definite, tr C(R + α−2 I)C 0 is positive definite in the N 2 -dimensional space of C elements. Therefore E[kx − Cxk2 ] + α−2 kCk2fro has a unique minimum in C space. To locate it we compute the derivative of the i-th component of this sum with respect to the entry C(k, l) = Ckl : ∂ e0 (R − C 0 R − CR + C 0 C(R + α−2 I))ei = ∂Ckl i X = −2 Rkl + ∂/∂Ckl Cij Cja Aai j,a=1,...,N = −2 Rkl + X ∂/∂Ckl Ckj Cka Aai a=1,...,N = −2 Rkl + X (Cka Aal + Cki Ali ) a=1,...,N = −2 Rkl + (CA)kl + N Cki Ail . where we used the abbreviation A = R + α−2 I, observing in the last line that A = A0 . Summing over i yields ∂ E[kx − Cxk2 ] + α−2 kCk2fro = −2 N Rkl + 2N (CA)kl , ∂Ckl which in matrix form is ∂ E[kx − Cxk2 ] + α−2 kCk2fro = −2 N R + 2N C(R + α−2 I), ∂C where we re-inserted the expression for A. Setting this to zero yields the claim 1. stated in the proposition. The subclaim that R(R + α−2 I)−1 = (R + α−2 I)−1 R can be easily seen when R is written by its SVD R = U ΣU 0 : U ΣU 0 (U ΣU 0 + α−2 I)−1 = U ΣU 0 (U (Σ + α−2 I)U 0 )−1 = U ΣU 0 U (Σ+α−2 I)−1 U 0 = U Σ(Σ+α−2 I)−1 U 0 = U (Σ+α−2 I)−1 ΣU 0 = ... = (R + α−2 I)−1 R. This also proves claim 2. Claims 3.–5. can be derived from the first claim by elementary arguments. 171 5.2 Proof of Proposition 6 (Section 3.9.3) −1 −1 −1 0 Cδ−1 can be written as U Sδ−1 U 0 , where the diagonal of Sδ−1 is (s−1 1 , . . . , sl , δ , . . . , δ ) . −1 −1 0 −1 Putting e = δ −1 and Se := (s−1 1 , . . . , sl , e, . . . , e) , and similarly Te = (t1 , . . . , tm , −1 −1 0 −1 e, . . . , e) , we can express the limit limδ→0 (Cδ + Bδ − I) equivalently as lime→∞ (U Se U 0 + V Te V 0 − I)−1 . Note that U Se U 0 + V Te V 0 − I is invertible for sufficiently large e. Let U>l be the N × (N − l) submatrix of U made from the last N − l columns of U (spanning the null space of C), and let V>m be N × (N − m) submatrix of V made from the last N − m columns of V . The N × N matrix U>l (U>l )0 + V>m (V>m )0 is positive semidefinite. Let W ΣW 0 be its SVD, with singular values in Σ in descending order. Noting that C † = −1 −1 0 0 0 0 † −1 U diag(s−1 1 , . . . , sl , 0, . . . , 0) U , and B = V diag(t1 , . . . , tm , 0, . . . , 0) V , we can rewrite lim (U Se U 0 + V Te V 0 − I)−1 lim Cδ ∧ Bδ = e→∞ δ→0 lim (C † + B † + e W ΣW 0 − I)−1   = W lim (W 0 C † W + W 0 B † W + eΣ − I)−1 W 0 . = e→∞ e→∞ (116) If Σ is invertible, clearly (116) evaluates to the zero matrix. We proceed to consider the case of non-invertible Σ = diag(σ1 , . . . , σk , 0, . . . , 0), where 0 ≤ k < N. We derive two auxiliary claims. Let W>k be the N × (N − k) submatrix of W made from the last N − k columns. Claim 1: the (N − k) × (N − k) matrix A = (W>k )0 (C † + B † − I) W>k is invertible. We rewrite A = (W>k )0 C † W>k + (W>k )0 B † W>k − I(N −k)×(N −k) , (117) and analyse (W>k )0 C † W>k . It holds that (W>k )0 U>l = 0(N −k)×(N −l) , because  σ1   W   ..  . σk 0   0 W =  ... U>l (U>l )0 + V>m (V>m )0 0  σ1 =⇒     ..  . σk 0 ..     . = W 0 U>l (U>l )0 W + W 0 V>m (V>m )0 W = = (W>k )0 U>l (U>l )0 W>k + (W>k )0 V>m (V>m )0 W>k 0(N −k)×(N −l) . (118) 0 =⇒ =⇒ 0(N −k)×(N −k) (W>k )0 U>l 172 Let U≤l be the N × l submatrix of U made of the first l columns. Because of (118) it follows that  (W>k )0 C † W>k s−1 1    = (W>k )0 U     = (W>k )0 U≤l   ... s−1 l s−1 1 0 .. . 0  ... s−1 l    0  U W>k    (U≤l )0 W>k (119) The rows of the (N −k)×l sized matrix (W>k )0 U≤l are orthonormal, which also follows from (118). The Cauchy interlacing theorem (stated in Section 3.14.4 in another context) then implies that all singular values of (W>k )0 C † W>k are greater −1 or equal to min{s−1 1 , . . . , sl }. Since all si are smaller or equal to 1, all singular values of (W>k )0 C † W>k are greater or equal to 1. The singular values of the matrix (W>k )0 C † W>k − 1/2 I(N −k)×(N −k) are therefore greater or equal to 1/2. Specifically, (W>k )0 C † W>k − 1/2 I(N −k)×(N −k) is positive definite. By a similar argument, (W>k )0 B † W>k − 1/2 I(N −k)×(N −k) is positive definite. The matrix A from Claim 1 is therefore revealed as the sum of two positive definite matrices, and hence is invertible. Claim 2: If M is a symmetric N × N matrix, and the right lower principal submatrix M>k>k = M (k + 1 : N, k + 1 : N ) is invertible, and Σ = diag(σ1 , . . . , σk , 0, . . . , 0) with all σi > 0, then   0 0 −1 lim (M + eΣ) = 0 M −1 . (120) e→∞ >k>k We exploit the following elementary block representation of the inverse of a symmetric matrix (e.g. [8], fact 2.17.3):     X Y −1 V −1 −V −1 Y Z −1 = , Y0 Z −Z −1 Y 0 V −1 Z −1 Y 0 V −1 Y Z −1 + Z −1 where Z is assumed to be invertible and V = (X − Y Z −1 Y 0 ) is assumed to be invertible. Block-structuring M + eΣ analogously to this representation, where M>k>k is identified with Z, then easily leads to the claim (120). Applying Claims 1 and 2 to the limit expression lime→∞ (W 0 C † W + W 0 B † W + eΣ − I)−1 in (116), where the matrix M in Claim 2 is identified with W 0 C † W + W 0 B † W − I and the matrix Z from Claim 2 is identified with the matrix A = (W>k )0 (C † + B † − I) W>k from Claim 1, yields   0 0 0 † 0 † −1 −1 lim (W C W + W B W + eΣ − I) = 0 (W>k )0 (C † + B † − I) W>k e→∞ 173 which, combined with (116), leads to lim Cδ ∧ Bδ = W>k (W>k )0 (C † + B † − I) W>k δ→0 −1 (W>k )0 . (121) W>k is an N × (N − k) size matrix whose columns are orthonormal. Its range is R(W>k ) = = = = N (W ΣW 0 ) = N (U>l (U>l )0 + V>m (V>m )0 ) N ((U>l (U>l )0 ) ∩ N (V>m (V>m )0 ) = N ((U>l )0 ) ∩ N ((V>m )0 ) R(U>l )⊥ ∩ R(V>m )⊥ = N (C)⊥ ∩ N (B)⊥ R(C 0 ) ∩ R(B 0 ) = R(C) ∩ R(B), (122) that is, W>k is a matrix whose columns form an orthonormal basis of R(C)∩R(B). Let BR(C)∩R(B) be any matrix whose columns form an orthonormal basis of R(C) ∩ R(B). Then there exists a unique orthonormal matrix T of size (N − k) × (N − k) such that BR(C)∩R(B) = W>k T . It holds that −1 W>k (W>k )0 (C † + B † − I) W>k (W>k )0 = −1 (W>k T )0 = W>k T (W>k T )0 (C † + B † − I) W>k T −1 0 = BR(C)∩R(B) B0R(C)∩R(B) (C † + B † − I) BR(C)∩R(B) BR(C)∩R(B) ,(123) which gives the final form of the claim in the proposition. For showing equivalence of (33) with (123), I exploit a fact known in matrix theory ([8], Fact 6.4.16): for two real matrices X, Y of sizes n × m, m × l the following two condition are equivalent: (i) (X Y )† = Y † X † , and (ii) R(X 0 X Y ) ⊆ R(Y ) and R(Y Y 0 X 0 ) ⊆ R(X 0 ). Observing that PR(C)∩R(B) = BR(C)∩R(B) B0R(C)∩R(B) and that B†R(C)∩R(B) = B0R(C)∩R(B) , setting X = BR(C)∩R(B) and Y = B0R(C)∩R(B) (C † + B † − I)PR(C)∩R(B) in (33) yields −1 PR(C)∩R(B) (C † + B † − I) PR(C)∩R(B) = † B0R(C)∩R(B) (C † + B † − I) PR(C)∩R(B) B0R(C)∩R(B) , where condition (ii) from the abovementioned fact is easily verified. In a second,  † entirely analog step one can pull apart B0R(C)∩R(B) (C † + B † − I) PR(C)∩R(B) into † BR(C)∩R(B) B0R(C)∩R(B) (C † + B † − I) BR(C)∩R(B) . Algorithm for Computing BR(C)∩R(B) . Re-using ideas from this proof, a basis matrix BR(C)∩R(B) can be computed as follows: 1. Compute the SVDs C = U diag(s1 , . . . , sl , 0, . . . , 0)U 0 and B = V diag(t1 , . . . , tm , 0, . . . , 0)V 0 . 2. Let U>l be the submatrix of U made from the last N − l columns in U , and similarly let V>m consist of the last N − m columns in V . 174 3. Compute the SVD U>l (U>l )0 + V>m (V>m )0 = W ΣW 0 , where Σ = diag(σ1 , . . . , σk , 0, . . . , 0). 4. Let W>k be the submatrix of W consisting of the last N − k columns of W . Then BR(C)∩R(B) = W>k . 5.3 Proof of Proposition 7 (Section 3.9.3) . By Definition 4, Proposition 6, and Equation (7), −1 −1 C ∨ B = ¬ (¬ C ∧ ¬ B) = I − lim (¬C)−1 + (¬B) − I δ δ δ↓0  −1 = I − lim (I − C (δ) )−1 + (I − B (δ) )−1 − I δ↓0  −1 (δ) (δ) (δ) (δ) = I − lim (I − RC (RC + I)−1 )−1 + (I − RB (RB + I)−1 − I . δ↓0 It is easy to check that (I−A(A+I)−1 )−1 = I+A holds for any positive semidefinite matrix A. Therefore,  −1 (δ) (δ) . C ∨ B = I − lim RC + RB + I δ↓0 Furthermore, for positive semidefinite A, B it generally holds that I − (A + B + I)−1 = (A + B)(A + B + I)−1 , and hence (δ) (δ) (δ) (δ) C ∨ B = lim(RC + RB ) (RC + RB + I)−1 . δ↓0 5.4 Proof of Proposition 8 (Section 3.9.3) (δ) (δ) Using (32), Proposition 7 and that fact A(δ) = RA (RA + I)−1 holds for any (δ) conceptor A (which entails I − A(δ) = (RA + I)−1 ), we derive the claim as follows: −1 C ∧ B = lim Cδ−1 + Bδ−1 − I δ↓0 −1 −1 = lim (¬¬C)−1 δ + (¬¬B)δ − I δ↓0 −1 = lim (¬(¬C)(δ) )−1 + (¬(¬B)(δ) )−1 − I δ↓0 −1 = lim (I − (¬C)(δ) )−1 + (I − (¬B)(δ) )−1 − I δ↓0  −1 (δ) (δ) = lim (R¬C + I) + (R¬B ) + I) − I δ↓0 (δ) (δ) = lim(R¬C + R¬B + I)−1 δ↓0 (δ) (δ) = I − lim(I − (R¬C + R¬B + I)−1 ) δ↓0 = ¬(¬C ∨ ¬B). 175 5.5 Proof of Proposition 9 (Section 3.9.4) Claims 1. – 3. are elementary. Claim 4a: R(C ∧ B) = R(C) ∩ R(B). By definition we have C ∧ B = BR(C)∩R(B) B0R(C)∩R(B) (C † + B † − I)BR(C)∩R(B) −1 B0R(C)∩R(B) . Since B0R(C)∩R(B) (C † + B † − I)BR(C)∩R(B) is invertible and R(B0R(C)∩R(B) ) =   dim(R(C)∩R(B)) 0 † † −1 0 R , we have R (BR(C)∩R(B) (C + B − I)BR(C)∩R(B) ) BR(C)∩R(B) = Rdim(R(C)∩R(B)) . From this it follows that R(C ∧ B) = R(BR(C)∩R(B) ) = R(C) ∩ R(B). Claim 5a: I(C ∧ B) = I(C) ∩ I(B). We have, by definition, C ∧ B = BR(C)∩R(B) B0R(C)∩R(B) (C † + B † − I)BR(C)∩R(B) −1 B0R(C)∩R(B) . For shorter notation put B = BR(C)∩R(B) and X = B0R(C)∩R(B) (C † +B † −I)BR(C)∩R(B) . Note (from proof of Proposition 6) that X is invertible. We characterize the unit eigenvectors of C ∧ B. It holds that BX −1 B0 x = x if and only if BXB0 x = x. We need to show that the conjunction Cx = x and Bx = x is equivalent to (C ∧ B) x = BX −1 B x = x. First assume that Cx = x and Bx = x. This implies x ∈ R(C) ∩ R(B) and C † x = x and B † x = x, and hence PR(C)∩R(B) (C † + B † − I)PR(C)∩R(B) x = x. But PR(C)∩R(B) (C † + B † − I)PR(C)∩R(B) = BXB0 , thus (C ∧ B) x = x. Now assume conversely that not Cx = x or not Bx = x. Case 1: x ∈ / R(C) ∩ R(B). Then PR(C)∩R(B) (C † + B † − I)PR(C)∩R(B) x 6= x and hence BXB0 x 6= x, which implies (C ∧ B) x 6= x. Case 2: x ∈ R(C) ∩ R(B). We first show an auxiliary claim: k(C † + B † − I) xk > kxk. Let C0 = C † − CC † , B0 = B † − BB † . C0 and B0 are positive semidefinite because the nonzero singular values of C † , B † are greater or equal to 1. Furthermore, CC † x = BB † x = x. Thus, (C † + B † ) x = 2Ix + C0 x + B0 x, i.e. (C † + B † − I) x = Ix + C0 x + B0 x. From not Cx = x or not Bx = x it follows that C0 x 6= 0 or B0 x 6= 0. We infer C0 x 6= 0 or B0 x 6= 0 =⇒ x0 C0 x > 0 or x0 B0 x > 0 =⇒ x0 (C0 + B0 )x > 0 =⇒ x0 (C0 + B0 )2 x > 0. This implies kIx+C0 x+B0 xk2 = kxk2 +2x0 (C0 +B0 )x+x0 (C0 +B0 )2 x > kxk2 , or equivalently, k(C † + B † − I) xk > kxk, the auxiliary claim. Since PR(C)∩R(B) preserves vector norm on R(C) ∩ R(B) and R(C † + B † − I)PR(C)∩R(B) ⊆ R(C)∩R(B), it follows that kPR(C)∩R(B) (C † +B † −I)PR(C)∩R(B) xk > kxk, hence (C ∧ B) x 6= x. Altogether we have that the conjunction Cx = x and Bx = x is equivalent to (C ∧ B) x = x, which is equivalent to the claim. 176 Claim 6a: N (C ∧ B) = N (C) + N (B). This follows from 4a by N (C ∧ B) = (R(C ∧ B))⊥ = (R(C) ∩ R(B))⊥ = (N (C)⊥ ∩ N (B)⊥ )⊥ = N (C) + N (B). Claims 4b, 5b, 6b: The second statements in 4., 5., 6. follow from the first statements and 3., exploiting de Morgan’s rule. Claim 7 follows from Equation (19). Claim 8: Let A = A ∧ C. Then claim 4. implies R(A) ∩ R(C) = R(A). By Proposition 6 we can write A ∧ C = BR(A) B0R(A) (C † + B † − I) BR(A) −1 B0R(A) . Let A = U SU 0 be the SVD of A, and assume A has rank k ≤ N , that is, exactly the first k singular values in S are nonzero. Let Uk be the N × k matrix consisting of the first k columns of U . It holds that Uk = BR(A) . We obtain S = U 0 AU = −1 0 = U 0 Uk Uk0 (A† + C † − I) Uk Uk U  −1 = Ik Uk0 (A† + C † − I) Uk Ik0 , (124) where Ik is the N × k matrix consisting of the first k columns of I. −1Let Sk be the 0 † † k × k upper left submatrix of S. Then Sk = Uk (A + C − I) Uk and Sk−1 = Uk0 (A† + C † − I) Uk = Uk0 A† Uk + Uk0 (C † − I) Uk = Sk−1 + Uk0 (C † − I) Uk , hence Uk0 (C † −I) Uk = 0k×k or equivalently, Uk0 C † Uk = Ik×k . This implies R(A) ⊆ I(C). Conversely, assume R(A) ⊆ I(C). Going through the above line of arguments −1 0 in reverse order establishes again S = Ik Uk0 (A† + C † − I) Uk Ik which implies A = BR(A) B0R(A) (C † + B † − I) BR(A) −1 B0R(A) . R(A) ⊆ I(C) implies R(A) ⊆ R(C), which leads to A = BR(A)∩R(C) B0R(A)∩R(C) (C † + B † − I) BR(A)∩R(C) = A ∧ C. −1 B0R(A)∩R(C) The dual A = A ∨ C ⇔ I(A)⊥ ⊆ N (C) is easily obtained from A = A ∧ C ⇔ R(A) ⊆ I(C) by applying de Morgan’s rules and claim 3.. Claims 9 – 13 follow from Equation (19). For Claim 14. use 11. and 4. and 6. to first establish that R(H ∧ G) = I(H) ∩ I(G) and N (H ∧ G) = (I(H) ∩ I(G))⊥ , from which 14. follows. Claim 15 is analog. 177 5.6 Proof of Proposition 10 (Section 3.9.5) Claim 1: ¬ϕ(C, γ) = ϕ(¬C, γ −1 ). Notation: All of the matrices C, ¬C, ϕ(C, γ), ¬ϕ(C, γ), ϕ(¬C, γ −1 ) are positive semidefinite and have SVDs with identical principal component matrix U . For any matrix X among these, let U S X U 0 be its X SVD. We write sX i for the ith singular value in S . We have to show that −1 ¬ϕ(C,γ) ϕ(¬C,γ ) si = si . In the derivations below, we use various facts from Proposition 9 and Equation (19) without explicit reference. Case 0 < γ < ∞, 0 < sC i < 1: ¬ϕ(C,γ) si sC 1 − sC i i = C C C −2 si + γ (1 − si ) (1 − si ) + γ 2 sC i ¬C si ϕ(¬C,γ −1 ) = ¬C = si . ¬C −1 −2 si + (γ ) (1 − si ) = 1− C ¬C Case 0 < γ < ∞, sC = 1 we have i = 0: Using si = 0 ⇔ si ¬ϕ(C,γ) si ϕ(C,γ) = 1 − si ϕ(¬C,γ −1 ) = 1 = si . Case 0 < γ < ∞, sC i = 1: dual of previous case. Case γ = 0: We show ¬ϕ(C, γ) = ϕ(¬C, γ −1 ) directly. ¬ϕ(C, γ) = ¬ϕ(C, 0) = I − ϕ(C, 0) = I − PI(C) = PI(C)⊥ = PN (¬C)⊥ = ϕ(¬C, ∞) = ϕ(¬C, γ −1 ). Case γ = ∞: the dual analog. Claim 2: ϕ(C, γ) ∨ ϕ(B, γ) = ϕ(C ∨ B, γ). Case 0 < γ < ∞: Using concepts and notation from Proposition 7, it is easy to check that any conceptor A can be written as (δ) (δ) A = lim RA (RA + I)−1 , (125) δ↓0 and its aperture adapted versions as (δ) (δ) ϕ(A, γ) = lim RA (RA + γ −2 I)−1 . (126) δ↓0 Using Proposition 7 and (125) we thus have (δ) (δ) (δ) (δ) C ∨ B = lim (RC + RB ) (RC + RB + I)−1 δ↓0 (δ) (δ) = lim RC∨B (RC∨B + I)−1 . (127) (128) δ↓0 Furthermore, again by Proposition 7 and by (126), (δ) (δ) (δ) (δ) ϕ(C, γ) ∨ ϕ(B, γ) = lim (Rϕ(C,γ) + Rϕ(B,γ) ) (Rϕ(C,γ) + Rϕ(B,γ) + I)−1 δ↓0 178 (129) and (δ) (δ) ϕ(C ∨ B, γ) = lim (RC∨B )(RC∨B + γ −2 I)−1 . (130) δ↓0 Using (17), it follows for any conceptor A that (δ/(δ+γ −2 (1−δ))) (δ) Rϕ(A,γ) = γ 2 RA . (131) Applying this to (129) and observing that limδ↓0 δ = 0 = limδ↓0 δ/(δ + γ −2 (1 − δ)) yields (δ) (δ) (δ) (δ) ϕ(C, γ) ∨ ϕ(B, γ) = lim (γ 2 RC + γ 2 RB ) (γ 2 RC + γ 2 RB + I)−1 δ↓0 (δ) (δ) (δ) (δ) = lim (RC + RB ) (RC + RB + γ −2 I)−1 . δ↓0 (132) We now exploit the following auxiliary fact which can be checked by elementary means: If (X (δ) )δ is a δ-indexed family of positive semidefinite matrices whose eigenvectors are identical for different δ, and similarly the members of the familiy (Y (δ) )δ have identical eigenvectors, and if the limits limδ↓0 X (δ) (X (δ) +I)−1 , limδ↓0 Y (δ) (Y (δ) + I)−1 exist and are equal, then the limits limδ↓0 X (δ) (X (δ) + γ −2 I)−1 , limδ↓0 Y (δ) (Y (δ) + γ −2 I)−1 exist and are equal, too. Putting X (δ) = (δ) (δ) (δ) RC + RB and Y (δ) = RC∨B , combining (127), (128), (130) and (132) with this auxiliary fact yields ϕ(C ∨ B, γ) = ϕ(C, γ) ∨ ϕ(B, γ). Case γ = 0: Using various findings from Proposition 9 we have ϕ(C, 0) ∨ ϕ(B, 0) = PI(C) ∨ PI(B) = PI(PI(C) ) + I(PI(B) ) = PI(C)+I(B) = PI(C∨B) = ϕ(C ∨ B, 0). Case γ = ∞: ϕ(C, ∞) ∨ ϕ(B, ∞) = PR(C) ∨ PR(B) = PI(PR(C) ) + I(PR(B) ) = PR(C) + R(B) = PR(C∨B) = ϕ(C ∨ B, ∞). Claim 3: ϕ(C, γ) ∧ ϕ(B, γ) = ϕ(C ∧ B, γ): follows from Claims 1. and 2. with de Morgan’s law. p Claim 4: ϕ(C, γ) ∨ ϕ(C, β) = ϕ(C, γ 2 + β 2 ): Case 0 < γ, β < ∞: Using Proposition 9 and Equations (131), (127), (126), 179 we obtain (δ) (δ) (δ) (δ) ϕ(C, γ) ∨ ϕ(C, β) = lim (Rϕ(C,γ) + Rϕ(C,β) ) (Rϕ(C,γ) + Rϕ(C,β) + I)−1 δ↓0 (δ/(δ+γ −2 (1−δ))) = lim (γ 2 RC δ↓0 (δ/(δ+γ −2 (1−δ))) · (γ 2 RC (∗) (δ/(δ+β −2 (1−δ))) + β 2 RC (δ) )· (δ/(δ+β −2 (1−δ))) + β 2 RC + I)−1 (δ) = lim (γ 2 + β 2 )RC ((γ 2 + β 2 )RC + I)−1 δ↓0 (δ) (δ) = lim RC (RC + (γ 2 + β 2 )−1 I)−1 δ↓0 p = ϕ(C, γ 2 + β 2 ), (δ/(δ+γ −2 (1−δ))) where in step (*) we exploit the fact that the singular values of RC corresponding to eigenvectors whose eigenvalues in C are less than unity are identical (δ) to the singular values of RC at the analog positions. Case γ = 0, 0 < β < ∞: Using Proposition 7, facts from Proposition 9, and Equation (125), we obtain ϕ(C, 0) ∨ ϕ(C, β) = PI(C) ∨ ϕ(C, β) (δ) (δ) (δ) (δ) = lim (RPI(C) + Rϕ(C,β) ) (RPI(C) + Rϕ(C,β) + I)−1 δ↓0 (∗) (δ/(2−δ)) (δ/(2−δ)) (δ) (δ/) (Rϕ(C,β) + I)−1 = lim Rϕ(C,β) (Rϕ(C,β) + I)−1 δ↓0 δ↓0 p = ϕ(C, β) = ϕ(C, 02 + β 2 ), = lim Rϕ(C,β) where step (*) is obtained by observing I(C) = I(ϕ(C, β)) and applying the (δ) definition of RA given in the statement of Proposition 7. Case γ = ∞, 0 < β < ∞: the dual analog to the previous case: ϕ(C, ∞) ∨ ϕ(C, β) = PR(C) ∨ ϕ(C, β) (δ) (δ) (δ) (δ) = lim (RPR(C) + Rϕ(C,β) ) (RPR(C) + Rϕ(C,β) + I)−1 δ↓0 (∗) (δ) (δ/) = lim RPR(C) (RPR(C) + I)−1 δ↓0 = PR(C) = ϕ(C, ∞) = ϕ(C, p ∞2 + β 2 ), where in step (*) I have omitted obvious intermediate calculations. The cases 0 < γ < ∞, β ∈ {0, ∞} are symmetric to cases already treated, and the cases γ, β ∈ {0, ∞} are obvious. Claim 5: ϕ(C, γ) ∧ ϕ(C, β) = ϕ(C, (γ −2 + β −2 )−2 ): an easy exercise of applying de Morgan’s rule in conjunction with Claims 1. and 4. 180 5.7 Proof of Proposition 11 (Section 3.9.6) 1. De Morgan’s rules: By Definition 4 and Proposition 8. 2. Associativity: From Equations (127) and (128) it follows that for any conceptors B, C it holds that (δ) (δ) (δ) limδ↓0 RB∨C = limδ↓0 RB + RC . Employing this fact and using Proposition 7 yields associativity of OR. Applying de Morgan’s law then transfers associativity to AND. 3. Commutativity and 4. double negation are clear. 5. Neutrality: Neutrality of I: Observing that R(C) ∩ R(I) = R(C) and I † = I, starting from the definition of ∨ we obtain C ∨ I = (PR(C) C † PR(C) )† = (PR(C † ) C † PR(C † ) )† (by Prop. 9 Nr. 2) = (C † )† = C. Neutrality of 0 can be obtained from neutrality of I via de Morgan’s rules. 6. Globality: C ∧ 0 = 0 follows immediately from the Definition of ∧ given in 4, observing that PR(C)∩R(0) = 0. The dual C ∨ I = I is obtained by applying de Morgan’s rule on C ∧ 0 = 0. 7. and 8. weighted absorptions follows from Proposition 10 items 4. and 5. 5.8 Proof of Proposition 12 (Section 3.9.6) Let ≤ denote the well-known Löwner ordering on the set of real N × N matrices defined by A ≤ B if B − A is positive semidefinite. Note that a matrix C is a conceptor matrix if and only if 0 ≤ C ≤ I. I first show the following Lemma 2 Let A ≤ B. Then A† ≥ PR(A) B † PR(A) . Proof of Lemma. A† and B † can be written as A† = lim PR(A) (A + δI)−1 PR(A) and B † = lim PR(B) (B + δI)−1 PR(B) . δ→0 δ→0 (133) From A ≤ B it follows that R(A) ⊆ R(B), that is, PR(A) PR(B) = PR(A) , which in turn yields PR(A) B † PR(A) = lim PR(A) (B + δI)−1 PR(A) . (134) δ→0 A ≤ B entails A + δI ≤ B + δI, which is equivalent to (A + δI)−1 ≥ (B + δI)−1 (see [8], fact 8.21.11), which implies PR(A) (B + δI)−1 PR(A) ≤ PR(A) (A + δI)−1 PR(A) , see Proposition 8.1.2 (xii) in [8]. Taking the limits (133) and (134) leads to the claim of the lemma (see fact 8.10.1 in [8]). 181 Proof of Claim 1. Let A, B be conceptor matrices of size N × N . According to Proposition 14 (which is proven independently of the results stated in Proposition 12), it holds that A ≤ A ∨ B, which combined with the lemma above establishes PR(A) (A† − (A ∨ B)† )PR(A) ≥ 0, from which it follows that I + PR(A) (A† − (A ∨ B)† )PR(A) is positive semidefinite with all singular values greater or equal to one. Therefore, PR(A) (I + A† − (A ∨ B)† )PR(A) is positive semidefinite with all nonzero singular values greater or equal  † to one. Hence C = PR(A) I + A† − (A ∨ B)† PR(A) is a conceptor matrix. It is furthermore obvious that R(C) = R(A). From A ≤ A ∨ B it follows that R(A) ⊆ R(A ∨ B), which together with R(C) = R(A) leads to R(A ∨ B) ∩ R(C) = R(A). Exploiting this fact, starting from the definition of AND in Def. 4, we conclude  † (A ∨ B) ∧ C = PR(A∨B)∩R(C) (A ∨ B)† + C † − I PR(A∨B)∩R(C)  † = PR(A) (A ∨ B)† + C † − I PR(A)   † = PR(A) (A ∨ B)† + PR(A) I + A† − (A ∨ B)† PR(A) − I PR(A) = (PR(A) A† PR(A) )† = A. Proof of Claim 2. This claim is the Boolean dual to claim 1 and can be straightforwardly derived by transformation from claim 1, using de Morgan’s rules and observing that R(¬A) = I(A)⊥ (see Prop. 9 item 3), and that ¬A = I − A. 5.9 Proof of Proposition 13 (Section 3.10) Claim 1: 0 ≤ A is equivalent to A being positive semidefinite, and for a positive semidefinite matrix A, the condition A ≤ I is equivalent to all singular values of A being at most one. Both together yield the claim. Claim 2: Follows from claim 1. Claim 3: A ≤ B iff −A ≥ −B iff I − A ≥ I − B, which is the same as ¬A ≥ ¬B. Claim 4: We first show an auxiliary, general fact: Lemma 3 Let X be positive semidefinite, and P a projector matrix. Then (P(PXP + I)−1 P)† = PXP + P. Proof of Lemma. Let U = R(P) be the projection space of P. It is clear that PXP + I : U → U and PXP + I : U ⊥ → U ⊥ , hence PXP + I is a bijection on U . Also P is a bijection on U . We now call upon the following well-known property of the pseudoinverse (see [8], fact 6.4.16): For matrices K, L of compatible sizes it holds that (KL)† = L† K † if and only if R(K 0 KL) ⊆ R(L) and R(LL0 K) ⊆ R(K 0 ). 182 Observing that P and PXP + I are bijections on U = R(P), a twofold application of the mentioned fact yields (P(PXP + I)−1 P)† = P† (PXP + I)P† = PXP + P which completes the proof of the lemma. Now let A, B ∈ CN and B ≤ A. By Lemma 2, B † − PR(B) A† PR(B) is positive semidefinite, hence B † − PR(B) A† PR(B) + I is positive definite with singular values greater or equal to one, hence invertible. The singular values of (B † − PR(B) A† PR(B) + I)−1 are thus at most one, hence C = PR(B) (B † − PR(B) A† PR(B) + I)−1 PR(B) is a conceptor matrix. Obviously R(C) = R(B). Using these findings and Lemma 3 we can now infer † A ∧ C = PR(A)∩R(C) (A† + C † − I) PR(A)∩R(C)  † † † † † −1 = PR(B) (A + PR(B) (B − PR(B) A PR(B) + I) PR(B) − I) PR(B)  † = PR(B) A† + PR(B) (B † − PR(B) A† PR(B) ) PR(B) PR(B) = B. Claim 5: This claim is the Boolean dual to the previous claim. It follows by a straightforward transformation applying de Morgan’s rules and observing that R(¬B) = I(B)⊥ (see Prop. 9 item 3), and that ¬A = I − A. Claim 6: Let A ∧ C = B. Using the notation and claim from Prop. 6 rewrite −1 A ∧ C = limδ→0 (Cδ−1 + A−1 δ − I) . Similarly, obviously we can also rewrite A = limδ→0 Aδ . Since Cδ−1 ≥ I, conclude −1 Cδ−1 + A−1 δ − I ≥ Aδ −1 ⇐⇒ (Cδ−1 + A−1 ≤ Aδ δ − I) −1 −1 =⇒ lim(Cδ + Aδ − I)−1 ≤ lim Aδ δ→0 δ→0 ⇐⇒ A ∧ C ≤ A, where use is made of the fact that taking limits preserves ≤ (see [8] fact 8.10.1). Claim 7: Using the result from the previous claim, infer A ∨ C = B =⇒ ¬A ∧ ¬C = ¬B =⇒ ¬A p≥ ¬B =⇒ A ≤ B. Claim 8: Let γ = 1 + β 2 ≥ 1, where β ≥ 0. By Proposition 10 4. we get ϕ(A, γ) = ϕ(A, 1) ∨ ϕ(A, β) = A ∨ ϕ(A, β), hence A ≤ ϕ(A, γ). The dual version is obtained from this result by using Proposition 5: let γ ≤ 1, hence γ −1 ≥ 1. Then ϕ(A, γ) ≤ ϕ(ϕ(A, γ), γ −1 ) = A. Claim 9: If γ = 0, then from Proposition 3 it is clear that ϕ(A, 0) is the projector matrix on I(A) and ϕ(B, 0) is the projector matrix on I(B). From A ≤ B and the fact that A and B do not have singular values exceeding 1 it is clear that I(A) ⊆ I(B), thus ϕ(A, 0) ≤ ϕ(B, 0). If γ = ∞, proceed in an analog way and use Proposition 3 to conclude that ϕ(A, ∞), ϕ(B, ∞) are the projectors on R(A), R(B) and apply that A ≤ B implies R(A) ⊆ R(B). It remains to treat the case 0 < γ < ∞. Assume A ≤ B, that is, there exists a positive semidefinite matrix D such that A + D = B. Clearly D cannot have 183 singular values exceeding one, so D is a conceptor matrix. For (small) δ > 0, let A(δ) = (1 − δ)A. Then A(δ) can be written as A(δ) = R(δ) (R(δ) + I)−1 for a positive semidefinite R(δ) , and it holds that A = lim A(δ) , δ→0 and furthermore 0 A(δ) ≤ A(δ ) ≤ A for δ ≥ δ 0 . Similarly, let D(δ) = (1 − δ)D, with D(δ) = Q(δ) (Q(δ) + I)−1 , and observe again D = lim D(δ) δ→0 0 and D(δ) ≤ D(δ ) ≤ D for δ ≥ δ 0 . Finally, define B (δ) = (1 − δ)B, where B (δ) = P (δ) (P (δ) + I)−1 . Then B = lim B (δ) δ→0 0 and B (δ) ≤ B (δ ) ≤ B for δ ≥ δ 0 and B (δ) = A(δ) + D(δ) . Because of B (δ) = A(δ) + D(δ) we have R(δ) (R(δ) + I)−1 ≤ P (δ) (P (δ) + I)−1 . (135) We next state a lemma which is of interest in its own right too. Lemma 4 For correlation matrices R, P of same size it holds that R(R + I)−1 ≤ P (P + I)−1 iff R ≤ P. (136) Proof of Lemma. Assume R(R + I)−1 ≤ P (P + I)−1 . By claim 4. of this proposition, there is a conceptor matrix C such that P (P + I)−1 = R(R + I)−1 ∨ C. Since P (P + I)−1 < I, C has no unit singular values and thus can be written as S(S + I)−1 , where S is a correlation matrix. Therefore, P (P + I)−1 = R(R + I)−1 ∨ S(S + I)−1 = (R + S)(R + S + I)−1 , hence P = R + S, that is, R ≤ P. Next assume R ≤ P , that is, P = R + S for a correlation matrix S. This implies P (P + I)−1 = (R + S)(R + S + I)−1 = R(R + I)−1 ∨ S(S + I)−1 . By claim 6. of this proposition, R(R + I)−1 ≤ P (P + I)−1 follows. This concludes the proof of the lemma. Combining this lemma with (135) and the obvious fact that R(δ) ≤ P (δ) if and only if γ 2 R(δ) ≤ γ 2 P (δ) yields γ 2 R(δ) (γ 2 R(δ) + I)−1 ≤ γ 2 P (δ) (γ 2 P (δ) + I)−1 . (137) Another requisite auxiliary fact is contained in the next Lemma 5 Let 0 < γ < ∞. If A = U SU 0 = limδ→0 R(δ) (R(δ) + I)−1 and for all δ, R(δ) has a SVD R(δ) = U Σ(δ) U 0 , then ϕ(A, γ) = limδ→0 γ 2 R(δ) (γ 2 R(δ) + I)−1 . 184 Proof of Lemma. Since all R(δ) (and hence, all R(δ) (R(δ) +I)−1 and γ 2 R(δ) (γ 2 R(δ) + I)−1 ) have the same eigenvectors as A, it suffices to show the convergence claim on (δ) the level of individual singular values of the concerned matrices. Let s, sγ , σ (δ) , s(δ) , sγ denote a singular value of A, ϕ(A, γ), R(δ) , R(δ) (R(δ) + I)−1 , γ 2 R(δ) (γ 2 R(δ) + I)−1 , respectively (all these versions referring to the same eigenvector in U ). For convenience I restate from Proposition 3 that ( s/(s + γ −2 (1 − s)) for 0 < s < 1, sγ = 0 for s = 0, 1 for s = 1. (δ) It holds that s(δ) = σ (δ) /(σ (δ) + 1) and limδ→0 s(δ) = s, and similarly sγ (δ) γ 2 σ (δ) /(γ 2 σ (δ) + 1). It needs to be shown that limδ→0 sγ = sγ . Case s = 0: = s = 0 =⇒ lim s(δ) = 0 =⇒ lim σ (δ) = 0 δ→0 =⇒ δ→0 lim s(δ) γ δ→0 = 0. Case s = 1: s = 1 =⇒ lim s(δ) = 1 =⇒ lim σ (δ) = ∞ δ→0 =⇒ δ→0 lim s(δ) γ δ→0 = 1. Case 0 < s < 1: s = lim s(δ) =⇒ s = lim σ (δ) /(σ (δ) + 1) =⇒ lim σ (δ) = s/(1 − s) δ→0 δ→0 δ→0 2 =⇒ lim s(δ) γ = δ→0 γ s/(1 − s) = s/(s + γ −2 (1 − s)). − s) + 1 γ 2 s/(1 This concludes the proof of the lemma. After these preparations, we can finalize the proof of claim 9. as follows. From Lemma 5 we know that ϕ(A, γ) = lim γ 2 R(δ) (γ 2 R(δ) + I)−1 δ→0 and ϕ(B, γ) = lim γ 2 P (δ) (γ 2 P (δ) + I)−1 . δ→0 From (137) and the fact that ≤ is preserved under limits we obtain ϕ(A, γ) ≤ ϕ(B, γ). 185 5.10 Proof of Proposition 15 (Section 3.14.4) We use the following notation for matrix-vector transforms. We sort the entries of an N × N matrix M into an N 2 -dimensional vector vec M row-wise (!). That is, vec M (µ) = M (dµ/N e, mod1 (µ, N )), where the ceiling dxe of a real number x is the smallest integer greater or equal to x, and mod1 (µ, N ) is the modulus function except for arguments of the form (lk, k), where we replace the standard value mod(lm, m) = 0 by mod1 (lm, m) = m. Conversely, M (i, j) = vec M ((i − 1)N + j). The Jacobian JC can thus be written as a N 2 ×N 2 matrix JC (µ, ν) = ∂ vec Ċ(µ)/∂ vec C(ν). The natural parametrization of matrices C by their matrix elements does not lend itself easily to an eigenvalue analysis. Assuming that a reference solution C0 = U SU 0 is fixed, any N × N matrix C is uniquely represented by a parameter matrix P through C = C(P ) = U (S + P ) U 0 , with C(P ) = C0 if and only if P = 0. Conversely, any parameter matrix P yields a unique C(P ). Now we consider the Jacobian JP (µ, ν) = ∂ vec ṖC (µ)/∂ vec PC (ν). By using that (i) Ṗ = U 0 ĊU , (ii) vec (X 0 Y X) = (X ⊗ X)0 vec Y for square matrices X, Y , and (iii) ∂ Aẋ/∂ Ax = A(∂ ẋ/∂ x)A−1 for invertible A, (iv) (U ⊗ U )−1 = (U ⊗ U )0 , one obtains that JP = (U ⊗ U )0 JC (U ⊗ U ) and hence JP and JC have the same eigenvalues. Using C0 = U SU 0 and Ċ = (I − C)CDC 0 − α−2 C and the fact that diagonal entries in S of index greater than k are zero, yields ∂ ṗlm ∂ pij = e0l (Iij U 0 DU S + SUk0 DU Iji P =0 −Iij SUk0 DU S − SIij U 0 DU S − S 2 Uk0 DU Iji − α−2 Iij ) em ,(138) where el is the l-th unit vector and Iij = ei e0j . Depending on how l, m, i, j relate to k and to each other, calculating (138) leads to numerous case distinctions. Each of the cases concerns entries in a specific subarea of JP . These subareas are depicted in Fig. 49, which shows JP in an instance with N = 5, k = 3. I will demonstrate in detail only two of these cases (subareas A and B in Fig. 49) and summarize the results of the others (calculations are mechanical). The case A concerns all entries JP (µ, ν) with µ < ν, ν ≤ kN, mod1 (ν, N ) ≤ k. Translating indices µ, ν back to indices l, m, i, j via JP (µ, ν) = ∂ vec ṖC (µ) / ∂ vec PC (ν) = ∂ ṗ(dµ/N e,mod1 (µ,N )) / ∂ p(dν/N e,mod1 (ν,N )) = ∂ ṗlm / ∂pij yields conditions (i) i ≤ k (from i = dν/N e and ν ≤ kN ), (ii) j ≤ k (from j = mod1 (ν, N ) ≤ k) and (iii.a) l < i or (iii.b) l = i ∧ m < j (from µ < ν). I first treat the subcase (i), (ii), (iii.a). Since l 6= i one has e0l Iij = 0 and eqn. (138) reduces to the terms starting with S, leading to 186 n! K A C B D m! E F I J G H L Figure 49: Main case distinction areas for computing values in the matrix JP . An instance with N = 5, k = 3 is shown. Areas are denoted by A, ..., L; same color = same area. JP has size N 2 × N 2 . Its structure is largely organized by a kN × kN dimensional and a (N −k)N ×(N −k)N submatrix on the diagonal (areas ABEFK and HIJL, respectively). Column/row indices are denoted by µ, ν. Area specifications: A: µ < ν, ν ≤ kN, mod1 (ν, N ) ≤ k. B: µ < ν, ν ≤ kN, mod1 (ν, N ) > k. C: ν > kN, µ ≤ kN, mod1 (ν, N ) ≤ k. D: ν > kN, µ ≤ kN, mod1 (ν, N ) > k. E: µ > ν, µ ≤ kN, mod1 (ν, N ) ≤ k. F: µ > ν, µ ≤ kN, mod1 (ν, N ) > k. G: µ > kN, ν ≤ kN. H: ν > kN, ν < µ. I: µ > kN, µ < ν, mod1 (ν, N ) ≤ k. J: µ > kN, µ < ν, mod1 (ν, N ) > k. K: µ = ν ≤ kN. L: µ = ν > kN. ∂ ṗlm ∂ pij = e0l (SUk0 DU Iji − SIij U 0 DU S − S 2 Uk0 DU Iji ) em P =0 = sl u0l Duj δim − sl e0l Iij U 0 DU Sem − s2l u0l Duj δim = sl u0l Duj δim − s2l u0l Duj δim ( 0, if i 6= m (subcase A1) 0, if i = m, j = 6 l (A2) = −2 α , if i = m, j = l (A3), where ul is the l-th column in U and δim = 1 if and only if i = m (else 0) is the Kronecker delta. The value α−2 noted for subcase A3 is obtained through (sl − s2l )u0l Dul = (sl − s2l )d˜l = α−2 . Note that since l = i ≤ k in subcase A3 it holds that sl > 1/2. Next, in the subcase (i), (ii), (iii.b) one has 187 ∂ ṗlm ∂ pij = u0j Dum sm + sl u0l Duj δim − sj u0j Dum sm P =0 −sl u0j Dum sm − s2l u0l Duj δim − α−2 e0j em = (sl − s2l )u0l Duj δim = 0, (A4) (since u0j Dum = 0 and j 6= m) (139) because assuming i 6= m or j 6= l each null the last expression, and i = m ∧ j = l is impossible because condition (iii.b) would imply m = j contrary to (iii.b). The case B concerns all entries JP (µ, ν) with µ < ν, ν ≤ kN, mod1 (ν, N ) > k. Like in case A above, this yields conditions on the P-matrix indices: (i) i ≤ k, (ii) j > k, (iii.a) l < i or (iii.b) l = i ∧ m < j. Again we first treat the subcase (i), (ii), (iii.a). Since l 6= i one has e0l Iij = 0 and eqn. (138) reduces to the terms starting with S, leading to ∂ ṗlm ∂ pij = e0l (SUk0 DU Iji − SIij U 0 DU S − S 2 Uk0 DU Iji ) em P =0 = sl u0l Duj δim − sl e0l Iij U 0 DU Sem − s2l u0l Duj δim = sl u0l Duj δim − s2l u0l Duj δim  0, if i 6= m (B1) = (sl − s2l )u0l Duj if i = m (B2). where ul is the l-th column in U and δim = 1 if and only if i = m (else 0) is the Kronecker delta. Note that since l < i ≤ k it holds that sl > 1/2. In the subcase (i), (ii), (iii.b) from (138) one obtains ∂ ṗlm ∂ pij = u0j Dum sm + sl u0l Duj δim − sj u0j Dum sm P =0 −sl u0j Dum sm − s2l u0l Duj δim − α−2 e0j em = sm (1 − sl )u0j Dum + (sl − s2l )u0l Duj δim  if i 6= m and m ≤ k (B3)  sm (1 − sl )u0j Dum 0 if i 6= m and m > k (B4) =  s (1 − s )u0 Du + (s − s2 )u0 Du if i = m (B5), m l j m l j l l where in the step from the first to the second line one exploits j > k, hence sj = 0; and m < j, hence e0j em = 0. Note that since l = i ≤ k it holds that sl > 0; that m > k implies sm = 0 and that m = i ≤ k implies sm > 0. Most of the other cases C – L listed in Fig. 49 divide into subcases like A and B. The calculations are similar to the ones above and involve no new ideas. Table 1 collects all findings. It only shows subcases for nonzero entries of JP . Fig. 50 depicts the locations of these nonzero areas. 188 Subcase Index range Cell value A3 l = j ≤ k; i = m ≤ k; α−2 B2 l<i=m≤k<j (sl − s2l ) u0l Duj B3 l = i ≤ k < j; m ≤ j; m 6= i sm (1 − sl )u0j Dum B5 l = i ≤ k < j; m ≤ j; m = i sl (1 − sl )u0j Dul + (sl − s2l )u0l Duj C1 l = j ≤ k; i = m > k α−2 D1 l ≤ k; i, j > k; i = m (sl − s2l ) u0l Duj E1 i=m<l=j≤k α−2 F1 i=m<l≤k<j (sl − s2l ) u0l Duj J1 i = l > k; m ≤ k < j sm u0j Dum K1 i=j=l=m≤k α−2 (1 − 2sl )/(1 − sl ) K2 i = l; j = m > k; l 6= m −α−2 K3 i = l; j = m ≤ k; l 6= m −α−2 sl /(1 − sm ) L1 i = l > k; m = j > k −α−2 Table 1: Values in nonzero areas of the Jacobian JP . The eigenvalues of JP are now readily obtained. First observe that the eigenvalues of a matrix with block structure ! K L , 0 M where K and M are square, are the eigenvalues collected from the principal submatrices K and M . In JP we therefore only need to consider the leading kN × kN and the trailing (N − k)N × (N − k)N submatrices; call them K and M . M is upper triangular, its eigenvalues are therefore its diagonal values. We thus can collect from M (N − k)k times eigenvalues 0 and (N − k)2 times eigenvalues −α−2 . By simultaneous permutations of rows and columns (which leave eigenvalues unchanged) in K we can bring it to the form Kperm shown in Fig. 50B. A block structure argument as before informs us that the eigenvalues of Kperm fall into three groups. There are k(N − k) eigenvalues −α−2 (corresponding to the lower right diagonal submatrix of Kperm , denoted as area K2), k eigenvalues α−2 (1 − 2sl )/(1 − sl ), where l = 1, . . . , k earned from the k leading diagonal elements of Kperm (stemming from the K1 entries in JP ), plus there are the eigenvalues of k(k − 1)/2 twodimensional submatrices, each of which is of the form 189 B5 K1 K3 B3 D1 B2 C1 A3 E1 K1 K3 A3 E1 F1 K2 K2 B L1 J1 J1 A C L1 Figure 50: A. Nonzero areas in the Jacobian matrix JP . An instance with N = 5, k = 3 is shown. Areas denotations correspond to Table 1. Same color = same area. Values: areas A3, C1, E1: α−2 ; B2, D1, F1: (sl − s2l ) u0l Duj ; B3: sm (1−sl )u0j Dum ; B5: sl (1−sl )u0j Dul +(sl −s2l )u0l Duj ; J1: sm u0j Dum ; K1: α−2 (1− 2sl )/(1 − sl ); K2, L1: −α−2 ; K3: −α−2 sl /(1 − sm ). B. The left upper principal submatrix re-arranged by simultaneous row/column permutations. C. One of the N ×N submatrices Cr from the diagonal of the (N −k)N ×(N −k)N right bottom submatrix of JP . For explanations see text. Kl,m = −α−2 sl /(1 − sm ) 1 1 sm /(1 − sl ) ! , where l = 1, . . . , k; m < l. By solving the characteristic polynomial of Kl,m its eigenvalues are obtained as −2 λ1,2 =  sm α  sl + ± 2 sm − 1 sl − 1 s sl sm − sm − 1 sl − 1 2  + 4 . (140) Summarizing, the eigenvalues of JP are constituted by the following multiset: 1. k(N − k) instances of 0, 2. N (N − k) instances of −α−2 , 3. k eigenvalues α−2 (1 − 2sl )/(1 − sl ), where l = 1, . . . , k, 4. k(k − 1) eigenvalues which come in pairs of the form given in Eqn. (140). 190 5.11 Proof of Proposition 17 (Section 3.18) ζ |=Σ(n) ξ iff ∀z .∧2 : z .∧2 |=Σ(n) ζ → z .∧2 |=Σ(n) ξ iff ∀z .∧2 : z .∧2 .∗ (z .∧2 + 1)−1 ≤ ι(ζ) → z .∧2 .∗ (z .∧2 + 1)−1 ≤ ι(ξ) iff ι(ζ) ≤ ι(ξ), where the last step rests on the fact that all vector components of ζ, ξ are at most 1 and that the set of vectors of the form z .∧2 .∗ (z .∧2 +1)−1 is the set of nonnegative vectors with components less than 1. 191 References [1] L. F. Abbott. Theoretical neuroscience rising. Neuron, 60(November 6):489– 495, 2008. [2] D.H. Ackley, G.E. Hinton, and T.J. Sejnowski. A learning algorithm for Boltzmann machines. Cognitive Science, 9:147–169, 1985. [3] D. J. Amit, H. Gutfreund, and H. Sompolinsky. Spin-glass models of neural networks. Phys. Rev. A, 32:1007–1018, 1985. [4] J. R. Anderson, D. Bothell, M. D. Byrne, S. Douglass, C. Lebiere, and Y . Qin. An integrated theory of the mind. Psychological Review, 111(4):1036– 1060, 2004. [5] L. Appeltant, M. C. Soriano, G. Van der Sande, J. Danckaert, S. Massar, J. Dambre, B. Schrauwen, C. R. Mirasso, and I. Fischer. Information processing using a single dynamical node as complex system. Nature Communications, 2(468), 2011. DOI: 10.1038/ncomms1476. [6] A. Babloyantz and C. Lourenço. Computation with chaos: A paradigm for cortical activity. Proceedings of the National Academy of Sciences of the USA, 91:9027–9031, 1994. [7] S. Bader, P. Hitzler, and S. Hölldobler. Connectionist model generation: A first-order approach. Neurocomputing, 71(13):2420–2432, 2008. [8] D. S. Bernstein. Matrix Mathematics, 2nd Edition. Princeton Univ. Press, 2009. [9] R. V. Borges, A. Garcez, and L. C. Lamb. Learning and representing temporal knowledge in recurrent networks. IEEE Trans. on Neural Networks, 22(12):2409–2421, 2011. [10] R.A. Brooks. The whole iguana. In M. Brady, editor, Robotics Science, pages 432–456. MIT Press, Cambridge, Mass., 1989. [11] M. Brown and C. Harris. Neurofuzzy Adaptive Modelling and Control. Prentice Hall, 1994. [12] M. Buehner and P. Young. A tighter bound for the echo state property. IEEE Transactions on Neural Networks, 17(3):820– 824, 2006. [13] F. S. Chance and L. F. Abbott. Divisive inhibition in recurrent networks. Network: Comput. Neural Syst., 11:119–129, 2000. [14] S. P. Chatzis. Hidden Markov models with nonelliptically contoured state densities. IEEE Trans. on Pattern Analysis and Machine Intelligence, 32(12):2297 – 2304, 2010. 192 [15] A. Clark. Whatever next? Predictive brains, situated agents, and the future of cognitive science. Behavioral and Brain Sciences, pages 1–86, 2012. [16] A. Coates, P. Abbeel, and A. Y. Ng. Learning for control from multiple demonstrations. In Proc. 25th ICML, Helsinki, 2008. [17] A. M. Collins and M. r. Quillian. Retrieval time from semantic memory. Journal of verbal learning and verbal behavior, 8(2):240–247, 1969. [18] HBP Consortium. The Human Brain Project. Report to the European Commission, EPFL Lausanne, 2012. URL: http://www.humanbrainproject.eu/. [19] P. Dominey, M. Arbib, and J.-P. Joseph. A model of corticostriatal plasticity for learning oculomotor associations and sequences. Journal of Cognitive Neuroscience, 7(3):311–336, 1995. [20] P. F. Dominey. From sensorimotor sequence to grammatical construction: Evidence from simulation and neurophysiology. Adaptive Behaviour, 13(4):347–361, 2005. [21] R. Douglas and T. Sejnowski. Future challenges for the sciene and engineering of learning: Final workshop report. Technical report, National Science Foundation, 2008. [22] G.L. Drescher. Made-up Minds: A Constructivist Approach to Artificial Intelligence. MIT Press, Cambridge, Mass., 1991. [23] D. Durstewitz, J. K. Seamans, and T. J. Sejnowski. Neurocomputational models of working memory. Nature Neuroscience, 3:1184–91, 2000. [24] C. Eliasmith. A unified approach to building and controlling spiking attractor networks. Neural Computation, 17:1276–1314, 2005. [25] C. Eliasmith. Attractor network. Scholarpedia, 2(10):1380, 2007. [26] C. Eliasmith, Stewart T. C., Choo X., Bekolay T., Tang Y. DeWolf T., and D. Rasmussen. A large-scale model of the functioning brain. Science, 338(6111):1202–1205, 2012. [27] K. Fan and G. Pall. Imbedding conditions for Hermitian and normal matrices. Canad. J. Math., 9:298–304, 1957. [28] B. Farhang-Boroujeny. Adaptive Filters: Theory and Applications. Wiley, 1998. [29] J.A. Fodor and Z.W. Pylyshin. Connectionism and cognitive architecture: A critical analysis. Cognition, 28:3–71, 1988. 193 [30] W. J. Freeman. Definitions of state variables and state space for braincomputer interface. part 1: Multiple hierarchical levels of brain function. Cognitive Neurodynamics, 1(1):3–14, 2007. [31] W. J. Freeman. Definitions of state variables and state space for braincomputer interface. part 2. extraction and classification of feature vectors. Cognitive Neurodynamics, 1(2):85–96, 2007. [32] R. M. French. Catastrophic interference in connectionist networks. In L. Nadel, editor, Encyclopedia of Cognitive Science, volume 1, pages 431– 435. Nature Publishing Group, 2003. [33] K. Friston. A theory of cortical response. Phil. Trans. R. Soc. B, 360:815– 836, 2005. [34] M. Galtier, O. D. Faugeras, and P. C. Bressloff. Hebbian learning of recurrent connections: a geometrical perspective. Neural Computation, 24(9):2346– 2383, 2012. [35] T. Gedeon and D. Arathorn. Convergence of map seeking circuits. J. Math. Imaging Vis., 29:235–248, 2007. [36] W. Gerstner, H. Sprekeler, and D. Deco. Theory and simulation in neuroscience. Science, 338(5 Oct):60–65, 2012. [37] J. Goguen and R. Burstall. Institutions: Abstract model theory for specification and programming. J. of the ACM, 39(1):95–146, 1992. [38] A. Graves, M. Liwicki, S. Fernandez, R. Bertolami, H. Bunke, and J. Schmidhuber. A novel connectionist system for unconstrained handwriting recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(5):855 – 868, 2009. [39] A. Graves and J. Schmidhuber. Offline handwriting recognition with multidimensional recurrent neural networks. In Proc. NIPS 2008. MIT Press, 2008. [40] S. Grillner. Biological pattern generation: The cellular and computational logic of networks in motion. Neuron, 52:751–766, 2006. [41] C. Gros and G. Kaczor. Semantic learning in autonomously active recurrent neural networks. Logic Journal of the IGPL, 18(5):686–704, 2010. [42] S. Grossberg. Linking attention to learning, expectation, competition, and consciousness. In L. Itti, G. Rees, and J. Tsotsos, editors, Neurobiology of attention, chapter 107, pages 652–662. San Diego: Elsevier, 2005. [43] S. Grossberg. Adaptive resonance theory. Scholarpedia, 8(5):1569, 2013. 194 [44] S. Harnad. The symbol grounding problem. Physica, D42:335–346, 1990. [45] D. O. Hebb. The Organization of Behavior. New York: Wiley & Sons, 1949. [46] M. Hermans and B. Schrauwen. Recurrent kernel machines: Computing with infinite echo state networks. Neural Computation, 24(1):104–133, 2012. [47] G. E. Hinton and R. R. Salakuthdinov. Reducing the dimensionality of data with neural networks. Science, 313(July 28):504–507, 2006. [48] J. J. Hopfield. Neural networks and physical systems with emergent collective computational abilities. Proc. NatL Acad. Sci. USA, 79:2554–2558, 1982. [49] O. Houdé and N. Tzourio-Mazoyer. Neural foundations of logical and mathematical cognition. Nature Reviews Neuroscience, 4(June 2003):507–514, 2003. [50] A. J. Ijspeert. Central pattern generators for locomotion control in animals and robots: A review. Neural Networks, 21:642–653, 2008. [51] T. R. Insel, S. C. Landis, and F. S. Collins. The NIH BRAIN initiative. Science, 340(6133):687–688, 2013. [52] M. Ito and J. Tani. Generalization in learning multiple temporal patterns using RNNPB. In Neural Information Processing, number 3316 in LNCS, pages 592–598. Springer Verlag, 2004. [53] H. Jaeger. Identification of behaviors in an agent’s phase space. Arbeitspapiere der GMD 951, GMD, St. Augustin, 1995. [54] H. Jaeger. The ”echo state” approach to analysing and training recurrent neural networks. GMD Report 148, GMD - German National Research Institute for Computer Science, 2001. [55] H. Jaeger. Reservoir self-control for achieving invariance against slow input distortions. technical report 23, Jacobs University Bremen, 2010. [56] H. Jaeger and H. Haas. Harnessing nonlinearity: Predicting chaotic systems and saving energy in wireless communication. Science, 304:78–80, 2004. [57] H. Jaeger, M. Lukosevicius, D. Popovici, and U. Siewert. Optimization and applications of echo state networks with leaky integrator neurons. Neural Networks, 20(3):335–352, 2007. [58] T. Kohonen and T. Honkela. Kohonen network. In Scholarpedia, volume 2, page 1568. 2007. 195 [59] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pages 1106–1114, 2012. [60] M. Kudo, J. Toyama, and M. Shimbo. Multidimensional curve classification using passing-through regions. Pattern Recognition Letters, 20(11):1103– 1111, 1999. [61] R. Laje and D. V. Buonomano. Robust timing and motor patterns by taming chaos in recurrent neural networks. Nature Neuroscience, 16(7):925–933, 2013. [62] G. Lakoff. Women, fire, and dangerous things: What categories reveal about the mind. University of Chicago, 1987. [63] G. Lakoff. Cognitive models and prototype theory. In I. Margolis and S. Laurence, editors, Concepts: Core Readings, chapter 18, pages 391–422. Bradford Books / MIT Press, 1999. [64] G. Lakoff and R. E. Nunez. Where mathematics comes from: How the embodied mind brings mathematics into being. Basic Books, 2000. [65] L. C. Lamb. The grand challenges and myths of neural-symbolic computation. In L. De Raedt, B. Hammer, P. Hitzler, and W. Maass, editors, Recurrent Neural Networks- Models, Capacities, and Applications, number 08041 in Dagstuhl Seminar Proceedings, Dagstuhl, Germany, 2008. Internationales Begegnungs- und Forschungszentrum für Informatik (IBFI), Schloss Dagstuhl, Germany. [66] Y. LeCun, L. Bottou, J. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278– 2324, 1998. http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf. [67] F. Lehmann. Semantic networks in artificial intelligence. Elsevier Science, 1992. [68] L. Lukic, J. Santos-Victor, and A. Billard. Learning coupled dynamical systems from human demonstration for robotic eye-arm-hand coordination. In Proc. IEEE-RAS International Conference on Humanoid Robots, Osaka 2012, 2012. [69] M. Lukoševičius and H. Jaeger. Reservoir computing approaches to recurrent neural network training. Computer Science Review, 3(3):127–149, 2009. [70] W. Maass, P. Joshi, and E. Sontag. Computational aspects of feedback in neural circuits. PLOS Computational Biology, 3(1):1–20, 2007. 196 [71] G. Manjunath and H. Jaeger. Echo state property linked to an input: Exploring a fundamental characteristic of recurrent neural networks. Neural Computation, 25(3):671–696, 2013. [72] N. M. Mayer and M. Browne. Echo state networks and self-prediction. In Biologically Inspired Approaches to Advanced Information Technology, volume 3141 of LNCS, pages 40–48. Springer Verlag Berlin / Heidelberg, 2004. [73] S. McCallum. Catastrophic Forgetting and the Pseudorehearsal Solution in Hopfield Networks. Phd thesis, Univ. of Otago, NZ, 2007. [74] W. S. McCulloch and W. Pitts. A logical calculus of the ideas immanent in nervous activity. Bull. of Mathematical Biophysics, 5:115–133, 1943. [75] D. L. Medin and L. J. Rips. Concepts and categories: Memory, meaning, and metaphysics. In K. J. Holyoak and R. G. Morrison, editors, The Cambridge Handbook of Thinking and Reasoning, chapter 3, pages 37–72. Cambridge University Press, 2005. [76] T. M. Mitchell. Machine Learning. McGraw-Hill, 1997. [77] O-M. Moe-Helgensen and H. Stranden. Catastophic forgetting in neural networks. Technical report, Norwegian University of Science and Technology, 2005. [78] M. Negrello and F. Pasemann. Attractor landscapes and active tracking: The neurodynamics of embodied action. Adaptive Behaviour, 16:196 – 216, 2008. [79] K. Obermayer, H. Ritter, and K. Schulten. A principle for the formation of the spatial structure of cortical feature maps. Proc. of the National Academy of Sciences of the USA, 87:8345–8349, 1990. [80] E. Oja. A simplified neuron model as a principal component analyzer. J. Math. Biol., 15:267–273, 1982. [81] C. Orsenigo and C. Vercellis. Combining discrete SVM and fixed cardinality warping distances for multivariate time series classification. Pattern Recognition, 43(11):3787–3794, 2010. [82] G. Palm. On associative memory. Biol. Cybernetics, 36(1):19–31, 1980. [83] R. Pfeifer and Ch. Scheier. Understanding Intelligence. MIT Press, 1999. [84] G. Pinkas. Propositional non-monotonic reasoning and inconsistency in symmetric neural networks. In Proc. 12th international joint conference on Artificial intelligence - Volume 1, pages 525–530, 1991. 197 [85] J. B. Pollack. Recursive distributed representations. Artificial Intelligence, 46(1-2):77–105, 1990. [86] L. Qi. Symmetric nonnegative tensors and copositive tensors. arxiv.org/pdf/1211.5642, 2012. [87] M. R. Quillain. Word concepts: A theory and simulation of some basic semantic capabilities. Behavioral Science, 12(5):410–430, 1967. [88] F. Rabe. Representing Logics and Logic Translations. Phd thesis, School of Engineering and Science, Jacobs University Bremen, 2008. [89] M. I. Rabinovich, R. Huerta, P. Varona, and V. S. Afraimovich. Transient cognitive dynamics, metastability, and decision making. PLOS Computational Biology, 4(5):e1000072, 2008. [90] F. R. Reinhart and J. J. Steil. Recurrent neural associative learning of forward and inverse kinematics for movement generation of the redundant pa-10 robot. In A. Stoica, E. Tunsel, T. Huntsberger, T. Arslan, S. Vijayakumar, and A. O. El-Rayis, editors, Proc. LAB-RS 2008, vol. 1, pages 35–40, 2008. [91] R. F. Reinhart, A. Lemme, and J. J. Steil. Representation and generalization of bi-manual skills from kinesthetic teaching. In Proc. of IEEE-RAS International Conference on Humanoid Robots, Osaka, 2012, in press. [92] R. F. Reinhart and J. J. Steil. A constrained regularization approach for input-driven recurrent neural networks. Differential Equations and Dynamical Systems, 19(1–2):27–46, 2011. DOI 10.1007/s12591-010-0067-x is an 2010 online pre-publication. [93] J. J. Rodriguez, C. J. Alonso, and J. A. Maestro. Support vector machines of interval-based features for time series classification. Knowledge-Based Systems, 18(4-5):171–178, 2005. [94] J. S. Rothman, L. Cathala, V. Steuber, and R. A. Silver. Synaptic depression enables neuronal gain control. Nature, 457(19 Feb):1015–1018, 2009. [95] G. Schöner, M. Dose, and C. Engels. Dynamics of behavior: theory and applications for autonomous robot architectures. Robotics and Autonomous Systems, 16(2):213–246, 1995. [96] G. Schöner and J. A. Kelso. Dynamic pattern generation in behavioral and neural systems. Science, 239(4847):1513–1520, 1988. [97] J.R. Searle. Minds, brains, and programs. The Behavioral and Brain Sciences, 3:417–457, 1980. 198 [98] L. Shastri. Advances in Shruti – a neurally motivated model of relational knowledge representation and rapid inference using temporal synchrony. Artificial Intelligence, 11:79–108, 1999. [99] K. R. Sivaramakrishnan, K. Karthik, and C. Bhattacharyya. Kernels for large margin time-series classification. In Proc. IJCNN 2007, pages 2746 – 2751, 2007. [100] L.B. Smith and E. Thelen, editors. A Dynamic Systems Approach to Development: Applications. Bradford/MIT Press, Cambridge, Mass., 1993. [101] T. Strauss, W. Wustlich, and R. Labahn. Design strategies for weight matrices of echo state networks. Neural Computation, 24(12):3246–3276, 2012. [102] D. Sussillo and L. Abbott. Transferring learning from external to internal weights in echo-state networks with sparse connectivity. PLoS ONE, 7(5):e37372, 2012. [103] D. Sussillo and O Barak. Opening the black box: Low-dimensional dynamics in high-dimensional recurrent neural networks. Neural Computation, 25(3):626–649, 2013. [104] M. Timme, F. Wolf, and Th. Geisel. Unstable attractors induce perpetual synchronization and desynchronization. Chaos, 13:377–387, 2003. http://arxiv.org/abs/cond-mat/0209432. [105] I. Tsuda. Towards an interpretation of dynamic neural activity in terms of chaotic dynamical systems. Behavioural and Brain Sciences, 24(5):793–810, 2001. [106] F. van der Velde and M. de Kamps. Neural blackboard architectures of combinatorial structures in cognition. Behavioural and Brain Sciences, 29(1):37– 70, 2006. [107] T. van Gelder. The dynamical hypothesis in cognitive science. Behavioural and Brain Sciences, 21(5):615–628, 1998. [108] D. Verstraeten. Reservoir Computing: Computation with Dynamical Systems. PhD thesis, Electronics and Information Systems, University of Ghent, 2009. [109] D.M. Wolpert and M. Kawato. Multiple paired forward and inverse models for motor control. Neural Networks, 11(7-8):1317–1330, 1998. [110] F. wyffels, J. Li, T. Waegeman, B. Schrauwen, and H. Jaeger. Frequency modulation of large oscillatory neural networks. Biological Cybernetics, 108:145–157, 2014. 199 [111] Y. Yao and W.J. Freeman. A model of biological pattern recognition with spatially chaotic dynamics. Neural Networks, 3(2):153–170, 1990. [112] I. B. Yildiz, H. Jaeger, and S. J. Kiebel. Re-visiting the echo state property. Neural Networks, 35:1–20, 2012. [113] S. K. U. Zibner, C. Faubel, I. Iossifidis, and G. Schöner. Dynamic neural fields as building blocks of a cortex-inspired architecture for robotic scene representation. IEEE Trans. on Autonomous Mental Development, 3(1):74– 91, 2011. 200
9cs.NE
arXiv:1604.03857v1 [math.GR] 13 Apr 2016 THE TORSION-FREE RANK OF HOMOLOGY IN TOWERS OF SOLUBLE PRO-p GROUPS MARTIN R. BRIDSON AND DESSISLAVA H. KOCHLOUKOVA Abstract. We show that for every finitely presented pro-p nilpotent-by-abelianby-finite group G there is an upper bound on dimQp (H1 (M, Zp ) ⊗Zp Qp ), as M runs through all pro-p subgroups of finite index in G. 1. Introduction In [4] we examined how betti numbers behave in towers of finitely presented soluble groups and proved that if G is finitely presented and nilpotent-by-abelianby-finite, then there is an upper bound on dimQ H1 (M, Q), as M runs through all subgroups of finite index in G. In this paper we shall prove the corresponding result for pro-p groups. By definition, a pro-p group G is finitely presented if G ∼ = F/R, where F is a finitely generated free pro-p group and R is a pro-p subgroup of F generated (as a topological group) by the union of finitely many conjugacy classes in F . For discrete groups, one cannot detect finite presentability using homological conditions, but for pro-p groups one can: G is finitely presented if and only if the homology groups H1 (G, Zp ) and H2 (G, Zp ) are finitely generated. Moreover, the number of elements required to generate G as a topological group is d(G) := dimFp H1 (G, Fp ). In [12] John Wilson proved that the Golod-Shafarevich inequality holds for soluble pro-p groups. Using this, he proved [12, Corollary A,(i)] that for every finitely presented soluble pro-p group G there is a constant k > 0 such that for any pro-p subgroup U of finite index in G, the inequality d(U ) ≤ k[G : U ]1/2 holds. He also proved that every normal pro-p subgroup with quotient Zp is finitely generated [12, Corollary A, (ii)]. Note how this contrasts with the discrete case: there are many finitely presented solvable groups N ⋊ Z with N not finitely generated. (In the positive direction, Bieri, Neumann and Strebel [3, Thm. D] proved that if G is finitely presented and soluble group with rk (G/G′ ) ≥ 2, then there exists a normal finitely generated subgroup N such that G/N ∼ = Z.) Our first result generalizes [12, Cor. A,(ii)]. Proposition A. Let G be a finitely presented soluble pro-p group. Then sup G/H ∼ =Zp d(H) < ∞. The following result forms the technical heart of this paper. It is proved using methods from commutative algebra. It will enable us to retain the finiteness in homology given by Proposition A as we extend scalars. We remind the reader that Date: Oxford, 11 April 2016. 2000 Mathematics Subject Classification. Primary 20J05 Secondary 20E18 . Key words and phrases. pro-p group, virtual first betti number. 1 2 MARTIN R. BRIDSON AND DESSISLAVA H. KOCHLOUKOVA for a pro-p group G which is the inverse limit of its finite p-group quotients G/U , homology is defined in terms of modules over the completed group algebra Zp [[G]], which is the inverse limit of the rings Zp [G/U ]. Note that Zp [[G]] is a local ring whose unique maximal ideal is the kernel of the natural morphism Zp [[G]] ։ Fp . The torsion-free rank of an abelian pro-p group B is rk B := dimQp B⊗Zp Qp . Proposition B. Let Q be a free abelian pro-p group of finite rank and let A be a finitely generated pro-p Zp [[Q]]-module. Let B be the set of pro-p subgroups H ⊳ Q with Q/H ∼ = Zp . If supH∈B dimFp (A⊗Zp [[H]] Fp ) < ∞, then sup rk (A⊗Zp [[Qps ]] Zp ) < ∞. s≥1 To prove the following theorem, we will reduce to the metabelian case and then apply Proposition B. Theorem C. Let G be a finitely generated pro-p group that is nilpotent-by-(torsionfree abelian). If supG/H ∼ =Zp d(H) < ∞, then sup rk H1 (M, Zp ) < ∞, M∈A where A is the set of all pro-p subgroups of finite index in G. By combining Theorem C with Proposition A and using the fact that a subgroup of finite index in a finitely presented group is finitely presented, we obtain the result stated in the abstract. Corollary D. For every finitely presented pro-p nilpotent-by-abelian-by-finite group G, there is an upper bound on rk H1 (M, Zp ), as M runs through all pro-p subgroups of finite index in G. We separated Theorem C from Corollary D because, as we shall explain in Section 6, there are interesting examples of metabelian pro-p groups, arising in the work of Jeremy King [8], that are not finitely presented but still satisfy the conclusion of Proposition A. In Section 6 we shall also describe examples which show that Theorem C can fail when one changes the field of coefficients from Qp to Fp . The analogue of Corollary D in the setting of discrete groups is this: if G is finitely presented and nilpotent-by-abelian-by-finite, then there is an upper bound on dimQ H1 (M, Q), where M runs through all subgroups of finite index in G. This was our main result in [4]. It was proved independently by Andrei Jaikin Zapirain [6] in the metabelian case under the weaker hypothesis dimQ H0 (Q, H2 (N, Q)) < ∞. Acknowledgements: We thank Andrei Jaikin Zapirain for a suggestion that allowed us to remove an unnecessary hypothesis from an earlier version of Theorem C and we thank the referee for the helpful comments that improved the paper. The work of the first author was supported by grants from the EPSRC and by a Wolfson Merit Award from the Royal Society; the work of the second author was supported by “bolsa de produtividade em pesquisa”, CNPq, Brazil: we thank all of these organizations. THE TORSION-FREE RANK OF HOMOLOGY IN TOWERS OF SOLUBLE PRO-p GROUPS 3 2. Preliminaries 2.1. Generating sets. For a pro-p group G with a subset X denote by hXi the pro-p subgroup generated by X i.e. the smallest pro-p subgroup of G that contains X. If G = hXi we say that X is a generating set for G. 2.2. Completed tensor products. Let R be a profinite ring, V1 a profinite right b R V2 R-module and V2 a profinite left R-module. The profinite tensor product V1 ⊗ can be defined either by a universal property or as an inverse limit of finite abstract tensor products [11]. In the case when at least one of V1 and V2 is finitely presented b R V2 ∼ as a profinite R-module, there is a natural isomorphism V1 ⊗ = V1 ⊗R V2 (see [1, Cor. 2.4]). Thus, whenever possible (e.g. Proposition B and Theorem C) we use b to emphasize the need for completed tensor products the notation ⊗, reserving ⊗ when we do not know whether either of the profinite modules is finitely presented. In this paper, the only profinite modules we consider are pro-p modules over pro-p rings. 2.3. Noetherian completed group algebras. Let Q be a finitely generated prop abelian group. Q ∼ = = Q0 ⊕ K, where K is a finite abelian p-group and Q0 ∼ n Zp is free-abelian pro-p. Note that Zp [[Q0 ]] ∼ = Zp [[t1 , . . . , tn ]] is the power series ring in n commuting variables, where under the identification, Q0 is generated by {1 + t1 , . . . , 1 + tn }. In particular, Zp [[Q0 ]] is abstractly Noetherian. Moroever, since Zp [[Q]] is finitely generated as an abstract Zp [[Q0 ]]-module, it too is abstractly Noetherian. According to [13, Lemma 7.2.2], for every pro-p group G, every pro-p Zp [[G]]module V that is topologically generated by a finite set X is generated as an abstract Zp [[G]]-module by the same set X. In this sense, the topology of V is hidden in the topology of the ring Zp [[G]] that acts on V . Thus we see that for a finitely generated abelian pro-p group Q, the ring Zp [[Q]] is Noetherian in both the abstract and pro-p sense. In fact, every abstract ideal (topology ignored) of Zp [[Q]] is finitely generated (as an abstract Zp [[Q]]-submodule), moreover it is closed ([13, Lemma 7.2.2]), and therefore is a finitely generated pro-p Zp [[Q]]-submodule of Zp [[Q]]. Thus when we work with ideals in Zp [[Q]], we do not need to specify that they are closed, because this condition is automatic. This freedom to ignore the topology allows us to apply the methods of commutative algebra for Noetherian rings, exploiting in particular the fact that above every proper ideal of Zp [[Q]] there are only finitely many minimal prime ideals. 2.4. Primary decomposition in Noetherian rings. We recall some basic ideas from commutative algebra; see [5, Chapter 3] or [2]. Let R be a commutative Noetherian ring with unit and M a finitely generated R-module. An associate prime of M is a prime ideal P of R such that R/P arises as an R-submodule of M (i.e. P = annR (m) for some m ∈ M ). The set of associated primes of M is finite and is denote by Ass(M ). All of the minimal primes among the prime ideals containing annR (M ) are associated primes of M . An R-module W is call P -primary if Ass(W ) = {P }. In this case P acts nilpotently on W . For any R-submodule V of M there is a primary decomposition V = V1 ∩ V2 ∩ . . . ∩ Vs , where for each Vi we have that M/Vi is Pi -primary and the prime ideals Pi are pairwise distinct (although one can be included in another). The prime ideals 4 MARTIN R. BRIDSON AND DESSISLAVA H. KOCHLOUKOVA P1 , . . . , Ps are the associated primes of M/V . The component Vi is unique if Pi is minimal (with respect to inclusion) among the associated primes Ass(M/V ). We will apply the primary decomposition for R = Zp [[Q]], Q = Znp and M a finitely generated pro-p R-module. As explained in the previous subsection, we are free to ignore the topological structure of M and view it as an abstract R-module. All abstract R-submodules of M are finitely generated as abstract R-submodules and are automatically pro-p R-submodules. 3. Proof of Proposition A We have G = H ⋊ H0 , where H0 = hqi ∼ = Zp . As we noted in the introduction, Wilson [12, Corollary A, (ii)] proved that H is finitely generated. On other hand, using that H/H ′ H p is a finite Fp [[H0 ]]-module and Fp [[H0 ]] is a principal ideal domain, we get a decomposition H/H ′ H p ∼ = (Fp [[H0 ]]/I1 ) ⊕ . . . ⊕ (Fp [[H0 ]]/Is ), where H ′ is the pro-p subgroup of H generated by commutators, H p is the pro-p subgroup of H generated by all the set {hp | h ∈ H}, every Fp [[H0 ]]/Ij is finite, and the isomorphism is of Fp [[H0 ]]-modules. There is an isomorphism of modules Fp [[H0 ]]/Ij ∼ = Fp [[t]]/(tij ), with q acting as multiplication by t + 1. (Here we have used the fact that every ideal of Fp [[H0 ]] is of the form (ti ).) Let m = max{i1 , . . . , is } ≥ 1. By [12, Cor. B], there is a constant k such that for every pro-p subgroup U of finite index in G we have d(U ) ≤ k[G : U ]1/2 . (3.1) We apply this to j U = hH, q p i, where pj > m ≥ pj−1 ≥ 1, noting that since U is a split extension of H by the pro-p subgroup generated by j qp , (3.2) U/U ′ U p ∼ Fp ) ⊕ Fp , = (H/H ′ H p ⊗ pj Fp [[hq i]] j j where the second summand Fp is generated by the image of q p . The action of q p j on Fp [[t]]/(tij ) is given by multiplication with the image of (1 + t)p which, since j j we are in characteristic p, is 1 + tp . Since pj ≥ m ≥ ij we see that (1 + t)p acts as the identity. Thus (H/H ′ H p ) ⊗ Fp ∼ = H/H ′ H p , pj Fp [[hq i]] and by (3.2) we have d(U ) = d((H/H ′ H p ) ⊗Fp [[hqpj i]] Fp ) + 1 = dim(H/H ′ H p ) + 1 = i1 + . . . + is + 1. Combining this with (3.1) we get thus i1 + . . . + is + 1 ≤ kpj/2 , (i1 + . . . + is )2 < k 2 pj = k 2 ppj−1 ≤ k 2 pm ≤ k 2 p(i1 + . . . + is ), THE TORSION-FREE RANK OF HOMOLOGY IN TOWERS OF SOLUBLE PRO-p GROUPS 5 and i1 + . . . + is < k 2 p. Therefore, d(H) = i1 + . . . + is < k 2 p.  4. Proof of Proposition B Throughout this section we write R for the completed group algebra Zp [[Q]]. This is a local ring whose unique maximal ideal is the kernel P of the natural morphism Zp [[Q]] ։ Fp . We are given a free abelian pro-p group of finite rank Q and a finitely generated R-module A, which we know to be Noetherian. We assume that as H < Q ranges over the normal pro-p subgroups with Q/H ∼ = Zp , dimFp (A⊗Zp [[H]] Fp ) remains bounded, and from this we must deduce that rk (A⊗Zp [[Qps ]] Zp ) remains bounded as the positive integer s increases. Roughly speaking, the idea of the proof is to reduce to the case of a cyclic module (with prime annihilator), and we do this by examining the primary decomposition. The key gain in finiteness comes in Lemma 4.2, from Noetherian properties of R and A, and from Lazard’s bound [10] on the order of finite subgroups in GLd (Zp ). Consider the R-submodule Am = AΩm in A, where m is a power of p and Ωm is the augmentation ideal ker(Zp [[Qm ]] → Zp ). Let Am = Nm,1 ∩ Nm,2 ∩ . . . ∩ Nm,j be a primary decomposition of Am in A. Then Ass(A/Nm,i ) = {Pm,i }, where Pm,i is a prime ideal in R, and Ass(A/Am ) = {Pm,1 , . . . , Pm,j }. Note that, by the definition of an associate prime ideal, R/Pm,i embeds in A/Am , hence Pm,i contains Jm = annR (A/Am ). Thus (4.1) Qm − 1 ⊂ Jm = annR (A/Am ) ⊆ Pm,i . Now, Zp [[Q/Qm ]] = Zp [Q/Qm ] has Krull dimension 1, so either Pm,i is the unique maximal ideal P ⊳ R or else Pm,i is a minimal among the prime ideals containing Jm and there is no prime ideal P0 lying strictly between Pm,i and P . Furthermore, by [5, Thm. 3.1], every ideal in R that is minimal among the prime ideals containing Jm is an associated prime ideal of A/Am . The following lemma is used to limit the possibilities for the domain R/Pm,i . Recall that B is the set of pro-p subgroups H ⊳ Q with Q/H ∼ = Zp . Lemma 4.1. For each Pm,i there exists H0 ∈ B such that H0 − 1 ⊆ Pm,i . Proof. Let Fm,i be the abstract field of fractions of the (abstract) domain R/Pm,i . The lemma is equivalent to the assertion that the image of Q in Fm,i is a cyclic group. Note that we already know that the image of Q in Fm,i is finite. We consider two cases. First suppose that Fm,i has characteristic 0. Then the subfield in Fm,i generated by Q and the image of Q is inside the spliting field Km,i (over Q) of the polynomial xs −1, where s is the exponent of the image of Q in Fm,i . By the uniqueness of the splitting field (up to isomophism), Km,i is isomorphic to 6 MARTIN R. BRIDSON AND DESSISLAVA H. KOCHLOUKOVA the subfield of C generated by Q and a primitive s-th root of unity. In particular the image of Q in Fm,i is cyclic, as claimed. Suppose now that Fm,i has positive characteristic. Since the elements of Zp rpZp are invertible in Zp , the characteristic of Fm,i is p. By (4.1) Fm,i is a finite field, ∗ hence Fm,i is a cyclic group of order coprime to p. It follows that the image of Q in Fm,i is trivial and Fm,i = Fp , so Pm,i = P and the lemma holds.  Lemma 4.2. Let Xm = {Pm,1 , . . . , Pm,j } and define X = ∪m≥1 Xm . Then X is finite. Proof. Consider Pm,i 6= P . Write Wm,i = A/Nm,i and note that by [5, Prop. 3.9] sm,i = 0. Pm,i acts nilpotently on Wm,i i.e. there is some sm,i ∈ N such that Wm,i Pm,i We claim that annR (Vm,i ) = Pm,i where Vm,i = Wm,i /Wm,i Pm,i . √ To see this, note that for any ideal S ⊳ R that strictly contains Pm,i , the radical S is the intersection of the minimal elements in the set of prime ideals containing √ √ z S. We are in Krull dimension one, so S = P . Since R is Noetherian, we have S ⊆ S for some z ∈ N, and therefore S has finite index in R (as an abelian subgroup). Thus, if annR (Vm,i ) were to contain Pm,i as a proper ideal, then annR (Vm,i ) has finite index in R, forcing Vm,i and Wm,i to be finite. But this would mean that the domain R/Pm,i was finite, hence a field. Since P is the unique maximal ideal in R, this would imply Pm,i = P , contrary to hypothesis. By Lemma 4.1, there is H0 ∈ B such that H0 − 1 ⊆ Pm,i . Then H0 acts trivially on Vm,i and so Vm,i ∼ = Vm,i ⊗Zp [[H0 ]] Zp , which is a quotient of A⊗Zp [[H0 ]] Zp . By assumption sup dimFp (A⊗Zp [[H]] Fp ) < ∞. H∈B Recall that the minimal number of generators of a pro-p group B is d(B) = dimFp B/B ′ B p . Since Pm,i is an associated prime for Vm,i we deduce that R/Pm,i embeds in Vm,i , so d(R/Pm,i ) ≤ d(Vm,i ) = d(Vm,i ⊗Zp [[H0 ]] Zp ) ≤ d(A⊗Zp [[H0 ]] Zp ) = dimFp (A⊗Zp [[H0 ]] Fp ). At this stage we have established the following weak form of the conclusion |X| < ∞ that we seek: δ := sup d(R/Pm,i ) ≤ sup dimFp (A⊗Zp [[H]] Fp ) < ∞. Pm,i ∈X H∈B As before, we write Fm,i for the abstract field of fractions of the domain R/Pm,i . (Remember that R = Zp [[Q]].) Let Qm,i be the image of Q in R/Pm,i . From Lemma 4.1 we know that Qm,i is finite cyclic, of p-power order. If the characteristic of Fm,i was positive, it would be p. But then, as in the proof of Lemma 4.1, we would get Pm,i = P , a contradiction. Therefore, Fm,i d(j) has characteristic 0, in which case R/Pm,i ∼ = Zp for some d(j) ≤ δ, and Qm,i occurs as a finite cyclic subgroup of GLδ (Zp ). This is a virtually pro-p analytic, and therefore it has finite virtual cohomological dimension [10]. (We refer to [14] for background on pro-p analytic groups.) It follows that there is an upper bound on the finite subgroups of GLd (Zp ), yielding an integer r (a power of p) such that the order of each Qm,i always divides r. THE TORSION-FREE RANK OF HOMOLOGY IN TOWERS OF SOLUBLE PRO-p GROUPS 7 We have proved (Qr − 1) ⊆ Pm,i for all Pm,i ∈ X, and the lemma now follows from the observation that in R = Zp [[Q]] there are only finitely many prime ideals above (Qr − 1); equivalently, there are only finitely many minimal prime ideals in the local ring Zp [[Q]]/(Qr − 1) ∼ = Zp [Q/Qr ]. To see that r this is the case, note that since Zp [Q/Q ] is finitely generated as a Zp -module, its Krull dimension equals that of Zp , which is 1. Thus any prime ideal in Zp [Q/Qr ] that is not minimal is the unique maximal prime ideal. And there are only finitely many minimal prime ideals.  Lemma 4.3. For each p-power m, define Jm = annR (A/Am ) and Bm = Jm ⊗Zp Qp . Then, there is a p-power m0 ≥ 1 such that Bm = Bm0 for all m ≥ m0 . Proof. Note that if m1 ≥ m2 are powers of p, then A/Am2 is a quotient of A/Am1 , hence Jm1 ⊆ Jm2 . We claim that (4.2) Xm2 \ {P } ⊆ Xm1 \ {P }, where P is the unique maximal ideal of Zp [[Q]]. Indeed by the paragraph after (4.1) any minimal prime ideal Pm2 ,i above Jm2 such that Pm2 ,i 6= P belongs to Xm2 and any element of Xm2 \ {P } is of this type. Thus there is no prime ideal of Zp [[Q]] that contains Jm1 and is strictly contained in Pm2 ,i (otherwise there would be a nested sequence of three primes ideals above Jm1 , which would contradict the paragraph after (4.1) with m = m1 ). Thus Pm2 ,i is a minimal prime above Jm1 , so Pm2 ,i ∈ Xm1 and (4.2) holds. By Lemma 4.2 X = ∪m Xm is a finite set of primes. This together with (4.2) implies the existence of m0 , a power of p, such that (4.3) Xm0 \ {P } = Xm \ {P } for m ≥ m0 a power of p. If m ≥ m0 is a power of p and X 6= {P }, then p p Jm = ∩I∈Xm I = ∩I∈Xm \{P } I = ∩I∈Xm0 \{P } I = ∩I∈Xm0 I = Jm0 (4.4) √ because, as we noted earlier, that for any ideal S ⊳ R, the radical S is the intersection of the minimal elements in the set of prime ideals containing S. Note that in the case X = {P } we have Xm = Xm0 = X, so p p (4.5) Jm = ∩I∈Xm I = ∩I∈Xm0 I = Jm0 for m ≥ m0 a power of p. With equalities (4.4) and (4.5) in hand, the proof of Claim 2 in [4, Thm 3.1] applies verbatim after replacing Q with Qp and Z with Zp . We repeat the argument for the convenience of the reader. It suffices to show that Bm = Bmp for m ≥ m0 . Fix q ∈ Q and write y for its image in R ⊗Zp Qp . Then y m − 1 ∈ Bm and by (4.4) there is a positive integer s such that (y m − 1)s ∈ Bmp . The greatest common divisor of xmp − 1 and (xm − 1)s in the polynomial ring Qp [x] is xm − 1, because xmp − 1 has no repeated roots in a field of charateristic 0. Therefore, y m − 1 ∈ Bmp , by Bezout’s lemma, and hence Bm = Bmp .  Proof of Proposition B. We fix a finite set of generators a1 , . . . , as for A as an Rmodule. Then A/Am is generated as an R/Jm -module by the images of a1 , . . . , as and we have an epimorphism of R/Jm -modules (R/Jm )s → A/Am inducing an epimorphism of finite dimensional Qp -modules (R/Jm )s ⊗Zp Qp → (A/Am ) ⊗Zp Qp . 8 MARTIN R. BRIDSON AND DESSISLAVA H. KOCHLOUKOVA Thus dimQp (A/Am ) ⊗Zp Qp ≤ s dimQp ((R/Jm ) ⊗Zp Qp ). By Lemma 4.3, for p-powers m ≥ m0 the canonical projection R/Jmp → R/Jm induces an isomorphism (R/Jmp ) ⊗Zp Qp → (R/Jm ) ⊗Zp Qp , so dimQp ((R/Jm ) ⊗Zp Qp ) = dimQp ((R/Jm0 ) ⊗Zp Qp ). Thus for C = {pi | i ≥ 1} we have sup dimQp ((A/Am ) ⊗Zp Qp ) ≤ s. dimQp ((R/Jm0 ) ⊗Zp Qp ) < ∞. m∈C And, by definition, A/Am = A ⊗Zp [[Qm ]] Zp .  5. Proof of Theorem C We shall see that in the metabelian case, Theorem C can be deduced from Proposition B by means of straightforward calculations in homological algebra. The following proposition reduces the general case to the metabelian case. For a pro-p group H let {γi (H)}i≥1 be the lower central series of H. By definition γ1 (H) = H, γi+1 (H) is the closed subgroup of H generated by [γi (H), H]. Proposition 5.1. Let N ֌ G ։ Q be a short exact sequence of pro-p groups, where N is nilpotent, Q is abelian and G is finitely generated. Let Gn be a pro-p subgroup of finite index in G and let Gn be the image of Gn in the metabelian group G/N ′ . Then H1 (Gn , Zp )⊗Zp Qp ∼ = H1 (Gn , Zp )⊗Zp Qp . Proof. We write Qn = Gn N/N for the image of Gn in G/N . Set V = N/N ′ and Vn = (Gn ∩ N )N ′ /N ′ . Let Vn,i be the image of Gn ∩ γi (N ) in γi (N )/γi+1 (N ). Note that Vn,i ∼ = Gn ∩ γi (N )/Gn ∩ γi+1 (N ) and the filtration {Gn ∩ γi (N )}i≥1 of Gn ∩ N has quotients Vn,i . Let Wn,i denote the image of Gn ∩ γi (N ) in H1 (Gn , Zp ). Then, for i ≥ 2, we have that Wn,i /Wn,i+1 is an image of Vn,i /γi (N ∩ Gn ), where γi (N ∩ Gn ) is the image of γi (N ∩ Gn ) in γi (N )/γi+1 (N ). In this paragraph all completed tensor products are over Zp . We think of b i V via the map that sends g1 N ′ ⊗ b . . . . . . ⊗g b i N ′ to γi (N )/γi+1 (N ) as a quotient of ⊗ [g1 , . . . , gi ]γi+1 (N ), where the commutator is left-normed. Thus we get (γi (N )/γi+1 (N ))/γi (N ∩ Gn ) b i V /⊗ b i Vn , where ⊗ b i Vn is the image of ⊗ b i Vn in ⊗ b i V . Since Vn as an image of ⊗ b i V /⊗ b i Vn has finite expohas finite index in V , by induction on i we see that ⊗ nent as an abelian group, hence (γi (N )/γi+1 (N ))/γi (N ∩ Gn ) and its abelian subgroup Vn,i /γi (N ∩ Gn ) have finite exponent as abelian groups for i ≥ 2. Then (Vn,i /γi (N ∩ Gn )) ⊗Zp Qp = 0, hence (Wn,i /Wn,i+1 ) ⊗Zp Qp = 0 for i ≥ 2. Then Wn,2 ⊗Zp Qp = 0, so the image of Gn ∩γ2 (N ) in H1 (Gn , Zp )⊗Zp Qp is trivial. And for the image Gn of Gn in G/N ′ we have H1 (Gn , Zp ) ⊗Zp Qp ∼ = H1 (Gn , Zp ) ⊗Zp Qp .  Lemma 5.2. Let N ֌ G ։ Q be a short exact sequence of pro-p groups with G finitely generated. Then (i) d(G) ≤ dimFp H0 (Q, H1 (N, Fp )) + dimFp H1 (Q, Fp ) ≤ d(G) + dimFp H2 (Q, Fp ); (ii) dimQp H1 (G, Zp )⊗ Qp ≤ dimQp H0 (Q, H1 (N, Zp ))⊗ Qp + dimQp H1 (Q, Zp )⊗ Qp , THE TORSION-FREE RANK OF HOMOLOGY IN TOWERS OF SOLUBLE PRO-p GROUPS 9 where all tensor products are over Zp . Proof. Recall that for any finitely generated pro-p group, d(G) = dim H1 (G, Fp ). Part (i) follows immediately from the following exact sequence (which is part of the 5-term exact sequence in homology) H2 (Q, Fp ) → H0 (Q, H1 (N, Fp )) → H1 (G, Fp ) → H1 (Q, Fp ) → 0. Part (ii) follows from the exact sequence (which is also part of a 5-term exact sequence) H0 (Q, H1 (N, Zp )) → H1 (G, Zp ) → H1 (Q, Zp ) → 0.  Proof of Theorem C. We start with a short exact sequence of pro-p groups M ֌ G ։ G/M with M nilpotent and G/M torsion-free and abelian. Since G/G′ is a finitely generated abelian pro-p group, it is the direct sum of a finite p-group T and a free pro-p abelian group Znp . Let N be the full pre-image of T in G. Since G/M is torsion-free abelian, N ⊆ M ; in particular N is nilpotent. Thus we have a short exact sequence of pro-p groups N ֌ G ։ Znp . And by construction, N ⊂ H for every normal H < G with G/H ∼ = Zp . Let A = N/N ′ . If we write H for the image of H < G in G = G/N ′ , then d(H) ≤ d(H), hence supG/H ∼ =Zp d(H) < ∞. This bound tells us that our hypothesis on G is preserved if we replace G by G/N ′ , and Proposition 5.1 assures us that if we can prove the theorem for G = G/N ′ , then the result will follow for G. Thus we assume henceforth that A = N and G = G. By applying Lemma 5.2(i) to the short exact sequence A ֌ H ։ H/A ∼ = Zpn−1 we get   n−1 sup dimFp (A⊗Zp [[H]] Fp ) ≤ sup [d(H) + − n + 1] < ∞, 2 G/H ∼ G/H ∼ =Z p = Zp since H0 (H, H1 (A, Fp )) = A⊗Zp [[H]] Fp and dim H1 (H/A, Fp ) = n − 1, and the binomial coefficient is the dimension of H2 (H/A, Fp ), which (as with discrete groups) is the exterior square of the abelian group (H/A)/p(H/A) ∼ = Fpn−1 . From Proposition B we deduce that (5.1) sup rk (A⊗Zp [[Qpi ]] Zp ) < ∞. i≥1 Let Gm be a pro-p subgroup of finite index in G and consider the following exact sequence1 Z [[Gm /A∩Gm ]] Tor1 p (A/A ∩ Gm , Zp ) → (A ∩ Gm )⊗Zp [[Gm /A∩Gm ]] Zp → A⊗Zp [[Gm /A∩Gm ]] Zp → (A/A ∩ Gm )⊗Zp [[Gm /A∩Gm ]] Zp → 0. Because A/A ∩ Gm is finite, the first and last groups in this sequence are torsion, so rk ((A ∩ Gm )⊗Zp [[Gm /A∩Gm ]] Zp ) = rk (A⊗Zp [[Gm /A∩Gm ]] Zp ). Then, by applying Lemma 5.2(ii) to A ∩ Gm ֌ Gm ։ Gm /(A ∩ Gm ), we get dimQp (H1 (Gm , Zp ) ⊗Zp Qp ) ≤ n + rk ((A ∩ Gm )⊗Zp [[Gm /A∩Gm ]] Zp ) = n + rk (A⊗Zp [[Gm /A∩Gm ]] Zp ), 1The use of ⊗ rather than ⊗ ˆ is permitted because the trivial module Zp is finitely presented over Zp [[G]] for every finitely generated pro-p group G. 10 MARTIN R. BRIDSON AND DESSISLAVA H. KOCHLOUKOVA where n is the rank of Gm /(A ∩ Gm ), which has finite index in Q = G/A. Finally, taking a p-power s such that Qs ⊆ Gm /(A ∩ Gm ) ⊆ Q, we have rk (A⊗Zp [[Gm /A∩Gm ]] Zp ) ≤ rk (A⊗Zp [[Qs ]] Zp ) and hence dimQp (H1 (Gm , Zp ) ⊗Zp Qp ) ≤ n + rk (A⊗Zp [[Qs ]] Zp ). Then (5.1) completes the proof.  6. Examples In this section we shall present two examples to show that Theorem C fails if the coefficient field Qp is replaced by Fp . We shall then explain an example due to Jeremy King [9] which shows that Theorem C is of interest beyond the setting of finitely presented groups. As we noted in the introduction, finite presentability for pro-p groups is essentially a homological condition. More precisely, a pro-p group G is finitely presented if and only if is of type FP2 . In the pro-p setting, a group G is defined to be of type FPm if, as a trivial Zp [[G]]-module, Zp has a projective resolution with the modules finitely generated in dimensions ≤ m. Since Zp [[G]] is a local ring, it is easy to see that G is of type FPm if and only if the pro-p homology groups Hi (G, Fp ) are finite for i ≤ m. In [8] King showed that if N is a normal pro-p subgroup of G, with G/N of finite rank (in which case Zp [[G/N ]] is left and right Noetherian), then G is of type FPm if and only if Hi (N, Zp ) is finitely generated as a pro-p Zp [[G/N ]]-module for i ≤ m, where the action of G/N is induced by conjugation. In particular, if G is a finitely generated metabelian pro-p group, i.e. there is a short exact sequence of pro-p groups A → G → Q with A and Q abelian, then G will be finitely presented b A is finitely generated as a Zp [[Q]]-module, where Q if and only if H2 (A, Zp ) ∼ = A∧ b A. acts diagonally on the completed exterior square A∧ This criterion for finitely presentability of metabelian pro-p groups plays a crucial role in our examples: it is hidden in our appeals to King’s papers [7], [9]. 6.1. The first example: switching to Fp when p is odd. Suppose p > 2 and consider the pro-p group G = A ⋊ Q where A = Fp [[t]] and Q = hx, yi = Zp × Zp , with x acting as multiplication by 1 + t while y acts as multiplication by 1 + 2t. By i i [9, Thm. A], G is finitely presented. And since (1 + τ )p = 1 + τ p in characteristic p, we have i i i A ⊗Fp [[Qpi ]] Fp ∼ = Fp [[t]]/((1 + t)p − 1, (1 + 2t)p − 1) = Fp [[t]]/(tp ). Hence i sup dimFp (H1 (M, Zp ) ⊗Zp Fp ) ≥ sup dimFp (H1 (A ⋊ Qp , Zp ) ⊗Zp Fp ) = i≥1 M∈A 2 + sup dimFp (A ⊗Fp [[Qpi ]] Fp ) = 2 + sup pi = ∞, i≥1 i≥1 where A is the set of all pro-p subgroups of finite index in G. THE TORSION-FREE RANK OF HOMOLOGY IN TOWERS OF SOLUBLE PRO-p GROUPS11 6.2. The second example: switching to Fp when p = 2. Consider the pro-2 group G = A ⋊ Q, where A = F2 [[t]] and Q = hx, yi = Z2 × Z2 , with x acting as multiplication by 1 + t while y acts as multiplication by 1 + t + t2 . Again, G is finitely presented by [9, Thm. B] and i i i A ⊗F2 [[Q2i ]] F2 ∼ = F2 [[t]]/((1 + t)2 − 1, (1 + t + t2 )2 − 1) = F2 [t]]/(t2 ). Hence i sup dimF2 (H1 (M, Z2 ) ⊗Z2 F2 ) ≥ sup dimF2 (H1 (A ⋊ Q2 , Z2 ) ⊗Z2 F2 ) = M∈A i≥1 2 + sup dimF2 (A ⊗F2 [[Q2i ]] F2 ) = 2 + sup 2i = ∞, i≥1 i≥1 where A is the set of all pro-2 subgroups of finite index in G. 6.3. King’s example. Let p be an odd prime, let Q = hx, yi = Zp × Zp , let A = Fp [[Q]]/(x + x−1 + y + y −1 − 4) and, following [7], consider the pro-p group G = A ⋊ Q. By [7, Prop. 3.4] G is not finitely presented and by [7, Prop. 3.5] for every normal pro-p subgroup N of G such that G/N ∼ = Zp we have that N is finitely generated i.e. d(N ) < ∞. Our aim is to show that sup G/N ∼ =Zp d(N ) < ∞. Theorem C can then be applied to G, even though G is not finitely presented. To this end, observe first that N = A ⋊ H, where H is a pro-p subgroup of Q with Q/H ∼ = Zp . According to Lemma 5.2(i), we will be done if we can bound the dimension of b Fp [[H]] Fp . H0 (H, H1 (A, Fp )) = A⊗ Since the relation that defines A is symmetric with respect to x and y, we can assume that H = hxy −λ i for some λ ∈ Zp . Indeed we have that H = hxi y j i with i, j ∈ Zp such that the ideal of Zp generated by i and j is the whole ring Zp . Then i∈ / pZp or j ∈ / pZp . Since Zp \ pZp is the set of invertible elements in Zp we can assume that i or j is invertible; say i is invertible. Then for λ = −ji−1 H = hxi y j i = h(xy ji −1 )i i = hxy ji i = hxy −λ i. −1 Then b Fp [[H]] Fp ∼ A⊗ = Fp [[Q]]/(x+x−1 +y+y −1 −4, xy −λ −1) ∼ = Fp [[hyi]]/(y λ +y −λ +y+y −1−4) where the last isomorphism sends x to y λ . Since Fp [[hyi]] is the power series ring Fp [[t]] with y = 1 + t we deduce that b F [[H]] Fp ∼ A⊗ = Fp [[t]]/(fλ ) p where fλ = (1 + t)λ + (1 + t)−λ + (1 + t) + (1 + t)−1 − 4. We claim that as λ varies, the first non-zero coefficient of fλ appears in degree less than p, in other words, (6.1) sup inf{i | fλ 6∈ ti+1 Fp [[t]]} < p. λ With this bound in hand, writing f ∈ zti + ti+1 Fp [[t]] with z ∈ Fp \ {0}, we have (f ) = (ti ) and b Fp [[H]] Fp = dimFp Fp [[t]]/(ti ) = i < p. dimFp A⊗ 12 MARTIN R. BRIDSON AND DESSISLAVA H. KOCHLOUKOVA The rest of the proof is devoted to establishing the bound in (6.1). Given λ ∈ Zp , we write λ = z0 + pλ1 and − λ = a0 + pλ2 where z0 , a0 ∈ {0, 1, . . . , p− 1} and λ1 , λ2 ∈ Zp . As (1 + t)pλj = (1 + tp )λj in Fp [[tp ]], we have (1 + t)λ = (1 + t)z0 (1 + t)pλ1 ∈ (1 + t)z0 + tp Fp [[t]] and (1 + t)−λ = (1 + t)a0 (1 + t)pλ2 ∈ (1 + t)a0 + tp Fp [[t]]. Note that if z0 > 0 then a0 + z0 = p. In particular, taking λ = z0 = 1 we have (1 + t)−1 ∈ (1 + t)p−1 + tp Fp [[t]]. In general, (6.2) fλ ∈ gλ + tp Fp [[t]], where gλ = (1 + t)z0 + (1 + t)a0 + (1 + t) + (1 + t)p−1 − 4. To establish (6.1) we must argue that gλ is a non-zero polynomial. If z0 = 0 then a0 = 0 and gλ = t + (1 + t)p−1 − 1, which is a non-zero element of Fp [t] because p > 2. If z0 > 0 then gλ = (1 + t)z0 + (1 + t)p−z0 + (1 + t) + (1 + t)p−1 − 4, which is again non-zero. This completes the proof. By calculating with binomial coefficients, one can replace (6.1) by a bound that is independent of p > 2. References [1] Corob Cook, Ged; Bieri-Eckmann Criteria for Profinite Groups, to appear in Israel Journal of Mathematcs, arXiv 1412.1703v2 [2] Bourbaki, Nicolas; Commutative algebra. Chapters 1 - 7. Elements of Mathematics (Berlin). Springer-Verlag, Berlin, 1998. [3] Bieri, Robert; Neumann, Walter D.; Strebel, Ralph; A geometric invariant of discrete groups. Invent. Math. 90 (1987), no. 3, 451–477. [4] Bridson M.R.; Kochloukova D.; The virtual first Betti number of soluble groups, Pacific J. Math., 274 (2015), 497–510. [5] Eisenbud, D.; Commutative algebra: With a view toward algebraic geometry. Graduate Texts in Mathematics, 150. Springer-Verlag, New York, 1995. [6] Jaikin Zapirain, A. Unpublished note [7] King, Jeremy D.; A geometric invariant for metabelian pro-p groups. J. London Math. Soc. (2) 60 (1999), no. 1, 83–94. [8] King, Jeremy D.; Homological finiteness conditions for pro-p groups. Comm. Algebra 27 (1999), no. 10, 4969–4991. [9] King, Jeremy D.; Embedding theorems for pro-p groups. Math. Proc. Cambridge Philos. Soc. 123 (1998), no. 2, 217–226. [10] Lazard, M.; Groupes analytiques p-adiques, Publ. Math. IHES, 26 (1965), 389–603. [11] Ribes, L.; Zalesskii, P. Profinite groups. Second edition. 40. Springer-Verlag, Berlin, 2010 [12] Wilson, John S. Finite presentations of pro-p groups and discrete groups. Invent. Math. 105 (1991), no. 1, 177-183 [13] Wilson, John S. Profinite groups. London Mathematical Society Monographs. New Series, 19. The Clarendon Press, Oxford University Press, New York, 1998 [14] Dixon, J. D.; du Sautoy, M. P. F.; Mann, A.; Segal, D. Analytic pro-p-groups. London Mathematical Society Lecture Note Series, 157. Cambridge University Press, Cambridge, 2003 THE TORSION-FREE RANK OF HOMOLOGY IN TOWERS OF SOLUBLE PRO-p GROUPS13 Mathematical Institute, Andrews Wiles Building, University of Oxford, Oxford OX2 6GG, UK E-mail address: [email protected] Department of Mathematics, State University of Campinas (UNICAMP), 13083-859, Campinas, SP, Brazil E-mail address: [email protected]
4math.GR
Proceedings of Machine Learning Research vol 65:1–37, 2017 Algorithmic Chaining and the Role of Partial Feedback in Online Nonparametric Learning Nicolò Cesa-Bianchi NICOLO . CESA - BIANCHI @ UNIMI . IT arXiv:1702.08211v2 [stat.ML] 30 Jun 2017 Università degli Studi di Milano, Milano, Italy Pierre Gaillard PIERRE . GAILLARD @ INRIA . FR INRIA - Sierra Project-team, Département d’Informatique de l’École Normale Supérieure, Paris, France Claudio Gentile CLAUDIO . GENTILE @ UNINSUBRIA . IT Università degli Studi dell’Insubria, Varese, Italy Sébastien Gerchinovitz SEBASTIEN . GERCHINOVITZ @ MATH . UNIV- TOULOUSE . FR Université Toulouse III - Paul Sabatier, Toulouse, France Abstract We investigate contextual online learning with nonparametric (Lipschitz) comparison classes under different assumptions on losses and feedback information. For full information feedback and Lipschitz losses, we design the first explicit algorithm achieving the minimax regret rate (up to log factors). In a partial feedback model motivated by second-price auctions, we obtain algorithms for Lipschitz and semi-Lipschitz losses with regret bounds improving on the known bounds for standard bandit feedback. Our analysis combines novel results for contextual second-price auctions with a novel algorithmic approach based on chaining. When the context space is Euclidean, our chaining approach is efficient and delivers an even better regret bound. Keywords: online learning, nonparametric, chaining, bandits. 1. Introduction In online learning (Cesa-Bianchi and Lugosi, 2006; Shalev-Shwartz, 2011; Hazan, 2015) an agent (or learner) interacts with an unknown and arbitrary environment in a sequence of rounds. At each round, the learner chooses an action from a given action space and incurs the loss associated with the chosen action. The loss functions, which are different in each round, are fixed by the environment at the beginning of the interaction. After choosing an action, the learner observes some feedback, which can be used to reduce his loss in subsequent rounds. A variety of different feedback models are discussed in the literature. The most common feedback model is full information, also known as prediction with expert advice, where the learner gets access to the entire loss function at the end of each round. Another common feedback model is bandit information, where the learner just observes the loss assigned to the action chosen in the current round. Feedback models in between full and bandit information are also possible, and can be used to describe many interesting online learning applications —see e.g., (Alon et al., 2014, 2015). The performance of an online learner is measured using a notion of regret, which is typically defined as the amount by which the learner’s cumulative loss exceeds the cumulative loss of the best fixed action in hindsight. Accepted . for presentation at Conference on Learning Theory (COLT) 2017. c 2017 N. Cesa-Bianchi, P. Gaillard, C. Gentile & S. Gerchinovitz. C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Online contextual learning is a generalization of online learning where the loss functions generated by the environment are paired with contexts from a given context space. On each round, before choosing an action, the learner observes the current context. In the presence of contextual information, the learner’s regret is no longer defined against the best action in hindsight, but rather against the best policy (i.e., mapping from the context space to the action space) in a given reference class of policies. In agreement with the online learning framework, online contextual learning is nonstochastic. Namely, regret bounds must hold for arbitrary sequences of contexts and losses. In order to capture complex environments, the reference class of policies should be as large as possible. In this work, we focus on nonparametric classes of policies, such as classes containing policies that are Lipschitz with respect to metrics defined on the context and action spaces. The best possible (minimax) growth rate of the regret, as a function of the number T of rounds, is then determined by the interplay among the richness of the policy class, the constraints on the loss functions (e.g., Lipschitz, convex, etc.), and the type of feedback information (full, bandit, or in between). Whereas most of the previous works study online nonparametric learning with convex losses, in this paper we investigate nonparametric regret rates for general Lipschitz losses (in fact, some of our results apply to an even larger class of loss functions). In the full information setting, a very general yet simple algorithmic approach to online nonparametric learning with convex and Lipschitz losses was introduced by Hazan  and Megiddo (2007). For e T (d+1)/(d+2) upper bound1 on the regret any reference class of Lipschitz policies, they proved a O e notation hides logarithmic factors in T . In for any context space of metric dimension d, where the O  (d−1)/d the same work, they also proved a Ω T lower bound. The gap between the upper and lower bound was closed by Rakhlin et al. (2015) for arbitrary Lipschitz (not necessarily convex) losses, showing that T (d−1)/d is indeed the minimax rate for full information. Yet, since their approach is nonconstructive, they did not give an explicit algorithm achieving this bound. As noted elsewhere —see, e.g., (Slivkins, 2014)—  the approach of Hazan and Megiddo (2007) e T (d+p+1)/(d+p+2) upper bound on the regret against any class can be also adapted to prove a O of Lipschitz policies in the bandit information setting with Lipschitz losses, where p is the metric  dimension of the action space. The lower bound Ω T (p+1)/(p+2) proven for d = 0 (Bubeck et al., 2011a; Kleinberg et al., 2008) rules out the possibility of improving the dependence on p in the upper bound. Our contributions. In the full information model, we show the first explicit algorithm achieving  e T (d−1)/d for Lipschitz policies and Lipschitz losses (excluding logathe minimax regret rate O rithmic factors in T and polynomial factors in the metric dimension of the action space). When the context space is [0, 1]d , our algorithm can be implemented efficiently (i.e., with a running time polynomial in T ). Motivated by a problem in online advertising where the action space is the [0, 1] interval, we also study a “one-sided” full information model in which the loss of each action greater than or equal to the chosen action is available to the learner after each round. For this feedback model, which lies between full and bandit information, we prove a regret bound for Lipschitz policies and  e T d/(d+1) , which is larger than the minimax regret for full information Lipschitz losses of order O but smaller than the upper bound for bandit information when p = 1. For the special case when the 1. This bound has a polynomial dependence on the metric dimension of the action space, which is absorbed by the asymptotic notation. 2 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING context space is [0, 1]d , we use a specialized approach offering the double advantage of an improved e T (d−1/3)/(d+2/3) regret bound which is also attained by a time-efficient algorithm. O We then study a concrete application for minimizing the seller’s regret in contextual secondprice auctions with reserve price, a setting where the loss function is not Lipschitz but only semiLipschitz. When the feedback after each auction is the  seller’s revenue together with the highest bid e T (d+1)/(d+2) regret bound against Lipschitz policies (in this for the current auction, we prove a O setting, √ a policy maps contexts to reserve prices for the seller). As a by-product, we show the first e O T regret bound on the seller’s revenue in context-free second-price auctions under the same feedback model as above. Table 1 summarizes our results. Feedback model Bandit One-sided full information Loss functions Lipschitz Convex T d+1 T d+2 Semi-Lipschitz T d+2 Lipschitz Full information Upper bound d+2 d+3 Lipschitz d+1 T T d−1/3 d+2/3 d−1 d (Theorem 1) (Corollary 2) (Theorem 3) (Theorem 6) (Theorem 7) Table 1: Some regret bounds obtained in this paper. The rates are up to logarithmic factors for Lipschitz policies f : [0, 1]d → [0, 1] with d > 2. All upper bounds are constructive (i.e., achieved by explict algorithms). The only matching lower bound is the one for full information feedback due to Hazan and Megiddo (2007). In order to prove our results, we approximate the action space using a finite covering (finite coverability is a necessary condition for our results to hold). This allows us to use the many existing algorithms for experts (full information feedback) and bandits when the action space is finite, such as Hedge (Freund and Schapire, 1997) and Exp3/Exp4 (Auer et al., 2002). The simplest of our algorithms, adapted from Hazan and Megiddo (2007), incrementally covers the context space with balls of fixed radius. Each ball hosts an instance of an online learning algorithm which predicts in all rounds when the context falls into the ball. New balls are adaptively created when new contexts are observed which fall outside the existing balls (see Algorithm 1 for an example). We use this simple construction to prove the regret bound for contextual second-price auctions, a setting where losses are not Lipschitz. In order to exploit the additional structure provided by Lipschitz losses, we resort to more sophisticated constructions based on chaining (Dudley, 1967). In particular, inspired by previous works in this area (especially the work of Gaillard and Gerchinovitz, 2015), we design a chaining-inspired algorithm applied to a hierarchical covering of the policy space. Despite we are not the first ones to use chaining algorithmically in online learning, our idea of constructing a hierarchy of online learners, where each node uses its children as experts, is novel in this context as far as we know. Finally, the time-efficient algorithm achieving the improved regret bound is derived from a different (and more involved) chaining algorithm based on wavelet-like approximation techniques. Setting and main definitions. We assume the context space X is a metric space (X , ρX ) of finite metric dimension d and the action space Y is a metric space (Y, ρY ) of finite metric dimension p. 3 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Hence, there exist CX , CY > 0 such that, for all 0 < ε 6 1, X and Y can be covered, respectively, with at most CX ε−d and at most CY ε−p balls of radius ε. For any 0 < ε 6 1, we use Yε to denote any ε-covering of Y of size Kε 6 CY ε−p . Finally, we assume that Y has diameter bounded by 1 with respect to metric ρY . We consider the following online learning protocol with oblivious adversary and loss functions ℓt : Y → [0, 1]. Given an unknown sequence (x1 , ℓ1 ), (x2 , ℓ2 ), . . . of contexts xt ∈ X and loss functions ℓt : Y → [0, 1], for every round t = 1, 2, . . . : 1. The environment reveals context xt ∈ X ;  2. The learner selects an action ybt ∈ Y and incurs loss ℓt ybt ; 3. The learner obtains feedback from the environment. Loss functions ℓt satisfy the 1-Lipschitz2 condition ℓt (y) − ℓt (y ′ ) 6 ρY (y, y ′ ) for all y, y ′ ∈ Y. However, we occasionally consider losses satisfying a weaker semi-Lipschitz condition. We study three different types of feedback: bandit feedback (the learner only observes the loss ℓt (b yt ) of the selected action ybt ), full information feedback (the learner can compute ℓt (y) for any y ∈ Y), and one-sided full information feedback (Y ≡ [0, 1], and the learner can compute ℓt (y) if and only if y > ybt ). Given a reference class F ⊆ Y X of policies, the learner’s goal is to minimize the regret against the best policy in the class, " T # T X X   ℓt ybt − inf RegT (F) , E ℓt f (xt ) , f ∈F t=1 t=1 where the expectation is with respect to the learner’s internal randomization. We derive regret bounds for the competitor class F made up of all bounded functions f : X → Y that are 1Lipschitz3 w.r.t. ρX and ρY . Namely, ρY f (x), f (x′ ) 6 ρX (x, x′ ) for all f ∈ F and all x, x′ ∈ X . We occasionally use the dot product notation pt · ℓt to indicate the expectation of ℓt according to law pt . Finally, the set of all probability distributions over a finite set of K elements is denoted by ∆(K). Organization of the paper. The rest of the paper is organized as follows. In Section 2, we give an overview of the related literature. Then, starting from the subsequent section, our results are presented in the order dictated by the amount of feedback available to the learner, from bandit feedback (Section 3) to one-sided full information feedback (Section 4) to full information feedback (Section 5). 2. Related Work Contextual online learning generalizes online convex optimization (Hazan, 2015) to nonconvex losses, nonparametric policies, and partial feedback. Papers about nonparametric online learning in full information include (Vovk, 2007; Gaillard and Gerchinovitz, 2015) for the square loss, and (Hazan and Megiddo, 2007; Rakhlin and Sridharan, 2015) for general convex losses. In the bandit 2. Assuming a unit Lipschitz constant is without loss of generality because our algorithms are oblivious to it. 3. Assuming a unit Lipschitz constant Lf for the functions in f ∈ F is also without loss of generality because our algorithms are oblivious to it. The only exception is algorithm HierExp4⋆ of Section 4.3, which is only guaranteed to work with unit Lipschitz constants. However, a similar regret bound can be achieved for arbitrary (yet known) values of Lf via a simple modification—see also (Bubeck et al., 2011b) for regret bounds optimized for Lf in a stochastic and non-contextual bandit setting when Lf is unknown. 4 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING feedback model, earlier work on context-free bandits on metric spaces includes (Kleinberg, 2004; Kleinberg et al., 2008). The paper (Auer et al., 2002) introduces the Exp4 algorithm for nonstochastic contextual bandits when both the action space and the policy space are finite, and policies are maps from contexts to distributions over actions. Moreover, rather than observing the current context, the learner sees the output of each policy for that context. In the contextual bandit model of Maillard and Munos (2011), context space and action space are finite, and the learner observes the current context while competing against the best policy among all functions mapping contexts to actions. Finally, a nonparametric bandit setting related to ours was studied by Slivkins (2014). We refer the reader to the discussion after Theorem 1 for connections with our results. Chaining (Dudley, 1967) is a powerful technique to obtain tail bounds on the suprema of stochastic processes. In nonparametric online learning with full information feedback, chaining was used constructively by Cesa-Bianchi and Lugosi (1999) to design an algorithm for linear losses, and nonconstructively by Rakhlin et al. (2015) to derive minimax rates for Lipschitz losses. Other notable examples of chaining are the stochastic bandit algorithms of Contal et al. (2015) and Contal and Vayatis (2016). The constructive algorithmic chaining technique developed in this work is inspired by the nonparametric analysis of the full information setting of Gaillard and Gerchinovitz (2015). However, their multi-variable EG algorithm heavily relies on convexity of losses and requires access to loss gradients. In order to cope with nonconvex losses and lack of gradient information, we develop a novel chaining approach based on a tree of hierarchical coverings of the policy class, where each internal tree node hosts a bandit algorithm. In our nonstochastic online setting, chaining yields improved rates when the regret is decomposed into a sum of local regrets, each one scaling with the range of the local losses. However, deriving regret bounds that scale with the effective range of the losses is not always possible, as shown by Gerchinovitz and Lattimore (2016) in the nonstochastic K-armed bandit setting. This result suggests that chaining might not be useful in online nonparametric learning when the feedback is bandit. However, as we show in this paper, algorithmic chaining does help improving the regret when the feedback is one-sided full information or full information. In full information, chainingbased algorithms deliver regret bounds that match (up to log factors) the nonconstructive bounds of (Rakhlin et al., 2015). In a different but interesting research thread on contextual bandits, the learner is confronted with the best within a finite (but large) class of policies over finitely-many actions, and is assumed to have access to this policy class through an optimization oracle for the offline full information problem. Relevant references include (Agarwal et al., 2014; Rakhlin and Sridharan, 2016; Syrgkanis et al., 2016). The main concern is to devise (oracle-based) algorithms with small regret and requiring as few calls to the optimization oracle as possible. 3. Warmup: Nonparametric Bandits As a simple warmup exercise, we prove a known result —see e.g., (Slivkins, 2014). Namely, a regret bound for contextual bandits with Lipschitz policies and Lipschitz losses. ContextualExp3 (Algorithm 1) is a bandit version of the algorithm by Hazan and Megiddo (2007) and maintains a set of balls of fixed radius ε in the context space, where each ball hosts an instance of the Exp3 5 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ algorithm of Auer et al. (2002).4 At each round t, if a new incoming context xt ∈ X is not contained in any existing ball, then a new ball centered at xt is created, and a fresh instance of Exp3 is allocated to handle xt . Otherwise, the Exp3 instance associated with the closest context so far w.r.t. ρX is used to handle xt . Each allocated Exp3 instance operates on the discretized action space Yε whose size Kε is at most CY ε−p . For completeness, the proof of the following theorem is provided in Algorithm 1: ContextualExp3 (for bandit feedback) Input: Ball radius ε > 0, ε-covering Yε of Y such that |Yε | ≤ CY ε−p . for t = 1, 2, . . . do 1. Get context xt ∈ X ; 2. If xt does not belong to any existing ball, then create a new ball of radius ε centered on xt , and allocate a fresh instance of Exp3; 3. Let the active Exp3 instance be the instance allocated to the existing ball whose center xs is closest to xt ; 4. Draw an action ybt using the active Exp3 instance;  5. Get ℓt ybt and use it to update the active Exp3 instance. end Appendix B. Theorem 1 Fix any any sequence (x1 , ℓ1 ), (x2 , ℓ2 ), . . . of contexts xt ∈ X and 1-Lipschitz loss functions ℓt : Y → [0, 1]. If ContextualExp3 is run in the bandit feedback model with parameter5 2 1 ε = (ln T ) p+d+2 T − p+d+2 , then its regret RegT (F) with respect to the set F of 1-Lipschitz functions p+d+1  e T p+d+2 , where the O e notation hides factors polynomial in f : X → Y satisfies RegT (F) = O CX and CY , and ln T factors. A lower bound matching up to log factors the upper bound of Theorem 1 is contained in (Slivkins, 2014) —see also (Lu et al., 2010) for earlier results in the same setting. However, our setting and his are subtly different: the adversary of Slivkins (2014) uses more general Lipschitz losses which, translated into our context, imply that the Lipschitz assumption is required to hold only for the composite function ℓt (f (·)), rather than the two functions ℓt and f separately. Hence, being the adversary less constrained (and the comparison class wider), the lower bound contained in (Slivkins, 2014) does not seem to apply to our setting. While we are unaware of a lower bound matching the upper bound in Theorem 1 when F is the class of (global) Lipschitz functions and d > 1, in the noncontextual case (d = 0), the  lower bound Ω T (p+1)/(p+2) proven by Bubeck et al. (2011a); Kleinberg et al. (2008) shows that improvements on the dependence on p are generally impossible. Yet, the dependence on p in the bound of Theorem 1 can be greatly improved in the special case when the Lipschitz losses are also convex. Assume Y is a convex and compact subset of Rp . Then we use the same approach as in Theorem 1, where the Exp3 algorithm hosted at each ball is replaced by an instance of the algorithm 4. Instead of Exp3 we could use INF (Audibert and Bubeck, 2010), which enjoys a minimax optimal regret bound up to constant factors. This would avoid a polylog factor in T in the bound. Since we do not optimize for polylog factors anyway, we opted for the better known algorithm. 5. Here and throughout, T is assumed to be large enough so as to ensure ε 6 1. 6 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING action space Y. The regret of the algorithm that by Bubeck et al. (2016), run on the non-discretized √ replaces Exp3 is bounded by poly(p, ln T ) T . This immediately gives the following corollary. Corollary 2 Fix any any sequence (x1 , ℓ1 ), (x2 , ℓ2 ), . . . of contexts xt ∈ X and convex loss functions ℓt : Y → [0, 1], where Y is a convex and compact subset of Rp . Then there exists an algorithm for the bandit feedback model whose regret with respect to the set F of 1-Lipschitz functions satisfies RegT (F) 6 poly(p, ln T )T (d+1)/(d+2) , where poly is a polynomial function of its arguments. 4. One-Sided Full Information Feedback In this section we show that better nonparametric rates can be achieved in the one-sided full information setting, where the feedback is larger than the standard bandit feedback but smaller than the full information feedback. More precisely, we consider the same setting as in Section 3 in the special case when the action space Y is [0, 1]. We further assume that, after each play ybt ∈ Y, the learner can compute the loss ℓt (y) of any number of actions y > ybt . This in contrast to observing only ℓt ybt , as in the standard bandit setting. We start with an important special case: maximizing the seller’s revenue in a sequence of repeated second-price auctions. In Section 4.2, we use the chaining technique to design a general algorithm for arbitrary Lipschitz losses in the one-sided full information model. An efficient variant of this algorithm is obtained using a more involved construction in Section 4.3. 4.1. Nonparametric second-price auctions In online advertising, publishers sell their online ad space to advertisers through second-price auctions managed by ad exchanges. For each impression (ad display) created on the publisher’s website, the ad exchange runs an auction on the fly. Empirical evidence (Ostrovsky and Schwarz, 2011) shows that an informed choice of the seller’s reserve price, disqualifying any bid below it, can indeed have a significant impact on the revenue of the seller. Regret minimization in second-price auctions was studied by Cesa-Bianchi et al. (2015) in a non-contextual setting. They showed that, when buyers draw their bids i.i.d. from the same unknown distribution on [0, 1], there exists √ an efe T with ficient strategy for setting reserve prices such that the seller’s regret is bounded by O high probability with respect to the bid distribution. Here we extend those results to a nonstochastic and nonparametric contextual setting with nonstochastic bids, and prove a regret bound of order T (d+1)/(d+2) where d is the context space dimension. This improves on the bound T (d+2)/(d+3) of Theorem 1 when p = 1. As a byproduct, in Theorem 3 (Appendix C) we prove the first √  e T regret bound for the seller in nonstochastic and noncontextual second-price auctions. UnO like (Cesa-Bianchi et al., 2015), where the feedback after each auction was “strictly bandit” (i.e., just the seller’s revenue), here we assume the seller is also observing the highest bid together with the revenue. This richer feedback, which is key to proving our results, is made available by some ad exchanges such as AppNexus. The seller’s revenue in a second-price auction is computed as follows: if the reserve price yb is not larger than the second-highest bid b(2), then the item is sold to the highest bidder and the seller’s revenue is b(2). If yb is between b(2) and the highest bid b(1), then the item is sold to the highest bidder but the seller’s revenue is the reserve price. Finally, if yb is bigger than b(1), thenthe item is not sold and the seller’s revenue is zero. Formally, the seller’s revenue is g yb, b(1), b(2) = 7 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ  max yb, b(2) Iyb≤b(1) . Note that the revenue only depends on the reserve price yb and on the two highest bids b(1) ≥ b(2), which —by assumption— belong all to the unit interval [0, 1]. In the online contextual version of the problem, unknown sequences of contexts x1 , x2 , . . . ∈ X and bids are fixed beforehand (in the case of online advertising, the context could be public information about the targeted customers). At the beginning of each auction t = 1, 2, . . . , the seller observes context xt and computes a reserve price ybt ∈ [0, 1]. Then, bids bt (1), bt (2) are collected by the auctioneer, and the seller (which is not the same as the auctioneer) observes his revenue yt ) and bt (1) gt ybt = g ybt , bt (1), bt (2) , together with the highest bid bt (1). Crucially, knowing gt (b allows to compute gt (y) for all y > ybt . For technical reasons, we use losses ℓt ybt = 1 − gt ybt instead of revenues, see Figure 1 for a pictorial representation. 1 0.8 0.6 1 − bt (2) 1 − bt (1) 0.4 0.2 0 0 0.2 0.4 0.6 bt (2) 0.8 1 bt (1) Figure 1: The loss function ℓt (b yt ) = 1−max{b yt , bt (2)}Iybt ≤bt (1) when bt (1) = 0.7 and bt (2) = 0.5. Remarkably, the loss functions ℓt are not Lipschitz and not even continuous, and so this problem falls outside the scope of standard results for contextual bandits. Instead, the losses only satisfy the semi-Lipschitz property ℓt (y + δ) ≥ ℓt (y) − δ for all 0 6 y 6 y + δ 6 1. We now state a bound on the regret RegT (F) with respect to any class F of Lipschitz functions f : X → [0, 1]. The algorithm that achieves this bound is ContextualRTB (where RTB stands for Real Time Bidding —see Algorithm 3 in Appendix C), a variant of ContextualExp3 (Algorithm 1), where each ball hosts an instance of Exp3-RTB, instead of Exp3. The proof is given in Appendix D. Theorem 3 Fix any sequence of contexts xt ∈ X and1 bid pairs 0 6 bt (2) 6 bt (1) 6 1 for t > 1. If ContextualRTB is run with parameter ε = T − d+2 and Exp3-RTB is tuned with parameter γ = ε, then the regret with respect to any class of 1-Lipschitz functions f : X → [0, 1] satisfies d+1  e T d+2 , where d is the dimension of X and the O e notation hides constants and ln T RegT (F) = O factors. ContextualRTB and ContextualExp3 of Section 3 can be modified so to avoid knowing the horizon T and so that the dimension d of the context space is replaced in the bound by the (unknown, and possibly much smaller) dimension of the set of contexts actually occurring in the sequence chosen by the adversary. This modification involves using a time-varying radius ε and a doubling trick to check when the current guess for the dimension is violated by the current number of balls. The omitted proof of this statement goes along the lines of the proof in (De Rosa et al., 2015, Theorem 1). 8 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING 4.2. Chaining the bandits We now show that whenever the richer feedback structure —i.e., the learner can compute the loss ℓt (y) of any number of actions y > ybt — is combined with Lipschitz losses (rather than just semiLipschitz), then an improved regret bound T d/(d+1) can be derived. The key technical idea enabling this improvement is the application of the chaining technique to a hierarchical covering of the policy space (as opposed to the flat covering of the context space used in both Section 3 and Section 4.1). We start with a computationally inefficient algorithm that works for arbitrary policy classes F (not only Lipschitz) and is easier to understand. In Section 4.3 we derive an efficient variant for F that are Lipschitz. In this case we obtain even better regret bounds via a penalization trick. A way of understanding the chaining approach is to view the hierarchical covering of the policy class F as a tree whose nodes are functions in F, and where the nodes at each depth m define a (2−m )-covering of F. The tree represents any function f ∗ ∈ F (e.g., the function with the smallest cumulative loss) by a unique path (or chain) f0 → f1 → · · · → fM → f ∗ , where f0 is the root and fM is the function best approximating f ∗ in the cover at the largest available depth M . By relying on this representation, we control the regret against any function in F by running an instance of an online bandit algorithm A on each node of the tree. The instance Af at node f uses the predictions of the instances running on the nodes that are children of f as expert advice. The action drawn by instance A0 running on the root node is the output of the tree. For any given sequence of pairs (xt , ℓt ) of contexts and losses, the regret against f ∗ with path f0 → f1 → · · · → fM → f ∗ can then be written (ignoring some constants) as # " T −1 T    M X X X      + 2−M T ℓt Am (xt ) − ℓt Am+1 (xt ) E E ℓt A0 (xt ) − ℓt f ∗ (xt ) 6 t=1 m=0 t=1 where Am is the instance running on node fm for m = 0, . . . , M − 1 and AM ≡ fM . The last term 2−M T accounts for the cost of approximating f ∗ with the closest function fM in a (2−M )cover of F under suitable Lipschitz assumptions. The outer sum in the right-hand side of the above display can be viewed as a sum of M regrets, where the m-th term in the sum is the regret of Am against the instances running on the children of the node hosting Am . Since we face an expert learning problem in a partial information setting, the Exp4 algorithm of Auer et al. (2002) is a natural choice for the learner A. However, a first issue to consider is that we are using A0 to draw actions in the bandit problem, and so the other Exp4 instances receive loss estimates that are based on the distribution used by A0 rather than being based on their own distributions. A second issue is that our regret decomposition crucially relies on the fact that each instance Am only competes (in the sense of regret) against functions f at the leaves of the subtree rooted at the node where Am runs. By construction, these functions at the leaves are roughly (2−m )-close to each other and —by Lipschitzness— so are their losses. As a consequence, the regret of Am should scale with the true loss range 2−m . Via an appropriate modification of the original Exp4 algorithm, we manage to address both these issues. In particular, in order to make the regret dependent on the loss range, we heavily rely on the one-sided full information model assumed in this section. Finally, the hierarchical covering requires that losses be Lipschitz, rather than just semi-Lipschitz as in the application of Subsection 4.1, which uses a simpler flat covering. Fix any class F of functions f : X → [0, 1]. Let us introduce the sup norm kf − gk∞ = sup f (x) − g(x) . x∈X 9 (1) C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ  We denote by N∞ F, ε the cardinality of the smallest ε-cover  of F w.r.t. the sup norm. Throughout this section, our only assumption on F is that N∞ F, ε < +∞ for all ε > 0 (this is  property d known as total boundedness). In Section 4.3 we will focus on the special case F = f : [0, 1] → [0, 1] : f is 1-Lipschitz to derive an efficient version of our algorithm. We now define a tree TF of depth M , whose nodes are labeled by functions in the class F, so that functions corresponding to nodes with a close common ancestor are close to one another according to the sup norm (1). For all m = 0, 1, . . . , M , let Fm be a (2−m )-covering of F in sup norm with minimal cardinality Nm = N∞ (F, 2−m ). Since the diameter of (F, k·k∞ ) is bounded by 1, we have N0 = 1 and F0 = {f0 } for some f0 ∈ F. For each m = 0, 1, . . . , M and for every fv ∈ Fm we have a node v in TF at depth m. The parent of a node w at depth m + 1 is some node v at depth m such that v∈ arg min v′ : depth(v′ )=m kfv′ − fw k∞ (ties broken arbitrarily) and we say that w is a child of v. Let L be the set of all the leaves of TF , Lv be the set of all the leaves under v ∈ TF (i.e., the leaves of the subtree rooted at v), and Cv be the set of children of v ∈ TF . u Level m 2−m covering of F Level m + 1 2−(m+1) covering Exp4 ... .. .. ... Exp4 . v . . Exp4 .. .. . ... ... w Level M (=leaves L) 2−M covering Leaves under v = Lv Figure 2: Hierarchical covering of the function space (used in Algorithm 2). Our new bandit algorithm HierExp4 (Algorithm 2 below) is a hierarchical composition of instances of Exp4 on the tree TF constructed above (see Figure 2). Let K = 2M and K = {y1 , . . . , yK }, where yk = 2−M (k − 1) for k = 1, . . . , 2M , be our discretization of the action space Y = [0, 1]. At every round t, after observing context xt ∈ X , each leaf v ∈ L recommends the best approximation of fv (xt ) in K, it (v) ∈ arg mini=1,...,K yi − fv (xt ) . Therefore, the leaves v ∈ L correspond to deterministic strategies t 7→ it (v), and we will find it convenient to view a set of leaves L as the set of actions played by those leaves at time t. Each internal node v ∈ TF \ L runs an instance of Exp4 using the children of v as experts. More precisely, we use a variant of Exp4 (see Algorithm 4 in Appendix E) which adapts to the effective range of the losses. Let Exp4v be the instance of the Exp4 variant run on node v. At each time t, this instance updates a distribution qt (v, ·) ∈ ∆(|C Pv |) over experts in Cv and a distribution pt (v, ·) ∈ ∆(K) over actions in K defined by pt (v, i) = w∈Cv qt (v, w)pt (w, i). Let v0 be the root of TF . The prediction of HierExp4 at time t is ybt = yIt ∈ K, where It is drawn according to a mixture of pt (v0 , ·) and a unit mass on the minimal action y1 ∈ K. For each v ∈ TF \ L, let Kt (v) = {i : (∃w ∈ Cv ) pt (w, i) > 0} and jt (v) = max Kt (v). Note that ℓbt (v, i) in (2) has to be explicitly computed only for those actions i such that i > It and 10 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING i ∈ Kt (v). This is because ℓbt (v, i) is needed for the computation of ℓet (v, w) only when pt (w, i) > 0. Therefore, whenever ℓbt (v, i) has to be computed for some i, then It 6 i 6 max Kt (v) = jt (v), so  that ℓt yjt (v) is observed and ℓbt (v, i) is well defined. Algorithm 2: HierExp4 (for one-sided full information feedback) Input : Tree TF with root v0 and leaves L, exploration parameter γ ∈ (0, 1), learning rate sequences η1 (v) > η2 (v) > · · · > 0 for v ∈ TF \ L. Initialization: Set q1 (v, ·) to the uniform distribution in ∆(|Cv |) for every v ∈ TF \ L. for t = 1, 2, . . . do 1. Get context xt ∈ X ; 2. Set pt (v, i) = Ii=it (v) for all i ∈ K and for all v ∈ L; 3. Set pt (v, i) = qt (v, ·) · pt (·, i) for all i ∈ K and for all v ∈ TF \ L; 4. Draw It ∼ p∗t and play ybt = yIt , where p∗t (i) = (1 − γ)pt (v0 , i) + γIi=1 for all i ∈ K; 5. Observe ℓt (y) for all y > yIt ; 6. For every v ∈ TF \ L and for every i ∈ Kt (v) compute  ℓt (yi ) − ℓt yjt (v) ℓbt (v, i) = IIt 6i , Pi ∗ k=1 pt (k) end where Kt (v) = {i : (∃w ∈ Cv ) pt (w, i) > 0} and jt (v) = max Kt (v). 7. For each v ∈ TF \ L and for each w ∈ Cv compute the expert loss ℓet (v, w) = pt (w, ·) · ℓbt (v, ·) and perform the update   P exp −ηt+1 (v) ts=1 ℓes (v, w)   qt+1 (v, w) = P Pt e ′) exp −η (v) ℓ (v, w ′ t+1 s=1 s w ∈Cv Next, we show that the regret of HierExp4 is at most of the order of T d/(d+1) , which improves on the rate T (d+1)/(d+2) obtained in Section 4.1 without using chaining. The required proofs are contained in Appendix F. Theorem 4 Fix any class F of functions f : X → [0, 1] and any sequence (x1 , ℓ1 ), (x2 , ℓ2 ), . . . of contexts xt ∈ X and 1-Lipschitz loss functions ℓt : [0, 1] → [0, 1]. Assume the HierExp4 (Algorithm 2) is run with one-sided full information feedback using tree TF of depth M = ⌊ln2 (1/γ)⌋. Moreover, the learning rate ηt (v) used at each node v at depth m = 0, . . . , M − 1 is given by (11) in Appendix E, where Vet−1 (v) is the cumulative variance of ℓes (v, ·) according to qs (v, ·) up to time s = t − 1. Then for all T > 1 the regret satisfies ! Z 1/2 s  1 T 7 RegT (F) 6 5γT + 2 ln N∞ (F, ε) + 1 dε . ln N∞ (F, ε) + γ γ γ/2 In particular, if X ≡ [0, 1]d is endowed with the sup norm ρX (x, x′ ) = kx − x′ k∞ , then the set F of all 1-Lipschitz functions from X to [0, 1] satisfies ln N∞ (F, ε) . ε−d . Theorem 4 thus entails the following corollary. 11 (2) (3) C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Corollary 5 Under the assumptions of Theorem 4, if F is f : [0, 1]d → [0, 1], then the regret of HierExp4 satisfies    O T 2/3  RegT (F) = O T 2/3 (ln T )2/3  O T d/(d+1) the set of all 1-Lipschitz functions if d = 1 if d = 2 if d > 3 where the last inequality is obtained by optimizing the choice of γ for the different choices of d. 4.3. Efficient chaining Though very general, HierExp4 (Algorithm 2) may be very inefficient. For example, when F is the d set of all 1-Lipschitz  functions from [0, 1] to [0, 1], a direct implementation of HierExp4 would require exp poly(T ) weight updates at every round. In this section we tackle the special case when F is the class of all 1-Lipschitz functions f : [0, 1]d → [0, 1] w.r.t. the sup norm on [0, 1]d (for simplicity). We construct an ad-hoc hierarchical covering of F and define a variant of HierExp4 whose running time at every round is polynomial in T . We rely on a well-known wavelet-like approximation technique which was used earlier —see, e.g., (Gaillard and Gerchinovitz, 2015)— for online nonparametric regression with full information feedback. However, we replace their multi-variable Exponentiated Gradient algorithm, which requires convex losses and gradient information, with a more involved chaining algorithm that still enjoys a polynomial running time. The definitions of our covering tree TF⋆ and of our algorithm HierExp4⋆ , as well as the proof of the following regret bound, can be found in Appendix G. The exact value of cT (depending at most logarithmically on T ) is also provided there. Theorem 6 Let F be the set of all 1-Lipschitz functions f : [0, 1]d → [0, 1] w.r.t. the sup norm on [0, 1]d . Consider T > 3 and any sequence (x1 , ℓ1 ), . . . , (xT , ℓT ) of contexts xt ∈ [0, 1]d and 1-Lipschitz loss functions ℓt : [0, 1] → [0, 1]. Assume HierExp4⋆ (Algorithm 5 in Appendix G) is run with one-sided full information feedback using tree TF⋆ of depth M = ⌈ln2 (1/γ)⌉, exploration 1 1 d parameter γ = T −1/2 (ln )−1 Id=1 + T −1/(d+2/3) Id>1 , learning rate ηm = cT 2m( 4 +1) γ 2 T − 4 , PT 4−2j η for m = 0, . . . , M − 1. Then the regret satisfies and penalization αm = M j j=m+1 2 ( √  O T ln T if d = 1, d−1/3 RegT (F) =  O T d+2/3 (ln T )3/2 if d > 2.  Moreover, the running time at every round is O T a with a = (1 + ln2 3)/(d + 2/3). The above result improves on Corollary 5 in two ways. First, as we said, the running time is now polynomial in T , contrary to what could be obtained via a direct implementation of HierExp4. Second, when d > 2, the regret bound is of order T (d−1/3)/(d+2/3) , √ improving on the rate T d/(d+1) e T ) for nonparametric bandits from Corollary 5. Remarkably, Theorem 6 also yields a regret of O( with one-sided full information feedback in dimension d = 1. The improvement on the rates compared to HierExp4 is possible because we use a variant of Exp4 with penalized loss estimates. This allows for a careful hierarchical control of the variance terms inspired by our analysis of Exp3RTB in Appendix C. Note that the time complexity decreases as the dimension d increases. Indeed, when d increases the regret gets worse but, at the same time, the size of the discretized action space and the number of layers in our wavelet-like approximation can be both set to smaller values. 12 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING 5. A Tight Bound for Full Information through an Explicit Algorithm In this section we apply the machinery developed in Section 4.2 to the full information setting, where after each round t the learner can compute the loss ℓt (y) of any number of actions y ∈ Y. We obtain the first explicit algorithm achieving, up to logarithmic factors, the minimax regret rate T (d−1)/d for all classes of Lipschitz functions, where d is the dimension of the context space. This achieves the same upper bound as the one proven by Rakhlin et al. (2015) in a nonconstructive manner, and matches the lower bound of Hazan and Megiddo (2007). Our approach generalizes the approach of Gaillard and Gerchinovitz (2015) to nonconvex Lipschitz losses. We consider a full information variant of HierExp4 (Algorithm 2, Section 4.2), where —using the same notation as in Section 4.2— the Exp4 instances running on the nodes of the tree TF are replaced by instances of Hedge —e.g., (Bubeck and Cesa-Bianchi, 2012). Note that, due to the full information assumption, the new algorithm, called HierHedge, observes losses at all leaves v ∈ L. As a consequence, no exploration is needed and so we can set γ = 0. For the same reason, the estimated loss vectors defined in (2) can be replaced with the true loss vectors, ℓt . See Algorithm 6 in Appendix H for a definition of HierHedge. The same appendix also contains a proof of the next result. Theorem 7 Fix any class F of functions f : X → Y and any sequence (x1 , ℓ1 ), (x2 , ℓ2 ), . . . of contexts xt ∈ X and 1-Lipschitz loss functions ℓt : Y → [0, 1]. Assume HierHedge (Algorithm 6 in Appendix H) is run with full information feedback on the tree TF of depth M = ⌊ln2 (1/ε)⌋ with action set Yε for ε > 0. Moreover, the learning rate ηt (v) used at each node v at depth m = 0, . . . , M − 1 is given by (11) in Appendix E, with E = 2−m+3 , N = |Cv |, and Vet−1 being the cumulative variance of ℓes according to qs (v, ·) up to time s = t − 1. Then for all T > 1 the regret satisfies Z 1/2  p  2 T ln N∞ (F, x) + ln N∞ (F, x) dx . RegT (F) 6 5εT + 27 ε/2 In particular, if d > 3 and F is the set of 1-Lipschitz functions f : [0, 1]d → [0, 1]p , where [0, 1]d and  1/d e (d−1)/d , [0, 1]p are endowed with their sup norms, the √ choice ε = (p/T ) yields RegT (F) = O T while for 1 6 d 6 2 the regret is of order pT , ignoring logarithmic factors. When using the sup norms, the dimension p of the action space only appears as a multiplicative factor p1/d in the regret bound for Lipschitz functions. Note also that an efficient version of HierHedge for Lipschitz functions can be derived along the same lines as the construction in Section 4.3. Acknowledgments This work was partially supported by the CIMI (Centre International de Mathématiques et d’Informatique) Excellence program. Pierre Gaillard and Sébastien Gerchinovitz acknowledge the support of the French Agence Nationale de la Recherche (ANR), under grants ANR-13-BS01-0005 (project SPADRO) and ANR-13-CORD-0020 (project ALICIA). References Alekh Agarwal, Daniel Hsu, Satyen Kale, John Langford, Lihong Li, and Robert Schapire. Taming the monster: A fast and simple algorithm for contextual bandits. In International Conference on Machine Learning (ICML), 2014. 13 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Noga Alon, Nicolò Cesa-Bianchi, Claudio Gentile, Shie Mannor, Yishay Mansour, and Ohad Shamir. Nonstochastic multi-armed bandits with graph-structured feedback. CoRR, abs/1409.8428, 2014. Noga Alon, Nicolò Cesa-Bianchi, Ofer Dekel, and Tomer Koren. Online learning with feedback graphs: Beyond bandits. In COLT, pages 23–35, 2015. Jean-Yves Audibert and Sébastien Bubeck. Regret bounds and minimax policies under partial monitoring. Journal of Machine Learning Research, 11(Oct):2785–2836, 2010. Peter Auer, Nicolò Cesa-Bianchi, Yoav Freund, and Robert E Schapire. The nonstochastic multiarmed bandit problem. SIAM journal on computing, 32(1):48–77, 2002. Sébastien Bubeck and Nicolò Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multiarmed bandit problems. Foundations and Trends in Machine Learning, 5(1):1–122, 2012. Sébastien Bubeck, Rémi Munos, Gilles Stoltz, and Csaba Szepesvári. X-armed bandits. Journal of Machine Learning Research, 12(May):1655–1695, 2011a. Sébastien Bubeck, Gilles Stoltz, and Jia Yuan Yu. Lipschitz bandits without the Lipschitz constant. In International Conference on Algorithmic Learning Theory, pages 144–158. Springer, 2011b. Sébastien Bubeck, Ronen Eldan, and Yin Tat Lee. Kernel-based methods for bandit convex optimization. arXiv preprint arXiv:1607.03084, 2016. Nicolò Cesa-Bianchi and Gábor Lugosi. On prediction of individual sequences. The Annals of Statistics, 27(6):1865–1895, 1999. Nicolò Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge university press, 2006. Nicolò Cesa-Bianchi, Yishay Mansour, and Gilles Stoltz. Improved second-order bounds for prediction with expert advice. Machine Learning, 66(2-3):321–352, 2007. Nicolò Cesa-Bianchi, Claudio Gentile, and Yishay Mansour. Regret minimization for reserve prices in second-price auctions. IEEE Transactions on Information Theory, 61(1):549–564, 2015. Emile Contal and Nicolas Vayatis. Stochastic process bandits: Upper confidence bounds algorithms via generic chaining. arXiv preprint arXiv:1602.04976, 2016. Emile Contal, Cédric Malherbe, and Nicolas Vayatis. Optimization for gaussian processes via chaining. arXiv preprint arXiv:1510.05576, 2015. Rocco De Rosa, Francesco Orabona, and Nicolò Cesa-Bianchi. The ABACOC algorithm: A novel approach for nonparametric classification of data streams. In Proceedings of the IEEE International Conference on Data Mining (ICDM), pages 733–738, 2015. Richard M Dudley. The sizes of compact subsets of Hilbert space and continuity of Gaussian processes. Journal of Functional Analysis, 1(3):290–330, 1967. 14 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING Yoav Freund and Robert E Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55(1):119–139, 1997. Pierre Gaillard and Sebastien Gerchinovitz. A chaining algorithm for online nonparametric regression. In Proceedings of COLT’15, volume 40, pages 764–796. JMLR: Workshop and Conference Proceedings, 2015. Sébastien Gerchinovitz and Tor Lattimore. Refined lower bounds for adversarial bandits. In Advances in Neural Information Processing Systems 29 (NIPS’16), pages 1198–1206, 2016. Elad Hazan. Introduction to online convex optimization. Foundations and Trends R in Optimization, 2(3-4):157–325, 2015. Elad Hazan and Nimrod Megiddo. Online learning with prior knowledge. In International Conference on Computational Learning Theory (COLT’07), pages 499–513. 2007. Robert Kleinberg. Nearly tight bounds for the continuum-armed bandit problem. In NIPS, volume 17, pages 697–704, 2004. Robert Kleinberg, Aleksandrs Slivkins, and Eli Upfal. Multi-armed bandits in metric spaces. In Proceedings of the fortieth annual ACM symposium on Theory of computing, pages 681–690. ACM, 2008. Tyler Lu, Dávid Pál, and Martin Pál. Contextual multi-armed bandits. In AISTATS, pages 485–492, 2010. Odalric-Ambrym Maillard and Rémi Munos. Adaptive bandits: Towards the best history-dependent strategy. In AISTATS, pages 570–578, 2011. Michael Ostrovsky and Michael Schwarz. Reserve prices in Internet advertising auctions: a field experiment. In ACM Conference on Electronic Commerce, pages 59–60, 2011. Alexander Rakhlin and Karthik Sridharan. Online nonparametric regression with general loss functions. CoRR, abs/1501.06598, 2015. Alexander Rakhlin and Karthik Sridharan. Bistro: an efficient relaxation-based method for contextual bandits. In Proceedings of the Twentieth International Conference on Machine Learning (ICML), 2016. Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Online learning via sequential complexities. Journal of Machine Learning Research, 16:155–186, 2015. Shai Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. Aleksandrs Slivkins. Contextual bandits with similarity information. Journal of Machine Learning Research, 15(1):2533–2568, 2014. Vasilis Syrgkanis, Akshay Krishnamurthy, and Robert Schapire. Efficient algorithms for adversarial contextual learning. In Proceedings of the Twentieth International Conference on Machine Learning (ICML), 2016. 15 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Vladimir Vovk. Competing with wild prediction rules. Machine Learning, 69(2-3):193–212, 2007. Appendix A. A Useful Lemma The following is a standard result in the analysis of Hedge with variable learning rate —see, e.g., the analysis of (Bubeck and Cesa-Bianchi, 2012, Theorem 3.2). Recall that, when run on a loss sequence ℓ1 , ℓ2 , . . . Hedge  distributions p1 , p2 , . . . where p1 is uniform and pt (i) is proP computes portional to exp − ηt t−1 ℓ (i) for all actions i. s s=1 Lemma 8 The sequence p1 , p2 , . . . of probability distributions computed by Hedge when run on K actions with learning rates η1 > η2 > · · · > 0 and losses ℓt (k) > 0 satisfies T X K X t=1 i=1 pt (i)ℓt (i) − min k=1,...,K T X ℓt (k) 6 t=1 T K t=1 i=1 1X X ln K pt (i)ℓt (i)2 . ηt + ηT 2 Appendix B. Proof of Theorem 1 Proof Let Nt be the number of balls created by the ContextualExp algorithm after t rounds, Bs be the s-th ball so created, being x̄s its center (x̄s is some past context), and Ts be the subsequence of rounds t such that xt is handled by the s-th ball. Notice that Nt and Ts are deterministic quantities, since the xt ’s are generated obliviously. Since f is 1-Lipschitz and ℓt is also 1-Lipschitz, for all xt  handled by Bs , we can write ℓt f (xt ) − ℓt f (x̄s ) ≤ ε . Now fix any 1-Lipschitz policy f . For each s = 1, . . . , NT , there exists ȳs ∈ Yε such that ρY ȳs , f (x̄s ) ≤ ε. Then we can write E " T X t=1 # ℓt (b yt ) − = T X t=1 NT X  ℓt f (xt ) (4) X    E ℓt (b yt ) − ℓt f (xt ) s=1 t∈Ts = NT X   X     E ℓt (b yt ) − ℓt ȳs + ℓt ȳs − ℓt (f (x̄s )) + ℓt (f (x̄s )) − ℓt (f (xt )) s=1 t∈Ts ≤ NT X  X    E ℓt (b yt ) − ℓt ȳs + 2T ε . (5) s=1 t∈Ts We now apply to each s = 1, . . . , NT the standard regret bound of Exp3 with learning rate η (e.g., (Bubeck and Cesa-Bianchi, 2012)) w.r.t. the best action ȳs . This yields X    ln Kε η + |Ts | Kε , E ℓt (b yt ) − ℓt ȳs 6 η 2 t∈Ts implying NT X  X  NT ln Kε η   E ℓt (b yt ) − ℓt ȳs 6 + T Kε . η 2 s=1 t∈Ts 16 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING q Combining with (5), setting η = 2NTT KlnεKε , recalling that Kε 6 CY ε−p and observing that, by the way balls are constructed, NT can never exceed the size of the smallest ε/2-cover of X (that is, NT 6 CX (ε/2)−d ), we obtain ! r p 1 T ε−(d+p) ln + T ε . RegT (F) 6 2 T NT Kε ln Kε + 2 T ε = O ε Setting ε =  p+d 2  ln T T 1/2  2 p+d+2  p+d+1  e T p+d+2 as claimed. gives RegT (F) = O Appendix C. The Exp3-RTB algorithm for reserve-price optimization √  e T can be achieved with high probCesa-Bianchi et al. (2015) showed that a regret of order O ability for the problem of regret minimization in second-price auctions with i.i.d. bids, when the feedback received after each auction is the seller’s revenue. In this appendix, we show that the same regret rate can be obtained even when the sequence of bids is nonstochastic, provided the feedback also includes the highest bid. We use this result in order to upper bound the contextual regret in Section 4.1. We consider a setting slightly more general than second-price auctions. Fix any unknown sequence ℓ1 , ℓ2 , . . . of loss functions ℓt : [0, 1] → [0, 1] satisfying the semi-Lipschitz condition, ℓt (y + δ) ≥ ℓt (y) − δ for all 0 6 y 6 y + δ 6 1. (6) In each auction instance t = 1, 2, . . . , the learner selects a reserve price ybt ∈ Y = [0, 1] and suffers the loss ℓt (b yt ). The learner’s feedback is ℓt (y) for all y > ybt (i.e., the one-sided full information feedback). As explained in Section 4.1, this setting includes online revenue maximization in secondprice auctions as a special case when the learner’s feedback includes both revenue and highest bid. The learner’s regret is defined by # " T T X X ℓt (b yt ) − inf ℓt (y) , RegT , E 06y61 t=1 t=1 where the expectation is with respect to the randomness in the predictions ybt . We introduce the Exp3-RTBalgorithm (Algorithm 3 below), a variant of Exp3 (Auer et al., 2002) exploiting the richer feedback ℓt (y) : y > ybt . The algorithm uses a discretization of the action space [0, 1] in K = ⌈1/γ⌉ actions yk := (k − 1)γ for k = 1, . . . , K. Theorem 9 In the one-sided full information feedback, the Exp3-RTB algorithm tuned with γ > 0 satisfies   2 ln⌈1/γ⌉ 1 e . + RegT 6 γT 2 + ln 4 γ γ √  e T . In particular, γ = T −1/2 gives RegT = O 17 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Algorithm 3: Exp3-RTB (for one-sided full information feedback) Input : Exploration parameter γ > 0. Initialization: Set learning rate η = γ/2 and uniform distribution p1 over {1, . . . , K} where K = ⌈1/γ⌉; for t = 1, 2, . . . do 1. compute distribution qt (k) = (1 − γ)pt (k) + γIk=1 for k = 1, . . . , K; 2. draw It ∼ qt and choose ybt = yIt = (It − 1)γ; 3. for each k = 1, . . . , K, compute the estimated loss ℓt (yk ) IIt 6k ℓbt (k) = Pk j=1 qt (j) end 4. for each k = 1, . . . , K, compute the new probability assignment  P exp − η ts=1 ℓbs (k)  P . pt+1 (k) = P K t bs (j) exp −η ℓ j=1 s=1 Proof The proof follows the same lines as the regret analysis of Exp3 in (Auer et al., 2002). The key change is a tighter control of the variance term allowed by the richer feedback. Pick any reserve price yk = (k − 1)γ. We first control the regret associated with actions drawn from pt (the regret associated with qt will be studied as a direct consequence). More precisely, since the estimated losses ℓbt (j) are nonnegative, we can apply Lemma 8 to get T X t=1 pt · ℓbt − T K ln K η XX b . pt (j)ℓbt (j)2 + ℓt (k) 6 2 t=1 η t=1 T X (7) j=1 Writing Et−1 [ · ] for the expectation conditioned on I1 , . . . , It−1 , we note that   Et−1 ℓbt (j) = ℓt (yj ) and   pt (j)ℓt (yj )2 qt (j) Et−1 pt (j)ℓbt (j)2 = Pj 6 , P (1 − γ) ji=1 qt (i) i=1 qt (i) where we used the definition of qt and the fact that |ℓt (yj )| 6 1 by assumption. Therefore, taking expectation on both sides of (7) entails, by the tower rule for expectations,   # " T K T T X X X X q (j) η t  + ln K . E ℓt (yk ) 6 p t · ℓt − E Pj 2(1 − γ) η i=1 qt (i) t=1 t=1 t=1 18 j=1 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING Setting st (j) , K X j=1 Pj i=1 qt (i), qt (j) Pj i=1 qt (i) we can upper bound the sum with an integral, =1+ K X st (j) − st (j − 1) st (j) j=2 61+ K Z X j=2 st (j) st (j−1) =1+ K Z X j=2 dx =1+ x Z 1 qt (1) st (j) st (j−1) dx st (j) dx 1 6 1 − ln qt (1) 6 1 + ln , x γ where we used qt (1) > γ. Therefore, substituting into the previous bound, we get # " T T X X ηT ln(e/γ) ln K ℓt (yk ) 6 p t · ℓt − E + . 2(1 − γ) η (8) t=1 t=1 We now control the regret of the predictions ybt = yIt , where It is drawn from qt = (1 − γ)pt + γδ1 . By the tower rule, " T # # " T T T X X X X  ℓt (yk ) ℓt (yk ) = E (1 − γ)pt · ℓt + γℓt (y1 ) − ℓt (b yt ) − E t=1 t=1 t=1 6 (1 − γ) E 6 " T X t=1 p t · ℓt − T X t=1 # t=1 ℓt (yk ) + γT ηT ln(e/γ) ln K + + γT , 2 η (9) where the last inequality is by (8). To conclude the proof, we upper bound the regret against any fixed y ∈ [0, 1]. Since there exists k ∈ {1, . . . , K} such that y ∈ [yk , yk + γ], and since each ℓt satisfies the semi-Lipschitz condition (6), we have ℓt (y) > ℓt (yk ) − γ. This gives # " T T X X ℓt (yk ) 6 min min E ℓt (y) + γ T . k=1,...,K 06y61 t=1 t=1 Replacing the last inequality into (9), and recalling that K = ⌈1/γ⌉ and η = γ2 , finally yields RegT 6 γT e 2 ln⌈1/γ⌉ ln + + 2γT . 4 γ γ Choosing γ ≈ T −1/2 concludes the proof. Appendix D. Proof of Theorem 3 Proof The proof is very similar to that of Theorem 1. We only highlight the main differences. Let f ∈ F be any 1-Lipschitz function from X to [0, 1]. For all s = 1, . . . , NT , we define the constant approximation of f in the s-th ball by ysmin = mint∈Ts f (xt ). Since f is 1-Lipschitz and 19 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ the balls have radius ε, we have maxt,t′ ∈Ts f (xt ) − f (xt′ ) ≤ 2ε. Hence, for all t ∈ Ts , by the semi-Lipschitz property (6),  ℓt f (xt ) ≥ ℓt (ysmin ) − 2ε . (10) Therefore, T X t=1 E[ℓt (b yt )] − T X t=1 NT X   X  ℓt f (xt ) = E[ℓt (b yt )] − ℓt f (xt ) s=1 t∈Ts = NT X  NT X   X X  ℓt (ysmin ) − ℓt f (xt ) E[ℓt (b yt )] − ℓt (ysmin ) + s=1 t∈Ts ≤ γT |  {z Rs 1 e 2 + ln 4 γ  + } s=1 t∈Ts 2NT ln⌈1/γ⌉ + 2εT . γ Each term Rs is the regret suffered by the s-th instance of Exp3-RTB against the constantP value ysmin , and so we bound it using Theorem 9 in Appendix C and then sum over s recalling that s Ts = T . The other double sum is bounded by 2T ε using (10). We bound NT as in Theorem 1 obtaining   ε−d 1 1 ln + εT . + RegT (F) . γT 1 + ln γ γ γ Finally, choosing ε = γ = T −1/(d+2) 6 1 gives concluding the proof.  d+1  e T d+2 RegT (F) = O Appendix E. Exp4 regret bound scaling with the range of the losses In this section we revisit the Exp4 algorithm (Bubeck and Cesa-Bianchi, 2012, Figure 4.1) and prove a regret bound for the one-sided full information model that scales with the range of the losses. In view of the application to chaining, we formulate this result in a setting similar to (Maillard and Munos, 2011). Namely, when the action It played at time t is not necessarily drawn from the distribution prescribed by Exp4. Exp4 (see Algorithm 4) operates in a bandit setting with K actions and N experts. We assume a total order 1 < · · · < K on the action set K = {1, . . . , K}. At each time step t = 1, 2, . . . the advice ξt (j, ·) of expert j is a probability distribution over the K actions. The learner combines the expert advice using convex coefficients qt ∈ ∆(N ). These coefficients are computed by Hedge b based on the expert losses ℓet (j) = ξt (j, ·) · ℓbt for j = 1, . . . , N , where PNℓt is a vector of suitably defined loss estimates. The distribution prescribed by Exp4 is pt = j=1 qt (j)ξt (j, ·) ∈ ∆(K), but the learner’s play at time t is It ∼ p∗t for some other distribution p∗t ∈ ∆(K). The feedback at time t is the vector of losses ℓt (i) for all i > It . 20 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING Algorithm 4: Exp4 with unspecified sampling distributions p∗t (for one-sided full info feedback) Input : Learning rate sequence η1 > η2 > · · · > 0. Initialization: Set q1 to the uniform distribution over {1, . . . , N }; for t = 1, 2, . . . do 1. get expert advice ξt (1, ·), . . . , ξt (N, ·) ∈ ∆(K); 2. compute distribution p∗t over {1, . . . , K}; 3. draw It ∼ p∗t and observe ℓt (i) for all i > It ; 4. compute loss estimates ℓbt (i) for i = 1, . . . , K; 5. compute expert losses ℓet (j) = ξt (j, ·) · ℓbt for j = 1, . . . , N ; 6. compute the new probability assignment   P exp −ηt+1 ts=1 ℓes (j)   for each j = 1, . . . , N . qt+1 (j) = P Pt e N k=1 exp −ηt+1 s=1 ℓs (k) end In this setting, the goal is to minimize the regret with respect to the performance of the best expert, # " T T X X ξt (j, ·) · ℓt p t · ℓt − max E j=1,...,N t=1 t=1 in expectation with respect to the random draw of I1 , . . . , IT , where ξt (j, ·) · ℓt is the expected loss of expert j at time t. In view of our chaining application, we defined the quantities ξt (j, i) as random variables because the expert advice at time t might depend on the past realizations of I1 , . . . , It−1 . For all k ∈ K let k X p∗t (i) . Pt∗ (k) = i=1 Also, let Kt ≡ {k ∈ K : (∃j) ξt (j, k) > 0} (in chaining, Kt is typically small compared to K). The next result shows that, when Exp4 is applied to arbitrary real-valued losses, there is a way of choosing the learning rate sequence so that the regret scales with a quantity smaller than the largest loss value. More specifically, the regret scales with a known bound E on the size of the effective range of the losses max max ℓt (k) − ℓt (k′ ) 6 E . ′ t=1,...,T k,k ∈Kt The rich feedback structure (ℓt (k), k > It ) is crucial to get our result, since it enables us to use  ℓt max Kt in the definition of the loss estimates ℓbt (k) below. Indeed, as explained in Section 4.2, ℓbt (k) has to be explicitly computed only for those actions k such that It 6 k and ξt (j, k) > 0 for some j, i.e., k ∈ Kt . In this case, It 6 k 6 max Kt so that ℓt max Kt is observed. Theorem 10 Let 1 < · · · < K be a total order on the action set K = {1, . . . , K}. Suppose Exp4 (Algorithm 4) is run with one-sided full information feedback on an arbitrary loss sequence 21 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ ℓ1 , ℓ2 , . . . with loss estimates  ℓt (k) − ℓt max Kt b ℓt (k) = IIt 6k Pt∗ (k) for k = 1, . . . , K and adaptive learning rate ηt = min ( γ , 2E s 2 )  2 − 1 (ln N ) (e − 2)Vet−1 √ for t > 2 (11)  P PN e e 2 is the cumulative for some parameter E > 0 and where Vet−1 = t−1 s=1 j=1 qs (j) ℓs (j) − qs · ℓs variance of Hedge up to time t − 1. If p∗t (1) > γ and max ℓt (k) − ℓt (k′ ) 6 E max t=1,...,T k,k ′ ∈Kt almost surely for all t > 1, then, for all T > 1, s # " T T X X E T ln N ξt (j, ·) · ℓt 6 4E p t · ℓt − max E + (4 ln N + 1) . j=1,...,K γ γ t=1 t=1 Note that the above regret bound does not depend on the number K of actions, but instead on a lower bound γ on the probability of observing the smallest action. Proof From the definition of Kt and because Pt∗ (k) > p∗t (1) > γ, max i,j=1,...,N ℓet (i) − ℓet (j) = max i,j=1,...,N ξt (i, ·) · ℓbt − ξt (j, ·) · ℓbt 6 max ℓbt (k) − ℓbt (k′ ) ′ 6 k,k ∈Kt 2E 2E 6 . ∗ mink∈K Pt (k) γ e = (2E)/γ is an upper bound on the size of the range of the losses ℓet (j), we can use Since E the bound of (Cesa-Bianchi et al., 2007, Theorem 5), which applies to Hedge run on arbitrary realvalued losses with the learning rate (11). This gives us q T T X X e e e e ln N + E . (12) qt · ℓt 6 min ℓt (j) + 4 (ln N )VeT + 2E j=1,...,N 2 t=1 t=1 Note that qt · ℓet = pt · ℓbt . Moreover, Kt = max Kt is measurable with respect to (I1 , . . . , It−1 ), implying Et−1 ℓbt (k) = ℓt (k)−ℓt (Kt ). Therefore, taking the expectation on both sides of (12) with P P respect to the random draw of I1 , . . . , IT , and using Jensen together with VeT ≤ Tt=1 N j=1 qt (j) · 2 ℓet (j) , we get # " T T X X ξt (j, ·) · ℓt p t · ℓt − max E j=1,...,N t=1 t=1 v   u T N u   X X 2 4E E u qt (j) ξt (j, ·) · ℓbt  + E 6 4t(ln N ) ln N + . γ γ t=1 j=1 22 (13) A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING The variance term inside the square root can be upper bounded as follows. Using Jensen again, N X j=1 K N 2 X  X b qt (j) ξt (j, k)ℓbt (k)2 qt (j) ξt (j, ·) · ℓt 6 = j=1 k=1 N X K X qt (j) j=1 6 ξt (j, k) k=1  ℓt (k) − ℓt (Kt ) Pt∗ (k) 2 IIt 6k K N X E2 X ξt (j, k) qt (j) II 6k γ Pt∗ (k) t j=1 k=1 where the last inequality is because ℓt (k) − ℓt (Kt ) 6 E when ξt (j, k) > 0 and because Pt∗ (k) > p∗t (1) > γ. Therefore, recalling Pt∗ (k) = Pt−1 (It 6 k),   N K N X X 2 ξt (j, k) E2 X E2 Et−1  qt (j) ξt (j, k) · ℓbt  6 qt (j) P (I 6 k) = . t−1 t γ Pt∗ (k) γ j=1 j=1 k=1 Substituting the last bound in (13) concludes the proof. Next we extend the previous result to penalized loss estimates, which is useful in Section 4.3 to control the variance terms all along the covering tree. Theorem 11 Let 1 < · · · < K be a total order on the action set K = {1, . . . , K}. Let E, F > 0. Consider any penalty pent ∈ RK measurable with respect to (I1 , . . . , It−1 ) at time t. Suppose Exp4 (Algorithm 4) is run with one-sided full information feedback on an arbitrary loss sequence ℓt ∈ RK , t > 1, with loss estimates  ℓt (k) − ℓt max Kt + E b IIt 6k + pent (k) + F for k = 1, . . . , K ℓt (k) = Pt∗ (k) and constant learning rate η > 0. If we have, for all t > 1, almost surely, max max ℓt (k) − ℓt (k′ ) 6 E and t=1,...,T k,k ′ ∈Kt max max pent (k) 6 F , t=1,...,T k∈Kt then, for all T > 1, max E j=1,...,K " T X t=1  pt · ℓt + pent − T X ξt (j, ·) · ℓt + pent t=1 T X 2 ln N 6 + 4ηT F 2 + 4ηE η t=1 " K X pt (k) E Pt∗ (k) k=1 # #  . Proof From the definition of Kt and because E and F are upper bounds on the losses and penalties associated with actions in Kt , min ℓet (j) = j=1,...,N min ξt (j, ·) · ℓbt > min ℓbt (k) > 0 . j=1,...,N k∈Kt 23 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ We can thus use the regret bound for Hedge with weight vectors qt , constant learning rate η, and nonnegative losses ℓet (k) (see Lemma 8 in Appendix A): T X t=1 qt · ℓet 6 min j=1,...,N T X t=1 T N η XX ln N + qt (j)ℓet (j)2 . ℓet (j) + η 2 (14) t=1 j=1 Note that qt · ℓet = pt · ℓbt . Moreover,   Kt = max Kt and pent are measurable with respect to b (I1 , . . . , It−1 ), implying Et−1 ℓt (k) = ℓt (k) − ℓt (Kt ) + E + pent (k) + F . Therefore, taking the expectation on both sides of (14) with respect to the random draw of I1 , . . . , IT , we get # " T T X   X ξt (j, ·) · ℓt + pent pt · ℓt + pent − max E j=1,...,N t=1 t=1 6 ln N η + η 2 T X t=1   N 2  X qt (j) ξt (j, ·) · ℓbt  . E (15) j=1 The variance term can be upper bounded as follows. Using Jensen’s inequality, N X j=1 K N 2 X  X qt (j) ξt (j, k)ℓbt (k)2 qt (j) ξt (j, ·) · ℓbt 6 j=1 = N K X X k=1 qt (j)ξt (j, k) k=1 j=1  ℓt (k) − ℓt (Kt ) + E IIt 6k + pent (k) + F Pt∗ (k) 2 K X pt (k) II 6k , 6 8F + 8E Pt∗ (k)2 t 2 2 k=1 where the last inequality is because ℓt (k) − ℓt (Kt ) 6 E and pent (k) 6 F when ξt (j, k) > 0 and because (a + b + c + d)2 6 4 a2 + b2 + c2 + d2 . Therefore, recalling Pt∗ (k) = Pt−1 (It 6 k),   N K X X 2 pt (k) Et−1  qt (j) ξt (j, k) · ℓbt  6 8F 2 + 8E 2 . Pt∗ (k) j=1 k=1 Substituting the last bound in (15) concludes the proof. ∗ Note that when p pent ≡ 0 and pt (1) > γ almost surelypfor all t > 1, Theorem 11 above used with −1 η = (2E) γ ln(N )/T yields a regret bound of 4E T ln(N )/γ, similarly to Theorem 10. We use yet another corollary in Section 4.3. It follows directly from the choice of pent (k) = −α/Pt∗ (k) and F = α/γ in Theorem 11. Corollary 12 Let 1 < · · · < K be a total order on the action set K = {1, . . . , K}. Let E, α, γ > 0 be three parameters. Suppose Exp4 (Algorithm 4) is run on an arbitrary loss sequence ℓt ∈ RK , t > 1, with loss estimates  ℓt (k) − ℓt max Kt + E α α b IIt 6k − ∗ + for k = 1, . . . , K ℓt (k) = ∗ Pt (k) Pt (k) γ 24 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING and constant learning rate η > 0. If we have, for all t > 1, almost surely, max ℓt (k) − ℓt (k′ ) 6 E max t=1,...,T k,k ′ ∈Kt and p∗t (1) > γ , then, for all T > 1, " T K  X #   T X K XX α α + 4ηE 2 − ξt (j, k) ℓt (k) − ∗ max E pt (k) ℓt (k) − j=1,...,K Pt∗ (k) Pt (k) t=1 k=1 t=1 k=1 6 ln N + η 4ηT α2 γ2 . Appendix F. Missing Proofs from Section 4.2 We prove Theorem 4 and Corollary 5. As we said in the main text, the key contribution of chaining is that it allows us to sum up local regret bounds scaling as the range of the local losses. This is possible because of the richer feedback structure induced by the total order on the actions. We first state a lemma indicating that the losses associated with neighboring nodes are indeed close to one another. Recall that M is the depth of TF . Lemma 13 Let v ∈ T be any node at level m ∈ {0, 1, . . . , M − 1}. Then all leaves w, w′ ∈ Lv satisfy fw − fw′ ∞ 6 2−m+2 . Therefore, ℓt (yit (w) ) − ℓt (yit (w′ ) ) 6 2−m+3 for all t > 1. Proof Consider a path v = vm → vm+1 → · · · → vM = w joining v to leaf w in the tree. For each k = m, . . . , M −1, since Fk is a (2−k )-covering of F in sup norm, we have kfvk −fvk+1 k∞ 6 2−k . Therefore, kfv − fw k∞ = M −1 X k=m (fvk − fvk+1 ) 6 ∞ M −1 X k=m kfvk − fvk+1 k∞ 6 M −1 X 2−k 6 2−m+1 . k=m Therefore, since ∈ Lv as well, kfw − fw′ k∞ = kfv − fw k∞ + kfv − fw′ k∞ 6 2−m+2 , which proves the first inequality. Now, since ℓt is 1-Lipschitz,  ℓt (yit (w) ) − ℓt (yit (w′ ) ) 6 yit (w) , yit (w′ ) 6 2−M +1 + kfw − fw′ k∞  6 2−M +1 + 2−m+2 6 2−m+3 w′ where the second inequality uses the definition of it (v) in Section 4.2 and the fact that K is a (2−M )covering of [0, 1]. This concludes the proof. We are now ready to prove Theorem 4 from the main text. Proof (of Theorem 4) Each node v at level m = 0, . . . , M − 1 is running an instance of the variant of Exp4 described in Algorithm 4 (Appendix E) over expert set Cv , where the advice of w ∈ Cv is ξt (w, ·) = pt (w, ·), and effective action set Kt = {i : (∃w ∈ Cv ) pt (w, i) > 0} = Kt (v). Note that, for any w ∈ Cv , the distribution pt (w, ·) is a mixture of actions in Lw ⊆ Lv , so that Kt (v) ⊆ {it (w′ ) : w′ ∈ Lv }. By Lemma 13, the losses of these actions belong to a range of size E = 2−m+3 . Since p∗t (1) > γ by definition, we are in position to apply Theorem 10 in Appendix E with N = |Cv | ≤ Nm+1 , and obtain the bound s # " T T X X T ln Nm+1 2−m+3 + (4 ln Nm+1 + 1) pt (w, ·) · ℓt 6 2−m+5 pt (v, ·) · ℓt − max E w∈Cv γ γ t=1 t=1 25 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ (for simplicity, we use ℓt to denote the vector of elements ℓt (yi ) for i = 1, . . . , K). Now consider the path v0 → v1 → · · · → vM = w∗ from the root v0 to the leaf vM = w∗ minimizing ℓ1 (yi1 (w) )+ · · · + ℓT (yiT (w) ) over w ∈ L. Recalling that pt (w, i) = Ii=it (w) for any leaf w, we get E " T X t=1 # pt (v0 , ·) · ℓt − min ℓt (yit (w) ) t=1 " T M −1 X X w∈L = T X E m=0 6 25 t=1 M −1 X pt (vm , ·) · ℓt − s 2−m m=0 T X t=1 pt (vm+1 , ·) · ℓt # ! 1 T ln Nm+1 + (ln Nm+1 + 1) . γ γ (16) Now, recalling that It ∼ p∗t and p∗t (i)ℓt (yi ) = (1 − γ)pt (v0 , i)ℓt (yi ) + γ Ii=1 ℓt (y1 ) we get ) # ( T " T T  X X X   ∗ ℓt (y1 ) − ℓt yit (w) ℓt yit (w) + γ E pt · ℓt 6 min w∈L t=1 + 25 M −1 X s 2−m m=0 t=1 t=1 ! 1 T ln Nm+1 + (ln Nm+1 + 1) . γ γ  Now clearly ℓt (y1 ) − ℓt yit (w) 6 1. Moreover, because L is a (2−M )-covering of F and K is a   (2−M )-covering of [0, 1], for any f ∈ F there exists w ∈ L such that ℓt yit (w) − ℓt f (xt ) 6 yit (w) − f (xt ) 6 1 yit (w) − fw (xt ) + fw (xt ) − f (xt ) 6 21−M by definition of it (w). Hence, E " T X t=1 # p∗t · ℓt − inf f ∈F T X t=1  ℓt f (xt ) 6 (21−M + γ)T + 25 M −1 X 2−m m=0 s ! T ln Nm+1 1 + (ln Nm+1 + 1) . γ γ (17) We now use Nm+1 = N∞ (F, 2−(m+1) ), and follow the standard chaining approach approximating the sums by integrals, M −1 X m=0 −m 2 p ln Nm+1 = 4 64 M −1  X −(m+1) 2 m=0 M −1 Z 2−(m+1) X m=0 2−(m+2) −(m+2) −2 p q ln N∞ (F, 2−(m+1) ) ln N∞ (F, ε)dε 6 4 Z 1/2 p γ/2 ln N∞ (F, ε)dε (18) where the second inequality is by monotonicity of ε 7→ ln N∞ (F, ε) and the last inequality follows from γ 6 2−M due to M = ⌊ln2 (1/γ)⌋. Similarly, M −1 X m=0 −m 2 ln Nm+1 6 4 Z 26 1/2 γ/2 ln N∞ (F, ε)dε . (19) A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING We conclude the proof by substituting (18) and (19) into (17), and using 2−M 6 2γ.  Proof (of Corollary 5) The metric entropy satisfies ln N∞ (F, ε) = O ε−d . Therefore, substituting into the regret bound of Theorem 4 and computing the integrals, the regret satisfies   q 1 1 T  + ln if d = 1 O  γ γ  q γ  T 1 −2 RegT (F) 6 5T γ + O if d = 2 γ ln γ + γ   √   O T γ (1−d)/2 + γ −d if d > 3. Optimizing γ for the different choices of d concludes the proof. Appendix G. Algorithm HierExp4⋆ and proof of Theorem 6 G.1. Algorithm HierExp4⋆ We first construct the HierExp4⋆ algorithm used in Theorem 6. It is a variant of HierExp4 based on a special hierarchical covering of F that we first define below. Recall that F is the set of all 1-Lipschitz functions from [0, 1]d to [0, 1]. In the sequel, we use a dyadic discretization of the input space [0, 1]d . For each depth m = 0, 1, . . . we define a partition of [0, 1]d with 2md equal cubes of width 2−m . Each cube Xm (σ1:m ) ⊆ [0, 1]d at depth m is indexed by σ1:m = (σ1 , . . . , σm ) ∈ {1, . . . , 2d }m . Note that the partitions at different depths are nested. We can thus represent them via a tree P whose root ∅ is labeled by [0, 1]d and whose each node σ1:m at depth m is labeled with the cube Xm (σ1:m ). The children of node σ1:m are the nodes at depth m + 1 of the form (σ1 , . . . , σm , σm+1 ) with σm+1 ∈ {1, . . . , 2d }. They correspond to sub-cubes of Xm (σ1:m ). Wavelet-like approximation of F. Using the above dyadic discretization P, we approximate any f ∈ F with piecewise-constant functions fM : [0, 1]d → [−1/2, 3/2] of the form fM (x) = M 1 X + 2 m=1 X 2−m cm (σ1:m ) Ix∈Xm (σ1:m ) σ1:m ∈{1,...,2d }m  where cm (σ1:m ) ∈ −1, 0, 1 . (20)  As shown in the next lemma, the functions fM form a 2−M -covering of F in the sup norm kgk∞ = supx∈[0,1]d g(x) . We use the following important property: for any given x ∈ [0, 1]d , there exists a unique σ1:M ∈ {1, . . . , 2d }M such that x ∈ Xm (σ1:m ) for all m = 1, . . . , M , so that M 1 X −m fM (x) = + 2 cm (σ1:m ) . 2 m=1 (21)  Lemma 14 Let f ∈ F and M > 1. There exist coefficients cm (σ1:m ) ∈ −1, 0, 1 such that fM defined in (20) satisfies kfM − f k∞ 6 2−M . 27 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Proof We denote the center of each cube Xm (σ1:m ) by xm (σ1:m ) and prove by induction on M > 1 that there exist coefficients cm (σ1:m ), m = 0, . . . , M , such that   (22) fM xM (σ1:M ) − f xM (σ1:M ) 6 2−(M +1) . This directly yields the conclusion, since every x ∈ XM (σ1:M ) is 2−(M +1) -close to the  center xM (σ1:M ) in sup norm and f is 1-Lipschitz, which by (22) and fM (x) = fM xM (σ1:M ) implies    fM (x) − f (x) 6 fM xM (σ1:M ) − f xM (σ1:M ) + f xM (σ1:M ) − f (x) 6 2−(M +1) + 2−(M +1) = 2−M . We now carry out the induction. For M = 1 and σ1 ∈ {1, . . . , 2d }, we set c1 (σ1 ) ∈ arg min c∈{−1,0,1}  1 c + − f x1 (σ1 ) , 2 2 which corresponds to projecting the value of f at the center x1 (σ1 ) onto the coarse grid {0, 1/2, 1}. Therefore 1/2 + c1 (σ1 )/2 − f (x1 (σ1 )) 6 1/4, which implies (22) by (21). Now, let M > 2 and assume that there exist coefficients cm (σ1:m ), m = 0, . . . , M − 1, such that (22) holds true at level M − 1. We complete these coefficients at level M as follows: for all σ1:M ∈ {1, . . . , 2d }M , we set   c cM (σ1:M ) ∈ arg min fM −1 xM (σ1:M ) + M − f xM (σ1:M ) . 2 c∈{−1,0,1} Note that by (21) and xM (σ1:M ) ∈ XM (σ1:M ) ⊂ XM −1 (σ1:(M −1) ), we have  cM (σ1:M )  . fM xM (σ1:M ) = fM −1 xM (σ1:M ) + 2M (23)  Therefore, the definition of cM (σ1:M ) above corresponds to making fM xM (σ1:M ) as close to f xM (σ1:M ) as possible. Now, note that fM −1 is constant over XM −1 (σ1:(M −1) ), so that the   difference ∆M −1 , fM −1 xM (σ1:M ) − f xM (σ1:M ) satisfies   ∆M −1 = fM −1 xM −1 (σ1:(M −1) ) − f xM (σ1:M )     6 fM −1 xM −1 (σ1:(M −1) ) − f xM −1 (σ1:(M −1) ) + f xM −1 (σ1:(M −1) ) − f xM (σ1:M ) (22) 6 2−M + xM −1 (σ1:(M −1) ) − xM (σ1:M ) ∞ = 2−M + 2−(M +1) , where the last inequality is by (22) at level M − 1, and where the last equality is by comparison of two cube centers at subsequent depths. To conclude the proof, we note that the bound ∆M −1 6 2−M +2−(M +1) implies the existence   of cM (σ1:M ) ∈ {−1, 0, 1} such that fM xM (σ1:M ) − f xM (σ1:M ) 6 2−(M +1) , as required to finish the induction. We can indeed consider three possible cases. If ∆M −1 6 2−(M +1) , then setting cM (σ 1:M ) = 0 concludes the proof (by (23)). If ∆M −1 > 2−(M +1) , then ∆M −1 lies in  the interval 2−(M +1) , 2−M + 2−(M +1) , so that setting cM (σ1:M ) = −1 also concludes the proof (using (23) again). Similarly we set cM (σ1:M ) = 1 when ∆M −1 < −2−(M +1) . We are now ready to define our hierarchical covering of F. 28 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING Construction of TF⋆ . We build a tree TF⋆ such that the value of any function fM at any point x ∈ [0, 1]d —as given by (21)— can be computed by following a path from the root to a leaf of TF⋆ . Unlike Section 4.2, this tree is not labeled by functions but instead by either values in R or cubes Xm (σ1:m ) ⊆ [0, 1]d , as illustrated in Figure 3. More precisely, our tree TF⋆ is composed of two types of nodes: • Nodes at depths m. The root v0 = ∅ (at depth m = 0) is labeled by 1/2. Each node at depth m = 1, 2, . . . is indexed by a tuple (σ1 , c1 , σ2P , c2 , . . . , σm , cm ) with σk ∈ {1, . . . , 2d } and −k ck ∈ {−1, 0, 1}; the node is labeled by 1/2 + m k=1 2 ck , which corresponds to (21). • Nodes at depths m + 1/2. Each node at depth m + 1/2, m > 0, is indexed by a tuple (σ1 , c1 , σ2 , c2 , . . . , σm , cm , σm+1 ) with σk ∈ {1, . . . , 2d } and ck ∈ {−1, 0, 1}; the node is labeled by the cube Xm (σ1:m+1 ). We connect nodes in the following natural way. Nodes v = (σ1 , c1 , σ2 , c2 , . . . , σm , cm ) at depth m are connected to all nodes at depth m + 1/2 of the form (v, σm+1 ), with σm+1 ∈ {1, . . . , 2d }. Nodes w = (σ1 , c1 , σ2 , c2 , . . . , σm , cm , σm+1 ) at depth m + 1/2 are connected to all nodes at depth m + 1 of the form (w, cm+1 ), with cm+1 ∈ {−1, 0, 1}. We stop the tree at depth M > 1. As previously, we denote by L the set of all the leaves of TF⋆ , by Lv the set of all the leaves under v ∈ TF⋆ , and by Cv the set of children of v ∈ TF⋆ . 1 2 depth 0 depth 0+ depth 1 depth 1+ binning Exp4 0, 12  [ 12 , 1[  1 2 0 1 Exp4 1 2 0 1 [0, 41 [ [ 41 , 12 [ [0, 14 [ [ 14 , 12 [ [0, 41 [ [ 14 , 21 [ [ 12 , 43 [ [ 43 , 1] [ 12 , 43 [ [ 43 , 1] [ 21 , 34 [ [ 34 , 1] .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . 1 2 1 2 Figure 3: The structure of the efficient chaining tree in dimension d = 1. Algorithm HierExp4⋆ . Our new bandit algorithm HierExp4⋆ (Algorithm 5) is an efficient modification of HierExp4 based on the tree TF⋆ defined above. HierExp4⋆ alternates between “binning nodes" at depths m and “Exp4 nodes" at depths m + 1/2 (see Figure 3). We discretize the action space Y = [0, 1] with K = k2−M : k = 1, . . . , 2M } of cardinality K = 2M . Note that, af −M ter projecting onto 2 , 1 , the set of labels of all the leaves v ∈ L exactly corresponds to this discretization, i.e., ! ! )  (  M 1 k 1 X −m M 2 cm , M , 1 : cm ∈ {−1, 0, 1} = + : k = 1, . . . , 2 = K. min max 2 m=1 2 2M At every round t, after observing context xt ∈ [0, 1]d , the algorithm activates the root v0 and all  nodes σ1 , c1 , . . . , σm (, cm ) such that xt ∈ Xm (σ1:m ); the other nodes are asleep during that round. In particular, there are 3M activated leaves v = (σ1 , c1 , . . . , σM , cM ) ∈ L. Each such leaf 29 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ   recommends the action it (v) ∈ {1, . . . , K} matching its label after projection onto 2−M , 1 , i.e., such that ! ! M it (v) 1 1 X −m 2 cm , M , 1 . = min max + (24) 2M 2 2 m=1 TF⋆ Each node v ∈ maintains a probability distribution pt (v, ·) ∈ ∆(K) over actions in K, which is only used and updated when v is activated. The activated leaves v ∈ L correspond to unit masses pt (v, i) = Ii=it (v) . As mentioned earlier, the internal nodes v ∈ TF⋆ \ L are of two types: • Each internal node v = (σ1 , c1 , σ2 , c2 , . . . , σm , cm ) at depth m = 0, . . . , M − 1 is a “binning node". When activated, it identifies its only child w = (v, σm+1 ) handling xt (i.e., such that xt ∈ Xm+1 (σ1:(m+1) )) and outputs pt (v, ·) = pt (w, ·). We denote by Tbin ⊂ TF⋆ \ L the set of “binning nodes". • Each internal node v = (σ1 , c1 , σ2 , c2 , . . . , σm , cm , σm+1 ) at depth m + 1/2 is an “Exp4 node". It runs an instance of Exp4 using the children of v as experts. The variant of Exp4 we use is Algorithm 4 (see Appendix E) applied to penalized loss estimates (cf. (2)), which adapts to the range of the losses and allows for a careful control of the variance terms along the tree. Let Exp4v be the instance of the Exp4 variant run at node v. On all the rounds t when v is activated, thisP instance updates a distribution qt (v, ·) ∈ ∆(|Cv |) over experts in Cv and outputs pt (v, i) = w∈Cv qt (v, w)pt (w, i) for all actions i = 1, . . . , K. We denote by TExp4 ⊂ TF⋆ \ L the set of “Exp4 nodes". Note that the root v0 of TF⋆ is activated at all rounds t. The prediction of HierExp4⋆ at time t is ybt = It 2−M ∈ K, where It is drawn according to a mixture of pt (v0 , ·) and a unit mass on the minimal action i = 1. A pseudo-code for HierExp4⋆ can be found in Algorithm 5. G.2. Proof of Theorem 6 As for the proof of Theorem 4, we start by stating a lemma indicating that the losses associated with neighboring leaves are close to one another. Lemma 15 Let v ∈ TExp4 , with depth m + 1/2, m ∈ {0, . . . , M − 1}. Then, all leaves w, w′ ∈ Lv in the subtree rooted at v satisfy     it (w) it (w′ ) ℓt 6 21−m − ℓt 2M 2M at all rounds t > 1 when w and w′ are both activated. ′ , c′ ). First, we remark that Proof Denote w = (σ1 , c1 , . . . , σM , cM ) and w′ = (σ1′ , c′1 , . . . , σM M since w and w′ have the common ancestor v at level m, we have σi = σi′ and ci = c′i for all i 6 m, ′ as well as σm+1 = σm+1 (recall that v ∈ TExp4 ). Thus, M X j=1 −j 2 cj − M X j=1 2−j c′j 6 M X j=m+1 −j 2 |cj − 30 c′j | 6 M X j=m+1 2−j+1 6 21−m . A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING Algorithm 5: HierExp4⋆ (for the one-sided full information feedback) Input : Tree TF⋆ with root v0 and leaves L, exploration parameter γ ∈ (0, 1), penalization parameters α0 , . . . , αM −1 > 0, learning rates η0 , . . . , ηM −1 > 0. Initialization: Set q1 (v, ·) to the uniform distribution in ∆(|Cv |) for every v ∈ TExp4 . for t = 1, 2, . . . do 1. Get context xt ∈ X ;  2. Activate v0 and all nodes v = σ1 , c1 , . . . , σm (, cm ) ∈ TF⋆ such that xt ∈ Xm (σ1:m ); 3. Set pt (v, i) = Ii=it (v) for all i ∈ K and all activated leaves v ∈ L; 4. Set pt (v, i) = qt (v, ·) · pt (·, i) for all i ∈ K and all activated nodes v ∈ TExp4 ; 5. Set pt (v, ·) = pt (w, ·) for all activated nodes v ∈ Tbin , where w ∈ Cv is the unique activated child of v; 6. Draw It ∼ p∗t and play ybt = It 2−M , where p∗t (i) = (1 − γ)pt (v0 , i) + γIi=1 for all i ∈ K; 7. Observe ℓt (y) for all y > ybt ; 8. For all m = 0, . . . , M − 1 and all activated nodes v ∈ TExp4 at level m + 1/2, with v = (σ1 , c1 , σ2 , c2 , . . . , σm , cm , σm+1 ), compute the loss estimate for each i ∈ Kt (v),  ℓt (i/2M ) − ℓt jt (v)/2M + 21−m αm αm b , (25) IIt 6i − Pi + ℓt (v, i) = Pi ∗ ∗ γ k=1 pt (k) k=1 pt (k) where Kt (v) = {i : (∃w ∈ Cv ) pt (w, i) > 0} and jt (v) = max Kt (v). Then, for each w ∈ Cv , compute the expert loss ℓet (v, w) = pt (w, ·) · ℓbt (v, ·) and perform the update qt+1 (v, w) = exp −ηm X w ′ ∈Cv t X s=1 exp −ηm end ℓes (v, w)Ixs ∈Xm+1 (σ1:(m+1) ) t X s=1 ! ℓes (v, w )Ixs ∈Xm+1 (σ1:(m+1) ) ′ !. (26) ′ Therefore,  by definition (24) of it (w) and it (w ), and since ′projecting two real numbers onto −M 2 , 1 can only reduce their distance, we get, when w and w are both activated, M M j=1 j=1 it (w) it (w′ ) 1 X −j 1 X −j ′ 6 2 c − 2 cj 6 21−m , − + − j 2M 2M 2 2 which implies the result since ℓt is 1-Lipschitz. We are now ready to prove Theorem 6 from the main text.   Proof (of Theorem 6) Let f ∈ F. By Lemma 14, we can fix fM : [0, 1]d → −1/2, 3/2 of the  form (20), with coefficients cm (σ1:m ) ∈ −1, 0, 1 , and such that kfM − f k∞ 6 2−M . In the proof of Theorem 4, we rewrite the regret with respect to fM as the sum of M regrets along the path joining the root of TF to the leaf corresponding to fM . Next, we proceed similarly except that now fM corresponds to a (2d )-ary subtree of TF⋆ indexed by σ1:M ∈ {1, . . . , 2d }M . The 31 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ  2dM leaves σ1 ,c1 (σ1 ), σ2 , c2 (σ1:2 ), . . . , σM , cM (σ1:M ) are labeled with the values of fM (before projecting onto 2−M , 1 ) over the cubes XM (σ1:M ). We control the regret of HierExp4⋆ with respect to fM by starting from the root v0 of TF⋆ and by progressively moving down the tree. We write Pt−1 and Et−1 for conditioning on I1 , . . . , It−1 , Pk ∗ ∗ and set Pt (k) , i=1 pt (i) = Pt−1 (It 6 k). In the sequel, we repeatedly use Corollary 12 with parameters Em , 21−m , αm and γ to control the regret on each “Exp4 node". This corollary applies to loss estimates penalized with pent (k) = −αm /Pt∗ (k) for “Exp4 nodes" at depth m + 1/2, with m = 0, . . . , M − 1. Since the root v0 is a “binning node", we have pt (v0 ,k) = pt (σ1 , k) at all rounds t such that xt ∈ X1 (σ1 ). Therefore, writing ℓt (k) instead of ℓt k/2M , " # α0 + 4η0 E02 E pt (v0 , k) ℓt (k) − Pt∗ (k) t=1 k=1     K 2 X X X α0 + 4η0 E0  pt (σ1 , k) ℓt (k) − = E Pt∗ (k) t: xt ∈X1 (σ1 ) k=1 σ1 ∈{1,...,2d }   K X X X   pt (σ1 , c1 ), k ℓt (k) − 6 min E  T X K X σ1 ∈{1,...,2d } 6 X σ1  E c1 ∈{−1,0,1} t: xt ∈X1 (σ1 ) k=1 ln 3 4η0 T (σ1 )α20 + + η0 γ2 X K X t: xt ∈X1 (σ1 ) k=1 !  pt [σ1 , c1 (σ1 )], k ℓt (k) −    α0  Pt∗ (k) (27)   2 d α0  + 2 ln 3 + 4η0 T α0 , Pt∗ (k) η0 γ2 (28) where (27) follows from Corollary 12 with parameters E0 = 2, α0 and γ, and where T (σ1 ) is the number of rounds t such that xt ∈ X1 (σ1 ). Indeed, the probability distributions pt (σ1 , c1 ), · are mixtures of actions it (w) associated with activated leaves w ∈ Lσ1 , whose losses are at most at distance 2 by Lemma 15 with m = 0. The last inequality (28) above is obtained by choosing c1 = c1 (σ1 ). So far we have showed how to move from depth m = 0 to depth 1. Repeating the same argument at all subsequent depths m = 1, . . . , M − 1, and noting that αm−1 = αm + 4ηm 22−2m = 32 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING 2 , we get αm + 4ηm Em " T K #  XX α0 + 4η0 E02 E pt (v0 , k) ℓt (k) − Pt∗ (k) t=1 k=1     K X X X  α M −1  6 E pt [σ1 , c1 (σ1 ), . . . , σM , cM (σ1:M )], k ℓt (k) − ∗ P t (k) σ1:M t: xt ∈X1 (σ1:M ) k=1 ! M −1 X 2(m+1)d ln 3 4ηm T α2m + + ηm γ2 m=0   ! M −1 (m+1)d ln 3 2 X X X  2 4η T α m m  ℓt it (v)  + 6 + , (29) 2 η γ m σ m=0 t: xt ∈X1 (σ1:M ) 1:M  where in the last inequality v denotes the leaf σ1 , c1 (σ1 ), . . . , σM , cM (σ1:M ) , whose probability distribution pt (v, ·) is the unit mass on its action it (v).    We define feM (x) , min max fM (x), 2−M , 1 to be the projection of fM (x) onto 2−M , 1 ,   and, similarly, fe(x) , min max f (x), 2−M , 1 . Since projection can only reduce the distance between two points, feM (x) − fe(x) 6 fM (x) − f (x) 6 kfM − f k∞ 6 2−M . But, noting that fe(x) is 2−M -close to f (x) ∈ [0, 1], this yields feM (x)−f (x) 6 feM (x)− fe(x) + fe(x)−f (x) 6 21−M . Therefore, since ℓt is 1-Lipschitz, and using both (21)  and the definition (24) of it (v), we get that, when the leaf v = σ1 , c1 (σ1 ), . . . , σM , cM (σ1:M ) is activated,     ℓt it (v) = ℓt feM (xt ) 6 ℓt f (xt ) + feM (xt ) − f (xt ) 6 ℓt f (xt ) + 21−M . We plug  last bound into (29) and multiply the resulting inequality by 1 − γ. Then, using  the Et−1 ℓt ybt = (1 − γ)pt (v0 , ·) · ℓt + γℓt (1), together with ℓt (y) ∈ [0, 1], we obtain # ! " T K M −1 X XX 2(m+1)d ln 3 4ηm T α2m α0 + 4η0 E02 RegT (F) 6 + + (1 − γ) E pt (v0 , k) ηm γ2 Pt∗ (k) m=0 t=1 k=1 1−M + γT + 2 T. (30) Now, we use that by definition p∗t (k) = (1 − γ)pt (v0 , k) + γIk=1 > (1 − γ)pt (v0 , k). Therefore, similarly to the analysis of Exp3-RTB, we can control the variance term (1 − γ) K K K Z P ∗ (k) X X X t p∗t (k) Pt∗ (k) − Pt∗ (k − 1) dx = 1 + = 1 + ∗ ∗ ∗ ∗ (k) ∗ Pt (k) Pt (k) Pt (k) P k=1 k=2 k=2 Pt (k−1) t Z 1 K Z P ∗ (k) X t dx 1 e dx =1+ 6 1 − ln Pt∗ (1) 6 1 + ln = ln , 61+ γ γ Pt∗ (1) x Pt∗ (k−1) x K X pt (v0 , k) k=1 6 k=2 where we used Pt∗ (1) = p∗t (1) > γ. Hence, substituting into the previous bound (30) and recalling that E0 = 2, we get ! M −1 e X 2(m+1)d ln 3 4ηm T α2m + γT + 21−M T . (31) + + (α + 16η )T ln RegT (F) 6 0 0 ηm γ2 γ m=0 33 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ Optimization of the parameters. In the sequel, we show that the prescribed choices of M , γ, (αm ), and (ηm ) lead to the stated regret bound. Before that, we explain these particular choices by approximately optimizing (31), which will lead to (32) and (33). For the sake of readability, we 2 = will sometimes write f . g instead of f = O(g). First, recall that αm−1 = αm + 4ηm Em αm + 24−2m ηm . We thus make the approximation αm ≈ 24−2m ηm , and start by optimizing in ηm the terms inside the sum appearing in (31). To do so, we equalize the terms to get the equality 2(m+1)d ln 3 4ηm T α2m = ηm γ2 which we approximate, using the previous remark, by 3 2md T 2−4m ηm ≈ ηm γ2 d 1 1 ηm = c2m( 4 +1) γ 2 T − 4 , hence our choice (32) where c > 0 will be optimized by the analysis. Now, from these values of ηm , we can compute αm by choosing αM = 0 and using the recursion αm−1 = αm + 24−2m ηm . This yields αm = M X M X 1 1 24−2j ηj = c24 γ 2 T − 4 d 2j( 4 −1) . (33) j=m+1 j=m+1 We now upper bound (31) by distinguishing between the two cases 1 6 d 6 4 and d > 4. • If d 6 4, then the terms inside the sum in (33) are non-increasing, so that 1 1 d αm 6 c24 M1 γ 2 T − 4 2m( 4 −1) , (34)  where M1 = M if 2 6 d 6 4 and M1 = 2 > 1/ 21−d/4 − 1 if d = 1. The sum in the right-hand side of (31) then becomes, by substituting the definition of ηm (see (32)) and the above upper bound on αm , ! M −1 ! M −1 X 2m( 34 d−1)+d T 14 ln 3 210 c3 M 2 2m( 3d4 −1) T 41 X 2(m+1)d ln 3 4ηm T α2m 1 + 6 + 1 1 2 η γ 2 m cγ γ2 m=0 m=0 =  2d ln 3 c (∗) 1 −1  1 1M X 3 + 210 M12 c3 T 4 γ − 2 2m( 4 d−1) m=0 1 1 6 27 M12 T 4 γ − 2 6 ( M −1 X 3 2m( 4 d−1) m=0 211 T 1 4 γ 3 27 M 2 T − 12 1 4 γ − 21 M ( 34 d−1) 2 if d = 1 if 2 6 d 6 4 −1/2 where inequality (∗)Pis by using d 6 4 and choosing c = 2−5/4 M1 , while the last in−m/4 6 23 for d = 1. Plugging this inequality into (31), upper equality is because ∞ 2 m=0 bounding α0 using (34) and η0 using (32), and recalling that M = ⌈ln2 (1/γ)⌉, we get – case d = 1: choosing γ = T −1/2 / ln(T ), RegT (F) = O 34 √  T ln T . (35) A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING – case 2 6 d 6 4: choosing γ = T −1/(d+2/3) , 3 1 1 1 3 3 RegT (F) . ln(1/γ) 2 T 4 γ − 2 γ −( 4 d−1) + ln(1/γ)2 γ 2 T 4 + γT 3d/4 d−1/3 3 d−1/3 3 d−1/3 . (ln T ) 2 T d+2/3 + (ln T )2 T d+2/3 + T d+2/3 . (ln T ) 2 T d+2/3 , (36) where the last inequality is because 3d/4 < d − 1/3 for d > 2. • If d > 5, then the terms inside the sum in (33) are exponentially increasing, so that d 2 4 −1 1 1 d 1 d 1 c24 γ 2 T − 4 2M ( 4 −1) 6 c27 γ 2 T − 4 2M ( 4 −1) . d −1/4 −1 1−2 24 − 1 (37) Then, following the lines of the case d 6 4, by substituting ηm (see (32)) and αm in the sum in the right-hand side of (31) ! M −1 X 2(m+1)d ln 3 4ηm T α2m + ηm γ2 m=0 ! 3 d 1 1 d M −1 X 2m( 4 d−1)+d T 4 ln 3 216 c3 2m( 4 +1)+M ( 2 −2) T 4 6 + 1 1 cγ 2 γ2 m=0 ! 1 M −1 M −1 X d d T 4 2d ln 3 X m( 3 d−1) 2 4 = 1 2m( 4 +1) + 216 c3 2M ( 2 −2) c 2 γ m=0 m=0  1  4+d 3d 3 T4 2 2M ( 4 d−1) + 216 c3 2M ( 4 −1) 6 1 c γ2  1  3 T 4 24+d 16 3 = 1 + 2 c 2M ( 4 d−1) c γ2 4 1 2 αm 6 c2 γ T − 14 M ( d4 −1) 2 1 1 6 3 3 6 T 4 γ − 2 2M ( 4 d−1)+8+ 4 d where in the last inequality we used c = 2d/4−3 . Plugging into the regret bound (31), upper bounding α0 using (37) and η0 using (32), and recalling that M = ⌈ln2 (1/γ)⌉, we get 1 1 3 3 d 3 RegT (F) . T 4 γ 2 − 4 d + γ 2 − 4 T 4 ln(1/γ) + γT d−1/3 d−1 d−1/3 d−1/3 . T d+2/3 + T d+2/3 ln(T ) + T d+2/3 . T d+2/3 , (38) where the second inequality is by setting γ = T −1(d+2/3) . Putting together the three cases (35), (36), and (38) concludes the proof of the regret bound. Running time of HierExp4⋆ . We only address the case d > 2. First note that the total number of “Exp4 nodes” in TF⋆ is TExp4 = = M −1 X m=0 M −1 X m=0 n o v = (σ1 , c1 , σ2 , c2 , . . . , σm , cm , σm+1 ) : σk ∈ {1, . . . , 2d }, ck ∈ {−1, 0, 1} 3m 2d(m+1) M +1  − 3 · 2d 1 3 · 2d d M  = 6 3 · 2 . 3 3 · 2d − 1 35 C ESA -B IANCHI G AILLARD G ENTILE G ERCHINOVITZ M M Similarly, Tbin 6 3 · 2d and L 6 3 · 2d . Summing the three upper bounds, we get M TF⋆ 6 3 3 · 2d . Therefore, using M = ⌈ln2 (1/γ)⌉ and γ = T −1/(d+2/3) , we obtain  d+ln 3  2 ln2 T ⋆ so that TF = O T d+2/3 . M 61+ d + 2/3 1  The number of actions in K is 2M = O T d+2/3 . The running time at every round t, which is at most proportional to the total number of tuples (v, w, i) for (v, i) ∈ TF⋆ × K and w ∈ Cv , is at most  of the order of TF⋆ × K × max 2d , 3 . Therefore, the running time is at most of the order of T d+1+ln2 3 d+2/3 6 T 1.8 for all d > 2. d+1+ln2 3 A tighter analysis however yields a smaller time complexity than the rate T d+2/3 derived above. This is because —from Algorithm 5— all elementary computations only need to be computed on activated “Exp4 nodes” nodes, on their (finite number of) children, and on actions in K. Fix a round t > 1. From a computation similar to the one above, but noting that all activated nodes share the same coefficients σm for all depths m, we can see that the total number of activated “Exp4 nodes” at round t is at most of M −1 X 3M − 1 3m = 2 m=0 1+ln2 3 so that the running time per round is at most of the order of 3M 2M . T d+2/3 , which concludes the proof for d > 2. Similarly, in the case d = 1, the choice of γ = T −1/2 /(ln T ) entails a running  1+ln2 3  √  time at most of the order of 3M 2M = O T ln T )1+ln2 3 = o T 1+2/3 , so that the stated running time also holds true for d = 1. Appendix H. Algorithm HierHedge and proof of Theorem 7 The proof goes along the same lines as the proof of Theorem 4. Let v be any internal node at depth m = 0, . . . , M − 1. By construction of HierHedge, the distribution pt (v, ·) ∈ ∆(K) is computed by Hedge and is supported on the set {it (w) : w ∈ Lv }. By Lemma 13, the losses of any pair of actions in this set differ by at most 2−m+3 . Hence, we may apply (Cesa-Bianchi et al., 2007, Theorem 5) with N = |Cv | 6 Nm+1 , E = 2−m+3 , and Vet 6 E 2 obtaining # " T T  p X X T ln Nm+1 + ln Nm+1 + 1 . pt (w, ·) · ℓt 6 2−m+5 pt (v, ·) · ℓt − max E w∈Cv t=1 t=1 As in the proof of Theorem 4, we sum the above along a path v0 → v1 → · · · → vM = w for any leaf w ∈ L and get # " T M −1 T p  X X X 2−m ℓt (it (w)) 6 25 pt (v0 , ·) · ℓt − min E T ln Nm+1 + ln Nm+1 + 1 . t=1 w∈L m=0 t=1 36 A LGORITHMIC C HAINING AND THE ROLE OF PARTIAL F EEDBACK IN O NLINE N ONPARAMETRIC L EARNING Algorithm 6: HierHedge (for the full information feedback) Input : Tree TF with root v0 and leaves L, learning rate sequences η2 (v) > η3 (v) > · · · > 0 for v ∈ TF \ L. Initialization: Set q1 (v, ·) to the uniform distribution in ∆(|Cv |) for every v ∈ TF \ L. for t = 1, 2, . . . do 1. Get context xt ∈ X ; 2. Set pt (v, i) = Ii=it (v) for all i = 1, . . . , K and for all v ∈ L; 3. Set pt (v, i) = qt (v, ·) · pt (·, i) for all i = 1, . . . , K and for all v ∈ TF \ L; 4. Draw It ∼ pt (v0 , ·); 5. Observe ℓt (i) for all i = 1, . . . , K; 6. For each v ∈ TF \ L and for each w ∈ Cv compute the expert loss ℓet (v, w) = pt (w, ·) · ℓt and perform the update   P exp −ηt+1 (v) ts=1 ℓes (v, w)   qt+1 (v, w) = P (39) Pt e ′) exp −η (v) ℓ (v, w ′ t+1 s s=1 w ∈Cv end Since L is a (2−M )-covering of F, 2−M ≤ 2ε, and Kε is a ε-covering of Y, we get # " T M −1 T p  X X X   T ln Nm+1 + ln Nm+1 + 1 . 2−m ℓt f (xt ) 6 5εT + 25 E ℓt yIt − inf t=1 f ∈F m=0 t=1 Overapproximating the sums with integrals similarly to (18) and (19), RegT (F) 6 5εT + 27 Z  p 2 T ln N∞ (F, x) + ln N∞ (F, x) dx . 1/2  ε/2 d p d If F is a set of Lipschitz functions f : [0,  1] → [0, 1] , where [0, 1] is endowed with the norm ′ −d kx − x k∞ , then ln N∞ (F, ε) = O pε implying   √  O √pT + p ln(1/ε)  if d = 1 1−d O pT ln(1/ε) + pε  if d = 2 RegT (F) 6 5T ε + √  O pT ε1−d/2 + pε1−d if d > 3. Optimizing in ε, we obtain the stated result. 37
10math.ST
Component Outage Estimation based on Support Vector Machine Rozhin Eskandarpour, Amin Khodaei Department of Electrical and Computer Engineering University of Denver Denver, USA [email protected], [email protected] Abstract—Predicting power system component outages in response to an imminent hurricane plays a major role in preevent planning and post-event recovery of the power system. An exact prediction of components states, however, is a challenging task and cannot be easily performed. In this paper, a Support Vector Machine (SVM) based method is proposed to help estimate the components states in response to anticipated path and intensity of an imminent hurricane. Components states are categorized into three classes of damaged, operational, and uncertain. The damaged components along with the components in uncertain class are then considered in multiple contingency scenarios of a proposed Event-driven Security-Constrained Unit Commitment (E-SCUC), which considers the simultaneous outage of multiple components under an N-m-u reliability criterion. Experimental results on the IEEE 118-bus test system show the merits and the effectiveness of the proposed SVM classifier and the E-SCUC model in improving power system resilience in response to extreme events. Keywords— Support vector machines, extreme events, power system resilience, resource scheduling, security-constrained unit commitment. NOMENCLATURE Indices and Sets: b Index for buses. B Set of components connected to bus b. i Index for generation units. s Index for scenarios. S Set of outage scenarios. t Index for time. β Index for training examples in SVM. Parameters: c Penalty factor of soft margin SVM. DRi Ramp down rate of unit i. DTi Minimum down time of unit i. Fi(.) Generation cost function of unit i. M Large positive constant. Pimin Minimum generation capacity of unit i. Pimax Maximum generation capacity of unit i. R System reserve. URi Ramp up rate of unit i. UTi Minimum up time of unit i. xl Line reactance of line l. This work has been supported in part by the U.S. National Science Foundation under Grant CMMI-1434771. Variables: alb Element of line l and bus b at line-bus incidence matrix. Dbt Load at bus b at time t. g Bias of hyperplane from the origin h(x) Hyperplane separating training examples (the output of the classifier). Iit Commitment state of unit i at time t. LCbts Load curtailment at bus b at time t in scenario s. Pits Real power generation of unit i at time t in scenario s. PLlts Real power flow of line l at time t in scenario s. on Number of successive ON hours of unit i at time Tit t. Number of successive OFF hours of unit i at Titoff time t. UXits Outage state of unit i at time t in scenario s; 0 if on outage, otherwise 1. UYlts Outage state of line l at time t in scenario s; 0 if on outage, otherwise 1. vb Value of lost load at bus b. w Normal vector to the hyperplane xβ Training example β. yβ Class labels of training example β. Δi Permissible power adjustment of unit i. θbts Phase angle of bus b at time t in scenario s. I. INTRODUCTION Weather events are the number one cause of power system outages in the United States resulting in millions of dollars damage every year to critical infrastructure, businesses, and emergency networks [1]. Among the different types of extreme weather events, hurricanes are the most frequent in the United States [2]. The power grid resilience in response to these imminent hurricanes can be significantly improved by (a) an efficient forecasting of the likely hurricane impacts on the grid and to have an idea of which components will be damaged, and (b) an optimal schedule of available generations in case of several power component outages. These two factors can potentially improve pre-event planning and post-event recovery practices by preparing the system to address likely component outages and further response to the outages once the hurricane is passed. A case study on hurricane planning and rebuilding the electrical infrastructure along the Gulf Coast for hurricane Katrina is presented in [3], where the grid resiliency and its interdependency are estimated with data for Hurricane Katrina regarding power delivery and telecommunications, collected post-landfall. Post-disaster restoration is also an important part of the power system resilience studies. In [5] and [6], a stochastic pre-hurricane model is proposed which aims at managing the available resources before the extreme event, as well as a deterministic post-hurricane model to manage the system after the extreme event through a proactive recovery. In [6] an optimal restoration scheduling to minimize the load curtailment in the case of an extreme event is proposed. The proposed model is based on AC power flow constraints and aims at grid restoration after extreme events by using lost load data. In [7] an optimal repair schedule, system configuration, and unit commitment model to restore the damaged grid infrastructure through a post-disaster decision-making model is proposed. A general informative case study of a variety of models and algorithms regarding emergency response logistics in distribution networks is provided in [8]. The study in [9] predicts the outages in response to extreme events and investigates several data-driven measurements, such as the total number of component outages, potential effects on customers, the type of component outages, and their geographic distribution and duration. The study is based on large databases of outages in five hurricanes in Carolina. In [10], to forecast the power outage durations an ensemble learning method for regression is provided which are applied for outages resulted from several hurricanes such as Dennis, Katrina, and Ivan. In [11], a prediction model to estimate hurricane-related power outages is proposed and claimed to be viable along the U.S coastline. This prediction model is applied to publicly available data and used in estimating several historic storms, such as hurricane Sandy and typhoon Haiyan. The relatively considerable number of hurricanes in the United States have resulted in a substantial amount of data. Machine learning and data mining methods can therefore be viable tools to analyze these data and accordingly enhance power system planning and recovery in response to imminent hurricanes. In this paper, a multi-class Support Vector Machine (SVM) is proposed to classify power system components states after the hurricane into three classes (i.e., operational, outage and uncertain) based on the distance of each component from the center of the hurricane and the category of the hurricane. In the proposed problem three sets of data are available which need to be classified into three groups using SVM, which is a binary classifier. As a result, the classical SVM is extended using one-versus-one multi-classification. During the evaluation to predict the state of each component, each component is evaluated by three classifiers where the majority response of the classifier determines the state of the component. The obtained component outages from the proposed model are further integrated into a developed eventdriven security-constrained unit commitment (E-SCUC) model to find the optimal schedule of available resources that minimizes the operation cost while enhancing grid resilience. Unlike the existing work on outage prediction and extended outage consideration in SCUC, including the previous work of authors in [12] and [13], this paper uses a multi-class SVM to determine uncertain component states in addition to outage and operational. The merit behind considering uncertain states is that in practical applications there is limited information about the impact of the hurricane on all components and therefore considering uncertain states can increase the prediction accuracy and would help with achieving a better scheduling solution. To further consider the uncertain states, the previously defined N-m reliability criterion is extended in this paper to an N-m-u reliability criterion in which u represents the number of uncertain components on outage. The rest of the paper is organized as follows. Sections II and III respectively present the model outline and the formulation of the proposed outage estimation model and ESCUC. Section IV presents numerical simulations based on the IEEE 118-bus test system. Section V concludes the paper. II. PROPOSED COMPONENT OUTAGE ESTIMATION MODEL The proposed model has three stages. At first, an SVM model is trained to classify the components into three classes (damaged, operational, and uncertain). The model is trained on multiple features for each element (wind speed, distance to the center of the hurricane). Since historical data of the impact of previous hurricanes on power system components are limited, synthetic data are generated and used to train the model. During scheduling for the hurricane, the category and the path of the potential hurricane that is heading toward the power system are forecasted, which however can be obtained from weather forecasting agencies. According to the forecasted hurricane, the state of each component is determined by the trained SVM model. Once the state of each system component is estimated, the E-SCUC problem is solved to provide an optimal and resilient schedule of the resources in response to the hurricane. It is common to use the N-1 criterion for reliability studies in power systems, where N in the total number of components in the system. The N-1 criterion simply states that the system needs to adequately and reliably supply loads in case of a single component outage at any given time. Although extremely useful, this criterion cannot be directly applied to the system to ensure resilience, since more than one component in response to a hurricane may be out of service. In [12], an extended criterion, i.e., N-1-m is proposed which simultaneously considers the power system security in response to the single component outage, i.e., an N-1 criterion, and also in response to the outage of m components in impacted regions. In order to consider uncertainty in component failure prediction, this paper employs a further extended criterion, i.e., N-m-u, where m is the number of components that are predicted to be on outage during the extreme event, and u is the number of components in uncertain class. A. SVM Method for Outage Prediction The state of a component in response to the hurricane is considered to be either damaged (i.e., on outage), operational (i.e., in service), or uncertain (i.e., there is possibility of outage but it is completely certain). In order to classify the state of each component, different features can be considered. In this paper, the wind speed and the distance of the each component from the center of the hurricane are investigated as two major features. SVM [14] is applied to determine the decision boundary between different classes and accordingly determining the state of each component. min åå F (P Figure 1. One-versus-all and one-versus-one multiclassification An SVM can generally classify data into two classes by determining the proper hyperplane that separates training examples of one class from the other one. The best hyperplane is considered as the hyperplane with a clear gap that is as wide as possible. The optimal hyperplane parameters can be found by the following optimization problem: m 1 2 min w + c å e b 2 b =1 ( ) yb wT xb + g ³ 1,-e b , s.t. e b ³ 0, (1) b = 1,......, m where w is the normal vector to the hyperplane separating training examples, |g|/||w|| is the perpendicular distance from the hyperplane to the origin, and c is a penalty parameter allowing separating nonlinear examples. This is a quadratic programming problem which can be solved by Lagrange duality. By solving the duality, the final hyperplane only depends on the support vectors (i.e., sample points that are in the margin) and SVM needs to find only the inner products between the test samples and the support vectors. The idea of the maximum-margin hyperplane is based on the assumption that training data are linearly separable, which is not the case in many practical applications. In order to apply SVM to nonlinear data, kernel methods can be used [14]. The idea of kernel method (or kernel trick) is to map input features to a higher dimension that can be linearly separable and can fit the maximum-margin hyperplane in the transformed feature space. Kernel trick simply states that for all x1 and x2 in the input space X, a certain function K(x1, x2) can be replaced by the inner product of x1 and x2 in another space. For example, a polynomial kernel of degree d can be defined as: (2) K x , x = x .x d (a b i ) ( a b) SVMs are inherently two-class classifiers. The traditional way to do multiclass classification with SVMs is to use oneversus-rest classifiers (commonly referred to as one-versus-all) and to choose the class which classifies the test data with the greatest margin. Another strategy is to build a set of oneversus-one classifiers and to choose the class that is selected by the most classifiers (majority voting). In one-versus-one approach, if g is the number of classes, then g(g-1)/2 classifiers are constructed, and each one trains data from two classes. Fig. 1 shows the difference between one-versus-all and one-versusone approaches in a three class problem. B. E-SCUC Problem Formulation The objective of the E-SCUC problem is defined as: ) + ååå vLC bts t s (3) b where the first term is the operation cost in normal system operation (which includes the generation cost and startup/shutdown costs) and the second term is the cost of unserved energy during contingency scenarios (which is defined as the value of lost load times unserved energy). The value of lost load is defined as the average cost that each type of customer - residential, commercial, or industrial - is willing to pay in order to avoid power supply interruptions [15]. Assuming UX and UY as outage states for generation units and transmission lines, respectively, the proposed objective function is subject to the following operational constraints: å P + å PL "b, "s, "t (4) "i, "s, "t "i, "s, "t (5) (6) Pi (t -1) s - Pits £ DRi "i, "s, "t (7) Titon ³ UTi I it - I i (t -1) "i, "t (8) Titoff "i, "t (9) å Pimax I it ³ Dt + Rt "i, "t (10) 0 £ LCbts £ Dbt "i, "s, "t (11) its iÎ B l ÎB min Pi I itUX its£ Pits - Pi (t -1) s b = 1,......, m it 0 , I it i t lts +LCbts = Dbt Pits £ Pi max I itUX its £ URi ( ) ³ DTi (I i (t -1) - I it ) i Pit 0 - Pits £ D i - PLmax l UY lts£ PLlts - (12) "l , "s, "t (13) £ M (1 - UYlts ) "l , "s, "t (14) PLlts £ åb albq bts xl "i, "s, "t PLmax l UX lts Load balance equation (4) ensures that the total injected power to each bus from generation units and line flows is equal to the total load at that bus. Load curtailment variable (LCbts) is further added to the load balance equation to ensure a feasible solution when there is not sufficient generation to supply loads (due to an outage of power system components). Load curtailment will be zero under normal operation conditions. Generation unit output power is limited by its capacity limit and will be set to zero depending on its commitment and outage states (5). Generation units are further subject to prevailing technical constraints including ramp up and down rate limits (6)-(7), and minimum up and down time limits (8)(9). The system operating reserve requirement is represented in (10). Load curtailment at each bus is constrained by the total load on that bus (11), and the change in a unit generation is further constrained by the maximum permissible limit between normal and contingency scenarios (12). Transmission line capacity limits and power flow constraints are modeled by (13) and (14), respectively, in which the outage state is included to model the line outages in contingency scenarios. Further details can be found in [12], [13]. The E-SCUC problem is formulated using mixed-integer linear programming (MILP). CPLEX 12.6 [16] is used to solve the MILP problem. CPLEX uses a branch and cut algorithm which solves a series of LP sub-problems. In addition, multithreading can be applied to CPLEX solver which makes the MILP faster and can automatically make adjustments when memory is limited. III. NUMERICAL SIMULATIONS A. SVM performance As historical data for the past extreme hurricanes at component level are limited, a set of synthetic data is generated to train the SVM model as 300 samples in outage state, 300 samples in the operational state, and 150 samples in the uncertain area. To define the synthetic data, Saffir-Simpson Hurricane Scale [17] is used to generate wind speed features of the synthetic data. In particular, the generated samples follow a normal distribution function of one-minute sustained windspeed of different categories with a small Gaussian noise. Initial studies on the generated synthetic data showed that majority of the components in an anticipated hurricane of category 4 & 5 will be on outage, the components in a hurricane of category 1 will be operational, and the majority of the components in a hurricane of categories 2 & 3 will belong to the uncertain area, which verifies that the generated data conform to realistic conditions. The features are normalized to [0, 1] based on the maximum considered values of wind speed and distance. Fig. 2 shows the generated synthetic data. performance, and the average accuracy of classification is reported in Table I. Figure 3. Part of the IEEE 118-bus test system and the forecasted hurricane passing through a hypothetical path As it is shown, SVM with linear kernel and c=1 offers the best performance among other settings. The average overall classification accuracy of the proposed classification model is 85.3%. The relatively small variance (~2%) in the accuracy of the SVM under various hyper-parameters indicates that the proposed method is not sensitive to its hyper-parameters and is not over-fitted to the training data. Fig. 2 shows the decision boundary of SVM with linear kernel in a one-versus-one multiclassification approach. During the evaluation, to predict the state of each component, each component is evaluated by the three classifiers shown in Fig. 2, and the majority response of the classifier determines the state of the component. Table II shows the confusion matrix of classifying operational and outage components into three states. As it is demonstrated, the proposed method can classify the outage components from the operational components with a high accuracy. TABLE I. A cross-fold validation is a common approach to evaluate a classifier on a set of data. The cross-fold validation splits the data into q subsets, trained on (q-1) subsets, and evaluated on the subset that is left in the training. This process is performed q times (such that the classifier is evaluated on all samples). The final classification accuracy is the average of classification accuracies on all folds. In this paper, five folds are defined on the generated set of data (q=5). Since our dataset is relatively small, an off-the-shelf SVM model implemented in LibSVM [18] is used in this paper. There are other SVM solvers and techniques such as Liblinear [19] which is optimized for largescale linear classification and regression. As the number of attributes (features) in the studied case is smaller than the number of observations (samples), the probability of overfitting to the training data is low. A series of hyper-parameter “c” with various well-known kernels are examined to evaluate its performance and show the sensitivity of the employed SVM to its parameters. In each setting, a cross-fold validation with 5 folds is used to evaluate the ACCURACY OF SVM WITH VARIOUS HYPER-PARAMETERS “C” AND KERNELS USING 5-FOLD CROSS-VALIDATION Kernel Linear Quadratic Cubic Gaussian c=0.1 84.5 84.7 84.3 81.6 c=1 85.3 84.7 82.9 83.6 c=10 85.1 84.5 78.0 82.1 c=100 85.01 78.0 71.0 81.1 TABLE II. CONFUSION MATRIX OF CLASSIFYING SYSTEM COMPONENTS DURING EXTREME EVENT (NUMBER OF SAMPLES AND PERCENTAGE) Actual Figure 2. Generated samples for three classes (operational, damaged, and uncertain), and separating hyper-planes of Linear SVM with c=1 in a oneversus-one multi-classification. Operational Predicted Uncertain Outage Operational 274 (91.3%) 25 (8.4%) 1 (0.3%) Outage 1 (0.3%) 26 (8.7%) 273 (91.0%) B. E-SCUC with Extended Outage The proposed E-SCUC problem is applied to the standard IEEE 118-bus test system [20]. A hurricane is assumed to pass through a hypothetical path as shown in Fig. 3. The components in the path and its neighboring areas are classified into three categories of operational, outage, and uncertain, according to the wind speed and the distance to the center of the hurricane. Five components were classified in the outage class (lines 1, 17, 18, 20, and 30) and six components were categorized in the uncertain class (lines 7, 8, 13, 16, 22, and generation unit 1). Table III shows the list of components examined in this case study, the estimated distance from the center of hurricane and the wind speed. Three cases are studied to evaluate the role of considering uncertain area in power system scheduling: Case 1: In this case, only the components in the outage class are considered as possible contingencies and the components in the uncertain area are considered as operational. The operation cost is obtained as $1,041,040. No load curtailment has occurred in this case, so the cost of unserved energy is zero, and the system is secure against this eight component outage. Experimental results showed the effectiveness of the proposed method in separating three classes from each other based on wind speed and the distance from the center of the hurricane. The damaged components along with the components in the uncertain class were then considered in multiple contingency scenarios of a proposed E-SCUC, which considered the simultaneous outage of multiple components under an N-m-u reliability criterion. Experimental results on the IEEE 118-bus test system indicated that considering uncertain components in different scenarios could potentially lead to a more resilient schedule at the expense of marginal increase in operation cost. Case 2: In this case, the components in the uncertain class are considered as outages. The operation cost is obtained as $1,085,516. A total of 1.53 MWh load curtailment has occurred in this case. [1] TABLE III. CLASSIFCATION OF COMPONENTS IN THE STUDIED CASE Component Line 1 Line 17 Line 18 Line 20 Line 30 Line 7 Line 8 Line 13 Line 16 Line 22 Unit 1 Line 60 Line 48 Line 47 Line 44 Line 57 Line 45 Unit 15 Distance (normalized) 0.632 0.120 0.423 0.351 0.235 0.650 0.361 0.532 0.463 0.342 0.432 0.640 0.497 0.401 0.302 0.252 0.740 0.625 Wind speed (normalized) 0.838 0.762 0.704 0.656 0.563 0.632 0.543 0.562 0.501 0.423 0.394 0.437 0.395 0.254 0.202 0.184 0.156 0.097 Class (prediction) Outage Outage Outage Outage Outage Uncertain Uncertain Uncertain Uncertain Uncertain Uncertain Operational Operational Operational Operational Operational Operational Operational Case 3: In this case, the N-m-u reliability criterion is considered, where 192 contingency scenarios are defined in the system. Considering m=5, in each scenario five components in the outage class and one from the uncertain class are considered to be out of service. The operation cost is obtained as $1,087,022. The average load curtailment is calculated as 0.695 MWh. The obtained results advocate that considering uncertainty can offer a more resilient commitment against multiple component outages. This can be seen as the amount of load curtailment is considerably lower than considering all possible failures as an outage in same contingency scenario. This significant advantage is obtained at the expense of limited cost increase, which is less than 0.15%. The proposed approach to classifying components into three categories can therefore result in more resilient schedules. IV. CONCLUSION Prediction of a component state in response to an extreme event is challenging in practice. In this paper, a multiclass SVM was proposed to categorize system components into three classes (damaged, operational, and uncertain) in response to an imminent hurricane. An artificial set of data was generated to train the SVM, as the publicly available data on the impact of hurricanes on power system components is limited. REFERENCES [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] Executive Office of the President, “Economic Benefits of Increasing Electric Grid Resilience to Weather Outages-August 2013.” R. E. Brown, “Cost-benefit analysis of the deployment of utility infrastructure upgrades and storm hardening programs,” Quanta Technol. Raleigh, 2009. B. Ball, “Rebuilding electrical infrastructure along the Gulf Coast: A case study,” BRIDGE-Wash.-Natl. Acad. Eng.-, vol. 36, no. 1, p. 21, 2006. A. Arab, A. Khodaei, Z. Han, and S. K. Khator, “Proactive Recovery of Electric Power Assets for Resiliency Enhancement,” Access IEEE, vol. 3, pp. 99–109, 2015. A. Arab, A. Khodaei, S. K. Khator, K. Ding, and Z. Han, “Posthurricane transmission network outage management,” in Proc. IEEE Great Lakes Symp. Smart Grid New Energy Econ, 2013, pp. 1–6. A. Arab, A. Khodaei, S. K. Khator, and Z. Han, “Transmission network restoration considering AC power flow constraints,” in 2015 IEEE International Conference on Smart Grid Communications (SmartGridComm), 2015, pp. 816–821. A. Arab, A. Khodaei, S. Khator, and Z. Han, “Electric Power Grid Restoration Considering Disaster Economics,” IEEE Access, vol. 4, pp. 639–649, 2016. N. Perrier et al., “A survey of models and algorithms for emergency response logistics in electric distribution systems. Part II: Contingency planning level,” Comput. Oper. Res., vol. 40, no. 7, pp. 1907–1922, 2013. R. A. Davidson, H. Liu, I. K. Sarpong, P. Sparks, and D. V. Rosowsky, “Electric power distribution system performance in Carolina hurricanes,” Nat. Hazards Rev., vol. 4, no. 1, pp. 36–45, 2003. R. Nateghi, S. D. Guikema, and S. M. Quiring, “Forecasting hurricaneinduced power outage durations,” in Natural Hazards, 2014, vol. 74, pp. 1795–1811. S. D. Guikema, R. Nateghi, S. M. Quiring, A. Staid, A. C. Reilly, and M.-L. Gao, “Predicting hurricane power outages to support storm response planning,” Access IEEE, vol. 2, pp. 1364–1373, 2014. R. Eskandarpour, A. Khodaei, and J. Lin, “Event-Driven SecurityConstrained Unit Commitment,” in Innovative Smart Grid Technologies, 2016. R. Eskandarpour, A. Khodaei, and J. Lin, “Event-Driven SecurityConstrained Unit Commitment with Component Outage Estimation Based on Machine Learning Method,” in North American Power Symposium, 2016. C. Cortes and V. Vapnik, “Support-vector networks,” Mach. Learn., vol. 20, no. 3, pp. 273–297, 1995. L. Economics, “Estimating the Value of Lost Load,” Brief. Pap. Prep. ERCOT 17 June 2013, 2013. “CPLEX 12.” [Online]. Available: http://www.gams.com/latest/docs/solvers/cplex/index.html. T. Schott et al., “The Saffir-Simpson hurricane wind scale,” Natl. Weather Serv., 2012. C.-C. Chang and C.-J. Lin, “LIBSVM: a library for support vector machines,” ACM Trans. Intell. Syst. Technol. TIST, vol. 2, no. 3, p. 27, 2011. R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin, “LIBLINEAR: A library for large linear classification,” J. Mach. Learn. Res., vol. 9, no. Aug, pp. 1871–1874, 2008. “Power Systems Test Case Archive - UWEE.” [Online]. Available: https://www2.ee.washington.edu/research/pstca/.
3cs.SY
On the Distribution, Model Selection Properties and Uniqueness of the Lasso Estimator in Low and High Dimensions Ulrike Schneider and Karl Ewald arXiv:1708.09608v2 [math.ST] 29 Jan 2018 Vienna University of Technology We derive expressions for the finite-sample distribution of the Lasso estimator in the context of a linear regression model with normally distributed errors in low as well as in high dimensions by exploiting the structure of the optimization problem defining the estimator. In low dimensions we assume full rank of the regressor matrix and present expressions for the cumulative distribution function as well as the densities of the absolutely continuous parts of the estimator. Additionally, we establish an explicit formula for the correspondence between the Lasso and the least-squares estimator. We derive analogous results for the distribution in less explicit form in high dimensions where we make no assumptions on the regressor matrix at all. In this setting, we also investigate the model selection properties of the Lasso and show that possibly only a subset of models might be selected by the estimator, completely independently of the observed response vector. Finally, we present a condition for uniqueness of the estimator that is necessary as well as sufficient. 1 Introduction The distribution of the Lasso estimator (Tibshirani, 1996) has been an object of study in the statistics literature for a number of years. The often cited paper by Knight & Fu (2000) gives the asymptotic distribution of the Lasso in the framework of conservative model selection in a lowdimensional (fixed-p) framework by listing the limit of the corresponding stochastic optimization. Pötscher & Leeb (2009) derive explicit expressions of the distribution in finite samples as well as asymptotically for all large-sample regimes of the tuning parameter (“conservative” as well as “consistent model selection”) in the framework of orthogonal regressors. More recently, Zhou (2014) gives high-level information on the finite-sample distribution for arbitrary designs in low and high dimensions, geared towards setting up a Monte-Carlo approach to infer about the distribution. In Ewald & Schneider (2015), the large-sample distribution of the Lasso is derived in a lowdimensional framework for the large-sample regime of the tuning parameter not considered in Knight & Fu (2000). Moreover, Jagannath & Upadhye (2016) consider the characteristic function of the Lasso to obtain approximate expressions for the marginal distribution of one-dimensional components of the Lasso when these components are “large”, therefore not having to consider the atomic part of the estimator. In this paper, we exactly and completely characterize the distribution of the Lasso estimator in finite samples in the context of a linear regression model with normal errors. In low dimensions, we give formulae for the cumulative distribution function (cdf), as well as the density functions conditional on which components of the estimator are non-zero. We do so assuming full column rank of the regressor matrix. We also exactly quantify the correspondence between the Lasso and least-squares (LS) estimator. In a high-dimensional setting, we make absolutely no assumptions on the regressor matrix. We give formulae for the probability of the Lasso estimator falling into a given set and exactly quantify the relationship between the Lasso estimator and the data object X 0 y. Through this relationship, we also learn that the Lasso may never select certain models, this property depending only on the regressor matrix and the penalization weights and being independent of the observed response vector. In fact, we can characterize a so-called structural set 1 that contains all covariates that are part of a Lasso model for some response vector. This structural set can be identified by how the row space of the regressor matrix intersects the cube at the origin whose side lengths are determined by the penalization weights. The set may not contain all indices in which case the Lasso estimator will rule out certain covariates for all possible observations of the dependent variable. Finally, we present a condition for uniqueness of the Lasso estimator that is both necessary and sufficient, again related to how the row space of the regressor matrix intersects the above mentioned cube. All our results are based on properties of the optimization problem defining the estimator and do not hinge on the assumption of Gaussian errors. The paper is organized as follows. We introduce setting and notation in Section 2. The lowdimension case is treated in Section 3 whereas we consider the high-dimensional case in Section 4. We conclude in Section 5. 2 Setting and Notation Consider the linear model y = Xβ + ε, (1) where y is the observed n × 1 data vector, X the n × p regressor matrix which is assumed to be non-stochastic, β ∈ Rp is the true parameter vector and ε the unobserved error term with independent and identically distributed components that follow a N (0, σ 2 )-distribution. We consider the weighted Lasso estimator β̂L , defined as the unique solution to the minimization problem minp L(β) = minp ky − Xβk2 + 2 β∈R β∈R p X λn,j |βj |, (2) j=1 where λn,j , are non-negative user-specified tuning parameters that will typically depend on n. To ease notation, however, we shall suppress this dependence for the most part and write λn,j = λj for each j. Note that if λj = 0 for all j, the weighted Lasso estimator is equal to the ordinary LS estimator β̂LS and that λ1 = · · · = λp > 0 corresponds to the classical Lasso estimator as proposed by Tibshirani (1996), to which case we also refer to by uniform tuning. For later use, let λ = (λ1 , . . . , λp )0 and define M0 = {j : λj = 0}, the index set of all unpenalized coefficients. If M0 6= ∅, we speak of partial tuning. We stress dependence on the unknown parameter β when it occurs, but do not specify dependence on X, y or λ as these quantities are available to the user. The following notation will be used throughout the paper. Let ej denote the j-th unit vector in Rp and let φ(µ,Σ) denote the Lebesgue-density of a normally distributed random variable with mean µ and covariance matrix Σ and Φ be the cdf of a univariate standard normal distribution. For a vector m ∈ Rp and an index set I ⊆ {1, . . . , p}, the vector mI ∈ R|I| contains only the components of m corresponding to the elements of I and we write |I| for the cardinality of I and I c for {1, . . . , p} \ I, the complement of I. The 1-norm of m is denoted by kmk1 whereas the 2norm is simply denoted by kmk. For x ∈ R, let sgn(x) = 1{x>0} − 1{x<0} where 1 is the indicator function. For a set A ⊆ Rp , the set m + A = A + m is defined as {m + z :Q z ∈ A} with a analogous definitions for A − m and m − A. We denote the Cartesian product by and the column space and rank of a matrix C by col(C) and rk(C), respectively. The columns of C are denoted by Cj whereas CI , for some index set I, is the matrix containing the |I| columns of C corresponding to the indices in I only. We use R>0 for the positive and R≥0 for the non-negative real numbers. Let {D− , D+ , D0 } be a partition of {1, . . . , p} into three sets, some of which may be empty. It will be convenient to also describe this partition by a vector d ∈ {−1, 0, 1}p with dj = 1{j∈D+ } − 1{j∈D− } . For such d, we denote by Od = {z ∈ Rp : sgn(zj ) = dj for j = 1, . . . , p} = {z ∈ Rp : zj < 0 for j ∈ D− , zj > 0 for j ∈ D+ , zj = 0 for j ∈ D0 }. Note that m + β ∈ Od is short-hand notation + for mj < −βj for j ∈ D− , mj > −βj for j ∈ D+ and mj = −βj for j ∈ D0 . We write D− for D− ∪ D+ . Finally, the directional derivative of a function g : Rp → R at m in direction r ∈ Rp with krk = 1 is defined as g(m + hr) − g(m) ∂g(m) = lim . h&0 ∂r h 2 3 The Low-dimensional Case Throughout this section, we assume that X has full column rank p, implying that we are considering the low-dimensional setting where p ≤ n. For our arguments, we use a reparametrized version of the objective function. Define Vβ (u) = L(u + β) − L(β) = u0 X 0 Xu − 2u0 W + 2 p X λj [|uj + βj | − |βj |] , (3) j=1 where W = X 0 ε ∼ N (0, σ 2 X 0 X) and note that Vβ is minimized at û = β̂L − β. We are interested in the distribution of the estimation error û. To state the main theorem, we need the following lemma that characterizes a solution to the minimization problem. Lemma 1. Let m ∈ Rp . The following two statements are equivalent. (a) ∂Vβ (m) ∂r ≥ 0 ∀r with krk = 1 (b) ∂Vβ (m) ∂ej ≥ 0 and ∂Vβ (m) ∂(−ej ) ≥ 0 for j = 1, . . . , p. Proof. Only (b) ⇒ (a) needs to be proved. Let d ∈ {−1, 0, 1}p such that m + β ∈ Od and let {D− , D+ , D0 } be the corresponding partition of {1, . . . , p}. A straight-forward calculation shows that p X  ∂Vβ (m) = 2r0 X 0 Xm − 2r0 W + 2 λj −1{j∈D− } rj + 1{j∈D+ } rj + 1{j∈D0 } |rj | ∂r j=1 = p X   1{rj ≥0} (2X 0 Xm − 2W )j + 2λj (−1{j∈D− } + 1{j∈D+ ∪D0 } ) rj j=1   + 1{rj <0} −(2X 0 Xm − 2W )j + 2λj (1{j∈D− ∪D0 } − 1{j∈D+ } ) (−rj ) = p X p 1{rj ≥0} j=1 X ∂Vβ (m) ∂Vβ (m) (−rj ) ≥ 0. rj + 1{rj <0} ∂ej ∂(−ej ) j=1 This complete characterization of minima of Vβ now allows to state the following theorem on the distribution of the estimation error û = β̂L − β. Theorem 2. Let z ∈ Rp . Let d = sgn(z + β) ∈ {−1, 0, 1}p and let {D− , D+ , D0 } be the corresponding partition of {1, . . . , p}. Then P (ûj ≤ zj for j ∈ D− , ûj ≥ zj for j ∈ D+ , ûj = zj for j ∈ D0 ) Z = Z Z Z Z Z ··· ··· ··· sj ∈[−λj ,λj ] j∈D0 mj ≥zj j∈D+ mj ≤zj j∈D− φ(0,σ2 X 0 X) (X 0 Xmβ + sλ ) dmD− dmD+ dsD0 , where mβ and sλ ∈ Rp are given by (mβ )D+ = mD+ , (mβ )D0 = −βD0 and (sλ )D− = −λD− , sD+ = − − λD+ , (sλ )D0 = sD0 , respectively. ∂V (m) Proof. Since the function Vβ is convex, m ∈ Rp is a minimizer of Vβ if and only if β∂r ≥ 0 for all r ∈ R with krk = 1. We wish to find all minimizers m satisfying mj ≤ zj for j ∈ D− , mj ≥ zj for j ∈ D+ and mj = zj for j ∈ D0 . Note that this implies that m + β ∈ Od since z + β ∈ O by ∂Vβ (m) ∂Vβ (m) assumption. By Lemma 1 together with the fact that the condition ∂e ≥ 0 and ∂(−e ≥0 j j) 3 ∂V (m) β = 0 if Vβ is differentiable at m with respect to the j-th component, we get the reduces to ∂u j following necessary and sufficient conditions for such m to be a minimizer of Vβ .  0  for j ∈ D−  Wj = (X Xm)j − λj 0 (4) Wj = (X Xm)j + λj for j ∈ D+   0 0 (X Xm)j − λj ≤ Wj ≤ (X Xm)j + λj for j ∈ D0 Therefore, m satisfying m + β ∈ Od is a minimizer of Vβ if and only if W lies in the set {s ∈ Rp : sj = (X 0 Xm)j − λj for j ∈ D− , sj = (X 0 Xm)j + λj for j ∈ D+ , (X 0 Xm)j − λj ≤ sj ≤ (X 0 Xm)j + λj for j ∈ D0 }, which equals X 0 Xm + {sλ : (sλ )D− = −λD− , (sλ )D+ = λD+ , |sλ,j | ≤ λj for j ∈ D0 }. Since we are interested in all minimizers m of Vβ that satisfy mj ≤ zj for j ∈ D− , mj ≥ zj for j ∈ D+ and mj = zj for j ∈ D0 (that is, m − z ∈ Od ), we let Ad = {X 0 Xm : m − z ∈ Od } + {s ∈ Rp : sD− = −λD− , sD+ = λD+ , |sj | ≤ λj for j ∈ D0 }. As W follows a N (0, σ 2 X 0 X)-distribution, the sought-after probability is clearly given by Z φ(0,σ2 X 0 X) (u) du, Ad which is what was claimed. Results on the distribution of β̂L itself rather than the estimation error are of course a direct consequence of Theorem 2 and summarized in the following corollaries, the latter one giving the probability of the extreme event of the Lasso setting all components to zero. Corollary 3. Let z ∈ Rp and let d = sgn(z) with {D− , D+ , D0 } being the corresponding partition of {1, . . . , p}. P (β̂L,j ≤ zj for j ∈ D− , β̂L,j ≥ zj for j ∈ D+ , β̂L,j = 0 for j ∈ D0 ) Z = Z ··· Z Z ··· Z Z ··· φ(0,σ2 X 0 X) (X 0 Xmβ + sλ ) dmD− dmD+ dsD0 , sj ∈[−λj ,λj ] mj ≥zj −βj mj ≤zj −βj j∈D+ j∈D− j∈D0 where mβ and sλ ∈ Rp are given by (mβ )D+ = mD+ , (mβ )D0 = −β and (sλ )D− = −λD− , sD+ = − − λD+ , (sλ )D0 = sD0 , respectively. Corollary 4. Z λp Z λ1 ··· P (β̂L = 0) = −λp φ(X 0 Xβ,σ2 X 0 X) (s) ds −λ1 Remark 1. To illustrate the structure behind the proof of Theorem 2, we rewrite Corollary 3 as P (β̂ ∈ Bz ) = P (W ∈ Aβ (Bz )) with Bz = {b ∈ Rp : bj ≤ Szj for j ∈ D− , bj ≥Qzj for j ∈ D+ , bj = 0 for j ∈ D0 }, W ∼ p N (0, σ 2 X 0 X), and Aβ (Bz ) = b∈Bz X 0 X(b − β) + j=1 Bj (bj ) where ( {sgn(bj )λj } bj 6= 0 Bj (bj ) = [−λj , λj ] bj = 0. 4 The events {β̂ ∈ Bz } and {W ∈ Aβ (Bz )} are shown to be equivalent through Lemma 1. This equivalence holds due to the structure of the optimization problem defining β̂L and does not depend on the distribution of W = X 0 ε. In this sense, the distributional results do not hinge on the normality assumption of the errors and can easily be generalized to other error distributions. The relationship and shape of the sets Bz and Aβ (Bz ) are illustrated in Figure 1. Note that Aβ depends on λ whereas Bz does not. We exploit the structure of the optimization problem by characterizing the minimum through directional derivatives rather than using the Kuhn-Karush Tucker conditions as in the high-level approach of Zhou (2014). This has the advantage that our distributional results give the joint distribution of the estimator only and are not “augmented” by the subdifferential vector. Theorem 2 now puts us into a position to fully specify the distribution of the Lasso estimator. In case λj > 0 for all j = 1, . . . , p, one easily sees from the preceding corollary that this distribution is not absolutely continuous with respect to the p-dimensional Lebesgue-measure and thus no density exists. One can, however, represent the distribution through Lebesgue-densities after conditioning on which components of the estimator are negative, positive, and equal to zero – which we shall do in the sequel. Proposition 5. The distribution of û = β̂L − β, conditional on the event {β̂L ∈ Od }, can be represented by a kdk1 -dimensional Lebesgue-density given by f d (zD+ ) = 1{zβ + β ∈ Od } P (β̂L ∈ Od ) − Z Z ··· φ(0,σ2 X 0 X) (X 0 Xzβ + sλ ) dsD0 , sj ∈[−λj ,λj ] j∈D0 where zβ is defined by (zβ )D+ = zD+ and (zβ )D0 = −βD0 , and sλ is defined by (sλ )D− = −λD− , − − (sλ )D+ = λD+ , and (sλ )D0 = sD0 . Note that the constants P (β̂L ∈ Od ) can be calculated using Corollary 3. Proof. Observe that  d f (zD+ ) = − ∂ ∂zj  + j∈D−   + P ûj ≤ zj for j ∈ D− |β̂L ∈ Od , and note that by Theorem 2 for any z ∈ Rp we have with z + β ∈ Od we have   P ûj ≤ zj for j ∈ D− , ûj ≥ zj for j ∈ D+ |β̂L ∈ Od   1 P ûj ≤ zj for j ∈ D− , ûj ≥ zj for j ∈ D+ , β̂L,j = 0 for j ∈ D0 = P (β̂L ∈ Od ) Z Z Z Z Z Z 1 ··· ··· · · · φ(0,σ2 X 0 X) (X 0 Xmβ + sλ ) dmD− dmD+ dsD0 , = P (β̂L ∈ Od ) sj ∈[−λj ,λj ] j∈D0 mj ≤zj j∈D+ mj ≥zj j∈D− where mβ ∈ Rp is defined by (mβ )D+ = mD− ∪D+ , and (mβ )D0 = −βD0 and sλ ∈ Rp is defined by − + (sλ )D− = −λD− , (sλ )D+ = λD+ , and (sλ )D0 = sD0 . Differentiating with respect to zj : j ∈ D− and taking the absolute value gives the density, thus completing the proof. Besides the conditional densities, we can also specify the full cdf of û = β̂L − β which is done in the following theorem. Theorem 6. The cdf of û = β̂L − β is given by X F (z) = P (û1 ≤ z1 , . . . , ûp ≤ zp ) = d∈{−1,0,1}p 5 Z Z ··· mj ≤zj + j∈D − hd (mD+ ) dνkdk1 , − (a) z1 , z2 > 0 (b) z1 , z2 < 0 (c) z1 = 0 and z2 > 0 Figure 1: The sets Bz are displayed on the left-hand side, the corresponding sets Aβ (Bz ) are displayed on the right-hand side. Illustrated for p = 2 and various values of z, see Remark 1 for details. 6 where νk denotes k-dimensional Lebesgue-measure and where Z Z hd (mD+ ) = 1{mβ + β ∈ Od } ··· φ(0,σ2 X 0 X) (X 0 Xmβ + sλ ) dsD0 , − sj ∈[−λj ,λj ] j∈D0 with mβ ∈ Rp given by (mβ )D+ = mD− ∪D+ , and (mβ )D0 = −βD0 and sλ ∈ Rp given by (sλ )D− = − −λD− , (sλ )D+ = λD+ , and (sλ )D0 = sD0 . Proof. It is easily seen that P (û1 ≤ z1 , . . . , ûp ≤ zp ) = X P (β̂L ∈ Od ) d∈{−1,0,1}p Z Z ··· f d (mD+ ) dνkdk1 . − mj ≤zj + j∈D − Plugging in the formula for f d completes the proof. For illustration of Proposition 5 and Theorem 6, consider Figures 2 and 3 which display an example of the distribution of û = β̂L − β. One can see that the Lasso estimation error follows a shifted normal distribution conditional on the event ûj 6= −βj (β̂L,j 6= 0) for each j = 1, . . . , p with the shift depending on the signs of β̂L as is to be seen in Figure 2. Figure 3 displays the mass which lies on the set {z ∈ R2 : z1 = −β1 , z2 6= 0}, that is, the density functions h(0,1) and h(0,−1) on their corresponding domains. The mass on the set {z ∈ R2 : z1 6= 0, z2 = −β2 } looks qualitatively similar to Figure 3. Note that we also have point-mass at −β, as is pointed out by Corollary 4. Figure 2: The contour lines of the absolutely continuous part with respect to 2-dimensional 1 0.5 ), λ = (0.75, 0.75)0 and β = Lebesgue-measure of the distribution of β̂L − β for X 0 X = ( 0.5 1 0 (0, −0.25) . Note that the blue lines as well as the blue point also carry probability mass. 3.1 Shrinkage Areas Using the conditions for minimality from the proof of Theorem 2, we can establish a direct relationship between the LS and the Lasso estimator in the following sense. For any b ∈ Rp , there exists a set S(b) ⊆ Rp , such that the Lasso estimator assumes the value b if and only if the LS estimator lies in S(b). We refer to the set S(b) as shrinkage area since the Lasso estimator can be viewed as a procedure that shrinks the LS estimates from the set S(b) to the point b. Note that by shrinkage we mean that kbk1 ≤ kzk1 for each z ∈ S(b), but |bj | > |zj | could hold for certain components. The explicit form of S(b) is formalized in the following theorem. 7 0 0 1 0.5 ), λ = (0.75, 0.75)0 Figure 3: The functions h(0,−1) (in blue) and h(0,1) (in red) for X 0 X = ( 0.5 1 0 and β = (0, −0.25) , corresponding to the absolutely continuous part. Theorem 7. For each b ∈ Rp there exists a set S(b) ⊆ Rp , such that β̂L = b ⇐⇒ β̂LS ∈ S(b). Moreover, for b ∈ Od , the set S(b) is given by + S(b) = {z ∈ Rp : (X 0 Xz)j = (X 0 Xb)j + sgn(bj )λj for j ∈ D− , |(X 0 X(z − b))j | ≤ λj for j ∈ D0 } Clearly, the sets S(b) are disjoint for different b’s. Proof. Note that we have β̂LS − β = (X 0 X)−1 X 0 ε = (X 0 X)−1 W . With the minimality conditions in (4) from the proof of Theorem 2 together with the fact that W = X 0 X(β̂LS − β) and some rearranging, we get that m = β̂L − β minimizes Vβ if and only if β̂LS satisfies  0 0   (X X β̂LS )j = (X X β̂L )j − λj for j ∈ D− (X 0 X β̂LS )j = (X 0 X β̂L )j + λj for j ∈ D+   |(X 0 X(β̂LS − β̂L ))j | ≤ λj for j ∈ D0 , or, β̂LS ∈ S(b) for β̂L = b, as required. Remark 2. Clearly, if b ∈ Rp satisfies bj 6= 0 for all j = 1, . . . , p, then S(b) is the singleton S(b) = {b − (X 0 X)−1 λ̃}, where λ̃j = − sgn(bj )λj for j = 1, . . . , p. This implies that in case β̂L,j 6= 0 for all j, the Lasso estimator is given by β̂L = β̂LS − (X 0 X)−1 λ̃. Note that aside from b, S(b) depends on X and λ only. Given Theorem 7, we can identify areas in which components of the LS estimator are shrunk to zero by the Lasso. For p = 2, this leads to the image displayed in Figure 4. Clearly, the shrinkage areas are related to the polyhedral selection areas of Lee et al. (2016) but yield a different level of information. Our results can identify the regions that lead to a given value b of β̂L rather than to a general model (with given signs of the non-zero components of the estimator). 8 Figure 4: The shrinkage areas from Theorem 7 for p = 2. The blue parallelogram equals the set S(0). The dark gray area should consists of lines parallel to the adjacent edge of the parallelogram  where each line equals a set S b02 for b2 6= 0. Analogously, the light gray area consists of lines parallel to the adjacent edge of the parallelogram and each of those lines equals a set S b01 for  b1 6= 0. The yellow areas contain all singletons S bb12 with b1 , b2 6= 0 as described in Remark 2. 1 0.5 ) and λ = (0.75, 0.75)0 . In this example, X 0 X = ( 0.5 1 4 High-Dimensional Case We now turn to the main case of this this article, the high-dimensional setting where p > n. We make no assumptions on the regressor matrix X in this section. Using similar arguments as in the case p ≤ n, we can again start by characterizing the distribution of the Lasso, albeit in a somewhat less explicit form. Note that we have rk(X) < p and that the true parameter is not identified without further assumptions. We denote by B0 the set of all β ∈ Rp that yield the model given in (1), that is, B0 = {β ∈ Rp : Xβ = E(y) = µ}. Furthermore, it is important to note that the Lasso solution need not be unique anymore. We give necessary and sufficient conditions for uniqueness later on in Section 4.3. Note that for any fixed β ∈ B0 , the function Vβ defined in (3) is minimized at β̂L − β, where β̂L may be any solution of (2). All findings in this section also hold when p ≤ n, but more explicit results for this case are found in Section 3. We start with a high-level result on the distribution. Theorem 8. For any set M ⊆ Rp and any β ∈ B0 , we have P (arg min Vβ (u) ∩ M 6= ∅) = P (W ∈ Āβ (M )), u∈Rp S Qp where W ∼ N (0, σ 2 X 0 X) and Āβ (M ) = m∈M Āβ (m) with Āβ (m) = X 0 Xm + j=1 Bβ,j (mj ) and ( {sgn(mj + βj )λj } mj + βj 6= 0 Bβ,j (mj ) = [−λj , λj ] mj + βj = 0. Proof. Using the same necessary and sufficient conditions for m ∈ Rp to be a minimizer of Vβ as in (4), we see that m ∈ arg min Vβ (u) ⇐⇒ W ∈ Aβ (m). u∈Rp While the distribution of β̂L −β depends on the choice of β ∈ B0 , the distribution of β̂L does not, as it is determined by y ∼ N (µ, σ 2 In ). This is formalized in the following corollary. As mentioned 9 before, β̂L need not be unique. Also remember that β̂L itself minimizes the function L(β) defined in (2). Corollary 9. For any set B ⊆ Rp and any β ∈ B0 , we have P (arg min L(β) ∩ B 6= φ) = P (W ∈ A0 (B)), β∈Rp where W ∼ N (0, σ 2 X 0 X) and A0 (B) = S b∈B ( Bj (bj ) = A0 (b) with A0 (b) = X 0 X(b − β) + {sgn(bj )λj } [−λj , λj ] Qp j=1 Bj (bj ) and bj = 6 0 bj = 0. In particular, the distribution of the estimator β̂L does not depend on the choice of β ∈ B0 . Proof. First note that arg minu Vβ (u) = arg minβ L(β) − β. We thus have b ∈ arg min L(β) ⇐⇒ b − β ∈ arg min Vβ (u). u β Using Theorem 8, we get for any β ∈ B0 b − β ∈ arg min Vβ (u) ⇐⇒ W ∈ X 0 X(b − β) + u p Y Bj (bj ) = A0 (b). (5) j=1 Finally, note that A0 depends on β only through X 0 Xβ which assumes the same value for all β ∈ B0 . As the random variable W = X 0 ε has singular covariance matrix, some care needs to be taken when computing the probability from Corollary 9 through the appropriate integral of the corresponding density function. This is specified in Corollary 10. Corollary 10. Let the columns of U form a basis of col(X 0 ). The probability that a Lasso solution lies in the set B ∈ Rp can be written as Z P (arg min L(β) ∩ B 6= φ) = 1{col(X 0 ) ∩ A0 (B) 6= ∅} φ(0,σ2 U 0 X 0 XU ) (s)ds β∈Rp U 0 A0 (B) Proof. Note that U 0 W ∼ N (0, σ 2 U 0 X 0 XU ) and that U 0 X 0 XU is invertible. Let N be a matrix whose columns form a basis of col(X 0 )⊥ , then N 0 W has covariance matrix σ 2 N 0 X 0 XN = 0 and N 0 W = 0 almost surely. We therefore have W ∈ A0 (B) ⇐⇒ (U, N )0 W ∈ (U, N )0 A0 (B) ⇐⇒ U 0 W ∈ U 0 A0 (B) and 0 ∈ N 0 A0 (B) ⇐⇒ U 0 W ∈ U 0 A0 (B) and col(X 0 ) ∩ A0 (B) 6= ∅, which proves the claim. 4.1 Shrinkage Areas and Model Selection Properties For the low-dimensional case, Theorem 7 gives shrinkage areas of the Lasso with respect to β̂LS . In the high-dimensional case, similar results are derived in Theorem 11 whose proof is based on Corollary 9. These shrinkage areas are now given with respect to X 0 y as this quantity is always uniquely defined in the high-dimensional case. Theorem 11. For each b ∈ Rp there exists a set S̄(b) ⊆ Rp such that b ∈ arg min L(β) ⇐⇒ X 0 y ∈ S̄(b), β∈Rp Moreover, S̄(b) is given by S̄(b) = X 0 Xb + p Y Bj (bj ). j=1 with ( {sgn(bj )λj } Bj (bj ) = [−λj , λj ] 10 bj 6= 0 bj = 0. Proof. As X 0 y = X 0 Xβ + X 0 ε = X 0 Xβ + W , this follows immediately from (5). Remark 3. Inspecting the sets S̄(b) from Theorem 11 more closely, we see that they are in general not disjoint for different values of b ∈ Rp . This illustrates the fact that the Lasso solution need not be unique in high dimensions anymore. (This is of course in contrast to the low-dimensional case as can be seen in Theorem 7.) Indeed, we can have S̄(b) ∩ S̄(b0 ) 6= ∅ as long as b − b0 ∈ ker(X) and {sgn(bj ), sgn(b0j )} = 6 {−1, 1} for all j = 1, . . . , p. This also makes apparent that b and b0 may be Lasso solutions not corresponding to the same model which has been noted by Tibshirani (2013) for the case of λ1 = · · · = λp > 0. We get deeper into the issue of (non-)uniqueness in Section 4.3. Moreover, just as for the low-dimensional case, note that aside from b, S̄(b) depends on X and λ only. Theorem 11 also sheds some light on which models M ⊆ {1, . . . , p} may in fact be chosen by the Lasso estimator, where the model chosen by β̂L is given by {j : β̂L,j 6= 0}. We find that some models will in fact never be selected by the Lasso. 0 Let BM = {b ∈ Rp : bj 6= 0 if and only if j ∈ M}. Since X 0 y lies S in col(X ), any model 0 M ⊆ {1, . . . , p} that satisfies that col(X ) ∩ S̄(BM ) = ∅ with S̄(BM ) = b∈BM S̄(b) can be never be selected by the Lasso estimator. Looking at the definition of S̄(b) in Theorem 11 and noting that X 0 Xb ∈ col(X 0 ), we get col(X 0 ) ∩ S̄(BM ) = ∅ ⇐⇒ col(X 0 ) ∩ BM = ∅, where BM = p [ Y b∈BM ( sgn(bj )λj [−λj , λj ] j=1 ( p Y j∈M {−λj , λj } = j∈ /M [−λj , λj ] j=1 j∈M j∈ / M. We summarize this in the following corollary. Corollary 12. Let X ∈ Rn×p and λ ∈ Rp≥0 be given. There exist y ∈ Rn such that the corresponding Lasso solution selects model M ⊆ {1, . . . , p} if and only if col(X 0 ) ∩ BM 6= ∅, where ( BM = {−λj , λj } [−λj , λj ] j∈M j∈ / M. which satisfies BM̃ ⊆ BM for M ⊆ M̃. What do the sets BM look like? If M0 = ∅, B∅ is the p-dimensional λ-box, B{j} is the union of two opposite facets of the λ-box, for 1 < |M| < p, BM is the union of p − |M| dimensional faces of the λ-box, and B{1,...,p} simply contains the corners of the λ-box. For partial tuning with M0 6= ∅, B∅ is p − |M0 |-dimensional and we have BM ⊆ BM0 for all M ⊆ {1, . . . , p} as well as {0} ⊆ col(X 0 ) ∩ BM0 6= ∅, so that, not surprisingly, there always exist y such that the non-penalized components will be part of the model chosen by the Lasso solution. We illustrate the results above by the following simplistic yet instructive example. Example 1. Suppose X = (1, 2), so that n = 1, p = 2 and let λ1 = λ2 = λ̄ (uniform tuning). Note that col(X 0 ) ∩ B{1} = ∅ for all λ̄ > 0, so that by Corollary 12, β̂L,1 = 0 for any value of y, in fact independent of B0 and σ 2 ! This yields P (β̂L,1 = 0) = 1. 11 To say something about the remaining distribution of β̂L using Corollary 9, note that W = X 0 ε = ( 12 ) ε. We therefore get P (β̂L = 0) = P (W ∈ A0 (0)) with     λ̄,λ̄] 1 ) + [−λ̄,λ̄] , A0 (0) = −X 0 Xβ + [− = −(β + 2β ) ( 1 2 2 [−λ̄,λ̄] [−λ̄,λ̄] so that the event {W ∈ A0 (0)} is equivalent to the event that W lies in the set {(s − µ) ( 12 ) : s ∈ [−λ̄/2, λ̄/2]} with µ = Xβ = β1 + 2β2 , whose probability is given by   P (β̂L = 0) = Φ (λ̄/2 − µ)/σ − Φ (−λ̄/2 − µ)/σ . Next, for z < 0, we have P (β̂L,1 = 0, β̂L,2 ≤ z) = P (W ∈ [   [  λ̄,λ̄] A0 ( b02 ) ) = P (W ∈ b2 ( 24 ) + [− ) {−λ̄} b2 <z = P (W ∈ [ b2 <z (2b2 − λ̄/2)( 12 )) = P (ε ≤ 2z − λ̄/2) = Φ(2z − λ̄/2). b2 <z Similarly, we get that for z > 0 P (β̂L,1 = 0, β̂L,2 > z) = 1 − Φ(2z + λ1 /2). The distribution of β̂L is thus given by β̂L,1 = 0 and β̂L,2 following the distribution given by dF (z) = (Φ(λ1 /2) − Φ(−λ1 /2)) dδ0 (z) + 1{z<0} 2φ(2z − λ1 /2) dz + 1{z>0} 2φ(2z + λ1 /2) dz. It is interesting to note that the distribution of β̂L,2 is the same as the one of the Lasso estimator with the same penalization parameter in the smaller model yi = 2β2 + ε where the first regressor is taken out. Indeed, using the Lasso in the smaller model is equivalent to using the Lasso in the larger model in our example, as the procedure only considers models that do not contain the first regressor. This fact is, of course, only valid for the specific form of X and λ. However, the models which are considered by the Lasso estimator in the first place do not depend on β and ε in the sense that certain values of X and λ may immediately rule out certain models completely independently of y and is thus not to be considered a purely data-driven model selection procedure. The choice between the location model (when β̂L,1 = 0 and β̂L,2 6= 0) and the pure noise model (when β̂L,1 = β̂L,2 = 0) in our example does of course very much depend on β and ε. These considerations are also illustrated in Figure 5 which depicts in which areas the quantity X 0 y has to fall into in order for the Lasso estimator to choose a certain model. For clarification, note that the Lasso is always unique in this example. The considerations sparked by Example 1 suggest that in the high-dimensional setting, model selection by the Lasso estimator may, indeed, not be a purely data-driven procedure in the sense that there is a structural model or structural set M ⊆ {1, . . . , p} determined by X and λ only, satisfying β̂L,j = 0 for any j ∈ / M for all observations y ∈ Rn . In particular, the true parameter β ∈ B0 as well as the distribution of ε do not have any influence on this set. In other words, some models are considered by the model selection procedure, completely independently of the data vector y. Put yet differently again, this means that for a given regressor matrix X, one can restrict or choose the class of models considered by choice of λ. Given all the considerations above, one might ask whether such a structural model M always satisfies |M | ≤ n under certain conditions. Clearly, uniqueness would be a meaningful requirement in this context, as then all Lasso solutions will choose models of cardinality of at most n as has been shown in Tibshirani (2013)1 . If this was indeed the case, the Lasso estimator would be equivalent to a low-dimensional Lasso procedure restricted to this structural model M this could be used to employ results from low-dimensional models also for inference in high-dimensional settings. 1 Note that this fact alone does not imply that the structural set has cardinality of at most n since the active sets may certainly vary over y. 12 Figure 5: The shrinkage areas with respect to X 0 y from Theorem 11 for Example 1. Displayed in 0 0 red is span(X 0 ), the area on which the probability mass of X  y is concentrated. The set S̄ ( 0 ) is displayed in blue, while the yellow lines correspond to S̄ bb12 with b1 , b2 6= 0. The light gray area   is S̄ b02 with b2 6= 0, whereas the dark gray area equals S̄ b01 with b1 6= 0. Example 1 (continued). Here, M = {2} and the distribution of the Lasso estimator is equal to the distribution of the Lasso in the model y = 2β2 + ε. Using this property, one can construct a confidence set for β2 based on the Lasso using results from Pötscher & Schneider (2010). In Example 1 the Lasso solution is always unique (for any value of y) since the column span of X 0 does not intersect overlapping shrinkage areas. It is not difficult, however, to construct an example where the Lasso solution is not unique anymore. Example 2. Again, take the model from Example 1 with X = (1, 2). This time, choose λ = (1, 2)0 . It can easily be seen using Theorem 11 that for each y < −1,    0 y+1 β̂L = y+1 , β̂ = , and β̂L = ( y+1−2c ) for (y + 1)/2 < c < 0. L c 0 2 all are Lasso solutions for the same value of y. Similarly, for y > 1,    0 y−1 β̂L = y−1 , β̂ = , and β̂L = ( y+1−2c ) for 0 < c < (y + 1)/2. L c 0 2 all are Lasso solutions for the same value of y. (Note that β̂L = 0 for all y with |y| ≤ 1.) The corresponding shrinkage areas are illustrated in Figure 6. Example 2 shows an already known property of the Lasso from another perspective: The solution to the Lasso problem is, in general, not unique. Moreover, if the solution is not unique, then, by convexity of the problem, there exists an uncountable set of solutions2 . This example shows, moreover, that the set of y which yield non-unique Lasso solutions is not a null set, in fact, in this example it occurs with probability 2Φ(−1). Of course, this problem could be overcome by slightly altering the choice of the tuning parameters, even though, this would imply to make a choice of the class of models under consideration, as pointed out previously in this section. 2 This fact has been pointed out by Tibshirani (2013) in Lemma 1 for the case of uniform tuning. 13 Figure 6: The shrinkage areas with respect to X 0 y from Theorem 11 for Example 2. Displayed in 0 0 red is span(X 0 ), the area on which the probability mass of X  y is concentrated. The set S ( 0 ) is displayed in blue, while the yellow lines correspond to S bb12 with b1 , b2 6= 0. The light gray area   is S b02 with b2 6= 0, whereas the dark gray area equals S b01 with b1 6= 0. The red line passes through S ( 00 ) where the solution is unique but also through the line where the light gray, the dark gray and the yellow areas intersect. 4.2 Structural Sets Clearly, Example 2 shows that the structural set may also be equal to the entire set of explanatory variables. In fact, It is easy to see that for n = 1 and p = 2, the Lasso estimator will always have a structural set with cardinality n = 1 whenever we have uniqueness. The question is, of course, whether the same can be said in general. Before answering this question, we show how the structural set can fully be determined given X and λ by counting how many faces of the λ-box B∅ are intersected by col(X 0 ). Theorem 13. Let X ∈ Rn×p and λ ∈ Rp≥0 be given. Let M be the structural set of X and λ that contains all j ∈ {1, . . . , p} such that there exist y ∈ Rn so that the corresponding Lasso solution β̂L satisfies β̂L,j 6= 0, that is, the set of all regressors that are part of a Lasso solution for some observation y. This set is given by  M = M (X, λ) = j ∈ {1, . . . , p} : B{j} ∩ col(X 0 ) 6= ∅ . Proof. By Corollary 12, there exist y ∈ Rn such that the corresponding Lasso solution chooses model M if and only if BM ∩ col(X 0 ) 6= ∅. For any {j} ⊆ M, we have, by Corollary 12 also, BM ⊆ B{j} , so that B{j} ∩ col(X 0 ) 6= ∅ also. Remark 4. As indicated in Theorem 13 and as discussed above, the structural set M depends on X and λ only. Moreover, it can easily be seen that it depends on the tuning parameters λ only through the penalization weighting in the sense that whenever λ = λ̄ω for some λ̄ > 0 and ω ∈ Rp≥0 , M (X, λ) = M (X, ω) follows. This implies that, in particular, in the common case of uniform tuning with λ̄ = λ1 = · · · = λp , the structural set only depends on X! Coming back to the conjecture whether the structural set always satisfies |M | ≤ min{n, p} in case the solutions are unique, using Theorem 13, we can list the following simple example with n = 2 and p = 3 to show that this cannot be the case in general. However, note that Theorem 13 allows to compute the structural set and that whenever |M | ≤ n, the resulting Lasso estimator is, in fact, just equivalent to a low-dimensional procedure! 14 Figure 7: The intersection of col(X 0 ) (in gray and yellow) with the λ-cube (in orange). The upper left edge is contained in B{1,2} whereas the upper back edge is contained in B{2,3} . (Each B{i,j} contains four parallel edges.) To view this figure in terms of shrinkage areas, note that the areas corresponding to single-regressor models are displayed in gray while the shrinkage areas that correspond to two-regressor models are displayed in yellow. The intersection of the λ-cube with col(X 0 ) which which corresponds to the zero estimator is displayed in blue. Example 3. Let  X= 1 0 1 1  0 1 and λ = (1, 1, 1)0 . Then the structural set is clearly given by M = {1, 2, 3}, as (1, 1, 0)0 ∈ col(X 0 ) ∩ B{1,2} and (0, 1, 1)0 ∈ col(X 0 ) ∩ B{2,3} and BM ⊆ B{j} for any j ∈ M by Corollary 12, see Figure 7 for illustration. Yet the Lasso solutions for this X and λ are always unique which can be checked on the basis of Theorem 14 in the subsequent section. 4.3 A Necessary and Sufficient Condition for Uniqueness We now turn to some results revolving around uniqueness of the Lasso estimator which can be obtained with a similar geometric approach, that is, studying the intersection of the λ-cube with col(X 0 ). Note that by uniqueness we mean that for a given X ∈ Rn×p and a given λ ∈ Rp , the Lasso solutions are unique for all observations y ∈ Rn . Tibshirani (2013) showed that for a given regressor matrix X, Lasso solutions are unique for all observations y if the columns of X are in general position 3 which occurs when no kdimensional affine4 subspace for any k < min(n, p) contains more than k + 1 elements of the 3 Note that general position does not mean that any selection of n columns of X is linearly independent, as has sometimes been suggested in the literature, these two concepts are in fact unrelated. 4 In Tibshirani (2013), the word “affine” is missing which has caused some confusion in the literature. 15 the set {±X1 , . . . , ±Xp }, excluding antipodal pairs (see p. 1463 in Tibshirani, 2013). In fact, the solutions are then unique for all choices of the tuning parameter, provided that all components are tuned uniformly. As the condition is sufficient, one may ask whether it is also necessary. The answer to this question is, in fact, no, as can easily be seen from the example below. When can exist non-unique solutions? For a given X ∈ Rn×p and λ ∈ Rp this occurs if and only if there exist b, b̃ ∈ Rp with b 6= b̃ and S(b) ∩ S(b̃) ∩ col(X 0 ) 6= ∅. More concretely, by Theorem 11, and since the Lasso fit Xb is always unique5 , this means that X 0 Xb + v = X 0 X b̃ + v, where v ∈ col(X 0 )∩BM for some M ⊆ {1, . . . , p} and b̃Mc = bMc = 0. Moreover, for j ∈ M\M0 , we have sgn(bj ) = sgn(vj ) whenever bj 6= 0 as well as sgn(b̃j ) = sgn(vj ) whenever b̃j 6= 0. Note that we therefore have Xb = XM bM = XM b̃M = X b̃, implying that the columns of XM must be linearly dependent. So non-uniqueness occurs if and only if col(X 0 ) ∩ BM 6= ∅ for M ⊆ {1, . . . , p} with linearly dependent columns in XM . The following example now immediately shows that the columns of X being in general position is not necessary for uniqueness. Example. Let  X= 1 0 1 0 2 1  0 . 3 Clearly, the columns are not general position, however, all Lasso solutions are unique for any choice of the tuning parameter when the components are tuned uniformly. This is the case since col(X 0 ) ∩ BM = ∅ whenever {1, 2} ⊆ M or |M | > 2 which can easily be checked using the fact that v ∈ col(X 0 ) if and only if v 0 w1 = v 0 w2 = 0 for ker(X) = span{w1 , w2 }. We find that the following criterion is in fact sufficient as well as necessary for uniqueness of all Lasso solutions for a given X and λ. Theorem 14 (Uniqueness). Let X ∈ Rn×p and λ ∈ Rp≥0 . The Lasso solution is unique for all y ∈ Rn if and only if col(X 0 ) ∩ BM = ∅ for all M ⊆ {1, . . . , p} with |M| > rk(X). Proof. ( =⇒ ) Assume the condition is not satisfied. Then there exists v ∈ BM with |M| > rk(X) and v = X 0 z for some z ∈ Rn . We show that there is a y ∈ Rn such that the corresponding Lasso problem is not uniquely solvable. If Xj = 0 for some j ∈ M0 , we are done as the corresponding coefficient may be arbitrary. Note that Xj = 0 for j ∈ M \ M0 is not possible since that would imply vj = 0 as v ∈ col(X 0 ), but that contradicts v ∈ BM . We therefore assume that Xj 6= 0 for all j ∈ M. Since |M| > rk(X), there is a column of XM , say Xj (Xj 6= 0), that can be written as a linear combination of the other columns, in particular, X dXj = cl Xl l∈M\{j} where d = sgn(vj ) if λj 6= 0 and d = 1 if λj = 0. b ∈ Rp by  d   2c bl = sgn(vl )   0 Moreover, let c = maxl∈M\{j} |cl | > 0. Define l=j l ∈ M \ {j} l∈ / M. Then b is a Lasso solution for y = z + Xb since X 0 y = X 0 Xb + X 0 z = X 0 Xb + v ∈ S(b). 5 This has been shown in Lemma 1 in Tibshirani (2013) for uniform tuning and can easily be extended to nonuniform and partial tuning. 16 We now construct b̃ ∈ Rp with b̃ 6= b that is also a Lasso solution for the same y by ( cl sgn(vl ) + 2c l ∈ M \ {j} b̃l = 0 l = j or l ∈ / M. Clearly, b 6= b̃, sgn(bl ) = sgn(b̃l ) = sgn(vj ) for l ∈ M \ {j} and Xb = X l∈M bl Xl = X l∈M\{j} bl Xl + d Xj = 2c X (bl + l∈M\{j} cl )Xl = X b̃. 2c We therefore get X 0 y = X 0 Xb + v = X 0 X b̃ + v ∈ S(b̃) also, implying that both b and b̃ are Lasso solutions for the the given y. ( ⇐= ) We now prove the other direction. Assume that there exists y ∈ Rn such that non-unique Lasso solutions b 6= b̃ exist. As discussed above, this implies the existence of v ∈ BM ∩ col(X 0 ) for some M ⊆ {1, . . . , p} with XM bM = XM b̃M and bMc = b̃Mc = 0, entailing that the columns of XM are linearly dependent. If |M| > rk(X), we are done. If |M| ≤ rk(X), we do the following. Since we have rk(XM ) < |M| ≤ rk(X), we can pick z ∈ Rn such that z ∈ col(XM )⊥ \ col(XMc )⊥ . This is possible since col(XM )⊥ \ col(XMc )⊥ = ∅ ⇐⇒ col(XM )⊥ ⊆ col(XMc )⊥ ⇐⇒ col(XMc ) ⊆ col(XM ) ⇐⇒ col(XM ) = col(XM , XMc ) = col(X) ⇐⇒ rk(XM ) = rk(X), which is not the case. This z satisfies (X 0 z)M = (XM )0 z = 0 and (X 0 z)Mc = (XMc )0 z 6= 0, so that we can find c ∈ R such that ṽ = v + c X 0 z ∈ BM̃ ∩ col(X 0 ) with M ⊆ M̃ and |M| < |M̃|. As long as |M̃| ≤ rk(X), repeat the steps above with v = ṽ and M = M̃. Remark. Note that just as for Theorem 13, the result from the above theorem depends on λ only through the penalization weights, meaning that for any M ⊆ {1, . . . , p}, whenever λ = λ̄ω for some λ̄ > 0 and ω ∈ Rp≥0 , we have col(X 0 ) ∩ BM (λ) = ∅ if and only if col(X 0 ) ∩ BM (ω) (when indicating the dependence of BM on the tuning parameters). As mentioned in the preamble of Section 4, Theorem 14 does not require p > n, so that it also covers the low-dimensional case. Clearly, the condition for uniqueness is trivially satisfied if rk(X) = p. 5 Conclusion We give explicit formulae regarding the distribution of the Lasso estimator in finite-samples assuming Gaussian errors. In the low-dimensional case, we consider the cdf as well as the density functions conditional on “active sets” of the estimator. Our results exploit the structure of the underlying optimization problem of the Lasso estimator and do not hinge on the normality assumption of the error term. We also explicitly characterize the correspondence between the Lasso and the LS estimator: It is shown that the Lasso estimator essentially creates shrinkage areas around the axes inside which the probability mass of the LS estimator is “compressed” into lowerdimensional densities that can be specified conditional on the active set of the estimator. As a result, the distribution looks like a pieced-together combination of Gaussian-like densities with each active set having its own distributional piece whose dimension depends on the number of nonzero components in that it is given by the number of nonzero components, resulting also in point mass at the origin and mass being distributed along the axes. The form of the distribution is even more intricate in the high-dimensional case in which the estimator may not be unique anymore. We quantify the relationship between a Lasso solution 17 and the quantity X 0 y (rather than the LS estimator as in the low-dimensional case). We gain valuable insights into the behavior of the estimator by illustrating that some models may never be selected by the estimator. In fact, a structural set based on the regressor matrix and penalization weights only can be computed that contains all covariates that are part of a Lasso solution for some response vector y. In case this structural set has cardinality less than or equal to n, the Lasso is equivalent to a low-dimensional procedure and results from the p ≤ n-framework can be used for inference. It remains to be seen whether on can quantify that this is in some sense a generic case. Finally, the previous insights allow us to close a gap in the literature by providing a condition for uniqueness of the Lasso estimator that is both necessary and sufficient. Acknowledgements The authors gratefully acknowledge support from the Deutsche Forschungsgemeinschaft (DFG) through grant FOR 916 and thank Thomas Hack and Nikos Dafnis for very insightful discussions on the geometric aspects of this paper. References Ewald, K. & Schneider, U. (2015). Confidence sets based on the Lasso. Tech. Rep. 1507.05315, arXiv. Jagannath, R. & Upadhye, N. S. (2016). The Lasso estimator: Distributional properties. Tech. Rep. 1605:03280, arXiv. Knight, K. & Fu, W. (2000). Asymptotics of Lasso-type estimators. Annals of Statistics 28, 1356–1378. Lee, J. D., Sun, D. L., Sun, Y. & Taylor, J. E. (2016). Exact post-selection inference with an application to the Lasso. Annals of Statistics 44, 907–927. Pötscher, B. M. & Leeb, H. (2009). On the distribution of penalized maximum likelihood estimators: The LASSO, SCAD, and thresholding. Journal of Multivariate Analysis 100, 2065– 2082. Pötscher, B. M. & Schneider, U. (2010). Confidence sets based on penalized maximum likelihood estimators in Gaussian regression. Electronic Journal of Statistics 4, 334–360. Tibshirani, R. (1996). Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society Series B 58, 267–288. Tibshirani, R. J. (2013). The Lasso problem and uniqueness. Electronic Journal of Statistics 7, 1935–1490. Zhou, Q. (2014). Monte carlo simulation for lasso-type problems by estimator augmentation. Journal of the American Statistical Association 109, 1495–1516. 18
10math.ST
arXiv:1704.07114v3 [cs.IT] 20 Jun 2017 Regular Decomposition: an information and graph theoretic approach to stochastic block models∗ Hannu Reittu†, Fülöp Bazsó‡, Ilkka Norros§ Abstract A method for compression of large graphs and matrices to a block structure is proposed. Szemerédi’s regularity lemma is used as a generic motivation of the significance of stochastic block models. Another ingredient of the method is Rissanen’s minimum description length principle (MDL). We propose practical algorithms and provide theoretical results on the accuracy and consistency of the method. Keywords: Szemerédi’s Regularity Lemma, Minimum Description Length Principle, stochastic block model, big data Contents 1 Introduction 2 2 Basics and definitions 2.1 Szemerédi’s Regularity Lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Stochastic block models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 The Minimum Description Length (MDL) principle . . . . . . . . . . . . . . . . 3 3 5 7 3 The 3.1 3.2 3.3 family of stochastic block models in the MDL Two-part MDL for simple graphs . . . . . . . . . . . Two-part MDL for matrices . . . . . . . . . . . . . . Refined MDL and asymptotic model complexity . . . 4 The Regular Decomposition approach to stochastic block models 4.1 Block model codes . . . . . . . . . . . . . . . . . . 4.2 Algorithms for description length minimization . . 4.3 Accuracy of block structure identification by MDL 4.4 ǫ-regularity vs. stochastic block models . . . . . . . 5 Proof of Theorem 4.13 . . . . framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 10 11 . . . . 13 13 15 20 21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 ∗ This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible. † VTT Technical Research Centre of Finland Ltd, P.O. Box 1000, 02044 VTT. Email [email protected] ‡ Department of Theory, Institute for Particle and Nuclear Physics, Wigner Research Centre for Physics, Hungarian Academy of Sciences, P.O. Box 49, H-1525 Budapest, Hungary. Email [email protected]. § VTT Technical Research Centre of Finland Ltd, P.O. Box 1000, 02044 VTT. Email [email protected] 1 A Chernoff bounds and other information-theoretic preliminaries 1 30 Introduction Szemerédi’s Regularity Lemma (SRL) [24] is a fundamental result in graph theory. Roughly speaking, SRL states that any large enough graph can be approximated arbitrarily well by nearly regular, pseudo-random bipartite graphs, induced by a partition of the node set into a bounded number of equal-sized sets. For many graph problems it suffices to study the problem on a corresponding random structure, resulting in a much easier problem (for a review, see, e.g., [10]). SRL is fundamental also in theoretical computer science, for instance, in showing the existence of polynomial time approximations for solving dense graph problems, and in characterizing the class of so-called testable graph properties [2]. Despite the impressive theoretical applications of SRL, it has had only few applications to ’real-life’ problems. The main reason might be that SRL has extremely bad worst cases in the sense that the lower bound of graph sizes, for which the partition claim holds with reasonable accuracy and without a single exception, is enormous. Thus, a real-world application of SRL in literal sense is impossible. However, this drawback does not mean that regular partitions could not appear in much smaller scales relevant to applications. On the contrary, one could conjecture that regular partitions or structures be commonplace and worth of revealing. The goal of our work is on such realistic yet preferably large networks that nowadays appear in almost all imaginable application areas. The regular structure granted by SRL is then replaced by a probabilistic model, substituting the regular bipartite components with truly random bipartite graphs. This model class is well known as stochastic block models [9], and it has recently gained much attention in research and popularity in practical applications like community detection [16, 7, 11]. However, the fundamental nature of SRL suggests the (heuristic) conjecture that stochastic block models in fact present a very generic form of the separation of structure and randomness in large real-world systems. These models have good algorithmic properties in maximum likelihood fitting, and one can use powerful tools like expectation maximization, simulated annealing and Monte Carlo Markov Chain algorithms. There are also some examples of graph decomposition applications that have been explicitly inspired by SRL. The practical contexts are varied: brain cortex analysis [12], image processing [23], peer-to-peer network[15], analysing Functional Magnetic Resonance (fMRI) data to depict functional connectivity of the brain [14], a matrix of multiple time series [18] . In the last-mentioned work, the method was generalized from graphs to arbitrary positive matrices using a Poissonian construction as an intermediary step. Interestingly, the authors of the recent work [21] define a ’practical’ variant of SRL by relaxing algorithmic SRL in a certain way to make it more usable in machine-learning tasks, see also [17]. Bolla [3] has developed a spectral approach for finding regular structures of graphs and matrices. Our emphasis is more information-theoretical by nature and continues the works [12, 15, 18]. It would be very interesting to compare the methods of [21, 3] and those of this paper in depth. The third main ingredient in this paper is Rissanen’s Minimum Description 2 Length (MDL) principle (see [6]), according to which the quality of a model should be measured by the length of the bit-string that it yields for unique encoding of the data. In our case, the data has the form of a graph or matrix, and we present the stochastic block models as a modeling space in the sense of the MDL theory. Within this modeling space, the model corresponding to minimum code length coding presents the optimally regular decomposition (partition) of the data. Therefore we call this Szemerédi-motivated and technically MDLbased approach Regular Decomposition. By information theory, the optimal coding reveals as much redundancy in the data as is possible from the given modeling point of view. The regular structure has a high degree of redundancy: a regular pair is an almost structureless subgraph where almost all nodes have similar and uniform connectivity patterns. By definition, the MDL principle should be able to discover regular structures. Note also that this principle presents a case of ’Occam’s Razor’, a general rule of reasoning that has proved fruitful in all areas of science. In non-hierarchic clustering tasks, it has been a major challenge to select the ’right’ size of a partition (k). Intuitively, the optimal choice of k will strike a balance between the simplest partition of the data using a single cluster and the maximal partition assigning each data point to its own cluster, and selecting something in between. A popular device has been the Akaike information criterion (AIC), which was applied also in [12]. The AIC simply adds the ’number of model parameters’ to the maximal log-likelihood and chooses the model that minimizes the sum. Our MDL-based approach solves the corresponding model selection task in a better founded way. The contributions of this paper are the following: (i) the linkage of SRL, stochastic block models and the MDL principle, (ii) the unified handling of graphs and matrices, (iii) effective practical algorithms for revealing regular structures in data, and (iv) Theorem 4.13 that characterizes how accurately the MDL principle identifies a stochastic block model. The paper is structured as follows. Section 2 presents the definitions of the central notions: SRL, stochastic block models and MDL. The last topic is expanded in Section 3. Section 4 presents our main technical results, in particular the algorithms and Theorem 4.13. The proof of Theorem 4.13 is given in Section 5. It is structured into several propositions and makes strong use of information-theoretic tools presented in Appendix A. 2 2.1 Basics and definitions Szemerédi’s Regularity Lemma Consider simple graphs G(V, E), where V is the set of nodes (vertices) and E is the set of links (edges). The link density of a non-empty node set X ⊆ V is defined as d(X) = e(X) , |X| 2 where e(X) = {{v, w} ∈ E : v, w ∈ X} , 3 and |·| denotes the cardinality of a set. Similarly, the link density between two disjoint non-empty node sets X, Y ⊆ V is defined as d(X, Y ) := e(X, Y ) , |X| |Y | where e(X, Y ) = {{v, w} ∈ E : v ∈ X, w ∈ Y } . Definition 2.1 Let ǫ > 0. A pair of disjoint sets A, B ⊆ V is called ǫ-regular, if for every X ⊆ A and Y ⊆ B, such that |X| > ǫ |A| and |Y | > ǫ |B| we have |d(X, Y ) − d(A, B)| < ǫ. A partition ξ = {V0 , V1 , V2 , · · · , Vk } of V into k + 1 sets, where all except V0 have equal cardinalities, is called ǫ-regular, iff all except at most ǫk 2 pairs are ǫ-regular and |V0 | < ǫ|V |. Theorem 2.2 (Szemerédi’s Regularity Lemma, [24]) For every ǫ > 0 and for any positive integer m, there are positive integers N (ǫ, m) and M (ǫ, m), such that for any graph G(E, V ) with |V | ≥ N (ǫ, m) there is an ǫ-regular partition of V into k + 1 classes with m ≤ k ≤ M (ǫ, m). SRL states, roughly speaking, that nodes of any large enough graph can be partitioned into a bounded number, k, of equal-sized ’clusters’ and into one small set in such a way that most pairs of clusters look like random bipartite graphs, whose link probability equals the link density between the pair. The claim of SRL is significant for sufficiently dense graphs, i.e., when the link density is higher than ǫ. However, the result can be modified to apply to sparse graphs by multiplying ǫ at the right-hand side of the regularity definition by the link density of the entire graph [22]. The amazing fact in SRL is that the regularity claim holds for all graphs starting from a lower bound for size that depends only on ǫ. However, it is also well known that this dependence on ǫ is of extremely bad kind: the known lower bound for the graph size N (ǫ, m) behaves like a tower of powers of 2: 2 .. 2 2. , where the height of the tower is upper-bounded by 1/ǫ5 . Such a number is too big to be considered in any applications. Thus, all real-world networks fall into a ’gray area’ with respect to SRL. The magnitude of N (ǫ, m) is a problem for using algorithmic versions of the SRL, like the one introduced by Alon et al, [1]. Although its time complexity is only polynomial O(n2.376··· ), corresponding to the time for multiplying two n×n binary matrices, it requires this enormous size (n ≥ N (ǫ, m)) of graph to be able to find a regular partition. A considerable improvement was found in the recent work [5], where the running time is only linear in the graph size. Perhaps even more importantly, this randomized algorithm works in a more realistic fashion: for any graph, it either finds an ǫ-regular partition or concludes that such a partition does not exists. Thus, it does not need to work in the safe region of graph sizes specified in SRL. Another algorithm with the same feature was suggested by Tao [25]. In principle, such algorithms could possibly be applicable for real-world graphs, although some extra-big numbers are hidden in some of the constants of the algorithm. 4 2.2 Stochastic block models The notion of an ǫ-regular partition is purely combinatorial. The stochastic model closest to this notion is the following. Definition 2.3 Let V be a finite set and ξ = {A1 , . . . , Ak } a partition of V . A stochastic block model is a random graph G = (V, E) with the following structure: • There is a symmetric k × k matrix D = (dij )ki,j=1 of real numbers dij ∈ [0, 1] satisfying the irreducibility condition that no two rows are equal, i.e., for all i, j, i < j, there is qij ∈ {1, . . . , k} such that diqij 6= djqij ; (1) • For every pair {v, w} of distinct nodes of V such that v ∈ Ai , w ∈ Aj , let evw = ewv be a Bernoulli random variable with parameter dij , assuming that all evw ’s are independent. The edges of G are E = {{v, w} : v, w ∈ V, v 6= w, evw = 1} . Note that the case of the trivial partition ξ = {V } yields the classical random graph with edge probability d11 . A graph sequence Gn = (Vn , En ) presenting copies of the same stochastic block model in different sizes can, for definiteness, be constructed as follows. Pk Construction 2.4 Let γ1 , . . . , γk be positive real numbers such that i=1 γi = 1. Divide the interval (0, 1] into k segments # k−1 X γi , 1 , I1 = (0, γ1 ], I2 = (γ1 , γ1 + γ2 ], . . . , Ik = i=1 and denote Γ = {I1 , . . . , Ik }. For n = 1, 2, . . ., let the vertices of Gn be   i : i ∈ {1, . . . , n} . Vn = n For each n, let ξn be the partition of Vn into the blocks (n) Ai = Ii ∩ Vn , i = 1, . . . , k. For small n, we may obtain several empty copies of the empty set numbered as blocks. However, from some n0 on, all blocks are non-empty and ξn = n o (n) (n) A1 , . . . , Ak is a genuine partition of Vn . We can then generate stochastic block models based on (Vn , ξn , D) according to Definition 2.3. Remark 2.5 A slightly different kind of stochastic block model can be defined (n) by drawing first the sizes of blocks Ai as independent Poisson(γi n) random variables and proceeding then with the matrix D as before. The additional level of randomness, regarding the block sizes, is however of no interest in the present paper. Next, we define the notion of a Poissonian block model in complete analogy with Definition 2.3. 5 Definition 2.6 Let V be a finite set of vertices, n = |V |, and let ξ = {A1 , . . . , Ak } be a partition of V . The symmetric Poissonian block model is a symmetric random n × n matrix E with the following structure: • There is a symmetric k × k matrix Λ = (λij )ki,j=1 of non-negative real numbers satisfying the irreducibility condition that no two rows are equal, i.e., for all i, j, i < j, there is qij ∈ {1, . . . , k} such that λiqij 6= λjqij ; (2) • For every unordered pair {v, w} of distinct nodes of V such that v ∈ Ai , w ∈ Aj , let evw = ewv be a Poisson random variable with parameter λij , assuming that all evw ’s are independent. The matrix elements of E are evw for v 6= w, and evv = 0 for the diagonal elements. P P Thanks to the independence assumption, the sums u∈A v∈B euv are Poisson distributed for any A, B ∈ ξ. Remark 2.7 The rest of the technical contents of this paper focus on the simple binary and Poissonian models of Definitions 2.3 and 2.6. However, the following extensions are straightforward: • bipartite graphs: this is just a subset of simple graphs; • m × n matrices with independent Poissonian elements: a matrix can be seen as consisting of edge weights of a bipartite graph, where the parts are the index sets of the rows and columns of the matrix, respectively; • directed graphs: a directed graph can be presented as a bipartite graph consisting of two parts of equal size, presenting the input and output ports of each node. The following construction, inspired by our conditionally Poissonian graph model [13], is the key to extend the MDL methodology for data that has the most common form of a large non-negative matrix. Construction 2.8 Let C = (cij ) be a non-negative m × n matrix. Let N be a (rather large) integer and denote J = {1, . . . , N }. Let (1) (2) (1) V = J1 ∪ · · · ∪ J m , W = J1 ∪ · · · ∪ Jn(2) , (ι) Ji n= {(ι, o i)} × J. Define a bipartite Poissonian block model PN (C) = (V ∪ (·) (·) , C) with blocks J· and mean matrix C. W, J· Although we have not studied this at the technical level, it is natural to expect that, with large N , a partition of PN (C) with minimum description (·) length would with high probability keep the blocks J· unbroken. Because the regular decomposition algorithm for Poissonian block models operates only on means over blocks (see subsection 4.2), Construction 2.8 is a strong heuristic argument that this algorithm applies as such to regular decomposition of nonnegative matrices. 6 2.3 The Minimum Description Length (MDL) principle The Minimum Description Length (MDL) Principle was introduced by Jorma Rissanen, inspired by Kolmogorov’s complexity theory, and an extensive presentation can be found in Grünwald’s monography [6], see also [20]. The basic idea is the following: a set D of data is optimally explained by a model M, when the combined description of the (i) model and (ii) the data as interpreted in this model is as concise as possible. By description we mean here a code that specifies an object uniquely. The principle is best illustrated by our actual case, simple graphs. A graph G = (V, E) with |V | = n can always be encoded as a binary string of length n 2 = n(n − 1)/2, where each binary variable corresponds to a node pair and a value 1 (resp. 0) indicates an edge (resp. absense of an edge). Thus, the MDL of G is always at most n2 . However, G may have a structure whose disclosure would allow a much shorter description. Our heuristic postulate is that in the case of graphs and similar objects a good a priori class of models should be inferred from SRL, which points to stochastic block models. Definition 2.9 Denote by Mn/k the set of irreducible stochastic block models (V, ξ, D) with • |V | = n, • |ξ| = k, and, denoting ξ = {V1 , . . . , Vk }, • for i, j ∈ {1, . . . , k}, dij = hij , hij ∈ N, |Vi ||Vj | dii = hii , |Vi | 2 hii ∈ N. The condition in the last bullet entails that each modeling space Mn/k is finite. Remark 2.10 Without the irreducibility condition (1), there would not be a bijection between stochastic block models and their parameterizations. The models in Mn/k are parameterized by Θk = (ξ, D). A good model for a graph G is the one that gives maximal probability for G and is called the maximum likelihood model. We denote the parameter of this model Θ̂k (G) := arg max (P (G | Θk )), (3) Θk ∈Mn/k where P (G | Θk ) denotes the probability that the probabilistic model specified by Θk produces G. One part of likelihood optimization is trivial: when a partition ξ is selected for a given graph G, the optimal link probabilities are the empirical link densities: dij = e(Vi , Vj ) , i 6= j, |Vi ||Vj | dii = e(Vi ) . |Vi | (4) 2 Thus, the nontrivial part is to find the optimal partition for the given graph. This is the focus of the next sections. 7 3 3.1 The family of stochastic block models in the MDL framework Two-part MDL for simple graphs Let us denote the set of all simple graphs with n nodes as Ωn = {G : G = (V, E) is a graph, |V | = n} . A prefix (binary) coding of a finite set Ω is an injective mapping C : Ω → ∪s≥1 {0, 1}s (5) such that no code is a prefix of another code. Recall the following proposition from information theory (see, e.g., [4]): Theorem 3.1 (Kraft’s Inequality) For an m-element alphabet there exists a binary prefix with code lengths l1 , l2 , · · · , lm iff the code lengths P coding−lscheme i ≤ 1. 2 satisfy: i=1,··· ,m An important application of Theorem 3.1 is the following: if letters are drawn from an alphabet with probabilities p1 , p2 , · · · , pm , then there exists a prefix coding with code lengths ⌈− log p1 ⌉, · · · , ⌈− log pm ⌉, and such a coding scheme is optimal in the sense that it minimizes the expected code length (in this section, the logarithms are in base 2). In particular, any probability distribution P on the graph space Ωn indicates that there exists a prefix coding that assigns codes to elements of G ∈ Ωn with lengths equal to ⌈− log P ({G})⌉. The code length l(·) is the number of binary digits in the code of the corresponding graph. In case of a large set Ω, most such codes are long and as a result the ceiling function can be omitted, a case we assume in sequel. A good model results in good compression, meaning that a graph can be described by much less bits than there are elements in the adjacency matrix. An incompressible case corresponds to the uniform distribution on Ωn and results in code length − log (1/ | Ω |) = n2 , equivalent to writing down all elements of the adjacency matrix. For every graph G from Ωn and model P we can associate an encoding with code length distribution − log P (· | Θ̂k (G)). However, this is not all, since in order to be able to decode we must know what particular probabilistic model P is used. This means that also Θ̂k (G) must be prefix encoded, with some code-length L(Θ̂k (G)). We end up with the following description length: l(G) = ⌈− log P (G | Θ̂k (G))⌉ + L(Θ̂k (G)). (6) Eq. (6) presents the so-called two-part MDL, [6]. In an asymptotic regime with n → ∞, we get an analytic expression of the refined MDL. A simple way of estimating L(Θ̂k (G)) is just to map injectively every model in Mn/k to an integer and then encode integers with l∗ (| Mn/k (G) |) as an upper bound of the code-length. Here l∗ (m) = max(0, log (m)) + max(0, log log(m)) + · · · , m ∈ N, (7) gives, as shown by Rissanen, the shortest length prefix coding for integers (see [6, 19]). The size of the graph must also be encoded with l∗ (n) bits (it is assumed that there is a way of defining an upper bound of the models with given n). In this point, it is necessary that the modeling space is finite. This results in 8 Proposition 3.2 For any graph G ∈ Ωn , there exists a prefix coding with codelength l(G) = ⌈− log P (G | Θ̂k (G))⌉ + m ∗ ≤ mk := l (n) + l ∗ S2(n, k)  !  (k2)+k n−k+2 +1 + 1 + 1, 2 where S2(n, k) is the Stirling number of the second kind. Proof The expression in (6) corresponds to a concatenation of two binary codes. The L-part is the length of a code for maximum likelihood parameters (in the case of a non-unique maximum, we take, say, the one with smallest number in the enumeration of all such models). The corresponding code is called the parametric code. The parametric code uniquely encodes the maximumlikelihood model. To create such an encoding, we just enumerate all possible models, given in Definition 2.9, and use the integer to fix the model. The length of a prefix code corresponding to an integer is the l∗ -function computed for that integer, and we add 1 to handle the ceiling function. To obtain an upper bound for the parametric code length mk , we find an upper bound for the number of models in the modeling space. The number of models is upper-bounded by the product of the integers, each presenting the number of partitions of an n-element set into k non-empty sets (blocks), which equals S2(n, k). We can view the blocks of a partition as the nodes of a ‘reduced multi-graph’ (in a multi-graph, there can be several links between a node pair,  as well as self-loops). The range of multi-links is between zero and n−k+2 : 2 if we consider a pair of blocks (or one block internally), there can be at most n − (k − 2) nodes in such a pair (in one set, slightly less), since there must be at least k − 2 nodes in the other blocks of the partition. Obviously, in such a  subgraph of n − (k − 2) nodes there can be at most n−k+2 links. Thus, the 2  number of values each multi-link can take is upper-bounded by n−k+2 + 1. 2  Since the number of node pairs in the reduced multi-graph is k2 + k, we obtain the second multiplier in the argument of l∗ in the proposition. Finally, we should show that the coding of the graph is prefix. We concatenate both parts into one code that has the prescribed length and put first the prefix code of the integer that defines the parameters of the maximum likelihood model. When we start to decode from the beginning of the entire code, we first obtain a code of an integer, because we used a prefix coding for integers. At this stage we are able to define the probabilistic model that was used to create the other part of the code, corresponding to the probability distribution P (· | Θ̂k (G)). Using this information we can decode the graph G. It remains to show that the concatenated code itself is prefix. Assume the opposite: some prefix of such a code is prefix to some other similar code, say, the first code is a prefix to the second one. However, the parametric code was prefix, so both codes must correspond to the same model. Since the first two-part code is a prefix to the second, they both share the same parametric part, and the code for the graph of the first is a prefix of the second one. But this is impossible, since the encoding for graphs within the same model is prefix. This contradiction shows that the two-part coding is prefix.  9 Finally, we call Mn := [ 1≤k≤n Mn/k (8) the full regular decomposition modeling space of Ωn . 3.2 Two-part MDL for matrices In this section we consider input data in the form of a n × m matrix A = (aij ) with non-negative entries. With such a matrix we associate a random bipartite multi-graph. The set of rows and the set of columns form a bipartition. Between row i and column j there is a random number of links that are distributed according to Poisson distribution with mean ai,j . Such a model was introduced in [13] and it has been used in various tasks in complex network analysis, see [8]. The aim of this model is to back up, heuristically, a corresponding practical algorithm for regular decomposition of matrices. Our approach is closely related to but slightly different from the Poissonian block model. Assume that A is used to generate random n × m matrices X with independent integer-valued elements following Poisson(aij ) distributions. The target is to find a regular decomposition model that minimizes the expected description length of such random matrices. We propose the following modeling spaces: Definition 3.3 For integers k1 , k2 from ranges 1 ≤ k1 ≤ n and 1 ≤ k2 ≤ m, the parameters of a model Θk1 ,k2 in the modeling space Mk1 ,k2 for an integer matrix X are partition of rows into k1 non-empty sets V = (V1 , · · · Vk1 ) and partition of columns into k2 non-empty sets U P = (U1 , · · · , Uk2 ) and k1 × k2 xi,j . block average matrix P , with elements (P )α,β := i∈Vα ,j∈Uβ |Vα ||U β| Thanks to the addition rule of Poisson distributions, the likelihood of X in a model Θk1 ,k2 ∈ Mk1 ,k2 , corresponds to probabilistic models where the elements of X are independent and Poisson distributed with parameters xi,j ∼ P oisson(Pα(i),β(j) ), where i ∈ Vα(i) , j ∈ Uβ(j) in the model Θk1 ,k2 . The corresponding likelihood is denoted as P (X | Θk1 ,k2 ), the actual probability of X is denoted as P (X | A). The maximum likelihood model is found from the program that maximizes the expected log-likelihood: X Θ∗k1 ,k2 = arg max P (X | A) log P (X | Θk1 ,k2 ) Θk1 ,k2 ∈Mk1 ,k2 X = arg max Θk1 ,k2 ∈Mk1 ,k2 = arg max Θk1 ,k2 ∈Mk1 ,k2 X X ! P (X|Θk1 ,k2 ) + P (X|A) log P (X|A) P (X|A) log P (X|A) (−D(PA || PΘk1 ,k2 ) − H(PA )) where D is the Kullback-Leibler divergence between distributions, H denotes entropy and PA and PΘk1 ,k2 are the two families of Poisson distributions for the matrix elements of X. Since H(PA ) is independent on Θk1 ,k2 , it does not affect the identification of the maximum likelihood model. Thus, the final program for finding the optimal model is Θ∗k1 ,k2 = arg min (D(PA || PΘk1 ,k2 )). Θk1 ,k2 ∈M 10 (9) The description length of a model l(Θk1 ,k2 ∈ Mk1 ,k2 ) consist of the description length l(V ) + l(U ) of the two partitions and the description length of the block average matrix l(P (X)). For the latter we need to know only the integers presenting the block sums of X, since the denominator is known for a fixed partition (U, V ). The code lengths of such integers are, for large matrices, simply the logarithms of the integers. For l(U ) + l(V ) we use the same entropy based formula as in (14). As a result we end up with the following expression for the description length of the random multi-graph model A using the modeling space Mk1 ,k2 : lk1 ,k2 (A) = D(PA || PΘ∗k ,k ) + l(V ∗ ) + l(U ∗ ) 1 2 X E(log(eα,β + 1 | PΘ∗ k + 1 ,k2 ), 1≤α≤k1 ;1≤β≤k2 where X eα,β = xi,j . i∈Vα∗ ,j∈Uβ∗ The star superscript refers to parameters corresponding to the solution of the program (9). The expectation of logarithm is not explicitly computable. However, we assume large matrices and blocks, and then Jensen’s inequality provides a tight upper bound that can be used in practical computations. Thus, the final expression for the description length of A is X lk1 ,k2 (A) = D(PA || PΘ∗k ,k ) + l(V ∗ ) + l(U ∗ ) + log(aα,β + 1), (10) 1 2 1≤α≤k1 ;1≤β≤k2 where aα,β = X ai,j . i∈Vα∗ ,j∈Uβ∗ The full two-part MDL would now be realized by finding the global minimum of this expression over various (k1 , k2 ). We return to this case in the algorithm section 4.2. Although a heuristic one, we believe that our method for matrices is both reasonable and easy to use and implement, see [18]. 3.3 Refined MDL and asymptotic model complexity Let us next consider Rissanen’s refined MDL variant (see [6]). The idea is to generate just one distribution on Ωn , called the normalized maximum likelihood distribution Pnml . Then a graph G ∈ Ωn has the description length − log Pnml (G) which is at most as large as the one given by the two-part code in (6). The function P (· | Θ̂k (·)) maps P graphs of size n into [0, 1], and it is not a probability distribution, because G∈Ω P (G|Θ̂k (G)) > 1. However, a related true probability distribution can be defined as Pnml (·) = P P (· | Θ̂k (·)) G∈Ω P (G|Θ̂k (G)) . (11) The problem with this is that a computation of the normalization factor in (11) is far too involved: finding a maximum likelihood parametrization for a 11 single graph is a ‘macroscopic’ computational task by itself and it is not possible to solve such a problem explicitly for all graphs. Therefore the two-part variant is a more attractive choice in a practical context. However, the refined MDL approach is useful as an idealized target object for justifying various approximations implementations of the basic idea. It appears that in an asymptotic sense the problem is solvable for large simple graphs. The logarithm of the normalization factor in (11) is called the parametric complexity of the model space Mn/k : ! X COM P (Mn/k ) := log P (G | Θ̂k (G)) . (12) G∈Ωn In a finite modelling space case like in ours, this can be considered as a definition of model complexity. We have now the following simple bounds: Proposition 3.4 log (S2(n, k)) ≤ COM P (Mn/k ) ≤ mk + 1, where we use the same notation as in Proposition 3.2. Proof The lower bound follows from the fact that we can have at least this number of graphs that have likelihood 1 in Mn/k . This corresponds to graphs for which the nodes can be partitioned into k non-empty sets and inside each set we have a full graph and no links between the sets. Thus, for every partition there is at least one graph that has likelihood one and all such graphs are different from each other since there is a bijection between those graphs and partitions. For the upper bound, we notice that according to Proposition 3.2, there is a prefix coding with code lengths that P correspond to the two-part code. As a result, Kraft’s inequality yields that G∈Ωn 2−lk (G) ≤ 1, or X X 1≥ 2−⌈− log P (G|Θ̂k (G))⌉−mk ≥ 2log P (G|Θ̂k (G))−1−mk , G∈Ωn G∈Ωn from which we get X G∈Ωn P (G | Θ̂k (G)) ≤ 2mk +1 . Taking logarithms, we arrive at the claimed upper bound.  When considering large-scale structures corresponding to moderate k, the upper and lower bounds in Proposition 3.4 are asymptotically equivalent, and we have Corollary 3.5 Assume that k > 1 is fixed. Then COM P (Mn/k ) ∼ n log k, n → ∞. Proof Denoting the lower and upper bound of parametric complexity in Proposition 3.4 respectively by bl and bu , we argue that bu ∼ bl ∼ n log k asymptotically when n → ∞. This follows from the fact that the dominant asymptotic n component of both bu and bl is log S2(n, k). Indeed, S2(n, k) ∼ kk! for fixed k, the asymptotic of log S2(n, k) is linear in n, and all other terms of the asymptotics of both bounds are additive and at most logarithmic in n.  12 Remark 3.6 The speed of convergence of the upper and lower bounds in Proposition 3.4 is of type log n/n. 4 The Regular Decomposition approach to stochastic block models 4.1 Block model codes The previous section developed both the two-part and refined variants of the MDL theory, as presented in [6], for the model space of stochastic block models. In the following, we formulate a variant of two-part MDL that allows both practical implementations and a proof of consistency, i.e., that the MDL principle identifies a block model. It was shown above that the most heavy task in the description of a block model is identifying the partition. The same is true for the model complexity, which is asymptotically just the logarithm of the number of partitions. It appears that in order to prove consistency, we need quite a delicate estimate for the description length of the partition. The asymptotic model complexity given in Corollary 3.5 seems to be too crude for consistency. A full resolution of this intriguing question is left for further investigations. We call our two-part MDL construction a block model code of a graph with respect to a partition of its nodes that allows the computation of a tight upper bound of the code length. This upper bound is also consistent with a more generic information theoretic point of view with a semi-constructive coding scheme. We denote by H(·) both Shannon’s entropy function of a partition and the entropy of a binomial distribution, i.e. H(ξ) = − X |A| |A| log , |V | |V | A∈ξ H(p) = −p log p − (1 − p) log(1 − p). Remark 4.1 In the rest of this paper, we define also information-theoretic functions in terms of natural logarithms, and certain notions like code lengths should be divided by log 2 to obtain their values in bits. Definition 4.2 A block model code of a graph G = (V, E) with respect to a partition ξ of V is a code with the following structure: The model part: • first, the sizes of the blocks A ∈ ξ are given as integers; • second, the edge density d(A) inside each block A ∈ ξ and the edge density d(A, B) between each pair of distinct blocks A, B ∈ ξ are given as the denominators of the rational numbers presenting the exact densities. The aim of these two codes is to describe the parameters of two probability distributions, one for the links and the other for the membership of nodes in the blocks of the partition. The data part: 13 • third, the partition ξ is specified by a prefix code corresponding to membership distribution P (i ∈ A) = |A|/n, where all nodes are independent of each other; • fourth, the edges inside each block A ∈ ξ are specified by a prefix code corresponding to a stochastic block model distribution of links inside each block of ξ; • fifth, the edges between each pair of blocks A, B ∈ ξ are specified by a prefix code corresponding to a block model distribution of links between pairs of blocks in ξ. The choice of link densities as link probabilities (the second code) is natural, since conditionally to a partition the stochastic block model is just a collection of Bernoulli models, where the best choice is to use averages as parameters. Note that a block model code can be given for any graph with respect to any partition of its nodes. From Kraft’s inequality and the above definitions, it follows that there exists a prefix code for a graph G = (V, E) with respect to a partition ξ = {A1 , . . . , Ak } of V with length at most (and, for large graphs, typically close to) L(G|ξ) = L1 (G|ξ) + L2 (G|ξ) + L3 (G|ξ) + L4 (G|ξ) + L5 (G|ξ), L1 (G|ξ) = k X i=1 L2 (G|ξ) = k X i=1 l∗ (|Ai |), l∗    X |Ai | l∗ (|Ai ||Aj |d(Ai , Aj )) , d(Ai ) + 2 i<j (13) L3 (G|ξ) = |V |H(ξ),  k  X |Ai | H(d(Ai )), L4 (G|ξ) = 2 i=1 X |Ai ||Aj |H(d(Ai , Aj )), L5 (G|ξ) = i<j where l∗ (m) was defined by (7). Below we shall approximate l∗ (m) by log m without further mentioning, because their difference is insignificant in our context. Similarly, we have dropped ceiling functions systematically. Also, recall Remark 4.1 on the use of natural logarithms. Next, we shall extend the definition of block model codes to Poissonian block models. Because the entries of E are integers, the matrix E can be encoded in the same way as the simple graphs in Definition 4.2. Denote by HP (a) the entropy of the distribution Poisson(a): Hp (a) = − ∞ X ak k=0 k! e−k (k log a − log k! − a). Now, the Poissonian block model code length of E with respect to any partition 14 η = {B1 , . . . , Bm } is defined as L(E|η) = L1 (E|η) + L2 (E|η) + L3 (E|η) + L4 (E|η) + L5 (E|η), m X log(|Bi |), L1 (E|η) = i=1 m X    X |Bi | log (|Bi ||Bj |a(Bi , Bj )) , log a(Bi ) + L2 (E|η) = 2 i<j i=1 (14) L3 (E|η) = |V |H(η),  m  X |Bi | HP (a(Bi )), L4 (E|η) = 2 i=1 X |Bi ||Bj |HP (a(Bi , Bj )), L5 (E|η) = i<j where a(Bi ) := P v,w∈Bi evw |Bi |(|Bi | − 1) , a(Bi , Bj ) := P v,w∈Bi evw |Bi ||Bj | . Remark 4.3 Definition (14) parallels (13), and it works smoothly in Theorem 4.13 below. However, the expressions of L4 and L5 correspond to the case that each set of random variables is indeed Poisson distributed with the same parameter, which is not the case when η is not a refinement of ξn . The definition given in Section 3.2 is based strictly on the notion of description length, and it is also applied in the practical algorithm in Section 4.2. 4.2 Algorithms for description length minimization In this section we present algorithms that we have used in actual computations of regular decompositions of graph and matrix data. These are written for standard two-part MDL, where the code lengths L4 and L5 have a usual interpretation as a minus log-likelihood of a graph corresponding to a stochastic block model. Thus, we use link coding lengths found in the upper bound of Proposition 3.2. In many cases, this is all that can be computed realistically. We can obviously describe a partition into k nonempty sets using an n × k binary matrix with all row sums equal to one and requiring that none of the column sums equals zero. The space of all such matrices we denote as Rk and the members of this set as R ∈ Rk . Definition 4.4 For a given graph G ∈ Ωn with adjacency matrix A and a partition matrix R ∈ Rk , denote P1 (R) := RT AR, where ·T stands for matrix transpose, the column sums of R are denoted as nα := (RT R)α,α , 1 ≤ α ≤ k, and the number of links within each block and between block pairs as 1 eα,β (R) = (1 − δα,β )(P1 (R))α,β . 2 15 Then define (P (R))α,α := 1{nα >1} eα,β (R)  , nα (P (R))α,β := 2 eα,β (R) , α 6= β. nα nβ Then the coding length of the graph corresponding to A using the model R is: Definition 4.5 lk (G(A) | R ∈ Rk ) := X ni nj H((P (R))i,j ) + 1≤i<j≤k 1≤i≤k + lk (R), where lk (R) = X X ni  H((P (R))i,i ) 2 ni H(ni /n) + 1≤i≤k X l∗ (ei,j (R)) 1≤i≤j≤k is the code length of the model, according to our theory and notation. The two-part MDL program of finding the optimal model, denoted as Rk∗ , can now be written as: (k ∗ , Rk∗ ) := arg min min lk (G(A) | R ∈ Rk ) 1≤k≤n R∈Rk (15) To solve this program approximately, we can use the following greedy algorithm. Algorithm 4.6 Greedy Two-part MDL Input: G = G(A) ∈ Ωn a simple graph of size n. Output: (k ∗ , Rk∗ ∈ Rk∗ ), such that the two-part code for G is shortest possible for all models in Mn by using this pair as a model. Start: k = 1, l∗ = ∞, R ∈ Rn = {I}, k ∗ = 1, where I is denotes the n × n unit matrix. 1. Find R̂k (G) := arg min(lk (G | R) R∈Rk using subroutine ARGMAX k (Algorithm 4.8). 2. Compute lk (G) = ⌈lk (G | R̂(G))⌉ + lk (R̂(G)) 3. If lk (G) < l∗ then l∗ = lk (G), Rk∗ = R̂k (G) , k ∗ = k 4. k = k + 1 5. If k > n, Print (Rk∗ , k ∗ ) and STOP the program. 6. GoTo 1. Definition 4.7 A mapping Φ : Rk → Rk is defined as follows: (LogP (R))α,β := log(P (R))α,β , (1 − LogP (R))α,β := 1 − log(P (R))α,β , L(R) := −AR(LogP (R))T − (1 − A)RLog(1 − P (R)), where we set log 0 = 0 (all log 0 values will be later multiplied by 0), β(i, R) := inf{β : β = arg min(L(R))i,α }, 1 ≤ i ≤ n, 1≤α≤k and finally Φ(R)i,α = δα,β(i,R) . 16 The mapping Φ(R) moves each node to a possibly different block such that the description length would be minimized if all other nodes stay in their current blocks. Algorithm 4.8 ARGMAX k Algorithm for finding optimal regular decomposition for fixed k Input: A: the adjacency matrix of a graph (an n × n symmetric binary matrice with zero trace); N : an integer (the number of iterations in the search of a global optimum); k: a positive integer. Start: m = 1. 1. i := 0; generate a uniformly random element Ri ∈ Rk . 2. If at least one of the column sums of Ri is zero, GoTo 1. Otherwise, set Ri+1 := Φ(Ri ). 3. If Ri+1 6= Ri , set i := i + 1 and GoTo Pn 2. 4. R(m) := Ri ; m = m + 1; l(m) := i=1 min1≤α≤k (L(R(m)))i,α . 5. If m < N , GoTo 1. 6. M := {m : l(m) ≤ l(i), i = 1, 2, ..., N }; m∗ := inf M . Output optimal solution: R(m∗ ). For very large graphs, the program may not be solvable in the sense that it is not possible and reasonable to go through all possible values of k ∈ {1, 2, · · · , n}. One option is to limit the range of k. In case that no minimum is found, then use as an optimal choice the model found for the largest k within this range. Another option is to find the first minimum with smallest k and stop. When the graph is extremely large, it makes sense to use only a randomly sampled sub-graph as an input — indeed, when k ∗ << n, a large-scale structure can be estimated from a sample. Our algorithm for Poissonian block models and matrices is essentially similar, with certain differences in formulae as detailed below. Algorithms for other cases like directed graphs and non-quadratic matrices are written very similarly, although two partitions are needed, one for rows and one for columns. The logic of the solution remains the same however. A semi-heuristic two-part MDL algorithm for finding a regular decomposition for an n × m matrix A with non-negative entries works as follows. The decomposition takes a form of a bi-clustering: there are two partitions, one for rows and one for columns. Such partitions are described by binary matrices with row sums equal to one. The two-part MDL program to find an optimal regular decomposition is written as follows: The row partition-matrices are denoted as R ∈ Rk1 with dimensions n × k1 , 1 ≤ k1 ≤ n, and the column partition matrices as C ∈ Ck2 with dimensions m × k2 , 1 ≤ k2 ≤ m. Let us formulate the cost function for the matrix case that is derived from Eq (9). The number of matrix elements in row group α and column group β can be written as a matrix element: (N )α,β = (RT R)α,α (C T C)β,β := nα mβ . Assuming that all blocks are non-empty, all Nα,β > 0, we can define an average matrix element of block α, β. First compute the sum of all matrix elements of 17 A over such a block: eα,β = (RT AC)α,β . The corresponding block averages form a k1 × k2 P -matrix with elements (P )α,β = eα,β . (N )α,β The coding length of the matrix A using a two-part MDL code with partitions (R, C) can be written as lk1 ,k2 (G(A) | R ∈ Rk1 , C ∈ Ck2 )) X  = eα,β (1 − log((P )α,β ) + l∗ ([eα,β ]) 1≤α≤k1 ,1≤β≤k2 + X nα H 1≤α≤k1 X mβ  nα  + + k1 × k2 c. mβ H n m 1≤β≤k2 Here we assume a similar handling of log 0’s as in the binary case. nα and mβ are the sizes of row and column blocks, and [eα,β ] denotes the integer part of eα,β ; it is assumed that such block sums are large numbers with finite decimal precision c > 0. The description length of such decimals is the last term and it is small compared with other terms for large matrices and can be safely ignored. Similarly to the binary case, the two-part MDL program is defined as: Definition 4.9 (k1∗ , k2∗ , R, C)  := arg min (k1 ,k2 ) min R∈Rk1 ,C∈Ck2  lk1 ,k2 (G(A) | R ∈ Rk1 , C ∈ Ck2 ) (16) where 1 ≤ k1 ≤ n, 1 ≤ k2 ≤ m. The greedy algorithm of solving this program is very similar to the case of a binary matrix. The difference is that two parametric sequences of partitions must be searched, Ri and Cj , and in the subroutine that finds the optimal partitions for fixed i and j. One may consider different strategies in the corresponding search of an optimal pair. For instance, moving first along the diagonal i = j, and finding the value where the cost function (coding length of A) has a kneepoint, and after that make an off-diagonal search near that value. Another option could be moving along the steepest descent direction of the cost function, or alternating the directions of increments in i and j, until a saturation is reached in one direction, and then keeping that parameter fixed and finding the optimum on the second parameter. This question is a subject to further experimenting with real and artificial data. Therefore we write only the subroutine that finds the optimal partitioning with fixed k1 and k2 in a greedy fashion. First we need Definition 4.10 Define the mappings ΦR : Rk1 × Ck2 → Rk1 and ΦC : Rk1 × Ck2 → Ck2 as follows. Let E be an n × m matrix with all elements equal to 18 1. Then, using the definition of P -matrix and LogP -matrix (related to P as in binary case), define two matrices using a block-matrix notation:    CP T L(R, C) = E A −C(LogP )T and M (R, C) = E T AT Define   RP −RLogP  . β1 (i, R, C) = inf{β : β = arg min(L(R, C))i,α }, 1 ≤ i ≤ n, β2 (i, R, C) = inf{β : β = arg min(M (R, C))i,α }, 1 ≤ i ≤ m. 1≤α≤k1 and 1≤α≤k2 Then, ΦR (R, C)i,α = δα,β1 (i,R,C) , 1 ≤ α ≤ k1 , 1 ≤ i ≤ n, ΦC (R, C)i,α = δα,β2 (i,R,C) , 1 ≤ α ≤ k2 , 1 ≤ i ≤ m. and The main greedy subroutine is: Algorithm 4.11 ARGMAX (k1 , k2 ) Algorithm for finding optimal regular decomposition for fixed (k1 , k2 ). Input: A: a real n × m matrix with non-negative entries; N : a positive integer (the number of iterations in the search of a global optimum); (k1 , k2 ): a pair of positive integers. Start: m = 1. 1. i = 0; generate uniformly random elements Ri ∈ Rk1 . and Ci ∈ Ck2 . 2. If at least one of column sums of Ri or Ci is zero, GoTo 1. Otherwise, set Ri+1 := ΦR (Ri , Ci ), Ci+1 := ΦC (Ri , Ci ). 3. If Ri+1 6= Ri or Ci+1 6= Ci , set i := i + 1 and GoTo 2. 4. R(m) := Ri ; C(m) := Ci ; m := m + 1;  1 ≤ α ≤ k1 , eα,β := T T (m)AC(m) α,β ,   T T Nα,β := R (m)R(m) α,α C (m)C β,β , 1 ≤ α ≤ k1 ,   X eα,β . eα,β 1 − log l(m) := Nα,β 1 ≤ β ≤ k2 ; 1 ≤ β ≤ k2 ; 1≤α≤k1 ,1≤β≤k2 5. If m < N , GoTo 1. 6. M := {m : l(m) ≤ l(i), i = 1, 2, ..., N }; m∗ := inf M . OUTPUT optimal solution: (R(m∗ ), C(m∗ )). Remark 4.12 It is also possible to find a regular decompositions in the case of partly missing matrix elements and also in the case of mixed positive and negative entries. In the latter case, we can use the idea of directed links already used in[12]. In the first case, we note that the main characteristic of the regular decomposition is the P -matrix with elements that are averages of the data matrix over large blocks that can be estimated, in many cases, despite a portion of data is missing. 19 4.3 Accuracy of block structure identification by MDL The general idea of the Regular Decomposition method is to be a generic tool for separating structure and randomness in large data sets of graph or matrix form. A partition of a real-world data set that minimizes the (nominal) code length given in (13) resp. (14) can often not be compared with a ‘true solution’ for the simple reason that there may not be any objective notion of a ‘true structure’ of the data. However, it is important to analyse and understand how the method performs when the data really originates from a stochastic block model. This question is called the consistency of MDL. Our results on this question are summarized in the following theorem, formulated in terms of the asymptotic behavior of a model sequence as specified by Construction 2.4. In such a framework, an event is said to happen with high probability, if its probability tends to 1 when n → ∞. Theorem 4.13 Consider a sequence of stochastic block models (Gn , ξn ) based on a vector (γ1 , . . . , γk ) of relative block sizes and a matrix D = (dij )ki,j=1 of link probabilities, as described in Definition 2.3 and Construction 2.4. With high probability, the following hold: (i) Among all partitions η of Vn such that |η| ≤ k, ξn is the single minimizer of L(Gn |η). (ii) For any fixed ǫ ∈ (0, mini γi ), ξn is the single minimizer of L(Gn |η) among partitions η with minimal block size higher than nǫ. (iii) No refinement η of ξn with |η| ≤ m improves L(Gn |ξn ) by more than const(k, m) log n. The corresponding claims hold for the Poissonian block model mutatis mutandis. Proof The proof is given in the next section and structured into several propositions. Claim (i) follows from Proposition 5.1, Proposition 5.2 and Corollary 5.6. Claim (ii) is Proposition 5.7. Claim (iii) is Proposition 5.5.  The results of Section 5 offer a richer picture than what was distilled into Theorem 4.13. For example, Proposition 5.1 shows that if |η| = k and η differs from ξn only a little, then the remaining misplaced nodes can be immediately identified by computing their effect to the value of L(Gn |η). On the other hand, we have not been able to exclude the possibility that a refinement of η could yield a slight O(log n) improvement of the code length. Remark 4.14 It is rather obvious that with large n, the identification of the block structure ξn is robust against independent noise. The simplest case is that the Poissonian block model is disturbed by additive Poissonian noise to each matrix element: ẽij = eij + φij , where the φij s are i.i.d. with φij ∼ Poisson(ν), ν > 0. Then (ẽij ) is again an irreducible Poissonian block model with the same partition. More interesting cases are binary flips in the graph case and multiplicative noise with mean 1 in the case of non-negative matrices. We leave these for forthcoming work. 20 4.4 ǫ-regularity vs. stochastic block models Although the structure that a MDL-based algorithm finds typically looks like an ǫ-regular structure, there is a principal difference. In particular cases, an ǫ-regular graph can have a structure that allows much better compression that that provided by the ǫ-regular partition. In this section we give an explicit example of such a case. An important point in SRL is that for any ǫ > 0, there is an upper bound for the size of regular partition, M (ǫ) so that for any graph with size above some finite threshold N (ǫ), all such graphs have a regular partition with at most M (ǫ) sets. Based on this, we show that the ǫ-regular structure of SRL and the structure induced by the MDL need not coincide. Let us fix an order of graph 2n, large enough so that SRL holds for some ǫ > 0, and that M (ǫ) < n1−α for some fixed 0 < α < 1/2. Proposition 4.15 There is a graph of order 2n such that it has a MDL structure with code length o(n2 ) and an ǫ−regular structure that allows only Θ(n2 ) code length. Proof Take n large enough as prescribed above. Then construct a bipartite graph (X, Y ) with |X| = |Y | = n such that n is divisible by nα with some rational α ∈ (0, 1/2). Assume that bothP parts of the Pbipartition are further partitioned into equal size blocks: X = Xi , Y = Yi , |Xi | = |Yi | = nα . Define then a random graph Gp = (X, Y, E) as follows. For each pair (Xi , Yj ), take e(Xi , Yj ) = ξi,j |Xi |Yj |, where ξi,j ∼ Ber(p) is a Bernoulli random variable with parameter 0 < p < 1, and the variables for different pairs are independent. Assume that there are no other edges. We show that, with high probability, Gp is ǫ-regular with regular partition {X, such a structure has a coding length at least  Y }. In the M DL-approach, n 2 H(p + o(1)) = O(n ). This comes from the log-likelihood part, and the o(1) 2 corresponds to very small deviations of link densities from the expected value p that can be made arbitrarily small by increasing n. Now we check that the ǫ-regularity of graph Gp has a positive probability, which implies that such an ǫregular pair exists (actually, it appears that this happens with high probability). ǫ-regularity means that for any X ′ ⊆ X, Y ′ ⊆ Y , | X ′ |, | Y ′ |> ǫn, the link density d(X ′ , Y ′ ) deviates from the link density of the pair, d(X, Y ), no more than by ǫ. By definition, P ′ ′ i,j ξi,j | X ∩ Xi || Y ∩ Yj | ′ ′ d(X , Y ) = , | X ′ || Y ′ | and as a result the expectation is P Ed(X ′ , Y ′ ) = Denote xi,j := i,j Eξi,j | X ′ ∩ Xi || Y ′ ∩ Yj | | X ′ || Y ′ | ξi,j | X ′ ∩ Xi || Y ′ ∩ Yj | | X ′ || Y ′ | = p. The range P of xi,j is interval [0, 1] of unit length. Hoeffding’s inequality yields for S = xi,j that 2 P (| S − ES |> t) ≤ 2e 21 − Pt 2 b i,j , |X ′ ∩X ||Y ′ ∩Y | i j where bi,j = is the range of variable xi,j . The denominator of the |X ′ ||Y ′ | exponent in the right hand-side of the Hoeffding inequality can be bounded as  n 2 X 1 1 1 X n2α n2α = 2 n2α . | X ′ ∩ Xi |2 | Y ′ ∩ Yj |2 ≤ b2i,j ≤ 2 2 (ǫn) (ǫn) nα ǫ By taking t = ǫ | X ′ || Y ′ |≥ ǫ(ǫn)2 we get for the link density: P (| d(X ′ , Y ′ ) − p |> ǫ) ≤ 2e−2ǫ 8 n2(1−α) . Finally, since there are at most 4n pairs of subsets (X ′ , Y ′ ) from which to choose, the probability that none of them violates regularity is lower bounded by 1 − 2 × 4n e−2ǫ 8 n2(1−α) → 1, if the exponent has a positive power of n, and this happens when α < 1/2. Thus, all large subsets have densities that deviate from expectation less than ǫ with a probability tending to one. Thus, we have shown the ǫ-regularity of the partition (X, Y ). On the other hand, using MDL, we could reach the level of small sets Xi and Yi , and the corresponding log-likelihood is zero. The model complexity is o(n2 ), as can be easily seen from asymptotic formulas for the upper bound for mk , with k = n1−α .  5 Proof of Theorem 4.13 Through this section, we consider a sequence (Gn |ξn ) of increasing versions of a fixed stochastic block model based on a vector (γ1 , . . . , γk ) of relative block sizes and a matrix D = (dij )ki,j=1 of link probabilities, as specified in Construction 2.4. Consider partitions η of Vn . Denote d(η, ξn ) = 1 max min |B \ A|. n B∈η A∈ξn Thus, d(η, ξn ) = 0 if and only if η is a refinement of ξn . If v ∈ Vn and B ∈ η, denote by ηv,B the partition obtained from η by moving node v to block B (if v ∈ B, then ηv,B = η). Proposition 5.1 There is a number ǫ0 > 0 such that the following holds with high probability: if |η| = k and d(η, ξn ) ≤ ǫ0 , then if A ∈ ξn , B ∈ η, 1 |B \ A| ≤ ǫ0 and v ∈ A \ B, then L(Gn |ηv,B ) < L(Gn |η). n Proof Let ǫ, δ > 0 be small numbers and m a positive integer to be specified. They can be chosen so that the following holds: • ǫ is small so that η and ξn nearly overlap when d(η, ξn ) ≤ ǫ: mnǫ ≤ δ min |A|; A∈ξn 22 (17) • all the differing link probabilities are widely separated in δ units: δ≤ 1 min {|dij1 − dij2 | : i, j1 , j2 ∈ {1, . . . , k} , dij1 6= dij2 } ; m (18) • the empirical densities are close to their mean values: for any Ai , Aj ∈ ξn (possibly i = j), we have, with high probability, |d(Ai , Aj ) − dij | + mǫ ≤ δ. (19) Let η be a partition of Vn such that d(η, ξn ) ≤ ǫ. Condition (17) entails that for each block Ai ∈ ξn there is a unique block Bi ∈ η such that |Bi \ Ai | ≤ ǫ. Let us now assume that v ∈ Ai ∩ Bj and i 6= j, and compare the partitions η and ηv,Bi . Denote bi = |Bi |, i = 1, . . . , k, and B̃i = Bi ∪ {v}, B̃j = Bj \ {v}. Then L4 (Gn |η) + L5 (Gn |η) − (L4 (Gn |ηv,Bi ) + L5 (Gn |ηv,Bi ))         bi + 1 bj − 1 bj bi H(d(Bj )) − H(d(B̃i )) − H(d(Bi )) + H(d(B̃j )) = 2 2 2 2 Xh + bi bq H(d(Bi , Bq )) + bj bq H(d(Bj , Bq )) q6=i,j i − (bi + 1)bq H(d(B̃i , Bq )) + (bj − 1)bq H(d(B̃j , Bq )) + bi bj H(d(Bi , Bj )) − (bi + 1)(bj − 1)H(d(B̃i , B̃j )). (20) Consider first the sum over q. Leaving out the common factor bq , each term of the sum can be written as   bj − 1 H(d(B̃j , Bq )) bj H(d(Bj , Bq )) − bj   bi H(d(Bi , Bq )) − (bi + 1) H(d(B̃i , Bq )) − bj + 1    1 bj − 1 d(B̃j , Bq ) + d({v} , Bq ) = bj H bj bj  bj − 1 1 − H(d(B̃j , Bq )) − H(d({v} , Bq )) bj bj    1 bi − (bi + 1) H d(Bi , Bq ) + d({v} , Bq ) bi + 1 bi + 1  1 bi H(d(Bi , Bq )) − H(d({v} , Bq )) − bi + 1 bi + 1 (note the addition and subtraction of the term H(d({v} , Bq ))). Using Lemma A.7 and the assumptions on ǫ, δ and m, the last expression can be set to be, with high probability, arbitrarily close to the number I(djq : diq ) + I(diq : diq ) = I(djq : diq ) (the function I(·, ·), the Kullback-Leibler divergence of Bernoulli distributions, is defined in (32)). Thus, the sum over q is, with high probability, close to X bq I(djq , diq ). q6=i,j 23 Let us then turn to the remaining parts of (20) that refer to two codings of the internal links of Bi ∪ Bj . Similarly as above, we can add and subtract terms to transform these parts into !   " bj −1 bj b − 1 j 2 H  d(B̃j ) + bj  d({v} , B̃j ) bj 2 2 2 #  bj −1 bj − 1 2 − bj  H(d(B̃j )) − bj  H(d({v} , B̃j )) 2 2  " bi + 1 − H 2  bi − " bi 2  d(Bi ) bi +1 2  2  H(d(Bi )) bi +1 2 + bi bj H  − + bi bi !  d({v} , Bi ) bi +1 2 #  H(d({v} , Bi )) bi +1 2  1 bj − 1 d(Bi , B̃j ) + d({v} , Bi ) bj bj # 1 bj − 1 H(d(Bi , B̃j )) − H(d({v} , Bi )) − bj bj "   bi 1 − (bi + 1)(bj − 1) H d(Bi , B̃j ) + d({v} , B̃j ) bi + 1 bi + 1 # bi 1 − H(d(Bi , B̃j )) − H(d({v} , B̃j )) bi + 1 bi + 1 ≈ (bj − 1)I(dij : djj ) − (bi + 1)I(dii : dii ) + bi I(dii : dij ) − (bj − 1)I(dij : dij ) = bj I(dij : djj ) + bi I(dii : dij ). By the above analysis of (20), we have obtained L4 (Gn |η) + L5 (Gn |η) − (L4 (Gn |ηv,Bi ) + L5 (Gn |ηv,Bi )) X ≈ bq I(djq : diq ) + bj I(dij : djj ) + bi I(dii : dij ). (21) q6=i,j By the irreducibility assumption (1), there is a block Aq such that dqi 6= dqj , with the possibility that q ∈ {i, j}. It follows that at least one of the I(x : y)’s in (21) is positive. Denote κ∗ = min {I(dij1 : dij2 ) : dij1 6= dij2 } . Thus, with high probability, L4 (Gn |η) + L5 (Gn |η) − (L4 (Gn |ηv,Bi ) + L5 (Gn |ηv,Bi )) > 1 ∗ (κ min γi )n. i 2 On the other hand, it is easy to compute that L3 (Gn |η) − L3 (Gn |ηv,Bi ) = n(H(η) − H(ηv,Bi )) → log γj . γi The changes of L1 and L2 when moving from η to ηv,Bi are negligible. This concludes the proof.  24 The proof of Proposition 5.1 showed that when d(η, ξn ) ≤ ǫ0 , moving any node to its correct block decreases L(Gn |η) at least by (1/2)(κ∗ mini γi )n. In particular, with high probability, ξn is the unique minimizer of L(Gn |η) among k-partitions η satisfying d(η, ξn ) ≤ ǫ0 . Proposition 5.2 For any ǫ ∈ (0, 1) and positive integer m, there is a constant cǫ such that the following holds with high probability: if |η| ≤ m and d(η, ξn ) > ǫ, then 1 (L(Gn |η) − L(Gn |ξn ∨ η)) ≥ cǫ . n2 Proof Fix an ǫ ∈ (0, 1) and let η be a partition of Vn such that d(η, ξn ) > ǫ. By the concavity of H, we have L4 (Gn |η) + L5 (Gn |η) X |B| 1 = H(d(B)) + 2 2 B∈η X |B||B ′ |H(d(B, B ′ )) B,B ′ ∈η B6=B ′ X X |A ∩ B| H(d(A ∩ B)) ≥ 2 B∈η A∈ξn + X1 2 B∈η X |A ∩ B||A′ ∩ B|H(d(A ∩ B, A′ ∩ B)) (22) A,A′ ∈ξn A6=A′ + 1 2 X B,B ′ ∈η B6=B X A,A′ ∈ξn |A ∩ B||A′ ∩ B ′ |H(d(A ∩ B, A′ ∩ B ′ )) ′ = L4 (Gn |η ∨ ξn ) + L5 (Gn |η ∨ ξn ). By assumption, there is B ∈ η such that |B \ A| > ǫn for every A ∈ ξn . It is easy to see that there must be (at least) two distinct blocks, say Ai and Aj , such that ǫ n. (23) min {|Ai ∩ B|, |Aj ∩ B|} ≥ k−1 By the irreducibility assumption (1), there is a block Aq such that dqi 6= dqj , with the possibility that q ∈ {i, j}. Fix an arbitrary δ > 0 to be specified later. By ǫ-regularity (claim (ii) of Lemma A.7), with high probability, every choice of a partition η with |B \ A| > ǫn results in some blocks Ai , Aj , Aq with the above characteristics plus the regularity properties |d(Ai ∩ B, Aq ∩ B ′ ) − diq | ≤ δ, |d(Aj ∩ B, Aq ∩ B ′ ) − djq | ≤ δ, (24) where B ′ denotes a block of η that maximizes |Aq ∩ B ′ | (note that because 25 |η| ≤ m, |Aq ∩ B ′ | ≥ |Aq |/m). By the concavity of H, |Ai ∩ B||Aq ∩ B ′ |H(d(Ai ∩ B, Aq ∩ B ′ )) + |Aj ∩ B||Aq ∩ B ′ |H(d(Aj ∩ B, Aq ∩ B ′ ))  |Ai ∩ B| H(d(Ai ∩ B, Aq ∩ B ′ )) = |(Ai ∪ Aj ) ∩ B||Aq ∩ B ′ | |(Ai ∪ Aj ) ∩ B|  |Aj ∩ B| + H(d(Aj ∩ B, Aq ∩ B ′ )) |(Ai ∪ Aj ) ∩ B| < |(Ai ∪ Aj ) ∩ B||Aq ∩ B ′ |H(d((Ai ∪ Aj ) ∩ B, Aq ∩ B ′ )). In the case that q ∈ {i, j} and B = B ′ , we obtain a similar equation where |Aq ∩ B| is partly replaced by |Aq ∩ B| − 1. Because of (24) and (23), the difference between the sides of the equality has a positive lower bound that holds with high probability. On the other hand, this difference is part of the overall concavity inequality (22).  Proposition 5.3 For any refinement η of ξn , we have (st) L4 (Gn |ξn ) + L5 (Gn |ξn ) − (L4 (Gn |η) + L5 (Gn |η)) ≤ M(|η|)−M(k) X (log 2 + Yi ), j=1 (25) where (st) refers to stochastic order, the Yi ’s are i.i.d. Exp(1) random variables, and x(x + 1) . (26) M (x) = 2 Proof Here we apply results presented in Appendix A. Denote by η ∩ Ai the subset of η whose members are subsets of the block Ai of ξn . Writing the edge code lengths of the coarser and finer partition similarly as in (22), taking the difference and using (35), we obtain L4 (Gn |ξn ) + L5 (Gn |ξn ) − (L4 (Gn |η) + L5 (Gn |η)) k X |B| X X 1 I(d(B) : dii ) + = 2 2 i=1 B∈η∩Ai |B||B ′ |I(d(B, B ′ ) : dii ) B,B ′ ∈η∩Ai B6=B ′ !   |Ai | − I(d(Ai ) : dii ) 2 + X i<j X X B∈η∩Ai B ′ ∈η∩Aj ′ ′ ! |B||B |I(d(B, B ) : dij ) − |Ai ||Aj |I(d(Ai , Aj ) : dij ) . (27) Applying Proposition A.6 to each term of both outer sums now yields the claim, because k X i=1 (M (|η ∩ Ai |) − 1) + X i<j (|η ∩ Ai ||η ∩ Aj | − 1) = M (|η|) − M (k).  26 Remark 5.4 It is rather surprising that the stochastic bound (25) depends only on the number of blocks in η — not on their relative sizes, nor on the overall model size n! Proposition 5.5 For any positive integer m > k, the following holds with high probability: L(Gn |ξn ) − min η≥ξn , |η|≤m L(Gn |η) ≤ (m + M (m − k)) log n, where the relation η ≥ ξn means that η is a refinement of ξn , and M (·) was defined in (26). Proof Let η be a refinement of ξn . Refining the partition w.r.t. ξn yields a gain, based on the concavity of H, in the code part L4 + L5 , but costs in the parts L1 , L2 and L3 . We have to relate these to each other. Consider first the value of L2 (Gn |η). In our analysis, it is important to distinguish between ‘large’ and ‘tiny’ blocks, where the relative sizes of large blocks exceed some pre-defined number ǫ and the rest can be arbitrarily small, even singletons. Now, each block Ai ∈ ξn must contain at least one block Bi ∈ η ∩ Ai such that |Bi | ≥ |Ai |/m. Define ǫ := min |Aj |/(2mn). j Because no concavity gain can be obtained with an index pair {i, j} such that dij ∈ {0, 1}, it does not restrict generality to assume that dij ∈ (0, 1) for all i, j. Then !    k X X X 1 |B| ′ log(|B||B |dii ) L2 (Gn |η) = log dii + 2 2 i=1 B∈η∩Ai B,B ′ ∈η∩Ai B6=B ′ + X i<j ≥ k X i=1 + X i<j X B∈η∩Ai log  X B ′ ∈η∩A 2 2 ǫ n dii 2  j ! log(|B||B ′ |dij ) ! + (|η ∩ Ai | − 1) log(ǫndii )   log ǫ2 n2 dij + (|η ∩ Ai | + |η ∩ Aj | − 2) log(ǫndij ) = (k|η| + k) log n + c1 (D, ǫ). On the other hand, the bound |Ai | ≤ n yields L2 (Gn |ξn ) ≤ (k 2 + k) log n + c2 (D). Thus, L2 (Gn |η) − L2 (Gn |ξn ) ≥ k(|η| − k) + c1 (D, ǫ) − c2 (D). (28) We obviously have also L1 (Gn |η) ≥ L1 (Gn |ξn ), but this difference is insignificant in the present context. 27 The refinement gain in code parts L4 and L5 was bounded in Proposition 5.3 stochastically by Exp(1) random variables. The rate function (see the beginning of Appendix A) of the distribution Exp(1) is IE (x) = x − 1 − log x. Denoting Gainn (η) := L4 (Gn |ξn ) + L5 (Gn |ξn ) − (L4 (Gn |η) + L5 (Gn |η)), Proposition 5.3 yields, for y > log 2, P (Gainn (η) > y)   M(|η|)−M(k) X Yi > y − (M (|η|) − M (k)) log 2 ≤P j=1    y − (M (|η|) − M (k)) log 2 ≤ exp −(M (|η|) − M (k))IE M (|η|) − M (k)  (M(|η|)−M(k))  2e ≤ exp − y + (M (|η|) − M (k)) log y , M (|η|) − M (k) where the second factor is bounded and will be henceforth neglected. For two refinements of ξn , write η ′ ∼ η if the block sizes of η ′ in each Ai are identical to those of η. The number of refinements η ′ of ξn with η ′ ∼ η is upperbounded by   X exp  |A|H(η|ξn ) = enH(η|ξn ) . A∈ξn On the other hand, we have L3 (Gn |η) − L3 (Gn |ξn ) = nH(η) − nH(ξn ) = nH(η|ξn ). Write ∆L123 (η) = L1 (Gn |η) + L2 (Gn |η) + L3 (Gn |η) − (L1 (Gn |ξn ) + L2 (Gn |ξn ) + L3 (Gn |ξn )), ∆L(η) = L(Gn |η|) − L(Gn |ξn |). Denote z(η) := (|η| + M (|η| − k)) log n. Recalling (28), the union bound yields   P sup Gainn (η ′ ) > ∆L123 (η) + z(η) η ′ ∼η ≤ exp (nH(η|ξn ) − ∆L123 (η) − z(η) + (M (|η|) − M (k)) log(∆L123 (η) + z(η)))    ≤ exp − z(η) + − k(|η| − k) + M (|η|) − M (k) log n + c3 (D, ǫ) . The number of different block size sequences ℓ1 ≥ · · · ≥ ℓ|η| is upper bounded 28 by n|η|−1 = e(|η|−1) log n . Thus, a second application of the union bound yields ! P sup ∆L(η) > z(η) η≥ξn , |η|≤m         ≤ me − k(m−k) + M(m)−M(k) − m+M(m−k) + m−1 log n+const const → 0, as n → ∞. = n  Corollary 5.6 ξn is the unique minimizer of L(Gn |η) among partitions η with |η| = k. Proof By Proposition 5.1, min |η|=k, d(η,ξn )≤ǫ0 L(Gn |η) > L(Gn |ξn ) with high probability. On the other hand, Proposition 5.2 yields that, with high probability, min |η|=k, d(η,ξn )>ǫ0 L(Gn |η) > L(Gn |ξn ∨ η) + cǫ0 n2 . By Proposition 5.5, min L(Gn |ξn ∨ η) > L(Gn |ξn ) − (k + M (k 2 − k)) log n |η|=k with high probability. It remains to note that n2 grows faster than log n.  Proposition 5.7 Let ǫ ∈ (0, mini γi ). Consider refinements η of ξn with relative minimal block size ǫ, i.e. the set Bǫ(n) = {η ≥ ξn : |B| ≥ nǫ ∀B ∈ η} . (29) With high probability, min (n) η∈Bǫ \{ξn } L(Gn |η) > L(Gn |ξn ). (n) (30) Proof The restriction η ∈ Bǫ implies |η| ≤ ⌊1/ǫ⌋ =: m. The difference to the conditions of Proposition 5.5 is now just the magnitude of L2 (η). When η ∈ B (n) , L2 (Gn |η) ≥ M (|η|) log n2 + c(D, ǫ, |η|), so that L2 (Gn |η) − L2 (Gn |ξn ) ≥ 2(M (|η|) − M (k)) log n + c(D, ǫ, |η|). 29 By a corresponding computation as in the proof of Proposition 5.5, we obtain (n) for any fixed η ∈ Bǫ that   1 ′ P sup Gainn (η ) > ∆L123 (η) − log n 2 η ′ ∼η s ≤ exp (−(M (|η|) − M (k)) log n + const ) . Proceeding with a second union bound like in the proof of Proposition 5.5 yields ! 1 P min L(Gn |η) ≤ L(Gn |ξn ) + log n (n) 2 η∈Bǫ \{ξn }       1 ≤ max exp − (M (q) − M (k)) + q − 1 + log n + const q≤m 2   1 = exp − log n + const 2 const = √ → 0, as n → ∞, n where the maximum over q was obtained with the smallest value q = k + 1.  A Chernoff bounds and other information-theoretic preliminaries Consider a random variable X with moment generating function φX (β) = E eβX , and denote DX = {β : φX (β) < ∞}. We restrict to distributions of X for which DX is an open (finite or infinite) interval. The corresponding rate function is IX (x) = − inf (log φX (β) − βx). β∈DX IX (x) is a strictly convex function with minimum at E X and value +∞ outside the range of X. As a further restriction on the distribution of X, we assume that IX (x) approaches smoothly +∞ P both when x decreases or increases from n the point E X. For the mean X̄n = n1 1 Xi of i.i.d. copies of X, we have IX̄n (x) = nIX (x). The Chernoff bound (also known as Cramér-Lundberg bound): Proposition A.1 P (X < x) ≤ e−IX (x) P (X > x) ≥ e −IX (x) 30 for x < E X, for x > E X. (31) This has the following simple consequence. Let the support of X be the closure of (x− , x+ ) and write − + IX (x) = IX (x)1{(x− ,E X]} (x) + IX (x)1{[E X,x+ )} (x) + ∞ · 1{R\(x− ,x+ )} (x). − + With the assumptions made above, the functions IX (x) and IX (x) are, respec− + tively, bijections from (x , E X] and [E X, x ) to [0, ∞). Lemma A.2 For any z ≥ 0 we have (st) IX (X) ≤ log 2 + Y, (st) where ≤ denotes stochastic order and Y is a random variable with distribution Exp(1). Proof  P (IX (X) > z) = P 1{X<0} IX (X) > z or 1{X>0} IX (X) > z   = P 1{X<0} IX (X) > z + P 1{X>0} IX (X) > z     +(−1) −(−1) (z) (z) + P X > IX = P X < IX −(−1) ≤ exp(−IX (IX =e −z =e −(z−log 2)+ +e +(−1) (z))) + exp(−IX (IX (z))) −z , where the inequality comes from Proposition A.1.  In the case that X has the Bernoulli(p) distribution, we have IX (x) = I(x : p) := q log 1−q q + (1 − q) log . p 1−p (32) Lemma A.3 The first and second derivatives of the functions H(x) and I(x : p) are H ′ (x) = log 1−x , x 1 , x(1 − x) 1 I ′′ (x : p) = . x(1 − x) H ′′ (x) = − I ′ (x : p) = H ′ (p) − H ′ (x), (33) (34) In particular, H(q) − (H(p) + H ′ (p)(q − p)) = I(q : p), and     1 1 1 1 lim n H (1 − )y + x − (1 − )H(y) + H(x) n→∞ n n n n  = (x − y)H ′ (y) − (H(x) − H(y)) = I(x : y). 31 (35) Proposition A.4 Let n ≥ 2 and let X1 and X2 be independent random variables with distributions Bin(m, p) and Bin(n−m, p), respectively. Denote X12 = X1 + X2 and X̄1 = X1 /m, X̄2 = X1 /(n − m), X̄12 = X12 /n. Then the following identities hold: mI(X̄1 : p) + (n − m)I(X̄2 : p) − nI(X̄12 : p)     m − X1 m X1 m + (n − Xn )I : : = Xn I X12 n n − X12 n   X12 − X1 = mI(X̄1 : X̄12 ) + (n − m)I : X̄12 . n−m (36) (37) (38) The identities in Proposition (A.4) are obtained by writing the full expression of (36) and re-arranging the log terms in two other ways. Formulae (37) and (38) are written without X2 , expressing the fact that any two of the three random variables X1 , X2 and X12 contain same information as the full triple. Note that (37) and (38) do not contain p. This reflects the fact that the conditional distribution of X1 given X12 , known as the hypergeometric distribution, does not depend on p. The identity of (36) and (38) can be interpreted so that the two positive terms of (36) measure exactly same amount of information about p as what is subtracted by the negative term. Moreover, (38) has the additional interpretation of presenting the rate function of the hypergeometric distribution: Proposition A.5 Let X have the distribution Hypergeometric(n, m, z), i.e. the conditional distribution of X1 of Proposition A.4 given that X12 = z. The rate function of X is   x z z−x z + (n − m)I . (39) : : IX (x) = mI m n n−m n Proof Define the bivariate moment-generating function of (X1 , X2 ) φ(α, β) = E eαX1 +βX2 . Write P[ X1 = m | X12 = z] = P (X1 = m, X2 = z − m) , P (X12 = z) and note that we can assume p = z/n. We can now derive the claim using φ(α, β) in similar manner as in the well-known proof of the one-dimensional Chernoff bound.  Proposition A.6 Let k ≥ 2 and let Xi , i ∈ {1, . . . , k}, be independent random P variables with distributions Bin(ni , p), respectively. Denote X1...j = ji=1 Xi , Pj X̄i = Xi /ni and X̄1...j = X1...j / i=1 ni . Then k X i=1 X (st) k−1 ni I(X̄i : p) − nI(X̄12 : p) ≤ (log 2 + Yi ) , where Y1 , . . . , Yk−1 are independent Exp(1) random variables. 32 (40) i=1 (41) Proof For k = 2, the left hand side of (40) equals   X12 − X1 : X̄12 n1 I(X̄1 : X̄12 ) + n2 I n2 (42) by Proposition A.4. For any N ∈ {0, . . . , n}, consider the conditional distribution of (42), given that X12 = N . By Proposition A.5, this is the distribution of the Hypergeometric(n, n1 , N ) rate function taken at the random variable X1 with the same distribution. The claim now follows by Lemma A.2, because the stochastic upper bound does not depend on N , i.e. on the value of X12 . For k > 2 we proceed by induction. Assume that the claim holds for k − 1 and write k X i=1 = ni I(X̄i : p) − nI(X̄12 : p) k−1 X i=1 ni I(X̄i : p) − (n − nk )I(X̄1...(k−1) : p) + nk I(X̄k : p) + (n − nk )I(X̄1...(k−1) : p) − nI(X̄1...k : p). By the induction hypothesis, the first row of the second expression is stochastiPk−2 cally bounded by i=1 (log 2 + Yi ), irrespective of the value of X1...(k−1) . Similarly, the second row is stochastically bounded by log 2+Yk , where Yk ∼ Exp(1), irrespective of the value of X1...k . It remains to note that Yk can be chosen to be independent of (Y1 , . . . , Yk−2 ), because Xk is independent of (X1 , . . . , Xk−1 ), and of X̄1...(k−1) in particular.  Lemma A.7 Consider the sequence (Gn , ξn ) of stochastic block models as in Theorem 4.13. Then the following holds. (i) For any blocks Ai and Aj such that dij 6∈ {0, 1}, it holds for an arbitrary ǫ > 0 with high probability that min v∈Ai e({v} , Aj ) 1 ≥ dij − n− 2 +ǫ , |Aj | max v∈Ai e({v} , Aj ) 1 ≤ dij + n− 2 +ǫ . |Aj | (ii) For any ǫ > 0, the partition ξn is ǫ-regular with high probability. Proof Claim (i): By Proposition A.1 and (34),   e({v} , Aj ) P max > dij + h v∈Ai |Aj |   X e({v} , Aj ) > dij + h ≤ P |Aj | v∈Ai ≤ |Ai | exp (−|Aj |I(dij + h : dij ))    h2 h3 ′′′ = |Ai | exp −|Aj | + I (z : dij ) . 2dij (1 − dij ) 6 33 1 The last expression converges to zero with the choice h = n− 2 +ǫ (recall that |Ai | ∼ nγi and |Aj | ∼ nγj ), which proves the claim on the maximum. The case of the minimum is symmetric. Claim (ii): Fix ǫ > 0 and consider any i, j. Let U1 ⊆ Ai and U2 ⊆ Aj such that |U1 | ≥ ǫ|Ai | and |U2 | ≥ ǫ|Aj |. By Proposition A.1, P (|d(U1 , U2 ) − dij | > ǫ) ≤ e−|U1 ||U2 |I(dij +ǫ:dij ) + e−|U1 ||U2 |I(dij −ǫ:dij ) . Let ι(ǫ) = min {I(dij + ǫ : dij ), I(dij − ǫ : dij )}. The union bound yields P (∃U1 ⊆ Ai , U2 ⊆ Aj : |U1 | ≥ ǫ|Ai |, |U2 | ≥ ǫ|Aj |, |d(U1 , U2 ) − dij | > ǫ)  ≤ 2|Ai ||Aj | exp (|Ai | + |Aj |) log 2 − ǫ2 |Ai ||Aj |ι(ǫ)    (γi + γj ) log 2 − γi γj ǫ2 ι(ǫ) → 0 as n → ∞, ≤ 2n2 exp n2 n because ι(ǫ) > 0.  Remark A.8 Because ι(ǫ) ∝ ǫ2 as ǫ → 0, the proof of claim (ii) indicates that with a fixed ǫ, ǫ-regularity starts to hold when n >> ǫ−4 . Poissonian block model Denote by HP (a) the entropy of the distribution Poisson(a) Hp (a) = − ∞ X ak k=0 k! e−k (k log a − log k! − a) = a − a log a + e−a ∞ X ak k=0 k! log k!, (43) (44) and by IP (b : a) the Kullback-Leibler divergence between distributions Poisson(a) and Poisson(b) IP (b : a) = a − b + b log b − b log a. (45) We note the following facts: Lemma A.9 The entropy function HP (α) is increasing and concave, and its two first derivatives have the expressions d X +1 HP (α) = E log , dα α   1 1 d2 , HP (α) = − + E log 1 + dα2 α X +1 (46) (47) where X denotes a random variable with distribution Poisson(α). Lemma A.10 For any α ∈ [0, 1] and x, y > 0, denote z = αx + (1 − α)y. Then we have HP (z) − (αHP (x) + (1 − α)HP (y)) ≤ αIP (x : z) + (1 − α)IP (y : z) αx = zIBer (α) ( ) z = IBin (z,α) (αx), where the form (50) is applicable when z is a positive integer. 34 (48) (49) (50) Proof By (44) and (45), HP (z) − (αHP (x) + (1 − α)HP (y)) − (αIP (x : z) + (1 − α)IP (y : z)) = f (z) − (αf (x) + (1 − α)f (y)) ≤ 0, because the function f (u) = e−u ∞ X uk k=2 is convex: f ′′ (u) = e−u k! log k! ∞ X uk k=1 k+2 log + log 2 k! k+1 ! > 0. The expression (50) is obtained by writing the right hand side of (48) with the substitution y = (z − αx)/(1 − α) and re-combining the log terms.  The Poissonian counterpart of Proposition A.6 is the following. P Proposition A.11 Let a > 0, k ≥ 2, ni ≥ 1, i = 1, . . . , k, and n = i ni . Let Xi , i ∈ {1, . . . , k}, be independent random variables with distributions Pj Poisson(ni a), respectively. Denote X1...j = i=1 Xi , X̄i = Xi /ni and X̄1...j = Pj X1...j / i=1 ni . Then nHP (X̄12 ) − k X i=1 X (st) k−1 ni HP (X̄i ) ≤ (log 2 + Yi ) , (51) i=1 (52) where Y1 , . . . , Yk−1 are independent Exp(1) random variables. Proof The proof of Proposition A.6 can be imitated, using the following observations: • Using induction, it suffices to consider the case k = 2. • By (48), the left hand side of (40) can be upperbounded in terms of Kullback informations. • The latter expression can be transformed to the form (50), i.e. the value of a the rate function of a binomial distribution taken at random variable X1 . • Now, the conditional distribution of X1 given X12 is the above binomial distribution. Thus, we can apply Lemma A.2 in a similar way as in the proof of Proposition A.6.  Acknowledgment. This work was partly supported by Academy of Finland project 294763 (Stomograph). 35 References [1] N. Alon, R. Duke, H. Lefmann, V. Rödl, and R. Yuster. The algorithmic aspects of the regularity lemma. Journal of Algorithms, 16:80–109, 1994. [2] N. Alon, E. Fischer, I. Newman, and A. Shapira. A combinatorial characterization of the testable graph properties: It’s all about regularity. In STOC’06, Seattle, U.S., May 2006. [3] M. Bolla. Spectral Clustering and Biclustering. Wiley, 2013. [4] T. Cover and J. Thomas. Elements of Information Theory. John Wiley and Sons, U.S.A., 1991. [5] E. Fischer, A. Matsliah, and A. Shapira. Approximate hypergraph partitioning and applications. Foundations of Computer Science, pages 579–589, 2007. [6] P. Grünwald. Minimum Description Length Principle. The MIT Press, 2007. [7] S. Heimlicher, M. Lelarge, and L. Massoulié. Community detection in the labelled stochastic block model. In NIPS Workshop on Algorithmic and Statistical Approaches for Large Social Networks, 2012. [8] R. v. d. Hofstad. Random graphs and complex networks. Cambridge University Press, 2016. [9] P. Holland, K. Laskey, and S. Leinhardt. Stochastic blockmodels: First steps. Social Networks, 5(2):109–137, 1983. [10] J. Komlós and M. Simonovits. Szemerédi’s regularity lemma and its applications in graph theory. In D. Miklós, V. Sós, and T. Szonyi, editors, Combinatorics, Paul Erdös is Eighty, pages 295–352. János Bolyai Mathematical Society, Budapest, 1996. [11] L. Massoulié. Community detection thresholds and the weak Ramanujan property. In Proceedings of the Forty-sixth Annual ACM Symposium on Theory of Computing, STOC ’14, pages 694–703, New York, NY, USA, 2014. ACM. [12] T. Nepusz, L. Négyessy, G. Tusnády, and F. Bazsó. Reconstructing cortial networks: case of directed graphs with high level of reciprocity. In B. Bollobás, R. Kozma, and D. Miklós, editors, Handbook of Large-Scale Random Networks, number 18 in Bolyai Society of Mathematical Studies, pages 325–368. Springer, 2008. [13] I. Norros and H. Reittu. On a conditionally Poissonian graph process. Adv. Appl. Prob., 38:59–75, 2006. [14] I. Pappas and P.Pardalos. Identifying cognitive states using regularity partitions. PLoS ONE, 10(8): e0137012, 2015. https://doi.org/10.1371/journal.pone.0137012. 36 [15] V. Pehkonen and H. Reittu. Szemerédi-type clustering of peer-to-peer streaming system. In Proc. Cnet 2011, San Francisco, U.S.A., 2011. [16] T. P. Peixoto. Entropy of stochastic blockmodel ensembles. Physical Review E, 85(056122), 2012. [17] M. Pelillo, I. Elezi, and M. Fiorucci. Revealing structure in large graphs: Szemerédis regularity lemma and its use in pattern recognition. Pattern Recognition Letters, 87:4–11, 2017. [18] H. Reittu, F. Bazsó, and R. Weiss. Regular decomposition of multivariate time series and other matrices. In P. Fränti, G. Brown, M. Loog, F. Escolano, and M. Pelillo, editors, Proc. S+SSPR 2014, number 8621 in LNCS, pages 424–433. Springer-Verlag, 2014. [19] J. Rissanen. A universal prior for integers and estimation by minimum description length. The Annals of Statistics, 11(2):416–431, 1983. [20] J. Rissanen. Stochastic Complexity in Statistical Inquiry, volume 15. World scientific, 1998. [21] G. Sárkozy, F. Song, E. Szemerédi, and S. Trivedi. A practical regularity partitioning algorithm and its application in clustering. 2012. arXiv:1209.6540v1 [math.CO ] 28 Sep 2012. [22] A. Scott. Szemerédi’s regularity lemma for matrices and sparce graphs. Combinatorics, Probability and Computing, 20(3):455–466, 2011. [23] A. Sperotto and M. Pelillo. Szemerédi’s regularity lemma and its applications to pairwise clustering and segmentation. In Proc. EMMCVPR 2007, Italy, 2007. [24] E. Szemerédi. Regular partitions of graphs. In Problemés Combinatoires et Théorie des Graphes, number 260 in Colloq. Intern. C.N.R.S., pages 399–401, Orsay, 1976. [25] T. Tao. Szemerédi’s regularity lemma via random partitions, 2009. Blog entry, https://terrytao.wordpress.com/2009/04/26/szemeredis-regularity-lemma-via-random-parti 37
7cs.IT
1 Atypicality for Heart Rate Variability Using a Pattern-Tree Weighting Method arXiv:1710.07319v1 [cs.LG] 12 Oct 2017 Elyas Sabeti, Member, IEEE and Anders Høst-Madsen, Fellow, IEEE Abstract—Heart rate variability (HRV) is a vital measure of the autonomic nervous system functionality and a key indicator of cardiovascular condition. This paper proposes a novel method, called pattern tree which is an extension of Willem’s context tree to real-valued data, to investigate HRV via an atypicality framework. In a previous paper atypicality was developed as method for mining and discovery in “Big Data,” which requires a universal approach. Using the proposed pattern tree as a universal source coder in this framework led to discovery of arrhythmias and unknown patterns in HRV Holter Monitoring. I. I NTRODUCTION Information theory is generally a theory of typicality. For example, compressing data using the Asymptotic Equipartion Property (AEP) can be done by throwing away all sequences that are not typical. Our perspective in this paper and prior work [1], [2], [3], [4], [5], [6], [7], [8], [9] is that the value of data lies not in these typical sequence, but in the atypical sequences. Take art: the truly valuable paintings are those that are rare and atypical. Take online collections of photos, such as Flickr.com, the photos that of interest are those that are unique. They are atypical. Of course, as opposed to ’interestingness,’ an atypicality criterion will find photos that are both uniquely good and uniquely bad, there is no value judgment. A similar example can be investing: extraordinary gains can be obtained only by investing in atypical stocks, yet that can also lead to total ruin. Atypicality [3] is defined by Definition 1. A sequence is atypical if it can be described (coded) with fewer bits in itself rather than using the (optimum) code for typical sequences. In prior work, this framework has been used for data discovery [1], [2], [3], [4], [5], [6], [7], [8], [9]. Our aim with atypicality theory is to find ’unknown unknowns’ [10]. To encode data in itself, we require a universal source coder. In our discrete case atypicality papers we used Willems’ ContextTree Weighting (CTW) as an universal source coder which requires data binarization. With the aforementioned atypicality purpose, in this paper we are extending CTW method to real-valued data by introducing the pattern-tree weighting (PTW) method with finite maximum memory depth as binary-structured tree in which data samples are partitioned by a binary pattern achieved by comparing consecutive samples and the probability estimation in each node is done by predictive estimators such as predictive minimum description length (MDL). The principal reason for introducing a new method such as PTW is its strength in pattern mining of real-valued data which has enormous applications in data science. For instance, the patterns in Heart Rate Variability (HRV) are informative and symptomatic of heart diseases; however their detailed recognition in Holter Monitoring is impractical for cardiologists, due to huge amount of data at hand, i.e., “Big Data.” We first discovered these HRV patterns in [1], but because of the data binarization many patterns of real-valued HRV were not captured. This issue is circumvented by PTW. II. P REDICTIVE MDL of parametric models P =  Consider the family Pθ (xn ) : θ ∈ Θ ⊂ Rk . Rissanen [11] defined predictive MDL (we call it ordinary predictive MDL) by n−1 X L(xn ) = − log Pθ̂(xi ) (xi+1 |xi ) i=1 in which using the already observed data xi , the parameters of the model θ̂(xi ) are estimated and they’re used to estimate the op probability of the next sample Pθ̂(x (xi+1 |xi ). In our comi) panion paper [9] we have shown that the ordinary predictive MDL has initialization problems in the redundancy sense that effects the total codelength, which we solve it by proposing another predictive approach that is called the sufficient statistic method, in which using sufficient statistics t, the distribution of the parameters θ̂(t) are estimated and applied to calculate ss the probability of the next sample Pθ̂(t) (xi+1 |xi ). To compare our sufficient statistic method and the ordinary predictive approach, assume the model is N(µ, σ 2 ), then  1 1 2 op p exp − 2 (xn+1 − µ cn ) (1) P (xn+1 |xn ) = 2Sn 2πSn2   2  n2 r Γ n+1 nSn n ss 2 P (xn+1 |xn ) = π (n + 1) Γ n2 (n + 1) S 2  n+1 2 n+1 (2) Pn Pn 2 1 cn ) . where µ cn = n1 i=1 xi and Sn2 = n−1 i=1 (xi − µ Note that for convenience, we drop the subscript θ̂(xi ) in probabilities. Even though both ordinary predictive MDL and sufficient statistic methods have distinct behavior in their initialization performance, they both achieve the same asymptotic code length. In section III-B we’ll see how this predictor are going to be used in each node of pattern-tree to calculate coding distributions. III. PATTERN TREE : A MODEL FOR HEART RATE VARIABILITY As it was mentioned earlier in the introduction, in [1] we discovered some patterns in HRV that are signs of particular heart arrhythmias. Due to quantization of the data, our discovery was limited, therefore we are motivated to extend the 2 result to the real-valued time series of HRV and this requires a model for HRV signal. Even though there are many nonlinear autoregressive processes and switching state-space models for HRV, Costa et al [12] showed that all of those methods give a rise to a multimodal distribution for HRV and they concluded that the best is using Gaussian mixture model. Existence of premature beats (heart beats that happen very early, before heart contraction happens) in the HRV data that we have used in [1] was indicative of the same fact at the rudimentary level. Consider a time series of heart rate measurements xn = {x1 , x2 , · · · , xn } and define zn as the state variable at time n with K possibilities (K is the number of Gaussian distributions in the mixture model). Let πk = Pr {zn = k} for all 1 ≤ k ≤ K, then based on Costa’s model [12] we have X P (xn+1 |xn ) = P (zn )P (xn+1 |xn , zn ) zn = K X πk Pθk (xn+1 |xn ) (3) k=1 PK K where π = {πk }k=1 satisfies 0 ≤ πk ≤ 1 and k=1 πk = 1,  and 2Pθk (xn+1 |xn ) is a Gaussian distribution with θ k = µk , σk . The model (3) and the biological reason behind mixturemodeling of HRV made us consider a more complex and more exhaustive model for this process, a tree model. This can be explained via a simple example. Assume we have a binary tree with depth one, this tree partitions the samples in the root node by comparing it with the previous sample and based on having a rise or a drop, it will be assigned to one of the child nodes. Now suppose this tree is used to divide the samples in a HRV signal that contains premature beats. Note that the histogram of this HRV signal will be a mixture of two Gaussian distributions with separated means and different variances. Since the time difference between the two consecutive normal heart beats is (relatively) much larger than the time interval between a normal heart beat and a premature one, the depth-one tree will separate all the premature beats from normal ones (however some normal beats can be classified as premature, since depthone tree is too simple). By letting this tree structure to be deeper, more complex arrhythmias such as tachycardia, flutter and fibrillation will be separated from normal beats; this could also lead to new discoveries of heart abnormalities, which is the real goal of our work. Since the same tree structure is used in CTW and its application led to data discovery ([3], [1]), here we want to extend the same concept to develop the pattern tree weighting (PTW) for real-valued data. This proposed method uses the binary data pattern as context and apply predictive MDL for real-valued samples to compute the coding distribution. A. Pattern tree as an extension of the context tree The context tree has been shown to be a powerful method to compute an appropriate coding distribution [13], [14]. A context of the binary source symbol yn is a suffix of the semi-infinite sequence · · · , yn−2 , yn−1 that precedes it. The context tree consists of nodes corresponding to each context up to certain depth. A pattern tree of depth D has the same structure of a context tree of the same depth, but since we are interested to design it for real-valued data, the way it splits the source sequence is different. Suppose at time n, the last D samples of the real-valued source sequence (xi ∈ R) are xn−D , · · · , xn−2 , xn−1 . After putting xn in the root node η1 = λ, the way we assign xn to any of the root’s children (η2 and η3 ) at depth one is based on comparing xn and xn−1 , for instance if xn−1 > xn we assign xn to node η2 . Next the way we assign xn to η2 ’s children (η4 and η5 ) at depth two is based on comparing xn−1 and xn−2 and we keep on doing this until we reach the maximum depth D. As it can be seen, at time n, connecting the nodes that are assigned by xn illustrates a pattern that shows the fluctuation of the (D + 1)most recent source samples from xn−D to xn , and that’s the reason we call it a pattern tree. Here is an example to show how the source sequence is portioned by the pattern tree. Example 2. Consider a tree with depth D = 3 and suppose that the source generated the sequence [1.7 0.6 -2.6 -0.8 0.7 7.1 5.5 -2.7 6 1.4] while the past sequence was [... -0.9 0.1 -0.4]. Then the sequence is partitioned by the pattern tree, see Fig. 1 (for now disregard the probabilities in the Fig. 1). B. Coding for an unknown tree source In this section we describe how to employ the predictive MDL of section II to estimate the probability in each node. Here we want to use the same concept of the weighted coding distribution in the context tree, adapted to the real-value case. Therefore to each node η we will assign a sequential predictive distribution that only depends on the data samples observed by this particular node. In fact, the weighted coding distribution of the pattern tree will be exactly like the context tree, but with this difference that instead of KT-estimator which is designed for binary data, we use predictive MDL estimators (e.g., for the case of Gaussian see (1) or (2) ). From now on, we assume for a tree with depth D, the initial context of past sequence x1−D , · · · , x0 is available. At any time n for each node ηi suppose the vectors tηni = {t < n : xt ∈ ηi } and xηni = {xt : t ∈ tηni } are the set of all the time indexes of the already observed data samples by that node and its corresponding data samples, respectively. Clearly η for every internal node we have tηni = tηn2i ∪ tn2i+1 , i.e., the set of all the time indexes of the already observed data samples by the parent node ηi is the union of the set of all the time indexes of the already observed data samples by its children η (see Fig. 1), and similarly xηni = xηn2i ∪ xn2i+1 . Ergo the weighted probability in each internal node is 1 Pη (xn+1 |xηni ) 2 i 1 + Pη2i (xn+1 |xηn2i )Pη2i+1 (xn+1 |xηn2i+1 ) 2 where Pηi (xn+1 |xηni ) is the predictive distribution (e.g., (1) and (2)) at node ηi . So in each node, the parameter of the model is estimated based on the observed samples at that particular node. One issue here can be in initialization, for instance for a Gaussian source, at least each node needs two samples to estimate both mean and variance. This can be resolved by estimating the initial predictive distribution Pω,ηi (xn+1 |xηni ) = 3 parameters based on the first D samples of data in the context. Finally the weighted probability in each internal node will be (see (4) at the top of the next page). As an example for predictive distribution, if the source sequence is generated according to N (µ, σ 2 ) where both µ and σ 2 are unknown, then using ordinary predictive MDL of (1) we have   1 1 2 exp − 2 (xn+1 − µ cn ) (5) Pηi (xn+1 |xηni ) = p 2Sn 2πSn2 P 1 η where µ cn = and Sn2 = η xi ∈xni xi |xni | P 2 1 η cn ) . The following example η xi ∈xni (xi − µ |xni |−1 calculates the weighted probability of the source sequence of Example 2 using Gaussian MDL predictor (2): Example 3. Back to the Example 2, the weighted probabilities Pω using our sufficient-statistic-based predictor (2) as the estimator for Gaussian distribution are depicted in the pattern tree in Fig. 1. 3,8,11 3,8,11 p !=2.7x10 -5 2,3,7,8,10,11 p !=2.7x10 -5 2,7,10 p !=4.1x10 p !=1.7x10 -9 -5 1,2,3,4,5, 6,7,8,9,10,11 p !=3.8x10 -17 1,4,5,6,9 p !=6.3x10 -9 1 2 3 4 5 6 7 8 9 10 11 ... -0.9 0.1 -0.4 1.7 0.6 -2.6 -0.8 0.7 7.1 5.5 -2.7 6 1.4 1 Past Source Sequence Figure 2. Updated path of the weighted pattern tree of the source sequence in Example 2 followed by a 1. terms of coding, Definition 1 can be stated in the following form C(x|P) − C(x) > 0 3,8 3,8 p !=9.6x10 -4 2,10 p !=1x10-2 7 p !=3.4x10 -3 4,9 p !=2.6x10 -4 1 p !=3.2x10 -2 5 p !=1.3x10 -1 6 p !=2x10-3 p !=9.6x10 -4 2,3,7,8,10 2,7,10 p !=4.1x10 p !=3.8x10 -8 -5 1,2,3,4,5, 6,7,8,9,10 p !=3.8x10 -16 1,4,9 p !=9.8x10 -6 5,6 1,4,5,6,9 p !=6.3x10 -9 p !=3.7x10 -4 1 2 3 4 5 6 7 8 9 10 ... -0.9 0.1 -0.4 1.7 0.6 -2.6 -0.8 0.7 7.1 5.5 -2.7 6 1.4 Past Source Sequence Figure 1. The source sequence of Example 2 is split up by PTW. In Example 3 the weighted probabilities are then calculated. C. Updating the pattern tree and complexity Suppose a pattern tree of depth D already seen the source sequence x1 , · · · , xn−1 , xn , now we want to see how complex the pattern tree evolves when the next sample xn+1 is going to be processed. This is done by updating all the nodes in only one path of length D from the root to a leaf node and this path is determined by the procedure explained in section III-A. Then the updating steps in all the D + 1 nodes in the evolving path are: (i) updating the parameter estimation, (ii) updating predictive probabilities Pηi (xn+1 |xηni ) and (iii) updating the weighted probabilities Pω,ηi (xn+1 |xηni ). The following example which is the continuation of the series of examples shows how the source sequence in Example 3 is updated for new source sample. Example 4. Suppose that the source has already generated the sequence of Example 2. This resulted the weighted pattern tree in Note Fig. 1. that by assuming a parametric model (here, a Gaussian model), there would be no more need to store all the data samples in each node; instead, only parameters should be updated and stored in the nodes. IV. ATYPICALITY USING PTW  Suppose P = Pθ (xn ) : θ ∈ Θ ⊂ Rk is a family of parametric model class that can be assigned to the data. In Here C(x|P) is the code length of x encoded with the optimum coder according to the typical law (known parameters θ), and C(x) is x encoded ’in itself.’ As argued in [3], we need to put a ’header’ in atypical sequences to inform the encoder that an atypical encoder is used. We can therefore write C(x) = τ + C̃(x), where τ is the number of bits for the ’header,’ and C̃(x) is the number of bits used for encoding the data itself. For encoding the data in itself an obvious solution is to use a universal source coder. We have therefore chosen to use the PTW algorithm. A. Typical Encoding and Training In Definition 1 we have assumed that parameters θ of the typical model of data is exactly known, however, in many cases the parameters are not known exactly. Let us assume we are given a single long sequence t for training – rather than the parameters θ in model P – and based on this we need to encode a sequence x. To understand what this means, we have to realize that when x is encoded according to C(x|P) with a known θ, the coding probabilities are fixed; they are not affected by x. This is an important part of Definition 1 that reacts to ’outliers,’ data that does not fit the typical model. But the issue with universal source coders is that they often easily adapts to new types of data, a desirable property of a good universal source coder, but problematic in light of the above discussion. We therefore need to ’freeze’ the source coder, for example by not updating the dictionary. However, because the training data is likely incomplete as discussed above, the freezing should not be too hard. This issue is precisely described in [3] and due to page limitation we don’t go over it here, but with a simulation we show why freezing the encoder is essential in implementing atypicality: The PTW algorithm trained with a Gaussian process with σ 2 = 4 and then tested with another Gaussian source with same mean and different variance σ 2 = 1. It can be seen in Fig. 3 that the non-frozen algorithm learn the statistic and behavior of the new source; however, the codelength using frozen algorithm keeps increasing and that’s a property we are interested in. 4 Pω,ηi (xn+1 |xηni ) =  η2i+1 1 1 ηi η2i   2 Pηi (xn+1 |xn ) + 2 Pη2i (xn+1 |xn )Pη2i+1 (xn+1 |xn ) ηi : internal node   ηi : leaf node algorithm outperformed other methods. Here we want to compare our algorithm with CDM on a simulated data. In this experiment the training sequence is a Gaussian process with zero mean and σ 2 = 4, and the test sequence have the same statistics as the training data but with two episodes of anomalies embedded in it: a sinusoidal segment (red part in Fig. 4) and a segment of Gaussian process with zero mean and σ 2 = 1 (green part in Fig. 4). As can be verified from the figure, our PTW-based atypicality found both of the anomalies in the data; however, CDM only detected the sinusoidal pattern. The Effect of Freezing: Non-Frozen Typical Coder Will Learn The Atypical Sequences 10000 Non-Frozen Typical Code Length Frozen Typical Code Length Atypical Code Length 9000 (4) Pηi (xn+1 |xηni ) 8000 7000 6000 5000 4000 3000 2000 Test Data 1000 20 A) 0 0 50 100 150 200 250 300 350 400 450 B) C) 10 500 Figure 3. The importance of freezing source coding when testing for atypicality. 0 -10 -20 B. Atypical subsequences 50 Let X (n, l) = (xn , xn+1 , . . . , xn+l−1 ) be a subsequence of {xn , n = 0, . . . , ∞} that we want to test for atypicality. As mentioned earlier, the start of a sequence needs to be encoded as well as the length. Additionally the code length is minimized over the maximum depth D of the context tree. The atypical code length is then given by ∗ ∗ LA (X (n, l)) = min (− log Pω,λ (D) + log D) + log l D except for the τ . Here Pω,λ (D) denotes the probability at the root of the pattern tree of depth D. For typical coding we use the algorithm in Section IV-A when the parameters are not known; let L(n) be the codelength for the sequence x0 , . . . , xn . Then we can put LT (X (n, l)) = L(n + l − 1) − L(n). We need to test every subsequence of every length, that is, we need to test subsequences X (n, l) for every value of n and l. For atypical coding this means that a new PTW algorithm needs to be started at every sample time. So, if the maximum sequence length is L, L separate PTW trees need to maintained at any time. These are completely independent, so they can be run on parallel processors. The result is that for every bit of the data we calculate ∆L(n) = min {LA (X (n, l)) − LT (X (n, l))} l 100 150 200 250 300 350 400 450 500 Atypicality CDM Figure 4. A comparison of two different methods. For our proposed method, the 4L of equation (6) has been plotted. A) Gaussian process with zero mean and σ 2 = 4, exactly the same as training (typical) data, B) A sinusoidal segment C) A segment of Gaussian process with zero mean and σ 2 = 1 . B. Detection of Paroxysmal Atrial Fibrillation (PAF) Paroxysmal Atrial Fibrillation (PAF) is an irregular, often rapid heart rate that commonly causes poor blood flow, which may lead to severe consequences. PhysioNet [16] has provided a database for this arrhythmia [17]. Part of this database includes 30-minute ECG records of different subjects (who have PAF) during a period that is distant from any episode of PAF. Each 30-minute record is then followed by two 5-minute record of the same subject, one of which contains an episode of PAF, and the other one has no such an episode. Fig. 5 shows HRV signal for a subject in the database. 30 minutes HRV segment: Distant from any episode of PAF (6) 1.5 1 and we can state the atypicality criterion as ∆L(n) < −τ . V. A NOMALY D ETECTION In [15] authors came up with the Compression-based Dissimilarity Measure (CDM) that uses the dissimilarity measure for anomaly detection. They showed by that their proposed 0 200 400 600 800 1000 1200 1400 1600 1800 2000 5 minutes HRV segment: Distant from any episode of PAF Time (sec) In [3] we have used CTW for anomaly detection in binary data and we got unique results. In order to verify the performance of our algorithm for real-valued data, here we want to use PTW as encoder in atypicality framework for same purpose. A. Comparison with an alternative method 0.5 1.5 1 0.5 0 50 100 150 200 250 300 350 5 minutes HRV segment: Contains episode of PAF 1.5 1 0.5 0 50 100 150 200 250 Samples Figure 5. HRV signal of a PAF subject in the database 300 350 5 As we mentioned earlier, the ultimate goal of atypicality is to find “unknown unknowns” in Big Data. One example can be the data that achieved by Holter Monitoring, i.e., a continuous tape recording of a patient’s ECG for 24 hours. For such a data we used the MIT-BIH Normal Sinus Rhythm Database (nsrdb) which is provided by PhysioNet [16]. Even though the subjects included in this database were found to have had no significant arrhythmias, there exist many arrhythmic beats and patterns to look for. We want to apply our algorithm to find interesting parts of the data in the dataset. Since the data is assumed to be “Normal Sinus Rhythm,” we trained and froze our typical PTW with Gaussian process of the same mean and variance of the data. Using the process of the section IV-B, we managed to find interesting results on the dataset. As an example, we provide Fig. 6. An can be seen in the figure, for that particular data we came up with three major atypical subsequences: the first one is denotes by “S,” second one is marked with “V” and the last one as “pattern.” After looking up in the annotation file which is provided for the HRV, the “S” group corresponds to onset of some supraventricular beats and the “V” groups was the result of ventricular contraction; however, there were no label for the segment that we call “pattern” in the HRV annotations. Looking closer in the data shows existence of some repetitive patterns that was not even seen by the cardiologist who annotated the HRV data. Taking a deeper look into ECG (not HRV) annotation shows that those patterns are happening at the same time that there are either some isolated QRS-like artifact or signal quality change [16]. This shows our algorithm was able to find something that was missed by the eye of the expert who was only looking into the HRV data without considering the ECG signals; nevertheless, it could be the sign of some heart malfunction after the recording was over. R EFERENCES [1] A. Høst-Madsen, E. Sabeti, and C. Walton, “Information theory for atypical sequences,” in IEEE Information Theory Workshop (ITW’13), Seville, Spain, 2013. [2] A. Host-Madsen and E. Sabeti, “Atypical information theory for realvalued data,” in 2015 IEEE International Symposium on Information Theory (ISIT). IEEE, 2015, pp. 666–670. [3] A. Høst-Madsen, E. Sabeti, and C. Walton, “Data discovery and anomaly detection using atypicality: Theory,” IEEE Transactions on Information Theory, submitted 2016, available at http://arxiv.org/abs/1709.03189. [4] A. Host-Madsen, E. Sabeti, C. Walton, and S. J. Lim-Higbie, “Universal data discovery using atypicality,” in 3rd International Workshop on Pattern Mining and Application of Big Data (BigPMA - Big Data 2016), 2016 IEEE International Conference on. IEEE, 2016. 1.5 HRV: An episode of 24 hours Atypicality: "L(n) (bits) Time (sec) In our experiment, for each subject we train the PTW with HRV of 30-minute records and freeze it, then it was used as encoder for its two 5-minute segments. Our goal was to detect the 5-minute record with PAF episode, since we believed using the PTW trained on 30-minute records, smaller codelength is needed to encode the 5-minute record without PAF episode. After applying the same procedure on all the 25 subjects, we were able to detect all the 5-minute record containing PAF episode correctly, with 100 accuracy (consequently due to data structures, zero false alarm), in fact we have improved the best results of other researches on the same database about 10 percent [18], [19]. Again, as we discussed in section IV-A it verifies the importance of freezing in our notion of atypicality. C. Detection of anomaly in Holter Monitoring 1 0.5 S Patterns V 0 -0.5 -1 1 2 3 4 5 Samples 6 7 8 9 10 #10 4 Figure 6. Atypicality using PTW for Holter Monitoring HRV: “S” stands for supraventricular arrhythmia and “V” stands for ventricular contraction [5] E. Sabeti and A. Host-Madsen, “Atypicality for vector gaussian models,” in 2015 IEEE Global Conference on Signal and Information Processing (GlobalSIP). IEEE, 2015, pp. 328–332. [6] ——, “Atypicality for the class of exponential family,” in 2016 54rd Annual Allerton Conference on Communication, Control, and Computing (Allerton). IEEE, 2016. [7] ——, “How interesting images are: An atypicality approach for social networks,” in Big Data (Big Data), 2016 IEEE International Conference on. IEEE, 2016. [8] E. Sabeti and A. Høst-Madsen, “Data discovery and anomaly detection using atypicality: Signal processing methods,” IEEE Transactions on Signal Processing, submitted 2017, available at http://arxiv.org/abs/1709.03191. [9] E. Sabeti and A. Host-Madsen, “Enhanced mdl with application to atypicality,” in 2017 IEEE International Symposium on Information Theory (ISIT). IEEE, 2017. [10] D. Rumsfeld, Known and Unknown: A Memoir. Penguin, 2011. [11] J. Rissanen, “Stochastic complexity and modeling,” The Annals of Statistics, no. 3, pp. 1080–1100, Sep. 1986. [12] F. M. Costa T, Boccignone G, “Gaussian mixture model of heart rate variability,” PLoS ONE, no. 5, 2012. [13] F. M. J. Willems, Y. Shtarkov, and T. Tjalkens, “The context-tree weighting method: basic properties,” Information Theory, IEEE Transactions on, vol. 41, no. 3, pp. 653–664, 1995. [14] F. Willems, Y. Shtarkov, and T. Tjalkens, “Reflections on "the context tree weighting method: Basic properties",” Newsletter of the IEEE Information Theory Society, vol. 47, no. 1, 1997. [15] E. Keogh, S. Lonardi, and C. A. Ratanamahatana, “Towards parameterfree data mining,” in Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2004, pp. 206–215. [16] A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley, “Physiobank, physiotoolkit, and physionet,” Circulation, vol. 101, no. 23, pp. e215–e220, 2000. [Online]. Available: http://circ.ahajournals.org/content/101/23/e215 [17] G. Moody, A. Goldberger, S. McClennen, and S. Swiryn, “Predicting the onset of paroxysmal atrial fibrillation: The computers in cardiology challenge 2001,” in Computers in Cardiology 2001. IEEE, 2001, pp. 113–116. [18] E. Sabeti, M. B. Shamsollahi, and F. Afdideh, “Prediction of paroxysmal atrial fibrillation using empirical mode decomposition and rr intervals,” in Biomedical Engineering and Sciences (IECBES), 2012 IEEE EMBS Conference on. IEEE, 2012, pp. 750–754. [19] T. Thong, J. McNames, M. Aboy, and B. Goldstein, “Prediction of paroxysmal atrial fibrillation by analysis of atrial premature complexes,” IEEE transactions on biomedical engineering, vol. 51, no. 4, pp. 561– 569, 2004.
7cs.IT
The power of deeper networks for expressing natural functions David Rolnick∗ , Max Tegmark† Dept. of Physics, Massachusetts Institute of Technology, Cambridge, MA 02139 and Dept. of Mathematics, Massachusetts Institute of Technology, Cambridge, MA 02139 arXiv:1705.05502v1 [cs.LG] 16 May 2017 (Dated: May 17, 2017) It is well-known that neural networks are universal approximators, but that deeper networks tend to be much more efficient than shallow ones. We shed light on this by proving that the total number of neurons m required to approximate natural classes of multivariate polynomials of n variables grows only linearly with n for deep neural networks, but grows exponentially when merely a single hidden layer is allowed. We also provide evidence that when the number of hidden layers is increased from 1 to k, the neuron requirement grows exponentially not with n but with n1/k , suggesting that the minimum number of layers required for computational tractability grows only logarithmically with n. I. INTRODUCTION Deep learning has lately been shown to be a very powerful tool for a wide range of problems, from image segmentation to machine translation. Despite its success, many of the techniques developed by practitioners of artificial neural networks (ANNs) are heuristics without theoretical guarantees. Perhaps most notably, the power of feedforward networks with many layers (deep networks) has not been fully explained. The goal of this paper is to shed more light on this question and to suggest heuristics for how deep is deep enough. It is well-known [1–3] that nonlinear neural networks with a single hidden layer can approximate any function under reasonable assumptions, but it is possible that the networks required will be extremely large. Recent authors have shown that some functions can be approximated by deeper networks much more efficiently (i.e. with fewer neurons) than by shallower ones. However, many of the functions in question are complicated or arise from “existence proofs” without explicit constructions, and the results often apply only to types of network rarely used in practice. Deeper networks have been shown to have greater representational power with respect to various notions of complexity, including piecewise linear decision boundaries [4] and topological invariants [5]. Recently, Poole et al. [6] and Raghu et al. [7] showed that the trajectories of input variables attain exponentially greater length and curvature with greater network depth. Work including [8] and [9] shows that there exist functions that require exponential width to be approximated by a shallow network. Mhaskar, Liao, and Poggio [10], in considering compositional functions with this property, inquire whether explicit examples must be pathologically complicated. Various authors have also considered the power of deeper ∗ [email protected][email protected] network of types other than the standard feedforward model. The problem has also been posed for sum-product networks [11] and restricted Boltzmann machines [12]. Cohen, Sharir, and Shashua [13] showed, using tools from tensor decomposition, that shallow arithmetic circuits can express only a measure-zero set of the functions expressible by deep circuits. A weak generalization of this result to convolutional neural networks was shown in [14]. In summary, recent years have seen a wide variety of theoretical demonstrations of the power of deep neural networks. It is important and timely to extend this work to make it more concrete and actionable, by deriving resource requirements for approximating natural classes of functions using today’s most common neural network architectures. Lin, Tegmark, and Rolnick [15] recently proved that it is exponentially more efficient to use a deep network than a shallow network when approximating the product of input variables. In the present paper, we will greatly extend these results to include broad natural classes of multivariate polynomials, and to tackle the question of how resource use depends on the precise number of layers. Our results apply to standard feedforward ANNs with general nonlinearities and are borne out by empirical tests. The rest of this paper is organized as follows. In §II B, we consider the complexity of approximating a multivariate polynomial p(x) using a feedforward neural network with input x = (x1 , . . . , xn ). We show (Theorem II.4) that for general sparse p, exponentially many neurons are required if the network is shallow, but at most linearly many for a deep network. For monomials p, we calculate (Theorem II.1) exactly the minimum number of neurons required for a shallow network. These theorems apply for all nonlinear activation functions σ with nonzero Taylor coefficients; a slightly weaker result (Theorem II.2) holds for an even broader class of σ. In §II C, we present similar results (Propositions II.5 and II.6) for approximating univariate polynomials. In this case, shallow networks require linearly many neurons while for deep networks it suffices to use only logarithmically many neurons. In §II D, we tie the difficulty of 2 approximating polynomials by shallow networks to the complexity of tensor decomposition (Proposition II.7). In §III A, we consider networks with a constant number k of hidden layers. For input of dimension n, we show (Theorem III.1) that products can be approximated with a number of neurons exponential in n1/k , and justify our theoretical predictions with empirical results. While still exponential, this shows that problems unsolvable by shallow networks can be tractable even for k > 1 of modest size. Finally, in §III B, we compare our results on feedforward neural networks to prior work on the complexity of Boolean circuits. We conclude that these problems are independent, and therefore that established hard problems in Boolean complexity do not provide any obstacle to analogous results for standard deep neural networks. B. Multivariate polynomials The following theorem generalizes a result of Lin, Tegmark, and Rolnick [15] to arbitrary monomials. By setting r1 = r2 = . . . = rn = 1 below, we recover their result that the product of n numbers requires 2n neurons in a shallow network but can be done with linearly many neurons in a deep network. Theorem II.1. Let p(x) Pn denote the monomial Suppose that the xr11 xr22 · · · xrnn , with N = i=1 ri . nonlinearity σ(x) has nonzero Taylor coefficients up to xN . Then: m1 (p, σ) = m(p, σ) ≤ n Y (ri + 1), i=1 n X (7dlog2 (ri )e + 4), (1) (2) i=1 where dxe denotes the smallest integer that is at least x. II. THE INEFFICIENCY OF SHALLOW NETWORKS In this section, we compare the efficiency of shallow networks (those with a single hidden layer) and deep networks at approximating multivariate polynomials. A. Definitions Let σ(x) be a nonlinear function, k a positive integer, and p(x) a multivariate polynomial of degree d. We define mk (p, σ) to be the minimum number of neurons (excluding input and output) required to approximate p with a neural net having k hidden layers and nonlinearity σ, where the error of approximation is of degree at least d + 1 in the input variables. Thus, in particular, m1 (p, σ) is the minimal integer m such that: m X j=1 wj σ n X ! aij xi = p(x) + O(xd+1 + . . . + xd+1 n ). 1 i=1 Note that approximation up to degree d allows us to approximate any polynomial to high precision as long as the input variables are small enough. In particular, for homogeneous polynomials of degree d, we can adjust the weights so as to scale each variable by a constant λ  1 before input, and then scale the output by 1/λd , in order to achieve arbitrary precision. We set m(p, σ) = mink≥0 mk (p, σ). We will show that there is an exponential gap between m1 (p, σ) and m(p, σ) for various classes of polynomials p. Proof. Without loss of generality, suppose that ri > 0 for i = 1, . . . , n. Let X be the multiset1 in which xi occurs with multiplicity ri . Qn We first show that i=1 (ri + 1) neurons are sufficient to approximate p(x). Appendix A in [15] demonstrates that for variables y1 , . . . , yN , the product y1 · · · · · yN can be approximated as a linear combination of the 2N functions σ(±y1 ± · · · ± yN ). Consider setting y1 , . . . , yN equal to the elements of multiset X. Then, we conclude that we can approximate p(x) as a linear combination of the functions σ(±y1 ±· · ·±yN ). However, these functions are not all distinct: there are ri + 1 distinct ways to assign ± signs to ri copies of xi (ignoring Qn permutations of the signs). Therefore, there are i=1 (ri + 1) distinctQfunctions σ(±y1 ± · · · ± yN ), n proving that m1 (p, σ) ≤ i=1 (ri + 1). We now adapt methods introduced in [15] to show that this number of neurons is also necessary for approximating p(x). Let m ≡ m1P (p, σ) and suppose that σ(x) has ∞ k the Taylor expansion k=0 σk x . Then, by grouping terms of each order, we conclude that there exist constants aij and wj such that !N m n X X σN wj aij xi = p(x) (3) j=1 σk m X j=1 1 i=1 wj n X !k aij xi =0 for 0 ≤ k ≤ N − 1. (4) i=1 That is, a collection of elements of X, in which each element is allowed to occur multiple times. 3 For each S ⊆ X, let us take the derivative of equations (3) and (4) by every variable that occurs in S, where we take multiple derivatives of variables that occur multiple times. This gives !N −|S| m n Y X Y σN · N ! X wj ahj aij xi = xi , (5) |S|! j=1 i=1 h∈S i6∈S !k−|S| m n Y X σk · k! X wj ahj aij xi =0 (6) |S|! j=1 i=1 7dlog2 (ri )e neurons arranged in a deep network. Thereri fore, P we can approximate all of the xi using a total of i 7dlog2 (ri )e neurons. From [15], we know that these n terms can be multiplied using 4n additional neurons, P giving us a total of i (7dlog2 (ri )e + 4). This completes the proof. In order to approximate a degree-N polynomial effectively with a single hidden layer, we must naturally assume that σ has nonzero N th Taylor coefficient. However, if we do not wish to make assumptions about the other Taylor coefficients of σ, we can still prove the following weaker result: h∈S Qn for |S| ≤ k ≤ N − 1. Observe that there are i=1 (ri + 1) choices for S, since each variable xi can b included anywhere from 0 to ri times. Define A to Qn Q be the ( i=1 (ri + 1))×m matrix with entries AS,j = h∈S ahj . We claim that A has full row rank. This would show that the number of columns m is at least the number of rows Q n i=1 (ri + 1), proving the desired lower bound on m. Theorem II.2. Once again, let p(x) P denote the monon · · xrnn . Then, for N = mial xr11 xr22 · Q i=1 ri , we have n m1 (p, σ) ≤ (r + 1) if σ has nonzero N th Tayi i=1 lor coefficient. For any σ, we have that m1 (p, σ) is at least the maximum coefficient in the univariate polynoQ mial g(y) = i (1 + y + . . . + y ri ). Suppose towards contradiction that the rows AS` ,• admit a linear dependence: r X Proof outline. The first statement follows as in the proof of Theorem II.1. For the second, consider once again the equation (5). The left-hand side can be written, for any S, as the linear combination of basis functions of the form: !N −|S| n X aij xi . (7) c` AS` ,• = 0, `=1 where the coefficients c` are nonzero and the S` denote distinct subsets of X. Set s = max` |S` |. Then, take the dot product of each side of the above equation by the vector with entries (indexed by j) equal to Pn N −s wj ( i=1 aij xi ) : 0= r X c` `=1 = + m X wj j=1 X c` Y ahj wj aij xi Y ahj j=1 h∈S` i=1 X m X Y n X c` j=1 wj ahj !N −|S` | n X `|(|S` |=s) `|(|S` |<s) Letting S vary over multisets of fixed size s, we see that the right-hand side of (5) attains every degree-s monomial that divides p(x). The number of such monomials is the coefficient Cs of the term y s in the polynomial g(y). Since such monomials are linearly independent, we conclude that the number of basis functions of the form (7) above must be at least at least Cs . Picking s to maximize Cs gives us the desired result. !N −s i=1 h∈S` m X n X i=1 aij xi !(N +|S` |−s)−|S` | aij xi . Corollary II.3. If p(x) is the product of the inputs (i.e. r1 = · · ·p= rn = 1), we conclude that m1 (p, σ) ≥ n n bn/2c ∼ 2 / πn/2, under the assumption that the nth Taylor coefficient of σ is nonzero. |S` |! ·0 σk · k! It is natural now to consider the cost of approximating general polynomials. However, without further constraint, this is relatively uninstructive because polynomials of degree d in n variables live within a space of dimension n+d d , and therefore most require exponentially many neurons for any depth of network. We therefore consider polynomials of sparsity c: that is, those that can be represented as the sum of c monomials. This includes many natural functions. i=1 h∈S` We can use (5) to simplify the first term and (6) (with k = N + |S` | − s) to simplify the second term, giving us: 0= X c` · h6∈S` `|(|S` |=s) = X `|(|S` |=s) Y |S` |! · xh + σN · N ! c` · |S` |! · σN · N ! Y X `|(|S` |<s) c` · xh . h6∈S` Q Since the monomials xi ∈S` xi are linearly independent, this contradicts our assumption that the c` are nonzero. We conclude thatQA has full row rank, and therefore that n m1 (p, σ) = m ≥ i=1 (ri + 1). This completes the proof of equation (1). For equation (2), it follows from Proposition II.6 part (2) below that for each i, we can approximate xri i using The following theorem, when combined with Theorem II.1, shows that general polynomials p with subexponential sparsity have exponential large m1 (p, σ), but subexponential m(p, σ). 4 Theorem II.4. Suppose that p(x) is a multivariate polynomial of degree N , with c monomials q1 (x), q2 (x), . . . , qc (x). Suppose that the nonlinearity σ(x) has nonzero Taylor coefficients up to xN . Then, 1. m1 (p, σ) ≥ 1c maxj m1 (qj , σ). P 2. m(p, σ) ≤ j m(qj , σ). Proof outline. Our proof in Theorem II.1 relied upon the fact that all nonzero partial derivatives of a monomial are linearly independent. This fact is not true for general polynomials p; however, an exactly similar argument shows that m1 (p, σ) is at least the number of linearly independent partial derivatives of p, taken with respect to multisets of the input variables. Consider the monomial q of p such that m1 (q, σ) is maximized, and suppose that q(x) = xr11 xr22 · · ·Q xrnn . By Theon rem II.1, m1 (q, σ) is equal to the number i=1 (ri + 1) of distinct monomials that can be obtained by taking partial derivatives of q. Let Q be the set of such monomials, and let D be the set of (iterated) partial derivatives corresponding to them, so that for d ∈ D, we have d(q) ∈ Q. Consider the set of polynomials P = {d(p) | d ∈ D}. We claim that there exists a linearly independent subset of P with size at least |D|/c. Suppose to the contrary that P 0 is a maximal linearly independent subset of P with |P 0 | < |D|/c. Since p has c monomials, every element of P has at most c monomials. Therefore, the total number of distinct monomials in elements of P 0 is less than |D|. However, there are at least |D| distinct monomials contained in elements of P , since for d ∈ D, the polynomial d(p) contains the monomial d(q), and by definition all d(q) are distinct as d varies. We conclude that there is some polynomial p0 ∈ P \P 0 containing a monomial that does not appear in any element of P 0 . But then p0 is linearly independent of P 0 , a contradiction since we assumed that P 0 was maximal. We conclude that some linearly independent subset of P has size at least |D|/c, and therefore that the space of partial derivatives of p has rank at least |D|/c = m1 (q, σ)/c. This proves part (1) of the theorem. Part (2) follows immediately from the definition of m(p, σ). only logarithmically many neurons in a deep network. Thus, depth allows us to reduce networks from linear to logarithmic size, while for multivariate polynomials the gap was between exponential and linear. The difference here arises because the dimensionality of the space of univariate degree-d polynomials is linear in d, which the dimensionality of the space of multivariate degree-d polynomials is exponential in d. Proposition II.5. Let σ be a nonlinear function with nonzero Taylor coefficients. Then, we have m1 (p, σ) ≤ d + 1 for every univariate polynomial p of degree d. Proof. Pick a0 , a1 , . . . , ad to be arbitrary, distinct real numbers. Consider the Vandermonde matrix A with entries Aij = aji . It is well-known that det(A) = Q 0 i<i0 (ai − ai ) 6= 0. Hence, A is invertible, which means that multiplying its columns by nonzero values gives another invertible matrix. Suppose that we multiply P the jth column of A by σj to get A0 , where σ(x) = j σj xj is the Taylor expansion of σ(x). Now, observe that the ith row of A0 is exactly the coefficients of σ(ai x), up to the degree-d term. Since A0 is invertible, the rows must be linearly independent, so the polynomials σ(ai x), restricted to terms of degree at most d, must themselves be linearly independent. Since the space of degree-d univariate polynomials is (d + 1)dimensional, these d+1 linearly independent polynomials must span the space. Hence, m1 (p, σ) ≤ d + 1 for any univariate degree-d polynomial p. In fact, we can fix the weights from the input neuron to the hidden layer (to be a0 , a1 , . . . , ad , respectively) and still represent any polynomial p with d + 1 hidden neurons. Proposition II.6. Let p(x) = xd , and suppose that σ(x) is a nonlinear function with nonzero Taylor coefficients. Then: 1. m1 (p, σ) = d + 1. 2. m(xd , σ) ≤ 7dlog2 (d)e. Proof. Part (1) follows from part (1) of Theorem II.1 above, by setting n = 1 and r1 = d. For part (2), observe that we can approximate the square x2 of an input x with three neurons in a single layer: 1 C. Univariate polynomials As with multivariate polynomials, depth can offer an exponential savings when approximating univariate polynomials. We show below (Proposition II.5) that a shallow network can approximate any degree-d univariate polynomial with a number of neurons at most linear in d. The monomial xd requires d + 1 neurons in a shallow network (Proposition II.6), but can be approximated with 2σ 00 (0) (σ(x) + σ(−x) − 2σ(0)) = x2 + O(x4 ). We refer to this construction as a square gate, and the construction of [15] as a product gate. We also use identity gate to refer to a neuron that simply preserves the input of a neuron from the preceding layer (this is equivalent to the skip connections in residual nets). Consider a network in which each layer contains a square gate (3 neurons) and either a product gate or an identity gate (4 or 1 neurons, respectively), according to the 5 following construction: The square gate squares the output of the preceding square gate, yielding inductively a k result of the form x2 , where k is the depth of the layer. Writing d in binary, we use a product gate if there is a 1 in the 2k−1 -place; if so, the product gate multiplies the output of the preceding product gate by the output of the preceding square gate. If there is a 0 in the 2k−1 place, we use an identity gate instead of a product gate. k k−1 Thus, each layer computes x2 and multiplies x2 to the computation if the 2k−1 -place in d is 1. The process stops when the product gate outputs ud . This network clearly uses at most 7dlog2 (d)e neurons, with a worst case scenario where d + 1 is a power of 2. Proof. Suppose that we can approximate p(u) using a neural net with m neurons in a single hidden layer. Then, there exist vectors a1 , a2 , . . . , am of weights from the input to the hidden layer such that p(u) ≈ w1 σ(a1 · u) + · · · + wm σ(am · u). If we consider only terms of degree d, we obtain p(u) = σd m X wi (ai · u)d (8) i=1 The symmetric tensor T= m X (σd wi )ai ⊗ · · · ⊗ ai i=1 D. Tensor decomposition We conclude this section by noting interesting connections between the value m1 (p, σ) and the established hard problem of tensor decomposition. Specifically, we show (Proposition II.7) that the minimum number of neurons required to approximate a polynomial p equals the symmetric tensor rank of a tensor constructed from the coefficients of p. Let T be an order-d symmetric tensor of dimensions n × · · · × n. We say that T is symmetric if the entry Ti1 i2 ···id is identical for any permutation of i1 , i2 , . . . , id . For T symmetric, the symmetric tensor rank RS (T) is defined to be the minimum r such that T can be written T= r X λi ai ⊗ · · · ⊗ ai , i=1 with λ ∈ R and ai ∈ Rn for each i [16]. Thus, for d = 1, T is simply a real number and RS (T) = 1. For d = 2, T is a symmetric matrix, and the symmetric tensor rank is simply the rank of T, where one can take the values λi above to be eigenvalues of the matrix T. For a multiset S, we let π(S) denote the number of distinct permutations of S. Thus, if q1 , . . . , qs are frequencies for elements in S, we have   q1 + · · · + qs π(S) = . q1 , . . . , qs For p(u) = p(u1 , . . . , un ) a homogeneous multivariate polynomial of degree d, we define the monomial tensor T(p) as follows: T(p)j1 ···jd = [uj1 · · · ujd ]p /π({j1 , . . . , jd }), where [•]p denotes the coefficient of a monomial in p. Proposition II.7. For p(u) = p(u1 , . . . , un ) a homogeneous multivariate polynomial of degree d, we have m1 (p) ≥ RS (T (p)). has symmetric tensor rank at most m. Furthermore, by equation (8), we have X p(u) = Tj1 ···jd (uj1 · · · ujd ). 1≤j1 ,...,jd ≤m By the definition of T, the entries Tj1 ···jd are equal up to permutation of j1 , . . . , jd . Therefore, T must equal the monomial tensor T(p), showing that m ≥ RS (T(p)) as desired. Corollary II.8. Let p(u) = p(u1 , . . . , un ) be a multivariate polynomial of degree d. For c = 0, 1, . . . , d, let pc (u) be the homogeneous polynomial obtained by taking all terms of p(u) with degree c. If RS is the maximum symmetric rank of T(pc (u)), then m1 (p) ≥ RS . The proof of this statement closely follows that of Proposition II.7. Various results are known for the symmetric rank of tensors over the complex numbers C [16]. Notably, Alexander and Hirschowitz [17] showed in a highly non-trivial proof that the symmetric rank of a generic symmetric tensor  of dimension n and order k over C equals d n+k−1 /ne, with the exception of a few small values k of k and n. However, this result does not hold over the real numbers R, and in fact there can be several possible generic ranks for symmetric tensors over R [16]. III. HOW EFFICIENCY IMPROVES WITH DEPTH We now consider how mk (p, σ) scales with k, interpolating between exponential in n (for k = 1) and linear in n (for k = log n). In practice, networks with modest k > 1 are effective at representing natural functions. We explain this theoretically by showing that the cost of approximating the product polynomial drops off rapidly as k increases. 6 A. ditions Networks of constant depth By repeated application of the shallow network construction in Lin, Tegmark, and Rolnick [15], we obtain the following upper bound on mk (p, σ), which we conjecture to be essentially tight. Our approach is reminiscent of tree-like network architectures discussed e.g. in [10], in which groups of input variables are recursively processed in successive layers. 0 = −λ Y bj + j6=i i−1 X Qk j=h+1 bj bi h=1  + (log 2)  k Y ! 2bh  bj  2bi , for 1 ≤ i ≤ k (11) j=i+1 0=n− k Y bj . (12) j=1 Theorem III.1. For p(x) equal to the product x1 x2 · · · xn , and for any σ with all nonzero Taylor coefficients, we have:   1/k mk (p, σ) = O n(k−1)/k · 2n . (9) Dividing (11) by recursion Qk j=i+1 bj and rearranging gives us the bi = bi−1 + log2 (bi−1 − 1/ log 2). (13) Thus, the optimal bi are not exactly equal but very slowly increasing with i (see Figure 1). Proof. We construct a network in which groups of the n inputs are recursively multiplied. The n inputs are first divided into groups of size b1 , and each group is multiplied in the first hidden layer using 2b1 neurons (as described in [15]). Thus, the first hidden layer includes a total of 2b1 n/b1 neurons. This gives us n/b1 values to multiply, which are in turn divided into groups of size b2 . Each group is multiplied in the second hidden layer using 2b2 neurons. Thus, the second hidden layer includes a total of 2b2 n/(b1 b2 ) neurons. We continue in this fashion for b1 , b2 , . . . , bk such that b1 b2 · · · bk = n, giving us one neuron which is the product of all of our inputs. By considering the total number of neurons used, we conclude mk (p, σ) ≤ k X i=1 n Qi j=1 bj 2bi = k X  k Y  i=1  bj  2bi . (10) j=i+1 FIG. 1: The optimal settings for {bi }ki=1 as n varies are shown for k = 1, 2, 3. Observe that the bi converge to n1/k for large n, as witnessed by a linear fit in the log-log plot. The exact values are given by equations (12) and (13). Setting bi = n1/k , for each i, gives us the desired bound (9). The following conjecture states that the bound given in Theorem III.1 is (approximately) optimal. In fact, we can solve for the choice of bi such that the upper bound in (10) is minimized, under the condition b1 b2 · · · bk = n. Using the technique of Lagrange multipliers, we know that the optimum occurs at a minimum of the function L(bi , λ) := n− k Y i=1 ! bi λ+ k X  k Y  i=1 Conjecture III.2. For p(x) equal to the product x1 x2 · · · xn , and for any σ with all nonzero Taylor coefficients, we have mk (p, σ) = 2Θ(n 1/k ) , (14)  bj  2bi . j=i+1 Differentiating L with respect to bi , we obtain the con- i.e., the exponent grows as n1/k as n → ∞. We empirically tested Conjecture III.2 by training ANNs to predict the product of input values x1 , . . . , xn with 7 n = 20 (see Figure 2). The rapid interpolation from exponential to linear width aligns with our predictions. In our experiments, we used feedforward networks with dense connections between successive layers, with nonlinearities instantiated as the hyperbolic tangent function. Similar results were also obtained for rectified linear units (ReLUs) as the nonlinearity, despite the fact that this function does not satisfy our hypothesis of being everywhere differentiable. The number of layers was varied, as was the number of neurons within a single layer. The networks were trained using the AdaDelta optimizer [18] to minimize the absolute value of the difference between the predicted and actual values. Input variables xi were drawn uniformly at random from the interval [0, 2], so that the expected value of the output would be of manageable size. B. Circuit complexity It is interesting to consider how our results on the inapproximability of simple polynomials by polynomial-size neural networks compare to results for Boolean circuits. Recall that T C 0 is defined as the set of problems that can be solved by a Boolean circuit of constant depth and polynomial size, where the circuit is allowed to use AND, OR, NOT, and MAJORITY gates of arbitrary fan-in.2 It is an open problem whether T C 0 equals the class T C 1 of problems solvable by circuits for which the depth is logarithmic in the size of the input. In this section, we consider the feasibility of strong general no-flattening results. It would be very interesting if one could show that general polynomials p in n variables require a superpolynomial number of neurons to approximate for any constant number of hidden layers. That is, for each integer k ≥ 1, we would like to prove a lower bound on mk (p, σ) that grows fast than polynomially in n. Such a result might seem to address questions such as whether T C 0 and T C 1 are equal. However, Boolean circuits compute using 0/1 values, while the neurons of our artificial neural networks take on arbitrary real values. To preserve 0/1 values at all neurons, we can restrict inputs to such values and take the nonlinear activation to be the Heaviside step function: ( σ(x) = 0 1 if x ≤ 0 if x > 0. This gives us essentially a multi-layered perceptron, as inspired by McCulloch and Pitts [19]. FIG. 2: Performance of trained networks in approximating the product of 20 input variables, ranging from red (high mean error) to blue (low mean error). The curve w = 1/k n(k−1)/k · 2n for n = 20 is shown in black. In the region above and to the right of the curve, it is possible to effectively approximate the product function (Theorem III.1). Eq. (14) provides a helpful rule of thumb for how deep is deep enough. Suppose, for instance, that we wish to keep typical layers no wider than about a thousand (∼ 210 ) neurons. Eq. (14) then implies n1/k < ∼ 10, i.e., that the number of layers should be at least k> ∼ log10 n. We assume also that each neuron has access to a fixed bias constant: that is, a neuron receiving inputs x1 , x2 , . . . , xn is of the form σ(a0 + a1 x1 + a2 x2 + · · · + an xn ) where a0 , a1 , a2 , . . . , an are real constants. Such a neuron corresponds to a weighted threshold gate in Boolean circuits. It follows from the work of [20] and [21] that such artificial neural nets (ANNs), with constant depth and polynomial size, have exactly the same power as T C 0 circuits. That is, weighted threshold gates can simulate and be simulated by constant-depth, polynomial-size circuits of AND, OR, NOT, and MAJORITY gates. The following are simple constructions for these four types of gates using weighted 2 An AND gate evaluates True if all its inputs do so, an OR gate evaluates True if any of its inputs do so, a NOT gate evaluates True if its input is False and vice versa, and a MAJORITY gate evaluates True if at least half of its inputs do so. 8 thresholds. n X !  1 xi − n − 2 i=1 ! n X 1 OR(x1 , x2 , . . . , xn ) = σ xi − 2 i=1   1 NOT(x) = σ −x 2 ! n X n−1 MAJORITY(x1 , x2 , . . . , xn ) = σ xi − 2 i=1 AND(x1 , x2 , . . . , xn ) = σ Thus, we should not hope easily to prove general noflattening results for Boolean functions, but the case of polynomials in real-valued variables may be more tractable. Simply approximating a real value by a Boolean circuit requires arbitrarily many bits. Therefore, performing direct computations on real values is clearly intractable for T C 0 circuits. Moreover, related work such as [4, 8, 13] has already proven gaps in expressivity for real-valued neural networks of different depths, for which the analogous results remain unknown in Boolean circuits. IV. CONCLUSION We have shown how the power of deeper ANNs can be quantified even for simple polynomials. We have proven that there is an exponential gap between the width of shallow and deep networks required for approximating a given sparse polynomial. For n variables, a shallow network requires size exponential in n, while a deep network requires at most linearly many neurons. Networks with a constant number k > 1 of hidden layers appear to interpolate between these extremes, following a curve exponential in n1/k . This suggests a rough heuristic for the number of layers required for approximating simple functions with neural networks. For example, if we want no layers to have more than 103 neurons, say, then the minimum number of layers required grows only as log10 n. of convolutional neural nets. That is, each neuron in a layer is assumed to be connected only to a small subset of neurons from the previous layer, rather than the entirety of them (or some large fraction). In fact, we showed (e.g. Prop. II.6) that there exist natural functions that can be computed in a linear number of neurons, where each neuron is connected to at most two neurons in the preceding layer, which nonetheless cannot be computed with fewer than exponentially many neurons in a single layer, no matter how may connections are used. Our construction can also easily be framed with reference to the other properties mentioned in [13]: those of sharing (in which weights are shared between neural connections) and pooling (in which layers are gradually collapsed, as our construction essentially does with recursive combination of inputs). This paper has focused exclusively on the resources (notably neurons and synapses) required to compute a given function. An important complementary challenge is to quantify the resources (e.g. training steps) required to learn the computation, i.e., to converge to appropriate weights using training data — possibly a fixed amount thereof, as suggested in [22]. There are simple functions that can be computed with polynomial resources but require exponential resources to learn [23]. It is quite possible that architectures we have not considered increase the feasibility of learning. For example, residual networks (ResNets) [24] and unitary nets (see e.g. [25, 26]) are no more powerful in representational ability than conventional networks of the same size, but by being less susceptible to the “vanishing/exploding gradient” problem, it is far easier to optimize them in practice. We look forward to future work that will help us understand the power of neural networks to learn. V. ACKNOWLEDGMENTS It is worth noting that our constructions enjoy the property of locality mentioned in [13], which is also a feature This work was supported by the Foundational Questions Institute http://fqxi.org/, the Rothberg Family Fund for Cognitive Science and NSF grant 1122374. We thank Scott Aaronson, Surya Ganguli, David Budden, and Henry Lin for helpful discussions and suggestions. [1] G. Cybenko, Mathematics of Control, Signals, and Systems (MCSS) 2, 303 (1989). [2] K. Hornik, M. Stinchcombe, and H. White, Neural networks 2, 359 (1989). [3] K.-I. Funahashi, Neural networks 2, 183 (1989). [4] G. F. Montufar, R. Pascanu, K. Cho, and Y. Bengio, in Advances in Neural Information Processing Systems (NIPS) (2014), pp. 2924–2932. [5] M. Bianchini and F. Scarselli, IEEE transactions on neu- ral networks and learning systems 25, 1553 (2014). [6] B. Poole, S. Lahiri, M. Raghu, J. Sohl-Dickstein, and S. Ganguli, in Advances In Neural Information Processing Systems (NIPS) (2016), pp. 3360–3368. [7] M. Raghu, B. Poole, J. Kleinberg, S. Ganguli, and J. Sohl-Dickstein, arXiv preprint arXiv:1611.08083 (2016). [8] M. Telgarsky, Journal of Machine Learning Research (JMLR) 49 (2016). 9 [9] R. Eldan and O. Shamir, in 29th Annual Conference on Learning Theory (2016), pp. 907–940. [10] H. Mhaskar, Q. Liao, and T. Poggio, arXiv preprint arXiv:1603.00988v4 (2016). [11] O. Delalleau and Y. Bengio, in Advances in Neural Information Processing Systems (NIPS) (2011), pp. 666–674. [12] J. Martens, A. Chattopadhya, T. Pitassi, and R. Zemel, in Advances in Neural Information Processing Systems (NIPS) (2013), pp. 2877–2885. [13] N. Cohen, O. Sharir, and A. Shashua, Journal of Machine Learning Research (JMLR) 49 (2016). [14] N. Cohen and A. Shashua, in International Conference on Machine Learning (ICML) (2016). [15] H. W. Lin, M. Tegmark, and D. Rolnick, arXiv preprint arXiv:1608.08225v3 (2016). [16] P. Comon, G. Golub, L.-H. Lim, and B. Mourrain, SIAM Journal on Matrix Analysis and Applications 30, 1254 (2008). [17] J. Alexander and A. Hirschowitz, Journal of Algebraic Geometry 4, 201 (1995). [18] M. D. Zeiler, arXiv preprint arXiv:1212.5701 (2012). [19] W. S. McCulloch and W. Pitts, The bulletin of mathematical biophysics 5, 115 (1943). [20] A. K. Chandra, L. Stockmeyer, and U. Vishkin, SIAM Journal on Computing 13, 423 (1984). [21] N. Pippenger, IBM journal of research and development 31, 235 (1987). [22] C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals, in Proceedings of the International Conference on Learning Representations (ICLR) (2017). [23] S. Shalev-Shwartz, O. Shamir, and S. Shammah, arXiv preprint arXiv:1703.07950 (2017). [24] K. He, X. Zhang, S. Ren, and J. Sun, in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (2016), pp. 770–778. [25] M. Arjovsky, A. Shah, and Y. Bengio, in International Conference on Machine Learning (2016), pp. 1120–1128. [26] L. Jing, Y. Shen, T. Dubček, J. Peurifoy, S. Skirlo, M. Tegmark, and M. Soljačić, arXiv preprint arXiv:1612.05231 (2016).
9cs.NE
arXiv:1509.06332v2 [cs.DS] 23 Sep 2015 A note on linear fractional set packing problem Pooja Pandey ∗ Department of Mathematics, Simon Fraser University 250 - 13450 102nd Avenue, Surrey, BC, V3T 0A3, Canada Abstract In this note we point out various errors in the paper by Rashmi Gupta and R. R. Saxena, Set packing problem with linear fractional objective function, International Journal of Mathematics and Computer Applications Research (IJMCAR), 4 (2014) 9 - 18. We also provide some additional results. 1 Introduction The set packing problem, set covering problem, and set partitioning problem are among the most well-studied problems in combinatorial optimization and they have wide range of real life applications [1, 2, 3, 4, 5, 8]. Arora, Puri and Swarup [1, 2] developed couple of solution algorithms for the set covering problem with the linear fractional objective function, where they exploited the structural properties of the set covering problems. Later, Gupta and Saxena [7] extended these results for the set packing problems with the linear fractional objective function. In this note, we show that the properties established in [7] are incorrect. Gupta and Saxena [6] extended results of [1, 2] to the linear fractional set packing problems, but these extensions suffer many drawbacks since they overlooked the structural properties of the set packing problem and ignore the required conditions for their results to be correct. 2 The linear fractional set packing problem Let E = {1, 2, . . . , m} be a finite set and F = {S1 , S2 , . . . , Sn } be a family of subsets of E. The index set for elements of F is denoted by G = {1, 2, . . . , n}. For each element j ∈ G, a cost cj and a weight dj are prescribed. We refer to cj as the linear cost of the set Sj and c = (c1 , . . . , cn ) as the linear cost vector. Similarly dj is referred to as the linear weight of the set Sj and d = (d1 , . . . , dn ) as the linear weight vector. α and β are constants where β > 0. ∗ Corresponding author. Email: [email protected] 1 A subset H of G is said to be a pack of E if T Sj Sk = ∅. S j∈H Sj = E, and j, k ∈ H, j 6= k, implies Then Ph the linear set packing problem (LSPP) is to select a pack H = {π(1), . . . , π(h)} such that i=1 cπ(i) is maximized. Likewise the linear fractional set packing problem (LFSPP) is Ph cσ(i) + α to select a pack H = {σ(1), . . . , σ(h)} such that Phi=1 is maximized. d + β σ(i) i=1 For each i ∈ E, consider the vector ai = (ai1 , ai2 , . . . , ain ) where ( 1 if i ∈ Sj aij = 0 otherwise. and A = (aij )m×n be an m × n matrix. Also, consider the decision variables x1 , x2 , . . . , xn where ( 1 if j is in the pack xj = 0 otherwise. The vector of decision variables is represented as x = (x1 , . . . , xn )T and  is column vector of size n where all entries equal to 1. Then the LSPP and LFSPP can be formulated respectively as 0-1 integer programs LSPP: Maximize cx Subject to Ax ≤  x ∈ {0, 1}n (1) (2) and LFSPP: cx + α dx + β Subject to Ax ≤  x ∈ {0, 1}n Maximize (3) (4) It is assumed that c ≥ , α = 0 and β is a scalar such that dx + β > 0. Throughout the paper we will assume that dx + β > 0 for any feasible solution of LFSPP. The continuous relaxations of LSPP and LFSPP, denoted respectively by LSPP(C) and LFSPP(C), are obtained by replacing the constraint set x ∈ {0, 1}n by x ≥ , respectively in LSPP and LFSPP. The family of feasible solutions of both LSPP and LFSPP is given by S = {x|Ax ≤ , x ∈ {0, 1}n } and the family of feasible solutions for their continuous relaxations is given by S̄ = {x|Ax ≤ , x ≥ }. 2 Following are some definitions given in [7]. A solution x ∈ S which satisfies (3) and (4) is said to be a pack solution. For any pack H, a column of A corresponding to j ∈ G is said to be redundant if H + {j} is also a pack. If a pack corresponds to one or more redundant columns, it is called a redundant pack. A pack H ∗ is said to be a prime pack, if none of the columns corresponding to j ∗ ∈ G is redundant. A solution corresponding to the prime pack is called a prime packing solution. The linear fractional set covering problem (LFSCP) is obtained by replacing (3) with Ax ≥  (5) and changing the problem from maximization to minimization problem in the 0-1 integer formulation of LFSPP. Any x ∈ {0, 1}n satisfying (5) is called a cover solution. Any x ∈ S is called a cover solution and an optimal solution to the underlying problem LFSCP is called an optimal cover solution. Note that each cover solution corresponds to a cover and viceversa. A cover P is said to be redundant if P − {j} with j ∈ P is also a cover. A cover which is not redundant is called a prime cover. The incidence vector x corresponds to prime cover is called a prime cover solution. For the linear fractional set covering problem, Arora, Puri, and Swarup [1] proved that every optimal cover is a prime cover, if cj ′ s and dj ′ s satisfy certain conditions. Gupta and Saxena [7] claimed an extension of the above result to LFSPP, assuming c ≥ , d ≥  and dx + β > 0. More precisely, they claimed: Theorem 2.1. (Theorem 2 of [7]) If the objective function in LFSPP has finite value then, there exists a prime pack solution where this value is attained. This result is not true as established by the following example. Let   1 1 0 β = 2, c = (1, 2, 5), d = (4, 4, 6), and A = 1 0 1 For the LFSPP with A, c, d and β defined as above, it can be verified that x∗ = (0, 0, 1)T 5 is an optimal solution with the objective function value = 0.625. The optimal pack 8 corresponding to x∗ is H ∗ = {3} which is a redundant pack since H ∗ + {2} = {2, 3} is also a pack. All other pack solutions and their respective objective function values are listed below: x1 = (1, 0, 0)T prime pack solution x2 = (0, 1, 1)T prime pack solution x3 = (0, 0, 0)T redundant pack solution x4 = (0, 1, 0)T redundant pack solution 3 1 = 0.16666 6 7 = 0.5833 f (x2 ) = 12 f (x3 ) = 0 1 f (x4 ) = = 0.3333 3 f (x1 ) = None of these corresponds to an optimal solution for LFSPP. In particular, no prime pack solution is optimal for the instances of LFSPP constructed above, which contradicts Theorem 2.1. However, a variation of the Theorem 2.1 can be proved as noted below. Theorem 2.2. There always exists a prime pack optimal solution for LFSPP if (a) c >  and d <  or (b) any ratio of the partial sums of ci ’s or di ’s is greater than the value of the objective function at the pack solution and also the partial sum of di ’s is positive. Proof. Let us assume that there exists an optimal pack H1 for LFSPP which is a redundant optimal pack of LFSPP. Since H1 is a redundant pack, a prime pack H2 can be derived from H1 by adding redundant columns of H1 . The objective function value of LFSPP for H1 and H2 are ZH1 and ZH2 respectively: P P P cj j∈H1 cj + j∈H1 cj P j∈{H2 −H1 } Z H1 = P and ZH2 = P j∈H1 dj + β j∈H1 dj + j∈{H2 −H1 } dj + β (a) Since c >  and d < , therefore, cj + j∈H1 X j∈H1 dj + β > X dj + X and X j∈H1 cj < j∈H1 X cj (6) X dj + β (7) j∈{H2 −H1 } j∈{H2 −H1 } Since denominator of the objective function value is always positive, dividing inequality (6) by (7), we get: which gives P P P cj j∈H1 cj + j∈H1 cj P P j∈{H2 −H1 } <P j∈H1 dj + β j∈H1 dj + j∈{H2 −H1 } dj + β Z H1 < Z H2 . This shows that H2 is an optimal pack for LFSPP instead of H1 , contradicts the optimality of H1 , therefore H1 is a prime pack of LFSPP . This completes the proof of part (a). Note: In this case if we relax c > , then above theorem is no longer true. 4 (b) It is given that any ratio of the partial sums of ci ’s or di ’s is greater than the value of the objective function at the pack solution and also the partial sum of di ’s is positive and denominator of the objective function is positive for any feasible solution of LFSPP, therefore: P P j∈{H2 −H1 } j∈{H2 −H1 } P cj > ZH1 , which implies dj P j∈H1 cj >P , cross multiplication gives j∈H1 dj + β X X cj ) >( dj )( j∈{H2 −H1 } cj P j∈{H2 −H1 } ( X cj )( X dj dj + β) j∈H1 j∈{H2 −H1 } adding both sides ( P j∈H1 X ( cj )( cj )( P X j∈H1 dj + β) will give X cj )( X cj )( dj + β) + ( X X dj + β) > j∈H1 j∈{H2 −H1 } j∈H1 j∈H1 X dj + β) + ( j∈H1 j∈H1 ( j∈H1 j∈{H2 −H1 } dj )( j∈{H2 −H1 } X cj ) j∈H1 after simplifying, we get ( X j∈H1 dj + β)( X cj + j∈H1 X cj ) > ( X cj )( j∈H1 j∈{H2 −H1 } X j∈H1 dj + β + X dj ) j∈{H2 −H1 } which is equivalent to P P P ( j∈H1 cj + j∈{H2 −H1 } cj ( j∈H1 cj ) P P . > P ( j∈H1 dj + β) j∈H1 dj + β + j∈{H2 −H1 } dj ) which gives Z H2 > Z H1 . Therefore, the objective function value of any prime pack is always greater than any corresponding redundant pack, therefore, the optimal pack is a prime pack. This completes the proof of part (b). Lemma 2.3. If c and d are integer numbers, k, l = 1, . . . , n, ld + β > 0 and k + l ≤ n, then kc + lc kc < , kd + β kd + ld + β 5 if c > 0 and kc + lc kc > , kd + β kd + ld + β if c < 0. Proof. For given integer numbers c and d, if c > 0 then lcβ > 0 (8) add (kc)(kd + β) + (kc)(ld) both sides of the inequality (8), we get (kc)(kd + β) + (kc)(ld) + lcβ > (kc)(kd + β) + (kc)(ld) (9) after rearranging inequality (9) we get (kc)(kd + β) + (lc)(kd + β) (kd + β)(kc + lc) > (kc)(kd + β) + (kc)(ld) which is same as > (kc)(kd + ld + β) (10) since (kd + β) > 0 and (kd + ld + β) > 0, divide both sides of the inequality (10) by (kd + β)(kd + ld + β) , we get kc kc + lc < kd + β kd + ld + β (11) which proves the first part. Now if c < 0 then kc + lc kc > , kd + β kd + ld + β this can be proved in a similar manner as we did the first part. This completes the proof. Theorem 2.4. If ci = c, and di = d, ∀i = 1, . . . , n, and H ∗ is an optimal pack of LFSPP: (a) if c > 0, then H ∗ is a largest cardinality prime pack solution of LFSPP, (b) if c < 0, then H ∗ is a smallest cardinality pack solution of LFSPP. Proof. (a) If c > 0 : if H ∗ is not a prime pack then we can always add redundant columns for H ∗ and find a prime pack H ∗∗ of LFSPP and corresponding objective function values for H ∗ and H ∗∗ are following: P P P ∗∗ ∗ c j∈H ∗ c + j∈H ∗ c P j∈{H −H } and ZH ∗∗ = P ZH ∗ = P j∈H ∗ d + β j∈H ∗ d + j∈{H ∗∗ −H ∗ } d + β using first part of Lemma 2.3 we can claim that ZH ∗ < ZH ∗∗ 6 which contradicts the optimality of H ∗ . Therefore, H ∗ is a prime pack of the given LFSPP. If among all prime packs of LFSPP H ∗ is not of the largest cardinality then there exist a prime cover H o of LFSPP such that |H ∗| < |H o | and P P j∈H o c j∈H ∗ c and ZH o = P ZH ∗ = P j∈H ∗ d + β j∈H o d + β P P since |H ∗| < |H o| , then j∈H ∗ c < j∈H o c, along with the first part of Lemma 2.3 we can claim that ZH ∗ < ZH o which contradicts the optimality of H ∗ . Therefore, H ∗ if the prime pack of the largest cardinality among all prime packs of LFSPP. (b) If c < 0 : If among all packs of LFSPP H ∗ is not of the smallest cardinality then there exist a pack H of LFSPP such that |H ∗| > |H o | and P P j∈H ∗ c j∈H o c ZH ∗ = P and ZH o = P j∈H ∗ d + β j∈H o d + β P P but since |H ∗ | > |H o| , then j∈H ∗ c < j∈H o c, along with the second part of Lemma 2.3 we can claim that ZH ∗ < ZH o o which contradicts the optimality of H ∗ . Therefore, H ∗ is the pack of LFSPP of the smallest cardinality. This completes the proof. 3 Conclusion I would like to explore non-linear set packing problems in future research. I would like to thank Prof. Abraham P. Punnen for his valuable suggestions during the preparation of this note. References [1] Arora, S.R., Swaroop, Kanti, and Puri, M.C., The set covering problem with linear fractional functional, Indian Journal of Pure and Applied Mathematics, 8, (1977) 578588. [2] Arora, S.R., and Puri, M.C., Enumeration Technique for the Set Covering Problem with Linear Fractional Functional as its Objective Functions, ZAMM - Journal of Applied Mathematics and Mechanics, 57, (1977) 181-186. 7 [3] Bazaraa, Mokhtar S.; Goode, Jamie J, A cutting-plane algorithm for the quadratic setcovering problem, Operations Research, 23, (1975) 150 - 158. [4] Bector, C. R. and Bhatt. S. K., A linearization technique for solving integral linear fractional program, Proc. fifth Manitoba Conference on Numerical Mathematics, (1975) 221 - 229. [5] Garfinkel, M. and Nemhauser. G. L, Integer Programming, A Wiley-Interscience Publication, John Wiley and Sons (1973). [6] Gupta, Rashmi, and Saxena, R. R., Linearization technique for solving quadratic set packing and partitioning problems, International Journal of Mathematics and Computer Applications Research, 4, (2014) 9 - 20. [7] Gupta, Rashmi, and Saxena, R. R., Set packing problem with linear fractional objective function, International Journal of Mathematics and Computer Applications Research, 4, (2014) 9 - 18. [8] Lemke, C. E., Salkin, H. M. and Spielberg K., Set covering by single branch enumeration with linear programming sub-problem, Operations Research, 19, (1971) 998 - 1022. 8
8cs.DS
THE AGGREGATED UNFITTED FINITE ELEMENT METHOD FOR ELLIPTIC PROBLEMS arXiv:1709.09122v1 [cs.CE] 26 Sep 2017 SANTIAGO BADIA, FRANCESC VERDUGO, AND ALBERTO F. MARTÍN Abstract. Unfitted finite element techniques are valuable tools in different applications where the generation of body-fitted meshes is difficult. However, these techniques are prone to severe ill conditioning problems that obstruct the efficient use of iterative Krylov methods and, in consequence, hinders the practical usage of unfitted methods for realistic large scale applications. In this work, we present a technique that addresses such conditioning problems by constructing enhanced finite element spaces based on a cell aggregation technique. The presented method, called aggregated unfitted finite element method, is easy to implement, and can be used, in contrast to previous works, in Galerkin approximations of coercive problems with conforming Lagrangian finite element spaces. The mathematical analysis of the new method states that the condition number of the resulting linear system matrix scales as in standard finite elements for body-fitted meshes, without being affected by small cut cells, and that the method leads to the optimal finite element convergence order. These theoretical results are confirmed with 2D and 3D numerical experiments. Keywords: unfitted finite elements; embedded boundary methods; ill-conditioning. Contents 1. Introduction 2. Embedded boundary setup and cell aggregation 3. Aggregated unfitted Lagrangian finite element spaces 4. Approximation of elliptic problems 5. Numerical analysis 5.1. Stability of the coordinate vector extension matrix 5.2. Mass matrix condition number 5.3. Inverse inequality 5.4. Coercivity and Nitsche’s coefficient 5.5. Well-posedness of the unfitted finite element (FE) problem 5.6. Error estimates 6. Numerical experiments 6.1. Setup 6.2. Moving domain experiment 6.3. Convergence test 7. Conclusions References 1 3 5 7 9 9 10 10 11 11 13 14 14 15 16 17 19 1. Introduction Unfitted FE techniques are specially appealing when the generation of body-fitted meshes is difficult. They are helpful in a number of contexts including multi-phase and multi-physics applications with moving interfaces (e.g., fracture mechanics, fluid-structure interaction [1], or free surface flows), or in situations in which one wants to avoid the generation of body-fitted meshes to simplify as far as possible the preprocessing steps (e.g., shape or topology optimization frameworks, medical simulations based on CT-scan Date: September 27, 2017. SB gratefully acknowledges the support received from the Catalan Government through the ICREA Acadèmia Research Program. E-mails: [email protected] (SB), [email protected] (FV), [email protected] (AM). 1 AGGREGATED UNFITTED FINITE ELEMENT METHOD 2 data, or parallel large-scale simulations). In addition, the huge success of isogeometrical analysis (splinebased discretization) and the severe limitations of this approach in complex 3D geometries will probably increase the interest of unfitted methods in the near future [2]. Unfitted FE methods have been named in different ways. When designed for capturing interfaces, they are usually denoted as eXtended FE methods (XFEM) [3], whereas they are usually denoted as embedded (or immersed) boundary methods, when the motivation is to simulate a problem using a (usually simple Cartesian) background mesh (see, e.g., [4, 5, 6]). Yet useful, unfitted FE methods have known drawbacks. They pose problems to numerical integration, imposition of Dirichlet boundary conditions, and lead to ill conditioning problems. Whereas different techniques have been proposed in the literature to address the issues related with numerical integration (see, e.g., [7]) and the imposition of Dirichlet boundary conditions (see, e.g., [8]), the conditioning problems are one of the main showstoppers still today for the successful use of this type of methods in realistic large scale applications. For most of the unfitted FE techniques, the condition number of the discrete linear system does not only depend on the characteristic element size of the background mesh, but also on the characteristic size of the cut cells, which can be arbitrary small and have arbitrarily high aspect ratios. This is an important problem. At large scales, linear systems are solved with iterative Krylov subspace methods [9] in combination with scalable preconditioners. Unfortunately, the well known scalable preconditioners based on (algebraic) multigrid [10] or multi-level domain decomposition [11] are mainly designed for body-fitted meshes and cannot readily deal with cut cells. Different preconditioners for unfitted FE methods have been recently proposed, but they are mainly serial non-scalable algorithms (see, e.g., [12, 13, 14, 15]). Recently, a robust domain decomposition preconditioner able to deal with cut cells has been proposed in [16]. Even though this method has proven to be scalable in some complex 3D examples, it is based on heuristic considerations without a complete mathematical analysis and its application to second (and higher) order FEs is involved. This lack of preconditioners for unfitted FEs can be addressed with enhanced formulations that provide well-posed discrete systems independently of the size of the cut cells. Once the conditioning problems related to cut cells are addressed, the application of standard preconditioners for body-fitted meshes to the unfitted case is strongly simplified, opening the door to large-scale computations. The main goal of this work is to develop such an enhanced unfitted FE formulation that fixes the problems associated with cut cells. The goal is to achieve condition numbers that scale only with the element size of the background mesh in the same way as in standard FE methods for body-fitted meshes. Our purpose is to implement it in FEMPAR, our in-house large scale FE code [17]. Since FEMPAR is a parallel multi-physics multi-scale code that includes different continuous and discontinuous FE formulations and several element types, it is crucial for us that the novel formulation fulfills the following additional properties: 1) It should be general enough to be applied to several problem types, 2) it should deal with both continuous and discontinuous FE formulations, 3) it should deal with high order interpolations, and 4) it should be easily implemented in an existing parallel FE package. To our best knowledge, none of the existing unfitted FE formulations fulfill these requirements simultaneously. For instance, one can consider the ghost penalty formulation used in the CutFEM method [4, 18] However, it leads to a weakly non-consistent algorithm, and it requires to compute high order derivatives on faces for high order FEs, which are not at our disposal in general FE codes and are expensive to compute, certainly complicating the implementation of the methods and harming code performance. Alternatively, for finite volume and discontinuous Galerkin (DG) formulations, one can consider the so-called cell aggregation (or agglomeration) techniques [19, 20]. E.g., for DG formulations, the idea is simple: cells with the small cut cell problem, i.e., the ratio between the volume of the cell inside the physical domain and the total cell volume is close to zero, are merged with neighbor full cells forming aggregates. A new polynomial space is defined in each aggregate that replaces the local FE spaces of all cells merged in it. This process fixes the conditioning problems, since the support of the newly defined shape functions is at least the volume of a full cell. Even though this idea is simple and general enough to deal with different problem types and high order interpolations, the resulting discrete spaces are such that the enforcement of continuity through appropriate local-to-global degrees of freedom (DOFs) numbering, as in standard FE codes (see, e.g., [17]), is not possible, limiting their usage to discontinuous Galerkin or finite volume formulations. Up to our best knowledge, there is no variant of cell agglomeration currently proposed AGGREGATED UNFITTED FINITE ELEMENT METHOD 3 in the literature producing conforming FE spaces, which could be used for classical continuous Galerkin formulations. It is the purpose of this work. In this article, we present an alternative cell aggregation technique that can be used for both continuous and discontinuous formulations, the aggregated unfitted FE method. We start with the usual (conforming) Lagrangian FE space that includes cut cells, which is known to lead to conditioning problems. The main idea is to eliminate from this space all the potentially problematic DOFs by introducing a set of judiciously defined constraints. These constraints are introduced using information provided by the cell aggregates, without altering the conformity of the original FE space. Alternatively, the method can be understood as an extension operator from the interior (well-posed ) FE space that only involves interior cells to a larger FE space that includes cut cells and covers the whole physical domain. Discontinuous spaces can also be generated as a particular case of this procedure, which makes the method compatible also with DG formulations. In contrast to previous works, we also include a detailed mathematical analysis of the method, in terms of well-posedness, condition number estimates, and a priori error estimates. For elliptic problems, we mathematically prove that 1) the method leads to condition numbers that are independent from small cut cells, 2) the condition numbers scale with the size of the background mesh as in the standard FE method, 3) the penalty parameter of Nitsche’s method required for stability purposes is bounded above, and 4) the optimal FE convergence order is recovered. These theoretical results are confirmed with 2D and 3D numerical experiments using the Poisson equation as a model problem. The outline of the article is as follows. In Section 2, we introduce our embedded boundary setup and the strategy to build the cell aggregates. In Section 3, we describe the construction of the novel FE spaces based on the cell aggregates. In Section 4, we introduce our elliptic model problem. The numerical analysis of the method is carried out in Section 5. Finally, we present a complete set of numerical experiments in Section 6 and draw some conclusions in Section 7. 2. Embedded boundary setup and cell aggregation Let Ω ⊂ Rd be an open bounded polygonal domain, with d ∈ {2, 3} the number of spatial dimensions. For the sake of simplicity and without loss of generality, we consider in the numerical experiments below . that the domain boundary is defined as the zero level-set of a given scalar function ψ ls , namely ∂Ω = {x ∈ Rd : ψ ls (x) = 0}.1 We note that the problem geometry could be described using 3D CAD data instead of level-set functions, by providing techniques to compute the intersection between cell edges and surfaces (see, e.g., [21]). In any case, the way the geometry is handled does not affect the following exposition. Like in any other embedded boundary method, we build the computational mesh by introducing an artificial domain Ωart such that it has a simple geometry that is easy to mesh using Cartesian grids and it includes the physical domain Ω ⊂ Ωart (see Fig. 1a). internal cells cut cells external cells (a) (b) Figure 1. Embedded boundary setup. Let us construct a partition of Ωart into cells, represented by Thart , with characteristic cell size h. We are interested in Thart being a Cartesian mesh into hexahedra for d = 3 or quadrilaterals for d = 2, even 1Analogous assumption have to be made for body-fitted methods. AGGREGATED UNFITTED FINITE ELEMENT METHOD 4 though unstructured n-simplex background meshes can also be considered. Cells in Thart can be classified as follows: a cell K ∈ Thart such that K ⊂ Ω is an internal cell ; if K ∩ Ω = ∅, K is an external cell ; otherwise, K is a cut cell (see Fig. 1b). The set of interior (resp., external and cut) cells is represented with Thin and its union Ωin ⊂ Ω (resp., (Thext , Ωext ) and (Thcut , Ωcut )). Furthermore, we define the set of active cells as . Thact = Thin ∪ Thcut and its union Ωact . In the numerical analysis, we assume that the background mesh is quasi-uniform (see, e.g., [22, p.107]) to reduce technicalities, and define a characteristic mesh size h. The maximum element size is denoted with hmax . We can also consider non-overlapping cell aggregates AK composed of cut cells and one interior cell K such that the aggregate is connected, using, e.g., the strategy described in Algorithm 2.1. It leads to another partition Thagg defined by the aggregations of cells in Thact ; interior cells that do not belong to any aggregate remain the same. By construction of Algorithm 2.1, there is only one interior cell per aggregate, denoted as the root cell of the aggregate, and every cut cell belongs to one and only one aggregate. For a cut cell, we define its root cell as the root of the only aggregate that contains the cut cell. The root of an interior cell is the cell itself. Thus, there is a one-to-one mapping between aggregates (including interior cells) AK ∈ Thagg and the root cut cell K ∈ Thin . As a result, we can use the same index for the aggregate and the root cell. We build the aggregates in Thagg with Algorithm 2.1. In any case, other aggregation algorithms could be considered, e.g., touching in the first step of the algorithm not only the interior cells, but also cut cells without the small cut cell problem. It can be implemented by defining the quantity . ηK = |K∩Ω| |K| and touch in the first step not only the interior cells but also any cut cell with ηK > η0 > 0 for a fixed value η0 . Algorithm 2.1 (Cell aggregation scheme). (1) Mark all interior cells as touched and all cut cells as untouched. (2) For each untouched cell, if there is at least one touched cell connected to it through a facet F such that F ∩ Ω 6= ∅, we aggregate the cell to the touched cell belonging to the aggregate containing the closest interior cell. If more than one touched cell fulfills this requirement, we choose one arbitrarily, e.g., the one with smaller global id. (3) Mark as touched all the cells aggregated in 2. (4) Repeat 2. and 3. until all cells are aggregated. touched (a) Step 1 untouched (b) Step 2 Aggregates’ boundary (c) Step 3 ∂Ω (d) Step 4 Figure 2. Illustration of the cell aggregation scheme defined in Algorithm 2.1. Fig. 2 shows an illustration of each step in Algorithm 2. The black thin lines represent the boundaries of the aggregates. Note that from step 1 to step 2, some of the lines between adjacent cells are removed, meaning that the two adjacent cells have been merged in the same aggregate. The aggregation schemes can be easily applied to arbitrary spatial dimensions. As an illustrative example, Fig. 3 shows some of the aggregates obtained for a complex 3D domain. In the forthcoming sections, we need an upper bound of the size of the aggregates generated with Algorithm 2.1. To this end, let us consider the next lemma. AGGREGATED UNFITTED FINITE ELEMENT METHOD 5 Figure 3. 3D aggregates. Lemma 2.2. Assume that from any cut cell K0 ∈ Thact there is a cell path {K0 , K1 , . . . , Kn } that satisfies: 1) two consecutive cells share a facet F such that F ∩ Ω 6= ∅; 2) Kn is an interior cell; 3) n ≤ γmax , where γmax is a fixed integer. Then, the maximum aggregate size is at most (2γmax + 1)hmax . Proof. By construction, an aggregate can grow at most at a rate of one layer of elements per each iteration. Thus, after n iterations the aggregate size will be at most (2n + 1)hmax considering that the aggregate can potentially grow in all spatial directions. It is obvious to see that the aggregation scheme finishes at most after γmax iterations. Thus, the aggregate size will be less or equal than (2γmax + 1)hmax .  From Lemma 2.2, it follows that the aggregate size will be bounded if so is the value of γmax . In what follows, we assume that γmax is fixed, e.g., eliminating any cut cell that would violate property 3) in Lemma 2.2. One shall assume that each cut cell shares at least one corner with an interior cell (this is usually true if the grid is fine enough to capture the geometry). In this situation, we can easily see that γmax = 2 for 2D and γmax = 3 for 3D. Then, by Lemma 2.2, the aggregate size is at most 5hmax in 2D and 7hmax in 3D. Even though it is not used in the proof of Lemma 2.2, the fact that we aggregate cut cells to the touched cells belonging to the aggregate containing the closest interior cell (see step 2 in Algorithm 2.1) contributes to further reduce the aggregate size. Indeed, the actual size of the aggregates generated in the numerical examples (cf. Section 6) is much lower than the predicted by these theoretical bounds. In 2D, the aggregate size tends to 2hmax as the mesh is refined, whereas it tends to 3hmax in the 3D case. This shows that the aggregation scheme produces relative small aggregates in the numerical experiments. 3. Aggregated unfitted Lagrangian finite element spaces Our goal is to define a FE space using the cell aggregates introduced above. To this end, we need to . introduce some notation. In the case of n-simplex meshes, we define the local FE space V (K) = Pq (K), i.e., the space of polynomials of order less or equal to q in the variables x1 , . . . , xd . For n-cube meshes, . V (K) = Qq (K), i.e., the space of polynomials that are of degree less or equal to k with respect to each variable x1 , . . . , xd . In this work, we consider that the polynomial order q is the same for all the cells in the mesh. We restrict ourselves to Lagrangian FE methods. Thus, the basis for V (K) is the Lagrangian basis (of order q) on K. We denote by N (K) the set of Lagrangian nodes of order q of cell K. There is a one-to-one mapping between nodes a ∈ N (K) and shape functions φa (x); it holds φa (xb ) = δab , where xb are the space coordinates of node b. We assume that there is a local-to-global DOF map such that the resulting global system is C 0 continuous. This process can be elaborated for hp-adaptivity as well, but it is not the purpose of this work. With this notation, we can introduce the active FE space associated with the active portion of the background mesh . Vhact = {v ∈ C 0 (Ωact ) : v|K ∈ V (K), for any K ∈ Thact }. We could analogously define the interior FE space . Vhin = {v ∈ C 0 (Ωin ) : v|K ∈ V (K), for any K ∈ Thin }. AGGREGATED UNFITTED FINITE ELEMENT METHOD 6 The active FE space Vhact (see Fig. 4c) is the functional space typically used in unfitted FE methods (see, e.g., [16, 15, 6]). It is well known that Vhact leads to arbitrary ill conditioned systems when integrating the FE weak form on the physical domain Ω only (if no extra technique is used to remedy it). It is obvious that the interior FE space Vhin (see Fig. 4a) is not affected by this problem, but it is not usable since it is not defined on the complete physical domain Ω. Instead, we propose an alternative space Vhagg that is defined on Ω but does not present the problems related to Vhact . We can define the set of nodes of Vhin and . Vhact as Nhin and Nhact , respectively (see Fig. 4). We define the set of outer nodes as Nhout = Nhact \ Nhin (marked with red crosses in Fig. 4b). The outer nodes are the ones that can lead to conditioning problems due to the small cut cell problem (see (9)). The space Vhagg is defined taking as starting point Vhact , and adding judiciously defined constraints for the nodes in Nhout . ◦ nodes in Nhin • nodes in Nhact × nodes in Nhout (a) Vhin (b) Vhagg (c) Vhact Figure 4. Finite Element spaces. In order to define Vhagg we observe that, in nodal Lagrangian FE spaces, there is a one-to-one map between DOFs and nodes (points) of the FE mesh (for vector spaces, the same is true for every component of the vector field). On the other hand, we can define the owner vertex, edge, or face (VEF) of a node as the lowest-dimensional VEF that contains the node. Furthermore, we can construct a map that for every VEF F such that F 6⊂ Ω, gives a cell owner among all the cells that contain it. This map can be arbitrarily built. E.g., we can consider as cell owner the one in the smallest aggregate. As a result, we have a map between DOFs and (active) cells. Every active cell belongs to an aggregate, which has its own root (interior) cell. So, we also have a map between DOFs and interior cells. This map between b ∈ Nhout and the corresponding interior cell is represented with K(b) (see Fig. 5). × aggregate node in Nhout node to cell map Figure 5. Map from outer nodes to interior cells. The space of global shape functions of Vhin and Vhact can be represented as {φb : b ∈ Nhin } and : b ∈ Nhact }, respectively. Functions in these FE spaces are uniquely represented by their nodal in values. We represent the nodal values of uh ∈ Vhin as uin ∈ R|Nh | , whereas the nodal values of uh ∈ Vhact act as uact ∈ R|Nh | . Considering, without loss of generality, that the interior nodal values are labeled the out same way for both FE spaces, we have that uact = [uin , uout ]T , where uout ∈ R|Nh | . {φb AGGREGATED UNFITTED FINITE ELEMENT METHOD 7 Now, we consider the following extension operator. Given uh ∈ Vhin and the corresponding nodal values we compute the outer nodal values as follows: X φa (xb )uin a , for b ∈ Nhout . uout b = (1) uin , a∈N (K(b)) That is, the value at an outer node b ∈ Nhout is computed by extrapolating the nodal values of the interior cell K(b) associated with it. In compact form, we can write it as uout = Cuin , where C is the global in act matrix of constraints. We define the global extension matrix E : R|Vh | → R|Vh | as Euin = [uin , Cuin ]T . Let us also define the extension operator E : Vhin → Vhact , such that, given uh ∈ Vhin represented by its nodal values uin , provides the FE function E(uh ) ∈ Vhact with nodal values Euin . We define the range of . this operator as Vhagg = range(E(Vhin )) ⊂ Vhact . This FE space is called the aggregated FE space since the map K(·) between outer nodes and interior cells is defined using the aggregates in Thagg . The motivation behind the construction of such space is to have a FE space covering Ωact (and thus Ω) with optimal approximability properties and without the ill-conditioning problems of Vhact . As one can observe, the new space is defined only by interior nodal values, whereas the conflictive outer nodes are eliminated via the constraints in (1). These constraints are cell-wise local. Thus, they can be readily applied at the assembly level in the cell loop, making its implementation very simple, even for nonadaptive codes that cannot deal with non-conforming meshes. We consider as basis for Vhagg the extension of the shape functions of Vhin , i.e., {E(φa )}a∈N in . The fact that it is a basis for Vhagg is straightforward, h due to the fact that the extension operator is linear. The extension of a shape function is easily computed as follows: X E(φa ) = φa + Cba φb , for a ∈ Nhin , b∈C(a) where C(a) represents the set of outer nodes in Nhout that are constrained by a. Remark 3.1. We note that one could consider an alternative aggregated space, Vhagg,∗ = {v ∈ C 0 (Ω) : v|A ∈ V (A), for any A ∈ Thagg }, where V (A) denotes the space of q order Lagrangian polynomials on n-simplices or n-cubes. It is obvious to check that in fact Vhagg,∗ ⊂ Vhagg , but it is not possible to implement the inter-element continuity for this space using standard FE techniques. On the other hand, the FE space Vhagg has the same size as the interior problem and the implementation in existing FE codes requires minimal modifications. Furthermore, it is also easy to check that the two approaches coincide for DG formulations, where all DOFs belong to the cells. In fact, a DG method with Vhagg,∗ has been proposed in [20]. 4. Approximation of elliptic problems For the sake of simplicity, we consider the Poisson equation with constant physical diffusion as a model problem, even though the proposed ideas apply to any elliptic problem with H 1 -stability, e.g., the linear elasticity problem and heterogeneous problems. The Poisson equation with Dirichlet and Neumann boundary conditions reads as (after scaling with the diffusion term): find u ∈ H 1 (Ω) such that − ∆u = f in Ω, u = gD on ΓD , ∇u · n = g N on ΓN , (2) where (ΓD , ΓN ) is a partition of the domain boundary (the Dirichlet and Neumann boundaries, respectively), f ∈ H −1 (Ω), g D ∈ H 1/2 (ΓD ), and g N ∈ H −1/2 (ΓN ). For the space discretization, we consider H 1 -conforming FE spaces on the conforming mesh Thact that are not necessary aligned with the the physical boundary ∂Ω. For simplicity, we assume that, for any cut cell K ∈ Thact , either K ∩ Γ ⊂ ΓD or K ∩ Γ ⊂ ΓN . We consider both the usual FE space Vhact as well as the new aggregated space Vhagg in order to compare their properties. We will simply use Vh when it is not necessary to distinguish between Vhact and Vhagg . For unfitted grids, it is not clear to include Dirichlet conditions in the approximation space in a strong manner. Thus, we consider Nitsche’s method [23, 24] to impose Dirichlet boundary conditions weakly on AGGREGATED UNFITTED FINITE ELEMENT METHOD 8 ΓD . It provides a consistent numerical scheme with optimal converge rates (also for high-order elements) that is commonly used in the embedded boundary community [6]. We define the FE-wise operators: Z Z . (τK uv − v (n · ∇u) − u (n · ∇v)) dS, ∇u · ∇v dV + AK (u, v) = ΓD ∩K K∩Ω Z  . `K (v) = τK vg D − (n · ∇v) g D dS, ΓD ∩K defined for a generic cell K ∈ Thact . Vector n denotes the outwards normal to ∂Ω. The bilinear form AK (·, ·) includes the usual form resulting from the integration by parts of (2) and the additional term associated with the weak imposition of Dirichlet boundary conditions with Nitsche’s method. The righthand side operator `K (·) includes additional terms related to Nitsche’s method. The coefficient τK > 0 is a mesh-dependent parameter that has to be large enough to ensure the coercivity of AK (·, ·). The global FE operator A : Vh → Vh 0 and right-hand side term ` ∈ Vh 0 are stated as the sum of the element contributions, i.e., . X . X A(u, v) = AK (u, v), `(v) = `K (v), for u, v ∈ Vh . (3) K∈Thact K∈Thact We will make abuse of notation, using the same symbol for a bilinear form, e.g., A : Vh → Vh 0 , . and its corresponding linear operator, i.e., hAu, vi = A(u, v). Furthermore, we define b : Vh 0 → Vh as . b(v) = f (v) + g N (v) + `(v), for v ∈ Vh . With this, the global problem can be stated as: find uh ∈ Vhagg such that (4) A(uh , vh ) = b(vh ), for any vh ∈ Vhagg . By definition, this problem can analogously be stated as: find uh ∈ Vhin such that A(E(uh ), E(vh )) = b(E(vh )) for any vh ∈ Vhagg . After the definition of the FE basis (of shape functions) that spans Vhagg , or alternatively the extension operator E(·), the previous problem leads to a linear system to be solved. A sufficient (even though not necessary) condition for A to be coercive is to enforce the element-wise constant coefficient τK to satisfy BK (v, v) . τK ≥ CK = sup , (5) v∈V (K) DK (v, v) for all the mesh elements K ∈ Thact intersecting the boundary ΓD . In the previous formula, DK (·, ·) and BK (·, ·) are the forms defined as Z Z . . DK (u, v) = ∇u · ∇v dV, and BK (u, v) = (n · ∇u) (n · ∇v) dS. K∩Ω ΓD ∩K Since Vh is finite dimensional, and DK (·, ·) and BK (·, ·) are symmetric and bilinear forms, the value CK . (i.e., the minimum admissible coefficient τK ) can be computed numerically as CK = λ̃max , being λ̃max the largest eigenvalue of the generalized eigenvalue problem (see [15] for details): find uK ∈ Vh |K and λ̃ ∈ R such that BK (uK , vK ) = λ̃DK (uK , vK ) for all vK ∈ Vh |K . (6) For standard FEs for body-fitted meshes, it is enough to compute coefficient τK as τK = β/h to satisfy condition (5), where β is a sufficiently large (mesh independent) positive constant (see, e.g., [25]). However, for standard unfitted FE methods using the usual space Vhact without any additional stabilization, coefficient τK cannot be computed a priori; in fact, the minimum cell-wise value that assures coercivity is not bounded above. In this case, a value for τK ensuring coercivity has to be computed for each particular setup using the cell-wise eigenvalue problem (6). The introduction of the new space Vhagg solves this problem and τK is bounded again in terms of the element size as expected in the body-fitted case (see Section 5.4 for more details). In this case, we have taken τK = 100/hK in the numerical experiments below. The linear system matrix that arises from (4) can be defined as . Aab = A(E(φa ), E(φb )), for a, b ∈ Nhin . (7) AGGREGATED UNFITTED FINITE ELEMENT METHOD The mass matrix related to the aggregated FE space Vhagg is analogously defined as Z . Mab = E(φa )E(φb ), for a, b ∈ Nhin . 9 (8) Ω It is well known that the usual FE space Vhact is associated with conditioning problems due to cut cells. The condition number of the discrete system without the aggregation, i.e., considering Vhact instead of Vhagg in (4), scales as −(2q+1−2/d) κ(A) ∼ min ηK , (9) K∈Thact where κ(A) is the 2-norm condition number of A (see [15] for details). Thus, arbitrarily high condition numbers are expected in practice since the position of the interface cannot be controlled and the value ηK can be arbitrarily close to zero. This problem is solved if the new aggregated space Vhagg is used instead of Vhact (cf. Corollary 5.9). 5. Numerical analysis In this section, we analyze the well-posedness of the agregated unfitted FE method (4), the condition number of the arising linear system, and a priori error estimates. As commented above, we assume that the background mesh is quasi-uniform. Therefore, the number of neighboring cells of a given cell is bounded above by a constant ncell independently of h. In a mesh refinement analysis, we also assume that the coarser mesh level-set function already represents the domain boundary. In the following analysis, all constants being used are independent of h and the location of the cuts in cells, i.e., ηK . They may also depend on the threshold η0 in the aggregation algorithm if considered; we have considered η0 = 1 for simplicity. The constants can depend on the shape/size of Ω and ΓD , the order of the FE space, and the maximum aggregation distance γmax , which are assumed to be fixed in this work. In turn, due to Lemma 2.2, the maximum size of an aggregate is bounded by a constant times h. As a result, the following results are robust with respect to the so-called small cut cell problem. When we have that A ≤ cB for a positive constant c, we may use the notation A . B; analogously for &. For the analysis below, we need to introduce some extra notation. Given a function uh ∈ Vhin (or Vhact ), the nodal vector u will be used without any superscript, as soon as it is clear from the context. For a given cell K, the cell-wise coordinate vector is represented with uK . On the other hand, given a FE function uh ∈ Vhin , for every interior cell K ∈ Thin , let us define define the cell-wise extension operator EAK u = [uK , CÂK uK ], where CÂK is the cell-wise constraint matrix, whose entries can be computed in P the reference space (see (1)), such that Cu · Cu = K∈T in CÂK uK · CÂK uK . We denote with k · k2 the h Euclidean norm of a vector and the induced matrix norm. Standard notation is used to define Sobolev spaces (see, e.g., [26]). Given a Sobolev space X, its corresponding norm is represented with k · kX . 5.1. Stability of the coordinate vector extension matrix. We start the analysis of the scheme by proving bounds for the norm of the global and cell-wise coordinate vector extension matrix. Therefore, their norms can be bounded independently of the cut location and the size of the aggregate. Lemma 5.1. The cell-wise and global coordinate vector extension matrices hold the following bounds: 1 ≤ kEAK k22 ≤ 1 + kCÂK k22 , for every AK ∈ Thagg , and 1 ≤ kEk22 ≤ 1 + kCk22 ≤ Ce , for a positive constant Ce . Proof. Using the definition of the extension operator in Section 3, we have that kEuk22 = kuk22 + kCuk22 . We proceed analogously for the cell-wise result, to get kEAK uk22 = kuk22 + kCÂK uk22 . It proves the first result. On the other hand, we have, X X kCuk22 = kCÂK uK k22 ≤ kCÂK k22 kuK k22 ≤ ncell sup kCÂK k22 kuk22 , AK ∈Thagg AK ∈Thagg AK ∈Thagg where we have used the fact that the constraint matrix is aggregate-wise and that the maximum number of cell neighbors of a vertex/edge/face is bounded above by a constant ncell . The value supAK ∈T agg kCÂK k22 h (or an upper bound) can explicitly be computed prior to the numerical integration and its entries are independent of the aggregate cut and the geometrical mapping, i.e., h. In fact, given a polynomial order AGGREGATED UNFITTED FINITE ELEMENT METHOD 10 and γmax , one can precompute the maximum value of kCÂK k22 among all possible aggregate configurations and explicitly obtain an upper bound Ce of the global extension matrix norm. It proves the lemma.  5.2. Mass matrix condition number. In order to provide a bound for the condition number of the mass matrix, we rely on the maximum and minimum eigenvalues of the local mass matrix in the reference cell K̂: λ− kuK k22 ≤ kuh k2L2 (K̂) ≤ λ+ kuK k22 , for uh ∈ V (K). The values of λ− and λ+ only depend on the order of the FE space and can be computed for different orders on n-cubes or n-simplices (see [27]). Using typical scaling arguments, one has the following bound for the local mass matrix of the physical cell: λ− hdK kuK k22 ≤ kuh k2L2 (K) ≤ λ+ hdK kuK k22 . (10) In the next lemma, we prove the equivalence between the L2 (Ωact ) norm and the interior DOF Euclidean norm, for functions in Vhagg . Lemma 5.2. The following bounds hold: hd kuk22 . kE(uh )k2L2 (Ωact ) . hd kuk22 , for any uh ∈ Vhin . (11) Proof. By definition, every function in Vhagg can be expressed as E(uh ) for some uh ∈ Vhin . Using (10), the fact that Ωin ⊂ Ω, and the quasi-uniformity of the background mesh, we obtain the lower bound in (11) as follows: X X kE(uh )k2L2 (Ωact ) ≥ kuh k2L2 (Ωin ) = kuh k2L2 (K) ≥ hdK λ− kuK k22 & hd kuk22 . K∈Thin K∈Thin On the other hand, using Ω ⊂ Ωact , Lemma 5.1, (10), and the fact that the number of surrounding cells of a node is bounded above by a positive constant, we get: X X kE(uh )k2L2 (Ωact ) = kE(uh )k2L2 (K) ≤ hdK λ+ kuK k22 . hd kEuk22 . hd kuk22 . K∈Thact K∈Thact  It proves the lemma. The upper and lower bounds in (11) lead to the continuity of the extension operator and a bound for the condition number of the mass matrix of the aggregated FE space. Corollary 5.3 (Continuity of the extension operator). The extension operator satisfies the following bound: kE(uh )k2L2 (Ωact ) . kuh k2L2 (Ωin ) , for any uh ∈ Vhin . Corollary 5.4 (Mass matrix condition number). The mass matrix M in (8), related to the aggregated FE space Vhagg , is bounded by κ(M) ≤ C, for a positive constant C. 5.3. Inverse inequality. In order to prove the condition number bound for the system matrix arising from (4), we need to prove first an extended inverse inequality. We rely on the fact that an inverse inequality holds for the FE space Vhact , i.e., k∇uh kL2 (Ωact ) . h−1 kuh kL2 (Ωact ) , for any uh ∈ Vhact . (12) This standard result for conforming meshes can be found, e.g., in [22, p. 111]. Lemma 5.5 (Inverse inequality). The following inverse inequality holds: k∇E(uh )kL2 (Ωact ) . h−1 kuh kL2 (Ωin ) , for any uh ∈ Vhin . Proof. Using the fact that Ωin ⊆ Ω ⊆ Ωact , E(uh ) ∈ Vhact , the standard inverse inequality (12), and the stability of the extension operator in Lemma 5.3, we get: k∇E(uh )kL2 (Ωact ) . h−1 kE(uh )kL2 (Ωact ) . h−1 kuh kL2 (Ωin ) . It proves the lemma.  AGGREGATED UNFITTED FINITE ELEMENT METHOD 11 5.4. Coercivity and Nitsche’s coefficient. In this section, we consider a trace inequality that is needed to prove the coercivity of the bilinear form in (3). Given a cell K ∈ Thact , let us consider the set of constraining interior cells K1 , . . . , KmK , mK ≥ 1, i.e., the interior S cells that constraint at least one DOF . . K of the cut cell. Let us also define Kcut = K ∩ Ω and ΩK = Kcut ∪ m i=1 Ki ⊂ Ω. Lemma 5.6. For any uh ∈ Vhagg and K ∈ Thact , the following bound holds −1 kn · ∇uh kL2 (ΓD ∩K) ≤ C∂ hK 2 k∇uh kL2 (ΩK ) , for a positive constant C∂ . Proof. For interior cells, the left-hand side is zero and the bound trivially holds. Let us consider a cut cell . K. Let us also consider a FE function uh ∈ Vhagg and its gradient ξ h = ∇uh . Assuming that all the cells have the same order, we have that ξ h belongs to the discontinuous Lagrangian FE space of order q − 1, and we represent the corresponding coordinate vector with ξ K . First, we use the equivalence of norms in finite dimension and a scaling argument to get: kξ h k2L2 (ΓD ∩K) . |ΓD ∩ K|kξ h k2L∞ (K) , where the constant can only depend on the FE space order. Analogously, we have kξ h k2L∞ (K̂) . kξ K k22 . Following the same ideas as above, ξ can be expressed as an extension of the corresponding nodal values of the q − 1 order FE spaces on top of the interior cells Ki , represented with ξ K ; we represent this extension i with the matrix DK , i.e., ξ K = DK [ξ 1 , . . . , ξ m ]T . Using an analogous reasoning as above for matrix C, P K 2 the norm of this matrix cannot depend on the cut or h. Thus, we have that kξ K k22 . m i=1 kξ Ki k2 . On the other hand, using again the equivalence of norms in finite dimension, we get kξ K k2 . kξ h kL2 (K̂i ) . As a i result, using typical scaling arguments, and using the fact that |K| . |Ki | . |K| for constants independent of mesh size or order, we get: mK X 2 −1 kξ h kL∞ (K) . |K| kξ h k2L2 (Ki ) . i=1 Combining these results, we get: kn · ξ h k2L2 (Γ∩AK ) ≤ |Γ ∩ K||K|kξ h k2L∞ (K) . h−1 K mK X kξ h k2L2 (Ki ) , i=1 where we have used the fact that |Γ ∩ lemma. K||K|−1 . h−1 K holds for a quasi-uniform mesh. It proves the  5.5. Well-posedness of the unfitted FE problem. In this section, we prove coercivity and continuity of the bilinear form (3). First, we prove coercivity with respect to the following mesh dependent norm in Vhagg : X . 2 |||uh |||2h = k∇uh k2L2 (Ω) + βK h−1 for uh ∈ Vhagg , K kuh kL2 (ΓD ∩K) , K∈Thact which is next proved to bound the L2 (Ω) norm. Theorem 5.7. The aggregated unfitted FE problem in (4) satisfies the following bounds: i) Coercivity: A(uh , uh ) & |||uh |||2h , for any uh ∈ Vhagg , (13) ii) Continuity: A(uh , vh ) . |||uh |||h |||vh |||h , for uh , vh ∈ Vhagg , (14) if βK > C, for some positive constant C. In this case, there exists one and only one solution of (4). Proof. For cut cells, we use Z −1 2 −1 2 uh (n · ∇uh ) ≤ αK C∂ h−1 hK kn · ∇uh k2L2 (ΓD ∩K) K kuh kL2 (ΓD ∩K) + αK C∂ ΓD ∩K −1 2 2 ≤ αK C∂ h−1 K kuh kL2 (ΓD ∩K) + αK k∇uh kL2 (ΩK ) . (15) AGGREGATED UNFITTED FINITE ELEMENT METHOD 12 Using the fact that the mesh is quasi-uniform and that the number of neighboring cells and γmax is bounded, one can take a value for αK large enough (but uniform with respect to h and the cut location) such that: Z X 1 2 2 2 uh (n · ∇uh ) ≤ αK C∂ h−1 K kuh kL2 (ΓD ∩K) + k∇uh kL2 (Ω) . 2 ΓD act K∈Th As a result, we get: X 1 2 (βK − αK C∂ ) h−1 A(uh , uh ) ≥ k∇uh k2L2 (Ω) + K kuh kL2 (ΓD ∩K) . 2 act K∈Th For, e.g., βK > 2αK C∂ , A(uh , uh ) is a norm. By construction, this lower bound for βK is independent of the mesh size h and the intersection of Γ and Thact . It proves the coercivity property in (13). Thus, the bilinear form is non-singular. The continuity in (14) can readily be proved by repeated use of the CauchySchwarz inequality and inequality (15). Since the problem is finite-dimensional and the corresponding linear system matrix is non-singular, there exists one and only one solution of this problem.  Lemma 5.8. If Ω has smoothing properties, the following bound holds: for any uh ∈ Vhagg . kuh kL2 (Ω) . |||uh |||h , Proof. Let us consider uh ∈ Vhagg and let ψ ∈ H01 (Ω) solve the problem −∆ψ = uh with the boundary conditions ψ = 0 on ΓD and n·∇ψ = 0 on ΓN . Using the fact that the domain Ω has smoothing properties, it holds kψkH 2 (Ω) . kuh kL2 (Ω) . We have, after integration by parts: Z Z Z kuh kL2 (Ω) = − uh ∆ψ = ∇uh · ∇ψ − uh n · ∇ψ. (16) Ω Ω ΓD The first term in the right-hand side of (16) is easily bounded using the Cauchy-Schwarz inequality: Z ∇uh · ∇ψ ≤ k∇uh kL2 (Ω) k∇ψkL2 (Ω) . k∇uh kL2 (Ω) kuh kL2 (Ω) . Ω On the other hand, the following trace inequality holds kn · ∇ψk2L2 (ΓD ) . |ψ|2H 2 (Ω) for a constant that depends on the size of ΓD (see [26]). Using the Cauchy-Schwarz inequality and the previous trace inequality, we readily get:  1  1 2 2 Z X X −1 2 2    uh n · ∇ψ ≤  h kuh k 2 − hK kn · ∇ψk 2 K ΓD L (ΓD ∩K) L (ΓD ∩K) K∈Thact K∈Thact 1  ≤ 2 X 2  h−1 K kuh kL2 (ΓD ∩K) kn · ∇ψkL2 (ΓD ) K∈Thact 1  . 2 X 2  h−1 K kuh kL2 (ΓD ∩K) kuh kL2 (Ω) . K∈Thact Combining these bounds, we prove the lemma.  Corollary 5.9 (Stiffness matrix condition number). The condition number of the linear system matrix A in (7) is bounded by κ(A) . h−2 . Proof. To prove the corollary, we have to bound u · Au = A(E(uh ), E(uh )) above and below by kuk22 times some constant. The lower bound follows from the coercivity property in Th. 5.7, Lemma 5.8, the lower bounds in Lemmas 5.2 and 5.1, which lead to A(E(uh ), E(uh )) & kE(uh )k2L2 (Ω) & hd kuk22 . The upper bound is readily obtained from the continuity property in Lemma 5.7 and the upper bound in Lemma 5.8, i.e., u · Au = A(E(uh ), E(uh )) . |||E(uh )|||2h . Using scaling arguments and the equivalence of norms for 2 finite-dimensional spaces, we get kE(uh )k2L2 (ΓD ∩K) . hd−1 K kEuK k2 . Adding up for all cells, invoking the AGGREGATED UNFITTED FINITE ELEMENT METHOD 13 fact that the number of neighbour cells is bounded, and using the upper bound of the coordinate vector extension operator in 5.8, we obtain: X d−2 2 βK h−1 kuk22 . (17) K kE(uh )kL2 (ΓD ∩K) . h K∈Thact Using the inverse inequality in Lemma 5.5 and the upper bound in Lemma 5.2, we obtain: k∇E(uh )k2L2 (Ω) . h−2 kE(uh )k2L2 (Ω) . hd−2 kuk22 . Combining (17)-(18), we get u · Au ≤ chd−2 kuk22 . It proves the corollary. (18)  5.6. Error estimates. In this section, we get a priori error estimates for the aggregated FE scheme (4). In order to do that, we prove first approximability properties of the corresponding spaces. Lemma 5.10. Let us consider an aggregated FE space of order q, m ≤ q, 1 ≤ s ≤ m ≤ q + 1, 1 ≤ p ≤ ∞, and m > dp . Given a function u ∈ H m (Ω), it holds: inf uh ∈Vhagg ku − uh kWps (Ω) . hm−s |u|Wpm (Ω) . Proof. Under the assumptions of the lemma, we have that the following embedding Wpm (Ω) ⊂ C 0 (Ω̄) is continuous (see, e.g., [28, p. 486]). Thus, given a function u ∈ Wpm (Ω), let represent with σ(u) the vector ofP nodal values in Ωin , i.e., σ(u)a = uh (xa ) for a ∈ N (Ωin ). We define the interpolation operator . Ih (u) = a∈N (Ω) φa [Eσ(u)]a . Given a cut cell K ∈ Thact , the fact that its DOFs values only depend on interior DOFs in Ω̄K , and since m (K) ⊆ W m (K), it follows from the upper bound of the norm of the each shape function φa belongs to W∞ p nodal extension operator in Lemma 5.1 that kIh (u)kWpm (K) ≤ CkukC 0 (Ω̄K ) (see also [22, Lemma 4.4.1]). On the other hand, we consider an arbitrary function π(u) ∈ Wpm (Ω) such that π(u)|K ∈ Pq (ΩK ). We note that, by construction, π(u)|K = Ih (π(u))|K . Thus, we have: ku − Ih (u)kWpm (K) ≤ ku − π(u)kWpm (K) + kIh (π(u) − u)kWpm (K) . ku − π(u)kWpm (K) + kπ(u) − ukC 0 (Ω̄K ) . ku − π(u)kWpm (ΩK ) , where we have used in the last inequality the previous continuous embedding. Since ΩK is an open bounded domain with Lipschitz boundary by definition, one can use the Deny-Lions lemma (see, e.g., [28]). As a result, the π(u) that minimizes the right-hand side holds: ku − Ih (u)kWpm (ΩK ) . |u|Wpm (ΩK ) .  Using standard scaling arguments, we prove the lemma. Theorem 5.11. If Ω has smoothing properties and the solution u of the continuous problem (2) belongs to Wpm (Ω) for dp < m ≤ q, the solution uh ∈ Vhagg of (4) satisfies the following a priori error estimate: ku − uh kH 1 (Ω) ≤ hm−1 |u|H m (Ω) . Proof. Combining the consistency of the numerical method, i.e., A(u, vh ) = `(vh ), and the continuity and coercivity of the bilinear form in Th. 5.7, we readily get, using standard FE analysis arguments: |||wh − uh |||2h . A(wh − uh , wh − uh ) = A(wh − u, wh − uh ) . |||wh − u|||h |||wh − uh |||h , for any wh ∈ Vhagg . On the other hand, we use the trace inequality (see [29]) kψk2L2 (∂T ) . |∂T |−1 kψk2L2 (T ) + |∂T |kψk2H 1 (T ) , for any ψ ∈ H 1 (T ). Using this trace inequality, we get: −1 −2 2 2 2 2 h−1 K ku − wh kL2 (ΓD ∩K) ≤ hK ku − wh kL2 (∂ΩK ) . hK ku − wh kL2 (ΩK ) + ku − wh kH 1 (ΩK ) . Combining the previous bound with the approximability property in Lemma 5.10, we readily get |||wh − u|||h . hm−1 |u − wh |H m (Ω) . It proves the theorem.  AGGREGATED UNFITTED FINITE ELEMENT METHOD 14 6. Numerical experiments 6.1. Setup. The numerical examples below consider as a model problem the Poisson equation with nonhomogeneous Dirichlet boundary conditions. The value of the source term and the Dirichlet function are defined such that the PDE has the following manufactured exact solution:   1/2  2 2 2 , u(x, y, z) = sin 4π (x − 2.3) + y + z (x, y) ∈ Ω ⊂ R2 , z = 0 in 2D, (x, y, z) ∈ Ω ⊂ R3 in 3D. We consider two different geometries, a 2D circle and a 3D complex domain with the shape of a popcorn flake (see Fig. 6). These geometries are often used in the literature to study the performance of unfitted FE methods (see, e.g., [4], where the definition of the popcorn flake is found). In all cases, we use the cuboid [0, 1]d , d = 2, 3 as the bounding box on top of which the background Cartesian grid is created. For the sake of illustration, Fig. 6 displays both the considered geometries, numerical solution and bounding box. (a) 2D case (b) 3D case Figure 6. View of the problem geometries, numerical solution and bounding box. The main goal of the following tests is to evaluate the (positive) effect of using the aggregation-based FE space Vhagg instead of the usual one Vhact . In the next plots, the results for the usual (un-aggregated) FE space are labeled as standard, whereas the cases with the aggregation are labeled as aggregated (or aggr. in its short form). In all the examples, we use Lagrangian reference FEs with bi-linear and bi-quadratic shape functions in 2D, and tri-linear and tri-quadratic ones in 3D. Both the standard and the aggregated formulations have been implemented in the object-oriented HPC code FEMPAR [17]. The system of linear equations resulting from the problem discretization are solved within FEMPAR with a sparse direct solver from the MKL PARDISO package [30]. Condition number estimates are computed outside FEMPAR using the MATLAB function condest.2 For the standard unfitted FE space Vhact , we expect very high condition numbers that can hinder the solution of the discrete system using standard double precision arithmetic. To address this effect and avoid the breakdown of sparse direct solvers, we bound from below the minimum distance between the mesh nodes and the intersection of edges with the boundary Γ to a small numerical threshold Dmin proportional to the cell size, namely Dmin = εh, where ε is a (mesh independent) user defined tolerance. If the edge cut-node distance is below this threshold , the edge cut is collapsed with the node, perturbing the geometry. In the numerical experiments, we take ε = 10−6 and ε = 10−3 in 2D and 3D respectively. Using the fact that ηK ∼ εd , we can rewrite the condition number estimate (9) in terms of the user-defined tolerance ε as κ(A) ∼ ε−d(2q+1−2/d) . 2MATLAB is a trademark of THE MATHWORKS INC. AGGREGATED UNFITTED FINITE ELEMENT METHOD 15 For instance, we have κ(A) ∼ ε−7 and κ(A) ∼ ε−13 for first and second order interpolations, respectively, in 3D. This illustrates that the condition numbers expected for second order interpolation are extremely high as it is confirmed below unless very large values of ε are considered. However, the value of ε cannot be increased without affecting the numerical error, since it perturbs the geometry, and destroys at some point the order of convergence of the numerical method. Similar perturbation-based techniques with analogous problems have been used in the frame of the finite cell method in [8]. We note that the tolerance ε is not needed at all when using the aggregated FE space. 6.2. Moving domain experiment. In the first numerical experiment, we study the robustness of the unfitted FE formulations with respect to the relative position between the unfitted boundary and the background mesh. To this end, we consider two moving domains that can travel along one of the diagonals of the bounding box (see Fig. 7). The considered geometries are obtained by scaling down the circle and the popcorn flake depicted in Fig. 6 by a factor of 0.25. In both cases, the position of the bodies is controlled by the value of the parameter ` (i.e., the distance between the center of the body and a selected vertex of the box). As the value of ` varies, the objects move and their relative position with respect to the background mesh changes. In this process, arbitrary small cut cells can show up, leading to potential conditioning problems. In this experiment, we consider a background mesh with element size h = 2−5 . (a) 2D case (b) 3D case Figure 7. Setup of the moving domain experiment. Fig. 8 shows the condition number estimate of the underlying linear systems varying the position of the physical domain Ω. The plot is generated using a sample of 200 different values of `. It is observed that the condition numbers are very sensitive to the position of the domain for the standard unfitted FE formulation, whereas the condition numbers are nearly independent of the position when using the aggregation-based FE spaces. Note that the standard formulation leads to very high condition numbers specially for second order interpolations and the 3D case. Moving from 1st order to 2nd order leads to a rise in the condition number between 10 and 15 orders of magnitude. The same disastrous effect is observed when moving from 2D to 3D. In contrast, the condition number is nearly insensitive to the number of space dimensions, and mildly depends on the interpolation order (as for body-fitted methods) when using aggregation-based FE spaces. From the results shown in Fig. 8, it is clear that the aggregation-based FE spaces are able to dramatically improve the condition numbers associated with the standard unfitted FE formulation. The next question is how cell aggregation impacts on the accuracy of the numerical solution. In order to quantify this effect, Fig. 9 shows the computed energy norm of the discretization error. It is observed that the error is slightly increased when using the aggregation-based FE spaces. This is because the considered meshes in this moving domain experiment are rather coarse. The error increments become negligible for finer meshes AGGREGATED UNFITTED FINITE ELEMENT METHOD p=1, standard p=2, standard p=1, aggr. p=2, aggr. log10(condest(A)) 25 20 15 10 30 p=1, standard p=2, standard p=1, aggr. p=2, aggr. 25 log10(condest(A)) 30 16 5 20 15 10 5 0 0 0.3 0.4 0.5 0.6 0.7 0.3 0.4 0.5 ℓ 0.6 0.7 ℓ (a) 2D case (b) 3D case Figure 8. Condition number vs. domain position. (see Section 6.3 below). In this example, we cannot compute a solution for all the values of ` for 3D and 2nd order interpolation without using cell aggregation (see the discontinuous fine red curve in Fig. 9b). The condition numbers are so high (order 1030 ) that the system is intractable, even with a sparse direct solver, using standard double precision floating point arithmetic. 1 1 log10(Error energy norm) 0.5 0 -0.5 -1 -1.5 -2 -2.5 -3 0.3 0.4 0.5 0.6 0.7 p=1, standard p=2, standard p=1, aggr. p=2, aggr. 0.5 log10(Error energy norm) p=1, standard p=2, standard p=1, aggr. p=2, aggr. 0 -0.5 -1 -1.5 -2 -2.5 -3 0.3 0.4 0.5 ℓ (a) 2D case 0.6 0.7 ℓ (b) 3D case Figure 9. Error energy norm vs. domain position. 6.3. Convergence test. The second experiment is devoted to study the asymptotic behavior of the methods as the mesh is refined. To this end, we consider the geometries and bounding boxes displayed in Fig. 6, which are discretized with uniform Cartesian meshes with element sizes h = 2−m , m = 3, 4, . . . , 9 in 2D, and m = 3, 4, 5, 6 in 3D. First, we study how the size of the aggregates scales when the mesh is refined. Fig. 10 shows that the aggregate size is 2h in 2D, whereas it tends to 3h in the 3D case. These results agrees with the theoretical bounds for the aggregate size discussed in Section 2. Then, we study the scaling of the condition numbers with respect to the mesh size (see Fig. 11). For the aggregation-based FE spaces, the condition numbers of the stiffness matrix scales as h−2 , like in standard FE methods for body fitted meshes. This confirms the theoretical result of Corollary 5.9. Conversely, the condition number has an erratic behavior if cell aggregation is not considered. The reason is that, as shown in the previous experiment (cf. Section 6.2), the standard unfitted FE formulation leads to condition numbers very sensitive to the position of the unfitted boundary. Several configurations of cut cells can show up when the mesh is refined, leading to very different condition numbers. As in the previous experiment, the condition number is very sensitive to the interpolation order and number of space dimensions for the standard unfitted FE formulations. This effect is reverted when using cell aggregates. AGGREGATED UNFITTED FINITE ELEMENT METHOD 17 8 H/h 6 4 2D 3D Bound in 2D Bound in 3D 2 0 -3.5 -3 -2.5 -2 -1.5 -1 log10(h) Figure 10. Scaling of the ratio maximum aggregate size (H) / element size (h). 40 40 p=1, standard p=2, standard p=1, aggr. p=2, aggr. slope -2 35 30 30 25 25 log10(condest(A)) log10(condest(A)) 35 20 15 20 15 10 10 5 5 0 p=1, standard p=2, standard p=1, aggr. p=2, aggr. slope -2 0 -2.5 -2 -1.5 -1 log10(h) -2.5 -2 -1.5 -1 log10(h) (a) 2D case (b) 3D case Figure 11. Scaling of the condition number upon mesh refinement. Finally, we study the convergence of the discretization error. To this end, Figs. 12 and 13 report the discretization errors measured both in the energy norm and in the L2 norm. Like in the previous experiment (cf. Section 6.2), the discrete system could not be solved when using the finest meshes in 3D for 2nd order interpolation without using cell-aggregation due to extremely large condition numbers (see the incomplete curve in Fig. 12b). The results show that the error increment associated with the aggregation-based FE space becomes negligible when the mesh is refined. Moreover, the theoretical results of Section 5.6 are confirmed: optimal order of convergence is (asymptotically) achieved in all cases when using aggregationbased FE spaces both for the energy and the L2 norm, for 1st and 2nd order interpolations, and for 2 and 3 spatial dimensions. 7. Conclusions We have proposed a novel technique to construct FE spaces designed to improve the conditioning problems associated with unfitted FE methods. The spaces are defined using cell aggregates obtained by merging the cut cells to interior cells. In contrast to related methods in the literature, the proposed technique is easy to implement in existing FE codes (it only involves cell-wise constraints) and it is general enough to deal with both continuous and DG formulations. Another novelty with respect to previous works is that we include the mathematical analysis of the method. For elliptic problems, we have proved that 1) the novel FE space leads to condition numbers that are independent from small cut cells, 2) the condition 1 1 0 0 -1 -1 -2 -2 log10(Error energy norm) log10(Error energy norm) AGGREGATED UNFITTED FINITE ELEMENT METHOD -3 -4 -5 -6 -3 -4 -5 -6 p=1, standard p=2, standard p=1, aggr. p=2, aggr. slope 1 slope 2 -7 18 p=1, standard p=2, standard p=1, aggr. p=2, aggr. slope 1 slope 2 -7 -8 -8 -2.5 -2 -1.5 -1 -2.5 log10(h) -2 -1.5 -1 log10(h) (a) 2D case (b) 3D case 1 1 0 0 -1 -1 -2 -2 log10(Error L2 norm) log10(Error L2 norm) Figure 12. Convergence of the discretization error in energy norm. -3 -4 -5 -6 p=1, standard p=2, standard p=1, aggr. p=2, aggr. slope 2 slope 3 -7 -8 -3 -4 -5 -6 p=1, standard p=2, standard p=1, aggr. p=2, aggr. slope 2 slope 3 -7 -8 -2.5 -2 -1.5 log10(h) (a) 2D case -1 -2.5 -2 -1.5 -1 log10(h) (b) 3D case Figure 13. Convergence of the discretization error in L2 norm. number of the resulting system matrix scales with the inverse of the square of the size of the background mesh as in standard FE methods, 3) the penalty parameter of Nitsche’s method is bounded from above, and 4) the optimal FE convergence order is recovered. These theoretical results are confirmed with 2D and 3D numerical experiments using both first and second order interpolations. AGGREGATED UNFITTED FINITE ELEMENT METHOD 19 References [1] S. Badia, F. Nobile, and C. Vergara. Fluid–structure partitioned procedures based on Robin transmission conditions. Journal of Computational Physics, 227(14):7027–7051, 2008. doi:10.1016/j.jcp.2008.04.006. [2] D. Kamensky, M.-C. Hsu, D. Schillinger, J. A. Evans, A. Aggarwal, Y. Bazilevs, M. S. Sacks, and T. J. R. Hughes. An immersogeometric variational framework for fluid–structure interaction: Application to bioprosthetic heart valves. Computer Methods in Applied Mechanics and Engineering, 284: 1005–1053, 2015. doi:10.1016/j.cma.2014.10.040. [3] T. Belytschko, N. Moës, S. Usui, and C. Parimi. Arbitrary discontinuities in finite elements. International Journal for Numerical Methods in Engineering, 50(4):993–1013, 2001. doi:10.1002/10970207(20010210)50:4<993::AID-NME164>3.0.CO;2-M. [4] E. Burman, S. Claus, P. Hansbo, M. G. Larson, and A. Massing. CutFEM: Discretizing geometry and partial differential equations. International Journal for Numerical Methods in Engineering, 104 (7):472–501, 2015. doi:10.1002/nme.4823. [5] R. Mittal and G. Iaccarino. Immersed Boundary Methods. Annual Review of Fluid Mechanics, 37 (1):239–261, 2005. doi:10.1146/annurev.fluid.37.061903.175743. [6] D. Schillinger and M. Ruess. The Finite Cell Method: A Review in the Context of Higher-Order Structural Analysis of CAD and Image-Based Geometric Models. Archives of Computational Methods in Engineering, 22(3):391–455, 2014. doi:10.1007/s11831-014-9115-y. [7] Y. Sudhakar, J. P. Moitinho de Almeida, and W. A. Wall. An accurate, robust, and easy-to-implement method for integration over arbitrary polyhedra: Application to embedded interface methods. Journal of Computational Physics, 273:393–415, 2014. doi:10.1016/j.jcp.2014.05.019. [8] J. Parvizian, A. Düster, and E. Rank. Finite cell method: H- and p-extension for embedded domain problems in solid mechanics. Computational Mechanics, 41(1):121–133, 2007. doi:10.1007/s00466007-0173-y. [9] Y. Saad. Iterative Methods for Sparse Linear Systems. Other Titles in Applied Mathematics. Society for Industrial and Applied Mathematics, 2003. [10] W. Briggs, V. Henson, and S. McCormick. A Multigrid Tutorial, Second Edition. Other Titles in Applied Mathematics. Society for Industrial and Applied Mathematics, 2000. doi:10.1137/1.9780898719505. [11] S. Badia, A. F. Martín, and J. Principe. Multilevel Balancing Domain Decomposition at Extreme Scales. SIAM Journal on Scientific Computing, pages C22–C52, 2016. doi:10.1137/15M1013511. [12] A. Menk and S. P. A. Bordas. A robust preconditioning technique for the extended finite element method. International Journal for Numerical Methods in Engineering, 85(13):1609–1632, 2011. doi:10.1002/nme.3032. [13] L. Berger-Vergiat, H. Waisman, B. Hiriyur, R. Tuminaro, and D. Keyes. Inexact Schwarz-algebraic multigrid preconditioners for crack problems modeled by extended finite element methods. International Journal for Numerical Methods in Engineering, 90(3):311–328, 2012. doi:10.1002/nme.3318. [14] B. Hiriyur, R. Tuminaro, H. Waisman, E. Boman, and D. Keyes. A Quasi-algebraic Multigrid Approach to Fracture Problems Based on Extended Finite Elements. SIAM Journal on Scientific Computing, 34(2):A603–A626, 2012. doi:10.1137/110819913. [15] F. de Prenter, C. V. Verhoosel, G. J. van Zwieten, and E. H. van Brummelen. Condition number analysis and preconditioning of the finite cell method. Computer Methods in Applied Mechanics and Engineering, 316:297–327, 2017. doi:10.1016/j.cma.2016.07.006. [16] S. Badia and F. Verdugo. Robust and scalable domain decomposition solvers for unfitted finite element methods. Computational and Applied Mathematics, In press, 2017. [17] S. Badia, A. F. Martín, and J. Principe. FEMPAR: An object-oriented parallel finite element framework. Archives of Computational Methods in Engineering, In press, 2017. [18] E. Burman and P. Hansbo. Fictitious domain finite element methods using cut elements: II. A stabilized Nitsche method. Applied Numerical Mathematics, 62(4):328–341, 2012. doi:10.1016/j.apnum.2011.01.008. [19] C. Helzel, M. Berger, and R. Leveque. A High-Resolution Rotated Grid Method for Conservation Laws with Embedded Geometries. SIAM Journal on Scientific Computing, 26(3):785–809, 2005. AGGREGATED UNFITTED FINITE ELEMENT METHOD 20 doi:10.1137/S106482750343028X. [20] F. Kummer. Extended Discontinuous Galerkin methods for multiphase flows: The spatial discretization. Center for Turbulence Research Annual Research Briefs, pages 319–333, 2013. [21] O. Marco, R. Sevilla, Y. Zhang, J. J. Ródenas, and M. Tur. Exact 3D boundary representation in finite element analysis based on Cartesian grids independent of the geometry. International Journal for Numerical Methods in Engineering, 103(6):445–468, 2015. doi:10.1002/nme.4914. [22] S. C. Brenner and R. Scott. The Mathematical Theory of Finite Element Methods. Springer, softcover reprint of hardcover 3rd ed. 2008 edition, 2010. [23] R. Becker. Mesh adaptation for Dirichlet flow control via Nitsche’s method. Communications in Numerical Methods in Engineering, 18(9):669–680, 2002. doi:10.1002/cnm.529. [24] J. Nitsche. Über ein Variationsprinzip zur Lösung von Dirichlet-Problemen bei Verwendung von Teilräumen, die keinen Randbedingungen unterworfen sind. Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg, 36(1):9–15, 1971. doi:10.1007/BF02995904. [25] D. N. Arnold, F. Brezzi, B. Cockburn, and L. D. Marini. Unified analysis of discontinuous Galerkin methods for elliptic problems. SIAM Journal on Numerical Analysis, 39(5):1749–1779, 2002. [26] S. Agmon and N. S. F. (U.S.). Lectures on elliptic boundary value problems. Van Nostrand mathematical studies. Van Nostrand, 1965. [27] H. C. Elman, D. J. Silvester, and A. J. Wathen. Finite elements and fast iterative solvers: with applications in incompressible fluid dynamics. Oxford University Press, 2005. [28] A. Ern and J.-L. Guermond. Theory and Practice of Finite Elements. Springer, 2004. [29] D. Arnold. An Interior Penalty Finite Element Method with Discontinuous Elements. SIAM Journal on Numerical Analysis, 19(4):742–760, 1982. doi:10.1137/0719052. [30] Intel MKL PARDISO - Parallel Direct Sparse Solver Interface. https://software.intel.com/ en-us/articles/intel-mkl-pardiso. Department of Civil and Environmental Engineering. Girona 1-3, Edifici C1, 08034 Barcelona, Spain. Universitat Politècnica de Catalunya, Jordi CIMNE – Centre Internacional de Mètodes Numèrics en Enginyeria, Parc Mediterrani de la Tecnologia, UPC, Esteve Terradas 5, 08860 Castelldefels, Spain.
5cs.CE
Why It’s Nice to be Quoted: Quasiquoting for Prolog Jan Wielemaker1 and Michael Hendricks2 arXiv:1308.3941v1 [cs.PL] 19 Aug 2013 1 Web and Media group, VU University Amsterdam, De Boelelaan 1081a, 1081 HV Amsterdam, The Netherlands, [email protected] 2 Hendricks Solutions, LLC, Hanna, Wyoming, USA, [email protected] Abstract. Prolog’s support for dynamic programming, meta programming and text processing using context free grammars make the language highly suitable for defining domain specific languages (DSL) as well as analysing, refactoring or generating expression states in other (programming) languages. Well known DSLs are the DCG (Definite Clause Grammar) notation and constraint languages such as CHR. These extensions use Prolog operator declarations and the {. . . } notation to realise a good syntax. When external languages, such as HTML, SQL or JavaScript enter the picture, operators no longer satisfy for embedding snippets of these languages into a Prolog source file. In addition, Prolog has poor support for quoting long text fragments. Haskell introduced quasi quotations to resolve this problem. In this paper we ‘ported’ the Haskell mechanism for quasi quoting to Prolog. We show that this can be done cleanly and that quasi quoting can solve the above mentioned problems. 1 Introduction Prolog is commonly used for tasks where it needs to manage snippets of code written in the syntax of an external language such as HTML, SQL or JavaScript. Such code snippets often do not comply with the standard Prolog syntax for various reasons [5]: – Using operator syntax, with only prefix, infix and postfix operators are insufficient. For example, consider the JavaScript case statement. – Basic lexical primitives are incompatible. For example, consider textual content in HTML documents. – The Prolog term that results from parsing an expression is insufficient for recovering the intent in the target language. For example, consider identifier names that start with an uppercase letter, which will read as a Prolog variable. In [5], we claim that some simple languages can be covered well by tweaking the Prolog syntax using operators, while it is possible to realise acceptable representations for some other, e.g., XML based languages by using a Prolog syntax to represent the (simple) data model of these language. In other cases, embedding of external languages can be supported partially using semantic transformations. For example, calls to Prolog predicates whose functor matches a table in an RDBMS and whose arity matches the Proceedings of WLPE 2013, arXiv:1308.2055, August 2013. 2 Jan Wielemaker and Michael Hendricks number of columns can be translated into SQL queries [2]. In [5], we propose a number of syntactic extensions to broaden the range of languages that can be supported using one of the above means. In this paper, we propose a solution for complex external languages for which none of the above achieves a satisfactory embedding. The solution is called quasi quotations, where we borrow the integration into the language from Haskell [4]. A Haskell quasi quotation, as a syntactic element, has a syntax identifier (a function symbol) and a snippet of quoted text. The function associated with the syntax identifier is called during parsing and can manipulate the text and massage it to fit further processing by Haskell. It is good practice for the function to create an abstract syntax tree by parsing the text according to the rules of the external language. As we will see in this paper, more lightweight approaches can also be sufficient. This paper is organised as follows. After examining related work, we revisit the problem statement and describe why current support in Prolog is insufficient to solve this problem in a satisfactory way. In section 6 we introduce the notion of quasi quoting and how it fits into managing strings that present data structures from other languages. In section 7, we introduce the concrete solution proposed for SWI-Prolog. This is followed by examples, future work and the conclusions. 2 Related work Quasi quotations are used for embedding snippets in many ‘scripting’ languages because they form an easy to understand mechanism to create long strings or ASTs (Abstract Syntax Tree) with embedded variables that are given values determined by the environment. Pure textual replacement carries the risk of injection attacks, which triggered research towards more safe template engines.3 Notably modern scripting languages such as Python and Ruby provide a rich pallete of such techniques. This paper follows the reasoning and technique described in “Why It’s Nice to be Quoted: Quasiquoting for Haskell” [4]. We refer to this article for further background information. Another interesting system is Camlp4 [1], which provides parsing and ‘anti parsing’ infrastructure for OCaml. Both approaches allows for extending the host language. The main difference with our approach is that we merely propose a hook into the Prolog parser that enable smart processing of quasi quotations without dictating how these quotations are processed. 3 The need to embed snippets of external languages in Prolog We will explain this need by an example from SWI-Prolog’s web page generating facilities [6]. Web pages are by no means the only place where these problems arise [4], but the domain is quite familiar to many programmers and is of particular interest to us 3 TAL (http://www.owlfish.com/software/simpleTAL/tal-guide.html) Cheetah (http://www.cheetahtemplate.org/examples.html) Django (https://docs.djangoproject.com/en/dev/ref/templates/) Jinja2 (http://jinja.pocoo.org/docs/templates/). Why It’s Nice to be Quoted: Quasiquoting for Prolog 3 because generating web pages is an important application area for SWI-Prolog. A modern web page typically consists of HTML that creates the initial DOM structure, CSS that provides styling and JavaScript for creating interactive components. Our solution for generating HTML is similar to PiLLoW [3] and based on representing the HTML DOM structure as a nested Prolog term. The SWI-Prolog HTML page generation library provides good solutions for – – – – Generating the page structure. Definition and reuse of DCGs that generate page fragments. Create references (URLs) to other pages on the server. Modular inclusion of resources, such as style and JavaScript files including dependency tracking and automatic ordering by computing a partial order based on the dependencies. Pages generated with this infrastructure are guaranteed to be syntactically correct, regardless of the data from which the page is created. This built-in protection against injection attacks is considered a key asset of the server infrastructure and a property that we wish to maintain when integrating JavaScript into the page. In earlier publications [5, 6] we already identified two missing pieces: (1) longer (HTML) text fragments and (2) JavaScript fragments. The first problem can be solved using PWP4 . PWP was developed by Richard O’Keefe and can be considered the opposite of the above described Prolog based page generator. The page is described in XML and reserved XML elements and tags trigger the generation of dynamic page components based on the evaluation of Prolog goals. Like the Prolog page generator, PWP protects against injection attacks because it considers solutions from Prolog as data that is used to extend the XML DOM, which is subsequently serialized for generating the final page. PWP simplifies the specification of pages with large amounts of text, but the rule format is less natural and it lacks the modularity of the Prolog based generator. We have been struggling with JavaScript, trying various approaches. Currently, there are a large number of JavaScript frameworks that provide ‘widgets’ for use on web pages. Popular examples are YUI5 and jQuery6 . Including these widgets typically demands creating a DOM structure that carries an id attribute and represents the data (e.g., a menu may be represented as a ul list or an advanced text editor can be represented as a textarea). This DOM element is transformed into the target widget by calling a JavaScript initialisation function that modifies the DOM of the target element and installs event handlers that provide the dynamic behavior of the element. The initialisation function often takes a configuration object (a JavaScript object literal, {name:value, . . . }), where some of the values are callback functions, represented as JavaScript lambda functions. The HTML framework is well equipped to create the initial DOM and pull in the JavaScript and CSS resources using its dependency framework. The initialisation call 4 5 6 Prolog Well-formed Pages, http://www.swi-prolog.org/pldoc/package/ sgml.html http://yuilibrary.com/ http://jquery.com/ 4 Jan Wielemaker and Michael Hendricks is easy enough to abstract, except when the configuration object contains lambda functions. These are often required to massage JSON data from the server into the desired visualisation and support AJAX based operations, such as computing auto-completion candidates. It is quite common for such objects to require dozens of lines of JavaScript. Representing JavaScript lambda functions requires support for the complete complexity of the language. One way to do this is to represent the JavaScript fragment as a list of literals, mixed with DCG rules that insert content generated from Prolog, such as URLs or JavaScript literal objects. This leads to code as below, which we consider hard to type on a keyboard, hard to read and, because it is so hard to read, often subject to syntax errors. Finally, the code below is subject to injection attacks, unless we hand the variables URL and Id to a grammar that generates valid JavaScript string content from any Prolog atom. [ ’$.ajax({ url: "’,URL,’",\n’, ’ data: { id: "’,Id,’",\n’, ’ }\n’, ’ });\n’ ] We tried several designs to improve on the above, none of which we considered satisfactory. Below are the main directions that we tried. – Abstract away. This implies using the HTML page generation facilities to generate e.g., make a JavaScript call, initialize a variable from Prolog data, etc. To remain managable, a fairly high level of abstraction is needed that is geared towards the JavaScript framework used. This is problematic because it makes it hard for the programmer to relate the JavaScript examples from the framework documentation to the Prolog code. Although it is possible to abstract some of the lambda functions, there is too much variation to deal with all of them. – Put the JavaScript in a separate file. This creates many short files that typically only support a specific generated HTML page because the details of the required JavaScript, such as locations on the server that must be addressed vary from page to page. Because there is no formal relation between the two pages, it is hard to relate them and keep them in sync. – Create application specific JavaScript resources that can be configured without the need for lambda functions in the configuration object. The problem here is that the application developers create their own refinement of the external widget library that requires understanding and documentation, while the externally provided libraries are already quite high level. In other words, the newly created layer adds mostly new complications for managing and understanding the code. We have come to the conclusion that (1) we need a mechanism that allows for including JavaScript into the Prolog page generation source code, (2) the representation of JavaScript in the Prolog source must be easy to type on a keyboard and understand, (3) the generated JavaScript should be safeguarded against injection attacks without explicit calls to encode data and (4) syntactic validation of the generated fragments are likely to improve productivity. Why It’s Nice to be Quoted: Quasiquoting for Prolog 5 4 Using Prolog syntax First, we investigated to what extent the syntax extensions proposed in [5] would help to represent JavaScript naturally using Prolog syntax. We realised support for the empty argument lists (e.g., name()), array notation and function bodies using {. . . }. These were resolved after a proposal by Jose Morales, which extends the notion of operators to lists and curly-bracket blocks. In addition to our hope of improving JavaScript support, list subscription and curly-bracket attribute lists are in use with B-Prolog and ECLiPSe. We have realised a prototype that can express a fair deal of the JavaScript syntax. However, the following problems remain unresolved: – It requires ! and . to be defined as operators. These operators are known to cause ambiguity issues. – Quoting of identifiers may be needed (e.g., ’String’(...)) – A special symbol is needed to distinguish identifiers from strings. (”string” cannot be used because it is a list of integers). – Restrictions are needed with regard to spaces. No space is allowed after function symbols and keywords such as while. In some places additional spaces are required to prevent Prolog from reading two JavaScript tokens as a single Prolog token. – Some symbols clash with Prolog. Consider | or %, which play a totally different role in the Prolog syntax. – Some JavaScript snippets can be turned into valid Prolog syntax, but the resulting AST is ambiguous. For example, ++a is different from a++, but both result in the Prolog term ++(a). We believe that the result would have been more usable than using Prolog quoted atoms for short (1-10 lines) JavaScript snippets, that include simple lambda functions such as making trivial AJAX callbacks. Our main point of doubt is that it is hard to convey the restrictions to casual Prolog users, which makes it likely to get surprised by output that differs from the expectations and can only be understood through deep knowledge of Prolog’s syntax and underlying term representation. 5 The three problems If we cannot include JavaScript using Prolog syntax with user-defined operators, the other option is to use (quoted) text. For this, we need to solve three orthogonal problems: 1. Allow for long quoted text. Current (ISO) Prolog only provides single and double quoted text, which follow the same rules. In particular – Quoted text cannot span more than one line, unless the newline is escaped with a backslash. – The backslash and quote must be escaped with a backslash. – If good layout of the output is desirable, there is no way to indent continuation lines in the Prolog source such that the indentation does not show up in the output. 6 Jan Wielemaker and Michael Hendricks With these restrictions, simple copy and paste of example code must be followed by a tedious process of making the text fit the Prolog syntax, while the reverse is needed to test the code, for example in a JavaScript console. 2. Relate Prolog variables (data) to references in the quoted material. 3. Establish a safe way to embed data into the template string. These problems are independent. We illustrate this with a small HTML example that presents a page with the current time. We use an HTML skeleton to make the comparison fair. In pure Prolog, this could be achieved using the following code snippet: ..., get_time(Now), format_time(atom(Date), ’%+’, Now), print_html([date=Date], ’<h1>My digital clock</h1>\n\ <p>It is now {{date}}</p>’). The task of print html/2 is to relate the template variable date to the Prolog variable Date (third item above), determine the lexical context of {{date}} to know the proper encoding that needs to be done, realise this encoding on the Prolog atom and create the proper output string. This is the second item on the list above. Ideally, we would like an error if the HTML fragment is malformed to begin with. In pure ISO Prolog, all work must be done at runtime. Many Prolog systems provide goal expansion/2 or similar, which allows for doing the analysis of the template at compile time. What remains on our wishlist is to (1) get rid of [date=Date] and (2) get rid of complicated escape sequences for languages that frequently use quotes or backslashes. We propose to solve both issues using quasi quotations for Prolog. 6 Quasi Quotations Quasi quotations find their origin in linguistics7 and introduces variables into textual expressions. They are commonly used in scripting languages. For example: a=world; echo "Hello $a" // Unix shell $a = "world"; print "Hello $a"; // Perl This approach is natural to the (novice) programmer. Unfortunately it does not work for Prolog because nothing in the normal Prolog compilation process provides access to the names of variables. In addition, plain text insertion is a direct invitation to injection attacks. As described in section 5, the template replacement code must be aware of the syntax to perform a safe, i.e., properly escaped, insertion of the variable. Haskell quasi quotes resolve the injection problem (which is described as a typing problem in [4]) by associating a syntax identifier directly with the quoted data. The syntax identifier is associated with a function which typically parses the quoted material into an abstract syntax tree that can represent the target language. 7 http://en.wikipedia.org/wiki/Quasi-quotation Why It’s Nice to be Quoted: Quasiquoting for Prolog 7 7 Quasi Quotations in Prolog Realising quasi quotations requires for a syntactic construct that (1) provides long quoted strings, (2) associates the quotation to a predicate that can act on it according to the requirements of processing the external language and (3) provides access to the clause’s variable dictionary. There are few options for adding a syntax extension to Prolog because Prolog ‘symbol’ characters glue together to form an atom to which operator properties can be assigned. According to Ulrich Neumerkel,8 taking sequences of Prolog solo character that do not form names is a good starting point. Among others, this allows for {|...|}. Combined with a term that identifies the syntax, we propose the following syntax for Prolog quasi quotations, where Syntax is an arbitrary (callable) Prolog term: {|syntax-identifier ||quoted-material |} In the rather unlikely event that |} needs to be embedded in the quoted material, this can be realised in two ways: (1) define the predicate that processes the quotation to respect some escape sequence or (2) use the existing flexibility of the target language to avoid |}. An example of (1) could be to introduce the mapping \\ → \, \{ → {, \} → }, after which the user can write |\}. An example of (2) can be to insert a space between the two if this does not change the semantics or write \u007c} inside a string if the target language supports \uXXXX escapes inside strings. Orthogonal to the syntax is the mapping of the quoted material to a Prolog term, which can be a full AST of the snippet or a simplified representation as used in section 8.2. This mapping is defined by the syntax-identifier, a callable term to which we refer as Syntax from now on. At the same time, quasi quotation merges (Prolog) variables from the environment into the quoted material. Quasi quotations are processed as follows: – The predicate read/1 is modified to recognize the Syntax term and the quoted text. – After all normal processing is finished, read/1 performs the following call: call(+SyntaxName, +Content, +SyntaxArgs, +VarDict, -Result) Here, SyntaxName is the functor of the Syntax term and SyntaxArgs is the list of arguments, i.e., Syntax =.. [SyntaxName|SyntaxArgs]. In section 8, we will see why it is useful to split the functor from the arguments. Content is an opaque handle to the quoted material as we will see later. VarDict is Name = Var list conforming to read term/3 and write term/3. Result is determined by the call to the deterministic predicate SyntaxName/4. The predicate read/1 inserts Result at the location of the quasi quotation in the output term. – The Result term (and thus the quasi quotation) must be a goal (see section 8.3) or appear as the argument of a goal that processes (often serializes) the result (often an AST). For example, reply html page/3 in section 8.1 is designed to serialize the HTML DOM (AST) produced by the HTML parser called by the quasi quoter. 8 https://lists.iai.uni-bonn.de/pipermail/swi-prolog/2013/ 010422.html 8 Jan Wielemaker and Michael Hendricks We provide two support predicates for SyntaxName/4 to process the result. Note that there are no restrictions on how the called predicate combines the quoted text with the syntax arguments and variable dictionary to construct the final term. phrase from quasi quotation(:Grammar, +Content) Calls the grammar Grammar on the list formed by Content. This predicate uses the pure input library described in [7] to parse the content. Syntax errors may be raised using the non-terminal syntax error//1, which produces a precise syntax location that consists of the file, line number, line position and character count. with quasi quotation input(+Content, -Stream, :Goal) Calls Goal on the Prolog stream Stream. The stream position information reflects the location in the source file, except for the byte count. 8 Examples of using quasi quotes in Prolog In this section we provide three examples to illustrate quasi quotations. The first example (HTML) is based on the existing SWI-Prolog libraries for parsing and serializing HTML. The second example demonstrates how JavaScript can be handled safely (but with limited syntax checking support) by only tokenising the quotation. The third example concerns SPARQL,9 demonstrates the value of the quasi quotation approach in a scenario where the parsed quasi quotation is used as a Prolog query. 8.1 Quasi quoting HTML The first, complete, example illustrates safe embedding of long HTML texts into a Prolog web page. The code of the quasi quoter is given in figure 2. First, we give a fully working webserver based on this quasi quoter in figure 1. We notice that the quoted material can contain multiple lines, does not require any line endings and may contain quotes. The content of the quoted material is valid HTML and because an editor can easily detect the {|html and |} indicators, it is not hard for development tools to provide support for the embedded HTML, such as highlighting, indentation or completion. The HTML quoter is defined to limit Prolog variables that are replaced to those that appear as arguments to the html syntax indicator (Date in figure 1). The convention to pass variables that are subject to replacement explicitly has the following advantages: (1) it avoids a singleton variable warning on Date10 , (2) Prolog clauses have a relatively large number of variables due to the lack of functional notation which can avoid variables and destructive assignment which allows for reusing a variable, (3) it makes the substitution more explicit and (4) it allows the quoter to check that all intended relacements were made. The HTML quasi quoter as defined in figure 2 replaces Prolog variables indicated by its arguments (html(Date)) if they appear as value for an attribute or content of an element. It performs the following steps: 9 10 http://www.w3.org/TR/sparql11-overview/ This problem can also be resolved by the quasi quoter by removing singleton variables that appear inside the result term of the quasi quoter. Why It’s Nice to be Quoted: Quasiquoting for Prolog 9 :- use_module(library(http/thread_httpd)). :- use_module(library(http/http_dispatch)). :- use_module(library(http/html_write)). server(Port) :- http_server(http_dispatch, [port(Port)]). :- http_handler(/, clock, []). clock(_Request) :get_time(Now), format_time(atom(Date), ’%+’, Now), reply_html_page( title(’My digital clock’), {|html(Date)|| <h1>My digital clock</h1> <p>It is now <span class="time">Date</span> |}). Fig. 1. Example web server with embedded HTML 1. Parse the quoted HTML text using load html/3. The option max errors(0) causes the parser to throw a syntax error exception and abort on the first error. As this processing happens while reading the source, the HTML syntax error is reported during compilation and includes line, line position and character count information. 2. The XML DOM structure is recursively traversed and attributes that have a Prolog variable as value or content that matches a Prolog variable from Syntax is replaced by this variable. When the page is generated (figure 1), binding of the variable Date completes the XML DOM structure. This structure is serialised by reply html page/3. The serialisation ensures type safety and the generation of correct HTML syntax.11 8.2 Embedding JavaScript The HTML quasi quoter of the previous section was easily implemented because the SWI-Prolog infrastructure already contains a parser and serializer for HTML. We do not have these for JavaScript. We are likely to develop this in the future, but here we want to illustrate that it is possible to achieve safe template replacement by only using a tokeniser. 11 The HTML infrastructure has a global option to select between HTML and XHTML serialisation, which implies that HTML in the Prolog source may be serialised as XHTML to the client. 10 :::::- Jan Wielemaker and Michael Hendricks module(html_quasi_quotations, [ html/4 ]). use_module(library(sgml)). use_module(library(apply)). use_module(library(lists)). use_module(library(quasi_quotations)). :- quasi_quotation_syntax(html). html(Content, Vars, Dict, DOM) :include(qq_var(Vars), Dict, QQDict), with_quasi_quotation_input( Content, In, load_html(In, DOM0, [ max_errors(0) ])), xml_content(QQDict, DOM0, DOM). qq_var(Vars, _=Var) :- member(V, Vars), V == Var, !. xml_content(Dict, [Name], [Var]) :atom(Name), memberchk(Name=Var, Dict), !. xml_content(Dict, Content0, Content) :maplist(xml_content_element(Dict), Content0, Content). xml_content_element(Dict, element(Tag, Attrs0, Content0), element(Tag, Attrs, Content)) :- !, maplist(xml_attribute(Dict), Attrs0, Attrs), xml_content(Dict, Content0, Content). xml_content_element(_, Element, Element). xml_attribute(Dict, Attr=Name, Attr=Var) :memberchk(Name=Var, Dict), !. xml_attribute(_, Attr, Attr). Fig. 2. Source for the HTML quasi quoter Because JavaScript is generated as part of the HTML page generation, the JavaScript quasi quoter produces output for the HTML backend. It translates the JavaScript into a list of two types of elements: (1) plain atoms (that will be emitted in the context of a script element) and calls to a grammar js expression//1, which defines a translation of native Prolog data into JavaScript literals according to table 1. The quasi quoter tokenises the quoted material using an ECMAScript compliant tokeniser, implemented using a Prolog grammar. The quoter (figure 4) replaces identi- Why It’s Nice to be Quoted: Quasiquoting for Prolog Prolog number atom @true @false @null List object(NameValueList) { Name:Value, ...} 11 JavaScript number string (escaped using JavaScript syntax) boolean true boolean false null constant array object literal object literal Table 1. Prolog to JavaScript conversion fier tokens that match with a Prolog variable with a call to js expression//1, and translates the remainder into plain atoms. Figure 3 shows a shortened predicate from the SWI-Prolog website that applies the JavaScript quasi quoter to initialise a jQuery widget called tagit. The actual predicate contains a larger configuration object, just ‘more of the same’. In this example, the first block is used to compute server URLs and properties for Obj that we need in the remainder. Next, the html//1 call creates the DOM needed for the tagit widget. Here, we could also have used the HTML quasi quoter. The choice is rather arbitrary in this case because the fragment is short and defines only structure and data that is passed in from a variable. Next, we see html requires//1, which ensures that the page head is extended to load the required JavaScript and CSS resources and finally, there is the script fragment with embedded Prolog variables. Because Prolog variables are valid JavaScript identifiers, the fragment contains valid JavaScript syntax. 8.3 Embedding SPARQL SPARQL12 is the query language for the semantic web RDF language. In most of this section, one may replace SPARQL with SQL. ClioPatria is SWI-Prolog’s semantic web framework, which contains a SPARQL ‘endpoint’. The SPARQL engine compiles a SPARQL query into a Prolog query, optimizes and executes this query and serializes the results according to the SPARQL result specification. When writing middleware (reasoning) in the ClioPatria, one typically uses direct queries to the embedded RDF store for the reasoning. In some cases, one would like to use SPARQL for specifying the query. Consider cases where the query is already available in SPARQL, the query must also be used with external servers or the author is much more fluent in SPARQL than in Prolog. The quasi quotation syntax can be used to write down the code below. The SPARQL query is parsed at compile time and the SPARQL projection variables can naturally integrate with the Prolog variable of the enclosing clause. Note that in this example, we think it is better not to pass the substituted variables as arguments to the sparql syntax term because this list is made explicit in the variable projection clause that starts the query. 12 http://www.w3.org/TR/sparql11-overview/ 12 Jan Wielemaker and Michael Hendricks prolog:doc_object_page_footer(Obj, _Options) --> { http_link_to_id(complete_tag, [], Complete), http_link_to_id(show_tag, [], OnClick), http_link_to_id(remove_tag, [], Remove), object_id(Obj, ObjectID), object_tags(Obj, Tags), atomic_list_concat(Tags, ’,’, Data) }, html(div(class(’user-annotations’), input([id(tags), value(Data)]))), html_requires(tagit), js_script({|javascript(Complete, OnClick, ObjectID, Remove)|| $(document).ready(function() { $("#tags").tagit({ autocomplete: { delay: 0.3, minLength: 1, source: Complete }, onTagClicked: function(event, ui) { window.location.href = OnClick+"tag="+ encodeURIComponent(ui.tagLabel); }, beforeTagRemoved: function(event, ui) { $.ajax({ dataType: "json", url: Remove, data: { tag: ui.tagLabel, obj: ObjectID } }); } }); }); |}). Fig. 3. Shortened code fragment from the SWI-Prolog website that illustrates the embedding of JavaScript for initializing a widget. ..., {|sparql|| SELECT ?Name, ?Place WHERE { ... } |}> Why It’s Nice to be Quoted: Quasiquoting for Prolog 13 javascript(Content, Vars, Dict, \Parts) :include(qq_var(Vars), Dict, QQDict), phrase_from_quasi_quotation( js(QQDict, Parts), Content). qq_var(Vars, _=Var) :- member(V, Vars), V == Var, !. js(Dict, [Pre, Subst|More]) --> here(Here0), js_tokens(_), here(Here1), js_token(identifier(Name)), { memberchk(Name=Var, Dict), !, Subst = \js_expression(Var), diff_to_atom(Here0, Here1, Pre) }, js(Dict, More). js(_, [Last]) --> string(Codes), \+ [_], !, { atom_codes(Last, Codes) }. js_tokens([]) --> []. js_tokens([H|T]) --> js_token(H), js_tokens(T). %! % % % % diff_to_atom(+Start, +End, -Atom) True when Atom is an atom that represents the characters between Start and End, where End must be in the tail of the list Start. diff_to_atom(Start, End, Atom) :diff_list(Start, End, List), atom_codes(Atom, List). diff_list(Start, End, List) :- Start == End, !, List = []. diff_list([H|Start], End, [H|List]) :diff_list(Start, End, List). here(Here, Here, Here). Fig. 4. Partial source for the javascript syntax quoter. A similar approach is feasible with SQL, offering a more convenient way to interact with the database than using prepared statements and both a safer and more convenient way than direct text-based SQL queries. 14 Jan Wielemaker and Michael Hendricks 9 Implementation The implementation of quasi quotation handling in an existing Prolog system is straightforward and should not require more than a couple of days. The tokeniser is extended to recognise {|. On encountering this token, the parser builds a list of terms, each of which represents a quasi quotation. If the list of quasi quotations is not empty when read/1 reads the fullstop token, it materializes the variable dictionary and calls a routine that calls the quasi quotation parsers. Note that quasi quotations are parsed after read/1 completes reading the term. This allows for quasi quotations to refer to variables that appear after the quasi quotation (see section 8.3). This does imply that read/1 must buffer the quoted text. The functionality is made available to the user through the library quasi quotations.pl, which appeared in SWI-Prolog 6.3.17. The Prolog tokeniser is extended with two tokens. {| is a new token that starts a quasi quotation. The sequence ||...|} is processed as a single token. 10 Future work Quasi quotations are young in SWI-Prolog. We believe that the core functionality described in this article is largely future-proof. One of the future tasks is to establish libraries that facilitate syntax handling and safe replacement. Another is to establish design patterns for using this technology. What can be learn from the Haskell, Python and Ruby communities here? Quasi quotations typically ‘evaluate’ to a Prolog term that shares variables with the clause into which it is embedded. We do not have a functional syntax that we can exploit to force ‘evaluation’ of this term with instantiated variables. On the other hand, we can also use the nonground abstract syntax tree and use it for e.g., matching tasks. 11 Conclusions In this article we have motivated why it is necessary to be able to embed longer snippets of code written in another language in Prolog source code. This requires for a syntax that permits embedding, practically without the need for Prolog escaping in the embedded text. Next, this text must be related to Prolog data. The integration of Prolog data into the snippet must be done according to the syntax and data model of the external language. This implies we need a programmable component that is related to the quoted material. Combining these requirements into one syntactic extension that is executed by read/1 simplifies support by tooling such as editors, provides natural access to Prolog variables and allows for seemless integration of error messages. We have demonstrated quasi quotations using two implemented quoters. These quoters allow for easy copying and pasting material in their native syntax to and from Prolog source. Using these quoters is likely to reduce the learning curve for embedding snippets into Prolog, while the quasi quoter can guarantee that the integrated material is (syntactically) correct and that Prolog material is safely integrated. Why It’s Nice to be Quoted: Quasiquoting for Prolog 15 Acknowledgements Jan Pobrislo provided the insights that were used to write section 5. Michiel Hildebrand and Jacco van Ossenbruggen (VU University Amsterdam) have tried many of the pure Prolog based alternatives which were needed to formulate section 3 and section 4. They also help shaping the current JavaScript quasi quoter and commented on drafts of this text. Ulrich Neumerkel has propose the combination of | with brackets and pointed at the tokenisation issues described in section 9. This publication was supported by the Dutch national program COMMIT/ References 1. Jake Donham and Nicolas Pouillard. Camlp4 and template haskell. In ACM SIGPLAN Commercial Users of Functional Programming, CUFP ’10, pages 6:1–6:1, New York, NY, USA, 2010. ACM. 2. Christoph Draxler. Accessing relational and higher databases through database set predicates in logic programming languages. Phd thesis, Zurich University, 1991. 3. Daniel Cabeza Gras and Manuel V. Hermenegildo. Distributed WWW programming using (ciao-)prolog and the piLLoW library. TPLP, 1(3):251–282, 2001. 4. Geoffrey Mainland. Why it’s nice to be quoted: quasiquoting for haskell. In Gabriele Keller, editor, Haskell, pages 73–82. ACM, 2007. 5. Jan Wielemaker and Nicos Angelopoulos. Syntactic integration of external languages in Prolog. In Proceedings of WLPE 2012, 2012. 6. Jan Wielemaker, Zhisheng Huang, and Lourens van der Meij. Swi-prolog and the web. TPLP, 8(3):363–392, 2008. 7. Jan Wielemaker and Ulrich Neumerkel. Precise garbage collection in Prolog. In Proceedings of CICLOPS 2008, 2008.
6cs.PL