index int64 0 20.3k | text stringlengths 0 1.3M | year stringdate 1987-01-01 00:00:00 2024-01-01 00:00:00 | No stringlengths 1 4 |
|---|---|---|---|
7,000 | Integration Methods and Optimization Algorithms Damien Scieur INRIA, ENS, PSL Research University, Paris France damien.scieur@inria.fr Vincent Roulet INRIA, ENS, PSL Research University, Paris France vincent.roulet@inria.fr Francis Bach INRIA, ENS, PSL Research University, Paris France francis.bach@inria.fr Alexandre d’Aspremont CNRS, ENS PSL Research University, Paris France aspremon@ens.fr Abstract We show that accelerated optimization methods can be seen as particular instances of multi-step integration schemes from numerical analysis, applied to the gradient flow equation. Compared with recent advances in this vein, the differential equation considered here is the basic gradient flow, and we derive a class of multi-step schemes which includes accelerated algorithms, using classical conditions from numerical analysis. Multi-step schemes integrate the differential equation using larger step sizes, which intuitively explains the acceleration phenomenon. Introduction Applying the gradient descent algorithm to minimize a function f has a simple numerical interpretation as the integration of the gradient flow equation, written ˙x(t) = −∇f(x(t)), x(0) = x0 (Gradient Flow) using Euler’s method. This appears to be a somewhat unique connection between optimization and numerical methods, since these two fields have inherently different goals. On one hand, numerical methods aim to get a precise discrete approximation of the solution x(t) on a finite time interval. On the other hand, optimization algorithms seek to find the minimizer of a function, which corresponds to the infinite time horizon of the gradient flow equation. More sophisticated methods than Euler’s were developed to get better consistency with the continuous time solution but still focus on a finite time horizon [see e.g. Süli and Mayers, 2003]. Similarly, structural assumptions on f lead to more sophisticated optimization algorithms than the gradient method, such as the mirror gradient method [see e.g. Ben-Tal and Nemirovski, 2001; Beck and Teboulle, 2003], proximal gradient method [Nesterov, 2007] or a combination thereof [Duchi et al., 2010; Nesterov, 2015]. Among them Nesterov’s accelerated gradient algorithm [Nesterov, 1983] is proven to be optimal on the class of smooth convex or strongly convex functions. This latter method was designed with optimal complexity in mind, but the proof relies on purely algebraic arguments and the key mechanism behind acceleration remains elusive, with various interpretations discussed in e.g. [Bubeck et al., 2015; Allen Zhu and Orecchia, 2017; Lessard et al., 2016]. Another recent stream of papers used differential equations to model the acceleration behavior and offer another interpretation of Nesterov’s algorithm [Su et al., 2014; Krichene et al., 2015; Wibisono et al., 2016; Wilson et al., 2016]. However, the differential equation is often quite complex, being 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. reverse-engineered from Nesterov’s method itself, thus losing the intuition. Moreover, integration methods for these differential equations are often ignored or are not derived from standard numerical integration schemes. Here, we take another approach. Rather than using a complicated differential equation, we use advanced multistep discretization methods on the basic gradient flow equation in (Gradient Flow). Ensuring that the methods effectively integrate this equation for infinitesimal step sizes is essential for the continuous time interpretation and leads to a family of integration methods which contains various well-known optimization algorithms. A full analysis is carried out for linear gradient flows (quadratic optimization) and provides compelling explanations for the acceleration phenomenon. In particular, Nesterov’s method can be seen as a stable and consistent gradient flow discretization scheme that allows bigger step sizes in integration, leading to faster convergence. 1 Gradient flow We seek to minimize a L-smooth µ-strongly convex function defined on Rd. We discretize the gradient flow equation (Gradient Flow), given by the following ordinary differential equation ˙x(t) = g(x(t)), x(0) = x0, (ODE) where g comes from a potential −f, meaning g = −∇f. Smoothness of f means Lipschitz continuity of g, i.e. ∥g(x) −g(y)∥≤L∥x −y∥, for every x, y ∈Rd, where ∥.∥is the Euclidean norm. This property ensures existence and uniqueness of the solution of (ODE) (see [Süli and Mayers, 2003, Theorem 12.1]). Strong convexity of f also means strong monotonicity of −g, i.e., µ∥x −y∥2 ≤−⟨x −y, g(x) −g(y)⟩, for every x, y ∈Rd, and ensures that (ODE) has a unique point x∗such that g(x∗) = 0, called the equilibrium. This is the minimizer of f and the limit point of the solution, i.e. x(∞) = x∗. Finally this assumption allows us to control the convergence rate of the potential f and the solution x(t) as follows. Proposition 1.1 Let f be a L-smooth and µ-strongly convex function and x0 ∈dom(f). Writing x∗the minimizer of f, the solution x(t) of (Gradient Flow) satisfies f(x(t)) −f(x∗) ≤(f(x0) −f(x∗))e−2µt, ∥x(t) −x∗∥≤∥x0 −x∗∥e−µt. (1) A proof of this last result is recalled in the Supplementary Material. We now focus on numerical methods to integrate (ODE). 2 Numerical integration of differential equations 2.1 Discretization schemes In general, we do not have access to an explicit solution x(t) of (ODE). We thus use integration algorithms to approximate the curve (t, x(t)) by a grid (tk, xk) ≈(tk, x(tk)) on a finite interval [0, tmax]. For simplicity here, we assume the step size hk = tk −tk−1 is constant, i.e., hk = h and tk = kh. The goal is then to minimize the approximation error ∥xk −x(tk)∥for k ∈[0, tmax/h]. We first introduce Euler’s method to illustrate this on a basic example. Euler’s explicit method. Euler’s (explicit) method is one of the oldest and simplest schemes for integrating the curve x(t). The idea stems from a Taylor expansion of x(t) which reads x(t + h) = x(t) + h ˙x(t) + O(h2). When t = kh, Euler’s method approximates x(t + h) by xk+1, neglecting the second order term, xk+1 = xk + hg(xk). In optimization terms, we recognize the gradient descent algorithm used to minimize f. Approximation errors in an integration method accumulate with iterations, and as Euler’s method uses only the last point to compute the next one, it has only limited control over the accumulated error. 2 Linear multistep methods. Multi-step methods use a combination of past iterates to improve convergence. Throughout the paper, we focus on linear s-step methods whose recurrence can be written xk+s = − s−1 X i=0 ρixk+i + h s X i=0 σig(xk+i), for k ≥0, where ρi, σi ∈R are the parameters of the multistep method and h is again the step size. Each new point xk+s is a function of the information given by the s previous points. If σs = 0, each new point is given explicitly by the s previous points and the method is called explicit. Otherwise each new point requires solving an implicit equation and the method is called implicit. To simplify notations we use the shift operator E, which maps Exk →xk+1. Moreover, if we write gk = g(xk), then the shift operator also maps Egk →gk+1. Recall that a univariate polynomial is called monic if its leading coefficient is equal to 1. We now give the following concise definition of s-step linear methods. Definition 2.1 Given an (ODE) defined by g, x0, a step size h and x1, . . . , xs−1 initial points, a linear s-step method generates a sequence (tk, xk) which satisfies ρ(E)xk = hσ(E)gk, for every k ≥0, (2) where ρ is a monic polynomial of degree s with coefficients ρi, and σ a polynomial of degree s with coefficients σi. A linear s−step method is uniquely defined by the polynomials (ρ, σ). The sequence generated by the method then depends on the initial points and the step size. We now recall a few results describing the performance of multistep methods. 2.2 Stability Stability is a key concept for integration methods. First of all, consider two curves x(t) and y(t), both solutions of (ODE), but starting from different points x(0) and y(0). If the function g is Lipchitzcontinuous, it is possible to show that the distance between x(t) and y(t) is bounded on a finite interval, i.e. ∥x(t) −y(t)∥≤C∥x(0) −y(0)∥ ∀t ∈[0, tmax], where C may depend exponentially on tmax. We would like to have a similar behavior for our sequences xk and yk, approximating x(tk) and y(tk), i.e. ∥xk −yk∥≈∥x(tk) −y(tk)∥≤C∥x(0) −y(0)∥ ∀k ∈[0, tmax/h], (3) when h →0, so k →∞. Two issues quickly arise. First, for a linear s-step method, we need s starting values x0, ..., xs−1. Condition (3) will therefore depend on all these starting values and not only x0. Secondly, any discretization scheme introduces at each step an approximation error, called local error, which accumulates over time. We write this error ϵloc(xk+s) and define it as ϵloc(xk+s) ≜xk+s −x(tk+s), where xk+s is computed using the real solution x(tk), ..., x(tk+s−1). In other words, the difference between xk and yk can be described as follows ∥xk −yk∥≤Error in the initial condition + Accumulation of local errors. We now write a complete definition of stability, inspired by Definition 6.3.1 from Gautschi [2011]. Definition 2.2 (Stability) A linear multistep method is stable iff, for two sequences xk, yk generated by (ρ, σ) using a sufficiently small step size h > 0, from the starting values x0, ..., xs−1, and y0, ..., ys−1, we have ∥xk −yk∥≤C max i∈{0,...,s−1} ∥xi −yi∥+ tmax/h X i=1 ∥ϵloc(xi+s)∥+ ∥ϵloc(yi+s)∥ , (4) for any k ∈[0, tmax/h]. Here, the constant C may depend on tmax but is independent of h. When h tends to zero, we may recover equation (3) only if the accumulated local error also tends to zero. We thus need lim h→0 1 h ∥ϵloc(xi+s)∥= 0 ∀i ∈[0, tmax/h]. 3 This condition is called consistency. The following proposition shows there exist simple conditions to check consistency, which rely on comparing a Taylor expansion of the solution with the coefficients of the method. Its proof and further details are given in the Supplementary Material. Proposition 2.3 (Consistency) A linear multistep method defined by polynomials (ρ, σ) is consistent if and only if ρ(1) = 0 and ρ′(1) = σ(1). (5) Assuming consistency, we still need to control sensitivity to initial conditions, written ∥xk −yk∥≤C max i∈{0,...,s−1} ∥xi −yi∥. (6) Interestingly, analyzing the special case where g = 0 is completely equivalent to the general case and this condition is therefore called zero-stability. This reduces to standard linear algebra results as we only need to look at the solution of the homogeneous difference equation ρ(E)xk = 0. This is captured in the following theorem whose technical proof can be found in [Gautschi, 2011, Theorem 6.3.4]. Theorem 2.4 (Root condition) Consider a linear multistep method (ρ, σ). The method is zero-stable if and only if all roots of ρ(z) are in the unit disk, and the roots on the unit circle are simple. 2.3 Convergence of the global error Numerical analysis focuses on integrating an ODE on a finite interval of time [0, tmax]. It studies the behavior of the global error defined by x(tk) −xk, as a function of the step size h. If the global error converges to 0 with the step size, the method is guaranteed to approximate correctly the ODE on the time interval, for h small enough. We now state Dahlquist’s equivalence theorem, which shows that the global error converges to zero when h does if the method is stable, i.e. when the method is consistent and zero-stable. This naturally needs the additional assumption that the starting values x0, . . . , xs−1 are computed such that they converge to the solution (x(0), . . . , x(ts−1)). The proof of the theorem can be found in Gautschi [2011]. Theorem 2.5 (Dahlquist’s equivalence theorem) Given an (ODE) defined by g and x0 and a consistent linear multistep method (ρ, σ), whose starting values are computed such that limh→0 xi = x(ti) for any i ∈{0, . . . , s −1}, zero-stability is necessary and sufficient for convergence, i.e. to ensure x(tk) −xk →0 for any k when the step size h goes to zero. 2.4 Region of absolute stability The results above ensure stability and global error bounds on finite time intervals. Solving optimization problems however requires looking at infinite time horizons. We start by finding conditions ensuring that the numerical solution does not diverge when the time interval increases, i.e. that the numerical solution is stable with a constant C which does not depend on tmax. Formally, for a fixed step-size h, we want to ensure ∥xk∥≤C max i∈{0,...,s−1} ∥xi∥ for all k ∈[0, tmax/h] and tmax > 0. (7) This is not possible without further assumptions on the function g as in the general case the solution x(t) itself may diverge. We begin with the simple scalar linear case which, given λ > 0, reads ˙x(t) = −λx(t), x(0) = x0. (Scalar Linear ODE) The recurrence of a linear multistep methods with parameters (ρ, σ) applied to (Scalar Linear ODE) then reads ρ(E)xk = −λhσ(E)xk ⇔ [ρ + λhσ](E)xk = 0, where we recognize a homogeneous recurrence equation. Condition (7) is then controlled by the step size h and the constant λ, ensuring that this homogeneous recurrent equation produces bounded solutions. This leads us to the definition of the region of absolute stability, also called A-stability. 4 Definition 2.6 (Absolute stability) The region of absolute stability of a linear multistep method defined by (ρ, σ) is the set of values λh such that the characteristic polynomial πλh(z) ≜ρ(z) + λh σ(z) (8) of the homogeneous recurrence equation πλh(E)xk = 0 produces bounded solutions. Standard linear algebra links this condition to the roots of the characteristic polynomial as recalled in the next proposition (see e.g. Lemma 12.1 of Süli and Mayers [2003]). Proposition 2.7 Let π be a polynomial and write xk a solution of the homogeneous recurrence equation π(E)xk = 0 with arbitrary initial values. If all roots of π are inside the unit disk and the ones on the unit circle have a multiplicity exactly equal to one, then ∥xk∥≤∞. Absolute stability of a linear multistep method determines its ability to integrate a linear ODE defined by ˙x(t) = −Ax(t), x(0) = x0, (Linear ODE) where A is a positive symmetric matrix whose eigenvalues belong to [µ, L] for 0 < µ ≤L. In this case the step size h must indeed be chosen such that for any λ ∈[µ, L], λh belongs to the region of absolute stability of the method. This (Linear ODE) is a special instance of (Gradient Flow) where f is a quadratic function. Therefore absolute stability gives a necessary (but not sufficient) condition to integrate (Gradient Flow) on L-smooth, µ-strongly convex functions. 2.5 Convergence analysis in the linear case By construction, absolute stability also gives hints on the convergence of xk to the equilibrium in the linear case. More precisiely, it allows us to control the rate of convergence of xk, approximating the solution x(t) of (Linear ODE) as shown in the following proposition whose proof can be found in Supplementary Material. Proposition 2.8 Given a (Linear ODE) defined by x0 and a positive symmetric matrix A whose eigenvalues belong to [µ, L] with 0 < µ ≤L, using a linear multistep method defined by (ρ, σ) and applying a fixed step size h, we define rmax as rmax = max λ∈[µ,L] max r∈roots(πλh(z)) |r|, where πλh is defined in (8). If rmax < 1 and its multiplicity is equal to m, then the speed of convergence of the sequence xk produced by the linear multistep method to the equilibrium x∗of the differential equation is given by ∥xk −x∗∥= O(km−1rk max). (9) We can now use these properties to analyze and design multistep methods. 3 Analysis and design of multi-step methods As shown previously, we want to integrate (Gradient Flow) and Proposition 1.1 gives a rate of convergence in the continuous case. If the method tracks x(t) with sufficient accuracy, then the rate of the method will be close to the rate of convergence of x(kh). So, larger values of h yield faster convergence of x(t) to the equilibrium x∗. However h cannot be too large, as the method may be too inaccurate and/or unstable as h increases. Convergence rates of optimization algorithms are thus controlled by our ability to discretize the gradient flow equation using large step sizes. We recall the different conditions that proper linear multistep methods should satisfy. • Monic polynomial (Section 2.1). Without loss of generality (dividing both sides of the difference equation of the multistep method (2) by ρs does not change the method). • Explicit method (Section 2.1). We assume that the scheme is explicit in order to avoid solving a non-linear system at each step. 5 • Consistency (Section 2.2). If the method is not consistent, then the local error does not converge when the step size goes to zero. • Zero-stability (Section 2.2). Zero-stability ensures convergence of the global error (Section 2.3) when the method is also consistent. • Region of absolute stability (Section 2.4). If λh is not inside the region of absolute stability for any λ ∈[µ, L], then the method is divergent when tmax increases. Using the remaining degrees of freedom, we can tune the algorithm to improve the convergence rate on (Linear ODE), which corresponds to the optimization of a quadratic function. Indeed, as showed in Proposition 2.8, the largest root of πλh(z) gives us the rate of convergence on quadratic functions (when λ ∈[µ, L]). Since smooth and strongly convex functions are close to quadratic (being sandwiched between two quadratics), this will also give us a good idea of the rate of convergence on these functions. We do not derive a proof of convergence of the sequence for general smooth and (strongly) convex function (but convergence is proved by Nesterov [2013] or using Lyapunov techniques by Wilson et al. [2016]). Still our results provide intuition on why accelerated methods converge faster. 3.1 Analysis of two-step methods We now analyze convergence of two-step methods (an analysis of Euler’s method is provided in the Supplementary Material). We first translate the conditions multistep method, listed at the beginning of this section, into constraints on the coefficients: ρ2 = 1 (Monic polynomial) σ2 = 0 (Explicit method) ρ0 + ρ1 + ρ2 = 0 (Consistency) σ0 + σ1 + σ2 = ρ1 + 2ρ2 (Consistency) |Roots(ρ)| ≤1 (Zero-stability). Equality contraints yield three linear constraints, defining the set L such that L = {ρ0, ρ1, σ0, σ1 : ρ1 = −(1 + ρ0), σ1 = 1 −ρ0 −σ0, |ρ0| < 1}. (10) We now seek conditions on the remaining parameters to produce a stable method. Absolute stability requires that all roots of the polynomial πλh(z) in (8) are inside the unit circle, which translates into condition on the roots of second order equations here. The following proposition gives the values of the roots of πλh(z) as a function of the parameters ρi and σi. Proposition 3.1 Given constants 0 < µ ≤L, a step size h > 0 and a linear two-step method defined by (ρ, σ), under the conditions (ρ1 + µhσ1)2 ≤4(ρ0 + µhσ0), (ρ1 + Lhσ1)2 ≤4(ρ0 + Lhσ0), (11) the roots r±(λ) of πλh, defined in (8), are complex conjugate for any λ ∈[µ, L]. Moreover, the largest root modulus is equal to max λ∈[µ,L] |r±(λ)|2 = max {ρ0 + µhσ0, ρ0 + Lhσ0} . (12) The proof can be found in the Supplementary Material. The next step is to minimize the largest modulus (12) in the coefficients ρi and σi to get the best rate of convergence, assuming the roots are complex (the case were the roots are real leads to weaker results). 3.2 Design of a family of two-step methods for quadratics We now have all ingredients to build a two-step method for which the sequence xk converges quickly to x∗for quadratic functions. Optimizing the convergence rate means solving the following problem, min max {ρ0 + µhσ0, ρ0 + Lhσ0} s.t. (ρ0, ρ1, σ0, σ1) ∈L (ρ1 + µhσ1)2 ≤4(ρ0 + µhσ0) (ρ1 + Lhσ1)2 ≤4(ρ0 + Lhσ0), 6 in the variables ρ0, ρ1, σ0, σ1, h > 0, where L is defined in (10). If we use the equality constraints in (10) and make the following change of variables, ˆh = h(1 −ρ0), cµ = ρ0 + µhσ0, cL = ρ0 + Lhσ0, (13) the problem can be solved, for fixed ˆh, in the variables cµ, cL. In that case, the optimal solution is given by c∗ µ = (1 − q µˆh)2, c∗ L = (1 − p Lˆh)2, (14) obtained by tightening the two first inequalities, for ˆh ∈]0, (1+µ/L)2 L [. Now if we fix ˆh we can recover a two step linear method defined by (ρ, σ) and a step size h by using the equations in (13). We define the following quantity β = (1 − p µ/L)/(1 + p µ/L). A suboptimal two-step method. Setting ˆh = 1/L for example, the parameters of the corresponding two-step method, called method M1, are M1 = ρ(z) = β −(1 + β)z + z2, σ(z) = −β(1 −β) + (1 −β2)z, h = 1 L(1 −β) (15) and its largest modulus root (12) is given by rate(M1) = q max{cµ, cL} = √cµ = 1 − p µ/L. Optimal two-step method for quadratics. We can compute the optimal ˆh which minimizes the maximum of the two roots c∗ µ and c∗ L defined in (14). The solution simply balances the two terms in the maximum, with ˆh∗= (1 + β)2/L. This choice of ˆh leads to the method M2, described by M2 = ρ(z) = β2 −(1 + β2)z + z2, σ(z) = (1 −β2)z, h = 1 √µL (16) with convergence rate rate(M2) = √cµ = √cL = β = (1 − p µ/L)/(1 + p µ/L) < rate(M1). We will now see that methods M1 and M2 are actually related to Nesterov’s accelerated method and Polyak’s heavy ball algorithms. 4 On the link between integration and optimization In the previous section, we derived a family of linear multistep methods, parametrized by ˆh. We will now compare these methods to common optimization algorithms used to minimize L-smooth, µ-strongly convex functions. 4.1 Polyak’s heavy ball method The heavy ball method was proposed by Polyak [1964]. It adds a momentum term to the gradient step xk+2 = xk+1 −c1∇f(xk+1) + c2(xk+1 −xk), where c1 = 4/( √ L + √µ)2 and c2 = β2. We can organize the terms in the sequence to match the general structure of linear multistep methods, to get β2xk −(1 + β2)xk+1 + xk+2 = c1 (−∇f(xk+1)) . We easily identify ρ(z) = β2−(1+β2)z+z2 and hσ(z) = c1z. To extract h, we will assume that the method is consistent (see conditions (5)). All computations done, we can identify the corresponding linear multistep method as MPolyak = ρ(z) = β2 −(1 + β2)z + 1, σ(z) = (1 −β2)z, h = 1 √µL . (17) This shows that MPolyak = M2. In fact, this result was expected since Polyak’s method is known to be optimal for quadratic functions. However, it is also known that Polyak’s algorithm does not converge for a general smooth and strongly convex function [Lessard et al., 2016]. 7 4.2 Nesterov’s accelerated gradient Nesterov’s accelerated method in its simplest form is described by two sequences xk and yk, with yk+1 = xk −1 L∇f(xk), xk+1 = yk+1 + β(yk+1 −yk). As above, we will write Nesterov’s accelerated gradient as a linear multistep method by expanding yk in the definition of xk, to get βxk −(1 + β)xk+1 + xk+2 = 1 L (−β(−∇f(xk)) + (1 + β)(−∇f(xk+1))) . Again, assuming as above that the method is consistent to extract h, we identify the linear multistep method associated to Nesterov’s algorithm. After identification, MNest = ρ(z) = β −(1 + β)z + z2, σ(z) = −β(1 −β) + (1 −β2)z, h = 1 L(1 −β), which means that M1 = MNest. 4.3 The convergence rate of Nesterov’s method Pushing the analysis a little bit further, we have a simple intuitive argument that explains why Nesterov’s algorithm is faster than the gradient method. There is of course a complete proof of its rate of convergence [Nesterov, 2013], even using differential equations arguments [Wibisono et al., 2016; Wilson et al., 2016], but we take a simpler approach here. The key parameter is the step size h. If we compare it with the step size in the classical gradient method, Nesterov’s method uses a step size which is (1 −β)−1 ≈ p L/µ times larger. Recall that, in continuous time, the rate of convergence of x(t) to x∗is given by f(x(t)) −f(x∗) ≤e−2µt(f(x0) −f(x∗)). The gradient method tries to approximate x(t) using an Euler scheme with step size h = 1/L, which means x(grad) k ≈x(k/L), so f(x(grad) k ) −f(x∗) ≈f(x(k/L)) −f(x∗) ≤(f(x0) −f(x∗))e−2k µ L . However, Nesterov’s method has a step size equal to hNest = 1 L(1 −β) = 1 + p µ/L 2√µL ≈ 1 √4µL which means xnest k ≈x k/ p 4µL . while maintaining stability. In that case, the estimated rate of convergence becomes f(xnest k ) −f(x∗) ≈f x k/√4µL −f(x∗) ≤(f(x0) −f(x∗))e−k√ µ/L, which is approximatively the rate of convergence of Nesterov’s algorithm in discrete time and we recover the accelerated rate in p µ/L versus µ/L for gradient descent. Overall, the accelerated method is more efficient because it integrates the gradient flow faster than simple gradient descent, making longer steps. A numerical simulation in Figure 1 makes this argument more visual. 5 Generalization and Future Work We showed that accelerated optimization methods can be seen as multistep integration schemes applied to the basic gradient flow equation. Our results give a natural interpretation of acceleration: multistep schemes allow for larger steps, which speeds up convergence. In the Supplementary Material, we detail further links between integration methods and other well-known optimization algorithms such as proximal point methods, mirror gradient decent, proximal gradient descent, and 8 5 5.5 6 6.5 7 6 6.5 7 7.5 8 8.5 9 x0 xstar Exact Euler Nesterov Polyak 5 5.5 6 6.5 6 6.5 7 7.5 8 8.5 9 x0 xstar Exact Euler Nesterov Polyak Figure 1: Integration of a linear ODE with optimal (left) and small (right) step sizes. discuss the weakly convex case. The extra-gradient algorithm and its recent accelerated version Diakonikolas and Orecchia [2017] can also be linked to another family of integration methods called Runge-Kutta which include notably predictor-corrector methods. Our stability analysis is limited to the quadratic case, the definition of A-stability being too restrictive for the class of smooth and strongly convex functions. A more appropriate condition would be Gstability, which extends A-stability to non-linear ODEs, but this condition requires strict monotonicity of the error (which is not the case with accelerated algorithms). Stability may also be tackled by recent advances in lower bound theory provided by Taylor [2017] but these yield numerical rather than analytical convergence bounds. Our next objective is thus to derive a new stability condition in between A-stability and G-stability. Acknowledgments The authors would like to acknowledge support from a starting grant from the European Research Council (ERC project SIPA), from the European Union’s Seventh Framework Programme (FP7PEOPLE-2013-ITN) under grant agreement number 607290 SpaRTaN, an AMX fellowship, as well as support from the chaire Économie des nouvelles données with the data science joint research initiative with the fonds AXA pour la recherche and a gift from Société Générale Cross Asset Quantitative Research. 9 References Allen Zhu, Z. and Orecchia, L. [2017], Linear coupling: An ultimate unification of gradient and mirror descent, in ‘Proceedings of the 8th Innovations in Theoretical Computer Science’, ITCS 17. Beck, A. and Teboulle, M. [2003], ‘Mirror descent and nonlinear projected subgradient methods for convex optimization’, Operations Research Letters 31(3), 167–175. Ben-Tal, A. and Nemirovski, A. [2001], Lectures on modern convex optimization: analysis, algorithms, and engineering applications, SIAM. Bubeck, S., Tat Lee, Y. and Singh, M. [2015], ‘A geometric alternative to nesterov’s accelerated gradient descent’, ArXiv e-prints . Diakonikolas, J. and Orecchia, L. [2017], ‘Accelerated extra-gradient descent: A novel accelerated first-order method’, arXiv preprint arXiv:1706.04680 . Duchi, J. C., Shalev-Shwartz, S., Singer, Y. and Tewari, A. [2010], Composite objective mirror descent., in ‘COLT’, pp. 14–26. Gautschi, W. [2011], Numerical analysis, Springer Science & Business Media. Krichene, W., Bayen, A. and Bartlett, P. L. [2015], Accelerated mirror descent in continuous and discrete time, in ‘Advances in neural information processing systems’, pp. 2845–2853. Lessard, L., Recht, B. and Packard, A. [2016], ‘Analysis and design of optimization algorithms via integral quadratic constraints’, SIAM Journal on Optimization 26(1), 57–95. Nesterov, Y. [1983], A method of solving a convex programming problem with convergence rate o (1/k2), in ‘Soviet Mathematics Doklady’, Vol. 27, pp. 372–376. Nesterov, Y. [2007], ‘Gradient methods for minimizing composite objective function’. Nesterov, Y. [2013], Introductory lectures on convex optimization: A basic course, Vol. 87, Springer Science & Business Media. Nesterov, Y. [2015], ‘Universal gradient methods for convex optimization problems’, Mathematical Programming 152(1-2), 381–404. Polyak, B. T. [1964], ‘Some methods of speeding up the convergence of iteration methods’, USSR Computational Mathematics and Mathematical Physics 4(5), 1–17. Su, W., Boyd, S. and Candes, E. [2014], A differential equation for modeling nesterov’s accelerated gradient method: Theory and insights, in ‘Advances in Neural Information Processing Systems’, pp. 2510–2518. Süli, E. and Mayers, D. F. [2003], An introduction to numerical analysis, Cambridge University Press. Taylor, A. [2017], Convex Interpolation and Performance Estimation of First-order Methods for Convex Optimization, PhD thesis, Université catholique de Louvain. Wibisono, A., Wilson, A. C. and Jordan, M. I. [2016], ‘A variational perspective on accelerated methods in optimization’, Proceedings of the National Academy of Sciences p. 201614734. Wilson, A. C., Recht, B. and Jordan, M. I. [2016], ‘A lyapunov analysis of momentum methods in optimization’, arXiv preprint arXiv:1611.02635 . 10 | 2017 | 494 |
7,001 | The Unreasonable Effectiveness of Structured Random Orthogonal Embeddings Krzysztof Choromanski ∗ Google Brain Robotics kchoro@google.com Mark Rowland ∗ University of Cambridge mr504@cam.ac.uk Adrian Weller University of Cambridge and Alan Turing Institute aw665@cam.ac.uk Abstract We examine a class of embeddings based on structured random matrices with orthogonal rows which can be applied in many machine learning applications including dimensionality reduction and kernel approximation. For both the JohnsonLindenstrauss transform and the angular kernel, we show that we can select matrices yielding guaranteed improved performance in accuracy and/or speed compared to earlier methods. We introduce matrices with complex entries which give significant further accuracy improvement. We provide geometric and Markov chain-based perspectives to help understand the benefits, and empirical results which suggest that the approach is helpful in a wider range of applications. 1 Introduction Embedding methods play a central role in many machine learning applications by projecting feature vectors into a new space (often nonlinearly), allowing the original task to be solved more efficiently. The new space might have more or fewer dimensions depending on the goal. Applications include the Johnson-Lindenstrauss Transform for dimensionality reduction (JLT, Johnson and Lindenstrauss, 1984) and kernel methods with random feature maps (Rahimi and Recht, 2007). The embedding can be costly hence many fast methods have been developed, see §1.1 for background and related work. We present a general class of random embeddings based on particular structured random matrices with orthogonal rows, which we call random ortho-matrices (ROMs); see §2. We show that ROMs may be used for the applications above, in each case demonstrating improvements over previous methods in statistical accuracy (measured by mean squared error, MSE), in computational efficiency (while providing similar accuracy), or both. We highlight the following contributions: • In §3: The Orthogonal Johnson-Lindenstrauss Transform (OJLT) for dimensionality reduction. We prove this has strictly smaller MSE than the previous unstructured JLT mechanisms. Further, OJLT is as fast as the fastest previous JLT variants (which are structured). • In §4: Estimators for the angular kernel (Sidorov et al., 2014) which guarantee better MSE. The angular kernel is important for many applications, including natural language processing (Sidorov et al., 2014), image analysis (Jégou et al., 2011), speaker representations (Schmidt et al., 2014) and tf-idf data sets (Sundaram et al., 2013). • In §5: Two perspectives on the effectiveness of ROMs to help build intuitive understanding. In §6 we provide empirical results which support our analysis, and show that ROMs are effective for a still broader set of applications. Full details and proofs of all results are in the Appendix. ∗equal contribution 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1.1 Background and related work Our ROMs can have two forms (see §2 for details): (i) a Gort is a random Gaussian matrix conditioned on rows being orthogonal; or (ii) an SD-product matrix is formed by multiplying some number k of SD blocks, each of which is highly structured, typically leading to fast computation of products. Here S is a particular structured matrix, and D is a random diagonal matrix; see §2 for full details. Our SD block generalizes an HD block, where H is a Hadamard matrix, which received previous attention. Earlier approaches to embeddings have explored using various structured matrices, including particular versions of one or other of our two forms, though in different contexts. For dimensionality reduction, Ailon and Chazelle (2006) used a single HD block as a way to spread out the mass of a vector over all dimensions before applying a sparse Gaussian matrix. Choromanski and Sindhwani (2016) also used just one HD block as part of a larger structure. Bojarski et al. (2017) discussed using k = 3 HD blocks for locality-sensitive hashing methods but gave no concrete results for their application to dimensionality reduction or kernel approximation. All these works, and other earlier approaches (Hinrichs and Vybíral, 2011; Vybíral, 2011; Zhang and Cheng, 2013; Le et al., 2013; Choromanska et al., 2016), provided computational benefits by using structured matrices with less randomness than unstructured iid Gaussian matrices, but none demonstrated accuracy gains. Yu et al. (2016) were the first to show that Gort-type matrices can yield improved accuracy, but their theoretical result applies only asymptotically for many dimensions, only for the Gaussian kernel and for just one specific orthogonal transformation, which is one instance of the larger class we consider. Their theoretical result does not yield computational benefits. Yu et al. (2016) did explore using a number k of HD blocks empirically, observing good computational and statistical performance for k = 3, but without any theoretical accuracy guarantees. It was left as an open question why matrices formed by a small number of HD blocks can outperform non-discrete transforms. In contrast, we are able to prove that ROMs yield improved MSE in several settings and for many of them for any number of dimensions. In addition, SD-product matrices can deliver computational speed benefits. We provide initial analysis to understand why k = 3 can outperform the state-ofthe-art, why odd k yields better results than even k, and why higher values of k deliver decreasing additional benefits (see §3 and §5). 2 The family of Random Ortho-Matrices (ROMs) Random ortho-matrices (ROMs) are taken from two main classes of distributions defined below that require the rows of sampled matrices to be orthogonal. A central theme of the paper is that this orthogonal structure can yield improved statistical performance. We shall use bold uppercase (e.g. M) to denote matrices and bold lowercase (e.g. x) for vectors. Gaussian orthogonal matrices. Let G be a random matrix taking values in Rm×n with iid N(0, 1) elements, which we refer to as an unstructured Gaussian matrix. The first ROM distribution we consider yields the random matrix Gort, which is defined as a random Rn×n matrix given by first taking the rows of the matrix to be a uniformly random orthonormal basis, and then independently scaling each row, so that the rows marginally have multivariate Gaussian N(0, I) distributions. The random variable Gort can then be extended to non-square matrices by either stacking independent copies of the Rn×n random matrices, and deleting superfluous rows if necessary. The orthogonality of the rows of this matrix has been observed to yield improved statistical properties for randomized algorithms built from the matrix in a variety of applications. SD-product matrices. Our second class of distributions is motivated by the desire to obtain similar statistical benefits of orthogonality to Gort, whilst gaining computational efficiency by employing more structured matrices. We call this second class SD-product matrices. These take the more structured form Qk i=1 SDi, where S = {si,j} ∈Rn×n has orthogonal rows, |si,j| = 1 √n ∀i, j ∈ {1, . . . , n}; and the (Di)k i=1 are independent diagonal matrices described below. By Qk i=1 SDi, we mean the matrix product (SDk) . . . (SD1). This class includes as particular cases several recently introduced random matrices (e.g. Andoni et al., 2015; Yu et al., 2016), where good empirical performance was observed. We go further to establish strong theoretical guarantees, see §3 and §4. 2 A prominent example of an S matrix is the normalized Hadamard matrix H, defined recursively by H1 = (1), and then for i > 1, Hi = 1 √ 2 Hi−1 Hi−1 Hi−1 −Hi−1 . Importantly, matrix-vector products with H are computable in O(n log n) time via the fast Walsh-Hadamard transform, yielding large computational savings. In addition, H matrices enable a significant space advantage: since the fast Walsh-Hadamard transform can be computed without explicitly storing H, only O(n) space is required to store the diagonal elements of (Di)k i=1. Note that these Hn matrices are defined only for n a power of 2, but if needed, one can always adjust data by padding with 0s to enable the use of ‘the next larger’ H, doubling the number of dimensions in the worst case. Matrices H are representatives of a much larger family in S which also attains computational savings. These are L2-normalized versions of Kronecker-product matrices of the form A1 ⊗... ⊗Al ∈Rn×n for l ∈N, where ⊗stands for a Kronecker product and blocks Ai ∈Rd×d have entries of the same magnitude and pairwise orthogonal rows each. For these matrices, matrix-vector products are computable in O(n(2d −1) logd(n)) time (Zhang et al., 2015). S includes also the Walsh matrices W = {wi,j} ∈Rn×n, where wi,j = 1 √n(−1)iN−1j0+...+i0jN−1 and iN−1...i0, jN−1...j0 are binary representations of i and j respectively. For diagonal (Di)k i=1, we mainly consider Rademacher entries leading to the following matrices. Definition 2.1. The S-Rademacher random matrix with k ∈N blocks is below, where (D(R) i )k i=1 are diagonal with iid Rademacher random variables [i.e. Unif({±1})] on the diagonals: M(k) SR = k Y i=1 SD(R) i . (1) Having established the two classes of ROMs, we next apply them to dimensionality reduction. 3 The Orthogonal Johnson-Lindenstrauss Transform (OJLT) Let X ⊂Rn be a dataset of n-dimensional real vectors. The goal of dimensionality reduction via random projections is to transform linearly each x ∈X by a random mapping x F7→x′, where: F : Rn →Rm for m < n, such that for any x, y ∈X the following holds: (x′)⊤y′ ≈x⊤y. If we furthermore have E[(x′)⊤y′] = x⊤y then the dot-product estimator is unbiased. In particular, this dimensionality reduction mechanism should in expectation preserve information about vectors’ norms, i.e. we should have: E[∥x′∥2 2] = ∥x∥2 2 for any x ∈X. The standard JLT mechanism uses the randomized linear map F = 1 √mG, where G ∈Rm×n is as in §2, requiring mn multiplications to evaluate. Several fast variants (FJLTs) have been proposed by replacing G with random structured matrices, such as sparse or circulant Gaussian matrices (Ailon and Chazelle, 2006; Hinrichs and Vybíral, 2011; Vybíral, 2011; Zhang and Cheng, 2013). The fastest of these variants has O(n log n) time complexity, but at a cost of higher MSE for dot-products. Our Orthogonal Johnson-Lindenstrauss Transform (OJLT) is obtained by replacing the unstructured random matrix G with a sub-sampled ROM from §2: either Gort, or a sub-sampled version M(k),sub SR of the S-Rademacher ROM, given by sub-sampling rows from the left-most S matrix in the product. We sub-sample since m < n. We typically assume uniform sub-sampling without replacement. The resulting dot-product estimators for vectors x, y ∈X are given by: bKbase m (x, y) = 1 m(Gx)⊤(Gy) [unstructured iid baseline, previous state-of-the-art accuracy], bKort m (x, y) = 1 m(Gortx)⊤(Gorty), bK(k) m (x, y) = 1 m M(k),sub SR x ⊤ M(k),sub SR y . (2) We contribute the following closed-form expressions, which exactly quantify the mean-squared error (MSE) for these three estimators. Precisely, the MSE of an estimator bK(x, y) of the inner product ⟨x, y⟩for x, y ∈X is defined to be MSE( bK(x, y)) = E h ( bK(x, y) −⟨x, y⟩2) i . See the Appendix for detailed proofs of these results and all others in this paper. 3 Lemma 3.1. The MSE of the unstructured JLT dot-product estimator bKbase m of x, y ∈Rn using mdimensional random feature maps is unbiased, with MSE( bKbase m (x, y)) = 1 m((x⊤y)2 +∥x∥2 2∥y∥2 2). Theorem 3.2. The estimator bKort m is unbiased and satisfies, for n ≥4: MSE( bKort m (x, y)) =MSE( bKbase m (x, y)) + m m −1 ∥x∥2 2∥y∥2 2n2 4I(n −3)I(n −4) 1 n − 1 n + 2 (I(n −3) −I(n −1))I(n −4) cos2(θ) + 1 2 + I(n −1) (I(n −4) −I(n −2)) 1 n −2 −1 n cos2(θ) −1 2 −⟨x, y⟩2 , (3) where I(n) = R π 0 sinn(x)dx = √πΓ((n+1)/2) Γ(n/2+1) . Theorem 3.3 (Key result). The OJLT estimator bK(k) m (x, y) with k blocks, using m-dimensional random feature maps and uniform sub-sampling policy without replacement, is unbiased with MSE( bK(k) m (x, y))= 1 m n −m n −1 ((x⊤y)2 + ∥x∥2∥y∥2) + (4) k−1 X r=1 (−1)r2r nr (2(x⊤y)2 + ∥x∥2∥y∥2) + (−1)k2k nk−1 n X i=1 x2 i y2 i . Proof (Sketch). For k = 1, the random projection matrix is given by sub-sampling rows from SD1, and the computation can be carried out directly. For k ≥1, the proof proceeds by induction. The random projection matrix in the general case is given by sub-sampling rows of the matrix SDk · · · SD1. By writing the MSE as an expectation and using the law of conditional expectations conditioning on the value of the first k −1 random matrices Dk−1, . . . , D1, the statement of the theorem for 1 SD block and for k −1 SD blocks can be neatly combined to yield the result. To our knowledge, it has not previously been possible to provide theoretical guarantees that SD-product matrices outperform iid matrices. Combining Lemma 3.1 with Theorem 3.3 yields the following important result. Corollary 3.4 (Theoretical guarantee of improved performance). Estimators bK(k) m (subsampling without replacement) yield guaranteed lower MSE than bKbase m . It is not yet clear when bKort m is better or worse than bK(k) m ; we explore this empirically in §6. Theorem 3.3 shows that there are diminishing MSE benefits to using a large number k of SD blocks. Interestingly, odd k is better than even: it is easy to observe that MSE( bK(2k−1) m (x, y)) < MSE( bK(2k) m (x, y)) > MSE( bK(2k+1) m (x, y)). These observations, and those in §5, help to understand why empirically k = 3 was previously observed to work well (Yu et al., 2016). If we take S to be a normalized Hadamard matrix H, then even though we are using sub-sampling, and hence the full computational benefits of the Walsh-Hadamard transform are not available, still bK(k) m achieves improved MSE compared to the base method with less computational effort, as follows. Lemma 3.5. There exists an algorithm (see Appendix for details) which computes an embedding for a given datapoint x using bK(k) m with S set to H and uniform sub-sampling policy in expected time min{O((k −1)n log(n) + nm −(m−1)m 2 , kn log(n)}. Note that for m = ω(k log(n)) or if k = 1, the time complexity is smaller than the brute force Θ(nm). The algorithm uses a simple observation that one can reuse calculations conducted for the upper half of the Hadamard matrix while performing computations involving rows from its other half, instead of running these calculations from scratch (details in the Appendix). An alternative to sampling without replacement is deterministically to choose the first m rows. In our experiments in §6, these two approaches yield the same empirical performance, though we expect 4 that the deterministic method could perform poorly on adversarially chosen data. The first m rows approach can be realized in time O(n log(m) + (k −1)n log(n)) per datapoint. Theorem 3.3 is a key result in this paper, demonstrating that SD-product matrices yield both statistical and computational improvements compared to the base iid procedure, which is widely used in practice. We next show how to obtain further gains in accuracy. 3.1 Complex variants of the OJLT We show that the MSE benefits of Theorem 3.3 may be markedly improved by using SD-product matrices with complex entries M(k) SH. Specifically, we consider the variant S-Hybrid random matrix below, where D(U) k is a diagonal matrix with iid Unif(S1) random variables on the diagonal, independent of (D(R) i )k−1 i=1 , and S1 is the unit circle of C. We use the real part of the Hermitian product between projections as a dot-product estimator; recalling the definitions of §2, we use: M(k) SH = SD(U) k k−1 Y i=1 SD(R) i , bKH,(k) m (x, y) = 1 m Re M(k),sub SH x ⊤ M(k),sub SH y . (5) Remarkably, this complex variant yields exactly half the MSE of the OJLT estimator. Theorem 3.6. The estimator bKH,(k) m (x, y), applying uniform sub-sampling without replacement, is unbiased and satisfies: MSE( bKH,(k) m (x, y)) = 1 2MSE( bK(k) m (x, y)). This large factor of 2 improvement could instead be obtained by doubling m for bK(k) m . However, this would require doubling the number of parameters for the transform, whereas the S-Hybrid estimator requires additional storage only for the complex parameters in the matrix D(U) k . Strikingly, it is straightforward to extend the proof of Theorem 3.6 (see Appendix) to show that rather than taking the complex random variables in M(k),sub SH to be Unif(S1), it is possible to take them to be Unif({1, −1, i, −i}) and still obtain exactly the same benefit in MSE. Theorem 3.7. For the estimator bKH,(k) m defined in Equation (5): replacing the random matrix D(U) k (which has iid Unif(S1) elements on the diagonal) with instead a random diagonal matrix having iid Unif({1, −1, i, −i}) elements on the diagonal, does not affect the MSE of the estimator. It is natural to wonder if using an SD-product matrix with more complex random variables (for all SD blocks) would improve performance still further. However, interestingly, this appears not to be the case; details are provided in the Appendix §8.7. 3.2 Sub-sampling with replacement Our results above focus on SD-product matrices where rows have been sub-sampled without replacement. Sometimes (e.g. for parallelization) it can be convenient instead to sub-sample with replacement. As might be expected, this leads to worse MSE, which we can quantify precisely. Theorem 3.8. For each of the estimators bK(k) m and bKH,(k) m , if uniform sub-sampling with (rather than without) replacement is used then the MSE is worsened by a multiplicative constant of n−1 n−m. 4 Kernel methods with ROMs ROMs can also be used to construct high-quality random feature maps for non-linear kernel approximation. We analyze here the angular kernel, an important example of a Pointwise Nonlinear Gaussian kernel (PNG), discussed in more detail at the end of this section. Definition 4.1. The angular kernel Kang is defined on Rn by Kang(x, y) = 1 −2θx,y π , where θx,y is the angle between x and y. 5 To employ random feature style approximations to this kernel, we first observe it may be rewritten as Kang(x, y) = E [sign(Gx)sign(Gy)] , where G ∈R1×n is an unstructured isotropic Gaussian vector. This motivates approximations of the form: bKangm(x, y) = 1 msign(Mx)⊤sign(My), (6) where M ∈Rm×n is a random matrix, and the sign function is applied coordinate-wise. Such kernel estimation procedures are heavily used in practice (Rahimi and Recht, 2007), as they allow fast approximate linear methods to be used (Joachims, 2006) for inference tasks. If M = G, the unstructured Gaussian matrix, then we obtain the standard random feature estimator. We shall contrast this approach against the use of matrices from the ROMs family. When constructing random feature maps for kernels, very often m > n. In this case, our structured mechanism can be applied by concatenating some number of independent structured blocks. Our theoretical guarantees will be given just for one block, but can easily be extended to a larger number of blocks since different blocks are independent. The standard random feature approximation bKang,base m for approximating the angular kernel is defined by taking M to be G, the unstructured Gaussian matrix, in Equation (6), and satisfies the following. Lemma 4.2. The estimator bKang,base m is unbiased and MSE( bKang,base m (x, y)) = 4θx,y(π−θx,y) mπ2 . The MSE of an estimator bKang(x, y) of the true angular kernel Kang(x, y) is defined analogously to the MSE of an estimator of the dot product, given in §3. Our main result regarding angular kernels states that if we instead take M = Gort in Equation (6), then we obtain an estimator bKang,ort m with strictly smaller MSE, as follows. Theorem 4.3. Estimator bKang,ort m is unbiased and satisfies: MSE( bKang,ort m (x, y)) < MSE( bKang,base m (x, y)). We also derive a formula for the MSE of an estimator bKang,M m of the angular kernel which replaces G with an arbitrary random matrix M and uses m random feature maps. The formula is helpful to see how the quality of the estimator depends on the probabilities that the projections of the rows of M are contained in some particular convex regions of the 2-dimensional space Lx,y spanned by datapoints x and y. For an illustration of the geometric definitions introduced in this Section, see Figure 1. The formula depends on probabilities involving events Ai = {sgn((ri)T x) ̸= sgn((ri)T y)}, where ri stands for the ith row of the structured matrix. Notice that Ai = {ri proj ∈Cx,y}, where ri proj stands for the projection of ri into Lx,y and Cx,y is the union of two cones in Lx,y, each of angle θx,y. Theorem 4.4. Estimator bKang,M m satisfies the following, where: δi,j = P[Ai ∩Aj] −P[Ai]P[Aj]: MSE( bKang,M m (x, y)) = 1 m2 " m − m X i=1 (1 −2P[Ai])2 # + 4 m2 m X i=1 (P[Ai] −θx,y π )2 + X i̸=j δi,j . Note that probabilities P[Ai] and δi,j depend on the choice of M. It is easy to prove that for unstructured G and Gort we have: P[Ai] = θx,y π . Further, from the independence of the rows of G, δi,j = 0 for i ̸= j. For unstructured G we obtain Lemma 4.2. Interestingly, we see that to prove Theorem 4.3, it suffices to show δi,j < 0, which is the approach we take (see Appendix). If we replace G with M(k) SR, then the expression ϵ = P[Ai] −θx,y π does not depend on i. Hence, the angular kernel estimator based on Hadamard matrices gives smaller MSE estimator if and only if P i̸=j δi,j + mϵ2 < 0. It is not yet clear if this holds in general. As alluded to at the beginning of this section, the angular kernel may be viewed as a member of a wie family of kernels known as Pointwise Nonlinear Gaussian kernels. 6 Figure 1: Left part: Left: g1 is orthogonal to Lx,y. Middle: g1 ∈Lx,y. Right: g1 is close to orthogonal to Lx,y. Right part: Visualization of the Cayley graph explored by the Hadamard-Rademacher process in two dimensions. Nodes are colored red, yellow, light blue, dark blue, for Cayley distances of 0, 1, 2, 3 from the identity matrix respectively. See text in §5. Definition 4.5. For a given function f, the Pointwise Nonlinear Gaussian kernel (PNG) Kf is defined by Kf(x, y) = E f(gT x)f(gT y) , where g is a Gaussian vector with i.i.d N(0, 1) entries. Many prominent examples of kernels (Williams, 1998; Cho and Saul, 2009) are PNGs. Wiener’s tauberian theorem shows that all stationary kernels may be approximated arbitrarily well by sums of PNGs (Samo and Roberts, 2015). In future work we hope to explore whether ROMs can be used to achieve statistical benefit in estimation tasks associated with a wider range of PNGs. 5 Understanding the effectiveness of orthogonality Here we build intuitive understanding for the effectiveness of ROMs. We examine geometrically the angular kernel (see §4), then discuss a connection to random walks over orthogonal matrices. Angular kernel. As noted above for the Gort-mechanism, smaller MSE than that for unstructured G is implied by the inequality P[Ai ∩Aj] < P[Ai]P[Aj], which is equivalent to: P[Aj|Ai] < P[Aj]. Now it becomes clear why orthogonality is crucial. Without loss of generality take: i = 1, j = 2, and let g1 and g2 be the first two rows of Gort. Consider first the extreme case (middle of left part of Figure 1), where all vectors are 2-dimensional. Recall definitions from just after Theorem 4.3. If g1 is in Cx,y then it is much less probable for g2 also to belong to Cx,y. In particular, if θ < π 2 then the probability is zero. That implies the inequality. On the other hand, if g1 is perpendicular to Lx,y then conditioning on Ai does not have any effect on the probability that g2 belongs to Cx,y (left subfigure of Figure 1). In practice, with high probability the angle φ between g1 and Lx,y is close to π 2 , but is not exactly π 2 . That again implies that conditioned on the projection g1 p of g1 into Lx,y to be in Cx,y, the more probable directions of g2 p are perpendicular to g1 p (see: ellipsoid-like shape in the right subfigure of Figure 1 which is the projection of the sphere taken from the (n −1)-dimensional space orthogonal to g1 into Lx,y). This makes it less probable for g2 p to be also in Cx,y. The effect is subtle since φ ≈π 2 , but this is what provides superiority of the orthogonal transformations over state-of-the-art ones in the angular kernel approximation setting. Markov chain perspective. We focus on Hadamard-Rademacher random matrices HDk...HD1, a special case of the SD-product matrices described in Section 2. Our aim is to provide intuition for how the choice of k affects the quality of the random matrix, following our earlier observations just after Corollary 3.4, which indicated that for SD-product matrices, odd values of k yield greater benefits than even values, and that there are diminishing benefits from higher values of k. We proceed by casting the random matrices into the framework of Markov chains. Definition 5.1. The Hadamard-Rademacher process in n dimensions is the Markov chain (Xk)∞ k=0 taking values in the orthogonal group O(n), with X0 = I almost surely, and Xk = HDkXk−1 almost surely, where H is the normalized Hadamard matrix in n dimensions, and (Dk)∞ k=1 are iid diagonal matrices with independent Rademacher random variables on their diagonals. Constructing an estimator based on Hadamard-Rademacher matrices is equivalent to simulating several time steps from the Hadamard-Rademacher process. The quality of estimators based on Hadamard-Rademacher random matrices comes from a quick mixing property of the corresponding 7 (a) g50c - pointwise evaluation MSE for inner product estimation (b) random - angular kernel (c) random - angular kernel with true angle π/4 (d) g50c - inner product estimation MSE for variants of 3-block SD-product matrices. (e) LETTER - dot-product (f) USPS - dot-product (g) LETTER - angular kernel (h) USPS - angular kernel Figure 2: Top row: MSE curves for pointwise approximation of inner product and angular kernels on the g50c dataset, and randomly chosen vectors. Bottom row: Gram matrix approximation error for a variety of data sets, projection ranks, transforms, and kernels. Note that the error scaling is dependent on the application. Markov chain. The following demonstrates attractive properties of the chain in low dimensions. Proposition 5.2. The Hadamard-Rademacher process in two dimensions: explores a state-space of 16 orthogonal matrices, is ergodic with respect to the uniform distribution on this set, has period 2, the diameter of the Cayley graph of its state space is 3, and the chain is fully mixed after 3 time steps. This proposition, and the Cayley graph corresponding to the Markov chain’s state space (Figure 1 right), illustrate the fast mixing properties of the Hadamard-Rademacher process in low dimensions; this agrees with the observations in §3 that there are diminishing returns associated with using a large number k of HD blocks in an estimator. The observation in Proposition 5.2 that the Markov chain has period 2 indicates that we should expect different behavior for estimators based on odd and even numbers of blocks of HD matrices, which is reflected in the analytic expressions for MSE derived in Theorems 3.3 and 3.6 for the dimensionality reduction setup. 6 Experiments We present comparisons of estimators introduced in §3 and §4, illustrating our theoretical results, and further demonstrating the empirical success of ROM-based estimators at the level of Gram matrix approximation. We compare estimators based on: unstructured Gaussian matrices G, matrices Gort, S-Rademacher and S-Hybrid matrices with k = 3 and different sub-sampling strategies. Results for k > 3 do not show additional statistical gains empirically. Additional experimental results, including a comparison of estimators using different numbers of SD blocks, are in the Appendix §10. Throughout, we use the normalized Hadamard matrix H for the structured matrix S. 6.1 Pointwise kernel approximation Complementing the theoretical results of §3 and §4, we provide several salient comparisons of the various methods introduced - see Figure 2 top. Plots presented here (and in the Appendix) compare MSE for dot-product and angular and kernel. They show that estimators based on Gort, S-Hybrid and S-Rademacher matrices without replacement, or using the first m rows, beat the state-of-the-art unstructured G approach on accuracy for all our different datasets in the JLT setup. Interestingly, the latter two approaches give also smaller MSE than Gort-estimators. For angular kernel estimation, where sampling is not relevant, we see that Gort and S-Rademacher approaches again outperform the ones based on matrices G. 8 6.2 Gram matrix approximation Moving beyond the theoretical guarantees established in §3 and §4, we show empirically that the superiority of estimators based on ROMs is maintained at the level of Gram matrix approximation. We compute Gram matrix approximations (with respect to both standard dot-product, and angular kernel) for a variety of datasets. We use the normalized Frobenius norm error ∥K −bK∥2/∥K∥2 as our metric (as used by Choromanski and Sindhwani, 2016), and plot the mean error based on 1,000 repetitions of each random transform - see Figure 2 bottom. The Gram matrices are computed on a randomly selected subset of 550 data points from each dataset. As can be seen, the S-Hybrid estimators using the “no-replacement” or “first m rows” sub-sampling strategies outperform even the orthogonal Gaussian ones in the dot-product case. For the angular case, the Gort-approach and S-Rademacher approach are practically indistinguishable. 7 Conclusion We defined the family of random ortho-matrices (ROMs). This contains the SD-product matrices, which include a number of recently proposed structured random matrices. We showed theoretically and empirically that ROMs have strong statistical and computational properties (in several cases outperforming previous state-of-the-art) for algorithms performing dimensionality reduction and random feature approximations of kernels. We highlight Corollary 3.4, which provides a theoretical guarantee that SD-product matrices yield better accuracy than iid matrices in an important dimensionality reduction application (we believe the first result of this kind). Intriguingly, for dimensionality reduction, using just one complex structured matrix yields random features of much better quality. We provided perspectives to help understand the benefits of ROMs, and to help explain the behavior of SD-product matrices for various numbers of blocks. Our empirical findings suggest that our theoretical results might be further strengthened, particularly in the kernel setting. Acknowledgements We thank Vikas Sindhwani at Google Brain Robotics and Tamas Sarlos at Google Research for inspiring conversations that led to this work. We thank Matej Balog, Maria Lomeli, Jiri Hron and Dave Janz for helpful comments. MR acknowledges support by the UK Engineering and Physical Sciences Research Council (EPSRC) grant EP/L016516/1 for the University of Cambridge Centre for Doctoral Training, the Cambridge Centre for Analysis. AW acknowledges support by the Alan Turing Institute under the EPSRC grant EP/N510129/1, and by the Leverhulme Trust via the CFI. 9 References N. Ailon and B. Chazelle. Approximate nearest neighbors and the fast Johnson-Lindenstrauss transform. In STOC, 2006. A. Andoni, P. Indyk, T. Laarhoven, I. Razenshteyn, and L. Schmidt. Practical and optimal LSH for angular distance. In NIPS, 2015. M. Bojarski, A. Choromanska, K. Choromanski, F. Fagan, C. Gouy-Pailler, A. Morvan, N. Sakr, T. Sarlos, and J. Atif. Structured adaptive and random spinners for fast machine learning computations. In to appear in AISTATS, 2017. Y. Cho and L. K. Saul. Kernel methods for deep learning. In NIPS, 2009. A. Choromanska, K. Choromanski, M. Bojarski, T. Jebara, S. Kumar, and Y. LeCun. Binary embeddings with structured hashed projections. In ICML, 2016. K. Choromanski and V. Sindhwani. Recycling randomness with structure for sublinear time kernel expansions. In ICML, 2016. A. Hinrichs and J. Vybíral. Johnson-Lindenstrauss lemma for circulant matrices. Random Structures & Algorithms, 39(3):391–398, 2011. H. Jégou, M. Douze, and C. Schmid. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(1):117–128, 2011. Thorsten Joachims. Training linear svms in linear time. In Proceedings of the 12th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’06, pages 217–226, New York, NY, USA, 2006. ACM. ISBN 1-59593-339-5. doi: 10.1145/1150402.1150429. URL http://doi.acm.org/10. 1145/1150402.1150429. W. Johnson and J. Lindenstrauss. Extensions of Lipschitz mappings into a Hilbert space. Contemporary Mathematics, 26:189–206, 1984. Q. Le, T. Sarlós, and A. Smola. Fastfood - approximating kernel expansions in loglinear time. In ICML, 2013. A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2007. Y.-L. K. Samo and S. Roberts. Generalized spectral kernels. CoRR, abs/1506.02236, 2015. L. Schmidt, M. Sharifi, and I. Moreno. Large-scale speaker identification. In Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on, pages 1650–1654. IEEE, 2014. G. Sidorov, A. Gelbukh, H. Gómez-Adorno, and D. Pinto. Soft similarity and soft cosine measure: Similarity of features in vector space model. Computación y Sistemas, 18(3), 2014. N. Sundaram, A. Turmukhametova, N. Satish, T. Mostak, P. Indyk, S. Madden, and P. Dubey. Streaming similarity search over one billion tweets using parallel locality-sensitive hashing. Proceedings of the VLDB Endowment, 6(14):1930–1941, 2013. J. Vybíral. A variant of the Johnson-Lindenstrauss lemma for circulant matrices. Journal of Functional Analysis, 260(4):1096–1105, 2011. C. Williams. Computation with infinite neural networks. Neural Computation, 10(5):1203–1216, 1998. F. Yu, A. Suresh, K. Choromanski, D. Holtmann-Rice, and S. Kumar. Orthogonal random features. In NIPS, pages 1975–1983, 2016. H. Zhang and L. Cheng. New bounds for circulant Johnson-Lindenstrauss embeddings. CoRR, abs/1308.6339, 2013. Xu Zhang, Felix X. Yu, Ruiqi Guo, Sanjiv Kumar, Shengjin Wang, and Shih-Fu Chang. Fast orthogonal projection based on kronecker product. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, pages 2929–2937, 2015. doi: 10.1109/ICCV.2015.335. URL http://dx.doi.org/10.1109/ICCV.2015.335. 10 | 2017 | 495 |
7,002 | A KL-LUCB Bandit Algorithm for Large-Scale Crowdsourcing Ervin Tánczos∗and Robert Nowak† University of Wisconsin-Madison tanczos@wisc.edu, rdnowak@wisc.edu Bob Mankoff Former Cartoon Editor of the New Yorker bmankoff@hearst.com Abstract This paper focuses on best-arm identification in multi-armed bandits with bounded rewards. We develop an algorithm that is a fusion of lil-UCB and KL-LUCB, offering the best qualities of the two algorithms in one method. This is achieved by proving a novel anytime confidence bound for the mean of bounded distributions, which is the analogue of the LIL-type bounds recently developed for sub-Gaussian distributions. We corroborate our theoretical results with numerical experiments based on the New Yorker Cartoon Caption Contest. 1 Multi-Armed Bandits for Large-Scale Crowdsourcing This paper develops a new multi-armed bandit (MAB) for large-scale crowdsourcing, in the style of the KL-UCB [4, 9, 3]. Our work is strongly motivated by crowdsourcing contests, like the New Yorker Cartoon Caption contest [10]3. The new approach targets the “best-arm identification problem” [1] in the fixed confidence setting and addresses two key limitations of existing theory and algorithms: (i) State of the art algorithms for best arm identification are based on sub-Gaussian confidence bounds [5] and fail to exploit the fact that rewards are usually bounded in crowdsourcing applications. (ii) Existing KL-UCB algorithms for best-arm identification do exploit bounded rewards [8] , but have suboptimal performance guarantees in the fixed confidence setting, both in terms of dependence on problem-dependent hardness parameters (Chernoff information) and on the number of arms, which can be large in crowdsourcing applications. The new algorithm we propose and analyze is called lil-KLUCB, since it is inspired by the lil-UCB algorithm [5] and the KL-LUCB algorithm [8]. The lil-UCB algorithm is based on sub-Gaussian bounds and has a sample complexity for best-arm identification that scales as X i≥2 ∆−2 i log(δ−1 log ∆−2 i ) , where δ ∈(0, 1) is the desired confidence and ∆i = µ1 −µi is the gap between the means of the best arm (denoted as arm 1) and arm i. If the rewards are in [0, 1], then the KL-LUCB algorithm has †This work was partially supported by the NSF grant IIS-1447449 and the AFSOR grant FA9550-13-1-0138. 3For more details on the New Yorker Cartoon Caption Contest, see the Supplementary Materials. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. a sample complexity scaling essentially like4 X i≥2 (D∗ i )−1 log(nδ−1(D∗ i )−1) , where n is the number of arms and D∗ i := D∗(µ1, µi) is the Chernoff-information between a Ber(µ1) and a Ber(µi) random variable5. Ignoring the logarithmic factor, this bound is optimal for the case of Bernoulli rewards [7, 11]. Comparing these two bounds, we observe that KL-LUCB may offer benefits since D∗ i = D∗(µ1, µi) ≥(µ1 −µi)2/2 = ∆2 i /2, but lil-UCB has better logarithmic dependence on the ∆2 i and no explicit dependence on the number of arms n. Our new algorithm lil-KLUCB offers the best of both worlds, providing a sample complexity that scales essentially like X i≥2 (D∗ i )−1 log(δ−1 log(D∗ i )−1) . The key to this result is a novel anytime confidence bound for sums of bounded random variables, which requires a significant departure from previous analyses of KL-based confidence bounds. The practical benefit of lil-KLUCB is illustrated in terms of the New Yorker Caption Contest problem [10]. The goal of that crowdsourcing task is to identify the funniest cartoon caption from a batch of n ≈5000 captions submitted to the contest each week. The crowd provides “3-star” ratings for the captions, which can be mapped to {0, 1/2, 1}, for example. Unfortunately, many of the captions are not funny, getting average ratings close to 0 (and consequently very small variances). This fact, however, is ideal for KL-based confidence intervals, which are significantly tighter than those based on sub-Gaussianity and the worst-case variance of 1/4. Compared to existing methods, the lil-KLUCB algorithm better addresses the two key features in this sort of application: (1) a very large number of arms, and (2) bounded reward distributions which, in many cases, have very low variance. In certain instances, this can have a profound effect on sample complexity (e.g., O(n2) complexity for algorithms using sub-Gaussian bounds vs. O(n log n) for lil-KLUCB, as shown in Table 1). The paper is organized as follows. Section 2 defines the best-arm identification problem, gives the lil-KLUCB algorithm and states the main results. We also briefly review related literature, and compare the performance of lil-KLUCB to that of previous algorithms. Section 3 provides the main technical contribution of the paper, a novel anytime confidence bound for sums of bounded random variables. Section 4 analyzes the performance of the lil-KLUCB algorithm. Section 5 provides experimental support for the lil-KLUCB algorithm using data from the New Yorker Caption Contest. 2 Problem Statement and Main Results Consider a MAB problem with n arms. We use the shorthand notation [n] := {1, . . . , n}. For every i ∈[n] let {Xi,j}j∈N denote the reward sequence of arm i, and suppose that P(Xi,j ∈[0, 1]) = 1 for all i ∈[n], j ∈N. Furthermore, assume that all rewards are independent, and that Xi,j ∼Pi for all j ∈N. Let the mean reward of arm i be denoted by µi and assume w.l.o.g. that µ1 > µ2 ≥· · · ≥µn. We focus on the best-arm identification problem in the fixed-confidence setting. At every time t ∈N we are allowed to select an arm to sample (based on past rewards) and observe the next element in its reward sequence. Based on the observed rewards, we wish to find the arm with the highest mean reward. In the fixed confidence setting, we prescribe a probability of error δ ∈(0, 1) and our goal is to construct an algorithm that finds the best arm with probability at least 1 −δ. Among 1 −δ accurate algorithms, one naturally favors those that require fewer samples. Hence proving upper bounds on the sample complexity of a candidate algorithm is of prime importance. The lil-KLUCB algorithm that we propose is a fusion of lil-UCB [5] and KL-LUCB [8], and its operation is essentially a special instance of LUCB++ [11]. At each time step t, let Ti(t) denote the total number of samples drawn from arm i so far, and let bµi,Ti(t) denote corresponding empirical mean. The algorithm is based on lower and upper confidence bounds of the following general form: 4A more precise characterization of the sample complexity is given in Section 2. 5The Chernoff-information between random variables Ber(x) and Ber(y) (0 < x < y < 1) is D∗(x, y) = D(z∗, x) = D(z∗, y), where D(z, x) = z log z x + (1 −z) log 1−z 1−x and z∗is the unique z ∈(x, y) such that D(z, x) = D(z, y). 2 for each i ∈[n] and any δ ∈(0, 1) Li(t, δ) = inf m < bµi,Ti(t) : D bµi,Ti(t), m ≤c log (κ log2(2Ti(t))/δ) Ti(t) Ui(t, δ) = sup m > bµi,Ti(t) : D bµi,Ti(t), m ≤c log (κ log2(2Ti(t))/δ) Ti(t) where c and κ are small constants (defined in the next section). These bounds are designed so that with probability at least 1 −δ, Li(Ti(t), δ) ≤µi ≤Ui(Ti(t), δ) holds for all t ∈N. For any t ∈N let TOP(t) be the index of the arm with the highest empirical mean, breaking ties at random. With this notation, we state the lil-KLUCB algorithm and our main theoretical result. lil-KLUCB 1. Initialize by sampling every arm once. 2. While LTOP(t)(TTOP(t)(t), δ/(n −1)) ≤ max i̸=TOP(t)Ui(Ti(t), δ) do: • Sample the following two arms: – TOP(t), and – arg max i̸=TOP(t)Ui(Ti(t), δ) and update means and confidence bounds. 3. Output TOP(t) Theorem 1. For every i ≥2 let eµi ∈(µi, µ1), and eµ = maxi≥2 eµi. With probability at least 1 −2δ, lil-KLUCB returns the arm with the largest mean and the total number of samples it collects is upper bounded by inf eµ2,...,eµn c0 log (n −1)δ−1 log D∗(µ1, eµ)−1 D∗(µ1, eµ) + X i≥2 c0 log δ−1 log D∗(µi, eµi)−1 D∗(µi, eµi) , where c0 is some universal constant, D∗(x, y) is the Chernoff-information. Remark 1. Note that the LUCB++ algorithm of [11] is general enough to handle identification of the top k arms (not just the best-arm). All arguments presented in this paper also go through when considering the top-k problem for k > 1. However, to keep the arguments clear and concise, we chose to focus on the best-arm problem only. 2.1 Comparison with previous work We now compare the sample complexity of lil-KLUCB to that of the two most closely related algorithms, KL-LUCB [8] and lil-UCB [5]. For a detailed review of the history of MAB problems and the use of KL-confidence intervals for bounded rewards, we refer the reader to [3, 9, 4]. For the KL-LUCB algorithm, Theorem 3 of [8] guarantees a high-probability sample complexity upper bound scaling as inf c∈(µ1,µ2) X i≥1 (D∗(µi, c))−1 log nδ−1(D∗(µi, c))−1 . Our result improves this in two ways. On one hand, we eliminate the unnecessary logarithmic dependence on the number of arms n in every term. Note that the log n factor still appears in Theorem 1 in the term corresponding to the number of samples on the best arm. It is shown in [11] that this factor is indeed unavoidable. The other improvement lil-KLUCB offers over KL-LUCB is improved logarithmic dependence on the Chernoff-information terms. This is due to the tighter confidence intervals derived in Section 3. Comparing Theorem 1 to the sample complexity of lil-UCB, we see that the two are of the same form, the exception being that the Chernoff-information terms take the place of the squared mean-gaps 3 (which arise due to the use of sub-Gaussian (SG) bounds). To give a sense of the improvement this can provide, we compare the sums6 SKL = X i≥2 1 D∗(µi, µ1) and SSG = X i≥2 1 ∆2 i . Let µ, µ′ ∈(0, 1), µ < µ′ and ∆= |µ −µ′|. Note that the Chernoff-information between Ber(µ) and Ber(µ′) can be expressed as D∗(µ, µ′) = max x∈[µ,µ′] min{D(x, µ), D(x, µ′)} = D(x∗, µ) = D(x∗, µ′) = D(x∗,µ)+D(x∗,µ′) 2 , for some unique x∗∈[µ, µ′]. It follows that D∗(µ, µ′) ≥ min x∈[µ,µ′] D(x, µ) + D(x, µ′) 2 = log 1 p µ(µ + ∆) + p (1 −µ)(1 −µ −∆) . Using this with every term in SKL gives us an upper bound on that sum. If the means are all bounded well away from 0 and 1, then SKL may not differ that much from SSG. There are some situations however, when the two expressions behave radically differently. As an example, consider a situation when µ1 = 1. In this case we get SKL ≤ X i≥2 2 log 1 1−∆i ≤2 X i≥2 1 ∆i ≪ X i≥2 1 ∆2 i = SSG . Table 1 illustrates the difference between the scaling of the sums SKL and SSG when the gaps have the parametric form ∆i = (i/n)α. Table 1: SKL versus SSG for mean gaps ∆i = ( i n)α, i = 1, . . . , n α ∈(0, 1/2) 1/2 ∈(1/2, 1) 1 ∈(1, ∞) SKL n n n n log n nα SSG n n log n n2α n2 n2α We see that KL-type confidence bounds can sometimes provide a significant advantage in terms of the sample complexity. Intuitively, the gains will be greatest when many of the means are close to 0 or 1 (and hence have low variance). We will illustrate in Section 5 that such gains often also manifest in practical applications like the New Yorker Caption Contest problem. 3 Anytime Confidence Intervals for Sums of Bounded Random Variables The main step in our analysis is proving a sharp anytime confidence bound for the mean of bounded random variables. These will be used to show, in Section 4, that lil-KLUCB draws at most O((D∗ i )−1 log log(D∗ i )−1) samples from a suboptimal arm i, where D∗ i := D∗(µ1, µi) is the Chernoff-information between a Ber(µ1) and a Ber(µi) random variable and arm 1 is the arm with the largest mean. The iterated log factor is a necessary consequence of the law-of-the-iterated logarithm [5], and in it is in this sense that we call the bound sharp. Prior work on MAB algorithms based on KL-type confidence bounds [4, 9, 3] did not focus on deriving tight anytime confidence bounds. Consider a sequence of iid random variables Y1, Y2, . . . that are bounded in [0, 1] and have mean µ. Let bµt = 1 t P j∈[t] Yj be the empirical mean of the observations up to time t ∈N. Theorem 2. Let µ ∈[0, 1] and δ ∈(0, 1) be arbitrary. Fix any l ≥0 and set N = 2l, and define κ(N) = δ1/(N+1) X t∈[N] 1{l̸=0} log2(2t)−N+1 N + N X k≥l (k + 1)−N+1 N N N+1 . 6Consulting the proof of Theorem 1 it is clear that the number of samples on the sub-optimal arms of lil-KLUCB scales essentially as SKL w.h.p. (ignoring doubly logarithmic terms), and a similar argument can be made about lil-UCB. This justifies considering these sums in order to compare lil-KLUCB and lil-UCB. 4 (i) Define the sequence zt ∈(0, 1 −µ], t ∈N such that D µ + N N+1zt, µ = log (κ(N) log2(2t)/δ) t , (1) if a solution exists, and zt = 1 −µ otherwise. Then P (∃t ∈N : bµt −µ > zt) ≤δ. (ii) Define the sequence zt > 0, t ∈N such that D µ − N N+1zt, µ = log (κ(N) log2(2t)/δ) t , if a solution exists, and zt = µ otherwise. Then P (∃t ∈N : bµt −µ < −zt) ≤δ. The result above can be used to construct anytime confidence bounds for the mean as follows. Consider part (i) of Theorem 2 and fix µ. The result gives a sequence zt that upper bounds the deviations of the empirical mean. It is defined through an equation of the form D(µ + Nzt/(N + 1), µ) = ft. Note that the arguments of the function on the left must be in the interval [0, 1], in particular Nzt/(N + 1) < 1 −µ, and the maximum of D(µ + x, µ) for x > 0 is D(1, µ) = log µ−1. Hence, equation 1 does not have a solution if ft is too large (that is, if t is small). In these cases we set zt = 1 −µ. However, since ft is decreasing, equation 1 does have a solution when t ≥T (for some T depending on µ), and this solution is unique (since D(µ + x, µ) is strictly increasing). With high probability bµt −µ ≤zt for all t ∈N by Theorem 2. Furthermore, the function D(µ+x, µ) is increasing in x ≥0. By combining these facts we get that with probability at least 1 −δ D µ + N N+1zt, µ ≥D N bµt+µ N+1 , µ . On the other hand D µ + N N+1zt, µ ≤log (κ(N) log2(2t)/δ) t , by definition. Chaining these two inequalities leads to the lower confidence bound L(t, δ) = inf m < bµt : D N bµt+m N+1 , m ≤log (κ(N) log2(2t)/δ) t (2) which holds for all times t with probability at least 1 −δ. Considering the left deviations of bµt −µ we can get an upper confidence bound in a similar manner: U(t, δ) = sup m > bµt : D N bµt+m N+1 , m ≤log (κ(N) log2(2t)/δ) t . (3) That is, for all times t, with probability at least 1 −2δ we have L(t, δ) ≤bµt ≤U(t, δ). Note that the constant log κ(N) ≈2 log2(N), so the choice of N plays a relatively mild role in the bounds. However, we note here that if N is sufficiently large, then N bµt+m N+1 ≈bµt, and thus D N bµt+m N+1 , m ≈D (bµt, m), in which case the bounds above are easily compared to those in prior works [4, 9, 3]. We make this connection more precise and show that the confidence intervals defined as L′(t, δ) = inf m < bµt : D (bµt, m) ≤c(N) log (κ(N) log2(2t)/δ) t , and U ′(t, δ) = inf m > bµt : D (bµt, m) ≤c(N) log (κ(N) log2(2t)/δ) t , satisfy L′(t, δ) ≤bµt ≤U ′(t, δ) for all t, with probability 1 −2δ. The constant c(N) is defined in Theorem 1 in the Supplementary Material, where the correctness of L′(t, δ) and U ′(t, δ) is shown. Proof of Theorem 2. The proofs of parts (i) and (ii) are completely analogous, hence in what follows we only prove part (i). Note that {bµt −µ > zt} ⇐⇒{St > tzt}, where St = P j∈[t](Yj −µ) denotes the centered sum up to time t. We start with a simple union bound P (∃t ∈N : St > tzt) ≤P (∃t ∈[N] : St > tzt) + X k≥l P ∃t ∈[2k, 2k+1] : St > tzt . (4) 5 First, we bound each summand in the second term individually. In an effort to save space, we define the event Ak = {∃t ∈[2k, 2k+1] : St > tzt}. Let tj,k = (1 + j N )2k. In what follows we use the notation tj ≡tj,k. We have P (Ak) ≤ X j∈[N] P (∃t ∈[tj−1, tj] : St > tzt) ≤ X j∈[N] P ∃t ∈[tj−1, tj] : St > tj−1ztj−1 , where the last step is true if tzt is non-decreasing in t. This technical claim is formally shown in Lemma 1 in the Supplementary Material. However, to give a short heuristic, it is easy to see that tzt has an increasing lower bound. Noting that D(µ + x, µ) is convex in x (the second derivative is positive), and that D(µ, µ) = 0, we have D(1, µ)x ≥D(µ + x, µ). Hence zt ≳t−1 log log t. Using a Chernoff-type bound together with Doob’s inequality, we can continue as P (Ak) ≤inf λ>0 X j∈[N] P ∃t ∈[tj−1, tj] : exp (λSt) > exp λtj−1ztj−1 ≤ X j∈[N] exp −sup λ>0 λtj−1ztj−1 −log E eλStj = X j∈[N] exp −tj sup λ≥0 λ N+j−1 N+j ztj−1 −log E eλ(Y1−µ) . (5) Using E(eλY1) ≤E(eλξ) where ξ ∼Ber(µ) (see Lemma 9 of [4]), and the notation αj = N+j−1 N+j , P (Ak) ≤ X j∈[N] exp −tj sup λ≥0 λαjztj−1 −log E eλ(ξ−µ) = X j∈[N] exp −tjD µ + αjztj−1, µ , (6) since the rate function of a Bernoulli random variable can be explicitly computed, namely we have supλ>0(λx −log E(eλξ)) = D(µ + x, µ) (see [2]). Again, we use the convexity of D(µ + x, µ). For any α ∈(0, 1) we have αD(µ + x, µ) ≥ D(µ + αx, µ), since D(µ, µ) = 0. Using this with α = N αj(N+1) and x = αjztj−1, we get that N αj(N+1)D µ + αjztj−1, µ ≥D µ + N N+1ztj−1, µ . This implies P (Ak) ≤ X j∈[N] exp −tj N+1 N αjD µ + N N+1ztj−1, µ . (7) Plugging in the definition of tj and the sequence zt, and noting that δ < 1, we arrive at the bound P (Ak) ≤ X j∈[N] exp −N + 1 N log κ(N) log2(2k+1 N + j −1 N )/δ ≤N δ κ(N)(k+1) N+1 N . Regarding the first term in (4), again using the Bernoulli rate function bound we have P (∃t ∈[N] : bµt −µ > zt) ≤ X t∈[N] P (bµt −µ > zt) ≤ X t∈[N] exp (−tD(µ + zt, µ)) . Using the convexity of D(µ + x, µ) as before, we can continue as P (∃t ∈[N] : bµt −µ > zt) ≤ X t∈[N] exp −t N+1 N D µ + N N+1zt, µ ≤ X t∈[N] exp −N+1 N log (κ(N) log2(2t)/δ) ≤δ N+1 N κ(N)−N+1 N X t∈[N] log2(2t)−N+1 N . 6 Plugging the two bounds back into (4) we conclude that P (∃t : bµt −µ > zt) ≤δ N+1 N κ(N)−N+1 N X j∈[N] 1{l̸=0} log2(2j)−N+1 N + X k≥l (k + 1)−N+1 N ≤δ , by the definition of κ(N). 4 Analysis of lil-KLUCB Recall that the lil-KLUCB algorithm uses confidence bounds of the form Ui(t, δ) = sup{m > bµt : D(bµt, m) ≤ft(δ)} with some decreasing sequence ft(δ). In this section we make this dependence explicit, and use the notations Ui(ft(δ)) and Li(ft(δ)) for upper and lower confidence bounds. For any ϵ > 0 and i ∈[n], define the events Ωi(ϵ) = {∀t ∈N : µi ∈[Li(ft(ϵ)), Ui(ft(ϵ))]}. The correctness of the algorithm follows from the correctness of the individual confidence intervals, as is usually the case with LUCB algorithms. This is shown formally in Proposition 1 provided in the Supplementary Materials. The main focus in this section is to show a high probability upper bound on the sample complexity. This can be done by combining arguments frequently used for analyzing LUCB algorithms and those used in the analysis of the lil-UCB [5]. The proof is very similar in spirit to that of the LUCB++ algorithm [11]. Due to spatial restrictions, we only provide a proof sketch here, while the detailed proof is provided in the Supplementary Materials. Proof sketch of Theorem 1. Observe that at each time step two things can happen (apart from stopping): (1) Arm 1 is not sampled (two sub-optimal arms are sampled); (2) Arm 1 is sampled together with some other (suboptimal) arm. Our aim is to upper bound the number of times any given arm is sampled for either of the reasons above. We do so by conditioning on the event Ω′ = Ω1(δ) ∩ \ i≥2 Ωi(δi) , for a certain choice of {δi} defined below. For instance, if arm 1 is not sampled at a given time t, we know that TOP(t) ̸= 1, which means there must be an arm i ≥2 such that Ui(Ti(t), δ) ≥U1(T1(t), δ). However, on the event Ω1(δ), the UCB of arm 1 is accurate, implying that Ui(Ti(t), δ) ≥µ1. This implies that Ti(t) can not be too big, since on Ωi(δi), bµi,t is “close" to µi, and also Ui(Ti(t), δ) is not much larger then bµi. All this is made formal in Lemma 2, yielding the following upper bound on number of times arm i is sampled for reason (1): τi(δ · δi) = min {t ∈N : ft(δ · δi) < D∗(µi, µ1)} . Similar arguments can be made about the number of samples of any suboptimal arm i for reason (2), and also the number of samples on arm 1. This results in the sample complexity upper bound K1 log (n −1)δ−1 log D∗(µ1, eµ)−1 D∗(µ1, eµ) + X i≥2 K1 log δ−1 log D∗(µi, eµi)−1 + log δ−1 i D∗(µi, eµi) , on the event Ω′, where K1 is a universal constant. Finally, we define the quantities δi = sup{ϵ > 0 : Ui(ft(ϵ)) ≥µi ∀t ∈N}. Note that we have P(δi < γ) = P(∃t ∈N : Ui(ft(γ)) ≥µi) ≤γ according to Theorem 1 in the Supplementary Material. Substituting γ = exp(−D∗(µi, eµi)z) we get P log δ−1 i D∗(µi,eµi) ≥z ≤exp(−D∗(µi, eµi)z) . Hence {δi}i≥2 are independent sub-exponential variables, which allows us to control their contribution to the sum above using standard techniques. 5 Real-World Crowdsourcing We now compare the performance of lil-KLUCB to that of other algorithms in the literature. We do this using both synthetic data and real data from the New Yorker Cartoon Caption contest [10]7. To 7These data can be found at https://github.com/nextml/caption-contest-data 7 keep comparisons fair, we run the same UCB algorithm for all the competing confidence bounds. We set N = 8 and δ = 0.01 in our experiments. The confidence bounds are [KL]: the KL-bound derived based on Theorem 2, [SG1]: a matching sub-Gaussian bound derived using the proof of Theorem 2, using sub-Gaussian tails instead of the KL rate-function (the exact derivations are in the Supplementary Material), and [SG2]: the sharper sub-Gaussian bound provided by Theorem 8 of [7]. We compare these methods by computing the empirical probability that the best-arm is among the top 5 empirically best arms, as a function of the total number of samples. We do so using using synthetic data in Figure 5 , where the Bernoulli rewards simulate cases from Table 1, and using real human response data from two representative New Yorker caption contests in Figure 5. 0.0 0.2 0.4 0.6 0.8 1.0 1.2 P(best arm in top 5), alpha=1 Number of samples (10 thousands) (Empirical) probability − 250 trials Kaufmann lil−UCB KL−UCB SG lil−UCB 0.00 0.75 1.50 2.25 3.00 3.75 4.50 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 0.0 0.2 0.4 0.6 0.8 1.0 1.2 P(best arm in top 5), alpha=1/2 Number of samples (10 thousands) (Empirical) probability − 250 trials Kaufmann lil−UCB KL−UCB SG lil−UCB 0.00 0.15 0.30 0.45 0.60 0.75 0.90 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG Figure 1: Probability of the best-arm in the top 5 empirically best arms, as a function of the number of samples, based on 250 repetitions. µi = 1 −((i −1)/n)α, with α = 1 in the left panel, and α = 1/2 in the right panel. The mean-profile is shown above each plot. [KL] Blue; [SG1] Red; [SG2] Black. As seen in Table 1, the KL confidence bounds have the potential to greatly outperform the subGaussian ones. To illustrate this indeed translates into superior performance, we simulate two cases, with means µi = 1 −((i −1)/n)α, with α = 1/2 and α = 1, and n = 1000. As expected, the KL-based method requires significantly fewer samples (about 20 % for α = 1 and 30 % for α = 1/2) to find the best arm. Furthermore, the arms with means below the median are sampled about 15 and 25 % of the time respectively – key in crowdsourcing applications, since having participants answer fewer irrelevant (and potentially annoying) questions improves both efficiency and user experience. 0.0 0.2 0.4 0.6 0.8 1.0 1.2 P(best arm in top 5), Contest 558 Number of samples (10 thousands) (Empirical) probability − 250 trials Kaufmann lil−UCB KL−UCB SG lil−UCB 0 2 4 6 8 10 12 14 16 18 20 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 0.0 0.2 0.4 0.6 0.8 1.0 1.2 P(best arm in top 5), Contest 512 Number of samples (10 thousands) (Empirical) probability − 250 trials Kaufmann lil−UCB KL−UCB SG lil−UCB 0.00 0.75 1.50 2.25 3.00 3.75 4.50 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG Figure 2: Probability of the best-arm in the top 5 empirically best arms vs. number of samples, based on 250 bootstrapped repetitions. Data from New Yorker contest 558 (µ1 = 0.536) on left, and contest 512 (µ1 = 0.8) on right. Mean-profile above each plot. [KL] Blue; [SG1] Red; [SG2] Black. 8 To see how these methods fair on real data, we also run these algorithms on bootstrapped human response data from the real New Yorker Caption Contest. The mean reward of the best arm in these contests is usually between 0.5 and 0.85, hence we choose one contest from each end of this spectrum. At the lower end of the spectrum, the three methods fair comparably. This is expected because the sub-Gaussian bounds are relatively good for means about 0.5. However, in cases where the top mean is significantly larger than 0.5 we see a marked improvement in the KL-based algorithm. Extension to numerical experiments Since a large number of algorithms have been proposed in the literature for best arm identification, we include another algorithm in the numerical experiments for comparison. Previously we compared lil-KLUCB to lil-UCB as a comparison for two reasons. First, this comparison illustrates best the gains of using the novel anytime confidence bounds as opposed to those using sub-Gaussian tails. Second, since lil-UCB is the state of the art algorithm, any other algorithm will likely perform worse. The authors of [6] compare a number of different best arm identification methods, and conclude that two of them seem to stand out: lil-UCB and Thompson sampling. Therefore, we now include Thomspon sampling [Th] in our numerical experiments for the New Yorker data. We implemented the method as prescribed in [6]. As can bee seen in Figure 5, Thompson sampling seems to perform somewhat worse than the previous methods in these two instances. 0.0 0.2 0.4 0.6 0.8 1.0 1.2 P(best arm in top 5), Contest 512 Number of samples (10 thousands) (Empirical) probability − 250 trials Kaufmann lil−UCB KL−UCB SG lil−UCB Thompson 0 2 4 6 8 10 12 14 16 18 20 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 0.0 0.2 0.4 0.6 0.8 1.0 1.2 P(best arm in top 5), Contest 512 Number of samples (10 thousands) (Empirical) probability − 250 trials Kaufmann lil−UCB KL−UCB SG lil−UCB Thompson 0.00 0.75 1.50 2.25 3.00 3.75 4.50 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG Figure 3: Probability of the best-arm in the top 5 empirically best arms vs. number of samples, based on 250 bootstrapped repetitions. Data from New Yorker contest 558 (µ1 = 0.536) on left, and contest 512 (µ1 = 0.8) on right. Mean-profile above each plot. [KL] Blue; [SG1] Red; [SG2] Black; [Th] Purple. 9 References [1] Jean-Yves Audibert and Sébastien Bubeck. Best arm identification in multi-armed bandits. In COLT-23th Conference on Learning Theory-2010, pages 13–p, 2010. [2] Stéphane Boucheron, Gábor Lugosi, and Pascal Massart. Concentration inequalities: A nonasymptotic theory of independence. Oxford university press, 2013. [3] Olivier Cappé, Aurélien Garivier, Odalric-Ambrym Maillard, Rémi Munos, Gilles Stoltz, et al. Kullback– leibler upper confidence bounds for optimal sequential allocation. The Annals of Statistics, 41(3):1516– 1541, 2013. [4] Aurélien Garivier and Olivier Cappé. The kl-ucb algorithm for bounded stochastic bandits and beyond. In COLT, pages 359–376, 2011. [5] Kevin Jamieson, Matthew Malloy, Robert Nowak, and Sébastien Bubeck. lil-ucb: An optimal exploration algorithm for multi-armed bandits. In Conference on Learning Theory, pages 423–439, 2014. [6] Kevin G Jamieson, Lalit Jain, Chris Fernandez, Nicholas J Glattard, and Rob Nowak. Next: A system for real-world development, evaluation, and application of active learning. In Advances in Neural Information Processing Systems, pages 2656–2664, 2015. [7] Emilie Kaufmann, Olivier Cappé, and Aurélien Garivier. On the complexity of best arm identification in multi-armed bandit models. The Journal of Machine Learning Research, 2016. [8] Emilie Kaufmann and Shivaram Kalyanakrishnan. Information complexity in bandit subset selection. In COLT, pages 228–251, 2013. [9] Odalric-Ambrym Maillard, Rémi Munos, Gilles Stoltz, et al. A finite-time analysis of multi-armed bandits problems with kullback-leibler divergences. In COLT, pages 497–514, 2011. [10] B. Fox Rubin. How new yorker cartoons could teach computers to be funny. CNET News, 2016. https://www.cnet.com/news/how-new-yorker-cartoons-could-teach-computers-to-be-funny/. [11] Max Simchowitz, Kevin Jamieson, and Benjamin Recht. The simulator: Understanding adaptive sampling in the moderate-confidence regime. arXiv preprint arXiv:1702.05186, 2017. 10 | 2017 | 496 |
7,003 | Q-LDA: Uncovering Latent Patterns in Text-based Sequential Decision Processes Jianshu Chen⇤, Chong Wang†, Lin Xiao⇤, Ji He‡, Lihong Li† and Li Deng‡ ⇤Microsoft Research, Redmond, WA, USA {jianshuc,lin.xiao}@microsoft.com †Google Inc., Kirkland, WA, USA⇤ {chongw,lihong}@google.com ‡Citadel LLC, Seattle/Chicago, USA {Ji.He,Li.Deng}@citadel.com Abstract In sequential decision making, it is often important and useful for end users to understand the underlying patterns or causes that lead to the corresponding decisions. However, typical deep reinforcement learning algorithms seldom provide such information due to their black-box nature. In this paper, we present a probabilistic model, Q-LDA, to uncover latent patterns in text-based sequential decision processes. The model can be understood as a variant of latent topic models that are tailored to maximize total rewards; we further draw an interesting connection between an approximate maximum-likelihood estimation of Q-LDA and the celebrated Q-learning algorithm. We demonstrate in the text-game domain that our proposed method not only provides a viable mechanism to uncover latent patterns in decision processes, but also obtains state-of-the-art rewards in these games. 1 Introduction Reinforcement learning [21] plays an important role in solving sequential decision making problems, and has seen considerable successes in many applications [16, 18, 20]. With these methods, however, it is often difficult to understand or examine the underlying patterns or causes that lead to the sequence of decisions. Being more interpretable to end users can provide more insights to the problem itself and be potentially useful for downstream applications based on these results [5]. To investigate new approaches to uncovering underlying patterns of a text-based sequential decision process, we use text games (also known as interactive fictions) [11, 19] as the experimental domain. Specifically, we focus on choice-based and hypertext-based games studied in the literature [11], where both the action space and the state space are characterized in natural languages. At each time step, the decision maker (i.e., agent) observes one text document (i.e., observation text) that describes the current observation of the game environment, and several text documents (i.e., action texts) that characterize different possible actions that can be taken. Based on the history of these observations, the agent selects one of the provided actions and the game transits to a new state with an immediate reward. This game continues until the agent reaches a final state and receives a terminal reward. In this paper, we present a probabilistic model called Q-LDA that is tailored to maximize total rewards in a decision process. Specially, observation texts and action texts are characterized by two separate topic models, which are variants of latent Dirichlet allocation (LDA) [4]. In each topic model, topic proportions are chained over time to model the dependencies for actions or states. And ⇤The work was done while Chong Wang, Ji He, Lihong Li and Li Deng were at Microsoft Research. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. these proportions are partially responsible for generating the immediate/terminal rewards. We also show an interesting connection between the maximum-likelihood parameter estimation of the model and the Q-learning algorithm [22, 18]. We empirically demonstrate that our proposed method not only provides a viable mechanism to uncover latent patterns in decision processes, but also obtains state-of-the-art performance in these text games. Contribution. The main contribution of this paper is to seamlessly integrate topic modeling with Q-learning to uncover the latent patterns and interpretable causes in text-based sequential decisionmaking processes. Contemporary deep reinforcement learning models and algorithms can seldom provide such information due to their black-box nature. To the best of our knowledge, there is no prior work that can achieve this and learn the topic model in an end-to-end fashion to maximize the long-term reward. Related work. Q-LDA uses variants of LDA to capture observation and action texts in text-based decision processes. In this model, the dependence of immediate reward on the topic proportions is similar to supervised topic models [3], and the chaining of topic proportions over time to model long-term dependencies on previous actions and observations is similar to dynamic topic models [6]. The novelty in our approach is that the model is estimated in a way that aims to maximize long-term reward, thus producing near-optimal policies; hence it can also be viewed as a topic-model-based reinforcement-learning algorithm. Furthermore, we show an interesting connection to the DQN variant of Q-learning [18]. The text-game setup used in our experiment is most similar to previous work [11] in that both observations and actions are described by natural languages, leading to challenges in both representation and learning. The main difference from that previous work is that those authors treat observation-texts as Markovian states. In contrast, our model is more general, capturing both partial observability and long-term dependence on observations that are common in many text-based decision processes such as dialogues. Finally, the choice of reward function in Q-LDA share similarity with that in Gaussian process temporal difference methods [9]. Organization. Section 2 describes the details of our probabilistic model, and draws a connection to the Q-learning algorithm. Section 3 presents an end-to-end learning algorithm that is based on mirror descent back-propagation. Section 4 demonstrates the empirical performance of our model, and we conclude with discussions and future work in Section 5. 2 A Probabilistic Model for Text-based Sequential Decision Processes In this section, we first describe text games as an example of sequential decision processes. Then, we describe our probabilistic model, and relate it to a variant of Q-learning. 2.1 Sequential decision making in text games Text games are an episodic task that proceeds in discrete time steps t 2 {1, . . . , T}, where the length T may vary across different episodes. At time step t, the agent receives a text document of N words describing the current observation of the environment: wS t , {wS t,n}N n=1.2 We call these words observation text. The agent also receives At text documents, each of which describes a possible action that the agent can take. We denote them by wa t , {wa t,n}N n=1 with a 2 {1, . . . , At}, where At is the number of feasible actions and it could vary over time. We call these texts action texts. After the agent takes one of the provided actions, the environment transits to time t + 1 with a new state and an immediate reward rt; both dynamics and reward generation may be stochastic and unknown. The new state then reveals a new observation text wS t+1 and several action texts wa t+1 for a 2 {1, . . . , At+1}. The transition continues until the end of the game at step T when the agent receives a terminal reward rT . The reward rT depends on the ending of the story in the text game: a good ending leads to a large positive reward, while bad endings negative rewards. The goal of the agent is to maximize its cumulative reward by acting optimally in the environment. At step t, given all observation texts wS 1:t, all action texts wA 1:t , {wa 1:t : 8a}, previous actions a1:t−1 and rewards r1:t−1, the agent is to find a policy, ⇡(at|wS 1:t, wA 1:t, a1:t−1, r1:t−1), a conditional 2For notation simplicity, we assume all texts have the same length N. 2 … N ✓S t N zS t,n wS t,n ΦS βS wa t,n za t,n ✓a t at rt βA ΦA N N ΦS βS βA ΦA … wa t+1,n wS t+1,n zS t+1,n za t+1,n ✓a t+1 ✓S t+1 rt+1 at+1 |At+1| |At| ↵A t ↵A t+1 ↵S t+1 ↵S t Figure 1: Graphical model representation for the studied sequential decision process. The bottom section shows the observation topic models, which share the same topics in ΦS, but the topic distributions ✓S t changes with time t. The top section shows the action topic models, sharing the same action topics in ΦA, but with time varying topic distribution ✓a t for each a 2 At. The middle section shows the dependence of variables between consecutive time steps. There are no plates for the observation text (bottom part of the figure) because there is only one observation text document at each time step. We follow the standard notation for graphical models by using shaded circles as observables. Since the topic distributions ✓S t and ✓a t and the Dirichlet parameters ↵S t and ↵A t (except ↵S 1 and ↵A 1 ) are not observable, we need to use their MAP estimate to make end-to-end learning feasible; see Section 3 for details. The figure characterizes the general case where rewards appear at each time step, while in our experiments the (non-zero) rewards only appear at the end of the games. probability of selecting action at, that maximizes the expected long-term reward E{PT ⌧=t γ⌧−tr⌧}, where γ 2 (0, 1) is a discount factor. In this paper, for simplicity of exposition, we focus on problems where the reward is nonzero only in the final step T. While our algorithm can be generalized to the general case (with greater complexity), this special case is an important case of RL (e.g., [20]). As a result, the policy is independent of r1:t−1 and its form is simplified to ⇡(at|wS 1:t, wA 1:t, a1:t−1). The problem setup is similar to previous work [11] in that both observations and actions are described by natural languages. For actions described by natural languages, the action space is inherently discrete and large due to the exponential complexity with respect to sentence length. This is different from most reinforcement learning problems where the action spaces are either small or continuous. Here, we take a probabilistic modeling approach to this challenge: the observed variables—observation texts, action texts, selected actions, and rewards—are assumed to be generated from a probabilistic latent variable model. By examining these latent variables, we aim to uncover the underlying patterns that lead to the sequence of the decisions. We then show how the model is related to Q-learning, so that estimation of the model leads to reward maximization. 2.2 The Q-LDA model The graphical representation of our model, Q-LDA, is depicted in Figure 1. It has two instances of topic models, one for observation texts and the other for action texts. The basic idea is to chain the topic proportions (✓s in the figure) in a way such that they can influence the topic proportions in the future, thus capturing long-term effects of actions. Details of the generative models are as follows. For the observation topic model, we use the columns of ΦS ⇠Dir(βS)3 to denote the topics for the observation texts. For the action topic model, we use the columns of ΦA ⇠Dir(βA) to denote the topics for the action texts. We assume these topics do not change over time. Given the initial topic proportion Dirichlet parameters—↵S 1 and ↵A 1 for observation and action texts respectively—the Q-LDA proceeds sequentially from t = 1 to T as follows (see Figure 1 for all latent variables). 3ΦS is a word-by-topic matrix. Each column is drawn from a Dirichlet distribution with hyper-parameter βS, representing the word-emission probabilities of the corresponding topic. ΦA is similarly defined. 3 1. Draw observation text wS t as follows, (a) Draw observation topic proportions ✓S t ⇠Dir(↵S t ). (b) Draw all words for the observation text wS t ⇠LDA(wS t |✓S t , ΦS), where LDA(·) denotes the standard LDA generative process given its topic proportion ✓S t and topics ΦS [4]. The latent variable zS t,n indicates the topic for the word wS t,n. 2. For a = 1, ..., At, draw action text wa t as follows, (a) Draw action topic proportions ✓a t ⇠Dir(↵A t ). (b) Draw all words for the a-th action text using wa t ⇠LDA(wa t |✓a t , ΦA), where the latent variable za t,n indicates the topic for the word wa t,n. 3. Draw the action: at ⇠⇡b(at|wS 1:t, wA 1:t, a1:t−1), where ⇡b is an exploration policy for data collection. It could be chosen in different ways, as discussed in the experiment Section 4. After model learning is finished, a greedy policy may be used instead (c.f., Section 3). 4. The immediate reward rt is generated according to a Gaussian distribution with mean function µr(✓S t , ✓at t , U) and variance σ2 r: rt ⇠N " µr(✓S t , ✓at t , U), σ2 r # . (1) Here, we defer the definitions of µr(✓S t , ✓at t , U) and its parameter U to the next section, where we draw a connection between likelihood-based learning and Q-learning. 5. Compute the topic proportions Dirichlet parameters for the next time step t + 1 as ↵S t+1 = σ " WSS✓S t + WSA✓at t + ↵S 1 # , ↵A t+1 = σ " WAS✓S t +WAA✓at t +↵A 1 # , (2) where σ(x) , max{x, ✏} with ✏being a small positive number (e.g., 10−6), at is the action selected by the agent at time t, and {WSS, WSA, WAS, WAA} are the model parameters to be learned. Note that, besides ✓S t , the only topic proportions from {✓a t }At a=1 that will influence ↵S t+1 and ↵A t+1 is ✓at t , i.e., the one corresponding to the chosen action at. Furthermore, since ✓S t and ✓at t are generated according to Dir(↵S t ) and Dir(↵A t ), respectively, ↵S t+1 and ↵A t+1 are (implicitly) chained over time via ✓S t and ✓at t (c.f. Figure 1). This generative process defines a joint distribution p(·) among all random variables depicted in Figure 1. Running this generative process—step 1 to 5 above for T steps until the game ends— produces one episode of the game. Now suppose we already have M episodes. In this paper, we choose to directly learn the conditional distribution of the rewards given other observations. By learning the model in a discriminative manner [2, 7, 12, 15, 23], we hope to make better predictions of the rewards for different actions, from which the agent could obtain the best policy for taking actions. This can be obtained by applying Bayes rule to the joint distribution defined by the generative process. Let ⇥denote all model parameters: ⇥= {ΦS, ΦA, U, WSS, WSA, WAS, WAA}. We have the following loss function min ⇥ ( −ln p(⇥) − M X i=1 ln p " r1:Ti|wS 1:Ti, wA 1:Ti, a1:Ti, ⇥ # ) , (3) where p(⇥) denotes a prior distribution of the model parameters (e.g., Dirichlet parameters over ΦS and ΦA), and Ti denotes the length of the i-th episode. Let KS and KA denote the number of topics for the observation texts and action texts, and let VS and VA denote the vocabulary sizes for the observation texts and action texts, respectively. Then, the total number of learnable parameters for Q-LDA is: VS ⇥KS + VA ⇥KA + KA ⇥KS + (KS + KA)2. We note that a good model learned through Eq. (3) may predict the values of rewards well, but might not imply the best policy for the game. Next, we show by defining the appropriate mean function for the rewards, µr(✓S t , ✓at t , U), we can achieve both. This closely resembles Q-learning [21, 22], allowing us to effectively learn the policy in an iterative fashion. 2.3 From Q-LDA to Q-learning Before relating Q-LDA to Q-learning, we first give a brief introduction to the latter. Q-learning [22, 18] is a reinforcement learning algorithm for finding an optimal policy in a Markov decision process (MDP) described by (S, A, P, r, γ), where S is a state space, A is an action space, and γ 2 (0, 1) is a discount factor. Furthermore, P defines a transition probability p(s0|s, a) for going to the next 4 state s0 2 S from the current state s 2 S after taking action a 2 A, and r(s, a) is the immediate reward corresponding to this transition. A policy ⇡(a|s) in an MDP is defined to be the probability of taking action a at state s. Let st and at be the state and action at time t, and let rt = r(st, at) be the immediate reward at time t. An optimal policy is the one that maximizes the expected long-term reward E{P+1 t=1 γt−1rt}. Q-learning seeks to find the optimal policy by estimating the Q-function, Q(s, a), defined as the expected long-term discounted reward for taking action a at state s and then following an optimal policy thereafter. It satisfies the Bellman equation [21] Q(s, a) = E{r(s, a) + γ · max b Q(s0, b)|s, a} , (4) and directly gives the optimal action for any state s: arg maxa Q(s, a). Q-learning solves for Q(s, a) iteratively based on observed state transitions. The basic Q-learning [22] requires storing and updating the values of Q(s, a) for all state–action pairs in S ⇥A, which is not practical when S and A are large. This is especially true in our text games, where they can be exponentially large. Hence, Q(s, a) is usually approximated by a parametric function Q✓(s, a) (e.g., neural networks [18]), in which case the model parameter ✓is updated by: ✓ ✓+ ⌘· r✓Q✓· (dt −Q✓(st, at)) , (5) where dt , rt + γ · maxa0 Q✓0(st+1, a0) if st nonterminal and dt , rt otherwise, and ✓0 denotes a delayed version of the model parameter updated periodically [18]. The update rule (5) may be understood as applying stochastic gradient descent (SGD) to a regression loss function J(✓) , E[dt −Q✓(s, a)]2. Thus, dt is the target, computed from rt and Q✓0, for the prediction Q✓(st, at). We are now ready to define the mean reward function µr in Q-LDA. First, we model the Q-function by Q(✓S t , ✓a t ) = (✓a t )T U✓S t , where U is the same parameter as the one in (1).4 This is different from typical deep RL approaches, where black-box models like neural networks are used. In order to connect our probabilistic model to Q-learning, we define the mean reward function as follows, µr(✓S t , ✓at t , U) = Q(✓S t , ✓at t ) −γ · E ⇥ max b Q(✓S t+1, ✓b t+1)|✓S t , ✓at t ⇤ (6) Note that µr remains as a function of ✓S t and ✓at t since the second term in the above expression is a conditional expectation given ✓S t and ✓at t . The definition of the mean reward function in Eq. (6) has a strong relationship with the Bellman equation (4) in Q-learning; it relates the long-term reward Q(✓S t , ✓at t ) to the mean immediate reward µr in the same manner as the Bellman equation (4). To see this, we move the second term on the right-hand side of (6) to the left, and make the identification that µr corresponds to E{r(s, a)} since both of them represent the mean immediate reward. The resulting equation share a same form as the Bellman equation (4). With the mean function µr defined above, we show in Appendix B that the loss function (3) can be approximated by the one below using the maximum a posteriori (MAP) estimate of ✓S t and ✓at t (denoted as ˆ✓S t and ˆ✓at t , respectively): min ⇥ n −ln p(ΦS|βS) −ln p(ΦA|βA) + M X i=1 Ti X t=1 1 2σ2r h dt −Q(ˆ✓S t , ˆ✓at t ) i2 o (7) where dt = rt + γ maxb Q(ˆ✓S t+1, ˆ✓b t+1) for t < Ti and dt = rt for t = Ti. Observe that the first two terms in (7) are regularization terms coming from the Dirichlet prior over ΦS and ΦA, and the third term shares a similar form as the cost J(✓) in Q-learning; it can also be interpreted as a regression problem for estimating the Q-function, where the target dt is constructed in a similar manner as Q-learning. Therefore, optimizing the discriminative objective (3) leads to a variant of Q-learning. After learning is finished, we can obtain the greedy policy by taking the action that maximizes the Q-function estimate in any given state. We also note that we have used the MAP estimates of ✓S t and ✓at t due to the intractable marginalization of the latent variables [14]. Other more advanced approximation techniques, such as Markov Chain Monte Carlo (MCMC) [1] and variational inference [13] can also be used, and we leave these explorations as future work. 3 End-to-end Learning by Mirror Descent Back Propagation 4The intuition of choosing Q(·, ·) to be this form is that we want ✓S t to be aligned with ✓a t of the correct action (large Q-value), and to be misaligned with the ✓a t of the wrong actions (small Q-value). The introduction of U allows the number and the meaning of topics for the observations and actions to be different. 5 Algorithm 1 The training algorithm by mirror descent back propagation 1: Input: D (number of experience replays), J (number of SGD updates), and learning rate. 2: Randomly initialize the model parameters. 3: for m = 1, . . . , D do 4: Interact with the environment using a behavior policy ⇡m b (at|xS 1:t, xA 1:t, a1:t−1) to collect M episodes of data {wS 1:Ti, wA 1:Ti, a1:Ti, r1:Ti}M i=1 and add them to D. 5: for j = 1, . . . , J do 6: Randomly sample an episode from D. 7: For the sampled episode, compute ˆ✓S t , ˆ✓a t and Q(ˆ✓S t , ˆ✓a t ) with a = 1, . . . , At and t = 1, . . . , Ti according to Algorithm 2. 8: For the sampled episode, compute the stochastic gradients of (7) with respect to ⇥using back propagation through the computational graph defined in Algorithm 2. 9: Update {U, WSS, WSA, WAS, WAA} by stochastic gradient descent and update {ΦS, ΦA} using stochastic mirror descent. 10: end for 11: end for Algorithm 2 The recursive MAP inference for one episode 1: Input: ↵S 1 , ↵A 1 , L, δ, xS t , {xa t : a = 1, . . . , At} and at, for all t = 1, . . . , Ti. 2: Initialization: ˆ↵S 1 = ↵S 1 and ˆ↵A 1 = ↵A 1 3: for t = 1, . . . , Ti do 4: Compute ˆ✓S t by repeating ˆ✓S t 1 C ˆ✓S t ⊙exp ⇣ δ h ΦT S xS t ΦS ˆ✓S t + ˆ↵S t −1 ˆ✓S t i⌘ for L times with initialization ˆ✓S t / 1, where C is a normalization factor. 5: Compute ˆ✓a t for each a = 1, . . . , At by repeating ˆ✓a t 1 C ˆ✓a t ⊙exp ⇣ δ h ΦT A xa t ΦA ˆ✓a t + ˆ↵A t −1 ˆ✓a t i⌘ for L times with initialization ˆ✓a t / 1, where C is a normalization factor. 6: Compute ˆ↵S t+1 and ˆ↵A t+1 from ˆ✓S t and ˆ✓at t according to (11). 7: Compute the Q-values: Q(ˆ✓S t , ˆ✓a t ) = (ˆ✓a t )T U ˆ✓S t for a = 1, . . . , At. 8: end for In this section, we develop an end-to-end learning algorithm for Q-LDA, by minimizing the loss function given in (7). As shown in the previous section, solving (7) leads to a variant of Q-learning, thus our algorithm could be viewed as a reinforcement-learning algorithm for the proposed model. We consider learning our model with experience replay [17], a widely used technique in recent stateof-the-art systems [18]. Specifically, the learning process consists of multiple stages, and at each stage, the agent interacts with the environment using a fixed exploration policy ⇡b(at|xS 1:t, xA 1:t, a1:t−1) to collect M episodes of data {wS 1:Ti, wA 1:Ti, a1:Ti, r1:Ti}M i=1 and saves them into a replay memory D. (We will discuss the choice of ⇡b in section 4.) Under the assumption of the generative model Q-LDA, our objective is to update our estimates of the model parameters in ⇥using D; the updating process may take several randomized passes over the data in D. A stage of such learning process is called one replay. Once a replay is done, we let the agent use a new behavior policy ⇡0 b to collect more episodes, add them to D, and continue to update ⇥from the augmented D. This process repeats for multiple stages, and the model parameters learned from the previous stage will be used as the initialization for the next stage. Therefore, we can focus on learning at a single stage, which was formulated in Section 2 as one of solving the optimization problem (7). Note that the objective (7) is a function of the MAP estimates of ✓S t and ✓at t . Therefore, we start with a recursion for computing ˆ✓S t and ˆ✓at t and then introduce our learning algorithm for ⇥. 3.1 Recursive MAP inference by mirror descent The MAP estimates, ˆ✓S t and ˆ✓a t , for the topic proportions ✓S t and ✓a t are defined as (ˆ✓S t , ˆ✓a t ) = arg max ✓S t ,✓a t p(✓S t , ✓a t |wS 1:t, wA 1:t, a1:t−1) (8) 6 Solving for the exact solution is, however, intractable. We instead develop an approximate algorithm that recursively estimate ˆ✓S t and ˆ✓a t . To develop the algorithm, we rely on the following result, whose proof is deferred to Appendix A. Proposition 1. The MAP estimates in (8) could be approximated by recursively solving the problems: ˆ✓S t = arg max ✓S t ⇥ ln p(xS t |✓S t , ΦS) + ln p " ✓S t |ˆ↵S t #⇤ (9) ˆ✓a t = arg max ✓a t ⇥ ln p(xa t |✓a t , ΦA) + ln p " ✓a t |ˆ↵A t #⇤ , a 2 {1, . . . , At} , (10) where xS t and xa t are the bag-of-words vectors for the observation text wS t and the a-th action text wa t , respectively. To compute ˆ↵S t and ˆ↵A t , we begin with ˆ↵S 1 = ↵S 1 and ˆ↵A 1 = ↵A 1 and update their values for the next t + 1 time step according to ˆ↵S t+1 = σ ⇣ WSS ˆ✓S t +WSAˆ✓at t +↵S 1 ⌘ , ˆ↵A t+1 = σ ⇣ WAS ˆ✓S t +WAAˆ✓at t +↵A 1 ⌘ (11) Note from (9)–(10) that, for given ˆ✓S t and ˆ✓a t , the solution of ✓S t and ✓a t now becomes At+1 decoupled sub-problems, each of which has the same form as the MAP inference problem of Chen et al. [8]. Therefore, we solve each sub-problem in (9)–(10) using their mirror descent inference algorithm, and then use (11) to compute the Dirichlet parameters at the next time step. The overall MAP inference procedure is summarized in Algorithm 2. We further remark that, after obtaining ˆ✓S t and ˆ✓a t , the Q-value for the t step is readily estimated by: E ⇥ Q(✓S t , ✓a t )|wS 1:t, wA 1:t, a1:t−1 ⇤ ⇡Q(ˆ✓S t , ˆ✓a t ), a 2 {1, . . . , At} , (12) where we approximate the conditional expectation using the MAP estimates. After learning is finished, the agent may extract a greedy policy for any state s by taking the action arg maxa Q(ˆ✓S, ˆ✓a). It is known that if the learned Q-function is closed to the true Q-function, such a greedy policy is near-optimal [21]. 3.2 End-to-end learning by backpropagation The training loss (7) for each learning stage has the form of a finite sum over M episodes. Each term inside the summation depends on ˆ✓S t and ˆ✓at t , which in turn depend on all the model parameters in ⇥ via the computational graph defined by Algorithm 2 (see Appendix E for a diagram of the graph). Therefore, we can learn the model parameters in ⇥by sampling an episode in the data, computing the corresponding stochastic gradient in (7) by back-propagation on the computational graph given in Algorithm 2, and updating ⇥by stochastic gradient/mirror descent. More details are found in Algorithm 1, and Appendix E.4 gives the gradient formulas. 4 Experiments In this section, we use two text games from [11] to evaluate our proposed model and demonstrate the idea of interpreting the decision making processes: (i) “Saving John” and (ii) “Machine of Death” (see Appendix C for a brief introduction of the two games).5 The action spaces of both games are defined by natural languages and the feasible actions change over time, which is a setting that Q-LDA is designed for. We choose to use the same experiment setup as [11] in order to have a fair comparison with their results. For example, at each m-th experience-replay learning (see Algorithm 1), we use the softmax action selection rule [21, pp.30–31] as the exploration policy to collect data (see Appendix E.3 for more details). We collect M = 200 episodes of data (about 3K time steps in “Saving John” and 16K in “Machine of Death”) at each of D = 20 experience replays, which amounts to a total of 4, 000 episodes. At each experience replay, we update the model with 10 epochs before the next replay. Appendix E provides additional experimental details. We first evaluate the performance of the proposed Q-LDA model by the long-term rewards it receives when applied to the two text games. Similar to [11], we repeat our experiments for five times with different random initializations. Table 1 summarize the means and standard deviations of the rewards 5The simulators are obtained from https://github.com/jvking/text-games 7 Table 1: The average rewards (higher is better) and standard deviations of different models on the two tasks. For DRRN and MA-DQN, the number of topics becomes the number of hidden units per layer. Tasks # topics Q-LDA DRRN (1-layer) DRRN (2-layer) MA-DQN (2-layer) Saving John 20 18.8 (0.3) 17.1 (0.6) 18.4 (0.1) 4.9 (3.2) 50 18.6 (0.6) 18.3 (0.2) 18.5 (0.3) 9.0 (3.2) 100 19.1 (0.6) 18.2 (0.2) 18.7 (0.4) 7.1 (3.1) Machine of Death 20 19.9 (0.8) 7.2 (1.5) 9.2 (2.1) 2.8 (0.9) 50 18.7 (2.1) 8.4 (1.3) 10.7 (2.7) 4.3 (0.9) 100 17.5 (2.4) 8.7 (0.9) 11.2 (0.6) 5.2 (1.2) on the two games. We include the results of Deep Reinforcement Relevance Network (DRRN) proposed in [11] with different hidden layers. In [11], there are several variants of DQN (deep Q-networks) baselines, among which MA-DQN (max-action DQN) is the best performing one. We therefore only include the results of MA-DQN. Table 1 shows that Q-LDA outperforms all other approaches on both tasks, especially “Machine of Death”, where Q-LDA even beats the DRRN models by a large margin. The gain of Q-LDA on “Saving John” is smaller, as both Q-LDA and DRRN are approaching the upper bound of the reward, which is 20. “Machine of Death” was believed to be a more difficult task due to its stochastic nature and larger state and action spaces [11], where the upper bound on the reward is 30. (See Tables 4–5 for the definition of the rewards for different story endings.) Therefore, Q-LDA gets much closer to the upper bound than any other method, although there may still be room for improvement. Finally, our experiments follow the standard online RL setup: after a model is updated based on the data observed so far, it is tested on newly generated episodes. Therefore, the numbers reported in Table 1 are not evaluated on the training dataset, so they truthfully reflect the actual average reward of the learned models. We now proceed to demonstrate the analysis of the latent pattern of the decision making process using one example episode of “Machine of Death”. In this episode, the game starts with the player wandering in a shopping mall, after the peak hour ended. The player approaches a machine that prints a death card after inserting a coin. The death card hints on how the player will die in future. In one of the story development, the player’s death is related to a man called Bon Jovi. The player is so scared that he tries to combat with a cardboard standee of Bon Jovi. He reveals his concern to a friend named Rachel, and with her help he finally overcomes his fear and maintains his friendship. This episode reaches a good ending and receives the highest possible reward of 30 in this game. In Figure 2, we show the evolution of the topic proportions for the four most active topics (shown in Table 2)6 for both the observation texts and the selected actions’ texts. We note from Figure 2 that the most dominant observation topic and action topic at beginning of the episode are “wander at mall” and “action at mall”, respectively, which is not surprising since the episode starts at a mall scenario. The topics related to “mall” quickly dies off after the player starts the death machine. Afterwards, the most salient observation topic becomes “meet Bon Jovi” and then “combat” (t = 8). This is because after the activation of death machine, the story enters a scenario where the player tries to combat with a cardboard standee. Towards the end of the episode, the observation topic “converse w/rachel” and the topic “kitchen & chat” corresponding to the selected action reach their peaks and then decay right before the end of the story, where the action topic “relieve” climbs up to its peak. This is consistent with the story ending, where the player chooses to overcome his fear after chatting with Rachel. In Appendix D, we show the observation and the action texts in the above stages of the story. Finally, another interesting observation is about the matrix U. Since the Q-function value is computed from [ˆ✓a t ]T U ˆ✓S t , the (i, j)-th element of the matrix U measures the positive/negative correlation between the i-th action topic and the j-th observation topic. In Figure 2(c), we show the value of the learned matrix U for the four observation topics and the four action topics in Table 2. Interestingly, the largest value (39.5) of U is the (1, 2)-th element, meaning that the action topic “relieve” and the state topic “converse w/rachel” has strong positive contribution to a high long-term reward, which is what happens at the end of the story. 6In practice, we observe that some topics are never or rarely activated during the learning process. This is especially true when the number of topics becomes large (e.g., 100). Therefore, we only show the most active topics. This might also explain why the performance improvement is marginal when the number of topics grows. 8 Table 2: The four most active topics for the observation texts and the action texts, respectively. Observation Topics 1: combat minutes, lights, firearm, shoulders, whiff, red, suddenly, huge, rendition 2: converse w/ rachel rachel, tonight, grabs, bar, towards, happy, believing, said, moonlight 3: meet Bon Jovi small, jovi, bon, door, next, dog, insists, room, wrapped, standees 4: wander at mall ended, catcher, shopping, peak, wrapped, hanging, attention, door Action Topics 1: relieve leave, get, gotta, go, hands, away, maybe, stay, ability, turn, easy, rachel 2: kitchen & chat wait, tea, look, brisk, classics, oysters, kitchen, turn, chair, moment 3: operate the machine coin, insert, west, cloth, desk, apply, dollars, saying, hands, touch, tell 4: action at mall alarm, machine, east, ignore, take, shot, oysters, win, gaze, bestowed 5 10 15 0 0.2 0.4 0.6 0.8 1 Observation Topic 1 Observation Topic 2 Observation Topic 3 Observation Topic 4 (a) Observation topic ✓S t 5 10 15 0 0.2 0.4 0.6 0.8 1 Action Topic 1 Action Topic 2 Action Topic 3 Action Topic 4 (b) Selected action topic ✓at t 2 64 1.2 39.5 20.7 12.2 22.1 12.4 1.4 −0.2 2.5 4.8 4.1 1.9 5.3 8.4 13.3 4.1 3 75 (c) Learned values of matrix U Figure 2: The evolution of the most active topics in “Machine of Death.” 5 Conclusion We proposed a probabilistic model, Q-LDA, to uncover latent patterns in text-based sequential decision processes. The model can be viewed as a latent topic model, which chains the topic proportions over time. Interestingly, by modeling the mean function of the immediate reward in a special way, we showed that discriminative learning of Q-LDA using its likelihood is closely related to Q-learning. Thus, our approach could also be viewed as a Q-learning variant for sequential topic models. We evaluate Q-LDA on two text-game tasks, demonstrating state-of-the-art rewards in these games. Furthermore, we showed our method provides a viable approach to finding interesting latent patterns in such decision processes. Acknowledgments The authors would like to thank all the anonymous reviewers for their constructive feedback. References [1] Christophe Andrieu, Nando De Freitas, Arnaud Doucet, and Michael I Jordan. An introduction to MCMC for machine learning. Machine learning, 50(1):5–43, 2003. [2] C. M. Bishop and J. Lasserre. Generative or discriminative? getting the best of both worlds. Bayesian Statistics, 8:3–24, 2007. [3] D. M. Blei and J. D. Mcauliffe. Supervised topic models. In Proc. NIPS, pages 121–128, 2007. [4] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. JMLR, 3:993–1022, 2003. [5] David M Blei. Probabilistic topic models. Communications of the ACM, 55(4):77–84, 2012. [6] David M Blei and John D Lafferty. Dynamic topic models. In Proceedings of the 23rd international conference on Machine learning, pages 113–120. ACM, 2006. 9 [7] G. Bouchard and B. Triggs. The tradeoff between generative and discriminative classifiers. In Proc. COMPSTAT, pages 721–728, 2004. [8] Jianshu Chen, Ji He, Yelong Shen, Lin Xiao, Xiaodong He, Jianfeng Gao, Xinying Song, and Li Deng. End-to-end learning of lda by mirror-descent back propagation over a deep architecture. In Proc. NIPS, pages 1765–1773, 2015. [9] Yaakov Engel, Shie Mannor, and Ron Meir. Reinforcement learning with Gaussian processes. In Proceedings of the Twenty-Second International Conference on Machine Learning (ICML-05), pages 201–208, 2005. [10] Matthew Hausknecht and Peter Stone. Deep recurrent Q-learning for partially observable MDPs. In Proc. AAAI-SDMIA, November 2015. [11] Ji He, Jianshu Chen, Xiaodong He, Jianfeng Gao, Lihong Li, Li Deng, and Mari Ostendorf. Deep reinforcement learning with a natural language action space. In Proc. ACL, 2016. [12] A. Holub and P. Perona. A discriminative framework for modelling object classes. In Proc. IEEE CVPR, volume 1, pages 664–671, 2005. [13] Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. In Learning in graphical models, pages 105–161. Springer, 1998. [14] Michael Irwin Jordan. Learning in graphical models, volume 89. Springer Science & Business Media, 1998. [15] S. Kapadia. Discriminative Training of Hidden Markov Models. PhD thesis, University of Cambridge, 1998. [16] Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(1):1334–1373, 2016. [17] Long-Ji Lin. Reinforcement learning for robots using neural networks. Technical report, Technical report, DTIC Document, 1993. [18] 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. [19] Karthik Narasimhan, Tejas Kulkarni, and Regina Barzilay. Language understanding for textbased games using deep reinforcement learning. In Proc. EMNLP, 2015. [20] David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of Go with deep neural networks and tree search. Nature, 529:484–489, 2016. [21] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press Cambridge, 1998. [22] Christopher Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992. [23] Oksana Yakhnenko, Adrian Silvescu, and Vasant Honavar. Discriminatively trained Markov model for sequence classification. In Proc. IEEE ICDM, 2005. 10 | 2017 | 497 |
7,004 | Streaming Weak Submodularity: Interpreting Neural Networks on the Fly Ethan R. Elenberg Department of Electrical and Computer Engineering The University of Texas at Austin elenberg@utexas.edu Alexandros G. Dimakis Department of Electrical and Computer Engineering The University of Texas at Austin dimakis@austin.utexas.edu Moran Feldman Department of Mathematics and Computer Science Open University of Israel moranfe@openu.ac.il Amin Karbasi Department of Electrical Engineering Department of Computer Science Yale University amin.karbasi@yale.edu Abstract In many machine learning applications, it is important to explain the predictions of a black-box classifier. For example, why does a deep neural network assign an image to a particular class? We cast interpretability of black-box classifiers as a combinatorial maximization problem and propose an efficient streaming algorithm to solve it subject to cardinality constraints. By extending ideas from Badanidiyuru et al. [2014], we provide a constant factor approximation guarantee for our algorithm in the case of random stream order and a weakly submodular objective function. This is the first such theoretical guarantee for this general class of functions, and we also show that no such algorithm exists for a worst case stream order. Our algorithm obtains similar explanations of Inception V3 predictions 10 times faster than the state-of-the-art LIME framework of Ribeiro et al. [2016]. 1 Introduction Consider the following combinatorial optimization problem. Given a ground set N of N elements and a set function f : 2N 7! R≥0, find the set S of size k which maximizes f(S). This formulation is at the heart of many machine learning applications such as sparse regression, data summarization, facility location, and graphical model inference. Although the problem is intractable in general, if f is assumed to be submodular then many approximation algorithms have been shown to perform provably within a constant factor from the best solution. Some disadvantages of the standard greedy algorithm of Nemhauser et al. [1978] for this problem are that it requires repeated access to each data element and a large total number of function evaluations. This is undesirable in many large-scale machine learning tasks where the entire dataset cannot fit in main memory, or when a single function evaluation is time consuming. In our main application, each function evaluation corresponds to inference on a large neural network and can take a few seconds. In contrast, streaming algorithms make a small number of passes (often only one) over the data and have sublinear space complexity, and thus, are ideal for tasks of the above kind. Recent ideas, algorithms, and techniques from submodular set function theory have been used to derive similar results in much more general settings. For example, Elenberg et al. [2016a] used the concept of weak submodularity to derive approximation and parameter recovery guarantees for 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. nonlinear sparse regression. Thus, a natural question is whether recent results on streaming algorithms for maximizing submodular functions [Badanidiyuru et al., 2014, Buchbinder et al., 2015, Chekuri et al., 2015] extend to the weakly submodular setting. This paper answers the above question by providing the first analysis of a streaming algorithm for any class of approximately submodular functions. We use key algorithmic components of SIEVE-STREAMING [Badanidiyuru et al., 2014], namely greedy thresholding and binary search, combined with a novel analysis to prove a constant factor approximation for γ-weakly submodular functions (defined in Section 3). Specifically, our contributions are as follows. • An impossibility result showing that, even for 0.5-weakly submodular objectives, no randomized streaming algorithm which uses o(N) memory can have a constant approximation ratio when the ground set elements arrive in a worst case order. • STREAK: a greedy, deterministic streaming algorithm for maximizing γ-weakly submodular functions which uses O("−1k log k) memory and has an approximation ratio of (1 −") γ 2 · (3 −e−γ/2 −2 p 2 −e−γ/2) when the ground set elements arrive in a random order. • An experimental evaluation of our algorithm in two applications: nonlinear sparse regression using pairwise products of features and interpretability of black-box neural network classifiers. The above theoretical impossibility result is quite surprising since it stands in sharp contrast to known streaming algorithms for submodular objectives achieving a constant approximation ratio even for worst case stream order. One advantage of our approach is that, while our approximation guarantees are in terms of γ, our algorithm STREAK runs without requiring prior knowledge about the value of γ. This is important since the weak submodularity parameter γ is hard to compute, especially in streaming applications, as a single element can alter γ drastically. We use our streaming algorithm for neural network interpretability on Inception V3 [Szegedy et al., 2016]. For that purpose, we define a new set function maximization problem similar to LIME [Ribeiro et al., 2016] and apply our framework to approximately maximize this function. Experimentally, we find that our interpretability method produces explanations of similar quality as LIME, but runs approximately 10 times faster. 2 Related Work Monotone submodular set function maximization has been well studied, starting with the classical analysis of greedy forward selection subject to a matroid constraint [Nemhauser et al., 1978, Fisher et al., 1978]. For the special case of a uniform matroid constraint, the greedy algorithm achieves an approximation ratio of 1 −1/e [Fisher et al., 1978], and a more involved algorithm obtains this ratio also for general matroid constraints [C˘alinescu et al., 2011]. In general, no polynomial-time algorithm can have a better approximation ratio even for a uniform matroid constraint [Nemhauser and Wolsey, 1978, Feige, 1998]. However, it is possible to improve upon this bound when the data obeys some additional guarantees [Conforti and Cornuéjols, 1984, Vondrák, 2010, Sviridenko et al., 2015]. For maximizing nonnegative, not necessarily monotone, submodular functions subject to a general matroid constraint, the state-of-the-art randomized algorithm achieves an approximation ratio of 0.385 [Buchbinder and Feldman, 2016b]. Moreover, for uniform matroids there is also a deterministic algorithm achieving a slightly worse approximation ratio of 1/e [Buchbinder and Feldman, 2016a]. The reader is referred to Bach [2013] and Krause and Golovin [2014] for surveys on submodular function theory. A recent line of work aims to develop new algorithms for optimizing submodular functions suitable for large-scale machine learning applications. Algorithmic advances of this kind include STOCHASTIC-GREEDY [Mirzasoleiman et al., 2015], SIEVE-STREAMING [Badanidiyuru et al., 2014], and several distributed approaches [Mirzasoleiman et al., 2013, Barbosa et al., 2015, 2016, Pan et al., 2014, Khanna et al., 2017b]. Our algorithm extends ideas found in SIEVE-STREAMING and uses a different analysis to handle more general functions. Additionally, submodular set functions have been used to prove guarantees for online and active learning problems [Hoi et al., 2006, Wei et al., 2015, Buchbinder et al., 2015]. Specifically, in the online setting corresponding to our setting 2 (i.e., maximizing a monotone function subject to a cardinality constraint), Chan et al. [2017] achieve a competitive ratio of about 0.3178 when the function is submodular. The concept of weak submodularity was introduced in Krause and Cevher [2010], Das and Kempe [2011], where it was applied to the specific problem of feature selection in linear regression. Their main results state that if the data covariance matrix is not too correlated (using either incoherence or restricted eigenvalue assumptions), then maximizing the goodness of fit f(S) = R2 S as a function of the feature set S is weakly submodular. This leads to constant factor approximation guarantees for several greedy algorithms. Weak submodularity was connected with Restricted Strong Convexity in Elenberg et al. [2016a,b]. This showed that the same assumptions which imply the success of regularization also lead to guarantees on greedy algorithms. This framework was later used for additional algorithms and applications [Khanna et al., 2017a,b]. Other approximate versions of submodularity were used for greedy selection problems in Horel and Singer [2016], Hassidim and Singer [2017], Altschuler et al. [2016], Bian et al. [2017]. To the best of our knowledge, this is the first analysis of streaming algorithms for approximately submodular set functions. Increased interest in interpretable machine learning models has led to extensive study of sparse feature selection methods. For example, Bahmani et al. [2013] consider greedy algorithms for logistic regression, and Yang et al. [2016] solve a more general problem using `1 regularization. Recently, Ribeiro et al. [2016] developed a framework called LIME for interpreting black-box neural networks, and Sundararajan et al. [2017] proposed a method that requires access to the network’s gradients with respect to its inputs. We compare our algorithm to variations of LIME in Section 6.2. 3 Preliminaries First we establish some definitions and notation. Sets are denoted with capital letters, and all big O notation is assumed to be scaling with respect to N (the number of elements in the input stream). Given a set function f, we often use the discrete derivative f(B | A) , f(A [ B) −f(A). f is monotone if f(B | A) ≥0, 8A, B and nonnegative if f(A) ≥0, 8A. Using this notation one can define weakly submodular functions based on the following ratio. Definition 3.1 (Weak Submodularity, adapted from Das and Kempe [2011]). A monotone nonnegative set function f : 2N 7! R≥0 is called γ-weakly submodular for an integer r if γ γr , min L,S✓N : |L|,|S\L|r P j2S\L f(j | L) f(S | L) , where the ratio is considered to be equal to 1 when its numerator and denominator are both 0. This generalizes submodular functions by relaxing the diminishing returns property of discrete derivatives. It is easy to show that f is submodular if and only if γ|N | = 1. Definition 3.2 (Approximation Ratio). A streaming maximization algorithm ALG which returns a set S has approximation ratio R 2 [0, 1] if E[f(S)] ≥R · f(OPT), where OPT is the optimal solution and the expectation is over the random decisions of the algorithm and the randomness of the input stream order (when it is random). Formally our problem is as follows. Assume that elements from a ground set N arrive in a stream at either random or worst case order. The goal is then to design a one pass streaming algorithm that given oracle access to a nonnegative set function f : 2N 7! R≥0 maintains at most o(N) elements in memory and returns a set S of size at most k approximating max |T |k f(T) , up to an approximation ratio R(γk). Ideally, this approximation ratio should be as large as possible, and we also want it to be a function of γk and nothing else. In particular, we want it to be independent of k and N. To simplify notation, we use γ in place of γk in the rest of the paper. Additionally, proofs for all our theoretical results are deferred to the Supplementary Material. 3 4 Impossibility Result To prove our negative result showing that no streaming algorithm for our problem has a constant approximation ratio against a worst case stream order, we first need to construct a weakly submodular set function fk. Later we use it to construct a bad instance for any given streaming algorithm. Fix some k ≥1, and consider the ground set Nk = {ui, vi}k i=1. For ease of notation, let us define for every subset S ✓Nk u(S) = |S \ {ui}k i=1| , v(S) = |S \ {vi}k i=1| . Now we define the following set function: fk(S) = min{2 · u(S) + 1, 2 · v(S)} 8 S ✓Nk . Lemma 4.1. fk is nonnegative, monotone and 0.5-weakly submodular for the integer |Nk|. Since |Nk| = 2k, the maximum value of fk is fk(Nk) = 2 · v(Nk) = 2k. We now extend the ground set of fk by adding to it an arbitrary large number d of dummy elements which do not affect fk at all. Clearly, this does not affect the properties of fk proved in Lemma 4.1. However, the introduction of dummy elements allows us to assume that k is an arbitrary small value compared to N, which is necessary for the proof of the next theorem. In a nutshell, this proof is based on the observation that the elements of {ui}k i=1 are indistinguishable from the dummy elements as long as no element of {vi}k i=1 has arrived yet. Theorem 4.2. For every constant c 2 (0, 1] there is a large enough k such that no randomized streaming algorithm that uses o(N) memory to solve max|S|2k fk(S) has an approximation ratio of c for a worst case stream order. We note that fk has strong properties. In particular, Lemma 4.1 implies that it is 0.5-weakly submodular for every 0 r |N|. In contrast, the algorithm we show later assumes weak submodularity only for the cardinality constraint k. Thus, the above theorem implies that worst case stream order precludes a constant approximation ratio even for functions with much stronger properties compared to what is necessary for getting a constant approximation ratio when the order is random. The proof of Theorem 4.2 relies critically on the fact that each element is seen exactly once. In other words, once the algorithm decides to discard an element from its memory, this element is gone forever, which is a standard assumption for streaming algorithms. Thus, the theorem does not apply to algorithms that use multiple passes over N, or non-streaming algorithms that use o(N) writable memory, and their analysis remains an interesting open problem. 5 Streaming Algorithms In this section we give a deterministic streaming algorithm for our problem which works in a model in which the stream contains the elements of N in a random order. We first describe in Section 5.1 such a streaming algorithm assuming access to a value ⌧which approximates aγ · f(OPT), where a is a shorthand for a = ( p 2 −e−γ/2 −1)/2. Then, in Section 5.2 we explain how this assumption can be removed to obtain STREAK and bound its approximation ratio, space complexity, and running time. 5.1 Algorithm with access to ⌧ Consider Algorithm 1. In addition to the input instance, this algorithm gets a parameter ⌧2 [0, aγ · f(OPT)]. One should think of ⌧as close to aγ · f(OPT), although the following analysis of the algorithm does not rely on it. We provide an outline of the proof, but defer the technical details to the Supplementary Material. Theorem 5.1. The expected value of the set produced by Algorithm 1 is at least ⌧ a · 3 −e−γ/2 −2 p 2 −e−γ/2 2 = ⌧· ( p 2 −e−γ/2 −1) . 4 Algorithm 1 THRESHOLD GREEDY(f, k, ⌧) Let S ?. while there are more elements do Let u be the next element. if |S| < k and f(u | S) ≥⌧/k then Update S S [ {u}. end if end while return: S Algorithm 2 STREAK(f, k, ") Let m 0, and let I be an (originally empty) collection of instances of Algorithm 1. while there are more elements do Let u be the next element. if f(u) ≥m then Update m f(u) and um u. end if Update I so that it contains an instance of Algorithm 1 with ⌧= x for every x 2 {(1 −")i | i 2 Z and (1 −")m/(9k2) (1 −")i mk}, as explained in Section 5.2. Pass u to all instances of Algorithm 1 in I. end while return: the best set among all the outputs of the instances of Algorithm 1 in I and the singleton set {um}. Proof (Sketch). Let E be the event that f(S) < ⌧, where S is the output produced by Algorithm 1. Clearly f(S) ≥⌧whenever E does not occur, and thus, it is possible to lower bound the expected value of f(S) using E as follows. Observation 5.2. Let S denote the output of Algorithm 1, then E[f(S)] ≥(1 −Pr[E]) · ⌧. The lower bound given by Observation 5.2 is decreasing in Pr[E]. Proposition 5.4 provides another lower bound for E[f(S)] which increases with Pr[E]. An important ingredient of the proof of this proposition is the next observation, which implies that the solution produced by Algorithm 1 is always of size smaller than k when E happens. Observation 5.3. If at some point Algorithm 1 has a set S of size k, then f(S) ≥⌧. The proof of Proposition 5.4 is based on the above observation and on the observation that the random arrival order implies that every time that an element of OPT arrives in the stream we may assume it is a random element out of all the OPT elements that did not arrive yet. Proposition 5.4. For the set S produced by Algorithm 1, E[f(S)] ≥1 2 · ⇣ γ · [Pr[E] −e−γ/2] · f(OPT) −2⌧ ⌘ . The theorem now follows by showing that for every possible value of Pr[E] the guarantee of the theorem is implied by either Observation 5.2 or Proposition 5.4. Specifically, the former happens when Pr[E] 2 − p 2 −e−γ/2 and the later when Pr[E] ≥2 − p 2 −e−γ/2. 5.2 Algorithm without access to ⌧ In this section we explain how to get an algorithm which does not depend on ⌧. Instead, STREAK (Algorithm 2) receives an accuracy parameter " 2 (0, 1). Then, it uses " to run several instances of Algorithm 1 stored in a collection denoted by I. The algorithm maintains two variables throughout its execution: m is the maximum value of a singleton set corresponding to an element that the algorithm already observed, and um references an arbitrary element satisfying f(um) = m. 5 The collection I is updated as follows after each element arrival. If previously I contained an instance of Algorithm 1 with a given value for ⌧, and it no longer should contain such an instance, then the instance is simply removed. In contrast, if I did not contain an instance of Algorithm 1 with a given value for ⌧, and it should now contain such an instance, then a new instance with this value for ⌧is created. Finally, if I contained an instance of Algorithm 1 with a given value for ⌧, and it should continue to contain such an instance, then this instance remains in I as is. Theorem 5.5. The approximation ratio of STREAK is at least (1 −")γ · 3 −e−γ/2 −2 p 2 −e−γ/2 2 . The proof of Theorem 5.5 shows that in the final collection I there is an instance of Algorithm 1 whose ⌧provides a good approximation for aγ · f(OPT), and thus, this instance of Algorithm 1 should (up to some technical details) produce a good output set in accordance with Theorem 5.1. It remains to analyze the space complexity and running time of STREAK. We concentrate on bounding the number of elements STREAK keeps in its memory at any given time, as this amount dominates the space complexity as long as we assume that the space necessary to keep an element is at least as large as the space necessary to keep each one of the numbers used by the algorithm. Theorem 5.6. The space complexity of STREAK is O("−1k log k) elements. The running time of Algorithm 1 is O(Nf) where, abusing notation, f is the running time of a single oracle evaluation of f. Therefore, the running time of STREAK is O(Nf"−1 log k) since it uses at every given time only O("−1 log k) instances of the former algorithm. Given multiple threads, this can be improved to O(Nf + "−1 log k) by running the O("−1 log k) instances of Algorithm 1 in parallel. 6 Experiments We evaluate the performance of our streaming algorithm on two sparse feature selection applications.1 Features are passed to all algorithms in a random order to match the setting of Section 5. Random Streak(0.75) Streak(0.1) Local Search 0 200 400 600 Log Likelihood Random Streak(0.75) Streak(0.1) Local Search 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Generalization Accuracy k=20 k=40 k=80 (a) Performance Random Streak(0.75) Streak(0.1) Local Search 0 5000 10000 15000 Running Time (s) Random Streak(0.75) Streak(0.1) Local Search 0 100000 200000 300000 400000 Oracle Evaluations k=20 k=40 k=80 (b) Cost Figure 1: Logistic Regression, Phishing dataset with pairwise feature products. Our algorithm is comparable to LOCALSEARCH in both log likelihood and generalization accuracy, with much lower running time and number of model fits in most cases. Results averaged over 40 iterations, error bars show 1 standard deviation. 6.1 Sparse Regression with Pairwise Features In this experiment, a sparse logistic regression is fit on 2000 training and 2000 test observations from the Phishing dataset [Lichman, 2013]. This setup is known to be weakly submodular under mild data assumptions [Elenberg et al., 2016a]. First, the categorical features are one-hot encoded, increasing 1Code for these experiments is available at https://github.com/eelenberg/streak. 6 100 101 102 103 104 105 Running Time (s) 500 550 600 650 700 Log Likelihood Random Streak(0.75) Streak(0.5) Streak(0.2) Streak(0.1) Streak(0.05) Local Search (a) Sparse Regression LIME + Max Wts LIME + FS LIME + Lasso Streak 0 500 1000 1500 2000 2500 Running Time (s) (b) Interpretability Figure 2: 2(a): Logistic Regression, Phishing dataset with pairwise feature products, k = 80 features. By varying the parameter ", our algorithm captures a time-accuracy tradeoff between RANDOMSUBSET and LOCALSEARCH. Results averaged over 40 iterations, standard deviation shown with error bars. 2(b): Running times of interpretability algorithms on the Inception V3 network, N = 30, k = 5. Streaming maximization runs 10 times faster than the LIME framework. Results averaged over 40 total iterations using 8 example explanations, error bars show 1 standard deviation. the feature dimension to 68. Then, all pairwise products are added for a total of N = 4692 features. To reduce computational cost, feature products are generated and added to the stream on-the-fly as needed. We compare with 2 other algorithms. RANDOMSUBSET selects the first k features from the random stream. LOCALSEARCH first fills a buffer with the first k features, and then swaps each incoming feature with the feature from the buffer which yields the largest nonnegative improvement. Figure 1(a) shows both the final log likelihood and the generalization accuracy for RANDOMSUBSET, LOCALSEARCH, and our STREAK algorithm for " = {0.75, 0.1} and k = {20, 40, 80}. As expected, the RANDOMSUBSET algorithm has much larger variation since its performance depends highly on the random stream order. It also performs significantly worse than LOCALSEARCH for both metrics, whereas STREAK is comparable for most parameter choices. Figure 1(b) shows two measures of computational cost: running time and the number of oracle evaluations (regression fits). We note STREAK scales better as k increases; for example, STREAK with k = 80 and " = 0.1 (" = 0.75) runs in about 70% (5%) of the time it takes to run LOCALSEARCH with k = 40. Interestingly, our speedups are more substantial with respect to running time. In some cases STREAK actually fits more regressions than LOCALSEARCH, but still manages to be faster. We attribute this to the fact that nearly all of LOCALSEARCH’s regressions involve k features, which are slower than many of the small regressions called by STREAK. Figure 2(a) shows the final log likelihood versus running time for k = 80 and " 2 [0.05, 0.75]. By varying the precision ", we achieve a gradual tradeoff between speed and performance. This shows that STREAK can reduce the running time by over an order of magnitude with minimal impact on the final log likelihood. 6.2 Black-Box Interpretability Our next application is interpreting the predictions of black-box machine learning models. Specifically, we begin with the Inception V3 deep neural network [Szegedy et al., 2016] trained on ImageNet. We use this network for the task of classifying 5 types of flowers via transfer learning. This is done by adding a final softmax layer and retraining the network. We compare our approach to the LIME framework [Ribeiro et al., 2016] for developing sparse, interpretable explanations. The final step of LIME is to fit a k-sparse linear regression in the space of interpretable features. Here, the features are superpixels determined by the SLIC image segmentation algorithm [Achanta et al., 2012] (regions from any other segmentation would also suffice). The number of superpixels is bounded by N = 30. After a feature selection step, a final regression is performed on only the selected features. The following feature selection methods are supplied by 7 LIME: 1. Highest Weights: fits a full regression and keep the k features with largest coefficients. 2. Forward Selection: standard greedy forward selection. 3. Lasso: `1 regularization. We introduce a novel method for black-box interpretability that is similar to but simpler than LIME. As before, we segment an image into N superpixels. Then, for a subset S of those regions we can create a new image that contains only these regions and feed this into the black-box classifier. For a given model M, an input image I, and a label L1 we ask for an explanation: why did model M label image I with label L1. We propose the following solution to this problem. Consider the set function f(S) giving the likelihood that image I(S) has label L1. We approximately solve max |S|k f(S) , using STREAK. Intuitively, we are limiting the number of superpixels to k so that the output will include only the most important superpixels, and thus, will represent an interpretable explanation. In our experiments we set k = 5. Note that the set function f(S) depends on the black-box classifier and is neither monotone nor submodular in general. Still, we find that the greedy maximization algorithm produces very good explanations for the flower classifier as shown in Figure 3 and the additional experiments in the Supplementary Material. Figure 2(b) shows that our algorithm is much faster than the LIME approach. This is primarily because LIME relies on generating and classifying a large set of randomly perturbed example images. 7 Conclusions We propose STREAK, the first streaming algorithm for maximizing weakly submodular functions, and prove that it achieves a constant factor approximation assuming a random stream order. This is useful when the set function is not submodular and, additionally, takes a long time to evaluate or has a very large ground set. Conversely, we show that under a worst case stream order no algorithm with memory sublinear in the ground set size has a constant factor approximation. We formulate interpretability of black-box neural networks as set function maximization, and show that STREAK provides interpretable explanations faster than previous approaches. We also show experimentally that STREAK trades off accuracy and running time in nonlinear sparse regression. One interesting direction for future work is to tighten the bounds of Theorems 5.1 and 5.5, which are nontrivial but somewhat loose. For example, there is a gap between the theoretical guarantee of the state-of-the-art algorithm for submodular functions and our bound for γ = 1. However, as our algorithm performs the same computation as that state-of-the-art algorithm when the function is submodular, this gap is solely an analysis issue. Hence, the real theoretical performance of our algorithm is better than what we have been able to prove in Section 5. 8 Acknowledgments This research has been supported by NSF Grants CCF 1344364, 1407278, 1422549, 1618689, ARO YIP W911NF-14-1-0258, ISF Grant 1357/16, Google Faculty Research Award, and DARPA Young Faculty Award (D16AP00046). 8 (a) (b) (c) (d) Figure 3: Comparison of interpretability algorithms for the Inception V3 deep neural network. We have used transfer learning to extract features from Inception and train a flower classifier. In these four input images the flower types were correctly classified (from (a) to (d): rose, sunflower, daisy, and daisy). We ask the question of interpretability: why did this model classify this image as rose. We are using our framework (and the recent prior work LIME [Ribeiro et al., 2016]) to see which parts of the image the neural network is looking at for these classification tasks. As can be seen STREAK correctly identifies the flower parts of the images while some LIME variations do not. More importantly, STREAK is creating subsampled images on-the-fly, and hence, runs approximately 10 times faster. Since interpretability tasks perform multiple calls to the black-box model, the running times can be quite significant. 9 References Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi, Pascal Fua, and Sabine Süsstrunk. SLIC Superpixels Compared to State-of-the-art Superpixel Methods. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(11):2274–2282, 2012. Jason Altschuler, Aditya Bhaskara, Gang (Thomas) Fu, Vahab Mirrokni, Afshin Rostamizadeh, and Morteza Zadimoghaddam. Greedy Column Subset Selection: New Bounds and Distributed Algorithms. In ICML, pages 2539–2548, 2016. Francis R. Bach. Learning with Submodular Functions: A Convex Optimization Perspective. Foundations and Trends in Machine Learning, 6, 2013. Ashwinkumar Badanidiyuru, Baharan Mirzasoleiman, Amin Karbasi, and Andreas Krause. Streaming Submodular Maximization: Massive Data Summarization on the Fly. In KDD, pages 671–680, 2014. Sohail Bahmani, Bhiksha Raj, and Petros T. Boufounos. Greedy Sparsity-Constrained Optimization. Journal of Machine Learning Research, 14:807–841, 2013. Rafael da Ponte Barbosa, Alina Ene, Huy L. Nguyen, and Justin Ward. The Power of Randomization: Distributed Submodular Maximization on Massive Datasets. In ICML, pages 1236–1244, 2015. Rafael da Ponte Barbosa, Alina Ene, Huy L. Nguyen, and Justin Ward. A New Framework for Distributed Submodular Maximization. In FOCS, pages 645–654, 2016. Andrew An Bian, Baharan Mirzasoleiman, Joachim M. Buhmann, and Andreas Krause. Guaranteed Non-convex Optimization: Submodular Maximization over Continuous Domains. In AISTATS, pages 111–120, 2017. Niv Buchbinder and Moran Feldman. Deterministic Algorithms for Submodular Maximization Problems. In SODA, pages 392–403, 2016a. Niv Buchbinder and Moran Feldman. Constrained Submodular Maximization via a Non-symmetric Technique. CoRR, abs/1611.03253, 2016b. URL http://arxiv.org/abs/1611.03253. Niv Buchbinder, Moran Feldman, and Roy Schwartz. Online Submodular Maximization with Preemption. In SODA, pages 1202–1216, 2015. Gruia C˘alinescu, Chandra Chekuri, Martin Pál, and Jan Vondrák. Maximizing a Monotone Submodular Function Subject to a Matroid Constraint. SIAM J. Comput., 40(6):1740–1766, 2011. T-H. Hubert Chan, Zhiyi Huang, Shaofeng H.-C. Jiang, Ning Kang, and Zhihao Gavin Tang. Online Submodular Maximization with Free Disposal: Randomization Beats 1/4 for Partition Matroids. In SODA, pages 1204–1223, 2017. Chandra Chekuri, Shalmoli Gupta, and Kent Quanrud. Streaming Algorithms for Submodular Function Maximization. In ICALP, pages 318–330, 2015. Michele Conforti and Gérard Cornuéjols. Submodular set functions, matroids and the greedy algorithm: Tight worst-case bounds and some generalizations of the Rado-Edmonds theorem. Discrete Applied Mathematics, 7(3):251–274, March 1984. Abhimanyu Das and David Kempe. Submodular meets Spectral: Greedy Algorithms for Subset Selection, Sparse Approximation and Dictionary Selection. In ICML, pages 1057–1064, 2011. Ethan R. Elenberg, Rajiv Khanna, Alexandros G. Dimakis, and Sahand Negahban. Restricted Strong Convexity Implies Weak Submodularity. CoRR, abs/1612.00804, 2016a. URL http: //arxiv.org/abs/1612.00804. Ethan R. Elenberg, Rajiv Khanna, Alexandros G. Dimakis, and Sahand Negahban. Restricted Strong Convexity Implies Weak Submodularity. In NIPS Workshop on Learning in High Dimensions with Structure, 2016b. Uriel Feige. A Threshold of ln n for Approximating Set Cover. Journal of the ACM (JACM), 45(4): 634–652, 1998. 10 Marshall L. Fisher, George L. Nemhauser, and Laurence A. Wolsey. An analysis of approximations for maximizing submodular set functions–II. In M. L. Balinski and A. J. Hoffman, editors, Polyhedral Combinatorics: Dedicated to the memory of D.R. Fulkerson, pages 73–87. Springer Berlin Heidelberg, Berlin, Heidelberg, 1978. Avinatan Hassidim and Yaron Singer. Submodular Optimization Under Noise. In COLT, pages 1069–1122, 2017. Steven C. H. Hoi, Rong Jin, Jianke Zhu, and Michael R. Lyu. Batch Mode Active Learning and its Application to Medical Image Classification. In ICML, pages 417–424, 2006. Thibaut Horel and Yaron Singer. Maximization of Approximately Submodular Functions. In NIPS, 2016. Rajiv Khanna, Ethan R. Elenberg, Alexandros G. Dimakis, Joydeep Ghosh, and Sahand Negahban. On Approximation Guarantees for Greedy Low Rank Optimization. In ICML, pages 1837–1846, 2017a. Rajiv Khanna, Ethan R. Elenberg, Alexandros G. Dimakis, Sahand Negahban, and Joydeep Ghosh. Scalable Greedy Support Selection via Weak Submodularity. In AISTATS, pages 1560–1568, 2017b. Andreas Krause and Volkan Cevher. Submodular Dictionary Selection for Sparse Representation. In ICML, pages 567–574, 2010. Andreas Krause and Daniel Golovin. Submodular Function Maximization. Tractability: Practical Approaches to Hard Problems, 3:71–104, 2014. Moshe Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ ml. Baharan Mirzasoleiman, Amin Karbasi, Rik Sarkar, and Andreas Krause. Distributed Submodular Maximization: Identifying Representative Elements in Massive Data. NIPS, pages 2049–2057, 2013. Baharan Mirzasoleiman, Ashwinkumar Badanidiyuru, Amin Karbasi, Jan Vondrák, and Andreas Krause. Lazier Than Lazy Greedy. In AAAI, pages 1812–1818, 2015. George L. Nemhauser and Laurence A. Wolsey. Best Algorithms for Approximating the Maximum of a Submodular Set Function. Math. Oper. Res., 3(3):177–188, August 1978. George L. Nemhauser, Laurence A. Wolsey, and Marshall L. Fisher. An analysis of approximations for maximizing submodular set functions–I. Mathematical Programming, 14(1):265–294, 1978. Xinghao Pan, Stefanie Jegelka, Joseph E. Gonzalez, Joseph K. Bradley, and Michael I. Jordan. Parallel Double Greedy Submodular Maximization. In NIPS, pages 118–126, 2014. Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. “Why Should I Trust You?” Explaining the Predictions of Any Classifier. In KDD, pages 1135–1144, 2016. Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic Attribution for Deep Networks. In ICML, pages 3319–3328, 2017. Maxim Sviridenko, Jan Vondrák, and Justin Ward. Optimal approximation for submodular and supermodular optimization with bounded curvature. In SODA, pages 1134–1148, 2015. Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the Inception Architecture for Computer Vision. In CVPR, pages 2818–2826, 2016. Jan Vondrák. Submodularity and curvature: the optimal algorithm. RIMS Kôkyûroku Bessatsu B23, pages 253–266, 2010. Kai Wei, Iyer Rishabh, and Jeff Bilmes. Submodularity in Data Subset Selection and Active Learning. ICML, pages 1954–1963, 2015. Zhuoran Yang, Zhaoran Wang, Han Liu, Yonina C. Eldar, and Tong Zhang. Sparse Nonlinear Regression: Parameter Estimation and Asymptotic Inference. ICML, pages 2472–2481, 2016. 11 | 2017 | 498 |
7,005 | Decomposable Submodular Function Minimization Discrete and Continuous Alina Ene∗ Huy L. Nguy˜ên† László A. Végh‡ Abstract This paper investigates connections between discrete and continuous approaches for decomposable submodular function minimization. We provide improved running time estimates for the state-of-the-art continuous algorithms for the problem using combinatorial arguments. We also provide a systematic experimental comparison of the two types of methods, based on a clear distinction between level-0 and level-1 algorithms. 1 Introduction Submodular functions arise in a wide range of applications: graph theory, optimization, economics, game theory, to name a few. A function f : 2V →R on a ground set V is submodular if f(X) + f(Y ) ≥f(X ∩Y ) + f(X ∪Y ) for all sets X, Y ⊆V . Submodularity can also be interpreted as a diminishing returns property. There has been significant interest in submodular optimization in the machine learning and computer vision communities. The submodular function minimization (SFM) problem arises in problems in image segmentation or MAP inference tasks in Markov Random Fields. Landmark results in combinatorial optimization give polynomial-time exact algorithms for SFM. However, the highdegree polynomial dependence in the running time is prohibitive for large-scale problem instances. The main objective in this context is to develop fast and scalable SFM algorithms. Instead of minimizing arbitrary submodular functions, several recent papers aim to exploit special structural properties of submodular functions arising in practical applications. This paper focuses on the popular model of decomposable submodular functions. These are functions that can be written as sums of several “simple” submodular functions defined on small supports. Some definitions are needed to introduce our problem setting. Let f : 2V →R be a submodular function, and let n := |V |. We can assume w.l.o.g. that f(∅) = 0. We are interested in solving the submodular function minimization problem: min S⊆V f(S). (SFM) For a vector y ∈RV and a set S ⊆V , we use the notation y(S) := P v∈S y(v). The base polytope of a submodular function is defined as B(f) := {y ∈RV : y(S) ≤f(S) ∀S ⊆V, y(V ) = f(V )}. One can optimize linear functions over B(f) using the greedy algorithm. The SFM problem can be reduced to finding the minimum norm point of the base polytope B(f) [10]. min 1 2∥y∥2 2 : y ∈B(f) . (Min-Norm) ∗Department of Computer Science, Boston University, aene@bu.edu †College of Computer and Information Science, Northeastern University, hu.nguyen@northeastern.edu ‡Department of Mathematics, London School of Economics, L.Vegh@lse.ac.uk 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. This reduction is the starting point of convex optimization approaches for SFM. We refer the reader to Sections 44–45 in [28] for concepts and results in submodular optimization, and to [2] on machine learning applications. We assume that f is given in the decomposition f(S) = Pr i=1 fi(S), where each fi : 2V →R is a submodular function. Such functions are called decomposable or Sum-of-Submodular (SoS) in the literature. In the decomposable submodular function minimization (DSFM) problem, we aim to minimize a function given in such a decomposition. We will make the following assumptions. For each i ∈[r], we assume that two oracles are provided: (i) a value oracle that returns fi(S) for any set S ⊆V in time EOi; and (ii) a quadratic minimization oracle Oi(w). For any input vector w ∈Rn, this oracle returns an optimal solution to (Min-Norm) for the function fi + w, or equivalently, an optimal solution to miny∈B(fi) ∥y + w∥2 2. We let Θi denote the running time of a single call to the oracle Oi, Θmax := maxi∈[r] Θi denote the maximum time of an oracle call, Θavg := 1 r P i∈[r] Θi denote the average time of an oracle call.4 We let Fi,max := maxS⊆V |fi(S)|, Fmax := maxS⊆V |f(S)| denote the maximum function values. For each i ∈[r], the function fi has an effective support Ci such that fi(S) = fi(S ∩Ci) for every S ⊆V . DSFM thus requires algorithms on two levels. The level-0 algorithms are the subroutines used to evaluate the oracles Oi for every i ∈[r]. The level-1 algorithm minimizes the function f using the level-0 algorithms as black boxes. 1.1 Prior work SFM has had a long history in combinatorial optimization since the early 1970s, following the influential work of Edmonds [4]. The first polynomial-time algorithm was obtained via the ellipsoid method [14]; recent work presented substantial improvements using this approach [22]. Substantial work focused on designing strongly polynomial combinatorial algorithms [9, 15, 16, 25, 17, 27]. Still, designing practical algorithms for SFM that can be applied to large-scale problem instances remains an open problem. Let us now turn to DSFM. Previous work mainly focused on level-1 algorithms. These can be classified as discrete and continuous optimization methods. The discrete approach builds on techniques of classical discrete algorithms for network flows and for submodular flows. Kolmogorov [21] showed that the problem can be reduced to submodular flow maximization, and also presented a more efficient augmenting path algorithm. Subsequent discrete approaches were given in [1, 7, 8]. Continuous approaches start with the convex programming formulation (Min-Norm). Gradient methods were applied for the decomposable setting in [5, 24, 30]. Less attention has been given to the level-0 algorithms. Some papers mainly focus on theoretical guarantees on the running time of level-1 algorithms, and treat the level-0 subroutines as black-boxes (e.g. [5, 24, 21]). In other papers (e.g. [18, 30]), the model is restricted to functions fi of a simple specific type that are easy to minimize. An alternative assumption is that all Ci’s are small, of size at most k; and thus these oracles can be evaluated by exhaustive search, in 2k value oracle calls (e.g. [1, 7]). Shanu et al. [29] use a block coordinate descent method for level-1, and make no assumptions on the functions fi. The oracles are evaluated via the Fujishige-Wolfe minimum norm point algorithm [11, 31] for level-0. Let us note that these experimental studies considered the level-0 and level-1 algorithms as a single “package”. For example, Shanu et al. [29] compare the performance of their SoS Min-Norm algorithm to the continuous approach of Jegelka et al. [18] and the combinatorial approach of Arora et al. [1]. However, these implementations cannot be directly compared, since they use three different level-0 algorithms: Fujishige-Wolfe in SoS Min-Norm, a general QP solver for the algorithm of [18], and exhaustive search for [1]. For potentials of large support, Fujishige-Wolfe outperforms these other level-0 subroutines, hence the level-1 algorithms in [18, 1] could have compared more favorably using the same Fujishige-Wolfe subroutine. 4For flow-type algorithms for DSFM, a slightly weaker oracle assumption suffices, returning a minimizer of minS⊆Ci fi(S) + w(S) for any given w ∈RCi. This oracle and the quadratic minimization oracle are reducible to each other: the former reduces to a single call to the latter, and one can implement the latter using O(|Ci|) calls to the former (see e.g. [2]). 2 1.2 Our contributions Our paper establishes connections between discrete and continuous methods for DSFM, as well as provides a systematic experimental comparison of these approaches. Our main theoretical contribution improves the worst-case complexity bound of the most recent continuous optimization methods [5, 24] by a factor of r, the number of functions in the decomposition. This is achieved by improving the bounds on the relevant condition numbers. Our proof exploits ideas from the discrete optimization approach. This provides not only better, but also considerably simpler arguments than the algebraic proof in [24]. The guiding principle of our experimental work is the clean conceptual distinction between the level-0 and level-1 algorithms, and to compare different level-1 algorithms by using the same level-0 subroutines. We compare the state-of-the-art continuous and discrete algorithms: RCDM and ACDM from [5] with Submodular IBFS from [7]. We consider multiple options for the level-0 subroutines. For certain potential types, we use tailored subroutines exploiting the specific form of the problem. We also consider a variant of the Fujishige-Wolfe algorithm as a subroutine applicable for arbitrary potentials. Our experimental results reveal the following tradeoff. Discrete algorithms on level-1 require more calls to the level-0 oracle, but less overhead computation. Hence using algorithms such as IBFS on level-1 can be significantly faster than gradient descent, as long as the potentials have fairly small supports. However, as the size of the potentials grow, or we do need to work with a generic level-0 algorithm, gradient methods are preferable. Gradient methods can perform better for larger potentials also due to weaker requirements on the level-0 subroutines: approximate level-0 subroutines suffice for them, whereas discrete algorithms require exact optimal solutions on level-0. Paper outline. The rest of the paper is structured as follows. The level-1 algorithmic frameworks using discrete and convex optimization are described in Sections 2 and 3, respectively. Section 4 gives improved convergence guarantees for the gradient descent algorithms outlined in Section 3. Section 5 discusses the different types of level-0 algorithms and how they can be used together with the level-1 frameworks. Section 6 presents a brief overview of our experimental results. This is an extended abstract. The full paper is available on http://arxiv.org/abs/1703.01830. 2 Discrete optimization algorithms on Level-1 In this section, we outline a level-1 algorithmic framework for DSFM that is based on a combinatorial framework first studied by Fujishige and Zhang [12] for submodular intersection. The submodular intersection problem is equivalent to DSFM for the sum of two functions, and the approach can be adapted and extended to the general DSFM problem with an arbitrary decomposition. We now give a brief description of the algorithmic framework. The full version exhibits submodular versions of the Edmonds-Karp and preflow-push algorithms. Algorithmic framework. For a decomposable function f, every x ∈B(f) can be written as x = Pr i=1 xi, where supp(xi) ⊆Ci and xi ∈B(fi) (see e.g. Theorem 44.6 in [28]). A natural algorithmic approach is to maintain an x ∈B(f) in such a representation, and iteratively update it using the combinatorial framework described below. DSFM can be cast as a maximum network flow problem in a network that is suitably defined based on the current point x. This can be viewed as an analogue of the residual graph in the maxflow/mincut setting, and it is precisely the residual graph if the DSFM instance is a minimum cut instance. The auxiliary graph. For an x ∈B(f) of the form x = Pr i=1 xi, we construct the following directed auxiliary graph G = (V, E), with E = Sr i=1 Ei and capacities c : E →R+. E is a multiset union: we include parallel copies if the same arc occurs in multiple Ei. The arc sets Ei are complete directed graphs (cliques) on Ci, and for an arc (u, v) ∈Ei, we define c(u, v) := min{fi(S) −xi(S): S ⊆Ci, u ∈S, v /∈S}. This is the maximum value ε such that x′ i ∈B(fi), where x′ i(u) = xi(u) + ε, x′ i(v) = xi(v) −ε, x′ i(z) = xi(z) for z /∈{u, v}. Let N := {v ∈V : x(v) < 0} and P := {v ∈V : x(v) > 0}. The algorithm aims to improve the current x by updating along shortest directed paths from N to P with positive capacity; there are several ways to update the solution, and we discuss specific approaches (derived from maximum flow algorithms) in the full version. If there exists no such directed path, then we let S denote the set 3 reachable from N on directed paths with positive capacity; thus, S ∩P = ∅. One can show that S is a minimizer of the function f. Updating along a shortest path Q from N to P amounts to the following. Let ε denote the minimum capacity of an arc on Q. If (u, v) ∈Q ∩Ei, then we increase xi(u) by ε and decrease xi(v) by ε. The crucial technical claim is the following. Let d(u) denote the shortest path distance of positive capacity arcs from u to the set P. Then, an update along a shortest directed path from N to P results in a feasible x ∈B(f), and further, all distance labels d(u) are non-decreasing. We refer the reader to Fujishige and Zhang [12] for a proof of this claim. Level-1 algorithms based on the network flow approach. Using the auxiliary graph described above, and updating on shortest augmenting paths, one can generalize several maximum flow algorithms to a level-1 algorithm of DSFM. In particular, based on the preflow-push algorithm [13], one can obtain a strongly polynomial DSFM algorithm with running time O(n2Θmax Pr i=1 |Ci|2). A scaling variant provides a weakly polynomial running time O(n2Θmax log Fmax + n Pr i=1 |Ci|3Θi). We defer the details to the full version of the paper. In our experiments, we use the submodular IBFS algorithm [7] as the main discrete level-1 algorithm; the same running time estimate as for preflow-push is applicable. If all Ci’s are small, O(1), the running time is O(n2rΘmax); note that r = Ω(n) in this case. 3 Convex optimization algorithms on Level-1 3.1 Convex formulations for DSFM Recall the convex quadratic program (Min-Norm) from the Introduction. This program has a unique optimal solution s∗, and the set S = {v ∈V : s∗(v) < 0} is the unique smallest minimizer to the SFM problem. We will refer to this optimal solution s∗throughout the section. In the DSFM setting, one can write (Min-Norm) in multiple equivalent forms [18]. For the first formulation, we let P := Qr i=1 B(fi) ⊆Rrn, and let A ∈Rn×(rn) denote the following matrix: A := [InIn . . . In] | {z } r times . Note that, for every y ∈P, Ay = Pr i=1 yi, where yi is the i-th block of y, and thus Ay ∈B(f). The problem (Min-Norm) can be reformulated for DSFM as follows. min 1 2 ∥Ay∥2 2 : y ∈P . (Prox-DSFM) The second formulation is the following. Let us define the subspace A := {a ∈Rnr : Aa = 0}, and minimize its distance from P: min ∥a −y∥2 2 : a ∈A, y ∈P . (Best-Approx) The set of optimal solutions for both formulations (Prox-DSFM) and (Best-Approx) is the set E := {y ∈P : Ay = s∗}, where s∗is the optimum of (Min-Norm). We note that, even though the set of solutions to (Best-Approx) are pairs of points (a, y) ∈A × P, the optimal solutions are uniquely determined by y ∈P, since the corresponding a is the projection of y to A. 3.2 Level-1 algorithms based on gradient descent The gradient descent algorithms of [24, 5] provide level-1 algorithms for DSFM. We provide a brief overview of these algorithms and we refer the reader to the respective papers for more details. The alternating projections algorithm. Nishihara et al. [24] minimize (Best-Approx) using alternating projections. The algorithm starts with a point a0 ∈A and it iteratively constructs a sequence (a(k), x(k)) k≥0 by projecting onto A and P: x(k) = argminx∈P∥a(k) −x∥2, a(k+1) = argmina∈A∥a −x(k)∥2. Random coordinate descent algorithms. Ene and Nguyen [5] minimize (Prox-DSFM) using random coordinate descent. The RCDM algorithm adapts the random coordinate descent algorithm 4 of Nesterov [23] to (Prox-DSFM). In each iteration, the algorithm samples a block i ∈[r] uniformly at random and it updates xi via a standard gradient descent step for smooth functions. ACDM, the accelerated version of the algorithm, presents a further enhancement using techniques from [6]. 3.3 Rates of convergence and condition numbers The algorithms mentioned above enjoy a linear convergence rate despite the fact that the objective functions of (Best-Approx) and (Prox-DSFM) are not strongly convex. Instead, the works [24, 5] show that there are certain parameters that one can associate with the objective functions such that the convergence is at the rate (1 −α)k, where α ∈(0, 1) is a quantity that depends on the appropriate parameter. Let us now define these parameters. Let A′ be the affine subspace A′ := {a ∈Rnr : Aa = s∗}. Note that the set E of optimal solutions to (Prox-DSFM) and (Best-Approx) is E = P ∩A′. For y ∈Rnr and a closed set K ⊆Rnr, we let d(y, K) = min {∥y −z∥2 : z ∈K} denote the distance between y and K. The relevant parameter for the Alternating Projections algorithm is defined as follows. Definition 3.1 ([24]). For every y ∈(P ∪A′) \ E, let κ(y) := d(y, E) max {d(y, P), d(y, A′)}, and κ∗:= sup {κ(y): y ∈(P ∪A′) \ E} . The relevant parameter for the random coordinate descent algorithms is the following. Definition 3.2 ([5]). For every y ∈P, let y∗:= argminp{∥p −y∥2 : p ∈E} be the optimal solution to (Prox-DSFM) that is closest to y. We say that the objective function 1 2∥Ay∥2 2 of (Prox-DSFM) is restricted ℓ-strongly convex if, for all y ∈P, we have ∥A(y −y∗)∥2 2 ≥ℓ∥y −y∗∥2 2. We define ℓ∗:= sup ℓ: 1 2∥Ay∥2 2 is restricted ℓ-strongly convex . The running time dependence of the algorithms on these parameters is given in the following theorems. Theorem 3.3 ([24]). Let (a(0), x(0) = argminx∈P∥a(0)−x∥2) be the initial solution and let (a∗, x∗) be an optimal solution to (Best-Approx). The alternating projection algorithm produces in k = Θ κ2 ∗ln ∥x(0) −x∗∥2 ϵ iterations a pair of points a(k) ∈A and x(k) ∈P that is ϵ-optimal, i.e., ∥a(k) −x(k)∥2 2 ≤∥a∗−x∗∥2 2 + ε. Theorem 3.4 ([5]). Let x(0) ∈P be the initial solution and let x∗be an optimal solution to (Prox-DSFM) that minimizes ∥x(0) −x∗∥2. The random coordinate descent algorithm produces in k = Θ r ℓ∗ ln ∥x(0) −x∗∥2 ϵ iterations a solution x(k) that is ϵ-optimal in expectation, i.e., E 1 2∥Ax(k)∥2 2 ≤1 2∥Ax∗∥2 2 + ϵ. The accelerated coordinate descent algorithm produces in k = Θ r r 1 ℓ∗ ln ∥x(0) −x∗∥2 ϵ iterations (specifically, Θ ln ∥x(0)−x∗∥2 ϵ epochs with Θ r q 1 ℓ∗ iterations in each epoch) a solution x(k) that is ϵ-optimal in expectation, i.e., E 1 2∥Ax(k)∥2 2 ≤1 2∥Ax∗∥2 2 + ϵ. 5 3.4 Tight analysis for the condition numbers and running times We provide a tight analysis for the condition numbers (the parameters κ∗and ℓ∗defined above). This leads to improved upper bounds on the running times of the gradient descent algorithms. Theorem 3.5. Let κ∗and ℓ∗be the parameters defined in Definition 3.1 and Definition 3.2. We have κ∗= Θ(n√r) and ℓ∗= Θ(1/n2). Using our improved convergence guarantees, we obtain the following improved running time analyses. Corollary 3.6. The total running time for obtaining an ϵ-approximate solution5 is as follows. • Alternating projections (AP): O n2r2Θavg ln ∥x(0)−x∗∥2 ϵ . • Random coordinate descent (RCDM): O n2rΘavg ln ∥x(0)−x∗∥2 ϵ . • Accelerated random coordinate descent (ACDM): O nrΘavg ln ∥x(0)−x∗∥2 ϵ . We can upper bound the diameter of the base polytope by O(√nFmax) [19], and thus ∥x(0) −x∗∥2 = O(√nFmax). For integer-valued functions, a ε-approximate solution can be converted to an exact optimum if ε = O(1/n) [2]. The upper bound on κ∗and the lower bound on ℓ∗are shown in Theorem 4.2. The lower bound on κ∗ and upper bound on ℓ∗in Theorem 3.5 follow by constructions in previous work, as explained next. Nishihara et al. showed that κ∗≤nr, and they give a family of minimum cut instances for which κ∗= Ω(n√r). Namely, consider a graph with n vertices and m edges, and suppose for simplicity that the edges have integer capacities at most C. The cut function of the graph can be decomposed into functions corresponding to the individual edges, and thus r = m and Θavg = O(1). Already on simple cycle graphs, they show that the running time of AP is Ω(n2m2 ln(nC)), which implies κ∗= Ω(n√r). Using the same construction, it is easy to obtain the upper bound ℓ∗= O(1/n2). 4 Tight convergence bounds for the convex optimization algorithms In this section, we show that the combinatorial approach introduced in Section 2 can be applied to obtain better bounds on the parameters κ∗and ℓ∗defined in Section 3. Besides giving a stronger bound, our proof is considerably simpler than the algebraic one using Cheeger’s inequality in [24]. The key is the following lemma. Lemma 4.1. Let y ∈P and s∗∈B(f). Then there exists a point x ∈P such that Ax = s∗and ∥x −y∥2 ≤ √n 2 ∥Ay −s∗∥1. Before proving this lemma, we show how it can be used to derive the bounds. Theorem 4.2. We have κ∗≤n√r/2 + 1 and ℓ∗≥4/n2. Proof: We start with the bound on κ∗. In order to bound κ∗, we need to upper bound κ(y) for any y ∈(P ∪A′) \ E. We distinguish between two cases: y ∈P \ E and y ∈A′ \ E. Case I: y ∈P \E. The denominator in the definition of κ(y) is equal to d(y, A′) = ∥Ay −s∗∥2/√r. This follows since the closest point a = (a1, . . . , ar) to y in A′ can be obtained as ai = yi + (s∗−Ay)/r for each i ∈[r]. Lemma 4.1 gives an x ∈P such that Ax = s∗and ∥x −y∥2 ≤ √n 2 ∥Ay −s∗∥1 ≤n 2 ∥Ay −s∗∥2. Since Ax = s∗, we have x ∈E and thus the numerator of κ(y) is at most ∥x −y∥2. Thus κ(y) ≤∥x −y∥2/(∥Ay −s∗∥2/√r) ≤n√r/2. Case II: y ∈A′ \ E. This means that Ay = s∗. The denominator of κ(y) is equal to d(y, P). For each i ∈[r], let qi ∈B(fi) be the point that minimizes ∥yi −qi∥2. Let q = (q1, . . . , qr) ∈P. Then 5The algorithms considered here solve the optimization problem (Prox-DSFM). An ε-approximate solution to an optimization problem min{f(x): x ∈P} is a solution x ∈P satisfying f(x) ≤f(x∗) + ε, where x∗∈argminx∈P f(x) is an optimal solution. 6 d(y, P) = ∥y −q∥2. Lemma 4.1 with q in place of y gives a point x ∈E such that ∥q −x∥2 ≤ √n 2 ∥Aq−s∗∥1. We have ∥Aq−s∗∥1 = ∥Aq−Ay∥1 ≤Pr i=1 ∥qi−yi∥1 = ∥q−y∥1 ≤√nr∥q−y∥2. Thus ∥q −x∥2 ≤n√r 2 ∥q −y∥2. Since x ∈E, we have d(y, E) ≤∥x−y∥2 ≤∥x−q∥2 +∥q −y∥2 ≤ 1 + n√r 2 ∥q −y∥2 = 1 + n√r 2 d(y, P). Therefore κ(p) ≤1 + n√r 2 , as desired. Let us now prove the bound on ℓ∗. Let y ∈P and let y∗:= argminp{∥p −y∥2 : y ∈E}. We need to verify that ∥A(y −y∗)∥2 2 ≥ 4 n2 ∥y −y∗∥2 2. Again, we apply Lemma 4.1 to obtain a point x ∈P such that Ax = s∗and ∥x −y∥2 2 ≤n 4 ∥Ax −Ay∥2 1 ≤n2 4 ∥Ax −Ay∥2 2. Since Ax = s∗, the definition of y∗gives ∥y −y∗∥2 2 ≤∥x−y∥2 2. Using that Ax = Ay∗= s∗, we have ∥Ax−Ay∥2 = ∥Ay −Ay∗∥2. □ Proof of Lemma 4.1: We give an algorithm that transforms y to a vector x ∈P as in the statement through a sequence of path augmentations in the auxiliary graph defined in Section 2. We initialize x = y and maintain x ∈P (and thus Ax ∈B(f)) throughout. We now define the set of source and sink nodes as N := {v ∈V : (Ax)(v) < s∗(v)} and P := {v ∈V : (Ax)(v) > s∗(v)}. Once N = P = ∅, we have Ax = s∗and terminate. Note that since Ax, s∗∈B(f), we have P v(Ax)(v) = P v s∗(v) = f(V ), and therefore N = ∅is equivalent to P = ∅. The blocks of x are denoted as x = (x1, x2, . . . , xr), with xi ∈B(fi). Claim 4.3. If N ̸= ∅, then there exists a directed path of positive capacity in the auxiliary graph between the sets N and P. Proof: We say that a set T is i-tight, if xi(T) = fi(T). It is a simple consequence of submodularity that the intersection and union of two i-tight sets are also i-tight sets. For every i ∈[r] and every u ∈V , we define Ti(u) as the unique minimal i-tight set containing u. It is easy to see that for an arc (u, v) ∈Ei, c(u, v) > 0 if and only if v ∈Ti(u). We note that if u /∈Ci, then x(u) = fi({u}) = 0 and thus Ti(u) = {u}. Let S be the set of vertices reachable from N on a directed path of positive capacity in the auxiliary graph. For a contradiction, assume S ∩P = ∅. By the definition of S, we must have Ti(u) ⊆S for every u ∈S and every i ∈[r]. Since the union of i-tight sets is also i-tight, we see that S is i-tight for every i ∈[r], and consequently, x(S) = f(S). On the other hand, since N ⊆S, S ∩P = ∅, and N ̸= ∅, we have x(S) < s∗(S). Since s∗∈B(f), we have f(S) = x(S) < s∗(S) ≤f(S), a contradiction. We conclude that S ∩P ̸= ∅. □ In every step of the algorithm, we take a shortest directed path Q of positive capacity from N to P, and update x along this path. That is, if (u, v) ∈Q ∩Ei, then we increase xi(u) by ε and decrease xi(v) by ε, where ε is the minimum capacity of an arc on Q. Note that this is the same as running the Edmonds-Karp-Dinitz algorithm in the submodular auxiliary graph. Using the analysis of [12], one can show that this change maintains x ∈P, and that the algorithm terminates in finite (in fact, strongly polynomial) time. We defer the details to the full version of the paper. It remains to bound ∥x −y∥2. At every path update, the change in ℓ∞-norm of x is at most ε, and the change in ℓ1-norm is at most nε, since the length of the path is ≤n. At the same time, P v∈N(s∗(v) −(Ax)(v)) decreases by ε. Thus, ∥x −y∥∞≤∥Ay −s∗∥1/2 and ∥x −y∥1 ≤ n∥Ay −s∗∥1/2. Using the inequality ∥p∥2 ≤ p ∥p∥1∥p∥∞, we obtain ∥x −y∥2 ≤ √n 2 ∥Ay −s∗∥1, completing the proof. □ 5 The level-0 algorithms In this section, we briefly discuss the level-0 algorithms and the interface between the level-1 and level-0 algorithms. Two-level frameworks via quadratic minimization oracles. Recall from the Introduction the assumption on the subroutines Oi(w) that finds the minimum norm point in B(fi + w) for the input vector w ∈Rn for each i ∈[r]. The continuous methods in Section 3 directly use the subroutines Oi(w) for the alternating projection or coordinate descent steps. For the flow-based algorithms in Section 2, the main oracle query is to find the auxiliary graph capacity c(u, v) of an arc (u, v) ∈Ei for some i ∈[r]. This can be easily formulated as minimizing the function fi+w for an appropriate w with supp(w) ⊆Ci. As explained at the beginning of Section 3, an optimal solution to (Min-Norm) 7 immediately gives an optimal solution to the SFM problem for the same submodular function. Hence, the auxiliary graph capacity queries can be implemented via single calls to the subroutines Oi(w). Let us also remark that, while the functions fi are formally defined on the entire ground set V , their effective support is Ci, and thus it suffices to solve the quadratic minimization problems on the ground set Ci. Whereas discrete and continuous algorithms require the same type of oracles, there is an important difference between the two algorithms in terms of exactness for the oracle solutions. The discrete algorithms require exact values of the auxiliary graph capacities c(u, v), as they must maintain xi ∈B(fi) throughout. Thus, the oracle must always return an optimal solution. The continuous algorithms are more robust, and return a solution with the required accuracy even if the oracle only returns an approximate solution. As discussed in Section 6, this difference leads to the continuous methods being applicable in settings where the combinatorial algorithms are prohibitively slow. Level-0 algorithms. We now discuss specific algorithms for quadratic minimization over the base polytopes of the functions fi. Several functions that arise in applications are “simple”, meaning that there is a function-specific quadratic minimization subroutine that is very efficient. If a functionspecific subroutine is not available, one can use a general-purpose submodular minimization algorithm. The works [1, 7] use a brute force search as the subroutine for each each fi, whose running time is 2|Ci|EOi. However, this is applicable only for small Ci’s and is not suitable for our experiments where the maximum clique size is quite large. As a general-purpose algorithm, we used the Fujishige-Wolfe minimum norm point algorithm [11, 31]. This provides an ε-approximate solution in O(|Ci|F 2 i,max/ε) iterations, with overall running time bound O((|Ci|4 + |Ci|2EOi)F 2 i,max/ε) [3]. The experimental running time of the Fujishige-Wolfe algorithm can be prohibitively large [20]. As we discuss in Section 6, by warm-starting the algorithm and performing only a small number of iterations, we were able to use the algorithm in conjunction with the gradient descent level-1 algorithms. 6 Experimental results We evaluate the algorithms on energy minimization problems that arise in image segmentation problems. We follow the standard approach and model the image segmentation task of segmenting an object from the background as finding a minimum cost 0/1 labeling of the pixels. The total labeling cost is the sum of labeling costs corresponding to cliques, where a clique is a set of pixels. We refer to the labeling cost functions as clique potentials. The main focus of our experimental analysis is to compare the running times of the decomposable submodular minimization algorithms. Therefore we have chosen to use the simple hand-tuned potentials that were used in previous work: the edge-based costs [1] and the count-based costs defined by [29, 30]. Specifically, we used the following clique potentials in our experiments, all of which are submodular: • Unary potentials for each pixel. The unary potentials are derived from Gaussian Mixture Models of color features [26]. • Pairwise potentials for each edge of the 8-neighbor grid graph. For each graph edge (i, j) between pixels i and j, the cost of a labeling equals 0 if the two pixels have the same label, and exp(−∥vi −vj∥2) for different labels, where vi is the RGB color vector of pixel i. • Square potentials for each 2 × 2 square of pixels. The cost of a labeling is the square root of the number of neighboring pixels that have different labels, as in [1]. • Region potentials. We use the algorithm from [30] to identify regions. For each region Ci, the labeling cost is fi(S) = |S||Ci \ S|, where S and Ci \ S are the subsets of Ci labeled 0 and 1, respectively, see [29, 30]. We used five image segmentation instances to evaluate the algorithms.6 The experiments were carried out on a single computer with a 3.3 GHz Intel Core i5 processor and 8 GB of memory; we reported averaged times over 10 trials. We performed several experiments with various combinations of potentials and parameters. In the minimum cut experiments, we evaluated the algorithms on instances containing only unary and 6The data is available at http://melodi.ee.washington.edu/~jegelka/cc/index.html and http://research.microsoft.com/en-us/um/cambridge/projects/visionimagevideoediting/ segmentation/grabcut.htm 8 0 200 400 600 800 1000 #iterations / #functions 0 200 400 600 800 1000 Running Time plant (all experiments) IBFS (mincut) IBFS (small cliques) IBFS (large cliques) RCDM (mincut) RCDM (small cliques) RCDM (large cliques) ACDM (mincut) ACDM (small cliques) ACDM (large cliques) 0 200 400 600 800 1000 #iterations / #functions 0 200 400 600 800 1000 Running Time octopus (all experiments) IBFS (mincut) IBFS (small cliques) IBFS (large cliques) RCDM (mincut) RCDM (small cliques) RCDM (large cliques) ACDM (mincut) ACDM (small cliques) ACDM (large cliques) 0 200 400 600 800 1000 #iterations / #functions 0 100 200 300 400 500 600 Running Time penguin (all experiments) IBFS (mincut) IBFS (small cliques) IBFS (large cliques) RCDM (mincut) RCDM (small cliques) RCDM (large cliques) ACDM (mincut) ACDM (small cliques) ACDM (large cliques) 0 200 400 600 800 1000 #iterations / #functions 0 100 200 300 400 500 600 700 800 900 Running Time plant (large cliques with Fujishige-Wolfe) RCDM ACDM Figure 1: Running times in seconds on a subset of the instances. The results for the other instances are very similar and are deferred to the full version of the paper. The x-axis shows the number of iterations for the continuous algorithms. The IBFS algorithm is exact, and we display its running time as a flat line. In the first three plots, the running time of IBFS on the small cliques instances nearly coincides with its running time on minimum cut instances. In the last plot, the running time of IBFS is missing since it is computationally prohibitive to run it on those instances. pairwise potentials; in the small cliques experiments, we used unary, pairwise, and square potentials. Finally, the large cliques experiments used all potentials above. Here, we used two different level-0 algorithms for the region potentials. Firstly, we used an algorithm specific to the particular potential, with running time O(|Ci| log(|Ci|) + |Ci|EOi). Secondly, we used the general Fujishige-Wolfe algorithm for level-0. This turned out to be significantly slower: it was prohibitive to run the algorithm to near-convergence. Hence, we could not implement IBFS in this setting as it requires an exact solution. We were able to implement coordinate descent methods with the following modification of FujishigeWolfe at level-0. At every iteration, we ran Fujishige-Wolfe for 10 iterations only, but we warm-started with the current solution xi ∈B(fi) for each i ∈[r]. Interestingly, this turned out to be sufficient for the level-1 algorithm to make progress. Summary of results. Figure 1 shows the running times for some of the instances; we defer the full experimental results to the full version of the paper. The IBFS algorithm is significantly faster than the gradient descent algorithms on all of the instances with small cliques. For all of the instances with larger cliques, IBFS (as well as other combinatorial algorithms) are no longer suitable if the only choice for the level-0 algorithms are generic methods such as the Fujishige-Wolfe algorithm. The experimental results suggest that in such cases, the coordinate descent methods together with a suitably modified Fujishige-Wolfe algorithm provides an approach for obtaining an approximate solution. 9 References [1] C. Arora, S. Banerjee, P. Kalra, and S. Maheshwari. Generic cuts: An efficient algorithm for optimal inference in higher order MRF-MAP. In European Conference on Computer Vision, pages 17–30. Springer, 2012. [2] F. Bach. Learning with submodular functions: A convex optimization perspective. Foundations and Trends in Machine Learning, 6(2-3):145–373, 2013. [3] D. Chakrabarty, P. Jain, and P. Kothari. Provable submodular minimization using Wolfe’s algorithm. In Advances in Neural Information Processing Systems, pages 802–809, 2014. [4] J. Edmonds. Submodular functions, matroids, and certain polyhedra. Combinatorial structures and their applications, pages 69–87, 1970. [5] A. R. Ene and H. L. Nguyen. Random coordinate descent methods for minimizing decomposable submodular functions. In Proceedings of the 32nd International Conference on Machine Learning (ICML), 2015. [6] O. Fercoq and P. Richtárik. Accelerated, parallel, and proximal coordinate descent. SIAM Journal on Optimization, 25(4):1997–2023, 2015. [7] A. Fix, T. Joachims, S. Min Park, and R. Zabih. Structured learning of sum-of-submodular higher order energy functions. In Proceedings of the IEEE International Conference on Computer Vision, pages 3104–3111, 2013. [8] A. Fix, C. Wang, and R. Zabih. A primal-dual algorithm for higher-order multilabel Markov random fields. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1138–1145, 2014. [9] L. Fleischer and S. Iwata. A push-relabel framework for submodular function minimization and applications to parametric optimization. Discrete Applied Mathematics, 131(2):311–322, 2003. [10] S. Fujishige. Lexicographically optimal base of a polymatroid with respect to a weight vector. Mathematics of Operations Research, 5(2):186–196, 1980. [11] S. Fujishige and S. Isotani. A submodular function minimization algorithm based on the minimum-norm base. Pacific Journal of Optimization, 7(1):3–17, 2011. [12] S. Fujishige and X. Zhang. New algorithms for the intersection problem of submodular systems. Japan Journal of Industrial and Applied Mathematics, 9(3):369, 1992. [13] A. V. Goldberg and R. E. Tarjan. A new approach to the maximum-flow problem. Journal of the ACM (JACM), 35(4):921–940, 1988. [14] M. Grötschel, L. Lovász, and A. Schrijver. The ellipsoid method and its consequences in combinatorial optimization. Combinatorica, 1(2):169–197, 1981. [15] S. Iwata. A faster scaling algorithm for minimizing submodular functions. SIAM Journal on Computing, 32(4):833–840, 2003. [16] S. Iwata, L. Fleischer, and S. Fujishige. A combinatorial strongly polynomial algorithm for minimizing submodular functions. Journal of the ACM (JACM), 48(4):761–777, 2001. [17] S. Iwata and J. B. Orlin. A simple combinatorial algorithm for submodular function minimization. In ACM-SIAM Symposium on Discrete Algorithms (SODA), 2009. [18] S. Jegelka, F. Bach, and S. Sra. Reflection methods for user-friendly submodular optimization. In Advances in Neural Information Processing Systems (NIPS), 2013. [19] S. Jegelka and J. A. Bilmes. Online submodular minimization for combinatorial structures. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 345–352, 2011. [20] S. Jegelka, H. Lin, and J. A. Bilmes. On fast approximate submodular minimization. In Advances in Neural Information Processing Systems, pages 460–468, 2011. 10 [21] V. Kolmogorov. Minimizing a sum of submodular functions. Discrete Applied Mathematics, 160(15):2246–2258, 2012. [22] Y. T. Lee, A. Sidford, and S. C.-w. Wong. A faster cutting plane method and its implications for combinatorial and convex optimization. In IEEE Foundations of Computer Science (FOCS), 2015. [23] Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [24] R. Nishihara, S. Jegelka, and M. I. Jordan. On the convergence rate of decomposable submodular function minimization. In Advances in Neural Information Processing Systems (NIPS), pages 640–648, 2014. [25] J. B. Orlin. A faster strongly polynomial time algorithm for submodular function minimization. Mathematical Programming, 118(2):237–251, 2009. [26] C. Rother, V. Kolmogorov, and A. Blake. Grabcut: Interactive foreground extraction using iterated graph cuts. ACM Transactions on Graphics (TOG), 23(3):309–314, 2004. [27] A. Schrijver. A combinatorial algorithm minimizing submodular functions in strongly polynomial time. Journal of Combinatorial Theory, Series B, 80(2):346–355, 2000. [28] A. Schrijver. Combinatorial optimization - Polyhedra and Efficiency. Springer, 2003. [29] I. Shanu, C. Arora, and P. Singla. Min norm point algorithm for higher order MRF-MAP inference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5365–5374, 2016. [30] P. Stobbe and A. Krause. Efficient minimization of decomposable submodular functions. In Advances in Neural Information Processing Systems (NIPS), 2010. [31] P. Wolfe. Finding the nearest point in a polytope. Mathematical Programming, 11(1):128–149, 1976. 11 | 2017 | 499 |
7,006 | Inverse Filtering for Hidden Markov Models Robert Mattila Department of Automatic Control KTH Royal Institute of Technology rmattila@kth.se Cristian R. Rojas Department of Automatic Control KTH Royal Institute of Technology crro@kth.se Vikram Krishnamurthy Cornell Tech Cornell University vikramk@cornell.edu Bo Wahlberg Department of Automatic Control KTH Royal Institute of Technology bo@kth.se Abstract This paper considers a number of related inverse filtering problems for hidden Markov models (HMMs). In particular, given a sequence of state posteriors and the system dynamics; i) estimate the corresponding sequence of observations, ii) estimate the observation likelihoods, and iii) jointly estimate the observation likelihoods and the observation sequence. We show how to avoid a computationally expensive mixed integer linear program (MILP) by exploiting the algebraic structure of the HMM filter using simple linear algebra operations, and provide conditions for when the quantities can be uniquely reconstructed. We also propose a solution to the more general case where the posteriors are noisily observed. Finally, the proposed inverse filtering algorithms are evaluated on real-world polysomnographic data used for automatic sleep segmentation. 1 Introduction The hidden Markov model (HMM) is a cornerstone of statistical modeling [1–4]. In it, a latent (i.e., hidden) state evolves according to Markovian dynamics. The state of the system is only indirectly observed via a sensor that provides noisy observations. The observations are sampled independently, conditioned on the state of the system, according to observation likelihood probabilities. Of paramount importance in many applications of HMMs is the classical stochastic filtering problem, namely: Given observations from an HMM with known dynamics and observation likelihood probabilities, compute the posterior distribution of the latent state. Throughout the paper, we restrict our attention to discrete-time finite observation-alphabet HMMs. For such HMMs, the solution to the filtering problem is a recursive algorithm known as the HMM filter [1, 4]. In this paper, we consider the inverse of the above problem. In particular, our aim is to provide solutions to the following inverse filtering problems: Given a sequence of posteriors (or, more generally, noisily observed posteriors) from an HMM with known dynamics, compute (estimate) the observation likelihood probabilities and/or the observations that generated the posteriors. To motivate these problems, we give several possible applications of our results below. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Applications The underlying idea of inverse filtering problems (“inform me about your state estimate and I will know your sensor characteristics, including your measurements”) has potential applications in, e.g., autonomous calibration of sensors, fault diagnosis, and detecting Bayesian behavior in agents. In model-based fault-detection [5, 6], sensor information together with solutions to related inverse filtering problems are used to detect abnormal behavior. (As trivial examples; i) if the true sequence of observations is known from a redundant sensor, it can be compared to the reconstructed sequence; if there is a miss-match, something is wrong, or ii) if multiple data batches are available, then change detection can be performed on the sequence of reconstructed observation likelihoods.) They are also of relevance in a revealed preference context in microeconomics where the aim is to detect expected utility maximization behavior of an agent; estimating the posterior given the agent’s actions is a crucial step, see, e.g., [7]. Recent advances in wearables and smart-sensor technology have led to consumer grade products (smart watches with motion and heart-beat monitoring, sleep trackers, etc.) that produce vast amounts of personal data by performing state estimation. This information can serve as an indicator of health, fitness and stress. It may be very difficult, or even impossible, to access the raw sensor data since the sensor and state estimator usually are tightly integrated and encapsulated in intelligent sensor systems. Inverse filtering provides a framework for reverse engineering and performing fault detection of such sensors. In Section 5, we demonstrate our proposed solutions on a system that performs automatic sequencing of sleep stages based on electroencephalogram (EEG) data – the outputs of such an automatic system are exactly posteriors over the different sleep stages [8]. Another important application of the inverse filtering problem arises in electronic warfare and cyberphysical security. How can one determine how accurate an enemy’s sensors are? In such problems, the state of the underlying Markov chain is usually known (a probing sequence), and one observes actions taken by the enemy which are based on filtered posterior distributions. The aim is to estimate the observation likelihood probabilities of the enemy, i.e., determine how accurate its sensors are. Our contributions It is possible to obtain a solution to the inverse filtering problem for HMMs by employing a brute-force approach (see Section 2.3) – essentially by testing observations from the alphabet, and at the same time finding system parameters consistent with the data. However, this leads to a computationally expensive combinatorial optimization problem. Instead, we demonstrate in this paper an efficient solution based on linear algebra by exploiting the inherent structure of the problem and the HMM filter. In particular, the contributions of this paper are three-fold: 1. We propose analytical solutions to three inverse filtering problems for HMMs that avoid computationally expensive mixed integer linear program (MILP) formulations. Moreover, we establish theorems guaranteeing unique identifiability. 2. We consider the setting where the output of the HMM filter is corrupted by noise, and propose an inverse filtering algorithm based on clustering. 3. We evaluate the algorithm on real-world data for automatic segmentation of the sleep cycle. Related work There are only two known cases where the optimal filter allows a finite dimensional characterization: the HMM filter for (discrete) HMMs, and the Kalman filter [9, 10] for linear Gaussian state-space models. Inverse filtering problems for the Kalman filter have been considered in, e.g., [5, 6, 10], however, inverse filtering for HMMs has, to the best knowledge of the authors, received much less attention. The inverse filtering problem has connections to a number of other inverse problems in various fields. For example, in control theory, the fundamental inverse optimal control problem, whose formulation dates back to 1964 [11], studies the question: given a system and a policy, for what cost criteria is the policy optimal? In microeconomic theory, the related problem of revealed preferences [12] asks the question: given a set of decisions made by an agent, is it possible to determine if a utility is being maximized, and if so, which? In machine learning, there are clear connections to, e.g., apprenticeship learning, imitation learning and inverse reinforcement learning, see, e.g., [13–17], which recently have received much attention. In these, the reward function of a Markov decision process (MDP) is learned by observing an expert demonstrating the task that an agent wants to learn to perform. The key difference between these works and our work is the set of system parameters we aim to learn. 2 2 Preliminaries In this section, we formulate the inverse filtering problems, discuss how these can be solved using combinatorial optimization, and state our assumptions formally. With regards to notation, all vectors are column vectors, unless transposed. The vector 1 is the vector of all ones. † denotes the Moore–Penrose pseudoinverse. 2.1 Hidden Markov models (HMMs) and the HMM filter We consider a discrete-time finite observation-alphabet HMM. Denote its state at time k as xk ∈ {1, . . . , X} and the corresponding observation yk ∈{1, . . . , Y }. The underlying Markov chain xk evolves according to the row-stochastic transition probability matrix P ∈RX×X, where [P]ij = Pr[xk+1 = j|xk = i]. The initial state x0 is sampled from the probability distribution π0 ∈RX, where [π0]i = Pr[x0 = i]. The noisy observations of the underlying Markov chain are obtained from the row-stochastic observation likelihood matrix B ∈RX×Y , where [B]ij = Pr[yk = j|xk = i] are the observation likelihood probabilities. We denote the columns of the observation likelihood matrix as {bi}Y i=1, i.e., B = [b1 . . . bY ]. In the classical stochastic filtering problem, the aim is to compute the posterior distribution πk ∈RX of the latent state (Markov chain, in our case) at time k, given observations from the system up to time k. The HMM filter [1, 4] computes these posteriors via the following recursive update: πk = BykP T πk−1 1T BykP T πk−1 , (1) initialized by π0, where [πk]i = Pr[xk = i|y1, . . . , yk] is the posterior distribution at time k, Byk = diag(byk) ∈RX×X, and {yk}N k=1 is a set of observations. 2.2 Inverse HMM filtering problem formulations The inverse filtering problem for HMMs is not a single problem – multiple variants can be formulated depending on what information is available a priori. We pose and consider a number of variations of increasing levels of generality depending on what data we can extract from the sensor system. To restrict the scope of the paper, we assume throughout that the transition matrix P is known, and is the same in both the system and the HMM filter (i.e, we do not consider miss-matched HMM filtering problems). Formally, the inverse filtering problems considered in this paper are as follows: Problem 1 (Inverse filtering problem with unknown observations). Consider the known data D = P, B, {πk}N k=0 , where the posteriors have been generated by an HMM-filter sensor. Reconstruct the observations {yk}N k=1. Problem 2 (Inverse filtering problem with unknown sensor). Consider the known data D = P, {yk}N k=1, {πk}N k=0 , where the posteriors have been generated by an HMM-filter sensor. Reconstruct the observation likelihood matrix B. Combining these two formulations yields the general problem: Problem 3 (Inverse filtering problem with unknown sensor and observations). Consider the known data D = P, {πk}N k=0 , where the posteriors have been generated by an HMM-filter sensor. Reconstruct the observations {yk}N k=1 and the observation likelihood matrix B. Finally, we consider the more general setting where the posteriors we obtain are corrupted by noise (due to, e.g., quantization, measurement or model uncertainties). In particular, we consider the case where the following sequence of noisy posteriors is obtained over time: ˜πk = πk + noise, (2) from the sensor system. We state directly the generalization of Problem 3 (the corresponding generalizations of Problems 1 and 2 follow as special-cases): Problem 4 (Noise-corrupted inverse filtering problem with unknown sensor and observations). Consider the data D = P, {˜πk}N k=0 , where the posteriors πk have been generated by an HMMfilter sensor, but we obtain noise-corrupted measurements ˜πk. Estimate the observations {yk}N k=1 and the observation likelihood matrix B. 3 2.3 Inverse filtering as an optimization problem It is possible to formulate Problems 1-4 as optimization problems of increasing levels of generality. As a first step, rewrite the HMM filter equation (1) as:1 (1) ⇐⇒bT ykP T πk−1πk = diag(byk)P T πk−1. (3) In Problem 3 we need to find what observation occurred at each time instant (a combinatorial problem), and at the same time reconstruct an observation likelihood matrix consistent with the data. To be consistent with the data, equation (3) has to be satisfied. This feasibility problem can be formulated as the following mixed-integer linear program (MILP): min {yk}N k=1,{bi}Y i=1 N X k=1 ∥bT ykP T πk−1πk −diag(byk)P T πk−1∥∞ s.t. yk ∈{1, . . . , Y }, for k = 1, . . . , N, bi ≥0, for i = 1, . . . , Y, [b1 . . . bY ]1 = 1, (4) where the choice of norm is arbitrary since for noise-free data it is possible to exactly fit observations and an observation likelihood matrix. In Problem 1, the bi:s are dropped as optimization variables and the problem reduces to an integer program (IP). In Problem 2, where the sequence of observations is known, the problem reduces to a linear program (LP) . Despite the ease of formulation, the down-side of this approach is that, even though Problems 1 and 2 are computationally tractable, the MILP-formulation of Problem 3 can become computationally very expensive for larger data sets. In the following sections, we will outline how the problems can be solved efficiently by exploiting the structure of the HMM filter. 2.4 Assumptions Before providing solutions to Problems 1-4, we state the assumptions that the HMMs in this paper need to satisfy to guarantee unique solutions. The first assumption serves as a proxy for ergodicity of the HMM and the HMM filter – it is a common assumption in statistical inference for HMMs [18, 4]. Assumption 1 (Ergodicity). The transition matrix P and the observation matrix B are elementwise (strictly) positive. The second assumption is a natural rank assumption on the observation likelihoods. The assumption says that the conditional distribution of any observation is not a linear combination of the conditional distributions of any other observations. Assumption 2 (Distinguishable observation likelihoods). The observation likelihood matrix B is full column rank. We will see that this assumption can be relaxed to the following assumption in problems where only the sequence of observations is to be reconstructed: Assumption 3 (Non-parallel observation likelihoods). No pair of columns of the observation likelihood matrix B is colinear, i.e., bi ̸= κbj for any real number κ and any i ̸= j. Without Assumption 3, it is impossible to distinguish between observation i and observation j. Note also that Assumption 2 implies Assumption 3. 3 Solution to the inverse filtering problem for HMMs in absence of noise In this section, we detail our solutions to Problems 1-3. We first provide the following two useful lemmas that will be key to the solutions for Problems 1-4. They give an alternative characterization of the HMM-filter update equation. (Note that all proofs are in the supplementary material.) 1Multiplication by the denominator is allowed under Assumption 1 – see below. 4 Lemma 1. The HMM-filter update equation (3) can equivalently be written πk(P T πk−1)T −diag(P T πk−1) byk = 0. (5) The second lemma characterizes the solutions to (5). Lemma 2. Under Assumption 1, the nullspace of the X × X matrix πk(P T πk−1)T −diag(P T πk−1) (6) is of dimension one for k > 1. 3.1 Solution to the inverse filtering problem with unknown observations In the formulation of Problem 1, we assumed that the observation likelihoods B were known, and aimed to reconstruct the sequence of observations from the posterior data. Equation (5) constrains which columns of the observation matrix B that are consistent with the update of the posterior vector at each time instant. Formally, any sequence ˆyk ∈ y ∈{1, . . . , Y } : πk(P T πk−1)T −diag(P T πk−1) by = 0 , (7) for k = 1, . . . , N, is consistent with the HMM filter posterior updates. (Recall that by denotes column y of the observation matrix B.) Since the problems (7) are decoupled in time k, they can trivially be solved in parallel. Theorem 1. Under Assumptions 1 and 3, the set in the right-hand side of equation (7) is a singleton, and is equal to the true observation, i.e., ˆyk = yk, (8) for k > 1. 3.2 Solution to the inverse filtering problem with unknown sensor The second inverse filtering problem we consider is when the sequence of observations is known, but the observation likelihoods B are unknown (Problem 2). This problem can be solved by exploiting Lemmas 1 and 2. Computing a basis for the nullspace of the coefficient matrix in formulation (5) of the HMM filter recovers, according to Lemmas 1 and 2, the direction of one column of B. In particular, the direction of the column corresponding to observation yk, i.e., byk. From such basis vectors, we can construct a matrix C ∈RX×Y where the yth column is aligned with by. Note that to be able to fully construct this matrix, every observation from the set {1, . . . , Y } needs to have been observed at least once. Due to being basis vectors for nullspaces, the columns of C are only determined up to scalings, so we need to exploit the structure of the observation matrix B to properly normalize them. To form an estimate ˆB from C, we employ that the observation likelihood matrix is row-stochastic. This means that we should rescale each column: ˆB = C diag(α) (9) for some α ∈RY , such that ˆB1 = 1. Details are provided in the following theorem. Theorem 2. If Assumption 1 holds, and every possible observation has been observed (i.e., that {1, . . . , Y } ⊂{yk}N k=1), then: i) there exists α ∈RY such that ˆB = B, ii) if Assumption 2 holds, then the choice of α is unique, and ˆB is equal to B. In particular, α = C†1. 5 3.3 Solution to the inverse filtering problem with unknown sensor and observations Finally, we turn to the general formulation in which we consider the combination of the previous two problems: both the sequence of observations and the observation likelihoods are unknown (Problem 3). Again, the solution follows from Lemmas 1 and 2. Note that there will be a degree of freedom since we can arbitrarily relabel each observation and correspondingly permute the columns of the observation likelihood matrix. As in the solution to Problem 2, computing a basis vector, say ¯ck, for the nullspace of the coefficient matrix in equation (5) recovers the direction of one column of the B matrix. However, since the sequence of observations is unknown, we do not know which column. To circumvent this, we concatenate such basis vectors in a matrix2 ¯C = [¯c2 . . . ¯cN] ∈RX×(N−1). (10) For sufficiently large N – essentially when every possible observation has been processed by the HMM filter – the matrix ¯C in (10) will contain Y columns out of which no pair is colinear (due to Assumption 3). All the columns that are parallel correspond to one particular observation. Let {σ1, . . . , σY } be the indices of Y such columns, and construct C = ¯CΣ (11) using the selection matrix Σ = [eσ1 . . . eσY ] ∈R(N−1)×Y , (12) where ei is the ith Cartesian basis vector. Lemma 3. Under Assumption 1 and Assumption 3, the expected number of samples needed to be able to construct the selection matrix Σ is upper-bounded by β−1 (1 + 1/2 + · · · + 1/Y ) , (13) where B ≥β > 0 elementwise. With C constructed in (11), we have obtained the direction of each column of the observation matrix. However, as before, they need to be properly normalized. For this, we exploit the sum-to-one property of the observation matrix as in the previous section. Let ˆB = C diag(α), (14) for α ∈RY , such that ˆB1 = 1. Details on how to find α are provided in the theorem below. This solves the first part of the problem, i.e., reconstructing the observation matrix. Secondly, to recover the sequence of observations, take ˆyk ∈ n y ∈{1, . . . , Y } : ˆby = κ¯ck for some real number κ o , (15) for k > 1. In words; check which columns of ˆB that the nullspace of the HMM filter coefficientmatrix (6) is colinear with at each time instant. Theorem 3. If Assumptions 1 and 3 hold, and the number of samples N is sufficiently large – see Lemma 3 – then: i) there exists α ∈RY in equation (14) such that ˆB = BP, where P is a permutation matrix. ii) the set on the right-hand side of equation (15) is a singleton. Moreover, the reconstructed observations ˆyk are, up to relabellings corresponding to P, equal to the true observations yk. iii) if Assumption 2 holds, then the choice of α is unique, and ˆB = BP. In particular, α = C†1. 2We start with ¯c2, since we make no assumption on the positivity of π0 – see the proof of Lemma 2. 6 4 Solution to the inverse filtering problem for HMMs in presence of noise In this section, we discuss the more general setting where the posteriors obtained from the sensor system are corrupted by noise. We will see that this problem naturally fits in a clustering framework since every posterior update will provide us with a noisy estimate of the direction of one column of the observation likelihood matrix. We consider an additive noise model of the following form: Assumption 4 (Noise model). The posteriors are corrupted by additive noise wk: ˜πk = πk + wk, (16) such that 1T ˜πk = 1 and ˜πk > 0. This noise model is valid, for example, when each observed posterior vector has been subsequently renormalized after noise that originates from quantization or measurement errors has been added. In the solution proposed in Section 3.3 for the noise-free case, the matrix ¯C in equation (10) was constructed by concatenating basis vectors for the nullspaces of the coefficient matrix in equation (5). With perturbed posterior vectors, the corresponding system of equations becomes ˜πk(P T ˜πk−1)T −diag(P T ˜πk−1) ˜ck = 0, (17) where ˜ck is now a perturbed (and scaled) version of byk. That this equation is valid is guaranteed by the generalization of Lemma 2: Lemma 4. Under Assumptions 1 and 4, the nullspace of the matrix ˜πk(P T ˜πk−1)T −diag(P T ˜πk−1) (18) is of dimension one for k > 1. Remark 1. In case Assumption 4 does not hold, the problem can instead be interpreted as a perturbed eigenvector problem. The vector ˜ck should then be taken as the eigenvector corresponding to the smallest eigenvalue. Lemma 4 says that we can construct a matrix ˜C (analogous to ¯C in Section 3.3) by concatenating the basis vectors from the one-dimensional nullspaces in (17). Due to the perturbations, every solution to equation (17) will be a perturbed version of the solution to the corresponding noise-free version of the equation. This means that it will not be possible to construct a selection matrix Σ as was done for ¯C in equation (12). However, because there are only Y unique solutions to the noise-free equations (5), it is natural to circumvent this (assuming that the perturbations are small) by clustering the columns of ˜C into Y clusters. As the columns of ˜C are only unique up to scaling, the clustering has to be performed with respect to their angular separations (using, e.g., the spherical k-means algorithm [19]). Let C ∈RX×Y be the matrix of the Y centroids resulting from running a clustering algorithm on the columns of ˜C. Each centroid can be interpreted as a noisy estimate of one column of the observation likelihood matrix. To obtain a properly normalized estimate of the observation likelihood matrix, we take ˆB = CA, (19) where A ∈RY ×Y . Note that, since C now contains noisy estimates of the directions of the columns of the observation likelihood matrix, we are not certain to be able to properly normalize it by purely rescaling each column (i.e., taking A to be a diagonal matrix as was done in Sections 3.2 and 3.3). A logical choice is the solution to the following LP, min A∈RY ×Y max i̸=j [A]ij s.t. CA ≥0, CA1 = 1, (20) which tries to minimize the off-diagonal elements of A. The resulting rescaling matrix A guarantees that ˆB = CA is a proper stochastic matrix (non-negative and has row-sum equal to one), as well as that the discrepancy between the directions of the columns of C and ˆB are minimized. The second part of the problem – reconstructing the sequence of observations – follows naturally from the clustering algorithm; an estimate of the sequence is obtained by checking to what cluster the solution ˜ck of equation (17) belongs in for each time instant. 7 5 Experimental results for sleep segmentation In this section, we illustrate the inverse filtering problem on real-world data. Background Roughly one third of a person’s life is spent sleeping. Sleep disorders are becoming more prevalent and, as public awareness has increased, the usage of sleep trackers is becoming wide-spread. The example below illustrates how the inverse filtering formulation and associated algorithms can be used as a step in real-time diagnosis of failure of sleep-tracking medical equipment. During the course of sleep, a human transitions through five different sleep stages [20]: wake, S1, S2, slow wave sleep (SWS) and rapid eye movement (REM). An important part of sleep analysis is obtaining a patient’s evolution over these sleep stages. Manual sequencing from all-night polysomnographic (PSG) recordings (including, e.g., electroencephalogram (EEG) readings) can be performed according to the Rechtschaffen and Kales (R&K) rules by well-trained experts [8, 20]. However, this is costly and laborious, so several works, e.g., [8, 20, 21], propose automatic sequencing based on HMMs. These systems usually output a posterior distribution over the sleep stages, or provide a Viterbi path. A malfunction of such an automatic system could have problematic consequences since medical decisions would be based on faulty information. The inverse filtering problem arises naturally for such reasons of fault-detection. Joint knowledge of the transition matrix can be assumed, since it is possible to obtain, from public sources, manually labeled data from which an estimate of P can be computed. Setup A version of the automatic sleep-staging system in [8, 20] was implemented. The mean frequency over the 0-30 Hz band of the EEG (over C3-A2 or C4-A1, according to the international 10-20 system) was used as observations. These readings were encoded to five symbols using a vectorquantization based codebook. The model was trained on data from nine patients in the PhysioNet CAP Sleep Database [22, 23]. The model was then evaluated on another patient – see Fig. 1 – over one full-night of sleep. The manually labeled stages according to K&R-rules are dashed-marked in the figure. To summarize the resulting posterior distributions over the sleep stages, we plot the mean state estimate when equidistant numbers have been assigned to each state. For the inverse filtering, the full posterior vectors were elementwise corrupted by Gaussian noise of standard deviation σ, and projected back to the simplex (to ensure a valid posterior probability vector) – simulating a noisy reading from the automatic system. A total of one hundred noise realizations were simulated. The noise can be a manifestation of measurement or quantization noise in the sensor system, or noise related to model uncertainties (in this case, an error in the transition probability matrix P). Results After permuting the labels of the observations, the error in the reconstructed observation likelihood matrix, as well as the fraction of correctly reconstructed observations, were computed. This is illustrated in Fig. 2. For the 1030 quantized EEG samples from the patient, the entire procedure takes less than one second on a 2.0 Ghz Intel Core 2 Duo processor system. 0 1 2 3 4 5 6 7 8 WAKE S1 S2 SWS REM hours since bedtime Figure 1: One night of sleep in which polysomnographic (PSG) observation data has been manually processed by an expert sleep analyst according to the R&K rules to obtain the sleep stages ( ). The posterior distribution over the sleep stages, resulting from an automatic sleep-staging system, has been summarized to a mean state estimate ( ). 8 10−8 10−6 10−4 10−2 100 0.2 0.5 1 noise σ fraction Correctly recovered observations 10−8 10−6 10−4 10−2 100 10−4 10−2 100 noise σ min P ∥ˆB −BP∥F Error in B Figure 2: Result of inverse filtering for various noise standard deviations σ. The vector of posterior probabilities is perturbed elementwise with Gaussian noise. Right: Error in the recovered observation likelihood matrix after permuting the columns to find the best match to the true matrix. Left: Fraction of correctly reconstructed observations. As the signal-to-noise ratio increases, the inverse filtering algorithm successfully reconstructs the sequence of observations and estimates the observation likelihoods. From Fig. 2, we can see that as the variance of the noise decreases, the left hand side of equation (17) converges to that of equation (5) and the true quantities are recovered. On the other extreme, as the signal-to-noise ratio becomes small, the estimated sequence of observations tends to that of a uniform distribution at 1/Y = 0.2. This is because the clusters in ˜C become heavily intertwined. The discontinuous nature of the solution of the clustering algorithm is apparent by the plateau-like behaviour in the middle of the scale – a few observations linger on the edge of being assigned to the correct clusters. In conclusion, the results show that it is possible to estimate the observation sequence processed by the automatic sleep-staging system, as well as, its sensor’s specifications. This is an important step in performing fault detection for such a device: for example, using several nights of data, it is possible to perform change detection on the observation likelihoods to detect if the sleep monitoring device has failed. 6 Conclusions In this paper, we have considered several inverse filtering problems for HMMs. Given posteriors from an HMM filter (or more generally, noisily observed posteriors), the aim was to reconstruct the observation likelihoods and also the sample path of observations. It was shown that a computationally expensive solution based on combinatorial optimization can be avoided by exploiting the algebraic structure of the HMM filter. We provided solutions to the inverse filtering problems, as well as theorems guaranteeing unique identifiability. The more general case of noise-corrupted posteriors was also considered. A solution based on clustering was proposed and evaluated on real-world data based on a system for automatic sleep-staging from EEG readings. In the future, it would be interesting to consider other variations and generalizations of inverse filtering. For example, the case where the system dynamics are unknown and need to be estimated, or when only actions based on the filtered distribution can be observed. Acknowledgments This work was partially supported by the Swedish Research Council under contract 2016-06079, the U.S. Army Research Office under grant 12346080 and the National Science Foundation under grant 1714180. The authors would like to thank Alexandre Proutiere for helpful comments during the preparation of this work. References [1] V. Krishnamurthy, Partially Observed Markov Decision Processes. Cambridge, UK: Cambridge University Press, 2016. 9 [2] L. Rabiner, “A tutorial on hidden Markov models and selected applications in speech recognition,” Proceedings of the IEEE, vol. 77, pp. 257–286, Feb. 1989. [3] R. J. Elliott, J. B. Moore, and L. Aggoun, Hidden Markov Models: Estimation and Control. New York, NY: Springer, 1995. [4] O. Cappé, E. Moulines, and T. Rydén, Inference in Hidden Markov Models. New York, NY: Springer, 2005. [5] F. Gustafsson, Adaptive filtering and change detection. New York: Wiley, 2000. [6] J. Chen and R. J. Patton, Robust Model-Based Fault Diagnosis for Dynamic Systems. Boston, MA: Springer, 1999. [7] A. Caplin and M. Dean, “Revealed preference, rational inattention, and costly information acquisition,” The American Economic Review, vol. 105, no. 7, pp. 2183–2203, 2015. [8] A. Flexerand, G. Dorffner, P. Sykacekand, and I. Rezek, “An automatic, continuous and probabilistic sleep stager based on a hidden Markov model,” Applied Artificial Intelligence, vol. 16, pp. 199–207, Mar. 2002. [9] D. Koller and N. Friedman, Probabilistic graphical models: principles and techniques. Cambridge, MA: MIT Press, 2009. [10] B. Anderson and J. Moore, Optimal Filtering. Englewood Cliffs, NJ: Prentice-Hall, 1979. [11] R. E. Kalman, “When is a linear control system optimal,” Journal of Basic Engineering, vol. 86, no. 1, pp. 51–60, 1964. [12] H. R. Varian, Microeconomic analysis. New York: Norton, 3rd ed., 1992. [13] D. Hadfield-Menell, S. J. Russell, P. Abbeel, and A. Dragan, “Cooperative inverse reinforcement learning,” in Advances in Neural Information Processing Systems, 2016. [14] J. Choi and K.-E. Kim, “Nonparametric Bayesian inverse reinforcement learning for multiple reward functions,” in Advances in Neural Information Processing Systems, 2012. [15] E. Klein, M. Geist, B. Piot, and O. Pietquin, “Inverse Reinforcement Learning through Structured Classification,” in Advances in Neural Information Processing Systems, 2012. [16] S. Levine, Z. Popovic, and V. Koltun, “Nonlinear inverse reinforcement learning with gaussian processes,” in Advances in Neural Information Processing Systems, 2011. [17] A. Ng, “Algorithms for inverse reinforcement learning,” in Proceedings of the 17th International Conference on Machine Learning (ICML’00), pp. 663–670, 2000. [18] L. E. Baum and T. Petrie, “Statistical inference for probabilistic functions of finite state Markov chains,” The annals of mathematical statistics, vol. 37, no. 6, pp. 1554–1563, 1966. [19] C. Buchta, M. Kober, I. Feinerer, and K. Hornik, “Spherical k-means clustering,” Journal of Statistical Software, vol. 50, no. 10, pp. 1–22, 2012. [20] S.-T. Pan, C.-E. Kuo, J.-H. Zeng, and S.-F. Liang, “A transition-constrained discrete hidden Markov model for automatic sleep staging,” BioMedical Engineering OnLine, vol. 11, no. 1, p. 52, 2012. [21] Y. Chen, X. Zhu, and W. Chen, “Automatic sleep staging based on ECG signals using hidden Markov models,” in Proceedings of the 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pp. 530–533, 2015. [22] A. L. Goldberger, L. A. 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. [23] M. G. Terzano, L. Parrino, A. Sherieri, R. Chervin, S. Chokroverty, C. Guilleminault, M. Hirshkowitz, M. Mahowald, H. Moldofsky, A. Rosa, and others, “Atlas, rules, and recording techniques for the scoring of cyclic alternating pattern (CAP) in human sleep,” Sleep medicine, vol. 2, no. 6, pp. 537–553, 2001. 10 | 2017 | 5 |
7,007 | Safe Adaptive Importance Sampling Sebastian U. Stich EPFL sebastian.stich@epfl.ch Anant Raj Max Planck Institute for Intelligent Systems anant.raj@tuebingen.mpg.de Martin Jaggi EPFL martin.jaggi@epfl.ch Abstract Importance sampling has become an indispensable strategy to speed up optimization algorithms for large-scale applications. Improved adaptive variants—using importance values defined by the complete gradient information which changes during optimization—enjoy favorable theoretical properties, but are typically computationally infeasible. In this paper we propose an efficient approximation of gradient-based sampling, which is based on safe bounds on the gradient. The proposed sampling distribution is (i) provably the best sampling with respect to the given bounds, (ii) always better than uniform sampling and fixed importance sampling and (iii) can efficiently be computed—in many applications at negligible extra cost. The proposed sampling scheme is generic and can easily be integrated into existing algorithms. In particular, we show that coordinate-descent (CD) and stochastic gradient descent (SGD) can enjoy significant a speed-up under the novel scheme. The proven efficiency of the proposed sampling is verified by extensive numerical testing. 1 Introduction Modern machine learning applications operate on massive datasets. The algorithms that are used for data analysis face the difficult challenge to cope with the enormous amount of data or the vast dimensionality of the problems. A simple and well established strategy to reduce the computational costs is to split the data and to operate only on a small part of it, as for instance in coordinate descent (CD) methods and stochastic gradient (SGD) methods. These kind of methods are state of the art for a wide selection of machine learning, deep leaning and signal processing applications [9, 11, 35, 27]. The application of these schemes is not only motivated by their practical preformance, but also well justified by theory [18, 19, 2]. Deterministic strategies are seldom used for the data selection—examples are steepest coordinate descent [4, 34, 20] or screening algorithms [14, 15]. Instead, randomized selection has become ubiquitous, most prominently uniform sampling [27, 29, 7, 8, 28] but also non-uniform sampling based on a fixed distribution, commonly referred to as importance sampling [18, 19, 2, 33, 16, 6, 25, 24]. While these sampling strategies typically depend on the input data, they do not adapt to the information of the current parameters during optimization. In contrast, adaptive importance sampling strategies constantly re-evaluate the relative importance of each data point during training and thereby often surpass the performance of static algorithms [22, 5, 26, 10, 21, 23]. Common strategies are gradientbased sampling [22, 36, 37] (mostly for SGD) and duality gap-based sampling for CD [5, 23]. The drawbacks of adaptive strategies are twofold: often the provable theoretical guarantees can be worse than the complexity estimates for uniform sampling [23, 3] and often it is computationally 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. inadmissible to compute the optimal adaptive sampling distribution. For instance gradient based sampling requires the computation of the full gradient in each iteration [22, 36, 37]. Therefore one has to rely on approximations based on upper bounds [36, 37], or stale values [22, 1]. But in general these approximations can again be worse than uniform sampling. This makes it necessary to develop adaptive strategies that can efficiently be computed in every iteration and that come with theoretical guarantees that show their advantage over fixed sampling. Our contributions. In this paper we propose an efficient approximation of the gradient-based sampling in the sense that (i) it can efficiently be computed in every iteration, (ii) is provably better than uniform or fixed importance sampling and (iii) recovers the gradient-based sampling in the fullinformation setting. The scheme is completely generic and can easily be added as an improvement to both CD and SGD type methods. As our key contributions, we (1) show that gradient-based sampling in CD methods is theoretically better than the classical fixed sampling, the speed-up can reach a factor of the dimension n (Section 2); (2) propose a generic and efficient adaptive importance sampling strategy that can be applied in CD and SGD methods and enjoys favorable properties—such as mentioned above (Section 3); (3) demonstrate how the novel scheme can efficiently be integrated in CD and SGD on an important class of structured optimization problems (Section 4); (4) supply numerical evidence that the novel sampling performs well on real data (Section 5). Notation. For x ∈Rn define [x]i := ⟨x, ei⟩with ei the standard unit vectors in Rn. We abbreviate ∇if := [∇f]i. A convex function f : Rn →R with L-Lipschitz continuous gradient satisfies f(x + ηu) ≤f(x) + η ⟨u, ∇f(x)⟩+ η2Lu 2 ∥u∥2 ∀x ∈Rn, ∀η ∈R , (1) for every direction u ∈Rn and Lu = L. A function with coordinate-wise Li-Lipschitz continuous gradients1 for constants Li > 0, i ∈[n] := {1, . . . , n}, satisfies (1) just along coordinate directions, i.e. u = ei, Lei = Li for every i ∈[n]. A function is coordinate-wise L-smooth if Li ≤L for i = 1, . . . , n. For convenience we introduce vector l = (L1, . . . , n)⊤and matrix L = diag(l). A probability vector p ∈∆n := {x ∈Rn ≥0 : ∥x∥1 = 1} defines a probability distribution P over [n] and we denote by i ∼p a sample drawn from P. 2 Adaptive Importance Sampling with Full Information In this section we argue that adaptive sampling strategies are theoretically well justified, as they can lead to significant improvements over static strategies. In our exhibition we focus first on CD methods, as we also propose a novel stepsize strategy for CD in this contribution. Then we revisit the results regarding stochastic gradient descent (SGD) already present in the literature. 2.1 Coordinate Descent with Adaptive Importance Sampling We address general minimization problems minx f(x). Let the objective f : Rn →R be convex with coordinate-wise Li-Lipschitz continuous gradients. Coordinate descent methods generate sequences {xk}k≥0 of iterates that satisfy the relation xk+1 = xk −γk∇ikf(xk)eik . (2) Here, the direction ik is either chosen deterministically (cyclic descent, steepest descent), or randomly picked according to a probability vector pk ∈∆n. In the classical literature, the stepsize is often chosen such as to minimize the quadratic upper bound (1), i.e. γk = L−1 ik . In this work we propose to set γk = αk[pk]−1 ik where αk does not depend on the chosen direction ik. This leads to 1|∇if(x + ηei) −∇if(x)| ≤Li |η| , ∀x ∈Rn, ∀η ∈R. 2 directionally-unbiased updates, like it is common among SGD-type methods. It holds Eik∼pk [f(xk+1) | xk] (1) ≤Eik∼pk f(xk) − αk [pk]ik (∇ikf(xk))2 + Likα2 k 2[pk]2 ik (∇ikf(xk))2 | xk = f(xk) −αk ∥∇f(xk)∥2 2 + n X i=1 Liα2 k 2[pk]i (∇if(xk))2 . (3) In adaptive strategies we have the freedom to chose both variables αk and pk as we like. We therefore propose to chose them in such a way that they minimize the upper bound (3) in order to maximize the expected progress. The optimal pk in (3) is independent of αk, but the optimal αk depends on pk. We can state the following useful observation. Lemma 2.1. If αk = αk(pk) is the minimizer of (3), then xk+1 := xk− αk [pk]ik ∇ikf(xk)eik satisfies Eik∼pk [f(xk+1) | xk] ≤f(xk) −αk(pk) 2 ∥∇f(xk)∥2 2 . (4) Consider two examples. In the first one we pick a sub-optimal, but very common [18] distribution: Example 2.2 (Li-based sampling). Let pL ∈∆n defined as [pL]i = Li Tr[L] for i ∈[n], where L = diag(L1, . . . , Ln). Then αk(pL) = 1 Tr[L]. The distribution pL is often referred to as (fixed) importance sampling. In the special case when Li = L for all i ∈[n], this boils down to uniform sampling. Example 2.3 (Optimal sampling2). Equation (3) is minimized for probabilities [p⋆ k]i = √Li|∇if(xk)| ∥ √ L∇f(xk)∥1 and αk(p⋆ k) = ∥∇f(xk)∥2 2 ∥ √ L∇f(xk)∥ 2 1 . Observe 1 Tr[L] ≤αk(p⋆ k) ≤ 1 Lmin , where Lmin := mini∈[n] Li. To prove this result, we rely on the following Lemma—the proof of which, as well as for the claims above, is deferred to Section A.1 of the appendix. Here |·| is applied entry-wise. Lemma 2.4. Define V (p, x) := Pn i=1 Li[x]2 i [p]i . Then arg minp∈∆n V (p, x) = | √ Lx| ∥ √ Lx∥1 . The ideal adaptive algorithm. We propose to chose the stepsize and the sampling distribution for CD as in Example 2.3. One iteration of the resulting CD method is illustrated in Algorithm 1. Our bounds on the expected one-step progress can be used to derive convergence rates of this algorithm with the standard techniques. This is exemplified in Appendix A.1. In the next Section 3 we develop a practical variant of the ideal algorithm. Efficiency gain. By comparing the estimates provided in the examples above, we see that the expected progress of the proposed method is always at least as good as for the fixed sampling. For instance in the special case where L = Li for i ∈[n], the Li-based sampling is just uniform sampling with αk(punif) = 1 Ln. On the other hand αk(p⋆ k) = ∥∇f(xk)∥2 2 L∥∇f(xk)∥2 1 , which can be n times larger than αk(punif). The expected one-step progress in this extreme case coincides with the one-step progress of steepest coordinate descent [20]. 2.2 SGD with Adaptive Sampling SGD methods are applicable to objective functions which decompose as a sum f(x) = 1 n Pn i=1 fi(x) (5) with each fi : Rd →R convex. In previous work [22, 36, 37] is has been argued that the following gradient-based sampling [˜p⋆ k]i = ∥∇fi(xk)∥2 Pn i=1∥∇fi(xk)∥2 is optimal in the sense that it maximizes the expected progress (3). Zhao and Zhang [36] derive complexity estimates for composite functions. For non-composite functions it becomes easier to derive the complexity estimate. For completeness, we add this simpler proof in Appendix A.2. 2Here “optimal” refers to the fact that p⋆ k is optimal with respect to the given model (1) of the objective function. If the model is not accurate, there might exist a sampling that yields larger expected progress on f. 3 Algorithm 1 Optimal sampling (compute full gradient) Compute ∇f(xk) (define optimal sampling) Define (p⋆ k, α⋆ k) as in Example 2.3 ik ∼p⋆ k xk+1 := xk − α⋆ k [p⋆ k]ik ∇ikf(xk) Algorithm 2 Proposed safe sampling (update l.- and u.-bounds) Update ℓ, u (compute safe sampling) Define (ˆpk, ˆαk) as in (7) ik ∼ˆpk Compute ∇ikf(xk) xk+1 := xk − ˆαk [ˆpk]ik ∇ikf(xk) Algorithm 3 Fixed sampling (define fixed sampling) Define (pL, ¯α) as in Example 2.2 ik ∼pL Compute ∇ikf(xk) xk+1 := xk − ¯α [pL]ik ∇ikf(xk) Figure 1: CD with different sampling strategies. Whilst Alg. 1 requires to compute the full gradient, the compute operation in Alg. 2 is as cheap as for fixed importance sampling, Alg. 3. Defining the safe sampling ˆpk requires O(n log n) time. 3 Safe Adaptive Importance Sampling with Limited Information In the previous section we have seen that gradient-based sampling (Example 2.3) can yield a massive speed-up compared to a static sampling distribution (Example 2.2). However, sampling according to p⋆ k in CD requires the knowledge of the full gradient ∇f(xk) in each iteration. And likewise, sampling from ˜p⋆ k in SGD requires the knowledge of the gradient norms of all components—both these operations are in general inadmissible, i.e. the compute cost would void all computational benefits of the iterative (stochastic) methods over full gradient methods. However, it is often possible to efficiently compute approximations of p⋆ k or ˜p⋆ k instead. In contrast to previous contributions, we here propose a safe way to compute such approximations. By this we mean that our approximate sampling is provably never worse than static sampling, and moreover, we show that our solution is the best possible with respect to the limited information at hand. 3.1 An Optimization Formulation for Sampling Formally, we assume that we have in each iteration access to two vectors ℓk, uk ∈Rn ≥0 that provide safe upper and lower bounds on either the absolute values of the gradient entries ([ℓk]i ≤ |∇if(xk)| ≤[uk]i) for CD, or of the gradient norms in SGD: ([ℓk]i ≤∥∇fi(xk)∥2 ≤[uk]i). We postpone the discussion of this assumption to Section 4, where we give concrete examples. The minimization of the upper bound (3) amounts to the equivalent problem3 min αk min pk∈∆n −αk ∥ck∥2 2 + α2 k 2 V (pk, ck) ⇔ min pk∈∆n V (pk, ck) ∥ck∥2 2 (6) where ck ∈Rn represents the unknown true gradient. That is, with respect to the bounds ℓk, uk, we can write ck ∈Ck := {x ∈Rn : [ℓk]i ≤[x]i ≤[uk]i, i ∈[n]}. In Example 2.3 we derived the optimal solution for a fixed ck ∈Ck. However, this is not sufficient to find the optimal solution for an arbitrary ck ∈Ck. Just computing the optimal solution for an arbitrary (but fixed) ck ∈Ck is unlikely to yield a good solution. For instance both extreme cases ck = ℓk and ck = uk (the latter choice is quite common, cf. [36, 23]) might be poor. This is demonstrated in the next example. Example 3.1. Let ℓ= (1, 2)⊤, u = (2, 3)⊤, c = (2, 2)⊤and L1 = L2 = 1. Then V ℓ ∥ℓ∥1 , c = 9 4 ∥c∥2 2, V u ∥u∥1 , c = 25 12 ∥c∥2 2, whereas for uniform sampling V c ∥c∥1 , c = 2 ∥c∥2 2. The proposed sampling. As a consequence of these observations, we propose to solve the following optimization problem to find the best sampling distribution with respect to Ck: vk := min p∈∆n max c∈Ck V (p, c) ∥c∥2 2 , and to set (αk, pk) := 1 vk , ˆpk , (7) where ˆpk denotes a solution of (7). The resulting algorithm for CD is summarized in Alg. 2. In the remainder of this section we discuss the properties of the solution ˆpk (Theorem 3.2) and how such a solution can be efficiently be computed (Theorem 3.4, Algorithm 4). 3Although only shown here for CD, an equivalent optimization problem arises for SGD methods, cf. [36]. 4 3.2 Proposed Sampling and its Properties Theorem 3.2. Let (ˆp, ˆc) ∈∆n × Rn ≥0 denote a solution of (7). Then Lmin ≤vk ≤Tr [L] and (i) max c∈Ck V (ˆp, c) ∥c∥2 2 ≤max c∈Ck V (p, c) ∥c∥2 2 , ∀p ∈∆n; (ˆp has the best worst-case guarantee) (ii) V (ˆp, c) ≤Tr [L] · ∥c∥2 2, ∀c ∈Ck. (ˆp is always better than Li-based sampling) Remark 3.3. In the special case Li = L for all i ∈[n], the Li-based sampling boils down to uniform sampling (Example 2.2) and ˆp is better than uniform sampling: V (ˆp, c) ≤Ln ∥c∥2 2, ∀c ∈Ck. Proof. Property (i) is an immediate consequence of (7). Moreover, observe that the Li-based sampling pL is a feasible solution in (7) with value V (pL,c) ∥c∥2 2 ≡Tr [L] for all c ∈Ck. Hence Lmin ≤∥ √ Lc∥2 1 ∥c∥2 2 2.4 = min p∈∆n V (p, c) ∥c∥2 2 ≤V (ˆp, c) ∥c∥2 2 (∗) ≤V (ˆp, ˆc) ∥ˆc∥2 2 (7) ≤max c∈Ck V (pL, c) ∥c∥2 2 = Tr [L] , (8) for all c ∈Ck, thus vk ∈[Lmin, Tr [L]] and (ii) follows. We prove inequality (∗) in the appendix, by showing that min and max can be interchanged in (7). A geometric interpretation. We show in Appendix B that the optimization problem (7) can equivalently be written as √vk = maxc∈Ck ∥ √ Lc∥1 ∥c∥2 = maxc∈Ck ⟨ √ l,c⟩ ∥c∥2 , where [l]i = Li for i ∈[n]. The maximum is thus attained for vectors c ∈Ck that minimize the angle with the vector l. Theorem 3.4. Let c ∈Ck, p = √ Lc ∥ √ Lc∥1 and denote m = ∥c∥2 2 · ∥ √ Lc∥−1 1 . If [c]i = [uk]i if [uk]i ≤√Lim , [ℓk]i if [ℓk]i ≥√Lim , √Lim otherwise, ∀i ∈[n] , (9) then (p, c) is a solution to (7). Moreover, such a solution can be computed in time O(n log n). Proof. This can be proven by examining the optimality conditions of problem (7). This is deferred to Section B.1 of the appendix. A procedure that computes such a solution is depicted in Algorithm 4. The algorithm makes extensive use of (9). For simplicity, assume first L = In for now. In each iteration t , a potential solution vector ct is proposed, and it is verified whether this vector satisfies all optimality conditions. In Algorithm 4, ct is just implicit, with [ct]i = [c]i for decided indices i ∈D and [ct]i = [ √ Lm]i for undecided indices i /∈D. After at most n iterations a valid solution is found. By sorting the components of √ L−1ℓk and √ L−1uk by their magnitude, at most a linear number of inequality checks in (9) have to be performed in total. Hence the running time is dominated by the O(n log n) complexity of the sorting algorithm. A formal proof is given in the appendix. Algorithm 4 Computing the Safe Sampling for Gradient Information ℓ, u 1: Input: 0n ≤ℓ≤u, L, Initialize: c = 0n, u = 1, ℓ= n, D = ∅. 2: ℓsort := sort_asc( √ L−1ℓ), usort := sort_asc( √ L−1u), m = max(ℓsort) 3: while u ≤ℓdo 4: if [ℓsort]ℓ> m then (largest undecided lower bound is violated) 5: Set corresponding [c]index := [ √ Lℓsort]ℓ; ℓ:= ℓ−1; D := D ∪{index} 6: else if [usort]u < m then (smallest undecided upper bound is violated) 7: Set corresponding [c]index := [ √ Lusort]u; u := u + 1; D := D ∪{index} 8: else 9: break (no constraints are violated) 10: end if 11: m := ∥c∥2 2 · ∥ √ Lc∥−1 1 (update m as in (9)) 12: end while 13: Set [c]i := √ Lim for all i /∈D and Return c, p = √ Lc ∥ √ Lc∥1 , v = ∥ √ Lc∥2 1 ∥c∥2 2 5 Competitive Ratio. We now compare the proposed sampling distribution ˆpk with the optimal sampling solution in hindsight. We know that if the true (gradient) vector ˜c ∈Ck would be given to us, then the corresponding optimal probability distribution would be p⋆(˜c) = √ L˜c ∥ √ L˜c∥1 (Example 2.3). Thus, for this ˜c we can now analyze the ratio V (ˆpk,˜c) V (p⋆(˜c),˜c). As we are interested in the worst case ratio among all possible candidates ˜c ∈Ck, we define ρk := max c∈Ck V (ˆp, c) V (p⋆(c), c) = max c∈Ck V (ˆp, c) ∥ √ Lc∥2 1 . (10) Lemma 3.5. Let wk := minc∈Ck ∥ √ Lc∥2 1 ∥c∥2 2 . Then Lmin ≤wk ≤vk, and ρk ≤vk wk (≤ vk Lmin ). Lemma 3.6. Let γ ≥1. If [Ck]i ∩γ[Ck]i = ∅and γ−1[Ck]i ∩[Ck]i = ∅for all i ∈[n] (here [Ck]i denotes the projection on the i-th coordinate), then ρk ≤γ4. These two lemma provide bounds on the competitive ratio. Whilst Lemma 3.6 relies on a relative accuracy condition, Lemma 3.5 can always be applied. However, the corresponding minimization problem is non-convex. Note that knowledge of ρk is not needed to run the algorithm. 4 Example Safe Gradient Bounds In this section, we argue that for a large class of objective functions of interest in machine learning, suitable safe upper and lower bounds ℓ, u on the gradient along every coordinate direction can be estimated and maintained efficiently during optimization. A similar argument can be given for the efficient approximation of component wise gradient norms in finite sum objective based stochastic gradient optimization. As the guiding example, we will here showcase the training of generalized linear models (GLMs) as e.g. in regression, classification and feature selection. These models are formulated in terms of a given data matrix A ∈Rd×n with columns ai ∈Rd for i ∈[n]. Coordinate Descent - GLMs with Arbitrary Regularizers. Consider general objectives of the form f(x) := h(Ax) + Pn i=1 ψi([x]i) with an arbitrary convex separable regularizer term given by the ψi : R →R for i ∈[n]. A key example is when h: Rd →R describes the least-squares regression objective h(Ax) = 1 2 ∥Ax −b∥2 2 for a b ∈Rd. Using that this h is twice differentiable with ∇2h(Ax) = In, it is easy to see that we can track the evolution of all gradient entries, when performing CD steps, as follows: ∇if(xk+1) −∇if(xk) = γk⟨ai, aik⟩, ∀i ̸= ik . (11) for ik being the coordinate changed in step k (here we also used the separability of the regularizer). Therefore, all gradient changes can be tracked exactly if the inner products of all datapoints are available, or approximately if those inner products can be upper and lower bounded. For computational efficiency, we in our experiments simply use Cauchy-Schwarz |⟨ai, aik⟩| ≤∥ai∥· ∥aik∥. This results in safe upper and lower bounds [ℓk+1]i ≤∇if(xk+1) ≤[uk+1]i for all inactive coordinates i ̸= ik. (For the active coordinate ik itself one observes the true value without uncertainty). These bounds can be updated in linear time O(n) in every iteration. For general smooth h (again with arbitrary separable regularizers ψi), (11) can readily be extended to hold [32, Lemma 4.1], the inner product change term becoming ⟨ai, ∇2f(A˜x)aik⟩instead, when assuming h is twice-differentiable. Here ˜x will be an element of the line segment [xk, xk+1]. Stochastic Gradient Descent - GLMs. We now present a similar result for finite sum problems (5) for the use in SGD based optimization, that is f(x) := 1 n Pn i=1 fi(x) = 1 n Pn i=1 hi(a⊤ i x). Lemma 4.1. Consider f : Rd →R as above, with twice differentiable hi : R →R. Let xk, xk+1 ∈ Rd denote two successive iterates of SGD, i.e. xk+1 := xk −ηk aik∇hik(a⊤ ikxk) = xk + γk aik. Then there exists ˜x ∈Rd on the line segment between xk and xk+1, ˜x ∈[xk, xk+1] with ∇fi(xk+1) −∇fi(xk) = γk ∇2hi(a⊤ i ˜x) ⟨ai, aik⟩ai , ∀i ̸= ik . (12) 6 This leads to safe upper and lower bounds for the norms of the partial gradient, [ℓk]i ≤∥∇fi(xk)∥2 ≤ [uk]i, that can be updated in linear time O(n), analogous to the coordinate case discussed above.4 We note that there are many other ways to track safe gradient bounds for relevant machine learning problems, including possibly more tight ones. We here only illustrate the simplest variants, highlighting the fact that our new sampling procedure works for any safe bounds ℓ, u. Computational Complexity. In this section, we have demonstrated how safe upper and lower bounds ℓ, u on the gradient information can be obtained for GLMs, and argued that these bounds can be updated in time O(n) per iteration of CD and SGD. The computation of the proposed sampling takes O(n log n) time (Theorem 3.4). Hence, the introduced overhead in Algorithm 2 compared to fixed sampling (Algorithm 3) is of the order O(n log n) in every iteration. The computation of one coordinate of the gradient, ∇ikf(xk), takes time Θ(d) for general data matrices. Hence, when d = Ω(n), the introduced overhead reduces to O(log n) per iteration. 5 Empirical Evaluation In this section we evaluate the empirical performance of our proposed adaptive sampling scheme on relevant machine learning tasks. In particular, we illustrate performance on generalized linear models with L1 and L2 regularization, as of the form (5), min x∈Rd 1 n n X i=1 hi(a⊤ i x) + λ · r(x) (13) We use square loss, squared hinge loss as well as logistic loss for the data fitting terms hi, and ∥x∥1 and ∥x∥2 2 for the regularizer r(x). The datasets used in the evaluation are rcv1, real-sim and news20.5 The rcv1 dataset consists of 20,242 samples with 47,236 features, real-sim contains 72,309 datapoints and 20,958 features and news20 contains 19,996 datapoints and 1,355,191 features. For all datasets we set unnormalized features with all the non-zero entries set to 1 (bag-of-words features). By real-sim’ and rcv1’ we denote a subset of the data chosen by randomly selecting 10,000 features and 10,000 datapoints. By news20’ we denote a subset of the data chose by randomly selecting 15% of the features and 15% of the datapoints. A regularization parameter λ = 0.1 is used for all experiments. Our results show the evolution of the optimization objective over time or number of epochs (an epoch corresponding to n individual updates). To compute safe lower and upper bounds we use the methods presented in Section 4 with no special initialization, i.e. ℓ0 = 0n, u0 = ∞n. Coordinate Descent. In Figure 2 we compare the effect of the fixed stepsize αk = 1 Ln (denoted as “small”) vs. the time varying optimal stepsize (denoted as “big”) as discussed in Section 2. Results are shown for optimal sampling p⋆ k (with optimal stepsize αk(p⋆ k), cf. Example 2.3), our proposed sampling ˆpk (with optimal stepsize αk(ˆpk) = v−1 k , cf. (7)) and uniform sampling (with optimal stepsize αk(pL) = 1 Ln, as here L = LIn, cf. Example 2.2). As the experiment aligns with theory—confirming the advantage of the varying “big” stepsizes—we only show the results for Algorithms 1–3 in the remaining plots. Performance for squared hinge loss, as well as logistic regression with L1 and L2 regularization is presented in Figure 3 and Figure 4 respectively. In Figures 5 and 6 we report the iteration complexity vs. accuracy as well as timing vs. accuracy results on the full dataset for coordinate descent with square loss and L1 (Lasso) and L2 regularization (Ridge). Theoretical Sampling Quality. As part of the CD performance results in Figures 2–6 we include an additional evolution plot on the bottom of each figure to illustrate the values vk which determine the stepsize (ˆαk = v−1 k ) for the proposed Algorithm 2 (blue) and the optimal stepsizes of Algorithm 1 (black) which rely on the full gradient information. The plots show the normalized values vk Tr[L], i.e. the relative improvement over Li-based importance sampling. The results show that despite only relying on very loose safe gradient bounds, the proposed adaptive sampling is able to strongly benefit from the additional information. 4Here we use the efficient representation ∇fi(x) = θ(x) · ai for θ(x) ∈R. 5All data are available at www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/ 7 Epochs Uniform Proposed (big step) Proposed (small step) 0 1 2 5 6 1.00 0.99 0.98 0.97 0.96 0.95 0.94 f(x ) vk k 10 0 -1 -2 -3 -4 (a) rcv1’, L1 reg. Epochs 0 1 2 5 6 Optimal (big step) Optimal (small step) 1.00 0.95 0.90 0.85 f(x ) vk k 10 0 -1 -2 -3 -4 (b) rcv1’, L2 reg. Figure 2: (CD, square loss) Fixed vs. adaptive sampling strategies, and dependence on stepsizes. With “big” αk = v−1 k and “small” αk = 1 Tr[L]. 0.98 0.96 0.94 0.92 0.90 0.88 0.86 1.00 f(x ) vk k 10 0 -1 -2 -3 -4 Epochs 0 1 2 5 6 Uniform Proposed Optimal (a) rcv1’, L1 reg. Uniform Proposed Optimal f(x ) vk k Epochs 0 0.5 1 2.5 3 1.00 0.90 0.80 0.70 10 0 -1 -2 -3 -4 0.95 0.85 0.75 0.65 (b) real-sim’, L2 reg. Figure 3: (CD, squared hinge loss) Function value vs. number of iterations for optimal stepsize αk = v−1 k . f(x ) vk k 10 0 -1 -2 -3 -4 Epochs 0 1 2 5 6 Uniform Proposed Optimal 6.90 6.85 6.80 6.75 0.1 x (a) rcv1’, L1 reg. Epochs 0 1 2 5 6 Uniform Proposed Optimal 0.69 0.68 0.67 0.66 f(x ) vk k 10 0 -1 -2 -3 -4 (b) rcv1’, L2 reg. Epochs 0 0.5 1 2.5 3 Uniform Proposed Optimal 0.69 0.68 0.67 0.66 0.65 0.64 f(x ) vk k 10 0 -1 -2 -3 -4 (c) real-sim’, L1 reg. Uniform Proposed Optimal Epochs 0 0.5 1 2.5 3 0.69 0.68 0.67 0.66 0.65 0.64 0.63 f(x ) vk k 10 0 -1 -2 -3 -4 (d) real-sim’, L2 reg. Figure 4: (CD, logistic loss) Function value vs. number of iterations for different sampling strategies. Bottom: Evolution of the value vk which determines the optimal stepsize (ˆαk = v−1 k ). The plots show the normalized values vk Tr[L], i.e. the relative improvement over Li-based importance sampling. Uniform Proposed Optimal Epochs 0 0.5 1 1.5 3 3.5 1.00 0.95 0.90 0.85 0.80 f(x ) vk k 10 0 -1 -2 -3 -4 (a) rcv1, L1 reg. Uniform Proposed Optimal Epochs 0 0.5 1 2 1.00 0.95 0.90 0.85 0.80 0.75 0.70 f(x ) vk k 10 0 -1 -2 -3 -4 (b) real-sim, L1 reg. Figure 5: (CD, square loss) Function value vs. number of iterations on the full datasets. Time 0 2 4 14 6 16 12 Uniform Proposed 1.00 0.95 0.90 0.85 0.80 0.75 f(x ) vk k 10 0 -1 -2 -3 -4 (a) real-sim, L1 reg. Uniform Proposed 1.00 0.95 0.90 0.85 0.80 0.75 Time 0 2 4 14 6 16 12 f(x ) vk k 10 0 -1 -2 -3 -4 (b) real-sim, L2 reg. Figure 6: (CD, square loss) Function value vs. clock time on the full datasets. (Data for the optimal sampling omitted, as this strategy is not competitive time-wise.) 65 60 55 50 45 40 35 Uniform Proposed Optimal Epochs 0 0.5 1 2.5 2 (a) rcv1’, L1 reg. Uniform Proposed Optimal Epochs 0 0.5 1 2 90 80 70 60 50 40 (b) rcv1’, L2 reg. Uniform Proposed Optimal Epochs 0 0.5 1 2.5 2 140 120 100 80 60 40 (c) real-sim’, L1 reg. Uniform Proposed Optimal Epochs 0 0.5 1 2.5 2 100 80 60 40 20 (d) real-sim’, L2 reg. Figure 7: (SGD, square loss) Function value vs. number of iterations. Uniform Proposed Optimal Epochs 0 1 2 4 7 6 5 4 3 2 (a) news20’, L1 reg. Figure 8: (SGD, square loss) Function value vs. number of iterations. Uniform Proposed 40 35 30 25 20 15 10 Time 0 5 10 25 20 (a) news20’, L1 reg. Figure 9: (SGD square loss) Function value vs. clock time. 8 Stochastic Gradient Descent. Finally, we also evaluate the performance of our approach when used within SGD with L1 and L2 regularization and square loss. In Figures 7–8 we report the iteration complexity vs. accuracy results and in Figure 9 the timing vs. accuracy results. The time units in Figures 6 and 9 are not directly comparable, as the experiments were conducted on different machines. We observe that on all three datasets SGD with the optimal sampling performs only slightly better than uniform sampling. This is in contrast with the observations for CD, where the optimal sampling yields a significant improvement. Consequently, the effect of the proposed sampling is less pronounced in the three SGD experiments. Summary. The main findings of our experimental study can be summarized as follows: • Adaptive importance sampling significantly outperforms fixed importance sampling in iterations and time. The results show that (i) convergence in terms of iterations is almost as good as for the optimal (but not efficiently computable) gradient-based sampling and (ii) the introduced computational overhead is small enough to outperform fixed importance sampling in terms of total computation time. • Adaptive sampling requires adaptive stepsizes. The adaptive stepsize strategies of Algorithms 1 and 2 allow for much faster convergence than conservative fixed-stepsize strategies. In the experiments, the measured value vk was always significantly below the worst case estimate, in alignment with the observed convergence. • Very loose safe gradient bounds are sufficient. Even the bounds derived from the the very naïve gradient information obtained by estimating scalar products resulted in significantly better sampling than using no gradient information at all. Further, no initialization of the gradient estimates is needed (at the beginning of the optimization process the proposed adaptive method performs close to the fixed sampling but accelerates after just one epoch). 6 Conclusion In this paper we propose a safe adaptive importance sampling scheme for CD and SGD algorithms. We argue that optimal gradient-based sampling is theoretically well justified. To make the computation of the adaptive sampling distribution computationally tractable, we rely on safe lower and upper bounds on the gradient. However, in contrast to previous approaches, we use these bounds in a novel way: in each iteration, we formulate the problem of picking the optimal sampling distribution as a convex optimization problem and present an efficient algorithm to compute the solution. The novel sampling provably performs better than any fixed importance sampling—a guarantee which could not be established for previous samplings that were also derived from safe lower and upper bounds. The computational cost of the proposed scheme is of the order O(n log n) per iteration—this is on many problems comparable with the cost to evaluate a single component (coordinate, sum-structure) of the gradient, and the scheme can thus be implemented at no extra computational cost. This is verified by timing experiments on real datasets. We discussed one simple method to track the gradient information in GLMs during optimization. However, we feel that the machine learning community could profit from further research in that direction, for instance by investigating how such safe bounds can efficiently be maintained on more complex models. Our approach can immediately be applied when the tracking of the gradient is delegated to other machines in a distributed setting, like for instance in [1]. References [1] Guillaume Alain, Alex Lamb, Chinnadhurai Sankar, Aaron Courville, and Yoshua Bengio. Variance Reduction in SGD by Distributed Importance Sampling. arXiv.org, February 2015. [2] Zeyuan Allen-Zhu, Zheng Qu, Peter Richtárik, and Yang Yuan. Even Faster Accelerated Coordinate Descent Using Non-Uniform Sampling. In ICML 2017 - Proceedings of the 34th International Conference on Machine Learning, pages 1110–1119. June 2016. [3] Ichiro Takeuchi Atsushi Shibagaki. Stochastic Primal Dual Coordinate Method with Non-Uniform Sampling Based on Optimality Violations. arXiv.org, October 2017. 9 [4] Stephen P Boyd and Lieven Vandenberghe. Convex optimization. Cambridge University Press, 2004. [5] Dominik Csiba, Zheng Qu, and Peter Richtárik. Stochastic Dual Coordinate Ascent with Adaptive Probabilities. In ICML 2015 - Proceedings of the 32th International Conference on Machine Learning, February 2015. [6] Dominik Csiba and Peter Richtárik. Importance Sampling for Minibatches. arXiv.org, February 2016. [7] Jerome Friedman, Trevor Hastie, Holger Höfling, and Robert Tibshirani. Pathwise coordinate optimization. The Annals of Applied Statistics, 1(2):302–332, December 2007. [8] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1):1–22, 2010. [9] Wenjiang J. Fu. Penalized regressions: The bridge versus the lasso. Journal of Computational and Graphical Statistics, 7(3):397–416, 1998. [10] Xi He and Martin Takáˇc. Dual Free Adaptive Mini-batch SDCA for Empirical Risk Minimization. arXiv.org, October 2015. [11] Cho-Jui Hsieh, Kai-Wei Chang, Chih-Jen Lin, S Sathiya Keerthi, and S Sundararajan. A Dual Coordinate Descent Method for Large-scale Linear SVM. In ICML 2008 - the 25th International Conference on Machine Learning, pages 408–415, New York, USA, 2008. ACM Press. [12] Hidetoshi Komiya. Elementary proof for sion’s minimax theorem. Kodai Math. J., 11(1):5–7, 1988. [13] Simon Lacoste-Julien, Mark Schmidt, and Francis Bach. A simpler approach to obtaining an O(1/t) convergence rate for projected stochastic subgradient descent. arXiv.org, December 2012. [14] Jun Liu, Zheng Zhao, Jie Wang, and Jieping Ye. Safe Screening with Variational Inequalities and Its Application to Lasso. In ICML 2014 - Proceedings of the 31st International Conference on Machine Learning, pages 289–297, 2014. [15] Eugene Ndiaye, Olivier Fercoq, Alexandre Gramfort, and Joseph Salmon. Gap Safe screening rules for sparsity enforcing penalties. JMLR, 2017. [16] Deanna Needell, Rachel Ward, and Nathan Srebro. Stochastic Gradient Descent, Weighted Sampling, and the Randomized Kaczmarz algorithm. In NIPS 2014 - Advances in Neural Information Processing Systems 27, pages 1017–1025, 2014. [17] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. [18] Yurii Nesterov. Efficiency of Coordinate Descent Methods on Huge-Scale Optimization Problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [19] Yurii Nesterov and Sebastian U. Stich. Efficiency of the accelerated coordinate descent method on structured optimization problems. SIAM Journal on Optimization, 27(1):110–123, 2017. [20] Julie Nutini, Mark W Schmidt, Issam H Laradji, Michael P Friedlander, and Hoyt A Koepke. Coordinate Descent Converges Faster with the Gauss-Southwell Rule Than Random Selection. In ICML, pages 1632–1641, 2015. [21] Anton Osokin, Jean-Baptiste Alayrac, Isabella Lukasewitz, Puneet K. Dokania, and Simon Lacoste-Julien. Minding the gaps for block frank-wolfe optimization of structured svms. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48, ICML’16, pages 593–602. JMLR.org, 2016. [22] Guillaume Papa, Pascal Bianchi, and Stéphan Clémençon. Adaptive Sampling for Incremental Optimization Using Stochastic Gradient Descent. ALT 2015 - 26th International Conference on Algorithmic Learning Theory, pages 317–331, 2015. [23] Dmytro Perekrestenko, Volkan Cevher, and Martin Jaggi. Faster Coordinate Descent via Adaptive Importance Sampling. In AISTATS 2017 - Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, volume 54, pages 869–877. PMLR, 20–22 Apr 2017. [24] Zheng Qu, Peter Richtárik, and Tong Zhang. Randomized Dual Coordinate Ascent with Arbitrary Sampling. arXiv.org, November 2014. 10 [25] Peter Richtárik and Martin Takáˇc. On optimal probabilities in stochastic coordinate descent methods. Optimization Letters, 10(6):1233–1243, 2016. [26] Mark Schmidt, Reza Babanezhad, Mohamed Ahmed, Aaron Defazio, Ann Clifton, and Anoop Sarkar. Non-Uniform Stochastic Average Gradient Method for Training Conditional Random Fields. In AISTATS 2015 - Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, volume 38, pages 819–828. PMLR, 09–12 May 2015. [27] Shai Shalev-Shwartz, Yoram Singer, Nathan Srebro, and Andrew Cotter. Pegasos: Primal Estimated Sub-Gradient Solver for SVM. Mathematical Programming, 127(1):3–30, October 2010. [28] Shai Shalev-Shwartz and Ambuj Tewari. Stochastic Methods for l1-regularized Loss Minimization. JMLR, 12:1865–1892, June 2011. [29] Shai Shalev-Shwartz and Tong Zhang. Stochastic Dual Coordinate Ascent Methods for Regularized Loss Minimization. JMLR, 14:567–599, February 2013. [30] Maurice Sion. On general minimax theorems. Pacific Journal of Mathematics, 8(1):171–176, 1958. [31] S. U. Stich, C. L. Müller, and B. Gärtner. Variable metric random pursuit. Mathematical Programming, 156(1):549–579, Mar 2016. [32] Sebastian U. Stich, Anant Raj, and Martin Jaggi. Approximate steepest coordinate descent. In Doina Precup and Yee Whye Teh, editors, ICML 2017 - Proceedings of the 34th International Conference on Machine Learning, volume 70, pages 3251–3259. PMLR, 06–11 Aug 2017. [33] Thomas Strohmer and Roman Vershynin. A randomized kaczmarz algorithm with exponential convergence. Journal of Fourier Analysis and Applications, 15(2):262, 2008. [34] Paul Tseng and Sangwoon Yun. A coordinate gradient descent method for nonsmooth separable minimization. Mathematical Programming, 117(1):387–423, 2009. [35] Stephen J Wright. Coordinate descent algorithms. Mathematical Programming, 151(1):3–34, 2015. [36] Peilin Zhao and Tong Zhang. Stochastic optimization with importance sampling for regularized loss minimization. In ICML 2015 - Proceedings of the 32nd International Conference on Machine Learning, volume 37, pages 1–9. PMLR, 07–09 Jul 2015. [37] Rong Zhu. Gradient-based sampling: An adaptive importance sampling for least-squares. In NIPS Advances in Neural Information Processing Systems 29, pages 406–414. 2016. 11 | 2017 | 50 |
7,008 | Learning Affinity via Spatial Propagation Networks Sifei Liu UC Merced, NVIDIA Shalini De Mello NVIDIA Jinwei Gu NVIDIA Guangyu Zhong Dalian University of Technology Ming-Hsuan Yang UC Merced, NVIDIA Jan Kautz NVIDIA Abstract In this paper, we propose spatial propagation networks for learning the affinity matrix for vision tasks. We show that by constructing a row/column linear propagation model, the spatially varying transformation matrix exactly constitutes an affinity matrix that models dense, global pairwise relationships of an image. Specifically, we develop a three-way connection for the linear propagation model, which (a) formulates a sparse transformation matrix, where all elements can be outputs from a deep CNN, but (b) results in a dense affinity matrix that effectively models any task-specific pairwise similarity matrix. Instead of designing the similarity kernels according to image features of two points, we can directly output all the similarities in a purely data-driven manner. The spatial propagation network is a generic framework that can be applied to many affinity-related tasks, such as image matting, segmentation and colorization, to name a few. Essentially, the model can learn semantically-aware affinity values for high-level vision tasks due to the powerful learning capability of deep CNNs. We validate the framework on the task of refinement of image segmentation boundaries. Experiments on the HELEN face parsing and PASCAL VOC-2012 semantic segmentation tasks show that the spatial propagation network provides a general, effective and efficient solution for generating high-quality segmentation results. 1 Introduction An affinity matrix is a generic matrix that determines how close, or similar, two points are in a space. In computer vision tasks, it is a weighted graph that regards each pixel as a node, and connects each pair of pixels by an edge [25, 16, 15, 10, 29]. The weight on that edge should reflect the pairwise similarity with respect to different tasks. For example, for low-level vision tasks such as image filtering, the affinity values should reveal the low-level coherence of color and texture [29, 28, 10, 9]; for mid to high-level vision tasks such as image matting and segmentation [16, 22], the affinity measure should reveal the semantic-level pairwise similarities. Most techniques explicitly or implicitly assume a measurement or a similarity structure over the space of configurations. The success of such algorithms depends heavily on the assumptions made to construct these affinity matrices, which are generally not treated as part of the learning problem. In this paper, we show that the problem of learning the affinity matrix can be equivalently expressed as learning a group of small row/column-wise, spatially varying linear transformation matrices. Since a linear transformation can be easily implemented as a differentiable module in a deep neural network, the transformation matrix can be learned in a purely data-driven manner as opposed to being constructed by hand. Specifically, we adopt an independent deep CNN with the original RGB images as inputs to output all entities of the matrix, such that the affinity is learned by a deep model conditioned on the specific inputs. We show that using a three-way connection, instead of the full connection between adjoining rows/columns, is sufficient for learning a dense affinity matrix and requires much fewer output channels of a deep CNN. Therefore, instead of using designed features and kernel tricks, our network outputs all entities of the affinity matrix in a data-driven manner. The advantages of learning an affinity matrix in a data-driven manner are multifold. First, a handdesigned similarity matrix based on a distance metric in a certain space (e.g., RGB or Euclidean [10, 25, 5, 36, 14]) may not adequately describe the pairwise relationships in the mid-to-high-level feature spaces. To apply such designed pairwise kernels to tasks such as semantic segmentation, multiple iterations are required [14, 5, 36] for satisfactory performance. In contrast, the proposed method learns and outputs all entities of an affinity matrix under direct supervision of ultimate objectives, where no iteration, specific design or assumption about the kernel function is needed. Second, we can learn the high-level semantic affinity measures by initializing with hierarchical deep features from pre-trained VGG [26] and ResNet [11] networks where conventional metrics and kernels may not be applied. Due to the above properties, the framework is far more efficient than the related graphical models, such as Dense CRF. Our proposed architecture, namely spatial propagation network (SPN), contains a deep CNN that learns the entities of the affinity matrix and a spatial linear propagation module, which propagates information in an image using the learned affinity values. Images or general 2D matrices are input into the module, and propagated under the guidance of the learned affinity values. All modules are differentiable and jointly trained using the stochastic gradient descent (SGD) method. The spatial linear propagation module is computationally efficient for inference due to the linear time complexity of its recurrent architecture. 2 Related Work Numerous methods explicitly design affinity matrices for image filtering [29, 10], colorization [15], matting [16] and image segmentation [14] based on the characterstics of the problem. Other methods, such as total variation (TV) [23] and learning to diffuse [18] improve the modeling of pairwise relationships by utilizing different objectives, or incorporating more priors into diffusion partial differential equations (PDEs). However, due to the lack of an effective learning strategy, it is still challenging to produce learning-based affinity for complex visual analysis problems. Recently, Maire et al. [22] trained a deep CNN to directly predict the entities of an affinity matrix, which demonstrated good performance on image segmentation. However, since the affinity is followed by a solver of spectral embedding as an independent part, it is not directly supervised for the classification/prediction task. Bertasius et al. [2] introduced a random walk network that optimizes the objectives of pixel-wise affinity for semantic segmentation. Differently, their affinity matrix is additionally supervised by ground-truth sparse pixel similarities, which limits the potential connections between pixels. On the other hand, many graphical model-based methods have successfully improved the performance of image segmentation. In the deep learning framework, conditional random fields (CRFs) with efficient mean field inference are frequently used [14, 36, 17, 5, 24, 1] to model the pairwise relations in the semantic labeling space. Some methods use CFR as a post-processing module [5], while others integrate it as a jointly-trained part [36, 17, 24, 1]. While both methods describe the densely connected pairwise relationships, dense CRFs rely on designed kernels, while our method directly learns all pairwise links. Since in this paper, SPN is trained as a universal segmentation refinement module, we specifically compare it with one of the methods [5] that relies on dense CRF [14] as a post-processing strategy. Our architecture is also related to the multi-dimensional RNN or LSTM [30, 3, 8]. However, both the standard RNN and LSTM contain multiple non-linear units and thus do not fit into our proposed affinity framework. 3 Proposed Approach In this work, we construct a spatial propagation network that can transform a two-dimensional (2D) map (e.g., coarse image segmentation) into a new one with desired properties (e.g., refined segmentation). With spatially varying parameters that supports the propagation process, we show theoretically in Section 3.1 that this module is equivalent to the standard anisotropic diffusion process [32, 18]. We prove that the transformation of maps is controlled by a Laplacian matrix that is constituted by the parameters of the spatial propagation module. Since the propagation module is differentiable, its parameters can be learned by any type of neural network (e.g., a typical deep CNN) that is connected to this module, through joint training. We introduce the spatial propagation network in Section 3.2, and specifically analyze the properties of different types of connections within its framework for learning the affinity matrix. 2 3.1 Linear Propagation as Spatial Diffusion We apply a linear transformation by means of the spatial propagation network, where a matrix is scanned row/column-wise in four fixed directions: left-to-right, top-to-bottom, and verse-vise. This strategy is used widely in [8, 30, 19, 4]. We take the left-to-right direction as an example for the following discussion. Other directions are processed independently in the same manner. We denote X and H as two 2D maps of size n × n, with exactly the same dimensions as the matrix before and after spatial propagation, where xt and ht, respectively, represent their tth columns with n × 1 elements each. We linearly propagate information from left-to-right between adjacent columns using an n × n linear transformation matrix wt as: ht = (I −dt) xt + wtht−1, t ∈[2, n] (1) where I is the n × n identity matrix, the initial condition h1 = x1, and dt(i, i) is a diagonal matrix, whose ith element is the sum of all the elements of the ith row of wt except wt(i, j) as: dt(i, i) = n X j=1,j̸=i wt(i, j). (2) To propagate across the entire image, the matrix H, where {ht ∈H, t ∈[1, n]}, is updated in a column-wise manner recursively. For each column, ht is a linear, weighted combination of the previous column ht−1, and the corresponding column xt in X. When the recursive scanning is finished, the updated 2D matrix H can be expressed with an expanded formulation of Eq. (1): Hv = I 0 · · · · · · 0 w2 λ2 0 · · · · · · w3w2 w3λ2 λ3 0 · · · ... ... ... ... ... ... ... · · · · · · λn Xv = GXv, (3) where G is a lower triangular, N × N(N = n2) transformation matrix, which relates X and H. Hv and Xv are vectorized versions of X and H, respectively, with the dimension of N × 1. Specifically, they are created by concatenating ht and xt along the same, single dimension, i.e., Hv = hT 1 , ..., hT n T and Xv = xT 1 , ..., xT n T . All the parameters {λt, wt, dt, I} , t ∈[2, n] are n × n sub-matrices, where λt = I −dt. In the following section, we validate that Eq. (3) can be expressed as a spatial anisotropic diffusion process, with the corresponding propagation affinity matrix constituted by all wt for t ∈[2, n]. Theorem 1. The summation of elements in each row of G equals to one. Since G contains n×n sub-matrices, each representing the transformation between the corresponding columns of H and X, we denote all the weights used to compute ht as the tth block-row Gt. On setting λ1 = I, the kth constituent n × n sub-matrix of Gt is: Gtk = t Y τ=k+1 wτλk, k ∈[1, t −1] λk, k = t (4) To prove that the summation of any row in G equals to one, we instead prove that for ∀t ∈[1, n], each row of Gt has the summation of one. Proof. Denoting E = [1, 1, ..., 1]T as an n × 1 vector, we need to prove that Gt [1, ..., 1]T N×1 = E. Equivalently Pt k=1 GtkE = E, because G is a lower triangular matrix. In the following part, we first prove that when m ∈[1, t −1], we have Pm k=1 GtkE = Qt τ=m+1 wtE by mathematical induction . Initial step. When m = 1, Pm k=1 GtkE = Gt1E = Qt τ=2 wτE, which satisfies the assertion. 3 Figure 1: Different propagation ranges for (a) one-way connections; and (b) three-way connections. Each pixel (node) receives information from a single line with one-way connection, and from a 2 dimensional plane with three-way connection. Integration of four directions w.r.t. (a) results in global, but sparsely connected pairwise relations, while (b) formulates global and densely connected pairwise relations. Inductive step. Assume there is an n ∈[1, t −1], such that Pn k=1 GtkE = Qt τ=n+1 wtE, we must prove the formula is true for n + 1 ∈[1, t −1]. n+1 X k=1 GtkE = n X k=1 GtkE + Gt(n+1)E = t Y τ=n+1 wτE + t Y τ=n+2 wτ = t Y τ=n+2 wτ [(wn+1 + I −dn+1) E] . (5) According to the formulation of the diagonal matrix in Eq. (2) we have Pn+1 k=1 GtkE = Qt τ=n+2 wτE. Therefore, the assertion is satisfied. When m = t, we have: t X k=1 GtkE = t−1 X k=1 GtkE + GttE = t Y τ=t wτE + λtE = wτE + (I −dt) E = E, (6) which yields the equivalence of Theorem 1. Theorem 2. We define the evolution of a 2D matrix as a time sequence {U}T , where U(T = 1) = U1 is the initial state. When the transformation between any two adjacent states follows Eq. (3), the sequence is a diffusion process expressed with a partial differential equation (PDE): ∂T U = −LU (7) where L = D −A is the Laplacian matrix, D is the degree matrix composed of dt in Eq. (2), and A is the affinity matrix composed by the off-diagonal elements of G. Proof. We substitute the X and H as two consecutive matrices UT +1 and UT in (3). According to Theorem 1, we ensure that the sum of each row I −G is 0 that can formulate a standard Laplacian matrix. Since G has the diagonal sub-matrix I −dt, we can rewrite (3) as: UT +1 = (I −D + A) UT = (I −L) UT (8) where G = (I −D + A), D is an N × N diagonal matrix containing all the dt and A is the offdiagonal part of G. It then yields UT +1 −UT = −LUT , a discrete formulation of (7) with the time discretization interval as one. Theorem 2 shows the essential property of the row/column-wise linear propagation in Eq. (1): it is a standard diffusion process where L defines the spatial propagation and A, the affinity matrix, describes the similarities between any two points. Therefore, learning the image affinity matrix A in Eq. (8) is equivalent to learning a group of transformation matrices wt in Eq. (1). In the following section, we show how to build the spatial propagation (1) as a differentiable module that can be inserted into a standard feed-forward neural network, so that the affinity matrix A can be learned in a data-driven manner. 3.2 Learning Data-Driven Affinity Since the spatial propagation in Eq.(1) is differentiable, the transformation matrix can be easily configured as a row/column-wise fully-connected layer. However, we note that since the affinity matrix indicates the pairwise similarities of a specific input, it should also be conditioned on the 4 content of this input (i.e., different input images should have different affinity matrices). Instead of setting the wt matrices as fixed parameters of the module, we design them as the outputs of a deep CNN, which can be directly conditioned on an input image. One simple way is to set the output of the deep CNN to use the same size as the input matrix. When the input has c channels (e.g., an RGB image has c = 3), the output needs n × c × 4 channels (there are n connections from the previous row/column per pixel per channel, and with four different directions). Obviously, this is too many (e.g., an 128 × 128 × 16 feature map needs an output of 128 × 128 × 8192) to be implemented in a real-world system. Instead of using full connections between the adjacent rows/columns, we show that certain local connections, corresponding to a sparse row/column-wise transform matrix, can also formulate densely connected affinity. Specifically, we introduce the (a) one-way connection and the (b) three-way connection as two different ways to implement Eq. (1). One-way connection. The one-way connection enables every pixel to connect to only one pixel from the previous row/column (see Figure 1(a)). It is equivalent to one-dimensional (1D) linear recurrent propagation that scans each row/column independently as a 1D sequence. Following Eq. (1), we denote xk,t and hk,t as the kth pixels in the tth column, where the left-to-right propagation for one-way connection is: hk,t = (1 −pk,t) · xk,t + pk,t · hk,t−1, (9) where p is a scaler weight indicating the propagation strength between the pixels at {k, t −1} and {k, t}. Equivalently, wt in Eq. (1) is a diagonal matrix, with the elements constituted by pk,t, k ∈[1, n]. The one-way connection is a direct extension of sequential recurrent propagation [8, 31, 13]. The exact formulation of Eq. (9) has been used previously for semantic segmentation [4] and for learning low-level vision filters [19]. In [4], Chen et al.explain it as domain transform, where for semantic segmentation, p corresponds to the object edges. Liu et al. [19] explain it by arbitrary-order recursive filters, where p corresponds to more general image properties (e.g., low-level image/color edges, missing pixels, etc.). Both of these formulations can be explained as the same linear propagation framework of Eq. (1) with one-way connections. Three-way connection. We propose a novel three-way connection in this paper. It enables each pixel to connect to three pixels from the previous row/column, i.e., the left-top, middle and bottom pixels from the previous column for the left-to-right propagation direction (see Figure. 2(b)). With the same notations, we denote N as the set of these three pixels. Then the propagation for the three-way connection is: hk,t = 1 − X k∈N pk,t ! xk,t + X k∈N pk,thk,t−1 (10) Equivalently, wt forms a tridiagonal matrix, with p:,k, k ∈N constitute the three non-zero elements of each row/column. Relations to the affinity matrix. As introduced in Theorem 2, the affinity matrix A with linear propagation is composed of the off-diagonal elements of G in Eq. (3). The one-way connection formulates a spares affinity matrix, since each sub-matrix of A has nonzero elements only along its diagonal, and the multiplication of several individual diagonal matrics will also results in a diagonal matrix. On the other hand, the three-way connection, also with a sparse wt, can form a relatively dense A with the multiplication of several different tridiagonal matrices. It means pixels can be densely and globally associated, by simply increasing the number of connections of each pixel during spatial propagation from one to three. As shown in Figures 2(a) and 2(b), the propagation of one-way connections is restricted to a single row, while the three-way connections can expand the region to a triangular 2D plane with respect to each direction. The summarization of the four directions result in dense connections of all pixels to each other (see Figure. 2(b)). Stability of linear propagation. Model stability is of critical importance for designing linear systems. In the context of spatial propagation (Eq. 1), it refers to restricting the responses or errors that flow in the module from going to infinity, and preventing the network from encountering the vanishing of gradients in the backpropagation process [37]. Specifically, the norm of the temporal Jacobian ∂ht \ ∂ht−1 should be equal to or less than one. In our case, it is equivalent to regularizing each transformation matrix wt with its norm satisfying ∥∂ht \ ∂ht−1∥= ∥wt∥≤λmax, (11) 5 Figure 2: We illustrate the general architecture of the SPN using a three-way connection for segmentation refinement. The network, divided by the black dash line, contains a propagation module (upper) and a guidance network (lower). The guidance network outputs all entities that can constitute four affinity matrices, where each sub-matrix wt is a tridiagonal matrix. The propagation module, being guided by the affinity matrices, deforms the input mask to a desired shape. All modules are differentiable and jointly learned via SGD. where λmax denotes the largest singularity value of wt. This condition, λmax ≤1 provides a sufficient condition for stability. Theorem 3. Let n pK t,k o k∈N be the weight in wt, the model can be stabilized if P k∈N pK t,k ≤1. See the supplementary material for proof. Theorem 3 shows that the stability of a linear propagation model can be maintained by regularizing the all weights of each pixel in the hidden layer H, with the summation of their absolute values less than one. For the one-way connection, Chen et al. [4] limited each scalar output p to be within (0, 1). Liu et al. [19] extended the range to (−1, 1), where the negative weights showed preferable effects for learning image enhancers. It indicates that the affinity matrix is not necessarily restricted to be positive/semi-positive definite (e.g., the setting is also applied in [16].) For the three-way connection, we simply regularize the three weights (the output of a deep CNN) according to Theorem 3 without restriction to be any positive/semi-positive definite. 4 Implementation We specify two separate branches: (a) a deep CNN, namely the guidance network that outputs all elements of the transformation matrix, and (b) a linear propagation module that outputs the transformation matrix entities (see Figure 2). The propagation module receives an input map and output a refined or transformed result. It also takes the weights learned by the deep CNN guidance network as the second input. The structure of a guidance network can be any regular CNN, which is designed for the task at hand. Examples of this network are described in Section 5. It takes, as input, any 2D matrix that can help with learning the affinity matrix (e.g., typically an RGB image), and outputs all the weights that constitute the transformation matrix wt. Suppose that we have a map of size n × n × c that is input into the propagation module, the guidance network needs to output a weight map with the dimensions of n × n × c × (3 × 4), i.e., each pixel in the input map is paired with 3 scalar weights per direction, and 4 directions in total. The propagation module contains 4 independent hidden layers for the different directions, where each layer combines the input map with its respective weight map using Eq. (10). All submodules are differentiable and jointly trained using stochastic gradient descent (SGD). We use node-wise max-pooling [19] to integrate the hidden layers and to obtain the final propagation result. We implement the network with a modified version of CAFFE [12]. We employ a parallel version of the SPN implemented in CUDA for propagating each row/column to the next one. We use the SGD optimizer, and set the base learning rate to 0.0001. In general, we train the networks for the HELEN and VOC segmentation tasks for about 40 and 100 epochs, respectively. The inference time (we do not use cuDNN) of SPN on HELEN and Pascal VOC is about 7ms and 84ms for an image of size 512 × 512 pixels, respectively. In comparison, the dense CRF (CPU only) takes about 1s [14], 3.2s [5] and 4.4s [36] with different publicly available implementations. We note that the majority of the time for the SPN is spend in the guidance network, which can be accelerated by utilizing various existing network compressing strategies, applying smaller models, or sharing weights with the segmentation model if they are trained jointly. During inference, a single 64 × 64 × 32 SPN hidden layer takes 1.3ms with the same computational settings. 6 original CNN-base CNN-Highres one-way SPN three-way SPN ground truth Figure 3: Results of face parsing on the HELEN dataset with detailed regions cropped from the high resolution images. (The images are all in high resolution and can be viewed by zooming in.) 5 Experimental Results The SPN can be trained jointly with any segmentation CNN model by being inserted on top of the last layer that outputs probability maps, or trained separately as a segmentation refinement model. In this paper we choose the second option. Given a coarse image segmentation mask as the input to the spatial propagation module, we show that the SPN can produce higher-quality masks with significantly refined details at object boundaries. Many models [21, 5] generate low-resolution segmentation masks with coarse boundary shapes to seek a balance between computational efficiency and semantic accuracy. The majority of work [21, 5, 36] choose to first produce an output probability map with 8× smaller resolution, and then refine the result using either post-processing [5] or jointly trained modules [36]. Hence, producing high-quality segmentation results with low computational complexity is a non-trivial task. In this work, we train only one SPN model for a specific task, and treat it as a universal refinement tool for the different publicly available CNN models for each of these tasks. We carry out the refinement of segmentation masks on two tasks: (a) generating high-resolution segmentations on the HELEN face parsing dataset [27]; and (b) refining generic object segmentation maps generated by pretrained models (e.g., VGG based model [21, 5]. For the HELEN dataset, we directly use low-resolution RGB face images to train a baseline parser, which successfully encapsulates the global semantic information. The SPN is then trained on top of the coarse segmentations to generate high-resolution outputs. For the Pascal VOC dataset, we train the SPN on top of the coarse segmentation results generated by the FCN-8s [21], and directly generalize it to any other pretrained model. General network settings. For both tasks, we train the SPN as a patch refinement model on top of the coarse map with basic semantic information. It is trained with smaller patches cropped from the original high-resolution images, their corresponding coarse segmentation maps produced by a baseline segmentor, and with the corresponding high-resolution ground-truth segmentation masks for supervision. All coarse segmentation maps are obtained by applying a baseline (for HELEN) or pre-trained (for Pascal VOC) image segmentation CNN to their standard training splits [6, 5]. Since the baseline HELEN parser produces low-resolution segmentation results, we upsample them using a bi-linear filter to be of the same size as the desired higher output resolution. We fix the size of our input patches to 128 × 128, use the softmax loss, and use the SGD solver for all the experiments. During training, the patches are sampled from image regions that contain more than one ground-truth segmentation label (e.g., a patch with all pixels labeled as “background” will not be sampled). During testing, for the VOC dataset, we restrict the classes in the refined results to be contained within the corresponding coarse input. More specific settings are specified in the supplementary material. HELEN Dataset. The HELEN dataset provides high-resolution photography-style face images (2330 in total), with high-quality manually labeled facial components including eyes, eyebrows, nose, lips, and jawline, which makes the high-resolution segmentation tasks applicable. All previous work utilize low-resolution parsing output as their final results for evaluation. Although many [27, 33, 20] achieve preferable performance, their results cannot be directly adopted by high-quality facial image editing applications. We use the same settings as the state-of-the work [20]. We use similarity transformation according to the results of 5-keypoint detection [35] to align all face images to the center. Keeping the original resolution, we then crop or pad them to the size of 1024 × 1024. 7 Table 1: Quantitative evaluation results on the HELEN dataset. We denote the upper and lower lips as “U-lip” and “L-lip”, and overall mouth part as “mouth”, respectively. The label definitions follow [20]. Method skin brows eyes nose mouth U-lip L-lip in-mouth overall Liu et al. [20] 90.87 69.89 74.74 90.23 82.07 59.22 66.30 81.70 83.68 baseline-CNN 90.53 70.09 74.86 89.16 83.83 55.61 64.88 71.72 82.89 Highres-CNN 91.78 71.84 74.46 89.42 81.83 68.15 72.00 71.95 83.21 SPN (one-way) 92.26 75.05 85.44 91.51 88.13 77.61 70.81 79.95 87.09 SPN (three-way) 93.10 78.53 87.71 92.62 91.08 80.17 71.63 83.13 89.30 We first train a baseline CNN with a symmetric U-net structure, where both the input image and the output map are 8× smaller than the original image. The detailed settings are in the supplementary meterial. We apply the multi-objective loss as [20] to improve the accuracy along the boundaries. We note that the symmetric structure is powerful, since the results we obtained for the baseline CNN are comparable (see Table. 1) to that of [20], who apply a much larger model (38 MB vs. 12 MB). We then train a SPN on top of the baseline CNN results on the training set, with patches sampled from the high-resolution input image and the coarse segmentations masks. For the guidance network, we use the same structure as that of the baseline segmentation network, except that its upsampling part ends at a resolution of 64 × 64, and its output layer has 32 × 12 = 384 channels. In addition, we train another face parsing CNN with 1024 × 1024 sized inputs and outputs (CNN-Highres) for better comparison. It has three more sub-modules at each end of the baseline network, where all are configured with 16 channels to process higher resolution images. We show quantitative and qualitative results in Table. 1 and 3 respectively. We compared the one/three way connection SPNs with the baseline, the CNN-Highres and the most relevant state-of-the-art technique for face parsing [20]. Note that the results of baseline and [20]1 are bi-linearly upsampled to 1024×1024 before evaluation. Overall, both SPNs outperform the other techniques with a significant margin of over 6 intersection-over-union (IoU) points. Especially for the smaller facial components (e.g., eyes and lips) where with smaller resolution images, the segmentation network performs poorly. We note that the one-way connection-based SPN is quite successful on relatively simple tasks such as the HELEN dataset, but fails for more complex tasks, as revealed by the results of Pascal VOC dataset in the following section. Pascal VOC Dataset. The PASCAL VOC 2012 segmentation benchmark [6] involves 20 foreground object classes and one background class. The original dataset contains 1464 training, 1499 validation and 1456 testing images, with pixel-level annotations. The performance is mainly measured in terms of pixel IoU averaged across the 21 classes. We train our SPNs on the train split with the coarse segmentation results produced by the FCN-8s model [21]. The model is fine-tuned on a pre-trained VGG-16 network, where different levels of features are upsampled and concatenated to obtain the final, low-resolution segmentation results (8× smaller than the original image size). The guidance network of the SPN also fine-tunes the VGG-16 structure from the beginning till the pool5 layer as the downsampling part. Similar to the settings for the HELEN dataset, the upsampling part has a symmetric structure with skipped links until the feature dimensions of 64 × 64. The spatial propagation module has the same configuration as that of the SPN that we employed for the HELEN dataset. The model is applied on the coarse segmentation maps of the validation and test splits generated by any image segmentation algorithm without fine-tuning. We test the refinement SPN on three base models: (a) FCN-8s [21], (b) the atrous spatial pyramid pooling (ASPP-L) network fine-tuned with VGG-16, denoted as Deeplab VGG, and (c) the ASPP-L: a multi-scale network fine-tuned with ResNet-101 [11] (pre-trained on the COCO dataset), denoted as Deeplab ResNet-101. Table 2: Quantitative comparison (mean IoU) with dense CRF-based refinement [5] on Deeplab pre-trained models. mIoU CNN +dense CRF +SPN VGG 68.97 71.57 73.12 ResNet 76.40 77.69 79.76 Among them, (b) and (c) are the two basic models from [5], which are then refined with dense CRF [14] conditioned on the original image. Table 3 shows that through the three-way SPN, the accuarcy of segmentation is significantly improved over the coarse segmentation results for all the three baseline models. It has strong capability of generalization and can successfully refine any coarse maps from different pre-trained models by a large margin. Different with 1The original output (also for evaluation) size it 250 ∗250. 8 Figure 4: Visualization of Pascal VOC segmentation results (left) and object probability (by 1 −Pb, Pb is the probability of background). The “pretrained” column denotes the base Deeplab ResNet-101 model, while the rest 4 columns show the base model combined with the dense CRF [5] and the proposed SPN, respectively. Table 3: Quantitative evaluation results on the Pascal VOC dataset. We compare the two connections of SPN with the corresponding pre-trained models, including: (a) FCN-8s (F), (b) Deeplab VGG (V) and (c) Deeplab ResNet-101 (R). AC denotes accuracy, “+” denote added on top of the base model. Model F +1 way +3 way V +1 way +3 way R +1 way +3 way overall AC 91.22 90.64 92.90 92.61 92.16 93.83 94.63 94.12 95.49 mean AC 77.61 70.64 79.49 80.97 73.53 83.15 84.16 77.46 86.09 mean IoU 65.51 60.95 69.86 68.97 64.42 73.12 76.46 72.02 79.76 the Helen dataset, the one-way SPN fails to refine the segmentation, which is probably due to its limited capability of learning preferable affinity with a sparse form, especially when the data distribution gets more complex. Table 2 shows that by replacing the dense CRF module with the same refinement model, the performance is boosted by a large margin, without fine-tuning. One the test split, the DeepNet ResNet-101 based SPN achieves the mean IoU of 80.22, while the dense CRF gets 79.7. The three-way SPN produces fine visual results, as shown in the red bounding box of Figure 4. By comparing the probability maps (column 3 versus 7), SPN exhibits fundamental improvement in object details, boundaries, and semantic integrity. In addition, we show in table 4 that the same refinement model can also be generalize to dilated convolution based networks [34]. It significantly improves the quantitative performance on top of the “Front end” base model, as well as adding a multi-scale refinement module, denoted as “+Context”. Specifically, the SPN improves the base model with much larger margin compared to the context aggregation module (see “+3 way” vs “+Context” in table 4). 6 Conclusion We propose spatial propagation networks for learning pairwise affinities for vision tasks. It is a generic framework that can be applied to numerous tasks, and in this work we demonstrate its effectiveness for semantic object segmentation. Experiments on the HELEN face parsing and PASCAL VOC object semantic segmentation tasks show that the spatial propagation network is general, effective and efficient for generating high-quality segmentation results. Table 4: Quantitative evaluation results on the Pascal VOC dataset. We refine the base models proposed with dilated convolutions [34]. “+” denotes additions on top of the “Front end” model. Model Front end +3 way +Context +Context+3 way overall AC 93.03 93.89 93.44 94.35 mean AC 80.31 83.47 80.97 83.98 mean IoU 69.75 73.14 71.86 75.28 9 Acknowledgement. This work is supported in part by the NSF CAREER Grant #1149783, gifts from Adobe and NVIDIA. References [1] A. Arnab, S. Jayasumana, S. Zheng, and P. H. Torr. Higher order conditional random fields in deep neural networks. In ECCV. Springer, 2016. [2] G. Bertasius, L. Torresani, S. X. Yu, and J. Shi. Convolutional random walk networks for semantic image segmentation. arXiv preprint arXiv:1605.07681, 2016. [3] W. Byeon, T. M. Breuel, F. Raue, and M. Liwicki. Scene labeling with lstm recurrent neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015. [4] L. Chen, J. T. Barron, G. Papandreou, K. Murphy, and A. L. Yuille. Semantic image segmentation with task-specific edge detection using cnns and a discriminatively trained domain transform. arXiv preprint arXiv:1511.03328, 2015. [5] L. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. CoRR, abs/1606.00915, 2016. [6] M. Everingham, S. A. Eslami, L. V. Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes challenge: A retrospective. International Journal of Computer Vision, 111(1):98–136, 2015. [7] S. Geršgorin. Uber die abgrenzung der eigenwerte einer matrix. Bulletin de l’Académie des Sciences de l’URSS. Classe des sciences mathématiques et na, 1931. [8] A. Graves, S. Fernández, and J. Schmidhuber. Multi-dimensional recurrent neural networks. In ICANN, 549–558, 2007. [9] K. He, J. Sun, and X. Tang. Single image haze removal using dark channel prior. IEEE transactions on pattern analysis and machine intelligence, 33(12):2341–2353, 2011. [10] K. He, J. Sun, and X. Tang. Guided image filtering. IEEE transactions on pattern analysis and machine intelligence, 35(6):1397–1409, 2013. [11] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. [12] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [13] N. Kalchbrenner, I. Danihelka, and A. Graves. Grid long short-term memory. arXiv preprint arXiv:1507.01526, 2015. [14] P. Krähenbühl and V. Koltun. Efficient inference in fully connected crfs with gaussian edge potentials. In Advances in neural information processing systems, pages 109–117, 2011. [15] A. Levin, D. Lischinski, and Y. Weiss. Colorization using optimization. ACM Transactions on Graphics (ToG), 23(3):689–694, 2004. [16] A. Levin, D. Lischinski, and Y. Weiss. A closed-form solution to natural image matting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(2):228–242, 2008. [17] G. Lin, C. Shen, I. D. Reid, and A. van den Hengel. Deeply learning the messages in message passing inference. arXiv preprint arXiv:1506.02108, 2015. [18] R. Liu, G. Zhong, J. Cao, Z. Lin, S. Shan, and Z. Luo. Learning to diffuse: A new perspective to design pdes for visual analysis. IEEE transactions on pattern analysis and machine intelligence, 38(12):2457–2471, 2016. [19] S. Liu, J. Pan, and M.-H. Yang. Learning recursive filters for low-level vision via a hybrid neural network. In European Conference on Computer Vision, 2016. [20] S. Liu, J. Yang, C. Huang, and M.-H. Yang. Multi-objective convolutional learning for face labeling. In CVPR, 2015. 10 [21] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3431–3440, 2015. [22] M. Maire, T. Narihira, and S. X. Yu. Affinity CNN: learning pixel-centric pairwise relations for figure/ground embedding. CoRR, abs/1512.02767, 2015. [23] L. I. Rudin, S. Osher, and E. Fatemi. Nonlinear total variation based noise removal algorithms. Physica D: Nonlinear Phenomena, 60(1-4):259–268, 1992. [24] A. G. Schwing and R. Urtasun. Fully connected deep structured networks. arXiv preprint arXiv:1503.02351, 2015. [25] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on pattern analysis and machine intelligence, 22(8):888–905, 2000. [26] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [27] B. M. Smith, L. Zhang, J. Brandt, Z. Lin, and J. Yang. Exemplar-based face parsing. In CVPR, 2013. [28] J. A. Suykens, J. D. Brabanter, L. Lukas, and J. Vandewalle. Weighted least squares support vector machines: robustness and sparse approximation. Neurocomputing, 48(1):85–105, 2002. [29] C. Tomasi and R. Manduchi. Bilateral filtering for gray and color images. In ICCV, 1998. [30] A. van den Oord, N. Kalchbrenner, and K. Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. [31] F. Visin, K. Kastner, K. Cho, M. Matteucci, A. Courville, and Y. Bengio. Renet: A recurrent neural network based alternative to convolutional networks. arXiv preprint arXiv:1505.00393, 2015. [32] J. Weickert. Anisotropic diffusion in image processing, volume 1. Teubner Stuttgart, 1998. [33] T. Yamashita, T. Nakamura, H. Fukui, Y. Yamauchi, and H. Fujiyoshi. Cost-alleviative learning for deep convolutional neural network-based facial part labeling. IPSJ Transactions on Computer Vision and Applications, 7:99–103, 2015. [34] F. Yu and V. Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. [35] Z. Zhang, P. Luo, C. C. Loy, and X. Tang. Facial landmark detection by deep multi-task learning. In ECCV, 2014. [36] S. Zheng, S. Jayasumana, B. Romera-Paredes, V. Vineet, Z. Su, D. Du, C. Huang, and P. Torr. Conditional random fields as recurrent neural networks. In IEEE International Conference on Computer Vision, 2015. [37] J. G. Zilly, R. K. Srivastava, J. Koutník, and J. Schmidhuber. Recurrent highway networks. arXiv preprint arXiv:1607.03474, 2016. 11 | 2017 | 500 |
7,009 | Gated Recurrent Convolution Neural Network for OCR Jianfeng Wang∗ Beijing University of Posts and Telecommunications Beijing 100876, China jianfengwang1991@gmail.com Xiaolin Hu Tsinghua National Laboratory for Information Science and Technology (TNList) Department of Computer Science and Technology Center for Brain-Inspired Computing Research (CBICR) Tsinghua University, Beijing 100084, China xlhu@tsinghua.edu.cn Abstract Optical Character Recognition (OCR) aims to recognize text in natural images. Inspired by a recently proposed model for general image classification, Recurrent Convolution Neural Network (RCNN), we propose a new architecture named Gated RCNN (GRCNN) for solving this problem. Its critical component, Gated Recurrent Convolution Layer (GRCL), is constructed by adding a gate to the Recurrent Convolution Layer (RCL), the critical component of RCNN. The gate controls the context modulation in RCL and balances the feed-forward information and the recurrent information. In addition, an efficient Bidirectional Long ShortTerm Memory (BLSTM) is built for sequence modeling. The GRCNN is combined with BLSTM to recognize text in natural images. The entire GRCNN-BLSTM model can be trained end-to-end. Experiments show that the proposed model outperforms existing methods on several benchmark datasets including the IIIT-5K, Street View Text (SVT) and ICDAR. 1 Introduction Reading text in scene images can be regarded as an image sequence recognition task. It is an important problem which has drawn much attention in the past decades. There are two types of scene text recognition tasks: constrained and unconstrained. In constrained text recognition, there is a fixed lexicon or dictionary with known length during inference. In unconstrained text recognition, each word is recognized without a dictionary. Most of the previous works are about the first task. In recent years, deep neural networks have gained great success in many computer vision tasks [39, 19, 34, 42, 9, 11]. The fast development of deep neural networks inspires researchers to use them to solve the problem of scene text recognition. For example, an end-to-end architecture which combines a convolutional network with a recurrent network is proposed [30]. In this framework, a plain seven-layer-CNN is used as a feature extractor for the input image while a recurrent neural network (RNN) is used for image sequence modeling. For another example, to let the recurrent network focus on the most important segments of incoming features, an end-to-end system which integrates attention mechanism, recurrent network and recursive CNN is developed [21]. ∗This work was done when Jianfeng Wang was an intern at Tsinghua University. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Illustration of using RCL with T = 2 for OCR. A Recurrent Convolution Neural Network (RCNN) is proposed for general image classification [22], which simulates an anatomical fact that recurrent connections are ubiquitously existent in the neocortex. It is believed that the recurrent synapses that exist in the neocortex play an important role in context modulation during visual recognition. A feed-forward model can only capture the context in higher layers where units have larger receptive fields, but this information cannot modulate the units in lower layers which is responsible for recognizing smaller objects. Hence, using recurrent connections within a convolutional layer (called Recurrent Convolution Layer or RCL) can bring context information to all units in this layer. This implements a nonclassical receptive field [12, 18] of a biological neuron as the effective receptive field is larger than that determined by feedforward connections. However, with increasing iterations, the size of the effective receptive field will increase unboundedly, which contradicts the biological fact. One needs a mechanism to constrain the growth of the effective receptive field. In addition, from the viewpoint of performance enhancing, one also needs to control the context modulation of neurons in RCNN. For example, in Figure 1, it is seen that for recognizing a character, not all of the context are useful. When the network recognizes the character "h", the recurrent kernel which covers the other parts of the character is beneficial. However, when the recurrent kernel is enlarged to the parts of other characters, such as "p", the context carried by the kernel is unnecessary. Therefore, we need to weaken the signal that comes from unrelated context and combine the feed-forward information with recurrent information in a flexible way. To achieve the above goals, we introduce a gate to control the context modulation in each RCL layer, which leads to the Gated Recurrent Convolution Neural Network (GRCNN). In addition, the recurrent neural network is adopted in the recognition of words in natural images since it is good at sequence modeling. In this work, we choose the Long Short Term Memory (LSTM) as the top layer of the proposed model, which is trained in an end-to-end fashion. 2 Related Work OCR is one of the most important challenges in computer vision and many methods have been proposed for this task. The word locations and scores of detected characters are input into the Pictorial Structure formulation to acquire an optimal configuration of a particular word [26]. A complete OCR system that contains text detection as well as text recognition is designed, and it can be well applied to both unconstrained and constrained text recognition task [3]. The OCR can be understood as a classification task by treating each word in the lexicon as an object category [37]. Another classical method, the Conditional Random Fields, is proposed in text recognition [17, 25, 31]. Besides those conventional methods, some deep network-based methods are also proposed. The Convolutional Neural Network (CNN) is used to extract shared features, which are fed into a character classifier [16]. To further improve the performance, more than one objective functions are used in a CNN-based OCR system [15]. A CNN is combined with the Conditional Random Field graphical model, which can be jointly optimized through back-propagation [14]. Moreover, some works introduced RNN, such as LSTM, to recognize constrained and unconstrained words [30]. The attention mechanism is applied to a stacked RNN on the top of the recursive CNN [21]. 2 Figure 2: Illustration of GRCL with T = 2. The convolutional kernels in the same color use the same weights. Many new deep neural networks for general image classification have been proposed in these years. The closely related model to the proposed model in this paper is RCNN [22], which is inspired by the observation of abundant recurrent synapses in the brain. It adds recurrent connections within the standard convolutional layers, and the recurrent connections improve the network capacity for object recognition. When unfolded in time, it becomes a CNN with many shortcuts from the bottom layer to upper layers. RCNN has been used to solve other problems such as scene labelling [23], action recognition [35], and speech processing [43]. One related model to RCNN is the recursive neural network [32], in which a recursive layer is unfolded into a stack of layers with tied weights. It can be regarded as an RCNN without shortcuts. Another related model is the DenseNet [11], in which every lower layer is connected to the upper layers. It can be regarded as an RCNN with more shortcuts and without weight sharing. The idea of shortcut have also been explored in the residual network [9]. 3 GRCNN-BLSTM Model 3.1 Recurrent Convolution Layer and RCNN The RCL [22] is a module with recurrent connections in the convolutional layer of CNN. Consider a generic RNN model with feed-forward input u(t). The internal state x(t) can be defined as: x(t) = F(u(t), x(t −1), θ) (1) where the function F describes the nonlinearity of RNN (e.g. ReLU unit) and θ is the parameter. The state of RCL evolves over discrete time steps: x(t) = F((wf ∗u(t) + wr ∗x(t −1)) (2) where "*" denotes convolution, u(t) and x(t −1) denote the feed-forward input and recurrent input respectively, wf and wr denote the feed-forward weights and recurrent weights respectively. Multiple RCLs together with other types of layers can be stacked into a deep model. A CNN that contains RCL is called RCNN [22]. 3 Figure 3: Overall pipeline of the architecture. 3.2 Gated Recurrent Convolution Layer and GRCNN The Gated Recurrent Convolution Layer (GRCL) is the essential module in our framework. This module is equipped with a gate to control the context modulation in RCL and it can weaken or even cut off some irrelevant context information. The gate of GRCL can be written as follows: G(t) = ( 0 t = 0 sigmoid(BN(wf g ∗u(t)) + BN(wr g ∗x(t −1))) t > 0 (3) Inspired by the Gated Recurrent Unit (GRU) [4], we let the controlling gate receive the signals from the feed-forward input as well as the states at the last time step. We use two 1 × 1 kernels, wf g and wr g, to convolve with the feed-forward input and recurrent input separately. wf g denotes the feed-forward weights for the gate and wr g denotes the recurrent weights for the gate. The recurrent weights are shared over all time steps (Figure 2). Batch normalization (BN) [13] is used to improve the performance and accelerate convergence. The GRCL can be described by: x(t) = ( ReLU(BN(wf ∗u(t)) t = 0 ReLU(BN(wf ∗u(t)) + BN(BN(wr ∗x(t −1)) ⊙G(t))) t > 0 (4) In the equations, "⊙" denotes element-wise multiplication. Batch normalization (BN) is applied after each convolution and element-wise multiplication operation. The parameters and statistics in BN are not shared over different time steps. It is assumed that the input to GRCL is the same over time t, which is denoted by u(0). This assumption means that the feed-forward part contributes equally at each time step. It is important to clarify that the time step in GRCL is not identical to the time associated with the sequential data. The time steps denote the iterations in processing the input. Figure 2 shows the diagram of the GRCL with T = 2. When t = 0, only the feed-forward computation takes place. At t = 1, the gate’s output, which is determined by the feed-forward input and the states at the previous time step (t = 0), acts on the recurrent component. It can modulate the recurrent signals. Considering two special cases, when all of the output of the gate is 1, it becomes the standard RCL. When all of the output of the gate is 0, the recurrent signal is dropped and it becomes the standard convolutional layer. Therefore, the GRCL is a generalization of RCL and it can adjust context modulation dynamically. The effective receptive field (RF) of each GRCL unit in the previous layer’s feature maps expands while the iteration number increases. However, unlike the RCL, some regions that contain unrelated information in large effective RF cannot provide strong signal to the center of RF. This mimics the fact that human eyes only care about the context information that helps the recognition of the objects. Multiple GRCLs together with other types of layers can be stacked into a deep model. Hereafter, a CNN that contains GRCL is called a GRCNN. 3.3 Overall Architecture The architecture consists of three parts: feature sequence extraction, sequence modelling, and transcription. Figure 3 shows the overall pipeline which can be trained end-to-end. Feature Sequence Extraction: We use the GRCNN in the first part and there are no fully-connected layers. The input to the network is a whole image and the image is resized to fixed length and height. 4 Table 1: The GRCNN configuration Conv MaxPool GRCL MaxPool GRCL MaxPool GRCL MaxPool Conv 3 × 3 2 × 2 3 × 3 2 × 2 3 × 3 2 × 2 3 × 3 2 × 2 2 × 2 num: 64 num: 64 num: 128 num: 256 num: 512 sh:1 sw:1 sh:2 sw:2 sh:1 sw:1 sh:2 sw:2 sh:1 sw:1 sh:2 sw:1 sh:1 sw:1 sh:2 sw:1 sh:1 sw:1 ph:1 pw:1 ph:0 pw:0 ph:1 pw:1 ph:0 pw:0 ph:1 pw:1 ph:0 pw:1 ph:1 pw:1 ph:0 pw:1 ph:0 pw:0 Specifically, the feature map in the last layer is sliced from left to right by column to form a feature sequence. Therefore, the i-th feature vector is formed by concatenating the i-th columns of all of the maps. We add some max pooling layers to the network in order to ensure the width of each column is 1. Each feature vector in the sequence represents a rectangle region of the input image, and it can be regarded as the image descriptor for that region. Comparing the GRCL with the basic convolutional layer, we find that each feature vector generated by the GRCL represents a larger region. This feature vector contains more information than the feature vector generated by the basic convolutional layer, and it is beneficial for the recognition of text. Sequence Modeling: An LSTM [10] is used on the top of feature extraction module for sequence modeling. The peephole LSTM is first proposed in [5], whose gates not only receive the inputs from the previous layer, but also from the cell state. We add the peephole LSTM to the top of GRCNN and investigate the effect of peephole connections to the whole network’s performance. The inputs to the gates of LSTM can be written as: i = σ(Wxixt + Whiht−1 + γ1Wcict−1 + bi), (5) f = σ(Wxfxt + Whfht−1 + γ2Wcfct−1 + bf), (6) o = σ(Wxoxt + Whoht−1 + γ3Wcoct + bo), (7) γi ∈{0, 1}. (8) γi is defined as an indication factor and its value is 0 or 1. When γi is equal to 1, the gate receives the modulation of the cell’s state. However, LSTM only considers past events. In fact, the context information from both directions are often complementary. Therefore, we use stacked bidirectional LSTM [29] in our architecture. Transcription: The last part is transcription which converts per-frame predictions to real labels. The Connectionist Temporal Classification (CTC) [8] method is used. Denote the dataset by S = {(I, z)}, where I is a training image and z is the corresponding ground truth label sequence. The objective function to be minimized is defined as follows: O = − X (I,z)∈S logp(z|I). (9) Given an input image I, the prediction of RNN at each time step is denoted by πt. The sequence π may contain blanks and repeated labels (e.g. (a −b −−b)=(ab −−bb)) and we need a concise representation l (the two examples are both reduced to abb). Define a function β which maps π to l by removing blanks and repeated labels. Then p(l|I) = X π:β(π)=l logp(π|I), (10) p(π|I) = T Y t=1 yt πt, (11) where yt πt denotes the probability of generating label πt at time step t. After training, for lexicon-free transcription, the predicted label sequence for a test image I is obtained by [30]: l∗= β(arg max π p(π|I)). (12) The lexicon-based method needs a dictionary or lexicon. Each test image is associated with a fix length lexicon D. The result is obtained by choosing the sequence in the lexicon that has highest conditional probability [30]: l∗= arg max l∈D p(l|I). (13) 5 Table 2: Model analysis over the IIIT5K and SVT (%). Mean and standard deviation of the results are reported. (a) GRCNN analysis Model IIIT5K SVT Plain CNN 77.21±0.54 77.69±0.59 RCNN(1 iter) 77.64±0.58 78.23±0.56 RCNN(2 iters) 78.17±0.56 79.11±0.63 RCNN(3 iters) 78.94±0.61 79.76±0.59 GRCNN(1 iter) 77.92±0.57 78.67±0.53 GRCNN(2 iters) 79.42±0.63 79.89±0.64 GRCNN(3 iters) 80.21±0.57 80.98±0.60 (b) LSTM’s variants analysis LSTM variants IIIT5K SVT LSTM{γ1=0,γ2=0,γ3=0} 77.92±0.57 78.67±0.53 LSTM-F{γ1=0,γ2=1,γ3=0} 77.26±0.61 78.23±0.53 LSTM-I{γ1=1,γ2=0,γ3=0} 76.84±0.58 76.89±0.63 LSTM-O{γ1=0,γ2=0,γ3=1} 76.91±0.64 78.65±0.56 LSTM-A{γ1=1,γ2=1,γ3=1} 76.52±0.66 77.88±0.59 4 Experiments 4.1 Datasets ICDAR2003: ICDAR2003 [24] contains 251 scene images and there are 860 cropped images of the words. We perform unconstrained text recognition and constrained text recognition on this dataset. Each image is associated with a 50-word lexicon defined by wang et al. [36]. The full lexicon is composed of all per-image lexicons. IIIT5K: This dataset has 3000 cropped testing word images and 2000 cropped training images collected from the Internet [31]. Each image has a lexicon of 50 words and a lexicon of 1000 words. Street View Text (SVT): This dataset has 647 cropped word images from Google Street View [36]. We use the 50-word lexicon defined by Wang et al [36] in our experiment. Synth90k: This dataset contains around 7 million training images, 800k validation images and 900k test images [15]. All of the word images are generated by a synthetic text engine and are highly realistic. When evaluating the performance of our model on those benchmark dataset, we follow the evaluation protocol in [36]. We perform recognition on the words that contain only alphanumeric characters (A-Z and 0-9) and at least three characters. All recognition results are case-insensitive. 4.2 Implementation Details The configuration of the network is listed in Table 1, where "sh" denotes the stride of the kernel along the height; "sw" denotes the stride along the width; "ph" and "pw" denote the padding value of height and width respectively; and "num" denotes the number of feature maps. The input is a gray-scale image which is resized to 100×32. Before input to the network, the pixel values are rescaled to the range (-1, 1). The final output of the feature extractor is a feature sequence of 26 frames. The recurrent layer is a bidirectional LSTM with 512 units without dropout. The ADADELTA method [41] is used for training with the parameter ρ=0.9. The batch size is set to 192 and training is stopped after 300k iterations. All of the networks and related LSTM variants are trained on the training set of Synth90k. The validation set of Synth90k is used for model selection. When a model is selected in this way, its parameters are fixed and it is directly tested on other datasets (ICDAR2003, IIIT5K and SVT datasets) without finetuning. The code and pre-trained model will be released at https://github.com/ Jianfeng1991/GRCNN-for-OCR. 4.3 Explorative Study We empirically analyze the performance of the proposed model. The results are listed in Table 2. To ensure robust comparison, for each configuration, after convergence during training, a different model is saved at every 3000 iterations. We select ten models which perform the best on the Synth90k’s validation set, and report the mean accuracy as well as the standard deviation on each tested dataset. 6 Table 3: The text recognition accuracies in natural images. "50","1k" and "Full" denote the lexicon size used for lexicon-based recognition task. The dataset without lexicon size means the unconstrained text recognition Method SVT-50 SVT IIIT5K-50 IIIT5K-1k IIIT5K IC03-50 IC03-Full IC03 ABBYY [36] 35.0% 24.3% 56.0% 55.0% wang et al. [36] 57.0% 76.0% 62.0% Mishra et al. [25] 73.2% 81.8% 67.8% Novikova et al. [27] 72.9% 64.1% 57.5% 82.8% wang et al. [38] 70.0% 90.0% 84.0% Bissacco et al. [3] 90.4% 78.0% Goel et al. [6] 77.3% 89.7% Alsharif [2] 74.3% 93.1% 88.6% Almazan et al. [1] 89.2% 91.2% 82.1% Lee et al. [20] 80.0% 88.0% 76.0% Yao et al. [40] 75.9% 80.2% 69.3% 88.5% 80.3% Rodriguez et al. [28] 70.0% 76.1% 57.4% Jaderberg et al. [16] 86.1% 96.2% 91.5% Su and Lu et al. [33] 83.0% 92.0% 82.0% Gordo [7] 90.7% 93.3% 86.6% Jaderberg et al. [14] 93.2% 71.1% 95.5% 89.6% 97.8% 97.0% 89.6% Baoguang et al. [30] 96.4% 80.8% 97.6% 94.4% 78.2% 98.7% 97.6% 89.4% Chen-Yu et al. [21] 96.3% 80.7% 96.8% 94.4% 78.4% 97.9% 97.0% 88.7% ResNet-BLSTM 96.0% 80.2% 97.5% 94.9% 79.2% 98.1% 97.3% 89.9% Ours 96.3% 81.5% 98.0% 95.6% 80.8% 98.8% 97.8% 91.2% First, a purely feed-forward CNN is constructed for comparison. To make this CNN have approximately the same number of parameters as GRCNN and RCNN, we use two convolutional layers to replace each GRCL in Table 1, and each of them has the same number of feature maps as the corresponding GRCL. Besides, this plain CNN has the same depth as the GRCNN with T = 1. The results show that the plain CNN has lower accuracy than both RCNN and GRCNN. Second, we compare GRCNN and RCNN to investigate the effect of adding gate to the RCL. RCNN is constructed by replacing GRCL in Table 1 with RCL. Each RCL in RCNN has the same number of feature maps as the corresponding GRCL. Batch normalization is also inserted after each convolutional kernel in RCL. We fix T, and compare these two models. The results in Table 2(a) show that each GRCNN model outperforms the corresponding RCNN on both IIIT5K and SVT. Those results show the advantage of the introduced gate in the model. Furthermore, we explore the effect of iterations in GRCL. From Table 2(a), we can conclude that having more iterations is beneficial to GRCL. The increments of accuracy between each iteration number are 1.50%, 0.79% on IIIT5K and 1.22%, 1.09% on SVT, respectively. This is reasonable since GRCL with more iterations is able to receive more context information. Finally, we compare various peephole LSTM units in the bidirectional LSTM for processing feature sequences. Five types of LSTM variants are compared: full peephole LSTM (LSTM-A), input gate peephole LSTM (LSTM-I), output gate peephole LSTM (LSTM-O), forget gate peephole LSTM (LSTM-F) and none peephole LSTM (LSTM). In the feature extraction part, we use GRCNN with T = 1 which is described in Table 1. Table 2(b) shows that the LSTM without peephole connections (γ1 = γ2 = γ3 = 0) gives the best result. 4.4 Comparison with the state-of-the-art We use the GRCNN described in Table 1 as the feature extractor. Since having more iterations is helpful to GRCL, we use GRCL with T = 5 in GRCNN. To fairly compare the GRCNN with other network architectures, such as the ResNet or the untied RCNN [21], we also untie the weights in the recurrent part as [21] did. For sequence learning, we use the bidirectional LSTM without peephole connections. The training details are described in Sec.4.2. The best model on the validation set of Synth90k is selected for comparison. Note that this model is trained on the training set of Synth90k and not finetuned with respect to any dataset. Table 3 shows the results. The proposed method outperforms most existing models for both constrained and unconstrained text recognition. 7 Figure 4: Lexicon-free recognition results by the proposed GRCL-BLSTM framework on SVT, ICDAR03 and IIIT5K Moreover, we do an extra experiment by building a residual block in feature extraction part. We use the ResNet-20 [9] in this experiment, since it has similar depth with GRCNN with T = 5. The implementation is similar to what we have discussed in Sec.4.2. The results of ResNet-BLSTM are listed in Table 3. This ResNet-based framework performs worse than the GRCNN-based framework. The result indicates that GRCNN is more suitable for scene text recognition. Some examples predicted by the proposed method under unconstrained scenario are shown in Figure 4. The correctly predicted examples are shown in the left. It is seen that our model can recognize some long words that have missing part, such as "MEMENTO" in which "N" is not clear. Some other bend words are also recognized perfectly, for instance, "COTTAGE" and "BADGER". However, there are some words that cannot be distinguished precisely and some of them are showed in the right side in Figure 4. The characters which are combined closely may lead to bad recognition results. For the word "ARMADA", the network cannot accurately split "A" and "R", leading to a missing character in the result. Moreover, some special symbols whose shapes are similar to the English characters affect the results. For example, the symbol in "BLOOM" looks like the character "O", and the word is incorrectly recognized as "OBLOOM". Finally, some words that have strange-shaped character are also difficult to be recognized, such as "SBULT" (the ground truth is "SALVADOR"). 5 Conclusion we propose a new architecture named GRCNN which uses a gate to modulate recurrent connections in a previous model RCNN. GRCNN is able to choose the context information dynamically and combine the feed-forward part with recurrent part flexibly. The unrelated context information coming from the recurrent part is inhibited by the gate. In addition, through experiments we find the LSTM without peephole connection is suitable for scene text recognition. The experiments on scene text recognition benchmarks demonstrate the superior performance of the proposed method. Acknowledgements This work was supported in part by the National Basic Research Program (973 Program) of China under grant no. 2013CB329403, the National Natural Science Foundation of China under grant nos. 91420201, 61332007, 61621136008 and 61620106010, and in part by a grant from Sensetime. 8 References [1] J. Almazan, A. Gordo, A. Fornes, and E. Valveny. Word spotting and recognition with embedded attributes. IEEE Transactions on Pattern Analysis & Machine Intelligence, 36(12):2552–2566, 2014. [2] O. Alsharif and J. Pineau. End-to-end text recognition with hybrid hmm maxout models. Computer Science, 2013. [3] A. Bissacco, M. Cummins, Y. Netzer, and H. Neven. Photoocr: Reading text in uncontrolled conditions. In ICCV, pages 785–792, 2014. [4] K. Cho, B. V. Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. Computer Science, 2014. [5] F. A. Gers and J. Schmidhuber. Recurrent nets that time and count. In International Joint Conference on Neural Networks, pages 189–194, 2000. [6] V. Goel, A. Mishra, K. Alahari, and C. V. Jawahar. Whole is greater than sum of parts: Recognizing scene text words. In International Conference on Document Analysis and Recognition, pages 398–402, 2013. [7] A. Gordo. Supervised mid-level features for word image representation. In CVPR, pages 2956–2964, 1998. [8] A. Graves and F. Gomez. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In ICML, pages 369–376, 2006. [9] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. [10] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735, 1997. [11] G. Huang, Z. Liu, K. Q. Weinberger, and V. D. M. Laurens. Densely connected convolutional networks. In CVPR, 2017. [12] D. H. Hubel and T. N. Wiesel. Receptive fields and functional architecture in two nonstriate visual areas (18 and 19) of the cat. Journal of Neurophysiology, 28:229–89, 1965. [13] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448–456, 2015. [14] M. Jaderberg, K. Simonyan, A. Vedaldi, and A. Zisserman. Deep structured output learning for unconstrained text recognition. In ICLR, 2014. [15] M. Jaderberg, K. Simonyan, A. Vedaldi, and A. Zisserman. Synthetic data and artificial neural networks for natural scene text recognition. Workshop on Deep Learning, NIPS, 2014. [16] M. Jaderberg, A. Vedaldi, and A. Zisserman. Deep features for text spotting. In ECCV, pages 512–528, 2014. [17] C. V. Jawahar, K. Alahari, and A. Mishra. Top-down and bottom-up cues for scene text recognition. In CVPR, pages 2687–2694, 2014. [18] H. E. Jones, K. L. Grieve, W. Wang, and A. M. Sillito. Surround suppression in primate V1. Journal of Neurophysiology, 86(4):2011, 2001. [19] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. [20] C. Y. Lee, A. Bhardwaj, W. Di, V. Jagadeesh, and R. Piramuthu. Region-based discriminative feature pooling for scene text recognition. In CVPR, pages 4050–4057, 2014. 9 [21] C. Y. Lee and S. Osindero. Recursive recurrent nets with attention modeling for ocr in the wild. In CVPR, pages 2231–2239, 2016. [22] M. Liang and X. Hu. Recurrent convolutional neural network for object recognition. In CVPR, pages 3367–3375, 2015. [23] M. Liang, X. Hu, and Zhang B. Convolutional neural networks with intra-layer recurrent connections for scene labeling. In NIPS, 2015. [24] S. M. Lucas, A. Panaretos, L. Sosa, A. Tang, S. Wong, and R. Young. Icdar 2003 robust reading competitions. In International Conference on Document Analysis and Recognition, page 682, 2003. [25] A. Mishra, K. Alahari, and C. V. Jawahar. Scene text recognition using higher order language priors. In BMVC, 2013. [26] L. Neumann and J. Matas. Real-time scene text localization and recognition. In CVPR, pages 3538–3545, 2012. [27] T. Novikova, O. Barinova, V. Lempitsky, and V. Lempitsky. Large-lexicon attribute-consistent text recognition in natural images. In ECCV, pages 752–765, 2012. [28] J. A. Rodriguez-Serrano, A. Gordo, and F. Perronnin. Label embedding: A frugal baseline for text recognition. International Journal of Computer Vision, 113(3):193–207, 2015. [29] M. Schuster and K. K. Paliwal. Bidirectional recurrent neural networks. IEEE Press, 1997. [30] B. Shi, X. Bai, and C. Yao. An end-to-end trainable neural network for image-based sequence recognition and its application to scene text recognition. IEEE Transactions on Pattern Analysis & Machine Intelligence, 39(11):2298–2304, 2017. [31] C. Shi, C. Wang, B. Xiao, Y. Zhang, S. Gao, and Z. Zhang. Scene text recognition using part-based tree-structured character detection. In CVPR, pages 2961–2968, 2013. [32] R. Socher, C. D. Manning, and A. Y. Ng. Learning continuous phrase representations and syntactic parsing with recursive neural networks. In NIPS, 2010. [33] B. Su and S. Lu. Accurate scene text recognition based on recurrent neural network. In ACCV, pages 35–48, 2014. [34] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, pages 1–9, 2014. [35] J. Wang, W. Wang, X. Chen, R. Wang, and W. Gao. Deep alternative neural network: Exploring contexts as early as possible for action recognition. In NIPS, 2016. [36] K. Wang, B. Babenko, and S. Belongie. End-to-end scene text recognition. In ICCV, pages 1457–1464, 2012. [37] K. Wang and S. Belongie. Word spotting in the wild. In ECCV, pages 591–604, 2010. [38] T. Wang, D. J. Wu, A. Coates, and A. Y. Ng. End-to-end text recognition with convolutional neural networks. In International Conference on Pattern Recognition, pages 3304–3308, 2013. [39] S. Xie, R. Girshick, P. Dollár, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. CVPR, 2017. [40] C. Yao, X. Bai, B. Shi, and W. Liu. Strokelets: A learned multi-scale representation for scene text recognition. In CVPR, pages 4042–4049, 2014. [41] M. D. Zeiler. Adadelta: An adaptive learning rate method. Computer Science, 2012. [42] M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014. [43] Y. Zhao, X. Jin, and X. Hu. Recurrent convolutional neural network for speech processing. In IEEE International Conference on Acoustics, Speech and Signal Processing, 2017. 10 | 2017 | 501 |
7,010 | Multi-view Matrix Factorization for Linear Dynamical System Estimation Mahdi Karami, Martha White, Dale Schuurmans, Csaba Szepesvári Department of Computer Science University of Alberta Edmonton, AB, Canada {karami1, whitem, daes, szepesva}@ualberta.ca Abstract We consider maximum likelihood estimation of linear dynamical systems with generalized-linear observation models. Maximum likelihood is typically considered to be hard in this setting since latent states and transition parameters must be inferred jointly. Given that expectation-maximization does not scale and is prone to local minima, moment-matching approaches from the subspace identification literature have become standard, despite known statistical efficiency issues. In this paper, we instead reconsider likelihood maximization and develop an optimization based strategy for recovering the latent states and transition parameters. Key to the approach is a two-view reformulation of maximum likelihood estimation for linear dynamical systems that enables the use of global optimization algorithms for matrix factorization. We show that the proposed estimation strategy outperforms widely-used identification algorithms such as subspace identification methods, both in terms of accuracy and runtime. 1 Introduction Linear dynamical systems (LDS) provide a fundamental model for estimation and forecasting in discrete-time multi-variate time series. In an LDS, each observation is associated with a latent state; these unobserved states evolve as a Gauss-Markov process where each state is a linear function of the previous state plus noise. Such a model of a partially observed dynamical system has been widely adopted, particularly due to its efficiency for prediction of future observations using Kalman filtering. Estimating the parameters of an LDS—sometimes referred to as system identification—is a difficult problem, particularly if the goal is to obtain the maximum likelihood estimate of parameters. Consequently, spectral methods from the subspace identification literature, based on moment-matching rather than maximum likelihood, have become popular. These methods provide closed form solutions, often involving a singular value decomposition of a matrix constructed from the empirical moments of observations (Moonen and Ramos, 1993; Van Overschee and De Moor, 1994; Viberg, 1995; Katayama, 2006; Song et al., 2010; Boots and Gordon, 2012). The most widely used such algorithms for parameter estimation in LDSs are the family of N4SID algorithms (Van Overschee and De Moor, 1994), which are computationally efficient and asymptotically consistent (Andersson, 2009; Hsu et al., 2012). Recent evidence, however, suggests that these moment-matching approaches may suffer from weak statistical efficiency, performing particularly poorly with small sample sizes (Foster et al., 2012; Zhao and Poupart, 2014). Maximum likelihood for LDS estimation, on the other hand, has several advantages. For example, it is asymptotically efficient under general conditions (Cramér, 1946, Ch.33), and this property often translates to near-minimax finite-sample performance. Further, maximum likelihood is amenable to coping with missing data. Another benefit is that, since the likelihood for exponential families 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. and corresponding convex losses (Bregman divergences) are well understood (Banerjee et al., 2005), maximum likelihood approaches can generalize to a broad range of distributions over the observations. Similarly, other common machine learning techniques, such as regularization, can be naturally incorporated in a maximum likelihood framework, interpretable as maximum a posteriori estimation. Unfortunately, unlike spectral methods, there is no known efficient algorithm for recovering parameters that maximize the marginal likelihood of observed data in an LDS. Standard iterative approaches are based on EM (Ghahramani and Hinton, 1996; Roweis and Ghahramani, 1999), which are computationally expensive and have been observed to produce locally optimal solutions that yield poor results (Katayama, 2006). A classical system identification method, called the prediction error method (PEM), is based on minimization of prediction error and can be interpreted as maximum likelihood estimation under certain distributional assumptions (e.g., Ch. 7.4 of Ljung 1999, Åström 1980). PEM, however, is prone to local minima and requires selection of a canonical parameterization, which can be difficult in practice and can result in ill-conditioned problems (Katayama, 2006). In this paper, we propose an alternative approach to LDS parameter estimation under exponential family observation noise. In particular, we reformulate the LDS as a two-view generative model, which allows us to approximate the estimation task as a form of matrix factorization, and apply recent global optimization techniques for such models (Zhang et al., 2012; Yu et al., 2014). To extend these previous algorithms to this setting, we provide a novel proximal update for the two-view approach that significantly simplifies the algorithm. Finally, for forecasting on synthetic and real data, we demonstrate that the proposed algorithm matches or outperforms N4SID, while scaling better with increasing sample size and data dimension. 2 Linear dynamical systems We address discrete-time, time-invariant linear dynamical systems, specified as φt+1 = Aφt + ⌘t xt = Cφt + ✏t (1) where φt 2 Rk is the hidden state at time t; xt 2 Rd is the observation vector at time t; A 2 Rk⇥k is the dynamics matrix; C 2 Rd⇥k is the observation matrix; ⌘is the state evolution noise; and ✏is the observation noise. The noise terms are assumed to be independent. As is common, we assume that the state evolution noise is Gaussian: ⌘⇠N(0, ⌃⌘). We additionally allow for general observation noise to be generated from an exponential family distribution (e.g., Poisson). The graphical representation for this LDS is shown in Figure 1. An LDS encodes the intuition that a latent state is driving the dynamics, which can significantly simplify estimation and forecasting. The observations typically contain only partial information about the environment (such as in the form of limited sensors), and further may contain noisy or even irrelevant observations. Learning transition models for such observations can be complex, particularly if the observations are high-dimensional. For example, in spatiotemporal processes, the data is typically extremely high-dimensional, composed of structured grid data; however, it is possible to extract a low-rank state-space that significantly simplifies analysis (Gelfand et al., 2010, Chapter 8). Further, for forecasting, iterating transitions for such a low-rank state-space can provide longer range predictions with less error accumulation than iterating with the observations themselves. The estimation problem for an LDS involves extracting the unknown parameters, given a time series of observations x1, . . . , xT . Unfortunately, jointly estimating the parameters A, C and φt is difficult because the multiplication of these variables typically results in a nonconvex optimization. Given the latent states φt, estimation of A and C is more straightforward, though there are still some issues with maintaining stability (Siddiqi et al., 2007). There are some recent advances improving estimation in time series models using matrix factorization. White et al. (2015) provide a convex formulation for auto-regressive moving average models—although related to state-space models, these do not permit a straightforward conversion between the parameters of one to the other. Yu et al. (2015) factorize the observation into a hidden state and dictionary, using a temporal regularizer on the extracted hidden state—the resulting algorithm, however, is not guaranteed to provide an optimal solution. 2 φ1 φ2 φ3 . . . x1 x2 x3 . . . C A E Figure 1: Graphical representation for the standard LDS formulation and the corresponding two-view model. The two-view formulation is obtained by a linear transformation of the LDS model. The LDS model includes only parameters C and A and the two-view model includes parameters C and E = CA, where A can be extracted from E after C and E are estimated. 3 Two-view Formulation of LDS In this section, we reformulate the LDS as a generative two-view model with a shared latent factor. In the following section, we demonstrate how to estimate the parameters of this reformulation optimally, from which parameter estimates of the original LDS can be recovered. To obtain a two-view formulation, we re-express the two equations for the LDS as two equations for pairs of sequential observations. To do so, we multiply the state evolution equation in (1) by C and add ✏t+1 to obtain Cφt+1 + ✏t+1 = CAφt + C⌘t + ✏t+1; representing the LDS model as xt+1 = Eφt + ✏0 t+1 xt = Cφt + ✏t (2) where we refer to E := CA as the factor loading matrix and ✏0 t+1 := C⌘t + ✏t+1 as the noise of the second view. We then have a two-view problem where we need to estimate parameters E and C. Since the noise components ✏t and ✏0 t are independent, the two views xt and xt+1 are conditionally independent given the shared latent state φt. The maximum log likelihood problem for the two-view formulation then becomes max C,E,Φ log p(x1, . . . , xT |φ0, φ1, . . . , φT , C, E) = max C,E,Φ T X t=1 log p(xt|φt−1, φt, C, E) (3) where, given the hidden states, the observations are conditionally independent. The log-likelihood (3) is equivalent to the original LDS, but is expressed in terms of the distribution p(xt|φt−1, φt, C, E), where the probability of an observation increases if it has high probability under both φt−1 and φt. The graphical depiction of the LDS and its implied two-view model is illustrated in Figure 1. 3.1 Relaxation To tackle the estimation problem, we reformulate the estimation problem for this equivalent two-view model of the LDS. Note that according to the two-view model (2), the conditional distribution (3) can be expressed as p(xt|φt−1, φt, C, E) = p(xt|Eφt−1) = p(xt|Cφt). Substituting each of these in the summation (3) would result in a factor loading model that ignores the temporal correlation among data; therefore, to take the system dynamics into account we choose a balanced averaging of both as log p(xt|φt−1, φt, C, E) = 1 2 log p(xt|Eφt−1) + 1 2 log p(xt|Cφt), where the likelihood of an observation increases if it has high conditional likelihood given both φt−1 and φt.1 With this choice and the exponential family specified by the log-normalizer (also called potential function) F : Rd ! R, with the corresponding Bregman divergence defined as DF (ˆzkz) := F(ˆz)−F(z)−f(z)>(ˆz−z) using transfer function f = rF,2 the log-likelihood separates into the two components argmax C,E,Φ T X t=1 log p(xt|φt−1, φt, C, E) = argmax C,E,Φ 1 2 T X t=1 log p(xt|Eφt−1) + log p(xt|Cφt) = argmin C,E,Φ T X t=1 DF (Eφt−1||f −1(xt)) + DF (Cφt||f −1(xt)) 1The balanced averaging can be generalized to a convex combination of the log-likelihood which adds a flexibility to the problem that can be tuned to improve performance. However, we found that the simple balanced combination renders the best experimental performance in most cases. 2 Consult Banerjee et al. (2005) for a complete overview of this correspondence. 3 Each Bregman divergence term can be interpreted as the fitness measure for each view. For example, a Gaussian distribution can be expressed by an exponential family defined by F(z) = 1 2kzk2 2. The above derivation could be extended to different variance terms for ✏and ✏0, which would result in different weights on the two Bregman divergences above. Further, we could also allow different exponential families (hence different Bregman divergences) for the two distributions; however, there is no clear reason why this would be beneficial over simply selecting the same exponential family, since both describe xt. In this work, therefore, we will explore a balanced loss, with the same exponential family for each view. In order to obtain a low rank solution, one can relax the hard rank constraint and employ the block norm kΦk2,1 = Pk j=1 kΦj:k2 as the rank-reducing regularizer on the latent state.3 This regularizer offers an adaptive rank reducing scheme that zeros out many of the rows of the latent states and hence results a low rank solution without knowing the rank a priori. For the reconstruction models C and E, we need to specify a prior that respects the conditional independence of the views xt and xt+1 given φt. This goal can be achieved if C and E are constrained individually so that they do not compete against each other to reconstruct their respective views (White et al., 2012). Incorporating the regularizer and constraints, the resulting optimization problem has the form argmin C,E,Φ T X t=1 L1(Eφt−1; xt) + L2(Cφt; xt) + λ k X j=1 kΦj:k2 (4) s.t.kC:jk2 γ1, kE:jk2 γ2 8j 2 (1, k). The above constrained optimization problem is convex in each of the factor loading matrices {C, E} and the state matrix Φ, but not jointly convex in terms of all these variables. Nevertheless, the following lemma show that (4) admits a convex reformulation by change of variable. Lemma 1 Let ˆZ(1) := CΦ and ˆZ(2) := EΦ with their concatenated matrix ˆZ := ˆZ(1) ˆZ(2) $ and Z(1) := [x1:T −1], Z(2) := [x2:T ]. In addition, let’s define I(1) := diag( 1 0 $ ), I(2) := diag( 0 1 $ ), then the multi-view optimization problem (4) can be reformulated in the following convex form min kC:jk2γ1 kE:jk2γ2 min Φ: " C E # Φ=ˆZ L1(CΦ; Z(1)) + L2(EΦ; Z(2)) + λkΦk2,1 = min ˆZ L1(ˆZ(1); Z(1)) + L2(ˆZ(2); Z(2)) + λ max 0⌘1 kU−1 ⌘ˆZktr where U⌘= γ1 p⌘I(1) + γ2 p1−⌘I(2) and Li(Y; ˆY) = PT t=1 Li(yt; ˆyt). Moreover, we can show that the regularizer term kU−1 ⌘ˆZktr is concave in ⌘. The trace norm induces a low rank result. Proof: The proof can be readily derived from the results of White et al. (2012). ⌅ In the next section, we demonstrate how to obtain globally optimal estimates of E, C and Φ. Remark 1: This maximum likelihood formulation demonstrates how the distributional assumptions on the observations xt can be generalized to any exponential family. Once expressed as the above optimization problem, one can further consider other losses and regularizers that may not immediately have a distributional interpretation, but result in improved prediction performance. This generalized formulation of maximum likelihood for LDS, therefore, has the additional benefit that it can flexibly incorporate optimization improvements, such as robust losses.4 Also a regularizer can be designed to control overfitting to noisy observation, which is an issue in LDS that can result in an unstable latent dynamics estimate (Buesing et al., 2012a). Therefore, by controlling undesired overfitting to noisy samples one can also prevent unintended unstable model identification. 3 Throughout this paper, Xi: (X:i) is used to denote the ith row (ith column) of matrix X and also [X; Y] ([x; y]) denotes the matrix (vector) concatenation operator which is equal to [X>, Y>]> ([x>, y>]>). 4Thus, we used L1 and L2 in (4) to generally refer to any loss function that is convex in its first argument. 4 Remark 2: We can generalize the optimization further to learn an LDS with exogenous input: a control vector ut 2 Rd that impacts both the hidden state and observations. This entails adding some new variables to the general LDS model that can be expressed as φt+1 = Aφt + But + ⌘t xt = Cφt + Dut + ✏t with additional matrices B 2 Rk⇥d and D 2 Rd⇥d. Again by multiplying the state evolution equation by matrix C the resulting equations are xt+1 = Eφt + Fut + Dut+1 + ✏0 t+1 xt = Cφt + Dut + ✏t where F := CB. Therefore, the loss can be generally expressed as L1(Eφt−1 + Fut−1 + Dut; xt) + L2(Cφt + Dut; xt). The optimization would now be over the variables C, E, Φ, D, F, where the optimization could additionally include regularizers on D and F to control overfitting. Importantly, the addition of these variables D, F does not modify the convexity properties of the loss, and the treatment for estimating E, C and Φ in section 4 directly applies. The optimization problem is jointly convex in D, F and any one of E, C or Φ and jointly convex in D and F. Therefore, an outer minimization over D and F can be added to Algorithm 1 and we will still obtain a globally optimal solution. 4 LDS Estimation Algorithm To learn the optimal parameters for the reformulated two-view model, we adopt the generalized conditional gradient (GCG) algorithm developed by Yu et al. (2014). GCG is designed for optimization problems of the form l(x)+f(x) where l(x) is convex and continuously differentiable with Lipschitz continuous gradient and f(x) is a (possibly non-differentiable) convex function. The algorithm is computationally efficient, as well providing a reasonably fast O(1/t) rate of convergence to the global minimizer. Though we have a nonconvex optimization problem, we can use the convex reformulation for two-view low-rank matrix factorization and resulting algorithm in (Yu et al., 2014, Section 4). This algorithm includes a generic local improvement step, which significantly accelerates the convergence of the algorithm to a global optimum in practice. We provide a novel local improvement update, which both speeds learning and enforces a sparser structure on Φ, while maintaining the same theoretical convergence properties of GCG. In our experiments, we specifically address the setting when the observations are assumed to be Gaussian, giving an `2 loss. We also prefer the unconstrained objective function that can be efficiently minimized by fast unconstrained optimization algorithms. Therefore, using the well-established equivalent form of the regularizer (Bach et al., 2008), the objective (4) can be equivalently cast for the Gaussian distributed time series xt as min C,E,Φ T X t=1 kEφt−1 −xtk2 2 + kCφt −xtk2 2 + λ k X j=1 kΦj:k2 max( 1 γ1 kC:jk2, 1 γ2 kE:jk2). (5) This product form of the regularizer is also preferred over the square form used in (Yu et al., 2014), since it induces row-wise sparsity on Φ. Though the square form kΦk2 F admits efficient optimizers due to its smoothness, it does not prefer to zero out rows of Φ while with the regularizer of the form (5), the learned hidden state will be appropriately projected down to a lower-dimensional space where many dimensions could be dropped from Φ, C and E giving a low rank solution. In practice, we found that enforcing this sparsity property on Φ significantly improved stability.5 Consequently, we need optimization routines that are appropriate for the non smooth regularizer terms. The local improvement step involves alternating block coordinate descent between C, E and Φ, with an accelerated proximal gradient algorithm (FISTA) (Beck and Teboulle, 2009) for each descent step. To use the FISTA algorithm we need to provide a proximal operator for the non-smooth regularizer in (5). 5This was likely due to a reduction in the size of the transition parameters, resulting in improved re-estimation of A and a corresponding reduction in error accumulation when using the model for forecasting. 5 Algorithm 1 LDS-DV Input: training sequence {xt, t 2 [1, T]} Output: C, A, φt, ⌃⌘, ⌃✏ Initialize C0, E0, Φ0 U1 [C> 0 ; E> 0 ]>, V1 Φ> 0 for i = 1, . . . do (ui, vi) arg minuv>2A ⌦ r`(Ui, Vi), uv>↵ // compute polar (⌘i, ✓i) arg min 0⌘1,✓≥0`((1 −⌘)UiV> i + ✓uiv> i ) + λ((1 −⌘)⇢i + ✓) // partially corrective update (PCU) Uinit [p1 −⌘iUi, p✓iui], Vinit [p1 −⌘iVi, p✓ivi] (Ui+1, Vi+1) FISTA(UinitVinit) ⇢i = 1 2 Pi+1 j=1(k(Ui+1):ik2 2v + k(Vi+1):ik2 2) end for (C; E) Ui+1, Φ V> i+1 A Φ2:T ⇤Φ† 1:T −1 estimate ⌃⌘, ⌃✏by sample covariances Let the proximal operator of a convex and possibly non-differentiable function λf(y) be defined as proxλf(x) = arg min y λf(y) + 1 2kx −yk2 2. FISTA is an accelerated version of ISTA (Iterative Shrinkage-Thresholding Algorithm) that iteratively performs a gradient descent update with the smooth component of the objective, and then applies the proximal operator as a projection step. Each iteration updates the variable x as xk+1 = proxλkf % xk −λkrl(xk) & , which converges to a fixed point. If there is no known form for the proximal operator, as is the case for our non-differentiable regularizer, a common strategy is to numerically calculate the proximal update. This approach, however, can be prohibitively expensive, and an analytic (closed) form is clearly preferable. We derive such a closed form for (5) in Theorem 1. Theorem 1 For a vector v = h v1 v2 i composed of two subvectors v1, v2, define f(v) = λkvk2v := λ max(kv1k2, kv2k2). The proximal operator for this function is proxf(v) = 8 > > > > < > > > > : " v1 max{1 − ↵ kv1k, 0} v2 max{1 −λ−↵ kv2k, 0} # if kv1k kv2k " v1 max{1 −λ−β kv1k, 0} v2 max{1 − β kv2k, 0} # if kv2k kv1k where ↵:= max{.5(kv1k −kv2k + λ), 0} and β := max{.5(kv2k −kv1k + λ), 0}. Proof: See Appendix A. ⌅ This result can be further generalized to enable additional regularization components on C and E, such as including an `1 norm on each column to further enforce sparsity (such as in the elastic net). There is no closed form for the proximal operator of the sum of two functions in general. We prove, however, that for special case of a linear combination of the two-view norm with any norms on the columns of C and E, the proximal mapping reduces to a simple composition rule. Theorem 2 For norms R1(v1) and R2(v2), the proximal operator of the linear combination Rc(v) = λkvk2v + ⌫1R1(v1) + ⌫2R2(v2) for ⌫1, ⌫2 ≥0 admits the simple composition proxRc(v) = proxλk.k2v ✓ prox⌫1R1(v1) prox⌫2R2(v2) $◆ . Proof: See Appendix A. ⌅ 4.1 Recovery of the LDS model parameters The above reformulation provides a tractable learning approach to obtain the optimal parameters for the two-view reformulation of LDS; given this optimal solution, we can then estimate the parameters 6 to the original LDS. The first step is to estimate the transition matrix A. A natural approach is to use (2), and set ˆA = ˆC † ˆE for pseudoinverse ˆC †. This ˆA, however, might be sensitive to inaccurate estimation of the (effective) hidden state dimension k. We found in practice that modifications from the optimal choice of k might result in unstable solutions and produce unreliable forecasts. Instead, a more stable ˆA can be learned from the hidden states themselves. This approach also focuses estimation of A on the forecasting task, which is our ultimate aim. Given the sequence of hidden states, φ1, . . . , φT , there are several strategies that could be used to estimate A, including simple autoregressive models to more sophisticated strategies (Siddiqi et al., 2007). We opt for a simple linear regression solution ˆA = arg minA PT −1 t=1 kφt+1 −Aφtk2 2 which we found produced stable ˆA. To estimate the noise parameters ⌃⌘, ⌃✏, recall ⌘t = φt+1 −ˆAφt, ✏t = xt −Cφt. Having obtained ˆA, therefore, we can estimate the noise covariance matrices by computing their sample covariances as ˆ⌃⌘= 1 T −1 PT t=1 ⌘t⌘> t , ˆ⌃✏= 1 T −1 PT t=1 ✏t✏> t . The final LDS learning procedure is outlined in Algorithm 1. For more details about polar computation and partially corrective subroutine see (Yu et al., 2014, Section 4). 5 Experimental results We evaluate the proposed algorithm by comparing one step prediction performance and computation speed with alternative methods for real and synthetic time series. We report the normalized mean square error (NMSE) defined as NMSE = PTtest t=1 kyt−ˆytk2 PTtest t=1 kyt−µyk2 where µy = 1 Ttest PTtest t=1 yt. Algorithms: We compared the proposed algorithm to a well-established method-of moment-based algorithm, N4SID (Van Overschee and De Moor, 1994), Hilbert space embeddings of hidden Markov models (HSE-HMM) (Song et al., 2010), expectation-maximization for estimating the parameters of a Kalman filter (EM) (Roweis and Ghahramani, 1999) and PEM (Ljung, 1999). These are standard baseline algorithms that are used regularly for LDS identification. The estimated parameters by N4SID were used as the initialization point for EM and PEM algorithms in our experiments. We used the built-in functions, n4sid and pem, in Matlab, with the order selected by the function, for the subspace identification method and PEM, respectively. For our algorithm, we select the regularization parameter λ using cross-validation. For the time series, the training data is split by performing the learning on first 80% of the training data and evaluating the prediction performance on the remaining 20%. Real datasets: For experiments on real datasets we select the climate time series from IRI data library that recorded the surface temperature on the monthly basis for tropical Atlantic ocean (ATL) and tropical Pacific ocean (CAC). In CAC we selected first 30 ⇥30 grids out of the total 84 ⇥30 locations with 399 monthly samples, while in ATL the first 9 ⇥9 grids out of the total 38 ⇥25 locations are selected each with timeseries of length 564. We partitioned each area to smaller areas of size 3 ⇥3 and arrange them to vectors of size 9, then seasonality component of the time series are removed and data is centered to have zero mean. We ran two experiments for each dataset. For the first, the whole sequence is sliced into 70% training and 30% test. For the second, a short training set of 70 samples is selected, with a test sequence of size 50. Synthetic datasets: In the synthetic experiments, the datasets are generated by an LDS model (1) of different system orders, k, and observation sizes, d. For each test case, 100 data sequences of length 200 samples are generated and sliced to 70%, 30% ratios for training set and test set, respectively. The dynamics matrix A is selected to produce a stable system: {|σi(A)| = s : s 1, 8i 2 (1, k)} where σi(A) is the ith eigen value of matrix A. The noise components are drawn from Gaussian distributions and scaled so that p⌘:= E{⌘>⌘}/m and p✏:= E{✏>✏}/n. Each test is repeated with the following settings: {S1: s = 0.970, p⌘= 0.50 and p✏= 0.1}, {S2: s = 0.999, p⌘= 0.01 and p✏= 0.1}. Results: The NMSE and run-time results obtained on real and synthetic datasets are shown in Table 1 and Table 2, respectively. In terms of NMSE, LDS-DV outperforms and matches the alternative methods. In terms of algorithm speed, the LDS-DV learns the model much faster than the competitors and scales well to larger dimension models. The speed improvement is more significant for larger datasets and observations with higher dimensions. 7 Table 1: Real time series ATL(Long) ATL(Short) CAC(Long) CAC(Short) NMSE Time NMSE Time NMSE Time NMSE Time LDS-MV 0.45±0.03 0.26 0.54±0.05 0.22 0.58±0.02 0.28 0.63±0.03 0.14 N4SID 0.52±0.04 2.34 0.59±0.05 0.95 0.61±0.02 1.23 0.84±0.07 1.08 EM 0.64±0.04 7.87 0.88±0.07 3.92 0.81±0.02 5.70 1.02±0.08 4.12 HSE-HMM 675.87±629.46 0.79 0.97±0.01 0.16 11.24±8.23 0.39 2.82±1.60 0.17 PEM-SSID 0.71±0.08 20.00 1.52±0.66 16.38 1.38±0.15 19.67 2.68±0.78 20.58 Table 2: Synthetic time series (S1) d=5 , k=3 (S2) d=5 , k=3 (S1) d=8 , k=6 (S2) d=8 , k=6 (S1) d=16 , k=9 (S2) d=16 , k=9 NMSE Time NMSE Time NMSE Time NMSE Time NMSE Time NMSE Time LDS-MV 0.12±0.01 0.49 0.17±0.02 0.36 0.08±0.00 0.66 0.04±0.00 0.52 0.07±0.00 1.01 0.03±0.00 1.72 N4SID 0.12±0.01 0.81 0.42±0.04 0.76 0.11±0.00 1.45 0.39±0.04 1.38 0.10±0.00 4.29 0.42±0.04 4.40 EM 0.18±0.01 4.99 0.15±0.02 4.62 0.14±0.01 6.01 0.04±0.00 5.03 0.13±0.00 19.21 0.03±0.00 19.83 HSE-HMM 2.4e+4±1.7e+4 0.48 2.2e+7±2.2e+7 0.50 7.8e+03±7.7e+03 0.49 0.65±0.02 0.55 22.92±21.83 0.53 0.71±0.01 0.61 PEM-SSID 0.14±0.01 10.72 0.25±0.03 9.08 0.12±0.01 15.22 0.08±0.01 13.97 0.09±0.01 38.39 0.06±0.02 41.10 Results for real and synthetic datasets are listed in Table 1 and Table 2, respectively. The first column of each dataset is the average normalized MSE with standard error and the second column is the algorithm runtime in CPU seconds. The best NMSE according to pairwise t-test with significance level of 5% is highlighted. 100 200 300 400 500 600 Training Sequence Length (T) 0.6 0.8 1 1.2 NMSE LDS-DV N4SID EM (a) NMSE 100 200 300 400 500 600 Training Sequence Length(T) 0 2 4 6 8 10 12 Seconds LDS-DV N4SID EM HSE-HMM (b) Runtime 0.5 1 1.5 2 2.5 3 3.5 Prediction MSE of n4SID 0.5 1 1.5 2 2.5 3 3.5 Prediction MSE of LDS-MV (c) Scatter plot of MSE Figure 2: a) NMSE of the LDS-DV for increasing length of training sequence. The difference between LDS-DV and N4SID is more significant in shorter training length, while both converge to the same accuracy in large T. HSE-HMM is omitted due to its high error. b) Runtime in CPU seconds for increasing length of training sequence. LDS-DV scales well with large sample length. c) MSE of the LDS-DV versus MSE of N4SID. In higher values of MSE, the points are below identity function line and LDS-DV is more likely to win. For test cases with |σi(A)| ' 1, designed to evaluate the prediction performance of the methods for marginally stable systems, LDS-DV still can learn a stable model while the other algorithms might not learn a stable model. The proposed LDS-DV method does not explicitly impose stability, but the regularization favors A that is stable. The regularizer on latent state encourages smooth dynamics and controls overfitting: overfitting to noisy observations can lead to unstable estimate of the model (Buesing et al., 2012a), and a smooth latent trajectory is a favorable property in most real-world applications. Figure 2(c) shows the MSE of LDS-DV versus N4SID, for all the CAC time-series. This figure illustrates that for easier problems, LDS-DV and N4SID are more comparable. However, as the difficulty increase, and MSE increases, LDS-DV begins to consistently outperform N4SID. Figures 2(a) and 2(b) illustrate the accuracy and runtime respectively of the algorithms versus training length. We used the synthetic LDS model under condition S1 with n = 8, m = 6. Values are averaged over 20 runs with a test length of 50 samples. LDS-DV has better early performance, for smaller sample sizes. At larger sample sizes, they reach approximately the same error level. 6 Conclusion In this paper, we provided an algorithm for optimal estimation of the parameters for a time-invariant, discrete-time linear dynamical system. More precisely, we provided a reformulation of the model as a two-view objective, which allowed recent advances for optimal estimation for two-view models to be applied. The resulting algorithm is simple to use and flexibly allows different losses and regularizers 8 to be incorporated. Despite this simplicity, significant improvements were observed over a widely accepted method for subspace identification (N4SID), both in terms of accuracy for forecasting and runtime. The focus in this work was on forecasting, therefore on optimal estimation of the hidden states and transition matrices; however, in some settings, estimation of noise parameters for LDS models is also desired. An unresolved issue is joint optimal estimation of these noise parameters. Though we do explicitly estimate the noise parameters, we do so only from the residuals after obtaining the optimal hidden states and transition and observation matrices. Moreover, consistency of the learned parameters by the proposed procedure of this paper is still an open problem and will be an interesting future work. The proposed optimization approach for LDSs should be useful for applications where alternative noise assumptions are desired. A Laplace assumption on the observations, for example, provides a more robust `1 loss. A Poisson distribution has been advocated for count data, such as for neural activity, where the time series is a vector of small integers (Buesing et al., 2012b). The proposed formulation of estimation for LDSs easily enables extension to such distributions. An important next step is to investigate the applicability to a wider range of time series data. Acknowledgments This work was supported in part by the Alberta Machine Intelligence Institute and NSERC. During this work, M. White was with the Department of Computer Science, Indiana University. References Andersson, S. (2009). Subspace estimation and prediction methods for hidden Markov models. The Annals of Statistics. Åström, K. (1980). Maximum likelihood and prediction error methods. Automatica, 16(5):551–574. Bach, F., Mairal, J., and Ponce, J. (2008). Convex sparse matrix factorizations. arXiv:0812.1869v1. Banerjee, A., Merugu, S., Dhillon, I., and Ghosh, J. (2005). Clustering with Bregman divergences. Journal of Machine Learning Research. Beck, A. and Teboulle, M. (2009). A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems. SIAM Journal on Imaging Sciences, 2. Boots, B. and Gordon, G. (2012). Two-manifold problems with applications to nonlinear system identification. In International Conference on Machine Learning. Boyd, S. and Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press. Buesing, L., Macke, J., and Sahani, M. (2012a). Learning stable, regularised latent models of neural population dynamics. Network: Computation in Neural Systems. Buesing, L., Macke, J., and Sahani, M. (2012b). Spectral learning of linear dynamics from generalisedlinear observations with application to neural population data. In Advances in Neural Information Processing Systems. Cramér, H. (1946). Mathematical Methods of Statistics. Princeton University Press. Foster, D., Rodu, J., and Ungar, L. (2012). Spectral dimensionality reduction for HMMs. arXiv:1203.6130v1. Gelfand, A., Diggle, P., Guttorp, P., and Fuentes, M. (2010). Handbook of Spatial Statistics. CRC Press. Ghahramani, Z. and Hinton, G. (1996). Parameter estimation for linear dynamical systems. Technical report. Haeffele, B., Young, E., and Vidal, R. (2014). Structured Low-Rank Matrix Factorization: Optimality, Algorithm, and Applications to Image Processing. In International Conference on Machine Learning. 9 Hsu, D., Kakade, S., and Zhang, T. (2012). A spectral algorithm for learning Hidden Markov Models. Journal of Computer and System Sciences. Katayama, T. (2006). Subspace Methods for System Identification. Springer. Ljung, L. (1999). System Identification (2Nd Ed.): Theory for the User. Prentice Hall PTR. Macke, J., Buesing, L., and Sahani, M. (2015). Estimating State and Model Parameters in State-Space Models of Spike Trains. Advanced State Space Methods for Neural and Clinical Data. Moonen, M. and Ramos, J. (1993). A subspace algorithm for balanced state space system identification. IEEE Transactions on Automatic Control. Parikh, N. and Boyd, S. (2013). Proximal Algorithms. Foundations and Trends in Optimization. Now Publishers. Roweis, S. and Ghahramani, Z. (1999). A unifying review of linear Gaussian models. Neural Computation. Siddiqi, S., Boots, B., and Gordon, G. (2007). A Constraint Generation Approach to Learning Stable Linear Dynamical Systems. In Advances in Neural Information Processing Systems. Song, L., Boots, B., Siddiqi, S., Gordon, G., and Smola, A. (2010). Hilbert space embeddings of hidden Markov models. In International Conference on Machine Learning. Van Overschee, P. and De Moor, B. (1994). N4SID: Subspace algorithms for the identification of combined deterministic-stochastic systems. Automatica. Viberg, M. (1995). Subspace-based methods for the identification of linear time-invariant systems. Automatica. White, M., Wen, J., Bowling, M., and Schuurmans, D. (2015). Optimal estimation of multivariate ARMA models. In AAAI Conference on Artificial Intelligence. White, M., Yu, Y., Zhang, X., and Schuurmans, D. (2012). Convex multi-view subspace learning. In Advances in Neural Information Processing Systems. Yu, H., Rao, N., and Dhillon, I. (2015). High-dimensional Time Series Prediction with Missing Values. arXiv:1509.08333. Yu, Y., Zhang, X., and Schuurmans, D. (2014). Generalized Conditional Gradient for Sparse Estimation. arXiv:1410.4828. Zhang, X., Yu, Y., and Schuurmans, D. (2012). Accelerated training for matrix-norm regularization: A boosting approach. In Advances in Neural Information Processing Systems. Zhao, H. and Poupart, P. (2014). A sober look at spectral learning. arXiv:1406.4631. 10 | 2017 | 502 |
7,011 | Policy Gradient With Value Function Approximation For Collective Multiagent Planning Duc Thien Nguyen Akshat Kumar Hoong Chuin Lau School of Information Systems Singapore Management University 80 Stamford Road, Singapore 178902 {dtnguyen.2014,akshatkumar,hclau}@smu.edu.sg Abstract Decentralized (PO)MDPs provide an expressive framework for sequential decision making in a multiagent system. Given their computational complexity, recent research has focused on tractable yet practical subclasses of Dec-POMDPs. We address such a subclass called CDec-POMDP where the collective behavior of a population of agents affects the joint-reward and environment dynamics. Our main contribution is an actor-critic (AC) reinforcement learning method for optimizing CDec-POMDP policies. Vanilla AC has slow convergence for larger problems. To address this, we show how a particular decomposition of the approximate action-value function over agents leads to effective updates, and also derive a new way to train the critic based on local reward signals. Comparisons on a synthetic benchmark and a real world taxi fleet optimization problem show that our new AC approach provides better quality solutions than previous best approaches. 1 Introduction Decentralized partially observable MDPs (Dec-POMDPs) have emerged in recent years as a promising framework for multiagent collaborative sequential decision making (Bernstein et al., 2002). Dec-POMDPs model settings where agents act based on different partial observations about the environment and each other to maximize a global objective. Applications of Dec-POMDPs include coordinating planetary rovers (Becker et al., 2004b), multi-robot coordination (Amato et al., 2015) and throughput optimization in wireless network (Winstein and Balakrishnan, 2013; Pajarinen et al., 2014). However, solving Dec-POMDPs is computationally challenging, being NEXP-Hard even for 2-agent problems (Bernstein et al., 2002). To increase scalability and application to practical problems, past research has explored restricted interactions among agents such as state transition and observation independence (Nair et al., 2005; Kumar et al., 2011, 2015), event driven interactions (Becker et al., 2004a) and weak coupling among agents (Witwicki and Durfee, 2010). Recently, a number of works have focused on settings where agent identities do not affect interactions among agents. Instead, environment dynamics are primarily driven by the collective influence of agents (Varakantham et al., 2014; Sonu et al., 2015; Robbel et al., 2016; Nguyen et al., 2017), similar to well known congestion games (Meyers and Schulz, 2012). Several problems in urban transportation such as taxi supply-demand matching can be modeled using such collective planning models (Varakantham et al., 2012; Nguyen et al., 2017). In this work, we focus on the collective Dec-POMDP framework (CDec-POMDP) that formalizes such a collective multiagent sequential decision making problem under uncertainty (Nguyen et al., 2017). Nguyen et al. present a sampling based approach to optimize policies in the CDec-POMDP model. A key drawback of this previous approach is that policies are represented in a tabular form which scales poorly with the size of observation space of agents. Motivated by the recent suc31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. cess of reinforcement learning (RL) approaches (Mnih et al., 2015; Schulman et al., 2015; Mnih et al., 2016; Foerster et al., 2016; Leibo et al., 2017), our main contribution is a actor-critic (AC) reinforcement learning method (Konda and Tsitsiklis, 2003) for optimizing CDec-POMDP policies. m = 1 : M om 1 om 1 sm 1 sm 2 am 2 am 1 sm T am T nsT ns2 ns1 rm T om 2 Figure 1: T-step DBN for a CDec-POMDP Policies are represented using function approximator such as a neural network, thereby avoiding the scalability issues of a tabular policy. We derive the policy gradient and develop a factored actionvalue approximator based on collective agent interactions in CDec-POMDPs. Vanilla AC is slow to converge on large problems due to known issues of learning with global reward in large multiagent systems (Bagnell and Ng, 2005). To address this, we also develop a new way to train the critic, our action-value approximator, that effectively utilizes local value function of agents. We test our approach on a synthetic multirobot grid navigation domain from (Nguyen et al., 2017), and a real world supply-demand taxi matching problem in a large Asian city with up to 8000 taxis (or agents) showing the scalability of our approach to large multiagent systems. Empirically, our new factored actor-critic approach works better than previous best approaches providing much higher solution quality. The factored AC algorithm empirically converges much faster than the vanilla AC validating the effectiveness of our new training approach for the critic. Related work: Our work is based on the framework of policy gradient with approximate value function similar to Sutton et al. (1999). However, as we empirically show, directly applying the original policy gradient from Sutton et al. (1999) into the multi-agent setting and specifically for the CDec-POMDP model results in a high variance solution. In this work, we show a suitable form of compatible value function approximation for CDec-POMDPs that results in an efficient and low variance policy gradient update. Reinforcement learning for decentralized policies has been studied earlier in Peshkin et al. (2000), Aberdeen (2006). Guestrin et al. (2002) also proposed using REINFORCE to train a softmax policy of a factored value function from the coordination graph. However in such previous works, policy gradient is estimated from the global empirical returns instead of a decomposed critic. We show in section 4 that having a decomposed critic along with an individual value function based training of this critic is important for sample-efficient learning. Our empirical results show that our proposed critic training has faster convergence than training with global empirical returns. 2 Collective Decentralized POMDP Model We first describe the CDec-POMDP model introduced in (Nguyen et al., 2017). A T-step Dynamic Bayesian Network (DBN) for this model is shown using the plate notation in figure 1. It consists of the following: • A finite planning horizon H. • The number of agents M. An agent m can be in one of the states in the state space S. The joint state space is ×M m=1S. We denote a single state as i ∈S. • A set of action A for each agent m. We denote an individual action as j ∈A. • Let (s1:H, a1:H)m =(sm 1 , am 1 , sm 2 . . . , sm H, am H) denote the complete state-action trajectory of an agent m. We denote the state and action of agent m at time t using random variables sm t , am t . Different indicator functions It(·) are defined in table 1. We define the following count given the trajectory of each agent m ∈M: nt(i, j, i′)= M X m=1 Im t (i, j, i′) ∀i, i′∈S, j∈A As noted in table 1, count nt(i, j, i′) denotes the number of agents in state i taking action j at time step t and transitioning to next state i′; other counts, nt(i) and nt(i, j), are defined analogously. Using these counts, we can define the count tables nst and nstat for the time step t as shown in table 1. 2 Im t (i)∈{0, 1} if agent m is at state i at time t or sm t = i Im t (i, j)∈{0, 1} if agent m takes action j in state i at time t or (sm t , am t ) = (i, j) Im t (i, j, i′)∈{0, 1} if agent m takes action j in state i at time t and transitions to state i′ or (sm t , am t , sm t+1) = (i, j, i′) nt(i)∈[0; M] Number of agents at state i at time t nt(i, j)∈[0; M] Number of agents at state i taking action j at time t nt(i, j, i′)∈[0; M] Number of agents at state i taking action j at time t and transitioning to state i′ at time t + 1 nst Count table (nt(i) ∀i∈S) nstat Count table (nt(i, j) ∀i∈S, j ∈A) nstatst+1 Count table (nt(i, j, i′) ∀i, i′ ∈S, j ∈A) Table 1: Summary of notations given the state-action trajectories, (s1:H, a1:H)m ∀m, for all the agents • We assume a general partially observable setting wherein agents can have different observations based on the collective influence of other agents. An agent observes its local state sm t . In addition, it also observes om t at time t based on its local state sm t and the count table nst. E.g., an agent m in state i at time t can observe the count of other agents also in state i (=nt(i)) or other agents in some neighborhood of the state i (={nt(j) ∀j ∈Nb(i)}). • The transition function is φt sm t+1 =i′|sm t =i, am t =j, nst . The transition function is the same for all the agents. Notice that it is affected by nst, which depends on the collective behavior of the agent population. • Each agent m has a non-stationary policy πm t (j|i, om t (i, nst)) denoting the probability of agent m to take action j given its observation (i, om t (i, nst)) at time t. We denote the policy over the planning horizon of an agent m to be πm = (πm 1 , . . . , πm H). • An agent m receives the reward rm t = rt(i, j, nst) dependent on its local state and action, and the counts nst. • Initial state distribution, bo = (P(i)∀i ∈S), is the same for all agents. We present here the simplest version where all the agents are of the same type having similar state transition, observation and reward models. The model can handle multiple agent types where agents have different dynamics based on their type. We can also incorporate an external state that is unaffected by agents’ actions (such as taxi demand in transportation domain). Our results are extendible to address such settings also. Models such as CDec-POMDPs are useful in settings where agent population is large, and agent identity does not affect the reward or the transition function. A motivating application of this model is for the taxi-fleet optimization where the problem is to compute policies for taxis such that the total profit of the fleet is maximized (Varakantham et al., 2012; Nguyen et al., 2017). The decision making for a taxi is as follows. At time t, each taxi observes its current city zone z (different zones constitute the state-space S), and also the count of other taxis in the current zone and its neighboring zones as well as an estimate of the current local demand. This constitutes the count-based observation o(·) for the taxi. Based on this observation, the taxi must decide whether to stay in the current zone z to look for passengers or move to another zone. These decision choices depend on several factors such as the ratio of demand and the count of other taxis in the current zone. Similarly, the environment is stochastic with variable taxi demand at different times. Such historical demand data is often available using GPS traces of the taxi fleet (Varakantham et al., 2012). Count-Based statistic for planning: A key property in the CDec-POMDP model is that the model dynamics depend on the collective interaction among agents rather than agent identities. In settings such as taxi fleet optimization, the agent population size can be quite large (≈8000 for our real world experiments). Given such a large population, it is not possible to compute unique policy for each agent. Therefore, similar to previous work (Varakantham et al., 2012; Nguyen et al., 2017), our goal is to compute a homogenous policy π for all the agents. As the policy π is dependent on counts, it represents an expressive class of policies. For a fixed population M, let {(s1:T , a1:T )m ∀m} denote the state-action trajectories of different agents sampled from the DBN in figure 1. Let n1:T ={(nst, nstat, nstatst+1) ∀t = 1 : T} be the combined vector of the resulting count tables for each time step t. Nguyen et al. show that counts n are the sufficient statistic for planning. That is, the joint-value function of a policy π over horizon 3 H can be computed by the expectation over counts as (Nguyen et al., 2017): V (π) = M X m=1 H X T =1 E[rm T ] = X n∈Ω1:H P(n; π) H X T =1 X i∈S,j∈A nT (i, j)rT i, j, nT (1) Set Ω1:H is the set of all allowed consistent count tables as: X i∈S nT (i)=M ∀T ; X j∈A nT (i, j)=nT (i) ∀j∀T ; X i′∈S nT (i, j, i′)=nT (i, j) ∀i ∈S, j ∈A, ∀T P(n; π) is the distribution over counts (detailed expression in appendix). A key benefit of this result is that we can evaluate the policy π by sampling counts n directly from P(n) without sampling individual agent trajectories (s1:H, a1:H)m for different agents, resulting in significant computational savings. Our goal is to compute the optimal policy π that maximizes V (π). We assume a RL setting with centralized learning and decentralized execution. We assume a simulator is available that can provide count samples from P(n; π). 3 Policy Gradient for CDec-POMDPs Previous work proposed an expectation-maximization (EM) (Dempster et al., 1977) based sampling approach to optimize the policy π (Nguyen et al., 2017). The policy is represented as a piecewise linear tabular policy over the space of counts n where each linear piece specifies a distribution over next actions. However, this tabular representation is limited in its expressive power as the number of pieces is fixed apriori, and the range of each piece has to be defined manually which can adversely affect performance. Furthermore, exponentially many pieces are required when the observation o is multidimensional (i.e., an agent observes counts from some local neighborhood of its location). To address such issues, our goal is to optimize policies in a functional form such as a neural network. We first extend the policy gradient theorem of (Sutton et al., 1999) to CDec-POMDPs. Let θ denote the vector of policy parameters. We next show how to compute ∇θV (π). Let st, at denote the joint-state and joint-actions of all the agents at time t. The value function of a given policy π in an expanded form is given as: Vt(π) = X st,at P π(st, at|bo, π)Qπ t (st, at) (2) where P π(st, at|bo) = P s1:t−1,a1:t−1 P π(s1:t, a1:t|bo) is the distribution of the joint state-action st, at under the policy π. The value function Qπ t (st, at) is computed as: Qπ t (st, at) = rt(st, at) + X st+1,at+1 P π(st+1, at+1|st, at)Qπ t+1(st+1, at+1) (3) We next state the policy gradient theorem for CDec-POMDPs: Theorem 1. For any CDec-POMDP, the policy gradient is given as: ∇θV1(π) = H X t=1 Est,at|bo,π Qπ t (st, at) X i∈S,j∈A nt(i, j)∇θ log πt j|i, o(i, nst) (4) The proofs of this theorem and other subsequent results are provided in the appendix. Notice that computing the policy gradient using the above result is not practical for multiple reasons. The space of join-state action (st, at) is combinatorial. Given that the agent population size can be large, sampling each agent’s trajectory is not computationally tractable. To remedy this, we later show how to compute the gradient by directly sampling counts n∼P(n; π) similar to policy evaluation in (1). Similarly, one can estimate the action-value function Qπ t (st, at) using empirical returns as an approximation. This would be the analogue of the standard REINFORCE algorithm (Williams, 1992) for CDec-POMDPs. It is well known that REINFORCE may learn slowly than other methods that use a learned action-value function (Sutton et al., 1999). Therefore, we next present a function approximator for Qπ t , and show the computation of policy gradient by directly sampling counts n. 4 3.1 Policy Gradient with Action-Value Approximation One can approximate the action-value function Qπ t (st, at) in several different ways. We consider the following special form of the approximate value function fw: Qπ t (st, at) ≈fw(st, at) = M X m=1 f m w sm t , o(sm t , nst), am t (5) where each f m w is defined for each agent m and takes as input the agent’s local state, action and the observation. Notice that different components f m w are correlated as they depend on the common count table nst. Such a decomposable form is useful as it leads to efficient policy gradient computation. Furthermore, an important class of approximate value function having this form for CDec-POMDPs is the compatible value function (Sutton et al., 1999) which results in an unbiased policy gradient (details in appendix). Proposition 1. Compatible value function for CDec-POMDPs can be factorized as: fw(st, at) = X m f m w (sm t , o(sm t , nst), am) We can directly replace Qπ(·) in policy gradient (4) by the approximate action-value function fw. Empirically, we found that variance using this estimator was high. We exploit the structure of fw and show further factorization of the policy gradient next which works much better empirically. Theorem 2. For any value function having the decomposition as: fw(st, at) = X m f m w sm t , o(sm t , nst), am t , (6) the policy gradient can be computed as ∇θV1(π) = H X t=1 Est,at h X m ∇θ log π am t |sm t , o(sm t , nst) f m w sm t , o(sm t , nst), am t i (7) The above result shows that if the approximate value function is factored, then the resulting policy gradient also becomes factored. The above result also applies to agents with multiple types as we assumed the function f m w is different for each agent. In the simpler case when all the agents are of same type, then we have the same function fw for each agent, and also deduce the following: fw(st, at) = X i,j nt(i, j)fw i, j, o(i, nst) (8) Using the above result, we simplify the policy gradient as: ∇θV1(π) = X t Est,at h X i,j nt(i, j)∇θ log π j|i, o(i, nst) fw(i, j, o(i, nst)) i (9) 3.2 Count-based Policy Gradient Computation Notice that in (9), the expectation is still w.r.t. joint-states and actions (st, at) which is not efficient in large population sizes. To address this issue, we exploit the insight that the approximate value function in (8) and the inner expression in (9) depends only on the counts generated by the joint-state and action (st, at). Theorem 3. For any value function having the form: fw(st, at) = P i,j nt(i, j)fw i, j, o(i, nst) , the policy gradient can be computed as: En1:H∈Ω1:H H X t=1 X i∈S,j∈A nt(i, j)∇θ log π j|i, o(i, nt) fw(i, j, o(i, nt)) (10) The above result shows that the policy gradient can be computed by sampling count table vectors n1:H from the underlying distribution P(·) analogous to computing the value function of the policy in (1), which is tractable even for large population sizes. 5 4 Training Action-Value Function In our approach, after count samples n1:H are generated to compute the policy gradient, we also need to adjust the parameters w of our critic fw. Notice that as per (8), the action value function fw(st, at) depends only on the counts generated by the joint-state and action (st, at). Training fw can be done by taking a gradient step to minimize the following loss function: min w K X ξ=1 H X t=1 fw(nξ t) −Rξ t 2 (11) where nξ 1:H is a count sample generated from the distribution P(n; π); fw(nξ t) is the action value function and Rξ t is the total empirical return for time step t computed using (1): fw(nξ t)= X i,j nξ t(i, j)fw(i, j, o(i, nξ t)); Rξ t = H X T =t X i∈S,j∈A nξ T (i, j)rT (i, j, nξ T ) (12) However, we found that the loss in (11) did not work well for training the critic fw for larger problems. Several count samples were required to reliably train fw which adversely affects scalability for large problems with many agents. It is already known in multiagent RL that algorithms that solely rely on the global reward signal (e.g. Rξ t in our case) may require several more samples than approaches that take advantage of local reward signals (Bagnell and Ng, 2005). Motivated by this observation, we next develop a local reward signal based strategy to train the critic fw. Individual Value Function: Let nξ 1:H be a count sample. Given the count sample nξ 1:H, let V ξ t (i, j) = E[PH t′=t rm t′ |sm t = i, at m = j, nξ 1:H] denote the total expected reward obtained by an agent that is in state i and takes action j at time t. This individual value function can be computed using dynamic programming as shown in (Nguyen et al., 2017). Based on this value function, we next show an alternative reparameterization of the global empirical reward Rξ t in (12): Lemma 1. The empirical return Rξ t for the time step t given the count sample nξ 1:H can be reparameterized as: Rξ t = P i∈S,j∈A nξ t(i, j)V ξ t (i, j). Individual Value Function Based Loss: Given lemma 1, we next derive an upper bound on the on the true loss (11) which effectively utilizes individual value functions: X ξ X t fw(nξ) −Rξ t 2 = X ξ X t X i,j nξ t(i, j)fw(i, j, o(i, nξ t)) − X i,j nξ t(i, j)V ξ t (i, j) 2 = X ξ X t X i,j nξ t(i, j) fw(i, j, o(i, nξ t)) −V ξ t (i, j) 2 (13) ≤M X ξ X t,i,j nt(i, j) fw(i, j, o(i, nξ t)) −V ξ t (i, j) 2 (14) where the last relation is derived by Cauchy-Schwarz inequality. We train the critic using the modified loss function in (14). Empirically, we observed that for larger problems, this new loss function in (14) resulted in much faster convergence than the original loss function in (13). Intuitively, this is because the new loss (14) tries to adjust each critic component fw(i, j, o(i, nξ t)) closer to its counterpart empirical return V ξ t (i, j). However, in the original loss function (13), the focus is on minimizing the global loss, rather than adjusting each individual critic factor fw(·) towards the corresponding empirical return. Algorithm 1 shows the outline of our AC approach for CDec-POMDPs. Lines 7 and 8 show two different options to train the critic. Line 7 represents critic update based on local value functions, also referred to as factored critic update (fC). Line 8 shows update based on global reward or global critic update (C). Line 10 shows the policy gradient computed using theorem 2 (fA). Line 11 shows how the gradient is computed by directly using fw from eq. (5) in eq. 4. 6 Algorithm 1: Actor-Critic RL for CDec-POMDPs 1 Initialize network parameter θ for actor π and and w for critic fw 2 α ←actor learning rate 3 β ←critic learning rate 4 repeat 5 Sample count vectors nξ 1:H ∼P(n1:H; π) ∀ξ = 1 to K 6 Update critic as: 7 fC : w = w −β 1 K ∇w h P ξ P t,i,j nξ t(i, j) fw(i, j, o(i, nξ t)) −V ξ t (i, j) 2i 8 C : w = w −β 1 K ∇w h P ξ P t P i,j nξ t(i, j)fw(i, j, o(i, nξ t)) −P i,j nξ t(i, j)V ξ t (i, j) 2i 9 Update actor as: 10 fA : θ = θ + α 1 K ∇θ P ξ P t h P i,j nξ t(i, j) log π j|i, o(i, nξ t) fw(i, j, o(nξ t, i)) i 11 A : θ = θ + α 1 K ∇θ P ξ P t h P i,j nξ t(i, j) log π j|i, o(i, nξ t) ih P i,j nξ t(i, j)fw(i, j, o(nξ t, i)) i 12 until convergence 13 return θ, w 5 Experiments This section compares the performance of our AC approach with two other approaches for solving CDec-POMDPs—Soft-Max based flow update (SMFU) (Varakantham et al., 2012), and the Expectation-Maximization (EM) approach (Nguyen et al., 2017). SMFU can only optimize policies where an agent’s action only depends on its local state, π(am t |sm t ), as it approximates the effect of counts n by computing the single most likely count vector during the planning phase. The EM approach can optimize count-based piecewise linear policies where πt(am t |sm t , ·) is a piecewise function over the space of all possible count observations ot. Algorithm 1 shows two ways of updating the critic (in lines 7, 8) and two ways of updating the actor (in lines 10, 11) leading to 4 possible settings for our actor-critic approach—fAfC, AC, AfC, fAC. We also investigate the properties of these different actor-critic approaches. The neural network structure and other experimental settings are provided in the appendix. For fair comparisons with previous approaches, we use three different models for counts-based observation ot. In ‘o0’ setting, policies depend only on agent’s local state sm t and not on counts. In ‘o1’ setting, policies depend on the local state sm t and the single count observation nt(sm t ). That is, the agent can only observe the count of other agents in its current state sm t . In ‘oN’ setting, the agent observes its local state sm t and also the count of other agents from a local neighborhood (defined later) of the state sm t . The ‘oN’ observation model provides the most information to an agent. However, it is also much more difficult to optimize as policies have more parameters. The SMFU only works with ‘o0’ setting; EM and our actor-critic approach work for all the settings. Taxi Supply-Demand Matching: We test our approach on this real-world domain described in section 2, and introduced in (Varakantham et al., 2012). In this problem, the goal is to compute taxi policies for optimizing the total revenue of the fleet. The data contains GPS traces of taxi movement in a large Asian city over 1 year. We use the observed demand information extracted from this dataset. On an average, there are around 8000 taxis per day (data is not exhaustive over all taxi operators). The city is divided into 81 zones and the plan horizon is 48 half hour intervals over 24 hours. For details about the environment dynamics, we refer to (Varakantham et al., 2012). Figure 2(a) shows the quality comparisons among different approaches with different observation models (‘o0’, ‘o1’ and ‘oN’). We test with total number of taxis as 4000 and 8000 to see if taxi population size affects the relative performance of different approaches. The y-axis shows the average per day profit for the entire fleet. For the ‘o0’ case, all approaches (fAfC-‘o0’, SMFU, EM-‘o0’) give similar quality with fAfC-‘o0’ and EM-‘o0’ performing slightly better than SMFU for the 8000 taxis. For the ‘o1’ case, there is sharp improvement in quality by fAfC-‘o1’ over fAfC-‘o0’ confirming that taking count based observation into account results in better policies. Our approach fAfC-‘o1’ is also significantly better than the policies optimized by EM-‘o1’ for both 4000 and 8000 taxi setting. 7 4000 8000 Taxi Population 0 500000 1000000 1500000 2000000 2500000 Quality fAfC-o0 fAfC-o1 fAfC-oN SMFU EM-o0 EM-o1 (a) Solution quality with varying taxi population Grid Navigation −50 0 50 100 150 Quality fAfC-o0 fAfC-o1 fAfC-oN SMFU EM-o0 EM-o1 EM-oN (b) Solution quality in grid navigation problem Figure 2: Solution quality comparisons on the taxi problem and the grid navigation 0 5000 10000 15000 20000 Iteration 750000 500000 250000 0 250000 500000 750000 1000000 1250000 Quality fAfC AC fAC AfC 0 5000 10000 15000 20000 Iteration 500000 0 500000 1000000 Quality (a) AC convergence with ‘o0’ 0 5000 10000 15000 20000 Iteration 500000 0 500000 1000000 1500000 Quality (b) AC convergence with ‘o1’ 0 5000 10000 15000 20000 25000 Iteration 500000 1000000 1500000 2000000 Quality (c) AC convergence with ‘oN’ Figure 3: Convergence of different actor-critic variants on the taxi problem with 8000 taxis To further test the scalability and the ability to optimize complex policies by our approach in the ‘oN’ setting, we define the neighborhood of each state (which is a zone in the city) to be the set of its geographically connected zones based on the zonal decomposition shown in (Nguyen et al., 2017). On an average, there are about 8 neighboring zones for a given zone, resulting in 9 count based observations available to the agent for taking decisions. Each agent observes both the taxi count and the demand information from such neighboring zones. In figure 2(a), fAfC-‘oN’ result clearly shows that taking multiple observations into account significantly increases solution quality—fAfC‘oN’ provides an increase of 64% in quality over fAfC-‘o0’ and 20% over fAfC-‘o1’ for the 8000 taxi case. For EM-‘oN’, we used a bare minimum of 2 pieces per observation dimension (resulting in 29 pieces per time step). We observed that EM was unable to converge within 30K iterations and provided even worse quality than EM-‘o1’ at the end. These results show that despite the larger search space, our fAfC approach can effectively optimize complex policies whereas the tabular policy based EM approach was ineffective for this case. Figures 3(a-c) show the quality Vs. iterations for different variations of our actor critic approach— fAfC, AC, AfC, fAC—for the ‘o0’, ‘o1’ and the ‘oN’ observation model. These figures clearly show that using factored actor and the factored critic update in fAfC is the most reliable strategy over all the other variations and for all the observation models. Variations such as AC and fAC were not able to converge at all despite having exactly the same parameters as fAfC. These results validate different strategies that we have developed in our work to make vanilla AC converge faster for large problems. Robot navigation in a congested environment: We also tested on a synthetic benchmark introduced in (Nguyen et al., 2017). The goal is for a population of robots (= 20) to move from a set of initial locations to a goal state in a 5x5 grid. If there is congestion on an edge, then each agent attempting to cross the edge has higher chance of action failure. Similarly, agents also receive a negative reward if there is edge congestion. On successfully reaching the goal state, agents receive a positive reward and transition back to one of the initial state. We set the horizon to 100 steps. Figure 2(b) shows the solution quality comparisons among different approaches. In the ‘oN’ observation model, the agent observes its 4 immediate neighbor node’s count information. In this problem, SMFU performed worst, fAfC and EM both performed much better. As expected fAfC-‘oN’ 8 provides the best solution quality over all the other approaches. In this domain, EM is competitive with fAfC as for this relatively smaller problem with 25 agents, the space of counts is much smaller than in the taxi domain. Therefore, EM’s piecewise policy is able to provide a fine grained approximation over the count range. 6 Summary We addressed the problem of collective multiagent planning where the collective behavior of a population of agents affects the model dynamics. We developed a new actor-critic method for solving such collective planning problems within the CDec-POMDP framework. We derived several new results for CDec-POMDPs such as the policy gradient derivation, and the structure of the compatible value function. To overcome the slow convergence of the vanilla actor-critic method we developed multiple techniques based on value function factorization and training the critic using individual value function of agents. Using such techniques, our approach provided significantly better quality than previous approaches, and proved scalable and effective for optimizing policies in a real world taxi supply-demand problem and a synthetic grid navigation problem. 7 Acknowledgments This research project is supported by National Research Foundation Singapore under its Corp Lab @ University scheme and Fujitsu Limited. First author is also supported by A⋆STAR graduate scholarship. 9 References Aberdeen, D. (2006). Policy-gradient methods for planning. In Advances in Neural Information Processing Systems, pages 9–16. Amato, C., Konidaris, G., Cruz, G., Maynor, C. A., How, J. P., and Kaelbling, L. P. (2015). Planning for decentralized control of multiple robots under uncertainty. In IEEE International Conference on Robotics and Automation, ICRA, pages 1241–1248. Bagnell, J. A. and Ng, A. Y. (2005). On local rewards and scaling distributed reinforcement learning. In International Conference on Neural Information Processing Systems, pages 91–98. Becker, R., Zilberstein, S., and Lesser, V. (2004a). Decentralized Markov decision processes with event-driven interactions. In Proceedings of the 3rd International Conference on Autonomous Agents and Multiagent Systems, pages 302–309. Becker, R., Zilberstein, S., Lesser, V., and Goldman, C. V. (2004b). Solving transition independent decentralized Markov decision processes. Journal of Artificial Intelligence Research, 22:423– 455. Bernstein, D. S., Givan, R., Immerman, N., and Zilberstein, S. (2002). The complexity of decentralized control of Markov decision processes. Mathematics of Operations Research, 27:819–840. Dempster, A. P., Laird, N. M., and Rubin, D. B. (1977). Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical society, Series B, 39(1):1–38. Foerster, J. N., Assael, Y. M., de Freitas, N., and Whiteson, S. (2016). Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, pages 2137–2145. Guestrin, C., Lagoudakis, M., and Parr, R. (2002). Coordinated reinforcement learning. In ICML, volume 2, pages 227–234. Konda, V. R. and Tsitsiklis, J. N. (2003). On actor-critic algorithms. SIAM Journal on Control and Optimization, 42(4):1143–1166. Kumar, A., Zilberstein, S., and Toussaint, M. (2011). Scalable multiagent planning using probabilistic inference. In Proceedings of the Twenty-Second International Joint Conference on Artificial Intelligence, pages 2140–2146, Barcelona, Spain. Kumar, A., Zilberstein, S., and Toussaint, M. (2015). Probabilistic inference techniques for scalable multiagent decision making. Journal of Artificial Intelligence Research, 53(1):223–270. Leibo, J. Z., Zambaldi, V. F., Lanctot, M., Marecki, J., and Graepel, T. (2017). Multi-agent reinforcement learning in sequential social dilemmas. In International Conference on Autonomous Agents and Multiagent Systems. Meyers, C. A. and Schulz, A. S. (2012). The complexity of congestion games. Networks, 59:252– 260. Mnih, V., Badia, A. P., Mirza, M., Graves, A., Lillicrap, T., Harley, T., Silver, D., and Kavukcuoglu, K. (2016). Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pages 1928–1937. Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M. A., Fidjeland, A., Ostrovski, G., Petersen, S., Beattie, C., Sadik, A., Antonoglou, I., King, H., Kumaran, D., Wierstra, D., Legg, S., and Hassabis, D. (2015). Human-level control through deep reinforcement learning. Nature, 518(7540):529–533. Nair, R., Varakantham, P., Tambe, M., and Yokoo, M. (2005). Networked distributed POMDPs: A synthesis of distributed constraint optimization and POMDPs. In AAAI Conference on Artificial Intelligence, pages 133–139. Nguyen, D. T., Kumar, A., and Lau, H. C. (2017). Collective multiagent sequential decision making under uncertainty. In AAAI Conference on Artificial Intelligence, pages 3036–3043. 10 Pajarinen, J., Hottinen, A., and Peltonen, J. (2014). Optimizing spatial and temporal reuse in wireless networks by decentralized partially observable Markov decision processes. IEEE Trans. on Mobile Computing, 13(4):866–879. Peshkin, L., Kim, K.-E., Meuleau, N., and Kaelbling, L. P. (2000). Learning to cooperate via policy search. In Proceedings of the Sixteenth conference on Uncertainty in artificial intelligence, pages 489–496. Morgan Kaufmann Publishers Inc. Robbel, P., Oliehoek, F. A., and Kochenderfer, M. J. (2016). Exploiting anonymity in approximate linear programming: Scaling to large multiagent MDPs. In AAAI Conference on Artificial Intelligence, pages 2537–2543. Schulman, J., Levine, S., Abbeel, P., Jordan, M., and Moritz, P. (2015). Trust region policy optimization. In International Conference on Machine Learning, pages 1889–1897. Sonu, E., Chen, Y., and Doshi, P. (2015). Individual planning in agent populations: Exploiting anonymity and frame-action hypergraphs. In International Conference on Automated Planning and Scheduling, pages 202–210. Sutton, R. S., McAllester, D., Singh, S., and Mansour, Y. (1999). Policy gradient methods for reinforcement learning with function approximation. In International Conference on Neural Information Processing Systems, pages 1057–1063. Varakantham, P., Adulyasak, Y., and Jaillet, P. (2014). Decentralized stochastic planning with anonymity in interactions. In AAAI Conference on Artificial Intelligence, pages 2505–2511. Varakantham, P. R., Cheng, S.-F., Gordon, G., and Ahmed, A. (2012). Decision support for agent populations in uncertain and congested environments. In AAAI Conference on Artificial Intelligence, pages 1471–1477. Williams, R. J. (1992). Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3):229–256. Winstein, K. and Balakrishnan, H. (2013). Tcp ex machina: Computer-generated congestion control. In Proceedings of the ACM SIGCOMM 2013 Conference, SIGCOMM ’13, pages 123–134. Witwicki, S. J. and Durfee, E. H. (2010). Influence-based policy abstraction for weakly-coupled Dec-POMDPs. In International Conference on Automated Planning and Scheduling, pages 185– 192. 11 | 2017 | 503 |
7,012 | Stochastic Submodular Maximization: The Case of Coverage Functions Mohammad Reza Karimi Department of Computer Science ETH Zurich mkarimi@ethz.ch Mario Lucic Department of Computer Science ETH Zurich lucic@inf.ethz.ch Hamed Hassani Department of Electrical and Systems Engineering University of Pennsylvania hassani@seas.upenn.edu Andreas Krause Department of Computer Science ETH Zurich krausea@ethz.ch Abstract Stochastic optimization of continuous objectives is at the heart of modern machine learning. However, many important problems are of discrete nature and often involve submodular objectives. We seek to unleash the power of stochastic continuous optimization, namely stochastic gradient descent and its variants, to such discrete problems. We first introduce the problem of stochastic submodular optimization, where one needs to optimize a submodular objective which is given as an expectation. Our model captures situations where the discrete objective arises as an empirical risk (e.g., in the case of exemplar-based clustering), or is given as an explicit stochastic model (e.g., in the case of influence maximization in social networks). By exploiting that common extensions act linearly on the class of submodular functions, we employ projected stochastic gradient ascent and its variants in the continuous domain, and perform rounding to obtain discrete solutions. We focus on the rich and widely used family of weighted coverage functions. We show that our approach yields solutions that are guaranteed to match the optimal approximation guarantees, while reducing the computational cost by several orders of magnitude, as we demonstrate empirically. 1 Introduction Submodular functions are discrete analogs of convex functions. They arise naturally in many areas, such as the study of graphs, matroids, covering problems, and facility location problems. These functions are extensively studied in operations research and combinatorial optimization [22]. Recently, submodular functions have proven to be key concepts in other areas such as machine learning, algorithmic game theory, and social sciences. As such, they have been applied to a host of important problems such as modeling valuation functions in combinatorial auctions, feature and variable selection [23], data summarization [27], and influence maximization [20]. Classical results in submodular optimization consider the oracle model whereby the access to the optimization objective is provided through a black box — an oracle. However, in many applications, the objective has to be estimated from data and is subject to stochastic fluctuations. In other cases the value of the objective may only be obtained through simulation. As such, the exact computation might not be feasible due to statistical or computational constraints. As a concrete example, consider the problem of influence maximization in social networks [20]. The objective function is defined as the expectation of a stochastic process, quantifying the size of the (random) subset of nodes 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. influenced from a selected seed set. This expectation cannot be computed efficiently, and is typically approximated via random sampling, which introduces an error in the estimate of the value of a seed set. Another practical example is the exemplar-based clustering problem, which is an instance of the facility location problem. Here, the objective is the sum of similarities of all the points inside a (large) collection of data points to a selected set of centers. Given a distribution over point locations, the true objective is defined as the expected value w.r.t. this distribution, and can only be approximated as a sample average. Moreover, evaluating the function on a sample involves computation of many pairwise similarities, which is computationally prohibitive in the context of massive data sets. In this work, we provide a formalization of such stochastic submodular maximization tasks. More precisely, we consider set functions f : 2V ! R+, defined as f(S) = Eγ⇠Γ[fγ(S)] for S ✓V , where Γ is an arbitrary distribution and for each realization γ ⇠Γ, the set function fγ : 2V ! R+ is monotone and submodular (hence f is monotone submodular). The goal is to maximize f subject to some constraints (e.g. the k-cardinality constraint) having access only to i.i.d. samples fγ⇠Γ(·). Methods for submodular maximization fall into two major categories: (i) The classic approach is to directly optimize the objective using discrete optimization methods (e.g. the GREEDY algorithm and its accelerated variants), which are state-of-the-art algorithms (both in practice and theory), at least in the case of simple constraints, and are most widely considered in the literature; (ii) The alternative is to lift the problem into a continuous domain and exploit continuous optimization techniques available therein [7]. While the continuous approaches may lead to provably good results, even for more complex constraints, their high computational complexity inhibits their practicality. In this paper we demonstrate how modern stochastic optimization techniques (such as SGD, ADAGRAD [8] and ADAM [21]), can be used to solve an important class of discrete optimization problems which can be modeled using weighted coverage functions. In particular, we show how to efficiently maximize them under matroid constraints by (i) lifting the problem into the continuous domain using the multilinear extension [37], (ii) efficiently computing a concave relaxation of the multilinear extension [32], (iii) efficiently computing an unbiased estimate of the gradient for the concave relaxation thus enabling (projected) stochastic gradient ascent-style algorithms to maximize the concave relaxation, and (iv) rounding the resulting fractional solution without loss of approximation quality [7]. In addition to providing convergence and approximation guarantees, we demonstrate that our algorithms enjoy strong empirical performance, often achieving an order of magnitude speedup with less than 1% error with respect to GREEDY. As a result, the presented approach unleashes the powerful toolkit of stochastic gradient based approaches to discrete optimization problems. Our contributions. In this paper we (i) introduce a framework for stochastic submodular optimization, (ii) provide a general methodology for constrained maximization of stochastic submodular objectives, (iii) prove that the proposed approach guarantees a (1 −1/e)−approximation in expectation for the class of weighted coverage functions, which is the best approximation guarantee achievable in polynomial time unless P = NP, (iv) highlight the practical benefit and efficiency of using continuous-based stochastic optimization techniques for submodular maximization, (v) demonstrate the practical utility of the proposed framework in an extensive experimental evaluation. We show for the first time that continuous optimization is a highly practical, scalable avenue for maximizing submodular set functions. 2 Background and problem formulation Let V be a ground set of n elements. A set function f : 2V −! R+ is submodular if for every A, B ✓V , it holds f(A) + f(B) ≥f(A \ B) + f(A [ B). Function f is said to be monotone if f(A) f(B) for all A ✓B ✓V . We focus on maximizing f subject to some constraints on S ✓V . The prototypical example is maximization under the cardinality constraint, i.e., for a given integer k, find S ✓V , |S| k, which maximizes f. Finding an exact solution for monotone submodular functions is NP-hard [10], but a (1 −1/e)-approximation can be efficiently determined [30]. Going beyond the (1 −1/e)-approximation is NP-hard for many classes of submodular functions [30, 24]. More generally, one may consider matroid constraints, whereby (V, I) is a matroid with the family of independent sets I, and maximize f such that S 2 I. The GREEDY algorithm achieves a 1/2approximation [13], but CONTINUOUS GREEDY introduced by Vondrák [37], Calinescu et al. [6] can achieve a (1 −1/e)-optimal solution in expectation. Their approach is based on the multilinear 2 extension of f, F : [0, 1]V ! R+, defined as F(x) = X S✓V f(S) Y i2S xi Y j /2S (1 −xj), (1) for all x = (x1, · · · , xn) 2 [0, 1]V . In other words, F(x) is the expected value of of f over sets wherein each element i is included with probability xi independently. Then, instead of optimizing f(S) over I, we can optimize F over the matroid base polytope corresponding to (V, I): P = {x 2 Rn + | x(S) r(S), 8S ✓V, x(V ) = r(V )}, where r(·) is the matroid’s rank function. The CONTINUOUS GREEDY algorithm then finds a solution x 2 P which provides a (1 −1/e)−approximation. Finally, the continuous solution x is then efficiently rounded to a feasible discrete solution without loss in objective value, using PIPAGE ROUNDING [1, 6]. The idea of converting a discrete optimization problem into a continuous one was first exploited by Lovász [28] in the context of submodular minimization and this approach was recently applied to a variety of problems [36, 19, 3]. Problem formulation. The aforementioned results are based on the oracle model, whereby the exact value of f(S) for any S ✓V is given by an oracle. In absence of such an oracle, we face the additional challenges of evaluating f, both statistical and computational. In particular, consider set functions that are defined as expectations, i.e. for S ✓V we have f(S) = Eγ⇠Γ[fγ(S)], (2) where Γ is an arbitrary distribution and for each realization γ ⇠Γ, the set function fγ : 2V ! R is submodular. The goal is to efficiently maximize f subject to constraints such as the k-cardinality constraint, or more generally, a matroid constraint. As a motivating example, consider the problem of propagation of contagions through a network. The objective is to identify the most influential seed set of a given size. A propagation instance (concrete realization of a contagion) is specified by a graph G = (V, E). The influence fG(S) of a set of nodes S in instance G is the fraction of nodes reachable from S using the edges E. To handle uncertainties in the concrete realization, it is natural to introduce a probabilistic model such as the Independent Cascade [20] model which defines a distribution G over instances G ⇠G that share a set V of nodes. The influence of a seed set S is then the expectation f(S) = EG⇠G[fG(S)], which is a monotone submodular function. Hence, estimating the expected influence is computationally demanding, as it requires summing over exponentially many functions fG. Assuming f as in (2), one can easily obtain an unbiased estimate of f for a fixed set S by random sampling according to Γ. The critical question is, given that the underlying function is an expectation, can we optimize it more efficiently? Our approach is based on continuous extensions that are linear operators on the class of set functions, namely, linear continuous extensions. As a specific example, considering the multilinear extension, we can write F(x) = Eγ⇠Γ[Fγ(x)], where Fγ denotes the extension of fγ. As a consequence, the value of Fγ(x), when γ ⇠Γ, is an unbiased estimator for F(x) and unbiased estimates of the (sub)gradients may be obtained analogously. We explore this avenue to develop efficient algorithms for maximizing an important subclass of submodular functions that can be expressed as weighted coverage functions. Our approach harnesses a concave relaxation detailed in Section 3. Further related work. The emergence of new applications, combined with a massive increase in the amount of data has created a demand for fast algorithms for submodular optimization. A variety of approximation algorithms have been presented, ranging from submodular maximization subject to a cardinality constraint [29, 39, 4], submodular maximization subject to a matroid constraint [6], non-monotone submodular maximization [11], approximately submodular functions [17], and algorithms for submodular maximization subject to a wide variety of constraints [25, 12, 38, 18, 9]. A closely related setting to ours is online submodular maximization [35], where functions come one at a time and the goal is to provide time-dependent solutions (sets) such that a cumulative regret is minimized. In contrast, our goal is to find a single (time-independent) set that maximizes the objective (2). Another relevant setting is noisy submodular maximization, where the evaluations returned by the oracle are noisy [16, 34]. Specifically, [34] assumes a noisy but unbiased oracle (with an independent sub-Gaussian noise) which allows one to sufficiently estimate the marginal gains of items by averaging. In the context of cardinality constraints, some of these ideas can be carried to our setting by introducing additional assumptions on how the values fγ(S) vary w.r.t. to their expectation f(S). However, we provide a different approach that does not rely on uniform convergence and compare sample and running time complexity comparison with variants of GREEDY in Section 3. 3 3 Stochastic Submodular Optimization We follow the general framework of [37] whereby the problem is lifted into the continuous domain, a continuous optimization algorithm is designed to maximize the transferred objective, and the resulting solution is rounded. Maximizing f subject to a matroid constraint can then be done by first maximizing its multilinear extension F over the matroid base polytope and then rounding the solution. Methods such as the projected stochastic gradient ascent can be used to maximize F over this polytope. Critically, we have to assure that the computed local optima are good in expectation. Unfortunately, the multilinear extension F lacks concavity and therefore may have bad local optima. Hence, we consider concave continuous extensions of F that are efficiently computable, and at most a constant factor away from F to ensure solution quality. As a result, such a concave extension ¯F could then be efficiently maximized over a polytope using projected stochastic gradient ascent which would enable the application of modern continuous optimization techniques. One class of important functions for which such an extension can be efficiently computed is the class of weighted coverage functions. The class of weighted coverage functions (WCF). Let U be a set and let g be a nonnegative modular function on U, i.e. g(S) = P u2S w(u), S ✓U. Let V = {B1, . . . , Bn} be a collection of subsets of U. The weighted coverage function f : 2V −! R+ defined as 8S ✓V : f(S) = g $S Bi2S Bi & is monotone submodular. For all u 2 U, let us denote by Pu := {Bi 2 V | u 2 Bi} and by I(·) the indicator function. The multilinear extension of f can be expressed in a more compact way: F(x) = ES[f(S)] = ES X u2U I(u 2 Bi for some Bi 2 S) · w(u) = X u2U w(u) · P(u 2 Bi for some Bi 2 S) = X u2U w(u) ✓ 1 −Q Bi2Pu(1 −xi) ◆ (3) where we used the fact that each element Bi 2 V was chosen with probability xi. Concave upper bound for weighted coverage functions. To efficiently compute a concave upper bound on the multilinear extension we use the framework of Seeman and Singer [32]. Given that all the weights w(u), u 2 U in (3) are non-negative, we can construct a concave upper bound for the multilinear extension F(x) using the following Lemma. Proofs can be found in the Appendix A. Lemma 1. For x 2 [0, 1]` define ↵(x) := 1 −Q` i=1(1 −xi). Then the Fenchel concave biconjugate of ↵(·) is β(x) := min n 1, P` i=1 xi o . Also (1 −1/e) β(x) ↵(x) β(x) 8x 2 [0, 1]`. Furthermore, β is an extension of ↵, i.e. 8x 2 {0, 1}`: ↵(x) = β(x). Consequently, given a weighted coverage function f with F(x) represented as in (3), we can define ¯F(x) := X u2U w(u) min ⇢ 1, X Bv2Pu xv (4) and conclude using Lemma 1 that (1 −1/e) ¯F(x) F(x) ¯F(x), as desired. Furthermore, ¯F has three interesting properties: (1) It is a concave function over [0, 1]V , (2) it is equal to f on vertices of the hypercube, i.e. for x 2 {0, 1}n one has ¯F(x) = f({i : xi = 1}), and (3) it can be computed efficiently and deterministically given access to the sets Pu, u 2 U. In other words, we can compute the value of ¯F(x) using at most O(|U| ⇥|V |) operations. Note that ¯F is not the tightest concave upper bound of F, even though we use the tightest concave upper bounds for each term of F. Optimizing the concave upper bound by stochastic gradient ascent. Instead of maximizing F over a polytope P, one can now attempt to maximize ¯F over P. Critically, this task can be done efficiently, as ¯F is concave, by using projected stochastic gradient ascent. In particular, one can 4 Algorithm 1 Stochastic Submodular Maximization via concave relaxation Require: matroid M with base polytope P, ⌘t (step size), T (maximum # of iterations) 1: x(0) starting point in P 2: for t 0 to T −1 do 3: Choose gt at random from a distribution such that E[gt|x(0), . . . , x(t)] 2 @ ¯F(x(t)) 4: x(t+1/2) x(t) + ⌘t gt 5: x(t+1) ProjectP(x(t+1/2)) 6: end for 7: ¯xT 1 T PT t=1 x(t) 8: S RANDOMIZED-PIPAGE-ROUND(¯xT ) 9: return S such that S 2 M, E[f(S)] ≥(1 −1/e)f(OPT) −"(T). control the convergence speed by choosing from the toolbox of modern continuous optimization algorithms, such as SGD, ADAGRAD and ADAM. Let us denote a maximizer of ¯F over P by ¯x⇤, and also a maximizer of F over P by x⇤. We can thus write F(¯x⇤) ≥(1 −1/e) ¯F(¯x⇤) ≥(1 −1/e) ¯F(x⇤) ≥(1 −1/e)F(x⇤), which is the exact guarantee that previous methods give, and in general is the best near-optimality ratio that one can give in poly-time. Finally, to round the continuous solution we may apply RANDOMIZEDPIPAGE-ROUNDING [7] as the quality of the approximation is preserved in expectation. Matroid constraints. Constrained optimization can be efficiently performed by projected gradient ascent whereby after each step of the stochastic ascent, we need to project the solution back onto the feasible set. For the case of matroid constraints, it is sufficient to consider projection onto the matroid base polytope. This problem of projecting on the base polytope has been widely studied and fast algorithms exist in many cases [2, 5, 31]. While these projection algorithms were used as a key subprocedure in constrained submodular minimization, here we consider them for submodular maximization. Details of a fast projection algorithm for the problems considered in this work are presented the Appendix D. Algorithm 1 summarizes all steps required to maximize f subject to matroid constraints. Convergence rate. Since we are maximizing a concave function ¯F(·) over a matroid base polytope P, convergence rate (and hence running time) depends on B := maxx2P ||x||, as well as maximum gradient norm ⇢(i.e. ||gt|| ⇢with probability 1). 1 In the case of the base polytope for a matroid of rank r, B is pr, since each vertex of the polytope has exactly r ones. Also, from (4), one can build a rough upper bound for the norm of the gradient: ||g|| || P u2U w(u)1Pu|| $ max u2U |Pu| &1/2X u2U w(u), which depends on the weights w(u) as well as |Pu| and is hence problem-dependent. We will provide tighter upper bounds for gradient norm in our specific examples in the later sections. With ⌘t = B/⇢ p t, and classic results for SGD [33], we have that ¯F(x⇤) −E[ ¯F(¯xT )] B⇢/ p T, where T is the total number of SGD iterations and ¯xT is the final outcome of SGD (see Algorithm 1). Therefore, for a given " > 0, after T ≥B2⇢2/"2 iterations, we have ¯F(x⇤) −E[ ¯F(¯xT )] ". Summing up, we will have the following theorem: Theorem 2. Let f be a weighted coverage function, P be the base polytope of a matroid M, and ⇢ and B be as above. Then for each ✏> 0, Algorithm 1 after T = B2⇢2/"2 iterations, produces a set S⇤2 M such that E[f(S⇤)] ≥(1 −1/e) maxS2M f(S) −". 1Note that the function ¯F is neither smooth nor strongly concave as functions such as min{1, x} are not smooth or strongly concave. 5 Remark. Indeed this approximation ratio is the best ratio one can achieve, unless P=NP [10]. A key point to make here is that our approach also works for more general constraints (in particular is efficient for simple matroids such as partition matroids). In the latter case, GREEDY only gives 1 2-approximation and fast discrete methods like STOCHASTIC-GREEDY [29] do not apply, whereas our method still yields an (1 −1/e)-optimal solution. Time Complexity. One can compute an upper bound for the running time of Algorithm 1 by estimating the time required to perform gradient computations, projection on P, and rounding. For the case of uniform matroids, projection and rounding take O(n log n) and O(n) time, respectively (see Appendix D). Furthermore, for the applications considered in this work, namely expected influence maximization and exemplar-based clustering, we provide linear time algorithms to compute the gradients. Also when our matroid is the k-uniform matroid (i.e. k-cardinality constraint), we have B = p k. By Theorem 2, the total computational complexity of our algorithm is O(⇢2kn(log n)/"2). Comparison to GREEDY. Let us relate our results to the classical approach. When running the GREEDY algorithm in the stochastic setting, one estimates ˆf(S) := 1 s Ps i=1 fγi(S) where γ1, . . . , γs are i.i.d. samples from Γ. The following proposition bounds the sample and computational complexity of GREEDY. The proof is detailed in the Appendix B. Proposition 3. Let f be a submodular function defined as (2). Suppose 0 fγ(S) H for all S ✓V and all γ ⇠Γ. Assume S⇤denotes the optimal solution for f subject to k-cardinality constraint and Sk denotes the solution computed by the greedy algorithm on ˆf after k steps. Then, in order to guarantee P[f(Sk) ≥(1 −1/e)f(S⇤) −"] ≥1 −δ, it is enough to have s 2 ⌦ ✓ H2(k log n + log(1/δ))/"2 ◆ , i.i.d. samples from Γ. The running time of GREEDY is then bounded by O ✓ ⌧H2nk(k log n + log(1/δ))/"2 ◆ , where ⌧is an upper bound on the computation time for a single evaluation of fγ(S). As an example, let us compare the worst-case complexity bound obtained for SGD (i.e. O(⇢2kn(log n)/"2)) with that of GREEDY for the influence maximization problem. Each single function evaluation for GREEDY amounts to computing the total influence of a set in a sample graph, which makes ⌧= O(n) (here we assume our sample graphs satisfy |E| = O(|V |)). Also, a crude upper bound for the size of the gradient for each sample function is Hpn (see Appendix E.1). Hence, we can deduce that SGD can have a factor k speedup w.r.t. to GREEDY. 4 Applications We will now show how to instantiate the stochastic submodular maximization framework using several prototypical discrete optimization problems. Influence maximization. As discussed in Section 2, the Independent Cascade [20] model defines a distribution G over instances G ⇠G that share a set V of nodes. The influence fG(S) of a set of nodes S in instance G is the fraction of nodes reachable from S using the edges E(G). The following Lemma shows that the influence belongs to the class of WCF. Lemma 4. The influence function fG(·) is a WCF. Moreover, FG(x) = ES[fG(S)] = 1 |V | X v2V (1 −Q u2Pv(1 −xu)) (5) ¯FG(x) = 1 |V | X v2V min{1, P u2Pv xu}, (6) where Pv is the set of all nodes having a (directed) path to v. 6 We return to the problem of maximizing fG(S) = EG⇠G[fG(S)] given a distribution over graphs G sharing nodes V . Since fG is a weighted sum of submodular functions, it is submodular. Moreover, F(x) = ES[fG(S)] = ES[EG[fG(S)]] = EG[ES[fG(S)]] = EG[FG(x)] = EG " 1 |V | X v2V (1 −Q u2Pv(1 −xu)) # . Let U be the uniform distribution over vertices. Then, F(x) = EG 1 |V | P v2V (1 −Q u2Pv(1 −xu)) 1 = EG Ev⇠U [1 −Q u2Pv(1 −xu)] 1 , (7) and the corresponding upper bound would be ¯F(x) = EG Ev⇠U ⇥ min{1, P u2Pv xu} ⇤1 . (8) This formulation proves to be helpful in efficient calculation of subgradients, as one can obtain a random subgradient in linear time. For more details see Appendix E.1. We also provide a more efficient, biased estimator of the expectation in the Appendix. Facility location. Let G = (X ˙[Y, E) be a complete weighted bipartite graph with parts X and Y and nonnegative weights wx,y. The weights can be considered as utilities or some similarity metric. We select a subset S ✓X and each y 2 Y selects s 2 S with the highest weight ws,y. Our goal is to maximize the average weight of these selected edges, i.e. to maximize f(S) = 1 |Y | X y2Y max s2S ws,y (9) given some constraints on S. This problem is indeed the Facility Location problem, if one takes X to be the set of facilities and Y to be the set of customers and wx,y to be the utility of facility x for customer y. Another interesting instance is the Exemplar-based Clustering problem, in which X = Y is a set of objects and wx,y is the similarity (or inverted distance) between objects x and y, and one tries to find a subset S of exemplars (i.e. centroids) for these objects. The stochastic nature of this problem is revealed when one writes (9) as the expectation f(S) = Ey⇠Γ[fy(S)], where Γ is the uniform distribution over Y and fy(S) := maxs2S ws,y. One can also consider this more general case, where y’s are drawn from an unknown distribution, and one tries to maximize the aforementioned expectation. First, we claim that fy(·) for each y 2 Y is again a weighted coverage function. For simplicity, let X = {1, . . . , n} and set mi .= wi,y, with m1 ≥· · · ≥mn and mn+1 .= 0. Lemma 5. The utility function fy(·) is a WCF. Moreover, Fy(x) = Pn i=1(mi −mi+1)(1 −Qi j=1(1 −xj)), (10) ¯Fy(x) = Pn i=1(mi −mi+1) min{1, Pi j=1 xj}. (11) We remark that the gradient of both Fy and ¯Fy can be computed in linear time using a recursive procedure. We refer to Appendix E.2 for more details. 5 Experimental Results We demonstrate the practical utility of the proposed framework and compare it to standard baselines. We compare the performance of the algorithms in terms of their wall-clock running time and the obtained utility. We consider the following problems: • Influence Maximization for the Epinions network2. The network consists of 75 879 nodes and 508 837 directed edges. We consider the subgraph induced by the top 10 000 nodes with the largest out-degree and use the independent cascade model [20]. The diffusion model is specified by a fixed probability for each node to influence its neighbors in the underlying graph. We set this probability p to be 0.02, and chose the number of seeds k = 50. 2http://snap.stanford.edu/ 7 0 100 200 300 Cost (seconds) 2 4 6 8 10 12 14 Utility T = 100K T = 8K e = 0.9 e = 0.5 e = 0.3 e = 0.1 e = 0.01 Blogs SSM/AdaGrad LAZY-GREEDY LAZY-STOCH-GREEDY RANDOM-SELECT 0 20 40 60 Cost (seconds) 2.14 2.16 2.18 2.20 2.22 Utility e = 0.9 e = 0.5 e = 0.3 e = 0.1 e = 0.01 T = 8K CIFAR-10 SSM/AdaGrad LAZY-GREEDY LAZY-STOCH-GREEDY RANDOM-SELECT 0 500 1000 1500 Cost (seconds) 14.0 14.5 15.0 15.5 16.0 16.5 Utility e = 0.9 e = 0.5 e = 0.1 e = 0.01 T = 106 Epinions SSM/AdaGrad LAZY-GREEDY LAZY-STOCH-GREEDY RANDOM-SELECT 0 10 20 30 40 50 k (# of seeds) 0.14 0.15 0.16 0.17 Utility Epinions (Partition Matroid) SSM/AdaGrad LAZY-GREEDY Figure 1: In the case of Facility location for Blog selection as well as on influence maximization on Epinions, the proposed approach reaches the same utility significantly faster. On the exemplarbased clustering of CIFAR, the proposed approach is outperformed by STOCHASTIC-GREEDY, but nevertheless reaches 98.4% of the GREEDY utility in a few seconds (after less than 1000 iterations). On Influence Maximization over partition matroids, the proposed approach significantly outperforms GREEDY. • Facility Location for Blog Selection. We use the data set used in [14], consisting of 45 193 blogs, and 16 551 cascades. The goal is to detect information cascades/stories spreading over the blogosphere. This dataset is heavy-tailed, hence a small random sample of the events has high variance in terms of the cascade sizes. We set k = 100. • Exemplar-based Clustering on CIFAR-10. The data set contains 60 000 color images with resolution 32 ⇥32. We use a single batch of 10 000 images and compare our algorithms to variants of GREEDY over the full data set. We use the Euclidean norm as the distance function and set k = 50. Further details about preprocessing of the data as well as formulation of the submodular function can be found in Appendix E.3. Baselines. In the case of cardinality constraints, we compare our stochastic continuous optimization approach against the most efficient discrete approaches (LAZY-)GREEDY and (LAZY-)STOCHASTICGREEDY, which both provide optimal approximation guarantees. For STOCHASTIC-GREEDY, we vary the parameter " in order to explore the running time/utility tradeoff. We also report the performance of randomly selected sets. For the two facility location problems, when applying the greedy variants we can evaluate the exact objective (true expectation). In the Influence Maximization application, computing the exact expectation is intractable. Hence, we use an empirical average of s samples (cascades) from the model. We note that the number of samples suggested by Proposition 3 is overly conservative, and instead we make a practical choice of s = 103 samples. 8 Results. The results are summarized in Figure 1. On the blog selection and influence maximization applications, the proposed continuous optimization approach outperforms STOCHASTIC-GREEDY in terms of the running time/utility tradeoff. In particular, for blog selection we can compute a solution with the same utility 26⇥faster than STOCHASTIC-GREEDY with " = 0.5. Similarly, for influence maximization on Epinions we the solution 88⇥faster than STOCHASTIC-GREEDY with " = 0.1. On the exemplar-based clustering application STOCHASTIC-GREEDY outperforms the proposed approach. We note that the proposed approach is still competitive as it recovers 98.4% of the value after less than thousand iterations. We also include an experiment on Influence Maximization over partition matroids for the Epinions network. In this case, GREEDY only provides a 1/2 approximation guarantee and STOCHASTICGREEDY does not apply. To create the partition, we first sorted all the vertices by their out-degree. Using this order on the vertices, we divided the vertices into two partitions, one containing vertices with even positions, other containing the rest. Figure 1 clearly demonstrates that the proposed approach outperforms GREEDY in terms of utility (as well as running time). Acknowledgments The research was partially supported by ERC StG 307036. We would like to thank Yaron Singer for helpful comments and suggestions. References [1] Alexander A Ageev and Maxim I Sviridenko. Pipage rounding: A new method of constructing algorithms with proven performance guarantee. Journal of Combinatorial Optimization, 8(3): 307–328, 2004. [2] Francis Bach et al. Learning with submodular functions: A convex optimization perspective. Foundations and Trends R⃝in Machine Learning, 6(2-3):145–373, 2013. [3] Francis R. Bach. Convex analysis and optimization with submodular functions: a tutorial. CoRR, abs/1010.4207, 2010. [4] Ashwinkumar Badanidiyuru and Jan Vondrák. Fast algorithms for maximizing submodular functions. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1497–1514. SIAM, 2014. [5] P. Brucker. An o(n) algorithm for quadratic knapsack problems. Operations Research Letters, 3 (3):163–166, 1984. [6] Gruia Calinescu, Chandra Chekuri, Martin Pál, and Jan Vondrák. Maximizing a submodular set function subject to a matroid constraint. In International Conference on Integer Programming and Combinatorial Optimization, pages 182–196. Springer, 2007. [7] Gruia Calinescu, Chandra Chekuri, Martin Pál, and Jan Vondrák. Maximizing a monotone submodular function subject to a matroid constraint. SIAM Journal on Computing, 40(6): 1740–1766, 2011. [8] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 2011. [9] Alina Ene and Huy L. Nguyen. Constrained submodular maximization: Beyond 1/e. pages 248–257, 2016. [10] Uriel Feige. A threshold of ln n for approximating set cover. Journal of the ACM, 45(4):634 ? 652, 1998. [11] Uriel Feige, Vahab S Mirrokni, and Jan Vondrak. Maximizing non-monotone submodular functions. SIAM Journal on Computing, 40(4):1133–1153, 2011. [12] Moran Feldman, Joseph Naor, and Roy Schwartz. A unified continuous greedy algorithm for submodular maximization. In Foundations of Computer Science (FOCS), 2011 IEEE 52nd Annual Symposium on, pages 570–579. IEEE, 2011. 9 [13] Marshall L Fisher, George L Nemhauser, and Laurence A Wolsey. An analysis of approximations for maximizing submodular set functions. In Polyhedral combinatorics, pages 73–87. Springer, 1978. [14] Natalie Glance, Matthew Hurst, Kamal Nigam, Matthew Siegler, Robert Stockton, and Takashi Tomokiyo. Deriving marketing intelligence from online discussion. In Proceedings of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, pages 419–428, 2005. [15] Ryan Gomez and Andreas Krause. Budgeted nonparametric learning from data streams. Proceedings of the 27th International Conference on Machine Learning, 2010. [16] Avinatan Hassidim and Yaron Singer. Submodular optimization under noise. CoRR, abs/1601.03095, 2016. [17] Thibaut Horel and Yaron Singer. Maximizing approximately submodular functions. NIPS, 2016. [18] Rishabh K Iyer and Jeff A Bilmes. Submodular optimization with submodular cover and submodular knapsack constraints. In Advances in Neural Information Processing Systems, pages 2436–2444, 2013. [19] Rishabh K. Iyer and Jeff A. Bilmes. Polyhedral aspects of submodularity, convexity and concavity. Arxiv, CoRR, abs/1506.07329, 2015. [20] David Kempe, Jon Kleinberg, and Eva. Tardos. Maximizing the spread of influence through a social network. 9th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 137–146, 2003. [21] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015. [22] Andreas Krause and Daniel Golovin. Submodular function maximization. Tractability: Practical Approaches to Hard Problems, 3(19):8, 2012. [23] Andreas Krause and Carlos Guestrin. Near-optimal nonmyopic value of information in graphical models. In Conference on Uncertainty in Artificial Intelligence (UAI), July 2005. [24] Andreas Krause and Carlos Guestrin. Near-optimal nonmyopic value of information in graphical models. In Proceedings of the Twenty-First Conference on Uncertainty in Artificial Intelligence, pages 324–331. AUAI Press, 2005. [25] Ariel Kulik, Hadas Shachnai, and Tami Tamir. Maximizing submodular set functions subject to multiple linear constraints. In Proceedings of the twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 545–554. Society for Industrial and Applied Mathematics, 2009. [26] K. S. Sesh Kumar and Francis Bach. Active-set methods for submodular minimization problems. hal-01161759v3, 2016. [27] Hui Lin and Jeff Bilmes. A class of submodular functions for document summarization. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies-Volume 1, pages 510–520. Association for Computational Linguistics, 2011. [28] László Lovász. Submodular functions and convexity. In Mathematical Programming The State of the Art, pages 235–257. Springer, 1983. [29] Baharan Mirzasoleiman, Ashwinkumar Badanidiyuru, Amin Karbasi, Jan Vondrak, and Andreas Krause. Lazier than lazy greedy. Association for the Advancement of Artificial Intelligence, 2015. [30] George L. Nemhauser, Laurence A. Wolsey, and Marshall L. Fisher. An analysis of approximations for maximizing submodular set functions - i. Mathematical Programming, 14(1):265–294, 1978. 10 [31] P. M. Pardalos and N. Kovoor. An algorithm for a singly constrained class of quadratic programs subject to upper and lower bounds. Mathematical Programming, 46(1):321–328, 1990. [32] Lior Seeman and Yaron Singer. Adaptive seeding in social networks. pages 459–468, 2013. [33] Shai Shalev-Shwartz and Shai Ben-David. Understanding Machine Learning : From Theory to Algorithms. Cambridge University Press, 2014. [34] Adish Singla, Sebastian Tschiatschek, and Andreas Krause. Noisy submodular maximization via adaptive sampling with applications to crowdsourced image collection summarization. In Proc. Conference on Artificial Intelligence (AAAI), February 2016. [35] Matthew Streeter and Daniel Golovin. An online algorithm for maximizing submodular functions. NIPS, 2008. [36] Jan Vondrák. Submodularity in combinatorial optimization. Charles University, Prague, 2007. [37] Jan Vondrák. Optimal approximation for the submodular welfare problem in the value oracle model. In Proceedings of the fortieth annual ACM symposium on Theory of computing, pages 67–74. ACM, 2008. [38] Jan Vondrák. Symmetry and approximability of submodular maximization problems. SIAM Journal on Computing, 42(1):265–304, 2013. [39] Kai Wei, Rishabh Iyer, and Jeff Bilmes. Fast multi-stage submodular maximization. In International Conference on Machine Learning (ICML), Beijing, China, 2014. 11 | 2017 | 504 |
7,013 | Stochastic Approximation for Canonical Correlation Analysis Raman Arora Dept. of Computer Science Johns Hopkins University Baltimore, MD 21204 arora@cs.jhu.edu Teodor V. Marinov Dept. of Computer Science Johns Hopkins University Baltimore, MD 21204 tmarino2@jhu.edu Poorya Mianjy Dept. of Computer Science Johns Hopkins University Baltimore, MD 21204 mianjy@jhu.edu Nathan Srebro TTI-Chicago Chicago, Illinois 60637 nati@ttic.edu Abstract We propose novel first-order stochastic approximation algorithms for canonical correlation analysis (CCA). Algorithms presented are instances of inexact matrix stochastic gradient (MSG) and inexact matrix exponentiated gradient (MEG), and achieve ✏-suboptimality in the population objective in poly( 1 ✏) iterations. We also consider practical variants of the proposed algorithms and compare them with other methods for CCA both theoretically and empirically. 1 Introduction Canonical Correlation Analysis (CCA) [11] is a ubiquitous statistical technique for finding maximally correlated linear components of two sets of random variables. CCA can be posed as the following stochastic optimization problem: given a pair of random vectors (x, y) 2 Rdx ⇥Rdy, with some (unknown) joint distribution D, find the k-dimensional subspaces where the projections of x and y are maximally correlated, i.e. find matrices ˜U 2 Rdx⇥k and ˜V 2 Rdy⇥k that maximize Ex,y[x> ˜U˜V>y] subject to ˜U>Ex[xx>]˜U = Ik, ˜V>Ey[yy>]˜V = Ik. (1) CCA-based techniques have recently met with success at unsupervised representation learning where multiple “views” of data are used to learn improved representations for each of the views [3, 5, 13, 23]. The different views often contain complementary information, and CCA-based “multiview” representation learning methods can take advantage of this information to learn features that are useful for understanding the structure of the data and that are beneficial for downstream tasks. Unsupervised learning techniques leverage unlabeled data which is often plentiful. Accordingly, in this paper, we are interested in first-order stochastic Approximation (SA) algorithms for solving Problem (1) that can easily scale to very large datasets. A stochastic approximation algorithm is an iterative algorithm, where in each iteration a single sample from the population is used to perform an update, as in stochastic gradient descent (SGD), the classic SA algorithm. There are several computational challenges associated with solving Problem (1). A first challenge stems from the fact that Problem (1) is non-convex. Nevertheless, akin to related spectral methods such as principal component analysis (PCA), the solution to CCA can be given in terms of a generalized eigenvalue problem. In other words, despite being non-convex, CCA admits a tractable 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. algorithm. In particular, numerical techniques based on power iteration method and its variants can be applied to these problems to find globally optimal solutions. Much recent work, therefore, has focused on analyzing optimization error for power iteration method for the generalized eigenvalue problem [1, 8, 24]. However, these analyses are on numerical (empirical) optimization error for finding left and right singular vectors of a fixed given matrix based on empirical estimates of the covariance matrices, and not on the population ✏−suboptimality (aka bound in terms of population objective) of Problem (1) which is the focus here. The second challenge, which is our main concern here, presents when designing first order stochastic approximation algorithms for CCA. The main difficulty here, compared to PCA, and most other machine learning problems, is that the constraints also involve stochastic quantities that depend on the unknown distribution D. Put differently, the CCA objective does not decompose over samples. To see this, consider the case for k = 1. The CCA problem then can be posed equivalently as maximizing the correlation objective ⇢(uT x, vT y) = Ex,y ⇥ u>xy>v ⇤ /( p Ex [u>xx>u] p Ey [v>yy>v]). This yields an unconstrained optimization problem. However, the objective is no longer an expectation, but is instead a ratio of expectations. If we were to solve the empirical version of this problem, it is easy to check that the objective ties all the samples together. This departs significantly from typical stochastic approximation scenario. Crucially, with a single sample, it is not possible to get an unbiased estimate of the gradient of the objective ⇢(uT x, vT y). Therefore, we consider a first-order oracle that provides inexact estimates of the gradient with a norm bound on the additive noise, and focus on inexact proximal gradient descent algorithms for CCA. Finally, it can be shown that the CCA problem given in Problem (1) is ill-posed if the population auto-covariance matrices Ex ⇥ xx>⇤ or Ey ⇥ yy>⇤ are ill-conditioned. This observation follows from the fact that if there exists a direction in the kernel of Ex ⇥ xx>⇤ or Ey ⇥ yy>⇤ in which x and y exhibit non-zero covariance, then the objective of Problem (1) is unbounded. We would like to avoid recovering such directions of spurious correlation and therefore assume that the smallest eigenvalues of the auto-covariance matrices and their empirical estimates are bounded below by some positive constant. Formally, we assume that Cx ⌫rxI and Cy ⌫ryI. This is the typical assumption made in analyzing CCA [1, 7, 8]. 1.1 Notation Scalars, vectors and matrices are represented by normal, Roman and capital Roman letters respectively, e.g. x, x, and X. Ik denotes identity matrix of size k ⇥k, where we drop the subscript whenever the size is clear from the context. The `2-norm of a vector x is denoted by kxk. For any matrix X, spectral norm, nuclear norm, and Frobenius norm are represented by kXk2, kXk⇤, and kXkF respectively. The trace of a square matrix X is denoted by Tr (X). Given two matrices X 2 Rk⇥d, Y 2 Rk⇥d, the standard inner-product between the two is given as hX, Yi = Tr $ X>Y % ; we use the two notations interchangeably. For symmetric matrices X and Y, we say X ⌫Y if X −Y is positive semi-definite (PSD). Let x 2 Rdx and y 2 Rdy denote two sets of centered random variables jointly distributed as D with corresponding auto-covariance matrices Cx = Ex[xx>], Cy = Ey[yy>], and cross-covariance matrix Cxy = E(x,y)[xy>], and define d := max{dx, dy}. Finally, X 2 Rdx⇥n and Y 2 Rdy⇥n denote data matrices with n corresponding samples from view 1 and view 2, respectively. 1.2 Problem Formulation Given paired samples (x1, y1), . . . , (xT , yT ), drawn i.i.d. from D, the goal is to find a maximally correlated subspace of D, i.e. in terms of the population objective. A simple change of variables in Problem (1), with U = C1/2 x ˜U and V = C1/2 y ˜V, yields the following equivalent problem: maximize Tr ⇣ U>C −1 2 x Cxy C −1 2 y V ⌘ s.t. U>U = I, V>V = I. (2) To ensure that Problem 2 is well-posed, we assume that r := min{rx, ry} > 0, where rx = λmin(Cx) and ry = λmin(Cy) are smallest eigenvalues of the population auto-covariance matrices. Furthermore, we assume that with probability one, for (x, y) ⇠D, we have that max{kxk2 , kyk2} B. Let Φ 2 Rdx⇥k and 2 Rdy⇥k denote the top-k left and right singular vectors, respectively, of the population cross-covariance matrix of the whitened views T := C−1/2 x CxyC−1/2 y . It is easy to check that the optimum of Problem (1) is achieved at U⇤= C−1/2 x Φ, V⇤= C−1/2 y . Therefore, a natural 2 approach, given a training dataset, is to estimate empirical auto-covariance and cross-covariance matrices to compute bT, an empirical estimate of T; matrices U⇤and V⇤can then be estimated using the top-k left and right singular vectors of bT. This approach is referred to as sample average approximation (SAA) or empirical risk minimization (ERM). In this paper, we consider the following equivalent re-parameterization of Problem (2) given by the variable substitution M = UV>, also referred to as lifting. Find M 2 Rdx⇥dy that maximize hM, C −1 2 x CxyC −1 2 y i s.t. σi(M) 2 {0, 1}, i = 1, . . . , min{dx, dy}, rank (M) k. (3) We are interested in designing SA algorithms that, for any bounded distribution D with minimum eigenvalue of the auto-covariance matrices bounded below by r, are guaranteed to find an ✏-suboptimal solution on the population objective (3), from which, we can extract a good solution for Problem (1). 1.3 Related Work There has been a flurry of recent work on scalable approaches to the empirical CCA problem, i.e. methods for numerical optimization of the empirical CCA objective on a fixed data set [1, 8, 14, 15, 24]. These are typically batch approaches which use the entire data set at each iteration, either for performing a power iteration [1, 8] or for optimizing the alternative empirical objective [14, 15, 24]: minimize 1 2nk˜U>X −˜V>Yk2 F + λxk˜Uk2 F + λyk˜Vk2 F s.t. ˜U>Cx,n ˜U = I, ˜V>Cy,n ˜V = I, (4) where Cx,n and Cy,n are the empirical estimates of covariance matrices for the n samples stacked in the matrices X 2 Rdx⇥n and Y 2 Rdy⇥n, using alternating least squares [14], projected gradient descent (AppaGrad, [15]) or alternating SVRG combined with shift-and-invert pre-conditioning [24]. However, all the works above focus only on the empirical problem, and can all be seen as instances of SAA (ERM) approach to the stochastic optimization (learning) problem (1). In particular, the analyses in these works bounds suboptimality on the training objective, not the population objective (1). The only relevant work we are aware of that studies algorithms for CCA as a population problem is a parallel work by [7]. However, there are several key differences. First, the objective considered in [7] is different from ours. The focus in [7] is on finding a solution U, V that is very similar (has high alignment with) the optimal population solution U⇤, V⇤. In order for this to be possible, [7] must rely on an "eigengap" between the singular values of the cross-correlation matrix Cxy. In contrast, since we are only concerned with finding a solution that is good in terms of the population objective (2), we need not, and do not, depend on such an eigengap. If there is no eigengap in the cross-correlation matrix, the population optimal solution is not well-defined, but that is fine for us – we are happy to return any optimal (or nearly optimal) solution. Furthermore, given such an eigengap, the emphasis in [7] is on the guaranteed overall runtime of their method. Their core algorithm is very efficient in terms of runtime, but is not a streaming algorithm and cannot be viewed as an SA algorithm. They do also provide a streaming version, which is runtime and memory efficient, but is still not a “natural” SA algorithm, in that it does not work by making a small update to the solution at each iteration. In contrast, here we present a more “natural” SA algorithm and put more emphasis on its iteration complexity, i.e. the number of samples processed. We do provide polynomial runtime guarantees, but rely on a heuristic capping in order to achieve good runtime performance in practice. Finally, [7] only consider obtaining the top correlated direction (k = 1) and it is not clear how to extend their approach to Problem (1) of finding the top k ≥1 correlated directions. Our methods handle the general problem, with k ≥1, naturally and all our guarantees are valid for any number of desired directions k. 1.4 Contributions The goal in this paper is to directly optimize the CCA “population objective” based on i.i.d. draws from the population rather than capturing the sample, i.e. the training objective. This view justifies and favors stochastic approximation approaches that are far from optimal on the sample but are essentially as good as the sample average approximation approach on the population. Such a view 3 has been advocated in supervised machine learning [6, 18]; here, we carry over the same view to the rich world of unsupervised learning. The main contributions of the paper are as follows. • We give a convex relaxation of the CCA optimization problem. We present two stochastic approximation algorithms for solving the resulting problem. These algorithms work in a streaming setting, i.e. they process one sample at a time, requiring only a single pass through the data, and can easily scale to large datasets. • The proposed algorithms are instances of inexact stochastic mirror descent with the choice of potential function being Frobenius norm and von Neumann entropy, respectively. Prior work on inexact proximal gradient descent suggests a lower bound on the size of the noise required to guarantee convergence for inexact updates [16]. While that condition is violated here for the CCA problem, we give a tighter analysis of our algorithms with noisy gradients establishing sub-linear convergence rates. • We give precise iteration complexity bounds for our algorithms, i.e. we give upper bounds on iterations needed to guarantee a user-specified ✏-suboptimality (w.r.t. population) for CCA. These bounds do not depend on the eigengap in the cross-correlation matrix. To the best of our knowledge this is a first such characterization of CCA in terms of generalization. • We show empirically that the proposed algorithms outperform existing state-of-the-art methods for CCA on a real dataset. We make our implementation of the proposed algorithms and existing competing techniques available online1. 2 Matrix Stochastic Gradient for CCA (MSG-CCA) Problem (3) is a non-convex optimization problem, however, it admits a simple convex relaxation. Taking the convex hull of the constraint set in Problem 3 gives the following convex relaxation: maximize hM, C −1 2 x CxyC −1 2 y i s.t. kMk2 1, kMk⇤k. (5) While our updates are designed for Problem (5), our algorithm returns a rank-k solution, through a simple rounding procedure ([27, Algorithm 4]; see more details below), which has the same objective in expectation. This allows us to guarantee ✏-suboptimality of the output of the algorithm on the original non-convex Problem (3), and equivalently Problem (2). Similar relaxations have been considered previously to design stochastic approximation (SA) algorithms for principal component analysis (PCA) [2] and partial least squares (PLS) [4]. These SA algorithms are instances of stochastic gradient descent – a popular choice for convex learning problems. However, designing similar updates for the CCA problem is challenging since the gradient of the CCA objective (see Problem (5)) w.r.t. M is g := C−1/2 x CxyC−1/2 y , and it is not at all clear how one can design an unbiased estimator, gt, of the gradient g unless one knows the marginal distributions of x and y. Therefore, we consider an instance of inexact proximal gradient method [16] which requires access to a first-order oracle with noisy estimates, @t, of gt. We show that an oracle with bound on E[PT t=1 kgt −@tk] of O( p T) ensures convergence of the proximal gradient method. Furthermore, we propose a first order oracle with the above property which instantiates the inexact gradient as @t := Wx,txty> t Wy,t ⇡gt, (6) where Wx,t, Wy,t are empirical estimates of whitening transformation based on training data seen until time t. This leads to the following stochastic inexact gradient update: Mt+1 = PF (Mt + ⌘t@t), (7) where PF is the projection operator onto the constraint set of Problem (5). Algorithm 1 provides the pseudocode for the proposed method which we term inexact matrix stochastic gradient method for CCA (MSG-CCA). At each iteration, we receive a new sample (xt, yt), update the empirical estimates of the whitening transformations which define the inexact gradient @t. This is followed by a gradient update with step-size ⌘, and projection onto the set of constraints of Problem (5) with respect to the Frobenius norm through the operator PF (·) [2]. After T iterations, the algorithm returns a rank-k matrix after a simple rounding procedure [27]. 1https://www.dropbox.com/sh/dkz4zgkevfyzif3/AABK9JlUvIUYtHvLPCBXLlpha?dl=0 4 Algorithm 1 Matrix Stochastic Gradient for CCA (MSG-CCA) Input: Training data {(xt, yt)}T t=1, step size ⌘, auxiliary training data {(x0 i, y0 i)}⌧ i=1 Output: ˜M 1: Initialize: M1 0, Cx,0 1 ⌧ P⌧ i=1 x0 ix0 i >, Cy,0 1 ⌧ P⌧ i=1 y0 iy0 i > 2: for t = 1, · · · , T do 3: Cx,t t+⌧−1 t+⌧Cx,t−1 + 1 t+⌧xtx> t , Wx,t C −1 2 x,t 4: Cy,t t+⌧−1 t+⌧Cy,t−1 + 1 t+⌧yty> t , Wy,t C −1 2 y,t 5: @t Wx,txty> t Wy,t 6: Mt+1 PF (Mt + ⌘@t) % Projection given in [2] 7: end for 8: ¯M = 1 T PT t=1 Mt 9: ˜M = rounding( ¯M) % Algorithm 2 in [27] We denote the empirical estimates of auto-covariance matrices based on the first t samples by Cx,t and Cy,t. Our analysis of MSG-CCA follows a two-step procedure. First, we show that the empirical estimates of the whitening transform matrices, i.e. Wx,t := C−1/2 x,t , Wy,t := C−1/2 y,t , guarantee that the expected error in the “inexact” estimate, @t, converges to zero as O(1/ p t). Next, we show that the resulting noisy stochastic gradient method converges to the optimum as O(1/ p T). In what follows, we will denote the true whitening transforms by Wx := C−1/2 x and Wy := C−1/2 y . Since Algorithm 1 requires inverting empirical auto-covariance matrices, we need to ensure that the smallest eigenvalues of Cx,t and Cy,t are bounded away from zero. Our first technical result shows that in this happens with high probability for all iterates. Lemma 2.1. With probability 1 −δ with respect to training data drawn i.i.d. from D, it holds uniformly for all t that λmin(Cx,t) ≥rx 2 and λmin(Cy,t) ≥ry 2 whenever: ⌧≥max{ 1 cx log 0 @ 2dx log ⇣ 1 1−δ ⌘ 1 A −1, 1 c x log (2dx) , 1 cy log 0 @ 2dy log ⇣ 1 1−δ ⌘ 1 A −1, 1 c y log (2dy)}. Here cx = 3r2 x 6B2+Brx , cy = 3r2 y 6B2+Bry . We denote by At the event that for all j = 1, .., t −1 the empirical cross-covariance matrices Cx,j and Cy,j have their smallest eigenvalues bounded from below by rx and ry, respectively. Lemma 2.1 above, guarantees that this event occurs with probability at least 1 −δ, as long as there are ⌧= ⌦ ✓ B2 r2 log ✓ 2d log( 1 1−δ) ◆◆ samples in the auxiliary dataset. Lemma 2.2. Assume that the event At occurs, and that with probability one, for (x, y) ⇠D, we have max{kxk2 , kyk2} B. Then, for := 8B2p 2 log(d) r2 , the following holds for all t: ED [kgt −@tk2 | At] p t. The result above bounds the size of the expected noise in the estimate of the inexact gradient. Not surprisingly, the error decays as our estimates of the whitening transformation improve with more data. Moreover, the rate at which the error decreases is sufficient to bound the suboptimality of the MSG-CCA algorithm even with noisy biased stochastic gradients. Theorem 2.3. After T iterations of MSG-CCA (Algorithm 1) with step size ⌘= 2 p k G p T , auxiliary sample of size ⌧= ⌦( B2 r2 log( 2d log( p T p T −1 ))), and initializing M1 = 0, the following holds: hM⇤, C −1 2 x CxyC −1 2 y i −E[h ˜M, C −1 2 x CxyC −1 2 y i] 2 p kG + 2k+ kB/r p T , (8) 5 where the expectation is with respect to the i.i.d. samples and rounding, is as defined in Lemma 2.2, M⇤is the optimum of (3), ˜M is the rank-k output of MSG-CCA, and G = 2B prxry . While Theorem 2.3 gives a bound on the objective of Problem (3), it implies a bound on the original CCA objective of Problem (1). In particular, given a rank-k factorization of ˜M := UV>, such that U>U = Ik and V>V = Ik, we construct ˜U = C −1 2 x,T U, ˜V := C −1 2 y,T V. (9) We then have the following generalization bound. Theorem 2.4. After T iterations of MSG-CCA (Algorithm 1) with step size ⌘= 2 p k G p T , auxiliary sample of size ⌧= ⌦( B2 r2 log( 2d log( T T −1 ))), and initializing M1 = 0, the following holds Tr(U> ⇤CxyV⇤)−E[Tr(˜U>Cxy ˜V)] 2 p kG + 2k p T + kB rT + 2kB r2 r 2B2 T log (d) + 2B 3T log (d) ! , E[k˜U>Cx ˜U −Ik2] B r2x r 2B2 T log (dx) + 2B 3T log (dx) ! + B + 1 T , E[k˜V>Cy ˜V −Ik2] B r2y r 2B2 T log (dy) + 2B 3T log (dy) ! + B + 1 T , where the expectation is with respect to the i.i.d. samples and rounding, the pair (U⇤, V⇤) is the optimum of (1), ( ˜U, ˜V ) are the factors (defined in (9)) of the rank-k output of MSG-CCA, r := min{rx, ry}, d := max{dx, dy}, is as given in Lemma 2.2, and G = 2B prxry . All proofs are deferred to the Appendix in the supplementary material. Few remarks are in order. Convexity: In our design and analysis of MSG-CCA, we have leveraged the following observations: (i) since the objective is linear, an optimum of (5) is always attained at an extreme point, corresponding to an optimum of (3); (ii) the exact convex relaxation (5) is tractable (this is not often the case for non-convex problems); and (iii) although (5) might also have optima not on extreme points, we have an efficient randomized method, called rounding, to extract from any feasible point of (5) a solution of (3) that has the same value in expectation [27]. Eigengap free bound: Theorem 2.3 and 2.4 do not require an eigengap in the cross-correlation matrix Cxy, and in particular the error bound, and thus the implied iteration complexity to achieve a desired suboptimality does not depend on an eigengap. Comparison with [7]: It is not straightforward to compare with the results of [7]. As discussed in Section 1.3, authors in [7] consider only the case k = 1 and their objective is different than ours. They seek (u, v) that have high alignment with the optimal (u⇤, v⇤) as measured through the alignment ∆(¯u, ¯v) := 1 2 $ ¯u>Cxu⇤+ ¯v>Cyv⇤ % . Furthermore, the analysis in [7] is dependent on the eigengap γ = σ1 −σ2 between the top two singular values σ1, σ2 of the population cross-correlation matrix T. Nevertheless, one can relate their objective ∆(u, v) to ours and ask what their guarantees ensure in terms of our objective, namely achieving ✏-suboptimality for Problem (3). For the case k = 1, and in the presence of an eigengap γ, the method of [7] can be used to find an ✏-suboptimal solution to Problem (3) with O( log2(d) ✏γ2 ) samples. Capped MSG-CCA: Although MSG-CCA comes with good theoretical guarantees, the computational cost per iteration can be O(d3). Therefore, we consider a practical variant of MSG-CCA that explicitly controls the rank of the iterates. To ensure computational efficiency, we recommend imposing a hard constraint on the rank of the iterates of MSG-CCA, following an approach similar to previous works on PCA [2] and PLS [4]: maximize hM, C −1 2 x CxyC −1 2 y i s.t. kMk2 1, kMk⇤k, rank (M) K. (10) For estimates of the whitening transformations, at each iteration, we set the smallest d−K eigenvalues of the covariance matrices to a constant (of the order of the estimated smallest eigenvalue of the 6 covariance matrix). This allows us to efficiently compute the whitening transformations since the covariance matrices decompose into a sum of a low-rank matrix and a scaled identity matrix, bringing down the computational cost per iteration to O(dK2). We observe empirically on a real dataset (see Section 4) that this procedure along with capping the rank of MSG iterates does not hurt the convergence of MSG-CCA. 3 Matrix Exponentiated Gradient for CCA (MEG-CCA) In this section, we consider matrix multiplicative weight updates for CCA. Multiplicative weights method is a generic algorithmic technique in which one updates a distribution over a set of interest by iteratively multiplying probability mass of elements [12]. In our setting, the set is that of d kdimensional (paired) subspaces and the multiplicative algorithm is an instance of matrix exponentiated gradient (MEG) update. A motivation for considering MEG is the fact that for related problems, including principal component analysis (PCA) and partial least squares (PLS), MEG has been shown to yield fast optimistic rates [4, 22, 26]. Unfortunately we are not able to recover such optimistic rates for CCA as the error in the inexact gradient decreases too slowly. Our development of MEG requires the symmetrization of Problem (3). Recall that g := C−1/2 x CxyC−1/2 y . Consider the following symmetric matrix C := 0 g g 0 4 of size d ⇥d, where d = dx + dy. The matrix C is referred to as the self-adjoint dilation of the matrix g [20]. Given the SVD of g = U⌃V> with no repeated singular values, the eigen-decomposition of C is given as C = 1 2 ✓ U U V −V ◆✓ ⌃ 0 0 −⌃ ◆✓ U U V −V ◆> . In other words, the top-k left and right singular vectors of C−1/2 x CxyC−1/2 y , which comprise the CCA solution we seek, are encoded in top and bottom rows, respectively, of the top-k eigenvectors of its dilation. This suggests the following scaled re-parameterization of Problem (3): find M 2 Rd⇥d that maximize hM, Ci s.t. λi(M) 2 {0, 1}, i = 1, . . . , d, rank (M) = k. (11) As in Section 2, we take the convex hull of the constraint set to get a convex relaxation to Problem (11). maximize hM, Ci s.t. M ⌫0, kMk2 1, Tr (M) = k. (12) Stochastic mirror descent on Problem (12) with the choice of potential function being the quantum relative entropy gives the following updates [4, 27]: bMt = exp (log (Mt−1) + ⌘Ct) Tr (exp (log (Mt−1) + ⌘Ct)), Mt = P ⇣ bMt ⌘ , (13) where Ct is the self-adjoint dilation of unbiased instantaneous gradient gt, and P denotes the Bregman projection [10] onto the convex set of constraints in Problem (12). As discussed in Section 2 we only need an inexact gradient estimate ˜Ct of Ct with a bound on E[PT t=1 kCt −˜Ctk|AT ] of O( p T). Setting ˜Ct to be the self-adjoint dilation of @t, defined in Section 2, guarantees such a bound. Lemma 3.1. Assume that the event At occurs,gt −@t has no repeated singular values and that with probability one, for (x, y) ⇠D, we have max{kxk2 , kyk2} B. Then, for defined in lemma 2.2, we have that, Ext,ythMt−1 −M⇤, Ct −˜Ct|Ati 2k p t , where M⇤is the optimum of Problem (11). Using the bound above, we can bound the suboptimality gap in the population objective between the true rank-k CCA solution and the rank-k solution returned by MEG-CCA. Theorem 3.2. After T iterations of MEG-CCA (see Algorithm 2 in Appendix) with step size ⌘= 1 G log ✓ 1 + q log(d) GT ◆ , auxiliary sample of size ⌧= ⌦( B2 r2 log( 2d log( p T p T −1 ))) and initializing M0 = 1 dI, the following holds: hM⇤, Ci −E[h ˜M, Ci] 2k r G2 log (d) T + 2 k p T , 7 where the conditional expectation is taken with respect to the distribution and the internal randomization of the algorithm, M⇤is the optimum of Problem (11), ˜M is the rank-k output of MEG-CCA after rounding, G = 2B prxry and is defined in Lemma 2.2. All of our remarks regarding latent convexity of the problem and practical variants from Section 2 apply to MEG-CCA as well. We note, however, that without additional assumptions like eigengap for T we are not able to recover projections to the canonical subspaces as done in Theorem 2.4. 4 Experiments We provide experimental results for our proposed methods, in particular we compare capped-MSG which is the practical variant of Algorithm 1 with capping as defined in equation (10), and MEG (Algorithm 2 in the Appendix), on a real dataset, Mediamill [19], consisting of paired observations of videos and corresponding commentary. We compare our algorithms against CCALin of [8], ALS CCA of [24]2, and SAA, which is denoted by “batch” in Figure 1. All of the comparisons are given in terms of the CCA objective as a function of either CPU runtime or number of iterations. The target dimensionality in our experiments is k 2 {1, 2, 4}. The choice of k is dictated largely by the fact that the spectrum of the Mediamill dataset decays exponentially. To ensure that the problem is well-conditioned, we add λI for λ = 0.1 to the empirical estimates of the covariance matrices on Mediamill dataset. For both MSG and MEG we set the step size at iteration t to be ⌘t = 0.1 p t . Mediamill is a multiview dataset consisting of n = 10, 000 corresponding videos and text annotations with labels representing semantic concepts [19]. The image view consists of 120-dimensional visual features extracted from representative frames selected from videos, and the textual features are 100-dimensional. We give the competing algorithms, both CCALin and ALS CCA, the advantage of the knowledge of the eigengap at k. In particular, we estimate the spectrum of the matrix bT for the Mediamill dataset and set the gap-dependent parameters in CCALin and ALS CCA accordingly. We note, however, that estimating the eigengap to set the parameters is impractical in real scenarios. Both CCALin and ALS CCA will therefore require additional tuning compared to MSG and MEG algorithms proposed here. In the experiments, we observe that CCALin and ALS CCA outperform MEG and capped-MSG when recovering the top CCA component, in terms of progress per-iteration. However, capped-MSG is the best in terms of the overall runtime. The plots are shown in Figure 1. 5 Discussion We study CCA as a stochastic optimization problem and show that it is efficiently learnable by providing analysis for two stochastic approximation algorithms. In particular, the proposed algorithms achieve ✏-suboptimality in population objective in iterations O( 1 ✏2 ). Note that both of our Algorithms, MSG-CCA in Algorithm 1 and MEG-CCA in Algorithm 2 in Appendix B are instances of inexact proximal-gradient method which was studied in [16]. In particular, both algorithms receive a noisy gradient @t = gt + Et at iteration t and perform exact proximal steps (Bregman projections in equations (7) and (13)). The main result in [16] provides an O(E2/T) convergence rate, where E = PT t=1 kEtk is the partial sum of the errors in the gradients. It is shown that E = o( p T) is a necessary condition to obtain convergence. However, for the CCA problem that we are considering in this paper, our lemma A.6 shows that E = O( p T). In fact, it is easy to see that E = ⇥( p T). Our analysis yields O( 1 p T ) convergence rates for both Algorithms 1 and 2. This perhaps warrants further investigation into the more general problem of inexact proximal gradient method. In empirical comparisons, we found the capped version of the proposed MSG algorithm to outperform other methods including MEG in terms of overall runtime needed to reach an ✏-suboptimal solution. Future work will focus on gaining a better theoretical understanding of capped MSG. 2We run ALS only for k = 1 as the algorithm and the current implementation from the authors does not handle k ≥1. 8 (a) k = 1 (b) k = 2 (c) k = 4 102 103 Iteration 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 Objective CAPPED-MSG MEG CCALin batch ALSCCA Max Objective 102 103 Iteration 0 0.1 0.2 0.3 0.4 0.5 Objective 102 103 Iteration 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Objective 100 102 Runtime (in seconds) 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 Objective 100 102 Runtime (in seconds) 0 0.1 0.2 0.3 0.4 0.5 Objective 100 101 102 Runtime (in seconds) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Objective Figure 1: Comparisons of CCA-Lin, CCA-ALS, MSG, and MEG for CCA optimization on the MediaMill dataset, in terms of the objective value as a function of iteration (top) and as a function of CPU runtime (bottom). Acknowledgements This research was supported in part by NSF BIGDATA grant IIS-1546482. References [1] Z. Allen-Zhu and Y. Li. Doubly Accelerated Methods for Faster CCA and Generalized Eigendecomposition. In Proceedings of the 34th International Conference on Machine Learning, ICML, 2017. Full version available at http://arxiv.org/abs/1607.06017. [2] R. Arora, A. Cotter, and N. Srebro. Stochastic optimization of PCA with capped MSG. In Advances in Neural Information Processing Systems, NIPS, 2013. [3] R. Arora and K. Livescu. Multi-view CCA-based acoustic features for phonetic recognition across speakers and domains. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pages 7135–7139. IEEE, 2013. [4] R. Arora, P. Mianjy, and T. Marinov. Stochastic optimization for multiview representation learning using partial least squares. In Proceedings of The 33rd International Conference on Machine Learning, ICML, pages 1786–1794, 2016. [5] A. Benton, R. Arora, and M. Dredze. Learning multiview embeddings of twitter users. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, volume 2, pages 14–19, 2016. [6] O. Bousquet and L. Bottou. The tradeoffs of large scale learning. In Advances in neural information processing systems, pages 161–168, 2008. [7] C. Gao, D. Garber, N. Srebro, J. Wang, and W. Wang. Stochastic canonical correlation analysis. arXiv preprint arXiv:1702.06533, 2017. [8] R. Ge, C. Jin, P. Netrapalli, A. Sidford, et al. Efficient algorithms for large-scale generalized eigenvector computation and canonical correlation analysis. In International Conference on Machine Learning, pages 2741–2750, 2016. [9] S. Golden. Lower bounds for the helmholtz function. Physical Review, 137(4B):B1127, 1965. 9 [10] M. Herbster and M. K. Warmuth. Tracking the best linear predictor. Journal of Machine Learning Research, 1(Sep):281–309, 2001. [11] H. Hotelling. Relations between two sets of variates. Biometrika, 28(3/4):321–377, 1936. [12] S. Kale. Efficient algorithms using the multiplicative weights update method. Princeton University, 2007. [13] E. Kidron, Y. Y. Schechner, and M. Elad. Pixels that sound. In Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on, volume 1, pages 88–95. IEEE, 2005. [14] Y. Lu and D. P. Foster. Large scale canonical correlation analysis with iterative least squares. In Advances in Neural Information Processing Systems, pages 91–99, 2014. [15] Z. Ma, Y. Lu, and D. Foster. Finding linear structure in large datasets with scalable canonical correlation analysis. In Proceedings of The 32nd International Conference on Machine Learning, pages 169–178, 2015. [16] M. Schmidt, N. L. Roux, and F. R. Bach. Convergence rates of inexact proximal-gradient methods for convex optimization. In Advances in neural information processing systems, pages 1458–1466, 2011. [17] B. A. Schmitt. Perturbation bounds for matrix square roots and pythagorean sums. Linear algebra and its applications, 174:215–227, 1992. [18] S. Shalev-Shwartz and N. Srebro. Svm optimization: inverse dependence on training set size. In Proceedings of the 25th international conference on Machine learning, pages 928–935. ACM, 2008. [19] C. G. Snoek, M. Worring, J. C. Van Gemert, J.-M. Geusebroek, and A. W. Smeulders. The challenge problem for automated detection of 101 semantic concepts in multimedia. In Proceedings of the 14th ACM international conference on Multimedia, pages 421–430. ACM, 2006. [20] J. A. Tropp. User-friendly tail bounds for sums of random matrices. Foundations of Computational Mathematics, 12(4):389–434, 2012. [21] J. A. Tropp et al. An introduction to matrix concentration inequalities. Foundations and Trends R⃝in Machine Learning, 8(1-2):1–230, 2015. [22] K. Tsuda, G. Rätsch, and M. K. Warmuth. Matrix exponentiated gradient updates for on-line learning and bregman projection. In Journal of Machine Learning Research, pages 995–1018, 2005. [23] A. Vinokourov, N. Cristianini, and J. Shawe-Taylor. Inferring a semantic representation of text via cross-language correlation analysis. In Advances in neural information processing systems, pages 1497–1504, 2003. [24] W. Wang, J. Wang, D. Garber, and N. Srebro. Efficient globally convergent stochastic optimization for canonical correlation analysis. In Advances in Neural Information Processing Systems, pages 766–774, 2016. [25] M. K. Warmuth and D. Kuzmin. Online variance minimization. In Learning theory, pages 514–528. Springer, 2006. [26] M. K. Warmuth and D. Kuzmin. Randomized PCA algorithms with regret bounds that are logarithmic in the dimension. In NIPS’06, 2006. [27] M. K. Warmuth and D. Kuzmin. Randomized online PCA algorithms with regret bounds that are logarithmic in the dimension. Journal of Machine Learning Research, 9(10), 2008. 10 | 2017 | 505 |
7,014 | Linear regression without correspondence Daniel Hsu Columbia University New York, NY djhsu@cs.columbia.edu Kevin Shi Columbia University New York, NY kshi@cs.columbia.edu Xiaorui Sun Microsoft Research Redmond, WA xiaoruisun@cs.columbia.edu Abstract This article considers algorithmic and statistical aspects of linear regression when the correspondence between the covariates and the responses is unknown. First, a fully polynomial-time approximation scheme is given for the natural least squares optimization problem in any constant dimension. Next, in an average-case and noise-free setting where the responses exactly correspond to a linear function of i.i.d. draws from a standard multivariate normal distribution, an efficient algorithm based on lattice basis reduction is shown to exactly recover the unknown linear function in arbitrary dimension. Finally, lower bounds on the signal-to-noise ratio are established for approximate recovery of the unknown linear function by any estimator. 1 Introduction Consider the problem of recovering an unknown vector ¯w 2 Rd from noisy linear measurements when the correspondence between the measurement vectors and the measurements themselves is unknown. The measurement vectors (i.e., covariates) from Rd are denoted by x1, x2, . . . , xn; for each i 2 [n] := {1, 2, . . . , n}, the i-th measurement (i.e., response) yi is obtained using x¯⇡(i): yi = ¯w >x¯⇡(i) + "i , i 2 [n] . (1) Above, ¯⇡is an unknown permutation on [n], and the "1, "2, . . . , "n are unknown measurement errors. This problem, which has been called unlabeled sensing [22], linear regression with an unknown permutation [18], and linear regression with shuffled labels [1], arises in many settings; see the aforementioned references for more details. In short, sensing limitations may create ambiguity in or even completely lose the ordering of measurements. The problem is also interesting because the missing correspondence makes an otherwise well-understood problem into one with very different computational and statistical properties. Prior works. Unnikrishnan et al. [22] study conditions on the measurement vectors that permit recovery of any target vector ¯w under noiseless measurements. They show that when the entries of the xi are drawn i.i.d. from a continuous distribution, and n ≥2d, then almost surely, every vector ¯w 2 Rd is uniquely determined by noiseless correspondence-free measurements as in (1). (Under noisy measurements, it is shown that ¯w can be recovered when an appropriate signal-to-noise ratio tends to infinity.) It is also shown that n ≥2d is necessary for such a guarantee that holds for all vectors ¯w 2 Rd. Pananjady et al. [18] study statistical and computational limits on recovering the unknown permutation ¯⇡. On the statistical front, they consider necessary and sufficient conditions on the signal-to-noise ratio SNR :=k ¯wk2 2 /σ2 when the measurement errors ("i)n i=1 are i.i.d. draws from the normal distribution N(0, σ2) and the measurement vectors (xi)n i=1 are i.i.d. draws from the standard multivariate normal distribution N(0, Id). Roughly speaking, exact recovery of ¯⇡is possible via maximum likelihood 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. when SNR ≥nc for some absolute constant c > 0, and approximate recovery is impossible for any method when SNR nc0 for some other absolute constant c0 > 0. On the computational front, they show that the least squares problem (which is equivalent to maximum likelihood problem) min w,⇡ n X i=1 ⇣ w >x⇡(i) −yi ⌘2 (2) given arbitrary x1, x2, . . . , xn 2 Rd and y1, y2, . . . , yn 2 R is NP-hard when d = ⌦(n)1, but admits a polynomial-time algorithm (in fact, an O(n log n)-time algorithm based on sorting) when d = 1. Abid et al. [1] observe that the maximum likelihood estimator can be inconsistent for estimating ¯w in certain settings (including the normal setting of Pananjady et al. [18], with SNR fixed but n ! 1). One of the alternative estimators they suggest is consistent under additional assumptions in dimension d = 1. Elhami et al. [8] give a O(dnd+1)-time algorithm that, in dimension d = 2, is guaranteed to approximately recover ¯w when the measurement vectors are chosen in a very particular way from the unit circle and the measurement errors are uniformly bounded. Contributions. We make progress on both computational and statistical aspects of the problem. 1. We give an approximation algorithm for the least squares problem from (2) that, any given (xi)n i=1, (yi)n i=1, and ✏2 (0, 1), returns a solution with objective value at most 1 + ✏times that of the minimum in time (n/✏)O(d). This a fully polynomial-time approximation scheme for any constant dimension. 2. We give an algorithm that exactly recovers ¯w in the measurement model from (1), under the assumption that there are no measurement errors and the covariates (xi)n i=1 are i.i.d. draws from N(0, Id). The algorithm, which is based on a reduction to a lattice problem and employs the lattice basis reduction algorithm of Lenstra et al. [16], runs in poly(n, d) time when the covariate vectors (xi)n i=1 and target vector ¯w are appropriately quantized. This result may also be regarded as for each-type guarantee for exactly recovering a fixed vector ¯w, which complements the for all-type results of Unnikrishnan et al. [22] concerning the number of measurement vectors needed for recovering all possible vectors. 3. We show that in the measurement model from (1) where the measurement errors are i.i.d. draws from N(0, σ2) and the covariate vectors are i.i.d. draws from N(0, Id), then no algorithm can approximately recover ¯w unless SNR ≥C min {1, d/ log log(n)} for some absolute constant C > 0. We also show that when the covariate vectors are i.i.d. draws from the uniform distribution on [−1/2, 1/2]d, then approximate recovery is impossible unless SNR ≥C0 for some other absolute constant C0 > 0. Our algorithms are not meant for practical deployment, but instead are intended to shed light on the computational difficulty of the least squares problem and the average-case recovery problem. Indeed, note that a naïve brute-force search over permutations requires time ⌦(n!) = n⌦(n), and the only other previous algorithms (already discussed above) were restricted to d = 1 [18] or only had some form of approximation guarantee when d = 2 [8]. We are not aware of previous algorithms for the average-case problem in general dimension d.2 Our lower bounds on SNR stand in contrast to what is achievable in the classical linear regression model (where the covariate/response correspondence is known): in that model, the SNR requirement for approximately recovering ¯w scales as d/n, and hence the problem becomes easier with n. The lack of correspondence thus drastically changes the difficulty of the problem. 2 Approximation algorithm for the least squares problem In this section, we consider the least squares problem from Equation (2). The inputs are an arbitrary matrix X = [x1|x2| · · · |xn]> 2 Rn⇥d and an arbitrary vector y = (y1, y2, . . . , yn)> 2 Rn, and the 1Pananjady et al. [18] prove that PARTITION reduces to the problem of deciding if the optimal value of (2) is zero or non-zero. Note that PARTITION is weakly, but not strongly, NP-hard: it admits a pseudo-polynomial-time algorithm [10, Section 4.2]. In Appendix A, we prove that the least squares problem is strongly NP-hard by reduction from 3-PARTITION (which is strongly NP-complete [10, Section 4.2.2]). 2A recent algorithm of Pananjady et al. [19] exploits a similar average-case setting but only for a somewhat easier variant of the problem where more information about the unknown correspondence is provided. 2 Algorithm 1 Approximation algorithm for least squares problem input Covariate matrix X = [x1|x2| · · · |xn]> 2 Rn⇥k; response vector y = (y1, y2, . . . , yn)> 2 Rn; approximation parameter ✏2 (0, 1). assume X >X = Ik. output Weight vector ˆw 2 Rk and permutation matrix ˆ⇧2 Pn. 1: Run “Row Sampling” algorithm with input matrix X to obtain a matrix S 2 Rr⇥n with r = 4k. 2: Let B be the set of vectors b = (b1, b2, . . . , bn)> 2 Rn satisfying the following: for each i 2 [n], • if the i-th column of S is all zeros, then bi = 0; • otherwise, bi 2 {y1, y2, . . . , yn}. 3: Let c := 1 + 4(1 + p n/(4k))2. 4: for each b 2 B do 5: Compute ˜wb 2 arg minw2Rk kS(Xw −b)k2 2, and let rb := min⇧2Pn kX ˜wb −⇧ >yk2 2. 6: Construct a p ✏rb/c-net Nb for the Euclidean ball of radius pcrb around ˜wb, so that for each v 2 Rk with kv −˜wbk2 pcrb, there exists v0 2 Nb such that kv −v0k2 p ✏rb/c. 7: end for 8: return ˆw 2 arg min w2S b2B Nb min ⇧2Pn kXw −⇧ >yk2 2 and ˆ⇧2 arg min ⇧2Pn kX ˆw −⇧ >yk2 2. goal is to find a vector w 2 Rd and permutation matrix ⇧2 Pn (where Pn denotes the space of n⇥n permutation matrices3) to minimize kXw −⇧ >yk2 2. This problem is NP-hard in the case where d = ⌦(n) [18] (see also Appendix A). We give an approximation scheme that, for any ✏2 (0, 1), returns a (1 + ✏)-approximation in time (n/✏)O(k) + poly(n, d), where k := rank(X) min{n, d}. We assume without loss of generality that X 2 Rn⇥k and X >X = Ik. This is because we can always replace X with its matrix of left singular vectors U 2 Rn⇥k, obtained via singular value decomposition X = U⌃V >, where U >U = V >V = Ik and ⌃≻0 is diagonal. A solution (w, ⇧) for (U, y) has the same cost as the solution (V ⌃−1w, ⇧) for (X, y), and a solution (w, ⇧) for (X, y) has the same cost as the solution (⌃V >w, ⇧) for (U, y). 2.1 Algorithm Our approximation algorithm, shown as Algorithm 1, uses a careful enumeration to beat the naïve brute-force running time of ⌦(|Pn|) = ⌦(n!). It uses as a subroutine a “Row Sampling” algorithm of Boutsidis et al. [5] (described in Appendix B), which has the following property. Theorem 1 (Specialization of Theorem 12 in [5]). There is an algorithm (“Row Sampling”) that, given any matrix A 2 Rn⇥k with n ≥k, returns in poly(n, k) time a matrix S 2 Rr⇥n with r = 4k such that the following hold. 1. Every row of S has at most one non-zero entry. 2. For every b 2 Rn, every w0 2 arg minw2Rk kS(Aw −b)k2 2 satisfies kAw0 −bk2 2 c · minw2Rk kAw −bk2 2 for c = 1 + 4(1 + p n/(4k))2 = O(n/k). The matrix S returned by Row Sampling determines a (weighted) subset of O(k) rows of A such that solving a (ordinary) least squares problem (with any right-hand side b) on this subset of rows and corresponding right-hand side entries yields a O(n/k)-approximation to the least squares problem over all rows and right-hand side entries. Row Sampling does not directly apply to our problem because (1) it does not minimize over permutations of the right-hand side, and (2) the approximation factor is too large. However, we are able to use it to narrow the search space in our problem. An alternative to Row Sampling is to simply enumerate all subsets of k rows of X. This is justified by a recent result of Derezi´nski and Warmuth [7], which shows that for any right-hand side b 2 Rn, using “volume sampling” [3] to choose a matrix S 2 {0, 1}k⇥k (where each row has one non-zero entry) gives a similar guarantee as that of Row Sampling, except with the O(n/k) factor replaced by k + 1 in expectation. 3Each permutation matrix ⇧2 Pn corresponds to a permutation ⇡on [n]; the (i, j)-th entry of ⇧is one if ⇡(i) = j and is zero otherwise. 3 2.2 Analysis The approximation guarantee of Algorithm 1 is given in the following theorem. Theorem 2. Algorithm 1 returns ˆw 2 Rk and ˆ⇧2 Pn satisfying %%%X ˆw −ˆ⇧ >y %%% 2 2 (1 + ✏) min w2Rk,⇧2Pn %%Xw −⇧ >y %%2 2 . Proof. Let opt := minw,⇧kXw −⇧ >yk2 2 be the optimal cost, and let (w?, ⇧?) denote a solution achieving this cost. The optimality implies that w? satisfies the normal equations X >Xw? = X >⇧ > ? y. Observe that there exists a vector b? 2 B satisfying Sb? = S⇧ > ? y. By Theorem 1 and the normal equations, the vector ˜wb? and cost value rb? satisfy opt rb? %%X ˜wb? −⇧ > ? y %%2 2 = %%X( ˜wb? −w?) %%2 2 + opt c · opt . Moreover, since X >X = Ik, we have that k ˜wb? −w?k2 p (c −1) opt pcrb?. By construction of Nb?, there exists w 2 Nb? satisfying kw −w?k2 2 = kX(w −w?)k2 2 ✏rb?/c ✏opt. For this w, the normal equations imply min ⇧2Pn kXw −⇧ >yk2 2 kXw −⇧ > ? yk2 2 = kX(w −w?)k2 2 + opt (1 + ✏) opt . Therefore, the solution returned by Algorithm 1 has cost no more than (1 + ✏) opt. By the results of Pananjady et al. [18] for maximum likelihood estimation, our algorithm enjoys recovery guarantees for ¯w and ¯⇡when the data come from the Gaussian measurement model (1). However, the approximation guarantee also holds for worst-case inputs without generative assumptions. Running time. We now consider the running time of Algorithm 1. There is the initial cost for singular value decomposition (as discussed at the beginning of the section), and also for “Row Sampling”; both of these take poly(n, d) time. For the rest of the algorithm, we need to consider the size of B and the size of the net Nb for each b 2 B. First, we have |B| nr = nO(k), since S has only 4k rows and each row has at most a single non-zero entry. Next, for each b 2 B, we construct the δ-net Nb (for δ := p ✏rb/c) by constructing a δ/ p k-net for the `1-ball of radius pcrb centered at ˜wb (using an appropriate axis-aligned grid). This has size |Nb| (4c2k/✏)k/2 = (n/✏)O(k). Finally, each arg minw2Rk computation takes O(nk2) time, and each (arg) min⇧2Pn takes O(nk + n log n) time [18] (also see Appendix B). So, the overall running time is (n/✏)O(k) + poly(n, d). 3 Exact recovery algorithm in noiseless Gaussian setting To counter the intractability of the least squares problem in (2) confronted in Section 2, it is natural to explore distributional assumptions that may lead to faster algorithms. In this section, we consider the noiseless measurement model where the (xi)n i=1 are i.i.d. draws from N(0, Id) (as in [18]). We give an algorithm that exactly recovers ¯w with high probability when n ≥d + 1. The algorithm runs in poly(n, d)-time when (xi)n i=1 and ¯w are appropriately quantized. It will be notationally simpler to consider n + 1 covariate vectors and responses yi = ¯w >x¯⇡(i) , i = 0, 1, . . . , n . (3) Here, (xi)n i=0 are n + 1 i.i.d. draws from N(0, Id), the unknown permutation ¯⇡is over {0, 1, . . . , n}, and the requirement of at least d + 1 measurements is expressed as n ≥d. In fact, we shall consider a variant of the problem in which we are given one of the values of the unknown permutation ¯⇡. Without loss of generality, assume we are given that ¯⇡(0) = 0. Solving this variant of the problem suffices because there are only n + 1 possible values of ¯⇡(0): we can try them all, incurring just a factor n + 1 in the computation time. So henceforth, we just consider ¯⇡as an unknown permutation on [n]. 4 Algorithm 2 Find permutation input Covariate vectors x0, x1, x2, . . . , xn in Rd; response values y0, y1, y2, . . . , yn in R; confidence parameter δ 2 (0, 1); lattice parameter β > 0. assume there exists ¯w 2 Rd and permutation ¯⇡on [n] such that yi = ¯w>x¯⇡(i) for each i 2 [n], and that y0 = ¯w>x0. output Permutation ˆ⇡on [n] or failure. 1: Let X = [x1|x2| · · · |xn]> 2 Rn⇥d, and its pseudoinverse be X† = [˜x1|˜x2| · · · |˜xn]. 2: Create Subset Sum instance with n2 source numbers ci,j := yi˜x > j x0 for (i, j) 2 [n] ⇥[n] and target sum y0. 3: Run Algorithm 3 with Subset Sum instance and lattice parameter β. 4: if Algorithm 3 returns a solution S ✓[n] ⇥[n] then 5: return any permutation ˆ⇡on [n] such that ˆ⇡(i) = j implies (i, j) 2 S. 6: else 7: return failure. 8: end if Algorithm 3 Lagarias and Odlyzko [12] subset sum algorithm input Source numbers {ci}i2I ⇢R; target sum t 2 R; lattice parameter β > 0. output Subset ˆS ✓I or failure. 1: Construct lattice basis B 2 R(|I|+2)⇥(|I|+1) where B := " I|I|+1 βt −βci : i 2 I # 2 R(|I|+2)⇥(|I|+1) . 2: Run basis reduction [e.g., 16] to find non-zero lattice vector v of length at most 2|I|/2 · λ1(B). 3: if v = z(1, χ> ˆ S, 0)>, with z 2 Z and χ ˆ S 2 {0, 1}I is characteristic vector for some ˆS ✓I then 4: return ˆS. 5: else 6: return failure. 7: end if 3.1 Algorithm Our algorithm, shown as Algorithm 2, is based on a reduction to the Subset Sum problem. An instance of Subset Sum is specified by an unordered collection of source numbers {ci}i2I ⇢R, and a target sum t 2 R. The goal is to find a subset S ✓I such that P i2S ci = t. Although Subset Sum is NP-hard in the worst case, it is tractable for certain structured instances [12, 9]. We prove that Algorithm 2 constructs such an instance with high probability. A similar algorithm based on such a reduction was recently used by Andoni et al. [2] for a different but related problem. Algorithm 2 proceeds by (i) solving a Subset Sum instance based on the covariate vectors and response values (using Algorithm 3), and (ii) constructing a permutation ˆ⇡on [n] based on the solution to the Subset Sum instance. With the permutation ˆ⇡in hand, we (try to) find a solution w 2 Rd to the system of linear equations yi = w>xˆ⇡(i) for i 2 [n]. If ˆ⇡= ¯⇡, then there is a unique such solution almost surely. 3.2 Analysis The following theorem is the main recovery guarantee for Algorithm 2. Theorem 3. Pick any δ 2 (0, 1). Suppose (xi)n i=0 are i.i.d. draws from N(0, Id), and (y0)n i=1 follow the noiseless measurement model from (3) for some ¯w 2 Rd and permutation ¯⇡on [n] (and ¯⇡(0) = 0), and that n ≥d. Furthermore, suppose Algorithm 2 is run with inputs (xi)n i=0, (yi)n i=0, δ, and β, and also that β ≥2n2/" where " is defined in Equation (8). With probability at least 1 −δ, Algorithm 2 returns ˆ⇡= ¯⇡. Remark 1. The value of " from Equation (8) is directly proportional tok ¯wk2, and Algorithm 2 requires a lower bound on " (in the setting of the lattice parameter β). Hence, it suffices to determine 5 a lower bound onk ¯wk2. Such a bound can be obtained from the measurement values: a standard tail bound (Lemma 6 in Appendix C) shows that with high probability, pPn i=1 y2 i /(2n) is a lower bound on k ¯wk2, and is within a constant factor of it as well. Remark 2. Algorithm 2 strongly exploits the assumption of noiseless measurements, which is expected given the SNR lower bounds of Pananjady et al. [18] for recovering ¯⇡. The algorithm, however, is also very brittle and very likely fails in the presence of noise. Remark 3. The recovery result does not contradict the results of Unnikrishnan et al. [22], which show that a collection of 2d measurement vectors are necessary for recovering all ¯w, even in the noiseless measurement model of (3). Indeed, our result shows that for a fixed ¯w 2 Rd, with high probability d + 1 measurements in the model of (3) suffice to permit exactly recovery of ¯w, but this same set of measurement vectors (when d + 1 < 2d) will fail for some other ¯w0. The proof of Theorem 3 is based on the following theorem—essentially due to Lagarias and Odlyzko [12] and Frieze [9]—concerning certain structured instances of Subset Sum that can be solved using the lattice basis reduction algorithm of Lenstra et al. [16]. Given a basis B = [b1|b2| · · · |bk] 2 Rm⇥k for a lattice L(B) := 8 < : k X i=1 zibi : z1, z2, . . . , zk 2 Z 9 = ; ⇢Rm , this algorithm can be used to find a non-zero vector v 2 L(B)\{0} whose length is at most 2(k−1)/2 times that of the shortest non-zero vector in the lattice λ1(B) := min v2L(B)\{0}kvk2 . Theorem 4 ([12, 9]). Suppose the Subset Sum instance specified by source numbers {ci}i2I ⇢R and target sum t 2 R satisfy the following properties. 1. There is a subset S? ✓I such that P i2S? ci = t. 2. Define R := 2|I|/2p |S?| + 1 and ZR := {(z0, z) 2 Z ⇥ZI : 0 < z2 0 + P i2I z2 i R2}. There exists " > 0 such that |z0 · t −P i2I zi · ci| ≥" for each (z0, z) 2 ZR that is not an integer multiple of (1, χ?), where χ? 2 {0, 1}I is the characteristic vector for S?. Let B be the lattice basis B constructed by Algorithm 3, and assume β ≥2|I|/2/". Then every non-zero vector in the lattice ⇤(B) with length at most 2|I|/2 times the length of the shortest non-zero vector in ⇤(B) is an integer multiple of the vector (1, χS?, 0), and the basis reduction algorithm of Lenstra et al. [16] returns such a non-zero vector. The Subset Sum instance constructed in Algorithm 2 has n2 source numbers {ci,j : (i, j) 2 [n] ⇥[n]} and target sum y0. We need to show that it satisfies the two conditions of Theorem 4. Let S¯⇡:= {(i, j) : ¯⇡(i) = j} ⇢[n] ⇥[n], and let ¯⇧= (¯⇧i,j)(i,j)2[n]⇥[n] 2 Pn be the permutation matrix with ¯⇧i,j := 1{¯⇡(i) = j} for all (i, j) 2 [n] ⇥[n]. Note that ¯⇧is the “characteristic vector” for S¯⇡. Define R := 2n2/2pn + 1 and ZR := ( (z0, Z) 2 Z ⇥Zn⇥n : 0 < z2 0 + X 1i,jn Z2 i,j R2 ) . A crude bound shows that|ZR| 2O(n4). The following lemma establishes the first required property in Theorem 4. Lemma 1. The random matrix X has rank d almost surely, and the subset S¯⇡satisfies y0 = P (i,j)2S¯⇡ci,j. Proof. That X has rank d almost surely follows from the fact that the probability density of X is supported on all of Rn⇥d. This implies that X†X = Pn j=1 ˜xjx> j = Id, and y0 = n X j=1 x > 0 ˜xjx > j ¯w = X 1i,jn x > 0 ˜xj · yi · 1{¯⇡(i) = j} = X 1i,jn ci,j · 1{¯⇡(i) = j} . 6 The next lemma establishes the second required property in Theorem 4. Here, we use the fact that the Frobenius norm %%z0 ¯⇧−Z %% F is at least one whenever (z0, Z) 2 Z ⇥Zn⇥n is not an integer multiple of (1, ¯⇧). Lemma 2. Pick any ⌘, ⌘0 > 0 such that 3|ZR| ⌘+ ⌘0 < 1. With probability at least 1 −3|ZR| ⌘−⌘0, every (z0, Z) 2 ZR with Z = (Zi,j)(i,j)2[n]⇥[n] satisfies 11111z0 · y0 − X i,j Zi,j · ci,j 11111 ≥(⇡/4) · p (d −1)/n · ⌘2+ 1 d−1 ⇣pn + p d + p 2 ln(1/⌘0) ⌘2 · %%z0 ¯⇧−Z %% F ·k ¯wk2 . Proof. By Lemma 1, the matrix ¯⇧satisfies y0 = P i,j ¯⇧i,j · ci,j. Fix any (z0, Z) 2 ZR with Z = (Zi,j)(i,j)2[n]⇥[n]. Then z0 · y0 − X i,j Zi,j · ci,j = X i,j (z0 · ¯⇧i,j −Zi,j) · x > 0 ˜xj · ¯w >x¯⇡(i) . Using matrix and vector notations, this can be written compactly as the inner product x> 0 (X†(z0 ¯⇧− Z)> ¯⇧X ¯w). Since x0 ⇠N(0, Id) and is independent of X, the distribution of the inner product is normal with mean zero and standard deviation equal to kX†(z0 ¯⇧−Z)> ¯⇧X ¯wk2. By Lemma 7 (in Appendix C), with probability at least 1 −⌘, 11x > 0 2 X†(z0 ¯⇧−Z) > ¯⇧X ¯w 311 ≥kX†(z0 ¯⇧−Z) > ¯⇧X ¯wk2 · r⇡ 2 · ⌘. (4) Observe that X† = (X >X)−1X > since X has rank d by Lemma 1, so kX†(z0 ¯⇧−Z) > ¯⇧X ¯wk2 ≥kX >(z0 ¯⇧−Z)> ¯⇧X ¯wk2 kXk2 2 . (5) By Lemma 4 (in Appendix C), with probability at least 1 −⌘0, kXk2 2 ⇣pn + p d + p 2 ln(1/⌘0) ⌘2 . (6) And by Lemma 9 (in Appendix C), with probability at least 1 −2⌘, kX >(z0 ¯⇧−Z) > ¯⇧X ¯wk2 ≥ %%(z0 ¯⇧−Z) > ¯⇧ %% F ·k ¯wk2 · r (d −1)⇡ 8n · ⌘1+1/(d−1) . (7) Since ¯⇧is orthogonal, we have that k(z0 ¯⇧−Z)> ¯⇧kF = kz0 ¯⇧−ZkF . Combining this with (4), (5), (6), and (7), and union bounds over all (z0, Z) 2 ZR proves the claim. Proof of Theorem 3. Lemma 1 and Lemma 2 (with ⌘0 := δ/2 and ⌘:= δ/(6|ZR|)) together imply that with probability at least 1 −δ, the source numbers {ci,j : (i, j) 2 [n] ⇥[n]} and target sum y0 satisfy the conditions of Theorem 4 with S? := {(i, j) 2 [n] ⇥[n] : ¯⇡(i) = j} , " := (⇡/4) · p (d −1)/n · (δ/(6|ZR|))2+ 1 d−1 ⇣pn + p d + p 2 ln(2/δ) ⌘2 ·k ¯wk2 ≥2−poly(n, log(1/δ)) ·k ¯wk2 . (8) Thus, in this event, Algorithm 3 (with β satisfying β ≥2n2/2/") returns ˆS = S?, which uniquely determines the permutation ˆ⇡= ¯⇡returned by Algorithm 2. Running time. The basis reduction algorithm of Lenstra et al. [16] is iterative, with each iteration primarily consisting of Gram-Schmidt orthogonalization and another efficient linear algebraic process called “size reduction”. The total number of iterations required is O 0 @k(k + 1) 2 log p k · maxi2[k]kbik2 λ1(B) !1 A . 7 In our case, k = n2 and λ1(B) = pn + 1; and by Lemma 10 (in Appendix C), each of the basis vectors constructed has squared length at most 1 + β2 · poly(d, log(n), 1/δ) ·k ¯wk2 2. Using the tight setting of β required in Theorem 3, this gives a poly(n, d, log(1/δ)) bound on the total number of iterations as well as on the total running time. However, the basis reduction algorithm requires both arithmetic and rounding operations, which are typically only available for finite precision rational inputs. Therefore, a formal running time analysis would require the idealized real-valued covariate vectors (xi)n i=0 and unknown target vector ¯w to be quantized to finite precision values. This is doable, and is similar to using a discretized Gaussian distribution for the distribution of the covariate vectors (and assuming ¯w is a vector of finite precision values), but leads to a messier analysis incomparable to the setup of previous works. Nevertheless, it would be desirable to find a different algorithm that avoids lattice basis reduction that still works with just d + 1 measurements. 4 Lower bounds on signal-to-noise for approximate recovery In this section, we consider the measurement model from (1) where (xi)n i=1 are i.i.d. draws from either N(0, Id) or the uniform distribution on [−1/2, 1/2]d, and ("i)n i=1 are i.i.d. draws from N(0, σ2). We establish lower bounds on the signal-to-noise ratio (SNR), SNR = k ¯wk2 2 σ2 , required by any estimator ˆw = ˆw((xi)n i=1, (yi)n i=1) for ¯w to approximately recover ¯w in expectation. The estimators may have a priori knowledge of the values ofk ¯wk2 and σ2. Theorem 5. Assume ("i)n i=1 are i.i.d. draws from N(0, σ2). 1. There is an absolute constant C > 0 such that the following holds. If n ≥3, d ≥22, (xi)n i=1 are i.i.d. draws from N(0, Id), (yi)n i=1 follow the measurement model from (1), and SNR C · min ⇢ d log log(n), 1 < , then for any estimator ˆw, there exists some ¯w 2 Rd such that E ⇥ k ˆw −¯wk2 ⇤ ≥ 1 24k ¯wk2 . 2. If (xi)n i=1 are i.i.d. draws from the uniform distribution on [−1/2, 1/2]d, and (yi)n i=1 follow the measurement model from (1), and SNR 2 , then for any estimator ˆw, there exists some ¯w 2 Rd such that E ⇥ k ˆw −¯wk2 ⇤ ≥1 2 ✓ 1 −1 p 2 ◆ k ¯wk2 . Note that in the classical linear regression model where yi = ¯w>xi + "i for i 2 [n], the maximum likelihood estimator ˆwmle satisfies Ek ˆwmle −¯wk2 Cσ p d/n, where C > 0 is an absolute constant. Therefore, the SNR requirement to approximately recover ¯w up to (say) Euclidean distancek ¯wk2 /24 is SNR ≥242Cd/n. Compared to this setting, Theorem 5 implies that with the measurement model of (1), the SNR requirement (as a function of n) is at substantially higher (d/ log log(n) in the normal covariate case, or a constant not even decreasing with n in the uniform covariate case). For the normal covariate case, Pananjady et al. [18] show that if n > d, ✏< pn, and SNR ≥nc· n n−d +✏, then the maximum likelihood estimator ( ˆwmle, ˆ⇡mle) (i.e., any minimizer of (2)) satisfies ˆ⇡mle = ¯⇡ with probability at least 1 −c0n−2✏. (Here, c > 0 and c0 > 0 are absolute constants.) It is straightforward to see that, on the same event, we havek ˆwmle −¯wk2 Cσ p d/n for some absolute 8 constant C > 0. Therefore, the necessary and sufficient conditions on SNR for approximate recovery of ¯w lie between C0d/ log log(n) and nC00 (for absolute constants C0, C00 > 0). Narrowing this range remains an interesting open problem. A sketch of the proof in the normal covariate case is as follows. Without loss of generality, we restrict attention to the case where ¯w is a unit vector. We construct a 1/ p 2-packing of the unit sphere in Rd; the target ¯w will be chosen from from this set. Observe that for any distinct u, u0 2 U, each of (x> i u)n i=1 and (x> i u0)n i=1 is an i.i.d. sample from N(0, 1) of size n; we prove that they therefore determine empirical distributions that are close to each other in Wasserstein-2 distance with high probability. We then prove that conditional on this event, the resulting distributions of (yi)n i=1 under ¯x = u and ¯x = u0 (for any pair u, u0 2 U) are close in Kullback-Leibler divergence. Hence, by (a generalization of) Fano’s inequality [see, e.g., 11], no estimator can determine the correct u 2 U with high probability. The proof for the uniform case is similar, using U = {e1, −e1} where e1 = (1, 0, . . . , 0)>. The full proof of Theorem 5 is given in Appendix D. Acknowledgments We are grateful to Ashwin Pananjady, Michał Derezi´nski, and Manfred Warmuth for helpful discussions. DH was supported in part by NSF awards DMR-1534910 and IIS-1563785, a Bloomberg Data Science Research Grant, and a Sloan Research Fellowship. XS was supported in part by a grant from the Simons Foundation (#320173 to Xiaorui Sun). This work was done in part while DH and KS were research visitors and XS was a research fellow at the Simons Institute for the Theory of Computing. References [1] Abubakar Abid, Ada Poon, and James Zou. Linear regression with shuffled labels. arXiv preprint arXiv:1705.01342, 2017. [2] Alexandr Andoni, Daniel Hsu, Kevin Shi, and Xiaorui Sun. Correspondence retrieval. In Conference on Learning Theory, 2017. [3] Haim Avron and Christos Boutsidis. Faster subset selection for matrices and applications. SIAM Journal on Matrix Analysis and Applications, 34(4):1464–1499, 2013. [4] Sergey Bobkov and Michel Ledoux. One-dimensional empirical measures, order statistics and Kantorovich transport distances. preprint, 2014. [5] Christos Boutsidis, Petros Drineas, and Malik Magdon-Ismail. Near-optimal coresets for least-squares regression. IEEE Transactions on Information Theory, 59(10):6880–6892, 2013. [6] Kenneth R Davidson and Stanislaw J Szarek. Local operator theory, random matrices and banach spaces. Handbook of the geometry of Banach spaces, 1(317-366):131, 2001. [7] Michał Derezi´nski and Manfred K Warmuth. Unbiased estimates for linear regression via volume sampling. arXiv preprint arXiv:1705.06908, 2017. [8] Golnooshsadat Elhami, Adam James Scholefield, Benjamin Bejar Haro, and Martin Vetterli. Unlabeled sensing: Reconstruction algorithm and theoretical guarantees. In Proceedings of the 42nd IEEE International Conference on Acoustics, Speech and Signal Processing, 2017. [9] Alan M Frieze. On the lagarias-odlyzko algorithm for the subset sum problem. SIAM Journal on Computing, 15(2):536–539, 1986. [10] Michael R Garey and David S Johnson. Computers and Intractability: A Guide to the Theory of NP-completeness. WH Freeman and Company, New York, 1979. [11] Te Sun Han and Sergio Verdú. Generalizing the Fano inequality. IEEE Transactions on Information Theory, 40(4):1247–1251, 1994. [12] Jeffrey C Lagarias and Andrew M Odlyzko. Solving low-density subset sum problems. Journal of the ACM, 32(1):229–246, 1985. 9 [13] Beatrice Laurent and Pascal Massart. Adaptive estimation of a quadratic functional by model selection. Annals of Statistics, pages 1302–1338, 2000. [14] Lucien Le Cam. Convergence of estimates under dimensionality restrictions. The Annals of Statistics, pages 38–53, 1973. [15] Michel Ledoux. The Concentration of Measure Phenomenon. American Mathematical Society, 2000. [16] Arjen Klaas Lenstra, Hendrik Willem Lenstra, and László Lovász. Factoring polynomials with rational coefficients. Mathematische Annalen, 261(4):515–534, 1982. [17] Pascal Massart. Concentration inequalities and model selection, volume 6. Springer, 2007. [18] Ashwin Pananjady, Martin J Wainwright, and Thomas A Courtade. Linear regression with an unknown permutation: Statistical and computational limits. In 54th Annual Allerton Conference on Communication, Control, and Computing, pages 417–424, 2016. [19] Ashwin Pananjady, Martin J Wainwright, and Thomas A Courtade. Denoising linear models with permuted data. arXiv preprint arXiv:1704.07461, 2017. [20] Rolf-Dieter Reiss. Approximate distributions of order statistics: with applications to nonparametric statistics. Springer Science & Business Media, 2012. [21] Mark Rudelson and Roman Vershynin. Non-asymptotic theory of random matrices: extreme singular values. arXiv preprint arXiv:1003.2990, 2010. [22] Jayakrishnan Unnikrishnan, Saeid Haghighatshoar, and Martin Vetterli. Unlabeled sensing with random linear measurements. arXiv preprint arXiv:1512.00115, 2015. [23] David P Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends in Theoretical Computer Science, 10(1–2):1–157, 2014. [24] Bin Yu. Assouad, Fano, and Le Cam. In Festschrift for Lucien Le Cam, pages 423–435. Springer, 1997. 10 | 2017 | 506 |
7,015 | Structured Generative Adversarial Networks 1Zhijie Deng∗, 2,3Hao Zhang∗, 2Xiaodan Liang, 2Luona Yang, 1,2Shizhen Xu, 1Jun Zhu†, 3Eric P. Xing 1Tsinghua University, 2Carnegie Mellon University, 3Petuum Inc. {dzj17,xsz12}@mails.tsinghua.edu.cn, {hao,xiaodan1,luonay1}@cs.cmu.edu, dcszj@mail.tsinghua.edu.cn, epxing@cs.cmu.edu Abstract We study the problem of conditional generative modeling based on designated semantics or structures. Existing models that build conditional generators either require massive labeled instances as supervision or are unable to accurately control the semantics of generated samples. We propose structured generative adversarial networks (SGANs) for semi-supervised conditional generative modeling. SGAN assumes the data x is generated conditioned on two independent latent variables: y that encodes the designated semantics, and z that contains other factors of variation. To ensure disentangled semantics in y and z, SGAN builds two collaborative games in the hidden space to minimize the reconstruction error of y and z, respectively. Training SGAN also involves solving two adversarial games that have their equilibrium concentrating at the true joint data distributions p(x, z) and p(x, y), avoiding distributing the probability mass diffusely over data space that MLE-based methods may suffer. We assess SGAN by evaluating its trained networks, and its performance on downstream tasks. We show that SGAN delivers a highly controllable generator, and disentangled representations; it also establishes start-of-the-art results across multiple datasets when applied for semi-supervised image classification (1.27%, 5.73%, 17.26% error rates on MNIST, SVHN and CIFAR-10 using 50, 1000 and 4000 labels, respectively). Benefiting from the separate modeling of y and z, SGAN can generate images with high visual quality and strictly following the designated semantic, and can be extended to a wide spectrum of applications, such as style transfer. 1 Introduction Deep generative models (DGMs) [12, 8, 26] have gained considerable research interest recently because of their high capacity of modeling complex data distributions and ease of training or inference. Among various DGMs, variational autoencoders (VAEs) and generative adversarial networks (GANs) can be trained unsupervisedly to map a random noise z ∼N(0, 1) to the data distribution p(x), and have reported remarkable successes in many domains including image/text generation [17, 9, 3, 27], representation learning [27, 4], and posterior inference [12, 5]. They have also been extended to model the conditional distribution p(x|y), which involves training a neural network generator G that takes as inputs both the random noise z and a condition y, and generates samples that have desired properties specified by y. Obtaining such a conditional generator would be quite helpful for a wide spectrum of downstream applications, such as classification, where synthetic data from G can be used to augment the training set. However, training conditional generator is inherently difficult, because it requires not only a holistic characterization of the data distribution, but also fine-grained alignments between different modes of the distribution and different conditions. Previous works have tackled this problem by using a large amount of labeled data to guide the generator’s learning [32, 23, 25], which compromises the generator’s usefulness because obtaining the label information might be expensive. ∗indicates equal contributions. † indicates the corresponding author. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we investigate the problem of building conditional generative models under semisupervised settings, where we have access to only a small set of labeled data. The existing works [11, 15] have explored this direction based on DGMs, but the resulted conditional generators exhibit inadequate controllability, which we define as the generator’s ability to conditionally generate samples that have structures strictly agreeing with those specified by the condition – a more controllable generator can better capture and respect the semantics of the condition. When supervision from labeled data is scarce, the controllability of a generative model is usually influenced by its ability to disentangle the designated semantics from other factors of variations (which we will term as disentanglability in the following text). In other words, the model has to first learn from a small set of labeled data what semantics or structures the condition y is essentially representing by trying to recognize y in the latent space. As a second step, when performing conditional generation, the semantics shall be exclusively captured and governed within y but not interweaved with other factors. Following this intuition, we build the structured generative adversarial network (SGAN) with enhanced controllability and disentanglability for semi-supervised generative modeling. SGAN separates the hidden space to two parts y and z, and learns a more structured generator distribution p(x|y, z) – where the data are generated conditioned on two latent variables: y, which encodes the designated semantics, and z that contains other factors of variation. To impose the aforementioned exclusiveness constraint, SGAN first introduces two dedicated inference networks C and I to map x back to the hidden space as C : x →y, I : x →z, respectively. Then, SGAN enforces G to generate samples that when being mapped back to hidden space using C (or I), the inferred latent code and the generator condition are always matched, regardless of the variations of the other variable z (or y). To train SGAN, we draw inspirations from the recently proposed adversarially learned inference framework (ALI) [5], and build two adversarial games to drive I, G to match the true joint distributions p(x, z), and C, G to match the true joint distribution p(x, y). Thus, SGAN can be seen as a combination of two adversarial games and two collaborative games, where I, G combat each other to match joint distributions in the visible space, but I, C, G collaborate with each other to minimize a reconstruction error in the hidden space. We theoretically show that SGAN will converge to desired equilibrium if trained properly. To empirically evaluate SGAN, we first define a mutual predictability (MP) measure to evaluate the disentanglability of various DGMs, and show that in terms of MP, SGAN outperforms all existing models that are able to infer the latent code z across multiple image datasets. When classifying the generated images using a golden classifier, SGAN achieves the highest accuracy, confirming its improved controllability for conditional generation under semi-supervised settings. In the semisupervised image classification task, SGAN outperforms strong baselines, and establishes new state-of-the-art results on MNIST, SVHN and CIFAR-10 dataset. For controllable generation, SGAN can generate images with high visual quality in terms of both visual comparison and inception score, thanks to the disentangled latent space modeling. As SGAN is able to infer the unstructured code z, we further apply SGAN for style transfer, and obtain impressive results. 2 Related Work DGMs have drawn increasing interest from the community, and have been developed mainly toward two directions: VAE-based models [12, 11, 32] that learn the data distribution via maximum likelihood estimation (MLE), and GAN-based methods [19, 27, 21] that train a generator via adversarial learning. SGAN combines the best of MLE-based methods and GAN-based methods which we will discuss in detail in the next section. DGMs have also been applied for conditional generation, such as CGAN [19], CVAE [11]. DisVAE [32] is a successful extension of CVAE that generates images conditioned on text attributes. In parallel, CGAN has been developed to generate images conditioned on text [24, 23], bounding boxes, key points [25], locations [24], other images [10, 6, 31], or generate text conditioned on images [17]. All these models are trained using fully labeled data. A variety of techniques have been developed toward learning disentangled representations for generative modeling [3, 29]. InfoGAN [3] disentangles hidden dimensions on unlabeled data by mutual information regularization. However, the semantic of each disentangled dimension is uncontrollable because it is discovered after training rather than designated by user modeling. We establish some connections between SGAN and InfoGAN in the next section. There is also interest in developing DGMs for semi-supervised conditional generation, such as semisupervised CVAE [11], its many variants [16, 9, 18], ALI [5] and TripleGAN [15], among which the closest to us are [15, 9]. In [9], VAE is enhanced with a discriminator loss and an independency 2 constraint, and trained via joint MLE and discriminator loss minimization. By contrast, SGAN is an adversarial framework that is trained to match two joint distributions in the visible space, thus avoids MLE for visible variables. TripleGAN builds a three-player adversarial game to drive the generator to match the conditional distribution p(x|y), while SGAN models the conditional distribution p(x|y, z) instead. TripleGAN therefore lacks constraints to ensure the semantics of interest to be exclusively captured by y, and lacks a mechanism to perform posterior inference for z. 3 Structured Generative Adversarial Networks (SGAN) We build our model based on the generative adversarial networks (GANs) [8], a framework for learning DGMs using a two-player adversarial game. Specifically, given observed data {xi}N i=1, GANs try to estimate a generator distribution pg(x) to match the true data distribution pdata(x), where pg(x) is modeled as a neural network G that transforms a noise variable z ∼N(0, 1) into generated data ˆx = G(z). GANs assess the quality of ˆx by introducing a neural network discriminator D to judge whether a sample is from pdata(x) or the generator distribution pg(x). D is trained to distinguish generated samples from true samples while G is trained to fool D: min G max D L(D, G) = Ex∼pdata(x)[log(D(x))] + Ez∼p(z)[log(1 −D(G(z)))], Goodfellow et al. [8] show the global optimum of the above problem is attained at pg = pdata. It is noted that the original GAN models the latent space using a single unstructured noise variable z. The semantics and structures that may be of our interest are entangled in z, and the generator transforms z into ˆx in a highly uncontrollable way – it lacks both disentanglability and controllability. We next describe SGAN, a generic extension to GANs that is enhanced with improved disentanglability and controllability for semi-supervised conditional generative modeling. Overview. We consider a semi-supervised setting, where we observe a large set of unlabeled data X = {xi}N i=1. We are interested in both the observed sample x and some hidden structures y of x, and want to build a conditional generator that can generate data ˆx that matches the true data distribution of x, while obey the structures specified in y (e.g. generate pictures of digits given 0-9). Besides the unlabeled x, we also have access to a small chunk of data Xl = {xl j, yl j}M j=1 where the structure y is jointly observed. Therefore, our model needs to characterize the joint distribution p(x, y) instead of the marginal p(x), for both fully and partially observed x. As the data generation process is intrinsically complex and usually determined by many factors beyond y, it is necessary to consider other factors that are irrelevant with y, and separate the hidden space into two parts (y, z), of which y encodes the designated semantics, and z includes any other factors of variation [3]. We make a mild assumption that y and z are independent from each other so that y could be disentangled from z. Our model thus needs to take into consideration the uncertainty of both (x, y) and z, i.e. characterizing the joint distribution p(x, y, z) while being able to disentangle y from z. Directly estimating p(x, y, z) is difficult, as (1) we have never observed z and only observed y for partial x; (2) y and z might be entangled at any time as the training proceeds. As an alternative, SGAN builds two inference networks I and C. The two inference networks define two distributions pi(z|x) and pc(y|x) that are trained to approximate the true posteriors p(z|x) and p(y|x) using two different adversarial games. The two games are unified via a shared generator x ∼pg(x|y, z). Marginalizing out z or y obtains pg(x|z) and pg(x|y): pg(x|z) = Z y p(y)pg(x|y, z)dy, pg(x|y) = Z z p(z)pg(x|y, z)dz, (1) where p(y) and p(z) are appropriate known priors for y and z. As SGAN is able to perform posterior inference for both z and y given x (even for unlabeled data), we can directly imposes constraints [13] that enforce the structures of interest being exclusively captured by y, while those irreverent factors being encoded in z (as we will show later). Fig.1 illustrates the key components of SGAN, which we elaborate as follows. Generator pg(x|y, z). We assume the following generative process from y, z to x: z ∼p(z), y ∼ p(y), x ∼p(x|y, z), where p(z) is chosen as a non-informative prior, and p(y) as an appropriate prior that meets our modeling needs (e.g. a categorical distribution for digit class). We parametrize p(x|y, z) using a neural network generator G, which takes y and z as inputs, and outputs generated samples x ∼pg(x|y, z) = G(y, z). G can be seen as a “decoder” in VAE parlance, and its architecture depends on specific applications, such as a deconvolutional neural network for generating images [25, 21]. 3 𝑥# 𝑧 𝑦 𝑥# 𝑧 𝑦 𝑥 𝑧 𝐷(𝑥, 𝑧) 𝑥# 𝑦 𝑧 𝑥* 𝑦* 𝐷(𝑥, 𝑦) 𝑥# 𝑧 𝑦 𝑥# 𝑦 𝑧 G(𝑦, 𝑧) I(𝑥) (a) (b) (c) (d) (e) G(𝑦, 𝑧) I(𝑥) C(𝑥) G(𝑦, 𝑧) Figure 1: An overview of the SGAN model: (a) the generator pg(x|y, z); (b) the adversarial game Lxz; (c) the adversarial game Lxy; (d) the collaborative game Rz; (e) the collaborative game Ry. Adversarial game Lxz. Following the adversarially learning inference (ALI) framework, we construct an adversarial game to match the distributions of joint pairs (x, z) drawn from the two different factorizations: pg(x, z) = p(z)pg(x|z), pi(x, z) = p(x)pi(z|x). Specifically, to draw samples from pg(x, z), we note the fact that we can first draw the tuple (x, y, z) following y ∼p(y), z ∼p(z), x ∼pg(x|y, z), and then only taking (x, z) as needed. This implicitly performs the marginalization as in Eq. 1. On the other hand, we introduce an inference network I : x →z to approximate the true posterior p(z|x). Obtaining (x, z) ∼p(x)pi(z|x) with I is straightforward: x ∼p(x), z ∼pi(z|x) = I(x). Training G and I involves finding the Nash equilibrium for the following minimax game Lxz (we slightly abuse Lxz for both the minimax objective and a name for this adversarial game): min I,G max Dxz Lxz = Ex∼p(x)[log(Dxz(x, I(x)))] + Ez∼p(z),y∼p(y)[log(1 −Dxz(G(y, z), z))], (2) where we introduce Dxz as a critic network that is trained to distinguish pairs (x, z) ∼pg(x, z) from those come from pi(x, z). This minimax objective reaches optimum if and only if the conditional distribution pg(x|z) characterized by G inverses the approximate posterior pi(z|x), implying pg(x, z) = pi(x, z) [4, 5]. As we have never observed z for x, as long as z is assumed to be independent from y, it is reasonable to just set the true joint distribution p(x, z) = p∗ g(x, z) = p∗ i (x, z), where we use p∗ g and p∗ i to denote the optimal distributions when Lxz reaches its equilibrium. Adversarial game Lxy. The second adversarial game is built to match the true joint data distribution p(x, y) that has been observed on Xl. We introduce the other critic network Dxy to discriminate (x, y) ∼p(x, y) from (x, y) ∼pg(x, y) = p(y)pg(x|y), and build the game Lxy as: min G max Dxy Lxy = E(x,y)∼p(x,y)[log(Dxy(x, y))] + Ey∼p(y),z∼p(z)[log(1 −Dxy(G(y, z), y))]. (3) Collaborative game Ry. Although training the adversarial game Lxy theoretically drives pg(x, y) to concentrate on the true data distribution p(x, y), it turns out to be very difficult to train Lxy to desired convergence, as (1) the joint distribution p(x, y) characterized by Xl might be biased due to its small data size; (2) there is little supervision from Xl to tell G what y essentially represents, and how to generate samples conditioned on y. As a result, G might lack controllability – it might generate low-fidelity samples that are not aligned with their conditions, which will always be rejected by Dxy. A natural solution to these issues is to allow (learned) posterior inference of y to reconstruct y from generated x [5]. By minimizing the reconstruction error, we can backpropagate the gradient to G to enhance its controllability. Once pg(x|y) can generate high-fidelity samples that respect the structures y, we can reuse the generated samples (x, y) ∼pg(x, y) as true samples in the first term of Lxy, to prevent Dxz from collapsing into a biased p(x, y) characterized by Xl. Intuitively, we introduce the second inference network C : x →y which approximates the posterior p(y|x) as y ∼pc(y|x) = C(x), e.g. C reduces to a N-way classifier if y is categorical. To train pc(y|x), we define a collaboration (reconstruction) game Ry in the hidden space of y: min C,G Ry = −E(x,y)∼p(x,y)[log pc(y|x)] −E(x,y)∼pg(x,y)[log pc(y|x)], (4) which aims to minimize the reconstruction error of y in terms of C and G, on both labeled data Xl and generated data (x, y) ∼pg(x, y). On the one hand, minimizing the first term of Ry w.r.t. C guides C toward the true posterior p(y|x). On the other hand, minimizing the second term w.r.t. G enhances G with extra controllability – it minimizes the chance that G could generate samples that would otherwise be falsely predicted by C. Note that we also minimize the second term w.r.t. C, which proves effective in semi-supervised learning settings that uses synthetic samples to augment the predictive power of C. In summary, minimizing Ry can be seen as a collaborative game between two players C and G that drives pg(x|y) to match p(x|y) and pc(y|x) to match the posterior p(y|x). 4 Collaborative games Rz. As SGAN allows posterior inference for both y and z, we can explicitly impose constraints Ry and Rz to separate y from z during training. To explain, we first note that optimizing the second term of Ry w.r.t G actually enforces the structure information to be fully persevered in y, because C is asked to recover the structure y from G(y, z), which is generated conditioned on y, regardless of the uncertainty of z (as z is marginalized out during sampling). Therefore, minimizing Ry indicates the following constraint: minC,G Ey∼p(y)
pc(y|G(y, z1)), pc(y|G(y, z2))
, ∀z1, z2 ∼p(z), where
a, b
is some distance function between a and b (e.g. cross entropy if C is a N-way classifier). On the counter part, we also want to enforce any other unstructured information that is not of our interest to be fully captured in z, without being entangled with y. So we build the second collaborative game Rz as: min I,G Rz = −E(x,z)∼pg(x,z)[log pi(z|x)] (5) where I is required to recover z from those samples generated by G conditioned on z, i.e. reconstructing z in the hidden space. Similar to Ry, minimizing Rz indicates: minI,G Ez∼p(z)
pi(z|G(y1, z)), pi(z|G(y2, z))
, ∀y1, y2 ∼p(y), and when we model I as a deterministic mapping [4], the ∥·∥distance between distributions is equal to the ℓ-2 distance between the outputs of I. Theoretical Guarantees. We provide some theoretical results about the SGAN framework under the nonparametric assumption. The proofs of the theorems are deferred to the supplementary materials. Theorem 3.1 The global minimum of maxDxz Lxz is achieved if and only if p(x)pi(z|x) = p(z)pg(x|z). At that point D∗ xz = 1 2. Similarly, the global minimum of maxDxy Lxy is achieved if and only if p(x, y) = p(y)pg(x|y). At that point D∗ xy = 1 2. Theorem 3.2 There exists a generator G∗(y, z) of which the conditional distributions pg(x|y) and pg(x|z) can both achieve equilibrium in their own minimax games Lxy and Lxz. Theorem 3.3 Minimizing Rz w.r.t. I will keep the equilibrium of the adversarial game Lxz. Similarly, minimizing Ry w.r.t. C will keep the equilibrium of the adversarial game Lxy unchanged. Algorithm 1 Training Structured Generative Adversarial Networks (SGAN). 1: Pretrain C by minimizing the first term of Eq. 4 w.r.t. C using Xl. 2: repeat 3: Sample a batch of x: xu ∼p(x). 4: Sample batches of pairs (x, y): (xl, yl) ∼p(x, y), (xg, yg) ∼pg(x, y), (xc, yc) ∼pc(x, y). 5: Obtain a batch (xm, ym) by mixing data from (xl, yl), (xg, yg), (xc, yc) with proper mixing portion. 6: for k = 1 →K do 7: Train Dxz by maximizing the first term of Lxz using xu and the second using xg. 8: Train Dxy by maximizing the first term of Lxy using (xm, ym) and the second using (xg, yg). 9: end for 10: Train I by minimizing Lxz using xu and Rz using xg. 11: Train C by minimizing Ry using (xm, ym) (see text). 12: Train G by minimizing Lxy + Lxz + Ry + Rz using (xg, yg). 13: until convergence. Training. SGAN is fully differentiable and can be trained end-to-end using stochastic gradient descent, following the strategy in [8] that alternatively trains the two critic networks Dxy, Dxz and the other networks G, I and C. Though minimizing Ry and Rz w.r.t. G will introduce slight bias, we find empirically it works well and contributes to disentangling y and z. The training procedures are summarized in Algorithm 1. Moreover, to guarantee that C could be properly trained without bias, we pretrain C by minimizing the first term of Ry until convergence, and do not minimize Ry w.r.t. C until G has started generating meaning samples (usually after several epochs of training). As the training proceeds, we gradually improve the portion of synthetic samples (x, y) ∼pg(x, y) and (x, y) ∼pc(x, y) in the stochastic batch, to help the training of Dxy and C (see Algorithm 1), and you can refer to our codes on GitHub for more details of the portion. We empirically found this mutual bootstrapping trick yields improved C and G. Discussion and connections. SGAN is essentially a combination of two adversarial games Lxy and Lxz, and two collaborative games Ry, Rz, where Lxy and Lxz are optimized to match the data distributions in the visible space, while Ry and Rz are trained to match the posteriors in the hidden space. It combines the best of GAN-based methods and MLE-based methods: on one hand, estimating 5 density in the visible space using GAN-based formulation avoids distributing the probability mass diffusely over data space [5], which MLE-based frameworks (e.g. VAE) suffer. One the other hand, incorporating reconstruction-based constraints in latent space helps enforce the disentanglement between structured information in y and unstructured ones in z, as we argued above. We also establish some connections between SGAN and some existing works [15, 27, 3]. We note the Lxy game in SGAN is connected to the TripleGAN framework [15] when its trade-off parameter α = 0. We will empirically show that SGAN yields better controllability on G, and also improved performance on downstream tasks, due to the separate modeling of y and z. SGAN also connects to InfoGAN in the sense that the second term of Ry (Eq. 4) reduces to the mutual information penalty in InfoGAN under unsupervised settings. However, SGAN and InfoGAN have totally different aims and modeling techniques. SGAN builds a conditional generator that has the semantic of interest y as a fully controllable input (known before training); InfoGAN in contrast aims to disentangle some latent variables whose semantics are interpreted after training (by observation). Though extending InfoGAN to semi-supervised settings seems straightforward, successfully learning the joint distribution p(x, y) with very few labels is non-trivial: InfoGAN only maximizes the mutual information between y and G(y, z), bypassing p(y|x) or p(x, y), thus its direct extension to semi-supervised settings may fail due to lack of p(x, y). Moreover, SGAN has dedicated inference networks I and C, while the network Q(x) in InfoGAN shares parameters with the discriminator, which has been argued as problematic [15, 9] as it may compete with the discriminator and prevents its success in semisupervised settings. See our ablation study in section 4.2 and Fig.3. Finally, the first term in Ry is similar to the way Improved-GAN models the conditional p(y|x) for labeled data, but SGAN treats the generated data very differently – Improved-GAN labels xg = G(z, y) as a new class y = K + 1, instead SGAN reuses xg and xc to mutually boost I, C and G, which is key to the success of semi-supervised learning (see section 4.2). 4 Evaluation We empirically evaluate SGAN through experiments on different datasets. We show that separately modeling z and y in the hidden space helps better disentangle the semantics of our interest from other irrelevant attributes, thus yields improved performance for both generative modeling (G) and posterior inference (C, I) (section 4.1 4.3). Under SGAN framework, the learned inference networks and generators can further benefit a lot of downstream applications, such as semi-supervised classification, controllable image generation and style transfer (section 4.2 4.3). Dataset and configurations. We evaluate SGAN on three image datasets: (1) MNIST [14]: we use the 60K training images as unlabeled data, and sample n ∈{20, 50, 100} labels for semi-supervised learning following [12, 27], and evaluate on the 10K test images. (2) SVHN [20]: a standard train/test split is provided, where we sample n = 1000 labels from the training set for semi-supervised learning [27, 15, 5]. (3) CIFAR-10: a challenging dataset for conditional image generation that consists of 50K training and 10K test images from 10 object classes. We randomly sample n = 4000 labels [27, 28, 15] for semi-supervised learning. For all datasets, our semantic of interest is the digit/object class, so y is a 10-dim categorical variable. We use a 64-dim gaussian noise as z in MNIST and a 100-dim uniform noise as z in SVHN and CIFAR-10. Implementation. We implement SGAN using TensorFlow [1] and Theano [2] with distributed acceleration provided by Poseidon [33] which parallelizes line 7-8 and 10-12 of Algorithm. 1. The neural network architectures of C, G and Dxy mostly follow those used in TripleGAN [15] and we design I and Dxz according to [5] but with shallower structures to alleviate the training costs. Empirically SGAN needs 1.3-1.5x more training time than TripleGAN [15] without parallelization. It is noted that properly weighting the losses of the four games in SGAN during training may lead to performance improvement. However, we simply set them equal without heavy tuning1. 4.1 Controllability and Disentanglability We evaluate the controllability and disentanglability of SGAN by assessing its generator network G and inference network I, respectively. Specifically, as SGAN is able to perform posterior inference for z, we define a novel quantitative measure based on z to compare its disentanglability to other DGMs: we first use the trained I (or the “recognition network” in VAE-based models) to infer z for unseen x from test sets. Ideally, as z and y are modeled as independent, when I is trained to approach the true posterior of z, its output, when used as features, shall have weak predictability for y. Accordingly, we 1The code is publicly available at https://github.com/thudzj/StructuredGAN. 6 use z as features to train a linear SVM classifier to predict the true y, and define the converged accuracy of this classifier as the mutual predictability (MP) measure, and expect lower MP for models that can better disentangle y from z. We conduct this experiment on all three sets, and report the averaged MP measure of five runs in Fig. 2, comparing the following DGMs (that are able to infer z): (1) ALI [5] and (2) VAE [12], trained without label information; (3) CVAE-full2: the M2 model in [11] trained under the fully supervised setting; (4) SGAN trained under semi-supervised settings. We use 50, 1000 and 4000 labels for MNIST, SVHN and CIFAR-10 dataset under semi-supervised settings, respectively. MNIST SVHN CIFAR-10 0.3 0.6 0.9 MP ALI VAE SGAN CVAE-full Figure 2: Comparisons of the MP measure for different DGMs (lower is better). Clearly, SGAN demonstrates low MP when predicting y using z on three datasets. Using only 50 labels, SGAN exhibits reasonable MP. In fact, on MNIST with only 20 labels as supervision, SGAN achieves 0.65 MP, outperforming other baselines by a large margin. The results clearly demonstrate SGAN’s ability to disentangle y and z, even when the supervision is very scarce. On the other hand, better disentanglability also implies improved controllability of G, because less entangled y and z would be easier for G to recognize the designated semantics – so G should be able to generate samples that are less deviated from y during conditional generation. To verify this, following [9], we use a pretrained gold-standard classifier (0.56% error on MNIST test set) to classify generated images, and use the condition y as ground truth to calculate the accuracy. We compare SGAN in Table 1 to CVAE-semi and TripleGAN [15], another strong baseline that is also designed for conditional generation under semi-supervised settings. We use n = 20, 50, 100 labels on MNIST, and observe a significantly higher accuracy for both TripleGAN and SGAN. For comparison, a generator trained by CVAE-full achieves 0.6% error. When there are fewer labels available, SGAN outperforms TripleGAN. The generator in SGAN can generate samples that consistently obey the conditions specified in y, even when there are only two images per class (n = 20) as supervision. These results verify our statements that disentangled semantics further enhance the controllability of the conditioned generator G. 4.2 Semi-supervised Classification Model # labeled samples n = 20 n = 50 n = 100 CVAE-semi 33.05 10.72 5.66 TripleGAN 3.06 1.80 1.29 SGAN 1.68 1.23 0.93 Table 1: Errors (%) of generated samples classified by a classifier with 0.56% test error. It is natural to use SGAN for semi-supervised prediction.With a little supervision, SGAN can deliver a conditional generator with reasonably good controllability, with which, one can synthesize samples from pg(x, y) to augment the training of C when minimizing Ry. Once C becomes more accurate, it tends to make less mistakes when inferring y from x. Moreover, as we are sampling (x, y) ∼pc(x, y) to train Dxy during the maximization of Lxy, a more accurate C means more available labeled samples (by predicting y from unlabeled x using C) to lower the bias brought by the small set Xl, which in return can enhance G in the minimization phase of Lxy. Consequently, a mutual boosting cycle between G and C is formed. To empirically validate this, we deploy SGAN for semi-supervised classification on MNIST, SVHN and CIFAR-10, and compare the test errors of C to strong baselines in Table 2. To keep the comparisons fair, we adopt the same neural network architectures and hyper-parameter settings from [15], and report the averaged results of 10 runs with randomly sampled labels (every class has equal number of labels). We note that SGAN outperforms the current state-of-the-art methods across all datasets and settings. Especially, on MNIST when labeled instances are very scarce (n = 20), SGAN attains the highest accuracy (4.0% test error) with significantly lower variance, benefiting from the mutual boosting effects explained above. This is very critical for applications under low-shot or even one-shot settings where the small set Xl might not be a good representative for the data distribution p(x, y). 2For CVAE-full, we use test images and ground truth labels together to infer z when calculating MP. We are unable to compare to semi-supervised CVAE as in CVAE inferring z for test images requires image labels as input, which is unfair to other methods. 7 Method MNIST SVHN CIFAR-10 n = 20 n = 50 n = 100 n = 1000 n = 4000 Ladder [22] 0.89(±0.50) 20.40(±0.47) VAE [12] 3.33(±0.14) 36.02(±0.10) CatGAN [28] 1.39(±0.28) 19.58(±0.58) ALI [5] 7.3 18.3 ImprovedGAN [27] 16.77(±4.52) 2.21(±1.36) 0.93 (±0.07) 8.11(±1.3) 18.63(±2.32) TripleGAN [15] 5.40(±6.53) 1.59(±0.69) 0.92(±0.58) 5.83(±0.20) 18.82(±0.32) SGAN 4.0(±4.14) 1.29(±0.47) 0.89(±0.11) 5.73(±0.12) 17.26(±0.69) Table 2: Comparisons of semi-supervised classification errors (%) on MNIST, SVHN and CIFAR-10 test sets. 4.3 Qualitative Results In this section we present qualitative results produced by SGAN’s generator under semi-supervised settings. Unless otherwise specified, we use 50, 1000 and 4000 labels on MNIST, SVHN, CIFAR-10 for the results. These results are randomly selected without cherry pick, and more results could be found in the supplementary materials. (a) w/o Ry, Rz (b) w/o Rz (c) Full model Figure 3: Ablation study: conditional generation results by SGAN (a) without Ry, Rz, (b) without Rz (c) full model. Each row has the same y while each column shares the same z. Controllable generation. To figure out how each module in SGAN contributes to the final results, we conduct an ablation study in Fig.3, where we plot images generated by SGAN with or without the terms Ry and Rz during training. As we have observed, our full model accurately disentangles y and z. When there is no collaborative game involved, the generator easily collapses to a biased conditional distribution defined by the classifier C that is trained only on a very small set of labeled data with insufficient supervision. For example, the generator cannot clearly distinguish the following digits: 0, 2, 3, 5, 8. Incorporating Ry into training significantly alleviate this issue – an augmented C would resolve G’s confusion. However, it still makes mistakes in some confusing classes, such as 3 and 5. Ry and Rz connect the two adversarial games to form a mutual boosting cycle. The absence of any of them would break this cycle, consequently, SGAN would be under-constrained and may collapse to some local minima – resulting in both a less accurate classifier C and a less controlled G. Visual quality. Next, we investigate whether a more disentangled y, z will result in higher visual quality on generated samples, as it makes sense that the conditioned generator G would be much easier to learn when its inputs y and z carry more orthogonal information. We conduct this experiment on CIFAR-10 that is consisted of natural images with more uncertainty besides the object categories. We compare several state-of-the-art generators in Fig 4 to SGAN without any advanced GAN training strategies (e.g. WGAN, gradient penalties) that are reported to possibly improve the visual quality. We find SGAN’s conditional generator does generate less blurred images with the main objects more salient, compared to TripleGAN and ImprovedGAN w/o minibatch discrimination (see supplementary). For a quantitative measure, we generate 50K images and compute the inception (a) CIFAR-10 data (b) TripleGAN (c) SGAN Figure 4: Visual comparison of generated images on CIFAR-10. For (b) and (c), each row shares the same y. 8 (a) (b) (c) (d) (e) (f) Figure 5: (a)-(c): image progression, (d)-(f): style transfer using SGAN. score [27] as 6.91(±0.07), compared to TripleGAN 5.08(±0.09) and Improved-GAN 3.87(±0.03) w/o minibatch discrimination, confirming the advantage of structured modeling for y and z. Image progression. To demonstrate that SGAN generalizes well instead of just memorizing the data, we generate images with interpolated z in Fig.5(a)-(c) [32]. Clearly, the images generated with progression are semantically consistent with y, and change smoothly from left to right. This verifies that SGAN correctly disentangles semantics, and learns accurate class-conditional distributions. Style transfer. We apply SGAN for style transfer [7, 30]. Specifically, as y is modeled as digit/object category on all three dataset, we suppose z shall encode any other information that are orthogonal to y (probably style information). To see whether I behaves properly, we use SGAN to transfer the unstructured information from z in Fig.5(d)-(f): given an image x (the leftmost image), we infer its unstructured code z. We generate images conditioned on z, but with different y. It is interesting to see that z encodes various aspects of the images, such as the shape, texture, orientation, background information, etc, as expected. Moreover, G can correctly transfer these information to other classes. 5 Conclusion We have presented SGAN for semi-supervised conditional generative modeling, which learns from a small set of labeled instances to disentangle the semantics of our interest from other elements in the latent space. We show that SGAN has improved disentanglability and controllability compared to baseline frameworks. SGAN’s design is beneficial to a lot of downstream applications: it establishes new state-of-the-art results on semi-supervised classification, and outperforms strong baseline in terms of the visual quality and inception score on controllable image generation. Acknowledgements Zhijie Deng and Jun Zhu are supported by NSF China (Nos. 61620106010, 61621136008, 61332007), the MIIT Grant of Int. Man. Comp. Stan (No. 2016ZXFB00001), Tsinghua Tiangong Institute for Intelligent Computing and the NVIDIA NVAIL Program. Hao Zhang is supported by the AFRL/DARPA project FA872105C0003. Xiaodan Liang is supported by award FA870215D0002. References [1] Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for large-scale machine learning. In USENIX Symposium on Operating Systems Design and Implementation, 2016. 9 [2] James Bergstra, Olivier Breuleux, Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, Guillaume Desjardins, Joseph Turian, David Warde-Farley, and Yoshua Bengio. Theano: A cpu and gpu math compiler in python. pages 3–10, 2010. [3] Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2172–2180, 2016. [4] Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. arXiv preprint arXiv:1605.09782, 2016. [5] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606.00704, 2016. [6] Tzu-Chien Fu, Yen-Cheng Liu, Wei-Chen Chiu, Sheng-De Wang, and Yu-Chiang Frank Wang. Learning cross-domain disentangled deep representation with supervision from a single domain. arXiv preprint arXiv:1705.01314, 2017. [7] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [8] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. [9] Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Controllable text generation. arXiv preprint arXiv:1703.00955, 2017. [10] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. arXiv preprint arXiv:1611.07004, 2016. [11] Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Advances in Neural Information Processing Systems, pages 3581–3589, 2014. [12] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [13] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016. [14] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [15] Chongxuan Li, Kun Xu, Jun Zhu, and Bo Zhang. Triple generative adversarial nets. In Advances in Neural Information Processing Systems, 2017. [16] Chongxuan Li, Jun Zhu, Tianlin Shi, and Bo Zhang. Max-margin deep generative models. In Advances in Neural Information Processing Systems, pages 1837–1845, 2015. [17] Xiaodan Liang, Zhiting Hu, Hao Zhang, Chuang Gan, and Eric P Xing. Recurrent topic-transition gan for visual paragraph generation. arXiv preprint arXiv:1703.07022, 2017. [18] 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. [19] Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. [20] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. [21] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [22] Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, pages 3546–3554, 2015. 10 [23] Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In International Conference on Machine Learning, pages 1060–1069, 2016. [24] Scott Reed, Aäron van den Oord, Nal Kalchbrenner, Victor Bapst, Matt Botvinick, and Nando de Freitas. Generating interpretable images with controllable structure. In International Conference on Learning Representations, 2017. [25] Scott E Reed, Zeynep Akata, Santosh Mohan, Samuel Tenka, Bernt Schiele, and Honglak Lee. Learning what and where to draw. In Advances in Neural Information Processing Systems, pages 217–225, 2016. [26] Ruslan Salakhutdinov and Geoffrey Hinton. Deep boltzmann machines. In Artificial Intelligence and Statistics, pages 448–455, 2009. [27] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pages 2226–2234, 2016. [28] Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv preprint arXiv:1511.06390, 2015. [29] Luan Tran, Xi Yin, and Xiaoming Liu. Disentangled representation learning gan for pose-invariant face recognition. In Conference on Computer Vision and Pattern Recognition, 2017. [30] Hao Wang, Xiaodan Liang, Hao Zhang, Dit-Yan Yeung, and Eric P Xing. Zm-net: Real-time zero-shot image manipulation network. arXiv preprint arXiv:1703.07255, 2017. [31] Xiaolong Wang and Abhinav Gupta. Generative image modeling using style and structure adversarial networks. In European Conference on Computer Vision, pages 318–335. Springer, 2016. [32] Xinchen Yan, Jimei Yang, Kihyuk Sohn, and Honglak Lee. Attribute2image: Conditional image generation from visual attributes. In European Conference on Computer Vision, pages 776–791. Springer, 2016. [33] Hao Zhang, Zhiting Hu, Jinliang Wei, Pengtao Xie, Gunhee Kim, Qirong Ho, and Eric Xing. Poseidon: A system architecture for efficient gpu-based deep learning on multiple machines. arXiv preprint arXiv:1512.06216, 2015. 11 | 2017 | 507 |
7,016 | Dynamic-Depth Context Tree Weighting João V. Messias∗ Morpheus Labs Oxford, UK jmessias@morpheuslabs.co.uk Shimon Whiteson University of Oxford Oxford, UK shimon.whiteson@cs.ox.ac.uk Abstract Reinforcement learning (RL) in partially observable settings is challenging because the agent’s observations are not Markov. Recently proposed methods can learn variable-order Markov models of the underlying process but have steep memory requirements and are sensitive to aliasing between observation histories due to sensor noise. This paper proposes dynamic-depth context tree weighting (D2-CTW), a model-learning method that addresses these limitations. D2-CTW dynamically expands a suffix tree while ensuring that the size of the model, but not its depth, remains bounded. We show that D2-CTW approximately matches the performance of state-of-the-art alternatives at stochastic time-series prediction while using at least an order of magnitude less memory. We also apply D2-CTW to model-based RL, showing that, on tasks that require memory of past observations, D2-CTW can learn without prior knowledge of a good state representation, or even the length of history upon which such a representation should depend. 1 Introduction Agents must often act given an incomplete or noisy view of their environments. While decisiontheoretic planning and reinforcement learning (RL) methods can discover control policies for agents whose actions can have uncertain outcomes, partial observability greatly increases the problem difficulty since each observation does not provide sufficient information to disambiguate the true state of the environment and accurately gauge the utility of the agent’s available actions. Moreover, when stochastic models of the system are not available a priori, probabilistic inference over latent state variables is not feasible. In such cases, agents must learn to memorize past observations and actions [21, 9], or one must learn history-dependent models of the system [15, 8]. Variable-order Markov models (VMMs), which have long excelled in stochastic time-series prediction and universal coding [23, 14, 2], have recently also found application in RL under partial observability [13, 7, 24, 19]. VMMs build a context-dependent predictive model of future observations and/or rewards, where a context is a variable-length subsequence of recent observations. Since the number of possible contexts grows exponentially with both the context length and the number of possible observations, VMMs’ memory requirements may grow accordingly. Conversely, the frequency of each particular context in the data decreases as its length increases, so it may be difficult to accurately model long-term dependencies without requiring prohibitive amounts of data. Existing VMMs address these problems by allowing models to differentiate between contexts at nonconsecutive past timesteps, ignoring intermediate observations [13, 22, 10, 24, 4]. However, they typically assume that either the amount of input data is naturally limited or there is a known bound on the length of the contexts to be considered. In most settings in which an agent interacts continuously with its environment, neither assumption is well justified. The lack of a defined time limit means the approaches that make the former assumption, e.g., [13, 24], may eventually and indiscriminately ∗During the development of this work, the main author was employed by the University of Amsterdam. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. use all the agent’s physical memory, while those that assume a bound on the context length, e.g., [19], may perform poorly if observations older than this bound are relevant. This paper proposes dynamic-depth context tree weighting (D2-CTW), a VMM designed for general continual learning tasks. D2-CTW extends context tree weighting (CTW) [23] by allowing it to dynamically grow a suffix tree that discriminates between observations at different depths only insofar as that improves its ability to predict future inputs. This allows it to bound the number of contexts represented in the model, without sacrificing the ability to model long-term dependencies. Our empirical results show that, when used for general stochastic time-series prediction, D2-CTW produces models that are much more compact than those of CTW while providing better results in the presence of noise. We also apply D2-CTW as part of a model-based RL architecture and show that it outperforms multiple baselines on the problem of RL under partial observability, particularly when an effective bound on the length of its contexts is not known a priori. 2 Background 2.1 Stochastic Time-Series Prediction Let an alphabet Σ = {σ1, σ2, . . . , σ|Σ|} be a discrete set of symbols, and let Π(Σ) represent the space of probability distributions over Σ (the (|Σ|−1)-simplex). Consider a discrete-time stochastic process that, at each time t ≥0, samples a symbol σt from a probability distribution pt ∈Π(Σ). We assume that this stochastic process is stationary and ergodic, and that pt is a conditional probability distribution, which for some (unknown) constant integer D with 0 < D ≤t has the form: pt(σ) = P(σt = σ | σt−1, σt−2, . . . , σt−D). (1) Let σt−D:t−1 = (σt−D, σt−D+1, . . . σt−1, ) be a string of symbols from time t −D to t −1. Since σt−D:t−1 ∈ΣD and Σ is finite, there is a finite number of length-D strings on which the evolution of our stochastic process can be conditioned. Thus, the stochastic process can also be represented by a time-invariant function F : ΣD →Π(Σ) such that pt =: F(σt−D:t−1) at any time t ≥D. Let s be a string of symbols from alphabet Σ with length |s| and elements [s]i=∈{1,...,|s|}. Furthermore, a string q with |q| < |s| is said to be a prefix of s iff q1:|q| = s1:|q|, and a suffix of s iff q1:|q| = s|s|−|q|:|s|. We write sq or σs for the concatenation of strings s and q or of s and symbol σ ∈Σ. A complete and proper suffix set is a set of strings S such that any string not in S has exactly one suffix in S but no string in S has a suffix in S. Although D is an upper bound on the age of the oldest symbol on which the process F depends, at any time t it may depend only on some suffix of σt−D:t−1 of length less than D. Given the variablelength nature of its conditional arguments, F can be tractably encoded as a D-bounded tree source [2] that arranges a complete and proper suffix set into a tree-like graphical structure. Each node at depth d ≤D corresponds to a length-d string and all internal nodes correspond to suffixes of the strings associated with their children; and each leaf encodes a distribution over Σ representing the value of F for that string. Given a single, uninterrupted sequence of σ0:t generated by F, we wish to learn the ˜F : ΣD → Π(Σ) that minimises the average log-loss of the observed data σ0:t. Letting P ˜ F (· | σi−D, . . . , σi−1) := ˜F(σi−D:i−1): l(σ0:t | ˜F) = −1 t t X i=D log P ˜ F (σi | σi−D, . . . , σi−1). (2) 2.2 Context Tree Weighting The depth-K context tree on alphabet Σ is a graphical structure obtained by arranging all possible strings in ΣK into a full tree. A context tree has a fixed depth at all leaves and potentially encodes all strings in ΣK, not just those required by F. More specifically, given a sequence of symbols σ0:t−1, the respective length-K context σt−K:t−1 induces a context path along the context tree by following at each level d ≤K the edge corresponding to σt−d. The root of the context tree represents an empty string ∅, a suffix to all strings. Furthermore, each node keeps track of the input symbols that have immediately followed its respective context. Let sub(σ0:t−1, s) represent the 2 string obtained by concatenating all symbols σi in σ0:t−1 such that its preceding symbols verify σi−k = sk for k = 1, . . . , |s|. Then, each node s in the context tree maintains its own estimate of the probability of observing the string sub(σ0:t−1, s). Context tree weighting (CTW) [23] learns a mixture of the estimates of P (sub(σ0:t−1, s)) at all contexts s of length |s| ≤K and uses it to estimate the probability of the entire observed sequence. Let P s e (σ0:t−1) represent the estimate of P (sub(σ0:t−1, s)) at the node corresponding to s, and let P s w(σ0:t−1) be a weighted representation of the same measure, defined recursively as: P s w(σ0:t−1) := 1 2P s e (σ0:t−1) + 1 2 Q σ∈Σ P σs w (σ0:t−1) if |s| < K, P s e (σ0:t−1) if |s| = K. (3) Since sub(σ0:t−1, ∅) = σ0:t−1 by definition of the empty context, P ∅ w(σ0:t−1) is an estimate of P(σ0:t−1). The conditional probability of symbol σt is approximated as P ˜ F (σt|σ0:t−1) = P ∅ w(σ0:t)/P ∅ w(σ0:t−1). The (unweighted) estimate P s e (σ0:t−1) at each context is often computed by keeping |Σ| incrementally updated counters [cs,t]i=1,...,|Σ| ∈N0, where for each σi ∈Σ, [cs,t]i represents the total number of instances where the substring sσi can be found within σ0:t−1. The vector of counters cs,t can be modelled as the output of a Dirichlet-multinomial distribution with concentration parameter vector α = [αi]i=1,...,|Σ|. An estimate of the probability of observing symbol σk at time t + 1 can then be taken as follows: if s is on the context path at time t and σt = σk is the next observed symbol, then [cs,t+1]k = [cs,t]k + 1, and [cs,t+1]i = [cs,t]i for all i ̸= k. Then: P s e (σk| σ0:t) := PDirM(cs,t+1 | α) PDirM(cs,t | α) = [cs,t]k + [α]k c+ s,t + α+ , (4) where α+ = P|Σ| i=1[α]i, c+ s,t = P|Σ| i=1[cs,t]i, and PDirM is the Dirichlet-multimomial mass function. The estimate of the probability of the full sequence is then P s e (σ0:t) = Qt τ=0 P s e (στ|σ0:τ−1). This can be updated in constant time as each new symbol is received. The choice of α affects the overall quality of the estimator. We use the sparse adaptive Dirichlet (SAD) estimator [11], which is especially suited to large alphabets. In principle, a depth-K context tree has |Σ|K+1 −1 nodes, each with at most |Σ| integer counters. In practice, there may be fewer nodes since one need only to allocate space for contexts found in the data at least once, but their total number may still grow linearly with the length of the input string. Thus, for problems such as partially observable RL, in which the amount of input data is unbounded, or for large |Σ| and K, the memory used by CTW can quickly become unreasonable. Previous extensions to CTW and other VMM algorithms have been made that do not explicitly bound the depth of the model [6, 22]. However, these still take up memory that is worst-case linear in the length of the input sequence. Therefore, they are not applicable to reinforcement learning. To overcome this problem, most existing approaches artificially limit K to a low value, which limits the agent’s ability to address long-term dependencies. To our knowledge, the only existing principled approach to reducing the amount of memory required by CTW was proposed in [5], through the use of a modified (Budget) SAD estimator which can be used to limit the branching factor in the context tree to B < |Σ|. This approach still requires K to be set a priori, and is best-suited to prediction problems with large alphabets but few high frequency symbols (e.g. word prediction), which is not generally the case in decision-making problems. 2.3 Model-Based RL with VMMs In RL with partial observability, an agent performs at each time t an action at ∈A, and receives an observation ot ∈O and a reward rt ∈R with probabilities P(ot|o0:t−1, r0:t−1, a0:t−1) and P(rt|o0:t−1, r0:t−1, a0:t−1) respectively. This representation results from marginalising out the latent state variables and assuming that the agent observes rewards. The agent’s goal is to maximise the expected cumulative future rewards E{P∞ τ=t+1 rt + λτ−trτ} for some discount factor λ ∈[0, 1). Letting R = {rt : P(rt|o0:t−1, r0:t−1, a0:t−1) > 0 ∀o0:t−1, r0:t−1, a0:t−1} represent the set of possible rewards and zt ∈{1, . . . , |R|} the unique index of rt ∈R, then a percept (ot, zt) is received at each time with probability P(ot, zt|o0:t−1, z0:t−1, a0:t−1). VMMs such as CTW can 3 then learn a model of this process, using the alphabet Σ = O × {1, . . . , |R|}. This predictive model must condition on past actions, but its output should only estimate the probability of the next percept (not the next action). This is solved by interleaving actions and percepts in the input context, but only updating its estimators based on the value of the next percept [19]. The resulting action-conditional model can be used as a simulator by sample-based planning methods such as UCT [12]. 2.4 Utile Suffix Memory Utile suffix memory (USM) [13] is an RL algorithm similar to VMMs for stochastic time-series prediction. USM learns a suffix tree that is conceptually similar to a context tree with the following differences. First, each node in the suffix tree directly maintains an estimate of expected cumulative future reward for each action. To compute this estimate, USM still predicts (immediate) future observations and rewards at each context, analogously to VMM methods. This prediction is done in a purely frequentist manner, which often yields inferior prediction performance compared to other VMMs, especially given noisy data. Second, USM’s suffix tree does not have a fixed depth; instead, its tree is grown incrementally, by testing potential expansions for statistically significant differences between their respective predictions of cumulative future reward. USM maintains a fixed-depth subtree of fringe nodes below the proper leaf nodes of the suffix tree. Fringe nodes do not contribute to the model’s output, but they also maintain count vectors. At regular intervals, USM compares the distributions over cumulative future reward of each fringe node against its leaf ancestor, through a Kolmogorov-Smirnov (K-S) test. If this test succeeds at some threshold confidence, then all fringe nodes below that respective leaf node become proper nodes, and a new fringe subtree is created below the new leaf nodes. USM’s fringe expansion allows it to use memory efficiently, as only the contextual distinctions that are actually significant for prediction are represented. However, USM is computationally expensive. Performing K-S tests for all nodes in a fringe subtree requires, in the worst-case, time linear in the amount of (real-valued) data contained at each node, and exponential in the depth of the subtree. This cost can be prohibitive even if the expansion test is only run infrequently. Furthermore, USM does not explicitly bound its memory use, and simply stopping growth once a memory bound is hit would bias the model towards symbols received early in learning. 3 Dynamic-Depth Context Tree Weighting We now propose dynamic-depth context tree weighting (D2-CTW). Rather than fixing the depth a priori, like CTW, or using unbounded memory, like USM, D2-CTW learns ˜F with dynamic depth, subject to the constraint | ˜Ft| ≤L at any time t, where L is a fixed memory bound. 3.1 Dynamic Expansion in CTW To use memory efficiently and avoid requiring a fixed depth, we could simply replicate USM’s fringe expansion in CTW, by performing K-S tests on distributions over symbols (P s e ) instead of distributions over expected reward. However, doing so would introduce bias. The weighted estimates P s w(σ0:t) for each context s depend on the ratio of the probability of the observed data at s itself, P s e (σ0:t), and that of the data observed at its children, P s′ w (σ0:t) at s′ = σs ∀σ ∈Σ. These estimates depend on the number of times each symbol followed a context, implying that cs,t = P σ∈Σ cs′,t. Thus, the weighting in (3) assumes that each symbol that was observed to follow the non-leaf context s was also observed to follow exactly one of its children s′. If this was not so and, e.g., s was created at time 0 but its children only at τ > 0, then, since P s′ w (στ:t) ≥P s′ w (σ0:t), the weighting would be biased towards the children, which would have been exposed to less data. Fortunately, an alternative CTW recursion, originally proposed for numerical stability [20], overcomes this issue. In CTW and for a context tree of fixed depth K, let βs t be the likelihood ratio between the weighted estimate below s and the local estimate at s itself: βs t := ( Q σ∈Σ P σs w (σ0:t) P s e (σ0:t) if |s| < K, 1 if |s| = K. (5) Then, the weighted estimate of the conditional probability of an observed symbol σt at node s is: P s w(σt|σ0:t−1) := P s w(σ0:t) P sw(σ0:t−1) = 1 2P s e (σ0:t) (1 + βs t ) 1 2P se (σ0:t−1) 1 + βs t−1 =: P s e (σt|σ0:t−1) 1 + βs t 1 + βs t−1 . (6) 4 Furthermore, βs t can be updated for each s as follows. Let Ct represent the set of suffixes on the context path at time t (the set of all suffixes of σ0:t−1). Then: βs t = ( P s′ w (σt|σ0:t−1) P s e (σt|σ0:t−1) βs t−1 if s ∈Ct, βs t = βs t−1 otherwise, (7) where s′ = σt−1−|s|s is the child of s that follows it on the context path. For any context, we set βs 0 = 1. This reformulation allows the computation of P s w(σt|σ0:t−1) using only the nodes on the context path and while storing only a single value in those nodes, βs t , regardless of |Σ|. Since this reformulation depends only on conditional probability estimates, we can perform fringe expansion in CTW and add nodes dynamically without biasing the mixture. Disregard the fixed depth limit K and consider instead a suffix tree where all leaf nodes have a depth greater than the fringe depth H > 0. For any leaf node at depth d, its ancestor at depth d −H is its frontier node. The descendants of any frontier node are fringe nodes. Let ft represent the frontier node on the context path at time t. At every timestep t, we traverse down the tree by following the context path as in CTW. At every node on the context path and above ft, we apply (6) and (7) while treating ft as a leaf node. For ft and the fringe nodes on the context path below it, we apply the same updates while treating fringe nodes normally. Thus, the recursion in (6) does not carry over to fringe nodes, but otherwise all nodes update their values of β in the same manner. Once the fringe expansion criterion is met (see Section 3.2), the fringe nodes below ft simply stop being labeled as such, while the values of β for the nodes above ft must be updated to reflect the change in the model. Let ¯P ft w (σ0:t) represent the weighted (unconditional) output at ft after the fringe expansion step. We have therefore ¯P ft w (σ0:t) := 1 2P ft e (σ0:t)(1 + βft t ), but prior to the expansion, P ft w (σ0:t) = P ft e (σ0:t). The net change in the likelihood of σ0:t, according to ft, is: αft exp := ¯P ft w (σ0:t) P ft w (σ0:t) = 1 + βft t 2 . (8) This induces a change in the likelihood of the data according to all of the ancestors of ft. We need to determine α∅ exp =: ¯P ∅ w(σ0:t)/P ∅ w(σ0:t), which quantifies the effect of the fringe expansion on the global output of the weighted model. Proposition 1. Let f be a string corresponding to a frontier node, and let pd be the length-d suffix of f (with p0 = ∅). Also let ρf := Q|f|−1 d=0 β pd t 1+β pd t , and αf exp := 1+βf t 2 . Then: α∅ exp := ¯P ∅ w(σ0:t) P ∅w(σ0:t) = 1 + ρf αf exp −1 . The proof can be found in the supplementary material of this paper (Appendix A.1). This formulation is useful since, for any node s in the suffix tree with ancestors (p0, p1, . . . , p|s|−1) we can associate a value ρs t = Q|s|−1 d=0 β pd t 1+β pd t = ρ p|s|−1 t β p|s|−1| t 1+β p|s−1| t that measures the sensitivity of the whole model to changes below s, and not necessarily just fringe expansions. Thus, a node with ρs ≃0 is a good candidate for pruning (see Section 3.3). Furthermore, this value can be computed while traversing the tree along the context path. Although the computation of ρs for a particular node still requires O(|s|) operations, the values of ρ for all ancestors of s are also computed along the way. 3.2 Fringe Expansion Criterion As a likelihood ratio, αf exp provides a statistical measure of the difference between the predictive model at each frontier node f and that formed by its fringe children. Analogously, α∅ exp can be seen as the likelihood ratio between two models that differ only on the subtree below f. Therefore, we can test the hypothesis that the subtree below f should be added to the model by checking if α∅ exp > γ for some γ > 1. Since the form of P ∅ w(·) is unknown, we cannot establish proper confidence levels for γ; however, the following result shows that the value of γ is not especially important, since if the subtree below f improves the model, this test will eventually be true given enough data. 5 Theorem 1. Let S and Sexp be two proper suffix sets such that Sexp = (S \ f)∪F where f is suffix to all f ′ ∈F. Furthermore, let M and Mexp be the CTW models using the suffix trees induced by S and Sexp respectively, and P ∅ w(σ0:t; M), P ∅ w(σ0:t; Mexp) their estimates of the likelihood of σ0:t. If there is a T ∈N such that, for any τ > 0: T +τ Y t=τ P f e (σt|σ0:t−1; M) < T +τ Y t=τ Y σ∈Σ P σf w (σt|σ0:t−1; Mexp), then for any γ ∈[1, ∞), there is T ′ > 0 such that P ∅ w(σ0:T ′; Mexp)/P ∅ w(σ0:T ′; M) > γ. The proof can be found in the supplementary material (Appendix A.2). Using α∅ exp > γ as a statistical test instead of K-S tests yields great computational savings, since the procedure described in Proposition 1 allows us to determine this test in O(|ft|), typically much lower than the O(|Σ|H+1) complexity of K-S testing all fringe children. Theorem 1 also ensures that, if sufficient memory is available, D2-CTW will eventually perform as well as CTW with optimal depth bound K = D. This follows from the fact that, for every node s at depth ds ≤D in a CTW suffix tree, if βs t ≥1 for all t > τ, then the D2-CTW suffix tree will be at least as deep as ds at context s after some time t′ ≥τ. That is, at some point, the D2-CTW model will contain the “useful” sub-tree of the optimal-depth context tree. Corollary 1. Let l(· | ˜FCT W , D) represent the average log-loss of CTW using fixed depth K when modeling a D−bounded tree source, and l(· | ˜FD2−CT W , γ, H, L) the same metric when using D2CTW. For any values of γ > 1 and H > 1, and for sufficiently high L > 0, there exists a time T ′ > 0 such that, for any t > T ′, l(σT ′:t | ˜FD2−CT W , γ, H, L) ≤l(σT ′:t | ˜FCT W , D). 3.3 Ensuring the Memory Bound In order to ensure that the memory bound | ˜Ft| ≤L is respected, we must first consider whether a potential fringe expansion does not require more memory than is available. Thus, if the subtree below frontier node f has size Lf, we must test if | ˜Ft| + Lf ≤L. This means that fringe nodes are not taken into account when computing | ˜Ft|, as they do not contribute to the output of ˜Ft and are therefore considered as memory overhead, and discarded after training. Once | ˜Ft| is such that no fringe expansions are possible without violating the memory bound, it may still be possible to improve the model by pruning low-quality subtrees to create enough space for more valuable fringe expansions. Pruning operations also have a quantifiable effect on the likelihood of the observed data according to ˜Ft. Let P s w(σ0:t) represent the weighted estimate at internal node s after pruning its subtree. Analogously to (8), we can define αs prune := P s w(σ0:t)/P s w(σ0:t) = 2/(1 + βs t ). We can also compute α∅ prune, the global effect on the likelihood, using the procedure in Proposition 1. Since α∅ prune = 1 + ρs αs prune −1 , typically with αs prune < 1, if a fringe expansion at f increases P ∅ w(σ0:t) by a factor of α∅ exp but requires space Lf such that | ˜Ft|+Lf > L, we should prune the subtree below s ̸= f that frees Ls space and reduces P ∅ w(σ0:t) by α∅ prune if 1) α∅ exp × α∅ prune > 1; 2) | ˜Ft| + Lf −Ls ≤L; and 3) s is not an ancestor of f. The latter condition requires O(|f|−|s|) time to validate, while the former can be done in constant time if ρs is available. In general, some combination of subtrees could be pruned to free enough space for some combination of fringe expansions, but determining the best possible combination of operations at each time is too computationally expensive. As a tractable approximation, we compare only the best single expansion and prune at nodes f ∗and s∗respectively, quantified with two heuristics Hf exp := log α∅ expf and Hs prune := −log α∅ prunes, such that f ∗= arg maxf Hf exp and s∗= arg minf Hs prune. As L is decreased, the performance of D2-CTW may naturally degrade. Although Corollary 1 may no longer be applicable in that case, a weaker bound on the performance of memory-constrained D2-CTW can be obtained as follows, regardless of L: let dt min denote the minimum depth of any frontier node at time t; then the D2-CTW suffix tree covers the set of dt min-bounded models [23]. The redundancy of D2-CTW, measured as the Kullback-Leibler divergence DKL(F|| ˜Ft), is then at least as low as the redundancy of a multi-alphabet CTW implementation with K = dt min [17]. 6 bib book1 book2 geo news obj1 obj2 paper1 paper2 paper3 paper4 paper5 paper6 pic progc progl progp trans File name 0 1 2 3 4 5 6 7 bits/byte Avg. log-loss (optimal params.) ctw d2-ctw (a) bib book1 book2 geo news obj1 obj2 paper1 paper2 paper3 paper4 paper5 paper6 pic progc progl progp trans File name 100 101 102 103 104 105 106 107 Number of nodes Nr. nodes (optimal params.) (b) bib book1 book2 geo news obj1 obj2 paper1 paper2 paper3 paper4 paper5 paper6 pic progc progl progp trans File name 0 2 4 6 8 10 12 14 Model depth Model depth (optimal params.) (c) bib book1 book2 geo news obj1 obj2 paper1 paper2 paper3 paper4 paper5 paper6 pic progc progl progp trans File name 0 1 2 3 4 5 6 7 bits/byte Avg. log-loss (L=1000) (d) bib book1 book2 geo news obj1 obj2 paper1 paper2 paper3 paper4 paper5 paper6 pic progc progl progp trans File name 0 1 2 3 4 5 6 7 bits/byte Avg. Log-loss (L=1000, 5% noise) (e) 1 5 9 13 17 Likelihood ratio threshold, γ 4.05 4.10 4.15 4.20 4.25 4.30 4.35 bits/byte Avg. Log-loss vs. γ (f) Figure 1: Calgary Corpus performance with CTW (red) and D2-CTW (blue). For average log-loss, lower is better: (a)-(c) using optimal parameters; (d) with a bound on the number of nodes; (e) with size bound and uniform noise; (f) log-loss vs. γ on ‘book2’, with 10% noise (over 30 runs). 3.4 Complete Algorithm and Complexity The complete D2-CTW algorithm operates as follows (please refer to Appendix A.3 for the respective pseudo-code): a suffix tree is first initialized containing only a root node; at every timestep, the suffix tree is updated using the observed symbol σt, and the preceding context (if it exists) from time t −dt max −H where dt max is the current maximum depth of the tree and H is the fringe depth. This update returns the weighted conditional probability of σt, and it also keeps track of the best known fringe expansion and pruning operations. Then, a post-processing step expands and possibly prunes the tree as necessary, ensuring the memory bound is respected. This step also corrects the values of β for any nodes affected by these topological operations. D2-CTW trains on each new symbol in O(dt max + H) time, the same as CTW with depth bound K = dt max + H. A worstcase O((dt max + H)|Σ|) operations are necessary to sample a symbol from the learned model, also equivalent to CTW. Post-processing requires O(max{|f ∗|, |s∗|}) time. 4 Experiments We now present empirical results on byte-prediction tasks and partially-observable RL. Our code and instructions for its use is publicly available at: https://bitbucket.org/jmessias/vmm_py. Byte Prediction We compare the performance of D2-CTW against CTW on the 18-file variant of the Calgary Corpus [3], a benchmark of text and binary data files. For each file, we ask the algorithms to predict the next byte given the preceding data, such that |Σ| = 256 across all files. We first compare performance when using (approximately) optimal hyperparameters. For CTW, we performed a grid search taking K ∈{1, . . . , 10} for each file. For D2-CTW, we investigated the effect of γ on the prediction log-loss across different files, and found no significant effect of this parameter for sufficiently large values (an example is shown in Fig. 1f), in accordance with Theorem 1. Consequently, we set γ = 10 for all our D2-CTW runs. We also set L = ∞and H = 2. The corpus results, shown in Figs. 1a–1c, show that D2-CTW achieves comparable performance to CTW: on average D2-CTW’s loss is 2% higher, which is expected since D2-CTW grows dynamically from a single node, while CTW starts with a fully grown model of optimal height. By contrast, D2-CTW uses many fewer nodes than CTW, by at least one order of magnitude (average factor ∼28). D2-CTW automatically discovers optimal depths that are similar to the optimal values for CTW. We then ran a similar test but with a bound on the number of nodes L = 1000. For CTW, we enforced this bound by simply stopping the suffix tree from growing beyond this point2. The results 2For simplicity, we did not use CTW with Budget SAD as a baseline. Budget SAD could also be used to extend D2-CTW, so a fair comparison would necessitate the optional integration of Budget SAD into both CTW and D2-CTW. This is an interesting possibility for future work. 7 are shown in Fig. 1d. In this case, the log-loss of CTW is on average 11.4% and up to 32.3% higher than that of D2-CTW, showing that D2-CTW makes a significantly better use of memory. Finally, we repeated this test but randomly replaced 5% of symbols with uniform noise. This makes the advantage of D2-CTW is even more evident, with CTW scoring on average 20.0% worse (Fig. 1e). While the presence of noise still impacts performance, the results show that D2-CTW, unlike CTW, is resilient to noise: spurious contexts are not deemed significant, avoiding memory waste. Model-Based RL For our empirical study on online partially observable RL tasks, we take as a baseline MC-AIXI, a combination of fixed-depth CTW modelling with ρUCT planning [19], and investigate the effect of replacing CTW with D2-CTW and limiting the available memory. We also compare against PPM-C, a frequentist VMM that is competitive with CTW [2]. Our experimental domains are further described in the supplementary material. Our first domain is the T-maze [1], in which an agent must remember its initial observation in order to act optimally at the end of the maze. We consider a maze of length 4. We set K = 3 for CTW and PPM-C, which is the guaranteed minimum depth to produce the optimal policy. For D2-CTW we set γ = 1, H = 2, and do not enforce a memory bound. As in [19], we use an ϵ-greedy exploration strategy. Fig. 2a shows that D2-CTW discovers the length of the T-Maze automatically. Furthermore, CTW and PPM-C fail to learn to retain the required observations, as during the initial stages of learning the agent may need more than 3 steps to reach the goal (D2-CTW learns a model of depth 4). Our second scenario is the cheese maze [13], a navigation task with aliased observations. Under optimal parameters, D2-CTW and CTW both achieve near-optimal performance for this task. We investigated the effect of setting a bound on the number of nodes L = 1000, roughly 1/5 of the amount used by CTW with optimal hyperparameters. In Fig. 2b we show that the quality of D2CTW degrades less than both CTW and PPM-C, still achieving a near optimal policy. As this is a small-sized problem with D = 2, CTW and PPM-C still produce reasonable results in this case albeit with lower quality models than D2-CTW. Finally, we tested a partially observable version of mountain car [16], in which the position of the car is observed but not its velocity. We coarsely discretised the position of the car into 10 states. In this task, we have no strong prior knowledge about the required context length, but found K = 4 to be sufficient for optimal PPM-C and CTW performance. For D2-CTW, we used γ = 10, H = 2. We set also L = 1000 for all methods. Fig. 2c shows the markedly superior performance of D2-CTW when subject to this memory constraint. 5 Conclusions and Future Work We introduced D2-CTW, a variable-order modelling algorithm that extends CTW by using a fringe expansion mechanism that tests contexts for statistical significance, and by allowing the dynamic adaptation of its suffix tree while subject to a memory bound. We showed both theoretically and empirically that D2-CTW requires little configuration across domains and provides better performance with respect to CTW under memory constraints and/or the presence of noise. In future work, we will investigage the use the Budget SAD estimator with a dynamic budget as an alternative mechanism for informed pruning. We also aim to apply a similar approach to context tree switching (CTS) [18], an algorithm that is closely related to CTW but enables mixtures in a larger model class. 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 Episodes 1e3 0 20 40 60 80 100 Reward Average reward/episode in T-Maze (over 200 eps., K=3) D2-CTW PPM-C CTW optimal value fully-Markov bound (a) 1 2 3 4 5 6 7 Timesteps 1e3 5 4 3 2 1 0 1 2 Reward Average reward/step in Cheese Maze (over 200 steps, L=1000) D2-CTW PPM-C CTW optimal value (b) 100 200 300 400 500 Episodes 100 80 60 40 20 0 20 40 Reward Average reward/episode in P.O. Mountain Car (over 100 eps., L=1000) D2-CTW PPM-C CTW (c) Figure 2: Performance measured as (running) average rewards in (a) T-maze; (b) cheese maze; (c) partially observable mountain car. Results show mean over 10 runs, and shaded first to third quartile. 8 Acknowledgments This work was supported by the European Commission under the grant agreement FP7-ICT-611153 (TERESA). References [1] B. Bakker. Reinforcement learning with long short-term memory. In Proceedings of the 14th International Conference on Neural Information Processing Systems, NIPS’01, pages 1475– 1482, Cambridge, MA, USA, 2001. MIT Press. [2] R. Begleiter, R. El-Yaniv, and G. Yona. On prediction using variable order Markov models. Journal of Artificial Intelligence Research, 22:385–421, 2004. [3] T. Bell, I. H. Witten, and J. G. Cleary. Modeling for text compression. ACM Computing Surveys (CSUR), 21(4):557–591, 1989. [4] M. Bellemare, J. Veness, and E. Talvitie. Skip context tree switching. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1458–1466, 2014. [5] M. G. Bellemare. Count-based frequency estimation with bounded memory. In IJCAI, pages 3337–3344, 2015. [6] J. G. Cleary and W. J. Teahan. Unbounded length contexts for PPM. The Computer Journal, 40(2 and 3):67–75, 1997. [7] V. F. Farias, C. C. Moallemi, B. Van Roy, and T. Weissman. Universal reinforcement learning. IEEE Transactions on Information Theory, 56(5):2441–2454, 2010. [8] W. L. Hamilton, M. M. Fard, and J. Pineau. Modelling sparse dynamical systems with compressed predictive state representations. In ICML (1), pages 178–186, 2013. [9] M. Hausknecht and P. Stone. Deep recurrent Q-learning for partially observable MDPs. In AAAI Fall Symposium Series, 2015. [10] M. P. Holmes and C. L. Isbell Jr. Looping suffix tree-based inference of partially observable hidden state. In Proceedings of the 23rd international conference on Machine learning, pages 409–416. ACM, 2006. [11] M. Hutter et al. Sparse adaptive dirichlet-multinomial-like processes. In Conference on Learning Theory: JMLR Workshop and Conference Proceedings, volume 30. Journal of Machine Learning Research, 2013. [12] L. Kocsis and C. Szepesvári. Bandit based monte-carlo planning. In European conference on machine learning, pages 282–293. Springer, 2006. [13] A. K. McCallum. Reinforcement Learning with Selective Percemption and Hidden State. PhD thesis, University of Rochester, 1995. [14] D. Ron, Y. Singer, and N. Tishby. The power of amnesia: Learning probabilistic automata with variable memory length. Machine learning, 25(2-3):117–149, 1996. [15] S. Singh, M. R. James, and M. R. Rudary. Predictive state representations: A new theory for modeling dynamical systems. In Proceedings of the 20th conference on Uncertainty in artificial intelligence, pages 512–519. AUAI Press, 2004. [16] R. S. Sutton and A. G. Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. [17] T. J. Tjalkens, Y. M. Shtarkov, and F. M. J. Willems. Context tree weighting: Multi-alphabet sources. In 14th Symposium on Information Theory in the Benelux, pages 128–135, 1993. [18] J. Veness, K. S. Ng, M. Hutter, and M. Bowling. Context tree switching. In Data Compression Conference (DCC), 2012, pages 327–336. IEEE, 2012. 9 [19] J. Veness, K. S. Ng, M. Hutter, W. Uther, and D. Silver. A monte-carlo AIXI approximation. Journal of Artificial Intelligence Research, 40(1):95–142, 2011. [20] P. A. J. Volf. Weighting techniques in data compression: Theory and algorithms. Technische Universiteit Eindhoven, 2002. [21] D. Wierstra, A. Foerster, J. Peters, and J. Schmidhuber. Solving deep memory POMDPs with recurrent policy gradients. In International Conference on Artificial Neural Networks, pages 697–706. Springer, 2007. [22] F. M. Willems. The context-tree weighting method: Extensions. IEEE Transactions on Information Theory, 44(2):792–798, 1998. [23] F. M. Willems, Y. M. Shtarkov, and T. J. Tjalkens. The context-tree weighting method: basic properties. IEEE Transactions on Information Theory, 41(3):653–664, 1995. [24] F. Wood, J. Gasthaus, C. Archambeau, L. James, and Y. W. Teh. The sequence memoizer. Communications of the ACM, 54(2):91–98, 2011. 10 | 2017 | 508 |
7,017 | Fast, Sample-Efficient Algorithms for Structured Phase Retrieval Gauri jagatap Electrical and Computer Engineering Iowa State University Chinmay Hegde Electrical and Computer Engineering Iowa State University Abstract We consider the problem of recovering a signal x∗∈Rn, from magnitude-only measurements, yi = |⟨ai, x∗⟩| for i = {1, 2, . . . , m}. Also known as the phase retrieval problem, it is a fundamental challenge in nano-, bio- and astronomical imaging systems, and speech processing. The problem is ill-posed, and therefore additional assumptions on the signal and/or the measurements are necessary. In this paper, we first study the case where the underlying signal x∗is s-sparse. We develop a novel recovery algorithm that we call Compressive Phase Retrieval with Alternating Minimization, or CoPRAM. Our algorithm is simple and can be obtained via a natural combination of the classical alternating minimization approach for phase retrieval, with the CoSaMP algorithm for sparse recovery. Despite its simplicity, we prove that our algorithm achieves a sample complexity of O s2 log n with Gaussian samples, which matches the best known existing results. It also demonstrates linear convergence in theory and practice and requires no extra tuning parameters other than the signal sparsity level s. We then consider the case where the underlying signal x∗arises from structured sparsity models. We specifically examine the case of block-sparse signals with uniform block size of b and block sparsity k = s/b. For this problem, we design a recovery algorithm that we call Block CoPRAM that further reduces the sample complexity to O (ks log n). For sufficiently large block lengths of b = Θ(s), this bound equates to O (s log n). To our knowledge, this constitutes the first end-toend linearly convergent family of algorithms for phase retrieval where the Gaussian sample complexity has a sub-quadratic dependence on the sparsity level of the signal. 1 Introduction 1.1 Motivation In this paper, we consider the problem of recovering a signal x∗∈Rn from (possibly noisy) magnitude-only linear measurements. That is, for sampling vector ai ∈Rn, if yi = |⟨ai, x∗⟩| , for i = 1, . . . , m, (1) then the task is to recover x∗using the measurements y and the sampling matrix A = [a1 . . . am]⊤. Problems of this kind arise in numerous scenarios in machine learning, imaging, and statistics. For example, the classical problem of phase retrieval is encountered in imaging systems such as diffraction imaging, X-ray crystallography, ptychography, and astronomy [1, 2, 3, 4, 5]. For such imaging systems, the optical sensors used for light acquisition can only record the intensity of the light waves but not their phase. In terms of our setup, the vector x∗corresponds to an image (with a resolution of n pixels) and the measurements correspond to the magnitudes of its 2D Fourier coefficients. The goal is to stably recover the image x∗using as few observations m as possible. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Despite the prevalence of several heuristic approaches [6, 7, 8, 9], it is generally accepted that (1) is a challenging nonlinear, ill-posed inverse problem in theory and practice. For generic ai and x∗, one can show that (1) is NP-hard by reduction from well-known combinatorial problems [10]. Therefore, additional assumptions on the signal x∗and/or the measurement vectors ai are necessary. A recent line of breakthrough results [11, 12] have provided efficient algorithms for the case where the measurement vectors arise from certain multi-variate probability distributions. The seminal paper by Netrapalli et al. [13] provides the first rigorous justification of classical heuristics for phase retrieval based on alternating minimization. However, all these newer results require an “overcomplete" set of observations, i.e., the number of observations m exceeds the problem dimension n (m = O (n) being the tightest evaluation of this bound [14]). This requirement can pose severe limitations on computation and storage, particularly when m and n are very large. One way to mitigate the dimensionality issue is to use the fact that in practical applications, x∗often obeys certain low-dimensional structural assumptions. For example, in imaging applications x∗is s-sparse in some known basis, such as identity or wavelet. For transparency, we assume the canonical basis for sparsity throughout this paper. Similar structural assumptions form the core of sparse recovery, and streaming algorithms [15, 16, 17], and it has been established that only O s log n s samples are necessary for stable recovery of x∗, which is information-theoretically optimal [18]. Several approaches for solving the sparsity-constrained version of (1) have been proposed, including alternating minimization [13], methods based on convex relaxation [19, 20, 21], and iterative thresholding [22, 23]. Curiously, all of the above techniques incur a sample complexity of Ω(s2 log n) for stable recovery, which is quadratically worse than the information-theoretic limit [18] of O s log n s 1. Moreover, most of these algorithms have quadratic (or worse) running time [19, 22], stringent assumptions on the nonzero signal coefficients [13, 23], and require several tuning parameters [22, 23]. Finally, for specific applications, more refined structural assumptions on x∗are applicable. For example, point sources in astronomical images often produce clusters of nonzero pixels in a given image, while wavelet coefficients of natural images often can be organized as connected sub-trees. Algorithms that leverage such structured sparsity assumptions have been shown to achieve considerably improved sample-complexity in statistical learning and sparse recovery problems using block-sparsity [30, 31, 32, 33], tree sparsity [34, 30, 35, 36], clusters [37, 31, 38], and graph models [39, 38, 40]. However, these models have not been understood in the context of phase retrieval. 1.2 Our contributions The contributions in this paper are two-fold. First, we provide a new, flexible algorithm for sparse phase retrieval that matches state of the art methods both from a statistical as well as computational viewpoint. Next, we show that it is possible to extend this algorithm to the case where the signal is block-sparse, thereby further lowering the sample complexity of stable recovery. Our work can be viewed as a first step towards a general framework for phase retrieval of structured signals from Gaussian samples. Sparse phase retrieval. We first study the case where the underlying signal x∗is s-sparse. We develop a novel recovery algorithm that we call Compressive Phase Retrieval with Alternating Minimization, or CoPRAM2. Our algorithm is simple and can be obtained via a natural combination of the classical alternating minimization approach for phase retrieval with the CoSaMP [41] algorithm for sparse recovery (CoSAMP also naturally extends to several sparsity models [30]). We prove that our algorithm achieves a sample complexity of O s2 log n with Gaussian measurement vectors ai in order to achieve linear convergence, matching the best among all existing results. An appealing feature of our algorithm is that it requires no extra a priori information other than the signal sparsity level s, and no assumptions on the nonzero signal coefficients. To our knowledge, this is the first algorithm for sparse phase retrieval that simultaneously achieves all of the above properties. We use CoPRAM as the basis to formulate a block-sparse extension (Block CoPRAM). Block-sparse phase retrieval. We consider the case where the underlying signal x∗arises from structured sparsity models, specifically block-sparse signals with uniform block size b (i.e., s nonzeros equally grouped into k = s/b blocks). For this problem, we design a recovery algorithm that we 1Exceptions to this rule are [24, 25, 26, 27, 28, 29] where very carefully crafted measurements ai are used. 2We use the terms sparse phase retrieval and compressive phase retrieval interchangeably. 2 Table 1: Comparison of (Gaussian sample) sparse phase retrieval algorithms. Here, n, s, k = s/b denote signal length, sparsity, and block-sparsity. Oϵ (·) hides polylogarithmic dependence on 1 ϵ . Algorithm Sample complexity Running time Assumptions Parameters AltMinSparse Oϵ s2 log n + s2 log3 s Oϵ s2n log n x∗ min ≈ c √s ∥x∗∥2 none ℓ1-PhaseLift O s2 log n O n3 ϵ2 none none Thresholded WF O s2 log n Oϵ n2 log n none step μ, thresholds α, β SPARTA O s2 log n Oϵ s2n log n x∗ min ≈ c √s ∥x∗∥2 step μ, threshold γ CoPRAM O s2 log n Oϵ s2n log n none none Block CoPRAM O (ks log n) Oϵ (ksn log n) none none call Block CoPRAM. We analyze this algorithm and show that leveraging block-structure reduces the sample complexity for stable recovery to O (ks log n). For sufficiently large block lengths b = Θ(s), this bound equates to O (s log n). To our knowledge, this constitutes the first phase retrieval algorithm where the Gaussian sample complexity has a sub-quadratic dependence on the sparsity s of the signal. A comparative description of the performance of our algorithms is presented in Table 1. 1.3 Techniques Sparse phase retrieval. Our proposed algorithm, CoPRAM, is conceptually very simple. It integrates existing approaches in stable sparse recovery (specifically, the CoSaMP algorithm [41]) with the alternating minimization approach for phase retrieval proposed in [13]. A similar integration of sparse recovery with alternating minimization was also introduced in [13]; however, their approach only succeeds when the true support of the underlying signal is accurately identified during initialization, which can be unrealistic. Instead, CoPRAM permits the support of the estimate to evolve across iterations, and therefore can iteratively “correct" for any errors made during the initialization. Moreover, their analysis requires using fresh samples for every new update of the estimate, while ours succeeds in the (more practical) setting of using all the available samples. Our first challenge is to identify a good initial guess of the signal. As is the case with most nonconvex techniques, CoPRAM requires an initial estimate x0 that is close to the true signal x∗. The basic idea is to identify “important" co-ordinates by constructing suitable biased estimators of each signal coefficient, followed by a specific eigendecomposition. The initialization in CoPRAM is far simpler than the approaches in [22, 23]; requiring no pre-processing of the measurements and or tuning parameters other than the sparsity level s. A drawback of the theoretical results of [23] is that they impose a requirement on signal coefficients: minj∈S |x∗ j| = C ∥x∗∥2 /√s. However, this assumption disobeys the power-law decay observed in real world signals. Our approach also differs from [22], where they estimate an initial support based on a parameter-dependent threshold value. Our analysis removes these requirements; we show that a coarse estimate of the support, coupled with the spectral technique in [22, 23] gives us a suitable initialization. A sample complexity of O s2 log n is incurred for achieving this estimate, matching the best available previous methods. Our next challenge is to show that given a good initial guess, alternatingly estimating the phases and non-zero coefficients (using CoSaMP) gives a rapid convergence to the desired solution. To this end, we use the analysis of CoSaMP [41] and leverage a recent result by [42], to show per step decrease in the signal estimation error using the generic chaining technique of [43, 44]. In particular, we show that any “phase errors" made in the initialization, can be suitably controlled across different estimates. Block-sparse phase retrieval. We use CoPRAM to establish its extension Block CoPRAM, which is a novel phase retrieval strategy for block sparse signals from Gaussian measurements. Again, the algorithm is based on a suitable initialization followed by an alternating minimization procedure, mirroring the steps in CoPRAM. To our knowledge, this is the first result for phase retrieval under more refined structured sparsity assumptions on the signal. As above, the first stage consists of identifying a good initial guess of the solution. We proceed as in CoPRAM, isolating blocks of nonzero coordinates, by constructing a biased estimator for the “mass" of each block. We prove that a good initialization can be achieved using this procedure using only O (ks log n) measurements. When the block-size is large enough (b = Θ(s)), the sample complexity of the initialization is sub-quadratic in the sparsity level s and only a logarithmic factor above the 3 information-theoretic limit O (s) [30]. In the second stage, we demonstrate a rapid descent to the desired solution. To this end, we replace the CoSaMP sub-routine in CoPRAM with the model-based CoSaMP algorithm of [30], specialized to block-sparse recovery. The analysis proceeds analogously as above. To our knowledge, this constitutes the first end-to-end algorithm for phase retrieval (from Gaussian samples) that demonstrates a sub-quadratic dependence on the sparsity level of the signal. 1.4 Prior work The phase retrieval problem has received significant attention in the past few years. Convex methodologies to solve the problem in the lifted framework include PhaseLift and its variations [11, 45, 46, 47]. Most of these approaches suffer severely in terms of computational complexity. PhaseMax, produces a convex relaxation of the phase retrieval problem similar to basis pursuit [48]; however it is not emperically competitive. Non-convex algorithms typically rely on finding a good initial point, followed by minimizing a quadratic (Wirtinger Flow [12, 14, 49]) or moduli ( [50, 51]) measurement loss function. Arbitrary initializations have been studied in a polynomial-time trust-region setting in [52]. Some of the convex approaches in sparse phase retrieval include [19, 53], which uses a combination of trace-norm and ℓ-norm relaxation.Constrained sensing vectors have been used [25] at optimal sample complexity O s log n s . Fourier measurements have been studied extensively in the convex [54] and non-convex [55] settings. More non-convex approaches for sparse phase retrieval include [13, 23, 22] which achieve Gaussian sample complexities of O s2 log n . Structured sparsity models such as groups, blocks, clusters, and trees can be used to model real-world signals.Applications of such models have been developed for sparse recovery [30, 33, 39, 38, 40, 56, 34, 35, 36] as well as in high-dimensional optimization and statistical learning [32, 31]. However, to the best of our knowledge, there have been no rigorous results that explore the impact of structured sparsity models for the phase retrieval problem. 2 Paper organization and notation The remainder of the paper is organized as follows. In Sections 3 and 4, we introduce the CoPRAM and Block CoPRAM algorithms respectively, and provide a theoretical analysis of their statistical performance. In Section 5 we present numerical experiments for our algorithms. Standard notation for matrices (capital, bold: A, P, etc.), vectors (small, bold: x, y, etc.) and scalars ( α, c etc.) hold. Matrix and vector transposes are represented using ⊤(eg. x⊤and A⊤) respectively. The diagonal matrix form of a column vector y ∈Rm is represented as diag(y) ∈Rm×m. Operator card(S) represents cardinality of S. Elements of a are distributed according to the zero-mean standard normal distribution N(0, 1). The phase is denoted using sign (y) ≡y/|y| for y ∈Rm, and dist (x1, x2) ≡min(∥x1 −x2∥2, ∥x1 + x2∥2) for every x1, x2 ∈Rn is used to denote “distance", upto a global phase factor (both x = x∗, −x∗satisfy y = |Ax|). The projection of vector x ∈Rn onto a set of coordinates S is represented as xS ∈Rn, xSj = xj for j ∈S, and 0 elsewhere. Projection of matrix M ∈Rn×n onto S is MS ∈Rn×n, MSij = Mij for i, j ∈S, and 0 elsewhere. For faster algorithmic implementations, MS can be assumed to be a truncated matrix MS ∈Rs×s, discarding all row and column elements corresponding to Sc. The element-wise inner product of two vectors y1 and y2 ∈Rm is represented as y1 ◦y2. Unspecified large and small constants are represented by C and δ respectively. The abbreviation w.h.p. denotes “with high probability". 3 Compressive phase retrieval In this section, we propose a new algorithm for solving the sparse phase retrieval problem and analyze its performance. Later, we will show how to extend this algorithm to the case of more refined structural assumptions about the underlying sparse signal. We first provide a brief outline of our proposed algorithm. It is clear that the sparse recovery version of (1) is highly non-convex, and possibly has multiple local minima[22]. Therefore, as is typical in modern non-convex methods [13, 23, 57] we use an spectral technique to obtain a good initial estimate. Our technique is a modification of the initialization stages in [22, 23], but requires no tuning parameters or assumptions on signal coefficients, except for the sparsity s. Once an appropriate initial 4 Algorithm 1 CoPRAM: Initialization. input A, y, s. Compute signal power: φ2 = 1 m m i=1 y2 i . Compute signal marginals: Mjj = 1 m m i=1 y2 i a2 ij ∀j. Set ˆS ←j’s corresponding to top-s Mjj’s. Set v1 ←top singular vector of M ˆS = 1 m m i=1 y2 i ai ˆSai⊤ ˆS ∈Rs×s. Compute x0 ←φv, where v ←v1 for ˆS and 0 ∈Rn−s for ˆSc. output x0. Algorithm 2 CoPRAM: Descent. input A, y, x0, s, t0. Initialize x0 according to Algorithm 1. for t = 0, · · · , t0 −1 do Pt+1 ←diag (sign (Axt)), xt+1 ←COSAMP( 1 √mA, 1 √mPt+1y,s,xt). end for output z ←xt0. estimate is chosen, we then show that a simple alternating-minimization algorithm, based on the algorithm in [13] will converge rapidly to the underlying true signal. We call our overall algorithm Compressive Phase Retrieval with Alternating Minimization (CoPRAM) which is divided into two stages: Initialization (Algorithm 1) and Descent (Algorithm 2). 3.1 Initialization The high level idea of the first stage of CoPRAM is as follows; we use measurements yi to construct a biased estimator, marginal Mjj corresponding to the jth signal coefficient and given by: Mjj = 1 m m i=1 y2 i a2 ij, for j ∈{1, . . . n}. (2) The marginals themselves do not directly produce signal coefficients, but the “weight" of each marginal identifies the true signal support. Then, a spectral technique based on [13, 23, 22] constructs an initial estimate x0. To accurately estimate support, earlier works [13, 23] assume that the magnitudes of the nonzero signal coefficients are all sufficiently large, i.e., Ω (∥x∗∥2 /√s), which can be unrealistic, violating the power-decay law. Our analysis resolves this issue by relaxing the requirement of accurately identifying the support, without any tuning parameters, unlike [22]. We claim that a coarse estimate of the support is good enough, since the errors would correspond to small coefficients. Such “noise" in the signal estimate can be controlled with a sufficient number of samples. Instead, we show that a simple pruning step that rejects the smallest n −k coordinates, followed by the spectral procedure of [23], gives us the initialization that we need. Concretely, if elements of A are distributed as per standard normal distribution N(0, 1), a weighted correlation matrix M = 1 m m i=1 y2 i aia⊤ i , can be constructed, having diagonal elements Mjj. Then, the diagonal elements of this expectation matrix E [M] are given by: E [Mjj] = ∥x∗∥2 + 2x∗2 j (3) exhibiting a clear separation when analyzed for j ∈S and j ∈Sc. We can hence claim, that signal marginals at locations on the diagonal of M corresponding to j ∈S are larger, on an average, than those for j ∈Sc. Based on this, we evaluate the diagonal elements Mjj and reject n −k coordinates corresponding to the smallest marginals obtain a crude approximation of signal support ˆS. Using a spectral technique, we find an initial vector in the reduced space, which is close to the true signal, if m = O s2 log n . Theorem 3.1. The initial estimate x0, which is the output of Algorithm 1, is a small constant distance δ0 away from the true s-sparse signal x∗, i.e., dist x0, x∗ ≤δ0 ∥x∗∥2 , 5 where 0 < δ0 < 1, as long as the number of (Gaussian) measurements satisfy, m ≥Cs2 log mn, with probability greater than 1 −8 m. This theorem is proved via Lemmas C.1 through C.4 (Appendix C), and the argument proceeds as follows. We evaluate the marginals of the signal Mjj, in broadly two cases: j ∈S and j ∈Sc. The key idea is to establish one of the following: (1) If the signal coefficients obey minj∈S |x∗ j| = C ∥x∗∥2 /√s, then, w.h.p. there exists a clear separation between the marginals Mjj for j ∈S and j ∈Sc. Then Algorithm 1 picks up the correct support (i.e. ˆS = S); (2) if there is no such restriction, even then the support picked up in Algorithm 1, ˆS, contains a bulk of the correct support S. The incorrect elements of ˆS induce negligible error in estimating the intial vector. These approaches are illustrated in Figures 4 and 5 in Appendix C. The marginals Mjj < Θ, w.h.p., for j ∈Sc and Mjj > Θ, j ∈S+, where S+ is a big chunk of the picked support S+ ⊆ˆS, S+ = {j ∈S : x∗ j 2 ≥15 (log mn)/m ∥x∗∥2} are separated by threshold Θ (Lemmas C.1 and C.2). The identification of the support ˆS (which provably contains a significant chunk S+ of the true support S) is used to construct the truncated correlation matrix M ˆS. The top singular vector of this matrix M ˆS, gives us a good initial estimate x0. The final step of Algorithm 1 requires a scaling of the normalized vector v1 by a factor φ, which conserves the power in the signal (Lemma F.1 in Appendix F), whp, where φ2 which is defined as φ2 = 1 m m i=1 y2 i . (4) 3.2 Descent to optimal solution After obtaining an initial estimate x0, we construct a method to accurately recover x∗. For this, we adapt the alternating minimization approach from [13]. The observation model (1) can be restated as: sign (⟨ai, x∗⟩) ◦yi = ⟨ai, x∗⟩ for i = {1, 2, . . . m}. We introduce the phase vector p ∈Rm containing (unknown) signs of measurements, i.e., pi = sign (⟨ai, x⟩) , ∀i and phase matrix P = diag (p). Then our measurement model gets modified as P∗y = Ax∗, where P∗is the true phase matrix. We then minimize the loss function composed of variables x and P, min ∥x∥0≤s,P∈P ∥Ax −Py∥2 . (5) Here P is a set of all diagonal matrices ∈Rm×m with diagonal entries constrained to be in {−1, 1}. Hence the problem stated above is not convex. Instead, we alternate between estimating P and x as follows: (1) if we fix the signal estimate x, then the minimizer P is given in closed form as P = diag (sign (Ax)); we call this the phase estimation step; (2) if we fix the phase matrix P, the sparse vector x can be obtained by solving the signal estimation step: min x,∥x∥0≤s ∥Ax −Py∥2. (6) We employ the CoSaMP [41] algorithm to (approximately) solve the non-convex problem (6). We do not need to explicitly obtain the minimizer for (6) but only show a sufficient descent criterion, which we achieve by performing a careful analysis of the CoSaMP algorithm. For analysis reasons, we require that the entries of the input sensing matrix are distributed according to N (0, 1/√m). This can be achieved by scaling down the inputs to CoSaMP: At, Pt+1y by a factor of √m (see x-update step of Algorithm 2). Another distinction is that we use a “warm start" CoSaMP routine for each iteration where the initial guess of the solution to (6) is given by the current signal estimate. We now analyze our proposed descent scheme. We obtain the following theoretical result: Theorem 3.2. Given an initialization x0 satisfying Algorithm 1, if we have number of (Gaussian) measurements m ≥Cs log n s , then the iterates of Algorithm 2 satisfy: dist xt+1, x∗ ≤ρ0dist xt, x∗ . (7) where 0 < ρ0 < 1 is a constant, with probability greater than 1 −e−γm, for positive constant γ. The proof of this theorem can be found in Appendix E. 6 4 Block-sparse phase retrieval The analysis of the proofs mentioned so far, as well as experimental results suggest that we can reduce sample complexity for successful sparse phase retrieval by exploiting further structural information about the signal. Block-sparse signals x∗, can be said to be following a sparsity model Ms,b, where Ms,b describes the set of all block-sparse signals with s non-zeros being grouped into uniform predetermined blocks of size b, such that block-sparsity k = s b. We use the index set jb = {1, 2 . . . k}, to denote block-indices. We introduce the concept of block marginals, a block-analogue to signal marginals, which can be analyzed to crudely estimate the block support of the signal in consideration. We use this formulation, along with the alternating minimization approach that uses model-based CoSaMP [30] to descend to the optimal solution. 4.1 Initialization Analogous to the concept of marginals defined above, we introduce block marginals Mjbjb, where Mjj is defined as in (2). For block index jb, we define: Mjbjb = j∈jb M 2 jj, (8) to develop the initialization stage of our Block CoPRAM algorithm. Similar to the proof approach of CoPRAM, we evaluate the block marginals, and use the top-k such marginals to obtain a crude approximation ˆSb of the true block support Sb. This support can be used to construct the truncated correlation matrix M ˆ Sb. The top singular vector of this matrix M ˆ Sb gives a good initial estimate x0 (Algorithm 3, Appendix A) for the Block CoPRAM algorithm (Algorithm 4, Appendix A). Through the evaluation of block marginals, we proceed to prove that the sample complexity required for a good initial estimate (and subsequently, successful signal recovery of block sparse signals) is given by O (ks log n). This essentially reduces the sample complexity of signal recovery by a factor equal to the block-length b over the sample complexity required for standard sparse phase retrieval. Theorem 4.1. The initial vector x0, which is the output of Algorithm 3, is a small constant distance δb away from the true signal x∗∈Ms,b, i.e., dist x0, x∗ ≤δb ∥x∗∥2 , where 0 < δb < 1, as long as the number of (Gaussian) measurements satisfy m ≥C s2 b log mn with probability greater than 1 −8 m. The proof can be found in Appendix D, and carries forward intuitively from the proof of the compressive phase-retrieval framework. 4.2 Descent to optimal solution For the descent of Block CoPRAM to optimal solution, the phase-estimation step is the same as that in CoPRAM. For the signal estimation step, we attempt to solve the same minimization as in (6), except with the additional constraint that the signal x∗is block sparse, min x∈Ms,b ∥Ax −Py∥2, (9) where Ms,b describes the block sparsity model. In order to approximate the solution to (9), we use the model-based CoSaMP approach of [30]. This is a straightforward specialization of the CoSaMP algorithm and has been shown to achieve improved sample complexity over existing approaches for standard sparse recovery. Similar to Theorem 3.2 above, we obtain the following result (the proof can be found in Appendix E): Theorem 4.2. Given an initialization x0 satisfying Algorithm 3, if we have number of (Gaussian) measurements m ≥C s + s b log n s , then the iterates of Algorithm 4 satisfy: dist xt+1, x∗ ≤ρbdist xt, x∗ . (10) where 0 < ρb < 1 is a constant, with probability greater than 1 −e−γm, for positive constant γ. The analysis so far has been made for uniform blocks of size b. However the same algorithm can be extended to the case of sparse signals with non-uniform blocks or clusters (refer Appendix A). 7 500 1,000 1,500 2,000 0 0.5 1 Number of samples m Probability of recovery CoPRAM Block CoPRAM ThWF SPARTA (a) Sparsity s = 20 500 1,000 1,500 2,000 0 0.5 1 Number of samples m Probability of recovery (b) Sparsity s = 30 0 500 1,000 1,500 0 0.5 1 Number of samples m Probability of recovery b = 20, k = 1 b = 10, k = 2 b = 5, k = 4 b = 2, k = 10 b = 1, k = 20 (c) Block CoPRAM, s = 20 Figure 1: Phase transitions for signal of length n = 3, 000, sparsity s and block length b (a) s = 20, b = 5, (b) s = 30, b = 5, and (c) s = 20, b = 20, 10, 5, 2, 1 (Block CoPRAM only). 5 Experiments We explore the performance of the CoPRAM and Block CoPRAM on synthetic data. All numerical experiments were conducted using MATLAB 2016a on a computer with an Intel Xeon CPU at 3.3GHz and 8GB RAM. The nonzero elements of the unit norm vector x∗∈R3000 are generated from N(0, 1). We repeated each of the experiments (fixed n, s, b, m) in Figure 1 (a) and (b), for 50 and Figure 1 (c) for 200 independent Monte Carlo trials. For our simulations, we compared our algorithms CoPRAM and Block CoPRAM with Thresholded Wirtinger flow (Thresholded WF or ThWF) [22] and SPARTA [23]. The parameters for these algorithms were carefully chosen as per the description in their respective papers. For the first experiment, we generated phase transition plots by evaluating the probability of empirical successful recovery, i.e. number of trials out of 50. The recovery probability for the four algorithms is displayed in Figure 1. It can be noted that increasing the sparsity of signal shifts the phase transitions to the right. However, the phase transition for Block CoPRAM has a less apparent shift (suggesting that sample complexity of m has sub-quadratic dependence on s). We see that Block CoPRAM exhibits lowest sample complexity for the phase transitions in both cases (a) and (b) of Figure 1. For the second experiment, we study the variation of phase transition with block length, for Block CoPRAM (Figure 1(c)). For this experiment we fixed a signal of length n = 3, 000, sparsities s = 20, k = 1 for a block length of b = 20. We observe that the phase transitions improve with increase in block length. At block sparsity s b = 20 10 = 2 (for large b, b →s), we observe a saturation effect and the regime of the experiment is very close to the information theoretic limit. Several additional phase transition diagrams can be found in Figure 2 in Appendix B. The running time of our algorithms compare favorably with Thresholded WF and SPARTA (see Table 2 in Appendix B). We also show that Block CoPRAM is more robust to noisy Gaussian measurements, in comparison to CoPRAM and SPARTA (see Figure 3 in Appendix B). 8 References [1] Y. Shechtman, Y. Eldar, O. Cohen, H. Chapman, J. Miao, and M. Segev. Phase retrieval with application to optical imaging: a contemporary overview. IEEE Sig. Proc. Mag., 32(3):87–109, 2015. [2] R. Millane. Phase retrieval in crystallography and optics. JOSA A, 7(3):394–411, 1990. [3] A. Maiden and J. Rodenburg. An improved ptychographical phase retrieval algorithm for diffractive imaging. Ultramicroscopy, 109(10):1256–1262, 2009. [4] R. Harrison. Phase problem in crystallography. JOSA a, 10(5):1046–1055, 1993. [5] J. Miao, T. Ishikawa, Q Shen, and T. Earnest. Extending x-ray crystallography to allow the imaging of noncrystalline materials, cells, and single protein complexes. Annu. Rev. Phys. Chem., 59:387–410, 2008. [6] R. Gerchberg and W. Saxton. A practical algorithm for the determination of phase from image and diffraction plane pictures. Optik, 35(237), 1972. [7] J. Fienup. Phase retrieval algorithms: a comparison. Applied optics, 21(15):2758–2769, 1982. [8] S. Marchesini. Phase retrieval and saddle-point optimization. JOSA A, 24(10):3289–3296, 2007. [9] K. Nugent, A. Peele, H. Chapman, and A. Mancuso. Unique phase recovery for nonperiodic objects. Physical review letters, 91(20):203902, 2003. [10] M. Fickus, D. Mixon, A. Nelson, and Y. Wang. Phase retrieval from very few measurements. Linear Alg. Appl., 449:475–499, 2014. [11] E. Candes, T. Strohmer, and V. Voroninski. Phaselift: Exact and stable signal recovery from magnitude measurements via convex programming. Comm. Pure Appl. Math., 66(8):1241–1274, 2013. [12] E. Candes, X. Li, and M. Soltanolkotabi. Phase retrieval via wirtinger flow: Theory and algorithms. IEEE Trans. Inform. Theory, 61(4):1985–2007, 2015. [13] P. Netrapalli, P. Jain, and S. Sanghavi. Phase retrieval using alternating minimization. In Adv. Neural Inf. Proc. Sys. (NIPS), pages 2796–2804, 2013. [14] Y. Chen and E. Candes. Solving random quadratic systems of equations is nearly as easy as solving linear systems. In Adv. Neural Inf. Proc. Sys. (NIPS), pages 739–747, 2015. [15] E. Candes, J. Romberg, and T. Tao. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Trans. Inform. Theory, 52(2):489–509, 2006. [16] D. Needell, J. Tropp, and R. Vershynin. Greedy signal recovery review. In Proc. Asilomar Conf. Sig. Sys. Comput., pages 1048–1050. IEEE, 2008. [17] E. Candes, J. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Comm. Pure Appl. Math., 59(8):1207–1223, 2006. [18] K. Do Ba, P. Indyk, E. Price, and D. Woodruff. Lower bounds for sparse recovery. In Proc. ACM Symp. Discrete Alg. (SODA), pages 1190–1197, 2010. [19] H. Ohlsson, A. Yang, R. Dong, and S. Sastry. Cprl–an extension of compressive sensing to the phase retrieval problem. In Adv. Neural Inf. Proc. Sys. (NIPS), pages 1367–1375, 2012. [20] Y. Chen, Y. Chi, and A. Goldsmith. Exact and stable covariance estimation from quadratic sampling via convex programming. IEEE Trans. Inform. Theory, 61(7):4034–4059, 2015. [21] K. Jaganathan, S. Oymak, and B. Hassibi. Sparse phase retrieval: Convex algorithms and limitations. In Proc. IEEE Int. Symp. Inform. Theory (ISIT), pages 1022–1026. IEEE, 2013. [22] T. Cai, X. Li, and Z. Ma. Optimal rates of convergence for noisy sparse phase retrieval via thresholded wirtinger flow. Ann. Stat., 44(5):2221–2251, 2016. [23] G. Wang, L. Zhang, G. Giannakis, M. Akcakaya, and J. Chen. Sparse phase retrieval via truncated amplitude flow. arXiv preprint arXiv:1611.07641, 2016. [24] M. Iwen, A. Viswanathan, and Y. Wang. Robust sparse phase retrieval made easy. Appl. Comput. Harmon. Anal., 42(1):135–142, 2017. 9 [25] S. Bahmani and J. Romberg. Efficient compressive phase retrieval with constrained sensing vectors. In Adv. Neural Inf. Proc. Sys. (NIPS), pages 523–531, 2015. [26] H. Qiao and P. Pal. Sparse phase retrieval using partial nested Fourier samplers. In Proc. IEEE Global Conf. Signal and Image Processing (GlobalSIP), pages 522–526. IEEE, 2015. [27] S. Cai, M. Bakshi, S. Jaggi, and M. Chen. Super: Sparse signals with unknown phases efficiently recovered. In Proc. IEEE Int. Symp. Inform. Theory (ISIT), pages 2007–2011. IEEE, 2014. [28] D. Yin, R. Pedarsani, X. Li, and K. Ramchandran. Compressed sensing using sparse-graph codes for the continuous-alphabet setting. In Proc. Allerton Conf. on Comm., Contr., and Comp., pages 758–765. IEEE, 2016. [29] R. Pedarsani, D. Yin, K. Lee, and K. Ramchandran. Phasecode: Fast and efficient compressive phase retrieval based on sparse-graph codes. IEEE Trans. Inform. Theory, 2017. [30] R. Baraniuk, V. Cevher, M. Duarte, and C. Hegde. Model-based compressive sensing. IEEE Trans. Inform. Theory, 56(4):1982–2001, Apr. 2010. [31] J. Huang, T. Zhang, and D. Metaxas. Learning with structured sparsity. J. Machine Learning Research, 12(Nov):3371–3412, 2011. [32] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. J. Royal Stat. Soc. Stat. Meth., 68(1):49–67, 2006. [33] Y. Eldar, P. Kuppinger, and H. Bolcskei. Block-sparse signals: Uncertainty relations and efficient recovery. IEEE Trans. Sig. Proc., 58(6):3042–3054, 2010. [34] M. Duarte, C. Hegde, V. Cevher, and R. Baraniuk. Recovery of compressible signals from unions of subspaces. In Proc. IEEE Conf. Inform. Science and Systems (CISS), March 2009. [35] C. Hegde, P. Indyk, and L. Schmidt. A fast approximation algorithm for tree-sparse recovery. In Proc. IEEE Int. Symp. Inform. Theory (ISIT), June 2014. [36] C. Hegde, P. Indyk, and L. Schmidt. Nearly linear-time model-based compressive sensing. In Proc. Intl. Colloquium on Automata, Languages, and Programming (ICALP), July 2014. [37] V. Cevher, P. Indyk, C. Hegde, and R. Baraniuk. Recovery of clustered sparse signals from compressive measurements. In Proc. Sampling Theory and Appl. (SampTA), May 2009. [38] C. Hegde, P. Indyk, and L. Schmidt. A nearly linear-time framework for graph-structured sparsity. In Proc. Int. Conf. Machine Learning (ICML), July 2015. [39] V. Cevher, M. Duarte, C. Hegde, and R. Baraniuk. Sparse signal recovery using Markov Random Fields. In Adv. Neural Inf. Proc. Sys. (NIPS), Dec. 2008. [40] C. Hegde, P. Indyk, and L. Schmidt. Approximation-tolerant model-based compressive sensing. In Proc. ACM Symp. Discrete Alg. (SODA), Jan. 2014. [41] D. Needell and J. Tropp. Cosamp: Iterative signal recovery from incomplete and inaccurate samples. Appl. Comput. Harmon. Anal., 26(3):301–321, 2009. [42] M. Soltanolkotabi. Structured signal recovery from quadratic measurements: Breaking sample complexity barriers via nonconvex optimization. arXiv preprint arXiv:1702.06175, 2017. [43] M. Talagrand. The generic chaining: upper and lower bounds of stochastic processes. Springer Science & Business Media, 2006. [44] S. Dirksen. Tail bounds via generic chaining. Electronic J. Probability, 20, 2015. [45] D. Gross, F. Krahmer, and R. Kueng. Improved recovery guarantees for phase retrieval from coded diffraction patterns. Appl. Comput. Harmon. Anal., 42(1):37–64, 2017. [46] E. Candes, X. Li, and M. Soltanolkotabi. Phase retrieval from coded diffraction patterns. Appl. Comput. Harmon. Anal., 39(2):277–299, 2015. [47] I. Waldspurger, A.d’Aspremont, and S. Mallat. Phase recovery, maxcut and complex semidefinite programming. Mathematical Programming, 149(1-2):47–81, 2015. 10 [48] T. Goldstein and C. Studer. Phasemax: Convex phase retrieval via basis pursuit. arXiv preprint arXiv:1610.07531, 2016. [49] H. Zhang and Y. Liang. Reshaped wirtinger flow for solving quadratic system of equations. In Adv. Neural Inf. Proc. Sys. (NIPS), pages 2622–2630, 2016. [50] G. Wang and G. Giannakis. Solving random systems of quadratic equations via truncated generalized gradient flow. In Adv. Neural Inf. Proc. Sys. (NIPS), pages 568–576, 2016. [51] K. Wei. Solving systems of phaseless equations via kaczmarz methods: A proof of concept study. Inverse Problems, 31(12):125008, 2015. [52] J. Sun, Q. Qu, and J. Wright. A geometric analysis of phase retrieval. In Proc. IEEE Int. Symp. Inform. Theory (ISIT), pages 2379–2383. IEEE, 2016. [53] X. Li and V. Voroninski. Sparse signal recovery from quadratic measurements via convex programming. SIAM J. Math. Anal., 45(5):3019–3033, 2013. [54] K. Jaganathan, S. Oymak, and B. Hassibi. Recovery of sparse 1-d signals from the magnitudes of their fourier transform. In Proc. IEEE Int. Symp. Inform. Theory (ISIT), pages 1473–1477. IEEE, 2012. [55] Y. Shechtman, A. Beck, and Y. C. Eldar. Gespar: Efficient phase retrieval of sparse signals. IEEE Trans. Sig. Proc., 62(4):928–938, 2014. [56] C. Hegde, P. Indyk, and L. Schmidt. Fast algorithms for structured sparsity. Bulletin of the EATCS, 1(117):197–228, Oct. 2015. [57] R. Keshavan, A. Montanari, and S. Oh. Matrix completion from a few entries. IEEE Trans. Inform. Theory, 56(6):2980–2998, 2010. [58] B. Laurent and P. Massart. Adaptive estimation of a quadratic functional by model selection. Ann. Stat., pages 1302–1338, 2000. [59] C. Davis and W. Kahan. The rotation of eigenvectors by a perturbation. iii. SIAM J. Num. Anal., 7(1):1–46, 1970. [60] V. Bentkus. An inequality for tail probabilities of martingales with differences bounded from one side. J. Theoretical Prob., 16(1):161–173, 2003. 11 | 2017 | 509 |
7,018 | Introspective Classification with Convolutional Nets Long Jin UC San Diego longjin@ucsd.edu Justin Lazarow UC San Diego jlazarow@ucsd.edu Zhuowen Tu UC San Diego ztu@ucsd.edu Abstract We propose introspective convolutional networks (ICN) that emphasize the importance of having convolutional neural networks empowered with generative capabilities. We employ a reclassification-by-synthesis algorithm to perform training using a formulation stemmed from the Bayes theory. Our ICN tries to iteratively: (1) synthesize pseudo-negative samples; and (2) enhance itself by improving the classification. The single CNN classifier learned is at the same time generative — being able to directly synthesize new samples within its own discriminative model. We conduct experiments on benchmark datasets including MNIST, CIFAR10, and SVHN using state-of-the-art CNN architectures, and observe improved classification results. 1 Introduction Great success has been achieved in obtaining powerful discriminative classifiers via supervised training, such as decision trees [34], support vector machines [42], neural networks [23], boosting [7], and random forests [2]. However, recent studies reveal that even modern classifiers like deep convolutional neural networks [20] still make mistakes that look absurd to humans [11]. A common way to improve the classification performance is by using more data, in particular “hard examples”, to train the classifier. Different types of approaches have been proposed in the past including bootstrapping [31], active learning [37], semi-supervised learning [51], and data augmentation [20]. However, the approaches above utilize data samples that are either already present in the given training set, or additionally created by humans or separate algorithms. In this paper, we focus on improving convolutional neural networks by endowing them with synthesis capabilities to make them internally generative. In the past, attempts have been made to build connections between generative models and discriminative classifiers [8, 27, 41, 15]. In [44], a self supervised boosting algorithm was proposed to train a boosting algorithm by sequentially learning weak classifiers using the given data and self-generated negative samples; the generative via discriminative learning work in [40] generalizes the concept that unsupervised generative modeling can be accomplished by learning a sequence of discriminative classifiers via self-generated pseudonegatives. Inspired by [44, 40] in which self-generated samples are utilized, as well as recent success in deep learning [20, 9], we propose here an introspective convolutional network (ICN) classifier and study how its internal generative aspect can benefit CNN’s discriminative classification task. There is a recent line of work using a discriminator to help with an external generator, generative adversarial networks (GAN) [10], which is different from our objective here. We aim at building a single CNN model that is simultaneously discriminative and generative. The introspective convolutional networks (ICN) being introduced here have a number of properties. (1) We introduce introspection to convolutional neural networks and show its significance in supervised classification. (2) A reclassification-by-synthesis algorithm is devised to train ICN by iteratively augmenting the negative samples and updating the classifier. (3) A stochastic gradient descent sampling process is adopted to perform efficient synthesis for ICN. (4) We propose a supervised formulation to directly train a multi-class ICN classifier. We show consistent improvement over state-of-the-art CNN classifiers (ResNet [12]) on benchmark datasets in the experiments. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 2 Related work Our ICN method is directly related to the generative via discriminative learning framework [40]. It also has connection to the self-supervised learning method [44], which is focused on density estimation by combining weak classifiers. Previous algorithms connecting generative modeling with discriminative classification [8, 27, 41, 15] fall in the category of hybrid models that are direct combinations of the two. Some existing works on introspective learning [22, 3, 38] have a different scope to the problem being tackled here. Other generative modeling schemes such as MiniMax entropy [50], inducing features [6], auto-encoder [1], and recent CNN-based generative modeling approaches [48, 47] are not for discriminative classification and they do not have a single model that is both generative and discriminative. Below we discuss the two methods most related to ICN, namely generative via discriminative learning (GDL) [40] and generative adversarial networks (GAN) [10]. Relationship with generative via discriminative learning (GDL) [40] ICN is largely inspired by GDL and it follows a similar pipeline developed in [40]. However, there is also a large improvement of ICN to GDL, which is summarized below. • CNN vs. Boosting. ICN builds on top of convolutional neural networks (CNN) by explicitly revealing the introspectiveness of CNN whereas GDL adopts the boosting algorithm [7]. • Supervised classification vs. unsupervised modeling. ICN focuses on the supervised classification task with competitive results on benchmark datasets whereas GDL was originally applied to generative modeling and its power for the classification task itself was not addressed. • SGD sampling vs. Gibbs sampling. ICN carries efficient SGD sampling for synthesis through backpropagation which is much more efficient than the Gibbs sampling strategy used in GDL. • Single CNN vs. Cascade of classifiers. ICN maintains a single CNN classifier whereas GDL consists of a sequence of boosting classifiers. • Automatic feature learning vs. manually specified features. ICN has greater representational power due to the end-to-end training of CNN whereas GDL relies on manually designed features. Comparison with Generative Adversarial Networks (GANs) [10] Recent efforts in adversarial learning [10] are also very interesting and worth comparing with. • Introspective vs. adversarial. ICN emphasizes being introspective by synthesizing samples from its own classifier while GAN focuses on adversarial — using a distinct discriminator to guide the generator. • Supervised classification vs. unsupervised modeling. The main focus of ICN is to develop a classifier with introspection to improve the supervised classification task whereas GAN is mostly for building high-quality generative models under unsupervised learning. • Single model vs. two separate models. ICN retains a CNN discriminator that is itself a generator whereas GAN maintains two models, a generator and a discriminator, with the discriminator in GAN trained to classify between “real” (given) and “fake” (generated by the generator) samples. • Reclassification-by-synthesis vs. minimax. ICN engages an iterative procedure, reclassificationby-synthesis, stemmed from the Bayes theory whereas GAN has a minimax objective function to optimize. Training an ICN classifier is the same as that for the standard CNN. • Multi-class formulation. In a GAN-family work [36], a semi-supervised learning task is devised by adding an additional “not-real” class to the standard k classes in multi-class classification; this results in a different setting to the standard multi-class classification with additional model parameters. ICN instead, aims directly at the supervised multi-class classification task by maintaining the same parameter setting within the softmax function without additional model parameters. Later developments alongside GAN [35, 36, 49, 3] share some similar aspects to GAN, which also do not achieve the same goal as ICN does. Since the discriminator in GAN is not meant to perform the generic two-class/multi-class classification task, some special settings for semi-supervised learning [10, 35, 49, 3, 36] were created. ICN instead has a single model that is both generative and discriminative, and thus, an improvement to ICN’s generator leads to a direct means to ameliorate its discriminator. Other work like [11] was motivated from an observation that adding small perturbations to an image leads to classification errors that are absurd to humans; their approach is however taken by augmenting positive samples from existing input whereas ICN is able to synthesize new samples from scratch. A recent work proposed in [21] is in the same family of ICN, but [21] focuses on unsupervised image modeling using a cascade of CNNs. 2 3 Method The pipeline of ICN is shown in Figure 1, which has an immediate improvement over GDL [40] in several aspects that have been described in the previous section. One particular gain of ICN is its representation power and efficient sampling process through backpropagation as a variational sampling strategy. 3.1 Formulation We start the discussion by introducing the basic formulation and borrow the notation from [40]. Let x be a data sample (vector) and y ∈{−1, +1} be its label, indicating either a negative or a positive sample (in multi-class classification y ∈{1, ..., K}). We study binary classification first. A discriminative classifier computes p(y|x), the probability of x being positive or negative. p(y = −1|x) + p(y = +1|x) = 1. A generative model instead models p(y, x) = p(x|y)p(y), which captures the underlying generation process of x for class y. In binary classification, positive samples are of primary interest. Under the Bayes rule: p(x|y = +1) = p(y = +1|x)p(y = −1) p(y = −1|x)p(y = +1)p(x|y = −1), (1) which can be further simplified when assuming equal priors p(y = +1) = p(y = −1): p(x|y = +1) = p(y = +1|x) 1 −p(y = +1|x)p(x|y = −1). (2) Reclassification Step: training on the given training data + generated pseudo-negatives Synthesis Step: synthesize pseudo-negative samples Convolutional Neural Networks Introspective Convolutional Networks: • Synthesis • Reclassification Initial Classification (given training data) Final Classification (given training data + self-generated pseudo-negatives) Synthesis Classification Figure 1: Schematic illustration of our reclassification-by-synthesis algorithm for ICN training. The top-left figure shows the input training samples where the circles in red are positive samples and the crosses in blue are the negatives. The bottom figures are the samples progressively self-generated by the classifier in the synthesis steps and the top figures show the decision boundaries (in purple) progressively updated in the reclassification steps. Pseudo-negatives (purple crosses) are gradually generated and help tighten the decision boundaries. We make two interesting and important observations from Eqn. (2): 1) p(x|y = +1) is dependent on the faithfulness of p(x|y = −1), and 2) a classifier C to report p(y = +1|x) can be made simultaneously generative and discriminative. However, there is a requirement: having an informative distribution for the negatives p(x|y = −1) such that samples drawn x ∼p(x|y = −1) 3 have good coverage to the entire space of x ∈Rm, especially for samples that are close to the positives x ∼p(x|y = +1), to allow the classifier to faithfully learn p(y = +1|x). There seems to exist a dilemma. In supervised learning, we are only given a set of limited amount of training data, and a classifier C is only focused on the decision boundary to separate the given samples and the classification on the unseen data may not be accurate. This can be seen from the top left plot in Figure 1. This motivates us to implement the synthesis part within learning — make a learned discriminative classifier generate samples that pass its own classification and see how different these generated samples are to the given positive samples. This allows us to attain a single model that has two aspects at the same time: a generative model for the positive samples and an improved classifier for the classification. Suppose we are given a training set S = {(xi, yi), i = 1..n} and x ∈Rm and y ∈{−1, +1}. One can directly train a discriminative classifier C, e.g. a convolutional neural networks [23] to learn p(y = +1|x), which is always an approximation due to various reasons including insufficient training samples, generalization error, and classifier limitations. Previous attempts to improve classification by data augmentation were mostly done to add more positive samples [20, 11]; we instead argue the importance of adding more negative samples to improve the classification performance. The dilemma is that S = {(xi, yi), i = 1..n} is limited to the given data. For clarity, we now use p−(x) to represent p(x|y = −1). Our goal is to augment the negative training set by generating confusing pseudo-negatives to improve the classification (note that in the end pseudo-negative samples drawn x ∼p− t (x) will become hard to distinguish from the given positive samples. Cross-validation can be used to determine when using more pseudo-negatives is not reducing the validation error). We call the samples drawn from x ∼p− t (x) pseudo-negatives (defined in [40]). We expand S = {(xi, yi), i = 1..n} by St e = S ∪St pn, where S0 pn = ∅and for t ≥1 St pn = {(xi, −1), i = n + 1, ..., n + tl}. St pn includes all the pseudo-negative samples self-generated from our model up to time t. l indicates the number of pseudo-negatives generated at each round. We define a reference distribution p− r (x) = U(x), where U(x) is a Gaussian distribution (e.g. N(0.0, 0.32) independently). We carry out learning with t = 0...T to iteratively obtain qt(y = +1|x) and qt(y = −1|x) by updating classifier Ct on St e = S ∪St pn. The initial classifier C0 on S0 e = S reports discriminative probability q0(y = +1|x). The reason for using q is because it is an approximation to the true p due to limited samples drawn in Rm. At each time t, we then compute p− t (x) = 1 Zt qt(y = +1|x) qt(y = −1|x)p− r (x), (3) where Zt = R qt(y=+1|x) qt(y=−1|x)p− r (x)dx. Draw new samples xi ∼p− t (x) to expand the pseudo-negative set: St+1 pn = St pn ∪{(xi, −1), i = n + tl + 1, ..., n + (t + 1)l}. (4) We name the specific training algorithm for our introspective convolutional network (ICN) classifier reclassification-by-synthesis, which is described in Algorithm 1. We adopt convolutional neural networks (CNN) classifier to build an end-to-end learning framework with an efficient sampling process (to be discussed in the next section). 3.2 Reclassification-by-synthesis We present our reclassification-by-synthesis algorithm for ICN in this section. A schematic illustration is shown in Figure 1. A single CNN classifier is being trained progressively which is simultaneously a discriminator and a generator. With the pseudo-negatives being gradually generated, the classification boundary gets tightened, and hence yields an improvement to the classifier’s performance. The reclassification-by-synthesis method is described in Algorithm 1. The key to the algorithm includes two steps: (1) reclassification-step, and (2) synthesis-step, which will be discussed in detail below. 3.2.1 Reclassification-step The reclassification-step can be viewed as training a normal classifier on the training set St e = S ∪St pn where S = {(xi, yi), i = 1..n} and S0 pn = ∅. St pn = {(xi, −1), i = n + 1, ..., n + tl} for t ≥1. We use CNN as our base classifier. When training a classifier Ct on St e, we denote the parameters to be learned in Ct by a high-dimensional vector Wt = (w(0) t , w(1) t ) which might consist of millions of parameters. w(1) t denotes the weights of the top layer combining the features φ(x; w(0) t ) and w(0) t 4 carries all the internal representations. Without loss of generality, we assume a sigmoid function for the discriminative probability qt(y|x; Wt) = 1/(1 + exp{−yw(1) t · φ(x; w(0) t )}), where φ(x; w(0) t ) defines the feature extraction function for x. Both w(1) t and w(0) t can be learned by the standard stochastic gradient descent algorithm via backpropagation to minimize a cross-entropy loss with an additional term on the pseudo-negatives: L(Wt) = − i=1..n X (xi,yi)∈S ln qt(yi|xi; Wt) − i=n+1..n+tl X (xi,−1)∈Stpn ln qt(−1|xi; Wt). (5) Algorithm 1 Outline of the reclassification-by-synthesis algorithm for discriminative classifier training. Input: Given a set of training data S = {(xi, yi), i = 1..n} with x ∈Rm and y ∈{−1, +1}. Initialization: Obtain a reference distribution: p− r (x) = U(x) and train an initial CNN binary classifier C0 on S, q0(y = +1|x). S0 pn = ∅. U(x) is a zero mean Gaussian distribution. For t=0..T 1. Update the model: p− t (x) = 1 Zt qt(y=+1|x) qt(y=−1|x)p− r (x). 2. Synthesis-step: sample l pseudo-negative samples xi ∼p− t (x), i = n + tl + 1, ..., n + (t + 1)l from the current model p− t (x) using an SGD sampling procedure. 3. Augment the pseudo-negative set with St+1 pn = St pn ∪{(xi, −1), i = n + tl + 1, ..., n + (t + 1)l}. 4. Reclassification-step: Update CNN classifier to Ct+1 on St+1 e = S ∪St+1 pn , resulting in qt+1(y = +1|x). 5. t ←t + 1 and go back to step 1 until convergence (e.g. no improvement on the validation set). End 3.2.2 Synthesis-step In the reclassification step, we obtain qt(y|x; Wt) which is then used to update p− t (x) according to Eqn. (3): p− t (x) = 1 Zt qt(y = +1|x; Wt) qt(y = −1|x; Wt)p− r (x). (6) In the synthesis-step, our goal is to draw fair samples from p− t (x) (fair samples refer to typical samples by a sampling process after convergence w.r.t the target distribution). In [40], various Markov chain Monte Carlo techniques [28] including Gibbs sampling and Iterated Conditional Modes (ICM) have been adopted, which are often slow. Motivated by the DeepDream code [32] and Neural Artistic Style work [9], we update a random sample x drawn from p− r (x) by increasing qt(y=+1|x;Wt) qt(y=−1|x;Wt) using backpropagation. Note that the partition function (normalization) Zt is a constant that is not dependent on the sample x. Let gt(x) = qt(y = +1|x; Wt) qt(y = −1|x; Wt) = exp{w(1) t · φ(x; w(0) t )}, (7) and take its ln, which is nicely turned into the logit of qt(y = +1|x; Wt) ln gt(x) = w(1) t · φ(x; w(0) t ). (8) Starting from x drawn from p− r (x), we directly increase w(1)T t φ(x; w(0) t ) using stochastic gradient ascent on x via backpropagation, which allows us to obtain fair samples subject to Eqn. (6). Gaussian noise can be added to Eqn. (8) along the line of stochastic gradient Langevin dynamics [43] as ∆x = ϵ 2 ∇(w(1) t · φ(x; w(0) t )) + η where η ∼N(0, ϵ) is a Gaussian distribution and ϵ is the step size that is annealed in the sampling process. Sampling strategies. When conducting experiments, we carry out several strategies using stochastic gradient descent algorithm (SGD) and SGD Lagenvin including: i) early-stopping for the sampling process after x becomes positive (aligned with contrastive divergence [4] where a short Markov chain is simulated); ii) stopping at a large confidence for x being positive, and iii) sampling for a fixed, large number of steps. Table 2 shows the results on these different options and no major differences in the classification performance are observed. 5 Building connections between SGD and MCMC is an active area in machine learning [43, 5, 30]. In [43], combining SGD and additional Gaussian noise under annealed stepsize results in a simulation of Langevin dynamics MCMC. A recent work [30] further shows the similarity between constant SGD and MCMC, along with analysis of SGD using momentum updates. Our progressively learned discriminative classifier can be viewed as carving out the feature space on φ(x), which essentially becomes an equivalent class for the positives; the volume of the equivalent class that satisfies the condition is exponentially large, as analyzed in [46]. The probability landscape of positives (equivalent class) makes our SGD sampling process not particularly biased towards a small limited modes. Results in Figure 2 illustrates that large variation of the sampled/synthesized examples. 3.3 Analysis The convergence of p− t (x) t=∞ →p+(x) can be derived (see the supplementary material), inspired by the proof from [40]: KL[p+(x)||p− t+1(x)] ≤KL[p+(x)||p− t (x)] where KL denotes the KullbackLeibler divergence and p(x|y = +1) ≡p+(x), under the assumption that classifier at t + 1 improves over t. Remark. Here we pay particular attention to the negative samples which live in a space that is often much larger than the positive sample space. For the negative training samples, we have yi = −1 and xi ∼Q−(x), where Q−(x) is a distribution on the given negative examples in the original training set. Our reclassification-by-synthesis algorithm (Algorithm 1) essentially constructs a mixture model ˜p(x) ≡ 1 T PT −1 t=0 p− t (x) by sequentially generating pseudo-negative samples to augment our training set. Our new distribution for augmented negative sample set thus becomes Q− new(x) ≡ n n+T lQ−(x) + T l n+T l ˜p(x), where ˜p(x) encodes pseudo-negative samples that are confusing and similar to (but are not) the positives. In the end, adding pseudo-negatives might degrade the classification result since they become more and more similar to the positives. Crossvalidation can be used to decide when adding more pseudo-negatives is not helping the classification task. How to better use the pseudo-negative samples that are increasingly faithful to the positives is an interesting topic worth further exploring. Our overall algorithm thus is capable of enhancing classification by self-generating confusing samples to improve CNN’s robustness. 3.4 Multi-class classification One-vs-all. In the above section, we discussed the binary classification case. When dealing with multi-class classification problems, such as MNIST and CIFAR-10, we will need to adapt our proposed reclassification-by-synthesis scheme to the multi-class case. This can be done directly using a one-vs-all strategy by training a binary classifier Ci using the i-th class as the positive class and then combine the rest classes into the negative class, resulting in a total of K binary classifiers. The training procedure then becomes identical to the binary classification case. If we have K classes, then the algorithm will train K individual binary classifiers with < (w(0)1 t , w(1)1 t ), ..., (w(0)K t , w(1)K t ) > . The prediction function is simply f(x) = arg max k exp{w(1)k t · φ(x; w(0)k t )}. The advantage of using the one-vs-all strategy is that the algorithm can be made nearly identical to the binary case at the price of training K different neural networks. Softmax function. It is also desirable to build a single CNN classifier to perform multi-class classification directly. Here we propose a formulation to train an end-to-end multiclass classifier directly. Since we are directly dealing with K classes, the pseudo-negative data set will be slightly different and we introduce negatives for each individual class by S0 pn = ∅and: St pn = {(xi, −k), k = 1, ..., K, i = n + (t −1) × k × l + 1, ..., n + t × k × l} Suppose we are given a training set S = {(xi, yi), i = 1..n} and x ∈Rm and y ∈{1, .., K}. We want to train a single CNN classifier with Wt =< w(0) t , w(1)1 t , ..., w(1)K t > where w(0) t denotes the internal feature and parameters for the single CNN, and w(1)k t denotes the top-layer weights for the k-th class. We therefore minimize an integrated objective function L(Wt)=−(1−α) Pn i=1 ln exp{w (1)yi t ·φ(xi;w(0) t )} PK k=1 exp{w(1)k t ·φ(xi;w(0) t )} +α Pn+t×K×l i=n+1 ln(1+exp{w (1)|yi| t ·φ(xi;w0 t )}) (9) 6 The first term in Eqn. (9) encourages a softmax loss on the original training set S. The second term in Eqn. (9) encourages a good prediction on the individual pseudo-negative class generated for the k-th class (indexed by |yi| for w (1)|yi| t , e.g. for pseudo-negative samples belong to the k-th class, |yi| = | −k| = k). α is a hyperparameter balancing the two terms. Note that we only need to build a single CNN sharing w(0) t for all the K classes. In particular, we are not introducing additional model parameters here and we perform a direct K-class classification where the parameter setting is identical to a standard CNN multi-class classification task; to compare, an additional “not-real” class is created in [36] and the classification task there [36] thus becomes a K + 1 class classification. 4 Experiments Figure 2: Synthesized pseudo-negatives for the MNIST dataset by our ICN classifier. The top row shows some training examples. As t increases, our classifier gradually synthesize pseudo-negative samples that become increasingly faithful to the training samples. We conduct experiments on three standard benchmark datasets, including MNIST, CIFAR-10 and SVHN. We use MNIST as a running example to illustrate our proposed framework using a shallow CNN; we then show competitive results using a state-of-the-art CNN classifier, ResNet [12] on MNIST, CIFAR-10 and SVHN. In our experiments, for the reclassification step, we use the SGD optimizer with mini-batch size of 64 (MNIST) or 128 (CIFAR-10 and SVHN) and momentum equal to 0.9; for the synthesis step, we use the Adam optimizer [17] with momentum term β1 equal to 0.5. All results are obtained by averaging multiple rounds. Training and test time. In general, the training time for ICN is around double that of the baseline CNNs in our experiments: 1.8 times for MNIST dataset, 2.1 times for CIFAR-10 dataset and 1.7 times for SVHN dataset. The added overhead in training is mostly determined by the number of generated pseudo-negative samples. For the test time, ICN introduces no additional overhead to the baseline CNNs. 4.1 MNIST Table 1: Test errors on the MNIST dataset. We compare our ICN method with the baseline CNN, Deep Belief Network (DBN) [14], and CNN w/ Label Smoothing (LS) [39]. Moreover, the two-step experiments combining CNN + GDL [40] and combining CNN + DCGAN [35] are also reported, and see descriptions in text for more details. Method One-vs-all (%) Softmax (%) DBN 1.11 CNN (baseline) 0.87 0.77 CNN w/ LS 0.69 CNN + GDL 0.85 CNN + DCGAN 0.84 ICN-noise (ours) 0.89 0.77 ICN (ours) 0.78 0.72 We use the standard MNIST [24] dataset, which consists of 55, 000 training, 5, 000 validation and 10, 000 test samples. We adopt a simple network, containing 4 convolutional layers, each having a 5 × 5 filter size with 64, 128, 256 and 512 channels, respectively. These convolutional layers have stride 2, and no pooling layers are used. LeakyReLU activations [29] are used after each convolutional layer. The last convolutional layer is flattened and fed into a sigmoid output (in the one-vs-all case). In the reclassification step, we run SGD (for 5 epochs) on the current training data St e, including previously generated pseudo-negatives. Our initial learning rate is 0.025 and is decreased by a factor of 10 at t = 25. In the synthesis step, we use the backpropagation sampling process as discussed in Section 3.2.2. In Table 2, we compare different sampling strategies. Each time we synthesize a fixed number (200 in our experiments) of pseudo-negative samples. We show some synthesized pseudo-negatives from the MNIST dataset in Figure 2. The samples in the top row are from the original training dataset. ICN gradually synthesizes pseudo-negatives, which are increasingly faithful to the original data. Pseudo-negative samples will be continuously used while improving the classification result. 7 Table 2: Comparison of different sampling strategies in the synthesis step in ICN. Sampling Strategy One-vs-all (%) Softmax (%) SGD (option 1) 0.81 0.72 SGD Langevin (option 1) 0.80 0.72 SGD (option 2) 0.78 0.72 SGD Langevin (option 2) 0.78 0.74 SGD (option 3) 0.81 0.75 SGD Langevin (option 3) 0.80 0.73 Comparison of different sampling strategies. We perform SGD and SGD Langevin (with injected Gaussians), and try several options via backpropagation for the sampling strategies. Option 1: early-stopping once the generated samples are classified as positive; option 2: stopping at a high confidence for samples being positive; option 3: stopping after a large number of steps. Table 2 shows the results and we do not observe significant differences in these choices. Ablation study. We experiment using random noise as synthesized pseudo-negatives in an ablation study. From Table 1, we observe that our ICN outperforms the CNN baseline and the ICN-noise method in both one-vs-all and softmax cases. Figure 3: MNIST test error against the number of training examples (std dev. of the test error is also displayed). The effect of ICN is more clear when having fewer training examples. Effects on varying training sizes. To better understand the effectiveness of our ICN method, we carry out an experiment by varying the number of training examples. We use training sets with different sizes including 500, 2000, 10000, and 55000 examples. The results are reported in Figure 3. ICN is shown to be particularly effective when the training set is relatively small, since ICN has the capability to synthesize pseudo-negatives by itself to aid training. Comparison with GDL and GAN. GDL [40] focuses on unsupervised learning; GAN [10] and DCGAN [35] show results for unsupervised learning and semi-supervised classification. To apply GDL and GAN to the supervised classification setting, we design an experiment to perform a two-step implementation. For GDL, we ran the GDL code [40] and obtained the pseudo-negative samples for each individual digit; the pseudo-negatives are then used as augmented negative samples to train individual one-vs-all CNN classifiers (using an identical CNN architecture to ICN for a fair comparison), which are combined to form a multi-class classifier in the end. To compare with DCGAN [35], we follow the same procedure: each generator trained by DCGAN [35] using the TensorFlow implementation [16] was used to generate positive samples, which are then augmented to the negative set to train the individual one-vs-all CNN classifiers (also using an identical CNN architecture to ICN), which are combined to create the overall multi-class classifier. CNN+GDL achieves a test error of 0.85% and CNN+DCGAN achieves a test error of 0.84% on the MNIST dataset, whereas ICN reports an error of 0.78% using the same CNN architecture. As the supervised learning task was not directly specified in DCGAN [35], some care is needed to design the optimal setting to utilize the generated samples from DCGAN in the two-step approach (we made attempts to optimize the results). GDL [40] can be made into a discriminative classifier by utilizing the given negative samples first but boosting [7] with manually designed features was adopted which may not produce competitive results as CNN classifier does. Nevertheless, the advantage of ICN being an integrated end-to-end supervised learning single-model framework can be observed. To compare with generative model based deep learning approach, we report the classification result of DBN [14] in Table 1. DBN achieves a test error of 1.11% using the softmax function. We also compare with Label Smoothing (LS), which has been used in [39] as a regularization technique by encouraging the model to be less confident. In LS, for a training example with ground-truth label, the label distribution is replaced with a mixture of the original ground-truth distribution and a fixed distribution. LS achieves a test error of 0.69% in the softmax case. 8 In addition, we also adopt ResNet-32 [13] (using the softmax function) as another baseline CNN model, which achieves a test error of 0.50% on the MNIST dataset. Our ResNet-32 based ICN achieves an improved result of 0.47%. Robustness to external adversarial examples. To show the improved robustness of ICN in dealing with confusing and challenging examples, we compare the baseline CNN with our ICN classifier on adversarial examples generated using the “fast gradient sign” method from [11]. This “fast gradient sign” method (with ϵ = 0.25) can cause a maxout network to misclassify 89.4% of adversarial examples generated from the MNIST test set [11]. In our experiment, we set ϵ = 0.125. Starting with 10, 000 MNIST test examples, we first determine those which are correctly classified by the baseline CNN in order to generate adversarial examples from them. We find that 5, 111 generated adversarial examples successfully fool the baseline CNN, however, only 3, 134 of these examples can fool our ICN classifier, which is a 38.7% reduction in error against adversarial examples. Note that the improvement is achieved without using any additional training data, nor knowing a prior about how these adversarial examples are generated by the specific “fast gradient sign method” [11]. On the contrary, of the 2, 679 adversarial examples generated from the ICN classifier side that fool ICN using the same method, 2, 079 of them can still fool the baseline CNN classifier. This two-way experiment shows the improved robustness of ICN over the baseline CNN. 4.2 CIFAR-10 Table 3: Test errors on the CIFAR-10 dataset. In both onevs-all and softmax cases, ICN shows improvement over the baseline ResNet model. The result of convolutional DBN is from [19]. Method One-vs-all (%) Softmax (%) w/o Data Augmentation Convolutional DBN 21.1 ResNet-32 (baseline) 13.44 12.38 ResNet-32 w/ LS 12.65 ResNet-32 + DCGAN 12.99 ICN-noise (ours) 13.28 11.94 ICN (ours) 12.94 11.46 w/ Data Augmentation ResNet-32 (baseline) 6.70 7.06 ResNet-32 w/ LS 6.89 ResNet-32 + DCGAN 6.75 ICN-noise (ours) 6.58 6.90 ICN (ours) 6.52 6.70 The CIFAR-10 dataset [18] consists of 60, 000 color images of size 32 × 32. This set of 60, 000 images is split into two sets, 50, 000 images for training and 10, 000 images for testing. We adopt ResNet [13] as our baseline model [45]. For data augmentation, we follow the standard procedure in [26, 25, 13] by augmenting the dataset by zero-padding 4 pixels on each side; we also perform cropping and random flipping. The results are reported in Table 3. In both one-vs-all and softmax cases, ICN outperforms the baseline ResNet classifiers. Our proposed ICN method is orthogonal to many existing approaches which use various improvements to the network structures in order to enhance the CNN performance. We also compare ICN with Convolutional DBN [19], ResNet-32 w/ Label Smoothing (LS) [39] and ResNet-32+DCGAN [35] methods as described in the MNIST experiments. LS is shown to improve the baseline but is worse than our ICN method in most cases except for the MNIST dataset. 4.3 SVHN Table 4: Test errors on the SVHN dataset. Method Softmax (%) ResNet-32 (baseline) 2.01 ResNet-32 w/ LS 1.96 ResNet-32 + DCGAN 1.98 ICN-noise (ours) 1.99 ICN (ours) 1.95 We use the standard SVHN [33] dataset. We combine the training data with the extra data to form our training set and use the test data as the test set. No data augmentation has been applied. The result is reported in Table 4. ICN is shown to achieve competitive results. 5 Conclusion In this paper, we have proposed an introspective convolutional nets (ICN) algorithm that performs internal introspection. We observe performance gains within supervised learning using state-of-the-art CNN architectures on standard machine learning benchmarks. Acknowledgement This work is supported by NSF IIS-1618477, NSF IIS-1717431, and a Northrop Grumman Contextual Robotics grant. We thank Saining Xie, Weijian Xu, Fan Fan, Kwonjoon Lee, Shuai Tang, and Sanjoy Dasgupta for helpful discussions. 9 References [1] P. Baldi. Autoencoders, unsupervised learning, and deep architectures. In ICML Workshop on Unsupervised and Transfer Learning, pages 37–49, 2012. [2] L. Breiman. Random forests. Machine learning, 45(1):5–32, 2001. [3] A. Brock, T. Lim, J. Ritchie, and N. Weston. Neural photo editing with introspective adversarial networks. In ICLR, 2017. [4] M. A. Carreira-Perpinan and G. Hinton. On contrastive divergence learning. In AISTATS, volume 10, pages 33–40, 2005. [5] T. Chen, E. B. Fox, and C. Guestrin. Stochastic gradient hamiltonian monte carlo. In ICML, 2014. [6] S. Della Pietra, V. Della Pietra, and J. Lafferty. Inducing features of random fields. IEEE transactions on pattern analysis and machine intelligence, 19(4):380–393, 1997. [7] Y. Freund and R. 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. [8] J. Friedman, T. Hastie, and R. Tibshirani. The elements of statistical learning, volume 1. Springer series in statistics Springer, Berlin, 2001. [9] L. A. Gatys, A. S. Ecker, and M. Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [10] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, 2014. [11] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015. [12] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. [13] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645. Springer, 2016. [14] G. E. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural computation, 18(7):1527–1554, 2006. [15] T. Jebara. Machine learning: discriminative and generative, volume 755. Springer Science & Business Media, 2012. [16] T. Kim. DCGAN-tensorflow. https://github.com/carpedm20/DCGAN-tensorflow. [17] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [18] A. Krizhevsky. Learning Multiple Layers of Features from Tiny Images. CS Dept., U Toronto, Tech. Rep., 2009. [19] A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Unpublished manuscript, 40, 2010. [20] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In NIPS, 2012. [21] J. Lazarow, L. Jin, and Z. Tu. Introspective neural networks for generative modeling. In ICCV, 2017. [22] D. B. Leake. Introspective learning and reasoning. In Encyclopedia of the Sciences of Learning, pages 1638–1640. Springer, 2012. [23] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. Howard, W. Hubbard, and L. Jackel. Backpropagation applied to handwritten zip code recognition. In Neural Computation, 1989. [24] Y. LeCun and C. Cortes. The MNIST database of handwritten digits, 1998. [25] C.-Y. Lee, P. W. Gallagher, and Z. Tu. Generalizing pooling functions in convolutional neural networks: Mixed, gated, and tree. In AISTATS, 2016. [26] C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. Deeply-supervised nets. In AISTATS, 2015. [27] P. Liang and M. I. Jordan. An asymptotic analysis of generative, discriminative, and pseudolikelihood estimators. In ICML, 2008. 10 [28] J. S. Liu. Monte Carlo strategies in scientific computing. Springer Science & Business Media, 2008. [29] A. L. Maas, A. Y. Hannun, and A. Y. Ng. Rectifier nonlinearities improve neural network acoustic models. In ICML, 2013. [30] S. Mandt, M. D. Hoffman, and D. M. Blei. Stochastic gradient descent as approximate bayesian inference. arXiv preprint arXiv:1704.04289, 2017. [31] C. Z. Mooney, R. D. Duval, and R. Duvall. Bootstrapping: A nonparametric approach to statistical inference. Number 94-95. Sage, 1993. [32] A. Mordvintsev, C. Olah, and M. Tyka. Deepdream - a code example for visualizing neural networks. Google Research, 2015. [33] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading Digits in Natural Images with Unsupervised Feature Learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011. [34] J. R. Quinlan. Improved use of continuous attributes in c4. 5. Journal of artificial intelligence research, 4:77–90, 1996. [35] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. [36] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. In NIPS, 2016. [37] B. Settles. Active learning literature survey. University of Wisconsin, Madison, 52(55-66):11, 2010. [38] A. Sinha, M. Sarkar, A. Mukherjee, and B. Krishnamurthy. Introspection: Accelerating neural network training by learning weight evolution. arXiv preprint arXiv:1704.04959, 2017. [39] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016. [40] Z. Tu. Learning generative models via discriminative approaches. In CVPR, 2007. [41] Z. Tu, K. L. Narr, P. Dollár, I. Dinov, P. M. Thompson, and A. W. Toga. Brain anatomical structure segmentation by hybrid discriminative/generative models. Medical Imaging, IEEE Transactions on, 27(4):495–508, 2008. [42] V. N. Vapnik. The nature of statistical learning theory. Springer-Verlag New York, Inc., 1995. [43] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient langevin dynamics. In ICML, 2011. [44] M. Welling, R. S. Zemel, and G. E. Hinton. Self supervised boosting. In NIPS, 2002. [45] Y. Wu. Tensorpack toolbox. https://github.com/ppwwyyxx/tensorpack/tree/ master/examples/ResNet. [46] Y. N. Wu, S. C. Zhu, and X. Liu. Equivalence of julesz ensembles and frame models. International Journal of Computer Vision, 38(3), 2000. [47] J. Xie, Y. Lu, S.-C. Zhu, and Y. N. Wu. Cooperative training of descriptor and generator networks. arXiv preprint arXiv:1609.09408, 2016. [48] J. Xie, Y. Lu, S.-C. Zhu, and Y. N. Wu. A theory of generative convnet. In ICML, 2016. [49] J. Zhao, M. Mathieu, and Y. LeCun. Energy-based generative adversarial network. In ICLR, 2017. [50] S. C. Zhu, Y. N. Wu, and D. Mumford. Minimax entropy principle and its application to texture modeling. Neural Computation, 9(8):1627–1660, 1997. [51] X. Zhu. Semi-supervised learning literature survey. Computer Science, University of WisconsinMadison, Technical Report 1530, 2005. 11 | 2017 | 51 |
7,019 | Hierarchical Methods of Moments Matteo Ruffini ⇤ Universitat Politècnica de Catalunya Guillaume Rabusseau † McGill University Borja Balle ‡ Amazon Research Cambridge Abstract Spectral methods of moments provide a powerful tool for learning the parameters of latent variable models. Despite their theoretical appeal, the applicability of these methods to real data is still limited due to a lack of robustness to model misspecification. In this paper we present a hierarchical approach to methods of moments to circumvent such limitations. Our method is based on replacing the tensor decomposition step used in previous algorithms with approximate joint diagonalization. Experiments on topic modeling show that our method outperforms previous tensor decomposition methods in terms of speed and model quality. 1 Introduction Unsupervised learning of latent variable models is a fundamental machine learning problem. Algorithms for learning a variety of latent variable models, including topic models, hidden Markov models, and mixture models are routinely used in practical applications for solving tasks ranging from representation learning to exploratory data analysis. For practitioners faced with the problem of training a latent variable model, the decades-old Expectation-Maximization (EM) algorithm [1] is still the tool of choice. Despite its theoretical limitations, EM owes its appeal to (i) the robustness of the maximum-likelihood principle to model misspecification, and (ii) the need, in most cases, to tune a single parameter: the dimension of the latent variables. On the other hand, method of moments (MoM) algorithms for learning latent variable models via efficient tensor factorization algorithms have been proposed in the last few years [2–9]. Compared to EM, moment-based algorithms provide a stronger theoretical foundation for learning latent variable models. In particular, it is known that in the realizable setting the output of a MoM algorithm will converge to the parameters of the true model as the amount of training data increases. Furthermore, MoM algorithms only make a single pass over the training data, are highly parallelizable, and always terminate in polynomial time. However, despite their apparent advantages over EM, the adoption of MoM algorithms in practical applications is still limited. Empirical studies indicate that initializing EM with the output of a MoM algorithm can improve the convergence speed of EM by several orders of magnitude, yielding a very efficient strategy to accurately learn latent variable models [8–10]. In the case of relatively simple models this approach can be backed by intricate theoretical analyses [11]. Nonetheless, these strategies are not widely deployed in practice either. The main reason why MoM algorithms are not adopted by practitioners is their lack of robustness to model misspecification. Even when combined with EM, MoM algorithms fail to provide an initial estimate for the parameters of a model leading to fast convergence when the learning problem is too far from the realizable setting. For example, this happens when the number of the latent variables used in a MoM algorithm is too small to accurately represent the training data. In contrast, the model ⇤mruffini@cs.upc.edu †guillaume.rabusseau@mail.mcgill.ca ‡pigem@amazon.co.uk 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. obtained by standalone EM in this case is reasonable and desirable: when asked for a small number of latent variables EM yields a model which is easy to interpret and can be useful for data visualization and exploration. For example, an important application of low-dimensional learning can be found in mixture models, where latent class assignments provided by a simple model can be used to split the training data into disjoint datasets to which EM is applied recursively to produce a hierarchical clustering [12, 13]. The tree produced by such clusterings procedure provides a useful aid in data exploration and visualization even if the models learned at each branching point do not accurately represent the training data. In this paper we develop a hierarchical method of moments that produces meaningful results even in misspecified settings. Our approach is different from previous attemps to design MoM algorithms for misspecified models. Instead of looking for convex relaxations of existing MoM algorithms like in [14–16] or analyzing the behavior of a MoM algorithm with a misspecified number of latent states like in [17, 18], we generalize well-known simultaneous diagonalization approaches to tensor decomposition by phrasing the problem as a non-convex optimization problem. Despite its non-convexity, the hierarchical nature of our method allows for a fast accurate solution based on low-dimensional grid search. We test our method on synthetic and real-world datasets on the topic modeling task, showcasing the advantages of our approach and obtaining meaningful results. 2 Moments, Tensors, and Latent Variable Models This section starts by recalling the basic ideas behind methods of moments for learning latent variable models via tensor decompositions. Then we review existing tensor decomposition algorithms and discuss the effect of model misspecification on the output of such algorithms. For simplicity we consider first a single topic model with k topics over a vocabulary with d words. A single topic model defines a generative process for text documents where first a topic Y 2 [k] is drawn from some discrete distribution P[Y = i] = !i, and then each word Xt 2 [d], 1 t T, in a document of length T is independently drawn from some distribution P[Xt = j|Y = i] = µi,j over words conditioned on the document topic. The model is completely specified by the vector of topic proportions ! 2 Rk and the word distributions µi 2 Rd for each topic i 2 [k]. We collect the word distributions of the model as the columns of a matrix M = [µ1 · · · µk] 2 Rd⇥k. It is convenient to represent the words in a document using one-hot encodings so that Xt 2 Rd is an indicator vector. With this notation, the conditional expectation of any word in a document drawn from topic i is E[Xt|Y = i] = µi, and the random vector X = PT t=1 Xt is conditionally distributed as a multinomial random variable, with parameters µi and T. Integrating over topics drawn from ! we obtain the first moment of the distribution over words M1 = E[Xt] = P i !iµi = M!. Generalizing this argument to pairs and triples of distinct words in a document yields the matrix of second order moments and the tensor of third order moments of a single topic model: M2 = E[Xs ⌦Xt] = X i !iµi ⌦µi 2 Rd⇥d , (1) M3 = E[Xr ⌦Xs ⌦Xt] = X i !iµi ⌦µi ⌦µi 2 Rd⇥d⇥d , (2) where ⌦denotes the tensor (Kronecker) product between vectors. By defining the matrix ⌦= diag(!) one also obtains the expression M2 = M⌦M >. A method of moments for learning single topic models proceeds by (i) using a collection of n documents to compute empirical estimates ˆ M1, ˆ M2, ˆ M3 of the moments, and (ii) using matrix and tensor decomposition methods to (approximately) factor these empirical moments and extract the model parameters from their decompositions. From the algorithmic point of view, the appeal of this scheme resides in the fact that step (i) requires a single pass over the data which can be trivially parallelized using map-reduce primitives, while step (ii) only requires linear algebra operations whose running time is independent of n. The specifics of step (ii) will be discussed in Section 2.1. Estimating moments ˆ Mm from data with the property that E[ ˆ Mm] = Mm for m 2 {1, 2, 3} is the essential requirement for step (i). In the case of single topic models, and more generally multi-view models, such estimations are straightforward. For example, a simple consistent estimator takes a collection of documents {x(i)}n i=1 and computes ˆ M3 = (1/n) Pn i=1 x(i) 1 ⌦x(i) 2 ⌦x(i) 3 using the 2 first three words from each document. More data-efficient estimators for datasets containing long documents can be found in the literature [19]. For more complex models the method sketched above requires some modifications. Specifically, it is often necessary to correct the statistics directly observable from data in order to obtain vectors/matrices/tensors whose expectation over a training dataset exhibits precisely the relation with the parameters ! and M described above. For example, this is the case for Latent Dirichlet Allocation and mixtures of spherical Gaussians [4, 6]. For models with temporal dependence between observations, e.g. hidden Markov models, the method requires a spectral projection of observables to obtain moments behaving in a multi-view-like fashion [3, 20]. Nonetheless, methods of moments for these models and many others always reduces to the factorization of a matrix and tensor of the form M2 and M3 given above. 2.1 Existing Tensor Decomposition Algorithms Mathematically speaking, methods of moments attempt to solve the polynomial equations in ! and M arising from plugging the empirical estimates ˆ Mm into the expressions for their expectations given above. Several approaches have been proposed to solve these non-linear systems of equations. A popular method for tensor decomposition is Alternating Least Squares (ALS) [21]. Starting from a random initialization of the factors composing a tensor, ALS iteratively fixes two of the three factors, and updates the remaining one by solving an overdetermined linear least squares problem. ALS is easy to implement and to understand, but is known to be prone to local minima, needing several random restarts to yield meaningful results. These limitations fostered the research for methods with guarantees, that, in the unperturbed setting, optimally decompose a tensor like the one in Eq. (2). We now briefly analyze some of these methods. The tensor power method (TPM) [2] starts with a whitening step where, given the SVD M2 = USU >, the whitening matrix E = US1/2 2 Rd⇥k is used to transform M3 into a symmetric orthogonally decomposable tensor T = k X i=1 !iE†µi ⌦E†µi ⌦E†µi 2 Rk⇥k⇥k (3) The weights !i and vectors µi are then recovered from T using a tensor power method and inverting the whitening step. The same whitening matrix is used in [3, 4], where the authors observe that the whitened slices of M3 are simultaneously diagonalized by the Moore-Penrose pseudoinverse of M⌦1/2. Indeed, since M2 = M⌦M > = EE>, there exists a unique orthonormal matrix O 2 Rk⇥k such that M⌦1/2 = EO. Writing M3,r 2 Rd⇥d for the rth slice of M3 across its second mode and mr for the rth row of M, it follows that M3,r = M⌦1/2diag(mr)⌦1/2M > = EOdiag(mr)O>E> . Thus, the problem can be reduced to searching for the common diagonalizer O of the whitened slices of M3 defined as Hr = E†M3,rE†> = Odiag(mr)O> . (4) In the noiseless settings it is sufficient to diagonalize any of the slices M3,r. However, one can also recover O as the eigenvectors of a random linear combination of the various Hr which is more robust to noise [3]. Lastly, the method proposed in [22] consists in directly performing simultaneous diagonalization of random linear combinations of slices of M3 without any whitening step. This method, which in practice is slower than the others (see Section 4.1), under an incoherence assumption on the vectors µi, can robustly recover the weights !i and vectors µi from the tensor M3, even when it is not orthogonally decomposable. 2.2 The Misspecified Setting The methods listed in the previous section have been analyzed in the case where the algorithm only has access to noisy estimates of the moments. However, such analyses assume that the data was 3 generated by a model from the hypothesis class, that the matrix M has rank k, and that this rank is known to the algorithm. In practice the dimension k of the latent variable can be cross-validated, but in many cases this is not enough: data may come from a model outside the class, or from a model with a very large true k. Besides, the moment estimates might be too noisy to provide reliabe estimates for large number of latent variables. It is thus frequent to use these algorithms to estimate l < k latent variables. However, existing algorithms are not robust in this setting, as they have not been designed to work in this regime, and there is no theoretical explanation of what their outputs will be. The methods relying on a whitening step [2–4], will perform the whitening using the matrix E† l obtained from the low-rank SVD truncated at rank l: M2 ⇡UlSlU > l = ElE> l . TPM will use El to whiten the tensor M3 to a tensor Tl 2 Rl⇥l⇥l. However, when k > l, Tl may not admit a symmetric orthogonal decomposition 4. Consequently, it is not clear what TPM will return in this case and there are no guarantees it will even converge. The methods from [3, 4] will compute the matrices Hl,r = E† l M3,rE†> l for r 2 [d] that may not be jointly diagonalizable, and in this case there is no theoretical justification of what what the result of these algorithms will be. Similarly, the simultaneous diagonalization method proposed in [22] produces a matrix that nearly diagonalizes the slices of M3, but no analysis is given for this setting. 3 Simultaneous Diagonalization Based on Whitening and Optimization This section presents the main contribution of the paper: a simultaneous diagonalization algorithms based on whitening and optimization we call SIDIWO (Simultaneous Diagonalization based on Whitening and Optimization). When asked to produce l = k components in the noiseless setting, SIDIWO will return the same output as any of the methods discussed in Section 2.1. However, in contrast with those methods, SIDIWO will provide useful results with a clear interpretation even in a misspecified setting (l < k). 3.1 SIDIWO in the Realizable Setting To derive our SIDIWO algorithm we first observe that in the noiseless setting and when l = k, the pair (M, !) returned by all methods described in Section 2.1 is the solution of the optimization problem given in the following lemma5. Lemma 3.1 Let M3,r be the r-th slice across the second mode of the tensor M3 from (2) with parameters (M, !). Suppose rank(M) = k and let ⌦= diag(!). Then the matrix (M⌦1/2)† is the unique optimum (up to column rescaling) of the optimization problem min D2Dk X i6=j d X r=1 (DM3,rD>)2 i,j !1/2 , (5) where Dk = {D : D = (EOk)† for some Ok s.t. OkO> k = Ik} and E is the whitening matrix defined in Section 2.1. Remark 1 (The role of the constraint) Consider the cost function of Problem (5): in an unconstrained setting, there may be several matrices minimizing that cost. A trivial example is the zero matrix. A less trivial example is when the rows of D belong to the orthogonal complement of the column space of the matrix M. The constraint D = (EOk)† for some orthonormal matrix Ok first excludes the zero matrix from the set of feasible solutions, and second guarantees that all feasible solutions lay in the space generated by the columns of M. Problem (5) opens a new perspective on using simultaneous diagonalization to learn the parameters of a latent variable model. In fact, one could recover the pair (M, !) from the relation M⌦1/2 = D† by first finding the optimal D and then individually retrieving M and ! by solving a linear system using the vector M1. This approach, outlined in Algorithm 1, is an alternative to the ones presented in the literature up to now (even though in the noiseless, realizable setting, it will provide the same 4See the supplementary material for an example corroborating this statement. 5The proofs of all the results are provided in the supplementary material. 4 Algorithm 1 SIDIWO: Simultaneous Diagonalization based on Whitening and Optimization Require: M1, M2, M3, the number of latent states l 1: Compute a SVD of M2 truncated at the l-th singular vector: M2 ⇡UlSlU > l . 2: Define the matrix El = UlS1/2 l 2 Rd⇥l. 3: Find the matrix D 2 Dl optimizing Problem (5). 4: Find ( ˜ M, ˜!) solving ⇢˜ M ˜⌦1/2 = D† ˜ M ˜!> = M1 5: return ( ˜ M, ˜!) results). Similarly to existing methods, this approach requires to know the number of latent states. We will however see in the next section that Algorithm 1 provides meaningful results even when a misspecified number of latent states l < k is used. 3.2 The Misspecified Setting Algorithm 1 requires as inputs the low order moments M1, M2, M3 along with the desired number of latent states l to recover. If l = k, it will return the exact model parameters (M, !); we will now see that it will also provide meaningful results when l < k. In this setting, Algorithm 1 returns a pair ( ˜ M, ˜!) 2 Rd⇥l ⇥Rl such that the matrix D = ( ˜ M ˜⌦1/2)† is optimal for the optimization problem min D2Dl X i6=j d X r=1 (DM3,rD>)2 i,j !1/2 . (6) Analyzing the space of feasible solutions (Theorem 3.1) and the optimization function (Theorem 3.2), we will obtain theoretical guarantees on what SIDIWO returns when l < k, showing that the trivial solutions are not feasible, and that, in the space of feasible solutions, SIDIWO’s optima will approximate the true model parameters according to an intuitive geometric interpretation. Remarks on the constraints. The first step consists in analyzing the space of feasible solutions Dl when l < k. The observations outlined in Remark 1 still hold in this setting: the zero solution and the matrices laying in the orthonormal complement of M are not feasible. Furthermore, the following theorem shows that other undesirable solutions will be avoided. Theorem 3.1 Let D 2 Dl with rows d1, ..., dl, and let Ir,s denote the r ⇥s identity matrix. The following facts hold under the hypotheses of Lemma 3.1: 1. For any row di, there exists at least one column of M such that hdi, µji 6= 0. 2. The columns of any ˜ M satisfying ˜ M ˜⌦1/2 = D† are a linear combination of those of M, laying in the best-fit l-dimensional subspace of the space spanned by the columns of M. 3. Let ⇡be any permutation of {1, ..., d}, and let M⇡and ⌦⇡be obtained by permuting the columns of M and ⌦according to ⇡. If hµi, µji 6= 0 for any i, j, then ((M⇡⌦1/2 ⇡)Ik,l)† /2 Dl, and similarly Il,k(M⇡⌦1/2 ⇡)† /2 Dl. The second point of Theorem 3.1 states that the feasible solutions will lay in the best l-dimensional subspace approximating the one spanned by the columns of M. This has two interesting consequences: if the columns of M are not orthogonal, point 3 guarantees that ˜ M cannot simply be a sub-block of the original M, but rather a non-trivial linear combination of its columns laying in the best l-dimensional subspace approximating its column space. In the single topic model case with k topics, when asked to recover l < k topics, Algorithm 1 will not return a subset of the original k topics, but a matrix ˜ M whose columns gather the original topics via a non trivial linear combination: the original topics will all be represented in the columns of ˜ M with different weights. When the columns of M are orthogonal, this space coincides with the space of the l columns of M associated with the l largest !i; in this setting, the matrix (M⇡⌦1/2 ⇡)Ik,l (for some permutation ⇡) is a feasible solution and minimizes Problem (6). Thus, Algorithm 1 will recover the top l topics. 5 Interpreting the optima. Let ˜ M be such that D = ( ˜ M ˜⌦1/2)† 2 Dl is a minimizer of Problem (6). In order to better understand the relation between ˜ M and the original matrix M, we will show that the cost function of Problem (6) can be written in an equivalent form, that unveils a geometric interpretation. Theorem 3.2 Let d1, ..., dl denote the rows of D 2 Dl and introduce the following optimization problem min D2Dl X i6=j sup v2VM k X h=1 hdi, µhihdj, µhi!hvh (7) where VM = {v 2 Rk : v = ↵>M, where k↵k2 1}. Then this problem is equivalent to (6). First, observe that the cost function in Equation (7) prefers D’s such that the vectors ui = [hdi, µ1p!1i, ..., hdi, µkp!ki], i 2 [l], have disjoint support. This is a consequence of the supv2VM , and requires that, for each j, the entries hdi, µjp!ji are close zero for at least all but one of the various di. Consequently, each center will be almost orthogonal to all but one row of the optimal D; however the number of centers is greater than the number of rows of D, so the same row di may be nonorthogonal to various centers. For illustration, consider the single topic model: a solution D to Problem (7) would have rows that should be as orthogonal as possible to some topics and as aligned as possible to the others; in other words, for a given topic j, the optimization problem is trying to set hdi, µjp!ji = 0 for all but one of the various di. Consequently, each column of the output ˜ M of Algorithm 1 should be in essence aligned with some of the topics and orthogonal to the others. It is worth mentioning that the constraint set Dl forbids the trivial solutions such as the zero matrix, the pseudo-inverse of any subset of l columns of M⌦1/2, and any subset of l rows of (M⌦1/2)† (which all have an objective value of 0). We remark that Theorem 3.2 doesn’t require the matrix M to be full rank k: we only need it to have at least rank greater or equal to l, in order to guarantee that the constraint set Dl is well defined. An optimal solution when l = 2. While Problem (5) can be solved in general using an extension of the Jacobi technique [23, 24], we provide a simple and efficient method for the case l = 2. This method will then be used to perform hierarchical topic modeling in Section 4. When l = 2, Equation (6) can be solved optimally with few simple steps; in fact, the following theorem shows that solving (6) is equivalent to minimizing a continuous function on the compact one-dimensional set I = [−1, 1], which can easily be done by griding I. Using this in Step 3 of Algorithm 1, one can efficiently compute an arbitrarily good approximation of the optimal matrix D 2 D2. Theorem 3.3 Consider the continuous function F(x) = c1x4 + c2x3p 1 −x2 + c3x p 1 −x2 + c4x2 + c5, where the coefficients c1, ..., c5 are functions of the entries of M2 and M3. Let a be the minimizer of F on [−1, 1], and consider the matrix Oa = p 1 −a2 a −a p 1 −a2 ' . Then, the matrix D = (E2Oa)† is a minimizer of Problem (6) when l = 2. 4 Case Study: Hierarchical Topic Modeling In this section, we show how SIDIWO can be used to efficiently recover hierarchical representations of latent variable models. Given a latent variable model with k states, our method allows to recover a pair ( ˜ M, ˜!) from estimate of the moments M1, M2 and M3, where the l columns of ˜ M offer a synthetic representation of the k original centers. We will refer to these l vectors as pseudo-centers: each pseudo-center is representative of a group of the original centers. Consider the case l = 2. A dataset C of n samples can be split into two smaller subsets according to their similarity to the two pseudo-centers. Formally, this assignment is done using Maximum A Posteriori (MAP) to find the pseudo-center giving maximum conditional likelihood to each sample. The splitting procedure can 6 (a) (b) (c) Figure 1: Figure 1a provides a visualization of the topics used to generate the sample. Figure 1b represents the hierarchy recovered with the proposed method. Table 1c reports the average and standard deviation over 10 runs of the clustering accuracy for the various methods, along with average running times. be iterated recursively to obtain a divisive binary tree, leading to a hierarchical clustering algorithm. While this hierarchical clustering method can be applied to any latent variable model that can be learned with the tensor method of moments (e.g. Latent Dirichlet Allocation), we present it here for the single topic model for the sake of simplicity. We consider a corpus C of n texts encoded as in Section 2 and we split C into two smaller corpora according to their similarity to the two pseudo-centers in two steps: project the pseudo-centers on the simplex to obtain discrete probability distributions (using for example the method described in [25]), and use MAP assignment to assign each text x to a pseudo-center. This process is summarized in Algorithm 2. Once the corpus C has been split into two subsets C1 and C2, each of these subsets may Algorithm 2 Splitting a corpus into two parts Require: A corpus of texts C = (x(1), ..., x(n)). 1: Estimate M1, M2 and M3. 2: Recover l = 2 pseudo-center with Algorithm 1 . 3: Project the Pseudo-center to the simplex 4: for i 2 [n] do 5: Assign the text x(i) to the cluster Cluster(i) = arg maxj P[X = x(i)|Y = j, ˜!, ˜ M], where P[X|Y = j, ˜!, ˜ M] is the multinomial distr. associated to the j-th projected pseudo-center. 6: end for 7: return The cluster assignments Cluster. still contain the full set of topics but the topic distribution will differ in the two: topics similar to the first pseudo-center will be predominant in the first subset, the others in the second. By recursively iterating this process, we obtain a binary tree where topic distributions in the nodes with higher depth are expected to be more concentrated on fewer topics. In the next sections, we assess the validity of this approach on both synthetic and real-world data6. 4.1 Experiment on Synthetic Data In order to test the ability of SIDIWO to recover latent structures in data, we generate a dataset distributed as a single topic model (with a vocabulary of 100 words) whose 8 topics have an intrinsic hierarchical structure depicted in Figure 1a. In this figure, topics are on the x-axis, words on the y-axis, and green (resp. red) points represents high (resp low) probability. We see for example that the first 4 topics are concentrated over the 1st half of the vocabulary, and that topics 1 and 2 have high probability on the 1st and 3rd fourth of the words while for the other two it is on the 1st and 4th. 6The experiments in this section have been performed in Python 2.7, using numpy [26] library for linear algebra operations, with the exception of the implementation of the method from [22], for which we used the author’s Matlab implementation: https://github.com/kuleshov/tensor-factorization. All the experiments were run on a MacBook Pro with an Intel Core i5 processor. The implementation of the described algorithms can be found a this link: https://github.com/mruffini/Hierarchical-Methods-of-Moments. 7 Figure 2: Experiment on the NIPS dataset. We generate 400 samples according to this model and we iteratively run Algorithm 2 to create a hierarchical binary tree with 8 leafs. We expect leafs to contain samples from a unique topic and internal nodes to gather similar topics. Results are displayed in Figure 1b where each chart represents a node of the tree (child nodes lay below their parent) and contains the heatmap of the samples clustered in that node (x-axis corresponds to samples and y-axis to words, red points are infrequent words and clear points frequent ones). The results are as expected: each leaf contains samples from one of the topics and internal nodes group similar topics together. We compare the clustering accuracy of SIDIWO with other methods using the Adjusted Rand Index [27] of the partition of the data obtained at the leafs w.r.t the one obtained using the true topics; comparisons are with the flat clustering on k = 8 topics with TPM, the method from [3] (SVD), the one from [22] (Rand. Proj.) and ALS from [21], where ALS is applied to decompose a whitened 8 ⇥8 ⇥8 tensor T, calculated as in Equation (3). We repeat the experiment 10 times with different random samples and we report the average results in Table 1c; SIDIWO always recovers the original topic almost perfectly, unlike competing methods. One intuition for this improvement is that each split in the divisive clustering helps remove noise in the moments. 4.2 Experiment on NIPS Conference Papers 1987-2015 We consider the full set of NIPS papers accepted between 1987 and 2015 , containing n = 11, 463 papers [28]. We assume that the papers are distributed according to a single topic model, we keep the d = 3000 most frequent words as vocabulary and we iteratively run Algorithm 2 to create a binary tree of depth 4. The resulting tree is shown in Figure 2 where each node contains the most relevant words of the cluster, where the relevance [29] of a word w 2 Cnode ⇢C is defined by r(w, Cnode) = λ log P[w|Cnode] + (1 −λ) log P[w|Cnode] P[w|C] , where the weight parameter is set to λ = 0.7 and P[w|Cnode] (resp. P[w|C]) is the empirical frequency of w in Cnode (resp. in C). The leafs clustering and the whole hierarchy have a neat interpretation. Looking at the leaves, we can easily hypothesize the dominant topics for the 8 clusters. From left to right we have: [image processing, probabilistic models], [neuroscience, neural networks], [kernel methods, algorithms], [online optimization, reinforcement learning]. Also, each node of the lower levels gathers meaningful keywords, confirming the ability of the method to hierarchically find meaningful topics. The running time for this experiment was 59 seconds. 4.3 Experiment on Wikipedia Mathematics Pages We consider a subset of the full Wikipedia corpus, containing all articles (n = 809 texts) from the following math-related categories: linear algebra, ring theory, stochastic processes and optimization. 8 Figure 3: Experiment on the Wikipedia Mathematics Pages dataset. We remove a set of 895 stop-words, keep a vocabulary of d = 3000 words and run SIDIWO to perform hierarchical topic modeling (using the same methodology as in the previous section). The resulting hierarchical clustering is shown in Figure 3 where we see that each leaf is characterized by one of the dominant topics: [ring theory, linear algebra], [stochastic processes, optimization] (from left to right). It is interesting to observe that the first level of the clustering has separated pure mathematical topics from applied ones. The running time for this experiment was 6 seconds. 5 Conclusions and future works We proposed a novel spectral algorithm (SIDIWO) that generalizes recent method of moments algorithms relying on tensor decomposition. While previous algorithms lack robustness to model misspecification, SIDIWO provides meaningful results even in misspecified settings. Moreover, SIDIWO can be used to perform hierarchical method of moments estimation for latent variable models. In particular, we showed through hierarchical topic modeling experiments on synthetic and real data that SIDIWO provides meaningful results while being very computationally efficient. A natural future work is to investigate the capability of the proposed hierarchical method to learn overcomplete latent variable models, a task that has received significant attention in recent literature [30, 31]. We are also interested in comparing the learning performance of SIDIWO the with those of other existing methods of moments in the realizable setting. On the applications side, we are interested in applying the methods developed in this paper to the healthcare analytics field, for instance to perform hierarchical clustering of patients using electronic healthcare records or more complex genetic data. Acknowledgments Guillaume Rabusseau acknowledges support of an IVADO postdoctoral fellowship. Borja Balle completed this work while at Lancaster University. References [1] Arthur P. Dempster, Nan M. Laird, and Donald B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society. Series B (methodological), pages 1–38, 1977. [2] Animashree Anandkumar, Rong Ge, Daniel Hsu, Sham M Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. Journal of Machine Learning Research, 15(1):2773–2832, 2014. [3] Animashree Anandkumar, Daniel Hsu, and Sham M Kakade. A method of moments for mixture models and hidden Markov models. In COLT, volume 1, page 4, 2012. [4] Animashree Anandkumar, Yi-kai Liu, Daniel J Hsu, Dean P Foster, and Sham M Kakade. A spectral algorithm for Latent Dirichlet Allocation. In NIPS, pages 917–925, 2012. [5] Prateek Jain and Sewoong Oh. Learning mixtures of discrete product distributions using spectral decompositions. In COLT, pages 824–856, 2014. [6] Daniel Hsu and Sham M Kakade. Learning mixtures of spherical Gaussians: moment methods and spectral decompositions. In ITCS, pages 11–20. ACM, 2013. 9 [7] Le Song, Eric P Xing, and Ankur P Parikh. A spectral algorithm for latent tree graphical models. In ICML, pages 1065–1072, 2011. [8] Borja Balle, William L Hamilton, and Joelle Pineau. Methods of moments for learning stochastic languages: Unified presentation and empirical comparison. In ICML, pages 1386–1394, 2014. [9] Arun T Chaganty and Percy Liang. Spectral experts for estimating mixtures of linear regressions. In ICML, pages 1040–1048, 2013. [10] Raphael Bailly. Quadratic weighted automata: Spectral algorithm and likelihood maximization. Journal of Machine Learning Research, 20:147–162, 2011. [11] Yuchen Zhang, Xi Chen, Denny Zhou, and Michael I Jordan. Spectral methods meet EM: A provably optimal algorithm for crowdsourcing. In NIPS, pages 1260–1268, 2014. [12] Michael Steinbach, George Karypis, Vipin Kumar, et al. A comparison of document clustering techniques. In KDD workshop on text mining, volume 400, pages 525–526. Boston, 2000. [13] Sergio M Savaresi and Daniel L Boley. On the performance of bisecting K-means and PDDP. In SDM, pages 1–14. SIAM, 2001. [14] Borja Balle, Ariadna Quattoni, and Xavier Carreras. Local loss optimization in operator models: a new insight into spectral learning. In ICML, pages 1819–1826, 2012. [15] Borja Balle and Mehryar Mohri. Spectral learning of general weighted automata via constrained matrix completion. In NIPS, pages 2159–2167, 2012. [16] Ariadna Quattoni, Borja Balle, Xavier Carreras, and Amir Globerson. Spectral regularization for maxmargin sequence tagging. In ICML, pages 1710–1718, 2014. [17] Alex Kulesza, N Raj Rao, and Satinder Singh. Low-rank spectral learning. In Artificial Intelligence and Statistics, pages 522–530, 2014. [18] Alex Kulesza, Nan Jiang, and Satinder Singh. Low-rank spectral learning with weighted loss functions. In Artificial Intelligence and Statistics, pages 517–525, 2015. [19] Matteo Ruffini, Marta Casanellas, and Ricard Gavaldà. A new spectral method for latent variable models. arXiv preprint arXiv:1612.03409, 2016. [20] Daniel Hsu, Sham M Kakade, and Tong Zhang. A spectral algorithm for learning hidden Markov models. Journal of Computer and System Sciences, 78(5):1460–1480, 2012. [21] Tamara G Kolda and Brett W Bader. Tensor decompositions and applications. SIAM review, 51(3):455–500, 2009. [22] Volodymyr Kuleshov, Arun Chaganty, and Percy Liang. Tensor factorization via matrix factorization. In AISTATS, pages 507–516, 2015. [23] Jean-Francois Cardoso and Antoine Souloumiac. Jacobi angles for simultaneous diagonalization. SIAM journal on matrix analysis and applications, 17(1):161–164, 1996. [24] Angelika Bunse-Gerstner, Ralph Byers, and Volker Mehrmann. Numerical methods for simultaneous diagonalization. SIAM journal on matrix analysis and applications, 14(4):927–949, 1993. [25] John Duchi, Shai Shalev-Shwartz, Yoram Singer, and Tushar Chandra. Efficient projections onto the l 1-ball for learning in high dimensions. In ICML, pages 272–279, 2008. [26] Stefan Van Der Walt, S Chris Colbert, and Gael Varoquaux. The numpy array: a structure for efficient numerical computation. Computing in Science & Engineering, 13(2):22–30, 2011. [27] Lawrence Hubert and Phipps Arabie. Comparing partitions. Journal of classification, 2(1):193–218, 1985. [28] Valerio Perrone, Paul A Jenkins, Dario Spano, and Yee Whye Teh. Poisson random fields for dynamic feature models. arXiv preprint arXiv:1611.07460, 2016. [29] Carson Sievert and Kenneth E Shirley. Ldavis: A method for visualizing and interpreting topics. In ACL workshop on interactive language learning, visualization, and interfaces, 2014. [30] Animashree Anandkumar, Rong Ge, and Majid Janzamin. Learning overcomplete latent variable models through tensor methods. In COLT, pages 36–112, 2015. 10 [31] Animashree Anandkumar, Rong Ge, and Majid Janzamin. Analyzing tensor power method dynamics in overcomplete regime. Journal of Machine Learning Research, 18(22):1–40, 2017. [32] Elina Mihaylova Robeva. Decomposing Matrices, Tensors, and Images. PhD thesis, University of California, Berkeley, 2016. 11 | 2017 | 510 |
7,020 | A New Alternating Direction Method for Linear Programming Sinong Wang Department of ECE The Ohio State University wang.7691@osu.edu Ness Shroff Department of ECE and CSE The Ohio State University shroff.11@osu.edu Abstract It is well known that, for a linear program (LP) with constraint matrix A ∈Rm×n, the Alternating Direction Method of Multiplier converges globally and linearly at a rate O((∥A∥2 F + mn) log(1/ϵ)). However, such a rate is related to the problem dimension and the algorithm exhibits a slow and fluctuating “tail convergence” in practice. In this paper, we propose a new variable splitting method of LP and prove that our method has a convergence rate of O(∥A∥2 log(1/ϵ)). The proof is based on simultaneously estimating the distance from a pair of primal dual iterates to the optimal primal and dual solution set by certain residuals. In practice, we result in a new first-order LP solver that can exploit both the sparsity and the specific structure of matrix A and a significant speedup for important problems such as basis pursuit, inverse covariance matrix estimation, L1 SVM and nonnegative matrix factorization problem compared with the current fastest LP solvers. 1 Introduction We are interested in applying the Alternating Direction Method of Multiplier (ADMM) to solve a linear program (LP) of the form min x∈Rn cT x s.t. Ax = b, xi ≥0, i ∈[nb]. (1) where c ∈Rn, A ∈Rm×n is the constraint matrix, b ∈Rm and [nb] = {1, . . . , nb}. This problem plays a major role in numerical optimization, and has been used in a large variety of application areas. For example, several important machine learning problems including the nonnegative matrix factorization (NMF) [1], l1-regularized SVM [2], sparse inverse covariance matrix estimation (SICE) [3] and the basis pursuit (BP) [4], and the MAP inference [5] problem can be cast into an LP setting. The complexity of the traditional LP solver is still at least quadratic in the problem dimension, i.e., the Interior Point method (IPM) with a weighted path finding strategy. However, many recent problems in machine learning have extremely large-scale targeting data but exhibit a sparse structure, i.e., nnz(A) ≪mn, where nnz(A) is the number of non-zero elements in the constraint matrix A. This characteristic severely limits the ability of the IPM or Simplex technique to solve these problems. On the other hand, first-order methods have received extensive attention recently due to their ability to deal with large data sets. These methods require a matrix vector multiplication Ax in each iteration with complexity linear in nnz(A). However, the key challenge in designing a first-order algorithm is that LPs are usually non-smooth and non-strongly convex optimization problems (may not have a unique solution). Utilizing the standard primal and dual stochastic sub-gradient descent method will result in an extremely slow convergence rate, i.e., O(1/ϵ2) [6]. The ADMM was first developed in 1975 [7], and since then there have been several LP solvers based on this technique. Compared with the traditional Augmented Lagrangian Method (ALM), this 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. method splits the variable into several blocks, and optimizes the augmented Lagrangian (AL) function in a Gauss-Seidel fashion, which often results in relatively easier subproblems to solve. However, this method suffers from a slow convergence when the number of blocks increases. Moreover, the challenge of applying the ADMM to the LP is that the LP problem does not exhibit an explicit separable structure among variables, which are difficult to split in the traditional sense. The notable work [8] first applies the ADMM to solve the LP by augmenting the original n-dimensional variables into nm−dimensions, and the resultant Augmented Lagrangian function is separable among n blocks of variables. They prove that this method converges globally and linearly. However, the rate of this method is dependent on the problem dimension m, n, and converges quite slowly when m, n are large. Thus, they leave an open question on whether other efficient splitting methods exist, resulting in convergence analysis in the space with lower dimension m or n. In this paper, we propose a new splitting method for LP, which splits the equality and inequality constraints into two blocks. The resultant subproblems in each iteration are a linear system with a positive definite matrix, and n one-dimensional truncation operations. We prove our new method converges globally and linearly at a faster rate compared with the method in [8]. Specifically, the main contributions of this paper can be summarized as follows: (i) We show that the existing ADMM in [8] exhibits a slow and fluctuating “tail convergence”, and provide a theoretical understanding of why this phenomenon occurs. (ii) We propose a new ADMM method for LP and provide a new analysis of the linear convergence rate of this new method, which only involves O(m + n)−dimensional iterates. This result answers the open question proposed in [8]. (iii) We show that when the matrix A possesses some specific structure, the resultant subproblem can be solved in closed form. For the general constraint matrix A, we design an efficiently implemented Accelerated Coordinate Descent Method (ACDM) to solve the subproblem in O(log(1/ϵ)nnz(A)) time. (iv) Practically, we show that our proposed algorithm significantly speeds up solving the basis pursuit, l1-regularized SVM, sparse inverse covariance matrix estimation, and the nonnegative matrix factorization problem compared with existing splitting method [8] and the current fastest first-order LP solver in [9]. 2 Preliminaries In this section, we first review several definitions that will be used in the sequel. Then we illustrate some observations from the existing method. We also include several LP-based machine problems that can be cast into the LP setting in the Appendix. 2.1 Notation A twice differentiable function f : Rn →R has strong convexity parameter σ if and only if its Hessian satisfies ∇2f(x) ⪰σI, ∀x. We use ∥·∥to denote standard l2 norm for vector or spectral norm for matrix, ∥·∥1 to denote the l1 norm and ∥·∥F to denote the Frobenius norm. A twice differentiable function f : Rn →R has a component-wise Lipschitz continuous gradient with constant Li if and only if ∥∇if(x) −∇if(y)∥≤Li∥x −y∥, ∀x, y. For example, for the quadratic function F(x) = 1 2∥Ax −b∥2, the gradient ∇F(x) = AT (Ax −b) and the Hessian ∇2F(x) = AT A. Hence the parameter σ and Li satisfy (choose y = x + tei, where t ∈R, ei ∈Rn is the unit vector), xAT Ax ≥σ∥x∥2 and tAT i Aei ≤Li|t|, ∀x, t. Thus, the σ is the smallest eigenvalue of AT A and Li = ∥Ai∥2, where Ai is the ith column of the matrix A. The projection operator of point x into convex set S is defined as [x]S = arg minu∈S ∥x −u∥. If S is the non-negative cone, let [x]+ ≜[x]S. Let Vi = [0, ∞) for i ∈[nb] and Vi = R for i ∈[nf]. 2.2 Tail Convergence of the Existing ADMM Method The existing ADMM in [8] solves the LP (1) by following procedure: in each iteration k, go through the following two steps: 1. Primal update: xk+1 i = h xk i + 1 ∥Ai∥2 AT i (b−Axk) q −ci−AT i zk λ i Vi, i = 1, . . . , n. 2. Dual update: zk+1 = zk −λ q (Axk −b). We plot the solving accuracy versus the number of iterations for solving three kinds of problems (see Fig.1 in Appendix). We can observe that it converges fast in the initial phase, but exhibits a slow and 2 fluctuating convergence when the iterates approach the optimal set. This method originates from a specific splitting method in the standard 2−block ADMM [10]. To provide some understanding of this phenomenon, we show that this method can be actually recovered by an inexact Uzawa method [11]. The Augmented Lagrangian function of the problem (1) is denoted by L(x, z) = cT x + ρ 2∥Ax −b −z/ρ∥2. In each iteration k, the inexact Uzawa method first minimizes a local second-order approximation of the quadratic term in L(x, zk) with respect to primal variables x, specifically, xk+1 = arg min xi∈Vi cT x + ⟨ρAT (Axk −b −zk/ρ), x −xk⟩+ 1 2∥x −xk∥D, (2) then update the dual variables by zk+1 = zk −ρ(Axk+1 −b). Let the proximity parameter ρ = λ/q and matrix D equal to the diagonal matrix diag{. . . , 1/q∥Ai∥2, . . .}, then we can recover the above algorithm by the first-order optimality condition of (2). This equivalence allows us to illustrate the main reason for the slow and fluctuating “tail convergence” comes from the inefficiency of such a local approximation of the Augmented Lagrangian function when the iterates approach the optimal set. One straightforward idea to resolve this issue is to minimize the Augmented Lagrangian function exactly instead of its local approximation, which leads to the classic ALM. There exists a line of works focusing on analyzing the convergence of applying ALM to LP [9, 12, 13]. This method will produce a sequence of constrained quadratic programs (QP) that are difficult to solve. The work [9] proves that the proximal Coordinate Descent method can solve each QPs at a linear rate even when matrix A is not full column rank. However, there exists several drawbacks in this approach: (i) the practical solving time of each subproblem is quite long when A is rank-deficient; (ii) the theoretical performance and complexity of using recent accelerated techniques in proximal optimization [14] with the ALM is unknown; (iii) it cannot exploit the specific structure of matrix A when solving each constrained QP. Therefore, it motivates us to investigate the new and efficient variable splitting method for such a problem. 3 New Splitting Method in ADMM We first separate the equality and inequality constraints of the above LP (1) by adding another group of variables y ∈Rn. min cT x (3) s.t. Ax = b, x = y, yi ≥0, i ∈[nb]. The dual of problem (3) takes the following form. min bT zx (4) s.t. −AT zx −zy = c, zy,i ≤0, i ∈[nb], zy,i = 0, i ∈[n]\[nb]. Let zx, zy be the Lagrange multipliers for constraints Ax = b, x = y,respectively. Define the indicator function g(y) of the non-negative cone: g(y) = 0 if yi ≥0, ∀i ∈[nb]; otherwise g(y) = +∞. Then the augmented Lagrangian function of the primal problem (3) is defined as L(x, y, z) = cT x + g(y) + zT (A1x + A2y −b) + ρ 2∥A1x + A2y −b∥2, (5) where z = [zx; zy]. The matrix A1, A2 and vector b are denoted by A1 = A I , A2 = 0 −I , and b = b 0 . (6) In each iteration k, the standard ADMM go through following three steps: 1. Primal update: xk+1 = arg min x∈Rn L(x, yk, zk). 2. Primal update: yk+1 = arg min y∈Rn L(xk+1, y, zk). 3 Algorithm 1 Alternating Direction Method of Multiplier with Inexact Subproblem Solver Initialize z0 ∈Rm+n, choose parameter ρ > 0. repeat 1. Primal update: find xk+1 such that Fk(xk+1) −minx∈Rn Fk(x) ≤ϵk. 2. Primal update: for each i, let yk+1 i = xk+1 i + zk y,i/ρ Vi. 3. Dual update: zk+1 x = zk x + ρ(Axk+1 −b), zk+1 y = zk y + ρ(xk+1 −yk+1). until ∥Axk+1 −b∥∞≤ϵ and ∥xk+1 −yk+1∥∞≤ϵ 3. Dual update: zk+1 = zk + ρ(A1xk+1 + A2yk+1 −b). The first step is an unconstrained quadratic program, which can be simplified as xk+1 = arg min x Fk(x) ≜cT x + (zk)T A1x + ρ 2∥A1x + A2yk −b∥2. (7) The gradient of the function Fk(x) can be expressed as ∇Fk(x) = ρ(AT A + I)x + AT 1 [zk + ρ(A2yk −b)] + c, (8) and the Hessian of function Fk(x) is ∇2Fk(x) = ρ(AT A + I). (9) Further, based on the first-order optimality condition, the first step is equivalent to solving a linear system, which requires inverting the Hessian matrix (9). In practice, the complexity is quite high to be exactly solved unless the Hessian exhibits some specific structures. Thus, we relax the first step into the inexact minimization: find xk+1 such that Fk(xk+1) −min x∈Rn Fk(x) ≤ϵk, (10) where ϵk is the given accuracy. Transforming the indicator function g(y) back to the constraints, the second step can be separated into n one−dimensional optimization problems: for each i, yk+1 i = arg min yi∈Vi −zk y,iyi + ρ 2(yi −xk+1 i )2 = xk+1 i + zk y,i/ρ Vi . The resultant algorithm is sketched in Algorithm 1. In some applications such as l1-regularized SVMs and basis pursuit problem, the objective function contains the l1 norm of the variables. Transforming to the canonical form (1) will introduce additional n variables and 2n constraints. One important feature in our method is that we can split the objective function by adding variable y. The corresponding subproblems are similar with Algorithm 1 and the only difference is that the second step will be n one−dimensional shrinkage operations. (Details can be seen in Appendix.) 4 Convergence Analysis of New ADMM In this section, we prove that the Algorithm 1 converges at a global and linear rate, and provide a roadmap of the main technical development. We can first write the primal problem (3) as the following standard 2−block form. min x,y f(x) + g(y) s.t. A1x + A2y = b, (11) where f(x) = cT x and g(y) is the indicator function as defined before. Most works in the literature prove that the 2-block ADMM converges globally and linearly via assuming that one of the functions f and g is strongly convex [15, 16, 17]. Unfortunately, both the linear function f and the indicator function g in the LP do not satisfy this property, which poses a significant challenge on the current analytical framework. There exists several recent works trying to address this problem in some sense. In work [18], they have demonstrated that when the dual step size ρ is sufficiently small (impractical), the ADMM converges globally linearly, while no implicit rate is given. The work [13] shows that the ADMM is locally linearly converged when applying to LP. They utilize a unique combination of iterates and conduct a spectral analysis. However, they still leave an open question whether ADMM converges globally and linearly when applying to the LP in the above form. 4 In the sequel, we will answer this question positively and provide an accurate analysis of such a splitting method. The main technical development is based on a geometric argument: we first prove that the set formed by optimal primal and dual solutions of LP (3) is a (3n + m)−dimensional polyhedron S∗; then we utilize certain global error bound to simultaneously estimate the distance from iterates xk+1, yk, zk to S∗. All detailed proofs are given in the Appendix. Lemma 1. (Convergence of 2-block ADMM [10]) Let pk = zk −ρA2yk, we have ∥pk+1 −[pk+1]G∗∥2 ≤∥pk −[pk]G∗∥2 −∥pk+1 −pk∥2, where G∗≜{p∗∈Rm+n|T(p∗) = p∗}, and the definition of operator T is given in (54) in Appendix. Moreover, if the LP (3) has a pair of optimal primal and dual solution, the iterates xk,yk and zk converges to an optimal solution; Otherwise, at least one of the iterates is unbounded. Lemma 1 is tailored from applying the classic Douglas-Rachford splitting method to the LP. This result guarantees that the sequence pk produced by ADMM globally converges under a mild assumption. However, to establish the linear convergence rate, the key lies in estimating the other side inequality, ∥pk −[pk]G∗∥≤γ∥pk+1 −pk∥, γ > 0. (12) Then one can combine these two results together to prove that sequence pk converges globally and linearly with ∥pk+1 −[pk+1]G∗∥2 ≤(1−1/γ2)·∥pk −[pk]G∗∥2, which further can be used to show the R−linear convergence of iterates xk, yk and zk. To estimate the constant γ, we first describe the geometry formed by the optimal primal solutions x∗, y∗and dual solutions z∗of the LP (3). Lemma 2. (Geometry of the optimal solution set of LP) The variables (x∗, y∗) are the optimal primal solutions and z∗are optimal dual solutions of LP (3) if and only if (i) Ax∗= b, x∗= y∗; (ii) −AT z∗ x −z∗ y = c; (iii) y∗ i ≥0, z∗ y,i ≤0, i ∈[nb]; z∗ y,i = 0, i ∈[n]\[nb]; (iv) cT x∗+ bT z∗ x = 0. In Lemma 2, one interesting element is to utilize the strong duality condition (iv) to eliminate the complementary slackness in the standard KKT condition. Then, the set of optimal primal and dual solutions is described only by affine constraints, which further implies that the optimal solution set is an (m + 3n)−dimensional polyhedron. We use S∗to denote such a polyhedron. Lemma 3. (Hoffman bound [19, 20]) Consider a polyhedron set S = {x ∈Rd|Ex = t, Cx ≤d}. For any point x ∈Rd, we have ∥x −[x]S∥≤θS
Ex −t [Cx −d]+
, (13) where θS is the Hoffman constant that depends on the structure of polyhedron S. According to the result in Lemma 2, it seems that we can use the Hoffman bound to estimate the distance between the current iterates (xk, yk, zk) and the solution set S∗via the their primal and dual residual. However, to obtain the form of inequality (12), we need to bound such a residual in terms of ∥pk −pk+1∥. Indeed, we have these results. Lemma 4. (Estimation of residual) The sequence (xk+1, yk, zk) produced by Algorithm 1 satisfies A1xk+1 + A2yk −b = (pk+1 −pk)/ρ, c + AT 1 zk = AT 1 (pk −pk+1), cT xk+1 + bT zk x = (A1xk+1 −zk/ρ)T (pk −pk+1), yk i ≥0, zk y,i ≤0, i ∈[nb]; zk y,i = 0, i ∈[n]\[nb]. One observation from Lemma 4 is that Algorithm 1 automatically preserves the boundness and the complementary slackness of both primal and dual iterates. Instead, in the previous algorithm in [8], the complementary slackness is not preserved during the iteration. Combining the results in Lemma 2, Lemma 3 and Lemma 4, we are readily to estimate the constant γ. Lemma 5. (Estimation of linear rate) The sequence pk = zk −ρA2yk produced by Algorithm 1 satisfies ∥pk −[pk]G∗∥≤γ∥pk+1 −pk∥, where the rate γ is given by γ = (1 + ρ) Rz + 1 ρ + Rx∥A1∥+ ∥AT 1 ∥ θS∗. (14) Rx = supk ∥xk∥< +∞, Rz = supk ∥zk∥< +∞are the maximum radius of iterates xk and zk. 5 Then we can establish the global and linear convergence of Algorithm 1. Theorem 1. (Linear convergence of Algorithm 1) Denote zk as the primal iterates produced by Algorithm 1. To guarantee that there exists an optimal dual solution z∗such that ∥zk −z∗∥≤ϵ, it suffices to run Algorithm 1 for number of iterations K = 2γ2 log(2D0/ϵ) with the solving accuracy ϵk satisfying ϵk ≤ϵ2/8K2, where D0 = ∥p0 −[p0]G∗∥. The proof of Theorem 1 consists of two steps: first, we establish the global and linear convergence rate of Algorithm 1 when ϵk = 0, ∀k (exact subproblem solver); then we relax this condition and prove that when ϵk is less than a specified threshold, the algorithm still shares a convergence rate of the same order. The results of primal iterates xk and yk are similar. 5 Efficient Subproblem Solver In this section, we will show that, due to our specific splitting method, each subproblem in line 1 of Algorithm 1 can be either solved in closed-form expression or efficiently solved by the Accelerated Coordinate Descent Method. 5.1 Well-structured Constraint Matrix Let the gradient (8) vanish, then the primal iterates xk+1 can be exactly determined by xk+1 = ρ−1(I + AT A)−1dk, with dk = −AT 1 [zk + ρ(A2yk −b)] −c, (15) which requires inverting an n × n positive definite matrix I + AT A, or equivalently, inverting an m × m positive definite matrix I + AAT via the following Sherman–Morrison–Woodbury identity, (I + AT A)−1 = I −AT (I + AAT )−1A. (16) One basic fact is that we only need to invert such a matrix once and then use this cached factorization in subsequent iterations. Therefore, there are several cases for which the above factorization can be efficiently calculated: (i) Factorization has a closed-form expression. For example, in the LPbased MAP inference [5], the matrix I + AT A is block diagonal, and each block has been shown to possess a closed-form factorization. Another important application is that, in the basis pursuit problem, the encoding matrices such as DFT (discrete Fourier transform) and DWHT (discrete Walsh-Hadamard transform) matrices have orthonormal rows and satisfy AAT = I. Based on (15), each xk+1 = ρ−1(I −1 2AT A)dk and can be calculated in O(n log(n)) time by certain fast transforms. (ii) Factorization has a low-complexity: the dimension m (or n) is small, i.e., m = 104. Such a factorization can be calculated in O(m3) and the complexity of each iteration is only O(nnz(A) + m2). Detailed applications can be viewed in Appendix. Remark 1. In the traditional Augmented Lagrangian method, the resultant subproblem is a constrained and non-strongly convex QP (Hessian is not invertible), which does not allow the above close-form expression. Besides, in the ALCD [9], the coordinate descent (CD) step only picks one column in each iteration and cannot exploit the nice structure of matrix A. One idea is to modify the CD step in [9] to the proximal gradient descent. However, it will greatly increase the computation time due to the large number of inner gradient descent steps. 5.2 General Constraint Matrix However, in other applications, the constraint matrix A only exhibits the sparsity, which is difficult to invert. To resolve this issue, we resort to the current fastest accelerated coordinate descent method [21]. This method has an order improvement up to O(√n) of iteration complexity compared with previous accelerated coordinate descent methods [22]. However, the naive evaluation of partial derivative of function Fk(x) in ACDM takes O(nnz(A)) time; second, the time cost of full vector operation in each iteration of ACDM is O(n). We will show that these difficulties can be tackled by a carefully designed implementation technique1 and the main procedure is listed in Algorithm 2. Here the iterates st and matrix M in Algorithm 2 is defined as M = 1 −αv αv βu 1 −βu with αv βu = τ 1+ηρ ηρ 1+ηρ and si t = " ητ pi(1+ηρ) + 1−τ Li ∇iFk(ut)eT i η pi(1+ηρ)∇iFk(ut)eT i # , (17) 1This technique is motivated by [22]. 6 Algorithm 2 Efficiently Subproblem Solver Initialize u0, v0, u0 = Au0, v0 = Av0, matrix M, parameter τ, η, S by (17) and distribution p = [. . . , p 1 + ∥Ai∥2/S, . . . ] and let dk = AT 1 [zk + ρ(A2yk −b)] + c. repeat [ut, vt]T = Mt−1 · [u, v]T and [ut, vt]T = Mt−1 · [u, v]T . Sample i from [n] based on probability distribution p. ∇iFk(ut) = ρ(Ai)T ut + ρut,i + dk i , and calculate si t by (17). Mt = M · Mt−1. Update uT vT = uT vT −M−1 t si t, uT vT = uT vT −M−1 t si tAT , until Converge Output xk+1 = (uT −τvT )/(1 −τ). where η = 1 τS2 , τ = 2 1+√ 4S2/ρ+1, S = Pn i=1 p ∥Ai∥2 + 1. See more details in Appendix. Lemma 6. (Inner complexity) In each iteration of Algorithm 2, if the current picked coordinate is i, the update can be finished in O(nnz(Ai)) time, moreover, to guarantee that Fk(xk+1) − minx Fk(x) ≤ϵk with probability 1 −p, it suffices to run Algorithm 2 for number of iterations Tk ≥O(1) · n X i=1 ∥Ai∥log Dk 0 ϵkp , Dk 0 = ∥F k(u0) −min x F k(x)∥. (18) The above iteration complexity is obtained by choosing parameter β = 0 in [21] and utilizing the Theorem 1 in [23] to transform the convergence in expectation to the form of probability. Theorem 2. (Overall complexity) Denote zk as the dual iterates produced by Algorithm 1. To guarantee that there exists an optimal solution z∗such that ∥zk −z∗∥≤ϵ with probability 1 −p, it suffices to run Algorithm 1 for k ≥2γ2 log(2D0/ϵ) outer iterations and solve each sub-problem (7) for the number of inner iterations T ≥O(1) · n X i=1 ∥Ai∥log ρ(Dk 0) 1 3 γ2 ϵ 2 3 p 1 3 log 2D0 ϵ ! . (19) The results for the primal iterates xk and yk are similar. In the existing ADMM [8], each primal and dual update only requires O(nnz(A)) time to solve. The complexity of this method is O(amµ2(amRx + dmRz)2(√mn + ∥A∥F )2nnz(A) log(1/ϵ)), where am = maxi ∥Ai∥, dm is the largest number of non-zero elements of each row of matrix A, and µ is the Hoffman constant depends on the optimal solution set of LP. Based on Theorem 2, an estimation of the worst-case complexity of Algorithm 1 is O(amθ2 S∗(Rx∥A∥+ Rz)2nnz(A) log2(1/ϵ)). Remark that our method has a weak dependence on the problem dimension compared with the existing ADMM. Since the Frobenius norm of a matrix satisfies ∥A∥2 ≤∥A∥F , our method is faster than the one in [8]. 6 Numerical Results In this section, we examine the performance of our algorithm and compare it with the state-of-art of algorithms developed for solving the LP. The first is the existing ADMM in [8]. The second is the ALCD method in [9], which is reported to be the current fastest first-order LP solver. They have shown that this algorithm can significantly speed up solving several important machine learning problems compared with the Simplex and IPM. We name our Algorithm 1 as LPADMM. In the experiments, we require that the accuracy of subproblem solver ϵk = 10−3 and the stopping criteria is that both primal residual ∥A1xk + A2yk −b∥∞and dual residual ∥AT 1 zk + c∥∞is less than 10−3. All the LP instances are generated from the basis pursuit, L1 SVM, SICE and NMF problems. The data source and statistics are included in the supplementary material. 7 0 5000 10000 15000 Number of iterations 10-3 10-2 10-1 100 101 102 Duality gap ADMM LPADMM ALCD 1000 2000 3000 4000 5000 Number of iterations 10-3 10-2 10-1 100 101 Duality gap ADMM LPADMM ALCD 0 1000 2000 3000 4000 5000 6000 7000 Number of iterations 10-3 10-2 10-1 100 101 Duality gap ADMM LPADMM ALCD 0 50 100 150 200 Number of iterations 10-3 10-2 10-1 100 101 102 Duality gap ADMM LPADMM ALCD Figure 1: The duality gap versus the number of iterations. From left to right figures are the BP, NMF, the L1 SVM and and the SICE problem. Table 1: Timing Results for BP, SICE, NMF and L1 SVM Problem (in sec. long means > 60 hours) Data m n nnz(A) LPADMM ALCD ADMM Time Iterations Time Iterations Time Iterations bp1 17408 16384 8421376 22 3155 864 14534 long long bp2 34816 32768 33619968 79 4657 2846 19036 long long bp3 69632 65536 134348800 217 6287 12862 24760 long long arcene 50095 30097 1151775 801 15198 1978 176060 21329 2035415 real-sim 176986 135072 7609186 955 4274 1906 18262 19697 249363 sonar 80912 68224 2756832 258 5446 659 13789 3828 151972 colon 217580 161040 8439626 395 216 455 1288 7423 83680 w2a 12048256 12146960 167299110 19630 2525 45388 8492 long long news20 2785205 2498375 53625267 7765 2205 9173 6174 long long We first compare the convergence rate of different algorithms in solving the above problems. We use the bp1 for BP problem, data set colon cancer for NMF problem, news20 for L1 SVM problem and real-sim for SICE problem. We set proximity parameter ρ = 1. We adopt the relative duality gap as the comparison metric, which is defined as ∥cT xk + bT zk x∥/∥cT x∗∥, where x∗is obtained approximately by running our method with a strict stopping condition. In our simulation, one iteration represents n coordinate descent steps for ALCD and LPADMM, and one dual updating step for ADMM. As can be seen in the Fig. 1, our new method exhibits a global and linear convergence rate and matches our theoretical performance bound. Besides, it converges faster than both the ALCD and existing ADMM method, especially in solving the BP and NMF problem. The sensitivity analysis of ρ is listed in Appendix. We next examine the performance of our algorithm from the perspective of time efficiency (both clocking time and number of iterations). We adopt the dynamic step size rule for ALCD to optimize its performance. Note that, exchanging the role of the primal and dual problem in (3), we can obtain the dual version of both ADMM and ACLD, which can be used to tackle the primal or dual sparse problem. We run both methods and adopt the minimum time. The stopping criterion requires that the primal and dual residual and the relative duality gap is less than 10−3. The data set bp1,bp2,bp3 is used for basis pursuit problem, news20 is used for L1 SVM problem; arcene, real-sim are used for SICE problem; sonar, colon and w2a are used for NMF problem. Among all experiments, we can observe that our proposed algorithm requires approximately 10% −40% iterations and 10% −85% time of the ALCD method, and become particularly advantageous for basis pursuit problem (50× speed up) or ill posed problems such as SICE and NMF problem. In particular, for the basis pursuit problem, the primal iterates xk is updated by closed-form expression (15), which can be calculated in O(n log(n)) time by Fast Walsh–Hadamard transform. 7 Conclusions In this paper, we proposed a new variable splitting method to solve the linear programming problem. The theoretical contribution of this work is that we prove that 2−block ADMM converges globally and linearly when applying to the linear program. The obtained convergence rate has a weak dependence of the problem dimension and is less than the best known result. Compared with the existing LP solvers, our algorithms not only provides a flexibility to exploit the specific structure of constraint matrix A, but also can be naturally combined with the existing acceleration techniques to significantly speed up solving the large-scale machine learning problems. The future work focuses on generalizing our theoretical framework and exhibiting the global linear convergence rate when applying ADMM to solve a convex quadratic program. Acknowledgments: This work is supported by ONR N00014-17-1-2417, N00014-15-1-2166, NSF CNS-1719371 and ARO W911NF-1-0277. 8 References [1] Ben Recht, Christopher Re, Joel Tropp, and Victor Bittorf. Factoring nonnegative matrices with linear programs. In Advances in Neural Information Processing Systems, pages 1214–1222, 2012. [2] Ji Zhu, Saharon Rosset, Trevor Hastie, and Robert Tibshirani. 1-norm support vector machines. In NIPS, volume 15, pages 49–56, 2003. [3] Ming Yuan. High dimensional inverse covariance matrix estimation via linear programming. Journal of Machine Learning Research, 11(Aug):2261–2286, 2010. [4] Junfeng Yang and Yin Zhang. Alternating direction algorithms for l1-problems in compressive sensing. SIAM journal on scientific computing, 33(1):250–278, 2011. [5] Ofer Meshi and Amir Globerson. An alternating direction method for dual map lp relaxation. Machine Learning and Knowledge Discovery in Databases, pages 470–483, 2011. [6] Vânia Lúcia Dos Santos Eleutério. Finding approximate solutions for large scale linear programs. PhD thesis, ETH Zurich, 2009. [7] Roland Glowinski and A Marroco. Sur l’approximation, par éléments finis d’ordre un, et la résolution, par pénalisation-dualité d’une classe de problèmes de dirichlet non linéaires. Revue française d’automatique, informatique, recherche opérationnelle. Analyse numérique, 9(2):41–76, 1975. [8] Jonathan Eckstein, Dimitri P Bertsekas, et al. An alternating direction method for linear programming. 1990. [9] Ian En-Hsu Yen, Kai Zhong, Cho-Jui Hsieh, Pradeep K Ravikumar, and Inderjit S Dhillon. Sparse linear programming via primal and dual augmented coordinate descent. In Advances in Neural Information Processing Systems, pages 2368–2376, 2015. [10] Jonathan Eckstein and Dimitri P Bertsekas. On the douglas-rachford splitting method and the proximal point algorithm for maximal monotone operators. Mathematical Programming, 55(1):293–318, 1992. [11] Wotao Yin. Analysis and generalizations of the linearized bregman method. SIAM Journal on Imaging Sciences, 3(4):856–877, 2010. [12] O Güler. Augmented lagrangian algorithms for linear programming. Journal of optimization theory and applications, 75(3):445–470, 1992. [13] Daniel Boley. Local linear convergence of the alternating direction method of multipliers on quadratic or linear programs. SIAM Journal on Optimization, 23(4):2183–2207, 2013. [14] Qihang Lin, Zhaosong Lu, and Lin Xiao. An accelerated proximal coordinate gradient method. In Advances in Neural Information Processing Systems, pages 3059–3067, 2014. [15] Robert Nishihara, Laurent Lessard, Benjamin Recht, Andrew Packard, and Michael I Jordan. A general analysis of the convergence of admm. In ICML, pages 343–352, 2015. [16] Tianyi Lin, Shiqian Ma, and Shuzhong Zhang. On the global linear convergence of the admm with multiblock variables. SIAM Journal on Optimization, 25(3):1478–1497, 2015. [17] Wei Deng and Wotao Yin. On the global and linear convergence of the generalized alternating direction method of multipliers. Journal of Scientific Computing, 66(3):889–916, 2016. [18] Mingyi Hong and Zhi-Quan Luo. On the linear convergence of the alternating direction method of multipliers. Mathematical Programming, pages 1–35, 2012. [19] Alan J Hoffman. On approximate solutions of systems of linear inequalities. Journal of Research of the National Bureau of Standards, 49(4), 1952. [20] Wu Li. Sharp lipschitz constants for basic optimal solutions and basic feasible solutions of linear programs. SIAM journal on control and optimization, 32(1):140–153, 1994. [21] Zeyuan Allen-Zhu, Zheng Qu, Peter Richtarik, and Yang Yuan. Even faster accelerated coordinate descent using non-uniform sampling. In Proceedings of The 33rd International Conference on Machine Learning, pages 1110–1119, 2016. [22] Yin Tat Lee and Aaron Sidford. Efficient accelerated coordinate descent methods and faster algorithms for solving linear systems. In Foundations of Computer Science (FOCS), 2013 IEEE 54th Annual Symposium on, pages 147–156. IEEE, 2013. [23] Peter Richtárik and Martin Takáˇc. Iteration complexity of randomized block-coordinate descent methods for minimizing a composite function. Mathematical Programming, 144(1-2):1–38, 2014. 9 | 2017 | 511 |
7,021 | Near Optimal Sketching of Low-Rank Tensor Regression Jarvis Haupt1 jdhaupt@umn.edu Xingguo Li1,2 lixx1661@umn.edu David P. Woodruff 3 dwoodruf@cs.cmu.edu ⇤ 1 University of Minnesota 2Georgia Tech 3Carnegie Mellon University Abstract We study the least squares regression problem min ⇥2Rp1⇥···⇥pD kA(⇥) −bk2 2, where ⇥is a low-rank tensor, defined as ⇥= PR r=1 ✓(r) 1 ◦· · · ◦✓(r) D , for vectors ✓(r) d 2 Rpd for all r 2 [R] and d 2 [D]. Here, ◦denotes the outer product of vectors, and A(⇥) is a linear function on ⇥. This problem is motivated by the fact that the number of parameters in ⇥is only R · PD d=1 pd, which is significantly smaller than the QD d=1 pd number of parameters in ordinary least squares regression. We consider the above CP decomposition model of tensors ⇥, as well as the Tucker decomposition. For both models we show how to apply data dimensionality reduction techniques based on sparse random projections Φ 2 Rm⇥n, with m ⌧n, to reduce the problem to a much smaller problem min⇥kΦA(⇥)−Φbk2 2, for which kΦA(⇥)−Φbk2 2 = (1±")kA(⇥)−bk2 2 holds simultaneously for all ⇥. We obtain a significantly smaller dimension and sparsity in the randomized linear mapping Φ than is possible for ordinary least squares regression. Finally, we give a number of numerical simulations supporting our theory. 1 Introduction For a sequence of D-way design tensors Ai 2 Rp1⇥···⇥pD, i 2 [n] , {1, . . . , n}, suppose we observe noisy linear measurements of an unknown D-way tensor ⇥2 Rp1⇥···⇥pD, given by b = Ai(⇥) + z, b, z 2 Rn, (1) where A(·) : Rp1⇥···⇥pD ! Rn is a linear function with Ai(⇥) = hAi, ⇥i = vec(Ai)>vec(⇥) for all i 2 [n], vec(X) is the vectorization of a tensor X, and z = [z1, . . . , zn]> corresponds to the observation noise. Given the design tensors {Ai}n i=1 and noisy observations b = [b1, . . . , bn]>, a natural approach for estimating the parameter ⇥is to use the Ordinary Least Square (OLS) estimation for the tensor regression problem, i.e., to solve min ⇥2Rp1⇥···⇥pD kA(⇥) −bk2 2. (2) Tensor regression has been widely studied in the literature. Applications include computer vision [8, 19, 34], data mining [5], multi-model ensembles [32], neuroimaging analysis [15, 36], multitask learning [21, 31], and multivariate spatial-temporal data analysis [1, 11]. In these applications, modeling the unknown parameters as a tensor is what is needed, as it allows for learning data that has multi-directional relations, such as in climate prediction [33], inherent structure learning with multi-dimensional indices [21], and hand movement trajectory decoding [34]. ⇤The authors are listed in alphabetical order. Correspondence to: Xingguo Li <lixx1661@umn.edu>. The authors acknowledge support from University of Minnesota Startup Funding and Doctoral Dissertation Fellowship from University of Minnesota. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Due to the high dimensionality of tensor data, structured learning based on low-rank tensor decompositions, such as CANDECOMP/PARAFAC (CP) decomposition and Tucker decomposition models [13, 24], have been proposed in order to obtain tractable tensor regression problems. As discussed more below, requiring the unknown tensor to be low-rank significantly reduces the number of unknown parameters. We consider low-rank tensor regression problems based on the CP decomposition and Tucker decomposition models. For simplicity, we first focus on the CP model, and later extend our analysis to the Tucker model. Suppose that ⇥admits a rank-R CP decomposition, that is, ⇥= R X r=1 ✓(r) 1 ◦· · · ◦✓(r) D , (3) where ✓(r) d 2 Rpd for all r 2 [R], d 2 [D], and ◦is the outer product of vectors. For convenience, we reparameterize the set of low-rank tensors by its matrix slabs/factors: SD,R , n [[⇥1, . . . , ⇥D]] | ⇥d = [✓(1) d , . . . , ✓(R) d ] 2 Rpd⇥R, for all d 2 [D] o . Then we can rewrite model (1) in a compact form b = A(⇥D ⊙· · · ⊙⇥1)1R + z, (4) where A = [vec(A1), · · · , vec(An)]> 2 Rn⇥QD d=1 pd is the matricization of all design tensors, 1R = [1, . . . , 1] 2 RR is a vector of all 1s, ⌦is the Kronecker product, and ⊙is the Khatri-Rao product. In addition, the OLS estimation for tensor regression (2) can be rewritten as the following nonconvex problem in terms of low-rank tensor parameters [[⇥1, . . . , ⇥D]], min #2S⊙D,R kA# −bk2 2, where (5) S⊙D,R , n (⇥D ⊙· · · ⊙⇥1)1R 2 R QD d=1 pd && [[⇥1, . . . , ⇥D]] 2 SD,R o . The number of parameters for a general tensor ⇥2 Rp1⇥···⇥pD is QD d=1 pd, which may be prohibitive for estimation even for small values of {pd}D d=1. The benefit of the low-rank tensor model (3) is that it dramatically reduces the degrees of freedom of the unknown tensor from QD d=1 pd to R · PD d=1 pd, where we are typically interested in the case when R pd for all d 2 [D]. For example, a typical MRI image has size 2563 ⇡1.7 ⇥107, while using the low-rank model with R = 10, we reduce the number of unknown parameters to 256 ⇥3 ⇥10 ⇡8 ⇥103 ⌧107. This significantly increases the applicability of the tensor regression model in practice. Nevertheless, solving the tensor regression problem (5) is still expensive in terms of both computation and memory requirements, for typical settings, when n ≫R·PD d=1 pd. In particular, the per iteration complexity is at least linear in n for popular algorithms such as block alternating minimization and block gradient descent [27, 28]. In addition, in order to store A, it takes n · QD d=1 pd words of memory. Both of these aspects are undesirable when n is large. This motivates us to consider data dimensionality reduction techniques, also called sketching, for the tensor regression problem. Instead of solving (5), we consider the simple Sketched Ordinary Least Square (SOLS) problem: min #2S⊙D,R kΦA# −Φbk2 2, (6) where Φ 2 Rm⇥n is a random matrix (specified in Section 2). Importantly, Φ will satisfy two properties, namely (1) m ⌧n so that we significantly reduce the size of the problem, and (2) Φ will be very sparse so that Φv can be computed very quickly for any v 2 Rn. Naïvely applying existing analyses of sketching techniques for least squares regression requires m = ⌦(QD d=1 pd), which is prohibitive (for a survey, see, e.g., [30]). In this paper, our main contribution is to show that it is possible to use a sparse Johnson-Lindenstrauss transformation as our sketching matrix for the CP model of low-rank tensor regression, with constant column sparsity and dimension m = R · PD d=1 pd, up to poly-logarithmic (polylog) factors. Note that our dimension matches the number of intrinsic parameters in the CP model. Further, we stress that we do not assume anything about the tensor, such as orthogonal matrix slabs/factor, or incoherence; our dimensionality 2 reduction works for arbitrary tensors. We show, with the above sparsity and dimenion, that with constant probability, simultaneously for all # 2 S⊙,D,R, kΦA# −Φbk2 2 = (1 ± ")kA# −bk2 2. This implies that any solution to (6) has the same cost as in (5) up to a (1 + ")-factor. In particular, by solving (6) we obtain a (1 + ")-approximation to (5). We note that our dimensionality reduction technique is not tied to any particular algorithm; that is, if one runs any algorithm or heuristic on the reduced (sketched) problem, obtaining an ↵-approximate solution #, then # is also a (1+✏)↵-approximate solution to the original problem. Our result is the first non-trivial dimensionality reduction for this problem, i.e., dimensionality reduction better than QD d=1 pd, which is trivial by ignoring the low-rank structure of the tensor, and which achieves a relative error (1 + ")-approximation. While it may be possible to apply dimensionality reduction methods directly in alternating minimization methods for solving tensor regression, unlike our method, such methods do not have provable guarantees and it is not clear how errors propagate across iterations. However, since we reduce the original problem to a smaller version of itself with a provable guarantee, one could further apply dimensionality reduction techniques as heuristics for alternating minimization on the smaller problem. Our proof is based on a careful characterization of Talagrand’s functional for the parameter space of low-rank tensors, providing a highly nontrivial analysis for what we consider to be a simple and practical algorithm. One of the main difficulties is dealing with general, non-orthogonal tensors, for which we are able to provide a careful re-parameterization in order to bound the so-called Finsler metric; interestingly, for non-orthogonal tensors it is always possible to partially orthogonalize them, and this partial orthogonalization turns out to suffice for our analysis. We give precise details below. We also provide numerical evaluations on both synthetic and real data to demonstrate the empirical performance of our algorithm. Notation. For scalars x, y 2 R, let x = (1 ± ")y if x 2 [(1 −")y, (1 + ")y], x . (&)y if x (≥)c1y, poly(x) = xc2 and polylog(x, y) = (log x)c3 · (log y)c4 for some universal constants c1, c2, c3, c4 > 0. We also use standard asymptotic notations O(·) and ⌦(·). Given a matrix A 2 Rm⇥n, we denote kAk2 as the spectral norm, span(A) ✓Rm as the subspace spanned by the columns of A, σmax(A) and σmin(A) as the largest and smallest singular values of A, respectively, and A = σmax(A)/σmin(A) as the condition number. We use nnz(A) to denote the number of nonzero entries of A, and PA as the projection operator onto span(A). Given two matrices A = [a1, . . . , an] 2 Rm⇥n and B = [b1, . . . , bq] 2 Rp⇥q, A⌦B = [a1⌦B, . . . , an⌦B] 2 Rmp⇥nq denotes the Kronecker product, and A⊙B = [a1⌦b1, . . . , an⌦bn] 2 Rmp⇥n denotes the Khatri-Rao product with n = q. We let Bn ⇢Rn be the unit sphere in Rn, i.e., Bn = {x 2 Rn | kxk2 = 1}, P(·) be the probability of an event, and E(·) denotes the expectation of a random variable. Without further specification, we denote Q = QD d=1 and P = PD d=1. We further summarize the dimension parameters for ease of reference. Given a tensor ⇥, D is the number of ways, pd is the dimension of the d-th way for d 2 [D]. R is the rank of ⇥for all ways under the CP decomposition, and Rd is the rank of the d-th way under the Tucker decomposition for d 2 [D]. n is the number of observations for tensor regression. m is the sketching dimension and s is the sparsity of each column in a sparse Johnson-Lindenstrauss transformation. 2 Background We start with a few important definitions. Definition 1 (Oblivious Subspace Embedding). Suppose ⇧is a distribution on m⇥n matrices where m is a function of parameters n, d, and ". Further, suppose that with probability at least 1 −δ, for any fixed n ⇥d matrix A, a matrix Φ drawn from ⇧has the property that kΦAxk2 2 = (1 ± ")kAxk2 2 simultaneously for all x 2 X ✓Rd. Then ⇧is an (", δ) oblivious subspace embedding (OSE) of X. An OSE Φ preserves the norm of vectors in a certain set X after linear transformation by A. This is widely studied as a key property for sketching based analyses (see [30] and the references therein). We want to show an analogous property when X is parameterized by low-rank tensors. Definition 2 (Leverage Scores). Given A 2 Rn⇥d, let Z 2 Rn⇥d have orthonormal columns that span the column space of A. Then `2 i (A) = ke> i Zk2 2 is the i-th leverage score of A. 3 Leverage scores play an important role in randomized matrix algorithms [7, 16, 17]. Calculating the leverage scores naïvely by orthogonalizing A requires O(nd2) time. It is shown in [3] that the leverage scores of A can be approximated individually up to a constant multiplicative factor in O(nnz(A) log n + poly(d)) time using sparse subspace embeddings. In our analysis, there will be a very mild dependence on the maximum leverage score of A and the sparsity for the sketching matrix Φ. Note that we do not need to calculate the leverage scores. Definition 3 (Talagrand’s Functional). Given a (semi-)metric ⇢on Rn and a bounded set S ⇢Rn, Talagrand’s γ2-functional is γ2(S, ⇢) = inf {Sr}1 r=0 sup x2S 1 X r=0 2r/2 · ⇢(x, Sr), (7) where ⇢(x, Sr) is a distance from x to Sr and the infimum is taken over all collections {Sr}1 r=0 such that S0 ⇢S1 ⇢. . . ⇢S with |S0| = 1 and |Sr| 22r. A closely related notion of the γ2-functional is the Gausssian mean width: G(S) = Eg supx2Shg, xi, where g ⇠Nn(0, In). For any bounded S ⇢Rn, G(S) and γ2(S, k · k2) differ multiplicatively by at most a universal constant in Euclidean space [25]. Finding a tight upper bound on the γ2-functional for the parameter space of low-rank tensors is key to our analysis. Definition 4 (Finsler Metric). Let E, E0 ⇢Rn be p-dimensional subspaces. The Finsler metric of E and E0 is ⇢Fin(E, E0) = kPE −PE0k2, where PE is the projection onto the subspace E. The Finsler metric is the semi-metric used in the γ2-functional in our analysis. Note that ⇢Fin(E, E0) 1 always holds for any E and E0 [23]. Definition 5 (Sparse Johnson-Lindenstrauss Transforms). Let σij be independent Rademacher random variables, i.e., P(σij = 1) = P(σij = −1) = 1/2, and let δij : ⌦δ ! {0, 1} be random variables, independent of the σij, with the following properties: (i) δij are negatively correlated for fixed j, i.e., for all 1 i1 < . . . < ik m, we have E ⇣Qk t=1 δit,j ⌘ Qk t=1 E (δit,j) = ) s m *k; (ii) There are s = Pm i=1 δij nonzero δij for a fixed j; and (iii) The vectors (δij)m i=1 are independent across j 2 [n]. Then Φ 2 Rm⇥n is a sparse Johnson-Lindenstrauss transform (SJLT) matrix if Φij = 1 psσijδij. The SJLT has several benefits [4, 12, 30]. First, the computation of Φx takes only O(nnz(x)) time when s is a constant. Second, storing Φ takes only sn memory instead of mn, which is significant when s ⌧m. This can often further be reduced by drawing the entries of Φ from a limited independent family of random variables. We will use an SJLT matrix as the sketching matrix Φ in our analysis and our goal will be to show sufficient conditions on the sketching dimension m and per-column sparsity s such that the analogue of the OSE property holds for low-rank tensor regression. Specifically, we provide sufficient conditions for the SJLT matrix Φ 2 Rm⇥n to preserve the cost of all solutions for tensor regression, i.e., bounds on m and s for which E Φ sup x2T &&kΦxk2 2 −1 && < " 10, (8) where " is a given precision and T is a normalized space parameterized as the union of certain subspaces of A, which will be further discussed in the following sections. Note that by linearity, it is sufficient to consider x with kxk2 = 1 in the above, which explains the form of (8). Moreover, by Markov’s inequality, (8) implies that simultaneously for all # = vec(⇥) 2 S⊙D,R, where ⇥admits a low-rank tensor decomposition, with probability at least 9/10, we have kΦA# −Φbk2 2 = (1 ± ")kA# −bk2 2, (9) which allows us to minimize the much smaller sketched problem to obtain parameters # which, when plugged into the original objective function, provide a multiplicative (1 + ")-approximation. 4 3 Dimensionality Reduction for CP Decomposition We start with the following notation. Given a tensor ⇥= PR r=1 ✓(r) 1 ◦· · · ◦✓(r) D , where ✓(r) d 2 Rpd for all d 2 [D] and r 2 [R], we fix all but ✓(r) 1 for r 2 [R], and denote A n ✓(r) \1 o = h A✓(1) \1 , . . . , A✓(R) \1 i 2 Rn⇥Rp1, where A✓(i) \1 = PpD jD=1 · · · Pp2 j2=1 A(jD,...,j2)✓(i) D,jD · · · ✓(i) 2,j2, ✓(i) d,jd is the jd-th entry of ✓(i) d , and A(jD,...,j2) 2 Rn⇥p1 is a column submatrix of A indexed by jD 2 [pD], . . . , j2 2 [p2], i.e., A = ⇥ A(1,...,1), . . . , A(pD,...,p2)⇤ 2 Rn⇥Q pd. The above parameterization allows us to view tensor regression as preserving the norms of vectors in an infinite union of subspaces, described in more detail in the full version of our paper [10]. Then we rewrite the observation model (4) as b = A · R X r=1 ✓(r) D ⌦· · · ⌦✓(r) 1 + z = R X r=1 A✓(r) \1 · ✓(r) 1 + z = A n ✓(r) \1 o · h ✓(1)> 1 . . . ✓(R)> 1 i> + z. 3.1 Main Result The parameter space for the tensor regression problem (1) is a subspace of R Q pd, i.e., S⊙D,R ⇢ R Q pd. Therefore, a naïve application of sketching requires m & Q pd/"2 in order for (9) to hold [18]. The following theorem provides sufficient conditions to guarantee (1 + ")-approximation of the objective for low-rank tensor regression under the CP decomposition model. Theorem 1. Suppose R maxd pd/2 and maxi2[n] `2 i (A) 1/(R PD d=2 pd)2. Let T = [ r2[R],d2[D] n A#−A' kA#−A'k2 &&&# = PR r=1 ✓(r) D ⌦· · ·⌦✓(r) 1 , ' = PR r=1 φ(r) D ⌦· · ·⌦φ(r) 1 , ✓(r) d , φ(r) d 2 Bpd o and let Φ 2 Rm⇥n be an SJLT matrix with column sparsity s. Then with probability at least 9/10, (9) holds if m and s satisfy, respectively, m & R X pd log ⇣ DRA X pd ⌘ polylog(m, n)/"2 and s & log2 ⇣X pd ⌘ polylog(m, n)/"2. From Theorem 1, we have that for an SJLT matrix Φ 2 Rm⇥n with m = ⌦(R P pd) and s = ⌦(1), up to logarithmic factors, we can guarantee (1 + ")-approximation of the objective. The sketching complexity of m is nearly optimal compared with the number of free parameters for the CP decomposition model, i.e., R(P pd −D + 1), up to logarithmic factors. Here wo do not make any orthogonality assumption on the tensor factors ✓(r) d , and show in our analysis that the general tensor space T can be paramterized in terms of an orthogonal one if R maxd pd/2 holds. The condition R maxd pd/2 is not restrictive in our setting, as we are interested in low-rank tensors with R pd. Note that we achieve a (1 + ")-approximation in objective function value for arbitrary tensors; if one wants to achieve closeness of the underlying parameters one needs to impose further assumptions on the model, such as the form of the noise distribution or structural properties of A [20, 36]. Our maximum leverage score assumption is very mild and much weaker than the standard incoherence assumptions used for example, in matrix completion, which allow for uniform sampling based approaches. For example, our assumption states that the maximum leverage score is at most 1/(R PD d=2 pd)2. In the typical overconstrained case, n ≫Q pd, and in order for uniform sampling to provide a subspace embedding, one needs the maximum leverage score to be at most R P pd/n (see, e.g., Section 2.4 of [30]), which is much less than 1/(R PD d=2 pd)2 when n is large, and so uniform sampling fails in our setting. Moreover, it is also possible to apply a standard idea to flatten the leverage scores of a deterministic design A based on the Subsampled Randomized Hadamard Transformation (SRHT) using the Walsh-Hadamard matrix [9, 26]. Note that applying the SRHT to an n ⇥d matrix A only takes O(nd log n) time, which if A is dense, is the same amount of time one needs just to read A (up to a log n factor). Further details are deferred to the full version of our paper [10]. 5 3.2 Proof Sketch of Our Analysis for a Basic Case We provide a sketch of our analysis for the case when R = 1 and D = 2, i.e., ⇥is rank 1 matrix. The analysis for more general cases is more involved, but with similar intuition. Details of the analyses are deferred to the the full version of our paper, where we start with a proof for the most basic cases and gradually build up the proof for the most general case. Let Av = Pp2 i=1 A(i)vi, where A = [A(1), . . . , A(p2)] 2 Rn⇥p2p1 with A(i) 2 Rn⇥p1 for all i 2 [p2], V = S f W {span[Av1, Av2]}, and f W = {v1, v2 2 Bp2 with hv1, v2i = 0}. We start with an illustration that the set T can be reparameterized to the following set with respect to tensors with orthogonal factors: T = [ E2V {x 2 E | kxk2 = 1} . Suppose hv1, v2i 6= 0. Let v2 = ↵v1 + βz for some ↵, β 2 R and a unit vector z 2 Rp2, where hv1, zi = 0. Then we have Ax −Ay kAx −Ayk2 = Av1u1 −Av2u2 kAv1u1 −Av2u2k2 = Av1(u1 −↵u2) −Az(βu2) kAv1(u1 −↵u2) −Az(βu2)k2 , which is equivalent to hv1, v2i = 0 by reparameterizing z as v2. Based on known dimensionality reduction results [2, 6] (see further details in the full version [10]), the main quantities needed for bounding properties of Φ are the quantities ⇢V, γ2 2(V, ⇢Fin), N(V, ⇢Fin, "0), and R "0 0 (log N(V, ⇢Fin, t))1/2 dt, where N(V, ⇢Fin, t) is the covering number of V under the Finsler metric using balls of radius t and pV = supv1,v22Bp2,hv1,v2i=0 dim {span (Av1,v2)} 2p1. Bounding these quantities for the space of low-rank tensors is new and is our main technical contribution. These will be addressed separately as follows. Part 1: Bound pV. Let Av1,v2 = [Av1, Av2]. It is straightforward that pV 2p1. Part 2: Bound γ2 2(V, ⇢Fin). By the definition of γ2-functional in (7) for the Finsler metric, we have γ2(V, ⇢Fin) = inf {Vk}1 k=0 sup Av1,v22V 1 X k=0 2k/2 · ⇢Fin(Av1,v2, Vk), where Vk is an "k-net of V, i,e., for any Av1,v2 2 V there exist v1, v2 2 Bp2 with hv1, v2i = 0, kv1 −v1k2 ⌘k, and kv2 −v2k2 ⌘k, such that Av1,v2 2 Vk and ⇢Fin(Av1,v2, Av1,v2) "k. From Lemma 6, we have ⇢Fin(Av1,v2, Vk) 2A⌘k for kv1 −v1k2 ⌘k and kv2 −v2k2 ⌘k. On the other hand, we have that ⇢Fin(Av1,v2, Vk) 1 always holds. Therefore, we have ⇢Fin(Av1,v2, Vk) min{2A⌘k, 1}. Let k0 be the smallest integer such that 2A⌘k0 1. Then γ2(V, ⇢Fin) 1 X k=0 2k/2⇢Fin(Av1,v2, Vk) k0 X k=0 2k/2 + 1 X k=k0+1 2k/2⇢Fin(Av1,v2, Vk). (10) Starting from ⌘0 = 1 and |V0| = 1, for k ≥1, we have ⌘k < 1 and |Vk| (3/⌘k)p2 [29]. Also from the γ2-functional, we require |Vk| 22k (3/⌘k)p2, which implies k0 X k=0 2k/2 = 2k0/2 p 2 −1 . r p2 log 1 ⌘k0 . (11) For k > k0, we choose ⌘k+1 = ⌘2 k such that (3/⌘k+1)p2 22k+1. Then we have |Vk+1| 22k+1. By choosing k0 to be the smallest integer such that (3/⌘k0+1)p2 22k0+1 holds, we have 1 X k=k0+1 2k/2 · ⇢Fin(Av1,v2, Vk) = 2k0/2 · 1 X t=1 2t/2 · ✓1 2 ◆2t 2k0/2 . r p2 log 1 ⌘k0 . (12) 6 Combining (10) – (12), and choosing a small enough "0 such that "0 2A⌘k0, we have γ2 2(V, ⇢Fin) . p2 log A "0 . Part 3: Bound N(V, ⇢Fin, "0) and R "0 0 [log N(V, ⇢Fin, t)]1/2dt. From our choice from Part 2, "0 2 (0, 1) is a constant. Then it is straightforward that N(V, ⇢Fin, "0) ⇣ 3 "0 ⌘2p2 . From direct integration, this implies Z "0 0 [log N(V, ⇢Fin, t)]1/2dt."0 r p2 log 1 "0 . Combining the results in Parts 1, 2, and 3, we have that (9) holds if m and s satisfy, respectively m & ⇣ p2 log A "0 + p1 + p2 log 1 "0 ⌘ · polylog(m, n) "2 and s & ⇣ log2 1 "0 + "2 0(p1 + p2) log 1 "0 ⌘ · polylog(m, n) "2 . We finish the proof by taking "0 = 1/(p1 + p2). 4 Dimensionality Reduction for Tucker Decomposition We start with a formal model description. Suppose ⇥admits the following Tucker decomposition: ⇥= R1 X r1=1 · · · RD X rD=1 G(r1, . . . , rD) · ✓(r1) 1 ◦· · · ◦✓(rD) D , (13) where G 2 RR1⇥···⇥RD is the core tensor and ✓(rd) d 2 Rpd for all rd 2 [Rd] and d 2 [D]. Let A✓ (r1,...,rD) \1 = PpD jD=1· · ·Pp2 j2=1 A(jD,...,j2)✓(rD) D,jD · · · ✓(r2) 2,j2 and A ⇢ ✓{rd} \1 & = PR2 r2=1· · ·PRD rD=1A✓ (r1,...,rD) \1 G(1, r2,. . ., rD),. . ., PR2 r2=1· · ·PRD rD=1A✓ (r1,...,rD) \1 G(R1, r2,. . ., rD) 8 . Then the observation model (4) can be written as b = A PR1 r1=1· · ·PRD rD=1 G(r1, . . . , rD)✓(rD) D ⌦· · ·⌦✓(r1) 1 + z = A ⇢ ✓{rd} \1 & h ✓(1)> 1 . . . ✓(R1)> 1 i> + z. The following theorem provides sufficient conditions to guarantee (1 + ")-approximation of the objective function for low-rank tensor regression under the Tucker decomposition model. Theorem 2. Suppose nnz(G) maxd pd/2 and maxi2[n] `2 i (A) 1/(PD d=2 Rdpd + nnz(G))2. Let T = [ r2[R],d2[D] n A# −A' kA# −A'k2 &&&# = R1 X r1=1 · · · RD X rD=1 G1(r1, . . . , rD) · ✓(rD) D ⌦· · · ⌦✓(r1) 1 , ' = R1 X r1=1 · · · RD X rD=1 G2(r1, . . . , rD) · φ(rD) D ⌦· · · ⌦φ(r1) 1 , ✓(rd) d , φ(rd) d 2 Bpd o and Φ 2 Rm⇥n be an SJLT matrix with column sparsity s. Then with probability at least 9/10, (9) holds if m and s satisfy m & C1 · log ⇣ C1DAR1 p nnz(G) ⌘ · polylog(m, n)/"2 and s & log2 C1 · polylog(m, n)/"2, where C1 = P Rdpd + nnz(G). From Theorem 2, we have that using an SJLT matrix Φ with m = ⌦(P Rdpd + nnz(G)) and s = ⌦(1), up to logarithmic factors, we can guarantee (1+")-approximation of the objective function. 7 The sketching complexity of m is near optimal compared with the number of free parameters for the Tucker decomposition model, i.e., P Rdpd + nnz(G) −P R2 d, up to logarithmic factors. Note that nnz(G) Q Rd, and thus the condition that nnz(G) maxd pd/2 can be more restrictive than R maxd pd/2 in the CP model when nnz(G) > R. This is due to the fact that the Tucker model is more “expressive” than the CP model for a tensor of the same dimensions. For example, if R1 = · · · = RD = R, then the CP model (3) can be viewed as special case of the Tucker model (13) by setting all off-diagonal entries of the core tensor G to be 0. Moreover, the conditions and results in Theorem 2 are essentially of the same order as those in Theorem 1 when nnz(G) = R, which indicates the tightness of our analysis. 5 Experiments We study the performance of sketching for tensor regression through numerical experiments over both synthetic and real data sets. For solving the OLS problem for tensor regression (2), we use a cyclic block-coordinate minimization algorithm based on a tensor toolbox [35]. Specifically, in a cyclic manner for all d 2 [D], we fix all but one ⇥d of [[⇥1, . . . , ⇥D]] 2 SD,R and minimize the resulting quadratic loss function (2) with respect to ⇥i, until the decrease of the objective is smaller than a predefined threshold ⌧. For SOLS, we use the same algorithm after multiplying A and b with an SJLT matrix Φ. All results are run on a supercomputer due to the large scale of the data. Note that our result is not tied to any specific algorithm and we can use any algorithm that solves OLS for low-rank tensors for solving SOLS for low-rank tensors. For synthetic data, we generate the low-rank tensor ⇥as follows. For each d 2 [D], we generate R random columns with N(0, 1) entries to form non-orthogonal tensor factors ⇥d = [✓(1) d , . . . , ✓(R) d ] of [[⇥1, . . . , ⇥D]] 2 SD,R independently. We also generate R real scalars ↵1, . . . , ↵R uniformly and independently from [1, 10]. Then ⇥is formed by ⇥= PR r=1 ↵r✓(r) 1 ◦· · · ◦✓(r) D . The n tensor designs {Ai}n i=1 are generated independently with i.i.d. N(0, 1) entries for 10% of the entries chosen uniformly at random, and the remaining entries are set to zero. We also generate the noise z to have i.i.d. N(0, σ2 z) entries, and the generation of the SJLT matrix Φ follows Definition 5. For both OLS and SOLS, we use random initializations for ⇥, i.e., ⇥d has i.i.d. N(0, 1) entries for all d 2 [D]. We compare OLS and SOLS for low-rank tensor regression under both the noiseless and noisy scenarios. For the noiseless case, i.e., σz = 0, we choose R = 3, p1 = p2 = p3 = 100, m = 5 ⇥R(p1 + p2 + p3) = 4500, and s = 200. Different values of n = 104, 105, and 106 are chosen to compare both statistical and computational performances of OLS and SOLS. For the noisy case, the settings of all parameters are identical to those in the noiseless case, except that σz = 1. We provide a plot of the scaled objective versus the number of iterations for some random trials in Figure 1. The scaled objective is set to be kA#t SOLS −bk2 2/n for SOLS and kA#t OLS −bk2 2/n for OLS, where 5 10 15 20 25 10-10 10-5 100 105 SOLS n1 OLS n1 SOLS n2 SOLS n3 OLS n2 OLS n3 Iteration Objective (a) σz = 0 5 10 15 20 100 102 104 106 SOLS n1 OLS n1 SOLS n2 SOLS n3 OLS n2 OLS n3 Iteration Objective (b) σz = 1 Figure 1: Comparison of SOLS and OLS on synthetic data. The vertical axis corresponds to the scaled objectives kA#t SOLS −bk2 2/n for SOLS and kA#t OLS −bk2 2/n for OLS, where #t is the update in the t-th iteration. The horizontal axis corresponds to the number of iterations (passes of block-coordinate minimization for all blocks). For both the noiseless case σz = 0 and noisy case σz = 1, we set n1 = 104, n2 = 105, and n3 = 106 respectively. 8 #t SOLS and #t OLS are the updates in the t-th iterations of SOLS and OLS respectively. Note the we are using kΦA#SOLS −Φbk2 2/n as the objective function for solving the SOLS problem, but looking at the original objective kA#SOLS −bk2 2/n for the solution of SOLS is ultimately what we are interested in. However, we have that the gap between kΦA#SOLS −Φbk2 2/n and kA#SOLS −bk2 2/n is very small in our results (< 1%). The number of iterations is the number of passes of block-coordinate minimization for all blocks. We can see that OLS and SOLS require approximately the same number of iterations for comparable decrease in objective function value. However, since the SOLS instance has a much smaller size, its per iteration computational cost is much lower than that of OLS. We further provide numerical results on the running time (CPU execution time) and the optimal scaled objectives in Table 1. Using the same stopping criterion, we see that SOLS and OLS achieve comparable objectives (within < 5% differences), matching our theory. In terms of the running time, SOLS is significantly faster than OLS, especially when n is large compared to the sketching dimen sion m. For example, when n = 106, SOLS is more than 200 times faster than OLS while achieving a comparable objective function value with OLS. This matches with our theoretical results on the computational cost of OLS versus SOLS. Note that here we suppose that the rank is known for our simulation, which can be restrictive in practice. We observe that if we choose a moderately larger rank than the true rank of the underlying model, then the results are similar to what we discussed above. Smaller values of the rank result in a much deteriorated statistical performance for both OLS and SOLS. We also examine sketching of low-rank tensor regression on a real dataset of MRI images [22]. The dataset consists of 56 frames of a human brain, each of which is of dimension 128 ⇥128 pixels, i.e., p1 = p2 = 128 and p3 = 56. The generation of design tensors {Ai}n i=1 and linear measurements b follows the same settings as for the synthetic data, with σz = 0. We choose three values of R = 3, 5, 10, and set m = 5 ⇥R(p1 + p2 + p3). The sample size is set to n = 104 for all settings of R. Analogous to the synthetic data, we provide numerical results for SOLS and OLS on the running time (CPU execution time) and the optimal scaled objectives. The results are provided in Table 2. Again, we have that SOLS is much faster than OLS and they achieve comparable optimal objectives, under all settings of ranks. Table 1: Comparison of SOLS and OLS on CPU execution time (in seconds) and the optimal scaled objective over different choices of sample sizes and noise levels on synthetic data. The results are averaged over 50 random trials, with both the mean values and standard deviations (in parentheses) provided. Note that we terminate the program after the running time exceeds 3 ⇥104 seconds. Variance of Noise σz = 0 σz = 1 Sample Size n = 104 n = 105 n = 106 n = 104 n = 105 n = 106 Time OLS 175.37 3683.9 > 3 ⇥104 168.62 2707.3 > 3 ⇥104 (65.784) (1496.7) (NA) (24.570) (897.14) (NA) SOLS 120.34 128.09 132.93 121.71 124.84 128.65 (35.711) (37.293) (38.649) (34.214) (33.774) (32.863) Objective OLS < 10−10 < 10−10 < 10−10 0.9153 0.9341 0.9425 (< 10−10) (< 10−10) (< 10−10) (0.0256) (0.0213) (0.0172) SOLS < 10−10 < 10−10 < 10−10 0.9376 0.9817 0.9901 (< 10−10) (< 10−10) (< 10−10) (0.0261) (0.0242) (0.0256) Table 2: Comparison of SOLS and OLS on CPU execution time (in seconds) and the optimal scaled objective over different choices of ranks on the MRI data. The results are averaged over 10 random trials, with both the mean values and standard deviations (in parentheses) provided. OLS SOLS Rank R = 3 R = 5 R = 10 R = 3 R = 5 R = 10 Time 2824.4 8137.2 26851 196.31 364.09 761.73 (768.08) (1616.3) (8320.1) (68.180) (145.79) (356.76) Objective 16.003 11.164 6.8679 17.047 11.992 7.3968 (0.1378) (0.1152) (0.0471) (0.1561) (0.1538) (0.0975) 9 References [1] Mohammad Taha Bahadori, Qi Rose Yu, and Yan Liu. Fast multivariate spatio-temporal analysis via low-rank tensor learning. In Advances in Neural Information Processing Systems, pages 3491–3499, 2014. [2] Jean Bourgain, Sjoerd Dirksen, and Jelani Nelson. Toward a unified theory of sparse dimensionality reduction in Euclidean space. Geometric and Functional Analysis, 25(4):1009–1088, 2015. [3] Kenneth L Clarkson and David P Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the 45th Annual ACM Symposium on Theory of Computing, pages 81–90. ACM, 2013. [4] Anirban Dasgupta, Ravi Kumar, and Tamás Sarlós. A sparse Johnson–Lindenstrauss transform. In Proceedings of the 42nd Annual ACM Symposium on Theory of Computing, pages 341–350. ACM, 2010. [5] Lieven De Lathauwer, Bart De Moor, and Joos Vandewalle. A multilinear singular value decomposition. SIAM Journal on Matrix Analysis and Applications, 21(4):1253–1278, 2000. [6] Sjoerd Dirksen. Dimensionality reduction with subgaussian matrices: A unified theory. Foundations of Computational Mathematics, pages 1–30, 2015. [7] Petros Drineas, Malik Magdon-Ismail, Michael W Mahoney, and David P Woodruff. Fast approximation of matrix coherence and statistical leverage. Journal of Machine Learning Research, 13(Dec):3475–3506, 2012. [8] Weiwei Guo, Irene Kotsia, and Ioannis Patras. Tensor learning for regression. IEEE Transactions on Image Processing, 21(2):816–827, 2012. [9] Nathan Halko, Per-Gunnar Martinsson, and Joel A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review, 53(2):217–288, 2011. [10] Jarvis Haupt, Xingguo Li, and David P Woodruff. Near optimal sketching of low-rank tensor regression. arXiv preprint arXiv:1709.07093, 2017. [11] Peter D Hoff. Multilinear tensor regression for longitudinal relational data. The Annals of Applied Statistics, 9(3):1169, 2015. [12] Daniel M. Kane and Jelani Nelson. Sparser Johnson-Lindenstrauss transforms. Journal of the ACM, 61(1):4:1–4:23, 2014. [13] Tamara G Kolda and Brett W Bader. Tensor decompositions and applications. SIAM Review, 51(3):455–500, 2009. [14] Bingxiang Li, Wen Li, and Lubin Cui. New bounds for perturbation of the orthogonal projection. Calcolo, 50(1):69–78, 2013. [15] Xiaoshan Li, Hua Zhou, and Lexin Li. Tucker tensor regression and neuroimaging analysis. arXiv preprint arXiv:1304.5637, 2013. [16] Michael W Mahoney. Randomized algorithms for matrices and data. Foundations and Trends R⃝ in Machine Learning, 3(2):123–224, 2011. [17] Michael W Mahoney and Petros Drineas. CUR matrix decompositions for improved data analysis. Proceedings of the National Academy of Sciences, 106(3):697–702, 2009. [18] Jelani Nelson and Huy L Nguyen. Lower bounds for oblivious subspace embeddings. In International Colloquium on Automata, Languages, and Programming, pages 883–894. Springer, 2014. 10 [19] Sung Won Park and Marios Savvides. Individual kernel tensor-subspaces for robust face recognition: A computationally efficient tensor framework without requiring mode factorization. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 37(5):1156–1166, 2007. [20] Garvesh Raskutti and Ming Yuan. Convex regularization for high-dimensional tensor regression. arXiv preprint arXiv:1512.01215, 2015. [21] Bernardino Romera-Paredes, Hane Aung, Nadia Bianchi-Berthouze, and Massimiliano Pontil. Multilinear multitask learning. In Proceedings of the 30th International Conference on Machine Learning, pages 1444–1452, 2013. [22] Antoine Rosset, Luca Spadola, and Osman Ratib. Osirix: an open-source software for navigating in multidimensional DICOM images. Journal of Digital Imaging, 17(3):205–216, 2004. [23] Zhongmin Shen. Lectures on Finsler geometry, volume 2001. World Scientific, 2001. [24] Nicholas Sidiropoulos, Lieven De Lathauwer, Xiao Fu, Kejun Huang, Evangelos Papalexakis, and Christos Faloutsos. Tensor decomposition for signal processing and machine learning. IEEE Transactions on Signal Processing, 2017. [25] Michel Talagrand. The generic chaining: upper and lower bounds of stochastic processes. Springer Science & Business Media, 2006. [26] Joel A Tropp. Improved analysis of the subsampled randomized hadamard transform. Advances in Adaptive Data Analysis, 3(01n02):115–126, 2011. [27] Paul Tseng. Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications, 109(3):475–494, 2001. [28] Paul Tseng and Sangwoon Yun. A coordinate gradient descent method for nonsmooth separable minimization. Mathematical Programming, 117(1-2):387–423, 2009. [29] Roman Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [30] David P Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends R⃝ in Theoretical Computer Science, 10(1–2):1–157, 2014. [31] Yongxin Yang and Timothy Hospedales. Deep multi-task representation learning: A tensor factorisation approach. arXiv preprint arXiv:1605.06391, 2016. [32] Rose Yu, Dehua Cheng, and Yan Liu. Accelerated online low-rank tensor learning for multivariate spatio-temporal streams. In International Conference on Machine Learning, 2015. [33] Rose Yu and Yan Liu. Learning from multiway data: Simple and efficient tensor regression. In International Conference on Machine Learning, pages 373–381, 2016. [34] Qibin Zhao, Cesar F Caiafa, Danilo P Mandic, Zenas C Chao, Yasuo Nagasaka, Naotaka Fujii, Liqing Zhang, and Andrzej Cichocki. Higher order partial least squares (hopls): a generalized multilinear regression method. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(7):1660–1673, 2013. [35] Hua Zhou. Matlab TensorReg toolbox. http://hua-zhou.github.io/softwares/ tensorreg/, 2013. [36] Hua Zhou, Lexin Li, and Hongtu Zhu. Tensor regression with applications in neuroimaging data analysis. Journal of the American Statistical Association, 108(502):540–552, 2013. 11 | 2017 | 512 |
7,022 | Batch Renormalization: Towards Reducing Minibatch Dependence in Batch-Normalized Models Sergey Ioffe Google sioffe@google.com Abstract Batch Normalization is quite effective at accelerating and improving the training of deep models. However, its effectiveness diminishes when the training minibatches are small, or do not consist of independent samples. We hypothesize that this is due to the dependence of model layer inputs on all the examples in the minibatch, and different activations being produced between training and inference. We propose Batch Renormalization, a simple and effective extension to ensure that the training and inference models generate the same outputs that depend on individual examples rather than the entire minibatch. Models trained with Batch Renormalization perform substantially better than batchnorm when training with small or non-i.i.d. minibatches. At the same time, Batch Renormalization retains the benefits of batchnorm such as insensitivity to initialization and training efficiency. 1 Introduction Batch Normalization (“batchnorm” [6]) has recently become a part of the standard toolkit for training deep networks. By normalizing activations, batch normalization helps stabilize the distributions of internal activations as the model trains. Batch normalization also makes it possible to use significantly higher learning rates, and reduces the sensitivity to initialization. These effects help accelerate the training, sometimes dramatically so. Batchnorm has been successfully used to enable state-ofthe-art architectures such as residual networks [5]. Batchnorm works on minibatches in stochastic gradient training, and uses the mean and variance of the minibatch to normalize the activations. Specifically, consider a particular node in the deep network, producing a scalar value for each input example. Given a minibatch B of m examples, consider the values of this node, x1 . . . xm. Then batchnorm takes the form: bxi ←xi −µB σB where µB is the sample mean of x1 . . . xm, and σ2 B is the sample variance (in practice, a small ϵ is added to it for numerical stability). It is clear that the normalized activations corresponding to an input example will depend on the other examples in the minibatch. This is undesirable during inference, and therefore the mean and variance computed over all training data can be used instead. In practice, the model usually maintains moving averages of minibatch means and variances, and during inference uses those in place of the minibatch statistics. While it appears to make sense to replace the minibatch statistics with whole-data ones during inference, this changes the activations in the network. In particular, this means that the upper layers (whose inputs are normalized using the minibatch) are trained on representations different from those computed in inference (when the inputs are normalized using the population statistics). When the minibatch size is large and its elements are i.i.d. samples from the training distribution, this 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. difference is small, and can in fact aid generalization. However, minibatch-wise normalization may have significant drawbacks: For small minibatches, the estimates of the mean and variance become less accurate. These inaccuracies are compounded with depth, and reduce the quality of resulting models. Moreover, as each example is used to compute the variance used in its own normalization, the normalization operation is less well approximated by an affine transform, which is what is used in inference. Non-i.i.d. minibatches can have a detrimental effect on models with batchnorm. For example, in a metric learning scenario (e.g. [4]), it is common to bias the minibatch sampling to include sets of examples that are known to be related. For instance, for a minibatch of size 32, we may randomly select 16 labels, then choose 2 examples for each of those labels. Without batchnorm, the loss computed for the minibatch decouples over the examples, and the intra-batch dependence introduced by our sampling mechanism may, at worst, increase the variance of the minibatch gradient. With batchnorm, however, the examples interact at every layer, which may cause the model to overfit to the specific distribution of minibatches and suffer when used on individual examples. The dependence of the batch-normalized activations on the entire minibatch makes batchnorm powerful, but it is also the source of its drawbacks. Several approaches have been proposed to alleviate this. However, unlike batchnorm which can be easily applied to an existing model, these methods may require careful analysis of nonlinearities [1] and may change the class of functions representable by the model [2]. Weight normalization [11] presents an alternative, but does not offer guarantees about the activations and gradients when the model contains arbitrary nonlinearities, or contains layers without such normalization. Furthermore, weight normalization has been shown to benefit from mean-only batch normalization, which, like batchnorm, results in different outputs during training and inference. Another alternative [10] is to use a separate and fixed minibatch to compute the normalization parameters, but this makes the training more expensive, and does not guarantee that the activations outside the fixed minibatch are normalized. In this paper we propose Batch Renormalization, a new extension to batchnorm. Our method ensures that the activations computed in the forward pass of the training step depend only on a single example and are identical to the activations computed in inference. This significantly improves the training on non-i.i.d. or small minibatches, compared to batchnorm, without incurring extra cost. 2 Prior Work: Batch Normalization We are interested in stochastic gradient optimization of deep networks. The task is to minimize the loss, which decomposes over training examples: Θ = arg min Θ 1 N N X i=1 ℓi(Θ) where ℓi is the loss incurred on the ith training example, and Θ is the vector of model weights. At each training step, a minibatch of m examples is used to compute the gradient 1 m ∂ℓi(Θ) ∂Θ which the optimizer uses to adjust Θ. Consider a particular node x in a deep network. We observe that x depends on all the model parameters that are used for its computation, and when those change, the distribution of x also changes. Since x itself affects the loss through all the layers above it, this change in distribution complicates the training of the layers above. This has been referred to as internal covariate shift. Batch Normalization [6] addresses it by considering the values of x in a minibatch B = {x1...m}. It then 2 normalizes them as follows: µB ←1 m m X i=1 xi σB ← v u u t 1 m m X i=1 (xi −µB)2 + ϵ bxi ←xi −µB σB yi ←γbxi + β ≡BN(xi) Here γ and β are trainable parameters (learned using the same procedure, such as stochastic gradient descent, as all the other model weights), and ϵ is a small constant. Crucially, the computation of the sample mean µB and sample standard deviation σB are part of the model architecture, are themselves functions of the model parameters, and as such participate in backpropagation. The backpropagation formulas for batchnorm are easy to derive by chain rule and are given in [6]. When applying batchnorm to a layer of activations x, the normalization takes place independently for each dimension (or, in the convolutional case, for each channel or feature map). When x is itself a result of applying a linear transform W to the previous layer, batchnorm makes the model invariant to the scale of W (ignoring the small ϵ). This invariance makes it possible to not be picky about weight initialization, and to use larger learning rates. Besides the reduction of internal covariate shift, an intuition for another effect of batchnorm can be obtained by considering the gradients with respect to different layers. Consider the normalized layer bx, whose elements all have zero mean and unit variance. For a thought experiment, let us assume that the dimensions of bx are independent. Further, let us approximate the loss ℓ(bx) as its first-order Taylor expansion: ℓ≈ℓ0 + gTbx, where g = ∂ℓ ∂bx. It then follows that Var[ℓ] ≈∥g∥2 in which the left-hand side does not depend on the layer we picked. This means that the norm of the gradient w.r.t. a normalized layer ∥∂ℓ ∂bx∥is approximately the same for different normalized layers. Therefore the gradients, as they flow through the network, do not explode nor vanish, thus facilitating the training. While the assumptions of independence and linearity do not hold in practice, the gradient flow is in fact significantly improved in batch-normalized models. During inference, the standard practice is to normalize the activations using the moving averages µ, σ2 instead of minibatch mean µB and variance σ2 B: yinference = x −µ σ · γ + β which depends only on a single input example rather than requiring a whole minibatch. It is natural to ask whether we could simply use the moving averages µ, σ to perform the normalization during training, since this would remove the dependence of the normalized activations on the other example in the minibatch. This, however, has been observed to lead to the model blowing up. As argued in [6], such use of moving averages would cause the gradient optimization and the normalization to counteract each other. For example, the gradient step may increase a bias or scale the convolutional weights, in spite of the fact that the normalization would cancel the effect of these changes on the loss. This would result in unbounded growth of model parameters without actually improving the loss. It is thus crucial to use the minibatch moments, and to backpropagate through them. 3 Batch Renormalization With batchnorm, the activities in the network differ between training and inference, since the normalization is done differently between the two models. Here, we aim to rectify this, while retaining the benefits of batchnorm. Let us observe that if we have a minibatch and normalize a particular node x using either the minibatch statistics or their moving averages, then the results of these two normalizations are related by an affine transform. Specifically, let µ be an estimate of the mean of x, and σ be an estimate of its 3 Input: Values of x over a training mini-batch B = {x1...m}; parameters γ, β; current moving mean µ and standard deviation σ; moving average update rate α; maximum allowed correction rmax, dmax. Output: {yi = BatchRenorm(xi)}; updated µ, σ. µB ←1 m m X i=1 xi σB ← v u u tϵ + 1 m m X i=1 (xi −µB)2 r ←stop gradient clip[1/rmax,rmax] σB σ d ←stop gradient clip[−dmax,dmax] µB −µ σ bxi ←xi −µB σB · r + d yi ←γ bxi + β µ := µ + α(µB −µ) // Update moving averages σ := σ + α(σB −σ) Inference: y ←γ · x −µ σ + β Algorithm 1: Training (top) and inference (bottom) with Batch Renormalization, applied to activation x over a mini-batch. During backpropagation, standard chain rule is used. The values marked with stop gradient are treated as constant for a given training step, and the gradient is not propagated through them. standard deviation, computed perhaps as a moving average over the last several minibatches. Then, we have: xi −µ σ = xi −µB σB · r + d, where r = σB σ , d = µB −µ σ If σ = E[σB] and µ = E[µB], then E[r] = 1 and E[d] = 0 (the expectations are w.r.t. a minibatch B). Batch Normalization, in fact, simply sets r = 1, d = 0. We propose to retain r and d, but treat them as constants for the purposes of gradient computation. In other words, we augment a network, which contains batch normalization layers, with a perdimension affine transformation applied to the normalized activations. We treat the parameters r and d of this affine transform as fixed, even though they were computed from the minibatch itself. It is important to note that this transform is identity in expectation, as long as σ = E[σB] and µ = E[µB]. We refer to batch normalization augmented with this affine transform as Batch Renormalization: the fixed (for the given minibatch) r and d correct for the fact that the minibatch statistics differ from the population ones. This allows the above layers to observe the “correct” activations – namely, the ones that would be generated by the inference model. We emphasize that, unlike the trainable parameters γ, β of batchnorm, the corrections r and d are not trained by gradient descent, and vary across minibatches since they depend on the statistics of the current minibatch. In practice, it is beneficial to train the model for a certain number of iterations with batchnorm alone, without the correction, then ramp up the amount of allowed correction. We do this by imposing bounds on r and d, which initially constrain them to 1 and 0, respectively, and then are gradually relaxed. 4 Algorithm 1 presents Batch Renormalization. Unlike batchnorm, where the moving averages are computed during training but used only for inference, Batch Renorm does use µ and σ during training to perform the correction. We use a fairly high rate of update α for these averages, to ensure that they benefit from averaging multiple batches but do not become stale relative to the model parameters. We explicitly update the exponentially-decayed moving averages µ and σ, and optimize the rest of the model using gradient optimization, with the gradients calculated via backpropagation: ∂ℓ ∂bxi = ∂ℓ ∂yi · γ ∂ℓ ∂σB = m X i=1 ∂ℓ ∂bxi · (xi −µB) · −r σ2 B ∂ℓ ∂µB = m X i=1 ∂ℓ ∂bxi · −r σB ∂ℓ ∂xi = ∂ℓ ∂bxi · r σB + ∂ℓ ∂σB · xi −µB mσB + ∂ℓ ∂µB · 1 m ∂ℓ ∂γ = m X i=1 ∂ℓ ∂yi · bxi ∂ℓ ∂β = m X i=1 ∂ℓ ∂yi These gradient equations reveal another interpretation of Batch Renormalization. Because the loss ℓis unaffected when all xi are shifted or scaled by the same amount, the functions ℓ({xi + t}) and ℓ({xi · (1 + t)}) are constant in t, and computing their derivatives at t = 0 gives Pm i=1 ∂ℓ ∂xi = 0 and Pm i=1 xi ∂ℓ ∂xi = 0. Therefore, if we consider the m-dimensional vector ∂ℓ ∂xi (with one element per example in the minibatch), and further consider two vectors p0 = (1, . . . , 1) and p1 = (x1, . . . , xm), then ∂ℓ ∂xi lies in the null-space of p0 and p1. In fact, it is easy to see from the Batch Renorm backprop formulas that to compute the gradient ∂ℓ ∂xi from ∂ℓ ∂bxi , we need to first scale the latter by r/σB, then project it onto the null-space of p0 and p1. For r = σB σ , this is equivalent to the backprop for the transformation x−µ σ , but combined with the null-space projection. In other words, Batch Renormalization allows us to normalize using moving averages µ, σ in training, and makes it work using the extra projection step in backprop. Batch Renormalization shares many of the beneficial properties of batchnorm, such as insensitivity to initialization and ability to train efficiently with large learning rates. Unlike batchnorm, our method ensures that that all layers are trained on internal representations that will be actually used during inference. 4 Results To evaluate Batch Renormalization, we applied it to the problem of image classification. Our baseline model is Inception v3 [13], trained on 1000 classes from ImageNet training set [9], and evaluated on the ImageNet validation data. In the baseline model, batchnorm was used after convolution and before the ReLU [8]. To apply Batch Renorm, we simply swapped it into the model in place of batchnorm. Both methods normalize each feature map over examples as well as over spatial locations. We fix the scale γ = 1, since it could be propagated through the ReLU and absorbed into the next layer. The training used 50 synchronized workers [3]. Each worker processed a minibatch of 32 examples per training step. The gradients computed for all 50 minibatches were aggregated and then used by the RMSProp optimizer [14]. As is common practice, the inference model used exponentiallydecayed moving averages of all model parameters, including the µ and σ computed by both batchnorm and Batch Renorm. For Batch Renorm, we used rmax = 1, dmax = 0 (i.e. simply batchnorm) for the first 5000 training steps, after which these were gradually relaxed to reach rmax = 3 at 40k steps, and dmax = 5 at 25k 5 (a) (b) Figure 1: (a) Validation top-1 accuracy of Inception-v3 model with batchnorm and its Batch Renorm version, trained on 50 synchronized workers, each processing minibatches of size 32. The Batch Renorm model achieves a marginally higher validation accuracy. (b) Validation accuracy for models trained with either batchnorm or Batch Renorm, where normalization is performed for sets of 4 examples (but with the gradients aggregated over all 50 × 32 examples processed by the 50 workers). Batch Renorm allows the model to train faster and achieve a higher accuracy, although normalizing sets of 32 examples performs better. steps. These final values resulted in clipping a small fraction of rs, and none of ds. However, at the beginning of training, when the learning rate was larger, it proved important to increase rmax slowly: otherwise, occasional large gradients were observed to suddenly and severely increase the loss. To account for the fact that the means and variances change as the model trains, we used relatively fast updates to the moving statistics µ and σ, with α = 0.01. Because of this and keeping rmax = 1 for a relatively large number of steps, we did not need to apply initialization bias correction [7]. All the hyperparameters other than those related to normalization were fixed between the models and across experiments. 4.1 Baseline As a baseline, we trained the batchnorm model using the minibatch size of 32. More specifically, batchnorm was applied to each of the 50 minibatches; each example was normalized using 32 examples, but the resulting gradients were aggregated over 50 minibatches. This model achieved the top-1 validation accuracy of 78.3% after 130k training steps. To verify that Batch Renorm does not diminish performance on such minibatches, we also trained the model with Batch Renorm, see Figure 1(a). The test accuracy of this model closely tracked the baseline, achieving a slightly higher test accuracy (78.5%) after the same number of steps. 4.2 Small minibatches To investigate the effectiveness of Batch Renorm when training on small minibatches, we reduced the number of examples used for normalization to 4. Each minibatch of size 32 was thus broken into “microbatches” each having 4 examples; each microbatch was normalized independently, but the loss for each minibatch was computed as before. In other words, the gradient was still aggregated over 1600 examples per step, but the normalization involved groups of 4 examples rather than 32 as in the baseline. Figure 1(b) shows the results. The validation accuracy of the batchnorm model is significantly lower than the baseline that normalized over minibatches of size 32, and training is slow, achieving 74.2% at 210k steps. We obtain a substantial improvement much faster (76.5% at 130k steps) by replacing batchnorm with Batch Renorm, However, the resulting test accuracy is still below what we get when applying either batchnorm or Batch Renorm to size 32 minibatches. Although Batch Renorm improves the training with small minibatches, it does not eliminate the benefit of having larger ones. 6 Figure 2: Validation accuracy when training on non-i.i.d. minibatches, obtained by sampling 2 images for each of 16 (out of total 1000) random labels. This distribution bias results not only in a low test accuracy, but also low accuracy on the training set, with an eventual drop. This indicates overfitting to the particular minibatch distribution, which is confirmed by the improvement when the test minibatches also contain 2 images per label, and batchnorm uses minibatch statistics µB, σB during inference. It improves further if batchnorm is applied separately to 2 halves of a training minibatch, making each of them more i.i.d. Finally, by using Batch Renorm, we are able to just train and evaluate normally, and achieve the same validation accuracy as we get for i.i.d. minibatches in Fig. 1(a). 4.3 Non-i.i.d. minibatches When examples in a minibatch are not sampled independently, batchnorm can perform rather poorly. However, sampling with dependencies may be necessary for tasks such as for metric learning [4, 12]. We may want to ensure that images with the same label have more similar representations than otherwise, and to learn this we require that a reasonable number of same-label image pairs can be found within the same minibatch. In this experiment (Figure 2), we selected each minibatch of size 32 by randomly sampling 16 labels (out of the total 1000) with replacement, then randomly selecting 2 images for each of those labels. When training with batchnorm, the test accuracy is much lower than for i.i.d. minibatches, achieving only 67%. Surprisingly, even the training accuracy is much lower (72.8%) than the test accuracy in the i.i.d. case, and in fact exhibits a drop that is consistent with overfitting. We suspect that this is in fact what happens: the model learns to predict labels for images that come in a set, where each image has a counterpart with the same label. This does not directly translate to classifying images individually, thus producing a drop in the accuracy computed on the training data. To verify this, we also evaluated the model in the “training mode”, i.e. using minibatch statistics µB, σB instead of moving averages µ, σ, where each test minibatch had size 50 and was obtained using the same procedure as the training minibatches – 25 labels, with 2 images per label. As expected, this does much better, achieving 76.5%, though still below the baseline accuracy. Of course, this evaluation scenario is usually infeasible, as we want the image representation to be a deterministic function of that image alone. We can improve the accuracy for this problem by splitting each minibatch into two halves of size 16 each, so that for every pair of images belonging to the same class, one image is assigned to the first half-minibatch, and the other to the second. Each half is then more i.i.d., and this achieves a much better test accuracy (77.4% at 140k steps), but still below the baseline. This method is only 7 applicable when the number of examples per label is small (since this determines the number of microbatches that a minibatch needs to be split into). With Batch Renorm, we simply trained the model with minibatch size of 32. The model achieved the same test accuracy (78.5% at 120k steps) as the equivalent model on i.i.d. minibatches, vs. 67% obtained with batchnorm. By replacing batchnorm with Batch Renorm, we ensured that the inference model can effectively classify individual images. This has completely eliminated the effect of overfitting the model to image sets with a biased label distribution. 5 Conclusions We have demonstrated that Batch Normalization, while effective, is not well suited to small or non-i.i.d. training minibatches. We hypothesized that these drawbacks are due to the fact that the activations in the model, which are in turn used by other layers as inputs, are computed differently during training than during inference. We address this with Batch Renormalization, which replaces batchnorm and ensures that the outputs computed by the model are dependent only on the individual examples and not the entire minibatch, during both training and inference. Batch Renormalization extends batchnorm with a per-dimension correction to ensure that the activations match between the training and inference networks. This correction is identity in expectation; its parameters are computed from the minibatch but are treated as constant by the optimizer. Unlike batchnorm, where the means and variances used during inference do not need to be computed until the training has completed, Batch Renormalization benefits from having these statistics directly participate in the training. Batch Renormalization is as easy to implement as batchnorm itself, runs at the same speed during both training and inference, and significantly improves training on small or non-i.i.d. minibatches. Our method does have extra hyperparameters: the update rate α for the moving averages, and the schedules for correction limits dmax, rmax. We have observed, however, that stable training can be achieved even without this clipping, by using a saturating nonlinearity such as min(ReLU(·), 6), and simply turning on renormalization after an initial warm-up using batchnorm alone. A more extensive investigation of the effect of these parameters is a part of future work. Batch Renormalization offers a promise of improving the performance of any model that would normally use batchnorm. This includes Residual Networks [5]. Another application is Generative Adversarial Networks [10], where the non-determinism introduced by batchnorm has been found to be an issue, and Batch Renorm may provide a solution. Finally, Batch Renormalization may benefit applications where applying batch normalization has been difficult – such as recurrent networks. There, batchnorm would require each timestep to be normalized independently, but Batch Renormalization may make it possible to use the same running averages to normalize all timesteps, and then update those averages using all timesteps. This remains one of the areas that warrants further exploration. References [1] Devansh Arpit, Yingbo Zhou, Bhargava U Kota, and Venu Govindaraju. Normalization propagation: A parametric technique for removing internal covariate shift in deep networks. arXiv preprint arXiv:1603.01431, 2016. [2] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. [3] Jianmin Chen, Rajat Monga, Samy Bengio, and Rafal Jozefowicz. Revisiting distributed synchronous sgd. arXiv preprint arXiv:1604.00981, 2016. [4] Jacob Goldberger, Sam Roweis, Geoff Hinton, and Ruslan Salakhutdinov. Neighbourhood components analysis. In Advances in Neural Information Processing Systems 17, 2004. [5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. 8 [6] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 448–456, 2015. [7] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [8] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, pages 807–814. Omnipress, 2010. [9] 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 FeiFei. ImageNet Large Scale Visual Recognition Challenge, 2014. [10] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pages 2226–2234, 2016. [11] Tim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pages 901–901, 2016. [12] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. CoRR, abs/1503.03832, 2015. [13] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2818–2826, 2016. [14] T. Tieleman and G. Hinton. Lecture 6.5 - rmsprop. COURSERA: Neural Networks for Machine Learning, 2012. 9 | 2017 | 513 |
7,023 | Position-based Multiple-play Bandit Problem with Unknown Position Bias Junpei Komiyama The University of Tokyo junpei@komiyama.info Junya Honda The University of Tokyo / RIKEN honda@stat.t.u-tokyo.ac.jp Akiko Takeda The Institute of Statistical Mathematics / RIKEN atakeda@ism.ac.jp Abstract Motivated by online advertising, we study a multiple-play multi-armed bandit problem with position bias that involves several slots and the latter slots yield fewer rewards. We characterize the hardness of the problem by deriving an asymptotic regret bound. We propose the Permutation Minimum Empirical Divergence (PMED) algorithm and derive its asymptotically optimal regret bound. Because of the uncertainty of the position bias, the optimal algorithm for such a problem requires non-convex optimizations that are different from usual partial monitoring and semi-bandit problems. We propose a cutting-plane method and related bi-convex relaxation for these optimizations by using auxiliary variables. 1 Introduction One of the most important industries related to computer science is online advertising. In the United States, 72.5 billion dollars was spent on online advertising [19] in 2016. Most online advertising is viewed on web pages during Internet browsing. A web-site owner has a set of possible advertisements (ads): some of them are more attractive than others, and the owner would like to maximize the attention of visiting users. One of the observable metrics of the user attention is the number of clicks on the ads. By considering each ad (resp. click) to be an arm (resp. reward) and assuming only one slot is available for advertisements, the maximization of clicks boils down to the so-called multi-armed bandit problem, where the arm with the largest expected reward is sought. When two or more ad slots are available on the web page, the problem boils down to a multiple-play multi-armed bandit problem. Several variants of the multiple play bandit problem and its extension called semi-bandit problem have been considered in the literature. Arguably, the simplest is one assuming that an ad receives equal clicks regardless of its position [2, 24]. In practice, ads receive less clicks when they are placed at bottom slots; this is so-called position bias. A well-known model that explains position bias is the cascade model [23], which assumes that the users’ attention goes from top to bottom until they lose interest. While this model explains position bias in early positions well [10], a drawback to the cascade model when it is applied to the bandit setting [26] is that the order of the allocated ads does not affect the reward, which is not very natural. To resolve this issue, Combes et al. [8] introduced a weight for each slot that corresponds to the reward obtained by clicking on that slot. However, no principled way of defining the weight has been described. An extension of the cascade model, called the dependent click model (DCM) [14], addresses these issues by admitting multiple clicks of a user. In DCM, each slot is associated with a probability that 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the user loses interest in the following ads if the current ad is interesting. While the algorithm in Katariya et al. [21] cleverly exploits this structure, it still depends on the cascade assumption, and as a result it discards some of the feedback on the latter slots, which reduces the efficiency of the algorithm. Moreover, the reward in DCM does not exactly correspond to the number of clicks. Lagrée et al. [27] has studied a position-based model (PBM) where each slot has its own discount factor on the number of clicks. PBM takes the order of the shown ads into consideration. However, the algorithms proposed in Lagrée et al. [27] are “half-online” in the sense that the value of an ad is adaptively estimated, whereas the values of the slots are estimated by using an off-line dataset. Such an off-line computation is not very handy since the click trend varies depending on the day and hour [1]. Moreover, a significant portion of online advertisements is sold via ad networks [34]. As a result, advertisers have to deal with thousands of web pages to show their ads. Taking these aspects into consideration, pre-computing position bias for each web page limits the use of these algorithms. To address this issue, we provide a way to allocate advertisements in a fully online manner by considering “PBM under Uncertainty of position bias” (PBMU). One of the challenges when the uncertainty of a position-based factor is taken into account is that, when some ad appears to have a small click through rate (CTR, the probability of click) in some slot, we cannot directly attribute it to either the arm or the slot. In this sense, several combinations of ads and slots need to be examined to estimate both the ad-based and position-based model parameters. Note also that an extension of the non-stochastic bandit approach [3] to multiple-play, such as the ordered slate model [20], is general enough to deal with PBMU. However, algorithms based on the non-stochastic approach do not always perform well in compensation for its generality. Another extension of multi-armed bandit problems is the partial monitoring problem [31, 4] that admits the case in which the parameters are not directly observable. However, partial monitoring is inefficient at solving bandit problems: a K-armed bandit problem with binary rewards corresponds to a partial monitoring problem with 2K possible outcomes. As a result, the existing partial monitoring algorithms, such as the ones in [33, 25], are not practical even for a moderate number of arms. Besides, the computation of a feasible solution in PBMU requires non-convex optimizations as we will see in Section 5. This implies that PBMU cannot directly be converted into the partial monitoring where such a non-convex optimization does not appear [25]. The contributions of this paper are as follows: First, we study the position-based bandit model with uncertainty (PBMU) and derive a regret lower bound (Section 3). Second, we propose an algorithm that efficiently utilizes feedback (Section 4). One of the challenges in the multiple-play bandit problem is that there is an exponentially large number of possible sequences of arms to allocate at each round. We reduce the number of candidates by using a bipartite matching algorithm that runs in a polynomial time to the number of arms. The performance of the proposed algorithm is verified in Section 6. Third, a slightly modified version of the algorithm is analyzed in Section 7. This algorithm has a regret upper bound that matches the lower bound. Finally, we reveal that the lower bound is related to a linear optimization problem with an infinite number of constraints. Such an optimization problem appears in many versions of the bandit problem [9, 25, 12]. We propose an optimization method that reduces it to a finite-constraint linear optimization based on a version of the cutting-plane method (Section 5). Related non-convex optimizations that are characteristic to PBMU are solved by using bi-convex relaxation. Such optimization methods are of interest in solving even larger classes of bandit problems. 2 Problem Setup Let K be the number of arms (ads) and L < K be the number of slots. Each arm i ∈[K] = {1, 2, . . . , K} is associated with a distinct parameter θ∗ i ∈(0, 1), and each slot l ∈[L] is associated with a parameter κ∗ l ∈(0, 1]. At each round t = 1, 2, . . . , T, the system selects L arms I(t) = (I1(t), . . . , IL(t)) and receives a corresponding binary reward (click or non-click) for each slot. The reward of the l-th slot is i.i.d. drawn from a Bernoulli distribution Ber(µ∗ Il(t),l), where µ∗ i,l = θ∗ i κ∗ l . Although the slot-based parameters are unknown, it is natural that the ads receives more clicks when they are placed at early slots: we assume κ∗ 1 > κ∗ 2 > · · · > κ∗ L > 0 and this order is known. Note that this model is redundant: a model with µ∗ i,l = θ∗ i κ∗ l is equivalent to the model with µ∗ i,l = (θ∗ i /κ1)(κ∗ l κ1). Therefore, without loss of generality, we assume κ1 = 1. In summary, 2 this model involves K + L parameters {θ∗ i }i∈[K] and {κ∗ l }l∈[L], and the number of rounds T. The parameters except for κ1 = 1 are unknown to the system. Let Ni,l(t) be the number of rounds before t-th round at which arm i was in slot l (i.e., Ni,l(t) = Pt−1 t′=1 1{i = Il(t′)}, where 1{E} is 1 if E holds and 0 otherwise). In the following, we abbreviate arm i in slot l to “pair (i, l)”. Let ˆµi,l(t) be the empirical mean of the reward of pair (i, l) after the first t −1 rounds. The goal of the system is to maximize the cumulative rewards by using some sophisticated algorithm. Without loss of generality, we can assume θ∗ 1 > θ∗ 2 > θ∗ 3 > · · · > θ∗ K. The algorithm cannot exploit this ordering. In this model, allocating arms of larger expected rewards on earlier slots increases expected rewards: As a result, allocating arms 1, 2, . . . , L to slots 1, 2, . . . , L maximizes the expected reward. A quantity called (pseudo) regret is defined as: Reg(T) = PT t=1 P i∈[L](θ∗ i −θ∗ Ii(t))κ∗ i , and E[Reg(T)] is used for evaluating the performance of an algorithm. Let ∆i,l = θ∗ l κ∗ l −θ∗ i κ∗ l . Regret can be alternatively represented as Reg(T) = P (i,l)∈[K]×[L] ∆i,lNi,l(T). The regret increases unless I(t) = (1, 2, . . . , L). 3 Regret Lower Bound Here, we derive an asymptotic regret lower bound when T →∞. In the context of the standard multiarmed bandit problem, Lai and Robbins [28] derived a regret lower bound for strongly consistent algorithms, and it is followed by many extensions, such as the one for multi-parameter distributions [6] and the ones for Markov decision processes [13, 7]. Intuitively, a strongly consistent algorithm is “uniformly good” in the sense that it works well with any set of model parameters. Their result was extended to the multiple-play [2] and PBM [27] cases. We further extend it to the case of PBMU. Let Tall = {(θ′ 1, . . . , θ′ K) ∈(0, 1)K} and Kall = {(κ′ 1, . . . , κ′ L) : 1 = κ′ 1 > κ′ 2 > · · · > κ′ L > 0} be the sets of all possible values on the parameters of the arms and slots, respectively. Let (1), . . . , (K) be a permutation of 1, . . . , K and T(1),...,(L) be the subset of Tall such that the i-th best arm is (i). Namely, T(1),...,(L) = n (θ′ 1, . . . , θ′ K) ∈(0, 1)K : θ′ (1) > θ′ (2) > · · · > θ′ (L), ∀i/∈{(1),...,(L)}(θ′ i < θ′ (L)) o , and T c (1),...,(L) = Tall \ T(1),...,(L). An algorithm is strongly consistent if E[Reg(T)] = o(T a) for any a > 0 given any instance of the bandit problem with its parameters {θ′ i}i∈[K] ∈Tall, {κ′ l} ∈Kall. The following lemma, whose proof is in Appendix F, lower-bounds the number of draws on the pairs of arms and slots. Lemma 1. (Lower bound on the number of draws) The following inequality holds for Ni,l(T) of the strongly consistent algorithm: ∀{θ′ i}∈T c 1,...,L,{κ′ l}∈Kall X (i,l)∈[K]×[L] E[Ni,l(T)]dKL(θ∗ i κ∗ l , θ′ iκ′ l) ≥log T −o(log T), where dKL(p, q) = p log(p/q) + (1 −p) log((1 −p)/(1 −q)) is the KL divergence between two Bernoulli distributions. Such a divergence-based bound appears in many stochastic bandit problems. However, unlike other bandit problems, the argument inside the KL divergence is a product of parameters θ′ iκ′ l: While dKL(·, θ′ iκ′ l) is convex to θ′ iκ′ l, it is not convex to the parameter space {θ′ i}, {κ′ l}. Therefore, finding a set of parameters that minimizes P i,l dKL(µi,l, θ′ iκ′ l) is non-convex, which makes PBMU difficult. Furthermore, we can formalize the regret lower bound in what follows. Let Q = {qi,l} ∈[0, ∞)[K]×[K] : ∀i∈[K−1] X l∈[K] qi,l = X l∈[K] qi+1,l, ∀l∈[K−1] X i∈[K] qi,l = X i∈[K] qi,l+1 . Intuitively, {qi,l} for l ≤L corresponds to the draw of arm i in slot l, and {qi,l} for l > L corresponds to the non-draw of arm i, as we will see later. The following quantities characterizes the minimum 3 amount of exploration for consistency: R(1),...,(L)({µi,l}, {θi}, {κl}) = {qi,l} ∈Q : inf {θ′ i}∈T c (1),...,(L),{κ′ l}∈Kall:∀i∈[L]θ′ iκ′ i=θiκi X (i,l)∈[K]×[L]:i̸=(l) qi,ldKL (µi,l, θ′ iκ′ l) ≥1 . (1) Equality (1) states that drawing each pair (i, l) for Ni,l = qi,l log T times suffices to reduce the risk that the true parameter is {θ′ i}, {κ′ l} for any parameters {θ′ i}, {κ′ l} such that θ′ i ∈T c (1),...,(L) and θ′ iκ′ l = θiκi for any i ∈[L]. Note that the constraint θ′ iκ′ i = θiκi corresponds to the fact that drawing an optimal list of arms does not increase the regret: Intuitively, this corresponds to the fact that the true parameter of the best arm is obtained for free in the regret lower bound of the standard bandit problem1. Moreover, let C∗ (1),...,(L)({µi,l}, {θi}, {κl}) = inf {qi,l}∈R(1),...,(L)({µi,l},{θi},{κl}) X (i,l)∈[K]×[L] ∆i,lqi,l , the set of optimal solutions of which is denoted by R∗ (1),...,(L)({µi,l}, {θi}, {κl}) = {qi,l} ∈R(1),...,(L)({µi,l}, {θi}, {κl}) : X (i,l)∈[K]×[L] ∆i,lqi,l = C∗ (1),...,(L)({µi,l}, {θi}, {κl}) . (2) The value C∗ 1,...,L log T is the possible minimum regret such that the minimum divergence of {θ∗ i }, {κ∗ l } from any {θ′ i}, {κ′ l} is larger than log T. Using Lemma 1 yields the following regret lower bound, whose proof is also in the Appendix F. Theorem 2. The regret of a strongly consistent algorithm is lower bounded as follows: E[Reg(T)] ≥C∗ 1,...,L({µ∗ i,l}, {θ∗ i }, {κ∗ l }) log T −o(log T). Remark 3. Ni,l = (log T)/dKL(θ∗ i κ∗ i , θ∗ j κ∗ i ) for j = min(i −1, L) satisfies the conditions in Lemma 1, which means that regret lower bound in Theorem 2 is O(K log T/∆) = O(K log T), where ∆= mini̸=j,l̸=m |θ∗ i −θ∗ j ||κ∗ l −κ∗ m|. 4 Algorithm Our algorithm, called Permutation Minimum Empirical Divergence (PMED), is closely related to the optimization we discussed in Section 3. 4.1 PMED Algorithm We denote a list of L arms that are drawn at each round as L-allocation. For example, (3, 2, 1, 5) is a 4-allocation, which corresponds to allocating arms 3, 2, 1, 5 to slots 1, 2, 3, 4, respectively. Like the Deterministic Minimum Empirical Divergence (DMED) algorithm [17] for the single-play multi-armed bandit problem, Algorithm 1 selects arms by using a loop. LC = LC(t) is the set of L-allocations in the current loop, and LN = LN(t) is the set of L-allocations that are to be drawn in the next loop. Note that, |LN| ≥1 always holds at the end of each loop so that at least one element is 1The infimum should take parameters θ′ iκ′ i ̸= θiκi into consideration. However, such parameters can be removed without increasing regret, and thus the infimum over θ′ iκ′ i = θiκi suffices. This can be understood because the regret bound of the standard K-armed bandit problem with expectation of each arm µi is PK i=2(log T)/dKL(µi, µ1): Arm 1 is drawn without increasing regret, and thus estimation of µ1 can be arbitrary accurate. In our case placing arms 1, ..., L into slots 1, ..., L does not increase the regret, and thus the estimation of the product parameter θiκi for each i ∈[L] is very accurate. 4 Algorithm 1 PMED and PMED-Hinge Algorithms 1: Input: α > 0, β > 0 (for PMED-Hinge), f(n) = γ/√n with γ > 0 (for PMED-Hinge). 2: LN ←∅. LC ←{vmod 1 , . . . , vmod K }. 3: while t ≤T do 4: for each vmod m : m ∈[K] do 5: If there exists some pair (i, l) ∈vmod m such that Ni,l(t) < α√log t, then put vmod m into LN. 6: end for 7: Compute the MLE {ˆθi(t)}K i=1, {ˆκl(t)}L l=1 = (min{θi,κl} P (i,l)∈[K]×[L] Ni,l(t)dKL(ˆµi,l(t), θiκl) (PMED) min{θi,κl} P (i,l)∈[K]×[L] Ni,l(t) (dKL(ˆµi,l(t), θiκl) −f(Ni,l(t)))+ . (PMED-Hinge) 8: if Algorithm is PMED-Hinge then 9: If |ˆθi(t) −ˆθj(t)| < β/(log log t) for some i ̸= j or |ˆκl(t) −ˆκm(t)| < β/(log log t) for some l ̸= m, then put all of vmod 1 , . . . , vmod K to LN. 10: If S (i,l)∈[K]×[L]{dKL(ˆµi,l(t), ˆθi(t)ˆκl(t)) > f(Ni,l(t))} holds, then put all of vmod 1 , . . . , vmod K into LN. 11: end if 12: Compute {qi,l}∈ R∗ ˆ1(t),...,ˆL(t)({ˆµi,l(t)}, {ˆθi(t)}, {ˆκl(t)}) (PMED) R∗,H ˆ1(t),...,ˆL(t)({ˆµi,l(t)}, {ˆθi(t)}, {ˆκl(t)}, {f(Ni,l(t))}). (PMED-Hinge) 13: ˜Ni,l ←qi,l log t for each (i, l) ∈[K] × [K]. 14: Decompose ˜Ni,l = P v creq v ev where ev for each v is a permutation matrix and creq v > 0 by using Algorithm 2. 15: ri,l ←Ni,l(t). 16: for each permutation matrix ev do 17: caff v ←min creq v , maxc c > 0 : min(i,l)∈[K]×[L](ri,l −c ev,i,l) ≥0 . 18: Let (v1, . . . , vL) be the L-allocation corresponding to ev. If caff v < creq v and there exists a pair (vl, l) that is in none of the L-allocations in LN, then put (v1, . . . , vL) into LN. 19: ri,l ←ri,l −caff v ev,i,l. 20: end for 21: Select I(t) ∈LC in an arbitrary fixed order. LC →LC \ {I(t)}. 22: Put (ˆ1(t), . . . , ˆL(t)) into LN. 23: If LC = ∅then LC ←LN, LN ←∅. 24: end while put into LC. There are three lines where L-allocations are put into LN without duplication: Lines 5, 18, and 22. We explain each of these lines below. Line 5 is a uniform exploration over all pairs (i, l). For m ∈[K], let vmod m be an L-allocation (1 + modK(m), 1 + modK(1 + m), . . . , 1 + modK(L + m −1)), where modK(x) is the minimum non-negative integer among {x−cK : c ∈N}. From the definition of vmod m , any pair (i, l) ∈[K]×[L] belongs to exactly one of vmod 1 , . . . , vmod K . If some pair (i, l) is not allocated α√log t times, a corresponding L-allocation is put into LN. This exploration stabilizes the estimators. Line 18 and related routines are based on the optimal amount of explorations. { ˜Ni,l}i∈[K],l∈[K] is calculated by plugging in the maximum likelihood estimator (MLE) ({ˆθi}i∈[K], {ˆκl}l∈[L]) into the optimization problem of Inequality (2). As { ˜Ni,l} is a set of K × K variables2, the algorithm needs to convert it into a set of L-allocations to put them into LN. This is done by decomposing it into a set of permutation matrices, which we will explain in Section 4.2. Line 22 is for exploitation: If no pair is put to LN by Line 5 or Line 18 and LC is empty, then Line 22 puts arms (ˆ1(t), . . . , ˆL(t)) of the top-L largest {ˆθi(t)} (with ties broken arbitrarily) into LN. 2K × K is not a typo of K × L: {qi,l} and { ˜ Ni,l} are sets of K2 variables. 5 Algorithm 2 Permutation Matrix Decomposition 1: Input: Ni,l. 2: ¯Ni,l ←Ni,l. 3: while ¯Ni,l > 0 for some (i, l) ∈[K] × [K] do 4: Find a permutation matrix ev such that, for any i, l such that ev,i,l = 1 ⇒¯Ni,l > 0. 5: Let creq v = maxc c > 0 : min(i,l)∈[K]×[K]( ¯Ni,l −cev,i,l) ≥0 . 6: ¯Ni,l ←¯Ni,l −creq v ev,i,l for each (i, l) ∈[K] × [K]. 7: end while 8: Output {creq v , ev} 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 Figure 1: A permutation matrix with K = 4, where (i, l) = 1 for (i, l) ∈(1, 1), (2, 3), (3, 2), (4, 4). If L = 2, this matrix corresponds to allocating arm 1 in slot 1 and arm 3 in slot 2. 4.2 Permutation Matrix and Allocation Strategy In this section, we discuss the way to convert { ˜Ni,l} = {qi,l log t}, the estimated optimal amount of exploration, into L-allocations. A permutation matrix is a square matrix that has exactly one entry of 1 at each row and each column and 0s elsewhere (Figure 1, left). There are K! permutation matrices since they corresponds to ordering K elements. Therefore, even though {qi,l} can be obviously decomposed into a linear combination of permutation matrices, it is not clear how to compute them without computing the set of all permutation matrices that are exponentially large in K. Algorithm 2 solves this problem: Let ¯Ni,l be a temporal variable that is initialized by ˜Ni,l at the beginning. In each iteration, it subtracts a scalar multiplication of a permutation matrix ev whose (i, l) entry ev,i,l of value 1 corresponds to ¯Ni,l > 0. (Line 6 in Algorithm 2). This boils down to finding a perfect matching in a bipartite graph where the left (resp. right) nodes correspond to rows (resp. columns) and edges between nodes i and l are spanned if ¯Ni,l > 0. Although a naive greedy fails in such a matching problem (c.f., Appendix A), a maximal matching in a bipartite graph can be computed by the Hopcroft–Karp algorithm [18] in O(K2.5) times, and Theorem 4 below ensures that the maximum matching is always perfect: Theorem 4. (Existence of a perfect matching) For any { ¯Ni,l ∈[K]×[K] : ¯Ni,l ≥0, ∃(i,l) ¯Ni,l > 0} such that the sums of each row and column are equal, there exists a permutation matrix ev such that ∀(i,l)∈[K]×[K]:ev,i,l=1 ¯Ni,l > 0. The proof of Theorem 4 is in Appendix E. Each subtraction increases the number of 0 entries in ¯Ni,l (Line 5 in Algorithm 2); Algorithm 2 runs in O(K4.5) times by computing at most O(K2) perfect matching sub-problems, and as a result it decomposes ˜Ni,l into a positive linear combination of permutation matrices. The main algorithm checks whether each the entries of the permutation matrices are sufficiently explored (Line 18 in Algorithm 1), and draws an L-allocation corresponding to a permutation matrix (Figure 1, right) if under-explored. 5 Optimizations This section discusses two optimizations that appear in Algorithm 1, namely, the MLE computation (Line 7), and the computation of the optimal solution (Line 12). MLE (Line 7) is the solution of a bi-convex optimization: the optimization of {θi} (resp. {κl}) is convex when we view {κl} (resp. {θi}) as a constant. Therefore, off-the-shelf tools for optimizing convex functions (e.g., Newton’s method) are applicable to alternately optimizing {θi} and {κl}. Assuming that each convex optimization yields an optimal value, such an alternate optimization 6 Algorithm 3 Cutting-plane method for obtaining {qi,l} on Line 12 of Algorithm 1 1: Input: the number of iterations S, nominal constraint {θ(0) i } ∈T c ˆ1(t),...,ˆL(t). 2: for s = 1, 2, . . . , S do 3: Find q(s) i,l ←min{qi,l}∈Q P (i,l)∈[K]×[L] ∆i,lqi,l such that X (i,l)∈[K]×[L]:i̸=ˆl(t) qi,ldKL ˆµi,l(t), θ′ i ˆθl(t)ˆκl(t) θ′ l ! ≥1 for all {θ′ i} ∈{θ(0) i }, {θ(1) i }, . . . , {θ(s−1) i }. 4: Find {θ(s) i } ←min{θ′ i} P (i,l)∈[K]×[L] q(s) i,l dKL(ˆµi,l(t), θ′ i ˆθl(t)ˆκl(t) θ′ l ). 5: end for monotonically decreases the objective function and thus converges. Note that a local minimum obtained by bi-convex optimizations is not always a global minimum due to its non-convex nature. Although the computation of the optimal solution (Line 12) involves {θ′ i} and {κ′ l}, the constraint eliminates latter variables as κ′ i = ˆθi(t)ˆκi(t)/θ′ i. This optimization is a linear semi-infinite programming (LSIP) on {qi,l}, which is a linear programming (LP) with an infinite set of linear constraints parameterized by {θ′ i}. Algorithm 3 is the cutting-plane method with pessimistic oracle [29] that boils the LSIP down to finite constraint LPs. At each iteration s, it adds a new constraint {θ(s) i } ∈T c ˆ1(t),...,ˆL(t) that is “hardest” in a sense that it minimizes the sum of divergences (Line 4 in Algorithm 3). The following theorem guarantees the convergence of the algorithm when the exactly hardest constraint is found. Theorem 5. (Convergence of the cutting-plane method, Mutapcic and Boyd [29, Section 5.2]) Assume that there exists a constant C and that the constraint f({θ′ i}) = P (i,l)∈[K]×[L] q(s) i,l dKL(ˆµi,l(t), θ′ i ˆθl(t)ˆκl(t) θ′ l ) is Lipchitz continuous as |f({θ(1) i }) −f({θ(2) i })| ≤ C||{θ(1) i }−{θ(2) i }||, where the norm ||·|| is any Lp norm. Then, Algorithm 3 converges to its optimal solution as S →∞. Although the Lipchitz continuity assumption does not hold as dKL(p, q) approaches infinity when q is close to 0 or 1, by restricting q to some region [ϵ, 1 −ϵ], Lipchitz continuity can be guaranteed for some C = C(ϵ). Theorem 5 assumes the availability of an exact solution to the hardest constraint, which is generally hard since this objective is non-convex in its nature. Still, we can obtain a fair solution with the following reasons: First, although the space T c ˆ1(t),...,ˆL(t) is not convex, it suffices to consider each of the convex subspaces n {θ′ i} ∈(0, 1)K : θ′ ˆ1(t) ≥· · · ≥θ′ ˆL(t), θ′ ˆ X(t) = θ′ ˆl(t) o where X = min(L, l −1), for each l ∈[K] \ {1} separately because the hardest constraint is always in one of these subspaces (which follows from the convexity of the objective function). Second, the following bi-convex relaxation can be used: Let η′ 1, . . . , η′ L be auxiliary variables that correspond to 1/θ′ 1, . . . , 1/θ′ L. Namely, we optimize a relaxed objective function P (i,l)∈[K]×[L] q(s) i,l dKL(ˆµi,l(t), θ′ iη′ lˆθl(t)ˆκl(t)) + φ P i∈[L](θ′ iη′ i −1)2, where φ > 0 is a penalty parameter. Convexity of KL divergence implies that this objective is a bi-convex function of {θ′ i} and {η′ l}, and thus an alternate optimization is effective. Setting φ →∞induces a solution in which η′ i is equal to 1/θ′ i ([30, Theorem 17.1]). Our algorithm starts with a small value of φ; then it gradually increases φ. 6 Experiment To evaluate the empirical performance of the proposed algorithms, we conducted computer simulations with synthetic and real-world datasets. The compared algorithms are MP-TS [24], dcmKL-UCB [21], PBM-PIE [27], and PMED (proposed in this paper). MP-TS is an algorithm based on Thompson sampling [32] that ignores position bias: it draws the top-L arms on the basis of posterior sampling, and the posterior is calculated without considering position bias. DcmKL-UCB is a KL-UCB [11] 7 (a) Synthetic (b) Real-world (Tencent) Figure 2: Regret-round log-log plots of algorithms. based algorithm that works under the DCM assumption. PBM-PIE is an algorithm that allocates top-(L −1) slots greedily and allocates L-th arm based on the KL-UCB bound. Note that PBM-PIE requires an estimation of {κ∗ l }; here, a bi-convex optimization is used to estimate it3. We did not test PBM-TS [27], which is another algorithm for PBM, mainly because that its regret bound has not been derived yet. However, its regret appears to be asymptotically optimal when {κ∗ l } are known (Figure 1(a) in Lagrée et al.[27]), and thus it does not explore sufficiently when there is uncertainty in the position bias. We set α = 10 for PMED. We used the Gurobi LP solver4 for solving the LPs. To speed up the computation, we skipped the bi-convex and LP optimizations in most rounds with large t and used the result of the last computation. We used the Newton’s method (resp. a gradient method) for computing the MLE (resp. the hardest constraint) in Algorithm 3. Synthetic data: This simulation was designed to check the consistency of the algorithms, and it involved 5 arms with (θ1, . . . , θ5) = (0.95, 0.8, 0.65, 0.5, 0.35), and 2 slots with (κ1, κ2) = (1, 0.6). The experimental results are shown on the left of Figure 2. The results are averaged over 100 runs. LB is the simulated value of the regret lower bound in Section 3. While the regret of PMED converges, the other algorithms suffer a 100 times or larger regret than LB at T = 107, which implies that these algorithms are not consistent under our model. Real-world data: Following the existing work [24, 27], we used the KDD Cup 2012 track 2 dataset [22] that involves session logs of soso.com, a search engine owned by Tencent. Each of the 150M lines from the log contains the user ID, the query, an ad, and a slot in {1, 2, 3} at which the ad was displayed and a binary reward indicated (click/no-click). Following Lagrée et al. [27], we obtained major 8 queries. Using the click logs of the queries, the CTRs and position bias were estimated in order to maximize the likelihood by using bi-convex optimization in Section 4. Note that, the number of arms and parameters are slightly different from the ones reported previously [27]. For the sake of completeness, we show the parameters in Appendix C. We conducted 100 runs for each queries, and the right figure in Figure 2 shows the averaged regret over 8 queries. Although the gap between PMED and existing algorithms are not drastic compared with synthetic parameters, the existing algorithms suffer larger regret than PMED. 7 Analysis Although the authors conjecture that PMED is optimal, it is hard to analyze it directly. The technically hardest part arises from the case in which the divergence of each action is small but not yet fully converged. To circumvent these difficulty, we devised a modified algorithm called PMED-Hinge (Algorithm 1) that involves extra exploration. In particular, we modify the optimization problem as 3The bi-convex optimization is identical to the one used for obtaining the MLE in PMED. 4http://www.gurobi.com 8 follows: Let RH (1),...,(L)({µi,l}, {θi}, {κl}, {δi,l}) = {qi,l} ∈Q : inf {θ′ i}∈T c (1),...,(L),{κ′ l}∈Kall:∀l∈[L]dKL(µ(l),l,θ′ (l)κ′ l)≤δi,l X (i,l)∈[K]×[L]:i̸=(l) qi,l (dKL(µi,l, θ′ iκ′ l) −δi,l)+ ≥1 , where (x)+ = max(x, 0). Moreover, let C∗,H (1),...,(L)({µi,l}, {θi}, {κl}, {δi,l}) = inf {qi,l}∈RH (1),...,(L)({µi,l},{θi},{κl},{δi,l}) X (i,l)∈[K]×[L] ∆i,lqi,l , the optimal solution of which is R∗,H (1),...,(L)({µi,l}, {θi}, {κl}, {δi,l}) = {qi,l} ∈RH (1),...,(L)({µi,l}, {θi}, {κl}, {δi,l}) : X (i,l)∈[K]×[L] ∆i,lqi,l = C∗,H (1),...,(L)({µi,l}, {θi}, {κl}, {δi,l}) . The necessity of additional terms in PMED-Hinge are discussed in Appendix B. The following theorem, whose proof is in Appendix G, derives a regret upper bound that matches the lower bound in Theorem 2. Theorem 6. (Asymptotic optimality of PMED-Hinge) Let the solution of the optimal exploration R∗,H 1,...,L({µi,l}, {θi}, {κl}, {δi,l}) restricted to l ≤L is unique at ({µ∗ i,l}, {θ∗ i }, {κ∗ l }, {0}). For any α > 0, β > 0, and γ > 0, the regret of PMED-Hinge is bounded as: E[Reg(T)] ≤C∗ 1,...,L({µ∗ i,l}, {θ∗ i }, {κ∗ l }) log T + o(log T) . Note that, the assumption on the uniqueness of the solution in Theorem 6 is required to achieve an optimal coefficient on the log T factor. It is not very difficult to derive an O(log T) regret even though the uniqueness condition is not satisfied. Although our regret bound is not finite-time, the only asymptotic analysis comes from the optimal constant on the top of log T term (Lemma 11 in Appendix) and it is not very hard to derive an O(log T) finite-time regret bound. 8 Conclusion By providing a regret lower bound and an algorithm with a matching regret bound, we gave the first complete characterization of a position-based multiple-play multi-armed bandit problem where the quality of the arms and the discount factor of the slots are unknown. We provided a way to compute the optimization problems related to the algorithm, which is of its own interest and is potentially applicable to other bandit problems. 9 Acknowledgements The authors gratefully acknowledge Kohei Komiyama for discussion on a permutation matrix and sincerely thank the anonymous reviewers for their useful comments. This work was supported in part by JSPS KAKENHI Grant Number 17K12736, 16H00881, 15K00031, and Inamori Foundation Research Grant. References [1] D. Agarwal, B.-C. Chen, and P. Elango. Spatio-temporal models for estimating click-through rate. In WWW, pages 21–30, 2009. [2] V. Anantharam, P. Varaiya, and J. Walrand. Asymptotically efficient allocation rules for the multiarmed bandit problem with multiple plays-part i: I.i.d. rewards. Automatic Control, IEEE Transactions on, 32(11):968–976, 1987. [3] P. Auer, Y. Freund, and R. E. Schapire. The non-stochastic multi-armed bandit problem. Siam Journal on Computing, 2002. [4] G. Bartók, D. P. Foster, D. Pál, A. Rakhlin, and C. Szepesvári. Partial monitoring - classification, regret bounds, and algorithms. Math. Oper. Res., 39(4):967–997, 2014. [5] S. Bubeck. Bandits Games and Clustering Foundations. Theses, Université des Sciences et Technologie de Lille - Lille I, June 2010. [6] A. Burnetas and M. Katehakis. Optimal adaptive policies for sequential allocation problems. Advances in Applied Mathematics, 17(2):122–142, 1996. [7] A. Burnetas and M. Katehakis. Optimal adaptive policies for markov decision processes. Math. Oper. Res., 22(1):222–255, Feb. 1997. [8] R. Combes, S. Magureanu, A. Proutière, and C. Laroche. Learning to rank: Regret lower bounds and efficient algorithms. In Proceedings of the 2015 ACM SIGMETRICS, pages 231–244, 2015. [9] R. Combes, M. S. Talebi, A. Proutière, and M. Lelarge. Combinatorial bandits revisited. In NIPS, pages 2116–2124, 2015. [10] N. Craswell, O. Zoeter, M. J. Taylor, and B. Ramsey. An experimental comparison of click position-bias models. In WSDM, pages 87–94, 2008. [11] A. Garivier and O. Cappé. The KL-UCB algorithm for bounded stochastic bandits and beyond. In COLT, pages 359–376, 2011. [12] A. Garivier and E. Kaufmann. Optimal best arm identification with fixed confidence. In COLT, pages 998–1027, 2016. [13] T. L. Graves and T. L. Lai. Asymptotically efficient adaptive choice of control laws in controlled markov chains. SIAM Journal on Control and Optimization, 35(3):715–743, 1997. [14] F. Guo, C. Liu, and Y. M. Wang. Efficient multiple-click models in web search. In WSDM, pages 124–131, 2009. [15] P. Hall. On representatives of subsets. Journal of the London Mathematical Society, s1-10(1):26– 30, 1935. [16] W. W. Hogan. Point-to-set maps in mathematical programming. SIAM Review, 15(3):591–603, 1973. [17] J. Honda and A. Takemura. An Asymptotically Optimal Bandit Algorithm for Bounded Support Models. In COLT, pages 67–79, 2010. [18] J. E. Hopcroft and R. M. Karp. An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing, 2(4):225–231, 1973. 10 [19] Interactive Advertising Bureau. IAB internet advertising revenue report - 2016 full year results., 2017. [20] S. Kale, L. Reyzin, and R. E. Schapire. Non-stochastic bandit slate problems. In NIPS, pages 1054–1062, 2010. [21] S. Katariya, B. Kveton, C. Szepesvári, and Z. Wen. DCM bandits: Learning to rank with multiple clicks. In ICML, pages 1215–1224, 2016. [22] KDD cup 2012 track 2, 2012. [23] D. Kempe and M. Mahdian. A cascade model for externalities in sponsored search. In WINE, pages 585–596, 2008. [24] J. Komiyama, J. Honda, and H. Nakagawa. Optimal regret analysis of thompson sampling in stochastic multi-armed bandit problem with multiple plays. In ICML, pages 1152–1161, 2015. [25] J. Komiyama, J. Honda, and H. Nakagawa. Regret lower bound and optimal algorithm in finite stochastic partial monitoring. In NIPS, pages 1792–1800, 2015. [26] B. Kveton, C. Szepesvári, Z. Wen, and A. Ashkan. Cascading bandits: Learning to rank in the cascade model. In ICML, pages 767–776, 2015. [27] P. Lagrée, C. Vernade, and O. Cappé. Multiple-play bandits in the position-based model. In NIPS, pages 1597–1605, 2016. [28] T. L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [29] A. Mutapcic and S. P. Boyd. Cutting-set methods for robust convex optimization with pessimizing oracles. Optimization Methods and Software, 24(3):381–406, 2009. [30] J. Nocedal and S. Wright. Numerical Optimization. Springer Series in Operations Research and Financial Engineering. Springer New York, 2nd edition, 2006. [31] A. Piccolboni and C. Schindelhauer. Discrete prediction games with arbitrary feedback and loss. In COLT 2001 and EuroCOLT 2001, pages 208–223, 2001. [32] W. R. Thompson. On The Likelihood That One Unknown Probability Exceeds Another In View Of The Evidence Of Two Samples. Biometrika, 25:285–294, 1933. [33] H. P. Vanchinathan, G. Bartók, and A. Krause. Efficient partial monitoring with prior information. In NIPS, pages 1691–1699, 2014. [34] S. Yuan, J. Wang, and X. Zhao. Real-time bidding for online advertising: Measurement and analysis. In Proceedings of the Seventh International Workshop on Data Mining for Online Advertising, ADKDD ’13, pages 3:1–3:8. ACM, 2013. 11 | 2017 | 514 |
7,024 | Deep Voice 2: Multi-Speaker Neural Text-to-Speech Sercan Ö. Arık⇤ sercanarik@baidu.com Gregory Diamos⇤ gregdiamos@baidu.com Andrew Gibiansky⇤ gibianskyandrew@baidu.com John Miller⇤ millerjohn@baidu.com Kainan Peng⇤ pengkainan@baidu.com Wei Ping⇤ pingwei01@baidu.com Jonathan Raiman⇤ jonathanraiman@baidu.com Yanqi Zhou⇤ zhouyanqi@baidu.com Baidu Silicon Valley Artificial Intelligence Lab 1195 Bordeaux Dr. Sunnyvale, CA 94089 Abstract We introduce a technique for augmenting neural text-to-speech (TTS) with lowdimensional trainable speaker embeddings to generate different voices from a single model. As a starting point, we show improvements over the two state-ofthe-art approaches for single-speaker neural TTS: Deep Voice 1 and Tacotron. We introduce Deep Voice 2, which is based on a similar pipeline with Deep Voice 1, but constructed with higher performance building blocks and demonstrates a significant audio quality improvement over Deep Voice 1. We improve Tacotron by introducing a post-processing neural vocoder, and demonstrate a significant audio quality improvement. We then demonstrate our technique for multi-speaker speech synthesis for both Deep Voice 2 and Tacotron on two multi-speaker TTS datasets. We show that a single neural TTS system can learn hundreds of unique voices from less than half an hour of data per speaker, while achieving high audio quality synthesis and preserving the speaker identities almost perfectly. 1 Introduction Artificial speech synthesis, commonly known as text-to-speech (TTS), has a variety of applications in technology interfaces, accessibility, media, and entertainment. Most TTS systems are built with a single speaker voice, and multiple speaker voices are provided by having distinct speech databases or model parameters. As a result, developing a TTS system with support for multiple voices requires much more data and development effort than a system which only supports a single voice. In this work, we demonstrate that we can build all-neural multi-speaker TTS systems which share the vast majority of parameters between different speakers. We show that not only can a single model generate speech from multiple different voices, but also that significantly less data is required per speaker than when training single-speaker systems. Concretely, we make the following contributions: 1. We present Deep Voice 2, an improved architecture based on Deep Voice 1 (Arik et al., 2017). 2. We introduce a WaveNet-based (Oord et al., 2016) spectrogram-to-audio neural vocoder, and use it with Tacotron (Wang et al., 2017) as a replacement for Griffin-Lim audio generation. ⇤Listed alphabetically. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 3. Using these two single-speaker models as a baseline, we demonstrate multi-speaker neural speech synthesis by introducing trainable speaker embeddings into Deep Voice 2 and Tacotron. We organize the rest of this paper as follows. Section 2 discusses related work and what makes the contributions of this paper distinct from prior work. Section 3 presents Deep Voice 2 and highlights the differences from Deep Voice 1. Section 4 explains our speaker embedding technique for neural TTS models and shows multi-speaker variants of the Deep Voice 2 and Tacotron architectures. Section 5.1 quantifies the improvement for single speaker TTS through a mean opinion score (MOS) evaluation and Section 5.2 presents the synthesized audio quality of multi-speaker Deep Voice 2 and Tacotron via both MOS evaluation and a multi-speaker discriminator accuracy metric. Section 6 concludes with a discussion of the results and potential future work. 2 Related Work We discuss the related work relevant to each of our claims in Section 1 in order, starting from single-speaker neural speech synthesis and moving on to multi-speaker speech synthesis and metrics for generative model quality. With regards to single-speaker speech synthesis, deep learning has been used for a variety of subcomponents, including duration prediction (Zen et al., 2016), fundamental frequency prediction (Ronanki et al., 2016), acoustic modeling (Zen and Sak, 2015), and more recently autoregressive sample-bysample audio waveform generation (e.g., Oord et al., 2016; Mehri et al., 2016). Our contributions build upon recent work in entirely neural TTS systems, including Deep Voice 1 (Arik et al., 2017), Tacotron (Wang et al., 2017), and Char2Wav (Sotelo et al., 2017). While these works focus on building single-speaker TTS systems, our paper focuses on extending neural TTS systems to handle multiple speakers with less data per speaker. Our work is not the first to attempt a multi-speaker TTS system. For instance, in traditional HMMbased TTS synthesis (e.g., Yamagishi et al., 2009), an average voice model is trained using multiple speakers’ data, which is then adapted to different speakers. DNN-based systems (e.g., Yang et al., 2016) have also been used to build average voice models, with i-vectors representing speakers as additional inputs and separate output layers for each target speaker. Similarly, Fan et al. (2015) uses a shared hidden representation among different speakers with speaker-dependent output layers predicting vocoder parameters (e.g., line spectral pairs, aperiodicity parameters etc.). For further context, Wu et al. (2015) empirically studies DNN-based multi-speaker modeling. More recently, speaker adaptation has been tackled with generative adversarial networks (GANs) (Hsu et al., 2017). We instead use trainable speaker embeddings for multi-speaker TTS. The approach was investigated in speech recognition (Abdel-Hamid and Jiang, 2013), but is a novel technique in speech synthesis. Unlike prior work which depends on fixed embeddings (e.g. i-vectors), the speaker embeddings used in this work are trained jointly with the rest of the model from scratch, and thus can directly learn the features relevant to the speech synthesis task. In addition, this work does not rely on per-speaker output layers or average voice modeling, which leads to higher-quality synthesized samples and lower data requirements (as there are fewer unique parameters per speaker to learn). In order to evaluate the distinctiveness of the generated voices in an automated way, we propose using the classification accuracy of a speaker discriminator. Similar metrics such as an “Inception score” have been used for quantitative quality evaluations of GANs for image synthesis (e.g., Salimans et al., 2016). Speaker classification has been studied with both traditional GMM-based methods (e.g., Reynolds et al., 2000) and more recently with deep learning approaches (e.g., Li et al., 2017). 3 Single-Speaker Deep Voice 2 In this section, we present Deep Voice 2, a neural TTS system based on Deep Voice 1 (Arik et al., 2017). We keep the general structure of the Deep Voice 1 (Arik et al., 2017), as depicted in Fig. 1 (the corresponding training pipeline is depicted in Appendix A). Our primary motivation for presenting an improved single-speaker model is to use it as the starting point for a high-quality multi-speaker model. One major difference between Deep Voice 2 and Deep Voice 1 is the separation of the phoneme duration and frequency models. Deep Voice 1 has a single model to jointly predict phoneme duration 2 Mel Speaker Duration Frequency Vocal Speaker FC softsign FC Co Text Synthesized Speech Char 1 Char n … Taco Speaker MLP Filter-Bank + BN + ReLu FC softsign MLP Mel i Taco Speaker Attention FC softsign FC Vocal Speaker Mel i-1 Mel i+1 … … Pronunciation Dictionary Phonemes upsample F0 Upsampled Phonemes Phonemes Figure 1: Inference system diagram: first text-phonemes dictionary conversion, second predict phoneme durations, third upsample and generate F0, finally feed F0 and phonemes to vocal model. and frequency profile (voicedness and time-dependent fundamental frequency, F0). In Deep Voice 2, the phoneme durations are predicted first and then are used as inputs to the frequency model. In the subsequent subsections, we present the models used in Deep Voice 2. All models are trained separately using the hyperparameters specified in Appendix B. We will provide a quantitative comparison of Deep Voice 1 and Deep Voice 2 in Section 5.1. 3.1 Segmentation model Estimation of phoneme locations is treated as an unsupervised learning problem in Deep Voice 2, similar to Deep Voice 1. The segmentation model is convolutional-recurrent architecture with connectionist temporal classification (CTC) loss (Graves et al., 2006) applied to classify phoneme pairs, which are then used to extract the boundaries between them. The major architecture changes in Deep Voice 2 are the addition of batch normalization and residual connections in the convolutional layers. Specifically, Deep Voice 1’s segmentation model computes the output of each layer as h(l) = relu ⇣ W (l) ⇤h(l−1) + b(l)⌘ , (1) where h(l) is the output of the l-th layer, W (l) is the convolution filterbank, b(l) is the bias vector, and ⇤is the convolution operator. In contrast, Deep Voice 2’s segmentation model layers instead compute h(l) = relu ⇣ h(l−1) + BN ⇣ W (l) ⇤h(l−1)⌘⌘ , (2) where BN is batch normalization (Ioffe and Szegedy, 2015). In addition, we find that the segmentation model often makes mistakes for boundaries between silence phonemes and other phonemes, which can significantly reduce segmentation accuracy on some datasets. We introduce a small post-processing step to correct these mistakes: whenever the segmentation model decodes a silence boundary, we adjust the location of the boundary with a silence detection heuristic.2 3.2 Duration Model In Deep Voice 2, instead of predicting a continuous-valued duration, we formulate duration prediction as a sequence labeling problem. We discretize the phoneme duration into log-scaled buckets, and assign each input phoneme to the bucket label corresponding to its duration. We model the sequence by a conditional random field (CRF) with pairwise potentials at output layer (Lample et al., 2016). During inference, we decode discretized durations from the CRF using the Viterbi forward-backward algorithm. We find that quantizing the duration prediction and introducing the pairwise dependence implied by the CRF improves synthesis quality. 3.3 Frequency Model After decoding from the duration model, the predicted phoneme durations are upsampled from a per-phoneme input features to a per-frame input for the frequency model. 3 Deep Voice 2 frequency 2We compute the smoothed normalized audio power as p[n] = (x[n]2/xmax 2) ⇤g[n], where x[n] is the audio signal, g[n] is the impulse response of a Gaussian filter, xmax is the maximum value of x[n] and ⇤is one-dimensional convolution operation. We assign the silence phoneme boundaries when p[n] exceeds a fixed threshold. The optimal parameter values for the Gaussian filter and the threshold depend on the dataset and audio sampling rate. 3Each frame is ensured to be 10 milliseconds. For example, if a phoneme lasts 20 milliseconds, the input features corresponding to that phoneme will be repeated in 2 frames. If it lasts less than 10 milliseconds, it is extend to a single frame. 3 model consists of multiple layers: firstly, bidirectional gated recurrent unit (GRU) layers (Cho et al., 2014) generate hidden states from the input features. From these hidden states, an affine projection followed by a sigmoid nonlinearity produces the probability that each frame is voiced. Hidden states are also used to make two separate normalized F0 predictions. The first prediction, fGRU, is made with a single-layer bidirectional GRU followed by an affine projection. The second prediction, fconv, is made by adding up the contributions of multiple convolutions with varying convolution widths and a single output channel. Finally, the hidden state is used with an affine projection and a sigmoid nonlinearity to predict a mixture ratio !, which is used to weigh the two normalized frequency predictions and combine them into f = ! · fGRU + (1 −!) · fconv. (3) The normalized prediction f is then converted to the true frequency F0 prediction via F0 = µF0 + σF0 · f, (4) where µF0 and σF0 are, respectively, the mean and standard deviation of F0 for the speaker the model is trained on. We find that predicting F0 with a mixture of convolutions and a recurrent layer performs better than predicting with either one individually. We attribute this to the hypothesis that including the wide convolutions reduces the burden for the recurrent layers to maintain state over a large number of input frames, while processing the entire context information efficiently. 3.4 Vocal Model The Deep Voice 2 vocal model is based on a WaveNet architecture (Oord et al., 2016) with a two-layer bidirectional QRNN (Bradbury et al., 2017) conditioning network, similar to Deep Voice 1. However, we remove the 1 ⇥1 convolution between the gated tanh nonlinearity and the residual connection. In addition, we use the same conditioner bias for every layer of the WaveNet, instead of generating a separate bias for every layer as was done in Deep Voice 1. 4 4 Multi-Speaker Models with Trainable Speaker Embeddings In order to synthesize speech from multiple speakers, we augment each of our models with a single low-dimensional speaker embedding vector per speaker. Unlike previous work, our approach does not rely on per-speaker weight matrices or layers. Speaker-dependent parameters are stored in a very low-dimensional vector and thus there is near-complete weight sharing between speakers. We use speaker embeddings to produce recurrent neural network (RNN) initial states, nonlinearity biases, and multiplicative gating factors, used throughout the networks. Speaker embeddings are initialized randomly with a uniform distribution over [−0.1, 0.1] and trained jointly via backpropagation; each model has its own set of speaker embeddings. To encourage each speaker’s unique voice signature to influence the model, we incorporate the speaker embeddings into multiple portions of the model. Empirically, we find that simply providing the speaker embeddings to the input layers does not work as well for any of the presented models besides the vocal model, possibly due to the high degree of residual connections present in the WaveNet and due to the difficulty of learning high-quality speaker embeddings. We observed that several patterns tend to yield high performance: • Site-Specific Speaker Embeddings: For every use site in the model architecture, transform the shared speaker embedding to the appropriate dimension and form through an affine projection and a nonlinearity. • Recurrent Initialization: Initialize recurrent layer hidden states with site-specific speaker embeddings. • Input Augmentation: Concatenate a site-specific speaker embedding to the input at every timestep of a recurrent layer. • Feature Gating: Multiply layer activations elementwise with a site-specific speaker embedding to render adaptable information flow. 5 4We find that these changes reduce model size by a factor of ⇠7 and speed up inference by ⇠25%, while yielding no perceptual change in quality. However, we do not focus on demonstrating these claims in this paper. 5We hypothesize that feature gating lets the model learn the union of all necessary features while allowing speaker embeddings to determine what features are used for each speaker and how much influence they will have on the activations. 4 Conv-BN-Res Phoneme 1 Phoneme n Speaker … FC FC concat concat MLP MLP Mel 1 Mel m … Speaker tile GRU + Attention FC softsign FC Stacked Residual GRU ftsign FC Mel Decoder CBFG FC Log-Mel Mel 1 Mel m … Vocal Speaker FC softsign Conv FC Conv + BN ⨉ ReLu6 + Conv-BN-Res … Stacked Bi-GRU Dropout softsign FC Dropout CTC Phoneme pairs (a) honeme 1 Phoneme n Stacked Bi-GRU Bi-GRU FC ! + F0 Filter-Bank FC ! FC Voiced … + ⨉ f Phoneme 1 Phoneme n Stacked Bi-GRU Durations (bucketed) Speaker … FC FC concat concat MLP CRF (b) Phoneme 1 Phoneme n Stacked Bi-GRU Bi-GRU FC ! + F0 Filter-Bank FC ! FC Voiced Speaker … FC softsign)+)1 + ⨉ FC softsign)+)1 f FC ⨉ μF μ !F Encoder CBFG Char 1 Char n … Speaker FC Bi-GRU Highway Layers MLP max/pool Filter-Bank + BN + ReLu Filter-Bank + BN + ReLu + FC softsign tile softsign MLP Mel 1 Mel m … Speaker tile GRU + Attention FC softsign FC Stacked Residual GRU softsign FC Mel Decoder CBFG FC Log-M Speaker Duration Frequency Vocal ω (c) Figure 2: Architecture for the multi-speaker (a) segmentation, (b) duration, and (c) frequency model. Next, we describe how speaker embeddings are used in each architecture. 4.1 Multi-Speaker Deep Voice 2 The Deep Voice 2 models have separate speaker embeddings for each model. Yet, they can be viewed as chunks of a larger speaker embedding, which are trained independently. 4.1.1 Segmentation Model In multi-speaker segmentation model, we use feature gating in the residual connections of the convolution layers. Instead of Eq. (2), we multiply the batch-normalized activations by a site-specific speaker embedding: h(l) = relu ⇣ h(l−1) + BN ⇣ W ⇤h(l−1)⌘ · gs ⌘ , (5) where gs is a site-specific speaker embedding. The same site-specific embedding is shared for all the convolutional layers. In addition, we initialize each of the recurrent layers with a second site specific embedding. Similarly, each layer shares the same site-specific embedding, rather than having a separate embedding per layer. 4.1.2 Duration Model The multi-speaker duration model uses speaker-dependent recurrent initialization and input augmentation. A site-specific embedding is used to initialize RNN hidden states, and another site-specific embedding is provided as input to the first RNN layer by concatenating it to the feature vectors. 4.1.3 Frequency Model The multi-speaker frequency model uses recurrent initialization, which initializes the recurrent layers (except for the recurrent output layer) with a single site-specific speaker-embedding. As described in Section 3.3, the recurrent and convolutional output layers in the single-speaker frequency model predict a normalized frequency, which is then converted into the true F0 by a fixed linear transformation. The linear transformation depends on the mean and standard deviation of observed F0 for the speaker. These values vary greatly between speakers: male speakers, for instance, tend to have a much lower mean F0. To better adapt to these variations, we make the mean and standard deviation trainable model parameters and multiply them by scaling terms which depend on the speaker embeddings. Specifically, instead of Eq. (4), we compute the F0 prediction as F0 = µF0 · # 1 + softsign # Vµ T gf $$ + σF0 · # 1 + softsign # Vσ T gf $$ · f, (6) where gf is a site-specific speaker embedding, µF0 and σF0 are trainable scalar parameters initialized to the F0 mean and standard deviation on the dataset, and Vµ and Vσ are trainable parameter vectors. 5 Conv-BN-Res Phoneme 1 Phoneme n Stacked Bi-GRU Bi-GRU FC Filter-Bank FC FC Speaker … FC FC softsign)+)1 FC Phoneme 1 Phoneme n Stacked Bi-GRU Speaker … FC FC concat concat MLP Mel 1 Mel m … Speaker Duration Frequency Vocal Speaker FC softsign Conv FC Conv + BN ⨉ ReLu6 + Conv-BN-Res … Stacked Bi-GRU Dropout softsign FC Dropout CTC Phoneme pairs Text Synthesized Speech Encoder CBFG Char 1 Char n … Tacotron Speaker FC Bi-GRU Highway Layers MLP max9pool Filter-Bank + BN + ReLu Filter-Bank + BN + ReLu + FC softsign tile softsign MLP Mel i Tacotron Speaker Attention FC softsign FC Stacked Residual GRU softsign FC Decoder CBFG FC Spectrogram Vocal Audio Vocal Speaker Grif<in9Lim ⋁ Mel i-1 Mel i+1 … … GRU i-1 GRU i-1 GRU i+1 … … Mel i+1 Audio Pronunciation Dictionary Phonemes upsample F0 Upsampled Phonemes Phonemes Figure 3: Tacotron with speaker conditioning in the Encoder CBHG module and decoder with two ways to convert spectrogram to audio: Griffin-Lim or our speaker-conditioned Vocal model. 4.1.4 Vocal Model The multi-speaker vocal model uses only input augmentation, with the site-specific speaker embedding concatenated onto each input frame of the conditioner. This differs from the global conditioning suggested in Oord et al. (2016) and allows the speaker embedding to influence the local conditioning network as well. Without speaker embeddings, the vocal model is still able to generate somewhat distinct-sounding voices because of the disctinctive features provided by the frequency and duration models. Yet, having speaker embeddings in the vocal model increases the audio quality. We indeed observe that the embeddings converge to a meaningful latent space. 4.2 Multi-Speaker Tacotron In addition to extending Deep Voice 2 with speaker embeddings, we also extend Tacotron (Wang et al., 2017), a sequence-to-sequence character-to-waveform model. When training multi-speaker Tacotron variants, we find that model performance is highly dependent on model hyperparameters, and that some models often fail to learn attention mechanisms for a small subset of speakers. We also find that if the speech in each audio clip does not start at the same timestep, the models are much less likely to converge to a meaningful attention curve and recognizable speech; thus, we trim all initial and final silence in each audio clip. Due to the sensitivity of the model to hyperparameters and data preprocessing, we believe that additional tuning may be necessary to obtain maximal quality. Thus, our work focuses on demonstrating that Tacotron, like Deep Voice 2, is capable of handling multiple speakers through speaker embeddings, rather than comparing the quality of the two architectures. 4.2.1 Character-to-Spectrogram Model The Tacotron character-to-spectrogram architecture consists of a convolution-bank-highway-GRU (CBHG) encoder, an attentional decoder, and a CBHG post-processing network. Due to the complexity of the architecture, we leave out a complete description and instead focus on our modifications. We find that incorporating speaker embeddings into the CBHG post-processing network degrades output quality, whereas incorporating speaker embeddings into the character encoder is necessary. Without a speaker-dependent CBHG encoder, the model is incapable of learning its attention mechanism and cannot generate meaningful output (see Appendix D.2 for speaker-dependent attention visualizations). In order to condition the encoder on the speaker, we use one site-specific embedding as an extra input to each highway layer at each timestep and initialize the CBHG RNN state with a second site-specific embedding. We also find that augmenting the decoder with speaker embeddings is helpful. We use one site-specific embedding as an extra input to the decoder pre-net, one extra site-specific embedding as the initial attention context vector for the attentional RNN, one site-specific embedding as the initial decoder GRU hidden state, and one site-specific embedding as a bias to the tanh in the content-based attention mechanism. 6 Model Samp. Freq. MOS Deep Voice 1 16 KHz 2.05 ± 0.24 Deep Voice 2 16 KHz 2.96 ± 0.38 Tacotron (Griffin-Lim) 24 KHz 2.57 ± 0.28 Tacotron (WaveNet) 24 KHz 4.17 ± 0.18 Table 1: Mean Opinion Score (MOS) evaluations with 95% confidence intervals of Deep Voice 1, Deep Voice 2, and Tacotron. Using the crowdMOS toolkit, batches of samples from these models were presented to raters on Mechanical Turk. Since batches contained samples from all models, the experiment naturally induces a comparison between the models. 4.2.2 Spectrogram-to-Waveform Model The original Tacotron implementation in (Wang et al., 2017) uses the Griffin-Lim algorithm to convert spectrograms to time-domain audio waveforms by iteratively estimating the unknown phases.6 We observe that minor noise in the input spectrogram causes noticeable estimation errors in the GriffinLim algorithm and the generated audio quality is degraded. To produce higher quality audio using Tacotron, instead of using Griffin-Lim, we train a WaveNet-based neural vocoder to convert from linear spectrograms to audio waveforms. The model used is equivalent to the Deep Voice 2 vocal model, but takes linear-scaled log-magnitude spectrograms instead of phoneme identity and F0 as input. The combined Tacotron-WaveNet model is shown in Fig. 3. As we will show in Section 5.1, WaveNet-based neural vocoder indeed significantly improves single-speaker Tacotron as well. 5 Results In this section, we will present the results on both single-speaker and multi-speaker speech synthesis using the described architectures. All model hyperparameters are presented in Appendix B. 5.1 Single-Speaker Speech Synthesis We train Deep Voice 1, Deep Voice 2, and Tacotron on an internal English speech database containing approximately 20 hours of single-speaker data. The intermediate evaluations of models in Deep Voice 1 and Deep Voice 2 can be found in Table 3 within Appendix A. We run an MOS evaluation using the crowdMOS framework (Ribeiro et al., 2011) to compare the quality of samples (Table 1). The results show conclusively that the architecture improvements in Deep Voice 2 yield significant gains in quality over Deep Voice 1. They also demonstrate that converting Tacotron-generated spectrograms to audio using WaveNet is preferable to using the iterative Griffin-Lim algorithm. 5.2 Multi-Speaker Speech Synthesis We train all the aforementioned models on the VCTK dataset with 44 hours of speech, which contains 108 speakers with approximately 400 utterances each. We also train all models on an internal dataset of audiobooks, which contains 477 speakers with 30 minutes of audio each (for a total of ⇠238 hours). The consistent sample quality observed from our models indicates that our architectures can easily learn hundreds of distinct voices with a variety of different accents and cadences. We also observe that the learned embeddings lie in a meaningful latent space (see Fig. 4 as an example and Appendix D for more details). In order to evaluate the quality of the synthesized audio, we run MOS evaluations using the crowdMOS framework, and present the results in Table 2. We purposefully include ground truth samples in the set being evaluated, because the accents in datasets are likely to be unfamiliar to our North American crowdsourced raters and will thus be rated poorly due to the accent rather than due to the model quality. By including ground truth samples, we are able to compare the MOS of the models with the ground truth MOS and thus evaluate the model quality rather than the data quality; however, the resulting MOS may be lower, due to the implicit comparison with the ground truth samples. Overall, we observe that the Deep Voice 2 model can approach an MOS value that is close to the ground truth, when low sampling rate and companding/expanding taken into account. 6Estimation of the unknown phases is done by repeatedly converting between frequency and time domain representations of the signal using the short-time Fourier transform and its inverse, substituting the magnitude of each frequency component to the predicted magnitude at each step. 7 Dataset Multi-Speaker Model Samp. Freq. MOS Acc. VCTK Deep Voice 2 (20-layer WaveNet) 16 KHz 2.87±0.13 99.9% VCTK Deep Voice 2 (40-layer WaveNet) 16 KHz 3.21±0.13 100 % VCTK Deep Voice 2 (60-layer WaveNet) 16 KHz 3.42±0.12 99.7% VCTK Deep Voice 2 (80-layer WaveNet) 16 KHz 3.53±0.12 99.9% VCTK Tacotron (Griffin-Lim) 24 KHz 1.68±0.12 99.4% VCTK Tacotron (20-layer WaveNet) 24 KHz 2.51±0.13 60.9% VCTK Ground Truth Data 48 KHz 4.65±0.06 99.7% Audiobooks Deep Voice 2 (80-layer WaveNet) 16 KHz 2.97±0.17 97.4% Audiobooks Tacotron (Griffin-Lim) 24 KHz 1.73±0.22 93.9% Audiobooks Tacotron (20-layer WaveNet) 24 KHz 2.11±0.20 66.5% Audiobooks Ground Truth Data 44.1 KHz 4.63±0.04 98.8% Table 2: MOS and classification accuracy for all multi-speaker models. To obtain MOS, we use crowdMOS toolkit as detailed in Table 1. We also present classification accuracies of the speaker discriminative models (see Appendix E for details) on the samples, showing that the synthesized voices are as distinguishable as ground truth audio. (a) (b) Figure 4: Principal components of the learned speaker embeddings for the (a) 80-layer vocal model and (b) character-to-spectrogram model for VCTK dataset. See Appendix D.3 for details. A multi-speaker TTS system with high sample quality but indistinguishable voices would result in high MOS, but fail to meet the desired objective of reproducing the input voices accurately. To show that our models not only generate high quality samples, but also generate distinguishable voices, we also measure the classification accuracy of a speaker discriminative model on our generated samples. The speaker discriminative is a convolutional network trained to classify utterances to their speakers, trained on the same dataset as the TTS systems themselves. If the voices were indistinguishable (or the audio quality was low), the classification accuracy would be much lower for synthesized samples than it is for the ground truth samples. As we demonstrate in Table 2, classification accuracy demonstrates that samples generated from our models are as distinguishable as the ground truth samples (see Appendix E for more details). The classification accuracy is only significantly lower for Tacotron with WaveNet, and we suspect that generation errors in the spectrogram are exacerbated by the WaveNet, as it is trained with ground truth spectrograms. 6 Conclusion In this work, we explore how entirely-neural speech synthesis pipelines may be extended to multispeaker text-to-speech via low-dimensional trainable speaker embeddings. We start by presenting Deep Voice 2, an improved single-speaker model. Next, we demonstrate the applicability of our technique by training both multi-speaker Deep Voice 2 and multi-speaker Tacotron models, and evaluate their quality through MOS. In conclusion, we use our speaker embedding technique to create high quality text-to-speech systems and conclusively show that neural speech synthesis models can learn effectively from small amounts of data spread among hundreds of different speakers. The results presented in this work suggest many directions for future research. Future work may test the limits of this technique and explore how many speakers these models can generalize to, how little data is truly required per speaker for high quality synthesis, whether new speakers can be added to a system by fixing model parameters and solely training new speaker embeddings, and whether the speaker embeddings can be used as a meaningful vector space, as is possible with word embeddings. 8 References O. Abdel-Hamid and H. Jiang. Fast speaker adaptation of hybrid NN/HMM model for speech recognition based on discriminative learning of speaker code. In ICASSP, 2013. S. O. Arik, M. Chrzanowski, A. Coates, G. Diamos, A. Gibiansky, Y. Kang, X. Li, J. Miller, J. Raiman, S. Sengupta, and M. Shoeybi. Deep voice: Real-time neural text-to-speech. In ICML, 2017. J. Bradbury, S. Merity, C. Xiong, and R. Socher. Quasi-recurrent neural networks. In ICLR, 2017. K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv:1406.1078, 2014. Y. Fan, Y. Qian, F. K. Soong, and L. He. Multi-speaker modeling and speaker adaptation for DNN-based TTS synthesis. In IEEE ICASSP, 2015. A. Graves, S. Fernández, F. Gomez, and J. Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In ICML, 2006. C.-C. Hsu, H.-T. Hwang, Y.-C. Wu, Y. Tsao, and H.-M. Wang. Voice conversion from unaligned corpora using variational autoencoding wasserstein generative adversarial networks. arXiv:1704.00849, 2017. S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014. G. Lample, M. Ballesteros, K. Kawakami, S. Subramanian, and C. Dyer. Neural architectures for named entity recognition. In Proc. NAACL-HLT, 2016. C. Li, X. Ma, B. Jiang, X. Li, X. Zhang, X. Liu, Y. Cao, A. Kannan, and Z. Zhu. Deep speaker: an end-to-end neural speaker embedding system. arXiv preprint arXiv:1705.02304, 2017. S. Mehri, K. Kumar, I. Gulrajani, R. Kumar, S. Jain, J. Sotelo, A. Courville, and Y. Bengio. SampleRNN: An unconditional end-to-end neural audio generation model. arXiv:1612.07837, 2016. A. v. d. Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. Senior, and K. Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv:1609.03499, 2016. D. A. Reynolds, T. F. Quatieri, and R. B. Dunn. Speaker verification using adapted gaussian mixture models. Digital signal processing, 10(1-3):19–41, 2000. F. Ribeiro, D. Florêncio, C. Zhang, and M. Seltzer. Crowdmos: An approach for crowdsourcing mean opinion score studies. In IEEE ICASSP, 2011. S. Ronanki, O. Watts, S. King, and G. E. Henter. Median-based generation of synthetic speech durations using a non-parametric approach. arXiv:1608.06134, 2016. T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. In NIPS, 2016. J. Sotelo, S. Mehri, K. Kumar, J. F. Santos, K. Kastner, A. Courville, and Y. Bengio. Char2wav: End-to-end speech synthesis. In ICLR2017 workshop submission, 2017. Y. Wang, R. Skerry-Ryan, D. Stanton, Y. Wu, R. J. Weiss, N. Jaitly, Z. Yang, Y. Xiao, Z. Chen, S. Bengio, et al. Tacotron: Towards end-to-end speech synthesis. In Interspeech, 2017. Z. Wu, P. Swietojanski, C. Veaux, S. Renals, and S. King. A study of speaker adaptation for DNN-based speech synthesis. In Interspeech, 2015. J. Yamagishi, T. Nose, H. Zen, Z.-H. Ling, T. Toda, K. Tokuda, S. King, and S. Renals. Robust speaker-adaptive hmm-based text-to-speech synthesis. IEEE Transactions on Audio, Speech, and Language Processing, 2009. S. Yang, Z. Wu, and L. Xie. On the training of DNN-based average voice model for speech synthesis. In Signal and Information Processing Association Annual Summit and Conference (APSIPA), Asia-Pacific, 2016. H. Zen and H. Sak. Unidirectional long short-term memory recurrent neural network with recurrent output layer for low-latency speech synthesis. In IEEE ICASSP, 2015. H. Zen, Y. Agiomyrgiannakis, N. Egberts, F. Henderson, and P. Szczepaniak. Fast, compact, and high quality LSTM-RNN based statistical parametric speech synthesizers for mobile devices. arXiv:1606.06061, 2016. 9 | 2017 | 515 |
7,025 | Eigen-Distortions of Hierarchical Representations Alexander Berardino Center for Neural Science New York University agb313@nyu.edu Johannes Ballé Center for Neural Science New York University∗ johannes.balle@nyu.edu Valero Laparra Image Processing Laboratory Universitat de València valero.laparra@uv.es Eero Simoncelli Howard Hughes Medical Institute, Center for Neural Science and Courant Institute of Mathematical Sciences New York University eero.simoncelli@nyu.edu Abstract We develop a method for comparing hierarchical image representations in terms of their ability to explain perceptual sensitivity in humans. Specifically, we utilize Fisher information to establish a model-derived prediction of sensitivity to local perturbations of an image. For a given image, we compute the eigenvectors of the Fisher information matrix with largest and smallest eigenvalues, corresponding to the model-predicted most- and least-noticeable image distortions, respectively. For human subjects, we then measure the amount of each distortion that can be reliably detected when added to the image. We use this method to test the ability of a variety of representations to mimic human perceptual sensitivity. We find that the early layers of VGG16, a deep neural network optimized for object recognition, provide a better match to human perception than later layers, and a better match than a 4-stage convolutional neural network (CNN) trained on a database of human ratings of distorted image quality. On the other hand, we find that simple models of early visual processing, incorporating one or more stages of local gain control, trained on the same database of distortion ratings, provide substantially better predictions of human sensitivity than either the CNN, or any combination of layers of VGG16. Human capabilities for recognizing complex visual patterns are believed to arise through a cascade of transformations, implemented by neurons in successive stages in the visual system. Several recent studies have suggested that representations of deep convolutional neural networks trained for object recognition can predict activity in areas of the primate ventral visual stream better than models constructed explicitly for that purpose (Yamins et al. [2014], Khaligh-Razavi and Kriegeskorte [2014]). These results have inspired exploration of deep networks trained on object recognition as models of human perception, explicitly employing their representations as perceptual distortion metrics or loss functions (Hénaff and Simoncelli [2016], Johnson et al. [2016], Dosovitskiy and Brox [2016]). On the other hand, several other studies have used synthesis techniques to generate images that indicate a profound mismatch between the sensitivity of these networks and that of human observers. Specifically, Szegedy et al. [2013] constructed image distortions, imperceptible to humans, that cause their networks to grossly misclassify objects. Similarly, Nguyen and Clune [2015] optimized randomly initialized images to achieve reliable recognition by a network, but found that the resulting ∗Currently at Google, Inc. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. ‘fooling images’ were uninterpretable by human viewers. Simpler networks, designed for texture classification and constrained to mimic the early visual system, do not exhibit such failures (Portilla and Simoncelli [2000]). These results have prompted efforts to understand why generalization failures of this type are so consistent across deep network architectures, and to develop more robust training methods to defend networks against attacks designed to exploit these weaknesses (Goodfellow et al. [2014]). From the perspective of modeling human perception, these synthesis failures suggest that representational spaces within deep neural networks deviate significantly from those of humans, and that methods for comparing representational similarity, based on fixed object classes and discrete sampling of the representational space, are insufficient to expose these deviations. If we are going to use such networks as models for human perception, we need better methods of comparing model representations to human vision. Recent work has taken the first step in this direction, by analyzing deep networks’ robustness to visual distortions on classification tasks, as well as the similarity of classification errors that humans and deep networks make in the presence of the same kind of distortion (Dodge and Karam [2017]). Here, we aim to accomplish something in the same spirit, but rather than testing on a set of handselected examples, we develop a model-constrained synthesis method for generating targeted test stimuli that can be used to compare the layer-wise representational sensitivity of a model to human perceptual sensitivity. Utilizing Fisher information, we isolate the model-predicted most and least noticeable changes to an image. We test these predictions by determining how well human observers can discriminate these same changes. We apply this method to six layers of VGG16 (Simonyan and Zisserman [2015]), a deep convolutional neural network (CNN) trained to classify objects. We also apply the method to several models explicitly trained to predict human sensitivity to image distortions, including both a 4-stage generic CNN, an optimally-weighted version of VGG16, and a family of highly-structured models explicitly constructed to mimic the physiology of the early human visual system. Example images from the paper, as well as additional examples, are available at http://www.cns.nyu.edu/~lcv/eigendistortions/. 1 Predicting discrimination thresholds Suppose we have a model for human visual representation, defined by conditional density p(⃗r|⃗x), where ⃗x is an N-dimensional vector containing the image pixels, and ⃗r is an M-dimensional random vector representing responses internal to the visual system (e.g., firing rates of a population of neurons). If the image is modified by the addition of a distortion vector, ⃗x + αˆu, where ˆu is a unit vector, and scalar α controls the amplitude of distortion, the model can be used to predict the threshold at which the distorted image can be reliably distinguished from the original image. Specifically, one can express a lower bound on the discrimination threshold in direction ˆu for any observer or model that bases its judgments on ⃗r (Seriès et al. [2009]): T(ˆu; ⃗x) ≥β q ˆuT J−1[⃗x]ˆu (1) where β is a scale factor that depends on the noise amplitude of the internal representation (as well as experimental conditions, when measuring discrimination thresholds of human observers), and J[⃗x] is the Fisher information matrix (FIM; Fisher [1925]), a second-order expansion of the log likelihood: J[⃗x] = E⃗r|⃗x ∂ ∂⃗x log p(⃗r|⃗x) ∂ ∂⃗x log p(⃗r|⃗x) T (2) Here, we restrict ourselves to models that can be expressed as a deterministic (and differentiable) mapping from the input pixels to mean output response vector, f(⃗x), with additive white Gaussian noise in the response space. The log likelihood in this case reduces to a quadratic form: log p(⃗r|⃗x) = −1 2 [⃗r −f(⃗x)]T [⃗r −f(⃗x)] + const. Substituting this into Eq. (2) gives: J[⃗x] = ∂f ∂⃗x T ∂f ∂⃗x Thus, for these models, the Fisher information matrix induces a locally adaptive Euclidean metric on the space of images, as specified by the Jacobian matrix, ∂f/∂⃗x. 2 Image pixel 1 pixel 2 p(~rA|~x) model A model B p(~rB|~x) response 1 response 2 response 1 response 2 pixel 1 pixel 2 JB[~x] JA[~x] ˆuT J−1 B [~x] ˆu ˆuT J−1 A [~x] ˆu T(ˆu; ~x) (human) T(ˆu; ~x) ˆu For unit vectors : (human) q" ˆuT J−1 A [~x] ˆu # ˆu q" ˆuT J−1 B [~x] ˆu # ˆu ˆu Figure 1: Measuring and comparing model-derived predictions of image discriminability. Two models are applied to an image (depicted as a point ⃗x in the space of pixel values), producing response vectors ⃗rA and ⃗rB. Responses are assumed to be stochastic, and drawn from known distributions p(⃗rA|⃗x) and p(⃗rB|⃗x). The Fisher Information Matrices (FIM) of the models, JA[⃗x] and JB[⃗x], provide a quadratic approximation of the discriminability of distortions relative to an image (rightmost plot, colored ellipses). The extremal eigenvalues and eigenvectors of the FIMs (directions indicated by colored lines) provide predictions of the most and least visible distortions. We test these predictions by measuring human discriminability in these directions (colored points). In this example, the ratio of discriminability along the extremal eigenvectors is larger for model A than for model B, indicating that model A provides a better description of human perception of distortions (for this image). 1.1 Extremal eigen-distortions The FIM is generally too large to be stored in memory or inverted. Even if we could store and invert it, the high dimensionality of input (pixel) space renders the set of possible distortions too large to test experimentally. We resolve both of these issues by restricting our consideration to the mostand least-noticeable distortion directions, corresponding to the eigenvectors of J[⃗x] with largest and smallest eigenvalues, respectively. First, note that if a distortion direction ˆe is an eigenvector of J[⃗x] with associated eigenvalue λ, then it is also an eigenvector of J−1[⃗x] (with eigenvalue 1/λ), since the FIM is symmetric and positive semi-definite. In this case, Eq. (1) becomes T(ˆe; ⃗x) ≥β/ √ λ If human discrimination thresholds attain this bound, or are a constant multiple above it, then the ratio of discrimination thresholds along two different eigenvectors is the square root of the ratio of their associated eigenvalues. In this case, the strongest prediction arising from a given model is the ratio of the extremal (maximal and minimal) eigenvalues of its FIM, which can be compared to the ratio of human discrimination thresholds for distortions in the directions of the corresponding extremal eigenvectors (Fig. 1). Although the FIM cannot be stored, it is straightforward to compute its product with an input vector (i.e., an image). Using this operation, we can solve for the extremal eigenvectors using the wellknown power iteration method (von Mises and Pollaczek-Geiringer [1929]). Specifically, to obtain the maximal eigenvalue of a given function and its associated eigenvector (λm and ˆem, respectively), we start with a vector consisting of white noise, ˆe(0) m , and then iteratively apply the FIM, renormalizing the resulting vector, until convergence: λ (k+1) m =
J[⃗x]ˆe (k) m
; ˆe (k+1) m = J[⃗x]ˆe (k) m /λ(k+1) m To obtain the minimal eigenvector, ˆel, we perform a second iteration using the FIM with the maximal eigenvalue subtracted from the diagonal: λ (k+1) l =
(J[⃗x] −λmI) ˆe (k) l
; ˆe (k+1) l = (J[⃗x] −λmI) ˆe (k) l /λ(k+1) l 3 1.2 Measuring human discrimination thresholds For each model under consideration, we synthesized extremal eigen-distortions for 6 images from the Kodak image set2. We then estimated human thresholds for detecting these distortions using a two-alternative forced-choice task. On each trial, subjects were shown (for one second each with a half second blank screen between images, and in randomized order) a photographic image (18 degrees across), ⃗x, and the same image distorted using one of the extremal eigenvectors, ⃗x + αˆe, and then asked to indicate which image appeared more distorted. This procedure was repeated for 120 trials for each distortion vector, ˆe, over a range of α values, with ordering chosen by a standard psychophysical staircase procedure. The proportion of correct responses, as a function of α, was fit with a cumulative Gaussian function, and the subject’s detection threshold, Ts(ˆe; ⃗x) was estimated as the value of α for which the subject could distinguish the distorted image 75% of the time. We computed the natural logarithm of the ratio of these detection thresholds for the minimal and maximal eigenvectors, and averaged this over images (indexed by i) and subjects (indexed by s): D(f) = 1 S 1 I S X s=1 I X i=1 log ∥Ts(ˆeli; ⃗xi)/Ts(ˆemi; ⃗xi)∥ where Ts indicates the threshold measured for human subject s. D(f) provides a measure of a model’s ability to predict human performance with respect to distortion detection: the ratio of thresholds for model-generated extremal distortions will be larger for models that are more similar to the human subjects (Fig. 1). 2 Probing representational sensitivity of VGG16 layers ln threshold 2 1 0 -1 -2 -3 -4 VGG16 layer Front 2 3 4 5 6 MSE Figure 2: Top: Average log-thresholds for detection of the least-noticeable (red) and most-noticeable (blue) eigendistortions derived from layers within VGG16 (10 observers), and a baseline model (MSE) for which distortions in all directions are equally visible. We begin by examining discrimination predictions derived from the deep convolutional network known as VGG16, which has been previously studied in the context of perceptual sensitivity. Specifically, Johnson et al. [2016] trained a neural network to generate super-resolution images using the representation of an intermediate layer of VGG16 as a perceptual loss function, and showed that the images this network produced looked significantly better than images generated with simpler loss functions (e.g. pixel-domain mean squared error). Hénaff and Simoncelli [2016] used VGG16 as an image metric to synthesize minimal length paths (geodesics) between images modified by simple global transformations (rotation, dilation, etc.). The authors found that a modified version of the network produced geodesics that captured these global transformations well (as measured perceptually), especially in deeper layers. Implicit in both of these studies, and others like them (e.g., Dosovitskiy and Brox [2016]), is the idea that a deep neural network trained to recognize objects may exhibit additional human perceptual characteristics. Here, we compare VGG16’s sensitivity to distortions directly to human perceptual sensitivity to the same distortions. We transformed luminance-valued images and distortion vectors to proper inputs for VGG16 following the preprocessing steps described in the original paper, and verified that our implementation replicated the published object recognition results. For human perceptual measurements, all images were transformed to produce the same luminance values on our calibrated display as those assumed by the model. We computed eigen-distortions of VGG16 at 6 different layers: the rectified convolutional layer immediately prior to the first max-pooling operation (Front), as well as each subsequent layer following a pooling operation (Layer2–Layer6). A subset of these are shown, both in isolation and superimposed on the image from which they were derived, in Fig. 3. Note that the detectability of these distortions in isolation is not necessarily indicative of their detectability when superimposed 2Downloaded from http://www.cipr.rpi.edu/resource/stills/kodak.html. 4 Most-noticeable eigen-distortions 4ˆem Front Layer 3 Layer 5 Image X Least-noticeable eigen-distortions 30ˆel Front Layer 3 Layer 5 Image X Figure 3: Eigen-distortions derived from three layers of the VGG16 network for an example image. Images are best viewed in a display with luminance range from 5 to 300 cd/m2 and a γ exponent of 2.4. Top: Most-noticeable eigen-distortions. All distortion image intensities are scaled by the same amount (×4). Second row: Original image (⃗x), and sum of this image with each of the eigendistortions. Third and fourth rows: Same, for the least-noticeable eigen-distortions. Distortion image intensities are scaled the same (×30). on the underlying image, as measured in our experiments. We compared all of these predictions to a baseline model (MSE), where the image transformation, f(⃗x), is replaced by the identity matrix. For this model, every distortion direction is equally discriminable, and distortions are generated as samples of Gaussian white noise. Average Human detection thresholds measured across 10 subjects and 6 base images are summarized in Fig. 2, and indicate that the early layers of VGG16 (in particular, Front and Layer3) are better predictors of human sensitivity than the deeper layers (Layer4, Layer5, Layer6). Specifically, the most noticeable eigen-distortions from representations within VGG16 become more discriminable with depth, but so generally do the least-noticeable eigen-distortions. This discrepancy could arise from overlearned invariances, or invariances induced by network architecture (e.g. layer 6, the first stage in the network where the number of output coefficients falls below the number of input pixels, is an under-complete representation). Notably, including the "L2 pooling" modification suggested in Hénaff and Simoncelli [2016] did not significantly alter the visibility of eigen-distortions synthesized from VGG16 (images and data not shown). 3 Probing representational similarity of IQA-optimized models The results above suggest that training a neural network to recognize objects imparts some ability to predict human sensitivity to distortions. However, we find that deeper layers of the network produce worse predictions than shallower layers. This could be a result of the mismatched training objective 5 Convolution, 5x5 filters Downsampling 2x2, batch normalization, rectification Figure 4: Architecture of a 4-layer Convolutional Neural Network (CNN). Each layer consists of a convolution, downsampling, and a rectifying nonlinearity (see text). The network was trained, using batch normalization, to maximize correlation with the TID-2008 database of human image distortion sensitivity. function (object recognition) or the particular architecture of the network. Since we clearly cannot probe the entire space of networks that achieve good results on object recognition, we aim instead to probe a more general form of the latter question. Specifically, we train multiple models of differing architecture to predict human image quality ratings, and test their ability to generalize by measuring human sensitivity to their eigen-distortions. We constructed a generic 4-layer convolutional neural network (CNN, 436908 parameters - Fig. 4). Within this network, each layer applies a bank of 5 × 5 convolution filters to the outputs of the previous layer (or, for the first layer, the input image). The convolution responses are subsampled by a factor of 2 along each spatial dimension (the number of filters at each layer is increased by the same factor to maintain a complete representation at each stage). Following each convolution, we employ batch normalization, in which all responses are divided by the standard deviation taken over all spatial positions and all layers, and over a batch of input images (Ioffe and Szegedy [2015]). Finally, outputs are rectified with a softplus nonlinearity, log(1 + exp(x)). After training, the batch normalization factors are fixed to the global mean and variance across the entire training set. LN LG LGG On-Off Figure 5: Architecture of our LGN model (On-Off), and several reduced models (LGG, LG, and LN). Each model was trained to maximize correlation with the TID-2008 database of human image distortion sensitivity. We compare our generic CNN to a model reflecting the structure and computations of the Lateral Geniculate Nucleus (LGN), the visual relay center of the Thalamus. Previous results indicate that such models can successfully mimic human judgments of image quality (Laparra et al. [2017]). The full model (On-Off), is constructed from a cascade of linear filtering, and nonlinear computational modules (local gain control and rectification). The first stage decomposes the image into two separate channels. Within each channel, the image is filtered by a differenceof-Gaussians (DoG) filter (2 parameters, controlling spatial size of the Gaussians - DoG filters in On and Off channels are assumed to be of opposite sign). Following this linear stage, the outputs are normalized by two sequential stages of gain control, a known property of LGN neurons (Mante et al. [2008]). Filter outputs are first normalized by a local measure of luminance (2 parameters, controlling filter size and amplitude), and subsequently by a local measure of contrast (2 parameters, again controlling size and amplitude). Finally, the outputs of each channel are rectified by a softplus nonlinearity, for a total of 12 model parameters. In order to evaluate the necessity of each structural element of this model, we also test three reduced sub-models, each trained on the same data (Fig. 5). Finally, we compare both of these models to a version of VGG16 targeted at image quality assessment (VGGIQA). This model computes the weighted mean squared error over all rectified convolutional layers of the VGG16 network (13 weight parameters in total), with weights trained on the same perceptual data as the other models. 6 3.1 Optimizing models for IQA We trained all of the models on the TID-2008 database, which contains a large set of original and distorted images, along with corresponding human ratings of perceived distortion [Ponomarenko et al., 2009]. Perceptual distortion distance for each model was calculated as the Euclidean distance between the model’s representations of the original and distorted images: Dφ = ||fφ(⃗x) −fφ(⃗x ′)||2 For each model, we optimized its parameters, φ, so as to maximize the correlation between the model-predicted perceptual distance, Dφ and the human mean opinion scores (MOS) reported in the TID-2008 database: φ∗= arg max φ corr(Dφ, MOS) Optimization of VGG-IQA weights was performed using non-negative least squares. Optimization of all other models was performed using regularized stochastic gradient ascent with the Adam algorithm (Kingma and Ba [2015]). 3.2 Comparing perceptual predictions of generic and structured models IQA Model ln threshold MSE LN LG LGG On-Off CNN VGG IQA −4 −3 −2 −1 0 1 2 3 Figure 6: Top: Average log-thresholds for detection of the least-noticeable (red) and most-noticeable (blue) eigen-distortions derived from IQA models (19 human observers). After training, we evaluated each model’s predictive performance using traditional cross-validation methods on a held-out test set of the TID-2008 database. By this measure, all three models performed well (Pearson correlation: CNN ρ = .86, On-Off: ρ = .82, VGG-IQA: ρ = .84). Stepping beyond the TID-2008 database, and using the more stringent eigen-distortion test, yielded a very different outcome (Figs. 7, 6 and 8). The average detection thresholds measured across 19 human subjects and 6 base images indicates that all of our models surpassed the baseline model in at least one of their predictions. However, the eigen-distortions derived from the generic CNN and VGG-IQA were significantly less predictive of human sensitivity than those derived from the On-Off model (Fig. 6) and, surprisingly, even somewhat less predictive than early layers of VGG16 (see Fig. 8). Thus, the eigen-distortion test reveals generalization failures in the CNN and VGG16 architectures that are not exposed by traditional methods of cross-validation. On the other hand, the models with architectures that mimic biology (On-Off, LGG, LG) are constrained in a way that enables better generalization. We compared these results to the performance of each of our reduced LGN models (Fig. 5), to determine the necessity of each structural element of the full On-Off model. As expected, the models incorporating more LGN functional elements performed better on a traditional cross-validation test, with the most complex of the reduced models (LGG) performing at the same level as On-Off and the CNN (LN: ρ = .66, LG: ρ = .74, LGG: ρ = .83). Likewise, models with more LGN functional elements produced eigen-distortions with increasing predictive accuracy (Fig. 6 and 8). It is worth noting that the three LGN models that incorporate some form of local gain control perform significantly better than the CNN and VGG-IQA models, and better than all layers of VGG16, including the early layers (see Fig. 8). 4 Discussion We have presented a new methodology for synthesizing most and least-noticeable distortions from perceptual models, applied this methodology to a set of different models, and tested the resulting predictions by measuring their detectability by human subjects. We show that this methodology provides a powerful form of “Turing test”: perceptual measurements on this limited set of modeloptimized examples reveal failures that are not be apparent in measurements on a large set of hand-curated examples. 7 Most-noticeable eigen-distortion (4ˆem) LG LGG On-Off CNN VGG-IQA Least-noticeable eigen-distortion (30ˆel) LG LGG On-Off CNN VGG-IQA Figure 7: Eigen-distortions for several models trained to maximize correlation with human distortion ratings in TID-2008 [Ponomarenko et al., 2009]. Images are best viewed in a display with luminance range from 5 to 300 cd/m2 and a γ exponent of 2.4. Top: Most-noticeable eigen-distortions. All distortion image intensities are re-scaled by the same amount (×4). Second row: Original image (⃗x), and sum of this image with each eigen-distortion. Third and fourth rows: Same, for the least-noticeable eigen-distortions. All distortion image intensities re-scaled by the same amount (×30). We are not the first to introduce a method of this kind. Wang and Simoncelli [2008] introduced Maximum Differentiation (MAD) competition, which creates images optimized for one metric while holding constant a competing metric’s rating. Our method relies on a Fisher approximation to generate extremal perturbations, and uses the ratio of their empirically measured discrimination thresholds as an absolute measure of alignment to human sensitivity (as opposed to relative pairwise comparisons of model performance). Our method can easily be generalized to incorporate more physiologically realistic noise assumptions, such as Poisson noise, and could potentially be extended to include noise at each stage of a hierarchical model. We’ve used this method to analyze the ability of VGG16, a deep convolutional neural network trained to recognize objects, to account for human perceptual sensitivity. First, we find that the early layers of the network are moderately successful in this regard. Second, these layers (Front, Layer 3) surpassed the predictive power of a generic shallow CNN explicitly trained to predict human perceptual sensitivity, but underperformed models of the LGN trained on the same objective. And third, perceptual sensitivity predictions synthesized from a layer of VGG16 decline in accuracy for deeper layers. We also showed that a highly structured model of the LGN generates predictions that substantially surpass the predictive power of any individual layer of VGG16, as well as a version of VGG16 trained to fit human sensitivity data (VGG-IQA), or a generic 4-layer CNN trained on the same 8 ln threshold ratio (D(f)) 0 1 2 3 4 5 6 7 MSE LN LG LGG On-Off CNN VGG IQA IQA Models FRONT 2 3 4 5 6 VGG16 Layers Figure 8: Average empirical log-threshold ratio (D) for eigen-distortions derived from each IQA optimized model and each layer of VGG16. data. These failures of both the shallow and deep neural networks were not seen in traditional cross-validation tests on the human sensitivity data, but were revealed by measuring human sensitivity to model-synthesized eigen-distortions. Finally, we confirmed that known functional properties of the early visual system (On and Off pathways) and ubiquitous neural computations (local gain control, Carandini and Heeger [2012]) have a direct impact on perceptual sensitivity, a finding that is buttressed by several other published results (Malo et al. [2006], Lyu and Simoncelli [2008], Laparra et al. [2010, 2017], Ballé et al. [2017]). Most importantly, we demonstrate the utility of prior knowledge in constraining the choice of models. Although the biologically structured models used components similar to generic CNNs, they had far fewer layers and their parameterization was highly restricted, thus allowing a far more limited family of transformations. Despite this, they outperformed the generic CNN and VGG models. These structural choices were informed by knowledge of primate visual physiology, and training on human perceptual data was used to determine parameters of the model that are either unknown or underconstrained by current experimental knowledge. Our results imply that this imposed structure serves as a powerful regularizer, enabling these models to generalize much better than generic unstructured networks. Acknowledgements The authors would like to thank the members of the LCV and VNL groups at NYU, especially Olivier Henaff and Najib Majaj, for helpful feedback and comments on the manuscript. Additionally, we thank Rebecca Walton and Lydia Cassard for their tireless efforts in collecting the perceptual data presented here. This work was funded in part by the Howard Hughes Medical Institute, the NEI Visual Neuroscience Training Program and the Samuel J. and Joan B. Williamson Fellowship. References J. Ballé, V. Laparra, and E.P. Simoncelli. End-to-end optimized image compression. ICLR 2017, pages 1–27, March 2017. Matteo Carandini and David J. Heeger. Normalization as a canonical neural computation. Nature Reviews Neuroscience, 13, 2012. Samuel Dodge and Lina Karam. A study and comparison of human and deep learning recognition performance under visual distortions. arxiv.org, 2017. Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. NIP2 2016: Neural Information Processing Systems, 2016. R.A. Fisher. Theory of statistical estimation. Proceedings of the Cambridge Philosophical Society, 22:700–725, 1925. I.J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and Harnessing Adversarial Examples. ICLR 2014, December 2014. 9 Olivier J Hénaff and Eero P Simoncelli. Geodesics of learned representations. ICLR 2016, November 2016. Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. ICLR 2015, February 2015. Justin Johnson, Alexandre Alahi, and Fei Fei Li. Perceptual losses for real-time style transfer and super-resolution. ECCV: The European Conference on Computer Vision, 2016. Seyed-Mahdi Khaligh-Razavi and Nikolaus Kriegeskorte. Deep Supervised, but Not Unsupervised, Models May Explain IT Cortical Representation. PLOS Computational Biology, 10(11):e1003915, November 2014. Diederik P Kingma and Jimmy Lei Ba. ADAM: A Method for Stochastic Optimization. ICLR 2015, pages 1–15, January 2015. V. Laparra, A. Berardino, J. Ballé, and E.P. Simoncelli. Perceptually optimized image rendering. Journal of the Optical Society of America A, 34(9):1511–1525, September 2017. Valero Laparra, Jordi Muñoz-Marí, and Jesús Malo. Divisive normalization image quality metric revisited. Journal of the Optical Society of America A, 27, 2010. Siwei Lyu and Eero P. Simoncelli. Nonlinear image representation using divisive normalization. Proc. Computer Vision and Pattern Recognition, 2008. J. Malo, I Epifanio, R. Navarro, and E.P. Simoncelli. Nonlinear image representation for efficient perceptual coding. IEEE Transactions on Image Processing, 15, 2006. Valerio Mante, Vincent Bonin, and Matteo Carandini. Functional mechanisms shaping lateral geniculate responses to artificial and natural stimuli. Neuron, 58(4):625–638, May 2008. J. Nguyen, A. Yosinski and J. Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. in computer vision and pattern recognition. IEEE CVPR, 2015. N Ponomarenko, V Lukin, and A Zelensky. TID2008-a database for evaluation of full-reference visual quality assessment metrics. Advances of Modern . . ., 2009. Javier Portilla and Eero P. Simoncelli. A parametric texture model based on joint statistics of complex wavelet coefficients. Int’l Journal of Computer Vision, 40(1):"49–71", Dec 2000. Peggy Seriès, Alan A. Stocker, and Eero P. Simoncelli. Is the homunculus "aware" of sensory adaptation? Neural Computation, 2009. Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. ICLR 2015, September 2015. C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. arXiv.org, December 2013. Richard von Mises and H. Pollaczek-Geiringer. Praktische verfahren der gleichungsauflösung. ZAMM Zeitschrift für Angewandte Mathematik und Mechanik, 9:152–164, 1929. Zhou Wang and Eero P. Simoncelli. Maximum differentiation (mad) competition: A methodology for comparing computational models of perceptual qualities. Journal of Vision, 2008. D. L. K. Yamins, H. Hong, C. Cadieu, E.A. Solomon, D. Seibert, and J.J. DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, June 2014. 10 | 2017 | 516 |
7,026 | Learning to Prune Deep Neural Networks via Layer-wise Optimal Brain Surgeon Xin Dong Nanyang Technological University, Singapore n1503521a@e.ntu.edu.sg Shangyu Chen Nanyang Technological University, Singapore schen025@e.ntu.edu.sg Sinno Jialin Pan Nanyang Technological University, Singapore sinnopan@ntu.edu.sg Abstract How to develop slim and accurate deep neural networks has become crucial for realworld applications, especially for those employed in embedded systems. Though previous work along this research line has shown some promising results, most existing methods either fail to significantly compress a well-trained deep network or require a heavy retraining process for the pruned deep network to re-boost its prediction performance. In this paper, we propose a new layer-wise pruning method for deep neural networks. In our proposed method, parameters of each individual layer are pruned independently based on second order derivatives of a layer-wise error function with respect to the corresponding parameters. We prove that the final prediction performance drop after pruning is bounded by a linear combination of the reconstructed errors caused at each layer. By controlling layer-wise errors properly, one only needs to perform a light retraining process on the pruned network to resume its original prediction performance. We conduct extensive experiments on benchmark datasets to demonstrate the effectiveness of our pruning method compared with several state-of-the-art baseline methods. Codes of our work are released at: https://github.com/csyhhu/L-OBS. 1 Introduction Intuitively, deep neural networks [1] can approximate predictive functions of arbitrary complexity well when they are of a huge amount of parameters, i.e., a lot of layers and neurons. In practice, the size of deep neural networks has been being tremendously increased, from LeNet-5 with less than 1M parameters [2] to VGG-16 with 133M parameters [3]. Such a large number of parameters not only make deep models memory intensive and computationally expensive, but also urge researchers to dig into redundancy of deep neural networks. On one hand, in neuroscience, recent studies point out that there are significant redundant neurons in human brain, and memory may have relation with vanishment of specific synapses [4]. On the other hand, in machine learning, both theoretical analysis and empirical experiments have shown the evidence of redundancy in several deep models [5, 6]. Therefore, it is possible to compress deep neural networks without or with little loss in prediction by pruning parameters with carefully designed criteria. However, finding an optimal pruning solution is NP-hard because the search space for pruning is exponential in terms of parameter size. Recent work mainly focuses on developing efficient algorithms to obtain a near-optimal pruning solution [7, 8, 9, 10, 11]. A common idea behind most exiting approaches is to select parameters for pruning based on certain criteria, such as increase in training error, magnitude of the parameter values, etc. As most of the existing pruning criteria are 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. designed heuristically, there is no guarantee that prediction performance of a deep neural network can be preserved after pruning. Therefore, a time-consuming retraining process is usually needed to boost the performance of the trimmed neural network. Instead of consuming efforts on a whole deep network, a layer-wise pruning method, Net-Trim, was proposed to learn sparse parameters by minimizing reconstructed error for each individual layer [6]. A theoretical analysis is provided that the overall performance drop of the deep network is bounded by the sum of reconstructed errors for each layer. In this way, the pruned deep network has a theoretical guarantee on its error. However, as Net-Trim adopts ℓ1-norm to induce sparsity for pruning, it fails to obtain high compression ratio compared with other methods [9, 11]. In this paper, we propose a new layer-wise pruning method for deep neural networks, aiming to achieve the following three goals: 1) For each layer, parameters can be highly compressed after pruning, while the reconstructed error is small. 2) There is a theoretical guarantee on the overall prediction performance of the pruned deep neural network in terms of reconstructed errors for each layer. 3) After the deep network is pruned, only a light retraining process is required to resume its original prediction performance. To achieve our first goal, we borrow an idea from some classic pruning approaches for shallow neural networks, such as optimal brain damage (OBD) [12] and optimal brain surgeon (OBS) [13]. These classic methods approximate a change in the error function via functional Taylor Series, and identify unimportant weights based on second order derivatives. Though these approaches have proven to be effective for shallow neural networks, it remains challenging to extend them for deep neural networks because of the high computational cost on computing second order derivatives, i.e., the inverse of the Hessian matrix over all the parameters. In this work, as we restrict the computation on second order derivatives w.r.t. the parameters of each individual layer only, i.e., the Hessian matrix is only over parameters for a specific layer, the computation becomes tractable. Moreover, we utilize characteristics of back-propagation for fully-connected layers in well-trained deep networks to further reduce computational complexity of the inverse operation of the Hessian matrix. To achieve our second goal, based on the theoretical results in [6], we provide a proof on the bound of performance drop before and after pruning in terms of the reconstructed errors for each layer. With such a layer-wise pruning framework using second-order derivatives for trimming parameters for each layer, we empirically show that after significantly pruning parameters, there is only a little drop of prediction performance compared with that before pruning. Therefore, only a light retraining process is needed to resume the performance, which achieves our third goal. The contributions of this paper are summarized as follows. 1) We propose a new layer-wise pruning method for deep neural networks, which is able to significantly trim networks and preserve the prediction performance of networks after pruning with a theoretical guarantee. In addition, with the proposed method, a time-consuming retraining process for re-boosting the performance of the pruned network is waived. 2) We conduct extensive experiments to verify the effectiveness of our proposed method compared with several state-of-the-art approaches. 2 Related Works and Preliminary Pruning methods have been widely used for model compression in early neural networks [7] and modern deep neural networks [6, 8, 9, 10, 11]. In the past, with relatively small size of training data, pruning is crucial to avoid overfitting. Classical methods include OBD and OBS. These methods aim to prune parameters with the least increase of error approximated by second order derivatives. However, computation of the Hessian inverse over all the parameters is expensive. In OBD, the Hessian matrix is restricted to be a diagonal matrix to make it computationally tractable. However, this approach implicitly assumes parameters have no interactions, which may hurt the pruning performance. Different from OBD, OBS makes use of the full Hessian matrix for pruning. It obtains better performance while is much more computationally expensive even using Woodbury matrix identity [14], which is an iterative method to compute the Hessian inverse. For example, using OBS on VGG-16 naturally requires to compute inverse of the Hessian matrix with a size of 133M × 133M. Regarding pruning for modern deep models, Han et al. [9] proposed to delete unimportant parameters based on magnitude of their absolute values, and retrain the remaining ones to recover the original prediction performance. This method achieves considerable compression ratio in practice. However, 2 as pointed out by pioneer research work [12, 13], parameters with low magnitude of their absolute values can be necessary for low error. Therefore, magnitude-based approaches may eliminate wrong parameters, resulting in a big prediction performance drop right after pruning, and poor robustness before retraining [15]. Though some variants have tried to find better magnitude-based criteria [16, 17], the significant drop of prediction performance after pruning still remains. To avoid pruning wrong parameters, Guo et al. [11] introduced a mask matrix to indicate the state of network connection for dynamically pruning after each gradient decent step. Jin et al. [18] proposed an iterative hard thresholding approach to re-activate the pruned parameters after each pruning phase. Besides Net-trim, which is a layer-wise pruning method discussed in the previous section, there is some other work proposed to induce sparsity or low-rank approximation on certain layers for pruning [19, 20]. However, as the ℓ0-norm or the ℓ1-norm sparsity-induced regularization term increases difficulty in optimization, the pruned deep neural networks using these methods either obtain much smaller compression ratio [6] compared with direct pruning methods or require retraining of the whole network to prevent accumulation of errors [10]. Optimal Brain Surgeon As our proposed layer-wise pruning method is an extension of OBS on deep neural networks, we briefly review the basic of OBS here. Consider a network in terms of parameters w trained to a local minimum in error. The functional Taylor series of the error w.r.t. w is: δE = ∂E ∂w ⊤δw + 1 2δw⊤Hδw + O ∥δw∥3 , where δ denotes a perturbation of a corresponding variable, H ≡∂2E/∂w2 ∈Rm×m is the Hessian matrix, where m is the number of parameters, and O(∥δΘl∥3) is the third and all higher order terms. For a network trained to a local minimum in error, the first term vanishes, and the term O(∥δΘl∥3) can be ignored. In OBS, the goal is to set one of the parameters to zero, denoted by wq (scalar), to minimize δE in each pruning iteration. The resultant optimization problem is written as follows, min q 1 2δw⊤Hδw, s.t. e⊤ q δw + wq = 0, (1) where eq is the unit selecting vector whose q-th element is 1 and otherwise 0. As shown in [21], the optimization problem (1) can be solved by the Lagrange multipliers method. Note that a computation bottleneck of OBS is to calculate and store the non-diagonal Hesssian matrix and its inverse, which makes it impractical on pruning deep models which are usually of a huge number of parameters. 3 Layer-wise Optimal Brain Surgeon 3.1 Problem Statement Given a training set of n instances, {(xj, yj)}n j=1, and a well-trained deep neural network of L layers (excluding the input layer)1. Denote the input and the output of the whole deep neural network by X=[x1, ..., xn]∈Rd×n and Y∈Rn×1, respectively. For a layer l, we denote the input and output of the layer by Yl−1 =[yl−1 1 , ..., yl−1 n ]∈Rml−1×n and Yl =[yl 1, ..., yl n]∈Rml×n, respectively, where yl i can be considered as a representation of xi in layer l, and Y0 = X, YL = Y, and m0 = d. Using one forward-pass step, we have Yl =σ(Zl), where Zl =Wl ⊤Yl−1 with Wl ∈Rml−1×ml being the matrix of parameters for layer l, and σ(·) is the activation function. For convenience in presentation and proof, we define the activation function σ(·) as the rectified linear unit (ReLU) [22]. We further denote by Θl ∈Rml−1ml×1 the vectorization of Wl. For a well-trained neural network, Yl, Zl and Θ∗ l are all fixed matrixes and contain most information of the neural network. The goal of pruning is to set the values of some elements in Θl to be zero. 3.2 Layer-Wise Error During layer-wise pruning in layer l, the input Yl−1 is fixed as the same as the well-trained network. Suppose we set the q-th element of Θl, denoted by Θl[q], to be zero, and get a new parameter vector, denoted by ˆΘl. With Yl−1, we obtain a new output for layer l, denoted by ˆYl. Consider the root of 1For simplicity in presentation, we suppose the neural network is a feed-forward (fully-connected) network. In Section 3.4, we will show how to extend our method to filter layers in Convolutional Neural Networks. 3 mean square error between ˆYl and Yl over the whole training data as the layer-wise error: εl = v u u t 1 n n X j=1 (ˆyl j −yl j)⊤(ˆyl j −yl j) = 1 √n∥ˆYl −Yl∥F , (2) where ∥· ∥F is the Frobenius Norm. Note that for any single parameter pruning, one can compute its error εl q, where 1 ≤q ≤ml−1ml, and use it as a pruning criterion. This idea has been adopted by some existing methods [15]. However, in this way, for each parameter at each layer, one has to pass the whole training data once to compute its error measure, which is very computationally expensive. A more efficient approach is to make use of the second order derivatives of the error function to help identify importance of each parameter. We first define an error function E(·) as El = E(ˆZl) = 1 n
ˆZl −Zl
2 F , (3) where Zl is outcome of the weighted sum operation right before performing the activation function σ(·) at layer l of the well-trained neural network, and ˆZl is outcome of the weighted sum operation after pruning at layer l . Note that Zl is considered as the desired output of layer l before activation. The following lemma shows that the layer-wise error is bounded by the error defined in (3). Lemma 3.1. With the error function (3) and Yl = σ(Zl), the following holds: εl ≤ q E(ˆZl). Therefore, to find parameters whose deletion (set to be zero) minimizes (2) can be translated to find parameters those deletion minimizes the error function (3). Following [12, 13], the error function can be approximated by functional Taylor series as follows, E(ˆZl) −E(Zl) = δEl = ∂El ∂Θl ⊤ δΘl + 1 2δΘl ⊤HlδΘl + O ∥δΘl∥3 , (4) where δ denotes a perturbation of a corresponding variable, Hl ≡∂2El/∂Θl 2 is the Hessian matrix w.r.t. Θl, and O(∥δΘl∥3) is the third and all higher order terms. It can be proven that with the error function defined in (3), the first (linear) term ∂El ∂Θl Θl=Θ∗ l and O(∥δΘl∥3) are equal to 0. Suppose every time one aims to find a parameter Θl[q] to set to be zero such that the change δEl is minimal. Similar to OBS, we can formulate it as the following optimization problem: min q 1 2δΘl ⊤HlδΘl, s.t. e⊤ q δΘl + Θl[q] = 0, (5) where eq is the unit selecting vector whose q-th element is 1 and otherwise 0. By using the Lagrange multipliers method as suggested in [21], we obtain the closed-form solutions of the optimal parameter pruning and the resultant minimal change in the error function as follows, δΘl = − Θl[q] [H−1 l ]qq H−1 l eq, and Lq = δEl = 1 2 (Θl[q])2 [H−1 l ]qq . (6) Here Lq is referred to as the sensitivity of parameter Θl[q]. Then we select parameters to prune based on their sensitivity scores instead of their magnitudes. As mentioned in section 2, magnitude-based criteria which merely consider the numerator in (6) is a poor estimation of sensitivity of parameters. Moreover, in (6), as the inverse Hessian matrix over the training data is involved, it is able to capture data distribution when measuring sensitivities of parameters. After pruning the parameter, Θl[q], with the smallest sensitivity, the parameter vector is updated via ˆΘl =Θl+δΘl. With Lemma 3.1 and (6), we have that the layer-wise error for layer l is bounded by εl q ≤ q E(ˆZl) = q E(ˆZl) −E(Zl) = √ δEl = |Θl[q]| q 2[H−1 l ]qq . (7) Note that first equality is obtained because of the fact that E(Zl) = 0. It is worth to mention that though we merely focus on layer l, the Hessian matrix is still a square matrix with size of ml−1ml × ml−1ml. However, we will show how to significantly reduce the computation of H−1 l for each layer in Section 3.4. 4 3.3 Layer-Wise Error Propagation and Accumulation So far, we have shown how to prune parameters for each layer, and estimate their introduced errors independently. However, our aim is to control the consistence of the network’s final output YL before and after pruning. To do this, in the following, we show how the layer-wise errors propagate to final output layer, and the accumulated error over multiple layers will not explode. Theorem 3.2. Given a pruned deep network via layer-wise pruning introduced in Section 3.2, each layer has its own layer-wise error εl for 1 ≤l ≤L, then the accumulated error of ultimate network output ˜εL = 1 √n∥˜YL −YL∥F obeys: ˜εL ≤ L−1 X k=1 L Y l=k+1 ∥ˆΘl∥F √ δEk ! + √ δEL, (8) where ˜Yl = σ( ˆ W⊤ l ˜Yl−1), for 2 ≤l ≤L denotes ‘accumulated pruned output’ of layer l, and ˜Y1 =σ( ˆ W⊤ 1 X). Theorem 3.2 shows that: 1) Layer-wise error for a layer l will be scaled by continued multiplication of parameters’ Frobenius Norm over the following layers when it propagates to final output, i.e., the L−l layers after the l-th layer; 2) The final error of ultimate network output is bounded by the weighted sum of layer-wise errors. The proof of Theorem 3.2 can be found in Appendix. Consider a general case with (6) and (8): parameter Θl[q] who has the smallest sensitivity in layer l is pruned by the i-th pruning operation, and this finally adds QL k=l+1 ∥ˆΘk∥F √ δEl to the ultimate network output error. It is worth to mention that although it seems that the layer-wise error is scaled by a quite large product factor, Sl = QL k=l+1 ∥ˆΘk∥F when it propagates to the final layer, this scaling is still tractable in practice because ultimate network output is also scaled by the same product factor compared with the output of layer l. For example, we can easily estimate the norm of ultimate network output via, ∥YL∥F ≈S1∥Y1∥F . If one pruning operation in the 1st layer causes the layer-wise error √ δE1, then the relative ultimate output error is ξL r = ∥˜YL −YL∥F ∥YL∥F ≈ √ δE1 ∥1 nY1∥F . Thus, we can see that even S1 may be quite large, the relative ultimate output error would still be about √ δE1/∥1 nY1∥F which is controllable in practice especially when most of modern deep networks adopt maxout layer [23] as ultimate output. Actually, S0 is called as network gain representing the ratio of the magnitude of the network output to the magnitude of the network input. 3.4 The Proposed Algorithm 3.4.1 Pruning on Fully-Connected Layers To selectively prune parameters, our approach needs to compute the inverse Hessian matrix at each layer to measure the sensitivities of each parameter of the layer, which is still computationally expensive though tractable. In this section, we present an efficient algorithm that can reduce the size of the Hessian matrix and thus speed up computation on its inverse. For each layer l, according to the definition of the error function used in Lemma 3.1, the first derivative of the error function with respect to ˆΘl is ∂El ∂Θl = −1 n Pn j=1 ∂zl j ∂Θl (ˆzl j −zl j), where ˆzl j and zl j are the j-th columns of the matrices ˆZl and Zl, respectively, and the Hessian matrix is defined as: Hl ≡ ∂2El ∂(Θl)2 = 1 n Pn j=1 ∂zl j ∂Θl ∂zl j ∂Θl ⊤ − ∂2zl j ∂(Θl)2 (ˆzl j−zl j)⊤ ! . Note that for most cases ˆzl j is quite close to zl j, we simply ignore the term containing ˆzl j−zl j. Even in the late-stage of pruning when this difference is not small, we can still ignore the corresponding term [13]. For layer l that has ml output units, zl j =[zl 1j, . . . , zl mlj], the Hessian matrix can be calculated via Hl = 1 n n X j=1 Hj l = 1 n n X j=1 ml X i=1 ∂zl ij ∂Θl ∂zl ij ∂Θl !⊤ , (9) 5 H11 H22 H33 W11 W21 W31 W41 y1 y2 y3 y4 z1 z2 z3 H ∈R12×12 H11, H22, H33 ∈R4×4 Figure 1: Illustration of shape of Hessian. For feed-forward neural networks, unit z1 gets its activation via forward propagation: z = W⊤y, where W ∈R4×3, y = [y1, y2, y3, y4]⊤∈R4×1, and z = [z1, z2, z3]⊤∈R3×1. Then the Hessian matrix of z1 w.r.t. all parameters is denoted by H[z1]. As illustrated in the figure, H[z1]’s elements are zero except for those corresponding to W∗1 (the 1st column of W), which is denoted by H11. H[z2] and H[z3] are similar. More importantly, H−1 = diag(H−1 11 , H−1 22 , H−1 33 ), and H11 = H22 = H33. As a result, one only needs to compute H−1 11 to obtain H−1 which significantly reduces computational complexity. where the Hessian matrix for a single instance j at layer l, Hj l , is a block diagonal square matrix of the size ml−1 ×ml. Specifically, the gradient of the first output unit zl 1j w.s.t. Θl is ∂zl 1j ∂Θl = ∂zl 1j ∂w1 , . . . , ∂zl 1j ∂wml , where wi is the i-th column of Wl. As zl 1j is the layer output before activation function, its gradient is simply to calculate, and more importantly all output units’s gradients are equal to the layer input: ∂zl ij ∂wk =yl−1 j if k = i, otherwise ∂zl ij ∂wk =0. An illustrated example is shown in Figure 1, where we ignore the scripts j and l for simplicity in presentation. It can be shown that the block diagonal square matrix Hj l ’s diagonal blocks Hj lii ∈Rml−1×ml−1, where 1 ≤i ≤ml, are all equal to ψj l =yl−1 j (yl−1 j ) ⊤, and the inverse Hessian matrix H−1 l is also a block diagonal square matrix with its diagonal blocks being ( 1 n Pn j=1 ψj l )−1. In addition, normally Ψl = 1 n Pn j=1 ψj l is degenerate and its pseudo-inverse can be calculated recursively via Woodbury matrix identity [13]: (Ψl j+1) −1 = (Ψl j) −1 − (Ψl j) −1yl−1 j yl−1 j ⊤(Ψl j) −1 n + yl−1 j+1 ⊤(Ψl j) −1yl−1 j+1 , where Ψl t = 1 t Pt j=1 ψj l with (Ψl 0) −1 =αI, α ∈[104, 108], and (Ψl) −1 =(Ψl n) −1. The size of Ψl is then reduced to ml−1, and the computational complexity of calculating H−1 l is O nm2 l−1 . To make the estimated minimal change of the error function optimal in (6), the layer-wise Hessian matrices need to be exact. Since the layer-wise Hessian matrices only depend on the corresponding layer inputs, they are always able to be exact even after several pruning operations. The only parameter we need to control is the layer-wise error εl. Note that there may be a “pruning inflection point” after which layer-wise error would drop dramatically. In practice, user can incrementally increase the size of pruned parameters based on the sensitivity Lq, and make a trade-off between the pruning ratio and the performance drop to set a proper tolerable error threshold or pruning ratio. The procedure of our pruning algorithm for a fully-connected layer l is summarized as follows. Step 1: Get layer input yl−1 from a well-trained deep network. Step 2: Calculate the Hessian matrix Hlii, for i = 1, ..., ml, and its pseudo-inverse over the dataset, and get the whole pseudo-inverse of the Hessian matrix. Step 3: Compute optimal parameter change δΘl and the sensitivity Lq for each parameter at layer l. Set tolerable error threshold ϵ. 6 Step 4: Pick up parameters Θl[q]’s with the smallest sensitivity scores. Step 5: If p Lq ≤ϵ, prune the parameter Θl[q]’s and get new parameter values via ˆΘl = Θl + δΘl, then repeat Step 4; otherwise stop pruning. 3.4.2 Pruning on Convolutional Layers It is straightforward to generalize our method to a convolutional layer and its variants if we vectorize filters of each channel and consider them as special fully-connected layers that have multiple inputs (patches) from a single instance. Consider a vectorized filter wi of channel i, 1 ≤i ≤ml, it acts similarly to parameters which are connected to the same output unit in a fully-connected layer. However, the difference is that for a single input instance j, every filter step of a sliding window across of it will extract a patch Cjn from the input volume. Similarly, each pixel zl ijn in the 2-dimensional activation map that gives the response to each patch corresponds to one output unit in a fully-connected layer. Hence, for convolutional layers, (9) is generalized as Hl = 1 n Pn j=1 Pml i=1 P jn ∂zl ijn ∂[w1,...,wml], where Hl is a block diagonal square matrix whose diagonal blocks are all the same. Then, we can slightly revise the computation of the Hessian matrix, and extend the algorithm for fully-connected layers to convolutional layers. Note that the accumulated error of ultimate network output can be linearly bounded by layer-wise error as long as the model is feed-forward. Thus, L-OBS is a general pruning method and friendly with most of feed-forward neural networks whose layer-wise Hessian can be computed expediently with slight modifications. However, if models have sizable layers like ResNet-101, L-OBS may not be economical because of computational cost of Hessian, which will be studied in our future work. 4 Experiments In this section, we verify the effectiveness of our proposed Layer-wise OBS (L-OBS) using various architectures of deep neural networks in terms of compression ratio (CR), error rate before retraining, and the number of iterations required for retraining to resume satisfactory performance. CR is defined as the ratio of the number of preserved parameters to that of original parameters, lower is better. We conduct comparison results of L-OBS with the following pruning approaches: 1) Randomly pruning, 2) OBD [12], 3) LWC [9], 4) DNS [11], and 5) Net-Trim [6]. The deep architectures used for experiments include: LeNet-300-100 [2] and LeNet-5 [2] on the MNIST dataset, CIFAR-Net2 [24] on the CIFAR-10 dataset, AlexNet [25] and VGG-16 [3] on the ImageNet ILSVRC-2012 dataset. For experiments, we first well-train the networks, and apply various pruning approaches on networks to evaluate their performance. The retraining batch size, crop method and other hyper-parameters are under the same setting as used in LWC. Note that to make comparisons fair, we do not adopt any other pruning related methods like Dropout or sparse regularizers on MNIST. In practice, L-OBS can work well along with these techniques as shown on CIFAR-10 and ImageNet. 4.1 Overall Comparison Results The overall comparison results are shown in Table 1. In the first set of experiments, we prune each layer of the well-trained LeNet-300-100 with compression ratios: 6.7%, 20% and 65%, achieving slightly better overall compression ratio (7%) than LWC (8%). Under comparable compression ratio, L-OBS has quite less drop of performance (before retraining) and lighter retraining compared with LWC whose performance is almost ruined by pruning. Classic pruning approach OBD is also compared though we observe that Hessian matrices of most modern deep models are strongly non-diagonal in practice. Besides relative heavy cost to obtain the second derivatives via the chain rule, OBD suffers from drastic drop of performance when it is directly applied to modern deep models. To properly prune each layer of LeNet-5, we increase tolerable error threshold ϵ from relative small initial value to incrementally prune more parameters, monitor model performance, stop pruning and set ϵ until encounter the “pruning inflection point” mentioned in Section 3.4. In practice, we prune each layer of LeNet-5 with compression ratio: 54%, 43%, 6% and 25% and retrain pruned model with 2A revised AlexNet for CIFAR-10 containing three convolutional layers and two fully connected layers. 7 Table 1: Overall comparison results. (For iterative L-OBS, err. after pruning regards the last pruning stage.) Method Networks Original error CR Err. after pruning Re-Error #Re-Iters. Random LeNet-300-100 1.76% 8% 85.72% 2.25% 3.50 × 105 OBD LeNet-300-100 1.76% 8% 86.72% 1.96% 8.10 × 104 LWC LeNet-300-100 1.76% 8% 81.32% 1.95% 1.40 × 105 DNS LeNet-300-100 1.76% 1.8% 1.99% 3.40 × 104 L-OBS LeNet-300-100 1.76% 7% 3.10% 1.82% 510 L-OBS (iterative) LeNet-300-100 1.76% 1.5% 2.43% 1.96% 643 OBD LeNet-5 1.27% 8% 86.72% 2.65% 2.90 × 105 LWC LeNet-5 1.27% 8% 89.55% 1.36% 9.60 × 104 DNS LeNet-5 1.27% 0.9% 1.36% 4.70 × 104 L-OBS LeNet-5 1.27% 7% 3.21% 1.27% 740 L-OBS (iterative) LeNet-5 1.27% 0.9% 2.04% 1.66% 841 LWC CIFAR-Net 18.57% 9% 87.65% 19.36% 1.62 × 105 L-OBS CIFAR-Net 18.57% 9% 21.32% 18.76% 1020 DNS AlexNet (Top-1 / Top-5 err.) 43.30 / 20.08% 5.7% 43.91 / 20.72% 7.30 × 105 LWC AlexNet (Top-1 / Top-5 err.) 43.30 / 20.08% 11% 76.14 / 57.68% 44.06 / 20.64% 5.04 × 106 L-OBS AlexNet (Top-1 / Top-5 err.) 43.30 / 20.08% 11% 50.04 / 26.87% 43.11 / 20.01% 1.81 × 104 DNS VGG-16 (Top-1 / Top-5 err.) 31.66 / 10.12% 7.5% 63.38% / 38.69% 1.07 × 106 LWC VGG-16 (Top-1 / Top-5 err.) 31.66 / 10.12% 7.5% 73.61 / 52.64% 32.43 / 11.12% 2.35 × 107 L-OBS (iterative) VGG-16 (Top-1 / Top-5 err.) 31.66 / 10.12% 7.5% 37.32 / 14.82% 32.02 / 10.97% 8.63 × 104 much fewer iterations compared with other methods (around 1:1000). As DNS retrains the pruned network after every pruning operation, we are not able to report its error rate of the pruned network before retraining. However, as can be seen, similar to LWC, the total number of iterations used by DNS for rebooting the network is very large compared with L-OBS. Results of retraining iterations of DNS are reported from [11] and the other experiments are implemented based on TensorFlow [26]. In addition, in the scenario of requiring high pruning ratio, L-OBS can be quite flexibly adopted to an iterative version, which performs pruning and light retraining alternatively to obtain higher pruning ratio with relative higher cost of pruning. With two iterations of pruning and retraining, L-OBS is able to achieve as the same pruning ratio as DNS with much lighter total retraining: 643 iterations on LeNet-300-100 and 841 iterations on LeNet-5. Regarding comparison experiments on CIFAR-Net, we first well-train it to achieve a testing error of 18.57% with Dropout and Batch-Normalization. We then prune the well-trained network with LWC and L-OBS, and get the similar results as those on other network architectures. We also observe that LWC and other retraining-required methods always require much smaller learning rate in retraining. This is because representation capability of the pruned networks which have much fewer parameters is damaged during pruning based on a principle that number of parameters is an important factor for representation capability. However, L-OBS can still adopt original learning rate to retrain the pruned networks. Under this consideration, L-OBS not only ensures a warm-start for retraining, but also finds important connections (parameters) and preserve capability of representation for the pruned network instead of ruining model with pruning. Regarding AlexNet, L-OBS achieves an overall compression ratio of 11% without loss of accuracy with 2.9 hours on 48 Intel Xeon(R) CPU E5-1650 to compute Hessians and 3.1 hours on NVIDIA Tian X GPU to retrain pruned model (i.e. 18.1K iterations). The computation cost of the Hessian inverse in L-OBS is negligible compared with that on heavy retraining in other methods. This claim can also be supported by the analysis of time complexity. As mentioned in Section 3.4, the time complexity of calculating H−1 l is O nm2 l−1 . Assume that neural networks are retrained via SGD, then the approximate time complexity of retraining is O (IdM), where d is the size of the mini-batch, M and I are the total numbers of parameters and iterations, respectively. By considering that M ≈Pl=L l=1 m2 l−1 , and retraining in other methods always requires millions of iterations (Id ≫n) as shown in experiments, complexity of calculating the Hessian (inverse) in L-OBS is quite economic. More interestingly, there is a trade-off between compression ratio and pruning (including retraining) cost. Compared with other methods, L-OBS is able to provide fast-compression: prune AlexNet to 16% of its original size without substantively impacting accuracy (pruned top-5 error 20.98%) even without any retraining. We further apply L-OBS to VGG-16 that has 138M parameters. To achieve more promising compression ratio, we perform pruning and retraining alteratively twice. As can be seen from the table, L-OBS achieves an overall compression ratio of 7.5% without loss 8 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Compression Rate 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Accuracy (Top-5) (a) Top-5 test accuracy of L-OBS on ResNet-50 under different compression ratios. 100 101 102 Number of data sample 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 Memory used (Byte) ×108 Net-Trim Our Method (b) Memory Comparion between L-OBS and NetTrim on MNIST. Table 2: Comparison of Net-Trim and Layer-wise OBS on the second layer of LeNet-300-100. Method ξ2 r Pruned Error CR Method ξ2 r Pruned Error CR Net-Trim 0.13 13.24% 19% Net-Trim 0.62 28.45% 7.4% L-OBS 0.70 11.34% 3.4% L-OBS 0.37 4.56% 7.4% L-OBS 0.71 10.83% 3.8% Net-Trim 0.71 47.69% 4.2% of accuracy taking 10.2 hours in total on 48 Intel Xeon(R) CPU E5-1650 to compute the Hessian inverses and 86.3K iterations to retrain the pruned model. We also apply L-OBS on ResNet-50 [27]. From our best knowledge, this is the first work to perform pruning on ResNet. We perform pruning on all the layers: All layers share a same compression ratio, and we change this compression ratio in each experiments. The results are shown in Figure 2(a). As we can see, L-OBS is able to maintain ResNet’s accuracy (above 85%) when the compression ratio is larger than or equal to 45%. 4.2 Comparison between L-OBS and Net-Trim As our proposed L-OBS is inspired by Net-Trim, which adopts ℓ1-norm to induce sparsity, we conduct comparison experiments between these two methods. In Net-Trim, networks are pruned by formulating layer-wise pruning as a optimization: minWl ∥Wl∥1 s.t. ∥σ(W⊤ l Yl−1) −Yl∥F ≤ξl, where ξl corresponds to ξl r∥Yl∥F in L-OBS. Due to memory limitation of Net-Trim, we only prune the middle layer of LeNet-300-100 with L-OBS and Net-Trim under the same setting. As shown in Table 2, under the same pruned error rate, CR of L-OBS outnumbers that of the Net-Trim by about six times. In addition, Net-Trim encounters explosion of memory and time on large-scale datasets and large-size parameters. Specifically, space complexity of the positive semidefinite matrix Q in quadratic constraints used in Net-Trim for optimization is O 2nm2 l ml−1 . For example, Q requires about 65.7Gb for 1,000 samples on MNIST as illustrated in Figure 2(b). Moreover, Net-Trim is designed for multi-layer perceptrons and not clear how to deploy it on convolutional layers. 5 Conclusion We have proposed a novel L-OBS pruning framework to prune parameters based on second order derivatives information of the layer-wise error function and provided a theoretical guarantee on the overall error in terms of the reconstructed errors for each layer. Our proposed L-OBS can prune considerable number of parameters with tiny drop of performance and reduce or even omit retraining. More importantly, it identifies and preserves the real important part of networks when pruning compared with previous methods, which may help to dive into nature of neural networks. Acknowledgements This work is supported by NTU Singapore Nanyang Assistant Professorship (NAP) grant M4081532.020, Singapore MOE AcRF Tier-2 grant MOE2016-T2-2-060, and Singapore MOE AcRF Tier-1 grant 2016-T1-001-159. 9 References [1] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [2] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [3] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [4] Luisa de Vivo, Michele Bellesi, William Marshall, Eric A Bushong, Mark H Ellisman, Giulio Tononi, and Chiara Cirelli. Ultrastructural evidence for synaptic scaling across the wake/sleep cycle. Science, 355(6324):507–510, 2017. [5] Misha Denil, Babak Shakibi, Laurent Dinh, Nando de Freitas, et al. Predicting parameters in deep learning. In Advances in Neural Information Processing Systems, pages 2148–2156, 2013. [6] Nguyen N. Aghasi, A. and J. Romberg. Net-trim: A layer-wise convex pruning of deep neural networks. Journal of Machine Learning Research, 2016. [7] Russell Reed. Pruning algorithms-a survey. IEEE transactions on Neural Networks, 4(5):740– 747, 1993. [8] Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. [9] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in Neural Information Processing Systems, pages 1135–1143, 2015. [10] Yi Sun, Xiaogang Wang, and Xiaoou Tang. Sparsifying neural network connections for face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4856–4864, 2016. [11] Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient dnns. In Advances In Neural Information Processing Systems, pages 1379–1387, 2016. [12] Yann LeCun, John S Denker, Sara A Solla, Richard E Howard, and Lawrence D Jackel. Optimal brain damage. In NIPs, volume 2, pages 598–605, 1989. [13] Babak Hassibi, David G Stork, et al. Second order derivatives for network pruning: Optimal brain surgeon. Advances in neural information processing systems, pages 164–164, 1993. [14] Thomas Kailath. Linear systems, volume 156. Prentice-Hall Englewood Cliffs, NJ, 1980. [15] Nikolas Wolfe, Aditya Sharma, Lukas Drude, and Bhiksha Raj. The incredible shrinking neural network: New perspectives on learning representations through the lens of pruning. arXiv preprint arXiv:1701.04465, 2017. [16] Hengyuan Hu, Rui Peng, Yu-Wing Tai, and Chi-Keung Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016. [17] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016. [18] Xiaojie Jin, Xiaotong Yuan, Jiashi Feng, and Shuicheng Yan. Training skinny deep neural networks with iterative hard thresholding methods. arXiv preprint arXiv:1607.05423, 2016. [19] Cheng Tai, Tong Xiao, Yi Zhang, Xiaogang Wang, et al. Convolutional neural networks with low-rank regularization. arXiv preprint arXiv:1511.06067, 2015. [20] Baoyuan Liu, Min Wang, Hassan Foroosh, Marshall Tappen, and Marianna Pensky. Sparse convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 806–814, 2015. 10 [21] R Tyrrell Rockafellar. Convex analysis. princeton landmarks in mathematics, 1997. [22] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In Aistats, volume 15, page 275, 2011. [23] Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron C Courville, and Yoshua Bengio. Maxout networks. ICML (3), 28:1319–1327, 2013. [24] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. [25] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [26] Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [27] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016. 11 | 2017 | 517 |
7,027 | Deliberation Networks: Sequence Generation Beyond One-Pass Decoding ∗ 1Yingce Xia, 2Fei Tian, 3Lijun Wu, 1Jianxin Lin, 2Tao Qin, 1Nenghai Yu, 2Tie-Yan Liu 1University of Science and Technology of China, Hefei, China 2Microsoft Research, Beijing, China 3Sun Yat-sen University, Guangzhou, China 1yingce.xia@gmail.com, linjx@mail.ustc.edu.cn, ynh@ustc.edu.cn 2{fetia,taoqin,tie-yan.liu}@microsoft.com, 3wulijun3@mail2.sysu.edu.cn Abstract The encoder-decoder framework has achieved promising progress for many sequence generation tasks, including machine translation, text summarization, dialog system, image captioning, etc. Such a framework adopts an one-pass forward process while decoding and generating a sequence, but lacks the deliberation process: A generated sequence is directly used as final output without further polishing. However, deliberation is a common behavior in human’s daily life like reading news and writing papers/articles/books. In this work, we introduce the deliberation process into the encoder-decoder framework and propose deliberation networks for sequence generation. A deliberation network has two levels of decoders, where the first-pass decoder generates a raw sequence and the second-pass decoder polishes and refines the raw sentence with deliberation. Since the second-pass deliberation decoder has global information about what the sequence to be generated might be, it has the potential to generate a better sequence by looking into future words in the raw sentence. Experiments on neural machine translation and text summarization demonstrate the effectiveness of the proposed deliberation networks. On the WMT 2014 English-to-French translation task, our model establishes a new state-of-the-art BLEU score of 41.5. 1 Introduction The neural network based encoder-decoder framework has been widely adopted for sequence generation tasks, including neural machine translation [1], text summarization [19], image captioning [27], etc. In such a framework, the encoder encodes the source input x with length m into a sequence of vectors {h1, h2, · · · , hm}. The decoder, which is typically an RNN, generates an output sequence word by word2 based on the source-side vector representations and previously generated words. The attention mechanism [1, 35], which dynamically attends to different parts of x while generating each target-side word, is integrated into the encoder-decoder framework to improve the quality of generating long sequences [1]. Although the framework has achieved great success, one concern is that while generating one word, one can only leverage the generated words but not the future words un-generated so far. That is, when the decoder generates the t-th word yt, only y<t can be used, while the possible words y>t are not explicitly considered. In contrast, in real-word human cognitive processes, global information, including both the past and the future parts, is leveraged in an iterative polishing process. Here are two examples: (1) Consider the situation that we are reading a sentence and meet an unknown word ∗This work was done when Yingce Xia, Lijun Wu and Jianxin Lin were interns at Microsoft Research. 2Throughout this work, a word refers to the basic unit in a sequence. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. in the middle of the sentence. We do not stop here. Instead, we move forward until the end of the sentence. Then we go back to the unknown word and try to understand it using its context, including the words both preceding and after it. (2) To write a good document (or paragraph, article), we usually first create a complete draft and then polish it based on global understanding of the whole draft. When polishing a specific part, we take the whole picture of the draft into consideration to evaluate how well the local element fits into the global environment rather than only looking back to the preceding parts. We call such a polishing process as deliberation. Motivated by such human cognitive behaviors, we propose the deliberation networks, which leverage the global information with both looking back and forward in sequence decoding through a deliberation process. Concretely speaking, to integrate such a process into the sequence generation framework, we carefully design our architecture, which consists of two decoders, a first-pass decoder D1 and a second-pass/deliberation decoder D2, as well as an encoder E. Given a source input x, the E and D1 jointly works like the standard encoderdecoder model to generate a coarse sequence ˆy as a draft and the corresponding representations ˆs = {ˆs1, ˆs2, · · · , ˆsTˆy} used to generate ˆy, where Tˆy is the length of ˆy. Afterwards, the deliberation decoder D2 takes x, ˆy and ˆs as inputs and outputs the refined sequence y. When D2 generates the t-th word yt, an additional attention model is used to assign an adaptive weight βj to each ˆyj and ˆsj for any j ∈[Tˆy], and P βj[ˆyj; ˆsj] is fed into D2.3 In this way, the global information of the target sequence can be utilized to refine the generation process. We propose a Monte Carlo based algorithm to overcome the difficulty brought by the discrete property of ˆy in optimizing the deliberation network. To verify the effectiveness of our model, we work on two representative sequence generation tasks. (1) Neural machine translation refers to using neural networks to translate sentences from a source language to a target language [1, 33, 32, 34]. A standard NMT model consists of an encoder (used to encode source sentences) and a decoder (used to generate target sentences), and thus can be improved by our proposed deliberation network. Experimental results show that based on a widely used single-layer GRU model [1], on the WMT’14 [29] English→French dataset, we can improve the BLEU score [17], by 1.7 points compared to the model without deliberation. We also apply our model on Chinese→English translations and improve BLEU by an averaged 1.26 points on four different test sets. Furthermore, on the WMT’14 English→French translation task, by applying deliberation to a deep LSTM model, we achieve a BLEU score 41.50, setting a new record for this task. (2) Text summarization is a task that summarizes a long article into a short abstract. The encoderdecoder framework can also be used for such a task and thus could be refined by deliberation networks. Experimental results on Gigaword dataset [6] show that deliberation network can improve ROUGE-1, ROUGE-2, and ROUGE-L by 3.45, 1.70 and 3.02 points. 1.1 Related Work Although there exist many works to improve the attention based encoder-decoder framework for sequence generation, such as changing the training loss [28, 18, 22] or the decoding objective [14, 7], not much attention has been paid to the structure of the encoder-decoder framework. Our work changes the structure of the framework by introducing the second-pass decoder into it. The idea of deliberation/refinement is not well explored for sequence generation tasks, especially for the encoder-decoder based approaches [3, 23, 1] in neural machine translation. One related work is post-editing [16, 2]: a source sentence e is first translated to f ′, and then f ′ is refined by another model. Different from our deliberation network, the two processes (i.e., generating and refining) in post-editing are separated. As a comparison, what we build is a consistent model in which all the components are coupled together and jointly optimized in an end-to-end way. As a result, deliberation networks lead to better accuracies. Another related work is the review network [36]. The idea is to review all the information encoded by the encoder to obtain thought vectors that are more compact and abstractive. The thought vectors are then used in decoding. Different from our work, the review steps are added on the encoder side, while the decoder side is unchanged and still adopts one-pass decoding. 3In this work, let [v1; v2; · · · ; vn] denote the long vector concatenated by the input vectors v1, · · · , vn. With a little bit confusion, [m] with a single integer input m denotes the set {1, 2, · · · , m}. 2 The rest of our paper is organized as follows. Our proposed deliberation network is introduced in Section 2, including the model structure and the optimization process. Applications to neural machine translation and text summarization are introduced in Section 3 and Section 4 respectively. Section 5 concludes the paper and discusses possible future directions. 2 The Framework In this section, we first introduce the overall architecture of deliberation networks, then the details of individual components, and finally propose an end-to-end Monte Carlo based algorithm to train the deliberation networks. 2.1 Structure of Deliberation Networks As shown in Figure 1, a deliberation network consists of an encoder E, a first-pass decoder D1 and a second-pass decoder D2. Deliberation happens at the second-pass decoder, which is also called deliberation decoder alternatively. Briefly speaking, E is used to encode the source sequence into a sequence of vector representations. D1 reads the encoder representations and generates a first-pass target sequence as a draft, which is further provided as input to the deliberation decoder D2 for the second-pass decoding. In the rest of this section, for simplicity of description, we use RNN as the basic building block for both the encoder and decoders4. All the W’s and v’s in this section with different superscripts or subscripts are the parameters to be learned. Besides, all the bias terms are omitted to increase readability. Figure 1: Framework of deliberation networks: Blue, yellow and green parts indicate encoder E, first-pass decoder D1 and the second-pass decoder D2 respectively. The E-to-D1 attention model is omitted for readability. 2.2 Encoder and First-pass Decoder When an input sequence x is fed into the encoder E, it is encoded into Tx hidden states H = {h1, h2, · · · , hTx} where Tx is the length of x. Specifically, hi = RNN(xi, hi−1), where xi acts as the representation (e.g., word embedding vector) for the i-th word in x and h0 is a zero vector. The first-pass decoder D1 will generate a series of hidden states ˆsj ∀j ∈[Tˆy], and a first-pass sequence ˆyj ∀j ∈[Tˆy], where Tˆy is the length of the generated sequence. Next we show how they are generated in detail. 4The proposed deliberation networks are independent to the specific implementation of the recurrent units and can be applied to simple RNN or its variants such as LSTM [11] or GRU [3]. 3 Similar to the conventional encoder-decoder model, an attention model is included in D1. At step j, the attention model in D1 first generates a context ctxe defined as follows: ctxe = PTx i=1αihi; αi ∝exp(vT α tanh(W c att,hhi + W c att,ˆsˆsj−1)) ∀i ∈[Tx]; PTx i=1αi = 1. (1) Based on ctxe, ˆsj is calculated as ˆsj = RNN([ˆyj−1; ctxe], ˆsj−1). After obtaining ˆsj, another affine transformation is applied on the concatenated vector [ˆsj; ctxe; ˆyj−1]. Finally, the results of the transformation are fed into a softmax layer, and the ˆyj is sampled out from the obtained multinomial distribution. 2.3 Second-Pass Decoder Once the first-pass target sequence ˆy is generated by the first-pass decoder D1, it is fed into the second-pass decoder D2 for further refinement. Based on the sequence ˆy and the hidden states ˆsj ∀j ∈[Tˆy] provided by D1, D2 eventually outputs the second-pass sequence y via the deliberation process. Specifically, at step t, D2 takes the previous hidden state st−1 generated by itself, previously decoded word yt−1, the source contextual information ctx′ e and the first-pass contextual information ctxc as inputs. Two detailed points are: (1) The computation of ctx′ e is similar to that of ctxe shown in Eqn. (1) with two differences: First, ˆsj−1 is replaced by st−1; second, the model parameters are different. (2) To obtain ctxc, D2 has an attention model (i.e., the Ac in Figure 1) that can map the words ˆyj’s and the hidden states ˆsj’s into a context vector. Mathematically speaking, in the refinement process at t-th time step, the first-pass contextual information vector ctxc is computed as: ctxc =PTˆy j=1βj[ˆsj; ˆyj]; βj ∝exp(vT β tanh(W d att, ˆ sy[ˆsj; ˆyj] + W d att,sst−1)) ∀j ∈[Tˆy]; PTˆy j=1 βj = 1. As can be seen from the above computation, the deliberation process at time step t in the second-pass decoding uses the whole sequence generated by the first-pass decoder, including both the words preceding and after t-th step in the first-pass sequence. That is, the first-pass contextual vector ctxc aggregates the global information extracted from the first-pass sequence ˆy. After receiving ctxc, we calculate st as st = RNN([yt−1; ctx′ e; ctxc], st−1). Similar to sampling ˆyt in D1, [st; ctx′ e; ctxc; yt−1] will be further transformed to generate yt. 2.4 Algorithm Let DXY = {(x(i), y(i))}n i=1 denote the training corpus with n paired sequences5. Denote the parameters of E, D1 and D2 as θe, θ1 and θ2 respectively. The training of sequence-to-sequence learning is usually to maximize the data log likelihood (1/n) Pn i=1 log P(yi|xi). Under our setting, this rule can be specialized to maximize (1/n) P (x,y)∈DXY J (x, y; θe, θ1, θ2), where J (x, y; θe, θ1, θ2) = log X y′∈Y P(y|y′, E(x; θe); θ2)P(y′|E(x; θe); θ1). (2) In Eqn. (2), Y is the collection of all possible target sequences and E(x; θe) indicates a function that maps x to its corresponding hidden states given by the encoder. One can verify that the first-order derivative of J (x, y; θe, θ1, θ2) w.r.t θ1 is: ∇θ1J (x, y; θe, θ1, θ2) = P y′∈Y P(y|y′, E(x; θe); θ2)∇θ1P(y′|E(x; θe); θ1) P y′∈Y P(y|y′, E(x; θe); θ2)P(y′|E(x; θe); θ1) , which is extremely hard to compute due to the large space of Y. Similarly, the gradients w.r.t. θe and θ2 are also computationally intractable. To overcome such difficulties, we propose a Monte Carlo based method to optimize the lower bound of J (x, y; θe, θ1, θ2). Note by the concavity of J w.r.t y′, one can verify that J (x, y; θe, θ1, θ2) ≥˜ J (x, y; θe, θ1, θ2), with the right-hand side acting as a lower bound and defined as ˜ J (x, y; θe, θ1, θ2) = X y′∈Y P(y′|E(x; θe); θ1) log P(y|y′, E(x; θe); θ2). (3) 5Let x(i) and y(i) denote i’th source input and target output in the training data. Let xi and yi denote the i-th word in x and y. 4 Denote ˜ J (x, y; θe, θ1, θ2) as ˜J. The gradients of ˜J w.r.t its parameters are: ∇θ1 ˜ J = X y′∈Y P(y′|E(x; θe); θ1) log P(y|y′, E(x; θe); θ2)∇θ1 log P(y′|E(x; θe); θ1) | {z } G1 ; ∇θ2 ˜ J = X y′∈Y P(y′|E(x; θe); θ1) ∇θ2 log P(y|y′, E(x; θe); θ2) | {z } G2 ; (4) ∇θe ˜ J = X y′∈Y P(y′|E(x; θe); θ1)Ge(x, y, y′; θe, θ1, θ2), where Ge is defined as follows: Ge = ∇θe log P(y|y′, E(x; θe); θ2) + log P(y|y′, E(x; θe); θ2)∇θe log P(y′|E(x; θe); θ1). Let Θ = [θ1; θ2; θe] and G(x, y, y′; Θ) = [G1; G2; Ge], where G1, G2 and Ge are defined in Eqn. (4). (For ease of reference, we assume that all the θ·’s and G·’s are flattened.) Obviously, if y′ is sampled from distribution P(y′|E(x; θe); θ1), G(x, y, y′; Θ) is an unbiased estimator of the gradient of ˜J w.r.t. all model parameters Θ. Based on that we propose our algorithm in Algorithm 1. Algorithm 1: Algorithm to train the deliberation network Input: Training data corpus DXY ; minibatch size m; optimizer Opt(· · · ) with gradients as input ; while models not converged do Randomly sample a mini-batch of m sequence pairs {x(i), y(i)} ∀i ∈[m] from DXY ; For any x(i) where i ∈[m], sample y′(i) according to distribution P(·|E(x(i); θe); θ1); Perform parameter update: Θ ←Θ + Opt( 1 m Pm i=1 G(x(i), y(i), y′(i); Θ)). Discussions (1) The choice of Opt(...) is quite flexible. One can choose different optimizers such as Adadelta [37], Adam [13], or SGD for different tasks, depending on common practice in the specific task. (2) The Y space is usually extremely large in sequence generation tasks. To obtain better sampled y′, we can use beam search instead of randomly sampling. 3 Application to Neural Machine Translation We evaluate the deliberation networks with two different network structures: (1) the shallow model, which is based on a widely-used single-layer GRU model named RNNSearch [1, 12]; (2) the deep model, which is based on a deep LSTM model similar to GNMT [31]. Both of the two kinds of models are implemented in Theano [24]. 3.1 Shallow Models 3.1.1 Settings Datasets We work on two translation tasks, English-to-French translation (denoted as En→Fr) and Chinese-to-English translation (denoted as Zh→En). For En→Fr, we employ the standard filtered WMT’14 dataset6, which is widely used in NMT literature [1, 12]. There are 12M bilingual sentence pairs in the dataset. We concatenate newstest2012 and newstest2013 together as the validation set and use newstest2014 as the test set. For Zh→En, we choose 1.25M bilingual sentence pairs from LDC dataset as training corpus, use NIST2003 as the validation set, and NIST2004, NIST2005, NIST2006, NIST2008 as the test sets. Following the common practice [1, 12], we remove the sentences with more than 50 words for both translation tasks. Furthermore, we limit the both the source words and target words as 30k most-frequent ones. The out-of-vocabulary words are replaced by a special token “UNK”. Model We choose the most widely adopted NMT model RNNSearch [1, 12, 25] as the basic structure to construct the deliberation network. To be specific, all of E, D1 and D2 are GRU networks [1] with one hidden layer of 1000 neurons. The word embedding dimension is set as 620. For Zh→En, we apply 0.5 dropout rate to the layer before softmax and no dropout is used in En→Fr translation. 6http://www-lium.univ-lemans.fr/˜schwenk/cslm_joint_paper/data/bitexts.tgz 5 Optimization All the models are trained on a single NVIDIA K40 GPU. We first pre-train two standard encoder-decoder based NMT models (i.e., RNNSearch) until convergence, which take about two weeks for En→Fr and one week for Zh→En using Adadelta [37]. For any deliberation network, (1) the encoder is initialized by the encoder of the pre-trained RNNSearch model; (2) both the first-pass and second-pass decoders are initialized by the decoder of the pre-trained RNNSearch model; (3) the attention model used to compute the first-pass context vector is randomly initialized from a uniform distribution on [−0.1, 0.1]. Then we train the deliberation networks by Algorithm 1 until convergence, which takes roughly 5 days for both tasks. The minibatch size is fixed as 80 throughout the optimization. Plain SGD is used as the optimizer in this process, with initial learning rate 0.2 and halving according to validation accuracy. To sample the intermediate translation output by the first decoder, we use beam search with beam size 2, considering the tradeoff between accuracy and efficiency. Evaluation We use BLEU [17] as the evaluation metric for translation qualities. BLEU is the geometric mean of n-gram precisions where n ∈{1, 2, 3, 4}, weighted by sentence lengths. Following the common practice in NMT, we use multi-bleu.pl7 to calculate case-sensitive BLEU scores for En→Fr, while evaluating the translation qualities of Zh→En by case-insensitive BLEU scores. The larger the BLEU score is, the better the translation quality is. For the baselines and deliberation networks, we use beam search with beam size 12 to generate sentences. Baselines We compare our proposed algorithms with the following baselines: (i) The standard NMT algorithm RNNSearch [1, 12], denoted as Mbase; (ii) The standard NMT model with two stacked decoding layers, denoted as Mdec×2; (3) The review network proposed in [36]. We try both 4 and 8 reviewers and find the 4-reviewer model is slightly better. The review network in our experiment is therefore denoted as Mreviewer×4. We refer to our proposed algorithm as Mdelib. 3.1.2 Results We compare our proposed algorithms with the following baselines: (i) The standard NMT algorithm, denoted as Mbase; (ii) The standard NMT model with two stacked decoding layers, denoted as Mdec×2; (3) The review network proposed in [36]. We try both 4 and 8 reviewers and find the 4-reviewer model is slightly better. The review network in our experiment is therefore denoted as Mreviewer×4. We refer to our proposed algorithm as Mdelib. Table 1 shows the results of En→Fr translation. We have several observations: (1) Our proposed algorithm performs the best among all candidates, which validates the effectiveness of the deliberation process. (2) Our method Mdelib outperforms the baseline algorithm Mbase. This shows that further polishing the raw output indeed leads to better sequences. (3) Applying an additional decoding layer, i.e., Mdec×2, increases the translation quality, but it is still far behind that of Mdelib. Clearly, the second decoder layer of Mdec×2 can still only leverage the previously generated words but not unseen and un-generated future words, while the second-pass decoder of Mdelib can leverage the richer information contained in all the words from the first-pass decoder. Such a refinement process from the global view significantly improves the translation results. (4) Mdelib outperforms Mreviewer×4 by 0.91 point, which shows that reviewing the possible future contextual information from the source side is not enough. The “future” information from the decoder side is also very important, since it is directly related with the final output. Table 1: BLEU scores of En→Fr translation Algorithm Mbase Mdec×2 Mreviewer×4 Mdelib BLEU 29.97 30.40 30.76 31.67 The translation results of Zh→En are summarized in Table 2. We have similar observations as those for En→Fr translations: Mdelib outperforms all the baseline methods, particularly with an average gain of 1.26 points over Mbase. Apart from the quantitative analysis, we list two examples in Table 3 to better understand how a deliberation network works. Each example contains five sentences, which are the source sentence in Chinese, the reference sentence in English as ground truth translation, the translation generated 7https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl 6 Table 2: BLEU scores of Zh→En translation Algorithm NIST04 NIST05 NIST06 NIST08 Mbase 34.96 34.57 32.74 26.21 Mdelib 36.90 35.57 33.90 27.13 by Mbase and the output translation by both the first-pass decoder and second-pass decoder (i.e., the final translation by deliberation network Mdelib). Table 3: Case studies of Zh→En translations. Note the “......” in the second example represents a common sentence “the two sides will discuss how to improve the implementation of the cease-fire agreement”. [Source] Aiji shuo, zhongdong heping xieyi yuqi jiang you yige xinde jiagou . [Reference] Egypt says a new framework is expected to come into being for the Middle East peace agreement . [Base] egypt ’s middle east peace agreement is expected to have a new framework , he said . [First-pass] egypt ’s middle east peace agreement is expected to have a new framework , egypt said . [Second-pass] egypt says the middle east peace agreement is expected to have a new framework . [Source] Nuowei dashiguan zhichu, "shuangfang jiang taolun ruhe gaijin luoshi tinghuo xieyi, zhe yeshi san nian lai shuangfang shouci zai ruci gao de cengji shang jinxing mianduimian tanpan" [Reference] The Norwegian embassy pointed out that , " Both sides will discuss how to improve the implementation of the cease-fire agreement , which is the first time for both sides to have face-to-face negotiations at such a high level . " [Base] " ...... , which is the first time for the two countries to conduct face-to-face talks on the basis of a high level of three years , " it said . [First-pass] " ...... , which is the first time for the two countries to conduct face-to-face talks on the basis of a high level of three years , " the norwegian embassy said in a statement . [Second-pass] " ...... , which is the first time in three years for the two countries to conduct face-to-face talks at such high level , " the norwegian embassy said . In the first example, the translation from both base model and first-pass decoder contains the phrase egypt’s middle east peace agreement, which is odd and inaccurate, given that an agreement cannot belong to a single country as Egypt. As a comparison, the second-pass decoder refines such phrase into a more natural and accurate one. i.e., egypt says the middle east peace agreement, by looking forward to the future translation phrase “egypt said” output by the first-pass decoder. On the other hand, the second-pass decoder outputs a sentence with correct tense, i.e., egypt says ... is .... However, the two sentences output by Mbase and the first-pass decoder are inconsistent in tense, whose structures are “... is ..., egypt said ”. This problem is well addressed by the deliberation network, since the second-pass decoder can access the global information contained in the draft sequence generated by the first-pass decoder, and therefore output a more consistent sentence. In the second example, as shown in bold fonts, the phrase “conduct face-to-face talks on the basis of a high level of three years” from both base model and first-pass decoder carries all necessary information of its corresponding source segments, but apparently it is out-of-order and seems to be a simple combination of words. The second-pass decoder refines such translation into a correct, and more fluent one, by forwarding the sub phrase in three years to the position right after the first time. At last we compare the decoding time of deliberation network with that of the RNNSearch. Based on the Theano implementation, to translate 3003 English sentences to French, RNNSearch takes 964 seconds while the deliberation network takes 1924 seconds. Indeed, the deliberation network takes roughly 2 times decoding time of RNNSearch, but can bring 1.7 points improvements in BLEU. 3.2 Deep Models We work on a deep LSTM model to further evaluate deliberation networks through the WMT’14 En→Fr translation task. Compared to the shallow model, there are several different aspects: (1) We use 34M sentence pairs from WMT’14 as training data, apply the BPE [21] techniques to split the training sentences into sub-word units and restrict the source and target sentence lengths within 64 subwords. The encoder and decoder share a common vocabulary containing 36k subwords. (2) All of E, D1 and D2 are 4-layer LSTMs with residual connections [9, 10]. The word embedding dimension 7 Table 4: Comparison between deliberation network and different deep NMT systems (En→Fr). System Configurations BLEU GNMT [31] Stacked LSTM (8-layer encoder + 8 layer decoder) + RL finetune 39.92 FairSeq [4] Convolution (15-layer) encoder and (15-layer) decoder 40.51 Transformer [26] Self-Attention + 6-layer encoder + 6-layer decoder 41.0 Stack LSTM (4-layer encoder and 4-layer decoder) 39.51 this work Stack 4-layer NMT + Dual Learning 40.53 Stack 4-layer NMT + Dual Learning + Deliberation Network 41.50 and hidden node dimension are 512 and 1024 respectively. The dropout rate is set as 0.1. (3) We train the standard encoder-decoder based deep model for about 25 days until convergence. Furthermore, we leverage our recently proposed dual learning techniques [8, 33] to improve the model, which takes another 7 days. We initialize the deliberation network in the same way in Section 3.1.1. Then, we train the deliberation network by Algorithm 1 for 10 days. When generating translations, we use beam search with beam size 8. The experimental results of applying deliberation network to the deep LSTM model are shown in Table 4. On En→Fr translation task, the baseline of our implemented NMT system is 39.51. With dual learning, we achieve a 40.53 BLEU score. After applying deliberation techniques, the BLEU score can be further improved to 41.50, which as far as we know, is a new single-model state-of-the-art result for this task. This not only illustrates the effectiveness of deliberation network again, but also shows that even if a model is good enough, it can still benefit from the deliberation process. 4 Application to Text Summarization We further verify the effectiveness of deliberation networks on text summarization, which is another real-world application that encoder-decoder framework succeeds to help [19]. 4.1 Settings Text summarization refers to using a short and abstractive sentence to summarize the major points of a sentence or paragraph, which is typically much longer. The training, validation and test sets for the task are extracted from Gigaword Corpus [6]: For each selected article, the first sentence is used as source-side input and the title used as target-side output. We process the data in the same way as that proposed in [20, 30], and obtain training/validation/test sets with roughly 189k/18k/10k sentence pairs respectively. There are roughly 42k unique words in the source input and 19k unique words in the target output and we remain all of them as the vocabulary in the encoder-decoder models. The model structure is the same as that used in Section 3.1 except that both word embedding dimension and hidden node size are reduced to 128. We use Adadelta algorithm with gradient clip value 5.0 to optimize deliberation network. The mini-batch size is fixed as 32. The evaluation measures are chosen as ROUGE-1, ROUGE-2 and ROUGE-L, which are all widely adopted evaluation metric for text summarization [15]. ROUGE-N (N = 1, 2 in our setting) is an N-gram recall between a candidate summary and a set of reference summaries. ROUGE-L is a similar statistic like ROUGE-N but based on longest common subsequences. When generating the titles, we use beam search with beam size 10. For the thoroughness of comparison, similar to NMT, we add another two baselines apart from the basic encoder-decoder model: the stacked-decoder model with 2 layers (Mdec×2), as well as the review net with 4 reviewers (Mreviewer×4). 4.2 Results The experimental results of text summarization are listed in Table 5. Again, the deliberation network achieves clear improvements over all the baselines. For example, in terms of ROUGE-2, it is 1.12 and 0.96 points better compared with stacked decoder model and review net respectively. Furthermore, one may note that a significant difference between NMT and text summarization is that: In NMT, the lengths of input and output sequence are very close; but in text summarization, the input is extremely 8 long while the output is very short. The better results brought by deliberation networks shows that even if the output sentence is short, it is helpful to include the deliberation process which refines the low-level draft in the first-pass decoder. Table 5: ROUGE-{1, 2, L} scores of text summarization Algorithm ROUGE-1 ROUGE-2 ROUGE-L Mbase 27.45 10.51 26.07 Mdec×2 27.93 11.09 26.50 Mreviewer×4 28.26 11.25 27.28 Mdelib 30.90 12.21 29.09 5 Conclusions and Future Work In this work, we have proposed deliberation networks for sequence generation tasks, in which the first-pass decoder is used for generating a raw sequence, and the second-pass decoder is used to polish the raw sequence. Experiments show that our method achieves much better results than several baseline methods in both machine translation and text summarization, and achieves a new single model state-of-the-art result on WMT’14 English to French translation. There are multiple promising directions to explore in the future. First, we will study how to apply the idea of deliberation to tasks beyond sequence generation, such as improving the image qualities generated by GAN [5]. Second, we will study how to refine/polish different levels of a neural network, like the hidden states in an RNN, or feature maps in a CNN. Third, we are curious about whether better sequences can be generated with more passes of decoders, i.e., refining a generated sequence again and again. Fourth, we will study how to speed up the inference of deliberation networks and reduce their inference time. Acknowledgments The authors would like to thank Yang Fan and Kaitao Song for implementing the deep neural machine translation basic model. This work is partially supported by the National Natural Science Foundation of China (Grant No. 61371192). References [1] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015. [2] R. Chatterjee, J. G. de Souza, M. Negri, and M. Turchi. The fbk participation in the wmt 2016 automatic post-editing shared task. In Proceedings of the First Conference on Machine Translation: Volume 2, Shared Task Papers, 2016. [3] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In EMNLP, pages 1724–1734, 2014. [4] J. Gehring, M. Auli, D. Grangier, D. Yarats, and Y. N. Dauphin. Convolutional sequence to sequence learning. ICML, 2017. [5] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, pages 2672–2680. 2014. [6] D. Graff and C. Cieri. English gigaword. linguistic data consortium, 2003. [7] D. He, H. Lu, Y. Xia, T. Qin, L. Wang, and T. Liu. Decoding with value networks for neural machine translation. In 31st Annual Conference on Neural Information Processing Systems (NIPS), 2017. [8] D. He, Y. Xia, T. Qin, L. Wang, N. Yu, T. Liu, and W.-Y. Ma. Dual learning for machine translation. In Advances In Neural Information Processing Systems, pages 820–828, 2016. 9 [9] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. [10] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645. Springer, 2016. [11] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Comput., 9(8):1735–1780, Nov. 1997. [12] S. Jean, K. Cho, R. Memisevic, and Y. Bengio. On using very large target vocabulary for neural machine translation. In the annual meeting of the Association for Computational Linguistics, 2015. [13] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [14] J. Li, W. Monroe, and D. Jurafsky. A simple, fast diverse decoding algorithm for neural generation. arXiv preprint arXiv:1611.08562, 2016. [15] C.-Y. Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out: Proceedings of the ACL-04 workshop, volume 8, 2004. [16] J. Niehues, E. Cho, T.-L. Ha, and A. Waibel. Pre-translation for neural machine translation. In COLING, 2016. [17] K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu. Bleu: a method for automatic evaluation of machine translation. In the annual meeting of the Association for Computational Linguistics, pages 311–318, 2002. [18] M. Ranzato, S. Chopra, M. Auli, and W. Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015. [19] A. M. Rush, S. Chopra, and J. Weston. A neural attention model for abstractive sentence summarization. In EMNLP, pages 379–389, 2015. [20] A. M. Rush, S. Chopra, and J. Weston. A neural attention model for abstractive sentence summarization. ACL, 2015. [21] R. Sennrich, B. Haddow, and A. Birch. Neural machine translation of rare words with subword units. the annual meeting of the Association for Computational Linguistics, 2016. [22] S. Shen, Y. Cheng, Z. He, W. He, H. Wu, M. Sun, and Y. Liu. Minimum risk training for neural machine translation. the annual meeting of the Association for Computational Linguistics, 2016. [23] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112, 2014. [24] T. D. Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv preprint arXiv:1605.02688, 2016. [25] Z. Tu, Y. Liu, L. Shang, X. Liu, and H. Li. Neural machine translation with reconstruction. In AAAI, 2017. [26] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. In NIPS, 2017. [27] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan. Show and tell: A neural image caption generator. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3156–3164, 2015. [28] S. Wiseman and A. M. Rush. Sequence-to-sequence learning as beam-search optimization. In ACL, 2016. [29] WMT’14. http://www.statmt.org/wmt14/translation-task.html. 10 [30] L. Wu, L. Zhao, T. Qin, J. Lai, and T. Liu. Sequence prediction with unlabeled data by reward function learning. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI), pages 3098–3104, 2017. [31] Y. Wu, M. Schuster, Z. Chen, Q. V. Le, M. Norouzi, W. Macherey, M. Krikun, Y. Cao, Q. Gao, K. Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. [32] Y. Xia, J. Bian, T. Qin, N. Yu, and L. Tie-Yan. Dual inference for machine learning. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI), pages 3112–3118, 2017. [33] Y. Xia, T. Qin, W. Chen, J. Bian, N. Yu, and T. Liu. Dual supervised learning. In Proceedings of the 34th International Conference on Machine Learning (ICML), pages 3789–3798, 2017. [34] Y. Xia, F. Tian, T. Qin, N. Yu, and T. Liu. Sequence generation with target attention. In The European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECMLPKDD), 2017. [35] K. Xu, J. Ba, R. Kiros, K. Cho, A. C. Courville, R. Salakhutdinov, R. S. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015. [36] Z. Yang, Y. Yuan, Y. Wu, W. W. Cohen, and R. R. Salakhutdinov. Review networks for caption generation. In Advances in Neural Information Processing Systems, pages 2361–2369, 2016. [37] M. D. Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. 11 | 2017 | 518 |
7,028 | Do Deep Neural Networks Suffer from Crowding? Anna Volokitin†♮ Gemma Roig†‡ι Tomaso Poggio†‡ voanna@vision.ee.ethz.ch gemmar@mit.edu tp@csail.mit.edu †Center for Brains, Minds and Machines, Massachusetts Institute of Technology, Cambridge, MA ‡Istituto Italiano di Tecnologia at Massachusetts Institute of Technology, Cambridge, MA ♮Computer Vision Laboratory, ETH Zurich, Switzerland ιSingapore University of Technology and Design, Singapore Abstract Crowding is a visual effect suffered by humans, in which an object that can be recognized in isolation can no longer be recognized when other objects, called flankers, are placed close to it. In this work, we study the effect of crowding in artificial Deep Neural Networks (DNNs) for object recognition. We analyze both deep convolutional neural networks (DCNNs) as well as an extension of DCNNs that are multi-scale and that change the receptive field size of the convolution filters with their position in the image. The latter networks, that we call eccentricitydependent, have been proposed for modeling the feedforward path of the primate visual cortex. Our results reveal that the eccentricity-dependent model, trained on target objects in isolation, can recognize such targets in the presence of flankers, if the targets are near the center of the image, whereas DCNNs cannot. Also, for all tested networks, when trained on targets in isolation, we find that recognition accuracy of the networks decreases the closer the flankers are to the target and the more flankers there are. We find that visual similarity between the target and flankers also plays a role and that pooling in early layers of the network leads to more crowding. Additionally, we show that incorporating flankers into the images of the training set for learning the DNNs does not lead to robustness against configurations not seen at training. 1 Introduction Despite stunning successes in many computer vision problems [1, 2, 3, 4, 5], Deep Neural Networks (DNNs) lack interpretability in terms of how the networks make predictions, as well as how an arbitrary transformation of the input, such as addition of clutter in images in an object recognition task, will affect the function value. Examples of an empirical approach to this problem are testing the network with adversarial examples [6, 7] or images with different geometrical transformations such as scale, position and rotation, as well as occlusion [8]. In this paper, we add clutter to images to analyze the crowding in DNNs. Crowding is a well known effect in human vision [9, 10], in which objects (targets) that can be recognized in isolation can no longer be recognized in the presence of nearby objects (flankers), even though there is no occlusion. We believe that crowding is a special case of the problem of clutter in object recognition. In crowding studies, human subjects are asked to fixate at a cross at the center of a screen, and objects are presented at the periphery of their visual field in a flash such that the subject has no time to move their eyes. Experimental data suggests that crowding depends on the distance of the target and the flankers [11], eccentricity (the distance of the target to the fixation point), as well as the similarity between the target and the flankers [12, 13] or the configuration of the flankers around the target object [11, 14, 15]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. whole image MNIST notMNIST Omniglot Places background (a) (b) (c) (d) (e) Figure 1: (a) Example image used to test the models, with even MNIST as target and two odd MNIST flankers. (b-d) Close-up views with odd MNIST, notMNIST and Omniglot datasets as flankers, respectively. (e) An even MNIST target embedded into a natural image. Many computational models of crowding have been proposed e.g. [16, 17]. Our aim is not to model human crowding. Instead, we characterize the crowding effect in DNNs trained for object recognition, and analyze which models and settings suffer less from such effects. We investigate two types of DNNs for crowding: traditional deep convolutional neural networks and an extension of these which is multi-scale, and called eccentricity-dependent model [18]. Inspired by the retina, the receptive field size of the convolutional filters in this model grows with increasing distance from the center of the image, called the eccentricity. Cheung et al. [19] explored the emergence of such property when the visual system has an eye-fixation mechanism. We investigate under which conditions crowding occurs in DNNs that have been trained with images of target objects in isolation. We test the DNNs with images that contain the target object as well as clutter, which the network has never seen at training. Examples of the generated images using MNIST [20], notMNIST [21], and Omniglot [22] datasets are depicted in Fig 1, in which even MNIST digits are the target objects. As done in human psychophysics studies, we take recognition accuracy to be the measure of crowding. If a DNN can recognize a target object correctly despite the presence of clutter, crowding has not occurred. Our experiments reveal the dependence of crowding on image factors, such as flanker configuration, target-flanker similarity, and target eccentricity. Our results also show that prematurely pooling signals increases crowding. This result is related to the theories of crowding in humans. In addition, we show that training the models with cluttered images does not make models robust to clutter and flankers configurations not seen in training. Thus, training a model to be robust to general clutter is prohibitively expensive. We also discover that the eccentricity-dependent model, trained on isolated targets, can recognize objects even in very complex clutter, i.e. when they are embedded into images of places (Fig 1(e)). Thus, if such models are coupled with a mechanism for selecting eye fixation locations, they can be trained with objects in isolation being robust to clutter, reducing the amount of training data needed. 2 Models In this section we describe the DNN architectures for which we characterize crowding effect. We consider two kinds of DNN models: Deep Convolutional Neural Networks and eccentricity-dependent networks, each with different pooling strategies across space and scale. We investigate pooling in particular, because we [18, 23] as well as others [24] have suggested that feature integration by pooling may be the cause of crowding in human perception. 2.1 Deep Convolutional Neural Networks The first set of models we investigate are deep convolutional neural networks (DCNN) [25], in which the image is processed by three rounds of convolution and max pooling across space, and then passed to one fully connected layer for the classification. We investigate crowding under three different spatial pooling configurations, listed below and shown in Fig 2. The word pooling in the names of the model architectures below refers to how quickly we decrease the feature map size in the model. All architectures have 3×3 max pooling with various strides, and are: 2 0 2 4 6 8 no total pooling progressive pooling at end pooling Figure 2: DCNN architectures with three convolutional layers and one fully connected, trained to recognize even MNIST digits. These are used to investigate the role of pooling in crowding. The grey arrow indicates downsampling. image sampled at different scales before downsampling input to model scale inverted pyramid sampling filter y x (a) (b) (c) (d) Figure 3: Eccentricity-dependent model: Inverted pyramid with sampling points. Each circle represents a filter with its respective receptive field. For simplicity, the model is shown with 3 scales. • No total pooling Feature maps sizes decrease only due to boundary effects, as the 3×3 max pooling has stride 1. The square feature maps sizes after each pool layer are 60-54-48-42. • Progressive pooling 3×3 pooling with a stride of 2 halves the square size of the feature maps, until we pool over what remains in the final layer, getting rid of any spatial information before the fully connected layer. (60-27-11-1). • At end pooling Same as no total pooling, but before the fully connected layer, max-pool over the entire feature map. (60-54-48-1). The data in each layer in our model is a 5-dimensional tensor of minibatch size× x × y × number of channels, in which x defines the width and y the height of the input. The input image to the model is resized to 60 × 60 pixels. In our training, we used minibatches of 128 images, 32 feature channels for all convolutional layers, and convolutional filters of size 5 × 5 and stride 1. 2.2 Eccentricity-dependent Model The second type of DNN model we consider is an eccentricity-dependent deep neural network, proposed by Poggio et al. in [18] as a model of the human visual cortex and further studied in [23]. Its eccentricity dependence is based on the human retina, which has receptive fields which increase in size with eccentricity. [18] argues that the computational reason for this property is the need to compute a scale- and translation-invariant representation of objects. [18] conjectures that this model is robust to clutter when the target is near the fixation point. As discussed in [18], the set of all scales and translations for which invariant representations can be computed lie within an inverted truncated pyramid shape, as shown in Fig 3(a). The width of the pyramid at a particular scale is roughly related to the amount of translation invariance for objects of that size. Scale invariance is prioritized over translation invariance in this model, in contrast to 3 classical DCNNs. From a biological point of view, the limitation of translation invariance can be compensated for by eye movements, whereas to compensate for a lack of scale invariance the human would have to move their entire body to change their distance to the object. The eccentricity-dependent model computes an invariant representation by sampling the inverted pyramid at a discrete set of scales with the same number of filters at each scale. At larger scales, the receptive fields of the filters are also larger to cover a larger image area, see Fig 3(a). Thus, the model constructs a multi-scale representation of the input, where smaller sections (crops) of the image are sampled densely at a high resolution, and larger sections (crops) are sampled with at a lower resolution, with each scale represented using the same number of pixels, as shown in Fig 3(b-d). Each scale is treated as an input channel to the network and then processed by convolutional filters, the weights of which are shared also across scales as well as space. Because of the downsampling of the input image, this is equivalent to having receptive fields of varying sizes. These shared parameters also allow the model to learn a scale invariant representation of the image. Each processing step in this model consists of convolution-pooling, as above, as well as max pooling across different scales. Scale pooling reduces the number of scales by taking the maximum value of corresponding locations in the feature maps across multiple scales. We set the spatial pooling constant using At end pooling, as described above. The type of scale pooling is indicated by writing the number of scales remaining in each layer, e.g. 11-1-1-1-1. The three configurations tested for scale pooling are (1) at the beginning, in which all the different scales are pooled together after the first layer, 11-1-1-1-1 (2) progressively, 11-7-5-3-1 and (3) at the end, 11-11-11-11-1, in which all 11 scales are pooled together at the last layer. The parameters of this model are the same as for the DCNN explained above, except that now there are extra filters for the scales. Note that because of weight sharing across scales, the number of parameters in the eccentricity dependent model is equal that in a standard DCNN. We use 11 crops, with the smallest crop of 60 × 60 pixels, increasing by a factor of √ 2. Exponentially interpolated crops produce fewer boundary effects than linearly interpolated crops, while having qualitatively the same behavior. Results with linearly extracted crops are shown in Fig 7 of the supplementary material. All the crops are resized to 60 × 60 pixels, which is the same input image size used for the DCNN above. Image crops are shown in Fig 9. Contrast Normalization We also investigate the effect of input normalization so that the sum of the pixel intensities in each scale is in the same range. To de-emphasize the smaller crops, which will have the most non-black pixels and therefore dominate the max-pooling across scales, in some experiments we rescale all the pixel intensities to the [0, 1] interval, and then divide them by factor proportional to the crop area (( √ 2)11−i, where i = 1 for the smallest crop). 3 Experimental Set-up Models are trained with back-propagation to recognize a set of objects, which we call targets. During testing, we present the models with images which contain a target object as well as other objects which the model has not been trained to recognize, which we call flankers. The flanker acts as clutter with respect to the target object. Specifically, we train our models to recognize even MNIST digits—i.e. numbers 0, 2, 4, 6, 8—shifted at different locations of the image along the horizontal axis, which are the target objects in our experiments. We compare performance when we use images with the target object in isolation, or when flankers are also embedded in the training images. The flankers are selected from odd MNIST digits, notMNIST dataset [21] which contains letters of different typefaces, and Omniglot [22] which was introduced for one-shot character recognition. Also, we evaluate recognition when the target is embedded to images of the Places dataset [26]. The images are of size 1920 squared pixels, in which we embedded target objects of 120 squared px, and flankers of the same size, unless contrary stated. Recall that the images are resized to 60 × 60 as input to the networks. We keep the training and testing splits provided by the MNIST dataset, and use it respectively for training and testing. We illustrate some examples of target and flanker configuration in Fig 1. We refer to the target as a and to the flanker as x and use this shorthand in the plots. All experiments are done in the right half of the image plane. We do this to check if there is a difference between central and peripheral flankers. We test the models under 4 conditions: 4 • No flankers. Only the target object. (a in the plots) • One central flanker closer to the center of the image than the target. (xa) • One peripheral flanker closer to the boundary of the image that the target. (ax) • Two flankers spaced equally around the target, being both the same object, see Fig 1. (xax). 4 Experiments In this section, we investigate the crowding effect in DNNs. We first carry out experiments on models that have been trained with images containing both targets and flankers. We then repeat our analysis with the models trained with images of the targets in isolation, shifted at all positions in the horizontal axis. We analyze the effect of flanker configuration, flanker dataset, pooling in the model architecture, and model type, by evaluating accuracy recognition of the target objects.1 4.1 DNNs Trained with Target and Flankers In this setup we trained DNNs with images in which there were two identical flankers randomly chosen from the training set of MNIST odd digits, placed at a distance of 120 pixels on either side of the target (xax). The target is shifted horizontally, while keeping the distance between target and flankers constant, called the constant spacing setup, and depicted in Fig 1(a) of the supplementary material. We evaluate (i) DCNN with at the end pooling, and (ii) eccentricity-dependent model with 11-11-11-11-1 scale pooling, at the end spatial pooling and contrast normalization. We report the results using the different flanker types at test with xax, ax, xa and a target flanker configuration, in which a represents the target and x the flanker, as described in Section 3. 2 Results are in Fig 4. In the plots with 120 px spacing, we see that the models are better at recognizing objects in clutter than isolated objects for all image locations tested, especially when the configuration of target and flanker is the same at the training images than in the testing images (xax). However, in the plots where target-flanker spacing is 240 px recognition accuracy falls to less than the accuracy of recognizing isolated target objects. Thus, in order for a model to be robust to all kinds of clutter, it needs to be trained with all possible target-flanker configurations, which is infeasible in practice. Interestingly, we see that the eccentricity model is much better at recognizing objects in isolation than the DCNN. This is because the multi-scale crops divide the image into discrete regions, letting the model learn from image parts as well as the whole image. We performed an additional experiment training the network with images that contain the same target-flanker configuration as above (xax), but with different spacings between the target and the flankers, including different spacings on either side of the target. Left spacing and right spacing are sampled from 120 px, 240 px and 480 px independently. Train and test images shown in Fig. 2 of supplementary material. We test two conditions: (1) With flankers on both sides from the target (xax) at a spacing not seen in the training set (360 px); (2) With 360 px spacing, including 2 flankers on both sides (4 flankers total, xxaxx). In Fig 5, we show the accuracy for images with 360 px target-flanker spacing, and see that accuracy is not impaired, neither for the DCNN nor the eccentricity model. Yet, the DCNN accuracy for images with four flankers is impaired, while the eccentricity model still has unimpaired recognition accuracy provided that the target is in the center of the image. Thus, the recognition accuracy is not impaired for all tested models when flankers are in a similar configuration in testing as in training. This is even when the flankers at testing are placed at a spacing that is in between two seen spacings used at training. The models can interpolate to new spacings of flankers when using similar configurations in test images as seen during training, e.g. (xax), arguably due to the pooling operators. Yet, DCNN recognition is still severely impaired and do not generalize to new flanker configurations, such as adding more flankers, when there are 2 flankers on both sides of the target (xxaxx). To gain robustness to such configurations, each of these cases should be explicitly included in the training set. Only the eccentricity-dependent model is robust to different flanker 1Code to reproduce experiments is available at https://github.com/CBMM/eccentricity 2The ax flanker line starts at 120 px of target eccentricity, because nothing was put at negative eccentricities. For the case of 2 flankers, when the target was at 0-the image center, the flankers were put at -120 px and 120 px. 5 Test Flankers: odd MNIST notMNIST omniglot DCNN constant spacing of 120 px Ecc.-dependent model constant spacing of 120 px DCNN constant spacing of 240 px Ecc.-dependent model constant spacing of 240 px Figure 4: Even MNIST accuracy recognition of DCNN (at the end pooling) and Eccentricity Model (11-11-1111-1, At End spatial pooling with contrast normalization) trained with odd MNIST flankers at 120px constant spacing. The target eccentricity is in pixels. Model: DCNN Ecc w. Contrast Norm Ecc no Contrast Norm MNIST flankers 120, 240, 480 px diff. left right spacing Figure 5: All models tested at 360 px target-flanker spacing. All models can recognize digit in the presence of clutter at a spacing that is in between spacings seen at training time. However, the eccentricity Model (11-11-11-11-1, At End spatial pooling with contrast normalization) and the DCNN fail to generalize to new types of flanker configurations (two flankers on each side, xxaxx) at 360 px spacing between the target and inner flanker configurations not included in training, when the target is centered. We will explore the role of contrast normalization in Sec 4.3. 4.2 DNNs Trained with Images with the Target in Isolation For these experiments, we train the models with the target object in isolation and in different positions of the image horizontal axis. We test the models on images with target-flanker configurations a, ax, xa, xax. DCNN We examine the crowding effect with different spatial pooling in the DCNN hierarchy: (i) no total pooling, (ii) progressive pooling, (iii) at end pooling (see Section 2.1 and Fig 2). 6 Spatial Pooling: No Total Pooling Progressive At End MNIST flankers Constant spacing 120 px spacing MNIST flankers Constant target ecc. 0 px target ecc. Figure 6: Accuracy results of 4 layer DCNN with different pooling schemes trained with targets shifted across image and tested with different flanker configurations. Eccentricity is in pixels. Flanker dataset: MNIST notMNIST Omniglot DCNN Constant spacing 120 px spacing Figure 7: Effect in the accuracy recognition in DCNN with at end pooling, when using different flanker datasets at testing. Results are shown in Fig 6. In addition to the constant spacing experiment (see Section 4.1), we also evaluate the models in a setup called constant target eccentricity, in which we have fixed the target in the center of the visual field, and change the spacing between the target and the flanker, as shown in Fig 1(b) of the supplementary material. Since the target is already at the center of the visual field, a flanker can not be more central in the image than the target. Thus, we only show x, ax and xax conditions. From Fig 6, we observe that the more flankers are present in the test image, the worse recognition gets. In the constant spacing plots, we see that recognition accuracy does not change with eccentricity, which is expected, as translation invariance is built into the structure of convolutional networks. We attribute the difference between the ax and xa conditions to boundary effects. Results for notMNIST and Omniglot flankers are shown in Fig 4 of the supplementary material. From the constant target eccentricity plots, we see that as the distance between target and flanker increases, the better recognition gets. This is mainly due to the pooling operation that merges the neighboring input signals. Results with the target at the image boundary is shown in Fig 3 of the supplementary material. Furthermore, we see that the network called no total pooling performs worse in the no flanker setup than the other two models. We believe that this is because pooling across spatial locations helps the network learn invariance. However, in the below experiments, we will see that there is also a limit to how much pooling across scales of the eccentricity model improves performance. We test the effect of flankers from different datasets evaluating DCNN model with at end pooling in Fig 7. Omniglot flankers crowd slightly less than odd MNIST flankers. The more similar the flankers are to the target object—even MNIST, the more recognition impairment they produce. Since Omniglot flankers are visually similar to MNIST digits, but not digits, we see that they activate the convolutional filters of the model less than MNIST digits, and hence impair recognition less. 7 Scale Pooling: 11-1-1-1-1 11-7-5-3-1 11-11-11-11-1 No contrast norm. Constant spacing 120 px spacing With contrast norm. Constant spacing 120 px spacing Figure 8: Accuracy performance of Eccentricity-dependent model with spatial At End pooling, and changing contrast normalization and scale pooling strategies. Flankers are odd MNIST digits. We also observe that notMNIST flankers crowd much more than either MNIST or Omniglot flankers, even though notMNIST characters are much more different to MNIST digits than Omniglot flankers. This is because notMNIST is sampled from special font characters and these have many more edges and white image pixels than handwritten characters. In fact, both MNIST and Omniglot have about 20% white pixels in the image, while notMNIST has 40%. Fig 5 of the supplementary material shows the histogram of the flanker image intensities. The high number of edges in the notMNIST dataset has a higher probability of activating the convolutional filters and thus influencing the final classification decision more, leading to more crowding. Eccentricity Model We now repeat the above experiment with different configurations of the eccentricity dependent model. In this experiment, we choose to keep the spacial pooling constant (at end pooling), and investigate the effect of pooling across scales, as described in Section 2.2. The three configurations for scale pooling are (1) at the beginning, (2) progressively and (3) at the end. The numbers indicate the number of scales at each layer, so 11-11-11-11-1 is a network in which all 11 scales have been pooled together at the last layer. Results with odd MNIST flankers are shown in Fig 8. Our conclusions for the effect of the flanker dataset are similar to the experiment above with DCNN. (Results with other flanker datasets shown in Fig 6 of the supplementary material.) In this experiment, there is a dependence of accuracy on target eccentricity. The model without contrast normalization is robust to clutter at the fovea, but cannot recognize cluttered objects in the periphery. Interestingly, also in psychophysics experiments little effect of crowding is observed at the fovea [10]. The effect of adding one central flanker (ax) is the same as adding two flankers on either side (xax). This is because the highest resolution area in this model is in the center, so this part of the image contributes more to the classification decision. If a flanker is placed there instead of a target, the model tries to classify the flanker, and, it being an unfamiliar object, fails. The dependence of accuracy on eccentricity can however be mitigated by applying contrast normalization. In this case, all scales contribute equally in contrast, and dependence of accuracy on eccentricity is removed. Finally, we see that if scale pooling happens too early in the model, such as in the 11-1-1-1-1 architecture, there is more crowding. Thus, pooling too early in the architecture prevents useful information from being propagated to later processing in the network. For the rest of the experiments, we always use the 11-11-11-11-1 configuration of the model with spatial pooling at the end. 4.3 Complex Clutter Previous experiments show that training with clutter does not give robustness to clutter not seen in training, e.g. more or less flankers, or different spacing. Also, that the eccentricity-dependent model is more robust to clutter when the target is at the image center and no contrast normalization is applied, Fig 8. To further analyze the models robustness to other kinds of clutter, we test models trained 8 (a) crop outlines (b) crops resampled (c) results on places images Figure 9: (a-b) An example of how multiple crops of an input image look, as well as (c) recognition accuracy when MNIST targets are embedded into images of places. on images with isolated targets shifted along the horizontal axis, with images in which the target is embedded into randomly selected images of Places dataset [26], shown in Fig 1(e) and Fig 9(a), (b). We tested the DCNN and the eccentricity model (11-11-11-11-1) with and without contrast normalization, both with at end pooling. The results are in Fig 9(c): only the eccentricity model without contrast normalization can recognize the target and only when the target is close to the image center. This implies that the eccentricity model is robust to clutter: it doesn’t need to be trained with all different kinds of clutter. If it can fixate on the relevant part of the image, it can still discriminate the object, even at multiple object scales because this model is scale invariant [18]. 5 Discussion We investigated whether DNNs suffer from crowding, and if so, under which conditions, and what can be done to reduce the effect. We found that DNNs suffer from crowding. We also explored the most obvious approach to mitigate this problem, by including clutter in the training set of the model. Yet, this approach does not help recognition in crowding, unless, of course, a similar configuration of clutter is used for training and testing. We explored conditions under which DNNs trained with images of targets in isolation are robust to clutter. We trained various architectures of both DCNNs and eccentricity-dependent models with images of isolated targets, and tested them with images containing a target at varying image locations and 0, 1 or 2 flankers, as well as with the target object embedded into complex scenes. We found the four following factors influenced the amount of crowding in the models: • Flanker Configuration: When models are trained with images of objects in isolation, adding flankers harms recognition. Adding two flankers is the same or worse than adding just one and the smaller the spacing between flanker and target, the more crowding occurs. These is because the pooling operation merges nearby responses, such as the target and flankers if they are close. • Similarity between target and flanker: Flankers more similar to targets cause more crowding, because of the selectivity property of the learned DNN filters. • Dependence on target location and contrast normalization: In DCNNs and eccentricitydependent models with contrast normalization, recognition accuracy is the same across all eccentricities. In eccentricity-dependent networks without contrast normalization, recognition does not decrease despite presence of clutter when the target is at the center of the image. • Effect of pooling: adding pooling leads to better recognition accuracy of the models. Yet, in the eccentricity model, pooling across the scales too early in the hierarchy leads to lower accuracy. Our main conclusion is that when testing accuracy recognition of the target embedded in (place) images, the eccentricity-dependent model – without contrast normalization and with spatial and scale pooling at the end of the hierarchy – is robust to complex types of clutter, even though it had been trained on images of objects in isolation. Yet, this occurs only when the target is at the center of the image as it occurs when it is fixated by a human observer. Our analysis suggests that if we had access to a system for selecting target object location, such as the one proposed by [27], the eccentricity dependent model could be trained with lower sample complexity than other DCNN because it is robust to some factors of image variation, such as clutter and scale changes. Translation invariance would mostly be achieved through foveation. 9 Acknowledgments This work was supported by the Center for Brains, Minds and Machines (CBMM), funded by NSF STC award CCF - 1231216. A. Volokitin was also funded by Swiss Commission for Technology and Innovation (KTI, Grant No 2-69723-16), and thanks Luc Van Gool for his support. G. Roig was partly funded by SUTD SRG grant (SRG ISTD 2017 131). We also thank Xavier Boix, Francis Chen and Yena Han for helpful discussions. References [1] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in Neural Information Processing Systems 25 (F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger, eds.), pp. 1097–1105, Curran Associates, Inc., 2012. [2] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” CoRR, vol. abs/1409.1556, 2014. [3] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper with convolutions,” in Computer Vision and Pattern Recognition (CVPR), 2015. [4] 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, pp. 770–778, 2016. [5] S. Ren, K. He, R. Girshick, and J. Sun, “Faster r-cnn: Towards real-time object detection with region proposal networks,” in Advances in neural information processing systems, pp. 91–99, 2015. [6] I. J. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and harnessing adversarial examples,” arXiv preprint arXiv:1412.6572, 2014. [7] Y. Luo, X. Boix, G. Roig, T. A. Poggio, and Q. Zhao, “Foveation-based mechanisms alleviate adversarial examples,” arXiv:1511.06292, 2015. [8] M. D. Zeiler and R. Fergus, “Visualizing and understanding convolutional networks,” in European conference on computer vision, pp. 818–833, Springer, 2014. [9] D. Whitney and D. M. Levi, “Visual crowding: A fundamental limit on conscious perception and object recognition,” Trends in cognitive sciences, vol. 15, no. 4, pp. 160–168, 2011. [10] D. M. Levi, “Crowding—an essential bottleneck for object recognition: A mini-review,” Vision research, vol. 48, no. 5, pp. 635–654, 2008. [11] H. Bouma, “Interaction effects in parafoveal letter recognition,” Nature, vol. 226, pp. 177–178, 1970. [12] F. L. Kooi, A. Toet, S. P. Tripathy, and D. M. Levi, “The effect of similarity and duration on spatial interaction in peripheral vision,” Spatial vision, vol. 8, no. 2, pp. 255–279, 1994. [13] T. A. Nazir, “Effects of lateral masking and spatial precueing on gap-resolution in central and peripheral vision,” Vision research, vol. 32, no. 4, pp. 771–777, 1992. [14] W. P. Banks, K. M. Bachrach, and D. W. Larson, “The asymmetry of lateral interference in visual letter identification,” Perception & Psychophysics, vol. 22, no. 3, pp. 232–240, 1977. [15] G. Francis, M. Manassi, and M. Herzog, “Cortical dynamics of perceptual grouping and segmentation: Crowding,” Journal of Vision, vol. 16, no. 12, pp. 1114–1114, 2016. [16] J. Freeman and E. P. Simoncelli, “Metamers of the ventral stream,” Nature neuroscience, vol. 14, no. 9, pp. 1195–1201, 2011. [17] B. Balas, L. Nakano, and R. Rosenholtz, “A summary-statistic representation in peripheral vision explains visual crowding,” Journal of vision, vol. 9, no. 12, pp. 13–13, 2009. [18] T. Poggio, J. Mutch, and L. Isik, “Computational role of eccentricity dependent cortical magnification,” arXiv preprint arXiv:1406.1770, 2014. [19] B. Cheung, E. Weiss, and B. A. Olshausen, “Emergence of foveal image sampling from learning to attend in visual scenes,” International Conference on Learning Representations, 2016. [20] Y. LeCun, C. Cortes, and C. J. Burges, “The mnist database of handwritten digits,” 1998. [21] Y. Bulatov, “notMNIST dataset.” http://yaroslavvb.blogspot.ch/2011/09/notmnist-dataset. html, 2011. Accessed: 2017-05-16. [22] B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum, “Human-level concept learning through probabilistic program induction,” Science, vol. 350, no. 6266, pp. 1332–1338, 2015. [23] F. Chen, G. Roig, X. Isik, L. Boix, and T. Poggio, “Eccentricity dependent deep neural networks: Modeling invariance in human vision,” in AAAI Spring Symposium Series, Science of Intelligence, 2017. 10 [24] S. Keshvari and R. Rosenholtz, “Pooling of continuous features provides a unifying account of crowding,” Journal of Vision, vol. 16, no. 3, pp. 39–39, 2016. [25] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. [26] B. Zhou, A. Lapedriza, J. Xiao, A. Torralba, and A. Oliva, “Learning deep features for scene recognition using places database,” in Advances in neural information processing systems, pp. 487–495, 2014. [27] V. Mnih, N. Heess, A. Graves, et al., “Recurrent models of visual attention,” in Advances in neural information processing systems, pp. 2204–2212, 2014. 11 | 2017 | 519 |
7,029 | Hybrid Reward Architecture for Reinforcement Learning Harm van Seijen1 harm.vanseijen@microsoft.com Mehdi Fatemi1 mehdi.fatemi@microsoft.com Joshua Romoff12 joshua.romoff@mail.mcgill.ca Romain Laroche1 romain.laroche@microsoft.com Tavian Barnes1 tavian.barnes@microsoft.com Jeffrey Tsang1 tsang.jeffrey@microsoft.com 1Microsoft Maluuba, Montreal, Canada 2McGill University, Montreal, Canada Abstract One of the main challenges in reinforcement learning (RL) is generalisation. In typical deep RL methods this is achieved by approximating the optimal value function with a low-dimensional representation using a deep network. While this approach works well in many domains, in domains where the optimal value function cannot easily be reduced to a low-dimensional representation, learning can be very slow and unstable. This paper contributes towards tackling such challenging domains, by proposing a new method, called Hybrid Reward Architecture (HRA). HRA takes as input a decomposed reward function and learns a separate value function for each component reward function. Because each component typically only depends on a subset of all features, the corresponding value function can be approximated more easily by a low-dimensional representation, enabling more effective learning. We demonstrate HRA on a toy-problem and the Atari game Ms. Pac-Man, where HRA achieves above-human performance. 1 Introduction In reinforcement learning (RL) (Sutton & Barto, 1998; Szepesvári, 2009), the goal is to find a behaviour policy that maximises the return—the discounted sum of rewards received over time—in a data-driven way. One of the main challenges of RL is to scale methods such that they can be applied to large, real-world problems. Because the state-space of such problems is typically massive, strong generalisation is required to learn a good policy efficiently. Mnih et al. (2015) achieved a big breakthrough in this area: by combining standard RL techniques with deep neural networks, they achieved above-human performance on a large number of Atari 2600 games, by learning a policy from pixels. The generalisation properties of their Deep Q-Networks (DQN) method is achieved by approximating the optimal value function. A value function plays an important role in RL, because it predicts the expected return, conditioned on a state or state-action pair. Once the optimal value function is known, an optimal policy can be derived by acting greedily with respect to it. By modelling the current estimate of the optimal value function with a deep neural network, DQN carries out a strong generalisation on the value function, and hence on the policy. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The generalisation behaviour of DQN is achieved by regularisation on the model for the optimal value function. However, if the optimal value function is very complex, then learning an accurate low-dimensional representation can be challenging or even impossible. Therefore, when the optimal value function cannot easily be reduced to a low-dimensional representation, we argue to apply a complementary form of regularisation on the target side. Specifically, we propose to replace the optimal value function as target for training with an alternative value function that is easier to learn, but still yields a reasonable—but generally not optimal—policy, when acting greedily with respect to it. The key observation behind regularisation on the target function is that two very different value functions can result in the same policy when an agent acts greedily with respect to them. At the same time, some value functions are much easier to learn than others. Intrinsic motivation (Stout et al., 2005; Schmidhuber, 2010) uses this observation to improve learning in sparse-reward domains, by adding a domain-specific intrinsic reward signal to the reward coming from the environment. When the intrinsic reward function is potential-based, optimality of the resulting policy is maintained (Ng et al., 1999). In our case, we aim for simpler value functions that are easier to represent with a low-dimensional representation. Our main strategy for constructing an easy-to-learn value function is to decompose the reward function of the environment into n different reward functions. Each of them is assigned a separate reinforcement-learning agent. Similar to the Horde architecture (Sutton et al., 2011), all these agents can learn in parallel on the same sample sequence by using off-policy learning. Each agent gives its action-values of the current state to an aggregator, which combines them into a single value for each action. The current action is selected based on these aggregated values. We test our approach on two domains: a toy-problem, where an agent has to eat 5 randomly located fruits, and Ms. Pac-Man, one of the hard games from the ALE benchmark set (Bellemare et al., 2013). 2 Related Work Our HRA method builds upon the Horde architecture (Sutton et al., 2011). The Horde architecture consists of a large number of ‘demons’ that learn in parallel via off-policy learning. Each demon trains a separate general value function (GVF) based on its own policy and pseudo-reward function. A pseudo-reward can be any feature-based signal that encodes useful information. The Horde architecture is focused on building up general knowledge about the world, encoded via a large number of GVFs. HRA focusses on training separate components of the environment-reward function, in order to more efficiently learn a control policy. UVFA (Schaul et al., 2015) builds on Horde as well, but extends it along a different direction. UVFA enables generalization across different tasks/goals. It does not address how to solve a single, complex task, which is the focus of HRA. Learning with respect to multiple reward functions is also a topic of multi-objective learning (Roijers et al., 2013). So alternatively, HRA can be viewed as applying multi-objective learning in order to more efficiently learn a policy for a single reward function. Reward function decomposition has been studied among others by Russell & Zimdar (2003) and Sprague & Ballard (2003). This earlier work focusses on strategies that achieve optimal behavior. Our work is aimed at improving learning-efficiency by using simpler value functions and relaxing optimality requirements. There are also similarities between HRA and UNREAL (Jaderberg et al., 2017). Notably, both solve multiple smaller problems in order to tackle one hard problem. However, the two architectures are different in their workings, as well as the type of challenge they address. UNREAL is a technique that boosts representation learning in difficult scenarios. It does so by using auxiliary tasks to help train the lower-level layers of a deep neural network. An example of such a challenging representationlearning scenario is learning to navigate in the 3D Labyrinth domain. On Atari games, the reported performance gain of UNREAL is minimal, suggesting that the standard deep RL architecture is sufficiently powerful to extract the relevant representation. By contrast, the HRA architecture breaks down a task into smaller pieces. HRA’s multiple smaller tasks are not unsupervised; they are tasks that are directly relevant to the main task. Furthermore, whereas UNREAL is inherently a deep RL technique, HRA is agnostic to the type of function approximation used. It can be combined with deep 2 neural networks, but it also works with exact, tabular representations. HRA is useful for domains where having a high-quality representation is not sufficient to solve the task efficiently. Diuk’s object-oriented approach (Diuk et al., 2008) was one of the first methods to show efficient learning in video games. This approach exploits domain knowledge related to the transition dynamic to efficiently learn a compact transition model, which can then be used to find a solution using dynamic-programming techniques. This inherently model-based approach has the drawback that while it efficiently learns a very compact model of the transition dynamics, it does not reduce the state-space of the problem. Hence, it does not address the main challenge of Ms. Pac-Man: its huge state-space, which is even for DP methods intractable (Diuk applied his method to an Atari game with only 6 objects, whereas Ms. Pac-Man has over 150 objects). Finally, HRA relates to options (Sutton et al., 1999; Bacon et al., 2017), and more generally hierarchical learning (Barto & Mahadevan, 2003; Kulkarni et al., 2016). Options are temporally-extended actions that, like HRA’s heads, can be trained in parallel based on their own (intrinsic) reward functions. However, once an option has been trained, the role of its intrinsic reward function is over. A higher-level agent that uses an option sees it as just another action and evaluates it using its own reward function. This can yield great speed-ups in learning and help substantially with better exploration, but they do not directly make the value function of the higher-level agent less complex. The heads of HRA represent values, trained with components of the environment reward. Even after training, these values stay relevant, because the aggregator uses them to select its action. 3 Model Consider a Markov Decision Process ⟨S, A, P, Renv, γ⟩, which models an agent interacting with an environment at discrete time steps t. It has a state set S, action set A, environment reward function Renv : S×A×S →R, and transition probability function P : S×A×S →[0, 1]. At time step t, the agent observes state st ∈S and takes action at ∈A. The agent observes the next state st+1, drawn from the transition probability distribution P(st, at, ·), and a reward rt = Renv(st, at, st+1). The behaviour is defined by a policy π : S × A →[0, 1], which represents the selection probabilities over actions. The goal of an agent is to find a policy that maximises the expectation of the return, which is the discounted sum of rewards: Gt := P∞ i=0 γi rt+i, where the discount factor γ ∈[0, 1] controls the importance of immediate rewards versus future rewards. Each policy π has a corresponding action-value function that gives the expected return conditioned on the state and action, when acting according to that policy: Qπ(s, a) = E[Gt|st = s, at = a, π] (1) The optimal policy π∗can be found by iteratively improving an estimate of the optimal action-value function Q∗(s, a) := maxπ Qπ(s, a), using sample-based updates. Once Q∗is sufficiently accurate approximated, acting greedy with respect to it yields the optimal policy. 3.1 Hybrid Reward Architecture The Q-value function is commonly estimated using a function approximator with weight vector θ: Q(s, a; θ). DQN uses a deep neural network as function approximator and iteratively improves an estimate of Q∗by minimising the sequence of loss functions: Li(θi) = Es,a,r,s′[(yDQN i −Q(s, a; θi))2] , (2) with yDQN i = r + γ max a′ Q(s′, a′; θi−1), (3) The weight vector from the previous iteration, θi−1, is encoded using a separate target network. We refer to the Q-value function that minimises the loss function(s) as the training target. We will call a training target consistent, if acting greedily with respect to it results in a policy that is optimal under the reward function of the environment; we call a training target semi-consistent, if acting greedily with respect to it results in a good policy—but not an optimal one—under the reward function of the environment. For (2), the training target is Q∗ env, the optimal action-value function under Renv, which is the default consistent training target. That a training target is consistent says nothing about how easy it is to learn that target. For example, if Renv is sparse, the default learning objective can be very hard to learn. In this case, adding a 3 potential-based additional reward signal to Renv can yield an alternative consistent learning objective that is easier to learn. But a sparse environment reward is not the only reason a training target can be hard to learn. We aim to find an alternative training target for domains where the default training target Q∗ env is hard to learn, due to the function being high-dimensional and hard to generalise for. Our approach is based on a decomposition of the reward function. We propose to decompose the reward function Renv into n reward functions: Renv(s, a, s′) = n X k=1 Rk(s, a, s′) , for all s, a, s′, (4) and to train a separate reinforcement-learning agent on each of these reward functions. There are infinitely many different decompositions of a reward function possible, but to achieve value functions that are easy to learn, the decomposition should be such that each reward function is mainly affected by only a small number of state variables. Because each agent k has its own reward function, it has also its own Q-value function, Qk. In general, different agents can share multiple lower-level layers of a deep Q-network. Hence, we will use a single vector θ to describe the combined weights of the agents. We refer to the combined network that represents all Q-value functions as the Hybrid Reward Architecture (HRA) (see Figure 1). Action selection for HRA is based on the sum of the agent’s Q-value functions, which we call QHRA: QHRA(s, a; θ) := n X k=1 Qk(s, a; θ) , for all s, a. (5) The collection of agents can be viewed alternatively as a single agent with multiple heads, with each head producing the action-values of the current state under a different reward function. The sequence of loss function associated with HRA is: Li(θi) = Es,a,r,s′ " n X k=1 (yk,i −Qk(s, a; θi))2 # , (6) with yk,i = Rk(s, a, s′) + γ max a′ Qk(s′, a′; θi−1) . (7) By minimising these loss functions, the different heads of HRA approximate the optimal action-value functions under the different reward functions: Q∗ 1, . . . , Q∗ n. Furthermore, QHRA approximates Q∗ HRA, defined as: Q∗ HRA(s, a) := n X k=1 Q∗ k(s, a) for all s, a . Note that Q∗ HRA is different from Q∗ env and generally not consistent. An alternative training target is one that results from evaluating the uniformly random policy υ under each component reward function: Qυ HRA(s, a) := Pn k=1 Qυ k(s, a). Qυ HRA is equal to Qυ env, the Single-head HRA Figure 1: Illustration of Hybrid Reward Architecture. 4 Q-values of the random policy under Renv, as shown below: Qυ env(s, a) = E " ∞ X i=0 γiRenv(st+i, at+i, st+1+i)|st = s, at = a, υ # , = E " ∞ X i=0 γi n X k=1 Rk(st+i, at+i, st+1+i)|st = s, at = a, υ # , = n X k=1 E " ∞ X i=0 γiRk(st+i, at+i, st+1+i)|st = s, at = a, υ # , = n X k=1 Qυ k(s, a) := Qυ HRA(s, a) . This training target can be learned using the expected Sarsa update rule (van Seijen et al., 2009), by replacing (7), with yk,i = Rk(s, a, s′) + γ X a′∈A 1 |A|Qk(s′, a′; θi−1) . (8) Acting greedily with respect to the Q-values of a random policy might appear to yield a policy that is just slightly better than random, but, surpringly, we found that for many navigation-based domains Qυ HRA acts as a semi-consistent training target. 3.2 Improving Performance further by using high-level domain knowledge. In its basic setting, the only domain knowledge applied to HRA is in the form of the decomposed reward function. However, one of the strengths of HRA is that it can easily exploit more domain knowledge, if available. Domain knowledge can be exploited in one of the following ways: 1. Removing irrelevant features. Features that do not affect the received reward in any way (directly or indirectly) only add noise to the learning process and can be removed. 2. Identifying terminal states. Terminal states are states from which no further reward can be received; they have by definition a value of 0. Using this knowledge, HRA can refrain from approximating this value by the value network, such that the weights can be fully used to represent the non-terminal states. 3. Using pseudo-reward functions. Instead of updating a head of HRA using a component of the environment reward, it can be updated using a pseudo-reward. In this scenario, a set of GVFs is trained in parallel using pseudo-rewards. While these approaches are not specific to HRA, HRA can exploit domain knowledge to a much great extend, because it can apply these approaches to each head individually. We show this empirically in Section 4.1. 4 Experiments 4.1 Fruit Collection task In our first domain, we consider an agent that has to collect fruits as quickly as possible in a 10 × 10 grid. There are 10 possible fruit locations, spread out across the grid. For each episode, a fruit is randomly placed on 5 of those 10 locations. The agent starts at a random position. The reward is +1 if a fruit gets eaten and 0 otherwise. An episode ends after all 5 fruits have been eaten or after 300 steps, whichever comes first. We compare the performance of DQN with HRA using the same network. For HRA, we decompose the reward function into 10 different reward functions, one per possible fruit location. The network consists of a binary input layer of length 110, encoding the agent’s position and whether there is a fruit on each location. This is followed by a fully connected hidden layer of length 250. This layer is connected to 10 heads consisting of 4 linear nodes each, representing the action-values of 5 the 4 actions under the different reward functions. Finally, the mean of all nodes across heads is computed using a final linear layer of length 4 that connects the output of corresponding nodes in each head. This layer has fixed weights with value 1 (i.e., it implements Equation 5). The difference between HRA and DQN is that DQN updates the network from the fourth layer using loss function (2), whereas HRA updates the network from the third layer using loss function (6). HRA with pseudo-rewards HRA DQN Figure 2: The different network architectures used. Besides the full network, we test using different levels of domain knowledge, as outlined in Section 3.2: 1) removing the irrelevant features for each head (providing only the position of the agent + the corresponding fruit feature); 2) the above plus identifying terminal states; 3) the above plus using pseudo rewards for learning GVFs to go to each of the 10 locations (instead of learning a value function associated to the fruit at each location). The advantage is that these GVFs can be trained even if there is no fruit at a location. The head for a particular location copies the Q-values of the corresponding GVF if the location currently contains a fruit, or outputs 0s otherwise. We refer to these as HRA+1, HRA+2 and HRA+3, respectively. For DQN, we also tested a version that was applied to the same network as HRA+1; we refer to this version as DQN+1. Training samples are generated by a random policy; the training process is tracked by evaluating the greedy policy with respect to the learned value function after every episode. For HRA, we performed experiments with Q∗ HRA as training target (using Equation 7), as well as Qυ HRA (using Equation 8). Similarly, for DQN we used the default training target, Q∗ env, as well as Qυ env. We optimised the step-size and the discount factor for each method separately. The results are shown in Figure 3 for the best settings of each method. For DQN, using Q∗ env as training target resulted in the best performance, while for HRA, using Qυ HRA resulted in the best performance. Overall, HRA shows a clear performance boost over DQN, even though the network is identical. Furthermore, adding different forms of domain knowledge causes further large improvements. Whereas using a network structure enhanced by domain knowledge improves performance of HRA, using that same network for DQN results in a decrease in performance. The big boost in performance that occurs when the the terminal states are identified is due to the representation becoming a one-hot vector. Hence, we removed the hidden layer and directly fed this one-hot vector 0 1000 2000 3000 4000 5000 Episodes 0 50 100 150 200 250 300 Steps DQN DQN+1 HRA HRA+1 0 25 50 75 100 125 150 175 200 Episodes 0 50 100 150 200 250 300 Steps HRA+1 HRA+2 HRA+3 Figure 3: Results on the fruit collection domain, in which an agent has to eat 5 randomly placed fruits. An episode ends after all 5 fruits are eaten or after 300 steps, whichever comes first. 6 into the different heads. Because the heads are linear, this representation reduces to an exact, tabular representation. For the tabular representation, we used the same step-size as the optimal step-size for the deep network version. 4.2 ATARI game: Ms. Pac-Man Figure 4: The game Ms. Pac-Man. Our second domain is the Atari 2600 game Ms. Pac-Man (see Figure 4). Points are obtained by eating pellets, while avoiding ghosts (contact with one causes Ms. Pac-Man to lose a life). Eating one of the special power pellets turns the ghosts blue for a small duration, allowing them to be eaten for extra points. Bonus fruits can be eaten for further points, twice per level. When all pellets have been eaten, a new level is started. There are a total of 4 different maps and 7 different fruit types, each with a different point value. We provide full details on the domain in the supplementary material. Baselines. While our version of Ms. Pac-Man is the same as used in literature, we use different preprocessing. Hence, to test the effect of our preprocessing, we implement the A3C method (Mnih et al., 2016) and run it with our preprocessing. We refer to the version with our preprocessing as ‘A3C(channels)’, the version with the standard preprocessing ‘A3C(pixels)’, and A3C’s score reported in literature ‘A3C(reported)’. Preprocessing. Each frame from ALE is 210 × 160 pixels. We cut the bottom part and the top part of the screen to end up with 160 × 160 pixels. From this, we extract the position of the different objects and create for each object a separate input channel, encoding its location with an accuracy of 4 pixels. This results in 11 binary channels of size 40 × 40. Specifically, there is a channel for Ms. Pac-Man, each of the four ghosts, each of the four blue ghosts (these are treated as different objects), the fruit plus one channel with all the pellets (including power pellets). For A3C, we combine the 4 channels of the ghosts into a single channel, to allow it to generalise better across ghosts. We do the same with the 4 channels of the blue ghosts. Instead of giving the history of the last 4 frames as done in literature, we give the orientation of Ms. Pac-Man as a 1-hot vector of length 4 (representing the 4 compass directions). HRA architecture. The environment reward signal corresponds with the points scored in the game. Before decomposing the reward function, we perform reward shaping by adding a negative reward of -1000 for contact with a ghost (which causes Ms. Pac-Man to lose a life). After this, the reward is decomposed in a way that each object in the game (pellet/fruit/ghost/blue ghost) has its own reward function. Hence, there is a separate RL agent associated with each object in the game that estimates a Q-value function of its corresponding reward function. To estimate each component reward function, we use the three forms of domain knowledge discussed in Section 3.2. HRA uses GVFs that learn pseudo Q-values (with values in the range [0, 1]) for getting to a particular location on the map (separate GVFs are learnt for each of the four maps). In contrast to the fruit collection task (Section 4.1), HRA learns part of its representation during training: it starts off with 0 GVFs and 0 heads for the pellets. By wandering around the maze, it discovers new map locations it can reach, resulting in new GVFs being created. Whenever the agent finds a pellet at a new location it creates a new head corresponding to the pellet. The Q-values for an object (pellet/fruit/ghost/blue ghost) are set to the pseudo Q-values of the GVF corresponding with the object’s location (i.e., moving objects use a different GVF each time), multiplied with a weight that is set equal to the reward received when the object is eaten. If an object is not on the screen, all its Q-values are 0. We test two aggregator types. The first one is a linear one that sums the Q-values of all heads (see Equation 5). For the second one, we take the sum of all the heads that produce points, and normalise the resulting Q-values; then, we add the sum of the Q-values of the heads of the regular ghosts, multiplied with a weight vector. 7 For exploration, we test two complementary types of exploration. Each type adds an extra exploration head to the architecture. The first type, which we call diversification, produces random Q-values, drawn from a uniform distribution over [0, 20]. We find that it is only necessary during the first 50 steps, to ensure starting each episode randomly. The second type, which we call count-based, adds a bonus for state-action pairs that have not been explored a lot. It is inspired by upper confidence bounds (Auer et al., 2002). Full details can be found in the supplementary material. For our final experiment, we implement a special head inspired by executive-memory literature (Fuster, 2003; Gluck et al., 2013). When a human game player reaches the maximum of his cognitive and physical ability, he starts to look for favourable situations or even glitches and memorises them. This cognitive process is indeed memorising a sequence of actions (also called habit), and is not necessarily optimal. Our executive-memory head records every sequence of actions that led to pass a level without any kill. Then, when facing the same level, the head gives a very high value to the recorded action, in order to force the aggregator’s selection. Note that our simplified version of executive memory does not generalise. Evaluation metrics. There are two different evaluation methods used across literature which result in very different scores. Because ALE is ultimately a deterministic environment (it implements pseudo-randomness using a random number generator that always starts with the same seed), both evaluation metrics aim to create randomness in the evaluation in order to rate methods with more generalising behaviour higher. The first metric introduces a mild form of randomness by taking a random number of no-op actions before control is handed over to the learning algorithm. In the case of Ms. Pac-Man, however, the game starts with a certain inactive period that exceeds the maximum number of no-op steps, resulting in the game having a fixed start after all. The second metric selects random starting points along a human trajectory and results in much stronger randomness, and does result in the intended random start evaluation. We refer to these metrics as ‘fixed start’ and ‘random start’. Table 1: Final scores. fixed random method start start best reported 6,673 2,251 human 15,693 15,375 A3C (reported) — 654 A3C (pixels) 2,168 626 A3C (channels) 2,423 589 HRA 25,304 23,770 Results. Figure 5 shows the training curves; Table 1 shows the final score after training. The best reported fixed start score comes from STRAW (Vezhnevets et al., 2016); the best reported random start score comes from the Dueling network architecture (Wang et al., 2016). The human fixed start score comes from Mnih et al. (2015); the human random start score comes from Nair et al. (2015). We train A3C for 800 million frames. Because HRA learns fast, we train it only for 5,000 episodes, corresponding with about 150 million frames (note that better policies result in more frames per episode). We tried a few different settings for HRA: with/without normalisation and with/without each type of exploration. The score shown for HRA uses the best combination: with normalisation and with both exploration types. All combinations achieved over 10,000 points in training, except the combination with no exploration at all, which—not surprisingly—performed very poorly. With the best combination, HRA not only outperforms the state-of-the-art on both metrics, it also significantly outperforms the human score, convincingly demonstrating the strength of HRA. Comparing A3C(pixels) and A3C(channels) in Table 1 reveals a surprising result: while we use advanced preprocessing by separating the screen image into relevant object channels, this did not significantly change the performance of A3C. In our final experiment, we test how well HRA does if it exploits the weakness of the fixed-start evaluation metric by using a simplified version of executive memory. Using this version, we not only surpass the human high-score of 266,330 points,1 we achieve the maximum possible score of 999,990 points in less than 3,000 episodes. The curve is slow in the first stages because the model has to be trained, but even though the further levels get more and more difficult, the level passing speeds up by taking advantage of already knowing the maps. Obtaining more points is impossible, not because the game ends, but because the score overflows to 0 when reaching a million points.2 1See highscore.com: ‘Ms. Pac-Man (Atari 2600 Emulated)’. 2For a video of HRA’s final trajectory reaching this point, see: https://youtu.be/VeXNw0Owf0Y 8 1 × 105 1 × 106 1 × 107 5 × 107 1 × 108 8 × 108 0 5000 10000 15000 20000 25000 0 1000 2000 3000 4000 5000 HRA A3C(pixels) A3C(channels) frames frames frames frames frames frames A3C(pixels) score at 8 × 108 frames A3C(channels) score at Score Episodes Figure 5: Training smoothed over 100 episodes. 1.5 × 108 3.0 × 108 4.1 × 107 2.6 × 105 9.3 × 106 1.0 × 108 8.4 × 108 0 500 1000 1500 2000 2500 3000 200k 400k 600k 800k 1M 0 Level 1 Level 5 Level 10 Level 32 Level 50 Level 100 Level 180 frames frames frames frames frames frames frames Human high-score Score Episodes Figure 6: Training with trajectory memorisation. 5 Discussion One of the strengths of HRA is that it can exploit domain knowledge to a much greater extent than single-head methods. This is clearly shown by the fruit collection task: while removing irrelevant features improves performance of HRA, the performance of DQN decreased when provided with the same network architecture. Furthermore, separating the pixel image into multiple binary channels only makes a small improvement in the performance of A3C over learning directly from pixels. This demonstrates that the reason that modern deep RL struggle with Ms. Pac-Man is not related to learning from pixels; the underlying issue is that the optimal value function for Ms. Pac-Man cannot easily be mapped to a low-dimensional representation. HRA solves Ms. Pac-Man by learning close to 1,800 general value functions. This results in an exponential breakdown of the problem size: whereas the input state-space corresponding with the binary channels is in the order of 1077, each GVF has a state-space in the order of 103 states, small enough to be represented without any function approximation. While we could have used a deep network for representing each GVF, using a deep network for such small problems hurts more than it helps, as evidenced by the experiments on the fruit collection domain. We argue that many real-world tasks allow for reward decomposition. Even if the reward function can only be decomposed in two or three components, this can already help a lot, due to the exponential decrease of the problem size that decomposition might cause. References Auer, P., Cesa-Bianchi, N., and Fischer, P. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002. Bacon, P., Harb, J., and Precup, D. The option-critic architecture. In Proceedings of the Thirthy-first AAAI Conference On Artificial Intelligence (AAAI), 2017. Barto, A. G. and Mahadevan, S. Recent advances in hierarchical reinforcement learning. Discrete Event Dynamic Systems, 13(4):341–379, 2003. Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279, 2013. Diuk, C., Cohen, A., and Littman, M. L. An object-oriented representation for efficient reinforcement learning. In Proceedings of The 25th International Conference on Machine Learning, 2008. Fuster, J. M. Cortex and mind: Unifying cognition. Oxford university press, 2003. Gluck, M. A., Mercado, E., and Myers, C. E. Learning and memory: From brain to behavior. Palgrave Macmillan, 2013. 9 Jaderberg, M., Mnih, V., Czarnecki, W.M., Schaul, T., Leibo, J.Z., Silver, D., and Kavukcuoglu, K. Reinforcement learning with unsupervised auxiliary tasks. In International Conference on Learning Representations, 2017. Kulkarni, T. D., Narasimhan, K. R., Saeedi, A., and Tenenbaum, J. B. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In Advances in Neural Information Processing Systems 29, 2016. Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., Petersen, S., Beattie, C., Sadik, A., Antonoglou, I., Kumaran, H. King D., Wierstra, D., Legg, S., and Hassabis, D. Human-level control through deep reinforcement learning. Nature, 518:529–533, 2015. Mnih, V., Badia, A. P., Mirza, M., Graves, A., Harley, T., Lillicrap, T. P., Silver, D., and Kavukcuoglu, K. Asynchronous methods for deep reinforcement learning. In Proceedings of The 33rd International Conference on Machine Learning, pp. 1928–1937, 2016. Nair, A., Srinivasan, P., Blackwell, S., Alcicek, C., Fearon, R., Maria, A. De, Panneershelvam, V., Suleyman, M., Beattie, C., Petersen, S., Legg, S., Mnih, V., Kavukcuoglu, K., and Silver, D. Massively parallel methods for deep reinforcement learning. In In Deep Learning Workshop, ICML, 2015. Ng, A. Y., Harada, D., and Russell, S. Policy invariance under reward transformations: theory and application to reward shaping. In Proceedings of The 16th International Conference on Machine Learning, 1999. Roijers, D. M., Vamplew, P., Whiteson, S., and Dazeley, R. A survey of multi-objective sequential decision-making. Journal of Artificial Intelligence Research, 2013. Russell, S. and Zimdar, A. L. Q-decomposition for reinforcement learning agents. In Proceedings of The 20th International Conference on Machine Learning, 2003. Schaul, T., Horgan, D., Gregor, K., and Silver, D. Universal value function approximators. In Proceedings of The 32rd International Conference on Machine Learning, 2015. Schmidhuber, J. Formal theory of creativity, fun, and intrinsic motivation (1990–2010). In IEEE Transactions on Autonomous Mental Development 2.3, pp. 230–247, 2010. Sprague, N. and Ballard, D. Multiple-goal reinforcement learning with modular sarsa(0). In International Joint Conference on Artificial Intelligence, 2003. Stout, A., Konidaris, G., and Barto, A. G. Intrinsically motivated reinforcement learning: A promising framework for developmental robotics. In The AAAI Spring Symposium on Developmental Robotics, 2005. Sutton, R. S. and Barto, A. G. Reinforcement Learning: An Introduction. MIT Press, Cambridge, 1998. Sutton, R. S., Modayil, J., Delp, M., Degris, T., Pilarski, P. M., White, A., and Precup, Doina. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In Proceedings of 10th International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2011. Sutton, R.S., Precup, D., and Singh, S.P. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112(1-2):181–211, 1999. Szepesvári, C. Algorithms for reinforcement learning. Morgan and Claypool, 2009. van Seijen, H., van Hasselt, H., Whiteson, S., and Wiering, M. A theoretical and empirical analysis of expected sarsa. In IEEE Symposium on Adaptive Dynamic Programming and Reinforcement Learning (ADPRL), pp. 177–184, 2009. Vezhnevets, A., Mnih, V., Osindero, S., Graves, A., Vinyals, O., Agapiou, J., and Kavukcuoglu, K. Strategic attentive writer for learning macro-actions. In Advances in Neural Information Processing Systems 29, 2016. 10 Wang, Z., Schaul, T., Hessel, M., van Hasselt, H., Lanctot, M., and Freitas, N. Dueling network architectures for deep reinforcement learning. In Proceedings of The 33rd International Conference on Machine Learning, 2016. 11 | 2017 | 52 |
7,030 | Non-Stationary Spectral Kernels Sami Remes sami.remes@aalto.fi Markus Heinonen markus.o.heinonen@aalto.fi Samuel Kaski samuel.kaski@aalto.fi Helsinki Institute for Information Technology HIIT Department of Computer Science, Aalto University Abstract We propose non-stationary spectral kernels for Gaussian process regression by modelling the spectral density of a non-stationary kernel function as a mixture of input-dependent Gaussian process frequency density surfaces. We solve the generalised Fourier transform with such a model, and present a family of non-stationary and non-monotonic kernels that can learn input-dependent and potentially longrange, non-monotonic covariances between inputs. We derive efficient inference using model whitening and marginalized posterior, and show with case studies that these kernels are necessary when modelling even rather simple time series, image or geospatial data with non-stationary characteristics. 1 Introduction Gaussian processes are a flexible method for non-linear regression [18]. They define a distribution over functions, and their performance depends heavily on the covariance function that constrains the function values. Gaussian processes interpolate function values by considering the value of functions at other similar points, as defined by the kernel function. Standard kernels, such as the Gaussian kernel, lead to smooth neighborhood-dominated interpolation that is oblivious of any periodic or long-range connections within the input space, and can not adapt the similarity metric to different parts of the input space. Two key properties of covariance functions are stationarity and monotony. A stationary kernel K(x, x′) = K(x + a, x′ + a) is a function only of the distance x −x′ and not directly the value of x. Hence it encodes an identical similarity notion across the input space, while a monotonic kernel decreases over distance. Kernels that are both stationary and monotonic, such as the Gaussian and Matérn kernels, can encode neither input-dependent function dynamics nor long-range correlations within the input space. Non-monotonic and non-stationary functions are commonly encountered in realistic signal processing [19], time series analysis [9], bioinformatics [5, 20], and in geostatistics applications [7, 8]. Recently, several authors have explored kernels that are either non-monotonic or non-stationary. A non-monotonic kernel can reveal informative manifolds over the input space by coupling distant points due to periodic or other effects. Non-monotonic kernels have been derived from the Fourier decomposition of kernels [13, 24, 30], which renders them inherently stationary. Non-stationary kernels, on the other hand, are based on generalising monotonic base kernels, such as the Matérn family of kernels [6, 15], by partitioning the input space [4], or by input transformations [25]. We propose an expressive and efficient kernel family that is – in contrast to earlier methods – both non-stationary and non-monotonic, and hence can infer long-range or periodic relations in an input-dependent manner. We derive the kernel from first principles by solving the more expressive generalised Fourier decomposition of non-stationary functions, than the more limited standard Fourier decomposition exploited by earlier works. We propose and solve the generalised spectral density as a mixture of Gaussian process density surfaces that model flexible input-dependent frequency patterns. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The kernel reduces to a stationary kernel with appropriate parameterisation. We show the expressivity of the kernel with experiments on time series data, image-based pattern recognition and extrapolation, and on climate data modelling. 2 Related Work Bochner’s theorem for stationary signals, whose covariance can be written as k(τ) = k(x −x′) = k(x, x′), implies a Fourier dual [30] k(τ) = Z S(s)e2πisτds S(s) = Z k(τ)e−2πisτdτ. The dual is a special case of the more general Fourier transform (1), and has been exploited to design rich, yet stationary kernel representations [24, 32] and used for large-scale inference [17]. Lazaro-Gredilla et al. [13] proposed to directly learn the spectral density as a mixture of Dirac delta functions leading to a sparse spectrum (SS) kernel kSS(τ) = 1 Q PQ i=1 cos(2πsT i τ). Wilson et al. [30] derived a stationary spectral mixture (SM) kernel by modelling the univariate spectral density using a mixture of normals SSM(s) = P i wi[N(s|µi, σ2 i ) + N(s| −µi, σ2 i )]/2, corresponding to the kernel function kSM(τ) = P i wi exp(−2π2σ2 i τ) cos(2πµiτ), which we generalize to the non-stationary case. The SM kernel was also extended for multidimensional inputs using Kronecker structure for scalability [27]. Kernels derived from the spectral representation are particularly well suited to encoding long-range, non-monotonic or periodic kernels; however, they have so far been unable to handle non-stationarity, although [29] presented a partly non-stationary SM kernel that has input-dependent mixture weights. Kom Samo and Roberts also derived a kernel similar to our bivariate spectral mixture kernel in a recent technical report [11]. Non-stationary kernels, on the other hand, have been constructed by non-stationary extensions of Matérn and Gaussian kernels with input-dependent length-scales [3, 6, 15, 16], input space warpings [22, 25], and with local stationarity with products of stationary and non-stationary kernels [2, 23]. The simplest non-stationary kernel is arguably the dot product kernel [18], which has been used as a way to assign input-dependent signal variances [26]. Non-stationary kernels are a good match for functions with transitions in their dynamics, yet are unsuitable for modelling non-monotonic properties. Our work can also be seen as a generalisation of wavelets, or time-dependent frequency components, into general and smooth input-dependent components. In signal processing, Hilbert-Huang transforms and Hilbert spectral analysis explore input-dependent frequencies, but with deterministic transform functions on the inputs [8, 9]. 3 Non-stationary spectral mixture kernels This section introduces the main contributions. We employ the generalised spectral decomposition of non-stationary functions and derive a practical and efficient family of kernels based on non-stationary spectral components. Our approach relies on associating input-dependent frequencies for data inputs, and solving a kernel through the generalised spectral transform. The most general family of kernels is the non-stationary kernels, which include stationary kernels as special cases [2]. A non-stationary kernel k(x, x′) ∈R for scalar inputs x, x′ ∈R can be characterized by its spectral density S(s, s′) over frequencies s, s′ ∈R, and the two are related via a generalised Fourier inverse transform1 k(x, x′) = Z R Z R e2πi(xs−x′s′)µS(ds, ds′) , (1) 1We focus on scalar inputs and frequencies for simplicity. An extension based on vector-valued inputs and frequencies [2, 10] is straightforward. 2 (a) (b) Figure 1: (a): Spectral density surface of a single component bivariate spectral mixture kernel with 8 permuted peaks. (b): The corresponding kernel on inputs x ∈[−1, 1]. where µS is a Lebesgue-Stieltjes measure associated to some positive semi-definite (PSD) spectral density function S(s, s′) with bounded variations [2, 14, 31], which we denote as the spectral surface since it considers the amplitude of frequency pairs (See Figure 1a). The generalised Fourier transform (1) specifies that a spectral surface S(s, s′) generates a PSD kernel K(x, x′) that is non-stationary unless the spectral measure mass is concentrated only on the diagonal s = s′. We design a practical, efficient and flexible parameterisation of spectral surfaces that, in turn, specifies novel non-stationary kernels with input-dependent characteristics and potentially long-range non-monotonic correlation structures. 3.1 Bivariate Spectral Mixture kernel Next, we introduce spectral kernels that remove the restriction of stationarity of earlier works. We start by modeling the spectral density as a mixture of Q bivariate Gaussian components Si(s, s′) = X µi∈±{µi,µ′ i}2 N s s′ |µi, Σi , Σi = σ2 i ρiσiσ′ i ρiσiσ′ i σ′ i 2 , (2) with parameterisation using the correlation ρi, means µi, µ′ i and variances σ2 i , σ′ i 2. To produce a PSD spectral density Si as required by equation (1) we need to include symmetries Si(s, s′) = Si(s′, s) and sufficient diagonal components Si(s, s), Si(s′, s′). To additionally result in a real-valued kernel, symmetry is required with respect to the negative frequencies as well, i.e., Si(s, s′) = Si(−s, −s′). The sum P µi∈±{µi,µ′ i}2 satisfies all three requirements by iterating over the four permutations of {µi, µ′ i}2 and the opposite signs (−µi, −µ′ i), resulting in eight components (see Figure 1a). The generalised Fourier inverse transform (1) can be solved in closed form for a weighted spectral surface mixture S(s, s′) = PQ i=1 w2 i Si(s, s′) using Gaussian integral identities (see the Supplement): k(x, x′) = Q X i=1 w2 i exp(−2π2˜xT Σi˜x)Ψµi,µ′ i(x)T Ψµi,µ′ i(x′) (3) where Ψµi,µ′ i(x) = cos 2πµix + cos 2πµ′ ix sin 2πµix + sin 2πµ′ ix , and where we define ˜x = (x, −x′)T and introduce mixture weights wi for each component. We denote the proposed kernel as the bivariate spectral mixture (BSM) kernel (see Figure 1b). The positive definiteness of the kernel is guaranteed by the spectral transform, and is also easily verified since the sinusoidal components form an inner product and the exponential component resembles an unscaled Gaussian density. A similar formulation for non-stationary spectral kernels was presented also in a technical report [11]. 3 (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) (k) (l) Figure 2: (a)-(d): Examples of kernel matrices on inputs x ∈[−1, 1] for a Gaussian kernel (a), sparse spectrum kernel [13] (b), spectral mixture kernel [30] (c), and for the GSM kernel (d). (e)-(h): The corresponding generalised spectral density surfaces of the four kernels. (i)-(l): The corresponding spectrograms, that is, input-dependent frequency amplitudes. The GSM kernel is highlighted with a spectrogram mixture of Q = 2 Gaussian process surface functions. We immediately notice that the BSM kernel vanishes rapidly outside the origin (x, x′) = (0, 0). We would require a huge number of components centered at different points xi to cover a reasonably-sized input space. 3.2 Generalised Spectral Mixture (GSM) kernel We extend the kernel derived in Section 3.1 further by parameterising the frequencies, length-scales and mixture weights as a Gaussian processes2, that form a smooth spectrogram (See Figure 2(l)): log wi(x) ∼GP(0, kw(x, x′)), (4) log ℓi(x) ∼GP(0, kℓ(x, x′)), (5) logit µi(x) ∼GP(0, kµ(x, x′)). (6) Here the log transform is used to ensure the weights w(x) and lengthscales ℓ(x) are non-negative, and the logit transform logit µ(x) = log µ FN−µ limits the learned frequencies between zero and the Nyquist frequency FN, which is defined as half of the sampling rate of the signal. A GP prior f(x) ∼GP(0, k(x, x′)) defines a distribution over zero-mean functions, and denotes the covariance between function values cov[f(x), f(x′)] = k(x, x′) equals their prior kernel. For any collection of inputs, x1, . . . , xN, the function values follow a multivariate normal distribution (f(x1), . . . , f(xN))T ∼N(0, K), where Kij = k(xi, xj). The key property of Gaussian processes is that they can encode smooth functions by correlating function values of input points that are similar according to the kernel k(x, x′). We use standard Gaussian kernels kw, kℓand kµ. 2See the Supplement for a tutorial on Gaussian processes. 4 We accommodate the input-dependent lengthscale by replacing the exponential part of (3) by the Gibbs kernel kGibbs,i(x, x′) = s 2ℓi(x)ℓi(x′) ℓi(x)2 + ℓi(x′)2 exp − (x −x′)2 ℓi(x)2 + ℓi(x′)2 , which is a non-stationary generalisation of the Gaussian kernel [3, 6, 15]. We propose a non-stationary generalised spectral mixture (GSM) kernel with a simple closed form (see the Supplement): kGSM(x, x′) = Q X i=1 wi(x)wi(x′)kgibbs,i(x, x′) cos(2π(µi(x)x −µi(x′)x′)) . (7) The kernel is a product of three PSD terms. The GSM kernel encodes the similarity between two data points based on their combined signal variance w(x)w(x′), and the frequency surface based on the frequencies µ(x), µ(x′) and frequency lengthscales ℓ(x), ℓ(x′) associated with both inputs. The GSM kernel encodes the spectrogram surface mixture into a relatively simple kernel. The kernel reduces to the stationary Spectral Mixture (SM) kernel [30] with constant functions wi(x) = wi, µi(x) = µi and ℓi(x) = 1/(2πσi) (see the Supplement). We have presented the proposed kernel (7) for univariate inputs for simplicity. The kernel can be extended to multivariate inputs in a straightforward manner using the generalised Fourier transform with vector-valued inputs [2, 10]. However, in many applications multivariate inputs have a gridlike structure, for instance in geostatistics, image analysis and temporal models. We exploit this assumption and propose a multivariate extension that assumes the inputs to decompose across input dimensions [1, 27]: kGSM(x, x′|θ) = P Y p=1 kGSM(xp, x′ p|θp) . (8) Here x, x′ ∈RP , θ = (θ1, . . . , θP ) collects the dimension-wise kernel parameters θp = (wip, ℓip, µip)Q i=1 of the n-dimensional realisations wip, ℓip, µip ∈Rn per dimension p. Then, the kernel matrix can be expressed using Kronecker products as Kθ = Kθ1 ⊗· · · ⊗KθP , while missing values and data not on a regular grid can be handled with standard techniques [1, 21, 28, 27]. 4 Inference We use the Gaussian process regression framework and assume a Gaussian likelihood over N = nP data points3 (xj, yj)N j=1 with all outputs collected into a vector y ∈RN, yj = f(xj) + εj, εj ∼N(0, σ2 n) f(x) ∼GP(0, kGSM(x, x′|θ)), (9) with a standard predictive GP posterior f(x⋆|y) for a new input point x⋆[18]. The posterior can be efficiently computed using Kronecker identities [21] (see the Supplement). We aim to infer the noise variance σ2 n and the kernel parameters θ = (wip, ℓip, µip)Q,P i=1,p=1 that reveal the input-dependent frequency-based correlation structures in the data, while regularising the learned kernel to penalise overfitting. We perform MAP inference over the log marginalized posterior log p(θ|y) ∝log p(y|θ)p(θ) = L(θ), where the functions f(x) have been marginalised out, L(θ) = log N(y|0, Kθ + σ2 nI) Q,P Y i,p=1 N( ˜wip|0, Kwp)N(˜µip|0, Kµp)N(˜ℓip|0, Kℓp) , (10) where Kwp, Kµp, Kℓp are n × n prior matrices per dimensions p, and ˜w, ˜µ and ˜ℓrepresent the log or logit transformed variables. The marginalized posterior automatically balances between parameters θ that fit the data and a model that is not overly complex [18]. We can efficiently evaluate both 3Assuming that we have equal number of points n in all dimensions. 5 the marginalized posterior and its gradients in O(PN P +1 P ) instead of the usual O(N 3) complexity [21, 27] (see the Supplement). Gradient-based optimisation of (10) is likely to converge very slowly due to parameters ˜wip, ˜µip, ˜ℓip being highly self-correlated. We remove the correlations by whitening the variables as ˆθ = L−1˜θ where L is the Cholesky decomposition of the prior covariances. We maximize L using gradient ascent with respect to the whitened variables ˆθ by evaluating L(Lˆθ) and the gradient as [6, 12] ∂L ∂ˆθ = ∂L ∂θ ∂θ ∂˜θ ∂˜θ ∂ˆθ = LT ∂L ∂˜θ . (11) 5 Experiments We apply our proposed kernel first on simple simulated time series, then on texture images and lastly on a land surface temperature dataset. With the image data, we compare our method to two stationary mixture kernels, specifically the spectral mixture (SM) [30] and sparse spectrum (SS) kernels [13], and the standard squared exponential (SE) kernel. We employ the GPML Matlab toolbox, which directly implements the SM and SE kernels, and the SS kernel as a meta kernel combining simple cosine kernels. The GPML toolbox also implements Kronecker inference automatically for these kernels. We implemented the proposed GSM kernel and inference in Matlab4. For optimising the log posterior (10) we employ the L-BFGS algorithm. For both our method and the comparisons, we restart the optimisation from 10 different initialisations, each of which is chosen as the best among 100 randomly sampled hyperparameter values as evaluating the log posterior is cheap compared to evaluating gradients or running the full optimisation. 5.1 Simulated time series with a decreasing frequency component First we experiment whether the GSM kernel can find a simulated time-varying frequency pattern. We simulated a dataset where the frequency of the signal changes deterministically as µ(x) = 1+(1−x)2 on the interval x ∈[−1, 1]. We built a single-component GSM kernel K using the specified functions µ(x), ℓ(x) = ℓ= exp(−1) and w(x) = w = 1. We sampled a noisy function y ∼N(0, K + σ2 nI) with a noise variance σ2 n = 0.1. The example in Figure 3 shows the learned GSM kernel, as well as the data and the function posterior f(x). For this 1D case, we also employed the empirical spectrogram for initialising the hyperparameter values. The kernel correctly captures the increasing frequency towards negative values (towards left in Figure 3a). 5.2 Image data We applied our kernel to two texture images. The first image of a sheet of metal represents a mostly stationary periodic pattern. The second, a wood texture, represents an example of a very non-stationary pattern, especially on the horizontal axis. We use majority of the image as training data (the non-masked regions of Figure 3a and 3f) , and use the compared kernels to predict a missing cross-section in the middle, and also to extrapolate outside the borders of the original image. Figure 4 shows the two texture images, and extrapolation predictions given by the proposed GSM kernel, with a comparison to the spectral mixture (SM), sparse spectrum (SS) and standard squared exponential (SE) kernels. For GSM, SM and SS we used Q = 5 mixture components for the metal texture, and Q = 10 components for the more complex wood texture. The GSM kernel gives the most pleasing result visually, and fills in both patterns well with consistent external extrapolation as well. The stationary SM kernel does capture the cross-section, but has trouble extrapolation outside the borders. The SS kernel fails to represent even the training data, it lacks any smoothness in the frequency space. The gaussian kernel extrapolates poorly. 4Implementation available at https://github.com/sremes/nonstationary-spectral-kernels 6 (a) -1.5 -1 -0.5 0 0.5 1 1.5 (b) 0.5 1 1.5 2 2.5 3 3.5 (c) (d) Figure 3: (a) A simulated time series with a single decreasing frequency component and a GP fitted using a GSM kernel. (b) The learned kernel shows that close to x = −1 the signal is highly correlated and anti-correlated with close time points, while these periodic dependencies vanish when moving towards x = 1. For visualisation, the values are scaled as K = sgn(K) p |K|. (c) The spectrogram shows the decreasing frequency. (d) The learned latent frequency function µ(x) correctly finds the decreasing trend. The length-scale ℓ(x) is almost a constant, and weights w(x) slightly decrease in time. 5.3 Spatio-Temporal Analysis of Land Surface Temperatures NASA5 provides a land surface temperature dataset that we used to demonstrate our kernel in analysis of spatio-temporal data. Our primary objective is to demonstrate the capability of the kernel in inferring long-range, non-stationary spatial and temporal covariances. We took a subset of four years (February 2000 to February 2004) of North American land temperatures for training data. In total we get 407,232 data points, constituting 48 monthly temperature measurements on a 84 × 101 map grid. The grid also contains water regions, which we imputed with the mean temperature of each month. We experimented with the data by learning a generalized spectral mixture kernel using Q = 5 components. Figure 5 presents our results. Figure 5b highlights the training data and model fits for a winter and summer month, respectively. Figure 5a shows the non-stationary kernel slices at two locations across both latitude and longitude, as well as indicating that the spatial covariances are remarkably non-symmetric. Figure 5c indicates five months of successive training data followed by three months of test data predictions. 6 Discussion In this paper we have introduced non-stationary spectral mixture kernels, with treatment based on the generalised Fourier transform of non-stationary functions. We first derived the bivariate spectral mixture (BSM) kernel as a mixture of non-stationary spectral components. However, we argue it has only limited practical use due to requiring an impractical amount of components to cover any sufficiently sized input space. The main contribution of the paper is the generalised spectral mixture (GSM) kernel with input-dependent Gaussian process frequency surfaces. The Gaussian process components can cover non-trivial input spaces with just a few interpretable components. The GSM kernel is a flexible, practical and efficient kernel that can learn both local and global correlations 5https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD11C1_M_LSTDA 7 (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) Figure 4: A metal texture data with Q = 5 components used for GSM, SM and SS kernels shown in (a)-(e) and a wood texture in (f)-(j) (with Q = 10 components). The GSM kernel performs the best, making the most believable extrapolation outside image borders in (b) and (g). The SM kernel fills in the missing cross pattern in (c) but does not extrapolate well. In (h) the SM kernel fills in the vertical middle block only with the mean value while GSM in (g) is able to fill in a wood-like pattern. SS is not able discover enough structure in either texture (d) or (i), while the SE kernel overfits by using a too short length-scale in (e) and (j). across the input domains in an input-dependent manner. We highlighted the capability of the kernel to find interesting patterns in the data by applying it on climate data where it is highly unrealistic to assume the same (stationary) covariance pattern for every spatial location irrespective of spatial structures. Even though the proposed kernel is motivated by the generalised Fourier transform, the solution to its spectral surface SGSM(s, s′) = ZZ kGSM(x, x′)e−2πi(xs−x′s′)dxdx′ (12) remains unknown due to having multiple GP functions inside the integral. Figure 2h highlights a numerical integration of the surface equation (12) on an example GP frequency surface. Furthermore, the theoretical work of Kom Samo and Roberts [11] on generalised spectral transforms suggests that the GSM kernel may also be dense in the family of non-stationary kernels, that is, to reproduce arbitrary non-stationary kernels. Acknowledgments This work has been partly supported by the Finnish Funding Agency for Innovation (project Re:Know) and Academy of Finland (COIN CoE, and grants 299915, 294238 and 292334). We acknowledge the computational resources provided by the Aalto Science-IT project. References [1] S. Flaxman, A. G. Wilson, D. Neill, H. Nickisch, and A. Smola. Fast kronecker inference in Gaussian processes with non-Gaussian likelihoods. In ICML, volume 2015, 2015. [2] M. Genton. Classes of kernels for machine learning: A statistics perspective. Journal of Machine Learning Research, 2:299–312, 2001. [3] M. Gibbs. Bayesian Gaussian Processes for Regression and Classification. PhD thesis, University of Cambridge, 1997. 8 (a) (b) (c) Figure 5: (a) Demonstrates the non-stationary spatial covariances in the land surface data. The vertical black lines denote the point x0 at which the kernel function k(·, x0) is centered. (b) Sample reconstructions. In all plots, only the land area temperatures are shown. (c) Posterior for five last training months (until Jan 2004) and prediction for the three next months (February 2004 to April 2004), which the model is able to to construct reasonably accurately. [4] R. Gramacy and H. Lee. Bayesian treed Gaussian process models with an application to computer modeling. Journal of the American Statistical Association, 103:1119–1130, 2008. [5] M. Grzegorczyk, D. Husmeier, K. Edwards, P. Ghazal, and A. Millar. Modelling non-stationary gene regulatory processes with a non-homogeneous bayesian network and the allocation sampler. Bioinformatics, 24:2071–2078, 2008. [6] M. Heinonen, H. Mannerström, J. Rousu, S. Kaski, and H. Lähdesmäki. Non-stationary Gaussian process regression with Hamiltonian Monte Carlo. In AISTATS, volume 51, pages 732–740, 2016. [7] D. Higdon, J. Swall, and J. Kern. Non-stationary spatial modeling. Bayesian statistics, 6:761– 768, 1999. [8] N. Huang. A review on hilbert-huang transform: Method and its applications to geophysical studies. Reviews of Geophysics, 46, 2008. [9] N. Huang, S. Zheng, S. Long, M. Wu, H. Shih, Q. Zheng, N.-Q. Yen, C. Tung, and H. Liu. The empirical mode decomposition and the hilbert spectrum for nonlinear and non-stationary time series analysis. In Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 454:903–995, 1998. [10] Y. Kakihara. A note on harmonizable and v-bounded processes. Journal of Multivariate Analysis, 16:140–156, 1985. 9 [11] Y.-L. Kom Samo and S. Roberts. Generalized spectral kernels. Technical report, University of Oxford, 2015. arXiv:1506.02236. [12] M. Kuss and C. E. Rasmussen. Assessing approximate inference for binary Gaussian process classification. Journal of Machine Learning Research, 6:1679–1704, 2005. [13] M. Lázaro-Gredilla, J. Quiñonero-Candela, C. E. Rasmussen, and A. R. Figueiras-Vidal. Sparse spectrum Gaussian process regression. Journal of Machine Learning Research, 11:1865–1881, 2010. [14] M. Loeve. Probability Theory II, volume 46 of Graduate Texts in Mathematics. Springer, 1978. [15] C. Paciorek and M. Schervish. Nonstationary covariance functions for Gaussian process regression. In NIPS, pages 273–280, 2004. [16] C. Paciorek and M. Schervish. Spatial modelling using a new class of nonstationary covariance functions. Environmetrics, 17(5):483–506, 2006. [17] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pages 1177–1184, 2008. [18] C. E. Rasmussen and C. Williams. Gaussian processes for machine learning. MIT Press, 2006. [19] O. Rioul and V. Martin. Wavelets and signal processing. IEEE signal processing magazine, 8:14–38, 1991. [20] J. Robinson and A. Hartemink. Non-stationary dynamic bayesian networks. In Advances in neural information processing systems, pages 1369–1376, 2009. [21] Y. Saatçi. Scalable Inference for Structured Gaussian Process Models. PhD thesis, University of Cambridge, 2011. [22] P. Sampson and P. Guttorp. Nonparametric estimation of nonstationary spatial covariance structure. Journal of the American Statistical Association, 87, 1992. [23] R. Silverman. Locally stationary random processes. Information Theory, IRE Transactions on, 3:182–187, 1957. [24] A. Sinha and J. Duchi. Learning lernels with random features. In NIPS, 2016. [25] J. Snoek, K. Swersky, R. Zemel, and R. Adams. Input warping for bayesian optimization of non-stationary functions. In ICML, volume 32, pages 1674–1682, 2014. [26] V. Tolvanen, P. Jylänki, and A. Vehtari. Expectation propagation for nonstationary heteroscedastic Gaussian process regression. In Machine Learning for Signal Processing (MLSP), 2014 IEEE International Workshop on, pages 1–6. IEEE, 2014. [27] A. Wilson, E. Gilboa, J. P. Cunningham, and A. Nehorai. Fast kernel learning for multidimensional pattern extrapolation. In NIPS, 2014. [28] A. Wilson and H. Nickisch. Kernel interpolation for scalable structured gaussian processes (KISS-GP). In International Conference on Machine Learning, pages 1775–1784, 2015. [29] A. G. Wilson. Covariance kernels for fast automatic pattern discovery and extrapolation with Gaussian processes. PhD thesis, University of Cambridge, 2014. [30] A. G. Wilson and R. Adams. Gaussian process kernels for pattern discovery and extrapolation. In ICML, 2013. [31] A. M. Yaglom. Correlation theory of stationary and related random functions: Volume I: Basic results. Springer Series in Statistics. Springer, 1987. [32] Z. Yang, A. Smola, L. Song, and A. Wilson. A la carte: Learning fast kernels. In AISTATS, 2015. 10 | 2017 | 520 |
7,031 | Extracting low-dimensional dynamics from multiple large-scale neural population recordings by learning to predict correlations Marcel Nonnenmacher1, Srinivas C. Turaga2 and Jakob H. Macke1∗ 1research center caesar, an associate of the Max Planck Society, Bonn, Germany 2HHMI Janelia Research Campus, Ashburn, VA marcel.nonnenmacher@caesar.de, turagas@janelia.hhmi.org jakob.macke@caesar.de Abstract A powerful approach for understanding neural population dynamics is to extract low-dimensional trajectories from population recordings using dimensionality reduction methods. Current approaches for dimensionality reduction on neural data are limited to single population recordings, and can not identify dynamics embedded across multiple measurements. We propose an approach for extracting low-dimensional dynamics from multiple, sequential recordings. Our algorithm scales to data comprising millions of observed dimensions, making it possible to access dynamics distributed across large populations or multiple brain areas. Building on subspace-identification approaches for dynamical systems, we perform parameter estimation by minimizing a moment-matching objective using a scalable stochastic gradient descent algorithm: The model is optimized to predict temporal covariations across neurons and across time. We show how this approach naturally handles missing data and multiple partial recordings, and can identify dynamics and predict correlations even in the presence of severe subsampling and small overlap between recordings. We demonstrate the effectiveness of the approach both on simulated data and a whole-brain larval zebrafish imaging dataset. 1 Introduction Dimensionality reduction methods based on state-space models [1, 2, 3, 4, 5] are useful for uncovering low-dimensional dynamics hidden in high-dimensional data. These models exploit structured correlations in neural activity, both across neurons and over time [6]. This approach has been used to identify neural activity trajectories that are informative about stimuli and behaviour and yield insights into neural computations [7, 8, 9, 10, 11, 12, 13]. However, these methods are designed for analyzing one population measurement at a time and are typically applied to population recordings of a few dozens of neurons, yielding a statistical description of the dynamics of a small sample of neurons within a brain area. How can we, from sparse recordings, gain insights into dynamics distributed across entire circuits or multiple brain areas? One promising approach to scaling up the empirical study of neural dynamics is to sequentially record from multiple neural populations, for instance by moving the field-of-view of a microscope [14]. Similarly, chronic multi-electrode recordings make it possible to record neural activity within a brain area over multiple days, but with neurons dropping in and out of the measurement over time [15]. While different neurons will be recorded in different sessions, we expect the underlying dynamics to be preserved across measurements. The goal of this paper is to provide methods for extracting low-dimensional dynamics shared across multiple, potentially overlapping recordings of neural population activity. Inferring dynamics from ∗current primary affiliation: Centre for Cognitive Science, Technical University Darmstadt 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. such data can be interpreted as a missing-data problem in which data is missing in a structured manner (referred to as ’serial subset observations’ [16], SSOs). Our methods allow us to capture the relevant subspace and predict instantaneous and time-lagged correlations between all neurons, even when substantial blocks of data are missing. Our methods are highly scalable, and applicable to data sets with millions of observed units. On both simulated and empirical data, we show that our methods extract low-dimensional dynamics and accurately predict temporal and cross-neuronal correlations. Statistical approach: The standard approach for dimensionality reduction of neural dynamics is based on search for a maximum of the log-likelihood via expectation-maximization (EM) [17, 18]. EM can be extended to missing data in a straightforward fashion, and SSOs allow for efficient implementations, as we will show below. However, we will also show that subsampled data can lead to slow convergence and high sensitivity to initial conditions. An alternative approach is given by subspace identification (SSID) [19, 20]. SSID algorithms are based on matching the moments of the model with those of the empirical data: The idea is to calculate the time-lagged covariances of the model as a function of the parameters. Then, spectral methods (e.g. singular value decompositions) are used to reconstruct parameters from empirically measured covariances. However, these methods scale poorly to high-dimensional datasets where it impossible to even construct the time-lagged covariance matrix. Our approach is also based on moment-matching – rather than using spectral approaches, however, we use numerical optimization to directly minimize the squared error between empirical and reconstructed time-lagged covariances without ever explicitly constructing the full covariance matrix, yielding a subspace that captures both spatial and temporal correlations in activity. This approach readily generalizes to settings in which many data points are missing, as the corresponding entries of the covariance can simply be dropped from the cost function. In addition, it can also generalize to models in which the latent dynamics are nonlinear. Stochastic gradient methods make it possible to scale our approach to high-dimensional (p = 107) and long (T = 105) recordings. We will show that use of temporal information (through time-lagged covariances) allows this approach to work in scenarios (low overlap between recordings) in which alternative approaches based on instantaneous correlations are not applicable [2, 21]. Related work: Several studies have addressed estimation of linear dynamical systems from subsampled data: Turaga et al. [22] used EM to learn high-dimensional linear dynamical models form multiple observations, an approach which they called ‘stitching’. However, their model assumed highdimensional dynamics, and is therefore limited to small population sizes (N ≈100). Bishop & Yu [23] studied the conditions under which a covariance-matrix can be reconstructed from multiple partial measurements. However, their method and analysis were restricted to modelling time-instantaneous covariances, and did not include temporal activity correlations. In addition, their approach is not based on learning parameters jointly, but estimates the covariance in each observation-subset separately, and then aligns these estimates post-hoc. Thus, while this approach can be very effective and is important for theoretical analysis, it can perform sub-optimally when data is noisy. In the context of SSID methods, Markovsky [24, 25] derived conditions for the reconstruction of missing data from deterministic univariate linear time-invariant signals, and Liu et al. [26] use a nuclear normregularized SSID to reconstruct partially missing data vectors. Balzano et al. [21, 27] presented a scalable dimensionality reduction approach (GROUSE) for data with missing entries. This approach does not aim to capture temporal corrrelations, and is designed for data which is missing at random. Soudry et al. [28] considered population subsampling from the perspective of inferring functional connectivity, but focused on observation schemes in which there are at least some simultaneous observations for each pair of variables. 2 Methods 2.1 Low-dimensional state-space models with linear observations Model class: Our goal is to identify low-dimensional dynamics from multiple, partially overlapping recordings of a high-dimensional neural population, and to use them to predict neural correlations. We denote neural activity by Y = {yt}T t=1, a length-T discrete-time sequence of p-dimensional vectors. We assume that the underlying n-dimensional dynamics x linearly modulate y, yt = Cxt + εt, εt ∼N(0, R) (1) xt+1 = f(xt, ηt), ηt ∼p(η), (2) with diagonal observation noise covariance matrix R ∈Rp×p. Thus, each observed variable y(i) t , i = 1, . . . , p is a noisy linear combination of the shared time-evolving latent modes xt. 2 -200 0 200 5 10 15 20 10 20 0.3 0.6 0.0 0.3 0.6 0.9 before switch after switch 5 10 15 20 1 2 3 -200 0 200 3 2 1 time relative to switch-point latent dim. #2 # neuron # latent dim. # neuron # neuron # latent dim. neuron # latent dim. #1 0 0 0 d ground truth (unknown) stitched model estimate separate model estimate time-lag s = 5 time-lag s = 0 12 16 20 2 4 6 8 12 16 20 12 16 20 2 4 6 8 stitched separate 0 b a c e f 10 20 Figure 1: Identifying low-dimensional dynamics shared across neural recordings a) Different subsets of a large neural population are recorded sequentially (here: neurons 1 to 11, cyan, are recored first, then neurons 10 to 20, green). b) Low-dimensional (n = 3) trajectories extracted from data in a: Our approach (orange) can extract the dynamics underlying the entire population, whereas an estimation on each of the two observed subsets separately will not be able to align dynamics across subsets. c) Subspace-maps (linear projection matrices C) inferred from each of the two observed subsets separately (and hence not aligned), and for the entire recording. d) Same information as in b, but as phase plots. e) Pairwise covariances– in this observation scheme, many covariances (red) are unobserved, but can be reconstructed using our approach. f) Recovery of unobserved pairwise covariances (red). Our approach is able to recover the unobserved covariance across subsets. We consider stable latent zero-mean dynamics on x with time-lagged covariances Πs := Cov[xt+s, xt] ∈Rn×n for time-lag s ∈{0, . . . , S}. Time-lagged observed covariances Λ(s) ∈ Rp×p can be computed from Πs as Λ(s) := CΠsC⊤+ δs=0R. (3) An important special case is the classical linear dynamical system (LDS) with f(xt, ηt) = Axt + ηt, with ηt ∼N(0, Q) and Πs = AsΠ0. As we will see below, our SSID algorithm works directly on these time-lagged covariances, so it is also applicable also to generative models with non-Markovian Gaussian latent dynamics, e.g. Gaussian Process Factor Analysis [2]. Partial observations and missing data: We treat multiple partial recordings as a missing-data problem– we use yt to model all activity measurements across multiple experiments, and assume that at any time t, only some of them will be observed. As a consequence, the data-dimensionality p could now easily be comprised of thousands of neurons, even if only small subsets are observed at any given time. We use index sets Ωt ⊆{1, . . . , p}, where i ∈Ωt indicates that variable i is observed at time point t. We obtain empirical estimates of time-lagged pairwise covariances for variable each pair (i, j) over all of those time points where the pair of variables is jointly observed with time-lag s. We define co-occurrence counts T s ij = |{t|i ∈Ωt+s ∧j ∈Ωt}|. In total there could be up to Sp2 many co-occurrence counts– however, for SSOs the number of unique counts is dramatically lower. To capitalize on this, we define co-ocurrence groups F ⊆{1, . . . , p}, subsets of variables with identical observation patterns: ∀i, j ∈F ∀t ≤T : i ∈Ωt iff j ∈Ωt. All element pairs (i, j) ∈F 2 share the same co-occurence count T s ij per time-lag s. Co-occurence groups are non-overlapping and together cover the whole range {1, . . . , p}. There might be pairs (i, j) which are never observed, i.e. for which T s ij = 0 for each s. We collect variable pairs co-observed at least twice at time-lag s, Ωs = {(i, j)|T s ij > 1}. For these pairs we can calculate an unbiased estimate of the s-lagged covariance, Cov[y(i) t+s, y(j) t ] ≈ 1 T s ij −1 X t y(i) t+sy(j) t := ˜Λ(s)(ij). (4) 3 2.2 Expectation maximization for stitching linear dynamical systems EM can readily be extended to missing data by removing likelihood-terms corresponding to missing data [29]. In the E-step of our stitching-version of EM (sEM), we use the default Kalman filter and smoother equations with subindexed Ct = C(Ωt,:) and Rt = R(Ωt,Ωt) parameters for each time point t. We speed up the E-step by tracking convergence of latent posterior covariances, and stop updating these when they have converged [30]– for long T, this can result in considerably faster smoothing. For the M-step, we adapt maximum likelihood estimates of parameters θ = {A, Q, C, R}. Dynamics parameters (A, Q) are unaffected by SSOs. The update for C is given by C(i,:) = X y(i) t E[xt]T − 1 |Oi| X y(i) t X E[xt]T (5) × X E[xtxT t ] − 1 |Oi| X E[xt] X E[xt]T −1 , where Oi = {t|i ∈Ωt} is the set of time points for which yi is observed, and all sums are over t ∈Oi. For SSOs, we use temporal structure in the observation patterns Ωt to avoid unnecessary calculations of the inverse in (5): all elements i of a co-occurence group share the same Oi. 2.3 Scalable subspace-identification with missing data via moment-matching Subspace identification: Our algorithm (Stitching-SSID, S3ID) is based on moment-matching approaches for linear systems [31]. We will show that it provides robust initialisation for EM, and that it performs more robustly (in the sense of yielding samples which more closely capture empirically measured correlations, and predict missing ones) on non-Gaussian and nonlinear data. For fully observed linear dynamics, statistically consistent estimators for θ = {C, A, Π0, R} can be obtained from {˜Λ(s)}s [20] by applying an SVD to the pK × pL block Hankel matrix H with blocks Hk,l = ˜Λ(k + l −1). For our situation with large p and massively missing entries in ˜Λ(s), we define an explicit loss function which penalizes the squared difference between empirically observed covariances and those predicted by the parametrised model (3), L(C, {Πs}, R) = 1 2 X s rs||Λ(s) −˜Λ(s)||2 Ωs, (6) where || · ||Ωdenotes the Froebenius norm applied to all elements in index set Ω. For linear dynamics, we constrain Πs by setting Πs = AsΠ0 and optimize over A instead of over Πs. We refer to this algorithm as ‘linear S3ID’, and to the general one as ‘nonlinear S3ID’. However, we emphasize that only the latent dynamics are (potentially) nonlinear, dimensionality reduction is linear in both cases. Optimization via stochastic gradients: For large-scale applications, explicit computation and storage of the observed ˜Λ(s) is prohibitive since they can scale as |Ωs| ∼p2, which renders computation of the full loss L impractical. We note, however, that the gradients of L are linear in ˜Λ(s)(i,j) ∝P t y(i) t+sy(j) t . This allows us to obtain unbiased stochastic estimates of the gradients by uniformly subsampling time points t and corresponding pairs of data vectors yt+s, yt with time-lag s, without explicit calculation of the loss L. The batch-wise gradients are given by ∂Lt,s ∂C(i,:) = Λ(s)(i,:) −y(i) t+sy⊤ t N i,t s CΠ⊤ s + [Λ(s)⊤](i,:) −y(i) t y⊤ t+s N i,t+s s CΠs (7) ∂Lt,s ∂Πs = X i∈Ωt+s C⊤ (i,:) Λ(s)(i,:) −y(i) t+sy⊤ t N i,t s C (8) ∂Lt,s ∂Rii = δs0 T 0 ii Λ(0)(i,i) − y(i) t 2 , (9) where N i,t s ∈Np×p is a diagonal matrix with [N i,t s ]jj = 1 T s ij if j ∈Ωt, and 0 otherwise. Gradients scale linearly in p both in memory and computation and allow us to minimize L without explicit computation of the empirical time-lagged covariances, or L itself. To monitor performance and convergence for large systems, we compute the loss over a random subset of covariances. The computation of gradients for C and R can be fully vectorized over all elements i of a co-occurence group, as these share the same matrices N i,t s . We use ADAM [32] for stochastic gradient descent, 4 which combines momentum over subsequent gradients with individual self-adjusting step sizes for each parameter. By using momentum on the stochastic gradients, we effectively obtain a gradient that aggregates information from empirical time-lagged covariances across multiple gradient steps. 2.4 How temporal information helps for stitching The key challenge in stitching is that the latent space inferred by an LDS is defined only up to choice of coordinate system (i.e. a linear transformation of C). Thus, stitching is successful if one can align the Cs corresponding to different subpopulations into a shared coordinate system for the latent space of all p neurons [23] (Fig. 1). In the noise-free regime and if one ignores temporal information, this can work only if the overlap between two sub-populations is at least as large as the latent dimensionality, as shown by [23]. However, dynamics (i.e. temporal correlations) provide additional constraints for the alignment which can allow stitching even without overlap: Assume two subpopulations I1, I2 with parameters θ1, θ2, latent spaces x1, x2 and with overlap set J = I1 ∩I2 and overlap o = |J|. The overlapping neurons y(J) t are represented by both the matrix rows C1 J,: and C2 J,:, each in their respective latent coordinate systems. To stitch, one needs to identify the base change matrix M aligning latent coordinate systems consistently across the two populations, i.e. such that Mx1 = x2 satisfies the constraints C1 (J,:) = C2 (J,:)M −1. When only considering time-instantaneous covariances, this yields o linear constraints, and thus the necessary condition that o ≥n, i.e. the overlap has to be at least as large the latent dimensionality [23]. Including temporal correlations yields additional constraints, as the time-lagged activities also have to be aligned, and these constraints can be combined in the observability matrix J: O1 J = C1 (J,:) C1 (J,:)A1 · · · C1 (J,:)(A1) n−1 = C2 (J,:) C2 (J,:)A2 · · · C2 (J,:)(A2) n−1 M −1 = O2 JM −1. If both observability matrices O1 J and O2 J have full rank (i.e. rank n), then M is uniquely constrained, and this identifies the base change required to align the latent coordinate systems. To get consistent latent dynamics, the matrices A1 and A2 have to be similar, i.e. MA1M −1 = A2, and correspondingly the time-lagged latent covariance matrices Π1 s, Π2 s satisfy Π1 s = MΠ2 sM ⊤. These dynamics might yield additional constraints: For example, if both A1 and A2 have unique (and the same) eigenvalues (and we know that we have identified all latent dimensions), then one could align the latent dimensions of x which share the same eigenvalues, even in the absence of overlap. 2.5 Details of simulated and empirical data Linear dynamical system: We simulate LDSs to test algorithms S3IDand sEM. For dynamics matrices A, we generate eigenvalues with absolute values linearly spanning the interval [0.9, 0.99] and complex angles independently von Mises-distributed with zero mean and concentration κ = 1000, resulting in smooth latent tractories. To investigate stitching-performance on SSOs, we divded the entire population size of size p = 1000 into two subsets I1 = [1, . . . p1], I2 = [p2 . . . p], p2 ≤p1 with overlap o = p1 −p2. We simulate for Tm = 50k time points, m = 1, 2 for a total of T = 105 time points. We set the Rii such that 50% of the variance of each variable is private noise. Results are aggregated over 20 data sets for each simulation. For the scaling analysis in section 3.2, we simulate population sizes p = 103, 104, 105, at overlap o = 10%, for Tm = 15k and 10 data sets (different random initialisation for LDS parameters and noise) for each population size. We compute subspace projection errors between C and ˆC as e(C, ˆC) = ||(I −ˆC ˆC⊤)C||F /||C||F . Simulated neural networks: We simulate a recurrent network of 1250 exponential integrate-andfire neurons [33] (250 inhibitory and p = 1000 excitatory neurons) with clustered connectivity for T = 60k time points. The inhibitory neurons exhibit unspecific connectivity towards the excitatory units. Excitatory neurons are grouped into 10 clusters with high connectivity (30%) within cluster and low connectivity (10%) between clusters, resulting in low-dimensional dynamics with smooth, oscillating modes corresponding to the 10 clusters. Larval-zebrafish imaging: We applied S3ID to a dataset obtained by light-sheet fluorescence imaging of the whole brain of the larval zebrafish [34]. For this data, every data vector yt represents 5 a 2048 × 1024 × 41 three-dimensional image stack of of fluorescence activity recorded sequentially across 41 z-planes, over in total T = 1200 time points of recording at 1.15 Hz scanning speed across all z-planes. We separate foreground from background voxels by thresholding per-voxel fluorescence activity variance and select p = 7, 828, 017 voxels of interest (≈9.55% of total) across all z-planes, and z-scored variances. 3 Results 3.1 Stitching on simulated data b a c 1 10 100 0.0 0.2 0.4 0.6 0.8 0.6 0.8 1.0 0.8 1.0 0.9 1.00 0.90 0.95 0 5 10 15 0 50 100 150 200 0.0 0.2 0.4 0.6 0.8 overlap o time-lag s EM iterations subsp. proj. error subsp. proj. error o = 100.0 % o = 30.0 % o = 10.0 % o = 2.5 % o = 1.0 % corr. of cov. 30 % overlap 1 % overlap 5 % overlap corr. of cov. corr. of cov. S3ID sEM GROUSE FA (naive) Figure 2: Dimensionality reduction for multiple partial recordings a) Simulated LDS with p = 1K neurons and n = 10 latent variables, two subpopulations, varying degrees of overlap o. a) Subspace estimation performance for S3ID, sEM and reference algorithms (GROUSE and naive FA). Subspace projection errors averaged over 20 generated data sets, ±1 SEM. S3ID returns good subspace estimates across a wide range of overlaps. b) Estimation of dynamics. Correlations between ground-truth and estimated time-lagged covariances for unobserved pair-wise covariances. c) Subspace projection error for sEM as a function of iterations, for different overlaps. Errors per data set, and means (bold lines). Convergence of sEM slows down with decreasing overlap. To test how well parameters of LDS models can be reconstructed from high-dimensional partial observations, we simulated an LDS and observed it through two overlapping subsets, parametrically varying the size of overlap between them from o = 1% to o = 100%. As a simple baseline, we apply a ‘naive’ Factor Analysis, for which we impute missing data as 0. GROUSE [21], an algorithm designed for randomly missing data, recovers a consistent subspace for overlap o = 30% and greater, but fails for smaller overlaps. As sEM (maximum number of 200 iterations) is prone to get stuck in local optima, we randomly initialise it with 4 seeds per fit and report results with highest log-likelihood. sEM worked well even for small overlaps, but with increasingly variable results (see Fig. 2c). Finally, we applied our SSID algorithm S3ID which exhibited good performance, even for small overlaps. 10 20 30 40 0.0 0.1 0.2 50 10 20 30 40 0.0 0.5 1.0 n =10 n =50 n =20 a b # latent dim. # latent dim. normalized variance dynamics eigenvalue 50 Figure 3: Choice of latent dimensionality Eigenvalue spectra of system matrices estimated from simulated LDS data with o = 5% overlap and different latent dimensionalities n. a) Eigenvalues of instantaneous covariance matrix Π0. b) Eigenvalues of linear dynamics matrix A. Both spectra indicate an elbow at real data dimensionality n = 10 when S3ID is run with n ≥10. To quantify recovery of dynamics, we compare predictions for pairwise time-lagged covariances between variables not co-observed simultaneously (Fig. 2b). Because GROUSE itself does not capture temporal correlations, we obtain estimated time-lagged correlations by projecting data yt onto the obtained subspace and extract linear dynamics from estimated time-lagged latent covariances. S3ID is optimized to capture time-lagged covariances, and therefore outperforms alternative algorithms. 6 post-hoc alignment S3ID a b 500 750 1000 250 1 50000 100000 0 500 1000 1 time t number of dimensions variable i subsp. projection error 0.2 0.4 0.6 Figure 4: Comparison with post-hoc alignment of subspaces a) Multiple partial recordings with 20 sequentially recorded subpopulations. b) We apply S3ID to the full population, as well as factor analysis to each of these subpopulations. The latter gives 20 subspace estimates, which we sequentially align using subpopulation overlaps. When we use a latent dimensionality (n = 20, 50) larger than the true one (n = 10), we observe ‘elbows’ in the eigen-spectra of instantaneous covariance estimate Π0 and dynamics matrix A located at the true dimensionality (Fig. 3). This observation suggests we can use standard techniques for choosing latent dimensionalities in applications where the real n is unknown. Choosing n too large or too small led to some decrease in prediction quality of unobserved (time-lagged) correlations. Importantly though, performance degraded gracefully when the dimensionality was chosen too big: For instance, at 5% overlap, correlation between predicted and ground-truth unobserved instantaneous covariances was 0.99 for true latent dimensionality n = 10 (Fig. 2b). At smaller n = 5 and n = 8, correlations were 0.69 and 0.89, respectively, and for larger n = 20 and n = 50, they were 0.97 and 0.96. In practice, we recommend using n larger than the hypothesized latent dimensionality. S3ID and sEM jointly estimate the subspace C across the entire population. An alternative approach would be to identify the subspaces for the different subpopulations via separate matrices C(I,:) and subsequently align these estimates via their pairwise overlap [23]. This works very well on this example (as for each subset there is sufficient data to estimate each CI,: individually). However, in Fig. 4 we show that this approach performs suboptimally in scenarios in which data is more noisy or comprised of many (here 20) subpopulations. In summary, S3ID can reliably stitch simulated data across a range of overlaps, even for very small overlaps. 3.2 Stitching for different population sizes: Combining S3ID with sEM works best p = 10 p = 10 p = 10 a b c 10 10 10 10 10 10 10 10 1.0 0.1 0.01 10 10 10 10 10 10 10 10 time [s] time [s] (sEM) time [s] principal angle largest principal angle sEM S3ID S3ID+sEM sEM S3ID S3ID+sEM sEM S3ID S3ID+sEM S3ID S3ID+sEM S3ID S3ID+sEM sEM 0 1 2 3 4 0 -1 -2 3 4 5 4 3 2 1 1 2 3 4 Figure 5: Initializing EM with SSID for fast and robust convergence LDS with p = 103, 104, 105 neurons and n = 10 latent variables, 10% overlap. a) Largest principal angles as a function of computation time. We compare randomly initalised sEM with sEM initialised from S3ID after a single pass over the data. b) Comparison of final subspace estimate. We can combine the high reliability of S3ID with the low final subspace angle of EM by initialising sEM with S3ID. c) Comparison of total run-times. Initialization by S3ID does not change overall runtime. The above results were obtained for fixed population size p = 1000. To investigate how performance and computation time scale with population size, we simulate data from an LDS with fixed overlap o = 10% for different population sizes. We run S3ID with a single pass, and subsequently use its final parameter estimates to initialize sEM. We set the maximum number of iterations for sEM to 50, corresponding to approximately 1.5h of training time for p = 105 observed variables. We quantify the subspace estimates by the largest principal angle between ground-truth and estimated subspaces. We find that the best performance is achieved by the combined algorithm (S3ID + sEM, Fig. 5a,b). In particular, S3ID reliably and quickly leads to a reduction in error (Fig. 5a), but (at least when capped at one pass over the data), further improvements can be achieved by letting sEM do further ‘fine7 tuning’ of parameters from the initial estimate [35]. When starting sEM from random initializations, we find that it often gets stuck in local minima (potentially, shallow regions of the log-likelihood). While convergence issues for EM have been reported before, we remark that these issues seems to be much more severe for stitching. We hypothesize that the presence of two potential solutions (one for each observation subset) makes parameter inference more difficult. Computation times for both stitching algorithms scale approximately linear with observed population size p (Fig. 5c). When initializing sEM by S3ID, we found that the cose of S3IDis amortized by faster convergence of sEM. In summary, S3ID performs robustly across different population sizes, but can be further improved when used as an initializer for sEM. 3.3 Spiking neural networks How well can our approach capture and predict correlations in spiking neural networks, from partial observations? To answer this question, we applied S3ID to a network simulation of inhibitory and excitatory neurons (Fig. 6a), divided into into 10 clusters with strong intra-cluster connectivity. We apply S3ID-initialised sEM with n = 20 latent dimensions to this data and find good recovery of time-instantaneous covariances (Fig. 6b), but poor recovery of long-range temporal interactions. Since sEM assumes linear latent dynamics, we test whether this is due to a violation of the linearity assumption by applying S3ID with nonlinear latent dynamics, i.e. by learning the latent covariances Πs, s = 0, . . . , 39. This comes at the cost of learning 40 rather than 2 n × n matrices to characterise the latent space, but we note that this here still amounts to only 76.2% of the parameters learned for C and R. We find that the nonlinear latent dynamics approach allows for markedly better predictions of time-lagged covariances (Fig. 6b). We attempt to recover cluster membership for each of the neurons from the estimated emission matrices C using K-means clustering on the rows of C. Because the 10 clusters are distributed over both subpopulations, this will only be successful if the latent representations for the two subpoplations are sufficiently aligned. While we find that both approaches can assign most neurons correctly, only the nonlinear version of S3ID allows correct recovery for every neuron. Thus, the flexibility of S3ID allows more accurate reconstruction and prediction of correlations in data which violates the assumptions of linear Gaussian dynamics. We also applied dynamics-agnostic S3ID when undersampling two out of the ten clusters. Prediction of unobserved covariances for the undersampled clusters was robust down to sampling only 50% of neurons from those clusters. For 50/40/30% sampling, we obtained correlations of instantaneous covariances of 0.97/0.80/0.32 for neurons in the undersampled clusters. Correlation across all clusters remained above 0.97 throughout. K-means on the rows of learned emission matrix C still perfectly identified the ten clusters at 40% sampling, whereas below that it fused the undersampled clusters. # neuron 0 60 120 time t # neuron (shuffled) 1s a 0 60 120 time t b c 0 10 20 30 40 time-lag s 0.4 0.6 0.8 1.0 corr. of cov fully observed nonlinear partially obs. linear partially obs. nonlinear 1 200 400 600 800 1000 # neuron 2 4 6 8 10 # cluster Figure 6: Spiking network simulation a) Spiking data for 100 example neurons from 10 clusters, and two observations with 10% overlap (clusters shuffled across observations-subsets). b) Correlations between ground-truth and estimated time-lagged covariances for non-observed pairwise covariances, for S3ID with or without linearity assumption, as well as for sEM initialised with linear S3ID. c) Recovery of cluster membership, using K-means clustering on estimated C. 3.4 Zebrafish imaging data Finally, we want to determine how well the approach works on real population imaging data, and test whether it can scale to millions of dimensions. To this end, we apply (both linear and nonlinear) S3ID 8 z = 21 z = 1 z = 41 0 600 1200 est. covariance fully observed, nonlinear partially observed, nonlinear fully observed, nonlinear partially observed, nonlinear fully observed, linear 0 2 4 6 8 0.8 0.9 1.0 corr. of cov. ground-truth covariance time t time-lag s imaging plane z a b -0.5 0 0.5 -0.5 0 0.5 Figure 7: Zebrafish imaging data Multiple partial recordings for p = 7, 828, 017-dimensional data from light-sheet fluoresence imaging of larval zebrafish. Data vectors represent volumetric frames from 41 planes. a) Simulated observation scheme: we assume the imaging data was recorded over two sessions with a single imaging plane in overlap. We apply S3ID with latent dimensionality n = 10 with linear and nonlinear latent dynamics. b) Quantification of covariance recovery. Comparison of held-out ground-truth and estimated instantaneous covariances, for 106 randomly selected voxel pairs not co-observed under the observation scheme in a. We estimate covariances from two models learned from partially observed data (green: dynamics-agnostic; magenta: linear dynamics) and from a control fit to fully-observed data (orange, dynamics-agnostic). left: Instantaneous covariances. right: Prediction of time-lagged covariances. Correlation of covariances as a function of time-lag. to volume scans of larval zebrafish brain activity obtained with light-sheet fluorescence microscopy, comprising p = 7, 828, 017 voxels. We assume an observation scheme in which the first 21 (out of 41) imaging planes are imaged in the first session, and the remaining 21 planes in the second, i.e. with only z-plane 21 (234.572 voxels) in overlap (Fig. 7a,b). We evaluate the performance by predicting (time-lagged) pairwise covariances for voxel pairs not co-observed under the assumed multiple partial recording, using eq. 3. We find that nonlinear S3ID is able to reconstruct correlations with high accuracy (Fig. 7c), and even outperforms linear S3ID applied to full observations. FA applied to each imaging session and aligned post-hoc (as by [23]) obtained a correlation of 0.71 for instantaneous covariances, and applying GROUSE to the observation scheme gave correlation 0.72. 4 Discussion In order to understand how large neural dynamics and computations are distributed across large neural circuits, we need methods for interpreting neural population recordings with many neurons and in sufficiently rich complex tasks [12]. Here, we provide methods for dimensionality reduction which dramatically expand the range of possible analyses. This makes it possible to identify dynamics in data with millions of dimensions, even if many observations are missing in a highly structured manner, e.g. because measurements have been obtained in multiple overlapping recordings. Our approach identifies parameters by matching model-predicted covariances with empirical ones– thus, it yields models which are optimized to be realistic generative models of neural activity. While maximum-likelihood approaches (i.e. EM) are also popular for fitting dynamical system models to data, they are not guaranteed to provide realistic samples when used as generative models, and empirically often yield worse fits to measured correlations, or even diverging firing rates. Our approach readily permits several possible generalizations: First, using methods similar to [35], it could be generalized to nonlinear observation models, e.g. generalized linear models with Poisson observations. In this case, one could still use gradient descent to minimize the mismatch between model-predicted covariance and empirical covariances. Second, one could impose non-negativity constraints on the entries of C to obtain more interpretable network models [36]. Third, one could generalize the latent dynamics to nonlinear or non-Markovian parametric models, and optimize the parameters of these nonlinear dynamics using stochastic gradient descent. For example, one could optimize the kernel-function of GPFA directly by matching the GP-kernel to the latent covariances. Acknowledgements We thank M. Ahrens for the larval zebrafish data. Our work was supported by the caesar foundation. 9 References [1] J. P. Cunningham and M. Y. Byron, “Dimensionality reduction for large-scale neural recordings,” Nature neuroscience, vol. 17, no. 11, pp. 1500–1509, 2014. [2] M. Y. Byron, J. P. Cunningham, G. Santhanam, S. I. Ryu, K. V. Shenoy, and M. Sahani, “Gaussian-process factor analysis for low-dimensional single-trial analysis of neural population activity,” in Advances in neural information processing systems, pp. 1881–1888, 2009. [3] J. H. Macke, L. Buesing, J. P. Cunningham, B. M. Yu, K. V. Shenoy, and M. Sahani., “Empirical models of spiking in neural populations.,” in Advances in Neural Information Processing Systems, pp. 1350–1358, 2011. [4] D. Pfau, E. A. Pnevmatikakis, and L. Paninski, “Robust learning of low-dimensional dynamics from large neural ensembles,” in Advances in neural information processing systems, pp. 2391– 2399, 2013. [5] Y. Gao, L. Busing, K. V. Shenoy, and J. P. Cunningham, “High-dimensional neural spike train analysis with generalized count linear dynamical systems,” in Advances in Neural Information Processing Systems, pp. 2044–2052, 2015. [6] M. M. Churchland, J. P. Cunningham, M. T. Kaufman, J. D. Foster, P. Nuyujukian, S. I. Ryu, and K. V. Shenoy, “Neural population dynamics during reaching,” Nature, vol. 487, no. 7405, p. 51, 2012. [7] O. Mazor and G. Laurent, “Transient dynamics versus fixed points in odor representations by locust antennal lobe projection neurons,” Neuron, vol. 48, no. 4, pp. 661–73, 2005. [8] K. L. Briggman, H. D. I. Abarbanel, and W. B. Kristan, Jr, “Optical imaging of neuronal populations during decision-making,” Science, vol. 307, no. 5711, pp. 896–901, 2005. [9] D. V. Buonomano and W. Maass, “State-dependent computations: spatiotemporal processing in cortical networks.,” Nat Rev Neurosci, vol. 10, no. 2, pp. 113–125, 2009. [10] K. V. Shenoy, M. Sahani, and M. M. Churchland, “Cortical control of arm movements: a dynamical systems perspective,” Annu Rev Neurosci, vol. 36, pp. 337–59, 2013. [11] V. Mante, D. Sussillo, K. V. Shenoy, and W. T. Newsome, “Context-dependent computation by recurrent dynamics in prefrontal cortex,” Nature, vol. 503, no. 7474, pp. 78–84, 2013. [12] P. Gao and S. Ganguli, “On simplicity and complexity in the brave new world of large-scale neuroscience,” Curr Opin Neurobiol, vol. 32, pp. 148–55, 2015. [13] N. Li, K. Daie, K. Svoboda, and S. Druckmann, “Robust neuronal dynamics in premotor cortex during motor planning,” Nature, vol. 532, no. 7600, pp. 459–64, 2016. [14] N. J. Sofroniew, D. Flickinger, J. King, and K. Svoboda, “A large field of view two-photon mesoscope with subcellular resolution for in vivo imaging,” eLife, vol. 5, 2016. [15] A. K. Dhawale, R. Poddar, S. B. Wolff, V. A. Normand, E. Kopelowitz, and B. P. Ölveczky, “Automated long-term recording and analysis of neural activity in behaving animals,” eLife, vol. 6, 2017. [16] Q. J. Huys and L. Paninski, “Smoothing of, and parameter estimation from, noisy biophysical recordings,” PLoS Comput Biol, vol. 5, no. 5, p. e1000379, 2009. [17] A. P. Dempster, N. M. Laird, and D. B. Rubin, “Maximum likelihood from incomplete data via the em algorithm,” Journal of the royal statistical society. Series B (methodological), pp. 1–38, 1977. [18] Z. Ghahramani and G. E. Hinton, “Parameter estimation for linear dynamical systems,” tech. rep., Technical Report CRG-TR-96-2, University of Totronto, Dept. of Computer Science, 1996. [19] P. Van Overschee and B. De Moor, Subspace identification for linear systems: Theory— Implementation—Applications. Springer Science & Business Media, 2012. [20] T. Katayama, Subspace methods for system identification. Springer Science & Business Media, 2006. [21] L. Balzano, R. Nowak, and B. Recht, “Online identification and tracking of subspaces from highly incomplete information,” in Communication, Control, and Computing (Allerton), 2010 48th Annual Allerton Conference on, pp. 704–711, IEEE, 2010. 10 [22] S. Turaga, L. Buesing, A. M. Packer, H. Dalgleish, N. Pettit, M. Hausser, and J. Macke, “Inferring neural population dynamics from multiple partial recordings of the same neural circuit,” in Advances in Neural Information Processing Systems, pp. 539–547, 2013. [23] W. E. Bishop and B. M. Yu, “Deterministic symmetric positive semidefinite matrix completion,” in Advances in Neural Information Processing Systems, pp. 2762–2770, 2014. [24] I. Markovsky, “The most powerful unfalsified model for data with missing values,” Systems & Control Letters, 2016. [25] I. Markovsky, “A missing data approach to data-driven filtering and control,” IEEE Transactions on Automatic Control, 2016. [26] Z. Liu, A. Hansson, and L. Vandenberghe, “Nuclear norm system identification with missing inputs and outputs,” Systems & Control Letters, vol. 62, no. 8, pp. 605–612, 2013. [27] J. He, L. Balzano, and J. Lui, “Online robust subspace tracking from partial information,” arXiv preprint arXiv:1109.3827, 2011. [28] D. Soudry, S. Keshri, P. Stinson, M.-h. Oh, G. Iyengar, and L. Paninski, “Efficient" shotgun" inference of neural connectivity from highly sub-sampled activity data,” PLoS Comput Biol, vol. 11, no. 10, p. e1004464, 2015. [29] S. C. Turaga, L. Buesing, A. Packer, H. Dalgleish, N. Pettit, M. Hausser, and J. H. Macke, “Inferring neural population dynamics from multiple partial recordings of the same neural circuit,” in Advances in Neural Information Processing Systems, pp. 539–547, 2013. [30] E. A. Pnevmatikakis, K. R. Rad, J. Huggins, and L. Paninski, “Fast kalman filtering and forward– backward smoothing via a low-rank perturbative approach,” Journal of Computational and Graphical Statistics, vol. 23, no. 2, pp. 316–339, 2014. [31] M. Aoki, State space modeling of time series. Springer Science & Business Media, 1990. [32] D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014. [33] R. Brette and W. Gerstner, “Adaptive exponential integrate-and-fire model as an effective description of neuronal activity,” Journal of neurophysiology, vol. 94, no. 5, pp. 3637–3642, 2005. [34] M. B. Ahrens, M. B. Orger, D. N. Robson, J. M. Li, and P. J. Keller, “Whole-brain functional imaging at cellular resolution using light-sheet microscopy.,” Nature Methods, vol. 10, no. 5, pp. 413–420, 2013. [35] L. Buesing, J. H. Macke, and M. Sahani, “Spectral learning of linear dynamics from generalisedlinear observations with application to neural population data,” in Advances in Neural Information Processing Systems, pp. 1682–1690, 2012. [36] L. Buesing, T. A. Machado, J. P. Cunningham, and L. Paninski, “Clustered factor analysis of multineuronal spike data,” in Advances in Neural Information Processing Systems, pp. 3500– 3508, 2014. 11 | 2017 | 521 |
7,032 | Minimizing a Submodular Function from Samples Eric Balkanski Harvard University ericbalkanski@g.harvard.edu Yaron Singer Harvard University yaron@seas.harvard.edu Abstract In this paper we consider the problem of minimizing a submodular function from training data. Submodular functions can be efficiently minimized and are consequently heavily applied in machine learning. There are many cases, however, in which we do not know the function we aim to optimize, but rather have access to training data that is used to learn it. In this paper we consider the question of whether submodular functions can be minimized when given access to its training data. We show that even learnable submodular functions cannot be minimized within any non-trivial approximation when given access to polynomially-many samples. Specifically, we show that there is a class of submodular functions with range in [0, 1] such that, despite being PAC-learnable and minimizable in polynomial-time, no algorithm can obtain an approximation strictly better than 1/2 −o(1) using polynomially-many samples drawn from any distribution. Furthermore, we show that this bound is tight via a trivial algorithm that obtains an approximation of 1/2. 1 Introduction For well over a decade now, submodular minimization has been heavily studied in machine learning (e.g. [SK10, JB11, JLB11, NB12, EN15, DTK16]). This focus can be largely attributed to the fact that if a set function f : 2N ! R is submodular, meaning it has the following property of diminishing returns: f(S [ {a}) −f(S) ≥f(T [ {a}) −f(T) for all S ✓T ✓N and a 62 T, then it can be optimized efficiently: its minimizer can be found in time that is polynomial in the size of the ground set N [GLS81, IFF01]. In many cases, however, we do not know the submodular function, and instead learn it from data (e.g. [BH11, IJB13, FKV13, FK14, Bal15, BVW16]). The question we address in this paper is whether submodular functions can be (approximately) minimized when the function is not known but can be learned from training data. An intuitive approach for optimization from training data is to learn a surrogate function from training data that predicts the behavior of the submodular function well, and then find the minimizer of the surrogate learned and use that as a proxy for the true minimizer we seek. The problem however, is that this approach does not generally guarantee that the resulting solution is close to the true minimum of the function. One pitfall is that the surrogate may be non-submodular, and despite approximating the true submodular function arbitrarily well, the surrogate can be intractable to minimize. Alternatively, it may be that the surrogate is submodular, but its minimum is arbitrarily far from the minimum of the true function we aim to optimize (see examples in Appendix A). Since optimizing a surrogate function learned from data may generally result in poor approximations, one may seek learning algorithms that are guaranteed to produce surrogates whose optima wellapproximate the true optima and are tractable to compute. More generally, however, it is possible that there is some other approach for optimizing the function from the training samples, without learning a model. Therefore, at a high level, the question is whether a reasonable number of training samples suffices to minimize a submodular function. We can formalize this as optimization from samples. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Optimization from samples. We will say that a class of functions F = {f : 2N ! [0, 1]} is ↵-optimizable from samples over distribution D if for every f 2 F and δ 2 (0, 1), when given poly(|N|) i.i.d. samples {(Si, f(Si))}m i=1 where Si ⇠D, with probability at least 1 −δ over the samples one can construct an algorithm that returns a solution S ✓N s.t, f(S) −min T ✓N f(T) ↵. This framework was recently introduced in [BRS17] for the problem of submodular maximization where the standard notion of approximation is multiplicative. For submodular minimization, since the optimum may have zero value, the suitable measure is that of additive approximations for [0, 1]bounded functions, and the goal is to obtain a solution which is a o(1) additive approximation to the minimum (see e.g. [CLSW16, EN15, SK10]). The question is then: Can submodular functions be minimized from samples? Since submodular functions can be minimized in polynomial-time, it is tempting to conjecture that when the function is learnable it also has desirable approximation guarantees from samples, especially in light of positive results in related settings of submodular maximization: • Constrained maximization. For functions that can be maximized in polynomial time under a cardinality constraint, like modular and unit-demand functions, there are polynomial time algorithms that obtain an arbitrarily good approximation using polynomially-many samples [BRS16, BRS17]. For general monotone submodular functions which are NPhard to maximize under cardinality constraints, there is no algorithm that can obtain a reasonable approximation from polynomially-many samples [BRS17]. For the problem of unconstrained minimization, submodular functions can be optimized in polynomial time; • Unconstrained maximization. For unconstrained maximization of general submodular functions, the problem is NP-hard to maximize (e.g. MAX-CUT) and one seeks constant factor approximations. For this problem, there is an extremely simple algorithm that uses no queries and obtains a good approximation: choose elements uniformly at random with probability 1/2 each. This algorithm achieves a constant factor approximation of 1/4 for general submodular functions. For symmetric submodular functions (i.e. f(S) = f(N \S)), this algorithm is a 1/2-approximation which is optimal, since no algorithm can obtain an approximation ratio strictly better than 1/2 using polynomially-many value queries, even for symmetric submodular functions [FMV11]. For unconstrained symmetric submodular minimization, there is an appealing analogue: the empty set and the ground set N are guaranteed to be minimizers of the function (see Section 2). This algorithm, of course, uses no queries either. The parallel between these two problems seems quite intuitive, and it is tempting to conjecture that like for unconstrained submodular maximization, there are optimization from samples algorithms for general unconstrained submodular minimization with good approximation guarantees. Main result. Somewhat counter-intuitively, we show that despite being computationally tractable to optimize, submodular functions cannot be minimized from samples to within a desirable guarantee, even when these functions are learnable. In particular, we show that there is no algorithm for minimizing a submodular function from polynomially-many samples drawn from any distribution that obtains an additive approximation of 1/2 −o(1), even when the function is PAC-learnable. Furthermore, we show that this bound is tight: the algorithm which returns the empty set or ground set each with probability 1/2 achieves at least a 1/2 approximation. Notice that this also implies that in general, there is no learning algorithm that can produce a surrogate whose minima is close to the minima of the function we aim to optimize, as otherwise this would contradict our main result. Technical overview. At a high level, hardness results in optimization from samples are shown by constructing a family of functions, where the values of functions in the family are likely to be indistinguishable for the samples, while having very different optimizers. The main technical difficulty is to construct a family of functions that concurrently satisfy these two properties (indistinguishability and different optimizers), and that are also PAC-learnable. En route to our main construction, we first construct a family of functions that are completely indistinguishable given samples drawn from the uniform distribution, in which case we obtain a 1/2 −o(1) impossibility result (Section 2). The 2 general result that holds for any distribution requires heavier machinery to argue about more general families of functions where some subset of functions can be distinguished from others given samples. Instead of satisfying the two desired properties for all functions in a fixed family, we show that these properties hold for all functions in a randomized subfamily (Section 3.2). We then develop an efficient learning algorithm for the family of functions constructed for the main hardness result (Section 3.3). This algorithm builds multiple linear regression predictors and a classifier to direct a fresh set to the appropriate linear predictor. The learning of the classifier and the linear predictors relies on multiple observations about the specific structure of this class of functions. 1.1 Related work The problem of optimization from samples was introduced in the context of constrained submodular maximization [BRS17, BRS16]. In general, for maximizing a submodular function under a cardinality constraint, no algorithm can obtain a constant factor approximation guarantee from any samples. As discussed above, for special classes of submodular functions that can be optimized in polynomial time under a cardinality constraint, and for unconstrained maximization, there are desirable optimization from samples guarantees. It is thus somewhat surprising that submodular minimization, which is an unconstrained optimization problem that is optimizable in polynomial time in the value query model, is hard to optimize from samples. From a technical perspective the constructions are quite different. In maximization, the functions constructed in [BRS17, BRS16] are monotone so the ground set would be an optimal solution if the problem was unconstrained. Instead, we need to construct novel non-monotone functions. In convex optimization, recent work shows a tight 1/2-inapproximability for convex minimization from samples [BS17]. Although there is a conceptual connection between that paper and this one, from a technical perspective these papers are orthogonal. The discrete analogue of the family of convex functions constructed in that paper is not (even approximately) a family of submodular functions, and the constructions are significantly different. 2 Warm up: the Uniform Distribution As a warm up to our main impossibility result, we sketch a tight lower bound for the special case in which the samples are drawn from the uniform distribution. At a high level, the idea is to construct a function which considers some special subset of “good” elements that make its value drops when a set contains all such “good” elements. When samples are drawn from the uniform distribution and “good” elements are sufficiently rare, there is a relatively simple construction that obfuscates which elements the function considers “good”, which then leads to the inapproximability. 2.1 Hardness for uniform distribution We construct a family of functions F where fi 2 F is defined in terms of a set Gi ⇢N of size pn. For each such function we call Gi the set of good elements, and Bi = N \ Gi its bad elements. We denote the number of good and bad elements in a set S by gS and bS, dropping the subscripts (S and i) when clear from context, so g = |Gi \ S| and b = |Bi \ S|. The function fi is defined as follows: fi(S) := 8 > < > : 1 2 + 1 2n · (g + b) if g < pn 1 2n · b if g = pn It is easy to verify that these functions are submodular with range in [0, 1] (see illustration in Figure 1a). Given samples drawn uniformly at random (u.a.r.), it is impossible to distinguish good and bad elements since with high probability (w.h.p.) g < pn for all samples. Informally, this implies that a good learner for F over the uniform distribution D is f 0(S) = 1/2 + |S|/(2n). Intuitively, F is not 1/2 −o(1) optimizable from samples because if an algorithm cannot learn the set of good elements Gi, then it cannot find S such fi(S) < 1/2 −o(1) whereas the optimal solution S? i = Gi has value fi(Gi) = 0. Theorem 1. Submodular functions f : 2N ! [0, 1] are not 1/2 −o(1) optimizable from samples drawn from the uniform distribution for the problem of submodular minimization. 3 Proof. The details for the derivation of concentration bounds are in Appendix B. Consider fk drawn u.a.r. from F and let f ? = fk and G? = Gk. Since the samples are all drawn from the uniform distribution, by standard application of the Chernoff bound we have that every set Si in the sample respects |Si| 3n/4, w.p. 1 −e−⌦(n). For sets S1, . . . , Sm, all of size at most 3n/4, when fj is drawn u.a.r. from F we get that |Si \ Gj| < pn, w.p. 1 −e−⌦(n1/2) for all i 2 [m], again by Chernoff, and since m = poly(n). Notice that this implies that w.p. 1 −e−⌦(n1/2) for all i 2 [m]: fj(Si) = 1 2 + |Si| 2n Now, let F0 be the collection of all functions fj for which fj(Si) = 1/2 + |Si|/(2n) on all sets {Si}m i=1. The argument above implies that |F0| = (1 −e−⌦(n1/2))|F|. Thus, since f ? is drawn u.a.r. from F we have that f ? 2 F0 w.p. 1 −e−⌦(n1/2), and we condition on this event. Let S be the (possibly randomized) solution returned by the algorithm. Observe that S is independent of f ? 2 F0. In other words, the algorithm cannot learn any information about which function in F0 generates the samples. By Chernoff, if we fix S and choose f u.a.r. from F, then, w.p. 1 −e−⌦(n1/6): f(S) ≥1 2 −o(1). Since |F0| |F| = 1 −e−⌦(n1/2), it is also the case that f ?(S) ≥1/2 −o(1) w.p. 1 −e−⌦(n1/6) over the choice of f ? 2 F0. By the probabilistic method and since all the events we conditioned on occur with exponentially high probability, there exists f ? 2 F s.t. the value of the set S returned by the algorithm is 1/2 −o(1) whereas the optimal solution is f ?(G?) = 0. 2.2 A tight upper bound We now show that the result above is tight. In particular, by randomizing between the empty set and the ground set we get a solution whose value is at most 1/2. In the case of symmetric functions, i.e. f(S) = f(N \ S) for all S ✓N, ; and N are minima since f(N) + f(;) f(S) + f(N \ S) for all S ✓N as shown below.1 Notice, that this does not require any samples. Proposition 2. The algorithm which returns the empty set ; or the ground N with probability 1/2 each is a 1/2 additive approximation for the problem of unconstrained submodular minimization. Proof. Let S ✓N, observe that f(N \ S) −f(;) ≥f((N \ S) [ S) −f(S) = f(N) −f(S) where the inequality is by submodularity. Thus, we obtain 1 2(f(N) + f(;)) 1 2f(S) + 1 2f(N \ S) f(S) + 1 2. In particular, this holds for S 2 argminT ✓N f(T). 3 General Distribution In this section, we show our main result, namely that there exists a family of submodular functions such that, despite being PAC-learnable for all distributions, no algorithm can obtain an approximation better than 1/2 −o(1) for the problem of unconstrained minimization. The functions in this section build upon the previous construction, though are inevitably more involved in order to achieve learnability and inapproximability on any distribution. The functions constructed for the uniform distribution do not yield inapproximability for general distributions due to the fact that the indistinguishability between two functions no longer holds when sets S of large size are sampled with non-negligible probability. Intuitively, in the previous construction, once a set is sufficiently large the good elements of the function can be distinguished from the bad ones. The main idea to get around this issue is to introduce masking elements M. We construct functions such that, for sets S of large size, good and bad elements are indistinguishable if S contains at least one masking element. 1Although ; and N are trivial minima if f is symmetric, the problem of minimizing a symmetric submodular function over proper nonempty subsets is non-trivial (see [Que98]). 4 √n - 1 √n n – √n 0 0 0.5 1 |S| f(S) b = |S| g = |S| (a) Uniform distribution 1 n1/4 √n n/2 0 0 0.5 1 |S| f(S) m = |S| b = |S| g = |S| b = |S|-1, m=1 g = |S|-1, m=1 (b) General distribution Figure 1: An illustration of the value of a set S of good (blue), bad (red), and masking (green) elements as a function of |S| for the functions constructed. For the general distribution case, we also illustrate the value of a set S of good (dark blue) and bad (dark red) elements when S also contains at least one masking element. The construction. Each function fi 2 F is defined in terms of a partition Pi of the ground set into good, bad, and masking elements. The partitions we consider are Pi = (Gi, Bi, Mi) with |Gi| = n/2, |Bi| = pn, and |Mi| = n/2 −pn. Again, when clear from context, we drop indices of i and S and the number of good, bad, and masking elements in a set S are denoted by g, b, and m. For such a given partition Pi, the function fi is defined as follows (see illustration in Figure 1b): fi(S) = 1 2 + 8 > > > > > > < > > > > > > : 1 2pn · (b + g) Region X : if m = 0 and g < n1/4 1 2pn · ⇣ b + n1/4⌘ −1 n · ⇣ g −n1/4⌘ Region Y : if m = 0 and g ≥n1/4 1 2 −1 n · (b + g) Region Z : otherwise 3.1 Submodularity In the appendix, we prove that the functions fi constructed as above are indeed submodular (Lemma 10). By rescaling fi with an additive term of n1/4/(2pn) = 1/(2n1/4), it can be easily verified that its range is in [0, 1]. We use the non-normalized definition as above for ease of notation. 3.2 Inapproximability We now show that F cannot be minimized within a 1/2 −o(1) approximation given samples from any distribution. We first define FM, which is a randomized subfamily of F. We then give a general lemma that shows that if two conditions of indistinguishability and gap are satisfied then we obtain inapproximability. We then show that these two conditions are satisfied for the subfamily FM. A randomization over masking elements. Instead of considering a function f drawn u.a.r. from F as in the uniform case, we consider functions f in a randomized subfamily of functions FM ✓F to obtain the indistinguishability and gap conditions. Given the family of functions F, let M be a uniformly random subset of size n/2 −pn and define FM ⇢F: FM := {fi 2 F : (Gi, Bi, M)}. Since masking elements are distinguishable from good and bad elements, they need to be the same set of elements for each function in family FM to obtain indistinguishability of functions in FM. The inapproximability lemma. In addition to this randomized subfamily of functions, another main conceptual departure of the following inapproximability lemma from the uniform case is that no assumption can be made about the samples, such as their size, since the distribution is arbitrary. We denote by U(A) the uniform distribution over the set A. 5 Lemma 3. Let F be a family of functions and F0 = {f1, . . . , fp} ✓F be a subfamily of functions drawn from some distribution. Assume the following two conditions hold: 1. Indistinguishability. For all S ✓N, w.p. 1 −e−⌦(n1/4) over F0: for every fi, fj 2 F0, fi(S) = fj(S); 2. ↵-gap. Let S? i be a minimizer of fi, then w.p. 1 over F0: for all S ✓N, E fi⇠U(F0) [fi(S) −fi (S? i )] ≥↵; Then, F is not ↵-minimizable from strictly less than e⌦(n1/4) samples over any distribution D. Note that the ordering of the quantifiers is crucial. The proof is deferred to the appendix, but the main ideas are summarized as follows. We use a probabilistic argument to switch from the randomization over F0 to the randomization over S ⇠D and show that there exists a deterministic F ✓F such that fi(S) = fj(S) for all fi, fj 2 F w.h.p. over S ⇠D. By a union bound this holds for all samples S. Thus, for such a family of functions F = {f1, . . . , fp}, the choices of an algorithm that is given samples from fi for i 2 [p] are independent of i. By the ↵-gap condition, this implies that there exists fi 2 F for which a solution S returned by the algorithm is at least ↵away from fi(S? i ). Indistinguishability and gap of F. We now show the indistinguishability and gap conditions, with ↵= 1/2 −o(1), which immediately imply a 1/2 −o(1) inapproximability by Lemma 3. For the indistinguishability, it suffices to show that good and bad elements are indistinguishable since the masking elements are identical for all functions in FM. Good and bad elements are indistinguishable since, w.h.p., a set S is not in region Y, which is the only region distinguishing good and bad elements. Lemma 4. For all S ✓N s.t. |S| < n1/4: For all fi 2 FM, fi(S) = 1 2 + ( 1 2pn · (b + g) if m = 0 (Region X) 1 2 −1 n · (b + g) otherwise (Region Z) and for all S ✓N such that |S| ≥n1/4, with probability 1 −e−⌦(n1/4) over FM: For all fi 2 FM, fi(S) = 1 −1 n · (b + g) (Region Z). Proof. Let S ✓N. If |S| < n1/4, then the proof follows immediately from the definition of fi. If |S| ≥n1/4, then, the number of masking elements m in S is m = |M \ S| for all fi 2 FM. We then get m ≥1, for all fi 2 FM, with probability 1 −e−⌦(n1/4) over FM by Chernoff bound. The proof then follows again immediately from the definition of fi. Next, we show the gap. The gap is since the good elements can be any subset of N \ M. Lemma 5. Let S? i be a minimizer of fi. With probability 1 over FM, for all S ✓N, E fi⇠U(FM) [fi(S)] ≥1 2 −o(1). Proof. Let S ✓N and fi ⇠U(FM). Note that the order of the quantifiers in the statement of the lemma implies that S can be dependent on M, but that it is independent of i. There are three cases. If m ≥1, then S is in region Z and fi(S) ≥1/2. If m = 0 and |S| n7/8, then S is in region X or Y and fi(S) ≥1/2 −n7/8/n = 1 2 −o(1). Otherwise, m = 0 and |S| ≥n7/8. Since S is independent of i, by Chernoff bound, we get (1 −o(1)) · |S| n/2 + pn pn · b and n/2 + pn n/2 · g (1 + o(1)) · |S| with probability 1 −e−⌦(n1/4). Thus S is in region Y and fi(S) ≥1 2 + (1 −o(1)) 1 2pn · pn n/2 + pn · |S| −(1 + o(1)) 1 n · n/2 n/2 + pn · |S| ≥1 2 −o(1). Thus, we obtain Efi⇠U(FM) [fi(S)] ≥1 2 −o(1). 6 Combining the above three lemmas, we obtain the inapproximability result. Lemma 6. The problem of submodular minimization cannot be approximated with a 1/2 −o(1) additive approximation given poly(n) samples from any distribution D. Proof. For any set S ✓N, observe that the number g + b of elements in S that are either good or bad is the same for any two functions fi, fj 2 FM and for any FM. Thus, by Lemma 4, we obtain the indistinguishability condition. Next, the optimal solution S? i = Gi of fi has value fi(Gi) = o(1), so by Lemma 5, we obtain the ↵-gap condition with ↵= 1/2 −o(1). Thus F is not 1/2 −o(1) minimizable from samples from any distribution D by Lemma 3. The class of functions F is a class of submodular functions by Lemma 10 (in Appendix C). 3.3 Learnability of F We now show that every function in F is efficiently learnable from samples drawn from any distribution D. Specifically, we show that for any ✏, δ 2 (0, 1) the functions are (✏, δ) −PAC learnable with the absolute loss function (or any Lipschitz loss function) using poly(1/✏, 1/δ, n) samples and running time. At a high level, since each function fi is piecewise-linear over three different regions Xi, Yi, and Zi, the main idea is to exploit this structure by first training a classifier to distinguish between regions and then apply linear regression in different regions. The learning algorithm. Since every function f 2 F is piecewise linear over three different regions, there are three different linear functions fX , fY, fZ s.t. for every S ✓N its value f(S) can be expressed as fR(S) for some region R 2 {X, Y, Z}. The learning algorithm produces a predictor ˜f by using a multi-label classifier and a set of linear predictors {f ˜ X , f ˜ Y} [ {[i2 ˜ Mf ˜ Zi}. The multi-label classifier creates a mapping from sets to regions, g : 2N ! { ˜ X, ˜Y} [ {[i2 ˜ M ˜Zi}, s.t. X, Y, Z are approximated by ˜ X, ˜Y, [i2 ˜ M ˜Zi. Given a sample S ⇠D, using the algorithm then retuns ˜f(S) = fg(S)(S). We give a formal description below (detailed description is in Appendix D). Algorithm 1 A learning algorithm for f 2 F which combines classification and linear regression. Input: samples S = {(Sj, f(Sj))}j2[m] ( ˜Z, ˜ M) (;, ;) for i = 1 to n do ˜Zi {S : ai 2 S, S 62 ˜Z} f ˜ Zi ERMreg({(Sj, f(Sj)) : Sj 2 ˜Zi}) linear regression if P (Sj,f(Sj)):Sj2 ˜ Zi |f ˜ Zi(Sj) −f(Sj)| = 0 then ˜Z ˜Z [ ˜Zi, ˜ M ˜ M [ {ai} C ERMcla({(Sj, f(Sj)) : Sj 62 ˜Z, j m/2}) train a classifier for regions X, Y ( ˜ X, ˜Y) ({S : S 62 ˜Z, C(S) = 1}, {S : S 62 ˜Z, C(S) = −1}) return ˜f S 7! 8 < : |S|/(2pn) if S2 ˜ X f ˜ Y(S) = ERMreg({(Sj, f(Sj)) : Sj 2 ˜Y, j > m/2}) if S2 ˜ Y f ˜ Zi(S) : i = min({i0 : ai0 2 S \ ˜ M}) if S2 ˜ Z Overview of analysis of the learning algorithm. There are two main challenges in training the algorithm. The first is that the region X, Y, or Z that a sample (Sj, f(Sj)) belongs to is not known. Thus, even before being able to train a classifier which learns the regions ˜ X, ˜Y, ˜Z using the samples, we need to learn the region a sample Sj belongs to using f(Sj). The second is that the samples SR used for training a linear regression predictor fR over region R need to be carefully selected so that SR is a collection of i.i.d. samples from the distribution S ⇠D conditioned on S 2 R (Lemma 20). We first discuss the challenge of labeling samples with the region they belong to. Observe that for a fixed masking element ai 2 M, f 2 F is linear over all sets S containing ai since these sets are all in region Z. Thus, there must exist a linear regression predictor f ˜ Zi = ERMreg(·) with zero empirical loss over all samples Sj containing ai if ai 2 M (and thus Sj 2 Z). ERMreg(·) minimizes the empirical loss on the input samples over the class of linear regression predictors with bounded norm 7 Figure 2: An illustration of the regions. The dots represent the samples, the corresponding full circles represent the regions X (red), Y (blue), and Z (green). The ellipsoids represent the regions ˜ X, ˜Y, ˜ Z learned by the classifier. Notice that ˜ Z has no false negatives. (Lemma 19). If f ˜ Zi has zero empirical loss, we directly classify any set S containing ai as being in ˜Z. Next, for a sample (Sj, f(Sj)) not in ˜Z, we can label these samples since Sj 2 X if and only if f(Sj) = |Sj|/(2pn). With these labeled samples S0, we train a binary classifier C = ERMcla(S0) that indicates if S s.t. S 62 ˜Z is in region ˜ X or ˜Y. ERMcla(S0) minimizes the empirical loss on labeled samples S0 over the class of halfspaces w 2 Rn (Lemma 23). Regarding the second challenge, we cannot use all samples Sj s.t. Sj 2 ˜Y to train a linear predictor f ˜ Y for region ˜Y since these same samples were used to define ˜Y, so they are not a collection of i.i.d. samples from the distribution S ⇠D conditioned on S 2 ˜Y. To get around this issue, we partition the samples into two distinct collections, one to train the classifier C and one to train f ˜ Y (Lemma 24). Next, given T 2 ˜Z, we predict f ˜ Zi(T) where i is s.t. ai 2 T \ ˜ M (breaking ties lexicographically) which performs well since ˜f ˜ Zi has zero empirical error for ai 2 ˜ M (Lemma 22). Since we break ties lexicographically, ˜f ˜ Zi must be trained over samples Sj such that ai 2 Sj and ai0 62 Sj for i0 s.t. i0 < i and ai0 2 ˜ M to obtain i.i.d. samples from the same distribution as T ⇠D conditioned on T being directed to ˜f ˜ Zi (Lemma 21). The analysis of the learning algorithm leads to the following main learning result. Lemma 7. Let ˜f be the predictor returned by Algorithm 1, then w.p. 1 −δ over m 2 O(n3 + n2(log(2n/δ))/✏2) samples S drawn i.i.d. from any distribution D, ES⇠D[| ˜f(S) −f(S)|] ✏. 3.4 Main Result We conclude this section with our main result which combines Lemmas 6 and 7. Theorem 8. There exists a family of [0, 1]-bounded submodular functions F that is efficiently PAClearnable and that cannot be optimized from polynomially many samples drawn from any distribution D within a 1/2 −o(1) additive approximation for unconstrained submodular minimization. 4 Discussion In this paper, we studied the problem of submodular minimization from samples. Our main result is an impossibility, showing that even for learnable submodular functions it is impossible to find a non-trivial approximation to the minimizer with polynomially-many samples, drawn from any distribution. In particular, this implies that minimizing a general submodular function learned from data cannot yield desirable guarantees. In general, it seems that the intersection between learning and optimization is elusive, and a great deal still remains to be explored. 8 References [Bal15] Maria-Florina Balcan. Learning submodular functions with applications to multi-agent systems. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2015, Istanbul, Turkey, May 4-8, 2015, page 3, 2015. [BH11] Maria-Florina Balcan and Nicholas JA Harvey. Learning submodular functions. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 793–802. ACM, 2011. [BRS16] Eric Balkanski, Aviad Rubinstein, and Yaron Singer. The power of optimization from samples. In Advances in Neural Information Processing Systems, pages 4017–4025, 2016. [BRS17] Eric Balkanski, Aviad Rubinstein, and Yaron Singer. The limitations of optimization from samples. Proceedings of the Forty-Ninth Annual ACM on Symposium on Theory of Computing, 2017. [BS17] Eric Balkanski and Yaron Singer. The sample complexity of optimizing a convex function. In COLT, 2017. [BVW16] Maria-Florina Balcan, Ellen Vitercik, and Colin White. Learning combinatorial functions from pairwise comparisons. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pages 310–335, 2016. [CLSW16] Deeparnab Chakrabarty, Yin Tat Lee, Aaron Sidford, and Sam Chiu-wai Wong. Subquadratic submodular function minimization. arXiv preprint arXiv:1610.09800, 2016. [DTK16] Josip Djolonga, Sebastian Tschiatschek, and Andreas Krause. Variational inference in mixed probabilistic submodular models. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 1759–1767, 2016. [EN15] Alina Ene and Huy L. Nguyen. Random coordinate descent methods for minimizing decomposable submodular functions. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pages 787–795, 2015. [FK14] Vitaly Feldman and Pravesh Kothari. Learning coverage functions and private release of marginals. In COLT, pages 679–702, 2014. [FKV13] Vitaly Feldman, Pravesh Kothari, and Jan Vondrák. Representation, approximation and learning of submodular functions using low-rank decision trees. In COLT, pages 711–740, 2013. [FMV11] Uriel Feige, Vahab S. Mirrokni, and Jan Vondrák. Maximizing non-monotone submodular functions. SIAM J. Comput., 40(4):1133–1153, 2011. [GLS81] Martin Grotschel, Laszlo Lovasz, and Alexander Schrijver. The ellipsoid method and its consequences in combinatorial optimization. Combinatorica, 1(2):169–197, 1981. [IFF01] Satoru Iwata, Lisa Fleischer, and Satoru Fujishige. A combinatorial strongly polynomial algorithm for minimizing submodular functions. J. ACM, 48(4):761–777, 2001. [IJB13] Rishabh K. Iyer, Stefanie Jegelka, and Jeff A. Bilmes. Curvature and optimal algorithms for learning and minimizing submodular functions. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States., pages 2742–2750, 2013. [JB11] Stefanie Jegelka and Jeff Bilmes. Submodularity beyond submodular energies: coupling edges in graph cuts. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 1897–1904. IEEE, 2011. [JLB11] Stefanie Jegelka, Hui Lin, and Jeff A Bilmes. On fast approximate submodular minimization. In Advances in Neural Information Processing Systems, pages 460–468, 2011. [NB12] Mukund Narasimhan and Jeff A Bilmes. A submodular-supermodular procedure with applications to discriminative structure learning. arXiv preprint arXiv:1207.1404, 2012. [Que98] Maurice Queyranne. Minimizing symmetric submodular functions. Mathematical Programming, 82(1-2):3–12, 1998. [SK10] Peter Stobbe and Andreas Krause. Efficient minimization of decomposable submodular functions. In Advances in Neural Information Processing Systems, pages 2208–2216, 2010. [SSBD14] Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014. 9 | 2017 | 522 |
7,033 | A graph-theoretic approach to multitasking Noga Alon∗ Tel-Aviv University Daniel Reichman† UC Berkeley Igor Shinkar∗ UC Berkeley Tal Wagner∗ MIT Sebastian Musslick Princeton University Jonathan D. Cohen ‡ Princeton University Thomas L. Griffiths UC Berkeley Biswadip Dey Princeton University Kayhan Ozcimder Princeton University Abstract A key feature of neural network architectures is their ability to support the simultaneous interaction among large numbers of units in the learning and processing of representations. However, how the richness of such interactions trades off against the ability of a network to simultaneously carry out multiple independent processes – a salient limitation in many domains of human cognition – remains largely unexplored. In this paper we use a graph-theoretic analysis of network architecture to address this question, where tasks are represented as edges in a bipartite graph G = (A ∪B, E). We define a new measure of multitasking capacity of such networks, based on the assumptions that tasks that need to be multitasked rely on independent resources, i.e., form a matching, and that tasks can be multitasked without interference if they form an induced matching. Our main result is an inherent tradeoff between the multitasking capacity and the average degree of the network that holds regardless of the network architecture. These results are also extended to networks of depth greater than 2. On the positive side, we demonstrate that networks that are random-like (e.g., locally sparse) can have desirable multitasking properties. Our results shed light into the parallel-processing limitations of neural systems and provide insights that may be useful for the analysis and design of parallel architectures. 1 Introduction One of the primary features of neural network architectures is their ability to support parallel distributed processing [RMG+86]. The decentralized nature of biological and artificial nets results in greater robustness and fault tolerance when compared to serial architectures such as Turing machines. On the other hand, the lack of a central coordination mechanism in neural networks can result in interference between units (neurons) and such interference effects have been demonstrated in several settings such as the analysis of associative memories [AGS85] and multitask learning [MC89]. ∗Equal contribution. †Equal contribution. Supported by DARPA contract N66001-15-2-4048, Value Alignment in Autonomous Systems and Grant: 2014-1600, Sponsor: William and Flora Hewlett Foundation, Project Title: Cybersecurity and Internet Policy ‡This publication was made possible through the support of a grant from the John Templeton Foundation. The opinions expressed in this publication are those of the authors and do not necessarily reflect the views of the John Templeton Foundation 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Understating the source of such interference and how it can be prevented has been a major focus of recent research (see, e.g., [KPR+17] and the references therein). While the stark limitation of our ability to carry out multiple tasks simultaneously, i.e., multitask, is one of the most widely documented phenomena in cognitive psychology [SS77], the sources for this limitation are still unclear. Recently, a graph-theoretic model [FSGC14, MDO+16] has suggested that interference effects may explain the limitations of the human cognitive system in performing multiple task processes at the same time. This model consists of a simple 2-layer feed-forward network represented by a bipartite graph G = (A ∪B, E) wherein the vertex set is partitioned into two disjoint sets of nodes A and B, representing the inputs and the outputs of tasks respectively. An edge (a, b) ∈E corresponds to a directed pathway from the input layer to the output layer in the network that is taken to represent a cognitive process (or task4) that maps an input to an output. In more abstract terms, every vertex in a ∈A is associated with a set of inputs Ia, every vertex in B is associated with a set of outputs Ob and the edge (a, b) is associated with a function fa,b : Ia →Ob. 5 In this work, we also consider deeper architectures with r > 2 layers, where edges correspond to mappings between nodes from consecutive layers and a path P from the input (first) layer to the output (last) layer is simply the composition of the mappings on the edges in P. The model above is quite general and simple modifications of it may apply to other settings. For example, we can assume the vertices in A are senders and vertices in B are receivers and that a task associated with an edge e = (a, b) is transmitting information from a to b along a communication channel e. Given a 2-layer network, a task set is a set of edges T ⊆E. A key assumption made in [MDO+16, FSGC14] that we adopt as well is that all task sets that need to be multitasked in parallel form a matching, namely, no two edges in T share a vertex as an endpoint. This assumption reflects a limitation on the parallelism of the network that is similar to the Exclusive Read Exclusive Write (EREW) model in parallel RAM, where tasks cannot simultaneously read from the same input or write to the same output. Similarly, for depth r > 2 networks, task sets correspond to node disjoint paths from the input layer to the output layer. For simplicity, we shall mostly focus from now on the depth 2 case with |A| = |B| = n. In [MDO+16, FSGC14] it is suggested that concurrently executing two tasks associated with two (disjoint) edges e and f will result in interference if e and f are connected by a third edge h. The rationale for this interference assumption stems from the distributed operation of the network that may result in the task associated with h becoming activated automatically once its input and output are operating, resulting in interference with the tasks associated with e and f. Therefore, [MDO+16, FSGC14] postulate that all tasks within a task set T can be performed in parallel without interferences only if the edges in T form an induced matching. Namely, no two edges in T are connected by a third edge. Interestingly, the induced matching condition also arises in the communication setting [BLM93, AMS12, CK85], where it is assumed that messages between senders and receivers can be reliably transmitted if the edges connecting them forms an induced matching. Following the aforementioned interference model, [MDO+16] define the multitasking capability of a bipartite network G as the maximum cardinality of an induced matching in G. It has been demonstrated that neural network architectures are subject to a fundamental tradeoff between learning efficiency that is promoted by an economic use of shared representations between tasks, on the one hand, and the ability of to execute multiple tasks independently, on the other hand [MSÖ+17]. Namely, it is suggested that as the average degree d (“efficiency of representations” – larger degree corresponds to more economical use of shared representations between tasks) of G increases, the “multitasking ability” should decay in d [FSGC14]. That is, the cardinality of the maximal induced matching should be upper bounded by f(d)n with limd→∞f(d) = 0. This prediction was tested and supported on certain architectures by numerical simulations in [MDO+16, FSGC14], where it was suggested that environmental constraints push towards efficient use of representations which inevitably limits multitasking. Establishing such as a tradeoff is of interest, as 4We view a task as constituting a simple mechanistic instantiation of a cognitive process, consistent with Neisser’s original definition [Nei67]. According to this definition a task process (e.g. color naming) is a mapping from an input space (e.g. colors) to an output space (verbal). Within this framework the decision of what constitutes an input space for a task is left to the designer and may be problem-specific. The modeling of more complex tasks might require to extend this framework to multidimensional input spaces. This would allow to capture scenarios in which tasks are partially overlapping in terms of their input and output spaces. 5The function fa,b is hypothesized to be implemented by a gate used in neural networks such as sigmoid or threshold gate. 2 Figure 1: In the depicted bipartite graph, the node shading represents the bipartition. The blue edges form an induced matching, which represents a large set of tasks that can be multitasked. However, the red edges form a matching in which the largest induced matching has size only 1. This represents a set of tasks that greatly interfere with each other. Figure 2: Hypercube on 8 nodes. Node shading represents the bipartition. On the left, the blue edges form an induced matching of size 2. On the right, the red edges form a matching of size 4 whose largest induced matching has size 1. Hence the multitasking capacity of the hypercube is at most 1/4. it can identify limitations of artificial nets that rely on shared representations and aid in designing systems that attain an optimal tradeoff. More generally, establishing a connection between graphtheoretic parameters and connectionist models of cognition consists of a new conceptual development that may apply to domains beyond multitasking. Identifying the multitasking capacity of G = (A ∪B, E) with the size of its maximal induced matching has two drawbacks. First, the existence of some, possibly large, set of tasks that can be multitasked does not preclude the existence of a (possibly small) set of critical tasks that greatly interfere with each other (e.g., consider the case in which a complete bipartite graph Kd,d occurs as a subgraph of G. This is illustrated in Figure 1). Second, it is easy to give examples of graphs (where |A| = |B| = n) with average degree Ω(n) that contain an induced matching of size n/2 (for example, two copies of complete bipartite graph connected by a matching: see Figure 1 for an illustration). Hence, it is impossible to upper bound the multitasking capacity of every network with average degree d by f(d)n with f vanishing as the average degree d tends infinity. Therefore, the generality of the suggested tradeoff between efficiency and concurrency is not clear under this definition. Our main contribution is a novel measure of the multitasking capacity that is aimed at solving the first problem, namely networks with “high” capacity which contain a “small” task set whose edges badly interfere with one another. In particular, for a parameter k we consider every matching of size k, and ask whether every matching M of size k contains a large induced matching M ′ ⊆M. This motivates the following definition (see Figure 2 for an illustration). Definition 1.1. Let G = (A ∪B, E) be a bipartite graph with |A| = |B| = n, and let k ∈N be a parameter. We say that G is a (k, α(k))-multitasker if for every matching M in G of size |M| ≤k, there exists an induced matching M ′ ⊆M such that |M ′| ≥α(k)|M|. We will say that a graph G is an α-multitasker if it is (n, α)-multitasker. The parameter α ∈(0, 1] measures the multitasking capabilities of G, and the larger α is the better multitasker G is considered. We call the parameter α(k) ∈(0, 1] the multitasking capacity of G for matchings of size k. Definition 1.1 generalizes to networks of depth r > 2, where instead of matchings, we consider first layer to last layer node disjoint paths, and instead of induced matchings we consider induced paths, i.e., a set of disjoint paths such that no two nodes belonging to different paths are adjacent. The main question we shall consider here is what kind of tradeoffs one should expect between α, d and k. In particular, which network architectures give rise to good multitasking behavior? Should we 3 expect “multitasking vs. multiplexing”: namely, α tending to zero with d for all graphs of average degree d? While our definition of multitasking capacity is aimed at resolving the problem of small task sets that can be poorly multitasked, it turns out to be also related also to the “multitasking vs. multiplexing” phenomena. Furthermore, our graph-theoretic formalism also gives insights as to how network depth and interference are related. 1.1 Our results We divide the presentation of the results into two parts. The first part discusses the case of d-regular graphs, and the second part discusses general graphs. The d-regular case: Let G = (A ∪B, E) be a bipartite d-regular graph with n vertices on each side. Considering the case of k = n, i.e., maximal possible induced matchings that are contained in a perfect matching (that is a matching of cardinality n), we show that if a d-regular graph is an (n, α(n))-multitasker, then α(n) = O(1/ √ d). Our upper bound on α(n) establishes an inherent limitation on the multitasking capacity of any network. That is, for any infinite family of networks with average degree tending to infinity it holds that α(n) must tend to 0 as the degree grows. In fact, we prove that degree of the graph d constrains the multitasking capacity also for task sets of smaller sizes. Specifically, for all k that is sufficiently larger than Ω(n/d) it holds that α(k) tends to 0 as d increases. In this version of the paper we prove this result for k > n/d1/4. The full version of this paper [ACD+] contains the statement and the result that holds for all d > Ω( n d ). Theorem 1.2. Let G = (A ∪B, E), be a d-regular (k, α(k))-multitasker graph with |A| = |B| = n. If n/d1/4 ≤k ≤n, then α(k) ≤O( n k √ d). In particular, there exists a perfect matching in G that does not contain an induced matching of size larger than O(n/ √ d). For task sets of size n, Theorem 1.2 is tight up to logarithmic factors, as we provide a construction of an infinite family of d-regular graph, where every matching of size n contains an induced matching of size Ω( 1 √d log d). The precise statement appear in the full version of the paper [ACD+]. For arbitrary values of k ≤n it is not hard to see that every d-regular graph achieves α(k) ≥ 1 2d. We show that this naive bound can be asymptotically improved upon, by constructing an α-multitaskers with α = Ω( log d d ). The construction is based on bipartite graphs which have good spectral expansion properties. For more details see the full version of the paper [ACD+]. We also consider networks of depth r > 2 6. We generalize our ideas for depth 2 networks by upperbounding the multitasking capacity of arbitrary d-regular networks of depth r by O((r/d ln(r))1−1/r). Observe that as we show that there are d-regular bipartite graphs with α(n) = 1 √d log d, this implies that for tasks sets of size n, networks of depth 2 < r ≪d incur interference which is strictly worse than depth 2 networks. We believe that interference worsens as r increases to r + 1 (for r > 2), although whether this is indeed the case is an open question. The irregular case: Next we turn to arbitrary, not necessarily regular, graphs. We show that for an arbitrary bipartite graph with n vertices on each side and average degree d its multitasking capacity α(n) is upper bounded by O log n d 1/3 . That is, when the average degree is concerned, the multitasking capacity of a graph tends to zero, provided that the average degree of a graph is ω(log n). Theorem 1.3. Let G = (A ∪B, E), be a bipartite graph of average degree d with |A| = |B| = n. If G is an α-multitasker then α ≤O(( log n d )1/3). For dense graphs satisfying d = Ω(n) (which is studied in [FSGC14]), we prove a stronger upper bound of α(n) = O( 1 √n) using the Szemerédi regularity lemma. See Theorem 3.9 for details. We also show that there are multitaskers of average degree Ω(log log n), with α > 1/3 −ϵ. Hence, in contrast to the regular case, for the multitasking capacity to decay with average degree d, we must assume that d grows faster than log log n. The details behind this construction, which build on ideas in [Pyb85, PRS95], appear in full version of this paper [ACD+]. 6We think of r as a constant independent of n and d as tending to infinity with n. 4 Finally, for any d ∈N and for all α ∈(0, 1/5) we show a construction of a graph with average degree d that is a (k, α)-multitaskers for all k ≤Ω(n/d1+4α). Comparing this to the foregoing results, here we do not require that d = O(log log n). That is, allowing larger values of d allows us to construct networks with constant multitasking capacities, albeit only with respect to matchings whose size is at most n/d1+4α. See Theorem 3.10 for details. 2 Preliminaries A matching M in a graph G is a set of edges {e1, ..., em} such that no two edges in M share a common vertex. If G has 2n vertices and |M| = n, we say that M is a perfect matching. By Hall Theorem, every d-regular graph with bipartition (A, B) has a perfect matching. A matching M is induced if there are no two distinct edges e1, e2 in M, such that there is an edge connecting e1 to e2. Given a graph G = (V, E) and two disjoint sets A, B ⊆V we let e(A, B) be the set of edges with one endpoint in A and the other in B. For a subset A, e(A) is the set of all edges contained in A. Given an edge e ∈E, we define the graph G/e obtained by contracting e = (u, v) as the graph with a vertex set (V ∪ve) \ {u, v}. The vertex ve is connected to all vertices in G neighboring u or v. For all other vertices x, y ∈V \ {u, v}, they form an edge in G/e if and only if they were connected in G. Contracting a set of edges, and in particular contracting a matching, means contracting the edges one by one in an arbitrary order. Given a subset of vertices U ⊆V , the subgraph induced by U, denoted by G[U] is the graph whose vertex set is U and two vertices in U are connected if and only if they are connected in G. For a set of edges E′ ⊆E, denote by G[E′] the graph induced by all vertices incident to an edge in E′. We will use the following simple observation throughout the paper. Lemma 2.1. Let M be a matching in G, and let davg be the average degree of G[M]. If we contract all edges in M in G[M], then the resulting graph eG[M] has average degree at most 2davg −2. Proof. G[M] contains 2|M| vertices and davg|M| edges. The result follows as eG[M] has |M| vertices and at most davg|M| −|M| edges. An independent set in a graph G = (V, E) is a set of vertices that do not span an edge. We will use the following well known fact attributed to Turan. Lemma 2.2. Every n-vertex graph with average degree davg contains an independent set of size at least n davg+1. Let G = (V, E) be a bipartite graph, k an integer and α ∈(0, 1], a parameter. We define the (α, k)-matching graph H(G, α, k) = (L, R, F) to be a bipartite graph, where L is the set of all matchings of size k in G, R is the set of all induced matchings of size αk in G, and a vertex vM ∈L (corresponding to matching M of size k) is connected to a vertex uM ′ (corresponding to an induced matching M ′ of size αk) if and only if M ′ ⊆M. We omit α, k, G from the notation of H when it will be clear from the context. We will repeatedly use the following lemma in upper bounding the multitasking capacity in graph families. Lemma 2.3. Suppose that the average degree of the vertices in L in the graph H(G, α, k) is strictly smaller than 1. Then α(k) < α. Proof. By the assumption, L has a vertex of degree 0. Hence there exist a matching of size k in G that does not contain an induced matching of size αk. 3 Upper bounds on the multitasking capacity 3.1 The regular case In this section we prove Theorem 1.2 that upper bounds the multitasking capacity of arbitrary dregular multitaskers. We start the proof of Theorem 1.2 with the case k = n. The following theorem shows that d-regular (k = n, α)-multitaskers must have α = O(1/ √ d). 5 Theorem 3.1. Let G = (A ∪B, E) be a bipartite d-regular graph where |A| = |B| = n. Then G contains a perfect matching M such that every induced matching M ′ ⊆M has size at most 9n √ d. For the proof, we need bounds on the number of perfect matchings in d-regular bipartite graphs. Lemma 3.2. Let G = (A, B, E), be a bipartite d-regular graph where |A| = |B| = n. Denote by M(G) the number of perfect matchings in G. Then d e n ≤ (d −1)d−1 dd−2 n ≤M(G) ≤(d!)n/d. The lower bound on M(G) is due to Schrijver [Sch98]. The upper bound on M(G) is known as Minc’s conjecture, which has been proven by Bregman [Bre73]. Proof of Theorem 3.1. Consider H(G, α, n), where α will be determined later. Clearly |R| ≤ n αn 2 ≤( e α)2αn. By the upper bound in Lemma 3.2, every induced matching of size αn can be contained in at most (d!)(1−α)n/d perfect matchings. By the lower bound in Lemma 3.2, |L| ≥ d e n. Therefore, the average degree of the the vertices in L is at most ( e α)2αn · (d!)(1−α)n/d d e n ≤( e α)2αn · ( √ 2πd( d e)d)(1−α)n/d d e n = e3 α2d · (2πd) 1−α 2αd αn . Setting α > 2 q e3 d yields e3 α2d < 1 2, and it can be verified that (2πd) 1−α 2αd < 2 for all such α. Therefore in this setting, the average degree of the vertices in L is smaller than 1, which concludes the proof by Lemma 2.3. This completes the proof of the theorem. We record the following simple observation, which is immediate from the definition. Proposition 3.3. If G is a (k, α)-multitasker, then for all 1 < β ≤n/k, the graph G is a (βk, α β )multitasker. Theorem 1.2 follows by combining Theorem 3.1 with (the contrapositive of) Proposition 3.3. 3.2 Upper bounds for networks of depth larger than 2 A graph G = (V, E) is a network with r layers of width n and degree d, if V is partitioned into r independent sets V1, . . . , Vr of size n each, such that each (Vi, Vi+1) induces a d-regular bipartite graph for all i < r, and there are no additional edges in G. A top-bottom path in G is a path v1, . . . , vr such that vi ∈Vi for all i ≤r, and vi, vi+1 are neighbors for all i < r. A set of node-disjoint top-bottom paths p1, . . . , pk is called induced if for every two edges e ∈pi and e′ ∈pj such that i ̸= j, there is no edge in G connecting e and e′. Fact 3.4. A set of node-disjoint top-bottom paths p1, . . . , pk is induced if and only if for every i < r it holds that (p1 ∪. . . ∪pk) ∩E(Vi, Vi+1) is an induced matching in G. We say that a network G as above is a (k, α)-multitasker if every set of k node-disjoint top-bottom paths contains an induced subset of size at least αk. Theorem 3.5. If G is an (n, α)-multitasker then α < e e·r d ln(r) 1−1 r . Proof. Let H = (L, R; EH) be the bipartite graph in which side L has a node for each set of n node-disjoint top-bottom paths in G, side R has a node for each induced set of αn node-disjoint top-bottom paths in G, and P ∈L, P ′ ∈R are adjacent iff P ′ ⊂P. Let D be the maximum degree of side R. We wish to upper-bound the average degree of side L, which is upper-bounded by D|R|/|L|. |R| is clearly upper bounded by n αn r. It is a simple observation that |L| equals Q i<r mi, where mi denotes the number of perfect matchings in the bipartite graph G[Vi ∪Vi+1]. Since this graph is 6 d-regular, by the Falikman-Egorichev proof of the Van der Waerden conjecture ([Fal81], [Ego81]), or by Schrijver’s lower bound, we have mi ≥(d/e)n and hence |L| ≥(d/e)n(r−1). To upper bound D, fix P ′ ∈R, and let G′ be the network resulting by removing all nodes and edges in P ′ from G. This removes exactly αn nodes from each layer Vi; denote by V ′ i the remaining nodes in this layer in G′. It is a straightforward observation that D equals the number of sets of (1 −α)n node-disjoint top-bottom paths in G′. Each such set decomposes into M1, . . . , Mr−1 such that Mi is a perfect matching on G′[V ′ i , V ′ i+1] for each i < r. Therefore D ≤Q i−1 m′ i where m′ i denotes the number of perfect matchings in G′[V ′ i , V ′ i+1]. The latter is a bipartite graph with (1−α)n nodes on each side and maximum degree d, and hence by the Bregman-Minc inequality, m′ i ≤(d!)(1−α)n/d. Consequently, D ≤(d!)(1−α)n(r−1)/d. Putting everything together, we find that the average degree of side L is upper bounded by D|R| |L| ≤(d!)(1−α)n(r−1)/d · n αn r (d/e)n(r−1) ≤( √ 2πd(d/e)d)(1−α)n(r−1)/d · ( e α)αnr (d/e)n(r−1) = (2πd) 1−α 2αd · e d e α r r−1 αn(r−1) . (1) For C = r/ ln(r) we will show that if α ≥e(eC/d)1−1 r then above bound is less than 1, which implies side L has a node of degree 0, a contradiction. To this end, note that for this α we have e d e α r r−1 ≤1 C = ln(r) r , (2) and (2πd)(1−α)/(2αd) ≤(2πd)1/(2αd) ≤(2πd)1/(2eC1−1/rd1/r). Fact 3.6. For every constants γ, β > 0, the function f(d) = (γd)1/(βd1/r) is maximized at d = er/γ, and f(er/γ) = erγ1/r/βe. Plugging this above (and using r ≥2), we obtain (2πd)(1−α)/(2αd) ≤(2πd)1/(2eC1−1/rd1/r) ≤er(2πeC)1/r/(2Ce2) ≤eln(r) √ 2π·r1/r/(2e3/2) ≤√r, and plugging this with Equation (2) into Equation (1) yields D|R| |L| < 1, as required. 3.3 The irregular case Below we consider general (not necessarily regular) graphs with average degree d, and prove Theorem 1.3. In order to prove it, we first show a limitation on the multitasking capacity of graphs where the average degree of a graph is d, and the maximum degree is bounded by a parameter ∆. Theorem 3.7. Let G be a bipartite graph with n nodes on each side, average degree d, and maximum degree ∆. If G is an α-multitasker, then α < O(∆ 1 3 /d 2 3 ). A proof of Theorem 3.7 can be found in the full version of this paper [ACD+]. Note that Theorem 3.7 does not provide any nontrivial bounds on α when ∆exceeds d2. However, we use it to prove Theorem 1.3, which establishes nearly the same upper bound with no assumption on ∆. To do so we need the following lemma, which is also proved in the full version of this paper [ACD+]. Lemma 3.8. Every bipartite graph with 2n vertices and average degree d > 4 log n contains a subgraph in which the average degree is at least b = d 4 log n and the maximum degree is at most 2b. We can now prove Theorem 1.3. Proof of Theorem 1.3. By Lemma 3.8 G contains a subgraph with average degree b ≥d/(4 log n) and maximum degree at most 2b. The result thus follows from Theorem 3.7. As in the regular case, for smaller values of k we can obtain a bound of α = O(p n dk) for (k, α)multitaskers. See the full version of this paper [ACD+] for the precise details. When the graph is dense, we prove the following better upper bounds on α. 7 Theorem 3.9. Let G be a bipartite graph with n vertices on each side, and average degree d = Ω(n). If G is an α-multitasker, then α < O(( 1 n)1/2). Proof. By the result in [PRS95] (see Theorem 3) the graph G contains a d′-regular bipartite graph with d′ = Ω(n). The result thus follows from our upper bound for regular graphs as stated in Theorem 1.2. 3.4 A simple construction of a good multitasker We show that for small constants α, we may achieve a significant increase in k show existence of a (O(n/d1+4α), α)-multitaskers for any 0 < α < 1/5. Theorem 3.10. Fix d ∈N, and let n ∈N be sufficiently large. For a fixed 0 < α < 1/5, there exists a (k, α)-multitasker with n vertices on each side, average degree d, for all k ≤Ω(n/d1+4α). Proof. It is known (see, e.g., [FW16]) that for sufficiently large n, there exist an n-vertex graph G = (V, E) with average degree d such that every subgraph of G of size s ≤O(n/d1+4α) has average degree at most 1 2( 1 α −1). Define a bipartite graph H = (A ∪B, EH) such that A and B are two copies of V , and for a ∈A and b ∈B we have (a, b) ∈EH if and only if (a, b) ∈E. We get that the average degree of H is d, and for any two A′ ⊆A and B′ ⊆B such that |A′| = |B′| ≤s/2, the average degree of H[A′ ∪B′] is at most 1 α −1. Consider a matching M of size s/2 in H. By Lemma 2.1, if we contract all edges of the matching, we get a graph of average degree at most 2 α −1. By Lemma 2.2, such a graph contains an independent set of size at least 1 2α|M|, which corresponds to a large induced matching contained in M. This concludes the proof of the theorem. 4 Conclusions We have considered a new multitasking measure for parallel architectures that is aimed at providing quantitative measures of parallel processing capabilities of neural systems. We established an inherent tradeoff between the density of the network and its multitasking capacity that holds for every graph that is sufficiently dense. This tradeoff is rather general and it applies to regular graphs, to irregular graphs and to layered networks of depth greater than 2. We have also obtained quantitative insights. For example, we have provided evidence that interference increases as depth increases from 2 to r > 2, and demonstrated that irregular graphs allow for better multitasking than regular graphs for certain edge densities. Our findings are also related to recent efforts in cognitive neuroscience to pinpoint the reason for the limitations people experience in multiasking control demanding tasks. We have found that networks with pseudorandom properties (locally sparse, spectral expanders) have good multitasking capabilities. Interestingly, previous works have documented the benefits of random and pseudorandom architectures in deep learning, Hopfield networks and other settings [ABGM14, Val00, KP88]. Whether there is an underlying cause for these results remains an interesting direction for future research. Our work is limited in several aspects. First, our model is graph-theoretic in nature, focusing exclusively on the adjacency structure of tasks and does not consider many parameters that emerge in biological and artificial parallel architectures. Second, we do not address tasks of different weights (assuming all tasks have the same weights), stochastic and probabilistic interference (we assume interference occurs with probability 1) and the exact implementation of the functions that compute the tasks represented by edges. A promising avenue for future work will be to evaluate the predictive validity of α, that is, the ability to predict parallel processing performance of trained neural networks from corresponding measures of α. To summarize, the current work is directed towards laying the foundations for a deeper understanding of the factors that affect the tension between efficiency of representation, and flexibility of processing in neural network architectures. We hope that this will help inspire a parallel proliferation of efforts to further explore this area. 8 References [ABGM14] Sanjeev Arora, Aditya Bhaskara, Rong Ge, and Tengyu Ma. Provable bounds for learning some deep representations. In ICML, pages 584–592, 2014. [ACD+] Noga Alon, Jonathan D. Cohen, Biswadip Dey, Tom Griffiths, Sebastian Musslick, Kayhan Özcimder, Daniel Reichman, Igor Shinkar, and Tal Wagner. A graph-theoretic approach to multitasking (full version). Available at arXiv:1611.02400, 2017. [AGS85] Daniel J Amit, Hanoch Gutfreund, and Haim Sompolinsky. Storing infinite numbers of patterns in a spin-glass model of neural networks. Physical Review Letters, 55(14):1530, 1985. [AMS12] Noga Alon, Ankur Moitra, and Benny Sudakov. Nearly complete graphs decomposable into large induced matchings and their applications. In Proceedings of the Forty-Fourth annual ACM Symposium on Theory of Computing, pages 1079–1090, 2012. [BLM93] Yitzhak Birk, Nathan Linial, and Roy Meshulam. On the uniform-traffic capacity of single-hop interconnections employing shared directional multichannels. IEEE Transactions on Information Theory, 39(1):186–191, 1993. [Bre73] Lev M Bregman. Some properties of nonnegative matrices and their permanents. In Soviet Math. Dokl, volume 14, pages 945–949, 1973. [CK85] Imrich Chlamtac and Shay Kutten. On broadcasting in radio networks–problem analysis and protocol design. IEEE Transactions on Communications, 33(12):1240–1246, 1985. [Ego81] Gregory P. Egorychev. The solution of van der waerden’s problem for permanents. Advances in Mathematics, 42(3):299–305, 1981. [Fal81] Dmitry I Falikman. Proof of the van der waerden conjecture regarding the permanent of a doubly stochastic matrix. Mathematical Notes, 29(6):475–479, 1981. [FSGC14] Samuel F Feng, Michael Schwemmer, Samuel J Gershman, and Jonathan D Cohen. Multitasking versus multiplexing: Toward a normative account of limitations in the simultaneous execution of control-demanding behaviors. Cognitive, Affective, & Behavioral Neuroscience, 14(1):129–146, 2014. [FW16] Uriel Feige and Tal Wagner. Generalized girth problems in graphs and hypergraphs. Manuscript, 2016. [KP88] János Komlós and Ramamohan Paturi. Convergence results in an associative memory model. Neural Networks, 1(3):239–250, 1988. [KPR+17] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka GrabskaBarwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, pages 3521–3526, 2017. [MC89] Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. Psychology of learning and motivation, 24:109–165, 1989. [MDO+16] Sebastian Musslick, Biswadip Dey, Kayhan Ozcimder, Mostofa Patwary, Ted L Willke, and Jonathan D Cohen. Controlled vs. Automatic Processing: A Graph-Theoretic Approach to the Analysis of Serial vs. Parallel Processing in Neural Network Architectures. In Proceedings of the 38th Annual Meeting of the Cognitive Science Society (CogSci), pages 1547–1552, 2016. [MSÖ+17] Sebastian Musslick, Andrew Saxe, Kayhan Özcimder, Biswadip Dey, Greg Henselman, and Jonathan D. Cohen. Multitasking capability versus learning efficiency in neural network architectures. In 39th Cognitive Science Society Conference, London, 2017. [Nei67] Ulrich Neisser. Cognitive psychology. Appleton-Century-Crofts, New York, 1967. 9 [PRS95] László Pyber, Vojtech Rödl, and Endre Szemerédi. Dense graphs without 3-regular subgraphs. Journal of Combinatorial Theory, Series B, 63(1):41–54, 1995. [Pyb85] Laszlo Pyber. Regular subgraphs of dense graphs. Combinatorica, 5(4):347–349, 1985. [RMG+86] David E Rumelhart, James L McClelland, PDP Research Group, et al. Parallel distributed processing: Explorations in the microstructure of cognition, vol. 1-2. MIT Press, MA, 1986. [Sch98] Alexander Schrijver. Counting 1-factors in regular bipartite graphs. Journal of Combinatorial Theory, Series B, 72(1):122–135, 1998. [SS77] Walter Schneider and Richard M Shiffrin. Controlled and automatic human information processing: I. Detection, search, and attention. Psychological Review, 84(1):1–66, 1977. [Val00] Leslie G Valiant. Circuits of the Mind. Oxford University Press, 2000. 10 | 2017 | 523 |
7,034 | Adversarial Surrogate Losses for Ordinal Regression Rizal Fathony Mohammad Bashiri Brian D. Ziebart Department of Computer Science University of Illinois at Chicago Chicago, IL 60607 {rfatho2, mbashi4, bziebart}@uic.edu Abstract Ordinal regression seeks class label predictions when the penalty incurred for mistakes increases according to an ordering over the labels. The absolute error is a canonical example. Many existing methods for this task reduce to binary classification problems and employ surrogate losses, such as the hinge loss. We instead derive uniquely defined surrogate ordinal regression loss functions by seeking the predictor that is robust to the worst-case approximations of training data labels, subject to matching certain provided training data statistics. We demonstrate the advantages of our approach over other surrogate losses based on hinge loss approximations using UCI ordinal prediction tasks. 1 Introduction For many classification tasks, the discrete class labels being predicted have an inherent order (e.g., poor, fair, good, very good, and excellent labels). Confusing two classes that are distant from one another (e.g., poor instead of excellent) is more detrimental than confusing two classes that are nearby. The absolute error, |ˆy −y| between label prediction (ˆy ∈Y) and actual label (y ∈Y) is a canonical ordinal regression loss function. The ordinal regression task seeks class label predictions for new datapoints that minimize losses of this kind. Many prevalent methods reduce the ordinal regression task to subtasks solved using existing supervised learning techniques. Some view the task from the regression perspective and learn both a linear regression function and a set of thresholds that define class boundaries [1–5]. Other methods take a classification perspective and use tools from cost-sensitive classification [6–8]. However, since the absolute error of a predictor on training data is typically a non-convex (and non-continuous) function of the predictor’s parameters for each of these formulations, surrogate losses that approximate the absolute error must be optimized instead. Under both perspectives, surrogate losses for ordinal regression are constructed by transforming the surrogate losses for binary zero-one loss problems—such as the hinge loss, the logistic loss, and the exponential loss—to take into account the different penalties of the ordinal regression problem. Empirical evaluations have compared the appropriateness of different surrogate losses, but these still leave the possibility of undiscovered surrogates that align better with the ordinal regression loss. To address these limitations, we seek the most robust [9] ordinal regression predictions by focusing on the following adversarial formulation of the ordinal regression task: what predictor best minimizes absolute error in the worst case given partial knowledge of the conditional label distribution? We answer this question by considering the Nash equilibrium for a game defined by combining the loss function with Lagrangian potential functions [10]. We derive a surrogate loss function for empirical risk minimization that realizes this same adversarial predictor. We show that different types of available knowledge about the conditional label distribution lead to thresholded regression-based predictions or classification-based predictions. In both cases, the surrogate loss is novel compared to existing surrogate losses. We also show that our surrogate losses enjoy Fisher consistency, a desirable 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. theoretical property guaranteeing that minimizing the surrogate loss produces Bayes optimal decisions for the original loss in the limit. We develop two different approaches for optimizing the loss: a stochastic optimization of the primal objective and a quadratic program formulation of the dual objective. The second approach enables us to efficiently employ the kernel trick to provide a richer feature representation without an overly burdensome time complexity. We demonstrate the benefits of our adversarial formulation over previous ordinal regression methods based on hinge loss for a range of prediction tasks using UCI datasets. 2 Background and Related Work 2.1 Ordinal Regression Problems Table 1: Ordinal regression loss matrix. 0 1 2 3 1 0 1 2 2 1 0 1 3 2 1 0 Ordinal regression is a discrete label prediction problem characterized by an ordered penalty for making mistakes: loss(ˆy1, y) < loss(ˆy2, y) if y < ˆy1 < ˆy2 or y > ˆy1 > ˆy2. Though many loss functions possess this property, the absolute error |ˆy −y| is the most widely studied. We similarly restrict our consideration to this loss function in this paper. The full loss matrix L for absolute error with four labels is shown in Table 1. The expected loss incurred using a probabilistic predictor ˆP(ˆy|x) evaluated on true data distribution P(x, y) is: EX,Y ∼P ; ˆY |X∼ˆ P [L ˆY ,Y ] = P x,y,ˆy P(x, y) ˆP(ˆy|x)Lˆy,y. The supervised learning objective for this problem setting is to construct a probabilistic predictor ˆP(ˆy|x) in a way that minimizes this expected loss using training samples distributed according to the empirical distribution ˜P(x, y), which are drawn from the unknown true data generating distribution, P(x, y). A naïve ordinal regression approach relaxes the task to a continuous prediction problem, minimizes the least absolute deviation [11], and then rounds predictions to nearest integral label [12]. More sophisticated methods range from using a cumulative link model [13] that assumes the cumulative conditional probability P(Y ≤j|x) follows a link function, to Bayesian non-parametric approaches [14] and many others [15–22]. We narrow our focus over this broad range of methods found in the related work to those that can be viewed as empirical risk minimization methods with piece-wise convex surrogates, which are more closely related to our approach. 2.2 Threshold Methods for Ordinal Regression Threshold methods are one popular family of techniques that treat the ordinal response variable, ˆf ≜w · x, as a continuous real-valued variable and introduce |Y| −1 thresholds θ1, θ2, ..., θ|Y|−1 that partition the real line into |Y| segments: θ0 = −∞< θ1 < θ2 < ... < θ|Y|−1 < θ|Y| = ∞ [4]. Each segment corresponds to a label with ˆyi assigned label j if θj−1 < ˆf ≤θj. There are two different approaches for constructing surrogate losses based on the threshold methods to optimize the choice of w and θ1, . . . , θ|Y|−1: one is based on penalizing all thresholds involved when a mistake is made and one is based on only penalizing the most immediate thresholds. All thresholds methods penalize every erroneous threshold using a surrogate loss, δ, for sets of binary classification problems: lossAT( ˆf, y) = Py−1 k=1 δ(−(θk −ˆf)) + P|Y| k=y δ(θk −ˆf). Shashua and Levin [1] studied the hinge loss under the name of support vector machines with a sum-of margin strategy, while Chu and Keerthi [2] proposed a similar approach under the name of support vector ordinal regression with implicit constraints (SVORIM). Lin and Li [3] proposed ordinal regression boosting, an all thresholds method using the exponential loss as a surrogate. Finally, Rennie and Srebro [4] proposed a unifying approach for all threshold methods under a variety of surrogate losses. Rather than penalizing all erroneous thresholds when an error is made, immediate thresholds methods only penalize the threshold of the true label and the threshold immediately beneath the true label: lossIT( ˆf, y) = δ(−(θy−1 −ˆf))+δ(θy −ˆf).1 Similar to the all thresholds methods, immediate threshold methods have also been studied in the literature under different names. For hinge loss surrogates, Shashua and Levin [1] called the model support vector with fixed-margin strategy while Chu and Keerthi [2] use the term support vector ordinal regression with explicit constraints (SVOREX). For 1For the boundary labels, the method defines δ(−(θ0 −ˆf)) = δ(θy+1 −ˆf) = 0. 2 the exponential loss, Lin and Li [3] introduced ordinal regression boosting with left-right margins. Rennie and Srebro [4] also proposed a unifying framework for immediate threshold methods. 2.3 Reduction Framework from Ordinal Regression to Binary Classification Li and Lin [5] proposed a reduction framework to convert ordinal regression problems to binary classification problems by extending training examples. For each training sample (x, y), the reduction framework creates |Y| −1 extended samples (x(j), y(j)) and assigns weight wy,j to each extended sample. The binary label associated with the extended sample is equivalent to the answer of the question: “is the rank of x greater than j?” The reduction framework allows a choice for how extended samples x(j) are constructed from original samples x and how to perform binary classification. If the threshold method is used to construct the extended sample and SVM is used as the binary classification algorithm, the classifier can be obtained by solving a family of quadratic optimization problems that includes SVORIM and SVOREX as special instances. 2.4 Cost-sensitive Classification Methods for Ordinal Regression Rather than using thresholding or the reduction framework, ordinal regression can also be cast as a special case of cost-sensitive multiclass classification. Two of the most popular classification-based ordinal regression techniques are extensions of one-versus-one (OVO) and one-versus-all (OVA) costsensitive classification [6, 7]. Both algorithms leverage a transformation that converts a cost-sensitive classification problem to a set of weighted binary classification problems. Rather than reducing to binary classification, Tu and Lin [8] reduce cost-sensitive classification to one-sided regression (OSR), which can be viewed as an extension of the one-versus-all (OVA) technique. 2.5 Adversarial Prediction Foundational results establish a duality between adversarial logarithmic loss minimization and constrained maximization of the entropy [23]. This takes the form of a zero-sum game between a predictor seeking to minimize expected logarithmic loss and an adversary seeking to maximize this same loss. Additionally, the adversary is constrained to choose a distribution that matches certain sample statistics. Ultimately, through the duality to maximum entropy, this is equivalent to maximum likelihood estimation of probability distributions that are members of the exponential family [23]. Grünwald and Dawid [9] emphasize this formulation as a justification for the principle of maximum entropy [24] and generalize the adversarial formulation to other loss functions. Extensions to multivariate performance measures [25] and non-IID settings [26] have demonstrated the versatility of this perspective. Recent analysis [27, 28] has shown that for the special case of zero-one loss classification, this adversarial formulation is equivalent to empirical risk minimization with a surrogate loss function: AL0-1 f (xi, yi) = max S⊆{1,...,|Y|},S̸=∅ X j∈S (ψj,yi(xi) + |S| −1)/|S|, (1) where ψj,yi(xi) is the potential difference ψj,yi(xi) = fj(xi)−fyi(xi). This surrogate loss function provides a key theoretical advantage compared to the Crammer-Singer hinge loss surrogate for multiclass classification [29]: it guarantees Fisher consistency [27] while Crammer-Singer—despite its popularity in many applications, such as Structured SVM [30, 31]—does not [32, 33]. We extend this type of analysis to the ordinal regression setting with the absolute error as the loss function in this paper, producing novel surrogate loss functions that provide better predictions than other convex, piece-wise linear surrogates. 3 Adversarial Ordinal Regression 3.1 Formulation as a zero-sum game We seek the ordinal regression predictor that is the most robust to uncertainty given partial knowledge of the evaluating distribution’s characteristics. This takes the form of a zero-sum game between a predictor player choosing a predicted label distribution ˆP(ˆy|x) that minimizes loss and an adversarial 3 player choosing an evaluation distribution ˇP(ˇy|x) that maximizes loss while closely matching the feature-based statistics of the training data: min ˆ P (ˆy|x) max ˇ P (ˇy|x) EX∼P ; ˆY |X∼ˆ P ; ˇY |X∼ˇ P h ˆY −ˇY i such that: EX∼P ; ˇY |X∼ˇ P [φ(X, ˇY )] = ˜φ. (2) The vector of feature moments, ˜φ = EX,Y ∼˜ P [φ(X, Y )], is measured from sample training data distributed according to the empirical distribution ˜P(x, y). An ordinal regression problem can be viewed as a cost-sensitive loss with the entries of the cost matrix defined by the absolute loss between the row and column labels (an example of the cost matrix for the case of a problem with four labels is shown in Table 1). Following the construction of adversarial prediction games for cost-sensitive classification [10], the optimization of Eq. (2) reduces to minimizing the equilibrium game values of a new set of zero-sum games characterized by matrix L′ xi,w: min w X i zero-sum game z }| { max ˇpxi min ˆpxi ˆpT xiL′ xi,wˇpxi | {z } convex optimization of w ; L′ xi,w= f1 −fyi · · · f|Y| −fyi + |Y| −1 f1 −fyi + 1 · · · f|Y| −fyi + |Y| −2 ... ... ... f1 −fyi + |Y| −1 · · · f|Y| −fyi , (3) where: w represents a vector of Lagrangian model parameters; fj = w · φ(xi, j) is a Lagrangian potential; ˆpxi is a vector representation of the conditional label distribution, ˆP( ˆY = j|xi), i.e., ˆpxi = [ ˆP( ˆY = 1|xi) ˆP( ˆY = 2|xi) . . .]T; and ˇpxi is similarly defined. The matrix L′ xi,w = (|ˆy −ˇy|+fˇy −fyi) is a zero-sum game matrix for each example. This optimization problem (Eq. (3)) is convex in w and the inner zero-sum game can be solved using a linear program [10]. To address finite sample estimation errors, the difference between expected and sample feature can be bounded in Eq. (2), ||EX∼P ; ˇY |X∼ˇ P [φ(X, ˇY )] −˜φ|| ≤ϵ, leading to Lagrangian parameter regularization in Eq. (3) [34]. 3.2 Feature representations We consider two feature representations corresponding to different training data summaries: φth(x, y) = yx I(y ≤1) I(y ≤2) ... I(y ≤|Y| −1) ; and φmc(x, y) = I(y = 1)x I(y = 2)x I(y = 3)x ... I(y = |Y|)x . (4) Figure 1: Example where multiple weight vectors are useful. The first, which we call the thresholded regression representation, has size m+|Y|−1, where m is the dimension of our input space. It induces a single shared vector of feature weights and a set of thresholds. If we denote the weight vector associated with the yx term as w and the terms associated with each sum of class indicator functions as θ1, θ2, . . ., θ|Y|−1, then thresholds for switching between class j and j + 1 (ignoring other classes) occur when w · xi = θj. The second feature representation, φmc, which we call the multiclass representation, has size m|Y| and can be equivalently interpreted as inducing a set of class-specific feature weights, fj = wj·xi. This feature representation is useful when ordered labels cannot be thresholded according to any single direction in the input space, as shown in the example dataset of Figure 1. 4 3.3 Adversarial Loss from the Nash Equilibrium We now present the main technical contribution of our paper: a surrogate loss function that, when minimized, produces a solution to the adversarial ordinal regression problem of Eq. (3).2 Theorem 1. An adversarial ordinal regression predictor is obtained by choosing parameters w that minimize the empirical risk of the surrogate loss function: ALord w (xi, yi) = max j,l∈{1,...,|Y|} fj + fl + j −l 2 −fyi = max j fj + j 2 + max l fl −l 2 −fyi, (5) where fj = w · φ(xi, j) for all j ∈{1, . . . , |Y|}. Proof sketch. Let j∗, l∗be the solution of argmaxj,l∈{1,...,|Y|} fj+fl+j−l 2 , we show that the Nash equilibrium value of a game matrix that contains only row j∗and l∗and column j∗and l∗from matrix L′ xi,w is exactly fj∗,+fl∗+j∗−l∗ 2 . We then show that adding other rows and columns in L′ xi,w to the game matrix does not change the game value. Given the resulting closed form solution of the game (instead of a minimax), we can recast the adversarial framework for ordinal regression as an empirical risk minimization with the proposed loss. We note that the ALord w surrogate is the maximization over pairs of different potential functions associated with each class (including pairs of identical class labels) added to the distance between the pair. For both of our feature representations, we make use of the fact that maximization over each element of the pair can be independently realized, as shown on the right-hand side of Eq. (5). Thresholded regression surrogate loss In the thresholded regression feature representation, the parameter contains a single shared vector of feature weights w and |Y| −1 terms θk associated with thresholds. Following Eq. (5), the adversarial ordinal regression surrogate loss for this feature representation can be written as: ALord-th(xi, yi) = max j j(w · xi + 1) + P k≥j θk 2 + max l l(w · xi −1) + P k≥l θk 2 −yiw · xi − X k≥yi θk. (6) Figure 2: Surrogate loss calculation for datapoint xi (projected to w · xi) with a label prediction of 4 for predictive purposes, the surrogate loss is instead obtained using potentials for the classes based on w·xi+1 (label 5) and w · xi −1 (label 2) averaged together. This loss has a straight-forward interpretation in terms of the thresholded regression perspective, as shown in Figure 2: it is based on averaging the thresholded label predictions for potentials w · xi + 1 and w · xi −1. This penalization of the pair of thresholds differs from the thresholded surrogate losses of related work, which either penalize all violated thresholds or penalize only the thresholds adjacent to the actual class label. Using a binary search procedure over θ1, . . . , θ|Y|−1, the largest lower bounding threshold for each of these potentials can be obtained in O(log |Y|) time. Multiclass ordinal surrogate loss In the multiclass feature representation, we have a set of specific feature weights wj for each label and the adversarial multiclass ordinal surrogate loss can be written as: ALord-mc(xi, yi) = max j,l∈{1,...,|Y|} wj · xi + wl · xi + j −l 2 −wyi · xi. (7) 2The detailed proof of this theorem and others are contained in the supplementary materials. Proof sketches are presented in the main paper. 5 (a) (b) (c) Figure 3: Loss function contour plots of ALord over the space of potential differences ψj ≜fj −fyi for the prediction task with three classes when the true label is yi = 1 (a), yi = 2 (b), and yi = 3 (c). We can also view this as the maximization over |Y|(|Y| + 1)/2 linear hyperplanes. For an ordinal regression problem with three classes, the loss has six facets with different shapes for each true label value, as shown in Figure 3. In contrast with ALord-th, the class label potentials for ALord-mc may differ from one another in more-or-less arbitrary ways. Thus, searching for the maximal j and l class labels requires O(|Y|) time. 3.4 Consistency Properties The behavior of a prediction method in ideal learning settings—i.e., trained on the true evaluation distribution and given an arbitrarily rich feature representation, or, equivalently, considering the space of all measurable functions—provides a useful theoretical validation. Fisher consistency requires that the prediction model yields the Bayes optimal decision boundary [32, 33, 35] in this setting. Given the true label conditional probability Pj(x) ≜P(Y = j|x), a surrogate loss function δ is said to be Fisher consistent with respect to the loss ℓif the minimizer f ∗of the surrogate loss achieves the Bayes optimal risk, i.e.,: f ∗= argmin f EY |X∼P [δf(X, Y )|X = x] (8) ⇒EY |X∼P [ℓf ∗(X, Y )|X = x] = min f EY |X∼P [ℓf(X, Y )|X = x] . Ramaswamy and Agarwal [36] provide a necessary and sufficient condition for a surrogate loss to be Fisher consistent with respect to general multiclass losses, which includes ordinal regression losses. A recent analysis by Pedregosa et al. [35] shows that the all thresholds and the immediate thresholds methods are Fisher consistent provided that the base binary surrogates losses they use are convex with a negative derivative at zero. For our proposed approach, the condition for Fisher consistency above is equivalent to: f ∗= argmin f X y Py max j,l fj + fl + j −l 2 −fy ⇒argmax j f ∗ j (x) ⊆argmin j X y Py |j −y| . (9) Since adding a constant to all fj does not change the value of both ALord f and argmaxj fj(x), we employ the constraint maxj fj(x) = 0, to remove redundant solutions for the consistency analysis. We establish an important property of the minimizer for ALord f in the following theorem. Theorem 2. The minimizer vector f ∗of EY |X∼P ALord f (X, Y )|X = x satisfies the loss reflective property, i.e., it complements the absolute error by starting with a negative integer value, then increasing by one until reaching zero, and then incrementally decreases again. Proof sketch. We show that for any f 0 that does not satisfy the loss reflective property, we can construct f 1 using several steps that satisfy the loss reflective property and has the expected loss value less than the expected loss of f 0. 6 Example vectors f ∗that satisfy Theorem 2 are [0, −1, −2]T, [−1, 0, −1]T and [−2, −1, 0]T for three-class problems, and [−3, −2, −1, 0, −1] for five-class problems. Using the key property of the minimizer above, we establish the consistency of our loss functions in the following theorem. Theorem 3. The adversarial ordinal regression surrogate loss ALord from Eq. (5) is Fisher consistent. Proof sketch. We only consider |Y| possible values of f that satisfy the loss reflective property. For the f that corresponds to class j, the value of the expected loss is equal to the Bayes loss if we predict j as the label. Therefore minimizing over f that satisfy the loss reflective property is equivalent to finding the Bayes optimal response. 3.5 Optimization 3.5.1 Primal Optimization To optimize the regularized adversarial ordinal regression loss from the primal, we employ stochastic average gradient (SAG) methods [37, 38], which have been shown to converge faster than standard stochastic gradient optimization. The idea of SAG is to use the gradient of each example from the last iteration where it was selected to take a step. However, the naïve implementation of SAG requires storing the gradient of each sample, which may be expensive in terms of the memory requirements. Fortunately, for our loss ALord w , we can drastically reduce this memory requirement by just storing a pair of number, (j∗, l∗) = argmaxj,l∈{1,...,|Y|} fj+fl+j−l 2 , rather than storing the gradient for each sample. Appendix C explains the details of this technique. 3.5.2 Dual Optimization Dual optimization is often preferred when optimizing piecewise linear losses, such as the hinge loss, since it enables one to easily perform the kernel trick and obtain a non-linear decision boundary without heavily sacrificing computational efficiency. Optimizing the regularized adversarial ordinal regression loss in the dual can be performed by solving the following quadratic optimization: max α,β X i,j j(αi,j −βi,j) −1 2 X i,j,k,l (αi,j + βi,j) (αk,l + βk,l) (φ(xi, j) −φ(xi, yi)) · (φ(xk, l) −φ(xl, yk)) subject to: αi,j ≥0; βi,j ≥0; X j αi,j = C 2 ; X j βi,j = C 2 ; i, k ∈{1, . . . , n}; j, l ∈{1, . . . , |Y|}. (10) Note that our dual formulation only depends on the dot product of the features. Therefore, we can also easily apply the kernel trick to our algorithm. Appendix D describes the derivation from the primal optimization to the dual optimization above. 4 Experiments 4.1 Experiment Setup Table 2: Dataset properties. Dataset #class #train #test #features diabetes 5 30 13 2 pyrimidines 5 51 23 27 triazines 5 130 56 60 wisconsin 5 135 59 32 machinecpu 10 146 63 6 autompg 10 274 118 7 boston 5 354 152 13 stocks 5 665 285 9 abalone 10 2923 1254 10 bank 10 5734 2458 8 computer 10 5734 2458 21 calhousing 10 14447 6193 8 We conduct our experiments on a benchmark dataset for ordinal regression [14], evaluate the performance using mean absolute error (MAE), and perform statistical tests on the results of different hinge loss surrogate methods. The benchmark contains datasets taken from the UCI Machine Learning repository [39] ranging from relatively small to relatively large in size. The characteristics of the datasets, including the number of classes, the training set size, the testing set size, and the number of features, are described in Table 2. In the experiment, we consider different methods using the original feature space and a kernelized feature space using the Gaussian radial basis function kernel. The methods that we compare include two variations of our approach, the threshold based (ALord-th), and the multiclass-based (ALord-mc). 7 Table 3: The average of the mean absolute error (MAE) for each model. Bold numbers in each case indicate that the result is the best or not significantly worse than the best (paired t-test with α = 0.05). Dataset Threshold-based models Multiclass-based models ALord-th REDth AT IT ALord-mc REDmc CSOSR CSOVO CSOVA diabetes 0.696 0.715 0.731 0.827 0.629 0.700 0.715 0.738 0.762 pyrimidines 0.654 0.678 0.615 0.626 0.509 0.565 0.520 0.576 0.526 triazines 0.607 0.683 0.649 0.654 0.670 0.673 0.677 0.738 0.732 wisconsin 1.077 1.067 1.097 1.175 1.136 1.141 1.208 1.275 1.338 machinecpu 0.449 0.456 0.458 0.467 0.518 0.515 0.646 0.602 0.702 autompg 0.551 0.550 0.550 0.617 0.599 0.602 0.741 0.598 0.731 boston 0.316 0.304 0.306 0.298 0.311 0.311 0.353 0.294 0.363 stocks 0.324 0.317 0.315 0.324 0.168 0.175 0.204 0.147 0.213 abalone 0.551 0.547 0.546 0.571 0.521 0.520 0.545 0.558 0.556 bank 0.461 0.460 0.461 0.461 0.445 0.446 0.732 0.448 0.989 computer 0.640 0.635 0.633 0.683 0.625 0.624 0.889 0.649 1.055 calhousing 1.190 1.183 1.182 1.225 1.164 1.144 1.237 1.202 1.601 average 0.626 0.633 0.629 0.661 0.613 0.618 0.706 0.652 0.797 # bold 5 5 4 2 5 5 2 2 1 The baselines we use for the threshold-based models include a SVM-based reduction framework algorithm (REDth) [5], an all threshold method with hinge loss (AT) [1, 2], and an immediate threshold method with hinge loss (IT) [1, 2]. For the multiclass-based models, we compare our method with an SVM-based reduction algorithm using multiclass features (REDmc) [5], with cost-sensitive one-sided support vector regression (CSOSR) [8], with cost-sensitive one-versus-one SVM (CSOVO) [7], and with cost-sensitive one-versus-all SVM (CSOVA) [6]. For our Gaussian kernel experiment, we compare our threshold based model (ALord-th) with SVORIM and SVOREX [2]. In our experiments, we first make 20 random splits of each dataset into training and testing sets. We performed two stages of five-fold cross validation on the first split training set for tuning each model’s regularization constant λ. In the first stage, the possible values for λ are 2−i, i = {1, 3, 5, 7, 9, 11, 13}. Using the best λ in the first stage, we set the possible values for λ in the second stage as 2 i 2 λ0, i = {−3, −2, −1, 0, 1, 2, 3}, where λ0 is the best parameter obtained in the first stage. Using the selected parameter from the second stage, we train each model on the 20 training sets and evaluate the MAE performance on the corresponding testing set. We then perform a statistical test to find whether the performance of a model is different with statistical significance from other models. We perform the Gaussian kernel experiment similarly with model parameter C equals to 2i, i = {0, 3, 6, 9, 12} and kernel parameter γ equals to 2i, i = {−12, −9, −6, −3, 0} in the first stage. In the second stage, we set C equals to 2iC0, i = {−2, −1, 0, 1, 2} and γ equals to 2iγ0, i = {−2, −1, 0, 1, 2}, where C0 and γ0 are the best parameters obtained in the first stage. 4.2 Results We report the mean absolute error (MAE) averaged over the dataset splits as shown in Table 3 and Table 4. We highlight the result that is either the best or not worse than the best with statistical significance (under paired t-test with α = 0.05) in boldface font. We also provide the summary for each model in terms of the averaged MAE over all datasets and the number of datasets for which each model marked with boldface font in the bottom of the table. As we can see from Table 3, in the experiment with the original feature space, threshold-based models perform well on relatively small datasets, whereas multiclass-based models perform well on relatively large datasets. A possible explanation for this result is that multiclass-based models have more flexibility in creating decision boundaries, hence they perform better if the training data size is sufficient. However, since multiclass-based models have many more parameters than threshold-based models (m|Y| parameters rather than m + |Y| −1 parameters), multiclass methods may need more data, and hence, may not perform well on relatively small datasets. In the threshold-based models comparison, ALord-th, REDth, and AT perform competitively on relatively small datasets like triazines, wisconsin, machinecpu, and autompg. ALord-th has a 8 slight advantage over REDth on the overall accuracy, and a slight advantage over AT on the number of “indistinguishably best” performance on all datasets. We can also see that AT is superior to IT in the experiments under the original feature space. Table 4: The average of MAE for models with Gaussian kernel. Dataset ALord-th SVORIM SVOREX diabetes 0.696 0.665 0688 pyrimidines 0.478 0.539 0.550 triazines 0.609 0.612 0.604 wisconsin 1.090 1.113 1.049 machinecpu 0.452 0.652 0.628 autompg 0.529 0.589 0.593 boston 0.278 0.324 0.316 stocks 0.103 0.099 0.100 average 0.531 0.574 0.566 # bold 7 3 4 Among the multiclass-based models, ALord-mc and REDmc perform competitively on datasets like abalone, bank, and computer, with a slight advantage of ALord-mc model on the overall accuracy. In general, the cost-sensitive models perform poorly compared with ALord-mc and REDmc. A notable exception is the CSOVO model which perform very well on the stocks and the boston datasets. In the Gaussian kernel experiment, we can see from Table 4 that the kernelized version of ALord-th performs significantly better than the threshold-based models SVORIM and SVOREX in terms of both the overall accuracy and the number of “indistinguishably best” performance on all datasets. We also note that immediate-threshold-based model (SVOREX) performs better than all-threshold-based model (SVORIM) in our experiment using Gaussian kernel. We can conclude that our proposed adversarial losses for ordinal regression perform competitively compared to the state-of-the-art ordinal regression models using both original feature spaces and kernel feature spaces with a significant performance improvement in the Gaussian kernel experiments. 5 Conclusion and Future Work In this paper, we have proposed a novel surrogate loss for ordinal regression, a classification problem where the discrete class labels have an inherent order and penalty for making mistakes based on that order. We focused on the absolute loss, which is the most widely used ordinal regression loss. In contrast with existing methods, which typically reduce ordinal regression to binary classification problems and then employ surrogates for the binary zero-one loss, we derive a unique surrogate ordinal regression loss by seeking the predictor that is robust to a worst case constrained approximation of the training data. We derived two versions of the loss based on two different feature representation approaches: thresholded regression and multiclass representations. We demonstrated the benefit of our approach on a benchmark of datasets for ordinal regression tasks. Our approach performs competitively compared to the state-of-the-art surrogate losses based on hinge loss. We also demonstrated cases when the multiclass feature representations works better than thresholded regression representation, and vice-versa, in our experiments. Our future work will investigate less prevalent ordinal regression losses, such as the discrete quadratic loss and arbitrary losses that have v-shaped penalties. Furthermore, we plan to investigate the characteristics required of discrete ordinal losses for their optimization to have a compact analytical solution. In terms of applications, one possible direction of future work is to combine our approach with deep neural network models to perform end-to-end representation learning for ordinal regression applications like age estimation and rating prediction. In that setting, our proposed loss can be used in the last layer of a deep neural network to serve as the gradient source for the backpropagation algorithm. Acknowledgments This research was supported as part of the Future of Life Institute (futureoflife.org) FLI-RFP-AI1 program, grant#2016-158710 and by NSF grant RI-#1526379. 9 References [1] Amnon Shashua and Anat Levin. Ranking with large margin principle: Two approaches. In Advances in Neural Information Processing Systems 15, pages 961–968. MIT Press, 2003. [2] Wei Chu and S Sathiya Keerthi. New approaches to support vector ordinal regression. In Proceedings of the 22nd international conference on Machine learning, pages 145–152. ACM, 2005. [3] Hsuan-Tien Lin and Ling Li. Large-margin thresholded ensembles for ordinal regression: Theory and practice. In International Conference on Algorithmic Learning Theory, pages 319–333. Springer, 2006. [4] Jason D. M. Rennie and Nathan Srebro. Loss functions for preference levels: Regression with discrete ordered labels. In Proceedings of the IJCAI Multidisciplinary Workshop on Advances in Preference Handling, pages 180–186, 2005. [5] Ling Li and Hsuan-Tien Lin. Ordinal regression by extended binary classification. Advances in neural information processing systems, 19:865, 2007. [6] Hsuan-Tien Lin. From ordinal ranking to binary classification. PhD thesis, California Institute of Technology, 2008. [7] Hsuan-Tien Lin. Reduction from cost-sensitive multiclass classification to one-versus-one binary classification. In Proceedings of the Sixth Asian Conference on Machine Learning, pages 371–386, 2014. [8] Han-Hsing Tu and Hsuan-Tien Lin. One-sided support vector regression for multiclass costsensitive classification. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 1095–1102, 2010. [9] Peter D. Grünwald and A. Phillip Dawid. Game theory, maximum entropy, minimum discrepancy, and robust Bayesian decision theory. Annals of Statistics, 32:1367–1433, 2004. [10] Kaiser Asif, Wei Xing, Sima Behpour, and Brian D. Ziebart. Adversarial cost-sensitive classification. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2015. [11] Subhash C Narula and John F Wellington. The minimum sum of absolute errors regression: A state of the art survey. International Statistical Review/Revue Internationale de Statistique, pages 317–326, 1982. [12] Koby Crammer and Yoram Singer. Pranking with ranking. In Advances in Neural Information Processing Systems 14, 2001. [13] Peter McCullagh. Regression models for ordinal data. Journal of the royal statistical society. Series B (Methodological), pages 109–142, 1980. [14] Wei Chu and Zoubin Ghahramani. Gaussian processes for ordinal regression. Journal of Machine Learning Research, 6(Jul):1019–1041, 2005. [15] Krzysztof Dembczy´nski, Wojciech Kotłowski, and Roman Słowi´nski. Ordinal classification with decision rules. In International Workshop on Mining Complex Data, pages 169–181. Springer, 2007. [16] Mark J Mathieson. Ordinal models for neural networks. Neural networks in financial engineering, pages 523–536, 1996. [17] Shipeng Yu, Kai Yu, Volker Tresp, and Hans-Peter Kriegel. Collaborative ordinal regression. In Proceedings of the 23rd international conference on Machine learning, pages 1089–1096. ACM, 2006. [18] Jianlin Cheng, Zheng Wang, and Gianluca Pollastri. A neural network approach to ordinal regression. In Neural Networks, 2008. IJCNN 2008.(IEEE World Congress on Computational Intelligence). IEEE International Joint Conference on, pages 1279–1284. IEEE, 2008. [19] Wan-Yu Deng, Qing-Hua Zheng, Shiguo Lian, Lin Chen, and Xin Wang. Ordinal extreme learning machine. Neurocomputing, 74(1):447–456, 2010. 10 [20] Bing-Yu Sun, Jiuyong Li, Desheng Dash Wu, Xiao-Ming Zhang, and Wen-Bo Li. Kernel discriminant learning for ordinal regression. IEEE Transactions on Knowledge and Data Engineering, 22(6):906–910, 2010. [21] Jaime S Cardoso and Joaquim F Costa. Learning to classify ordinal data: The data replication method. Journal of Machine Learning Research, 8(Jul):1393–1429, 2007. [22] Yang Liu, Yan Liu, and Keith CC Chan. Ordinal regression via manifold learning. In Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence, pages 398–403. AAAI Press, 2011. [23] Flemming Topsøe. Information theoretical optimization techniques. Kybernetika, 15(1):8–27, 1979. [24] Edwin T Jaynes. Information theory and statistical mechanics. Physical review, 106(4):620–630, 1957. [25] Hong Wang, Wei Xing, Kaiser Asif, and Brian Ziebart. Adversarial prediction games for multivariate losses. In Advances in Neural Information Processing Systems, pages 2710–2718, 2015. [26] Anqi Liu and Brian Ziebart. Robust classification under sample selection bias. In Advances in Neural Information Processing Systems, pages 37–45, 2014. [27] Rizal Fathony, Anqi Liu, Kaiser Asif, and Brian Ziebart. Adversarial multiclass classification: A risk minimization perspective. In Advances in Neural Information Processing Systems 29, pages 559–567. 2016. [28] Farzan Farnia and David Tse. A minimax approach to supervised learning. In Advances in Neural Information Processing Systems, pages 4233–4241. 2016. [29] Koby Crammer and Yoram Singer. On the algorithmic implementation of multiclass kernelbased vector machines. The Journal of Machine Learning Research, 2:265–292, 2002. [30] Ioannis Tsochantaridis, Thorsten Joachims, Thomas Hofmann, and Yasemin Altun. Large margin methods for structured and interdependent output variables. In JMLR, pages 1453–1484, 2005. [31] Thorsten Joachims. A support vector method for multivariate performance measures. In Proceedings of the International Conference on Machine Learning, pages 377–384, 2005. [32] Ambuj Tewari and Peter L Bartlett. On the consistency of multiclass classification methods. The Journal of Machine Learning Research, 8:1007–1025, 2007. [33] Yufeng Liu. Fisher consistency of multicategory support vector machines. In International Conference on Artificial Intelligence and Statistics, pages 291–298, 2007. [34] Miroslav Dudík and Robert E Schapire. Maximum entropy distribution estimation with generalized regularization. In International Conference on Computational Learning Theory, pages 123–138. Springer, 2006. [35] Fabian Pedregosa, Francis Bach, and Alexandre Gramfort. On the consistency of ordinal regression methods. Journal of Machine Learning Research, 18(55):1–35, 2017. [36] Harish G Ramaswamy and Shivani Agarwal. Classification calibration dimension for general multiclass losses. In Advances in Neural Information Processing Systems, pages 2078–2086, 2012. [37] Mark Schmidt, Nicolas Le Roux, and Francis Bach. Minimizing finite sums with the stochastic average gradient. Mathematical Programming, pages 1–30, 2013. [38] Mark Schmidt, Reza Babanezhad, Aaron Defazio, Ann Clifton, and Anoop Sarkar. Non-uniform stochastic average gradient method for training conditional random fields. 2015. [39] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ ml. 11 | 2017 | 524 |
7,035 | Self-Supervised Intrinsic Image Decomposition Michael Janner MIT janner@mit.edu Jiajun Wu MIT jiajunwu@mit.edu Tejas D. Kulkarni DeepMind tejasdkulkarni@gmail.com Ilker Yildirim MIT ilkery@mit.edu Joshua B. Tenenbaum MIT jbt@mit.edu Abstract Intrinsic decomposition from a single image is a highly challenging task, due to its inherent ambiguity and the scarcity of training data. In contrast to traditional fully supervised learning approaches, in this paper we propose learning intrinsic image decomposition by explaining the input image. Our model, the Rendered Intrinsics Network (RIN), joins together an image decomposition pipeline, which predicts reflectance, shape, and lighting conditions given a single image, with a recombination function, a learned shading model used to recompose the original input based off of intrinsic image predictions. Our network can then use unsupervised reconstruction error as an additional signal to improve its intermediate representations. This allows large-scale unlabeled data to be useful during training, and also enables transferring learned knowledge to images of unseen object categories, lighting conditions, and shapes. Extensive experiments demonstrate that our method performs well on both intrinsic image decomposition and knowledge transfer. 1 Introduction There has been remarkable progress in computer vision, particularly for answering questions such as “what is where?” given raw images. This progress has been possible due to large labeled training sets and representation learning techniques such as convolutional neural networks [LeCun et al., 2015]. However, the general problem of visual scene understanding will require algorithms that extract not only object identities and locations, but also their shape, reflectance, and interactions with light. Intuitively disentangling the contributions from these three components, or intrinsic images, is a major triumph of human vision and perception. Conferring this type of intuition to an algorithm, though, has proven a difficult task, constituting a major open problem in computer vision. This problem is challenging in particular because it is fundamentally underconstrained. Consider the porcelain vase in Figure 1a. Most individuals would have no difficulty identifying the true colors and shape of the vase, along with estimating the lighting conditions and the resultant shading on the object, as those shown in 1b. However, the alternatives in 1c, which posits a flat shape, and 1d, with unnatural red lighting, are entirely consistent in that they compose to form the correct observed vase in 1a. The task of finding appropriate intrinsic images for an object is then not a question of simply finding a valid answer, as there are countless factorizations that would be equivalent in terms of their rendered combination, but rather of finding the most probable answer. Roughly speaking, there are two methods of tackling such a problem: a model must either (1) employ handcrafted priors on the reflectance, shape, and lighting conditions found in the natural world in order to assign probabilities 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. a b c d e d Figure 1: A porcelain vase (a) along with three predictions (b-d) for its underlying intrinsic images. The set in (c) assumes the contribution from shading is negligible by predicting a completely flat rather than rounded shape. The reflectance is therefore indistinguishable from the observed image. The set in (d) includes the correct shape but assumes red lighting and a much brighter blue color in the regions affected by shading. While the decomposition in (b) is much more inuitively pleasing than either of these alternatives, all of these options are valid in that they combine to exactly form the observed vase. (e) shows a sphere with our visualized normals map as a shape reference. to intrinsic image proposals or (2) have access to a library of ground truth intrinsic images and their corresponding composite images. Unfortunately, there are limitations to both methods. Although there has been success with the first route in the past [Barron and Malik, 2015], strong priors are often difficult to hand-tune in a generally useful fashion. On the other hand, requiring access to complete, high quality ground truth intrinsic images for real world scenes is also limiting, as creating such a training set requires an enormous amount of human effort and millions of crowd-sourced annotations [Bell et al., 2014]. In this paper, we propose a deep structured autoencoder, the Rendered Instrinsics Network (RIN), that disentangles intrinsic image representations and uses them to reconstruct the input. The decomposition model consists of a shared convolutional encoder for the observation and three separate decoders for the reflectance, shape, and lighting. The shape and lighting predictions are used to train a differentiable shading function. The output of the shader is combined with the reflectance prediction to reproduce the observation. The minimal structure imposed in the model – namely, that intrinsic images provide a natural way of disentangling real images and that they provide enough information to be used as input to a graphics engine – makes RIN act as an autoencoder with useful intermediate representations. The structure of RIN also exploits two natural sources of supervision: one applied to the intermediate representations themselves, and the other to the reconstructed image. This provides a way for RIN to improve its representations with unlabeled data. By avoiding the need for intrinsic image labels for all images in the dataset, RIN can adapt to new types of inputs even in the absence of ground truth data. We demonstrate the utility of this approach in three transfer experiments. RIN is first trained on a simple set of five geometric primitives in a supervised manner and then transferred to common computer vision test objects. Next, RIN is trained on a dataset with a skewed underlying lighting distribution and fills in the missing lighting conditions on the basis of unlabeled observations. Finally, RIN is trained on a single Shapenet category and then transferred to a separate, highly dissimilar category. Our contributions are three-fold. First, we propose a novel formulation for intrinsic image decomposition, incorporating a differentiable, unsupervised reconstruction loss into the loop. Second, we instantiate this approach with the RIN, a new model that uses convolutional neural networks for both intrinsic image prediction and recombination via a learned shading function. This is also the first work to apply deep learning to the full decomposition into reflectance, shape, lights, and shading, as prior work has focused on the reflectance-shading decomposition. Finally, we show that RIN can make use of unlabeled data to improve its intermediate intrinsic image representations and transfer knowledge to new objects unseen during training. 2 Figure 2: RIN contains two convolutional encoder-decoders, one used for predicting the intrinsic images from an input and another for predicting the shading stemming from a light source applied on a shape. The two networks together function as a larger structured autoencoder, forcing a specific type of intermediate representation in order to reconstruct the input image. 2 Related Work Intrinsic images were introduced by Barrow and Tenenbaum as useful mid-level scene descriptors [Barrow and Tenenbaum, 1978]. The model posits that an image can be expressed as the pointwise product between contributions from the true colors of an object, or its reflectance, and contributions from the shading on that object: image I = reflectance R · shading S (1) Decomposing one step further, the shading is expressed as some function of an object’s shape and the ambient lighting conditions. The exact nature of this shading function varies by implementation. Early work on intrinsic image decomposition was based on insights from Land’s Retinex Theory [Land and McCann, 1971]. Horn [1974] separated images into true colors and shading using the assumption that large image gradients tend to correspond to reflectance changes and small gradients to lighting changes. While this assumption works well for a hypothetical Mondrian World of flat colors, it does not always hold for natural images. In particular, Weiss [2001] found that this model of reflectance and lighting is rarely true for outdoor scenes. More recently, Barron and Malik [2015] developed an iterative algorithm called SIRFS that maximizes the likelihood of intrinsic image proposals under priors derived from regularities in natural images. SIRFS proposes shape and lighting estimates and combines them via a spherical harmonics renderer to produce a shading image. Lombardi and Nishino [2012, 2016] and Oxholm and Nishino [2016] proposed a Bayesian formulation of such an optimization procedure, also formulating priors based on the distribution of material properties and the physics of lighting in the real world. Researchers have also explored reconstructing full 3D shapes through intrinsic images by making use of richer generative models [Kar et al., 2015, Wu et al., 2017]. Tang et al. [2012] combined Lambertian reflectance assumptions with Deep Belief Networks to learn a prior over the reflectance of greyscale images and applied their Deep Lambertian Network to one-shot face recognition. Narihira et al. [2015b] applied deep learning to intrinsic images first using human judgments on real images and later in the context of animated movie frames [Narihira et al., 2015a]. Rematas et al. [2016] and Hold-Geoffroy et al. [2017] also used convolutional neural networks to estimate reflectance maps and illumination parameters, respectively, in unconstrained outdoor settings. Innamorati et al. [2017] generalized the intrinsic image decomposition by considering the contributions of specularity and occlusion in a direction-dependent model. Shi et al. [2017] found improved performance in the full decomposition by incorporating skip layer connections [He et al., 2016] in the network architecture, which were used to generate much crisper images. Our work can be seen 3 Inputs Shader Outputs Inputs Shader Outputs Figure 3: In contrast to simple Lambertian shading techniques, our learned shading model can handle shadows cast between objects. Inputs to the shader are shape and lighting parameter pairs. as a further extension of these models which aims to relax the need for a complete set of ground truth data by modeling the image combination process, as in Nalbach et al. [2017]. Incorporating a domain-specific decoder to reconstruct input images has been explored by Hinton et al. in their transforming autoencoders [Hinton et al., 2011], which also learned natural representations of images in use by the vision community. Our work differs in the type of representation in question, namely images rather than descriptors like affine transformations or positions. Kulkarni et al. [2015] were also interested in learning disentangled representations in an autoencoder, which they achieved by selective gradient updates during training. Similarly, Chen et al. [2016] showed that a mutual information objective could drive disentanglement of a deep network’s intermediate representation. 3 Model 3.1 Use of Reconstruction RIN differs most strongly with past work in its use of the reconstructed input. Other approaches have fallen into roughly two groups in this regard: 1. Those that solve for one of the intrinsic images to match the observed image. SIRFS, for example, predicts shading and then solves equation 1 for reflectance given its prediction and the input [Barron and Malik, 2015]. This ensures that the intrinsic image estimations combine to form exactly the observed image, but also deprives the model of any reconstruction error. 2. Data-driven techniques that rely solely on ground truth labelings [Narihira et al., 2015a, Shi et al., 2017]. These approaches assume access to ground truth labels for all inputs and do not explicitly model the reconstruction of the input image based on intrinsic image predictions. Making use of the reconstruction for this task has been previously unexplored because such an error signal can be difficult to interpret. Just as the erroneous intrinsic images in Fig 1c-d combine to reconstruct the input exactly, one cannot assume that low reconstruction error implies accurate intrinsic images. An even simpler degenerate solution that yields zero reconstruction error is: ˆR = I and ˆS = 11T , (2) where ˆS is the all-ones matrix. It is necessary to further constrain the predictions such that the model does not converge to such explanations. 3.2 Shading Engine RIN decomposes an observation into reflectance, shape, and lighting conditions. As opposed to models which estimate only reflectance and shading, which may make direct use of Equation 1 to generate a reconstruction, we must employ a function that transforms our shape and lighting predictions into a shading estimate. Linear Lambertian assumptions could reduce such a function to a straightforward dot product, but would produce a shading function incapable of modeling lighting conditions that drastically change across an image or ray-tracing for the purposes of casting shadows. 4 a b c Inputs Shader Outputs Inputs Shader Outputs a Inputs Figure 4: Our shading model’s outputs after training only on synthetic car models from the ShapeNet dataset [Chang et al., 2015]. (a) shows the effect of panning the light horizontally and (b) shows the effect of changing the intensity of the light. The input lights are visualized by rendering them onto a sphere. Even though the shader was trained only on synthetic data, it generalizes well to real shapes with no further training. The shape input to (c) is an estimated normals map of a Beethoven bust [Qu´eau and Durou, 2015]. Instead, we opt to learn a shading model. Such a model is not limited in the way that a pre-defined shading function would be, as evidenced by shadows cast between objects in Fig 3. Learning a shader also has the benefit of allowing for different representations of lighting conditions. In our experiments, lights are defined by a position in three-dimensional space and a magnitude, but alternate representations such as the radius, orientation, and color of a spotlight could be just as easily adopted. For work that employs the shading engine from SIRFS [Barron and Malik, 2015] instead of learning a shader in a similar disentanglement context, see Shu et al. [2017]. The SIRFS engine represents lights as spherical harmonics coefficient vectors. 3.3 Architecture Our model consists of two convolutional encoder-decoder networks, the first of which predicts intrinsic images from an observed image, and the second of which approximates the shading process of a rendering engine. Both networks employ mirror-link connections introduced by Shi et al. [2017], which connect layers of the encoder and decoder of the same size. These connections yield sharper results than the blurred outputs characteristic of many deconvolutional models. The first network has a single encoder for the observation and three separate decoders for the reflectance, lighting, and shape. Unlike Shi et al. [2017], we do not link layers between the decoders so that it is possible to update the weights of one of the decoders without substantially affecting the others, as is useful in the transfer learning experiments. The encoder has 5 convolutional layers with {16, 32, 64, 128, 256} filters of size 3×3 and stride of 2. Batch normalization [Ioffe and Szegedy, 2015] and ReLU activation are applied after every convolutional layer. The layers in the reflectance and shape decoders have the same number of features as the encoder but in reverse order plus a final layer with 3 output channels. Spatial upsampling is applied after the convolutional layers in the decoders. The lighting decoder is a simple linear layer with an output dimension of four (corresponding to a position in three-dimensional space and an intensity of the light). The shape is passed as input to the shading encoder directly. The lighting estimate is passed to a fully-connected layer with output dimensionality matching that of the shading encoder’s output, which is concatenated to the encoded shading representation. The shading decoder architecture is the same as that of the first network. The final component of RIN, with no learnable parameters, is a componentwise multiplication between the output of the shading network and the predicted reflectance. 5 Reference RIN SIRFS Reference RIN SIRFS Render Reflectance Shape Shading Lights Render Reflectance Shape Shading Lights Figure 5: Intrinsic image prediction from our model on objects from the training category (motorbikes) as well as an example from outside this category (an airplane). The quality of the airplane intrinsic images is significantly lower, which is reflected in the reconstruction (labeled ”Render” in the RIN rows). This allows reconstruction to drive the improvement of the intermediate intrinsic image representations. Predictions from SIRFS are shown for comparison. Note that the reflectance in SIRFS is defined based on the difference between the observation and shading prediction, so there is not an analogous reconstruction. Motorbike (Train) Airplane (Transfer) Reflectance Shape Lights Reflectance Shape Lights RIN 0.0021 0.0044 0.1398 0.0042 0.0119 0.4873 SIRFS 0.0059 0.0094 – 0.0054 0.0080 – Table 1: MSE of our model and SIRFS on a test set of ShapeNet motorbikes, the category used to train RIN, and airplanes, a held-out class. The lighting representation of SIRFS (a vector with 27 components) is sufficiently different from that of our model that we do not attempt to compare performance here directly. Instead, see the visualization of lights in Fig 5. 4 Experiments RIN makes use of unlabeled data by comparing its reconstruction to the original input image. Because our shading model is fully differentiable, as opposed to most shaders that involve ray-tracing, the reconstruction error may be backpropagated to the intrinsic image predictions and optimized via a standard coordinate ascent algorithm. RIN has one shared encoder for the intrinsic images but three separate decoders, so the appropriate decoder can be updated while the others are held fixed. In the following experiments, we first train RIN (including the shading model) on a dataset with ground truth labels for intrinsic images. This is treated as a standard supervised learning problem using mean squared error on the intrinsic image predictions as a loss. The model is then trained further on an additional set of unlabeled data using only reconstruction loss as an error signal. We refer to this as the self-supervised transfer. For both modes of learning, we optimize using Adam [Kingma and Ba, 2015]. During transfer, one half of a minibatch will consist of the unlabeled transfer data the other half will come from the labeled data. This ensures that the representations do not shift too far from those learned during the initial supervised phase, as the underconstrained nature of the problem can drive 6 Train Shapes Test Shapes Reference RIN: Direct transfer RIN: Self-supervised SIRFS Input Figure 6: Predictions of RIN before (”Direct transfer”) and after (”Self-supervised”) it adapts to new shapes on the basis of unlabeled data. Stanford Bunny Utah Teapot Blender Suzanne Shape Shading Shape Shading Shape Shading Direct transfer 0.074 0.071 0.036 0.043 0.086 0.104 Self-supervised 0.048 0.005 0.029 0.003 0.058 0.007 Table 2: MSE of RIN trained on five geometric primitives before and after self-supervised learning of more complicated shapes. the model to degenerate solutions. When evaluating our model on test data, we use the outputs of the three decoders and the learned shader directly; we do not enforce that the predictions must explain the input exactly. Below, we demonstrate that our model can effectively transfer to different shapes, lighting conditions, and object categories without ground truth intrinsic images. However, for this unsupervised transfer to yield benefits, there must be a sufficient number of examples of the new, unlabeled data. For example, the MIT Intrinsic Images dataset [Grosse et al., 2009], containing twenty real-world images, is not large enough for the unsupervised learning to affect the representations of our model. In the absence of any unsupervised training, our model is similar to that of Shi et al. [2017] adapted to predict the full set of intrinsic images. 4.1 Supervised training Data The majority of data was generated from ShapeNet [Chang et al., 2015] objects rendered in Blender. For the labeled datasets, the rendered composite images were accompanied by the object’s reflectance, a map of the surface normals at each point, and the parameters of the lamp used to light the scene. Surface normals are visualized by mapping the XYZ components of normals to appropriate RGB ranges. For the following supervised learning experiments, we used a dataset size of 40,000 images. Intrinsic image decomposition The model in Fig 5 was trained on ShapeNet motorbikes. Although it accurately predicts the intrinsic images of the train class, its performance drops when tested on other classes. In particular, the shape predictions suffer the most, as they are the most dissimilar from anything seen in the training set. Crucially, the poor intrinsic image predictions are reflected in the reconstruction of the input image. This motivates the use of reconstruction error to drive improvement of intrinsic images when there is no ground truth data. Shading model In contrast with the intrinsic image decomposition, shading prediction generalized well outside of the training set. The shader was trained on the shapes and lights from the same set of rendered synthetic cars as above. Even though this represents only a narrow distribution over 7 Input / Reference RIN: Direct transfer RIN: Self-supervised Render Lights Input / Reference RIN: Direct transfer RIN: Self-supervised Figure 7: Predictions of RIN trained on left-lit images before and after self-supervised learning on right-lit images. RIN uncovers the updated lighting distribution without external supervision or ground truth data. shapes, we found that the shader produced plausible predictions for even real-world objects (Fig 4). Because the shader generalized without any further effort, its parameters were never updated during self-supervised training. Freezing the parameters of the shader prevents our model from producing nonsensical shading images. 4.2 Shape transfer Data We generated a dataset of five shape primitives (cubes, spheres, cones, cylinders, and toruses) viewed at random orientations using the Blender rendering engine. These images are used for supervised training. Three common reference shapes (Stanford bunny, Utah teapot, and Blender’s Suzanne) are used as the unlabeled transfer class. To isolate the effects of shape mismatch in the labeled versus unlabeled data, all eight shapes were rendered with random monochromatic materials and a uniform distribution over lighting positions within a contained region of space in front of the object. The datasets consisted of each shape rendered with 500 different colors, with each colored shape being viewed at 10 orientations. Results By only updating weights for the shape decoder during self-supervised transfer, the predictions for held-out shapes improves by 29% (averaged across the three shapes). Because a shape only affects a rendered image via shading, the improvement in shapes comes alongside an improvement in shading predictions as well. Shape-specific results are given in Table 2 and visualized in Fig 6. 4.3 Lighting transfer Data Cars from the ShapeNet 3D model repository were rendered at random orientations and scales. In the labeled data, they were lit only from the left side. In the unlabeled data, they were lit from both the left and right. Results Before self-supervised training on the unlabeled data, the model’s distribution over lighting predictions mirrored that of the labeled training set. When tested on images lit from the right, then, it tended to predict centered lighting. After updating the lighting decoder based on reconstruction error from these right-lit images though, the model’s lighting predictions more accurately reflected the new distribution and lighting mean-squared error reduces by 18%. Lighting predictions, along with reconstructions, for right-lit images are shown in Fig 7. 4.4 Category transfer In the previous transfer experiments, only one intrinsic image was mismatched between the labeled and unlabeled data, so only one of RIN’s decoders needed updating during transfer. When transferring between object categories, though, there is not such a guarantee. Although it might be expected that a model trained on sufficiently many object categories would learn a generally-useful distribution over reflectances, it is difficult to ensure that this is the case. We are interested in these sorts of 8 Input / Reference RIN: Direct transfer RIN: Self-supervised Render Reflectance Shading Input / Reference RIN: Direct transfer RIN: Self-supervised Figure 8: RIN was first trained on ShapeNet airplanes and then tested on cars. Because most of the airplanes were white, the reflectance predictions were washed out even for colorful cars. RIN fixed the mismatch between datasets without any ground truth intrinsic images of cars. Reflectance Shape Lights Shading Render Direct transfer 0.019 0.014 0.584 0.065 0.035 Self-supervised 0.015 0.014 0.572 0.044 0.006 Table 3: MSE of RIN trained on ShapeNet airplanes before and after self-supervised transfer to cars. Although RIN improves its shading predictions, these are not necessarily driven by an improvement in shape prediction. scenarios to determine how well self-supervised transfer works when more than one decoder needs to be updated to account for unlabeled data. Data Datasets of ShapeNet cars and airplanes were created analogously to those in Section 4.1. The airplanes had a completely different color distribution than the cars as they were mostly white, whereas the cars had a more varied reflectance distribution. The airplanes were used as the labeled category to ensure a mismatch between the train and transfer data. Results To transfer to the new category, we allowed updates to all three of the RIN decoders. (The shader was left fixed as usual.) There were pronounced improvements in the shading predictions (32%) accompanied by modest improvements in reflectances (21%). The shading predictions were not always caused by improved shape estimates. Because there is a many-to-one mapping from shape to shading (conditioned on a lighting condition), it is possible for the shape predictions to worsen in order to improve the shading estimates. The lighting predictions also remained largely unchanged, although for the opposite reason: because no lighting region were intentionally left out of the training data, the lighting predictions were adequate on the transfer classes even without self-supervised learning. 5 Conclusion In this paper, we proposed the Rendered Intrinsics Network for intrinsic image prediction. We showed that by learning both the image decomposition and recombination functions, RIN can make use of reconstruction loss to improve its intermediate representations. This allowed unlabeled data to be used during training, which we demonstrated with a variety of transfer tasks driven solely by self-supervision. When there existed a mismatch between the underlying intrinsic images of the labeled and unlabeled data, RIN could also adapt its predictions in order to better explain the unlabeled examples. 9 Acknowledgements This work is supported by ONR MURI N00014-16-1-2007, the Center for Brain, Minds and Machines (NSF #1231216), Toyota Research Institute, and Samsung. References Jonathan T Barron and Jitendra Malik. Shape, illumination, and reflectance from shading. IEEE TPAMI, 37 (8):1670–1687, 2015. H.G. Barrow and J.M. Tenenbaum. Recovering intrinsic scene characteristics from images. Computer Vision Systems, 1978. Sean Bell, Kavita Bala, and Noah Snavely. Intrinsic images in the wild. ACM TOG, 33(4):159, 2014. Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. Xi Chen, Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In NIPS, 2016. Roger Grosse, Micah K. Johnson, Edward H. Adelson, and William T. Freeman. Ground-truth dataset and baseline evaluations for intrinsic image algorithms. In ICCV, 2009. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. Geoffrey E Hinton, Alex Krizhevsky, and Sida D Wang. Transforming auto-encoders. In ICANN, 2011. Yannick Hold-Geoffroy, Kalyan Sunkavalli, Sunil Hadap, Emiliano Gambaretto, and Jean-Francois Lalonde. Deep outdoor illumination estimation. In CVPR, 2017. Berthold K.P. Horn. Determining lightness from an image. Computer Graphics and Image Processing, 3: 277–299, 1974. Carlo Innamorati, Tobias Ritschel, Tim Weyrich, and Niloy J. Mitra. Decomposing single images for layered photo retouching. Computer Graphics Forum, 36:15–25, 07 2017. Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. Abhishek Kar, Shubham Tulsiani, Joao Carreira, and Jitendra Malik. Category-specific object reconstruction from a single image. In CVPR, 2015. Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In NIPS, 2015. Edwin H. Land and John J. McCann. Lightness and retinex theory. Journal of the Optical Society of America, 61:1–11, 1971. Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. Stephen Lombardi and Ko Nishino. Single image multimaterial estimation. In CVPR, 2012. Stephen Lombardi and Ko Nishino. Reflectance and illumination recovery in the wild. IEEE TPAMI, 38(1): 129–141, 2016. Oliver Nalbach, Elena Arabadzhiyska, Dushyant Mehta, Hans-Peter Seidel, and Tobias Ritschel. Deep shading: Convolutional neural networks for screen-space shading. Computer Graphics Forum, 36(4), 2017. Takuya Narihira, Michael Maire, and Stella X. Yu. Direct intrinsics: Learning albedo-shading decomposition by convolutional regression. In ICCV, 2015a. Takuya Narihira, Michael Maire, and Stella X. Yu. Learning lightness from human judgement on relative reflectance. In CVPR, 2015b. 10 Geoffrey Oxholm and Ko Nishino. Shape and reflectance estimation in the wild. IEEE TPAMI, 38(2):376–389, 2016. Yvain Qu´eau and Jean-Denis Durou. Edge-preserving integration of a normal field: Weighted least-squares, tv and L1 approaches. In International Conference on Scale Space and Variational Methods in Computer Vision, 2015. Konstantinos Rematas, Tobias Ritschel, Mario Fritz, Efstratios Gavves, and Tinne Tuytelaars. Deep reflectance maps. In CVPR, June 2016. Jian Shi, Yue Dong, Hao Su, and Stella X. Yu. Learning non-lambertian object intrinsics across shapenet categories. In CVPR, 2017. Zhixin Shu, Ersin Yumer, Sunil Hadap, Kalyan Sunkavalli, Eli Shechtman, and Dimitris Samaras. Neural face editing with intrinsic image disentangling. In CVPR, July 2017. Yichuan Tang, Ruslan Salakhutdinov, and Geoffrey Hinton. Deep lambertian networks. In ICML, 2012. Yair Weiss. Deriving intrinsic images from image sequences. In ICCV, 2001. Jiajun Wu, Yifan Wang, Tianfan Xue, Xingyuan Sun, William T Freeman, and Joshua B Tenenbaum. Marrnet: 3d shape reconstruction via 2.5d sketches. In NIPS, 2017. 11 | 2017 | 525 |
7,036 | On-the-fly Operation Batching in Dynamic Computation Graphs Graham Neubig⇤ Language Technologies Institute Carnegie Mellon University gneubig@cs.cmu.edu Yoav Goldberg⇤ Computer Science Department Bar-Ilan University yogo@cs.biu.ac.il Chris Dyer DeepMind cdyer@google.com Abstract Dynamic neural network toolkits such as PyTorch, DyNet, and Chainer offer more flexibility for implementing models that cope with data of varying dimensions and structure, relative to toolkits that operate on statically declared computations (e.g., TensorFlow, CNTK, and Theano). However, existing toolkits—both static and dynamic—require that the developer organize the computations into the batches necessary for exploiting high-performance algorithms and hardware. This batching task is generally difficult, but it becomes a major hurdle as architectures become complex. In this paper, we present an algorithm, and its implementation in the DyNet toolkit, for automatically batching operations. Developers simply write minibatch computations as aggregations of single instance computations, and the batching algorithm seamlessly executes them, on the fly, using computationally efficient batched operations. On a variety of tasks, we obtain throughput similar to that obtained with manual batches, as well as comparable speedups over singleinstance learning on architectures that are impractical to batch manually.2 1 Introduction Modern CPUs and GPUs evaluate batches of arithmetic operations significantly faster than the sequential evaluation of the same operations. For example, performing elementwise operations takes nearly the same amount of time on the GPU whether operating on tens or on thousands of elements, and multiplying a few hundred different vectors by the same matrix is significantly slower than executing a single (equivalent) matrix–matrix product using an optimized GEMM implementation on either a GPU or a CPU. Thus, careful grouping of operations into batches that can execute efficiently in parallel is crucial for making the most of available hardware resources. Today, developers who write code to train neural networks are responsible for crafting most of this batch handling by hand. In some cases this is easy: when inputs and outputs are naturally represented as fixed sized tensors (e.g., images of a fixed size such those in the MNIST and CIFAR datasets, or regression problems on fixed sized vector inputs), and the computations required to process each instance are instance-invariant and expressible as standard operations on tensors (e.g., a series of matrix multiplications, convolutions, and elementwise nonlinearities), a suitably flexible tensor library ⇤Authors contributed equally. 2The proposed algorithm is implemented in DyNet (http://dynet.io/), and can be activated by using the “--dynet-autobatch 1” command line flag. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. RNN RNN RNN RNN RNN RNN RNN RNN RNN L RNN RNN RNN RNN L L(1) L(2) L(3) L1 L2 L3 L4 padding x(1) 1 x(2) 1 x(3) 1 y(1) y(2) y(3) x(2) 2 x(1) 2 x(1) 3 x(1) 4 x(3) 2 x(3) 3 batches Y Y Y Y X1 X2 X3 X4 m4 m3 m2 m1 masks Figure 1: Two computation graphs for computing the loss on a minibatch of three training instances consisting of a sequence of input vectors paired with a fixed sized output vector. On the left is a “conceptual” computation graph which shows the operations associated with computing the losses individually for each sequence and then aggregating them. The same computation is executed by the right-hand (“batched”) computation graph: it aggregates the inputs in order to make better use of modern processors. This comes with a price in complexity—the variable length of the sequences requires padding and masking operations. Our aim is for the user to specify the conceptual computation on the left, and let the framework take care of its efficient execution. that provides efficient implementations of higher-order generalizations of low-order operations makes manual batching straightforward. For example, by adding a leading or trailing dimension to the tensors representing inputs and outputs, multiple instances can be straightforwardly represented in a single data structure. In other words: in this scenario, the developer conceives of and writes code for the computation on an individual instance, packs several instances into a tensor as a “minibatch”, and the library handles executing these efficiently in parallel. Unfortunately, this idealized scenario breaks when working with more complex architectures. Deep learning is increasingly being applied to problems whose inputs, outputs and intermediate representations do not fit easily into fixed sized tensors. For example, images vary in size and sequences in length; data may be structured as trees [29] or graphs [4, 17, 27], or the model may select its own computation conditional on the input [16, 28, 33]. In all these cases, while the desired computation is easy enough to write for a single instance, organizing the computational operations so that they make optimally efficient use of the hardware is nontrivial. Indeed, many papers that operate on data structures more complicated than sequences have avoided batching entirely [8, 15, 25]. In fact, until last year [7, 20], all published work on recursive (i.e., tree-structured) neural networks appears to have used single instance training. The premise of this work is that operation batching should not be the responsibility of the user, but instead should be a service provided by the framework. The user should only be responsible for specifying a large enough computation so that batching is possible (i.e, summing the losses of several instances, such as one sees in the left side of Figure 1), and the framework should take care of the lower-level details of operation batching, much like optimizing compilers or JIT optimizers in interpreted languages do.3 We take a large step towards this goal by introducing an efficient algorithm—and a corresponding implementation—for automatic batching in dynamically declared computation graphs.4 Our method relies on separating the graph construction from its execution, using operator overloading and lazy 3 This is in contrast to other existing options for automatic batching such as TensorFlow Fold, which require the user to learn an additional domain-specific language to turn computation into a format conducive to automatic batching [19]. 4Computation graphs (often represented in a form called a Wengert list) are the data structures used to structure the evaluation of expressions and use reverse mode automatic differentiation to compute their derivatives [3]. Broadly, learning frameworks use two strategies to construct these: static and dynamic. In static toolkits (e.g., Theano [6], Tensorflow [1]) the computation graph is defined once and compiled, and then examples are fed into the same graph. In contrast, dynamic toolkits (e.g., DyNet [21], Chainer [32], PyTorch [http://pytorch.org]) construct the computation graph for each training instance (or minibatch) as the forward computation is executed. While dynamic declaration means that each minibatch can have its own computational architecture, the user is still responsible for batching operations themselves. 2 evaluation (§2). Once this separation is in place, we propose a fast batching heuristic that can be performed in real time, for each training instance (or minibatch), between the graph construction and its execution (§3). We extend the DyNet toolkit [21] with this capability. From the end-user’s perspective, the result is a simple mechanism for exploiting efficient data-parallel algorithms in networks that would be cumbersome to batch by hand. The user simply defines the computation independently for each instance in the batch (using standard Python or C++ language constructs), and the framework takes care of the rest. Experiments show that our algorithm compares favorably to manually batched code, that significant speed improvements are possible on architectures with no straightforward manual batching design, and that we obtain better performance than TensorFlow Fold [19], an alternative framework built to simulate dynamic graph definition and automatic batching on top of TensorFlow (§4). 2 Batching: Conception vs. Efficient Implementation To illustrate the challenges with batching, consider the problem of predicting a real-valued vector conditional on a sequence of input vectors (this example is chosen for its simplicity; experiments are conducted on more standard tasks). We assume that an input sequence of vectors is read sequentially by an RNN, and then the final state is used to make a prediction; the training loss is the Euclidean distance between the prediction and target. We compare two algorithms for computing this code: a naïve, but developer-friendly one (whose computation graph is shown in the left part of Figure 1), which reflects how one conceives of what a batch loss computation is; and a computationally efficient— but more conceptually complex—version that batches up the computations so they are executed in parallel across the sequences (the right part of Figure 1). Naïve (developer-friendly) batched implementation The left part of Figure 1 shows the computations that must be executed to compute the losses associated with three (b = 3) training instances, implemented naïvely. Pseudo-code for constructing the graph for each of the RNNs on the left using a dynamic declaration framework is as follows: function RNN-REGRESSION-LOSS(x1:n, y; (W, U, b, c) = ✓) h0 = 0 . Initial state of the RNN; ht 2 Rd. for t 2 1, 2, . . . , n do ht = tanh(W[ht−1; xt] + b) ˆy = Uhn + c L = ||ˆy −y||2 2 return L Note that the code does not compute any value, but constructs a symbolic graph describing the computation. This can then be integrated into a batched training procedure: function TRAIN-BATCH-NAIVE(T = {(x(i) 1:n(i), y(i))}b i=1; ✓) NEW-GRAPH() for i 2 1, 2, . . . , b do . Naïvely loop over elements of batch. L(i) = RNN-REGRESSION-LOSS(x(i) 1:n(i), y(i); ✓) . Single instance loss. L = P i L(i) . Aggregate losses for all elements in batch. FORWARD(L) @L @✓= BACKWARD(L) ✓= ✓−⌘@L @✓ This code is simple to understand, uses basic flow control present in any programming language and simple mathematical operations. Unfortunately, executing it will generally be quite inefficient, since in the resulting computation graph each operation is performed sequentially without exploiting the fact that similar operations are being performed across the training instances. Efficient manually batched implementation To make good use of efficient data-parallel algorithms and hardware, it is necessary to batch up the operations so that the sequences are processed in parallel. The standard way to achieve this is by aggregating the inputs and outputs, altering the code as follows: 3 function RNN-REGRESSION-BATCH-LOSS(X1:nmax, Y, n(1:b); (W, U, b, c) = ✓) M = 0 . Build loss mask; M 2 Rb⇥nmax. for i 2 1, 2, . . . , b do M[i,n(i)] = 1 . Position where the final symbol in sequence i occurs. H0 = 0 . Initial states of the RNN (one per instance); Ht 2 Rd⇥b. for t 2 1, 2, . . . , nmax do Ht = tanh(W[Ht−1; Xt] + b) . Addition broadcasts b over columns. ˆYt = UHt + c . Addition broadcasts c over columns. Lt = ||( ˆYt −Y)(mt1>)||2 F . Compute masked losses (mt is the tth column of M). L = P t Lt return L function TRAIN-BATCH-MANUAL(T = {(x(i) 1:n(i), y(i))}b i=1; ✓) nmax = maxi n(i) for t 2 1, 2, . . . , nmax do . Build sequence of batch input matrices. Xt = 0 2 Rd⇥b for i 2 1, 2, . . . , b do Xt,[·,i] = x(i) t if t n(i) otherwise 0 . The ith column of Xt. Y = [y(1) y(2) · · · y(b)] . Build batch of output targets. NEW-GRAPH() . Now that inputs are constructed, create graph, evaluate loss and gradient. L = RNN-REGRESSION-BATCH-LOSS(X1:nmax, Y, n(1:b); ✓) FORWARD(L) @L @✓= BACKWARD(L) ✓= ✓−⌘@L @✓ This code computes the same value as the naïve implementation, it does so more efficiently, and it is significantly more complicated. Because the sequences processed by RNNs will generally be of different lengths (which is precisely why RNNs are useful!), it is necessary to pad the input representation with dummy values, and also to mask out the resulting losses at the right times. While these techniques are part of the inventory of skills that a good ML engineer has, they increase the difficulty of implementation and probability that bugs will be present in the code. Implementation comparison The naïve algorithm has two advantages over manual batching. First, it is easy to implement: the way we conceive of a model is the way it is implemented, and errors with padding, masking, and batching are avoided. Second, the naïve algorithm aggregates any single instance loss, whereas manual batching efforts are generally problem specific. For these reasons, one should strongly prefer the first algorithm; however, for efficiency reasons, batching matters. In the next section we turn to the problem of how to efficiently execute naïve computation graphs so that they can take advantage of efficient batched implementations of operations. This provides the best of both worlds to developers: code is easy to write, but execution is fast. 3 An Algorithm for On-the-fly Batching Manual batching, discussed in the previous section, mostly operates by aggregating input instances and feeding them through a network. In RNNs, this means aggregating inputs that share a time step. This often require padding and masking, as input sizes may differ. It also restricts the kinds of operations that can be batched. In contrast, our method identifies and aggregates computation graph nodes that can be executed in a batched fashion for a given graph. This reduces the need for workarounds such as padding and masking, allows for seamless efficient execution also in architectures which are hard to conceptualize in the input-centric paradigm, and allows for the identification of batching opportunities that may not be apparent from an input-centric view. Our batching procedure operates in three steps (1) graph definition, (2) operation batching, and (3) computation. Here, steps (1) and (3) are shared with standard execution of computation graphs, while (2) corresponds to our proposed method. 3.1 Graph Definition First, we define the graph that represents the computation that we want to perform. From the user’s perspective, this is done by simply performing computation that they are interested in performing, such as that defined in the RNN-REGRESSION-LOSS function from the previous example. While it is common for dynamic graph frameworks to interleave the graph definition and its forward execution, 4 we separate these parts by using lazy evaluation: we only perform forward evaluation when a resulting value is requested by the user through the calling of the FORWARD function. The graph can be further extended after a call to FORWARD, and further calls will lazily evaluate the delta of the computation. This allows the accumulation of large graph chunks before executing forward computations, providing ample opportunities for operation batching. 3.2 Operation Batching Next, given a computation graph, such as the one on the left side of Figure 1, our proposed algorithm converts it into a graph where operations that can be executed together are batched together. This is done in the two step process described below. Computing compatibility groups We first partition the nodes into compatibility groups, where nodes in the same group have the potential for batching. This is done by associating each node with a signature such that nodes that share the same signature are guaranteed to be able to be executed in a single operation if their inputs are ready. Signatures vary depending on the operation the node represents. For example, in nodes representing element-wise operations, all nodes with the same operation can be batched together, so the signature is simply the operation name (tanh, log, ...). In nodes where dimensions or other information is also relevant to whether the operations can be batched, this information is also included in the signature. For example, a node that picks a slice of the input matrix will also be dependent on the matrix size and range to slice, so the signature will look something like slice-400x500-100:200. In some other cases (e.g. a parameterized matrix multiply) we may remember the specific node ID of one of the inputs (e.g. node123 representing the matrix multiply parameters) while generalizing across other inputs (e.g. data or hidden state vectors on the right-hand side), resulting in a signature that would look something like matmul-node123-400x1. A more thorough discussion is given in Appendix A. Determining execution order A computation graph is essentially a job dependency graph where each node depends on its input (and by proxy the input of other preceding nodes on the path to its inputs). Our goal is to select an execution order in which (1) each node is executed after its dependencies; and (2) nodes that have the same signature and do not depend on each other are scheduled for execution on the same step (and will be executed in a single batched operation). Finding an optimal execution order that maximizes the amount of batching in the general case is NP hard [24]. We discuss two heuristic strategies for identifying execution orders that satisfy these requirements. Depth-based batching is used as a method for automatic batching in TensorFlow Fold [19]. This is done by calculating the depth of each node in the original computation graph, defined as the maximum length from a leaf node to the node itself, and batching together nodes that have an identical depth and signature. By construction, nodes of the same depth are not dependent on each-other, as all nodes will have a higher depth than their input, and thus this batching strategy is guaranteed to satisfy condition (1) above. However, this strategy will also miss some good batching opportunities. For example, the loss function calculations in Figure 1 are of different depths due to the different-lengthed sequences, and similar problems will occur in recurrent neural network language models, tree-structured neural networks, and a myriad of other situations. Agenda-based batching is a method we propose that does not depend solely on depth. The core of this method is an agenda that tracks “available” nodes that have no unresolved dependencies. For each node, a count of its unresolved dependencies is maintained; this is initialized to be the number of inputs to the node. The agenda is initialized by adding nodes that have no incoming inputs (and thus no unresolved dependencies). At each iteration, we select a node from the agenda together with all of the available nodes in the same signature, and group them into a single batch operation. These nodes are then removed from the agenda, and the dependency counter of all of their successors are decremented. Any new zero-dependency nodes are added to the agenda. This process is repeated until all nodes have been processed. How do we prioritize between multiple available nodes in the agenda? Intuitively, we want to avoid prematurely executing nodes if there is a potential for more nodes of the same signature to be added to the agenda at a later point, resulting in better batching. A good example of this from our running example in Figure 1 is the loss-calculating nodes, which will be added to the agenda at different points due to becoming calculable after different numbers of RNN time steps. To capture this intuition, we introduce a heuristic method for prioritizing nodes based on the average depth of all nodes with their 5 signature, such that nodes with a lower average depth will be executed earlier. In general (with some exceptions), this tends to prioritize nodes that occur in earlier parts of the graph, which will result in the nodes in the later parts of the graph, such as these loss calculations, being executed later and hopefully batched together.5 Finally, this non-trivial batching procedure must be executed quickly so that overhead due to batch scheduling calculations doesn’t cancel out the efficiency gains from operation batching. To ensure this, we perform a number of optimizations in the implementation, which we detail in Appendix B. 3.3 Forward-backward Graph Execution and Update Once we have determined an execution order (including batching decisions), we perform calculations of the values themselves. In standard computation graphs, forward computation is done in topological order to calculate the function itself, and backward calculation is done in reverse topological order to calculate gradients. In our automatically batched evaluation, the calculation is largely similar with two exceptions: Single!batch node conversion First, it is necessary to convert single nodes into a batched node, which also requires modification of the underlying operations such as converting multiple matrixvector operations Whi to a single matrix-matrix operation WH. This is done internally in the library, while the user-facing API maintains the original unbatched computation graph structure, making this process invisible to the user. Ensuring contiguous memory To ensure that operations can be executed as a batch, the inputs to the operations (e.g. the various vectors h(i) t ) must be arranged in contiguous memory (e.g. a matrix Ht). In some cases, it is necessary to perform a memory copy to arrange these inputs into contiguous memory, but in other cases the inputs are already contiguous and in the correct order, and in these cases we can omit the memory copy and use the inputs as-is.6 4 Experiments In this section we describe our experiments, designed to answer three main questions: (1) in situations where manual batching is easy, how close can the proposed method approach the efficiency of a program that uses hand-crafted manual batching, and how do the depth-based and agenda-based approaches compare (§4.1)? (2) in situations where manual batching is less easy, is the proposed method capable of obtaining significant improvements in efficiency (§4.2)? (3) how does the proposed method compare to TensorFlow Fold, an existing method for batching variably structured networks within a static declaration framework (§4.3)? 4.1 Synthetic Experiments Our first experiments stress-test our proposed algorithm in an ideal case for manual batching. Specifically, we train a model on a bi-directional LSTM sequence labeler [12, 23], on synthetic data where every sequence to be labeled is the same length (40). Because of this, manual batching is easy because we don’t have to do any padding or adjustment for sentences of different lengths. The network takes as input a size 200 embedding vector from a vocabulary of size 1000, has 2 layers of 256 hidden node LSTMs in either direction, then predicts a label from one of 300 classes. The batch size is 64.7 Within this setting we test various batching settings: Without or with manual mini-batching where we explicitly batch the word vector lookup, LSTM update, and loss calculation for each time step. 5Even given this prioritization method it is still possible to have ties, in which case we break ties by calculating “cheap” operations (e.g. tanh and other elementwise ops) before “heavy” ones (e.g. matrix multiplies). 6The implication of this is that batched computation will take up to twice as much memory as unbatched computation, but in practice the memory usage is much less than this. Like manually batched computation, memory usage can be controlled by adjusting the batch size appropriately so it fits in memory. 7Experiments were run on a single Tesla K80 GPU or Intel Xeon 2.30GHz E5-2686v4 CPU. To control for variance in execution time, we perform three runs and report the fastest. We do not report accuracy numbers, as the functions calculated and thus accuracies are the same regardless of batching strategy. 6 No Auto By Depth By Agenda No Auto By Depth By Agenda 0 20 40 60 80 100 120 140 160 180 200 for graph for calc back graph back calc update No Auto By Depth By Agenda No Auto By Depth By Agenda 0 20 40 60 80 100 120 140 160 180 200 for graph for calc back graph back calc update 0 2 4 6 8 10 12 14 16 18 20 GPU ms/ sent 0 2 4 6 8 10 12 14 16 18 20 CPU ms/ sent w/o Manual w/ Manual w/o Manual w/ Manual Figure 2: Computation time for forward/backward graph construction or computation, as well as parameter update for a BiLSTM tagger without or with manual batching, and without, with depth-based, or with agenda-based automatic batching. Without on-the-fly batching (NOAUTO), with depth-based autobatching (BYDEPTH), or with agendabased autobatching (BYAGENDA). We measure the speed of each method by ms/sec and also break down the percentage of computation time spent in (1) forward graph creation/on-the-fly batching, (2) forward computation, (3) backward graph creation, (4) backward computation, (5) parameter update. The results can be found in Figure 2. First, comparing the first row with the second two, we can see that the proposed on-the-fly batching strategy drastically reduces computation time per sentence, with BYAGENDA reducing per-sentence computation time from 193ms to 16.9ms on CPU and 54.6ms to 5.03ms on GPU, resulting in an approximately 11-fold increase in sentences processed per second (5.17!59.3 on CPU and 18.3!198 on GPU). BYAGENDA is faster than BYDEPTH by about 15–30%, demonstrating that our more sophisticated agenda-based strategy is indeed more effective at batching together operations. Next, compared to manual batching without automatic batching (the fourth row), we can see that fully automatic batching with no manual batching is competitive, but slightly slower. The speed decrease is attributed to the increased overhead for computation graph construction and batch scheduling. However, even in this extremely idealized scenario where manual batching will be most competitive, the difference is relatively small (1.27⇥on CPU and 1.76⇥on GPU) compared to the extreme difference between the case of using no batching at all. Given that automatic batching has other major advantages such as ease of implementation, it may be an attractive alternative even in situations where manual batching is relatively easy. Finally, if we compare the fourth and fifth/sixth rows, we can see that on GPU, even with manual batching, automatic batching still provides gains in computational efficiency, processing sentences up to 1.1 times faster than without automatic batching. The reason for this can be attributed to the fact that our BiLSTM implementation performs manual batching across sentences, but not across time steps within the sentence. In contrast, the auto-batching procedure was able to batch the word embedding lookup and softmax operations across time-steps as well, reducing the number of GPU calls and increasing speed. This was not the case for CPU, as there is less to be gained from batching these less expensive operations. 4.2 Experiments on Difficult-to-batch Tasks Next, we extend our experiments to cases that are increasingly more difficult to manually batch. We use realistic dimension sizes for the corresponding tasks, and batches of size b = 64. Exact dimensions and further details on training settings are in Appendix C. BiLSTM: This is similar to the ideal case in the previous section, but trained on actual variable length sequences. BiLSTM w/char: This is the same as the BiLSTM tagger above, except that we use an additional BiLSTM over characters to calculate the embeddings over rare words. These sorts of 7 Table 1: Sentences/second on various training tasks for increasingly challenging batching scenarios. Task CPU GPU NOAUTO BYDEPTH BYAGENDA NOAUTO BYDEPTH BYAGENDA BiLSTM 16.8 139 156 56.2 337 367 BiLSTM w/ char 15.7 93.8 132 43.2 183 275 TreeLSTM 50.2 348 357 76.5 672 661 Transition-Parsing 16.8 61.0 61.2 33.0 89.5 90.1 character-based embeddings have been shown to allow the model to generalize better [18], but also makes batching operations more difficult, as we now have a variably-lengthed encoding step that may or may not occur for each of the words in the input. Tree-structured LSTMs: This is the Tree-LSTM model of [31]. Here, each instance is a tree rather than a sequence, and the network structure follows the tree structures. As discussed in the introduction, this architecture is notoriously hard to manually batch. Transition-based Dependency Parsing: The most challenging case we evaluate is that of a transition-based system, such as a transition based parser with LSTM-based featureextraction [8, 9, 13] and exploration-based training [2, 5, 10]. Here, a sequence is encoded using an LSTM (or a bi-LSTM), followed by a series of predictions. Each prediction based on a subset of the encoded vectors, and the vectors that participate in each prediction, as well as the loss, are determined by the outcomes of the previous predictions. Here, batching is harder yet as the nature of the computation interleaves sampling from the model and training, and requires calling FORWARD at each step, leaving the automatic-batcher very little room to play with. However, with only a small change to the computation, we can run b different parsers “in parallel”, and potentially share the computation across the different systems in a given time-step. Concretely, we use a modified version of the BIST parser [14]. From the results in Table 1, we can see that in all cases automatic batching gives healthy improvements in computation time, 3.6x–9.2⇥on the CPU, and 2.7–8.6⇥on GPU. Furthermore, the agenda-based heuristic is generally more effective than the depth-based one. 4.3 Comparison to TensorFlow Fold Figure 3: Comparison of runtime performance between TensorFlow Fold and DyNet with autobatching on TreeLSTMs (trees/sec). We compare the TensorFlow Fold reference implementation of the Stanford Sentiment Treebank regression task [30], using the same TreeLSTM architecture [31].Figure 3 shows how many trees are processed per second by TF (excluding both evaluation of the dev set and static graph construction/optimization) on GPU and CPU relative to the performance of the BYAGENDA algorithm in DyNet (including graph construction time). The DyNet performance is better across the board stratified by hardware type. Furthermore, DyNet has greater throughput on CPU than TensorFlow Fold on GPU until batch sizes exceed 64. Additionally, we find that with single instance training, DyNet’s sequential evaluation processes 46.7 trees/second on CPU, whereas autobatching processes 93.6 trees/second. This demonstrates that in complex architectures like TreeLSTMs, there are opportunities to batch up operations inside a single training instance, which are exploited by our batching algorithm. In addition, it should be noted that the DyNet implementation has the advantage that it is much more straightforward, relying on simple Python data structures and flow control to represent and traverse the trees, while the Fold implementation requires implementing the traversal and composition logic in a domain specific functional programming language (described in Section 3 of Looks et al. [19]). 8 5 Related Work Optimization of static algorithms is widely studied, and plays an important role in numerical libraries used in machine learning. Our work is rather different since the code/workload (as represented by the computation graph) is dynamically specified and must be executed rapidly, which precludes sophisticated statistic analysis. However, we review some of the important related work here. Automatic graph optimization and selection of kernels for static computation graphs is used in a variety of toolkits, including TensorFlow [1] and Theano [6]. Dynamic creation of optimally sized minibatches (similar to our strategy, except the computation graph is assumed to be static) that make good use of hardware resources has also been proposed for optimizing convolutional architectures [11]. The static nature of the computation makes this tools closer to optimizing compilers rather than efficient interpreters which are required to cope with the dynamic workloads encountered when dealing with dynamically structured computations. Related to this is the general technique of automatic vectorization, which is a mainstay of optimizing compilers. Recent work has begun to explore vectorization in the context of interpreted code which may cannot be compiled [26]. Our autobatching variant of DyNet similarly provides vectorized primitives that can be selected dynamically. Further afield, the problem of scheduling with batching decisions has been widely studied in operations research since at least the 1950s (for a recent survey, see [24]). Although the OR work deals with similar problems (e.g., scheduling work on machines that can process a ‘family’ of related item with minimal marginal cost over a single item), the standard algorithms from this field (which are often based on polynomial-time dynamic programs or approximations to NP-hard search problems) are too computationally demanding to execute in the inner loop of a learning algorithm. 6 Conclusion Deep learning research relies on empirical exploration of architectures. The rapid pace of innovation we have seen in the last several years has been enabled largely by tools that have automated the error-prone aspects of engineering, such as writing code that computes gradients. However, our contention is that operation batching is increasingly becoming another aspect of model coding that is error prone and amenable to automation. Our solution is a framework that lets programmers express computations naturally and relies on a smart yet lightweight interpreter to figure out how to execute the operations efficiently. Our hope is that this will facilitate the creation of new classes of models that better cope with the complexities of real-world data. Acknowledgements: The work of YG is supported by the Israeli Science Foundation (grant number 1555/15) and by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI). References [1] Martın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] Miguel Ballesteros, Yoav Goldberg, Chris Dyer, and Noah A. Smith. Training with exploration improves a greedy stack LSTM parser. In Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2005–2010, November 2016. [3] Michael Bartholomew-Briggs, Steven Brown, Bruce Christianson, and Laurence Dixon. Automatic differentiation of algorithms. Journal of Computational and Applied Mathematics, 124:171–190, 2000. [4] Peter W. Battaglia, Razvan Pascanu, Matthew Lai, Danilo Rezende, and Koray Kavukcuoglu. Interaction networks for learning about objects, relations and physics. In Neural Information Processing Systems (NIPS), 2016. 9 [5] Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. CoRR, abs/1506.03099, 2015. [6] James Bergstra, Olivier Breuleux, Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, Guillaume Desjardins, Joseph Turian, David Warde-Farley, and Yoshua Bengio. Theano: A CPU and GPU math compiler in Python. In Proc. 9th Python in Science Conf, pages 1–7, 2010. [7] Samuel R. Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D. Manning, and Christopher Potts. A fast unified model for parsing and sentence understanding. In Annual Conference of the Association for Computational Linguistics (ACL), pages 1466–1477, 2016. [8] Chris Dyer, Miguel Ballesteros, Wang Ling, Austin Matthews, and Noah A. Smith. Transitionbased dependency parsing with stack long short-term memory. In Annual Conference of the Association for Computational Linguistics (ACL), pages 334–343, 2015. [9] Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A. Smith. Recurrent neural network grammars. In Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), pages 199–209, 2016. [10] Yoav Goldberg and Joakim Nivre. Training deterministic parsers with non-deterministic oracles. Transactions of the Association for Computational Linguistics, 1:403–414, 2013. [11] Stefan Hadjis, Firas Abuzaid, Ce Zhang, and Christopher Ré. Caffe con troll: Shallow ideas to speed up deep learning. In Proceedings of the Fourth Workshop on Data analytics at sCale (DanaC 2015), 2015. [12] Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional LSTM-CRF models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015. [13] Eliyahu Kiperwasser and Yoav Goldberg. Easy-first dependency parsing with hierarchical tree LSTMs. Transactions of the Association for Computational Linguistics, 4:445–461, 2016. [14] Eliyahu Kiperwasser and Yoav Goldberg. Simple and accurate dependency parsing using bidirectional LSTM feature representations. Transactions of the Association for Computational Linguistics, 4:313–327, 2016. [15] Faisal Ladhak, Ankur Gandhe, Markus Dreyer, Lambert Matthias, Ariya Rastrow, and Björn Hoffmeister. Latticernn: Recurrent neural networks over lattices. In Proc. INTERSPEECH, 2016. [16] Chengtao Li, Daniel Tarlow, Alexander L. Gaunt, Marc Brockschmidt, and Nate Kushman. Neural program lattices. In International Conference on Learning Representations (ICLR), 2017. [17] Xiaodan Liang, Xiaohui Shen, Jiashi Feng, Liang Lin, and Shuicheng Yan. Semantic object parsing with graph LSTM. In Proc. ECCV, 2016. [18] Wang Ling, Chris Dyer, Alan W Black, Isabel Trancoso, Ramon Fermandez, Silvio Amir, Luis Marujo, and Tiago Luis. Finding function in form: Compositional character models for open vocabulary word representation. In Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1520–1530, 2015. [19] Moshe Looks, Marcello Herreshoff, DeLesley Hutchins, and Peter Norvig. Deep learning with dynamic computation graphs. In International Conference on Learning Representations (ICLR), 2017. [20] Gilles Louppe, Kyunghyun Cho, Cyril Becot, and Kyle Cranmer. QCD-aware recursive neural networks for jet physics. arXiv:1702.00748, 2017. [21] Graham Neubig, Chris Dyer, Yoav Goldberg, Austin Matthews, Waleed Ammar, Antonios Anastasopoulos, Miguel Ballesteros, David Chiang, Daniel Clothiaux, Trevor Cohn, Kevin Duh, Manaal Faruqui, Cynthia Gan, Dan Garrette, Yangfeng Ji, Lingpeng Kong, Adhiguna Kuncoro, Gaurav Kumar, Chaitanya Malaviya, Paul Michel, Yusuke Oda, Matthew Richardson, Naomi Saphra, Swabha Swayamdipta, and Pengcheng Yin. DyNet: The dynamic neural network toolkit. arXiv preprint arXiv:1701.03980, 2017. 10 [22] Joel Nothman, Nicky Ringland, Will Radford, Tara Murphy, and James R. Curran. Learning multilingual named entity recognition from Wikipedia. Artificial Intelligence, 194:151–175, 2012. [23] Barbara Plank, Anders Søgaard, and Yoav Goldberg. Multilingual part-of-speech tagging with bidirectional long short-term memory models and auxiliary loss. In Annual Conference of the Association for Computational Linguistics (ACL), pages 412–418, 2016. [24] Chris N. Potts and Mikhail Y. Kovalyov. Scheduling with batching: A review. European Journal of Operational Research, 20(2):228–249, 2000. [25] Scott Reed and Nando de Freitas. Neural programmer-interpreters. In International Conference on Learning Representations (ICLR), 2016. [26] Erven Rohou, Kevin Williams, and David Yuste. Vectorization technology to improve interpreter performance. ACM Transactions on Architecture and Code Optimization, 9(4), 2013. [27] Franco Scarselli, Marco Gori, Ah Chung Tsoi, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2009. [28] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In International Conference on Learning Representations (ICLR), 2017. [29] Richard Socher, Cliff C Lin, Chris Manning, and Andrew Y Ng. Parsing natural scenes and natural language with recursive neural networks. In International Conference on Machine Learning (ICML), pages 129–136, 2011. [30] Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher Manning, Andrew Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2013. [31] Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In Annual Conference of the Association for Computational Linguistics (ACL), 2015. [32] Seiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. Chainer: a next-generation open source framework for deep learning. In Proceedings of Workshop on Machine Learning Systems (LearningSys) in The Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS), 2015. [33] Dani Yogatama, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Wang Ling. Learning to compose words into sentences with reinforcement learning. In International Conference on Learning Representations (ICLR), 2017. 11 | 2017 | 526 |
7,037 | Fitting Low-Rank Tensors in Constant Time Kohei Hayashi∗ National Institute of Advanced Industrial Science and Technology RIKEN AIP hayashi.kohei@gmail.com Yuichi Yoshida† National Institute of Informatics yyoshida@nii.ac.jp Abstract In this paper, we develop an algorithm that approximates the residual error of Tucker decomposition, one of the most popular tensor decomposition methods, with a provable guarantee. Given an order-K tensor X ∈RN1×···×NK, our algorithm randomly samples a constant number s of indices for each mode and creates a “mini” tensor ˜X ∈Rs×···×s, whose elements are given by the intersection of the sampled indices on X. Then, we show that the residual error of the Tucker decomposition of ˜X is sufficiently close to that of X with high probability. This result implies that we can figure out how much we can fit a low-rank tensor to X in constant time, regardless of the size of X. This is useful for guessing the favorable rank of Tucker decomposition. Finally, we demonstrate how the sampling method works quickly and accurately using multiple real datasets. 1 Introduction Tensor decomposition is a fundamental tool for dealing with array-structured data. Using tensor decomposition, a tensor (or a multidimensional array) is approximated with multiple tensors in lower-dimensional space using a multilinear operation. This drastically reduces disk and memory usage. We say that a tensor is of order K if it is a K-dimensional array; each dimension is called a mode in tensor terminology. Among the many existing tensor decomposition methods, Tucker decomposition [18] is a popular choice. To some extent, Tucker decomposition is analogous to singular-value decomposition (SVD): as SVD decomposes a matrix into left and right singular vectors that interact via singular values, Tucker decomposition of an order-K tensor consists of K factor matrices that interact via the socalled core tensor. The key difference between SVD and Tucker decomposition is that, with the latter, the core tensor need not be diagonal and its “rank” can differ for each mode k = 1, . . . , K. In this paper, we refer to the size of the core tensor, which is a K-tuple, as the Tucker rank of a Tucker decomposition. We are usually interested in obtaining factor matrices and a core tensor to minimize the residual error— the error between the input and low-rank approximated tensors. Sometimes, however, knowing the residual error itself is an important task. The residual error tells us how the low-rank approximation is suitable to the input tensor, and is particularly useful to predetermine the Tucker rank. In real ∗Supported by ONR N62909-17-1-2138. †Supported by JSPS KAKENHI Grant Number JP17H04676 and JST ERATO Grant Number JPMJER1305, Japan. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Algorithm 1 Input: Random access to a tensor X ∈RN1×···×NK, Tucker rank (R1, . . . , Rk), and ϵ, δ ∈(0, 1). for k = 1 to K do Sk ←a sequence of s = s(ϵ, δ) indices uniformly and independently sampled from [Nk]. Construct a mini-tensor X|S1,...,SK. Return ℓR1,...,RK(X|S1,...,SK). applications, Tucker ranks are not explicitly given, and we must select them by considering the balance between space usage and approximation accuracy. For example, if the selected Tucker rank is too small, we risk losing essential information in the input tensor. On the other hand, if the selected Tucker rank is too large, the computational cost of computing the Tucker decomposition (even if we allow for approximation methods) increases considerably along with space usage. As with the case of the matrix rank, one might think that a reasonably good Tucker rank can be found using a grid search. Unfortunately, grid searches for Tucker ranks are challenging because, for an order-K tensor, the Tucker rank consists of K free parameters and the search space grows exponentially in K. Hence, we want to evaluate each grid point as quickly as possible. Unfortunately, although several practical algorithms have been proposed, such as the higher-order orthogonal iteration (HOOI) [7], they are not sufficiently scalable. For each mode, HOOI iteratively applies SVD to an unfolded tensor—a matrix that is reshaped from the input tensor. Given an N1 × · · · × NK tensor, the computational cost is hence O(K maxk Nk · Q k Nk), which depends crucially on the input size N1, . . . , NK. Although there are several approximation algorithms [8, 21, 17], their computational costs are still intensive. Consequently, we cannot search for good Tucker ranks. Rather, we can only check a few candidates. 1.1 Our Contributions When finding a good Tucker rank with a grid search, we need only the residual error. More specifically, given an order-K tensor X ∈RN1×···×NK and integers Rk ≤Nk (k = 1, . . . , K), we consider the following rank-(R1, . . . , RK) Tucker-fitting problem. For an integer n ∈N, let [n] denote the set {1, 2, . . . , n}. Then, we want to compute the following normalized residual error: ℓR1,...,RK(X) := min G∈RR1×···×RK ,{U (k)∈RNk×Rk }k∈[K]
X −[[G; U (1), . . . , U (K)]]
2 F Q k∈[K] Nk , (1) where [[G; U (1), . . . , U (K)]] ∈RN1×···×NK is an order-K tensor, defined as [[G; U (1), . . . , U (K)]]i1···iK = X r1∈[R1],...,rK∈[RK] Gr1···rK Y k∈[K] U (k) ikrk for every i1 ∈[N1], . . . , iK ∈[NK]. Here, G is the core tensor, and U (1), . . . , U (K) are the factor matrices. Note that we are not concerned with computing the minimizer. Rather, we only want to compute the minimum value. In addition, we do not need the exact minimum. Indeed, a rough estimate still helps to narrow down promising rank candidates. The question here is how quickly we can compute the normalized residual error ℓR1,...,RK(X) with moderate accuracy. We shed light on this question by considering a simple sampling-based algorithm. Given an order-K tensor X ∈RN1×···×NK, Tucker rank (R1, . . . , RK), and sample size s ∈N, we sample a sequence of indices Sk = (xk 1, . . . , xk s) uniformly and independently from {1, . . . , Nk} for each mode k ∈ [K]. Then, we construct a mini-tensor X|S1,...,SK ∈Rs×···×s such that (X|S1,...,SK)i1,...,iK = Xx1 i1...,xK iK . Finally, we compute ℓR1,...,RK(X|S1,...,SK) using a solver, such as HOOI, that then outputs the obtained value. The details are provided in Algorithm 1. In this paper, we show that Algorithm 1 achieves our ultimate goal: with a provable guarantee, the time complexity remains constant. Assume each rank parameter Rk is sufficiently smaller than the dimension of each mode Nk. Then, given error and confidence parameters ϵ, δ ∈(0, 1), there exists a constant s = s(ϵ, δ) such that the approximated residual ℓR1,...,RK(X|S1,...,SK) is close to the original one ℓR1,...,RK(X), to within ϵ with a probability of at least 1 −δ. Note that the time 2 complexity for computing ℓR1,...,RK(X|S1,...,SK) does not depend on the input size N1, . . . , NK but rather on the sample size s, meaning that the algorithm runs in constant time, regardless of the input size. The main component in our proof is the weak version of Szemerédi’s regularity lemma [9], which roughly states that any tensor can be well approximated by a tensor consisting of a constant number of blocks whose entries in the same block are equal. Then, we can show that X|S1,...,SK is a good sketch of the original tensor, because by sampling s many indices for each mode, we can hit each block a sufficient number of times. It follows that ℓR1,...,RK(X) and ℓR1,...,RK(X|S1,...,SK) are close. To formalize this argument, we want to measure the “distance” between X and X|S1,...,SK, and we want to show that it is small. To this end, we exploit graph limit theory, first described by Lovász and Szegedy [13] (see also [12]), in which we measure the distance between two graphs on a different number of vertices by considering continuous versions called dikernels. Hayashi and Yoshida [10] used graph limit theory to develop a constant-time algorithm that minimizes quadratic functions described by matrices and vectors. We further extend this theory to tensors to analyze the Tucker fitting problem. With both synthetic and real datasets, we numerically evaluate our algorithm. The results show that our algorithm overwhelmingly outperforms other approximation methods in terms of both speed and accuracy. 2 Preliminaries Tensors Let X ∈RN1×···NK be a tensor. Then, we define the Frobenius norm of X as ∥X∥F = qP i1,...,iK X2 i1···iK, the max norm of X as ∥X∥max = max i1∈[N1],...,iK∈[NK] |Xi1···iK|, and the cut norm of X as ∥X∥□= max S1⊆[N1],...,SK⊆[NK] | P i1∈S1,...,iK∈SK Xi1···iK|. We note that these norms satisfy the triangle inequalities. For a vector v ∈Rn and a sequence S = (x1, . . . , xs) of indices in [n], we define the restriction v|S ∈Rs of v such that (v|S)i = vxi for i ∈[s]. Let X ∈RN1×···×NK be a tensor, and Sk = (xk 1, . . . , xk s) be a sequence of indices in [Nk] for each mode k ∈[K]. Then, we define the restriction X|S1,...,SK ∈Rs×···×s of X to S1×· · ·×SK such that (X|S1,...,SK)i1···iK = Xx1 i1,...,xK iK for each i1 ∈[N1], . . . , iK ∈[Nk]. Hyper-dikernels We call a (measurable) function W : [0, 1]K →R a (hyper-)dikernel of order K. We can regard a dikernel as a tensor whose indices are specified by real values in [0, 1]. We stress that the term “dikernel” has nothing to do with kernel methods used in machine learning. For two functions f, g : [0, 1] →R, we define their inner product as ⟨f, g⟩= R 1 0 f(x)g(x)dx. For a sequence of functions f (1), . . . , f (K), we define their tensor product N k∈[K] f (k) ∈[0, 1]K →R as N k∈[K] f (k)(x1, . . . , xK) = Q k∈[K] f (k)(xk), which is an order-K dikernel. Let W : [0, 1]K →R be a dikernel. Then, we define the Frobenius norm of W as ∥W∥F = qR [0,1]K W(x)2dx, the max norm of W as ∥W∥max = maxx∈[0,1]K |W(x)|, and the cut norm of W as ∥W∥□= supS1,...,SK⊆[0,1] R S1×···×SK W(x)dx . Again, we note that these norms satisfy the triangle inequalities. For two dikernels W and W′, we define their inner product as ⟨W, W′⟩= R [0,1]K W(x)W′(x)dx. Let λ be a Lebesgue measure. A map π : [0, 1] →[0, 1] is said to be measure-preserving, if the pre-image π−1(X) is measurable for every measurable set X, and λ(π−1(X)) = λ(X). A measurepreserving bijection is a measure-preserving map whose inverse map exists and is also measurable (and, in turn, also measure-preserving). For a measure-preserving bijection π : [0, 1] →[0, 1] and a dikernel W : [0, 1]K →R, we define a dikernel π(W) : [0, 1]K →R as π(W)(x1, . . . , xK) = W(π(x1), . . . , π(xK)). 3 For a tensor G ∈RR1×···×RK and vector-valued functions {F (k) : [0, 1] →RRk}k∈[K], we define an order-K dikernel [[G; F (1), . . . , F (K)]] : [0, 1]K →R as [[G; F (1), . . . , F (K)]](x1, . . . , xK) = X r1∈[R1],...,rK∈[RK] Gr1,...,rK Y k∈[K] F (k)(xk)rk We note that [[G; F (1), . . . , F (K)]] is a continuous analogue of Tucker decomposition. Tensors and hyper-dikernels We can construct the dikernel X : [0, 1]K →R from a tensor X ∈ RN1×···×NK as follows. For an integer n ∈N, let In 1 = [0, 1 n], In 2 = ( 1 n, 2 n], . . . , In n = ( n−1 n , . . . , 1]. For x ∈[0, 1], we define in(x) ∈[n] as a unique integer such that x ∈In i . Then, we define X(x1, . . . , xK) = XiN1(x1)···iNK (xK). The main motivation for creating a dikernel from a tensor is that, in doing so, we can define the distance between two tensors X and Y of different sizes via the cut norm—that is, ∥X −Y∥□. Let W : [0, 1]K →R be a dikernel and Sk = (xk 1, . . . , xk s) for k ∈[K] be sequences of elements in [0, 1]. Then, we define a dikernel W|S1,...,SK : [0, 1]K →R as follows: We first extract a tensor W ∈Rs×···×s by setting Wi1···iK = W(x1 i1, . . . , xK iK). Then, we define W|S1,...,SK as the dikernel constructed from W. 3 Correctness of Algorithm 1 In this section, we prove the correctness of Algorithm 1. The following sampling lemma states that dikernels and their sampling versions are close in the cut norm with high probability. Lemma 3.1. Let W1, . . . , WT : [0, 1]K →[−L, L] be dikernels. Let S1, . . . , SK be sequences of s elements uniformly and independently sampled from [0, 1]. Then, with a probability of at least 1−exp(−ΩK(s2(T/ log2 s)1/(K−1))), there exists a measure-preserving bijection π : [0, 1] →[0, 1] such that, for every t ∈[T], we have ∥Wt −π(Wt|S1,...,SK)∥□= L · OK T/ log2 s 1/(2K−2), where OK(·) and ΩK(·) hide factors depending on K. We now consider the dikernel counterpart to the Tucker fitting problem, in which we want to compute the following: ℓR1,...,RK(X) := inf G∈RR1×···×RK ,{f (k):[0,1]→RRk }k∈[K]
X −[[G; f (1), . . . , f (K)]]
2 F , (2) The following lemma states that the Tucker fitting problem and its dikernel counterpart have the same optimum values. Lemma 3.2. Let X ∈RN1×···×NK be a tensor, and let R1, . . . , RK ∈N be integers. Then, we have ℓR1,...,RK(X) = ℓR1,...,RK(X). For a set of vector-valued functions F = {f (k) : [0, 1] →RRk}k∈[K], we define ∥F∥max = maxk∈[K],r∈[Rk],x∈[0,1] f (k) r (x). For real values a, b, c ∈R, a = b ± c is shorthand for b −c ≤a ≤ b + c. For a dikernel X : [0, 1]K →R, we define a dikernel X 2 : [0, 1]K →R as X 2(x) = X(x)2 for every x ∈[0, 1]K. The following lemma states that if X and Y are close in the cut norm, then the optimum values of the Tucker fitting problem regarding them are also close. Lemma 3.3. Let X, Y : [0, 1]K →R be dikernels with ∥X −Y∥□≤ϵ and ∥X 2 −Y2∥□≤ϵ. For integers R1, . . . , RK ∈N, we have ℓR1,...,RK(X) = ℓR1,...,RK(Y) ± 2ϵ 1 + R ∥GX ∥max∥FX ∥K max + ∥GY∥max∥FY∥K max , where (GX , FX = {f (k) X }k∈[K]) and (GY,FY = {f (k) Y }k∈[K]) are solutions to the problem (2) on X and Y, respectively, whose objective values exceed the infima by at most ϵ, and R = Q k∈[K] Rk. 4 It is well known that the Tucker fitting problem has a minimizer for which the factor matrices are orthonormal. Thus, we have the following guarantee for the approximation error of Algorithm 1. Theorem 3.4. Let X ∈RN1×···×NK be a tensor, R1, . . . , RK be integers, and ϵ, δ ∈(0, 1). For s(ϵ, δ) = 2Θ(1/ϵ2K−2) + Θ(log 1 δ log log 1 δ ), we have the following. Let S1, . . . , SK be sequences of indices as defined in Algorithm 1. Let (G∗, U ∗ 1 , . . . , U ∗ K) and ( ˜G∗, ˜U ∗ 1 , . . . , ˜U ∗ K) be minimizers of the problem (1) on X and X|S1,...,SK for which the factor matrices are orthonormal, respectively. Then, with a probability of at least 1 −δ, we have ℓR1,...,RK(X|S1,...,SK) = ℓR1,...,RK(X) ± O(ϵL2(1 + 2MR)), where L = ∥X∥max, M = max {∥G∗∥max, ∥˜G∗∥max}, and R = Q k∈[K] Rk. We remark that, for the matrix case (i.e., K = 2), ∥G∗∥max and ∥˜G∗∥max are equal to the maximum singular values of the original and sampled matrices, respectively. Proof. We apply Lemma 3.1 to X and X 2. Then, with a probability of at least 1 −δ, there exists a measure-preserving bijection π : [0, 1] →[0, 1] such that ∥X −π(X|S1,...,SK)∥□≤ϵL and ∥X 2 −π(X 2|S1,...,SK)∥□≤ϵL2. In what follows, we assume that this has happened. Then, by Lemma 3.3 and the fact that ℓR1,...,RK(X|S1,...,SK) = ℓR1,...,RK(π(X|S1,...,SK)), we have ℓR1,...,RK(X|S1,...,SK) = ℓR1,...,RK(X) ± ϵL2 1 + 2R(∥G∥max∥F∥K max + ∥˜G∥max∥˜F∥K max) , where (G, F = {f (k)}k∈[K]) and ( ˜G, ˜F = { ˜f (k)}k∈[K]) be as in the statement of Lemma 3.3. From the proof of Lemma 3.2, we can assume that ∥G∥max = ∥G∗∥max, ∥˜G∥max = ∥˜G∗∥max, ∥F∥max ≤1, and ∥˜F∥max ≤1 (owing to the orthonormality of U ∗ 1 , . . . , U ∗ K and ˜U ∗ 1 , . . . , ˜U ∗ K). It follows that ℓR1,...,RK(X|S1,...,SK) = ℓR1,...,RK(X) ± ϵL2 1 + 2R(∥G∗∥max + ∥˜G∗∥max) . (3) Then, we have ℓR1,...,RK(X|S1,...,SK) = ℓR1,...,RK(X|S1,...,SK) (By Lemma 3.2) = ℓR1,...,RK(X) ± ϵL2 1 + 2R(∥G∗∥max + ∥˜G∗∥max) (By (3)) = ℓR1,...,RK(X) ± ϵL2 1 + 2R(∥G∗∥max + ∥˜G∗∥max) . (By Lemma 3.2) Hence, we obtain the desired result. 4 Related Work To solve Tucker decomposition, several randomized algorithms have been proposed. A popular approach involves using a truncated or randomized SVD. For example, Zhou et al. [21] proposed a variant of HOOI with randomized SVD. Another approach is based on tensor sparsification. Tsourakakis [17] proposed MACH, which randomly picks the element of the input tensor and substitutes zero, with a probability of 1 −p, where p ∈(0, 1] is an approximation parameter. Moreover, several authors proposed CUR-type Tucker decomposition, which approximates the input tensor by sampling tensor tubes [6, 8]. Unfortunately, these methods do not significantly reduce the computational cost. Randomized SVD approaches reduce the computational cost of multiple SVDs from O(K maxk Nk · Q k Nk) to O(K maxk Rk · Q k Nk), but they still depend on Q k Nk. CUR-type approaches require the same time complexity. In MACH, to obtain accurate results, we need to set p as constant for instance p = 0.1 [17]. Although this will improve the runtime by a constant factor, the dependency on Q k Nk does not change. 5 N = 100 200 400 800 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 0.0 0.1 0.2 0.3 11121314151617181920 11121314151617181920 11121314151617181920 11121314151617181920 R Residual error s G 20 40 80 Figure 1: Synthetic data: computed residual errors for various Tucker ranks. The horizontal axis indicates the approximated residual error ℓR1,...,RK(X|S1,...,SK). The error bar indicates the standard deviation over ten trials with different random seeds, which affected both data generation and sampling. 5 Experiments For the experimental evaluation, we slightly modified our sampling algorithm. In Algorithm 1, the indices are sampled using sampling with replacement (i.e., the same indices can be sampled more than once). Although this sampling method is theoretically sound, we risk obtaining redundant information by sampling the same index several times. To avoid this issue, we used sampling without replacement—i.e., each index was sampled at most once. Furthermore, if the dimension of a mode was smaller than the sampling size, we used all the coordinates. That is, we sampled min(s, Nk) indices for each mode k ∈[K]. Note that both sampling methods, with and without replacement, are almost equivalent when the input size N1, . . . , NK is sufficiently larger than s (i.e., the probability that a previously sampled index is sampled approaches zero.) 5.1 Synthetic Data We first demonstrate the accuracy of our method using synthetic data. We prepared N × N × N tensors for N ∈{100, 200, 400, 800}, with a Tucker rank of (15, 15, 15). Each element of the core G ∈R15×15×15 and the factor matrices U (1), U (2), U (3) ∈RN×15 was drawn from a standard normal distribution. We set Y = [[G; U (1), U (2), U (3)]]. Then, we generated X ∈RN×N×N as Xijk = Yijk/∥Y ∥F + 0.1ϵijk, where ϵijk follows the standard normal distribution for i, j, k ∈[N]. Namely, X had a low-rank structure, though some small noise was added. Subsequently, X was decomposed using our method with various Tucker ranks (R, R, R) for R ∈{11, 12, . . . , 20} and the sample size s ∈{20, 40, 80}. The results (see Figure 1) show that our method behaved ideally. That is, the error was high when R was less than the true rank, 15, and it was almost zero when R was greater than or equal to the true rank. Note that the scale of the estimated residual error seems to depend on s, i.e., small s tends to yield a small residual error. This implies our method underestimates the residual error when s is small. 5.2 Real Data To evaluate how our method worked against real data tensors, we used eight datasets [1, 2, 4, 11, 14, 19] described in Table 1, where the “fluor” dataset is order-4 and the others are order-3 tensors. Details regarding the data are provided in the Supplementary material. Before the experiment, we normalized each data tensor by its norm ∥X∥F . To evaluate the approximation accuracy, we used HOOI implemented in Python by Nickel3 as “true” residual error.4 As baselines, we used the two randomized methods introduced in Section 4: randomized SVD [21] and MACH [17]. We denote our method by “samples” where s indicates the sample size (e.g., sample40 denotes our method with 3https://github.com/mnick/scikit-tensor 4Note that, though no approximation is used in HOOI, the objective function (1) is nonconvex and it is not guaranteed to converge to the global minimum. The obtained solution can be different from the ground truth. 6 Table 1: Real Datasets. Dataset Size Total # of elements movie_gray 120 × 160 × 107 2.0M EEM 28 × 13324 × 8 2.9M fluorescence 299 × 301 × 41 3.6M bonnie 89 × 97 × 549 4.7M fluor 405 × 136 × 19 × 5 5.2M wine 44 × 2700 × 200 23.7M BCI_Berlin 4001 × 59 × 1400 0.3G visor 16818 × 288 × 384 1.8G 0.000 0.005 0.010 0.015 0.020 0.00 0.04 0.08 0.12 0.00 0.02 0.04 0.06 0.00 0.02 0.04 0.1 0.2 0.3 0.4 0.01 0.02 0.03 movie_gray fluorescence bonnie wine BCI_Berlin visor 5x5x5 10x5x5 5x10x5 5x5x10 15x5x5 5x15x5 5x5x15 10x10x5 10x5x10 20x5x5 5x10x10 5x20x5 5x5x20 10x15x5 10x5x15 15x10x5 15x5x10 5x10x15 5x15x10 10x10x10 10x20x5 10x5x20 20x10x5 20x5x10 5x10x20 5x20x10 15x15x5 15x5x15 5x15x15 10x10x15 10x15x10 15x10x10 15x20x5 15x5x20 20x15x5 20x5x15 5x15x20 5x20x15 10x10x20 10x20x10 20x10x10 20x20x5 20x5x20 5x20x20 10x15x15 15x10x15 15x15x10 10x15x20 10x20x15 15x10x20 15x20x10 20x10x15 20x15x10 15x15x15 10x20x20 20x10x20 20x20x10 15x15x20 15x20x15 20x15x15 15x20x20 20x15x20 20x20x15 20x20x20 Tucker rank Residual error method hooi mach0.1 mach0.3 randsvd sample40 sample80 Figure 2: Real data: (approximated) residual errors for various Tucker ranks. s = 40). Similarly, “machp” refers to MACH with sparsification probability set at p. For all the approximation methods, we used the HOOI implementation to solve Tucker decomposition. Every data tensor was decomposed with Tucker rank (R1, . . . , RK) on the grid Rk ∈{5, 10, 15, 20} for k ∈[K]. Figure 2 shows the residual error for order-3 data.5 It shows that the random projection tends to overestimate the decomposition error. On the other hand, except for the wine dataset, our method stably estimated the residual error with reasonable approximation errors. For the wine dataset, our method estimated a very small value, far from the correct value. This result makes sense, however, because the wine dataset is sparse (where 90% of the elements are zero) and the residual error is too small. Table 2 shows the absolute error from HOOI averaged over all rank settings. In most of the datasets, our methods achieved the lowest error. 5Here we exclude the results of the EEM dataset because its size is too small and we were unable to run the experiment with all the Tucker rank settings. Also, the results of MACH on some datasets are excluded owing to considerable errors. 7 Table 2: Real data: absolute error of HOOI’s and other’s residual errors averaged over ranks. The best and the second best results are shown in bold and italic, respectively. mach0.1 mach0.3 randsvd sample40 sample80 movie_gray 0.084 ± 0.038 0.020 ± 0.010 0.004 ± 0.003 0.001 ± 0.001 0.000 ± 0.000 EEM 2.370 ± 0.792 0.587 ± 0.210 0.018 ± 0.029 0.003 ± 0.003 0.003 ± 0.003 fluorescence 0.569 ± 0.204 0.129 ± 0.053 0.024 ± 0.023 0.004 ± 0.005 0.002 ± 0.002 bonnie 1.170 ± 0.412 0.300 ± 0.121 0.012 ± 0.011 0.004 ± 0.002 0.003 ± 0.001 fluor 0.611 ± 0.307 0.148 ± 0.083 0.009 ± 0.007 0.003 ± 0.001 0.002 ± 0.001 wine 6.826 ± 0.733 1.417 ± 0.191 0.012 ± 0.009 0.008 ± 0.006 0.007 ± 0.006 BCI_Berlin 0.193 ± 0.039 0.048 ± 0.013 0.057 ± 0.020 0.065 ± 0.022 0.055 ± 0.007 visor 0.002 ± 0.001 0.000 ± 0.000 0.007 ± 0.003 0.003 ± 0.001 0.001 ± 0.001 Table 3: Real data: Kendall’s tau against the ranking of Tucker ranks obtained by HOOI. mach0.1 mach0.3 randsvd sample40 sample80 movie_gray -0.07 0.04 0.1 0.71 0.73 EEM 0.64 0.68 0.77 0.79 0.91 fluorescence 0.08 0.02 0.28 0.61 0.77 bonnie -0.05 -0.01 0.33 0.27 0.67 fluor 0.77 0.73 0.83 0.93 0.89 wine 0.12 0.12 -0.02 0.04 0.15 BCI_Berlin 0.08 0.09 0.02 0.18 0.45 visor 0.07 0.18 0.11 0.64 0.7 Table 4: Real data: runtime averaged over Tucker ranks (in seconds). hooi mach0.1 mach0.3 randsvd sample40 sample80 movie_gray 0.71 32.19 85.13 0.33 0.13 0.25 EEM 3447.97 7424.8 7938.75 2212.54 0.11 0.11 fluorescence 2.67 30.05 73.52 1.47 0.13 0.23 bonnie 9.13 25.99 56.56 2.32 0.11 0.41 fluor 3.2 34.54 98.63 1.43 0.2 0.43 wine 142.34 95.28 212.19 41.94 0.12 0.23 BCI_Berlin 428.13 2765.88 7830 82.43 0.2 0.45 visor 10034.96 27897.85 27769.53 1950.45 0.13 0.26 Next, we evaluated the correctness of the order of Tucker ranks. For rank determination, it is important that the rankings of Tucker ranks in terms of residual errors are consistent between the original and the sampled tensors. For example, if the rank-(15, 15, 5) Tucker decomposition of the original tensor achieves a lower error than the rank-(5, 15, 15) Tucker decomposition, this order relation should be preserved in the sampled tensor. We evaluated this using Kendall’s tau coefficient, between the rankings of Tucker ranks obtained by HOOI and the others. Kendall’s tau coefficient takes as its value +1 when the two rankings are the same, and −1 when they are opposite. Table 3 shows the results. We can see that, again, our method outperformed the others. Table 4 shows the runtime averaged over all the rank settings. It shows that our method is consistently the fastest. Note that MACH was slower than normal Tucker decomposition. This is possibly because it must create an additional sparse tensor, which requires O(Q k Nk) time complexity. 6 Discussion One might point out by way of criticism that the residual error is not a satisfying measure for determining rank. In machine learning and statistics, it is common to choose hyperparameters based on the generalization error or its estimator, such as cross-validation (CV) error, rather than the training error (i.e., the residual error in Tucker decomposition). Unfortunately, our approach cannot be used the CV error, because what we can obtain is the minimum of the training error, whereas CV requires us to plug in the minimizers. An alternative is to use information criteria such as Akaike [3] and Bayesian information criteria [15]. These criteria are given by the penalty term, which consists of 8 the number of parameters and samples6, and the maximum log-likelihood. Because the maximum log-likelihood is equivalent to the residual error, our method can approximate these criteria. Python code of our algorithm is available at: https://github.com/hayasick/CTFT. References [1] E. Acar, R. Bro, and B. Schmidt. New exploratory clustering tool. Journal of Chemometrics, 22(1):91, 2008. [2] E. Acar, E. E. Papalexakis, G. Gürdeniz, M. A. Rasmussen, A. J. Lawaetz, M. Nilsson, and R. Bro. Structure-revealing data fusion. BMC bioinformatics, 15(1):239, 2014. [3] H. Akaike. A new look at the statistical model identification. IEEE Transactions on Automatic Control, 19(6):716–723, 1974. [4] B. Blankertz, G. Dornhege, M. Krauledat, K.-R. Müller, and G. Curio. The non-invasive berlin brain– computer interface: fast acquisition of effective performance in untrained subjects. NeuroImage, 37(2):539– 550, 2007. [5] C. Borgs, J. T. Chayes, L. Lovász, V. T. Sós, and K. Vesztergombi. Convergent sequences of dense graphs I: Subgraph frequencies, metric properties and testing. Advances in Mathematics, 219(6):1801–1851, 2008. [6] C. F. Caiafa and A. Cichocki. Generalizing the column–row matrix decomposition to multi-way arrays. Linear Algebra and its Applications, 433(3):557–573, 2010. [7] L. De Lathauwer, B. De Moor, and J. Vandewalle. On the best rank-1 and rank-(r1, r2, . . . , rn) approximation of higher-order tensors. SIAM Journal on Matrix Analysis and Applications, 21(4):1324–1342, 2000. [8] P. Drineas and M. W. Mahoney. A randomized algorithm for a tensor-based generalization of the singular value decomposition. Linear Algebra and Its Applications, 420(2):553–571, 2007. [9] A. Frieze and R. Kannan. The regularity lemma and approximation schemes for dense problems. In FOCS, pages 12–20, 1996. [10] K. Hayashi and Y. Yoshida. Minimizing quadratic functions in constant time. In NIPS, pages 2217–2225, 2016. [11] A. J. Lawaetz, R. Bro, M. Kamstrup-Nielsen, I. J. Christensen, L. N. Jørgensen, and H. J. Nielsen. Fluorescence spectroscopy as a potential metabonomic tool for early detection of colorectal cancer. Metabolomics, 8(1):111–121, 2012. [12] L. Lovász. Large Networks and Graph Limits. American Mathematical Society, 2012. [13] L. Lovász and B. Szegedy. Limits of dense graph sequences. Journal of Combinatorial Theory, Series B, 96(6):933–957, 2006. [14] C. Schuldt, I. Laptev, and B. Caputo. Recognizing human actions: A local SVM approach. In ICPR, volume 3, pages 32–36, 2004. [15] G. Schwarz et al. Estimating the dimension of a model. The Annals of Statistics, 6(2):461–464, 1978. [16] R. J. Steele and A. E. Raftery. Performance of bayesian model selection criteria for gaussian mixture models. Frontiers of Statistical Decision Making and Bayesian Analysis, 2:113–130, 2010. [17] C. E. Tsourakakis. Mach: Fast randomized tensor decompositions. In ICDM, pages 689–700, 2010. [18] L. R. Tucker. Some mathematical notes on three-mode factor analysis. Psychometrika, 31(3):279–311, 1966. [19] R. Vezzani and R. Cucchiara. Video surveillance online repository (visor): an integrated framework. Multimedia Tools and Applications, 50(2):359–380, 2010. [20] S. Watanabe. Algebraic geometry and statistical learning theory, volume 25. Cambridge University Press, 2009. [21] G. Zhou, A. Cichocki, and S. Xie. Decomposition of big tensors with low multilinear rank. arXiv preprint arXiv:1412.1885, 2014. 6For models with multiple solutions, such as Tucker decomposition, the penalty term can differ from the standard form [20]. Still, these criteria are useful in practice (see, e.g. [16]). 9 | 2017 | 527 |
7,038 | Random Projection Filter Bank for Time Series Data Amir-massoud Farahmand Mitsubishi Electric Research Laboratories (MERL) Cambridge, MA, USA farahmand@merl.com Sepideh Pourazarm Mitsubishi Electric Research Laboratories (MERL) Cambridge, MA, USA sepid@bu.edu Daniel Nikovski Mitsubishi Electric Research Laboratories (MERL) Cambridge, MA, USA nikovski@merl.com Abstract We propose Random Projection Filter Bank (RPFB) as a generic and simple approach to extract features from time series data. RPFB is a set of randomly generated stable autoregressive filters that are convolved with the input time series to generate the features. These features can be used by any conventional machine learning algorithm for solving tasks such as time series prediction, classification with time series data, etc. Different filters in RPFB extract different aspects of the time series, and together they provide a reasonably good summary of the time series. RPFB is easy to implement, fast to compute, and parallelizable. We provide an error upper bound indicating that RPFB provides a reasonable approximation to a class of dynamical systems. The empirical results in a series of synthetic and real-world problems show that RPFB is an effective method to extract features from time series. 1 Introduction This paper introduces Random Projection Filter Bank (RPFB) for feature extraction from time series data. RPFB generates a feature vector that summarizes the input time series by projecting the time series onto the span of a set of randomly generated dynamical filters. The output of RPFB can then be used as the input to any conventional estimator (e.g., ridge regression, SVM, and Random Forest [Hastie et al., 2001; Bishop, 2006; Wasserman, 2007]) to solve problems such as time series prediction, and classification and fault prediction with time series input data. RPFB is easy to implement, is fast to compute, and can be parallelized easily. RPFB consists of a set of randomly generated filters (i.e., dynamical systems that receive inputs), which are convolved with the input time series. The filters are stable autoregressive (AR) filters, so they can capture information from the distant past of the time series. This is in contrast with more conventional approach of considering only a fixed window of the past time steps, which may not capture all relevant information. RPFB is inspired from the random projection methods [Vempala, 2004; Baraniuk and Wakin, 2009], which reduce the input dimension while preserving important properties of the data, e.g., being an approximate isometric map. It is also closely related to 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Random Kitchen Sink [Rahimi and Recht, 2009] for approximating potentially infinite-dimensional reproducing kernel Hilbert space (RKHS) with a finite set of randomly selected features. RPFB can be thought of as the dynamical system (or filter) extension of these methods. RPFB is also related to the methods in the Reservoir Computing literature [Lukoševiˇcius and Jaeger, 2009] such as Echo State Network and Liquid State Machine, in which a recurrent neural network (RNN) with random weights provides a feature vector to a trainable output layer. The difference of RPFB with them is that we are not considering an RNN as the underlying excitable dynamical system, but a set of AR filters. The algorithmic contribution of this work is the introduction of RPFB as a generic and simple to use feature extraction method for time series data (Section 3). RPFB is a particularly suitable choice for industrial applications where the available computational power is limited, e.g., a fault prognosis system for an elevator that has only a micro-controller available. For these industrial applications, the use of powerful methods such as various adaptable RNN architectures [Hochreiter and Schmidhuber, 1997; Cho et al., 2014; Oliva et al., 2017; Goodfellow et al., 2016], which learn the feature extractor itself, might be computationally infeasible. The theoretical contribution of this work is the finite sample analysis of RPFB for the task of time series prediction (Section 4). The theory has two main components. The first is a filter approximation error result, which provides an error guarantee on how well one might approximate a certain class of dynamical systems with a set of randomly generated filters. The second component is a statistical result providing a finite-sample guarantee for time series prediction with a generic class of linear systems. Combining these two, we obtain a finite-sample guarantee for the use of RPFB for time series prediction of a certain class of dynamical systems. Finally, we empirically study RPFB along several standard estimators on a range of synthetic and real-world datasets (Section 5). Our synthetic data is based on Autoregressive Moving Average (ARMA) processes. This lets us closely study various aspects of the method. Moving to real-world problems, we apply RPFB to the fault diagnosis problem from ball bearing vibration measurements. We compare the performance of RPFB with that of the fixed-window history-based approach, as well as LSTM, and we obtain promising empirical results. Due to space limitation, most of the development of the theory and experimental results are reported in the supplementary material, which is an extended version of this paper. For more empirical studies, especially in the context of fault detection and prognosis, refer to Pourazarm et al. [2017]. 2 Learning from Time Series Data Consider a sequence (X1, Y1), . . . , (XT , YT ) of dependent random variables with X ∈X and Y ∈Y. Depending on how Xt and Yt are defined, we can describe different learning/decision making problems. For example, suppose that Yt = f ∗(Xt) + εt, in which f ∗is an unknown function of the current value of Xt and εt is independent of the history X1:t = (X1, . . . , Xt) and has a zero expectation, i.e., E [εt] = 0. Finding an estimate ˆf of f ∗using data is the standard regression (or classification) problem depending on whether Y ⊂R (regression) or Y = {0, 1, . . . , c − 1} (classification). For example, suppose that we are given a dataset of m time series Dm = {(Xi,1, Yi,1), . . . , (Xi,Ti, Yi,Ti)}m i=1, each of which might have a varying length Ti. There are many methods to define an estimator for f ∗, e.g., K-Nearest Neighbourhood, decision tree, SVM, various neural networks [Hastie et al., 2001; Bishop, 2006; Wasserman, 2007; Goodfellow et al., 2016]. An important class of estimators is based on (regularized) empirical risk minimization (ERM): ˆf ←argmin f∈F 1 m m X i=1 1 Ti Ti X t=1 l(f(Xi,t), Yi,t) + λJ(f). (1) Here F : X →Y′ is a function space (e.g., an RKHS with the domain X; with Y′ = R). The loss function is l : Y′ × Y →[0, ∞), and it determines the decision problem that is being solved, e.g., l(y1, y2) = |y1 −y2|2 for the squared loss commonly used in regression. The optional regularizer (or penalizer) J(f) controls the complexity of the function space, e.g., it can be ∥f∥2 F when F is an RKHS. The difference of this scenario with more conventional scenarios in the supervised learning and statistics is that here the input data does not satisfy the usual independence assumption anymore. Learning with dependent input data has been analyzed before [Steinwart et al., 2009; Steinwart and Christmann, 2009; Mohri and Rostamizadeh, 2010; Farahmand and Szepesvári, 2012]. 2 More generally, however, Yt is not a function of only Xt, but is a function of the history X1:t, possibly contaminated by a (conditionally) independent noise: Yt = f ∗(X1:t) + εt. In the learning problem, f ∗is an unknown function. The special case of f ∗(X1:t) = f ∗(Xt) is the same as the previous setting. To learn an estimator by directly using the history X1:t is challenging as it is a time-varying vector with an ever increasing dimension. A standard approach to deal with this issue is to use a fixedwindow history-based estimator, which shall be explained next (cf. Kakade et al. [2017] for some recent theoretical results). The RPFB is an alternative approach that we describe in Section 3. In the fixed-window history-based approach (or window-based, for short), we only look at a fixed window of the immediate past values of X1:t. That is, we use samples in the form of Zt ≜Xt−H+1:t with a finite integer H that determines the length of the window. For example, the regularized least-squares regression estimator would then be ˆf ←argmin f∈F 1 m m X i=1 1 Ti −H Ti X t=H |f(Xi,t−H+1:t)) −Yi,t|2 + λJ(f), (2) which should be compared to (1). A problem with this approach is that for some stochastic processes, a fixed-sized window of length H is not enough to capture all information about the process. As a simple illustrative example, consider a simple moving average MA(1) univariate random process (i.e., X = R): Xt = U(t) + bU(t −1) = (1 + bz−1)Ut, b ∈(−1, 1) in which z−1 is the time-delay operator (cf. Z-transform, Oppenheim et al. 1999), i.e., z−1Xt = Xt−1. Suppose that Ut = U(t) (t = 1, 2, . . . ) is an unobservable random process that drives Xt. For example, it might be an independent and identically distributed (i.i.d.) Gaussian noise, which we do not observe (so it is our latent variable). To predict Yt = Xt+1 given the previous observations X1:t, we write Ut = Xt 1+bz−1 , so Xt+1 = Ut+1 + bUt = Ut+1 + b 1 + bz−1 Xt = Ut+1 + b X k≥0 (−b)kXt−k. (3) This means that Xt is an autoregressive process AR(∞). The prediction of Xt+1 requires the value of Ut+1, which is unavailable at time t, and all the past values X1:t. Since Ut+1 is unavailable, we cannot use it in our estimate, so this is the intrinsic difficulty of prediction. On the other hand, the values of X1:t are available to us and we can use them to predict Xt+1. But if we use a fixed-horizon window of the past values (i.e., only use Xt−H+1:t for a finite H ≥1), we would miss some information that could potentially be used. This loss of information is more prominent when the magnitude of b is close to 1. This example shows that even for a simple MA(1) process with unobserved latent variables, a fixed-horizon window is not a complete summary of the stochastic process. More generally, suppose that we have a univariate linear ARMA process A(z−1)Xt = B(z−1)Ut, (4) with A and B both being polynomials in z−1.1 The random process Ut is not available to us, and we want to design a predictor (filter) for Xt+1 based on the observed values X1:t. Suppose that A and B are of degree more than 1, so we can write A(z−1) = 1 + z−1A′(z−1) and B(z−1) = 1 + z−1B′(z−1).2 Assuming that A and B are both invertible, we use (4) to get Ut = B−1(z−1)A(z−1)Xt. Also we can write (4) as (1+z−1A′(z−1))Xt+1 = (1+z−1B′(z−1))Ut+1 = Ut+1 + B′(z−1)Ut. Therefore, we have Xt+1 = Ut+1 + B′(z−1)A(z−1) B(z−1) −A′(z−1) Xt = Ut+1 + B′(z−1) −A′(z−1) B(z−1) Xt. (5) So if the unknown noise process Ut has a zero mean (i.e., E [Ut|U1:t−1] = 0), the estimator ˆXt+1(X1:t) = B′(z−1) −A′(z−1) B(z−1) Xt, (6) 1We assume that A and B both have roots within the unit circle, i.e., they are stable. 2The fact that both of these polynomials have a leading term of 1 does not matter in this argument. 3 is unbiased, i.e., ˆXt+1(X1:t) = E [Xt+1|X1:t]. If we knew the model of the dynamical system (A and B), we could design the filter (6) to provide an unbiased prediction for the future values of Xt+1. If the learning problem is such that it requires us to know an estimate of the future observations of the dynamical system, this scheme would allow us to design such an estimator. The challenge here is that we often do not know A and B (or similar for other types of dynamical systems). Estimating A and B for a general dynamical system is a difficult task. The use of maximum likelihood-based approaches is prone to local minimum since U is not known, and one has to use EM-like algorithms, cf. White et al. [2015] and references therein. Here we suggest a simple alternative based on the idea of projecting the signal onto the span of randomly generated dynamical systems. This would be RPFB, which we describe next. 3 Random Projection Filter Bank The idea behind RPFB is to randomly generate many simple dynamical systems that can approximate dynamical systems such as the optimal filter in (6) with a high accuracy. Denote the linear filter in (6) as B′(z−1) −A′(z−1) B(z−1) = p(z−1) q(z−1), for two polynomials p and q, both in z−1. Suppose that deg(q) = deg(B) = dq and deg(A) = dA, then deg(p) = dp = max{dA −1, dq −1}. Assume that q has roots z1, . . . , zdq ∈C without any multiplicity. This means that q(z−1) = dq Y i=1 (z−1 −zi). In complex analysis in general, and in control engineering and signal processing in particular, the roots of q are known as the poles of the dynamical system and the roots of p are its zeros. Any discrete-time linear time-invariant (LTI) dynamical system has such a frequency domain representation.3 We have two cases of either dp < dq or dp ≥dq. We focus on the first case and describe the RPFB, and the intuition behind it. Afterwards we will discuss the second case. Case 1: Suppose that dp < dq, which implies that dA −1 < dq. We may write p(z−1) q(z−1) = dq X i=1 bi 1 −ziz−1 , (7) for some choice of bis. This means that we can write (5) as Xt+1 = Ut+1 + B′(z−1) −A′(z−1) B(z−1) Xt = Ut+1 + dq X i=1 bi 1 −ziz−1 Xt. That is, if we knew the set of complex poles Zp = {z1, . . . , zdq} and their corresponding coefficients Bp = {b1, . . . , bdq}, we could provide an unbiased estimate of Xt+1 based on X1:t. From now on, we assume that the underlying unknown system is a stable one, that is, |zi| ≤1. Random projection filter bank is based on randomly generating many simple stable dynamical systems, which is equivalent to generating many random poles within the unit circle. Since any stable LTI filter has a representation (7) (or a similar one in Case 2), we can approximate the true dynamical system as a linear combination of randomly generated poles (i.e., filters). If the number of filters is large enough, the approximation will be accurate. To be more precise, we cover the set of {z ∈C : |z| ≤1} with N(ε) random points Nε = {Z′ 1, . . . , Z′ N (ε)} such that for any zi ∈Zp, there exists a Z′ ∈Nε with |zi −Z′(zi)| < ε. Roughly 3For continuous-time systems, we may use Laplace transform instead of Z-transform, and have similar representations. 4 speaking, we require N(ε) = O(ε−2) random points to cover the unit circle with the resolution of ε. We then define the RPFB as the following set of AR filters denoted by φ(z−1):4 φ(z−1) : z−1 7→ 1 1 −Z′ 1z−1 , . . . , 1 1 −Z′ N (ε)z−1 ! . (8) With a slight abuse of notation, we use φ(X) to refer to the (multivariate) time series generated after passing a signal X = (X1, . . . , Xt) through the set of filters φ(z−1). More concretely, this means that we convolve the signal X with the impulse response of each of filters 1 1−Z′ iz−1 (i = 1, . . . , N(ε)). Recall that the impulse response of 1 1−az−1 is the sequence (at)t≥0, and the convolution X ∗Y between two sequences (Xt)t≥0 and (Yt)t≥0 is a new sequence (X ∗Y )t = X τ XτYt−τ. (9) We use [φ(X)]i ∈CN (ε) to refer to the i-th time-step of the multivariate signal φ(X1:i). The intuition of why this is a good construction is that whenever |z1 −z2| is small, the behaviour of filter 1 1−z1z−1 is similar to 1 1−z2z−1 . So whenever Nε provides a good coverage of the unit circle, there exists a sequence (b′ j) such that the dynamical system p′(z−1) q′(z−1) = φ(z−1)b′ = N (ε) X j=1 b′ j 1 −Z′ jz−1 behaves similar to the unknown p q (7). As this is a linear model, parameters b′ can be estimated using ordinary least-squares regression, ridge regression, Lasso, etc. For example, the ridge regression estimator for b′ is ˆb ←argmin b 1 m m X i=1 Ti X t=1 1 Ti |[φ(Xi)]tb −Xi,t+1|2 + λ ∥b∥2 2 . After obtaining ˆb, we define ˜X(X1:t;ˆb) = N (ε) X j=1 ˆbj 1 −Z′ jz−1 X1:t, which is an estimator of ˆX(X1:t) (6), i.e., ˆX(X1:t) ≈˜X(X1:t;ˆb). Case 2: Suppose that dp ≥dq, which implies that dA −1 ≥dq. Then, we may write p(z−1) q(z−1) = R(z−1) + ρ(z−1) q(z−1), where ρ and R are obtained by the Euclidean division of p by q, i.e., p(z−1) = R(z−1)q(z−1) + ρ(z−1) and deg(R) ≤dA −1 −dq and deg(ρ) < dq. We can write: p(z−1) q(z−1) = dA−1−dq X j=0 νjz−j + dq X i=1 bi 1 −ziz−1 . (10) This is similar to (7) of Case 1, with the addition of lag terms. If we knew the set of complex poles and their corresponding coefficients as well as the coefficients of the residual lag terms, νj, we could provide an unbiased estimate of Xt+1 based on X1:t. Since we do not know the location of poles, we randomly generate them as before. For this case, the feature set (8) should be expanded to φ(z−1) : z−1 7→ h 1, z−1, .., z−(dA−1−dq)i , 1 1 −Z′ 1z−1 , .., 1 1 −Z′ N (ε)z−1 ! , (11) 4One could generate different types of filters, for example those with nonlinearities, but in this work we focus on linear AR filters to simplify the analysis. 5 Algorithm 1 Random Projection Filter Bank // Dm = {(Xi,1, Yi,1), . . . , (Xi,Ti, Yi,Ti)}m i=1: Input data // l : Y′ × Y →R: Loss function // F: Function space // n: Number of filters in the random projection filter bank Draw Z′ 1, . . . , Z′ n uniformly random within the unit circle Define filters φ(z−1) = 1 1−Z′ 1z−1 , . . . , 1 1−Z′nz−1 for i = 1 to m do Pass the i-th time series through all the random filters φ(z−1), i.e., X′ i,1:Ti = φ(z−1) ∗Xi,1:Ti end for Find the estimator using extracted features (X′ i,1:Ti), e.g., by solving the regularized empirical risk minimization: ˆf ←argmin f∈F m X i=1 Ti X t=1 l(f(X′ i,t), Yi,t) + λJ(f). (12) return ˆf and φ which consists of a history window of length dA −1 −dq and the random projection filters. The regressor should then estimate both bis and νis in (10). RPFB is not limited to time series prediction with linear combination of filtered signals. One may use the generated features as the input to any other estimator too. RPFB can be used for other problems such as classification with time series too. Algorithm 1 shows how RPFB is used alongside a regularized empirical risk minimization algorithm. The inputs to the algorithm are the time series data Dm, with appropriate target values created depending on the problem, the pointwise loss function l, the function space F of the hypotheses (e.g., linear, RKHS, etc.), and the number of filters n in the RPFB. The first step is to create the RPFB by randomly selecting n stable AR filters. We then pass each time series in the dataset through the filter bank in order to create filtered features, i.e., the feature are created by convolving the input time series with the filters’ impulse responses. Finally, taking into account the problem type (regression or classification) and function space, we apply conventional machine learning algorithms to estimate ˆf. Here we present a regularized empirical risk minimizer (12) as an example, but other choices are possible too, e.g., decision trees or K-NN. We note that the use of φ(z−1) ∗Xi,1:Ti in the description of the algorithm should be interpreted as the convolution of the impulse response of φ(z−1), which is in the time domain, with the input signal. Remark 1. In practice, whenever we pick a complex pole Z′ = a + jb with j = √−1, we also pick its complex conjugate ¯Z′ = a −jb in order to form a single filter 1 (1−Z′z−1)(1−¯ Z′z−1). This guarantees that the output of this second-order filter is real valued. Remark 2. RPFB is described for a univariate time series Xt ∈R. To deal with multivariate time series (i.e., Xt ∈Rd with d > 1) we may consider each dimension separately and pass each one through RPFB. The filters in RPFB can be the same or different for each dimension. The state of the filters, of course, depends on their input, so it would be different for each dimension. If we have n filters and d-dimensional time series, the resulting vector X′ i,t in Algorithm 1 would be nd dimensional. Randomly choosing multivariate filters is another possibility, which is a topic of future research. Remark 3. The Statistical Recurrent Unit (SRU), recently introduced by Oliva et al. [2017], has some similarities to RPFB. SRU uses a set of exponential moving averages at various time scales to summarize a time series, which are basically AR(1) filters with real-valued poles. SRU is more complex, and potentially more expressive, than RPFB as it has several adjustable weights. On the other hand, it does not have the simplicity of RPFB. Moreover, it does not yet come with the same level of theoretical justifications as RPFB has. 4 Theoretical Guarantees This section provides a finite-sample statistical guarantee for a time series predictor that uses RPFB to extract features. We specifically focus on an empirical risk minimization-based (ERM) estimator. Note that Algorithm 1 is not restricted to time series prediction problem, or the use of ERM-based 6 estimator, but the result of this section is. We only briefly present the results, and refer the reader to the same section in the supplementary material for more detail, including the proofs and more discussions. Consider the time series (X1, X2, . . . ) with Xt ∈X ⊂[−B, B] for some finite B > 0. We denote X ∗= ∪t≥1X t. The main object of interest in time series prediction is the conditional expectation of Xt+1 given X1:t, which we denote by h∗, i.e.,5 h∗(X1:t) = E [Xt+1|X1:t] . (13) We assume that h∗belongs to the space of linear dynamical systems that has M ∈N stable poles all with magnitude less than 1 −ε0 for some ε0 > 0, and an Λ-bounded ℓp-norm on the weights: Hε0,M,p,Λ ≜ ( M X i=1 wi 1 −ziz−1 : |zi| ≤1 −ε0, ∥w∥p ≤Λ ) . (14) If the value of ε0, M, p, or Λ are clear from context, we might refer to Hε0,M,p,Λ by H. Given a function (or filter) h ∈H, here h(x1:t) refers to the output at time t of convolving a signal x1:t through h. To define RPFB, we randomly draw n ≥M independent complex numbers Z′ 1, . . . , Z′ n uniformly within a complex circle with radius 1 −ε0, i.e., |Z′ i| ≤1 −ε0 (cf. Algorithm 1). The RPFB is φ(z−1) = 1 1 −Z′ 1z−1 , . . . , 1 1 −Z′nz−1 . Given these random poles, we define the following approximation (filter) spaces ˜HΛ = ˜Hn,p,Λ = ( n X i=1 αi 1 −Z′ iz−1 : ∥α∥p ≤Λ ) . (15) Consider that we have a sequence (X1, X2, . . . , XT , XT +1, XT +2). By denoting Yt = Xt+1, we define ((X1, Y1), . . . , (XT , YT ), (XT +1, YT +1)). We assume that |Xt| is B-bounded almost surely. Define the estimator ˆh by solving the following ERM: ˆh′ ←argmin h∈˜ HΛ 1 T T X t=1 |h(X1:t) −Yt|2 , ˆh ←TrB h ˆh′i . (16) Here TrB h ˆh′i truncates the values of ˆh′ at the level of ±B. So ˆh belongs to the following space ˜HΛ,B = n TrB h ˜h i : ˜h ∈˜HΛ o . (17) A central object in our result is the notion of discrepancy, introduced by [Kuznetsov and Mohri, 2015]. Discrepancy captures the non-stationarity of the process with respect to the function space.6 of Definition 1 (Discrepancy—Kuznetsov and Mohri 2015). For a stochastic process X1, X2, . . . , a function space H : X ∗→R, and T ∈N, define ∆T (H) ≜sup h∈H ( E h |h(X1:T +1) −YT +1|2 |X1:T +1 i −1 T T X t=1 E h |h(X1:t) −Yt|2 |X1:t i) . If the value of T is clear from the context, we may use ∆(H) instead. The following is the main theoretical result of this work. 5We use h instead of f to somehow emphasize that the discussion is only for the time series prediction problem, and not general estimation problem with a time series. 6Our definition is a simplified version of the original definition (by selecting qt = 1/T in their notation). 7 Theorem 1. Consider the time series (X1, . . . , XT +2), and assume that |Xt| ≤B (a.s.). Without loss of generality suppose that B ≥1. Let 0 < ε0 < 1, M ∈N, and Λ > 0 and assume that the conditional expectation h∗(X1:t) = E [Xt+1|X1:t] belongs to the class of linear filters Hε0,M,2,Λ (14). Set an integer n ≥M for the number of random projection filters and let ˜HΛ = ˜Hn,2,Λ (15) and the truncated space be ˜HΛ,B (17). Consider the estimator ˆh that is defined as (16). Without loss of generality assume that Λ ≥ ε0 B2√n and T ≥2. Fix δ > 0. It then holds that there exists constants c1, c2 > 0 such that with probability at least 1 −δ, we have ˆh(X1:T +1) −h∗(X1:T +1) 2 ≤c1B2Λ ε0 log3(T) r n log(1/δ) T + c2B2Λ2 ε4 0 log 20n δ n + 2∆( ˜HΛ,B). The upper bounds has three terms: estimation error, filter approximation error, and the discrepancy. The O(p n T ) term corresponds to the estimation error. It decreases as the length T of the time series increases. As we increase the number of filters n, the upper bounds shows an increase of the estimation error. This is a manifestation of the effect of the input dimension on the error of the estimator. The O(n−1) term provides an upper bound to the filter approximation error. This error decreases as we add more filters. This indicates that RPFB provides a good approximation to the space of dynamical systems Hε0,M,2,Λ (14). Both terms show the proportional dependency on the magnitude B of the random variables in the time series, and inversely proportional dependency on the minimum distance ε0 of the poles to the unit circle. Intuitively, this is partly because the output of a pole becomes more sensitive to its input as it gets closer to the unit circle. Finally, the discrepancy term ∆( ˜HΛ,B) captures the non-stationarity of the process, and has been discussed in detail by Kuznetsov and Mohri [2015]. Understanding the conditions when the discrepancy gets close to zero is an interesting topic for future research. By setting the number of RP filters to n = T 1/3Λ2/3 ε2 0 , and under the condition that Λ ≤T, we can simplify the upper bound to ˆh(X1:T +1) −h∗(X1:T +1) 2 ≤ cB2Λ4/3 log3(T) q log( 1 δ ) ε2 0T 1/3 + 2∆( ˜HΛ,B), which holds with probability at least 1 −δ, for some constant c > 0. As T →∞, the error converges to the level of discrepancy term. We would like to comment that in the statistical part of the proof, instead of using the independent block technique of Yu [1994] to analyze a mixing processes [Doukhan, 1994], which is a common technique used by many prior work such as Meir [2000]; Mohri and Rostamizadeh [2009, 2010]; Farahmand and Szepesvári [2012], we rely on more recent notions of sequential complexities [Rakhlin et al., 2010, 2014] and the discrepancy [Kuznetsov and Mohri, 2015] of the function space-stochastic process couple. This theorem is for Case 1 in Section 3, but a similar result also holds for Case 2. We also mention that as the values of M, ε0, and Λ of the true dynamical system space Hε0,M,2,Λ are often unknown, the choice of number of filters n in RPFB, the size of the space M, etc. cannot be selected based on them. Instead one should use a model selection procedure to pick the appropriate values for these parameters. 5 Experiments We use a ball bearing fault detection problem to empirically study RPFB and compare it with a fixedwindow history-based approach. The supplementary material provides several other experiments, including the application of LSTM to solve the very same problem, close comparison of RPFB with fixed-window history-based approach on an ARMA time series prediction problem, and a heart rate classification problem. For further empirical studies, especially in the context of fault detection and prognosis, refer to Pourazarm et al. [2017]. Reliable operation of rotating equipments (e.g., turbines) depends on the condition of their bearings, which makes the detection of whether a bearing is faulty and requires maintenance of crucial importance. We consider a bearing vibration dataset provided by Machinery Failure Prevention 8 5 25 50 100 200 400 Features No 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Classification Error LR (RPFB) LR (Window) RF (RPFB) RF (Window) SVM (RPFB) SVM (Window) Figure 1: (Bearing Dataset) Classification error on the test dataset using RPFB and fixed-window history-based feature sets. The RPFB results are averaged over 20 independent randomly selected RPFB. The error bars show one standard error. Technology (MFPT) Society in our experiments.7 Fault detection of bearings is an example of industrial applications where the computational resources are limited, and fast methods are required, e.g., only a micro-controller or a cheap CPU, and not a GPU, might be available. The dataset consists of three univariate time series corresponding to a baseline (good condition/class 0), an outer race fault (class 1), and inner race fault (class 2). The goal is to find a classifier that predicts the class label at the current time t given the vibration time series X1:t. In a real-world scenario, we train the classifier on a set of previously recorded time series, and later let it operate on a new time series observed from a device. The goal would be to predict the class label at each time step as new data arrives. Here, however, we split each of three time series to a training and testing subsets. More concretely, we first pass each time series through RPFB (or define a fixed-window of the past H values of them). We then split the processed time series, which has the dimension of the number of RPFB or the size of the window, to the training and testing sets. We select the first 3333 time steps to define the training set, and the next 3333 data points as the testing dataset. As we have three classes, this makes the size of training and testing sets both equal to 10K. We process each dimension of the features to have a zero mean and a unit variance for both feature types. We perform 20 independent runs of RPFB, each of which with a new set of randomly selected filters. Figure 1 shows the classification error of three different classifier (Logistic Regression (LR) with the ℓ2 regularization, Random Forest (RF), and Support Vector Machine (SVM) with Gaussian kernel) on both feature types, with varying feature sizes. We observe that as the number of features increases, the error of all classifiers decreases too. It is also noticeable that the error heavily depends on the type of classifier, with SVM being the best in the whole range of number of features. The use of RPFB instead of fixed-window history-based one generally improves the performance of LR and SVM, but not for RF. Refer to the supplementary material for more detail on the experiment. 6 Conclusion This paper introduced Random Projection Filter Bank (RPFB) as a simple and effective method for feature extraction from time series data. RPFB comes with a finite-sample error upper bound guarantee for a class of linear dynamical systems. We believe that RPFB should be a part of the toolbox for time series processing. A future research direction is to better understand other dynamical system spaces, beyond the linear one considered here, and to design other variants of RPFB beyond those that are defined by stable linear autoregressive filters. Another direction is to investigate the behaviour of the discrepancy factor. 7Available from http://www.mfpt.org/faultdata/faultdata.htm. 9 Acknowledgments We would like to thank the anonymous reviewers for their helpful feedback. References Richard G. Baraniuk and Michael B. Wakin. Random projections of smooth manifolds. Foundations of computational mathematics, 9(1):51–77, 2009. 1 Christopher M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. 1, 2 Kyunghyun Cho, Bart Van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014. 2 Paul Doukhan. Mixing: Properties and Examples, volume 85 of Lecture Notes in Statistics. SpringerVerlag, Berlin, 1994. 8 Amir-massoud Farahmand and Csaba Szepesvári. Regularized least-squares regression: Learning from a β-mixing sequence. Journal of Statistical Planning and Inference, 142(2):493 – 505, 2012. 2, 8 Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. 2 Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer, 2001. 1, 2 Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. 2 Sham Kakade, Percy Liang, Vatsal Sharan, and Gregory Valiant. Prediction with a short memory. arXiv:1612.02526v2, 2017. 3 Vitaly Kuznetsov and Mehryar Mohri. Learning theory and algorithms for forecasting non-stationary time series. In Advances in Neural Information Processing Systems (NIPS - 28), pages 541–549. Curran Associates, Inc., 2015. 7, 8 Mantas Lukoševiˇcius and Herbert Jaeger. Reservoir computing approaches to recurrent neural network training. Computer Science Review, 3(3):127–149, 2009. 2 Ron Meir. Nonparametric time series prediction through adaptive model selection. Machine Learning, 39(1):5–34, 2000. 8 Mehryar Mohri and Afshin Rostamizadeh. Rademacher complexity bounds for non-i.i.d. processes. In Advances in Neural Information Processing Systems 21, pages 1097–1104. Curran Associates, Inc., 2009. 8 Mehryar Mohri and Afshin Rostamizadeh. Stability bounds for stationary φ-mixing and β-mixing processes. Journal of Machine Learning Research (JMLR), 11:789–814, 2010. ISSN 1532-4435. 2, 8 Junier B. Oliva, Barnabás Póczos, and Jeff Schneider. The statistical recurrent unit. In Proceedings of the 34th International Conference on Machine Learning (ICML), volume 70 of Proceedings of Machine Learning Research, pages 2671–2680. PMLR, August 2017. 2, 6 Alan V. Oppenheim, Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Prentice Hall, second edition, 1999. 3 Sepideh Pourazarm, Amir-massoud Farahmand, and Daniel N. Nikovski. Fault detection and prognosis of time series data with random projection filter bank. In Annual Conference of the Prognostics and Health Management Society (PHM), pages 242–252, 2017. 2, 8 Ali Rahimi and Benjamin Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Advances in Neural Information Processing Systems (NIPS 21), pages 1313–1320, 2009. 2 10 Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Online learning: Random averages, combinatorial parameters, and learnability. In Advances in Neural Information Processing Systems (NIPS - 23), 2010. 8 Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Sequential complexities and uniform martingale laws of large numbers. Probability Theory and Related Fields, 2014. 8 Ingo Steinwart and Andreas Christmann. Fast learning from non-i.i.d. observations. In Advances in Neural Information Processing Systems (NIPS - 22), pages 1768–1776. Curran Associates, Inc., 2009. URL http://papers.nips.cc/paper/ 3736-fast-learning-from-non-iid-observations.pdf. 2 Ingo Steinwart, Don Hush, and Clint Scovel. Learning from dependent observations. Journal of Multivariate Analysis, 100(1):175–194, 2009. 2 Santosh S. Vempala. The Random Projection Method. DIMACS Series in Discrete Mathematics and Theoretical Computer Science. American Mathematical Society, 2004. ISBN 9780821837931. 1 Larry Wasserman. All of Nonparametric Statistics (Springer Texts in Statistics). Springer, 2007. 1, 2 Martha White, Junfeng Wen, Michael Bowling, and Dale Schuurmans. Optimal estimation of multivariate ARMA models. In Proceedings of the 29th AAAI Conference on Artificial Intelligence (AAAI), 2015. 4 Bin Yu. Rates of convergence for empirical processes of stationary mixing sequences. The Annals of Probability, 22(1):94–116, January 1994. 8 11 | 2017 | 528 |
7,039 | Dynamic Revenue Sharing∗ Santiago Balseiro Columbia University New York City, NY srb2155@columbia.edu Max Lin Google New York City, NY whlin@google.com Vahab Mirrokni Google New York City, NY mirrokni@google.com Renato Paes Leme Google New York City, NY renatoppl@google.com Song Zuo† Tsinghua University Beijing, China songzuo.z@gmail.com Abstract Many online platforms act as intermediaries between a seller and a set of buyers. Examples of such settings include online retailers (such as Ebay) selling items on behalf of sellers to buyers, or advertising exchanges (such as AdX) selling pageviews on behalf of publishers to advertisers. In such settings, revenue sharing is a central part of running such a marketplace for the intermediary, and fixedpercentage revenue sharing schemes are often used to split the revenue among the platform and the sellers. In particular, such revenue sharing schemes require the platform to (i) take at most a constant fraction α of the revenue from auctions and (ii) pay the seller at least the seller declared opportunity cost c for each item sold. A straightforward way to satisfy the constraints is to set a reserve price at c/(1−α) for each item, but it is not the optimal solution on maximizing the profit of the intermediary. While previous studies (by Mirrokni and Gomes, and by Niazadeh et al) focused on revenue-sharing schemes in static double auctions, in this paper, we take advantage of the repeated nature of the auctions. In particular, we introduce dynamic revenue sharing schemes where we balance the two constraints over different auctions to achieve higher profit and seller revenue. This is directly motivated by the practice of advertising exchanges where the fixed-percentage revenue-share should be met across all auctions and not in each auction. In this paper, we characterize the optimal revenue sharing scheme that satisfies both constraints in expectation. Finally, we empirically evaluate our revenue sharing scheme on real data. 1 Introduction The space of internet advertising can be divided in two large areas: search ads and display ads. While similar at first glance, they are different both in terms of business constraints in the market as well as algorithmic challenges. A notable difference is that in search ads the auctioneer and the seller are the same party, as the same platform owns the search page and operates the auction. Thus search ads are a one-sided market: the only agents outside the control of the auctioneer are buyers. In display ads, on the other hand, the platform operates the auction but, in most cases, it does not own the pages in ∗We thank Jim Giles, Nitish Korula, Martin Pál, Rita Ren and Balu Sivan for the fruitful discussion and their comments on early versions of this paper. We also thank the anonymous reviewers for their helpful comments. A full version of this paper can be found at https://ssrn.com/abstract=2956715. †The work was done when this author was an intern at Google. This author was supported by the National Basic Research Program of China Grant 2011CBA00300, 2011CBA00301, the Natural Science Foundation of China Grant 61033001, 61361136003, 61303077, 61561146398, a Tsinghua Initiative Scientific Research Grant and a China Youth 1000-talent program. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. which the ads are displayed, making the main problem the design of a two-sided market, referred to as ad exchanges. The problem of designing an ad exchange can be decomposed in two parts: the first is to design an auction, which will specify how an ad impression will be allocated among different prospective buyers (advertisers) and how they will be charged from it. The second component is a revenue sharing scheme, which specifies how the revenue collected from buyers will be split between the seller (the publisher) and the platform. Traditionally the problems of designing an auction and designing a revenue sharing scheme have been merged in a single one called double auction design. This was the traditional approach taken by [4], [3] and more recently in the algorithmic work of [2, 5]. The goals in those approaches have been to maximize efficiency in the market, maximize profit of the platform and to characterize when the profit maximizing policy is a simple one. Those objectives however, do not entirely correspond to actual problem faced by advertising exchanges. Take platform-profit-maximization, for example. The ad-exchange business is a highly competitive environment. A web publisher (seller) can send their ad impressions to a dozen of different exchanges. If an exchange tries to extract all the surplus in the form of profit, web publishers will surely migrate to a less greedy platform. In order to retain their inventory, exchanges must align their incentives with the incentives of those of web publishers. A good practical solution, which has been adopted by multiple real world platforms, is to declare a fixed revenue sharing scheme. The exchange promises it will keep at most an α-fraction of profits, where the constant α is typically the outcome of a business negotiation between the exchange and the web publisher. After the fraction is agreed, the objective of the seller and the exchange are aligned. The exchange maximizes profits by maximizing the seller’s revenue. If revenue sharing was the only constraint, the exchange could simply ignore sellers and run an optimal auction among buyers. In practice, however, web-publishers have outside options, typically in the form of reservation contracts, which should be taken into account by the exchange. Reservation contracts are a very traditional form of selling display ads that predates ad exchanges, where buyers and sellers make agreements offline specifying a volume of impressions to be transacted, a price per impression and a penalty for not satisfying the contract. Those agreements are entered in a system (for example Google’s Doubleclick for Publishers) that manages reservations on behalf of the publisher. This reservation system determines for each arriving impression the best matching offline contract that impression could be allocated to as well as the cost of not allocating that impression. The cost of not allocating an impression takes into account the potential revenue from allocating to a contract and the probability of paying a penalty for not satisfying the contract. From our perspective, it is irrelevant how a cost is computed by reservation systems. It is sufficient to assume that for each impression, the publisher has an opportunity cost and it is only willing to sell that particular impression in the exchange if its payout for that impression exceeds the cost. Exchanges therefore, allow the publisher to submit a cost and only sell that impression if they are able to pay the publisher at least the cost per that impression. We design the following simple auction and revenue sharing scheme that we call the naïve policy: • seller sends to the exchange an ad impression with cost c. • exchange runs a second price auction with reserve r ≥c/(1 −α). • if the item is sold the exchange keeps an α fraction of the revenue and sends the remaining 1 −α fraction to the seller. This scheme is pretty simple and intuitive for each participant in the market. It guarantees that if the impression is sold, the revenue will be at least c/(1 −α) and therefore the seller’s payout will be at least c. So both the minimum payout and revenue sharing constraints are satisfied with probability 1. This scheme has also the advantage of decoupling the auction and the revenue sharing problem. The platform is free to use any auction among the buyers as long as it guarantees that whenever the impression is matched, the revenue extracted from buyers is at least c/(1 −α). Despite being simple, practical and allowing the exchange to experiment with the auction without worrying about revenue sharing, this mechanism is sub-optimal both in terms of platform profit and publisher payout. The exchange might be willing to accept a revenue share lower than α if this grants more freedom in optimizing the auction and extracting more revenue. More generally, the exchange might exploit the repeated nature of the auction to improve revenue even further by adjusting the revenue share dynamically based on the bids and the cost. In this setting, 2 we can think of the revenue share constraints to be enforced on average, i.e., over a sequence of auctions the platform is required to bound by α the ratio of the aggregate profit and the aggregate revenue collected from buyers. This allows the platform to increase the revenue share on certain queries and reduce in others. In the repeated auctions setting, the exchange is also allowed to treat the minimum cost constraint on aggregate: the payout for the seller needs to be at least as large as the sum of costs of the impressions matched. The exchange can implement this in practice by always paying the seller at least his cost even if the revenue collected from buyers is less than the cost. This would cause the exchange to operate at a loss for some impressions. But this can be advantageous for the exchange on aggregate if it is able to offset these losses by leveraging other queries with larger profit margins. In this paper, we attempt to characterize the optimal scheme for repeated auctions and measure on data the improvement with respect to the simple revenue sharing scheme discussed above. Finally, while we discuss the main application of our results in the context of advertising exchanges, our model and results apply to the broad space of platforms that serve as intermediaries between buyers and sellers, and help run many repeated auctions over time. The issue of dynamic revenue sharing also arises when Amazon or eBay act as a platform and splits revenues from a sale with the sellers, or when ride-sharing services such as Uber or Lyft split the fare paid by the passenger between the driver and the platform. Uber for example mentions in their website3 that: “Drivers using the partner app are charged an Uber Fee as a percentage of each trip fare. The Uber Fee varies by city and vehicle type and helps Uber cover costs such as technology, marketing and development of new features within the app.” 1.1 Our Results and Techniques We propose different designs of auctions and revenue sharing policies in exchanges and analyze them both theoretically and empirically on data from a major ad exchange. We compare against the naïve policy described above. We compare policies in terms of seller payout, exchange profit and match-rate (number of impressions sold). We note that match-rate is an important metric in practice, since it represents the volume of inventory transacted in the exchange and it is a proxy for the volume of the ad market this particular exchange is able to capture. For the auction, we restrict our attention to second price auctions with reserve prices, since we aim at using theory as a guide to inform decisions about practical designs that can be implemented in real ad-exchanges. To be implementable in practice the designs need to follow the industry practice of running second-price auctions with reserves. This design will be automatically incentive compatible for buyers. On the seller side, instead of enforcing incentive compatibility, we will assume that impression costs are reported truthfully. Note that the revenue sharing contract guarantees, at least partially, when the constraint binds (which always happens in practice), the goals of the seller and the platform are partially aligned: maximizing profit is the same as maximizing revenue. Thus, sellers have little incentive to misreport their costs. In fact, this is one of the main reason that so many real-world platforms such as Uber adopt fixed revenue sharing contracts. In the ads market, moreover, sellers are also typically viewed as less strategic and reactive agents. Thus, we believe that the latter assumption is not too restrictive in practice.4 We will also assume Bayesian priors on buyer’s valuations and on seller’s costs. For the sake of simplicity, we will start with the assumption that seller costs are constant and show in the full version how to extend our results to the case where costs are sampled from a distribution. We will focus on the exchange profit as our main objective function. While this paper will take the perspective of the exchange, the policies proposed will also improve seller’s payout with respect to the naïve policy. The reason is simple: the naïve policy keeps exactly α fraction of the revenue extracted from buyers as profit. Any policy that keeps at most α and improves profit, should improve revenue extracted from buyers at least at the same rate and hence improve seller’s payout. Single Period Revenue Sharing. We first study the case where exchange is required to satisfy the revenue sharing constraint in each period, i.e., for each impression at most an α-fraction of the 3See https://www.uber.com/info/how-much-do-drivers-with-uber-make/ 4While in this paper we focus on the dynamic optimization of revenue sharing schemes when agents report truthfully, it is still an interesting avenue of research to study the broader market design question of designing dynamic revenue sharing schemes while taking into account agents’ incentives. 3 revenue can be retained as profit. We characterize the optimal policy. We first show that the optimal policy always sets the reserve price above the seller’s cost, but not necessarily above c/(1 −α). The exchange might voluntarily want to decrease its revenue share if this grants freedom to set lower reserve prices and extract more revenue from buyers. When the opportunity cost of the seller is low, the optimal policy for the exchange ignores the seller’s cost and prices according to the optimal reserve price. When the opportunity cost is high, pricing according to c/(1 −α) is again not optimal because demand is inelastic at that price. The exchange internalizes the opportunity cost, prices between c and c/(1 −α), and reduces its revenue share if necessary. For intermediate values of the opportunity cost, the exchange is better off employing the naïve policy and pricing according to c/(1 −α). Multi Period Revenue Sharing. We then study the case where the revenue share constraint is imposed over the aggregate buyers’ payments. We provide intuition on the structure of the optimal policy by first solving a Lagrangian relaxation and then constructing an asymptotically optimal heuristic policy (satisfying the original constraints) based on the optimal relaxation solution. In particular, we introduce a Lagrange multiplier for the revenue sharing constraint to get the optimal solution to the Lagrangian relaxation. The optimal revenue sharing policy obtained from the Lagrangian relaxation pays the publisher a convex combination between his cost c and a fraction (1 −α) of the revenue obtained from buyers. Depending on the value of the multiplier, the reserve price could be below c, exposing the platform to the possibility of operating at a loss in some auctions. The policy obtained from the Lagrangian relaxation, while intuitive, only satisfies the revenue sharing and cost constraints in expectation. Because this is not feasible for the platform, we discuss heuristic policies that approximate that policy in the limit, but satisfy the constraints surely in aggregate over the T periods. Then we discuss an even stronger policy that satisfies the aggregate constraints for any prefix, i.e., at any given time t, the constraints are satisfied in aggregate from time 1 to t. Comparative Statics. We compare the structure of the single period and multi period policies. The first insight is that the optimal multi-period policy uses lower reserve prices therefore matching more queries. The key insight we obtain from the comparison is that multi-period revenue sharing policies are particularly effective when markets are thick, i.e. when a second highest bid is above a rescaled version of the cost often and cost are not too high. Empirical Insights. To complement our theoretical results, we conduct an empirical study simulating our revenue sharing policies on real world data from a major ad exchange. The data comes from bids in a second price auction with reserves (for a single-slot), which is truthful. Our study confirms the effectiveness of the multi period revenue sharing policies and single period revenue sharing policies over the naïve policy. The results are consistent for different values of α: the profit lifts of single period revenue sharing policies are +1.23% ∼+1.64% and the lifts of multi period revenue sharing policies are roughly 5.5 to 7 times larger (+8.53% ∼+9.55%). We do an extended overview in Section 7, but leave the further details to the full version. We omit the related work here, which can be can be found in the full version. 2 Preliminaries Setting. We study a discrete-time finite horizon setting in which items arrive sequentially to an intermediary. We index the sequence of items by t = 1, . . . , T. There are multiple buyers bidding in the intermediary (the exchange) and the intermediary determines the winning bidder via a second price auction. We assume that the bids from the buyers are drawn independently and identically distributed across auctions, but potentially correlated across buyers for a given auction. We will assume that the profit function of the joint distribution of bids is quasi-concave. The expected profit function corresponds to the expected revenue of a second price auction with reserve price r and opportunity cost c: Π(r, c) = E 1{bf ≥r} (max(r, bs) −c) . where bf t and bs t are the highest- and second-highest bid at time t. Our assumption on the bid distribution will be as follows: Assumption 2.1. The expected profit function Π(r, c) is quasi-concave in r for each c. 4 The previous assumption is satisfied, for example, if bids are independent and identically distributed according to a distribution with increasing hazard rates (see, e.g., (author?) [1]). Mechanism. The seller submitting the items sets an opportunity cost of c ≥0 for the items. The profit of the intermediary is the difference between the revenue collected from the buyers and the payments made to the seller. The intermediary has agreed to a revenue sharing scheme that limits the profit of the intermediary to at most α ∈(0, 1) of the total revenue collected from the buyers. The intermediary implements a non-anticipative adaptive policy π that maps the history at time t to a reserve price rπ t ∈R+ for the second price auction and a payment function pπ t : R+ →R+ that determines the amount to be paid to the seller as a function of the buyers’ payments. That is, the item is sold whenever the highest bid is above the reserve price, or equivalently bf t ≥rπ t . The intermediary’s revenue is equal to the buyers’ payments of max(rπ t , bs t) and the seller’s revenue is given by pπ t (max(rπ t , bs t)). The intermediary’s profit is given by the difference of the buyers’ payments and the payments to the seller, i.e., max(rπ t , bs t) −pπ t (max(rπ t , bs t)). From the perspective of the buyers, the mechanism implemented by the intermediary is a second price auction with (potentially dynamic) reserve price rπ t . The intermediary’s problem amounts to maximizing profits subject to the revenue sharing constraint. The revenue sharing constraint can be imposed at every single period or over multiple periods. We discuss each model at a time. Naïve revenue sharing scheme. The most straightforward revenue sharing scheme is the one that sets a reserve above c/(1 −α) and pay the sellers a (1 −α)-fraction of the revenue: rπ t ≥ c 1−α, pπ t (x) = (1 −α)x. (1) Since the revenue sharing is fixed, the intermediary’s profit is given by α max(rπ t , bs t). Thus, the intermediary optimizes profits by optimizing revenues, and the optimal reserve price is given by: r∗= arg maxr≥c/(1−α) Π(r, 0) . The naïve revenue sharing scheme sets a reserve above c/(1 −α) and pays the seller (1 −α) of the buyers’ payments. This guarantees that the payment to the seller is always no less than c, by construction, because the payment of the buyers is at least the reserve price. Since the intermediary’s profit is a fraction α of the buyers’ payment, the seller’s cost does not appear in the objective, and the objective of the seller is αΠ(r, 0). Note, however, that the seller’s cost does appear as a constraint in the intermediary’s optimization problem: the reserve price should be at least c/(1 −α). This is the baseline that we will use to compare the proposed policies with in the experiment section. This policy is suboptimal for various reasons. Consider for example the extreme case where the buyers alway bid more than c and less than c/(1 −α). In this case, the profit from the naïve revenue sharing scheme is zero. However, the intermediary can still obtain a non-zero profit by setting the reserve somewhere between c and c/(1 −α), which results in a revenue share less than α. If the revenue sharing constraint is imposed over multiple periods instead of each single period, we are able to dynamically balance out the deficit and surplus of the revenue sharing constraint over time. 3 Single Period Revenue Sharing Scheme In this case the revenue sharing scheme imposes that in every single period the profit of the intermediary is at most α of the buyers’ payment. We start by formulating the profit maximization problem faced by the intermediary as a mathematical program with optimal value JS. JS ≜max π PT t=1 E 1{bf t ≥rπ t } (max(rπ t , bs t) −pπ t (max(rπ t , bs t))) (2a) s.t. pπ t (x) ≥(1 −α)x , ∀x (2b) pπ t (x) ≥c , ∀x . (2c) The objective (2a) gives the profit of the intermediary as the difference between the payments collected from the buyers and the payments made to the seller. The revenue sharing constraint (2b) imposes that intermediary’s profit is at most a fraction α of the total revenue, or equivalently (x −pπ t (x))/x ≤α where x is the payment from the buyers. The floor constraint (2c) imposes that the seller is paid at least c. These constraints are imposed at every auction. We next characterize the optimal decisions of the seller in the single period model. Some definitions are in order. Let r∗(c) be an optimal reserve price in the second price auction if the seller’s cost is c: r∗(c) = arg maxr≥0 Π(r, c). 5 To avoid trivialities we assume that the optimal reserve price is unique. Because the profit function Π(r, c) has increasing differences in (r, c) then the optimal reserve price is non-decreasing with the cost, that is, r∗(c) ≥r∗(c′) for c ≥c′. Our main result in this section characterizes the optimal decision of the intermediary in this model. Theorem 3.1. The optimal decision of the intermediary is to set pπ t (x) = max(c, (1 −α)x) and rπ t = max{min{¯c, r∗(c)}, r∗(0)} where ¯c = c/(1 −α). The reserve price ¯c = c/(1 −α) in the above theorem is the naïve reserve price that satisfies the revenue sharing scheme by inflating the opportunity cost by 1/(1 −α). When the opportunity cost c is very low (¯c ≤r∗(0)), pricing according to ¯c is not optimal because demand is elastic at ¯c and the intermediary can improve profits by increasing the reserve price. Here the intermediary ignores the opportunity cost, prices optimally according to rπ t = r∗(0) and pays the seller according to pπ t (x) = (1 −α)x. When the opportunity cost c is very high (¯c ≥r∗(c)), pricing according to ¯c is again not optimal because demand is inelastic at ¯c and the intermediary can improve profits by decreasing the reserve price. Here the intermediary internalizes the opportunity cost, prices optimally according to rπ t = r∗(c) and pays the seller according to pπ t (x) = max(c, (1 −α)x). 4 Multi Period Revenue Sharing Scheme In this case the revenue sharing scheme imposes that the aggregate profit of the intermediary is at most α of the buyers’ aggregate payment. Additionally, in this model the opportunity costs are satisfied on an aggregate fashion over all actions, that is, the payments to the seller need to be at least the floor price times the number of items sold. The intermediary decision’s problem can be characterized by the following mathematical program with optimal value JM, where xπ t = max(rπ t , bs t) JM ≜maxπ PT t=1 E 1{bf t ≥rπ t } (xπ t −pπ t (xπ t )) (3a) s.t. PT t=1 1{bf t ≥rπ t } (pπ t (xπ t ) −(1 −α)xπ t ) ≥0 , (3b) PT t=1 1{bf t ≥rπ t } (pπ t (xπ t ) −c) ≥0 , . (3c) The objective (3a) gives the profit of the intermediary as the difference between the payments collected from the buyers and the payments made to the seller. The revenue sharing constraint (3b) imposes that intermediary’s profit is at most a fraction α of the total revenue. The floor constraint (3c) imposes that the seller is paid at least c. These constraints are imposed over the whole horizon. The stochastic decision problem (3) can be solved via Dynamic Programming. To provide some intuition of the structure of the optimal solution we solve a Lagrangian relaxation of the problem where we introduce a dual variable λ ≥0 for the floor constraint (3c) and a dual variable µ ≥0 for the revenue sharing constraint (3b). Lagrangian relaxations provide upper bounds on the optimal objective value and introduce heuristic policies of provably good performance in many settings (e.g., see [7]). Moreover, we shall see the optimal policy derived from the Lagrangian relaxation is optimal for problem (3) if constraints (3c) and (3b) are imposed in expectation instead of almost surely: Theorem 4.1. Let µ∗∈arg min0≤µ≤1 ˆφ(µ). The policy pπ t (x) = (1 −µ∗)c + µ∗(1 −α)x and rπ t = r∗(c(µ∗)) is optimal for problem (3) when constraints (3c) and (3b) are imposed in expectation instead of almost surely, where ˆφ(µ) ≜T 1 −µ(1 −α) supr Π r, (1−µ)c 1−µ(1−α) . Remark 4.2. Although the multi period policy proposed is not a solution to the original program (3), we emphasize that it naturally induces heuristic policies (e.g., see Algorithm 1) that are asymptotically optimal solutions to the original multi period problem (3) without relaxation (see Theorem 6.1). 5 Comparative Analysis We first compare the optimal reserve price of the single period and multi period model. Proposition 5.1. Let rS ≜max{min{¯c, r∗(c)}, r∗(0)} be the optimal reserve price of the single period constrained model and rM ≜r∗(c(µ∗)) be the optimal reserve price of the multi period constrained model. Then rS ≥rM. 6 The previous result shows that the reserve price of the single-period constrained model is larger or equal than the one of the multi-period constrained model. As a consequence, in the multi-period constrained model items are allocated more frequently and the social welfare is larger. We next compare the intermediary’s optimal profit under the single period and multi period model. This result quantifies the benefits of dynamic revenue sharing and provides insight into when dynamic revenue sharing is profitable for the intermediary. Proposition 5.2. Let µS ∈[0, 1] be such that r∗(c(µS)) = rS. Then JS ≤JM ≤JS + (1 −µS)TE [(1 −α)bs −c]+ . The previous result shows that the benefit of dynamic revenue sharing is driven, to a large extent, by the second-highest bid and the opportunity cost c. If the market is thin and the second-highest bid bs is low, then the truncated expectation E ≜E [(1 −α)bs −c]+ is low and the benefit from dynamic revenue sharing is small, that is, JS ∼JM. If the market is thick and the second-highest bid bs is high, then the benefit of dynamic revenue sharing depends on the opportunity cost c. If the floor price c is very low, then rS = r∗(0) and µS = 1, implying that the coefficient in front of E is zero, and there is no benefit of dynamic revenue sharing JS = JM. If the floor price c is very high, then rS = r∗(c) and µS = 0, implying that the coefficient in front of E is 1. However, in this case the truncated expectation E is small and again there is little benefit of dynamic revenue sharing, that is, JS ∼JM. Thus the sweet spot for dynamic revenue sharing is when the second-highest bid is high and the opportunity cost is neither too high nor too low. 6 Heuristic Revenue Sharing Schemes So far we focused on the theory of revenue sharing schemes. We now switch our focus to applying insights derived from theory to the practical implementation of revenue sharing schemes. First we note that while the policy in the statement of Theorem 4.1 is only guaranteed to satisfy constraints in expectations, a feasible policy of the stochastic decision problems should satisfy the constraints in an almost sure sense. We start then by providing two transformations that convert a given policy satisfying constraints in expectation to another policy satisfying the constraints in every sample path. 6.1 Multi-period Refund Policy Our first transformation will keep track of how much each constraint is violated and will issue a refund to the seller in the last period (see Algorithm 1). ALGORITHM 1: Heuristic Refund Policy from Lagrangian Relaxation 1: Determine the optimal dual variable µ∗∈arg min0≤µ≤1 ˆφ(µ) 2: for t = 1, . . . , T do 3: Set the reserve price rπ t = r∗(c(µ∗)) 4: if item is sold, that is, bf t ≥rπ t then 5: Collect the buyers’ payment xπ t = max(rπ t , bs t) 6: Pay the seller pπ t (xπ t ) = (1 −µ∗)c + µ∗(1 −α)xπ t 7: end if 8: end for 9: Let DF = PT t=1 1{bf t ≥rπ t } (pπ t (xπ t ) −c) be the floor deficit. 10: Let DR = PT t=1 1{bf t ≥rπ t } (pπ t (xπ t ) −(1 −α)xπ t ) be the revenue sharing deficit. 11: Pay the seller −min{DF , DR, 0} The following result analyzes the performance of the heuristic policy. We omit the proof as this is a standard result in the revenue management literature. Theorem 6.1 (Theorem 1, [7]). Let JH be the expected performance of the heuristic policy. Then JH ≤JM ≤JH + O( √ T). The previous result shows that the heuristic policy given by Algorithm 1 is asymptotically optimal for the multi-period constrained model, that is, it implies that JH/JM →1 as T →∞. When the 7 number of auctions is large, by the Law of Large Numbers, stochastic quantities tend to concentrate around their means. So the floor and revenue sharing deficits incurred by violations of the respective constraints are small relative to the platform’s profit and the policy becomes asymptotically optimal. Prefix and Hybrid Revenue Sharing Policies. We also propose several other policies satisfying even more stringent business constraints: revenue sharing constraints can be satisfied in aggregate over all past auctions at every point in time. Construction details could be found in the full version. 7 Overview of Empirical Evaluation In this section, we use anonymized real bid data from a major ad exchange to evaluate the policies discussed in previous sections. Our goal will be to validate our insights on data. In the theoretical part of this paper we made simplifying assumptions, that not necessarily hold on data. For example, we assume quasi-concavity of the expected profit function Π(r, c). Even though this function is not concave, we can still estimate it from data and optimize using linear search. Our theoretical results also assume we have access to distributions of buyers’ bids. We build such distributions from past data. Finally, in our real data set bids are not necessarily stationary and identically distributed over time. Even though there might be inaccuracies from bids changing from one day to another, our revenue sharing policies are also robust to such non-stationarity. Data Sets The data set is a collection of auction records, where each record corresponds to a real time auction for an impression and consists of: (i) a seller (publisher) id, (ii) the seller declared opportunity cost, and (iii) a set of bid records. The maximum revenue share α that the intermediary could take is set to be a constant. To show that our results do not rely on the selection of this constant, we run the simulation for different values of α (α = 0.15, 0.2, 0.25), while due to the limit of space, we only present the numbers for α = 0.25 and refer the readers to the full version for more details. Our data set will consist of a random sample of auctions from 20 large publishers over the period of 2 days. We will partition the data set in a training set consisting of data for the first day and a testing set consisting of data for the second day. Preprocessing Steps Before running the simulation, we need to do some preprocessing of the data set. The goal of the preprocessing is to learn the parameters required by the policies we introduced for each seller, in particular, the optimal reserve function r∗and the optimal Lagrange multiplier µ∗. We will do this estimation using the training set, i.e., the data from the first day. The first problem is to estimate Π(r, c) and r∗(c). To estimate Π(r, c) for a given impression we look at all impressions in the training set with the same seller and obtain a list of (bf, bs) pairs. We build the empirical distribution where each of those pairs is picked with equal probability. This allows us to evaluate and optimize Π(r, c) with a single pass over the data using the technique described in [6]. For each seller, to estimate µ∗, we enumerate different µ’s from the discretization of [0, 1] (denoted by D) and evaluate the profits of these policies on the training set. Then the estimation (ˆµ∗) of µ∗is the µ that yields the maximum profit on the training set, i.e., ˆµ∗≜arg maxµ∈D ˆ profit(µ) 7.1 Evaluating Revenue Sharing Policies We will evaluate the different policies discussed in the paper on testing set (day 2 of the data set) using the parameters ˆr∗(c) and ˆµ∗learned from the training set during preprocessing. For each revenue sharing policy we evaluate, we will be concerned with the following metrics: profit of the exchange, payout to the sellers, match rate which corresponds the number of impressions allocated, revenue extracted from buyers and buyers values which is the sum of highest bids over allocated impressions (we assume that buyers report their values truthfully in the second-price auction). In addition, the average intermediary’s revenue share will be calculated. The policies evaluated will be the following: NAIVE: naïve policy (Section 2), SINGLE: single period policy (Section 3), REFUND: multi period refund policy (Algorithm 1), PREFIX and HYBRID.5 In Table 1, we report the results of the policies described above or α = 0.25 (see the full version for more values of α). The metrics are reported with respect to the NAIVE policy. In other words, the cell in the table corresponding to revenue of policy P is the revenue lift of P with respect to 5The details of policy PREFIX and HYBRID are omitted here, see the full version for further details. 8 policy profit payout match rate revenue buyers values rev. share NAIVE 0.00% 0.00% 0.00% 0.00% 0.00% 25.00% SINGLE +1.64% +2.97% +1.07% +2.64% +1.39% 24.76% REFUND +9.55% +9.57% +10.71% +9.56% +9.64% 25.00% PREFIX −1.00% +2.16% −18.51% +1.37% −2.90% 24.41% HYBRID +4.61% +6.90% +6.74% +6.33% +4.55% 24.60% Table 1: Performance of the policies for α = 0.25. NAIVE: revenue lift(P) = revenue(P)/revenue(NAIVE) −1. The only metric that is not reported as a percentage lift is the revenue share in the last column: rev share(P) = profit(P)/revenue(P). Interpreting Simulation Results What conclusions can we draw from the lift numbers? The first conclusion is that even though the theoretical model deviates from practice in a number of different ways (concavity of Π(r, c), precise distribution estimates, stationarity of bids), we are still able to improve over the naïve policy. Notice that the naïve policy implements the optimal reserve price subject to a fixed revenue sharing policy. So all the gains from reserve price optimization are already accounted for in our baseline. We start by observing that even for SINGLE, which is a simple policy, we are able to considerably improve over NAIVE across all performance metrics. This highlights that the observation that “profit and revenue can be improved by reducing the share taken by the exchange” is not only a theoretical possibility, but a reality on real-world data. Next we compare the lifts of SINGLE, which enforces revenue sharing constraints per impression, versus REFUND, which enforces constraints in aggregate. We can see that the lift is 5.8 times larger for REFUND compared to SINGLE. For α = 0.25, the lift6 for SINGLE is +1.64% while REFUND is +9.55%. This shows the importance of optimizing revenue shares across all auctions instead of per auction. Additionally, we observe that the match rate and buyers values of REFUND are higher than those of SINGLE. This is in agreement with Proposition 5.1: because the reserve price of the single-period constrained model is typically larger than the one of the multi-period constrained model, we expect REFUND to clear more auctions, which in turns leads to higher buyer values. Finally, we birefly analyze the performance of PREFIX and HYBRID policies. While PREFIX is proposed to guarantee more stringent constraints, it fails to have a positive impact on profit. Instead, with some slight modifications, HYBRID is able to overcome these shortcomings by granting the intermediary more freedom in picking reserve prices. As a result, we obtain a policy that is consistently better than SINGLE. Even though not as good as REFUND in terms of revenue lift, HYBRID satisfied the more stringent constraints that are not necessarily satisfied by REFUND. To sum up, the policies can be ranked as follows in terms of performance: REFUND ≻HYBRID ≻SINGLE ≻NAIVE ∼PREFIX. References [1] Santiago R. Balseiro, Jon Feldman, Vahab Mirrokni, and S. Muthukrishnan. Yield optimization of display advertising with ad exchange. Management Science, 60(12):2886–2907, 2014. [2] Renato Gomes and Vahab S. Mirrokni. Optimal revenue-sharing double auctions with applications to ad exchanges. In 23rd International World Wide Web Conference, WWW ’14, 2014, pages 19–28, 2014. [3] R Preston McAfee and John McMillan. Auctions and bidding. Journal of economic literature, 25(2):699– 738, 1987. [4] R. Myerson and M. Satterthwaite. Efficient mechanisms for bilateral trading. Journal of Economics Theory (JET), 29:265–281, 1983. [5] Rad Niazadeh, Yang Yuan, and Robert D. Kleinberg. Simple and near-optimal mechanisms for market intermediation. In Web and Internet Economics, WINE 2014. Proceedings, pages 386–399, 2014. [6] Renato Paes Leme, Martin Pál, and Sergei Vassilvitskii. A field guide to personalized reserve prices. In Proceedings of WWW, pages 1093–1102, 2016. [7] Kalyan Talluri and Garrett van Ryzin. An analysis of bid-price controls for network revenue management. Management Science, 44(11):1577–1593, 1998. 6The reader might ask how to interpret lift numbers. The annual revenue of display advertising exchanges is on the order of billions of dollars. At that scale, 1% lift corresponds to tens of millions of dollars in incremental annual revenue. We emphasize that this lift is in addition to that obtained by reserve price optimization. 9 | 2017 | 529 |
7,040 | When Worlds Collide: Integrating Different Counterfactual Assumptions in Fairness Chris Russell∗ The Alan Turing Institute and University of Surrey crussell@turing.ac.uk Matt J. Kusner∗ The Alan Turing Institute and University of Warwick mkusner@turing.ac.uk Joshua R. Loftus† New York University loftus@nyu.edu Ricardo Silva The Alan Turing Institute and University College London ricardo@stats.ucl.ac.uk Abstract Machine learning is now being used to make crucial decisions about people’s lives. For nearly all of these decisions there is a risk that individuals of a certain race, gender, sexual orientation, or any other subpopulation are unfairly discriminated against. Our recent method has demonstrated how to use techniques from counterfactual inference to make predictions fair across different subpopulations. This method requires that one provides the causal model that generated the data at hand. In general, validating all causal implications of the model is not possible without further assumptions. Hence, it is desirable to integrate competing causal models to provide counterfactually fair decisions, regardless of which causal “world” is the correct one. In this paper, we show how it is possible to make predictions that are approximately fair with respect to multiple possible causal models at once, thus mitigating the problem of exact causal specification. We frame the goal of learning a fair classifier as an optimization problem with fairness constraints entailed by competing causal explanations. We show how this optimization problem can be efficiently solved using gradient-based methods. We demonstrate the flexibility of our model on two real-world fair classification problems. We show that our model can seamlessly balance fairness in multiple worlds with prediction accuracy. 1 Introduction Machine learning algorithms can do extraordinary things with data. From generating realistic images from noise [7], to predicting what you will look like when you become older [18]. Today, governments and other organizations make use of it in criminal sentencing [4], predicting where to allocate police officers [3, 16], and to estimate an individual’s risk of failing to pay back a loan [8]. However, in many of these settings, the data used to train machine learning algorithms contains biases against certain races, sexes, or other subgroups in the population [3, 6]. Unwittingly, this discrimination is then reflected in the predictions of such algorithms. Simply being born male or female can change an individual’s opportunities that follow from automated decision making trained to reflect historical biases. The implication is that, without taking this into account, classifiers that maximize accuracy risk perpetuating biases present in society. ∗Equal contribution. †This work was done while JL was a Research Fellow at the Alan Turing Institute. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. For instance, consider the rise of ‘predictive policing’, described as “taking data from disparate sources, analyzing them, and then using the results to anticipate, prevent and respond more effectively to future crime” [16]. Today, 38% of U.S. police departments surveyed by the Police Executive Research Forum are using predictive policing and 70% plan to in the next 2 to 5 years. However, there have been significant doubts raised by researchers, journalists, and activists that if the data used by these algorithms is collected by departments that have been biased against minority groups, the predictions of these algorithms could reflect that bias [9, 12]. At the same time, fundamental mathematical results make it difficult to design fair classifiers. In criminal sentencing the COMPAS score [4] predicts if a prisoner will commit a crime upon release, and is widely used by judges to set bail and parole. While it has been shown that black and white defendants with the same COMPAS score commit a crime at similar rates after being released [1], it was also shown that black individuals were more often incorrectly predicted to commit crimes after release by COMPAS than white individuals were [2]. In fact, except for very specific cases, it is impossible to balance these measures of fairness [3, 10, 20]. The question becomes how to address the fact that the data itself may bias the learning algorithm and even addressing this is theoretically difficult. One promising avenue is a recent approach, introduced by us in [11], called counterfactual fairness. In this work, we model how unfairness enters a dataset using techniques from causal modeling. Given such a model, we state whether an algorithm is fair if it would give the same predictions had an individual’s race, sex, or other sensitive attributes been different. We show how to formalize this notion using counterfactuals, following a rich tradition of causal modeling in the artificial intelligence literature [15], and how it can be placed into a machine learning pipeline. The big challenge in applying this work is that evaluating a counterfactual e.g., “What if I had been born a different sex?”, requires a causal model which describes how your sex changes your predictions, other things being equal. Using “world” to describe any causal model evaluated at a particular counterfactual configuration, we have dependent “worlds” within a same causal model that can never be jointly observed, and possibly incompatible “worlds” across different models. Questions requiring the joint distribution of counterfactuals are hard to answer, as they demand partially untestable “cross-world” assumptions [5, 17], and even many of the empirically testable assumptions cannot be falsified from observational data alone [14], requiring possibly infeasible randomized trials. Because of this, different experts as well as different algorithms may disagree about the right causal model. Further disputes may arise due to the conflict between accurately modeling unfair data and producing a fair result, or because some degrees of unfairness may be considered allowable while others are not. To address these problems, we propose a method for ensuring fairness within multiple causal models. We do so by introducing continuous relaxations of counterfactual fairness. With these relaxations in hand, we frame learning a fair classifier as an optimization problem with fairness constraints. We give efficient algorithms for solving these optimization problems for different classes of causal models. We demonstrate on three real-world fair classification datasets how our model is able to simultaneously achieve fairness in multiple models while flexibly trading off classification accuracy. 2 Background We begin by describing aspects causal modeling and counterfactual inference relevant for modeling fairness in data. We then briefly review counterfactual fairness [11], but we recommend that the interested reader should read the original paper in full. We describe how uncertainty may arise over the correct causal model and some difficulties with the original counterfactual fairness definition. We will use A to denote the set of protected attributes, a scalar in all of our examples but which without loss of generality can take the form of a set. Likewise, we denote as Y the outcome of interest that needs to be predicted using a predictor ˆY . Finally, we will use X to denote the set of observed variables other than A and Y , and U to denote a set of hidden variables, which without loss of generality can be assumed to have no observable causes in a corresponding causal model. 2.1 Causal Modeling and Counterfactual Inference We will use the causal framework of Pearl [15], which we describe using a simple example. Imagine we have a dataset of university students and we would like to model the causal relationships that 2 (study) (job) (graduated) J S Y (motivated) U (race) (study) (job) (graduated) A J S Y (motivated) U (race) (study) (job) (graduated) A J S Y (motivated) U Figure 1: Dark nodes correspond to observed variables and light nodes are unobserved. (Left) This model predicts that both study S and motivation U directly cause graduation rate Y . However, this model does not take into account how an individual’s race may affect observed variables. (Center) In this model, we encode how an individual’s race may affect whether they need to have a job J while attending university. (Right) We may wonder if there are further biases in society to expect different rates of study for different races. We may also suspect that having a job may influence one’s graduation likelihood, independent of study. lead up to whether a student graduates on time. In our dataset, we have information about whether a student holds a job J, the number of hours they study per week S, and whether they graduate Y . Because we are interested in modeling any unfairness in our data, we also have information about a student’s race A. Pearl’s framework allows us to model causal relationships between these variables and any postulated unobserved latent variables, such as some U quantifying how motivated a student is to graduate. This uses a directed acyclic graph (DAG) with causal semantics, called a causal diagram. We show a possible causal diagram for this example in Figure 1, (Left). Each node corresponds to a variable and each set of edges into a node corresponds to a generative model specifying how the “parents” of that node causally generated it. In its most specific description, this generative model is a functional relationship deterministically generating its output given a set of observed and latent variables. For instance, one possible set of functions described by this model could be as follows: S = g(J, U) + ϵ Y = I[φ(h(S, U)) ≥0.5] (1) where g, h are arbitrary functions and I is the indicator function that evaluates to 1 if the condition holds and 0 otherwise. Additionally, φ is the logistic function φ(a) = 1/(1 + exp(−a)) and ϵ is drawn independently of all variables from the standard normal distribution N(0, 1). It is also possible to specify non-deterministic relationships: U ∼N(0, 1) S ∼N(g(J, U), σS) Y ∼Bernoulli(φ(h(S, U)) (2) where σS is a model parameter. The power of this causal modeling framework is that, given a fully-specified set of equations, we can compute what (the distribution of) any of the variables would have been had certain other variables been different, other things being equal. For instance, given the causal model we can ask “Would individual i have graduated (Y =1) if they hadn’t had a job?”, even if they did not actually graduate in the dataset. Questions of this type are called counterfactuals. For any observed variables V, W we denote the value of the counterfactual “What would V have been if W had been equal to w?” as VW ←w. Pearl et al. [15] describe how to compute these counterfactuals (or, for non-deterministic models, how to compute their distribution) using three steps: 1. Abduction: Given the set of observed variables X ={X1, . . . , Xd} compute the values of the set of unobserved variables U = {U1, . . . , Up} given the model (for non-deterministic models, we compute the posterior distribution P(U|X)); 2. Action: Replace all occurrences of the variable W with value w in the model equations; 3. Prediction: Using the new model equations, and U (or P(U|X)) compute the value of V (or P(V |X)). This final step provides the value or distribution of VW ←w given the observed, factual, variables. 2.2 Counterfactual Fairness In the above example, the university may wish to predict Y , whether a student will graduate, in order to determine if they should admit them into an honors program. While the university prefers to admit students who will graduate on time, it is willing to give a chance to some students without a confident graduation prediction in order to remedy unfairness associated with race in the honors 3 program. The university believes that whether a student needs a job J may be influenced by their race. As evidence they cite the National Center for Education Statistics, which reported3 that fewer (25%) Asian-American students were employed while attending university as full-time students relative to students of other races (at least 35%). We show the corresponding casual diagram for this in Figure 1 (Center). As having a job J affects study which affects graduation likelihood Y this may mean different races take longer to graduate and thus unfairly have a harder time getting into the honors program. Counterfactual fairness aims to correct predictions of a label variable Y that are unfairly altered by an individual’s sensitive attribute A (race in this case). Fairness is defined in terms of counterfactuals: Definition 1 (Counterfactual Fairness [11]). A predictor ˆY of Y is counterfactually fair given the sensitive attribute A=a and any observed variables X if P( ˆYA←a =y | X = x, A = a) = P( ˆYA←a′ =y | X = x, A = a) (3) for all y and a′ ̸=a. In what follows, we will also refer to ˆY as a function f(x, a) of hidden variables U, of (usually a subset of) an instantiation x of X, and of protected attribute A. We leave U implicit in this notation since, as we will see, this set might differ across different competing models. The notation implies ˆYA←a = f(xA←a, a). (4) Notice that if counterfactual fairness holds exactly for ˆY , then this predictor can only be a non-trivial function of X for those elements X ∈X such that XA←a = XA←a′. Moreover, by construction UA←a = UA←a′, as each element of U is defined to have no causes in A ∪X. The probabilities in eq. (3) are given by the posterior distribution over the unobserved variables P(U | X = x, A = a). Hence, a counterfactual ˆYA←a may be deterministic if this distribution is degenerate, that is, if U is a deterministic function of X and A. One nice property of this definition is that it is easy to interpret: a decision is fair if it would have been the same had a person had a different A (e.g., a different race4), other things being equal. In [11], we give an efficient algorithm for designing a predictor that is counterfactually fair. In the university graduation example, a predictor constructed from the unobserved motivation variable U is counterfactually fair. One difficulty of the definition of counterfactual fairness is it requires one to postulate causal relationships between variables, including latent variables that may be impractical to measure directly. In general, different causal models will create different fair predictors ˆY . But there are several reasons why it may be unrealistic to assume that any single, fixed causal model will be appropriate. There may not be a consensus among experts or previous literature about the existence, functional form, direction, or magnitude of a particular causal effect, and it may be impossible to determine these from the available data without untestable assumptions. And given the sensitive, even political nature of problems involving fairness, it is also possible that disputes may arise over the presence of a feature of the causal model, based on competing notions of dependencies and latent variables. Consider the following example, formulated as a dispute over the presence of edges. For the university graduation model, one may ask if differences in study are due only to differences in employment, or whether instead there is some other direct effect of A on study levels. Also, having a job may directly affect graduation likelihood. We show these changes to the model in Figure 1 (Right). There is also potential for disagreement over whether some causal paths from A to graduation should be excluded from the definition of fairness. For example, an adherent to strict meritocracy may argue the numbers of hours a student has studied should not be given a counterfactual value. This could be incorporated in a separate model by omitting chosen edges when propagating counterfactual information through the graph in the Prediction step of counterfactual inference5. To summarize, there may be disagreements about the right causal model due to: 1. Changing the structure of the DAG, e.g. adding an edge; 2. Changing the latent variables, e.g. changing the function generating a vertex to have a different signal vs. noise decomposition; 3. Preventing certain paths from propagating counterfactual values. 3https://nces.ed.gov/programs/coe/indicator_ssa.asp 4At the same time, the notion of a “counterfactual race,” sex, etc. often raises debate. See [11] for our take on this. 5In the Supplementary Material of [11], we explain how counterfactual fairness can be restricted to particular paths from A to Y , as opposed to all paths. 4 3 Fairness under Causal Uncertainty In this section, we describe a technique for learning a fair predictor without knowing the true casual model. We first describe why in general counterfactual fairness will often not hold in multiple different models. We then describe a relaxation of the definition of counterfactual fairness for both deterministic and non-deterministic models. Finally we show an efficient method for learning classifiers that are simultaneously accurate and fair in multiple worlds. In all that follows we denote sets in calligraphic script X, random variables in uppercase X, scalars in lowercase x, matrices in bold uppercase X, and vectors in bold lowercase x. 3.1 Exact Counterfactual Fairness Across Worlds We can imagine extending the definition of counterfactual fairness so that it holds for every plausible causal world. To see why this is inherently difficult consider the setting of deterministic causal models. If each causal model of the world generates different counterfactuals then each additional model induces a new set of constraints that the classifier must satisfy, and in the limit the only classifiers that are fair across all possible worlds are constant classifiers. For non-deterministic counterfactuals, these issues are magnified. To guarantee counterfactual fairness, Kusner et al. [11] assumed access to latent variables that hold the same value in an original datapoint and in its corresponding counterfactuals. While the latent variables of one world can remain constant under the generation of counterfactuals from its corresponding model, there is no guarantee that they remain constant under the counterfactuals generated from different models. Even in a two model case, if the P.D.F. of one model’s counterfactual has non-zero density everywhere (as is the case under Gaussian noise assumptions) it may be the case that the only classifiers that satisfy counterfactual fairness for both worlds are the constant classifiers. If we are to achieve some measure of fairness from informative classifiers, and over a family of different worlds, we need a more robust alternative to counterfactual fairness. 3.2 Approximate Counterfactual Fairness We define two approximations to counterfactual fairness to solve the problem of learning a fair classifier across multiple causal worlds. Definition 2 ((ϵ, δ)-Approximate Counterfactual Fairness). A predictor f(X, A) satisfies (ϵ, 0)approximate counterfactual fairness ((ϵ, 0)-ACF) if, given the sensitive attribute A = a and any instantiation x of the other observed variables X, we have that: f(xA←a, a) −f(xA←a′, a′) ≤ϵ (5) for all a′ ̸= a if the system deterministically implies the counterfactual values of X. For a nondeterministic causal system, f satisfies (ϵ, δ)-approximate counterfactual fairness, ((ϵ, δ)-ACF) if: P( f(XA←a, a) −f(XA←a′, a′) ≤ϵ | X = x, A = a) ≥1 −δ (6) for all a′ ̸=a. Both definitions must hold uniformly over the sample space of X ×A. The probability measures used are with respect to the conditional distribution of background latent variables U given the observations. We leave a discussion of the statistical asymptotic properties of such plug-in estimator for future work. These definitions relax counterfactual fairness to ensure that, for deterministic systems, predictions f change by at most ϵ when an input is replaced by its counterfactual. For non-deterministic systems, the condition in (6) means that this ϵ change must occur with high probability, where the probability is again given by the posterior distribution P(U|X) computed in the Abduction step of counterfactual inference. If ϵ=0, the deterministic definitions eq. (5) is equivalent to the original counterfactual fairness definition. If also δ=0 the non-deterministic definition eq. (6) is actually a stronger condition than the counterfactual fairness definition eq. (3) as it guarantees equality in probability instead of equality in distribution6. 6In the Supplementary Material of [11], we describe in more detail the implications of the stronger condition. 5 Algorithm 1 Multi-World Fairness 1: Input: features X = [x1, . . . , xn], labels y = [y1, . . . , yn], sensitive attributes a = [a1, . . . , an], privacy parameters (ϵ, δ), trade-off parameters L = [λ1, . . . , λl]. 2: Fit causal models: M1, . . . , Mm using X, a (and possibly y). 3: Sample counterfactuals: XA1←a′, . . . , XAm←a′ for all unobserved values a′. 4: for λ ∈L do 5: Initialize classifier fλ. 6: while loop until convergence do 7: Select random batches Xb of inputs and batch of counterfactuals XA1←a′, . . . , XAm←a′. 8: Compute the gradient of equation (7). 9: Update fλ using any stochastic gradient optimization method. 10: end while 11: end for 12: Select model fλ: For deterministic models select the smallest λ such that equation (5) using fλ holds. For non-deterministic models select the λ that corresponds to δ given fλ. 3.3 Learning a Fair Classifier Assume we are given a dataset of n observations a = [a1, . . . , an] of the sensitive attribute A and of other features X = [x1, . . . , xn] drawn from X. We wish to accurately predict a label Y given observations y=[y1, . . . , yn] while also satisfying (ϵ, δ)-approximate counterfactual fairness. We learn a classifier f(x, a) by minimizing a loss function ℓ(f(x, a), y). At the same time, we incorporate an unfairness term µj(f, x, a, a′) for each causal model j to reduce the unfairness in f. We formulate this as a penalized optimization problem: min f 1 n n X i=1 ℓ(f(xi, ai), yi) + λ m X j=1 1 n n X i=1 X a′̸=ai µj(f, xi, ai, a′) (7) where λ trades-off classification accuracy for multi-world fair predictions. We show how to naturally define the unfairness function µj for deterministic and non-deterministic counterfactuals. Deterministic counterfactuals. To enforce (ϵ, 0)-approximate counterfactual fairness a natural penalty for unfairness is an indicator function which is one whenever (ϵ, 0)-ACF does not hold, and zero otherwise: µj(f, xi, ai, a′) := I[ f(xi,Aj←ai, ai) −f(xi,Aj←a′, a′) ≥ϵ] (8) Unfortunately, the indicator function I is non-convex, discontinuous and difficult to optimize. Instead, we propose to use the tightest convex relaxation to the indicator function: µj(f, xi, ai, a′) := max{0, f(xi,Aj←ai, ai) −f(xi,Aj←a′, a′) −ϵ} (9) Note that when (ϵ, 0)-approximate counterfactual fairness is not satisfied µj is non-zero and thus the optimization problem will penalize f for this unfairness. Where (ϵ, 0)-approximate counterfactual fairness is satisfied µj evaluates to 0 and it does not affect the objective. For sufficiently large λ, the value of µj will dominate the training loss 1 n Pn i=1 ℓ(f(xi, ai), yi) and any solution will satisfy (ϵ, 0)-approximate counterfactual fairness. However, an overly large choice of λ causes numeric instability, and will decrease the accuracy of the classifier found. Thus, to find the most accurate classifier that satisfies the fairness condition one can simply perform a grid or binary search for the smallest λ such that the condition holds. Non-deterministic counterfactuals. For non-deterministic counterfactuals we begin by writing a Monte-Carlo approximation to (ϵ, δ)-ACF, eq. (6) as follows: 1 S S X s=1 I( f(xs Aj←ai, ai)−f(xs Aj←a′, a′) ≥ϵ)≤δ (10) where xk is sampled from the posterior distribution P(U|X). We can again form the tightest convex relaxation of the left-hand side of the expression to yield our unfairness function: µj(f, xi, ai, a′) := 1 S S X s=1 max{0, f(xs i,Aj←ai, ai) −f(xs i,Aj←a′, a′) −ϵ} (11) 6 Note that different choices of λ in eq. (7) correspond to different values of δ. Indeed, by choosing λ = 0 we have the (ϵ, δ)-fair classifier corresponding to an unfair classifier7. While a sufficiently large, but finite, λ will correspond to a (ϵ, 0) approximately counterfactually fair classifier. By varying λ between these two extremes, we induce classifiers that satisfy (ϵ, δ)-ACF for different values of δ. With these unfairness functions we have a differentiable optimization problem eq. (7) which can be solved with gradient-based methods. Thus, our method allows practitioners to smoothly trade-off accuracy with multi-world fairness. We call our method Multi-World Fairness (MWF). We give a complete method for learning a MWF classifier in Algorithm 1. For both deterministic and non-deterministic models, this convex approximation essentially describes an expected unfairness that is allowed by the classifier: Definition 3 (Expected ϵ-Unfairness). For any counterfactual a′ ̸= a, the Expected ϵ-Unfairness of a classifier f, or Eϵ[f], is E h max{0, f(XA←a, a) −f(XA←a′, a′) −ϵ} | X = x, A = a i (12) where the expectation is over any unobserved U (and is degenerate for deterministic counterfactuals). We note that the term max{0, f(XA←a, a)−f(XA←a′, a′) −ϵ} is strictly non-negative and therefore the expected ϵ-unfairness is zero if and only if f satisfies (ϵ, 0)-approximate counterfactual fairness almost everywhere. Linear Classifiers and Convexity Although we have presented these results in their most general form, it is worth noting that for linear classifiers, convexity guarantees are preserved. The family of linear classifiers we consider is relatively broad, and consists those linear in their learned weights w, as such it includes both SVMs and a variety of regression methods used in conjuncture with kernels or finite polynomial bases. Consider any classifier whose output is linear in the learned parameters, i.e., the family of classifiers f all have the form f(X, A) = P l wlgl(X, a), for a set of fixed kernels gl. Then the expected ϵ-unfairness is a linear function of w taking the form: E h max{0, f(XA←a, a) −f(XA←a′, a′) −ϵ} i (13) = E h max{0, X l wl(gl(XA←a, a) −gl(XA←a′, a′)) } i This expression is linear in w and therefore, if the classification loss is also convex (as is the case for most regression tasks), a global optima can be ready found via convex programming. In particular, globally optimal linear classifiers satisfying (ϵ, 0)-ACF or (ϵ, δ)-ACF, can be found efficiently. Bayesian alternatives and their shortcomings. One may argue that a more direct alternative is to provide probabilities associated with each world and to marginalize set of the optimal counterfactually fair classifiers over all possible worlds. We argue this is undesirable for two reasons: first, the averaged prediction for any particular individual may violate (3) by an undesirable margin for one, more or even all considered worlds; second, a practitioner may be restricted by regulations to show that, to the best of their knowledge, the worst-case violation is bounded across all viable worlds with high probability. However, if the number of possible models is extremely large (for example if the causal structure of the world is known, but the associated parameters are not) and we have a probability associated with each world, then one natural extension is to adapt Expected ϵ-Unfairness eq. (3) to marginalize over the space of possible worlds. However, we leave this extension to future work. 4 Experiments We demonstrate the flexibility of our method on two real-world fair classification problems: 1. fair predictions of student performance in law schools; and 2. predicting whether criminals will re-offend upon being released. For each dataset we begin by giving details of the fair prediction problem. We then introduce multiple causal models that each possibly describe how unfairness plays a role in the data. Finally, we give results of Multi-World Fairness (MWF) and show how it changes for different settings of the fairness parameters (ϵ, δ). 7In the worst case, δ may equal 1. 7 (race) A ✏G ✏L law school COMPAS (race) (age) A (juvenile felonies) (juvenile criminality) (adult criminality) JF (juvenile misdem.) JM UJ UD C (COMPAS) T P (type of crime) (num. priors) E (GPA) G (LSAT) L Y (grade) (race) A (GPA) G (LSAT) L Y (grade) U (know) ✏Y Figure 2: Causal models for the law school and COMPAS datasets. Shaded nodes are observed an unshaded nodes are unobserved. For each dataset we consider two possible causal worlds. The first law school model is a deterministic causal model with additive unobserved variables ϵG, ϵL, ϵY . The second is a non-deterministic causal model with a latent variable U. For COMPAS, the first causal model omits the dotted lines, and the second includes them. Both models are non-deterministic models with latent variables UJ, UD. The large white arrows signify that variables A, E are connected to every variable contained in the box they point to. The law school model equations are given in eq. (14) and COMPAS model equations are shown in eq. (15). 4.1 Fairly predicting law grades ✏ test RMSE multi-world fairness unfair constant predictor (λ=0) δ =0.1 δ =0.3 δ =0.5 Figure 3: Test prediction results for different ϵ on the law school dataset. We begin by investigating a dataset of survey results across 163 U.S. law schools conducted by the Law School Admission Council [19] . It contains information on over 20,000 students including their race A (here we look at just black and white students as this difference had the largest effect in counterfactuals in [11]), their grade-point average G obtained prior to law school, law school entrance exam scores L, and their first year average grade Y . Consider that law schools may be interested in predicting Y for all applicants to law school using G and L in order to decide whether to accept or deny them entrance. However, due to societal inequalities, an individual’s race may have affected their access to educational opportunities, and thus affected G and L. Accordingly, we model this possibility using the causal graphs in Figure 2 (Left). In this graph we also model the fact that G, L may have been affected by other unobserved quantities. However, we may be uncertain whether what the right way to model these unobserved quantities is. Thus we propose to model this dataset with the two worlds described in Figure 2 (Left). Note that these are the same models as used in Kusner et al. [11] (except here we consider race as the sensitive variable). The corresponding equations for these two worlds are as follows: G = bG + wA GA + ϵG G ∼N(bG + wA GA + wU GU, σG) (14) L = bL + wA LA + ϵL L ∼Poisson(exp(bL + wA LA + wU LU)) Y = bY + wA Y A + ϵY Y ∼N(wA Y A + wU Y U, 1) ϵG, ϵL, ϵY ∼N(0, 1) U ∼N(0, 1) where variables b, w are parameters of the causal model. Results. Figure 3 shows the result of learning a linear MWF classifier on the deterministic law school models. We split the law school data into a random 80/20 train/test split and we fit casual models and classifiers on the training set and evaluate performance on the test set. We plot the test RMSE of the constant predictor satisfying counterfactual fairness in red, the unfair predictor with λ=0, and MWF, averaged across 5 runs. Here as we have one deterministic and one non-deterministic model we will evaluate MWF for different ϵ and δ (with the knowledge that the only change in the MWF classifier for different δ is due to the non-deterministic model). For each ϵ, δ, we selected the smallest λ across a grid (λ ∈{10−510−4, . . . , 1010}) such that the constraint in eq. (6) held across 95% of the individuals in both models. We see that MWF is able to reliably sacrifice accuracy for fairness as ϵ is reduced. Note that as we change δ we can further alter the accuracy/fairness trade-off. 8 δ = 0.5 ✏ δ = 0.4 ✏ δ = 0.1 δ = 0.3 ✏ test accuracy ✏ MWF (linear) MWF (deep) constant unfair (linear) unfair (deep) Figure 4: Test prediction results for different ϵ and δ on the COMPAS dataset. 4.2 Fair recidivism prediction (COMPAS) We next turn our attention to predicting whether a criminal will re-offend, or ‘recidivate’ after being released from prison. ProPublica [13] released data on prisoners in Broward County, Florida who were awaiting a sentencing hearing. For each of the prisoners we have information on their race A (as above we only consider black versus white individuals), their age E, their number of juvenile felonies JF , juvenile misdemeanors JM, the type of crime they committed T, the number of prior offenses they have P, and whether they recidivated Y . There is also a proprietary COMPAS score [13] C designed to indicate the likelihood a prisoner recidivates. We model this dataset with two different non-deterministic causal models, shown in Figure 2 (Right). The first model includes the dotted edges, the second omits them. In both models we believe that two unobserved latent factors juvenile criminality UJ and adult criminality UD also contribute to JF , JM, C, T, P. We show the equations for both of our casual models below, where the first causal model includes the blue terms and the second does not: T ∼Bernoulli(φ(bT + wUD C UD + wE CE + wA CA) (15) C ∼N(bC + wUD C UD + wE CE + wA CA + wT CT + wP CP + wJF C JF + wJM C JM, σC) P ∼Poisson(exp(bP + wUD P UD + wE P E + wA P A)) JF ∼Poisson(exp(bJF + wUJ JF + wE JF E + wA JF A)) JM ∼Poisson(exp(bJM + wUJ JM + wE JM E + wA JM A)) [UJ, UD] ∼N(0, Σ) Results. Figure 4 shows how classification accuracy using both logistic regression (linear) and a 3-layer neural network (deep) changes as both ϵ and δ change. We split the COMPAS dataset randomly into an 80/20 train/test split, and report all results on the test set. As in the law school experiment we grid-search over λ to find the smallest value such that for any ϵ and δ the (ϵ, δ)-ACF) constraint in eq. (6) is satisfied for at least 95% of the individuals in the dataset, across both worlds. We average all results except the constant classifier over 5 runs and plot the mean and standard deviations. We see that for small δ (high fairness) both linear and deep MWF classifiers significantly outperform the constant classifier and begin to approach the accuracy of the unfair classifier as ϵ increases. As we increase δ (lowered fairness) the deep classifier is better able to learn a decision boundary that trades-off accuracy for fairness. But if ϵ, δ is increased enough (e.g., ϵ≥0.13, δ=0.5), the linear MWF classifier matches the performance of the deep classifier. 5 Conclusion This paper has presented a natural extension to counterfactual fairness that allows us to guarantee fair properties of algorithms, even when we are unsure of the causal model that describes the world. As the use of machine learning becomes widespread across many domains, it becomes more important to take algorithmic fairness out of the hands of experts and make it available to everybody. The conceptual simplicity of our method, our robust use of counterfactuals, and the ease of implementing our method mean that it can be directly applied to many interesting problems. A further benefit of our approach over previous work on counterfactual fairness is that our approach only requires the estimation of counterfactuals at training time, and no knowledge of latent variables during testing. As such, our classifiers offer a fair drop-in replacement for other existing classifiers. 9 6 Acknowledgments This work was supported by The Alan Turing Institute under the EPSRC grant EP/N510129/1. CR acknowledges additional support under the EPSRC Platform Grant EP/P022529/1. References [1] Compas risk scales: Demonstrating accuracy equity and predictive parity performance of the compas risk scales in broward county, 2016. 2 [2] Julia Angwin, Jeff Larson, Surya Mattu, and Lauren Kirchner. Machine bias. https://www.propublica. org/article/machine-bias-risk-assessments-in-criminal-sentencing, 2016. Accessed: Fri 19 May 2017. 2 [3] Richard Berk, Hoda Heidari, Shahin Jabbari, Michael Kearns, and Aaron Roth. Fairness in criminal justice risk assessments: The state of the art. arXiv preprint arXiv:1703.09207, 2017. 1, 2 [4] Tim Brennan, William Dieterich, and Beate Ehret. Evaluating the predictive validity of the compas risk and needs assessment system. Criminal Justice and Behavior, 36(1):21–40, 2009. 1, 2 [5] A. P. Dawid. Causal inference without counterfactuals. Journal of the American Statistical Association, pages 407–448, 2000. 2 [6] Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard Zemel. Fairness through awareness. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference, pages 214–226. ACM, 2012. 1 [7] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. 1 [8] Amir E Khandani, Adlar J Kim, and Andrew W Lo. Consumer credit-risk models via machine-learning algorithms. Journal of Banking & Finance, 34(11):2767–2787, 2010. 1 [9] Keith Kirkpatrick. It’s not the algorithm, it’s the data. Communications of the ACM, 60(2):21–23, 2017. 2 [10] Jon Kleinberg, Sendhil Mullainathan, and Manish Raghavan. Inherent trade-offs in the fair determination of risk scores. arXiv preprint arXiv:1609.05807, 2016. 2 [11] Matt J Kusner, Joshua R Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness. Advances in Neural Information Processing Systems, 31, 2017. 2, 4, 5, 8 [12] Moish Kutnowski. The ethical dangers and merits of predictive policing. Journal of Community Safety and Well-Being, 2(1):13–17, 2017. 2 [13] Jeff Larson, Surya Mattu, Lauren Kirchner, and Julia Angwin. How we analyzed the compas recidivism algorithm. ProPublica (5 2016), 2016. 9 [14] David Lopez-Paz. From dependence to causation. arXiv preprint arXiv:1607.03300, 2016. 2 [15] J. Pearl, M. Glymour, and N. Jewell. Causal Inference in Statistics: a Primer. Wiley, 2016. 2, 3 [16] Beth Pearsall. Predictive policing: The future of law enforcement. National Institute of Justice Journal, 266(1):16–19, 2010. 1, 2 [17] T.S. Richardson and J. Robins. Single world intervention graphs (SWIGs): A unification of the counterfactual and graphical approaches to causality. Working Paper Number 128, Center for Statistics and the Social Sciences, University of Washington, 2013. 2 [18] Paul Upchurch, Jacob Gardner, Kavita Bala, Robert Pless, Noah Snavely, and Kilian Weinberger. Deep feature interpolation for image content changes. arXiv preprint arXiv:1611.05507, 2016. 1 [19] Linda F Wightman. Lsac national longitudinal bar passage study. lsac research report series. 1998. 8 [20] Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez Rodriguez, and Krishna P Gummadi. Fairness beyond disparate treatment & disparate impact: Learning classification without disparate mistreatment. arXiv preprint arXiv:1610.08452, 2016. 2 10 | 2017 | 53 |
7,041 | Prototypical Networks for Few-shot Learning Jake Snell University of Toronto∗ Vector Institute Kevin Swersky Twitter Richard Zemel University of Toronto Vector Institute Canadian Institute for Advanced Research Abstract We propose Prototypical Networks for the problem of few-shot classification, where a classifier must generalize to new classes not seen in the training set, given only a small number of examples of each new class. Prototypical Networks learn a metric space in which classification can be performed by computing distances to prototype representations of each class. Compared to recent approaches for few-shot learning, they reflect a simpler inductive bias that is beneficial in this limited-data regime, and achieve excellent results. We provide an analysis showing that some simple design decisions can yield substantial improvements over recent approaches involving complicated architectural choices and meta-learning. We further extend Prototypical Networks to zero-shot learning and achieve state-ofthe-art results on the CU-Birds dataset. 1 Introduction Few-shot classification [22, 18, 15] is a task in which a classifier must be adapted to accommodate new classes not seen in training, given only a few examples of each of these classes. A naive approach, such as re-training the model on the new data, would severely overfit. While the problem is quite difficult, it has been demonstrated that humans have the ability to perform even one-shot classification, where only a single example of each new class is given, with a high degree of accuracy [18]. Two recent approaches have made significant progress in few-shot learning. Vinyals et al. [32] proposed Matching Networks, which uses an attention mechanism over a learned embedding of the labeled set of examples (the support set) to predict classes for the unlabeled points (the query set). Matching Networks can be interpreted as a weighted nearest-neighbor classifier applied within an embedding space. Notably, this model utilizes sampled mini-batches called episodes during training, where each episode is designed to mimic the few-shot task by subsampling classes as well as data points. The use of episodes makes the training problem more faithful to the test environment and thereby improves generalization. Ravi and Larochelle [24] take the episodic training idea further and propose a meta-learning approach to few-shot learning. Their approach involves training an LSTM [11] to produce the updates to a classifier, given an episode, such that it will generalize well to a test-set. Here, rather than training a single model over multiple episodes, the LSTM meta-learner learns to train a custom model for each episode. We attack the problem of few-shot learning by addressing the key issue of overfitting. Since data is severely limited, we work under the assumption that a classifier should have a very simple inductive bias. Our approach, Prototypical Networks, is based on the idea that there exists an embedding in which points cluster around a single prototype representation for each class. In order to do this, we learn a non-linear mapping of the input into an embedding space using a neural network and take a class’s prototype to be the mean of its support set in the embedding space. Classification is then performed for an embedded query point by simply finding the nearest class prototype. We ∗Initial work done while at Twitter. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. c1 c2 c3 x (a) Few-shot v1 v2 v3 c1 c2 c3 x (b) Zero-shot Figure 1: Prototypical Networks in the few-shot and zero-shot scenarios. Left: Few-shot prototypes ck are computed as the mean of embedded support examples for each class. Right: Zero-shot prototypes ck are produced by embedding class meta-data vk. In either case, embedded query points are classified via a softmax over distances to class prototypes: pφ(y = k|x) ∝exp(−d(fφ(x), ck)). follow the same approach to tackle zero-shot learning; here each class comes with meta-data giving a high-level description of the class rather than a small number of labeled examples. We therefore learn an embedding of the meta-data into a shared space to serve as the prototype for each class. Classification is performed, as in the few-shot scenario, by finding the nearest class prototype for an embedded query point. In this paper, we formulate Prototypical Networks for both the few-shot and zero-shot settings. We draw connections to Matching Networks in the one-shot setting, and analyze the underlying distance function used in the model. In particular, we relate Prototypical Networks to clustering [4] in order to justify the use of class means as prototypes when distances are computed with a Bregman divergence, such as squared Euclidean distance. We find empirically that the choice of distance is vital, as Euclidean distance greatly outperforms the more commonly used cosine similarity. On several benchmark tasks, we achieve state-of-the-art performance. Prototypical Networks are simpler and more efficient than recent meta-learning algorithms, making them an appealing approach to few-shot and zero-shot learning. 2 Prototypical Networks 2.1 Notation In few-shot classification we are given a small support set of N labeled examples S = {(x1, y1), . . . , (xN, yN)} where each xi ∈RD is the D-dimensional feature vector of an example and yi ∈{1, . . . , K} is the corresponding label. Sk denotes the set of examples labeled with class k. 2.2 Model Prototypical Networks compute an M-dimensional representation ck ∈RM, or prototype, of each class through an embedding function fφ : RD →RM with learnable parameters φ. Each prototype is the mean vector of the embedded support points belonging to its class: ck = 1 |Sk| X (xi,yi)∈Sk fφ(xi) (1) Given a distance function d : RM × RM →[0, +∞), Prototypical Networks produce a distribution over classes for a query point x based on a softmax over distances to the prototypes in the embedding space: pφ(y = k | x) = exp(−d(fφ(x), ck)) P k′ exp(−d(fφ(x), ck′)) (2) Learning proceeds by minimizing the negative log-probability J(φ) = −log pφ(y = k | x) of the true class k via SGD. Training episodes are formed by randomly selecting a subset of classes from the training set, then choosing a subset of examples within each class to act as the support set and a 2 Algorithm 1 Training episode loss computation for Prototypical Networks. N is the number of examples in the training set, K is the number of classes in the training set, NC ≤K is the number of classes per episode, NS is the number of support examples per class, NQ is the number of query examples per class. RANDOMSAMPLE(S, N) denotes a set of N elements chosen uniformly at random from set S, without replacement. Input: Training set D = {(x1, y1), . . . , (xN, yN)}, where each yi ∈{1, . . . , K}. Dk denotes the subset of D containing all elements (xi, yi) such that yi = k. Output: The loss J for a randomly generated training episode. V ←RANDOMSAMPLE({1, . . . , K}, NC) ▷Select class indices for episode for k in {1, . . . , NC} do Sk ←RANDOMSAMPLE(DVk, NS) ▷Select support examples Qk ←RANDOMSAMPLE(DVk \ Sk, NQ) ▷Select query examples ck ← 1 NC X (xi,yi)∈Sk fφ(xi) ▷Compute prototype from support examples end for J ←0 ▷Initialize loss for k in {1, . . . , NC} do for (x, y) in Qk do J ←J + 1 NCNQ " d(fφ(x), ck)) + log X k′ exp(−d(fφ(x), ck′)) # ▷Update loss end for end for subset of the remainder to serve as query points. Pseudocode to compute the loss J(φ) for a training episode is provided in Algorithm 1. 2.3 Prototypical Networks as Mixture Density Estimation For a particular class of distance functions, known as regular Bregman divergences [4], the Prototypical Networks algorithm is equivalent to performing mixture density estimation on the support set with an exponential family density. A regular Bregman divergence dϕ is defined as: dϕ(z, z′) = ϕ(z) −ϕ(z′) −(z −z′)T ∇ϕ(z′), (3) where ϕ is a differentiable, strictly convex function of the Legendre type. Examples of Bregman divergences include squared Euclidean distance ∥z −z′∥2 and Mahalanobis distance. Prototype computation can be viewed in terms of hard clustering on the support set, with one cluster per class and each support point assigned to its corresponding class cluster. It has been shown [4] for Bregman divergences that the cluster representative achieving minimal distance to its assigned points is the cluster mean. Thus the prototype computation in Equation (1) yields optimal cluster representatives given the support set labels when a Bregman divergence is used. Moreover, any regular exponential family distribution pψ(z|θ) with parameters θ and cumulant function ψ can be written in terms of a uniquely determined regular Bregman divergence [4]: pψ(z|θ) = exp{zT θ −ψ(θ) −gψ(z)} = exp{−dϕ(z, µ(θ)) −gϕ(z)} (4) Consider now a regular exponential family mixture model with parameters Γ = {θk, πk}K k=1: p(z|Γ) = K X k=1 πkpψ(z|θk) = K X k=1 πk exp(−dϕ(z, µ(θk)) −gϕ(z)) (5) Given Γ, inference of the cluster assignment y for an unlabeled point z becomes: p(y = k|z) = πk exp(−dϕ(z, µ(θk))) P k′ πk′ exp(−dϕ(z, µ(θk))) (6) For an equally-weighted mixture model with one cluster per class, cluster assignment inference (6) is equivalent to query class prediction (2) with fφ(x) = z and ck = µ(θk). In this case, 3 Prototypical Networks are effectively performing mixture density estimation with an exponential family distribution determined by dϕ. The choice of distance therefore specifies modeling assumptions about the class-conditional data distribution in the embedding space. 2.4 Reinterpretation as a Linear Model A simple analysis is useful in gaining insight into the nature of the learned classifier. When we use Euclidean distance d(z, z′) = ∥z −z′∥2, then the model in Equation (2) is equivalent to a linear model with a particular parameterization [21]. To see this, expand the term in the exponent: −∥fφ(x) −ck∥2 = −fφ(x)⊤fφ(x) + 2c⊤ k fφ(x) −c⊤ k ck (7) The first term in Equation (7) is constant with respect to the class k, so it does not affect the softmax probabilities. We can write the remaining terms as a linear model as follows: 2c⊤ k fφ(x) −c⊤ k ck = w⊤ k fφ(x) + bk, where wk = 2ck and bk = −c⊤ k ck (8) We focus primarily on squared Euclidean distance (corresponding to spherical Gaussian densities) in this work. Our results indicate that Euclidean distance is an effective choice despite the equivalence to a linear model. We hypothesize this is because all of the required non-linearity can be learned within the embedding function. Indeed, this is the approach that modern neural network classification systems currently use, e.g., [16, 31]. 2.5 Comparison to Matching Networks Prototypical Networks differ from Matching Networks in the few-shot case with equivalence in the one-shot scenario. Matching Networks [32] produce a weighted nearest neighbor classifier given the support set, while Prototypical Networks produce a linear classifier when squared Euclidean distance is used. In the case of one-shot learning, ck = xk since there is only one support point per class, and Matching Networks and Prototypical Networks become equivalent. A natural question is whether it makes sense to use multiple prototypes per class instead of just one. If the number of prototypes per class is fixed and greater than 1, then this would require a partitioning scheme to further cluster the support points within a class. This has been proposed in Mensink et al. [21] and Rippel et al. [27]; however both methods require a separate partitioning phase that is decoupled from the weight updates, while our approach is simple to learn with ordinary gradient descent methods. Vinyals et al. [32] propose a number of extensions, including decoupling the embedding functions of the support and query points, and using a second-level, fully-conditional embedding (FCE) that takes into account specific points in each episode. These could likewise be incorporated into Prototypical Networks, however they increase the number of learnable parameters, and FCE imposes an arbitrary ordering on the support set using a bi-directional LSTM. Instead, we show that it is possible to achieve the same level of performance using simple design choices, which we outline next. 2.6 Design Choices Distance metric Vinyals et al. [32] and Ravi and Larochelle [24] apply Matching Networks using cosine distance. However for both Prototypical Networks and Matching Networks any distance is permissible, and we found that using squared Euclidean distance can greatly improve results for both. For Protypical Networks, we conjecture this is primarily due to cosine distance not being a Bregman divergence, and thus the equivalence to mixture density estimation discussed in Section 2.3 does not hold. Episode composition A straightforward way to construct episodes, used in Vinyals et al. [32] and Ravi and Larochelle [24], is to choose Nc classes and NS support points per class in order to match the expected situation at test-time. That is, if we expect at test-time to perform 5-way classification and 1-shot learning, then training episodes could be comprised of Nc = 5, NS = 1. We have found, however, that it can be extremely beneficial to train with a higher Nc, or “way”, than will be used at test-time. In our experiments, we tune the training Nc on a held-out validation set. Another consideration is whether to match NS, or “shot”, at train and test-time. For Prototypical Networks, we found that it is usually best to train and test with the same “shot” number. 4 2.7 Zero-Shot Learning Zero-shot learning differs from few-shot learning in that instead of being given a support set of training points, we are given a class meta-data vector vk for each class. These could be determined in advance, or they could be learned from e.g., raw text [8]. Modifying Prototypical Networks to deal with the zero-shot case is straightforward: we simply define ck = gϑ(vk) to be a separate embedding of the meta-data vector. An illustration of the zero-shot procedure for Prototypical Networks as it relates to the few-shot procedure is shown in Figure 1. Since the meta-data vector and query point come from different input domains, we found it was helpful empirically to fix the prototype embedding g to have unit length, however we do not constrain the query embedding f. 3 Experiments For few-shot learning, we performed experiments on Omniglot [18] and the miniImageNet version of ILSVRC-2012 [28] with the splits proposed by Ravi and Larochelle [24]. We perform zero-shot experiments on the 2011 version of the Caltech UCSD bird dataset (CUB-200 2011) [34]. 3.1 Omniglot Few-shot Classification Omniglot [18] is a dataset of 1623 handwritten characters collected from 50 alphabets. There are 20 examples associated with each character, where each example is drawn by a different human subject. We follow the procedure of Vinyals et al. [32] by resizing the grayscale images to 28 × 28 and augmenting the character classes with rotations in multiples of 90 degrees. We use 1200 characters plus rotations for training (4,800 classes in total) and the remaining classes, including rotations, for test. Our embedding architecture mirrors that used by Vinyals et al. [32] and is composed of four convolutional blocks. Each block comprises a 64-filter 3 × 3 convolution, batch normalization layer [12], a ReLU nonlinearity and a 2 × 2 max-pooling layer. When applied to the 28 × 28 Omniglot images this architecture results in a 64-dimensional output space. We use the same encoder for embedding both support and query points. All of our models were trained via SGD with Adam [13]. We used an initial learning rate of 10−3 and cut the learning rate in half every 2000 episodes. No regularization was used other than batch normalization. Figure 2: A t-SNE visualization of the embeddings learned by Prototypical networks on the Omniglot dataset. A subset of the Tengwar script is shown (an alphabet in the test set). Class prototypes are indicated in black. Several misclassified characters are highlighted in red along with arrows pointing to the correct prototype. We trained Prototypical Networks using Euclidean distance in the 1-shot and 5-shot scenarios with training episodes containing 60 classes and 5 query points per class. We found that it is advantageous to match the training-shot with the test-shot, and to use more classes (higher “way”) per training episode rather than fewer. We compare against various baselines, including the Neural Statistician [7], Meta-Learner LSTM [24], MAML [9], and both the fine-tuned and non-fine-tuned versions of Matching Networks [32]. We computed classification accuracy for our models averaged over 1,000 randomly generated episodes from the test set. The results are shown in Table 1 and to our knowledge are competitive with state-of-the-art on this dataset. Figure 2 shows a sample t-SNE visualization [20] of the embeddings learned by Prototypical Networks. We visualize a subset of test characters from the same alphabet in order to gain better insight, despite the fact that classes in actual test episodes are likely to come from different alphabets. Even though the visualized characters are minor variations of each other, the network is able to cluster the hand-drawn characters closely around the class prototypes. 5 Table 1: Few-shot classification accuracies on Omniglot. ∗Uses non-standard train/test splits. 5-way Acc. 20-way Acc. Model Dist. Fine Tune 1-shot 5-shot 1-shot 5-shot MATCHING NETWORKS [32] Cosine N 98.1% 98.9% 93.8% 98.5% MATCHING NETWORKS [32] Cosine Y 97.9% 98.7% 93.5% 98.7% NEURAL STATISTICIAN [7] N 98.1% 99.5% 93.2% 98.1% MAML [9]∗ N 98.7% 99.9% 95.8% 98.9% PROTOTYPICAL NETWORKS (OURS) Euclid. N 98.8% 99.7% 96.0% 98.9% Table 2: Few-shot classification accuracies on miniImageNet. All accuracy results are averaged over 600 test episodes and are reported with 95% confidence intervals. ∗Results reported by [24]. 5-way Acc. Model Dist. Fine Tune 1-shot 5-shot BASELINE NEAREST NEIGHBORS∗ Cosine N 28.86 ± 0.54% 49.79 ± 0.79% MATCHING NETWORKS [32]∗ Cosine N 43.40 ± 0.78% 51.09 ± 0.71% MATCHING NETWORKS FCE [32]∗ Cosine N 43.56 ± 0.84% 55.31 ± 0.73% META-LEARNER LSTM [24]∗ N 43.44 ± 0.77% 60.60 ± 0.71% MAML [9] N 48.70 ± 1.84% 63.15 ± 0.91% PROTOTYPICAL NETWORKS (OURS) Euclid. N 49.42 ± 0.78% 68.20 ± 0.66% 3.2 miniImageNet Few-shot Classification The miniImageNet dataset, originally proposed by Vinyals et al. [32], is derived from the larger ILSVRC-12 dataset [28]. The splits used by Vinyals et al. [32] consist of 60,000 color images of size 84 × 84 divided into 100 classes with 600 examples each. For our experiments, we use the splits introduced by Ravi and Larochelle [24] in order to directly compare with state-of-the-art algorithms for few-shot learning. Their splits use a different set of 100 classes, divided into 64 training, 16 validation, and 20 test classes. We follow their procedure by training on the 64 training classes and using the 16 validation classes for monitoring generalization performance only. We use the same four-block embedding architecture as in our Omniglot experiments, though here it results in a 1,600-dimensional output space due to the increased size of the images. We also use the same learning rate schedule as in our Omniglot experiments and train until validation loss stops improving. We train using 30-way episodes for 1-shot classification and 20-way episodes for 5-shot classification. We match train shot to test shot and each class contains 15 query points per episode. We compare to the baselines as reported by Ravi and Larochelle [24], which include a simple nearest neighbor approach on top of features learned by a classification network on the 64 training classes. The other baselines are two non-fine-tuned variants of Matching Networks (both ordinary and FCE) and the Meta-Learner LSTM. in the non-fine-tuned setting because the fine-tuning procedure as proposed by Vinyals et al. [32] is not fully described. As can be seen in Table 2, Prototypical Networks achieves state-of-the-art by a wide margin on 5-shot accuracy. We conducted further analysis, to determine the effect of distance metric and the number of training classes per episode on the performance of Prototypical Networks and Matching Networks. To make the methods comparable, we use our own implementation of Matching Networks that utilizes the same embedding architecture as our Prototypical Networks. In Figure 3 we compare cosine vs. Euclidean distance and 5-way vs. 20-way training episodes in the 1-shot and 5-shot scenarios, with 15 query points per class per episode. We note that 20-way achieves higher accuracy than 5-way and conjecture that the increased difficulty of 20-way classification helps the network to generalize better, because it forces the model to make more fine-grained decisions in the embedding space. Also, using Euclidean distance improves performance substantially over cosine distance. This effect is even more pronounced for Prototypical Networks, in which computing the class prototype as the mean of embedded support points is more naturally suited to Euclidean distances since cosine distance is not a Bregman divergence. 6 5-way Cosine 5-way Euclid. 20-way Cosine 20-way Euclid. 1-shot 20% 30% 40% 50% 60% 70% 80% 1-shot Accuracy (5-way) Matching / Proto. Nets 5-way Cosine 5-way Euclid. 20-way Cosine 20-way Euclid. 5-shot 20% 30% 40% 50% 60% 70% 80% 5-shot Accuracy (5-way) Matching Nets Proto. Nets Figure 3: Comparison showing the effect of distance metric and number of classes per training episode on 5-way classification accuracy for both Matching Networks and Prototypical Networks on miniImageNet. The x-axis indicates configuration of the training episodes (way, distance, and shot), and the y-axis indicates 5-way test accuracy for the corresponding shot. Error bars indicate 95% confidence intervals as computed over 600 test episodes. Note that Matching Networks and Prototypical Networks are identical in the 1-shot case. Table 3: Zero-shot classification accuracies on CUB-200. Model Image Features 50-way Acc. 0-shot ALE [1] Fisher 26.9% SJE [2] AlexNet 40.3% SAMPLE CLUSTERING [19] AlexNet 44.3% SJE [2] GoogLeNet 50.1% DS-SJE [25] GoogLeNet 50.4% DA-SJE [25] GoogLeNet 50.9% SYNTHESIZED CLASSIFIERS [6] GoogLeNet 54.7% PROTOTYPICAL NETWORKS (OURS) GoogLeNet 54.8% ZHANG AND SALIGRAMA [36] VGG-19 55.3% ± 0.8 3.3 CUB Zero-shot Classification In order to assess the suitability of our approach for zero-shot learning, we also run experiments on the Caltech-UCSD Birds (CUB) 200-2011 dataset [34]. The CUB dataset contains 11,788 images of 200 bird species. We closely follow the procedure of Reed et al. [25] in preparing the data. We use their splits to divide the classes into 100 training, 50 validation, and 50 test. For images we use 1,024dimensional features extracted by applying GoogLeNet [31] to middle, upper left, upper right, lower left, and lower right crops of the original and horizontally-flipped image2. At test time we use only the middle crop of the original image. For class meta-data we use the 312-dimensional continuous attribute vectors provided with the CUB dataset. These attributes encode various characteristics of the bird species such as their color, shape, and feather patterns. We learned a simple linear mapping on top of both the 1024-dimensional image features and the 312-dimensional attribute vectors to produce a 1,024-dimensional output space. For this dataset we found it helpful to normalize the class prototypes (embedded attribute vectors) to be of unit length, since the attribute vectors come from a different domain than the images. Training episodes were constructed with 50 classes and 10 query images per class. The embeddings were optimized via SGD with Adam at a fixed learning rate of 10−4 and weight decay of 10−5. Early stopping on validation loss was used to determine the optimal number of epochs for retraining on the training plus validation set. Table 3 shows that we achieve state-of-the-art results when compared to methods utilizing attributes as class meta-data. We compare our method to variety of zero-shot learning methods, including other embedding approaches such as ALE [1], SJE [2], and DS-SJE/DA-SJE [25]. We also compare to a recent clustering approach [19] which trains an SVM on a learned feature space obtained by fine2Features downloaded from https://github.com/reedscot/cvpr2016. 7 tuning AlexNet [16]. The Synthesized Classifiers approach of [6] is a manifold learning technique that aligns the class meta-data space with the visual model space, and the method of Zhang and Saligrama [36] is a structured prediction approach trained on top of VGG-19 features [30]. Since Zhang and Saligrama [36] is a randomized method, we include their reported error bars in Table 3. Our Protypical Networks outperform Synthesized Classifiers and are within error bars of Zhang and Saligrama [36], while being a much simpler approach than either. We also ran an additional set of zero-shot experiments with stronger class meta-data. We extracted 1,024-dimensional meta-data vectors for each CUB-200 class using the pretrained Char CNN-RNN model of [25], then trained zero-shot Prototypical Networks using the same procedure described above except we used a 512-dimensional output embedding, as chosen via validation accuracy. We obtained test accuracy of 58.3%, compared to the 54.0% accuracy obtained by DS-SJE [25] with a Char CNN-RNN model. Moreover, our result exceeds the 56.8% accuracy attained by DS-SJE with even stronger Word CNN-RNN class-metadata representations. Taken together, these zero-shot classification results demonstrate that our approach is general enough to be applied even when the data points (images) are from a different domain relative to the classes (attributes). 4 Related Work The literature on metric learning is vast [17, 5]; we summarize here the work most relevant to our proposed method. Neighborhood Components Analysis (NCA) [10] learns a Mahalanobis distance to maximize K-nearest-neighbor’s (KNN) leave-one-out accuracy in the transformed space. Salakhutdinov and Hinton [29] extend NCA by using a neural network to perform the transformation. Large margin nearest neighbor (LMNN) classification [33] also attempts to optimize KNN accuracy but does so using a hinge loss that encourages the local neighborhood of a point to contain other points with the same label. The DNet-KNN [23] is another margin-based method that improves upon LMNN by utilizing a neural network to perform the embedding instead of a simple linear transformation. Of these, our method is most similar to the non-linear extension of NCA [29] because we use a neural network to perform the embedding and we optimize a softmax based on Euclidean distances in the transformed space, as opposed to a margin loss. A key distinction between our approach and non-linear NCA is that we form a softmax directly over classes, rather than individual points, computed from distances to each class’s prototype representation. This allows each class to have a concise representation independent of the number of data points and obviates the need to store the entire support set to make predictions. Our approach is also similar to the nearest class mean approach [21], where each class is represented by the mean of its examples. This approach was developed to rapidly incorporate new classes into a classifier without retraining, however it relies on a linear embedding and was designed to handle the case where the novel classes come with a large number of examples. In contrast, our approach utilizes neural networks to non-linearly embed points and we couple this with episodic training in order to handle the few-shot scenario. Mensink et al. [21] attempt to extend their approach to also perform non-linear classification, but they do so by allowing classes to have multiple prototypes. They find these prototypes in a pre-processing step by using k-means on the input space and then perform a multi-modal variant of their linear embedding. Prototypical Networks, on the other hand, learn a non-linear embedding in an end-to-end manner with no such pre-processing, producing a non-linear classifier that still only requires one prototype per class. In addition, our approach naturally generalizes to other distance functions, particularly Bregman divergences. The center loss proposed by Wen et al. [35] for face recognition is similar to ours but has two main differences. First, they learn the centers for each class as parameters of the model whereas we compute protoypes as a function of the labeled examples within each episode. Second, they combine the center loss with a softmax loss in order to prevent representations collapsing to zero, whereas we construct a softmax loss from our prototypes which naturally prevents such collapse. Moreover, our approach is designed for the few-shot scenario rather than face recognition. A relevant few-shot learning method is the meta-learning approach proposed in Ravi and Larochelle [24]. The key insight here is that LSTM dynamics and gradient descent can be written in effectively the same way. An LSTM can then be trained to itself train a model from a given episode, with the performance goal of generalizing well on the query points. MAML [9] is another meta-learning approach to few-shot learning. It seeks to learn a representation that is easily fit to new data with few 8 steps of gradient descent. Matching Networks and Prototypical Networks can also be seen as forms of meta-learning, in the sense that they produce simple classifiers dynamically from new training episodes; however the core embeddings they rely on are fixed after training. The FCE extension to Matching Networks involves a secondary embedding that depends on the support set. However, in the few-shot scenario the amount of data is so small that a simple inductive bias seems to work well, without the need to learn a custom embedding for each episode. Prototypical Networks are also related to the Neural Statistician [7] from the generative modeling literature, which extends the variational autoencoder [14, 26] to learn generative models of datasets rather than individual points. One component of the Neural Statistician is the “statistic network” which summarizes a set of data points into a statistic vector. It does this by encoding each point within a dataset, taking a sample mean, and applying a post-processing network to obtain an approximate posterior over the statistic vector. Edwards and Storkey [7] test their model for one-shot classification on the Omniglot dataset by considering each character to be a separate dataset and making predictions based on the class whose approximate posterior over the statistic vector has minimal KL-divergence from the posterior inferred by the test point. Like the Neural Statistician, we also produce a summary statistic for each class. However, ours is a discriminative model, as befits our discriminative task of few-shot classification. With respect to zero-shot learning, the use of embedded meta-data in Prototypical Networks resembles the method of [3] in that both predict the weights of a linear classifier. The DS-SJE and DA-SJE approach of [25] also learns deep multimodal embedding functions for images and class meta-data. Unlike ours, they learn using an empirical risk loss. Neither [3] nor [25] uses episodic training, which allows us to help speed up training and regularize the model. 5 Conclusion We have proposed a simple method called Prototypical Networks for few-shot learning based on the idea that we can represent each class by the mean of its examples in a representation space learned by a neural network. We train these networks to specifically perform well in the few-shot setting by using episodic training. The approach is far simpler and more efficient than recent meta-learning approaches, and produces state-of-the-art results even without sophisticated extensions developed for Matching Networks (although these can be applied to Prototypical Networks as well). We show how performance can be greatly improved by carefully considering the chosen distance metric, and by modifying the episodic learning procedure. We further demonstrate how to generalize Prototypical Networks to the zero-shot setting, and achieve state-of-the-art results on the CUB-200 dataset. A natural direction for future work is to utilize Bregman divergences other than squared Euclidean distance, corresponding to class-conditional distributions beyond spherical Gaussians. We conducted preliminary explorations of this, including learning a variance per dimension for each class. This did not lead to any empirical gains, suggesting that the embedding network has enough flexibility on its own without requiring additional fitted parameters per class. Overall, the simplicity and effectiveness of Prototypical Networks makes it a promising approach for few-shot learning. Acknowledgements We would like to thank Marc Law, Sachin Ravi, Hugo Larochelle, Renjie Liao, and Oriol Vinyals for helpful discussions. This work was supported by the Samsung GRP project and the Canadian Institute for Advanced Research. References [1] Zeynep Akata, Florent Perronnin, Zaid Harchaoui, and Cordelia Schmid. Label-embedding for attributebased classification. In IEEE Computer Vision and Pattern Recognition, pages 819–826, 2013. [2] Zeynep Akata, Scott Reed, Daniel Walter, Honglak Lee, and Bernt Schiele. Evaluation of output embeddings for fine-grained image classification. In IEEE Computer Vision and Pattern Recognition, 2015. [3] Jimmy Ba, Kevin Swersky, Sanja Fidler, and Ruslan Salakhutdinov. Predicting deep zero-shot convolutional neural networks using textual descriptions. In International Conference on Computer Vision, pages 4247– 4255, 2015. 9 [4] Arindam Banerjee, Srujana Merugu, Inderjit S Dhillon, and Joydeep Ghosh. Clustering with bregman divergences. Journal of Machine Learning Research, 6(Oct):1705–1749, 2005. [5] Aurélien Bellet, Amaury Habrard, and Marc Sebban. A survey on metric learning for feature vectors and structured data. arXiv preprint arXiv:1306.6709, 2013. [6] Soravit Changpinyo, Wei-Lun Chao, Boqing Gong, and Fei Sha. Synthesized classifiers for zero-shot learning. In IEEE Computer Vision and Pattern Recognition, pages 5327–5336, 2016. [7] Harrison Edwards and Amos Storkey. Towards a neural statistician. International Conference on Learning Representations, 2017. [8] Mohamed Elhoseiny, Babak Saleh, and Ahmed Elgammal. Write a classifier: Zero-shot learning using purely textual descriptions. In International Conference on Computer Vision, pages 2584–2591, 2013. [9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. International Conference on Machine Learning, 2017. [10] Jacob Goldberger, Geoffrey E. Hinton, Sam T. Roweis, and Ruslan Salakhutdinov. Neighbourhood components analysis. In Advances in Neural Information Processing Systems, pages 513–520, 2004. [11] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. [12] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [13] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [14] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [15] Gregory Koch. Siamese neural networks for one-shot image recognition. Master’s thesis, University of Toronto, 2015. [16] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1097–1105, 2012. [17] Brian Kulis. Metric learning: A survey. Foundations and Trends in Machine Learning, 5(4):287–364, 2012. [18] Brenden M. Lake, Ruslan Salakhutdinov, Jason Gross, and Joshua B. Tenenbaum. One shot learning of simple visual concepts. In CogSci, 2011. [19] Renjie Liao, Alexander Schwing, Richard Zemel, and Raquel Urtasun. Learning deep parsimonious representations. Advances in Neural Information Processing Systems, 2016. [20] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008. [21] Thomas Mensink, Jakob Verbeek, Florent Perronnin, and Gabriela Csurka. Distance-based image classification: Generalizing to new classes at near-zero cost. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(11):2624–2637, 2013. [22] Erik G Miller, Nicholas E Matsakis, and Paul A Viola. Learning from one example through shared densities on transforms. In IEEE Computer Vision and Pattern Recognition, volume 1, pages 464–471, 2000. [23] Renqiang Min, David A Stanley, Zineng Yuan, Anthony Bonner, and Zhaolei Zhang. A deep non-linear feature mapping for large-margin knn classification. In IEEE International Conference on Data Mining, pages 357–366, 2009. [24] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. International Conference on Learning Representations, 2017. [25] Scott Reed, Zeynep Akata, Bernt Schiele, and Honglak Lee. Learning deep representations of fine-grained visual descriptions. In IEEE Computer Vision and Pattern Recognition, 2016. [26] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014. 10 [27] Oren Rippel, Manohar Paluri, Piotr Dollar, and Lubomir Bourdev. Metric learning with adaptive density discrimination. International Conference on Learning Representations, 2016. [28] 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. International Journal of Computer Vision, 115(3):211–252, 2015. [29] Ruslan Salakhutdinov and Geoffrey E. Hinton. Learning a nonlinear embedding by preserving class neighbourhood structure. In AISTATS, pages 412–419, 2007. [30] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [31] 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 Computer Vision and Pattern Recognition, pages 1–9, 2015. [32] Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, pages 3630–3638, 2016. [33] Kilian Q Weinberger, John Blitzer, and Lawrence K Saul. Distance metric learning for large margin nearest neighbor classification. In Advances in Neural Information Processing Systems, pages 1473–1480, 2005. [34] P. Welinder, S. Branson, T. Mita, C. Wah, F. Schroff, S. Belongie, and P. Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. [35] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In European Conference on Computer Vision, pages 499–515. Springer, 2016. [36] Ziming Zhang and Venkatesh Saligrama. Zero-shot recognition via structured prediction. In European Conference on Computer Vision, pages 533–548. Springer, 2016. 11 | 2017 | 530 |
7,042 | Unsupervised learning of object frames by dense equivariant image labelling James Thewlis1 Hakan Bilen2 Andrea Vedaldi1 1 Visual Geometry Group University of Oxford {jdt,vedaldi}@robots.ox.ac.uk 2 School of Informatics University of Edinburgh hbilen@ed.ac.uk Abstract One of the key challenges of visual perception is to extract abstract models of 3D objects and object categories from visual measurements, which are affected by complex nuisance factors such as viewpoint, occlusion, motion, and deformations. Starting from the recent idea of viewpoint factorization, we propose a new approach that, given a large number of images of an object and no other supervision, can extract a dense object-centric coordinate frame. This coordinate frame is invariant to deformations of the images and comes with a dense equivariant labelling neural network that can map image pixels to their corresponding object coordinates. We demonstrate the applicability of this method to simple articulated objects and deformable objects such as human faces, learning embeddings from random synthetic transformations or optical flow correspondences, all without any manual supervision. 1 Introduction Humans can easily construct mental models of complex 3D objects and object categories from visual observations. This is remarkable because the dependency between an object’s appearance and its structure is tangled in a complex manner with extrinsic nuisance factors such as viewpoint, illumination, and articulation. Therefore, learning the intrinsic structure of an object from images requires removing these unwanted factors of variation from the data. The recent work of [39] has proposed an unsupervised approach to do so, based on on the concept of viewpoint factorization. The idea is to learn a deep Convolutional Neural Network (CNN) that can, given an image of the object, detect a discrete set of object landmarks. Differently from traditional approaches to landmark detection, however, landmarks are neither defined nor supervised manually. Instead, the detectors are learned using only the requirement that the detected points must be equivariant (consistent) with deformations of the input images. The authors of [39] show that this constraint is sufficient to learn landmarks that are “intrinsic” to the objects and hence capture their structure; remarkably, due to the generalization ability of CNNs, the landmark points are detected consistently not only across deformations of a given object instance, which are observed during training, but also across different instances. This behaviour emerges automatically from training on thousands of single-instance correspondences. In this paper, we take this idea further, moving beyond a sparse set of landmarks to a dense model of the object structure (section 3). Our method relates each point on an object to a point in a low dimensional vector space in a way that is consistent across variation in motion and in instance identity. This gives rise to an object-centric coordinate system, which allows points on the surface of an object to be indexed semantically (figure 1). As an illustrative example, take the object category of a face and the vector space R3. Our goal is to semantically map out the object such that any point on a face, such as the left eye, lives at a canonical position in this “label space”. We train a CNN to learn the function that projects any face image into this space, essentially “coloring” each pixel with its 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Dense equivariant image labelling. Left: Given an image x of an object or object category and no other supervision, our goal is to find a common latent space Z, homeomorphic to a sphere, which attaches a semantically-consistent coordinate frame to the object points. This is done by learning a dense labelling function that maps image pixels to their corresponding coordinate in the Z space. This mapping function is equivariant (compatible) with image warps or object instance variations. Right: An equivariant dense mapping learned in an unsupervised manner from a large dataset of faces. (Results of SIMPLE network, Ldist, γ = 0.5) corresponding label. As a result of our learning formulation, the label space has the property of being locally smooth: points nearby in the image are nearby in the label space. In an ideal case, we could imagine the surface of an object to be mapped to a sphere. In order to achieve these results, we contribute several technical innovations (section 3.2). First, we show that, in order to learn a non-trivial object coordinate frame, the concept of equivariance must be complemented with the one of distinctiveness of the embedding. Then, we propose a CNN implementation of this concept that can explicitly express uncertainty in the labelling of the object points. The formulation is used in combination with a probabilistic loss, which is augmented with a robust geometric distance to encourage better alignment of the object features. We show that this framework can be used to learn meaningful object coordinate frames in a purely unsupervised manner, by analyzing thousands of deformations of visual objects. While [39] proposed to use Thin Plate Spline image warps for training, here we also consider simple synthetic articulated objects having frames related by known optical flow (section 4). We conclude the paper with a summary of our finding (section 5). 2 Related Work Learning the structure of visual objects. Modeling the structure of visual objects is a widelystudied (e.g. [6, 7, 11, 41, 12]) computer vision problem with important applications such as facial landmark detection and human body pose estimation. Much of this work is supervised and aimed at learning detectors of objects or their parts, often using deep learning. A few approaches such as spatial transformer networks [20] can learn geometric transformations without explicit geometric supervision, but do not build explicit geometric models of visual objects. More related to our work, WarpNet [21] and geometric matching networks [35] learn a neural network that predicts Thin Plate Spline [3] transformations between pairs of images of an object, including synthetic warps. Deep Deformation Network [44] improves WarpNet by using a Point Transformer Network to refine the computed landmarks, but it requires manual supervision. None of these works look at the problem of learning an invariant geometric embedding for the object. Our work builds on the idea of viewpoint factorization (section 3.1), recently introduced in [39, 32]. However, we extend [39] in several significant ways. First, we construct a dense rather than discrete embedding, where all pixels of an object are mapped to an invariant object-centric coordinate instead of just a small set of selected landmarks. Second, we show that the equivariance constraint proposed in [39] is not quite enough to learn such an embedding; it must be complemented with the concept of a distinctive embedding (section 3.1). Third, we introduce a new neural network architecture and corresponding training objective that allow such an embedding to be learned in practice (section 3.2). Optical/semantic flow. A common technique to find correspondences between temporally related video frames is optical flow [18]. The state-of-the-art methods [14, 40, 19] typically employ convolu2 tional neural networks to learn pairwise dense correspondences between the same object instances at subsequent frames. The SIFT Flow method [25] extends the between-instance correspondences to cross-instance mappings by matching SIFT features [27] between semantically similar object instances. Learned-Miller [24] extends the pairwise correspondences to multiple images by posing a problem of alignment among the images of a set. Collection Flow [22] and Mobahi et al. [29] project objects onto a low-rank space that allow for joint alignment. FlowWeb [52], and Zhou et al. [51] construct fully connected graphs to maximise cycle consistency between each image pair and synthethic data as an intermediary by training a CNN. In our experiments (section 4) flow is known from synthetic warps or motion, but our work could build on any unsupervised optical flow method. Unsupervised learning. Classical unsupervised learning methods such as autoencoders [4, 2, 17] and denoising autoencoders aim to learn useful feature representations from an input by simply reconstructing it after a bottleneck. Generative adversarial networks [16] target producing samples of realistic images by training generative models. These models when trained joint with image encoders are also shown to learn good feature representations [9, 10]. More recently several studies have emerged that train neural networks by learning auxiliary or pseudo tasks. These methods exploit typically some existing information in input as “self-supervision” without any manual labeling by removing or perturbing some information from an input and requiring a network to reconstruct it. For instance, Doersch et al. [8], and Noroozi and Favaro [31] train a network to predict the relative locations of shuffled image patches. Other self-supervised tasks include colorizing images [46], inpainting [34], ranking frames of a video in temporally correct order [28, 13]. More related to our approach, Agrawal et al. [1] use egomotion as supervisory signal to learn feature representations in a Siamese network by predicting camera transformations from image pairs, [33] learn to group pixels that move together in a video. [50, 15] use a warping-based loss to learn depth from video. Recent work [36] leverages RGB-D based reconstruction [30] and is similar to this work, showing qualitatively impressive results learning a consistent low-dimensional labelling on a human dataset. 3 Method This section discusses our method in detail, first introducing the general idea of dense equivariant labelling (section 3.1), and then presenting a concrete implementation of the latter using a novel deep CNN architecture (section 3.2). 3.1 Dense equivariant labelling Consider a 3D object S ⊂R3 or a class of such objects S that are topologically isomorphic to a sphere Z ⊂R3 (i.e. the objects are simple closed surfaces without holes). We can construct a homeomorphism p = πS(q) mapping points of the sphere q ∈Z to points p ∈S of the objects. Furthermore, if the objects belong to the same semantic category (e.g. faces), we can assume that these isomorphisms are semantically consistent, in the sense that πS′ ◦π−1 S : S →S′ maps points of object S to semantically-analogous points in object S′ (e.g. for human faces the right eye in one face should be mapped to the right eye in another [39]). While this construction is abstract, it shows that we can endow the object (or object category) with a spherical reference system Z. The authors of [39] build on this construction to define a discrete system of object landmarks by considering a finite number of points zk ∈Z. Here, we take the geometric embedding idea more literally and propose to explicitly learn a dense mapping from images of the object to the object-centric coordinate space Z. Formally, we wish to learn a labelling function Φ : (x, u) 7→z that takes a RGB image x : Λ →R3, Λ ⊂R3 and a pixel u ∈Λ to the object point z ∈Z which is imaged at u (figure 1). Similarly to [39], this mapping must be compatible or equivariant with image deformations. Namely, let g : Λ →Λ be a deformation of the image domain, either synthetic or due to a viewpoint change or other motion. Furthermore, let gx = x ◦g−1 be the action of g on the image (obtained by inverse warp). Barring occlusions and boundary conditions, pixel u in image x must receive the same label as pixel gu in image gx, which results in the invariance constraint: ∀x, u : Φ(x, u) = Φ(gx, gu). (1) 3 Equivalently, we can view the network as a functional x 7→Φ(x, ·) that maps the image to a corresponding label map. Since the label map is an image too, g acts on it by inverse warp.1 Using this, the constraint (1) can be rewritten as the equivariance relation gΦ(x, ·) = Φ(gx, ·). This can be visualized by noting that the label image deforms in the same way as the input image, as show for example in figure 3. For learning, constraint (1) can be incorporated in a loss function as follows: L(Φ|α) = 1 |Λ| Z Λ ∥Φ(x, u) −Φ(gx, gu)∥2 du. However, minimizing this loss has the significant drawback that a global optimum is obtained by simply setting Φ(x, u) = const. The reason for this issue is that (1) is not quite enough to learn a useful object representation. In order to do so, we must require the labels not only to be equivariant, but also distinctive, in the sense that Φ(x, u) = Φ(gx, v) ⇔ v = gu. We can encode this requirement as a loss in different ways. For example, by using the fact that points Φ(x, u) are on the unit sphere, we can use the loss: L′(Φ|x, g) = 1 |Λ| Z Λ ∥gu −argmaxv⟨Φ(x, u), Φ(gx, v)⟩∥2 du. (2) By doing so, the labels Φ(x, u) must be able to discriminate between different object points, so that a constant labelling would receive a high penalty. Relationship with learning invariant visual descriptors. As an alternative to loss (2), we could have used a pairwise loss2 to encourage the similarity ⟨Φ(x, u), Φ(x′, gu)⟩of the labels assigned to corresponding pixels u and gu to be larger than the similarity ⟨Φ(x, u), Φ(x′, v)⟩of the labels assigned to pixels u and v that do not correspond. Formally, this would result in a pairwise loss similar to the ones often used to learn invariant visual descriptors for image matching. The reason why our method learns an object representation instead of a generic visual descriptor is that the dimensionality of the label space Z is just enough to represent a point on a surface. If we replace Z with a larger space such as Rd, d ≫2, we can expect Φ(x, u) to learn to extract generic visual descriptors like SIFT instead. This establishes an interesting relationship between visual descriptors and object-specific coordinate vectors and suggests that it is possible to transition between the two by controlling their dimensionality. 3.2 Concrete learning formulation In this section we introduce a concrete implementation of our method (figure 2). For the mapping Φ, we use a CNN that receives as input an image tensor x ∈RH×W ×C and produces as output a label tensor z ∈RH×W ×L. We use the notation Φu(x) to indicate the L-dimensional label vector extracted at pixel u from the label image computed by the network. The dimension of the label vectors is set to L = 3 (instead of L = 2) in order to allow the network to express uncertainty about the label assigned to a pixel. The network can do so by modulating the norm of Φu(x). In fact, correspondences are expressed probabilistically by computing the inner product of label vectors followed by the softmax operator. Formally, the probability that pixel v in image x′ corresponds to pixel u in image x is expressed as: p(v|u; x, x′, Φ) = e⟨Φu(x),Φv(x′)⟩ P z e⟨Φu(x),Φz(x′)⟩. (3) In this manner, a shorter vector Φu results in a more diffuse probability distribution. 1In the sense that gΦ(x, ·) = Φ(x, ·) ◦g−1. 2Formally, this is achieved by the loss L′′(Φ|x, g) = 1 |Λ| Z Λ max n 0, max v ∆(u, v) + ⟨Φ(x, u), Φ(gx, v)⟩−⟨Φ(x, u), Φ(gx, gu)⟩ o du, where ∆(u, v) ≥0 is an error-dependent margin. 4 Optical flow Figure 2: Unsupervised dense correspondence network. From left to right: The network Φ extracts label maps Φu(x) and Φv(x′) from the image pair x and x′. An optical flow module (or ground truth for synthetic transformation) computes the warp (correspondence field) g such that x′ = gx. Then the label of each point u in the first image is correlated to each point v in the second, obtaining a number of score maps. The loss evaluates how well the score maps predict the warp g. Next, we wish to define a loss function for learning Φ from data. To this end, we consider a triplet α = (x, x′, g), where x′ = gx is an image that corresponds to x up to transformation g (the nature of the data is discussed below). We then assess the performance of the network Φ on the triplet α using two losses. The first loss is the negative log-likelihood of the ground-truth correspondences: Llog(Φ|x, x′, g) = − 1 HW X u log p(gu|u; x, x′, Φ). (4) This loss has the advantage that it explicitly learns (3) as the probability of a match. However, it is not sensitive to the size of a correspondence error v −gu. In order to address this issue, we also consider the loss Ldist(Φ|x, x′, g) = 1 HW X u X v ∥v −gu∥γ 2 p(v|u; x, x′, Φ). (5) Here γ > 0 is an exponent used to control the robustness of the distance measure, which we set to γ = 0.5, 1. Nework details. We test two architecture. The first one, denoted SIMPLE, is the same as [49, 39] and is a chain (5, 20)+, (2, mp), ↓2, (5, 48)+, (3, 64)+, (3, 80)+, (3, 256)+, (1, 3) where (h, c) is a bank of c filters of size h × h, + denotes ReLU, (h, mp) is h × h max-pooling, ↓s is s× downsampling. Better performance can be obtained by increasing the support of the filters in the network; for this, we consider a second network DILATIONS (5, 20)+, (2, mp), ↓2 , (5, 48)+, (5, 64, 2)+, (3, 80, 4)+, (3, 256, 2)+, (1, 3) where (h, c, d) is a filter with ×d dilation [43]. 3.3 Learning from synthetic and true deformations Losses (4) and (5) learn from triplets α = (x, x′, g). Here x′ can be either generated synthetically by applying a random transformation g to a natural image x [39, 21], or it can be obtained by observing image pairs (x, x′) containing true object deformations arising from a viewpoint change or an object motion or deformation. The use of synthetic transformations enables training even on static images and was considered in [39], who showed it to be sufficient to learn meaningful landmarks for a number of real-world object such as human and cat faces. Here, in addition to using synthetic deformations, we also consider using animated image pairs x and x′. In principle, the learning formulation can be modified so that knowledge of g is not required; instead, images and their warps can be compared and aligned directly based on the brightness constancy principle. In our toy video examples we obtain g from the rendering engine, but it can in theory be obtained using an off-the-shelf optical flow algorithm which would produce a noisy version of g. 5 Figure 3: Roboarm equivariant labelling. Top: Original video frames of a simple articulated object. Middle and bottom: learned labels, which change equivariantly with the arm, learned using Llog and Ldist, respectively. Different colors denote different points of the spherical object frame. 4 Experiments This section assesses our unsupervised method for dense object labelling on two representative tasks: two toy problems (sections 4.1 and 4.2) and human and cat faces (section 4.3). 4.1 Roboarm example In order to illustrate our method we consider a toy problem consisting of a simple articulated object, namely an animated robotic arm (figure 3) created using a 2D physics engine [38]. We do so for two reasons: to show that the approach is capable of labelling correctly deformable/articulated objects and to show that the spherical model Z is applicable also to thin objects, that have mainly a 1D structure. Dataset details. The arm is anchored to the bottom left corner and is made up of colored capsules connected with joints having reasonable angle limits to prevent unrealistic contortion and selfocclusion. Motion is achieved by varying the gravity vector, sampling each element from a Gaussian with standard deviation 15 m s−2 every 100 iterations. Frames x of size 90 × 90 pixels and the corresponding flow fields g : x 7→x′ are saved every 20 iterations. We also save the positions of the capsule centers. The final dataset has 23999 frames. Learning. Using the correspondences α = (x, x′, g) provided by the flow fields, we use our method to learn an object centric coordinate frame Z and its corresponding labelling function Φu(x). We test learning Φ using the probabilistic loss (4) and distance-based loss (5). In the loss we ignore areas with zero flow, which automatically removes the background. We use the SIMPLE network architecture (section 3.2). Results. Figure 3 provides some qualitative results, showing by means of colormaps the labels Φu(x) associated to different pixels of each input image. It is easy to see that the method attaches consistent labels to the different arm elements. The distance-based loss produces a more uniform embedding, as may be expected. The embeddings are further visualized in Figure 4 by projecting a number of video frames back to the learned coordinate spaces Z. It can be noted that the space is invariant, in the sense that the resulting figure is approximately the same despite the fact that the object deforms significantly in image space. This is true for both embeddings, but the distance-based ones are geometrically more consistent. Predicting capsule centers. We evaluate quantitatively the ability of our object frames to localise the capsule centers. If our assumption is correct and a coordinate system intrinsic to the object has been learned, then we should expect there to be a specific 3-vector in Z corresponding to each center, and our job is to find these vectors. Various strategies could be used, such as averaging the object-centric coordinates given to the centers over the training set, but we choose to incorporate the problem into the learning framework. This is done using the negative log-likelihood in much the same way as (4), limiting our vectors u to the centers. This is done as an auxiliary layer with no backpropagation to the rest of the network, so that the embedding remains unsupervised. The error reported is the Euclidean distance as a percentage of the image width. Results are given for the different loss functions used for unsupervised training in Table 1 and visualized in Figure 5 right, showing that the object centers can be located to a high degree of 6 -4 -2 0 2 4 -2 -1 0 1 2 -4 -2 0 2 4 -2 -1 0 1 2 -4 -2 0 2 4 -2 -1 0 1 2 -4 -2 0 2 4 -2 -1 0 1 2 -4 -2 0 2 4 -2 -1 0 1 2 -4 -2 0 2 4 -2 -1 0 1 2 Figure 4: Invariance of the object-centric coordinate space for Roboarm. The plot projects frames 3,6,9 of figure 3 on the object-centric coordinate space Z, using the embedding functions learned by means of the probabilistic (top) and distance (bottom) based losses. The sphere is then unfolded, plotting latitude and longitude (in radians) along the vertical and horizontal axes. Log Dist 0.5 Dist 1 Ground truth Figure 5: Left: Embedding spaces of different dimension. Spherical embedding (from the 3D embedding function Φu(x) ∈R3) learned using the distance loss compared to a circular embedding with one dimension less. Right: Capsule center prediction for different losses. accuracy. The negative log likelihood performs best while the two losses incorporating distance perform similarly. We also perform experiments varying the dimensionality L of the label space Z (Table 2). Perhaps most interestingly, given the almost one-dimensional nature of the arm, is the case of L = 2, which would correspond to an approximately circular space (since the length of vectors is used to code for uncertainty). As seen in the right of Figure 5 left, the segments are represented almost perfectly on the boundary of a circle, with the exception of the bifurcation which it is unable to accurately represent. This is manifested by the light blue segment trying, and failing, to be in two places at once. Unsupervised Loss Error Llog 0.97 % Ldist, γ = 1 1.13 % Ldist, γ = 0.5 1.14 % Table 1: Predicting capsule centers. Error as percent of image width. Descriptor Dimension Error 2 1.29 % 3 1.14 % 5 1.16 % 20 1.28 % Table 2: Descriptor dimension (Ldist, γ = 0.5). L>3 shows no improvement, suggesting L=3 is the natural manifold of the arm. 4.2 Textured sphere example The experiment of Figure 6 tests the ability of the method to understand a complete rotation of a 3D object, a simple textured sphere. Despite the fact that the method is trained on pairs of adjacent video frames (and corresponding optical flow), it still learns a globally-consistent embedding. However, this required switching from from the SIMPLE to the DILATIONS architecture (section 3.2). 4.3 Faces After testing our method on a toy problem, we move to a much harder task and apply our method to generate an object-centric reference frame Z for the category of human faces. In order to generate an image pair and corresponding flow field for training we warp each face synthetically using Thin Plate Spline warps in a manner similar to [39]. We train our models on the extensive CelebA [26] dataset of over 200k faces as in [39], excluding MAFL [49] test overlap from the given training split. It has annotations of the eyes, nose and mouth corners. Note that we do not use these to train our model. We also use AFLW [23], testing on 2995 faces [49, 42, 48] with 5 landmarks. Like [39] we 7 Figure 6: Sphere equivariant labelling. Top: video frames of a rotating textured sphere. Middle: learned dense labels, which change equivariantly with the sphere. Bottom: re-projection of the video frames on the object frame (also spherical). Except for occlusions, the reprojections are approximately invariant, correctly mapping the blue and orange sides to different regions of the label space use 10,122 faces for training. We additionally evaluate qualitatively on a dataset of cat faces [47], using 8609 images for training. Qualitative assessment. We find that for network SIMPLE the negative log-likelihood loss, while performing best for the simple example of the arm, performs poorly on faces. Specifically, this model fails to disambiguate the left and right eye, as shown in Figure 9 (right). The distance-based loss (5) produces a more coherent embedding, as seen in Figure 9 (left). Using DILATIONS this problem disappears, giving qualitatively smooth and unambiguous labels for both the distance loss (Figure 7) and the log-likelihood loss (Figure 8). For cats our method is able to learn a consistent object frame despite large variations in appearance (Figure 8). Figure 7: Faces. DILATIONS network with Ldist, γ = 0.5. Top: Input images, Middle: Predicted dense labels mapped to colours, Bottom: Image pixels mapped to label sphere and flattened. Regressing semantic landmarks. We would like to quantify the accuracy of our model in terms of ability to consistently locate manually annotated points, specifically the eyes, nose, and mouth corners given in the CelebA dataset. We use the standard test split for evaluation of the MAFL dataset [49], containing 1000 images. We also use the MAFL training subset of 19k images for learning to predict the ground truth landmarks, which gives a quantitative measure of the consistency of our object frame for detecting facial features. These are reported as Euclidean error normalized as a percentage of inter-ocular distance. In order to map the object frame to the semantic landmarks, as in the case of the robot arm centers, we learn the vectors zk ∈Z corresponding to the position of each point in our canonical reference space and then, for any given image, find the nearest z and its corresponding pixel location u. We report the localization performance of this model in Table 3 (“Error Nearest”). We empirically validate that with the SIMPLE network the negative log-likelihood is not ideal for this task (Figure 9) and 8 Figure 8: Cats. DILATIONS network with Llog. Top: Input images, Middle: Labels mapped to colours, Bottom: Images mapped to the spherical object frames. Figure 9: Annotated landmark prediction from the shown unsupervised label maps (SIMPLE network). Left: Trained with Ldist, γ = 0.5, Right: Failure to disambiguate eyes with Llog. (Prediction: green, Ground truth: Blue) we obtain higher performance for the robust distance with power 0.5. However, after switching to DILATIONS to increase the receptive field both methods perform comparably. The method of [39] learns to regress P ground truth coordinates based on M > P unsupervised landmarks. By regressing from multiple points it is not limited to integer pixel coordinates. While we are not predicting landmarks as network output, we can emulate this method by allowing multiple points in our object coordinate space to be predictive for a single ground truth landmark. We learn one regressor per ground truth point, each formulated as a linear regressor R2M →R2 on top of coordinates from M = 50 learned intermediate points. This allows the regression to say which points in Z are most useful for predicting each ground truth point. We also report results after unsupervised finetuning of a CelebA network to the more challenging AFLW followed by regressor training on AFLW. As shown in Tables 3 and 4, we outperform other unsupervised methods on both datasets, and are comparable to fully supervised methods. Network Unsup. Loss Error Error Nearest Regress SIMPLE Llog 75.02 % — SIMPLE Ldist, γ = 1 14.57 % 7.94 % SIMPLE Ldist, γ = 0.5 13.29 % 7.18 % DILATIONS Llog 11.05 % 5.83 % DILATIONS Ldist, γ = 0.5 10.53 % 5.87 % [39] 6.67 % Table 3: Nearest neighbour and regression landmark prediction on MAFL Method Error RCPR [5] 11.6 % Cascaded CNN [37] 8.97 % CFAN [45] 10.94 % TCDCN [49] 7.65 % RAR [42] 7.23 % Unsup. Landmarks [39] 10.53 % DILATIONS Ldist, γ = 0.5 8.80 % Table 4: Comparison with supervised and unsupervised methods on AFLW 5 Conclusions Building on the idea of viewpoint factorization, we have introduce a new method that can endow an object or object category with an invariant dense geometric embedding automatically, by simply observing a large dataset of unlabelled images. Our learning framework combines in a novel way the concept of equivariance with the one of distinctiveness. We have also proposed a concrete implementation using novel losses to learn a deep dense image labeller. We have shown empirically that the method can learn a consistent geometric embedding for a simple articulated synthetic robotic arm as well as for a 3D sphere model and real faces. The resulting embeddings are invariant to deformations and, importantly, to intra-category variations. 9 Acknowledgments: This work acknowledges the support of the AIMS CDT (EPSRC EP/L015897/1) and ERC 677195-IDIU. Clipart: FreePik. References [1] Pulkit Agrawal, Joao Carreira, and Jitendra Malik. Learning to see by moving. In Proc. ICCV, 2015. [2] Yoshua Bengio. Learning deep architectures for AI. Foundations and trends in Machine Learning, 2009. [3] Fred L. Bookstein. Principal Warps: Thin-Plate Splines and the Decomposition of Deformations. PAMI, 1989. [4] H Bourlard and Y Kamp. Auto-Association by Multilayer Perceptrons and Singular Value Decomposition. Biological Cybernetics, 1988. [5] Xavier P. Burgos-Artizzu, Pietro Perona, and Piotr Dollár. Robust face landmark estimation under occlusion. In Proc. ICCV, 2013. [6] T F Cootes, C J Taylor, D H Cooper, and J Graham. Active shape models: their training and application. CVIU, 1995. [7] Navneet Dalal and Bill Triggs. Histograms of Oriented Gradients for Human Detection. In Proc. CVPR, 2005. [8] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised Visual Representation Learning by Context Prediction. In Proc. ICCV, 2015. [9] Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. Proc. ICLR, 2017. [10] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. Proc. ICLR, 2017. [11] Pedro F. Felzenszwalb, Ross B. Girshick, David McAllester, and Deva Ramanan. Object Detection with Discriminatively Trained Part Based Models. PAMI, 2010. [12] Rob Fergus, Pietro Perona, and Andrew Zisserman. Object class recognition by unsupervised scale-invariant learning. In Proc. CVPR, 2003. [13] Basura Fernando, Hakan Bilen, Efstratios Gavves, and Stephen Gould. Self-supervised video representation learning with odd-one-out networks. In Proc. CVPR, 2017. [14] Philipp Fischer, Alexey Dosovitskiy, Eddy Ilg, Philip Häusser, Caner Hazırba¸s, Vladimir Golkov, Patrick van der Smagt, Daniel Cremers, and Thomas Brox. FlowNet: Learning Optical Flow with Convolutional Networks. In Proc. ICCV, 2015. [15] Ravi Garg, Gustavo Carneiro, and Ian Reid. Unsupervised cnn for single view depth estimation: Geometry to the rescue. In Proc. ECCV, pages 740–756, 2016. [16] Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org. [17] G E Hinton and R R Salakhutdinov. Reducing the Dimensionality of Data with Neural Networks. Science, 2006. [18] Berthold K.P. Horn and Brian G. Schunck. Determining optical flow. Artificial Intelligence, 1981. [19] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks. arXiv preprint arXiv:1612.01925, 2016. [20] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial Transformer Networks. In Proc. NIPS, 2015. [21] A. Kanazawa, D. W. Jacobs, and M. Chandraker. WarpNet: Weakly supervised matching for single-view reconstruction. In Proc. CVPR, 2016. 10 [22] Ira Kemelmacher-Shlizerman and Steven M. Seitz. Collection flow. In Proc. CVPR, 2012. [23] Martin Koestinger, Paul Wohlhart, Peter M. Roth, and Horst Bischof. Annotated facial landmarks in the wild: A large-scale, real-world database for facial landmark localization. In First IEEE International Workshop on Benchmarking Facial Image Analysis Technologies, 2011. [24] Erik G Learned-Miller. Data driven image models through continuous joint alignment. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006. [25] Ce Liu, Jenny Yuen, and Antonio Torralba. SIFT Flow: Dense correspondence across scenes and its applications. PAMI, 2011. [26] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proc. ICCV, 2015. [27] David G Lowe. Distinctive image features from scale-invariant keypoints. International journal of computer vision, 60(2):91–110, 2004. [28] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In Proc. ECCV, 2016. [29] Hossein Mobahi, Ce Liu, and William T. Freeman. A Compositional Model for LowDimensional Image Set Representation. Proc. CVPR, 2014. [30] Richard A Newcombe, Dieter Fox, and Steven M Seitz. Dynamicfusion: Reconstruction and tracking of non-rigid scenes in real-time. In Proc. CVPR, 2015. [31] Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In Proc. ECCV, 2016. [32] D. Novotny, D. Larlus, and A. Vedaldi. Learning 3d object categories by looking around them. In Proc. ICCV, 2017. [33] Deepak Pathak, Ross Girshick, Piotr Dollár, Trevor Darrell, and Bharath Hariharan. Learning features by watching objects move. In Proc. CVPR, 2017. [34] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context Encoders: Feature Learning by Inpainting. In Proc. CVPR, 2016. [35] I. Rocco, R. Arandjelovi´c, and J. Sivic. Convolutional neural network architecture for geometric matching. In Proc. CVPR, 2017. [36] Tanner Schmidt, Richard Newcombe, and Dieter Fox. Self-supervised visual descriptor learning for dense correspondence. IEEE Robotics and Automation Letters, 2(2):420–427, 2017. [37] Yi Sun, Xiaogang Wang, and Xiaoou Tang. Deep convolutional network cascade for facial point detection. In Proc. CVPR, 2013. [38] Yuval Tassa. CapSim - the MATLAB physics engine. https://mathworks.com/ matlabcentral/fileexchange/29249-capsim-the-matlab-physics-engine. [39] James Thewlis, Hakan Bilen, and Andrea Vedaldi. Unsupervised learning of object landmarks by factorized spatial embeddings. In Proc. ICCV, 2017. [40] James Thewlis, Shuai Zheng, Philip H. S. Torr, and Andrea Vedaldi. Fully-Trainable Deep Matching. In Proc. BMVC, 2016. [41] Markus Weber, Max Welling, and Pietro Perona. Towards automatic discovery of object categories. In Proc. CVPR, 2000. [42] Shengtao Xiao, Jiashi Feng, Junliang Xing, Hanjiang Lai, Shuicheng Yan, and Ashraf Kassim. Robust Facial Landmark Detection via Recurrent Attentive-Refinement Networks. In Proc. ECCV, 2016. [43] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. In Proc. ICLR, 2016. [44] Xiang Yu, Feng Zhou, and Manmohan Chandraker. Deep Deformation Network for Object Landmark Localization. In Proc. ECCV, Cham, 2016. 11 [45] Jie Zhang, Shiguang Shan, Meina Kan, and Xilin Chen. Coarse-to-fine auto-encoder networks (CFAN) for real-time face alignment. In Proc. ECCV, 2014. [46] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful Image Colorization. In Proc. ECCV, 2016. [47] Weiwei Zhang, Jian Sun, and Xiaoou Tang. Cat head detection - How to effectively exploit shape and texture features. In Proc. ECCV, 2008. [48] Zhanpeng Zhang, Ping Luo, Chen Change Loy, and Xiaoou Tang. Facial landmark detection by deep multi-task learning. In Proc. ECCV, 2014. [49] Zhanpeng Zhang, Ping Luo, Chen Change Loy, and Xiaoou Tang. Learning Deep Representation for Face Alignment with Auxiliary Attributes. PAMI, 2016. [50] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G Lowe. Unsupervised learning of depth and ego-motion from video. In Proc. CVPR, 2017. [51] Tinghui Zhou, Philipp Krähenbühl, Mathieu Aubry, Qixing Huang, and Alexei A. Efros. Learning Dense Correspondences via 3D-guided Cycle Consistency. In Proc. CVPR, 2016. [52] Tinghui Zhou, Yong Jae Lee, Stella X. Yu, and Alexei A. Efros. FlowWeb: Joint image set alignment by weaving consistent, pixel-wise correspondences. In Proc. CVPR, 2015. 12 | 2017 | 531 |
7,043 | Unified representation of tractography and diffusion-weighted MRI data using sparse multidimensional arrays Cesar F. Caiafa∗ Department of Psychological and Brain Sciences Indiana University (47405) Bloomington, IN, USA IAR - CCT La Plata, CONICET / CIC-PBA (1894) V. Elisa, ARGENTINA ccaiafa@gmail.com Olaf Sporns Department of Psychological and Brain Sciences Indiana University (47405) Bloomington, IN, USA osporns@indiana.edu Andrew J. Saykin Department of Radiology - Indiana University School of Medicine. (46202) Indianapolis, IN, USA asaykin@iupui.edu Franco Pestilli† Department of Psychological and Brain Sciences Indiana University (47405) Bloomington, IN, USA franpest@indiana.edu Abstract Recently, linear formulations and convex optimization methods have been proposed to predict diffusion-weighted Magnetic Resonance Imaging (dMRI) data given estimates of brain connections generated using tractography algorithms. The size of the linear models comprising such methods grows with both dMRI data and connectome resolution, and can become very large when applied to modern data. In this paper, we introduce a method to encode dMRI signals and large connectomes, i.e., those that range from hundreds of thousands to millions of fascicles (bundles of neuronal axons), by using a sparse tensor decomposition. We show that this tensor decomposition accurately approximates the Linear Fascicle Evaluation (LiFE) model, one of the recently developed linear models. We provide a theoretical analysis of the accuracy of the sparse decomposed model, LiFESD, and demonstrate that it can reduce the size of the model significantly. Also, we develop algorithms to implement the optimization solver using the tensor representation in an efficient way. ∗http://web.fi.uba.ar/~ccaiafa/Cesar.html †http://www.brain-life.org/plab/ 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1 Introduction Multidimensional arrays, hereafter referred to as tensors, are useful mathematical objects to model a variety of problems in machine learning [2, 47] and neuroscience [27, 8, 50, 48, 3, 26, 13]. Tensor decomposition algorithms have a long history of applications in signal processing, however, only recently their relation to sparse representations has started to be explored [35, 11]. In this work, we present a sparse tensor decomposition model and its associated algorithm applied to diffusion-weighted Magnetic Resonance Imaging (dMRI). Diffusion-weighted MRI allows us to estimate structural brain connections in-vivo by measuring the diffusion of water molecules at different spatial directions. Brain connections are comprised of a set of fascicles describing the putative position and orientation of the neuronal axons bundles wrapped by myelin sheaths traveling within the living human brain [25]. The process by which fascicles (the connectome) are identified from dMRI measurements is called tractography. Tractography and dMRI are the primary methods for mapping structural brain networks and white matter tissue properties in living human brains [6, 46, 34]. Despite current limits and criticisms, through these methods we have learned much about the macrostructural organization of the human brain, such that network neuroscience has become one of the fastest-growing scientific fields [38, 43, 44]. In recent years, a large variety of tractography algorithms have been proposed and tested on modern datasets such as the Human Connectome Project (HCP) [45]. However, it has been established that the estimated anatomical properties of the fascicles depend on data type, tractography algorithm and parameters settings [32, 39, 7]. Such variability in estimates makes it difficult to trust a single algorithm for all applications, and calls for routine statistical evaluation methods of brain connectomes [32]. For this reason, linear methods based on convex optimization have been proposed for connectome evaluation [32, 39] and simultaneous connectome and white matter microstructure estimation [15]. However, these methods can require substantial computational resources (memory and computation load) making it prohibitive to apply them to the highest resolution datasets. In this article, we propose a method to encode brain connectomes in multidimensional arrays and perform statistical evaluation efficiently on high-resolution datasets. The article is organized as follows: in section 2, the connectome encoding method is introduced; in section 2.1, a linear formulation of the connectome evaluation problem is described; in section 3, the approximated tensor decomposed model is introduced; in section 3.3, we derive a theoretical bound of the approximation error and compute the theoretical compression factor obtained with the tensor decomposition; in section 4 we develop algorithms to make the operations needed for solving the connectome evaluation optimization problem; in section 5 we present experimental results using high resolution in vivo datasets; finally, in section 6, the main conclusions of our work are outlined. 2 Encoding brain connectomes into multidimensional array structures. We propose a framework to encode brain connectome data (both dMRI and white matter fascicles) into tensors [12, 11, 23] to allow fast and efficient mathematical operations on the structure of the connectome. Here, we introduce the tensor encoding framework and show how it can be used to implement recent methods for statistical evaluation of tractography [32]. More specifically, we demonstrate that the framework can be used to approximate the Linear Fascicle Evaluation model [32] with high accuracy while reducing the size of the model substantially (with measured compression factors up to 40x). Hereafter, we refer to the new tensor encoding method as ENCODE [10]. ENCODE maps fascicles from their natural brain space (Fig. 1(a)) into a three dimensional sparse tensor Φ (Fig. 1(b)). The first dimension of Φ (1st mode) encodes each individual white matter fascicle’s orientation at each position along their path through the brain. Individual segments (nodes) in a fascicle are coded as non-zero entries in the sparse array (dark-blue cubes in Fig. 1(b)). The second dimension of Φ (2nd mode) encodes each fascicle’s spatial position within dMRI data volume (voxels). Slices in this second dimension represent single voxels (cyan lateral slice in Fig. 1(b)). The 2 third dimension (3rd mode) encodes the indices of each fascicle within the connectome. Full fascicles are encoded as Φ frontal slices (c.f., yellow and blue in Fig. 1(b)). Orientation Voxels Fascicles non-zero entry fascicle fascicle voxel (b) (a) Figure 1: The ENCODE method: mapping structural connectomes from natural brain space to tensor space. (a) Two example white matter fascicles (f1 and f2) passing through three voxels (v1, v2 and v3). (b) Encoding of the two fascicles in a three dimensional tensor. The non-zero entries in Φ indicate fascicle’s orientation (1st mode), position (voxel, 2nd mode) and identity (3rd mode). Below we demonstrate how to use ENCODE to integrate connectome each fascicle’s structure and measured dMRI signal into a single tensor decomposition model. We then show how to use this decompositon model to implement very efficiently a recent model for tractography evaluation, the linear fascicle evaluation method, also referred to as LiFE [32]. Before introducing the tensor decomposition method, we briefly describe the LiFE model, as this is needed to explain the model decomposition using the ENCODE method. We then calculate the theoretical bounds to accuracy and compression factor that can be achieved using ENCODE and tensor decomposition. Finally, we report the results of experiments on real data and validate the theoretical calculations. 2.1 Statistical evaluation for brain connectomes by convex optimization. The Linear Fascicle Evaluation (LiFE) method was introduced to compute the statistical error of the fascicles comprising a structural brain connectome in predicting the measured diffusion signal [32]. The fundamental idea behind LiFE is that a connectome should contain fascicles whose trajectories represent the measured diffusion signal well. LiFE implements a method for connectome evaluation that can be used, among other things, to eliminate tracked fascicles that do not predict well the diffusion signal. LiFE takes as input the set of fascicles generated by using tractography methods (the candidate connectome) and returns as output the subset of fascicles that best predict the measured dMRI signal (the optimized connectome). Fascicles are scored with respect to how well their trajectories represent the measured diffusion signal in the voxels along the their path. To do so, weights are assigned to each fascicle using convex optimization. Fascicles assigned a weight of zero are removed from the connectome, as their contribution to predicting the diffusion signal is null. The following linear system describes the equation of LiFE (see Fig. 2(a)): y ≈Mw, (2.1) where y ∈RNθNv is a vector containing the demeaned signal yi = ¯S(θni, vi) measured at all white-matter voxels vi ∈V = {1, 2, . . . , Nv} and across all diffusion directions θn ∈ Θ = {θ1, θ2, . . . , θNθ} ⊂R3, and w ∈RNf contains the weights for each fascicle in the connectome. Matrix M ∈RNθNv×Nf contains, at column f, the predicted demeaned signal contributed by fascicle f at all voxels V and across all directions Θ: M(i, f) = S0(vi)Of(θni, vf). (2.2) S0(v) is defined as the non diffusion-weighted signal and Of(θ, vf) is the orientation distribution function [32] of fascicle f at diffusion direction θ, i.e. Of(θ, vf) = e−b(θT vf )2 −1 Nθ X θn∈Θ e−b(θT n vf )2, (2.3) 3 Voxel voxel Empty entries (zero values) (b) (a) (c) Figure 2: The Linear Fascicle Evaluation (LiFE) model. (a) The predicted signal y ∈RNθNv in all voxels and gradient directions is obtained by multiplying matrix M ∈RNθNv×Nf by the vector of weights w ∈RNf (see equation 2.1). (b) A voxel containing two fascicles, f1 and f2. (c) The predicted diffusion signal yv ∈RNθ at voxel v is approximated by a nonnegative weighted linear combination of the predicted signals for the fascicles in the voxel. where the simple “stick” diffusion tensor model [31] was used and vector vf ∈R3 is defined as the spatial orientation of the fascicle in that voxel. Whereas vector y and matrix M in equation (2.1) are fully determined by the dMRI measurements and the output of a tractography algorithm, respectively, the vector of weights w needs to be estimated by solving a Non-Negative Least squares (NNLS) optimization problem, which is defined as follows: min w 1 2∥y −Mw∥2 subject to wf ≥0, ∀f. (2.4) As a result, a sparse non-negative vector of weights w is obtained. Whereas nonzero weights correspond to fascicles that contribute to predict the measured dMRI signal, fascicles with zero weight make no contribution to predicting the measurements and can be eliminated. In this way, LiFE identifies the fascicles supported by the data in a candidate connectome providing a principled approach to evaluate connectomes in terms of prediction error as well as the number of non-zero weighted fascicles. A noticeable property of the LiFE method is that the size of matrix M in equation (2.1) can require tens of gigabytes for full-brain connectomes, even when using optimized sparse matrix formats [19]. Below we show how to use ENCODE to implement a sparse tensor decomposition [9, 11] of matrix M. This decomposition allows accurate approximation of the original LiFE model with dramatic reduction in memory requirements. 3 Theoretical results: Tensor decomposition and approximation of the linear model for tractography evaluation. We describe the theoretical approach to factorizing the LiFE model, eq. (2.1). We note that matrix M ∈RNθNv×Nf (Fig. 2(a)) can be rewritten as a tensor (3D-array) M ∈ RNθ×Nv×Nf by decoupling the gradient direction and voxel indices into separate indices, i.e. M(ni, vi, f) = M(i, f), where ni = {1, 2, . . . , Nθ}, vi = {1, 2, . . . , Nv} and f = {1, 2, . . . , Nf}. Thus, equation (2.1) can be rewritten in tensor form as follows: Y ≈M ×3 wT , (3.1) where Y ∈RNθ×Nv is obtained by converting vector y ∈RNθNv into a matrix (matricization) and “×n” is the tensor-by-matrix product in mode-n [23], more specifically, the mode-3 4 product in the above equation is defined as follows: Y(n, v) = PNf f=1 M(n, v, f)wf. Below, we show how to approximate the tensor model in equation (3.1) using a sparse Tucker decomposition [9] by first focusing on the dMRI signal in individual voxels and then across voxels. Empty entries (zero values) (a) Max. discretization error, (c) (b) Figure 3: The LiFESD model: (a) Each block Mv of matrix M (a lateral slice in tensor M) is factorized by using a dictionary of diffusion signal predictions D and a sparse matrix of coefficients Φv. (b) LiFESD model is written as a Tucker decomposition model with a sparse core tensor Φ and factors D (mode-1) and wT (mode-3). (c). The maximum distance between a fascicle orientation vector v and its approximation va is determined by the discretization of azimuth (∆α) and elevation (∆β) spherical coordinates. More specifically, for ∆α = ∆β = π/L, the maximum discretization error is ∥∆v∥≤ π √ 2L. 3.1 Approximation of the linear model within individual brain voxels. We focus on writing the linear formulation of the diffusion prediction model (Fig. 2(b)-(c)) by restricting equation (3.1) to individual voxels, v: yv ≈Mvw, (3.2) where vector yv = Y(:, v) ∈RNθ and matrix Mv = M(:, v, :) ∈RNθ×Nf , correspond to a column in Y and a lateral slice in tensor M, respectively. We propose to factorize matrix Mv as follows Mv ≈ˆMv = DΦv, (3.3) where matrix D ∈RNθ×Na is a dictionary of diffusion predictions whose columns (atoms) correspond to precomputed fascicle orientations, and Φv ∈RNa×Nf is a sparse matrix whose non-zero entries, Φv(a, f), indicate the orientation of fascicle f in voxel v, which is approximated by atom a (see Fig. 3(a) for an example of a voxel v as shown in Fig. 2(b)-(c)). For computing the diffusion predictions, we use a discrete grid in the sphere by uniformly sampling the spherical coordinates using L points in azimuth and elevation coordinates (Fig. 2(c)). 3.2 Approximation of the linear model across multiple brain voxels. By applying the approximation introduced in equation (3.3) to every slice in tensor M in equation 3.1, we obtain the following tensor Sparse Decomposed LiFE model, hereafter referred to as LiFESD (Fig. 3(b)): Y ≈Φ ×1 D ×3 wT , (3.4) where D is a common factor in mode-1, i.e., it multiplies all lateral slices. It is noted that, the formula in the above equation (3.4), is a particular case of the Tucker decomposition [42, 16] where the core tensor Φ is sparse [9, 11], and only factors in mode-1 (D) and mode-3 (wT ) 5 are present. By comparing equations (3.4) and (3.1) we define the LiFESD approximated tensor model as ˆM = Φ ×1 D (3.5) 3.3 Theoretical bound for model decomposition accuracy and data compression. In this section, we derive a theoretical bound on the accuracy of LiFESD compared to the original LiFE model (Proposition 3.1) and we theoretically analyze the compression factor associated to the factorized tensor approximation (Proposition 3.2). Hereafter, we assume that, in a given connectome having Nf fascicles, each fascicle has a fixed number of nodes (Nn), and the diffusion weighted measurements were taken on Nθ gradient directions with a gradient strength b. The proofs of the propositions can be found in the Supplementary material. Proposition 3.1 (accuracy). For a given connectome, and dictionary D obtained by uniformly sampling the azimuth-elevation (α, β) space using ∆α = ∆β = π/L (see Fig. 3(c)), the following upper bound on the Frobenius norm based model error is verified: ∥M −ˆM∥F ≤2bπ p 6NfNnNθ L . (3.6) The importance of this theoretical result is that the error is inversely proportional to the discretization parameter L, which allows one to design the decomposed model so that a prescribed accuracy is met. Proposition 3.2 (size reduction). For a given connectome, and a dictionary D ∈RNθ×Na containing Na atoms (columns of matrix D), the achieved compression factor is CF = 4 3Nθ − Na 3NnNf −1 , (3.7) where CF = C(M)/C( ˆM), with C(M) and C( ˆM) being the storage costs of LiFE and LiFESD models, respectively. It is noted that, usually 3NnNf ≫Na, which implies that the compression factor can be approximated by CF ≈3Nθ 4 , i.e., it is proportional to the number of gradient directions Nθ. 4 Model optimization using tensor encoding. Once the LiFESD model has been built, the final step to validate a connectome requires finding the non-negative weights that least-squares fit the measured diffusion data. This is a convex optimization problem that can be solved using a variety of NNLS optimization algorithms. We used a NNLS algorithm based on first-order methods specially designed for large scale problems [22]. Next, we show how to exploit the decomposed LiFESD model in the optimization. The gradient of the original objective function for the LiFE model can be written as follows: ∇w 1 2∥y −Mw∥2 = MT Mw −2MT y, (4.1) where M ∈RNθNv×Nf is the original LiFE model, w ∈RNf the fascicle weights and y ∈RNθNv the demeaned diffusion signal. Because the decomposed version does not explicitly store M, below we describe how to perform two basic operations (y = Mw and w = MT y) using the sparse decomposition. 4.1 Computing y = Mw Using equation (3.1) we can see that the product Mw can be computed using equation (3.4) and vectorizing the result, i.e. y = vec(Y), where vec() stands for the vectorization 6 operation, i.e., to convert a matrix to a vector by stacking its columns in a long vector. In Algorithm 1, we present the steps for computing y = Mw in an efficient way. Algorithm 1 : y = M_times_w(Φ,D,w) Require: Decomposition components (Φ, D and vector w ∈RNf ). Ensure: y = Mw 1: Y = Φ ×3 wT ; the result is a large but very sparse matrix (Na × Nv) 2: Y = DY; the result is a relatively small matrix (Nθ × Nv) 3: y = vec(Y) 4: return y; 4.2 Computing w = MT y The product w = MT y can be computed using LiFESD in the following way: w = MT y = M(3)y = Φ(3)(I ⊗DT )y, (4.2) where M(3) ∈RNf ×NθNv and Φ(3) ∈RNf ×NaNv are the unfolding matrices [23] of tensors M ∈RNθ×Nv×Nf and Φ ∈RNa×Nv×Nf , respectively; ⊗is the Kronecker product and I is the (Nv × Nv) identity matrix. Equation (4.2) can be written also as follows [9]: w = Φ(3)vec(DT Y). (4.3) Because matrix Φ(3) is very sparse, we avoid computing the large and dense matrix DT Y and compute instead only its blocks that are being multiplied by the non-zero entries in Φ(3). This allows maintaining efficient memory usage and limits the number of CPU cycles needed. In Algorithm 2, we present the steps for computing w = MT y in an efficient way. Algorithm 2 : w = Mtransp_times_y(Φ,D,y) Require: Decomposition components (Φ, D) and vector y ∈RNθNv. Ensure: w = MT y 1: Y ∈RNθ×Nv ←y ∈RNθNv; reshape vector y into a matrix Y 2: [a, v, f, c] = get_nonzero_entries(Φ); a(n), v(n), f(n), c(n) indicate the atom, the voxel, the fascicle and the entry in tensor Φ associated to node n, respectively, with n = 1, 2, . . . , Nn; 3: w = 0 ∈RNf ; Initialize weights with zeros 4: for n = 1 to Nn do 5: w(f(n)) = w(f(n)) + DT (:, a(n))Y(:, v(n))c(n); 6: end for 7: return w; 5 Experimental results: Validation of the theoretical bounds for model decomposition accuracy and data compression. Here, we validate our theoretical findings by using dMRI data from subjects in a public source (the Stanford dataset [32]). The data were collected using Nθ = 96 (STN96, five subjects) and Nθ = 150 (STN150, one subject) directions with b-value b = 2, 000s/mm2. We performed tractography using these data and both, probabilistic and deterministic methods, in combination with Constrained Spherical Deconvolution (CSD) and the diffusion tensor model (DTI) [41, 17, 5]. We generated candidate connectomes with Nf = 500, 000 fascicles per brain brain. See for [10, 32, 39] for additional details on data preprocessing. We first analyzed the accuracy of the approximated model (LiFESD) as a function of the parameter, L, which describes the number of fascicles orientations encoded in the dictionary D. In theory, the larger the number of atoms in D the higher the accuracy of the approximation. We show that model error (defined as eM = ∥M−ˆ M∥F ∥M∥F ) decreases as a function of the parameter L for all subjects in the dataset Fig. 4(a). This result validates the theoretical upper bound in Proposition 3.1. We also solved the convex optimization problem of equation 7 (2.4) for both, LiFE and LiFESD, and estimated the error in the weights assigned to each fascicle by the two models (we computed the error in weights as follows ew = ∥w−ˆw∥ ∥w∥). Fig. 4(b) shows the error ew as a function of the parameter L. It is noted that for L > 180 the error is lower than 0.1% in all subjects. Probabilistic (121,050 fascicles) Deterministic (64,134 fascicles) 1000 500 10 r.m.s.e (det) r.m.s.e (prob) 3x10 0 Probability 0 0.5 1 1.5 Subject 1 Subject 2 Subject 3 Subject 4 Subject 5 STN150 STN96 Matrix based LiFE LiFESD (L=360) Matrix based LiFE LiFESD (L=360) 0 10 20 30 40 Model size (GB) (c) 0 50 100 150 0 10 20 30 40 1,000,000 100,000 10,000 1,000 23 45 90 180 360 720 23 45 90 180 360 720 0 0.5 1 1.5 (%) Model error (%) Weights error (d) 0.1% 0.1% (g) (e) (f) 10 500 1000 (a) (b) -3 Model size (GB) Figure 4: Experimental results: (a) The model error eM in approximating the matrix M with LiFESD is inversely proportional to the parameter L as predicted by our Proposition 3.1 (eM ≈C/L was fitted to the data with C = 27.78 and a fitting error equal to 2.94%). (b) Error in the weights obtained by LiFESD compared with original LiFE’s weights, ew, as a function of parameter L. (c)-(d) Model size (GB) scales linearly with the number of directions Nθ and the number of fascicles Nf, however it increases much faster in the LiFE model compared to the LiFESD model. LiFESD was computed using L = 360. (e)-(f) Probabilistic and deterministic connectomes validated with LiFESD for a HCP subject. (g) Comparison of the Root-mean-squared-error (r.m.s, as defined in [32]) obtained in all voxels for probabilistic and deterministic connectomes. The averaged r.m.s.e are 361.12 and 423.06 for the probabilistic and deterministic cases, respectively. Having experimentally demonstrated that model approximation error decreases as function of L, we move on to demonstrate the magnitude of model compression achieved by the tensor decomposition approach. To do so, we fixed L = 360 and computed the model size for both, LiFE and LiFESD, as a function of the number of gradient directions Nθ (Fig. 4(c)) and fascicles Nf (Fig. 4(d)). Results show that, as predicted by our theoretical results in Proposition 3.2, model size scales linearly with the number of directions for both, LiFE and LiFESD, but that the difference in slope is profound. Experimentally measured compression ratios raise up to approximately 40 as it is the case for the subjects in the STN150 dataset (Nf = 500, 000 and Nθ = 150). 8 Finally, we show an example comparison between two connectomes obtained by applying probabilistic [17] and deterministic [4] tracking algorithms to one brain dataset (a single subject) from the Human Connectome Project dataset [45], with Nθ = 90, Nv = 267, 306 and Nf = 500, 000. Figs. 4e-f show the detected 20 major tracts in a human brain using only the fascicles with nonzero weigths. In this case, the probabilistic connectome has more fascicles (121, 050) than the deterministic one (64, 134). Moreover, we replicate previous results demonstrating that probabilistic connectomes have lower error than the deterministic one in a majority of the voxels (see Fig. 4(g)). 6 Conclusions We introduced a method to encode brain connectomes in multidimensional arrays and decomposition approach that can accurately approximate the linear model for connectome evaluation used in the LiFE method [32]. We demonstrate that the decomposition approach dramatically reduces the memory requirements of the LiFE model, approximately from 40GB to 1GB, with a small model approximation error of less than 1%. The compactness of the decomposed LIFE model has important implications for other computational problems. For example, model optimization can be implemented by using operations involving tensorial operations avoiding the use of large matrices such as M and using instead the sparse tensor and prediction dictionary (Φ and D respectively). Multidimensional tensors and decomposition methods have been used to help investigators make sense of large multimodal datasets [27, 11]. Yet to date these methods have found only a few applications in neuroscience, such as performing multi-subject, clustering and electroencephalography analyses [49, 48, 3, 28, 26, 13, 8]. Generally, decomposition methods have been used to find compact representations of complex data by estimating the combination of a limited number of common meaningful factors that best fit the data [24, 27, 23]. We propose a new application that, instead of using the decomposition to estimate latent factors, it encodes the structure of the problem explicitly. The new application of tensor decomposition proposed here has the potential to improve future generations of models of connectomics, tractography evaluation and microstructure [32, 15, 36, 39]. Improving these models will allow going beyond the current limitations of the state of the art methods [14]. Finally, tensorial representations for brain imaging data have the potential to contribute advancing the application of machine learning algorithms to mapping the human connectome [18, 37, 21, 20, 30, 1, 51, 29, 40, 33]. Acknowledgments This research was supported by (NSF IIS-1636893; BCS-1734853; NIH ULTTR001108) to F.P. Data provided by Stanford University (NSF BCS 1228397). F.P. were partially supported by the Indiana University Areas of Emergent Research initiative Learning: Brains, Machines, Children. References [1] Daniel C Alexander, Darko Zikic, Aurobrata Ghosh, Ryutaro Tanno, Viktor Wottschel, Jiaying Zhang, Enrico Kaden, Tim B Dyrby, Stamatios N Sotiropoulos, Hui Zhang, and Antonio Criminisi. Image quality transfer and applications in diffusion MRI. Human Brain Mapping Journal, pages 1–65, March 2017. [2] Animashree Anandkumar, Rong Ge 0001, Daniel J Hsu, and Sham M Kakade. A tensor approach to learning mixed membership community models. Journal of Machine Learning Research (JMLR), 15:2239–2312, 2014. [3] Michael Barnathan, Vasileios Megalooikonomou, Christos Faloutsos, Scott Faro, and Feroze B Mohamed. TWave: High-order analysis of functional MRI. Human Brain Mapping Journal, 58(2):537–548, September 2011. [4] P J Basser, S Pajevic, C Pierpaoli, J Duda, and A Aldroubi. In vivo fiber tractography using DT-MRI data. Magnetic Resonance in Medicine, 44(4):625–632, October 2000. 9 [5] PJ Basser, J Mattiello, and D Lebihan. Estimation of the effective self-diffusion tensor from the NMR spin echo. Journal of Magnetic Resonance, Series B, 103(3):247–254, January 1994. [6] Danielle S Bassett and Olaf Sporns. Network neuroscience. Nature Neuroscience, 20(3):353–364, February 2017. [7] Matteo Bastiani, Nadim Jon Shah, Rainer Goebel, and Alard Roebroeck. Human cortical connectome reconstruction from diffusion weighted MRI: the effect of tractography algorithm. Human Brain Mapping Journal, 62(3):1732–1749, 2012. [8] C F Beckmann and S M Smith. Tensorial extensions of independent component analysis for multisubject FMRI analysis. NeuroImage, 25(1):294–311, March 2005. [9] Cesar F Caiafa and A Cichocki. Computing Sparse representations of multidimensional signals using Kronecker bases. Neural Computation, pages 186–220, December 2012. [10] Cesar F Caiafa and Franco Pestilli. Multidimensional encoding of brain connectomes. Scientific Reports, 7(1):11491, September 2017. [11] Andrzej Cichocki, Danilo Mandic, Lieven De Lathauwer, Guoxu Zhou, Qibin Zhao, Cesar Caiafa, and Anh Huy Phan. Tensor decompositions for signal processing applications: from two-way to multiway component analysis. IEEE Signal Processing Magazine, 32:145–163, March 2015. [12] Pierre Comon. Tensors : A brief introduction. IEEE Signal Processing Magazine, 31(3):44–53, April 2014. [13] Fengyu Cong, Qiu-Hua Lin, Li-Dan Kuang, Xiao-Feng Gong, Piia Astikainen, and Tapani Ristaniemi. Tensor decomposition of EEG signals: a brief review. Journal of neuroscience methods, 248:59–69, 2015. [14] Alessandro Daducci, Alessandro Dal Palu, Maxime Descoteaux, and Jean-Philippe Thiran. Microstructure Informed Tractography: Pitfalls and Open Challenges. Frontiers in Neuroscience, 10(8):1374–13, June 2016. [15] Alessandro Daducci, Alessandro Dal Palù, Alia Lemkaddem, and Jean-Philippe Thiran. COMMIT: Convex optimization modeling for microstructure informed tractography. Medical Imaging, IEEE Transactions on, 34(1):246–257, January 2015. [16] Lieven De Lathauwer, Bart De Moor, and Joos Vandewalle. A multilinear singular value decomposition. SIAM J. Matrix Anal. Appl, 21(4):1253–1278, 2000. [17] M Descoteaux, R Deriche, T R Knosche, and A Anwander. Deterministic and Probabilistic Tractography Based on Complex Fibre Orientation Distributions. Medical Imaging, IEEE Transactions on, 28(2):269–286, January 2009. [18] Andrew T Drysdale, Logan Grosenick, Jonathan Downar, Katharine Dunlop, Farrokh Mansouri, Yue Meng, Robert N Fetcho, Benjamin Zebley, Desmond J Oathes, Amit Etkin, Alan F Schatzberg, Keith Sudheimer, Jennifer Keller, Helen S Mayberg, Faith M Gunning, George S Alexopoulos, Michael D Fox, Alvaro Pascual-Leone, Henning U Voss, B J Casey, Marc J Dubin, and Conor Liston. Resting-state connectivity biomarkers define neurophysiological subtypes of depression. Nature Medicine, pages 1–16, December 2016. [19] John R Gilbert, Cleve Moler, and Robert Schreiber. Sparse matrices in matlab: design and implementation. SIAM Journal on Matrix Analysis and Applications, 13(1):333–356, January 1992. [20] Matthew F Glasser, Timothy S Coalson, Emma C Robinson, Carl D Hacker, John Harwell, Essa Yacoub, Kamil Ugurbil, Jesper Andersson, Christian F Beckmann, Mark Jenkinson, Stephen M Smith, and David C Van Essen. A multi-modal parcellation of human cerebral cortex. Nature Publishing Group, 536(7615):171–178, August 2016. [21] Heather Cody Hazlett, Hongbin Gu, Brent C Munsell, Sun Hyung Kim, Martin Styner, Jason J Wolff, Jed T Elison, Meghan R Swanson, Hongtu Zhu, Kelly N Botteron, D Louis Collins, John N Constantino, Stephen R Dager, Annette M Estes, Alan C Evans, Vladimir S Fonov, Guido Gerig, Penelope Kostopoulos, Robert C McKinstry, Juhi Pandey, Sarah Paterson, John R Pruett, Robert T Schultz, Dennis W Shaw, Lonnie Zwaigenbaum, and Joseph Piven. Early brain development in infants at high risk for autism spectrum disorder. Nature Publishing Group, 542(7641):348–351, February 2017. 10 [22] Dongmin Kim, Suvrit Sra, and Inderjit S Dhillon. A non-monotonic method for large-scale non-negative least squares. Optimization Methods and Software, 28(5):1012–1039, October 2013. [23] TG Kolda and BW Bader. Tensor decompositions and applications. SIAM Review, 51(3):455– 500, 2009. [24] Pieter M Kroonenberg. Applied Multiway Data Analysis. John Wiley & Sons, February 2008. [25] Junning Li, Yonggang Shi, and Arthur W Toga. Mapping Brain Anatomical Connectivity Using Diffusion Magnetic Resonance Imaging: Structural connectivity of the human brain. IEEE Signal Processing Magazine, 33(3):36–51, April 2016. [26] F Miwakeichi, E Martínez-Montes, PA Valdés-Sosa, N Nishiyama, H Mizuhara, and Y Yamaguchi. Decomposing EEG Data into Space–time–frequency Components using Parallel Factor Analysis. NeuroImage, 22(3):1035–1045, July 2004. [27] M Mørup. Applications of tensor (multiway array) factorizations and decompositions in data mining. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 1(1):24–40, January 2011. [28] Morten Mørup, Lars Kai Hansen, Christoph S Herrmann, Josef Parnas, and Sidse M. Arnfred. Parallel Factor Analysis as an exploratory tool for wavelet transformed event-related EEG. Human Brain Mapping Journal, 29(3):938–947, 2006. [29] Gemma L Nedjati-Gilani, Torben Schneider, Matt G Hall, Niamh Cawley, Ioana Hill, Olga Ciccarelli, Ivana Drobnjak, Claudia A M Gandini Wheeler-Kingshott, and Daniel C Alexander. Machine learning based compartment models with permeability for white matter microstructure imaging. Human Brain Mapping Journal, 150:119–135, April 2017. [30] Peter Florian Neher, Marc-Alexandre Cote, Jean-Christophe Houde, Maxime Descoteaux, and Klaus H Maier-Hein. Fiber tractography using machine learning. bioRxiv, pages 1–20, January 2017. [31] Eleftheria Panagiotaki, Torben Schneider, Bernard Siow, Matt G Hall, Mark F Lythgoe, and Daniel C Alexander. Compartment models of the diffusion MR signal in brain white matter: A taxonomy and comparison. Human Brain Mapping Journal, 59(3):2241–2254, February 2012. [32] Franco Pestilli, Jason D Yeatman, Ariel Rokem, Kendrick N Kay, and Brian A Wandell. Evaluation and statistical inference for human connectomes. Nature Methods, 11(10):1058–1063, September 2014. [33] Ariel Rokem, Hiromasa Takemura, Andrew S Bock, K Suzanne Scherf, Marlene Behrmann, Brian A Wandell, Ione Fine, Holly Bridge, and Franco Pestilli. The visual white matter: The application of diffusion MRI and fiber tractography to vision science. Journal of Vision, 17(2):4, February 2017. [34] Ariel Rokem, Jason D Yeatman, Franco Pestilli, Kendrick N Kay, Aviv Mezer, Stefan van der Walt, and Brian A Wandell. Evaluating the accuracy of diffusion MRI models in white matter. PLoS ONE, 10(4):e0123272, April 2015. [35] Parikshit Shah, Nikhil S Rao, and Gongguo Tang. Sparse and Low-Rank Tensor Decomposition. NIPS, 2015. [36] Robert E Smith, Jacques-Donald Tournier, Fernando Calamante, and Alan Connelly. SIFT2: Enabling dense quantitative assessment of brain white matter connectivity using streamlines tractography. Human Brain Mapping Journal, 119(C):338–351, October 2015. [37] Stephen M Smith, Thomas E Nichols, Diego Vidaurre, Anderson M Winkler, Timothy E J Behrens, Matthew F Glasser, Kamil Ugurbil, Deanna M Barch, David C Van Essen, and Karla L Miller. A positive-negative mode of population covariation links brain connectivity, demographics and behavior. Nature Publishing Group, 18(11):1565–1567, September 2015. [38] Olaf Sporns. Making sense of brain network data. Nature Methods, 10(6):491–493, May 2013. [39] Hiromasa Takemura, Cesar F Caiafa, Brian A Wandell, and Franco Pestilli. Ensemble Tractography. PLoS Computational Biology, 12(2):e1004692–, February 2016. 11 [40] Chantal M W Tax, Tom Dela Haije, Andrea Fuster, Carl-Fredrik Westin, Max A Viergever, Luc Florack, and Alexander Leemans. Sheet Probability Index (SPI): Characterizing the geometrical organization of the white matter with diffusion MRI. Human Brain Mapping Journal, pages 1–53, July 2016. [41] J-Donald Tournier, Fernando Calamante, and Alan Connelly. MRtrix: Diffusion tractography in crossing fiber regions. International Journal of Imaging Systems and Technology, 22(1):53–66, February 2012. [42] L R Tucker. Some mathematical notes on three-mode factor analysis. Psychometrika, 31(3):279– 311, September 1966. [43] M P Van den Heuvel and O Sporns. Rich-Club Organization of the Human Connectome. Journal of Neuroscience, 31(44):15775–15786, November 2011. [44] Martijn P Van den Heuvel, Edward T Bullmore, and Olaf Sporns. Comparative Connectomics. Trends in Cognitive Sciences, 20(5):345–361, 2016. [45] David C Van Essen, Stephen M Smith, Deanna M Barch, Timothy E J Behrens, Essa Yacoub, Kamil Ugurbil, and for the WU-Minn HCP Consortium. The WU-Minn Human Connectome Project: An overview. NeuroImage, 80(C):62–79, October 2013. [46] Brian A Wandell. Clarifying Human White Matter. Annual Review of Neuroscience, 39(1):103– 128, July 2016. [47] Kishan Wimalawarne, Masashi Sugiyama, and Ryota Tomioka. Multitask learning meets tensor factorization - task imputation via convex optimization. NIPS, 2014. [48] Yeyang Yu, Jin Jin, Feng Liu, and Stuart Crozier. Multidimensional Compressed Sensing MRI Using Tensor Decomposition-Based Sparsifying Transform. PLoS ONE, 9(6):e98441, June 2014. [49] Qibin Zhao, C F Caiafa, D P. Mandic, Z C Chao, Y Nagasaka, N Fujii, Liqing Zhang, and A Cichocki. Higher Order Partial Least Squares (HOPLS): A Generalized Multilinear Regression Method. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(7):1660–1673, May 2013. [50] Qibin Zhao, Cesar F Caiafa, Danilo P Mandic, Liqing Zhang, Tonio Ball, Andreas Schulzebonhage, and Andrzej S Cichocki. Multilinear Subspace Regression: An Orthogonal Tensor Decomposition Approach. In J Shawe-Taylor, R S Zemel, P L Bartlett, F Pereira, and K Q Weinberger, editors, Advances in Neural Information Processing Systems 24, pages 1269–1277. Curran Associates, Inc., 2011. [51] D Zhu, N Jahanshad, B C Riedel, and L Zhan. Population learning of structural connectivity by white matter encoding and decoding. In 2016 IEEE 13th International Symposium on Biomedical Imaging (ISBI), pages 554–558. IEEE, 2016. 12 | 2017 | 532 |
7,044 | Random Permutation Online Isotonic Regression Wojciech Kotłowski Pozna´n University of Technology Poland wkotlowski@cs.put.poznan.pl Wouter M. Koolen Centrum Wiskunde & Informatica Amsterdam, The Netherlands wmkoolen@cwi.nl Alan Malek MIT Cambridge, MA amalek@mit.edu Abstract We revisit isotonic regression on linear orders, the problem of fitting monotonic functions to best explain the data, in an online setting. It was previously shown that online isotonic regression is unlearnable in a fully adversarial model, which lead to its study in the fixed design model. Here, we instead develop the more practical random permutation model. We show that the regret is bounded above by the excess leave-one-out loss for which we develop efficient algorithms and matching lower bounds. We also analyze the class of simple and popular forward algorithms and recommend where to look for algorithms for online isotonic regression on partial orders. 1 Introduction A function f : R →R is called isotonic (non-decreasing) if x ≤y implies f(x) ≤f(y). Isotonic functions model monotonic relationships between input and output variables, like those between drug dose and response [25] or lymph node condition and survival time [24]. The problem of isotonic regression is to find the isotonic function that best explains a given data set or population distribution. The isotonic regression problem has been extensively studied in statistics [1, 24], which resulted in efficient optimization algorithms for fitting isotonic functions to the data [7, 16] and sharp convergence rates of estimation under various model assumptions [26, 29]. In online learning problems, the data arrive sequentially, and the learner is tasked with predicting each subsequent data point as it arrives [6]. In online isotonic regression, the natural goal is to predict the incoming data points as well as the best isotonic function in hindsight. Specifically, for time steps t = 1, . . . , T, the learner observes an instance xi ∈R, makes a prediction byi of the true label yi, which is assumed to lie in [0, 1]. There is no restriction that the labels or predictions be isotonic. We evaluate a prediction byi by its squared loss (byi −yi)2. The quality of an algorithm is measured by its regret, PT t=1(byi −yi)2 −L∗ T , where L∗ T is the loss of the best isotonic function on the entire data sequence. Isotonic regression is nonparametric: the number of parameters grows linearly with the number of data points. It is thus natural to ask whether there are efficient, provably low regret algorithms for online isotonic regression. As of yet, the picture is still very incomplete in the online setting. The first online results were obtained in the recent paper [14] which considered linearly ordered domains in the adversarial fixed design model, i.e. a model in which all the inputs x1, . . . , xT are given to the learner before the start of prediction. The authors show that, due to the nonparametric nature of the problem, many textbook online learning algorithms fail to learn at all (including Online Gradient Descent, Follow the Leader and Exponential Weights) in the sense that their worst-case regret grows linearly with the number of data points. They prove a Ω(T 1 3 ) worst case regret lower bound, and develop a matching algorithm that achieves the optimal ˜O(T 1 3 ) regret. Unfortunately, the fixed design assumption is often unrealistic. This leads us to our main question: Can we design methods for online isotonic regression that are practical (do not hinge on fixed design)? 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Our contributions Our long-term goal is to design practical and efficient methods for online isotonic regression, and in this work we move beyond the fixed design model and study algorithms that do not depend on future instances. Unfortunately, the completely adversarial design model (in which the instances are selected by an adaptive adversary) is impossibly hard: every learner can suffer linear regret in this model [14]. So in order to drop the fixed design assumption, we need to constrain the adversary in some other way. In this paper we consider the natural random permutation model, in which all T instances and labels are chosen adversarially before the game begins but then are presented to the learner in a random order. This model corresponds with the intuition that the data gathering process (which fixes the order) is independent of the underlying data generation mechanism (which fixes instances and labels). We will show that learning is possible in the random permutation model (in fact we present a reduction showing that it is not harder than adversarial fixed design) by proving an ˜O(T 1 3 ) upper bound on regret for an online-to-batch conversion of the optimal fixed design algorithm from [14] (Section 3). Our main tool for analyzing the random permutation model is the leave-one-out loss, drawing interesting connections with cross-validation and calibration. The leave-one-out loss on a set of t labeled instances is the error of the learner predicting the i-th label after seeing all remaining t −1 labels, averaged uniformly over i = 1, . . . , t. We begin by proving a general correspondence between regret and leave-one-out loss for the random permutation model in Section 2.1, which allows us to use excess leave-one-out loss as a proxy for regret. We then describe a version of online-to-batch conversion that relates the fixed design model with the random permutation model, resulting in an algorithm that attains the optimal ˜O(T 1 3 ) regret. Section 4 then turns to the computationally efficient and natural class of forward algorithms that use an offline optimization oracle to form their prediction. This class contains most common online isotonic regression algorithms. We then show a O(T 1 2 ) upper bound on the regret for the entire class, which improves to O(T 1 3 ) for the well-specified case where the data are in fact generated from an isotonic function plus i.i.d. noise (the most common model in the statistics literature). While forward algorithms match the lower bound for the well-specified case, there is a factor T 1 6 gap in the random permutation case. Section 4.6 proposes a new algorithm that calls a weighted offline oracle with a large weight on the current instance. This algorithm can be efficiently computed via [16]. We prove necessary bounds on the weight. Related work Offline isotonic regression has been extensively studied in statistics starting from work by [1, 4]. Applications range across statistics, biology, medicine, psychology, etc. [24, 15, 25, 22, 17]. In statistics, isotonic regression is studied in generative models [26, 3, 29]. In machine learning, isotonic regression is used for calibrating class probability estimates [28, 21, 18, 20, 27], ROC analysis [8], training Generalized Linear Models and Single Index Models[12, 11], data cleaning [13], and ranking [19]. Fast algorithms for partial ordering are developed in [16]. In the online setting, [5] bound the minimax regret for monotone predictors under logarithmic loss and [23, 10] study online nonparametric regression in general. Efficient algorithms and worst-cases regret bounds for fixed design online isotonic regression are studied in [14]. Finally, the relation between regret and leave-one-out loss was pioneered by [9] for linear regression. 2 Problem Setup Given a finite set of instances {x1, . . . , xt} ⊂R, a function f : {x1, . . . , xt} →[0, 1] is isotonic (non-decreasing) if xi ≤xj implies f(xi) ≤f(xj) for all i, j ∈{1, . . . , t}. Given a set of labeled instances D = {(x1, y1), . . . , (xt, yt)} ⊂R × [0, 1], let L∗(D) denote the total squared loss of the best isotonic function on D, L∗(D) := min isotonic f t X i=1 (yi −f(xi))2. This convex optimization problem can be solved by the celebrated Pool Adjacent Violators Algorithm (PAVA) in time linear in t [1, 7]. The optimal solution, called the isotonic regression function, is piecewise constant and its value on any of its levels sets equals the average of labels within that set [24]. 2 Online isotonic regression in the random permutation model is defined as follows. At the beginning of the game, the adversary chooses data instances x1 < . . . < xT 1 and labels y1, . . . , yT . A permutation σ = (σ1, . . . , σT ) of {1, . . . , T} is then drawn uniformly at random and used to determine the order in which the data will be revealed. In round t, the instance xσt is revealed to the learner who then predicts byσt. Next, the learner observes the true label yσt and incurs the squared loss (byσt −yσt)2. For a fixed permutation σ, we use the shorthand notation L∗ t = L∗({(xσ1, yσ1), . . . , (xσt, yσt)}) to denote the optimal isotonic regression loss of the first t labeled instances (L∗ t will clearly depend on σ, except for the case t = T). The goal of the learner is to minimize the expected regret, RT := Eσ T X t=1 (yσt −byσt)2 −L∗ T = T X t=1 rt, where we have decomposed the regret into its per-round increase, rt := Eσ h (yσt −byσt)2 −L∗ t + L∗ t−1 i , (1) with L∗ 0 := 0. To simplify the analysis, let us assume that the prediction strategy does not depend on the order in which the past data were revealed (which is true for all algorithms considered in this paper). Fix t and define D = {(xσ1, yσ1), . . . , (xσt, yσt)} to be the set of first t labeled instances. Furthermore, let D−i = D\{(xσi, yσi)} denote the set D with the instance from round i removed. Using this notation, the expression under the expectation in (1) can be written as yσt −byσt(D−t) 2 −L∗(D) + L∗(D−t), where we made the dependence of byσt on D−t explicit (and used the fact that it only depends on the set of instances, not on their order). By symmetry of the expectation over permutations with respect to the indices, we have Eσ h yσt −byσt(D−t) 2i = Eσ h yσi −byσi(D−i) 2i , and Eσ L∗(D−t) = Eσ L∗(D−i) , for all i = 1, . . . , t. Thus, (1) can as well be rewritten as: rt = Eσ 1 t t X i=1 yσi −byσi(D−i) 2 + L∗(D−i) −L∗(D) . Let us denote the expression inside the expectation by rt(D) to stress its dependence on the set of instances D, but not on the order in which they were revealed. If we can show that rt(D) ≤Bt holds for all t, then its expectation has the same bound, so RT ≤PT t=1 Bt. 2.1 Excess Leave-One-Out Loss and Regret Our main tool for analyzing the random permutation model is the leave-one-out loss. In the leave-one-out model, there is no sequential structure. The adversary picks a data set D = {(x1, y1), . . . , (xt, yt)} with x1 < . . . < xt. An index i is sampled uniformly at random, the learner is given D−i, the entire data set except (xi, yi), and predicts byi (as a function of D−i) on instance xi. We call the difference between the expected loss of the learner and L∗(D) the expected excess leave-one-out loss: ℓoot(D) := 1 t t X i=1 yi −byi(D−i) 2 −L∗(D) ! . (2) The random permutation model has the important property that the bound on the excess leave-one-out loss of a prediction algorithm translates into a regret bound. A similar result has been shown by [9] for expected loss in the i.i.d. setting. Lemma 2.1. rt(D) ≤ℓoot(D) for any t and any data set D = {(x1, y1), . . . , (xt, yt)}. Proof. As x1 < . . . < xt, let (y∗ 1, . . . , y∗ t ) = argminf1≤...≤ft Pt i=1(yi −fi)2 be the isotonic regression function on D. From the definition of L∗, we can see that L∗(D) = Pt i=1(y∗ i −yi)2 ≥ L∗(D−i) + (yi −y∗ i )2. Thus, the regret increase rt(D) is bounded by rt(D) = t X i=1 (yi −byi)2 + L∗(D−i) t −L∗(D) ≤ t X i=1 (yi −byi)2 −(yi −y∗ i )2 t = ℓoot(D). 1 We assume all points xt are distinct as it will significantly simplify the presentation. All results in this paper are also valid for the case x1 ≤. . . ≤xT . 3 However, we note that lower bounds for ℓoot(D) do not imply lower bounds on regret. In what follows, our strategy will be to derive bounds ℓoot(D) ≤Bt for various algorithms, from which the regret bound RT ≤PT t=1 Bt can be immediately obtained. From now on, we abbreviate ℓoot(D) to ℓoot, (as D is clear from the context); we will also consistently assume x1 < . . . < xt. 2.2 Noise free case As a warm-up, we analyze the noise-free case (when the labels themselves are isotonic) and demonstrate that analyzing ℓoot easily results in an optimal bound for this setting. Proposition 2.2. Assume that the labels satisfy y1 ≤y2 ≤. . . ≤yt. The prediction byi that is the linear interpolation between adjacent labels byi = 1 2 (yi−1 + yi+1), has ℓoot ≤1 2t, and thus RT ≤1 2 log(T + 1). Proof. For δi := yi −yi−1, it is easy to check that ℓoot = 1 4t Pt i=1(δi+1 −δi)2 because the L∗(D) term is zero. This expression is a convex function of δ1, . . . , δt+1. Note that δi ≥0 for each i = 1, . . . , t + 1, and Pt+1 i=1 δi = 1. Since the maximum of a convex function is at the boundary of the feasible region, the maximizer is given by δi = 1 for some i ∈{1, . . . , t + 1}, and δj = 0 for all j ∈{1, . . . , t + 1}, j ̸= i. This implies that ℓoot ≤(2t)−1. 2.3 General Lower Bound In [14], a general lower bound was derived showing that the regret of any online isotonic regression procedure is at least Ω(T 1 3 ) for the adversarial setup (when labels and the index order were chosen adversarially). This lower bound applies regardless of the order of outcomes, and hence it is also a lower bound for the random permutation model. This bound translates into ℓoot = Ω(t−2/3). 3 Online-to-batch for fixed design Here, we describe an online-to-batch conversion that relates the adversarial fixed design model with the random permutation model considered in this paper. In the fixed design model with time horizon Tfd the learner is given the points x1, . . . , xTfd in advance (which is not the case in the random permutation model), but the adversary chooses the order σ in which the labels are revealed (as opposed to σ being drawn at random). We can think of an algorithm for fixed design as a prediction function byfd xσt yσ1, . . . , yσt−1, {x1, . . . , xTfd} , for any order σ, any set {x1, . . . , xTfd} (and hence any time horizon Tfd), and any time t. This notation is quite heavy, but makes it explicit that the learner, while predicting at point xσt, knows the previously revealed labels and the whole set of instances. In the random permutation model, at trial t, the learner only knows the previously revealed t −1 labeled instances and predicts on the new instance. Without loss of generality, denote the past instances by D−i = {(x1, y1), . . . , (xi−1, yi−1), (xi+1, yi+1), . . . (xt, yt)}, and the new instance by xi, for some i ∈{1, . . . , t}. Given an algorithm for fixed design byfd, we construct a prediction byt = byt(D−i, xi) of the algorithm in the random permutation model. The reduction goes through an online-to-batch conversion. Specifically, at trial t, given past labeled instances D−i, and a new point xi, the learner plays the expectation of the prediction of the fixed design algorithm with time horizon T fd = t and points {x1, . . . , xt} under a uniformly random time from the past j ∈{1, . . . , t} and a random permutation σ on {1, . . . , t}, with σt = i, i.e.2 byt = E{σ:σt=i} 1 t t X j=1 byfd(xi|yσ1, . . . , yσj−1, {x1, . . . , xt} . (3) 2Choosing the prediction as an expectation is elegant but inefficient. However, the proof indicates that we might as well sample a single j and a single random permutation σ to form the prediction and the reduction would also work in expectation. 4 Note that this is a valid construction, as the right hand side only depends on D−i and xi, which are known to the learner in a random permutation model at round t. We prove (in Appendix A) that the excess leave-one-out loss of by at trial t is upper bounded by the expected regret (over all permutations) of byfd in trials 1, . . . , t divided by t: Theorem 3.1. Let D = {(x1, y1), . . . , (xt, yt)} be a set of t labeled instances. Fix any algorithm byfd for online adversarial isotonic regression with fixed design, and let Regt(byfd | σ) denote its regret on D when the labels are revealed in order σ. The random permutation learner by from (3) ensures ℓoot(D) ≤1 t Eσ[Regt(byfd | σ)]. This constructions allows immediate transport of the ˜O(T 1 3 fd) fixed design regret result from [14]. Theorem 3.2. There is an algorithm for the random-permutation model with excess leave-one-out loss ℓoot = ˜O(t−2 3 ) and hence expected regret RT ≤P t ˜O(t−2 3 ) = ˜O(T 1 3 ). 4 Forward Algorithms For clarity of presentation, we use vector notation in this section: y = (y1, . . . , yt) is the label vector, y∗= (y∗ 1, . . . , y∗ t ) is the isotonic regression function, and y−i = (y1, . . . , yi−1, yi+1, . . . , yt) is y with i-th label removed. Moreover, keeping in mind that x1 < . . . < xt, we can drop xi’s entirely from the notation and refer to an instance xi simply by its index i. Given labels y−i and some index i to predict on, we want a good prediction for yi. Follow the Leader (FL) algorithms, which predict using the best isotonic function on the data seen so far, are not directly applicable to online isotonic regression: the best isotonic function is only defined at the observed data instances and can be arbitrary (up to monotonicity constraint) otherwise. Instead, we analyze a simple and natural class of algorithms which we dub forward algorithms3. We define a forward algorithm, or FA, to be any algorithm that estimates a label y′ i ∈[0, 1] (possibly dependent on i and y−i), and plays with the FL strategy on the sequence of past data including the new instance with the estimated label, i.e. performs offline isotonic regression on y′, by = argmin f1≤...≤ft t X j=1 (y′ j −fj)2 , where y′ = (y1, . . . , yi−1, y′ i, yi+1, . . . , yt). Then, FA predicts with byi, the value at index i of the offline function of the augmented data. Note that if the estimate turned out to be correct (y′ i = yi), the forward algorithm would suffer no additional loss for that round. Forward algorithms are practically important: we will show that many popular algorithms can be cast as FA with a particular estimate. FA automatically inherit any computational advances for offline isotonic regression; in particular, they scale efficiently to partially ordered data [16]. To our best knowledge, we are first to give bounds on the performance of these algorithms in the online setting. Alternative formulation We can describe a FA using a minimax representation of the isotonic regression [see, e.g., 24]: the optimal isotonic regression y∗satisfies y∗ i = min r≥i max ℓ≤i yℓ,r = max ℓ≤i min r≥i yℓ,r, (4) where yℓ,r = Pr j=ℓyj r−ℓ+1 . The “saddle point” (ℓi, ri) for which y∗ i = yℓi,ri, specifies the boundaries of the level set {j : y∗ j = y∗ i } of the isotonic regression function that contains i. It follows from (4) that isotonic regression is monotonic with respect to labels: for any two label sequences y and z such that yi ≤zi for all i, we have y∗ i ≤z∗ i for all i. Thus, if we denote the predictions for label estimates y′ i = 0 and y′ i = 1 by by0 i and by1 i , respectively, the monotonicity implies that any FA has by0 i ≤byi ≤by1 i . Conversely, using the continuity of isotonic regression y∗as a function of y, (which follows from (4)), we can show that for any prediction byi with by0 i ≤byi ≤by1 i , there exists an estimate y′ t ∈[0, 1] that could generate this prediction. Hence, we can equivalently interpret FA as an algorithm which in each trial predicts with some byi in the range [by0 i , by1 i ]. 3The name highlights resemblance to the Forward algorithm introduced by [2] for exponential family models. 5 4.1 Instances With the above equivalence between forward algorithms and algorithms that predict in [by0 i , by1 i ], we can show that many of the well know isotonic regression algorithms are forward algorithms and thereby add weight to our next section where we prove regret bounds for the entire class. Isotonic regression with interpolation (IR-Int)[28] Given y−i and index i, the algorithm first computes f ∗, the isotonic regression of y−i, and then predicts with byint i = 1 2 f ∗ i−1 + f ∗ i+1 , where we used f ∗ 0 = 0 and f ∗ t+1 = 1. To see that this is a FA, note that if we use estimate y′ i = byint i , the isotonic regression of y′ = (y1, . . . , yi−1, y′ i, yi+1, . . . , yt) is by = (f ∗ 1 , . . . , f ∗ i−1, y′ i, f ∗ i+1, . . . , f ∗ t ). This is because: i) by is isotonic by construction; ii) f ∗has the smallest squared error loss for y−t among isotonic functions; and iii) the loss of by on point y′ i is zero, and the loss of by on all other points is equal to the loss of f ∗. Direct combination of by0 i and by1 i . It is clear from Section 4, that any algorithm that predicts byi = λiby0 i + (1 −λi)by1 i for some λi ∈[0, 1] is a FA. The weight λi can be set to a constant (e.g., λi = 1/2), or can be chosen depending on by1 i and by0 i . Such algorithms were considered by [27]: log-IVAP : bylog i = by1 i by1 i + 1 −by0 i , Brier-IVAP : byBrier i = 1 + (by0 i )2 −(1 −by1 i )2 2 . It is straightforward to show that both algorithms satisfy by0 i ≤byi ≤by1 i and are thus instances of FA. Last-step minimax (LSM). LSM plays the minimax strategy with one round remaining, byi = argmin by∈[0,1] max yi∈[0,1] n (by −yi)2 −L∗(y) o , where L∗(y) is the isotonic regression loss on y. Define L∗ b = L∗(y1, . . . , yi−1, b, yi+1, . . . , yt) for b ∈{0, 1}, i.e. L∗ b is the loss of isotonic regression function with label estimate y′ i = b. In Appendix B we show that byi = 1+L∗ 0−L∗ 1 2 and it is also an instance of FA. 4.2 Bounding the leave-one-out loss We now give a O( q log t t ) bound on the leave-one-out loss for forward algorithms. Interestingly, the bound holds no matter what label estimate the algorithm uses. The proof relies on the stability of isotonic regression with respect to a change of a single label. While the bound looks suboptimal in light of Section 2.3, we will argue in Section 4.5 that the bound is actually tight (up to a logarithmic factor) for one FA and experimentally verify that all other mentioned forward algorithms also have a tight lower bound of that form for the same sequence of outcomes. We will bound ℓoot by defining δi = byi −y∗ i and using the following simple inequality: ℓoot = 1 t t X i=1 (byi −yi)2 −(y∗ i −yi)2 = 1 t t X i=1 (byi −y∗ i )(byi + y∗ i −2yi) ≤2 t t X i=1 |δi|. Theorem 4.1. Any forward algorithm has ℓoot = O q log t t . Proof. Fix some forward algorithm. For any i, let {j : y∗ j = y∗ i } = {ℓi, . . . , ri}, for some ℓi ≤i ≤ri, be the level set of isotonic regression at level y∗ i . We need the stronger version of the minimax representation, shown in Appendix C: y∗ i = min r≥i yℓi,r = max ℓ≤i yℓ,ri. (5) We partition the points {1, . . . , t} into K consecutive segments: Sk = n i: y∗ i ∈ h k−1 K , k K o for k = 1, . . . , K −1 and SK = i: y∗ i ≥K−1 K . Due to monotonicity of y∗, Sk are subsets of the form {ℓk, . . . , rk} (where we use rk = ℓk −1 if Sk is empty). From the definition, every level set of y∗is contained in Sk for some k, and each ℓk (rk) is a left-end (right-end) of some level set. 6 Now, choose some index i, and let Sk be such that i ∈Sk. Let y′ i be the estimate of the FA, and let y′ = (y1, . . . , yi−1, y′ i, yi+1, . . . , yt). The minimax representation (4) and definition of FA imply byi = max ℓ≤i min r≥i y′ ℓ,r ≥min r≥i y′ ℓk,r = min r≥i n yℓk,r + y′ i −yi r −ℓk + 1 o ≥min r≥i yℓk,r + min r≥i y′ i −yi r −ℓk + 1 ≥min r≥ℓk yℓk,r + min r≥i y′ i −yi r −ℓk + 1 by (5) ≥ y∗ ℓk + min r≥i −1 r −ℓk + 1 ≥y∗ ℓk − 1 i −ℓk + 1 ≥y∗ i −1 K − 1 i −ℓk + 1. A symmetric argument gives byi ≤y∗ i + 1 K + 1 rk−i+1. Hence, we can bound |δi| = |byi −y∗ i | ≤ 1 K + max 1 i−ℓk+1, 1 rk−i+1 . Summing over i ∈Sk yields P i∈Sk |δi| ≤|Sk| K + 2 1 + log |Sk| , which allows the bound ℓoot ≤2 t X i |δi| ≤2 K + 4K t (1 + log t). The theorem follows from setting K = Θ( p t/ log t). 4.3 Forward algorithms for the well-specified case While the ℓoot upper bound of the previous section yields a regret bound RT ≤P t O( p log t/t) = ˜O(T 1 2 ) that is a factor O(T 1 6 ) gap from the lower bound in Section 2.3, there are two pieces of good news. First, forward algorithms do get the optimal rate in the well-specified setting, popular in the classical statistics literature, where the labels are generated i.i.d. such that E[yi] = µi with isotonic µ1 ≤. . . ≤µt.4 Second, there is a Ω(t−1 2 ) lower bound for forward algorithms as proven in the next section. Together, these results imply that the random permutation model in indeed harder than the well-specified case: forward algorithms are sufficient for the latter but not the former. Theorem 4.2. For data generated from the well-specified setting (monotonic means with i.i.d. noise), any FA has ℓoot = ˜O(t−2 3 ), which translates to a ˜O(T 1 3 ) bound on the regret. The proof is given in Appendix D. Curiously, the proof makes use of the existence of the seemingly unrelated optimal algorithm with ˜O(t−2 3 ) excess leave-one-out loss from Theorem 3.2. 4.4 Entropic loss We now abandon the squared loss for a moment and analyze how a FA performs when the loss function is the entropic loss, defined as −y log by −(1 −y) log(1 −by) for y ∈[0, 1]. Entropic loss (precisely: its binary-label version known as log-loss) is extensively used in the isotonic regression context for maximum likelihood estimation [14] or for probability calibration [28, 21, 27]. A surprising fact in isotonic regression is that minimizing entropic loss5 leads to exactly the same optimal solution as in the squared loss case, the isotonic regression function y∗[24]. Not every FA is appropriate for entropic loss, as recklessly choosing the label estimate might result in an infinite loss in just a single trial (as noted by [27]). Indeed, consider a sequence of outcomes with y1 = 0 and yi = 1 for i > 1. While predicting on index i = 1, choosing y′ 1 = 1 results in by1 = 1, for which the entropic loss is infinite (as y1 = 0). Does there exists a FA which achieves a meaningful bound on ℓoot in the entropic loss setup? We answer this question in the affirmative, showing that the log-IVAP predictor FA gets the same excess-leave-one-out loss bound as given in Theorem 4.1. As the reduction from the regret to leaveone-out loss (Lemma 2.1) does not use any properties of the loss function, this immediately implies a bound on the expected regret. Interestingly, the proof (given in Appendix G) uses as an intermediate step the bound on |δi| for the worst possible forward algorithm which always produces the estimate being the opposite of the actual label. Theorem 4.3. The log-IVAP algorithm has ℓoot = O q log t t for the entropic loss. 4The Ω(T 1/3) regret lower bound in [14] uses a mixture of well-specified distributions and still applies. 5In fact, this statement applies to any Bregman divergence [24]. 7 4.5 Lower bound The last result of this section is that FA can be made to have ℓoot = Ω(t−1 2 ). We show this by means of a counterexample. Assume t = n2 for some integer n > 0 and let the labels be binary, yi ∈{0, 1}. We split the set {1, . . . , t} into n consecutive segments, each of size n = √ t. The proportion of ones (yi = 1) in the k-th segment is equal to k n, but within each segment all ones precede all zeros. For instance, when t = 25, the label sequence is: 10000 | {z } 1/5 11000 | {z } 2/5 11100 | {z } 3/5 11110 | {z } 4/5 11111 | {z } 5/5 , One can use the minimax formulation (4) to verify that the segments will correspond to the level sets of the isotonic regression and that y∗ i = k n for any i in the k-th segment. This sequence is hard: Lemma 4.4. The IR-Int algorithm run on the sequence described above has ℓoot = Ω(t−1 2 ). We prove the lower bound for IR-Int, since the presentation (in Appendix E) is clearest. Empirical simulations showing that the other forward algorithms also suffer this regret are in Appendix F. 4.6 Towards optimal forward algorithms An attractive feature of forward algorithms is that they generalize to partial orders, for which efficient offline optimization algorithms exist. However, in Section 4 we saw that FAs only give a ˜O(t−1 2 ) rate, while in Section 3 we saw that ˜O(t−2 3 ) is possible (with an algorithm that is not known to scale to partial orders). Is there any hope of an algorithm that both generalizes and has the optimal rate? In this section, we propose the Heavy-γ algorithm, a slight modification of the forward algorithm that plugs in label estimate y′ i = γ ∈[0, 1] with weight c (with unit weight on all other points), then plays the value of the isotonic regression function. Implementation is straightforward for offline isotonic regression algorithms that permit the specification of weights (such as [16]). Otherwise, we might simulate such weighting by plugging in c copies of the estimated label γ at location xi. What label estimate γ and weight c should we use? We show that the choice of γ is not very sensitive, but it is crucial to tune the weight to c = Θ(t 1 3 ). Lemmas H.1 and H.2 show that higher and lower c are necessarily sub-optimal for ℓoot. This leaves only one choice for c, for which we believe Conjecture 4.5. Heavy-γ with weight c = Θ(t 1 3 ) has ℓoot = ˜O(t−2 3 ). We cannot yet prove this conjecture, although numerical experiments strongly suggest it. We do not believe that picking a constant label γ is special. For example, we might alternatively predict with the average of the predictions of Heavy-1 and Heavy-0. Yet not any label estimate works. In particular, if we estimate the label that would be predicted by IR-Int (see 4.1) and the discussion below it), and we plug that in with any weight c ≥0, then the isotonic regression function will still have that same label estimate as its value. This means that the Ω(t−1 2 ) lower bound of Section 4.5 applies. 5 Conclusion We revisit the problem of online isotonic regression and argue that we need a new perspective to design practical algorithms. We study the random permutation model as a novel way to bypass the stringent fixed design requirement of previous work. Our main tool in the design and analysis of algorithms is the leave-one-out loss, which bounds the expected regret from above. We start by observing that the adversary from the adversarial fixed design setting also provides a lower bound here. We then show that this lower bound can be matched by applying online-to-batch conversion to the optimal algorithm for fixed design. Next we provide an online analysis of the natural, popular and practical class of Forward Algorithms, which are defined in terms of an offline optimization oracle. We show that Forward algorithms achieve a decent regret rate in all cases, and match the optimal rate in special cases. We conclude by sketching the class of practical Heavy algorithms and conjecture that a specific parameter setting might guarantee the correct regret rate. Open problem The next major challenge is the design and analysis of efficient algorithms for online isotonic regression on arbitrary partial orders. Heavy-γ is our current best candidate. We pose deciding if it in fact even guarantees ˜O(T 1 3 ) regret on linear orders as an open problem. 8 Acknowledgments Wojciech Kotłowski acknowledges support from the Polish National Science Centre (grant no. 2016/22/E/ST6/00299). Wouter Koolen acknowledges support from the Netherlands Organization for Scientific Research (NWO) under Veni grant 639.021.439. This work was done in part while Koolen was visiting the Simons Institute for the Theory of Computing. References [1] M. Ayer, H. D. Brunk, G. M. Ewing, W. T. Reid, and E. Silverman. An empirical distribution function for sampling with incomplete information. Annals of Mathematical Statistics, 26(4): 641–647, 1955. [2] K. Azoury and M. Warmuth. Relative loss bounds for on-line density estimation with the exponential family of distributions. Journal of Machine Learning, 43(3):211–246, 2001. [3] Lucien Birgé and Pascal Massart. Rates of convergence for minimum contrast estimators. Probability Theory and Related Fields, 97:113–150, 1993. [4] H. D. Brunk. Maximum likelihood estimates of monotone parameters. Annals of Mathematical Statistics, 26(4):607–616, 1955. [5] Nicolò Cesa-Bianchi and Gábor Lugosi. Worst-case bounds for the logarithmic loss of predictors. Machine Learning, 43(3):247–264, 2001. [6] Nicolò Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [7] Jan de Leeuw, Kurt Hornik, and Patrick Mair. Isotone optimization in R: Pool-adjacent-violators algorithm (PAVA) and active set methods. Journal of Statistical Software, 32:1–24, 2009. [8] Tom Fawcett and Alexandru Niculescu-Mizil. PAV and the ROC convex hull. Machine Learning, 68(1):97–106, 2007. [9] Jürgen Forster and Manfred K Warmuth. Relative expected instantaneous loss bounds. Journal of Computer and System Sciences, 64(1):76–102, 2002. [10] Pierre Gaillard and Sébastien Gerchinovitz. A chaining algorithm for online nonparametric regression. In Conference on Learning Theory (COLT), pages 764–796, 2015. [11] Sham M Kakade, Varun Kanade, Ohad Shamir, and Adam Kalai. Efficient learning of generalized linear and single index models with isotonic regression. In Neural Information Processing Systems (NIPS), pages 927–935, 2011. [12] Adam Tauman Kalai and Ravi Sastry. The isotron algorithm: High-dimensional isotonic regression. In COLT, 2009. [13] Wojciech Kotłowski and Roman Słowi´nski. Rule learning with monotonicity constraints. In International Conference on Machine Learning (ICML), pages 537–544, 2009. [14] Wojciech Kotłowski, Wouter M. Koolen, and Alan Malek. Online isotonic regression. In Vitaly Feldman and Alexander Rakhlin, editors, Proceedings of the 29th Annual Conference on Learning Theory (COLT), pages 1165–1189, June 2016. [15] J. B. Kruskal. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29(1):1–27, 1964. [16] Rasmus Kyng, Anup Rao, and Sushant Sachdeva. Fast, provable algorithms for isotonic regression in all ℓp-norms. In Neural Information Processing Systems (NIPS), 2015. [17] Ronny Luss, Saharon Rosset, and Moni Shahar. Efficient regularized isotonic regression with application to gene–gene interaction search. Annals of Applied Statistics, 6(1):253–283, 2012. 9 [18] Aditya Krishna Menon, Xiaoqian Jiang, Shankar Vembu, Charles Elkan, and Lucila OhnoMachado. Predicting accurate probabilities with a ranking loss. In Interantional Conference on Machine Learning (ICML), 2012. [19] T. Moon, A. Smola, Y. Chang, and Z. Zheng. Intervalrank: Isotonic regression with listwise and pairwise constraint. In WSDM, pages 151–160. ACM, 2010. [20] Harikrishna Narasimhan and Shivani Agarwal. On the relationship between binary classification, bipartite ranking, and binary class probability estimation. In Neural Information Processing Systems (NIPS), pages 2913–2921, 2013. [21] Alexandru Niculescu-Mizil and Rich Caruana. Predicting good probabilities with supervised learning. In ICML, volume 119, pages 625–632. ACM, 2005. [22] G. Obozinski, C. E. Grant, G. R. G. Lanckriet, M. I. Jordan, and W. W. Noble. Consistent probabilistic outputs for protein function prediction. Genome Biology, 2008 2008. [23] Alexander Rakhlin and Karthik Sridharan. Online nonparametric regression. In Conference on Learning Theory (COLT), pages 1232–1264, 2014. [24] T. Robertson, F. T. Wright, and R. L. Dykstra. Order Restricted Statistical Inference. John Wiley & Sons, 1998. [25] Mario Stylianou and Nancy Flournoy. Dose finding using the biased coin up-and-down design and isotonic regression. Biometrics, 58(1):171–177, 2002. [26] Sara Van de Geer. Estimating a regression function. Annals of Statistics, 18:907–924, 1990. [27] Vladimir Vovk, Ivan Petej, and Valentina Fedorova. Large-scale probabilistic predictors with and without guarantees of validity. In Neural Information Processing Systems (NIPS), pages 892–900, 2015. [28] Bianca Zadrozny and Charles Elkan. Transforming classifier scores into accurate multiclass probability estimates. In International Conference on Knowledge Discovery and Data Mining (KDD), pages 694–699, 2002. [29] Cun-Hui Zhang. Risk bounds in isotonic regression. The Annals of Statistics, 30(2):528–555, 2002. 10 | 2017 | 533 |
7,045 | PRUNE: Preserving Proximity and Global Ranking for Network Embedding Yi-An Lai ∗‡ National Taiwan University b99202031@ntu.edu.tw Chin-Chi Hsu †‡ Academia Sinica chinchi@iis.sinica.edu.tw Wen-Hao Chen ∗ National Taiwan University b02902023@ntu.edu.tw Mi-Yen Yeh † Academia Sinica miyen@iis.sinica.edu.tw Shou-De Lin ∗ National Taiwan University sdlin@csie.ntu.edu.tw Abstract We investigate an unsupervised generative approach for network embedding. A multi-task Siamese neural network structure is formulated to connect embedding vectors and our objective to preserve the global node ranking and local proximity of nodes. We provide deeper analysis to connect the proposed proximity objective to link prediction and community detection in the network. We show our model can satisfy the following design properties: scalability, asymmetry, unity and simplicity. Experiment results not only verify the above design properties but also demonstrate the superior performance in learning-to-rank, classification, regression, and link prediction tasks. 1 Introduction Network embedding aims at constructing a low-dimensional latent feature matrix from a sparse high-dimensional adjacency matrix in an unsupervised manner [1–3,6,15,18–21,23,24,26,31]. Most previous works [1–3,6,15,18–20,23,31] try to preserve k-order proximity while performing embedding. That is, given a pair of nodes (i, j), the similarity between their embedding vectors shall be to certain extent reflect their k-hop distances (e.g. the number of k-hop distinct paths from node i to j, or the probability that node j is visited via a random walk from i). Proximity reflects local network topology, and could even preserve global network topology like communities. There are some other works directly formulate node embedding to fit the community distributions by maximizing the modularity [21,24]. Although through experiments some of the proximity-based embedding methods had visualized the community separation in two-dimensional vector space [2,3,6,18,20,23], and some demonstrate an effective usage scenario in link prediction [6,15,19,23], so far we have not yet seen a theoretical analysis to connect these three concepts. The first goal of this paper is to propose a proximity model that connects node embedding with link prediction and community detection. There has been some research focusing on a similar direction. [24] tries to propose an embedding model preserving both proximity and community. However, the objective functions for proximity and community are separately designed, not showing the connection between them. [26] models an embedding approach considering link prediction, but not connect it to the preservation of the network proximity. ∗Department of Computer Science and Information Engineering †Institute of Information Science ‡These authors contributed equally to this paper. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Besides connecting link prediction and proximity, here we also argue that it is beneficial for an embedding model to preserve a network property not specifically addressed in the existing research: global node importance ranking. For decades unsupervised node ranking algorithms such as PageRank [16] and HITS [10] have shown the effectiveness in estimating global node ranks. Besides ranking websites for better search outcomes, node rankings can be useful in other applications. For example, the Webspam Challenge competition 4 requires that spam web pages to be ranked lower than nonspam ones; the WSDM 2016 Challenge 5 asks for ranking papers information without supervision data in a billion-sized citation network. Our experiments demonstrate that being able to preserve the global ranking in node embedding can not only boost the performance of a learning-to-ranking task, but also a classification and regression task training from node embedding as features. In this paper, we propose Proximity and Ranking-preserving Unsupervised Network Embedding (PRUNE), an unsupervised Siamese neural network structure to learn node embeddings from not only community-aware proximity but also global node ranking (see Figure 1). To achieve the above goals, we rely on a generative solution. That is, taking the embedding vectors of the adjacent nodes of a link as the training input, the shared hidden layers of our model non-linearly map node embeddings to optimize a carefully designed objective function. During training, the objective function, for global node ranking and community-aware proximity, propagate gradients back to update embedding vectors. Besides deriving an upper-bound-based objective function from PageRank to represent the global node ranking. we also provide theoretical connection of the proposed proximity objective function to a general community detection solution. In sum, our model satisfies the following four model design characteristics: (I) Scalability [1, 6, 15, 18–21, 23, 26, 31]. We show that for each training epoch, our model enjoys linear time and space complexity to the number of nodes or links. Furthermore, different from some previous works relying on sampling non-existing links as negative examples for training, our model lifts the need to sample negative examples which not only saves extra training time but also relieves concern of sampling bias. (II) Asymmetry [2,3,15,19,20,31]. Our model considers link directions to learn the embeddings of either directed or undirected networks. (III) Unity [1,2,6,15,18,19,21,23,24,26,31]. We perform joint learning to satisfy two different objective goals in a single model. The experiments show that the proposed multi-task neural network structure outperforms a two-stage model. (IV) Simplicity. Empirical verifications reflect that our model can achieve superior performance with only one hidden layer in neural networks and unified hyperparameter setting, freeing from fine-tuning the hyperparameters. This properly is especially important for an unsupervised learning task due to lack of validation data for fine-tuning. The source code of the proposed model can be downloaded here 6. 2 Related work Recently, there exists growing number of works proposing embedding models specifically for network property preservation. Most of the prior methods extract latent embedding features by singular value decomposition or matrix factorization [1,3,8,15,19,21,22,24,28,30]. Such methods typically define an N-by-N matrix A (N is the number of nodes) that reflect certain network properties, and then factorizes A ≈U ⊤V or A ≈U ⊤U into two low-dimensional embedding matrices U and V . There are also random-walk-based methods [6,17,18,31] proposing an implicit reduction toward word embedding [14] by gathering random-walk sequences of sampled nodes throughout a network. The methods work well in practice but struggles to explain what network properties should be kept in their objective functions [20]. Unsupervised deep autoencoders are also used to learn latent embedding features of A [2,23], especially achieve non-linear mapping strength through activation functions. Finally, some research defined different objective functions, like Kullback–Leibler divergence [20] or Huber loss [26] for network embedding. Please see Table 1 for detailed model comparisons. 4http://webspam.lip6.fr/wiki/pmwiki.php 5https://wsdmcupchallenge.azurewebsites.net/ 6https://github.com/ntumslab/PRUNE 2 Table 1: Model Comparisons. (I) Scalability; (II) Asymmetry; (III) Unity. No simplicity due to difficult comparisons between models with few sensitive and many insensitive hyperparameters. Model (I) (II) (III) Model (I) (II) (III) Proximity Embedding [19] ✓ ✓ ✓ MMDW [22] ✓ SocDim [21] ✓ ✓ SDNE [23] ✓ ✓ Graph Factorization [1] ✓ ✓ HOPE [15] ✓ ✓ ✓ DeepWalk [18] ✓ ✓ node2vec [6] ✓ ✓ TADW [28] ✓ ✓ HSCA [30] ✓ ✓ LINE [20] ✓ ✓ LANE [8] ✓ GraRep [3] ✓ APP [31] ✓ ✓ ✓ DNGR [2] ✓ ✓ M-NMF [24] ✓ TriDNR [17] ✓ ✓ NRCL [26] ✓ ✓ Our PRUNE ✓ ✓ ✓ Embedding ui Node ranking layer Proximity layer Node i Node j Node ranking score πi Node ranking score πj Proximity representation zi Proximity representation zj Training link (i, j) Selecting embeddings of node i and j Objective function arg minπ,z, W Σ(i, j) (zi TWzj - max{0, log[M / (α ni mj)]})2 + λ Σ(i, j) mj (πi / ni - πj / mj)2 Shared matrix W Embedding uj Shared hidden layers Figure 1: PRUNE overview. Each solid arrow represents a non-linear mapping function h between two neural layers. 3 Model 3.1 Problem definition and notations We are given a directed homogeneous graph or network G = (V, E) as input, where V is the set of vertices or nodes and E is the set of directed edges or links. Let N = |V |, M = |E| be the number of nodes and links in the network. For each node i, we denote Pi, Si respectively as the set of direct predecessors and successors of node i. Therefore, mi = |Pi|, ni = |Si| imply the in-degree and out-degree of the node i. Matrix A denotes the corresponding adjacency matrix where each entry aij ∈[0, ∞) is the weight of link (i, j). For simplicity, here we discuss only binary link weights: aij = {1, 0} and E = {(i, j) : aij = 1}, but solutions for non-negative link weights can be derived in the same manner. Our goal is to build an unsupervised model, learning a K-dimensional embedding vector ui ∈RK for each node i, such that ui preserves global node ranking and local proximity information. 3.2 Model overview The Siamese neural network structure of our model is illustrated in Figure 1. Siamese architecture has been widely applied to multi-task learning like [27]. As Figure 1 illustrates, we define a pair of nodes (i, j) as a training instance. Since both i and j refer to the same type of objects (i.e. nodes), it is natural to allow them to share the same hidden layer, which is what the Siamese architecture 3 suggests. We start from the bottom part in Figure 1 to introduce our proximity function. Here the model is trained using each link (i, j) as a training instance. Given (i, j), first our model feeds the existing embedding vectors ui and uj into the input layer. The values in ui and uj are updated by gradients propagated back from the output layers. To learn the mapping from the embedding vectors to objective functions, we put one hidden layer as bridge. Here we found the empirically one single hidden layers already yield competitive results, implying that a simple neural network is sufficient to encode graph properties into a vector space, which alleviates the burden on tuning hyperparameters in a neural network. Second, both nodes i and j share the same hidden layers in our neural networks, realizing by the Siamese neural networks. Each solid arrow in Figure 1 implies the following mapping function: h(u) = φ(ωu + b) (1) where ω, b are the weight matrix and the bias vector. φ is an activation function leading to non-linear mappings. In Figure 1, our goal is to encode the proximity information in embedding space. Thus we define a D-dimensional vector z ∈[0, ∞)D that represents latent features of a node. In the next sections, we show that the proximity property can be modeled by the interaction between representations zi and zj. We write down the mapping from embedding u to z: z = φ2(ω2φ1(ω1u + b1) + b2). (2) In Figure 1, we use the same network construction to encode an additional global node ranking π ≥0. It is used to compare the relative ranks between one node and another. Formally, π can be mapped from embedding u using the following formula: π = φ4(ω4φ3(ω3u + b3) + b4). (3) We impose the non-negative constraints of z, π for better theoretical property by exploiting the non-negative activation functions (ReLU or softplus for example) over the outputs φ2 and φ4. Other outputs of activation functions and all the ω, b are not limited to be non-negative. To add global node ranking information in proximity preservation, we construct a multi-task neural network structure as illustrated in Figure 1. Let the hidden layers for different network properties share the same embedding space. u is thus updated by the information simultaneously from multiple objective goals. Different from a supervised learning task that the model can be trained by labeled data. Here instead we need to introduce an objective function for weight-tuning: arg min π≥0,z≥0,W ≥0 X (i,j)∈E z⊤ i W zj −max 0, log M αmjni 2 + λ X (i,j)∈E mj πj mj −πi ni 2 . (4) The first term aims at preserving the proximity and can be applied independently, as illustrated in Figure 1. The second term corresponds to the global node ranking task, which regularizes the relative scale among ranking scores. Here we import shared matrix W = φ5(ω5) to learn the global linking correlations in the whole network. We also set non-negative-ranged activation function φ5 to satisfy non-negative W . λ controls the relative importance of these two terms. We will provide analysis for (4) in the next sections. Since the objective function (4) is differentiable, we are allowed to apply mini-batch stochastic gradient descent (SGD) to optimize every ω, b and even u by propagating the gradients top-down from the output layers. Deterministic mapping in (2) could be misunderstood that both u and z capture the same embedding information, but z specifically captures the proximity property of a network through performing link prediction, and u in fact tries to influence both proximity and global ranking. The reason to use z instead of u for link prediction is that we believe node ranking and link prediction are two naturally different tasks (but their information can be shared since highly ranked nodes can have better connectivity to others), using one single embedding representation u to achieve both goals can lead to a compromised solution. Instead, z can be treated as some "distilled" information extracted from u specifically for link prediction, which can prevent our model from settling to a mediocre u that fails to satisfy both goals directly. 3.3 Proximity preservation as PMI matrix tri-factorization The first term in (4) aims at preserving the proximity property from input networks. We focus on the first-order and second-order proximity, which are explicitly addressed in several proximity-based 4 methods [3,20,23,24]. The first-order proximity refers to whether node pair (i, j) is connected in unweighted graphs. In an input network, links (i, j) ∈E are observed as positive training examples aij = 1. Thus, their latent inner product z⊤ i W zj should be increased to reflect such close linking relationship. Nonetheless, usually another set of randomly chosen node pairs (i, k) ∈F is required to train the embedding model as negative training examples. Since set F does not exist in input networks, one can sample α target nodes k (with probability proportional to in-degree mk) to form negative examples (i, k) . That is, given source node i, we emphasize the existence of link (i, j) by distinguishing whether the corresponding target node is observed ((i, j) ∈E) or not ((i, k) ∈F). We can construct a binary logistic regression model to distinguish E and F: arg max z,W E(i,j)∈E log σ(z⊤ i W zj) + αE(i,k)∈F log 1 −σ(z⊤ i W zk) (5) where E denotes an expected value, σ(x) = 1 1+exp(−x) is the sigmoid function. Inspired by the derivations in [12], we have the following conclusion: Lemma 3.1. Let yij = z⊤ i W zj. We have the closed-form solution from zero first-order derivative of (5) over yij: yij = log M αnimj = log ps,t(i, j) ps(i)pt(j) −log α (6) where ps,t(i, j) = 1 |E| = 1 M is the joint probability of link (positive example) (i, j) in set E, ps(i) = ni M follows a distribution proportional to out-degree ni of source node i, whereas pt(j) = mj M follows another distribution proportional to in-degree mj of target node j. Proof. Please refer to our Supplementary Material Section 2. Clearly, (6) is the pointwise mutual information (PMI) shifted by log α, which can be viewed as link weights in terms of out-degree ni and in-degree mj. If we directly minimize the difference between two sides in (6) rather than maximize (5), then we are free from sampling negative examples (i, k) to train a model. Following the suggestions in [12], we filter negative (less informative) PMI as shown in (4), causing further performance improvement. The second-order proximity refers to the fact that the similarity of zi and zj is higher if nodes i, j have similar sets of direct predecessors and successors (that is, the similarity reflects 2-hop distance relationships). Now we present how to preserve the second-order proximity using tri-factorizationbased link prediction [13,32]. Let APMI = h max n 0, log M αnimj o if (i, j) ∈E; otherwise missing i be the corresponding PMI matrix. Link prediction aims to predict the missing PMI values in APMI. Factorization methods suppose APMI of low-rank D, and then learn matrix tri-factorization Z⊤W Z ≈APMI using non-missing entries. Matrix Z = [z1z2 . . . zN] aligns latent representations with link distributions. Compared with classical factorization Z⊤V , such tri-factorization supports the asymmetric transitivity property of directed links. Specifically, the existence of two directed links (i, j) (z⊤ i W zj), (j, k) (z⊤ j W zk) increase the likelihood of (i, k) (z⊤ i W zk) via representation propagation zi →zj →zk, but not the case for (k, i) due to asymmetric W . Then we have a lemma as follows: Lemma 3.2. Matrix tri-factorization Z⊤W Z ≈APMI preserves the second-order proximity. Proof. Please refer to our Supplementary Material Section 3. Next, we discuss the connection between matrix tri-factorization and community. Different from heuristic statements in [13,32], we argue that the representation vector zi captures a D-community distribution for node i (each dimension is proportional to the probability that node i belongs to certain community), and shared matrix W implies the interactions among these D communities. Lemma 3.3. Matrix tri-factorization z⊤ i W zj can be regarded as the expectation of community interactions with distributions of link (i, j). z⊤ i W zj ∝E(i,j) [W ] = D X c=1 D X d=1 Pr(i ∈Cc) Pr(j ∈Cd)wcd, (7) 5 where each entry wcd is the expected number of interactions from community c to d, and Cc denotes the set of nodes in community c. Proof. Please refer to the Supplementary Material Section 4. Based on the binary classification model (5), when a true link (i, j) is observed in the training data, the corresponding inner product z⊤ i W zj is increased, which is equivalent to raising the expectation E(i,j) [W ]. To summarize, the derivations from logistic classification (5) to PMI matrix tri-factorization (6) show the tri-factorization model preserves the first-order proximity. Then Lemma 3.2 proves the preservation of second-order proximity. Besides, if a non-negative constraint is imposed, Lemma 3.3 shows that the tri-factorization model can be interpreted as capturing community interactions. That says, our proximity preserving loss achieves the first-order proximity, second-order proximity, and community preservation. Given non-negative log M nimj as our setting in (4), we make another observation on community detection. (6) can be rewritten as the following equation: 1 −exp −z⊤ i W zj | {z } P(X(i,j)>0)=1−P(X(i,j)=0) = 1 −nimj M | {z } Modularity as aij=1,α=1 . (8) Following Lemma 3.3, we can then derive Lemma 3.4. The left-hand side of (8) is the probability P(X(i,j) > 0) , where 0 ≤X(i,j) ≤D2 represents the total numbers of interactions between all the community pairs (c, d) ∀1 ≤c ≤D, 1 ≤ d ≤D that affect the existence of this link (i, j), following Poisson distribution P(X(i,j)) with mean z⊤ i W zj. Proof. Please refer to the Supplementary Material Section 5. In fact, on either side of Equation (8), it evaluates the likelihood of the occurrence of a link. For the left-hand side, as shown in reference [29] and our Supplementary Material 5, an existing link implies at least one community interactions (X > 0), whose probability is assumed following Poisson with means equal to the tri-factorization values. The right-hand side is commonly regarded as the "modularity" [11], which measures the difference between links from the observed data and links from random generation. Modularity is commonly used as an evaluation metric for the quality of a community detection algorithm (see [21,24]). The deep investigation of Equation (8) is left for our future work. 3.4 Global node ranking preservation as PageRank upper bound Here we want to connect the second objective to PageRank. To be more precise, the second term in (4) (without parameter λ) comes from an upper bound of PageRank assumption. PageRank [16] is arguably the most common unsupervised method to evaluate the rank of a node. It claims that ranking score of a node j πj is the probability of visiting j through random walks. πj ∀j ∈V can be obtained from the ranking score accumulation from direct predecessors i, weighted by the reciprocal of out-degree ni. One can express PageRank using the minimization of squared loss L = P j∈V (P i∈Pj πi ni −πj)2. Here the probability constraint P i∈V πi = 1 is not considered since we care only about the relative rankings. The damping factor in PageRank is not considered either for model simplicity. Unfortunately, it is infeasible to apply SGD to update L, since summation P i∈Pj is inside the square, violating the standard SGD assumption L = P (i,j)∈E Lij where each sub-objective function Lij is relevant to a single training link (i, j). Instead, we choose to minimize an upper bound. Lemma 3.5. By Cauchy–Schwarz inequality, we have the upper bound as follows: X j∈V X i∈Pj πi ni −πj 2 ≤ X (i,j)∈E mj πi ni −πj mj 2 . (9) 6 Proof. Please refer to our Supplementary Material Section 6. The proof of approximation ratio of such upper bound (9) is left as our future work. Nevertheless, as will be shown later, the experiments have demonstrated the effectiveness of such upper bound. Intuitively, (9) minimizes the difference between πi ni and πj mj weighted by in-degree mj. This could be explained by the following lemma: Lemma 3.6. The objectvie πi ni = πj mj at the right-hand side of (9) is a sufficient condition of the objective P i∈Pj πi ni = πj at the left-hand side of (9). Proof. Please refer to our Supplementary Material Section 7. 3.5 Discussion We have mentioned four major advantages of our model the introduction section. Here we would like to provide in-depth discussions on them. (I) Scalability. Since only the positive links are used for training, during SGD, our model spends O(MΩ2) time for each epoch, where Ωis the maximum number of neurons of a layer in our model, which is usually in the hundreds. Also, our model costs only O(N + M) space to store input networks and the sparse PMI matrix consumes O(M) non-zero entries. In practice Ω2 ≪M, our model is thus scalable. (II) Asymmetry. By the observation in (4), replacing (i, j) with (j, i) leads to different results since W and PageRank upper bound are asymmetric. (III) Unity. All the objectives in our model are jointly optimized under a multi-task Siamese neural network. (IV) Simplicity. As experiments shows, our model performs well with single hidden layers and the same hyperparameter setting across all the datasets, which could alleviate the difficult hyperparameter determination for unsupervised network embedding. 4 Experiments 4.1 Settings Datasets. We benchmark our model on three real-world networks in different application domains: (I) Hep-Ph 7. It is a paper citation network from 1993 to 2003, including 34, 546 papers and 421, 578 citations relationships. Following the same setup as [25], we leave citations before 1999 for embedding generation, and then evaluate paper ranks using the number of citations after 2000. (II) Webspam 8. It is a web page network used in Webspam Challenges. There are 114, 529 web pages and 1, 836, 441 hyperlinks. Participants are challenged to build a model to rank the 1, 933 labeled non-spam web pages higher than 122 labeled spam ones. (III) FB Wall Post 9. Previous task [7] aims at ranking active users using a 63, 731-user, 831, 401-link wall post network in social media website Facebook, New Orlean 2009. The nodes denote users and a link implies that a user posts at least an article on someone’s wall. 14, 862 users are marked active, that is, they continue to post articles in the next three weeks after a certain date. The goal is to rank active users over inactive ones. Competitors. We compare the performance of our model with DeepWalk [18], LINE [20], node2vec [6], SDNE [23] and NRCL [26]. DeepWalk, LINE and node2vec are popular models used in various applications. SDNE proposes another neural network structure to embed networks. NRCL is one of the state-of-the-art network embedding model, specially designed for link prediction. Note that NRCL encodes external node attributes into network embedding, but we discard this part since such information are not assumed available in our setup. Model Setup. For all experiments, our model fixes node embedding and hidden layers to be 128dimensional, proximity representation to be 64-dimensional. Exponential Linear Unit (ELU) [4] activation is adopted in hidden layers for faster learning, while output layers use softplus activation for node ranking score and Rectified Linear Unit (ReLU) [5] activation for proximity representation 7http://snap.stanford.edu/data/cit-HepPh.html 8http://chato.cl/webspam/datasets/uk2007/ 9http://socialnetworks.mpi-sws.org/data-wosn2009.html 7 to avoid negative-or-zero scores as well as negative representation values. We recommend and fix α = 5, λ = 0.01. All training uses a batch size of 1024 and Adam [9] optimizer with learning rate 0.0001. Evaluation. Similar to the previous works, we want to evaluate our embedding using supervised learning tasks. That is, we want to evaluate whether the proposed embedding yields better results for a (1) learning-to-rank (2) classification and regression (3) link prediction tasks. 4.2 Results In the following paragraphs, we call our proposed model PRUNE. PRUNE without the global ranking part is named TriFac below. Learning-to-rank. In this setting, we use pairwise approach that formulates learning-to-rank as a binary classification problem and take embeddings as node attributes. Linear Support Vector Machine with regularization C = 1.0 is used as our learning-to-rank classifier. We train on 80% and evaluate on 20% of datasets. Since Webspam and FB Wall Post possess binary labels, we choose Area Under ROC Curve (AUC) as the evaluation metric. Following the setting in [25], Hep-Ph paper citation is a real value, and thus suits better for Spearman’s rank correlation coefficient. The results in Table 2 show that PRUNE significantly outperforms the competitors. Note that PRUNE which incorporates global node ranking as a multi-task learning has superior performance compared with TriFac which only considers the proximity. It shows that the unsupervised global ranking we modeled is positively correlated with the rankings in these learning-to-ranking tasks. Also the multi-task learning enriches the underlying interactions between two tasks and is the key to better performance of PRUNE. Table 2: Learning-to-rank performance (†: outperforms 2nd-best with p-value < 0.01). Dataset Evaluation DeepWalk LINE node2vec SDNE NRCL TriFac PRUNE Hep-Ph Rank Corr. 0.485 0.430 0.494 0.353 0.327 0.554 0.621† Webspam AUC 0.821 0.818 0.843 0.800 0.839 0.821 0.853† FB Wall Post AUC 0.702 0.712 0.730 0.749 0.573 0.747 0.765† Classification and Regression. In this experiment, embedding outputs are directly used for binary node classification on Webspam and FB Wall Post and node regression on Hep-Ph. We only observe 80% nodes while training and predict the labels of remaining 20% nodes. Random Forest and Support Vector Regression are used for classification and regression, respectively. Classification is evaluated by AUC and regression is evaluated by the Root Mean Square Error (RMSE). Table 3 shows that PRUNE reaches the lowest RMSE on the regression task and the highest AUC on two classification tasks among embedding algorithms, while TriFac is competitive to others. The results show that the global ranking modeled by us contains useful information to capture certain properties of nodes. Table 3: Classification and regression performance (†: outperforms 2nd-best with p-value < 0.01). Dataset Evaluation DeepWalk LINE node2vec SDNE NRCL TriFac PRUNE Hep-Ph RMSE 12.079 12.307 11.909 12.451 12.429 11.967 11.720† Webspam AUC 0.620 0.597 0.622 0.605 0.578 0.576 0.637† FB Wall Post AUC 0.733 0.707 0.744 0.752 0.759 0.763 0.775† Link Prediction. We randomly split network edges into 80%-20% train-test subsets as positive examples and sample equal number of node pairs with no edge connection as negative samples. Embeddings are learned on the training set and performance is evaluated on the test set. Logistic regression is adopted as the link prediction algorithm and models are evaluated by AUC. The results in Table 4 show that PRUNE outperforms all counterparts significantly, while TriFac is competitive to others. The results, together with previous two experiments, demonstrate the effectiveness of PRUNE for diverse network applications. Robustness to Noisy Data. In the real-world settings, usually only partial network is observable as links can be missing. Perturbation analysis is then conducted in verifying the robustness of models by measuring the learning-to-rank performance when different fractions of edges are missing. Figure 2 shows that PRUNE persistently outperforms competitors across different fractions of missing 8 Table 4: Link prediction performance (†: outperforms 2nd-best with p-value < 0.01). Dataset DeepWalk LINE node2vec SDNE NRCL TriFac PRUNE Hep-Ph 0.803 0.796 0.805 0.751 0.688 0.814 0.861† Webspam 0.885 0.954 0.894 0.953 0.910 0.946 0.973† FB Wall Post 0.828 0.781 0.853 0.855 0.731 0.858 0.878† 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 drop rate 0.1 0.2 0.3 0.4 0.5 0.6 0.7 RankCorr Hep-Ph PRUNE DeepWalk LINE node2vec SDNE NRCL 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 drop rate 0.50 0.55 0.60 0.65 0.70 0.75 0.80 AUC FB Wall Post PRUNE DeepWalk LINE node2vec SDNE NRCL Figure 2: Perturbation analysis for learning-to-rank on Hep-Ph and FB Wall Post. edges. The results demonstrate its robustness to missing edges which is crucial for evolving or costly-constructed networks. Discussions. The superiority can be summarized based on the features of the models: (I) We have an explicit objective to optimize. Random walk based models (i.e. DeepWalk, node2vec) lack such objectives and moreover, noises are introduced during the random walk procedure. (II) We are the only model that considers global node ranking information. (III) We preserve first and second-order proximity and considers the asymmetry (i.e. direction of links). NRCL only preserves the first-order proximity and does not consider asymmetry. SDNE does not consider asymmetry either. LINE does not handle first-order and second-order proximity jointly but instead treating them independently. 5 Conclusion We propose a multi-task Siamese deep neural network to generate network embeddings that preserve global node ranking and community-aware proximity. We design a novel objective function for embedding training and provide corresponding theoretical interpretation. The experiments shows that preserving the properties we have proposed can indeed improve the performance of supervised learning tasks using the embedding as features. Acknowledgments This study was supported in part by the Ministry of Science and Technology (MOST) of Taiwan, R.O.C., under Contracts 105-2628-E-001-002-MY2, 106-2628-E-006-005-MY3, 104-2628-E-002 -015 -MY3 & 106-2218-E-002 -014 -MY4 , Air Force Office of Scientific Research, Asian Office of Aerospace Research and Development (AOARD) under award number No.FA2386-17-1-4038, and Microsoft under Contracts FY16-RES-THEME-021. All opinions, findings, conclusions, and recommendations in this paper are those of the authors and do not necessarily reflect the views of the funding agencies. References [1] Amr Ahmed, Nino Shervashidze, Shravan Narayanamurthy, Vanja Josifovski, and Alexander J. Smola. Distributed large-scale natural graph factorization. WWW ’13. [2] Shaosheng Cao, Wei Lu, and Qiongkai Xu. Deep neural networks for learning graph representations. AAAI’16. 9 [3] Shaosheng Cao, Wei Lu, and Qiongkai Xu. Grarep: Learning graph representations with global structural information. CIKM ’15. [4] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). CoRR, 2015. [5] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. AISTATS’11. [6] Aditya Grover and Jure Leskovec. Node2vec: Scalable feature learning for networks. KDD ’16. [7] Julia Heidemann, Mathias Klier, and Florian Probst. Identifying key users in online social networks: A pagerank based approach. ICIS’10. [8] Xiao Huang, Jundong Li, and Xia Hu. Label informed attributed network embedding. WSDM ’17. [9] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, 2014. [10] Jon M. Kleinberg. Authoritative sources in a hyperlinked environment. J. ACM, 1999. [11] Elizabeth A Leicht and Mark EJ Newman. Community structure in directed networks. Physical review letters, 2008. [12] Omer Levy and Yoav Goldberg. Neural word embedding as implicit matrix factorization. NIPS’14. [13] Aditya Krishna Menon and Charles Elkan. Link prediction via matrix factorization. ECML PKDD’11. [14] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. NIPS’13. [15] Mingdong Ou, Peng Cui, Jian Pei, Ziwei Zhang, and Wenwu Zhu. Asymmetric transitivity preserving graph embedding. KDD ’16. [16] Lawrence Page, Sergey Brin, Rajeev Motwani, and Terry Winograd. The pagerank citation ranking: Bringing order to the web. Technical report, Stanford InfoLab, 1999. [17] Shirui Pan, Jia Wu, Xingquan Zhu, Chengqi Zhang, and Yang Wang. Tri-party deep network representation. IJCAI’16. [18] Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. KDD ’14. [19] Han Hee Song, Tae Won Cho, Vacha Dave, Yin Zhang, and Lili Qiu. Scalable proximity estimation and link prediction in online social networks. IMC ’09. [20] Jian Tang, Meng Qu, Mingzhe Wang, Ming Zhang, Jun Yan, and Qiaozhu Mei. Line: Large-scale information network embedding. WWW ’15. [21] Lei Tang and Huan Liu. Relational learning via latent social dimensions. KDD ’09. [22] Cunchao Tu, Weicheng Zhang, Zhiyuan Liu, and Maosong Sun. Max-margin deepwalk: Discriminative learning of network representation. IJCAI’16. [23] Daixin Wang, Peng Cui, and Wenwu Zhu. Structural deep network embedding. KDD ’16. [24] Xiao Wang, Peng Cui, Jing Wang, Jian Pei, Wenwu Zhu, and Shiqiang Yang. Community preserving network embedding. AAAI’17. [25] Yujing Wang, Yunhai Tong, and Ming Zeng. Ranking scientific articles by exploiting citations, authors, journals, and time information. AAAI’13. [26] Xiaokai Wei, Linchuan Xu, Bokai Cao, and Philip S. Yu. Cross view link prediction by learning noiseresilient representation consensus. WWW ’17. [27] Zhizheng Wu, Cassia Valentini-Botinhao, Oliver Watts, and Simon King. Deep neural networks employing multi-task learning and stacked bottleneck features for speech synthesis. ICASSP ’15, 2015. [28] Cheng Yang, Zhiyuan Liu, Deli Zhao, Maosong Sun, and Edward Y. Chang. Network representation learning with rich text information. IJCAI’15. [29] Jaewon Yang and Jure Leskovec. Overlapping community detection at scale: A nonnegative matrix factorization approach. WSDM ’13. [30] D. Zhang, J. Yin, X. Zhu, and C. Zhang. Homophily, structure, and content augmented network representation learning. ICDM’16. [31] Chang Zhou, Yuqiong Liu, Xiaofei Liu, Zhongyi Liu, and Jun Gao. Scalable graph embedding for asymmetric proximity. AAAI’17. [32] Shenghuo Zhu, Kai Yu, Yun Chi, and Yihong Gong. Combining content and link for classification using matrix factorization. SIGIR ’07. 10 | 2017 | 534 |
7,046 | Online to Offline Conversions, Universality and Adaptive Minibatch Sizes Kfir Y. Levy Department of Computer Science, ETH Zürich. yehuda.levy@inf.ethz.ch Abstract We present an approach towards convex optimization that relies on a novel scheme which converts adaptive online algorithms into offline methods. In the offline optimization setting, our derived methods are shown to obtain favourable adaptive guarantees which depend on the harmonic sum of the queried gradients. We further show that our methods implicitly adapt to the objective’s structure: in the smooth case fast convergence rates are ensured without any prior knowledge of the smoothness parameter, while still maintaining guarantees in the non-smooth setting. Our approach has a natural extension to the stochastic setting, resulting in a lazy version of SGD (stochastic GD), where minibathces are chosen adaptively depending on the magnitude of the gradients. Thus providing a principled approach towards choosing minibatch sizes. 1 Introduction Over the past years data adaptiveness has proven to be crucial to the success of learning algorithms. The objective function underlying “big data" applications often demonstrates intricate structure: the scale and smoothness are often unknown and may change substantially in between different regions/directions, [1]. Learning methods that acclimatize to these changes may exhibit superior performance compared to non adaptive procedures. State-of-the-art first order methods like AdaGrad, [1], and Adam, [2], adapt the learning rate on the fly according to the feedback (i.e. gradients) received during the optimization process. AdaGrad and Adam are guaranteed to work well in the online convex optimization setting, where loss functions may be chosen adversarially and change between rounds. Nevertheless, this setting is harder than the stochastic/offline settings, which may better depict practical applications. Interestingly, even in the offline convex optimization setting it could be shown that in several scenarios very simple schemes may substantially outperform the output of AdaGrad/Adam. An example of such a simple scheme is choosing the point with the smallest gradient norm among all rounds. In the first part of this work we address this issue and design adaptive methods for the offline convex optimization setting. At heart of our derivations is a novel scheme which converts adaptive online algorithms into offline methods with favourable guarantees1. Our shceme is inspired by standard online to batch conversions, [3]. A seemingly different issue is choosing the minibatch size, b, in the stochastic setting. Stochastic optimization algorithms that can access a noisy gradient oracle may choose to invoke the oracle b times in every query point, subsequently employing an averaged gradient estimate. Theory for stochastic convex optimization suggests to use a minibatch of b = 1, and predicts a degradation of p b factor upon using larger minibatch sizes2. Nevertheless in practice larger minibatch sizes are usually found to be effective. In the second part of this work we design stochastic optimization methods in 1For concreteness we concentrate in this work on converting AdaGrad, [1]. Note that our conversion scheme applies more widely to other adaptive online methods. 2A degradation by a p b factor in the general case and by a b factor in the strongly-convex case. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. which minibatch sizes are chosen adaptively without any theoretical degradation. These are natural extensions of the offline methods presented in the first part. Our contributions: Offline setting: We present two (families of) algorithms AdaNGD (Alg. 2) and SC-AdaNGD (Alg. 3) for the convex/strongly-convex settings which achieve favourable adaptive guarantees (Thms. 2.1, 2.2, 3.1, 3.2 ). The latter theorems also establish their universality, i.e., their ability to implicitly take advantage of the objective’s smoothness and attain rates as fast as GD would have achieved if the smoothness parameter was known. In contrast to other universal approaches such as line-search-GD, [4], and universal gradient [5], we do so without any line search procedure. Concretely, without the knowledge of the smoothness parameter our algorithm ensures an O(1/ p T) rate in general convex case and an O(1/T) rate if the objective is also smooth (Thms. 2.1, 2.2). In the strongly-convex case our algorithm ensures an O(1/T) rate in general and an O(exp(−γT)) rate if the objective is also smooth (Thm. 3.2 ), where γ is the condition number. Stochastic setting: We present Lazy-SGD (Algorithm 4) which is an extension of our offline algorithms. Lazy-SGD employs larger minibatch sizes in points with smaller gradients, which selectively reduces the variance in the “more important" query points. Lazy-SGD guarantees are comparable with SGD in the convex/strongly-convex settings (Thms. 4.2, 4.3). On the technical side, our online to offline conversion schemes employ three simultaneous mechanisms: an adaptive online algorithm used in conjunction with gradient normalization and with a respective importance weighting. To the best of our knowledge the combination of the above techniques is novel, and we believe it might also find use in other scenarios. This paper is organized as follows. In Sections 2,3, we present our methods for the offline convex/strongly-convex settings. Section 4 describes our methods for the stochastic setting, and Section 5 concludes. Extensions and a preliminary experimental study appear in the Appendix. 1.1 Related Work The authors of [1] simultaneously to [6], were the first to suggest AdaGrad—an adaptive gradient based method, and prove its efficiency in tackling online convex problems. AdaGrad was subsequently adjusted to the deep-learning setting to yield the RMSprop, [7], and Adadelta, [8], heuristics. Adam, [2], is a popular adaptive algorithm which is often the method of choice in deep-learning applications. It combines ideas from AdaGrad together with momentum machinery, [9]. An optimization procedure is called universal if it implicitly adapts to the objective’s smoothness. In [5], universal gradient methods are devised for the general convex setting. Concretely, without the knowledge of the smoothness parameter, these methods attain the standard O(1/T), an accelerated O(1/T 2) rates for smooth objectives, and an O(1/ p T) rate in the non-smooth case. The core technique in this work is a line search procedure which estimates the smoothness parameter in every iteration. For strongly-convex and smooth objectives, line search techniques, [4], ensure linear convergence rate, without the knowledge of the smoothness parameter. However, line search is not “fully universal", in the sense that it holds no guarantees in the non-smooth case. For the latter setting we present a method which is “fully universal" (Thm. 3.2), nevertheless it requires the strong-convexity parameter. The usefulness of employing normalized gradients was demonstrated in several non-convex scenarios. In the context of quasi-convex optimization, [10], and [11], established convergence guarantees for the offline/stochastic settings. More recently, it was shown in [12], that normalized gradient descent is more appropriate than GD for saddle-evasion scenarios. In the context of stochastic optimization, the effect of minibatch size was extensively investigated throughout the past years, [13, 14, 15, 16, 17, 18]. Yet, all of these studies: (i) assume a smooth expected loss, (ii) discuss fixed minibatch sizes. Conversely, our work discusses adaptive minibatch sizes, and applies to both smooth/non-smooth expected losses. 1.2 Preliminaries Notation: k · k denotes the `2 norm, G denotes a bound on the norm of the objective’s gradients, and [T] := {1, . . . , T}. For a set K 2 Rd its diameter is defined as D = supx,y2K kx −yk. Next we 2 Algorithm 1 Adaptive Gradient Descent (AdaGrad) Input: #Iterations T, x1 2 Rd, set K Set: Q0 = 0 for t = 1 . . . T do Calculate: gt = rft(xt) Update: Qt = Qt−1 + kgtk2 Set: ⌘t = D/p2Qt Update: xt+1 = ⇧K (xt −⌘tgt) end for define H-strongly-convex/β-smooth functions, f(y) ≥f(x) + rf(x)>(y −x) + H 2 kx −yk2; 8x, y 2 K (H-strong-convexity) f(y) f(x) + rf(x)>(y −x) + β 2 kx −yk2; 8x, y 2 K (β-smoothness) 1.2.1 AdaGrad The methods presented in this paper lean on AdaGrad (Alg. 1), an online optimization method which employs an adaptive learning rate. The following theorem states AdaGrad’s guarantees, [1], Theorem 1.1. Let K be a convex set with diameter D. Let {ft}T t=1 be an arbitrary sequence of convex loss functions. Then Algorithm 1 guarantees the following regret; T X t=1 ft(xt) −min x2K T X t=1 ft(x) v u u t2D2 T X t=1 kgtk2 . 2 Adaptive Normalized Gradient Descent (AdaNGD) In this section we discuss the convex optimization setting and introduce our AdaNGDk algorithm, which depends on a parameter k 2 R. We first derive a general convergence rate which holds for a general k. Subsequently, we elaborate on the k = 1, 2 cases which exhibit universality as well as adaptive guarantees that may be substantially better compared to standard methods. Our method AdaNGDk is depicted in Alg. 2. This algorithm can be thought of as an online to offline conversion scheme which utilizes AdaGrad (Alg. 1) as a black box and eventually outputs a weighted sum of the online queries. Indeed, for a fixed k 2 R, it is not hard to notice that AdaNGDk is equivalent to invoking AdaGrad with the following loss sequence { ˜ft(x) := g> t x/kgtkk}T t=1. And eventually weighting each query point inversely proportional to the k’th power norm of its gradient. The reason behind this scheme is that in offline optimization it makes sense to dramatically reduce the learning rate upon uncountering a point with a very small gradient. For k ≥1, this is achieved by invoking AdaGrad with gradients normalized by their k’th power norm. Since we discuss constrained optimization, we use the projection operator defined as, ⇧K(y) := minx2K kx−yk . The next lemma states the guarantee of AdaNGD for a general k: Lemma 2.1. Let k 2 R, K be a convex set with diameter D, and f be a convex function; Also let ¯xT be the output of AdaNGDk (Algorithm 2), then the following holds: f(¯xT ) −min x2K f(x) q 2D2 PT t=1 1/kgtk2(k−1) PT t=1 1/kgtkk Proof sketch. Notice that the AdaNGDk algorithm is equivalent to applying AdaGrad to the following loss sequence: { ˜ft(x) := g> t x/kgtkk}T t=1. Thus, applying Theorem 1.1, and using the definition of ¯xT together with Jensen’s inequality the lemma follows. 3 Algorithm 2 Adaptive Normalized Gradient Descent (AdaNGDk) Input: #Iterations T, x1 2 Rd, set K , parameter k Set: Q0 = 0 for t = 1 . . . T −1 do Calculate: gt = rf(xt), ˆgt = gt/kgtkk Update: Qt = Qt−1 + 1/kgtk2(k−1) Set ⌘t = D/p2Qt Update: xt+1 = ⇧K (xt −⌘tˆgt) end for Return: ¯xT = PT t=1 1/kgtkk PT ⌧=1 1/kg⌧kk xt For k = 0, Algorithm 2 becomes AdaGrad (Alg. 1). Next we focus on the cases where k = 1, 2, showing improved adaptive rates and universality compared to GD/AdaGrad. These improved rates are attained thanks to the adaptivity of the learning rate: when query points with small gradients are encountered, AdaNGDk (with k ≥1) reduces the learning rate, thus focusing on the region around these points. The hindsight weighting further emphasizes points with smaller gradients. 2.1 AdaNGD1 Here we show that AdaNGD1 enjoys a rate of O(1/ p T) in the non-smooth convex setting, and a fast rate of O(1/T) in the smooth setting. We emphasize that the same algorithm enjoys these rates simultaneously, without any prior knowledge of the smoothness or of the gradient norms. From Algorithm 2 it can be noted that for k = 1 the learning rate becomes independent of the gradients, i.e. ⌘t = D/ p 2t, the update is made according to the direction of the gradients, and the weighting is inversely proportional to the norm of the gradients. The following Theorem establishes the guarantees of AdaNGD1, Theorem 2.1. Let k = 1, K be a convex set with diameter D, and f be a convex function; Also let ¯xT be the outputs of AdaNGD1 (Alg. 2), then the following holds: f(¯xT ) −min x2K f(x) p 2D2T PT t=1 1/kgtk p 2GD p T . Moreover, if f is also β-smooth and the global minimum x⇤= arg minx2Rn f(x) belongs to K, then: f(¯xT ) −min x2K f(x) D p T PT t=1 1/kgtk 4βD2 T . Proof sketch. The data dependent bound is a direct corollary of Lemma 2.1. The general case bound holds by using kgtk G. The bound for the smooth case is proven by showing PT t=1 kgtk O( p T). This translates to a lower bound PT t=1 1/kgtk ≥⌦(T 3/2), which concludes the proof. The data dependent bound in Theorem 2.1 may be substantially better compared to the bound of the GD/AdaGrad. As an example, assume that half of the gradients encountered during the run of the algorithm are of O(1) norms, and the other gradient norms decay proportionally to O(1/t). In this case the guarantee of GD/AdaGrad is O(1/ p T), whereas AdaNGD1 guarantees a bound that behaves like O(1/T 3/2). Note that the above example presumes that all algorithms encounter the same gradient magnitudes, which might be untrue. Nevertheless in the smooth case AdaNGD1 provably benefits due to its adaptivity. 2.2 AdaNGD2 Here we show that AdaNGD2 enjoys comparable guarantees to AdaNGD1 in the general/smooth case. Similarly to AdaNGD1 the same algorithm enjoys these rates simultaneously, without any prior knowledge of the smoothness or of the gradient norms. The following Theorem establishes the guarantees of AdaNGD2, 4 Algorithm 3 Strongly-Convex AdaNGD (SC-AdaNGDk) Input: #Iterations T, x1 2 Rd, set K, strong-convexity H, parameter k Set: Q0 = 0 for t = 1 . . . T −1 do Calculate: gt = rf(xt), ˆgt = gt/kgtkk Update: Qt = Qt−1 + 1/kgtkk Set ⌘t = 1/HQt Update: xt+1 = ⇧K (xt −⌘tˆgt) end for Return: ¯xT = PT t=1 1/kgtkk PT ⌧=1 1/kg⌧kk xt Theorem 2.2. Let k = 2, K be a convex set with diameter D, and f be a convex function; Also let ¯xT be the outputs of AdaNGD2 (Alg. 2), then the following holds: f(¯xT ) −min x2K f(x) p 2D2 qPT t=1 1/kgtk2 p 2GD p T . Moreover, if f is also β-smooth and the global minimum x⇤= arg minx2Rn f(x) belongs to K, then: f(¯xT ) −min x2K f(x) p 2D2 qPT t=1 1/kgtk2 4βD2 T . It is interesting to note that AdaNGD2 will have always performed better than AdaGrad, had both algorithms encountered the same gradient norms. This is due to the well known inequality between arithmetic and harmonic means, [19], 1 T PT t=1 at ≥ 1 1 T PT t=1 1/at , 8{at}T t=1 ⇢R+ , which directly implies, 1 pPT t=1 1/kgtk2 1 T qPT t=1 kgtk2 . 3 Adaptive NGD for Strongly Convex Functions Here we discuss the offline optimization setting of strongly convex objectives. We introduce our SC-AdaNGDk algorithm, and present convergence rates for general k 2 R. Subsequently, we elaborate on the k = 1, 2 cases which exhibit universality as well as adaptive guarantees that may be substantially better compared to standard methods. Our SC-AdaNGDk algorithm is depicted in Algorithm 3. Similarly to its non strongly-convex counterpart, SC-AdaNGDk can be thought of as an online to offline conversion scheme which utilizes an online algorithm which we denote SC-AdaGrad (we elaborate on the latter in the appendix). The next Lemma states its guarantees, Lemma 3.1. Let k 2 R, and K be a convex set. Let f be an H-strongly-convex function; Also let ¯xT be the outputs of SC-AdaNGDk (Alg. 3), then the following holds: f(¯xT ) −min x2K f(x) 1 2H PT t=1 kgtk−k T X t=1 kgtk−2(k−1) Pt ⌧=1 kg⌧k−k . Proof sketch. In the appendix we present and analyze SC-AdaGrad. This is an online first order algorithm for strongly-convex functions in which the learning rate decays according to ⌘t = 1/ Pt ⌧=1 H⌧, where H⌧is the strong-convexity parameter of the loss function at time ⌧. Then we show that SC-AdaNGDk is equivalent to applying SC-AdaGrad to the following loss sequence: ⇢ ˜ft(x) = 1 kgtkk g> t x + H 2kgtkk kx −xtk2 (T t=1 . The lemma follows by combining the regret bound of SC-AdaGrad together with the definition of ¯xT and with Jensen’s inequality. 5 For k = 0, SC-AdaNGD becomes the standard GD algorithm which uses learning rate of ⌘t = 1/Ht. Next we focus on the cases where k = 1, 2. 3.1 SC-AdaNGD1 Here we show that SC-AdaNGD1 enjoys a rate of ˜O(1/T) for strongly-convex objectives, and a faster rate of ˜O(1/T 2) assuming that the objective is also smooth. We emphasize that the same algorithm enjoys these rates simultaneously, without any prior knowledge of the smoothness or of the gradient norms. The following theorem establishes the guarantees of SC-AdaNGD1, Theorem 3.1. Let k = 1, and K be a convex set. Let f be a G-Lipschitz and H-strongly-convex function; Also let ¯xT be the outputs of SC-AdaNGD1 (Alg. 3), then the following holds: f(¯xT ) −min x2K f(x) G ⇣ 1 + log ⇣PT t=1 G kgtk ⌘⌘ 2H PT t=1 1 kgtk G2(1 + log T) 2HT . Moreover, if f is also β-smooth and the global minimum x⇤= arg minx2Rn f(x) belongs to K, then, f(¯xT ) −min x2K f(x) (β/H)G2 (1 + log T)2 HT 2 . 3.2 SC-AdaNGD2 Here we show that SC-AdaNGD2 enjoys the standard ˜O(1/T) rate for strongly-convex objectives, and a linear rate assuming that the objective is also smooth. We emphasize that the same algorithm enjoys these rates simultaneously, without any prior knowledge of the smoothness or of the gradient norms. In the case where k = 2 the guarantee of SC-AdaNGD is as follows, Theorem 3.2. Let k = 2, K be a convex set, and f be a G-Lipschitz and H-strongly-convex function; Also let ¯xT be the outputs of SC-AdaNGD2 (Alg. 3), then the following holds: f(¯xT ) −min x2K f(x) 1 + log(G2 PT t=1 kgtk−2) 2H PT t=1 kgtk−2 G2(1 + log T) 2HT . Moreover, if f is also β-smooth and the global minimum x⇤= arg minx2Rn f(x) belongs to K, then, f(¯xT ) −min x2K f(x) 3G2 2H e−H β T ✓ 1 + H β T ◆ . Intuition: For strongly-convex objectives the appropriate GD algorithm utilizes two very extreme learning rates of ⌘t / 1/t vs. ⌘t = 1/β for the general/smooth settings respectively. A possible explanation to the universality of SCAdaNGD2 is that it implicitly interpolate between these rates. Indeed the update rule of our algorithm can be written as follows, xt+1 = xt −1 H kgtk−2 Pt ⌧=1 kg⌧k−2 gt . Thus, ignoring the hindsight weighting, SCAdaNGD2 is equivalent to GD with an adaptive learning rate ˜⌘t := kgtk−2/H Pt ⌧=1 kg⌧k−2. Now, when all gradient norms are of the same magnitude, then ˜⌘t / 1/t, which boils down to the standard GD for strongly-convex objectives. Conversely, assume that the gradients are exponentially decaying, i.e., that kgtk / qt for some q < 1. In this case ˜⌘t is approximately constant. We believe that the latter applies for strongly-convex & smooth case. 4 Adaptive NGD for Stochastic Optimization Here we show that using data-dependent minibatch sizes, we can adapt our (SC-)AdaNGD2 algorithms (Algs. 2, 3 with k = 2) to the stochastic setting, and achieve the well know convergence rates for the convex/strongly-convex settings. Next we introduce the stochastic optimization setting, and then we present and discuss our Lazy SGD algorithm. Setup: We consider the problem of minimizing a convex/strongly-convex function f : K 7! R, where K 2 Rd is a convex set. We assume that optimization lasts for T rounds; on each round 6 Algorithm 4 Lazy Stochastic Gradient Descent (LazySGD) Input: #Oracle Queries T, x1 2 Rd, set K, ⌘0, p Set: t = 0, s = 0 while t T do Update: s = s + 1 Set G = GradOracle(xs), i.e., G generates i.i.d. noisy samples of rf(xs) Get: (˜gs, ns) = AE(G, T −t) % Adaptive Minibatch Update: t = t + ns Calculate: ˆgs = ns˜gs Set: ⌘s = ⌘0/tp Update: xs+1 = ⇧K (xs −⌘sˆgs) end while Return: ¯xT = Ps i=1 ni T xi . (Note that Ps i=1 ni = T ) Algorithm 5 Adaptive Estimate (AE) Input: random vectors generator G, sample budget Tmax, sample factor m0 Set: i = 0, N = 0, ˜g0 = 0 while N < Tmax do Take ⌧i = min{2i, Tmax −N} samples from G Set N N + ⌧i Update: ˜gN Average of N samples received so far from G If k˜gNk > 3m0/ p N then return (˜gN, N) Update i i + 1 end while Return: (˜gN, N) t = 1, . . . , T, we may query a point xt 2 K, and receive a feedback. After the last round, we choose ¯xT 2 K, and our performance measure is the expected excess loss, defined as, E[f(¯xT )] −min x2K f(x) . Here we assume that our feedback is a first order noisy oracle G : K 7! Rd such that upon querying G with a point xt 2 K, we receive a bounded and unbiased gradient estimate, G(xt), such E[G(xt)|xt] = rf(xt); kG(xt)k G. We also assume that the that the internal coin tosses (randomizations) of the oracle are independent. It is well known that variants of Stochastic Gradient Descent (SGD) are ensured to output an estimate ¯xT such that the excess loss is bounded by O(1/ p T)/O(1/T) for the setups of convex/strongly-convex stochastic optimization, [20], [21]. Notation: In this section we make a clear distinction between the number of queries to the gradient oracle, denoted henceforth by T; and between the number of iterations in the algorithm, denoted henceforth by S. We care about the dependence of the excess loss in T. 4.1 Lazy Stochastic Gradient Descent Data Dependent Minibatch sizes: The Lazy SGD (Alg. 4) algorithm that we present in this section, uses a minibatch size that changes in between query points. Given a query point xs, Lazy SGD invokes the noisy gradient oracle ˜O(1/kgsk2) times, where gs := rf(xs) 3. Thus, in contrast to SGD which utilizes a fixed number of oracle calls per query point, our algorithm tends to stall in points with smaller gradients, hence the name Lazy SGD. Here we give some intuition regarding our adaptive minibatch size rule: Consider the stochastic optimization setting. However, imagine that instead of the noisy gradient oracle G, we may access an improved (imaginary) oracle which provides us with unbiased estimates, ˜g(x), that are accurate up to some multiplicative factor, e.g., E[˜g(x)|x] = rf(x), and 1 2krf(x)k k˜g(x)k 2krf(x)k . Then intuitively we could have used these estimates instead of the exact normalized gradients inside our (SC-)AdaNGD2 algorithms (Algs. 2, 3 with k = 2), and still get similar (in expectation) data 3Note that the gradient norm, kgsk, is unknown to the algorithm. Nevertheless it is estimated on the fly. 7 dependent bounds. Quite nicely, we may use our original noisy oracle G to generate estimates from this imaginary oracle. This can be done by invoking G for ˜O(1/kgsk2) times at each query point. Using this minibatch rule, the total number of calls to G (along all iterations) is equal to T = PS s=1 1/kgsk2. Plugging this into the data dependent bounds of (SC-)AdaNGD2 (Thms. 2.2, 3.2), we get the well known ˜O(1/ p T)/ ˜O(1/T) rates for the stochastic convex settings. The imaginary oracle: The construction of the imaginary oracle from the original oracle appears in Algorithm 5 (AE procedure) . It receives as an input, G, a generator of independent random vectors with an (unknown) expected value g 2 Rd. The algorithm outputs two variables: N which is an estimate of 1/kgk2, and ˜gN an average of N random vectors from G. Thus, it is natural to think of N˜gN as an estimate for g/kgk2. Moreover, it can be shown that E[N(˜gN −g)] = 0. Thus in a sense we receive an unbiased estimate. The guarantees of Algorithm 5 appear below, Lemma 4.1 (Informal). Let Tmax ≥1, δ 2 (0, 1). Suppose an oracle G : K 7! Rd that generates G-bounded i.i.d. random vectors with an (unknown) expected value g 2 Rd. Then w.p.≥1 −δ, invoking AE (Algorithm 5), with m0 = ⇥(G log(1/δ)), it is ensured that: N = ⇥(min{m0/kgk2, Tmax}), and E[N(˜gN −g)] = 0 . Lazy SGD: Now, plugging the output of the AE algorithm into our offline algorithms (SC-)AdaNGD2, we get their stochastic variants which appears in Algorithm 4 (Lazy SGD). This algorithm is equivalent to the offline version of (SC-)AdaNGD2, with the difference that we use ns instead of 1/krf(xs)k2 and ns˜gs instead of rf(xs)/krf(xs)k2. Let T be a bound on the total number of queries to the the first order oracle G, and δ be the confidence parameter used to set m0 in the AE procedure. Next we present the guarantees of LazySGD, Lemma 4.2. Let δ = O(T −3/2); let K be a convex set with diameter D, and f be a convex function; and assume kG(x)k G w.p.1. Then using LazySGD with ⌘0 = D/ p 2G, p = 1/2, ensures: E[f(¯xT )] −min x2K f(x) O ✓GD log(T) p T ◆ . Lemma 4.3. Let δ = O(T −2), let K be a convex set, and f be an H-strongly-convex convex function; and assume kG(x)k G w.p.1. Then using LazySGD with ⌘0 = 1/H, p = 1, ensures: E[f(¯xT )] −min x2K f(x) O ✓G2 log2(T) HT ◆ . Note that LazySGD uses minibatch sizes that are adapted to the magnitude of the gradients, and still maintains the optimal O(1/ p T)/O(1/T) rates. In contrast using a fixed minibatch size b for SGD might degrade the convergence rates, yielding O( p b/ p T)/O(b/T) guarantees. This property of LazySGD may be beneficial when considering distributed computations (see [13]). 5 Discussion We have presented a new approach based on a conversion scheme, which exhibits universality and new adaptive bounds in the offline convex optimization setting, and provides a principled approach towards minibatch size selection in the stochastic setting. Among the many questions that remain open is whether we can devise “accelerated" universal methods. Furthermore, our universality results only apply when the global minimum is inside the constraints. Thus, it is natural to seek for methods that ensure universality when this assumption is violated. Moreover, our algorithms depend on a parameter k 2 R, but only the cases where k 2 {0, 1, 2} are well understood. Investigating a wider spectrum of k values is intriguing. Lastly, it is interesting to modify and test our methods in non-convex scenarios, especially in the context of deep-learning applications. Acknowledgments I would like to thank Elad Hazan and Shai Shalev-Shwartz for fruitful discussions during the early stages of this work. This work was supported by the ETH Zürich Postdoctoral Fellowship and Marie Curie Actions for People COFUND program. 8 References [1] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011. [2] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [3] Nicolo Cesa-Bianchi, Alex Conconi, and Claudio Gentile. On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory, 50(9):2050–2057, 2004. [4] Stephen Wright and Jorge Nocedal. Numerical optimization. Springer Science, 35:67–68, 1999. [5] Yu Nesterov. Universal gradient methods for convex optimization problems. Mathematical Programming, 152(1-2):381–404, 2015. [6] H Brendan McMahan and Matthew Streeter. Adaptive bound optimization for online convex optimization. COLT 2010, page 244, 2010. [7] 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. [8] Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. [9] Yurii Nesterov. A method for unconstrained convex minimization problem with the rate of convergence o (1/k2). In Doklady an SSSR, volume 269, pages 543–547, 1983. [10] Yu E Nesterov. Minimization methods for nonsmooth convex and quasiconvex functions. Matekon, 29:519–531, 1984. [11] Elad Hazan, Kfir Levy, and Shai Shalev-Shwartz. Beyond convexity: Stochastic quasi-convex optimization. In Advances in Neural Information Processing Systems, pages 1594–1602, 2015. [12] Kfir Y Levy. The power of normalization: Faster evasion of saddle points. arXiv preprint arXiv:1611.04831, 2016. [13] Ofer Dekel, Ran Gilad-Bachrach, Ohad Shamir, and Lin Xiao. Optimal distributed online prediction using mini-batches. Journal of Machine Learning Research, 13(Jan):165–202, 2012. [14] Andrew Cotter, Ohad Shamir, Nati Srebro, and Karthik Sridharan. Better mini-batch algorithms via accelerated gradient methods. In Advances in neural information processing systems, pages 1647–1655, 2011. [15] Shai Shalev-Shwartz and Tong Zhang. Accelerated mini-batch stochastic dual coordinate ascent. In Advances in Neural Information Processing Systems, pages 378–385, 2013. [16] Mu Li, Tong Zhang, Yuqiang Chen, and Alexander J Smola. Efficient mini-batch training for stochastic optimization. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 661–670. ACM, 2014. [17] Martin Takáˇc, Peter Richtárik, and Nathan Srebro. Distributed mini-batch sdca. arXiv preprint arXiv:1507.08322, 2015. [18] Prateek Jain, Sham M Kakade, Rahul Kidambi, Praneeth Netrapalli, and Aaron Sidford. Parallelizing stochastic approximation through mini-batching and tail-averaging. arXiv preprint arXiv:1610.03774, 2016. [19] Peter S Bullen, Dragoslav S Mitrinovic, and M Vasic. Means and their Inequalities, volume 31. Springer Science & Business Media, 2013. [20] Arkadii Nemirovskii, David Borisovich Yudin, and ER Dawson. Problem complexity and method efficiency in optimization. 1983. 9 [21] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. [22] Hongzhou Lin, Julien Mairal, and Zaid Harchaoui. A universal catalyst for first-order optimization. In Advances in Neural Information Processing Systems, pages 3384–3392, 2015. [23] Elad Hazan and Tomer Koren. Linear regression with limited observation. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 807–814, 2012. [24] Kenneth L Clarkson, Elad Hazan, and David P Woodruff. Sublinear optimization for machine learning. Journal of the ACM (JACM), 59(5):23, 2012. [25] Sham Kakade. Lecture notes in multivariate analysis, dimensionality reduction, and spectral methods. http://stat.wharton.upenn.edu/~skakade/courses/stat991_ mult/lectures/MatrixConcen.pdf, April 2010. [26] Anatoli B Juditsky and Arkadi S Nemirovski. Large deviations of vector-valued martingales in 2-smooth normed spaces. arXiv preprint arXiv:0809.0813, 2008. [27] David Asher Levin, Yuval Peres, and Elizabeth Lee Wilmer. Markov chains and mixing times. American Mathematical Soc., 2009. 10 | 2017 | 535 |
7,047 | Predicting Organic Reaction Outcomes with Weisfeiler-Lehman Network Wengong Jin† Connor W. Coley‡ Regina Barzilay† Tommi Jaakkola† †Computer Science and Artificial Intelligence Lab, MIT ‡Department of Chemical Engineering, MIT †{wengong,regina,tommi}@csail.mit.edu, ‡ccoley@mit.edu Abstract The prediction of organic reaction outcomes is a fundamental problem in computational chemistry. Since a reaction may involve hundreds of atoms, fully exploring the space of possible transformations is intractable. The current solution utilizes reaction templates to limit the space, but it suffers from coverage and efficiency issues. In this paper, we propose a template-free approach to efficiently explore the space of product molecules by first pinpointing the reaction center – the set of nodes and edges where graph edits occur. Since only a small number of atoms contribute to reaction center, we can directly enumerate candidate products. The generated candidates are scored by a Weisfeiler-Lehman Difference Network that models high-order interactions between changes occurring at nodes across the molecule. Our framework outperforms the top-performing template-based approach with a 10% margin, while running orders of magnitude faster. Finally, we demonstrate that the model accuracy rivals the performance of domain experts. 1 Introduction One of the fundamental problems in organic chemistry is the prediction of which products form as a result of a chemical reaction [16, 17]. While the products can be determined unambiguously for simple reactions, it is a major challenge for many complex organic reactions. Indeed, experimentation remains the primary manner in which reaction outcomes are analyzed. This is time consuming, expensive, and requires the help of an experienced chemist. The empirical approach is particularly limiting for the goal of automatically designing efficient reaction sequences that produce specific target molecule(s), a problem known as chemical retrosynthesis [16, 17]. Viewing molecules as labeled graphs over atoms, we propose to formulate the reaction prediction task as a graph transformation problem. A chemical reaction transforms input molecules (reactants) into new molecules (products) by performing a set of graph edits over reactant molecules, adding new edges and/or eliminating existing ones. Given that a typical reaction may involve more than 100 atoms, fully exploring all possible transformations is intractable. The computational challenge is how to reduce the space of possible edits effectively, and how to select the product from among the resulting candidates. The state-of-the-art solution is based on reaction templates (Figure 1). A reaction template specifies a molecular subgraph pattern to which it can be applied and the corresponding graph transformation. Since multiple templates can match a set of reactants, another model is trained to filter candidate products using standard supervised approaches. The key drawbacks of this approach are coverage and scalability. A large number of templates is required to ensure that at least one can reconstitute the correct product. The templates are currently either hand-crafted by experts [7, 1, 15] or generated from reaction databases with heuristic algorithms [2, 11, 3]. For example, Coley et al. [3] extracts 140K unique reaction templates from a database of 1 million reactions. Beyond coverage, applying a 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: An example reaction where the reaction center is (27,28), (7,27), and (8,27), highlighted in green. Here bond (27,28) is deleted and (7,27) and (8,27) are connected by aromatic bonds to form a new ring. The corresponding reaction template consists of not only the reaction center, but nearby functional groups that explicitly specify the context. template involves graph matching and this makes examining large numbers of templates prohibitively expensive. The current approach is therefore limited to small datasets with limited types of reactions. In this paper, we propose a template-free approach by learning to identify the reaction center, a small set of atoms/bonds that change from reactants to products. In our datasets, on average only 5.5% of the reactant molecules directly participate in the reaction. The small size of the reaction centers together with additional constraints on bond formations enables us to directly enumerate candidate products. Our forward-prediction approach is then divided into two key parts: (1) learning to identify reaction centers and (2) learning to rank the resulting enumerated candidate products. Our technical approach builds on neural embedding of the Weisfeiler-Lehman isomorphism test. We incorporate a specific attention mechanism to identify reaction centers while leveraging distal chemical effects not accounted for in related convolutional representations [5, 4]. Moreover, we propose a novel Weisfeiler-Lehman Difference Network to learn to represent and efficiently rank candidate transformations between reactants and products. We evaluate our method on two datasets derived from the USPTO [13], and compare our methods to the current top performing system [3]. Our method achieves 83.9% and 77.9% accuracy on two datasets, outperforming the baseline approach by 10%, while running 140 times faster. Finally, we demonstrate that the model outperforms domain experts by a large margin. 2 Related Work Template-based Approach Existing machine learning models for product prediction are mostly built on reaction templates. These approaches differ in the way templates are specified and in the way the final product is selected from multiple candidates. For instance, Wei et al. [18] learns to select among 16 pre-specified, hand-encoded templates, given fingerprints of reactants and reagents. While this work was developed on a narrow range of chemical reaction types, it is among the first implementations that demonstrates the potential of neural models for analyzing chemical reactions. More recent work has demonstrated the power of neural methods on a broader set of reactions. For instance, Segler and Waller [14] and Coley et al. [3] use a data-driven approach to obtain a large set of templates, and then employ a neural model to rank the candidates. The key difference between these approaches is the representation of the reaction. In Segler and Waller [14], molecules are represented based on their Morgan fingerprints, while Coley et al. [3] represents reactions by the features of atoms and bonds in the reaction center. However, the template-based architecture limits both of these methods in scaling up to larger datasets with more diversity. Template-free Approach Kayala et al. [8] also presented a template-free approach to predict reaction outcomes. Our approach differs from theirs in several ways. First, Kayala et al. operates at the mechanistic level - identifying elementary mechanistic steps rather than the overall transformations from reactants to products. Since most reactions consist of many mechanistic steps, their approach 2 Figure 2: Overview of our approach. (1) we train a model to identify pairwise atom interactions in the reaction center. (2) we pick the top K atom pairs and enumerate chemically-feasible bond configurations between these atoms. Each bond configuration generates a candidate outcome of the reaction. (3) Another model is trained to score these candidates to find the true product. requires multiple predictions to fulfill an entire reaction. Our approach operates at the graph level predicting transformations from reactants to products in a single step. Second, mechanistic descriptions of reactions are not given in existing reaction databases. Therefore, Kayala et al. created their training set based on a mechanistic-level template-driven expert system. In contrast, our model is learned directly from real-world experimental data. Third, Kayala et al. uses feed-forward neural networks where atoms and graphs are represented by molecular fingerprints and additional hand-crafted features. Our approach builds from graph neural networks to encode graph structures. Molecular Graph Neural Networks The question of molecular graph representation is a key issue in reaction modeling. In computational chemistry, molecules are often represented with Morgan Fingerprints, boolean vectors that reflect the presence of various substructures in a given molecule. Duvenaud et al. [5] developed a neural version of Morgan Fingerprints, where each convolution operation aggregates features of neighboring nodes as a replacement of the fixed hashing function. This representation was further expanded by Kearnes et al. [9] into graph convolution models. Dai et al. [4] consider a different architecture where a molecular graph is viewed as a latent variable graphical model. Their recurrent model is derived from Belief Propagation-like algorithms. Gilmer et al. [6] generalized all previous architectures into message-passing network, and applied them to quantum chemistry. The closest to our work is the Weisfeiler-Lehman Kernel Network proposed by Lei et al. [12]. This recurrent model is derived from the Weisfeiler-Lehman kernel that produces isomorphism-invariant representations of molecular graphs. In this paper, we further enhance this representation to capture graph transformations for reaction prediction. 3 Overview Our approach bypasses reaction templates by learning a reaction center identifier. Specifically, we train a neural network that operates on the reactant graph to predict a reactivity score for every pair of atoms (Section 3.1). A reaction center is then selected by picking a small number of atom pairs with the highest reactivity scores. After identifying the reaction center, we generate possible product candidates by enumerating possible bond configurations between atoms in the reaction center (Section 3.2) subject to chemical constraints. We train another neural network to rank these product candidates (represented as graphs, together with the reactants) so that the correct reaction outcome is ranked highest (Section 3.3). The overall pipeline is summarized in Figure 2. Before describing the two modules in detail, we formally define some key concepts used throughout the paper. Chemical Reaction A chemical reaction is a pair of molecular graphs (Gr, Gp), where Gr is called the reactants and Gp the products. A molecular graph is described as G = (V, E), where V = {a1, a2, · · · , an} is the set of atoms and E = {b1, b2, · · · , bm} is the set of associated bonds of varying types (single, double, aromatic, etc.). Note that Gr is has multiple connected components 3 since there are multiple molecules comprising the reactants. The reactions used for training are atom-mapped so that each atom in the product graph has a unique corresponding atom in the reactants. Reaction Center A reaction center is a set of atom pairs {(ai, aj)}, where the bond type between ai and aj differs from Gr to Gp. In other words, a reaction center is a minimal set of graph edits needed to transform reactants to products. Since the reported reactions in the training set are atom-mapped, reaction centers can be identified automatically given the product. 3.1 Reaction Center Identification In a given reaction R = (Gr, Gp), each atom pair (au, av) in Gr is associated with a reactivity label yuv 2 {0, 1} specifying whether their relation differs between reactants and products. The label is determined by comparing Gr and Gp with the help of atom-mapping. We predict the label on the basis of learned atom representations that incorporate contextual cues from the surrounding chemical environment. In particular, we build on a Weisfeiler-Lehman Network (WLN) that has shown superior results against other learned graph representations in the narrower setting of predicting chemical properties of individual molecules [12]. 3.1.1 Weisfeiler-Lehman Network (WLN) The WLN is inspired by the Weisfeiler-Lehman isomorphism test for labeled graphs. The architecture is designed to embed the computations inherent in WL isomorphism testing to generate learned isomorphism-invariant representations for atoms. WL Isomorphism Test The key idea of the isomorphism test is to repeatedly augment node labels by the sorted set of node labels of neighbor nodes and to compress these augmented labels into new, short labels. The initial labeling is the atom element. In each iteration, its label is augmented with the element labels of its neighbors. Such a multi-set label is compactly represented as a new label by a hash function. Let c(L) v be the final label of atom av. The molecular graph G = (V, E) is represented as a set {(c(L) u , buv, c(L) v ) | (u, v) 2 E}, where buv is the bond type between u and v. Two graphs are said to be isomorphic if their set representations are the same. The number of distinct labels grows exponentially with the number of iterations L. WL Network The discrete relabeling process does not directly generalize to continuous feature vectors. Instead, we appeal to neural networks to continuously embed the computations inherent in the WL test. Let r be the analogous continuous relabeling function. Then a node v 2 G with neighbor nodes N(v), node features fv, and edge features fuv is “relabeled” according to r(v) = ⌧(U1fv + U2 X u2N(v) ⌧(V[fu, fuv])) (1) where ⌧(·) could be any non-linear function. We apply this relabeling operation iteratively to obtain context-dependent atom vectors h(l) v = ⌧(U1h(l−1) v + U2 X u2N(v) ⌧(V[h(l−1) u , fuv])) (1 l L) (2) where h(0) v = fv and U1, U2, V are shared across layers. The final atom representations arise from mimicking the set comparison function in the WL isomorphism test, yielding cv = X u2N(v) W(0)h(L) u ⊙W(1)fuv ⊙W(2)h(L) v (3) The set comparison here is realized by matching each rank-1 edge tensor h(L) u ⌦fuv ⌦h(L) v to a set of reference edges also cast as rank-1 tensors W(0)[k] ⌦W(1)[k] ⌦W(2)[k], where W[k] is the k-th row of matrix W. In other words, Eq. 3 above could be written as cv[k] = X u2N(v) D W(0)[k] ⌦W(1)[k] ⌦W(2)[k], h(L) u ⌦fuv ⌦h(L) v E (4) The resulting cv is a vector representation that captures the local chemical environment of the atom (through relabeling) and involves a comparison against a learned set of reference environments. The representation of the whole graph G is simply the sum over all the atom representations: cG = P v cv. 4 3.1.2 Finding Reaction Centers with WLN We present two models to predict reactivity: the local and global models. Our local model is based directly on the atom representations cu and cv in predicting label yuv. The global model, on the other hand, selectively incorporates distal chemical effects with the goal of capturing the fact that atoms outside of the reaction center may be necessary for the reaction to occur. For example, the reaction center may be influenced by certain reagents1. We incorporate these distal effects into the global model through an attention mechanism. Local Model Let cu, cv be the atom representations for atoms u and v, respectively, as returned by the WLN. We predict the reactivity score of (u, v) by passing these through another neural network: suv = σ % uT ⌧(Macu + Macv + Mbbuv) & (5) where σ(·) is the sigmoid function, and buv is an additional feature vector that encodes auxiliary information about the pair such as whether the two atoms are in different molecules or which type of bond connects them. Global Model Let ↵uv be the attention score of atom v on atom u. The global context representation ˜cu of atom u is calculated as the weighted sum of all reactant atoms where the weight comes from the attention module: ˜cu = X v ↵uvcv; ↵uv = σ % uT ⌧(Pacu + Pacv + Pbbuv) & (6) suv = σ % uT ⌧(Ma˜cu + Ma˜cv + Mbbuv) & (7) Note that the attention is obtained with sigmoid rather than softmax non-linearity since there may be multiple atoms relevant to a particular atom u. Training Both models are trained to minimize the following loss function: L(T ) = − X R2T X u6=v2R yuv log(suv) + (1 −yuv) log(1 −suv) (8) Here we predict each label independently because of the large number of variables. For a given reaction with N atoms, we need to predict the reactivity score of O(N 2) pairs. This quadratic complexity prohibits us from adding higher-order dependencies between different pairs. Nonetheless, we found independent prediction yields sufficiently good performance. 3.2 Candidate Generation We select the top K atom pairs with the highest predicted reactivity score and designate them, collectively, as the reaction center. The set of candidate products are then obtained by enumerating all possible bond configuration changes within the set. While the resulting set of candidate products is exponential in K, many can be ruled out by invoking additional constraints. For example, every atom has a maximum number of neighbors they can connect to (valence constraint). We also leverage the statistical bias that reaction centers are very unlikely to consist of disconnected components (connectivity constraint). Some multi-step reactions do exist that violate the connectivity constraint. As we will show, the set of candidates arising from this procedure is more compact than those arising from templates without sacrificing coverage. 3.3 Candidate Ranking The training set for candidate ranking consists of lists T = {(r, p0, p1, · · · , pm)}, where r are the reactants, p0 is the known product, and p1, · · · , pm are other enumerated candidate products. The goal is to learn a scoring function that ranks the highest known product p0. The challenge in ranking candidate products is again representational. We must learn to represent (r, p) in a manner that can focus on the key difference between the reactants r and products p while also incorporating the necessary chemical contexts surrounding the changes. 1Molecules that do not typically contribute atoms to the product but are nevertheless necessary for the reaction to proceed. 5 We again propose two alternative models to score each candidate pair (r, p). The first model naively represents a reaction by summing difference vectors of all atom representations obtained from a WLN on the associated connected components. Our second and improved model, called WLDN, takes into account higher order interactions between these differences vectors. WLN with Sum-Pooling Let c(pi) v be the learned atom representation of atom v in candidate product molecule pi. We define difference vector d(pi) v pertaining to atom v as follows: d(pi) v = c(pi) v −c(r) v ; s(pi) = uT ⌧(M X v2pi d(pi) v ) (9) Recall that the reactants and products are atom-mapped so we can use v to refer to the same atom. The pooling operation is a simple sum over these difference vectors, resulting in a single vector for each (r, pi) pair. This vector is then fed into another neural network to score the candidate product pi. Weisfeiler-Lehman Difference Network (WLDN) Instead of simply summing all difference vectors, the WLDN operates on another graph called a difference graph. A difference graph D(r, pi) is defined as a molecular graph which has the same atoms and bonds as pi, with atom v’s feature vector replaced by d(pi) v . Operating on the difference graph has several benefits. First, in D(r, pi), atom v’s feature vector deviates from zero only if it is close to the reaction center, thus focusing the processing on the reaction center and its immediate context. Second, D(r, pi) explicates neighbor dependencies between difference vectors. The WLDN maps this graph-based representation into a fixed-length vector, by applying a separately parameterized WLN on top of D(r, pi): h(pi,l) v = ⌧ 0 @U1h(pi,l−1) v + U2 X u2N(v) ⌧ ⇣ V[h(pi,l−1) u , fuv] ⌘ 1 A (1 l L) (10) d(pi,L) v = X u2N(v) W(0)h(pi,L) u ⊙W(1)fuv ⊙W(2)h(pi,L) v (11) where h(pi,0) v = d(pi) v . The final score of pi is s(pi) = uT ⌧(M P v2pi d(pi,L) v ). Training Both models are trained to minimize the softmax log-likelihood objective over the scores {s(p0), s(p1), · · · , s(pm)} where s(p0) corresponds to the target. 4 Experiments Data As a source of data for our experiments, we used reactions from USPTO granted patents, collected by Lowe [13]. After removing duplicates and erroneous reactions, we obtained a set of 480K reactions, to which we refer in the paper as USPTO. This dataset is divided into 400K, 40K, and 40K for training, development, and testing purposes.2 In addition, for comparison purposes we report the results on the subset of 15K reaction from this dataset (referred as USPTO-15K) used by Coley et al. [3]. They selected this subset to include reactions covered by the 1.7K most common templates. We follow their split, with 10.5K, 1.5K, and 3K for training, development, and testing. Setup for Reaction Center Identification The output of this component consists of K atom pairs with the highest reactivity scores. We compute the coverage as the proportion of reactions where all atom pairs in the true reaction center are predicted by the model, i.e., where the recorded product is found in the model-generated candidate set. The model features reflect basic chemical properties of atoms and bonds. Atom-level features include its elemental identity, degree of connectivity, number of attached hydrogen atoms, implicit valence, and aromaticity. Bond-level features include bond type (single, double, triple, or aromatic), whether it is conjugated, and whether the bond is part of a ring. Both our local and global models are build upon a Weisfeiler-Lehman Network, with unrolled depth 3. All models are optimized with Adam [10], with learning rate decay factor 0.9. 2Code and data available at https://github.com/wengong-jin/nips17-rexgen 6 USPTO-15K Method |✓| K=6 K=8 K=10 Local 572K 80.1 85.0 87.7 Local 1003K 81.6 86.1 89.1 Global 756K 86.7 90.1 92.2 USPTO Local 572K 83.0 87.2 89.6 Global 756K 89.8 92.0 93.3 Avg. Num. of Candidates (USPTO) Template 482.3 out of 5006 Global 60.9 246.5 1076 (a) Reaction Center Prediction Performance. Coverage is reported by picking the top K (K=6,8,10) reactivity pairs. |✓| is the number of model parameters. USPTO-15K Method Cov. P@1 P@3 P@5 Coley et al. 100.0 72.1 86.6 90.7 WLN 90.1 74.9 84.6 86.3 WLDN 90.1 76.7 85.6 86.8 WLN (*) 100.0 81.4 92.5 94.8 WLDN (*) 100.0 84.1 94.1 96.1 USPTO Method |✓| P@1 P@3 P@5 WLDN 3.2M 79.6 87.7 89.2 WLDN (*) 3.2M 83.9 93.2 95.2 (b) Candidate Ranking Performance. Precision at ranks 1,3,5 are reported. (*) denotes that the true product was added if not covered by the previous stage. Table 1: Model Comparison on USPTO-15K and USPTO dataset. Setup for Candidate Ranking The goal of this evaluation is to determine whether the model can select the correct product from a set of candidates derived from reaction center. We first compare model accuracy against the top-performing template-based approach by Coley et al. [3]. This approach employs frequency-based heuristics to construct reaction templates and then uses a neural model to rank the derived candidates. As explained above, due to the scalability issues associated with this baseline, we can only compare on USPTO-15K, which the authors restricted to contain only examples that were instantiated by their most popular templates. For this experiment, we set K = 8 for candidate generation, which achieves 90% coverage and yields 250 candidates per reaction. To compare a standard WLN representation against its counterpart with Difference Networks (WLDN), we train them under the same setup on USPTO-15K, fixing the number of parameters to 650K. Next, we evaluate our model on USPTO for large scale evaluation. We set K = 6 for candidate generation and report the result of the best model architecture. Finally, to factorize the coverage of candidate selection and the accuracy of candidate ranking, we consider two evaluation scenarios: (1) the candidate list as derived from reaction center; (2) the above candidate list augmented with the true product if not found. This latter setup is marked with (*). 4.1 Results Reaction Center Identification Table 1a reports the coverage of the model as compared to the real reaction core. Clearly, the coverage depends on the number of atom pairs K, with the higher coverage for larger values of K. These results demonstrate that even for K = 8, the model achieves high coverage, above 90%. The results also clearly demonstrate the advantage of the global model over the local one, which is consistent across all experiments. The superiority of the global model is in line with the well-known fact that reactivity depends on more than the immediate local environment surrounding the reaction center. The presence of certain functional groups (structural motifs that appear frequently in organic chemistry) far from the reaction center can promote or inhibit different modes of reactivity. Moreover, reactivity is often influenced by the presence of reagents, which are separate molecules that may not directly contribute atoms to the product. Consideration of both of these factors necessitates the use of a model that can account for long-range dependencies between atoms. Figure 3 depicts one such example, where the observed reactivity can be attributed to the presence of a reagent molecule that is completely disconnected from the reaction center itself. While the local model fails to anticipate this reactivity, the global one accurately predicts the reaction center. The attention map highlights the reagent molecule as the determinant context. 7 Figure 3: A reaction that reduces the carbonyl carbon of an amide by removing bond 4-23 (red circle). Reactivity at this site would be highly unlikely without the presence of borohydride (atom 25, blue circle). The global model correctly predicts bond 4-23 as the most susceptible to change, while the local model does not even include it in the top ten predictions. The attention map of the global model show that atoms 1, 25, and 26 were determinants of atom 4’s predicted reactivity. (a) An example where reaction occurs at the ↵carbon (atom 7, red circle) of a carbonyl group (bond 8-13), also adjacent to a phenyl group (atoms 1-6). The corresponding template explicitly requires both the carbonyl and part of the phenyl ring as context (atoms 4, 7, 8, 13), although reactivity in this case does not require the additional specification of the phenyl group (atom 1). (b) Performance of reactions with different popularity. MRR stands for mean reciprocal rank Figure 4 Candidate Generation Here we compare the coverage of the generated candidates with the templatebased model. Table 1a shows that for K = 6, our model generates an average of 60.1 candidates and reaches a coverage of 89.8%. The template-based baseline requires 5006 templates extracted from the training data (corresponding to a minimum of five precedent reactions) to achieve 90.1% coverage with an average of 482 candidates per example. This weakness of the baseline model can be explained by the difficulty in defining general heuristics with which to extract templates from reaction examples. It is possible to define different levels of specificity based on the extent to which atoms surrounding the reaction center are included or generalized [11]. This introduces an unavoidable trade-off between generality (fewer templates, higher coverage, more candidates) and specificity (more templates, less coverage, fewer candidates). Figure 4a illustrates one reaction example where the corresponding template is rare due to the adjacency of the reaction center to both a carbonyl group and a phenyl ring. Because adjacency to either group can influence reactivity, both are included as part of the template, although reactivity in this case does not require the additional specification of the phenyl group. The massive number of templates required for high coverage is a serious impediment for the template approach because each template application requires solving a subgraph isomorphism problem. Specifically, it takes on average 7 seconds to apply the 5006 templates to a test instance, while our method takes less than 50 ms, about 140 times faster. Candidate Ranking Table 1b reports the performance on the product prediction task. Since the baseline templates from [3] were optimized on the test and have 100% coverage, we compare its performance against our models to which the correct product is added (WLN(*) and WLDN(*)). Our model clearly outperforms the baseline by a wide margin. Even when compared against the candidates automatically computed from the reaction center, WLDN outperforms the baseline in 8 top-1 accuracy. The results also demonstrate that the WLDN model consistently outperforms the WLN model. This is consistent with our intuition that modeling higher order dependencies between the difference vectors is advantageous over simply summing over them. Table 1b also shows the model performance improves when tested on the full USPTO dataset. We further analyze model performance based on the frequency of the underlying transformation as reflected by the the number of template precedents. In Figure 4b we group the test instances according to their frequency and report the coverage of the global model and the mean reciprocal rank (MRR) of the WLDN model on each of them. As expected, our approach achieves the highest performance for frequent reactions. However, it maintains reasonable coverage and ranking accuracy even for rare reactions, which are particularly challenging for template-based methods. 4.2 Human Evaluation Study We randomly selected 80 reaction examples from the test set, ten from each of the template popularity intervals of Figure 4b, and asked ten chemists to predict the outcome of each given its reactants. The average accuracy across the ten performers was 48.2%. Our model achieves an accuracy of 69.1%, very close to the best individual performer who scored 72.0%. Chemist 56.3 50.0 72.0 63.8 66.3 65.0 40.0 58.8 25.0 16.3 Our Model 69.1 Table 2: Human and model performance on 80 reactions randomly selected from the USPTO test set to cover a diverse range of reaction types. The first 8 are chemists with rich experience in organic chemistry (graduate, postdoctoral and professor level chemists) and the last two are graduate students in chemical engineering who use organic chemistry concepts regularly but have less formal training. 5 Conclusion We proposed a novel template-free approach for chemical reaction prediction. Instead of generating candidate products by reaction templates, we first predict a small set of atoms/bonds in reaction center, and then produce candidate products by enumerating all possible bond configuration changes within the set. Compared to template based approach, our framework runs 140 times faster, allowing us to scale to much larger reaction databases. Both our reaction center identifier and candidate ranking model build from Weisfeiler-Lehman Network and its variants that learn compact representation of graphs and reactions. We hope our work will encourage both computer scientists and chemists to explore fully data driven approaches for this task. Acknowledgement We thank Tim Jamison, Darsh Shah, Karthik Narasimhan and the reviewers for their helpful comments. We also thank members of the MIT Department of Chemistry and Department of Chemical Engineering who participated in the human benchmarking study. This work was supported by the DARPA Make-It program under contract ARO W911NF-16-2-0023. References [1] Jonathan H Chen and Pierre Baldi. No electron left behind: a rule-based expert system to predict chemical reactions and reaction mechanisms. Journal of chemical information and modeling, 49(9):2034–2043, 2009. [2] Clara D Christ, Matthias Zentgraf, and Jan M Kriegl. Mining electronic laboratory notebooks: analysis, retrosynthesis, and reaction based enumeration. Journal of chemical information and modeling, 52(7):1745–1756, 2012. [3] Connor W Coley, Regina Barzilay, Tommi S Jaakkola, William H Green, and Klavs F Jensen. Prediction of organic reaction outcomes using machine learning. ACS Central Science, 2017. 9 [4] Hanjun Dai, Bo Dai, and Le Song. Discriminative embeddings of latent variable models for structured data. arXiv preprint arXiv:1603.05629, 2016. [5] David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, pages 2224– 2232, 2015. [6] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212, 2017. [7] Markus Hartenfeller, Martin Eberle, Peter Meier, Cristina Nieto-Oberhuber, Karl-Heinz Altmann, Gisbert Schneider, Edgar Jacoby, and Steffen Renner. A collection of robust organic synthesis reactions for in silico molecule design. Journal of chemical information and modeling, 51(12):3093–3098, 2011. [8] Matthew A Kayala, Chloé-Agathe Azencott, Jonathan H Chen, and Pierre Baldi. Learning to predict chemical reactions. Journal of chemical information and modeling, 51(9):2209–2222, 2011. [9] Steven Kearnes, Kevin McCloskey, Marc Berndl, Vijay Pande, and Patrick Riley. Molecular graph convolutions: moving beyond fingerprints. Journal of computer-aided molecular design, 30(8):595–608, 2016. [10] Diederik P Kingma and Jimmy Lei Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representation, 2015. [11] James Law, Zsolt Zsoldos, Aniko Simon, Darryl Reid, Yang Liu, Sing Yoong Khew, A Peter Johnson, Sarah Major, Robert A Wade, and Howard Y Ando. Route designer: a retrosynthetic analysis tool utilizing automated retrosynthetic rule generation. J. Chem. Inf. Model., 49(3): 593–602, 2009. ISSN 1549-9596. [12] Tao Lei, Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Deriving neural architectures from sequence and graph kernels. In Proceedings of 34th International Conference on Machine Learning (ICML), 2017. [13] D. M. Lowe. Patent reaction extraction: downloads; https://bitbucket.org/dan2097/ patent-reaction-extraction/downloads. 2014. [14] Marwin HS Segler and Mark P Waller. Neural-symbolic machine learning for retrosynthesis and reaction prediction. Chemistry-A European Journal, 2017. [15] Sara Szymkuc, Ewa P. Gajewska, Tomasz Klucznik, Karol Molga, Piotr Dittwald, Michał Startek, Michał Bajczyk, and Bartosz A. Grzybowski. Computer-assisted synthetic planning: The end of the beginning. Angew. Chem., Int. Ed., 55(20):5904–5937, 2016. ISSN 1521-3773. doi: 10.1002/anie.201506101. URL http://dx.doi.org/10.1002/anie.201506101. [16] Matthew H Todd. Computer-aided organic synthesis. Chemical Society Reviews, 34(3):247–266, 2005. [17] Wendy A Warr. A short review of chemical reaction database systems, computer-aided synthesis design, reaction prediction and synthetic feasibility. Molecular Informatics, 33(6-7):469–476, 2014. [18] Jennifer N Wei, David Duvenaud, and Alán Aspuru-Guzik. Neural networks for the prediction of organic chemistry reactions. ACS Central Science, 2(10):725–732, 2016. 10 | 2017 | 536 |
7,048 | Inferring Generative Model Structure with Static Analysis Paroma Varma1, Bryan He2, Payal Bajaj2, Nishith Khandwala2, Imon Banerjee3, Daniel Rubin3,4, Christopher Ré2 1Electrical Engineering, 2Computer Science, 3Biomedical Data Science, 4Radiology Stanford University {paroma,bryanhe,pabajaj,nishith,imonb,rubin}@stanford.edu, chrismre@cs.stanford.edu Abstract Obtaining enough labeled data to robustly train complex discriminative models is a major bottleneck in the machine learning pipeline. A popular solution is combining multiple sources of weak supervision using generative models. The structure of these models affects the quality of the training labels, but is difficult to learn without any ground truth labels. We instead rely on weak supervision sources having some structure by virtue of being encoded programmatically. We present Coral, a paradigm that infers generative model structure by statically analyzing the code for these heuristics, thus significantly reducing the amount of data required to learn structure. We prove that Coral’s sample complexity scales quasilinearly with the number of heuristics and number of relations identified, improving over the standard sample complexity, which is exponential in n for learning nth degree relations. Empirically, Coral matches or outperforms traditional structure learning approaches by up to 3.81 F1 points. Using Coral to model dependencies instead of assuming independence results in better performance than a fully supervised model by 3.07 accuracy points when heuristics are used to label radiology data without ground truth labels. 1 Introduction Complex discriminative models like deep neural networks rely on a large amount of labeled training data for their success. For many real-world applications, obtaining this magnitude of labeled data is one of the most expensive and time consuming aspects of the machine learning pipeline. Recently, generative models have been used to create training labels from various weak supervision sources, such as heuristics or knowledge bases, by modeling the true class label as a latent variable [1, 2, 27, 31, 36, 37]. After the necessary parameters for the generative models are learned using unlabeled data, the distribution over the true labels can be inferred. Properly specifying the structure of these generative models is essential in estimating the accuracy of the supervision sources. While traditional structure learning approaches have focused on the supervised case [23, 28, 41], previous works related to weak supervision assume that the structure is user-specified [1, 27, 31, 36]. Recently, Bach et al. [2] showed that it is possible to learn the structure of these models with a sample complexity that scales sublinearly with the number of possible binary dependencies. However, the sample complexity scales exponentially for higher degree dependencies, limiting its ability to learn complex dependency structures. Moreover, the time required to learn the dependencies also grows exponentially with the degree of dependencies, hindering the development of user-defined heuristics. This poses a problem in many domains where high degree dependencies are common among heuristics that operate over a shared set of inputs. These inputs are interpretable characteristics extracted from the data. For example, various approaches in computer vision use predicted bounding box or segmentation 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. attributes [18, 19, 29], like location and size, to weakly supervise more complex image-based learning tasks [5, 7, 11, 26, 38]. Another example comes from the medical imaging domain, where attributes include characteristics such as the area, intensity and perimeter of a tumor, as shown in Figure 1. Note that these attributes are computationally represented, and the heuristics written over them are encoded programmatically as well. There are typically a relatively small set of interpretable characteristics, so the heuristics often share these attributes. This results in high order dependency structures among these sources, which are crucial to model in the generative model that learns accuracies for these sources. To address the issue of learning higher order dependencies efficiently, we present Coral, a paradigm that statically analyzes the source code of the weak supervision sources to infer, rather than learn, the complex relations among heuristics. Coral’s sample complexity scales quasilinearly with the number of relevant dependencies and does not scale with the degree of the dependency, unlike the sample complexity for Bach et al. [2], which scales exponentially with the degree of the dependency. Moreover, the time to identify these relations is constant in the degree of dependencies, since it only requires looking at the source code for each heuristic to find which heuristics share the same input. This allows Coral to infer high degree dependencies more efficiently than techniques that rely only on statistical methods to learn them, and thus generate a more accurate dependency structure for the heuristics. Coral then uses a generative model to learn the proper weights for this dependency structure to assign probabilistic labels to training data. We experimentally validate the performance of Coral across various domains and show it outperforms traditional structure learning under various conditions while being significantly more computationally efficient. We show how modeling dependencies leads to an improvement of 3.81 F1 points compared to standard structure learning approaches. Additionally, we show that Coral can assign labels to data that have no ground truth labels, and this augmented training set results in improving the discriminative model performance by 3.07 points. For a complex relation-based image classification task, 6 heuristic functions written over only bounding box attributes as primitives are able to train a model that performs within 0.74 points of the F1 score achieved by a fully-supervised model trained on the rich, hand-labeled attribute and relation information in the Visual Genome database [21]. 2 The Coral Paradigm The Coral paradigm takes as input a set of domain-specific primitives and a set of programmatic user-defined heuristic functions that operate over the primitives. We formally define these abstractions in Section 2.1. Coral runs static analysis on the source code that defines the primitives and the heuristic functions to identify which sets of heuristics are related by virtue of sharing primitives (Section 2.2). Once Coral identifies these dependencies, it uses a factor graph to model the relationship between the heuristics, primitives and the true class label. We describe the conditions under which Coral can learn the structure of the generative model with significantly less data than traditional approaches in Section 2.3 and demonstrate how this affects generative model accuracy via simulations. Finally, we discuss how Coral learns the accuracies of the each heuristic and outputs probabilistic labels for the training data in Section 2.4. p1: Area p2: Perimeter p3: Intensity λ1(p1) λ2(p2) λ3(p2, p3) Domain Specific Primitives Raw Images Heuristic Functions Segmentations Aggressive NonAggressive Aggressive Noisy Labels Generative Model Primitives and Heuristics are User-Defined Training Labels Discriminative Model The Coral Pipeline 75% Aggressive 75% Aggressive Figure 1: Running example for the Coral paradigm. Users apply standard algorithms to segment tumors from the X-ray and extract the domain-specific primitives from the image and segmentation. They write heuristic functions over the primitives that output a noisy label for each image. The generative model takes these as inputs and provides probabilistic training labels for the discriminative model. 2 2.1 Coral Abstractions Domain-Specific Primitives Domain-specific primitives (DSPs) in Coral are the simplest elements that heuristic functions take as input and operate over. DSPs in Coral have semantic meaning, making them interpretable for users. This is akin to the concept of language primitives in programming languages, in which they are the smallest unit of processing with meaning. The motivation for making the DSPs domain-specific instead of a general construct for the various data modalities is to allow users to take advantage of existing work in their field to extract meaningful characteristics from the raw data. Figure 1 shows an example of a pipeline for bone tumor classification as aggressive or non-aggressive, inspired by one of our real experiments. First, an automated segmentation algorithm is used to generate a binary mask for where the tumor is [20, 25, 34, 39]. Then, we define 3 DSPs based on the segmentation: area (p1), perimeter (p2) and total intensity (p3) of the segmented area. More complex characteristics such as those that capture texture, shape and edge features can also be used [4, 14, 22] (see Appendix). We now define a formal construct for how DSPs are encoded programmatically. Users generate DSPs in Coral through a primitive specifier function, such as create_primitives in Figure 2(a). Specifically, this function takes as input a single unlabeled data point (and necessary intermediate representations such as the segmentation) and returns an instance of PrimitiveSet, which maps primitive names to primitive values, like integers (we refer to a specific instance of this class as P). Note that P.ratio is composed of two other primitives, while the rest of the primitives are generated independently from the image and segmentation. (a) def create_primitives(image,segmentation): P = PrimitiveSet() P.area = get_area(segmentation) P.perimeter = get_perimeter(segmentation) P.intensity = np.sum(segmentation*image) P.ratio = P.intensity/P.perimeter return P (b) (c) P.area P.intensity P.perimeter / P.ratio P.perimeter value P.ratio value get_perimeter() function / operator P.intensity value P.perimeter value Figure 2: (a) The create_primitives function that generates primitives. (b) Part of the AST for the create_primitives function. (c) The composition structure that results from traversing the AST. Heuristic Functions In Coral, heuristic functions (HFs) can be viewed as mapping a subset of the DSPs to a noisy label for the training data, as shown in Figure 1. In our experience with user-defined HFs, we observe that HFs are usually nested if-then statements in which each statement checks whether the value of a single primitive or a combination of them are above or below a user-set threshold (see Appendix). As shown in Figure 3(a), they take fields of the object P as input and return a label (or abstain) based on the value of the input primitives. While our running example focuses on a single data point for DSP generation and HF construction, both procedures are applied to the entire training set to assign a set of noisy labels from each HF to each data point. 2.2 Static Dependency Analysis Since the number of DSPs in some domains can be relatively small, multiple HFs can operate over the same DSPs. HFs that share at least one primitive are trivially related to each other. Prior work [2] learns these dependencies using the labels HFs assign to data points and its probability of success scales with the amount of data available. However, only pairwise HF dependencies can be learned efficiently, since the data required grows exponentially with the degree of the HF relation. This in turn limits the complexity of the dependency structure this method can accurately learn and model. Heuristic Function Inputs Coral takes advantage of the fact that users write HFs over a known, finite set of primitives. It infers dependencies that exist among HFs by simply looking at the source code of how the DSPs and HFs are constructed. This process requires no data to successfully learn the dependencies, making it more computationally efficient than standard approaches. In order to determine whether any set of HFs share at least one DSP, Coral looks at the input for each HF. Since the HFs only take as input the DSP they operate over, simply grouping HFs by the primitives they share is an efficient approach for recognizing these dependencies. 3 As shown in our running example, this would result in Coral not recognizing any dependencies among the HFs since the input for all 3 HFs are different (Figure 3(a)). This, however, would be incorrect, since the primitive P.ratio is composed of P.perimeter and P.intensity, which makes λ2 and λ3 related. Therefore, along with looking at the primitives that each HF takes as input, it is also essential to model how these primitives are composed. Primitive Compositions We use our running example in Figure 2 to explain how Coral gathers information about DSP compositions. Coral builds an abstract syntax tree (AST) to represent the computations the create_primitives function performs. An AST represents operations involving the primitives as a tree, as shown in Figure 2(b). To find primitive compositions from the AST, Coral first finds the expressions in the AST that add primitives to P (denoted in the AST as P.name). Then, for each assignment expression, Coral traverses the subtree rooted at the assignment expression and adds all other encountered primitives as a dependency for P.name. If no primitives are encountered in the subtree, the primitive is registered as being independent of the rest. The composition structure that results from traversing the AST is shown in Figure 2(c), where P.area, P.intensity, and P.perimeter are independent while P.ratio is a composition. Heuristic Function Dependency Structure With knowledge of how the DSPs are composed, we return to our original method of looking at the inputs of the HFs. As before, we identify that λ1 and λ2 use P.area and P.perimeter, respectively. However, we now know that λ3 uses P.ratio, which is a composition of P.intensity and P.perimeter. This implies that λ3 will be related to any HF that takes either P.intensity, P.perimeter, or both as inputs. We proceed to build a relational structure among the HFs and DSPs. As shown in Figure 3(b), this structure shows which independent DSPs each HF operates over. The relational structure implicitly encodes dependency information about the HFs — if an edge points from one primitive to n HFs, those n HFs are in an n-way relation by virtue of sharing that primitive. This dependency information can more formally be encoded in a factor graph shown in Figure 3(c), which is discussed in Section 2.3. Note that we chose a particular programmatic setup for creating DSPs and HFs to explain how static analysis can infer dependencies; however, this process can be modified to work with other setups that encode DSPs and HFs as well. def λ_1(P.area): if P.area >= 2.0: return 1 else: return -1 def λ_2(P.perimeter): if P.perimeter <= 12.0: return 1 else: return 0 λ1 λ2 λ3 P.area P.perimeter P.intensity def λ_3(P.ratio): if P.ratio <= 5.0: return 1 else: return -1 (a) (b) (c) λ1 λ2 λ3 p1 p2 p3 𝜙1 𝐻𝐹 𝜙2 𝐻𝐹 𝜙3 𝐻𝐹 Y 𝜙2 𝐴𝑐𝑐 𝜙1 𝐴𝑐𝑐 𝜙3 𝐴𝑐𝑐 𝜙𝐷𝑆𝑃 Figure 3: (a) shows the encoded HFs. (b) shows the HF dependency structure where DSP nodes have an edge going to the HFs that use them as inputs (explicitly or implicitly). (c) shows the factor graph Coral uses to model the relationship between HFs, DSPs, and latent class label Y. 2.3 Creating the Generative Model We now describe the generative model used to predict the true class labels. The Coral model uses a factor graph (Figure 3(c)) to model the relationship between the primitives (p∈R), heuristic functions (λ∈{−1,0,1}) and latent class label (Y ∈{−1,1}). We show that by incorporating information about how primitives are shared across HFs from static analysis, this factor graph infers all dependencies between the heuristics that are guaranteed to be present. We also describe how Coral recovers additional dependencies among the heuristics by studying empirical relationships between the primitives. Modeling Heuristic Function Dependencies Now that dependencies have been inferred via static analysis, the goal is to learn the accuracies for each HF and assign labels to training data accordingly. 4 The factor graph thus consists of two types of factors: accuracy factors φAcc and HF factors from static analysis φHF. The accuracy factors specify the accuracy of each heuristic function and are defined as φAcc i (Y,λi)=Y λi, i=1,...,n where n is the total number of heuristic functions. The static analysis factors ensure that the heuristics are correctly evaluated based on the HF dependencies found via static analysis. They ensure that a probability of zero is given to any configuration where an HF does not have the correct value given the primitives it depends on. The static analysis factors are defined as. φHF i (λi,p1,...,pm)= 0 if λi is valid given p1,...,pm −∞ otherwise , i=1,...,n Since these factors are obtained directly from static analysis, they can be recovered with no data. However, we note that static analysis is not sufficient to capture all dependencies required in the factor graph to accurately model the process of generating training labels. Specifically, static analysis can (i) pick up spurious dependencies among HFs that are not truly dependent on each other, or (ii) miss key dependencies among HFs that exist due to dependencies among the DSPs in the HFs. (i) can occur if some λA takes as input DSPs pi,pj and λB takes as input DSPs pi,pk, but pi always has the same value. Although static analysis would pick up that λA and λB share a primitive and should have a dependency, this may not be true if pj and pk are independent. (ii) can occur if two HFs depend on different primitives, but these primitives happen to always have the same value. In this case, it is impossible for static analysis to infer the dependency between the HFs if the primitives have different names and are generated independently, as described in Section 2.2. A more realistic scenario comes from our running example, where we would expect the area and perimeter of the tumor to be related. To account for both cases, it is necessary to capture the possible dependencies that occur among the DSPs to ensure that the dependencies from static analysis do not misspecify the factor graph. We introduce a factor to account for additional dependencies among the primitives, φDSP. There are many possible choices for this dependency factor, but one simple choice is to model pairwise similarity between the primitives. For binary and discrete primitives, the dependency factor with pairwise similarity can be represented as φDSP(p1,...,pm)= X i<j φSim ij (pi,pj), where φSim ij (pi,pj)=I[pi =pj]. The dependency factor can be generalized to continuous-valued primitives by binning the primitives into discrete values before comparing for similarity. Finally, with three types of factors, the probability distribution specified by the factor graph is P(y,λ1,...,λn,p1,...,pm)∝exp n X i=1 θAcc i φAcc i + n X i=1 φHF i + m X i=1 m X j=i+1 θSim ij φSim ij where θAcc and θSim ij are weights that specify the strength of factors φAcc and φSim ij . Inferring Dependencies without Data The HF factors capture all dependencies among the heuristic functions that are not represented by the φDSP factor. The dependencies represented by the φDSP factor are precisely the dependencies that cannot be inferred via static analysis due to the fact that this factor depends solely on the content of the primitives. It is therefore impossible to determine what this factor is without data. WhileassumingthatwehavethetrueφDSP seemslikeastrongcondition, wefindthatinreal-worldexperiments, including the φDSP factor rarely leads to improvements over the case when we only include the φAcc andφHF factors. Insome of our experiments (seeSection 3), we usebounding box location, size and object labels as domain-specific primitives for image and video querying tasks. Since these primitives are notcorrelated, modeling the primitivedependency doesnot lead toany improvement over justmodeling HF dependencies from static analysis. Moreover, in other experiments where modeling the relation among primitives helps, we observe relatively small benefits above what modeling HF dependencies provides (Section 3). Therefore, even without data, it is possible to model the most important dependencies among HFs that lead to significant gains over the case in which no dependencies are modeled. 5 2.4 Generating Probabilistic Training Labels Given the probability distribution of the factor graph, our goal is to learn the proper weights θAcc i and θSim ij . Coral adopts structure learning approaches described in recent work [2], which learns dependency structures in the weak supervision setting and maximizes the ℓ1-regularized marginal pseudolikelihood of each primitive to learn the weights of the relevant factors. 0 250 500 N 0 25 50 Relative Improvement (%) Binary Dependencies 0 250 500 N 0 25 50 3-ary Dependencies 0 250 500 N 0 25 50 4-ary Dependencies n=6 n=8 n=10 Relative Improvement over Structure Learning Figure 4: Simulation demonstrating improved generative model accuracy with Coral compared to structure learning [2] and Coral. Relative improvement of Coral over structure learning is plotted against number of unlabeled data points (N) and number of HFs (n). To learn the weights of the generative model, we use contrastive divergence [15] as a maximum likelihood estimation routine and maximize the marginal likelihood of the observed primitives. Gibbs sampling is used to estimate the intractable gradients, which are then used in stochastic gradient descent. Because the HFs are typically deterministic functions of the primitives (represented as the −∞value of the correctness factors for invalid heuristic values), standard Gibbs sampling will not be able to mix properly. As a result, we modify the Gibbs sampler to simultaneously sample one primitive along with all heuristics that depend on it. Despite the fact that the true class label is latent, this process still converges to the correct parameter values [27]. Additionally, the amount of data necessary to learn the parameters scales quasilinearly with the number of parameters. In our case, the number of parameters is simply the number of heuristics n and the number of relevant primitive similarity dependencies s. We now formally state the conditions for this result, which match those of Ratner et al. [27], and give the sample complexity of our method. First, we assume that there exists some feasible parameter set Θ⊂Rn that is known to contain the parameter θ∗=(θAcc, θSim) that models the true distribution π∗of the data: ∃θ∗∈Θ s.t. ∀π∗(p1,...,pm,Y )=µθ(p1,...,pm,Y ). (1) Next, we must be able to accurately learn θ∗if we are provided with labeled samples of the true distribution. Specifically, there must be an asymptotically unbiased estimator ˆθ that takes some set of labeled data T independently sampled from π∗such that for some c>0, Cov ˆθ(T) ⪯(2c|T|)−1I. (2) Finally, we must have enough sufficiently accurate heuristics so that we have a reasonable estimate of Y. For any two feasible models θ1,θ2 ∈Θ, E(p1,...,pm,Y )∼µθ1 h Var(p′ 1,...,p′m,Y ′)∼µθ2 (Y ′ |p1 =p′ 1,...,pm =p′ m) i ≤ c n+s (3) Proposition 1. Suppose that we run stochastic gradient descent to produce estimates of the weights ˆθ=(ˆθAcc, ˆθSim) in a setup satisfying conditions (1), (2), and (3). Then, for any fixed error ϵ>0, if the number of unlabeled data points N is at least Ω[(n+s)log(n+s)], then our expected parameter error is bounded by E h ∥ˆθ−θ∗∥2i ≤ϵ2. The proof follows from the sample complexity of Ratner et al. [27] and appears in the Appendix. With the weights ˆθAcc i and ˆθSim ij maximizing the marginal likelihood of the observed primitives, we have a fully specified factor graph and complete generative model, which can be used to predict the latent class label. For each data point, we compute the label each heuristic function applies to it using the 6 values of the domain-specific primitives. Through the accuracy factors, we then estimate a distribution for the latent class label and use these noisy labels to train a discriminative model. We present a simulation to empirically compare our sample complexity with that of structure learning [2]. In our simulation, we have n HFs, each with an accuracy of 75%, and explore settings in which there exists one binary, 3-ary and 4-ary dependency among the HFs. The dependent HFs share exactly one primitive, and the primitives themselves are independent (s=0). We show our results in Figure 4. In the case with a binary dependency, structure learning recovers the necessary dependency with few samples, and has similar performance to Coral. In contrast, in the second and third settings with high-order dependencies, structure learning struggles to recover the relevant dependency, and performs worse than Coral even as more training data is provided. 3 Experimental Results We seek to experimentally validate the following claims about our approach. Our first claim is that HF dependencies inferred via static analysis perform significantly better than a model that does not take dependencies into account. Second, we compare to a structure learning approach for weak supervision [2] and show how we outperform it over a variety of domains. Finally, we show that in case primitive dependencies exist, Coral can learn and model those as well. We show that modeling the dependencies between the heuristic functions and primitives can generate training sets that, in some cases, beat fully supervised models by labeling additional unlabeled data. Our classification tasks range from specialized medical domains to natural images and video, and we include details of the DSPs and HFs in the Appendix. Note that while the number of HFs and DSPs is fairly low (Table 1), using static analysis to automatically infer dependencies rather than ask users to identify them saves significant effort since the number of possible dependencies grows exponentially with the number of HFs present. We compare our approach to majority vote (MV), generative models that learn the accuracies of different heuristics, specifically one that assumes the heuristics are independent (Indep) [27], and Bach et al. [2] that learns the binary inter-heuristic dependencies (Learn Dep). We also compare to the fully supervised (FS) case, and measure the performance of the discriminative model trained with labels generated using the above methods. We split our approach into two parts: inferring HF dependencies using only static analysis (HF Dep) and additionally learning primitive level dependencies (HF+DSP Dep). Coral Performance Figure 5: Discriminative model performance comparing HF Dep (HF dependencies from static analysis) and HF+DSP Dep (HF and DSP dependencies) to other methods. Numbers in Appendix. Visual Genome and ActivityNet Classification We explore how to extract complex relations in images and videos given object labels and their bounding boxes. We used subsets of two datasets, Visual Genome [21] and ActivityNet [9], and defined our task as finding images of “a person biking down a road” and finding basketball videos, respectively. For both tasks, a small set of DSPs were shared heavily among HFs, and modeling the dependencies observed by static analysis led to a significant improvement over the independent case. Since these dependencies involved groups of 3 or more heuristics, Coral improved significantly over structure learning as well, which was unable to model these dependencies due to the lack of enough data. Moreover, modeling primitive dependencies did not help since the primitives were indeed independent (Table 1). We report our results for these tasks in terms of the F1 score (harmonic mean of the precision and recall) since there was significant class imbalance which accuracy would not capture well. Bone Tumor Classification We used a set of 802 labeled bone tumor X-ray images along with their radiologist-drawn segmentations. Our task was to differentiate between aggressive and non-aggressive 7 Table 1: Heuristic Function (HF) and Domain-Specific Primitive (DSP) statistics. Discriminative model improvement with HF+DSP Dep over other methods. *improvements shown in terms of F1 score, rest in terms of accuracy. ActivityNet model is LR using VGGNet embeddings as features. Application Number of Model Improvement Over DSPs HFs Shared DSPs MV Indep Learn Dep FS Visual Genome 7 5 2 GoogLeNet 7.49* 2.90* 2.90* -0.74* ActivityNet 5 4 2 VGGNet+LR 6.23* 3.81* 3.81* -1.87* Bone Tumor 17 7 0 LR 5.17 3.57 3.06 3.07 Mammogram 6 6 0 GoogLeNet 4.62 1.11 0 -0.64 tumors. We generated HFs that were a combination of hand-tuned rules and decision-tree generated rules (tuned on a small held out subset of the dataset). The discriminative model utilized a set of 400 hand-tuned features (note that there is no overlap between these features and the DSPs) that encoded various shape, texture, edge and intensity-based characteristics. Although there were no explicitly shared primitives in this dataset, the generative model was still able to model the training labels more accurately with knowledge of how heuristics used primitives, which affects the relative false positive and false negative rates. Thus, the generative model significantly improved over the independent model. Moreover, a small dataset size hindered structure learning, which gave a minimal boost over the independent case (Table 1). When we used heuristics in Coral to label an additional 800 images that had no ground truth labels, we beat the previous FS score by 3.07 points (Figure 5, Table 1). Mammogram Tumor Classification We used the DDSM-CBIS [32] dataset, which consists of 1800 scanned film mammograms and associated segmentations for the tumors in the form of binary masks. Our task was to identify whether a tumor is malignant or benign, and each heuristic only operated over one primitive, resulting in no dependencies that static analysis could identify. In this case, structure learning performed better than Coral when we only used static analysis to infer dependencies (Figure 5). However, including primitive dependencies allowed us to match structure learning, resulting in a 1.11 point improvement over the independent case (Figure 5, Table 1). 4 Related Work As the need for labeled training data grows, a common alternative is to utilize weak supervision sources such as distant supervision [10, 24], multi-instance learning [16, 30], and heuristics [8, 35]. Specifically for images, weak supervision using object detection and segmentation or visual databases is a popular technique as well (detailed discussion in Appendix). Estimating the accuracies of these sources without access to ground truth labels is a classic problem [13]. Methods such as crowdsourcing [12, 17, 40], boosting[3, 33], co-training [6], and learning from noisy labels are some of the popular approaches that can combine various sources of weak supervision to assign noisy labels to data. However, Coral does not require any labeled data to model the dependencies among the heuristics, which can be interpreted as workers, classifiers or views for the above methods, and domain-specific primitives. Recently, generative models have also been used to combine various sources of weak supervision [1, 31, 36, 37]. One specific example, data programming [27], proposes using multiple sources of weak supervision for text data in order to describe a generative model and subsequently learns the accuracies of these sources. Coral also focuses on multiple programmatically encoded heuristics that can weakly label data and learns their accuracies to assign labels to training data. However, Coral adds an additional layer of domain-specific primitives in its generative model, which allows it to generalize beyond text-based heuristics. It also infers the dependencies among the heuristics and the primitives, rather than requiring users to specify them. Other previous work also assume that this structure in generative models is user-specified [1, 31, 36]. However, Bach et al. [2] recently showed that it is possible to learn the dependency structure among sources of weak supervision with a sample complexity that scales sublinearly with the number of possible pairwise dependencies. Coral instead identifies the dependencies among the heuristic functions by inspecting the content of the programmable functions, therefore relying on significantly less data to learn the generative model structure. Moreover, Coral can also pick up higher-order dependencies, for which Bach et al. [2] needs large amounts of data to detect. 8 5 Conclusion and Future Work In this paper, we introduced Coral, a paradigm that models the dependency structure of weak supervision heuristics and systematically combines their outputs to assign probabilistic labels to training data. We described how Coral takes advantage of the programmatic nature of these heuristics in order to infer dependencies among them via static analysis. Coral therefore requires a sample complexity that is quasilinear in the number of heuristics and relations found. We showed how Coral leads to significant improvements in discriminative model accuracy over traditional structure learning approaches across various domains. Coral scratches the surface of the possible ways weak supervision can borrow from the field of programming languages, especially as weak supervision sources are used to label large magnitudes of data and need to be encoded programmatically. We look at a natural extension of treating the process of encoding heuristics as writing functions and hope to explore the interactions between systematic training set creation and concepts from the programming language field. Acknowledgments We thank Shoumik Palkar, Stephen Bach, and Sen Wu for their helpful conversations and feedback. We are grateful to Darvin Yi for his assistance with the DDSM dataset based experiments and associated deep learning models. We acknowledge the use of the bone tumor dataset annotated by Drs. Christopher Beaulieu and Bao Do and carefully collected over his career by the late Henry H. Jones, M.D. (aka “Bones Jones”). This material is based on research sponsored by Defense Advanced Research Projects Agency (DARPA) under agreement number FA8750-17-2-0095. We gratefully acknowledge the support of the DARPA SIMPLEX program under No. N66001-15-C-4043, DARPA FA8750-12-2-0335 and FA8750-13-2-0039, DOE 108845, the National Science Foundation (NSF) Graduate Research Fellowship under No. DGE-114747, Joseph W. and Hon Mai Goodman Stanford Graduate Fellowship, National Institute of Health (NIH) U54EB020405, the Office of Naval Research (ONR) under awards No. N000141210041 and No. N000141310129, the Moore Foundation, the Okawa Research Grant, American Family Insurance, Accenture, Toshiba, and Intel. This research was supported in part by affiliate members and other supporters of the Stanford DAWN project: Intel, Microsoft, Teradata, and VMware. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA or the U.S. Government. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of DARPA, AFRL, NSF, NIH, ONR, or the U.S. government. 9 References [1] E. Alfonseca, K. Filippova, J.-Y. Delort, and G. Garrido. Pattern learning for relation extraction with a hierarchical topic model. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Short Papers-Volume 2, pages 54–59. Association for Computational Linguistics, 2012. [2] S. H. Bach, B. He, A. Ratner, and C. Ré. Learning the structure of generative models without labeled data. In ICML, 2017. [3] A. Balsubramani and Y. Freund. Scalable semi-supervised aggregation of classifiers. In Advances in Neural Information Processing Systems, pages 1351–1359, 2015. [4] I. Banerjee, L. Hahn, G. Sonn, R. Fan, and D. L. Rubin. Computerized multiparametric mr image analysis for prostate cancer aggressiveness-assessment. arXiv preprint arXiv:1612.00408, 2016. [5] M. Blaschko, A. Vedaldi, and A. Zisserman. Simultaneous object detection and ranking with weak supervision. In Advances in neural information processing systems, pages 235–243, 2010. [6] A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-training. In Proceedings of the eleventh annual conference on Computational learning theory, pages 92–100. ACM, 1998. [7] S. Branson, P. Perona, and S. Belongie. Strong supervision from weak annotation: Interactive training of deformable part models. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 1832–1839. IEEE, 2011. [8] R. Bunescu and R. Mooney. Learning to extract relations from the web using minimal supervision. In ACL, 2007. [9] F. Caba Heilbron, V. Escorcia, B. Ghanem, and J. Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 961–970, 2015. [10] M. Craven, J. Kumlien, et al. Constructing biological knowledge bases by extracting information from text sources. In ISMB, pages 77–86, 1999. [11] J. Dai, K. He, and J. Sun. Boxsup: Exploiting bounding boxes to supervise convolutional networks for semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1635–1643, 2015. [12] N. Dalvi, A. Dasgupta, R. Kumar, and V. Rastogi. Aggregating crowdsourced binary ratings. In Proceedings of the 22nd international conference on World Wide Web, pages 285–294. ACM, 2013. [13] A. P. Dawid and A. M. Skene. Maximum likelihood estimation of observer error-rates using the EM algorithm. Applied statistics, pages 20–28, 1979. [14] R. M. Haralick, K. Shanmugam, et al. Textural features for image classification. IEEE Transactions on systems, man, and cybernetics, 3(6):610–621, 1973. [15] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002. [16] R. Hoffmann, C. Zhang, X. Ling, L. Zettlemoyer, and D. S. Weld. Knowledge-based weak supervision for information extraction of overlapping relations. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies-Volume 1, pages 541–550. Association for Computational Linguistics, 2011. [17] M. Joglekar, H. Garcia-Molina, and A. Parameswaran. Comprehensive and reliable crowd assessment algorithms. In Data Engineering (ICDE), 2015 IEEE 31st International Conference on, pages 195–206. IEEE, 2015. [18] D. Kang, J. Emmons, F. Abuzaid, P. Bailis, and M. Zaharia. Optimizing deep cnn-based queries over video streams at scale. CoRR, abs/1703.02529, 2017. URL http://arxiv.org/abs/1703.02529. [19] A. Karpathy and L. Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3128–3137, 2015. [20] M. R. Kaus, S. K. Warfield, A. Nabavi, P. M. Black, F. A. Jolesz, and R. Kikinis. Automated segmentation of mr images of brain tumors 1. Radiology, 218(2):586–591, 2001. [21] R. Krishna, Y. Zhu, O. Groth, J. Johnson, K. Hata, J. Kravitz, S. Chen, Y. Kalantidis, L.-J. Li, D. A. Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. arXiv preprint arXiv:1602.07332, 2016. [22] C. Kurtz, A. Depeursinge, S. Napel, C. F. Beaulieu, and D. L. Rubin. On combining image-based and ontological semantic dissimilarities for medical image retrieval applications. Medical image analysis, 18 (7):1082–1100, 2014. 10 [23] N. Meinshausen and P. Bühlmann. High-dimensional graphs and variable selection with the lasso. The annals of statistics, pages 1436–1462, 2006. [24] M. Mintz, S. Bills, R. Snow, and D. Jurafsky. Distant supervision for relation extraction without labeled data. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP: Volume 2-Volume 2, pages 1003–1011. Association for Computational Linguistics, 2009. [25] A. Oliver, J. Freixenet, J. Marti, E. Pérez, J. Pont, E. R. Denton, and R. Zwiggelaar. A review of automatic mass detection and segmentation in mammographic images. Medical image analysis, 14(2):87–110, 2010. [26] M. Oquab, L. Bottou, I. Laptev, and J. Sivic. Is object localization for free? - Weakly-supervised learning with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 685–694, 2015. [27] A. J. Ratner, C. M. De Sa, S. Wu, D. Selsam, and C. Ré. Data programming: Creating large training sets, quickly. In Advances in Neural Information Processing Systems, pages 3567–3575, 2016. [28] P. Ravikumar, M. J. Wainwright, J. D. Lafferty, et al. High-dimensional ising model selection using l1-regularized logistic regression. The Annals of Statistics, 38(3):1287–1319, 2010. [29] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 779–788, 2016. [30] S. Riedel, L. Yao, and A. McCallum. Modeling relations and their mentions without labeled text. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 148–163. Springer, 2010. [31] B. Roth and D. Klakow. Combining generative and discriminative model scores for distant supervision. In EMNLP, pages 24–29, 2013. [32] R. Sawyer-Lee, F. Gimenez, A. Hoogi, and D. Rubin. Curated breast imaging subset of ddsm, 2016. [33] R. E. Schapire and Y. Freund. Boosting: Foundations and algorithms. MIT press, 2012. [34] N. Sharma, L. M. Aggarwal, et al. Automated medical image segmentation techniques. Journal of medical physics, 35(1):3, 2010. [35] J. Shin, S. Wu, F. Wang, C. De Sa, C. Zhang, and C. Ré. Incremental knowledge base construction using DeepDive. Proceedings of the VLDB Endowment, 8(11):1310–1321, 2015. [36] S. Takamatsu, I. Sato, and H. Nakagawa. Reducing wrong labels in distant supervision for relation extraction. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Long Papers-Volume 1, pages 721–729. Association for Computational Linguistics, 2012. [37] P. Varma, B. He, D. Iter, P. Xu, R. Yu, C. De Sa, and C. Ré. Socratic learning: Augmenting generative models to incorporate latent subsets in training data. arXiv preprint arXiv:1610.08123, 2017. [38] W. Xia, C. Domokos, J. Dong, L.-F. Cheong, and S. Yan. Semantic segmentation without annotating segments. In Proceedings of the IEEE International Conference on Computer Vision, pages 2176–2183, 2013. [39] D. Yi, M. Zhou, Z. Chen, and O. Gevaert. 3-d convolutional neural networks for glioblastoma segmentation. arXiv preprint arXiv:1611.04534, 2016. [40] Y. Zhang, X. Chen, D. Zhou, and M. I. Jordan. Spectral methods meet em: A provably optimal algorithm for crowdsourcing. Journal of Machine Learning Research, 17(102):1–44, 2016. [41] P. Zhao and B. Yu. On model selection consistency of lasso. Journal of Machine learning research, 7(Nov): 2541–2563, 2006. 11 | 2017 | 537 |
7,049 | Influence Maximization with ε-Almost Submodular Threshold Functions Qiang Li∗†, Wei Chen‡, Xiaoming Sun∗†, Jialin Zhang∗† ∗CAS Key Lab of Network Data Science and Technology, Institute of Computing Technology, Chinese Academy of Sciences †University of Chinese Academy of Sciences ‡Microsoft Research {liqiang01,sunxiaoming,zhangjialin}@ict.ac.cn weic@microsoft.com Abstract Influence maximization is the problem of selecting k nodes in a social network to maximize their influence spread. The problem has been extensively studied but most works focus on the submodular influence diffusion models. In this paper, motivated by empirical evidences, we explore influence maximization in the nonsubmodular regime. In particular, we study the general threshold model in which a fraction of nodes have non-submodular threshold functions, but their threshold functions are closely upper- and lower-bounded by some submodular functions (we call them ε-almost submodular). We first show a strong hardness result: there is no 1/nγ/c approximation for influence maximization (unless P = NP) for all networks with up to nγ ε-almost submodular nodes, where γ is in (0,1) and c is a parameter depending on ε. This indicates that influence maximization is still hard to approximate even though threshold functions are close to submodular. We then provide (1 −ε)ℓ(1 −1/e) approximation algorithms when the number of ε-almost submodular nodes is ℓ. Finally, we conduct experiments on a number of real-world datasets, and the results demonstrate that our approximation algorithms outperform other baseline algorithms. 1 Introduction Influence maximization, proposed by Kempe, Kleinberg, and Tardos [1], considers the problem of selecting k seed nodes in a social network that maximizes the spread of influence under predefined diffusion model. This problem has many applications including viral marketing [2, 3], media advertising [4] and rumors spreading [5] etc., and many aspects of the problem has been extensively studied. Most existing algorithms for influence maximization, typically under the independent cascade (IC) model and the linear threshold (LT) model [1], utilize the submodularity of the influence spread as a set function on the set of seed nodes, because it permits a (1 −1/e)-approximation solution by the greedy scheme [1, 6, 7], following the foundational work on submodular function maximization [8]. One important result concerning submodularity in the influence model is by Mossel and Roch [9], who prove that in the general threshold model, the global influence spread function is submodular when all local threshold functions at all nodes are submodular. This result implies that “local" submodularity ensures the submodularity of “global" influence spread. Although influence maximization under submodular diffusion models is dominant in the research literature, in real networks, non-submodularity of influence spread function has been observed. Backstrom et al. [10] study the communities of two networks LiveJournal and DBLP and draw 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. pictures of the impulse that a person joins a community against the number of his friends already in this community. The curve is concave overall, except that a drop is observed in first two nodes. Yang et al. [11] track emotion contagion under Flickr and find that the probability that an individual becomes happy is superlinear to the number of his happy friends with higher PageRank scores. These are all instances of non-submodular influence spread functions. Influence maximization under many non-submodular diffusion models are proved to be hard to approximate. For example, in the diffusions of rumors, innovations, or riot behaviors, the individual in a social network is activated only when the number of her neighbors already adopting the behavior exceeds her threshold. It has been shown that the influence maximization problem based on this fixed threshold model cannot be approximated within a ratio of n1−ε for any ε > 0 [1]. Meanwhile Chen [12] proves that the seed minimization problem, to activate the whole network with minimum size of seed set, is also inapproximable, in particular, within a ratio of O(2log1−ε n). In this paper we give the first attempt on the influence maximization under the non-submodular diffusion models. We study the general threshold model in which a fraction of nodes have nonsubmodular threshold functions, but their threshold functions are closely upper- and lower-bounded by some submodular functions (we call them ε-almost submodular). Such a model bears conceptual similarity to the empirical finding in [10, 11]: both studies show that the influence curve is only slightly non-concave, and Yang et al. [11] further shows that different roles have different curves — some are submodular while others are not, and ordinary users usually have behaviors close to submodular while opinion leaders may not. We first show a strong hardness result: there is no 1/n γ c approximation for influence maximization (unless P = NP) for all networks with up to nγ ε-almost submodular nodes, where γ is in (0, 1) and c is a parameter depending on ε. On the other hand, we propose constant approximation algorithms for networks where the number of ε-almost submodular nodes is a small constant. The positive results imply that non-submodular problem can be partly solved as long as there are only a few non-submodular nodes and the threshold function is not far away from submodularity. Finally, we conduct experiments on real datasets to empirically verify our algorithms. Empirical results on real datasets show that our approximation algorithms outperform other baseline algorithms. Related Work. Influence maximization has been well studied over the past years [13, 6, 7, 14, 15]. In particular, Leskovec et al. [6] propose a lazy-forward optimization that avoids unnecessary computation of expected size. Chen et al. [7, 14] propose scalable heuristic algorithms that handle network of million edges. Based on the technique of Reverse Reachable Set, Borgs et al. [16] reduce the running time of greedy algorithms to near-linear under the IC model [1]. Tang et al. [17] implement the near-linear algorithm and process Twitter network with million edges. Subsequently, Tang et al. [18] and Nguyen et al. [19] further improve the efficiency of algorithms. These works all utilize the submodularity to accelerate approximation algorithms. Seed minimization, as the dual problem of influence maximization, is to find a small seed set such that expected influence coverage exceeds a desired threshold. Chen [12] provide some strong negative results on seed minimization problem under fixed threshold model, which is a special case of general threshold model where its threshold function has breaking points. Goyal et al. [20] propose a greedy algorithm with a bicriteria approximation. Recently, Zhang et al. [21] study the probabilistic variant of seed minimization problem. Due to the limitation of independent cascade and linear threshold model, general threshold model has been proposed [1, 9]. Not much is known about the general threshold model, other than it is NP-hard to approximate [1]. One special case which receives many attention is k-complex contagion where a node becomes active if at least k of its neighbours have been activated [22, 23, 24]. Gao et al. [25] make one step further of k-complex contagion model by considering the threshold comes from a probability distribution. Optimization of non-submodular function is another interesting direction. Du et al. [26] introduce two techniques — restricted submodularity and shifted submodularity — to analyze greedy approximation of non-submodular functions. Recently, Horel et al.[27] study the problem of maximizing a set function that is very close to submodular. They assume that function values can be obtained from an oracle and focused on its query complexity. In our study, the local threshold functions are close to submodular and our target is to study its effect on the global influence spread function, which is the result of complex cascading behavior derived from the local threshold functions. 2 2 Preliminaries For a set function f : 2V →R, we say that it is monotone if f(S) ≤f(T) for all S ⊆T ⊆V ; we say that it is submodular if f(S ∪{v}) −f(S) ≥f(T ∪{v}) −f(T), for all S ⊆T ⊆V and v ∈V \ T. For a directed graph G = (V, E), we use N in(v) to denote the in-neighbors of v in G. We now formally define the general threshold model used in the paper. Definition 1 (General Threshold Model [1]). In the general threshold model, for a social graph G = (V, E), every node v ∈V has a threshold function fv : 2N in(v) →[0, 1]. The function fv(·) should be monotone and fv(∅) = 0. Initially at time 0, each node v ∈V is in the inactive state and chooses θv uniformly at random from the interval [0, 1]. A seed set S0 is also selected, and their states are set to be active. Afterwards, the influence propagates in discrete time steps. At time step t ≥1, node v becomes active if fv(St−1 ∩N in(v)) ≥θv, where St−1 is the set of active nodes by time step t −1. The process ends when no new node becomes active in a step. General threshold model is one of the most important models in the influence maximization problem. Usually we focus on two properties of threshold function – submodularity and supermodularity. Submodularity can be understood as diminishing marginal returns when adding more nodes to the seed set. In contrast, supermodularity means increasing marginal returns. Given a seed set S, let σ(S) denote the expected number of activated nodes after the process of influence propagation terminates, and we call σ(S) the influence spread of S. Submodularity is the key property that guarantees the performance of greedy algorithms [9]. In this paper, we would like to study the influence maximization with nearly submodular threshold function — ε-almost submodular function, or in short ε-AS. Definition 2 (ε-Almost Submodular (ε-AS)). A set function f : 2V →R is ε-almost submodular if there exists a submodular function f sub defined on 2V and for any subset S ⊆V , f sub(S) ≥ f(S) ≥(1 −ε)f sub(S). Here ε is a small positive number. The definition of ε-almost submodular here is equivalent to "Approximate submodularity" defined in [27]. For an ε-almost submodular threshold function fv, define its upper and lower submodular bound as f v and f v. Hence by definition, we have f v = (1 −ε)f v. Given the definition of ε-almost submodular function, we then model the almost submodular graph. In this paper, we consider the influence maximization problem based on this kind of graphs. Definition 3 ((γ, ε)-Almost Submodular Graph). Given fixed parameters γ, ε ∈[0, 1], we say that a graph with n (n = |V |) nodes is a (γ, ε)-Almost Submodular Graph (under the general threshold model), if there are at most nγ nodes in the graph with ε-almost submodular threshold functions while other nodes have submodular threshold functions. Definition 4 (ε-ASIM). Given a graph containing ε-almost submodular nodes and an input k, Influence Maximization problem on graph with ε-Almost Submodular nodes (ε-ASIM) is the problem to find k seed nodes such that the influence spread invoked by the k nodes is maximized. 3 Inapproximability of ε-ASIM In this section we show that it is in general hard to approximate the influence maximization problem even if there are only sublinear number of nodes with ε-almost submodular threshold functions. The main reason is that even a small number of nodes with ε-almost submodular threshold functions fv(·) would cause the global influence spread function far from submodularity, making the maximization problem very difficult. The theorem below shows our hardness result. Theorem 1. For any small ε > 0 and any γ ∈(0, 1), there is no 1/n γ c -approximation influence maximization algorithm for all (γ, ε)-almost submodular graphs where c = 3 + 3/ log 2 2−ε, unless P=NP. We first construct a probabilistic-AND gate gadget by amplifying the non-submodularity through a binary tree. Then we prove the lower bound of approximation ratio by the reduction from set cover problem. Due to page limits, we only sketch the main technique. The proof of Theorem 1 is given in Appendix ??. 3 Here we construct a basic gadget with input s1, s2 and output t (see Figure 1a). We assume that node t has two in-neighbours s1, s2 and the threshold function g(·) of t is ε-almost submodular: g(S) = |S|/2, when |S| = 0 or 2; 1−ε 2 , when |S| = 1. t s1 s2 (a) Basic gadget d s1 s2 t ... ... ... ... ... ... ... ... (b) Tree gadget Tε Figure 1: Diagrams of gadegts Let Pa(v) be the activation probability of node v in this case. This simple gadget is obviously far away from the AND gate, and our next step is to construct a more complex gadget with input node s1, s2. We hope that the output node t is active only when both s1, s2 are active, and if only one of s1 and s2 is active, the probability that node t becomes active is close to 0. We call it a probabilistic-AND gate. The main idea is to amplify the gap between submodularity and non-submodularity by binary tree (figure 1b). In this gadget Tε with a complete binary tree, node t is the root of a full binary tree and each node holds a directed edge to its parent. For each leaf node v in the tree, both s1, s2 hold the directed edges towards it. The threshold function for each node in the tree is g(·) defined above while ε is the index of gadget Tε. The depth of the tree is parameter d which will be determined later. We use vi to denote a node of depth i (t is in depth 1). It is obviously that Pa(t) = 1 if both s1, s2 are activated, and Pa(t) = 0 if neither s1 or s2 is activated. Thus, we would like to prove, in case when only one of s1, s2 is activated, the activation probability becomes smaller for inner nodes in the tree. Lemma 2. For gadget Tε with depth d, the probability of activating output node t is less than ( 2−ε 2 )d when only one of s1, s2 is activated. Proof. In this case, for leaf node vd, we have Pa(vd) = 1−ε 2 . Apparently, the probability of becoming activated for nodes with depth d are independent with each other. Given a basic gadget, if each of the two children nodes is activated with an independent probability p, then the parent node will be activated with probability p2 × g(2) + 2p(1 −p) × g(1) + (1 −p)2 × g(0) = p2 + 2p(1 −p)1 −ε 2 = p(1 −ε(1 −p)). So we have Pa(vi) ≤Pa(vi+1)(1 −ε(1 −Pa(vi+1))). Since Pa(vd) = 1−ε 2 < 1/2, and Pa(vi) ≤ Pa(vi+1) from above, we have pa(vi) < 1/2 for all i, and thus we can rewrite the recurrence as Pa(vi) ≤Pa(vi+1)(1 −ε/2). Hence for the gadget with depth d, the probability that node t becomes activated is Pa(t) = Pa(v1) ≤1−ε 2 ( 2−ε 2 )d−1 < ( 2−ε 2 )d. Lemma 2 shows that gadget Tε is indeed a probabilistic-AND gate with two input nodes, and the probability that t is activated when only one of s1 and s2 is activated approaches 0 exponentially fast with the depth d. We say a gadget Tε works well if output node t stay inactive when only one of the input nodes is activated. By the similar method we construct multi-input-AND gates based on 2-input-AND gates. Finally, we show that if the influence maximization problem can be approximated beyond the ratio shown above, we can solve the set cover problem in polynomial time. The main idea is as follows. For any set cover instance, we will put all elements to be the input of our multi-input-probabilistic-AND gate, and connect the output with a large number of additional nodes. Thus, if k sets can cover all elements, all of those addition nodes will be activated, on contrast, if at least one of the elements cannot be covered, almost all of the additional nodes will remain inactive. 4 4 Approximation Algorithms In the previous section, we show that influence maximization is hard to approximate when the number of ε-almost submodular nodes is sublinear but still a non-constant number. In this section, we discuss the situation where only small number of nodes hold ε-almost submodular threshold functions. We firstly provide a greedy algorithm for small number of non-submodular nodes which may not be ε-almost submodular, then, we restrict to the case of ε-almost submodular nodes. 4.1 Approximation Algorithm with Small Number of Non-submodular Nodes In the case of ℓ(ℓ< k) non-submodular nodes, we provide an approximate algorithm as follows. We first add these non-submodular nodes into the seed set, and then generate the rest of the seed set by the classical greedy algorithm. The proof of Theorem 3 can be found in Appendix ??. Theorem 3. Given a graph of n nodes where all nodes have submodular threshold functions except ℓ< k nodes, for influence maximization of k seeds with greedy scheme we can obtain a (1 −e−k−ℓ k )approximation ratio. 4.2 Approximation Algorithm of ε-ASIM In this section, we consider the case when all non-submodular nodes have ε-almost submodular threshold functions, and provide an approximation algorithm that allows more than k ε-almost submodular nodes, with the approximation ratio close to 1 −1/e when ε is small. The main idea is based on the mapping between probability spaces. Given a graph containing nodes with ε-almost submodular threshold functions, we simply set each node’s threshold function to its submodular lower bound and then run classical greedy algorithm A on this graph (Algorithm 1). Algorithm 1 takes the lower bounds of ε-almost submodular threshold functions as input parameters. The following theorem analyzes the performance of Algorithm 1. Algorithm 1 Galg-L algorithm for Influence Maximization Input: G = (V, E), A, {fv}, {f v}, k Output: Seed set S 1: set S = ∅ 2: replace each nodes v’s threshold function fv with f v 3: run algorithm A on G with {f v} and obtain S 4: return S Theorem 4. Given a graph G = (V, E), under the general threshold model, assuming that ℓnodes have ε-almost submodular threshold functions and the other nodes have submodular threshold functions. Then the greedy algorithm Galg-L has approximation ratio of (1 −1 e)(1 −ε)ℓ. Proof. Let Ve be the set of nodes with ε-almost submodular threshold functions. Without loss of generality, we assume Ve = {v1, v2, . . . , vℓ}. Now consider two general threshold models M, M with different threshold functions. Both models hold threshold functions {fv} for v ∈V −Ve. For node v in Ve, M, M hold {f v} and {f v} respectively. In any threshold model, after we sample each node’s threshold θv, the diffusion process becomes deterministic. A graph with threshold functions {fv} and sampled thresholds {θv} is called a possible world of the threshold model, which is similar to the live-edge graph in the independent cascade model. An instance of threshold model’s possible world can be written as {θv1, θv2, . . . , θvn; fv1, fv2, . . . , fvn}. Here we build a one-to-one mapping from all M’s possible worlds with θv ≤1 −ε (v ∈Ve) to all M’s possible worlds: {θv1, . . . , θvn; fv1, . . . , fvn} ↔{ θv1 1 −ε, . . . , θvℓ 1 −ε, θvℓ+1 . . . , θvn; fv1 1 −ε, . . . , fvℓ 1 −ε, fvℓ+1, . . . , fvn}. The above corresponding relation shows this one-to-one mapping between M and M. For any instance of M’s possible world with θv ≤1 −ε (v ∈Ve), we amplify the threshold of node v in Ve to θv 1−ε. At the same time, we amplify the corresponding threshold function by a factor of 1 1−ε. 5 Obviously, this amplification process will not effect the influence process under this possible world, because for each v ∈Ve, both its threshold value and the its threshold function are amplified by the same factor 1/(1 −ε). Furthermore, the amplified possible world is an instance of M. Expected influence can be computed by σ(S) = R ⃗θ∈[0,1]n D(⃗θ; ⃗f, S)d⃗θ, where D(⃗θ; ⃗f, S) is the deterministic influence size of seed set S under possible world {⃗θ; ⃗f}. We refer M, M’s expected influence size functions as σ, σ. We define ⃗θ ∈[0, 1]n as the vector of n nodes threshold, and ⃗θe ∈[0, 1]ℓ, ⃗θ′ ∈[0, 1]n−ℓare the threshold vectors of Ve and V −Ve. Besides, the threshold functions of Ve and V −Ve will be represented as ⃗fe, ⃗f ′. A possible world is symbolized as {⃗θe, ⃗θ′; ⃗fe, ⃗f ′}. For any seed set S, we have σ(S) = R ⃗θ∈[0,1]n D(⃗θ; ⃗f, S)d⃗θ ≥ R ⃗θe∈[0,1−ε]ℓ R ⃗θ′∈[0,1]n−ℓD((⃗θe, ⃗θ′); ⃗f, S)d⃗θed⃗θ′ = (1 −ε)ℓR ⃗θe 1−ε ∈[0,1]ℓ R ⃗θ′∈[0,1]n−ℓD((⃗θe, ⃗θ′); ⃗f, S)d ⃗θe 1−ε d⃗θ′ = (1 −ε)ℓR ⃗θe 1−ε ∈[0,1]ℓ R ⃗θ′∈[0,1]n−ℓD(( ⃗θe 1−ε, ⃗θ′); ( ⃗fe 1−ε, ⃗f ′), S)d ⃗θe 1−ε d⃗θ′ = (1 −ε)ℓR ⃗θ∈[0,1]n D(⃗θ; ( ⃗fe 1−ε, ⃗f ′), S)d⃗θ = (1 −ε)ℓσ(S). The third equality utilizes our one-to-one mapping, in particular D((⃗θe, ⃗θ′); ⃗f, S) = D(( ⃗θe 1−ε, ⃗θ′); ( ⃗fe 1−ε, ⃗f ′), S) for ⃗θe 1−ε ∈[0, 1]ℓ, because they follow the same deterministic propagation process. Hence given a seed set S, the respective influence sizes in model M, M satisfy the relation σ(S) ≥(1 −ε)ℓσ(S). Let σ be the expected influence size function of the original model, and assume that the optimal solution for σ, σ, σ are S ∗, S∗, S∗respectly. Apparently, σ(S ∗) ≥σ(S∗) since for every node v, f v ≥fv. According to the previous analysis, we have σ(S∗) ≥σ(S ∗) ≥(1 −ε)ℓσ(S ∗). Hence for output SA of the greedy algorithm for optimizing σ, we have approximation ratio σ(SA) ≥σ(SA) ≥(1 −1 e)σ(S∗) ≥(1 −1 e)(1 −ε)ℓσ(S ∗) ≥(1 −1 e)(1 −ε)ℓσ(S∗). The theorem holds. If we replace threshold functions by their upper bound and run the greedy algorithm, we obtain Galg-U. With similar analysis, Galg-U also holds approximation ratio of (1 −1 e)(1 −ε)ℓon graphs with ℓε-almost submodular nodes. The novel technique used to prove approximation ratio is similar to the sandwich approximation in [28]. But their approximation ratio relies on instance-dependent influence sizes, while we utilize mapping of probabilistic space to provide instance-independent approximation ratio. 5 Experiments In addition to the theoretical analysis, we are curious about the performance of greedy algorithms Galg-U, Galg-L on real networks with non-submodular nodes. Our experiments run on a machine with two 2.4GHz Intel(R) Xeon(R) E5-2620 CPUs, 4 processors (24 cores), 128GB memory and 64bit Ubuntu 14.04.1. All algorithms tested in this paper are written in C++ and compiled with g++ 4.8.4. Some algorithms are implemented with multi-thread to decrease the running time. 5.1 Experiment setup Datasets. We conduct experiments on three real networks. The first network is NetHEPT, an academic collaboration network extracted from "High Energy Physics - Theory" section of arXiv (http://www.arXiv.org) used by many works [7, 14, 15, 19, 20]. NetHEPT is an undirected network with 15233 nodes and 31376 edges, each node represents an author and each edge represents that two authors collaborated on a paper. The second one is Flixster, an American movie rating social site. Each node represents a user, and directed edge (u, v) means v rated the same movie shortly after u 6 did. We select topic 3 with 29357 nodes and 174939 directed edges here. The last one is the DBLP dataset, which is a larger collaboration network mined from the computer science bibliography site DBLP with 654628 nodes and 1990259 undirected edges [14]. We process its edges in the same way as the NetHEPT dataset. Propagation Models. We adapt general threshold model in this paper. Our Galg-U,Galg-L are designed on submodular upper and lower bounds, respectively. Since directly applying greedy scheme on graphs with submodular threshold function is time-consuming, we assign the submodular threshold function and submodular upper bound of ε-AS function as linear function here: fv(S) = |S|/d(v), where d(v) is the in-degree of v. This makes the corresponding model an instance of the linearthreshold model, and thus the greedy algorithm can be accelerated with Reverse Reachable Set (RRset) technique [17]. We construct two different ε-almost submodular threshold functions in this paper: (1) a power function |S| d(v) β with β satisfying 1 d(v) β = 1 d(v)(1 −ε); (2) fv(S) = |S| d(v)(1 −ε) for |S| ≤2 and |S|/d(v) otherwise. The former ε-almost submodular function is a supermodular function. The supermodular phenomenon has been observed in Flickr [11]. The second ε-almost submodular function is just dropping down the original threshold function for the first several nodes, which is consistent with the phenomenon observed in LiveJournal [10]. We call them ε-AS-1 and ε-AS-2 functions respectively. Algorithms. We test our approximation Algorithm 1 and other baseline algorithms on the graphs with ε-almost submodular nodes. • TIM-U, TIM-L: Tang et al. [17] proposed a greedy algorithm TIM+ accelerated with Reverse Reachable Set (RRset). The running time of TIM+ is O(k(m + n) log n) on graphs with n nodes and m edges. RRset can be sampled in live-edge graph of IC model, and with some extension we can sample RRset under Triggering model [1]. LT model also belongs to Triggering model, but General Threshold model with non-submodular threshold functions does not fall into the category of Triggering model. Thus TIM+ can not be directly applied on original graphs with non-submodular nodes. In our experiments, we choose ε-AS-1 and ε-AS-2 thresholds to ensure that TIM+ can run with their upper or lower bound. We then run Algorithm 1 with TIM+ as input. Algorithm Galg-L based on TIM+ can be written in short as TIM-L. By using the upper bound we obtain TIM-U. • Greedy: We can still apply the naive greedy scheme on graph with ε-almost submodular nodes and generate results without theoretical guarantee. The naive greedy algorithm is time consuming, with running time is O(k(m + n)n). • High-degree: High-degree outputs seed set according to the decreasing order of the out-degree. • PageRank: PageRank is widely used to discover nodes with high influence. The insight of PageRank is that important nodes point to important nodes. In this paper, The transition probability on edge e = (u, v) is 1/d(u). We set restart probability as 0.15 and use the power method to compute the PageRank values. Finally PageRank outputs nodes with top PageRank values. • Random: Random simply selects seeds randomly from node set. Experiment methods. The datasets provide the structure of network, and we first assume each node holds linear threshold function as described above. In each experiment, we randomly sample some nodes with in-degree greater than 2, and assign those nodes with our ε-almost submodular functions, ε-AS-1 or ε-AS-2. Since the naive greedy algorithm is quite time-consuming, we just run it on NetHEPT. 5.2 Experiment results Results on NetHEPT. Our first set of experiments focuses on the NetHEPT dataset with the aim of comparing TIM-U, TIM-L and Greedy. TIM-U, TIM-L have theoretical guarantee, but the approximation ratio is low when the graph contains a considerable number of ε-AS nodes. Figure 2 shows the influence size of each method, varying from 1 to 100 seeds. Figure 2a and 2b are results conducted on constructed graph with ε-AS-1 nodes. Observe that TIM-U, TIM-L slightly outperform Greedy in all cases. Compared with results of 3000 ε-AS nodes, influence of output seeds drops obviously in graph with 10000 ε-AS nodes. But the ratio that TIM-U, TIM-L exceed PageRank 7 (a) 3000 ε-AS-1 nodes (b) 10000 ε-AS-1 nodes (c) 3000 ε-AS-2 nodes (d) 10000 ε-AS-2 nodes Figure 2: Results of IM on NetHEPT with ε = 0.2 increases with rising fraction of ε-AS nodes. In particular, ε-AS-1 is indeed supermodular, TIM-U, TIM-L beats Greedy even when many nodes have supermodular threshold functions. We remark that TIM-U, TIM-L and Greedy outperform other baseline algorithms significantly. When k = 100, TIM-U is 6.1% better compared with PageRank and 27.2% better compared with Highdegree. When conducted with ε-AS-2 function, Figure 2c and 2d report that TIM-U, TIM-L and Greedy still perform extremely well. Influence size conducted on graphs with ε-AS-2 function is better than those with ε-AS-1 function. This is what we expect: supermodular function is harder to handle among the class of ε-almost submodular functions. Another thing to notice is that TIM-U, TIM-L can output seeds on NetHEPT within seconds, while it takes weeks to run the naive greedy algorithm. With RRsets technique, TIM+ dramatically reduces the running time. The ε-almost submodular functions selected here ensure that TIM+ can be invoked. Since TIM-U, TIM-L match the performance of Greedy while TIM-U, TIM-L are scalable, we do not run Greedy in the following larger datasets. Results on Flixster. Figure 3 shows the results of experiments conducted on Flixster with (a) 3000 ε-AS-1 nodes (b) 10000 ε-AS-1 nodes (c) 3000 ε-AS-2 nodes (d) 10000 ε-AS-2 nodes Figure 3: Results of IM on Flixster with ε = 0.2 ε = 0.2. We further evaluate algorithms by Flixster with ε = 0.4 (see Figure 4). Observe that TIM-U, TIM-L outperform other heuristic algorithms in all cases. Compared with PageRank, 30%, 46.3%, 26%, 29.7% improvement are observed in the four experiments in Figure 3. TIM-U performs closely to TIM-L consistently. The improvement is larger than that in NetHEPT. The extra improvement might due to more complex network structure. The average degree is 5.95 in Flixster, compared to 2.05 in NetHEPT. In dense network, nodes may be activated by multiple influence chains, which makes influence propagates further from seeds. Baseline algorithms only pay attention to the structure of the network, hence they are defeated by TIM-U, TIM-L that focus on influence spread. The more ε-AS nodes in network, the more improvement is obtained. When we set ε as 0.4, Figure 4 shows that TIM-U is 37.6%, 74.2%, 28%, 35.6% better than PageRank respectively. Notice that the gap between the performances of TIM-U and PageRank increases as ε increases. In Flixster dataset, we observe that TIM-U,TIM-L hold greater advantage in case of larger number of ε-AS nodes and larger ε. Results on DBLP. For DBLP dataset, the results are shown in Figure 5. TIM-U and TIM-L are still the best algorithms according to performance. But PageRank and High-degree also performs well, just about 2.6% behind TIM-U and TIM-L. DBLP network has many nodes with large degree, which correspond to those active scientists. Once such active authors are activated, the influence will increase significantly. This may partly explain why TIM-U,TIM-L perform similarly to PageRank. 8 (a) 3000 ε-AS-1 nodes (b) 10000 ε-AS-1 nodes (c) 3000 ε-AS-2 nodes (d) 10000 ε-AS-2 nodes Figure 4: Results of IM on Flixster with ε = 0.4 (a) 10000 ε-AS-1 nodes (b) 100000 ε-AS-1 nodes (c) 10000 ε-AS-2 nodes (d) 100000 ε-AS-2 nodes Figure 5: Results of IM on DBLP with ε = 0.2 6 Conclusion and Future Work In this paper, we study the influence maximization problem on propagation models with nonsubmodular threshold functions, which are different from most of existing studies where the threshold functions and the influence spread function are both submodular. We investigate the problem by studying a special case — the ε-almost submodular threshold function. We first show that influence maximization problem is still hard to approximate even when the number of ε-almost submodular nodes is sub-linear. Next we provide a greedy algorithm based on submodular lower bounds of threshold function to handle the graph with small number of ε-almost submodular nodes and show its theoretical guarantee. We further conduct experiments on real networks and compare our algorithms with other baselines to evaluate our algorithms in practice. Experimental results show that our algorithms not only have good theoretical guarantees on graph with small number of ε-almost submodular nodes, they also perform well on graph with a fairly large fraction of ε-almost submodular nodes. Our study mainly focuses on handling ε-almost submodular threshold functions. One future direction is to investigate models with arbitrary non-submodular threshold functions. Another issue is that the greedy algorithms we propose are slow when the submodular upper bound or lower bound of threshold function do not correspond to the Triggering model. It remains open whether we could utilize RRset or other techniques to accelerate our algorithms under this circumstance. How to accelerate the naive greedy process with arbitrary submodular threshold functions is another interesting direction. Acknowledgments This work was supported in part by the National Natural Science Foundation of China Grant 61433014, 61502449, 61602440, the 973 Program of China Grants No. 2016YFB1000201. 9 References [1] David Kempe, Jon Kleinberg, and Éva Tardos. Maximizing the spread of influence through a social network. In Proceedings of the ninth ACM SIGKDD, pages 137–146. ACM, 2003. [2] Mani Subramani and Balaji Rajagopalan. Knowledge-sharing and influence in online social networks via viral marketing. Communications of The ACM, 46(12):300–307, 2003. [3] Wei Chen, Fu Li, Tian Lin, and Aviad Rubinstein. Combining traditional marketing and viral marketing with amphibious influence maximization. In ACM Conference on Economics and Computation, 2015. [4] Cigdem Aslay, Wei Lu, Francesco Bonchi, Amit Goyal, and Laks V S Lakshmanan. Viral marketing meets social advertising: ad allocation with minimum regret. In Proceedings of The VLDB Endowment, pages 814–825, 2015. [5] Biao Wang, Ge Chen, Luoyi Fu, Li Song, Xinbing Wang, and Xue Liu. Drimux: Dynamic rumor influence minimization with user experience in social networks. In AAAI’16, pages 791–797, 2016. [6] Jure Leskovec, Andreas Krause, Carlos Guestrin, Christos Faloutsos, Jeanne M Vanbriesen, and Natalie Glance. Cost-effective outbreak detection in networks. In ACM Knowledge Discovery and Data Mining, pages 420–429, 2007. [7] Wei Chen, Yajun Wang, and Siyu Yang. Efficient influence maximization in social networks. In Proceedings of the 15th ACM SIGKDD. ACM, 2009. [8] G. Nemhauser, L. Wolsey, and M. Fisher. An analysis of the approximations for maximizing submodular set functions. Mathematical Programming, 14:265–294, 1978. [9] Elchanan Mossel and Sebastien Roch. On the submodularity of influence in social networks. In STOC’07, pages 128–134, 2007. [10] Lars Backstrom, Dan Huttenlocher, Jon Kleinberg, and Xiangyang Lan. Group formation in large social networks: membership, growth, and evolution. In KDD’06, pages 44–54. ACM, 2006. [11] Yang Yang, Jia Jia, Boya Wu, and Jie Tang. Social role-aware emotion contagion in image social networks. In AAAI, pages 65–71, 2016. [12] Ning Chen. On the approximability of influence in social networks. In SODA’08, 2008. [13] Shishir Bharathi, David Kempe, and Mahyar Salek. Competitive influence maximization in social networks. In International Workshop on Web and Internet Economics, pages 306–311. Springer, 2007. [14] Wei Chen, Chi Wang, and Yajun Wang. Scalable influence maximization for prevalent viral marketing in large-scale social networks. In KDD’10, 2010. [15] Amit Goyal, Wei Lu, and Laks V. S. Lakshmanan. SIMPATH: An Efficient Algorithm for Influence Maximization under the Linear Threshold Model. In ICDM’11, pages 211–220, 2011. [16] Christian Borgs, Michael Brautbar, Jennifer Chayes, and Brendan Lucier. Maximizing social influence in nearly optimal time. In SODA’14, pages 946–957. ACM-SIAM, 2014. [17] Youze Tang, Xiaokui Xiao, and Yanchen Shi. Influence maximization: near-optimal time complexity meets practical efficiency. In SIGMOD’14, 2014. [18] Youze Tang, Yanchen Shi, and Xiaokui Xiao. Influence maximization in near-linear time: A martingale approach. In SIGMOD’15, pages 1539–1554. ACM, 2015. [19] H. T. Nguyen, M. T. Thai, and T. N. Dinh. Stop-and-stare: Optimal sampling algorithms for viral marketing in billion-scale networks. In SIGMOD’16, pages 695–710. ACM, 2016. 10 [20] Amit Goyal, Francesco Bonchi, Laks VS Lakshmanan, and Suresh Venkatasubramanian. On minimizing budget and time in influence propagation over social networks. Social Network Analysis and Mining, pages 1–14, 2012. [21] Peng Zhang, Wei Chen, Xiaoming Sun, Yajun Wang, and Jialin Zhang. Minimizing seed set selection with probabilistic coverage guarantee in a social network. In KDD’14, pages 1306–1315, 2014. [22] Golnaz Ghasemiesfeh, Roozbeh Ebrahimi, and Jie Gao. Complex contagion and the weakness of long ties in social networks: revisited. In ACM Conference on Electronic Commerce, 2013. [23] Roozbeh Ebrahimi, Jie Gao, Golnaz Ghasemiesfeh, and Grant Schoenebeck. Complex contagions in kleinberg’s small world model. In ITCS’15, 2015. [24] Wei Chen, Qiang Li, Xiaoming Sun, and Jialin Zhang. The routing of complex contagion in kleinberg’s small-world networks. In International Computing and Combinatorics Conference, pages 307–318, 2016. [25] Jie Gao, Golnaz Ghasemiesfeh, Grant Schoenebeck, and Fang-Yi Yu. General threshold model for social cascades: Analysis and simulations. In ACM Conference on Economics and Computation, 2016. [26] Ding-Zhu Du, Ronald L Graham, Panos M Pardalos, Peng-Jun Wan, Weili Wu, and Wenbo Zhao. Analysis of greedy approximations with nonsubmodular potential functions. In SODA’08, pages 167–175, 2008. [27] Thibaut Horel and Yaron Singer. Maximization of approximately submodular functions. In NIPS’16, pages 3045–3053, 2016. [28] Wei Lu, Wei Chen, and Laks VS Lakshmanan. From competition to complementarity: comparative influence diffusion and maximization. Proceedings of the VLDB Endowment, 9(2):60–71, 2015. 11 | 2017 | 538 |
7,050 | Improved Dynamic Regret for Non-degenerate Functions Lijun Zhang∗, Tianbao Yang†, Jinfeng Yi‡, Rong Jin§, Zhi-Hua Zhou∗ ∗National Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China †Department of Computer Science, The University of Iowa, Iowa City, USA ‡AI Foundations Lab, IBM Thomas J. Watson Research Center, Yorktown Heights, NY, USA §Alibaba Group, Seattle, USA zhanglj@lamda.nju.edu.cn, tianbao-yang@uiowa.edu, jinfengyi@tencent.com jinrong.jr@alibaba-inc.com, zhouzh@lamda.nju.edu.cn Abstract Recently, there has been a growing research interest in the analysis of dynamic regret, which measures the performance of an online learner against a sequence of local minimizers. By exploiting the strong convexity, previous studies have shown that the dynamic regret can be upper bounded by the path-length of the comparator sequence. In this paper, we illustrate that the dynamic regret can be further improved by allowing the learner to query the gradient of the function multiple times, and meanwhile the strong convexity can be weakened to other non-degenerate conditions. Specifically, we introduce the squared path-length, which could be much smaller than the path-length, as a new regularity of the comparator sequence. When multiple gradients are accessible to the learner, we first demonstrate that the dynamic regret of strongly convex functions can be upper bounded by the minimum of the path-length and the squared path-length. We then extend our theoretical guarantee to functions that are semi-strongly convex or selfconcordant. To the best of our knowledge, this is the first time that semi-strong convexity and self-concordance are utilized to tighten the dynamic regret. 1 Introduction Online convex optimization is a fundamental tool for solving a wide variety of machine learning problems [Shalev-Shwartz, 2011]. It can be formulated as a repeated game between a learner and an adversary. On the t-th round of the game, the learner selects a point xt from a convex set X and the adversary chooses a convex function ft : X 7→R. Then, the function is revealed to the learner, who incurs loss ft(xt). The standard performance measure is the regret, defined as the difference between the learner’s cumulative loss and the cumulative loss of the optimal fixed vector in hindsight: T X t=1 ft(xt) −min x∈X T X t=1 ft(x). (1) Over the past decades, various online algorithms, such as the online gradient descent [Zinkevich, 2003], have been proposed to yield sub-linear regret under different scenarios [Hazan et al., 2007, Shalev-Shwartz et al., 2007]. Though equipped with rich theories, the notion of regret fails to illustrate the performance of online algorithms in dynamic setting, as a static comparator is used in (1). To overcome this limitation, there has been a recent surge of interest in analyzing a more stringent metric—dynamic regret [Hall and Willett, 2013, Besbes et al., 2015, Jadbabaie et al., 2015, Mokhtari et al., 2016, Yang et al., 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 2016], in which the cumulative loss of the learner is compared against a sequence of local minimizers, i.e., R∗ T :=R(x∗ 1, . . . , x∗ T ) = T X t=1 ft(xt) − T X t=1 ft(x∗ t ) = T X t=1 ft(xt) − T X t=1 min x∈X ft(x) (2) where x∗ t ∈argminx∈X ft(x). A more general definition of dynamic regret is to evaluate the difference of the cumulative loss with respect to any sequence of comparators u1, . . . , uT ∈X [Zinkevich, 2003]. It is well-known that in the worst-case, it is impossible to achieve a sub-linear dynamic regret bound, due to the arbitrary fluctuation in the functions. However, it is possible to upper bound the dynamic regret in terms of certain regularity of the comparator sequence or the function sequence. A natural regularity is the path-length of the comparator sequence, defined as P∗ T := P(x∗ 1, . . . , x∗ T ) = T X t=2 ∥x∗ t −x∗ t−1∥ (3) that captures the cumulative Euclidean norm of the difference between successive comparators. For convex functions, the dynamic regret of online gradient descent can be upper bounded by O( √ TP∗ T ) [Zinkevich, 2003]. And when all the functions are strongly convex and smooth, the upper bound can be improved to O(P∗ T ) [Mokhtari et al., 2016]. In the aforementioned results, the learner uses the gradient of each function only once, and performs one step of gradient descent to update the intermediate solution. In this paper, we examine an interesting question: is it possible to improve the dynamic regret when the learner is allowed to query the gradient multiple times? Note that the answer to this question is no if one aims to promote the static regret in (1), according to the results on the minimax regret bound [Abernethy et al., 2008a]. We however show that when coming to the dynamic regret, multiple gradients can reduce the upper bound significantly. To this end, we introduce a new regularity—the squared path-length: S∗ T := S(x∗ 1, . . . , x∗ T ) = T X t=2 ∥x∗ t −x∗ t−1∥2 (4) which could be much smaller than P∗ T when the local variations are small. For example, when ∥x∗ t −x∗ t−1∥= Ω(1/ √ T) for all t ∈[T], we have P∗ T = Ω( √ T) but S∗ T = Ω(1). We advance the analysis of dynamic regret in the following aspects. • When all the functions are strongly convex and smooth, we propose to apply gradient descent multiple times in each round, and demonstrate that the dynamic regret is reduced from O(P∗ T ) to O(min(P∗ T , S∗ T )), provided the gradients of minimizers are small. We further present a matching lower bound which implies our result cannot be improved in general. • When all the functions are semi-strongly convex and smooth, we show that the standard online gradient descent still achieves the O(P∗ T ) dynamic regret. And if we apply gradient descent multiple times in each round, the upper bound can also be improved to O(min(P∗ T , S∗ T )), under the same condition as strongly convex functions. • When all the functions are self-concordant, we establish a similar guarantee if both the gradient and Hessian of the function can be queried multiple times. Specifically, we propose to apply the damped Newton method multiple times in each round, and prove an O(min(P∗ T , S∗ T )) bound of the dynamic regret under appropriate conditions.1 Application to Statistical Learning Most studies of dynamic regret, including this paper do not make stochastic assumptions on the function sequence. In the following, we discuss how to interpret our results when facing the problem of statistical learning. In this case, the learner receives a sequence of losses ℓ(x⊤z1, y1), ℓ(x⊤z2, y2), . . ., where (zi, yi)’s are instance-label pairs sampled from a unknown distribution, and ℓ(·, ·) measures the prediction error. To avoid the random fluctuation caused by sampling, we can set ft as the loss averaged over a mini-batch of instance-label pairs. As a result, when the underlying distribution is stationary or drifts slowly, successive functions will be close to each other, and thus the path-length and the squared path-length are expected to be small. 1P∗ T and S∗ T are modified slightly when functions are semi-strongly convex or self-concordant. 2 2 Related Work The static regret in (1) has been extensively studied in the literature [Shalev-Shwartz, 2011]. It has been established that the static regret can be upper bounded by O( √ T), O(log T), and O(log T) for convex functions, strongly convex functions, and exponentially concave functions, respectively [Zinkevich, 2003, Hazan et al., 2007]. Furthermore, those upper bounds are proved to be minimax optimal [Abernethy et al., 2008a, Hazan and Kale, 2011]. The notion of dynamic regret is introduced by Zinkevich [2003]. If we choose the online gradient descent as the learner, the dynamic regret with respect to any comparator sequence u1, . . . , uT , i.e., R(u1, . . . , uT ), is on the order of √ TP(u1, . . . , uT ). When a prior knowledge of P∗ T is available, the dynamic regret R∗ T can be upper bounded by O( p TP∗ T ) [Yang et al., 2016]. If all the functions are strongly convex and smooth, the upper bound of R∗ T can be improved to O(P∗ T ) [Mokhtari et al., 2016]. The O(P∗ T ) rate is also achievable when all the functions are convex and smooth, and all the minimizers x∗ t ’s lie in the interior of X [Yang et al., 2016]. Another regularity of the comparator sequence, which is similar to the path-length, is defined as P′(u1, . . . , uT ) = T X t=2 ∥ut −Φt(ut−1)∥ where Φt(·) is a dynamic model that predicts a reference point for the t-th round. The advantage of this measure is that when the comparator sequence follows the dynamical model closely, it can be much smaller than the path-length P(u1, . . . , uT ). A novel algorithm named dynamic mirror descent is proposed to take Φt(ut−1) into account, and the dynamic regret R(u1, . . . , uT ) is on the order of √ TP′(u1, . . . , uT ) [Hall and Willett, 2013]. There are also some regularities defined in terms of the function sequence, such as the functional variation [Besbes et al., 2015] FT := F(f1, . . . , fT ) = T X t=2 max x∈X |ft(x) −ft−1(x)| (5) or the gradient variation [Chiang et al., 2012] GT := G(f1, . . . , fT ) = T X t=2 max x∈X ∥∇ft(x) −∇ft−1(x)∥2. (6) Under the condition that FT ≤FT and Ft is given beforehand, a restarted online gradient descent is developed by Besbes et al. [2015], and the dynamic regret is upper bounded by O(T 2/3F 1/3 T ) and O(log T√TFT ) for convex functions and strongly convex functions, respectively. The regularities mentioned above reflect different aspects of the learning problem, and are not directly comparable in general. Thus, it is appealing to develop an algorithm that adapts to the smaller regularity of the problem. Jadbabaie et al. [2015] propose an adaptive algorithm based on the optimistic mirror descent [Rakhlin and Sridharan, 2013], such that the dynamic regret is given in terms of all the three regularities (P∗ T , FT , and GT ). However, it relies on the assumption that the learner can calculate each regularity incrementally. In the setting of prediction with expert advice, the dynamic regret is also referred to as tracking regret or shifting regret [Herbster and Warmuth, 1998, Cesa-bianchi et al., 2012]. The path-length of the comparator sequence is named as shift, which is just the number of times the expert changes. Another related performance measure is the adaptive regret, which aims to minimize the static regret over any interval [Hazan and Seshadhri, 2007, Daniely et al., 2015]. Finally, we note that the study of dynamic regret is similar to the competitive analysis in the sense that both of them compete against an optimal offline policy, but with significant differences in their assumptions and techniques [Buchbinder et al., 2012]. 3 Online Learning with Multiple Gradients In this section, we discuss how to improve the dynamic regret by allowing the learner to query the gradient multiple times. We start with strongly convex functions, and then proceed to semi-strongly convex functions, and finally investigate self-concordant functions. 3 Algorithm 1 Online Multiple Gradient Descent (OMGD) Require: The number of inner iterations K and the step size η 1: Let x1 be any point in X 2: for t = 1, . . . , T do 3: Submit xt ∈X and the receive loss ft : X 7→R 4: z1 t = xt 5: for j = 1, . . . , K do 6: zj+1 t = ΠX zj t −η∇ft(zj t) 7: end for 8: xt+1 = zK+1 t 9: end for 3.1 Strongly Convex and Smooth Functions To be self-contained, we provide the definitions of strong convexity and smoothness. Definition 1. A function f : X 7→R is λ-strongly convex, if f(y) ≥f(x) + ⟨∇f(x), y −x⟩+ λ 2 ∥y −x∥2, ∀x, y ∈X. Definition 2. A function f : X 7→R is L-smooth, if f(y) ≤f(x) + ⟨∇f(x), y −x⟩+ L 2 ∥y −x∥2, ∀x, y ∈X. Example 1. The following functions are both strongly convex and smooth. 1. A quadratic form f(x) = x⊤Ax −2b⊤x + c where aI ⪯A ⪯bI, a > 0 and b < ∞; 2. The regularized logistic loss f(x) = log(1 + exp(b⊤x)) + λ 2 ∥x∥2, where λ > 0. Following previous studies [Mokhtari et al., 2016], we make the following assumptions. Assumption 1. Suppose the following conditions hold for each ft : X 7→R. 1. ft is λ-strongly convex and L-smooth over X; 2. ∥∇ft(x)∥≤G, ∀x ∈X. When the learner can query the gradient of each function only once, the most popular learning algorithm is the online gradient descent: xt+1 = ΠX (xt −η∇ft(xt)) where ΠX (·) denotes the projection onto the nearest point in X. Mokhtari et al. [2016] have established an O(P∗ T ) bound of dynamic regret, as stated below. Theorem 1. Suppose Assumption 1 is true. By setting η ≤1/L in online gradient descent, we have T X t=1 ft(xt) −ft(x∗ t ) ≤ 1 1 −γ GP∗ T + 1 1 −γ G∥x1 −x∗ 1∥ where γ = q 1 − 2λ 1/η+λ. We now consider the setting that the learner can access the gradient of each function multiple times. The algorithm is a natural extension of online gradient descent by performing gradient descent multiple times in each round. Specifically, in the t-th round, given the current solution xt, we generate a sequence of solutions, denoted by z1 t, . . . , zK+1 t , where K is a constant independent from T, as follows: z1 t = xt, zj+1 t = ΠX zj t −η∇ft(zj t) , j = 1, . . . , K. Then, we set xt+1 = zK+1 t . The procedure is named as Online Multiple Gradient Descent (OMGD) and is summarized in Algorithm 1. 4 By applying gradient descent multiple times, we are able to extract more information from each function and therefore are more likely to obtain a tight bound for the dynamic regret. The following theorem shows that the multiple accesses of the gradient indeed help improve the dynamic regret. Theorem 2. Suppose Assumption 1 is true. By setting η ≤1/L and K = ⌈1/η+λ 2λ ln 4⌉in Algorithm 1, for any constant α > 0, we have T X t=1 ft(xt) −ft(x∗ t ) ≤min 2GP∗ T + 2G∥x1 −x∗ 1∥, PT t=1 ∥∇ft(x∗ t )∥2 2α + 2(L + α)S∗ T + (L + α)∥x1 −x∗ 1∥2. When PT t=1 ∥∇ft(x∗ t )∥2 is small, Theorem 2 can be simplified as follows. Corollary 3. Suppose PT t=1 ∥∇ft(x∗ t )∥2 = O(S∗ T ), from Theorem 2, we have T X t=1 ft(xt) −ft(x∗ t ) = O (min(P∗ T , S∗ T )) . In particular, if x∗ t belongs to the relative interior of X (i.e., ∇ft(x∗ t ) = 0) for all t ∈[T], Theorem 2, as α →0, implies T X t=1 ft(xt) −ft(x∗ t ) ≤min 2GP∗ T + 2G∥x1 −x∗ 1∥, 2LS∗ T + L∥x1 −x∗ 1∥2 . Compared to Theorem 1, the proposed OMGD improves the dynamic regret from O(P∗ T ) to O (min (P∗ T , S∗ T )), when the gradients of minimizers are small. Recall the definitions of P∗ T and S∗ T in (3) and (4), respectively. We can see that S∗ T introduces a square when measuring the difference between x∗ t and x∗ t−1. In this way, if the local variations (∥x∗ t −x∗ t−1∥’s) are small, S∗ T can be significantly smaller than P∗ T , as indicated below. Example 2. Suppose ∥x∗ t −x∗ t−1∥= T −τ for all t ≥1 and τ > 0, we have S∗ T +1 = T 1−2τ ≪P∗ T +1 = T 1−τ. In particular, when τ = 1/2, we have S∗ T +1 = 1 ≪P∗ T +1 = √ T. S∗ T is also closely related to the gradient variation in (6). When all the x∗ t ’s belong to the relative interior of X, we have ∇ft(x∗ t ) = 0 for all t ∈[T] and therefore GT ≥ T X t=2 ∥∇ft(x∗ t−1) −∇ft−1(x∗ t−1)∥2 = T X t=2 ∥∇ft(x∗ t−1) −∇ft(x∗ t )∥2 ≥λ2S∗ T (7) where the last inequality follows from the property of strongly convex functions [Nesterov, 2004]. The following corollary is an immediate consequence of Theorem 2 and the inequality in (7). Corollary 4. Suppose Assumption 1 is true, and further assume all the x∗ t ’s belong to the relative interior of X . By setting η ≤1/L and K = ⌈1/η+λ 2λ ln 4⌉in Algorithm 1, we have T X t=1 ft(xt) −ft(x∗ t ) ≤min 2GP∗ T + 2G∥x1 −x∗ 1∥, 2LGT λ2 + L∥x1 −x∗ 1∥2 . In Theorem 2, the number of accesses of gradients K is set to be a constant depending on the condition number of the function. One may ask whether we can obtain a tighter bound by using a larger K. Unfortunately, according to our analysis, even if we take K = ∞, which means ft(·) is minimized exactly, the upper bound can only be improved by a constant factor and the order remains the same. A related question is whether we can reduce the value of K by adopting more advanced optimization techniques, such as the accelerated gradient descent [Nesterov, 2004]. This is an open problem to us, and will be investigated as a future work. Finally, we prove that the O(S∗ T ) bound is optimal for strongly convex and smooth functions. 5 Theorem 5. For any online learning algorithm A, there always exists a sequence of strongly convex and smooth functions f1, . . . , fT , such that T X t=1 ft(xt) −ft(x∗ t ) = Ω(S∗ T ) where x1, . . . , xT is the solutions generated by A. Thus, the upper bound in Theorem 2 cannot be improved in general. 3.2 Semi-strongly Convex and Smooth Functions During the analysis of Theorems 1 and 2, we realize that the proof is built upon the fact that “when the function is strongly convex and smooth, gradient descent can reduce the distance to the optimal solution by a constant factor” [Mokhtari et al., 2016, Proposition 2]. From the recent developments in convex optimization, we know that a similar behavior also happens when the function is semistrongly convex and smooth [Necoara et al., 2015, Theorem 5.2], which motivates the study in this section. We first introduce the definition of semi-strong convexity [Gong and Ye, 2014]. Definition 3. A function f : X 7→R is semi-strongly convex over X, if there exists a constant β > 0 such that for any x ∈X f(x) −min x∈X f(x) ≥β 2 ∥x −ΠX ∗(x)∥2 (8) where X ∗= {x ∈X : f(x) ≤minx∈X f(x)} is the set of minimizers of f over X. The semi-strong convexity generalizes several non-strongly convex conditions, such as the quadratic approximation property and the error bound property [Wang and Lin, 2014, Necoara et al., 2015]. A class of functions that satisfy the semi-strongly convexity is provided below [Gong and Ye, 2014]. Example 3. Consider the following constrained optimization problem min x∈X⊆Rd f(x) = g(Ex) + b⊤x where g(·) is strongly convex and smooth, and X is either Rd or a polyhedral set. Then, f : X 7→R is semi-strongly convex over X with some constant β > 0. Based on the semi-strong convexity, we assume the functions satisfy the following conditions. Assumption 2. Suppose the following conditions hold for each ft : X 7→R. 1. ft is semi-strongly convex over X with parameter β > 0, and L-smooth; 2. ∥∇ft(x)∥≤G, ∀x ∈X. When the function is semi-strongly convex, the optimal solution may not be unique. Thus, we need to redefine P ∗ T and S∗ T to account for this freedom. We define P∗ T := T X t=2 max x∈X
ΠX ∗ t (x) −ΠX ∗ t−1(x)
, and S∗ T := T X t=2 max x∈X
ΠX ∗ t (x) −ΠX ∗ t−1(x)
2 where X ∗ t = {x ∈X : ft(x) ≤minx∈X ft(x)} is the set of minimizers of ft over X. In this case, we will use the standard online gradient descent when the learner can query the gradient only once, and apply the online multiple gradient descent (OMGD) in Algorithm 1, when the learner can access the gradient multiple times. Using similar analysis as Theorems 1 and 2, we obtain the following dynamic regret bounds for functions that are semi-strongly convex and smooth. Theorem 6. Suppose Assumption 2 is true. By setting η ≤1/L in online gradient descent, we have T X t=1 ft(xt) − T X t=1 min x∈X ft(x) ≤GP∗ T 1 −γ + G∥x1 −¯x1∥ 1 −γ where γ = q 1 − β 1/η+β , and ¯x1 = ΠX ∗ 1 (x1). 6 Thus, online gradient descent still achieves an O(P∗ T ) bound of the dynamic regret. Theorem 7. Suppose Assumption 2 is true. By setting η ≤1/L and K = ⌈1/η+β β ln 4⌉in Algorithm 1, for any constant α > 0, we have T X t=1 ft(xt) − T X t=1 min x∈X ft(x) ≤min 2GP∗ T + 2G∥x1 −¯x1∥ G∗ T 2α + 2(L + α)S∗ T + (L + α)∥x1 −¯x1∥2 where G∗ T = max{x∗ t ∈X ∗ t }T t=1 PT t=1 ∥∇ft(x∗ t )∥2, and ¯x1 = ΠX ∗ 1 (x1). Again, when the gradients of minimizers are small, in other words, G∗ T = O(S∗ T ), the proposed OMGD improves the dynamic regret form O(P∗ T ) to O(min(P∗ T , S∗ T )). 3.3 Self-concordant Functions We extend our previous results to self-concordant functions, which could be non-strongly convex and even non-smooth. Self-concordant functions play an important role in interior-point methods for solving convex optimization problems. We note that in the study of bandit linear optimization [Abernethy et al., 2008b], self-concordant functions have been used as barriers for constraints. However, to the best of our knowledge, this is the first time that losses themselves are self-concordant. The definition of self-concordant functions is given below [Nemirovski, 2004]. Definition 4. Let X be a nonempty open convex set in Rd and f be a C3 convex function defined on X. f is called self-concordant on X, if it possesses the following two properties: 1. f(xi) →∞along every sequence {xi ∈X} converging, as i →∞, to a boundary point of X; 2. f satisfies the differential inequality |D3f(x)[h, h, h]| ≤2 h⊤∇2f(x)h 3/2 for all x ∈X and all h ∈Rd, where D3f(x)[h1, h2, h3] = ∂3 ∂t1∂t2∂t3 |t1=t2=t3=0f(x + t1h1 + t2h2 + t3h3) . Example 4. We provide some examples of self-concordant functions below [Boyd and Vandenberghe, 2004, Nemirovski, 2004]. 1. The function f(x) = −log x is self-concordant on (0, ∞). 2. A convex quadratic form f(x) = x⊤Ax−2b⊤x+c where A ∈Rd×d, b ∈Rd, and c ∈R, is self-concordant on Rd. 3. If f : Rd 7→R is self-concordant, and A ∈Rd×k, b ∈Rd, then f(Ax + b) is selfconcordant. Using the concept of self-concordance, we make the following assumptions. Assumption 3. Suppose the following conditions hold for each ft : Xt 7→R. 1. ft is self-concordant on domain Xt; 2. ft is non-degenerate on Xt, i.e., ∇2ft(x) ≻0, ∀x ∈Xt; 3. ft attains its minimum on Xt, and denote x∗ t = argminx∈Xt ft(x). Our approach is similar to previous cases except for the updating rule of xt. Since we do not assume functions are strongly convex, we need to take into account the second order structure when updating the current solution xt. Thus, we assume the learner can query both the gradient and Hessian of each function multiple times. Specifically, we apply the damped Newton method [Nemirovski, 2004] to update xt, as follows: z1 t = xt, zj+1 t = zj t − 1 1 + λt(zj t) h ∇2ft(zj t) i−1 ∇ft(zj t), j = 1, . . . , K where λt(zj t) = r ∇ft(zj t)⊤ h ∇2ft(zj t) i−1 ∇ft(zj t). (9) 7 Algorithm 2 Online Multiple Newton Update (OMNU) Require: The number of inner iterations K in each round 1: Let x1 be any point in X1 2: for t = 1, . . . , T do 3: Submit xt ∈X and the receive loss ft : X 7→R 4: z1 t = xt 5: for j = 1, . . . , K do 6: zj+1 t = zj t − 1 1 + λt(zj t) h ∇2ft(zj t) i−1 ∇ft(zj t) where λt(zj t) is given in (9) 7: end for 8: xt+1 = zK+1 t 9: end for Then, we set xt+1 = zK+1 t . Since the damped Newton method needs to calculate the inverse of the Hessian matrix, its complexity is higher than gradient descent. The procedure is named as Online Multiple Newton Update (OMNU) and is summarized in Algorithm 2. To analyze the dynamic regret of OMNU, we redefine the two regularities P∗ T and S∗ T as follows: P∗ T := T X t=2 ∥x∗ t −x∗ t−1∥t = T X t=2 q (x∗ t −x∗ t−1)⊤∇2ft(x∗ t )(x∗ t −x∗ t−1) S∗ T := T X t=2 ∥x∗ t −x∗ t−1∥2 t = T X t=2 (x∗ t −x∗ t−1)⊤∇2ft(x∗ t )(x∗ t −x∗ t−1) where ∥h∥t = p h⊤∇2ft(x∗ t )h. Compared to the definitions in (3) and (4), we introduce ∇2ft(x∗ t ) when measuring the distance between x∗ t and x∗ t−1. When functions are strongly convex and smooth, these definitions are equivalent up to constant factors. We then define a quantity to compare the second order structure of consecutive functions: µ = max t=2,...,T n λmax ∇2ft−1(x∗ t−1) −1/2 ∇2ft(x∗ t ) ∇2ft−1(x∗ t−1) −1/2o (10) where λmax(·) computes the maximum eigenvalue of its argument. When all the functions are λstrongly convex and L-smooth, µ ≤L/λ. Then, we have the following theorem regarding the dynamic regret of the proposed OMNU algorithm. Theorem 8. Suppose Assumption 3 is true, and further assume ∥x∗ t−1 −x∗ t ∥2 t ≤ 1 144, ∀t ≥2. (11) When t = 1, we choose K = O(1)(f1(x1) −f1(x∗ 1) + log log µ) in OMNU such that ∥x2 −x∗ 1∥2 1 ≤ 1 144µ. (12) For t ≥2, we set K = ⌈log4(16µ)⌉in OMNU, then T X t=1 ft(xt) −ft(x∗ t ) ≤min 1 3P∗ T , 4S∗ T + f1(x1) −f1(x∗ 1) + 1 36. The above theorem again implies the dynamic regret can be upper bounded by O(min(P∗ T , S∗ T )) when the learner can access the gradient and Hessian multiple times. From the first property of self-concordant functions in Definition 4, we know that x∗ t must lie in the interior of Xt, and thus ∇ft(x∗ t ) = 0 for all t ∈[T]. As a result, we do not need the additional assumption that the gradients of minimizers are small, which has been used before to simplify Theorems 2 and 7. Compared to Theorems 2 and 7, Theorem 8 introduces an additional condition in (11). This condition is required to ensure that xt lies in the feasible region of ft(·), otherwise, ft(xt) can be infinity 8 and it is impossible to bound the dynamic regret. The multiple applications of damped Newton method can enforce xt to be close to x∗ t−1. Combined with (11), we conclude that xt is also close to x∗ t . Then, based on the property of the Dikin ellipsoid of self-concordant functions [Nemirovski, 2004], we can guarantee that xt is feasible for ft(·). 4 Conclusion and Future Work In this paper, we discuss how to reduce the dynamic regret of online learning by allowing the learner to query the gradient/Hessian of each function multiple times. By applying gradient descent multiple times in each round, we show that the dynamic regret can be upper bounded by the minimum of the path-length and the squared path-length, when functions are strongly convex and smooth. We then extend this theoretical guarantee to functions that are semi-strongly convex and smooth. We finally demonstrate that for self-concordant functions, applying the damped Newton method multiple times achieves a similar result. In the current study, we upper bound the dynamic regret in terms of the path-length or the squared path-length of the comparator sequence. As we mentioned before, there also exist some regularities defined in terms of the function sequence, e.g., the functional variation [Besbes et al., 2015]. In the future, we will investigate whether multiple accesses of gradient/Hessian can improve the dynamic regret when measured by certain regularities of the function sequence. Another future work is to extend our results to the more general dynamic regret R(u1, . . . , uT ) = T X t=1 ft(xt) − T X t=1 ft(ut) where u1, . . . , uT ∈X is an arbitrary sequence of comparators [Zinkevich, 2003]. Acknowledgments This work was partially supported by the NSFC (61603177, 61333014), JiangsuSF (BK20160658), YESS (2017QNRC001), NSF (IIS-1545995), and the Collaborative Innovation Center of Novel Software Technology and Industrialization. Jinfeng Yi is now at Tencent AI Lab, Bellevue, WA, USA. References J. Abernethy, P. L. Bartlett, A. Rakhlin, and A. Tewari. Optimal stragies and minimax lower bounds for online convex games. In Proceedings of the 21st Annual Conference on Learning Theory, 2008a. J. Abernethy, E. Hazan, and A. Rakhlin. Competing in the dark: An efficient algorithm for bandit linear optimization. In Proceedings of the 21st Annual Conference on Learning, pages 263–274, 2008b. O. Besbes, Y. Gur, and A. Zeevi. Non-stationary stochastic optimization. Operations Research, 63 (5):1227–1244, 2015. S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. N. Buchbinder, S. Chen, J. S. Naor, and O. Shamir. Unified algorithms for online learning and competitive analysis. In Proceedings of the 25th Annual Conference on Learning Theory, 2012. N. Cesa-bianchi, P. Gaillard, G. Lugosi, and G. Stoltz. Mirror descent meets fixed share (and feels no regret). In Advances in Neural Information Processing Systems 25, pages 980–988, 2012. C.-K. Chiang, T. Yang, C.-J. Lee, M. Mahdavi, C.-J. Lu, R. Jin, and S. Zhu. Online optimization with gradual variations. In Proceedings of the 25th Annual Conference on Learning Theory, 2012. A. Daniely, A. Gonen, and S. Shalev-Shwartz. Strongly adaptive online learning. In Proceedings of The 32nd International Conference on Machine Learning, 2015. P. Gong and J. Ye. Linear convergence of variance-reduced stochastic gradient without strong convexity. ArXiv e-prints, arXiv:1406.1102, 2014. 9 E. C. Hall and R. M. Willett. Dynamical models and tracking regret in online convex programming. In Proceedings of the 30th International Conference on Machine Learning, pages 579–587, 2013. E. Hazan and S. Kale. Beyond the regret minimization barrier: an optimal algorithm for stochastic strongly-convex optimization. In Proceedings of the 24th Annual Conference on Learning Theory, pages 421–436, 2011. E. Hazan and C. Seshadhri. Adaptive algorithms for online decision problems. Electronic Colloquium on Computational Complexity, 88, 2007. E. Hazan, A. Agarwal, and S. Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. M. Herbster and M. K. Warmuth. Tracking the best expert. Machine Learning, 32(2):151–178, 1998. A. Jadbabaie, A. Rakhlin, S. Shahrampour, and K. Sridharan. Online optimization: Competing with dynamic comparators. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics, 2015. A. Mokhtari, S. Shahrampour, A. Jadbabaie, and A. Ribeiro. Online optimization in dynamic environments: Improved regret rates for strongly convex problems. ArXiv e-prints, arXiv:1603.04954, 2016. I. Necoara, Y. Nesterov, and F. Glineur. Linear convergence of first order methods for non-strongly convex optimization. ArXiv e-prints, arXiv:1504.06298, 2015. A. Nemirovski. Interior point polynomial time methods in convex programming. Lecture notes, Technion – Israel Institute of Technology, 2004. Y. Nesterov. Introductory lectures on convex optimization: a basic course, volume 87 of Applied optimization. Kluwer Academic Publishers, 2004. S. Rakhlin and K. Sridharan. Optimization, learning, and games with predictable sequences. In Advances in Neural Information Processing Systems 26, pages 3066–3074, 2013. S. Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: primal estimated sub-gradient solver for SVM. In Proceedings of the 24th International Conference on Machine Learning, pages 807– 814, 2007. P.-W. Wang and C.-J. Lin. Iteration complexity of feasible descent methods for convex optimization. Journal of Machine Learning Research, 15:1523–1548, 2014. T. Yang, L. Zhang, R. Jin, and J. Yi. Tracking slowly moving clairvoyant: Optimal dynamic regret of online learning with true and noisy gradient. In Proceedings of the 33rd International Conference on Machine Learning, 2016. M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning, pages 928–936, 2003. 10 | 2017 | 539 |
7,051 | Dualing GANs Yujia Li1∗ Alexander Schwing3 Kuan-Chieh Wang1,2 Richard Zemel1,2 1Department of Computer Science, University of Toronto 2Vector Institute 3Department of Electrical and Computer Engineering, University of Illinois at Urbana-Champaign {yujiali, wangkua1, zemel}@cs.toronto.edu aschwing@illinois.edu Abstract Generative adversarial nets (GANs) are a promising technique for modeling a distribution from samples. It is however well known that GAN training suffers from instability due to the nature of its saddle point formulation. In this paper, we explore ways to tackle the instability problem by dualizing the discriminator. We start from linear discriminators in which case conjugate duality provides a mechanism to reformulate the saddle point objective into a maximization problem, such that both the generator and the discriminator of this ‘dualing GAN’ act in concert. We then demonstrate how to extend this intuition to non-linear formulations. For GANs with linear discriminators our approach is able to remove the instability in training, while for GANs with nonlinear discriminators our approach provides an alternative to the commonly used GAN training algorithm. 1 Introduction Generative adversarial nets (GANs) [5] are, among others like variational auto-encoders [10] and auto-regressive models [19], a promising technique for modeling a distribution from samples. A lot of empirical evidence shows that GANs are able to learn to generate images with good visual quality at unprecedented resolution [22, 17], and recently there has been a lot of research interest in GANs, to better understand their properties and the training process. Training GANs can be viewed as a duel between a discriminator and a generator. Both players are instantiated as deep nets. The generator is required to produce realistic-looking samples that cannot be differentiated from real data by the discriminator. In turn, the discriminator does as good a job as possible to tell the samples apart from real data. Due to the complexity of the optimization problem, training GANs is notoriously hard, and usually suffers from problems such as mode collapse, vanishing gradient, and divergence. Moreover, the training procedures are very unstable and sensitive to hyper-parameters. Therefore, a number of techniques have been proposed to address these issues, some empirically justified [17, 18], and others more theoretically motivated [15, 1, 16, 23]. This tremendous amount of recent work, together with the wide variety of heuristics applied by practitioners, indicates that many questions regarding the properties of GANs are still unanswered. In this work we provide another perspective on the properties of GANs, aiming toward better training algorithms in some cases. Our study in this paper is motivated by the alternating gradient update between discriminator and generator, employed during training of GANs. This form of update is one source of instability, and it is known to diverge even for some simple problems [18]. Ideally, when the discriminator is optimized to optimality, the GAN objective is a deterministic function of the generator. In this case, the optimization problem would be much easier to solve. This motivates our idea to dualize parts of the GAN objective, offering a mechanism to better optimize the discriminator. Interestingly, our dual formulation provides a direct relationship between the GAN objective and the maximum mean-discrepancy framework discussed in [6]. When restricted to linear discriminators, where we can find the optimal discriminator by solving the dual, this formulation permits the derivation of an optimization algorithm that monotonically increases the objective. Moreover, for ∗Now at DeepMind. non-linear discriminators we can apply trust-region type optimization techniques to obtain more accurate discriminators. Our work brings to the table some additional optimization techniques beyond stochastic gradient descent; we hope this encourages other researchers to pursue this direction. 2 Background In generative training we are interested in modeling of and sampling from an unknown distribution P, given a set D = {x1, . . . , xN} ∼P of datapoints, for example images. GANs use a generator network Gθ(z) parameterized by θ, that maps samples z drawn from a simple distribution, e.g., Gaussian or uniform, to samples in the data space ˆx = Gθ(z). A separate discriminator Dw(x) parameterized by w maps a point x in the data space to the probability of it being a real sample. The discriminator is trained to minimize a classification loss, typically the cross-entropy, and the generator is trained to maximize the same loss. On sets of real data samples {x1, ..., xn} and noise samples {z1, ..., zn}, using the (averaged) cross-entropy loss results in the following joint optimization problem: max θ min w f(θ, w) where f(θ, w) = −1 2n X i log Dw(xi)−1 2n X i log(1−Dw(Gθ(zi))). (1) We adhere to the formulation of a fixed batch of samples for clarity of the presentation, but also point out how this process is adapted to the stochastic optimization setting later in the paper as well as in the supplementary material. To solve this saddle point optimization problem, ideally, we want to solve for the optimal discriminator parameters w∗(θ) = argminw f(θ, w), in which case the GAN program given in Eq. (1) can be reformulated as a maximization for θ using maxθ f(θ, w∗(θ)). However, typical GAN training only alternates two gradient updates w ←w −ηw∇wf(θ, w) and θ ←θ + ηθ∇θf(θ, w), and usually just one step for each of θ and w in each round. In this case, the objective maximized by the generator is f(θ, w) instead. This objective is always an upper bound on the correct objective f(θ, w∗(θ)), since w∗(θ) is the optimal w for θ. Maximizing an upper bound has no guarantee on maximizing the correct objective, which leads to instability. Therefore, many practically useful techniques have been proposed to circumvent the difficulties of the original program definition presented in Eq. (1). Another widely employed technique is a separate loss −P i log(Dw(Gθ(zi))) to update θ in order to avoid vanishing gradients during early stages of training when the discriminator can get too strong. This technique can be combined with our approach, but in what follows, we keep the elegant formulation of the GAN program specified in Eq. (1). 3 Dualing GANs The main idea of ‘Dualing GANs’ is to represent the discriminator program minw f(θ, w) in Eq. (1) using its dual, maxλ g(θ, λ). Hereby, g is the dual objective of f w.r.t. w, and λ are the dual variables. Instead of gradient descent on f to update w, we solve the dual instead. This results in a maximization problem maxθ maxλ g(θ, λ). Using the dual is beneficial for two reasons. First, note that for any λ, g(θ, λ) is a lower bound on the objective with optimal discriminator parameters f(θ, w∗(θ)). Staying in the dual domain, it is then guaranteed that optimization of g w.r.t. θ makes progress in terms of the original program. Second, the dual problem usually involves a much smaller number of variables, and can therefore be solved much more easily than the primal formulation. This provides opportunities to obtain more accurate estimates for the discriminator parameters w, which is in turn beneficial for stabilizing the learning of the generator parameters θ. In the following, we start by studying linear discriminators, before extending our technique to training with non-linear discriminators. Also, we use cross-entropy as the classification loss, but emphasize that other convex loss functions, e.g., the hinge-loss, can be applied equivalently. 3.1 Linear Discriminator We start from linear discriminators that use a linear scoring function F(w, x) = w⊤x, i.e., the discriminator Dw(x) = pw(y = 1|x) = σ(F(w, x)) = 1/[1+exp(−w⊤x)]. Here, y = 1 indicates real data, while y = −1 for a generated sample. The distribution pw(y = −1|x) = 1 −pw(y = 1|x) characterizes the probability of x being a generated sample. 2 We only require the scoring function F to be linear in w and any (nonlinear) differentiable features φ(x) can be used in place of x in this formulation. Substituting the linear scoring function into the objective given in Eq. (1), results in the following program for w: min w C 2 ∥w∥2 2 + 1 2n X i log(1 + exp(−w⊤xi)) + 1 2n X i log(1 + exp(w⊤Gθ(zi))). (2) Here we also added an L2-norm regularizer on w. We note that the program presented in Eq. (2) is convex in the discriminator parameters w. Hence, we can equivalently solve it in the dual domain as discussed in the following claim, with proof provided in the supplementary material. Claim 1. The dual program to the task given in Eq. (2) reads as follows: max λ g(θ, λ) = −1 2C
X i λxixi − X i λziGθ(zi)
2 + 1 2n X i H(2nλxi) + 1 2n X i H(2nλzi), s.t. ∀i, 0 ≤λxi ≤1 2n, 0 ≤λzi ≤1 2n, (3) with binary entropy H(u) = −u log u −(1 −u) log(1 −u). The optimal solution to the original problem w∗can be obtained from the optimal λ∗ xi and λ∗ zi via w∗= 1 C X i λ∗ xixi − X i λ∗ ziGθ(zi) ! . Remarks: Intuitively, considering the last two terms of the program given in Claim 1 as well as its constraints, we aim at assigning weights λx, λz close to half of 1 2n to as many data points and to as many artificial samples as possible. More carefully investigating the first part, which can at most reach zero, reveals that we aim to match the empirical data observation P i λxixi and the generated artificial sample observation P i λziGθ(zi). Note that this resembles the moment matching property obtained in other maximum likelihood models. Importantly, this objective also resembles the (kernel) maximum mean discrepancy (MMD) framework, where the empirical squared MMD is estimated via ∥1 n P xi xi −1 n P zi Gθ(zi)∥2 2. Generative models that learn to minimize the MMD objective, like the generative moment matching networks [13, 3], can therefore be included in our framework, using fixed λ’s and proper scaling of the first term. Combining the result obtained in Claim 1 with the training objective for the generator yields the task maxθ,λ g(θ, λ) for training of GANs with linear discriminators. Hence, instead of searching for a saddle point, we strive to find a maximizer, a task which is presumably easier. The price to pay is the restriction to linear discriminators and the fact that every randomly drawn artificial sample zi has its own dual variable λzi. In the non-stochastic optimization setting, where we optimize for fixed sets of data samples {xi} and randomizations {zi}, it is easy to design a learning algorithm for GANs with linear discriminators that monotonically improves the objective g(θ, λ) based on line search. Although this approach is not practical for very large data sets, such a property is convenient for smaller scale data sets. In addition, linear models are favorable in scenarios in which we know informative features that we want the discriminator to pay attention to. When optimizing with mini-batches we introduce new data samples {xi} and randomizations {zi} in every iteration. In the supplementary material we show that this corresponds to maximizing a lower bound on the full expectation objective. Since the dual variables vary from one mini-batch to the next, we need to solve for the newly introduced dual variables to a reasonable accuracy. For small minibatch sizes commonly used in deep learning literature, like 100, calling a constrained optimization solver to solve the dual problem is quite cheap. We used Ipopt [20], which typically solves this dual problem to a good accuracy in negligible time; other solvers can also be used and may lead to improved performance. Utilizing a log-linear discriminator reduces the model’s expressiveness and complexity. We therefore now propose methods to alleviate this restriction. 3.2 Non-linear Discriminator General non-linear discriminators use non-convex scoring functions F(w, x), parameterized by a deep net. The non-convexity of F makes it hard to directly convert the problem into its dual form. 3 Therefore, our approach for training GANs with non-convex discriminators is based on repeatedly linearizing and dualizing the discriminator locally. At first sight this seems restrictive, however, we will show that a specific setup of this technique recovers the gradient direction employed in the regular GAN training mechanism while providing additional flexibility. We consider locally approximating the primal objective f around a point wk using a model function mk,θ(s) ≈f(θ, wk + s). We phrase the update w.r.t. the discriminator parameters w as a search for a step s, i.e., wk+1 = wk + s where k indicates the current iteration. In order to guarantee the quality of the approximation, we introduce a trust-region constraint 1 2∥s∥2 2 ≤∆k ∈R+ where ∆k specifies the trust-region size. More concretely, we search for a step s by solving min s mk,θ(s) s.t. 1 2∥s∥2 2 ≤∆k, (4) given generator parameters θ. Rather than optimizing the GAN objective f(θ, w) with stochastic gradient descent, we can instead employ this model function and use the algorithm outlined in Alg. 1. It proceeds by first performing a gradient ascent w.r.t. the generator parameters θ. Afterwards, we find a step s by solving the program given in Eq. (4). We then apply this step, and repeat. Different model functions mk,θ(s) result in variants of the algorithm. If we choose mk,θ(s) = f(θ, wk + s), model m and function f are identical but the program given in Eq. (4) is hard to solve. Therefore, in the following, we propose two model functions that we have found to be useful. The first one is based on linearization of the cost function f(θ, w) and recovers the step s employed by gradient-based discriminator updates in standard GAN training. The second one is based on linearization of the score function F(w, x) while keeping the loss function intact; this second approximation is hence accurate in a larger region. Many more models mk,θ(s) exist and we leave further exploration of this space to future work. (A). Cost function linearization: A local approximation to the cost function f(θ, w) can be constructed by using the first order Taylor approximation mk,θ(s) = f(wk, θ) + ∇wf(wk, θ)⊤s. Such a model function is appealing because step 2 of Fig. 1, i.e., minimization of the model function subject to trust-region constraints as specified in Eq. (4), has the analytically computable solution s = − √2∆k ∥∇wf(wk, θ)∥2 ∇wf(wk, θ). Consequently step 3 of Fig. 1 is a step of length 2∆k into the negative gradient direction of the cost function f(θ, w). We can use the trust region parameter ∆k to tune the step size just like it is common to specify the step size for standard GAN training. As mentioned before, using the first order Taylor approximation as our model mk,θ(s) recovers the same direction that is employed during standard GAN training. The value of the ∆k parameters can be fixed or adapted; see the supplementary material for more details. Using the first order Taylor approximation as a model is not the only choice. While some choices like quadratic approximation are fairly obvious, we present another intriguing option in the following. (B). Score function linearization: Instead of linearizing the entire cost function as demonstrated in the previous part, we can choose to only linearize the score function F, locally around wk, via F(wk + s, x) ≈ˆF(s, x) = F(wk, x) + s⊤∇wF(wk, x), ∀x. Note that the overall objective f is itself a nonlinear function of F. Substituting the approximation for F into the overall objective, results in the following model function: mk,θ(s) = C 2 ∥wk + s∥2 2 + 1 2n X i log 1 + exp −F(wk, xi) −s⊤∇wF(wk, xi) + 1 2n X i log 1 + exp F(wk, Gθ(zi)) + s⊤∇wF(wk, Gθ(zi)) . (5) This approximation keeps the nonlinearities of the surrogate loss function intact, therefore we expect it to be more accurate than linearization of the whole cost function f(θ, w). When F is already linear in w, linearization of the score function introduces no approximation error, and the formulation can be naturally reduced to the discussion presented in Sec. 3.1; non-negligible errors are introduced when linearizing the whole cost function f in this case. 4 Algorithm 1 GAN optimization with model function. Initialize θ, w0, k = 0 and iterate 1. One or few gradient ascent steps on f(θ, wk) w.r.t. generator parameters θ 2. Find step s using mins mk,θ(s) s.t. 1 2∥s∥2 2 ≤∆k 3. Update wk+1 ←wk + s 4. k ←k + 1 For general non-linear discriminators, however, no analytic solution can be computed for the program given in Eq. (4) when using this model. Nonetheless, the model function fulfills mk,θ(0) = f(wk, θ) and it is convex in s. Exploiting this convexity, we can derive the dual for this trust-region optimization problem as presented in the following claim. The proof is included in the supplementary material. Claim 2. The dual program to mins mk,θ(s) s.t. 1 2∥s∥2 2 ≤∆k with model function as in Eq. (5) is: max λ C 2 ∥wk∥2 2 − 1 2(C + λT )
−Cwk + X i λxi∇wF(wk, xi) − X i λzi∇wF(wk, Gθ(zi))
2 2 + 1 2n X i H(2nλxi) + 1 2n X i H(2nλzi) − X i λxiFxi + X i λziFzi −λT ∆k s.t. λT ≥0 ∀i, 0 ≤λxi ≤1 2n, 0 ≤λzi ≤1 2n. The optimal s∗to the original problem can be expressed through optimal λ∗ T , λ∗ xi, λ∗ zi as s∗= 1 C + λ∗ T X i λ∗ xi∇wF(wk, xi) − X i λ∗ zi∇wF(wk, zi) ! − C C + λ∗ T wk Combining the dual formulation with the maximization of the generator parameters θ results in a maximization as opposed to a search for a saddle point. However, unlike the linear case, it is not possible to design an algorithm that is guaranteed to monotonically increase the cost function f(θ, w). The culprit is step 3 of Alg. 1, which adapts the model mk,θ(s) in every iteration. Intuitively, the program illustrated in Claim 2 aims at choosing dual variables λxi, λzi such that the weighted means of derivatives as well as scores match. Note that this program searches for a direction s as opposed to searching for the weights w, hence the term −Cwk inside the squared norm. In practice, we use Ipopt [20] to solve the dual problem. The form of this dual is more ill-conditioned than the linear case. The solution found by Ipopt sometimes contains errors, however, we found the errors to be generally tolerable and not to affect the performance of our models. 4 Experiments In this section, we empirically study the proposed dual GAN algorithms. In particular, we show the stable and monotonic training for linear discriminators and study its properties. For nonlinear GANs we show good quality samples and compare it with standard GAN training methods. Overall the results show that our proposed approaches work across a range of problems and provide good alternatives to the standard GAN training method. 4.1 Dual GAN with linear discriminator We explore the dual GAN with linear discriminator on a synthetic 2D dataset generated by sampling points from a mixture of 5 2D Gaussians, as well as the MNIST [12] dataset. Through these experiments we show that (1) with the proposed dual GAN algorithm, training is very stable; (2) the dual variables λ can be used as an extra informative signal for monitoring the training process; (3) features matter, and we can train good generative models even with linear discriminators when we have good features. In all experiments, we compare our proposed dual GAN with the standard GAN when training the same generator and discriminator models. Additional experimental details and results are included in the supplementary material. The discussion of linear discriminators presented in Sec. 3.1 works with any feature representation φ(x) in place of x as long as φ is differentiable to allow gradients flow through it. For the simple 5 Figure 1: We show the learning curves and samples from two models of the same architecture, one optimized in dual space (left), and one in the primal space (i.e., typical GAN) up to 5000 iterations. Samples are shown at different points during training, as well as at the very end (right top - dual, right bottom - primal). Despite having similar sample qualities in the end, they demonstrate drastically different training behavior. In the typical GAN setup, loss oscillates and has no clear trend, whereas in the dual setup, loss monotonically increases and shows much smaller oscillation. Sample quality is nicely correlated with the dual objective during training. Figure 2: Training GANs with linear discriminators on the simple 5-Gaussians dataset. Here we are showing typical runs with the compared methods (not cherry-picked). Top: training curves and samples from a single experiment: left - dual with full batch, middle - dual with minibatch, right standard GAN with minibatch. The real data from this dataset are drawn in blue, generated samples in green. Below: distribution of λ’s during training for the two dual GAN experiments, as a histogram at each x-value (iteration) where intensity depicts frequency for values ranging from 0 to 1 (red are data, and green are samples). 5-Gaussian dataset, we use RBF features based on 100 sample training points. For the MNIST dataset, we use a convolutional neural net, and concatenate the hidden activations on all layers as the features. The dual GAN formulation has a single hyper-parameter C, but we found the algorithm not to be sensitive to it, and set it to 0.0001 in all experiments. We used Adam [9] with fixed learning rate and momentum to optimize the generator. Stable Training: The main results illustrating stable training are provided in Fig. 1 and 2, where we show the learning curves as well as model samples at different points during training. Both the dual GAN and the standard GAN use minibatches of the same size, and for the synthetic dataset we did an extra experiment doing full-batch training. From these curves we can see the stable monotonic increase of the dual objective, contrasted with standard GAN’s spiky training curves. On the synthetic data, we see that increasing the minibatch size leads to significantly improved stability. In the supplementary material we include an extra experiment to quantify the stability of the proposed method on the synthetic dataset. 6 Dataset mini-batch size generator generator C discriminator generator max learnrate momentum learnrate* architecture iterations 5-Gaussians randint[20,200] enr([0,10]) rand[.1,.9] enr([0,6]) enr([0,10]) fc-small randint[400,2000] fc-large MNIST randint[20,200] enr([0,10]) rand[.1,.9] enr([0,6]) enr([0,10]) fc-small 20000 fc-large dcgan dcgan-no-bn Table 1: Ranges of hyperparameters for sensitivity experiment. randint[a,b] means samples were drawn from uniformly distributed integers in the closed interval of [a,b], similarly rand[a,b] for real numbers. enr([a,b]) is shorthand for exp(-randint[a,b]), which was used for hyperparameters commonly explored in log-scale. For generator architectures, for the 5-Gaussians dataset we tried 2 3-layer fully-connected networks, with 20 and 40 hidden units. For MNIST, we tried 2 3-layer fully-connected networks, with 256 and 1024 hidden units, and a DCGAN-like architecture with and without batch normalization. 0 1 2 3 4 5 # modes covered (/5) 0.0 0.2 0.4 0.6 0.8 1.0 normalized counts gan dual 0 1 2 3 4 5 6 7 8 discretized inception scores 0.0 0.2 0.4 0.6 0.8 1.0 normalized counts gan dual 5-Gaussians MNIST Figure 3: Results for hyperparameter sensitivity experiment. For 5-Gaussians dataset, the x-axis represents the number of modes covered. For MNIST, the x-axis represents discretized Inception score. Overall, the proposed dual GAN results concentrate significantly more mass on the right side, demonstrating its better robustness to hyperparameters than standard GANs. Sensitivity to Hyperparameters: Sensitivity to hyperparameters is another important aspect of training stability. Successful GAN training typically requires carefully tuned hyperparameters, making it difficult for non-experts to adopt these generative models. In an attempt to quantify this sensitivity, we investigated the robustness of the proposed method to the hyperparameter choice. For both the 5-Gaussians and MNIST datasets, we randomly sampled 100 hyperparameter settings from ranges specified in Table 1, and compared learning using both the proposed dual GAN and the standard GAN. On the 5-Gaussians dataset, we evaluated the performance of the models by how well the model samples covered the 5 modes. We defined successfully covering a mode as having > 100 out of 1000 samples falling within a distance of 3 standard deviations to the center of the Gaussian. Our dual linear GAN succeeded in 49% of the experiments (note that there are a significant number of bad hyperparameter combinations in the search range), and standard GAN succeeded in only 32%, demonstrating our method was significantly easier to train and tune. On MNIST, the mean Inception scores were 2.83, 1.99 for the proposed method and GAN training respectively. A more detailed breakdown of mode coverage and Inception score can be found in Figure 3. Distribution of λ During Training: The dual formulation allows us to monitor the training process through a unique perspective by monitoring the dual variables λ. Fig. 2 shows the evolution of the distribution of λ during training for the synthetic 2D dataset. At the begining of training the λ’s are on the low side as the generator is not good and λ’s are encouraged to be small to minimize the moment matching cost. As the generator improves, more attention is devoted to the entropy term in the dual objective, and the λ’s start to converge to the value of 1/(4n). Comparison of Different Features: The qualitative differences of the learned models with different features can be observed in Fig. 4. In general, the more information the features carry about the data, the better the learned generative models. On MNIST, even with random features and linear discriminators we can learn reasonably good generative models. On the other hand, these results also 7 Trained Random Layer: All Conv1 Conv2 Conv3 Fc4 Fc5 Figure 4: Samples from dual linear GAN using pretrained and random features on MNIST. Each column shows a set of different features, utilizing all layers in a convnet and then successive single layers in the network. Score Type GAN Score Lin Cost Lin Real Data Inception (end) 5.61±0.09 5.40±0.12 5.43±0.10 10.72 ± 0.38 Internal classifier (end) 3.85±0.08 3.52±0.09 4.42±0.09 8.03 ± 0.07 Inception (avg) 5.59±0.38 5.44±0.08 5.16±0.37 Internal classifier (avg) 3.64±0.47 3.70±0.27 4.04±0.37 Table 2: Inception Score [18] for different GAN training methods. Since the score depends on the classifier, we used code from [18] as well as our own small convnet CIFAR-10 classifier for evaluation (achieves 83% accuracy). All scores are computed using 10,000 samples. The top pair are scores on the final models. GANs are known to be unstable, and results are sometimes cherry-picked. So, the bottom pair are scores averaged across models sampled from different iterations of training after it stopped improving. indicate that if the features are bad then it is hard to learn good models. This leads us to the nonlinear discriminators presented below, where the discriminator features are learned together with the last layer, which may be necessary for more complicated problem domains where features are potentially difficult to engineer. 4.2 Dual GAN with non-linear discriminator Next we assess the applicability of our proposed technique for non-linear discriminators, and focus on training models on MNIST and CIFAR-10 [11]. As discussed in Sec. 3.2, when the discriminator is non-linear, we can only approximate the discriminator locally. Therefore we do not have monotonic convergence guarantees. However, through better approximation and optimization of the discriminator we may expect the proposed dual GAN to work better than standard gradient based GAN training in some cases. Since GAN training is sensitive to hyperparameters, to make the comparison fair, we tuned the parameters for both the standard GANs and our approaches extensively and compare the best results for each. Fig. 5 and 6 show the samples generated by models learned using different approaches. Visually samples of our proposed approaches are on par with the standard GANs. As an extra quantitative metric for performance, we computed the Inception Score [18] for each of them on CIFAR-10 in Table 2. The Inception Score is a surrogate metric which highly depends on the network architecture. Therefore we computed the score using our own classifier and the one proposed in [18]. As can be seen in Table 2, both score and cost linearization are competitive with standard GANs. From the training curves we can also see that score linearization does the best in terms of approximating the objective, and both score linearization and cost linearization oscillate less than standard GANs. 5 Related Work A thorough review of the research devoted to generative modeling is beyond the scope of this paper. In this section we focus on GANs [5] and review the most related work that has not been discussed throughout the paper. 8 Score Linearization Cost Linearization GAN Figure 5: Nonlinear discriminator experiments on MNIST, and their training curves, showing the primal objective, the approximation, and the discriminator accuracy. Here we are showing typical runs with the compared methods (not cherry-picked). Score Linearization Cost Linearization GAN Figure 6: Nonlinear discriminator experiments on CIFAR-10, learning curves and samples organized by class are provided in the supplementary material. Our dual formulation reveals a close connection to moment-matching objectives widely seen in many other models. MMD [6] is one such related objective, and has been used in deep generative models in [13, 3]. [18] proposed a range of techniques to improve GAN training, including the usage of feature matching. Similar techniques are also common in style transfer [4]. In addition to these, moment-matching objectives are very common for exponential family models [21]. Common to all these works is the use of fixed moments. The Wasserstein objective proposed for GAN training in [1] can also be thought of as a form of moment matching, where the features are part of the discriminator and they are adaptive. The main difference between our dual GAN with linear discriminators and other forms of adaptive moment matching is that we adapt the weighting of features by optimizing non-parametric dual parameters, while other works mostly adopt a parametric model to adapt features. Duality has also been studied to understand and improve GAN training. [16] pioneered work that uses duality to derive new GAN training objectives from other divergences. [1] also used duality to derive a practical objective for training GANs from other distance metrics. Compared to previous work, instead of coming up with new objectives, we instead used duality on the original GAN objective and aim to better optimize the discriminator. Beyond what has already been discussed, there has been a range of other techniques developed to improve or extend GAN training, e.g., [8, 7, 22, 2, 23, 14] just to name a few. 6 Conclusion To conclude, we introduced ‘Dualing GANs,’ a framework which considers duality based formulations for the duel between the discriminator and the generator. Using the dual formulation provides opportunities to better train the discriminator. This helps remove the instability in training for linear discriminators, and we also adapted this framework to non-linear discriminators. The dual formulation also provides connections to other techniques. In particular, we discussed a close link to moment matching techniques, and showed that the cost function linearization for non-linear discriminators recovers the original gradient direction in standard GANs. We hope that our results spur further research in this direction to obtain a better understanding of the GAN objective and its intricacies. 9 Acknowledgments: This material is based upon work supported in part by the National Science Foundation under Grant No. 1718221, and grants from NSERC, Samsung and CIFAR. References [1] M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein GAN. In https://arxiv.org/abs/1701.07875, 2017. [2] X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever, and P. Abbeel. InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets. In https://arxiv.org/pdf/1606.03657v1.pdf, 2016. [3] Gintare Karolina Dziugaite, Daniel M Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. arXiv preprint arXiv:1505.03906, 2015. [4] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [5] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Yoshua Bengio. Generative Adversarial Networks. In https://arxiv.org/abs/1406.2661, 2014. [6] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, and A. Smola. A Kernel Two-Sample Test. JMLR, 2012. [7] X. Huang, Y. Li, O. Poursaeed, J. Hopcroft, and S. Belongie. Stacked Generative Adversarial Networks. In https://arxiv.org/abs/1612.04357, 2016. [8] D. J. Im, C. D. Kim, H. Jiang, and R. Memisevic. Generating images with recurrent adversarial networks. In https://arxiv.org/abs/1602.05110, 2016. [9] D. P. Kingma and J. Ba. Adam: A Method for Stochastic Optimization. In Proc. ICLR, 2015. [10] D. P. Kingma and M. Welling. Auto-Encoding Variational Bayes. In https://arxiv.org/abs/1312.6114, 2013. [11] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images, 2009. [12] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. IEEE, 1998. [13] Y. Li, K. Swersky, and R. Zemel. Generative Moment Matching Networks. In abs/1502.02761, 2015. [14] B. London and A. G. Schwing. Generative Adversarial Structured Networks. In Proc. NIPS Workshop on Adversarial Training, 2016. [15] L. Metz, B. Poole, D. Pfau, and J. Sohl-Dickstein. Unrolled Generative Adversarial Networks. In https://arxiv.org/abs/1611.02163, 2016. [16] S. Nowozin, B. Cseke, and R. Tomioka. f-GAN: Training Generative Neural Samplers using Variational Divergence Minimization. In https://arxiv.org/abs/1606.00709, 2016. [17] A. Radford, L. Metz, and S. Chintala. Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks. In https://arxiv.org/abs/1511.06434, 2015. [18] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved Techniques for Training GANs. In https://arxiv.org/abs/1606.03498, 2016. [19] A. van den Oord, N. Kalchbrenner, O. Vinyals, L. Espeholt, A. Graves, and K. Kavukcuoglu. Conditional Image Generation with PixelCNN Decoders. In https://arxiv.org/abs/1606.05328, 2016. [20] A. Wächter and L. T. Biegler. On the Implementation of a Primal-Dual Interior Point Filter Line Search Algorithm for Large-Scale Nonlinear Programming. Mathematical Programming, 2006. [21] Martin J Wainwright, Michael I Jordan, et al. Graphical models, exponential families, and variational inference. Foundations and Trends R⃝in Machine Learning, 1(1–2):1–305, 2008. 10 [22] H. Zhang, T. Xu, H. Li, S. Zhang, X. Huang, X. Wang, and D. Metaxas. StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks. In https://arxiv.org/abs/1612.03242, 2016. [23] J. Zhao, M. Mathieu, and Y. LeCun. Energy-based Generative Adversarial Network. In Proc. ICLR, 2017. 11 | 2017 | 54 |
7,052 | AdaGAN: Boosting Generative Models Ilya Tolstikhin MPI for Intelligent Systems Tübingen, Germany ilya@tue.mpg.de Sylvain Gelly Google Brain Zürich, Switzerland sylvaingelly@google.com Olivier Bousquet Google Brain Zürich, Switzerland obousquet@google.com Carl-Johann Simon-Gabriel MPI for Intelligent Systems Tübingen, Germany cjsimon@tue.mpg.de Bernhard Schölkopf MPI for Intelligent Systems Tübingen, Germany bs@tue.mpg.de Abstract Generative Adversarial Networks (GAN) are an effective method for training generative models of complex data such as natural images. However, they are notoriously hard to train and can suffer from the problem of missing modes where the model is not able to produce examples in certain regions of the space. We propose an iterative procedure, called AdaGAN, where at every step we add a new component into a mixture model by running a GAN algorithm on a re-weighted sample. This is inspired by boosting algorithms, where many potentially weak individual predictors are greedily aggregated to form a strong composite predictor. We prove analytically that such an incremental procedure leads to convergence to the true distribution in a finite number of steps if each step is optimal, and convergence at an exponential rate otherwise. We also illustrate experimentally that this procedure addresses the problem of missing modes. 1 Introduction Imagine we have a large corpus, containing unlabeled pictures of animals, and our task is to build a generative probabilistic model of the data. We run a recently proposed algorithm and end up with a model which produces impressive pictures of cats and dogs, but not a single giraffe. A natural way to fix this would be to manually remove all cats and dogs from the training set and run the algorithm on the updated corpus. The algorithm would then have no choice but to produce new animals and, by iterating this process until there’s only giraffes left in the training set, we would arrive at a model generating giraffes (assuming sufficient sample size). At the end, we aggregate the models obtained by building a mixture model. Unfortunately, the described meta-algorithm requires manual work for removing certain pictures from the unlabeled training set at every iteration. Let us turn this into an automatic approach, and rather than including or excluding a picture, put continuous weights on them. To this end, we train a binary classifier to separate “true” pictures of the original corpus from the set of “synthetic” pictures generated by the mixture of all the models trained so far. We would expect the classifier to make confident predictions for the true pictures of animals missed by the model (giraffes), because there are no synthetic pictures nearby to be confused with them. By a similar argument, the classifier should make less confident predictions for the true pictures containing animals already generated by one of the trained models (cats and dogs). For each picture in the corpus, we can thus use the classifier’s confidence to compute a weight which we use for that picture in the next iteration, to be performed on the re-weighted dataset. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The present work provides a principled way to perform this re-weighting, with theoretical guarantees showing that the resulting mixture models indeed approach the true data distribution.1 ALGORITHM 1 AdaGAN, a meta-algorithm to construct a “strong” mixture of T individual generative models (f.ex. GANs), trained sequentially. Input: Training sample SN := {X1, . . . , XN}. Output: Mixture generative model G = GT . Train vanilla GAN G1 = GAN(SN, W1) with a uniform weight W1 = (1/N, . . . , 1/N) over the training points for t = 2, . . . , T do #Choose the overall weight of the next mixture component βt = ChooseMixtureWeight(t) #Update the weight of each training example Wt = UpdateTrainingWeights(Gt−1, SN, βt) #Train t-th “weak” component generator Gc t Gc t = GAN(SN, Wt) #Update the overall generative model: #Form a mixture of Gt−1 and Gc t. Gt = (1 −βt)Gt−1 + βtGc t end for Before discussing how to build the mixture, let us consider the question of building a single generative model. A recent trend in modelling high dimensional data such as natural images is to use neural networks [1, 2]. One popular approach are Generative Adversarial Networks (GAN) [2], where the generator is trained adversarially against a classifier, which tries to differentiate the true from the generated data. While the original GAN algorithm often produces realistically looking data, several issues were reported in the literature, among which the missing modes problem, where the generator converges to only one or a few modes of the data distribution, thus not providing enough variability in the generated data. This seems to match the situation described earlier, which is why we will most often illustrate our algorithm with a GAN as the underlying base generator. We call it AdaGAN, for Adaptive GAN, but we could actually use any other generator: a Gaussian mixture model, a VAE [1], a WGAN [3], or even an unrolled [4] or mode-regularized GAN [5], which were both already specifically developed to tackle the missing mode problem. Thus, we do not aim at improving the original GAN or any other generative algorithm. We rather propose and analyse a meta-algorithm that can be used on top of any of them. This meta-algorithm is similar in spirit to AdaBoost in the sense that each iteration corresponds to learning a “weak” generative model (e.g., GAN) with respect to a re-weighted data distribution. The weights change over time to focus on the “hard” examples, i.e. those that the mixture has not been able to properly generate so far. Related Work Several authors [6, 7, 8] have proposed to use boosting techniques in the context of density estimation by incrementally adding components in the log domain. This idea was applied to GANs in [8]. A major downside of these approaches is that the resulting mixture is a product of components and sampling from such a model is nontrivial (at least when applied to GANs where the model density is not expressed analytically) and requires techniques such as Annealed Importance Sampling [9] for the normalization. When the log likelihood can be computed, [10] proposed to use an additive mixture model. They derived the update rule via computing the steepest descent direction when adding a component with infinitesimal weight. However, their results do not apply once the weight β becomes non-infinitesimal. In contrast, for any fixed weight of the new component our approach gives the overall optimal update (rather than just the best direction) for a specified f-divergence. In both theories, improvements of the mixture are guaranteed only if the new “weak” learner is still good enough (see Conditions 10&11) Similarly, [11] studied the construction of mixtures minimizing the Kullback divergence and proposed a greedy procedure for doing so. They also proved that under certain conditions, finite mixtures can approximate arbitrary mixtures at a rate 1/k where k is the number of components in the mixture when the weight of each newly added component is 1/k. These results are specific to the Kullback divergence but are consistent with our more general results. An additive procedure similar to ours was proposed in [12] but with a different re-weighting scheme, which is not motivated by a theoretical analysis of optimality conditions. On every new iteration the authors run GAN on the k training examples with maximal values of the discriminator from the last iteration. 1Note that the term “mixture” should not be interpreted to imply that each component models only one mode: the models to be combined into a mixture can themselves cover multiple modes. 2 Finally, many papers investigate completely different approaches for addressing the same issue by directly modifying the training objective of an individual GAN. For instance, [5] add an autoencoding cost to the training objective of GAN, while [4] allow the generator to “look few steps ahead” when making a gradient step. The paper is organized as follows. In Section 2 we present our main theoretical results regarding iterative optimization of mixture models under general f-divergences. In Section 2.4 we show that if optimization at each step is perfect, the process converges to the true data distribution at exponential rate (or even in a finite number of steps, for which we provide a necessary and sufficient condition). Then we show in Section 2.5 that imperfect solutions still lead to the exponential rate of convergence under certain “weak learnability” conditions. These results naturally lead to a new boosting-style iterative procedure for constructing generative models. When used with GANs, it results in our AdaGAN algorithm, detailed in Section 3 . Finally, we report initial empirical results in Section 4, where we compare AdaGAN with several benchmarks, including original GAN and uniform mixture of multiple independently trained GANs. Part of new theoretical results are reported without proofs, which can be found in appendices. 2 Minimizing f-divergence with Mixtures 2.1 Preliminaries and notations Generative Density Estimation In density estimation, one tries to approximate a real data distribution Pd, defined over the data space X, by a model distribution Pmodel. In the generative approach one builds a function G : Z →X that transforms a fixed probability distribution PZ (often called the noise distribution) over a latent space Z into a distribution over X. Hence Pmodel is the pushforward of PZ, i.e. Pmodel(A) = PZ(G−1(A)). With this approach it is in general impossible to compute the density dPmodel(x) and the log-likelihood of the training data under the model, but one can easily sample from Pmodel by sampling from PZ and applying G. Thus, to construct G, instead of comparing Pmodel directly with Pd, one compares their samples. To do so, one uses a similarity measure D(Pmodel∥Pd) which can be estimated from samples of those distributions, and thus approximately minimized over a class G of functions. f-Divergences In order to measure the agreement between the model distribution and the true distribution we will use an f-divergence defined in the following way: Df(Q∥P) := Z f dQ dP (x) dP(x) (1) for any pair of distributions P, Q with densities dP, dQ with respect to some dominating reference measure µ (we refer to Appendix D for more details about such divergences and their domain of definition). Here we assume that f is convex, defined on (0, ∞), and satisfies f(1) = 0. We will denote by F the set of such functions. 2 As demonstrated in [16, 17], several commonly used symmetric f-divergences are Hilbertian metrics, which in particular means that their square root satisfies the triangle inequality. This is true for the Jensen-Shannon divergence3, the Hellinger distance and the Total Variation among others. We will denote by FH the set of functions f such that Df is a Hilbertian metric. GAN and f-divergences The original GAN algorithm [2] optimizes the following criterion: min G max D EPd [log D(X)] + EPZ [log(1 −D(G(Z)))] , (2) where D and G are two functions represented by neural networks. This optimization is performed on a pair of samples (a training sample from Pd and a “fake” sample from PZ), which corresponds to approximating the above criterion by using the empirical distributions. In the non-parametric limit for D, this is equivalent to minimizing the Jensen-Shannon divergence [2]. This point of view can be generalized to any other f-divergence [13]. Because of this strong connection between adversarial 2Examples of f-divergences include the Kullback-Leibler divergence (obtained for f(x) = x log x) and Jensen-Shannon divergence (f(x) = −(x + 1) log x+1 2 + x log x). Other examples can be found in [13]. For further details we refer to Section 1.3 of [14] and [15]. 3which means such a property can be used in the context of the original GAN algorithm. 3 training of generative models and minimization of f-divergences, we cast the results of this section into the context of general f-divergences. Generative Mixture Models In order to model complex data distributions, it can be convenient to use a mixture model of the following form: P T model := PT i=1 αiPi, where αi ≥0, P i αi = 1, and each of the T components is a generative density model. This is natural in the generative context, since sampling from a mixture corresponds to a two-step sampling, where one first picks the mixture component (according to the multinomial distribution with parameters αi) and then samples from it. Also, this allows to construct complex models from simpler ones. 2.2 Incremental Mixture Building We restrict ourselves to the case of f-divergences and assume that, given an i.i.d. sample from any unknown distribution P, we can construct a simple model Q ∈G which approximately minimizes4 min Q∈G Df(Q ∥P). (3) Instead of modelling the data with a single distribution, we now want to model it with a mixture of distributions Pi,where each Pi is obtained by a training procedure of the form (3) with (possibly) different target distributions P for each i. A natural way to build a mixture is to do it incrementally: we train the first model P1 to minimize Df(P1 ∥Pd) and set the corresponding weight to α1 = 1, leading to P 1 model = P1. Then after having trained t components P1, . . . , Pt ∈G we can form the (t + 1)-st mixture model by adding a new component Q with weight β as follows: P t+1 model := t X i=1 (1 −β)αiPi + βQ. (4) where β ∈[0, 1] and Q ∈G is computed by minimizing: min Q Df((1 −β)Pg + βQ ∥Pd), (5) where we denoted Pg := P t model the current generative mixture model before adding the new component. We do not expect to find the optimal Q that minimizes (5) at each step, but we aim at constructing some Q that slightly improves our current approximation of Pd, i.e. such that for c < 1 Df((1 −β)Pg + βQ ∥Pd) ≤c · Df(Pg ∥Pd) . (6) This greedy approach has a significant drawback in practice. As we build up the mixture, we need to make β decrease (as P t model approximates Pd better and better, one should make the correction at each step smaller and smaller). Since we are approximating (5) using samples from both distributions, this means that the sample from the mixture will only contain a fraction β of examples from Q. So, as t increases, getting meaningful information from a sample so as to tune Q becomes harder and harder (the information is “diluted”). To address this issue, we propose to optimize an upper bound on (5) which involves a term of the form Df(Q ∥R) for some distribution R, which can be computed as a re-weighting of the original data distribution Pd. This procedure is reminiscent of the AdaBoost algorithm [18], which combines multiple weak predictors into one strong composition. On each step AdaBoost adds new predictor to the current composition, which is trained to minimize the binary loss on the re-weighted training set. The weights are constantly updated to bias the next weak learner towards “hard” examples, which were incorrectly classified during previous stages. In the following we will analyze the properties of (5) and derive upper bounds that provide practical optimization criteria for building the mixture. We will also show that under certain assumptions, the minimization of the upper bound leads to the optimum of the original criterion. 2.3 Upper Bounds We provide two upper bounds on the divergence of the mixture in terms of the divergence of the additive component Q with respect to some reference distribution R. 4One example of such a setting is running GANs. 4 Lemma 1 Given two distributions Pd, Pg and some β ∈[0, 1], then, for any Q and R, and f ∈FH: q Df((1 −β)Pg + βQ ∥Pd) ≤ q βDf(Q ∥R) + q Df((1 −β)Pg + βR ∥Pd) . (7) If, more generally, f ∈F, but βdR ≤dPd, then: Df((1 −β)Pg + βQ ∥Pd) ≤βDf(Q ∥R) + (1 −β)Df Pg ∥Pd −βR 1 −β . (8) We can thus exploit those bounds by introducing some well-chosen distribution R and then minimizing them with respect to Q. A natural choice for R is a distribution that minimizes the last term of the upper bound (which does not depend on Q). Our main result indicates the shape of the distributions minimizing the right-most terms in those bounds. Theorem 1 For any f-divergence Df, with f ∈F and f differentiable, any fixed distributions Pd, Pg, and any β ∈(0, 1], the minimizer of (5) over all probability distributions P has density dQ∗ β(x) = 1 β (λ∗dPd(x) −(1 −β)dPg(x))+ = dPd β λ∗−(1 −β)dPg dPd + . (9) for the unique λ∗ ∈ [β, 1] satisfying R dQ∗ β = 1. Also, λ∗ = 1 if and only if Pd((1 −β)dPg > dPd) = 0, which is equivalent to βdQ∗ β = dPd −(1 −β)dPg. Theorem 2 Given two distributions Pd, Pg and some β ∈(0, 1], assume Pd (dPg = 0) < β. Let f ∈F. The problem min Q:βdQ≤dPd Df Pg ∥Pd −βQ 1 −β has a solution with the density dQ† β(x) = 1 β dPd(x) −λ†(1 −β)dPg(x) + for the unique λ† ≥1 that satisfies R dQ† β = 1. Surprisingly, in both Theorems 1 and 2, the solutions do not depend on the choice of the function f, which means that the solution is the same for any f-divergence5. Note that λ∗is implicitly defined by a fixed-point equation. In Section 3 we will show how it can be computed efficiently in the case of empirical distributions. 2.4 Convergence Analysis for Optimal Updates In previous section we derived analytical expressions for the distributions R minimizing last terms in upper bounds (8) and (7). Assuming Q can perfectly match R, i.e. Df(Q ∥R) = 0, we are now interested in the convergence of the mixture (4) to the true data distribution Pd when Q = Q∗ β or Q = Q† β. We start with simple results showing that adding Q∗ β or Q† β to the current mixture would yield a strict improvement of the divergence. Lemma 2 (Property 6: exponential improvements) Under the conditions of Theorem 1, we have Df (1 −β)Pg + βQ∗ β
Pd ≤Df (1 −β)Pg + βPd
Pd ≤(1 −β)Df(Pg ∥Pd). Under the conditions of Theorem 2, we have Df Pg
Pd −βQ† β 1 −β ! ≤Df(Pg ∥Pd) and Df (1 −β)Pg + βQ† β
Pd ≤(1 −β)Df(Pg ∥Pd). Imagine repeatedly adding T new components to the current mixture Pg, where on every step we use the same weight β and choose the components described in Theorem 1. In this case Lemma 2 guarantees that the original objective value Df(Pg ∥Pd) would be reduced at least to (1 −β)T Df(Pg ∥Pd). 5in particular, by replacing f with f ◦(x) := xf(1/x), we get the same solution for the criterion written in the other direction. Hence the order in which we write the divergence does not matter and the optimal solution is optimal for both orders. 5 This exponential rate of convergence, which at first may look surprisingly good, is simply explained by the fact that Q∗ β depends on the true distribution Pd, which is of course unknown. Lemma 2 also suggests setting β as large as possible since we assume we can compute the optimal mixture component (which for β = 1 is Pd). However, in practice we may prefer to keep β relatively small, preserving what we learned so far through Pg: for instance, when Pg already covered part of the modes of Pd and we want Q to cover the remaining ones. We provide further discussions on choosing β in Section 3. 2.5 Weak to Strong Learnability In practice the component Q that we add to the mixture is not exactly Q∗ β or Q† β, but rather an approximation to them. In this section we show that if this approximation is good enough, then we retain the property (6) (exponential improvements). Looking again at Lemma 1 we notice that the first upper bound is less tight than the second one. Indeed, take the optimal distributions provided by Theorems 1 and 2 and plug them back as R into the upper bounds of Lemma 1. Also assume that Q can match R exactly, i.e. Df(Q ∥R) = 0. In this case both sides of (7) are equal to Df((1 −β)Pg + βQ∗ β ∥Pd), which is the optimal value for the original objective (5). On the other hand, (8) does not become an equality and the r.h.s. is not the optimal one for (5). However, earlier we agreed that our aim is to reach the modest goal (6) and next we show that this is indeed possible.Corollaries 1 and 2 provide sufficient conditions for strict improvements when we use the upper bounds (8) and (7) respectively. Corollary 1 Given Pd, Pg, and some β ∈(0, 1], assume Pd dPg dPd = 0 < β. Let Q† β be as defined in Theorem 2. If Q is such that Df(Q ∥Q† β) ≤γDf(Pg ∥Pd) (10) for γ ∈[0, 1], then Df((1 −β)Pg + βQ ∥Pd) ≤(1 −β(1 −γ))Df(Pg ∥Pd). Corollary 2 Let f ∈FH. Take any β ∈(0, 1], Pd, Pg, and let Q∗ β be as defined in Theorem 1. If Q is such that Df(Q ∥Q∗ β) ≤γDf(Pg ∥Pd) (11) for some γ ∈[0, 1], then Df((1 −β)Pg + βQ ∥Pd) ≤Cγ,β · Df(Pg ∥Pd) , where Cγ,β = √γβ + √1 −β 2 is strictly smaller than 1 as soon as γ < β/4 (and β > 0). Conditions 10 and 11 may be compared to the “weak learnability” condition of AdaBoost. As long as our weak learner is able to solve the surrogate problem (3) of matching respectively Q† β or Q∗ β accurately enough, the original objective (5) is guaranteed to decrease as well. It should be however noted that Condition 11 with γ < β/4 is perhaps too strong to call it “weak learnability”. Indeed, as already mentioned before, the weight β is expected to decrease to zero as the number of components in the mixture distribution Pg increases. This leads to γ →0, making it harder to meet Condition 11. This obstacle may be partially resolved by the fact that we will use a GAN to fit Q, which corresponds to a relatively rich6 class of models G in (3). In other words, our weak learner is not so weak. On the other hand, Condition 10 of Corollary 1 is milder. No matter what γ ∈[0, 1] and β ∈(0, 1] are, the new component Q is guaranteed to strictly improve the objective functional. This comes at the price of the additional condition Pd(dPg/dPd = 0) < β, which asserts that β should be larger than the mass of true data Pd missed by the current model Pg. We argue that this is a rather reasonable condition: if Pg misses many modes of Pd we would prefer assigning a relatively large weight β to the new component Q. However, in practice, both Conditions 10 and 11 are difficult to check. A rigorous analysis of situations when they are guaranteed is a direction for future research. 6The hardness of meeting Condition 11 of course largely depends on the class of models G used to fit Q in (3). For now we ignore this question and leave it for future research. 6 3 AdaGAN We now describe the functions ChooseMixtureWeight and UpdateTrainingWeights of Algorithm 1. The complete AdaGAN meta-algorithm with the details of UpdateTrainingWeight and ChooseMixtureWeight, is summarized in Algorithm 3 of Appendix A. UpdateTrainingWeights At each iteration we add a new component Q to the current mixture Pg with weight β. The component Q should approach the “optimal target” Q∗ β provided by (9) in Theorem 1. This distribution depends on the density ratio dPg/dPd, which is not directly accessible, but it can be estimated using adversarial training. Indeed, we can train a separate mixture discriminator DM to distinguish between samples from Pd and samples from the current mixture Pg. It is known [13] that for an arbitrary f-divergence, there exists a corresponding function h such that the values of the optimal discriminator DM are related to the density ratio by dPg dPd (x) = h DM(x) . (12) We can replace dPg(x)/dPd(x) in (9) with h DM(x) . For the Jensen-Shannon divergence, used by the original GAN algorithm, h(z) = 1−z z . In practice, when we compute dQ∗ β on the training sample SN = (X1, . . . , XN), each example Xi receives weight wi = 1 βN λ∗−(1 −β)h(di) + , where di = DM(Xi) . (13) The only remaining task is to determine λ∗. As the weights wi in (13) must sum to 1, we get: λ∗= β P i∈I(λ∗) pi 1 + (1 −β) β X i∈I(λ∗) pih(di) (14) where I(λ) := {i : λ > (1 −β)h(di)}. To find I(λ∗), we sort h(di) in increasing order: h(d1) ≤ . . . ≤h(dN). Then I(λ∗) is a set consisting of the first k indices. We then successively test all k-s until the λ given by (14) verifies (1−β)h(dk) < λ ≤(1−β)h(dk+1) . This procedure is guaranteed to converge by Theorem 1. It is summarized in Algorithm 2 of Appendix A ChooseMixtureWeight For every β there is an optimal re-weighting scheme with weights given by (13). If the GAN could perfectly approximate its target Q∗ β, then choosing β = 1 would be optimal, because Q∗ 1 = Pd. But in practice, GANs cannot do that. So we propose to choose β heuristically by imposing that each generator of the final mixture model has same weight. This yields βt = 1/t, where t is the iteration index. Other heuristics are proposed in Appendix B, but did not lead to any significant difference. The optimal discriminator In practice it is of course hard to find the optimal discriminator DM achieving the global maximum of the variational representation for the f-divergence and verifying (12). For the JS-divergence this would mean that DM is the classifier achieving minimal expected crossentropy loss in the binary classification between Pg and Pd. In practice, we observed that the reweighting (13) leads to the desired property of emphasizing at least some of the missing modes as long as DM distinguishes reasonably between data points already covered by the current model Pg and those which are still missing. We found an early stopping (while training DM) sufficient to achieve this. In the worst case, when DM overfits and returns 1 for all true data points, the reweighting simply leads to the uniform distribution over the training set. 4 Experiments We ran AdaGAN7 on toy datasets, for which we can interpret the missing modes in a clear and reproducible way, and on MNIST, which is a high-dimensional dataset. The goal of these experiments was not to evaluate the visual quality of individual sample points, but to demonstrate that the re-weighting scheme of AdaGAN promotes diversity and effectively covers the missing modes. 7Code available online at https://github.com/tolstikhin/adagan 7 Toy Datasets Our target distribution is a mixture of isotropic Gaussians over R2. The distances between the means are large enough to roughly avoid overlaps between different Gaussian components. We vary the number of modes to test how well each algorithm performs when there are fewer or more expected modes. We compare the baseline GAN algorithm with AdaGAN variations, and with other meta-algorithms that all use the same underlying GAN procedure. For details on these algorithms and on the architectures of the underlying generator and discriminator, see Appendix B. To evaluate how well the generated distribution matches the target distribution, we use a coverage metric C. We compute the probability mass of the true data “covered” by the model Pmodel. More precisely, we compute C := Pd(dPmodel > t) with t such that Pmodel(dPmodel > t) = 0.95. This metric is more interpretable than the likelihood, making it easier to assess the difference in performance of the algorithms. To approximate the density of Pmodel we use a kernel density estimation, where the bandwidth is chosen by cross validation. We repeat the run 35 times with the same parameters (but different random seeds). For each run, the learning rate is optimized using a grid search on a validation set. We report the median over those multiple runs, and the interval corresponding to the 5% and 95% percentiles. Figure 2 summarizes the performance of algorithms as a function of the number of iterations T. Both the ensemble and the boosting approaches significantly outperform the vanilla GAN and the “best of T” algorithm. Interestingly, the improvements are significant even after just one or two additional iterations (T = 2 or 3). Our boosting approach converges much faster. In addition, its variance is much lower, improving the likelihood that a given run gives good results. On this setup, the vanilla GAN approach has a significant number of catastrophic failures (visible in the lower bounds of the intervals). Further empirical results are available in Appendix B, where we compared AdaGAN variations to several other baseline meta-algorithms in more details (Table 1) and combined AdaGAN with the unrolled GANs (UGAN) [4] (Figure 3). Interestingly, Figure 3 shows that AdaGAN ran with UGAN outperforms the vanilla UGAN on the toy datasets, demonstrating the advantage of using AdaGAN as a way to further improve the mode coverage of any existing GAN implementations. Figure 1: Coverage C of the true data by the model distribution P T model, as a function of iterations T. Experiments correspond to the data distribution with 5 modes. Each blue point is the median over 35 runs. Green intervals are defined by the 5% and 95% percentiles (see Section 4). Iteration 0 is equivalent to one vanilla GAN. The left plot corresponds to taking the best generator out of T runs. The middle plot is an “ensemble” GAN, simply taking a uniform mixture of T independently trained GAN generators. The right plot corresponds to our boosting approach (AdaGAN), with βt = 1/t. MNIST and MNIST3 We ran experiments both on the original MNIST and on the 3-digit MNIST (MNIST3) [5, 4] dataset, obtained by concatenating 3 randomly chosen MNIST images to form a 3-digit number between 0 and 999. According to [5, 4], MNIST contains 10 modes, while MNIST3 contains 1000 modes, and these modes can be detected using the pre-trained MNIST classifier. We combined AdaGAN both with simple MLP GANs and DCGANs [19]. We used T ∈{5, 10}, tried models of various sizes and performed a reasonable amount of hyperparameter search. Similarly to [4, Sec 3.3.1] we failed to reproduce the missing modes problem for MNIST3 reported in [5] and found that simple GAN architectures are capable of generating all 1000 numbers. The authors of [4] proposed to artificially introduce the missing modes again by limiting the generators’ flexibility. In our experiments, GANs trained with the architectures reported in [4] were often generating poorly looking digits. As a result, the pre-trained MNIST classifier was outputting random labels, which again led to full coverage of the 1000 numbers. We tried to threshold the confidence of the pre-trained classifier, but decided that this metric was too ad-hoc. 8 Figure 2: Digits from the MNIST dataset corresponding to the smallest (left) and largest (right) weights, obtained by the AdaGAN procedure (see Section 3) in one of the runs. Bold digits (left) are already covered and next GAN will concentrate on thin (right) digits. For MNIST we noticed that the re-weighted distribution was often concentrating its mass on digits having very specific strokes: on different rounds it could highlight thick, thin, vertical, or diagonal digits, indicating that these traits were underrepresented in the generated samples (see Figure 2). This suggests that AdaGAN does a reasonable job at picking up different modes of the dataset, but also that there are more than 10 modes in MNIST (and more than 1000 in MNIST3). It is not clear how to evaluate the quality of generative models in this context. We also tried to use the “inversion” metric discussed in Section 3.4.1 of [4]. For MNIST3 we noticed that a single GAN was capable of reconstructing most of the training points very accurately both visually and in the ℓ2-reconstruction sense. The “inversion” metric tests whether the trained model can generate certain examples or not, but unfortunately it does not take into account the probabilities of doing so. 5 Conclusion We studied the problem of minimizing general f-divergences with additive mixtures of distributions. The main contribution of this work is a detailed theoretical analysis, which naturally leads to an iterative greedy procedure. On every iteration the mixture is updated with a new component, which minimizes f-divergence with a re-weighted target distribution. We provided conditions under which this procedure is guaranteed to converge to the target distribution at an exponential rate. While our results can be combined with any generative modelling techniques, we focused on GANs and provided a boosting-style algorithm AdaGAN. Preliminary experiments show that AdaGAN successfully produces a mixture which iteratively covers the missing modes. References [1] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. [2] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. [3] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein GAN. arXiv:1701.07875, 2017. [4] L. Metz, B. Poole, D. Pfau, and J. Sohl-Dickstein. Unrolled generative adversarial networks. arXiv:1611.02163, 2017. [5] Tong Che, Yanran Li, Athul Paul Jacob, Yoshua Bengio, and Wenjie Li. Mode regularized generative adversarial networks. arXiv:1612.02136, 2016. [6] Max Welling, Richard S. Zemel, and Geoffrey E. Hinton. Self supervised boosting. In Advances in neural information processing systems, pages 665–672, 2002. [7] Zhuowen Tu. Learning generative models via discriminative approaches. In 2007 IEEE Conference on Computer Vision and Pattern Recognition, pages 1–8. IEEE, 2007. [8] Aditya Grover and Stefano Ermon. Boosted generative models. ICLR 2017 conference submission, 2016. [9] R. M. Neal. Annealed importance sampling. Statistics and Computing, 11(2):125–139, 2001. [10] Saharon Rosset and Eran Segal. Boosting density estimation. In Advances in Neural Information Processing Systems, pages 641–648, 2002. 9 [11] A Barron and J Li. Mixture density estimation. Biometrics, 53:603–618, 1997. [12] Yaxing Wang, Lichao Zhang, and Joost van de Weijer. Ensembles of generative adversarial networks. arXiv:1612.00991, 2016. [13] Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-GAN: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, 2016. [14] F. Liese and K.-J. Miescke. Statistical Decision Theory. Springer, 2008. [15] M. D. Reid and R. C. Williamson. Information, divergence and risk for binary experiments. Journal of Machine Learning Research, 12:731–817, 2011. [16] Bent Fuglede and Flemming Topsoe. Jensen-shannon divergence and hilbert space embedding. In IEEE International Symposium on Information Theory, pages 31–31, 2004. [17] Matthias Hein and Olivier Bousquet. Hilbertian metrics and positive definite kernels on probability measures. In AISTATS, pages 136–143, 2005. [18] Y. Freund and R. 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. [19] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. 10 | 2017 | 540 |
7,053 | Large-Scale Quadratically Constrained Quadratic Program via Low-Discrepancy Sequences Kinjal Basu, Ankan Saha, Shaunak Chatterjee LinkedIn Corporation Mountain View, CA 94043 {kbasu, asaha, shchatte}@linkedin.com Abstract We consider the problem of solving a large-scale Quadratically Constrained Quadratic Program. Such problems occur naturally in many scientific and web applications. Although there are efficient methods which tackle this problem, they are mostly not scalable. In this paper, we develop a method that transforms the quadratic constraint into a linear form by sampling a set of low-discrepancy points [16]. The transformed problem can then be solved by applying any state-of-the-art large-scale quadratic programming solvers. We show the convergence of our approximate solution to the true solution as well as some finite sample error bounds. Experimental results are also shown to prove scalability as well as improved quality of approximation in practice. 1 Introduction In this paper we consider the class of problems called quadratically constrained quadratic programming (QCQP) which take the following form: Minimize x 1 2xT P0x + qT 0 x + r0 subject to 1 2xT Pix + qT i x + ri ≤0, i = 1, . . . , m (1) Ax = b, where P0, . . . , Pm are n × n matrices. If each of these matrices are positive definite, then the optimization problem is convex. In general, however, solving QCQP is NP-hard, which can be verified by easily reducing a 0 −1 integer programming problem (known to be NP-hard) to a QCQP [4]. In spite of that challenge, they form an important class of optimization problems, since they arise naturally in many engineering, scientific and web applications. Two famous examples of QCQP include the max-cut and boolean optimization [11]. Other examples include alignment of kernels in semi-supervised learning [29], learning the kernel matrix in discriminant analysis [28] as well as more general learning of kernel matrices [21], steering direction estimation for radar detection [15], several applications in signal processing [20], the triangulation in computer vision [3] among others. Internet applications handling large scale of data, often model trade-offs between key utilities using constrained optimization formulations [1, 2]. When there is independence among the expected utilities (e.g., click, time spent, revenue obtained) of items, the objective or the constraints corresponding to those utilities are linear. However, in most real life scenarios, there is dependence among expected utilities of items presented together on a web page or mobile app. Examples of such dependence are abundant in newsfeeds, search result pages and most lists of recommendations on the internet. If this dependence is expressed through a linear model, it makes the corresponding objective and/or constraint quadratic. This makes the constrained optimization problem a very large scale QCQP, if 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the dependence matrix (often enumerated by a very large number of members or updates) is positive definite with co-dependent utilities [6]. Although there are a plethora of such applications, solving this problem on a large scale is still extremely challenging. There are two main relaxation techniques that are used to solve a QCQP, namely, semi-definite programming (SDP) and reformulation-linearization technique (RLT) [11]. However, both of them introduce a new variable X = xxT so that the problem becomes linear in X. Then they relax the condition X = xxT by different means. Doing so unfortunately increases the number of variables from n to O(n2). This makes these methods prohibitively expensive for most large scale applications. There is literature comparing these methods which also provides certain combinations and generalizations[4, 5, 22]. However, they all suffer from the same curse of dealing with O(n2) variables. Even when the problem is convex, there are techniques such as second order cone programming [23], which can be efficient, but scalability still remains an important issue with prior QCQP solvers. The focus of this paper is to introduce a novel approximate solution to the convex QCQP problem which can tackle such large-scale situations. We devise an algorithm which approximates the quadratic constraints by a set of linear constraints, thus converting the problem into a quadratic program (QP) [11]. In doing so, we remain with a problem having n variables instead of O(n2). We then apply efficient QP solvers such as Operator Splitting or ADMM [10, 26] which are well adapted for distributed computing, to get the final solution for problems of much larger scale. We theoretically prove the convergence of our technique to the true solution in the limit. We also provide experiments comparing our algorithm to existing state-of-the-art QCQP solvers to show comparative solutions for smaller data size as well as significant scalability in practice, particularly in the large data regime where existing methods fail to converge. To the best of our knowledge, this technique is new and has not been previously explored in the optimization literature. Notation: Throughout the paper, bold small case letters refer to vectors while bold large-case letters refer to matrices. The rest of the paper is structured as follows. In Section 2, we describe the approximate problem, important concepts to understand the sampling scheme as well as the approximation algorithm to convert the problem into a QP. Section 3 contains the proof of convergence, followed by the experimental results in Section 4. Finally, we conclude with some discussion in Section 5. 2 QCQP to QP Approximation For sake of simplicity throughout the paper, we deal with a QCQP having a single quadratic constraint. The procedure detailed in this paper can be easily generalized to multiple constraints. Thus, for the rest of the paper, without loss of generality we consider the problem of the form, Minimize x (x −a)T A(x −a) subject to (x −b)T B(x −b) ≤˜b, (2) Cx = c. This is a special case of the general formulation in (1). For this paper, we restrict our case to A, B ∈Rn×n being positive definite matrices so that the objective function is strongly convex. In this section, we describe the linearization technique to convert the quadratic constraint into a set of N linear constraints. The main idea behind this approximation, is the fact that given any convex set in the Euclidean plane, there exists a convex polytope that covers the set. Let us begin by introducing a few notations. Let P denote the optimization problem (2). Define, S := {x ∈Rn : (x −b)T B(x −b) ≤˜b}. (3) Let ∂S denote the boundary of the ellipsoid S. To generate the N linear constraints for this one quadratic constraint, we generate a set of N points, XN = {x1, . . . , xN} such that each xj ∈∂S for j = 1, . . . , N . The sampling technique to select the point set is given in Section 2.1. Corresponding to these N points we get the following set of N linear constraints, (x −b)T B(xj −b) ≤˜b for j = 1, . . . , N. (4) Looking at it geometrically, it is not hard to see that each of these linear constraints are just tangent planes to S at xj for j = 1, . . . , N. Figure 1 shows a set of six linear constraints for a ellipsoidal 2 feasible set in two dimensions. Thus, using these N linear constraints we can write the approximate optimization problem, P(XN), as follows. Minimize x (x −a)T A(x −a) subject to (x −b)T B(xj −b) ≤˜b for j = 1, . . . , N (5) Cx = c. Now instead of solving P, we solve P(XN) for a large enough value of N. Note that as we sample more points (N →∞), our approximation keeps getting better. x1 x2 x3 x4 x5 x6 S T Figure 1: Converting a quadratic constraint into linear constraints. The tangent planes through the 6 points x1, . . . , x6 create the approximation to S. 2.1 Sampling Scheme The accuracy of the solution of P(XN) solely depends on the choice of XN. The tangent planes to S at those N points create a cover of S. We use the notion of a bounded cover, which we define as follows. Definition 1. Let T be the convex polytope generated by the tangent planes to S at the points x1, . . . , xN ∈∂S. T is said to be a bounded cover of S if, d(T , S) := sup t∈T d(t, S) < ∞, where d(t, S) := infx∈S ∥t −x∥and ∥· ∥denotes the Euclidean distance. The first result shows that there exists a bounded cover with only n + 1 points. Lemma 1. Let S be a n dimensional ellipsoid as defined in (3). Then there exists a bounded cover with n + 1 points. Proof. Note that since S is a compact convex body in Rn, there exists a location translated version of an n-dimensional simplex T = {x ∈Rn + : Pn i=1 xi = K} such that S is contained in the interior of T. We can always shrink T such that each edge touches S tangentially. Since there are n + 1 faces, we will get n + 1 points whose tangent surface creates a bounded cover. Although Lemma 1 gives a simple constructive proof of a bounded cover, it is not what we are truly interested in. What we want is to construct a bounded cover T which is as close as possible to S, thus leading to a better approximation. However note that, choosing the points via a naive sampling can lead to arbitrarily bad enlargements of the feasible set and in the worst case might even create a cover which is not bounded. Hence we need an optimal set of points which creates an optimal bounded cover. Formally, Definition 2. T ∗= T (x∗ 1, . . . , x∗ N) is said to be an optimal bounded cover, if sup t∈T ∗d(t, S) ≤sup t∈T d(t, S) for any bounded cover T generated by any other N-point sets. Moreover, {x∗ 1, . . . , x∗ N} are defined to be the optimal N-point set. Note that we can think of the optimal N-point set as that set of N points which minimize the maximum distance between T and S, i.e. T ∗= argmin T d(T , S). 3 It is not hard to see that the optimal N-point set on the unit circle in two dimensions are the N-th roots of unity, unique up to rotation. This point set also has a very good property. It has been shown that the N-th roots of unity minimize the discrete Riesz energy for the unit circle [14, 17]. The concept of Reisz energy also exists in higher dimensions. Thus, generalizing this result, we choose our optimal N-point set on ∂S which tries to minimize the Reisz energy. We briefly describe it below. 2.1.1 Riesz Energy Riesz energy of a point set AN = {x1, . . . , xN} is defined as Es(AN) := PN i̸=j=1 ∥xi −xj∥−s for a positive real parameter s. There is a vast literature on Riesz energy and its association with “good” configuration of points. It is well known that the measures associated to the optimal point set that minimizes the Riesz energy on ∂S converge to the normalized surface measure of ∂S [17]. Thus using this fact, we can associate the optimal N-point set to the set of N points that minimize the Riesz energy on ∂S. For more details see [18, 19] and the references therein. To describe these good configurations of points, we introduce the concept of equidistribution. We begin with a “good” or equidistributed point set in the unit hypercube (described in Section 2.1.2) and map it to ∂S such that the equidistribution property still holds (described in Section 2.1.3). 2.1.2 Equidistribution Informally, a set of points in the unit hypercube is said to be equidistributed, if the expected number of points inside any axis-parallel subregion, matches the true number of points. One such point set in [0, 1]n is called the (t, m, n)-net in base η, which is defined as a set of N = ηm points in [0, 1]n such that any axis parallel η-adic box with volume ηt−m would contain exactly ηt points. Formally, it is a point set that can attain the optimal integration error of O((log(N))n−1/N) [16] and is usually referred to as a low-discrepancy point set. There is vast literature on easy construction of these point sets. For more details on nets we refer to [16, 24]. 2.1.3 Area preserving map to ∂S Now once we have a point set on [0, 1]n we try to map it to ∂S using a measure preserving transformation so that the equidistribution property remains intact. We describe the mapping in two steps. First we map the point set from [0, 1]n to the hyper-sphere Sn = {x ∈Rn+1 : xT x = 1}. Then we map it to ∂S. The mapping from [0, 1]n to Sn is based on [12]. The cylindrical coordinates of the n-sphere, can be written as x = xn = ( p 1 −t2nxn−1, tn), . . . , x2 = ( q 1 −t2 2x1, t2), x1 = (cos φ, sin φ) where 0 ≤φ ≤2π, −1 ≤td ≤1, xd ∈Sd and d = (1, . . . , n). Thus, an arbitrary point x ∈Sn can be represented through angle φ and heights t2, . . . , tn as, x = x(φ, t2, . . . , tn), 0 ≤φ ≤2π, −1 ≤t2, . . . , tn ≤1. We map a point y = (y1, . . . , yn) ∈[0, 1)n to x ∈Sn using ϕ1(y1) = 2πy1, ϕd(yd) = 1 −2yd (d = 2, . . . , n) and cylindrical coordinates x = Φn(y) = x(ϕ1(y1), ϕ2(y2), . . . , ϕn(yn)). The fact that Φn : [0, 1)n →Sn is an area preserving map has been proved in [12]. Remark. Instead of using (t, m, n)-nets and mapping to Sn, we could have also used spherical t-designs, the existence of which was proved in [9]. However, construction of such sets is still a tough problem in high dimensions. We refer to [13] for more details. Finally, we consider the map ψ to translate the point set from Sn−1 to ∂S. Specifically we define, ψ(x) = p ˜bB−1/2x + b. (6) From the definition of S in (3), it is easy to see that ψ(x) ∈∂S. The next result shows that this is also an area-preserving map, in the sense of normalized surface measures. Lemma 2. Let ψ be a mapping from Sn−1 →∂S as defined in (6). Then for any set A ⊆∂S, σn(A) = λn(ψ−1(A)) where, σn, λn are the normalized surface measure of ∂S and Sn−1 respectively. 4 Proof. Pick any A ⊆∂S. Then we can write, ψ−1(A) = ( 1 p ˜b B1/2(x −b) : x ∈A ) . Now since the linear shift does not change the surface area, we have, λn(ψ−1(A)) = λn ( 1 p ˜b B1/2(x −b) : x ∈A )! = λn ( 1 p ˜b B1/2x : x ∈A )! = σn(A), where the last equality follows from the definition of normalized surface measures and noting that B1/2x/ p ˜b ∈Sn−1. This completes the proof. Using Lemma 2 we see that the map ψ ◦Φn−1 : [0, 1)n−1 →∂S, is a measure preserving map. Using this map and the (t, m, n −1) net in base η, we derive the optimal ηm-point set on ∂S. Figure 2 shows how we transform a (0, 7, 2)-net in base 2 to a sphere and then to an ellipsoid. For more general geometric constructions we refer to [7, 8]. Figure 2: The left panel shows a (0, 7, 2)-net in base 2 which is mapped to a sphere in 3 dimensions (middle panel) and then mapped to the ellipsoid as seen in the right panel. 2.2 Algorithm and Efficient Solution From the description in the previous section we are now at a stage to describe the approximation algorithm. We approximate the problem P by P(XN) using a set of points x1, . . . , xN as described in Algorithm 1. Once we formulate the problem P as P(XN), we solve the large scale QP via Algorithm 1 Point Simulation on ∂S 1: Input : B, b,˜b to specify S and N = ηm points 2: Output : x1, . . . , xN ∈∂S 3: Generate y1, . . . , yN as a (t, m, n −1)-net in base η. 4: for i ∈1, . . . , N do 5: xi = ψ ◦Φn−1(yi) 6: end for 7: return x1, . . . , xN state-of-the-art solvers such as Operator Splitting or Block Splitting approaches [10, 25, 26]. 3 Convergence of P(XN) to P In this section, we shall show that if we follow Algorithm 1 to generate the approximate problem P(XN), then we converge to the original problem P as N →∞. We shall also prove some finite sample results to give error bounds on the solution to P(XN). We start by introducing some notation. 5 Let x∗, x∗(N) denote the solution to P and P(XN) respectively and f(·) denote the strongly convex objective function in (2), i.e., for ease of notation f(x) = (x −a)T A(x −a). We begin with our main result. Theorem 1. Let P be the QCQP defined in (2) and P(XN) be the approximate QP problem defined in (5) via Algorithm 1. Then, P(XN) →P as N →∞in the sense that limN→∞∥x∗(N) −x∗∥= 0. Proof. Fix any N. Let TN denote the optimal bounded cover constructed with N points on ∂S. Note that to prove the result, it is enough to show that TN →S as N →∞. This guarantees that linear constraints of P(XN) converge to the quadratic constraint of P, and hence the two problems match. Now since S ⊆TN for all N, it is easy to see that S ⊆limN→∞TN. To prove the converse, let t0 ∈limN→∞TN but t0 ̸∈S. Thus, d(t0, S) > 0. Let t1 denote the projection of t0 onto S. Thus, t0 ̸= t1 ∈∂S. Choose ϵ to be arbitrarily small and consider any region Aϵ around t1 on ∂S such that d(x, t1) ≤ϵ for all x ∈Aϵ. Here d denotes the surface distance function. Now, by the equidistribution property of Algorithm 1 as N →∞, there exists a point t∗∈Aϵ, the tangent plane through which cuts the plane joining t0 and t1. Thus, t0 ̸∈limN→∞TN. Hence, we get a contradiction and the result is proved. As a simple Corollary to Theorem 1 it is easy to see that as limN→∞|f(x∗(N)) −f(x∗)| = 0. We now move to some finite sample results. Theorem 2. Let g : N →R such that limn→∞g(n) = 0. Further assume that ∥x∗(N) −x∗∥≤ C1g(N) for some constant C1 > 0. Then, |f(x∗(N)) −f(x∗)| ≤C2g(N) where C2 > 0 is a constant. Proof. We begin by bounding the ∥x∗∥. Note that since x∗satisfies the constraint of the optimization problem, we have, ˜b ≥(x∗−b)T B(x∗−b) ≥σmin(B)∥x∗−b∥2, where σmin(B) denotes the smallest singular value of B. Thus, ∥x∗∥≤∥b∥+ s ˜b σmin(B). (7) Now, since f(x) = (x −a)T A(x −a) and ∇f(x) = 2A(x −a), we can write f(x) = f(x∗) + Z 1 0 ⟨∇f(x∗+ t(x −x∗)), x −x∗⟩dt = f(x∗) + ⟨∇f(x∗), x −x∗⟩+ Z 1 0 ⟨∇f(x∗+ t(x −x∗)) −∇f(x∗), x −x∗⟩dt = I1 + I2 + I3 (say) . Now, we can bound the last term as follows. Observe that using Cauchy-Schwarz inequality, |I3| ≤ Z 1 0 |⟨∇f(x∗+ t(x −x∗)) −∇f(x∗), x −x∗⟩| dt ≤ Z 1 0 ∥∇f(x∗+ t(x −x∗)) −∇f(x∗)∥∥x −x∗∥dt ≤2σmax(A) Z 1 0 ∥t(x −x∗)∥∥x −x∗∥dt = σmax(A)∥x −x∗∥2, where σmax(A) denotes the largest singular value of A. Thus, we have f(x) = f(x∗) + ⟨∇f(x∗), x −x∗⟩+ ˜C∥x −x∗∥2 (8) where | ˜C| ≤σmax(A). Furthermore, |⟨∇f(x∗), x∗(N) −x∗⟩| = |⟨2A(x∗−a), x∗(N) −x∗⟩| ≤2σmax(A)(∥x∗∥+ ∥a∥)∥x∗(N) −x∗∥ ≤2C1σmax(A) s ˜b σmin(B) + ∥b∥+ ∥a∥ g(N), (9) 6 where the last line inequality follows from (7). Combining (8) and (9) the result follows. Note that the function g gives us an idea about how fast x∗(N) converges x∗. To help, identify the function g we state the following results. Lemma 3. If f(x∗) = f(x∗(N)), then x∗= x∗(N). Furthermore, if f(x∗) ≥f(x∗(N)), then x∗∈∂U and x∗(N) ̸∈U, where U = S ∩{x : Cx = c} is the feasible set for (2). Proof. Let V = TN ∩{x : Cx = c}. It is easy to see that U ⊆V. Assume f(x∗) = f(x∗(N)), but x∗̸= x∗(N). Note that x∗, x∗(N) ∈V. Since V is convex, consider a line joining x∗and x∗(N). For any point λt = tx∗+ (1 −t)x∗(N), f(λt) ≤tf(x∗) + (1 −t)f(x∗(N)) = f(x∗(N)). Thus, f is constant on the line joining x∗and x∗(N). But, it is known that f is strongly convex since A is positive definite [27]. Thus, there exists only one unique minimum. Hence, we have a contradiction, which proves x∗= x∗(N). Now let us assume that f(x∗) ≥f(x∗(N)). Clearly, x∗(N) ̸∈U. Suppose x∗∈ ◦U, the interior of U. Let ˜x ∈∂U denote the point on the line joining x∗and x∗(N). Clearly, ˜x = tx∗+ (1 −t)x∗(N) for some t > 0. Thus, f(˜x) < tf(x∗) + (1 − t)f(x∗(N)) ≤f(x∗). But x∗is the minimizer over U. Thus, we have a contradiction, which gives x∗∈∂U. This completes the proof. Lemma 4. Following the notation of Lemma 3, if x∗(N) ̸∈U, then x∗lies on ∂U and no point on the line joining x∗and x∗(N) lies in S. Proof. Since the gradient of f is linear, the result follows from a similar argument to Lemma 3. Based on the above two results we can identify the function g by considering the maximum distance of the points lying on the conic cap to the hyperplanes forming it. That is g(N) is the maximum distance between a point x ∈∂S and a point in t ∈T such the line joining x and t do not intersect S and hence, lie completely within the conic section. This is highly dependent on the shape of S and on the cover TN. For example, if S is the unit circle in two dimensions, then the optimal N-point set are the N-th roots of unity. In which case, there are N equivalent conic sections C1, . . . , CN which are created by the intersections of ∂S with TN. Figure 3 elaborates these regions. C1 C2 C3 C4 C5 C6 π/6 Figure 3: The shaded region shows the 6 equivalent conic regions, C1, . . . , C6. To formally define g(N) in this situation, let us define A(t, x) to be the set of all points in the line joining t ∈T and x ∈∂S. Now, it is easy to see that, g(N) := max i=1,...,N sup t,x:A(t,x)∈Ci ∥t −x∥= tan π N = O 1 N , (10) where the bound follows from using the Taylor series expansion of tan(x). Combining this observation with Theorem 2 shows that in order to get an objective value within ϵ of the true optimal, we would need N to be a constant multiplier of ϵ−1. More such results can be achieved by such explicit calculations over various different domains S. 7 4 Experimental Results We compare our proposed technique to the current state-of-the-art solvers of QCQP. Specifically, we compare it to the SDP and RLT relaxation procedures as described in [4]. For small enough problems, we also compare our method to the exact solution by interior point methods. Furthermore, we provide empirical evidence to show that our sampling technique is better than other simpler sampling procedures such as uniform sampling on the unit square or on the unit sphere and then mapping it subsequently to our domain as in Algorithm 1. We begin by considering a very simple QCQP for the form Minimize x xT Ax subject to (x −x0)T B(x −x0) ≤˜b, l ≤x ≤u. (11) We randomly sample A, B, x0 and ˜b keeping the problem convex. The lower bound, l and upper bounds u are chosen in a way such that they intersect the ellipsoid. We vary the dimension n of the problem and tabulate the final objective value as well as the time taken for the different procedures to converge in Table 1. The stopping criteria throughout our simulation is same as that of Operator Splitting algorithm as presented in [26]. Table 1: The Optimal Objective Value and Convergence Time n Our Method Sampling Sampling SDP RLT Exact on [0, 1]n on Sn 5 3.00 2.99 2.95 3.07 3.08 3.07 (4.61s) (4.74s) (6. 11s) (0.52s) (0.51s) (0.49) 10 206.85 205.21 206.5 252.88 252.88 252.88 (5.04s) (5.65s) (5.26s) (0.53s) (0.51s) (0.51) 20 6291.4 4507.8 5052.2 6841.6 6841.6 6841.6 (6.56s) (6.28s) (6.69s) (2.05s) (1.86s) (0.54) 50 99668 15122 26239 1.11 × 105 1.08 × 105 1.11 × 105 (15.55s) (18.98s) (17.32s) (4.31s) (2.96s) (0.64) 100 1.40 × 106 69746 1.24 × 106 1.62 × 106 1.52 × 106 1.62 × 106 (58.41s) (1.03m) (54.69s) (30.41s) (15.36s) (2.30s) 1000 2.24 × 107 8.34 × 106 9.02 × 106 NA NA NA (14.87m) (15.63m) (15.32m) 105 3.10 × 108 7.12 × 107 8.39 × 107 NA NA NA (25.82m) (24.59m) (27.23m) 106 3.91 × 109 2.69 × 108 7.53 × 108 NA NA NA (38.30m) (39.15m) (37.21m) Throughout our simulations, we have chosen η = 2 and the number of optimal points as N = max(1024, 2m), where m is the smallest integer such that 2m ≥10n. Note that even though the SDP and the interior point methods converge very efficiently for small values of n, they cannot scale to values of n ≥1000, which is where the strength of our method becomes evident. From Table 1 we observe that the relaxation procedures SDP and RLT fail to converge within an hour of computation time for n ≥1000, whereas all the approximation procedures can easily scale up to n = 106 variables. Moreover, since the A, B were randomly sampled, we have seen that the true optimal solution occurred at the boundary. Therefore, relaxing the constraint to linear forced the solution to occur outside of the feasible set, as seen from the results in Table 1 as well as from Lemma 3. However, that is not a concern, since increasing N will definitely bring us closer to the feasible set. The exact choice of N differs from problem to problem but can be computed as we did with the small example in (10). Finally, the last column in Table 1 is obtained by solving the problem using cvx in MATLAB using via SeDuMi and SDPT3, which gives the true x∗. Furthermore, our procedure gives the best approximation result when compared to the remaining two sampling schemes. Lemma 3 shows that if the both the objective values are the same then we indeed get the exact solution. To see how much the approximation deviates from the truth, we also plot the log of the relative squared error, i.e. log(∥x∗(N) −x∗∥2/∥x∗∥2) for each of the sampling 8 procedures in Figure 4. Throughout this simulation, we keep N fixed at 1024. This is why we see that the error level increases with the increase in dimension. We omit SDP and RLT results in Figure −3 −2 −1 0 1 2 5 10 20 50 100 Dimension of the Problem log (Relative Square Error) Method Low Discrepancy Sampling Uniform Sampling on Square Uniform Sampling on Sphere Figure 4: The log of the relative squared error log(∥x∗(N) −x∗∥2/∥x∗∥2) with N fixed at 1024 and varying dimension n. 4 since both of them produce a solution very close to the exact minimum for small n. If we grow this N with the dimension, then we see that the increasing trend vanishes and we get much more accurate results as seen in Figure 5. We plot both the log of relative squared error as well as the log of the feasibility error, where the feasibility error is defined as Feasibility Error = (x∗(N) −x0)T B(x∗(N) −x0) −˜b + where (x)+ denotes the positive part of x. −16 −14 −12 −10 −8 −6 −4 −2 2 3 4 5 6 7 log(Number of Constraints) log(Relative Squared Error) Dimension 5 10 20 −6 −4 −2 0 2 3 4 5 6 7 log(Number of Constraints) log(FeasibilityError) Dimension 5 10 20 Figure 5: The plot on the left panel and the right panel shows the decay in the relative squared error and the feasibility error respectively, for our method, as we increase N for various dimensions. From these results, it is clear that our procedure gets the smallest relative error compared to the other sampling schemes, and increasing N brings us closer to the feasible set, with better accurate results. 5 Discussion and Future Work In this paper, we look at the problem of solving a large scale QCQP problem by relaxing the quadratic constraint by a near-optimal sampling scheme. This approximate method can scale up to very large problem sizes, while generating solutions which have good theoretical properties of convergence. Theorem 2 gives us an upper bound as a function of g(N), which can be explicitly calculated for different problems. To get the rate as a function of the dimension n, we need to understand how the maximum and minimum eigenvalues of the two matrices A and B grow with n. One idea is to use random matrix theory to come up with a probabilistic bound. Because of the nature of complexity of these problems, we believe they deserve special attention and hence we leave them to future work. We also believe that this technique can be immensely important in several applications. Our next step is to do a detailed study where we apply this technique on some of these applications and empirically compare it with other existing large-scale commercial solvers such as CPLEX and ADMM based techniques for SDP. 9 Acknowledgment We would sincerely like to thank the anonymous referees for their helpful comments which has tremendously improved the paper. We would also like to thank Art Owen, Souvik Ghosh, Ya Xu and Bee-Chung Chen for the helpful discussions. References [1] D. Agarwal, S. Chatterjee, Y. Yang, and L. Zhang. Constrained optimization for homepage relevance. In Proceedings of the 24th International Conference on World Wide Web Companion, pages 375–384. International World Wide Web Conferences Steering Committee, 2015. [2] D. Agarwal, B.-C. Chen, P. Elango, and X. Wang. Personalized click shaping through lagrangian duality for online recommendation. In Proceedings of the 35th international ACM SIGIR conference on Research and development in information retrieval, pages 485–494. ACM, 2012. [3] C. Aholt, S. Agarwal, and R. Thomas. A QCQP Approach to Triangulation. In Proceedings of the 12th European Conference on Computer Vision - Volume Part I, ECCV’12, pages 654–667, Berlin, Heidelberg, 2012. Springer-Verlag. [4] K. M. Anstreicher. Semidefinite programming versus the reformulation-linearization technique for nonconvex quadratically constrained quadratic programming. Journal of Global Optimization, 43(2):471–484, 2009. [5] X. Bao, N. V. Sahinidis, and M. Tawarmalani. Semidefinite relaxations for quadratically constrained quadratic programming: A review and comparisons. Mathematical Programming, 129(1):129–157, 2011. [6] K. Basu, S. Chatterjee, and A. Saha. Constrained Multi-Slot Optimization for Ranking Recommendations. arXiv:1602.04391, 2016. [7] K. Basu and A. B. Owen. Low discrepancy constructions in the triangle. SIAM Journal on Numerical Analysis, 53(2):743–761, 2015. [8] K. Basu and A. B. Owen. Scrambled Geometric Net Integration Over General Product Spaces. Foundations of Computational Mathematics, 17(2):467–496, Apr. 2017. [9] A. V. Bondarenko, D. Radchenko, and M. S. Viazovska. Optimal asymptotic bounds for spherical designs. Annals of Mathematics, 178(2):443–452, 2013. [10] 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 in Machine Learning, 3(1):1–122, 2011. [11] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [12] J. S. Brauchart and J. Dick. Quasi–Monte Carlo rules for numerical integration over the unit sphere S2 . Numerische Mathematik, 121(3):473–502, 2012. [13] J. S. Brauchart and P. J. Grabner. Distributing many points on spheres: minimal energy and designs. Journal of Complexity, 31(3):293–326, 2015. [14] J. S. Brauchart, D. P. Hardin, and E. B. Saff. The riesz energy of the nth roots of unity: an asymptotic expansion for large n. Bulletin of the London Mathematical Society, 41(4):621–633, 2009. [15] A. De Maio, Y. Huang, D. P. Palomar, S. Zhang, and A. Farina. Fractional QCQP with applications in ML steering direction estimation for radar detection. IEEE Transactions on Signal Processing, 59(1):172–185, 2011. [16] J. Dick and F. Pillichshammer. Digital sequences, discrepancy and quasi-Monte Carlo integration. Cambridge University Press, Cambridge, 2010. [17] M. Götz. On the Riesz energy of measures. Journal of Approximation Theory, 122(1):62–78, 2003. [18] P. J. Grabner. Point sets of minimal energy. In Applications of Algebra and Number Theory (Lectures on the Occasion of Harald Niederreiter’s 70th Birthday) (edited by G. Larcher, F. Pillichshammer, A. Winterhof, and C. Xing), pages 109–125, 2014. [19] D. Hardin and E. Saff. Minimal Riesz energy point configurations for rectifiable d-dimensional manifolds. Advances in Mathematics, 193(1):174–204, 2005. 10 [20] Y. Huang and D. P. Palomar. Randomized algorithms for optimal solutions of double-sided QCQP with applications in signal processing. IEEE Transactions on Signal Processing, 62(5):1093–1108, 2014. [21] G. R. G. Lanckriet, N. Cristianini, P. L. Bartlett, L. E. Ghaoui, and M. I. Jordan. Learning the kernel matrix with semi-definite programming. In Machine Learning, Proceedings of (ICML 2002), pages 323–330, 2002. [22] J. B. Lasserre. Semidefinite programming vs. LP relaxations for polynomial programming. Mathematics of Operations Research, 27(2):347–360, 2002. [23] Y. Nesterov and A. Nemirovskii. Interior-point polynomial algorithms in convex programming. SIAM, 1994. [24] H. Niederreiter. Random Number Generation and Quasi-Monte Carlo Methods. SIAM, Philadelphia, PA, 1992. [25] B. O’Donoghue, E. Chu, N. Parikh, and S. Boyd. Conic optimization via operator splitting and homogeneous self-dual embedding. Journal of Optimization Theory and Applications, 169(3):1042–1068, 2016. [26] N. Parikh and S. Boyd. Block splitting for distributed optimization. Mathematical Programming Computation, 6(1):77–102, 2014. [27] R. T. Rockafellar. Convex analysis, 1970. [28] J. Ye, S. Ji, and J. Chen. Learning the kernel matrix in discriminant analysis via quadratically constrained quadratic programming. In Proceedings of the 13th ACM SIGKDD 2007, pages 854–863, 2007. [29] X. Zhu, J. Kandola, J. Lafferty, and Z. Ghahramani. Graph kernels by spectral transforms. Semi-supervised learning, pages 277–291, 2006. 11 | 2017 | 541 |
7,054 | Graph Matching via Multiplicative Update Algorithm Bo Jiang School of Computer Science and Technology Anhui University, China jiangbo@ahu.edu.cn Jin Tang School of Computer Science and Technology Anhui University, China tj@ahu.edu.cn Chris Ding CSE Department, University of Texas at Arlington, Arlington, USA chqding@uta.edu Yihong Gong School of Electronic and Information Engineering Xi’an Jiaotong University, China ygong@mail.xjtu.edu.cn Bin Luo School of Computer Science and Technology, Anhui University, China luobin@ahu.edu.cn Abstract As a fundamental problem in computer vision, graph matching problem can usually be formulated as a Quadratic Programming (QP) problem with doubly stochastic and discrete (integer) constraints. Since it is NP-hard, approximate algorithms are required. In this paper, we present a new algorithm, called Multiplicative Update Graph Matching (MPGM), that develops a multiplicative update technique to solve the QP matching problem. MPGM has three main benefits: (1) theoretically, MPGM solves the general QP problem with doubly stochastic constraint naturally whose convergence and KKT optimality are guaranteed. (2) Empirically, MPGM generally returns a sparse solution and thus can also incorporate the discrete constraint approximately. (3) It is efficient and simple to implement. Experimental results show the benefits of MPGM algorithm. 1 Introduction In computer vision and machine learning area, many problems of interest can be formulated by graph matching problem. Previous approaches [3–5, 15, 16] have formulated graph matching as a Quadratic Programming (QP) problem with both doubly stochastic and discrete constraints. Since it is known to be NP-hard, many approximate algorithms have been developed to find approximate solutions for this problem [8, 16, 21, 24, 20, 13]. One kind of approximate methods generally first develop a continuous problem by relaxing the discrete constraint and aim to find the optimal solution for this continuous problem. After that, they obtain the final discrete solution by using a discretization step such as Hungarian or greedy algorithm [3, 15, 16]. Obviously, the discretization step of these methods is generally independent of the matching objective optimization process which may lead to weak local optimum for the problem. Another kind of methods aim to obtain a discrete solution for QP matching problem [16, 1, 24]. For example, Leordeanu et al. [16] proposed an iterative matching method (IPFP) which optimized the QP matching problem in a discrete domain. Zhou et al. [24, 25] proposed an effective graph matching method (FGM) which optimized the QP matching problem approximately using a convexconcave relaxation technique [21] and thus returns a discrete solution for the problem. From optimization aspect, the core optimization algorithm used in both IPFP [16] and FGM [24] is related to Frank-Wolfe [9] algorithm and FGM [24, 25] further uses a path following procedure to alleviate the local-optimum problem more carefully. The core of Frank-Wolfe [9] algorithm is to optimize the quadratic problem by sequentially optimizing the linear approximations of QP problem. In addition 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. to optimization-based methods, probabilistic methods can also be used for solving graph matching problems [3, 19, 23]. In this paper, we propose a new algorithm, called Multiplicative Update Graph Matching (MPGM), that develops a multiplicative update technique for the general QP problem with doubly stochastic constraint. Generally, MPGM has the following three main aspects. First, MPGM solves the general QP problem with doubly stochastic constraint directly and naturally. In MPGM algorithm, each update step has a closed-form solution and the convergence of the algorithm is also guaranteed. Moreover, the converged solution is guaranteed to be Karush-Kuhn-Tucker (KKT) optimality. Second, empirically, MPGM can generate a sparse solution and thus incorporates the discrete constraint naturally in optimization. Therefore, MPGM can obtain a local optimal discrete solution for the QP matching problem. Third, it is efficient and simple to implement. Experimental results on both synthetic and real-world matching tasks demonstrate the effectiveness and benefits of the proposed MPGM algorithm. 2 Problem Formulation and Related Works Problem Formulation. Assume G = (V, E) and G′ = (V ′, E′) are two attributed graphs to be matched, where each node vi ∈V or edge eik ∈E has an attribute vector ai or rik. The aim of graph matching problem is to establish the correct correspondences between V and V ′. For each correspondence (vi, v′ j), there is an affinity Sa(ai, a′ j) that measures how well node vi ∈V matches node v′ j ∈V ′. Also, for each correspondence pair (vi, v′ j) and (vk, v′ l), there is an affinity Sr(rik, r′ jl) that measures the compatibility between node pair (vi, vk) and (v′ j, v′ l). One can define an affinity matrix W whose diagonal term Wij,ij represents Sa(ai, a′ j), and the non-diagonal element Wij,kl contains Sr(rik, r′ jl). The one-to-one correspondences can be represented by a permutation matrix X ∈{0, 1}n×n, where n = |V | = |V ′|1. Here, Xij = 1 implies that node vi in G corresponds to node v′ j in G′, and Xij = 0 otherwise. In this paper, we denote x = (X11...Xn1, ..., X1n...Xnn)T as a column-wise vectorized replica of X. The graph matching problem is generally formulated as a Quadratic Programming (QP) problem with doubly stochastic and discrete constraints [16, 3, 10], i.e., x∗= arg max x (xTWx) s.t. x ∈P, (1) where P is defined as, P = {x | ∀i ∑n j=1 xij = 1, ∀j ∑n i=1 xij = 1, xij ∈{0, 1}} (2) The above QP problem is NP-hard and thus approximate relaxations are usually required. One popular way is to relax the permutation domain P to the doubly stochastic domain D, D = {x|∀i ∑n j=1 xij = 1, ∀j ∑n i=1 xij = 1, xij ≥0}. (3) That is solving the following relaxed matching problem [21, 20, 10], x∗= arg max x (xTWx) s.t. x ∈D. (4) Since W is not necessarliy positive (or negative) semi-definite, thus this problem is generally not a concave or convex problem. Related Works. Many algorithms have been proposed to find a local optimal solution for the above QP matching problem (Eq.(4)). One kind of popular methods is to use constraint relaxation and projection, such as GA [10] and RRWM [3]. Generally, they iteratively conduct the following two steps: (a) searching for a solution by ignoring the doubly stochastic constraint temporarily; (b) Projecting the current solution onto the desired doubly stochastic domain to obtain a feasible solution. Note that the projection step (b) is generally independent of the optimization step (a) and thus may lead to weak local optimum. Another kind of important methods is to use objective function approximation and thus solves the problem approximately, such as Frank-Wolfe algorithm [9]. Frank-Wolfe aims to optimize the above quadratic problem by sequentially solving the approximate linear problems. This algorithm has been widely adopted in many recent matching methods [16, 24, 21], such as IPFP [16] and FGM [24]. 1Here, we focus on equal-size graph matching problem. For graphs with different sizes, one can add dummy isolated nodes into the smaller graph and transform them to equal-size case [21, 10] 2 3 Algorithm Our aim in this paper is to develop a new algorithm to solve the general QP matching problem Eq.(4). We call it as Multiplicative Update Graph Matching (MPGM). Formally, starting with an initial solution vector x(0), MPGM solves the problem Eq.(4) by iteratively updating a current solution vector x(t), t = 0, 1... as follows, x(t+1) kl = x(t) kl [2(Wx(t))kl + Λ− k + Γ− l Λ+ k + Γ+ l ]1/2 , (5) where Λ+ k = (|Λk| + Λk)/2, Λ− k = (|Λk| −Λk)/2, Γ+ k = (|Γk| + Γk)/2, Γ− k = (|Γk| −Γk)/2, and the Lagrangian multipliers (Λ, Γ) are computed as, Γ =2 ( I −X(t)TX(t))−1[ diag ( K(t)TX(t)) −X(t)T diag ( K(t)X(t)T)] Λ =2 diag ( K(t)X(t)T) −X(t)Γ (6) where K(t), X(t) are the matrix forms of vector (Wx(t)) and x(t), respectively, i.e., K(t), X(t) ∈ Rn×n and K(t) kl = (Wx(t))kl, X(t) kl = x(t) kl . Λ = (Λ1, · · · Λn)T ∈Rn×1, Γ = (Γ1, · · · Γn)T ∈ Rn×1. The iteration starts with an initial x(0) and is repeated until convergence. Complexity. The main complexity in each iteration is on computing Wx(t). Thus, the total computational complexity for MPGM is less than O(MN 2), where N = n2 is the length of vector x(t) and M is the maximum iteration. Our experience is that the algorithm converges quickly and the average maximum iteration M is generally less than 200. Theoretically, the complexity of MPGM is the same with RRWM [3] and IPFP [16], but obviously lower than GA [10] and FGM [24]. Comparison with Related Works. Multiplicative update algorithms have been studied in solving matching problems [6, 13, 11, 12]. Our work is significantly different from previous works in the following aspects. Previous works [6, 13, 11] generally first develop a kind of approximation (or relaxation) for QP matching problem by ignoring the doubly stochastic constraint, and then aim to find the optimum of the relaxation problem by developing an algorithm. In contrast, our work focus on the general and challengeable QP problem with doubly stochastic constraint (Eq.(4)), and derive a simple multiplicative algorithm to solve the problem Eq.(4) directly. Note that, the proposed algorithm is not limited to solving QP matching problem only. It can also be used in some other QP (or general continuous objective function) problems with doubly stochastic constraint (e.g. MAP inference, clustering) in machine learning area. In this paper, we focus on graph matching problem. Starting Point. To alleviate the local optima and provide a feasible starting point for MPGM algorithm, given an initial vector x(0), we first use the simple projection x(0) = P(Wx(0)) several times to obtain a kind of the feasible start point for MPGM algorithm. Here P denotes the projection [22] or normalization [20] to make x(0) satisfy the doubly stochastic constraint. 4 Theoretical Analysis Theorem 1. Under update Eq.(5), the Lagrangian function L(x) is monotonically increasing, L(x) = xTWx − n ∑ i=1 Λi( n ∑ j=1 xij −1) − n ∑ j=1 Γj( n ∑ i=1 xij −1) (7) where Λ, Γ are Lagrangian multipliers. Proof. To prove it, we use the auxiliary function approach [7, 14]. An auxiliary function function Φ(x, ˜x) of Lagrangian function L(x) satisfies following, Φ(x, x) = L(x), Φ(x, ˜x) ≤L(x). (8) Using the auxiliary function Φ(x, ˜x), we define x(t+1) = arg max x Φ(x, x(t)). (9) 3 Then by construction of Φ(x, ˜x), we have L(x(t)) = Φ(x(t), x(t)) ≤L(x(t+1)). (10) This proves that L(x(t)) is monotonically increasing. The main step in the following of the proof is to provide an appropriate auxiliary function and find the global maximum for the auxiliary function. We rewrite Eq.(7) as L(x) = xT Wx − n ∑ i=1 Λi( n ∑ j=1 xij −1) − n ∑ j=1 Γj( n ∑ i=1 xij −1) = n ∑ i=1 n ∑ j=1 n ∑ k=1 n ∑ l=1 Wij,klxijxkl − n ∑ i=1 Λi( n ∑ j=1 xij −1) − n ∑ j=1 Γj( n ∑ i=1 xij −1). (11) We show that one auxiliary function Φ(x, ˜x) of L(x) is, Φ(x, ˜x) = n ∑ i=1 n ∑ j=1 n ∑ k=1 n ∑ l=1 Wij,kl˜xij˜xkl ( 1 + log xijxkl ˜xij˜xkl ) (12) − n ∑ i=1 Λ+ i [ n ∑ j=1 1 2(x2 ij ˜xij + ˜xij) −1 ] + n ∑ i=1 Λ− i [ n ∑ j=1 ˜xij(1 + log xij ˜xij ) −1 ] − n ∑ j=1 Γ+ j [ n ∑ i=1 1 2(x2 ij ˜xij + ˜xij) −1 ] + n ∑ j=1 Γ− j [ n ∑ i=1 ˜xij(1 + log xij ˜xij ) −1 ] . Using the inequality z ≥1+log z and ab ≤1 2(a2 +b2)(a ≤1 2( a2 b +b)), one can prove that Eq.(12) is a lower bound of Eq.(11). Thus, Z(x, ˜x) is an auxiliary function of L(x). According to Eq.(9), we need to find the global maximum of Φ(x, ˜x) for x. The gradient is ∂Φ(x, ˜x) ∂xkl = 2(W˜x)kl ˜xkl xkl −Λ+ k xkl ˜xkl + Λ− k ˜xkl xkl −Γ+ l xkl ˜xkl + Γ− l ˜xkl xkl Note that, for graph matching problem, we have WT = W. Thus, the second derivative is ∂2Φ(x, ˜x) ∂xkl∂xij = − [( 2(W˜x)kl + Λ− k + Γ− l ) ˜xkl x2 kl + 1 ˜xkl (Λ+ k + Γ+ l ) ] δkiδlj ≤0, (13) Therefore, Φ(x, ˜x) is a concave function in x and has a unique global maximum. It can be obtained by setting the first derivative to zero ( ∂Φ(x,˜x) ∂xkl = 0), which gives xkl = ˜xkl [2(W˜x)kl + Λ− k + Γ− l Λ+ k + Γ+ l ]1/2 . (14) Therefore, we obtain the update rule in Eq.(5) by setting x(t+1) = x and x(t) = ˜x. □ Theorem 2. Under update Eq.(5), the converged solution x∗is Karush-Kuhn-Tucker (KKT) optimal. Proof. The standard Lagrangian function is L(x) = xTWx − n ∑ i=1 Λi( n ∑ j=1 xij −1) − n ∑ j=1 Γj( n ∑ i=1 xij −1) − n ∑ i=1 n ∑ j=1 ∆ijxij (15) Here, we use the Lagrangian function to induce KKT optimal condition. Using Eq.(15), we have ∂L(x) ∂xkl = 2(Wx)kl −λk −µl. (16) The corresponding KKT condition is ∂L(x) ∂xkl = 2(Wx)kl −Λk −Γl −∆kl = 0 (17) ∂L(x) ∂Λk = −( ∑ l xkl −1) = 0 (18) ∂L(x) ∂Γl = −( ∑ k xkl −1) = 0 (19) ∆klxkl = 0. (20) 4 This leads to the following KKT complementary slackness condition, [ 2(Wx)kl −Λk −Γl ] xkl = 0. (21) Because ∑ l xkl = 1, ∑ k xkl = 1, summing over indexes k and l respectively, we obtain the following two group equations, 2 n ∑ l=1 xkl(Wx)kl − n ∑ l=1 Γlxkl −Λk = 0, (22) 2 n ∑ k=1 xkl(Wx)kl − n ∑ k=1 Λkxkl −Γl = 0. (23) Eqs.(22, 23) can be equivalently reformulated as the following matrix forms, 2 diag(KXT) −Λ −XΓ = 0, (24) 2 diag(KTX) −Γ −XTΛ = 0. (25) where k = 1, 2, · · · n, l = 1, 2, · · · n. K, X are the matrix forms of vector (Wx) and x, respectively, i.e., K, X ∈Rn×n and Kkl = (Wx)kl, Xkl = xkl. Thus, we can obtain the values for Λ and Γ as, Γ = 2(I −XTX)−1(diag(KTX) −XT diag(KXT)) (26) Λ = 2 diag(KXT) −XΓ (27) On the other hand, from update Eq.(5), at convergence, x∗ kl = x∗ kl [2(Wx∗)kl + Λ− k + Γ− l Λ+ k + Γ+ l ]1/2 (28) Thus, we have (2(Wx∗)kl −Λk −Γl)x∗2 kl = 0, which is identical to the following KKT condition, [ 2(Wx∗)kl −Λk −Γl ] x∗ kl = 0. (29) Substituting the values of Λk, Γl in Eq.(28) from Eqs.(26,27), we obtain update rule Eq.(5). □ Remark. Similar to the above analysis, we can also derive another similar update as, x(t+1) kl = x(t) kl 2(Wx(t))kl + Λ− k + Γ− l Λ+ k + Γ+ l . (30) The optimality and convergence of this update are also guaranteed. We omit the further discussion of them due to the lack of space. In real application, one can use both of these two update algorithms (Eq.(5), Eq.(30)) to obtain better results. 5 Sparsity and Discrete Solution One property of the proposed MPGM is that it can result in a sparse optimal solution, although the discrete binary constraint have been dropped in MPGM optimization process. This suggests that MPGM can search for an optimal solution nearly on the permutation domain P, i.e., the boundary of the doubly stochastic domain D. Unfortunately, here we cannot provide a theoretical proof on the sparsity of MPGM solution, but demonstrate it experimentally. Figure 1 (a) shows the solution x(t) across different iterations. Note that, regardless of initialization, as the iteration increases, the solution vector x(t) of MPGM becomes more and more sparse and converges to a discrete binary solution. Note that, in MPGM update Eq.(5), when xt kl closes to zero, it can keep closing to zero in the following update process because of the particular multiplicative operation. Therefore, as the iteration increases, the solution vector xt+1 is guaranteed to be more sparse than solution vector xt. Figure 1 (b) shows the objective and sparsity2 of the solution vector x(t). We can observe that (1) the objective of x(t) increases and converges after some iterations, demonstrating the convergence of MPGM algorithm. (2) The sparsity of the solution x(t) increases and converges to the baseline, which demonstrates the ability of MPGM algorithm to maintain the discrete constraint in the converged solution. 2Sparsity measures the percentage of zero (close-to-zero) elements in Z. Firstly, set the threshold ϵ = 0.001 × mean(Z), then renew Zij = 0 if Zij ≤ϵ. Finally, the sparsity is defined as the percentage of zero elements in the renewed Z. 5 Figure 1: (a) Solution vector x(t) of MPGM across different iterations (top: start from uniform solution; middle: start from SM solution; bottom: start from RRWM solution). 6 Experiments We have applied MPGM algorithm to several matching tasks. Our method has been compared with some other state-of-the-art methods including SM [15], IPFP [16], SMAC [5], RRWM [3] and FGM [24]. We implemented IPFP [16] with two versions: (1) IPFP-U that is initialized by the uniform solution; (2) IPFP-S that is initialized by SM method [15]. In experiments, we initialize our MPGM with uniform solution and obtain similar results when initializing with SM solution. 6.1 Synthetic Data Similar to the works [3, 24], we have randomly generated data sets of nin 2D points as inlier nodes for G. We obtain the corresponding nodes in graph G′ by transforming the whole point set with a random rotation and translation and then adding Gaussian noise N(0, σ) to the point positions from graph G. In addition, we also added nout outlier nodes in both graphs respectively at random positions. The affinity matrix W has been computed as Wij,kl = exp(−∥rik −r′ jl∥2 F /0.0015), where rik is the Euclidean distance between two nodes in G and similarly for r′ jl. Figure 2 summarizes the comparison results. We can note that: (1) similar to IPFP [16] and FGM [24] which return discrete matching solutions, MPGM always generates sparse solutions on doubly stochastic domain. (2) MPGM returns higher objective score and accuracy than IPFP [16] and FGM [24] methods, which demonstrate that MPGM can find the sparse solution more optimal than these methods. (3) MPGM generally performs better than the continuous domain methods including SM [15], SMAC [5] and RRWM [3]. Comparing with these methods, MPGM incorporates the doubly stochastic constraint more naturally and thus finds the solution more optimal than RRWM method. (4) MPGM generally has similar time cost with RRWM [3]. We have not shown the time cost of FGM [24] method in Fig.2, because FGM uses a hybrid optimization method and has obviously higher time cost than other methods. 6.2 Image Sequence Data In this section, we perform feature matching on CMU and YORK house sequences [3, 2, 18]. For CMU "hotel" sequence, we have matched all images spaced by 5, 10 · · · 75 and 80 frames and computed the average performances per separation gap. For YORK house sequence, we have matched all images spaced by 1, 2 · · · 8 and 9 frames and computed the average performances per separation gap. The affinity matrix has been computed by Wij,kl = exp(−∥rik −r′ jl∥2 F /1000), where rik is the Euclidean distance between two points. Figure 3 summarizes the performance results. It is noted that MPGM outperforms the other methods in both objective score and matching accuracy, indicating the effectiveness of MPGM method. Also, 6 0.02 0.04 0.06 0.08 0.1 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Deformation noise σ Accuracy inliers nin = 20 outliers nout = 0 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 0.02 0.04 0.06 0.08 0.1 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Deformation noise σ Objective score inliers nin = 20 outliers nout = 0 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 0.02 0.04 0.06 0.08 0.1 0 0.2 0.4 0.6 0.8 1 Deformation noise σ Sparsity inliers nin = 20 outliers nout = 0 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 0 0.02 0.04 0.06 0.08 0.1 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 Deformation noise σ Time inliers nin = 20 outliers nout = 0 RRWM SM IPFP−U IPFP−S SMAC MPGM 2 4 6 8 10 0.4 0.5 0.6 0.7 0.8 0.9 # of outliers nout utliers n Accuracy inliers nin = 15 deformation noise σ = 0.04 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 2 4 6 8 10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 # of outliers nout Objective score inliers nin = 15 deformation noise σ = 0.04 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 2 4 6 8 10 0 0.2 0.4 0.6 0.8 1 # of outliers nout Sparsity inliers nin = 15 deformation noise σ = 0.04 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 2 4 6 8 10 0 0.02 0.04 0.06 0.08 0.1 0.12 # of outliers nout Time inliers nin = 15 deformation noise σ = 0.04 RRWM SM IPFP−U IPFP−S SMAC MPGM 0.02 0.04 0.06 0.08 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Deformation noise σ Accuracy inliers nin = 15 outliers nout = 5 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 0.02 0.04 0.06 0.08 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Deformation noise σ Objective score inliers nin = 15 outliers nout = 5 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 0.02 0.04 0.06 0.08 0.1 0 0.2 0.4 0.6 0.8 1 Deformation noise σ Sparsity inliers nin = 15 outliers nout = 5 FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 0 0.02 0.04 0.06 0.08 0.1 0.01 0.02 0.03 0.04 0.05 Deformation noise σ Time inliers nin = 15 outliers nout = 5 RRWM SM IPFP−U IPFP−S SMAC MPGM Figure 2: Comparison results of different methods on synthetic point sets matching MPGM can generate sparse solutions. These are generally consistent with the results on the synthetic data experiments and further demonstrate the benefits of MPGM algorithm. 10 20 30 40 50 60 70 80 0.4 0.5 0.6 0.7 0.8 0.9 1 Separation Accuracy FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 10 20 30 40 50 60 70 80 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Separation Objective score FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 10 20 30 40 50 60 70 80 0 0.2 0.4 0.6 0.8 1 Separation Sparsity FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 2 4 6 8 0 0.2 0.4 0.6 0.8 Separation Accuracy FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 2 4 6 8 0.5 0.6 0.7 0.8 0.9 1 Separation Objective score FGM RRWM SM IPFP−U IPFP−S SMAC MPGM 2 4 6 8 0 0.2 0.4 0.6 0.8 1 Separation Sparsity FGM RRWM SM IPFP−U IPFP−S SMAC MPGM Figure 3: Comparison results of different methods on CMU and YORK image sequences. Top: CMU images; Bottom: YORK images. 6.3 Real-world Image Data In this section, we tested our method on some real-world image datasets. We evaluate our MPGM on the dataset [17] whose images are selected from Pascal 2007 3. In this dataset, there are 30 pairs of car images and 20 pairs of motorbike images. For each image pair, feature points and groundtruth matches were manually marked and each pair contains 30-60 ground-truth correspondences. The affinity between two nodes is computed as Wij,ij = exp( −|pi−p′ j| 0.05 ), where pi is the orientation of normal vector at the sampled point (node) i to the contour, similarly to p′ j. Also, the affinity 3http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html 7 Figure 4: Some examples of image matching on Pascal 2007 dataset (LEFT: original image pair, MIDDLE: FGM result, RIGHT: MPGM result. Incorrect matches are marked by red lines) Figure 5: Comparison results of different graph matching methods on the Pascal 2007 dataset between two correspondences has been computed as Wij,kl = exp( −|dik−d′ jl| 0.15 ), where dik denotes the Euclidean distance between feature point i and k, similarly to d′ jl. Some matching examples are shown in Figure 4. To test the performance against outlier noise, we have randomly added 020 outlier features for each image pair. The overall results of matching accuracy across different outlier features are summarized in Figure 5. From Figure 5, we can note that MPGM outperforms the other competing methods including RRWM [3] and FGM [24], which further demonstrates the effectiveness and practicality of MPGM on conducting real-world image matching tasks. 7 Conclusions and Future work This paper presents an effective algorithm, Multiplicative Update Graph Matching (MPGM), that develops a multiplicative update technique to solve the QP matching problem with doubly stochastic mapping constraint. The KKT optimality and convergence properties of MPGM algorithms are theoretically guaranteed. We show experimentally that MPGM solution is sparse and thus approximately incorporates the discrete constraint in optimization naturally. In our future, the theoretical analysis on the sparsity of MPGM needs to be further studied. Also, we will incorporate our MPGM in some path-following strategy to find a more optimal solution for the matching problem. We will adapt the proposed algorithm to solve some other optimization problems with doubly stochastic constraint in machine learning and computer vision area. Acknowledgment This work is supported by the NBRPC 973 Program (2015CB351705); National Natural Science Foundation of China (61602001,61671018, 61572030); Natural Science Foundation of Anhui Province (1708085QF139); Natural Science Foundation of Anhui Higher Education Institutions of China (KJ2016A020); Co-Innovation Center for Information Supply & Assurance Technology, Anhui University; The Open Projects Program of National Laboratory of Pattern Recognition. 8 References [1] K. Adamczewski, Y. Suh, and K. M. Lee. Discrete tabu search for graph matching. In ICCV, pages 109–117, 2015. [2] T. S. Caetano, J. J. McAuley, L. Cheng, Q. V. Le, and A. J. Smola. Learning graph matching. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(6):1048–1058, 2009. [3] M. Cho, J. Lee, and K. M. Lee. Reweighted random walks for graph matching. In European Conference on Computer Vision, pages 492–505, 2010. [4] D. Conte, P. Foggia, C. Sansone, and M. Vento. Thirty years of graph matching in pattern recognition. International Journal of Pattern Recognition and Artificial Intelligence, pages 265–298, 2004. [5] M. Cour, P. Srinivasan, and J.Shi. Balanced graph matching. In Neural Information Processing Systems, pages 313–320, 2006. [6] C. Ding, T. Li, and M. I. Jordan. Nonnegative matrix factorization for combinatorial optimization: Spectral clustering, graph matching and clique finding. In IEEE International Conference on Data Mining, pages 183–192, 2008. [7] C. Ding, T. Li, and M. I. Jordan. Convex and semi-nonnegative matrix factorization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(1):45–55, 2010. [8] O. Enqvist, K. Josephon, and F. Kahl. Optimal correspondences from pairwise constraints. In IEEE International Conference on Computer Vision, pages 1295–1302, 2009. [9] M. Frank and P. Wolfe. An algorithm for quadratic programming. Naval Research Logistics Quarterly, 3(1-2):95–110, 1956. [10] S. Gold and A. Rangarajan. A graduated assignment algorithm for graph matching. IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(4):377–388, 1996. [11] B. Jiang, J. Tang, C. Ding, and B. Luo. A local sparse model for matching problem. In AAAI, pages 3790–3796, 2015. [12] B. Jiang, J. Tang, C. Ding, and B. Luo. Nonnegative orthogonal graph matching. In AAAI, 2017. [13] B. Jiang, H. F. Zhao, J. Tang, and B. Luo. A sparse nonnegative matrix factorization technique for graph matching problem. Pattern Recognition, 47(1):736–747, 2014. [14] D. D. Lee and H. S. Seung. Algorithms for nonnegative matrix factorization. In Neural Information Processing Systems, pages 556–562, 2001. [15] M. Leordeanu and M. Hebert. A spectral technique for correspondence problem using pairwise constraints. In IEEE International Conference on Computer Vision, pages 1482–1489, 2005. [16] M. Leordeanu, M. Hebert, and R. Sukthankar. An integer projected fixed point method for graph macthing and map inference. In Neural Information Processing Systems, pages 1114–1122, 2009. [17] M. Leordeanu, R. Sukthankar, and M. Hebert. Unsupervised learning for graph mathing. International Journal of Computer Vision, 95(1):1–18, 2011. [18] B. Luo, R. C. Wilson, and E. R. Hancock. Spectal embedding of graphs. Pattern Recognition, 36(10):2213–2230, 2003. [19] J. J. MuAuley and T. S. Caetano. Fast matching of large point sets under occlusions. Pattern Recognition, 45(1):563–569, 2012. [20] B. J. van Wyk and M. A. van Wyk. A pocs-based graph matching algorithm. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16(11):1526–1530, 2004. [21] M. Zaslavskiy, F. Bach, and J. P. Vert. A path following algorithm for the graph matching problem. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(12):2227–2242, 2009. [22] R. Zass and A. Shashua. Doubly stochastic normalization for spectral clustering. In Proceedings of the conference on Neural Information Processing Systems (NIPS), pages 1569–1576, 2006. [23] Z. Zhang, Q. Shi, J. McAuley, W. Wei, Y. Zhang, and A. V. D. Hengel. Pairwise matching through max-weight bipartite belief propagation. In CVPR, pages 1202–1210, 2016. [24] F. Zhou and F. D. la Torre. Factorized graph matching. In IEEE Conference on Computer Vision and Pattern Recognition, pages 127–134, 2012. [25] F. Zhou and F. D. la Torre. Deformable graph matching. In IEEE Conference on Computer Vision and Pattern Recognition, pages 127–134, 2013. 9 | 2017 | 542 |
7,055 | Neural Expectation Maximization Klaus Greff∗ IDSIA klaus@idsia.ch Sjoerd van Steenkiste∗ IDSIA sjoerd@idsia.ch Jürgen Schmidhuber IDSIA juergen@idsia.ch Abstract Many real world tasks such as reasoning and physical interaction require identification and manipulation of conceptual entities. A first step towards solving these tasks is the automated discovery of distributed symbol-like representations. In this paper, we explicitly formalize this problem as inference in a spatial mixture model where each component is parametrized by a neural network. Based on the Expectation Maximization framework we then derive a differentiable clustering method that simultaneously learns how to group and represent individual entities. We evaluate our method on the (sequential) perceptual grouping task and find that it is able to accurately recover the constituent objects. We demonstrate that the learned representations are useful for next-step prediction. 1 Introduction Learning useful representations is an important aspect of unsupervised learning, and one of the main open problems in machine learning. It has been argued that such representations should be distributed [13, 37] and disentangled [1, 31, 3]. The latter has recently received an increasing amount of attention, producing representations that can disentangle features like rotation and lighting [4, 12]. So far, these methods have mostly focused on the single object case whereas, for real world tasks such as reasoning and physical interaction, it is often necessary to identify and manipulate multiple entities and their relationships. In current systems this is difficult, since superimposing multiple distributed and disentangled representations can lead to ambiguities. This is known as the Binding Problem [21, 37, 13] and has been extensively discussed in neuroscience [33]. One solution to this problem involves learning a separate representation for each object. In order to allow these representations to be processed identically they must be described in terms of the same (disentangled) features. This would then avoid the binding problem, and facilitate a wide range of tasks that require knowledge about individual objects. This solution requires a process known as perceptual grouping: dynamically splitting (segmenting) each input into its constituent conceptual entities. In this work, we tackle this problem of learning how to group and efficiently represent individual entities, in an unsupervised manner, based solely on the statistical structure of the data. Our work follows a similar approach as the recently proposed Tagger [7] and aims to further develop the understanding, as well as build a theoretical framework, for the problem of symbol-like representation learning. We formalize this problem as inference in a spatial mixture model where each component is parametrized by a neural network. Based on the Expectation Maximization framework we then derive a differentiable clustering method, which we call Neural Expectation Maximization (N-EM). It can be trained in an unsupervised manner to perform perceptual grouping in order to learn an efficient representation for each group, and naturally extends to sequential data. ∗Both authors contributed equally to this work. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 2 Neural Expectation Maximization The goal of training a system that produces separate representations for the individual conceptual entities contained in a given input (here: image) depends on what notion of entity we use. Since we are interested in the case of unsupervised learning, this notion can only rely on statistical properties of the data. We therefore adopt the intuitive notion of a conceptual entity as being a common cause (the object) for multiple observations (the pixels that depict the object). This common cause induces a dependency-structure among the affected pixels, while the pixels that correspond to different entities remain (largely) independent. Intuitively this means that knowledge about some pixels of an object helps in predicting its remainder, whereas it does not improve the predictions for pixels of other objects. This is especially obvious for sequential data, where pixels belonging to a certain object share a common fate (e.g. move in the same direction), which makes this setting particularly appealing. We are interested in representing each entity (object) k with some vector θk that captures all the structure of the affected pixels, but carries no information about the remainder of the image. This modularity is a powerful invariant, since it allows the same representation to be reused in different contexts, which enables generalization to novel combinations of known objects. Further, having all possible objects represented in the same format makes it easier to work with these representations. Finally, having a separate θk for each object (as opposed to for the entire image) allows θk to be distributed and disentangled without suffering from the binding problem. We treat each image as a composition of K objects, where each pixel is determined by exactly one object. Which objects are present, as well as the corresponding assignment of pixels, varies from input to input. Assuming that we have access to the family of distributions P(x|θk) that corresponds to an object level representation as described above, we can model each image as a mixture model. Then Expectation Maximization (EM) can be used to simultaneously compute a Maximum Likelihood Estimate (MLE) for the individual θk-s and the grouping that we are interested in. The central problem we consider in this work is therefore how to learn such a P(x|θk) in a completely unsupervised fashion. We accomplish this by parametrizing this family of distributions by a differentiable function fφ(θ) (a neural network with weights φ). We show that in that case, the corresponding EM procedure becomes fully differentiable, which allows us to backpropagate an appropriate outer loss into the weights of the neural network. In the remainder of this section we formalize and derive this method which we call Neural Expectation Maximization (N-EM). 2.1 Parametrized Spatial Mixture Model We model each image x ∈RD as a spatial mixture of K components parametrized by vectors θ1, . . . , θK ∈RM. A differentiable non-linear function fφ (a neural network) is used to transform these representations θk into parameters ψi,k = fφ(θk)i for separate pixel-wise distributions. These distributions are typically Bernoulli or Gaussian, in which case ψi,k would be a single probability or a mean and variance respectively. This parametrization assumes that given the representation, the pixels are independent but not identically distributed (unlike in standard mixture models). A set of binary latent variables Z ∈[0, 1]D×K encodes the unknown true pixel assignments, such that zi,k = 1 iff pixel i was generated by component k, and k zi,k = 1. A graphical representation of this model can be seen in Figure 1, where π = (π1, . . . πK) are the mixing coefficients (or prior for z). The full likelihood for x given θ = (θ1, . . . , θK) is given by: P(x|θ) = D i=1 zi P(xi, zi|ψi) = D i=1 K k=1 P(zi,k = 1) πk P(xi|ψi,k, zi,k = 1). (1) 2.2 Expectation Maximization Directly optimizing log P(x|ψ) with respect to θ is difficult due to marginalization over z, while for many distributions optimizing log P(x, z|ψ) is much easier. Expectation Maximization (EM; [6]) takes advantage of this and instead optimizes a lower bound given by the expected log likelihood: Q(θ, θold) = z P(z|x, ψold) log P(x, z|ψ). (2) 2 D Figure 1: left: The probabilistic graphical model that underlies N-EM. right: Illustration of the computations for two steps of N-EM. Iterative optimization of this bound alternates between two steps: in the E-step we compute a new estimate of the posterior probability distribution over the latent variables given θold from the previous iteration, yielding a new soft-assignment of the pixels to the components (clusters): γi,k := P(zi,k = 1|xi, ψold i ). (3) In the M-step we then aim to find the configuration of θ that would maximize the expected loglikelihood using the posteriors computed in the E-step. Due to the non-linearity of fφ there exists no analytical solution to arg maxθ Q(θ, θold). However, since fφ is differentiable, we can improve Q(θ, θold) by taking a gradient ascent step:2 θnew = θold + η ∂Q ∂θ where ∂Q ∂θk ∝ D i=1 γi,k(ψi,k −xi)∂ψi,k ∂θk . (4) The resulting algorithm belongs to the class of generalized EM algorithms and is guaranteed (for a sufficiently small learning rate η) to converge to a (local) optimum of the data log likelihood [42]. 2.3 Unrolling In our model the information about statistical regularities required for clustering the pixels into objects is encoded in the neural network fφ with weights φ. So far we have considered fφ to be fixed and have shown how we can compute an MLE for θ alongside the appropriate clustering. We now observe that by unrolling the iterations of the presented generalized EM, we obtain an end-to-end differentiable clustering procedure based on the statistical model implemented by fφ. We can therefore use (stochastic) gradient descent and fit the statistical model to capture the regularities corresponding to objects for a given dataset. This is implemented by back-propagating an appropriate loss (see Section 2.4) through “time” (BPTT; [39, 41]) into the weights φ. We refer to this trainable procedure as Neural Expectation Maximization (N-EM), an overview of which can be seen in Figure 1. Figure 2: RNN-EM Illustration. Note the changed encoder and recurrence compared to Figure 1. Upon inspection of the structure of N-EM we find that it resembles K copies of a recurrent neural network with hidden states θk that, at each timestep, receive γk (ψk −x) as their input. Each copy generates a new ψk, which is then used by the E-step to re-estimate the soft-assignments γ. In order to accurately mimic the M-Step (4) with an RNN, we must impose several restrictions on its weights and structure: the “encoder” must correspond to the Jacobian ∂ψk/∂θk, and the recurrent update must linearly combine the output of the encoder with θk from the previous timestep. Instead, we introduce a new algorithm named RNN-EM, when substituting that part of the computational graph of N-EM with an actual RNN (without imposing any restrictions). Although RNN-EM can no longer guarantee 2Here we assume that P(xi|zi,k = 1, ψi,k) is given by N(xi; µ = ψi,k, σ2) for some fixed σ2, yet a similar update arises for many typical parametrizations of pixel distributions. 3 convergence of the data log likelihood, its recurrent weights increase the flexibility of the clustering procedure. Moreover, by using a fully parametrized recurrent weight matrix RNN-EM naturally extends to sequential data. Figure 2 presents the computational graph of a single RNN-EM timestep. 2.4 Training Objective N-EM is a differentiable clustering procedure, whose outcome relies on the statistical model fφ. We are interested in a particular unsupervised clustering that corresponds to grouping entities based on the statistical regularities in the data. To train our system, we therefore require a loss function that teaches fφ to map from representations θ to parameters ψ that correspond to pixelwise distributions for such objects. We accomplish this with a two-term loss function that guides each of the K networks to model the structure of a single object independently of any other information in the image: L(x) = − D i=1 K k=1 γi,k log P(xi, zi,k|ψi,k) intra-cluster loss −(1 −γi,k)DKL[P(xi)||P(xi|ψi,k, zi,k)] inter-cluster loss . (5) The intra-cluster loss corresponds to the same expected data log-likelihood Q as is optimized by N-EM. It is analogous to a standard reconstruction loss used for training autoencoders, weighted by the cluster assignment. Similar to autoencoders, this objective is prone to trivial solutions in case of overcapacity, which prevent the network from modelling the statistical regularities that we are interested in. Standard techniques can be used to overcome this problem, such as making θ a bottleneck or using a noisy version of x to compute the inputs to the network. Furthermore, when RNN-EM is used on sequential data we can use a next-step prediction loss. Weighing the loss pixelwise is crucial, since it allows each network to specialize its predictions to an individual object. However, it also introduces a problem: the loss for out-of-cluster pixels (γi,k = 0) vanishes. This leaves the network free to predict anything and does not yield specialized representations. Therefore, we add a second term (inter-cluster loss) which penalizes the KL divergence between out-of-cluster predictions and the pixelwise prior of the data. Intuitively this tells each representation θk to contain no information regarding non-assigned pixels xi: P(xi|ψi,k, zi,k) = P(xi). A disadvantage of the interaction between γ and ψ in (5) is that it may yield conflicting gradients. For any θk the loss for a given pixel i can be reduced by better predicting xi, or by decreasing γi,k (i.e. taking less responsibility) which is (due to the E-step) realized by being worse at predicting xi. A practical solution to this problem is obtained by stopping the γ gradients, i.e. by setting ∂L/∂γ = 0 during backpropagation. 3 Related work The method most closely related to our approach is Tagger [7], which similarly learns perceptual grouping in an unsupervised fashion using K copies of a neural network that work together by reconstructing different parts of the input. Unlike in case of N-EM, these copies additionally learn to output the grouping, which gives Tagger more direct control over the segmentation and supports its use on complex texture segmentation tasks. Our work maintains a close connection to EM and relies on the posterior inference of the E-Step as a grouping mechanism. This facilitates theoretical analysis and simplifies the task for the resulting networks, which we find can be markedly smaller than in Tagger. Furthermore, Tagger does not include any recurrent connections on the level of the hidden states, precluding it from next step prediction on sequential tasks.3 The Binding problem was first considered in the context of Neuroscience [21, 37] and has sparked some early work in oscillatory neural networks that use synchronization as a grouping mechanism [36, 38, 24]. Later, complex valued activations have been used to replace the explicit simulation of oscillation [25, 26]. By virtue of being general computers, any RNN can in principle learn a suitable mechanism. In practice however it seems hard to learn, and adding a suitable mechanism like competition [40], fast weights [29], or perceptual grouping as in N-EM seems necessary. 3RTagger [15]: a recurrent extension of Tagger that does support sequential data was developed concurrent to this work. 4 Figure 3: Groupings by RNN-EM (bottom row), NEM (middle row) for six input images (top row). Both methods recover the individual shapes accurately when they are separated (a, b, f), even when confronted with the same shape (b). RNN-EM is able to handle most occlusion (c, d) but sometimes fails (e). The exact assignments are permutation invariant and depend on γ initialization; compare (a) and (f). Unsupervised Segmentation has been studied in several different contexts [30], from random vectors [14] over texture segmentation [10] to images [18, 16]. Early work in unsupervised video segmentation [17] used generalized Expectation Maximization (EM) to infer how to split frames of moving sprites. More recently optical flow has been used to train convolutional networks to do figure/ground segmentation [23, 34]. A related line of work under the term of multi-causal modelling [28] has formalized perceptual grouping as inference in a generative compositional model of images. Masked RBMs [20] for example extend Restricted Boltzmann Machines with a latent mask inferred through Block-Gibbs sampling. Gradient backpropagation through inference updates has previously been addressed in the context of sparse coding with (Fast) Iterative Shrinkage/Tresholding Algorithms ((F)ISTA; [5, 27, 2]). Here the unrolled graph of a fixed number of ISTA iterations is replaced by a recurrent neural network that parametrizes the gradient computations and is trained to predict the sparse codes directly [9]. We derive RNN-EM from N-EM in a similar fashion and likewise obtain a trainable procedure that has the structure of iterative pursuit built into the architecture, while leaving tunable degrees of freedom that can improve their modeling capabilities [32]. An alternative to further empower the network by untying its weights across iterations [11] was not considered for flexibility reasons. 4 Experiments We evaluate our approach on a perceptual grouping task for generated static images and video. By composing images out of simple shapes we have control over the statistical structure of the data, as well as access to the ground-truth clustering. This allows us to verify that the proposed method indeed recovers the intended grouping and learns representations corresponding to these objects. In particular we are interested in studying the role of next-step prediction as a unsupervised objective for perceptual grouping, the effect of the hyperparameter K, and the usefulness of the learned representations. In all experiments we train the networks using ADAM [19] with default parameters, a batch size of 64 and 50 000 train + 10 000 validation + 10 000 test inputs. Consistent with earlier work [8, 7], we evaluate the quality of the learned groupings with respect to the ground truth while ignoring the background and overlap regions. This comparison is done using the Adjusted Mutual Information (AMI; [35]) score, which provides a measure of clustering similarity between 0 (random) and 1 (perfect match). We use early stopping when the validation loss has not improved for 10 epochs.4 A detailed overview of the experimental setup can be found in Appendix A. All reported results are averages computed over five runs.5 4.1 Static Shapes To validate that our approach yields the intended behavior we consider a simple perceptual grouping task that involves grouping three randomly chosen regular shapes () located in random positions of 28 × 28 binary images [26]. This simple setup serves as a test-bed for comparing N-EM and RNN-EM, before moving on to more complex scenarios. We implement fφ by means of a single layer fully connected neural network with a sigmoid output ψi,k for each pixel that corresponds to the mean of a Bernoulli distribution. The representation θk is 4Note that we do not stop on the AMI score as this is not part of our objective function and only measured to evaluate the performance after training. 5Code to reproduce all experiments is available at https://github.com/sjoerdvansteenkiste/ Neural-EM 5
Figure 4: A sequence of 5 shapes flying along random trajectories (bottom row). The next-step prediction of each copy of the network (rows 2 to 5) and the soft-assignment of the pixels to each of the copies (top row). Observe that the network learns to separate the individual shapes as a means to efficiently solve next-step prediction. Even when many of the shapes are overlapping, as can be seen in time-steps 18-20, the network is still able to disentangle the individual shapes from the clutter. a real-valued 250-dimensional vector squashed to the (0, 1) range by a sigmoid function before being fed into the network. Similarly for RNN-EM we use a recurrent neural network with 250 sigmoidal hidden units and an equivalent output layer. Both networks are trained with K = 3 and unrolled for 15 EM steps. As shown in Figure 3, we observe that both approaches are able to recover the individual shapes as long as they are separated, even when confronted with identical shapes. N-EM performs worse if the image contains occlusion, and we find that RNN-EM is in general more stable and produces considerably better groupings. This observation is in line with findings for Sparse Coding [9]. Similarly we conclude that the tunable degrees of freedom in RNN-EM help speed-up the optimization process resulting in a more powerful approach that requires fewer iterations. The benefit is reflected in the large score difference between the two: 0.826 ± 0.005 AMI compared to 0.475 ± 0.043 AMI for N-EM. In comparison, Tagger achieves an AMI score of 0.79 ± 0.034 (and 0.97 ± 0.009 with layernorm), while using about twenty times more parameters [7]. 4.2 Flying Shapes We consider a sequential extension of the static shapes dataset in which the shapes () are floating along random trajectories and bounce off walls. An example sequence with 5 shapes can be seen in the bottom row of Figure 4. We use a convolutional encoder and decoder inspired by the discriminator and generator networks of infoGAN [4], with a recurrent neural network of 100 sigmoidal units (for details see Section A.2). At each timestep t the network receives γk(ψ(t−1) k −˜x(t)) as input, where ˜x(t) is the current frame corrupted with additional bitflip noise (p = 0.2). The next-step prediction objective is implemented by replacing x with x(t+1) in (5), and is evaluated at each time-step. Table 1 summarizes the results on flying shapes, and an example of a sequence with 5 shapes when using K = 5 can be seen in Figure 4. For 3 shapes we observe that the produced groupings are close to perfect (AMI: 0.970 ± 0.005). Even in the very cluttered case of 5 shapes the network is able to separate the individual objects in almost all cases (AMI: 0.878 ± 0.003). These results demonstrate the adequacy of the next step prediction task for perceptual grouping. However, we find that the converse also holds: the corresponding representations are useful for the prediction task. In Figure 5 we compare the next-step prediction error of RNN-EM with K = 1 (which reduces to a recurrent autoencoder that receives the difference between its previous prediction and the current frame as input) to RNN-EM with K = 5 on this task. To evaluate RNN-EM on next-step prediction we computed its loss using P(xi|ψi) = P(xi| maxk ψi,k) as opposed to P(xi|ψi) = k γi,kP(xi|ψi,k) to avoid including information from the next timestep. The reported BCE loss for RNN-EM is therefore an upperbound to the true BCE loss. From the figure we observe that RNN-EM produces significantly lower errors, especially when the number of objects increases. 6
Figure 5: Binomial Cross Entropy Error obtained by RNN-EM and a recurrent autoencoder (RNN-EM with K = 1) on the denoising and next-step prediction task. RNN-EM produces significantly lower BCE across different numbers of objects. Figure 6: Average AMI score (blue line) measured for RNN-EM (trained for 20 steps) across the flying MNIST test-set and corresponding quartiles (shaded areas), computed for each of 50 time-steps. The learned grouping dynamics generalize to longer sequences and even further improve the AMI score. Train Test Test Generalization # obj. K AMI # obj. K AMI # obj. K AMI 3 3 0.969 ± 0.006 3 3 0.970 ± 0.005 3 5 0.972 ± 0.007 3 5 0.997 ± 0.001 3 5 0.997 ± 0.002 3 3 0.914 ± 0.015 5 3 0.614 ± 0.003 5 3 0.614 ± 0.003 3 3 0.886 ± 0.010 5 5 0.878 ± 0.003 5 5 0.878 ± 0.003 3 5 0.981 ± 0.003 Table 1: AMI scores obtained by RNN-EM on flying shapes when varying the number of objects and number of components K, during training and at test time. Finally, in Table 1 we also provide insight about the impact of choosing the hyper-parameter K, which is unknown for many real-world scenarios. Surprisingly we observe that training with too large K is in fact favourable, and that the network learns to leave the excess groups empty. When training with too few components we find that the network still learns about the individual shapes and we observe only a slight drop in score when correctly setting the number of components at test time. We conclude that RNN-EM is robust towards different choices of K, and specifically that choosing K to be too high is not detrimental. 4.3 Flying MNIST In order to incorporate greater variability among the objects we consider a sequential extension of MNIST. Here each sequence consists of gray-scale 24 × 24 images containing two down-sampled MNIST digits that start in random positions and float along randomly sampled trajectories within the image for T timesteps. An example sequence can be seen in the bottom row of Figure 7. We deploy a slightly deeper version of the architecture used in flying shapes. Its details can be found in Appendix A.3. Since the images are gray-scale we now use a Gaussian distribution for each pixel with fixed σ2 = 0.25 and µ = ψi,k as computed by each copy of the network. The training procedure is identical to flying shapes except that we replace bitflip noise with masked uniform noise: we first sample a binary mask from a multi-variate Bernoulli distribution with p = 0.2 and then use this mask to interpolate between the original image and samples from a Uniform distribution between the minimum and maximum values of the data (0,1). We train with K = 2 and T = 20 on flying MNIST having two digits and obtain an AMI score of 0.819 ± 0.022 on the test set, measured across 5 runs. In early experiments we observed that, given the large variability among the 50 000 unique digits, we can boost the model performance by training in stages using 20, 500, 50 000 digits. Here we exploit the generalization capabilities of RNN-EM to quickly transfer knowledge from a less varying set of 7
Figure 7: A sequence of 3 MNIST digits flying across random trajectories in the image (bottom row). The next-step prediction of each copy of the network (rows 2 to 4) and the soft-assignment of the pixels to each of the copies (top row). Although the network was trained (stage-wise) on sequences with two digits, it is accurately able to separate three digits. MNIST digits to unseen variations. We used the same hyper-parameter configuration as before and obtain an AMI score of 0.917 ± 0.005 on the test set, measured across 5 runs. We study the generalization capabilities and robustness of these trained RNN-EM networks by means of three experiments. In the first experiment we evaluate them on flying MNIST having three digits (one extra) and likewise set K = 3. Even without further training we are able to maintain a high AMI score of 0.729 ± 0.019 (stage-wise: 0.838 ± 0.008) on the test-set. A test example can be seen in Figure 7. In the second experiment we are interested in whether the grouping mechanism that has been learned can be transferred to static images. We find that using 50 RNN-EM steps we are able to transfer a large part of the learned grouping dynamics and obtain an AMI score of 0.619 ± 0.023 (stage-wise: 0.772 ± 0.008) for two static digits. As a final experiment we evaluate the directly trained network on the same dataset for a larger number of timesteps. Figure 6 displays the average AMI score across the test set as well as the range of the upper and lower quartile for each timestep. The results of these experiments confirm our earlier observations for flying shapes, in that the learned grouping dynamics are robust and generalize across a wide range of variations. Moreover we find that the AMI score further improves at test time when increasing the sequence length. 5 Discussion The experimental results indicate that the proposed Neural Expectation Maximization framework can indeed learn how to group pixels according to constituent objects. In doing so the network learns a useful and localized representation for individual entities, which encodes only the information relevant to it. Each entity is represented separately in the same space, which avoids the binding problem and makes the representations usable as efficient symbols for arbitrary entities in the dataset. We believe that this is useful for reasoning in particular, and a potentially wide range of other tasks that depend on interaction between multiple entities. Empirically we find that the learned representations are already beneficial in next-step prediction with multiple objects, a task in which overlapping objects are problematic for standard approaches, but can be handled efficiently when learning a separate representation for each object. As is typical in clustering methods, in N-EM there is no preferred assignment of objects to groups and so the grouping numbering is arbitrary and only depends on initialization. This property renders our results permutation invariant and naturally allows for instance segmentation, as opposed to semantic segmentation where groups correspond to pre-defined categories. RNN-EM learns to segment in an unsupervised fashion, which makes it applicable to settings with little or no labeled data. On the downside this lack of supervision means that the resulting segmentation may not always match the intended outcome. This problem is inherent to this task since in real world images the notion of an object is ill-defined and task dependent. We envision future work to alleviate this by extending unsupervised segmentation to hierarchical groupings, and by dynamically conditioning them on the task at hand using top-down feedback and attention. 8 6 Conclusion We have argued for the importance of separately representing conceptual entities contained in the input, and suggested clustering based on statistical regularities as an appropriate unsupervised approach for separating them. We formalized this notion and derived a novel framework that combines neural networks and generalized EM into a trainable clustering algorithm. We have shown how this method can be trained in a fully unsupervised fashion to segment its inputs into entities, and to represent them individually. Using synthetic images and video, we have empirically verified that our method can recover the objects underlying the data, and represent them in a useful way. We believe that this work will help to develop a theoretical foundation for understanding this important problem of unsupervised learning, as well as providing a first step towards building practical solutions that make use of these symbol-like representations. Acknowledgements The authors wish to thank Paulo Rauber and the anonymous reviewers for their constructive feedback. This research was supported by the Swiss National Science Foundation grant 200021_165675/1 and the EU project “INPUT” (H2020-ICT-2015 grant no. 687795). We are grateful to NVIDIA Corporation for donating us a DGX-1 as part of the Pioneers of AI Research award, and to IBM for donating a “Minsky” machine. References [1] H.B. Barlow, T.P. Kaushal, and G.J. Mitchison. Finding Minimum Entropy Codes. Neural Computation, 1(3):412–423, September 1989. [2] Amir Beck and Marc Teboulle. A fast iterative shrinkage-thresholding algorithm with application to wavelet-based image deblurring. In Acoustics, Speech and Signal Processing, 2009. ICASSP 2009. IEEE International Conference On, pages 693–696. IEEE, 2009. [3] Yoshua Bengio. Deep learning of representations: Looking forward. In International Conference on Statistical Language and Speech Processing, pages 1–37. Springer, 2013. [4] Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets. arXiv:1606.03657 [cs, stat], June 2016. [5] Ingrid Daubechies, Michel Defrise, and Christine De Mol. An iterative thresholding algorithm for linear inverse problems with a sparsity constraint. Communications on pure and applied mathematics, 57(11):1413–1457, 2004. [6] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the royal statistical society., pages 1–38, 1977. [7] Klaus Greff, Antti Rasmus, Mathias Berglund, Tele Hotloo Hao, Jürgen Schmidhuber, and Harri Valpola. Tagger: Deep Unsupervised Perceptual Grouping. arXiv:1606.06724 [cs], June 2016. [8] Klaus Greff, Rupesh Kumar Srivastava, and Jürgen Schmidhuber. Binding via Reconstruction Clustering. arXiv:1511.06418 [cs], November 2015. [9] Karol Gregor and Yann LeCun. Learning fast approximations of sparse coding. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 399–406, 2010. [10] Jose A. Guerrero-Colón, Eero P. Simoncelli, and Javier Portilla. Image denoising using mixtures of Gaussian scale mixtures. In Image Processing, 2008. ICIP 2008. 15th IEEE International Conference On, pages 565–568. IEEE, 2008. [11] John R. Hershey, Jonathan Le Roux, and Felix Weninger. Deep unfolding: Model-based inspiration of novel deep architectures. arXiv preprint arXiv:1409.2574, 2014. [12] Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. Beta-VAE: Learning basic visual concepts with a constrained variational framework. In In Proceedings of the International Conference on Learning Representations (ICLR), 2017. [13] Geoffrey E. Hinton. Distributed representations. 1984. 9 [14] Aapo Hyvärinen and Jukka Perkiö. Learning to Segment Any Random Vector. In The 2006 IEEE International Joint Conference on Neural Network Proceedings, pages 4167–4172. IEEE, 2006. [15] Alexander Ilin, Isabeau Prémont-Schwarz, Tele Hotloo Hao, Antti Rasmus, Rinu Boney, and Harri Valpola. Recurrent Ladder Networks. arXiv:1707.09219 [cs, stat], July 2017. [16] Phillip Isola, Daniel Zoran, Dilip Krishnan, and Edward H. Adelson. Learning visual groups from co-occurrences in space and time. arXiv:1511.06811 [cs], November 2015. [17] Nebojsa Jojic and Brendan J. Frey. Learning flexible sprites in video layers. In Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference On, volume 1, pages I–I. IEEE, 2001. [18] Anitha Kannan, John Winn, and Carsten Rother. Clustering appearance and shape by learning jigsaws. In Advances in Neural Information Processing Systems, pages 657–664, 2007. [19] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [20] Nicolas Le Roux, Nicolas Heess, Jamie Shotton, and John Winn. Learning a generative model of images by factoring appearance and shape. Neural Computation, 23(3):593–650, 2011. [21] P. M. Milner. A model for visual shape recognition. Psychological review, 81(6):521, 1974. [22] Augustus Odena, Vincent Dumoulin, and Chris Olah. Deconvolution and Checkerboard Artifacts. Distill, 2016. [23] Deepak Pathak, Ross Girshick, Piotr Dollár, Trevor Darrell, and Bharath Hariharan. Learning Features by Watching Objects Move. arXiv:1612.06370 [cs, stat], December 2016. [24] R. A. Rao, G. Cecchi, C. C. Peck, and J. R. Kozloski. Unsupervised segmentation with dynamical units. Neural Networks, IEEE Transactions on, 19(1):168–182, 2008. [25] R. A. Rao and G. A. Cecchi. An objective function utilizing complex sparsity for efficient segmentation in multi-layer oscillatory networks. International Journal of Intelligent Computing and Cybernetics, 3(2):173–206, 2010. [26] David P. Reichert and Thomas Serre. Neuronal Synchrony in Complex-Valued Deep Networks. arXiv:1312.6115 [cs, q-bio, stat], December 2013. [27] Christopher J. Rozell, Don H. Johnson, Richard G. Baraniuk, and Bruno A. Olshausen. Sparse coding via thresholding and local competition in neural circuits. Neural computation, 20(10):2526–2563, 2008. [28] E. Saund. A multiple cause mixture model for unsupervised learning. Neural Computation, 7(1):51–71, 1995. [29] J. Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992. [30] Jürgen Schmidhuber. Learning Complex, Extended Sequences Using the Principle of History Compression. Neural Computation, 4(2):234–242, March 1992. [31] Jürgen Schmidhuber. Learning Factorial Codes by Predictability Minimization. Neural Computation, 4(6):863–879, November 1992. [32] Pablo Sprechmann, Alexander M. Bronstein, and Guillermo Sapiro. Learning efficient sparse and low rank models. IEEE transactions on pattern analysis and machine intelligence, 37(9):1821–1833, 2015. [33] Anne Treisman. The binding problem. Current Opinion in Neurobiology, 6(2):171–178, April 1996. [34] Sudheendra Vijayanarasimhan, Susanna Ricco, Cordelia Schmid, Rahul Sukthankar, and Katerina Fragkiadaki. SfM-Net: Learning of Structure and Motion from Video. arXiv:1704.07804 [cs], April 2017. [35] N. X. Vinh, J. Epps, and J. Bailey. Information theoretic measures for clusterings comparison: Variants, properties, normalization and correction for chance. JMLR, 11:2837–2854, 2010. [36] C. von der Malsburg. Binding in models of perception and brain function. Current opinion in neurobiology, 5(4):520–526, 1995. 10 [37] Christoph von der Malsburg. The Correlation Theory of Brain Function. Departmental technical report, MPI, 1981. [38] D. Wang and D. Terman. Locally excitatory globally inhibitory oscillator networks. Neural Networks, IEEE Transactions on, 6(1):283–286, 1995. [39] Paul J. Werbos. Generalization of backpropagation with application to a recurrent gas market model. Neural networks, 1(4):339–356, 1988. [40] H. Wersing, J. J. Steil, and H. Ritter. A competitive-layer model for feature binding and sensory segmentation. Neural Computation, 13(2):357–387, 2001. [41] Ronald J. Williams. Complexity of exact gradient computation algorithms for recurrent neural networks. Technical report, Technical Report Technical Report NU-CCS-89-27, Boston: Northeastern University, College of Computer Science, 1989. [42] CF Jeff Wu. On the convergence properties of the EM algorithm. The Annals of statistics, pages 95–103, 1983. 11 | 2017 | 543 |
7,056 | Hunt For The Unique, Stable, Sparse And Fast Feature Learning On Graphs Saurabh Verma Department of Computer Science University of Minnesota, Twin Cities verma@cs.umn.edu Zhi-Li Zhang Department of Computer Science University of Minnesota, Twin Cities zhang@cs.umn.edu Abstract For the purpose of learning on graphs, we hunt for a graph feature representation that exhibit certain uniqueness, stability and sparsity properties while also being amenable to fast computation. This leads to the discovery of family of graph spectral distances (denoted as FGSD) and their based graph feature representations, which we prove to possess most of these desired properties. To both evaluate the quality of graph features produced by FGSD and demonstrate their utility, we apply them to the graph classification problem. Through extensive experiments, we show that a simple SVM based classification algorithm, driven with our powerful FGSD based graph features, significantly outperforms all the more sophisticated state-of-art algorithms on the unlabeled node datasets in terms of both accuracy and speed; it also yields very competitive results on the labeled datasets – despite the fact it does not utilize any node label information. 1 Introduction In the past decade, there has been tremendous interests in learning on collection of graphs for various purposes, in particular for solving graph classification problem. Several applications of graph classification can be found in the domain of bioinformatics, or chemoinformatics, or social networks. A fundamental question inherent in graph classification is determining whether two graph structures are identical, i.e., the graph isomorphism problem, which was not known to belong either P or NP until recently. In the seminal paper [2], Babai shows that the graph isomorphism can be solved in quasipolynomial time; while of enormous theoretical signficance, the implication of this result in developing practical algorithms is still unclear. Fortunately, in graph classification problems one is more interested in whether two graphs have “similar” (as opposed to identical) structures. This allows for potentially much faster (yet not fully explored) algorithms to be successfully applied to the graph classification while also accounting for graph isomorphism. One approach to get around both these intimately tied problems together is to learn an explicit graph representation that is invariant under graph isomorphism1 but also useful for extracting graph features. More specifically, given a graph G, we are interested in learning a graph representation (or spectrum), R : G →(g1, g2, ..., gr), that captures certain inherent “atomic” (unique) sub-structures of the graph and is invariant under graph isomorphism (i.e., two isomorphic graphs yield the same representation). Subsequently, we want to learn a feature function F : R →(f1, f2, ..., fd) from R such that the graph features {fi}d i=1 can be employed for solving the graph classification problem. However, in machine learning, not much attention has been given towards learning R and most of the previous studies have focused on designing graph kernels and thus bypasses computing any explicit graph representation. The series of papers (19, 20, 22) by Kondor et al. are some of the first (and few) that are concerned with constructing explicit graph features – using a group theoretic approach – that are invariant to graph isomorphism and can be successfully applied to the graph classification problem. 1That is, invariant under permutation of graph vertex labels. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Graph Generation Model: Graph spectrum is assumed to be encoded in pairwise node distances which are generated from some distribution. Nodes connect together to form a graph in such a way that pairwise node distances are preserved (eg. ( – ) node-pair with distance 0.75 is preserved even though they are not directly connected). 0.55 0.80 0.75 0.80 0.75 0.55 Pairs of graph nodes are generated from an unknown distribution Nodes connect together to form a graph such that the pairwise distances are preserved Inspired by such an approach, we also explicitly deal with learning a graph representation R and show how to derive graph features F from R. Our approach is quite novel and builds upon the following assumption: Graph atomic structure (or spectrum) is encoded in the multiset2 of all node pairwise distances. Figure 1 shows the complete graph generation model based on this premise. The origin of our assumption can be traced back to the study of homometric structure, i.e, structures with the same multiset of interatomic distances [28]. On graphs, two vertex sets are called non-homometric if the multisets of distances determined by them are different. (It is an unexplored problem whether there exists any distance metric on the graph for which two vertex sets of non-isomorphic graphs are always non-homometric; but the converse is not true, an example is the shortest path distance.) This argument provides the validity of our assumption that the graph atomic structure is being encoded in pairwise distances. Further, we have empirically found that the biharmonic distance [23] multisets are unique for at-least upto 10-vertex size simple connected graphs (∼11 million graphs) and it remains as an open problem to show a contradictory example. Moreover, we show that for a certain distance function Sf on the graph, one can uniquely recover all the graph intrinsic properties while also being able to capture both local & global information about the graph. Thus, we define R as the multiset of node pairwise distances based on some distance function Sf, which will be the main focus of this paper. We hunt for such a family of distances on graphs and its core members for which most of the properties of an ideal graph spectrum (see Section 3) hold, including invariance under graph isomorphism and the uniqueness property. This hunt leads us to the discovery of a family of graph spectral distance (FGSD) and one would find harmonic (effective resistance) and biharmonic distance on graphs as the suitable members of this family for graph representation R. Finally, for solving graph classification (where graphs can be of different nodes sizes), we simply construct F feature vector from the histogram of R (a multiset) and feed it to a standard classification algorithm. Our current work focuses only on unlabeled graphs but can be extended to labeled graphs using the same strategy as in shortest path kernel [4]. Nevertheless, our comprehensive results show that FGSD graph features are powerful enough to significantly outperform the current state-of-art algorithms on unlabeled datasets and are very competitive on labeled datasets – despite the fact that they do not utilize any node label information. In summary, the major contributions of our paper are: • Introducing a novel & conceptually simple yet powerful graph feature representation (or spectrum) based on the multiset of node pairwise distances. • Discovering FGSD as a well-suited candidate for our proposed graph spectrum. • Proving that FGSD based graph features exhibit certain uniqueness, stability, sparsity properties and can be computationally fast with O(N 2) complexity, where N is the number of graph nodes in a graph. • Showing the superior performance of FGSD based graph features on graph classification tasks. 2 Related Work Previous studies on graph classification can be grouped into three main categories. The first category is concerned with constructing explicit graph features such as the skew spectrum 20 and its successor, graphlet spectrum [22] based on group-theoretic approaches. Both are computational expensive. The second and more popular category deals with designing graph kernels, among which, strong ones are graphlets [30], random walks or shortest paths [4], neighborhood subgraph pairwise distance 2A set in which an element can occur multiple of times. 2 kernel [9], Weisfeiler-Lehman kernel [31], deep graph kernels [34], graph invariant kernels [27] and multiscale Laplacian graph kernel [21]. A tangential work [24] related to constructing features based on atoms 3D space coordinates rather than operating on a graph structure, can be also considered in this category. Our effort on learning R from FGSD can be seen as a part of first category, since we explicitly investigate numerous properties of our proposed graph spectrum. While, extracting F from R is more inspired from the work of graph kernels. The third category involves developing convolutional neural networks (CNNs) for graphs, where several models have been proposed to define convolution networks on graphs. The most common model is based on generalizing convolutional networks through the graph Fourier transform via a graph Laplacian [7, 16]. Defferrard et al. [11] extend this model by constructing fast localized spectral filters for efficient graph coarsening as a pooling operation for CNNs on graphs. Some variants of these models were considered in [18, 1], where the output of each neural network layer is computed using a propagation rule that takes the graph adjacency matrix and node feature vectors into account while updating the network weights. In [12], the convolution operation is defined by hashing of local graph node features along with the local structure information. Likewise, in [26] local node sequences are “canonicalized” to create receptive fields and then fed into a 1D convolutional neural network for classification. Among the aforementioned graph CNNs models, only those in [26, 1, 12] are relevant to this work since they are designed to account for graphs of different sizes, while others assume a global structure where the one-to-one correspondence of input vertices are already known. 3 Family of Graph Spectral Distances and Graph Spectrum Basic Setup and Notations: Consider a weighted, undirected (and connected) graph G = (V, E, W) of size N = |V |, where V is the vertex set, E the edge set (with no self-loops) and W = [wxy] the nonnegative weighted adjacency matrix. The standard graph Laplacian is defined as L = D −W, where D is the degree matrix. It is semi-definite and admits an eigen-decomposition of the form L = ΦΛΦT , where Λ = diag[λk] is the diagonal matrix formed by the eigenvalues λ0 = 0 < λ1 ≤· · · ≤λN−1, and Φ = [φ0, ..., φN−1] is an orthogonal matrix formed by the corresponding eigenvectors φk’s. For x ∈V , we use φk(x) to denote the x-entry value of φk. Let f be an arbitrary nonnegative (real-analytical) function on R+ with f(0) = 0, 1 = [1, .., 1]T is the all-one vector and J = 11T . Then, using slight abuse of notion, we define f(L) := Φf(Λ)ΦT and f(Λ) := diag[f(λk)]. Also, f(L)xy represent xy-entry value in f(L) matrix. Lastly, I is identity matrix and L+ is Moore-Penrose Pseudoinverse of L. FGSD Definition: For x, y ∈V , we define the f-spectral distance between x and y on G as follows: Sf(x, y) = N−1 X k=0 f(λk)(φk(x) −φk(y))2 (1) We will refer to {Sf(x, y)|f}, as the family of graph spectral distances. Without loss of generality, we assume that the derivative f ′(λ) ̸= 0 for λ > 0, and then by Lagrange Inversion Theorem [33], f is invertible and thus bijective. For reasons that will be clear shortly, we are particularly interested in two sub-families of FGSD, where f is monotonic function (increasing or decreasing) of λ. Depending on the sub-family, the f-spectral distance can capture different type of information in a graph. FGSD Elements Encode Local Structure Information: For f(λ) = λp (p ≥1), one can show that Sf(x, y) = (Lp)xx + (Lp)yy −2(Lp)xy. If the shortest path from x to y is larger than p, then (Lp)xy = 0. This is based on the fact (Lp)xy captures only p-hop local neighborhood information [32] on the graph. Hence, broadly for an increasing function of f (e.g., a polynomial function of degree atleast p ≥1), Sf(x, y) captures the local structure information. FGSD Elements Encode Global Structure Information: On the other hand, f as a decreasing function yields Sf(x, y) = ((L+)p)xx + (((L+)p)yy −2((L+)p)xy. This captures the global information, since the xy-entry of L+ = (L + J N )−1 −J N accounts for all paths from node x to y (and so does (L+)p). Several known globally aware graph distances can be derived from this FGSD sub-family. For f(λ) = 1/λ where λ > 0, Sf(x, y) is the harmonic (or effective resistance) distance. More generally, for f(λ) = 1/λp, p ≥1, Sf(x, y) is the polyharmonic distance (p = 2 is biharmonic distance). Lastly f(λk) = e−2tλk yields Sf(x, y) that is equivalent to the heat diffusion distance. 3 FGSD Graph Signal Processing Point of View: From graph signal processing perspective, Sf(x, y) is a distance computed based on spectral filter properties [32], where f(λ) act as a band-pass filter. Or, it can be viewed in terms of spectral graph wavelets [15] as: Sf(x, y) = ψf,x(x)+ψf,y(y)−2ψf,x(y), where ψf,x(y) = PN−1 k=0 f(λk)φk(x)φk(y) (and ψf,x(x), ψf,y(y) are similarly defined) is a spectral graph wavelet of scale 1, centered at node x and f(λ) act as a graph wavelet kernel. FGSD Based Graph Spectrum: Using the FGSD based distance matrix Sf = [Sf(x, y)] directly, e.g., for graph classification, requires us being able to solve the graph isomorphism problem efficiently. But no known polynomial time algorithm is available; the best algorithm today theoretically takes quasipolynomial time [2]. However, motivated from the study of homometric structure and the fact that each element of FGSD encodes some local or global sub-structure information of the graph, inspired us to define the graph spectrum as R = {Sf(x, y)|∀(x, y) ∈V }. Thus, comparing two R’s implicitly evaluates the sub-structural similarity between two graphs. For instance, R based on harmonic distance contains sub-structural properties related to the spanning trees of a graph [29]. Our main concern in this paper would be choosing an appropriate f(λ) function in order to generate R which can exhibit ideal graph spectrum properties as discuss below. Also, we want F to inherent these properties directly from R, which is made possible by defining F as the histogram of R. Finally, we lay down those important fundamental properties of an ideal graph spectrum that one would like R & F to obey on a graph G = (V, E, W). 1. R & F must be invariant under any permutation π of vertex labels. That is, R(G) = R(Gπ) or R(W) = R(PWP T ) for any permutation matrix P. 2. R & F must have a unique representation for non-isomorphic graphs. That is, R(G1) ̸= R(G2) for any two non-isomorphic graphs G1 and G2. 3. R & F must be stable under small perturbation. That is, if graph G2(W2) = G1(W1 + ∆), for a small perturbation norm matrix ∥∆∥, then the norm of ∥F(G2) −F(G1)∥should also be small or bounded in order to maintain the stability. 4. F must be sparse (if high-dimensional) for all the sparsity reasons desirable in machine learning. 5. R & F must be computationally fast for efficiency and scalability purposes. 4 Uniqueness of Family of Graph Spectral Distances and Graph Spectrum We first start with exploring the graph invariance and uniqueness properties of R & F based on FGSD. Uniqueness is a very important (desirable) property, since it will determine whether the elements of R set are complete (i.e., how good they are), in the sense whether R is sufficient enough to recover all the intrinsic structural properties of a graph. We state the following important uniqueness theorem. Theorem 1 (Uniqueness of FGSD) 3 The f-spectral distance matrix Sf = [Sf(x, y)] uniquely determines the underlying graph (up to graph isomorphism), and each graph has a unique Sf (up to permutation). More precisely, two undirected, weighted (and connected) graphs G1 and G2 have the same FGSD based distance matrix up to permutation, i.e., SG1 = PSG2P T for some permutation matrix P, if and only if the two graphs are isomorphic. Implications: Our proof is based on establishing the following key relationship: f(L) = −1 2(I − 1 N J)Sf(I − 1 N J). Since f is bijective, one can uniquely recover Λ from f(Λ). One of the consequence of Theorem 1 is that the R based on multiset of FGSD is invariant under the permutation of graph vertex labels and thus, satisfies the graph invariance property. Also, F will inherent this property since R remains the same. Unfortunately, it is possible that the multiset of some FGSD members can be same for non-isomorphic graphs (otherwise, we would have a O(N 2) polynomial time algorithm for solving graph isomorphism problem!). However, it is known that all non-isomorphic graphs with less than nine vertices have unique multisets of harmonic distance. While, for nine & ten vertex (simple) graphs, we have exactly 11 & 49 pairs of non-isomorphic graphs (out of total 274,668 & 12,005,168 graphs) with the same harmonic spectra. These examples show that there are significantly very low numbers of non-unique harmonic spectrums. Moreover, we empirically found that the biharmonic distance has all unique multisets for at-least upto ten vertices (∼11 million graphs) and we couldn’t find any non-isomorphic graphs with the same biharmonic multisets. Further, we have the following theorem regarding the uniqueness of R. 3Variant of Theorem 1 also hold true for the normalized graph Laplacian Lnorm = D−1 2 LD−1 2 . 4 Theorem 2 (Uniqueness of Graph Harmonic Spectrum) Let G = (V, E, W) be a graph of size |V | with an unweighted adjacency matrix W. Then, if two graphs G1 and G2 have the same number of nodes but different number of edges, i.e, |V1| = |V2| but |E1| ̸= |E2|, then with respect to the harmonic distance multiset, R(G1) ̸= R(G2). Implications: Our proof relies on the fact that the effective resistance distance is a monotone function with respect to adding or removing edges. It shows that R based on some FGSD members specially harmonic distance is atleast theoretically known to be unique to a certain degree. F also inherent this property, fully under the condition h →0 (or for small enough h), where h is the histogram binwidth. Overall the certain uniqueness of R along with containing local or global structural properties in its each element dictate that the R is capable enough to serve as the complete powerful Graph Spectrum. 4.1 Unifying Relationship Between FSGD and Graph Embedding and Dimension Reduction Before delving into other properties, we uncover an essential relationship between FGSD and Graph Embedding in Euclidean space and Dimension Reduction techniques. Let f(Λ) 1 2 = diag[ p f(λk)] and define Ψ = Φf(Λ) 1 2 . Then, the f-spectral distance can be expressed as Sf(x, y) = ||Ψ(x) − Ψ(y)||2 2, where Ψ(x) is the xth row of Ψ. Thus, Ψ represents an Euclidean embedding of G where each node x is represented by the vector Ψ(x). Now for instance, if f(λ) = 1, then by taking the first p columns of Ψ yields embedding exactly equal to Laplacian Eigenmap (LE) [3] based on random walk graph Laplacian (Lrw = D−1L). For f(λ) = λ2t and L = D−1W, we get the Diffusion Map [25]. Thus, f(λ) function has one-to-one correspondence relationship with spectral dimension reduction techniques. We have the following theorem concerning Graph Embedding based on FGSD. Theorem 3 (Uniqueness of FGSD Graph Embedding) Each graph G can be isometrically embedded into a Euclidean space using FGSD as an isometric measure. This isometric embedding is unique, if all the eigenvalues of G Laplacian are distinct and there does not exist any other graph G ′ with Laplacian eigenvectors φ ′ k = q f(λj)/f(λ ′ j)φk, ∀k ∈[1, N −1]. Implications: The above theorem shows that FGSD provides a unique way to embed the graph vertices into Euclidean space possibly without loosing any structural information of the graph. This could potentially serve as a cogent tool to convert an unstructured data into a structure data (similar to structure2vec 10 or node2vec 14 tool) which can enable us to perform standard inference tasks in Euclidean space. Note that the uniqueness condition is quite strict and holds for co-spectral graphs. In short, we have following uniqueness relationship, where Ψ is the Euclidean embedding of G graph. Sf f(LG) LG f(LG) ΨG 5 Stability of Family of Graph Spectral Distances and Graph Spectrum Next, we hunt for the stable members of the FGSD that are robust against the perturbation or noise in the datasets. Specifically, we will look at the stability of R and F based on FGSD from f(λ) perspective by first analyzing its influence on a single edge perturbation (or in other words analyzing rank one modification of Laplacian matrix). This will lead us to find the stable members and what restrictions we need to impose on f(λ) function for stability. We will further show that f-spectral distance function also satisfies the notion of uniform stability [6] in a certain sense. For our analysis, we will restrict f(λ) as a monotone function of λ, for λ > 0. Let △w ≥0 be the change after modifying w weight on any single edge to w ′ on the graph, where △w = w ′ −w. Theorem 4 (Eigenfunction Stability of FGSD) Let △Sxy be the change in Sf(x, y) distance with respect to △w change in weight of any single edge on the graph. Then, △Sxy for any vertex pair (x, y) is bounded with respect to the function of eigenvalue as follows, △Sxy ≤2 |f(λN−1 + 2△w) −f(λ1)| Implications: Since, R = {Sf(x, y)|∀(x, y) ∈V }, then each element of R is itself bounded by △Sxy. Now, recall that F is a histogram of R, then F won’t change, if binwdith is large enough to accommodate the perturbation i.e., h ≥2△Sxy ∀(x, y) assuming all elements of R are 5 at the center of their respective histogram bins. Besides h, the other way to make R robust is by choosing a suitable f(λ) function. Lets consider the behavior △Sxy on f(λ) = λp for p > 0. Then, △Sxy ≤2 (λN−1 + 2△w)p −λp 1 and as a result, △Sxy is an increasing function with respect to p which implies that stability decreases with increase in p. For p = 0, stability does not change with respect to λ. While, for p < 0, △Sxy ≤2 1/λ|p| 1 −1/(λN−1 + 2△w)|p| . Here, △Sxy is a decreasing function with respect to |p|, which implies that stability increases with decrease in p. The results conforms with the reasoning that eigenvectors corresponding to smaller eigenvalues are smoother (i.e., oscillates slowly) than large eigenvectors (corresponding to large eigenvalues) and decreasing p will attenuate the contribution of large eigenvectors, making the f-spectral distance more stable and less susceptible towards perturbation or noise. However, decreasing p too much could result in lost of local information contained in eigenvectors with larger eigenvalues and therefore, a balance needs to be maintained. Overall, Theorem 4 shows that either through suitable h or decreasing f(λ) function, stability of R & F can be controlled to satisfy the Ideal Spectrum Property 3. Infact, we can further show that Sf(x, y) between any two vertex (x, y) on a graph, with 0 < α ≤ w ≤β bounded weights, is tightly bounded to a certain expected value. Theorem 5 (Uniform Stability of FGSD) Let E[Sf(x, y)] be the expected value of Sf(x, y) between vertex pair (x, y), over all possible graphs with fixed ordering of N vertices. Then we have, with probability 1 −δ, where δ ∈(0, 1) and θ depends upon α, β, N. Sf(x, y) −E[Sf(x, y)] ≤f(θ) p N(N −1) r log 1 δ Implications: The above theorem is based on the fact △Sxy can itself be upper bounded over all possible graphs generated on a fixed ordering of N vertices. This is a very similar condition needed for a learning algorithm to satisfy the notion of uniform stability in order to give generalization guarantees. The f-spectral distance function can itself be thought of as a learning algorithm which admits uniform stability (precise definition in supplementary) and indicates a strong stability behavior over all possible graphs and further act as a generalizable learning algorithm on the graph. Theorem 5 also reveals that the deviation can be minimized by choosing decreasing f(λ) function and it would be suitable, if f(λ) grow with O 1/ p N(N −1) rate in order to maintain stability for large graphs. So far, we have narrow down our interest to R & F based on the bijective and decreasing f(λ) function for achieving both uniqueness and stability. This eliminates all forms of increasing polynomial functions as a good choice of f(λ). As a result, we can focus on inverse (or rational) form of polynomial functions such as polyharmonic distances. A by-product of our analysis results in revealing a new class of stable dimension reduction techniques, possible by scaling Laplacian eigenvectors with decreasing function of f(λ), although such connections have already been known before. 6 Sparsity of Family of Graph Spectral Distances and Graph Spectrum Figure 2: Figure shows the number of unique elements present in R formed by different fspectral distance on all graphs (of |V | = 9, total 261, 080 graphs). Graph enumeration indices are sorted according to R( 1 λ) G. We can observe that f(λ) = 1 λ increases in form of a step function and lower bounds all other f(λ) with an addition constant. (Best viewed in color and when zoom-in.) 50000 100000 150000 200000 250000 Graph Enumeration Index 0 10 20 30 40 --R(f(6)) -G f(6) = 1 6 f(6) = 1 60:2 f(6) = 1 60:5 f(6) = 1 61:5 f(6) = 1 62 f(6) = 1 63 Sparsity is desirable for both computational and statistical efficiency. In this section, we investigate the sparsity produced in F by choosing different f(λ) functions. Here, sparsity refers to its usual definition of “how many zero features are present in F graph feature vector”. Since F is a histogram of R, number of non-zero elements in F will always be less than equal to number of unique (or distinct) elements in R. However, due to the lack of any theoretical support, we rely on empirical evidence and conjecture the following statement. 6 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Feature Index 0 50 100 150 Data Sample Index a. Harmonic distance based graph feature matrix (matrix sparsity= 97.12%). Presence of blue dot ( ) indicates feature value > 0. 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Feature Index 0 50 100 150 Data Sample Index b. Biharmonic distance based graph feature matrix (matrix sparsity= 94.28%). Presence of blue dot ( ) indicates feature value > 0. c. Harmonic distance based feature matrix sparsity shown with respect to per class label. d. Biharmonic distance based feature matrix sparsity shown with respect to per class label. Figure 3: Feature space for MUTAG (composed of two class sizes 125 & 63): Both harmonic & biharmonic based graph spectrum encodes a sparse high dimensional feature representation F for graphs which can clearly distinguish the two classes as depicted in above sub-figures. Conjecture (Sparsity of FGSD Graph Spectrum) For any graph G, let R(f(λ)) G represents the number of unique elements present in the multiset of R, computed on an unweighted graph G based on some monotonic decreasing f(λ) function. Then, the following holds, R(f(λ)) G ≥ R 1 λ G + 2 The conjecture is based on the observation that, in the Figure 2, R 1 λ + 2 lower bounds all given monotonic decreasing f(λ) along with an addition constant of 2. Same trends are observed for different graph sizes |V |. Interestingly, when graph enumeration indices are sorted according to size R 1 λ , we further observe that f(λ) = 1 λ increases in the form of a step function. From this conjecture, we can directly conclude that the F based on f(λ) = 1 λ produce the most sparse features because number of unique elements in its R is always less than any other R. Figure 3, further supports this conjecture which shows the feature space computed for MUTAG dataset in case of harmonic and biharmonic spectrums. However, this raises a question of trade-off between maintaining uniqueness and sparsity, since biharmonic distance multisets are found to be unique for more number of graphs than harmonic distance. Nonetheless, some preliminary experiments measuring harmonic vs. biharmonic performance on graph classification (in supplementary), suggest that the sparsity is more favorable than uniqueness since it results in higher classification accuracy. 7 Fast Computation of Family of Graph Spectral Distances and Spectrum Finally, we provide the general recipe of computing any member of FGSD in fast manner. In order to avoid direct eigenvalue decomposition, we can either perform approximation or leverage structural properties and sparsity of f(L) for efficient exact computation of Sf and thus, R. Approximation: Inspired from the spectral graph wavelet work [32], the recipe for approximating FGSD is to decompose f(λ) possibly into an approximate polynomial series (for example, chebyshev polynomials) as follows: f(λ) = Pr i=0 aiTi(λ) such that Ti(x) can be computed in recursive manner from few lower order terms (Ti−1(x), Ti−2(x), ..., Ti−c(x)). Then it follows, f(L) = Pr i=0 aiTi(L). In this case, the cost of computing will reduce to O(r|E|) for sparse L which is very less expensive, since O(r|E|) ≪O(N 2). But, if f(λ) is an inverse polynomial form of function, then computing f(L) = Pr i=0 aiTi(L) −1 = f(L+ r ), boils down to efficiently computing (a single) Moore Penrose Pseudo inverse of a matrix. Efficient Exact Computation: By leveraging f(L) structural properties and its sparsity, we can efficiently perform exact computation of f(L+) in much more better way than the eigenvalue 7 decomposition. We propose such a method 1 which is the generalization of [23] work. We can show that, f(L)f(L+)−1 = I −J N . Therefore, f(L)l+ k = Bk, where l+ k and Bk are the kth column of f(L+) and B = I −J N matrices, respectively. So, first we can find a particular solution of following (sparse) linear system: f(L)x = Bk and then obtain l+ k = x −1T x 1T 1x. The particular solution x can be obtained by replacing any single row and corresponding column of f(L) by zeros, and setting diagonal entry at their intersection to one, and replacing corresponding row of B by zeros. This gives a (non-singular) sparse linear system which can be solved very efficiently by performing cholesky factorization and back-substitution, resulting in overall O(N 2) complexity as shown in [5]. Beside this, there are few other fast methods to compute Pseudo inverse, particularly given by [17]. Complexity SP [4] GK[34](k ∈ {3, 4, 5}) (d ≤N) SGS[20] GS [22](k ∈ [2, 6]) DCNN[1] MLG[21] ( e N < N) FGSD Approximate — O(Ndk−1) — — — O( e N 3) O(r|E|) Worst-Case O(N 3) O(N k) O(N 3) O(N 2+k) O(N 2) O(N 3) O(N 2) Table 1: FGSD complexity comparison with few strong state-of-art algorithms (showing variables that are only dependent on N & |E|). It reveals that the FGSD complexity is better than the most. Algorithm 1 Computing R and F based on FGSD. Input: Given graphs {Gi = (Vi, Ei, Wi)}M i=1, f(λ), number of bins b, binwidth h. Output: Ri and Fi ∀i ∈[1, M]. for i = 1 to M do Compute f(Li) using approx. or exact method 1. Compute Si = diag(f(Li))J + Jdiag(f(Li)) − 2f(Li). Set Ri = {Sxy|∀(x, y) ∈|Vi|}. Compute Fi = histogram(Ri, b, h). end for As a result, it leads to a very efficient O(r|E|) complexity through approximation with the worst-case O(N 2) complexity in exact computation of R. Table 1, shows the complexity comparison with other state-of-art methods. Since, number of elements in R are O(N 2), then F is also bounded by O(N 2) and thus satisfies the ideal graph spectrum Property 5. Finally, Algorithm 1 summarizes the complete procedure of computing R & F. 8 Experiments and Results FGSD Graph Spectrum Settings: We chose harmonic distance as an ideal candidate for F. For fast computation, we adopted our proposed efficient exact computation method 1. And for computing histogram, we fix binwidth size and set the number of bins such that its range covers all {Ri}M 1 elements of M number of graphs. Therefore, we had only one parameter, binwidth size, chosen from the set {0.001, 0.0001, 0.00001}. This results in F feature vector dimension in range 100−1000, 000 with feature matrix sparsity > 90% in all cases. Our FGSD code is available at github4. Datasets: We employed wide variety of datasets considered as benchmark [1, 34, 21, 26] in graph classification task to evaluate the quality of produce FGSD graph features. We adopted 7 bioinformatics datasets: Mutag, PTC, Proteins, NCI1, NCI109, D&D, MAO and 5 social network datasets: Collab, REDDIT-Binary, REDDIT-Multi-5K, IMDB-Binary, IMDB-Multi. D&D dataset contains 691 enzymes and 587 non-enzymes proteins structures. While, MAO dataset contains 38 molecules that are antidepressant drugs and 30 do not. For other datasets, details can be found in [34]. Experimental Set-up: All experiments were performed on a single Intel-Core i7-4790@3.60GHz and 64GB RAM machine. We compare our method with 6 state-of-art Graphs Kernels: Random Walk (RW) [13], Shortest Path Kernel (SP) [4], Graphlet Kernel (GK) [30], Weisfeiler-Lehman Kernel (WL) [31], Deep Graph Kernels (DGK) [34], Multiscale Laplacian Graph Kernels (MLK) [21]. And proposed, 2 recent state-of-art Graph Convolutional Networks: PATCHY-SAN (PSCN) [26], Diffusion CNNs (DCNN) [1]. And, 2 strong Graph Spectrums: the Skew Spectrum (SGS) [20], Graphlet Spectrum (GS) [22]. We adopt the same procedure from previous works [26, 34] to make a fair comparison and used 10-fold cross validation with LIBSVM [8] library to test the classification performance. Parameters of SVM are independently tuned using training folds data and best average classification accuracies is reported for each method. We provide node degree as the labeled data for algorithms that do not operate directly on unlabeled data. Further details about parameters selection for baseline methods are present in supplementary materials. 4https://github.com/vermaMachineLearning/FGSD 8 Dataset (No. Graphs, Max. Nodes) RW [2003] SP [2005] GK [2009] WL [2011] DGK [2015] MLG (WallTime) [2016] DCNN [2016] SGS [2008] FGSD (Wall-Time) MUTAG (188, 28) 83.50 87.23 84.04 87.28 86.17 87.23(5s) 66.51 88.61 92.12(0.3s) PTC (344, 109) 55.52 58.72 60.17 55.61 59.88 62.20(18s) 55.79 — 62.80(0.07s) PROTEINS (1113, 620) 68.46 72.14 71.78 70.06 71.69 71.35(277s) 65.22 — 73.42(5s) NCI1 (4110, 111) > D 68.15 62.07 77.23 64.40 77.57(620s) 63.10 62.72 79.80(31s) NCI109 (4127, 111) > D 68.30 62.04 78.43 67.14 75.91(600s) 60.67 62.62 78.84(35s) D & D (1178, 5748) > D > D 75.05 73.76 72.75 77.02(7.5hr) OMR — 77.10(25s) MAO (68, 27) 83.52 90.35 80.88 89.79 87.76 91.17(13s) 76.10 — 95.58(0.1s) Table 2: Classification accuracy on unlabeled bioinformatics datasets. Results in bold indicate all methods with accuracy within range 2.0 from the top result and blue color (for range > 2.0), indicates the new state-of-art result. Green color highlights the best time computation, if it’s 5×faster (among the mentioned). ‘OMR’ is out of memory error, ‘> D’ is computation exceed 24hrs. Dataset (Graphs) GK [2009] DGK [2015] PSCN [2016] FGSD COLLAB (5000) 72.84 73.09 72.60 80.02 REDDIT-B (2000) 77.34 78.04 86.30 86.50 REDDIT-M (5000) 41.01 41.27 49.10 47.76 IMDB-B (1000) 65.87 66.96 71.00 73.62 IMDB-M (1500) 43.89 44.55 45.23 52.41 Table 3: Classification accuracy on social network datasets. FGSD significantly outperforms other methods. Dataset MLG [2016] DCNN [2016] PSCN [2016] GS [2009] FGSD* MUTAG 87.94 (4s) 66.98 92.63 (3s) 88.11 92.12 (0.3s) PTC 63.26 (21s) 56.60 62.90 (6s) — 62.80 (0.07s) NCI1 81.75 (621s) 62.61 78.59 (76s) 65.0 79.80 (31s) D & D 78.18 (7.5hr) OMR 77.12 (154s) — 77.10 (25s) MAO 88.29 (12s) 75.14 — — 95.58 (0.1s) Table 4: Classification accuracy on labeled bioinformatics datasets. * emphasize that FGSD did not utilize any node labels. . Classification Results: From Table 2, it is clear that FGSD consistently outperforms every other state-of-art algorithms on unlabeled bioinformatics datasets and that too significantly in many cases. FGSD even performs better for social network graphs as shown in Table 3 and achieves a very significant 7% −8% more accuracy than the current state-of-art PSCNs on COLLAB and IMDB-M datasets. Also from run-time perspective (excluding any data loading or classification time for all algorithms), it is pretty fast (2x–1000x times faster) as compare to others. These appealing results further motivated us to compare FGSD on the labeled datasets (even though, it is not a complete fair comparison). Table 4 shows that FGSD is still very competitive with all other strong (recent) algorithms that utilize node labeled data. Infact on MAO dataset, FGSD sets a new state-of-art result and stays within 0% −2% range of accuracy from the best on all labeled datasets. On few labeled datasets, we found MLG to have slightly better performance than the others, but it is 1000 times slower than FGSD when graph size jumps to few thousand nodes (see D&D Results). Altogether, FGSD shows very promising results in both accuracy & speed on all type of datasets and over all the more sophisticated algorithms. These results also point out the fact that there is untapped hidden potential in the graph structure which current algorithms are not harnessing despite having labeled data at their disposal. 9 Conclusion We present a conceptually simple yet powerful and theoretically motivated graph representation. In particular, our graph representation based on the discovery of family of graph spectral distances can exhibits uniqueness, stability, sparsity and are computationally fast. Moreover, our hunt specifically leads to the harmonic and next to it, biharmonic distances as an ideal members of this family for extracting graph features. Finally, our extensive results show that FGSD based graph features are powerful enough to dominate the unlabeled graph classification task over all the more sophisticated algorithms and competitive enough to yield high classification accuracy on labeled data even without utilizing any node labels. In our future work, we plan to generalize the FGSD for labeled dataset in order to utilize the useful node and edge label information in the graph representation. 9 10 Acknowledgments This research was supported in part by ARO MURI Award W911NF-12-1-0385, DTRA grant HDTRA1-14-1-0040, and NSF grants CNS-1618339, CNS-1618339 and CNS-1617729. References [1] J. Atwood and D. Towsley. Diffusion-convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1993–2001, 2016. [2] L. Babai. Graph isomorphism in quasipolynomial time. CoRR, abs/1512.03547, 2015. [3] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural computation, 15(6):1373–1396, 2003. [4] K. M. Borgwardt and H.-P. Kriegel. Shortest-path kernels on graphs. In Data Mining, Fifth IEEE International Conference on, pages 8–pp. IEEE, 2005. [5] M. Botsch, D. Bommes, and L. Kobbelt. Efficient linear system solvers for mesh processing. In Mathematics of Surfaces XI, pages 62–83. Springer, 2005. [6] O. Bousquet and A. Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2 (Mar):499–526, 2002. [7] J. Bruna, W. Zaremba, A. Szlam, and Y. LeCun. Spectral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203, 2013. [8] C.-C. Chang and C.-J. Lin. Libsvm: a library for support vector machines. ACM Transactions on Intelligent Systems and Technology (TIST), 2(3):27, 2011. [9] F. Costa and K. De Grave. Fast neighborhood subgraph pairwise distance kernel. In Proceedings of the 26th International Conference on Machine Learning, pages 255–262. Omnipress, 2010. [10] H. Dai, B. Dai, and L. Song. Discriminative embeddings of latent variable models for structured data. In Proceedings of the 33rd International Conference on International Conference on Machine Learning Volume 48, 2016. [11] M. Defferrard, X. Bresson, and P. Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In Advances in Neural Information Processing Systems, pages 3837–3845, 2016. [12] D. K. Duvenaud, D. Maclaurin, J. Iparraguirre, R. Bombarell, T. Hirzel, A. Aspuru-Guzik, and R. P. Adams. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, pages 2224–2232, 2015. [13] T. Gärtner, P. Flach, and S. Wrobel. On graph kernels: Hardness results and efficient alternatives. In Learning Theory and Kernel Machines, pages 129–143. Springer, 2003. [14] A. Grover and J. Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016. [15] D. K. Hammond, P. Vandergheynst, and R. Gribonval. Wavelets on graphs via spectral graph theory. Applied and Computational Harmonic Analysis, 30(2):129–150, 2011. [16] M. Henaff, J. Bruna, and Y. LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015. [17] V. N. Katsikis, D. Pappas, and A. Petralias. An improved method for the computation of the moore–penrose inverse matrix. Applied Mathematics and Computation, 217(23):9828–9834, 2011. [18] T. N. Kipf and M. Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. [19] R. Kondor. A complete set of rotationally and translationally invariant features for images. CoRR, abs/cs/0701127, 2007. [20] R. Kondor and K. M. Borgwardt. The skew spectrum of graphs. In Proceedings of the 25th international conference on Machine learning, pages 496–503. ACM, 2008. [21] R. Kondor and H. Pan. The multiscale laplacian graph kernel. In Advances in Neural Information Processing Systems, pages 2982–2990, 2016. [22] R. Kondor, N. Shervashidze, and K. M. Borgwardt. The graphlet spectrum. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 529–536. ACM, 2009. [23] Y. Lipman, R. M. Rustamov, and T. A. Funkhouser. Biharmonic distance. ACM Transactions on Graphics (TOG), 29(3):27, 2010. [24] G. Montavon, K. Hansen, S. Fazli, M. Rupp, F. Biegler, A. Ziehe, A. Tkatchenko, A. V. Lilienfeld, and K.-R. Müller. Learning invariant representations of molecules for atomization energy prediction. In Advances in Neural Information Processing Systems, pages 440–448, 2012. [25] B. Nadler, S. Lafon, R. Coifman, and I. Kevrekidis. Diffusion maps, spectral clustering and eigenfunctions of fokker-planck operators. In NIPS, pages 955–962, 2005. [26] M. Niepert, M. Ahmed, and K. Kutzkov. Learning convolutional neural networks for graphs. In Proceedings of the 33rd annual international conference on machine learning. ACM, 2016. [27] F. Orsini, P. Frasconi, and L. De Raedt. Graph invariant kernels. In IJCAI, pages 3756–3762, 2015. [28] J. Rosenblatt and P. D. Seymour. The structure of homometric sets. SIAM Journal on Algebraic Discrete Methods, 3(3):343–350, 1982. 10 [29] L. W. Shapiro. An electrical lemma. Mathematics Magazine, 60(1):36–38, 1987. [30] N. Shervashidze, S. Vishwanathan, T. Petri, K. Mehlhorn, and K. M. Borgwardt. Efficient graphlet kernels for large graph comparison. In AISTATS, volume 5, pages 488–495, 2009. [31] N. Shervashidze, P. Schweitzer, E. J. v. Leeuwen, K. Mehlhorn, and K. M. Borgwardt. Weisfeiler-lehman graph kernels. Journal of Machine Learning Research, 12(Sep):2539–2561, 2011. [32] D. I. Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst. The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains. IEEE Signal Processing Magazine, 30(3):83–98, 2013. [33] E. T. Whittaker and G. N. Watson. A course of modern analysis. Cambridge university press, 1996. [34] P. Yanardag and S. Vishwanathan. Deep graph kernels. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1365–1374. ACM, 2015. 11 | 2017 | 544 |
7,057 | Expectation Propagation with Stochastic Kinetic Model in Complex Interaction Systems Le Fang, Fan Yang, Wen Dong, Tong Guan, and Chunming Qiao Department of Computer Science and Engineering University at Buffalo {lefang, fyang24, wendong, tongguan, qiao}@buffalo.edu Abstract Technological breakthroughs allow us to collect data with increasing spatiotemporal resolution from complex interaction systems. The combination of highresolution observations, expressive dynamic models, and efficient machine learning algorithms can lead to crucial insights into complex interaction dynamics and the functions of these systems. In this paper, we formulate the dynamics of a complex interacting network as a stochastic process driven by a sequence of events, and develop expectation propagation algorithms to make inferences from noisy observations. To avoid getting stuck at a local optimum, we formulate the problem of minimizing Bethe free energy as a constrained primal problem and take advantage of the concavity of dual problem in the feasible domain of dual variables guaranteed by duality theorem. Our expectation propagation algorithms demonstrate better performance in inferring the interaction dynamics in complex transportation networks than competing models such as particle filter, extended Kalman filter, and deep neural networks. 1 Introduction We live in a complex world, where many collective systems are difficult to interpret. In this paper, we are interested in complex interaction systems, also called complex interaction networks, which are large systems of simple units linked by a network of interactions. Many research topics exemplify complex interaction systems in specific domains, such as neural activities in our brain, the movement of people in an urban system, epidemic and opinion dynamics in social networks, and so on. Modeling and inference for dynamics on these systems has attracted considerable interest since it potentially provides valuable new insights, for example about functional areas of the brain and relevant diagnoses[7], about traffic congestion and more efficient use of roads [19], and about where, when and to what extent people are infected in an epidemic crisis [23]. Agent-based modeling and simulation [22] is a classical way to address complex systems with interacting components to explore general collective rules and principles, especially in the field of systems biology. However, the actual underlying dynamics of a specific real system are not in the scope. People are not satisfied with only a macroscopic general description but aims to track down an evolving system. Unprecedented opportunities for researchers in these fields have recently emerged due to the prosperous of social media and sensor tools. For instance, the functional magnetic resonance imaging (fMRI) and the electroencephalogram (EEG) can directly measure brain activity, something never possible before. Similarly, signal sensing technologies can now easily track people’s movement and interactions [12, 24]. Researchers no longer need to worry about acquiring abundant observation data, and instead are pursuing more powerful theoretical tools to grasp the opportunities afforded by that data. We, in the machine learning community, are interested in the inference problem — that is 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. recovering the hidden dynamics of a system given certain observations. However, challenges still exist in these efforts, especially when facing systems with a large number of components. Statistical inference on complex interaction systems has a close relationship with the statistical physics of disordered ensembles, for instance, the established equivalence between loopy belief propagation and the Bethe free energy formulation [25]. In the past, the main interaction between statistical physics and statistical inference has focused on building stationary and equilibrium probability distributions over the state of a system. However, temporal dynamics is omitted when only equilibrium state is pursued. This leads not only to the loss of a significant amount of interesting information, but possibly also to qualitatively wrong conclusions. In terms of learning dynamics, one approach is to solve stochastic differential equations (SDE) [20]. In each SDE, at least one term belongs to a stochastic process, of which the most common is the Wiener process. The drift and diffusion terms in these SDEs are what we need to recover from multiple realizations (sample paths) of the stochastic process. Typically, an assumption of constant diffusion and linear drift makes the problem tractable, but realistic dynamics generally cannot be modeled by rigid SDEs with simple assumptions. Inference on complex interaction systems naturally corresponds to inference on large graphical models, which is a classical topic in machine learning. Exact filtering and smoothing algorithms are impractical due to the exploding computational cost to make inferences about complex systems. The hidden Markov model [17] faces an exponentially exploding size of the state transition kernel. The Kalman filter [15] and its variants, such as the extended Kalman filter [14], solves the linear or nonlinear estimation problem assuming that the latent and observed variables are jointly Gaussian distributions. Its scalability versus the number of components is O(M 3) due to the time cost in matrix operations. Approximate algorithms to make inferences with complex interaction systems can be divided roughly into sampling-based and optimization-based methods. Among sampling based methods, particle filter and smoother [4, 18] use particles to represent the posterior distribution of a stochastic process given noisy observations. However, particle based methods show weak scalability in a complex system: a large number of particles is needed, even in moderate size complex systems where the number of components becomes over thousands. A variety of Markov Chain Monte Carlo (MCMC) methods have been proposed [6, 5], but these generally have issues with rapid convergence in high-dimension systems. Among optimization based methods, expectation propagation (EP) [16, 13] refers to a family of approximate inference algorithms with local marginal projection. These methods adopt an iterative approach to approximate each factor of the target distribution into a tractable family. EP methods have been shown to be relatively efficient, faster than sampling in many low-dimension examples[16, 13]. The equivalence between the EP energy minimization and Bethe free energy minimization is justified [16]. Researches propose “double loop” algorithm to minimize Bethe free energy [13] in order to digest the non-convex term in the objective. They formulate a saddle point problem where strictly speaking the inner loop should be converged before moving to the outer loop. However, the stability of saddle points is an issue in general. There are also ad hoc energy optimization methods for specific network structures, for instance [21] for binary networks, but the generality of these methods is unknown. In this paper, we present new formulation of EP and apply it to solve the inference problem in general large complex interaction systems. This paper makes the following contributions. First, we formulated expectation propagation as an optimization problem to maximize a concave dual function, where its local maximum is also its global maximum and provides a solution for Bethe free energy minimization problem. To this end, we transformed concave terms in the Bethe free energy into its Legendre dual and added regularization constraint to the primal problem. Second, we designed gradient ascent and fixed point algorithms to make inferences about complex interaction systems with the stochastic kinetic model. In all the algorithms we make mean-field inferences about the individual components from observations about them according to the average interactions of all other components. Third, we conducted experiments on our transportation network data to demonstrate the performance of our proposed algorithms over the state of the art algorithms in inferring complex network dynamics from noisy observations. The remainder of this paper is organized as follows. In Section 2, we briefly review some models to specify complex system dynamics and the issues in minimizing Bethe free energy. In Section 3, we formulate the problem of minimizing Bethe free energy as maximizing a concave dual function satisfying dual feasible constraint, and develop gradient-based and fixed-point methods to make 2 tractable inferences with the stochastic kinetic model. In Section 4, we detail empirical results from applying the proposed algorithms to make inferences about transportation network dynamics. Section 5 concludes. 2 Background In this section, we provide brief background about describing complex system dynamics and typical issues in minimizing Bethe free energy. 2.1 Dynamic Bayesian Network and State-Space Model A dynamic Bayesian network (DBN) captures the dynamics of a complex interaction system by specifying how the values of state variables at the current time are probabilistically dependent on the values at previous time. Let xt = (x(1) 1 ,..., x(M) t ) be the values and yt = (y(1) t , y(2) t , ..., y(M) t ) be the observations made at these M state variables at time t. The probability measure of sample path with observations p(x1,...T , y1,...T ) can be written as p(x1,...T , y1,...T ) = Q t p(xt | xt−1)p(yt | xt) = Q t p(xt | xt−1) Q m p(y(m) t | x(m) t ), where p(xt | xt−1) is the state transition model and p(yt | xt) is observation model. We can factorize state transition into miniature kernels involving only variable x(m) t and its parents Pa(x(m) t ). The DBN inference problem is to infer p(xt | y1,...T ) for given observations y1,...T . State-space models (SSM) use state variables to describe a system by a set of first-order differential or difference equations. For example, the state evolves as xt = Ftxt−1 + wt and we make observations with yt = Htxt + vt. Typical filtering and smoothing algorithms estimate series of xt from time series of yt. Both DBM and SSM face difficulties in directly capturing the complex interactions, since these interactions seldom obey simple rigid equations and are too complex to be expressed by a joint transition kernel, even allowing time-variance of such kernel. The SKM model that follows uses a sequence of events to capture such nonlinear and time-variant dynamics. 2.2 Stochastic Kinetic Model The stochastic kinetic model (SKM) [9, 23] has been successfully applied in many fields, especially chemistry and system biology [1, 22, 8]. It describes the dynamics with chemical reactions occurring stochastically at an adaptive rate. By analogy with a chemical reaction system, we consider a complex interaction system involving M system components (species) and V types of events (reactions). Generally, the system forms a Markov jump process [9] with a finite set of discrete events. Each event v can be characterized by a “chemical equation”: r(1) v X(1) + ... + r(M) v X(M) →p(1) v X(1) + ... + p(M) v X(M) (1) where X(m) denotes the m-th component, r(m) v and p(m) v count the (relative) quantities of reactants and products. Let x(m) t be the population count (or continuous number as concentration) of m species at time t, an event will change populations (x(1) t , x(2) t , ..., x(M) t ) by ∆v = (p(1) v −r(1) v , p(2) v − r(2) v , ..., p(M) v −r(M) v ). Events occur mutually independently of each other and each event rate hv(xt, cv) is a function of the current state: hv(xt, cv) = cv (M) Y m=1 g(m) v (x(m) t ) = cv (M) Y m=1 x(m) t r(m) v (2) where cv denotes the rate constant and Q(M) m=1 x(m) t r(m) v counts the number of different ways for the components to meet and trigger an event. When we consider time steps 1, 2, ., t, ..T with sufficiently small time interval τ, the probability of two or more events happening in the interval is negligible [11]. Consider a sample path p(x1,...T , v2,...T , y1,...T ) of the system with the sequence of states 3 x1, . . . , xT , happened events v2, . . . , vT and observations y1, . . . , yT . We can express the eventbased state transition kernel P(xt, vt|xt−1) in terms of event rate hv(xt, cv): P(xt, vt|xt−1) = I (xt = xt−1 + ∆vtand xt ∈(xmin, xmax)) · P(vt|xt−1) = I (xt = xt−1 + ∆vtand xt ∈(xmin, xmax)) · τhv(xt−1, cv) if vt = v 1 −P v τhv(xt−1, cv) if vt = ∅ (3) where ∅represents a null event that none of those V events happens and states don’t change; I(·) is the indicator function; xmin, xmax are respectively lower bound and upper bound vectors, which prohibit “ghost” transitions between out-of-scope xt−1 and xt. For instance, we generally need to bound xt be non-negative in realistic complex systems. This natural constraint on xt leads to a linearly truncated state space that realistic events lie. Instead of state transitions possibly from any state to any other in DBN and state updates with a linear (or nonlinear) transformation, state in the SKM evolves according to finite number of events between time steps. The transition kernel is dependent on underlying system state and so is adaptive for capturing the underlying system dynamics. We can now consider the inference problem of complex interaction systems in the context of general DBN, with a specific event-based transition kernel from SKM. 2.3 Bethe Free Energy In general DBN, the expectation propagation algorithm to make inference aims to minimize Bethe free energy FBethe [16, 25, 13], subject to moment matching constraints. We have a non-convex prime objective and its trivial dual function with dual variables in the full space is not concave. We take the general notation that potential function is ψ(xt−1,t) = P(xt, yt | xt−1) and our optimization problem becomes the following minimize FBethe = X t Z dxt−1,tˆpt(xt−1,t) log ˆpt(xt−1,t) ψ(xt−1,t) − X t Z dxtqt(xt) log qt(xt) subject to : ⟨f(xt)⟩ˆpt(xt−1,t) = ⟨f(xt)⟩qt(xt) = ⟨f(xt)⟩ˆpt+1(xt,t+1) maximize FDual = −P t log R dxt−1,t exp(α⊤ t−1f(xt−1))ψ(xt−1,t) exp(β⊤ t f(xt))+log R dxt exp((αt+βt)⊤f(xt)) In the above, ˆpt(xt−1,t) ≈p(xt−1,t|y1,··· ,T ) are approximate two-slice probabilities, qt(xt) ≈ p(xt|y1,··· ,T ) are approximate one-slice probabilities. The vector-valued function f(xt) maps a random variable xt to its statistics. Integrals ⟨f(xt)⟩ˆpt(xt−1,t) = R dxtf(xt) R dxt−1ˆpt(xt−1,t) and so on are the mean parameters to be matched in the optimization. FBethe is the relative entropy (or K-L divergence) between the approximate distribution Q t ˆpt(xt−1,t) qt(xt) and the true distribution p(x1,··· ,T |y1,··· ,T ) = Q t ψ(xt−1,t) to be minimized. With the method of Lagrange multipliers, one can find that ˆpt(xt−1,t) and qt(xt) are distributions in the exponential family parameterized either by the mean parameters ⟨f(xt)⟩ˆpt(xt−1,t) and ⟨f(xt)⟩qt(xt) or by the natural parameters αt−1 and βt, and the trivial dual target FDual is the negative log partition of the dynamic Bayesian network. The problem with minimizing FBethe or maximizing FDual is that both have multiple local optima and there is no guarantee how closely a local optimal solution approximates the true posterior probability of the latent state. In FBethe, R dxt−1,tˆpt(xt−1,t) log ˆpt(xt−1,t) ψ(xt−1,t) is a convex term, −P t R dxtqt(xt) log qt(xt) is concave, and the sum is not guaranteed to be convex. Similarly in FDual, the minus log partition function of ˆpt (first term) is concave, the log partition function of qt is convex, and the sum is not guaranteed to be concave. Another difficulty with expectation propagation is that the approximate probability distribution often needs to satisfy some inequality constraints. For example, when approximating a target probability distribution with the product of normal distributions in Gaussian expectation propagation, we require that all factor normal distributions have positive variance. So far, the common heuristic is to set the variances to very large numbers once they fall below zero. 4 3 Methodology As noted in Subsection 2.3, the difficulty in minimizing Bethe free energy is that both the FPrimal and FDual have many local optima in the full space. Our formulation starts with transforming the concave term to its Legendre dual and taking dual variables as additional variables. Thereafter we drop the dependence over qt(xt) by utilizing the moment matching constraints, formulate EP as a constrained minimization problem and derive its dual optimization problem (which is concave under a dual feasible constraint). Our formulation also provides theoretical insights to avoid negative variance in Gaussian expectation propagation. We start by minimizing the Bethe free energy over the two-slice probabilities ˆpt and the one-slice probabilities qt: minimize over ˆpt(xt−1,t), qt(xt) : FBethe = X t Z dxt−1,tˆpt(xt−1,t) log ˆpt(xt−1,t) ψ(xt−1,t) − X t Z dxtqt(xt) log qt(xt) subject to : ⟨f(xt)⟩ˆpt(xt−1,t) = ⟨f(xt)⟩qt(xt) = ⟨f(xt)⟩ˆpt+1(xt,t+1) , Z dxtqt(x) = 1 = Z dxt−1,tˆpt(xt−1,t). (4) We introduce the Legendre dual − R dxtqt log qt= minγt n −γ⊤ t · ⟨f(xt)⟩qt + log R dxt exp(γ⊤ t · f(xt)) o and replace ⟨f(xt)⟩q(xt) in the target with ⟨f(xt)⟩ˆpt(xt−1,t) by utilizing the constraint ⟨f(xt)⟩ˆpt(xt−1,t) = ⟨f(xt)⟩qt(xt). Instead of searching γt over the over-complete full space, we add a regularization constraint to bound it: minimize over ˆpt(xt−1,t), γt : FPrimal = X t Z dxt−1,tˆpt log ˆpt(xt−1,t) ψ(xt−1,t) − X t γ⊤ t · ⟨f(xt)⟩ˆpt + X t log Z dxt exp(γ⊤ t · f(xt)) subject to : ⟨f(xt)⟩ˆpt(xt−1,t) = ⟨f(xt)⟩ˆpt+1(xt,t+1) , Z dxt−1,tˆpt(xt−1,t) = 1, γ⊤ t γt ≤ηt. (5) In the primal problem, γt is the natural parameter of a probability in the exponential family: q(x; γt) = exp(γ⊤ t f(xt))/ R dxt exp(γ⊤ t · f(xt)). The primal problem (5) is equivalent with Bethe energy minimization problem. We solve the primal problem with the Lagrange duality theorem [3]. First, we define the Lagrangian function L by introducing the Lagrange multipliers αt, λt and ξt to incorporate the constraints. Second, we set the derivative over prime variables to zero. Third, we plug the optimum point back into the Lagrangian. The Lagrange duality theorem implies that FDual(αt, λt, ξt) = infˆpt(xt−1,t),γtL(ˆpt(xt−1,t), γt, αt, λt, ξt). Thus the dual problem is as follows maximize over αt, λt ≥0 for all t : FDual = − X t log Zt−1,t + X t log Z dxt exp(γ⊤ t f(xt)) + X t λt 2 γ⊤ t γt −ηt (6) where −⟨f(xt)⟩ˆpt + ⟨f(xt)⟩γt + λtγt = 0 (7) ˆpt(xt−1,t) = 1 Zt−1,t exp(α⊤ t−1 · f(xt−1))ψ(xt−1,t) exp((γ⊤ t −α⊤ t ) · f(xt)) (8) In the dual problem, we drop the dual variable ξt since it takes value to normalize ˆpt(xt−1,t) as a valid primal probability. For any dual variable αt, λt, we map primal variables ˆpt(xt−1,t) and γt as implicit functions defined by the extreme point conditions Eq. (7),(8). We have the following theoretic guarantee with proofs in the supplementary material. We name covγt (f(xt), f(xt)) + λtI − f(xt) · f(xt)⊤ ˆpt(xt−1,t) ≻0 as the dual feasible constraint. 5 Proposition 1: The Lagrangian function has positive definite Hessian matrix under the dual feasible constraint. Proposition 1 ensures that the dual function is infimum of Lagrangian function, the point wise infimum of a family of affine functions of αt, λt, ξt, thus is concave. Instead of a full space of dual variables αt, λt, we only consider the domain constrained by the dual feasible constraint. Proposition 2: Eq. (7) and (8) have an unique solution under the dual feasible constraint. The Lagrange dual problem is a maximization problem with a bounded domain, which can be reduced to an unconstrained problem through barrier method or through penalizing constraint violation, and be solved with a gradient ascent algorithm or a fixed point algorithm. The partial derivatives of the dual function over dual variables are the following: ∂FDual ∂αt = −⟨f(xt)⟩ˆpt+1(xt,t+1) + ⟨f(xt)⟩ˆpt(xt−1,t) , ∂FDual ∂λt = 1 2 γ⊤ t γt −ηt (9) where ˆpt(xt−1,t) and γt are implicit functions defined by Eq. (7),(8). We can get a fixed point iteration through setting the first derivatives to zero 1. Here γ(·) converts mean parameters to natural parameters. ∂FDual ∂αt set= 0 ⇒forward:α(new) t = α(old) t + γ ⟨f(xt)⟩ˆpt −γ(old) t backward:γ(new) t = γ ⟨f(xt)⟩ˆpt+1 In terms of Gaussian EP, the prime variables ˆpt(xt−1,t), γt correspond to multivariate Gaussian distributions, which pose implicit constraints on the primal and dual domains. Let P ˆpt, P γt be the covariance matrix associated with ˆpt(xt−1,t), γt and it requires P ˆpt ≻0, P γt ≻0. The domain of dual variables is defined by the following constraints: λt ≥0, X ˆpt ≻0, X γt ≻0, covγt (f(xt), f(xt)) + λtI − f(xt) · f(xt)⊤ ˆpt(xt−1,t) ≻0 where −⟨f(xt)⟩ˆpt + ⟨f(xt)⟩γt + λtγt = 0 ˆpt(xt−1,t) = 1 Zt−1,t exp(α⊤ t−1 · f(xt−1))P(xt, yt|xt−1) exp((γ⊤ t −α⊤ t ) · f(xt)) In this case, it is nontrivial to find a starting point of αt, λt. We develop a phase I stage to find a strictly feasible starting point [3]. For convenience, we note αt, λt as x, rewrite above constraints as inequality constraints gi(x) ≤0 and equality constraints gj(x) = 0. Start from a valid x0, s that gi(x0) ≤s,gj(x0) = 0 and then solve the optimization problem minimize s subject to gj(x0) = 0, gi(x0) ≤s over the variable s and x. The strict feasible point of x will be found when we arrive s < 0. With the duality framework and SKM, we can solve the dual optimization problem to make inferences about complex system dynamics from imperfect observations. The latent states (the populations in SKM) can be formulated as either categorical or Gaussian random variables. In categorical case, the statistics are f(xt) = (I(x(1) t = 1), · · · , I(x(1) t = x(1) max), I(x(2) t = 1), · · · , I(x(2) t = x(2) max), · · · ), where x(1) max, · · · , x(M) max are the maximum populations and I is the indicator function. In the Gaussian case, the statistics are f(xt) = (x(1) t , x(1) 2 t , x(2) t , x(2) 2 t , · · · ) and we force the natural parameters to satisfy the constraint that minus half of precision is negative. The potential ψ(xt−1,t) in the 1Empirically, the fixed point iteration converges even without the dual feasible constraint (λt = 0); In general, λt is bounded by the dual feasible constraint and the derivative over λt is not zero. 6 distribution ˆpt+1(xt,t+1) (Eq. (8)) has specific form P vt P(xt, vt|xt−1)P(yt|xt) as Eq. (3), which facilitates a mean filed approximation to evaluate ⟨f(xt)⟩ˆp(m) t+1(x(m) t,t+1) ≈⟨f(xt)⟩ˆpt+1(xt,t+1) and ⟨f(xt)⟩ˆp(m) t (x(m) t−1,t) ≈⟨f(xt)⟩ˆpt(xt−1,t) for each species m, where ˆp(m) t+1(x(m) t,t+1) and ˆp(m) t (x(m) t−1,t) are the marginal two-slice distributions for m and derived explicitly in the supplementary material. As such, we establish linear complexity over number of species m and tractable inference in general complex system dynamics. To summarize, Algorithm 1 gives the mean-field forward-backward algorithm and the gradient ascent algorithm for making inferences with a stochastic kinetic model from noisy observations that minimize Bethe free energy. Algorithm 1 Make inference of a stochastic kinetic model with expectation propagation. Input: Discrete time SKM model (Eqs. (1),(2),(3)); Observation probabilities P(yt|xt) and initial values of αt, γt, λt for all populations m and time t. Expectation Propagation fixed point: Alternate between forward and backward iterations until convergence. • For t = 1, · · · , T, α(new) t = α(old) t + γ ⟨f(xt)⟩ˆpt(xt−1,t) −γ(old) t . • For t = T, · · · , 1, γ(new) t = γ ⟨f(xt)⟩ˆpt+1(xt,t+1) . Gradient ascent: Execute the following updates in alternating forward and backward sweeps, where the gradients are defined in Eq. (9), under the dual feasible constraints. • α(new) t ←αt + ϵ ∂Fdual ∂αt , λ(new) t ←λt + ϵ ∂FDual ∂λt . Output: Optimum ˆpt(xt−1,t), ⟨f(xt)⟩ˆpt as Eq. (7), (8) for all populations m and time t. 4 Experiments on Transportation Dynamics In this section, we evaluate and benchmark the performance of our proposed algorithms (Algorithm 1) against mainstream state-of-the-art approaches. We have the flexibility to specify species, states, and events with different granularities in SKM, at either macroscopic or microscopic level. Consequently, different levels of inference can be made by feeding in corresponding observations and model specifications. For example, to track epidemics in a social network we can define each person as a species and their health state as a hidden state, with infection and recovery as events. Using real-world datasets about epidemic diffusion in a college campus, we efficiently inferred students’ health states compared with ground truth from surveys [23]. In this section, we demonstrate population level inference in the context of transportation dynamics2. Transportation Dynamics A transportation system consists of residents and a network of locations. The macroscopic description is the number of vehicles indexed by location and time, while the microscopic description is the location of each vehicle at each time. Our goal is to infer the macroscopic populations from noisy sensor network observations made at several selected roads. Such inference problems in complex interaction networks are not trivial, for several reasons: the system can be very large and contain large number of components (residents and locations) and therefore many approaches fail due to resource costs; the interaction between components (i.e. the mobility of residents) is by nature uncertain and time variant, and multiple variables (populations at different locations) correlate together. To model transportation dynamics, we classify people at the same location as one species. Let l ∈L index the locations and x(l) t be the number of vehicles at location l at time t, which are the latent states we want to identify. The events v that change system states can be generally expressed as reaction li →lj, which represents one vehicle moving from location li to location lj. It decrease x(li) t by 1, increase x (lj) t by 1 and keep other x(l) t the same. The event rate reads hv(xt, cv) = cv Q(L) l=1 g(l) v (x(l) t ) = cvx(li) t , as there are x(li) t different possible vehicles to transit at li. 2Source code and a general function interface for other domains at both levels are here online 7 Experiment Setup: We select a certain proportion, e.g. 20%, of vehicles as probe vehicles to build the observation model, assuming that the probe vehicles are uniformly sampled from the system. Let xttl be the total number of vehicles in the system, xp the total number of probe vehicles, x(l) t the number of vehicles at location l, y(l) t the number of probe vehicles observed at l. A rough point estimation of x(l) t is x(l) t = xttly(l) t /xp. More strictly, the likelihood of observing y(l) t probe vehicles among x(l) t vehicles at l is p(y(l) t | x(l) t ) = x(l) t y(l) t · xttl−x(l) t xp−y(l) t xttl y(l) t . Our hidden state x(l) t can be represented as either a discrete variable or a univariate gaussian. Dataset Description: We implement and benchmark algorithms on two representative datasets. In the SynthTown dataset, we synthesize a mini road network (Fig. 1(a)). Virtual residents go to work in the morning and back home in the evening. We synthesize their itineraries from MATSIM, a common Multi-agent transportation simulator[2]. The number of residents and locations are respectively 2,000 and 25. In the Berlin dataset, we have a larger real world road network with 1,539 locations derived from Open Street Map and 9,178 people’s itineraries synthesized from MATSIM. Both two datasets span a whole day, from midnight to midnight. Evaluation Metrics: To evaluate the accuracy of the model, we need compare the series of inferred populations against the series of ground truths. We choose three appropriate metrics: the “coefficient of determination” (R2), the mean percentage error (MPE) and mean squared error (MSE). In statistics, the R2 tells the goodness of fit of a model and is calculated as 1 − P i(yi−fi)2 P i(yi−¯y)2 , where yi are the ground truth values, ¯y their mean and fi the inferred values. Typically, R2ranges from 0 and 1: the closer it is to 1, the better the inference is. The MPE computes average of percentage errors by which fi differ from yi and is calculated as 100% n P i yi−fi yi . MPE can be either positive or negative and the closer it is to 0, the better. The MSE is calculated as 1 n P i(yi −fi)2 to measure the average deviation between y and f. The lower the MSE, the better the inference. We also consider the runtime as an important metric to research scalability of different approaches. Approaches for Benchmark: We implement three algorithms to instantiate the procedures in Algorithm 1: the fixed point algorithm with discrete latent state (DFP) or gaussian latent state (GFP) and the gradient ascent algorithm with discrete latent state (DG). The pseudo codes are included in the supplementary material. We also implement several other mainstream state-of-the-art approaches. Particle Filter (PF): We implement a sampling importance resampling (SIR) [10] algorithm that recursively approximates the posterior with a weighted set of particles, updates these particles and resamples to cope with degeneracy problem. Performance is dependent on the number of particles with a certain number is needed to achieve a good result. We selected the number of particles empirically by increasing the number until no obvious accuracy improvement could be detected, and ended up with thousands to tens of thousands of particles. Extended Kalman Filter (EKF): We implement the standard EKF procedure with an alternating prediction step and update step. Feedforward Neural Network (FNN): The FNN builds only a non-parametric model between input nodes and output nodes, without “actually” learning the dynamics of the system. We implement a five-layer FNN: one input layer accepting the inference time point and observations in certain previous period (e.g. one hour), three hidden layers and one output layer from which we directly read the inference populations. The FNN and afterwards RNN are both trained by feeding ground truth populations about each road into the network structures. We tune meta-parameters and train the network with 30 days synthesized mobility data from MATSIM until obtaining optimum performance. Recurrent Neural Network (RNN): The RNN is capable of exploiting previous inferred hidden states recursively to improve current estimation. We implement a typical RNN, such that in each RNN cell we take both the current observations and inferred population from a previous cell as input, traverse one hidden layer, and then output the inferred populations. We train the RNN with 30 days of synthesized mobility data from MATSIM until obtaining optimum performance. Inference Performance and Scalability: Figure 1 plots the inferred population at several representative locations in Fig. 1(a). The lines above the shaded areas are the ground truths, and we plot the error (i.e., inferred populations minus ground truth) with different scales. For GFP, the inference within µ ± 3σ confidence intervals is shown in the colored “belt”. We can see that our proposed algorithms generally deviate less from the ground truth than other approaches do. 8 Table 1: Performance and time scalability of all algorithms Dataset SynthTown Berlin Metrics R2 MPE MSE Time R2 MPE MSE Time DFP 0.85 -3% 181 47 sec 0.66 3% 20 29 min GFP 0.85 -8% 161 42 sec 0.62 2.5% 27 21 min DG 0.87 -5% 104 157 sec 0.61 2.8% 26 56 min PF 0.50 -21% 663 15 sec 0.50 -6% 678 71min EKF 0.51 -19% 679 2 sec 0.45 -40% 1046 14 hour FNN 0.73 11% 526 1 h training 0.31 -14% 540 11 h training RNN 0.72 -14% 407 8 h training 0.51 -9% 800 28 h training (a) Road Network (b) Inference results Figure 1: Road network and inference results with the SynthTown Dataset Table 1 summarizes the performances in different metrics (mean values). There is both a training phase and a running phase in making inferences with neural networks, with the training phase taking longer. The neural network training time shown in the table ranges from several hours to around one day, and is quadratic in the number of system components per batch per epoch. The neural network running times in our experiments are comparable with EP running times. Theoretically, neural network running times are quadratic in the number of system components to make one prediction, and EP running times are linear in the number of system components to propagate marginal probabilities from one time step to the next (EP algorithms empirically converge within a few iterations), while PF scales quadratically and EKF cubically with the number of locations. Summary: Generally, our proposed algorithms have higher R2, “narrower” MPE and lower MSE, followed by neural networks, PF and EKF. The neural networks sometimes provide comparable performance. Our proposed algorithms, especially the DFP and GFP, experience lower time explosion in bigger datasets. Overall, our algorithms generally outperform PF, EKF, FNN and RNN in terms of accuracy metrics and scalability to a larger dataset. 5 Discussion In this paper, we have introduced the stochastic kinetic model and developed expectation propagation algorithms to make inferences about the dynamics of complex interacting systems from noisy observations. To avoid getting stuck at a local optimum, we formulate the problem of minimizing Bethe free energy as a maximization problem over a concave dual function in the feasible domain of dual variables guaranteed by duality theorem. Our experiments show superior performance over competing models such as particle filter, extended Kalman filter, and deep neural networks. 9 References [1] Adam Arkin, John Ross, and Harley H McAdams. Stochastic kinetic analysis of developmental pathway bifurcation in phage λ-infected escherichia coli cells. Genetics, 149(4):1633–1648, 1998. [2] Michael Balmer, Marcel Rieser, Konrad Meister, David Charypar, Nicolas Lefebvre, and Kai Nagel. Matsim-t: Architecture and simulation times. In Multi-agent systems for traffic and transportation engineering, pages 57–78. IGI Global, 2009. [3] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. [4] Pierre Del Moral. Non-linear filtering: interacting particle resolution. Markov processes and related fields, 2(4):555–581, 1996. [5] Wen Dong, Alex Pentland, and Katherine A Heller. Graph-coupled hmms for modeling the spread of infection. arXiv preprint arXiv:1210.4864, 2012. [6] Arnaud Doucet, Nando De Freitas, Kevin Murphy, and Stuart Russell. Rao-blackwellised particle filtering for dynamic bayesian networks. In Proceedings of the Sixteenth conference on Uncertainty in artificial intelligence, pages 176–183. Morgan Kaufmann Publishers Inc., 2000. [7] Karl Friston. Learning and inference in the brain. Neural Networks, 16(9):1325–1352, 2003. [8] Daniel T Gillespie. Stochastic simulation of chemical kinetics. Annu. Rev. Phys. Chem., 58:35–55, 2007. [9] Andrew Golightly and Colin S Gillespie. Simulation of stochastic kinetic models. In Silico Systems Biology, pages 169–187, 2013. [10] Neil J Gordon, David J Salmond, and Adrian FM Smith. Novel approach to nonlinear/nongaussian bayesian state estimation. In IEE Proceedings F (Radar and Signal Processing), volume 140, pages 107–113. IET, 1993. [11] Winfried K Grassmann. Transient solutions in markovian queueing systems. Computers & Operations Research, 4(1):47–53, 1977. [12] Tong Guan, Wen Dong, Dimitrios Koutsonikolas, and Chunming Qiao. Fine-grained location extraction and prediction with little known data. In Wireless Communications and Networking Conference (WCNC), 2017 IEEE, pages 1–6. IEEE, 2017. [13] Tom Heskes and Onno Zoeter. Expectation propagation for approximate inference in dynamic bayesian networks. In Proceedings of the Eighteenth conference on Uncertainty in artificial intelligence, pages 216–223. Morgan Kaufmann Publishers Inc., 2002. [14] Simon J Julier and Jeffrey K Uhlmann. Unscented filtering and nonlinear estimation. Proceedings of the IEEE, 92(3):401–422, 2004. [15] Rudolph Emil Kalman et al. A new approach to linear filtering and prediction problems. Journal of basic Engineering, 82(1):35–45, 1960. [16] Thomas P Minka. The ep energy function and minimization schemes. See www. stat. cmu. edu/˜ minka/papers/learning. html, 2001. [17] Lawrence R Rabiner. A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989. [18] Vinayak Rao and Yee Whye Teh. Fast mcmc sampling for markov jump processes and continuous time bayesian networks. arXiv preprint arXiv:1202.3760, 2012. [19] Claudia Tebaldi and Mike West. Bayesian inference on network traffic using link count data. Journal of the American Statistical Association, 93(442):557–573, 1998. 10 [20] Michail D Vrettas, Manfred Opper, and Dan Cornford. Variational mean-field algorithm for efficient inference in large systems of stochastic differential equations. Physical Review E, 91(1):012148, 2015. [21] Max Welling and Yee Whye Teh. Belief optimization for binary networks: A stable alternative to loopy belief propagation. In Proceedings of the Seventeenth conference on Uncertainty in artificial intelligence, pages 554–561. Morgan Kaufmann Publishers Inc., 2001. [22] Darren J Wilkinson. Stochastic modelling for systems biology. CRC press, 2011. [23] Zhen Xu, Wen Dong, and Sargur N Srihari. Using social dynamics to make individual predictions: Variational inference with stochastic kinetic model. In Advances In Neural Information Processing Systems, pages 2775–2783, 2016. [24] Fan Yang and Wen Dong. Integrating simulation and signal processing with stochastic social kinetic model. In International Conference on Social Computing, Behavioral-Cultural Modeling and Prediction and Behavior Representation in Modeling and Simulation, pages 193–203. Springer, Cham, 2017. [25] Jonathan S Yedidia, William T Freeman, and Yair Weiss. Understanding belief propagation and its generalizations. Exploring artificial intelligence in the new millennium, 8:236–239, 2003. 11 | 2017 | 545 |
7,058 | Welfare Guarantees from Data Darrell Hoy University of Maryland darrell.hoy@gmail.com Denis Nekipelov University of Virginia denis@virginia.edu Vasilis Syrgkanis Microsoft Research vasy@microsoft.com Abstract Analysis of efficiency of outcomes in game theoretic settings has been a main item of study at the intersection of economics and computer science. The notion of the price of anarchy takes a worst-case stance to efficiency analysis, considering instance independent guarantees of efficiency. We propose a data-dependent analog of the price of anarchy that refines this worst-case assuming access to samples of strategic behavior. We focus on auction settings, where the latter is non-trivial due to the private information held by participants. Our approach to bounding the efficiency from data is robust to statistical errors and mis-specification. Unlike traditional econometrics, which seek to learn the private information of players from observed behavior and then analyze properties of the outcome, we directly quantify the inefficiency without going through the private information. We apply our approach to datasets from a sponsored search auction system and find empirical results that are a significant improvement over bounds from worst-case analysis. 1 Introduction A major field at the intersection of economics and computer science is the analysis of the efficiency of systems under strategic behavior. The seminal work of [6, 11] triggered a line of work on quantifying the inefficiency of computer systems, ranging from network routing, resource allocation and more recently auction marketplaces [10]. However, the notion of the price of anarchy suffers from the pessimism of worst-case analysis. Many systems can be inefficient in the worst-case over parameters of the model, but might perform very well for the parameters that arise in practice. Due to the large availability of datasets in modern economic systems, we propose a data-dependent analog of the price of anarchy, which assumes access to a sample of strategic behavior from the system. We focus our analysis on auction systems where the latter approach is more interesting due to the private information held by the participants of the system, i.e. their private value for the item at sale. Since efficiency is a function of these private parameters, quantifying the inefficiency of the system from samples of strategic behavior is non-trivial. The problem of estimation of the inefficiency becomes an econometric problem where we want to estimate a function of hidden variables from observed strategic behavior. The latter is feasible under the assumption that the observed behavior is the outcome of an equilibrium of the strategic setting, which connects observed behavior to unobserved private information. Traditional econometric approaches to auctions [3, 8], address such questions by attempting to exactly pin-point the private parameters from the observed behavior and subsequently measuring the quantities of interest, such as the efficiency of the allocation. The latter approach is problematic in complex auction systems for two main reasons: (i) it leads to statistical inefficiency, (ii) it requires strong conditions on the connection between observed behavior and private information. Even for a single-item first-price auction, uniform estimation of the private value of a player from T samples of observed bids, can only be achieved at O(T 1/3)-rates [3]. Moreover, uniquely identifying the private information from the observed behavior, requires a one-to-one mapping between the two 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. quantities. The latter requires strong assumptions on the distribution of private parameters and can only be applied to simple auction rules. Our approach bridges the gap between worst-case price of anarchy analysis and statistically and modeling-wise brittle econometric analysis. We provide a data-dependent analog of recent techniques for quantifying the worst-case inefficiency in auctions [13, 4, 10], that do not require characterization of the equilibrium structure and which directly quantify the inefficiency through best-response arguments, without the need to pin-point the private information. Our approach makes minimal assumptions on the distribution of private parameters and on the auction rule and achieves ˜O( √ T)rates of convergence for many auctions used in practice, such as the Generalized Second Price (GSP) auction [2, 14]. We applied our approach to a real world dataset from a sponsored search auction system and we portray the optimism of the data-dependent guarantees as compared to their worst-case counterparts [1]. 2 Preliminaries We consider the single-dimensional mechanism design setting with n bidders. The mechanism designer wants to allocate a unit of good to the bidders, subject to some feasibility constraint on the vector of allocations (x1, . . . , xn). Let X be the space of feasible allocations. Each bidder i has a private value vi ∈[0, H] per-unit of the good, and her utility when she gets allocation xi and is asked to make a payment pi is vi · xi −pi. The value of each bidder is drawn independently from distribution with CDF Fi, supported in Vi ⊆R+ and let F = ×i Fi be the joint distribution. An auction A solicits a bid bi ∈B from each bidder i and decides on the allocation vector based on an allocation rule X : Bn →X and a payment rule p : Bn →Rn. For a vector of values and bids, the utility of a bidder is: Ui(b; vi) = vi · Xi(b) −Pi(b). (1) A strategy σi : Vi →B, for each bidder i, maps the value of the bidder to a bid. Given an auction A and distribution of values F, a strategy profile σ is a Bayes-Nash Equilibrium (BNE) if each bidder i with any value vi ∈Vi maximizes her utility in expectation over her opponents bids, by bidding σi(vi). The welfare of an auction outcome is the expected utility generated for all the bidders, plus the revenue of the auctioneer, which due to the form of bidder utilities boils down to being the total value that the bidders get from the allocation. Thus the expected utility of a strategy profile σ is WELFARE(σ; F) = Ev∼F X i∈[n] vi · Xi(σ(v)) (2) We denote with OPT(F) the expected optimal welfare: OPT(F) = Ev∼F[maxx∈X P i∈[n] vi · xi]. Worst-case Bayes-Nash price of anarchy. The Bayesian price of anarchy of an auction is defined as the worst-case ratio of welfare in the optimal auction to the welfare in a Bayes-Nash equilibrium of the original auction, taken over all value distributions and over all equilibria. Let BNE(A, F) be the set of Bayes-Nash equilibria of an auction A, when values are drawn from distributions F. Then: POA = sup F,σ∈BNE(F) OPT(F) WELFARE(σ; F) (3) 3 Distributional Price of Anarchy: Refining the POA with Data We will assume that we observe T samples b1:T = {b1, . . . , bT } of bid profiles from running T times an auction A. Each bid profile bt is drawn i.i.d. based on an unknown Bayes-Nash equilibrium σ of the auction, i.e.: let D denote the distribution of the random variable σ(v), when v is drawn from F. Then bt are i.i.d. samples from D. Our goal is to refine our prediction on the efficiency of the auction and compute a bound on the price of anarchy of the auction conditional on the observed data set. More formally, we want to derive statements of the form: conditional on b1:T , with probability at least 1 −δ: WELFARE(σ; F) ≥1 ˆρOPT(F), where ˆρ is the empirical analogue of the worst-case price of anarchy ratio. 2 Infinite data limit We will tackle this question in two steps, as is standard in estimation theory. First we will look at the infinite data limit where we know the actual distribution of equilibrium bids D. We define a notion of price of anarchy that is tailored to an equilibrium bid distribution, which we refer to as the distributional price of anarchy. In Section 4 we give a distribution-dependent upper bound on this ratio for any single-dimensional auction. Subsequently, in Section 5, we show how one can estimate this upper bound on the distributional price of anarchy from samples. Given a value distribution F and an equilibrium σ, let D(F, σ) denote the resulting equilibrium bid distribution. We then define the distributional price of anarchy as follows: Definition 1 (Distributional Price of Anarchy). The distributional price of anarchy DPOA(D) of an auction A and a distribution of bid profiles D, is the worst-case ratio of welfare in the optimal allocation to the welfare in an equilibrium, taken over all distributions of values and all equilibria that could generate the bid distribution D: DPOA(D) = sup F,σ∈BNE(F) s.t. D(F,σ)=D OPT(F) WELFARE(σ; F) (4) This notion has nothing to do with sampled data-sets, but rather is a hypothetical worst-case quantity that we could calculate had we known the true bid generating distribution D. What does the extra information of knowing D give us? To answer this question, we first focus on the optimization problem each bidder faces. At any Bayes-Nash equilibrium each player must be best-responding in expectation over his opponent bids. Observe that if we know the rules of the auction and the equilibrium distribution of bids D, then the expected allocation and payment function of a player as a function of his bid are uniquely determined: xi(b; D) = Eb−i∼D−i [Xi(b, b−i)] pi(b; D) = Eb−i∼D−i [Pi(b, b−i)] . (5) Importantly, these functions do not depend on the distribution of values F, other than through the distribution of bids D. Moreover, the expected revenue of the auction is also uniquely determined: REV(D) = Eb∼D "X i Pi(b) # , (6) Thus when bounding the distributional price of anarchy, we can assume that these functions and the expected revenue are known. The latter is unlike the standard price of anarchy analysis, which essentially needs to take a worst-case approach to these quantities. Shorthand notation Through the rest of the paper we will fix the distribution D. Hence, for brevity we omit it from notation, using xi(b), pi(b) and REV instead of xi(b; D), pi(b; D) and REV(D). 4 Bounding the Distributional Price of Anarchy We first upper bound the distributional price of anarchy via a quantity that is relatively easy to calculate as a function of the bid distribution D and hence will also be rather straightforward to estimate from samples of D, which we defer to the next section. To give intuition about the upper bound, we start with a simple but relevant example of bounding the distributional price of anarchy in the case when the auction A is the single-item first price auction. We then generalize the approach to any auction A. 4.1 Example: Single-Item First Price Auction In a single item first price auction, the designer wants to auction a single indivisible good. Thus the space of feasible allocations X, are ones where only one player gets allocation xi = 1 and other players get allocation 0. The auctioneer solicits bids bi from each bidder and allocates the good to the highest bidder (breaking ties lexicographically), charging him his bid. Let D be the equilibrium distribution of bids and let Gi be the CDF of the bid of player i. For simplicity we assume that Gi is continuous (i.e. the distribution is atomless). Then the expected allocation of a player i from submitting a bid b is equal to xi(b) = G−i(b) = Q j̸=i Gj(b) and his expected payment is pi(b) = b · xi(b), leading to expected utility: ui(b; vi) = (vi −b)G−i(b). 3 The quantity DPOA is a complex object as it involves the structure of the set of equilibria of the given auction. The set of equilibria of a first price auction when bidders values are drawn from different distributions is an horrific object.1 However, we can upper bound this quantity by a much simpler data-dependent quantity by simply invoking the fact that under any equilibrium bid distribution no player wants to deviate from his equilibrium bid. Moreover, this data-dependent quantity can be much better than its worst-case counterpart used in the existing literature on the price of anarchy. Lemma 1. Let A be the single item first price auction and let D be the equilibrium distribution of bids, then DPOA(D) ≤ µ(D) 1−e−µ(D) , where µ(D) = maxi∈[n] Eb−i∼D−i[maxj̸=i bj] Eb∼D[maxi∈[n] bi] . Proof. Let Gi be the CDF of the bid of each player under distribution D. Moreover, let σ denote the equilibrium strategy that leads to distribution D. By the equilibrium condition, we know that for all vi ∈Vi and for all b′ ∈B, ui(σi(vi); vi) ≥ui(b′; vi) = (vi −b′) · G−i(b′). (7) We will give a special deviating strategy used in the literature [13], that will show that either the players equilibrium utility is large or the expected maximum other bid is high. Let Ti denote the expected maximum other bid which can be expressed as Ti = R ∞ 0 1 −G−i(z)dz. We consider the randomized deviation where the player submits a randomized bid in z ∈[0, vi(1 −e−µ)] with PDF f(z) = 1 µ(vi−z). Then the expected utility from this deviation is: E b′ [ui(b′; vi)] = Z vi(1−e−µ) 0 (vi −z) · G−i(z)f(z)dz = 1 µ Z vi(1−e−µ) 0 G−i(z)dz (8) Adding the quantity 1 µ R vi(1−e−µ) 0 (1 −G−i(z))dz ≤1 µTi on both sides, we get: Eb′ [ui(b′; vi)] + 1 µTi ≥vi 1−e−µ µ . Invoking the equilibrium condition we get: ui(σi(vi); vi) + 1 µTi ≥vi 1−e−µ µ . Subsequently, for any x∗ i ∈[0, 1]: ui(σi(vi); vi) + 1 µTi · x∗ i ≥vi · x∗ i 1 −e−µ µ . (9) If x∗ i is the expected allocation of player i under the efficient allocation rule X∗ i (v) ≡1{vi = maxj vj}, then taking expectation of Equation (9) over vi and adding across all players we get: X i E vi [ui(σi(vi); vi)] + 1 µ E v "X i TiX∗ i (v) # ≥OPT(F)1 −e−µ µ (10) The theorem then follows by invoking the fact that for any feasible allocation x: P i Ti · xi ≤ maxi Ti = µ(D)REV(D), using the fact that expected total agent utility plus total revenue at equilibrium is equal to expected welfare at equilibrium and setting µ = µ(D). Comparison with worst-case POA In the worst-case, µ(D) is upper bounded by 1, leading to the well-known worst-case price of anarchy ratio of the single-item first price auction of (1 −1/e)−1, irrespective of the bid distribution D. However, if we know the distribution D then we can explicitly estimate µ, which can lead to a much better ratio (see Figure 1). Moreover, observe that even if we had samples from the bid distribution D, then estimating µ(D) is very easy as it corresponds to the ratio of two expectations, each of which can be estimating to within an O( 1 √ T ) error by a simple average and using standard concentration inequalities. Even thought this improvement, when compared to the worst-case bound might not be that drastic in the first price auction, the extension of the analysis in the next section will be applicable even to auctions where the analogue of the quantity µ(D) is not even bounded in the worst-case. In those settings, the empirical version of the price of anarchy analysis is of crucial importance to get any efficiency bound. 1Even for two bidders with uniformly distributed values U[0, a] and U[0, b], the equilibrium strategy requires solving a complex system of partial differential equations, which took several years of research in economics to solve (see [15, 7]) 4 0 1 2 3 4 1 2 3 4 µ Price of Anarchy Figure 1: The upper bound on the distributional price of anarchy of an auction µ(D) 1−e−µ(D as a function of µ(D). Comparison with value inversion approach Apart from being just a primer to our main general result in the next section, the latter result about the data-dependent efficiency bound for the first price auction, is itself a contribution to the literature. It is notable to compare the latter result with the standard econometric approach to estimating values in a first price auction pioneered by [3] (see also [8]). Traditional non-parametric auction econometrics use the equilibrium best response condition to pin-point the value of a player from his observed bid, by what is known as value inversion. In particular, if the function: ui(b′; vi) = (vi −b′) · G−i(b′) has a unique maximum for each vi and this maximum is strictly monotone in vi, then given the equilibrium bid of a player bi and given a data distribution D we can reverse engineer the value vi(bi) that the player must have. Thus if we know the bid distribution D we can calculate the equilibrium welfare as Eb∼D [P i vi(bi) · Xi(b)]. Moreover, we can calculate the expected optimal welfare as: Eb∼D [maxi vi(bi)]. Thus we can pin-point the distributional price of anarchy. However, the latter approach suffers from two main drawbacks: (i) estimating the value inversion function vi(·) uniformly over b from samples, can only happen at very slow rates that are at least O(1/T 1/3) and which require differentiability assumptions from the value and bid distribution as well as strong conditions that the density of the value distribution is bounded away from zero in all the support (with this lower bound constant entering the rates of convergence), (ii) the main assumption of the latter approach is that the optimal bid is an invertible function and that given a bid there is a single value that corresponds to that bid. This assumption might be slightly benign in a single item first price auction, but becomes a harsher assumption when one goes to more complex auction schemes. Our result in Lemma 1 suffers neither of these drawbacks: it admits fast estimation rates from samples, makes no assumption on properties of the value and bid distribution and does not require invertibility of the best-response correspondence. Hence it provides an upper bound on the distributional price of anarchy that is statistically robust to both sampling and mis-specification errors. The robustness of our approach comes with the trade-off that we are now only estimating a bound on the efficiency of the outcome, rather than exactly pinpointing it. 4.2 Generalizing to any Single-Dimensional Auction Setting Our analysis on DPOA is based on the reformulation of the auction rules as an equivalent pay-yourbid auction and then bounding the price of anarchy as a function of the ratio of how much a player needs to pay in an equivalent pay-your-bid auction, so as to acquire his optimal allocation vs. how much revenue is the auctioneer collecting. For any auction, we can re-write the expected utility of a bid b: ui(b; vi) = xi(b) vi −pi(b) xi(b) (11) This can be viewed as the same form of utility if the auction was a pay-your-bid auction and the player submitted a bid of pi(b) xi(b). We refer to this term as the price-per-unit and denote it ppu(b) = pi(b) xi(b). Our analysis will be based on the price-per-unit allocation rule ˜x(·), which determines the expected allocation of a player as a function of his price-per-unit. Given this notation, we can re-write the utility that an agent achieves if he submits a bid that corresponds to a price-per-unit of z as: ˜ui(z; vi) = ˜x(z)(vi −z). The latter is exactly the form of a pay-your-bid auction. Our upper bound on the DPOA, will be based on the inverse of the PPU allocation rule; let τi(z) = ˜x−1 i (z) be the price-per-unit of the cheapest bid that achieves allocation at least z. More formally, 5 τi(z) = minb|xi(b)≥z{ppu(b)}. For simplicity, we assume that any allocation z ∈[0, 1] is achieveable by some high enough bid b.2 Given this we can define the threshold for an allocation: Definition 2 (Average Threshold). The average threshold for agent i is Ti = Z 1 0 τi(z) dz (12) In Figures 3 and 2 we provide a pictorial representation of these quantities. Connecting with the previous section, for a first price auction, the price-per-unit function is ppu(b) = b, the price-per-unit allocation function is ˜xi(b) = G−i(b) and the threshold function is τi(z) = G−1 −i (z). The average threshold Ti is equal to R 1 0 G−1 −i (z)dz = R ∞ 0 1 −G−i(b)db, i.e. the expected maximum other bid. 1 PPU ˜xi(ppu) = τ −1 i (ppu) E[Allocation] vi ui(b) ppu(b) Figure 2: For any bid b with PPC ppu(b), the area of a rectangle between (ppu(b), ˜xi(ppu(b))) and (vi, 0) on the bid allocation rule is the expected utility ui(b). The BNE action b∗is chosen to maximize this area. 1 Ti ˜x(ppu) PPU E[Allocation] Figure 3: The average threshold is the area to the left of the price-per-unit allocation rule, integrate from 0 to 1. We now give our main theorem, which is a distribution-dependent bound on DPOA, that is easy to compute give D and which can be easily estimated from samples of D. This theorem is a generalization of Lemma 1 in the previous section. Theorem 2 (Distributional Price of Anarchy Bound). For any auction A in a single dimensional setting and for any bid distribution D, the distributional price of anarchy is bounded by DPOA(D) ≤ µ(D) 1−e−µ(D) , where µ(D) = maxx∈X Pn i=1 Ti·xi REV(D) . Theorem 2 provides our main method for bounding the distributional price of anarchy. All we need is to compute the revenue REV of the auction and the quantity: T = maxx∈X Pn i=1 Ti · xi, (13) under the given bid distribution D. Both of these are uniquely defined quantities if we are given D. Moreover, once we compute Ti, the optimization problem in Equation (13) is simply a welfare maximization problem, where each player’s value per-unit of the good is Ti. Thus, the latter can be solved in polynomial time, whenever the welfare maximization problem over the feasible set X is polynomial-time solvable. Theorem 2 can be viewed as a bid distribution-dependent analogue of the revenue covering framework [4] and of the smooth mechanism framework [13]. In particular, the quantity µ(D) is the datadepenent analogue of the worst-case µ quantity used in the definition of µ-revenue covering in [4] and is roughly related to the µ quantity used in the definition of a (λ, µ)-smooth mechanism in [13]. 5 Distributional Price of Anarchy Bound from Samples In the last section, we assumed we were given distribution D and hence we could compute the quantity µ = T REV, which gave an upper bound on the DPOA. We now show how we can estimate this 2The theory can be easily extended to allow for different maximum achievable allocations by each player, by simply integrating the average threshold only up until the largest such allocation. 6 quantity µ when given access to i.i.d. samples b1:T from the bid distribution D. We will separately estimate T and REV. The latter is simple expectation and thereby can be easily estimated by an average at 1 √ T rates. For the former we first need to estimate Ti for each player i, which requires estimation of the allocation and payment functions xi(·; D) and pi(·; D). Since both of these functions are expected values over the equilibrium bids of opponents, we will approximate them by their empirical analogues: bxi(b) = 1 T T X t=1 Xi(b, bt −i) bpi(b) = 1 T T X t=1 Pi(b, bt −i). (14) To bound the estimation error of the quantities ˆTi produced by using the latter empirical estimates of the allocation and payment function, we need to provide a uniform convergence property for the error of these functions over the bid b. Since b takes values in a continuous interval, we cannot simply apply a union bound. We need to make assumptions on the structure of the class of functions FXi = {Xi(b, ·) : b ∈B} and FPi = {Pi(b, ·) : b ∈B}, so as uniformly bound their estimation error. For this we resort to the technology of Rademacher complexity. For a generic class of functions F and a sequence of random variables Z1:T , the Rademacher complexity is defined as: RT (F, Z1:T ) = E σ1:T " sup f∈F 1 T T X t=1 σtf(Zt) # . (15) where each σt ∈{±1/2} is an i.i.d. Rademacher random variable, which takes each of those values with equal probabilities. The following well known theorem will be useful in our derivations: Theorem 3 ([12]). Suppose that for any sample Z1:T of size T, RT (F, Z1:T ) ≤RT and suppose that functions in F take values in [0, H]. Then with probability 1 −δ: sup f∈F 1 T T X t=1 f(Zt) −E[f(Z)] ≤2RT + H r 2 log(4/δ) T (16) This Theorem reduces our uniform error problem to bounding the Rademacher complexity of classes FXi and FPi, since we immediately have the following corollary (where we also use that the allocation functions lie in [0, 1] and the payment functions lie in [0, H]): Corollary 4. Suppose that for any sample b1:T of size T, the Rademacher complexity of classes FXi and FPi is at most RT . Then with probability 1−δ/2, both sup b∈B | bxi(b)−xi(b)| and sup b∈B |bpi(b)−pi(b)| are at most 2RT + H p 2 log(4/δ) / T. We now provide conditions under which the Rademacher complexity of these classes is ˜O(1/ √ T). Lemma 5. Suppose that B = [0, B] and for each bidder i and each bi ∈B, the functions Xi(bi, ·) : [0, B]n−1 7→[0, 1] and Pi(b, ·) : [0, B]n−1 7→[0, H] can be computed as finite superposition of (i) coordinate-wise multiplication of bid vectors b−i with constants; (ii) comparison indicators 1{· > ·} of coordinates or constants; (iii) pairwise addition · + · of coordinates or constants. The Rademacher complexity for both classes on a sample of size T is O p log(T) / T . The proof of this Lemma follows by standard arguments of Rademacher calculus, together with VC arguments on the class of pairwise comparisons. Those arguments can be found in [5, Lemma 9.9] and [9, Lemma 11.6.28]. Thereby, we omit its proof. The assumptions of Lemma 5 can be directly verified, for instance, for the sponsored search auctions where the constants that multiply each bid correspond to quality factors of the bidders, e.g. as in [2] and [14] and then the allocation and the payment is a function of the rank of the weighted bid of a player. In that case the price and the allocation rule are determined solely by the ranks and the values of the score-weighted bids γibi, as well as the position specific quality factors αj, for each position j in the auction. Next we turn to the analysis of the estimation errors on quantities Ti. We consider the following plugin estimator for Ti: We consider the empirical analog of function τi(·) by bτi(z) = inf b∈[0,B], b xi(b)≥z b pi(b) b xi(b). 7 Then the empirical analog of Ti is obtained by: bTi = 1 Z 0 bτi(z) dz. (17) To bound the estimation error of bTi, we need to impose an additional condition that ensures that any non-zero allocation requires the payment from the bidder at least proportional to that allocation. Assumption 6. We assume that pi(x−1 i (·)) is Lipschitz-continuous and that the mechanism is worstcase interim individually rational, i.e. pi(b) ≤H · xi(b). Under this assumption we can establish that ˜O( √ T) rates of convergence of bTi to Ti and of the empirical analog ˆT = maxx∈X Pn i=1 ˆTi · xi of the optimized threshold to T as well as the empirical analog d REV of the revenue to REV. Thus the quantity ˆµ = ˆT d REV, will also converge to µ = T REV at that rate. This implies the following final conclusion of this section. Theorem 7. Under Assumption 6 and the premises of Lemma 5, with probability 1 −δ: OPT(F) WELFARE(σ; F) ≤ bµ 1 −e−bµ + ˜O n max{L, H} r H log(n/δ) T ! (18) 6 Sponsored Search Auction: Model, Methodology and Data Analysis We consider a position auction setting where k ordered positions are assigned to n bidders. An outcome m in a position auction is an allocation of positions to bidders. m(j) denotes the bidder who is allocated position j; m−1(i) refers to the position assigned to bidder i. When bidder i is assigned to slot j, the probability of click ci,j is the product of the click-through-rate of the slot αj and the quality score of the bidder, γi, so ci,j = αjγi (in the data the quality scores for each bidder are varying across different auctions and we used the average score as a proxy for the score of a bidder). Each advertiser has a value-per-click (VPC) vi, which is not observed in the data and which we assume is drawn from some distribution Fi. Our benchmark for welfare will be the welfare of the auction that chooses a feasible allocation to maximize the welfare generated, thus OPT = Ev[maxm P i γiαm−1(i)vi]. We consider data generated by advertisers repeatedly participating in a sponsored search auction. The mechanism that is being repeated at each stage is an instance of a generalized second price auction triggered by a search query. The rules of each auction are as follows: Each advertiser i is associated with a click probability γi and a scoring coefficient si and is asked to submit a bid-per-click bi. Advertisers are ranked by their rank-score qi = si · bi and allocated positions in decreasing order of rank-score as long as they pass a rank-score reserve r. All the mentioned sets of parameters θ = (s, α, γ, r) and the bids b are observable in the data. We will denote with πb,θ(j) the bidder allocated in slot j under a bid profile b and parameter profile θ. We denote with π−1 b,θ(i) the slot allocated to bidder i. If advertiser i is allocated position j, then he pays only when he is clicked and his payment, i.e. his cost-per-click is the minimal bid he had to place to keep his position, which is: cpcij(b; θ) = max n sπb,θ(j+1)·bπb,θ(j+1),r o si . Mapping this setting to our general model, the allocation function of the auction is Xi(b) = απ−1 b,θ(i) · γ, the payment function is Pi(b) = απ−1 b,θ(i) · γ · cpciπ−1 b,θ(i)(b; θ) and the utility function is: Ui(b; vi) = απ−1 b,θ(i) · γi · vi −cpciπ−1 b,θ(i)(b; θ) . Data Analysis We applied our analysis to the BingAds sponsored search auction system. We analyzed eleven phrases from multiple thematic categories. For each phrase we retrieved data of auctions for the phrase for the period of a week. For each phrase and bidder that participated in the auctions for the phrase we computed the allocation curve by simulating the auctions for the week under any alternative bid an advertiser could submit (bids are multiples of cents). See Figure 4 for the price-per-unit allocation curves ˜xi(·) = τ −1 i (·) for a subset of the advertisers for a specific search phrase. We estimated the average threshold ˆTi for each bidder by numerically 8 ˆµ = ˆT d REV 1 DPOA = 1−e−ˆµ ˆµ phrase1 .511 .783 phrase2 .509 .784 phrase3 2.966 .320 phrase4 1.556 .507 phrase5 .386 .829 phrase6 .488 .791 phrase7 .459 .802 phrase8 .419 .817 phrase9 .441 .809 phrase10 .377 .833 phrase11 .502 .786 Figure 4: (left) Examples of price-per-unit allocation curves for a subset of six advertisers for a specific keyword during the period of a week. All axes are normalized to 1 for privacy reasons. (right) Distributional Price of Anarchy analysis for a set of eleven search phrases on the BingAds system. integrating these allocation curves along the y axis. We then applied the approach described in Section 3 for each of the search phrases, computing the quantity ˆT = maxx∈X P i∈[n] ˆTi · xi = maxm(·) P i ˆTi · γi · αm−1(i). The latter optimization is simply the optimal assignment problem where each player’s value-per-click is ˆTi and can be performed by greedily assigning players to slots in decreasing order of ˆTi. We then estimate the expected revenue by the empirical revenue d REV. We portray our results on the estimate ˆµ = ˆT d REV and the implied bound on the distributional price of anarchy for each of the eleven search phrases in Table 4. Phrases are grouped based on thematic category. Even though the worst-case price of anarchy of this auction is unbounded (since scores si are not equal to qualities γi, which is required in worst-case POA proofs [1]), we observe that empirically the price of anarchy is very good and on average the guarantee is approximately 80% of the optimal. Even if si = γi the worst-case bound on the POA implies guarantees of approx. 34% [1], while the DPOA we estimated implies significantly higher percentages, portraying the value of the empirical approach we propose. References [1] Ioannis Caragiannis, Christos Kaklamanis, Maria Kyropoulou, Brendan Lucier, Renato Paes Leme, and Éva Tardos. Bounding the inefficiency of outcomes in generalized second price auctions. pages 1–45, 2014. [2] Benjamin Edelman, Michael Ostrovsky, and Michael Schwarz. Internet advertising and the generalized second-price auction: Selling billions of dollars worth of keywords. The American economic review, 97(1):242–259, 2007. [3] Emmanuel Guerre, Isabelle Perrigne, and Quang Vuong. Optimal nonparametric estimation of first-price auctions. Econometrica, 68(3):525–574, 2000. [4] Jason Hartline, Darrell Hoy, and Sam Taggart. Price of Anarchy for Auction Revenue. In ACM Conference on Economics and Computation, pages 693–710, New York, New York, USA, 2014. ACM Press. [5] Michael R Kosorok. Introduction to empirical processes and semiparametric inference. Springer Science & Business Media, 2007. [6] Elias Koutsoupias and Christos Papadimitriou. Worst-case equilibria. In STACS 99, pages 404–413. Springer, 1999. [7] Vijay Krishna. Auction Theory. Academic Press, March 2002. [8] H. J. Paarsch and H. Hong. An Introduction to the Structural Econometrics of Auction Data. MIT Press, 2006. 9 [9] D. Pollard. Convergence of Stochastic Processes. Springer-Verlag, 1984. [10] Tim Roughgarden, Vasilis Syrgkanis, and Éva Tardos. The price of anarchy in auctions. CoRR, abs/1607.07684, 2016. [11] Tim Roughgarden and Eva Tardos. How bad is selfish routing? J. ACM, 49(2):236–259, March 2002. [12] S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. [13] Vasilis Syrgkanis and Eva Tardos. Composable and efficient mechanisms. In ACM Symposium on Theory of Computing, pages 211–220, 2013. [14] Hal R Varian. Online ad auctions. The American Economic Review, pages 430–434, 2009. [15] William Vickrey. Counterspeculation, auctions, and competitive sealed tenders. The Journal of Finance, 16(1):8–37, 1961. 10 | 2017 | 546 |
7,059 | Semi-supervised Learning with GANs: Manifold Invariance with Improved Inference Abhishek Kumar∗ IBM Research AI Yorktown Heights, NY abhishk@us.ibm.com Prasanna Sattigeri∗ IBM Research AI Yorktown Heights, NY psattig@us.ibm.com P. Thomas Fletcher University of Utah Salt Lake City, UT fletcher@sci.utah.edu Abstract Semi-supervised learning methods using Generative adversarial networks (GANs) have shown promising empirical success recently. Most of these methods use a shared discriminator/classifier which discriminates real examples from fake while also predicting the class label. Motivated by the ability of the GANs generator to capture the data manifold well, we propose to estimate the tangent space to the data manifold using GANs and employ it to inject invariances into the classifier. In the process, we propose enhancements over existing methods for learning the inverse mapping (i.e., the encoder) which greatly improves in terms of semantic similarity of the reconstructed sample with the input sample. We observe considerable empirical gains in semi-supervised learning over baselines, particularly in the cases when the number of labeled examples is low. We also provide insights into how fake examples influence the semi-supervised learning procedure. 1 Introduction Deep generative models (both implicit [11, 23] as well as prescribed [16]) have become widely popular for generative modeling of data. Generative adversarial networks (GANs) [11] in particular have shown remarkable success in generating very realistic images in several cases [30, 4]. The generator in a GAN can be seen as learning a nonlinear parametric mapping g : Z →X to the data manifold. In most applications of interest (e.g., modeling images), we have dim(Z) ≪dim(X). A distribution pz over the space Z (e.g., uniform), combined with this mapping, induces a distribution pg over the space X and a sample from this distribution can be obtained by ancestral sampling, i.e., z ∼pz, x = g(z). GANs use adversarial training where the discriminator approximates (lower bounds) a divergence measure (e.g., an f-divergence) between pg and the real data distribution px by solving an optimization problem, and the generator tries to minimize this [28, 11]. It can also be seen from another perspective where the discriminator tries to tell apart real examples x ∼px from fake examples xg ∼pg by minimizing an appropriate loss function[10, Ch. 14.2.4] [21], and the generator tries to generate samples that maximize that loss [39, 11]. One of the primary motivations for studying deep generative models is for semi-supervised learning. Indeed, several recent works have shown promising empirical results on semi-supervised learning with both implicit as well as prescribed generative models [17, 32, 34, 9, 20, 29, 35]. Most state-ofthe-art semi-supervised learning methods using GANs [34, 9, 29] use the discriminator of the GAN as the classifier which now outputs k + 1 probabilities (k probabilities for the k real classes and one probability for the fake class). When the generator of a trained GAN produces very realistic images, it can be argued to capture the data manifold well whose properties can be used for semi-supervised learning. In particular, the ∗Contributed equally. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. tangent spaces of the manifold can inform us about the desirable invariances one may wish to inject in a classifier [36, 33]. In this work we make following contributions: • We propose to use the tangents from the generator’s mapping to automatically infer the desired invariances and further improve on semi-supervised learning. This can be contrasted with methods that assume the knowledge of these invariances (e.g., rotation, translation, horizontal flipping, etc.) [36, 18, 25, 31]. • Estimating tangents for a real sample x requires us to learn an encoder h that maps from data to latent space (inference), i.e., h : X →Z. We propose enhancements over existing methods for learning the encoder [8, 9] which improve the semantic match between x and g(h(x)) and counter the problem of class-switching. • Further, we provide insights into the workings of GAN based semi-supervised learning methods [34] on how fake examples affect the learning. 2 Semi-supervised learning using GANs Most of the existing methods for semi-supervised learning using GANs modify the regular GAN discriminator to have k outputs corresponding to k real classes [38], and in some cases a (k + 1)’th output that corresponds to fake samples from the generator [34, 29, 9]. The generator is mainly used as a source of additional data (fake samples) which the discriminator tries to classify under the (k + 1)th label. We propose to use the generator to obtain the tangents to the image manifold and use these to inject invariances into the classifier [36]. 2.1 Estimating the tangent space of data manifold Earlier work has used contractive autoencoders (CAE) to estimate the local tangent space at each point [33]. CAEs optimize the regular autoencoder loss (reconstruction error) augmented with an additional ℓ2-norm penalty on the Jacobian of the encoder mapping. Rifai et al. [33] intuitively reason that the encoder of the CAE trained in this fashion is sensitive only to the tangent directions and use the dominant singular vectors of the Jacobian of the encoder as the tangents. This, however, involves extra computational overhead of doing an SVD for every training sample which we will avoid in our GAN based approach. GANs have also been established to generate better quality samples than prescribed models (e.g., reconstruction loss based approaches) like VAEs [16] and hence can be argued to learn a more accurate parameterization of the image manifold. The trained generator of the GAN serves as a parametric mapping from a low dimensional space Z to a manifold M embedded in the higher dimensional space X, g : Z →X, where Z is an open subset in Rd and X is an open subset in RD under the standard topologies on Rd and RD, respectively (d ≪D). This map is not surjective and the range of g is restricted to M.2 We assume g is a smooth, injective mapping, so that M is an embedded manifold. The Jacobian of a function f : Rd →RD at z ∈Rd, Jzf, is the matrix of partial derivatives (of shape D × d). The Jacobian of g at z ∈Z, Jzg, provides a mapping from the tangent space at z ∈Z into the tangent space at x = g(z) ∈X, i.e., Jzg : TzZ →TxX. It should be noted that TzZ is isomorphic to Rd and TxX is isomorphic to RD. However, this mapping is not surjective and the range of Jzg is restricted to the tangent space of the manifold M at x = g(z), denoted as TxM (for all z ∈Z). As GANs are capable of generating realistic samples (particularly for natural images), one can argue that M approximates the true data manifold well and hence the tangents to M obtained using Jzg are close to the tangents to the true data manifold. The problem of learning a smooth manifold from finite samples has been studied in the literature[5, 2, 27, 6, 40, 19, 14, 3], and it is an interesting problem in its own right to study the manifold approximation error of GANs, which minimize a chosen divergence measure between the data distribution and the fake distribution [28, 23] using finite samples, however this is outside the scope of the current work. For a given data sample x ∈X, we need to find its corresponding latent representation z before we can use Jzg to get the tangents to the manifold M at x. For our current discussion we assume the availability of a so-called encoder h : X →Z, such that h(g(z)) = z ∀z ∈Z. By definition, the 2We write g as a map from Z to X to avoid the unnecessary (in our context) burden of manifold terminologies and still being technically correct. This also enables us to get the Jacobian of g as a regular matrix in RD×d, instead of working with the differential if g was taken as a map from Z to M. 2 Jacobian of the generator at z, Jzg, can be used to get the tangent directions to the manifold at a point x = g(z) ∈M. The following lemma specifies the conditions for existence of the encoder h and shows that such an encoder can also be used to get tangent directions. Later we will come back to the issues involved in training such an encoder. Lemma 2.1. If the Jacobian of g at z ∈Z, Jzg, is full rank then g is locally invertible in the open neighborhood g(S) (S being an open neighborhood of z), and there exists a smooth h : g(S) →S such that h(g(y)) = y, ∀y ∈S. In this case, the Jacobian of h at x = g(z), Jxh, spans the tangent space of M at x. Proof. We refer the reader to standard textbooks on multivariate calculus and differentiable manifolds for the first statement of the lemma (e.g., [37]). The second statement can be easily deduced by looking at the Jacobian of the composition of functions h ◦g. We have Jz(h ◦g) = Jg(z)h Jzg = Jxh Jzg = Id×d, since h(g(z)) = z. This implies that the row span of Jxh coincides with the column span of Jzg. As the columns of Jzg span the tangent space Tg(z)M, so do the the rows of Jxh. 2.1.1 Training the inverse mapping (the encoder) To estimate the tangents for a given real data point x ∈X, we need its corresponding latent representation z = h(x) ∈Z, such that g(h(x)) = x in an ideal scenario. However, in practice g will only learn an approximation to the true data manifold, and the mapping g ◦h will act like a projection of x (which will almost always be off the manifold M) to the manifold M, yielding some approximation error. This projection may not be orthogonal, i.e., to the nearest point on M. Nevertheless, it is desirable that x and g(h(x)) are semantically close, and at the very least, the class label is preserved by the mapping g ◦h. We studied the following three approaches for training the inverse map h, with regard to this desideratum : • Decoupled training. This is similar to an approach outlined by Donahue et al. [8] where the generator is trained first and fixed thereafter, and the encoder is trained by optimizing a suitable reconstruction loss in the Z space, L(z, h(g(z))) (e.g., cross entropy, ℓ2). This approach does not yield good results and we observe that most of the time g(h(x)) is not semantically similar to the given real sample x with change in the class label. One of the reasons as noted by Donahue et al. [8] is that the encoder never sees real samples during training. To address this, we also experimented with the combined objective minh Lz(z, h(g(z))) + Lh(x, g(h(x))), however this too did not yield any significant improvements in our early explorations. • BiGAN. Donahue et al. [8] propose to jointly train the encoder and generator using adversarial training, where the pair (z, g(z)) is considered a fake example (z ∼pz) and the pair (h(x), x) is considered a real example by the discriminator. A similar approach is proposed by Dumoulin et al. [9], where h(x) gives the parameters of the posterior p(z|x) and a stochastic sample from the posterior paired with x is taken as a real example. We use BiGAN [8] in this work, with one modification: we use feature matching loss [34] (computed using features from an intermediate layer ℓof the discriminator f), i.e., ∥Exfℓ(h(x), x) −Ezfℓ(z, g(z))∥2 2, to optimize the generator and encoder, which we found to greatly help with the convergence 3. We observe better results in terms of semantic match between x and g(h(x)) than in the decoupled training approach, however, we still observe a considerable fraction of instances where the class of g(h(x)) is changed (let us refer to this as class-switching). • Augmented-BiGAN. To address the still-persistent problem of class-switching of the reconstructed samples g(h(x)), we propose to construct a third pair (h(x), g(h(x)) which is also considered by the discriminator as a fake example in addition to (z, g(z)). Our Augmented-BiGAN objective is given as Ex∼px log f(h(x), x) + 1 2Ez∼pz log(1 −f(z, g(z))) + 1 2Ex∼px log(1 −f(h(x), g(h(x))), (1) where f(·, ·) is the probability of the pair being a real example, as assigned by the discriminator f. We optimize the discriminator using the above objective (1). The generator and encoder are again optimized using feature matching [34] loss on an intermediate layer ℓof the discriminator, i.e., Lgh = ∥Exfℓ(h(x), x) −Ezfℓ(z, g(z))∥2 2, to help with the convergence. Minimizing Lgh 3Note that other recently proposed methods for training GANs based on Integral Probability Metrics [1, 13, 26, 24] could also improve the convergence and stability during training. 3 will make x and g(h(x)) similar (through the lens of fℓ) as in the case of BiGAN, however the discriminator tries to make the features at layer fℓmore difficult to achieve this by directly optimizing the third term in the objective (1). This results in improved semantic similarity between x and g(h(x)). We empirically evaluate these approaches with regard to similarity between x and g(h(x)) both quantitatively and qualitatively, observing that Augmented-BiGAN works significantly better than BiGAN. We note that ALI [9] also has the problems of semantic mismatch and class switching for reconstructed samples as reported by the authors, and a stochastic version of the proposed third term in the objective (1) can potentially help there as well, investigation of which is left for future work. 2.1.2 Estimating the dominant tangent space Once we have a trained encoder h such that g(h(x)) is a good approximation to x and h(g(z)) is a good approximation to z, we can use either Jh(x)g or Jxh to get an estimate of the tangent space. Specifically, the columns of Jh(x)g and the rows of Jxh are the directions that approximately span the tangent space to the data manifold at x. Almost all deep learning packages implement reverse mode differentiation (to do backpropagation) which is computationally cheaper than forward mode differentiation for computing the Jacobian when the output dimension of the function is low (and vice versa when the output dimension is high). Hence we use Jxh in all our experiments to get the tangents. As there are approximation errors at several places (M ∼data-manifold, g(h(x)) ∼x, h(g(z)) ∼z), it is preferable to only consider dominant tangent directions in the row span of Jxh. These can be obtained using the SVD on the matrix Jxh and taking the right singular vectors corresponding to top singular values, as done in [33] where h is trained using a contractive auto-encoder. However, this process is expensive as the SVD needs to be done independently for every data sample. We adopt an alternative approach to get dominant tangent direction: we take the pre-trained model with encoder-generator-discriminator (h-g-f) triple and insert two extra functions p : Rd →Rdp and ¯p : Rdp →Rd (with dp < d) which are learned by optimizing minp,¯p Ex[∥g(h(x))−g(¯p(p(h(x))))∥1 + ∥f X −1(g(h(x))) −f X −1(g(¯p(p(h(x)))))∥] while g, h and f are kept fixed from the pre-trained model. Note that our discriminator f has two pipelines f Z and f X for the latent z ∈Z and the data x ∈X, respectively, which share parameters in the last few layers (following [8]), and we use the last layer of f X in this loss. This enables us to learn a nonlinear (low-dimensional) approximation in the Z space such that g(¯p(p(h(x)))) is close to g(h(x)). We use the Jacobian of p ◦h, Jx p ◦h, as an estimate of the dp dominant tangent directions (dp = 10 in all our experiments)4. 2.2 Injecting invariances into the classifier using tangents We use the tangent propagation approach (TangentProp) [36] to make the classifier invariant to the estimated tangent directions from the previous section. Apart form the regular classification loss on labeled examples, it uses a regularizer of the form Pn i=1 P v∈Txi ∥(Jxic) v∥2 2, where Jxic ∈Rk×D is the Jacobian of the classifier function c at x = xi (with the number of classes k). and Tx is the set of tangent directions we want the classifier to be invariant to. This term penalizes the linearized variations of the classifier output along the tangent directions. Simard et al. [36] get the tangent directions using slight rotations and translations of the images, whereas we use the GAN to estimate the tangents to the data manifold. We can go one step further and make the classifier invariant to small perturbations in all directions emanating from a point x. This leads to the regularizer sup v:∥v∥p≤ϵ ∥(Jxc) v∥j j ≤ k X i=1 sup v:∥v∥p≤ϵ |(Jxc)i: v|j = ϵj k X i=1 ∥(Jxc)i:∥j q, (2) where ∥·∥q is the dual norm of ∥·∥p (i.e., 1 p + 1 q = 1), and ∥·∥j j denotes jth power of ℓj-norm. This reduces to squared Frobenius norm of the Jacobian matrix Jxc for p = j = 2. The penalty in 4Training the GAN with z ∈Z ⊂Rdp results in a bad approximation of the data manifold. Hence we first learn the GAN with Z ⊂Rd and then approximate the smooth manifold M parameterized by the generator using p and ¯p to get the dominant dp tangent directions to M. 4 Eq. (2) is closely related to the recent work on virtual adversarial training (VAT) [22] which uses a regularizer (ref. Eq (1), (2) in [22]) sup v:∥v∥2≤ϵ KL[c(x)||c(x + v)], (3) where c(x) are the classifier outputs (class probabilities). VAT[22] approximately estimates v∗that yields the sup using the gradient of KL[c(x)||c(x + v)], calling (x + v∗) as virtual adversarial example (due to its resemblance to adversarial training [12]), and uses KL[c(x)||c(x + v∗)] as the regularizer in the classifier objective. If we replace KL-divergence in Eq. 3 with total-variation distance and optimize its first-order approximation, it becomes equivalent to the regularizer in Eq. (2) for j = 1 and p = 2. In practice, it is computationally expensive to optimize these Jacobian based regularizers. Hence in all our experiments we use stochastic finite difference approximation for all Jacobian based regularizers. For TangentProp, we use ∥c(xi + v) −c(xi)∥2 2 with v randomly sampled (i.i.d.) from the set of tangents Txi every time example xi is visited by the SGD. For Jacobian-norm regularizer of Eq. (2), we use ∥c(x + δ) −c(x)∥2 2 with δ ∼N(0, σ2I) (i.i.d) every time an example x is visited by the SGD, which approximates an upper bound on Eq. (2) in expectation (up to scaling) for j = 2 and p = 2. 2.3 GAN discriminator as the classifier for semi-supervised learning: effect of fake examples Recent works have used GANs for semi-supervised learning where the discriminator also serves as a classifier [34, 9, 29]. For a semi-supervised learning problem with k classes, the discriminator has k + 1 outputs with the (k + 1)’th output corresponding to the fake examples originating from the generator of the GAN. The loss for the discriminator f is given as [34] Lf = Lf sup + Lf unsup, where Lf sup = −E(x,y)∼pd(x,y) log pf(y|x, y ≤k) and Lf unsup = −Ex∼pg(x) log(pf(y = k + 1|x)) −Ex∼pd(x) log(1 −pf(y = k + 1|x))). (4) The term pf(y = k + 1|x) is the probability of x being a fake example and (1 −pf(y = k + 1|x)) is the probability of x being a real example (as assigned by the model). The loss component Lf unsup is same as the regular GAN discriminator loss with the only modification that probabilities for real vs. fake are compiled from (k + 1) outputs. Salimans et al. [34] proposed training the generator using feature matching where the generator minimizes the mean discrepancy between the features for real and fake examples obtained from an intermediate layer ℓof the discriminator f, i.e., Lg = ∥Exfℓ(x) −Ezfℓ(g(z))∥2 2. Using feature matching loss for the generator was empirically shown to result in much better accuracy for semi-supervised learning compared to other training methods including minibatch discrimination and regular GAN generator loss [34]. Here we attempt to develop an intuitive understanding of how fake examples influence the learning of the classifier and why feature matching loss may work much better for semi-supervised learning compared to regular GAN. We will use the term classifier and discriminator interchangeably based on the context however they are really the same network as mentioned earlier. Following [34] we assume the (k + 1)’th logit is fixed to 0 as subtracting a term v(x) from all logits does not change the softmax probabilities. Rewriting the unlabeled loss of Eq. (4) in terms of logits li(x), i = 1, 2, . . . , k, we have Lf unsup = Exg∼pg log 1 + k X i=1 eli(xg) ! −Ex∼pd " log k X i=1 eli(x) −log 1 + k X i=1 eli(x) !# (5) Taking the derivative w.r.t. discriminator’s parameters θ followed by some basic algebra, we get ∇θLf unsup = E xg∼pg k X i=1 pf(y = i|xg)∇li(xg) − E x∼pd " k X i=1 pf(y = i|x, y ≤k)∇li(x) − k X i=1 pf(y = i|x)∇li(x) # = E xg∼pg k X i=1 pf(y = i|xg) | {z } ai(xg) ∇li(xg) − E x∼pd k X i=1 pf(y = i|x, y ≤k)pf(y = k + 1|x) | {z } bi(x) ∇li(x) (6) 5 Minimizing Lf unsup will move the parameters θ so as to decrease li(xg) and increase li(x) (i = 1, . . . , k). The rate of increase in li(x) is also modulated by pf(y = k + 1|x). This results in warping of the functions li(x) around each real example x with more warping around examples about which the current model f is more confident that they belong to class i: li(·) becomes locally concave around those real examples x if xg are loosely scattered around x. Let us consider the following three cases: Weak fake examples. When the fake examples coming from the generator are very weak (i.e., very easy for the current discriminator to distinguish from real examples), we will have pf(y = k + 1|xg) ≈1, pf(y = i|xg) ≈0 for 1 ≤i ≤k and pf(y = k + 1|x) ≈0. Hence there is no gradient flow from Eq. (6), rendering unlabeled data almost useless for semi-supervised learning. Strong fake examples. When the fake examples are very strong (i.e., difficult for the current discriminator to distinguish from real ones), we have pf(k + 1|xg) ≈0.5 + ϵ1, pf(y = imax|xg) ≈ 0.5 −ϵ2 for some imax ∈{1, . . . , k} and pf(y = k + 1|x) ≈0.5 −ϵ3 (with ϵ2 > ϵ1 ≥0 and ϵ3 ≥0). Note that bi(x) in this case would be smaller than ai(x) since it is a product of two probabilities. If two examples x and xg are close to each other with imax = arg maxi li(x) = arg maxi li(xg) (e.g., x is a cat image and xg is a highly realistic generated image of a cat), the optimization will push limax(x) up by some amount and will pull limax(xg) down by a larger amount. We further want to consider two cases here: (i) Classifier with enough capacity: If the classifier has enough capacity, this will make the curvature of limax(·) around x really high (with limax(·) locally concave around x) since x and xg are very close. This results in over-fitting around the unlabeled examples and for a test example xt closer to xg (which is quite likely to happen since xg itself was very realistic sample), the model will more likely misclassify xt. (ii) Controlled-capacity classifier: Suppose the capacity of the classifier is controlled with adequate regularization. In that case the curvature of the function limax(·) around x cannot increase beyond a point. However, this results in limax(x) being pulled down by the optimization process since ai(xg) > bi(x). This is more pronounced for examples x on which the classifier is not so confident (i.e., pf(y = imax|x, y ≤k) is low, although still assigning highest probability to class imax) since the gap between ai(xg) and bi(x) becomes higher. For these examples, the entropy of the distribution {p(y = i|x, y ≤k)}k i=1 may actually increase as the training proceeds which can hurt the test performance. Moderate fake examples. When the fake examples from the generator are neither too weak nor too strong for the current discriminator (i.e., xg is a somewhat distorted version of x), the unsupervised gradient will push limax(x) up while pulling limax(xg) down, giving rise to a moderate curvature of li(·) around real examples x since xg and x are sufficiently far apart (consider multiple distorted cat images scattered around a real cat image at moderate distances). This results in a smooth decision function around real unlabeled examples. Again, the curvatures of li(·) around x for classes i which the current classifier does not trust for the example x are not affected much. Further, pf(y = k + 1|x) will be less than the case when fake examples are very strong. Similarly pf(y = imax|xg) (where imax = arg max1≤i≤k li(xg)) will be less than the case of strong fake examples. Hence the norm of the gradient in Eq. (6) is lower and the contribution of unlabeled data in the overall gradient of Lf (Eq. (4) is lower than the case of strong fake examples. This intuitively seems beneficial as the classifier gets ample opportunity to learn on supervised loss and get confident on the right class for unlabeled examples, and then boost this confidence slowly using the gradient of Eq. (6) as the training proceeds. We experimented with regular GAN loss (i.e., Lg = Ex∼pg log(pf(y = k + 1|x))), and feature matching loss for the generator [34], plotting several of the quantities of interest discussed above for MNIST (with 100 labeled examples) and SVHN (with 1000 labeled examples) datasets in Fig.1. Generator trained with feature matching loss corresponds to the case of moderate fake examples discussed above (as it generates blurry and distorted samples as mentioned in [34]). Generator trained with regular GAN loss corresponds to the case of strong fake examples discussed above. We plot Exgaimax(xg) for imax = arg max1≤i≤k li(xg) and Exg[ 1 k−1 P 1≤i̸=imax≤k ai(xg)] separately to look into the behavior of imax logit. Similarly we plot Exbt(x) separately where t is the true label for unlabeled example x (we assume knowledge of the true label only for plotting these quantities and not while training the semi-supervised GAN). Other quantities in the plots are selfexplanatory. As expected, the unlabeled loss Lf unsup for regular GAN becomes quite high early on implying that fake examples are strong. The gap between aimax(xg) and bt(x) is also higher for regular GAN pointing towards the case of strong fake examples with controlled-capacity classifier as discussed above. Indeed, we see that the average of the entropies for the distributions pf(y|x) (i.e., 6 Figure 1: Plots of Entropy, Lf unsup (Eq. (4)), ai(xg), bi(x) and other probabilities (Eq. (6)) for regular GAN generator loss and feature-matching GAN generator loss. ExH(pf(y|x, y ≤k))) is much lower for feature-matching GAN compared to regular GAN (seven times lower for SVHN, ten times lower for MNIST). Test errors for MNIST for regular GAN and FM-GAN were 2.49% (500 epochs) and 0.86% (300 epochs), respectively. Test errors for SVHN were 13.36% (regular-GAN at 738 epochs) and 5.89% (FM-GAN at 883 epochs), respectively5. It should also be emphasized that the semi-supervised learning heavily depends on the generator dynamically adapting fake examples to the current discriminator – we observed that freezing the training of the generator at any point results in the discriminator being able to classify them easily (i.e., pf(y = k + 1|xg) ≈1) thus stopping the contribution of unlabeled examples in the learning. Our final loss for semi-supervised learning. We use feature matching GAN with semi-supervised loss of Eq. (4) as our classifier objective and incorporate invariances from Sec. 2.2 in it. Our final objective for the GAN discriminator is Lf = Lf sup + Lf unsup + λ1Ex∼pd(x) X v∈Tx ∥(Jxf) v∥2 2 + λ2Ex∼pd(x)∥Jxf∥2 F . (7) The third term in the objective makes the classifier decision function change slowly along tangent directions around a real example x. As mentioned in Sec. 2.2 we use stochastic finite difference approximation for both Jacobian terms due to computational reasons. 3 Experiments Implementation Details. The architecture of the endoder, generator and discriminator closely follow the network structures in ALI [9]. We remove the stochastic layer from the ALI encoder (i.e., h(x) is deterministic). For estimating the dominant tangents, we employ fully connected two-layer network with tanh non-linearly in the hidden layer to represent p ◦¯p. The output of p is taken from the hidden layer. Batch normalization was replaced by weight normalization in all the modules to make the output h(x) (similarly g(z)) dependent only on the given input x (similarly z) and not on the whole minibatch. This is necessary to make the Jacobians Jxh and Jzg independent of other examples in the minibatch. We replaced all ReLU nonlinearities in the encoder and the generator with the Exponential Linear Units (ELU) [7] to ensure smoothness of the functions g and h. We follow [34] completely for optimization (using ADAM optimizer [15] with the same learning rates as in [34]). Generators (and encoders, if applicable) in all the models are trained using feature matching loss. 5We also experimented with minibatch-discrimination (MD) GAN[34] but the minibatch features are not suited for classification as the prediction for an example x is adversely affected by features of all other examples (note that this is different from batch-normalization). Indeed we notice that the training error for MD-GAN is 10x that of regular GAN and FM-GAN. MD-GAN gave similar test error as regular-GAN. 7 Figure 2: Comparing BiGAN with Augmented BiGAN based on the classification error on the reconstructed test images. Left column: CIFAR10, Right column: SVHN. In the images, the top row corresponds to the original images followed by BiGAN reconstructions in the middle row and the Augmented BiGAN reconstructions in the bottom row. More images can be found in the appendix. Figure 3: Visualizing tangents. Top: CIFAR10, Bottom: SVHN. Odd rows: Tangents using our method for estimating the dominant tangent space. Even rows: Tangents using SVD on Jh(x)g and Jxh. First column: Original image. Second column: Reconstructed image using g ◦h. Third column: Reconstructed image using g ◦¯p ◦p ◦h. Columns 4-13: Tangents using encoder. Columns 14-23: Tangents using generator. Semantic Similarity. The image samples x and their reconstructions g(h(x)) for BiGAN and Augemented-BiGAN can be seen in Fig. 2. To quantitatively measure the semantic similarity of the reconstructions to the original images, we learn a supervised classifier using the full training set and obtain the classification accuracy on the reconstructions of the test images. The architectures of the classifier for CIFAR10 and SVHN are similar to their corresponding GAN discriminator architectures we have. The lower error rates with our Augmented-BiGAN suggest that it leads to reconstructions with reduced class-switching. Tangent approximations. Tangents for CIFAR10 and SVHN are shown in Fig. 3. We show visual comparison of tangents from Jx(p ◦h), from Jp(h(x))g ◦¯p, and from Jxh and Jh(x)g followed by the SVD to get the dominant tangents. It can be seen that the proposed method for getting dominant tangent directions gives similar tangents as SVD. The tangents from the generator (columns 14-23) look different (more colorful) from the tangents from the encoder (columns 4-13) though they do trace the boundaries of the objects in the image (just like the tangents from the encoder). We also empirically quantify our method for dominant tangent subspace estimation against the SVD estimation by computing the geodesic distances and principal angles between these two estimations. These results are shown in Table 2. Semi-supervised learning results. Table 1 shows the results for SVHN and CIFAR10 with various number of labeled examples. For all experiments with the tangent regularizer for both CIFAR10 and SVHN, we use 10 tangents. The hyperparameters λ1 and λ2 in Eq. (7) are set to 1. We obtain significant improvements over baselines, particularly for SVHN and more so for the case of 500 8 Model SVHN CIFAR-10 Nl = 500 Nl = 1000 Nl = 1000 Nl = 4000 VAE (M1+M2) [17] – 36.02 ± 0.10 – – SWWAE with dropout [41] – 23.56 – – VAT [22] – 24.63 – – Skip DGM [20] – 16.61 ± 0.24 – – Ladder network [32] – – – 20.40 ALI [9] – 7.41 ± 0.65 19.98 ± 0.89 17.99 ± 1.62 FM-GAN [34] 18.44 ± 4.8 8.11 ± 1.3 21.83 ± 2.01 18.63 ± 2.32 Temporal ensembling [18] 5.12 ± 0.13 4.42 ± 0.16 – 12.16 ± 0.24 FM-GAN + Jacob.-reg (Eq. (2)) 10.28 ± 1.8 4.74 ± 1.2 20.87 ± 1.7 16.84 ± 1.5 FM-GAN + Tangents 5.88 ± 1.5 5.26 ± 1.1 20.23 ± 1.3 16.96 ± 1.4 FM-GAN + Jacob.-reg + Tangents 4.87 ± 1.6 4.39 ± 1.2 19.52 ± 1.5 16.20 ± 1.6 Table 1: Test error with semi-supervised learning on SVHN and CIFAR-10 (Nl is the number of labeled examples). All results for the proposed methods (last 3 rows) are obtained with training the model for 600 epochs for SVHN and 900 epochs for CIFAR10, and are averaged over 5 runs. d(S1, S2) θ1 θ2 θ3 θ4 θ5 θ6 θ7 θ8 θ9 θ10 Rand-Rand 4.5 14 83 85 86 87 87 88 88 88 89 SVD-Approx. (CIFAR) 2.6 2 15 21 26 34 40 50 61 73 85 SVD-Approx. (SVHN) 2.3 1 7 12 16 22 30 41 51 67 82 Table 2: Dominant tangent subspace approximation quality: Columns show the geodesic distance and 10 principal angles between the two subspaces. Top row shows results for two randomly sampled 10-dimensional subspaces in 3072-dimensional space, middle and bottom rows show results for dominant subspace obtained using SVD of Jxh and dominant subspace obtained using our method, for CIFAR-10 and SVHN, respectively. All numbers are averages 10 randomly sampled test examples. labeled examples. We do not get as good results on CIFAR10 which may be due to the fact that our encoder for CIFAR10 is still not able to approximate the inverse of the generator well (which is evident from the sub-optimal reconstructions we get for CIFAR10) and hence the tangents we get are not good enough. We think that obtaining better estimates of tangents for CIFAR10 has the potential for further improving the results. ALI [9] accuracy for CIFAR (Nl = 1000) is also close to our results however ALI results were obtained by running the optimization for 6475 epochs with a slower learning rate as mentioned in [9]. Temporal ensembling [18] using explicit data augmentation assuming knowledge of the class-preserving transformations on the input, while our method estimates these transformations from the data manifold in the form of tangent vectors. It outperforms our method by a significant margin on CIFAR-10 which could be due the fact that it uses horizontal flipping based augmentation for CIFAR-10 which cannot be learned through the tangents as it is a non-smooth transformation. The use of temporal ensembling in conjunction with our method has the potential of further improving the semi-supervised learning results. 4 Discussion Our empirical results show that using the tangents of the data manifold (as estimated by the generator of the GAN) to inject invariances in the classifier improves the performance on semi-supevised learning tasks. In particular we observe impressive accuracy gains on SVHN (more so for the case of 500 labeled examples) for which the tangents obtained are good quality. We also observe improvements on CIFAR10 though not as impressive as SVHN. We think that improving on the quality of tangents for CIFAR10 has the potential for further improving the results there, which is a direction for future explorations. We also shed light on the effect of fake examples in the common framework used for semi-supervised learning with GANs where the discriminator predicts real class labels along with the fake label. Explicitly controlling the difficulty level of fake examples (i.e., pf(y = k + 1|xg) and hence indirectly pf(y = k + 1|x) in Eq. (6)) to do more effective semi-supervised learning is another direction for future work. One possible way to do this is to have a distortion model for the real examples (i.e., replace the generator with a distorter that takes as input the real examples) whose strength is controlled for more effective semi-supervised learning. 9 References [1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. arXiv preprint arXiv:1701.07875, 2017. [2] Alexander V Bernstein and Alexander P Kuleshov. Tangent bundle manifold learning via grassmann&stiefel eigenmaps. arXiv preprint arXiv:1212.6031, 2012. [3] AV Bernstein and AP Kuleshov. Data-based manifold reconstruction via tangent bundle manifold learning. In ICML-2014, Topological Methods for Machine Learning Workshop, Beijing, volume 25, pages 1–6, 2014. [4] David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017. [5] Guillermo Canas, Tomaso Poggio, and Lorenzo Rosasco. Learning manifolds with k-means and k-flats. In Advances in Neural Information Processing Systems, pages 2465–2473, 2012. [6] Guangliang Chen, Anna V Little, Mauro Maggioni, and Lorenzo Rosasco. Some recent advances in multiscale geometric analysis of point clouds. In Wavelets and Multiscale Analysis, pages 199–225. Springer, 2011. [7] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). arXiv preprint arXiv:1511.07289, 2015. [8] Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. arXiv preprint arXiv:1605.09782, 2016. [9] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606.00704, 2016. [10] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The elements of statistical learning, volume 1. Springer series in statistics Springer, Berlin, 2001. [11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. [12] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. [13] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017. [14] Kui Jia, Lin Sun, Shenghua Gao, Zhan Song, and Bertram E Shi. Laplacian auto-encoders: An explicit learning of nonlinear data manifold. Neurocomputing, 160:250–260, 2015. [15] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [16] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [17] Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semisupervised learning with deep generative models. In Advances in Neural Information Processing Systems, pages 3581–3589, 2014. [18] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016. [19] G Lerman and T Zhang. Probabilistic recovery of multiple subspaces in point clouds by geometric ℓp minimization. Preprint, 2010. [20] 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. 10 [21] Aditya Menon and Cheng Soon Ong. Linking losses for density ratio and class-probability estimation. In International Conference on Machine Learning, pages 304–313, 2016. [22] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, Ken Nakae, and Shin Ishii. Distributional smoothing with virtual adversarial training. arXiv preprint arXiv:1507.00677, 2015. [23] Shakir Mohamed and Balaji Lakshminarayanan. Learning in implicit generative models. arXiv preprint arXiv:1610.03483, 2016. [24] Youssef Mroueh and Tom Sercu. Fisher gan. In NIPS, 2017. [25] Youssef Mroueh, Stephen Voinea, and Tomaso A Poggio. Learning with group invariant features: A kernel perspective. In Advances in Neural Information Processing Systems, pages 1558–1566, 2015. [26] Youssef Mroueh, Tom Sercu, and Vaibhava Goel. Mcgan: Mean and covariance feature matching gan. In ICML, 2017. [27] Partha Niyogi, Stephen Smale, and Shmuel Weinberger. A topological view of unsupervised learning from noisy data. SIAM Journal on Computing, 40(3):646–663, 2011. [28] Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, pages 271–279, 2016. [29] Augustus Odena. Semi-supervised learning with generative adversarial networks. arXiv preprint arXiv:1606.01583, 2016. [30] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [31] Anant Raj, Abhishek Kumar, Youssef Mroueh, P Thomas Fletcher, and Bernhard Schölkopf. Local group invariant representations via orbit embeddings. In AISTATS, 2017. [32] Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semisupervised learning with ladder networks. In Advances in Neural Information Processing Systems, pages 3546–3554, 2015. [33] Salah Rifai, Yann Dauphin, Pascal Vincent, Yoshua Bengio, and Xavier Muller. The manifold tangent classifier. In NIPS, 2011. [34] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, 2016. [35] Cicero Nogueira dos Santos, Kahini Wadhawan, and Bowen Zhou. Learning loss functions for semi-supervised learning via discriminative adversarial networks. arXiv preprint arXiv:1707.02198, 2017. [36] Patrice Y Simard, Yann A LeCun, John S Denker, and Bernard Victorri. Transformation invariance in pattern recognition—tangent distance and tangent propagation. In Neural networks: tricks of the trade, pages 239–274. Springer, 1998. [37] M. Spivak. A Comprehensive Introduction to Differential Geometry, volume 1. Publish or Perish, 3rd edition, 1999. [38] Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv preprint arXiv:1511.06390, 2015. [39] Zhuowen Tu. Learning generative models via discriminative approaches. In Computer Vision and Pattern Recognition, 2007. CVPR’07. IEEE Conference on, pages 1–8. IEEE, 2007. [40] Rene Vidal, Yi Ma, and Shankar Sastry. Generalized principal component analysis (gpca). IEEE Transactions on Pattern Analysis and Machine Intelligence, 27(12):1945–1959, 2005. [41] Junbo Zhao, Michael Mathieu, Ross Goroshin, and Yann Lecun. Stacked what-where autoencoders. arXiv preprint arXiv:1506.02351, 2015. 11 | 2017 | 547 |
7,060 | Houdini: Fooling Deep Structured Visual and Speech Recognition Models with Adversarial Examples Moustapha Cisse Facebook AI Research moustaphacisse@fb.com Yossi Adi* Bar-Ilan University, Israel yossiadidrum@gmail.com Natalia Neverova* Facebook AI Research nneverova@fb.com Joseph Keshet Bar-Ilan University, Israel jkeshet@cs.biu.ac.il Abstract Generating adversarial examples is a critical step for evaluating and improving the robustness of learning machines. So far, most existing methods only work for classification and are not designed to alter the true performance measure of the problem at hand. We introduce a novel flexible approach named Houdini for generating adversarial examples specifically tailored for the final performance measure of the task considered, be it combinatorial and non-decomposable. We successfully apply Houdini to a range of applications such as speech recognition, pose estimation and semantic segmentation. In all cases, the attacks based on Houdini achieve higher success rate than those based on the traditional surrogates used to train the models while using a less perceptible adversarial perturbation. 1 Introduction Deep learning has redefined the landscape of machine intelligence [22] by enabling several breakthroughs in notoriously difficult problems such as image classification [20, 16], speech recognition [2], human pose estimation [35] and machine translation [4]. As the most successful models are permeating nearly all the segments of the technology industry from self-driving cars to automated dialog agents, it becomes critical to revisit the evaluation protocol of deep learning models and design new ways to assess their reliability beyond the traditional metrics. Evaluating the robustness of neural networks to adversarial examples is one step in that direction [32]. Adversarial examples are synthetic patterns carefully crafted by adding a peculiar noise to legitimate examples. They are indistinguishable from the legitimate examples by a human, yet they have demonstrated a strong ability to cause catastrophic failure of state of the art classification systems [12, 25, 21]. The existence of adversarial examples highlights a potential threat for machine learning systems at large [28] that can limit their adoption in security sensitive applications. It has triggered an active line of research concerned with understanding the phenomenon [10, 11], and making neural networks more robust [29, 7] . Adversarial examples are crucial for reliably evaluating and improving the robustness of the models [12]. Ideally, they must be generated to alter the task loss unique to the application considered directly. For instance, an adversarial example crafted to attack a speech recognition system should be designed to maximize the word error rate of the targetted system. The existing methods for generating adversarial examples exploit the gradient of a given differentiable loss function to guide the search in the neighborhood of legitimates examples [12, 25]. Unfortunately, the task loss of several structured prediction problems of interest is a combinatorial non-decomposable quantity that is not amenable *equal contribution adversarial attack original semantic segmentation framework compromised semantic segmentation framework Figure 1: We cause the network to generate a minion as segmentation for the adversarially perturbed version of the original image. Note that the original and the perturbed image are indistinguishable. to gradient-based methods for generating adversarial example. For example, the metric for evaluating human pose estimation is the (normalized) percentage of correct keypoints. Automatic speech recognition systems are assessed using their word (or phoneme) error rate. Similarly, the quality of a semantic segmentation is measured by the intersection over union (IOU) between the ground truth and the prediction. All these evalutation measures are non-differentiable. The solutions for this obstacle in supervised learning are of two kinds. The first route is to use a consistent differentiable surrogate loss function in place of the task loss [5]. That is a surrogate which is guaranteed to converge to the task loss asymptotically. The second option is to directly optimize the task loss by using approaches such as Direct Loss Minimization [14]. Both of these strategies have severe limitations. (1) The use of differentiable surrogates is satisfactory for classification because the relationship between such surrogates and the classification accuracy is well established [34]. The picture is different for the above-mentioned structured prediction tasks. Indeed, there is no known consistency guarantee for the surrogates traditionally used in these problems (e.g. the connectionist temporal classification loss for speech recognition) and designing a new surrogate is nontrivial and problem dependent. At best, one can only expect a high positive correlation between the proxy and the task loss. (2) The direct minimization approaches are more computationally involved because they require solving a computationally expensive loss augmented inference for each parameter update. Also, they are notoriously sensitive to the choice of the hyperparameters. Consequently, it is harder to generate adversarial examples for structured prediction problems as it requires significant domain expertise with little guarantee of success when surrogate does not tightly approximate the task loss. Results. In this work we introduce Houdini, the first approach for fooling any gradient-based learning machine by generating adversarial examples directly tailored for the task loss of interest be it combinatorial or non-differentiable. We show the tight relationship between Houdini and the task loss of the problem considered. We present the first successful attack on a deep Automatic Speech Recognition (ASR) system, namely a DeepSpeech-2 based architecture [1], by generating adversarial audio files not distinguishable from legitimate ones by a human (as validated by an ABX experiment). We also demonstrate the transferability of adversarial examples in speech recognition by fooling Google VoiceTM in a black box attack scenario: an adversarial example generated with our model and not distinguishable from the legitimate one by a human leads to an invalid transcription by the Google Voice application (see Figure 8). We also present the first successful untargeted and targetted attacks on a deep model for human pose estimation [26]. Similarly, we validate the feasibility of untargeted and targetted attacks on a semantic segmentation system [38] and show that we can make the system hallucinate an arbitrary segmentation of our choice for a given image. Figure 1 shows an experiment where we cause the network to hallucinate a minion. In all cases, our approach generates better quality adversarial examples than each of the different surrogates (expressly designed for the model considered) without additional computational overhead thanks to the analytical gradient of Houdini. 2 Related Work Adversarial examples. The empirical study of Szegedy et al. [32] first demonstrated that deep neural networks could achieve high accuracy on previously unseen examples while being vulnerable to small adversarial perturbations. This finding has recently aroused keen interest in the community [12, 28, 32, 33]. Several studies have subsequently analyzed the phenomenon [10, 31, 11] and various approaches have been proposed to improve the robustness of neural networks [29, 7]. More closely 2 related to our work are the different proposals aiming at generating better adversarial examples [12, 25]. Given an input (train or test) example (x, y), an adversarial example is a perturbed version of the original pattern ˜x = x + δx where δx is small enough for ˜x to be undistinguishable from x by a human, but causes the network to predict an incorrect target. Given the network gθ (where θ is the set of parameters) and a p-norm, the adversarial example is formally defined as: ˜x = argmax ˜x:∥˜x−x∥p≤ϵ ℓ gθ(˜x), y (1) where ϵ represents the strength of the adversary. Assuming the loss function ℓ(·) is differentiable, Shaham et al. [31] propose to take the first order taylor expansion of x 7→ℓ(gθ(x), y) to compute δx by solving the following simpler problem: ˜x = argmax ˜x:∥˜x−x∥p≤ϵ ∇xℓ(gθ(x), y) T (˜x −x) (2) When p = ∞, then ˜x = x + ϵsign(∇xℓ(gθ(x), y)) which corresponds to the fast gradient sign method [12]. If instead p = 2, we obtain ˜x = x + ϵ∇xℓ(gθ(x), y) where ∇xℓ(gθ(x), y) is often normalized. Optionally, one can perform more iterations of these steps using a smaller norm. This more involved strategy has several variants [25]. These methods are concerned with generating adversarial examples assuming a differentiable loss function ℓ(·). Therefore they are not directly applicable to the task losses of interest. However, they can be used in combination with our proposal which derives a consistent approximation of the task loss having an analytical gradient. Task Loss Minimization. Recently, several works have focused on directly minimizing the task loss. In particular, McAllester et al. [24] presented a theorem stating that a certain perceptron-like learning rule, involving feature vectors derived from loss-augmented inference, directly corresponds to the gradient of the task loss. While this algorithm performs well in practice, it is extremely sensitive to the choice of its hyper-parameter and needs two inference operations per training iteration. Do et al. [9] generalized the notion of the ramp loss from binary classification to structured prediction and proposed a tighter bound to the task loss than the structured hinge loss. The update rule of the structured ramp loss is similar to the update rule of the direct loss minimization algorithm, and similarly it needs two inference operations per training iteration. Keshet et al. [19] generalized the notion of the binary probit loss to the structured prediction case. The probit loss is a surrogate loss function naturally resulted in the PAC-Bayesian generalization theorems. it is defined as follows: ¯ℓprobit(gθ(x), y) = Eϵ∼N (0,I) [ℓ(y, gθ+ϵ(x))] (3) where ϵ ∈Rd is a d-dimensional isotropic Normal random vector. [18] stated finite sample generalization bounds for the structured probit loss and showed that it is strongly consistent. Strong consistency is a critical property of a surrogate since it guarantees the tight relationship to the task loss. For instance, an attacker of a given system can expect to deteriorate the task loss if she deteriorates the consistent surrogate of it. The gradient of the structured probit loss can be approximated by averaging over samples from the unit-variance isotropic normal distribution, where for each sample an inference with perturbed parameters is computed. Hundreds to thousands of inference operations are required per iteration to gain stability in the gradient computation. Hence the update rule is computationally prohibitive and limits the applicability of the structured probit loss despite its desirable properties. We propose a new loss named Houdini. It shares the desirable properties of the structured probit loss while not suffering from its limitations. Like the structured probit loss and unlike most surrogates used in structured prediction (e.g. structured hinge loss for SVMs), it is tightly related to the task loss. Therefore it allows to reliably generate adversarial examples for a given task loss of interest. Unlike the structured probit loss and like the smooth surrogates, it has an analytical gradient hence require only a single inference in its update rule. The next section presents the details of our proposal. 3 Houdini Let us consider a neural network gθ parameterized by θ and the task loss of a given problem ℓ(·). We assume ℓ(y, y) = 0 for any target y. The score output by the network for an example (x, y) is gθ(x, y) and the network’s decoder predicts the highest scoring target: ˆy = yθ(x) = argmax y∈Y gθ(x, y). (4) 3 Using the terminology of section 2, finding an adversarial example fooling the model gθ with respect to the task loss ℓ(·) for a chosen p-norm and noise parameter ϵ boils down to solving: ˜x = argmax ˜x:∥˜x−x∥p≤ϵ ℓ yθ(˜x), y (5) The task loss is often a combinatorial quantity which is hard to optimize, hence it is replaced with a differentiable surrogate loss, denoted ¯ℓ(yθ(˜x), y). Different algorithms use different surrogate loss functions: structural SVM uses the structured hinge loss, Conditional random fields use the log loss, etc. We propose a surrogate named Houdini and defined as follows for a given example (x, y): ¯ℓH(θ, x, y) = Pγ∼N (0,1) h gθ(x, y) −gθ(x, ˆy) < γ i · ℓ(ˆy, y) (6) In words, Houdini is a product of two terms. The first term is a stochastic margin, that is the probability that the difference between the score of the actual target gθ(x, y) and that of the predicted target gθ(x, ˆy) is smaller than γ ∼N(0, 1). It reflects the confidence of the model in its predictions. The second term is the task loss, which given two targets is independent of the model and corresponds to what we are ultimately interested in maximizing. Houdini is a lower bound of the task loss. Indeed denoting δg(y, ˆy) = gθ(x, y) −gθ(x, ˆy) as the difference between the scores assigned by the network to the ground truth and the prediction, we have Pγ∼N (0,1)(δg(y, ˆy) < γ) is smaller than 1. Hence when this probability goes to 1, or equivalently when the score assigned by the network to the target ˆy grows without a bound, Houdini converges to the task loss. This is a unique property not enjoyed by most surrogates used in the applications of interest in our work. It ensures that Houdini is a good proxy of the task loss for generating adversarial examples. We can now use Houdini in place of the task loss ℓ(·) in the problem 5. Following 2, we resort to a first order approximation which requires the gradient of Houdini with respect to the input x. The latter is obtained following the chain rule: ∇x ¯ℓH(θ, x, y) = ∂¯ℓH(θ, x, y) ∂gθ(x, y) ∂gθ(x, y) ∂x (7) To compute the RHS of the above quantity, we only need to compute the derivative of Houdini with respect to its input (the output of the network). The rest is obtained by backpropagation. The derivative of the loss with respect to the network’s output is: ∇g h Pγ∼N (0,1) h gθ(x, y) −gθ(x, ˆy) < γ i ℓ(y, ˆy) i = ∇g " 1 √ 2π Z ∞ δg(y,ˆy) e−v2/2dv ℓ(y, ˆy) # (8) Therefore, expanding the right hand side and denoting C = 1/ √ 2π we have: ∇g ¯ℓH(ˆy, y) = −C · e−|δg(y,ˆy)|2/2ℓ(y, ˆy), g = gθ(x, y) C · e−|δg(y,ˆy)|2/2ℓ(y, ˆy), g = gθ(x, ˆy) 0, otherwise (9) Equation 9 provides a simple analytical formula for computing the gradient of Houdini with respect to its input, hence an efficient way to obtain the gradient with respect to the input of the network x by backpropagation. The gradient can be used in combination with any gradient-based adversarial example generation procedure [12, 25] in two ways, depending on the form of attack considered. For an untargeted attack, we want to change the prediction of the network without preference on the final prediction. In that case, any alternative target y can be used (e.g. the second highest scorer as the target). For a targetted attack, we set the y to be the desired final prediction. Also note that, when the score of the predicted target is very close to that of the ground truth (or desired target), that is when δg(y, ˆy) is small as we expect from the trained network we want to fool, we have e−|δg(y,ˆy)|2/2 ≃1. In the next sections, we show the effectiveness of the proposed attack scheme on human pose estimation, semantic segmentation and automatic speech recognition systems. 4 Human Pose Estimation We evaluate the effectiveness of Houdini loss in the context of adversarial attacks on neural models for human pose estimation. Compromising performance of such systems can be desirable for 4 (a) (b) (c) Figure 2: Convergence dynamics for pose estimation attacks: (a) perturbation perceptibility vs nb. iterations, (b) PCKh0.5 vs nb. iterations, (c) proportion of re-positioned joints vs perceptibility. manipulating surveillance cameras, altering the analysis of crime scenes, disrupting human-robot interaction or fooling biometrical authentication systems based on gate recognition. The pose estimation task is formulated as follows: given a single RGB image of a person, determine correct 2D positions of several pre-defined keypoints which typically correspond to skeletal joints. In practice, the performance is measured by the percentage of correctly detected keypoints (PCKh) (i.e. whose predicted locations are within a certain distance from the corresponding target positions) [3]: PCKhα = PN i=1 1(∥yi −ˆyi∥< αh) N , (10) where ˆy and y are the predicted and the desired positions of a given joint respectively, h is the head size of the person (known at test time), α is a threshold (set to 0.5), and N is the number of annotated keypoints. Pose estimation is a good example of a problem where we observe a discrepancy between the training objective and the final evaluation measure. Instead of directly minimizing the percentage of correctly detected keypoints, state-of-the-art methods rely upon a dense prediction of heatmaps, i.e. estimation of probabilities of every pixel corresponding to each of keypoint locations. These models can be trained with binary cross entropy [6], softmax [15] or MSE losses [26] applied to every pixel in the output space, separately for each plane corresponding to every keypoint. In our first experiment, we attack a state-of-the-art model for single person pose estimation based on Hourglass networks [26] and aim to minimize the value of PCKh0.5 metric given the minimal perturbation. For this task we choose ˆy as: ˆy = argmax ˜y:∥˜p−p∥>αh gθ(x, ˜y) (11) where p is the pixel coordinate on the heatmap corresponding to the argmax value of vector y. We perform the optimization iteratively till convergence with an update rule ϵ · ∇x ∥∇x∥where ∇x are gradients with respect to the input and ϵ = 0.1. We perform the evaluations on the validation subset of MPII dataset [3] consisting of 3000 images and defined as in [26]. We evaluate the perceived degree of perturbation where perceptibility is expressed as ( 1 n P(x′ i −xi)2)1/2, where x and x′ are original and distorted images, and n is the number of pixels [32]. In addition, we report the structural similarity index (SSIM) [36] which is known to correlate well with the visual perception of image structure by a human. Figure 2 shows that Houdini only requires 100 iterations to maximally deteriorate the percentage of correct key-points from 89.4 down to 0.57 while MSE deteriorates the performance to only 24.12 after 100 iterations. This observation underlines the importance of the loss function used to generate adversarial examples in structured prediction problems. Also, for untargeted attacks optimized to convergence, the perturbation generated with Houdini is up to 50% less perceptible than the one obtained with MSE. In the second experiment, we perform a targetted attack in the form of pose transfer, i.e. we force the network to hallucinate an arbitrary pose (with success defined, as before, given the target metric PCKh0.5). The experimental setup is as follows: for a given pair of images (i, j) we force the network to output the ground truth pose of the picture i when the input is image j and vice versa. This task is more challenging and depends on the similarity between the original and target poses. Surprisingly, targetted attacks are still feasible even when the two ground truth poses are very different. Figure 3 shows an example where the model predicts the pose of a human body in horizontal position for an adversarially perturbed image depicting a standing person (and vice versa). A similar experiment with two persons in standing and sitting positions respectively is also shown in Figure 3. 5 perceptibility 0.145 perceptibility 0.016 perceptibility 0.211 perceptibility 0.210 Figure 3: Examples of successful targetted attacks on a pose estimation system. Despite the important difference between the images selected, it is possible to make the network predict the wrong pose by adding an imperceptible perturbation. The images are part of the MPI dataset. Method SSIM Perceptibility @mIoU/2 @mIoUlim @mIoU/2 @mIoUlim untargeted: NLL loss 0.9989 0.9950 0.0037 0.0117 untargeted: Houdini loss 0.9995 0.9959 0.0026 0.0095 targetted: NLL loss 0.9972 0.9935 0.0074 0.0389 targetted: Houdini loss 0.9975 0.9937 0.0054 0.0392 Table 1: Comparison of targetted and untargeted adversarial attacks on segmentation systems. mIoU/2 denotes 50% performance drop according to the target metric and mIoUlim corresponds to convergence or termination after 300 iterations. SSIM: the higher, the better, perceptibility: the lower, the better. Houdini based attacks are less perceptible. 5 Semantic segmentation Semantic segmentation uses another customized metric to evaluate performance, namely the mean Intersection over Union (mIoU) measure defined as averaging over classes the IoU = TP/(TP + FP + FN), where TP, FP and FN stand for true positive, false positive and false negative respectively, taken separately for each class. Compared to per-pixel accuracy, which appears to be overoptimistic on highly unbalanced datasets, and per-class accuracy, which under-penalizes false alarms for non-background classes, this metric favors accurate object localization with tighter masks (in instance segmentation) or bounding boxes (in detection). The models are trained with a per-pixel softmax or multi-class cross entropy losses depending on the task formulation, i.e. optimized for mean per-pixel or per-class accuracy instead of mIoU. Primary targets of adversarial attacks in this group of applications are self-driving cars and robots. Xie et al. [37] have previously explored adversarial attacks in the context of semantic segmentation. However, they exploited the same proxy used for training the network. We perform a series of experiments similar to the ones described in Sec. 4. That is, we show targetted and untargeted attacks on a semantic segmentation model. We use a pre-trained Dilation10 model for semantic segmentation [38] and evaluate the success of the attacks on the validation subset of Cityscapes dataset [8]. In the first experiment, we directly alter the target mIoU metric for a given test image in both targetted and untargeted attacks. As shown in Table 1, Houdini allows fooling the model at least as well as the training proxy (NLL) while using a less perceptible. Indeed, Houdini based adversarial perturbations generated to alter the performance of the model by 50% are about 30% less noticeable than the noise created with NLL. The second set of experiments consists of targetted attacks. That is, altering the input image to obtain an arbitrary target segmentation map as the network response. In Figure 4, we show an instance of such attack in a segmentation transfer setting, i.e. the target segmentation is the ground truth segmentation of a different image. It is clear that this type of attack is still feasible with a small 6 target source source image initial prediction perturbed image noise adversarial prediction source image initial prediction adversarial prediction perturbed noise adversarial prediction perturbed noise Figure 4: Targetted attack on a semantic segmentation system: switching target segmentation between two images from Cityscapes dataset [8]. The last two columns are respectively zoomed-in parts of the perturbed image and the adversarial perturbation added to the original one. adversarial perturbation (even when after zooming in the picture). Figure 1 depicts a more challenging scenario where the target segmentation is an arbitrary map (e.g. a minion). Again, we can make the network hallucinate the segmentation of our choice by adding a barely noticeable perturbation. 6 Speech Recognition We evaluate the effectiveness of Houdini concerning adversarial attacks on an Automatic Speech Recognition (ASR) system. Traditionally, ASR systems are composed of different components, (e.g. acoustic model, language model, pronunciation model, etc.) where each component is trained separately. Recently, ASR research has focused on deep learning based end-to-end models. These type of models get as input a speech segment and output a transcript with no additional post-processing. In this work, we use a deep neural network as our model with similar architecture to the one presented by [2]. The system is composed of two convolutional layers, followed by seven layers of Bidirectional LSTM [17] and one fully connected layer. We optimize the Connectionist Temporal Classification (CTC) loss function [13], which was specifically designed for ASR systems. The model gets as input raw spectrograms (extracted using a window size of 25ms, frame-size of 10ms and Hamming window), and outputs a transcript. A standard evaluating metric in speech recognition is the Word Error Rate (WER) or Character Error Rate (CER). These metrics were derived from the Levenshtein Distance [23], which is the number of substitutions, deletions, and insertions divided by the target length. The model achieves 12% Word Error Rate and 1.5% Character Error Rate on the Librispeech dataset [27], with no additional language modeling. In order to use Houdini for attacking an end-to-end ASR model, we need to get gθ(x, y) and gθ(x, ˆy), which are the scores for predicting y and ˆy respectively. Recall, in speech recognition, the target y is a sequence of characters. Hence, the score gθ(x, ˆy) is the sum of all possible paths to output ˆy. Fortunately, we can use the forward-backward algorithm [30], which is at the core of the CTC, to get the score of a given label y. ABX Experiment We generated 100 audio samples of adversarial examples and performed an ABX test with about 100 humans. An ABX test is a standard way to assess the detectable differences between two choices of sensory stimuli. We present each human with two audio samples A and B. Each of these two samples is either the legitimate or an adversarial version of the same sound. These two samples are followed by a third sound X randomly selected to be either A or B. Next, the human must decide whether X is the same as A or B. For every audio sample, we executed the ABX test with at least nine (9) different persons. Overall, Only 53.73% of the adversarial examples could be distinguished from the original ones by the humans (the optimal ratio is 50%). Therefore the generated examples are not statistically significantly distinguishable by a human ear. Subsequently, we use such indistinguishable adversarial examples to test the robustness of ASR systems. Houdini vs Probit Loss Houdini and the Probit loss [19] are tightly related. We also initially experimented with Probit but decided not to consider it further because: (1) Houdini is computationally more efficient. It requires only one forward-backward pass to generate adversarial examples while Probit needs several times more passes as it must average many networks to reduce the variance 7 ϵ = 0.3 ϵ = 0.2 ϵ = 0.1 ϵ = 0.05 WER CER WER CER WER CER WER CER CTC 68 9.3 51 6.9 29.8 4 20 2.5 Houdini 96.1 12 85.4 9.2 66.5 6.5 46.5 4.5 Figure 5: CER and WER in (%) for adversarial examples generated by both CTC and Houdini. Time (s) 0 3.23 0 5000 Frequency (Hz) (a) a great saint saint francis zaviour Time (s) 0 3.23 0 5000 Frequency (Hz) (b) i great sinkt shink t frimsuss avir Figure 6: The model’s output for each of the spectrograms is located at the bottom of each spectrogram. The target transcription is: A Great Saint Saint Francis Xavier. of the gradients. (2) The "adversarial" examples generated with Probit are not adversarial in the sense that they are easily distinguishable from the original examples by a human. This is due to the noise (added to the parameters when computing the gradients with Probit) which seems to add white noise to the sound files. We calculated the character error rates (CER) and the percentage of examples that could be distinguished from original ones by a human (best is 50) for Houdini and Probit on the speech task. We used a perturbation of magnitude ϵ = 0.05 and sampled 20 models for Probit (therefore 20x more computationally expensive than Houdini). In our results, while Probit and Houdini respectively achieve a CER of 5.97 and 4.50, adversarial examples generated with Probit are perfectly distinguishable by human (100%) in comparison to those generated with Houdini (53.73%). Untargeted Attacks In the first experiment, we compare network performance after attacking it with both Houdini and CTC. We generate two adversarial example, from each of the loss functions (CTC and Houdini), for every samples from the clean test set of Librispeech (2620 speech segments). We have experienced with a set of different distortion levels, using the ℓ∞norm and WER as ℓ. For all adversarial examples, we use ˆy = "Forty Two", which is the "Answer to the Ultimate Question of Life, the Universe, and Everything." Results are summarized in 5. Notice that Houdini causes a bigger decrease regarding both CER and WER than CTC for all the distortions values we have tested. In particular, for small adversarial perturbation (ϵ = 0.05) the word error rate (WER) caused by an attack with Houdini is 2.3x larger than the WER obtained with CTC. Similarly, the character error rate (CER) caused by an Houdini-based attack is 1.8x larger than a CTC-based one. Fig. 6 shows the original and adversarial spectrograms for a single speech segment. (a) shows a spectrogram of the original sound file and (b) shows the spectrogram of the adversarial one. They are visually undistinguishable. Targetted Attacks We push the model towards predicting a different transcription iteratively. In this case, the input to the model at iteration i is the adversarial example from iteration i −1. Corresponding transcription samples are shown in Table 7. We notice that while setting ˆy to be phonetically far from y, the model tends to predict wrong transcriptions but not necessarily similar to the selected target. However, when picking phonetically close ones, the model acts as expected and predict a transcription which is phonetically close to ˆy. Overall, targetted attacks seem to be much more challenging when dealing with speech recognition systems than when we consider artificial visual systems such as pose estimators or semantic segmentation systems. Black box Attacks Lastly, we experimented with a black box attack, that is attacking a system in which we do not have access to the models’ gradients but only to its predictions. In Figure 8 we show few examples in which we use Google Voice application to predict the transcript for both original 8 Manual Transcription Adversarial Target Adversarial Prediction a great saint saint Francis Xavier a green thank saint frenzier a green thanked saint fredstus savia no thanks I am glad to give you such easy happiness notty am right to leave you soggy happiness no to ex i am right like aluse o yve have misser Figure 7: Examples of iteratively generated adversarial examples for targetted attacks. In all case the model predicts the exact target transcription of the original example. Targetted attacks are more difficult when the speech segments are phonetically very different. Groundtruth Transcription: The fact that a man can recite a poem does not show he remembers any previous occasion on which he has recited it or read it. G-Voice transcription of the original example: The fact that a man can decide a poem does not show he remembers any previous occasion on which he has work cited or read it. G-Voice transcription of the adversarial example: The fact that I can rest I’m just not sure that you heard there is any previous occasion I am at he has your side it or read it. Groundtruth Transcription: Her bearing was graceful and animated she led her son by the hand and before her walked two maids with wax lights and silver candlesticks. G-Voice transcription of the original example: The bearing was graceful an animated she let her son by the hand and before he walks two maids with wax lights and silver candlesticks. G-Voice transcription of the adversarial example: Mary was grateful then admitted she let her son before the walks to Mays would like slice furnace filter count six. Figure 8: Transcriptions from Google Voice application for original and adversarial speech segments. and adversarial audio files. The original audio and their adversarial versions generated with our DeepSpeech-2 based model are not distinguishable by human according to our ABX test. We play each audio clip in front of an Android based mobile phone and report the transcription produced by the application. As can be seen, while Google Voice could get almost all the transcriptions correct for legitimate examples, it largely fails to produce good transcriptions for the adversarial examples. As with images [32], adversarial examples for speech recognition also transfer between models. 7 Conclusion We have introduced a novel approach to generate adversarial examples tailored for the performance measure unique to the task of interest. We have applied Houdini to challenging structured prediction problems such as pose estimation, semantic segmentation and speech recognition. In each case, Houdini allows fooling state of the art learning systems with imperceptible perturbation, hence extending the use of adversarial examples beyond the task of image classification. What the eyes see and the ears hear, the mind believes. (Harry Houdini) Acknowledgments The authors thank Alexandre Lebrun, Pauline Luc and Camille Couprie for valuable help with code and experiments. We also thank Antoine Bordes, Laurens van der Maaten, Nicolas Usunier, Christian Wolf, Herve Jegou, Yann Ollivier, Neil Zeghidour and Lior Wolf for their insightful comments on the early draft of this paper. 9 References [1] D. Amodei, R. Anubhai, E. Battenberg, C. Case, J. Casper, B. Catanzaro, J. Chen, M. Chrzanowski, A. Coates, G. Diamos, et al. Deep speech 2: End-to-end speech recognition in english and mandarin. arXiv preprint arXiv:1512.02595, 2015. [2] D. Amodei, R. Anubhai, E. Battenberg, C. Case, J. Casper, B. Catanzaro, J. Chen, M. Chrzanowski, A. Coates, G. Diamos, et al. Deep speech 2: End-to-end speech recognition in english and mandarin. In International Conference on Machine Learning, pages 173–182, 2016. [3] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. CVPR, 2014. [4] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. [5] P. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006. [6] A. Bulat and G. Tzimiropoulos. Human pose estimation via convolutional part heatmap regression. ECCV, 2016. [7] M. Cisse, P. Bojanowski, E. Grave, Y. Dauphin, and N. Usunier. Parseval networks: Improving robustness to adversarial examples. arXiv preprint arXiv:1704.08847, 2017. [8] M. Cords, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. The cityscapes dataset for semantic urban scene understanding. CVPR, 2016. [9] C. Do, Q. Le, C.-H. Teo, O. Chapelle, and A. Smola. Tighter bounds for structured estimation. In Advances in Neural Information Processing Systems (NIPS) 22, 2008. [10] A. Fawzi, O. Fawzi, and P. Frossard. Analysis of classifiers’ robustness to adversarial perturbations. arXiv preprint arXiv:1502.02590, 2015. [11] A. Fawzi, S.-M. Moosavi-Dezfooli, and P. Frossard. Robustness of classifiers: from adversarial to random noise. In Advances in Neural Information Processing Systems, pages 1624–1632, 2016. [12] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. In Proc. ICLR, 2015. [13] A. Graves, S. Fernández, F. Gomez, and J. Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In Proceedings of the 23rd international conference on Machine learning, pages 369–376. ACM, 2006. [14] T. Hazan, J. Keshet, and D. A. McAllester. Direct loss minimization for structured prediction. In Advances in Neural Information Processing Systems, pages 1594–1602, 2010. [15] K. He, G. Gkioxari, P. Dollar, and R. Girshick. Mask r-cnn. arXiv preprint arXiv:1703.06870, 2016. [16] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [17] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. [18] J. Keshet and D. A. McAllester. Generalization bounds and consistency for latent structural probit and ramp loss. In Advances in Neural Information Processing Systems, pages 2205–2212, 2011. [19] J. Keshet, D. McAllester, and T. Hazan. Pac-bayesian approach for minimization of phoneme error rate. In Acoustics, Speech and Signal Processing (ICASSP), 2011 IEEE International Conference on, pages 2224–2227. IEEE, 2011. 10 [20] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [21] A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016. [22] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [23] V. I. Levenshtein. Binary codes capable of correcting deletions, insertions, and reversals. In Soviet physics doklady, volume 10, pages 707–710, 1966. [24] D. McAllester, T. Hazan, and J. Keshet. Direct loss minimization for structured prediction. In Advances in Neural Information Processing Systems (NIPS) 24, 2010. [25] S.-M. Moosavi-Dezfooli, A. Fawzi, and P. Frossard. Deepfool: a simple and accurate method to fool deep neural networks. arXiv preprint arXiv:1511.04599, 2015. [26] A. Newell, K. Yang, and J. Deng. Stacked hourglass networks for human pose estimation. ECCV, 2016. [27] V. Panayotov, G. Chen, D. Povey, and S. Khudanpur. Librispeech: an asr corpus based on public domain audio books. In Acoustics, Speech and Signal Processing (ICASSP), 2015 IEEE International Conference on, pages 5206–5210. IEEE, 2015. [28] N. Papernot, P. McDaniel, I. Goodfellow, S. Jha, Z. Berkay Celik, and A. Swami. Practical black-box attacks against deep learning systems using adversarial examples. arXiv preprint arXiv:1602.02697, 2016. [29] N. Papernot, P. McDaniel, X. Wu, S. Jha, and A. Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In Security and Privacy (SP), 2016 IEEE Symposium on, pages 582–597. IEEE, 2016. [30] L. R. Rabiner. A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989. [31] U. Shaham, Y. Yamada, and S. Negahban. Understanding adversarial training: Increasing local stability of neural nets through robust optimization. arXiv preprint arXiv:1511.05432, 2015. [32] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. In Proc. ICLR, 2014. [33] P. Tabacof and E. Valle. Exploring the space of adversarial images. arXiv preprint arXiv:1510.05328, 2015. [34] A. Tewari and P. L. Bartlett. On the consistency of multiclass classification methods. Journal of Machine Learning Research, 8(May):1007–1025, 2007. [35] A. Toshev and C. Szegedy. Deeppose: Human pose estimation via deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1653–1660, 2014. [36] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600–612, 2004. [37] C. Xie, J. Wang, Z. Zhang, Y. Zhou, L. Xie, and A. L. Yuille. Adversarial examples for semantic segmentation and object detection. CoRR, abs/1703.08603, 2017. [38] F. Yu and V. Koltun. Multi-scale aggregation by dilated convolutions. ICLR, 2016. 11 | 2017 | 548 |
7,061 | Clustering Stable Instances of Euclidean k-means Abhratanu Dutta∗ Northwestern University adutta@u.northwestern.edu Aravindan Vijayaraghavan∗ Northwestern University aravindv@northwestern.edu Alex Wang† Carnegie Mellon University alexwang@u.northwestern.edu Abstract The Euclidean k-means problem is arguably the most widely-studied clustering problem in machine learning. While the k-means objective is NP-hard in the worst-case, practitioners have enjoyed remarkable success in applying heuristics like Lloyd’s algorithm for this problem. To address this disconnect, we study the following question: what properties of real-world instances will enable us to design efficient algorithms and prove guarantees for finding the optimal clustering? We consider a natural notion called additive perturbation stability that we believe captures many practical instances of Euclidean k-means clustering. Stable instances have unique optimal k-means solutions that does not change even when each point is perturbed a little (in Euclidean distance). This captures the property that kmeans optimal solution should be tolerant to measurement errors and uncertainty in the points. We design efficient algorithms that provably recover the optimal clustering for instances that are additive perturbation stable. When the instance has some additional separation, we can design a simple, efficient algorithm with provable guarantees that is also robust to outliers. We also complement these results by studying the amount of stability in real datasets, and demonstrating that our algorithm performs well on these benchmark datasets. 1 Introduction One of the major challenges in the theory of clustering is to bridge the large disconnect between our theoretical and practical understanding of the complexity of clustering. While theory tells us that most common clustering objectives like k-means or k-median clustering problems are intractable in the worst case, many heuristics like Lloyd’s algorithm or k-means++ seem to be effective in practice. In fact, this has led to the “CDNM” thesis [11, 9]: “Clustering is difficult only when it does not matter”. We try to address the following natural questions in this paper: Why are real-world instances of clustering easy? Can we identify properties of real-world instances that make them tractable? We focus on the Euclidean k-means clustering problem where we are given n points X = { x1, . . . , xn } ⊂Rd, and we need to find k centers µ1, µ2, . . . , µk ∈Rd minimizing the objective P x∈X mini∈[k] ∥x −µi∥2. The k-means clustering problem is the most well-studied objective for clustering points in Euclidean space [18, 3]. The problem is NP-hard in the worst-case [14] even for k = 2, and a constant factor hardness of approximation is known for larger k [5]. ∗Supported by the National Science Foundation (NSF) under Grant No. CCF-1637585. †Part of the work was done while the author was at Northwestern University. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. One way to model real-world instances of clustering problems is through instance stability, which is an implicit structural assumption about the instance. Practically interesting instances of k-means clustering problem often have a clear optimal clustering solution (usually the ground-truth clustering) that is stable: i.e., it remains optimal even under small perturbations of the instance. As argued in [7], clustering objectives like k-means are often just a proxy for recovering a ground-truth clustering that is close to the optimal solution. Instances in practice always have measurement errors, and optimizing the k-means objective is meaningful only when the optimal solution is stable to these perturbations. This notion of stability was formalized independently in a pair of influential works [11, 7]. The predominant strand of work on instance stability assumes that the optimal solution is resilient to multiplicative perturbations of the distances [11]. For any γ ≥1, a metric clustering instance (X, d) on point set X ⊂Rd and metric d : X × X →R+ is said to be γ-factor stable iff the (unique) optimal clustering C1, . . . , Ck of X remains the optimal solution for any instance (X, d′) where any (subset) of the the distances are increased by up to a γ factor i.e., d(x, y) ≤d′(x, y) ≤γd(x, y) for any x, y ∈X. In a series of recent works [4, 8] culminating in [2], it was shown that 2-factor perturbation stable (i.e., γ ≥2) instances of k-means can be solved in polynomial time. Multiplicative perturbation stability represents an elegant, well-motivated formalism that captures robustness to measurement errors for clustering problems in general metric spaces (γ = 1.1 captures relative errors of 10% in the distances). However, multiplicative perturbation stability has the following drawbacks in the case of Euclidean clustering problems: • Measurement errors in Euclidean instances are better captured using additive perturbations. Uncertainty of δ in the position of x, y leads to an additive error of δ in ∥x−y∥2, irrespective of how large or small ∥x −y∥2 is. • The amount of stability γ needed to enable efficient algorithms (i.e., γ ≥2) often imply strong structural conditions, that are unlikely to be satisfied by many real-world datasets. For instance, γ-factor perturbation stability implies that every point is a multiplicative factor of γ closer to its own center (say µi) than to any other cluster center µj. • Algorithms that are known to have provable guarantees under multiplicative perturbation stability are based on single-linkage or MST algorithms that are very non-robust by nature. In the presence of a few outliers or noise, any incorrect decision in the lower layers gets propagated up to the higher levels. In this work, we consider a natural additive notion of stability for Euclidean instances, when the optimal k-means clustering solution does not change even where each point is moved by a small Euclidean distance of up to δ. Moving each point by at most δ corresponds to a small additive perturbation to the pairwise distances between the points3. Unlike multiplicative notions of perturbation stability [11, 4], this notion of additive perturbation is not scale invariant. Hence the normalization or scale of the perturbation is important. Ackerman and Ben-David [1] initiated the study of additive perturbation stability when the distance between any pair of points can be changed by at most δ = ε diam(X) with diam(X) being the diameter of the whole dataset. The algorithms take time nO(k/ε2) = nO(k diam2(X)/δ2) and correspond to polynomial time algorithms when k, 1/ε are constants. However, this dependence of k diam2(X)/δ2 in the exponent is not desirable since the diameter is a very non-robust quantity — the presence of one outlier (that is even far away from the decision boundary) can increase the diameter arbitrarily. Hence, these guarantees are useful mainly when the whole instance lies within a small ball and for a small number of clusters [1, 10]. Our notion of additive perturbation stability will use a different scale parameter that is closely related to the distance between the centers, instead of the diameter diam(X). As we will see soon, our results for additive perturbation stability have no explicit dependence on the diameter, and allows instances to have potentially unbounded clusters (as in the case of far-way outliers). Further with some additional assumptions, we also obtain polynomial time algorithmic guarantees for large k. 3Note that not all additive perturbations to the distances can be captured by an appropriate movement of the points in the cluster. Hence the notion we consider in our paper is a weaker assumption on the instance. 2 Figure 1: a)Left: the figure shows an instance with k = 2 satisfying ε-APS with D being separation between the means. The half-angle of the cone is arctan(1/ε) and the distance between µ1 and the apex of the cone (∆) is at most D/2. b) Right: The figure shows a (ρ, ∆, ε)-separated instance, with scale parameter ∆. All the points lie inside the cones of half-angle arctan(1/ε), whose apexes are separated by a margin of at least ρ. 1.1 Additive Perturbation Stability and Our Contributions We consider a notion of additive stability where the points in the instance can be moved by at most δ = εD, where ε ∈(0, 1) is a parameter, and D = maxi̸=j Dij = maxi̸=j∥µi −µj∥2 is the maximum distance between pairs of means. Suppose X is a k-means clustering instance with optimal clustering C1, C2, . . . , Ck. We say that X is ε-APS (additive perturbation stable) iff every δ = εD-additive perturbation of X has C1, C2, . . . , Ck as an optimal clustering solution. (See Definition 2.3 for a formal definition). Note that there is no restriction on the diameter of the instance, or even the diameters of the individual clusters. Hence, our notion of additive perturbation stability allows the instance to be unbounded. Geometric property of ε-APS instances. Clusters in the optimal solution of an ε-APS instance satisfy a natural geometric condition, that implies an “angular separation” between every pair of clusters. Proposition 1.1 (Geometric Implication of ε-APS). Consider an ε-APS instance X, and let Ci, Cj be two clusters of the optimal solution. Any point x ∈Ci lies in a cone whose axis is along the direction (µi −µj) with half-angle arctan(1/ε). Hence if u is the unit vector along µi −µj then ∀x ∈Ci, |⟨x −µi+µj 2 , u⟩| ∥x −µi+µj 2 ∥2 > ε √ 1 + ε2 . (1) For any j ∈[k], all the points in cluster Ci lie inside the cone with its axis along (µi −µj) as in Figure 1. The distance between µi and the apex of the cone is ∆= ( 1 2 −ε)D. We will call ∆the scale parameter of the clustering. We believe that many clustering instances in practice satisfy ε-APS condition for reasonable constants ε. In fact, our experiments in Section 4 suggest that the above geometric condition is satisfied for reasonable values e.g., ε ∈(0.001, 0.2). While the points can be arbitrarily far away from their own means, the above angular separation (1) is crucial in proving the polynomial time guarantees for our algorithms. For instance, this implies that at least 1/2 of the points in a cluster Ci are within a Euclidean distance of at most O(∆/ε) from µi. This geometric condition (1) of the dataset enables the design of a tractable algorithm for k = 2 with provable guarantees. This algorithm is based on a modification of the perceptron algorithm in supervised learning, and is inspired by [13]. Informal Theorem 1.2. For any fixed ε > 0, there exists an dnpoly(1/ε) time algorithm that correctly clusters all ε-APS 2-means instances. For k-means clustering, similar techniques can be used to learn the separating halfspace for each pair of clusters. But this incurs an exponential dependence on k2, which renders this approach 3 inefficient for large k.4 We now consider a natural strengthening of this assumption that allows us to get poly(n, d, k) guarantees. Angular Separation with additional Margin Separation. We consider a natural strengthening of additive perturbation stability where there is an additional margin between any pair of clusters. This is reminiscent of margin assumptions in supervised learning of halfspaces and spectral clustering guarantees of Kumar and Kannan [15] (see Section 1.2). Consider a k-means clustering instance X having an optimal solution C1, C2, . . . , Ck. This instance is (ρ, ∆, ε)-separated iff for each i ̸= j ∈[k], the subinstance induced by Ci, Cj has parameter scale ∆, and all points in the clusters Ci, Cj lie inside cones of half-angle arctan(1/ε), which are separated by a margin of at least ρ. This is implied by the stronger condition that the subinstance induced by Ci, Cj is ε-additive perturbation stable with scale parameter ∆even when Ci and Cj are moved towards each other by ρ. Please see Figure 1 for an illustration. We formally define (ρ, ∆, ε)-separated stable instances geometrically in Section 2. Informal Theorem 1.3 (Polytime algorithm for (ρ, ∆, ε)-separated instances). There is an algorithm running in time5 eO(n2kd) that given any instance X that is (ρ, ∆, ε)-separated with ρ ≥Ω(∆/ε2) recovers the optimal clustering C1, . . . , Ck. A formal statement of the theorem (with unequal sized clusters), and its proof are given in Section 3. We prove these polynomial time guarantees for a new, simple algorithm ( Algorithm 3.1 ). The algorithm constructs a graph with one vertex for each point, and edges between points that within a distance of at most r (for an appropriate threshold r). The algorithm then finds the k-largest connected components. It then uses the k empirical means of these k components to cluster all the points. In addition to having provable guarantees, the algorithm also seems efficient in practice, and performs well on standard clustering datasets. Experiments that we conducted on some standard clustering datasets in UCI suggest that our algorithm manages to almost recover the ground truth, and achieves a k-means objective cost that is very comparable to Lloyd’s algorithm and k-means++ (see Section 4). In fact, our algorithm can also be used to initialize the Lloyd’s algorithm: our guarantees show that when the instance is (ρ, ∆, ε)-separated, one iteration of Lloyd’s algorithm already finds the optimal clustering. Experiments suggest that our algorithm finds initializers of smaller k-means cost compared to the initializers of k-means++ [3] and also recover the ground-truth to good accuracy (see Section 4 and Supplementary material for details). Robustness to Outliers. Perturbation stability requires the optimal solution to remain completely unchanged under any valid perturbation. In practice, the stability of an instance may be dramatically reduced by a few outliers. We show provable guarantees for a slight modification of the algorithm, in the setting when an η-fraction of the points can be arbitrary outliers, and do not lie in the stable regions. More formally, we assume that we are given an instance X ∪Z where there is an (unknown) set of points Z with |Z| ≤η|X| such that X is a (ρ, ∆, ε)-separated-stable instance. Here ηn is assumed to be smaller than size of the smallest cluster by a constant factor. This is similar to robust perturbation resilience considered in [8, 16]. Our experiments in Section 4 indicate that the stability or separation can increase a lot after ignoring a few points close to the margin. In what follows, wmax = max|Ci|/n and wmin = min|Ci|/n are the maximum and minimum weight of clusters, and η < wmin. Theorem 1.4. Given X ∪Z where X satisfies (ρ, ∆, ε)-separated with η < wmin and ρ = Ω ∆ ε2 wmax + η wmin −η and η < wmin, there is a polynomial time algorithm running in time eO(n2dk) that returns a clustering consistent with C1, . . . , Ck on X. This robust algorithm is effectively the same as Algorithm 3.1 with one additional step that removes all low-degree vertices in the graph. This step removes bad outliers in Z without removing too many points from X. 4We remark that the results of [1] also incur an exponential dependence on k. 5The eO hides an inverse Ackerman fuction of n. 4 1.2 Comparisons to Other Related Work Awasthi et al. [4] showed that γ-multiplicative perturbation stable instance also satisfied the notion of γ-center based stability (every point is a γ-factor closer to its center than to any other center) [4]. They showed that an algorithm based on the classic single linkage algorithm works under this weaker notion when γ ≥3. This was subsequently improved by [8], and the best result along these lines [2] gives a polynomial time algorithm that works for γ ≥2. A robust version of (γ, η)-perturbation resilience was explored for center-based clustering objectives [8]. As such, the notions of additive perturbation stability, and (ρ, ∆, ε)-separated instances are incomparable to the various notions of multiplicative perturbation stability. Further as argued in [9], we believe that additive perturbation stability is more realistic for Euclidean clustering problems. Ackerman and Ben-David [1] initiated the study of various deterministic assumptions for clustering instances. The measure of stability most related to this work is Center Perturbation (CP) clusterability (an instance is δ-CP-clusterable if perturbing the centers by a distance of δ does not increase the cost much). A subtle difference is their focus on obtaining solutions with small objective cost [1], while our goal is to recover the optimal clustering. However, the main qualitative difference is how the length scale is defined – this is crucial for additive perturbations. The run time of the algorithm in [1] is npoly(k,diam(X)/δ) , where the length scale of the perturbations is diam(X), the diameter of the whole instance. Our notion of additive perturbations uses a much smaller length-scale of ∆ (essentially the inter-mean distance; see Prop. 1.1 for a geometric intepretation), and Theorem 1.2 gives a run-time guarantee of npoly(∆/δ) for k = 2 (Theorem 1.2 is stated in terms of ε = δ/∆). By using the largest inter-mean distance instead of the diameter as the length scale, our algorithmic guarantees can also handle unbounded clusters with arbitrarily large diameters and outliers. The exciting results of Kumar and Kannan [15] and Awasthi and Sheffet [6] also gave deterministic margin-separation condition, under which spectral clustering (PCA followed by k-means) finds the optimum clusters under deterministic conditions about the data. Suppose σ = ∥X −C∥2 op/n is the “spectral radius” of the dataset, where C is the matrix given by the centers. In the case of equal-sized clusters, the improved results of [6] proves approximate recovery of the optimal clustering if the margin ρ between the clusters along the line joining the centers satisfies ρ = Ω( √ kσ). Our notion of margin ρ in (ρ, ∆, ε)-separated instances is analogous to the margin separation notion used by the above results on spectral clustering [15, 6]. In particular, we require a margin of ρ = Ω(∆/ε2) where ∆is our scale parameter, with no extra √ k factor. However, we emphasize that the two margin conditions are incomparable, since the spectral radius σ is incomparable to the scale parameter ∆. We now illustrate the difference between these deterministic conditions by presenting a couple of examples. Consider an instance with n points drawn from a mixture of k Gaussians in d dimensions with identical diagonal covariance matrices with variance 1 in the first O(1) coordinates and roughly 1 d in the others, and all the means lying in the subspace spanned by these first O(1) co-ordinates. In this setting, the results of [15, 6] require a margin separation of at least √k log n between clusters. On the other hand, these instances satisfy our geometric conditions with ε = Ω(1), ∆∼√log n and therefore our algorithm only needs a margin separation of ρ√log n ( hence, saving a factor of √ k). 6 However, if the n points were drawn from a mixture of spherical Gaussians in high dimensions (with d ≫k), then the margin condition required for [15, 6] is weaker. 2 Stability definitions and geometric properties X ⊆Rd will denote a k-means clustering instance and C1, . . . , Ck will often refer to its optimal clustering. It is well-known that given a cluster C the value of µ minimizing P x∈C ∥x −µ∥2 is given by µ = 1 |C| P x∈C x, the mean of the points in the set. We give more preliminaries about the k-means problem in the Supplementary Material. 2.1 Balance Parameter We define an instance parameter, β, capturing how balanced a given instance’s clusters are. 6Further, while algorithms for learning GMM models may work here, adding some outliers far from the decision boundary will cause many of these algorithms to fail, while our algorithm is robust to such outliers. 5 Figure 2: An example of the family of perturbations considered by Lemma 2.4. Here v is in the upwards direction. If a is to the right of the diagonal solid line, then a′ will be to the right of the slanted dashed line and will lie on the wrong side of the separating hyperplane. Definition 2.1 (Balance parameter). Given an instance X with optimal clustering C1, . . . , Ck, we say X satisfies balance parameter β ≥1 if for all i ̸= j, β|Ci| > |Cj|. We will write β in place of β(X) when the instance is clear from context. 2.2 Additive perturbation stability Definition 2.2 (ε-additive perturbation). Let X = { x1, . . . , xn } be a k-means clustering instance with optimal clustering C1, C2, . . . , Ck whose means are given by µ1, µ2, . . . , µk. Let D = maxi,j ∥µi −µj∥. We say that the instance X′ = { x′ 1, . . . , x′ n } is an ε-additive perturbation of X if for all i, ∥x′ i −xi∥≤εD. Definition 2.3 (ε-additive perturbation stability). Let X be a k-means clustering instance with optimal clustering C1, C2, . . . , Ck. We say that X is ε-additive perturbation stable (APS) if every ε-additive perturbation of X has unique optimal clustering given by C1, C2, . . . , Ck. Intuitively, the difficulty of the clustering task increases as the stability parameter ε decreases. For example, when ε = 0 the set of ε-APS instances contains any instance with a unique solution. In the following we will only consider ε > 0. 2.3 Geometric implication of ε-APS Let X be an ε-APS k-means clustering instance such that each cluster has at least 4 points. Fix i ̸= j and consider a pair of clusters Ci, Cj with means µi, µj and define the following notations. • Let Di,j = ∥µi −µj∥be the distance between µi and µj and let D = maxi′,j′ ∥µi′ −µj′∥ be the maximum distance between any pair of means. • Let u = µi−µj ∥µi−µj∥be the unit vector in the intermean direction. Let V = u⊥be the space orthogonal to u. For x ∈Rd, let x(u) and x(V ) be the projections x onto u and V . • Let p = µi+µj 2 be the midpoint between µi and µj. A simple perturbation that we can use will move all points in Ci and Cj along the direction µi −µj by a δ amount, while another perturbation moves these points along µj −µi; these will allow us to conclude that ∃margin of size 2δ. To establish Proposition 1.1, we will choose a clever ε-perturbation that allows us to show that clusters must live in cone regions (see figure 1 left). This perturbation chooses two clusters and moves their means in opposite directions orthogonal to u while moving a single point towards the other cluster (see figure 2). The following lemma establishes Proposition 1.1. Lemma 2.4. For any x ∈Ci ∪Cj, ∥(x −p)(V )∥< 1 ε ∥(x −p)(u)∥−εDi,j . Proof. Let v ∈V be a unit vector perpendicular to u. Without loss of generality, let a, b, c, d ∈Ci be distinct. Note that Di,j ≤D and consider the ε-additive perturbation given by X′ = { a −δu, b + δu, c −δv, d −δv } ∪{ x −δ 2v | x ∈Ci \ { a, b, c, d } } ∪{ x + δ 2v | x ∈Cj } 6 and X \ {Ci ∪Cj}where δ = εDi,j (see figure 2). By assumption, { Ci, Cj } remains the optimal clustering of Ci ∪Cj. We have constructed X′ such that the new means are at µ′ i = µi −εDi,j 2 v and µ′ j = µj + εDi,j 2 v, and the midpoint between the means is p′ = p. The halfspace containing µ′ i given by the linear separator between µ′ i and µ′ j is ⟨x −p′, µ′ i −µ′ j⟩> 0. Hence, as a′ is classified correctly by the ε-APS assumption, ⟨a′ −p′, µ′ i −µ′ j⟩= ⟨a −p −εDi,ju, Di,ju −εDi,jv⟩ = Di,j(⟨a −p, u⟩−ε⟨a −p, v⟩−εDi,j) > 0 Then noting that ⟨u, a −p⟩is positive, we have that ⟨a −p, v⟩< 1 ε ∥(a −p)(u)∥−εDi,j . Note that this property follows from perturbations which only affect two clusters at a time. Our results follow from this weaker notion. 2.4 (ρ, ∆, ε)-separation Motivated by Lemma 2.4, we define a geometric condition where the angular separation and margin separation are parametrized separately. This notion of separation is implied by a stronger stability assumption where any pair of clusters is ε-APS with scale parameter ∆even after being moved towards each other a distance of ρ. We say that a pair of clusters is (ρ, ∆, ε)-separated if their points lie in cones with axes along the intermean direction, half-angle arctan(1/ε), and apexes at distance ∆from their means and at least ρ from each other (see figure 1 right). Formally, we require the following. Definition 2.5 (Pairwise (ρ, ∆, ε)-separation). Given a pair of clusters Ci, Cj with means µi, µj, let u = µi−µj ∥µi−µj∥be the unit vector in the intermean direction and let p = (µi + µj)/2. We say that Ci and Cj are (ρ, ∆, ε)-separated if Di,j ≥ρ + 2∆and for all x ∈Ci ∪Cj, ∥(x −p)(V )∥≤1 ε ∥(x −p)(u)∥−(Di,j/2 −∆) . Definition 2.6 ((ρ, ∆, ε)-separation). We say that an instance X is (ρ, ∆, ε)-separated if every pair of clusters in the optimal clustering is (ρ, ∆, ε)-separated. 3 k-means clustering for general k We assume that our instance has balance parameter β. Our algorithm takes in as input the set of points X and k, and outputs a clustering of all the points. Algorithm 3.1. Input: X = { x1, . . . , xn }, k. 1: for all pairs a, b of distinct points in { xi } do 2: Let r = ∥a −b∥be our guess for ρ 3: procedure INITIALIZE 4: Create graph G on vertex set { x1, . . . , xn } where xi and xj have an edge iff ∥xi−xj∥< r 5: Let a1, . . . , ak ∈Rd where ai is the mean of the ith largest connected component of G 6: procedure ASSIGN 7: Let C1, . . . , Ck be the clusters obtained by assigning each point in X to the closest ai 8: Calculate the k-means objective of C1, . . . , Ck 9: Return clustering with smallest k-means objective found above Theorem 3.2. Algorithm 3.1 recovers C1, . . . , Ck for any (ρ, ∆, ε)-separated instance with ρ = Ω ∆ ε2 + β∆ ε and the running time is eO(n2kd). We maintain the connected components and their centers via a union-find data structure and keep it updated as we increase ρ and add edges to the dynamic graph. Since we go over n2 possible choices of ρ and each pass takes O(kd) time, the algorithm runs in eO(n2kd). 7 The rest of the section is devoted to proving Theorem 3.2. Define the following regions of Rd for every pair i, j. Given i, j, let Ci, Cj be the corresponding clusters with means µi, µj. Let u = µi−µj ∥µi−µj∥be the unit vector in the inter-mean direction and p = µi+µj 2 be the point between the two means. We first define formally S(cone) i,j which was described in the introduction (the feasible region) and two other regions of the clusters that will be useful in the analysis (see Figure 1b). We observe that Ci belongs to the intersection of all the cones S(cone) i,j over j ̸= i. Definition 3.3. • S(cone) i,j = { x ∈Rd | ∥(x −(µi −∆u))(V )∥≤1 ε⟨x −(µi −∆u), u⟩}, • S(nice) i,j = { x ∈S(cone) i,j | ⟨x −µi, u⟩≤0 }, • S(good) i = T j̸=i S(nice) i,j . The nice area of i with respect to j i.e. S(nice) i,j , is defined as all points in the cap of S(cone) i,j “above” µi. The good area of a cluster S(good) i is the intersection of its nice areas with respect to all other clusters. It suffices to prove the following two main lemmas. Lemma 3.4 states that the ASSIGN subroutine correctly clusters all points given an initialization satisfying certain properties. Lemma 3.5 states that the initialization returned by the INITIALIZE subroutine satisfies these properties when we guess r = ρ correctly. As ρ is only used as a threshold on edge lengths, testing the distances between all pairs of data points i.e. { ∥a −b∥: a, b ∈X } suffices. Lemma 3.4. For a (ρ, ∆, ε)-separated instance with ρ = Ω(∆/ε2), the ASSIGN subroutine recovers C1, C2, · · · Ck correctly when initialized with k points { a1, a2, . . . , ak } where ai ∈S(good) i . Lemma 3.5. For an (ρ, ∆, ε)-separated instance with balance parameter β and ρ = Ω(β∆/ε), the INITIALIZE subroutine outputs one point each from { S(good) i : i ∈[k] } when r = ρ. To prove Lemma 3.5 we define a region of each cluster S(core) i , the core, such that most (at least β/(1 + β) fraction) of the points in Ci will belong to the connected component containing S(core) i . Hence, any large connected component (in particular, the k largest ones) must contain the core of one of the clusters. Meanwhile, the margin ensures points across clusters are not connected. Further, since S(core) i accounts for most points in Ci, the angular separation ensures that the empirical mean of the connected component is in S(good) i . 4 Experimental results We evaluate Algorithm 3.1 on multiple real world datasets and compare its performance to the performance of k-means++, and also check how well these datasets satisfy our geometric conditions. See supplementary results for details about ground truth recovery. Datasets. Experiments were run on unnormalized and normalized versions of four labeled datasets from the UCI Machine Learning Repository: Wine (n = 178, k = 3, d = 13), Iris (n = 150, k = 3, d = 4), Banknote Authentication (n = 1372, k = 2, d = 5), and Letter Recognition (n = 20, 000, k = 26, d = 16). Normalization was used to scale each feature to unit range. Performance We ran Algorithm 3.1 on the datasets. The cost of the returned solution for each of the normalized and unnormalized versions of the datasets is recorded in Table 1 column 2. Our guarantees show that under (ρ, ∆, ε)-separation for appropriate values of ρ (see section 3), the algorithm will find the optimal clustering after a single iteration of Lloyd’s algorithm. Even when ρ does not satisfy our requirement, we can use our algorithm as an initialization heuristic for Lloyd’s algorithm. We compare our initialization with the k-means++ initialization heuristic (D2 weighting). In Table 1, this is compared to the smallest initialization cost of 1000 trials of k-means++ on each of the datasets, the solution found by Lloyd’s algorithm using our initialization and the smallest k-means cost of 100 trials of Lloyd’s algorithm using a k-mean++ initialization. Separation in real data sets. As the ground truth clusterings in our datasets are not in general linearly separable, we consider the clusters given by Lloyd’s algorithm initialized with the ground 8 Table 1: Comparison of k-means cost for Alg 3.1 and k-means++ Dataset Alg 3.1 k-means++ Alg 3.1 with Lloyd’s k-means++ with Lloyd’s Wine 2.376e+06 2.426e+06 2.371e+06 2.371e+06 Wine (normalized) 48.99 65.50 48.99 48.95 Iris 81.04 86.45 78.95 78.94 Iris (normalized) 7.035 7.676 6.998 6.998 Banknote Auth. 44808.9 49959.9 44049.4 44049.4 Banknote (norm.) 138.4 155.7 138.1 138.1 Letter Recognition 744707 921643 629407 611268 Letter Rec. (norm.) 3367.8 4092.1 2767.5 2742.3 Table 2: Values of (ρ, ε, ∆) satisfied by (1 −η)-fraction of points Dataset η ε minimum ρ/∆ average ρ/∆ maximum ρ/∆ Wine 0.1 0.1 0.566 1.5 3.05 0.01 0.609 1.53 3.07 Iris 0.1 0.1 0.398 4.35 7.7 0.01 0.496 5.04 9.06 Banknote Auth. 0.1 0.1 0.264 0.264 0.264 0.01 0.398 0.398 0.398 Letter Recognition 0.1 0.1 0.018 2.19 7.11 0.01 0.378 3.07 11.4 truth solutions. Values of ε for Lemma 2.4. We calculate the maximum value of ε such that a given pair of clusters satisfies the geometric condition in Proposition 1.1. The results are collected in the Supplementary material in Table 3. We see that the average value of ε lies approximately in the range (0.01, 0.1). Values of (ρ, ∆, ε)-separation. We attempt to measure the values of ρ, ∆, and ε in the datasets. For η = 0.05, 0.1, ε = 0.1, 0.01, and a pair of clusters Ci, Cj, we calculate ρ as the maximum margin separation a pair of axis-aligned cones with half-angle arctan(1/ε) can have while capturing a (1 −η)-fraction of all points. For some datasets and values for η and ε, there may not be any such value of ρ, in this case we leave the row blank. The results for the unnormalized datasets with η = 0.1 are collected in Table 2. (See Supplementary material for the full table). 5 Conclusion and Future Directions We studied a natural notion of additive perturbation stability, that we believe captures many real-world instances of Euclidean k-means clustering. We first gave a polynomial time algorithm when k = 2. For large k, under an additional margin assumption, we gave a fast algorithm of independent interest that provably recovers the optimal clustering under these assumptions (in fact the algorithm is also robust to noise and outliers). An appealing aspect of this algorithm is that it is not tailored towards the model; our experiments indicate that this algorithm works well in practice even when the assumptions do not hold. Our results with the margin assumption hence gives an algorithm that (A) has provable guarantees (under reasonable assumptions) (B) is efficient and practical and (C) is robust to errors. While the margin assumption seems like a realistic assumption qualitatively, we believe that the exact condition we assume is not optimal. An interesting open question is understanding whether such a margin is necessary for designing tractable algorithms for large k. We conjecture that for higher k, clustering remains hard even with ε additive perturbation resilience (without any additional margin assumption). Improving the margin condition or proving lower bounds on the amount of additive stability required are interesting future directions. 9 References [1] Margareta Ackerman and Shai Ben-David. Clusterability: A theoretical study. In Proceedings of the Twelth International Conference on Artificial Intelligence and Statistics, volume 5, pages 1–8. PMLR, 2009. [2] Haris Angelidakis, Konstantin Makarychev, and Yury Makarychev. Algorithms for stable and perturbationresilient problems. In Symposium on Theory of Computing (STOC), 2017. [3] David Arthur and Sergei Vassilvitskii. K-means++: The advantages of careful seeding. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’07, pages 1027–1035, 2007. [4] Pranjal Awasthi, Avrim Blum, and Or Sheffet. Center-based clustering under perturbation stability. Information Processing Letters, 112(1–2):49 – 54, 2012. [5] Pranjal Awasthi, Moses Charikar, Ravishankar Krishnaswamy, and Ali Kemal Sinop. The hardness of approximation of euclidean k-means. In Symposium on Computational Geometry, pages 754–767, 2015. [6] Pranjal Awasthi and Or Sheffet. Improved spectral-norm bounds for clustering. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 37–49. 2012. [7] Maria-Florina Balcan, Avrim Blum, and Anupam Gupta. Approximate clustering without the approximation. In Proceedings of the twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’09, pages 1068–1077, 2009. [8] Maria Florina Balcan and Yingyu Liang. Clustering under perturbation resilience. SIAM Journal on Computing, 45(1):102–155, 2016. [9] Shai Ben-David. Computational feasibility of clustering under clusterability assumptions. CoRR, abs/1501.00437, 2015. [10] Shalev Ben-David and Lev Reyzin. Data stability in clustering: A closer look. Theoretical Computer Science, 558:51 – 61, 2014. Algorithmic Learning Theory. [11] Yonatan Bilu and Nathan Linial. Are stable instances easy? In Innovations in Computer Science - ICS 2010, Tsinghua University, Beijing, China, January 5-7, 2010. Proceedings, pages 332–341, 2010. [12] Hans-Dieter Block. The perceptron: A model for brain functioning. Reviews of Modern Physics, 34(1):123– 135, 1962. [13] Avrim Blum and John Dunagan. Smoothed analysis of the perceptron algorithm for linear programming. In Proceedings of Symposium on Dicrete Algorithms (SODA), 2002. [14] Sanjoy Dasgupta. The hardness of k-means clustering. Department of Computer Science and Engineering, University of California, San Diego, 2008. [15] Amit Kumar and Ravindran Kannan. Clustering with spectral norm and the k-means algorithm. In Foundations of Computer Science (FOCS), 2010 51st Annual IEEE Symposium on, pages 299–308. IEEE, 2010. [16] Konstantin Makarychev, Yury Makarychev, and Aravindan Vijayaraghavan. Bilu-linial stable instances of max cut. Proc. 22nd Symposium on Discrete Algorithms (SODA), 2014. [17] A.B.J Novikoff. On convergence proofs on perceptrons. Proceedings of the Symposium on the Mathematical Theory of Automata, XII(1):615–622, 1962. [18] David P. Williamson and David B. Shmoys. The Design of Approximation Algorithms. Cambridge University Press, New York, NY, USA, 1st edition, 2011. 10 | 2017 | 549 |
7,062 | A Universal Analysis of Large-Scale Regularized Least Squares Solutions Ashkan Panahi Department of Electrical and Computer Engineering North Carolina State University Raleigh, NC 27606 apanahi@ncsu.edu Babak Hassibi Department of Electrical Engineering California Institute of Technology Pasadena, CA 91125 hassibi@caltech.edu Abstract A problem that has been of recent interest in statistical inference, machine learning and signal processing is that of understanding the asymptotic behavior of regularized least squares solutions under random measurement matrices (or dictionaries). The Least Absolute Shrinkage and Selection Operator (LASSO or least-squares with ℓ1 regularization) is perhaps one of the most interesting examples. Precise expressions for the asymptotic performance of LASSO have been obtained for a number of different cases, in particular when the elements of the dictionary matrix are sampled independently from a Gaussian distribution. It has also been empirically observed that the resulting expressions remain valid when the entries of the dictionary matrix are independently sampled from certain non-Gaussian distributions. In this paper, we confirm these observations theoretically when the distribution is sub-Gaussian. We further generalize the previous expressions for a broader family of regularization functions and under milder conditions on the underlying random, possibly non-Gaussian, dictionary matrix. In particular, we establish the universality of the asymptotic statistics (e.g., the average quadratic risk) of LASSO with non-Gaussian dictionaries. 1 Introduction During the last few decades, retrieving structured data from an incomplete set of linear observations has received enormous attention in a wide range of applications. This problem is especially interesting when the ambient dimension of the data is very large, so that it cannot be directly observed and manipulated. One of the main approaches is to solve regularized least-squares optimization problems that are tied to the underlying data model. This can be generally expressed as: min x 1 2∥y −Ax∥2 2 + f(x), (1) where x ∈Rm and y ∈Rn are the desired data and observation vectors, respectively. The matrix A ∈Rm×n is the sensing matrix, representing the observation process, and the regularization function f : Rn →R imposes the desired structure on the observed data. When f is convex, the optimization in (1) can be solved reliably with a reasonable amount of calculations. In particular, the case where f is the ℓ1 norm is known as the LASSO, which has been extremely successful in retrieving sparse data vectors. During the past years, random sensing matrices A have been widely used and studied in the context of the convex regularized least squares problems. From the perspective of data retrieval, this choice is supported by a number of studies in the so-called Compressed Sensing (CS) literature, which show that under reasonable assumptions, random matrices may lead to good performance [1, 2, 3]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. An interesting topic, addressed in the recent compressed sensing literature (and also considered here), is to understand the behavior of the regularized least squares solution in the asymptotic case, where m and n grow to infinity with a constant ratio γ = m/n. For this purpose, a scenario is widely considered, where y is generated by the following linear model: y = Ax0 + ν, (2) where x0 is the true structured vector and ν is the noise vector, here assumed to consist of independent centered Gaussian entries, with equal variances σ2. Then, it is desired to characterize the statistical behavior of the optimal solution ˆx of (1), also called the estimate, and the error w = ˆx −x0. More specifically, we are interested in the asymptotic empirical distribution1 of the estimate ˆx and the error w, when the sensing matrix is also randomly generated with independent and identically distributed entries. Familiar examples of such matrices are Gaussian and Bernoulli matrices. 1.1 Previous Work Analyzing linear least squares problems with random matrices has a long history. The behavior of the unregularized solution, or that of ridge regression (i.e., ℓ2−regularization) is characterized by the singular values of A which is well-understood in random matrix theory [4, 5]. However, a general study of regularized solutions became prominent with the advent of compressed sensing, where considerable effort has been directed toward an analysis in the sense explained above. In compressed sensing, early works focused on the LASSO (ℓ1 regularization), sparse vectors x0 and the case, where ν = 0 [6]. These works aimed at providing conditions to guarantee perfect recovery, meaning w = 0, and established the Restricted Isometry Property (RIP) as a deterministic perfect recovery condition. This condition is generally difficult to verify [7, 8]. It was immediately observed that under mild conditions, random matrices satisfy the RIP condition with high probability, when the dimensions grow to infinity with a proper ratio γ [9, 10]. Soon after, it was discovered that the RIP condition was unnecessary to undertake the analysis for random matrices. In [11], an "RIP-less" theory of perfect recovery was introduced. Despite some earlier attempts [12, 13], a successful error analysis of the LASSO for Gaussian matrices was not obtained until the important paper [14], where it was shown by the analysis of so-called approximate message passing (AMP) that for any pseudo Lipschitz function ψ; R2 →R, and defining ˆxi, xi0 as the ith elements of ˆx and x0, respectively, the sample risk 1 n n X k=1 ψ(ˆxi, xi0) converges to a value that can be precisely computed. As a special case, the asymptotic value of the scaled ℓ2 norm of the error w is calculated by taking ψ(ˆxi, xi0) = (ˆxi −xi0)2. In [15], similar results are obtained for M-estimators using AMP. Fundamental bounds for linear estimation with Gaussian matrices are also recently provided in [16]. Another remarkable direction of progress was made in a series of papers, revolving around an approach, first developed by Gordon in [17], and introduced to the compressed sensing literature by Stojnic in [18]. Employing Gordon’s approach, [19] provides the analysis of a broad range of convex regularized least squares problems for Gaussian sensing matrices. Exact expressions are provided in this work only for asymptotically small noise. In [20] this result is utilized to provide the exact analysis of the LASSO for general noise variance, confirming the earlier results in [14]. Some further investigations are recently provided in [21] and [22]. When there is no measurement noise, universal (non-Gaussian) results on the phase transition for the number of measurements that allows perfect recovery of the signal have been recently obtained in [23]. Another special case of ridge (ℓ2) regression is studied in [24]. The technical approach in [23] is different from ours. Furthermore, the current paper considers measurement noise and is concerned with the performance of the algorithm and not on the phase transitions for perfect recovery. In [25], the so-called Lindeberg approach is proposed to study the asymptotic behavior of the LASSO. This is similar in spirit to our approach. However, the study in [25] is more limited than ours, in the sense that it only establishes universality of the expected value of the optimal cost when the LASSO is restricted to an arbitrary rectangular ball. Some stronger bounds on the error risk of LASSO are 1Empirical distribution of a vector x is a measure ν where ν(A) is the fraction of entries in x valued in A. 2 established in [23, 26], which are sharp for asymptotically small noise or large m. However, to the best of our knowledge, there have not been any exact universal results of the generality as ours in the literature. It is also noteworthy that our results can be predicted by the replica symmetry (RS) method as partially developed in [27]. Another recent area where the connection of RS and performance of estimators has been rigorously established is low rank matrix estimation [28, 29] 2 Main Results Our contributions are twofold: First, we generalize the expressions in [21] and [20] for a more general case of arbitrary separable regularization functions f(x) where with an abuse of notation f(x) = n X i=1 f(xi) (3) and the function f on the right hand side is a real function f(x) : R →R. Second, we show that our result is universal, which precisely means that our expressions are independent of the distribution (law) of the i.i.d sensing matrix. In general, we tie the asymptotic behavior of the optimization in (1) to the following two-dimensional optimization, which we refer to as the essential optimization: Cf(γ, σ) = max β≥0 min p>0 pβ(γ −1) 2 + γσ2β 2p −γβ2 2 + E Sf β p , pΓ + X , (4) where X and Γ are two independent random variables, distributed by an arbitrary distribution ξ and standard Gaussian p.d.f, respectively. Further, Sf(. , . ) denotes the proximal function of f, which is defined by Sf(q, y) = min x q 2(x −y)2 + f(x). (5) with the minimum located at ˆxf(q, y). If the solution ˆp = ˆp(γ, σ), ˆβ = ˆβ(γ, σ) of (4) is unique, then we define the random variables ˆX = ˆXf,ξ,σ,γ = ˆxf ˆβ ˆp , ˆpΓ + X ! , W = ˆX −X Our result can be expressed by the following theorem: Theorem 1 Suppose that the entries of A are first generated independently by a proper distribution2 µ and next scaled by 1/√m. Moreover, assume that the true vector x0 is randomly generated and has i.i.d. entries with some distribution ξ. Then, • The optimal cost in (1), scaled by 1 n, converges in probability to Cf(γ, σ), • The empirical distributions of the solution ˆx and the error w weakly converge to the distribution of ˆX and W, respectively, if one of the following holds: 1. The real function f is strongly convex. 2. The real function f equals λ|x| for some λ > 0, µ is further σ2 s -sub-Gaussian3 and the "effective sparsity" M0 = Pr( ˆX ̸= 0) is smaller than a constant depending on µ, λ, γ, σ. For example, M0 ≤ρ/2 works where ρ log 9 + H(ρ) ≤min 1, 9 8σ2s + 1 2 log 8σ2 s 9 and H(ρ) = −ρ log ρ −(1 −ρ) log(1 −ρ) is the binary entropy function4. 2Here, a proper distribution is the one with vanishing first, third and fifth moments, unit variance and finite fourth and sixth moments. 3A centered random variable Z is σ2 s -sub-Gaussian if E(erZ) ≤e σ2 s r2 2 holds for every r ∈R. 4In this paper, all logarithms are to natural base (e). 3 We include more detailed and general results, as well as the proofs in the supplementary material. In the rest of this paper, we discuss the consequences of Theorem 1, especially for the case of the LASSO, and give a sketch of the proof of our results. 3 Remarks and Numerical Results In this section, we discuss few issues arising from our analysis. 3.1 Evaluation of Asymptotic Values A crucial question related to Theorem 1 and the essential optimization is how to calculate the optimal parameters in (4). Here, our purpose is to provide a simple instruction for solving the optimization in (4). Notice that (4) is a min-max optimization over the pair (p, β) of real positive numbers. We observe that there exists an appealing structure in this optimization, which substantially simplifies its numerical solution: Theorem 2 For any fixed β > 0, the objective function in (4) is convex over p. For any fixed β, denote the optimal value of the inner optimization (over p) of (4) by ψ(β). Then, ψ is a concave function of β. Using Theorem 2, we may reduce the problem of solving (4) into a sequence of single dimensional convex optimization problems (line searches). We assume a derivative-free5 algorithm alg(φ), such as dichotomous search (See the supplement for more details), which receives as an input (an oracle of) a convex function φ and returns its optimal value and its optimal point over [0 ∞). Denote the cost function of (4) by φ(p, β). This means that ψ(β) = min p φ(p, β). If φ(p, β) is easy to calculate, we observe that alg(φ(p, β)) for a fixed β is an oracle of ψ(β). Since ψ(β) is now easy to calculate we may execute alg(ψ(β)) to obtain the optimal parameters. 3.1.1 Derivation for LASSO To apply the above technique, we require a fast method to evaluate the objective function in (4). Here, we provide the expressions for the case of LASSO with f(x) = λ|x|, which is originally formulated in [30]. For this case, we assume that the entries of the true vector x0 are non-zero and standard Gaussian with probability 0 ≤κ ≤1. In other words, ξ = κN + (1 −κ)δ0, where N and δ0 are standard Gaussian and the Dirac measures on R, respectively. Then, we have that E Sf β p , pΓ + X = κ p 1 + p2F(β p p 1 + p2) + (1 −κ)pF(β) where F(q) = λe−λ2 2q2 2 √ 2π −q 2 1 + λ2 q2 Q(λ q ) + q 4 The function Q(. ) is the Gaussian tail Q-function. We may replace the above expression in the definition of essential optimization to obtain ˆp, ˆβ and the random variables ˆX, W in Section 2. Now, let us calculate ∥w∥2 2/n by taking expectation over empirical distribution of w. Using Theorem 1, we obtain the following term for the asymptotic value of ∥w∥2 2/n: E(W 2) = κJ λp β , p, 1 + (1 −κ)J λp β , p, 0 where J(ϵ, p, α) = α2 + 2 p2 + ϵ2 −α2 Q ϵ p α2 + p2 ! −2ϵ r α2 + p2 2π exp − ϵ2 2(α2 + p2) Figure 1a depicts the average value ∥w∥2 2/n over 50 independent realizations of the LASSO, including independent Gaussian sensing matrices with γ = 0.5, sparse true vectors with κ = 0.2 and Gaussian 5It is also possible to use the derivative-based algorithms, but it requires to calculate the derivatives of Sf and ψ. We do not study this case. 4 0 1 2 3 4 5 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22 MSE Theoretical Empirical n=200 Empirical n=500 (a) 0 1 2 3 4 5 0 0.5 1 1.5 2 2.5 3x 10 -3 Variance of Squared Error n=200 n=500 (b) Figure 1: a)The sample mean of the quadratic risk for different values of λ, compared to its theoretical value. The average is taken over 50 trials. b) The sample variance of the quadratic risk for different values of λ. The average is taken over 1000 trials. 0 0.5 1 1.5 2 2.5 3 3.5 0 0.05 0.1 0.15 0.2 0.25 MSE and Sparsity Error L2 norm Effective Sparsity Error L1 norm Figure 2: Asymptotic error ℓ1 and squared ℓ2 norms, as well as the solution sparsity. Their corresponding optimal λ values are depicted by vertical lines. noise realizations with σ2 = 0.1. We consider two different problem sizes n = 200, 500. As seen, the sample mean, which approximates the statistical mean E(∥w∥2 2/n), agrees with the theoretical results above. Figure 1b examines the convergence of the error 2-norm by depicting the sample variance of ∥w∥2 2/n for the two cases above with n = 200, 500. Each data point is obtained by 1000 independent realizations. As seen, the case n = 500 has a smaller variance, which indicates that as dimensions grow the variance of the quadratic risk vanishes and it converges in probability to its mean. Another interesting phenomenon in Figure 1b is that the larger values of λ are associated with larger uncertainty (variance), especially for smaller problem sizes. The asymptotic analysis allows us to decide an optimal value of the regularization parameter λ. Figure 2 shows few possibilities. It depicts the theoretical values for the error squared ℓ2 and ℓ1 norms as well as the sparsity of the solution. The (effective6) sparsity can be calculated as M0 = Pr( ˆX ̸= 0) = 2(1 −κ)Q λ β + 2κQ λp β p 1 + p2 ! The expression for the ℓ1 norm can be calculated similar to the ℓ2 norm, but does not have closed form and is calculated by a Monte Carlo method. We observe that at the minimal error, both in ℓ2 and ℓ1 senses, the solution is sparser than the true vector (κ = 0.2). On the contrary, adjusting the sparsity to the true one slightly increases the error ℓ2 norm. As expected, the sparsity of the solution decreases monotonically with increasing λ. 6Since we establish weak convergence of the empirical distribution, this number does not necessarily reflect the number of exactly zero elements in ˆx, but rather the "infinitesimally" small ones. 5 0 1 2 3 4 5 0.12 0.14 0.16 0.18 0.2 Average L2 Error Theoretical t-distribution =3, n=200 t-distribution =3, n=500 Bernoulli Asymmetric Bernoulli (a) 0 1 2 3 4 5 0 0.5 1 1.5 2 2.5 3 Variance of Squared Error 10-3 Bernoulli, n=200 t-distribution, n=500 t-distribution, n=200 Asymmetric Bernoulli (b) Figure 3: (a) The average LASSO error ℓ2 norm (b) the sample variance of LASSO error ℓ2 norm for different matrices. 3.2 Universality and Heavy-tailed Distributions In the previous section, we demonstrated numerical results, which were generated by Gaussian matrices. Here, we focus on universality. In Section 2, our results are under some regularity assumptions for the sensing matrix. For the LASSO, we require sub-Gaussian entries and low sparsity, which is equivalent to a large regularization value. Here, we examine these conditions in three cases: First, a centered Bernoulli matrix where each entry −1 or 1 with probability 1/2. Second, a matrix distributed by Student’s t-distribution with 3 degrees of freedom ν = 3 and scaled to possess unit variance. Third, an asymmetric Bernoulli matrix where each entry is either 3 or −1/3 with probabilities 0.1 and 0.9, respectively. Figure 3 shows the error ℓ2 norm and its variance for the LASSO case. As seen, all cases follow the predicted asymptotic result. However, the results for the t-matrix and the asymmetric distribution is beyond our analysis, since t-distribution does not possess finite statistical moments of an order larger than 2 and the asymmetric case possesses non-vanishing third moment. This indicates that our universal results hold beyond the limit assumed in this paper. However, we are not able to prove it with our current technique. 3.3 Remarks on More General Universality Results As we explain in the supplementary document, Theorem 1 is specialized from a more general result. Here, we briefly discuss the main aspects of our general result. When the regularization is not separable (f is non-separable) our analysis may still guarantee universality of its behavior. However, we are not able to evaluate the asymptotic values anymore. Instead, we relate the behavior of a general sensing matrix to a reference choice, e.g. a Gaussian matrix. For example, we are able to show that if the optimal objective value in (1) converges to a particular value for the reference matrix, then it converges to exactly the same value for other suitable matrices in Theorem 1. The asymptotic optimal value may remain unknown to us. The universality of the optimal value holds for a much broader family of regularizations than the separable ones in (3). For example, "weakly separable" functions of the form f(x) = P i,j f(xi, xj) n or the generalized fused LASSO [31, 32] are simply seen to possess universal optimal values. One important property of our generalized result is that if we are able to establish optimal value universality for a particular regularization function f(x), then we automatically have a similar result for f(Ψx), where Ψ is a fixed matrix satisfying certain regularity conditions7. This connects our analysis to the analysis of generalized LASSO [33, 34]. Moreover, substituting f(Ψx) in (1) and changing the optimization variable to x′ = Ψx, we obtain (1) where A is replaced by AΨ−1. Hence, our approach enables us to obtain further results on sensing matrices of the form AΨ−1, where A is i.i.d and Ψ is deterministic. We postpone more careful analysis to future papers. 7More precisely, we require Ψ to have a strictly positive smallest singular value and a bounded third operator norm. 6 It is worth mentioning that we obtain Theorem 1 about the separable functions in the light of the same principle: We simply connect the behavior of the error for an arbitrary matrix to the Gaussian one. In this particular case, we are able to carry out the calculations over Gaussian matrices with the well-known techniques, developed for example in [18] and briefly explained below. 4 Technical Discussion 4.1 An Overview of Approach In this section, we present a crude sketch of our mathematical analysis. Our aim is to show the main ideas without being involved in mathematical subtleties. There are four main elements in our analysis, which we address in the following. 4.1.1 From Optimal Cost to the Characteristics of the Optimal Point In essence, we study the optimal values of optimizations such as the one in (1). Studying the optimal solution directly is much more difficult. Hence, we employ an indirect method, where we connect an arbitrary real-valued characteristic (function) g of the optimal point to the optimal value of a set of related optimizations. This is possible through the following simple observation: Lemma 1 We are to minimize a convex function φ(x) on a convex domain D and suppose that x∗ is a minimal solution. Further, g(x) is such that the function φ + ϵg remains convex when ϵ is in a symmetric interval [−e e]. Define Φ(ϵ) as the minimal value of φ + ϵg on D. Then, Φ(ϵ) is concave on [−e e] and g(x∗) is its subgradient at ϵ = 0. As a result of Lemma 1, the increments Φ(ϵ) −Φ(0) and Φ(0) −Φ(−ϵ) for positive values of ϵ provide lower and upper bounds for g(x∗), respectively. We use these bounds to prove convergence in probability. However, Lemma 1 requires φ + ϵg to remain convex for both positive and negative values of ϵ. It is now simple to see that choosing a strongly convex function for f and a convex function with bounded second derivative for g ensures this requirement. 4.1.2 Lindeberg’s Approach With the above approach, we only need to focus on the universality of the optimal values. To obtain universal results, we adopt the method that Lindeberg famously developed to obtain a strong version of the central limit theorem [35]. Lindeberg’s approach requires a reference case, where asymptotic properties are simple to deduce. Then, similar results are proved for an arbitrary case by considering a finite chain of intermediate problems, starting from the reference case and ending at the desired case. In each step, we are able to analyze the change in the optimal value and show that the sum of these changes cannot be substantial for asymptotically large cases. In our study, we take the optimization in (1) with a Gaussian matrix A as reference. In each step of the chain, we replace one Gaussian row of A with another one with the target distribution. After m step, we arrive at the desired case. At each step, we analyze the change in the optimal value by Taylor expansion, which shows that the change is of second order and is o( 1 m) (in fact O( 1 m5/4 )) with high probability, such that the total change is bounded by o(1). For this, we require strong convexity and bounded third derivatives. This shows universality of the optimal value. 4.1.3 Asymptotic Results For Gaussian Matrices Since we take Gaussian matrices as reference in the Lindeberg’s approach, we require a different machinery to analyze the Gaussian case. The analysis of (1) for the Gaussian matrices is considered in [19]. Here, we briefly review this approach and specialize it in some particular cases. Let us start by defining the following so-called Key optimization, associated with (1): φn(g, x0) = max β>0 min v∈Rn mβ n r σ2 + ∥v∥2 2 m + β gT v n −m 2nβ2 + fn(v + x0) n (6) where g is a n−dimensional standard Normal random vector, independent of other variables. Then, [19] shows that in case A is generated by a standard Gaussian random variable and φn(g, x0) converges in probability to a value C, then the optimal value in (1) also converges to C. The 7 consequences of this observation are thoroughly discussed in [20]. Here, we focus on a case, where f(x) is separable as in 3. For this case, The Key optimization in (6) can be simplified and stated as in the following theorem (See [30]). Theorem 3 Suppose that A is generated by a Gaussian distribution, x0 is i.i.d. with distribution ξ and f(x) is separable as in (1). Furthermore, m/n →γ ∈R≥0. Then, the optimal value of the optimization in (1), converges in probability to Cf(γ, σ) defined in Section 2. Now, we may put the above steps together to obtain the desired result for the strongly convex functions: Lindeberg’s approach shows that the optimal cost is universal. On the other hand, the optimal cost for Gaussian matrices is given by Cf(γ, σ). We conclude that Cf(γ, σ) is the universal limit of the optimal cost. Now, we may use the argument in Lemma 1 to obtain a characteristic g at the optimal point. For this, we may take for example regularizations of the form f + ϵg, which by the previous discussion converges to Cf+ϵg. Then, g(ˆx) becomes equal to dCf+ϵg/dϵ at ϵ = 0, which by further calculations leads to the result in Theorem 1 8. 4.1.4 Final Step: The LASSO The above argument fails for the LASSO with f(x) = λ|x| because it lacks strong convexity. Our remedy is to start from an "augmented approximation" of the LASSO with f(x) = λ|x| + ϵx2/2 and to show that the solution of the approximation is stable in the sense that removing the term ϵx2/2 does not substantially change the optimal point. We employ a slightly modified argument in [12], which requires two assumptions: a) The solution is sparse. b) The matrix A is sufficiently restricted-isometric. The condition on restricted isometry is satisfied by assuming sub-Gaussian distributions [36], while the sparsity of the solution is given by M0. The assumption that M0 is sufficiently small allows the argument in [12] to hold in our case, which ensures that the LASSO solution remains close to the solution of the augmented LASSO and the claims of Theorem 1 can be established for the LASSO. However, we are able to show that the optimal value of the LASSO is close to that of the augmented LASSO without any requirement for sparsity. This can be found in the supplementary material. 5 Conclusion The main purpose of this study was to extend the existing results about the convex regularized least squares problems in two different directions, namely more general regularization functions and non-Gaussian sensing matrices. In the first direction, we tied the asymptotic properties for general separable convex regularization functions to a two-dimensional optimization that we called the essential optimization. We also provided a simple way to calculate asymptotic characteristics of the solution from the essential optimization. In the second direction, we showed that the asymptotic behavior of regularization functions with certain regularity conditions is independent of the distribution (law) of the sensing matrix. We presented few numerical experiments which validated our results. However, these experiments suggest that the universality of the asymptotic behavior holds beyond our assumptions. 5.1 Future Research After establishing the convergence results, a natural further question is the rate of convergence. The properties of regularized least squares solutions with finite size is not well-studied even for the Gaussian matrices. Another interesting subject for future research is to consider random sensing matrices, which are not necessarily identically distributed. We believe that our technique can be generalized to a case with independent rows or columns instead of elements. A similar generalization can be obtained by considering true vectors with a different structure. Moreover, we introduced a number of cases such as generalized LASSO [34] and generalized fused Lasso [32], where our analysis shows universality, but the asymptotic performance cannot be calculated. Calculating the asymptotic values of these problems for a reference choice, such as Gaussian matrices is an interesting subject of future study. 8The expression for g(w) is found in a similar way, but requires some mathematical preparations, which we express later. 8 References [1] E. J. Candes and T. Tao, “Near-optimal signal recovery from random projections: Universal encoding strategies?,” Information Theory, IEEE Transactions on, vol. 52, no. 12, pp. 5406– 5425, 2006. [2] D. L. Donoho, “For most large underdetermined systems of linear equations the minimal ℓ1snorm solution is also the sparsest solution,” Communications on pure and applied mathematics, vol. 59, no. 6, pp. 797–829, 2006. [3] Y. C. Eldar and G. Kutyniok, Compressed sensing: theory and applications. Cambridge University Press, 2012. [4] Z. Bai, “Methodologies in spectral analysis of large dimensional random matrices, a review,” Statistica Sinica, pp. 611–662, 1999. [5] Z. Bai and J. W. Silverstein, Spectral analysis of large dimensional random matrices, vol. 20. Springer, 2010. [6] D. L. Donoho, “Compressed sensing,” Information Theory, IEEE Transactions on, vol. 52, no. 4, pp. 1289–1306, 2006. [7] S. S. Chen, D. L. Donoho, and M. A. Saunders, “Atomic decomposition by basis pursuit,” SIAM journal on scientific computing, vol. 20, no. 1, pp. 33–61, 1998. [8] E. J. Candes and T. Tao, “Decoding by linear programming,” Information Theory, IEEE Transactions on, vol. 51, no. 12, pp. 4203–4215, 2005. [9] E. J. Candès, “The restricted isometry property and its implications for compressed sensing,” Comptes Rendus Mathematique, vol. 346, no. 9, pp. 589–592, 2008. [10] R. G. Baraniuk, “Compressive sensing,” IEEE signal processing magazine, vol. 24, no. 4, 2007. [11] E. J. Candes and Y. Plan, “A probabilistic and ripless theory of compressed sensing,” Information Theory, IEEE Transactions on, vol. 57, no. 11, pp. 7235–7254, 2011. [12] E. J. Candes, J. K. Romberg, and T. Tao, “Stable signal recovery from incomplete and inaccurate measurements,” Communications on pure and applied mathematics, vol. 59, no. 8, pp. 1207– 1223, 2006. [13] D. L. Donoho, M. Elad, and V. N. Temlyakov, “Stable recovery of sparse overcomplete representations in the presence of noise,” Information Theory, IEEE Transactions on, vol. 52, no. 1, pp. 6–18, 2006. [14] M. Bayati and A. Montanari, “The lasso risk for gaussian matrices,” Information Theory, IEEE Transactions on, vol. 58, no. 4, pp. 1997–2017, 2012. [15] D. Donoho and A. Montanari, “High dimensional robust m-estimation: Asymptotic variance via approximate message passing,” Probability Theory and Related Fields, vol. 166, no. 3-4, pp. 935–969, 2016. [16] J. Barbier, M. Dia, N. Macris, and F. Krzakala, “The mutual information in random linear estimation,” in Communication, Control, and Computing (Allerton), 2016 54th Annual Allerton Conference on, pp. 625–632, IEEE, 2016. [17] Y. Gordon, On Milman’s inequality and random subspaces which escape through a mesh in R n. Springer, 1988. [18] M. Stojnic, “A framework to characterize performance of lasso algorithms,” arXiv preprint arXiv:1303.7291, 2013. [19] S. Oymak, C. Thrampoulidis, and B. Hassibi, “The squared-error of generalized lasso: A precise analysis,” in Communication, Control, and Computing (Allerton), 2013 51st Annual Allerton Conference on, pp. 1002–1009, IEEE, 2013. [20] C. Thrampoulidis, A. Panahi, D. Guo, and B. Hassibi, “Precise error analysis of the \ℓ2-lasso,” arXiv preprint arXiv:1502.04977, 2015. [21] C. Thrampoulidis, E. Abbasi, and B. Hassibi, “The lasso with non-linear measurements is equivalent to one with linear measurements,” Advances in Neural Information Processing Systems, 2015. 9 [22] C. Thrampoulidis, E. Abbasi, and B. Hassibi, “Precise error analysis of regularized m-estimators in high-dimension,” arXiv preprint arXiv:1601.06233, 2016. [23] S. Oymak and J. A. Tropp, “Universality laws for randomized dimension reduction, with applications,” arXiv preprint arXiv:1511.09433, 2015. [24] N. E. Karoui, “Asymptotic behavior of unregularized and ridge-regularized high-dimensional robust regression estimators: rigorous results,” arXiv preprint arXiv:1311.2445, 2013. [25] A. Montanari and S. B. Korada, “Applications of lindeberg principle in communications and statistical learning,” tech. rep., 2010. [26] N. Zerbib, Y.-H. Li, Y.-P. Hsieh, and V. Cevher, “Estimation error of the lasso,” tech. rep., 2016. [27] Y. Kabashima, T. Wadayama, and T. Tanaka, “A typical reconstruction limit for compressed sensing based on lp-norm minimization,” Journal of Statistical Mechanics: Theory and Experiment, vol. 2009, no. 09, p. L09003, 2009. [28] J. Barbier, M. Dia, N. Macris, F. Krzakala, T. Lesieur, and L. Zdeborová, “Mutual information for symmetric rank-one matrix estimation: A proof of the replica formula,” in Advances in Neural Information Processing Systems, pp. 424–432, 2016. [29] M. Lelarge and L. Miolane, “Fundamental limits of symmetric low-rank matrix estimation,” arXiv preprint arXiv:1611.03888, 2016. [30] C. Thrampoulidis, A. Panahi, and B. Hassibi, “Asymptotically exact error analysis for the generalized equation-lasso,” in 2015 IEEE International Symposium on Information Theory (ISIT), pp. 2021–2025, IEEE, 2015. [31] R. Tibshirani, M. Saunders, S. Rosset, J. Zhu, and K. Knight, “Sparsity and smoothness via the fused lasso,” Journal of the Royal Statistical Society: Series B (Statistical Methodology), vol. 67, no. 1, pp. 91–108, 2005. [32] B. Xin, Y. Kawahara, Y. Wang, and W. Gao, “Efficient generalized fused lasso and its application to the diagnosis of alzheimer’s disease.,” in AAAI, pp. 2163–2169, Citeseer, 2014. [33] J. Liu, L. Yuan, and J. Ye, “Guaranteed sparse recovery under linear transformation.,” in ICML (3), pp. 91–99, 2013. [34] R. J. Tibshirani, J. E. Taylor, E. J. Candes, and T. Hastie, The solution path of the generalized lasso. Stanford University, 2011. [35] J. W. Lindeberg, “Eine neue herleitung des exponentialgesetzes in der wahrscheinlichkeitsrechnung,” Mathematische Zeitschrift, vol. 15, no. 1, pp. 211–225, 1922. [36] R. Baraniuk, M. Davenport, R. DeVore, and M. Wakin, “A simple proof of the restricted isometry property for random matrices,” Constructive Approximation, vol. 28, no. 3, pp. 253–263, 2008. 10 | 2017 | 55 |
7,063 | Attend and Predict: Understanding Gene Regulation by Selective Attention on Chromatin Ritambhara Singh, Jack Lanchantin, Arshdeep Sekhon, Yanjun Qi Department of Computer Science University of Virginia yanjun@virginia.edu Abstract The past decade has seen a revolution in genomic technologies that enabled a flood of genome-wide profiling of chromatin marks. Recent literature tried to understand gene regulation by predicting gene expression from large-scale chromatin measurements. Two fundamental challenges exist for such learning tasks: (1) genome-wide chromatin signals are spatially structured, high-dimensional and highly modular; and (2) the core aim is to understand what the relevant factors are and how they work together. Previous studies either failed to model complex dependencies among input signals or relied on separate feature analysis to explain the decisions. This paper presents an attention-based deep learning approach, AttentiveChrome, that uses a unified architecture to model and to interpret dependencies among chromatin factors for controlling gene regulation. AttentiveChrome uses a hierarchy of multiple Long Short-Term Memory (LSTM) modules to encode the input signals and to model how various chromatin marks cooperate automatically. AttentiveChrome trains two levels of attention jointly with the target prediction, enabling it to attend differentially to relevant marks and to locate important positions per mark. We evaluate the model across 56 different cell types (tasks) in humans. Not only is the proposed architecture more accurate, but its attention scores provide a better interpretation than state-of-the-art feature visualization methods such as saliency maps.1 1 Introduction Gene regulation is the process of how the cell controls which genes are turned “on” (expressed) or “off” (not-expressed) in its genome. The human body contains hundreds of different cell types, from liver cells to blood cells to neurons. Although these cells include the same set of DNA information, their functions are different 2. The regulation of different genes controls the destiny and function of each cell. In addition to DNA sequence information, many factors, especially those in its environment (i.e., chromatin), can affect which genes the cell expresses. This paper proposes an attention-based deep learning architecture to learn from data how different chromatin factors influence gene expression in a cell. Such understanding of gene regulation can enable new insights into principles of life, the study of diseases, and drug development. “Chromatin” denotes DNA and its organizing proteins 3. A cell uses specialized proteins to organize DNA in a condensed structure. These proteins include histones, which form “bead“-like structures that DNA wraps around, in turn organizing and compressing the DNA. An important aspect of histone proteins is that they are prone to chemical modifications that can change the spatial arrangement of 1Code shared at www.deepchrome.org. 2DNA is a long string of paired chemical molecules or nucleotides that fall into four different types and are denoted as A, T, C, and G. DNA carries information organized into units such as genes. The set of genetic material of DNA in a cell is called its genome. 3The complex of DNA, histones, and other structural proteins is called chromatin. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. DNA. These spatial re-arrangements result in certain DNA regions becoming accessible or restricted and therefore affecting expressions of genes in the neighborhood region. Researchers have established the “Histone Code Hypothesis” that explores the role of histone modifications in controlling gene regulation. Unlike genetic mutations, chromatin changes such as histone modifications are potentially reversible ([5]). This crucial difference makes the understanding of how chromatin factors determine gene regulation even more impactful because this knowledge can help developing drugs targeting genetic diseases. At the whole genome level, researchers are trying to chart the locations and intensities of all the chemical modifications, referred to as marks, over the chromatin 4. Recent advances in nextgeneration sequencing have allowed biologists to profile a significant amount of gene expression and chromatin patterns as signals (or read counts) across many cell types covering the full human genome. These datasets have been made available through large-scale repositories, the latest being the Roadmap Epigenome Project (REMC, publicly available) ([18]). REMC recently released 2,804 genome-wide datasets, among which 166 datasets are gene expression reads (RNA-Seq datasets) and the rest are signal reads of various chromatin marks across 100 different “normal” human cells/tissues [18]. The fundamental aim of processing and understanding this repository of “big” data is to understand gene regulation. For each cell type, we want to know which chromatin marks are the most important and how they work together in controlling gene expression. However, previous machine learning studies on this task either failed to model spatial dependencies among marks or required additional feature analysis to explain the predictions (Section 4). Computational tools should consider two important properties when modeling such data. • First, signal reads for each mark are spatially structured and high-dimensional. For instance, to quantify the influence of a histone modification mark, learning methods typically need to use as input features all of the signals covering a DNA region of length 10, 000 base pair (bp) 5 centered at the transcription start site (TSS) of each gene. These signals are sequentially ordered along the genome direction. To develop “epigenetic” drugs, it is important to recognize how a chromatin mark’s effect on regulation varies over different genomic locations. • Second, various types of marks exist in human chromatin that can influence gene regulation. For example, each of the five standard histone proteins can be simultaneously modified at multiple different sites with various kinds of chemical modifications, resulting in a large number of different histone modification marks. For each mark, we build a feature vector representing its signals surrounding a gene’s TSS position. When modeling genome-wide signal reads from multiple marks, learning algorithms should take into account the modular nature of such feature inputs, where each mark functions as a module. We want to understand how the interactions among these modules influence the prediction (gene expression). In this paper we propose an attention-based deep learning model, AttentiveChrome, that learns to predict the expression of a gene from an input of histone modification signals covering the gene’s neighboring DNA region. By using a hierarchy of multiple LSTM modules, AttentiveChrome can discover interactions among signals of each chromatin mark, and simultaneously learn complex dependencies among different marks. Two levels of “soft” attention mechanisms are trained, (1) to attend to the most relevant regions of a chromatin mark, and (2) to recognize and attend to the important marks. Through predicting and attending in one unified architecture, AttentiveChrome allows users to understand how chromatin marks control gene regulation in a cell. In summary, this work makes the following contributions: • AttentiveChrome provides more accurate predictions than state-of-the-art baselines. Using datasets from REMC, we evaluate AttentiveChrome on 56 different cell types (tasks). • We validate and compare interpretation scores using correlation to a new mark signal from REMC (not used in modeling). AttentiveChrome’s attention scores provide a better interpretation than state-of-the-art methods for visualizing deep learning models. • AttentiveChrome can model highly modular inputs where each module is highly structured. AttentiveChrome can explain its decisions by providing “what” and “where” the model has focused 4In biology this field is called epigenetics. “Epi” in Greek means over. The epigenome in a cell is the set of chemical modifications over the chromatin that alter gene expression. 5A base pair refers to one of the double-stranded DNA sequence characters (ACGT) 2 HM1 (Xj=1) ...... Transcription Start Site (TSS) Bin # t=1 2 3 4 t=100 Gene A Gene A Gene A Gene A Gene A Bin-level Attention GeneA = ON/OFF Classification HM-level Attention HM2 (Xj=2) HM3 (Xj=3) HM4 (Xj=4) HM5 (Xj=5) t j j (y=+1/-1) Figure 1: Overview of the proposed AttentiveChrome framework. It includes 5 important parts: (1) Bin-level LSTM encoder for each HM mark; (2) Bin-level α-Attention across all bin positions of each HM mark; (3) HM-level LSTM encoder encoding all HM marks; (4) HM-level β-Attention among all HM marks; (5) the final classification. on. This flexibility and interpretability make this model an ideal approach for many real-world applications. • To the authors’ best knowledge, AttentiveChrome is the first attention-based deep learning method for modeling data from molecular biology. In the following sections, we denote vectors with bold font and matrices using capital letters. To simplify notation, we use “HM” as a short form for the term “histone modification”. 2 Background: Long Short-Term Memory (LSTM) Networks Recurrent neural networks (RNNs) have been widely used in applications such as natural language processing due to their abilities to model sequential dependencies. Given an input matrix X of size nin × T, an RNN produces a matrix H of size d × T, where nin is the input feature size, T is the length of input feature , and d is the RNN embedding size. At each timestep t ∈{1, · · · , T}, an RNN takes an input column vector xt ∈Rnin and the previous hidden state vector ht−1 ∈Rd and produces the next hidden state ht by applying the following recursive operation: ht = σ(Wxt + Uht−1 + b) = −−−−→ LSTM(xt), (1) where W, U, b are the trainable parameters of the model, and σ is an element-wise nonlinearity function. Due to the recursive nature, RNNs can capture the complete set of dependencies among all timesteps being modeled, like all spatial positions in a sequential sample. To handle the “vanishing gradient” issue of training basic RNNs, Hochreiter et al. [13] proposed an RNN variant called the Long Short-term Memory (LSTM) network. An LSTM layer has an input-to-state component and a recurrent state-to-state component like that in Eq. (1). Additionally, it has gating functions that control when information is written to, read from, and forgotten. Though the LSTM formulation results in a complex form of Eq. (1) (see Supplementary), when given input vector xt and the state ht−1 from previous time step t −1, an LSTM module also produces a new state ht. The embedding vector ht encodes the learned representation summarizing feature dependencies from the time step 0 to the time step t. For our task, we call each bin position on the genome coordinate a “time step”. 3 AttentiveChrome: A Deep Model for Joint Classification and Visualization Input and output formulation for the task: We use the same feature inputs and outputs as done previously in DeepChrome ([29]). Following Cheng et al. [7], the gene expression prediction is formulated as a binary classification task whose output represents if the gene expression of a gene is high(+1) or low(-1). As shown in Figure 1, the input feature of a sample (a particular gene) is denoted as a matrix X of size M × T. Here M denotes the number of HM marks we consider in the input. T is the total number of bin positions we take into account from the neighboring region of a gene’s TSS site on the genome. We refer to this region as the ‘gene region’ in the rest of the paper. xj denotes the j-th row vector of X whose elements are sequentially structured (signals from the j-th HM mark) j ∈{1, ..., M}. xj t in matrix X represents the signal from the t-th bin of the j-th HM 3 mark. t ∈{1, ..., T}. We assume our training set D contains Ntr labeled pairs. We denote the n-th pair as (X(n), y(n)), X(n) is a matrix of size M × T and y(n) ∈{−1, +1}, where n ∈{1, ..., Ntr}. An end-to-end deep architecture for predicting and attending jointly: AttentiveChrome learns to predict the expression of a gene from an input of HM signals covering its gene region. First, the signals of each HM mark are fed into a separate LSTM network to encode the spatial dependencies among its bin signals, and then another LSTM is used to model how multiple factors work together for predicting gene expression. Two levels of "soft" attention mechanisms are trained and dynamically predicted for each gene: (1) to attend to the most relevant positions of an HM mark, and (2) then to recognize and attend to the relevant marks. In summary, AttentiveChrome consists of five main modules (see Supplementary Figure S:2): (1) Bin-level LSTM encoder for each HM mark; (2) Bin-level Attention on each HM mark; (3) HM-level LSTM encoder encoding all HM marks; (4) HM-level Attention over all the HM marks; (5) the final classification module. We describe the details of each component as follows: Bin-Level Encoder Using LSTMs: For a gene of interest, the j-th row vector, xj, from X includes a total of T elements that are sequentially ordered along the genome coordinate. Considering the sequential nature of such signal reads, we treat each element (essentially a bin position) as a ‘time step’ and use a bidirectional LSTM to model the complete dependencies among elements in xj. A bidirectional LSTM contains two LSTMs, one in each direction (see Supplementary Figure S:2 (c)). It includes a forward −−−−→ LSTM j that models xj from xj 1 to xj T and a backward ←−−−− LSTM j that models from xj T to xj 1. For each position t, the two LSTMs output −→ hj t and ←− hj t, each of size d. −→ hj t = −−−−→ LSTM j(xj t) and ←− hj t = ←−−−− LSTM j(xj t). The final embedding vector at the t-th position is the concatenation hj t = [ −→ hj t, ←− hj t]. By coupling these LSTM-based HM encoders with the final classification, they can learn to embed each HM mark by extracting the dependencies among bins that are essential for the prediction task. Bin-Level Attention, α-attention: Although the LSTM can encode dependencies among the bins, it is difficult to determine which bins are most important for prediction from the LSTM. To automatically and adaptively highlight the most relevant bins for each sample, we use "soft" attention to learn the importance weights of bins. This means when representing j-th HM mark, AttentiveChrome follows a basic concept that not all bins contribute equally to the encoding of the entire j-th HM mark. The attention mechanism can help locate and recognize those bins that are important for the current gene sample of interest from j-th HM mark and can aggregate those important bins to form an embedding vector. This extraction is implemented through learning a weight vector αj of size T for the j-th HM mark. For t ∈{1, ..., T}, αj t represents the importance of the t-th bin in the j-th HM. It is computed as: αj t = exp(Wbhj t) PT i=1 exp(Wbhj i ). αj t is a scalar and is computed by considering all bins’ embedding vectors {hj 1, · · · , hj T }. The context parameter Wb is randomly initialized and jointly learned with the other model parameters during training. Our intuition is that through Wb the model will automatically learn the context of the task (e.g., type of a cell) as well as the positional relevance to the context simultaneously. Once we have the importance weight of each bin position, we can represent the entire j-th HM mark as a weighted sum of all its bin embeddings: mj = PT t=1 αj t × hj t. Essentially the attention weights αj t tell us the relative importance of the t-th bin in the representation mj for the current input X (both hj t and αj t depend on X). HM-Level Encoder Using Another LSTM: We aim to capture the dependencies among HMs as some HMs are known to work together to repress or activate gene expression [6]. Therefore, next we model the joint dependencies among multiple HM marks (essentially, learn to represent a set). Even though there exists no clear order among HMs, we assume an imagined sequence as {HM1, HM2, HM3, ..., HMM} 6. We implement another bi-directional LSTM encoder, this time on the imagined sequence of HMs using the representations mj of the j-th HMs as LSTM inputs (Supplementary Figure S:2 (e)). Setting the embedding size as d′, this set-based encoder, we denote as LSTM s, encodes the j-th HM as: sj = [−−−−−→ LSTM s(mj), ←−−−−− LSTM s(mj)]. Differently from mj, sj encodes the dependencies between the j-th HM and other HM marks. 6We tried several different architectures to model the dependencies among HMs, and found no clear ordering. 4 Table 1: Comparison of previous studies for the task of quantifying gene expression using histone modification marks (adapted from [29]). AttentiveChrome is the only model that exhibits all 8 desirable properties. Computational Study Unified Nonlinear Bin-Info Representation Learning Prediction Feature Inter. Interpretable Neighbor Bins Whole Region Linear Regression ([14]) × × × × ✓ ✓ × ✓ Support Vector Machine ([7]) × ✓ Bin-specific × ✓ ✓ ✓ × Random Forest ([10]) × ✓ Best-bin × ✓ ✓ × × Rule Learning ([12]) × ✓ × × ✓ × ✓ ✓ DeepChrome-CNN [29] ✓ ✓ Automatic ✓ ✓ ✓ ✓ × AttentiveChrome ✓ ✓ Automatic ✓ ✓ ✓ ✓ ✓ HM-Level Attention, β-attention: Now we want to focus on the important HM markers for classifying a gene’s expression as high or low. We do this by learning a second level of attention among HMs. Similar to learning αj t, we learn another set of weights βj for j ∈{1, · · · , M} representing the importance of HMj. βi is calculated as: βj = exp(Wssj) PM i=1 exp(Wssi). The HM-level context parameter Ws learns the context of the task and learns how HMs are relevant to that context. Ws is randomly initialized and jointly trained. We encode the entire "gene region" into a hidden representation v as a weighted sum of embeddings from all HM marks: v = PM j=1 βjsj. We can interpret the learned attention weight βi as the relative importance of HMi when blending all HM marks to represent the entire gene region for the current gene sample X. Training AttentiveChrome End-to-End: The vector v summarizes the information of all HMs for a gene sample. We feed it to a simple classification module f (Supplementary Figure S:2(f)) that computes the probability of the current gene being expressed high or low: f(v) = softmax(Wcv + bc). Wc and bc are learnable parameters. Since the entire model, including the attention mechanisms, is differentiable, learning end-to-end is trivial by using backpropagation [21]. All parameters are learned together to minimize a negative log-likelihood loss function that captures the difference between true labels y and predicted scores from f(.). 4 Connecting to Previous Studies In recent years, there has been an explosion of deep learning models that have led to groundbreaking performance in many fields such as computer vision [17], natural language processing [30], and computational biology [1, 27, 38, 16, 19, 29]. Attention-based deep models: The idea of attention in deep learning arises from the properties of the human visual system. When perceiving a scene, the human vision gives more importance to some areas over others [9]. This adaptation of “attention” allows deep learning models to focus selectively on only the important features. Deep neural networks augmented with attention mechanisms have obtained great success on multiple research topics such as machine translation [4], object recognition [2, 26], image caption generation [33], question answering [30], text document classification [34], video description generation[35], visual question answering -[32], or solving discrete optimization [31]. Attention brings in two benefits: (1) By selectively focusing on parts of the input during prediction the attention mechanisms can reduce the amount of computation and the number of parameters associated with deep learning model [2, 26]. (2) Attention-based modeling allows for learning salient features dynamically as needed [34], which can help improve accuracy. Different attention mechanisms have been proposed in the literature, including ‘soft’ attention [4], ‘hard’ attention [33, 24], or ‘location-aware’ [8]. Soft attention [4] calculates a ‘soft’ weighting scheme over all the component feature vectors of input. These weights are then used to compute a weighted combination of the candidate feature vectors. The magnitude of an attention weight correlates highly with the degree of significance of the corresponding component feature vector to the prediction. Inspired by [34], AttentiveChrome uses two levels of soft attention for predicting gene expression from HM marks. Visualizing and understanding deep models: Although deep learning models have proven to be very accurate, they have widely been viewed as “black boxes”. Researchers have attempted to develop separate visualization techniques that explain a deep classifier’s decisions. Most prior studies have focused on understanding convolutional neural networks (CNN) for image classifications, including techniques such as “deconvolution” [36], “saliency maps” [3, 28] and “class optimization” based 5 visualisation [28]. The “deconvolution’ approach [36] maps hidden layer representations back to the input space for a specific example, showing those features of an image that are important for classification. “Saliency maps" [28] use a first-order Taylor expansion to linearly approximate the deep network and seek most relevant input features. The “class optimization” based visualization [28] tries to find the best example (through optimization) that maximizes the probability of the class of interest. Recent studies [15, 22] explored the interpretability of recurrent neural networks (RNN) for text-based tasks. Moreover, since attention in models allows for automatically extracting salient features, attention-coupled neural networks impart a degree of interpretability. By visualizing what the model attends to in [34], attention can help gauge the predictive importance of a feature and hence interpret the output of a deep neural network. Deep learning in bioinformatics: Deep learning is steadily gaining popularity in the bioinformatics community. This trend is credited to its ability to extract meaningful representations from large datasets. For instance, multiple recent studies have successfully used deep learning for modeling protein sequences [23, 37] and DNA sequences [1, 20], predicting gene expressions [29], as well as understanding the effects of non-coding variants [38, 27]. Previous machine learning models for predicting gene expression from histone modification marks: Multiple machine learning methods have been proposed to predict gene expression from histone modification data (surveyed by Dong et al. [11]) including linear regression [14], support vector machines [7], random forests [10], rule-based learning [12] and CNNs [29]. These studies designed different feature selection strategies to accommodate a large amount of histone modification signals as input. The strategies vary from using signal averaging across all relevant positions, to a ‘best position’ strategy that selected the input signals at the position with the highest correlation to the target gene expression and automatically learning combinatorial interactions among histone modification marks using CNN (called DeepChrome [29]). DeepChrome outperformed all previous methods (see Supplementary) on this task and used a class optimization-based technique for visualizing the learned model. However, this class-level visualization lacks the necessary granularity to understand the signals from multiple chromatin marks at the individual gene level. Table 1 compares previous learning studies on the same task with AttentiveChrome across seven desirable model properties. The columns indicate properties (1) whether the study has a unified end-to-end architecture or not, (2) if it captures non-linearity among features, (3) how has the bin information been incorporated, (4) if representation of features is modeled on local and (5) global scales, (6) whether gene expression prediction is provided, (7) if combinatorial interactions among histone modifications are modeled, and finally (8) if the model is interpretable. AttentiveChrome is the only model that exhibits all seven properties. Additionally, Section 5 compares the attention weights from AttentiveChrome with the visualization from "saliency map" and "class optimization." Using the correlation to one additional HM mark from REMC, we show that AttentiveChrome provides better interpretation and validation. 5 Experiments and Results Dataset: Following DeepChrome [29], we downloaded gene expression levels and signal data of five core HM marks for 56 different cell types archived by the REMC database [18]. Each dataset contains information about both the location and the signal intensity for a mark measured across the whole genome. The selected five core HM marks have been uniformly profiled across all 56 cell types in the REMC study [18]. These five HM marks include (we rename these HMs in our analysis for readability): H3K27me3 as HreprA, H3K36me3 as Hstruct, H3K4me1 as Henhc, H3K4me3 as Hprom, and H3K9me3 as HreprB. HMs HreprA and HreprB are known to repress the gene expression, Hprom activates gene expression, Hstruct is found over the gene body, and Henhc sometimes helps in activating gene expression. Details of the Dataset: We divided the 10, 000 base pair DNA region (+/ −5000 bp) around the transcription start site (TSS) of each gene into bins, with each bin containing 100 continuous bp). For each gene in a specific celltype, the feature generation process generated a 5 × 100 matrix, X, where columns represent T(= 100) different bins and rows represent M(= 5) HMs. For each cell type, the gene expression has been quantified for all annotated genes in the human genome and has been normalized. As previously mentioned, we formulated the task of gene expression prediction as a binary classification task. Following [7], we used the median gene expression across all genes for a particular cell type as the threshold to discretize expression values. For each cell type, we divided 6 Table 2: AUC score performances for different variations of AttentiveChrome and baselines Baselines AttentiveChrome Variations Model DeepChrome (CNN) [29] LSTM CNNAttn CNNα, β LSTMAttn LSTMα LSTMα, β Mean 0.8008 0.8052 0.7622 0.7936 0.8100 0.8133 0.8115 Median 0.8009 0.8036 0.7617 0.7914 0.8118 0.8143 0.8123 Max 0.9225 0.9185 0.8707 0.9059 0.9155 0.9218 0.9177 Min 0.6854 0.7073 0.6469 0.7001 0.7237 0.7250 0.7215 Improvement over DeepChrome [29] 36 0 16 49 50 49 (out of 56 cell types) our set of 19,802 gene samples into three separate, but equal-size folds for training (6601 genes), validation (6601 genes), and testing (6600 genes) respectively. Model Variations and Two Baselines: In Section 3, we introduced three main components of AttentiveChrome to handle the task of predicting gene expression from HM marks: LSTMs, attention mechanisms, and hierarchical attention. To investigate the performance of these components, our experiments compare multiple AttentiveChrome model variations plus two standard baselines. • DeepChrome [29]: The temporal (1-D) CNN model used by Singh et al. [29] for the same classification task. This study did not consider the modular property of HM marks. • LSTM: We directly apply an LSTM on the input matrix X without adding any attention. This setup does not consider the modular property of each HM mark, that is, we treat the signals of all HMs at t-th bin position as the t-th input to LSTM. • LSTM-Attn: We add one attention layer on the baseline LSTM model over input X. This setup does not consider the modular property of HM marks. • CNN-Attn: We apply one attention layer over the CNN model from DeepChrome [29], after removing the max-pooling layer to allow bin-level attention for each bin. This setup does not consider the modular property of HM marks. • LSTM-α, β: As introduced in Section 3, this model uses one LSTM per HM mark and add one α-attention per mark. Then it uses another level of LSTM and β-attention to combine HMs. • CNN-α, β: This considers the modular property among HM marks. We apply one CNN per HM mark and add one α-attention per mark. Then it uses another level of CNN and β-attention to combine HMs. • LSTM-α: This considers the modular property of HM marks. We apply one LSTM per HM mark and add one α-attention per mark. Then, the embedding of HM marks is concatenated as one long vector and then fed to a 2-layer fully connected MLP. We use datasets across 56 cell types, comparing the above methods over each of the 56 different tasks. Model Hyperparameters: For AttentiveChrome variations, we set the bin-level LSTM embedding size d to 32 and the HM-level LSTM embedding size as 16. Since we implement a bi-directional LSTM, this results in each embedding vector ht as size 64 and embedding vector mj as size 32. Therefore, we set the context vectors, Wb and Ws, to size 64 and 32 respectively.7 Performance Evaluation: Table 2 compares different variations of AttentiveChrome using summarized AUC scores across all 56 cell types on the test set. We find that overall the LSTM-attention based models perform better than CNN-based and LSTM baselines. CNN-attention model gives worst performance. To add the bin-level attention layer to the CNN model, we removed the max-pooling layer. We hypothesize that the absence of max-pooling is the cause behind its low performance. LSTM-α has better empirical performance than the LSTM-α, β model. We recommend the use of the proposed AttentiveChrome LSTM-α, β (from here on referred to as AttentiveChrome) for hypothesis generation because it provides a good trade-off between AUC and interpretability. Also, while the performance improvement over DeepChrome [29] is not large, AttentiveChrome is better as it allows interpretability to the "black box" neural networks. 7We can view Wb as 1 × 64 matrix. 7 Table 3: Pearson Correlation values between weights assigned for Hprom (active HM) by different visualization techniques and Hactive read coverage (indicating actual activity near "ON" genes) for predicted "ON" genes across three major cell types. Viz. Methods H1-hESC GM12878 K562 α Map (LSTM-α) 0.8523 0.8827 0.9147 α Map (LSTM-α, β) 0.8995 0.8456 0.9027 Class-based Optimization (CNN) 0.0562 0.1741 0.1116 Saliency Map (CNN) 0.1822 -0.1421 0.2238 Using Attention Scores for Interpretation: Unlike images and text, the results for biology are hard to interpret by just looking at them. Therefore, we use additional evidence from REMC as well as introducing a new strategy to qualitatively and quantitatively evaluate the bin-level attention weights or α-map LSTM-α model and AttentiveChrome. To specifically validate that the model is focusing its attention at the right bins, we use the read counts of a new HM signal - H3K27ac from REMC database. We represent this HM as Hactive because this HM marks the region that is active when the gene is “ON". H3K27ac is an important indication of activity in the DNA regions and is a good source to validate the results. We did not include H3K27ac Mark as input because it has not been profiled for all 56 cell types we used for prediction. However, the genome-wide reads of this HM mark are available for three important cell types in the blood lineage: H1-hESC (stem cell), GM12878 (blood cell), and K562 (leukemia cell). We, therefore, chose to compare and validate interpretation in these three cell types. This HM signal has not been used at any stage of the model training or testing. We use it solely to analyze the visualization results. We use the average read counts of Hactive across all 100 bins and for all the active genes (gene=ON) in the three selected cell types to compare different visualization methods. We compare the attention α-maps of the best performing LSTM-α and AttentiveChrome models with the other two popular visualization techniques: (1) the Class-based optimization method and (2) the Saliency map applied on the baseline DeepChrome-CNN model. We take the importance weights calculated by all visualization methods for our active input mark, Hprom, across 100 bins and then calculate their Pearson correlation to Hactive counts across the same 100 bins. Hactive counts indicate the actual active regions. Table 3 reports the correlation coefficients between Hprom weights and read coverage of Hactive. We observe that attention weights from our models consistently achieve the highest correlation with the actual active regions near the gene, indicating that this method can capture the important signals for predicting gene activity. Interestingly, we observe that the saliency map on the DeepChrome achieves a higher correlation with Hactive than the Class-based optimization method for two cell types: H1-hESC (stem cell) and K562 (leukemia cell). Next, we obtain the attention weights learned by AttentionChrome, representing the important bins and HMs for each prediction of a particular gene as ON or OFF. For a specific gene sample, we can visualize and inspect the bin-level and HM-level attention vectors αj t and βj generated by AttentionChrome. In Figure 2(a), we plot the average bin-level attention weights for each HM for cell type GM12878 (blood cell) by averaging α-maps of all predicted “ON" genes (top) and “OFF" genes (bottom). We see that on average for “ON" genes, the attention profiles near the TSS region are well defined for Hprom, Henhc, and Hstruct. On the contrary, the weights are low and close to uniform for HreprA and HreprB. This average trend reverses for “OFF" genes in which HreprA and HreprB seem to gain more importance over Hprom, Henhc, and Hstruct. These observations make sense biologically as Hprom, Henhc, and Hstruct are known to encourage gene activation while HreprA and HreprB are known to repress the genes 8. On average, while Hprom is concentrated near the TSS region, other HMs like Hstruct show a broader distribution away from the TSS. In summary, the importance of each HM and its position varies across different genes. E.g., Henhc can affect a gene from a distant position. In Figure 2(b), we plot the average read coverage of Hactive (top) for the same 100 bins, that we used for input signals, across all the active genes (gene=ON) for GM12878 cell type. We also plot the bin-level attention weights αj t for AttentiveChrome (bottom) averaged over all genes predicted as ON for GM12878. Visually, we can tell that the average Hprom profile is similar to Hactive. This 8The small dips at the TSS in both subfigures of Figure 2(a) are caused by missing signals at the TSS due to the inherent nature of the sequencing experiments. 8 0 0 1 Bins (t) Genes=ON 0 20 40 60 80 100 TSS TSS Bins (t) Read Coverage of Hactive Map 0 20 40 60 80 100 0.0 0.2 0.4 0.6 0.8 1.0 0 20 40 60 80 100 0.0 0.2 0.4 0.6 0.8 1.0 Bins (t) Avg. Attention Weights Bins (t) Avg. Attention Weights (b) (a) HreprA Hstruct Henhc Hprom HreprB Genes=ON Genes=OFF Cell Type: GM12878 TSS TSS H1-hESC GM12878 K562 Gene = OFF ON OFF (c) HreprA Hstruct Henhc Hprom HreprB Maps Gene: PAX5 0.008 0.014 0.010 0.012 0 20 40 60 80 100 Attention Weights Hactive HreprA Hstruct Henhc Hprom HreprB Figure 2: (Best viewed in color) (a) Bin-level attention weights (αj t) from AttentiveChrome averaged for all genes when predicting gene=ON and gene=OFF in GM12878 cell type. (b) Top: Cumulative Hactive signal across all active genes. Bottom: Plot of the bin-level attention weights (αj t). These weights are averaged for gene=ON predictions. Hprom weights are concentrated near the TSS and corresponds well with the Hactive indicating actual activity near the gene. This indicates that AttentiveChrome is focusing on the correct bin positions for this case (c) Heatmaps visualizing the HM-level weights (βj), with j ∈{1, ..., 5} for an important differentially regulated gene (PAX5) across three blood lineage cell types: H1-hESC (stem cell), GM12878 (blood cell), and K562 (leukemia cell). The trend of HM-level βj weights for PAX5 have been verified through biological literature. observation makes sense because Hprom is related to active regions for “ON" genes. Thus, validating our results from Table 3. Finally in Figure 2(c) we demonstrate the advantage of AttentiveChrome over LSTM-α model by printing out the βj weights for genes with differential expressions across the three cell types. That is, we select genes with varying ON(+1)/OFF(−1) states across the three chosen cell types using a heatmap. Figure 2(c) visualizes the βj weights for a certain differentially regulated gene, PAX5. PAX5 is critical for the gene regulation when stem cells convert to blood cells ([25]). This gene is OFF in the H1-hESC cell stage (left column) but turns ON when the cell develops into GM12878 cell (middle column). The βj weight of repressor mark HreprA is high when gene=OFF in H1-hESC (left column). This same weight decreases when gene=ON in GM12878 (middle column). In contrast, the βj weight of the promoter mark Hprom increases from H1-hESC (left column) to GM12878 (middle column). These trends have been observed in [25] showing that PAX5 relates to the conversion of chromatin states: from a repressive state (Hprom(H3K4me3):−, HreprA(H3K27me3):+) to an active state (Hprom(H3K4me3):+, HreprA(H3K27me3):−). This example shows that our βj weights visualize how different HMs work together to influence a gene’s state (ON/OFF). We would like to emphasize that the attention weights on both bin-level (α-map) and HM-level (β-map) are gene (i.e. sample) specific. The proposed AttentiveChrome model provides an opportunity for a plethora of downstream analyses that can help us understand the epigenomic mechanisms better. Besides, relevant datasets are big and noisy. A predictive model that automatically selects and visualizes essential features can significantly reduce the potential manual costs. 6 Conclusion We have presented AttentiveChrome, an attention-based deep-learning approach that handles prediction and understanding in one architecture. The advantages of this work include: • AttentiveChrome provides more accurate predictions than state-of-the-art baselines (Table 2). • The attention scores of AttentiveChrome provide a better interpretation than saliency map and class optimization (Table 3). This allows us to view what the model ‘sees’ when making its prediction. • AttentiveChrome can model highly modular feature inputs in which each is sequentially structured. • To the authors’ best knowledge, AttentiveChrome is the first implementation of deep attention mechanism for understanding data about gene regulation. We can gain insights and understand the predictions by locating ‘what’ and ‘where’ AttentiveChrome has focused (Figure 2). Many real-world applications are seeking such knowledge from data. 9 References [1] Babak Alipanahi, Andrew Delong, Matthew T Weirauch, and Brendan J Frey. Predicting the sequence specificities of dna-and rna-binding proteins by deep learning. Nature Publishing Group, 2015. [2] Jimmy Ba, Volodymyr Mnih, and Koray Kavukcuoglu. Multiple object recognition with visual attention. [3] David Baehrens, Timon Schroeter, Stefan Harmeling, Motoaki Kawanabe, Katja Hansen, and Klaus-Robert MÞller. How to explain individual classification decisions. volume 11, pages 1803–1831, 2010. [4] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. [5] Andrew J Bannister and Tony Kouzarides. Regulation of chromatin by histone modifications. Cell research, 21(3):381–395, 2011. [6] Joanna Boros, Nausica Arnoult, Vincent Stroobant, Jean-François Collet, and Anabelle Decottignies. Polycomb repressive complex 2 and h3k27me3 cooperate with h3k9 methylation to maintain heterochromatin protein 1α at chromatin. Molecular and cellular biology, 34(19):3662–3674, 2014. [7] Chao Cheng, Koon-Kiu Yan, Kevin Y Yip, Joel Rozowsky, Roger Alexander, Chong Shou, Mark Gerstein, et al. A statistical framework for modeling gene expression using chromatin features and application to modencode datasets. Genome Biol, 12(2):R15, 2011. [8] Jan K Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio. Attentionbased models for speech recognition. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 577–585. Curran Associates, Inc., 2015. [9] Maurizio Corbetta and Gordon L Shulman. Control of goal-directed and stimulus-driven attention in the brain. Nature reviews neuroscience, 3(3):201–215, 2002. [10] Xianjun Dong, Melissa C Greven, Anshul Kundaje, Sarah Djebali, James B Brown, Chao Cheng, Thomas R Gingeras, Mark Gerstein, Roderic Guigó, Ewan Birney, et al. Modeling gene expression using chromatin features in various cellular contexts. Genome Biol, 13(9):R53, 2012. [11] Xianjun Dong and Zhiping Weng. The correlation between histone modifications and gene expression. Epigenomics, 5(2):113–116, 2013. [12] Bich Hai Ho, Rania Mohammed Kotb Hassen, and Ngoc Tu Le. Combinatorial roles of dna methylation and histone modifications on gene expression. In Some Current Advanced Researches on Information and Computer Science in Vietnam, pages 123–135. Springer, 2015. [13] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. volume 9, pages 1735–1780. MIT Press, 1997. [14] Rosa Karli´c, Ho-Ryun Chung, Julia Lasserre, Kristian Vlahoviˇcek, and Martin Vingron. Histone modification levels are predictive for gene expression. Proceedings of the National Academy of Sciences, 107(7):2926–2931, 2010. [15] Andrej Karpathy, Justin Johnson, and Fei-Fei Li. Visualizing and understanding recurrent networks. 2015. [16] David R Kelley, Jasper Snoek, and John L Rinn. Basset: Learning the regulatory code of the accessible genome with deep convolutional neural networks. Cold Spring Harbor Lab, 2016. [17] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [18] Anshul Kundaje, Wouter Meuleman, Jason Ernst, Misha Bilenky, Angela Yen, Alireza Heravi-Moussavi, Pouya Kheradpour, Zhizhuo Zhang, Jianrong Wang, Michael J Ziller, et al. Integrative analysis of 111 reference human epigenomes. Nature, 518(7539):317–330, 2015. [19] Jack Lanchantin, Ritambhara Singh, Zeming Lin, and Yanjun Qi. Deep motif: Visualizing genomic sequence classifications. 2016. [20] Jack Lanchantin, Ritambhara Singh, Beilun Wang, and Yanjun Qi. Deep motif dashboard: Visualizing and understanding genomic sequences using deep neural networks. arXiv preprint arXiv:1608.03644, 2016. [21] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. volume 86, pages 2278–2324. IEEE, 1998. 10 [22] Jiwei Li, Xinlei Chen, Eduard Hovy, and Dan Jurafsky. Visualizing and understanding neural models in nlp. 2015. [23] Zeming Lin, Jack Lanchantin, and Yanjun Qi. Must-cnn: A multilayer shift-and-stitch deep convolutional architecture for sequence-based protein structure prediction. In Thirtieth AAAI Conference on Artificial Intelligence, 2016. [24] Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attention-based neural machine translation. In Empirical Methods in Natural Language Processing (EMNLP), pages 1412–1421, Lisbon, Portugal, September 2015. Association for Computational Linguistics. [25] Shane McManus, Anja Ebert, Giorgia Salvagiotto, Jasna Medvedovic, Qiong Sun, Ido Tamir, Markus Jaritz, Hiromi Tagoh, and Meinrad Busslinger. The transcription factor pax5 regulates its target genes by recruiting chromatin-modifying proteins in committed b cells. The EMBO journal, 30(12):2388–2404, 2011. [26] Volodymyr Mnih, Nicolas Heess, Alex Graves, and others. Recurrent models of visual attention. In Advances in neural information processing systems, pages 2204–2212. [27] Daniel Quang and Xiaohui Xie. Danq: a hybrid convolutional and recurrent deep neural network for quantifying the function of dna sequences. Nucleic acids research, 44(11):e107–e107, 2016. [28] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. 2013. [29] Ritambhara Singh, Jack Lanchantin, Gabriel Robins, and Yanjun Qi. Deepchrome: deep-learning for predicting gene expression from histone modifications. Bioinformatics, 32(17):i639–i648, 2016. [30] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112, 2014. [31] Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 2692–2700. Curran Associates, Inc., 2015. [32] Huijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In ECCV, 2016. [33] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C Courville, Ruslan Salakhutdinov, Richard S Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, volume 14, pages 77–81, 2015. [34] Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alex Smola, and Eduard Hovy. Hierarchical attention networks for document classification. 2016. [35] Li Yao, Atousa Torabi, Kyunghyun Cho, Nicolas Ballas, Christopher Pal, Hugo Larochelle, and Aaron Courville. Describing videos by exploiting temporal structure. In Computer Vision (ICCV), 2015 IEEE International Conference on. IEEE, 2015. [36] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In Computer Vision–ECCV 2014, pages 818–833. Springer, 2014. [37] Jian Zhou and Olga G Troyanskaya. Deep supervised and convolutional generative stochastic network for protein secondary structure prediction. arXiv preprint arXiv:1403.1347, 2014. [38] Jian Zhou and Olga G Troyanskaya. Predicting effects of noncoding variants with deep learning-based sequence model. volume 12, pages 931–934. Nature Publishing Group, 2015. 11 | 2017 | 550 |
7,064 | Deep Reinforcement Learning from Human Preferences Paul F Christiano OpenAI paul@openai.com Jan Leike DeepMind leike@google.com Tom B Brown Google Brain⇤ tombbrown@google.com Miljan Martic DeepMind miljanm@google.com Shane Legg DeepMind legg@google.com Dario Amodei OpenAI damodei@openai.com Abstract For sophisticated reinforcement learning (RL) systems to interact usefully with real-world environments, we need to communicate complex goals to these systems. In this work, we explore goals defined in terms of (non-expert) human preferences between pairs of trajectory segments. We show that this approach can effectively solve complex RL tasks without access to the reward function, including Atari games and simulated robot locomotion, while providing feedback on less than 1% of our agent’s interactions with the environment. This reduces the cost of human oversight far enough that it can be practically applied to state-of-the-art RL systems. To demonstrate the flexibility of our approach, we show that we can successfully train complex novel behaviors with about an hour of human time. These behaviors and environments are considerably more complex than any which have been previously learned from human feedback. 1 Introduction Recent success in scaling reinforcement learning (RL) to large problems has been driven in domains that have a well-specified reward function (Mnih et al., 2015, 2016; Silver et al., 2016). Unfortunately, many tasks involve goals that are complex, poorly-defined, or hard to specify. Overcoming this limitation would greatly expand the possible impact of deep RL and could increase the reach of machine learning more broadly. For example, suppose that we wanted to use reinforcement learning to train a robot to clean a table or scramble an egg. It’s not clear how to construct a suitable reward function, which will need to be a function of the robot’s sensors. We could try to design a simple reward function that approximately captures the intended behavior, but this will often result in behavior that optimizes our reward function without actually satisfying our preferences. This difficulty underlies recent concerns about misalignment between our values and the objectives of our RL systems (Bostrom, 2014; Russell, 2016; Amodei et al., 2016). If we could successfully communicate our actual objectives to our agents, it would be a significant step towards addressing these concerns. If we have demonstrations of the desired task, we can use inverse reinforcement learning (Ng and Russell, 2000) or imitation learning to copy the demonstrated behavior. But these approaches are not directly applicable to behaviors that are difficult for humans to demonstrate (such as controlling a robot with many degrees of freedom but non-human morphology). ⇤Work done while at OpenAI. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. An alternative approach is to allow a human to provide feedback on our system’s current behavior and to use this feedback to define the task. In principle this fits within the paradigm of reinforcement learning, but using human feedback directly as a reward function is prohibitively expensive for RL systems that require hundreds or thousands of hours of experience. In order to practically train deep RL systems with human feedback, we need to decrease the amount of feedback required by several orders of magnitude. We overcome this difficulty by asking humans to compare possible trajectories of the agent, using that data to learn a reward function, and optimizing the learned reward function with RL. This basic approach has been explored in the past, but we confront the challenges involved in scaling it up to modern deep RL and demonstrate by far the most complex behaviors yet learned from human feedback. Our experiments take place in two domains: Atari games in the Arcade Learning Environment (Bellemare et al., 2013), and robotics tasks in the physics simulator MuJoCo (Todorov et al., 2012). We show that a small amount of feedback from a non-expert human, ranging from fifteen minutes to five hours, suffice to learn both standard RL tasks and novel hard-to-specify behaviors such as performing a backflip or driving with the flow of traffic. 1.1 Related Work A long line of work studies reinforcement learning from human ratings or rankings, including Akrour et al. (2011), Pilarski et al. (2011), Akrour et al. (2012), Wilson et al. (2012), Sugiyama et al. (2012), Wirth and Fürnkranz (2013), Daniel et al. (2015), El Asri et al. (2016), Wang et al. (2016), and Wirth et al. (2016). Other lines of research consider the general problem of reinforcement learning from preferences rather than absolute reward values (Fürnkranz et al., 2012; Akrour et al., 2014; Wirth et al., 2016), and optimizing using human preferences in settings other than reinforcement learning (Machwe and Parmee, 2006; Secretan et al., 2008; Brochu et al., 2010; Sørensen et al., 2016). Our algorithm follows the same basic approach as Akrour et al. (2012) and Akrour et al. (2014), but considers much more complex domains and behaviors. The complexity of our environments force us to use different RL algorithms, reward models, and training strategies. One notable difference is that Akrour et al. (2012) and Akrour et al. (2014) elicit preferences over whole trajectories rather than short clips, and so would require about an order of magnitude more human time per data point. Our approach to feedback elicitation closely follows Wilson et al. (2012). However, Wilson et al. (2012) assumes that the reward function is the distance to some unknown (linear) “target” policy, and is never tested with real human feedback. TAMER (Knox, 2012; Knox and Stone, 2013) also learns a reward function from human feedback, but learns from ratings rather than comparisons, has the human observe the agent as it behaves, and has been applied to settings where the desired policy can be learned orders of magnitude more quickly. Compared to all prior work, our key contribution is to scale human feedback up to deep reinforcement learning and to learn much more complex behaviors. This fits into a recent trend of scaling reward learning methods to large deep learning systems, for example inverse RL (Finn et al., 2016), imitation learning (Ho and Ermon, 2016; Stadie et al., 2017), semi-supervised skill generalization (Finn et al., 2017), and bootstrapping RL from demonstrations (Silver et al., 2016; Hester et al., 2017). 2 Preliminaries and Method 2.1 Setting and Goal We consider an agent interacting with an environment over a sequence of steps; at each time t the agent receives an observation ot 2 O from the environment and then sends an action at 2 A to the environment. In traditional reinforcement learning, the environment would also supply a reward rt 2 R and the agent’s goal would be to maximize the discounted sum of rewards. Instead of assuming that the environment produces a reward signal, we assume that there is a human overseer who can express 2 preferences between trajectory segments. A trajectory segment is a sequence of observations and actions, σ = ((o0, a0), (o1, a1), . . . , (ok−1, ak−1)) 2 (O ⇥A)k. Write σ1 ≻σ2 to indicate that the human preferred trajectory segment σ1 to trajectory segment σ2. Informally, the goal of the agent is to produce trajectories which are preferred by the human, while making as few queries as possible to the human. More precisely, we will evaluate our algorithms’ behavior in two ways: Quantitative: We say that preferences ≻are generated by a reward function2 r : O ⇥A ! R if !! o1 0, a1 0 " , . . . , ! o1 k−1, a1 k−1 "" ≻ !! o2 0, a2 0 " , . . . , ! o2 k−1, a2 k−1 "" whenever r ! o1 0, a1 0 " + · · · + r ! o1 k−1, a1 k−1 " > r ! o2 0, a2 0 " + · · · + r ! o2 k−1, a2 k−1 " . If the human’s preferences are generated by a reward function r, then our agent ought to receive a high total reward according to r. So if we know the reward function r, we can evaluate the agent quantitatively. Ideally the agent will achieve reward nearly as high as if it had been using RL to optimize r. Qualitative: Sometimes we have no reward function by which we can quantitatively evaluate behavior (this is the situation where our approach would be practically useful). In these cases, all we can do is qualitatively evaluate how well the agent satisfies the human’s preferences. In this paper, we will start from a goal expressed in natural language, ask a human to evaluate the agent’s behavior based on how well it fulfills that goal, and then present videos of agents attempting to fulfill that goal. Our model based on trajectory segment comparisons is very similar to the trajectory preference queries used in Wilson et al. (2012), except that we don’t assume that we can reset the system to an arbitrary state3 and so our segments generally begin from different states. This complicates the interpretation of human comparisons, but we show that our algorithm overcomes this difficulty even when the human raters have no understanding of our algorithm. 2.2 Our Method At each point in time our method maintains a policy ⇡: O ! A and a reward function estimate ˆr : O ⇥A ! R, each parametrized by deep neural networks. These networks are updated by three processes: 1. The policy ⇡interacts with the environment to produce a set of trajectories {⌧1, . . . , ⌧i}. The parameters of ⇡are updated by a traditional reinforcement learning algorithm, in order to maximize the sum of the predicted rewards rt = ˆr(ot, at). 2. We select pairs of segments ! σ1, σ2" from the trajectories {⌧1, . . . , ⌧i} produced in step 1, and send them to a human for comparison. 3. The parameters of the mapping ˆr are optimized via supervised learning to fit the comparisons collected from the human so far. These processes run asynchronously, with trajectories flowing from process (1) to process (2), human comparisons flowing from process (2) to process (3), and parameters for ˆr flowing from process (3) to process (1). The following subsections provide details on each of these processes. 2Here we assume here that the reward is a function of the observation and action. In our experiments in Atari environments, we instead assume the reward is a function of the preceding 4 observations. In a general partially observable environment, we could instead consider reward functions that depend on the whole sequence of observations, and model this reward function with a recurrent neural network. 3Wilson et al. (2012) also assumes the ability to sample reasonable initial states. But we work with high dimensional state spaces for which random states will not be reachable and the intended policy inhabits a low-dimensional manifold. 3 2.2.1 Optimizing the Policy After using ˆr to compute rewards, we are left with a traditional reinforcement learning problem. We can solve this problem using any RL algorithm that is appropriate for the domain. One subtlety is that the reward function ˆr may be non-stationary, which leads us to prefer methods which are robust to changes in the reward function. This led us to focus on policy gradient methods, which have been applied successfully for such problems (Ho and Ermon, 2016). In this paper, we use advantage actor-critic (A2C; Mnih et al., 2016) to play Atari games, and trust region policy optimization (TRPO; Schulman et al., 2015) to perform simulated robotics tasks. In each case, we used parameter settings which have been found to work well for traditional RL tasks. The only hyperparameter which we adjusted was the entropy bonus for TRPO. This is because TRPO relies on the trust region to ensure adequate exploration, which can lead to inadequate exploration if the reward function is changing. We normalized the rewards produced by ˆr to have zero mean and constant standard deviation. This is a typical preprocessing step which is particularly appropriate here since the position of the rewards is underdetermined by our learning problem. 2.2.2 Preference Elicitation The human overseer is given a visualization of two trajectory segments, in the form of short movie clips. In all of our experiments, these clips are between 1 and 2 seconds long. The human then indicates which segment they prefer, that the two segments are equally good, or that they are unable to compare the two segments. The human judgments are recorded in a database D of triples ! σ1, σ2, µ " , where σ1 and σ2 are the two segments and µ is a distribution over {1, 2} indicating which segment the user preferred. If the human selects one segment as preferable, then µ puts all of its mass on that choice. If the human marks the segments as equally preferable, then µ is uniform. Finally, if the human marks the segments as incomparable, then the comparison is not included in the database. 2.2.3 Fitting the Reward Function We can interpret a reward function estimate ˆr as a preference-predictor if we view ˆr as a latent factor explaining the human’s judgments and assume that the human’s probability of preferring a segment σi depends exponentially on the value of the latent reward summed over the length of the clip:4 ˆP ⇥ σ1 ≻σ2⇤ = exp P ˆr ! o1 t, a1 t " exp P ˆr(o1 t, a1 t) + exp P ˆr(o2 t, a2 t). (1) We choose ˆr to minimize the cross-entropy loss between these predictions and the actual human labels: loss(ˆr) = − X (σ1,σ2,µ)2D µ(1) log ˆP ⇥ σ1 ≻σ2⇤ + µ(2) log ˆP ⇥ σ2 ≻σ1⇤ . This follows the Bradley-Terry model (Bradley and Terry, 1952) for estimating score functions from pairwise preferences, and is the specialization of the Luce-Shephard choice rule (Luce, 2005; Shepard, 1957) to preferences over trajectory segments. Our actual algorithm incorporates a number of modifications to this basic approach, which early experiments discovered to be helpful and which are analyzed in Section 3.3: • We fit an ensemble of predictors, each trained on |D| triples sampled from D with replacement. The estimate ˆr is defined by independently normalizing each of these predictors and then averaging the results. • A fraction of 1/e of the data is held out to be used as a validation set for each predictor. We use `2 regularization and adjust the regularization coefficient to keep the validation loss between 1.1 and 1.5 times the training loss. In some domains we also apply dropout for regularization. 4Equation 1 does not use discounting, which could be interpreted as modeling the human to be indifferent about when things happen in the trajectory segment. Using explicit discounting or inferring the human’s discount function would also be reasonable choices. 4 • Rather than applying a softmax directly as described in Equation 1, we assume there is a 10% chance that the human responds uniformly at random. Conceptually this adjustment is needed because human raters have a constant probability of making an error, which doesn’t decay to 0 as the difference in reward difference becomes extreme. 2.2.4 Selecting Queries We decide how to query preferences based on an approximation to the uncertainty in the reward function estimator, similar to Daniel et al. (2014): we sample a large number of pairs of trajectory segments of length k from the latest agent-environment interactions, use each reward predictor in our ensemble to predict which segment will be preferred from each pair, and then select those trajectories for which the predictions have the highest variance across ensemble members5 This is a crude approximation and the ablation experiments in Section 3 show that in some tasks it actually impairs performance. Ideally, we would want to query based on the expected value of information of the query (Akrour et al., 2012; Krueger et al., 2016), but we leave it to future work to explore this direction further. 3 Experimental Results We implemented our algorithm in TensorFlow (Abadi et al., 2016). We interface with MuJoCo (Todorov et al., 2012) and the Arcade Learning Environment (Bellemare et al., 2013) through the OpenAI Gym (Brockman et al., 2016). 3.1 Reinforcement Learning Tasks with Unobserved Rewards In our first set of experiments, we attempt to solve a range of benchmark tasks for deep RL without observing the true reward. Instead, the agent learns about the goal of the task only by asking a human which of two trajectory segments is better. Our goal is to solve the task in a reasonable amount of time using as few queries as possible. In our experiments, feedback is provided by contractors who are given a 1-2 sentence description of each task before being asked to compare several hundred to several thousand pairs of trajectory segments for that task (see Appendix B for the exact instructions given to contractors). Each trajectory segment is between 1 and 2 seconds long. Contractors responded to the average query in 3-5 seconds, and so the experiments involving real human feedback required between 30 minutes and 5 hours of human time. For comparison, we also run experiments using a synthetic oracle whose preferences are generated (in the sense of Section 2.1) by the real reward6. We also compare to the baseline of RL training using the real reward. Our aim here is not to outperform but rather to do nearly as well as RL without access to reward information and instead relying on much scarcer feedback. Nevertheless, note that feedback from real humans does have the potential to outperform RL (and as shown below it actually does so on some tasks), because the human feedback might provide a better-shaped reward. We describe the details of our experiments in Appendix A, including model architectures, modifications to the environment, and the RL algorithms used to optimize the policy. 3.1.1 Simulated Robotics The first tasks we consider are eight simulated robotics tasks, implemented in MuJoCo (Todorov et al., 2012), and included in OpenAI Gym (Brockman et al., 2016). We made small modifications to these tasks in order to avoid encoding information about the task in the environment itself (the modifications are described in detail in Appendix A). The reward functions in these tasks are quadratic functions of distances, positions and velocities, and most are linear. We included a simple cartpole 5Note that trajectory segments almost never start from the same state. 6In the case of Atari games with sparse rewards, it is relatively common for two clips to both have zero reward in which case the oracle outputs indifference. Because we considered clips rather than individual states, such ties never made up a large majority of our data. Moreover, ties still provide significant information to the reward predictor as long as they are not too common. 5 Figure 1: Results on MuJoCo simulated robotics as measured on the tasks’ true reward. We compare our method using real human feedback (purple), our method using synthetic feedback provided by an oracle (shades of blue), and reinforcement learning using the true reward function (orange). All curves are the average of 5 runs, except for the real human feedback, which is a single run, and each point is the average reward over five consecutive batches. For Reacher and Cheetah feedback was provided by an author due to time constraints. For all other tasks, feedback was provided by contractors unfamiliar with the environments and with our algorithm. The irregular progress on Hopper is due to one contractor deviating from the typical labeling schedule. task (“pendulum”) for comparison, since this is representative of the complexity of tasks studied in prior work. Figure 1 shows the results of training our agent with 700 queries to a human rater, compared to learning from 350, 700, or 1400 synthetic queries, as well as to RL learning from the real reward. With 700 labels we are able to nearly match reinforcement learning on all of these tasks. Training with learned reward functions tends to be less stable and higher variance, while having a comparable mean performance. Surprisingly, by 1400 labels our algorithm performs slightly better than if it had simply been given the true reward, perhaps because the learned reward function is slightly better shaped—the reward learning procedure assigns positive rewards to all behaviors that are typically followed by high reward. The difference may also be due to subtle changes in the relative scale of rewards or our use of entropy regularization. Real human feedback is typically only slightly less effective than the synthetic feedback; depending on the task human feedback ranged from being half as efficient as ground truth feedback to being equally efficient. On the Ant task the human feedback significantly outperformed the synthetic feedback, apparently because we asked humans to prefer trajectories where the robot was “standing upright,” which proved to be useful reward shaping. (There was a similar bonus in the RL reward function to encourage the robot to remain upright, but the simple hand-crafted bonus was not as useful.) 3.1.2 Atari The second set of tasks we consider is a set of seven Atari games in the Arcade Learning Environment (Bellemare et al., 2013), the same games presented in Mnih et al., 2013. Figure 2 shows the results of training our agent with 5,500 queries to a human rater, compared to learning from 350, 700, or 1400 synthetic queries, as well as to RL learning from the real reward. Our method has more difficulty matching RL in these challenging environments, but nevertheless it displays substantial learning on most of them and matches or even exceeds RL on some. Specifically, 6 Figure 2: Results on Atari games as measured on the tasks’ true reward. We compare our method using real human feedback (purple), our method using synthetic feedback provided by an oracle (shades of blue), and reinforcement learning using the true reward function (orange). All curves are the average of 3 runs, except for the real human feedback which is a single run, and each point is the average reward over about 150,000 consecutive frames. on BeamRider and Pong, synthetic labels match or come close to RL even with only 3,300 such labels. On Seaquest and Qbert synthetic feedback eventually performs near the level of RL but learns more slowly. On SpaceInvaders and Breakout synthetic feedback never matches RL, but nevertheless the agent improves substantially, often passing the first level in SpaceInvaders and reaching a score of 20 on Breakout, or 50 with enough labels. On most of the games real human feedback performs similar to or slightly worse than synthetic feedback with the same number of labels, and often comparably to synthetic feedback that has 40% fewer labels. On Qbert, our method fails to learn to beat the first level with real human feedback; this may be because short clips in Qbert can be confusing and difficult to evaluate. Finally, Enduro is difficult for A3C to learn due to the difficulty of successfully passing other cars through random exploration, and is correspondingly difficult to learn with synthetic labels, but human labelers tend to reward any progress towards passing cars, essentially shaping the reward and thus outperforming A3C in this game (the results are comparable to those achieved with DQN). 3.2 Novel behaviors Experiments with traditional RL tasks help us understand whether our method is effective, but the ultimate purpose of human interaction is to solve tasks for which no reward function is available. Using the same parameters as in the previous experiments, we show that our algorithm can learn novel complex behaviors. We demonstrate: 1. The Hopper robot performing a sequence of backflips (see Figure 4). This behavior was trained using 900 queries in less than an hour. The agent learns to consistently perform a backflip, land upright, and repeat. 2. The Half-Cheetah robot moving forward while standing on one leg. This behavior was trained using 800 queries in under an hour. 3. Keeping alongside other cars in Enduro. This was trained with roughly 1,300 queries and 4 million frames of interaction with the environment; the agent learns to stay almost exactly even with other moving cars for a substantial fraction of the episode, although it gets confused by changes in background. 7 Figure 3: Performance of our algorithm on MuJoCo tasks after removing various components, as described in Section Section 3.3. All graphs are averaged over 5 runs, using 700 synthetic labels each. Videos of these behaviors can be found at https://goo.gl/MhgvIU. These behaviors were trained using feedback from the authors. 3.3 Ablation Studies In order to better understand the performance of our algorithm, we consider a range of modifications: 1. We pick queries uniformly at random rather than prioritizing queries for which there is disagreement (random queries). 2. We train only one predictor rather than an ensemble (no ensemble). In this setting, we also choose queries at random, since there is no longer an ensemble that we could use to estimate disagreement. 3. We train on queries only gathered at the beginning of training, rather than gathered throughout training (no online queries). 4. We remove the `2 regularization and use only dropout (no regularization). 5. On the robotics tasks only, we use trajectory segments of length 1 (no segments). 6. Rather than fitting ˆr using comparisons, we consider an oracle which provides the true total reward over a trajectory segment, and fit ˆr to these total rewards using mean squared error (target). The results are presented in Figure 3 for MuJoCo and Figure 4 for Atari. Training the reward predictor offline can lead to bizarre behavior that is undesirable as measured by the true reward (Amodei et al., 2016). For instance, on Pong offline training sometimes leads our agent to avoid losing points but not to score points; this can result in extremely long volleys (videos at https://goo.gl/L5eAbk). This type of behavior demonstrates that in general human feedback needs to be intertwined with RL rather than provided statically. Our main motivation for eliciting comparisons rather than absolute scores was that we found it much easier for humans to provide consistent comparisons than consistent absolute scores, especially on the continuous control tasks and on the qualitative tasks in Section 3.2; nevertheless it seems important to understand how using comparisons affects performance. For continuous control tasks we found that predicting comparisons worked much better than predicting scores. This is likely because the scale of rewards varies substantially and this complicates the regression problem, which is smoothed significantly when we only need to predict comparisons. In the Atari tasks we clipped rewards 8 Figure 4: Performance of our algorithm on Atari tasks after removing various components, as described in Section 3.3. All curves are an average of 3 runs using 5,500 synthetic labels (see minor exceptions in Section A.2). and effectively only predicted the sign, avoiding these difficulties (this is not a suitable solution for the continuous control tasks because the magnitude of the reward is important to learning). In these tasks comparisons and targets had significantly different performance, but neither consistently outperformed the other. We also observed large performance differences when using single frames rather than clips.7 In order to obtain the same results using single frames we would need to have collected significantly more comparisons. In general we discovered that asking humans to compare longer clips was significantly more helpful per clip, and significantly less helpful per frame. Shrinking the clip length below 1-2 seconds did not significantly decrease the human time required to label each clip in early experiments, and so seems less efficient per second of human time. In the Atari environments we also found that it was often easier to compare longer clips because they provide more context than single frames. 4 Discussion and Conclusions Agent-environment interactions are often radically cheaper than human interaction. We show that by learning a separate reward model using supervised learning, it is possible to reduce the interaction complexity by roughly 3 orders of magnitude. Although there is a large literature on preference elicitation and reinforcement learning from unknown reward functions, we provide the first evidence that these techniques can be economically scaled up to state-of-the-art reinforcement learning systems. This represents a step towards practical applications of deep RL to complex real-world tasks. In the long run it would be desirable to make learning a task from human preferences no more difficult than learning it from a programmatic reward signal, ensuring that powerful RL systems can be applied in the service of complex human values rather than low-complexity goals. Acknowledgments We thank Olivier Pietquin, Bilal Piot, Laurent Orseau, Pedro Ortega, Victoria Krakovna, Owain Evans, Andrej Karpathy, Igor Mordatch, and Jack Clark for reading drafts of the paper. We thank Tyler Adkisson, Mandy Beri, Jessica Richards, Heather Tran, and other contractors for providing the 7We only ran these tests on continuous control tasks because our Atari reward model depends on a sequence of consecutive frames rather than a single frame, as described in Section A.2 9 | 2017 | 551 |
7,065 | Subset Selection under Noise Chao Qian1 Jing-Cheng Shi2 Yang Yu2 Ke Tang3,1 Zhi-Hua Zhou2 1Anhui Province Key Lab of Big Data Analysis and Application, USTC, China 2National Key Lab for Novel Software Technology, Nanjing University, China 3Shenzhen Key Lab of Computational Intelligence, SUSTech, China chaoqian@ustc.edu.cn tangk3@sustc.edu.cn {shijc,yuy,zhouzh}@lamda.nju.edu.cn Abstract The problem of selecting the best k-element subset from a universe is involved in many applications. While previous studies assumed a noise-free environment or a noisy monotone submodular objective function, this paper considers a more realistic and general situation where the evaluation of a subset is a noisy monotone function (not necessarily submodular), with both multiplicative and additive noises. To understand the impact of the noise, we firstly show the approximation ratio of the greedy algorithm and POSS, two powerful algorithms for noise-free subset selection, in the noisy environments. We then propose to incorporate a noise-aware strategy into POSS, resulting in the new PONSS algorithm. We prove that PONSS can achieve a better approximation ratio under some assumption such as i.i.d. noise distribution. The empirical results on influence maximization and sparse regression problems show the superior performance of PONSS. 1 Introduction Subset selection is to select a subset of size at most k from a total set of n items for optimizing some objective function f, which arises in many applications, such as maximum coverage [10], influence maximization [16], sparse regression [17], ensemble pruning [23], etc. Since it is generally NPhard [7], much effort has been devoted to the design of polynomial-time approximation algorithms. The greedy algorithm is most favored for its simplicity, which iteratively chooses one item with the largest immediate benefit. Despite the greedy nature, it can perform well in many cases. For a monotone submodular objective function f, it achieves the (1 −1/e)-approximation ratio, which is optimal in general [18]; for sparse regression where f can be non-submodular, it has the best-so-far approximation bound 1 −e−γ [6], where γ is the submodularity ratio. Recently, a new approach Pareto Optimization for Subset Selection (POSS) has been shown superior to the greedy algorithm [21, 24]. It reformulates subset selection with two simultaneous objectives, i.e., optimizing the given objective and minimizing the subset size, and employs a randomized iterative algorithm to solve this bi-objective problem. POSS is proved to achieve the same general approximation guarantee as the greedy algorithm, and is shown better on some subclasses [5]. The Pareto optimization method has also been successfully applied to solve subset selection with general cost constraints [20] as well as ratio optimization of monotone set functions [22]. Most of the previous studies assumed that the objective function is noise-free. However, we can only have a noisy evaluation in many realistic applications. For examples, for influence maximization, computing the influence spread objective is #P-hard [2], and thus is often estimated by simulating the random diffusion process [16], which brings noise; for sparse regression, only a set of limited data can be used for evaluation, which makes the evaluation noisy; and more examples include maximizing information gain in graphical models [4], crowdsourced image collection summarization [26], etc. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. To the best of our knowledge, only a few studies addressing noisy subset selection have been reported, which assumed monotone submodular objective functions. Under the general multiplicative noise model (i.e., the noisy objective value F(X) is in the range of (1 ± ϵ)f(X)), it was proved that no polynomial-time algorithm can achieve a constant approximation ratio for any ϵ > 1/√n, while the greedy algorithm can achieve a (1 −1/e −16δ)-approximation ratio for ϵ = δ/k as long as δ < 1 [14]. By assuming that F(X) is a random variable (i.e., random noise) and the expectation of F(X) is the true value f(X), it was shown that the greedy algorithm can achieve nearly a (1 −1/e)approximation guarantee via uniform sampling [16] or adaptive sampling [26]. Recently, Hassidim and Singer [13] considered the consistent random noise model, where for each subset X, only the first evaluation is a random draw from the distribution of F(X) and the other evaluations return the same value. For some classes of noise distribution, they provided polynomial-time algorithms with constant approximations. In this paper, we consider a more general situation, i.e., noisy subset selection with a monotone objective f (not necessarily submodular), for both multiplicative noise and additive noise (i.e., F(X) is in the range of f(X) ± ϵ) models. The main results are: • Firstly, we extend the approximation ratio of the greedy algorithm from the submodular case [14] to the general situation (Theorems 1, 2), and also slightly improve it. • Secondly, we prove that the approximation ratio of POSS is nearly the same as that of the greedy algorithm (Theorems 3, 4). Moreover, on two maximum coverage cases, we show that POSS can have a better ability of avoiding the misleading search direction due to the noise (Propositions 1, 2). • Thirdly, we introduce a noise-aware comparison strategy into POSS, and propose the new PONSS algorithm for noisy subset selection. When comparing two solutions with close noisy objective values, POSS selects the solution with the better observed value, while PONSS keeps both of them such that the risk of deleting a good solution is reduced. With some assumption such as i.i.d. noise distribution, we prove that PONSS can obtain a 1−ϵ 1+ϵ(1 −e−γ)-approximation ratio under multiplicative noise (Theorem 5). Particularly for the submodular case (i.e., γ = 1) and ϵ being a constant, PONSS has a constant approximation ratio. Note that for the greedy algorithm and POSS under general multiplicative noise, they only guarantee a Θ(1/k) approximation ratio. We also prove the approximation ratio of PONSS under additive noise (Theorem 6). We have conducted experiments on influence maximization and sparse regression problems, two typical subset selection applications with the objective function being submodular and non-submodular, respectively. The results on real-world data sets show that POSS is better than the greedy algorithm in most cases, and PONSS clearly outperforms POSS and the greedy algorithm. We start the rest of the paper by introducing the noisy subset selection problem. We then present in three subsequent sections the theoretical analyses for the greedy, POSS and PONSS algorithms, respectively. We further empirically compare these algorithms. The final section concludes this paper. 2 Noisy Subset Selection Given a finite nonempty set V = {v1, . . . , vn}, we study the functions f : 2V →R defined on subsets of V . The subset selection problem as presented in Definition 1 is to select a subset X of V such that a given objective f is maximized with the constraint |X| ≤k, where | · | denotes the size of a set. Note that we only consider maximization since minimizing f is equivalent to maximizing −f. Definition 1 (Subset Selection). Given all items V = {v1, . . . , vn}, an objective function f and a budget k, it is to find a subset of at most k items maximizing f, i.e., arg maxX⊆V f(X) s.t. |X| ≤k. (1) A set function f : 2V →R is monotone if for any X ⊆Y , f(X) ≤f(Y ). In this paper, we consider monotone functions and assume that they are normalized, i.e., f(∅) = 0. A set function f : 2V →R is submodular if for any X ⊆Y , f(Y ) −f(X) ≤P v∈Y \X(f(X ∪{v}) −f(X)) [19]. The submodularity ratio in Definition 2 characterizes how close a set function f is to submodularity. It is easy to see that f is submodular iff γX,k(f) = 1 for any X and k. For some concrete non-submodular applications, bounds on γX,k(f) were derived [1, 9]. When f is clear, we will use γX,k shortly. 2 Algorithm 1 Greedy Algorithm Input: all items V = {v1, . . . , vn}, a noisy objective function F, and a budget k Output: a subset of V with k items Process: 1: Let i = 0 and Xi = ∅. 2: repeat 3: Let v∗= arg maxv∈V \Xi F(Xi ∪{v}). 4: Let Xi+1 = Xi ∪{v∗}, and i = i + 1. 5: until i = k 6: return Xk Definition 2 (Submodularity Ratio [6]). Let f be a non-negative set function. The submodularity ratio of f with respect to a set X and a parameter k ≥1 is γX,k(f) = min L⊆X,S:|S|≤k,S∩L=∅ P v∈S f(L ∪{v}) −f(L) f(L ∪S) −f(L) . In many applications of subset selection, we cannot obtain the exact objective value f(X), but rather only a noisy one F(X). In this paper, we will study the multiplicative noise model, i.e., (1 −ϵ)f(X) ≤F(X) ≤(1 + ϵ)f(X), (2) as well as the additive noise model, i.e., f(X) −ϵ ≤F(X) ≤f(X) + ϵ. (3) 3 The Greedy Algorithm The greedy algorithm as shown in Algorithm 1 iteratively adds one item with the largest F improvement until k items are selected. It can achieve the best approximation ratio for many subset selection problems without noise [6, 18]. However, its performance for noisy subset selection was not theoretically analyzed until recently. Let OPT = maxX:|X|≤k f(X) denote the optimal function value of Eq. (1). Horel and Singer [14] proved that for subset selection with submodular objective functions under the multiplicative noise model, the greedy algorithm finds a subset X with f(X) ≥ 1−ϵ 1+ϵ 1 + 4kϵ (1−ϵ)2 1 − 1 −ϵ 1 + ϵ 2k 1 −1 k k! · OPT. (4) Note that their original bound in Theorem 5 of [14] is w.r.t. F(X) and we have switched to f(X) by multiplying a factor of 1−ϵ 1+ϵ according to Eq. (2). By extending their analysis with the submodularity ratio, we prove in Theorem 1 the approximation bound of the greedy algorithm for the objective f being not necessarily submodular. Note that their analysis is based on an inductive inequality on F, while we directly use that on f, which brings a slight improvement. For the submodular case, γX,k = 1 and the bound in Theorem 1 changes to be f(X) ≥ 1−ϵ 1+ϵ 1 k 1 −1−ϵ 1+ϵ 1 −1 k 1 − 1 −ϵ 1 + ϵ k 1 −1 k k! · OPT. Comparing with that (i.e., Eq. (4)) in [14], our bound is tighter, since 1− 1−ϵ 1+ϵ k 1−1 k k 1 −1−ϵ 1+ϵ 1 −1 k = k−1 X i=0 1−ϵ 1+ϵ 1−1 k i ≥ k−1 X i=0 1−ϵ 1+ϵ 2 1−1 k !i ≥ 1− 1−ϵ 1+ϵ 2k 1−1 k k 1 + 4kϵ (1−ϵ)2 · k. Due to space limitation, the proof of Theorem 1 is provided in the supplementary material. We also show in Theorem 2 the approximation ratio under additive noise. The proof is similar to that of Theorem 1, except that Eq. (3) is used instead of Eq. (2) for comparing f(X) with F(X). 3 Algorithm 2 POSS Algorithm Input: all items V = {v1, . . . , vn}, a noisy objective function F, and a budget k Parameter: the number T of iterations Output: a subset of V with at most k items Process: 1: Let x = {0}n, P = {x}, and let t = 0. 2: while t < T do 3: Select x from P uniformly at random. 4: Generate x′ by flipping each bit of x with probability 1 n. 5: if ∄z ∈P such that z ≻x′ then 6: P = (P \ {z ∈P | x′ ⪰z}) ∪{x′}. 7: end if 8: t = t + 1. 9: end while 10: return arg maxx∈P,|x|≤k F(x) Theorem 1. For subset selection under multiplicative noise, the greedy algorithm finds a subset X with f(X) ≥ 1−ϵ 1+ϵ γX,k k 1 −1−ϵ 1+ϵ 1 −γX,k k 1 − 1 −ϵ 1 + ϵ k 1 −γX,k k k ! · OPT. Theorem 2. For subset selection under additive noise, the greedy algorithm finds a subset X with f(X) ≥ 1 − 1 −γX,k k k · OPT −2kϵ γX,k . 4 The POSS Algorithm Let a Boolean vector x ∈{0, 1}n represent a subset X of V , where xi = 1 if vi ∈X and xi = 0 otherwise. The Pareto Optimization method for Subset Selection (POSS) [24] reformulates the original problem Eq. (1) as a bi-objective maximization problem: arg maxx∈{0,1}n (f1(x), f2(x)), where f1(x) = −∞, |x| ≥2k F(x), otherwise , f2(x) = −|x|. That is, POSS maximizes the original objective and minimizes the subset size simultaneously. Note that setting f1 to −∞is to exclude overly infeasible solutions. We will not distinguish x ∈{0, 1}n and its corresponding subset for convenience. In the bi-objective setting, the domination relationship as presented in Definition 3 is used to compare two solutions. For |x| < 2k and |y| ≥2k, it trivially holds that x ⪰y. For |x|, |y| < 2k, x ⪰y if F(x) ≥F(y) ∧|x| ≤|y|; x ≻y if x ⪰y and F(x) > F(y) ∨|x| < |y|. Definition 3 (Domination). For two solutions x and y, • x weakly dominates y (denoted as x ⪰y) if f1(x) ≥f1(y) ∧f2(x) ≥f2(y); • x dominates y (denoted as x ≻y) if x ⪰y and f1(x) > f1(y) ∨f2(x) > f2(y). POSS as described in Algorithm 2 uses a randomized iterative procedure to optimize the bi-objective problem. It starts from the empty set {0}n (line 1). In each iteration, a new solution x′ is generated by randomly flipping bits of an archived solution x selected from the current P (lines 3-4); if x′ is not dominated by any previously archived solution (line 5), it will be added into P, and meanwhile those solutions weakly dominated by x′ will be removed (line 6). After T iterations, the solution with the largest F value satisfying the size constraint in P is selected (line 10). In [21, 24], POSS using E[T] ≤2ek2n was proved to achieve the same approximation ratio as the greedy algorithm for subset selection without noise, where E[T] denotes the expected number of iterations. However, its approximation performance under noise is not known. Let γmin = minX:|X|=k−1 γX,k. We first show in Theorem 3 the approximation ratio of POSS under multiplicative noise. The proof is provided in the supplementary material due to space limitation. The approximation ratio of POSS under additive noise is shown in Theorem 4, the proof of which is similar to that of Theorem 3 except that Eq. (3) is used instead of Eq. (2). 4 𝑆𝑙+1 𝑆𝑙+2 𝑆2𝑙 𝑆1 𝑆𝑖 𝑆𝑙 𝑆𝑙 𝑆2𝑙−1 𝑆1 𝑆3𝑙−3 𝑆4𝑙−3 𝑆2𝑙 𝑆4𝑙−2 𝑆4𝑙−1 𝑆4𝑙 (a) [13] (b) Figure 1: Two examples of the maximum coverage problem. Theorem 3. For subset selection under multiplicative noise, POSS using E[T] ≤2ek2n finds a subset X with |X| ≤k and f(X) ≥ 1−ϵ 1+ϵ γmin k 1 −1−ϵ 1+ϵ 1 −γmin k 1 − 1 −ϵ 1 + ϵ k 1 −γmin k k ! · OPT. Theorem 4. For subset selection under additive noise, POSS using E[T] ≤2ek2n finds a subset X with |X| ≤k and f(X) ≥ 1 − 1 −γmin k k · OPT −2kϵ γmin − 1 −γmin k k ϵ. By comparing Theorem 1 with 3, we find that the approximation bounds of POSS and the greedy algorithm under multiplicative noise are nearly the same. Particularly, for the submodular case (where γX,k = 1 for any X and k), they are exactly the same. Under additive noise, their approximation bounds (i.e., Theorems 2 and 4) are also nearly the same, since the additional term (1 −γmin k )kϵ in Theorem 4 can almost be omitted compared with other terms. To further investigate the performances of the greedy algorithm and POSS, we compare them on two maximum coverage examples with noise. Maximum coverage as in Definition 4 is a classic subset selection problem. Given a family of sets that cover a universe of elements, the goal is to select at most k sets whose union is maximal. For Examples 1 and 2, the greedy algorithm easily finds an optimal solution if without noise, but can only guarantee nearly a 2/k and 3/4-approximation under noise, respectively. We prove in Propositions 1 and 2 that POSS can avoid the misleading search direction due to noise through multi-bit search and backward search, respectively, and find an optimal solution. Note that the greedy algorithm can only perform single-bit forward search. Due to space limitation, the proofs are provided in the supplementary material. Definition 4 (Maximum Coverage). Given a ground set U, a collection V = {S1, S2, . . . , Sn} of subsets of U, and a budget k, it is to find a subset of V (represented by x ∈{0, 1}n) such that arg maxx∈{0,1}n f(x) = | [ i:xi=1 Si| s.t. |x| ≤k. Example 1. [13] As shown in Figure 1(a), V contains n = 2l subsets {S1, . . . , S2l}, where ∀i ≤l, Si covers the same two elements, and ∀i > l, Si covers one unique element. The objective evaluation is exact except that ∀∅⊂X ⊆{S1, . . . , Sl}, i > l, F(X) = 2 + δ and F(X ∪{Si}) = 2, where 0 < δ < 1. The budget satisfies that 2 < k ≤l. Proposition 1. For Example 1, POSS using E[T] = O(kn log n) finds an optimal solution, while the greedy algorithm cannot. Example 2. As shown in Figure 1(b), V contains n = 4l subsets {S1, . . . , S4l}, where ∀i ≤4l −3 : |Si| = 1, |S4l−2| = 2l −1, and |S4l−1| = |S4l| = 2l −2. The objective evaluation is exact except that F({S4l}) = 2l. The budget k = 2. Proposition 2. For Example 2, POSS using E[T] = O(n) finds the optimal solution {S4l−2, S4l−1}, while the greedy algorithm cannot. 5 The PONSS Algorithm POSS compares two solutions based on the domination relation as shown in Definition 3. This may be not robust to noise, because a worse solution can appear to have a better F value and then survive to replace the true better solution. Inspired by the noise handling strategy threshold selection [25], we modify POSS by replacing domination with θ-domination, where x is better than y if F(x) is larger than F(y) by at least a threshold. By θ-domination, solutions with close F values will be kept 5 Algorithm 3 PONSS Algorithm Input: all items V = {v1, . . . , vn}, a noisy objective function F, and a budget k Parameter: T, θ and B Output: a subset of V with at most k items Process: 1: Let x = {0}n, P = {x}, and let t = 0. 2: while t < T do 3: Select x from P uniformly at random. 4: Generate x′ by flipping each bit of x with probability 1 n. 5: if ∄z ∈P such that z ≻θ x′ then 6: P = (P \ {z ∈P | x′ ⪰θ z}) ∪{x′}. 7: Q = {z ∈P | |z| = |x′|}. 8: if |Q| = B + 1 then 9: P = P \ Q and let j = 0. 10: while j < B do 11: Select two solutions z1, z2 from Q uniformly at random without replacement. 12: Evaluate F(z1), F(z2); let ˆz = arg maxz∈{z1,z2} F(z) (breaking ties randomly). 13: P = P ∪{ˆz}, Q = Q \ {ˆz}, and j = j + 1. 14: end while 15: end if 16: end if 17: t = t + 1. 18: end while 19: return arg maxx∈P,|x|≤k F(x) in P rather than only one with the best F value is kept; thus the risk of removing a good solution is reduced. This modified algorithm called PONSS (Pareto Optimization for Noisy Subset Selection) is presented in Algorithm 3. However, using θ-domination may also make the size of P very large, and then reduce the efficiency. We further introduce a parameter B to limit the number of solutions in P for each possible subset size. That is, if the number of solutions with the same size in P exceeds B, one of them will be deleted. As shown in lines 7-15, the better one of two solutions randomly selected from Q is kept; this process is repeated for B times, and the remaining solution in Q is deleted. For the analysis of PONSS, we consider random noise, i.e., F(x) is a random variable, and assume that the probability of F(x) > F(y) is not less than 0.5 + δ if f(x) > f(y), i.e., Pr(F(x) > F(y)) ≥0.5 + δ if f(x) > f(y), (5) where δ ∈[0, 0.5). This assumption is satisfied in many noisy settings, e.g., the noise distribution is i.i.d. for each x (which is explained in the supplementary material). Note that for comparing two solutions selected from Q in line 12 of PONSS, we reevaluate their noisy objective F values independently, i.e., each evaluation is a new independent random draw from the noise distribution. For the multiplicative noise model, we use the multiplicative θ-domination relation as presented in Definition 5. That is, x ⪰θ y if F(x) ≥1+θ 1−θ · F(y) and |x| ≤|y|. The approximation ratio of PONSS with the assumption Eq. (5) is shown in Theorem 5, which is better than that of POSS under general multiplicative noise (i.e., Theorem 3), because 1 − 1−ϵ 1+ϵ k 1 −γmin k k 1 −1−ϵ 1+ϵ 1 −γmin k = k−1 X i=0 1 −ϵ 1 + ϵ 1−γmin k i ≤ k−1 X i=0 1 −γmin k i = 1 − 1 −γmin k k γmin k . Particularly for the submodular case where γmin =1, PONSS with the assumption Eq. (5) can achieve a constant approximation ratio even when ϵ is a constant, while the greedy algorithm and POSS under general multiplicative noise only guarantee a Θ(1/k) approximation ratio. Note that when δ is a constant, the approximation guarantee of PONSS can hold with a constant probability by using a polynomially large B, and thus the number of iterations of PONSS is polynomial in expectation. Definition 5 (Multiplicative θ-Domination). For two solutions x and y, • x weakly dominates y (denoted as x ⪰θ y) if f1(x) ≥1+θ 1−θ · f1(y) ∧f2(x) ≥f2(y); • x dominates y (denoted as x ≻θ y) if x ⪰θ y and f1(x) > 1+θ 1−θ · f1(y) ∨f2(x) > f2(y). 6 Lemma 1. [21] For any X ⊆V , there exists one item ˆv ∈V \ X such that f(X ∪{ˆv}) −f(X) ≥γX,k k (OPT −f(X)). Theorem 5. For subset selection under multiplicative noise with the assumption Eq. (5), with probability at least 1 2(1 −12nk2 log 2k B2δ ), PONSS using θ ≥ϵ and T = 2eBnk2 log 2k finds a subset X with |X| ≤k and f(X) ≥1 −ϵ 1 + ϵ 1 − 1 −γmin k k · OPT. Proof. Let Jmax denote the maximum value of j ∈[0, k] such that in P, there exists a solution x with |x| ≤j and f(x) ≥(1 −(1 −γmin k )j) · OPT. Note that Jmax = k implies that there exists one solution x∗in P satisfying that |x∗| ≤k and f(x∗) ≥(1 −(1 −γmin k )k) · OPT. Since the final selected solution x from P has the largest F value (i.e., line 19 of Algorithm 3), we have f(x) ≥ 1 1 + ϵF(x) ≥ 1 1 + ϵF(x∗) ≥1 −ϵ 1 + ϵf(x∗). That is, the desired approximation bound is reached. Thus, we only need to analyze the probability of Jmax = k after running T = 2eBnk2 log 2k number of iterations. Assume that in the run of PONSS, one solution with the best f value in Q is always kept after each implementation of lines 8-15. We then show that Jmax can reach k with probability at least 0.5 after 2eBnk2 log 2k iterations. Jmax is initially 0 since it starts from {0}n, and we assume that currently Jmax = i < k. Let x be a corresponding solution with the value i, i.e., |x| ≤i and f(x) ≥ 1 − 1 −γmin k i · OPT. (6) First, Jmax will not decrease. If x is not deleted, it obviously holds. For deleting x, there are two possible cases. If x is deleted in line 6, the newly included solution x′ ⪰θ x, which implies that |x′| ≤|x| ≤i and f(x′) ≥ 1 1+ϵF(x′) ≥ 1 1+ϵ · 1+θ 1−θF(x) ≥ 1 1+ϵ · 1+ϵ 1−ϵF(x) ≥f(x), where the third inequality is by θ ≥ϵ. If x is deleted in lines 8-15, there must exist one solution z∗in P with |z∗| = |x| and f(z∗) ≥f(x), because we assume that one solution with the best f value in Q is kept. Second, Jmax can increase in each iteration with some probability. From Lemma 1, we know that a new solution x′ can be produced by flipping one specific 0 bit of x (i.e., adding a specific item) such that |x′| = |x| + 1 ≤i + 1 and f(x′) ≥ 1 −γx,k k f(x) + γx,k k · OPT ≥ 1 − 1 −γmin k i+1 · OPT, where the second inequality is by Eq. (6) and γx,k ≥γmin (since |x| < k and γx,k decreases with x). Note that x′ will be added into P; otherwise, there must exist one solution in P dominating x′ (line 5 of Algorithm 3), and this implies that Jmax has already been larger than i, which contradicts with the assumption Jmax = i. After including x′, Jmax ≥i + 1. Since P contains at most B solutions for each possible size {0, . . . , 2k −1}, |P| ≤2Bk. Thus, Jmax can increase by at least 1 in one iteration with probability at least 1 |P | · 1 n(1 −1 n)n−1 ≥ 1 2eBnk, where 1 |P | is the probability of selecting x in line 3 of Algorithm 3 due to uniform selection and 1 n(1 −1 n)n−1 is the probability of flipping only a specific bit of x in line 4. We divide the 2eBnk2 log 2k iterations into k phases with equal length. For reaching Jmax = k, it is sufficient that Jmax increases at least once in each phase. Thus, we have Pr(Jmax = k) ≥ 1 −(1 −1/(2eBnk))2eBnk log 2kk ≥(1 −1/(2k))k ≥1/2. We then only need to investigate our assumption that in the run of 2eBnk2 log 2k iterations, when implementing lines 8-15, one solution with the best f value in Q is always kept. Let R = {z∗∈ arg maxz∈Q f(z)}. If |R| > 1, it trivially holds, since only one solution from Q is deleted. If |R| = 1, deleting the solution z∗with the best f value implies that z∗is never included into P in implementing lines 11-13 of Algorithm 3, which are repeated for B iterations. In the j-th (where 0 ≤j ≤B −1) iteration, |Q| = B + 1 −j. Under the condition that z∗is not included into P from the 0-th to the (j −1)-th iteration, the probability that z∗is selected in line 11 is (B −j)/ B+1−j 2 = 2/(B + 1 −j). We know from Eq. (5) that F(z∗) is better in the comparison of line 12 with probability at least 0.5+δ. Thus, the probability of not including z∗into P in the j-th 7 iteration is at most 1− 2 B+1−j · (0.5+δ). Then, the probability of deleting the solution with the best f value in Q when implementing lines 8-15 is at most QB−1 j=0 (1−1+2δ B+1−j ). Taking the logarithm, we get B−1 X j=0 log B −j −2δ B + 1 −j = B X j=1 log j −2δ j + 1 ≤ Z B+1 1 log j −2δ j + 1 dj = log (B + 1 −2δ)B+1−2δ (B + 2)B+2 −log (1 −2δ)1−2δ 22 , where the inequality is since log j−2δ j+1 is increasing with j, and the last equality is since the derivative of log (j−2δ)j−2δ (j+1)j+1 with respect to j is log j−2δ j+1 . Thus, we have B−1 Y j=0 1 − 1+2δ B+1−j ≤ B+1−2δ B+2 B+2 · 1 (B+1−2δ)1+2δ · 4 (1−2δ)1−2δ ≤ 4 e1−1/eB1+2δ , where the last inequality is by 0 < 1 −2δ ≤1 and (1 −2δ)1−2δ ≥e−1/e. By the union bound, our assumption holds with probability at least 1 −(12nk2 log 2k)/B2δ. Thus, the theorem holds. For the additive noise model, we use the additive θ-domination relation as presented in Definition 6. That is, x ⪰θ y if F(x) ≥F(y) + 2θ and |x| ≤|y|. By applying Eq. (3) and additive θ-domination to the proof procedure of Theorem 5, we can prove the approximation ratio of PONSS under additive noise with the assumption Eq. (5), as shown in Theorem 6. Compared with the approximation ratio of POSS under general additive noise (i.e., Theorem 4), PONSS achieves a better one. This can be easily verified since (1 −(1 −γmin k )k) 2kϵ γmin ≥2ϵ, where the inequality is derived by γmin ∈[0, 1]. Definition 6 (Additive θ-Domination). For two solutions x and y, • x weakly dominates y (denoted as x ⪰θ y) if f1(x) ≥f1(y) + 2θ ∧f2(x) ≥f2(y); • x dominates y (denoted as x ≻θ y) if x ⪰θ y and f1(x) > f1(y) + 2θ ∨f2(x) > f2(y). Theorem 6. For subset selection under additive noise with the assumption Eq. (5), with probability at least 1 2(1 −12nk2 log 2k B2δ ), PONSS using θ ≥ϵ and T = 2eBnk2 log 2k finds a subset X with |X| ≤k and f(X) ≥ 1 − 1 −γmin k k · OPT −2ϵ. 6 Empirical Study We conducted experiments on two typical subset selection problems: influence maximization and sparse regression, where the former has a submodular objective function and the latter has a nonsubmodular one. The number T of iterations in POSS is set to 2ek2n as suggested by Theorem 3. For PONSS, B is set to k, and θ is set to 1, which is obviously not smaller than ϵ. Note that POSS needs one objective evaluation for the newly generated solution x′ in each iteration, while PONSS needs 1 or 1 + 2B evaluations, which depends on whether the condition in line 8 of Algorithm 3 is satisfied. For the fairness of comparison, PONSS is terminated until the total number of evaluations reaches that of POSS, i.e., 2ek2n. Note that in the run of each algorithm, only a noisy objective value F can be obtained; while for the final output solution, we report its accurately estimated f value for the assessment of the algorithms by an expensive evaluation. As POSS and PONSS are randomized algorithms and the behavior of the greedy algorithm is also randomized under random noise, we repeat the run 10 times independently and report the average estimated f values. Influence Maximization The task is to identify a set of influential users in social networks. Let a directed graph G(V, E) represent a social network, where each node is a user and each edge (u, v) ∈E has a probability pu,v representing the influence strength from user u to v. Given a budget k, influence maximization is to find a subset X of V with |X| ≤k such that the expected number of nodes activated by propagating from X (called influence spread) is maximized. The fundamental propagation model Independent Cascade [11] is used. Note that the set of active nodes in the diffusion process is a random variable, and the expectation of its size is monotone and submodular [16]. We use two real-world data sets: ego-Facebook and Weibo. ego-Facebook is downloaded from http: //snap.stanford.edu/data/index.html, and Weibo is crawled from a Chinese microblogging 8 5 6 7 8 9 10 Budget k 1000 1200 1400 1600 1800 2000 Influence Spread PONSS POSS Greedy 0 10 20 30 Running time in kn 600 800 1000 1200 1400 1600 1800 Influence Spread PONSS POSS Greedy 5 6 7 8 9 10 Budget k 100 200 300 400 500 600 Influence Spread PONSS POSS Greedy 0 10 20 30 Running time in kn 100 200 300 400 500 Influence Spread PONSS POSS Greedy (a) ego-Facebook (4,039 #nodes, 88,234 #edges) (b) Weibo (10,000 #nodes, 162,371 #edges) Figure 2: Influence maximization (influence spread: the larger the better). The right subfigure on each data set: influence spread vs running time of PONSS and POSS for k = 7. 10 12 14 16 18 20 Budget k 0.04 0.06 0.08 0.1 0.12 0.14 0.16 R 2 PONSS POSS Greedy 0 20 40 60 Running time in kn 0 0.05 0.1 0.15 R 2 PONSS POSS Greedy 10 12 14 16 18 20 Budget k 0 0.05 0.1 0.15 0.2 R2 PONSS POSS Greedy 0 20 40 60 Running time in kn 0 0.05 0.1 0.15 R2 PONSS POSS Greedy (a) protein (24,387 #inst, 357 #feat) (b) YearPredictionMSD (515,345 #inst, 90 #feat) Figure 3: Sparse regression (R2: the larger the better). The right subfigure on each data set: R2 vs running time of PONSS and POSS for k = 14. site Weibo.com like Twitter. On each network, the propagation probability of one edge from node u to v is estimated by weight(u,v) indegree(v), as widely used in [3, 12]. We test the budget k from 5 to 10. For estimating the objective influence spread, we simulate the diffusion process 10 times independently and use the average as an estimation. But for the final output solutions of the algorithms, we average over 10,000 times for accurate estimation. From the left subfigure on each data set in Figure 2, we can see that POSS is better than the greedy algorithm, and PONSS performs the best. By selecting the greedy algorithm as the baseline, we plot in the right subfigures the curve of influence spread over running time for PONSS and POSS with k = 7. Note that the x-axis is in kn, the running time order of the greedy algorithm. We can see that PONSS quickly reaches a better performance, which implies that PONSS can be efficient in practice. Sparse Regression The task is to find a sparse approximation solution to the linear regression problem. Given all observation variables V = {v1, . . . , vn}, a predictor variable z and a budget k, sparse regression is to find a set of at most k variables maximizing the squared multiple correlation R2 z,X = 1−MSEz,X [8, 15], where MSEz,X = minα∈R|X| E[(z −P i∈X αivi)2] denotes the mean squared error. We assume w.l.o.g. that all random variables are normalized to have expectation 0 and variance 1. The objective R2 z,X is monotone increasing, but not necessarily submodular [6]. We use two data sets from http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/ datasets/. The budget k is set to {10, 12, . . . , 20}. For estimating R2 in the optimization process, we use a random sample of 1000 instances. But for the final output solutions, we use the whole data set for accurate estimation. The results are plotted in Figure 3. The performances of the three algorithms are similar to that observed for influence maximization, except some losses of POSS over the greedy algorithm (e.g., on YearPredictionMSD with k = 20). For both tasks, we test PONSS with θ = {0.1, 0.2, . . . , 1}. The results are provided in the supplementary material due to space limitation, which show that PONSS is always better than POSS and the greedy algorithm. This implies that the performance of PONSS is not sensitive to the value of θ. 7 Conclusion In this paper, we study the subset selection problem with monotone objective functions under multiplicative and additive noises. We first show that the greedy algorithm and POSS, two powerful algorithms for noise-free subset selection, achieve nearly the same approximation guarantee under noise. Then, we propose a new algorithm PONSS, which can achieve a better approximation ratio with some assumption such as i.i.d. noise distribution. The experimental results on influence maximization and sparse regression exhibit the superior performance of PONSS. 9 Acknowledgements The authors would like to thank reviewers for their helpful comments and suggestions. C. Qian was supported by NSFC (61603367) and YESS (2016QNRC001). Y. Yu was supported by JiangsuSF (BK20160066, BK20170013). K. Tang was supported by NSFC (61672478) and Royal Society Newton Advanced Fellowship (NA150123). Z.-H. Zhou was supported by NSFC (61333014) and Collaborative Innovation Center of Novel Software Technology and Industrialization. References [1] A. A. Bian, J. M. Buhmann, A. Krause, and S. Tschiatschek. Guarantees for greedy maximization of non-submodular functions with applications. In ICML, pages 498–507, 2017. [2] W. Chen, C. Wang, and Y. Wang. Scalable influence maximization for prevalent viral marketing in large-scale social networks. In KDD, pages 1029–1038, 2010. [3] W. Chen, Y. Wang, and S. Yang. Efficient influence maximization in social networks. In KDD, pages 199–208, 2009. [4] Y. Chen, H. Hassani, A. Karbasi, and A. Krause. Sequential information maximization: When is greedy near-optimal? In COLT, pages 338–363, 2015. [5] A. Das and D. Kempe. Algorithms for subset selection in linear regression. In STOC, pages 45–54, 2008. [6] A. Das and D. Kempe. Submodular meets spectral: Greedy algorithms for subset selection, sparse approximation and dictionary selection. In ICML, pages 1057–1064, 2011. [7] G. Davis, S. Mallat, and M. Avellaneda. Adaptive greedy approximations. Constructive Approximation, 13(1):57–98, 1997. [8] G. Diekhoff. Statistics for the Social and Behavioral Sciences: Univariate, Bivariate, Multivariate. William C Brown Pub, 1992. [9] E. R. Elenberg, R. Khanna, A. G. Dimakis, and S. Negahban. Restricted strong convexity implies weak submodularity. arXiv:1612.00804, 2016. [10] U. Feige. A threshold of ln n for approximating set cover. JACM, 45(4):634–652, 1998. [11] J. Goldenberg, B. Libai, and E. Muller. Talk of the network: A complex systems look at the underlying process of word-of-mouth. Marketing Letters, 12(3):211–223, 2001. [12] A. Goyal, W. Lu, and L. Lakshmanan. Simpath: An efficient algorithm for influence maximization under the linear threshold model. In ICDM, pages 211–220, 2011. [13] A. Hassidim and Y. Singer. Submodular optimization under noise. In COLT, pages 1069–1122, 2017. [14] T. Horel and Y. Singer. Maximization of approximately submodular functions. In NIPS, pages 3045–3053, 2016. [15] R. A. Johnson and D. W. Wichern. Applied Multivariate Statistical Analysis. Pearson, 6th edition, 2007. [16] D. Kempe, J. Kleinberg, and É. Tardos. Maximizing the spread of influence through a social network. In KDD, pages 137–146, 2003. [17] A. Miller. Subset Selection in Regression. Chapman and Hall/CRC, 2nd edition, 2002. [18] G. L. Nemhauser and L. A. Wolsey. Best algorithms for approximating the maximum of a submodular set function. Mathematics of Operations Research, 3(3):177–188, 1978. [19] G. L. Nemhauser, L. A. Wolsey, and M. L. Fisher. An analysis of approximations for maximizing submodular set functions – I. Mathematical Programming, 14(1):265–294, 1978. [20] C. Qian, J.-C. Shi, Y. Yu, and K. Tang. On subset selection with general cost constraints. In IJCAI, pages 2613–2619, 2017. [21] C. Qian, J.-C. Shi, Y. Yu, K. Tang, and Z.-H. Zhou. Parallel Pareto optimization for subset selection. In IJCAI, pages 1939–1945, 2016. [22] C. Qian, J.-C. Shi, Y. Yu, K. Tang, and Z.-H. Zhou. Optimizing ratio of monotone set functions. In IJCAI, pages 2606–2612, 2017. 10 [23] C. Qian, Y. Yu, and Z.-H. Zhou. Pareto ensemble pruning. In AAAI, pages 2935–2941, 2015. [24] C. Qian, Y. Yu, and Z.-H. Zhou. Subset selection by Pareto optimization. In NIPS, pages 1765–1773, 2015. [25] C. Qian, Y. Yu, and Z.-H. Zhou. Analyzing evolutionary optimization in noisy environments. Evolutionary Computation, 2017. [26] A. Singla, S. Tschiatschek, and A. Krause. Noisy submodular maximization via adaptive sampling with applications to crowdsourced image collection summarization. In AAAI, pages 2037–2043, 2016. 11 | 2017 | 552 |
7,066 | PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space Charles R. Qi Li Yi Hao Su Leonidas J. Guibas Stanford University Abstract Few prior works study deep learning on point sets. PointNet [20] is a pioneer in this direction. However, by design PointNet does not capture local structures induced by the metric space points live in, limiting its ability to recognize fine-grained patterns and generalizability to complex scenes. In this work, we introduce a hierarchical neural network that applies PointNet recursively on a nested partitioning of the input point set. By exploiting metric space distances, our network is able to learn local features with increasing contextual scales. With further observation that point sets are usually sampled with varying densities, which results in greatly decreased performance for networks trained on uniform densities, we propose novel set learning layers to adaptively combine features from multiple scales. Experiments show that our network called PointNet++ is able to learn deep point set features efficiently and robustly. In particular, results significantly better than state-of-the-art have been obtained on challenging benchmarks of 3D point clouds. 1 Introduction We are interested in analyzing geometric point sets which are collections of points in a Euclidean space. A particularly important type of geometric point set is point cloud captured by 3D scanners, e.g., from appropriately equipped autonomous vehicles. As a set, such data has to be invariant to permutations of its members. In addition, the distance metric defines local neighborhoods that may exhibit different properties. For example, the density and other attributes of points may not be uniform across different locations — in 3D scanning the density variability can come from perspective effects, radial density variations, motion, etc. Few prior works study deep learning on point sets. PointNet [20] is a pioneering effort that directly processes point sets. The basic idea of PointNet is to learn a spatial encoding of each point and then aggregate all individual point features to a global point cloud signature. By its design, PointNet does not capture local structure induced by the metric. However, exploiting local structure has proven to be important for the success of convolutional architectures. A CNN takes data defined on regular grids as the input and is able to progressively capture features at increasingly larger scales along a multi-resolution hierarchy. At lower levels neurons have smaller receptive fields whereas at higher levels they have larger receptive fields. The ability to abstract local patterns along the hierarchy allows better generalizability to unseen cases. We introduce a hierarchical neural network, named as PointNet++, to process a set of points sampled in a metric space in a hierarchical fashion. The general idea of PointNet++ is simple. We first partition the set of points into overlapping local regions by the distance metric of the underlying space. Similar to CNNs, we extract local features capturing fine geometric structures from small neighborhoods; such local features are further grouped into larger units and processed to produce higher level features. This process is repeated until we obtain the features of the whole point set. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The design of PointNet++ has to address two issues: how to generate the partitioning of the point set, and how to abstract sets of points or local features through a local feature learner. The two issues are correlated because the partitioning of the point set has to produce common structures across partitions, so that weights of local feature learners can be shared, as in the convolutional setting. We choose our local feature learner to be PointNet. As demonstrated in that work, PointNet is an effective architecture to process an unordered set of points for semantic feature extraction. In addition, this architecture is robust to input data corruption. As a basic building block, PointNet abstracts sets of local points or features into higher level representations. In this view, PointNet++ applies PointNet recursively on a nested partitioning of the input set. Figure 1: Visualization of a scan captured from a Structure Sensor (left: RGB; right: point cloud). One issue that still remains is how to generate overlapping partitioning of a point set. Each partition is defined as a neighborhood ball in the underlying Euclidean space, whose parameters include centroid location and scale. To evenly cover the whole set, the centroids are selected among input point set by a farthest point sampling (FPS) algorithm. Compared with volumetric CNNs that scan the space with fixed strides, our local receptive fields are dependent on both the input data and the metric, and thus more efficient and effective. Deciding the appropriate scale of local neighborhood balls, however, is a more challenging yet intriguing problem, due to the entanglement of feature scale and non-uniformity of input point set. We assume that the input point set may have variable density at different areas, which is quite common in real data such as Structure Sensor scanning [18] (see Fig. 1). Our input point set is thus very different from CNN inputs which can be viewed as data defined on regular grids with uniform constant density. In CNNs, the counterpart to local partition scale is the size of kernels. [25] shows that using smaller kernels helps to improve the ability of CNNs. Our experiments on point set data, however, give counter evidence to this rule. Small neighborhood may consist of too few points due to sampling deficiency, which might be insufficient to allow PointNets to capture patterns robustly. A significant contribution of our paper is that PointNet++ leverages neighborhoods at multiple scales to achieve both robustness and detail capture. Assisted with random input dropout during training, the network learns to adaptively weight patterns detected at different scales and combine multi-scale features according to the input data. Experiments show that our PointNet++ is able to process point sets efficiently and robustly. In particular, results that are significantly better than state-of-the-art have been obtained on challenging benchmarks of 3D point clouds. 2 Problem Statement Suppose that X = (M, d) is a discrete metric space whose metric is inherited from a Euclidean space Rn, where M ✓Rn is the set of points and d is the distance metric. In addition, the density of M in the ambient Euclidean space may not be uniform everywhere. We are interested in learning set functions f that take such X as the input (along with additional features for each point) and produce information of semantic interest regrading X. In practice, such f can be classification function that assigns a label to X or a segmentation function that assigns a per point label to each member of M. 3 Method Our work can be viewed as an extension of PointNet [20] with added hierarchical structure. We first review PointNet (Sec. 3.1) and then introduce a basic extension of PointNet with hierarchical structure (Sec. 3.2). Finally, we propose our PointNet++ that is able to robustly learn features even in non-uniformly sampled point sets (Sec. 3.3). 2 sampling & grouping pointnet set abstraction 38 interpolate skip link concatenation pointnet sampling & grouping pointnet interpolate unit pointnet unit pointnet fully connected layers set abstraction Segmentation Classification Hierarchical point set feature learning class scores per-point scores (N,d+C) (1,C4) (k) (N1,K,d+C) (N1,d+C1) (N2,K,d+C1) (N2,d+C2) (N1,d+C2+C1) (N1,d+C3) (N,d+C3+C) (N,k) Figure 2: Illustration of our hierarchical feature learning architecture and its application for set segmentation and classification using points in 2D Euclidean space as an example. Single scale point grouping is visualized here. For details on density adaptive grouping, see Fig. 3 3.1 Review of PointNet [20]: A Universal Continuous Set Function Approximator Given an unordered point set {x1, x2, ..., xn} with xi 2 Rd, one can define a set function f : X ! R that maps a set of points to a vector: f(x1, x2, ..., xn) = γ ✓ MAX i=1,...,n {h(xi)} ◆ (1) where γ and h are usually multi-layer perceptron (MLP) networks. The set function f in Eq. 1 is invariant to input point permutations and can arbitrarily approximate any continuous set function [20]. Note that the response of h can be interpreted as the spatial encoding of a point (see [20] for details). PointNet achieved impressive performance on a few benchmarks. However, it lacks the ability to capture local context at different scales. We will introduce a hierarchical feature learning framework in the next section to resolve the limitation. 3.2 Hierarchical Point Set Feature Learning While PointNet uses a single max pooling operation to aggregate the whole point set, our new architecture builds a hierarchical grouping of points and progressively abstract larger and larger local regions along the hierarchy. Our hierarchical structure is composed by a number of set abstraction levels (Fig. 2). At each level, a set of points is processed and abstracted to produce a new set with fewer elements. The set abstraction level is made of three key layers: Sampling layer, Grouping layer and PointNet layer. The Sampling layer selects a set of points from input points, which defines the centroids of local regions. Grouping layer then constructs local region sets by finding “neighboring” points around the centroids. PointNet layer uses a mini-PointNet to encode local region patterns into feature vectors. A set abstraction level takes an N ⇥(d + C) matrix as input that is from N points with d-dim coordinates and C-dim point feature. It outputs an N 0 ⇥(d + C0) matrix of N 0 subsampled points with d-dim coordinates and new C0-dim feature vectors summarizing local context. We introduce the layers of a set abstraction level in the following paragraphs. Sampling layer. Given input points {x1, x2, ..., xn}, we use iterative farthest point sampling (FPS) to choose a subset of points {xi1, xi2, ..., xim}, such that xij is the most distant point (in metric distance) from the set {xi1, xi2, ..., xij−1} with regard to the rest points. Compared with random sampling, it has better coverage of the entire point set given the same number of centroids. In contrast to CNNs that scan the vector space agnostic of data distribution, our sampling strategy generates receptive fields in a data dependent manner. 3 Grouping layer. The input to this layer is a point set of size N ⇥(d + C) and the coordinates of a set of centroids of size N 0 ⇥d. The output are groups of point sets of size N 0 ⇥K ⇥(d + C), where each group corresponds to a local region and K is the number of points in the neighborhood of centroid points. Note that K varies across groups but the succeeding PointNet layer is able to convert flexible number of points into a fixed length local region feature vector. In convolutional neural networks, a local region of a pixel consists of pixels with array indices within certain Manhattan distance (kernel size) of the pixel. In a point set sampled from a metric space, the neighborhood of a point is defined by metric distance. Ball query finds all points that are within a radius to the query point (an upper limit of K is set in implementation). An alternative range query is K nearest neighbor (kNN) search which finds a fixed number of neighboring points. Compared with kNN, ball query’s local neighborhood guarantees a fixed region scale thus making local region feature more generalizable across space, which is preferred for tasks requiring local pattern recognition (e.g. semantic point labeling). PointNet layer. In this layer, the input are N 0 local regions of points with data size N 0⇥K⇥(d+C). Each local region in the output is abstracted by its centroid and local feature that encodes the centroid’s neighborhood. Output data size is N 0 ⇥(d + C0). The coordinates of points in a local region are firstly translated into a local frame relative to the centroid point: x(j) i = x(j) i −ˆx(j) for i = 1, 2, ..., K and j = 1, 2, ..., d where ˆx is the coordinate of the centroid. We use PointNet [20] as described in Sec. 3.1 as the basic building block for local pattern learning. By using relative coordinates together with point features we can capture point-to-point relations in the local region. 3.3 Robust Feature Learning under Non-Uniform Sampling Density concat (a) (b) A or B concat (c) A B multi-scale aggregation cross-level multi-scale aggregation cross-level adaptive scale selection Figure 3: (a) Multi-scale grouping (MSG); (b) Multiresolution grouping (MRG). As discussed earlier, it is common that a point set comes with nonuniform density in different areas. Such non-uniformity introduces a significant challenge for point set feature learning. Features learned in dense data may not generalize to sparsely sampled regions. Consequently, models trained for sparse point cloud may not recognize fine-grained local structures. Ideally, we want to inspect as closely as possible into a point set to capture finest details in densely sampled regions. However, such close inspect is prohibited at low density areas because local patterns may be corrupted by the sampling deficiency. In this case, we should look for larger scale patterns in greater vicinity. To achieve this goal we propose density adaptive PointNet layers (Fig. 3) that learn to combine features from regions of different scales when the input sampling density changes. We call our hierarchical network with density adaptive PointNet layers as PointNet++. Previously in Sec. 3.2, each abstraction level contains grouping and feature extraction of a single scale. In PointNet++, each abstraction level extracts multiple scales of local patterns and combine them intelligently according to local point densities. In terms of grouping local regions and combining features from different scales, we propose two types of density adaptive layers as listed below. Multi-scale grouping (MSG). As shown in Fig. 3 (a), a simple but effective way to capture multiscale patterns is to apply grouping layers with different scales followed by according PointNets to extract features of each scale. Features at different scales are concatenated to form a multi-scale feature. We train the network to learn an optimized strategy to combine the multi-scale features. This is done by randomly dropping out input points with a randomized probability for each instance, which we call random input dropout. Specifically, for each training point set, we choose a dropout ratio ✓uniformly sampled from [0, p] where p 1. For each point, we randomly drop a point with probability ✓. In practice we set p = 0.95 to avoid generating empty point sets. In doing so we present the network with training sets of various sparsity (induced by ✓) and varying uniformity (induced by randomness in dropout). During test, we keep all available points. 4 Multi-resolution grouping (MRG). The MSG approach above is computationally expensive since it runs local PointNet at large scale neighborhoods for every centroid point. In particular, since the number of centroid points is usually quite large at the lowest level, the time cost is significant. Here we propose an alternative approach that avoids such expensive computation but still preserves the ability to adaptively aggregate information according to the distributional properties of points. In Fig. 3 (b), features of a region at some level Li is a concatenation of two vectors. One vector (left in figure) is obtained by summarizing the features at each subregion from the lower level Li−1 using the set abstraction level. The other vector (right) is the feature that is obtained by directly processing all raw points in the local region using a single PointNet. When the density of a local region is low, the first vector may be less reliable than the second vector, since the subregion in computing the first vector contains even sparser points and suffers more from sampling deficiency. In such a case, the second vector should be weighted higher. On the other hand, when the density of a local region is high, the first vector provides information of finer details since it possesses the ability to inspect at higher resolutions recursively in lower levels. Compared with MSG, this method is computationally more efficient since we avoids the feature extraction in large scale neighborhoods at lowest levels. 3.4 Point Feature Propagation for Set Segmentation In set abstraction layer, the original point set is subsampled. However in set segmentation task such as semantic point labeling, we want to obtain point features for all the original points. One solution is to always sample all points as centroids in all set abstraction levels, which however results in high computation cost. Another way is to propagate features from subsampled points to the original points. We adopt a hierarchical propagation strategy with distance based interpolation and across level skip links (as shown in Fig. 2). In a feature propagation level, we propagate point features from Nl ⇥(d + C) points to Nl−1 points where Nl−1 and Nl (with Nl Nl−1) are point set size of input and output of set abstraction level l. We achieve feature propagation by interpolating feature values f of Nl points at coordinates of the Nl−1 points. Among the many choices for interpolation, we use inverse distance weighted average based on k nearest neighbors (as in Eq. 2, in default we use p = 2, k = 3). The interpolated features on Nl−1 points are then concatenated with skip linked point features from the set abstraction level. Then the concatenated features are passed through a “unit pointnet”, which is similar to one-by-one convolution in CNNs. A few shared fully connected and ReLU layers are applied to update each point’s feature vector. The process is repeated until we have propagated features to the original set of points. f (j)(x) = Pk i=1 wi(x)f (j) i Pk i=1 wi(x) where wi(x) = 1 d(x, xi)p , j = 1, ..., C (2) 4 Experiments Datasets We evaluate on four datasets ranging from 2D objects (MNIST [11]), 3D objects (ModelNet40 [31] rigid object, SHREC15 [12] non-rigid object) to real 3D scenes (ScanNet [5]). Object classification is evaluated by accuracy. Semantic scene labeling is evaluated by average voxel classification accuracy following [5]. We list below the experiment setting for each dataset: • MNIST: Images of handwritten digits with 60k training and 10k testing samples. • ModelNet40: CAD models of 40 categories (mostly man-made). We use the official split with 9,843 shapes for training and 2,468 for testing. • SHREC15: 1200 shapes from 50 categories. Each category contains 24 shapes which are mostly organic ones with various poses such as horses, cats, etc. We use five fold cross validation to acquire classification accuracy on this dataset. • ScanNet: 1513 scanned and reconstructed indoor scenes. We follow the experiment setting in [5] and use 1201 scenes for training, 312 scenes for test. 5 Method Error rate (%) Multi-layer perceptron [24] 1.60 LeNet5 [11] 0.80 Network in Network [13] 0.47 PointNet (vanilla) [20] 1.30 PointNet [20] 0.78 Ours 0.51 Table 1: MNIST digit classification. Method Input Accuracy (%) Subvolume [21] vox 89.2 MVCNN [26] img 90.1 PointNet (vanilla) [20] pc 87.2 PointNet [20] pc 89.2 Ours pc 90.7 Ours (with normal) pc 91.9 Table 2: ModelNet40 shape classification. 1024 points 512 points 256 points 128 points Figure 4: Left: Point cloud with random point dropout. Right: Curve showing advantage of our density adaptive strategy in dealing with non-uniform density. DP means random input dropout during training; otherwise training is on uniformly dense points. See Sec.3.3 for details. 4.1 Point Set Classification in Euclidean Metric Space We evaluate our network on classifying point clouds sampled from both 2D (MNIST) and 3D (ModleNet40) Euclidean spaces. MNIST images are converted to 2D point clouds of digit pixel locations. 3D point clouds are sampled from mesh surfaces from ModelNet40 shapes. In default we use 512 points for MNIST and 1024 points for ModelNet40. In last row (ours normal) in Table 2, we use face normals as additional point features, where we also use more points (N = 5000) to further boost performance. All point sets are normalized to be zero mean and within a unit ball. We use a three-level hierarchical network with three fully connected layers 1 Results. In Table 1 and Table 2, we compare our method with a representative set of previous state of the arts. Note that PointNet (vanilla) in Table 2 is the the version in [20] that does not use transformation networks, which is equivalent to our hierarchical net with only one level. Firstly, our hierarchical learning architecture achieves significantly better performance than the non-hierarchical PointNet [20]. In MNIST, we see a relative 60.8% and 34.6% error rate reduction from PointNet (vanilla) and PointNet to our method. In ModelNet40 classification, we also see that using same input data size (1024 points) and features (coordinates only), ours is remarkably stronger than PointNet. Secondly, we observe that point set based method can even achieve better or similar performance as mature image CNNs. In MNIST, our method (based on 2D point set) is achieving an accuracy close to the Network in Network CNN. In ModelNet40, ours with normal information significantly outperforms previous state-of-the-art method MVCNN [26]. Robustness to Sampling Density Variation. Sensor data directly captured from real world usually suffers from severe irregular sampling issues (Fig. 1). Our approach selects point neighborhood of multiple scales and learns to balance the descriptiveness and robustness by properly weighting them. We randomly drop points (see Fig. 4 left) during test time to validate our network’s robustness to non-uniform and sparse data. In Fig. 4 right, we see MSG+DP (multi-scale grouping with random input dropout during training) and MRG+DP (multi-resolution grouping with random input dropout during training) are very robust to sampling density variation. MSG+DP performance drops by less than 1% from 1024 to 256 test points. Moreover, it achieves the best performance on almost all sampling densities compared with alternatives. PointNet vanilla [20] is fairly robust under density variation due to its focus on global abstraction rather than fine details. However loss of details also makes it less powerful compared to our approach. SSG (ablated PointNet++ with single scale grouping in each level) fails to generalize to sparse sampling density while SSG+DP amends the problem by randomly dropping out points in training time. 1See supplementary for more details on network architecture and experiment preparation. 6 4.2 Point Set Segmentation for Semantic Scene Labeling 0.65 0.7 0.75 0.8 0.85 3DCNN[3] PointNet[12] Ours Е 4 Accuracy 0.65 0.7 0.75 0.8 0.85 PointNet[12] Ours(SSG) Ours(SSG+DP) Ours(MSG+DP) Е 5 Accuracy 0.65 0.775 0.9 3DCNN[3] PointNet[19] Ours(SSG) Ours(MSG+DP)Ours(MRG+DP) 0.762 0.804 0.727 0.680 0.834 0.845 0.833 0.739 0.730 Е 6 Accuracy ScanNet ScanNet non-uniform Figure 5: Scannet labeling accuracy. To validate that our approach is suitable for large scale point cloud analysis, we also evaluate on semantic scene labeling task. The goal is to predict semantic object label for points in indoor scans. [5] provides a baseline using fully convolutional neural network on voxelized scans. They purely rely on scanning geometry instead of RGB information and report the accuracy on a per-voxel basis. To make a fair comparison, we remove RGB information in all our experiments and convert point cloud label prediction into voxel labeling following [5]. We also compare with [20]. The accuracy is reported on a per-voxel basis in Fig. 5 (blue bar). Our approach outperforms all the baseline methods by a large margin. In comparison with [5], which learns on voxelized scans, we directly learn on point clouds to avoid additional quantization error, and conduct data dependent sampling to allow more effective learning. Compared with [20], our approach introduces hierarchical feature learning and captures geometry features at different scales. This is very important for understanding scenes at multiple levels and labeling objects with various sizes. We visualize example scene labeling results in Fig. 6. Wall Floor Chair Desk Bed Door Table PointNet Ours Ground Truth Figure 6: Scannet labeling results. [20] captures the overall layout of the room correctly but fails to discover the furniture. Our approach, in contrast, is much better at segmenting objects besides the room layout. Robustness to Sampling Density Variation To test how our trained model performs on scans with non-uniform sampling density, we synthesize virtual scans of Scannet scenes similar to that in Fig. 1 and evaluate our network on this data. We refer readers to supplementary material for how we generate the virtual scans. We evaluate our framework in three settings (SSG, MSG+DP, MRG+DP) and compare with a baseline approach [20]. Performance comparison is shown in Fig. 5 (yellow bar). We see that SSG performance greatly falls due to the sampling density shift from uniform point cloud to virtually scanned scenes. MRG network, on the other hand, is more robust to the sampling density shift since it is able to automatically switch to features depicting coarser granularity when the sampling is sparse. Even though there is a domain gap between training data (uniform points with random dropout) and scanned data with non-uniform density, our MSG network is only slightly affected and achieves the best accuracy among methods in comparison. These prove the effectiveness of our density adaptive layer design. 4.3 Point Set Classification in Non-Euclidean Metric Space In this section, we show generalizability of our approach to non-Euclidean space. In non-rigid shape classification (Fig. 7), a good classifier should be able to classify (a) and (c) in Fig. 7 correctly as the same category even given their difference in pose, which requires knowledge of intrinsic structure. Shapes in SHREC15 are 2D surfaces embedded in 3D space. Geodesic distances along the surfaces naturally induce a metric space. We show through experiments that adopting PointNet++ in this metric space is an effective way to capture intrinsic structure of the underlying point set. For each shape in [12], we firstly construct the metric space induced by pairwise geodesic distances. We follow [23] to obtain an embedding metric that mimics geodesic distance. Next we extract intrinsic point features in this metric space including WKS [1], HKS [27] and multi-scale Gaussian curvature [16]. We use these features as input and then sample and group points according to the underlying metric space. In this way, our network learns to capture multi-scale intrinsic structure that is not influenced by the specific pose of a shape. Alternative design choices include using XY Z coordinates as points feature or use Euclidean space R3 as the underlying metric space. We show below these are not optimal choices. 7 Figure 7: An example of nonrigid shape classification. Results. We compare our methods with previous state-of-theart method [14] in Table 3. [14] extracts geodesic moments as shape features and use a stacked sparse autoencoder to digest these features to predict shape category. Our approach using nonEuclidean metric space and intrinsic features achieves the best performance in all settings and outperforms [14] by a large margin. Comparing the first and second setting of our approach, we see intrinsic features are very important for non-rigid shape classification. XY Z feature fails to reveal intrinsic structures and is greatly influenced by pose variation. Comparing the second and third setting of our approach, we see using geodesic neighborhood is beneficial compared with Euclidean neighborhood. Euclidean neighborhood might include points far away on surfaces and this neighborhood could change dramatically when shape affords non-rigid deformation. This introduces difficulty for effective weight sharing since the local structure could become combinatorially complicated. Geodesic neighborhood on surfaces, on the other hand, gets rid of this issue and improves the learning effectiveness. Metric space Input feature Accuracy (%) DeepGM [14] Intrinsic features 93.03 Ours Euclidean XYZ 60.18 Euclidean Intrinsic features 94.49 Non-Euclidean Intrinsic features 96.09 Table 3: SHREC15 Non-rigid shape classification. 4.4 Feature Visualization. Figure 8: 3D point cloud patterns learned from the first layer kernels. The model is trained for ModelNet40 shape classification (20 out of the 128 kernels are randomly selected). Color indicates point depth (red is near, blue is far). In Fig. 8 we visualize what has been learned by the first level kernels of our hierarchical network. We created a voxel grid in space and aggregate local point sets that activate certain neurons the most in grid cells (highest 100 examples are used). Grid cells with high votes are kept and converted back to 3D point clouds, which represents the pattern that neuron recognizes. Since the model is trained on ModelNet40 which is mostly consisted of furniture, we see structures of planes, double planes, lines, corners etc. in the visualization. 5 Related Work The idea of hierarchical feature learning has been very successful. Among all the learning models, convolutional neural network [10; 25; 8] is one of the most prominent ones. However, convolution does not apply to unordered point sets with distance metrics, which is the focus of our work. A few very recent works [20; 28] have studied how to apply deep learning to unordered sets. They ignore the underlying distance metric even if the point set does possess one. As a result, they are unable to capture local context of points and are sensitive to global set translation and normalization. In this work, we target at points sampled from a metric space and tackle these issues by explicitly considering the underlying distance metric in our design. Point sampled from a metric space are usually noisy and with non-uniform sampling density. This affects effective point feature extraction and causes difficulty for learning. One of the key issue is to select proper scale for point feature design. Previously several approaches have been developed regarding this [19; 17; 2; 6; 7; 30] either in geometry processing community or photogrammetry and remote sensing community. In contrast to all these works, our approach learns to extract point features and balance multiple feature scales in an end-to-end fashion. 8 In 3D metric space, other than point set, there are several popular representations for deep learning, including volumetric grids [21; 22; 29], and geometric graphs [3; 15; 33]. However, in none of these works, the problem of non-uniform sampling density has been explicitly considered. 6 Conclusion In this work, we propose PointNet++, a powerful neural network architecture for processing point sets sampled in a metric space. PointNet++ recursively functions on a nested partitioning of the input point set, and is effective in learning hierarchical features with respect to the distance metric. To handle the non uniform point sampling issue, we propose two novel set abstraction layers that intelligently aggregate multi-scale information according to local point densities. These contributions enable us to achieve state-of-the-art performance on challenging benchmarks of 3D point clouds. In the future, it’s worthwhile thinking how to accelerate inference speed of our proposed network especially for MSG and MRG layers by sharing more computation in each local regions. It’s also interesting to find applications in higher dimensional metric spaces where CNN based method would be computationally unfeasible while our method can scale well. Acknowledgement. The authors would like to acknowledge the support of a Samsung GRO grant, NSF grants IIS-1528025 and DMS-1546206, and ONR MURI grant N00014-13-1-0341. References [1] M. Aubry, U. Schlickewei, and D. Cremers. The wave kernel signature: A quantum mechanical approach to shape analysis. In Computer Vision Workshops (ICCV Workshops), 2011 IEEE International Conference on, pages 1626–1633. IEEE, 2011. [2] D. Belton and D. D. Lichti. Classification and segmentation of terrestrial laser scanner point clouds using local variance information. Iaprs, Xxxvi, 5:44–49, 2006. [3] J. Bruna, W. Zaremba, A. Szlam, and Y. LeCun. Spectral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203, 2013. [4] A. X. Chang, T. Funkhouser, L. Guibas, P. Hanrahan, Q. Huang, Z. Li, S. Savarese, M. Savva, S. Song, H. Su, J. Xiao, L. Yi, and F. Yu. ShapeNet: An Information-Rich 3D Model Repository. Technical Report arXiv:1512.03012 [cs.GR], 2015. [5] A. Dai, A. X. Chang, M. Savva, M. Halber, T. Funkhouser, and M. Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. arXiv preprint arXiv:1702.04405, 2017. [6] J. Demantké, C. Mallet, N. David, and B. Vallet. Dimensionality based scale selection in 3d lidar point clouds. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 38(Part 5):W12, 2011. [7] A. Gressin, C. Mallet, J. Demantké, and N. David. Towards 3d lidar point cloud registration improvement using optimal neighborhood knowledge. ISPRS journal of photogrammetry and remote sensing, 79:240– 251, 2013. [8] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [9] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. [10] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [11] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [12] Z. Lian, J. Zhang, S. Choi, H. ElNaghy, J. El-Sana, T. Furuya, A. Giachetti, R. A. Guler, L. Lai, C. Li, H. Li, F. A. Limberger, R. Martin, R. U. Nakanishi, A. P. Neto, L. G. Nonato, R. Ohbuchi, K. Pevzner, D. Pickup, P. Rosin, A. Sharf, L. Sun, X. Sun, S. Tari, G. Unal, and R. C. Wilson. Non-rigid 3D Shape Retrieval. In I. Pratikakis, M. Spagnuolo, T. Theoharis, L. V. Gool, and R. Veltkamp, editors, Eurographics Workshop on 3D Object Retrieval. The Eurographics Association, 2015. [13] M. Lin, Q. Chen, and S. Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. [14] L. Luciano and A. B. Hamza. Deep learning with geodesic moments for 3d shape classification. Pattern Recognition Letters, 2017. [15] J. Masci, D. Boscaini, M. Bronstein, and P. Vandergheynst. Geodesic convolutional neural networks on riemannian manifolds. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 37–45, 2015. [16] M. Meyer, M. Desbrun, P. Schröder, A. H. Barr, et al. Discrete differential-geometry operators for triangulated 2-manifolds. Visualization and mathematics, 3(2):52–58, 2002. [17] N. J. MITRA, A. NGUYEN, and L. GUIBAS. Estimating surface normals in noisy point cloud data. International Journal of Computational Geometry & Applications, 14(04n05):261–276, 2004. [18] I. Occipital. Structure sensor-3d scanning, augmented reality, and more for mobile devices, 2016. 9 [19] M. Pauly, L. P. Kobbelt, and M. Gross. Point-based multiscale surface representation. ACM Transactions on Graphics (TOG), 25(2):177–193, 2006. [20] C. R. Qi, H. Su, K. Mo, and L. J. Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. arXiv preprint arXiv:1612.00593, 2016. [21] C. R. Qi, H. Su, M. Nießner, A. Dai, M. Yan, and L. Guibas. Volumetric and multi-view cnns for object classification on 3d data. In Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2016. [22] G. Riegler, A. O. Ulusoys, and A. Geiger. Octnet: Learning deep 3d representations at high resolutions. arXiv preprint arXiv:1611.05009, 2016. [23] R. M. Rustamov, Y. Lipman, and T. Funkhouser. Interior distance using barycentric coordinates. In Computer Graphics Forum, volume 28, pages 1279–1288. Wiley Online Library, 2009. [24] P. Y. Simard, D. Steinkraus, and J. C. Platt. Best practices for convolutional neural networks applied to visual document analysis. In ICDAR, volume 3, pages 958–962, 2003. [25] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [26] H. Su, S. Maji, E. Kalogerakis, and E. G. Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In Proc. ICCV, to appear, 2015. [27] J. Sun, M. Ovsjanikov, and L. Guibas. A concise and provably informative multi-scale signature based on heat diffusion. In Computer graphics forum, volume 28, pages 1383–1392. Wiley Online Library, 2009. [28] O. Vinyals, S. Bengio, and M. Kudlur. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391, 2015. [29] P.-S. WANG, Y. LIU, Y.-X. GUO, C.-Y. SUN, and X. TONG. O-cnn: Octree-based convolutional neural networks for 3d shape analysis. 2017. [30] M. Weinmann, B. Jutzi, S. Hinz, and C. Mallet. Semantic point cloud interpretation based on optimal neighborhoods, relevant features and efficient classifiers. ISPRS Journal of Photogrammetry and Remote Sensing, 105:286–304, 2015. [31] Z. Wu, S. Song, A. Khosla, F. Yu, L. Zhang, X. Tang, and J. Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1912–1920, 2015. [32] L. Yi, V. G. Kim, D. Ceylan, I.-C. Shen, M. Yan, H. Su, C. Lu, Q. Huang, A. Sheffer, and L. Guibas. A scalable active framework for region annotation in 3d shape collections. SIGGRAPH Asia, 2016. [33] L. Yi, H. Su, X. Guo, and L. Guibas. Syncspeccnn: Synchronized spectral cnn for 3d shape segmentation. arXiv preprint arXiv:1612.00606, 2016. 10 | 2017 | 553 |
7,067 | Approximation Bounds for Hierarchical Clustering: Average Linkage, Bisecting K-means, and Local Search Benjamin Moseley∗ Carnegie Mellon University Pittsburgh, PA 15213, USA moseleyb@andrew.cmu.edu Joshua R. Wang† Department of Computer Science Stanford University 353 Serra Mall, Stanford, CA 94305, USA joshua.wang@cs.stanford.edu Abstract Hierarchical clustering is a data analysis method that has been used for decades. Despite its widespread use, the method has an underdeveloped analytical foundation. Having a well understood foundation would both support the currently used methods and help guide future improvements. The goal of this paper is to give an analytic framework to better understand observations seen in practice. This paper considers the dual of a problem framework for hierarchical clustering introduced by Dasgupta [Das16]. The main result is that one of the most popular algorithms used in practice, average linkage agglomerative clustering, has a small constant approximation ratio for this objective. Furthermore, this paper establishes that using bisecting k-means divisive clustering has a very poor lower bound on its approximation ratio for the same objective. However, we show that there are divisive algorithms that perform well with respect to this objective by giving two constant approximation algorithms. This paper is some of the first work to establish guarantees on widely used hierarchical algorithms for a natural objective function. This objective and analysis give insight into what these popular algorithms are optimizing and when they will perform well. 1 Introduction Hierarchical clustering is a widely used method to analyze data. See [MC12, KBXS12, HG05] for an overview and pointers to relevant work. In a typical hierarchical clustering problem, one is given a set of n data points and a notion of similarity between the points. The output is a hierarchy of clusters of the input. Specifically, a dendrogram (tree) is constructed where the leaves correspond to the n input data points and the root corresponds to a cluster containing all data points. Each internal node of the tree corresponds to a cluster of the data points in its subtree. The clusters (internal nodes) become more refined as the nodes are lower in the tree. The goal is to construct the tree so that the clusters deeper in the tree contain points that are relatively more similar. There are many reasons for the popularity of hierarchical clustering, including that the number of clusters is not predetermined and that the clusters produced induce taxonomies that give meaningful ways to interpret data. Methods used to perform hierarchical clustering are divided into two classes: agglomerative and divisive. Agglomerative algorithms are a bottom-up approach and are more commonly used than ∗Benjamin Moseley was supported in part by a Google Research Award, a Yahoo Research Award and NSF Grants CCF-1617724, CCF-1733873 and CCF-1725661. This work was partially done while the author was working at Washington University in St. Louis. †Joshua R. Wang was supported in part by NSF Grant CCF-1524062. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. divisive approaches [HTF09]. In an agglomerative method, each of the n input data points starts as a cluster. Then iteratively, pairs of similar clusters are merged according to some appropriate metric of similarity. Perhaps the most popular metric to define similarity is average linkage where the similarity between two clusters is defined as the average similarity between all pairs of data points in the two clusters. In average linkage agglomerative clustering the two clusters with the highest average similarity are merged at each step. Other metrics are also popular. Related examples include: single linkage, where the similarity between two clusters is the maximum similarity between any two single data points in each cluster, and complete linkage, where the distance is the minimum similarity between any two single data points in each cluster. Divisive algorithms are a top-down approach where initially all data points belong to a single cluster. Splits are recursively performed, dividing a cluster into two clusters that will be further divided. The process continues until each cluster consists of a single data point. In each step of the algorithm, the data points are partitioned such that points in each cluster are more similar than points across clusters. There are several approaches to perform divisive clustering. One example is bisecting k-means where k-means is used at each step with k = 2. For details on bisecting k-means, see [Jai10]. Motivation: Hierarchical clustering has been used and studied for decades. There has been some work on theoretically quantifying the quality of the solutions produced by algorithms, such as [ABBL12, AB16, ZB09, BA08, Das16]. Much of this work focuses on deriving the structure of solutions created by algorithms or analytically describing desirable properties of a clustering algorithm. Though the area has been well-studied, there is no widely accepted formal problem framework. Hierarchical clustering describes a class of algorithmic methods rather than a problem with an objective function. Studying a formal objective for the problem could lead to the ability to objectively compare different methods; there is a desire for the community to investigate potential objectives. This would further support the use of current methods and guide the development of improvements. This paper is concerned with investigating objectives for hierarchical clustering. The main goal and result of this paper is giving a natural objective that results in a theoretical guarantee for the most commonly used hierarchical clustering algorithm, average linkage agglomerative clustering. This guarantee gives support for why the algorithm is popular in practice and the objective gives insight into what the algorithm optimizes. This paper also proves a bad lower bound on bisecting k-means with respect to the same natural objective. This objective can therefore be used as a litmus test for the applicability of particular algorithms. This paper further gives top-down approaches that do have strong theoretical guarantees for the objective. Problem Formulation: Towards this paper’s goal, first a formal problem framework for hierarchical clustering needs to be established. Recently, Dasgupta [Das16] introduced a new problem framework for hierarchical clustering. This work justified their objective by establishing that for several sample problem instances, the resulting solution corresponds to what one might expect out of a desirable solution. This work has spurred considerable interest and there have been several follow up papers [CC17, Das16, RP16]. In the problem introduced by Dasgupta [Das16] there is a set of n data points as input and for two points i and j there is a weight wi,j denoting their similarity. The higher the weight, the larger the similarity. This is represented as a weighted complete graph G. In the problem the output is a (full) binary tree where the leaves of the tree correspond to the input data points. For each pair of points i and j, let T[i∨j] denote the subtree rooted at i and j’s least common ancestor. Let leaves(T[i∨j]) denote the set of leaves in the tree T[i ∨j]. The goal is to construct the tree such that the cost costG(T) := P i,j∈[n] wij|leaves(T[i ∨j])| is minimized. Intuitively, this objective enforces that more similar points i and j should have a lower common ancestor in the tree because the weight wi,j is large and having a smaller least common ancestor ensures that |leaves(T[i ∨j])| is smaller. In particular, more similar points should be separated at lower levels of the hierarchical clustering. For this objective, several approximation algorithms have been given [CC17, Das16, RP16]. It is known that there is a divisive clustering algorithm with an approximation ratio of O(√log n) [CC17]. In particular, the algorithm gives a O(αn)-approximation where αn is the approximation ratio of the sparsest cut subroutine [CC17]. Furthermore, assuming the Small-Set Expansion Hypothesis, every algorithm is a ω(1)-approximation [CC17]. The current best known bound on αn is O(√log n) [ARV09]. Unfortunately, this conclusion misses one of our key goals in trying to establish an 2 objective function. While the algorithms and analysis are ingenious, none of the algorithms with theoretical guarantees are from the class of algorithms used in practice. Due to the complexity of the proposed algorithms, it will also be difficult to put them into practice. Hence the question still looms: are there strong theoretical guarantees for practical algorithms? Is the objective from [Das16] the ideal objective for our goals? Is there a natural objective that admits solutions that are provably close to optimal? Results: In this paper, we consider an objective function motivated by the objective introduced by Dasgupta in [Das16]. For a given tree T let |non-leaves(T[i ∨j])| be the total number of leaves that are not in the subtree rooted at the least common ancestor of i and j. The objective in [Das16] focuses on constructing a binary tree T to minimize the cost costG(T) := P i,j∈[n] wij|leaves(T[i ∨j])|. This paper considers the dual problem where T is constructed to maximize the revenue revG(T) := P i,j∈[n] wij|non-leaves(T[i ∨j])| = (n P i,j∈[n] wi,j) −costG(T). It is important to observe that the optimal clustering is the same for both objectives. Due to this, all the examples given in [Das16] motivating their objective by showing desirable structural properties of the optimal solution also apply to the objective considered in this paper. Our objective can be interpreted similarly to that in [Das16]. In particular, similar points i and j should be located lower in the tree as to maximize |non-leaves(T[i ∨j])|, the points that get separated at high levels of the hierarchical clustering. This paper gives a thorough investigation of this new problem framework by analyzing several algorithms for the objective. The main result is establishing that average linkage clustering is a 1 3approximation. This result gives theoretical justification for the use of average linkage clustering and, additionally, this shows that the objective considered is tractable since it admits Ω(1)-approximations. This suggests that the objective captures a component of what average linkage is optimizing for. This paper then seeks to understand what other algorithms are good for this objective. In particular, is there a divisive algorithm with strong theoretical guarantees? What can be said about practical divisive algorithms? We establish that bisecting k-means is no better than a O( 1 √n) approximation. This establishes that this method is very poor for the objective considered. This suggests that bisecting k-means is optimizing for something different than what average linkage optimizes for. Given this negative result, we question whether there are divisive algorithms that optimize for our objective. We answer this question affirmatively by giving a local search strategy that obtains a 1 3-approximation as well as showing that randomly partitioning is a tight 1 3-approximation. The randomized algorithm can be found in the supplementary material. Other Related Work: Very recently a contemporaneous paper [CKMM17] done independently has been published on ArXiv. This paper considers another class of objectives motivated by the work of [Das16]. For their objective, they also derive positive results for average linkage clustering. 2 Preliminaries In this section, we give preliminaries including a formal definition of the problem considered and basic building blocks for later algorithm analysis. In the Revenue Hierarchical Clustering Problem there are n input data points given as a set V . There is a weight wi,j ≥0 between each pair of points i and j denoting their similarity, represented as a complete graph G. The output of the problem is a rooted tree T where the leaves correspond to the data points and the internal nodes of the tree correspond to clusters of the points in the subtree. We will use the indices 1, 2, . . . n to denote the leaves of the tree. For two leaves i and j, let T[i∨j] denote the subtree rooted at the least common ancestor of i and j and let the set non-leaves(T[i ∨j]) denote the number of leaves in T that are not in T[i ∨j]. The objective is to construct T to maximize the revenue revG(T) = P i∈[n] P j̸=i∈[n] wi,j|non-leaves(T[i ∨j])|. We make no assumptions on the structure of the optimal tree T; however, one optimal tree is a binary tree, so we may restrict the solution to binary trees without loss of generality. To see this, let leaves(T[i ∨j]) be the set of leaves in T[i ∨j] and costG(T) := P i,j wij|leaves(T[i ∨j])|. The objective considered in [Das16] focuses on minimizing costG(T). We note than costG(T) + revG(T) = n P i,j wi,j, so the optimal solution to minimizing costG(T) is the same as the optimal 3 solution to maximizing revG(T). In [Das16] it was shown that the optimal solution for any input is a binary tree. As mentioned, there are two common types of algorithms for hierarchical clustering: agglomerative (bottom-up) algorithms and divisive (top-down) algorithms. In an agglomerative algorithm, each vertex v ∈V begins in separate cluster, and each iteration of the algorithm chooses two clusters to merge into one. In a divisive algorithm, all vertices v ∈V begin in a single cluster, and each iteration of the algorithm selects a cluster with more than one vertex and partitions it into two small clusters. In this section, we present some basic techniques which we later use to analyze the effect each iteration has on the revenue. It will be convenient for us to think of the weight function as taking in two vertices instead of an edge, i.e. w : V × V →R≥0. This is without loss of generality, because we can always set the weight of any nonedge to zero (e.g. wvv = 0 ∀v ∈V ). To bound the performance of an algorithm it suffices to bound revG(T) and costG(T) since revG(T)+ costG(T) = n P i,j wi,j. Further, let T ∗denote the optimal hierarchical clustering. Then its revenue is at most revG(T ∗) ≤(n −2) P ij wij. This is because any edge ij can have at most (n −2) non-leaves for its subtree T[i ∨j]; i and j are always leaves. 2.1 Analyzing Agglomerative Algorithms In this section, we discuss a method for bounding the performance of an agglomerative algorithm. When an agglomerative algorithm merges two clusters A, B, this determines the least common ancestor for any pair of nodes i, j where i ∈A and j ∈B. Given this, we define the revenue gain due to merging A and B as, merge-revG(A, B) := (n −|A| −|B|) P a∈A,b∈B wab. Notice that the final revenue revG(T) is exactly the sum over iterations of the revenue gains, since each edge is counted exactly once: when its endpoints are merged into a single cluster. Hence, revG(T) = P merges A, B merge-revG(A, B). We next define the cost of merging A and B as the following. This is the potential revenue lost by merging A and B; revenue that can no longer be gained after A and B are merged, but was initially possible. Define, merge-costG(A, B) := |B| P a∈A,c∈[n]\(A∪B) wac + |A| P b∈B,c∈[n]\(A∪B) wbc. The total cost of the tree T, costG(T), is exactly the sum over iterations of the cost increases, plus an additional 2 P ij wij term that accounts for each edge being counted towards its own endpoints. We can see why this is true if we consider a pair of vertices i, j ∈[n] in the final hierarchical clustering T. If at some point a cluster containing i is merged with a third cluster before it gets merged with the cluster containing j, then the number of leaves in T[i ∨j] goes up by the size of the third cluster. This is exactly the quantity captured by our cost increase definition. Aggregated over all pairs i, j this is the following, costG(T) = P i,j∈[n] wij|leaves(T[i ∨j])| = 2 P i,j∈[n] wij + P merges A, B merge-costG(A, B). 2.2 Analyzing Divisive Algorithms Similar reasoning can be used for divisive algorithms. The following are revenue gain and cost increase definitions for when a divisive algorithm partitions a cluster into two clusters A, B. Define, split-revG(A, B) := |B| P a,a′∈A waa′ + |A| P b,b′∈B wbb′ and split-costG(A, B) := (|A| + |B|) P a∈A,b∈B wab. Consider the revenue gain. For a, a′ ∈A we are now guaranteed that when the nodes in B are split from A then every node in B will not be a leaf in T[a ∨a′] (and a symmetric term for when they are both in B). On the cost side, the term counts the cost of any pairs a ∈A and b ∈B that are now separated since we now know their subtree T[i ∨j] has exactly the nodes in A ∪B as leaves. 3 A Theoretical Guarantee for Average Linkage Agglomerative Clustering In this section, we present the main result, a theoretical guarantee on average linkage clustering. We additionally give a bad example lower bounding the best performance of the algorithm. See [MC12] for details and background on this widely used algorithm. The formal definition of the algorithm 4 is given in the following pseudocode. The main idea is that initially all n input points are in their own cluster and the algorithm recursively merges clusters until there is one cluster. In each step, the algorithm mergers the clusters A and B such that the pair maximizes the average distances of points between the two clusters, 1 |A||B| P a∈A,b∈B wab. Data: Vertices V , weights w : E →R≥0 Initialize clusters C ←∪v∈V {v}; while |C| ≥2 do Choose A, B ∈C to maximize ¯w(A, B) := 1 |A||B| P a∈A,b∈B wab; Set C ←C ∪{A ∪B} \ {A, B}; end Algorithm 1: Average Linkage The following theorem establishes that this algorithm is only a small constant factor away from optimal. Theorem 3.1. Consider a graph G = (V, E) with nonnegative edge weights w : E →R≥0. Let the hierarchical clustering T ∗be a optimal solution maximizing of revG(·) and let T be the hierarchical clustering returned by Algorithm 1. Then, revG(T) ≥1 3revG(T ∗). Proof. Consider an iteration of Algorithm 1. Let the current clusters be in the set C, and the algorithm chooses to merge clusters A and B from C. When doing so, the algorithm attains a revenue gain of the following. Let ¯w(A, B) = 1 |A||B| P a∈A,b∈B wab be the average weight of an edge between points in A and B. merge-revG(A, B) = (n −|A| −|B|) X a∈A,b∈B wab = X C∈C\{A,B} |C| X a∈A,b∈B wab = X C∈C\{A,B} |C||A||B| ¯w(A, B) while at the same time incurring a cost increase of: merge-costG(A, B) = |B| X a∈A,c∈[n]\(A∪B) wac + |A| X b∈B,c∈[n]\(A∪B) wbc = |B| X C∈C\{A,B} X a∈A,c∈C wac + |A| X C∈C\{A,B} X b∈B,c∈C wbc = X C∈C\{A,B} |B||A||C| ¯w(A, C) + X C∈C\{A,B} |A||B||C| ¯w(B, C) ≤ X C∈C\{A,B} |B||A||C| ¯w(A, B) + X C∈C\{A,B} |A||B||C| ¯w(A, B) = 2 · merge-revG(A, B) Intuitively, every time this algorithm loses two units of potential it cements the gain of one unit of potential, which is why it is a 1 3-approximation. Formally: costG(T) = 2 X i,j wij + X merges A, B merge-costG(A, B) ≤2 X i,j wij + 2 · X merges A, B merge-revG(A, B) ≤2 X i,j wij + 2 · revG(T) Now the revenue can be bounded as follows. revG(T) ≥n X ij wij −costG(T) ≥n X ij wij −2 X i,j wij −2 · revG(T) revG(T) ≥n −2 3 X ij wij ≥1 3revG(T ∗) where the last step follows from the fact that it is impossible to have more than n −2 non-leaves. 5 u v · · · · · · 1 + δ n/2 nodes n/2 nodes Figure 1: Hard graph for Average Linkage (k = 2 case). In the following, we establish that the algorithm is at best a 1/2 approximation. The proof can be found in Section 1 of the supplementary material. Lemma 3.2. Let ϵ > 0 be any fixed constant. There exists a graph G = (V, E) with nonnegative edge weights w : E →R≥0, such that if the hierarchical clustering T ∗is an optimal solution of revG(·) and T is the hierarchical clustering returned by Average Linkage, revG(T) ≤ 1 2 + ϵ revG(T ∗). 4 A Lower Bound on Bisecting k-means In this section, we consider the divisive algorithm which uses the k-means objective (with k = 2) when choosing how to split clusters. Normally, the k-means objective concerns the distances between points and their cluster center: min Pk i=1 P x∈Si ||x −µi||2. However, it is known that this can be rewritten as a sum over intra-cluster distances: min Pk i=1 1 |Si| P x,y∈Si ||x−y||2 [ABC+15]. In other words, when splitting a cluster into two sets A and B, the algorithm minimizes 1 |A| P a,a′∈A ||a − a′||2 + 1 B P b,b′∈B ||b −b′||2. At first glance, this appears to almost capture split-revG(A, B); the key difference is that the summation has been scaled down by a factor of |A||B|. Of course, it also involves minimization over squared distances instead of maximization over similarity weights. We show that the divisive algorithm which splits clusters by the natural k-means similarity objective, namely max 1 |A| P a,a′∈A waa′ + 1 |B| P b,b′∈B wbb′, is not a good approximation to the optimal hierarchical clustering. Lemma 4.1. There exists a graph G = (V, E) with nonnegative edge weights w : E →R≥0, such that if the hierarchical clustering T ∗is a maximizer of revG(·) and T is the hierarchical clustering returned by the divisive algorithm which, splits clusters by the k-means similarity objective, revG(T) ≤ 1 Ω(√n)revG(T ∗). Proof. The plan is to exploit the fact that k-means is optimizing an objective function which differs from the actual split revenue by a factor of |A||B|. We use almost the same group as in the lower bound against Average Linkage, except that the weight of the edge between u and v is √n. There are still unit weight edges between u and n 2 −1 other nodes and unit weight edges between v and the remaining n 2 −1 nodes. See Figure 1 for the structure of this graph. The key claim is that Divisive k-means will begin by separating u and v from all other nodes. It is easy to see that this split scores a value of 1 2 √n under our alternate k-means objective function. Why does no other split score better? Well, any other split can either keep u and v together or separate them. If the split keeps the two together along with k other nodes, then it scores at most 1 k+2[√n + k] ≤ √n k+2 + 1, which is less than 1 2 √n if √n > 6. If the split separates the two, then it scores at most 2, since at best each side can be a tree of weight one edges and hence has fewer edges than nodes. Now that we have established our key claim, it is easy to see that Divisive k-means is done scoring on this graph, since it must next cut the edge uv and the other larger cluster has no edges in it. Hence Divisive k-means will score √n(n −2) on this graph. 6 As before, the optimal clustering may merge u with its other neighbors first and v with its other neighbors first, scoring a revenue gain of 2 [(n −2) + (n −3) + · · · + (n/2)] = 3 4n2 −O(n). There is a Ω(√n) gap between these revenues, completing the proof. 5 Divisive Local-Search In this section, we develop a simple local search algorithm and bound its approximation ratio. The local search algorithm takes as input a cluster C and divides it into two clusters A and B to optimize a local objective: the split revenue. In particular, initially A = B = ∅. Each node in C is added to A or B uniformly at random. Local search is run by moving individual nodes between A and B. In a step, any point i ∈A (resp. B) is added to B (resp. A) if P j,l∈A;j,l̸=i wj,l + (|A| −1) P j∈B wi,j > P j,l∈B wj,l + |B| P j∈A,j̸=i wi,j (resp. P j,l∈B;j,l̸=i wj,l + (|B| −1) P j∈A wi,j > P j,l∈A wj,l + |A| P j∈B,j̸=i wi,j). This states that a point is moved to another set if the objective increases. The algorithm performs these local moves until there is no node that can be moved to improve the objective. Data: Vertices V , weights w : E →R≥0 Initialize clusters C ←{V }; while some cluster C ∈C has more than one vertex do Let A, B be a uniformly random 2-partition of C; Run local search on A, B to maximize |B| P a,a′∈A waa′ + |A| P b,b′∈B wbb′, considering just moving a single node; Set C ←C ∪{A, B} \ {C}; end Algorithm 2: Divisive Local-Search In the following theorem, we show that the algorithm is arbitrarily close to a 1 3 approximation. Theorem 5.1. Consider a graph G = (V, E) with nonnegative edge weights w : E →R≥0. Let the hierarchical clustering T ∗be the optimal solution of revG(·) and let T be the hierarchical clustering returned by Algorithm 2. Then, revG(T) ≥(n−6) (n−2) 1 3revG(T ∗). Proof. Since we know that revG(T ∗) ≤(n −2) P ij wij, it suffices to show that revG(T) ≥ 1 3(n −2) P ij wij. We do this by considering possible local moves at every step. Consider any step of the algorithm and suppose the algorithm decides to partition a cluster into A, B. As stated in the algorithm, its local search objective value is OBJ = |B| P a,a′∈A waa′ + |A| P b,b′∈B wbb′. Assume without loss of generality that |B| ≥|A|, and consider the expected local search objective OBJ′ value for moving a random node from B to A. Note that the new local search objective value is at most what the algorithm obtained, i.e. OBJ′ ≤OBJ: E[OBJ′] = (|B| −1) X a,a′∈A waa′ + 1 |B| X a∈A,b∈B wab + (|A| + 1) |B|−1 2 |B| 2 X b,b′∈B wbb′ = (|B| −1) X a,a′∈A waa′ + 1 |B| X a∈A,b∈B wab + (|A| + 1) |B| −2 |B| X b,b′∈B wbb′ = (|B| −1) X a,a′∈A waa′ + |B| −1 |B| X a∈A,b∈B wab + (|A| + 1) (1 −2 |B|) X b,b′∈B wbb′ = OBJ − X a,a′∈A waa′ + |B| −1 |B| X a∈A,b∈B wab + (−2|A| |B| + 1 −2 |B|) X b,b′∈B wbb′ 7 But since there are no improving moves we know the following. 0 ≥E[OBJ′] −OBJ = − X a,a′∈A waa′ + |B| −1 |B| X a∈A,b∈B wab −2|A| −|B| + 2 |B| X b,b′∈B wbb′ Rearranging terms and multiplying by |B| yields the following. (|B| −1) X a∈A,b∈B wab ≤|B| X a,a′∈A waa′ + (2|A| −|B| + 2) X b,b′∈B wbb′ We now consider three cases. Either (i) |B| ≥|A| + 2, (ii) |B| = |A| + 1, or (iii) |B| = |A|. Case (i) is straightforward: |B| −1 |A| + |B| split-costG(A, B) ≤split-revG(A, B) 1 2split-costG(A, B) ≤split-revG(A, B) In case (ii), we use the fact that (x + 2)(x −2) ≤(x + 1)(x −1) to simplify: |B| −1 |A| + |B| split-costG(A, B) ≤ |A| + 1 |A| split-revG(A, B) |B| −1 |A| + |B| split-costG(A, B) ≤ |B| + 2 |B| + 1 split-revG(A, B) |B| + 1 |B| + 2 |B| −1 |A| + |B| split-costG(A, B) ≤split-revG(A, B) |B| −2 |A| + |B| split-costG(A, B) ≤split-revG(A, B) 1 2 − 1.5 |A| + |B| split-costG(A, B) ≤split-revG(A, B) Case (iii) proceeds similarly; we now use the fact that (x + 2)(x −3) ≤(x)(x −1) to simplify: |B| −1 |A| + |B| split-costG(A, B) ≤ |A| + 2 |A| split-revG(A, B) |B| −1 |A| + |B| split-costG(A, B) ≤ |B| + 2 |B| split-revG(A, B) |B| |B| + 2 |B| −1 |A| + |B| split-costG(A, B) ≤split-revG(A, B) |B| −3 |A| + |B| split-costG(A, B) ≤split-revG(A, B) 1 2 − 3 |A| + |B| split-costG(A, B) ≤split-revG(A, B) 8 Hence we have shown that for each step of our algorithm, the split revenue is at least ( 1 2 − 3 |A|+|B|) times the split cost. We rewrite this inequality and then sum over all iterations: split-revG(A, B) ≥1 2split-costG(A, B) −3 X a∈A,b∈B wab revG(T) ≥1 2costG(T) −3 X i,j∈[n] wij = 1 2 n X i,j∈[n] wij −revG(T) −3 X i,j∈[n] wij 3 2revG(T) ≥n −6 2 X i,j∈[n] wij revG(T) ≥n −6 3 X i,j∈[n] wij This is what we wanted to prove. We note that it is possible to improve the loss in terms of n to n−4 n−2 by instead considering the local search objective (|B| −1) P a,a′∈A waa′ + (|A| −1) P b,b′∈B wbb′. 6 Conclusion One purpose of developing an analytic framework for problems is that it can help clarify and explain our observations from practice. In this case, we have shown that average linkage is a 1 3-approximation to a particular objective function, and the analysis that does so helps explain what average linkage is optimizing. There is much more to explore in this direction. Are there other objective functions which characterize other hierarchical clustering algorithms? For example, what are bisecting k-means, single-linkage, and complete-linkage optimizing for? An analytic framework can also serve to guide development of new algorithms. How well can this dual objective be approximated? For example, we suspect that average linkage is actually a constant approximation strictly better than 1 3. Could a smarter algorithm break the 1 2 threshold? Perhaps the 1 2 threshold is due to a family of graphs which we do not expect to see in practice. Is there a natural input restriction that would allow for better guarantees? References [AB16] Margareta Ackerman and Shai Ben-David. A characterization of linkage-based hierarchical clustering. Journal of Machine Learning Research, 17:232:1–232:17, 2016. [ABBL12] Margareta Ackerman, Shai Ben-David, Simina Brânzei, and David Loker. Weighted clustering. In Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence, July 22-26, 2012, Toronto, Ontario, Canada., 2012. [ABC+15] Pranjal Awasthi, Afonso S Bandeira, Moses Charikar, Ravishankar Krishnaswamy, Soledad Villar, and Rachel Ward. Relax, no need to round: Integrality of clustering formulations. In Proceedings of the 2015 Conference on Innovations in Theoretical Computer Science, pages 191–200. ACM, 2015. [ARV09] Sanjeev Arora, Satish Rao, and Umesh V. Vazirani. Expander flows, geometric embeddings and graph partitioning. J. ACM, 56(2):5:1–5:37, 2009. [BA08] Shai Ben-David and Margareta Ackerman. Measures of clustering quality: A working set of axioms for clustering. In Advances in Neural Information Processing Systems 21, Proceedings of the Twenty-Second Annual Conference on Neural Information Processing Systems, Vancouver, British Columbia, Canada, December 8-11, 2008, pages 121–128, 2008. 9 [CC17] Moses Charikar and Vaggos Chatziafratis. Approximate hierarchical clustering via sparsest cut and spreading metrics. In Proceedings of the Twenty-Eighth Annual ACMSIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 841–854, 2017. [CKMM17] Vincent Cohen-Addad, Varun Kanade, Frederik Mallmann-Trenn, and Claire Mathieu. Hierarchical clustering: Objective functions and algorithms. CoRR, abs/1704.02147, 2017. [Das16] Sanjoy Dasgupta. A cost function for similarity-based hierarchical clustering. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 118–127, 2016. [HG05] Katherine A. Heller and Zoubin Ghahramani. Bayesian hierarchical clustering. In Machine Learning, Proceedings of the Twenty-Second International Conference (ICML 2005), Bonn, Germany, August 7-11, 2005, pages 297–304, 2005. [HTF09] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. Unsupervised Learning, pages 485–585. Springer New York, New York, NY, 2009. [Jai10] Anil K. Jain. Data clustering: 50 years beyond k-means. Pattern Recognition Letters, 31(8):651 – 666, 2010. [KBXS12] Akshay Krishnamurthy, Sivaraman Balakrishnan, Min Xu, and Aarti Singh. Efficient active algorithms for hierarchical clustering. In Proceedings of the 29th International Conference on Machine Learning, ICML 2012, Edinburgh, Scotland, UK, June 26 - July 1, 2012, 2012. [MC12] Fionn Murtagh and Pedro Contreras. Algorithms for hierarchical clustering: an overview. Wiley Interdisc. Rew.: Data Mining and Knowledge Discovery, 2(1):86–97, 2012. [RP16] Aurko Roy and Sebastian Pokutta. Hierarchical clustering via spreading metrics. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 2316–2324, 2016. [ZB09] Reza Zadeh and Shai Ben-David. A uniqueness theorem for clustering. In UAI 2009, Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, Montreal, QC, Canada, June 18-21, 2009, pages 639–646, 2009. 10 | 2017 | 554 |
7,068 | Thinking Fast and Slow with Deep Learning and Tree Search Thomas Anthony1, , Zheng Tian1, and David Barber1,2 1University College London 2Alan Turing Institute thomas.anthony.14@ucl.ac.uk Abstract Sequential decision making problems, such as structured prediction, robotic control, and game playing, require a combination of planning policies and generalisation of those plans. In this paper, we present Expert Iteration (EXIT), a novel reinforcement learning algorithm which decomposes the problem into separate planning and generalisation tasks. Planning new policies is performed by tree search, while a deep neural network generalises those plans. Subsequently, tree search is improved by using the neural network policy to guide search, increasing the strength of new plans. In contrast, standard deep Reinforcement Learning algorithms rely on a neural network not only to generalise plans, but to discover them too. We show that EXIT outperforms REINFORCE for training a neural network to play the board game Hex, and our final tree search agent, trained tabula rasa, defeats MOHEX 1.0, the most recent Olympiad Champion player to be publicly released. 1 Introduction According to dual-process theory [1, 2], human reasoning consists of two different kinds of thinking. System 1 is a fast, unconscious and automatic mode of thought, also known as intuition or heuristic process. System 2, an evolutionarily recent process unique to humans, is a slow, conscious, explicit and rule-based mode of reasoning. When learning to complete a challenging planning task, such as playing a board game, humans exploit both processes: strong intuitions allow for more effective analytic reasoning by rapidly selecting interesting lines of play for consideration. Repeated deep study gradually improves intuitions. Stronger intuitions feedback to stronger analysis, creating a closed learning loop. In other words, humans learn by thinking fast and slow. In deep Reinforcement Learning (RL) algorithms such as REINFORCE [3] and DQN [4], neural networks make action selections with no lookahead; this is analogous to System 1. Unlike human intuition, their training does not benefit from a ‘System 2’ to suggest strong policies. In this paper, we present Expert Iteration (EXIT), which uses a Tree Search as an analogue of System 2; this assists the training of the neural network. In turn, the neural network is used to improve the performance of the tree search by providing fast ‘intuitions’ to guide search. At a low level, EXIT can be viewed as an extension of Imitation Learning (IL) methods to domains where the best known experts are unable to achieve satisfactory performance. In IL an apprentice is trained to imitate the behaviour of an expert policy. Within EXIT, we iteratively re-solve the IL problem. Between each iteration, we perform an expert improvement step, where we bootstrap the (fast) apprentice policy to increase the performance of the (comparatively slow) expert. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Typically, the apprentice is implemented as a deep neural network, and the expert by a tree search algorithm. Expert improvement can be achieved either by using the apprentice as an initial bias in the search direction, or to assist in quickly estimating the value of states encountered in the search tree, or both. We proceed as follows: in section 2, we cover some preliminaries. Section 3 describes the general form of the Expert Iteration algorithm, and discusses the roles performed by expert and apprentice. Sections 4 and 5 dive into the implementation details of the Imitation Learning and expert improvement steps of EXIT for the board game Hex. The performance of the resultant EXIT algorithm is reported in section 6. Sections 7 and 8 discuss our findings and relate the algorithm to previous works. 2 Preliminaries 2.1 Markov Decision Processes We consider sequential decision making in a Markov Decision Process (MDP). At each timestep t, an agent observes a state st and chooses an action at to take. In a terminal state sT , an episodic reward R is observed, which we intend to maximise.1 We can easily extend to two-player, perfect information, zero-sum games by learning policies for both players simultaneously, which aim to maximise the reward for the respective player. We call a distribution over the actions a available in state s a policy, and denote it π(a|s). The value function V π(s) is the mean reward from following π starting in state s. By Qπ(s, a) we mean the expected reward from taking action a in state s, and following policy π thereafter. 2.2 Imitation Learning In Imitation Learning (IL), we attempt to solve the MDP by mimicking an expert policy π∗that has been provided. Experts can arise from observing humans completing a task, or, in the context of structured prediction, calculated from labelled training data. The policy we learn through this mimicry is referred to as the apprentice policy. We create a dataset of states of expert play, along with some target data drawn from the expert, which we attempt to predict. Several choices of target data have been used. The simplest approach is to ask the expert to name an optimal move π∗(a|s) [5]. Once we can predict expert moves, we can take the action we think the expert would have most probably taken. Another approach is to estimate the action-value function Qπ∗(s, a). We can then predict that function, and act greedily with respect to it. In contrast to direct action prediction, this target is cost-sensitive, meaning the apprentice can trade-off prediction errors against how costly they are [6]. 3 Expert iteration Compared to IL techniques, Expert Iteration (EXIT) is enriched by an expert improvement step. Improving the expert player and then resolving the Imitation Learning problem allows us to exploit the fast convergence properties of Imitation Learning even in contexts where no strong player was originally known, including when learning tabula rasa. Previously, to solve such problems, researchers have fallen back on RL algorithms that often suffer from slow convergence, and high variance, and can struggle with local minima. At each iteration i, the algorithm proceeds as follows: we create a set Si of game states by self play of the apprentice ˆπi−1. In each of these states, we use our expert to calculate an Imitation Learning target at s (e.g. the expert’s action π∗ i−1(a|s)); the state-target pairs (e.g. (s, π∗ i−1(a|s))) form our dataset Di . We train a new apprentice ˆπi on Di (Imitation Learning). Then, we use our new apprentice to update our expert π∗ i = π∗(a|s; ˆπi) (expert improvement). See Algorithm 1 for pseudo-code. 1This reward may be decomposed as a sum of intermediate rewards (i.e. R = PT t=0 rt) 2 The expert policy is calculated using a tree search algorithm. By using the apprentice policy to direct search effort towards promising moves, or by evaluating states encountered during search more quickly and accurately, we can help the expert find stronger policies. In other words, we bootstrap the knowledge acquired by Imitation Learning back into the planning algorithm. The Imitation Learning step is analogous to a human improving their intuition for the task by studying example problems, while the expert improvement step is analogous to a human using their improved intuition to guide future analysis. Algorithm 1 Expert Iteration 1: ˆπ0 = initial_policy() 2: π∗ 0 = build_expert(ˆπ0) 3: for i = 1; i ≤max_iterations; i++ do 4: Si = sample_self_play(ˆπi−1) 5: Di = {(s, imitation_learning_target(π∗ i−1(s)))|s ∈Si} 6: ˆπi = train_policy(Di) 7: π∗ i = build_expert(ˆπi) 8: end for 3.1 Choice of expert and apprentice The learning rate of EXIT is controlled by two factors: the size of the performance gap between the apprentice policy and the improved expert, and how close the performance of the new apprentice is to the performance of the expert it learns from. The former induces an upper bound on the new apprentice’s performance at each iteration, while the latter describes how closely we approach that upper bound. The choice of both expert and apprentice can have a significant impact on both these factors, so must be considered together. The role of the expert is to perform exploration, and thereby to accurately determine strong move sequences, from a single position. The role of the apprentice is to generalise the policies that the expert discovers across the whole state space, and to provide rapid access to that strong policy for bootstrapping in future searches. The canonical choice of expert is a tree search algorithm. Search considers the exact dynamics of the game tree local to the state under consideration. This is analogous to the lookahead human games players engage in when planning their moves. The apprentice policy can be used to bias search towards promising moves, aid node evaluation, or both. By employing search, we can find strong move sequences potentially far away from the apprentice policy, accelerating learning in complex scenarios. Possible tree search algorithms include Monte Carlo Tree Search [7], α-β Search, and greedy search [6]. The canonical apprentice is a deep neural network parametrisation of the policy. Such deep networks are known to be able to efficiently generalise across large state spaces, and they can be evaluated rapidly on a GPU. The precise parametrisation of the apprentice should also be informed by what data would be useful for the expert. For example, if state value approximations are required, the policy might be expressed implicitly through a Q function, as this can accelerate lookup. 3.2 Distributed Expert Iteration Because our tree search is orders of magnitude slower than the evaluations made during training of the neural network, EXIT spends the majority of run time creating datasets of expert moves. Creating these datasets is an embarassingly parallel task, and the plans made can be summarised by a vector measuring well under 1KB. This means that EXIT can be trivially parallelised across distributed architectures, even with very low bandwidth. 3.3 Online expert iteration In each step of EXIT, Imitation Learning is restarted from scratch. This throws away our entire dataset. Since creating datasets is computationally intensive this can add substantially to algorithm run time. 3 The online version of EXIT mitigates this by aggregating all datasets generated so far at each iteration. In other words, instead of training ˆπi on Di, we train it on D = ∪j≤iDj. Such dataset aggregation is similar to the DAGGER algorithm [5]. Indeed, removing the expert improvement step from online EXIT reduces it to DAGGER. Dataset aggregation in online EXIT allows us to request fewer move choices from the expert at each iteration, while still maintaining a large dataset. By increasing the frequency at which improvements can be made, the apprentice in online EXIT can generalise the expert moves sooner, and hence the expert improves sooner also, which results in higher quality play appearing in the dataset. 4 Imitation Learning in the game Hex We now describe the implementation of EXIT for the board game Hex. In this section, we develop the techniques for our Imitation Learning step, and test them for Imitation Learning of Monte Carlo Tree Search (MCTS). We use this test because our intended expert is a version of Neural-MCTS, which will be described in section 5. 4.1 Preliminaries Hex Hex is a two-player connection-based game played on an n × n hexagonal grid. The players, denoted by colours black and white, alternate placing stones of their colour in empty cells. The black player wins if there is a sequence of adjacent black stones connecting the North edge of the board to the South edge. White wins if they achieve a sequence of adjacent white stones running from the West edge to the East edge. (See figure 1). Figure 1: A 5 × 5 Hex game, won by white. Figure from Huang et al. [? ]. Hex requires complex strategy, making it challenging for deep Reinforcement Learning algorithms; its large action set and connection-based rules means it shares similar challenges for AI to Go. However, games can be simulated efficiently because the win condition is mutually exclusive (e.g. if black has a winning path, white cannot have one), its rules are simple, and permutations of move order are irrelevant to the outcome of a game. These properties make it an ideal test-bed for Reinforcement Learning. All our experiments are on a 9 × 9 board size. Monte Carlo Tree Search Monte Carlo Tree Search (MCTS) is an any-time best-first tree-search algorithm. It uses repeated game simulations to estimate the value of states, and expands the tree further in more promising lines. When all simulations are complete, the most explored move is taken. It is used by the leading algorithms in the AAAI general game-playing competition [8]. As such, it is the best known algorithm for general game-playing without a long RL training procedure. Each simulation consists of two parts. First, a tree phase, where the tree is traversed by taking actions according to a tree policy. Second, a rollout phase, where some default policy is followed until the simulation reaches a terminal game state. The result returned by this simulation can then be used to update estimates of the value of each node traversed in the tree during the first phase. Each node of the search tree corresponds to a possible state s in the game. The root node corresponds to the current state, its children correspond to the states resulting from a single move from the current state, etc. The edge from state s1 to s2 represents the action a taken in s1 to reach s2, and is identified by the pair (s1, a). 4 At each node we store n(s), the number of iterations in which the node has been visited so far. Each edge stores both n(s, a), the number of times it has been traversed, and r(s, a) the sum of all rewards obtained in simulations that passed through the edge. The tree policy depends on these statistics. The most commonly used tree policy is to act greedily with respect to the upper confidence bounds for trees formula [7]: UCT(s, a) = r(s, a) n(s, a) + cb s log n(s) n(s, a) (1) When an action a in a state sL is chosen that takes us to a position s′ not yet in the search tree, the rollout phase begins. In the absence of domain-specific information, the default policy used is simply to choose actions uniformly from those available. To build up the search tree, when the simulation moves from the tree phase to the rollout phase, we perform an expansion, adding s′ to the tree as a child of sL.2 Once a rollout is complete, the reward signal is propagated through the tree (a backup), with each node and edge updating statistics for visit counts n(s), n(s, a) and total returns r(s, a). In this work, all MCTS agents use 10,000 simulations per move, unless stated otherwise. All use a uniform default policy. We also use RAVE. Full details are in the appendix. [9]. 4.2 Imitation Learning from Monte Carlo Tree Search In this section, we train a standard convolutional neural network3 to imitate an MCTS expert. Guo et al. [11] used a similar set up on Atari games. However, their results showed that the performance of the learned neural network fell well short of the MCTS expert, even with a large dataset of 800,000 MCTS moves. Our methodology described here improves on this performance. Learning Targets In Guo et al. [11], the learning target used was simply the move chosen by MCTS. We refer to this as chosen-action targets (CAT), and optimise the Kullback–Leibler divergence between the output distribution of the network and this target. So the loss at position s is given by the formula: LCAT = −log[π(a∗|s)] where a∗= argmaxa(n(s, a)) is the move selected by MCTS. We propose an alternative target, which we call tree-policy targets (TPT). The tree policy target is the average tree policy of the MCTS at the root. In other words, we try to match the network output to the distribution over actions given by n(s, a)/n(s) where s is the position we are scoring (so n(s) = 10, 000 in our experiments). This gives the loss: LTPT = − X a n(s, a) n(s) log[π(a|s)] Unlike CAT, TPT is cost-sensitive: when MCTS is less certain between two moves (because they are of similar strength), TPT penalises misclassifications less severely. Cost-sensitivity is a desirable property for an imitation learning target, as it induces the IL agent to trade off accuracy on less important decisions for greater accuracy on critical decisions. In EXIT, there is additional motivation for such cost-sensitive targets, as our networks will be used to bias future searches. Accurate evaluations of the relative strength of actions never made by the current expert are still important, since future experts will use the evaluations of all available moves to guide their search. 2Sometimes multiple nodes are added to the tree per iteration, adding children to s′ also. Conversely, sometimes an expansion threshold is used, so sL is only expanded after multiple visits. 3Our network architecture is described in the appendix. We use Adam [10] as our optimiser. 5 Sampling the position set Correlations between the states in our dataset may reduce the effective dataset size, harming learning. Therefore, we construct all our datasets to consist of uncorrelated positions sampled using an exploration policy. To do this, we play multiple games with an exploration policy, and select a single state from each game, as in Silver et al. [12]. For the initial dataset, the exploration policy is MCTS, with the number of iterations reduced to 1,000 to reduce computation time and encourage a wider distribution of positions. We then follow the DAGGER procedure, expanding our dataset by using the most recent apprentice policy to sample 100,000 more positions, again sampling one position per game to ensure that there were no correlations in the dataset. This has two advantages over sampling more positions in the same way: firstly, selecting positions with the apprentice is faster, and secondly, doing so results in positions closer to the distribution that the apprentice network visits at test time. 4.3 Results of Imitation Learning Based on our initial dataset of 100,000 MCTS moves, CAT and TPT have similar performance in the task of predicting the move selected by MCTS, with average top-1 prediction errors of 47.0% and 47.7%, and top-3 prediction errors of 65.4% and 65.7%, respectively. However, despite the very similar prediction errors, the TPT network is 50 ± 13 Elo stronger than the CAT network, suggesting that the cost-awareness of TPT indeed gives a performance improvement. 4 We continued training the TPT network with the DAGGER algorithm, iteratively creating 3 more batches of 100,000 moves. This additional data resulted in an improvement of 120 Elo over the first TPT network. Our final DAGGER TPT network achieved similar performance to the MCTS it was trained to emulate, winning just over half of games played between them (87/162). 5 Expert Improvement in Hex We now have an Imitation Learning procedure that can train a strong apprentice network from MCTS. In this section, we describe our Neural-MCTS (N-MCTS) algorithms, which use such apprentice networks to improve search quality. 5.1 Using the Policy Network Because the apprentice network has effectively generalised our policy, it gives us fast evaluations of action plausibility at the start of search. As search progresses, we discover improvements on this apprentice policy, just as human players can correct inaccurate intuitions through lookahead. We use our neural network policy to bias the MCTS tree policy towards moves we believe to be stronger. When a node is expanded, we evaluate the apprentice policy ˆπ at that state, and store it. We modify the UCT formula by adding a bonus proportional to ˆπ(a|s): UCTP−NN(s, a) = UCT(s, a) + wa ˆπ(a|s) n(s, a) + 1 Where wa weights the neural network against the simulations. This formula is adapted from one found in Gelly & Silver [9]. Tuning of hyperparameters found that wa = 100 was a good choice for this parameter, which is close to the average number of simulations per action at the root when using 10,000 iterations in the MCTS. Since this policy was trained using 10,000 iterations too, we would expect that the optimal weight should be close to this average. The TPT network’s final layer uses a softmax output. Because there is no reason to suppose that the optimal bonus in the UCT formula should be linear in the TPT policy probability, we view the temperature of the TPT network’s output layer as a hyperparameter for the N-MCTS and tune it to maximise the performance of the N-MCTS. 4When testing network performance, we greedily select the most likely move, because CAT and TPT may otherwise induce different temperatures in the trained networks’ policies. 6 When using the strongest TPT network from section 4, N-MCTS using a policy network significantly outperforms our baseline MCTS, winning 97% of games. The neural network evaluations cause a two times slowdown in search. For comparison, a doubling of the number of iterations of the vanilla MCTS results in a win rate of 56%. 5.2 Using a Value Network Strong value networks have been shown to be able to substantially improve the performance of MCTS [12]. Whereas a policy network allows us to narrow the search, value networks act to reduce the required search depth compared to using inaccurate rollout-based value estimation. However, our imitation learning procedure only learns a policy, not a value function. Monte Carlo estimates of V π∗(s) could be used to train a value function, but to train a value function without severe overfitting requires more than 105 independent samples. Playing this many expert games is well beyond our computation resources, so instead we approximate V π∗(s) with the value function of the apprentice, V ˆπ(s), for which Monte Carlo estimates are cheap to produce. To train the value network, we use a KL loss between V (s) and the sampled (binary) result z: LV = −z log[V (s)] −(1 −z) log[1 −V (s)] To accelerate the tree search and regularise value prediction, we used a multitask network with separate output heads for the apprentice policy and value prediction, and sum the losses LV and LTPT. To use such a value network in the expert, whenever a leaf sL is expanded, we estimate V (s). This is backed up through the tree to the root in the same way as rollout results are: each edge stores the average of all evaluations made in simulations passing through it. In the tree policy, the value is estimated as a weighted average of the network estimate and the rollout estimate.5 6 Experiments 6.1 Comparison of Batch and Online EXIT to REINFORCE We compare EXIT to the policy gradient algorithm found in Silver et al. [12], which achieved state-of-the-art performance for a neural network player in the related board game Go. In Silver et al. [12], the algorithm was initialised by a network trained to predict human expert moves from a corpus of 30 million positions, and then REINFORCE [3] was used. We initialise with the best network from section 4. Such a scheme, Imitation Learning initialisation followed by Reinforcement Learning improvement, is a common approach when known experts are not sufficiently strong. In our batch EXIT, we perform 3 training iterations, each time creating a dataset of 243,000 moves. In online EXIT, as the dataset grows, the supervised learning step takes longer, and in a naïve implementation would come to dominate run-time. We test two forms of online EXIT that avoid this. In the first, we create 24,300 moves each iteration, and train on a buffer of the most recent 243,000 expert moves. In the second, we use all our data in training, and expand the size of the dataset by 10% each iteration. For this experiment we did not use any value networks, so that network architectures between the policy gradient and EXIT are identical. All policy networks are warm-started to the best network from section 4. As can be seen in figure 2, compared to REINFORCE, EXIT learns stronger policies faster. EXIT also shows no sign of instability: the policy improves consistently each iteration and there is little variation in the performance between each training run. Separating the tree search from the generalisation has ensured that plans don’t overfit to a current opponent, because the tree search considers multiple possible responses to the moves it recommends. Online expert iteration substantially outperforms the batch mode, as expected. Compared to the ‘buffer’ version, the ‘exponential dataset’ version appears to be marginally stronger, suggesting that retaining a larger dataset is useful. 5This is the same as the method used in Silver et al. [12] 7 Figure 2: Elo ratings of policy gradient network and EXIT networks through training. Values are the average of 5 training runs, shaded areas represent 90% confidence intervals. Time is measured by number of neural network evaluations made. Elo calculated with BayesElo [13] . 6.2 Comparison of Value and Policy EXIT With sufficiently large datasets, a value network can be learnt to improve the expert further, as discussed in section 5.2. We ran asynchronous distributed online EXIT using only a policy network until our datasets contained ∼550, 000 positions. We then used our most recent apprentice to add a Monte Carlo value estimate from each of the positions in our dataset, and trained a combined policy and value apprentice, giving a substantial improvement in the quality of expert play. We then ran EXIT with a combined value-and-policy network, creating another ∼7, 400, 000 move choices. For comparison, we continued the training run without using value estimation for equal time. Our results are shown in figure 3, which shows that value-and-policy-EXIT significantly outperforms policy-only-EXIT. In particular, the improved plans from the better expert quickly manifest in a stronger apprentice. We can also clearly see the importance of expert improvement, with later apprentices comfortably outperforming experts from earlier in training. Figure 3: Apprentices and experts in distributed online EXIT, with and without neural network value estimation. MOHEX’s rating (10,000 iterations per move) is shown by the black dashed line. 6.3 Performance Against MOHEX Versions of MOHEX have won every Computer Games Olympiad Hex tournament since 2009. MOHEX is a highly optimised algorithm, utilising a complex, hand-made theorem-proving algorithm 8 which calculates provably suboptimal moves, to be pruned from search, and an improved rollout policy; it also optionally uses a specialised end-game solver, particularly powerful for small board sizes. In contrast, our algorithm learns tabula rasa, without game-specific knowledge beside the rules of the game. Here we compare to the most recent available version, MOHEX 1.0 [14]. To fairly compare MOHEX to our experts with equal wall-clock times is difficult, as the relative speeds of the algorithms are hardware dependent: MOHEX’s theorem prover makes heavy use of the CPU, whereas for our experts, the GPU is the bottleneck. On our machine MOHEX is approximately 50% faster.6 We tested EXIT against 10,000 iteration-MOHEX on default settings, 100,000 iterationMOHEX, and against 4 second per move-MOHEX (with parallel solver switched on). EXIT won all matches using just 10,000 iterations per move, results in the table below: EXIT Setting Time/move EXIT win rate MOHEX Setting Solver Time/move 104 iterations ∼0.3s 75.3% 104 iterations No ∼0.2s 104 iterations ∼0.3s 59.3% 105 iterations No ∼2s 104 iterations ∼0.3s 55.6% 4s/move Yes 4s 7 Related work EXIT has several connections to existing RL algorithms, resulting from different choices of expert class. For example, we can recover a version of Policy Iteration [15] by using Monte Carlo Search as our expert; in this case it is easy to see that Monte Carlo Tree Search gives stronger plans than Monte Carlo Search. Previous works have also attempted to achieve Imitation Learning that outperforms the original expert. Silver et al. [12] use Imitation Learning followed by Reinforcement Learning. Kai-Wei, et al. [16] use Monte Carlo estimates to calculate Q∗(s, a), and train an apprentice π to maximise P a π(a|s)Q∗(s, a). At each iteration after the first, the rollout policy is changed to a mixture of the most recent apprentice and the original expert. This too can be seen as blending an RL algorithm with Imitation Learning: it combines Policy Iteration and Imitation Learning. Neither of these approaches is able to improve the original expert policy. They are useful when strong experts exist, but only at the beginning of training. In contrast, because EXIT creates stronger experts for itself, it is able to use experts throughout the training process. AlphaGo Zero (AG0)[17], presents an independently developed version of ExIt, 7 and showed that it achieves state-of-the-art performance in Go. We include a detailed comparison of these closely related works in the appendix. Unlike standard Imitation Learning methods, EXIT can be applied to the Reinforcement Learning problem: it makes no assumptions about the existence of a satisfactory expert. EXIT can be applied with no domain specific heuristics available, as we demonstrate in our experiment, where we used a general purpose search algorithm as our expert class. 8 Conclusion We have introduced a new Reinforcement Learning algorithm, Expert Iteration, motivated by the dual process theory of human thought. EXIT decomposes the Reinforcement Learning problem by separating the problems of generalisation and planning. Planning is performed on a case-by-case basis, and only once MCTS has found a significantly stronger plan is the resultant policy generalised. This allows for long-term planning, and results in faster learning and state-of-the-art final performance, particularly for challenging problems. We show that this algorithm significantly outperforms a variant of the REINFORCE algorithm in learning to play the board game Hex. The resultant tree search algorithm beats MoHex 1.0, indicating competitiveness with state-of-the-art heuristic search methods, despite being trained tabula rasa. 6This machine has an Intel Xeon E5-1620 and nVidia Titan X (Maxwell), our tree search takes 0.3 seconds for 10,000 iterations, while MOHEX takes 0.2 seconds for 10,000 iterations, with multithreading. 7Our original version, with only policy networks, was published before AG0 was published, but after its submission. Our value networks were developed before AG0 was published, and published after Silver et al.[17] 9 Acknowledgements This work was supported by the Alan Turing Institute under the EPSRC grant EP/N510129/1 and by AWS Cloud Credits for Research. We thank Andrew Clarke for help with efficiently parallelising the generation of datasets, Alex Botev for assistance implementing the CNN, and Ryan Hayward for providing a tool to draw Hex positions. References [1] J. St B. T. Evans. Heuristic and Analytic Processes in Reasoning. British Journal of Psychology, 75(4):451–468, 1984. [2] Daniel Kahneman. Maps of Bounded Rationality: Psychology for Behavioral Economics. The American Economic Review, 93(5):1449–1475, 2003. [3] R. J. Williams. Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning. Machine Learning, 8(3-4):229–256, 1992. [4] V. Mnih et al. Human-Level Control through Deep Reinforcement Learning. Nature, 518(7540):529–533, 2015. [5] S. Ross, G. J. Gordon, and J. A. Bagnell. A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning. AISTATS, 2011. [6] H. Daumé III, J. Langford, and D. Marcu. Search-based Structured Prediction. Machine Learning, 2009. [7] L. Kocsis and C. Szepesvári. Bandit Based Monte-Carlo Planning. In European Conference on Machine Learning, pages 282–293. Springer, 2006. [8] M. Genesereth, N. Love, and B. Pell. General Game Playing: Overview of the AAAI Competition. AI Magazine, 26(2):62, 2005. [9] S. Gelly and D. Silver. Combining Online and Offline Knowledge in UCT. In Proceedings of the 24th International Conference on Machine learning, pages 273–280. ACM, 2007. [10] D. Kingma and J. Ba. Adam: A Method for Stochastic Optimization. arXiv preprint arXiv:1412.6980, 2014. [11] X. Guo, S. Singh, H. Lee, R. L. Lewis, and X. Wang. Deep Learning for Real-Time Atari Game Play Using Offline Monte-Carlo Rree Search Planning. In Advances in Neural Information Processing Systems, pages 3338–3346, 2014. [12] D. Silver et al. Mastering the Game of Go with Deep Neural Networks and Tree Search. Nature, 529(7587):484–489, 2016. [13] R Coulom. Bayeselo. http://remi.coulom.free.fr/Bayesian-Elo/, 2005. [14] B. Arneson, R. Hayward, and P. Hednerson. Monte Carlo Tree Search in Hex. In IEEE Transactions on Computational Intelligence and AI in Games, pages 251–258. IEEE, 2010. [15] S. Ross and J. A. Bagnell. Reinforcement and Imitation Learning via Interactive No-Regret Learning. ArXiv e-prints, 2014. [16] K. Chang, A. Krishnamurthy, A. Agarwal, H. Daumé III, and J. Langford. Learning to Search Better Than Your Teacher. CoRR, abs/1502.02206, 2015. [17] D. Silver et al. Mastering the Game of Go without Human Knowledge. Nature, 550(7676):354– 359, 2017. [18] K. Young, R. Hayward, and G. Vasan. NeuroHex: A Deep Q-learning Hex Agent. arXiv preprint arXiv:1604.07097, 2016. [19] Y. Goldberg and J. Nivre. Training Deterministic Parsers with Non-Deterministic Oracles. Transactions of the Association for Computational Linguistics, 1:403–414, 2013. 10 [20] D. Arpit, Y. Zhou, B. U. Kota, and V. Govindaraju. Normalization Propagation: A Parametric Technique for Removing Internal Covariate Shift in Deep Networks. arXiv preprint arXiv:1603.01431, 2016. [21] D.-A. Clevert, T. Unterthiner, and S. Hochreiter. Fast and Accurate Deep Network Learning by Exponential Linear Units(ELUs). CoRR, abs/1511.07289, 2015. 11 | 2017 | 555 |
7,069 | Learning Combinatorial Optimization Algorithms over Graphs Hanjun Dai†⇤, Elias B. Khalil†⇤, Yuyu Zhang†, Bistra Dilkina†, Le Song†§ † College of Computing, Georgia Institute of Technology § Ant Financial {hanjun.dai, elias.khalil, yuyu.zhang, bdilkina, lsong}@cc.gatech.edu Abstract The design of good heuristics or approximation algorithms for NP-hard combinatorial optimization problems often requires significant specialized knowledge and trial-and-error. Can we automate this challenging, tedious process, and learn the algorithms instead? In many real-world applications, it is typically the case that the same optimization problem is solved again and again on a regular basis, maintaining the same problem structure but differing in the data. This provides an opportunity for learning heuristic algorithms that exploit the structure of such recurring problems. In this paper, we propose a unique combination of reinforcement learning and graph embedding to address this challenge. The learned greedy policy behaves like a meta-algorithm that incrementally constructs a solution, and the action is determined by the output of a graph embedding network capturing the current state of the solution. We show that our framework can be applied to a diverse range of optimization problems over graphs, and learns effective algorithms for the Minimum Vertex Cover, Maximum Cut and Traveling Salesman problems. 1 Introduction Combinatorial optimization problems over graphs arising from numerous application domains, such as social networks, transportation, telecommunications and scheduling, are NP-hard, and have thus attracted considerable interest from the theory and algorithm design communities over the years. In fact, of Karp’s 21 problems in the seminal paper on reducibility [19], 10 are decision versions of graph optimization problems, while most of the other 11 problems, such as set covering, can be naturally formulated on graphs. Traditional approaches to tackling an NP-hard graph optimization problem have three main flavors: exact algorithms, approximation algorithms and heuristics. Exact algorithms are based on enumeration or branch-and-bound with an integer programming formulation, but may be prohibitive for large instances. On the other hand, polynomial-time approximation algorithms are desirable, but may suffer from weak optimality guarantees or empirical performance, or may not even exist for inapproximable problems. Heuristics are often fast, effective algorithms that lack theoretical guarantees, and may also require substantial problem-specific research and trial-and-error on the part of algorithm designers. All three paradigms seldom exploit a common trait of real-world optimization problems: instances of the same type of problem are solved again and again on a regular basis, maintaining the same combinatorial structure, but differing mainly in their data. That is, in many applications, values of the coefficients in the objective function or constraints can be thought of as being sampled from the same underlying distribution. For instance, an advertiser on a social network targets a limited set of users with ads, in the hope that they spread them to their neighbors; such covering instances need to be solved repeatedly, since the influence pattern between neighbors may be different each time. Alternatively, a package delivery company routes trucks on a daily basis in a given city; thousands of similar optimizations need to be solved, since the underlying demand locations can differ. ⇤Both authors contributed equally to the paper. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. State Embedding the graph + partial solution Greedy node selection 1st iteration 2nd iteration Θ Θ Θ Θ Θ Θ Θ Θ Θ Θ ReLu ReLu ReLu ReLu Embed graph Greedy: add best node Embed graph Greedy: add best node Figure 1: Illustration of the proposed framework as applied to an instance of Minimum Vertex Cover. The middle part illustrates two iterations of the graph embedding, which results in node scores (green bars). Despite the inherent similarity between problem instances arising in the same domain, classical algorithms do not systematically exploit this fact. However, in industrial settings, a company may be willing to invest in upfront, offline computation and learning if such a process can speed up its real-time decision-making and improve its quality. This motivates the main problem we address: Problem Statement: Given a graph optimization problem G and a distribution D of problem instances, can we learn better heuristics that generalize to unseen instances from D? Recently, there has been some seminal work on using deep architectures to learn heuristics for combinatorial problems, including the Traveling Salesman Problem [37, 6, 14]. However, the architectures used in these works are generic, not yet effectively reflecting the combinatorial structure of graph problems. As we show later, these architectures often require a huge number of instances in order to learn to generalize to new ones. Furthermore, existing works typically use the policy gradient for training [6], a method that is not particularly sample-efficient. While the methods in [37, 6] can be used on graphs with different sizes – a desirable trait – they require manual, ad-hoc input/output engineering to do so (e.g. padding with zeros). In this paper, we address the challenge of learning algorithms for graph problems using a unique combination of reinforcement learning and graph embedding. The learned policy behaves like a meta-algorithm that incrementally constructs a solution, with the action being determined by a graph embedding network over the current state of the solution. More specifically, our proposed solution framework is different from previous work in the following aspects: 1. Algorithm design pattern. We will adopt a greedy meta-algorithm design, whereby a feasible solution is constructed by successive addition of nodes based on the graph structure, and is maintained so as to satisfy the problem’s graph constraints. Greedy algorithms are a popular pattern for designing approximation and heuristic algorithms for graph problems. As such, the same high-level design can be seamlessly used for different graph optimization problems. 2. Algorithm representation. We will use a graph embedding network, called structure2vec (S2V) [9], to represent the policy in the greedy algorithm. This novel deep learning architecture over the instance graph “featurizes” the nodes in the graph, capturing the properties of a node in the context of its graph neighborhood. This allows the policy to discriminate among nodes based on their usefulness, and generalizes to problem instances of different sizes. This contrasts with recent approaches [37, 6] that adopt a graph-agnostic sequence-to-sequence mapping that does not fully exploit graph structure. 3. Algorithm training. We will use fitted Q-learning to learn a greedy policy that is parametrized by the graph embedding network. The framework is set up in such a way that the policy will aim to optimize the objective function of the original problem instance directly. The main advantage of this approach is that it can deal with delayed rewards, which here represent the remaining increase in objective function value obtained by the greedy algorithm, in a data-efficient way; in each step of the greedy algorithm, the graph embeddings are updated according to the partial solution to reflect new knowledge of the benefit of each node to the final objective value. In contrast, the policy gradient approach of [6] updates the model parameters only once w.r.t. the whole solution (e.g. the tour in TSP). 2 The application of a greedy heuristic learned with our framework is illustrated in Figure 1. To demonstrate the effectiveness of the proposed framework, we apply it to three extensively studied graph optimization problems. Experimental results show that our framework, a single meta-learning algorithm, efficiently learns effective heuristics for each of the problems. Furthermore, we show that our learned heuristics preserve their effectiveness even when used on graphs much larger than the ones they were trained on. Since many combinatorial optimization problems, such as the set covering problem, can be explicitly or implicitly formulated on graphs, we believe that our work opens up a new avenue for graph algorithm design and discovery with deep learning. 2 Common Formulation for Greedy Algorithms on Graphs We will illustrate our framework using three optimization problems over weighted graphs. Let G(V, E, w) denote a weighted graph, where V is the set of nodes, E the set of edges and w : E ! R+ the edge weight function, i.e. w(u, v) is the weight of edge (u, v) 2 E. These problems are: • Minimum Vertex Cover (MVC): Given a graph G, find a subset of nodes S ✓V such that every edge is covered, i.e. (u, v) 2 E , u 2 S or v 2 S, and |S| is minimized. • Maximum Cut (MAXCUT): Given a graph G, find a subset of nodes S ✓V such that the weight of the cut-set P (u,v)2C w(u, v) is maximized, where cut-set C ✓E is the set of edges with one end in S and the other end in V \ S. • Traveling Salesman Problem (TSP): Given a set of points in 2-dimensional space, find a tour of minimum total weight, where the corresponding graph G has the points as nodes and is fully connected with edge weights corresponding to distances between points; a tour is a cycle that visits each node of the graph exactly once. We will focus on a popular pattern for designing approximation and heuristic algorithms, namely a greedy algorithm. A greedy algorithm will construct a solution by sequentially adding nodes to a partial solution S, based on maximizing some evaluation function Q that measures the quality of a node in the context of the current partial solution. We will show that, despite the diversity of the combinatorial problems above, greedy algorithms for them can be expressed using a common formulation. Specifically: 1. A problem instance G of a given optimization problem is sampled from a distribution D, i.e. the V , E and w of the instance graph G are generated according to a model or real-world data. 2. A partial solution is represented as an ordered list S = (v1, v2, . . . , v|S|), vi 2 V , and S = V \ S the set of candidate nodes for addition, conditional on S. Furthermore, we use a vector of binary decision variables x, with each dimension xv corresponding to a node v 2 V , xv = 1 if v 2 S and 0 otherwise. One can also view xv as a tag or extra feature on v. 3. A maintenance (or helper) procedure h(S) will be needed, which maps an ordered list S to a combinatorial structure satisfying the specific constraints of a problem. 4. The quality of a partial solution S is given by an objective function c(h(S), G) based on the combinatorial structure h of S. 5. A generic greedy algorithm selects a node v to add next such that v maximizes an evaluation function, Q(h(S), v) 2 R, which depends on the combinatorial structure h(S) of the current partial solution. Then, the partial solution S will be extended as S := (S, v⇤), where v⇤:= argmaxv2S Q(h(S), v), (1) and (S, v⇤) denotes appending v⇤to the end of a list S. This step is repeated until a termination criterion t(h(S)) is satisfied. In our formulation, we assume that the distribution D, the helper function h, the termination criterion t and the cost function c are all given. Given the above abstract model, various optimization problems can be expressed by using different helper functions, cost functions and termination criteria: • MVC: The helper function does not need to do any work, and c(h(S), G) = −|S|. The termination criterion checks whether all edges have been covered. • MAXCUT: The helper function divides V into two sets, S and its complement S = V \ S, and maintains a cut-set C = {(u, v) | (u, v) 2 E, u 2 S, v 2 S}. Then, the cost is c(h(S), G) = P (u,v)2C w(u, v), and the termination criterion does nothing. • TSP: The helper function will maintain a tour according to the order of the nodes in S. The simplest way is to append nodes to the end of partial tour in the same order as S. Then the cost c(h(S), G) = −P|S|−1 i=1 w(S(i), S(i + 1)) −w(S(|S|), S(1)), and the termination criterion is 3 activated when S = V . Empirically, inserting a node u in the partial tour at the position which increases the tour length the least is a better choice. We adopt this insertion procedure as a helper function for TSP. An estimate of the quality of the solution resulting from adding a node to partial solution S will be determined by the evaluation function Q, which will be learned using a collection of problem instances. This is in contrast with traditional greedy algorithm design, where the evaluation function Q is typically hand-crafted, and requires substantial problem-specific research and trial-and-error. In the following, we will design a powerful deep learning parameterization for the evaluation function, bQ(h(S), v; ⇥), with parameters ⇥. 3 Representation: Graph Embedding Since we are optimizing over a graph G, we expect that the evaluation function bQ should take into account the current partial solution S as it maps to the graph. That is, xv = 1 for all nodes v 2 S, and the nodes are connected according to the graph structure. Intuitively, bQ should summarize the state of such a “tagged" graph G, and figure out the value of a new node if it is to be added in the context of such a graph. Here, both the state of the graph and the context of a node v can be very complex, hard to describe in closed form, and may depend on complicated statistics such as global/local degree distribution, triangle counts, distance to tagged nodes, etc. In order to represent such complex phenomena over combinatorial structures, we will leverage a deep learning architecture over graphs, in particular the structure2vec of [9], to parameterize bQ(h(S), v; ⇥). 3.1 Structure2Vec We first provide an introduction to structure2vec. This graph embedding network will compute a p-dimensional feature embedding µv for each node v 2 V , given the current partial solution S. More specifically, structure2vec defines the network architecture recursively according to an input graph structure G, and the computation graph of structure2vec is inspired by graphical model inference algorithms, where node-specific tags or features xv are aggregated recursively according to G’s graph topology. After a few steps of recursion, the network will produce a new embedding for each node, taking into account both graph characteristics and long-range interactions between these node features. One variant of the structure2vec architecture will initialize the embedding µ(0) v at each node as 0, and for all v 2 V update the embeddings synchronously at each iteration as µ(t+1) v F ⇣ xv, {µ(t) u }u2N (v), {w(v, u)}u2N (v) ; ⇥ ⌘ , (2) where N(v) is the set of neighbors of node v in graph G, and F is a generic nonlinear mapping such as a neural network or kernel function. Based on the update formula, one can see that the embedding update process is carried out based on the graph topology. A new round of embedding sweeping across the nodes will start only after the embedding update for all nodes from the previous round has finished. It is easy to see that the update also defines a process where the node features xv are propagated to other nodes via the nonlinear propagation function F. Furthermore, the more update iterations one carries out, the farther away the node features will propagate and get aggregated nonlinearly at distant nodes. In the end, if one terminates after T iterations, each node embedding µ(T ) v will contain information about its T-hop neighborhood as determined by graph topology, the involved node features and the propagation function F. An illustration of two iterations of graph embedding can be found in Figure 1. 3.2 Parameterizing bQ(h(S), v; ⇥) We now discuss the parameterization of bQ(h(S), v; ⇥) using the embeddings from structure2vec. In particular, we design F to update a p-dimensional embedding µv as: µ(t+1) v relu % ✓1xv + ✓2 X u2N (v) µ(t) u + ✓3 X u2N (v) relu(✓4 w(v, u)) ' , (3) where ✓1 2 Rp, ✓2, ✓3 2 Rp⇥p and ✓4 2 Rp are the model parameters, and relu is the rectified linear unit (relu(z) = max(0, z)) applied elementwise to its input. The summation over neighbors is one way of aggregating neighborhood information that is invariant to permutations over neighbors. For simplicity of exposition, xv here is a binary scalar as described earlier; it is straightforward to extend xv to a vector representation by incorporating any additional useful node information. To make the 4 nonlinear transformations more powerful, we can add some more layers of relu before we pool over the neighboring embeddings µu. Once the embedding for each node is computed after T iterations, we will use these embeddings to define the bQ(h(S), v; ⇥) function. More specifically, we will use the embedding µ(T ) v for node v and the pooled embedding over the entire graph, P u2V µ(T ) u , as the surrogates for v and h(S), respectively, i.e. bQ(h(S), v; ⇥) = ✓> 5 relu([✓6 X u2V µ(T ) u , ✓7 µ(T ) v ]) (4) where ✓5 2 R2p, ✓6, ✓7 2 Rp⇥p and [·, ·] is the concatenation operator. Since the embedding µ(T ) u is computed based on the parameters from the graph embedding network, bQ(h(S), v) will depend on a collection of 7 parameters ⇥= {✓i}7 i=1. The number of iterations T for the graph embedding computation is usually small, such as T = 4. The parameters ⇥will be learned. Previously, [9] required a ground truth label for every input graph G in order to train the structure2vec architecture. There, the output of the embedding is linked with a softmax-layer, so that the parameters can by trained end-to-end by minimizing the cross-entropy loss. This approach is not applicable to our case due to the lack of training labels. Instead, we train these parameters together end-to-end using reinforcement learning. 4 Training: Q-learning We show how reinforcement learning is a natural framework for learning the evaluation function bQ. The definition of the evaluation function bQ naturally lends itself to a reinforcement learning (RL) formulation [36], and we will use bQ as a model for the state-value function in RL. We note that we would like to learn a function bQ across a set of m graphs from distribution D, D = {Gi}m i=1, with potentially different sizes. The advantage of the graph embedding parameterization in our previous section is that we can deal with different graph instances and sizes seamlessly. 4.1 Reinforcement learning formulation We define the states, actions and rewards in the reinforcement learning framework as follows: 1. States: a state S is a sequence of actions (nodes) on a graph G. Since we have already represented nodes in the tagged graph with their embeddings, the state is a vector in p-dimensional space, P v2V µv. It is easy to see that this embedding representation of the state can be used across different graphs. The terminal state bS will depend on the problem at hand; 2. Transition: transition is deterministic here, and corresponds to tagging the node v 2 G that was selected as the last action with feature xv = 1; 3. Actions: an action v is a node of G that is not part of the current state S. Similarly, we will represent actions as their corresponding p-dimensional node embedding µv, and such a definition is applicable across graphs of various sizes; 4. Rewards: the reward function r(S, v) at state S is defined as the change in the cost function after taking action v and transitioning to a new state S0 := (S, v). That is, r(S, v) = c(h(S0), G) −c(h(S), G), (5) and c(h(;), G) = 0. As such, the cumulative reward R of a terminal state bS coincides exactly with the objective function value of the bS, i.e. R(bS) = P|bS| i=1 r(Si, vi) is equal to c(h(bS), G); 5. Policy: based on bQ, a deterministic greedy policy ⇡(v|S) := argmaxv02S bQ(h(S), v0) will be used. Selecting action v corresponds to adding a node of G to the current partial solution, which results in collecting a reward r(S, v). Table 1 shows the instantiations of the reinforcement learning framework for the three optimization problems considered herein. We let Q⇤denote the optimal Q-function for each RL problem. Our graph embedding parameterization bQ(h(S), v; ⇥) from Section 3 will then be a function approximation model for it, which will be learned via n-step Q-learning. 4.2 Learning algorithm In order to perform end-to-end learning of the parameters in bQ(h(S), v; ⇥), we use a combination of n-step Q-learning [36] and fitted Q-iteration [33], as illustrated in Algorithm 1. We use the term 5 Table 1: Definition of reinforcement learning components for each of the three problems considered. Problem State Action Helper function Reward Termination MVC subset of nodes selected so far add node to subset None -1 all edges are covered MAXCUT subset of nodes selected so far add node to subset None change in cut weight cut weight cannot be improved TSP partial tour grow tour by one node Insertion operation change in tour cost tour includes all nodes episode to refer to a complete sequence of node additions starting from an empty solution, and until termination; a step within an episode is a single action (node addition). Standard (1-step) Q-learning updates the function approximator’s parameters at each step of an episode by performing a gradient step to minimize the squared loss: (y −bQ(h(St), vt; ⇥))2, (6) where y = γ maxv0 bQ(h(St+1), v0; ⇥) + r(St, vt) for a non-terminal state St. The n-step Q-learning helps deal with the issue of delayed rewards, where the final reward of interest to the agent is only received far in the future during an episode. In our setting, the final objective value of a solution is only revealed after many node additions. As such, the 1-step update may be too myopic. A natural extension of 1-step Q-learning is to wait n steps before updating the approximator’s parameters, so as to collect a more accurate estimate of the future rewards. Formally, the update is over the same squared loss (6), but with a different target, y = Pn−1 i=0 r(St+i, vt+i) + γ maxv0 bQ(h(St+n), v0; ⇥). The fitted Q-iteration approach has been shown to result in faster learning convergence when using a neural network as a function approximator [33, 28], a property that also applies in our setting, as we use the embedding defined in Section 3.2. Instead of updating the Q-function sample-by-sample as in Equation (6), the fitted Q-iteration approach uses experience replay to update the function approximator with a batch of samples from a dataset E, rather than the single sample being currently experienced. The dataset E is populated during previous episodes, such that at step t + n, the tuple (St, at, Rt,t+n, St+n) is added to E, with Rt,t+n = Pn−1 i=0 r(St+i, at+i). Instead of performing a gradient step in the loss of the current sample as in (6), stochastic gradient descent updates are performed on a random sample of tuples drawn from E. It is known that off-policy reinforcement learning algorithms such as Q-learning can be more sample efficient than their policy gradient counterparts [15]. This is largely due to the fact that policy gradient methods require on-policy samples for the new policy obtained after each parameter update of the function approximator. Algorithm 1 Q-learning for the Greedy Algorithm 1: Initialize experience replay memory M to capacity N 2: for episode e = 1 to L do 3: Draw graph G from distribution D 4: Initialize the state to empty S1 = () 5: for step t = 1 to T do 6: vt = ( random node v 2 St, w.p. ✏ argmaxv2St bQ(h(St), v; ⇥), otherwise 7: Add vt to partial solution: St+1 := (St, vt) 8: if t ≥n then 9: Add tuple (St−n, vt−n, Rt−n,t, St) to M 10: Sample random batch from B iid. ⇠M 11: Update ⇥by SGD over (6) for B 12: end if 13: end for 14: end for 15: return ⇥ 5 Experimental Evaluation Instance generation. To evaluate the proposed method against other approximation/heuristic algorithms and deep learning approaches, we generate graph instances for each of the three problems. For the MVC and MAXCUT problems, we generate Erd˝os-Renyi (ER) [11] and Barabasi-Albert (BA) [1] graphs which have been used to model many real-world networks. For a given range on the number of nodes, e.g. 50-100, we first sample the number of nodes uniformly at random from that 6 range, then generate a graph according to either ER or BA. For the two-dimensional TSP problem, we use an instance generator from the DIMACS TSP Challenge [18] to generate uniformly random or clustered points in the 2-D grid. We refer the reader to the Appendix D.1 for complete details on instance generation. We have also tackled the Set Covering Problem, for which the description and results are deferred to Appendix B. Structure2Vec Deep Q-learning. For our method, S2V-DQN, we use the graph representations and hyperparameters described in Appendix D.4. The hyperparameters are selected via preliminary results on small graphs, and then fixed for large ones. Note that for TSP, where the graph is fully-connected, we build the K-nearest neighbor graph (K = 10) to scale up to large graphs. For MVC, where we train the model on graphs with up to 500 nodes, we use the model trained on small graphs as initialization for training on larger ones. We refer to this trick as “pre-training", which is illustrated in Figure D.2. Pointer Networks with Actor-Critic. We compare our method to a method, based on Recurrent Neural Networks (RNNs), which does not make full use of graph structure [6]. We implement and train their algorithm (PN-AC) for all three problems. The original model only works on the Euclidian TSP problem, where each node is represented by its (x, y) coordinates, and is not designed for problems with graph structure. To handle other graph problems, we describe each node by its adjacency vector instead of coordinates. To handle different graph sizes, we use a singular value decomposition (SVD) to obtain a rank-8 approximation for the adjacency matrix, and use the low-rank embeddings as inputs to the pointer network. Baseline Algorithms. Besides the PN-AC, we also include powerful approximation or heuristic algorithms from the literature. These algorithms are specifically designed for each type of problem: • MVC: MVCApprox iteratively selects an uncovered edge and adds both of its endpoints [30]. We designed a stronger variant, called MVCApprox-Greedy, that greedily picks the uncovered edge with maximum sum of degrees of its endpoints. Both algorithms are 2-approximations. • MAXCUT: We include MaxcutApprox, which maintains the cut set (S, V \ S) and moves a node from one side to the other side of the cut if that operation results in cut weight improvement [25]. To make MaxcutApprox stronger, we greedily move the node that results in the largest improvement in cut weight. A randomized, non-greedy algorithm, referred to as SDP, is also implemented based on [12]; 100 solutions are generated for each graph, and the best one is taken. • TSP: We include the following approximation algorithms: Minimum Spanning Tree (MST), Farthest insertion (Farthest), Cheapest insertion (Cheapest), Closest insertion (Closest), Christofides and 2-opt. We also add the Nearest Neighbor heuristic (Nearest); see [4] for algorithmic details. Details on Validation and Testing. For S2V-DQN and PN-AC, we use a CUDA K80-enabled cluster for training and testing. Training convergence for S2V-DQN is discussed in Appendix D.6. S2V-DQN and PN-AC use 100 held-out graphs for validation, and we report the test results on another 1000 graphs. We use CPLEX[17] to get optimal solutions for MVC and MAXCUT, and Concorde [3] for TSP (details in Appendix D.1). All approximation ratios reported in the paper are with respect to the best (possibly optimal) solution found by the solvers within 1 hour. For MVC, we vary the training and test graph sizes in the ranges {15–20, 40–50, 50–100, 100–200, 400–500}. For MAXCUT and TSP, which involve edge weights, we train up to 200–300 nodes due to the limited computation resource. For all problems, we test on graphs of size up to 1000–1200. During testing, instead of using Active Search as in [6], we simply use the greedy policy. This gives us much faster inference, while still being powerful enough. We modify existing open-source code to implement both S2V-DQN 2 and PN-AC 3. Our code is publicly available 4. 5.1 Comparison of solution quality To evaluate the solution quality on test instances, we use the approximation ratio of each method relative to the optimal solution, averaged over the set of test instances. The approximation ratio of a solution S to a problem instance G is defined as R(S, G) = max( OP T (G) c(h(S)) , c(h(S)) OP T (G)), where c(h(S)) is the objective value of solution S, and OPT(G) is the best-known solution value of instance G. 2https://github.com/Hanjun-Dai/graphnn 3https://github.com/devsisters/pointer-network-tensorflow 4https://github.com/Hanjun-Dai/graph_comb_opt 7 (a) MVC BA (b) MAXCUT BA (c) TSP random Figure 2: Approximation ratio on 1000 test graphs. Note that on MVC, our performance is pretty close to optimal. In this figure, training and testing graphs are generated according to the same distribution. Figure 2 shows the average approximation ratio across the three problems; other graph types are in Figure D.1 in the appendix. In all of these figures, a lower approximation ratio is better. Overall, our proposed method, S2V-DQN, performs significantly better than other methods. In MVC, the performance of S2V-DQN is particularly good, as the approximation ratio is roughly 1 and the bar is barely visible. The PN-AC algorithm performs well on TSP, as expected. Since the TSP graph is essentially fullyconnected, graph structure is not as important. On problems such as MVC and MAXCUT, where graph information is more crucial, our algorithm performs significantly better than PN-AC. For TSP, The Farthest and 2-opt algorithm perform as well as S2V-DQN, and slightly better in some cases. However, we will show later that in real-world TSP data, our algorithm still performs better. 5.2 Generalization to larger instances The graph embedding framework enables us to train and test on graphs of different sizes, since the same set of model parameters are used. How does the performance of the learned algorithm using small graphs generalize to test graphs of larger sizes? To investigate this, we train S2V-DQN on graphs with 50–100 nodes, and test its generalization ability on graphs with up to 1200 nodes. Table 2 summarizes the results, and full results are in Appendix D.3. Table 2: S2V-DQN’s generalization ability. Values are average approximation ratios over 1000 test instances. These test results are produced by S2V-DQN algorithms trained on graphs with 50-100 nodes. Test Size 50-100 100-200 200-300 300-400 400-500 500-600 1000-1200 MVC (BA) 1.0033 1.0041 1.0045 1.0040 1.0045 1.0048 1.0062 MAXCUT (BA) 1.0150 1.0181 1.0202 1.0188 1.0123 1.0177 1.0038 TSP (clustered) 1.0730 1.0895 1.0869 1.0918 1.0944 1.0975 1.1065 We can see that S2V-DQN achieves a very good approximation ratio. Note that the “optimal" value used in the computation of approximation ratios may not be truly optimal (due to the solver time cutoff at 1 hour), and so CPLEX’s solutions do typically get worse as problem size grows. This is why sometimes we can even get better approximation ratio on larger graphs. 5.3 Scalability & Trade-off between running time and approximation ratio To construct a solution on a test graph, our algorithm has polynomial complexity of O(k|E|) where k is number of greedy steps (at most the number of nodes |V |) and |E| is number of edges. For instance, on graphs with 1200 nodes, we can find the solution of MVC within 11 seconds using a single GPU, while getting an approximation ratio of 1.0062. For dense graphs, we can also sample the edges for the graph embedding computation to save time, a measure we will investigate in the future. Figure 3 illustrates the approximation ratios of various approaches as a function of running time. All algorithms report a single solution at termination, whereas CPLEX reports multiple improving solutions, for which we recorded the corresponding running time and approximation ratio. Figure D.3 (Appendix D.7) includes other graph sizes and types, where the results are consistent with Figure 3. Figure 3 shows that, for MVC, we are slightly slower than the approximation algorithms but enjoy a much better approximation ratio. Also note that although CPLEX found the first feasible solution quickly, it also has much worse ratio; the second improved solution found by CPLEX takes similar or longer time than our S2V-DQN, but is still of worse quality. For MAXCUT, the observations are still consistent. One should be aware that sometimes our algorithm can obtain better results than 1-hour CPLEX, which gives ratios below 1.0. Furthermore, sometimes S2V-DQN is even faster than the 8 (a) MVC BA 200-300 (b) MAXCUT BA 200-300 Figure 3: Time-approximation trade-off for MVC and MAXCUT. In this figure, each dot represents a solution found for a single problem instance, for 100 instances. For CPLEX, we also record the time and quality of each solution it finds, e.g. CPLEX-1st means the first feasible solution found by CPLEX. MaxcutApprox, although this comparison is not exactly fair, since we use GPUs; however, we can still see that our algorithm is efficient. 5.4 Experiments on real-world datasets In addition to the experiments for synthetic data, we identified sets of publicly available benchmark or real-world instances for each problem, and performed experiments on them. A summary of results is in Table 3, and details are given in Appendix C. S2V-DQN significantly outperforms all competing methods for MVC, MAXCUT and TSP. Table 3: Realistic data experiments, results summary. Values are average approximation ratios. Problem Dataset S2V-DQN Best Competitor 2nd Best Competitor MVC MemeTracker 1.0021 1.2220 (MVCApprox-Greedy) 1.4080 (MVCApprox) MAXCUT Physics 1.0223 1.2825 (MaxcutApprox) 1.8996 (SDP) TSP TSPLIB 1.0475 1.0800 (Farthest) 1.0947 (2-opt) 5.5 Discovery of interesting new algorithms We further examined the algorithms learned by S2V-DQN, and tried to interpret what greedy heuristics have been learned. We found that S2V-DQN is able to discover new and interesting algorithms which intuitively make sense but have not been analyzed before. For instance, S2V-DQN discovers an algorithm for MVC where nodes are selected to balance between their degrees and the connectivity of the remaining graph (Appendix Figures D.4 and D.7). For MAXCUT, S2V-DQN discovers an algorithm where nodes are picked to avoid cancelling out existing edges in the cut set (Appendix Figure D.5). These results suggest that S2V-DQN may also be a good assistive tool for discovering new algorithms, especially in cases when the graph optimization problems are new and less wellstudied. 6 Conclusions We presented an end-to-end machine learning framework for automatically designing greedy heuristics for hard combinatorial optimization problems on graphs. Central to our approach is the combination of a deep graph embedding with reinforcement learning. Through extensive experimental evaluation, we demonstrate the effectiveness of the proposed framework in learning greedy heuristics as compared to manually-designed greedy algorithms. The excellent performance of the learned heuristics is consistent across multiple different problems, graph types, and graph sizes, suggesting that the framework is a promising new tool for designing algorithms for graph problems. Acknowledgments This project was supported in part by NSF IIS-1218749, NIH BIGDATA 1R01GM108341, NSF CAREER IIS-1350983, NSF IIS-1639792 EAGER, NSF CNS-1704701, ONR N00014-15-1-2340, Intel ISTC, NVIDIA and Amazon AWS. Dilkina is supported by NSF grant CCF-1522054 and ExxonMobil. References [1] Albert, Réka and Barabási, Albert-László. Statistical mechanics of complex networks. Reviews of modern physics, 74(1):47, 2002. [2] Andrychowicz, Marcin, Denil, Misha, Gomez, Sergio, Hoffman, Matthew W, Pfau, David, Schaul, Tom, and de Freitas, Nando. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, pp. 3981–3989, 2016. 9 [3] Applegate, David, Bixby, Robert, Chvatal, Vasek, and Cook, William. Concorde TSP solver, 2006. [4] Applegate, David L, Bixby, Robert E, Chvatal, Vasek, and Cook, William J. The traveling salesman problem: a computational study. Princeton university press, 2011. [5] Balas, Egon and Ho, Andrew. Set covering algorithms using cutting planes, heuristics, and subgradient optimization: a computational study. Combinatorial Optimization, pp. 37–60, 1980. [6] Bello, Irwan, Pham, Hieu, Le, Quoc V, Norouzi, Mohammad, and Bengio, Samy. Neural combinatorial optimization with reinforcement learning. arXiv preprint arXiv:1611.09940, 2016. [7] Boyan, Justin and Moore, Andrew W. Learning evaluation functions to improve optimization by local search. Journal of Machine Learning Research, 1(Nov):77–112, 2000. [8] Chen, Yutian, Hoffman, Matthew W, Colmenarejo, Sergio Gomez, Denil, Misha, Lillicrap, Timothy P, and de Freitas, Nando. Learning to learn for global optimization of black box functions. arXiv preprint arXiv:1611.03824, 2016. [9] Dai, Hanjun, Dai, Bo, and Song, Le. Discriminative embeddings of latent variable models for structured data. In ICML, 2016. [10] Du, Nan, Song, Le, Gomez-Rodriguez, Manuel, and Zha, Hongyuan. Scalable influence estimation in continuous-time diffusion networks. In NIPS, 2013. [11] Erdos, Paul and Rényi, A. On the evolution of random graphs. Publ. Math. Inst. Hungar. Acad. Sci, 5:17–61, 1960. [12] Goemans, M.X. and Williamson, D. P. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. Journal of the ACM, 42(6): 1115–1145, 1995. [13] Gomez-Rodriguez, Manuel, Leskovec, Jure, and Krause, Andreas. Inferring networks of diffusion and influence. In Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 1019–1028. ACM, 2010. [14] Graves, Alex, Wayne, Greg, Reynolds, Malcolm, Harley, Tim, Danihelka, Ivo, GrabskaBarwi´nska, Agnieszka, Colmenarejo, Sergio Gómez, Grefenstette, Edward, Ramalho, Tiago, Agapiou, John, et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471–476, 2016. [15] Gu, Shixiang, Lillicrap, Timothy, Ghahramani, Zoubin, Turner, Richard E, and Levine, Sergey. Q-prop: Sample-efficient policy gradient with an off-policy critic. arXiv preprint arXiv:1611.02247, 2016. [16] He, He, Daume III, Hal, and Eisner, Jason M. Learning to search in branch and bound algorithms. In Advances in Neural Information Processing Systems, pp. 3293–3301, 2014. [17] IBM. CPLEX User’s Manual, Version 12.6.1, 2014. [18] Johnson, David S and McGeoch, Lyle A. Experimental analysis of heuristics for the stsp. In The traveling salesman problem and its variations, pp. 369–443. Springer, 2007. [19] Karp, Richard M. Reducibility among combinatorial problems. In Complexity of computer computations, pp. 85–103. Springer, 1972. [20] Kempe, David, Kleinberg, Jon, and Tardos, Éva. Maximizing the spread of influence through a social network. In KDD, pp. 137–146. ACM, 2003. [21] Khalil, Elias B., Dilkina, B., and Song, L. Scalable diffusion-aware optimization of network topology. In Knowledge Discovery and Data Mining (KDD), 2014. [22] Khalil, Elias B., Le Bodic, Pierre, Song, Le, Nemhauser, George L, and Dilkina, Bistra N. Learning to branch in mixed integer programming. In AAAI, pp. 724–731, 2016. 10 [23] Khalil, Elias B., Dilkina, Bistra, Nemhauser, George, Ahmed, Shabbir, and Shao, Yufen. Learning to run heuristics in tree search. In 26th International Joint Conference on Artificial Intelligence (IJCAI), 2017. [24] Kingma, Diederik and Ba, Jimmy. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [25] Kleinberg, Jon and Tardos, Eva. Algorithm design. Pearson Education India, 2006. [26] Lagoudakis, Michail G and Littman, Michael L. Learning to select branching rules in the dpll procedure for satisfiability. Electronic Notes in Discrete Mathematics, 9:344–359, 2001. [27] Li, Ke and Malik, Jitendra. Learning to optimize. arXiv preprint arXiv:1606.01885, 2016. [28] Mnih, Volodymyr, Kavukcuoglu, Koray, Silver, David, Graves, Alex, Antonoglou, Ioannis, Wierstra, Daan, and Riedmiller, Martin A. Playing atari with deep reinforcement learning. CoRR, abs/1312.5602, 2013. URL http://arxiv.org/abs/1312.5602. [29] Mnih, Volodymyr, Kavukcuoglu, Koray, Silver, David, Rusu, Andrei A, Veness, Joel, Bellemare, Marc G, Graves, Alex, Riedmiller, Martin, Fidjeland, Andreas K, Ostrovski, Georg, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [30] Papadimitriou, C. H. and Steiglitz, K. Combinatorial Optimization: Algorithms and Complexity. Prentice-Hall, New Jersey, 1982. [31] Peleg, David, Schechtman, Gideon, and Wool, Avishai. Approximating bounded 0-1 integer linear programs. In Theory and Computing Systems, 1993., Proceedings of the 2nd Israel Symposium on the, pp. 69–77. IEEE, 1993. [32] Reinelt, Gerhard. Tsplib—a traveling salesman problem library. ORSA journal on computing, 3 (4):376–384, 1991. [33] Riedmiller, Martin. Neural fitted q iteration–first experiences with a data efficient neural reinforcement learning method. In European Conference on Machine Learning, pp. 317–328. Springer, 2005. [34] Sabharwal, Ashish, Samulowitz, Horst, and Reddy, Chandra. Guiding combinatorial optimization with uct. In CPAIOR, pp. 356–361. Springer, 2012. [35] Samulowitz, Horst and Memisevic, Roland. Learning to solve QBF. In AAAI, 2007. [36] Sutton, R.S. and Barto, A.G. Reinforcement Learning: An Introduction. MIT Press, 1998. [37] Vinyals, Oriol, Fortunato, Meire, and Jaitly, Navdeep. Pointer networks. In Advances in Neural Information Processing Systems, pp. 2692–2700, 2015. [38] Zhang, Wei and Dietterich, Thomas G. Solving combinatorial optimization tasks by reinforcement learning: A general methodology applied to resource-constrained scheduling. Journal of Artificial Intelligence Reseach, 1:1–38, 2000. 11 | 2017 | 556 |
7,070 | Resurrecting the sigmoid in deep learning through dynamical isometry: theory and practice Jeffrey Pennington Google Brain Samuel S. Schoenholz Google Brain Surya Ganguli Applied Physics, Stanford University and Google Brain Abstract It is well known that weight initialization in deep networks can have a dramatic impact on learning speed. For example, ensuring the mean squared singular value of a network’s input-output Jacobian is O(1) is essential for avoiding exponentially vanishing or exploding gradients. Moreover, in deep linear networks, ensuring that all singular values of the Jacobian are concentrated near 1 can yield a dramatic additional speed-up in learning; this is a property known as dynamical isometry. However, it is unclear how to achieve dynamical isometry in nonlinear deep networks. We address this question by employing powerful tools from free probability theory to analytically compute the entire singular value distribution of a deep network’s input-output Jacobian. We explore the dependence of the singular value distribution on the depth of the network, the weight initialization, and the choice of nonlinearity. Intriguingly, we find that ReLU networks are incapable of dynamical isometry. On the other hand, sigmoidal networks can achieve isometry, but only with orthogonal weight initialization. Moreover, we demonstrate empirically that deep nonlinear networks achieving dynamical isometry learn orders of magnitude faster than networks that do not. Indeed, we show that properly-initialized deep sigmoidal networks consistently outperform deep ReLU networks. Overall, our analysis reveals that controlling the entire distribution of Jacobian singular values is an important design consideration in deep learning. 1 Introduction Deep learning has achieved state-of-the-art performance in many domains, including computer vision [1], machine translation [2], human games [3], education [4], and neurobiological modelling [5, 6]. A major determinant of success in training deep networks lies in appropriately choosing the initial weights. Indeed the very genesis of deep learning rested upon the initial observation that unsupervised pre-training provides a good set of initial weights for subsequent fine-tuning through backpropagation [7]. Moreover, seminal work in deep learning suggested that appropriately-scaled Gaussian weights can prevent gradients from exploding or vanishing exponentially [8], a condition that has been found to be necessary to achieve reasonable learning speeds [9]. These random weight initializations were primarily driven by the principle that the mean squared singular value of a deep network’s Jacobian from input to output should remain close to 1. This condition implies that on average, a randomly chosen error vector will preserve its norm under backpropagation; however, it provides no guarantees on the worst case growth or shrinkage of an error vector. A stronger requirement one might demand is that every Jacobian singular value remain close to 1. Under this stronger requirement, every single error vector will approximately preserve its norm, and moreover all angles between different error vectors will be preserved. Since error information 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. backpropagates faithfully and isometrically through the network, this stronger requirement is called dynamical isometry [10]. A theoretical analysis of exact solutions to the nonlinear dynamics of learning in deep linear networks [10] revealed that weight initializations satisfying dynamical isometry yield a dramatic increase in learning speed compared to initializations that do not. For such linear networks, orthogonal weight initializations achieve dynamical isometry, and, remarkably, their learning time, measured in number of learning epochs, becomes independent of depth. In contrast, random Gaussian initializations do not achieve dynamical isometry, nor do they achieve depth-independent training times. It remains unclear, however, how these results carry over to deep nonlinear networks. Indeed, empirically, a simple change from Gaussian to orthogonal initializations in nonlinear networks has yielded mixed results [11], raising important theoretical and practical questions. First, how does the entire distribution of singular values of a deep network’s input-output Jacobian depend upon the depth, the statistics of random initial weights, and the shape of the nonlinearity? Second, what combinations of these ingredients can achieve dynamical isometry? And third, among the nonlinear networks that have neither vanishing nor exploding gradients, do those that in addition achieve dynamical isometry also achieve much faster learning compared to those that do not? Here we answer these three questions, and we provide a detailed summary of our results in the discussion. 2 Theoretical Results In this section we derive expressions for the entire singular value density of the input-output Jacobian for a variety of nonlinear networks in the large-width limit. We compute the mean squared singular value of J (or, equivalently, the mean eiganvalue of JJT ), and deduce a rescaling that sets it equal to 1. We then examine two metrics that help quantify the conditioning of the Jacobian: smax, the maximum singular value of J (or, equivalently, λmax, the maximum eigenvalue of JJT ); and σ2 JJT , the variance of the eigenvalue distribution of JJT . If λmax ≫1 and σ2 JJT ≫1 then the Jacobian is ill-conditioned and we expect the learning dynamics to be slow. 2.1 Problem setup Consider an L-layer feed-forward neural network of width N with synaptic weight matrices Wl 2 RN⇥N, bias vectors bl, pre-activations hl and post-activations xl, with l = 1, . . . , L. The feedforward dynamics of the network are governed by, xl = φ(hl) , xl = Wlhl−1 + bl , (1) where φ : R ! R is a pointwise nonlinearity and the input is h0 2 RN. Now consider the input-output Jacobian J 2 RN⇥N given by J = @xL @h0 = L Y l=1 DlWl. (2) Here Dl is a diagonal matrix with entries Dl ij = φ0(hl i) δij. The input-output Jacobian J is closely related to the backpropagation operator mapping output errors to weight matrices at a given layer; if the former is well conditioned, then the latter tends to be well-conditioned for all weight layers. We therefore wish to understand the entire singular value spectrum of J for deep networks with randomly initialized weights and biases. In particular, we will take the biases bl i to be drawn i.i.d. from a zero mean Gaussian with standard deviation σb. For the weights, we will consider two random matrix ensembles: (1) random Gaussian weights in which each W l ij is drawn i.i.d from a Gaussian with variance σ2 w/N, and (2) random orthogonal weights, drawn from a uniform distribution over scaled orthogonal matrices obeying (Wl)T Wl = σ2 w I. 2.2 Review of signal propagation The random matrices Dl in eqn. (2) depend on the empirical distribution of pre-activations hl entering the nonlinearity φ in eqn. (1). The propagation of this empirical distribution through different layers l 2 was studied in [12]. There, it was shown that in the large-N limit this empirical distribution converges to a Gaussian with zero mean and variance ql, where ql obeys a recursion relation induced by the dynamics in eqn. (1), ql = σ2 w Z Dh φ ⇣p ql−1h ⌘2 + σ2 b , (3) with initial condition q0 = 1 N PN i=1(h0 i )2, and where Dh = dh p 2⇡exp (−h2 2 ) denotes the standard Gaussian measure. This recursion has a fixed point obeying, q⇤= σ2 w Z Dh φ 'pq⇤h (2 + σ2 b . (4) If the input h0 is chosen so that q0 = q⇤, then we start at the fixed point, and the distribution of Dl becomes independent of l. Also, if we do not start at the fixed point, in many scenarios we rapidly approach it in a few layers (see [12]), so for large L, assuming ql = q⇤at all depths l is a good approximation in computing the spectrum of J. Another important quantity governing signal propagation through deep networks [12, 13] is χ = 1 N ⌦ Tr (DW)T DW ↵ = σ2 w Z Dh ⇥ φ0 'pq⇤h (⇤2 , (5) where φ0 is the derivative of φ. Here χ is the mean of the distribution of squared singular values of the matrix DW, when the pre-activations are at their fixed point distribution with variance q⇤. As shown in [12, 13] and Fig. 1, χ(σw, σb) separates the (σw, σb) plane into two phases, chaotic and ordered, in which gradients exponentially explode or vanish respectively. Indeed, the mean squared singular value of J was shown simply to be χL in [12, 13], so χ = 1 is a critical line of initializations with neither vanishing nor exploding gradients. Ordered Chaotic χ(σw, σb) < 1 χ(σw, σb) > 1 Vanishing Gradients Exploding Gradients q⇤= 1.5 0.0 0.5 1.0 1.5 Figure 1: Order-chaos transition when φ(h) = tanh(h). The critical line χ(σw, σb) = 1 determines the boundary between two phases [12, 13]: (a) a chaotic phase when χ > 1, where forward signal propagation expands and folds space in a chaotic manner and back-propagated gradients exponentially explode, and (b) an ordered phase when χ < 1, where forward signal propagation contracts space in an ordered manner and back-propagated gradients exponentially vanish. The value of q⇤along the critical line separating the two phases is shown as a heatmap. 2.3 Free probability, random matrix theory and deep networks. While the previous section revealed that the mean squared singular value of J is χL, we would like to obtain more detailed information about the entire singular value distribution of J, especially when χ = 1. Since eqn. (2) consists of a product of random matrices, free probability [14, 15, 16] becomes relevant to deep learning as a powerful tool to compute the spectrum of J, as we now review. In general, given a random matrix X, its limiting spectral density is defined as ⇢X(λ) ⌘ * 1 N N X i=1 δ(λ −λi) + X , (6) where h·iX denotes the mean with respect to the distribution of the random matrix X. Also, GX(z) ⌘ Z R ⇢X(t) z −t dt , z 2 C \ R , (7) is the definition of the Stieltjes transform of ⇢X, which can be inverted using, ⇢X(λ) = −1 ⇡lim ✏!0+ Im GX(λ + i✏) . (8) 3 (a) (b) (c) (d) Linear Gaussian ReLU Orthogonal HTanh Orthogonal L = 2 L = 8 L = 32 L = 128 Figure 2: Examples of deep spectra at criticality for different nonlinearities at different depths. Excellent agreement is observed between empirical simulations of networks of width 1000 (dashed lines) and theoretical predictions (solid lines). ReLU and hard tanh are with orthogonal weights, and linear is with Gaussian weights. Gaussian linear and orthogonal ReLU have similarly-shaped distributions, especially for large depths, where poor conditioning and many large singular values are observed. On the other hand, orthogonal hard tanh is much better conditioned. The Stieltjes transform GX is related to the moment generating function MX, MX(z) ⌘zGX(z) −1 = 1 X k=1 mk zk , (9) where the mk is the kth moment of the distribution ⇢X, mk = R dλ ⇢X(λ)λk = 1 N htrXkiX . In turn, we denote the functional inverse of MX by M −1 X , which by definition satisfies MX(M −1 X (z)) = M −1 X (MX(z)) = z. Finally, the S-transform [14, 15] is defined as, SX(z) = 1 + z zM −1 X (z) . (10) The utility of the S-transform arises from its behavior under multiplication. Specifically, if A and B are two freely-independent random matrices, then the S-transform of the product random matrix ensemble AB is simply the product of their S-transforms, SAB(z) = SA(z)SB(z) . (11) Our first main result will be to use eqn. (11) to write down an implicit definition of the spectral density of JJT . To do this we first note that (see Result 1 of the supplementary material), SJJT = L Y l=1 SWlW T l SD2 l = SL W W T SL D2 , (12) where we have used the identical distribution of the weights to define SW W T = SWlW T l for all l, and we have also used the fact the pre-activations are distributed independently of depth as hl ⇠N(0, q⇤), which implies that SD2 l = SD2 for all l. Eqn. (12) provides a method to compute the spectrum ⇢JJT (λ). Starting from ⇢W T W (λ) and ⇢D2(λ), we compute their respective S-transforms through the sequence of equations eqns. (7), (9), and (10), take the product in eqn. (12), and then reverse the sequence of steps to go from SJJT to ⇢JJT (λ) through the inverses of eqns. (10), (9), and (8). Thus we must calculate the S-transforms of WWT and D2, which we attack next for specific nonlinearities and weight ensembles in the following sections. In principle, this procedure can be carried out numerically for an arbitrary choice of nonlinearity, but we postpone this investigation to future work. 2.4 Linear networks As a warm-up, we first consider a linear network in which J = QL l=1 Wl. Since criticality (χ = 1 in eqn. (5)) implies σ2 w = 1 and eqn. (4) reduces to q⇤= σ2 wq⇤+ σ2 b, the only critical point is (σw, σb) = (1, 0). The case of orthogonal weights is simple: J is also orthogonal, and all its singular values are 1, thereby achieving perfect dynamic isometry. Gaussian weights behave very differently. 4 The squared singular values s2 i of J equal the eigenvalues λi of JJT , which is a product Wishart matrix, whose spectral density was recently computed in [17]. The resulting singular value density of J is given by, ⇢(s(φ)) = 2 ⇡ s sin3(φ) sinL−2(Lφ) sinL−1((L + 1)φ) , s(φ) = s sinL+1((L + 1)φ) sin φ sinL(Lφ) . (13) Fig. 2(a) demonstrates a match between this theoretical density and the empirical density obtained from numerical simulations of random linear networks. As the depth increases, this density becomes highly anisotropic, both concentrating about zero and developing an extended tail. Note that φ = ⇡/(L + 1) corresponds to the minimum singular value smin = 0, while φ = 0 corresponds to the maximum eigenvalue, λmax = s2 max = L−L(L + 1)L+1, which, for large L scales as λmax ⇠eL. Both eqn. (13) and the methods of Section 2.5 yield the variance of the eigenvalue distribution of JJT to be σ2 JJT = L. Thus for linear Gaussian networks, both smax and σ2 JJT grow linearly with depth, signalling poor conditioning and the breakdown of dynamical isometry. 2.5 ReLU and hard-tanh networks We first discuss the criticality conditions (finite q⇤in eqn. (4) and χ = 1 in eqn. (5)) in these two nonlinear networks. For both networks, since the slope of the nonlinearity φ0(h) only takes the values 0 and 1, χ in eqn. (5) reduces to χ = σ2 wp(q⇤) where p(q⇤) is the probability that a given neuron is in the linear regime with φ0(h) = 1. As discussed above, we take the largewidth limit in which the distribution of the pre-activations h is a zero mean Gaussian with variance q⇤. We therefore find that for ReLU, p(q⇤) = 1 2 is independent of q⇤, whereas for hard-tanh, p(q⇤) = R 1 −1 dh e−h2/2q⇤ p2⇡q⇤ = erf(1/p2q⇤) depends on q⇤. In particular, it approaches 1 as q⇤! 0. Thus for ReLU, χ = 1 if and only if σ2 w = 2, in which case eqn. (4) reduces to q⇤= 1 2σ2 wq⇤+ σ2 b, implying that the only critical point is (σw, σb) = (2, 0). For hard-tanh, in contrast, χ = σ2 wp(q⇤), where p(q⇤) itself depends on σw and σb through eqn. (4), and so the criticality condition χ = 1 yields a curve in the (σw, σb) plane similar to that shown for the tanh network in Fig. 1. As one moves along this curve in the direction of decreasing σw, the curve approaches the point (σw, σb) = (1, 0) with q⇤monotonically decreasing towards 0, i.e. q⇤! 0 as σw ! 1. The critical ReLU network and the one parameter family of critical hard-tanh networks have neither vanishing nor exploding gradients, due to χ = 1. Nevertheless, the entire singular value spectrum of J of these networks can behave very differently. From eqn. (12), this spectrum depends on the non-linearity φ(h) through SD2 in eqn. (10), which in turn only depends on the distribution of eigenvalues of D2, or equivalently, the distribution of squared derivatives φ0(h)2. As we have seen, this distribution is a Bernoulli distribution with parameter p(q⇤): ⇢D2(z) = (1 −p(q⇤)) δ(z) + p(q⇤) δ(z −1). Inserting this distribution into the sequence eqn. (7), eqn. (9), eqn. (10) then yields GD2(z) = 1 −p(q⇤) z + p(q⇤) z −1 , MD2(z) = p(q⇤) z −1 , SD2(z) = z + 1 z + p(q⇤) . (14) To complete the calculation of SJJT in eqn. (12), we must also compute SW W T . We do this for Gaussian and orthogonal weights in the next two subsections. 2.5.1 Gaussian weights We re-derive the well-known expression for the S-transform of products of random Gaussian matrices with variance σ2 w in Example 3 of the supplementary material. The result is SW W T = σ−2 w (1 + z)−1, which, when combined with eqn. (14) for SD2, eqn. (12) for SJJT , and eqn. (10) for M −1 X (z), yields SJJT (z) = σ−2L w (z + p(q⇤))−L, M −1 JJT (z) = z + 1 z ' z + p(q⇤) (Lσ2L w . (15) Using eqn. (15) and eqn. (9), we can define a polynomial that the Stieltjes transform G satisfies, σ2L w G(Gz + p(q⇤) −1)L −(Gz −1) = 0 . (16) The correct root of this equation is the one for which G ⇠1/z as z ! 1 [16]. From eqn. (8), the spectral density is obtained from the imaginary part of G(λ + i✏) as ✏! 0+. 5 q⇤= 1/64 q⇤= 64 L = 1 L = 1024 (a) (b) (c) (d) Figure 3: The max singular value smax of J versus L and q⇤for Gaussian (a,c) and orthogonal (b,d) weights, with ReLU (dashed) and hard-tanh (solid) networks. For Gaussian weights and for both ReLU and hard-tanh, smax grows with L for all q⇤(see a,c) as predicted in eqn. (17) . In contrast, for orthogonal hard-tanh, but not orthogonal ReLU, at small enough q⇤, smax can remain O(1) even at large L (see b,d) as predicted in eqn. (22). In essence, at fixed small q⇤, if p(q⇤) is the large fraction of neurons in the linear regime, smax only grows with L after L > p/(1 −p) (see d). As q⇤! 0, p(q⇤) ! 1 and the hard-tanh networks look linear. Thus the lowest curve in (a) corresponds to the prediction of linear Gaussian networks in eqn. (13), while the lowest curve in (b) is simply 1, corresponding to linear orthogonal networks. The positions of the spectral edges, namely locations of the minimum and maximum eigenvalues of JJT , can be deduced from the values of z for which the imaginary part of the root of eqn. (16) vanishes, i.e. when the discriminant of the polynomial in eqn. (16) vanishes. After a detailed but unenlightening calculation, we find, for large L, λmax = s2 max = ' σ2 wp(q⇤) (L ✓ e p(q⇤)L + O(1) ◆ . (17) Recalling that χ = σ2 wp(q⇤), we find exponential growth in λmax if χ > 1 and exponential decay if χ < 1. Moreover, even at criticality when χ = 1, λmax still grows linearly with depth. Next, we obtain the variance σ2 JJT of the eigenvalue density of JJT by computing its first two moments m1 and m2. We employ the Lagrange inversion theorem [18], MJJT (z) = m1 z + m2 z2 + · · · , M −1 JJT (z) = m1 z + m2 m1 + · · · , (18) which relates the expansions of the moment generating function MJJT (z) and its functional inverse M −1 JJT (z). Substituting this expansion for M −1 JJT (z) into eqn. (15), expanding the right hand side, and equating the coefficients of z, we find, m1 = (σ2 wp(q⇤))L , m2 = (σ2 wp(q⇤))2L' L + p(q⇤) ( /p(q⇤) . (19) Both moments generically either exponentially grow or vanish. However even at criticality, when χ = σ2 wp(q⇤) = 1, the variance σ2 JJT = m2 −m2 1 = L p(q⇤) still exhibits linear growth with depth. Note that p(q⇤) is the fraction of neurons operating in the linear regime, which is always less than 1. Thus for both ReLU and hard-tanh networks, no choice of Gaussian initialization can ever prevent this linear growth, both in σ2 JJT and λmax, implying that even critical Gaussian initializations will always lead to a failure of dynamical isometry at large depth for these networks. 2.5.2 Orthogonal weights For orthogonal W, we have WWT = I, and the S-transform is SI = 1 (see Example 2 of the supplementary material). After scaling by σw, we have SW W T = Sσ2wI = σ−2 w SI = σ−2 w . Combining this with eqn. (14) and eqn. (12) yields SJJT (z) and, through eqn. (10), yields M −1 JJT : SJJT (z) = σ−2L w ✓ z + 1 z + p(q⇤) ◆L , M −1 JJT = z + 1 z ✓ z + 1 z + p(q⇤) ◆−L σ2L w . (20) Now, combining eqn. (20) and eqn. (9), we obtain a polynomial that the Stieltjes transform G satisfies: g2LG(Gz + p(g) −1)L −(zG)L(Gz −1) = 0 . (21) 6 (a) (b) (c) (d) SGD Momentum ADAM RMSProp Figure 4: Learning dynamics, measured by generalization performance on a test set, for networks of depth 200 and width 400 trained on CIFAR10 with different optimizers. Blue is tanh with σ2 w = 1.05, red is tanh with σ2 w = 2, and black is ReLU with σ2 w = 2. Solid lines are orthogonal and dashed lines are Gaussian initialization. The relative ordering of curves robustly persists across optimizers, and is strongly correlated with the degree to which dynamical isometry is present at initialization, as measured by smax in Fig. 3. Networks with smax closer to 1 learn faster, even though all networks are initialized critically with χ = 1. The most isometric orthogonal tanh with small σ2 w trains several orders of magnitude faster than the least isometric ReLU network. From this we can extract the eigenvalue and singular value density of JJT and J, respectively, through eqn. (8). Figs. 2(b) and 2(c) demonstrate an excellent match between our theoretical predictions and numerical simulations of random networks. We find that at modest depths, the singular values are peaked near λmax, but at larger depths, the distribution both accumulates mass at 0 and spreads out, developing a growing tail. Thus at fixed critical values of σw and σb, both deep ReLU and hard-tanh networks have ill-conditioned Jacobians, even with orthogonal weight matrices. As above, we can obtain the maximum eigenvalue of JJT by determining the values of z for which the discriminant of the polynomial in eqn. (21) vanishes. This calculation yields, λmax = s2 max = ' σ2 wp(q⇤) (L 1 −p(q⇤) p(q⇤) LL (L −1)L−1 . (22) For large L, λmax either exponentially explodes or decays, except at criticality when χ = σ2 wp(q⇤) = 1, where it behaves as λmax = 1−p(q⇤) p(q⇤) ' eL −e 2 ( + O(L−1). Also, as above, we can compute the variance σ2 JJT by expanding M −1 JJT in eqn. (20) and applying eqn. (18). At criticality, we find σ2 JJT = 1−p(q⇤) p(q⇤) L for large L. Now the large L asymptotic behavior of both λmax and σ2 JJT depends crucially on p(q⇤), the fraction of neurons in the linear regime. For ReLU networks, p(q⇤) = 1/2, and we see that λmax and σ2 JJT grow linearly with depth and dynamical isometry is unachievable in ReLU networks, even for critical orthogonal weights. In contrast, for hard tanh networks, p(q⇤) = erf(1/p2q⇤). Therefore, one can always move along the critical line in the (σw, σb) plane towards the point (1, 0), thereby reducing q⇤, increasing p(q⇤), and decreasing, to an arbitrarily small value, the prefactor 1−p(q⇤) p(q⇤) controlling the linear growth of both λmax and σ2 JJT . So unlike either ReLU networks, or Gaussian networks, one can achieve dynamical isometry up to depth L by choosing q⇤small enough so that p(q⇤) ⇡1 −1 L. In essence, this strategy increases the fraction of neurons operating in the linear regime, enabling orthogonal hard-tanh nets to mimic the successful dynamical isometry achieved by orthogonal linear nets. However, this strategy is unavailable for orthogonal ReLU networks. A demonstration of these results is shown in Fig. 3. 3 Experiments Having established a theory of the entire singular value distribution of J, and in particular of when dynamical isometry is present or not, we now provide empirical evidence that the presence or absence of this isometry can have a large impact on training speed. In our first experiment, summarized in Fig. 4, we compare three different classes of critical neural networks: (1) tanh with small σ2 w = 1.05 and σ2 b = 2.01 ⇥10−5; (2) tanh with large σ2 w = 2 and σ2 b = 0.104; and (3) ReLU with σ2 w = 2 and σ2 b = 2.01 ⇥10−5. In each case σb is chosen appropriately to achieve critical initial conditions at the 7 (a) (b) (c) (d) L = 10 q⇤= 64 q⇤= 1/64 L = 300 Figure 5: Empirical measurements of SGD training time ⌧, defined as number of steps to reach p ⇡0.25 accuracy, for orthogonal tanh networks. In (a), curves reflect different depths L at fixed small q⇤= 0.025. Intriguingly, they all collapse onto a single universal curve when the learning rate ⌘is rescaled by L and ⌧is rescaled by 1/ p L. This implies the optimal learning rate is O(1/L), and remarkably, the optimal learning time ⌧grows only as O( p L). (b) Now different curves reflect different q⇤at fixed L = 200, revealing that smaller q⇤, associated with increased dynamical isometry in J, enables faster training times by allowing a larger optimal learning rate ⌘. (c) ⌧as a function of L for a few values of q⇤. (d) ⌧as a function of q⇤for a few values of L. We see qualitative agreement of (c,d) with Fig. 3(b,d), suggesting a strong connection between ⌧and smax. boundary between order and chaos [12, 13], with χ = 1. All three of these networks have a mean squared singular value of 1 with neither vanishing nor exploding gradients in the infinite width limit. These experiments therefore probe the specific effect of dynamical isometry, or the entire shape of the spectrum of J, on learning. We also explore the degree to which more sophisticated optimizers can overcome poor initializations. We compare SGD, Momentum, RMSProp [19], and ADAM [20]. We train networks of depth L = 200 and width N = 400 for 105 steps with a batch size of 103. We additionally average our results over 30 different instantiations of the network to reduce noise. For each nonlinearity, initialization, and optimizer, we obtain the optimal learning rate through grid search. For SGD and SGD+Momentum we consider logarithmically spaced rates between [10−4, 10−1] in steps 100.1; for ADAM and RMSProp we explore the range [10−7, 10−4] at the same step size. To choose the optimal learning rate we select a threshold accuracy p and measure the first step when performance exceeds p. Our qualitative conclusions are fairly independent of p. Here we report results on a version of CIFAR101. Based on our theory, we expect the performance advantage of orthogonal over Gaussian initializations to be significant in case (1) and somewhat negligible in cases (2) and (3). This prediction is verified in Fig. 4 (blue solid and dashed learning curves are well-separated, compared to red and black cases). Furthermore, the extent of dynamical isometry at initialization strongly predicts the speed of learning. The effect is large, with the most isometric case (orthogonal tanh with small σ2 w) learning faster than the least isometric case (ReLU networks) by several orders of magnitude. Moreover, these conclusions robustly persist across all optimizers. Intriguingly, in the case where dynamical isometry helps the most (tanh with small σ2 w), the effect of initialization (orthogonal versus Gaussian) has a much larger impact on learning speed than the choice of optimizer. These insights suggest a more quantitative analysis of the relation between dynamical isometry and learning speed for orthogonal tanh networks, summarized in Fig. 5. We focus on SGD, given the lack of a strong dependence on optimizer. Intriguingly, Fig. 5(a) demonstrates the optimal training time is O( p L) and so grows sublinearly with depth L. Also Fig. 5(b) reveals that increased dynamical isometry enables faster training by making available larger (i.e. faster) learning rates. Finally, Fig. 5(c,d) and their similarity to Fig. 3(b,d) suggest a strong positive correlation between training time and max singular value of J. Overall, these results suggest that dynamical isometry is correlated with learning speed, and controlling the entire distribution of Jacobian singular values may be an important design consideration in deep learning. In Fig. 6, we explore the relationship between dynamical isometry and performance going beyond initialization by studying the evolution of singular values throughout training. We find that if dynamical isometry is present at initialization, it persists for some time into training. Intriguingly, 1We use the standard CIFAR10 dataset augmented with random flips and crops, and random saturation, brightness, and contrast perturbations 8 (a) (b) (c) (d) t = 0 101 102 103 q⇤= 1/64 q⇤= 32 Figure 6: Singular value evolution of J for orthogonal tanh networks during SGD training. (a) The average distribution, over 30 networks with q⇤= 1/64, at different SGD steps. (b) A measure of eigenvalue ill-conditioning of JJT (hλi2/hλ2i 1 with equality if and only if ⇢(λ) = δ(λ −λ0)) over number of SGD steps for different initial q⇤. Interestingly, the optimal q⇤that best maintains dynamical isometry in later stages of training is not simply the smallest q⇤. (c) Test accuracy as a function of SGD step for those q⇤considered in (b). (d) Generalization accuracy as a function of initial q⇤. Together (b,c,d) reveal that the optimal nonzero q⇤, that best maintains dynamical isometry into training, also yields the fastest learning and best generalization accuracy. perfect dynamical isometry at initialization (q⇤= 0) is not the best choice for preserving isometry throughout training; instead, some small but nonzero value of q⇤appears optimal. Moreover, both learning speed and generalization accuracy peak at this nonzero value. These results bolster the relationship between dynamical isometry and performance beyond simply the initialization. 4 Discussion In summary, we have employed free probability theory to analytically compute the entire distribution of Jacobian singular values as a function of depth, random initialization, and nonlinearity shape. This analytic computation yielded several insights into which combinations of these ingredients enable nonlinear deep networks to achieve dynamical isometry. In particular, deep linear Gaussian networks cannot; the maximum Jacobian singular value grows linearly with depth even if the second moment remains 1. The same is true for both orthogonal and Gaussian ReLU networks. Thus the ReLU nonlinearity destroys the dynamical isometry of orthogonal linear networks. In contrast, orthogonal, but not Gaussian, sigmoidal networks can achieve dynamical isometry; as the depth increases, the max singular value can remain O(1) in the former case but grows linearly in the latter. Thus orthogonal sigmoidal networks rescue the failure of dynamical isometry in ReLU networks. Correspondingly, we demonstrate, on CIFAR-10, that orthogonal sigmoidal networks can learn orders of magnitude faster than ReLU networks. This performance advantage is robust to the choice of a variety of optimizers, including SGD, momentum, RMSProp and ADAM. Orthogonal sigmoidal networks moreover have sublinear learning times with depth. While not as fast as orthogonal linear networks, which have depth independent training times [10], orthogonal sigmoidal networks have training times growing as the square root of depth. Finally, dynamical isometry, if present at initialization, persists for a large amount of time during training. Moreover, isometric initializations with longer persistence times yield both faster learning and better generalization. Overall, these results yield the insight that the shape of the entire distribution of a deep network’s Jacobian singular values can have a dramatic effect on learning speed; only controlling the second moment, to avoid exponentially vanishing and exploding gradients, can leave significant performance advantages on the table. Moreover, by pursuing the design principle of tightly concentrating the entire distribution around 1, we reveal that very deep feedfoward networks, with sigmoidal nonlinearities, can actually outperform ReLU networks, the most popular type of nonlinear deep network used today. In future work, it would be interesting to extend our methods to other types of networks, including for example skip connections, or convolutional architectures. More generally, the performance advantage in learning that accompanies dynamical isometry suggests it may be interesting to explicitly optimize this property in reinforcement learning based searches over architectures [21]. Acknowledgments S.G. thanks the Simons, McKnight, James S. McDonnell, and Burroughs Wellcome Foundations and the Office of Naval Research for support. 9 References [1] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [2] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean. Google’s neural machine translation system: Bridging the gap between human and machine translation. CoRR, abs/1609.08144, 2016. [3] David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 01 2016. [4] Chris Piech, Jonathan Bassen, Jonathan Huang, Surya Ganguli, Mehran Sahami, Leonidas J Guibas, and Jascha Sohl-Dickstein. Deep knowledge tracing. In Advances in Neural Information Processing Systems, pages 505–513, 2015. [5] Daniel LK Yamins, Ha Hong, Charles F Cadieu, Ethan A Solomon, Darren Seibert, and James J DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, 2014. [6] Lane McIntosh, Niru Maheswaranathan, Aran Nayebi, Surya Ganguli, and Stephen Baccus. Deep learning models of the retinal response to natural scenes. In Advances in Neural Information Processing Systems, pages 1369–1377, 2016. [7] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504–507, 2006. [8] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, volume 9, pages 249–256, 2010. [9] Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In International Conference on Machine Learning, pages 1310–1318, 2013. [10] Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. ICLR 2014, 2013. [11] Dmytro Mishkin and Jiri Matas. All you need is a good init. CoRR, abs/1511.06422, 2015. [12] B. Poole, S. Lahiri, M. Raghu, J. Sohl-Dickstein, and S. Ganguli. Exponential expressivity in deep neural networks through transient chaos. Neural Information Processing Systems, 2016. [13] S. S. Schoenholz, J. Gilmer, S. Ganguli, and J. Sohl-Dickstein. Deep Information Propagation. International Conference on Learning Representations (ICLR), 2017. [14] Roland Speicher. Multiplicative functions on the lattice of non-crossing partitions and free convolution. Mathematische Annalen, 298(1):611–628, 1994. [15] Dan V Voiculescu, Ken J Dykema, and Alexandru Nica. Free random variables. Number 1. American Mathematical Soc., 1992. [16] Terence Tao. Topics in random matrix theory, volume 132. American Mathematical Society Providence, RI, 2012. [17] Thorsten Neuschel. Plancherel–rotach formulae for average characteristic polynomials of products of ginibre random matrices and the fuss–catalan distribution. Random Matrices: Theory and Applications, 3(01):1450003, 2014. [18] Joseph Louis Lagrange. Nouvelle méthode pour résoudre les problèmes indéterminés en nombres entiers. Chez Haude et Spener, Libraires de la Cour & de l’Académie royale, 1770. [19] Geoffrey Hinton, NiRsh Srivastava, and Kevin Swersky. Neural networks for machine learning lecture 6a overview of mini–batch gradient descent. 10 [20] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [21] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. CoRR, abs/1611.01578, 2016. 11 | 2017 | 557 |
7,071 | Adaptive Classification for Prediction Under a Budget Feng Nan Systems Engineering Boston University Boston, MA 02215 fnan@bu.edu Venkatesh Saligrama Electrical Engineering Boston University Boston, MA 02215 srv@bu.edu Abstract We propose a novel adaptive approximation approach for test-time resourceconstrained prediction motivated by Mobile, IoT, health, security and other applications, where constraints in the form of computation, communication, latency and feature acquisition costs arise. We learn an adaptive low-cost system by training a gating and prediction model that limits utilization of a high-cost model to hard input instances and gates easy-to-handle input instances to a low-cost model. Our method is based on adaptively approximating the high-cost model in regions where low-cost models suffice for making highly accurate predictions. We pose an empirical loss minimization problem with cost constraints to jointly train gating and prediction models. On a number of benchmark datasets our method outperforms state-of-the-art achieving higher accuracy for the same cost. 1 Introduction Resource costs arise during test-time prediction in a number of machine learning applications. Feature costs in Internet, Healthcare, and Surveillance applications arise due to to feature extraction time [23], and feature/sensor acquisition [19]. In addition to feature acquisition costs, communication and latency costs pose a key challenge in the design of mobile computing, or the Internet-ofThings(IoT) applications, where a large number of sensors/camera/watches/phones (known as edge devices) are connected to a cloud. Adaptive System: Rather than having the edge devices constantly transmit measurements/images to the cloud where a centralized model makes prediction, a more efficient approach is to allow the edge devices make predictions locally [12], whenever possible, saving the high communication cost and reducing latency. Due to the memory, computing and battery constraints, the prediction models on the edge devices are limited to low complexity. Consequently, to maintain high-accuracy, adaptive systems are desirable. Such systems identify easy-to-handle input instances where local edge models suffice, thus limiting the utilization cloud services for only hard instances. We propose to learn an adaptive system by training on fully annotated training data. Our objective is to maintain high accuracy while meeting average resource constraints during prediction-time. There have been a number of promising approaches that focus on methods for reducing costs while improving overall accuracy [9, 24, 19, 20, 13, 15]. These methods are adaptive in that, at testtime, resources (features, computation etc) are allocated adaptively depending on the difficulty of the input. Many of these methods train models in a top-down manner, namely, attempt to build out the model by selectively adding the most cost-effective features to improve accuracy. In contrast we propose a novel bottom-up approach. We train adaptive models on annotated training data by selectively identifying parts of the input space for which high accuracy can be maintained at a lower cost. The principle advantage of our method is twofold. First, our approach can be readily applied to cases where it is desirable to reduce costs of an existing high-cost legacy system. Second, training top-down models in case of feature costs leads to fundamental combinatorial issues in multistage search over all feature subsets (see Sec. 2). In contrast, we bypass many of these issues by posing a natural adaptive approximation objective to partition the input space into easy and hard cases. Figure 1: Upper: single stage schematic of our approach. We learn low-cost gating g and a LPC model to adaptively approximate a HPC model. Lower: Key insight for adaptive approximation. x-axis represents feature space; y-axis represents conditional probability of correct prediction; LPC can match HPC’s prediction in the input region corresponding to the right of the gating threshold but performs poorly otherwise. Our goal is to learn a low-cost gating function that attempts to send examples on the right to LPC and the left to HPC. In particular, when no legacy system is available, our method consists of first learning a high-accuracy model that minimizes the empirical loss regardless of costs. The resulting high prediction-cost model (HPC) can be readily trained using any of the existing methods. For example, this could be a large neural network in the cloud that achieves the state-of-the-art accuracy. Next, we jointly learn a low-cost gating function as well as a low prediction-cost (LPC) model so as to adaptively approximate the high-accuracy model by identifying regions of input space where a low-cost gating and LPC model are adequate to achieve high-accuracy. In IoT applications, such low-complexity models can be deployed on the edge devices to perform gating and prediction. At test-time, for each input instance, the gating function decides whether or not the LPC model is adequate for accurate classification. Intuitively, “easy” examples can be correctly classified using only an LPC model while “hard” examples require HPC model. By identifying which of the input instances can be classified accurately with LPCs we bypass the utilization of HPC model, thus reducing average prediction cost. The upper part of Figure 1 is a schematic of our approach, where x is feature vector and y is the predicted label; we aim to learn g and an LPC model to adaptively approximate the HPC. The key observation as depicted in the lower figure is that the probability of correct classification given x for a HPC model is in general a highly complex function with higher values than that of a LPC model. Yet there exists regions of the input space where the LPC has competitive accuracy (as shown to the right of the gating threshold). Sending examples in such regions (according to the gating function) to the LPC results in no loss of prediction accuracy while reducing prediction costs. The problem would be simpler if our task were to primarily partition the input space into regions where LPC models would suffice. The difficulty is that we must also learn a low-cost gating function capable of identifying input instances for which LPC suffices. Since both prediction and gating account for cost, we favor design strategies that lead to shared features and decision architectures between the gating function and the LPC model. We pose the problem as a discriminative empirical risk minimization problem that jointly optimizes for gating and prediction models in terms of a joint margin-based objective function. The resulting objective is separately convex in gating and prediction functions. We propose an alternating minimization scheme that is guaranteed to converge since with appropriate choice of loss-functions (for instance, logistic loss), each optimization step amounts to a probabilistic approximation/projection (I-projection/M-projection) onto a probability space. While our method can be recursively applied in multiple stages to successively approximate the adaptive system obtained in the previous stage, thereby refining accuracy-cost trade-off, we observe that on benchmark datasets even a single stage of our method outperforms state-of-art in accuracy-cost performance. 2 Related Work Learning decision rules to minimize error subject to a budget constraint during prediction-time is an area of active interest[9, 17, 24, 19, 22, 20, 21, 13, 16]. Pre-trained Models: In one instantiation 2 of these methods it is assumed that there exists a collection of prediction models with amortized costs [22, 19, 1] so that a natural ordering of prediction models can be imposed. In other instances, the feature dimension is assumed to be sufficiently low so as to admit an exhaustive enumeration of all the combinatorial possibilities [20, 21]. These methods then learn a policy to choose amongst the ordered prediction models. In contrast we do not impose any of these restrictions. Top-Down Methods: For high-dimensional spaces, many existing approaches focus on learning complex adaptive decision functions top-down [9, 24, 13, 21]. Conceptually, during training, top-down methods acquire new features based on their utility value. This requires exploration of partitions of the input space together with different combinatorial low-cost feature subsets that would result in higher accuracy. These methods are based on multi-stage exploration leading to combinatorially hard problems. Different novel relaxations and greedy heuristics have been developed in this context. Bottom-up Methods: Our work is somewhat related to [16], who propose to prune a fully trained random forests (RF) to reduce costs. Nevertheless, in contrast to our adaptive system, their perspective is to compress the original model and utilize the pruned forest as a stand-alone model for test-time prediction. Furthermore, their method is specifically tailored to random forests. Another set of related work includes classifier cascade [5] and decision DAG [3], both of which aim to re-weight/re-order a set of pre-trained base learners to reduce prediction budget. Our method, on the other hand, only requires to pre-train a high-accuracy model and jointly learns the low-cost models to approximate it; therefore ours can be viewed as complementary to the existing work. The teacher-student framework [14] is also related to our bottom-up approach; a low-cost student model learns to approximate the teacher model so as to meet test-time budget. However, the goal there is to learn a better stand-alone student model. In contrast, we make use of both the lowcost (student) and high-accuracy (teacher) model during prediction via a gating function, which learns the limitation of the low-cost (student) model and consult the high-accuracy (teacher) model if necessary, thereby avoiding accuracy loss. Our composite system is also related to HME [10], which learns the composite system based on max-likelihood estimation of models. A major difference is that HME does not address budget constraints. A fundamental aspect of budget constraints is the resulting asymmetry, whereby, we start with an HPC model and sequentially approximate with LPCs. This asymmetry leads us to propose a bottom-up strategy where the high-accuracy predictor can be separately estimated and is critical to posing a direct empirical loss minimization problem. 3 Problem Setup We consider the standard learning scenario of resource constrained prediction with feature costs. A training sample S = {(x(i), y(i)) : i = 1, . . . , N} is generated i.i.d. from an unknown distribution, where x(i) ∈ℜK is the feature vector with an acquisition cost cα ≥0 assigned to each of the features α = 1, . . . , K and y(i) is the label for the ith example. In the case of multi-class classification y ∈ {1, . . . , M}, where M is the number of classes. Let us consider a single stage of our training method in order to formalize our setup. The model, f0, is a high prediction-cost (HPC) model, which is either a priori known, or which we train to high-accuracy regardless of cost considerations. We would like to learn an alternative low prediction-cost (LPC) model f1. Given an example x, at test-time, we have the option of selecting which model, f0 or f1, to utilize to make a prediction. The accuracy of a prediction model fz is modeled by a loss function ℓ(fz(x), y), z ∈{0, 1}. We exclusively employ the logistic loss function in binary classification: ℓ(fz(x), y) = log(1 + exp(−yfz(x)), although our framework allows other loss models. For a given x, we assume that once it pays the cost to acquire a feature, its value can be efficiently cached; its subsequent use does not incur additional cost. Thus, the cost of utilizing a particular prediction model, denoted by c(fz, x), is computed as the sum of the acquisition cost of unique features required by fz. Oracle Gating: Consider a general gating likelihood function q(z|x) with z ∈{0, 1}, that outputs the likelihood of sending the input x to a prediction model, fz. The overall empirical loss is: ESnEq(z|x)[ℓ(fz(x), y)] = ESn[ℓ(f0(x), y)] + ESn q(1|x) (ℓ(f1(x), y) −ℓ(f0(x), y)) | {z } Excess Loss 3 The first term only depends on f0, and from our perspective a constant. Similar to average loss we can write the average cost as (assuming gating cost is negligible for now): ESnEq(z|x)[c(fz, x)] = ESn[c(f0, x)] −ESn[q(1|x) (c(f0, x) −c(f1, x)) | {z } Cost Reduction ], where the first term is again constant. We can characterize the optimal gating function (see [19]) that minimizes the overall average loss subject to average cost constraint: Excess loss z }| { ℓ(f1, x) −ℓ(f0, x) q(1|x)=0 >< q(1|x)=1 η Cost reduction z }| { (c(f0, x) −c(f1, x)) for a suitable choice η ∈R. This characterization encodes the important principle that if the marginal cost reduction is smaller than the excess loss, we opt for the HPC model. Nevertheless, this characterization is generally infeasible. Note that the LHS depends on knowing how well HPC performs on the input instance. Since this information is unavailable, this target can be unreachable with low-cost gating. Gating Approximation: Rather than directly enforcing a low-cost structure on q, we decouple the constraint and introduce a parameterized family of gating functions g ∈G that attempts to mimic (or approximate) q. To ensure such approximation, we can minimize some distance measure D(q(·|x), g(x)). A natural choice for an approximation metric is the Kullback-Leibler (KL) divergence although other choices are possible. The KL divergence between q and g is given by DKL(q(·|x)∥g(x)) = P z q(z|x) log(q(z|x)/σ(sgn(0.5 −z)g(x))), where σ(s) = 1/(1 + e−s) is the sigmoid function. Besides KL divergence, we have also proposed another symmetrized metric fitting g directly to the log odds ratio of q. See Suppl. Material for details. Budget Constraint: With the gating function g, the cost of predicting x depends on whether the example is sent to f0 or f1. Let c(f0, g, x) denote the feature cost of passing x to f0 through g. As discussed, this is equal to the sum of the acquisition cost of unique features required by f0 and g for x. Similarly c(f1, g, x) denotes the cost if x is sent to f1 through g. In many cases the cost c(fz, g, x) is independent of the example x and depends primarily on the model being used. This is true for linear models where each x must be processed through the same collection of features. For these cases c(fz, g, x) ≜c(fz, g). The total budget simplifies to: ESn[q(0|x)]c(f0, g) + (1 − ESn[q(0|x)])c(f1, g) = c(f1, g) + ESn[q(0|x)](c(f0, g) −c(f1, g)). The budget thus depends on 3 quantities: ESn[q(0|x)], c(f1, g) and c(f0, g). Often f0 is a high-cost model that requires most, if not all, of features so c(f0, g) can be considered a large constant. Thus, to meet the budget constraint, we would like to have (a) low-cost g and f1 (small c(f1, g)); and (b) small fraction of examples being sent to the high-accuracy model (small ESn[q(0|x)]). We can therefore split the budget constraint into two separate objectives: (a) ensure low-cost through penalty Ω(f1, g) = γ P α cα∥Vα + Wα∥0, where γ is a tradeoff parameter and the indicator variables Vα, Wα ∈{0, 1} denote whether or not the feature α is required by f1 and g, respectively. Depending on the model parameterization, we can approximate Ω(f1, g) using a group-sparse norm or in a stage-wise manner as we will see in Algorithms 1 and 2. (b) Ensure only Pfull fraction of examples are sent to f0 via the constraint ESn[q(0|x)] ≤Pfull. Putting Together: We are now ready to pose our general optimization problem: min f1∈F,g∈G,qESn Losses z }| { X z [q(z|x)ℓ(fz(x), y)] + Gating Approx z }| { D(q(·|x), g(x)) + Costs z }| { Ω(f1, g) (OPT) subject to: ESn[q(0|x)] ≤Pfull. (Fraction to f0) The objective function penalizes excess loss and ensures through the second term that this excess loss can be enforced through admissible gating functions. The third term penalizes the feature cost usage of f1 and g. The budget constraint limits the fraction of examples sent to the costly model f0. Remark 1: Directly parameterizing q leads to non-convexity. Average loss is q-weighted sum of losses from HPC and LPC; while the space of probability distributions is convex, a finitedimensional parameterization is generally non-convex (e.g. sigmoid). What we have done is to keep q in non-parametric form to avoid non-convexity and only parameterize g, connecting both via 4 a KL term. Thus, (OPT) is now convex with respect to the f1 and g for a fixed q. It is again convex in q for a fixed f1 and g. Otherwise it would introduce non-convexity as in prior work. For instance, in [5] a non-convex problem is solved in each inner loop iteration (line 7 of their Algorithm 1). Remark 2: We presented the case for a single stage approximation system. However, it is straightforward to recursively continue this process. We can then view the composite system f0 ≜(g, f1, f0) as a black-box predictor and train a new pair of gating and prediction models to approximate the composite system. Remark 3: To limit the scope of our paper, we focus on reducing feature acquisition cost during prediction as it is a more challenging (combinatorial) problem. However, other prediction-time costs such as computation cost can be encoded in the choice of functional classes F and G in (OPT). Surrogate Upper Bound of Composite System: We can get better insight for the first two terms of the objective in (OPT) if we view z ∈{0, 1} as a latent variable and consider the composite system Pr(y|x) = P z Pr(z|x; g) Pr(y|x, fz). A standard application of Jensen’s inequality reveals that, −log(Pr(y|x)) ≤Eq(z|x)ℓ(fz(x), y) + DKL(q(z|x)∥Pr(z|x; g)). Therefore, the conditionalentropy of the composite system is bounded by the expected value of our loss function (we overload notation and represent random-variables in lower-case format): H(y | x) ≜E[−log(Pr(y|x))] ≤Ex×y[Eq(z|x)ℓ(fz(x), y) + DKL(q(z|x)∥Pr(z|x; g))]. This implies that the first two terms of our objective attempt to bound the loss of the composite system; the third term in the objective together with the constraint serve to enforce budget limits on the composite system. Group Sparsity: Since the cost for feature re-use is zero we encourage feature re-use among gating and prediction models. So the fundamental question here is: How to choose a common, sparse (low-cost) subset of features on which both g and f1 operate, such that g can effective gate examples between f1 and f0 for accurate prediction? This is a hard combinatorial problem. The main contribution of our paper is to address it using the general optimization framework of (OPT). 4 Algorithms To be concrete, we instantiate our general framework (OPT) into two algorithms via different parameterizations of g, f1: ADAPT-LIN for the linear class and ADAPT-GBRT for the non-parametric class. Algorithm 1 ADAPT-LIN Input: (x(i), y(i)), Pfull, γ Train f0. Initialize g, f1. repeat Solve (OPT1) for q given g, f1. Solve (OPT2) for g, f1 given q. until convergence Algorithm 2 ADAPT-GBRT Input: (x(i), y(i)), Pfull, γ Train f0. Initialize g, f1. repeat Solve (OPT1) for q given g, f1. for t = 1 to T do Find f t 1 using CART to minimize (1). f1 = f1 + f t 1. For each feature α used, set uα = 0. Find gt using CART to minimize (2). g = g + gt. For each feature α used, set uα = 0. end for until convergence Both of them use the KL-divergence as distance measure. We also provide a third algorithm ADAPT-LSTSQ that uses the symmetrized distance in the Suppl. Material. All of the algorithms perform alternating minimization of (OPT) over q, g, f1. Note that convergence of alternating minimization follows as in [8]. Common to all of our algorithms, we use two parameters to control cost: Pfull and γ. In practice they are swept to generate various costaccuracy tradeoffs and we choose the best one satisfying the budget B using validation data. ADAPT-LIN: Let g(x) = gT x and f1(x) = f T 1 x be linear classifiers. A feature is used if the corresponding component is non-zero: Vα = 1 if f1,α ̸= 0, and Wα = 1 if gα ̸= 0. The minimization for q solves the following problem: min q 1 N PN i=1 [(1 −qi)Ai + qiBi −H(qi)] s.t. 1 N PN i=1 qi ≤Pfull, (OPT1) where we have used shorthand notations qi = q(z = 0|x(i)), H(qi) = −qi log(qi) −(1 − qi) log(1 −qi), Ai = log(1 + e−y(i)f T 1 x(i)) + 5 log(1 + egT x(i)) and Bi = −log p(y(i)|z(i) = 0; f0) + log(1 + e−gT x(i)). This optimization has a closed form solution: qi = 1/(1 + eBi−Ai+β) for some non-negative constant β such that the constraint is satisfied. This optimization is also known as I-Projection in information geometry because of the entropy term [8]. Having optimized q, we hold it constant and minimize with respect to g, f1 by solving the problem (OPT2), where we have relaxed the non-convex cost P α cα∥Vα + Wα∥0 into a L2,1 norm for group sparsity and a tradeoff parameter γ to make sure the feature budget is satisfied. Once we solve for g, f1, we can hold them constant and minimize with respect to q again. ADAPT-LIN is summarized in Algorithm 1. min g,f1 1 N N X i=1 h (1 −qi) log(1 + e−y(i)f T 1 x(i)) + log(1 + egT x(i)) + qi log(1 + e−gT x(i)) i + γ X α q g2α + f 2 1,α. (OPT2) ADAPT-GBRT: We can also consider the non-parametric family of classifiers such as gradient boosted trees [7]: g(x) = PT t=1 gt(x) and f1(x) = PT t=1 f t 1(x), where gt and f t 1 are limiteddepth regression trees. Since the trees are limited to low depth, we assume that the feature utility of each tree is example-independent: Vα,t(x) ≊Vα,t, Wα,t(x) ≊Wα,t, ∀x. Vα,t = 1 if feature α appears in f t 1, otherwise Vα,t = 0, similarly for Wα,t. The optimization over q still solves (OPT1). We modify Ai = log(1 + e−y(i)f1(x(i))) + log(1 + eg(x(i))) and Bi = −log p(y(i)|z(i) = 0; f0) + log(1 + e−g(x(i))). Next, to minimize over g, f1, denote loss: ℓ(f1, g) = 1 N N X i=1 " (1 −qi) · log(1 + e−y(i)f1(x(i))) + log(1 + eg(x(i))) + qi log(1 + e−g(x(i))) # , which is essentially the same as the first part of the objective in (OPT2). Thus, we need to minimize ℓ(f1, g) + Ω(f1, g) with respect to f1 and g. Since both f1 and g are gradient boosted trees, we naturally adopt a stage-wise approximation for the objective. In particular, we define an impurity function which on the one hand approximates the negative gradient of ℓ(f1, g) with the squared loss, and on the other hand penalizes the initial acquisition of features by their cost cα. To capture the initial acquisition penalty, we let uα ∈{0, 1} indicates if feature α has already been used in previous trees (uα = 0), or not (uα = 1). uα is updated after adding each tree. Thus we arrive at the following impurity for f1 and g, respectively: 1 2 N X i=1 (−∂ℓ(f1, g) ∂f1(x(i)) −f t 1(x(i)))2 + γ X α uαcαVα,t, (1) 1 2 N X i=1 (−∂ℓ(f1, g) ∂g(x(i)) −gt(x(i)))2 + γ X α uαcαWα,t. (2) Minimizing such impurity functions balances the need to minimize loss and re-using the already acquired features. Classification and Regression Tree (CART) [2] can be used to construct decision trees with such an impurity function. ADAPT-GBRT is summarized in Algorithm 2. Note that a similar impurity is used in GREEDYMISER [24]. Interestingly, if Pfull is set to 0, all the examples are forced to f1, then ADAPT-GBRT exactly recovers the GREEDYMISER. In this sense, GREEDYMISER is a special case of our algorithm. As we will see in the next section, thanks to the bottom-up approach, ADAPT-GBRT benefits from high-accuracy initialization and is able to perform accuracy-cost tradeoff in accuracy levels beyond what is possible for GREEDYMISER. 5 Experiments BASELINE ALGORITHMS: We consider the following simple L1 baseline approach for learning f1 and g: first perform a L1-regularized logistic regression on all data to identify a relevant, sparse subset of features; then learn f1 using training data restricted to the identified feature(s); finally, learn g based on the correctness of f1 predictions as pseudo labels (i.e. assign pseudo label 1 to example x if f1(x) agrees with the true label y and 0 otherwise). We also compare with two stateof-the-art feature-budgeted algorithms: GREEDYMISER[24] - a top-down method that builds out an 6 ensemble of gradient boosted trees with feature cost budget; and BUDGETPRUNE[16] - a bottom-up method that prunes a random forest with feature cost budget. A number of other methods such as ASTC [13] and CSTC [23] are omitted as they have been shown to under-perform GREEDYMISER on the same set of datasets [15]. Detailed experiment setups can be found in the Suppl. Material. We first visualize/verify the adaptive approximation ability of ADAPT-LIN and ADAPT-GBRT on the Synthetic-1 dataset without feature costs. Next, we illustrate the key difference between ADAPT-LIN and the L1 baseline approach on the Synthetic-2 as well as the Letters datasets. Finally, we compare ADAPT-GBRT with state-of-the-art methods on several resource constraint benchmark datasets. (a) Input Data (b) Lin Initialization (c) Lin after 10 iterations (d) RBF Contour (e) Gbrt Initialization (f) Gbrt after 10 iterations Figure 2: Synthetic-1 experiment without feature cost. (a): input data. (d): decision contour of RBF-SVM as f0. (b) and (c): decision boundaries of linear g and f1 at initialization and after 10 iterations of ADAPT-LIN. (e) and (f): decision boundaries of boosted tree g and f1 at initialization and after 10 iterations of ADAPT-GBRT. Examples in the beige areas are sent to f0 by the g. POWER OF ADAPTATION: We construct a 2D binary classification dataset (Synthetic-1) as shown in (a) of Figure 2. We learn an RBF-SVM as the high-accuracy classifier f0 as in (d). To better visualize the adaptive approximation process in 2D, we turn off the feature costs (i.e. set Ω(f1, g) to 0 in (OPT)) and run ADAPT-LIN and ADAPT-GBRT. Figure 3: A 2-D synthetic example for adaptive feature acquisition. On the left: data distributed in four clusters. The two features correspond to x and y coordinates, respectively. On the right: accuracy-cost tradeoff curves. Our algorithm can recover the optimal adaptive system whereas a L1-based approach cannot. The initializations of g and f1 in (b) results in wrong predictions for many red points in the blue region. After 10 iterations of ADAPT-LIN, f1 adapts much better to the local region assigned by g while g sends about 60% (Pfull) of examples to f0. Similarly, the initialization in (e) results in wrong predictions in the blue region. ADAPTGBRT is able to identify the ambiguous region in the center and send those examples to f0 via g. Both of our algorithms maintain the same level of prediction accuracy as f0 yet are able to classify large fractions of examples via much simpler models. POWER OF JOINT OPTIMIZATION: We return to the problem of prediction under feature budget constrains. We illustrate why a simple L1 baseline approach for learning f1 and g would not work using a 2D dataset (Synthetic-2) as shown in Figure 3 (left). The data points are distributed in four clusters, with black triangles and red circles representing two class labels. Let both feature 1 and 2 carry unit acquisition cost. A complex classifier f0 that acquires both features can achieve full accuracy at the cost of 2. In our synthetic example, clusters 1 and 2 are given more data points so that the L1-regularized logistic regression would produce the vertical red dashed line, separating cluster 1 from the others. So feature 1 is acquired for both g and f1. The best such an adaptive system can 7 do is to send cluster 1 to f1 and the other three clusters to the complex classifier f0, incurring an average cost of 1.75, which is sub-optimal. ADAPT-LIN, on the other hand, optimizing between q, g, f1 in an alternating manner, is able to recover the horizontal lines in Figure 3 (left) for g and f1. g sends the first two clusters to the full classifier and the last two clusters to f1. f1 correctly classifies clusters 3 and 4. So all of the examples are correctly classified by the adaptive system; yet only feature 2 needs to be acquired for cluster 3 and 4 so the overall average feature cost is 1.5, as shown by the solid curve in the accuracy-cost tradeoff plot on the right of Figure 3. This example shows that the L1 baseline approach is sub-optimal as it doesnot optimize the selection of feature subsets jointly for g and f1. 15 20 25 30 35 40 45 50 Average Feature Cost 0.920 0.925 0.930 0.935 Test Accuracy Adapt_Gbrt GreedyMiser(Xu et al. 2012) BudgetPrune (Nan et al. 2016) (a) MiniBooNE 10 15 20 25 30 Average Feature Cost 0.84 0.86 0.88 0.90 0.92 Test Accuracy (b) Forest Covertype 40 60 80 100 120 140 160 180 Average Feature Cost 0.128 0.130 0.132 0.134 0.136 0.138 Average Precision@5 (c) Yahoo! Rank 0 50 100 150 200 250 300 350 400 Average Feature Cost 0.65 0.70 0.75 0.80 Test Accuracy (d) CIFAR10 Figure 4: Comparison of ADAPT-GBRT against GREEDYMISER and BUDGETPRUNE on four benchmark datasets. RF is used as f0 for ADAPT-GBRT in (a-c) while an RBF-SVM is used as f0 in (d). ADAPT-GBRT achieves better accuracy-cost tradeoff than other methods. The gap is significant in (b) (c) and (d). Note the accuracy of GREEDYMISER in (b) never exceeds 0.86 and its precision in (c) slowly rises to 0.138 at cost of 658. We limit the cost range for a clearer comparison. Table 1: Dataset Statistics Dataset #Train #Validation #Test #Features Feature Costs Letters 12000 4000 4000 16 Uniform MiniBooNE 45523 19510 65031 50 Uniform Forest 36603 15688 58101 54 Uniform CIFAR10 19761 8468 10000 400 Uniform Yahoo! 141397 146769 184968 519 CPU units REAL DATASETS: We test various aspects of our algorithms and compare with stateof-the-art feature-budgeted algorithms on five real world benchmark datasets: Letters, MiniBooNE Particle Identification, Forest Covertype datasets from the UCI repository [6], CIFAR-10 [11] and Yahoo! Learning to Rank[4]. Yahoo! is a ranking dataset where each example is associated with features of a querydocument pair together with the relevance rank of the document to the query. There are 519 such features in total; each is associated with an acquisition cost in the set {1,5,20,50,100,150,200}, which represents the units of CPU time required to extract the feature and is provided by a Yahoo! employee. The labels are binarized into relevant or not relevant. The task is to learn a model that takes a new query and its associated documents and produce a relevance ranking so that the relevant documents come on top, and to do this using as little feature cost as possible. The performance metric is Average Precision @ 5 following [16]. The other datasets have unknown feature costs so we assign costs to be 1 for all features; the aim is to show ADAPT-GBRT successfully selects sparse subset of “usefull” features for f1 and g. We summarize the statistics of these datasets in Table 1. Next, we highlight the key insights from the real dataset experiments. Generality of Approximation: Our framework allows approximation of powerful classifiers such as RBF-SVM and Random Forests as shown in Figure 5 as red and black curves, respectively. In particular, ADAPT-GBRT can well maintain high accuracy while reducing cost. This is a key advantage for our algorithms because we can choose to approximate the f0 that achieves the best accuracy. ADAPT-LIN Vs L1: Figure 5 shows that ADAPT-LIN outperforms L1 baseline method on real dataset as well. Again, this confirms the intuition we have in the Synthetic-2 example as ADAPT-LIN is able to iteratively select the common subset of features jointly for g and f1. ADAPTGBRT Vs ADAPT-LIN: ADAPT-GBRT leads to significantly better performance than ADAPT-LIN in approximating both RBF-SVM and RF as shown in Figure 5. This is expected as the non-parametric non-linear classifiers are much more powerful than linear ones. ADAPT-GBRT Vs BUDGETPRUNE: Both are bottom-up approaches that benefit from good initializations. In (a), (b) and (c) of Figure 4 we let f0 in ADAPT-GBRT be the same RF that BUDGETPRUNE starts with. ADAPT-GBRT is able to maintain high accuracy longer as the budget decreases. 8 Thus, ADAPT-GBRT improves state-of-the-art bottom-up method. Notice in (c) of Figure 4 around the cost of 100, BUDGETPRUNE has a spike in precision. We believe this is because the initial pruning improved the generalization performance of RF. But in the cost region of 40-80, ADAPT-GBRT maintains much better accuracy than BUDGETPRUNE. Furthermore, ADAPT-GBRT has the freedom to approximate the best f0 given the problem. So in (d) of Figure 4 we see that with f0 being RBF-SVM, ADAPT-GBRT can achieve much higher accuracy than BUDGETPRUNE. 11 12 13 14 15 16 Average Feature Cost 0.88 0.90 0.92 0.94 0.96 0.98 Test Accuracy Adapt_Gbrt RF Adapt_Lin RF L1 RF Adapt_Gbrt RBF Adapt_Lin RBF L1 RBF GreedyMiser(Xu et al 2012) Figure 5: Compare the L1 baseline approach, ADAPT-LIN and ADAPT-GBRT based on RBF-SVM and RF as f0’s on the Letters dataset. ADAPT-GBRT Vs GREEDYMISER: ADAPT-GBRT outperforms GREEDYMISER on all the datasets. The gaps in Figure 5, (b) (c) and (d) of Figure 4 are especially significant. Significant Cost Reduction: Without sacrificing top accuracies (within 1%), ADAPT-GBRT reduces average feature costs during test-time by around 63%, 32%, 58%, 12% and 31% on MiniBooNE, Forest, Yahoo, Cifar10 and Letters datasets, respectively. 6 Conclusions We presented an adaptive approximation approach to account for prediction costs that arise in various applications. At test-time our method uses a gating function to identify a prediction model among a collection of models that is adapted to the input. The overall goal is to reduce costs without sacrificing accuracy. We learn gating and prediction models by means of a bottom-up strategy that trains low prediction-cost models to approximate high prediction-cost models in regions where low-cost models suffice. On a number of benchmark datasets our method leads to an average of 40% cost reduction without sacrificing test accuracy (within 1%). It outperforms state-of-the-art top-down and bottom-up budgeted learning algorithms, with a significant margin in several cases. Acknowledgments Feng Nan would like to thank Dr Ofer Dekel for ideas and discussions on resource constrained machine learning during an internship in Microsoft Research in summer 2016. Familiarity and intuition gained during the internship contributed to the motivation and formulation in this paper. We also thank Dr Joseph Wang and Tolga Bolukbasi for discussions and helps in experiments. This material is based upon work supported in part by NSF Grants CCF: 1320566, CNS: 1330008, CCF: 1527618, DHS 2013-ST-061-ED0001, NGA Grant HM1582-09-1-0037 and ONR Grant N0001413-C-0288. References [1] Tolga Bolukbasi, Joseph Wang, Ofer Dekel, and Venkatesh Saligrama. Adaptive neural networks for efficient inference. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 527–536, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR. [2] Leo Breiman, Jerome Friedman, Charles J Stone, and Richard A Olshen. Classification and regression trees. CRC press, 1984. [3] Róbert Busa-Fekete, Djalel Benbouzid, and Balázs Kégl. Fast classification using sparse decision dags. In Proceedings of the 29th International Conference on Machine Learning, ICML 2012, Edinburgh, Scotland, UK, June 26 - July 1, 2012, 2012. [4] O Chapelle, Y Chang, and T Liu, editors. Proceedings of the Yahoo! Learning to Rank Challenge, held at ICML 2010, Haifa, Israel, June 25, 2010, 2011. 9 [5] Minmin Chen, Zhixiang Eddie Xu, Kilian Q. Weinberger, Olivier Chapelle, and Dor Kedem. Classifier cascade for minimizing feature evaluation cost. In Proceedings of the Fifteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2012, La Palma, Canary Islands, April 21-23, 2012, pages 218–226, 2012. [6] A. Frank and A. Asuncion. UCI machine learning repository, 2010. [7] Jerome H. Friedman. Greedy function approximation: A gradient boosting machine. Annals of Statistics, 29:1189–1232, 2000. [8] Kuzman Ganchev, Ben Taskar, and Jo ao Gama. Expectation maximization and posterior constraints. In J. C. Platt, D. Koller, Y. Singer, and S. T. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 569–576. Curran Associates, Inc., 2008. [9] T. Gao and D. Koller. Active classification based on value of classifier. In Advances in Neural Information Processing Systems (NIPS 2011), 2011. [10] Michael I. Jordan and Robert A. Jacobs. Hierarchical mixtures of experts and the em algorithm. Neural Comput., 6(2):181–214, March 1994. [11] Alex Krizhevsky. Learning Multiple Layers of Features from Tiny Images. Master’s thesis, 2009. [12] Ashish Kumar, Saurabh Goyal, and Manik Varma. Resource-efficient machine learning in 2 KB RAM for the internet of things. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1935– 1944, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR. [13] M Kusner, W Chen, Q Zhou, E Zhixiang, K Weinberger, and Y Chen. Feature-cost sensitive learning with submodular trees of classifiers. In AAAI Conference on Artificial Intelligence, 2014. [14] D. Lopez-Paz, B. Schölkopf, L. Bottou, and V. Vapnik. Unifying distillation and privileged information. In International Conference on Learning Representations, 2016. [15] Feng Nan, Joseph Wang, and Venkatesh Saligrama. Feature-budgeted random forest. In David Blei and Francis Bach, editors, Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 1983–1991. JMLR Workshop and Conference Proceedings, 2015. [16] Feng Nan, Joseph Wang, and Venkatesh Saligrama. Pruning random forests for prediction on a budget. In Advances in Neural Information Processing Systems 29, pages 2334–2342. Curran Associates, Inc., 2016. [17] Feng Nan, Joseph Wang, Kirill Trapeznikov, and Venkatesh Saligrama. Fast margin-based cost-sensitive classification. In IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2014, Florence, Italy, May 4-9, 2014, 2014. [18] Daniel P. Robinson and Suchi Saria. Trading-off cost of deployment versus accuracy in learning predictive models. In Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, IJCAI’16, pages 1974–1982. AAAI Press, 2016. [19] K Trapeznikov and V Saligrama. Supervised sequential classification under budget constraints. In International Conference on Artificial Intelligence and Statistics, pages 581–589, 2013. [20] Joseph Wang, Tolga Bolukbasi, Kirill Trapeznikov, and Venkatesh Saligrama. Model Selection by Linear Programming, pages 647–662. Springer International Publishing, Cham, 2014. [21] Joseph Wang, Kirill Trapeznikov, and Venkatesh Saligrama. Efficient learning by directed acyclic graph for resource constrained prediction. In Advances in Neural Information Processing Systems 28, pages 2143–2151. Curran Associates, Inc., 2015. [22] D. Weiss, B. Sapp, and B. Taskar. Dynamic structured model selection. In 2013 IEEE International Conference on Computer Vision, pages 2656–2663, Dec 2013. 10 [23] Z Xu, M Kusner, M Chen, and K. Q Weinberger. Cost-sensitive tree of classifiers. In Proceedings of the 30th International Conference on Machine Learning, 2013. [24] Zhixiang Eddie Xu, Kilian Q. Weinberger, and Olivier Chapelle. The greedy miser: Learning under test-time budgets. In Proceedings of the 29th International Conference on Machine Learning, ICML, 2012. 11 | 2017 | 558 |
7,072 | Online Convex Optimization with Stochastic Constraints Hao Yu, Michael J. Neely, Xiaohan Wei Department of Electrical Engineering, University of Southern California⇤ {yuhao,mjneely,xiaohanw}@usc.edu Abstract This paper considers online convex optimization (OCO) with stochastic constraints, which generalizes Zinkevich’s OCO over a known simple fixed set by introducing multiple stochastic functional constraints that are i.i.d. generated at each round and are disclosed to the decision maker only after the decision is made. This formulation arises naturally when decisions are restricted by stochastic environments or deterministic environments with noisy observations. It also includes many important problems as special case, such as OCO with long term constraints, stochastic constrained convex optimization, and deterministic constrained convex optimization. To solve this problem, this paper proposes a new algorithm that achieves O( p T) expected regret and constraint violations and O( p T log(T)) high probability regret and constraint violations. Experiments on a real-world data center scheduling problem further verify the performance of the new algorithm. 1 Introduction Online convex optimization (OCO) is a multi-round learning process with arbitrarily-varying convex loss functions where the decision maker has to choose decision x(t) 2 X before observing the corresponding loss function f t(·). For a fixed time horizon T, define the regret of a learning algorithm with respect to the best fixed decision in hindsight (with full knowledge of all loss functions) as regret(T) = T X t=1 f t(x(t)) −min x2X T X t=1 f t(x). The goal of OCO is to develop dynamic learning algorithms such that regret grows sub-linearly with respect to T. The setting of OCO is introduced in a series of work [3, 14, 9, 29] and is formalized in [29]. OCO has gained considerable amount of research interest recently with various applications such as online regression, prediction with expert advice, online ranking, online shortest paths, and portfolio selection. See [23, 11] for more applications and background. In [29], Zinkevich shows O( p T) regret can be achieved by using an online gradient descent (OGD) update given by x(t + 1) = PX ⇥ x(t) −γrf t(x(t)) ⇤ (1) where rf t(·) is a subgradient of f t(·) and PX [·] is the projection onto set X. Hazan et al. in [12] show that better regret is possible under the assumption that each loss function is strongly convex but O( p T) is the best possible if no additional assumption is imposed. It is obvious that Zinkevich’s OGD in (1) requires the full knowledge of set X and low complexity of the projection PX [·]. However, in practice, the constraint set X, which is often described by ⇤This work is supported in part by grant NSF CCF-1718477. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. many functional inequality constraints, can be time varying and may not be fully disclosed to the decision maker. In [18], Mannor et al. extend OCO by considering time-varying constraint functions gt(x) which can arbitrarily vary and are only disclosed to us after each x(t) is chosen. In this setting, Mannor et al. in [18] explore the possibility of designing learning algorithms such that regret grows sub-linearly and lim supT !1 1 T PT t=1 gt(x(t)) 0, i.e., the (cumulative) constraint violation PT t=1 gt(x(t)) also grows sub-linearly. Unfortunately, Mannor et al. in [18] prove that this is impossible even when both f t(·) and gt(·) are simple linear functions. Given the impossibility results shown by Mannor et al. in [18], this paper considers OCO where constraint functions gt(x) are not arbitrarily varying but independently and identically distributed (i.i.d.) generated from an unknown probability model (and functions f t(x) are still arbitrarily varying and possibly non-i.i.d.). Specifically, this paper considers online convex optimization (OCO) with stochastic constraint X = {x 2 X0 : E![gk(x; !)] 0, k 2 {1, 2, . . . , m}} where X0 is a known fixed set; the expressions of stochastic constraints E![gk(x; !)] (involving expectations with respect to ! from an unknown distribution) are unknown; and subscripts k 2 {1, 2, . . . , m} indicate the possibility of multiple functional constraints. In OCO with stochastic constraints, the decision maker receives loss function f t(x) and i.i.d. constraint function realizations gt k(x) ∆= gk(x; !(t)) at each round t. However, the expressions of gt k(·) and f t(·) are disclosed to the decision maker only after decision x(t) 2 X0 is chosen. This setting arises naturally when decisions are restricted by stochastic environments or deterministic environments with noisy observations. For example, if we consider online routing (with link capacity constraints) in wireless networks [18], each link capacity is not a fixed constant (as in wireline networks) but an i.i.d. random variable since wireless channels are stochastically time-varying by nature [25]. OCO with stochastic constraints also covers important special cases such as OCO with long term constraints [16, 5, 13], stochastic constrained convex optimization [17] and deterministic constrained convex optimization [21]. Let x⇤= argmin{x2X0:E[gk(x;!)]0,8k2{1,2,...,m}} PT t=1 f t(x) be the best fixed decision in hindsight (knowing all loss functions f t(x) and the distribution of stochastic constraint functions gk(x; !)). Thus, x⇤minimizes the T-round cumulative loss and satisfies all stochastic constraints in expectation, which also implies lim supT !1 1 T PT t=1 gt k(x⇤) 0 almost surely by the strong law of large numbers. Our goal is to develop dynamic learning algorithms that guarantee both regret PT t=1 f t(x(t)) −PT t=1 f t(x⇤) and constraint violations PT t=1 gt k(x(t)) grow sub-linearly. Note that Zinkevich’s algorithm in (1) is not applicable to OCO with stochastic constraints since X is unknown and it can happen that X(t) = {x 2 X0 : gk(x; !(t)) 0, 8k 2 {1, 2, . . . , m}} = ; for certain realizations !(t), such that projections PX [·] or PX(t)[·] required in (1) are not even well-defined. Our Contributions: This paper solves online convex optimization with stochastic constraints. In particular, we propose a new learning algorithm that is proven to achieve O( p T) expected regret and constraint violations and O( p T log(T)) high probability regret and constraint violations. The proposed new algorithm also improves upon state-of-the-art results in the following special cases: • OCO with long term constraints: This is a special case where each gt k(x) ⌘gk(x) is known and does not depend on time. Note that X = {x 2 X0 : gk(x) 0, 8k 2 {1, 2, . . . , m}} can be complicated while X0 might be a simple hypercube. To avoid high complexity involved in the projection onto X as in Zinkevich’s algorithm, work in [16, 5, 13] develops low complexity algorithms that use projections onto a simpler set X0 by allowing gk(x(t)) > 0 for certain rounds but ensuring lim supT !1 1 T PT t=1 gk(x(t)) 0. The best existing performance is O(T max{β,1−β}) regret and O(T 1−β/2) constraint violations where β 2 (0, 1) is an algorithm parameter [13]. This gives O( p T) regret with worse O(T 3/4) constraint violations or O( p T) constraint violations with worse O(T) regret. In contrast, our algorithm, which only uses projections onto X0 as shown in Lemma 1, can achieve O( p T) regret and O( p T) constraint violations simultaneously. Note that by adapting the methodology presented in this paper, our other work [27] developed a different algorithm that can only solve the special case problem “OCO with long term constraints” but can achieve O( p T) regret and O(1) constraint violations. • Stochastic constrained convex optimization: This is a special case where each f t(x) is i.i.d. generated from an unknown distribution. This problem has many applications in operations research and machine learning such as Neyman-Pearson classification and risk-mean portfolio. 2 The work [17] develops a (batch) offline algorithm that produces a solution with high probability performance guarantees only after sampling the problems for sufficiently many times. That is, during the process of sampling, there is no performance guarantee. The work [15] proposes a stochastic approximation based (batch) offline algorithm for stochastic convex optimization with one single stochastic functional inequality constraint. In contrast, our algorithm is an online algorithm with online performance guarantees and can deal with an arbitrary number of stochastic constraints. • Deterministic constrained convex optimization: This is a special case where each f t(x) ⌘f(x) and gt k(x) ⌘gk(x) are known and do not depend on time. In this case, the goal is to develop a fast algorithm that converges to a good solution (with a small error) with a few number of iterations; and our algorithm with O( p T) regret and constraint violations is equivalent to an iterative numerical algorithm with O(1/ p T) convergence rate. Our algorithm is subgradient based and does not require the smoothness or differentiability of the convex program. The primal-dual subgradient method considered in [19] has the same O(1/ p T) convergence rate but requires an upper bound of optimal Lagrange multipliers, which is usually unknown in practice. 2 Formulation and New Algorithm Let X0 be a known fixed compact convex set. Let f t(x) be a sequence of arbitrarily-varying convex functions. Let gk(x; !(t)), k 2 {1, 2, . . . , m} be sequences of functions that are i.i.d. realizations of stochastic constraint functions ˜gk(x) ∆= E![gk(x; !)] with random variable ! 2 ⌦from an unknown distribution. That is, !(t) are i.i.d. samples of !. Assume that each f t(·) is independent of all !(⌧) with ⌧≥t + 1 so that we are unable to predict future constraint functions based on the knowledge of the current loss function. For each ! 2 ⌦, we assume gk(x; !) are convex with respect to x 2 X0. At the beginning of each round t, neither the loss function f t(x) nor the constraint function realizations gk(x; !(t)) are known to the decision maker. However, the decision maker still needs to make a decision x(t) 2 X0 for round t; and after that f t(x) and gk(x, !(t)) are disclosed to the decision maker at the end of round t. For convenience, we often suppress the dependence of each gk(x; !(t)) on !(t) and write gt k(x) = gk(x; !(t)). Recall ˜gk(x) = E![gk(x; !)] where the expectation is with respect to !. Define X = {x 2 X0 : ˜gk(x) = E[gk(x; !)] 0, 8k 2 {1, 2, . . . , m}}. We further define the stacked vector of multiple functions gt 1(x), . . . , gt m(x) as gt(x) = [gt 1(x), . . . , gt m(x)]T and define ˜g(x) = [E![g1(x; !)], . . . , E![gm(x; !)]]T. We use k · k to denote the Euclidean norm for a vector. Throughout this paper, we have the following assumptions: Assumption 1 (Basic Assumptions). • Loss functions f t(x) and constraint functions gk(x; !) have bounded subgradients on X0. That is, there exists D1 > 0 and D2 > 0 such that krf t(x)k D1 for all x 2 X0 and all t 2 {0, 1, . . .} and krgk(x; !)k D2 for all x 2 X0, all ! 2 ⌦and all k 2 {1, 2, . . . , m}.2 • There exists constant G > 0 such that kg(x; !)k G for all x 2 X0 and all ! 2 ⌦. • There exists constant R > 0 such that kx −yk R for all x, y 2 X0. Assumption 2 (The Slater Condition). There exists ✏> 0 and ˆx 2 X0 such that ˜gk(ˆx) = E![gk(ˆx; !)] −✏for all k 2 {1, 2, . . . , m}. 2.1 New Algorithm Now consider the following algorithm described in Algorithm 1. This algorithm chooses x(t + 1) as the decision for round t + 1 based on f t(·) and gt(·) without requiring f t+1(·) or gt+1(·). For each stochastic constraint function gk(x; !), we introduce Qk(t) and call it a virtual queue since its dynamic is similar to a queue dynamic. The next lemma summarizes that x(t + 1) update in (2) can be implemented via a simple projection onto X0. Lemma 1. The x(t + 1) update in (2) is given by x(t + 1) = PX0 ⇥ x(t) − 1 2↵d(t) ⇤ , where d(t) = V rf t(x(t)) + Pm k=1 Qk(t)rgt k(x(t)) and PX0[·] is the projection onto convex set X0. 2 The notation rh(x) is used to denote a subgradient of a convex function h at the point x.; it is the same as the gradient whenever the gradient exists. 3 Algorithm 1 Let V > 0 and ↵> 0 be constant algorithm parameters. Choose x(1) 2 X0 arbitrarily and let Qk(1) = 0, 8k 2 {1, 2, . . . , m}. At the end of each round t 2 {1, 2, . . .}, observe f t(·) and gt(·) and do the following: • Choose x(t + 1) that solves min x2X0 % V [rf t(x(t))]T[x −x(t)] + m X k=1 Qk(t)[rgt k(x(t))]T[x −x(t)] + ↵kx −x(t)k2 (2) as the decision for the next round t + 1, where rf t(x(t)) is a subgradient of f t(x) at point x = x(t) and rgt k(x(t)) is a subgradient of gt k(x) at point x = x(t). • Update each virtual queue Qk(t + 1), 8k 2 {1, 2, . . . , m} via Qk(t + 1) = max % Qk(t) + gt k(x(t)) + [rgt k(x(t))]T[x(t + 1) −x(t)], 0 , (3) where max{·, ·} takes the larger one between two elements. Proof. The projection by definition is minx2X0 kx −[x(t) − 1 2↵d(t)]k2 and is equivalent to (2). 2.2 Intuitions of Algorithm 1 Note that if there are no stochastic constraints gt k(x), i.e., X = X0, then Algorithm 1 has Qk(t) ⌘ 0, 8t and becomes Zinkevich’s algorithm with γ = V 2↵in (1) since x(t + 1) (a) = argmin x2X0 ! V [rf t(x(t))]T[x −x(t)] + ↵kx −x(t)k2 | {z } penalty (b) = PX0 ⇥ x(t) −V 2↵rf t(x(t)) ⇤ (4) where (a) follows from (2); and (b) follows from Lemma 1 by noting that d(t) = V rf t(x(t)). Call the term marked by an underbrace in (4) the penalty. Thus, Zinkevich’s algorithm is to minimize the penalty term and is a special case of Algorithm 1 used to solve OCO over X0. Let Q(t) = ⇥ Q1(t), . . . , Qm(t) ⇤T be the vector of virtual queue backlogs. Let L(t) = 1 2kQ(t)k2 be a Lyapunov function and define Lyapunov drift ∆(t) = L(t + 1) −L(t) = 1 2[kQ(t + 1)k2 −kQ(t)k2]. (5) The intuition behind Algorithm 1 is to choose x(t + 1) to minimize an upper bound of the expression ∆(t) |{z} drift + V [rf t(x(t))]T[x −x(t)] + ↵kx −x(t)k2 | {z } penalty (6) The intention to minimize penalty is natural since Zinkevich’s algorithm (for OCO without stochastic constraints) minimizes penalty, while the intention to minimize drift is motivated by observing that gt k(x(t)) is accumulated into queue Qk(t + 1) introduced in (3) such that we intend to have small queue backlogs. The drift ∆(t) can be complicated and is in general non-convex. The next lemma (proven in Supplement 7.1) provides a simple upper bound on ∆(t) and follows directly from (3). Lemma 2. At each round t 2 {1, 2, . . .}, Algorithm 1 guarantees ∆(t) m X k=1 Qk(t) ⇥ gt k(x(t)) + [rgt k(x(t))]T[x(t + 1) −x(t)] ⇤ + 1 2[G + pmD2R]2, (7) where m is the number of constraint functions; and D2, G and R are defined in Assumption 1. At the end of round t, Pm k=1 Qk(t)gt k(x(t)) + 1 2[G + pmD2R]2 is a given constant that is not affected by decision x(t + 1). The algorithm decision in (2) is now transparent: x(t + 1) is chosen to minimize the drift-plus-penalty expression (6), where ∆(t) is approximated by the bound in (7). 2.3 Preliminary Analysis and More Intuitions of Algorithm 1 The next lemma (proven in Supplement 7.2) relates constraint violations and virtual queue values and follows directly from (3). 4 Lemma 3. For any T ≥1, Algorithm 1 guarantees PT t=1 gt k(x(t)) kQ(T +1)k+D2 PT t=1 kx(t+ 1) −x(t)k, 8k 2 {1, 2, . . . , m}, where D2 is defined in Assumption 1. Recall that function h : X0 ! R is said to be c-strongly convex if h(x) −c 2kxk2 is convex over x 2 X0. It is easy to see that if q : X0 ! R is a convex function, then for any constant c > 0 and any vector b, the function q(x) + c 2kx −bk2 is c-strongly convex. Further, it is known that if h : X ! R is a c-strongly convex function that is minimized at a point xmin 2 X0, then (see, for example, Corollary 1 in [28]): h(xmin) h(x) −c 2kx −xmink2 8x 2 X0 (8) Note that the expression involved in minimization (2) in Algorithm 1 is strongly convex with modulus 2↵and x(t + 1) is chosen to minimize it. Thus, the next lemma follows. Lemma 4. Let z 2 X0 be arbitrary. For all t ≥1, Algorithm 1 guarantees V [rf t(x(t))]T[x(t + 1) −x(t)] + m X k=1 Qk(t)[rgt k(x(t))]T[x(t + 1) −x(t)] + ↵kx(t + 1) −x(t)k2 V [rf t(x(t))]T[z −x(t)] + m X k=1 Qk(t)[rgt k(x(t))]T[z −x(t)] + ↵kz −x(t)k2 −↵kz −x(t + 1)k2. The next corollary follows by taking z = x(t) in Lemma 4 and is proven in Supplement 7.3. Corollary 1. For all t ≥1, Algorithm 1 guarantees kx(t + 1) −x(t)k V D1 2↵+ pmD2 2↵ kQ(t)k. The next corollary follows directly from Lemma 3 and Corollary 1 and shows that constraint violations are ultimately bounded by sequence kQ(t)k, t 2 {1, 2, . . . , T + 1}. Corollary 2. For any T ≥1, Algorithm 1 guarantees PT t=1 gt k(x(t)) kQ(T + 1)k + V T D1D2 2↵ + pmD2 2 2↵ PT t=1 kQ(t)k, 8k 2 {1, 2, . . . , m} where D1 and D2 are defined in Assumption 1. This corollary further justifies why Algorithm 1 intends to minimize drift ∆(t). As illustrated in the next section, controlled drift can often lead to boundedness of a stochastic process. Thus, the intuition of minimizing drift ∆(t) is to yield small kQ(t)k bounds. 3 Expected Performance Analysis of Algorithm 1 This section shows that if we choose V = p T and ↵= T in Algorithm 1, then both expected regret and expected constraint violations are O( p T). 3.1 A Drift Lemma for Stochastic Processes Let {Z(t), t ≥0} be a discrete time stochastic process adapted3 to a filtration {F(t), t ≥0}. For example, Z(t) can be a random walk, a Markov chain or a martingale. The drift analysis is the method of deducing properties, e.g., recurrence, ergodicity, or boundedness, about Z(t) from its drift E[Z(t + 1) −Z(t)|F(t)]. See [6, 10] for more discussions or applications on drift analysis. This paper proposes a new drift analysis lemma for stochastic processes as follows: Lemma 5. Let {Z(t), t ≥0} be a discrete time stochastic process adapted to a filtration {F(t), t ≥ 0} with Z(0) = 0 and F(0) = {;, ⌦}. Suppose there exists an integer t0 > 0, real constants ✓> 0, δmax > 0 and 0 < ⇣δmax such that |Z(t + 1) −Z(t)| δmax, (9) E[Z(t + t0) −Z(t)|F(t)] ⇢ t0δmax, if Z(t) < ✓ −t0⇣, if Z(t) ≥✓ . (10) hold for all t 2 {1, 2, . . .}. Then, the following holds 1. E[Z(t)] ✓+ t0δmax + t0 4δ2 max ⇣ log ⇥8δ2 max ⇣2 ⇤ , 8t 2 {1, 2, . . .}. 2. For any constant 0 < µ < 1, we have Pr(Z(t) ≥z) µ, 8t 2 {1, 2, . . .} where z = ✓+ t0δmax + t0 4δ2 max ⇣ log ⇥8δ2 max ⇣2 ⇤ + t0 4δ2 max ⇣ log( 1 µ). 3Random variable Y is said to be adapted to σ-algebra F if Y is F-measurable. In this case, we often write Y 2 F. Similarly, random process {Z(t)} is adapted to filtration {F(t)} if Z(t) 2 F(t), 8t. See e.g. [7]. 5 The above lemma is proven in Supplement 7.4 and provides both expected and high probability bounds for stochastic processes based on a drift condition. It will be used to establish upper bounds of virtual queues kQ(t)k, which further leads to expected and high probability constraint performance bounds of our algorithm. For a given stochastic process Z(t), it is possible to show the drift condition (10) holds for multiple t0 with different ⇣and ✓. In fact, we will show in Lemma 7 that kQ(t)k yielded by Algorithm 1 satisfies (10) for any integer t0 > 0 by selecting ⇣and ✓according to t0. One-step drift conditions, corresponding to the special case t0 = 1 of Lemma 5, have been previously considered in [10, 20]. However, Lemma 5 (with general t0 > 0) allows us to choose the best t0 in performance analysis such that sublinear regret and constraint violation bounds are possible. 3.2 Expected Constraint Violation Analysis Define filtration {W(t), t ≥0} with W(0) = {;, ⌦} and W(t) = σ(!(1), . . . , !(t)) being the σ-algebra generated by random samples {!(1), . . . , !(t)} up to round t. From the update rule in Algorithm 1, we observe that x(t + 1) is a deterministic function of f t(·), g(·; !(t)) and Q(t) where Q(t) is further a deterministic function of Q(t −1), g(·; !(t −1)), x(t) and x(t −1). By inductions, it is easy to show that σ(x(t)) ✓W(t −1) and σ(Q(t)) ✓W(t −1) for all t ≥1 where σ(Y ) denotes the σ-algebra generated by random variable Y . For fixed t ≥1, since Q(t) is fully determined by !(⌧), ⌧2 {1, 2, . . . , t −1} and !(t) are i.i.d., we know gt(x) is independent of Q(t). This is formally summarized in the next lemma. Lemma 6. If x⇤2 X0 satisfies ˜g(x⇤) = E![g(x⇤; !)] 0, then Algorithm 1 guarantees: E[Qk(t)gt k(x⇤)] 0, 8k 2 {1, 2, . . . , m}, 8t ≥1. (11) Proof. Fix k 2 {1, 2, . . . , m} and t ≥1. Since gt k(x⇤) = gk(x⇤; !(t)) is independent of Qk(t), which is determined by {!(1), . . . , !(t −1)}, it follows that E[Qk(t)gt k(x⇤)] = E[Qk(t)]E[gt k(x⇤)] (a) 0, where (a) follows from the fact that E[gt k(x⇤)] 0 and Qk(t) ≥0. To establish a bound on constraint violations, by Corollary 2, it suffices to derive upper bounds for kQ(t)k. In this subsection, we derive upper bounds for kQ(t)k by applying the new drift lemma (Lemma 5) developed at the beginning of this section. The next lemma shows that random process Z(t) = kQ(t)k satisfies the conditions in Lemma 5. Lemma 7. Let t0 > 0 be an arbitrary integer. At each round t 2 {1, 2, . . . , } in Algorithm 1, the following holds ,,kQ(t + 1)k −kQ(t)k ,, G + pmD2R, and E[kQ(t + t0)k −kQ(t)k ,,W(t −1)] ⇢ t0(G + pmD2R), if kQ(t)k < ✓ −t0 ✏ 2, if kQ(t)k ≥✓ , where ✓= ✏ 2t0 + (G + pmD2R)t0 + 2↵R2 t0✏+ 2V D1R+[G+pmD2R]2 ✏ , m is the number of constraint functions; D1, D2, G and R are defined in Assumption 1; and ✏is defined in Assumption 2. (Note that ✏< G by the definition of G.) Lemma 7 (proven in Supplement 7.5) allows us to apply Lemma 5 to random process Z(t) = kQ(t)k and obtain E[kQ(t)k] = O( p T), 8t by taking t0 = d p Te, V = p T and ↵= T, where d p Te represents the smallest integer no less than p T. By Corollary 2, this further implies the expected constraint violation bound E[PT t=1 gk(x(t))] O( p T) as summarized in the next theorem. Theorem 1 (Expected Constraint Violation Bound). If V = p T and ↵= T in Algorithm 1, then for all T ≥1, we have E[ T X t=1 gt k(x(t))] O( p T), 8k 2 {1, 2, . . . , m}. (12) where the expectation is taken with respect to all !(t). Proof. Define random process Z(t) with Z(0) = 0 and Z(t) = kQ(t)k, t ≥1 and filtration F(t) with F(0) = {;, ⌦} and F(t) = W(t −1), t ≥1. Note that Z(t) is adapted to F(t). By 6 Lemma 7, Z(t) satisfies the conditions in Lemma 5 with δmax = G + pmD2R, ⇣= ✏ 2 and ✓= ✏ 2t0 + (G + pmD2R)t0 + 2↵R2 t0✏+ 2V D1R+[G+pmD2R]2 ✏ . Thus, by part (1) of Lemma 5, for all t 2 {1, 2, . . .}, we have E[kQ(t)k] ✏ 2t0 + 2(G + pmD2R)t0 + 2↵R2 t0✏+ 2V D1R+[G+pmD2R]2 ✏ + t0 8[G+pmD2R]2 ✏ log[ 32[G+pmD2R]2 ✏2 ]. Taking t0 = d p Te, V = p T and ↵= T, we have E[kQ(t)k] O( p T) for all t 2 {1, 2, . . .}. Fix T ≥1. By Corollary 2 (with V = p T and ↵= T) , we have PT t=1 gt k(x(t)) kQ(T + 1)k + p T D1D2 2 + pmD2 2 2T PT t=1 kQ(t)k, 8k 2 {1, 2, . . . , m}. Taking expectations on both sides and substituting E[kQ(t)k] = O( p T), 8t into it yields E[PT t=1 gt k(x(t))] O( p T). 3.3 Expected Regret Analysis The next lemma (proven in Supplement 7.6) refines Lemma 4 and is useful to analyze the regret. Lemma 8. Let z 2 X0 be arbitrary. For all T ≥1, Algorithm 1 guarantees T X t=1 f t(x(t)) T X t=1 f t(z) + ↵ V R2 + V D2 1 4↵T + 1 2 [G + pmD2R]2 T V | {z } (I) + 1 V T X t=1 ⇥ m X k=1 Qk(t)gt k(z) ⇤ | {z } (II) (13) where m is the number of constraint functions; and D1, D2, G and R are defined in Assumption 1. Note that if we take V = p T and ↵= T, then term (I) in (13) is O( p T). Recall that the expectation of term (II) in (13) with z = x⇤is non-positive by Lemma 6. The expected regret bound of Algorithm 1 follows by taking expectations on both sides of (13) and is summarized in the next theorem. Theorem 2 (Expected Regret Bound). Let x⇤2 X0 be any fixed solution that satisfies ˜g(x⇤) 0, e.g., x⇤= argminx2X PT t=1 f t(x). If V = p T and ↵= T in Algorithm 1, then for all T ≥1, E[ T X t=1 f t(x(t))] E[ T X t=1 f t(x⇤)] + O( p T). where the expectation is taken with respect to all !(t). Proof. Fix T ≥1. Taking z = x⇤in Lemma 8 yields PT t=1 f t(x(t)) PT t=1 f t(x⇤) + ↵ V R2 + V D2 1 4↵T + 1 2[G + pmD2R]2 T V + 1 V PT t=1 ⇥Pm k=1 Qk(t)gt k(x⇤) ⇤ . Taking expectations on both sides and using (11) yields PT t=1 E[f t(x(t))] PT t=1 E[f t(x⇤)]+R2 ↵ V + D2 1 4 V ↵T + 1 2[G+pmD2R]2 T V . Taking V = p T and ↵= T yields PT t=1 E[f t(x(t))] PT t=1 E[f t(x⇤)] + O( p T). 3.4 Special Case Performance Guarantees Theorems 1 and 2 provide expected performance guarantees of Algorithm 1 for OCO with stochastic constraints. The results further imply the performance guarantees in the following special cases: • OCO with long term constraints: In this case, gk(x; !(t)) ⌘gk(x) and there is no randomness. Thus, the expectations in Theorems 1 and 2 disappear. For this problem, Algorithm 1 can achieve O( p T) (deterministic) regret and O( p T) (deterministic) constraint violations. • Stochastic constrained convex optimization: Note that i.i.d. time-varying f(x; !(t)) is a special case of arbitrarily-varying f t(x) as considered in our OCO setting. Thus, Theorems 1 and 2 still hold when Algorithm 1 is applied to solve stochastic constrained convex optimization minx{E[f(x; !)] : E[gk(x; !)] 0, 8k 2 {1, 2, . . . , m}, x 2 X0} in an online fashion with i.i.d. realizations !(t) ⇠!. Since Algorithm 1 chooses each x(t) without knowing !(t), it follows that x(t) is independent of !(t0) for any t0 ≥t by the i.i.d. property of each !(t). Fix T > 0, if we run Algorithm 1 for T slots and use x(T) = 1 T PT t=1 x(t) as a fixed solution for any future slot t0 ≥T + 1, then E[f(x(T); !(t0)] (a) 1 T PT t=1 E[f(x(t); !(t0))] (b) = 1 T PT t=1 E[f(x(t); !(t))] (c) 1 T PT t=1 E[f(x⇤; !(t))] + O( 1 p T ) (d) = E[f(x⇤; !(t0))] + O( 1 p T ) and E[gk(x(T); !(t0)] (a) 1 T PT t=1 E[gk(x(T); !(t0)] (b) = 1 T PT t=1 E[gk(x(t); !(t))] (c) 7 O( 1 p T ), 8k 2 {1, 2, . . . , m} where (a) follows from Jensen’s inequality and the fact that x(T) is independent of !(t0); (b) follows because each x(t) is independent of both !(t) and !(t0) and !(t), !(t0) are i.i.d. realizations of !; (c) follows from Theorems 1 and 2 by dividing both sides by T and (d) follows because E[f(x⇤; !(t))] = E[f(x⇤; !(t0))] for all t 2 {1, . . . , T} by the i.i.d. property of each !(t). Thus, if we use Algorithm 1 as a (batch) offline algorithm to solve stochastic constrained convex optimization, it has O(1/ p T) convergence and ties with the algorithm developed in [15], which is by design a (batch) offline algorithm and can only solve stochastic optimization with a single constraint function. • Deterministic constrained convex optimization: Similarly to OCO with long term constraints, the expectations in Theorems 1 and 2 disappear in this case since f t(x) ⌘f(x) and gk(x; !(t)) ⌘gk(x). If we use x(T) = 1 T PT t=1 x(t) as the solution, then f(x(T)) f(x⇤) + O( 1 p T ) and gk(x(T)) O( 1 p T ), which follows by dividing inequalities in Theorems 1 and 2 by T on both sides and applying Jensen’s inequality. Thus, Algorithm 1 solves deterministic constrained convex optimization with O( 1 p T ) convergence. 4 High Probability Performance Analysis This section shows that if we choose V = p T and ↵= T in Algorithm 1, then for any 0 < λ < 1, with probability at least 1 −λ, regret is O( p T log(T) log1.5( 1 λ)) and constraint violations are O -p T log(T) log( 1 λ) . . 4.1 High Probability Constraint Violation Analysis Similarly to the expected constraint violation analysis, we can use part (2) of the new drift lemma (Lemma 5) to obtain a high probability bound of kQ(t)k, which together with Corollary 2 leads to a high probability constraint violation bound summarized in Theorem 3 (proven in Supplement 7.7). Theorem 3 (High Probability Constraint Violation Bound). Let 0 < λ < 1 be arbitrary. If V = p T and ↵= T in Algorithm 1, then for all T ≥1 and all k 2 {1, 2, . . . , m}, we have Pr ⇣ T X t=1 gk(x(t)) O -p T log(T) log( 1 λ) .⌘ ≥1 −λ. 4.2 High Probability Regret Analysis To obtain a high probability regret bound from Lemma 8, it remains to derive a high probability bound of term (II) in (13) with z = x⇤. The main challenge is that term (II) is a supermartingale with unbounded differences (due to the possibly unbounded virtual queues Qk(t)). Most concentration inequalities, e.g., the Hoeffding-Azuma inequality, used in high probability performance analysis of online algorithms are restricted to martingales/supermartingales with bounded differences. See for example [4, 2, 16]. The following lemma considers supermartingales with unbounded differences. Its proof (provided in Supplement 7.8) uses the truncation method to construct an auxiliary wellbehaved supermartingale. Similar proof techniques are previously used in [26, 24] to prove different concentration inequalities for supermartingales/martingales with unbounded differences. Lemma 9. Let {Z(t), t ≥0} be a supermartingale adapted to a filtration {F(t), t ≥0} with Z(0) = 0 and F(0) = {;, ⌦}, i.e., E[Z(t + 1)|F(t)] Z(t), 8t ≥0. Suppose there exits a constant c > 0 such that {|Z(t + 1) −Z(t)| > c} ✓{Y (t) > 0}, 8t ≥0, where Y (t) is process with Y (t) adapted to F(t) for all t ≥0. Then, for all z > 0, we have Pr(Z(t) ≥z) e−z2/(2tc2) + t−1 X ⌧=0 Pr(Y (⌧) > 0), 8t ≥1. Note that if Pr(Y (t) > 0) = 0, 8t ≥0, then Pr({|Z(t + 1) −Z(t)| > c}) = 0, 8t ≥0 and Z(t) is a supermartingale with differences bounded by c. In this case, Lemma 9 reduces to the conventional Hoeffding-Azuma inequality. The next theorem (proven in Supplement 7.9) summarizes the high probability regret performance of Algorithm 1 and follows from Lemmas 5-9 . 8 Theorem 4 (High Probability Regret Bound). Let x⇤2 X0 be any fixed solution that satisfies ˜g(x⇤) 0, e.g., x⇤= argminx2X PT t=1 f t(x). Let 0 < λ < 1 be arbitrary. If V = p T and ↵= T in Algorithm 1, then for all T ≥1, we have Pr ⇣ T X t=1 f t(x(t)) T X t=1 f t(x⇤) + O( p T log(T) log1.5( 1 λ)) ⌘ ≥1 −λ. 5 Experiment: Online Job Scheduling in Distributed Data Centers Consider a geo-distributed data center infrastructure consisting of one front-end job router and 100 geographically distributed servers, which are located at 10 different zones to form 10 clusters (10 servers in each cluster). See Fig. 1(a) for an illustration. The front-end job router receives job tasks and schedules them to different servers to fulfill the service. To serve the assigned jobs, each server purchases power (within its capacity) from its zone market. Electricity market prices can vary significantly across time and zones. For example, see Fig. 1(b) for a 5-minute average electricity price trace (between 05/01/2017 and 05/10/2017) at New York zone CENTRL [1]. This problem is to schedule jobs and control power levels at each server in real time such that all incoming jobs are served and electricity cost is minimized. In our experiment, each server power is adjusted every 5 minutes, which is called a slot. (In practice, server power can not be adjusted too frequently due to hardware restrictions and configuration delay.) Let x(t) = [x1(t), . . . , x100(t)] be the power vector at slot t, where each xi(t) must be chosen from an interval [xmin i , xmax i ] restricted by the hardware, and the service rate at each server i satisfies µi(t) = hi(xi(t)), where hi(·) is an increasing concave function. At each slot t, the job router schedules µi(t) amount of jobs to server i. The electricity cost at slot t is f t(x(t)) = P100 i=1 ci(t)xi(t) where ci(t) is the electricity price at server i’s zone. We use ci(t) from real-world 5-minute average electricity price data at 10 different zones in New York city between 05/01/2017 and 05/10/2017 obtained from NYISO [1]. At each slot t, the incoming job is given by !(t) and satisfies a Poisson distribution. Note that the amount of incoming jobs and electricity price ci(t) are unknown to us at the beginning of each slot t but can be observed at the end of each slot. This is an example of OCO with stochastic constraints, where we aim to minimize the electricity cost subject to the constraint that incoming jobs must be served in time. In particular, at each round t, we receive loss function f t(x(t)) and constraint function gt(x(t)) = !(t) −P100 i=1 hi(xi(t)). We compare our proposed algorithm with 3 baselines: (1) best fixed decision in hindsight; (2) react [8] and (3) low-power [22]. Both “react" and “low-power" are popular power control strategies used in distributed data centers. See Supplement 7.10 for more details of these 2 baselines and our experiment. Fig. 1(c)(d) plot the performance of 4 algorithms, where the running average is the time average up to the current slot. Fig. 1(c) compares electricity cost while Fig. 1(d) compares unserved jobs. (Unserved jobs accumulate if the service rate provided by an algorithm is less than the job arrival rate, i.e., the stochastic constraint is violated.) Fig. 1(c)(d) show that our proposed algorithm performs closely to the best fixed decision in hindsight over time, both in electricity cost and constraint violations. ‘React" performs well in serving job arrivals but yields larger electricity cost, while “low-power" has low electricity cost but fails to serve job arrivals. (a) 0 500 1000 1500 2000 2500 Number of slots (each 5 min) 0 50 100 150 200 250 300 350 400 450 Price (dollar/MWh) Electricity market price (b) 0 500 1000 1500 2000 2500 Number of slots (each 5 min) 0 5000 10000 15000 Cost (dollar) Running average electricity cost Our algorithm Best fixed strategy in hindsight React (Gandhi et al. 2012) Low-power (Qureshi et al. 2009) (c) 0 500 1000 1500 2000 2500 Number of slots (each 5 min) -200 0 200 400 600 800 1000 1200 Unserved jobs (per slot) Running average unserved jobs Our algorithm Best fixed decision in hindsight React (Gandhi et al. 2012) Low-power (Qureshi et al. 2009) (d) Figure 1: (a) Geo-distributed data center infrastructure; (b) Electricity market prices at zone CENTRAL New York; (c) Running average electricity cost; (d) Running average unserved jobs. 6 Conclusion This paper studies OCO with stochastic constraints, where the objective function varies arbitrarily but the constraint functions are i.i.d. over time. A novel learning algorithm is developed that guarantees O( p T) expected regret and constraint violations and O( p T log(T)) high probability regret and constraint violations. 9 References [1] New York ISO open access pricing data. http://www.nyiso.com/. [2] Peter L Bartlett, Varsha Dani, Thomas Hayes, Sham Kakade, Alexander Rakhlin, and Ambuj Tewari. High-probability regret bounds for bandit online linear optimization. In Proceedings of Conference on Learning Theory (COLT), 2008. [3] Nicolò Cesa-Bianchi, Philip M Long, and Manfred K Warmuth. Worst-case quadratic loss bounds for prediction using linear functions and gradient descent. IEEE Transactions on Neural Networks, 7(3):604–619, 1996. [4] Nicolò Cesa-Bianchi and Gábor Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [5] Andrew Cotter, Maya Gupta, and Jan Pfeifer. A light touch for heavily constrained sgd. In Proceedings of Conference on Learning Theory (COLT), 2015. [6] Joseph L Doob. Stochastic processes. Wiley New York, 1953. [7] Rick Durrett. Probability: Theory and Examples. Cambridge University Press, 2010. [8] Anshul Gandhi, Mor Harchol-Balter, and Michael A Kozuch. Are sleep states effective in data centers? In International Green Computing Conference (IGCC), 2012. [9] Geoffrey J Gordon. Regret bounds for prediction problems. In Proceeding of Conference on Learning Theory (COLT), 1999. [10] Bruce Hajek. Hitting-time and occupation-time bounds implied by drift analysis with applications. Advances in Applied Probability, 14(3):502–525, 1982. [11] Elad Hazan. Introduction to online convex optimization. Foundations and Trends in Optimization, 2(3–4):157–325, 2016. [12] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69:169–192, 2007. [13] Rodolphe Jenatton, Jim Huang, and Cédric Archambeau. Adaptive algorithms for online convex optimization with long-term constraints. In Proceedings of International Conference on Machine Learning (ICML), 2016. [14] Jyrki Kivinen and Manfred K Warmuth. Exponentiated gradient versus gradient descent for linear predictors. Information and Computation, 132(1):1–63, 1997. [15] Guanghui Lan and Zhiqiang Zhou. Algorithms for stochastic optimization with expectation constraints. arXiv:1604.03887, 2016. [16] Mehrdad Mahdavi, Rong Jin, and Tianbao Yang. Trading regret for efficiency: online convex optimization with long term constraints. Journal of Machine Learning Research, 13(1):2503– 2528, 2012. [17] Mehrdad Mahdavi, Tianbao Yang, and Rong Jin. Stochastic convex optimization with multiple objectives. In Advances in Neural Information Processing Systems (NIPS), 2013. [18] Shie Mannor, John N Tsitsiklis, and Jia Yuan Yu. Online learning with sample path constraints. Journal of Machine Learning Research, 10:569–590, March 2009. [19] Angelia Nedi´c and Asuman Ozdaglar. Subgradient methods for saddle-point problems. Journal of Optimization Theory and Applications, 142(1):205–228, 2009. [20] Michael J. Neely. Energy-aware wireless scheduling with near optimal backlog and convergence time tradeoffs. IEEE/ACM Transactions on Networking, 24(4):2223–2236, 2016. [21] Yurii Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Springer Science & Business Media, 2004. [22] Asfandyar Qureshi, Rick Weber, Hari Balakrishnan, John Guttag, and Bruce Maggs. Cutting the electric bill for internet-scale systems. In ACM SIGCOMM, 2009. [23] Shai Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. [24] Terence Tao and Van Vu. Random matrices: universality of local spectral statistics of nonhermitian matrices. The Annals of Probability, 43(2):782–874, 2015. [25] David Tse and Pramod Viswanath. Fundamentals of Wireless Communication. Cambridge University Press, 2005. [26] Van Vu. Concentration of non-lipschitz functions and applications. Random Structures & Algorithms, 20(3):262–316, 2002. 10 [27] Hao Yu and Michael J. Neely. A low complexity algorithm with O( p T) regret and finite constraint violations for online convex optimization with long term constraints. arXiv:1604.02218, 2016. [28] Hao Yu and Michael J. Neely. A simple parallel algorithm with an O(1/t) convergence rate for general convex programs. SIAM Journal on Optimization, 27(2):759–783, 2017. [29] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of International Conference on Machine Learning (ICML), 2003. 11 | 2017 | 559 |
7,073 | Diffusion Approximations for Online Principal Component Estimation and Global Convergence Chris Junchi Li Mengdi Wang Han Liu Princeton University Department of Operations Research and Financial Engineering, Princeton, NJ 08544 {junchil,mengdiw,hanliu}@princeton.edu Tong Zhang Tencent AI Lab Shennan Ave, Nanshan District, Shenzhen, Guangdong Province 518057, China tongzhang@tongzhang-ml.org Abstract In this paper, we propose to adopt the diffusion approximation tools to study the dynamics of Oja’s iteration which is an online stochastic gradient descent method for the principal component analysis. Oja’s iteration maintains a running estimate of the true principal component from streaming data and enjoys less temporal and spatial complexities. We show that the Oja’s iteration for the top eigenvector generates a continuous-state discrete-time Markov chain over the unit sphere. We characterize the Oja’s iteration in three phases using diffusion approximation and weak convergence tools. Our three-phase analysis further provides a finite-sample error bound for the running estimate, which matches the minimax information lower bound for principal component analysis under the additional assumption of bounded samples. 1 Introduction In the procedure of Principal Component Analysis (PCA) we aim at learning the principal leading eigenvector of the covariance matrix of a d-dimensional random vector Z from its independent and identically distributed realizations Z1, . . . , Zn. Let E[Z] = 0, and let the eigenvalues of Σ be λ1 > λ2 ≥· · · ≥λd > 0, then the PCA problem can be formulated as minimizing the expectation of a nonconvex function: minimize −w⊤E ZZ⊤ w, subject to ∥w∥= 1, w ∈Rd, (1.1) where ∥· ∥denotes the Euclidean norm. Since the eigengap λ1 −λ2 is nonzero, the solution to (1.1) is unique, denoted by w∗. The classical method of finding the estimator of the first leading eigenvector w∗can be formulated as the solution to the empirical covariance problem as bw(n) = argmin ∥w∥=1 −w⊤bΣ(n)w, where bΣ(n) ≡1 n n X i=1 Z(i) Z(i)⊤ . In words, bΣ(n) denotes the empirical covariance matrix for the first n samples. The estimator bw(n) produced via this process provides a statistical optimal solution bw(n). Precisely, [43] shows that the angle between any estimator ew(n) that is a function of the first n samples and w∗has the following 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Left: an objective function for the top-1 PCA, where we use both the radius and heatmap to represent the function value at each point of the unit sphere. Right: A quiver plot on the unit sphere denoting the directions of negative gradient of the PCA objective. minimax lower bound inf ew(n) sup Z∈M(σ2∗,d) E h sin2 ∠(ew(n), w∗) i ≥c · σ2 ∗· d −1 n , (1.2) where c is some positive constant. Here the infimum of ew(n) is taken over all principal eigenvector estimators, and M(σ2 ∗, d) is the collection of all d-dimensional subgaussian distributions with mean zero and eigengap λ1 −λ2 > 0 satisfying λ1λ2/(λ1 −λ2)2 ≤σ2 ∗. Classical PCA method has time complexity O(nd2) and space complexity O(d2). The drawback of this method is that, when the data samples are high-dimensional, computing and storage of a large empirical covariance matrix can be costly. In this paper we concentrate on the streaming or online method for PCA that processes online data and estimates the principal component sequentially without explicitly computing and storing the empirical covariance matrix bΣ. Over thirty years ago, Oja [30] proposed an online PCA iteration that can be regarded as a projected stochastic gradient descent method as w(n) = Π h w(n−1) + βZ(n)(Z(n))⊤w(n−1)i . (1.3) Here β is some positive learning rule or stepsize, and Π is defined as Πw = ∥w∥−1w for each nonzero vector w, namely, Π projects any vector onto the unit sphere Sd−1 = {w ∈Rd | ∥w∥= 1}. Oja’s iteration enjoys a less expensive time complexity O(nd) and space complexity O(d) and thereby has been used as an alternative method for PCA when both the dimension d and number of samples n are large. In this paper, we adopt the diffusion approximation method to characterize the stochastic algorithm using Markov processes and its differential equation approximations. The diffusion process approximation is a fundamental and powerful analytic tool for analyzing complicated stochastic process. By leveraging the tool of weak convergence, we are able to conduct a heuristic finite-sample analysis of the Oja’s iteration and obtain a convergence rate which, by carefully choosing the stepsize β, matches the PCA minimax information lower bound. Our analysis involves the weak convergence theory for Markov processes [11], which is believed to have a potential for a broader class of stochastic algorithms for nonconvex optimization, such as tensor decomposition, phase retrieval, matrix completion, neural network, etc. Our Contributions We provide a Markov chain characterization of the stochastic process {w(n)} generated by the Oja’s iteration with constant stepsize. We show that upon appropriate scalings, the iterates as a Markov process weakly converges to the solution of an ordinary differential equation system, which is a multi-dimensional analogue to the logistic equations. Also locally around the neighborhood of a stationary point, upon a different scaling the process weakly converges to the multidimensional Ornstein-Uhlenbeck processes. Moreover, we identify from differential equation approximations that the global convergence dynamics of the Oja’s iteration has three distinct phases: 2 Figure 2: A simulation plot of Oja’s method, marked with the three phases. (i) The initial phase corresponds to escaping from unstable stationary points; (ii) The second phase corresponds to fast deterministic crossing period; (iii) The third phase corresponds to stable oscillation around the true principal component. Lastly, this is the first work that analyze the global rate of convergence analysis of Oja’s iteration, i.e., the convergence rate does not have any initialization requirements. Related Literatures This paper is a natural companion to paper by the authors’ recent work [23] that gives explicit rate analysis using a discrete-time martingale-based approach. In this paper, we provide a much simpler and more insightful heuristic analysis based on diffusion approximation method under the additional assumption of bounded samples. The idea of stochastic approximation for PCA problem can be traced back to Krasulina [19] published almost fifty years ago. His work proposed an algorithm that is regarded as the stochastic gradient descent method for the Rayleigh quotient. In contrast, Oja’s iteration can be regarded as a projected stochastic gradient descent method. The method of using differential equation tools for PCA appeared in the first papers [19, 31] to prove convergence result to the principal component, among which, [31] also analyze the subspace learning for PCA. See also [16, Chap. 1] for a gradient flow dynamical system perspective of Oja’s iteration. The convergence rate analysis of the online PCA iteration has been very few until the recent big data tsunami, when the need to handle massive amounts of data emerges. Recent works by [6, 10, 17, 34] study the convergence of online PCA from different perspectives, and obtain some useful rate results. Our analysis using the tools of diffusion approximations suggests a rate that is sharper than all existing results, and our global convergence rate result poses no requirement for initialization. More Literatures Our work is related to a very recent line of work [3, 13, 21, 33, 38–41] on the global dynamics of nonconvex optimization with statistical structures. These works carefully characterize the global geometry of the objective functions, and in special, around the unstable stationary points including saddle points and local maximizers. To solve the optimization problem various algorithms were used, including (stochastic) gradient method with random initialization or noise injection as well as variants of Newton’s method. The unstable stationary points can hence be avoided, enabling the global convergence to desirable local minimizers. Our diffusion process-based characterization of SGD is also related to another line of work [8, 10, 24, 26, 37]. Among them, [10] uses techniques based on martingales in discrete time to quantify the global 3 convergence of SGD on matrix decomposition problems. In comparison, our techniques are based on Stroock and Varadhan’s weak convergence of Markov chains to diffusion processes, which yield the continuous-time dynamics of SGD. The rest of these results mostly focus on analyzing continuoustime dynamics of gradient descent or SGD on convex optimization problems. In comparison, we are the first to characterize the global dynamics for nonconvex statistical optimization. In particular, the first and second phases of our characterization, especially the unstable Ornstein-Uhlenbeck process, are unique to nonconvex problems. Also, it is worth noting that, using the arguments of [26], we can show that the diffusion process-based characterization admits a variational Bayesian interpretation of nonconvex statistical optimization. However, we do not pursue this direction in this paper. In the mathematical programming and statistics communities, the computational and statistical aspects of PCA are often studied separately. From the statistical perspective, recent developments have focused on estimating principal components for very high-dimensional data. When the data dimension is much larger than the sample size, i.e., d ≫n, classical method using decomposition of the empirical convariance matrix produces inconsistent estimates [18, 29]. Sparsity-based methods have been studied, such as the truncated power method studied by [45] and [44]. Other sparsity regularization methods for high dimensional PCA has been studied in [2, 7, 9, 18, 25, 42, 43, 46], etc. Note that in this paper we do not consider the high-dimensional regime and sparsity regularization. From the computational perspective, power iterations or the Lanczos method are well studied. These iterative methods require performing multiple products between vectors and empirical covariance matrices. Such operation usually involves multiple passes over the data, whose complexity may scale with the eigengap and dimensions [20, 28]. Recently, randomized algorithms have been developed to reduce the computation complexity [12, 35, 36]. A critical trend today is to combine the computational and statistical aspects and to develop algorithmic estimator that admits fast computation as well as good estimation properties. Related literatures include [4, 5, 10, 14, 27]. Organization §2 introduces the settings and distributional assumptions. §3 briefly discusses the Oja’s iteration from the Markov processes perspective and characterizes that it globally admits ordinary differential equation approximation upon appropriate scaling, and also stochastic differential equation approximation locally in the neighborhood of each stationary point. §4 utilizes the weak convergence results and provides a three-phase argument for the global convergence rate analysis, which is near-optimal for the Oja’s iteration. Concluding remarks are provided in §5. 2 Settings In this section, we present the basic settings for the Oja’s iteration. The algorithm maintains a running estimate w(n) of the true principal component w∗, and updates it while receiving streaming samples from exterior data source. We summarize our distributional assumptions. Assumption 2.1. The random vectors Z ≡Z(1), . . . , Z(n) ∈Rd are independent and identically distributed and have the following properties: (i) E[Z] = 0 and E ZZ⊤ = Σ; (ii) λ1 > λ2 ≥· · · ≥λd > 0; (iii) There is a constant B such that ∥Z∥2 ≤B. For the easiness of presentation, we transform the iterates w(n) and define the rescaled samples, as follows. First we let the eigendecomposition of the covariance matrix be Σ = E ZZ⊤ = UΛU⊤, where Λ = diag(λ1, λ2, . . . , λd) is a diagonal matrix with diagonal entries λ1, λ2, . . . , λd, and U is an orthogonal matrix consisting of column eigenvectors of Σ. Clearly the first column of U is equal to the principal component w∗. Note that the diagonal decomposition might not be unique, in which case we work with an arbitrary one. Second, let Y (n) = U⊤Z(n), v(n) = U⊤w(n), v∗= U⊤w∗. (2.1) One can easily verify that E[Y ] = 0, E Y Y ⊤ = Λ; 4 The principal component of the rescaled random variable Y , which we denote by v∗, is equal to e1, where {e1, . . . , ed} is the canonical basis of Rd. By applying the orthonormal transformation U⊤ to the stochastic process {w(n)}, we obtain an iterative process {v(n) = U⊤w(n)} in the rescaled space: v(n) = U⊤w(n) = Π U⊤w(n−1) + βU⊤Z(n) Z(n)⊤ UU⊤w(n−1) = Π v(n−1) + βY (n) Y (n)⊤ v(n−1) . (2.2) Moreover, the angle processes associated with {w(n)} and {v(n)} are equivalent, i.e., ∠(w(n), w∗) = ∠(v(n), v∗). (2.3) Therefore it would be sufficient to study the rescaled iteration v(n) in (2.2) and the transformed iteration Y (n) throughout the rest of this paper. 3 A Theory of Diffusion Approximation for PCA In this section we show that the stochastic iterates generated by the Oja’s iteration can be approximated by the solution of an ODE system upon appropriate scaling, as long as β is small. To work on the approximation we first observe that the iteration v(n), n = 0, 1, . . . generated by (2.2) forms a discrete-time, time-homogeneous Markov process that takes values on Sd−1. Furthermore, v(n) holds strong Markov property. 3.1 Global ODE Approximation To state our results on differential equation approximations, let us define a new process, which is obtained by rescaling the time index n according to the stepsize β eV β(t) ≡vβ,(⌊tβ−1⌋). (3.1) We add the superscript β in the notation to emphasize the dependence of the process on β. We will show that eV β(t) converges weakly to a deterministic function V (t), as β →0+. Furthermore, we can identify the limit V (t) as the closed-form solution to an ODE system. Under Assumption 2.1 and using an infinitesimal generator analysis we have eV β(t + β) −eV β(t) = O(Bβ). It follows that, as β →0+, the infinitesimal conditional variance tends to 0: β−1var h eV β(t + β) −eV β(t) eV β(t) = v i = O(Bβ), and the infinitesimal mean is β−1E h eV β(t + β) −eV β(t) eV β(t) = v i = Λ −V ⊤ΛV V + O(B2β2). Using the classical weak convergence to diffusion argument [11, Corollary 4.2 in §7.4], we obtain the following result. Theorem 3.1. If vβ,(0) converges weakly to some constant vector V o ∈Sd−1 as β →0+ then the Markov process vβ,(⌊tβ−1⌋) converges weakly to the solution V = V (t) to the following ordinary differential equation system dV dt = Λ −V ⊤ΛV V , (3.2) with initial values V (0) = V o. We can straightforwardly check for sanity that the solution vector V (t) lies on the unit sphere Sd−1, i.e., ∥V (t)∥= 1 for all t ≥0. Written in coordinates V (t) = (V1(t), . . . , Vd(t))⊤, the ODE is expressed for k = 1, . . . , d dVk dt = Vk d X i=1 (λk −λi)V 2 i . 5 One can straightforwardly verify that the solution to (3.2) has Vk(t) = (Z(t))−1/2 Vk(0) exp(λkt), (3.3) where Z(t) is the normalization function Z(t) = d X i=1 (V o i )2 exp(2λit). To understand the limit function given by (3.3), we note that in the special case where λ2 = · · · = λd Z(t) = (V o 1 )2 exp(2λ1t) + 1 −(V o 1 )2 exp(2λ2t), and (V1(t))2 = (V o 1 )2 exp(2λ1t) (V o 1 )2 exp(2λ1t) + 1 −(V o 1 )2 exp(2λ2t) . (3.4) This is the formula of the logistic curve. Hence analogously, V (t) in (3.3) is namely the generalized logistic curves. 3.2 Local Approximation by Diffusion Processes The weak convergence to ODE theorem introduced in §3.1 characterizes the global dynamics of the Oja’s iteration. Such approximation explains many behaviors, but neglected the presence of noise that plays a role in the algorithm. In this section we aim at understanding the Oja’s iteration via stochastic differential equations (SDE). We refer the readers to [32] for more on basic concepts of SDE. In this section, we instead show that under some scaling, the process admits an approximation of multidimensional Ornstein-Uhlenbeck process within a neighborhood of each of the unstable stationary points, both stable and unstable. Afterwards, we develop some weak convergence results to give a rough estimate on the rate of convergence of the Oja’s iteration. For purposes of illustration and brevity, we restrict ourselves to the case of starting point v(0) being the stationary point ek for some k = 1, . . . , d, and denote an arbitrary vector xk to be a (d −1)-dimensional vector that keeps all but the kth coordinate of x. Using theory from [11] we conclude the following theorem. Theorem 3.2. Let k = 1, . . . , d be arbitrary. If β−1/2vβ,(0) k converges weakly to some Uo k ∈Rd−1 as β →0+, then the Markov process β−1/2vβ,(⌊tβ−1⌋) k converges weakly to the solution of the multidimensional stochastic differential equation dUk(t) = −(λkId−1 −Λk)Uk dt + λkΛk 1/2 dBk(t), (3.5) with initial values Uk(0) = Uo k. Here Bk(t) is a standard (d −1)-dimensional Brownian motion. 1 The solution to (3.5) can be solved explicitly. We let for a matrix A ∈Rn×n the matrix exponentiation exp(A) as exp(A) = P∞ n=0(1/n!)An. Also, let Λ1/2 = diag λ1/2 1 , . . . , λ1/2 d for the positive semidefinite diagonal matrix Λ = diag(λ1, . . . , λd). The solution to (3.5) is hence Uk(t) = exp −t(λkId−1 −Λk) U o k + λkΛk 1/2 Z t 0 exp (s −t)(λkId−1 −Λk) dBk(s), which is known as the multidimensional Ornstein-Uhlenbeck process, whose behavior depends on the matrix −(λkId−1 −Λk) and is discussed in details in §4. Before concluding this section, we emphasize that the weak convergence to diffusions results in §3.1 and §3.2 should be distinguished from the convergence of the Oja’s iteration. From a random process theoretical perspective, the former one treats the weak convergence of finite dimensional distributions of a sequence of rescaled processes as β tends to 0, while the latter one charaterizes the long-time behavior of a single realization of iterates generated by algorithm for a fixed β > 0. 1 The reason we have a (d −1)-dimensional Ornstein-Uhlenbeck process is because the objective function of PCA is defined on a (d −1)-dimensional manifold Sd−1 and has d −1 independent variables. 6 4 Global Three-Phase Analysis of Oja’s Iteration Previously §3.1 and §3.2 develop the tools of weak convergence to diffusion under global and local scalings. In this section, we apply these tools to analyze the dynamics of online PCA iteration in three phases in sequel. For purposes of illustration and brevity, we restrict ourselves to the case of starting point v(0) that is near a saddle point ek. Let Aβ ≲Bβ denotes lim supβ→0+ Aβ/Bβ ≤1, a.s., and Aβ ≍Bβ when both Aβ ≲Bβ and Bβ ≲Aβ hold. 4.1 Phase I: Noise Initialization In consideration of global convergence, we analyze the initial phase where the iteration starts at a point on or around Se and eventually escapes an O(1)-neighborhood of the set Se = v ∈Sd−1 : v1 = 0 . When thinking the sphere Sd−1 as the globe with ±e1 being the north and south poles, Se corresponds to the equator of the globe. Therefore, all unstable stationary points (including saddle points and local maximizers) lie on the equator Se. 4.2 Phase II: Deterministic Crossing In Phase II, the iteration escapes from the neighborhood of equator Se and converges to a basin of attraction of the local minimizer v∗. From strong Markov property of the Oja’s iteration introduced in the beginning of §3, one can forget the iteration steps in Phase I and analyze the iteration from the final iterate of Phase I. Suppose we have an initial point v(0) that satisfies (v(0) 1 )2 ≍δ, where δ is a fixed constant in (0, 1/2), Theorem 3.1 concludes that the iteration moves in a deterministic pattern and quickly evolves into a small neighborhood of the principal component e1 such that (v(n) 1 )2 ≍1 −δ. 4.3 Phase III: Convergence to Principal Component In Phase III, the iteration quickly converges to and fluctuates around the true principal component v∗= e1. We start our iteration from a neighborhood around the principal component, where v(0) has (v(0) 1 )2 = 1 −δ. Letting k = 1 in (3.5) and taking the limit t →∞, we have the limit E∥U1(∞)∥2 = tr E U1(t)U1(t)⊤ = (λ1/2) tr Λ1(λ1Id−1 −Λ1)−1 . Rescaling the Markov process along with some calculations gives as n →∞, in very rough sense, lim n→∞E sin2 ∠(v(n), v∗) ≍β · E∥U1(∞)∥2 = β · λ1 2 tr Λ1(λ1Id−1 −Λ1)−1 = β · d X k=2 λ1λk 2(λ1 −λk). (4.1) The above display implies that there will be some nondiminishing fluctuations, variance being proportional to the constant stepsize β, as time goes to infinity or at stationarity. Therefore in terms of angle, at stationarity the Markov process concentrates within a O(β1/2)-radius neighborhood of zero. 4.4 Crossing Time Estimate We turn to estimate the running time, namely the crossing time, which is the number of iterates required for the iteration to cross the corresponding regions in different phases. We will use the relation v(n) ≈V (nβ) to bridge the discrete-time algorithm and its continuous-time approximation. Phase I. For illustrative purposes we only consider the special case where v is close to ek the kth coordinate vector, which is a saddle point that has a negative Hessian eigenvalue. In this situation, the SDE (3.5) in terms of the first coordinate U(t) of Uk reduces to dU(t) = (λ1 −λk)U(t) dt + (λ1λk)1/2 dB(t), (4.2) 7 with initial value U(0) = 0. Solution to (4.2) is known as unstable Ornstein-Uhlenbeck process [1] and can be expressed explicitly in closed-form, as U(t) = W β(t) exp ((λ1 −λk)t) , where W β(t) ≡(λ1λk)1/2 Z t 0 exp (−(λ1 −λk)s) dB(s). Rescaling the time back to the discrete-time iteration, we let n = tβ−1 and obtain v(n) 1 ≍β1/2W β(nβ) exp (β(λ1 −λk)n) . (4.3) In (4.3), the term W β(nβ) is approximately distributed as t = nβ →∞ W β(nβ) ≍ λ1λk 2(λ1 −λk) 1/2 χ, where χ stands for a standard normal variable. We have v(n) 1 ≍β1/2 λ1λk 2(λ1 −λk) 1/2 χ exp (β(λ1 −λk)n) . (4.4) In order to have (v(n) 1 )2 = δ in (4.4), we have as β →0+ the crossing time is approximately N β 1 ≍(λ1 −λk)−1 β−1 log δ|χ|−1 + (λ1 −λk)−1 β−1 log λ1λd 2(λ1 −λd) −1/2 β−1/2 . (4.5) Therefore we have whenever the smallest eigenvalue λd is bounded away from 0, then asymptotically N β 1 ≍0.5 (λ1 −λk)−1 β−1 log β−1 . This suggests that the noise helps the iteration to move away from ek rapidly. Phase II. We turn to estimate the crossing time N β 2 in Phase II. (3.3) together with simple calculation ensures the existence of a constant T, that depends only on δ such that V 2 1 (T) ≥1 −δ. Furthermore T has the following bounds: (λ1 −λd)−1 log ((1 −δ)/δ) ≲T ≲(λ1 −λ2)−1 log ((1 −δ)/δ) . (4.6) Translating back to the timescale of the iteration, it takes asymptotically N β 2 ≲(λ1 −λ2)−1β−1 log ((1 −δ)/δ) iterates to achieve (v (N β 2 ) 1 )2 ≥1 −δ. Theorem 3.1 indicates that when β is positively small, the iterates needed for the first coordinate squared to cross from δ to 1−δ is O(β−1). This is substantiated by simulation results [4] suggesting that the Oja’s iteration moves fast from the warm initialization. Phase III. To estimate the crossing time N β 3 or the number of iterates needed in Phase III, we restart our counter and have from the approximation in Theorem 3.2 and (3.5) that E(v(n) k )2 = (v(0) k )2 exp (−2(λ1 −λk)βn) + βλ1λk Z βn 0 exp (−2(λ1 −λk)(t −s)) ds = β · d X k=2 λ1λk 2(λ1 −λk) + d X k=2 (v(0) k )2 −β · λ1λk 2(λ1 −λk) exp (−2β(λ1 −λk)n) ≍β · d X k=2 λ1λk 2(λ1 −λk) + δ exp (−2β(λ1 −λ2)n) . In terms of the iterations v(n), note the relationship E sin2 ∠(v, e1) = Pd k=2 v2 k = 1 −v2 1. The end of Phase II implies that E sin2 ∠(v(0), e1) = 1 −(v(0) 1 )2 = δ, and hence by setting E sin2 ∠(v(N β 3 ), e1) = β · d X k=2 λ1λk 2(λ1 −λk) + o(β), we conclude that as β →0+ N β 3 ≍0.5(λ1 −λ2)−1β−1 log δβ−1 . (4.7) 8 4.5 Finite-Sample Rate Bound In this subsection we establish the global finite-sample convergence rate using the crossing time estimates in the previous subsection. Starting from v(0) = ek where k = 2, . . . , d is arbitrary, the global convergence time N β = N β 1 + N β 2 + N β 3 as β →0+ such that, by choosing δ ∈(0, 1/2) as a small fixed constant, N β ≍(λ1 −λ2)−1 β−1 log β−1 , with the following estimation on global convergence rate as in (4.1) sin2 ∠(v(N β), v∗) = β · d X k=2 λ1λk 2(λ1 −λk). Given a fixed number of samples T, by choosing β as β = ¯β(T) ≡ log T (λ1 −λ2)T (4.8) we have T ≍(λ1 −λ2)−1 ¯β(T)−1 log ¯β(T) −1 = N ¯β(T ). Plugging in β as in (4.8) we have, by the angle-preserving property of coordinate transformation (2.3), that E sin2 ∠(w(N ¯ β(T )), w∗) = E sin2 ∠(v(N ¯ β(T )), v∗) ≤ d X k=2 λ1λk 2(λ1 −λk) · log T (λ1 −λ2)T . (4.9) The finite sample bound in (4.9) is sharper than any existing results and matches the information lower bound. Moreover, (4.9) implies that the rate in terms of sine-squared angle is sin2 ∠(w(T ), w∗) ≤ C ·λ1λ2/(λ1 −λ2)2 ·d log T/T, which matches the minimax information lower bound (up to a log T factor), see for example, Theorem 3.1 of [43]. Limited by space, details about the rate comparison is provided in the supplementary material. 5 Concluding Remarks We make several concluding remarks on the global convergence rate estimations, as follows. Crossing Time Comparison. From the crossing time estimates in (4.5), (4.6), (4.7) we conclude (i) As β →0+ we have N β 2 /N β 1 →0. This implies that the algorithm demonstrates the cutoff phenomenon which frequently occur in discrete-time Markov processes [22]. In words, the Phase II where the objective value in Rayleigh quotient drops from 1 −δ to δ is an asymptotically a phase of short time, compared to Phases I and III, so the convergence curve occurs instead of an exponentially decaying curve. (ii) As β →0+ we have N β 3 /N β 1 ≍1. This suggests that for the high-d case that Phase I of escaping from the equator consumes roughly the same iterations as in Phase III. To summarize from above, the cold initialization iteration roughly takes twice the number of steps than the warm initialization version which is consistent with the simulation discussions in [31]. Subspace Learning. In this work we primarily concentrates on the problem of finding the top1 eigenvector. It is believed that the problem of finding top-k eigenvectors, a.k.a. the subspace PCA problem, can be analyzed using our approximation methods. This will involve a careful characterization of subspace angles and is hence more complex. We leave this for future investigations. References [1] Aldous, D. (1989). Probability Approximations via the Poisson Clumping Heuristic, volume 77. Springer. [2] Amini, A. & Wainwright, M. (2009). High-dimensional analysis of semidefinite relaxations for sparse principal components. The Annals of Statistics, 37(5B), 2877–2921. [3] Anandkumar, A. & Ge, R. (2016). Efficient approaches for escaping higher order saddle points in non-convex optimization. arXiv preprint arXiv:1602.05908. [4] Arora, R., Cotter, A., Livescu, K., & Srebro, N. (2012). Stochastic optimization for PCA and PLS. In 50th Annual Allerton Conference on Communication, Control, and Computing (pp. 861–868). 9 [5] Arora, R., Cotter, A., & Srebro, N. (2013). Stochastic optimization of PCA with capped msg. In Advances in Neural Information Processing Systems (pp. 1815–1823). [6] Balsubramani, A., Dasgupta, S., & Freund, Y. (2013). The fast convergence of incremental PCA. In Advances in Neural Information Processing Systems (pp. 3174–3182). [7] Cai, T. T., Ma, Z., & Wu, Y. (2013). Sparse PCA: Optimal rates and adaptive estimation. The Annals of Statistics, 41(6), 3074–3110. [8] Darken, C. & Moody, J. (1991). Towards faster stochastic gradient search. In Advances in Neural Information Processing Systems (pp. 1009–1016). [9] d’Aspremont, A., Bach, F., & El Ghaoui, L. (2008). Optimal solutions for sparse principal component analysis. Journal of Machine Learning Research, 9, 1269–1294. [10] De Sa, C., Olukotun, K., & Ré, C. (2015). Global convergence of stochastic gradient descent for some non-convex matrix problems. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15) (pp. 2332–2341). [11] Ethier, S. N. & Kurtz, T. G. (2005). Markov Processes: Characterization and Convergence, volume 282. John Wiley & Sons. [12] Garber, D. & Hazan, E. (2015). Fast and simple PCA via convex optimization. arXiv preprint arXiv:1509.05647. [13] Ge, R., Huang, F., Jin, C., & Yuan, Y. (2015). Escaping from saddle points – online stochastic gradient for tensor decomposition. In Proceedings of The 28th Conference on Learning Theory (pp. 797–842). [14] Hardt, M. & Price, E. (2014). The noisy power method: A meta algorithm with applications. In Advances in Neural Information Processing Systems (pp. 2861–2869). [15] Hardt, Moritz & Price, Eric (2014). The Noisy Power Method: A Meta Algorithm with Applications. NIPS, (pp. 2861–2869). [16] Helmke, U. & Moore, J. B. (1994). Optimization and Dynamical Systems. Springer. [17] Jain, P., Jin, C., Kakade, S. M., Netrapalli, P., & Sidford, A. (2016). Matching matrix bernstein with little memory: Near-optimal finite sample guarantees for oja’s algorithm. arXiv preprint arXiv:1602.06929. [18] Johnstone, I. M. & Lu, A. Y. (2009). On Consistency and Sparsity for Principal Components Analysis in High Dimensions. Journal of the American Statistical Association, 104(486), 682–693. [19] Krasulina, T. (1969). The method of stochastic approximation for the determination of the least eigenvalue of a symmetrical matrix. USSR Computational Mathematics and Mathematical Physics, 9(6), 189–195. [20] Kuczynski, J. & Wozniakowski, H. (1992). Estimating the largest eigenvalue by the power and lanczos algorithms with a random start. SIAM journal on matrix analysis and applications, 13(4), 1094–1122. [21] Lee, J. D., Simchowitz, M., Jordan, M. I., & Recht, B. (2016). Gradient descent only converges to minimizers. In Conference on Learning Theory (pp. 1246–1257). [22] Levin, D. A., Peres, Y., & Wilmer, E. L. (2009). Markov chains and mixing times. American Mathematical Society. [23] Li, C. J., Wang, M., Liu, H., & Zhang, T. (2016). Near-optimal stochastic approximation for online principal component estimation. arXiv preprint arXiv:1603.05305. [24] Li, Q., Tai, C., & E, W. (2015). Dynamics of stochastic gradient algorithms. arXiv preprint arXiv:1511.06251. [25] Ma, Z. (2013). Sparse principal component analysis and iterative thresholding. The Annals of Statistics, 41(2), 772–801. [26] Mandt, S., Hoffman, M. D., & Blei, D. M. (2016). A variational analysis of stochastic gradient algorithms. arXiv preprint arXiv:1602.02666. [27] Mitliagkas, I., Caramanis, C., & Jain, P. (2013). Memory limited, streaming PCA. In Advances in Neural Information Processing Systems (pp. 2886–2894). 10 [28] Musco, C. & Musco, C. (2015). Stronger approximate singular value decomposition via the block lanczos and power methods. arXiv preprint arXiv:1504.05477. [29] Nadler, B. (2008). Finite sample approximation results for principal component analysis: A matrix perturbation approach. The Annals of Statistics, 41(2), 2791–2817. [30] Oja, E. (1982). Simplified neuron model as a principal component analyzer. Journal of mathematical biology, 15(3), 267–273. [31] Oja, E. & Karhunen, J. (1985). On stochastic approximation of the eigenvectors and eigenvalues of the expectation of a random matrix. Journal of mathematical analysis and applications, 106(1), 69–84. [32] Oksendal, B. (2003). Stochastic Differential Equations. Springer. [33] Panageas, I. & Piliouras, G. (2016). Gradient descent converges to minimizers: The case of non-isolated critical points. arXiv preprint arXiv:1605.00405. [34] Shamir, O. (2015a). Convergence of stochastic gradient descent for PCA. arXiv preprint arXiv:1509.09002. [35] Shamir, O. (2015b). Fast stochastic algorithms for svd and PCA: Convergence properties and convexity. arXiv preprint arXiv:1507.08788. [36] Shamir, O. (2015c). A stochastic PCA and svd algorithm with an exponential convergence rate. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15) (pp. 144–152). [37] Su, W., Boyd, S., & Candes, E. J. (2016). A differential equation for modeling Nesterov’s accelerated gradient method: theory and insights. Journal of Machine Learning Research, 17(153), 1–43. [38] Sun, J., Qu, Q., & Wright, J. (2015a). Complete dictionary recovery over the sphere i: Overview and the geometric picture. arXiv preprint arXiv:1511.03607. [39] Sun, J., Qu, Q., & Wright, J. (2015b). Complete dictionary recovery over the sphere ii: Recovery by Riemannian trust-region method. arXiv preprint arXiv:1511.04777. [40] Sun, J., Qu, Q., & Wright, J. (2015c). When are nonconvex problems not scary? arXiv preprint arXiv:1510.06096. [41] Sun, J., Qu, Q., & Wright, J. (2016). A geometric analysis of phase retrieval. arXiv preprint arXiv:1602.06664. [42] Vu, V. Q. & Lei, J. (2012). Minimax Rates of Estimation for Sparse PCA in High Dimensions. AISTATS, (pp. 1278–1286). [43] Vu, V. Q. & Lei, J. (2013). Minimax sparse principal subspace estimation in high dimensions. The Annals of Statistics, 41(6), 2905–2947. [44] Wang, Z., Lu, H., & Liu, H. (2014). Nonconvex statistical optimization: Minimax-optimal sparse pca in polynomial time. arXiv preprint arXiv:1408.5352. [45] Yuan, X.-T. & Zhang, T. (2013). Truncated power method for sparse eigenvalue problems. Journal of Machine Learning Research, 14(Apr), 899–925. [46] Zou, H. (2006). The adaptive lasso and its oracle properties. Journal of the American statistical association, 101(476), 1418–1429. 11 | 2017 | 56 |
7,074 | Structured Bayesian Pruning via Log-Normal Multiplicative Noise Kirill Neklyudov 1,2 k.necludov@gmail.com Dmitry Molchanov 1,3 dmolchanov@hse.ru Arsenii Ashukha 1,2 aashukha@hse.ru Dmitry Vetrov 1,2 dvetrov@hse.ru 1National Research University Higher School of Economics 2Yandex 3Skolkovo Institute of Science and Technology Abstract Dropout-based regularization methods can be regarded as injecting random noise with pre-defined magnitude to different parts of the neural network during training. It was recently shown that Bayesian dropout procedure not only improves generalization but also leads to extremely sparse neural architectures by automatically setting the individual noise magnitude per weight. However, this sparsity can hardly be used for acceleration since it is unstructured. In the paper, we propose a new Bayesian model that takes into account the computational structure of neural networks and provides structured sparsity, e.g. removes neurons and/or convolutional channels in CNNs. To do this we inject noise to the neurons outputs while keeping the weights unregularized. We establish the probabilistic model with a proper truncated log-uniform prior over the noise and truncated log-normal variational approximation that ensures that the KL-term in the evidence lower bound is computed in closed-form. The model leads to structured sparsity by removing elements with a low SNR from the computation graph and provides significant acceleration on a number of deep neural architectures. The model is easy to implement as it can be formulated as a separate dropout-like layer. 1 Introduction Deep neural networks are a flexible family of models which provides state-of-the-art results in many machine learning problems [14, 20]. However, this flexibility often results in overfitting. A common solution for this problem is regularization. One of the most popular ways of regularization is Binary Dropout [19] that prevents co-adaptation of neurons by randomly dropping them during training. An equally effective alternative is Gaussian Dropout [19] that multiplies the outputs of the neurons by Gaussian random noise. In recent years several Bayesian generalizations of these techniques have been developed, e.g. Variational Dropout [8] and Variational Spike-and-Slab Neural Networks [13]. These techniques provide theoretical justification of different kinds of Dropout and also allow for automatic tuning of dropout rates, which is an important practical result. Besides overfitting, compression and acceleration of neural networks are other important challenges, especially when memory or computational resources are restricted. Further studies of Variational Dropout show that individual dropout rates for each weight allow to shrink the original network architecture and result in a highly sparse model [16]. General sparsity provides a way of neural network compression, while the time of network evaluation may remain the same, as most modern DNN-oriented software can’t work with sparse matrices efficiently. At the same time, it is possible to achieve acceleration by enforcing structured sparsity in convolutional filters or data tensors. In the simplest case it means removing redundant neurons or convolutional filters instead of separate weights; but more complex patterns can also be considered. This way Group-wise Brain Damage 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. [10] employs group-wise sparsity in convolutional filters, Perforated CNNs [3] drop redundant rows from the intermediate dataframe matrices that are used to compute convolutions, and Structured Sparsity Learning [24] provides a way to remove entire convolutional filters or even layers in residual networks. These methods allow to obtain practical acceleration with little to no modifications of the existing software. In this paper, we propose a tool that is able to induce an arbitrary pattern of structured sparsity on neural network parameters or intermediate data tensors. We propose a dropout-like layer with a parametric multiplicative noise and use stochastic variational inference to tune its parameters in a Bayesian way. We introduce a proper analog of sparsity-inducing log-uniform prior distribution [8, 16] that allows us to formulate a correct probabilistic model and avoid the problems that come from using an improper prior. This way we obtain a novel Bayesian method of regularization of neural networks that results in structured sparsity. Our model can be represented as a separate dropout-like layer that allows for a simple and flexible implementation with almost no computational overhead, and can be incorporated into existing neural networks. Our experiments show that our model leads to high group sparsity level and significant acceleration of convolutional neural networks with negligible accuracy drop. We demonstrate the performance of our method on LeNet and VGG-like architectures using MNIST and CIFAR-10 datasets. 2 Related Work Deep neural networks are extremely prone to overfitting, and extensive regularization is crucial. The most popular regularization methods are based on injection of multiplicative noise over layer inputs, parameters or activations [8, 19, 22]. Different kinds of multiplicative noise have been used in practice; the most popular choices are Bernoulli and Gaussian distributions. Another type of regularization of deep neural networks is based on reducing the number of parameters. One approach is to use low-rank approximations, e.g. tensor decompositions [4, 17], and the other approach is to induce sparsity, e.g. by pruning [5] or L1 regularization [24]. Sparsity can also be induced by using the Sparse Bayesian Learning framework with empirical Bayes [21] or with sparsity-inducing priors [12, 15, 16]. High sparsity is one of the key factors for the compression of DNNs [5, 21]. However, in addition to compression it is beneficial to obtain acceleration. Recent papers propose different approaches to acceleration of DNNs, e.g. Spatial Skipped Convolutions [3] and Spatially Adaptive Computation Time [2] that propose different ways to reduce the number of computed convolutions, Binary Networks [18] that achieve speedup by using only 1 bit to store a single weight of a DNN, Low-Rank Expansions [6] that use low-rank filter approximations, and Structured Sparsity Learning [24] that allows to remove separate neurons or filters. As reported in [24] it is possible to obtain acceleration of DNNs by introducing structured sparsity, e.g. by removing whole neurons, filters or layers. However, non-adaptive regularization techniques require tuning of a huge number of hyperparameters that makes it difficult to apply in practice. In this paper we apply the Bayesian learning framework to obtain structured sparsity and focus on acceleration of neural networks. 3 Stochastic Variational Inference Given a probabilistic model p(y | x, ✓) we want to tune parameters ✓of the model using training dataset D = {(xi, yi)}N i=1. The prior knowledge about parameters ✓is defined by prior distribution p(✓). Using the Bayes rule we obtain the posterior distribution p(✓| D) = p(D | ✓)p(✓)/p(D). However, computing posterior distribution using the Bayes rule usually involves computation of intractable integrals, so we need to use approximation techniques. One of the most widely used approximation techniques is Variational Inference. In this approach the unknown distribution p(✓| D) is approximated by a parametric distribution qφ(✓) by minimization of the Kullback-Leibler divergence KL(qφ(✓) k p(✓| D)). Minimization of the KL divergence is equivalent to maximization of the variational lower bound L(φ). L(φ) = LD(φ) −KL(qφ(✓) k p(✓)), (1) where LD(φ) = N X i=1 Eqφ(✓) log p(yi | xi, ✓) (2) 2 LD(φ) is a so-called expected log-likelihood function which is intractable in case of complex probabilistic model p(y | x, ✓). Following [8] we use the Reparametrization trick to obtain an unbiased differentiable minibatch-based Monte Carlo estimator of the expected log-likelihood. Here N is the total number of objects, M is the minibatch size, and f(φ, ") provides samples from the approximate posterior qφ(✓) as a deterministic function of a non-parametric noise " ⇠p("). LD(φ) ' LSGV B D (φ) = N M M X k=1 log p(yik | xik, wik = f(φ, "ik)) (3) L(φ) ' LSGV B(φ) = LSGV B D (φ) −KL(qφ(w) k p(w)) (4) rφLD(φ) ' rφLSGV B D (φ) (5) This way we obtain a procedure of approximate Bayesian inference where we solve optimization problem (4) by stochastic gradient ascent w.r.t. variational parameters φ. This procedure can be efficiently applied to Deep Neural Networks and usually the computational overhead is very small, as compared to ordinary DNNs. If the model p(y | x, ✓, w) has another set of parameters w that we do not want to be Bayesian about, we can still use the same variational lower bound objective: L(φ, w) = LD(φ, w) −KL(qφ(✓) k p(✓)) ! max φ,w , (6) where LD(φ, w) = N X i=1 Eqφ(✓) log p(yi | xi, ✓, w) (7) This objective corresponds the maximum likelihood estimation wML of parameters w, while finding the approximate posterior distribution qφ(✓) ⇡p(✓| D, wML). In this paper we denote the weights of the neural networks, the biases, etc. as w and find their maximum likelihood estimation as described above. The parameters ✓that undergo the Bayesian treatment are the noisy masks in the proposed dropout-like layer (SBP layer). They are described in the following section. 4 Group Sparsity with Log-normal Multiplicative Noise Variational Inference with a sparsity-inducing log-uniform prior over the weights of a neural network is an efficient way to enforce general sparsity on weight matrices [16]. However, it is difficult to apply this approach to explicitly enforce structured sparsity. We introduce a dropout-like layer with a certain kind of multiplicative noise. We also make use of the sparsity-inducing log-uniform prior, but put it over the noise variables rather than weights. By sharing those noise variables we can enforce group-wise sparsity with any form of groups. 4.1 Variational Inference for Group Sparsity Model We consider a single dropout-like layer with an input vector x 2 RI that represents one object with I features, and an output vector y 2 RI of the same size. The input vector x is usually supposed to come from the activations of the preceding layer. The output vector y would then serve as an input vector for the following layer. We follow the general way to build dropoutlike layers (8). Each input feature xi is multiplied by a noise variable ✓i that comes from some distribution pnoise(✓). For example, for Binary Dropout pnoise(✓) would be a fully factorized Bernoulli distribution with pnoise(✓i) = Bernoulli(p), and for Gaussian dropout it would be a fully-factorized Gaussian distribution with pnoise(✓i) = N(1, ↵). yi = xi · ✓i ✓⇠pnoise(✓) (8) Note that if we have a minibatch XM⇥I of M objects, we would independently sample a separate noise vector ✓m for each object xm. This would be the case throughout the paper, but for the sake of simplicity we would consider a single object x in all following formulas. Also note that the noise ✓is usually only sampled during the training phase. A common approximation during the testing phase is to use the expected value E✓instead of sampling ✓. All implementation details are provided and discussed in Section 4.5. 3 We follow a Bayesian treatment of the variable ✓, as described in Section 3. In order to obtain a sparse solution, we choose the prior distribution p(✓) to be a fully-factorized improper log-uniform distribution. We denote this distribution as LogU1(·) to stress that it has infinite domain. This distribution is known for its sparsification properties and works well in practice for deep neural networks [16]. p(✓) = IY i=1 p(✓i) p(✓i) = LogU1(✓i) / 1 ✓i ✓i > 0 (9) In order to train the model, i.e. perform variational inference, we need to choose an approximation family qφ for the posterior distribution p(✓| D) ⇡qφ(✓). qφ(✓) = IY i=1 q(✓i | µi, σi) = IY i=1 LogN(✓i | µi, σ2 i ) (10) ✓i ⇠LogN(✓i | µi, σ2 i ) () log ✓i ⇠N(log ✓i | µi, σ2 i ) (11) A common choice of variational distribution q(·) is a fully-factorized Gaussian distribution. However, for this particular model we choose q(✓) to be a fully-factorized log-normal distribution (10–11). To make this choice, we were guided by the following reasons: • The log-uniform distribution is a specific case of the log-normal distribution when the parameter σ goes to infinity and µ remains fixed. Thus we can guarantee that in the case of no data our variational approximation can be made exact. Hence this variational family has no "prior gap". • We consider a model with multiplicative noise. The scale of this noise corresponds to its shift in the logarithmic space. By establishing the log-uniform prior we set no preferences on different scales of this multiplicative noise. The usual use of a Gaussian as a posterior immediately implies very asymmetric skewed distribution in the logarithmic space. Moreover log-uniform and Gaussian distributions have different supports and that will require establishing two log-uniform distributions for positive and negative noises. In this case Gaussian variational approximation would have quite exotic bi-modal form (one mode in the log-space of positive noises and another one in the log-space of negative noises). On the other hand, the log-normal posterior for the multiplicative noise corresponds to a Gaussian posterior for the additive noise in the logarithmic scale, which is much easier to interpret. • Log-normal noise is always non-negative both during training and testing phase, therefore it does not change the sign of its input. This is in contrast to Gaussian multiplicative noise N(✓i | 1, ↵) that is a standard choice for Gaussian dropout and its modifications [8, 19, 23]. During the training phase Gaussian noise can take negative values, so the input to the following layer can be of arbitrary sign. However, during the testing phase noise ✓is equal to 1, so the input to the following layer is non-negative with many popular non-linearities (e.g. ReLU, sigmoid, softplus). Although Gaussian dropout works well in practice, it is difficult to justify notoriously different input distributions during training and testing phases. • The log-normal approximate posterior is tractable. Specifically, the KL divergence term KL(LogN(✓| µ, σ2) k LogU1(✓)) can be computed analytically. The final loss function is presented in equation (12) and is essentially the original variational lower bound (4). LSGV B(φ) = LSGV B D (µ, σ, W) −KL(q(✓| µ, σ) k p(✓)) ! max µ,σ,W, (12) where µ and σ are the variatianal parameters, and W denotes all other trainable parameters of the neural network, e.g. the weight matrices, the biases, batch normalization parameters, etc. Note that we can optimize the variational lower bound w.r.t. the parameters µ and σ of the log-normal noise ✓. We do not fix the mean of the noise thus making our variational approximation more tight. 4.2 Problems of Variational Inference with Improper Log-Uniform Prior The log-normal posterior in combination with a log-uniform prior has a number of attractive features. However, the maximization of the variational lower bound with a log-uniform prior and a log-normal 4 posterior is an ill-posed optimization problem. As the log-uniform distribution is an improper prior, the KL-divergence between a log-normal distribution LogN(µ, σ2) and a log-uniform distribution LogU1 is infinite for any finite value of parameters µ and σ. KL ! LogN(x | µ, σ2) k LogU1(x) " = C −log σ C = +1 (13) A common way to tackle this problem is to consider the density of the log-uniform distribution to be equal to C ✓and to treat C as some finite constant. This trick works well for the case of a Gaussian posterior distribution [8, 16]. The KL divergence between a Gaussian posterior and a log-uniform prior has an infinite gap, but can be calculated up to this infinite constant in a meaningful way [16]. However, for the case of the log-normal posterior the KL divergence is infinite for any finite values of variational parameters, and is equal to zero for a fixed finite µ and infinite σ. As the data-term (3) is bounded for any value of variational parameters, the only global optimum of the variational lower bound is achieved when µ is finite and fixed, and σ goes to infinity. In this case the posterior distribution collapses into the prior distribution and the model fails to extract any information about the data. This effect is wholly caused by the fact that the log-uniform prior is an improper (non-normalizable) distribution, which makes the whole probabilistic model flawed. 4.3 Variational Inference with Truncated Approximation Family Due to the improper prior the optimization problem becomes ill-posed. But do we really need to use an improper prior distribution? The most common number format that is used to represent the parameters of a neural network is the floating-point format. The floating-point format is only able to represent numbers from a limited range. For example, a single-point precision variable can only represent numbers from the range −3.4 ⇥1038 to +3.4 ⇥1038, and the smallest possible positive number is equal to 1.2 ⇥10−38. All of probability mass of the improper log-uniform prior is concentrated beyond the single-point precision (and essentially any practical floating point precision), not to mention that the actual relevant range of values of neural network parameters is much smaller. It means that in practice this prior is not a good choice for software implementation of neural networks. We propose to use a truncated log-uniform distribution (14) as a proper analog of the log-uniform distribution. Here I[a,b](x) denotes the indicator function for the interval x 2 [a, b]. The posterior distribution should be defined on the same support as the prior distribution, so we also need to use a truncated log-normal distribution (14). LogU[a,b](✓i) / LogU1(✓i) · I[a,b](log ✓i) LogN[a,b](✓i) / LogN(✓i | µi, σ2 i ) · I[a,b](log ✓i) (14) Our final model then can be formulated as follows. yi = xi · ✓i p(✓i) = LogU[a,b](✓i) q(✓i | µi, σi) = LogN[a,b](✓i | µi, σ2 i ) (15) Note that all the nice facts about the log-normal posterior distribution from the Section 4.1 are also true for the truncated log-normal posterior. However, now we have a proper probabilistic model and the Stochastic Variational Inference can be preformed correctly. Unlike (13), now the KL divergence term (16–17) can be calculated correctly for all valid values of variational parameters (see Appendix A for details). KL(q(✓| µ, σ) k p(✓)) = I X i=1 KL(q(✓i | µi, σi) k p(✓i)) (16) KL(q(✓i | µi, σi) k p(✓i)) = log b −a p 2⇡eσ2 i −log(Φ(βi) −Φ(↵i)) −↵iφ(↵i) −βiφ(βi) 2(Φ(βi) −Φ(↵i)) , (17) where ↵i = a−µi σi , βi = b−µi σi , φ(·) and Φ(·) are the density and the CDF of the standard normal distribution. The reparameterization trick also can still be performed (18) using the inverse CDF of the truncated normal distribution (see Appendix B). ✓i = exp ! µi + σiΦ−1 (Φ (↵i) + (Φ (βi) −Φ (↵i)) yi) " , where yi ⇠U(y | 0, 1) (18) The final loss and the set of parameters is the same as described in Section 4.1, and the training procedure remains the same. 5 4.4 Sparsity Log-uniform prior is known to lead to a sparse solution [16]. In the variational dropout paper authors interpret the parameter ↵of the multiplicative noise N(1, ↵) as a Gaussian dropout rate and use it as a thresholding criterion for weight pruning. Unlike the binary or Gaussian dropout, in the truncated log-normal model there is no "dropout rate" variable. However, we can use the signal-to-noise ratio E✓/ p Var(✓) (SNR) for thresholding. SNR(✓i) = (Φ(σi −↵i) −Φ(σi −βi))/ p Φ(βi) −Φ(↵i) p exp(σ2 i )(Φ(2σi −↵i) −Φ(2σi −βi)) −(Φ(σi −↵i) −Φ(σi −βi))2 (19) The SNR can be computed analytically, the derivation can be found in the appendix. It has a simple interpretation. If the SNR is low, the corresponding neuron becomes very noisy and its output no longer contains any useful information. If the SNR is high, it means that the neuron output contains little noise and is important for prediction. Therefore we can remove all neurons or filters with a low SNR and set their output to constant zero. 4.5 Implementation details We perform a minibatch-based stochastic variational inference for training. The training procedure looks as follows. On each training step we take a minibatch of M objects and feed it into the neural network. Consider a single SBP layer with input XM⇥I and output Y M⇥I. We independently sample a separate noise vector ✓m ⇠q(✓) for each object xm and obtain a noise matrix ✓M⇥I. The output matrix Y M⇥I is then obtained by component-wise multiplication of the input matrix and the noise matrix: ymi = xmi · ✓m i . To be fully Bayesian, one would also sample and average over different dropout masks ✓during testing, i.e. perform Bayesian ensembling. Although this procedure can be used to slightly improve the final accuracy, it is usually avoided. Bayesian ensembling essentially requires sampling of different copies of neural networks, which makes the evaluation K times slower for averaging over K samples. Instead, during the testing phase in most dropout-based techniques the noise variable ✓is replaced with its expected value. In this paper we follow the same approach and replace all non-pruned ✓i with their expectations (20) during testing. The derivation of the expectation of the truncated log-normal distribution is presented in Appendix C. E✓i = exp(µi + σ2 i /2) Φ(βi) −Φ(↵i) Φ ✓ σ2 i + µi −a σi ◆ −Φ ✓ σ2 i + µi −b σi ◆' (20) We tried to use Bayesian ensembling with this model, and experienced almost no gain of accuracy. It means that the variance of the learned approximate posterior distribution is low and does not provide a rich ensemble. Throughout the paper we introduced the SBP dropout layer for the case when input objects are represented as one-dimensional vectors x. When defined like that, it would induce general sparsity on the input vector x. It works as intended for fully-connected layers, as a single input feature corresponds to a single output neuron of a preceding fully-connected layer and a single output neuron of the following layer. However, it is possible to apply the SBP layer in a more generic setting. Firstly, if the input object is represented as a multidimensional tensor X with shape I1 ⇥I2 ⇥· · · ⇥Id, the noise vector ✓of length I = I1 ⇥I2 ⇥· · · ⇥Id can be reshaped into a tensor with the same shape. Then the output tensor Y can be obtained as a component-wise product of the input tensor X and the noise tensor ✓. Secondly, the SBP layer can induce any form of structured sparsity on this input tensor X. To do it, one would simply need to use a single random variable ✓i for the group of input features that should be removed simultaneously. For example, consider an input tensor XH⇥W ⇥C that comes from a convolutional layer, H and W being the size of the image, and C being the number of channels. Then, in order to remove redundant filters from the preceding layer (and at the same time redundant channels from the following layer), one need to share the random variables ✓in the following way: yhwc = xhwc · ✓c ✓c ⇠LogN[a,b](✓c | µc, σ2 c) (21) Note that now there is one sample ✓2 RC for one object XH⇥W ⇥C on each training step. If the signal-to-noise ratio becomes lower than 1 for a component ✓c, that would mean that we can 6 Figure 1: The value of the SGVB for the case of fixed variational parameter µ = 0 (blue line) and for the case when both variational parameters µ and σ are trained (green line) Figure 2: The learned signal-to-noise ratio for image features on the MNIST dataset. permanently remove the c-th channel of the input tensor, and therefore delete the c-th filter from the preceding layer and the c-th channel from the following layer. All the experiments with convolutional architectures used this formulation of SBP. This is a general approach that is not limited to reducing the shape of the input tensor. It is possible to obtain any fixed pattern of group-wise sparsity using this technique. Similarly, the SBP layer can be applied in a DropConnect fashion. One would just need to multiply the weight tensor W by a noise tensor ✓of similar shape. The training procedure remains the same. It is still possible to enforce any structured sparsity pattern for the weight tensor W by sharing the random variables as described above. 5 Experiments We perform an evaluation on different supervised classification tasks and with different architectures of neural networks including deep VGG-like architectures with batch normalization layers. For each architecture, we report the number of retained neurons and filters, and obtained acceleration. Our experiments show that Structured Bayesian Pruning leads to a high level of structured sparsity in convolutional filters and neurons of DNNs without significant accuracy drop. We also demonstrate that optimization w.r.t. the full set of variational parameters (µ, σ) leads to improving model quality and allows us to perform sparsification in a more efficient way, as compared to tuning of only one free parameter that corresponds to the noise variance. As a nice bonus, we show that Structured Bayesian Pruning network does not overfit on randomly labeled data, that is a common weakness of non-bayesian dropout networks. The source code is available in Theano [7] and Lasagne, and also in TensorFlow [1] (https://github.com/necludov/group-sparsity-sbp). 5.1 Experiment Setup The truncation parameters a and b are the hyperparameters of our model. As our layer is meant for regularization of the model, we would like our layer not to amplify the input signal and restrict the noise ✓to an interval [0, 1]. This choice corresponds to the right truncation threshold b set to 0. We find empirically that the left truncation parameter a does not influence the final result much. We use values a = −20 and b = 0 in all experiments. We define redundant neurons by the signal-to-noise ratio of the corresponding multiplicative noise ✓. See Section 4.4 for more details. By removing all neurons and filters with the SNR < 1 we experience no accuracy drop in all our experiments. SBP dropout layers were put after each convolutional layer to remove its filters, and before each fully-connected layer to remove its input neurons. As one filter of the last convolutional layer usually corresponds to a group of neurons in the following dense layer, it means that we can remove more input neurons in the first dense layer. Note that it means that we have two consecutive dropout layers between the last convolutional layer and the first fully-connected layer in CNNs, and a dropout layer before the first fully-connected layer in FC networks (see Fig. 2). 7 Table 1: Comparison of different structured sparsity inducing techniques on LeNet-5-Caffe and LeNet-500-300 architectures. SSL [24] is based on group lasso regularization, SparseVD [16]) is a Bayesian model with a log-uniform prior that induces weight-wise sparsity. For SparseVD a neuron/filter is considered pruned, if all its weights are set to 0. Our method provides the highest speed-up with a similar accuracy. We report acceleration that was computed on CPU (Intel Xeon E5-2630), GPU (Tesla K40) and in terms of Floating Point Operations (FLOPs). Network Method Error % Neurons per Layer CPU GPU FLOPs Original 1.54 784 −500 −300 −10 1.00⇥ 1.00⇥ 1.00⇥ SparseVD 1.57 537 −217 −130 −10 1.19⇥ 1.03⇥ 3.73⇥ LeNet-500-300 SSL 1.49 434 −174 −78 −10 2.21⇥ 1.04⇥ 6.06⇥ (ours) StructuredBP 1.55 245 −160 −55 −10 2.33⇥ 1.08⇥ 11.23⇥ Original 0.80 20 −50 −800 −500 1.00⇥ 1.00⇥ 1.00⇥ SparseVD 0.75 17 −32 −329 −75 1.48⇥ 1.41⇥ 2.19⇥ LeNet5-Caffe SSL 1.00 3 −12 −800 −500 5.17⇥ 1.80⇥ 3.90⇥ (ours) StructuredBP 0.86 3 −18 −284 −283 5.41⇥ 1.91⇥ 10.49⇥ Table 2: Comparison of different structured sparsity inducing techniques (SparseVD [16]) on VGGlike architectures on CIFAR-10 dataset. StructuredBP stands for the original SBP model, and StructuredBPa stands for the SBP model with KL scaling. k is a width scale factor that determines the number of neurons or filters on each layer of the network (width(k) = k ⇥original width) k Method Error % Units per Layer CPU GPU FLOPs 1.0 Original 7.2 64 −64 −128 −128 −256 −256 −256 −512 −512 −512 −512 −512 −512 −512 1.00⇥ 1.00⇥ 1.00⇥ SparseVD 7.2 64 −62 −128 −126 −234 −155 −31 −81 −76 − 9 −138 −101 −413 −373 2.50⇥ 1.69⇥ 2.27⇥ (ours) StructuredBP 7.5 64 −62 −128 −126 −234 −155 −31 −79 −73 − 9 −59 −73 −56 −27 2.71⇥ 1.74⇥ 2.30⇥ (ours) StructuredBPa 9.0 44 −54 −92 −115 −234 −155 −31 −76 −55 − 9 −34 −35 −21 −280 3.68⇥ 2.06⇥ 3.16⇥ 1.5 Original 6.8 96 −96 −192 −192 −384 −384 −384 −768 −768 −768 −768 −768 −768 −768 1.00⇥ 1.00⇥ 1.00⇥ SparseVD 7.0 96 −78 −191 −146 −254 −126 −27 −79 −74 − 9 −137 −100 −416 −479 3.35⇥ 2.16⇥ 3.27⇥ (ours) StructuredBP 7.2 96 −77 −190 −146 −254 −126 −26 −79 −70 − 9 −71 −82 −79 −49 3.63⇥ 2.17⇥ 3.32⇥ (ours) StructuredBPa 7.8 77 −74 −161 −146 −254 −125 −26 −78 −66 − 9 −47 −55 −54 −237 4.47⇥ 2.47⇥ 3.93⇥ 5.2 More Flexible Variational Approximation Usually during automatic training of dropout rates the mean of the noise distribution remains fixed. In the case of our model it is possible to train both mean and variance of the multiplicative noise. By using a more flexible distribution we obtain a tighter variational lower bound and a higher sparsity level. In order to demonstrate this effect, we performed an experiment on MNIST dataset with a fully connected neural network that contains two hidden layers with 1000 neurons each. The results are presented in Fig. 1. 5.3 LeNet5 and Fully-Connected Net on MNIST We compare our method with other sparsity inducing methods on the MNIST dataset using a fully connected architecture LeNet-500-300 and a convolutional architecture LeNet-5-Caffe. These networks were trained with Adam without any data augmentation. The LeNet-500-300 network was trained from scratch, and the LeNet-5-Caffe1 network was pretrained with weight decay. An illustration of trained SNR for the image features for the LeNet-500-3002 network is shown in Fig. 2. The final accuracy, group-wise sparsity levels and speedup for these architectures for different methods are shown in Table 1. 5.4 VGG-like on CIFAR-10 To prove that SBP scales to deep architectures, we apply it to a VGG-like network [25] that was adapted for the CIFAR-10 [9] dataset. The network consists of 13 convolutional and two fullyconnected layers, trained with pre-activation batch normalization and Binary Dropout. At the start of the training procedure, we use pre-trained weights for initialization. Results with different scaling of the number of units are presented in Table 2. We present results for two architectures with different scaling coefficient k 2 {1.0, 1.5} . For smaller values of scaling coefficient k 2 {0.25, 0.5} we obtain less sparse architecture since these networks have small learning capacities. Besides the results for the standard StructuredBP procedure, we also provide the results for SBP with KL scaling (StructuredBPa). Scaling the KL term of the variational lower bound proportional to the computational complexity of the layer leads to a higher sparsity level for the first layers, providing 1A modified version of LeNet5 from [11]. Caffe Model specification: https://goo.gl/4yI3dL 2Fully Connected Neural Net with 2 hidden layers that contains 500 and 300 neurons respectively. 8 more acceleration. Despite the higher error values, we obtain the higher value of true variational lower bound during KL scaling, hence, we find its another local maximum. 5.5 Random Labels A recent work shows that Deep Neural Networks have so much capacity that they can easily memorize the data even with random labeling [26]. Binary dropout as well as other standard regularization techniques do not prevent the networks from overfitting in this scenario. However, recently it was shown that Bayesian regularization may help [16]. Following these works, we conducted similar experiments. We used a Lenet5 network on the MNIST dataset and a VGG-like network on CIFAR-10. Although Binary Dropout does not prevent these networks from overfitting, SBP decides to remove all neurons of the neural network and provides a constant prediction. In other words, in this case SBP chooses the simplest model that achieves the same testing error rate. This is another confirmation that Bayesian regularization is more powerful than other popular regularization techniques. 6 Conclusion We propose Structured Bayesian Pruning, or SBP, a dropout-like layer that induces multiplicative random noise over the output of the preceding layer. We put a sparsity-inducing prior over the noise variables and tune the noise distribution using stochastic variational inference. SBP layer can induce an arbitrary structured sparsity pattern over its input and provides adaptive regularization. We apply SBP to cut down the number of neurons and filters in convolutional neural networks and report significant practical acceleration with no modification of the existing software implementation of these architectures. Acknowledgments We would like to thank Christos Louizos and Max Welling for valuable discussions. Kirill Neklyudov and Arsenii Ashukha were supported by HSE International lab of Deep Learning and Bayesian Methods which is funded by the Russian Academic Excellence Project ’5-100’. Dmitry Molchanov was supported by the Ministry of Education and Science of the Russian Federation (grant 14.756.31.0001). Dmitry Vetrov was supported by the Russian Science Foundation grant 17-11-01027. References [1] Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] Michael Figurnov, Maxwell D Collins, Yukun Zhu, Li Zhang, Jonathan Huang, Dmitry Vetrov, and Ruslan Salakhutdinov. Spatially adaptive computation time for residual networks. arXiv preprint arXiv:1612.02297, 2016. [3] Mikhail Figurnov, Aizhan Ibraimova, Dmitry P Vetrov, and Pushmeet Kohli. Perforatedcnns: Acceleration through elimination of redundant convolutions. In Advances in Neural Information Processing Systems, pages 947–955, 2016. [4] Timur Garipov, Dmitry Podoprikhin, Alexander Novikov, and Dmitry Vetrov. Ultimate tensorization: compressing convolutional and fc layers alike. arXiv preprint arXiv:1611.03214, 2016. [5] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. [6] Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. arXiv preprint arXiv:1405.3866, 2014. [7] Bergstra James, Breuleux Olivier, Bastien Frédéric, Lamblin Pascal, and Pascanu Razvan. Theano: a cpu and gpu math expression compiler. In Proceedings of the Python for Scientific Computing Conference (SciPy). [8] Diederik P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 2575–2583. Curran Associates, Inc., 2015. [9] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. 9 [10] Vadim Lebedev and Victor Lempitsky. Fast convnets using group-wise brain damage. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2554–2564, 2016. [11] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [12] Ekaterina Lobacheva, Nadezhda Chirkova, and Dmitry Vetrov. Bayesian sparsification of recurrent neural networks. arXiv preprint arXiv:1708.00077, 2017. [13] Christos Louizos. Smart regularization of deep architectures. Master’s thesis, University of Amsterdam, 2015. [14] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013. [15] Dmitry Molchanov, Arseniy Ashuha, and Dmitry Vetrov. Dropout-based automatic relevance determination. In Bayesian Deep Learning workshop, NIPS, 2016. [16] Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. arXiv preprint arXiv:1701.05369, 2017. [17] Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. Tensorizing neural networks. In Advances in Neural Information Processing Systems, pages 442–450, 2015. [18] Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525–542. Springer, 2016. [19] Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. [20] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2015. [21] Karen Ullrich, Edward Meeds, and Max Welling. Soft weight-sharing for neural network compression. arXiv preprint arXiv:1702.04008, 2017. [22] Li Wan, Matthew Zeiler, Sixin Zhang, Yann L Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 1058–1066, 2013. [23] Sida I Wang and Christopher D Manning. Fast dropout training. In ICML (2), pages 118–126, 2013. [24] Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In Advances in Neural Information Processing Systems, pages 2074–2082, 2016. [25] Sergey Zagoruyko. 92.45 on cifar-10 in torch, 2015. [26] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016. 10 | 2017 | 560 |
7,075 | Clustering with Noisy Queries Arya Mazumdar and Barna Saha College of Information and Computer Sciences University of Massachusetts Amherst Amherst, MA 01003 {arya,barna}@cs.umass.edu Abstract In this paper, we provide a rigorous theoretical study of clustering with noisy queries. Given a set of n elements, our goal is to recover the true clustering by asking minimum number of pairwise queries to an oracle. Oracle can answer queries of the form “do elements u and v belong to the same cluster?”-the queries can be asked interactively (adaptive queries), or non-adaptively up-front, but its answer can be erroneous with probability p. In this paper, we provide the first information theoretic lower bound on the number of queries for clustering with noisy oracle in both situations. We design novel algorithms that closely match this query complexity lower bound, even when the number of clusters is unknown. Moreover, we design computationally efficient algorithms both for the adaptive and non-adaptive settings. The problem captures/generalizes multiple application scenarios. It is directly motivated by the growing body of work that use crowdsourcing for entity resolution, a fundamental and challenging data mining task aimed to identify all records in a database referring to the same entity. Here crowd represents the noisy oracle, and the number of queries directly relates to the cost of crowdsourcing. Another application comes from the problem of sign edge prediction in social network, where social interactions can be both positive and negative, and one must identify the sign of all pair-wise interactions by querying a few pairs. Furthermore, clustering with noisy oracle is intimately connected to correlation clustering, leading to improvement therein. Finally, it introduces a new direction of study in the popular stochastic block model where one has an incomplete stochastic block model matrix to recover the clusters. 1 Introduction Clustering is one of the most fundamental and popular methods for data classification. In this paper we initiate a rigorous theoretical study of clustering with the help of a noisy oracle, a model that captures many application scenarios and has drawn significant attention in recent years. Suppose we are given a set of n points, that need to be clustered into k clusters where k is unknown to us. Suppose there is an oracle that can answer pair-wise queries of the form, “do u and v belong to the same cluster?”. Repeating the same question to the oracle always returns the same answer, but the answer could be wrong with probability p = 1 2 −λ, λ > 0 (i.e., slightly better than random answer). We are interested to find the minimum number of queries needed to recover the true clusters with high probability. Understanding query complexity of the noisy oracle model is a fundamental theoretical question [25] with many existing works on sorting and selection [7, 8] where queries are erroneous with probability p, and repeating the same question does not change the answer. Here we study the basic clustering problem under this setting which also captures several fundamental applications. Crowdsourced Entity Resolution. Entity resolution (ER) is an important data mining task that tries to identify all records in a database that refer to the same underlying entity. Starting with the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. seminal work of Fellegi and Sunter [26], numerous algorithms with variety of techniques have been developed for ER [24, 28, 40, 19]. Still, due to ambiguity in representation and poor data quality, accuracy of automated ER techniques has been unsatisfactory. To remedy this, a recent trend in ER has been to use human in the loop. In this setting, humans are asked simple pair-wise queries adaptively, “do u and v represent the same entity?”, and these answers are used to improve the final accuracy [30, 54, 56, 27, 52, 21, 29, 37, 55, 46]. Proliferation of crowdsourcing platforms like Amazon Mechanical Turk (AMT), CrowdFlower etc. allows for easy implementation. However, data collected from non-expert workers on crowdsourcing platforms are inevitably noisy. A simple scheme to reduce errors could be to take a majority vote after asking the same question to multiple independent crowd workers. However, often that is not sufficient. Our experiments on several real datasets (see experimentation section for details) with answers collected from AMT [31, 52] show majority voting could even increase the errors. Interestingly, such an observation has been made by a recent paper as well [51]. There are more complex querying model [51, 55, 53], and involved heuristics [31, 52] to handle errors in this scenario. Let p, 0 < p < 1/2, be the probability of error1 of a query answer which might also be the aggregated answer after repeating the query several times. Therefore, once the answer has been aggregated, it cannot change. In all crowdsourcing works, the goal is to minimize the number of queries to reduce the cost and time of crowdsourcing, and recover the entities (clusters). This is exactly clustering with noisy oracle. While several heuristics have been developed [52, 30, 53], here we provide a rigorous theory with near-optimal algorithms and hardness bounds. Another recent work that is conceptually close is by Asthiani et al. [4], where pair-wise queries are used for clustering. However, the setting is very different. They consider the specific NP-hard k-means objective with distance matrix which must be a metric and must satisfy a deterministic separation property. Signed Edge Prediction. The edge sign prediction problem can be defined as follows. Suppose we are given a social network with signs on all its edges, but the sign from node u to v, denoted by s(u, v) ∈{±1} is hidden. The goal is to recover these signs as best as possible using minimal amount of information. Social interactions or sentiments can be both positive (“like”, “trust”) and negative (“dislike”, “distrust”). [41] provides several such examples; e.g., Wikipedia, where one can vote for or against the nomination of others to adminship [10], or Epinions and Slashdots where users can express trust or distrust, or can declare others to be friends or foes [9, 39]. Initiated by [11, 34], many techniques and related models using convex optimization, low-rank approximation and learning theoretic approaches have been used for this problem [17, 12, 14]. Recently [16, 14, 48] proposed the following model for edge sign prediction. We can query a pair of nodes (u, v) to test whether s(u, v) = +1 indicating u and v belong to the same cluster or s(u, v) = −1 indicating they are not. However, the query fails to return the correct answer with probability 0 < p < 1/2, and we want to query the minimal possible pairs. This is exactly the case of clustering with noisy oracle. Our result significantly improves, and generalizes over [16, 14, 48]. Correlation Clustering. In fact, when all pair-wise queries are given, and the goal is to recover the maximum likelihood (ML) clustering, then our problem is equivalent to noisy correlation clustering [6, 44]. Introduced by [6], correlation clustering is an extremely well-studied model of clustering. We are given a graph G = (V, E) with each edge e ∈E labelled either +1 or −1, the goal of correlation clustering is to either (a) minimize the number of disagreements, that is the number of intra-cluster −1 edges and inter-cluster +1 edges, or (b) maximize the number of agreements that is the number of intra-cluster +1 edges and inter-cluster −1 edges. Correlation clustering is NP-hard, but can be approximated well with provable guarantees [6]. In a random noise model, also introduced by [6] and studied further by [44], we start with a ground truth clustering, and then each edge label is flipped with probability p. This is exactly the graph we observe if we make all possible pair-wise queries, and the ML decoding coincides with correlation clustering. The proposed algorithm of [6] can recover in this case all clusters of size ω( p |V | log |V |), and if “all” the clusters have size Ω( p |V |), then they can be recovered by [44]. Using our proposed algorithms for clustering with noisy oracle, we can also recover significantly smaller sized clusters given the number of clusters are not too many. Such a result is possible to obtain using the repeated-peeling technique of [3]. However, our running time is significantly better. E.g. for k ≤n1/6, we have a running time of O(n log n), whereas for [3], it is dominated by the time to solve a convex optimization over n-vertex graph which is at least O(n3). 1An approximation of p can often be estimated manually from a small sample of crowd answers. 2 Stochastic Block Model (SBM). The clustering with faulty oracle is intimately connected with the planted partition model, also known as the stochastic block model [36, 23, 22, 2, 1, 32, 18, 49]. The stochastic block model is an extremely well-studied model of random graphs where two vertices within the same community share an edge with probability p′, and two vertices in different communities share an edge with probability q′. It is often assumed that k, the number of communities, is a constant (e.g. k = 2 is known as the planted bisection model and is studied extensively [1, 49, 23] or a slowly growing function of n (e.g. k = o(log n)). There are extensive literature on characterizing the threshold phenomenon in SBM in terms of the gap between p′ and q′2 (e.g. see [2] and therein for many references) for exact and approximate recovery of clusters of nearly equal size. If we allow for different probability of errors for pairs of elements based on whether they belong to the same cluster or not, then the resultant faulty oracle model is an intriguing generalization of SBM. Consider the probability of error for a query on (u, v) is 1 −p′ if u and v belong to the same cluster and q′ otherwise; but now, we can only learn a subset of the entries of an SBM matrix by querying adaptively. Understanding how the threshold of recovery changes for such an “incomplete” or “space-efficient” SBM will be a fascinating direction to pursue. In fact, our lower bound results extend to asymmetric probability values, while designing efficient algorithms and sharp thresholds are ongoing works. In [15], a locality model where measurements can only be obtained for nearby nodes is studied for two clusters with non-adaptive querying and allowing repetitions. It would also be interesting to extend our work with such locality constraints. In a companion paper, we have studied a related problem where the queries are not noisy and certain similarity values between each pair of elements are available [47]. Most of the results of the two papers are available online in a more extensive version [45]. Contributions. Formally the clustering with a noisy oracle is defined as follows. Problem (Query-Cluster ). Consider a set of points V ≡[n] containing k latent clusters Vi, i = 1, . . . , k, Vi ∩Vj = ∅, where k and the subsets Vi ⊆[n] are unknown. There is an oracle Op,q : V × V →{±1}, with two error parameters p, q : 0 < p < q < 1. The oracle takes as input a pair of vertices u, v ∈V × V , and if u, v belong to the same cluster then Op,q(u, v) = +1 with probability 1 −p and Op,q(u, v) = −1 with probability p. On the other hand, if u, v do not belong to the same cluster then Op,q(u, v) = +1 with probability 1 −q and Op,q(u, v) = −1 with probability q. Such an oracle is called a binary asymmetric channel. A special case would be when p = 1 −q = 1 2 −λ, λ > 0, the binary symmetric channel, where the error rate is the same p for all pairs. Except for the lower bound, we focus on the symmetric case in this paper. Note that the oracle returns the same answer on repetition. Now, given V , find Q ⊆V × V such that |Q| is minimum, and from the oracle answers it is possible to recover Vi, i = 1, 2, ..., k with high probability3. Note that the entries of Q can be chosen adaptively based on the answers of previously chosen queries. Our contributions are as follows. • Lower Bound (Section 2). We show that Ω( nk ∆(p∥q)) is the information theoretic lower bound on the number of adaptive queries required to obtain the correct clustering with high probability even when the clusters are of similar size (see, Theorem 1). Here ∆(p∥q) is the Jensen-Shannon divergence between Bernoulli p and q distributions. For the symmetric case, that is when p = 1 −q, ∆(p∥1 −p) = (1 −2p) log 1−p p . In particular, if p = 1 2 −λ, our lower bound on query complexity is Ω( nk λ2 ) = Ω( nk (1−2p)2 ). Developing lower bounds in the interactive setting especially with noisy answers appears to be significantly challenging as popular techniques based on Fano-type inequalities for multiple hypothesis testing [13, 42] do not apply, and we believe our technique will be useful in other noisy interactive learning settings. • Information-Theoretic Optimal Algorithm (Section 3 and B.1). For the symmetric error case, we design an algorithm which asks at most O( nk log n (1−2p)2 ) queries (Theorem 2) matching the lower bound within an O(log n) factor, whenever p = 1 2 −λ. • Computationally Efficient Algorithm (Section 3.2 and B.2). We next design an algorithm that is computationally efficient and runs in O(nk log n + k1+2ω) time where ω ≤2.373 is the exponent of fast matrix multiplication and asks at most O(nklog(n) + min (nk2log(n), k5 log2 n)) queries treating p as a constant4. Note that most prior works in SBM, or works on edge sign detection, only 2Most recent works consider the region of interest as p′ = a log n n and q′ = b log n n for some a > b > 0. 3 High probability implies with probability 1 −on(1), where on(1) →0 as n →∞ 4For exact dependency on p see the corresponding section. 3 consider the case when k is a constant [2, 32, 18], even just k = 2 [49, 1, 16, 14, 48]. For small values of k, we get a highly efficient algorithm. We can use this algorithm to recover all clusters of size at least min (k, √n) log n for correlation clustering on noisy graph, improving upon the results of [6, 44]. As long as k = o(√n), this improves upon the running time of O(n3) in [3]. • Nonadaptive Algorithm (Section B.3). When the queries must be done up-front, for k = 2, we give a simple O(n log n) time algorithm that asks O( n log n (1−2p)4 ) queries improving upon [48] where a polynomial time algorithm (at least with a running time of O(n3)) is shown with number of queries O(n log n/(1/2 −p) log n log log n ) and over [16, 14] where O(npoly log n) queries are required under certain conditions on the clusters. Our result generalizes to k > 2, and we show interesting lower bounds in this setting (Appendix C in the supplementary material). Further, we derive new lower bounds showing trade-off between queries and threshold of recovery for incomplete SBM in Appendix C. 2 Lower bound for the faulty-oracle model Note that we are not allowed to ask the same question multiple times to get the correct answer. In this case, even for probabilistic recovery, a minimum size bound on cluster size is required. For example, consider the following two different clusterings. C1 : V = ⊔k−2 i=1 Vi ⊔{v1, v2} ⊔{v3} and C2 : V = ⊔k−2 i=1 Vi ⊔{v1} ⊔{v2, v3}. Now if one of these two clusterings are given to us uniformly at random, no matter how many queries we do, we will fail to recover the correct clustering with positive probability. Therefore, the challenge in proving lower bounds is when clusters all have size more than a minimum threshold, or when they are all nearly balanced. This removes the constraint on the algorithm designer on how many times a cluster can be queried with a vertex and the algorithms can have greater flexibility. Our lower bound holds for a large set of clustering instances. We define a clustering to be balanced if either of the following two conditions hold 1) the minimum size of a cluster is ≥ n 20k, 2) the maximum size of a cluster is ≤4n k . For any balanced clustering, we prove a lower bound on the number of queries required. Our main lower bound in this section uses the Jensen-Shannon (JS) divergence. The well-known KL divergence is defined between two probability mass functions f and g: D(f∥g) = P i f(i) log f(i) g(i). Further define the JS divergence as: ∆(f∥g) = 1 2(D(f∥g) + D(g∥f)). In particular, the KL and JS divergences between two Bernoulli random variable with parameters p and q are denoted with D(p∥q) and ∆(p∥q) respectively. Theorem 1 (Query-Cluster Lower Bound). For any balanced clustering instance, if any (randomized) algorithm does not make Ω nk ∆(p∥q) expected number of queries then the recovery will be incorrect with probability at least 0.29 −O( 1 k). Note that the lower bound is more effective when p and q are close. Moreover our actual lower bound is slightly tighter with the expected number of queries required given by Ω nk min{D(q∥p),D(p∥q)} . Proof of Theorem 1. We have V to be the n-element set to be clustered: V = ⊔k i=1Vi. To prove Theorem 1 we first show that, if the number of queries is small, then there exist Ω(k) number of clusters, that are not being sufficiently queried with. Then we show that, since the size of the clusters cannot be too large or too small, there exists a decent number of vertices in these clusters. The main piece of the proof of Theorem 1 is Lemma 1. We provide a sketch of this lemma here, the full proof, which is inspired by a technique of lower bounding regret in multi-arm bandit problems (see [5, 38]) is given in Appendix A in the supplementary material. Lemma 1. Suppose, there are k clusters. There exist at least 4k 5 clusters such that for each element v from any of these clusters, v will be assigned to a wrong cluster by any randomized algorithm with probability 0.29 −10/k unless the total number of queries involving v is more than k 10∆(p∥q). Proof-sketch of Lemma 1. Let us assume that the k clusters are already formed, and all elements except for one element v has already been assigned to a cluster. Note that, queries that do not involve v plays no role in this stage. 4 Now the problem reduces to a hypothesis testing problem where the ith hypothesis Hi for i = 1, . . . , k, denotes that the true cluster for v is Vi. We can also add a null-hypothesis H0 that stands for the vertex belonging to none of the clusters (hypothetical). Let Pi denote the joint probability distribution of our observations (the answers to the queries involving vertex v) when Hi is true, i = 1, . . . , k. That is for any event A we have Pi(A) = Pr(A|Hi). Suppose T denotes the total number of queries made by an (possibly randomized) algorithm at this stage before assigning a cluster. Let the random variable Ti denote the number of queries involving cluster Vi, i = 1, . . . , k. In the second step, we need to identify a set of clusters that are not being queried with enough by the algorithm. We must have, Pk i=1 E0Ti = T. Let J1 ≡{i ∈{1, . . . , k} : E0Ti ≤ 10T k }. That is J1 contains clusters which were involved in less than 10T k queries before assignment. Let Ei ≡ {the algorithm outputs cluster Vi} and J2 = {i ∈{1, . . . , n} : P0(Ei) ≤ 10 k }. The set of clusters, J = J1 ∩J2 has size, |J| ≥2 · 9k 10 −k = 4k 5 . Now let us assume that we are given an element v ∈Vj for some j ∈J to cluster (Hj is the true hypothesis). The probability of correct clustering is Pj(Ej). In the last step, we give an upper bound on probability of correct assignment for this element. We must have, Pj(Ej) = P0(Ej) + Pj(Ej) −P0(Ej) ≤10 k + |P0(Ej) −Pj(Ej)| ≤10 k + ∥P0 − Pj∥T V ≤10 k + q 1 2D(P0∥Pj). where ∥P0 −Pj∥T V denotes the total variation distance between two distributions and and in the last step we have used the relation between total variation and divergence (Pinsker’s inequality). Since P0 and Pj are the joint distributions of the independent random variables (answers to queries) that are identical to one of two Bernoulli random variables: Y , which is Bernoulli(p), or Z, which is Bernoulli(q), it is possible to show, D(P0∥Pj) ≤10T k D(q∥p). Now plugging this in, Pj(Ej) ≤10 k + r 1 2 10T k D(q∥p) ≤10 k + r 1 2 = 10 k + 0.707, if T ≤ k 10D(q∥p). Had we bounded the total variation distance with D(Pj∥P0) in the Pinsker’s inequality then we would have D(p∥q) in the denominator. Now we are ready to prove Theorem 1. Proof of Theorem 1. We will show the claim by considering a balanced input. Recall that for a balanced input either the maximum size of a cluster is ≤4n k or the minimum size of a cluster is ≥ n 20k. We will consider the two cases separately for the proof. Case 1: the maximum size of a cluster is ≤4n k . Suppose, the total number of queries is T ′. That means number of vertices involved in the queries is ≤2T ′. Note that there are k clusters and n elements. Let U be the set of vertices that are involved in less than 16T ′ n queries. Clearly, (n −|U|) 16T ′ n ≤2T ′, or |U| ≥7n 8 . Now we know from Lemma 1 that there exists 4k 5 clusters such that a vertex v from any one of these clusters will be assigned to a wrong cluster by any randomized algorithm with probability 1/4 unless the expected number of queries involving this vertex is more than k 10∆(q∥p). We claim that U must have an intersection with at least one of these 4k 5 clusters. If not, then more than 7n 8 vertices must belong to less than k −4k 5 = k 5 clusters. Or the maximum size of a cluster will be 7n·5 8k > 4n k , which is prohibited according to our assumption. Now each vertex in the intersection of U and the 4k 5 clusters are going to be assigned to an incorrect cluster with positive probability if, 16T ′ n ≤ k 10∆(p∥q). Therefore we must have T ′ ≥ nk 160∆(p∥q). Case 2: the minimum size of a cluster is ≥ n 20k. Let U ′ be the set of clusters that are involved in at most 16T ′ k queries. That means, (k −|U ′|) 16T ′ k ≤ 2T ′. This implies, |U ′| ≥7k 8 . Now we know from Lemma 1 that there exist 4k 5 clusters (say U ∗) such 5 that a vertex v from any one of these clusters will be assigned to a wrong cluster by any randomized algorithm with probability 1/4 unless the expected number of queries involving this vertex is more than k 10∆(p∥q). Quite clearly |U ∗∩U| ≥7k 8 + 4k 5 −k = 27k 40 . Consider a cluster Vi such that i ∈U ∗∩U, which is always possible because the intersection is nonempty. Vi is involved in at most 16T ′ k queries. Let the minimum size of any cluster be t. Now, at least half of the vertices of Vi must each be involved in at most 32T ′ kt queries. Now each of these vertices must be involved in at least k 10∆(p∥q) queries (see Lemma 1) to avoid being assigned to a wrong cluster with positive probability. This means 32T ′ kt ≥ k 10∆(p∥q) or T ′ = Ω nk ∆(p∥q) , since t ≥ n 20k. 3 Algorithms Let V = ⊔k i=1Vi be the true clustering and V = ⊔k i=1 ˆVi be the maximum likelihood (ML) estimate of the clustering that can be found when all n 2 queries have been made to the faulty oracle. Our first result obtains a query complexity upper bound within an O(log n) factor of the information theoretic lower bound. The algorithm runs in quasi-polynomial time, and we show this is the optimal possible assuming the famous planted clique hardness. Next, we show how the ideas can be extended to make it computationally efficient. We consider both the adaptive and non-adaptive versions. The missing proofs and details are provided in Appendix B in the supplementary document. 3.1 Information-Theoretic Optimal Algorithm In particular, we prove the following theorem. Theorem 2. There exists an algorithm with query complexity O( nk log n (1−2p)2 ) for Query-Cluster that returns the ML estimate with high probability when query answers are incorrect with probability p < 1 2. Moreover, the algorithm returns all true clusters of V of size at least C log n (1−2p)2 for a suitable constant C with probability 1 −on(1). Remark 1. Assuming p = 1 2 −λ, as λ →0, ∆(p∥1 −p) = (1 −2p) ln 1−p p = 2λ ln 1/2+λ 1/2−λ = 2λ ln(1 + 2λ 1/2−λ) ≤ 4λ2 1/2−λ = O(λ2) = O((1 −2p)2), matching the query complexity lower bound within an O(log n) factor. Algorithm. 1 The algorithm that we propose is completely deterministic and has several phases. Phase 1: Selecting a small subgraph. Let c = 16 (1−2p)2 . 1. Select c log n vertices arbitrarily from V . Let V ′ be the set of selected vertices. Create a subgraph G′ = (V ′, E′) by querying for every (u, v) ∈V ′ × V ′ and assigning a weight of ω(u, v) = +1 if the query answer is “yes” and ω(u, v) = −1 otherwise . 2. Extract the heaviest weight subgraph S in G′. If |S| ≥c log n, move to Phase 2. 3. Else we have |S| < c log n. Select a new vertex u, add it to V ′, and query u with every vertex in V ′ \ {u}. Move to step (2). Phase 2: Creating an Active List of Clusters. Initialize an empty list called active when Phase 2 is executed for the first time. 1. Add S to the list active. 2. Update G′ by removing S from V ′ and every edge incident on S. For every vertex z ∈V ′, if P u∈S ω(z, u) > 0, include z in S and remove z from G′ with all edges incident to it. 3. Extract the heaviest weight subgraph S in G′. If |S| ≥c log n, Move to step(1). Else move to Phase 3. Phase 3: Growing the Active Clusters. We now have a set of clusters in active. 1. Select an unassigned vertex v not in V ′ (that is previously unexplored), and for every cluster C ∈active, pick c log n distinct vertices u1, u2, ...., ul in the cluster and query v with them. If the majority of these answers are “yes”, then include v in C. 6 2. Else we have for every C ∈active the majority answer is “no” for v. Include v ∈V ′ and query v with every node in V ′ \ v and update E′ accordingly. Extract the heaviest weight subgraph S from G′ and if its size is at least c log n move to Phase 2 step (1). Else move to Phase 3 step (1) by selecting another unexplored vertex. Phase 4: Maximum Likelihood (ML) Estimate. 1. When there is no new vertex to query in Phase 3, extract the maximum likelihood clustering of G′ and return them along with the active clusters, where the ML estimation is defined as, max Sℓ,ℓ=1,···:V =⊔ℓ=1Sℓ X ℓ X i,j∈Sℓ,i̸=j ωi,j, (see Appendix B.1) (1) Analysis. The high level steps of the analysis are as follows. Suppose all n 2 queries on V × V have been made. If the ML estimate of the clustering with these n 2 answers is same as the true clustering of V that is, ⊔k i=1Vi ≡⊔k i=1 ˆVi then the algorithm for noisy oracle finds the true clustering with high probability. Let without loss of generality, | ˆV1| ≥... ≥| ˆVl| ≥6c log n > | ˆVl+1| ≥... ≥| ˆVk|. We will show that Phase 1-3 recover ˆV1, ˆV2... ˆVl with probability at least 1 −1 n. The remaining clusters are recovered in Phase 4. A subcluster is a subset of nodes in some cluster. Lemma 2 shows that any set S that is included in active in Phase 2 of the algorithm is a subcluster of V . This establishes that all clusters in active at any time are subclusters of some original cluster in V . Lemma 2. Let c′ = 6c = 96 (1−2p)2 . Algorithm 1 in Phase 1 and 3 returns a subcluster of V of size at least c log n with high probability if G′ contains a subcluster of V of size at least c′ log n. Moreover, it does not return any set of vertices of size at least c log n if G′ does not contain a subcluster of V of size at least c log n. Lemma 2 is proven in three steps. Step 1 shows that if V ′ contains a subcluster of size ≥c′ log n then S ⊆Vi for some i ∈[1, k] will be returned with high probability when G′ is processed. Step 2 shows that size of S will be at least c log n, and finally step 3 shows that if there is no subcluster of size at least c log n in V ′, then no subset of size > c log n will be returned by the algorithm when processing G′, because otherwise that S will span more than one cluster, and the weight of a subcluster contained in S will be higher than S giving to a contradiction. From Lemma 2, any S added to active in Phase 2 is a subcluster with high probability, and has size at least c log n. Moreover, whenever G′ contains a subcluster of V of size at least c′ log n, it is retrieved by the algorithm and added to active. The next lemma shows that each subcluster added to active is correctly grown to the true cluster: (1) every vertex added to such a cluster is correct, and (2) no two clusters in active can be merged. Therefore, clusters obtained from active are the true clusters. Lemma 3. The list active contains all the true clusters of V of size ≥c′ log n at the end of the algorithm with high probability. Finally, once all the clusters in active are grown, we have a fully queried graph in G′ containing the small clusters which can be retrieved in Phase 4. This completes the correctness of the algorithm. With the following lemma, we get Theorem 2. Lemma 4. The query complexity of the algorithm for faulty oracle is O nk log n (1−2p)2 . Running time of this algorithm is dominated by finding the heaviest weight subgraph in G′, execution of each of those calls can be done in time O([ k log n (2p−1)2 ] O( log n (2p−1)2 )), that is quasi-polynomial in n. We show that it is unlikely that this running time can be improved by showing a reduction from the famous planted clique problem for which quasi-polynomial time is the best known (see Appendix B.1). 3.2 Computationally Efficient Algorithm We now prove the following theorem. We give the algorithm here which is completely deterministic with known k. The extension to unknown k and a detailed proof of correctness are deferred to Appendix B.2. 7 Theorem 3. There exists a polynomial time algorithm with query complexity O( nk2 (2p−1)4 ) for QueryCluster with error probability p, which recovers all clusters of size at least Ω( k log n (2p−1)4 ). Algorithm 2. Let N = 64k2 log n (1−2p)4 . We define two thresholds T(a) = pa + 6 (1−2p) √N log n and θ(a) = 2p(1 −p)a + 2√N log n. The algorithm is as follows. Phase 1-2C: Selecting a Small Subgraph. Initially we have an empty graph G′ = (V ′, E′), and all vertices in V are unassigned to any cluster. 1. Select X new vertices arbitrarily from the unassigned vertices in V \ V ′ and add them to V ′ such that the size of V ′ is N. If there are not enough vertices left in V \ V ′, select all of them. Update G′ = (V ′, E′) by querying for every (u, v) such that u ∈X and v ∈V ′ and assigning a weight of ω(u, v) = +1 if the query answer is “yes” and ω(u, v) = −1 otherwise . 2. Let N +(u) denote all the neighbors of u in G′ connected by +1-weighted edges. We now cluster G′. Select every u and v such that u ̸= v and |N +(u)|, |N +(v)| ≥T(|V ′|). Then if |N +(u)\N +(v)|+|N +(v)\N +(u)| ≤θ(|V ′|) (the symmetric difference of these neighborhoods) include u and v in the same cluster. Include in active all clusters formed in this step that have size at least 64k log n (1−2p)4 . If there is no such cluster, abort. Remove all vertices in such cluster from V ′ and any edge incident on them from E′. Phase 3C: Growing the Active Clusters. 1. For every unassigned vertex v ∈V \ V ′, and for every cluster C ∈active, pick c log n distinct vertices u1, u2, ...., ul in the cluster and query v with them. If the majority of these answers are “yes”, then include v in C. 2. Output all the clusters in active and move to Phase 1 step (1) to obtain the remaining clusters. Running time of the algorithm can be shown to be O( nk log n (1−2p)2 + kN ω) where ω ≤2.373 is the exponent of fast matrix multiplication5. Thus for small values of k, we get a highly efficient algorithm. The query complexity of the algorithm is O( nk2 log n (2p−1)4 ) since each vertex is involved in at most O( k2 log n (2p−1)4 ) queries within G′ and O( k log n (2p−1)2 ) across the active clusters. In fact, in each iteration, the number of queries within G′ is O(N 2) and since there could be at most k rounds, the overall query complexity is O( nk log n (2p−1)2 + min ( nk2 log n (2p−1)4 , kN 2)). Moreover, using the algorithm for unknown k verbatim, we can obtain a correlation clustering algorithm for random noise model that recovers all clusters of size Ω( min(k,√n) log n (2p−1)4 ), improving over [6, 44] for k < √n log n since our ML estimate on G′ is correlation clustering. 3.3 Non-adaptive Algorithm Finally for non-adaptive querying that is when querying must be done up front we prove the following. This shows while for k = 2, nonadaptive algorithms are as powerful as adaptive algorithms, for k ≥3, substantial advantage can be gained by allowing adaptive querying. For details, see Appendix B.3 in the supplementary material. Theorem 4. • For k = 2, there exists an O(n log n) time nonadaptive algorithm that recovers the clusters with high probability with query complexity O( n log n (1−2p)4 ). For k ≥3, if R is the ratio between the maximum to minimum cluster size, then there exists a randomized nonadaptive algorithm that recovers all clusters with high probability with query complexity O( Rnk log n (1−2p)2 ). Moreover, there exists a computationally efficient algorithm for the same with query complexity O( Rnk2 log n (1−2p)4 ). • For k ≥3, if the minimum cluster size is r, then any deterministic nonadaptive algorithm must make Ω( n2 r ) queries even when query answers are perfect to recover the clusters exactly. This shows that adaptive algorithms are much more powerful than their nonadaptive counterparts. 5Fast matrix multiplication can be avoided by slightly increasing the dependency on k. 8 4 Experiments In this section, we report some experimental results on real and synthetic datasets. Real Datasets. We use the following three real datasets where the answers are generated from Amazon Mechanical Turk. • landmarks consists of images of famous landmarks in Paris and Barcelona. Since the images are of different sides and clicked at different angles, it is difficult for humans to label them correctly. It consists of 266 nodes, 12 clusters with a total of 35245 edges, out of which 3738 are intra-cluster edges [31]. • captcha consists of CAPTCHA images, each showing a four-digit number. It consists of 244 nodes, 69 clusters with a total of 29890 edges out of which only 386 are intra-cluster edges [52]. • gym contains images of gymnastics athletes, where it is very difficult to distinguish the face of the athlete, e.g. when the athlete is upside down on the uneven bars. It consists of 94 nodes, 12 clusters and 4371 edges out of which 449 are intra-cluster edges [52]. Repeating queries vs no repetition. Interestingly, we make the following observations. In landmarks dataset, when a majority vote is taken after asking each pairwise query 10 times, we get a total erroneous answers of 3696. However, just using the first crowd answer, the erroneous answers reduce to 2654. This shows that not only a simple strategy of repeating each query and taking a majority vote does not help to reduce error, in fact, it can amplify errors due to correlated answers by the crowd members. We observed the same phenomenon in the gym dataset where 449 answers are incorrect when majority voting is used over five answers for each query, compared to 310 by just using the first crowd user. For captcha, the error rate slightly decreases when using majority voting from 241 erroneous answers to 201. Figure 1: Number of Queries vs Accuracy Trade-off Synthetic Datasets. We also did experiments on the following synthetic datasets from [27]. • skew and sqrtn contain fictitious hospital patients data, including name, phone number, birth date and address. The errors are generated synthetically with error probability p = 0.2. Each of them have 900 nodes, 404550 edges. skew has 8175 intra-cluster edges, whereas sqrtn contains 13050 intra-cluster edges. Number of Queries vs Accuracy. Figure 1 plots the number of queries vs accuracy trade-off of our computationally efficient adaptive algorithm. Among the vertices that are currently clustered, we count the number of induced edges that are classified correctly and then divide it by the total number of edges in the dataset to calculate accuracy. Given the gap between maximum and minimum cluster size is significant in all real datasets, nonadaptive algorithms do not perform well. Moreover, if we select queries randomly, and look at the queried edges in each cluster, then even to achieve an intra-cluster minimum degree of two in every reasonable sized cluster, we waste a huge number queries on inter-cluster edges. While we make only 389 queries in gym to get an accuracy of 90%, the total number of random queries is 1957 considering only the clusters of size at least nine. For landmark dataset, the number of queries is about 7400 to get an accuracy of 90%, whereas the total number of random queries is 21675 considering the clusters of size at least seven. This can be easily explained by the huge discrepancy in the number of intra and inter-cluster edges where random edge querying cannot perform well. Among the edges that were mislabeled by our adaptive algorithm, 70 −90% of them are inter-cluster with very few errors in intra-cluster edges, that is the clusters returned are often superset of the original clusters. Similarly, the querying cost is also dominated by the inter-cluster edge queries. For example, out of 4339 queries issued by skew, 3844 are for inter-cluster edges. By using some side information such as a similarity matrix, a significant reduction in query complexity may be possible. 9 Acknowledgements: This work is supported in parts by NSF awards CCF 1642658, CCF 1642550, CCF 1464310, CCF 1652303, a Yahoo ACE Award and a Google Faculty Research Award. The authors are thankful to an anonymous reviewer whose comments led to many improvements in the presentation. The authors would also like to thank Sanjay Subramanian for his help with the experiments. References [1] E. Abbe, A. S. Bandeira, and G. Hall. Exact recovery in the stochastic block model. IEEE Trans. Information Theory, 62(1):471–487, 2016. [2] E. Abbe and C. Sandon. Community detection in general stochastic block models: Fundamental limits and efficient algorithms for recovery. In IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS, pages 670–688, 2015. [3] N. Ailon, Y. Chen, and H. Xu. Breaking the small cluster barrier of graph clustering. In Proceedings of the 30th International Conference on Machine Learning, ICML 2013, pages 995–1003, 2013. [4] H. Ashtiani, S. Kushagra, and S. Ben-David. Clustering with same-cluster queries. NIPS, 2016. [5] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [6] N. Bansal, A. Blum, and S. Chawla. Correlation clustering. Machine Learning, 56(1-3):89–113, 2004. [7] M. Braverman and E. Mossel. Noisy sorting without resampling. In Proceedings of the nineteenth annual ACM-SIAM symposium on Discrete algorithms, pages 268–276. Society for Industrial and Applied Mathematics, 2008. [8] M. Braverman and E. Mossel. Sorting from noisy information. CoRR, abs/0910.1191, 2009. [9] M. J. Brzozowski, T. Hogg, and G. Szabo. Friends and foes: ideological social networking. In Proceedings of the SIGCHI conference on human factors in computing systems, pages 817–820. ACM, 2008. [10] M. Burke and R. Kraut. Mopping up: modeling wikipedia promotion decisions. In Proceedings of the 2008 ACM conference on Computer supported cooperative work, pages 27–36. ACM, 2008. [11] D. Cartwright and F. Harary. Structural balance: a generalization of heider’s theory. Psychological review, 63(5):277, 1956. [12] N. Cesa-Bianchi, C. Gentile, F. Vitale, G. Zappella, et al. A correlation clustering approach to link classification in signed networks. In COLT, pages 34–1, 2012. [13] K. Chaudhuri, F. C. Graham, and A. Tsiatas. Spectral clustering of graphs with general degrees in the extended planted partition model. In COLT, pages 35–1, 2012. [14] Y. Chen, A. Jalali, S. Sanghavi, and H. Xu. Clustering partially observed graphs via convex optimization. Journal of Machine Learning Research, 15(1):2213–2238, 2014. [15] Y. Chen, G. Kamath, C. Suh, and D. Tse. Community recovery in graphs with locality. In Proceedings of The 33rd International Conference on Machine Learning, pages 689–698, 2016. [16] Y. Chen, S. Sanghavi, and H. Xu. Clustering sparse graphs. In Advances in neural information processing systems, pages 2204–2212, 2012. [17] K.-Y. Chiang, C.-J. Hsieh, N. Natarajan, I. S. Dhillon, and A. Tewari. Prediction and clustering in signed networks: a local to global perspective. Journal of Machine Learning Research, 15(1):1177–1213, 2014. 10 [18] P. Chin, A. Rao, and V. Vu. Stochastic block model and community detection in the sparse graphs: A spectral algorithm with optimal rate of recovery. arXiv preprint arXiv:1501.05021, 2015. [19] P. Christen. Data matching: concepts and techniques for record linkage, entity resolution, and duplicate detection. Springer Science and Business Media, 2012. [20] T. M. Cover and J. A. Thomas. Elements of information theory, 2nd Ed. John Wiley & Sons, 2012. [21] N. Dalvi, A. Dasgupta, R. Kumar, and V. Rastogi. Aggregating crowdsourced binary ratings. In WWW, pages 285–294, 2013. [22] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborov´a. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Physical Review E, 84(6):066106, 2011. [23] M. E. Dyer and A. M. Frieze. The solution of some random np-hard problems in polynomial expected time. Journal of Algorithms, 10(4):451–489, 1989. [24] A. K. Elmagarmid, P. G. Ipeirotis, and V. S. Verykios. Duplicate record detection: A survey. IEEE Trans. Knowl. Data Eng., 19(1):1–16, 2007. [25] U. Feige, P. Raghavan, D. Peleg, and E. Upfal. Computing with noisy information. SIAM Journal on Computing, 23(5):1001–1018, 1994. [26] I. P. Fellegi and A. B. Sunter. A theory for record linkage. Journal of the American Statistical Association, 64(328):1183–1210, 1969. [27] D. Firmani, B. Saha, and D. Srivastava. Online entity resolution using an oracle. PVLDB, 9(5):384–395, 2016. [28] L. Getoor and A. Machanavajjhala. Entity resolution: theory, practice & open challenges. PVLDB, 5(12):2018–2019, 2012. [29] A. Ghosh, S. Kale, and P. McAfee. Who moderates the moderators?: crowdsourcing abuse detection in user-generated content. In EC, pages 167–176, 2011. [30] C. Gokhale, S. Das, A. Doan, J. F. Naughton, N. Rampalli, J. Shavlik, and X. Zhu. Corleone: Hands-off crowdsourcing for entity matching. In SIGMOD Conference, pages 601–612, 2014. [31] A. Gruenheid, B. Nushi, T. Kraska, W. Gatterbauer, and D. Kossmann. Fault-tolerant entity resolution with the crowd. CoRR, abs/1512.00537, 2015. [32] B. Hajek, Y. Wu, and J. Xu. Achieving exact cluster recovery threshold via semidefinite programming: Extensions. IEEE Transactions on Information Theory, 62(10):5918–5937, 2016. [33] T. S. Han and S. Verdu. Generalizing the fano inequality. IEEE Transactions on Information Theory, 40(4):1247–1251, 1994. [34] F. Harary et al. On the notion of balance of a signed graph. The Michigan Mathematical Journal, 2(2):143–146, 1953. [35] W. Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American statistical association, 58(301):13–30, 1963. [36] P. W. Holland, K. B. Laskey, and S. Leinhardt. Stochastic blockmodels: First steps. Social networks, 5(2):109–137, 1983. [37] D. R. Karger, S. Oh, and D. Shah. Iterative learning for reliable crowdsourcing systems. In NIPS, pages 1953–1961, 2011. [38] R. Kleinberg. Lecture notes in learning, games, and electronic markets, 2007. 11 [39] C. A. Lampe, E. Johnston, and P. Resnick. Follow the reader: filtering comments on slashdot. In Proceedings of the SIGCHI conference on Human factors in computing systems, pages 1253–1262. ACM, 2007. [40] M. D. Larsen and D. B. Rubin. Iterative automated record linkage using mixture models. Journal of the American Statistical Association, 96(453):32–41, 2001. [41] J. Leskovec, D. Huttenlocher, and J. Kleinberg. Predicting positive and negative links in online social networks. In Proceedings of the 19th international conference on World wide web, pages 641–650. ACM, 2010. [42] S. H. Lim, Y. Chen, and H. Xu. Clustering from labels and time-varying graphs. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 1188–1196. Curran Associates, Inc., 2014. [43] K. Makarychev, Y. Makarychev, and A. Vijayaraghavan. Correlation clustering with noisy partial information. In Proceedings of The 28th Conference on Learning Theory, pages 1321–1342, 2015. [44] C. Mathieu and W. Schudy. Correlation clustering with noisy input. In Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2010, Austin, Texas, USA, January 17-19, 2010, pages 712–728, 2010. [45] A. Mazumdar and B. Saha. Clustering via crowdsourcing. arXiv preprint arXiv:1604.01839, 2016. [46] A. Mazumdar and B. Saha. A Theoretical Analysis of First Heuristics of Crowdsourced Entity Resolution. The Thirty-First AAAI Conference on Artificial Intelligence (AAAI-17), 2017. [47] A. Mazumdar and B. Saha. Query complexity of clustering with side information. In Advances in Neural Information Processing Systems (NIPS) 31, 2017. [48] M. Mitzenmacher and C. E. Tsourakakis. Predicting signed edges with o(n(1+ϵ)logn) queries. CoRR, abs/1609.00750, 2016. [49] E. Mossel, J. Neeman, and A. Sly. Consistency thresholds for the planted bisection model. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, pages 69–75. ACM, 2015. [50] Y. Polyanskiy and S. Verd´u. Arimoto channel coding converse and r´enyi divergence. In Communication, Control, and Computing (Allerton), 2010 48th Annual Allerton Conference on, pages 1327–1333. IEEE, 2010. [51] D. Prelec, H. S. Seung, and J. McCoy. A solution to the single-question crowd wisdom problem. Nature, 541(7638):532–535, 2017. [52] V. Verroios and H. Garcia-Molina. Entity resolution with crowd errors. In 31st IEEE International Conference on Data Engineering, ICDE 2015, Seoul, South Korea, April 13-17, 2015, pages 219–230, 2015. [53] V. Verroios, H. Garcia-Molina, and Y. Papakonstantinou. Waldo: An adaptive human interface for crowd entity resolution. In SIGMOD, pages 219–230, 2017. [54] N. Vesdapunt, K. Bellare, and N. Dalvi. Crowdsourcing algorithms for entity resolution. PVLDB, 7(12):1071–1082, 2014. [55] R. K. Vinayak and B. Hassibi. Crowdsourced clustering: Querying edges vs triangles. In Advances in Neural Information Processing Systems, pages 1316–1324, 2016. [56] J. Wang, T. Kraska, M. J. Franklin, and J. Feng. Crowder: Crowdsourcing entity resolution. PVLDB, 5(11):1483–1494, 2012. 12 | 2017 | 561 |
7,076 | Compression-aware Training of Deep Networks Jose M. Alvarez Toyota Research Institute Los Altos, CA 94022 jose.alvarez@tri.global Mathieu Salzmann EPFL - CVLab Lausanne, Switzerland mathieu.salzmann@epfl.ch Abstract In recent years, great progress has been made in a variety of application domains thanks to the development of increasingly deeper neural networks. Unfortunately, the huge number of units of these networks makes them expensive both computationally and memory-wise. To overcome this, exploiting the fact that deep networks are over-parametrized, several compression strategies have been proposed. These methods, however, typically start from a network that has been trained in a standard manner, without considering such a future compression. In this paper, we propose to explicitly account for compression in the training process. To this end, we introduce a regularizer that encourages the parameter matrix of each layer to have low rank during training. We show that accounting for compression during training allows us to learn much more compact, yet at least as effective, models than state-of-the-art compression techniques. 1 Introduction With the increasing availability of large-scale datasets, recent years have witnessed a resurgence of interest for Deep Learning techniques. Impressive progress has been made in a variety of application domains, such as speech, natural language and image processing, thanks to the development of new learning strategies [15, 53, 30, 45, 26, 3] and of new architectures [31, 44, 46, 23]. In particular, these architectures tend to become ever deeper, with hundreds of layers, each of which containing hundreds or even thousands of units. While it has been shown that training such very deep architectures was typically easier than smaller ones [24], it is also well-known that they are highly over-parameterized. In essence, this means that equally good results could in principle be obtained with more compact networks. Automatically deriving such equivalent, compact models would be highly beneficial in runtime- and memorysensitive applications, e.g., to deploy deep networks on embedded systems with limited hardware resources. As a consequence, many methods have been proposed to compress existing architectures. An early trend for such compression consisted of removing individual parameters [33, 22] or entire units [36, 29, 38] according to their influence on the output. Unfortunately, such an analysis of individual parameters or units quickly becomes intractable in the presence of very deep networks. Therefore, currently, one of the most popular compression approaches amounts to extracting low-rank approximations either of individual units [28] or of the parameter matrix/tensor of each layer [14]. This latter idea is particularly attractive, since, as opposed to the former one, it reduces the number of units in each layer. In essence, the above-mentioned techniques aim to compress a network that has been pre-trained. There is, however, no guarantee that the parameter matrices of such pre-trained networks truly have low-rank. Therefore, these methods typically truncate some of the relevant information, thus resulting in a loss of prediction accuracy, and, more importantly, do not necessarily achieve the best possible compression rates. In this paper, we propose to explicitly account for compression while training the initial deep network. Specifically, we introduce a regularizer that encourages the parameter matrix of each layer to have 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. low rank in the training loss, and rely on a stochastic proximal gradient descent strategy to optimize the network parameters. In essence, and by contrast with methods that aim to learn uncorrelated units to prevent overfitting [5, 54, 40], we seek to learn correlated ones, which can then easily be pruned in a second phase. Our compression-aware training scheme therefore yields networks that are well adapted to the following post-processing stage. As a consequence, we achieve higher compression rates than the above-mentioned techniques at virtually no loss in prediction accuracy. Our approach constitutes one of the very few attempts at explicitly training a compact network from scratch. In this context, the work of [4] has proposed to learn correlated units by making use of additional noise outputs. This strategy, however, is only guaranteed to have the desired effect for simple networks and has only been demonstrated on relatively shallow architectures. In the contemporary work [51], units are coordinated via a regularizer acting on all pairs of filters within a layer. While effective, exploiting all pairs can quickly become cumbersome in the presence of large numbers of units. Recently, group sparsity has also been employed to obtain compact networks [2, 50]. Such a regularizer, however, acts on individual units, without explicitly aiming to model their redundancies. Here, we show that accounting for interactions between the units within a layer allows us to obtain more compact networks. Furthermore, using such a group sparsity prior in conjunction with our compression-aware strategy lets us achieve even higher compression rates. We demonstrate the benefits of our approach on several deep architectures, including the 8-layers DecomposeMe network of [1] and the 50-layers ResNet of [23]. Our experiments on ImageNet and ICDAR show that we can achieve compression rates of more than 90%, thus hugely reducing the number of required operations at inference time. 2 Related Work It is well-known that deep neural networks are over-parametrized [13]. While, given sufficient training data, this seems to facilitate the training procedure, it also has two potential drawbacks. First, over-parametrized networks can easily suffer from overfitting. Second, even when they can be trained successfully, the resulting networks are expensive both computationally and memory-wise, thus making their deployment on platforms with limited hardware resources, such as embedded systems, challenging. Over the years, much effort has been made to overcome these two drawbacks. In particular, much progress has been made to reduce overfitting, for example by devising new optimization strategies, such as DropOut [45] or MaxOut [16]. In this context, other works have advocated the use of different normalization strategies, such as Batch Normalization [26], Weight Normalization [42] and Layer Normalization [3]. Recently, there has also been a surge of methods aiming to regularize the network parameters by making the different units in each layer less correlated. This has been achieved by designing new activation functions [5], by explicitly considering the pairwise correlations of the units [54, 37, 40] or of the activations [9, 52], or by constraining the weight matrices of each layer to be orthonormal [21]. In this paper, we are more directly interested in addressing the second drawback, that is, the large memory and runtime required by very deep networks. To tackle this, most existing research has focused on pruning pre-trained networks. In this context, early works have proposed to analyze the saliency of individual parameters [33, 22] or units [36, 29, 38, 34], so as to measure their impact on the output. Such a local analysis, however, quickly becomes impractically expensive when dealing with networks with millions of parameters. As a consequence, recent works have proposed to focus on more global methods, which analyze larger groups of parameters simultaneously. In this context, the most popular trend consists of extracting low-rank approximations of the network parameters. In particular, it has been shown that individual units can be replaced by rank 1 approximations, either via a post-processing step [28, 46] or directly during training [1, 25]. Furthermore, low-rank approximations of the complete parameter matrix/tensor of each layer were computed in [14], which has the benefit of reducing the number of units in each layer. The resulting low-rank representation can then be fine-tuned [32], or potentially even learned from scratch [47], given the rank of each layer in the network. With the exception of this last work, which assumes that the ranks are known, these methods, however, aim to approximate a given pre-trained model. In practice, however, the parameter matrices of this model might not have low rank. Therefore, the resulting approximations yield some loss of accuracy and, more importantly, 2 will typically not correspond to the most compact networks. Here, we propose to explicitly learn a low-rank network from scratch, but without having to manually define the rank of each layer a priori. To this end, and in contrast with the above-mentioned methods that aim to minimize correlations, we rather seek to maximize correlations between the different units within each layer, such that many of these units can be removed in a post-processing stage. In [4], additional noise outputs were introduced in a network to similarly learn correlated filters. This strategy, however, is only justified for simple networks and was only demonstrated on relatively shallow architectures. The contemporary work [51] introduced a penalty during training to learn correlated units. This, however, was achieved by explicitly computing all pairwise correlations, which quickly becomes cumbersome in very deep networks with wide layers. By contrast, our approach makes use of a low-rank regularizer that can effectively be optimized by proximal stochastic gradient descent. Our approach belongs to the relatively small group of methods that explicitly aim to learn a compact network during training, i.e., not as a post-processing step. Other methods have proposed to make use of sparsity-inducing techniques to cancel out individual parameters [49, 10, 20, 19, 35] or units [2, 50, 55]. These methods, however, act, at best, on individual units, without considering the relationships between multiple units in the same layer. Variational inference [17] has also been used to explicitly compress the network. However, the priors and posteriors used in these approaches will typically zero out individual weights. Our experiments demonstrate that accounting for the interactions between multiple units allows us to obtain more compact networks. Another line of research aims to quantize the weights of deep networks [48, 12, 18]. Note that, in a sense, this research direction is orthogonal to ours, since one could still further quantize our compact networks. Furthermore, with the recent progress in efficient hardware handling floating-point operations, we believe that there is also high value in designing non-quantized compact networks. 3 Compression-aware Training of Deep Networks In this section, we introduce our approach to explicitly encouraging compactness while training a deep neural network. To this end, we propose to make use of a low-rank regularizer on the parameter matrix in each layer, which inherently aims to maximize the compression rate when computing a low-rank approximation in a post-processing stage. In the following, we focus on convolutional neural networks, because the popular visual recognition models tend to rely less and less on fully-connected layers, and, more importantly, the inference time of such models is dominated by the convolutions in the first few layers. Note, however, that our approach still applies to fully-connected layers. To introduce our approach, let us first consider the l-th layer of a convolutional network, and denote its parameters by θl ∈RKl×Cl×dH l ×dW l , where Cl and Kl are the number of input and output channels, respectively, and dH l and dW l are the height and width of each convolutional kernel. Alternatively, these parameters can be represented by a matrix ˆθl ∈RKl×Sl with Sl = CldH l dW l . Following [14], a network can be compacted via a post-processing step performing a singular value decomposition of ˆθl and truncating the 0, or small, singular values. In essence, after this step, the parameter matrix can be approximated as ˆθl ≈UlMT l , where Ul is a Kl ×rl matrix representing the basis kernels, with rl ≤min(Kl,Sl), and Ml is an Sl ×rl matrix that mixes the activations of these basis kernels. By making use of a post-processing step on a network trained in the usual way, however, there is no guarantee that, during training, many singular values have become near-zero. Here, we aim to explicitly account for this post-processing step during training, by seeking to obtain a parameter matrix such that rl << min(Kl,Sl). To this end, given N training input-output pairs (xi,yi), we formulate learning as the regularized minimization problem min Θ 1 N N ∑ i=1 ℓ(yi, f(xi,Θ))+r(Θ) , (1) where Θ encompasses all network parameters, ℓ(·,·) is a supervised loss, such as the cross-entropy, and r(·) is a regularizer encouraging the parameter matrix in each layer to have low rank. Since explicitly minimizing the rank of a matrix is NP-hard, following the matrix completion literature [7, 6], we make use of a convex relaxation in the form of the nuclear norm. This lets us 3 write our regularizer as r(Θ) = τ L ∑ l=1 ∥ˆθl∥∗, (2) where τ is a hyper-parameter setting the influence of the regularizer, and the nuclear norm is defined as ∥ˆθl∥∗= ∑ rank( ˆθl) j=1 σ j l , with σ j l the singular values of ˆθl. In practice, to minimize (1), we make use of proximal stochastic gradient descent. Specifically, this amounts to minimizing the supervised loss only for one epoch, with learning rate ρ, and then applying the proximity operator of our regularizer. In our case, this can be achieved independently for each layer. For layer l, this proximity operator corresponds to solving θ ∗ l = argmin ¯θl 1 2ρ ∥¯θl −ˆθl∥2 F +τ∥¯θl∥∗, (3) where ˆθl is the current estimate of the parameter matrix for layer l. As shown in [6], the solution to this problem can be obtained by soft-thresholding the singular values of ˆθl, which can be written as θ ∗ l = UlΣl(ρτ)V T l , where Σl(ρτ) = diag([(σ1 l −ρτ)+,...,(σrank( ˆθl) l −ρτ)+]), (4) Ul and Vl are the left - and right-singular vectors of ˆθl, and (·)+ corresponds to taking the maximum between the argument and 0. 3.1 Low-rank and Group-sparse Layers While, as shown in our experiments, the low-rank solution discussed above significantly reduces the number of parameters in the network, it does not affect the original number of input and output channels Cl and Kl. By contrast, the group-sparsity based methods [2, 50] discussed in Section 2 cancel out entire units, thus reducing these numbers, but do not consider the interactions between multiple units in the same layer, and would therefore typically not benefit from a post-processing step such as the one of [14]. Here, we propose to make the best of both worlds to obtain low-rank parameter matrices, some of whose units have explicitly been removed. To this end, we combine the sparse group Lasso regularizer used in [2] with the low-rank one described above. This lets us re-define the regularizer in (1) as r(Θ) = L ∑ l=1 (1−α)λl p Pl Kl ∑ n=1 ∥θ n l ∥2 +αλl∥θl∥1 ! +τ L ∑ l=1 ∥ˆθl∥∗, (5) where Kl is the number of units in layer l, θ n l denotes the vector of parameters for unit n in layer l, Pl is the size of this vector (the same for all units in a layer), α ∈[0,1] balances the influence of sparsity terms on groups vs. individual parameters, and λl is a layer-wise hyper-parameter. In practice, following [2], we use only two different values of λl; one for the first few layers and one for the remaining ones. To learn our model with this new regularizer consisting of two main terms, we make use of the incremental proximal descent approach proposed in [39], which has the benefit of having a lower memory footprint than parallel proximal methods. The proximity operator for the sparse group Lasso regularizer also has a closed form solution derived in [43] and provided in [2]. 3.2 Benefits at Inference Once our model is trained, we can obtain a compact network for faster and more memory-efficient inference by making use of a post-processing step. In particular, to account for the low rank of the parameter matrix of each layer, we make use of the SVD-based approach of [14]. Specifically, for each layer l, we compute the SVD of the parameter matrix as ˆθl = ˜Ul ˜Σl ˜Vl and only keep the rl singular values that are either non-zero, thus incurring no loss, or larger than a pre-defined threshold, at some potential loss. The parameter matrix can then be represented as ˆθl = UlMl, with Ul ∈RCldH l dW l ×rl and Ml = ΣlVl ∈Rrl×Kl). In essence, every layer is decomposed into two layers. This incurs significant memory and computational savings if rl(CldH l dW l +Kl) << (CldH l dW l Kl). 4 Furthermore, additional savings can be achieved when using the sparse group Lasso regularizer discussed in Section 3.1. Indeed, in this case, the zeroed-out units can explicitly be removed, thus yielding only ˆKl filters, with ˆKl < Kl. Note that, except for the first layer, units have also been removed from the previous layer, thus reducing Cl to a lower ˆCl. Furthermore, thanks to our low-rank regularizer, the remaining, non-zero, units will form a parameter matrix that still has low rank, and can thus also be decomposed. This results in a total of rl( ˆCldH l dW l + ˆKl) parameters. In our experiments, we select the rank rl based on the percentage el of the energy (i.e., the sum of singular values) that we seek to capture by our low-rank approximation. This percentage plays an important role in the trade-off between runtime/memory savings and drop of prediction accuracy. In our experiments, we use the same percentage for all layers. 4 Experimental Settings Datasets: For our experiments, we used two image classification datasets: ImageNet [41] and ICDAR, the character recognition dataset introduced in [27]. ImageNet is a large-scale dataset comprising over 15 million labeled images split into 22,000 categories. We used the ILSVRC2012 [41] subset consisting of 1000 categories, with 1.2 million training images and 50,000 validation images. The ICDAR dataset consists of 185,639 training samples combining real and synthetic characters and 5,198 test samples coming from the ICDAR2003 training set after removing all non-alphanumeric characters. The images in ICDAR are split into 36 categories. The use of ICDAR here was motivated by the fact that it is fairly large-scale, but, in contrast with ImageNet, existing architectures haven’t been heavily tuned to this data. As such, one can expect our approach consisting of training a compact network from scratch to be even more effective on this dataset. Network Architectures: In our experiments, we make use of architectures where each kernel in the convolutional layers has been decomposed into two 1D kernels [1], thus inherently having rank-1 kernels. Note that this is orthogonal to the purpose of our low-rank regularizer, since, here, we essentially aim at reducing the number of kernels, not the rank of individual kernels. The decomposed layers yield even more compact architectures that require a lower computational cost for training and testing while maintaining or even improving classification accuracy. In the following, a convolutional layer refers to a layer with 1D kernels, while a decomposed layer refers to a block of two convolutional layers using 1D vertical and horizontal kernels, respectively, with a non-linearity and batch normalization after each convolution. Let us consider a decomposed layer consisting of C and K input and output channels, respectively. Let ¯v and ¯hT be vectors of length dv and dh, respectively, representing the kernel size of each 1D feature map. In this paper, we set dh = dv ≡d. Furthermore, let ϕ(·) be a non-linearity, and xc denote the c-th input channel of the layer. In this setting, the activation of the i-th output channel fi can be written as fi = ϕ(bh i + L ∑ l=1 ¯hT il ∗[ϕ(bv l + C ∑ c=1 ¯vlc ∗xc)]), (6) where L is the number of vertical filters, corresponding to the number of input channels for the horizontal filters, and bv l and bh l are biases. We report results with two different models using such decomposed layers: DecomposeMe [1] and ResNets [23]. In all cases, we make use of batch-normalization after each convolutional layer 1. We rely on rectified linear units (ReLU) [31] as non-linearities, although some initial experiments suggest that slightly better performance can be obtained with exponential linear units [8]. For DecomposeMe, we used two different Dec8 architectures, whose specific number of units are provided in Table 1. For residual networks, we used a decomposed ResNet-50, and empirically verified that the use of 1D kernels instead of the standard ones had no significant impact on classification accuracy. Implementation details: For the comparison to be fair, all models, including the baselines, were trained from scratch on the same computer using the same random seed and the same framework. More specifically, we used the torch-7 multi-gpu framework [11]. 1 We empirically found the use of batch normalization after each convolutional layer to have more impact with our low-rank regularizer than with group sparsity or with no regularizer, in which cases the computational cost can be reduced by using a single batch normalization after each decomposed layer. 5 1v 1h 2v 2h 3v 3h 4v 4h 5v 5h 6v 6h 7v 7h 8v 8h Dec256 8 32/11 64/11 128/5 192/5 256/3 384/3 256/3 256/3 256/3 256/3 256/3 256/3 256/3 256/3 256/3 256/3 Dec512 8 32/11 64/11 128/5 192/5 256/3 384/3 256/3 256/3 512/3 512/3 512/3 512/3 512/3 512/3 512/3 512/3 Dec512 3 48/9 96/9 160/9 256/9 512/8 512/8 – – – – – – – – – – Table 1: Different DecomposeMe architectures used on ImageNet and ICDAR. Each entry represents the number of filters and their dimension. Layer / Confλ 0 1 2 3 4 5 6 7 8 9 10 11 1v to 2h – 0.0127 0.051 0.204 0.255 0.357 0.051 0.051 0.051 0.051 0.051 0.153 3v to 8h – 0.0127 0.051 0.204 0.255 0.357 0.357 0.408 0.510 0.255 0.765 0.51 Table 2: Sparse group Lasso hyper-parameter configurations. The first row provides λ for the first four convolutional layers, while the second one shows λ for the remaining layers. The first five configurations correspond to using the same regularization penalty for all the layers, while the later ones define weaker penalties on the first two layers, as suggested in [2]. For ImageNet, training was done on a DGX-1 node using two-P100 GPUs in parallel. We used stochastic gradient descent with a momentum of 0.9 and a batch size of 180 images. The models were trained using an initial learning rate of 0.1 multiplied by 0.1 every 20 iterations for the small models (Dec256 8 in Table 1) and every 30 iterations for the larger models (Dec512 8 in Table 1). For ICDAR, we trained each network on a single TitanX-Pascal GPU for a total of 55 epochs with a batch size of 256 and 1,000 iterations per epoch. We follow the same experimental setting as in [2]: The initial learning rate was set to an initial value of 0.1 and multiplied by 0.1. We used a momentum of 0.9. For DecomposeMe networks, we only performed basic data augmentation consisting of using random crops and random horizontal flips with probability 0.5. At test time, we used a single central crop. For ResNets, we used the standard data augmentation advocated for in [23]. In practice, in all models, we also included weight decay with a penalty strength of 1e−4 in our loss function. We observed empirically that adding this weight decay prevents the weights to overly grow between every two computations of the proximity operator. In terms of hyper-parameters, for our low-rank regularizer, we considered four values: τ ∈{0,1,5,10}. For the sparse group Lasso term, we initially set the same λ to every layer to analyze the effect of combining both types of regularization. Then, in a second experiment, we followed the experimental set-up proposed in [2], where the first two decomposed layers have a lower penalty. In addition, we set α = 0.2 to favor promoting sparsity at group level rather than at parameter level. The sparse group Lasso hyper-parameter values are summarized in Table 2. Computational cost: While a convenient measure of computational cost is the forward time, this measure is highly hardware-dependent. Nowadays, hardware is heavily optimized for current architectures and does not necessarily reflect the concept of any-time-computation. Therefore, we focus on analyzing the number of multiply-accumulate operations (MAC). Let a convolution be defined as fi = ϕ(bi + ∑C j=1Wi j ∗xj), where each Wij is a 2D kernel of dimensions dH × dW and i ∈[1,...K]. Considering a naive convolution algorithm, the number of MACs for a convolutional layer is equal to PCKdhdW where P is the number of pixels in the output feature map. Therefore, it is important to reduce CK whenever P is large. That is, reducing the number of units in the first convolutional layers has more impact than in the later ones. 5 Experimental Results Parameter sensitivity and comparison to other methods on ImagNet: We first analyze the effect of our low-rank regularizer on its own and jointly with the sparse group Lasso one on MACs and accuracy. To this end, we make use of the Dec256 8 model on ImageNet, and measure the impact of varying both τ and λ in Eq. 5. Note that using τ = λ = 0 corresponds to the standard model, and τ = 0 and λ ̸= 0 to the method of [2]. Below, we report results obtained without and with the post-processing step described in Section 3.2. Note that applying such a post-processing on the standard model corresponds to the compression technique of [14]. Fig. 1 summarizes the results of this analysis. 6 (a) (b) (c) Figure 1: Parameter sensitivity for Dec256 8 on ImageNet. (a) Accuracy as a function of the regularization strength. (b) MACs directly after training. (c) MACS after the post-processing step of Section 3.2 for el = {100%,80%}. In all the figures, isolated points represent the models trained without sparse group Lasso regularizer. The red point corresponds to the baseline, where no low-rank or sparsity regularization was applied. The specific sparse group Lasso hyper-parameters for each configuration Confλ are given in Table 2. Figure 2: Effect of the low-rank regularizer on its own on Dec256 8 on ImageNet. (Left) Number of units per layer. (Right) Effective rank per layer for (top) el=100% and (bottom) el=80%. Note that, on its own, our low-rank regularizer already helps cancel out entire units, thus inherently performing model selection. In Fig. 1(a), we can observe that accuracy remains stable for a wide range of values of τ and λ. In fact, there are even small improvements in accuracy when a moderate regularization is applied. Figs. 1(b,c) depict the MACs without and with applying the post-processing step discussed in Section 3.2. As expected, the MACs decrease as the weights of the regularizers increase. Importantly, however, Figs. 1(a,b) show that several models can achieve a high compression rate at virtually no loss in accuracy. In Fig. 1(c), we provide the curves after post-processing with two different energy percentages el = {100%,80%}. Keeping all the energy tends to incur an increase in MAC, since the inequality defined in Section 3.2 is then not satisfied anymore. Recall, however, that, without post-processing, the resulting models are still more compact than and as accurate as the baseline one. With el = 80%, while a small drop in accuracy typically occurs, the gain in MAC is significantly larger. Altogether, these experiments show that, by providing more compact models, our regularizer lets us consistently reduce the computational cost over the baseline. Interestingly, by looking at the case where Confλ = 0 in Fig. 1(b), we can see that we already significantly reduce the number of operations when using our low-rank regularizer only, even without post-processing. This is due to the fact that, even in this case, a significant number of units are automatically zeroed-out. Empirically, we observed that, for moderate values of τ, the number of zeroed-out singular values corresponds to complete units going to zero. This can be observed in Fig. 2(left), were we show the number of non-zero units for each layer. In Fig. 2(right), we further show the effective rank of each layer before and after post-processing. 7 Baseline [14] [2] Ours Ours+[2] Ours+[2] hyper-params – el = 90% – τ = 15,el = 90% τ = 15,el = 90% τ = 15,el = 100% # Params 3.7M 3.6M 525K 728K 318K 454K top-1 88.6% 88.5% 89.6% 88.8% 89.7% 90.5% Table 3: Comparison to other methods on ICDAR. Low-Rank appx. no SVD Imagenet Top-1 Params MAC Params MAC Dec512 8 -el=80% 66.8 -53.5 -46.2 -39.5 -25.3 Dec512 8 -el=100% 67.6 -21.1 -4.8 -39.5 -25.3 Low-Rank appx. no SVD ICDAR Top-1 Params MAC Params MAC Dec512 3 -el=80% 89.6 -91.9 -92.9 -89.2 -81.6 Dec512 3 -el=100% 90.8 -85.3 -86.8 -89.2 -81.6 Table 4: Accuracy and compression rates for Dec512 8 models on ImageNet (left) and Dec512 3 on ICDAR (right). The number of parameters and MACs are given in % relative to the baseline model (i.e., without any regularizer). A negative value indicates reduction with respect to the baseline. The accuracy of the baseline is 67.0 for ImageNet and 89.3 for ICDAR. el = 80% el = 100% no SVD baseline (τ = 0) Dec256 8 -τ = 1 97.33 125.44 94.60 94.70 Dec256 8 -τ = 5 88.33 119.27 90.55 94.70 Dec256 8 -τ = 10 85.78 110.35 91.36 94.70 Table 5: Forward time in milliseconds (ms) using a Titan X (Pascal). We report the average over 50 forward passes using a batch size of 256. A large batch size minimizes the effect of memory overheads due to non-hardware optimizations. Comparison to other approaches on ICDAR: We now compare our results with existing approaches on the ICDAR dataset. As a baseline, we consider the Dec512 3 trained using SGD and L2 regularization for 75 epochs. For comparison, we consider the post-processing approach in [14] with el = 90%, the group-sparsity regularization approach proposed in [2] and three different instances of our model. First, using τ = 15, no group-sparsity and el = 90%. Then, two instances combining our low-rank regularizer with group-sparsity (Section 3.1) with el = 90% and el = 100%. In this case, the models are trained for 55 epochs and then reloaded and fine tuned for 20 more epochs. Table 3 summarizes these results. The comparison with [14] clearly evidences the benefits of our compression-aware training strategy. Furthermore, these results show the benefits of further combining our low-rank regularizer with the groups-sparsity one of [2]. In addition, we also compare our approach with L1 and L2 regularizers on the same dataset and with the same experimental setup. Pruning the weights of the baseline models with a threshold of 1e−4 resulted in 1.5M zeroed-out parameters for the L2 regularizer and 2.8M zeroed-out parameters for the L1 regularizer. However, these zeroed out weights are sparsely located within units (neurons). Applying our post-processing step (low-rank approximation with el = 100%) to these results yielded models with 3.6M and 3.2M parameters for L2 and L1 regularizers, respectively. The top-1 accuracy for these two models after post-processing was 87% and 89%, respectively. Using a stronger L1 regularizer resulted in lower top-1 accuracy. By comparison, our approach yields a model with 3.4M zeroed-out parameters after post-processing and a top-1 accuracy of 90%. Empirically, we found the benefits of our approach to hold for varying regularizer weights. Results with larger models: In Table 4, we provide the accuracies and MACs for our approach and the baseline on ImageNet and ICDAR for Dec512 8 models. Note that using our low-rank regularizer yields more compact networks than the baselines for similar or higher accuracies. In particular, for ImageNet, we achieve reductions in parameter number of more than 20% and more than 50% for el = 100% and el = 80%, respectively. For ICDAR, these reductions are around 90% in both cases. We now focus on our results with a ResNet-50 model on ImageNet. For post-processing we used el = 90% for all these experiments which resulted in virtually no loss of accuracy. The baseline corresponds to a top-1 accuracy of 74.7% and 18M parameters. Applying the post-processing step on this baseline resulted in a compression rate of 4%. By contrast, our approach with low-rank yields a top-1 accuracy of 75.0% for a compression rate of 20.6%, and with group sparsity and low-rank 8 Epoch Num. parameters accuracy Total reload Total no SVD top-1 train-time Baseline – 3.7M – 88.4% 1.69h r5 5 3.2M 3.71M 89.8% 1.81h r15 15 210K 2.08M 90.0% 0.77h r25 25 218K 1.60M 90.0% 0.88h r35 35 222K 1.52M 89.0% 0.99h r45 45 324K 1.24M 90.1% 1.12h r55 55 388K 1.24M 89.2% 1.26h r65 65 414K 1.23M 87.7% 1.36h Figure 3: Forward-Backward training time in milliseconds when varying the reload epoch for Dec512 3 on ICDAR. (Left) Forward-backward time per batch in milliseconds (with a batch size of 32). (Right) Summary of the results of each experiment. Note that we could reduce the training time from 1.69 hours (baseline) to 0.77 hours by reloading the model at the 15th epoch. This corresponds to a relative training-time speed up of 54.5% and yields a 2% improvement in top-1 accuracy. jointly, a top-1 accuracy of 75.2% for a compression rate of 27%. By comparison, applying [2] to the same model yields an accuracy of 74.5% for a compression rate of 17%. Inference time: While MACs represent the number of operations, we are also interested in the inference time of the resulting models. Table 5 summarizes several representative inference times for different instances of our experiments. Interestingly, there is a significant reduction in inference time when we only remove the zeroed-out neurons from the model. This is a direct consequence of the pruning effect, especially in the first layers. However, there is no significant reduction in inference time when post-processing our model via a low-rank decomposition. The main reason for this is that modern hardware is designed to compute convolutions with much fewer operations than a naive algorithm. Furthermore, the actual computational cost depends not only on the number of floating point operations but also on the memory bandwidth. In modern architectures, decomposing a convolutional layer into a convolution and a matrix multiplication involves (with current hardware) additional intermediate computations, as one cannot reuse convolutional kernels. Nevertheless, we believe that our approach remains beneficial for embedded systems using customized hardware, such as FPGAs. Additional benefits at training time: So far, our experiments have demonstrated the effectiveness of our approach at test time. Empirically, we found that our approach is also beneficial for training, by pruning the network after only a few epochs (e.g., 15) and reloading and training the pruned network, which becomes much more efficient. Specifically, Table 3 summarizes the effect of varying the reload epoch for a model relying on both low-rank and group-sparsity. We were able to reduce the training time (with a batch size of 32 and training for 100 epochs) from 1.69 to 0.77 hours (relative speedup of 54.5%). The accuracy also improved by 2% and the number of parameters reduced from 3.7M (baseline) to 210K (relative 94.3% reduction). We found this behavior to be stable across a wide range of regularization parameters. If we seek to maintain accuracy compared to the baseline, we found that we could achieve a compression rate of 95.5% (up to 96% for an accuracy drop of 0.5%), which corresponds to a training time reduced by up to 60%. 6 Conclusion In this paper, we have proposed to explicitly account for a post-processing compression stage when training deep networks. To this end, we have introduced a regularizer in the training loss to encourage the parameter matrix of each layer to have low rank. We have further studied the case where this regularizer is combined with a sparsity-inducing one to achieve even higher compression. Our experiments have demonstrated that our approach can achieve higher compression rates than state-ofthe-art methods, thus evidencing the benefits of taking compression into account during training. The SVD-based technique that motivated our approach is only one specific choice of compression strategy. In the future, we will therefore study how regularizers corresponding to other such compression mechanisms can be incorporated in our framework. 9 References [1] J. M. Alvarez and L. Petersson. Decomposeme: Simplifying convnets for end-to-end learning. CoRR, abs/1606.05426, 2016. [2] J. M. Alvarez and M. Salzmann. Learning the number of neurons in neural networks. In NIPS, 2016. [3] L. J. Ba, R. Kiros, and G. E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016. [4] M. Babaeizadeh, P. Smaragdis, and R. H. Campbell. Noiseout: A simple way to prune neural networks. In emdnn Nips workshops, 2016. [5] Y. Bengio and J. S. Bergstra. Slow, decorrelated features for pretraining complex cell-like networks. In NIPS, pages 99–107. 2009. [6] J.-F. Cai, E. J. Candès, and Z. Shen. A singular value thresholding algorithm for matrix completion. SIAM J. on Optimization, 20(4):1956–1982, Mar. 2010. [7] E. J. Candès and B. Recht. Exact matrix completion via convex optimization. CoRR, abs/0805.4471, 2008. [8] D. Clevert, T. Unterthiner, and S. Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). CoRR, abs/1511.07289, 2015. [9] M. Cogswell, F. Ahmed, R. Girshick, L. Zitnick, and D. Batra. Reducing overfitting in deep networks by decorrelating representations. In ICLR, 2016. [10] M. D. Collins and P. Kohli. Memory Bounded Deep Convolutional Networks. In CoRR, volume abs/1412.1442, 2014. [11] R. Collobert, K. Kavukcuoglu, and C. Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, 2011. [12] M. Courbariaux and Y. Bengio. Binarynet: Training deep neural networks with weights and activations constrained to +1 or -1. CoRR, abs/1602.02830, 2016. [13] M. Denil, B. Shakibi, L. Dinh, M. Ranzato, and N. de Freitas. Predicting parameters in deep learning. CoRR, abs/1306.0543, 2013. [14] E. L. Denton, W. Zaremba, J. Bruna, Y. LeCun, and R. Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In NIPS. 2014. [15] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Technical Report UCB/EECS-2010-24, EECS Department, University of California, Berkeley, Mar 2010. [16] I. J. Goodfellow, D. Warde-farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In ICML, 2013. [17] A. Graves. Practical variational inference for neural networks. In NIPS, 2011. [18] S. Gupta, A. Agrawal, K. Gopalakrishnan, and P. Narayanan. Deep learning with limited numerical precision. CoRR, abs/1502.02551, 2015. [19] S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. ICLR, 2016. [20] S. Han, J. Pool, J. Tran, and W. Dally. Learning both weights and connections for efficient neural network. In NIPS, 2015. [21] M. Harandi and B. Fernando. Generalized backpropagation, étude de cas: Orthogonality. CoRR, abs/1611.05927, 2016. [22] B. Hassibi, D. G. Stork, and G. J. Wolff. Optimal brain surgeon and general network pruning. In ICNN, 1993. 10 [23] K. He, X. Zhang, S. Ren, and J. Sun. Deep Residual Learning for Image Recognition. In CoRR, volume abs/1512.03385, 2015. [24] V. O. Hinton, G. E. and J. Dean. Distilling the knowledge in a neural network. In arXiv, 2014. [25] Y. Ioannou, D. P. Robertson, J. Shotton, R. Cipolla, and A. Criminisi. Training cnns with low-rank filters for efficient image classification. CoRR, abs/1511.06744, 2015. [26] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. CoRR, 2015. [27] M. Jaderberg, A. Vedaldi, and Zisserman. Deep features for text spotting. In ECCV, 2014. [28] M. Jaderberg, A. Vedaldi, and A. Zisserman. Speeding up convolutional neural networks with low rank expansions. In British Machine Vision Conference, 2014. [29] C. Ji, R. R. Snapp, and D. Psaltis. Generalizing smoothness constraints from discrete samples. Neural Computation, 2(2):188–197, June 1990. [30] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [31] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [32] V. Lebedev, Y. Ganin, M. Rakhuba, I. V. Oseledets, and V. S. Lempitsky. Speeding-up convolutional neural networks using fine-tuned cp-decomposition. CoRR, abs/1412.6553, 2014. [33] Y. LeCun, J. S. Denker, S. Solla, R. E. Howard, and L. D. Jackel. Optimal brain damage. In NIPS, 1990. [34] B. Liu, M. Wang, H. Foroosh, M. Tappen, and M. Penksy. Sparse convolutional neural networks. In CVPR, 2015. [35] P. Molchanov, S. Tyree, T. Karras, T. Aila, and J. Kautz. Pruning convolutional neural networks for resource efficient transfer learning. CoRR, abs/1611.06440, 2016. [36] M. Mozer and P. Smolensky. Skeletonization: A technique for trimming the fat from a network via relevance assessment. In NIPS, 1988. [37] H. Pan and H. Jiang. Learning convolutional neural networks using hybrid orthogonal projection and estimation. CoRR, abs/1606.05929, 2016. [38] R. Reed. Pruning algorithms-a survey. IEEE Transactions on Neural Networks, 4(5):740–747, Sep 1993. [39] E. Richard, P. andre Savalle, and N. Vayatis. Estimation of simultaneously sparse and low rank matrices. In ICML, 2012. [40] P. Rodrıguez, J. Gonzalez, G. Cucurull, and J. M. G. andXavier Roca. Regularizing cnns with locally constrained decorrelations. In ICLR, 2017. [41] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. S. Bernstein, A. C. Berg, and F.-F. Li. Imagenet large scale visual recognition challenge. CoRR, abs/1409.0575, 2014. [42] T. Salimans and D. P. Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. CoRR, abs/1602.07868, 2016. [43] N. Simon, J. Friedman, T. Hastie, and R. Tibshirani. A sparse-group lasso. Journal of Computational and Graphical Statistics, 2013. [44] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. 11 [45] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15:1929–1958, 2014. [46] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015. [47] C. Tai, T. Xiao, X. Wang, and W. E. Convolutional neural networks with low-rank regularization. CoRR, abs/1511.06067, 2015. [48] K. Ullrich, E. Meeds, and M. Welling. Soft weight-sharing for neural network compression. CoRR, abs/1702.04008, 2016. [49] A. S. Weigend, D. E. Rumelhart, and B. A. Huberman. Generalization by weight-elimination with application to forecasting. In NIPS, 1991. [50] W. Wen, C. Wu, Y. Wang, Y. Chen, and H. Li. Learning structured sparsity in deep neural networks. In NIPS, 2016. [51] W. Wen, C. Xu, C. Wu, Y. Wang, Y. Chen, and H. Li. Coordinating filters for faster deep neural networks. CoRR, abs/1703.09746, 2017. [52] W. Xiong, B. Du, L. Zhang, R. Hu, and D. Tao. Regularizing deep convolutional neural networks with a structured decorrelation constraint. In IEEE Int. Conf. on Data Mining (ICDM), 2016. [53] M. D. Zeiler. ADADELTA: an adaptive learning rate method. CoRR, abs/1212.5701, 2012. [54] S. Zhang and H. Jiang. Hybrid orthogonal projection and estimation (HOPE): A new framework to probe and learn neural networks. CoRR, abs/1502.00702, 2015. [55] H. Zhou, J. M. Alvarez, and F. Porikli. Less is more: Towards compact cnns. In ECCV, 2006. 12 | 2017 | 562 |
7,077 | Maxing and Ranking with Few Assumptions Moein Falahatgar Yi Hao Alon Orlitsky Venkatadheeraj Pichapati Vaishakh Ravindrakumar University of California, San Deigo {moein,yih179,alon,dheerajpv7,vaishakhr}@ucsd.edu Abstract PAC maximum selection (maxing) and ranking of n elements via random pairwise comparisons have diverse applications and have been studied under many models and assumptions. With just one simple natural assumption: strong stochastic transitivity, we show that maxing can be performed with linearly many comparisons yet ranking requires quadratically many. With no assumptions at all, we show that for the Borda-score metric, maximum selection can be performed with linearly many comparisons and ranking can be performed with O(nlog n) comparisons. 1 Introduction 1.1 Motivation Maximum selection (maxing) and sorting using pairwise comparisons are among the most practical and fundamental algorithmic problems in computer science. As is well-known, maxing requires n −1 comparisons, while sorting takes ⇥(nlog n) comparisons. The probabilistic version of this problem, where comparison outcomes are random, is of significant theoretical interest as well, and it too arises in many applications and diverse disciplines. In sports, pairwise games with random outcomes are used to determine the best, or the order, of teams or players. Similarly Trueskill [1] matches video gamers to create their ranking. It is also used for a variety of online applications such as to learn consumer preferences with the popular A/B tests, in recommender systems [2], for ranking documents from user clickthrough data [3, 4], and more. The popular crowd sourcing website GIFGIF [5] shows how pairwise comparisons can help associate emotions with many animated GIF images. Visitors are presented with two images and asked to select the one that better corresponds to a given emotion. For these reasons, and because of its intrinsic theoretical interest, the problem received a fair amount of attention. 1.2 Terminology and previous results One of the first studies in the area, [6] assumed n totally-ordered elements, where each comparison errs with the same, known, probability ↵< 1 2. It presented a maxing algorithm that uses O( n ↵2 log 1 δ ) comparisons to output the maximum with probability ≥1 −δ, and a ranking algorithm that uses O( n ↵2 log n δ ) comparisons to output the ranking with probability ≥1 −δ. These results have been and continue to be of great interest. Yet this model has two shortcomings. It assumes that there is only one random comparison probability, ↵, and that its value is known. In practice, comparisons have different, and arbitrary, probabilities, and they are not known in advance. To address more realistic scenarios, researchers considered more general probabilistic models. Consider a set of n elements, without loss of generality [n] def= {1,2,...,n}. A probabilistic model, or model for short, is an assignment of a preference probability pi,j ∈[0,1] for every i ≠j ∈ [n], reflecting the probability that i is preferred when compared with j. We assume that repeated comparisons are independent and that there are no “draws”, hence pj,i = 1 −pi,j. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. If pi,j ≥1 2, we say that i is preferable to j and write i ≥j. Element i is maximal in a model if i ≥j for all j ≠i. And a permutation `1,...,`n is a ranking if `i ≥`j for all i ≤j. Observe that the first element of any ranking is always maximal. For example, for n = 3, p1,2 = 12, p1,3 = 13, and p2,3 = 23, we have 1 ≥2, 2 ≥1, 3 ≥1, and 2 ≥3. Hence 2 is the unique maximum, and 2,3,1 is the unique ranking. We seek algorithms that without knowing the underlying model, use pairwise comparisons to find a maximal element and a ranking. Two concerns spring to mind. First, there may be two elements i,j with pi,j arbitrarily close to half, requiring arbitrarily many comparisons just to determine which is preferable to the other. This concern has a common remedy, that we also adopt. The PAC paradigm, e.g. [7, 8], that requires the algorithm’s output to be only Probably Approximately Correct. Let ˜pi,j def= pi,j −1 2 be the centered preference probability. Note that ˜pi,j ≥0 iff i is preferable to j. If ˜pi,j ≥−✏we say that i is ✏-preferable to j. For 0 < ✏< 12, an element i ∈[n] is ✏-maximum if it is ✏-preferable to all other elements, namely, ˜pi,j ≥−✏∀j ≠i. Given ✏> 0, 1 2 ≥δ > 0, a PAC maxing algorithm must output an ✏-maxima with probability ≥1 −δ, henceforth abbreviated with high probability (WHP). Similarly, a permutation `1,...,`n of {1,...,n} is an ✏-ranking if `i is ✏-preferable to `j for all i ≤j, and a PAC ranking algorithm must output an ✏-ranking WHP. Note that in this paper, we consider δ ≤1 2, the more practical regime. For larger values of δ, one can use our algorithms with δ = 1 2. The second concern is that not all models have a ranking, or even a maximal element. For example, for p1,2 = p2,3 = p3,1 = 1, or the more opaque yet interesting non-transitive coins [9], each element is preferable to the cyclically next, hence there is no maximal element and no ranking. A standard approach, that again we too will adopt, to address this concern is to consider structured models. The simplest may be parametric models, of which one of the more common is Placket Luce (PL) [10, 11], where each element i is associated with an unknown positive number ai and pi,j = ai ai+aj . [12] derived a PAC maxing algorithm that uses O( n ✏2 log n ✏δ) comparisons and a PAC ranking algorithm that uses O( n ✏2 log nlog n ✏δ) comparisons for any PL model. Related results for the Mallows model under a non-PAC paradigm were derived by [13]. But significantly more general, and more realistic, non-parametric, models may also have maxima and rankings. A model is strongly stochastically transitive (SST), if i ≥j and j ≥k imply pi,k ≥max(pi,j,pj,k). By simple induction, every SST model has a maximum element and a ranking. And one additional property, that is perhaps more difficult to justify, has proved helpful in constructing maxing and sorting PAC algorithms. A tournament satisfies the stochastic triangle inequality if i ≥j and j ≥k imply that ˜pi,k ≤˜pi,j + ˜pj,k. In Section 4 we show that if a model has a ranking, then an ✏-ranking can be found WHP via O( n2 ✏2 log n δ ) comparisons. For all models that satisfy both SST and triangle inequality, [7] derived a PAC maxing algorithm that uses O( n ✏2 log n ✏δ) comparisons. [14] eliminated the log n ✏factor and showed that On ✏2 log 1 δ comparisons suffice and are optimal, and constructed a nearly-optimal PAC ranking algorithm that uses O( n log n(log log n)3 ✏2 ) comparisons for all δ ≥ 1 n, off by a factor of O((log log n)3) from optimum. Lower-bounds follow from an analogy to [15, 6]. Observe that since the PL model satisfies both SST and triangle inequality, these results also improve the corresponding PL results. Finally, we consider models that are not SST, or perhaps don’t have maximal elements, rankings, or even their ✏-equivalents. In all these cases, one can apply a weaker order relation. The Borda score s(i) def= 1 n ∑j pi,j is the probability that i is preferable to another, randomly selected, element. Element i is Borda maximal if s(i) = maxj s(j), and ✏-Borda maximal if s(i) ≥maxj s(j) −✏. A PAC Borda-maxing algorithm outputs an ✏-Borda maximal element WHP (with probability ≥1−δ). Similarly, a Borda ranking is a permutation i1,...,in such that for all 1 ≤j ≤n−1, s(ij) ≥s(ij+1). An ✏-Borda ranking is a permutation where for all 1 ≤j ≤k ≤n, s(ij) ≥s(ik) −✏. A PAC Borda-ranking algorithm outputs an ✏-Borda ranking WHP. Recall that Borda scores apply to all models. As noted in [16, 17, 8, 18] considering elements with nearly identical Borda scores shows that exact Borda-maxing and ranking requires arbitrarily many comparisons. [8] derived a PAC Borda ranking, and therefore also maxing, algorithms that use 2 O( n2 ✏2 ) comparisons. [19] derived a O( n log n ✏2 log( n δ )) PAC Borda ranking algorithm for restricted setting. However note that several simple models, including p1,2 = p2,3 = p3,1 = 1 do not belong to this model. [20, 21, 22] considered deterministic adversarial versions of this problem that has applications in [23]. Finally, we note that all our algorithms are adaptive, where each comparison is chosen based on the outcome of previous comparisons. Non-adaptive algorithms were discussed in [24, 25, 26, 27]. 2 Results and Outline Our goal is to find the minimal assumptions that enable efficient algorithms for these problems. In particular, we would like to see if we can eliminate the somewhat less-natural triangle inequality. With two algorithmic problems: maxing and ranking, and one property–SST and one special metric– Borda scores, the puzzle consists of four main questions. 1) With just SST (and no triangle inequality) are there: a) PAC maxing algorithms with O(n) comparisons? b) PAC ranking algorithms with near O(nlog n) comparisons? 2) With no assumptions at all, but for the Borda-score metric, are there: a) PAC Borda-maxing algorithms with O(n) comparisons? b) PAC Borda-ranking algorithms with near O(nlog n) comparisons? We essentially resolve all four questions. 1a) Yes. In Section 3, Theorem 6, we use SST alone to derive a On ✏2 log 1 δ comparisons PAC maxing algorithm. Note that this is the same complexity as with triangle inequality, and it matches the lower bound. 1b) No. In Section 4, Theorem 7, we show that there are SST models where any PAC ranking algorithm with ✏≤14 requires ⌦(n2) comparisons. This is significantly higher than the roughly O(nlog n) comparisons needed with triangle inequality, and is close to the O(n2 log n) comparisons required without any assumptions. 2a) Yes. In Section 5, Theorem 8, we derive a PAC Borda maxing algorithm that without any model assumptions requires On ✏2 log 1 δ comparisons which is order optimal. 2b) Yes. In Section 5, Theorem 9, we derive a PAC Borda ranking algorithm that without any model assumptions requires On ✏2 log n δ comparisons. Beyond the theoretical results sections, in Section 6, we provide experiments on simulated data. In Section 7, we discuss the results. 3 Maxing 3.1 SEQ-ELIMINATE Our main building block is a simple, though sub-optimal, algorithm SEQ-ELIMINATE that sequentially eliminates one element from input set to find an ✏-maximum under SST. SEQ-ELIMINATE uses On ✏2 log n δ comparisons and w.p.≥1−δ, finds an ✏-maximum. Even for simpler models [15] we know that an algorithm needs ⌦n ✏2 log 1 δ comparisons to find an ✏-maximum w.p.≥1 −δ. Hence the number of comparisons used by SEQ-ELIMINATE is optimal up to a constant factor when δ ≤1 n but can be log n times the lower bound for δ = 1 2. By SST, any element that is ✏-preferable to absolute maximum element of S is an ✏-maximum of S. Therefore if we can reduce S to a subset S′ of size O( n log n) that contains an absolute maximum of S using On ✏2 log 1 δ comparisons, we can then use SEQ-ELIMINATE to find an ✏-maximum of S′ and the number of comparisons is optimal up to constants. We provide one such reduction in subsection 3.2. Sequential elimination techniques have been used before [13] to find an absolute maximum. In such approaches, a running element is maintained, and is compared and replaced with a competing element in S if the latter is found to be better with confidence ≥1 −δn. Note that if the running and competing elements are close to each other, this technique can take an arbitrarily long time to declare the winner. But since we are interested in finding only an ✏-maximum, SEQ-ELIMINATE circumvents this issue. We later show that SEQ-ELIMINATE needs to update the running element r with the competing element c if ˜pc,r ≥✏and retain r if ˜pc,r ≤0. If 0 < ˜pc,r < ✏, replacing or 3 retaining r doesn’t affect the performance of SEQ-ELIMINATE significantly. Thus, in other words we’ve reduced the problem to testing whether ˜pc,r ≤0 or ˜pc,r ≥✏. Assuming that testing problem always returns the right answer, since SEQ-ELIMINATE never replaces the running element with a worse element, either the output is the absolute maximum b∗or b∗ is never the running element. If b∗is eliminated against running element r then ˜pb∗,r ≤✏and hence r is an ✏-maximum and since the running element only gets better, the output is an ✏-maximum. We first present a testing procedure COMPARE that we use to update the running element in SEQELIMINATE. 3.1.1 COMPARE COMPARE(i,j,✏l,✏u,δ) takes two elements i and j, and two biases ✏u > ✏l, and with confidence ≥1 −δ, determines whether ˜pi,j is ≤✏l or ≥✏u. For this, COMPARE compares the two elements 2(✏u −✏l)2 log(2δ) times. Let ˆpi,j be the fraction of times i beats j, and let ˆ˜pi,j def= ˆpi,j −1 2. If ˆ˜pi,j < (✏l + ✏u)2, COMPARE declares ˜pi,j ≤✏l (returns 1), and otherwise it declares ˜pi,j ≥✏u (returns 2). Due to lack of space, we present the algorithm COMPARE in Appendix A.1 along with certain improvements for better performance in practice . In the Lemma below, we bound the number of comparisons used by COMPARE and prove its correctness. Proof is in A.2. Lemma 1. For ✏u > ✏l, COMPARE(i,j,✏l,✏u,δ) uses ≤ 2 (✏u−✏l)2 log 2 δ comparisons and if ˜pi,j ≤✏l, then w.p.≥1 −δ, it returns 1, else if ˜pi,j ≥✏u, w.p.≥1 −δ, it returns 2. Now we present SEQ-ELIMINATE that uses the testing subroutine COMPARE and finds an ✏maximum. 3.1.2 SEQ-ELIMINATE Algorithm SEQ-ELIMINATE takes a variable set S, selects a random running element r ∈S and repeatedly uses COMPARE(c,r,0,✏,δn) to compare r to a random competing element c ∈S r. If COMPARE returns 1 i.e., deems ˜pc,r ≤0, it retains r as the running element and eliminates c from S, but if COMPARE returns 2 i.e., deems ˜pc,r ≥✏, it eliminates r from S and updates c as the new running element. Algorithm 1 SEQ-ELIMINATE 1: inputs 2: Set S, bias ✏, confidence δ 3: n ←S 4: r ←a random c ∈S, S = S {r} 5: while S ≠do 6: Pick a random c ∈S, S = S {c}. 7: if COMPARE(c,r,0,✏, δ n) = 2 then 8: r ←c 9: end if 10: end while 11: return r We now bound the number of comparisons used by SEQ-ELIMINATE(S,✏,δ) and prove its correctness. Proof is in A.3. Theorem 2. SEQ-ELIMINATE(S,✏,δ) uses OS ✏2 log S δ comparisons, and w.p.≥1 −δ outputs an ✏-maximum. 4 3.2 Reduction Recall that, for δ ≤ 1 n, SEQ-ELIMINATE is order-wise optimal. For δ ≥ 1 n, here we present a reduction procedure that uses On ✏2 log 1 δ comparisons and w.p.≥1 −δ, outputs a subset S′ of size O(√nlog n) and an element a such that either a is a 2✏3-maximum or S′ contains an absolute maximum of S. Combining the reduction with SEQ-ELIMINATE results in an order-wise optimal algorithm. We form the reduced subset S′ by pruning S. We compare each element e ∈S with an anchor element a, test whether ˜pe,a ≤0 or ˜pe,a ≥2✏3 using COMPARE, and retain all elements e for which COMPARE returns the second hypothesis. For S′ to be of size O(√nlog n) we’d like to pick an anchor element that is among the top O(√nlog n) elements. But this can be computationally hard and we show that it suffices to pick an anchor that is not ✏3-preferable to at most O(√nlog n) elements in S. An element a is called an (✏,n′)-good anchor if a is not ✏-preferable to at most n′ elements, i.e., {e ∶e ∈S and ˜pe,a > ✏}≤n′. We now present the subroutine PICK-ANCHOR that finds a good anchor element. 3.2.1 Picking Anchor Element PICK-ANCHOR(S,n′,✏,δ) uses O n n′✏2 log 1 δ log n n′δcomparisons and w.p.≥1 −δ, outputs an (✏,n′)-good anchor element. PICK-ANCHOR first picks randomly a set Q of n n′ log 2 δ elements from S without replacement. This ensures that w.p.≥1 −δ, Q contains at least one of the top n′ elements. We then use SEQ-ELIMINATE to find an ✏-maximum of Q. Let the absolute maximum element of Q be denoted as q∗. Now an ✏-maximum of Q is ✏-preferable to q∗. Further, if Q contains an element in the top n′ elements, there exists n −n′ elements worse than q∗in S. Thus by SST, the ✏-maximum of Q is also ✏-preferable to these n −n′ elements and hence the output of PICK-ANCHOR is an (✏,n′)-good anchor element. PICK-ANCHOR is shown in appendix A.4 We now bound the number of comparisons used by PICK-ANCHOR and prove its correctness. Proof is in A.5. Lemma 3. PICK-ANCHOR(S,n′,✏,δ) uses O n n′✏2 log 1 δ log n n′δcomparisons and w.p.≥1 −δ, outputs an (✏,n′)-good anchor element. Remark 4. Note that PICK-ANCHOR(S,cn,✏,δ) uses Oc1 ✏2 log 1 δ 2comparisons where the constant depends only on c but not on n. Hence it is advantageous to use this method to pick nearmaximum element when n is large. We now present PRUNE that takes an anchor element as input and prunes the set S using the anchor. 3.2.2 Pruning Given an (✏l,n′)-good anchor element a, w.p.≥1 −δ2, PRUNE(S,a,n′,✏l,✏u,δ) outputs a subset S′ of size ≤2n′. Further, any element e that is at least ✏u-better than a i.e., ˜pe,a ≥✏u is in S′ w.p.≥1 −δ2. PRUNE prunes S in multiple rounds. In each round t, for every element e in S, PRUNE tests whether ˜pe,a ≤✏l or ˜pe,a ≥✏u using COMPARE(e,a,✏l,✏u,δ2t+1) and eliminates e if the first hypothesis i.e., ˜pe,a ≤✏l is returned. By Lemma 1, an element e that is ✏u better than a i.e., ˜pe,a ≥✏u passes the tth round of pruning w.p.≥1 −δ2t+1. Thus by union bound, the probability that such an element is not present in the pruned set is ≤∑∞ t=1 δ2t+1 ≤δ2. Now for element e that is not ✏l-better than a i.e., ˜pe,a ≤✏l, by Lemma 1, the first hypothesis is returned w.p.≥1 −δ4. Hence w.h.p., the number of such elements (not ✏l-better elements) is reduced by a factor of δ after each round. Since a is an (✏l,n′)-good anchor element, there are at most n′ elements atleast ✏l-better than a. Thus the number of elements left in the pruned set after round t is at most n′ + nδt. Thus PRUNE succeeds eventually in reducing the size to ≤2n′ (in ≤log1δ n n′ rounds). 5 Algorithm 2 PRUNE 1: inputs 2: Set S, element a, size n′, lower bias ✏l, upper bias ✏u, confidence δ. 3: t ←1 4: S1 ←S 5: while St> 2n′ and t < log2 n do 6: Initialize: Qt ← 7: for e in St do 8: if COMPARE(e,a,✏l,✏u,δ2t+1) = 1 then 9: Qt ←Qt {e} 10: end if 11: end for 12: St+1 ←St Qt 13: t ←t + 1 14: end while 15: return St. We now bound the number of comparisons used by PRUNE and prove its correctness. Proof is in A.6. Lemma 5. If n′ ≥√6nlog n, δ ≥1 n and a is an (✏l,n′)-good anchor element, then w.p.≥1 −δ 2, PRUNE(S,a,n′,✏l,✏u,δ) uses O n (✏u−✏l)2 log 1 δ comparisons and outputs a set of size less than 2n′. Further if a is not an ✏u-maximum of S then w.p.≥1 −δ 2, the output set contains an absolute maximum element of S. 3.3 Full Algorithm We now present the main algorithm, OPT-MAXIMIZE that w.p.≥1−δ, uses On ✏2 log 1 δ comparisons and outputs an ✏-maximum. For δ ≤1 n, SEQ-ELIMINATE uses O( n ✏2 log 1 δ ) comparisons and hence we directly use SEQ-ELIMINATE. Below we assume δ > 1 n. Here OPT-MAXIMIZE first finds an (✏3,√6nlog n)-good anchor element a using PICK-ANCHOR(S,√6nlog n,✏3, δ 4). Then using PRUNE(S,a,√6nlog n,✏3,2✏3, δ 4) with a, OPT-MAXIMIZE prunes S to a subset S′ of size ≤2√6nlog n such that if a is not a 2✏3 maximum i.e. ˜pb∗,a > 2✏3, S′ contains the absolute maximum b∗w.p.≥1 −δ2. OPT-MAXIMIZE then checks if a is a 2✏3 maximum by using COMPARE(e,a,2✏3,✏,δ(4n)) for every element e ∈S′. If COMPARE returns first hypothesis for every e ∈S′ then OPT-MAXIMIZE outputs a or else OPT-MAXIMIZE outputs SEQ-ELIMINATE(S′,✏, δ 4). Note that only one of these three cases is possible: (1) a is a 2✏3-maximum, (2) a is not an ✏maximum and (3) a is an ✏-maximum but not a 2✏3-maximum. In case (1), since a is a 2✏3maximum, by Lemma 1, w.p.≥1 −δ4, COMPARE returns the first hypothesis for every e ∈S′ and OPT-MAXIMIZE outputs a. In both cases (2) and (3), as stated above, w.p.≥1 −δ2, S′ contains the absolute maximum b∗. Now in case (2) since a is not an ✏-maximum, by Lemma 1, w.p.≥ 1 −δ(4n), COMPARE(b∗,a,2✏3,✏,δ(4n)) returns the second hypothesis. Thus OPT-MAXIMIZE outputs SEQ-ELIMINATE(S′,✏,δ4), which w.p.≥1 −δ4, returns an ✏-maximum of S′ (recall that an ✏-maximum of S′ is an ✏-maximum of S if S′ contains b∗). Finally in case (3), OPT-MAXIMIZE either outputs a or SEQ-ELIMINATE(S′,✏,δ4) and either output is an ✏-maximum w.p.≥1 −δ. In the below Theorem, we bound comparisons used by OPT-MAXIMIZE and prove its correctness. Proof is in A.7. Theorem 6. W.p.≥1 −δ, OPT-MAXIMIZE(S,✏,δ) uses O( n ✏2 log 1 δ ) comparisons and outputs an ✏-maximum. 4 Ranking Recall that [14] considered a model with both SST and stochastic triangle inequality and derived an ✏-ranking with On log n(log log n)3 ✏2 comparisons for δ = 1 n. By constrast, we consider a more 6 Algorithm 3 OPT-MAXIMIZE 1: inputs 2: Set S, bias ✏, confidence δ. 3: if δ ≤1 n then 4: return SEQ-ELIMINATE(S,✏,δ) 5: end if 6: a ←PICK-ANCHOR(S,√6nlog n,✏3, δ 4) 7: S′ ←PRUNE(S,a,√6nlog n,✏3,2✏3, δ 4) 8: for element e in S′ do 9: if COMPARE(e,a, 2✏ 3 ,✏, δ 4n) = 2 then 10: return SEQ-ELIMINATE(S′,✏, δ 4) 11: end if 12: end for 13: return a general model without stochastic triangle inequality and show that even a 14-ranking with just SST takes ⌦(n2) comparisons for δ ≤1 8. To establish the lower bound, we reduce the problem of finding 14-ranking to finding a coin with bias 1 among n(n−1) 2 −1 other fair coins. For this, we consider the following model with n elements {a1,a2,...,an}: ˜pa1,an = 1 2, ˜pai,aj = µ(0 < µ < 1n10), when i < j and (i,j) ≠(1,n). Note that this model satisfies SST but not stochastic triangle inequality. Also note that any ranking where a1 precedes an is an 14-ranking and thus the algorithm only needs to order a1 and an correctly. Now the output of a comparison between any two elements other than a1 and an is essentially a fair coin toss (since µ is very small). Thus if we output a ranking without querying comparison between a1 and an, then the ranking is correct w.p.≈1 2 since a1 and an must necessarily be ordered correctly. Now if an algorithm uses only n220 comparisons then the probability that the algorithm queried at least one comparison between a1 and an is less than 1 2 and hence cannot achieve a confidence of 7 8. Proof sketch in B.1. Theorem 7. There exists a model that satisfies SST for which any algorithm requires ⌦(n2) comparisons to find a 14-ranking with probability ≥78. We also present a trivial ✏-ranking algorithm in Appendix B.2 that for any stochastic model with ranking (Weak Stochastic Transitivity), uses O( n2 ✏2 log n δ ) comparisons and outputs an ✏-ranking w.p.≥1 −δ. 5 Borda Scores We show that for general models, using O( n ✏2 log 1 δ ) comparisons w.p.≥1−δ, we can find an ✏-Borda maximum and using O( n ✏2 log n δ ) comparisons w.p.≥1 −δ, we can find an ✏-Borda ranking. Recall that Borda score s(e) of an element e is the probability that e is preferable to an element picked randomly from S i.e., s(e) = 1 n ∑f∈S ˜pe,f. We first make a connection between Borda scores of elements and the traditional multi armed bandit setting. In the Bernoulli multi armed setting, every arm a is associated with a parameter q(a) and pulling that arm results in a reward B(q(a)), a Bernoulli random variable with parameter q(a). Observe that we can simulate our pairwise comparisons setting as a traditional bandit arms setting by comparing an element with a random element where in our setting, for every element e, the associated parameter is s(e). Thus PAC optimal algorithms derived under traditional bandit setting work for PAC Borda score setting too. [28] and several others derived a PAC maximum arm selection algorithms that use O( n ✏2 log 1 δ ) comparisons and find an arm with parameter at most ✏less than the highest. This implies an ✏-Borda maxing algorithm with the same complexity. Proof follows from reduction to Bernoulli multi-armed bandit setting. Theorem 8. There exists an algorithm that uses O( n ✏2 log 1 δ ) comparisons and w.p.≥1 −δ, outputs an ✏-Borda maximum. 7 For ✏-Borda ranking, we note that if we compare an element e with 2 ✏2 log 2n δ random elements, w.p. ≥1 −δn, the fraction of times e wins approximates the Borda score of e to an additive error of ✏ 2. Ranking based on these approximate scores results in an ✏-Borda ranking. We present BORDARANKING in C.1 that uses 2n ✏2 log 2n δ comparisons and w.p.≥1−δ outputs an ✏-Borda ranking. Proof in C.1. Theorem 9. BORDA-RANKING(S,✏,δ) uses 2n ✏2 log 2n δ comparisons and w.p.≥1 −δ outputs an ✏-Borda ranking. 6 Experiments In this section we validate the performance of our algorithms using simulated data. Since we essentially derived a negative result for ✏-ranking, we consider only our ✏-maxing algorithms - SEQELIMINATE and OPT-MAXIMIZE for experiments. All results are averaged over 100 runs. 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Number of elements 0 2 4 6 8 10 12 14 16 Sample Complexity 105 OPT-MAXIMIZE SEQ-ELIMINATE (a) small values of n 0 5000 10000 15000 Number of elements 0 2 4 6 8 10 12 14 Sample Complexity 106 OPT-MAXIMIZE SEQ-ELIMINATE (b) large values of n Figure 1: Comparison of SEQ-ELIMINATE and OPT-MAXIMIZE Similar to [14, 7], we consider the stochastic model pi,j = 0.6 ∀i < j. We use maxing algorithms to find 0.05-maximum with error probability δ = 0.1. Note that i = 1 is the unique 0.05-maximum under this model. In Figure 1, we compare the performance of SEQ-ELIMINATE and OPT-MAXIMIZE over different ranges of n. Figures 1(a), 1(b) show that for small n i.e., n ≤1300 SEQ-ELIMINATE performs well and for large n i.e., n ≥1300, OPT-MAXIMIZE performs well. Since we are using δ = 0.1, the experiment suggests that for δ 1 n13 , OPT-MAXIMIZE uses fewer comparisons as compared to SEQ-ELIMINATE. Hence it would be beneficial to use SEQ-ELIMINATE for δ ≤ 1 n13 and OPT-MAXIMIZE for higher values of δ. In further experiments, we use δ = 0.1 and n < 1000 so we use SEQ-ELIMINATE for better performance. We compare SEQ-ELIMINATE with BTM-PAC [7], KNOCKOUT [14], MallowsMPI [13], and AR [16] . KNOCKOUT and BTM-PAC are PAC maxing algorithms for models with SST and stochastic triangle inequality requirements. AR finds an element with maximum Borda score. Mallows finds the absolute best element under Weak Stochastic Transitivity. We again consider the model: pi,j = 0.6 ∀i < j and try to find a 0.05-maximum with error probability δ = 0.1. Note that this model satisfies both SST and stochastic triangle inequality and under this model all these algorithms can find an ✏-maximum. From Figure 2(a), we can see that BTM-PAC performs worse for even small values of n and from Figure 2(b), we can see that AR performs worse for higher values of n. One possible reason is that BTM-PAC is tailored for reducing regret in the bandit setting and in the case of AR, Borda scores of elements become approximately the same with increasing number of elements, leading to more comparisons. For this reason, we drop BTM-PAC and AR for further experiments. We also tried PLPAC [12] but it fails to achieve required accuracy of 1 −δ since it is designed primarily for Plackett-Luce. For example, we considered the previous setting pi,j = 0.6 ∀i < j with n = 100 and tried to find a 0.09-maximum with δ = 0.1. Even though PLPAC used almost same number of comparisons (57237) as SEQ-ELIMINATE (56683), PLPAC failed to find 0.09-maxima 20 out of 100 runs whereas SEQ-ELIMINATE found the maximum in all 100 runs. In figure 3, we compare algorithms SEQ-ELIMINATE, KNOCKOUT [14] and MallowsMPI [13] for models that do not satisfy stochastic triangle inequality. In Figure 3(a), we consider the stochastic model p1,j = 1 2 + ˜q ∀j ≤n2, p1,j = 1 ∀j > n2 and pi,j = 1 2 + ˜q ∀1 < i < j where ˜q ≤0.05 and we pick n = 10. Observe that this model satisfies SST but not stochastic triangle inequality. Here 8 7 10 15 Number of elements 103 104 105 106 Sample Complexity SEQ-ELIMINATE KNOCKOUT MallowsMPI AR BTM-PAC (a) small values of n 50 100 200 500 Number of elements 104 105 106 107 108 109 Sample Complexity SEQ-ELIMINATE KNOCKOUT MallowsMPI AR (b) large valuesof n Figure 2: Comparison of Maxing Algorithms with Stochastic Triangle Inequality again, we try to find a 0.05-maximum with δ = 0.1. Note that any i ≤n2 is a 0.05 maximum. From Figure 3(a), we can see that MallowsMPI uses more comparisons as ˜q decreases since MallowsMPI is not a PAC algorithm and tries to find the absolute maximum. Even though KNOCKOUT performs better than MallowsMPI, it fails to output a 0.05 maximum with probability 0.12 for ˜q = 0.001 and 0.26 for ˜q = 0.0001. Thus KNOCKOUT can fail when the model doesn’t satisfy stochastic triangle inequality. We give an explanation for this behavior in Appendix D. By constrast, even for ˜q = 0.0001, SEQ-ELIMINATE outputted a 0.05 maximum in all runs and outputted the abosulte maximum in 76% of trials. We can also see that SEQ-ELIMINATE uses much fewer comparisons compared to the other two algorithms. In Figure 3(b), we compare SEQ-ELIMINATE and MallowsMPI on the Mallows model, a model which doesn’t satisfy stochastic triangle inequality. Mallows model can be specified with one parameter φ. We consider n = 10 elements and find a 0.05-maximum with error probablility δ = 0.05. From Figure 3(b) we can see that the performance of MallowsMPI gets worse as φ approaches 1, since comparison probabilities get close to 1 2 whereas SEQ-ELIMINATE is not affected. 0.04 0.02 0.01 0.001 0.0001 104 106 108 1010 1012 Sample Complexity SEQ-ELIMINATE KNOCKOUT MallowsMPI (a) No Triangle Inequality 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 102 103 104 105 106 107 Sample Complexity SEQ-ELIMINATE MallowsMPI (b) Mallows Model Figure 3: Comparison of SEQ-ELIMINATE and MALLOWSMPI over Mallows Model One more experiment is presented in Appendix E. 7 Conclusion We extended the study of PAC maxing and ranking to general models which satisfy SST but not stochastic triangle inequality. For PAC maxing, we derived an algorithm with linear complexity. For PAC ranking, we showed a negative result that any algorithm needs ⌦(n2) comparisons. We thus showed that removal of stochastic triangle inequality constraint does not affect PAC maxing but affects PAC ranking. We also ran experiments over simulated data and showed that our PAC maximum selection algorithms are better than other maximum selection algorithms. For unconstrained models, we derived algorithms for PAC Borda maxing and PAC Borda ranking by making connections with traditional multi-armed bandit setting. 9 Acknowledgments We thank NSF for supporting this work through grants CIF-1564355 and CIF1619448. References [1] Ralf Herbrich, Tom Minka, and Thore Graepel. Trueskill: a bayesian skill rating system. In Proceedings of the 19th International Conference on Neural Information Processing Systems, pages 569–576. MIT Press, 2006. 1.1 [2] Jialei Wang, Nathan Srebro, and James Evans. Active collaborative permutation learning. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 502–511. ACM, 2014. 1.1 [3] Filip Radlinski and Thorsten Joachims. Active exploration for learning rankings from clickthrough data. In Proceedings of the 13th ACM SIGKDD, pages 570–579. ACM, 2007. 1.1 [4] Filip Radlinski, Madhu Kurup, and Thorsten Joachims. How does clickthrough data reflect retrieval quality? In Proceedings of the 17th ACM conference on Information and knowledge management, pages 43–52. ACM, 2008. 1.1 [5] http://www.gif.gf/. 1.1 [6] Uriel Feige, Prabhakar Raghavan, David Peleg, and Eli Upfal. Computing with noisy information. SIAM Journal on Computing, 23(5):1001–1018, 1994. 1.2 [7] Yisong Yue and Thorsten Joachims. Beat the mean bandit. In Proc. of the ICML, pages 241–248, 2011. 1.2, 6 [8] R´obert Busa-Fekete, Bal´azs Sz¨or´enyi, and Eyke H¨ullermeier. Pac rank elicitation through adaptive sampling of stochastic pairwise preferences. In AAAI, 2014. 1.2 [9] Wikipedia. Nontransitive dice — Wikipedia, the free encyclopedia. http://en.wikipedia.org/w/ index.php?title=Nontransitive%20dice&oldid=779713322, 2017. [Online; accessed 19-May2017]. 1.2 [10] Robin L Plackett. The analysis of permutations. Applied Statistics, pages 193–202, 1975. 1.2 [11] R Duncan Luce. Individual choice behavior: A theoretical analysis. Courier Corporation, 2005. 1.2 [12] Bal´azs Sz¨or´enyi, R´obert Busa-Fekete, Adil Paul, and Eyke H¨ullermeier. Online rank elicitation for plackett-luce: A dueling bandits approach. In NIPS, pages 604–612, 2015. 1.2, 6 [13] R´obert Busa-Fekete, Eyke H¨ullermeier, and Bal´azs Sz¨or´enyi. Preference-based rank elicitation using statistical models: The case of mallows. In Proc. of the ICML, pages 1071–1079, 2014. 1.2, 3.1, 6, 6 [14] Moein Falahatgar, Alon Orlitsky, Venkatadheeraj Pichapati, and Ananda Theertha Suresh. Maximum selection and ranking under noisy comparisons. In International Conference on Machine Learning, pages 1088–1096, 2017. 1.2, 4, 6, 6, A.1, D [15] Yuan Zhou, Xi Chen, and Jian Li. Optimal pac multiple arm identification with applications to crowdsourcing. In International Conference on Machine Learning, pages 217–225, 2014. 1.2, 3.1 [16] Reinhard Heckel, Nihar B Shah, Kannan Ramchandran, and Martin J Wainwright. Active ranking from pairwise comparisons and when parametric assumptions don’t help. arXiv preprint arXiv:1606.08842, 2016. 1.2, 6 [17] Tanguy Urvoy, Fabrice Clerot, Raphael F´eraud, and Sami Naamane. Generic exploration and k-armed voting bandits. In Proc. of the ICML, pages 91–99, 2013. 1.2 [18] Kevin Jamieson, Sumeet Katariya, Atul Deshpande, and Robert Nowak. Sparse dueling bandits. In Artificial Intelligence and Statistics, pages 416–424, 2015. 1.2 [19] David Timothy Lee, Ashish Goel, Tanja Aitamurto, and Helene Landemore. Crowdsourcing for participatory democracies: Efficient elicitation of social choice functions. In Second AAAI Conference on Human Computation and Crowdsourcing, 2014. 1.2 10 [20] Jayadev Acharya, Ashkan Jafarpour, Alon Orlitsky, and Ananda Theertha Suresh. Sorting with adversarial comparators and application to density estimation. In Information Theory (ISIT), 2014 IEEE International Symposium on, pages 1682–1686. IEEE, 2014. 1.2 [21] Jayadev Acharya, Moein Falahatgar, Ashkan Jafarpour, Alon Orlitsky, and Ananda Theertha Suresh. Maximum selection and sorting with adversarial comparators and an application to density estimation. arXiv preprint arXiv:1606.02786, 2016. 1.2 [22] Mikl´os Ajtai, Vitaly Feldman, Avinatan Hassidim, and Jelani Nelson. Sorting and selection with imprecise comparisons. ACM Transactions on Algorithms (TALG), 12(2):19, 2016. 1.2 [23] Jayadev Acharya, Ashkan Jafarpour, Alon Orlitsky, and Ananda Theertha Suresh. Near-optimal-sample estimators for spherical gaussian mixtures. NIPS, 2014. 1.2 [24] Arun Rajkumar and Shivani Agarwal. A statistical convergence perspective of algorithms for rank aggregation from pairwise data. In Proc. of the ICML, pages 118–126, 2014. 1.2 [25] Sahand Negahban, Sewoong Oh, and Devavrat Shah. Iterative ranking from pair-wise comparisons. In NIPS, pages 2474–2482, 2012. 1.2 [26] Sahand Negahban, Sewoong Oh, and Devavrat Shah. Rank centrality: Ranking from pairwise comparisons. Operations Research, 2016. 1.2 [27] Minje Jang, Sunghyun Kim, Changho Suh, and Sewoong Oh. Top-k ranking from pairwise comparisons: When spectral ranking is optimal. arXiv preprint arXiv:1603.04153, 2016. 1.2 [28] Yuan Zhou and Xi Chen. Optimal pac multiple arm identification with applications to crowdsourcing. 2014. 5 11 | 2017 | 563 |
7,078 | Subspace Clustering via Tangent Cones Amin Jalali Wisconsin Institute for Discovery University of Wisconsin Madison, WI 53715 amin.jalali@wisc.edu Rebecca Willett Department of Electrical and Computer Engineering University of Wisconsin Madison, WI 53706 willett@discovery.wisc.edu Abstract Given samples lying on any of a number of subspaces, subspace clustering is the task of grouping the samples based on the their corresponding subspaces. Many subspace clustering methods operate by assigning a measure of affinity to each pair of points and feeding these affinities into a graph clustering algorithm. This paper proposes a new paradigm for subspace clustering that computes affinities based on the corresponding conic geometry. The proposed conic subspace clustering (CSC) approach considers the convex hull of a collection of normalized data points and the corresponding tangent cones. The union of subspaces underlying the data imposes a strong association between the tangent cone at a sample x and the original subspace containing x. In addition to describing this novel geometric perspective, this paper provides a practical algorithm for subspace clustering that leverages this perspective, where a tangent cone membership test is used to estimate the affinities. This algorithm is accompanied with deterministic and stochastic guarantees on the properties of the learned affinity matrix, on the true and false positive rates and spread, which directly translate into the overall clustering accuracy. 1 Introduction Finding a low-dimensional representation of high-dimensional data is central to many tasks in science and engineering. Union-of-subspaces have been a popular data representation tool for the past decade. These models, while still parsimonious, offer more flexibility and better approximations to non-linear data manifolds than single-subspace models. To fully leverage union-of-subspaces models, we must be able to determine which data point lies in which subspace. This subproblem is referred to as subspace clustering [16]. Formally, given a set of points x1, . . . , xN ∈Rn lying on k linear subspaces S1, . . . , Sk ⊂Rn, subspace clustering is the pursuit of partitioning those points into k clusters so that all points in each cluster lie within the same subspace among S1, . . . , Sk. Once the points have been clustered into subspaces, standard dimensionality reduction methods such as principal component analysis can be used to identify the underlying subspaces. A generic approach in the literature is to construct a graph with each vertex corresponding to one of the given samples and each edge indicating whether (or the degree to which) a pair of points could have come from the same subspace. We refer to the (weighted) adjacency matrix of this graph as the affinity matrix. An ideal affinity matrix A would have A(i, j) = 1 if and only if xi and xj are in the same subspace, and otherwise A(i, j) = 0. Given an estimated affinity matrix, a variety of graph clustering methods, such as spectral clustering [17], can be used to cluster the samples, so forming the affinity matrix is a critical step. Many existing methods for subspace clustering with provable guarantees leverage the self-expressive property of the data. Such approaches pursue a representation of each data point in terms of the other data points, and then the representation coefficients are used to construct an affinity matrix. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. For example, the celebrated sparse subspace clustering (SSC) approach of [3] seeks a representation of each sample as a weighted combination of the other points, with minimal ℓ1 norm. However, such sparse self-expression can lead to graph connectivity issues, e.g., see [10, 8, 20, 5, 19, 18], where clusters can be arbitrarily broken into separate components. This paper proposes a new paradigm for devising subspace clustering algorithms: Conic Subspace Clustering (CSC): exploiting the association of the tangent cones to the convex hull of normalized samples with the original subspaces for computing affinities and subsequent clustering. CSC leverages new insights into the geometry of subspace clustering. One of the key effects of this approach is that the learned affinity matrix is generally denser among samples from the same subspace, which in turn can mitigate graph connectivity issues. In Proposition 1 below, we hint on what we mean by the strong association of the tangent cones with the underlying subspaces for an ideal dataset. In Section 2, we show how a similar idea can be implemented with finite number of samples. Given a set of nonzero samples from a union of linear subspaces, we normalize them to fall on the unit sphere and henceforth assume X = {x1, . . . , xN} ⊂Sn−1 is the set of samples. We further overload the notation to define X = [x1, x2, . . . , xN] ∈Rn×N. Data hull refers to the convex hull of samples. The tangent cone at x ∈conv(X) with respect to conv(X) is defined as T(x) := cl conv cone(X + {−x}) = cl !" x′∈X λx′(x′ −x) : λx′ ≥0, x′ ∈X # where the Minkowski sum of two sets A and B is denoted by A + B, while A + {x} may be simplified to A + x. The linear space of a cone C is defined as lin C := C ∩(−C). We term the intersection of a subspace S with the unit sphere as a ring R = S ∩Sn−1. Proposition 1. For a union of rings, namely X = (S1 ∪. . . ∪Sk) ∩Sn−1, and for every x ∈X, S(x) = span{x} + lin T(x), where S(x) is the convex hull of the union of all subspaces Si , i = 1, . . . , k, to which x belongs. 1.1 Our contributions We introduce a new paradigm for subspace clustering, conic subspace clustering (CSC), inspired by ideas from convex geometry. More specifically, we propose to consider the convex hull of normalized samples, and exploit the structure of the tangent cone to this convex body at each sample to estimate the relationships for pairs of samples (to construct an affinity matrix for clustering). We provide an algorithm which implements CSC (Section 2) along with deterministic guarantees on how to choose the single parameter in this algorithm, β, guaranteeing no false positives (Section 5) and any desired true positive rate (Section 4), in the range allowed by the provided samples. We specialize our results to random models, to showcase our guarantees in terms of the few parameters defining said random generative models and to compare with existing methods. Aside from statistical guarantees, we also provide different optimization programs for implementing our algorithm that can be used for faster computation and increased robustness (Section 7). In Section 6, we elaborate on the true positive rate and spread for CSC and compare it to what is known about a sparsity-based subspace clustering approach, namely sparse subspace clustering, SSC [3]. This comparison provides us with insight on situations where methods such as SSC would face the so called graph connectivity issue, demonstrating the advantage of CSC in such situations. 2 Conic Subspace Clustering (CSC) via Rays: Intuition and Algorithm In this section, we discuss an intuitive algorithm for subspace clustering under the proposed conic subspace clustering paradigm. We present the underlying idea without worrying about the computational aspects, and relegate such discussions to Section 7. All proofs are presented in the Appendix. Henceforth, lower case letters represent vectors, while specific letters such as x and x′ are reserved to represent columns of X, and x is commonly used as the reference point. Start by considering Figure 1(a) and the point x ∈R := (S1 ∪· · · ∪Sk) ∩Sn−1 from which all the rays are emanating. Moreover, define Rt := St ∩Sn−1 for t = 1, . . . , k, which gives 2 (a) x + cl cone(R −x) (b) x′ ∈S(x) (c) x′ /∈S(x) Figure 1: Illustration of the idea behind our implementation of Conic Subspace Clustering (CSC) via rays. The union of the red and blue rings is R, and x is the point from which all the rays are emanating. The orange wedge represents x + W(x). 1(a) The union of the red and blue surfaces is x + cl cone(R −x). 1(b) When x′ and x are from the same subspace, the points dβ(x, x′) for different values of β ≥0 lie within cl cone(R−x) – specifically, in the blue shaded cone associated with the blue ring. 1(c) When x′ and x are from different subspaces, the points dβ(x, x′) lie outside cl cone(R −x) for large enough values of β. R = R1 ∪. . . ∪Rk. Only two subspaces are shown and the reference point x is in R1. The thin red and blue rays correspond to elements of x + cone(R −x) = x + cone({x′ −x : x′ ∈R}), where cone(A) := {λy : y ∈A, λ ≥0}.1 We leverage the geometry of this cone to determine subspace membership. Specifically, Figure 1(b) considers a point x′ ∈R1 different from x. The dashed line segment represents points −sign(⟨x, x′⟩)βx′ for different values of β ≥0; where sign(0) can be arbitrarily chosen as ±1. The vectors emanating from x and reaching these points represent dβ(x, x′) := −sign(⟨x, x′⟩)βx′ −x. (1) For x, x′ ∈R1, this illustration shows that dβ(x, x′) ∈cl cone(R −x) for any β ≥0. In contrast, Figure 1(c) considers x′ ∈R2, while x ∈R1. In this case, there exist β > 0 such that dβ(x, x′) /∈ cl cone(R −x), indicating that x′ ̸∈S(x). Formally, Proposition 2. For any x, x′ ∈R and any scalar value β ≥0, x′ ∈S(x) ⇐⇒ ! dβ(x, x′) : β ≥0 # ⊂cl cone(R −x) (2) Equivalently, x′ ∈S(x) if and only if ! β ∈R : βx′ −x ∈cl cone(R −x) # is unbounded. In other words, we can test whether or not x′ ∈S(x) by testing the cone membership for dβ(x, x′). Of course, such a test would not be practical: we cannot compute dβ(x, x′) for an infinite set of β values, the set cl cone(R −x) is generally non-convex (in Figure 1(a), the cone is the union of the red and blue surfaces), and cl cone(R −x) is not known exactly because we only observe a finite collection of points from R instead of all of R. We now develop an alternative test to (2) that addresses these challenges and can be computed within a convex optimization framework. We first address the convexity issue: Proposition 3. For the closed convex cone W(x) := conv cl cone(R −x), and for any x, x′ ∈R, x′ ∈S(x) =⇒ ! dβ(x, x′) : β ≥0 # ⊂W(x). (3) In other words, x′ ∈S(x) implies that ! β ∈R : dβ(x, x′) ∈cl cone(R −x) # is unbounded. Next, we formulate the test as a convex optimization program, when a finite number of samples are given. Specifically, using the samples in X ⊂R instead of all the points in R, we can define an approximation of W(x) as WN(x) := ! (X −x1T N)λ : λ ∈RN + # (4) which is the tangent cone (also known as the descent cone) at x with respect to the data hull conv(X). The implementation of CSC via rays, as sketched above and detailed below, is based 1Note that this is not the same as a conic hull. 3 on testing the membership of dβ(x, x′) in the tangent cone WN(x) for all pairs of samples x, x′ to determine their affinity. More specifically, the cone membership test can be stated as a feasibility program, tagged as the Cone Representability (CR) program: minλ∈RN 0 subject to dβ(x, x′) = (X −x1T N)λ , λ ≥0N. (CR) If there exists a β ≥0 for which (CR) is infeasible, then we conclude x′ ̸∈S(x). Later, in our theoretical results in Sections 4 and 5 we characterize a range (dependent on a target error rate) of possible values of β such that for any single β from this range, checking the feasibility of (CR) for all x, x′ reveals the true relationships within a target error rate. In Section 7, we discuss a number of variations for the above optimization program. While our upcoming guarantees are all concerned with the cone membership test itself and not the specific implementation, these variations provide better algorithmic options and are more robust to noise. Specifically, we choose to use a variation (in the box below) that is a bounded feasible linear program for our implementation of the cone membership test. We refer to solving any of the variations of the cone membership test for an ordered pair of samples (x, x′) and a fixed value of β as CSC1(β, x, x′): Compute $γ(x, x′) = min {γ : (1 −γ)(βx′ −x) = (X −x1T N)λ , γ ≥0 , λ ≥0}. Set A(x, x′) ∈{0, 1} by rounding 1 −$γ(x, x′) to either 0 or 1, whichever is closest. We refer to the optimization program used in the above as the Robust Cone Membership (RCM) program. Similarly, solving a collection of these tests for all samples x′ and for a fixed x, or for all pairs x, x′, are referred to as CSC1(β, x) and CSC1(β), respectively. When CSC1(β) is followed by spectral clustering for the constructed affinity matrix, we refer to the whole process as CSC(β). It is worth mentioning that the linear program used in CSC1(β, x, x′) is equivalent to (CR) in a sense made clear in Section 7, and provides the same affinity matrix with a variety of algorithmic advantages, as discussed in Section 7. 3 Theoretical Guarantees In this section, we discuss our approach to providing theoretical guarantees for the aforementioned implementation of CSC via rays. Let us first set some conventions. We refer to a declaration x′ ∈S(x) (or x′ ̸∈S(x)) as positive (or negative), regardless of the ground truth. Hence, a true positive is an affinity of 1 when the samples are from the same subspace, and a false positive is an affinity of 1 when the samples are from different subspaces. We provide guarantees for CSC1(β) to give no false positives. This makes the affinity matrix a permuted block diagonal matrix. In this case, if there are enough well-spread ones in each row of the affinity matrix, spectral clustering or any other reasonable clustering algorithm will be able to perfectly recover the underlying grouping; see graph connectivity in spectral clustering literature [17]. These two phenomena, no false positives and enough well-spread true positives per sample, are the focus of our theoretical results in Sections 4 and 5. In a nutshell, the guarantees boil down to characterizing a range of β’s for which CSC has controlled degrees of errors: no false positives and a certain true positive rate per row. We also examine the distribution of true positives recovered by our method and illustrate a favorable spread. Through the intuition behind the cone membership test, namely (CR), it is easy to observe that the number of true positives and the number of false positives are monotonically non-increasing in β (which can be observed in Figure 2 as well). Hence, to have a high number of true positives we need to use an upper bounded β, and to have a few number of false positives we need to use a lower bounded value of β. To assess the strength of our deterministic results, we assume probabilistic models on the subspaces and/or samples and study the ranges of β for which CSC1(β) has controlled errors of both types, with high probability. For the random models, we take the number of subspaces to be fixed, namely k. However, CSC1(β) need not know the number of subspaces and spectral clustering can use the gap in the eigenvalues of the Laplacian matrix to determine the number of clusters; e.g., see [15]. In the random-sample model, we assume k subspaces are given and samples from each subspace are drawn uniformly at random from the unit sphere on that subspace. In the random-subspace model, each subspace is chosen independently and uniformly at random with respect to the Haar measure. 4 3.1 Examples In this section, we illustrate the performance of the CSC method on some small examples. First, we examine the role of the parameter β in CSC1(β, x, x′) and its effect on the false positive and true positive rates in practice. In the first experiment, we have k = 5 subspaces, each with dimension d = 5, in an n = 10 dimensional space, and we draw 30 samples from each of the k 5-dimensional subspaces. We then run CSC1(β, x, x′) for a variety of values of β between one and six over 15 random trials; In Figures 2(b), 2(c), and 2(d), we show the results of each trial in thin lines and the means across trials in thick lines (Figure 2(c) shows the median). Figure 2(a) shows, for each value of β, the histogram of true positive rates across rows. Superimposed on this histogram plot is the empirical mean of the histogram (green solid line) and our theoretical bound from Theorem 6 (purple dashed curve corresponding to the purple dashed curve in Figure 2(b)): for each value of β, the true positive rate will be above this curve, with high probability. Our theoretical bounds correspond to sufficient but not necessary conditions. While we observe the tightness of the theory for minimum per-row true positive rate in relation to β, the wide distribution of per-row true positive rates above the theoretical bound (Figures 2(a) and 2(b)), as well as the spectral clustering step, provide us with good error rates (Figure 2(c)) outside the range of β’s for which we have guarantees (Figure 2(d)). 1 2 3 4 5 0 0.2 0.4 0.6 0.8 1 0 100 200 300 400 500 600 (a) 1 2 3 4 5 0 0.2 0.4 0.6 0.8 1 (b) 1 2 3 4 5 0 0.2 0.4 0.6 0.8 1 (c) 1 2 3 4 5 0 0.2 0.4 0.6 0.8 1 (d) Figure 2: Illustration of the role of β (horizontal axis) in determining (a) the histogram of true positive rates across rows, with the empirical mean (solid line) and the theoretical bound (dashed curve, corresponding to the dashed curve in (b)), (b) maximum, mean, and minimum (across rows of the affinity matrix) true positive rates along with the theoretical bound (dashed curve), (c) the clustering mismatch rate after performing spectral clustering, and, (d) the false positive rate. This experiment is in a 10 dimensional space, with 30 random samples from each of 5 random 5-dimensional subspaces, over 15 random trials. Bold curves correspond to averages across trials in (a), (b), and (d), but to the median in (c). Next, we look at learned affinity matrices output by the proposed CSC method and SSC [3], which is a widely-used benchmark and the foundation of much current subspace clustering research. As described at length in Section D, the true positive rate of SSC is necessarily bounded because of the ℓ1 regularization used to learn the affinity matrix. This is not true of CSC – in fact, β can be used to control the true positive rate (in an admissible range) as long as it exceeds some lower bound (β ≥βL). The difference between the true positive rates of SSC and CSC are illustrated in Figure 3. In this experiment, CSC naturally outputs a 0/1 affinity matrix, while the affinity matrix of SSC has a broader diversity of values. We show this matrix and a thresholded version for comparison purposes, where the threshold is set to correspond to a 5% false positive rate. 4 Guarantees on True Positive Rates We study conditions under which a fraction ρ ∈(0, 1) of samples x′ ∈S(x) are declared as such. As discussed before, the number of true positives is non-increasing in β. Therefore, we are interested in an upper bound βU,ρ on β so that CSC1(β, x) for β ≤βU,ρ returns at least ρNt true positives (Nt is the number of samples from St) for any x ∈Xt := X ∩St and t = 1, . . . , k. Consider {x}⊥:= {y : ⟨x, y⟩= 0}. For a close convex set A containing the origin, denote by r(A) the radius of the largest Euclidean sphere in span(A) that is centered at the origin and is a subset of A. Theorem 4 (Deterministic condition for any true positive rate). The conic subspace clustering algorithm at x with parameter β, namely CSC1(β, x), returns a ratio ρ ∈(0, 1) of relationships between 5 (a) (b) (c) (d) (e) (f) Figure 3: Affinity matrices for two toy models in an ambient dimension n = 12. (a-c) k = 3 subspaces, each of rank d = 4 and each with 3d = 12 samples. (a) Result of CSC1(β). (b) Result of SSC. (c) Thresholded version of (b). (d-e) k = 3 subspaces, each of rank d = 6 and each with 3d = 18 samples. (d) Result of CSC1(β). (e) Result of SSC. (f) Thresholded version of (e), with threshold set so that the false positive rate is 5%. As predicted by the theory, CSC achieves higher true positive rates than SSC can. x ∈Xt and other samples as true positives, provided that β ≤βx U,ρ where βx U,ρ := sin2(θx t ) cos(θx t ) −cos(˜θx t ) (5) in which, for m := ⌈ρ(N −1)⌉, cos(˜θx t ) is the (m + 1)-st largest value among |⟨x, x′⟩| for x′ ∈Xt, and for r(·) denoting the inner radius, θx t := arctan(r((x + Wt N(x)) ∩{x}⊥)). Then, CSC1(β) is guaranteed to return a fraction ρ of true positives per sample provided that β ≤βU,ρ := minx∈X βx U,ρ. As it can be seen from the above characterization, θx t and βx U,ρ can vary from sample to sample even within the same subspace. When samples are drawn uniformly at random from a given subspace (the random-sample model), the next theorem provides a uniform lower bound on the inner radius and θx t for all such samples. Note that βx U,ρ is non-decreasing in θx t and non-increasing in ˜θx t . Theorem 5. Under a random-sample model, and for a choice pt ∈(0, 1), with probability at least 1 −pt , a solution θ to (cos θ)dt−1 6√dt sin θ = log(Nt/pt) Nt is a lower bound on θx t , which is defined in Theorem 4 and is a function of the inradius of a base of the t-th cone Wt N(x). Theorem 5 is proved in the Appendix using ideas from inversive geometry [1]. In a random-sample model, we can quantify the aforementioned m-th order statistic. Therefore, we can explicitly compute the upper bound βU,ρ (with high probability) in terms of quantities dt and Nt. The final result is given in Theorem 6. Note that both the inradius and the m-th order statistic are random variables defined through the samples, hence are dependent. Therefore, a union bound is used. Theorem 6. Under a random-sample model, CSC1(β, x) for any x ∈Xt yields a fraction ρ of true positives with high probability, provided that β ≤βx u,ρ , where βx u,ρ is computed similar to (5), using the lower bound on θx t from Theorem 5 and ˜θx t = π 2 ( m N + ∆). The probability is at least I( m N + ∆; m, N −m) −pt, where I(·; ·, ·) denotes the incomplete Beta function. 5 Guarantees for Zero False Positives In this section, we provide guarantees for CSC1(β, x) to return no false positives, in terms of the value of β. Specifically, we guarantee this by examining a lower bound βL for β in CSC1(β, x). For a fixed column x of the data matrix X, we will use x′ as a pointer to any other column of X. Recall dβ(x, x′) from (1) and consider βL(x) := inf {β ≥0 : dβ(x, x′) ̸∈WN(x) ∀x′ ̸∈S(x)} (6) = sup {β ≥0 : dβ(x, x′) ∈WN(x) for some x′ ̸∈S(x)} . 6 If the above value is finite, then using any value even slightly larger than this would declare any x′ ̸∈S(x) correctly as such, hence no false positives. However, the above infimum may not exist for a general configuration. In other words, there might be a sample x′ ̸∈S(x) for which dβ(x, x′) ∈ WN(x) for all values of β ≥0. The following condition prohibits such a situation. Theorem 7 (Deterministic condition for zero false positives). For x ∈X, without loss of generality, suppose S(x) = S1 ∪. . . ∪Sj for some j < k. Provided that all of the columns of X that are not in S(x) are also not in WN(x), then βL(x) in (6) is finite. This condition is equivalent to St ∩WN(x) = {0} for all t = j + 1, . . . , k and all x ∈X \ St . In case this condition holds for all x ∈X, we define βL := max x∈X βL(x). (7) If this condition is met and β ≥βL is used, then CSC1(β) will return no false positives. We note that the condition of Theorem 7 becomes harder to satisfy as the number of samples grow (which makes WN(x) larger). While this is certainly not desired, such an artifact is present in other subspace clustering algorithms. See the discussion after Theorem 1 in [11] for examples. Next, we specialize Theorem 7 to a random-subspace model. Under such model, for t = j + 1, . . . , k, St and WN(x) are two random objects and are dependent (all samples, including those from St, take part in forming WN(x), hence the orientation and the dimension of St affect the definition of WN(x)), which makes the analysis harder. However, these two can be decoupled by massaging the condition of Theorem 7 from St ∩WN(x) = {0} into an equivalent condition St ∩W−t N (x) = {0} where W−t N (x) = convcone{x′ −x : x′ ̸∈St}; see Lemma 10 in the Appendix. Next, the event of a random subspace and a cone having trivial intersection can be studied using the notion of the statistical dimension of the cone and the brilliant Gordon’s Lemma (escape through a mesh) [6]. The statistical dimension of a closed convex cone C ⊂Rn is defined as δ(C) := E supy∈C∩Sn−1⟨y, g⟩2 ≤n where g ∼N(0, In). Now, we can state the following lemma based on Gordon’s Lemma. Lemma 8. With the notation in Theorem 7, and under the random-subspace model, βL is finite provided that δ(W−t N (x)) + dim(St) ≤n for t = 1, . . . , k. Furthermore, for the above to hold, it is sufficient to have "k t=1 dim(St) < n (Lemma 11 in the Appendix). Under the above conditions, we are guaranteed that a finite β exists such that with high probability, CSC1(β) results in zero false positives. It is easy to compute βL for certain configurations of subspaces. For example, when the subspaces are independent (the dimension of their Minkowski sum is equal to sum of their dimensions) we have βL = 1 (Lemma 13 in the Appendix). Independent subspaces have been assumed before in the subspace clustering literature for providing guarantees; e.g., [2, 3]. Also see [21] and references therein. However, it remains as an open question how one should compute this value for more general configurations. We provide some theoretical tools for such computation in Appendix B.5. Finally, if βL does not exceed βU,ρ from above, then CSC1(β) successfully returns a (permuted) block diagonal matrix with a density of ones (per row) of at least ρ. This allows us to have a good idea about the performance of the post-processing step (e.g., spectral clustering) and hence CSC(β). 6 True Positives’ Rate and Distribution Because sparse subspace clustering (SSC) relies upon sparse representations, the number of true positives is inherently limited. In fact, it can be shown that SSC will find a representation of each column x as a weighted sum of columns that correspond to the extreme rays of WN(x); as shown in Lemma 17 in the Appendix. This phenomenon is closely linked to the graph connectivity issues associated with SSC, mentioned before. In particular, under a random-sample model, the true positive rate for SSC will go to zero as Nt/dt grows, where Nt is the number of samples from St with dim(St) = dt. In contrast, the true positive behavior for CSC has several favorable characteristics. First, if the subspaces are all independent, then the true positive rate ρ can approach one. Second, in unfavorable settings in which the true positive rate is low, it can be shown that the true positives are distributed in such a way that precludes graph connectivity issues (see Section D.3 for more details). Specifically, in the random-sample model, for each subspace St, there is a matrix Asub 7 defined below, whose support is contained within the true positive support of the output of CSC(β) for β ∈(βL, βU,ρ). Let Xt have i.i.d. standard normal entries, and ϵ be the m-th largest element of |XT t Xt|. Then, Asub is defined by (Asub)i,j = |XT t Xt| when |XT t Xt| > ϵ, and zero otherwise. The distribution of Asub when columns of Xt are drawn uniformly at random from the unit sphere ensures that graph connectivity issues are avoided with high probability as soon as the true positive rate ρ exceeds O(log Nt/Nt). As a result, even if the values of ρ which provide βU,ρ > βL are small, there is still the potential of perfect clustering. These distributional arguments cannot be made for sparsity-based methods like SSC. We refer to Appendix D for more details. 7 CSC Optimization and Variations In Table 1, we provide a number of optimization programs that implement the cone membership test. These formulations possess different computational and robustness properties. Let us introduce a notation of equivalence. We say an optimization program P, implementing the cone membership test, is in CR-class if the possible set of its optimal values can be divided into two disjoint sets Oin and Oout corresponding to whether dβ(x, x′) ∈WN(x) or dβ(x, x′) ̸∈WN(x), respectively. Then we write [[P : Oin, Oout]]; e.g., [[(CR) : 0, infeasible]]. All of the problems in Table 1 are in CR-class. Table 1: Different formulations for the cone membership (second column) with their set of outputs when dβ(x, x′) ∈WN(x) (third column) and when dβ(x, x′) ̸∈WN(x). In all of the variations, A = X −x1T N, y and b = dβ(x, x′) live in Rn, and λ lives in RN. Tag Formulation Oin Oout P1 minλ 0 s.t. b = Aλ , λ ≥0 {0} infeasible P2 miny ⟨y, b⟩s.t. yT A ≥0 {0} unbounded P3 miny ⟨y, b⟩s.t. yT A ≥0 , ⟨y, b⟩≥−ϵ {0} {−ϵ} P4 minγ,λ γ s.t. (1 −γ)b = Aλ , γ ≥0, λ ≥0 {0} {1} The first optimization problem (P1) is merely the statement of the cone membership test as a linear feasibility program and (P2) is its Lagrangian dual. (P2) looks for a certificate y ∈W⋆ N(x) (in the dual cone) that rejects the membership of dβ(x, x′) in WN(x). However, neither (P1) nor (P2) are robust or computationally appealing. Next, observe that restricting y to any set with the origin in its relative interior yields a program that is in CR-class. (P3) is defined by augmenting (P2) with a linear constraint, which not only makes the problem bounded and feasible, but the freedom in choosing ϵ allows for controlling the bit-length of the optimal solution and hence allows for optimizing the computational complexity of solving (P3) via interior point methods. Furthermore, this program can be solved approximately, up to a precision ϵ′ ∈(0, ϵ), and provides the same desired set of results: an ϵ′-inexact solution for (P3) has a nonnegative objective value if and only if dβ(x, x′) ∈WN(x). If we dualize (P3) and divide the objective by −ϵ we get (P4) which can also be derived by handtweaking (P1). However, the duality relationship with (P3) is helpful in understanding the dual space and devising efficient optimization algorithms. Notice that (γ, λ) = (1, 0N) is always feasible, and the optimal solution is in [0, 1]. The latter property makes (P4) a suitable candidate for noisy setups without modification. Moreover, [[(P4) : 0, 1]], which makes it a desirable candidate as a proxy for x′ ̸∈S(x). We use this program in our experiments reported in Section 3.1. 8 Discussions and Future Directions This paper describes a new paradigm for understanding subspace clustering in relation to the underlying conic geometry. With this new perspective, we design an algorithm, CSC via rays, with guarantees on false and true positive rates and spreads, that sidesteps graph connectivity issues that arise with methods like sparse subspace clustering. This paper should be seen as the first introduction to the idea of, and tools for, conic subspace clustering, rather than establishing CSC as the new state-of-the-art, and as a means to ignite future work on several directions in subspace clustering. We focus on our novel geometric perspective and its potential to lead to new algorithms by providing a rigorous theoretical understanding (statistical and computational) and hope that this publication will spur discussions and insights that can inform the suggested future work. A cone membership test is just one approach to exploit this geometry and implement the conic subspace clustering paradigm. 8 Remaining Questions. While more extensive theoretical comparisons with existing methods are necessary, many comparisons are non-trivial because CSC reveals important properties of subspace clustering methods (e.g. spread of true positives) that are not understood for other methods. The limited small-scale experiments were simply intended to illustrate these properties. Our study of the parameter choice is theoretical in nature and beyond heuristics for implementation. But some questions are still open. Firstly, while we have a clear deterministic characterization for βU, tighter characterizations would lead to a larger range for β. In Figure 2(b), such pursuit would result in a new theoretical curve (instead of the current dashed purple curve) that stays closer to the minimum true positive rate across rows (the lowest thick solid curve). On the other hand, outside of the case of independent subspaces, where βL = 1, we only have a deterministic guarantee on the finiteness of βL and computing it for the random-sample model is a topic of current research. Therefore, we do not have a guarantee on the non-triviality of the resulting range (βL, βU). However, as observed in the small numerical examples in Section 3.1, as well as in our more extensive experiments that are not reported here, there often exists a big range of β with which we can get perfect clustering. Extensions. While the presented algorithm assumes noiseless data points from the underlying subspaces, our intuition and simulations (synthetic and real data) indicate stability towards stochastic noise. Moreover, the current analysis is suggestive of algorithmic variants that exhibit robust empirical performance in the presence of stochastic noise. This is why, similar to advances in other subspace clustering methods, we hope that the analysis for the noiseless setup provides essential insights to provably generalize the method to noisy settings. Furthermore, there remain several other open avenues for exploration, particularly with respect to theoretical and large-scale empirical comparisons with other methods, and extensions to measurements corrupted by adversarial perturbations, with outliers among the data points, as well as with missing entries in the data points. By design, SSC and other similar methods require a full knowledge of data points. CSC imposes the same requirement and an open question is how to extend the CSC framework when some entries are missing from the data points. References [1] David E. Blair. Inversion theory and conformal mapping, volume 9 of Student Mathematical Library. American Mathematical Society, Providence, RI, 2000. [2] João Paulo Costeira and Takeo Kanade. A multibody factorization method for independently moving objects. Int. J. Comput. Vis., 29(3):159–179, 1998. [3] Ehsan Elhamifar and René Vidal. Sparse subspace clustering. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 2790–2797. IEEE, 2009. [4] Ehsan Elhamifar and René Vidal. Clustering disjoint subspaces via sparse representation. In 2010 IEEE International Conference on Acoustics, Speech and Signal Processing, pages 1926– 1929. IEEE, 2010. [5] Ehsan Elhamifar and Rene Vidal. Sparse subspace clustering: Algorithm, theory, and applications. IEEE Trans. Pattern Anal. Mach. Intell, 35(11):2765–2781, 2013. [6] Yehoram Gordon. On Milman’s inequality and random subspaces which escape through a mesh in Rn. In Geometric aspects of functional analysis, volume 1317 of Lecture Notes in Math., pages 84–106. Springer, 1988. [7] Reinhard Heckel and Helmut Bölcskei. Robust subspace clustering via thresholding. IEEE Trans. Inf. Theory, 61(11):6320–6342, 2015. [8] Can-Yi Lu, Hai Min, Zhong-Qiu Zhao, Lin Zhu, De-Shuang Huang, and Shuicheng Yan. Robust and efficient subspace segmentation via least squares regression. In European conference on computer vision, pages 347–360. Springer, 2012. [9] Jean-Jacques Moreau. Décomposition orthogonale d’un espace hilbertien selon deux cônes mutuellement polaires. C. R. Acad. Sci. Paris, 255:238–240, 1962. 9 [10] Behrooz Nasihatkon and Richard Hartley. Graph connectivity in sparse subspace clustering. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 2137– 2144. IEEE, 2011. [11] Dohyung Park, Constantine Caramanis, and Sujay Sanghavi. Greedy subspace clustering. In Advances in Neural Information Processing Systems, pages 2753–2761, 2014. [12] James Renegar. “Efficient” subgradient methods for general convex optimization. SIAM J. Optim., 26(4):2649–2676, 2016. [13] Fritz Scholz. Confidence bounds and intervals for parameters relating to the binomial, negative binomial, poisson and hypergeometric distributions with applications to rare events. 2008. [14] Mahdi Soltanolkotabi and Emmanuel J. Candés. A geometric analysis of subspace clustering with outliers. Ann. Statist., 40(4):2195–2238, 2012. [15] Mahdi Soltanolkotabi, Ehsan Elhamifar, and Emmanuel J. Candès. Robust subspace clustering. Ann. Statist., 42(2):669–699, 2014. [16] René Vidal. Subspace clustering. IEEE Signal Process. Mag., 28(2):52–68, 2011. [17] Ulrike von Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395– 416, 2007. [18] Yining Wang, Yu-Xiang Wang, and Aarti Singh. Graph connectivity in noisy sparse subspace clustering. In Artificial Intelligence and Statistics, pages 538–546, 2016. [19] Yu-Xiang Wang and Huan Xu. Noisy sparse subspace clustering. J. Mach. Learn. Res., 17:Paper No. 12, 41, 2016. [20] Yu-Xiang Wang, Huan Xu, and Chenlei Leng. Provable subspace clustering: When LRR meets SSC. In Advances in Neural Information Processing Systems, pages 64–72, 2013. [21] Jingyu Yan and Marc Pollefeys. A general framework for motion segmentation: Independent, articulated, rigid, non-rigid, degenerate and non-degenerate. In European conference on computer vision, pages 94–106. Springer, 2006. 10 | 2017 | 564 |
7,079 | DropoutNet: Addressing Cold Start in Recommender Systems Maksims Volkovs layer6.ai maks@layer6.ai Guangwei Yu layer6.ai guang@layer6.ai Tomi Poutanen layer6.ai tomi@layer6.ai Abstract Latent models have become the default choice for recommender systems due to their performance and scalability. However, research in this area has primarily focused on modeling user-item interactions, and few latent models have been developed for cold start. Deep learning has recently achieved remarkable success showing excellent results for diverse input types. Inspired by these results we propose a neural network based latent model called DropoutNet to address the cold start problem in recommender systems. Unlike existing approaches that incorporate additional content-based objective terms, we instead focus on the optimization and show that neural network models can be explicitly trained for cold start through dropout. Our model can be applied on top of any existing latent model effectively providing cold start capabilities, and full power of deep architectures. Empirically we demonstrate state-of-the-art accuracy on publicly available benchmarks. Code is available at https://github.com/layer6ai-labs/DropoutNet. 1 Introduction Popularity of online content delivery services, e-commerce, and social web has highlighted an important challenge of surfacing relevant content to consumers. Recommender systems have proven to be effective tools for this task, receiving increasingly more attention. One common approach to building accurate recommender models is collaborative filtering (CF). CF is a method of making predictions about an individual’s preferences based on the preference information from other users. CF has been shown to work well across various domains [19], and many successful web-services such as Netflix, Amazon and YouTube use CF to deliver highly personalized recommendations to their users. The majority of the existing approaches in CF can be divided into two categories: neighbor-based and model-based. Model-based approaches, and in particular latent models, are typically the preferred choice since they build compact representations of the data and achieve high accuracy. These representations are optimized for fast retrieval and can be scaled to handle millions of users in real-time. For these reasons we concentrate on latent approaches in this work. Latent models are typically learned by applying a variant of low rank approximation to the target preference matrix. As such, they work well when lots of preference information is available but start to degrade in highly sparse settings. The most extreme case of sparsity known as cold start occurs when no preference information is available for a given user or item. In such cases, the only way a personalized recommendation can be generated is by incorporating additional content information. Base latent approaches cannot incorporate content, so a number of hybrid models have been proposed [3, 21, 22] to combine preference and content information. However, most hybrid methods introduce additional objective terms considerably complicating learning and inference. Moreover, the content part of the objective is typically generative [21, 9, 22] forcing the model to “explain” the content rather than use it to maximize recommendation accuracy. Recently, deep learning has achieved remarkable success in areas such as computer vision [15, 11], speech [12, 10] and natural language processing [5, 16]. In all of these areas end-to-end deep neu31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. ral network (DNN) models achieve state-of-the-art accuracy with virtually no feature engineering. These results suggest that deep learning should also be highly effective at modeling content for recommender systems. However, while there has been some recent progress in applying deep learning to CF [7, 22, 6, 23], little investigation has been done on using deep learning to address the cold start problem. In this work we propose a model to address this gap. Our approach is based on the observation that cold start is equivalent to the missing data problem where preference information is missing. Hence, instead of adding additional objective terms to model content, we modify the learning procedure to explicitly condition the model for the missing input. The key idea behind our approach is that by applying dropout [18] to input mini-batches, we can train DNNs to generalize to missing input. By selecting an appropriate amount of dropout we show that it is possible to learn a DNN-based latent model that performs comparably to state-of-the-art on warm start while significantly outperforming it on cold start. The resulting model is simpler than most hybrid approaches and uses a single objective function, jointly optimizing all components to maximize recommendation accuracy. An additional advantage of our approach is that it can be applied on top of any existing latent model to provide/enhance its cold start capability. This requires virtually no modification to the original model thus minimizing the implementation barrier for any production environment that’s already running latent models. In the following sections we give a detailed description of our approach and show empirical results on publicly available benchmarks. 2 Framework In a typical CF problem we have a set of N users U = {u1, ..., uN} and a set of M items V = {v1, ..., vM}. The users’ feedback for the items can be represented by an N × M preference matrix R where Ruv is the preference for item v by user u. Ruv can be either explicitly provided by the user in the form of rating, like/dislike etc., or inferred from implicit interactions such as views, plays and purchases. In the explicit setting R typically contains graded relevance (e.g., 1-5 ratings), while in the implicit setting R is often binary; we consider both cases in this work. When no preference information is available Ruv = 0. We use U(v) = {u ∈U | Ruv ̸= 0} to denote the set of users that expressed preference for v, and V(u) = {v ∈V | Ruv ̸= 0} to denote the set of items that u expressed preference for. In cold start no preference information is available and we formally define cold start when V(u) = ∅and U(v) = ∅for a given user u and item v. Additionally, in many domains we often have access to content information for both users and items. For items, this information can come in the form of text, audio or images/video. For users we could have profile information (age, gender, location, device etc.), and social media data (Facebook, Twitter etc.). This data can provide highly useful signal for recommender models, and is particularly effective in sparse and cold start settings where little or no preference information is available. After applying relevant transformations most content information can be represented by fixed-length feature vectors. We use ΦU and ΦV to denote the content features for users and items respectively where ΦU u (ΦV v ) is the content feature vector for user u (item v). When content is missing the corresponding feature vector is set to 0. The goal is to use the preference information R together with content ΦU and ΦV, to learn accurate and robust recommendation model. Ideally this model should handle all stages of the user/item journey: from cold start, to early stage sparse preferences, to a late stage well-defined preference profile. 3 Relevant Work A number of hybrid latent approaches have been proposed to address cold start in CF. One of the more popular models is the collaborative topic regression (CTR) [21] which combines latent Dirichlet allocation (LDA) [4] and weighted matrix factorization (WMF) [13]. CTR interpolates between LDA representations in cold start and WMF when preferences are available. Recently, several related approaches have been proposed. Collaborative topic Poisson factorization (CTPF) [8] uses a similar interpolation architecture but replaces both LDA and WMF components with Poisson factorization [9]. Collaborative deep learning (CDL) [22] is another approach with analogous architecture where LDA is replaced with a stacked denoising autoencoder [20]. 2 Figure 1: DropoutNet architecture diagram. For each user u, the preference Uu and content ΦU u inputs are first passed through the corresponding DNNs fU and fΦU . Top layer activations are then concatenated together and passed to the fine-tuning network fU which outputs the latent representation ˆUu. Items are handled in a similar fashion with fV, fΦV and fV to produce ˆVv. All components are optimized jointly with back-propagation and then kept fixed during inference. Retrieval is done in the new latent space using ˆU and ˆV that replace the original representations U and V. While these models achieve highly competitive performance, they also share several disadvantages. First, they incorporate both preference and content components into the objective function making it highly complex. CDL for example, contains four objective terms and requires tuning three combining weights in addition to WMF and autoencoder parameters. This makes it challenging to tune these models on large datasets where every parameter setting experiment is expensive and time consuming. Second, the formulation of each model assumes cold start items and is not applicable to cold start users. Most online services have to frequently incorporate new users and items and thus require models that can handle both. In principle it is possible to derive an analogous model for users and jointly optimize both models. However, this would require an even more complex objective nearly doubling the number of free parameters. One of the main questions that we aim to address with this work is whether we develop a simpler cold start model that is applicable to both users and items? In addition to CDL, a number of approaches haven been proposed to leverage DNNs for CF. One of the earlier approaches DeepMusic [7] aimed to predict latent representations learned by a latent model using content only DNN. Recently, [6] described YouTube’s two-stage recommendation model that takes as input user session (recent plays and searches) and profile information. Latent representations for items in a given session are averaged, concatenated with profile information, and passed to a DNN which outputs a session-dependent latent representation for the user. Averaging the items addresses variable length input problem but can loose temporal aspects of the session. To more accurately model how users’ preferences change over time a recurrent neural network (RNN) approach has been proposed by [23]. RNN is applied sequentially to one item at a time, and after all items are processed hidden layer activations are used as latent representation. Many of these models show clear benefits of applying deep architectures to CF. However, few investigate cold start and sparse setting performance when content information is available. Arguably, we expect deep learning to be the most beneficial in these scenarios due to its excellent generalization to various content types. Our proposed approach aims to leverage this advantage and is most similar to [6]. We also use latent representations as preference feature input for users and items, and combine them with content to train a hybrid DNN-based model. But unlike [6] which focuses primarily on warm start users, we develop analogous models for both users and items, and then show how these models can be trained to explicitly handle cold start. 4 Our Approach In this section we describe the architecture of our model that we call DropoutNet, together with learning and inference procedures. We begin with input representation. Our aim is to develop a model that is able to handle both cold and warm start scenarios. Consequently, input to the model 3 needs to contain content and preference information. One option is to directly use rows and columns of R in their raw form. However, these become prohibitively large as the number of users and items grows. Instead, we take a similar approach to [6] and [23], and use latent representations as preference input. Latent models typically approximate the preference matrix with a product of low rank matrices U and V: Ruv ≈UuVT v (1) where Uu and Vv are the latent representations for user u and item v respectively. Both U and V are dense and low dimensional with rank D ≪min(N, M). Noting the strong performance of latent approaches on a wide range of CF datasets, it is adequate to assume that the latent representations accurately summarize preference information about users and items. Moreover, low input dimensionality significantly reduces model complexity for DNNs since activation size of the first hidden layer is directly proportional to the input size. Given these advantages we set the input to [Uu, ΦU u ] and [Vu, ΦV v ] for each user u and item v respectively. 4.1 Model Architecture Given the joint preference-content input we propose to apply a DNN model to map it into a new latent space that incorporates both content and preference information. Formally, preference Uu and content ΦU u inputs are first passed through the corresponding DNNs fU and fΦU . Top layer activations are then concatenated together and passed to the fine-tuning network fU which outputs the latent representation ˆUu. Items are handled in a similar fashion with fV, fΦV and fU to produce ˆVv. We use separate components for preference and content inputs to handle complex structured content such as images that can’t be directly concatenated with preference input in raw form. Another advantage of using a split architecture is that it allows to use any of the publicly available (or proprietary) pre-trained models for fΦU and/or fΦV. Training can then be significantly accelerated by updating only the last few layers of each pre-trained network. For domains such as vision where models can exceed 100 layers [11], this can effectively reduce the training time from days to hours. Note that when content input is “compatible” with preference representations we remove fU and fΦU , and directly apply fU to concatenated input [Uu, ΦU u ]. To avoid notation clutter we omit the sub-networks and use fU and fV to denote user and item models in subsequent sections. During training all components are optimized jointly with back-propagation. Once the model is trained we fix it, and make forward passes to map U →ˆU and V →ˆV. All retrieval is then done using ˆU and ˆV with relevance scores estimated as before by ˆsuv = ˆUu ˆVT v . Figure 1 shows the full model architecture with both user and item components. 4.2 Training For Cold Start During training we aim to generalize the model to cold start while preserving warm start accuracy. We discussed that existing hybrid model approach this problem by adding additional objective terms and training the model to fall-back on content representations when preferences are not available. However, this complicates learning by forcing the implementer to balance multiple objective terms in addition to training content representations. Moreover, content part of the objective is typically generative forcing the model to explain the observed data instead of using it to maximize recommendation accuracy. This can waste capacity by modeling content aspects that are not useful for recommendations. We take a different approach and borrow ideas from denoising autoencoders [20] by training the model to reconstruct the input from its corrupted version. The goal is to learn a model that would still produce accurate representations when parts of the input are missing. To achieve this we propose an objective to reproduce the relevance scores after the input is passed through the model: O = X u,v (UuVT v −fU(Uu, ΦU u )fV(Vv, ΦV v )T )2 = X u,v (UuVT v −ˆUu ˆVT v )2 (2) O minimizes the difference between scores produced by the input latent model and DNN. When all input is available this objective is trivially minimized by setting the content weights to 0 and learning identity function for preference input. This is a desirable property for reasons discussed below. In cold start either Uu or Vv (or both) is missing so our main idea is to train for this by applying input dropout [18]. We use stochastic mini-batch optimization and randomly sample user-item pairs 4 to compute gradients and update the model. In each mini-batch a fraction of users and items is selected at random and their preference inputs are set to 0 before passing the mini-batch to the model. For “dropped out” pairs the model thus has to reconstruct the relevance scores without seeing the preference input: user cold start: Ouv = (UuVT v −fU(0, ΦU u )fV(Vv, ΦV v )T )2 item cold start: Ouv = (UuVT v −fU(Uu, ΦU u )fV(0, ΦV v )T )2 (3) Training with dropout has a two-fold effect: pairs with dropout encourage the model to only use content information, while pairs without dropout encourage it to ignore content and simply reproduce preference input. The net effect is balanced between these two extremes. The model learns to reproduce the accuracy of the input latent model when preference data is available while also generalizing to cold start. Dropout thus has a similar effect to hybrid preference-content interpolation objectives but with a much simpler architecture that is easy to optimize. An additional advantage of using dropout is that it was originally developed as a way of regularizing the model. We observe a similar effect here, finding that additional regularization is rarely required even for deeper and more complex models. Algorithm 1: Learning Algorithm Input: R, U, V, ΦU, ΦV Initialize: user model fU, item model fV repeat {DNN optimization} sample mini-batch B = {(u1, v1), ..., (uk, vk)} for each (u, v) ∈B do apply one of: 1. leave as is 2. user dropout: [Uu, ΦU u ] →[0, ΦU u ] 3. item dropout: [Vv, ΦV v ] →[0, ΦV v ] 4. user transform: [Uu, ΦU u ] →[meanv∈V(u)Vv, ΦU u ] 5. item transform: [Vv, ΦV v ] →[meanu∈V(v)Uu, ΦV v ] end for update fV, fU using B until convergence Output: fV, fU There are interesting parallels between our model and areas such as denoising autoencoders [20] and dimensionality reduction [17]. Analogous to denoising autoencoders, our model is trained to reproduce the input from a noisy version. The noise comes in the form of dropout that fully removes a subset of input dimensions. However, instead of reconstructing the actual uncorrupted input we minimize pairwise distances between points in the original and reconstructed spaces. Considering relevance scores S = {UuVT v |u ∈U, v ∈V} and ˆS = { ˆUu ˆVT v |u ∈U, v ∈V} as sets of points in one dimensional space, the goal is to preserve the relative ordering between the points in ˆS produced by our model and the original set S. We focus on reconstructing distances because it gives greater flexibility allowing the model to learn an entirely new latent space, and not tying it to a representation learned by another model. This objective is analogous to many popular dimensionality reduction models that project the data to a low dimensional space where relative distances between points are preserved [17]. In fact, many of the objective functions developed for dimensionality reduction can also be used here. A drawback of the objective in Equation 2 is that it depends on the input latent model and thus its accuracy. However, empirically we found this objective to work well producing robust models. The main advantages are that, first, it is simple to implement and has no additional free parameters to tune making it easy to apply to large datasets. Second, in mini-batch mode, NM unique user-item pairs can be sampled to update the networks. Even for moderate size datasets the number of pairs is in the billions making it significantly easier to train large DNNs without over-fitting. The performance is particularly robust on sparse implicit datasets commonly found in CF where R is binary and over 99% sparse. In this setting training with mini-batches sampled from raw R requires careful tuning to avoid oversampling 0’s, and to avoid getting stuck in bad local optima. 4.3 Inference Once training is completed, we fix the model and make forward passes to infer new latent representations. Ideally we would apply the model continuously throughout all stages of the user (item) journey – starting from cold start, to first few interactions and finally to an established preference profile. However, to update latent representation ˆUu as we observe first preferences from a cold 5 start user u, we need to infer the input preference vector Uu. As many leading latent models use complex non-convex objectives, updating latent representations with new preferences is a non-trivial task that requires iterative optimization. To avoid this we use a simple trick by representing each user as a weighted sum of items that the user interacted with until the input latent model is retrained. Formally, given cold start user u that has generated new set of interactions V(u) we approximate Uu with the average latent representations of the items in V(u): Uu ≈ 1 |V(u)| X v∈V(u) Vv (4) Using this approximation, we then make a forward pass through the user DNN to get the updated representation: ˆUu = fU(meanv∈V(u)Vv, ΦU u ). This procedure can be used continuously in near real-time as new data is collected until the input latent model is re-trained. Cold start items are handled in a similar way by using averages of user representations. Distribution of representations obtained via this approximation can deviate from the one produced by the input latent model. We explicitly train for this using a similar idea to dropout for cold start. Throughout learning preference input for a randomly chosen subset of users and items in each mini-batch is replaced with Equation 4. We alternate between dropout and this transformation and control for the relative frequency of each transformation (i.e., dropout fraction). Algorithm 1 outlines the full learning procedure. 5 Experiments To validate the proposed approach, we conducted extensive experiments on two publicly available datasets: CiteULike [21] and the ACM RecSys 2017 challenge dataset [2]. These datasets are chosen because they contain content information, allowing cold start evaluation. We implemented Algorithm 1 using the TensorFlow library [1]. All experiments were conducted on a server with 20-core Intel Xeon CPU E5-2630 CPU, Nvidia Titan X GPU and 128GB of RAM. We compare our model against leading CF approaches including WMF [13], CTR [21], DeepMusic [7] and CDL [22] described in Section 3. For all baselines except DeepMusic, we use the code released by respective authors, and extensively tune each model to find an optimal setting of hyper-parameters. For DeepMusic we use a modified version of the model replacing the objective function from [7] with Equation 2 which we found to work better. To make comparison fair we use the same DNN architecture (number of hidden layers and layer size) for DeepMusic and our models. All DNN models are trained with mini batches of size 100, fixed learning rate and momentum of 0.9. Algorithm 1 is applied directly to the mini batches, and we alternate between applying dropout, and inference transforms. Using τ to denote the dropout rate, for each batch we randomly select τ ∗batch size users and items. Then for batch 1 we apply dropout to selected users and items, for batch 2 inference transform and so on. We found this procedure to work well across different datasets and use it in all experiments. 5.1 CiteULike At CiteULike, registered users create scientific article libraries and save them for future reference. The goal is to leverage these libraries to recommend relevant new articles to each user. We use a subset of the CiteULike data with 5,551 users, 16,980 articles and 204,986 observed user-article pairs. This is a binary problem with R(u, v) = 1 if article v is in u’s library and R(u, v) = 0 otherwise. R is over 99.8% sparse with each user collecting an average of 37 articles. In addition to preference data, we also have article content information in the form of title and abstract. To make the comparison fair we follow the approach of [21] and use the same vocabulary of top 8,000 words selected by tf-idf. This produces the 16, 980 × 8, 000 item content matrix ΦV; since no user content is available ΦU is dropped from the model. For all evaluation we use Fold 1 from [21] (results on other folds are nearly identical) and report results of the test set from this fold. We modify warm start evaluation and measure accuracy by generating recommendations from the full set of 16, 980 articles for each user (excluding training interactions). This makes the problem more challenging, and provides a better evaluation of model performance. Cold start evaluation is the same as in [21], we remove a subset of 3396 articles from the training data and then generate recommendations from these articles at test time. 6 Figure 2: CiteULike warm and cold start results for dropout rates between 0 and 1. Method Warm Start Cold Start WMF [13] 0.592 · CTR [21] 0.597 0.589 DeepMusic [7] 0.371 0.601 CDL [22] 0.603 0.573 DN-WMF 0.593 0.636 DN-CDL 0.598 0.629 Table 1: CiteULike recall@100 warm and cold start test set results. We fix rank D = 200 for all models to stay consistent with the setup used in [21]. For our model we found that 1-hidden layer architectures with 500 hidden units and tanh activations gave good performance and going deeper did not significantly improve results. To train the model for cold start we apply dropout to preference input as outlined in Section 4.2. Here, we only apply dropout to item preferences since only item content is available. Figure 2 shows warm and cold start recall@100 accuracy for dropout rate (probability to drop) between 0 and 1. From the figure we see an interesting pattern where warm start accuracy remains virtually unchanged decreasing by less than 1% until dropout reaches 0.7 where it rapidly degrades. Cold start accuracy on the other hand, steadily increases with dropout. Moreover, without dropout cold start performance is poor and even dropout of 0.1 improves it by over 60%. This indicates that there is a region of dropout values where significant gains in cold start accuracy can be achieved without losses on warm start. Similar patterns were observed on other datasets and further validate that the proposed approach of applying dropout for cold start generalization achieves the desired effect. Warm and cold start recall@100 results are shown in Table 1. To verify that our model can be trained in conjunction with any existing latent model, we trained two versions denoted DN-WMF and DN-CDL, that use WMF and CDL as input preference models respectively. Both models were trained with preference input dropout rate of 0.5. From the table we see that most baselines produce similar results on warm start which is expected since virtually all of these models use WMF objective to model R. One exception is DeepMusic that performs significantly worse than other baselines. This can be attributed to the fact that in DeepMusic item latent representations are functions of content only and thus lack preference information. DN-WMF and DN-CDL on the other hand, perform comparably to the best baseline indicating that adding preference information as input into the model significantly improves performance over content only models like DeepMusic. Moreover, as Figure 2 suggests even aggressive dropout of 0.5 does not affect warm start performance and the our model is still able to recover the accuracy of the input latent model. Cold start results are more diverse, as expected best cold start baseline is DeepMusic. Unlike CTR and CDL that have unsupervised and semi-supervised content components, DeepMusic is end-toend supervised, and can thus learn representations that are better tailored to the target retrieval task. We also see that DNN-WMF outperforms all baselines improving recall@100 by 6% over the best baseline. This indicates that incorporating preference information as input during training can also improve cold start generalization. Moreover, WMF can’t be applied to cold start so our model effectively adds cold start capability to WMF with excellent generalization and without affecting performance on warm start. Similar pattern can be seen for DN-CDL that improves cold start performance of CDL by almost 10% without affecting warm start. 5.2 RecSys The ACM RecSys 2017 dataset was released as part of the ACM RecSys 2017 Challenge [2]. It’s a large scale data collection of user-job interactions from the career oriented social network XING (European analog of LinkedIn). Importantly, this is one of the only publicly available datasets that contains both user and item content information enabling cold start evaluation on both. In total there are 1.5M users, 1.3M jobs and over 300M interactions. Interactions are divided into six types {impression, click, bookmark, reply, delete, recruiter}, and each interaction is recorded with the corresponding type and timestamp. In addition, for users we have access to profile information such as education, work experience, location and current position. Similarly, for items we have industry, 7 (a) (b) (c) Figure 3: RecSys warm start (Figure 3(a)), user cold start (Figure 3(b)) and item cold start (Figure 3(c)) results. All figures show test set recall for truncations 50 to 500 in increments of 50. Code release by the authors of CTR and CDL is only applicable to item cold start so these baselines are excluded from user cold start evaluation. location, title/tags, career level and other related information; see [2] for full description of the data. After cleaning and transforming all categorical inputs into 1-of-n representation we ended up with 831 user features and 2738 item features forming ΦU and ΦV respectively. We process the interaction data by removing duplicate interactions (i.e. multiple clicks on the same item) and deletes, and collapse remaining interactions into a single binary matrix R where R(u, v) = 1 if user u interacted with job v and R(u, v) = 0 otherwise. We then split the data forward in time using interactions from the last two weeks as the test set. To evaluate both warm and cold start scenarios simultaneously, test set interactions are further split into three groups: warm start, user cold start and item cold start. The three groups contain approximately 426K, 159K and 184K interactions respectively with a total of 42, 153 cold start users and 49, 975 cold start items; training set contains 18.7M interactions. Cold start users and items are obtained by removing all training interactions for randomly selected subsets of users and items. The goal is to train a single model that is able to handle all three tasks. This simulates real-world scenarios for many online services like XING where new users and items are added daily and need to be recommended together with existing users and items. We set rank D = 200 for all models and in all experiments train our model (denoted DN-WMF) using latent representations from WMF. During training we alternate between applying dropout and inference approximation (see Section 4.3) for users and items in each mini-batch with a rate of 0.5. For CTR and CDL the code released by respective authors only supports item cold start so we evaluate these models on warm start and item cold start tasks only. Network Architecture Warm User Item WMF 0.426 400 0.421 0.211 0.234 800 →400 0.420 0.229 0.255 800 →800 →400 0.412 0.231 0.265 Table 2: Recsys recall@100 warm, user cold start and item cold start results for different DNN architectures. We use tanh activations and batch norm in each layer. To find the appropriate DNN architecture we conduct extensive experiments using increasingly deeper DNNs. We follow the approach of [6] and use a pyramid structure where the network gradually compresses the input witch each successive layer. For all architecture we use fully connected layers with batch norm [14] and tanh activation functions; other activation functions such as ReLU and sigmoid produced significantly worse results. All models were trained using WMF as input latent model, however note that WMF cannot be applied to either user or item cold start. Table 2 shows warm start, user cold start, and item cold start recall at 100 results as the number of layers is increased from one to four. From the table we see that up to three layers, the accuracy on both cold start tasks steadily improves with each additional layer while the accuracy on warm start remains approximately the same. These results suggest that deeper architectures are highly useful for this task. We use the three layer model in all experiments. RecSys results are shown in Figure 3. From warm start results in Figure 3(a) we see a similar pattern where all baselines perform comparably except DeepMusic, suggesting that content only models are unlikely to perform well on warm start. User and item cold start results are shown in Figures 3(b) and 3(c) respectively. From the figures we see that DeepMusic is the best performing baseline 8 significantly beating the next best baseline CTR on the item cold start. We also see that DN-WMF significantly outperforms DeepMusic with over 50% relative improvement for most truncations. This is despite the fact that DeepMusic was trained using the same 3-layer architecture and the same objective function as DN-WMF. These results further indicate that incorporating preference information as input into the model is highly important even when the end goal is cold start. Figure 4: User inference results as number of interactions is increased from 0 (cold start) to 5. User inference results are shown in Figure 4. We randomly selected a subset of 10K cold start users that have at least 5 training interactions. Note that all training interactions were removed for these users during training to simulate cold start. For each of the selected users we then incorporate training interactions one at a time into the model in chronological order using the inference procedure outlined in Section 4.3. Resulting latent representations are tested on the test set. Figure 4 shows recall@100 results as number of interactions is increased from 0 (cold start) to 5. We compare with WMF by applying similar procedure from Equation 4 to WMF representations. From the figure it is seen that our model is able to seamlessly transition from cold start to preferences without retraining. Moreover, even though our model uses WMF as input it is able to significantly outperform WMF at all interaction sizes. Item inference results are similar and are omitted. These results indicate that training with inference approximations achieves the desired effect allowing our model to transition from cold start to first few preferences without re-training and with excellent generalization. 6 Conclusion We presented DropoutNet – a deep neural network model for cold start in recommender systems. DropoutNet applies input dropout during training to condition for missing preference information. Optimization with missing data forces the model to leverage preference and content information without explicitly relying on both being present. This leads to excellent generalization on both warm and cold start scenarios. Moreover, unlike existing approaches that typically have complex multiterm objective functions, our objective only has a single term and is easy to implement and optimize. DropoutNet can be applied on top of any existing latent model effectively, providing cold-start capabilities and leveraging full power of deep architectures for content modeling. Empirically, we demonstrate state-of-the-art results on two public benchmarks. Future work includes investigating objective functions that directly incorporate preference information with the aim of improving warm start accuracy beyond the input latent model. We also plan to explore different DNN architectures for both user and item models to better leverage diverse content types. References [1] Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] F. Abel, Y. Deldjo, M. Elahi, and D. Kohlsdorf. Recsys challenge 2017. http://2017. recsyschallenge.com, 2017. [3] D. Agarwal and B.-C. Chen. Regression-based latent factor models. In Conference on Knowledge Discovery and Data Mining, 2009. [4] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3, 2003. [5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 2011. 9 [6] P. Covington, J. Adams, and E. Sargin. Deep neural networks for youtube recommendations. In ACM Recommender Systems, 2016. [7] A. Van den Oord, S. Dieleman, and B. Schrauwen. Deep content-based music recommendation. In Neural Information Processing Systems, 2013. [8] P. Gopalan, J. M. Hofman, and D. M. Blei. Scalable recommendation with poisson factorization. arXiv:1311.1704, 2013. [9] P. K. Gopalan, L. Charlin, and D. Blei. Content-based recommendations with poisson factorization. In Neural Information Processing Systems, 2014. [10] A. Graves, A.-R. Mohamed, and G. Hinton. Speech recognition with deep recurrent neural networks. In Conference on Acoustics, Speech, and Signal Processing, 2013. [11] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv:1512.03385, 2015. [12] G. E. Hinton, L. Deng, D. Yu, G. Dahl, A.-R. Mohamed, and N. Jaitly. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing, 2012. [13] Y. Hu, Y. Koren, and C. Volinsky. Collaborative filtering for implicit feedback datasets. In International Conference on Data Engineering, 2008. [14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, 2015. [15] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Neural Information Processing Systems, 2012. [16] Q. V. Le and T. Mikolov. Distributed representations of sentences and documents. In International Conference on Machine Learning, 2014. [17] L. V. D. Maaten and G. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 2008. [18] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 2014. [19] X. Su and T. M. Khoshgoftaar. A survey of collaborative filtering techniques. Advances in Artificial Intelligence, 2009. [20] P. Vincent, H. Larochelle, I. Lajoie, Y. Bengio, and P.-A. Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of Machine Learning Research, 2010. [21] C. Wang and D. M. Blei. Collaborative topic modeling for recommending scientific articles. In Conference on Knowledge Discovery and Data Mining, 2011. [22] H. Wang, N. Wang, and D.-Y. Yeung. Collaborative deep learning for recommender systems. In Conference on Knowledge Discovery and Data Mining, 2015. [23] C.-Y. Wu, A. Ahmed, A. Beutel, A. Smola, and H. Jing. Recurrent recommender networks. In Conference on Web Search and Data Mining, 2017. 10 | 2017 | 565 |
7,080 | Unsupervised Image-to-Image Translation Networks Ming-Yu Liu, Thomas Breuel, Jan Kautz NVIDIA {mingyul,tbreuel,jkautz}@nvidia.com Abstract Unsupervised image-to-image translation aims at learning a joint distribution of images in different domains by using images from the marginal distributions in individual domains. Since there exists an infinite set of joint distributions that can arrive the given marginal distributions, one could infer nothing about the joint distribution from the marginal distributions without additional assumptions. To address the problem, we make a shared-latent space assumption and propose an unsupervised image-to-image translation framework based on Coupled GANs. We compare the proposed framework with competing approaches and present high quality image translation results on various challenging unsupervised image translation tasks, including street scene image translation, animal image translation, and face image translation. We also apply the proposed framework to domain adaptation and achieve state-of-the-art performance on benchmark datasets. Code and additional results are available in https://github.com/mingyuliutw/unit. 1 Introduction Many computer visions problems can be posed as an image-to-image translation problem, mapping an image in one domain to a corresponding image in another domain. For example, super-resolution can be considered as a problem of mapping a low-resolution image to a corresponding high-resolution image; colorization can be considered as a problem of mapping a gray-scale image to a corresponding color image. The problem can be studied in supervised and unsupervised learning settings. In the supervised setting, paired of corresponding images in different domains are available [8, 15]. In the unsupervised setting, we only have two independent sets of images where one consists of images in one domain and the other consists of images in another domain—there exist no paired examples showing how an image could be translated to a corresponding image in another domain. Due to lack of corresponding images, the UNsupervised Image-to-image Translation (UNIT) problem is considered harder, but it is more applicable since training data collection is easier. When analyzing the image translation problem from a probabilistic modeling perspective, the key challenge is to learn a joint distribution of images in different domains. In the unsupervised setting, the two sets consist of images from two marginal distributions in two different domains, and the task is to infer the joint distribution using these images. The coupling theory [16] states there exist an infinite set of joint distributions that can arrive the given marginal distributions in general. Hence, inferring the joint distribution from the marginal distributions is a highly ill-posed problem. To address the ill-posed problem, we need additional assumptions on the structure of the joint distribution. To this end we make a shared-latent space assumption, which assumes a pair of corresponding images in different domains can be mapped to a same latent representation in a shared-latent space. Based on the assumption, we propose a UNIT framework that are based on generative adversarial networks (GANs) and variational autoencoders (VAEs). We model each image domain using a VAE-GAN. The adversarial training objective interacts with a weight-sharing constraint, which enforces a sharedlatent space, to generate corresponding images in two domains, while the variational autoencoders relate translated images with input images in the respective domains. We applied the proposed 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Z : shared latent space z x1 x2 E1 E2 G1 G2 X2 X1 x1 x2 z ˜x1!1 1 ˜x2!1 2 ˜x1!2 1 ˜x2!2 2 E1 E2 G2 G1 (a) (b) T/F T/F D1 D2 Figure 1: (a) The shared latent space assumption. We assume a pair of corresponding images (x1, x2) in two different domains X1 and X2 can be mapped to a same latent code z in a shared-latent space Z. E1 and E2 are two encoding functions, mapping images to latent codes. G1 and G2 are two generation functions, mapping latent codes to images. (b) The proposed UNIT framework. We represent E1 E2 G1 and G2 using CNNs and implement the shared-latent space assumption using a weight sharing constraint where the connection weights of the last few layers (high-level layers) in E1 and E2 are tied (illustrated using dashed lines) and the connection weights of the first few layers (high-level layers) in G1 and G2 are tied. Here, ˜x1!1 1 and ˜x2!2 2 are self-reconstructed images, and ˜x1!2 1 and ˜x2!1 2 are domain-translated images. D1 and D2 are adversarial discriminators for the respective domains, in charge of evaluating whether the translated images are realistic. Table 1: Interpretation of the roles of the subnetworks in the proposed framework. Networks {E1, G1} {E1, G2} {G1, D1} {E1, G1, D1} {G1, G2, D1, D2} Roles VAE for X1 Image Translator X1 ! X2 GAN for X1 VAE-GAN [14] CoGAN [17] framework to various unsupervised image-to-image translation problems and achieved high quality image translation results. We also applied it to the domain adaptation problem and achieved state-ofthe-art accuracies on benchmark datasets. The shared-latent space assumption was used in Coupled GAN [17] for joint distribution learning. Here, we extend the Coupled GAN work for the UNIT problem. We also note that several contemporary works propose the cycle-consistency constraint assumption [29, 10], which hypothesizes the existence of a cycle-consistency mapping so that an image in the source domain can be mapped to an image in the target domain and this translated image in the target domain can be mapped back to the original image in the source domain. In the paper, we show that the shared-latent space constraint implies the cycle-consistency constraint. 2 Assumptions Let X1 and X2 be two image domains. In supervised image-to-image translation, we are given samples (x1, x2) drawn from a joint distribution PX1,X2(x1, x2). In unsupervised image-to-image translation, we are given samples drawn from the marginal distributions PX1(x1) and PX2(x2). Since an infinite set of possible joint distributions can yield the given marginal distributions, we could infer nothing about the joint distribution from the marginal samples without additional assumptions. We make the shared-latent space assumption. As shown Figure 1, we assume for any given pair of images x1 and x2, there exists a shared latent code z in a shared-latent space, such that we can recover both images from this code, and we can compute this code from each of the two images. That is, we postulate there exist functions E⇤ 1, E⇤ 2, G⇤ 1, and G⇤ 2 such that, given a pair of corresponding images (x1, x2) from the joint distribution, we have z = E⇤ 1(x1) = E⇤ 2(x2) and conversely x1 = G⇤ 1(z) and x2 = G⇤ 2(z). Within this model, the function x2 = F ⇤ 1!2(x1) that maps from X1 to X2 can be represented by the composition F ⇤ 1!2(x1) = G⇤ 2(E⇤ 1(x1)). Similarly, x1 = F ⇤ 2!1(x2) = G⇤ 1(E⇤ 2(x2)). The UNIT problem then becomes a problem of learning F ⇤ 1!2 and F ⇤ 2!1. We note that a necessary condition for F ⇤ 1!2 and F ⇤ 2!1 to exist is the cycle-consistency constraint [29, 10]: x1 = F ⇤ 2!1(F ⇤ 1!2(x1)) and x2 = F ⇤ 1!2(F ⇤ 2!1(x2)). We can reconstruct the input image from translating back the translated input image. In other words, the proposed shared-latent space assumption implies the cycle-consistency assumption (but not vice versa). To implement the shared-latent space assumption, we further assume a shared intermediate representation h such that the process of generating a pair of corresponding images admits a form of 2 z ! h % x1 & x2 . (1) Consequently, we have G⇤ 1 ⌘G⇤ L,1 ◦G⇤ H and G⇤ 2 ⌘G⇤ L,2 ◦G⇤ H where G⇤ H is a common high-level generation function that maps z to h and G⇤ L,1 and G⇤ L,2 are low-level generation functions that map h to x1 and x2, respectively. In the case of multi-domain image translation (e.g., sunny and rainy image translation), z can be regarded as the compact, high-level representation of a scene ("car in front, trees in back"), and h can be considered a particular realization of z through G⇤ H ("car/tree occupy the following pixels"), and G⇤ L,1 and G⇤ L,2 would be the actual image formation functions in each modality ("tree is lush green in the sunny domain, but dark green in the rainy domain"). Assuming h also allow us to represent E⇤ 1 and E⇤ 2 by E⇤ 1 ⌘E⇤ H ◦E⇤ L,1 and E⇤ 2 ⌘E⇤ H ◦E⇤ L,2. In the next section, we discuss how we realize the above ideas in the proposed UNIT framework. 3 Framework Our framework, as illustrated in Figure 1, is based on variational autoencoders (VAEs) [13, 22, 14] and generative adversarial networks (GANs) [6, 17]. It consists of 6 subnetworks: including two domain image encoders E1 and E2, two domain image generators G1 and G2, and two domain adversarial discriminators D1 and D2. Several ways exist to interpret the roles of the subnetworks, which we summarize in Table 1. Our framework learns translation in both directions in one shot. VAE. The encoder–generator pair {E1, G1} constitutes a VAE for the X1 domain, termed VAE1. For an input image x1 2 X1, the VAE1 first maps x1 to a code in a latent space Z via the encoder E1 and then decodes a random-perturbed version of the code to reconstruct the input image via the generator G1. We assume the components in the latent space Z are conditionally independent and Gaussian with unit variance. In our formulation, the encoder outputs a mean vector Eµ,1(x1) and the distribution of the latent code z1 is given by q1(z1|x1) ⌘N(z1|Eµ,1(x1), I) where I is an identity matrix. The reconstructed image is ˜x1!1 1 = G1(z1 ⇠q1(z1|x1)). Note that here we abused the notation since we treated the distribution of q1(z1|x1) as a random vector of N(Eµ,1(x1), I) and sampled from it. Similarly, {E2, G2} constitutes a VAE for X2: VAE2 where the encoder E2 outputs a mean vector Eµ,2(x2) and the distribution of the latent code z2 is given by q2(z2|x2) ⌘N(z2|Eµ,2(x2), I). The reconstructed image is ˜x2!2 2 = G2(z2 ⇠q2(z2|x2)). Utilizing the reparameterization trick [13], the non-differentiable sampling operation can be reparameterized as a differentiable operation using auxiliary random variables. This reparameterization trick allows us to train VAEs using back-prop. Let ⌘be a random vector with a multi-variate Gaussian distribution: ⌘⇠N(⌘|0, I). The sampling operations of z1 ⇠q1(z1|x1) and z2 ⇠q2(z2|x2) can be implemented via z1 = Eµ,1(x1) + ⌘and z2 = Eµ,2(x2) + ⌘, respectively. Weight-sharing. Based on the shared-latent space assumption discussed in Section 2, we enforce a weight-sharing constraint to relate the two VAEs. Specifically, we share the weights of the last few layers of E1 and E2 that are responsible for extracting high-level representations of the input images in the two domains. Similarly, we share the weights of the first few layers of G1 and G2 responsible for decoding high-level representations for reconstructing the input images. Note that the weight-sharing constraint alone does not guarantee that corresponding images in two domains will have the same latent code. In the unsupervised setting, no pair of corresponding images in the two domains exists to train the network to output a same latent code. The extracted latent codes for a pair of corresponding images are different in general. Even if they are the same, the same latent component may have different semantic meanings in different domains. Hence, the same latent code could still be decoded to output two unrelated images. However, we will show that through adversarial training, a pair of corresponding images in the two domains can be mapped to a common latent code by E1 and E2, respectively, and a latent code will be mapped to a pair of corresponding images in the two domains by G1 and G2, respectively. The shared-latent space assumption allows us to perform image-to-image translation. We can translate an image x1 in X1 to an image in X2 through applying G2(z1 ⇠q1(z1|x1)). We term such an information processing stream as the image translation stream. Two image translation streams exist in the proposed framework: X1 ! X2 and X2 ! X1. The two streams are trained jointly with the two image reconstruction streams from the VAEs. Once we could ensure that a pair of corresponding 3 images are mapped to a same latent code and a same latent code is decoded to a pair of corresponding images, (x1, G2(z1 ⇠q1(z1|x1))) would form a pair of corresponding images. In other words, the composition of E1 and G2 functions approximates F ⇤ 1!2 for unsupervised image-to-image translation discussed in Section 2, and the composition of E2 and G1 function approximates F ⇤ 2!1. GANs. Our framework has two generative adversarial networks: GAN1 = {D1, G1} and GAN2 = {D2, G2}. In GAN1, for real images sampled from the first domain, D1 should output true, while for images generated by G1, it should output false. G1 can generate two types of images: 1) images from the reconstruction stream ˜x1!1 1 = G1(z1 ⇠q1(z1|x1)) and 2) images from the translation stream ˜x2!1 2 = G1(z2 ⇠q2(z2|x2)). Since the reconstruction stream can be supervisedly trained, it is suffice that we only apply adversarial training to images from the translation stream, ˜x2!1 2 . We apply a similar processing to GAN2 where D2 is trained to output true for real images sampled from the second domain dataset and false for images generated from G2. Cycle-consistency (CC). Since the shared-latent space assumption implies the cycle-consistency constraint (See Section 2), we could also enforce the cycle-consistency constraint in the proposed framework to further regularize the ill-posed unsupervised image-to-image translation problem. The resulting information processing stream is called the cycle-reconstruction stream. Learning. We jointly solve the learning problems of the VAE1, VAE2, GAN1 and GAN2 for the image reconstruction streams, the image translation streams, and the cycle-reconstruction streams: min E1,E2,G1,G2 max D1,D2LVAE1(E1, G1) + LGAN1(E1, G1, D1) + LCC1(E1, G1, E2, G2) LVAE2(E2, G2) + LGAN2(E2, G2, D2) + LCC2(E2, G2, E1, G1). (2) VAE training aims for minimizing a variational upper bound In (2), the VAE objects are LVAE1(E1, G1) =λ1KL(q1(z1|x1)||p⌘(z)) −λ2Ez1⇠q1(z1|x1)[log pG1(x1|z1)] (3) LVAE2(E2, G2) =λ1KL(q2(z2|x2)||p⌘(z)) −λ2Ez2⇠q2(z2|x2)[log pG2(x2|z2)]. (4) where the hyper-parameters λ1 and λ2 control the weights of the objective terms and the KL divergence terms penalize deviation of the distribution of the latent code from the prior distribution. The regularization allows an easy way to sample from the latent space [13]. We model pG1 and pG2 using Laplacian distributions, respectively. Hence, minimizing the negative log-likelihood term is equivalent to minimizing the absolute distance between the image and the reconstructed image. The prior distribution is a zero mean Gaussian p⌘(z) = N(z|0, I). In (2), the GAN objective functions are given by LGAN1(E1, G1, D1) = λ0Ex1⇠PX1 [log D1(x1)] + λ0Ez2⇠q2(z2|x2)[log(1 −D1(G1(z2)))] (5) LGAN2(E2, G2, D2) = λ0Ex2⇠PX2 [log D2(x2)] + λ0Ez1⇠q1(z1|x1)[log(1 −D2(G2(z1)))]. (6) The objective functions in (5) and (6) are conditional GAN objective functions. They are used to ensure the translated images resembling images in the target domains, respectively. The hyperparameter λ0 controls the impact of the GAN objective functions. We use a VAE-like objective function to model the cycle-consistency constraint, which is given by LCC1(E1, G1, E2, G2) =λ3KL(q1(z1|x1)||p⌘(z)) + λ3KL(q2(z2|x1!2 1 ))||p⌘(z))− λ4Ez2⇠q2(z2|x1!2 1 )[log pG1(x1|z2)] (7) LCC2(E2, G2, E1, G1) =λ3KL(q2(z2|x2)||p⌘(z)) + λ3KL(q1(z1|x2!1 2 ))||p⌘(z))− λ4Ez1⇠q1(z1|x2!1 2 )[log pG2(x2|z1)]. (8) where the negative log-likelihood objective term ensures a twice translated image resembles the input one and the KL terms penalize the latent codes deviating from the prior distribution in the cycle-reconstruction stream (Therefore, there are two KL terms). The hyper-parameters λ3 and λ4 control the weights of the two different objective terms. Inheriting from GAN, training of the proposed framework results in solving a mini-max problem where the optimization aims to find a saddle point. It can be seen as a two player zero-sum game. The first player is a team consisting of the encoders and generators. The second player is a team consisting of the adversarial discriminators. In addition to defeating the second player, the first player has to minimize the VAE losses and the cycle-consistency losses. We apply an alternating gradient 4 Accuracy 0 0.14 0.28 0.42 0.56 0.7 # of shared layers in gen. 1 2 3 4 6푳 Dis 5푳 Dis 4푳 Dis 3푳 Dis 0 0.14 0.28 0.42 0.56 0.7 ힴ2 1000 100 10 1 ힴ1=10 ힴ1=1 ힴ1=0.1 ힴ1=0.01 Method Accuracy Weight Sharing 0.569±0.029 Cycle Consistenc 0.568±0.010 Proposed 0.600±0.015 (a) (b) (c) (d) λ1 = 1 λ1 = 0.1 λ1 = 0.01 λ1 = 10 λ2 Figure 2: (a) Illustration of the Map dataset. Left: satellite image. Right: map. We translate holdout satellite images to maps and measure the accuracy achieved by various configurations of the proposed framework. (b) Translation accuracy versus different network architectures. (c) Translation accuracy versus different hyper-parameter values. (d) Impact of weight-sharing and cycle-consistency constraints on translation accuracy. update scheme similar to the one described in [6] to solve (2). Specifically, we first apply a gradient ascent step to update D1 and D2 with E1, E2, G1, and G2 fixed. We then apply a gradient descent step to update E1, E2, G1, and G2 with D1 and D2 fixed. Translation: After learning, we obtain two image translation functions by assembling a subset of the subnetworks. We have F1!2(x1) = G2(z1 ⇠q1(z1|x1)) for translating images from X1 to X2 and F2!1(x2) = G1(z2 ⇠q2(z2|x2)) for translating images from X2 to X1. 4 Experiments We first analyze various components of the proposed framework. We then present visual results on challenging translation tasks. Finally, we apply our framework to the domain adaptation tasks. Performance Analysis. We used ADAM [11] for training where the learning rate was set to 0.0001 and momentums were set to 0.5 and 0.999. Each mini-batch consisted of one image from the first domain and one image from the second domain. Our framework had several hyper-parameters. The default values were λ0 = 10, λ3 = λ1 = 0.1 and λ4 = λ2 = 100. For the network architecture, our encoders consisted of 3 convolutional layers as the front-end and 4 basic residual blocks [7] as the back-end. The generators consisted of 4 basic residual blocks as the front-end and 3 transposed convolutional layers as the back-end. The discriminators consisted of stacks of convolutional layers. We used LeakyReLU for nonlinearity. The details of the networks are given in Appendix A. We used the map dataset [8] (visualized in Figure 2), which contained corresponding pairs of images in two domains (satellite image and map) useful for quantitative evaluation. Here, the goal was to learn to translate between satellite images and maps. We operated in an unsupervised setting where we used the 1096 satellite images from the training set as the first domain and 1098 maps from the validation set as the second domain. We trained for 100K iterations and used the final model to translate 1098 satellite images in the test set. We then compared the difference between a translated satellite image (supposed to be maps) and the corresponding ground truth maps pixel-wisely. A pixel translation was counted correct if the color difference was within 16 of the ground truth color value. We used the average pixel accuracy over the images in the test set as the performance metric. We could use color difference for measuring translation accuracy since the target translation function was unimodal. We did not evaluate the translation from maps to images since the translation was multi-modal, which was difficult to construct a proper evaluation metric. In one experiment, we varied the number of weight-sharing layers in the VAEs and paired each configuration with discriminator architectures of different depths during training. We changed the number of weight-sharing layers from 1 to 4. (Sharing 1 layer in VAEs means sharing 1 layer for E1 and E2 and, at the same time, sharing 1 layer for G1 and G2.) The results were reported in Figure 2(b). Each curve corresponded to a discriminator architecture of a different depth. The x-axis denoted the number of weigh-sharing layers in the VAEs. We found that the shallowest discriminator architecture led to the worst performance. We also found that the number of weight-sharing layer had little impact. This was due to the use of the residual blocks. As tying the weight of one layer, it effectively constrained the other layers since the residual blocks only updated the residual information. In the rest of the experiments, we used VAEs with 1 sharing layer and discriminators of 5 layers. 5 We analyzed impact of the hyper-parameter values to the translation accuracy. For different weight values on the negative log likelihood terms (i.e., λ2, λ4), we computed the achieved translation accuracy over different weight values on the KL terms (i.e., λ1, λ3). The results were reported in Figure 2(c). We found that, in general, a larger weight value on the negative log likelihood terms yielded a better translation accuracy. We also found setting the weights of the KL terms to 0.1 resulted in consistently good performance. We hence set λ1 = λ3 = 0.1 and λ2 = λ4 = 100. We performed an ablation study measuring impact of the weight-sharing and cycle-consistency constraints to the translation performance and showed the results in Figure 2(d). We reported average accuracy over 5 trials (trained with different initialized weights.). We note that when we removed the weight-sharing constraint (as a consequence, we also removed the reconstruction streams in the framework), the framework was reduced to the CycleGAN architecture [29, 10]. We found the model achieved an average pixel accuracy of 0.569. When we removed the cycle-consistency constraint and only used the weight-sharing constraint1, it achieved 0.568 average pixel accuracy. But when we used the full model, it achieved the best performance of 0.600 average pixel accuracy. This echoed our point that for the ill-posed joint distribution recovery problem, more constraints are beneficial. Qualitative results. Figure 3 to 6 showed results of the proposed framework on various UNIT tasks. Street images. We applied the proposed framework to several unsupervised street scene image translation tasks including sunny to rainy, day to night, summery to snowy, and vice versa. For each task, we used a set of images extracted from driving videos recorded at different days and cities. The numbers of the images in the sunny/day, rainy, night, summery, and snowy sets are 86165, 28915, 36280, 6838, and 6044. We trained the network to translate street scene image of size 640⇥480. In Figure 3, we showed several example translation results . We found that our method could generate realistic translated images. We also found that one translation was usually harder than the other. Specifically, the translation that required adding more details to the image was usually harder (e.g. night to day). Additional results are available in https://github.com/mingyuliutw/unit. Synthetic to real. In Figure 3, we showed several example results achieved by applying the proposed framework to translate images between the synthetic images in the SYNTHIA dataset [23] and the real images in the Cityscape dataset [2]. For the real to synthetic translation, we found our method made the cityscape images cartoon like. For the synthetic to real translation, our method achieved better results in the building, sky, road, and car regions than in the human regions. Dog breed conversion. We used the images of Husky, German Shepherd, Corgi, Samoyed, and Old English Sheep dogs in the ImageNet dataset to learn to translate dog images between different breeds. We only used the head regions, which were extracted by a template matching algorithm. Several example results were shown in Figure 4. We found our method translated a dog to a different breed. Cat species conversion. We also used the images of house cat, tiger, lion, cougar, leopard, jaguar, and cheetah in the ImageNet dataset to learn to translate cat images between different species. We only used the head regions, which again were extracted by a template matching algorithm. Several example results were shown in Figure 5. We found our method translated a cat to a different specie. Face attribute. We used the CelebA dataset [18] for attribute-based face images translation. Each face image in the dataset had several attributes, including blond hair, smiling, goatee, and eyeglasses. The face images with an attribute constituted the 1st domain, while those without the attribute constituted the 2nd domain. In Figure 6, we visualized the results where we translated several images that do not have blond hair, eye glasses, goatee, and smiling to corresponding images with each of the individual attributes. We found that the translated face images were realistic. Domain Adaptation. We applied the proposed framework to the problem for adapting a classifier trained using labeled samples in one domain (source domain) to classify samples in a new domain (target domain) where labeled samples in the new domain are unavailable during training. Early works have explored ideas from subspace learning [4] to deep feature learning [5, 17, 26]. We performed multi-task learning where we trained the framework to 1) translate images between the source and target domains and 2) classify samples in the source domain using the features extracted by the discriminator in the source domain. Here, we tied the weights of the high-level layers of D1 and D2. This allows us to adapt a classifier trained in the source domain to the target domain. Also, for a pair of generated images in different domains, we minimized the L1 distance 1We used this architecture in an earlier version of the paper. 6 Figure 3: Street scene image translation results. For each pair, left is input and right is the translated image. Input Old Eng. Sheep Dog Husky German Shepherd Corgi Input Husky Corgi Figure 4: Dog breed translation results. Input Cheetah Leopard Tiger Lion Cougar Input Leopard Figure 5: Cat species translation results. Input +Blond Hair +Eyeglasses +Goatee +Smiling Input +Blond Hair +Eyeglasses +Goatee +Smiling Figure 6: Attribute-based face translation results. 7 Table 2: Unsupervised domain adaptation performance. The reported numbers are classification accuracies. Method SA [4] DANN [5] DTN [26] CoGAN UNIT (proposed) SVHN! MNIST 0.5932 0.7385 0.8488 0.9053 MNIST! USPS 0.9565 0.9597 USPS! MNIST 0.9315 0.9358 between the features extracted by the highest layer of the discriminators, which further encouraged D1 and D2 to interpret a pair of corresponding images in the same way. We applied the approach to several tasks including adapting from the Street View House Number (SVHN) dataset [20] to the MNIST dataset and adapting between the MNIST and USPS datasets. Table 2 reported the achieved performance with comparison to the competing approaches. We found that our method achieved a 0.9053 accuracy for the SVHN!MNIST task, which was much better than 0.8488 achieved by the previous state-of-the-art method [26]. We also achieved better performance for the MNIST$SVHN task than the Coupled GAN approach, which was the state-of-the-art. The digit images had a small resolution. Hence, we used a small network. We also found that the cycle-consistency constraint was not necessary for this task. More details about the experiments are available in Appendix B. 5 Related Work Several deep generative models were recently proposed for image generation including GANs [6], VAEs [13, 22], and PixelCNN [27]. The proposed framework was based on GANs and VAEs but it was designed for the unsupervised image-to-image translation task, which could be considered as a conditional image generation model. In the following, we first review several recent GAN and VAE works and then discuss related image translation works. GAN learning is via staging a zero-sum game between the generator and discriminator. The quality of GAN-generated images had improved dramatically since the introduction. LapGAN [3] proposed a Laplacian pyramid implementation of GANs. DCGAN [21] used a deeper convolutional network. Several GAN training tricks were proposed in [24]. WGAN [1] used the Wasserstein distance. VAEs optimize a variational bound. By improving the variational approximation, better image generation results were achieved [19, 12]. In [14], a VAE-GAN architecture was proposed to improve image generation quality of VAEs. VAEs were applied to translate face image attribute in [28]. Conditional generative model is a popular approach for mapping an image from one domain to another. Most of the existing works were based on supervised learning [15, 8, 9]. Our work differed to the previous works in that we do not need corresponding images. Recently, [26] proposed the domain transformation network (DTN) and achieved promising results on translating small resolution face and digit images. In addition to faces and digits, we demonstrated that the proposed framework can translate large resolution natural images. It also achieved a better performance in the unsupervised domain adaptation task. In [25], a conditional generative adversarial network-based approach was proposed to translate a rendering images to a real image for gaze estimation. In order to ensure the generated real image was similar to the original rendering image, the L1 distance between the generated and original image was minimized. We note that two contemporary papers [29, 10] independently introduced the cycle-consistency constraint for the unsupervised image translation. We showed that that the cycle-consistency constraint is a natural consequence of the proposed shared-latent space assumption. From our experiment, we found that cycle-consistency and the weight-sharing (a realization of the shared-latent space assumption) constraints rendered comparable performance. When the two constraints were jointed used, the best performance was achieved. 6 Conclusion and Future Work We presented a general framework for unsupervised image-to-image translation. We showed it learned to translate an image from one domain to another without any corresponding images in two domains in the training dataset. The current framework has two limitations. First, the translation model is unimodal due to the Gaussian latent space assumption. Second, training could be unstable due to the saddle point searching problem. We plan to address these issues in the future work. 8 References [1] M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein gan. arXiv preprint arXiv:1701.07875, 2017. [2] M. Cordts, M. Omran, S. Ramos, T. Scharwächter, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. The cityscapes dataset. Conference on Computer Vision and Pattern Recognition Workshop, 2015. [3] E. L. Denton, S. Chintala, R. Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. Advances in Neural Information Processing Systems, 2015. [4] B. Fernando, A. Habrard, M. Sebban, and T. Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. International Conference on Computer Vision, 2013. [5] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F. Laviolette, M. Marchand, and V. Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 2016. [6] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. Advances in Neural Information Processing Systems, 2014. [7] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. Computer Vision and Pattern Recognition, 2016. [8] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Image-to-image translation with conditional adversarial networks. Conference on Computer Vision and Pattern Recognition, 2017. [9] J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. European Conference in Computer Vision, 2016. [10] T. Kim, M. Cha, H. Kim, J. Lee, and J. Kim. Learning to discover cross-domain relations with generative adversarial networks. International Conference on Machine Learning, 2017. [11] D. Kingma and J. Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 2015. [12] D. P. Kingma, T. Salimans, and M. Welling. Improving variational inference with inverse autoregressive flow. Advances in Neural Information Processing Systems, 2016. [13] D. P. Kingma and M. Welling. Auto-encoding variational bayes. International Conference on Learning Representations, 2014. [14] A. B. L. Larsen, S. K. Sønderby, H. Larochelle, and O. Winther. Autoencoding beyond pixels using a learned similarity metric. International Conference on Machine Learning, 2016. [15] C. Ledig, L. Theis, F. Huszár, J. Caballero, A. Cunningham, A. Acosta, A. Aitken, A. Tejani, J. Totz, Z. Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. Conference on Computer Vision and Pattern Recognition, 2017. [16] T. Lindvall. Lectures on the coupling method. Courier Corporation, 2002. [17] M.-Y. Liu and O. Tuzel. Coupled generative adversarial networks. Advances in Neural Information Processing Systems, 2016. [18] Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. International Conference on Computer Vision, 2015. [19] L. Maaløe, C. K. Sønderby, S. K. Sønderby, and O. Winther. Auxiliary deep generative models. International Conference on Machine Learning, 2016. [20] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. Advances in Neural Information Processing Systems workshop, 2011. [21] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. International Conference on Learning Representations, 2016. [22] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and variational inference in deep latent gaussian models. International Conference on Machine Learning, 2014. [23] G. Ros, L. Sellart, J. Materzynska, D. Vazquez, and A. Lopez. The SYNTHIA Dataset: A large collection of synthetic images for semantic segmentation of urban scenes. Conference on Computer Vision and Pattern Recognition, 2016. [24] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. Advances in Neural Information Processing Systems, 2016. [25] A. Shrivastava, T. Pfister, O. Tuzel, J. Susskind, W. Wang, and R. Webb. Learning from simulated and unsupervised images through adversarial training. Conference on Computer Vision and Pattern Recognition, 2017. [26] Y. Taigman, A. Polyak, and L. Wolf. Unsupervised cross-domain image generation. International Conference on Learning Representations, 2017. [27] A. van den Oord, N. Kalchbrenner, L. Espeholt, O. Vinyals, A. Graves, et al. Conditional image generation with pixelcnn decoders. Advances in Neural Information Processing Systems, 2016. [28] X. Yan, J. Yang, K. Sohn, and H. Lee. Attribute2image: Conditional image generation from visual attributes. European Conference in Computer Vision, 2016. [29] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. International Conference on Computer Vision, 2017. 9 | 2017 | 566 |
7,081 | SVCCA: Singular Vector Canonical Correlation Analysis for Deep Learning Dynamics and Interpretability Maithra Raghu,1,2 Justin Gilmer,1 Jason Yosinski,3 & Jascha Sohl-Dickstein1 1Google Brain 2Cornell University 3Uber AI Labs maithrar@gmail•com, gilmer@google•com, yosinski@uber•com, jaschasd@google•com Abstract We propose a new technique, Singular Vector Canonical Correlation Analysis (SVCCA), a tool for quickly comparing two representations in a way that is both invariant to affine transform (allowing comparison between different layers and networks) and fast to compute (allowing more comparisons to be calculated than with previous methods). We deploy this tool to measure the intrinsic dimensionality of layers, showing in some cases needless over-parameterization; to probe learning dynamics throughout training, finding that networks converge to final representations from the bottom up; to show where class-specific information in networks is formed; and to suggest new training regimes that simultaneously save computation and overfit less. 1 Introduction As the empirical success of deep neural networks ([7, 9, 18]) become an indisputable fact, the goal of better understanding these models escalates in importance. Central to this aim is a core issue of deciphering learned representations. Facets of this key question have been explored empirically, particularly for image models, in [1, 2, 10, 12, 13, 14, 15, 19, 20]. Most of these approaches are motivated by interpretability of learned representations. More recently, [11] studied the similarities of representations learned by multiple networks by finding permutations of neurons with maximal correlation. In this work we introduce a new approach to the study of network representations, based on an analysis of each neuron’s activation vector – the scalar outputs it emits on input datapoints. With this interpretation of neurons as vectors (and layers as subspaces, spanned by neurons), we introduce SVCCA, Singular Vector Canonical Correlation Analysis, an amalgamation of Singular Value Decomposition and Canonical Correlation Analysis (CCA) [5], as a powerful method for analyzing deep representations. Although CCA has not previously been used to compare deep representations, it has been used for related tasks such as computing the similarity between modeled and measured brain activity [16], and training multi-lingual word embeddings in language models [3]. The main contributions resulting from the introduction of SVCCA are the following: 1. We ask: is the dimensionality of a layer’s learned representation the same as the number of neurons in the layer? Answer: No. We show that trained networks perform equally well with a number of directions just a fraction of the number of neurons with no additional training, provided they are carefully chosen with SVCCA (Section 2.1). We explore the consequences for model compression (Section 4.4). 2. We ask: what do deep representation learning dynamics look like? Answer: Networks broadly converge bottom up. Using SVCCA, we compare layers across time and find they 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. index over dataset index over dataset index over dataset Neurons with highest activations (net1, net2) Top SVD Directions (net1, net2) Top SVCCA directions (net1, net2) 200 200 200 200 4 1 network (a) (b) (c) (d) Figure 1: To demonstrate SVCCA, we consider a toy regression task (regression target as in Figure 3). (a) We train two networks with four fully connected hidden layers starting from different random initializations, and examine the representation learned by the penultimate (shaded) layer in each network. (b) The neurons with the highest activations in net 1 (maroon) and in net 2 (green). The x-axis indexes over the dataset: in our formulation, the representation of a neuron is simply its value over a dataset (Section 2). (c) The SVD directions — i.e. the directions of maximal variance — for each network. (d) The top SVCCA directions. We see that each pair of maroon/green lines (starting from the top) are almost visually identical (up to a sign). Thus, although looking at just neurons (b) seems to indicate that the networks learn very different representations, looking at the SVCCA subspace (d) shows that the information in the representations are (up to a sign) nearly identical. solidify from the bottom up. This suggests a simple, computationally more efficient method of training networks, Freeze Training, where lower layers are sequentially frozen after a certain number of timesteps (Sections 4.1, 4.2). 3. We develop a method based on the discrete Fourier transform which greatly speeds up the application of SVCCA to convolutional neural networks (Section 3). 4. We also explore an interpretability question, of when an architecture becomes sensitive to different classes. We find that SVCCA captures the semantics of different classes, with similar classes having similar sensitivities, and vice versa. (Section 4.3). Experimental Details Most of our experiments are performed on CIFAR-10 (augmented with random translations). The main architectures we use are a convolutional network and a residual network1. To produce a few figures, we also use a toy regression task: training a four hidden layer fully connected network with 1D input and 4D output, to regress on four different simple functions. 2 Measuring Representations in Neural Networks Our goal in this paper is to analyze and interpret the representations learned by neural networks. The critical question from which our investigation departs is: how should we define the representation of a neuron? Consider that a neuron at a particular layer in a network computes a real-valued function over the network’s input domain. In other words, if we had a lookup table of all possible input →output mappings for a neuron, it would be a complete portrayal of that neuron’s functional form. However, such infinite tables are not only practically infeasible, but are also problematic to process into a set of conclusions. Our primary interest is not in the neuron’s response to random data, but rather in how it represents features of a specific dataset (e.g. natural images). Therefore, in this study we take a neuron’s representation to be its set of responses over a finite set of inputs — those drawn from some training or validation set. More concretely, for a given dataset X = {x1, · · · xm} and a neuron i on layer l, zzzl i, we define zzzl i to be the vector of outputs on X, i.e. zzzl i = (zzzl i(x1), · · · ,zzzl i(xm)) 1Convnet layers: conv-conv-bn-pool-conv-conv-conv-bn-pool-fc-bn-fc-bn-out. Resnet layers: conv-(x10 c/bn/r block)-(x10 c/bn/r block)-(x10 c/bn/r block)-bn-fc-out. 2 Note that this is a different vector from the often-considered vector of the “representation at a layer of a single input.” Here zzzl i is a single neuron’s response over the entire dataset, not an entire layer’s response for a single input. In this view, a neuron’s representation can be thought of as a single vector in a high-dimensional space. Broadening our view from a single neuron to the collection of neurons in a layer, the layer can be thought of as the set of neuron vectors contained within that layer. This set of vectors will span some subspace. To summarize: Considered over a dataset X with m examples, a neuron is a vector in Rm. A layer is the subspace of Rm spanned by its neurons’ vectors. Within this formalism, we introduce Singular Vector Canonical Correlation Analysis (SVCCA) as a method for analysing representations. SVCCA proceeds as follows: • Input: SVCCA takes as input two (not necessarily different) sets of neurons (typically layers of a network) l1 = {zzzl1 1 , ...,zzzl1 m1} and l2 = {zzzl2 1 , ...,zzzl2 m2} • Step 1 First SVCCA performs a singular value decomposition of each subspace to get subsubspaces l′ 1 ⊂l1, l′ 2 ⊂l2 which comprise of the most important directions of the original subspaces l1, l2. In general we take enough directions to explain 99% of variance in the subspace. This is especially important in neural network representations, where as we will show many low variance directions (neurons) are primarily noise. • Step 2 Second, compute the Canonical Correlation similarity ([5]) of l′ 1, l′ 2: linearly transform l′ 1, l′ 2 to be as aligned as possible and compute correlation coefficients. In particular, given the output of step 1, l′ 1 = {zzz′l1 1 , ...,zzz′l1 m′ 1}, l′ 2 = {zzz′l2 1 , ...,zzz′l2 m′ 2}, CCA linearly transforms these subspaces ˜l1 = WXl′ 1, ˜l2 = WY l′ 2 such as to maximize the correlations corrs = {ρ1, . . . ρmin(m′ 1,m′ 2)} between the transformed subspaces. • Output: With these steps, SVCCA outputs pairs of aligned directions, (˜zzzl1 i , ˜zzzl2 i ) and how well they correlate, ρi. Step 1 also produces intermediate output in the form of the top singular values and directions. For a more detailed description of each step, see the Appendix. SVCCA can be used to analyse any two sets of neurons. In our experiments, we utilize this flexibility to compare representations across different random initializations, architectures, timesteps during training, and specific classes and layers. Figure 1 shows a simple, intuitive demonstration of SVCCA. We train a small network on a toy regression task and show each step of SVCCA, along with the resulting very similar representations. SVCCA is able to find hidden similarities in the representations. 2.1 Distributed Representations An important property of SVCCA is that it is truly a subspace method: both SVD and CCA work with span(zzz1, . . . ,zzzm) instead of being axis aligned to the zzzi directions. SVD finds singular vectors zzz′ i = Pm j=1 sijzzzj, and the subsequent CCA finds a linear transform W, giving orthogonal canonically correlated directions {˜zzz1, . . . , ˜zzzm} = {Pm j=1 w1jzzz′ j, . . . , Pm j=1 wmjzzz′ j}. In other words, SVCCA has no preference for representations that are neuron (axes) aligned. If representations are distributed across many dimensions, then this is a desirable property of a representation analysis method. Previous studies have reported that representations may be more complex than either fully distributed or axis-aligned [17, 21, 11] but this question remains open. We use SVCCA as a tool to probe the nature of representations via two experiments: (a) We find that the subspace directions found by SVCCA are disproportionately important to the representation learned by a layer, relative to neuron-aligned directions. (b) We show that at least some of these directions are distributed across many neurons. Experiments for (a), (b) are shown in Figure 2 as (a), (b) respectively. For both experiments, we first acquire two different representations, l1, l2, for a layer l by training two different random initializations of a convolutional network on CIFAR-10. We then apply SVCCA to l1 and l2 to get directions 3 0 100 200 300 400 500 Number of directions 0.2 0.4 0.6 0.8 Accuracy CIFAR10: Accuracy with SVCCA directions and random neurons p2 (4096 neurons) SVCCA p2 max acts neurons p2 random neurons fc1 (512 neurons) SVCCA fc1 random neurons fc2 (256 neurons) SVCCA fc2 max acts neurons 0 10 20 30 40 50 Number of directions 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Accuracy CIFAR10 acc vs neurons used for SVCCA dirns SVCCA fc1 (512 neurons) SVCCA p2 (4096 neurons) 50 neurons for fc1 150 neurons for p2 300 neurons for p2 100 neurons for fc1 (a) (b) Figure 2: Demonstration of (a) disproportionate importance of SVCCA directions, and (b) distributed nature of some of these directions. For both panes, we first find the top k SVCCA directions by training two conv nets on CIFAR-10 and comparing corresponding layers. (a) We project the output of the top three layers, pool1, fc1, fc2, onto this top-k subspace. We see accuracy rises rapidly with increasing k, with even k ≪num neurons giving reasonable performance, with no retraining. Baselines of random k neuron subspaces and max activation neurons require larger k to perform as well. (b): after projecting onto top k subspace (like left), dotted lines then project again onto m neurons, chosen to correspond highly to the top k-SVCCA subspace. Many more neurons are needed than k for better performance, suggesting distributedness of SVCCA directions. {˜zzzl1 1 , ..., ˜zzzl1 m} and {˜zzzl2 1 , ..., ˜zzzl2 m}, ordered according to importance by SVCCA, with each ˜zzzli j being a linear combination of the original neurons, i.e. ˜zzzli j = Pm r=1 α(li) jr zzzlir . For different values of k < m, we can then restrict layer li’s output to lie in the subspace of span(˜zzzli 1 , . . . , ˜zzzli k ), the most useful k-dimensional subspace as found by SVCCA, done by projecting each neuron into this k dimensional space. We find — somewhat surprisingly — that very few SVCCA directions are required for the network to perform the task well. As shown in Figure 2(a), for a network trained on CIFAR-10, the first 25 dimensions provide nearly the same accuracy as using all 512 dimensions of a fully connected layer with 512 neurons. The accuracy curve rises rapidly with the first few SVCCA directions, and plateaus quickly afterwards, for k ≪m. This suggests that the useful information contained in m neurons is well summarized by the subspace formed by the top k SVCCA directions. Two baselines for comparison are picking random and maximum activation neuron aligned subspaces and projecting outputs onto these. Both of these baselines require far more directions (in this case: neurons) before matching the accuracy achieved by the SVCCA directions. These results also suggest approaches to model compression, which are explored in more detail in Section 4.4. Figure 2(b) next demonstrates that these useful SVCCA directions are at least somewhat distributed over neurons rather than axis-aligned. First, the top k SVCCA directions are picked and the representation is projected onto this subspace. Next, the representation is further projected onto m neurons, where the m are chosen as those most important to the SVCCA directions . The resulting accuracy is plotted for different choices of k (given by x-axis) and different choices of m (different lines). That, for example, keeping even 100 fc1 neurons (dashed green line) cannot maintain the accuracy of the first 20 SVCCA directions (solid green line at x-axis 20) suggests that those 20 SVCCA directions are distributed across 5 or more neurons each, on average. Figure 3 shows a further demonstration of the effect on the output of projecting onto top SVCCA directions, here for the toy regression case. Why the two step SV + CCA method is needed. Both SVD and CCA have important properties for analysing network representations and SVCCA consequently benefits greatly from being a two step method. CCA is invariant to affine transformations, enabling comparisons without natural alignment (e.g. different architectures, Section 4.4). See Appendix B for proofs and a demonstrative figure. While CCA is a powerful method, it also suffers from certain shortcomings, particularly in determining how many directions were important to the original space X, which is the strength of 4 0 50000 100000 150000 200000 4 3 2 1 0 1 2 3 4 Original output using 200 directions 0 50000 100000 150000 200000 Projection on top 02 SVCCA directions 0 50000 100000 150000 200000 Projection on top 06 SVCCA directions 0 50000 100000 150000 200000 Projection on top 15 SVCCA directions 0 50000 100000 150000 200000 Projection on top 30 SVCCA directions Figure 3: The effect on the output of a latent representation being projected onto top SVCCA directions in the toy regression task. Representations of the penultimate layer are projected onto 2, 6, 15, 30 top SVCCA directions (from second pane). By 30, the output looks very similar to the full 200 neuron output (left). SVD. See Appendix for an example where naive CCA performs badly. Both the SVD and CCA steps are critical to the analysis of learning dynamics in Section 4.1. 3 Scaling SVCCA for Convolutional Layers Applying SVCCA to convolutional layers can be done in two natural ways: (1) Same layer comparisons: If X, Y are the same layer (at different timesteps or across random initializations) receiving the same input we can concatenate along the pixel (height h, width w) coordinates to form a vector: a conv layer h × w × c maps to c vectors, each of dimension hwd, where d is the number of datapoints. This is a natural choice because neurons at different pixel coordinates see different image data patches to each other. When X, Y are two versions of the same layer, these c different views correspond perfectly. (2) Different layer comparisons: When X, Y are not the same layer, the image patches seen by different neurons have no natural correspondence. But we can flatten an h×w×c conv into hwc neurons, each of dimension d. This approach is valid for convs in different networks or at different depths. 3.1 Scaling SVCCA with Discrete Fourier Transforms Applying SVCCA to convolutions introduces a computational challenge: the number of neurons (h×w×c) in convolutional layers, especially early ones, is very large, making SVCCA prohibitively expensive due to the large matrices involved. Luckily the problem of approximate dimensionality reduction of large matrices is well studied, and efficient algorithms exist, e.g. [4]. For convolutional layers however, we can avoid dimensionality reduction and perform exact SVCCA, even for large networks. This is achieved by preprocessing each channel with a Discrete Fourier Transform (which preserves CCA due to invariances, see Appendix), causing all (covariance) matrices to be block-diagonal. This allows all matrix operations to be performed block by block, and only over the diagonal blocks, vastly reducing computation. We show: Theorem 1. Suppose we have a translation invariant (image) dataset X and convolutional layers l1, l2. Letting DFT(li) denote the discrete fourier transform applied to each channel of li, the covariance cov(DFT(l1), DFT(l2)) is block diagonal, with blocks of size c × c. We make only two assumptions: 1) all layers below l1, l2 are either conv or pooling layers with circular boundary conditions (translation equivariance) 2) The dataset X has all translations of the images Xi. This is necessary in the proof for certain symmetries in neuron activations, but these symmetries typically exist in natural images even without translation invariance, as shown in Figure App.2 in the Appendix. Below are key statements, with proofs in Appendix. Definition 1. Say a single channel image dataset X of images is translation invariant if for any (wlog n × n) image Xi ∈X, with pixel values {zzz11, ...zzznn}, X(a,b) i = {zzzσa(1)σb(1), ...zzzσa(n)σb(n)} is also in X, for all 0 ≤a, b ≤n −1, where σa(i) = a + i mod n (and similarly for b). For a multiple channel image Xi, an (a, b) translation is an (a, b) height/width shift on every channel separately. X is then translation invariant as above. 5 To prove Theorem 1, we first show another theorem: Theorem 2. Given a translation invariant dataset X, and a convolutional layer l with channels {c1, . . . ck} applied to X (a) the DFT of ci, FcF T has diagonal covariance matrix (with itself). (b) the DFT of ci, cj, FciF T , FcjF T have diagonal covariance with each other. Finally, both of these theorems rely on properties of circulant matrices and their DFTs: Lemma 1. The covariance matrix of ci applied to translation invariant X is circulant and block circulant. Lemma 2. The DFT of a circulant matrix is diagonal. 4 Applications of SVCCA 4.1 Learning Dynamics with SVCCA We can use SVCCA as a window into learning dynamics by comparing the representation at a layer at different points during training to its final representation. Furthermore, as the SVCCA computations are relatively cheap to compute compared to methods that require training an auxiliary network for each comparison [1, 10, 11], we can compare all layers during training at all timesteps to all layers at the final time step, producing a rich view into the learning process. The outputs of SVCCA are the aligned directions (˜xi, ˜yi), how well they align, ρi, as well as intermediate output from the first step, of singular values and directions, λ(i) X , x′(i), λ(j) Y , y′(j). We condense these outputs into a single value, the SVCCA similarity ¯ρ, that encapsulates how well the representations of two layers are aligned with each other, ¯ρ = 1 min (m1, m2) X i ρi, (1) where min (m1, m2) is the size of the smaller of the two layers being compared. The SVCCA similarity ¯ρ is the average correlation across aligned directions, and is a direct multidimensional analogue of Pearson correlation. The SVCCA similarity for all pairs of layers, and all time steps, is shown in Figure 4 for a convnet and a resnet architecture trained on CIFAR10. 4.2 Freeze Training Observing in Figure 4 that networks broadly converge from the bottom up, we propose a training method where we successively freeze lower layers during training, only updating higher and higher layers, saving all computation needed for deriving gradients and updating in lower layers. We apply this method to convolutional and residual networks trained on CIFAR-10, Figure 5, using a linear freezing regime: in the convolutional network, each layer is frozen at a fraction (layer number/total layers) of total training time, while for resnets, each residual block is frozen at a fraction (block number/total blocks). The vertical grey dotted lines show which steps have another set of layers frozen. Aside from saving computation, Freeze Training appears to actively help generalization accuracy, like early stopping but with different layers requiring different stopping points. 4.3 Interpreting Representations: when are classes learned? We also can use SVCCA to compare how correlated representations in each layer are with the logits of each class in order to measure how knowledge about the target evolves throughout the network. In Figure 6 we apply the DFT CCA technique on the Imagenet Resnet [6]. We take five different classes and for different layers in the network, compute the DFT CCA similarity between the logit of that class and the network layer. The results successfully reflect semantic aspects of the classes: the firetruck class sensitivity line is clearly distinct from the two pairs of dog breeds, and network develops greater sensitivity to firetruck earlier on. The two pairs of dog breeds, purposefully chosen so that each pair is similar to the other in appearance, have cca similarity lines that are very close to each other through the network, indicating these classes are similar to each other. 6 layer (during training) layer (end of training) Convnet, CIFAR-10 Resnet, CIFAR-10 layer (during training) layer (end of training) layer (end of training) layer (end of training) Weighted SVCCA scale 0% trained 35% trained 75% trained 100% trained Figure 4: Learning dynamics plots for conv (top) and res (bottom) nets trained on CIFAR-10. Each pane is a matrix of size layers × layers, with each entry showing the SVCCA similarity ¯ρ between the two layers. Note that learning broadly happens ‘bottom up’ – layers closer to the input seem to solidify into their final representations with the exception of the very top layers. Per layer plots are included in the Appendix. Other patterns are also visible – batch norm layers maintain nearly perfect similarity to the layer preceding them due to scaling invariance (with a slight reduction since batch norm changes the SVD directions which capture 99% of the variance). In the resnet plot, we see a stripe like pattern due to skip connections inducing high similarities to previous layers. 0 20000 40000 60000 80000 100000 120000 140000 160000 Train step 0.70 0.75 0.80 0.85 0.90 Accuracy CIFAR10 Conv Freeze Training test acc base test acc freeze 0 20000 40000 60000 80000 100000 120000 140000 160000 Train step 0.70 0.75 0.80 0.85 0.90 CIFAR10 Resnet Freeze Training test acc base test acc freeze Figure 5: Freeze Training reduces training cost and improves generalization. We apply Freeze Training to a convolutional network on CIFAR-10 and a residual network on CIFAR-10. As shown by the grey dotted lines (which indicate the timestep at which another layer is frozen), both networks have a ‘linear’ freezing regime: for the convolutional network, we freeze individual layers at evenly spaced timesteps throughout training. For the residual network, we freeze entire residual blocks at each freeze step. The curves were averaged over ten runs. 4.4 Other Applications: Cross Model Comparison and compression SVCCA similarity can also be used to compare the similarity of representations across different random initializations, and even different architectures. We compare convolutional networks on CIFAR-10 across random initializations (Appendix) and also a convolutional network to a residual network in Figure 7, using the DFT method described in 3. In Figure 3, we saw that projecting onto the subspace of the top few SVCCA directions resulted in comparable accuracy. This observations motivates an approach to model compression. In particular, letting the output vector of layer l be xxx(l) ∈Rn×1, and the weights W (l), we replace the usual W (l)xxx(l) with (W (l)P T x )(Pxxxx(l)) where Px is a k × n projection matrix, projecting xxx onto the top SVCCA directions. This bottleneck reduces both parameter count and inference computational cost 7 0 10 20 30 40 50 60 70 80 Layer Number 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 CCA Similarity with Class CCA Similarity (using DFT) of Layers in Imagenet Resnet to Different Classes s_terrier w_terrier husky eskimo_dog fire truck Figure 6: We plot the CCA similarity using the Discrete Fourier Transform between the logits of five classes and layers in the Imagenet Resnet. The classes are firetruck and two pairs of dog breeds (terriers and husky like dogs: husky and eskimo dog) that are chosen to be similar to each other. These semantic properties are captured in CCA similarity, where we see that the line corresponding to firetruck is clearly distinct from the two pairs of dog breeds, and the two lines in each pair are both very close to each other, reflecting the fact that each pair consists of visually similar looking images. Firetruck also appears to be easier for the network to learn, with greater sensitivity displayed much sooner. in bncv bncv bncv bncv bncv bncv bncv bn Resnet layers p2 bn2 c5 c4 c3 p1 bn1 c2 c1 in Convnet layers DFT CCA similarity between Resnet and Convnet on CIFAR10 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Figure 7: We plot the CCA similarity using the Discrete Fourier Transform between convolutional layers of a Resnet and Convnet trained on CIFAR-10. We find that the lower layrs of both models are noticeably similar to each other, and get progressively less similar as we compare higher layers. Note that the highest layers of the resnet are least similar to the lower layers of the convnet. for the layer by a factor ∼k n. In Figure App.5 in the Appendix, we show that we can consecutively compress top layers with SVCCA by a significant amount (in one case reducing each layer to 0.35 original size) and hardly affect performance. 5 Conclusion In this paper we present SVCCA, a general method which allows for comparison of the learned distributed representations between different neural network layers and architectures. Using SVCCA we obtain novel insights into the learning dynamics and learned representations of common neural network architectures. These insights motivated a new Freeze Training technique which can reduce the number of flops required to train networks and potentially even increase generalization performance. We observe that CCA similarity can be a helpful tool for interpretability, with sensitivity to different classes reflecting their semantic properties. This technique also motivates a new algorithm for model compression. Finally, the “lower layers learn first” behavior was also observed for recurrent neural networks as shown in Figure App.6 in the Appendix. 8 References [1] Guillaume Alain and Yoshua Bengio. Understanding intermediate layers using linear classifier probes. arXiv preprint arXiv:1610.01644, 2016. [2] David Eigen, Jason Rolfe, Rob Fergus, and Yann LeCun. Understanding deep architectures using a recursive convolutional network. arXiv preprint arXiv:1312.1847, 2013. [3] Manaal Faruqui and Chris Dyer. Improving vector space word representations using multilingual correlation. Association for Computational Linguistics, 2014. [4] Nathan Halko, Martinsson Per-Gunnar, and Joel A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Rev., 53:217–288, 2011. [5] D. R. Hardoon, S. Szedmak, and J. Shawe-Taylor. Canonical correlation analysis: An overview with application to learning methods. Neural Computation, 16:2639–2664, 2004. [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. [7] Geoffrey Hinton, Li Deng, Dong Yu, George E. Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. [8] Roger A Horn and Charles R Johnson. Matrix analysis. Cambridge university press, 1985. [9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [10] Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 991–999, 2015. [11] Y. Li, J. Yosinski, J. Clune, H. Lipson, and J. Hopcroft. Convergent Learning: Do different neural networks learn the same representations? In International Conference on Learning Representations (ICLR), May 2016. [12] Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John Hopcroft. Convergent learning: Do different neural networks learn the same representations? In Feature Extraction: Modern Questions and Challenges, pages 196–212, 2015. [13] Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5188–5196, 2015. [14] Gr´egoire Montavon, Mikio L Braun, and Klaus-Robert M¨uller. Kernel analysis of deep networks. Journal of Machine Learning Research, 12(Sep):2563–2581, 2011. [15] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013. [16] David Sussillo, Mark M Churchland, Matthew T Kaufman, and Krishna V Shenoy. A neural network that finds a naturalistic solution for the production of muscle activity. Nature neuroscience, 18(7):1025–1033, 2015. [17] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. 9 [18] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. [19] Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. In Deep Learning Workshop, International Conference on Machine Learning (ICML), 2015. [20] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pages 818–833. Springer, 2014. [21] Bolei Zhou, Aditya Khosla, `Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object detectors emerge in deep scene cnns. In International Conference on Learning Representations (ICLR), volume abs/1412.6856, 2014. 10 | 2017 | 567 |
7,082 | Fast Rates for Bandit Optimization with Upper-Confidence Frank-Wolfe Quentin Berthet ∗ University of Cambridge q.berthet@statslab.cam.ac.uk Vianney Perchet † ENS Paris-Saclay & Criteo Research, Paris vianney.perchet@normalesup.org Abstract We consider the problem of bandit optimization, inspired by stochastic optimization and online learning problems with bandit feedback. In this problem, the objective is to minimize a global loss function of all the actions, not necessarily a cumulative loss. This framework allows us to study a very general class of problems, with applications in statistics, machine learning, and other fields. To solve this problem, we analyze the Upper-Confidence Frank-Wolfe algorithm, inspired by techniques for bandits and convex optimization. We give theoretical guarantees for the performance of this algorithm over various classes of functions, and discuss the optimality of these results. Introduction In online optimization problems, a decision maker choses at each round t ≥1 an action πt from some given action space, observes some information through a feedback mechanism in order to minimize a loss, function of the set of actions {π1, . . . , πT }. Traditionally, this objective is computed as a cumulative loss of the form P t ℓt(πt) [20, 34], or as a function thereof [2, 3, 16, 32]. Examples include classical multi-armed bandit problems where the action space is finite with K elements, in stochastic or adversarial settings [9]. In these problems, the loss at round t can be written as ℓt(eπt) for a linear form ℓt on RK, and basis vectors ei. More generally, this includes also bandit problems over a convex body C, where the action at each round consists in picking xt ∈C and where the loss ℓt(xt) is for some convex function ℓt [see, e.g. 9, 12, 19, 10]. In this work, we consider the online learning problem of bandit optimization. Similarly to other problems of this type, a decision maker chooses at each round an action πt from a set of size K, and observes information about an unknown convex loss function L. The difference is that the objective is to minimize a global convex loss L 1 T PT t=1 eπt , not a cumulative one. At each round, choosing the i-th action increases the information about the local dependency of L on its i-th coefficient. This problem can be contrasted with the objective of minimizing the average pseudo-regret in a stochastic bandit problem, i.e. of minimizing 1 T PT t=1 L(eπt) with observation ℓt(eπt), a noisy estimate of L(eπt). At the intersection of these frameworks, when L is a linear form, is the stochastic multiarmed bandit problem. Our problem is also related to maximization of known convex objectives [2, 3]. We compare our framework to these settings in Section 1.4. Bandit optimization shares some similarities with stochastic optimization problems, where the objective is to minimize f(xT ) for an unknown function f, while choosing at each round a variable xt ∗Supported by an Isaac Newton Trust Early Career Support Scheme and by The Alan Turing Institute under the EPSRC grant EP/N510129/1. †Supported by the ANR (grant ANR- 13-JS01-0004-01), and the FMJH Program Gaspard Monge in Optimization and operations research (supported in part by EDF) and from the Labex LMH. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. and observing some noisy information about the function f. Our problem can be seen as a stochastic optimization problem over the simplex, with the caveat that the list of actions π1, . . . , πT determines the variable, as xt = 1 t Pt s=1 eπs, as well as the manner in which additional information about the function can be gathered. This setting allows us to study a more general class of problems than multi-armed bandits, and to cover examples where there is not one optimal action, but rather an optimal global strategy, that is an optimal mix of actions. We describe several natural problems from machine learning, statistics, or economics that are cases of bandit optimization. This problem draws inspiration from the world of multi-armed bandit problems and that of stochastic convex optimization, and our solution to it does as well. We analyze the Upper-Confidence Frank-Wolfe algorithm, a modification of the Frank-Wolfe algorithm [17] and of the UCB algorithm for bandits [5]. The link with Frank-Wolfe is related to the choice of one action, and encourages exploitation, while the link with UCB encourages to chose rarely picked actions in order to increase knowledge about the function, encouraging exploration. This algorithm can be used for all convex functions L, and performs in a near-optimal manner over various classes of functions. Indeed, if it has been already proved that it achieves slow rates of convergence in some cases, i.e., the error decreases as 1/ √ T, we are able to exhibit fast rates decreasing in 1/T, up to logarithmic terms. These fast rates are surprising, as they sometimes even hold for non-strongly convex functions, and in many problems with bandit feedback they cannot be reached [23, 35]. As shown in our lower bounds, the main complexity of this problem is statistical and comes from the limited information available about the unknown function L. Usual results in optimization with a known function are not necessarily relevant to our problem. As an example, while linear rates in e−cT are possible in deterministic settings with variants in the Frank-Wolfe algorithm, we are limited to fast rates in 1/T under similar assumptions. Interestingly, while linear functions are one of the settings in which the deterministic Frank-Wolfe algorithm is the most efficient, it is among the most complicated for bandit optimization, and only slow rates are possible (see theorems 2 and 6). Our work is organized in the following manner: we describe in Section 1 the problem of bandit optimization. The main algorithm is introduced in Section 2, and its performance in various settings is studied in Section 3, 4, and 5. All proofs of the main results are in the supplementary material. Notations: For any positive integer n, denote by [n] the set {1, . . . , n} and, for any positive integer K, by ∆K := p ∈RK : pi ≥0 and P i∈[K]pi = 1 the unit simplex of RK. Finally, ei stands for the i-th vector of the canonical basis of RK. Notice that ∆K is their convex hull. 1 Bandit Optimization We describe the bandit optimization problem, generalizing multi-armed bandits. This stochastic optimization problem is doubly related to bandits: The decision variable cannot be chosen freely but is tied to the past actions, and information about the function is obtained via a bandit feedback. 1.1 Problem description A each time step t ≥1, a decision maker chooses an action πt ∈[K] from K different actions with the objective of minimizing an unknown convex loss function L : ∆K →R. Unlike in traditional online learning problems, we do not assume that the overall objective of the agent is to minimize a cumulative loss P t L(eπt) but rather to minimize the global loss L(pT ), where pt ∈∆K is the vector of proportions of each action (also called occupation measure), i.e., pt = T1(t)/t, . . . , TK(t)/t with Ti(t) = Pt s=11{πs = i} . Alternatively, pt = 1 t Pt i=1 eπs. As usual in stochastic optimization, the performance of a policy is evaluated by controlling the difference r(T) := E[L(pT )] −min p∈∆K L(p) . The information available to the policy is a feedback of bandit type: given the choice πt = i, it is an estimate ˆgt of ∇L(pt). Its precision, with respect to each coefficient i ∈[K], is specified by a deviation function αt,i, meaning that for all δ ∈(0, 1), it holds with probability 1 −δ that |ˆgt,i −∇iL(pt)| ≤αt,i(Ti(t), δ) . 2 At each round, it is possible to improve the precision for one of the coefficients of the gradient but possibly at a cost of increasing the global loss. The most typical case, described in the following section, is of αt,i(Ti, δ) = p 2 log(t/δ)/Ti, when the information consists of observations from different distributions. In general, this type of feedback mechanism is indicative of a bandit feedback (and not of a full information setting), as motivated by the following parametric setting. 1.2 Bandit feedback and parametric setting One of the motivations is the minimization of a loss function L belonging to a known class {L(µ, ·), µ ∈RK} with an unknown parameter µ. Choosing the i-th action provides information about µi, through an observation of some auxiliary distribution νi. As an example, the classical stochastic multi-armed bandit problem [9] falls within our framework. Denoting by µi the expected loss of arm i ∈[K], the average pseudo-regret ¯R can be expressed as ¯R(t) = 1 t t X s=1 µπs −µ⋆= K X i=1 µi Ti(t) t −µ⋆= p⊤ t µ −p⋆⊤µ, with p⋆= ei⋆, Hence the choice of L(µ, p) = µ⊤p corresponds the problem of multi-armed bandits. Since ∇L(µ, p) = µ, the feedback mechanism for ˆgt is induced by having a sample Xt from νπt at time step t, taking ˆgt,i = ¯Xt,i, the empirical mean of the Ti(t) observations νi. In this case, if νi is sub-Gaussian with parameter 1, we have αt,i(Ti, δ) = 2 p 2 log(t/δ)/Ti. More generally, for any parametric model, we can consider the following observation setting: For all i ∈[K], let νi be a sub-Gaussian distribution with mean µi and tail parameter σ2. At time t, for an action πt ∈[K], we observe a realization from νπt. We estimate µi by the empirical mean ˆµt,i of the Ti(t) draws from νi, and ˆgt = ∇pL(ˆµt, pt) as an estimate of the gradient of L = L(µ, ·) at pt. The following bound on αi under smoothness conditions on the parametric model is a direct application of Hoeffding’s inequality. Proposition 1. Let L = L(µ, ·) for some µ ∈RK being µ-gradient-Lipschitz, i.e., such that ∇pL(µ, p) i − ∇pL(µ′, p) i ≤|µi −µ′ i| , ∀p ∈∆([K]). Under the sub-Gaussian observation setting above, ˆgt = ∇pL(ˆµt, pt) is a valid gradient feedback with deviation bounds αt,i(Ti, δ) = p 2σ2 log(t/δ)/Ti. This Lipschitz condition on the parameter µ gives a motivation for our gradient bandit feedback. 1.3 Examples Stochastic multi-armed bandit: As noted above, the stochastic multi-armed bandit problem is a special case of our setting for a loss L(p) = µ⊤p, and the bandit feedback allows to construct a proxy for the gradient ˆgt with deviations αi decaying in 1/√Ti. The UCB algorithm used to solve this problem inspires our algorithm that generalizes to any loss function L, as discussed in Section 2. Online experimental design: In the context of statistical estimation with heterogenous data sources [8], consider the problem of allocating samples in order to minimize the variance of the final estimate. At time t, it is possible to sample from one of K distributions N(θi, σ2 i ) for i ∈[K], the objective being to minimize the average variance of the simple unbiased estimator E[∥ˆθ −θ∥2 2] = P i∈[K]σ2 i /Ti equivalent to L(p) = P i∈[K]σ2 i /pi . For unknown σi, this problem falls within our framework and the gradient with coordinates −σ2 i /p2 i can be estimated by using the Ti draws from N(θi, σ2 i ) to construct ˆσ2 i . This function is only defined on the interior of the simplex and is unbounded, matters that we discuss further in Section 4.3. Other objective functions than the expected ℓ2 norm of the error can be used, as in [11], who consider the ℓ∞norm of the actual estimated deviations, not its expectation. 3 Utility maximization: A classical model to describe the utility of an agent purchasing xi units of K different goods is the Cobb-Douglas utility (see e.g. [27]) defined for parameters βi ∈(0, 1) by U(x1, . . . , xK) = Q i∈[K]xβi i . Maximizing this utility for unknown βi under a budget constraint - where each price is assumed to be 1 for ease of notations - by buying one unit of one of K goods at each round, is therefore equivalent to minimizing in pi (the proportion of good i in the basket) L(p) = −P i∈[K]βi log(pi). Other examples: More generally, the notion of bandit optimization can be applied to any situation where one optimizes a strategy through actions that are taken sequentially, with information gained at each round, and where the objective depends only on the proportions of actions. Other examples include a problem inspired by online Markovitz portfolio optimization, where the goal is to minimize L(p) = p⊤Σp −λµ⊤p, with a known covariance matrix Σ and unknown returns µ, or several generalizations of bandit problems such as minimizing L(p) = P i∈[K]fi(µi)pi when observations are drawn from a distribution with mean µi, for known fi. 1.4 Comparison with other problems As mentioned in the introduction, the problem of bandit optimization is different from online learning problems related to regret minimization [21, 1, 10], even in a stochastic setting. While the usual objective is to minimize a cumulative regret related to 1 T P t ℓt(xt), we focus on L( 1 T P t eπt). Problems related to online optimization of global costs or objectives have been studied in similar settings [2, 3, 16, 32]. They are equivalent to minimizing a loss L(p⊤ T V ) where V is a K × d unknown matrix and L(·) : Rd →R is known. The feedback at stage t is a noisy evaluations of Vπt. In the stochastic case [2, 3], this is close to our setting - even though none of them subsumes directly the other one. Only slow rates of convergence of order 1/ √ T are derived for the variant of Frank-Wolfe, while we aim at fast rates, which are optimal. In contrast, in the adversarial case [16, 32], there are instances of the problem where the average regret cannot decrease to zero [26]. Using the Frank-Wolfe algorithm in a stochastic optimization problem has also already been considered, particularly in [25], where the estimates of the gradients are increasingly precise in t, independently of the actions of the decision maker. This setting, where the action at each round is to pick xt in the domain in order to minimize f(xT ) is therefore closer to classical stochastic optimization than online learning problems related to bandits [9, 19, 10]. 2 Upper-Confidence Frank-Wolfe algorithm With linear functions, as in multi-armed bandits, an estimate of the gradient can be established by using the past observations, as well as confidence intervals on each coefficient in 1/√Ti. The UCB algorithm instructs to pick the action with the smallest lower confidence estimate µt,i for the loss. This is equivalent to making a step of size 1/(t + 1) in the direction of the corner of the simplex e that minimizes e⊤µt. Following this intuition, we introduce the UCB Frank-Wolfe algorithm that uses a proxy of the gradient, penalized by the size of confidence intervals. Algorithm 0: UCB Frank-Wolfe algorithm Input: K, p0 = 1[K]/K, sequence (δt)t≥0; for t ≥0 do Observe ˆgt, noisy estimate of ∇L(pt); for i ∈[K] do ˆUt,i = ˆgti −αt,i(Ti(t), δt) end Select πt+1 ∈argmini∈[K] ˆUt,i; Update pt+1 = pt + 1 t+1(eπt+1 −pt) end 4 Notice that for any algorithm, the selection of an action πt+1 ∈[K] at time step t + 1 updates the variable p with respect to the following dynamics pt+1 = 1 − 1 t + 1 pt + 1 t + 1 eπt+1 = pt + 1 t + 1(eπt+1 −pt) . (1) This is implied by the mechanism of the problem, and is not dependent on the choice of an algorithm. If the choice of eπt+1 is e⋆t+1, the minimizer of s⊤∇L(pt) over all s ∈∆K, this would precisely be the Frank-Wolfe algorithm with step size 1/(t + 1). Inspired by this similarity, our selection rule is driven by the same principle, using a proxy ˆUt for ∇L(pt) based on the information up to time t. Our selection rule is therefore driven by two principles, borrowing from tools in convex optimization (the Frank-Wolfe algorithm) and classical bandit problems (Upper-confidence bounds). The choice of action πt+1 is equivalent to taking eπt+1 ∈argmins∈∆K s⊤ˆUt. The computational cost of this procedure is very light, and apart from gradient computations, it is linear in K at each iteration, leading to a global cost of order KT. 3 Slow rates In this section we show that when αi is of order 1/√Ti, as motivated by the parametric model of Section 1.2, our algorithm has an approximation error of order p log(T)/T over the very general class of smooth convex functions. We refer to this as the slow rate. Our analysis is based on the classical study of the Frank-Wolfe algorithm [see, e.g. 22, and references therein]. We consider the case of C-smooth convex functions on the unit simplex, for which we recall the definition. Definition (Smooth functions). For a set D ⊂Rn, a function f : D →R is said to be a C-smooth function if it is differentiable and if its gradient is C-Lipshitz continuous, i.e. the following holds ∥∇f(x) −∇f(y)∥2 ≤C∥x −y∥2 , ∀x, y ∈D . We denote by FC,K the set of C-smooth convex functions. They attain their minimum at a point p⋆∈∆K and their Hessian is uniformly bounded, ∇2L(p) ⪯CIK, if they are twice differentiable. We establish in this general setting a slow rate when αi decreases like 1/√Ti. Theorem 2 (Slow rate). Let L be a C-smooth convex function over the unit simplex ∆K. For any T ≥1, after T steps of the UCB Frank-Wolfe algorithm with a bandit feedback such that αt,i(Ti, δ) = 2 p log(t/δ)/Ti and the choice δt = 1/t2, it holds that E L(pT ) −L(p⋆) ≤4 r 3K log(T) T + C log(eT) T + π2 6 + K 2∥∇L∥∞+ ∥L∥∞ T . The proof draws inspiration from the analysis of the Frank-Wolfe algorithm with stepsize of 1/(t+1) and of the UCB algorithm. Notice that our algorithm is adaptive to the gradient Lipschitz constant C, and that the leading term of the error does not depend on it. We also emphasize the fact that the dependency in √ K is expected, and optimal, in bandit setting. For linear mappings L(p) = p⊤µ, our analysis is equivalent to studying the UCB algorithm in multi-armed bandits. The slow rate in Theorem 2 corresponds to a regret of order p KT log(T), the distribution-independent (or worst case) performance of UCB. The extra dependency in p log(T) could be reduced to p log(K) or even optimally to 1 by using confidence intervals more carefully tailored, for instance by replacing the log(t) term appearing in the definition of the estimated gradients by log(T/Ti(t)) or log(T/KTi(t)) if the horizon T is known in advance as in the algorithms MOSS or ETC (see [4, 29, 30]), but at the cost of a more involved analysis. Thus, multi-armed bandits provide a lower bound for the approximation error E[L(pT )] −L(p⋆) of order p K/T for smooth convex functions. We discuss lower bounds further in Section 5. For the sake of clarity, we state all our results when αt,i(Ti, δ) = 2 p log(t/δ)/Ti, but our techniques handle more general deviations as αt,i(Ti, δ) = θ log(t/δ)/Ti β where θ ∈R and β > 0 are some known parameters. More general results can be found in the supplementary material. 5 4 Fast rates In this section, we describe situations where the approximation error rate can be improved to a fast rate of order log(T)/T, when we consider various classes of functions, with additional assumptions. 4.1 Stochastic multi-armed bandits and functions minimized on vertices A very natural and well-known - yet illustrative - example of such a restricted class of functions is simply the case of classical bandits where ∆(i) := µi −µ⋆is bounded away from 0 for i ̸= ⋆. Our analysis of the algorithm can be adapted to this special case with the following result. Proposition 3. Let L be the linear function p 7→p⊤µ. After T steps of the UCB Frank-Wolfe algorithm with a bandit feedback such that αt,i(Ti, δ) = 2 p log(t/δ)/Ti, the choices of δt = 1/t2 hold the following E[L(pT )] −L(p⋆) ≤48 log(T) T X i̸=⋆ 1 ∆(i) + 3 π2 3 + K √ K∥µ∥∞ T . The constants of this proposition are sub-optimal (for instance the 48 can be reduced up to 2 using more careful but involved analysis). It is provided here to show that this classical bound on the pseudo-regret in stochastic multi-armed bandits [see e.g. 9, and references therein] can be recovered with Frank-Wolfe type of techniques illustrating further the links between bandit problems and convex optimization [20, 34]. This result can actually be generalized to any convex functions which is minimized on a vertex of the simplex with a gradient whose component-wise differences are bounded away from 0. Proposition 4. Let L be a convex mapping that attains its minimum on ∆K at a vertex p⋆= ei⋆ and such that ∆(i)(L) := ∇iL(p⋆) −∇i⋆L(p⋆) > 0 for all i ̸= i⋆. Then, after T steps of the UCB Frank-Wolfe algorithm with a bandit feedback such that αt,i(Ti, δ) = 2 p log(t/δ)/Ti, the choices of δt = 1/t2 hold the following E[L(pT )]−L(p⋆) ≤ρ(L) 48 log(T) T X i̸=⋆ 1 ∆(i)(L) + C log(eT) T +(π2 6 +K)2∥∇L∥∞+ ∥L∥∞ T , where ρ(L) = 1 + CK ∆min(L) and ∆min(L) = mini̸=i⋆∆(i)(L). The KKT conditions imply that ∆(i)(L) ≥0 whenever p⋆is in a corner, but the strict inequality is not always guaranteed. In particular, this result may not hold if p⋆is the global minimum of L over RK. This type of condition has also been linked with rates of convergence in stochastic optimization problems [15]. The extra multiplicative factor ρ(L) can be large, but it would be of the order of 1 + o(1) using variants of our algorithms with results that holds only with great probability (typically with confidence bounds of the form 2 p log(1/δ)/Ti). 4.2 Strongly convex functions Another classical assumption in convex optimization is strong convexity, as recalled below. We denote by Sµ,K the set of µ-strongly convex functions of ∆K. This assumption usually improves the rates in errors of approximation in many settings, even in stochastic optimization or some settings of online learning [see, e.g. 31, 14, 33, 6, 18, 19, 7]. Interestingly enough though, strong convexity cannot be leveraged to improve rates of convergence in online convex optimization [35, 23], where the 1/ √ T rate of convergence cannot be improved. Moreover, leveraging strong convexity usually implies to adapt step size of gradient descents or with linear search and/or away steps for classical Frank-Wolfe methods. Those techniques cannot be adapted to our setting where step sizes are fixed. Definition (Strongly convex functions). . For a set D ⊂Rn, a function f : D →R is said to be a µ-strongly convex if for all x, y ∈D, we have f(x) ≥f(y) + ∇f(x)⊤(x −y) + µ 2 ∥x −y∥2 2 . 6 We already covered the case where the convex functions are minimized outside the simplex. We will now assume that the minimum lies in its relative interior. Theorem 5. Let L : ∆K →R be a C-smooth, µ-strongly convex function such that its minimum p⋆satisfies dist(p⋆, ∂∆K) ≥η, for some η ∈(0, 1/K]. After T steps of the UCB Frank-Wolfe algorithm with a bandit feedback such that αt,i(Ti, δ) = 2 p log(t/δ)/Ti, it holds that, with the choice of δt = 1/t2, E[L(pT )] −L(p⋆) ≤c1 log2(T) T + c2 log(T) T + c3 1 T , for constants c1 = 96K µη2 , c2 = 24 µη3 + C and c3 = 24( 20 µη2 )2K + µη2 2 + C. The proof is based on an improvement in the analysis of the UCB Frank-Wolfe algorithm, based on a better control on the duality gap, possible in the strongly convex case. It is a consequence of an inequality due to Lacoste-Julien and Jaggi [24, Lemma 2]. In order to get the result, we adapt these ideas to a case of unknown gradient, with bandit feedback. We note that this approach is similar to the one in [25] that focuses on stochastic optimization problems, as discussed in Section 1.4. Our framework is more complicated in some aspects than typical settings in stochastic optimization, where strong assumptions can usually be made over the noisy gradient feedback. These include stochastic gradients that are independent unbiased estimates of the true gradient, or with error terms that are decreasing in t. Here, such properties do not hold: as an example, in a parametric setting, information is only obtained about one of the coefficients, and there are strong dependencies between successive gradients feedbacks. Dealing with these aspects, as well as the fact that our gradient proxy is penalized by the size of the confidence intervals, are some of the main challenges of the proof. 4.3 Interior-smooth functions Many interesting examples of bandit optimization are not exactly covered by the case of functions that are C-smooth on the whole unit simplex. In particular, for several applications, the function diverges at its boundary, as in the examples of Cobb-Douglas utility maximization and variance minimization from Section 1.3. Recall the the loss was defined by E[∥ˆθ −θ∥2 2] = P i∈[K] σ2 i Ti = 1 T L(p) = 1 T P i∈[K] σ2 i pi . The gradient Lipschitz constant is infinite but if we knew for instance that σi ∈[σi , σi], we could safely sample first each arm i a linear number of time because p⋆ i ≥pi := σi/ P j σj. We would have (pt)i ≥pi at all stages and our analysis holds with the constant C = 2σ2 max(P j σj)3/σ3 min . Even without knowledge on σ2 i , it is possible to quickly have rough estimates, as illustrated by Lemma 2 in the appendix. Only a logarithmic number of sample of each action are needed. Once they are gathered, one can keep sampling each arm a linear number of times, as suggested when the lower/upper bounds are known beforehand. This leads to a Lipchitz constant C = (9 P j σj)3/σmin, which is, up to to a multiplicative factor, the gradient Lipschitz constant at the minimum. 5 Lower bounds The results shown in Sections 3 and 4 exhibit different theoretical guarantees for our algorithm depending on the class of function considered. We discuss here the optimality of these results. 5.1 Slow rate lower bound In Theorem 2, we show a slow rate of order p K log(T)/T for the error approximation of our algorithm over the class of C-smooth convex functions of RK. Up to the logarithmic term, this result is optimal: no algorithm based on the same feedback can significantly improve the rate of approximation. This is a consequence of the following theorem, a direct corollary of a result by [5]. 7 Theorem 6. For any algorithm based on a bandit feedback such that αt,i(Ti, δ) = p 2 log(t/δ)/Ti and that outputs ˆpT , we have over the class of linear forms LK that for some constant c > 0 inf ˆpT sup L∈LK n E[L(ˆpT )] −L(p⋆) o ≥c p K/T . This result is established over the class of linear functions over the simplex (for which C = 0), when the feedback consists of a draw from a distribution with mean µi. As mentioned in Section 3, the extra logarithmic term in our upper bound comes from our algorithm, which has the same behavior as UCB. Nevertheless, as mentioned before, modifying our algorithm to recover the behavior of MOSS [4], or even ETC, [see e.g. 29, 30], would improve the upper bound and remove the logarithmic term. 5.2 Fast rate lower bound We have shown that in the case of strongly convex smooth functions, there is an approximation error upper bound of order (K/η4) log(T)/T for the performance of our algorithm, where η < 1/K. We provide a lower bound over this class of functions in the following theorem. Theorem 7. For any algorithm with a bandit feedback such that αt,i(Ti, δ) = p 2 log(t/δ)/Ti and output ˆpT , we have over the class S1,K of 1-strongly convex functions that for some constant c > 0 inf ˆp sup L∈S1,K n E[L(ˆpT )] −L(p⋆) o ≥c K2/T . The proof relies on the complexity of minimizing quadratic functions 1 2∥p −θ∥2 2 when observing a draw from distribution with mean θi. Our upper bound is in the best case of order K5 log(T)/T, as η ≤1/K. Understanding more precisely the optimal rate is an interesting venue for future research. 5.3 Mixed feedbacks lower bound In our analysis of this problem, we have only considered settings where the feedback upon choosing action i gives information about the i-th coefficient of the gradient. The two following cases show that even in simple settings, our upper bounds will not hold if the relationship between action and feedback is different, when the feedback corresponds to another coefficient. Proposition 8. For L in the class of 1-strongly convex functions on ∆3, we have in the case of a mixed bandit feedback that inf ˆp sup L∈S1,3 n E[L(ˆpT )] −L(p⋆) o ≥c/T 2/3 . For strongly convex functions, even with K = 3, there are therefore pathological mixed feedback settings where the error is at least of order 1/T 2/3 instead of 1/T. The case of smooth convex functions is covered by the existing lower bounds for the problem of partial monitoring [13], and gives a lower bound of order 1/T 1/3 instead of 1/ √ T. Proposition 9. For L in the class of linear forms F3 on ∆3, with a mixed bandit feedback we have inf ˆp sup L∈F3 n E[L(ˆpT )] −Lθ(p⋆) o ≥c/T 1/3 . 6 Discussion We study the online minimization of stochastic global loss with a bandit feedback. This is naturally motivated by many applications with a parametric setting, and tradeoffs between exploration and exploitation. The UCB Frank-Wolfe algorithm performs optimally in a generic setting. The fast rates of convergence obtained for some clases of functions are a significant improvement over the slow rates that hold for smooth convex functions. In bandit-type problems similar to our problem, it is not always possible to leverage additional assumptions such as strong convexity: It has been proved impossible in the closely related setting of online convex optimization [23, 35]. When it 8 is possible, step sizes must usually depend on the strong convexity parameter, as in gradient descent [28]. This is not the case here, where the step size is fixed by the mechanics of the problem. We have also shown that fast rates are possible without requiring strong convexity, with a gap condition on the gradient at an extreme point, more commonly associated with bandit problems. We mention that several extensions of our models, motivated by heterogenous estimations, are quite interesting but out of scope. For instance, assume an experimentalist can chose one of K known covariates Xi in order to estimate an unknown β ∈RK, and observes yt = X⊤ πt(β + ξt), where ξt ∼N(0, Σ). Variants of that problem with covariates or contexts [29] can also be considered. Assume for instance that µi(.) and σ2 i (.) are regular functions of covariates ω ∈Rd. The objective is to estimate all the functions µi(.). References [1] A. Agarwal, D. P. Foster, D. Hsu, S. Kakade, and A. Rakhlin. Stochastic convex optimization with bandit feedback. In Proceedings of the 24th International Conference on Neural Information Processing Systems, 2011. [2] S. Agrawal and N. Devanur. Bandits with concave rewards and convex knapsacks. In Proceedings of the Fifteenth ACM Conference on Economics and Computation, EC ’14, pages 989–1006, New York, NY, USA, 2014. ACM. [3] S. Agrawal, N. Devanur, and L. Li. An efficient algorithm for contextual bandits with knapsacks, and an extension to concave objectives. Proceedings of the Annual Conference on Learning Theory (COLT), 2016. [4] J.-Y. Audibert and S. Bubeck. Minimax policies for adversarial and stochastic bandits. Proceedings of the Annual Conference on Learning Theory (COLT), 2009. [5] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. Schapire. The non-stochastic multi-armed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [6] F. Bach and E. Moulines. Non-strongly-convex smooth stochastic approximation with convergence rate o(1/n). In Adv. NIPS, 2013. [7] F. Bach and V. Perchet. Highly-smooth zero-th order online optimization. COLT 2016, 2016. [8] Q. Berthet and V. Chandrasekaran. Resource allocation for statistical estimation. Proceedings of the IEEE, 104(1):115–125, 2016. [9] S. Bubeck and N. Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Machine Learning, 5(1):1–122, 2012. [10] S. Bubeck, R. Eldan, and Y. T. Lee. Kernel-based methods for bandit convex optimization. CoRR, abs/1607.03084, 2016. [11] A. Carpentier, A. Lazaric, M. Ghavamzadeh, R. Munos, and A. Antos. Upper-confidencebound algorithms for active learning in multi-armed bandits. Preprint, 2015. [12] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [13] N. Cesa-Bianchi, G. Lugosi, and G. Stoltz. Regret minimization under partial monitoring. Math. Oper. Res., 31(3):562–580, August 2006. [14] J. Dippon. Accelerated randomized stochastic optimization. Ann. Statist., 31(4):1260–1281, 08 2003. [15] J. Duchi and F. Ruan. Local asymptotics for some stochastic optimization problems: Optimality, constraint identification, and dual averaging. Arxiv Preprint, 2016. [16] E. Even-Dar, R. Kleinberg, S. Mannor, and Y. Mansour. Online learning for global cost functions. In Proceedings of COLT, 2009. 9 [17] M Frank and P. Wolfe. An algorithm for quadratic programming. Naval Res. Logis. Quart., 3:95–110, 1956. [18] E. Hazan, T. Koren, and K. Levy. Logistic regression: Tight bounds for stochastic and online optimization. In Proc. Conference On Learning Theory (COLT), 2014. [19] E. Hazan and K. Levy. Bandit convex optimization: Towards tight bounds. In Adv. NIPS, 2014. [20] E. Hazan. The convex optimization approach to regret minimization. Optimization for machine learning, pages 287–303, 2012. [21] E. Hazan, A. Agarwal, and S. Kale. Logarithmic regret algorithms for online convex optimization. Mach. Learn., 69(2-3):169–192, 2007. [22] M. Jaggi. Sparse Convex Optimization Methods for Machine Learning. PhD thesis, ETH Zurich, 2011. [23] K. Jamieson, R. Nowak, and B. Recht. Query complexity of derivative-free optimization. Advances in Neural Information Processing Systems, 2012. [24] S. Lacoste-Julien and M. Jaggi. An affine invariant linear convergence analysis for frank-wolfe algorithms. NIPS 2013, 2013. [25] J. Lafond, H.-T. Wai, and E. Moulines. On the online frank-wolfe algorithms for convex and non-convex optimizations. Arxiv Preprint, 2015. [26] S. Mannor, V. Perchet, and G. Stoltz. Approachability in unknown games: Online learning meets multi-objective optimization. In Proceedings of COLT, 2014. [27] A. Mas-Colell, M.D. Whinston, and J. Green. Microeconomic theory. Oxford University press, New York, 1995. [28] Y. Nesterov. Introductory Lectures on Convex Optimization. Springer, 2003. [29] V. Perchet and P. Rigollet. The multi-armed bandit problem with covariates. Ann. Statist.., 41:693–721, 2013. [30] V. Perchet, P. Rigollet, S. Chassang, and E. Snowberg. Batched bandit problems. Ann. Statist., 44(2):660–681, 04 2016. [31] B. T. Polyak and A. B. Tsybakov. Optimal order of accuracy of search algorithms in stochastic optimization. Problemy Peredachi Informatsii, 26(2):45–53, 1990. [32] A. Rakhlin, K. Sridharan, and A. Tewari. Online learning: Beyond regret. In Sham M. Kakade and Ulrike von Luxburg, editors, Proceedings of the 24th Annual Conference on Learning Theory, volume 19 of Proceedings of Machine Learning Research, pages 559–594, Budapest, Hungary, 09–11 Jun 2011. PMLR. [33] A. Saha and A. Tewari. Improved regret guarantees for online smooth convex optimization with bandit feedback. In Proc. International Conference on Artificial Intelligence and Statistics (AISTATS), 2011. [34] S. Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. [35] O. Shamir. On the complexity of bandit and derivative-free stochastic convex optimization. In Proc. Conference on Learning Theory, 2013. 10 | 2017 | 568 |
7,083 | Identifying Outlier Arms in Multi-Armed Bandit ∗ Honglei Zhuang1† Chi Wang2 Yifan Wang3 1University of Illinois at Urbana-Champaign 2Microsoft Research, Redmond 3Tsinghua University hzhuang3@illinois.edu wang.chi@microsoft.com yifan-wa16@mails.tsinghua.edu.cn Abstract We study a novel problem lying at the intersection of two areas: multi-armed bandit and outlier detection. Multi-armed bandit is a useful tool to model the process of incrementally collecting data for multiple objects in a decision space. Outlier detection is a powerful method to narrow down the attention to a few objects after the data for them are collected. However, no one has studied how to detect outlier objects while incrementally collecting data for them, which is necessary when data collection is expensive. We formalize this problem as identifying outlier arms in a multi-armed bandit. We propose two sampling strategies with theoretical guarantee, and analyze their sampling efficiency. Our experimental results on both synthetic and real data show that our solution saves 70-99% of data collection cost from baseline while having nearly perfect accuracy. 1 Introduction A multi-armed bandit models a set of items (arms), each associated with an unknown probability distribution of rewards. An observer can iteratively select an item and request a sample reward from its distribution. This model has been predominant in modeling a broad range of applications, such as cold-start recommendation [24], crowdsourcing [13] etc. In some applications, the objective is to maximize the collected rewards while playing the bandit (exploration-exploitation setting [7, 5, 23]); in others, the goal is to identify an optimal object among multiple candidates (pure exploration setting [6]). In the pure exploration setting, rich literature is devoted to the problem of identifying the top-K arms with largest reward expectations [8, 15, 20]. We consider a different scenario, in which one is more concerned about “outlier arms” with extremely high/low expectation of rewards that substantially deviate from others. Such arms are valuable as they usually provide novel insight or imply potential errors. For example, suppose medical researchers are testing the effectiveness of a biomarker X (e.g., the existence of a certain gene sequence) in distinguishing several different diseases with similar ∗The authors would like to thank anonymous reviewers for their helpful comments. †Part of this work was done while the first author was an intern at Microsoft Research. The first author was sponsored in part by the U.S. Army Research Lab. under Cooperative Agreement No. W911NF-092-0053 (NSCTA), National Science Foundation IIS 16-18481, IIS 17-04532, and IIS-17-41317, and grant 1U54GM114838 awarded by NIGMS through funds provided by the trans-NIH Big Data to Knowledge (BD2K) initiative (www.bd2k.nih.gov). The views and conclusions contained in this document are those of the author(s) and should not be interpreted as representing the official policies of the U.S. Army Research Laboratory or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation hereon. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. symptoms. They need to perform medical tests (e.g., gene sequencing) on patients with each disease of interest, and observe if X’s degree of presence is significantly higher in a certain disease than other diseases. In this example, a disease can be modeled as an arm. The researchers can iteratively select a disease with which they sample a patient and perform the medical test to observe the presence of X. The reward is 1 if X is fully present, and 0 if fully absent. To make sure the biomarker is useful, researchers look for the disease with an extremely high expectation of reward compared to other diseases, instead of merely searching for the disease with the highest reward expectation. The identification of “outlier” diseases is required to be sufficiently accurate (e.g., correct with 99% probability). Meanwhile, it should be achieved with a minimal number of medical tests in order to save the cost. Hence, a good sampling strategy needs to be developed to both guarantee the correctness and save cost. As a generalization of the above example, we study a novel problem of identifying outlier arms in multi-armed bandits. We define the criterion of outlierness by extending an established rule of thumb, 3σ rule. The detection of such outliers requires calculating an outlier threshold that depends on the mean reward of all arms, and outputing outlier arms with an expected reward above the threshold. We specifically study pure exploration strategies in a fixed confidence setting, which aims to output the correct results with probability no less than 1 −δ. Existing methods for top-K arm identification cannot be directly applied, mainly because the number of outliers are unknown a priori. The problem also differs from the thresholding bandit problem [26], as the outlier threshold depends on the (unknown) reward configuration of all the arms, and hence also needs to be explored. Given the outlierness criterion, the key challenges in tackling this problem are: i) how to guarantee the identified outlier arms truly satisfy the criterion; and ii) how to design an efficient sampling strategy which balances the trade-off between exploring individual arms and exploring outlier threshold. In this paper, we make the following major contributions: • We propose a Round-Robin sampling algorithm, with a theoretical guarantee of its correctness as well as a theoretical upper bound of its total number of pulls. • We further propose an improved algorithm Weighted Round-Robin, with the same correctness guarantee, and a better upper bound of its total number of pulls. • We verify our algorithms on both synthetic and real datasets. Our Round-Robin algorithm has near 100% accuracy, while reducing the cost of a competitive baseline up to 99%. Our Weighted Round-Robin algorithm further reduces the cost by around 60%, with even smaller error. 2 Related Work We present studies related to our problem in different areas. Multi-armed bandit. Multi-armed bandit is an extensively studied topic. A classic setting is to regard the feedback of pulling an arm as a reward and aim to optimize the exploration-exploitation trade-off [7, 5, 23]. In an alternative setting, the goal is to identify an optimal object using a small cost, and the cost is related to the number of pulls rather than the feedback. This is the “pure exploration” setting [6]. Early work dates back to 1950s under the subject of sequential design of experiments [27]. Recent applications in crowdsourcing and big data-driven experimentation etc. revitalized this field. The problem we study also falls into the general category of pure exploration bandit. Within this category, a number of studies focus on best arm identification [4, 6, 14, 15], as well as finding top-K arms [8, 15, 20]. These studies focus on designing algorithms with probabilistic guarantee of finding correct top-K arms, and improving the number of pulls required by the algorithm. Typical cases of study include: (a) fixed confidence, in which the algorithm needs to return correct top-K arms with probability above a threshold; (b) fixed budget, in which the algorithm needs to maximize the probability of correctness within a certain number of pulls. While there are promising advances in recent theoretical work, optimal algorithms in general cases remain an open problem. Finding top-K arms is different from finding outlier arms, because top arms are not necessarily outliers. Yet the analysis methods are useful and inspiring to our study. There are also studies [26, 11] on thresholding bandit problem, where the aim is to find the set of arms whose expected rewards are larger than a given threshold. However, since the outlier threshold 2 depends on the unknown expected rewards of all the arms, these algorithms cannot apply to our problem. Some studies [12, 16] propose a generalized objective to find the set of arms with the largest sum of reward expectations with a given combinatorial constraint. The constraint is independent of the rewards (e.g., the set must have K elements). Our problem is different as the outlier constraint depends on the reward configuration of all the arms. A few studies on clustering bandits [17, 22] aim to identify the internal cluster structure between arms. Their objective is different from outlier detection. Moreover, they do not study a pure-exploration scenario. Carpentier and Valko [9] propose the notion of “extreme bandits” to detect a different kind of outlier: They look for extreme values of individual rewards from each pull. Using the medical example in Section 1, the goal can be interpreted as finding a patient with extremely high containment of a biomarker. With that goal, the arm with the heaviest tail in its distribution is favored, because it is more likely to generate extremely large rewards than other arms. In contrast, our objective is to find arms with extremely large expectations of rewards. Outlier detection. Outlier detection has been studied for decades [10, 18]. Most existing work focuses on finding outlier data points from observed data points in a dataset. We do not target on finding outlier data points from observed data points (rewards). Instead, we look for outlier arms which generate these rewards. Also, these rewards are not provided at the beginning to the algorithm, and the algorithm needs to proactively pull each arm to obtain more reward samples. Sampling techniques were used in detecting outlier data points from observed data points with very different purposes. In [1], outlier detection is reduced to a classification problem and an active learning algorithm is proposed to selectively sample data points for training the outlier detector. In [28, 29], a subset of data points is uniformly sampled to accelerate the outlier detector. Kollios et al. [21] propose a biased sampling strategy. Zimek et al. [30], Liu et al. [25] use subsampling technique to introduce diversity in order to apply ensemble methods for better outlier detection performance. In outlier arm identification, the purpose of sampling is to estimate the reward expectation of each arm, which is a hidden variable and can only be estimated from sampled rewards. There are also studies on outlier detection when uncertainty of data points is considered [2, 19]. However, these algorithms do not attempt to actively request more information about data points to reduce the uncertainty, which is a different setting from our work. 3 Problem Definition In this section, we describe the problem of identifying outlier arms in a multi-armed bandit. We start with recalling the settings of the multi-armed bandit model. Multi-armed bandit. A multi-armed bandit (MAB) consists of n-arms, where each arm is associated with a reward distribution. The (unknown) expectation of each reward distribution is denoted as yi. At each iteration, the algorithm is allowed to select an arm i to play (pull), and obtain a sample reward x(j) i ∈R from the corresponding distribution, where j corresponds to the j-th samples obtained from the i-th arm. We further use xi to represent all the samples obtained from the i-th arm, and y to represent the configuration of all the yi’s. Problem definition. We study to identify outlier arms with extremely high reward expectations compared to other arms in the bandit. To define “outlier arms”, we adopt a general statistical rule named k-sigma: The arms with reward expectations higher than the mean plus k standard deviation of all arms are considered as outliers. Formally, we define the mean of all the n arms’ reward expectations as well as their standard deviation as: µy = 1 n n X i=1 yi, σy = v u u t 1 n n X i=1 (yi −µy)2 We define a threshold function based on the above estimators as: θ = µy + kσy 3 An arm i is defined as an outlier arm iff yi > θ and is defined as a normal (non-outlier) arm iff yi < θ. We denote the set of outlier arms as Ω= {i ∈[n]|yi > θ}. In a multi-armed bandit setting, the value of yi for each arm is unknown. Instead, the system needs to pull one arm at each iteration to obtain a sample, and estimate the value yi for each arm and the threshold θ from all the obtained samples xi, ∀i. We introduce the following estimators: ˆyi = 1 mi X j x(j) i , ˆµy = 1 n n X i=1 ˆyi, ˆσy = v u u t 1 n n X i=1 (ˆyi −ˆµy)2, ˆθ = ˆµy + kˆσy where mi is the number of times the arm i is pulled. We focus on the fixed confidence setting. The objective is to design an efficient pulling algorithm, such that the algorithm can return the true set of outlier arms Ωwith probability at least 1 −δ (δ is usually a small constant).The fewer total number of pulls, i.e. T = P i mi, the better, because each pull has a economic or time cost. Note that this is a pure exploration setting, i.e., the reward incurred during exploration is irrelevant to the cost. 4 Algorithms In this section, we propose several algorithms, and present the theoretical guarantee of each algorithm. 4.1 Round-Robin Algorithm The most simple algorithm is to pull arms in a round-robin way. That is, the algorithm starts from arm 1 and pulls arm 2, 3, · · · respectively, and goes back to arm 1 after it iterates over all the n arms. The process continues until a certain termination condition is met. Intuitively, the algorithm should terminate when it is confident about whether each arm is an outlier. We achieve this by using the confidence interval of each arm’s reward expectation as well as the confidence interval of the outlier threshold. If the significance levels of these intervals are carefully set, and each reward expectation’s confidence interval has no overlap with the threshold’s confidence interval, we can safely terminate the algorithm while guaranteeing correctness with desired high probability. In the following, we first discuss the formal definition of confidence intervals, as well as how to set the significance levels. Then we present the formal termination condition. Confidence intervals. We provide a general definition of confidence intervals for ˆyi and ˆθ. The confidence interval for ˆyi at significance level δ′ is defined as [ˆyi −βi(mi, δ′), ˆyi + βi(mi, δ′)], such that: P(ˆyi −yi > βi(mi, δ′)) < δ′, and P(ˆyi −yi < −βi(mi, δ′)) < δ′ Similarly, the confidence interval for ˆθ at significance level δ′ is defined as [ˆθ −βθ(m, δ′), ˆθ + βθ(m, δ′)], such that: P(ˆθ −θ > βθ(m, δ′)) < δ′, and P(ˆθ −θ < −βθ(m, δ′)) < δ′ The concrete form of confidence interval may vary with the reward distribution associated with each arm. We defer the discussion of concrete form of confidence interval to Section 4.3. In our algorithm, we update the significance level δ′ for the above confidence intervals at each iteration. After T pulls, the δ′ should be set as: δ′ = 6δ π2(n + 1)T 2 (1) In the following discussion, we omit the parameters in βi and βθ when they are clear from the context. Active arms. At any time, if ˆyi’s confidence interval overlaps with ˆθ’s confidence interval, then the algorithm cannot confidently tell if the arm i is an outlier or a normal arm. We call such arms active, and vice versa. Formally, an arm i is active, denoted as ACTIVEi = TRUE, iff ( ˆyi −βi < ˆθ + βθ, if ˆyi > ˆθ; ˆyi + βi > ˆθ −βθ, otherwise. (2) 4 We denote the set of active arms as A = {i ∈[n]|ACTIVEi = TRUE}. With this definition, the termination condition is simply A = ∅. When this condition is met, we return the result set: ˆΩ= {i|ˆyi > ˆθ} (3) The algorithm is outlined in Algorithm 1. Algorithm 1: Round-Robin Algorithm (RR) Input: n arms, outlier parameter k Output: A set ˆΩof outlier arms 1 Pull each arm i once ∀i ∈[n]; // Initialization 2 T ←n; 3 Update ˆyi, mi, βi, ∀i ∈[n] and ˆθ, βθ; 4 i ←1; 5 while A ̸= ∅do 6 i ←i%n + 1; // Round-robin 7 Pull arm i; 8 T ←T + 1; 9 Update ˆyi, mi, βi and ˆθ, βθ; 10 return ˆΩaccording to Eq. (3); Theoretical results. We first show that if the algorithm terminates with no active arms, the returned outlier set will be correct with high probability. Theorem 1 (Correctness). With probability 1 −δ, if the algorithm terminates after a certain number of pulls T when there is no active arms i.e. A = ∅, then the returned set of outliers will be correct, i.e. ˆΩ= Ω. We can also provide an upper bound for the efficiency of the algorithm in a specific case when all the reward distributions are bounded within [a, b] where b −a = R. In this case, the confidence intervals can be instantiated as discussed in Section 4.3. And we can accordingly obtain the following results: Theorem 2. With probability 1−δ, the total number of pulls T needed for the algorithm to terminate is bounded by T ≤8R2HRR log 2R2π2(n + 1)HRR 3δ + 1 + 4n (4) where HRR = H1 1 + p l(k) 2, H1 = n mini∈[n](yi −θ)2 , l(k) = "s (1 + k√n −1)2 n + s k2 2 log π2n3 6δ #2 4.2 Weighted Round-Robin Algorithm The round-robin algorithm evenly distributes resources to all the arms. Intuitively, active arms deserve more pulls than inactive arms, since the algorithm is almost sure about whether an inactive arm is outlier already. Based on this idea, we propose an improved algorithm. We allow the algorithm to sample the active arms ρ times as many as inactive arms, where ρ ≥1 is a real constant. Since ρ is not necessarily an integer, we use a method similar to stride scheduling to guarantee the ratio between number of pulls of active and inactive arms are approximately ρ in a long run. The algorithm still pulls by iterating over all the arms. However, after each arm is pulled, the algorithm can decide either to stay at this arm for a few “extra pulls,” or proceed to the next arm. If the arm pulled at the T-th iteration is the same as the arm pulled at the (T −1)-th iteration, we call the T-th pull an “extra pull.” Otherwise, we call it a “regular pull.” We keep a counter ci for each arm i. When T > n, after the algorithm 5 performs a regular pull on arm i, we add ρ to the counter ci. If this arm is still active, we keep pulling this arm until mi ≥ci or it becomes inactive. Otherwise we proceed to the next arm to perform the next regular pull. This algorithm is named Weighted Round-Robin, and outlined in Algorithm 2. Algorithm 2: Weighted Round-Robin Algorithm (WRR) Input: n arms, outlier parameter k, ρ Output: A set of outlier arms ˆΩ 1 Pull each arm i once ∀i ∈[n]; // Initialization 2 T ←n; 3 Update ˆyi, mi, βi, ∀i ∈[n] and ˆθ, βθ; 4 ci ←0, ∀i ∈[n]; 5 i ←1; 6 while A ̸= ∅do 7 i ←i%n + 1 ; // Next regular pull 8 ci ←ci + ρ; 9 repeat 10 Pull arm i; 11 T ←T + 1; 12 Update ˆyi, mi, βi and ˆθ, βθ; 13 until i /∈A W mi ≥ci; 14 return ˆΩaccording to Eq. (3); Theoretical results. Since the Weighted Round-Robin algorithm has the same termination condition, according to Theorem 1, it has the same correctness guarantee. We can also bound the total number of pulls needed for this algorithm when the reward distributions are bounded. Theorem 3. With probability 1−δ, the total number of pulls T needed for the Weighted Round-Robin algorithm to terminate is bounded by T ≤8R2HWRR log 2R2π2(n + 1)HWRR 3δ + 1 + 2(ρ + 2)n (5) where HWRR = H1 ρ + (ρ −1)H2 ρ 1 + p l(k)ρ 2 , H2 = X i 1 (yi −θ)2 Determining ρ. One important parameter in this algorithm is ρ. For bounded reward distributions, we have a closed form upper bound of T as O(HWRR log HWRR δ ). The lower bound of T is independent of ρ. We conjecture the lower bound to be Ω(H2 log H2 δ ). We aim to find the ρ that minimizes the gap between the upper bound and the lower bound. We formalize the objective as finding a ρ to minimize HWRR/H2. Since we do not know the reward distribution configuration y, we use the minimax principle to find ρ∗that optimizes the most difficult configuration y, namely ρ∗= argmin ρ≥1 sup y HWRR H2 Since H1 n ≤H2 ≤H1, and HWRR H2 is monotonically increasing with regard to H1 H2 , we can obtain the optimal value ρ∗as ρ∗= (n −1) 2 3 l 1 3 (k) (6) Theoretical comparison with RR. We compare theses two algorithms by comparing their upper bounds. Essentially, we study HWRR/HRR since the two bounds only differ in this term after a small 6 constant is ignored. We have HWRR HRR = 1 ρ + ρ −1 ρ H2 H1 1 + p l(k)ρ 1 + p l(k) 2 (7) The ratio between H2 and H1 indicates how much cost WRR will save from RR. Notice that 1 n ≤H2 H1 ≤1. In the degenerated case H2/H1 = 1, WRR does not save any cost from RR. This case occurs only when all arms have identical reward expectations, which is rare and not interesting. However, if H2/H1 = 1/n, by setting ρ to the optimal value in Eq. (6), it is possible to save a substantial portion of pulls. In this scenario, the RR algorithm will iteratively pull all the arms until the arm closest to the threshold i∗confidently determined as outlier or normal. However, the WRR algorithm is able to invest more pulls on arm i∗as it remains active, while pulling other arms for fewer times, only to obtain a more precise estimate of the outlier threshold. 4.3 Confidence Interval Instantiation With different prior knowledge of reward distributions, confidence intervals can be instantiated differently. We introduce the confidence interval for a relatively general scenario, where reward distributions are bounded. Bounded distribution. Suppose the reward distribution of each arm is bounded in [a, b], and R = b −a. According to Hoeffding’s inequality and McDiarmid’s inequality, we can derive the confidence interval for yi as βi(mi, δ′) = R s 1 2mi log 1 δ′ , βθ(m, δ′) = R s l(k) 2h(m) log 1 δ′ where mi is the number of pulls of arm i so far, and h(m) is the harmonic mean of all the mi’s. Bernoulli distribution. In many real applications, each arm returns a binary sample 0 or 1, drawn from a Bernoulli distribution. We use the following confidence intervals heuristically. We leverage a confidence interval presented in [3], defined as βi(mi, δ′) = zδ′/2 s ˜p(1 −˜p) mi , βθ(m, δ′) = v u u tX i kˆyi n p ˆσy + 1 n 2 β2 i where ˜p = m+ i + z2 δ′/2 2 mi + z2 δ′/2 , zδ′/2 = erf−1(1 −δ′/2) m+ i is the number of samples that equal to 1 among mi samples, and zδ′/2 is value of the inverse error function. 5 Experimental Results In this section, we present experiments to evaluate both the effectivenss and efficiency of proposed algorithms. 5.1 Datasets Synthetic. We construct several synthetic datasets with varying number of arms n = 20, 50, 100, 200, and varying k = 2, 2.5, 3. There are 12 configurations in total. For each configuration, we generate 10 random test cases. For each arm, we draw its reward from a Bernoulli distribution Bern(yi). 7 Twitter. We consider the following application of detecting outlier locations with respect to keywords from Twitter data. A user has a set of candidate regions L = {l1, · · · , ln}, and is interested in finding outlier regions where tweets are extremely likely to contain a keyword w. In this application, each region corresponds to an arm. A region has an unknown probability of generating a tweet containing the keyword, which can be regarded as a Bernoulli distribution. We collect a Twitter dataset with 1, 500, 000 tweets from NYC, associated with its latitude and longitude. We divide the entire space into regions of 2′′ × 2′′ in latitude and longitude respectively. We select 47 regions with more than 5, 000 tweets as arms and select 20 keywords as test cases. 5.2 Setup Methods for comparison. Since the problem is new, there is no directly comparable solution in existing work. We design two baselines for comparative study. • Naive Round-Robin (NRR). We play arms in a round-robin fashion, and terminate as soon as we find the estimated outlier set ˆΩhas not changed in the last consecutive 1/δ pulls. ˆΩis defined as in Eq. (3). This baseline reflects how well the problem can be solved by RR with a heuristic termination condition. • Iterative Best Arm Identification (IB). We apply a state-of-the-art best arm identification algorithm [12] iteratively. We first apply it to all n arms until it terminates, and then remove the best arm and apply it to the rest arms. We repeat this process until the current best arm is not in ˆΩ, where the threshold function is heuristically estimated based on the current data. We then return the current ˆΩ. This is a strong baseline that leverages the existing solution in best-arm identification. Then we compare them with our proposed two algorithms, Round-Robin (RR) and Weighted RoundRobin (WRR). Parameter configurations. For both of our algorithms, we derived the confidence intervals based on Bernoulli distribution. Since some algorithm takes extremely long time to terminate in certain cases, we place a cap on the total number of pulls. Once an algorithm runs for 107 pulls, the algorithm is forced to terminate and output the current estimated outlier set ˆΩ. We set δ = 0.1. For each test case, we run the experiments for 10 times, and take the average of both the correctness metrics and number of pulls. 5.3 Results Performance on Synthetic. Figure 1(a) shows the correctness of each algorithm when n varies. It can be observed that both of our proposed algorithms achieve perfect correctness on all the test sets. In comparison, the NRR baseline has never achieved the desired level of correctness. Based on the performance on correctness, the naive baseline NRR does not qualify an acceptable algorithm, so we only measure the efficiency of the rest algorithms. We plot the average number of pulls each algorithm takes before termination varying with the number of arms n in Figure 1(b). On all the different configurations of n, IB takes a much larger number of pulls than WRR and RR, which makes it 1-3 orders of magnitude as costly as WRR and RR. At the same time, RR is also substantially slower than WRR, with the gap gradually increasing as n increases. This shows our design of additional pulls helps. Figure 1(c) further shows that in 80% of the test cases, WRR can save more than 40% of cost from RR; in about half of the test cases, WRR can save more than 60% of the cost. Performance on Twitter. Figure 2(a) shows the correctness of different algorithms on Twitter data set. As one can see, both of our proposed algorithms qualify the correctness requirement, i.e., the probability of returning the exactly correct outlier set is higher than 1 −δ. The NRR baseline is far from reaching that bar. The IB baseline barely meets the bar, and the precision, recall and F1 measures show that its returned result is averagely a good approximate to the correct result, with an average F1 metric close to 0.95. This once again confirms that IB is a strong baseline. We compare the efficiency of IB, RR and WRR algorithms in Figure 2(b). In this figure, we plot the cost reduction percentage for both RR and WRR in comparison with IB. WRR is a clear winner. In almost 80% of the test cases, it saves more than 50% of IB’s cost, and in about 40% of the test 8 20 50 100 200 n 0.0 0.2 0.4 0.6 0.8 1.0 %Correct 1 −δ NRR IB RR WRR (a) % Exactly Correct 20 50 100 200 n 103 104 105 106 107 #Pulls IB RR WRR Cap (b) Avg. #Pulls vs. n 0.0 0.2 0.4 0.6 0.8 1.0 Cost Reduction Percentage 0.0 0.2 0.4 0.6 0.8 1.0 Percentage of Test Cases (c) WRR’s Cost Reduction wrt RR Figure 1: Effectiveness and efficiency studies on Synthetic data set. Cap indicates the maximum number of pulls we allow an algorithm to run. %Correct Precision Recall F1 0.0 0.2 0.4 0.6 0.8 1.0 Performance Measure 1 −δ NRR IB RR WRR (a) Correctness comparison −1.5 −1.0 −0.5 0.0 0.5 1.0 Cost Reduction Percentage 0.0 0.2 0.4 0.6 0.8 1.0 Percentage of Test Cases RR WRR (b) Cost Reduction wrt IB Figure 2: Effectiveness and efficiency studies on Twitter dataset. 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 ρ 1.00 1.02 1.04 1.06 1.08 Tρ/Tρ∗ Preset ρ ρ = ρ∗ Figure 3: Ratio between avg. #pulls with a given ρ and with ρ = ρ∗. cases, it saves more than 75% of IB’s cost. In contrast, RR’s performance is comparable to IB. In approximately 30% of the test cases, RR is actually slower than IB and has negative cost reduction, though in another 40% of the test cases, RR saves more than 50% of IB’s cost. Tuning ρ. In order to experimentally justify our selection of ρ value, we test the performance of WRR on a specific setting of synthetic data set (n = 15, k = 2.5) with varying preset ρ values. Figure 3 shows the average number of pulls of 10 test cases for each ρ in {1.5, 2, . . . , 5}, comparing to the performance with ρ = ρ∗according to Eq. (6). It can be observed that the performance of ρ = ρ∗is very close to the best performance when ρ = 3. A further investigation reveals that the H1 H2 of these test cases vary from 3 to 14. Although we choose ρ∗based on an extreme assumption H1 H2 = n, its average performance is found to be close to the optimal even when the data do not satisfy the assumption. 6 Conclusion In this paper, we study a novel problem of identifying the outlier arms with extremely high/low reward expectations compared to other arms in a multi-armed bandit. We propose a Round-Robin algorithm and a Weighted Round-Robin algorithm with correctness guarantee. We also upper bound both algorithms when the reward distributions are bounded. We conduct experiments on both synthetic and real data to verify our algorithms. There could be further extensions of this work, including deriving a lower bound of this problem, or extending the problem to a PAC setting. References [1] N. Abe, B. Zadrozny, and J. Langford. Outlier detection by active learning. In KDD, pages 504–509. ACM, 2006. [2] C. C. Aggarwal and P. S. Yu. Outlier detection with uncertain data. In SDM, pages 483–493. SIAM, 2008. [3] A. Agresti and B. A. Coull. Approximate is better than "exact" for interval estimation of binomial proportions. The American Statistician, 52(2):119–126, 1998. ISSN 00031305. URL http://www. jstor.org/stable/2685469. [4] J.-Y. Audibert and S. Bubeck. Best arm identification in multi-armed bandits. In COLT, pages 13–p, 2010. [5] P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002. 9 [6] S. Bubeck, R. Munos, and G. Stoltz. Pure exploration in finitely-armed and continuous-armed bandits. Theoretical Computer Science, 412(19):1832–1852, 2011. [7] S. Bubeck, N. Cesa-Bianchi, et al. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 5(1):1–122, 2012. [8] S. Bubeck, T. Wang, and N. Viswanathan. Multiple identifications in multi-armed bandits. In ICML, pages 258–265, 2013. [9] A. Carpentier and M. Valko. Extreme bandits. In NIPS, pages 1089–1097, 2014. [10] V. Chandola, A. Banerjee, and V. Kumar. Anomaly detection: A survey. ACM Computing Surveys, 41(3): 15:1–15:58, 2009. [11] L. Chen and J. Li. On the optimal sample complexity for best arm identification. arXiv preprint arXiv:1511.03774, 2015. [12] S. Chen, T. Lin, I. King, M. R. Lyu, and W. Chen. Combinatorial pure exploration of multi-armed bandits. In NIPS, pages 379–387, 2014. [13] P. Donmez, J. G. Carbonell, and J. Schneider. Efficiently learning the accuracy of labeling sources for selective sampling. In KDD, pages 259–268. ACM, 2009. [14] E. Even-Dar, S. Mannor, and Y. Mansour. Action elimination and stopping conditions for the multi-armed bandit and reinforcement learning problems. Journal of machine learning research, 7(Jun):1079–1105, 2006. [15] V. Gabillon, M. Ghavamzadeh, and A. Lazaric. Best arm identification: A unified approach to fixed budget and fixed confidence. In NIPS, pages 3212–3220, 2012. [16] V. Gabillon, A. Lazaric, M. Ghavamzadeh, R. Ortner, and P. Bartlett. Improved learning complexity in combinatorial pure exploration bandits. In AISTATS, pages 1004–1012, 2016. [17] C. Gentile, S. Li, and G. Zappella. Online clustering of bandits. In ICML, pages 757–765, 2014. [18] V. J. Hodge and J. Austin. A survey of outlier detection methodologies. Artificial Intelligence Review, 22 (2):85–126, 2004. [19] B. Jiang and J. Pei. Outlier detection on uncertain data: Objects, instances, and inferences. In ICDE, pages 422–433. IEEE, 2011. [20] S. Kalyanakrishnan, A. Tewari, P. Auer, and P. Stone. Pac subset selection in stochastic multi-armed bandits. In ICML, pages 655–662, 2012. [21] G. Kollios, D. Gunopulos, N. Koudas, and S. Berchtold. Efficient biased sampling for approximate clustering and outlier detection in large data sets. IEEE Transactions on Knowledge and Data Engineering, 15(5):1170–1187, 2003. [22] N. Korda, B. Szörényi, and L. Shuai. Distributed clustering of linear bandits in peer to peer networks. In Journal of Machine Learning Research Workshop and Conference Proceedings, volume 48, pages 1301–1309. International Machine Learning Societ, 2016. [23] T. L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in applied mathematics, 6(1):4–22, 1985. [24] L. Li, W. Chu, J. Langford, and R. E. Schapire. A contextual-bandit approach to personalized news article recommendation. In WWW, pages 661–670. ACM, 2010. [25] H. Liu, Y. Zhang, B. Deng, and Y. Fu. Outlier detection via sampling ensemble. In Big Data, pages 726–735. IEEE, 2016. [26] A. Locatelli, M. Gutzeit, and A. Carpentier. An optimal algorithm for the thresholding bandit problem. In ICML, pages 1690–1698. JMLR. org, 2016. [27] H. Robbins. Some aspects of the sequential design of experiments. Bulletin of the American Mathematical Society, 58(5):527–35, 1952. [28] M. Sugiyama and K. Borgwardt. Rapid distance-based outlier detection via sampling. In NIPS, pages 467–475, 2013. [29] M. Wu and C. Jermaine. Outlier detection by sampling with accuracy guarantees. In KDD, pages 767–772. ACM, 2006. [30] A. Zimek, M. Gaudet, R. J. Campello, and J. Sander. Subsampling for efficient and effective unsupervised outlier detection ensembles. In KDD, pages 428–436. ACM, 2013. 10 | 2017 | 569 |
7,084 | k-Support and Ordered Weighted Sparsity for Overlapping Groups: Hardness and Algorithms Cong Han Lim University of Wisconsin-Madison clim9@wisc.edu Stephen J. Wright University of Wisconsin-Madison swright@cs.wisc.edu Abstract The k-support and OWL norms generalize the ℓ1 norm, providing better prediction accuracy and better handling of correlated variables. We study the norms obtained from extending the k-support norm and OWL norms to the setting in which there are overlapping groups. The resulting norms are in general NP-hard to compute, but they are tractable for certain collections of groups. To demonstrate this fact, we develop a dynamic program for the problem of projecting onto the set of vectors supported by a fixed number of groups. Our dynamic program utilizes tree decompositions and its complexity scales with the treewidth. This program can be converted to an extended formulation which, for the associated group structure, models the k-group support norms and an overlapping group variant of the ordered weighted ℓ1 norm. Numerical results demonstrate the efficacy of the new penalties. 1 Introduction The use of the ℓ1-norm to induce sparse solutions is ubiquitous in machine learning, statistics, and signal processing. When the variables can be grouped into sets corresponding to different explanatory factors, group variants of the ℓ1 penalty can be used to recover solutions supported on a small number of groups. When the collection of groups G forms a partition of the variables (that is, the groups do not overlap), the group lasso penalty [19] ΩGL(x) := X G∈G∥xG∥p (1) is often used. In many cases, however, some variables may contribute to more than one explanatory factor, which leads naturally to overlapping-group formulations. Such is the case in applications such as finding relevant sets of genes in a biological process [10] or recovering coefficients in wavelet trees [17]. In such contexts, the standard group lasso may introduce artifacts, since variables that are contained in different numbers of groups are penalized differently. Another approach is to employ the latent group lasso [10]: ΩLGL(x) := min x,v X G∈G∥vG∥p such that X G∈G vG = x, (2) where each vG is a separate vector of latent variables supported only on the group G. The latent group lasso (2) can be written in terms of atomic norms, where the atomic set is {x : ∥x∥p≤1, supp(x) ⊆G for some G ∈G} . This set allows vectors supported on any one group. The unit ball is the convex hull of this atomic set. A different way of extending the ℓ1-norm involves explicit use of a sparsity parameter k. Argyriou et al. [1] introduce the k-support norm Ωk from the atomic norm perspective. The atoms are the set of k-sparse vectors with unit norm, and the unit ball of the norm is thus conv ({x : ∥x∥p≤1, |supp(x)|≤k}) . (3) 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The k-support norm with p = 2 offers a tighter alternative to the elastic net, and like the elastic net, it has better estimation performance than the ℓ1 norm especially in the presence of correlated variables. Another extension of the ℓ1 norm is to the OSCAR/OWL/SLOPE norms [5, 20, 4], which order the elements of x according to magnitude before weighing them: ΩOWL(x) := X i∈[n] wi|x↓ i |. (4) where the weights wi, i = 1, 2, . . . , n are nonnegative and decreasing and x↓denotes the vector x sorted by decreasing absolute value. This family of norms controls the false discovery rate and clusters correlated variables. These norms correspond to applying the ℓ∞norm to a combinatorial penalty function in the framework of Obozinski and Bach [11, 12], and can be generalized by considering different ℓp-norms. For p = 2, we have the SOWL norm [18], whose variational form is ΩSOWL(x) := 1 2 minη∈Rn + X i∈[n] x2 i /ηi + wi|η↓ i | . We will refer to the generalized version of these norms as pOWL norms. The pOWL norms can be viewed as extensions of the k-support norms from the atomic norm angle, which we will detail later. ℓ1 k-support OSCAR OWL/SOWL SLOPE (Non-overlapping) Group Lasso (Non-overlapping) k-Group Support (Non-overlapping) GrOWL Latent Group Lasso Latent kGroup Support (LG(k)) Latent Group Smooth OWL (LGS-OWL) Figure 1: Some sparsity-inducing norms. Each arrow represents an extension of a previous norm. We study the two shaded norms on the right. In this paper, we study the norms obtained by combining the overlapping group formulations with the k-sparse/OWL formulations, with the aim of obtaining the benefits of both worlds. When the groups do not overlap, the combination is fairly straightforward; see the GrOWL norm introduced by Oswal et al. [13]. We consider two classes of norms for overlapping groups. The latent k-group support (LG(k)) norm, very recently introduced by Rao et al. [15], is defined by the unit ball conv n x : ∥x∥p≤1, supp(x) ⊆ [ G∈Gk G for some subset Gk ⊆G with k groups o , (5) directly extending the k-support norm definition to unions of groups. We introduce the latent group smooth OWL (LGS-OWL) norm, which similarly extends OWL/SOWL/GrOWL. These norms can be applied in the same settings where the latent group lasso has proven to be useful, while adapting better to correlations. We explain how the norms are derived from a combinatorial penalty perspective using the work of Obozinski and Bach [11, 12], and also provide explicit atomic-norm formulations. The LGS-OWL norm can be seen as a combination of k-support norms across different k. The rest of this focuses on computational aspects of these norms. Both the LG(k) norm and the LGS-OWL norm are in general NP-hard to compute. Despite this hardness result, we devise a computational approach that utilizes tree decompositions of the underlying group intersection graph. The key parameter affecting the efficiency of our algorithms is the treewidth tw of the group intersection graph, which is small for certain graph structures such as chains, trees, and cycles. Certain problems with hierarchical groups like image recovery can have a tree structure [17, 3]. Our first main technical contribution is a dynamic program for the best k-group sparse approximation problem, which has time complexity O(2O(tw) · mk + n), where m is the total number of groups. For group intersection graphs with a tree structure (tw = 2), this leads to a O(mk + n) algorithm, significantly improving on the O(m2k + n) algorithm presented in [3]. Next, we build on the principles behind the dynamic program to construct extended formulations of O(2O(tw) · mk2 + n) 2 size for LG(k) and O(2O(tw) · m3 + n) for LGS-OWL, improving by a factor of k or m respectively in the special case in which the tree decomposition is a chain. This approach also yields extended formulations of size O(nk) and O(n2) for the k-support and pOWL norms, respectively. (Previously, only a O(n2) linear program was known for OWL [5].) We thus facilitate incorporation of these norms into standard convex programming solvers. Related Work. Obozinski and Bach [11, 12] develop a framework for penalties derived by convexifying the sum of a combinatorial function F and an ℓp term. They describe algorithms for computing the proximal operators and norms for the case of submodular F. We use their framework, but note that the algorithms they provide cannot be applied since our functions are not submodular. Two other works focus directly on sparsity of unions of overlapping groups. Rao et al. [15] introduce the LG(k) norm and approximates it via variable splitting. Baldassarre et al. [3] study the best k-group sparse approximation problem, which they prove is NP-hard. For tree-structured intersection graphs, they derive the aforementioned dynamic program with complexity O(m2k + n). For the case of p = ∞, a linear programming relaxation for the unit ball of the latent k-group support norm is provided by Halabi and Cevher [9, Section 5.4]. This linear program is tight if the group-element incidence matrix augmented with an all-ones row is totally unimodular. This condition can be violated by simple tree-structured intersection graphs with just four groups. Notation and Preliminaries. Given A ⊆[n], the vector xA is the subvector of x ∈Rn corresponding to the index set A. For collections of groups G, we use m to denote the number of groups in G, that is, m = |G|. We assume that S G∈G G = [n], so that every index i ∈[n] appears in at least one group G ∈G. The discrete function CG(A) denotes the minimum number of groups from G needed to cover A (the smallest set cover). 2 Overlapping Group Norms with Group Sparsity-Related Parameters We now describe the LG(k) and LGS-OWL norms from the combinatorial penalty perspective by Obozinski and Bach [11, 12], providing an alternative theoretical motivation for the LG(k) norm and formally motivating and defining LGS-OWL. Given a combinatorial function F : {A ⊆[n]} → R ∪{+∞} and an ℓp norm, a norm can be derived by taking the tightest positively homogeneous convex lower bound of the combined penalty function F(supp(x)) + ν∥x∥p p. Defining q to satisfy 1/p + 1/q = 1 (so that ℓp and ℓq are dual), this procedure results in the norm ΩF p , which is given by the convex envelope of the function ΘF p (x) := q1/q(pν)1/pF(supp(x))1/q∥x∥p, whose unit ball is conv n x ∈Rn : ∥x∥p≤F(supp(x))−1/qo . (6) The norms discussed in this paper can be cast in this framework. Recall that the definition of OWL (4) includes nonnegative weights w1 ≥w2 ≥. . . wn ≥0. Defining h : [n] →R to be the monotonically increasing concave function h(k) = Pk i=1 wi, we obtain k-support : F(A) = 0, A = ∅, 1, |A|≤k, ∞, otherwise, LG(k) : F(A) = 0, A = ∅, 1, CG(A) ≤k, ∞, otherwise, pOWL : F(A) = h(|A|), LGS-OWL : F(A) = h(CG(A)). The definitions of the k-support and LG(k) balls from (3) and (5), respectively, match (6). As for the OWL norms, we can express their unit ball by conv m [ i=1 n x ∈Rn : ∥x∥p≤h(i)−1/q, CG(supp(x)) = i o! . (7) This can be seen as taking all of the k-support or LG(k) atoms for each value of k, scaling them according to the value of k, then taking the convex hull of the resulting set. Hence, the OWL norms can be viewed as a way of interpolating the k-support norms across all values of k. We take advantage of this interpretation in constructing extended formulations. 3 Hardness Results. Optimizing with the cardinality or non-overlapping group based penalties is straightforward, since the well-known PAV algorithm [2] allows us to exactly compute the proximal operator in O(n log n) time [12]. However, the picture is different when we allow overlapping groups. There are no fast exact algorithms for overlapping group lasso, and iterative algorithms are typically used. Introducing the group sparsity parameters makes the problem even harder. Theorem 2.1. The following problems are NP-hard for both ΩLG(k) and ΩLGS-OWL when p > 1: Compute Ω(y), (norm computation) arg minx∈Rn 1 2∥x −y∥2 2 such that Ω(x) ≤µ, (projection operator) arg minx∈Rn 1 2∥x −y∥2 2+λΩ(x). (proximal operator) Therefore, other problems that incorporate these norm are also hard. Note that even if we only allow each element to be in at most two groups, the problem is already hard. We will show in the next two sections that these problems are tractable if the treewidth of the group intersection graph is small. 3 A Dynamic Program for Best k-Group Approximation The best k-group approximation problem is the discrete optimization problem arg min x ∥y −x∥2 2 such that CG(supp(x)) ≤k, (8) where the goal is to compute the projection of a vector y onto a union of subspaces each defined by a subcollection of k groups. The solution to (8) has the form x′ i = yi i in chosen support, 0 otherwise. As mentioned above, Baldassarre et al. [3] show that this problem is NP-hard. They provide a dynamic program that acts on the group intersection graph and focus specifically on the case where this graph is a tree, obtaining a O(m2k + n) dynamic programming algorithm. In this section, we also start by using group intersection graphs, but instead focus on the tree decomposition of this graph, which yields a more general approach. 3.1 Group Intersection Graphs and Tree Decompositions We can represent the interactions between the different groups using an intersection graph, which is an undirected graph IG = (G, EG) in which each vertex denotes a group and two groups are connected if and only if they overlap. For example, if the collection of groups is {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}, . . . }, then the intersection graph is simply a chain. If each group corresponds to a parent and all its children in a rooted tree, the intersection graph is also a tree. The group intersection graph highlights the dependencies between different groups. Algorithms for this problem need to be aware of how picking one group may affect the choice of another, connnected group. (If the groups do not overlap, then no groups are connected and a simple greedy approach suffices.) A tree decomposition of IG is a more precise way of representing these dependencies. We provide the definition of tree decompositions and treewidth below and illustrate the core ideas in Figure 2. Tree decompositions are a fundamental tool in parametrized complexity, leading to efficient algorithms if the parameter in question is small. See [7, 8] for a a more comprehensive overview Figure 2: From groups to a group intersection graph to a tree decomposition of width 2. 4 A tree decomposition of (V, E) is a tree T with vertices X = {X1, X2, . . . , XN}, satisfying the following conditions: (1) Each Xi is a subset of V , and the union of all sets Xi gives V . (2) For every edge (v, w) in E, there is a vertex Xi that contains both v and w. (3) For each v ∈V , the vertices that contain v form a connected subtree of T. The width of a tree decomposition is maxi|Xi|−1, and the treewidth of a graph (denoted by tw) is the smallest width among all tree decompositions. The tree decomposition is not unique, and there is always a tree width with number of nodes |X|≤|V | (see for example Lemma 10.5.2 in [7]). Henceforth, we will assume that |X|≤m. The treewidth tw is modest for many types of graphs. For example, the treewidth is bounded for the tree (tw = 1), the cycle (tw = 2), and series-parallel graphs (tw = 2). Computing tree decompositions with optimal width for these graphs can be done in linear time. On the other hand, the grid graph has large treewidth (tw ≈√n) and checking if a graph has tw ≤k is NP-complete1. 3.2 A Dynamic Program for Tree Decompositions Given a collection of groups G, a corresponding tree decomposition T (G) of the group intersection graph, and a vector y ∈Rn, we provide a dynamic program for problem (8), the best k-group approximation of y. The tree decomposition has several features that we can exploit. The tree structure provides a natural order for processing the vertices, which are subcollections of groups. Properties (1) and (2) yield a natural way to map elements i ∈[n] onto vertices in the tree, indicating when to include yi in the process. Finally, the connected subtree corresponding to each group G as a result of property (3) means that we only need to keep explicit information about G for that part of the computation. The high-level view of our approach is described below. Details appear in the supplementary material. Preprocessing: For each i ∈[n], let G(i) denote the set of all groups that contain i. We have three data structures: A and V, which are both indexed by (X, Y ), with X ∈X and Y ⊆X; and T, which is indexed by (X, Y, s), with s ∈{0, 1 . . . , k}. 1. Root the tree decomposition and process the nodes from root to leaves: At each node X, add an index i ∈[n] to A(X, G(i)) if i is unassigned and G(i) ⊆X. 2. Set V(X, Y ) ←P y2 i : i ∈A(X, G(i)), Y ∩G(i) ̸= 0 . Main Process: At each vertex X in the tree decomposition, we are allowed to pick groups Y to include in the support of the solution. The s term in T(X, Y, s) indicates the current group sparsity “budget” that has been used. Proposition 3.2 below gives the semantic meaning behind each entry in T . We process the nodes from the leaves to the root to fill T . At each step, the entries for node Xp will be updated with information from its children. The update for a leaf Xp is simply T(Xp, Yp, s) ←V(Xp, Yp) if |Yp|= s. If |Yp|̸= s, we mark T(Xp, Yp, s) as invalid. For non-leaf Xp, we need to ensure that the groups chosen by the parent and the child are compatible. We ensure this property via constraints of the form Yc ∩Xp = Yp ∩Xc. For a single child Xc we have T(Xp, Yp, s) ← max Y :Y ∩Xp=Yp∩Xc T(Xc, Y, s −s0) : |Yp ∩Xc|= s0 + V(Xp, Yp), (9) and finally for Xp multiple children Xc(1), . . . , Xc(d) of Xp, we set T(Xp, Yp, s) as max Yi:Yi∩Xp=Yp∩Xc(i) for each i X Pd i=1 si=s−s0 T(Xc(i), Yi, si) : Yp ∩ [ i∈[d] Xc(i) = s0 + V(Xp, Yp). (10) After making each update, we keep track of which Yi was used for each of the children for T (Xp, Yp, s). This allows us to backtrack to recover the solution after T has been filled. The next lemma and proposition prove the correctness of this dynamic program. The lemma follows from the fact that every clique in a graph is contained in some node in any tree decomposition, while the proposition from induction from the leaf nodes. 1Nonetheless, there is significant research on developing exact and heuristic tree decomposition algorithms. There are regular competitions for better implementations [6, pacechallenge.wordpress.com]. 5 Lemma 3.1. Every index in [n] is assigned in the first preprocessing step. Proposition 3.2. For a node X, let yX be the y vector restricted to just the indices i assigned to nodes below and including X. Each entry T(X, Y, s) is the squared ℓ2-norm of the best projection of yX, subject to the fact that besides the groups in Y , at most s −|Y | are allowed to be used. We now prove the time complexity of this algorithm. Proposition 3.4 describes the time complexity of the update when there are many children. It uses the following simple lemma about max-convolutions. Computing the other updates is straightforward. Lemma 3.3. The max-convolution f between two concave functions g1, g2 : {0, 1, . . . , k} →R, defined by f(i) := maxj {g1(j) + g2(i −j)}, can be computed in O(k) time. Proposition 3.4. The update (10) for a fixed Xp, Yp across all values s ∈{0, 1, . . . , k} can be implemented in O(2O(tw) · dk) time. Combining timing and correctness results gives us the desired algorithmic result. This approach significantly improves on the results of Baldassarre et al. [3]. Their approach is specific to groups whose intersection graph is a tree and uses O(m2k + n) time. Theorem 3.5. Given G and a corresponding tree decomposition TG with treewidth tw, projection onto the corresponding k-group model can be done in O(2O(tw) · (mk + n)) time. When the group intersection graph is a tree, the projection takes O(mk + n) time. 4 Extended Formulations from Tree Decompositions Here we model explicitly the unit ball of LG(k) (5) and LGS-OWL (7). The principles behind this formulation are very similar to the dynamic program in the previous section. We first consider the latent k-group support norm, whose atoms are n x : ∥x∥p≤1, supp(x) ⊆ [ G∈Gk G for some subset Gk ⊆G with k groups o . The following process describes a way of selecting an atom; our extended formulation encodes this process mathematically. We introduce variables b, which represent the ℓp budget at a given node, choice of groups, and group sparsity budget. We start at the root Xr, with ℓp budget of µ and group sparsity budget of k: X b(Xr,Y,k−|Y |) ≤µ. (11) We then start moving towards the leaves, as follows. 1. Suppose we have picked some the groups at a node. Assign some of the ℓp budget to the xi terms, where the index i is compatible with the node and the choice of groups. 2. Move on to the child and pick the groups we want to use, considering only groups that are compatible with the parent. Debit the group budget accordingly. If there are multiple children, spread the ℓp and group budgets among them before picking the groups. The first step is represented by the following relations. Intermediate variables z and a are required to ensure that we spread the ℓp budget correctly among the valid xi. b(X,Y,s) ≥∥(z(X,Y,s), u(X,Y,s))∥p, (12) z(X,Y,s) ≥∥{a(X,(Y,Y ′),s) : Y ′ ∩Y ̸= ∅}∥p, (13) a(X,Y ′,s) ≤ X Y ⊆X a(X,(Y,Y ′),s), (14) ∥xA(X,Y )∥2 ≤ X A(X,Y )=A(X,Y ′) Xk s=0 a(X,Y ′,s). (15) The second step is represented by the following inequality in the case of a single child. u(Xp,Yp,s) ≥ X n b(Xc,(Yp,Y ),s−s0) : Y ∩Xp = Yp ∩Xc, |Yp ∩Xc|= s0 o . (16) 6 When there are multiple children, we need to introduce more intermediate variables to spread the group budget correctly. The technique here is similar to the one used in the proof of Proposition 3.4; we defer details to the supplementary material. In both cases, we need to collect the budgets that have been sent from each Yp: b(Xc,Y,s) ≤ X Yp b(Xc,(Yp,Y ),s). (17) Those b variables unreachable by the budget transfer process are set to 0. Our main theorem about the correctness of the construction in this section follows from the fact that when µ = 1, every extreme point with nonzero x in our extended formulation is an atom of the corresponding LG(k). Theorem 4.1. We can model the set ΩLG(k)(x) ≤µ using O(2O(tw) · (mk2 + n)) variables and inequalities in general. When the tree decomposition is a chain, O(2O(tw) · (mk + n)) suffices. For the unit ball of ΩLGS-OWL, we can exploit the fact that the atoms of ΩLGS-OWL are obtained from ΩLG(k) across different k at different scales. Instead of using the inequality (11) at the node, we have X Y ⊆Xr h(k)1/qb(Xr,Y,k−|Y |) ≤µ, which leads to a program of size O(2O(tw) · (m2 + n)) for chains and O(2O(tw) · (m3 + n)) for trees. 5 Empirical Observations and Results The extended formulations above can be implemented in modeling software such as CVX. This may incur a large processing overhead, and it is often faster to implement these directly in a convex optimization solver such as Gurobi or MOSEK. Use of the ℓ∞-norm leads to a linear program which can be significantly faster than the second-order conic program that results from the ℓ2-norm. We evaluated the performance of LG(k) and LGS-OWL on linear regression problems minx 1 2∥y − Ax∥2+λΩ(x). In the scenarios considered, we use the latent group lasso as a baseline. We test both the ℓ2 and ℓ∞variants of the various norms. Following [13] (which descrbes GrOWL), we consider two different types of weights for LGS-OWL. The linear variant sets wi = 1 −(i −1)/n for i ∈[n], whereas in the spike version, we set w1 = 1 and wi = 0.25 for i = 2, 3, . . . , n. The regularization term λ was chosen by grid search over {10−2, 10−1.95, . . . , 104} for each experiment. The metrics we use are support recovery and estimation quality. For the support recovery experiments, we count the number of times the correct support was identified. We also compute the root mean square (RMSE) of ∥x −x∗∥2 (estimation error).2 We had also tested the standard lasso, elastic net, and k-support and OWL norms, but these norms performed poorly. In our experiments they were not able to recover the exact correct support in any run. The estimation performance for the k-support norms and elastic net were worse than the corresponding latent group lasso, and likewise for OWL vs. LGS-OWL. Experiments. We used 20 groups of variables where each successive group overlaps by two elements with the next [10, 14]. The groups are given by {1, . . . , 10}, {9, . . . , 18}, . . . , {153, . . . , 162}. For the first set of experiments, the support of the true input x∗are a cluster of five groups in the middle of x, with xi = 1 on the support. For the second set of experiments, the original x is supported by the two disjoint clusters of five overlapping groups each, with xi = 2 on one cluster and xi = 3 on the other. Each entry of the A matrix is chosen initially to be i.i.d. N(0, 1). We then introduce correlations between groups in the same cluster in A. Within each cluster of groups, we replicate the same set of columns for each group in the non-overlapping portions of the group (that is, every pair of groups in a cluster shares at least 6 columns, and adjacent groups share 8 columns). We then introduce noise by adding i.i.d. elements from N(0, 0.05) so that the replications are not exact. Finally, we generate y by adding i.i.d. noise from N(0, 0.3) to each component of Ax∗. We present support recovery results in Figure 3 for the ℓ2 variants of the norms which perform better than theℓ∞versions, though the relative results between the different norms hold. In the appendix we provide the graphs for support recovery and estimation quality as well as other observations. 2It is standard in the literature to compute the RMSE of the prediction or estimation quality. RMSE metrics are not ideal in practice since we should “debias” x to offset shrinkage due to the regularization term. 7 Figure 3: Support recovery performance as number of measurements (height of A) increases. The vertical axis indicates the number of trials (out of 100) for which the correct support was identified. The two left graphs correspond to the first configuration of group supports (five groups), while the others to the second configuration (ten groups). Each line represents a different method. In the first and third graphs, we plot LG(k) for different values of k, increasing from 1 to the “ground truth” value. Note that k = 1 is exactly the latent group lasso. In the second and fourth graphs, we plot LGS-OWL for the different choices of weights wi discussed in the text. Our methods can significantly outperform latent group lasso in both support recovery and estimation quality. We provide a summary below and more details are provided in the supplementary. We first focus on support recovery. There is a significant jump in performance when k is the size of the true support. Note that exceeding the ground-truth value makes recovery of the true support impossible in the presence of noise. For smaller values of k, the results range from slight improvement (especially when k = 4 or k = 8 in the first and second experiments respectively) to mixed results (for large number of rows in A and small k). The LGS-OWL norms can provide performance almost as good as the best settings of k for LG(k), and can be used when the number of groups is unknown. We expect to see better performance for well-tuned OWL weights. We see similar results for estimation performance. Smaller values of k provide little to no advantage, while larger values of k and the LGS-OWL norms can offer significant improvement. 6 Discussion and Extensions We introduce a variant of the OWL norm for overlapping groups and provide the first tractable approaches for this and the latent k-group support norm (via extended formulations) under a bounded treewidth condition. The projection algorithm for the best k-group sparse approximation problem generalizes and improves on the algorithm by Baldassarre et al. [3]. Numerical results demonstrate that the norms can provide significant improvement in support recovery and estimation. A family of graphs with many applications and large treewidth is the set of grid graphs. Groups over collections of adjacent pixels/voxels lead naturally to such group intersection graphs, and it remains an open question whether polynomial time algorithms exist for this set of graphs. Another venue for research is to derive and evaluate efficient approximations to these new norms. It is tempting to apply recovery results on the latent group lasso here, since LG(k) can be cast as a latent group lasso instance with groups {G′ : G′ is a union of up to k groups of G}. The consistency results of [10] only applies under the strict condition that the target vector is supported exactly by a unique set of k groups. The Gaussian width results of [16] do not give meaningful bounds even when the groups are disjoint and k = 2. Developing theoretical guarantees on the performance of these methods requires a much better understanding of the geometry of unions of overlapping groups. We can easily extend the dynamic program to handle the case in which we want both k-group sparsity, and overall sparsity of s. For tree-structured group intersection graphs, our dynamic program has time complexity O(mks + n log s) instead of the ˜O(m2ks2 + mn) by [3]. This yields a variant of the above norms that again has a similar extended formulations. These variants could be employed as an alternative to the sparse overlapping set LASSO by Rao et al. [14]. We leave this to future work. Acknowledgements This work was supported by NSF award CMMI-1634597, ONR Award N00014-13-1-0129, and AFOSR Award FA9550-13-1-0138. 8 References [1] Argyriou, A., Foygel, R., and Srebro, N. (2012). Sparse prediction with the k-support norm. In Advances in Neural Information Processing Systems, pages 1457–1465. [2] Ayer, M., Brunk, H. D., Ewing, G. M., Reid, W. T., and Silverman, E. (1955). An empirical distribution function for sampling with incomplete information. The Annals of Mathematical Statistics, 26(4):641–647. [3] Baldassarre, L., Bhan, N., Cevher, V., Kyrillidis, A., and Satpathi, S. (2016). Group-Sparse Model Selection: Hardness and Relaxations. IEEE Transactions on Information Theory, 62(11):6508–6534. [4] Bogdan, M., van den Berg, E., Sabatti, C., Su, W., and Candès, E. J. (2015). Slope—adaptive variable selection via convex optimization. Ann. Appl. Stat., 9(3):1103–1140. [5] Bondell, H. D. and Reich, B. J. (2008). Simultaneous Regression Shrinkage, Variable Selection, and Supervised Clustering of Predictors with OSCAR. Biometrics, 64(1):115–123. [6] Dell, H., Husfeldt, T., Jansen, B. M. P., Kaski, P., Komusiewicz, C., and Rosamond, F. A. (2016). The first parameterized algorithms and computational experiments challenge. In 11th International Symposium on Parameterized and Exact Computation, IPEC 2016, August 24-26, 2016, Aarhus, Denmark, pages 30:1–30:9. [7] Downey, R. G. and Fellows, M. R. (1999). Parameterized Complexity. Monographs in Computer Science. Springer New York, New York, NY. [8] Downey, R. G. and Fellows, M. R. (2013). Fundamentals of Parameterized Complexity. Texts in Computer Science. Springer London, London. [9] Halabi, M. E. and Cevher, V. (2015). A totally unimodular view of structured sparsity. In Lebanon, G. and Vishwanathan, S., editors, Proceedings of the 18th International Conference on Artificial Intelligence and Statistics (AISTATS 2015), pages 223–231. [10] Jacob, L., Obozinski, G., and Vert, J.-P. (2009). Group lasso with overlap and graph lasso. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML ’09, pages 433–440, New York, NY, USA. ACM. [11] Obozinski, G. and Bach, F. (2012). Convex Relaxation for Combinatorial Penalties. Technical report. [12] Obozinski, G. and Bach, F. (2016). A unified perspective on convex structured sparsity: Hierarchical, symmetric, submodular norms and beyond. Technical report. [13] Oswal, U., Cox, C., Lambon-Ralph, M., Rogers, T., and Nowak, R. (2016). Representational similarity learning with application to brain networks. In Balcan, M. F. and Weinberger, K. Q., editors, Proceedings of The 33rd International Conference on Machine Learning, pages 1041–1049, New York, NY, USA. PMLR. [14] Rao, N., Cox, C., Nowak, R., and Rogers, T. T. (2013). Sparse overlapping sets lasso for multitask learning and its application to fmri analysis. In Burges, C., Bottou, L., Welling, M., Ghahramani, Z., and Weinberger, K., editors, Advances in Neural Information Processing Systems 26, pages 2202–2210. [15] Rao, N., Dudík, M., and Harchaoui, Z. (2017). The group k-support norm for learning with structured sparsity. In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 2402–2406. [16] Rao, N., Recht, B., and Nowak, R. (2012). Universal measurement bounds for structured sparse signal recovery. In Lawrence, N. D. and Girolami, M., editors, Proceedings of the Fifteenth International Conference on Artificial Intelligence and Statistics, pages 942–950, La Palma, Canary Islands. PMLR. [17] Rao, N. S., Nowak, R. D., Wright, S. J., and Kingsbury, N. G. (2011). Convex approaches to model wavelet sparsity patterns. In 2011 18th IEEE International Conference on Image Processing, pages 1917–1920. IEEE. [18] Sankaran, R., Bach, F., and Bhattacharya, C. (2017). Identifying Groups of Strongly Correlated Variables through Smoothed Ordered Weighted L1-norms. In Singh, A. and Zhu, J., editors, Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, pages 1123–1131, Fort Lauderdale, FL, USA. PMLR. [19] Yuan, M. and Lin, Y. (2006). Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(1):49–67. [20] Zeng, X. and Figueiredo, M. A. T. (2014). The Ordered Weighted ℓ1 Norm: Atomic Formulation, Projections, and Algorithms. arXiv:1409.4271. 9 | 2017 | 57 |
7,085 | Discovering Potential Correlations via Hypercontractivity Hyeji Kim1⇤ Weihao Gao1⇤ Sreeram Kannan2† Sewoong Oh1‡ Pramod Viswanath1⇤ University of Illinois at Urbana Champaign1 and University of Washington2 {hyejikim,wgao9}@illinois.edu,ksreeram@uw.edu,{swoh,pramodv}@illinois.edu Abstract Discovering a correlation from one variable to another variable is of fundamental scientific and practical interest. While existing correlation measures are suitable for discovering average correlation, they fail to discover hidden or potential correlations. To bridge this gap, (i) we postulate a set of natural axioms that we expect a measure of potential correlation to satisfy; (ii) we show that the rate of information bottleneck, i.e., the hypercontractivity coefficient, satisfies all the proposed axioms; (iii) we provide a novel estimator to estimate the hypercontractivity coefficient from samples; and (iv) we provide numerical experiments demonstrating that this proposed estimator discovers potential correlations among various indicators of WHO datasets, is robust in discovering gene interactions from gene expression time series data, and is statistically more powerful than the estimators for other correlation measures in binary hypothesis testing of canonical examples of potential correlations. 1 Introduction Measuring the strength of an association between two random variables is a fundamental topic of broad scientific interest. Pearson’s correlation coefficient [1] dates from over a century ago and has been generalized seven decades ago as maximal correlation (mCor) to handle nonlinear dependencies [2–4]. Novel correlation measures to identify different kinds of associations continue to be proposed in the literature; these include maximal information coefficient (MIC) [5] and distance correlation (dCor) [6]. Despite the differences, a common theme of measurement of the empirical average dependence unites the different dependence measures. Alternatively, these are factual measures of dependence and their relevance is restricted when we seek a potential dependence of one random variable on another. For instance, consider a hypothetical city with very few smokers. A standard measure of correlation on the historical data in this town on smoking and lung cancer will fail to discover the fact that smoking causes cancer, since the average correlation is very small. On the other hand, clearly, there is a potential correlation between smoking and lung cancer; indeed applications of this nature abound in several scenarios in modern data science, including a recent one on genetic pathway discovery [7]. Discovery of a potential correlation naturally leads one to ask for a measure of potential correlation that is statistically well-founded and addresses practical needs. Such is the focus of this work, where our proposed measure of potential correlation is based on a novel interpretation of the Information Bottleneck (IB) principle [8]. The IB principle has been used to address one of the fundamental tasks in supervised learning: given samples {Xi, Yi}n i=1, how do we find a compact summary of a variable ⇤Coordinated Science Lab and and Department of Electrical and Computer Engineering †Department of Electrical Engineering ‡Coordinated Science Lab and Department of Industrial and Enterprise Systems Engineering 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. X that is most informative in explaining another variable Y . The output of the IB principle is a compact summary of X that is most relevant to Y and has a wide range of applications [9, 10]. We use this IB principle to create a measure of correlation based on the following intuition: if X is (potentially) correlated with Y , then a relatively compact summary of X can still be very informative about Y . In other words, the maximal ratio of how informative a summary can be in explaining Y to how compact a summary is with respect to X is, conceptually speaking, an indicator of potential correlation from X to Y . Quantifying the compactness by I(U; X) and the information by I(U; Y ) we consider the rate of information bottleneck as a measure of potential correlation: s(X; Y ) ⌘ sup U–X–Y I(U; Y ) I(U; X) , (1) where U −X −Y forms a Markov chain and the supremum is over all summaries U of X. This intuition is made precise in Section 2, where we formally define a natural notion of potential correlation (Axiom 6), and show that the rate of information bottleneck s(X; Y ) captures this potential correlation (Theorem 1) while other standard measures of correlation fail (Theorem 2). This ratio has only recently been identified as the hypercontractivity coefficient [11]. Hypercontractivity has a distinguished and central role in a large number of technical arenas including quantum physics [12, 13], theoretical computer science [14, 15], mathematics [16–18] and probability theory [19, 20]. In this paper, we provide a novel interpretation to the hypercontractivity coefficient as a measure of potential correlation by demonstrating that it satisfies a natural set of axioms such a measure is expected to obey. For practical use in discovering correlations, the standard correlation coefficients are equipped with corresponding natural sample-based estimators. However, for hypercontractivity coefficient, estimating it from samples is widely acknowledged to be challenging, especially for continuous random variables [21–23]. There is no existing algorithm to estimate the hypercontractivity coefficient in general [21], and there is no existing algorithm for solving IB from samples either [22, 23]. We provide a novel estimator of the hypercontractivity coefficient – the first of its kind – by bringing together the recent theoretical discoveries in [11, 24] of an alternate definition of hypercontractivity coefficient as ratio of Kullback-Leibler divergences defined in (5), and recent advances in joint optimization (the max step in Equation 1) and estimating information measures from samples using importance sampling [25]. Our main contributions are the following: • We postulate a set of natural axioms that a measure of potential correlation from X to Y should satisfy (Section 2). • We show that p s(X; Y ), our proposed measure of potential correlation, satisfies all the axioms we postulate. In comparison, we prove that existing standard measures of correlation not only fail to satisfy the proposed axioms, but also fail to capture canonical potential correlations captured by p s(X; Y ) (Section 2). Another natural candidate is mutual information, but it is not clear how to interpret the value of mutual information as it is unnormalized, unlike all other measures of correlation which are between zero and one. • Computation of the hypercontractivity coefficient from samples is known to be a challenging open problem. We introduce a novel estimator to compute hypercontractivity coefficient from i.i.d. samples in a statistically consistent manner for continuous random variables, using ideas from importance sampling and kernel density estimation (Section 3). • In a series of synthetic experiments, we show empirically that our estimator for the hypercontractivity coefficient is statistically more powerful in discovering a potential correlation than existing correlation estimators; a larger power means a larger successful detection rate for a fixed false alarm rate (Section 4.1). • We show applications of our estimator of hypercontractivity coefficient in two important datasets: In Section 4.2, we demonstrate that it discovers hidden potential correlations among various national indicators in WHO datasets, including how aid is potentially correlated with the income growth. In Section 4.3, we consider the following gene pathway recovery problem: we are given samples of four gene expressions time series. Assuming we know that gene A causes B, that B causes C, and that C causes D, the problem is to discover that 2 these causations occur in the sequential order: A to B, and then B to C, and then C to D. We show empirically that the estimator of the hypercontractivity coefficient recovers this order accurately from a vastly smaller number of samples compared to other state-of-the art causal influence estimators. 2 Axiomatic approach to measure potential correlations We propose a set of axioms that a measure of potential correlation should satisfy and propose a new measure of correlation that satisfies all the proposed axioms. Axioms for potential correlation. We postulate that a measure of potential correlation ⇢⇤: X ⇥Y ! [0, 1] between two random variables X 2 X and Y 2 Y should satisfy: 1. ⇢⇤(X, Y ) is defined for any pair of non-constant random variables X and Y . 2. 0 ⇢⇤(X, Y ) 1. 3. ⇢⇤(X, Y ) = 0 iff X and Y are statistically independent. 4. For bijective Borel-measurable functions f, g : R ! R, ⇢⇤(X, Y ) = ⇢⇤(f(X), g(Y )). 5. If (X, Y ) ⇠N(µ, ⌃), then ⇢⇤(X, Y ) = |⇢|, where ⇢is the Pearson correlation coefficient. 6. ⇢⇤(X, Y ) = 1 if there exists a subset Xr ✓X such that for a pair of continuous random variables (X, Y ) 2 Xr ⇥Y, Y = f(X) for a Borel-measurable and non-constant continuous function f. ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Linear X Y ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Quadratic X Y Figure 1: A measure of potential correlation should capture the rare correlation in X 2 [0, 1] in these examples which satisfy Axiom 6 for a linear and a quadratic function, respectively. Axioms 1-5 are identical to a subset of the celebrated axioms of Rényi in [4], which ensure that the measure is properly normalized and invariant under bijective transformations, and recovers the Pearson correlation for jointly Gaussian random variables. Rényi’s original axioms for a measure of correlation in [4] included Axioms 1-5 and also that the measure ⇢⇤of correlation should satisfy 6’. ⇢⇤(X, Y ) = 1 if for Borel-measurable functions f or g, Y = f(X) or X = g(Y ). 7’. ⇢⇤(X; Y ) = ⇢⇤(Y ; X). The Pearson correlation violates a subset (3, 4, and 6’) of Rényi’s axioms. Together with recent empirical successes in multimodal deep learning (e.g. [26–28]), Rényi’s axiomatic approach has been a major justification of Hirschfeld-Gebelein-Rényi (HGR) maximum correlation coefficient defined as mCor(X, Y ) := supf,g E[f(X)g(Y )], which satisfies all Rényi’s axioms [2]. Here, the supremum is over all measurable functions with E[f(X)] = E[g(Y )] = 0 and E[f 2(X)] = E[g2(Y )] = 1. However, maximum correlation is not the only measure satisfying all of Rényi’s axioms, as we show in the following. Proposition 1. For any function F : [0, 1]⇥[0, 1] ! [0, 1] satisfying F(x, y) = F(y, x), F(x, x) = x, and F(x, y) = 0 only if xy = 0, the symmetrized F( p s(X; Y ), p s(Y ; X)) satisfies all Rényi’s axioms. This follows from the fact that the hypercontractivity coefficient p s(X; Y ) satisfies all but the symmetry in Axiom 7 (Theorem 1), and it follows that a symmetrized version satisfies all axioms, 3 e.g. (1/2)( p s(X; Y ) + p s(Y ; X)) and (s(X; Y )s(Y ; X))1/4. A formal proof is provided in Appendix A.1. From the original Rényi’s axioms, for potential correlation measure, we remove Axiom 7’ that ensures symmetry, as directionality is fundamental in measuring the potential correlation from X to Y . We further replace Axiom 6’ by Axiom 6, as a variable X has a full potential to be correlated with Y if there exists a domain Xr such that X and Y are deterministically dependent and non-degenerate (i.e. not a constant function), as illustrated in Figure 1 for a linear function and a quadratic function. The hypercontractivity coefficient satisfies all axioms. We propose the hypercontractivity coefficient s(X; Y ), first introduced in [19], as the measure of potential correlation satisfying all Axioms 1-6. Intuitively, s(X; Y ) measures how much potential correlation X has with Y . For example, if X and Y are independent, then s(X; Y ) = 0 as X has no correlation with Y (Axiom 3). By data processing inequality, it follows that it is a measure between zero and one (Axiom 2) and also invariant under bijective transformations (Axiom 4). For jointly Gaussian variables X and Y with the Pearson correlation ⇢, we can show that s(X; Y ) = s(Y ; X) = ⇢2. Hence, the squared-root of s(X; Y ) satisfies Axiom 5. In fact, p s(X; Y ) satisfies all desired axioms for potential correlation, and we make this precise in the following theorem whose proof is provided in Appendix A.2. Theorem 1. Hypercontractivity coefficient p s(X; Y ) satisfies Axioms 1-6. In particular, the hypercontractivity coefficient satisfies Axiom 6 for potential correlation, unlike other measures of correlation (see Theorem 2 for examples). If there is a potential for X in a possibly rare regime in X to be fully correlated with Y such that Y = f(X), then the hypercontractivity coefficient is maximum: s(X; Y ) = 1. However, just as HGR correlation is not the only one satisfying Rényi’s original axioms, the hypercontractivity coefficient is not the only one satisfying our axioms. There is a family of measures known as hypercontractivity ribbon that includes the hypercontractivity coefficient as a special case, all of which satisfy the axioms. However, a few properties of the hypercontractivity coefficient makes it more attractive for practical use; it can be efficiently estimated from samples (see Section 3) and is a natural extension of the popular HGR maximal correlation coefficient. Axiom 5 is restricted to univariate X and Y , and it can be naturally extended to multivariate variables where p s(X; Y ) is a multivariate measure that satisfies all the axioms. For the discussion of hypercontractivity ribbon, connection between hypercontractivity coefficient and HGR maximal correlation, and extension of axioms to multivariate variables, see the journal version [29]. Beside standard correlation measures, another measure widely used to quantify the strength of dependence is mutual information. We can show that mutual information satisfies Axiom 6 if we replace 1 by 1. However there are two key problems: (a) Practically, mutual information is unnormalized, i.e., I(X; Y ) 2 [0, 1). Hence, it provides no absolute indication of the strength of the dependence. (b) Mathematically, we are looking for a quantity that tensorizes, i.e., doesn’t change when there are many i.i.d. copies of the same pair of random variables. Hypercontractivity coefficient tensorizes, i.e, s(X1, ..., Xn; Y1, .., Yn) = s(X1, Y1), for i.i.d. (Xi, Yi), i = 1, · · · , n. On the other hand, mutual information is additive, i.e., I(X1, · · · , Xn; Y1, · · · , Yn) = nI(X1; Y1), for i.i.d. (Xi, Yi), i = 1, · · · , n. Tensorizing quantities capture the strongest relationship among independent copies while additive quantities capture the sum. For instance, mutual information could be large because a small amount of information accumulates over many of the independent components of X and Y (when X and Y are high dimensional) while tensorizing quantities would rule out this scenario, where there is no strong dependence. When the components are not independent, hypercontractivity indeed pools information from different components to find the strongest direction of dependence, which is a desirable property. One natural way to normalize mutual information is by the log of the cardinality of the input/output alphabets [30]. One can interpret a popular correlation measure MIC as a similar effort for normalizing mutual information and is one of our baselines. Standard correlation coefficients violate the Axioms. We next analyze existing measures of correlations under the scenario with potential correlation (Axiom 6), where we find that none of the 4 existing correlation measures satisfy Axiom 6. Suppose X and Y are independent (i.e. no correlation) in a subset Xd of the domain X, and allow X and Y to be arbitrarily correlated in the rest Xr of the domain, such that X = Xd [ Xr. We further assume that the independent part is dominant and the correlated part is rare; let ↵:= P(X 2 Xr) and we consider the scenario when ↵is small. A good measure of potential correlation is expected to capture the correlation in Xr even if it is rare (i.e., ↵is small). To make this task more challenging, we assume that the conditional distribution of Y |{X 2 Xr} is the same as Y |{X /2 Xr}. Figure 1 (of this section) illustrates sampled points for two examples from such a scenario and more examples are in Figure 5 in Appendix B. Our main result is the analysis of HGR maximal correlation (mCor) [2], distance correlation (dCor) [6], maximal information coefficients (MIC) [5], which shows that these measures are vanishing with ↵even if the dependence in the rare regime is very high. Suppose Y |(X 2 Xr) = f(X), then all three correlation coefficients are vanishing as ↵gets small. This in particular violates Axiom 6. The reason is that standard correlation coefficients measure the average correlation whereas the hypercontractivity coefficient measures the potential correlation. The experimental comparisons on the power of these measures confirm our analytical predictions in Figure 2. The formal statement is below and the proof is provided in Appendix A.3. Theorem 2. Consider a pair of continuous random variables (X, Y ) 2 X ⇥Y. Suppose X is partitioned as Xr [ Xd = X such that PY |X(S|X 2 Xr) = PY |X(S|X 2 Xd) for all S ✓Y, and Y is independent of X for X 2 Xd. Let ↵= P{X 2 Xr}. The HGR maximal correlation coefficient is mCor(X, Y ) = p↵mCor(Xr, Y ) , (2) the distance correlation coefficient is dCor(X, Y ) = ↵dCor(Xr, Y ) , (3) the maximal information coefficient is upper bounded by MIC(X, Y ) ↵MIC(Xr, Y ) , (4) where Xr is the random variable X conditioned on the rare domain X 2 Xr. 3 Estimator of the hypercontractivity coefficient from samples In this section, we present an algorithm1 to compute the hypercontractivity coefficient s(X; Y ) from i.i.d. samples {Xi, Yi}n i=1. The computation of the hypercontractivity coefficient from samples is known to be challenging for continuous random variables [22, 23], and to the best of our knowledge, there is no known efficient algorithm to compute the hypercontractivity coefficient from samples. Our estimator is the first efficient algorithm to compute the hypercontractivity coefficient, based on the following equivalent definition of the hypercontractivity coefficient, shown recently in [11]: s(X; Y ) ⌘ sup rx6=px D(ry||py) D(rx||px) . (5) There are two main challenges for computing s(X; Y ). The first challenge is – given a marginal distribution rx and samples from pxy, how do we estimate the KL divergences D(ry||py) and D(rx||px). The second challenge is the optimization over the infinite dimensional simplex. We need to combine estimation and optimization together in order to compute s(X; Y ). Our approach is to combine ideas from traditional kernel density estimates and from importance sampling. Let wi = rx(Xi)/px(Xi) be the likelihood ratio evaluated at sample i. We propose the estimation and optimization be solved jointly as follows: Estimation: To estimate KL divergence D(rx||px), notice that D(rx||px) = EX⇠px rx(X) px(X) log rx(X) px(X) # . Using empirical average to replace the expectation over px, we propose bD(rx||px) = 1 n n X i=1 rx(Xi) px(Xi) log rx(Xi) px(Xi) = 1 n n X i=1 wi log wi . 1Code is available at https://github.com/wgao9/hypercontractivity 5 For D(ry||py), we follow the similar idea, but the challenge is in computing vj = ry(Yj)/py(Yj). To do this, notice that rxy = rxpy|x, so ry(Yj) = EX⇠rx ⇥ py|x(Yj|X) ⇤ = EX⇠px py|x(Yj|X)rx(X) px(X) # . Replacing the expectation by empirical average again, we get the following estimator of vj: bvj = 1 n n X i=1 py|x(Yj|Xi) py(Yj) rx(Xi) px(Xi) = 1 n n X i=1 pxy(Xi, Yj) px(Xi)py(Yj) | {z } Aji wi . We can write this expression in matrix form as bv = AT w. We use a kernel density estimator from [31] to estimate the matrix A, but our approach is compatible with any density estimator of choice. Optimization: Given the estimators of the KL divergences, we are able to convert the problem of computing s(X; Y ) into an optimization problem over the vector w. Here a constraint of (1/n) Pn i=1 wi = 1 is needed to satisfy Epx[rx/px] = 1. To improve numerical stability, we use log s(X; Y ) as the objective function. Then the optimization problem has the following form: maxw log (wT A log(AT w) . −log wT log w . subject to 1 n n X i=1 wi = 1 wi ≥0, 8 i where wT log w = Pn i=1 wi log wi for short. Although this problem is not convex, we apply gradient descent to maximize the objective. In practice, we initialize wi = 1 + N(0, σ2) for σ2 = 0.01. Hence, the initial rx is perturbed mildly from px. Although we are not guaranteed to achieve the global maximum, we consistently observe in extensive numerical experiments that we have 50%-60% probability of achieving the same maximum value, which we believed to be the global maximum. A theoretical analysis of the landscape of local and global optima and their regions of attraction with respect to gradient descent is an interesting and challenging open question, outside the scope of this paper. A theoretical understanding of the performance of gradient descent on the optimization step (where the number of samples is fixed) above is technically very challenging and is left to future work. 4 Experimental results We present experimental results on synthetic and real datasets showing that the hypercontractivity coefficient (a) is more powerful in detecting potential correlation compared to existing measures; (b) discovers hidden potential correlations among various national indicators in WHO datasets; and (c) is more robust in discovering pathways of gene interactions from gene expression time series data. 4.1 Synthetic data: power test on potential correlation As our estimator (and the measure itself) involves a maximization, it is possible that we are sensitive to outliers and may capture spurious noise. A formal statistical approach to test the robustness as well as accuracy is to run power tests: testing for the power of the estimator in binary hypothesis tests. Via a series of experiments we show that the hypercontractivity coefficient and our estimator are capturing the true potential correlation. We compare the power of the hypercontractivity coefficient and other correlation coefficients in the binary hypothesis testing scenario of Theorem 2. As shown in Figure 5 in Appendix B, we generate pairs of datasets – one where X and Y are independent and one where there is a potential correlation as per our scenario. We experiment with eight types of functional associations, following the examples from [5, 32, 33]. For the correlated datasets, out of n samples {(xi, yi)}n i=1, ↵n rare but correlated samples are in X = [0, 1] and (1 −↵)n dominant but independent samples are in X 2 [1, 1.1]. 6 The rare but correlated samples are generated as xi ⇠Unif[0, 1], yi ⇠f(xi) + N(0, σ2) for i 2 [1 : ↵n]. The dominant samples are generated as xi ⇠Unif[1, 1.1], yi ⇠f(Unif[0, 1])+N(0, σ2) for i 2 [↵n + 1, n]. A formal comparison is done via testing their powers: comparing the false negative rate at a fixed false positive rate of, say, 5%. We show empirically that for linear, quadratic, sine with period 1/2, and the step function, the hypercontractivity coefficient is more powerful as compared to other measures. For a given setting, a larger power means a larger successful detection rate for a fixed false alarm rate. Figure 2 shows the power of correlation estimators as a function of the additive noise level, σ2, for ↵= 0.05 and n = 320. The hypercontractivity coefficient is more powerful than other correlation estimators for most functions. The power of all the estimators are very small for sine (period 1/8) and circle functions. This is not surprising given that it is very hard to discern the correlated and independent cases even visually, as shown in Figure 5. We give extensive experimental results in the journal version [29]. 0.0 0.2 0.4 0.6 0.8 1.0 Linear Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 0.0 0.2 0.4 0.6 0.8 1.0 Quadratic Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 0.0 0.2 0.4 0.6 0.8 1.0 Cubic Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 0.0 0.2 0.4 0.6 0.8 1.0 Sine: period 1/2 Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 0.0 0.2 0.4 0.6 0.8 1.0 Sine: period 1/8 Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 0.0 0.2 0.4 0.6 0.8 1.0 X^(1/4) Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 0.0 0.2 0.4 0.6 0.8 1.0 Circle Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 0.0 0.2 0.4 0.6 0.8 1.0 Step function Cor dCor MIC mCor HC 0 0.01 0.03 0.1 0.3 1 3 Noise level Noise level Noise level Noise level Noise level Noise level Noise level Noise level Power Power Figure 2: Power vs. noise level for ↵= 0.05, n = 320 4.2 Real data: correlation between indicators of WHO datasets We compute the hypercontractivity coefficient, MIC, and Pearson correlation of 1600 pairs of indicators for 202 countries in the World Health Organization (WHO) dataset [5]. Figure 3 illustrates that the hypercontractivity coefficient discovers hidden potential correlation (e.g. in (E) and (F)), whereas other measures fail. Scatter plots of Pearson correlation vs. the hypercontractivity coefficient and MIC vs. the hypercontractivity coefficient for all pairs are presented in Figure 3 (A) and (D). The samples for pairs of indicators corresponding to B,C,E,F in Figure 3 (A) and (D) are shown in Figure 3 (B),(C),(E),(F), respectively. In (B), it is reasonable to assume that the number of bad teeth per child is uncorrelated with the democracy score. The hypercontractivity coefficient, MIC, and Pearson correlation are all small, as expected. In (C), the correlation between CO2 emissions and energy use is clearly visible, and all three correlation estimates are close to one. However, only the hypercontractivity coefficient discovers the hidden potential correlation in (E) and (F). In (E), the data is a mixture of two types of countries – one with small amount of aid received (less than $5 ⇥108), and the other with large amount of aid received (larger than $5 ⇥108). Dominantly many countries (104 out of 146) belong to the first type (small aid), and for those countries, the amount of aid received and the income growth are independent. For the remaining countries with larger aid received, although those are rare, there is a clear correlation between the amount of aid received and the income growth. Similarly in (F), there are two types of countries – one with small arms exports (less than $2 ⇥108) and the other with large arms exports (larger than $2 ⇥108). Dominantly many countries (71 out of 82) belong to the first type, for which the amount of arms exports and the health expenditure are independent. For the remaining countries that belong to the second type, on the other hand, there is a visible correlation between the arms exports and the health expenditure. This is expected as for those countries that export arms the GDP is positively correlated 7 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● B C E F 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Hypercontractivity MIC (A) ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 1 2 3 4 5 6 −10 −5 0 5 10 Bad_teeth_per_child Democracy_score (B) ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● 0 10 20 30 40 50 60 0 5000 10000 15000 20000 CO2_emissions Energy_use (C) ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● B C E F 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Hypercontractivity Pearson correlation (D) ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● 0.0e+00 5.0e+09 1.0e+10 1.5e+10 2.0e+10 −5 0 5 10 15 20 25 Aid_received_total Income_growth (E) ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0e+00 2e+09 4e+09 6e+09 2 4 6 8 10 12 14 16 Arms_exports Health_expenditure_total (F) Figure 3: (A) and (D): Scatter plot of correlation measures. (B): Correlations are small. (C): Correlations are large. (E) and (F): Only the hypercontractivity coefficient discovers potential correlation. with both arms exports and health expenditure, whereas for those do not have arms industry, these two will be independent. We give extensive numerical analyses of the WHO dataset in the journal version [29]. 4.3 Gene pathway recovery from single cell data We replicate the genetic pathway detection experiment from [7], and show that hypercontractivity correctly discovers the genetic pathways from smaller number of samples. A genetic pathway is a series of genes interacting with each other as a chain. Consider the following setup where four genes whose expression values in a single cell are modeled by random processes Xt, Yt, Zt and Wt respectively. These 4 genes interact with each other following a pathway Xt ! Yt ! Zt ! Wt; it is biologically known that Xt causes Yt with a negligible delay, and later at time t0, Yt0 causes Zt0, and so on. Our goal is to recover this known gene pathway from sampled data points. For a sequence of time points {ti}m i=0, we observe ni i.i.d. samples {X(j) ti , Y (j) ti , Z(j) ti , W (j) ti }ni j=1 generated from the random process P(Xti, Yti, Zti, Wti). We use the real data obtained by the single-cell mass flow cytometry technique [7]. Given these samples from time series, the goal of [7] is to recover the direction of the interaction along the known pathway using correlation measures as follows, where they proposed a new measure called DREMI. The DREMI correlation measure is evaluated on each pairs on the pathway, ⌧(Xti, Yti), ⌧(Yti, Zti) and ⌧(Zti, Wti), at each time points ti. It is declared that a genetic pathway is correctly recovered if the peak of correlation follows the expected trend: arg maxti ⌧(Xti, Yti) arg maxti ⌧(Yti, Zti) arg maxti ⌧(Zti, Wti). In [25], the same experiment has been done with ⌧evaluated by UMI and CMI estimators. In this paper, we evaluate ⌧using our proposed estimator of hypercontractivity. We subsample the raw data from [7] to evaluate the ability to find the trend from smaller samples. Precisely, given a resampling rate γ 2 (0, 1], we randomly select a subset of indices Si ✓[ni] with card(Si) = dγnie, compute ⌧(Xti, Yti), ⌧(Yti, Zti) and ⌧(Zti, Wti) from sub8 samples {X(j) ti , Y (j) ti , Z(j) ti , W (j) ti }j2Si, and determine whether we can recover the trend successfully, i.e., whether arg maxti ⌧(Xti, Yti) arg maxti ⌧(Yti, Zti) arg maxti ⌧(Zti, Wti). We repeat the experiment several times with independent subsamples and compute the probability of successfully recovering the trend. Figure 4 illustrates that when the entire dataset is available, all methods are able to recover the trend correctly. When only fewer samples are available, hypercontractivity improves upon other competing measures in recovering the hidden chronological order of interactions of the pathway. For completeness, we run datasets for both regular T-cells (shown in left figure) and T-cells exposed with an antigen (shown right figure), for which we expect distinct biological trends. Hypercontractivity method can capture the trend for both datasets correctly and sample-efficiently. 0.4 0.5 0.6 0.7 0.8 0.9 1 0.02 0.05 0.1 0.25 0.5 1.0 HyperContractivity CMI UMI DREMI 0.4 0.5 0.6 0.7 0.8 0.9 1 0.2 0.4 0.6 0.8 1.0 HyperContractivity CMI UMI DREMI resampling rate resampling rate probability of success Figure 4: Accuracy vs. subsampling rate. Hypercontractivity method has higher probability to recover the trend when data size is smaller compared to other methods. Left: regular T-cells. Right: T-cells exposed with an antigen [7]. Acknowledgments This work was partially supported by NSF grants CNS-1527754, CNS-1718270, CCF-1553452, CCF-1617745, CCF-1651236, CCF-1705007, and GOOGLE Faculty Research Award. References [1] K. Pearson, “Note on regression and inheritance in the case of two parents,” Proceedings of the Royal Society of London, vol. 58, pp. 240–242, 1895. [2] H. Hirschfeld, “A connection between correlation and contingency,” Mathematical Proceedings of the Cambridge Philosophical Society, pp. 31(4), pp. 520–524., 1935. [3] H. Gebelein, “Das statistische problem der korrelation als variations-und eigenwertproblem und sein zusammenhang mit der ausgleichsrechnung,” ZAMM-Journal of Applied Mathematics and Mechanics/Zeitschrift für Angewandte Mathematik und Mechanik, vol. 21, no. 6, pp. 364–379, 1941. [4] A. Rényi, “On measures of dependence,” Acta mathematica hungarica, vol. 10, no. 3-4, pp. 441–451, 1959. [5] D. N. Reshef, Y. A. Reshef, H. K. Finucane, S. R. Grossman, G. McVean, P. J. Turnbaugh, E. S. Lander, M. Mitzenmacher, and P. C. Sabeti, “Detecting novel associations in large data sets,” Science, vol. 334, no. 6062, pp. 1518–1524, 2011. [6] G. J. Székely, M. L. Rizzo, and N. K. Bakirov, “Measuring and testing dependence by correlation of distances,” Ann. Statist., vol. 35, no. 6, pp. 2769–2794, 12 2007. [7] S. Krishnaswamy, M. H. Spitzer, M. Mingueneau, S. C. Bendall, O. Litvin, E. Stone, D. Pe’er, and G. P. Nolan, “Conditional density-based analysis of T cell signaling in single-cell data,” Science, 2014. [8] N. Tishby, F. C. Pereira, and W. Bialek, “The information bottleneck method,” in Proc. 37th Ann. Allerton Conf. Comm. Control Comput., 1999, pp. 368–377. 9 [9] I. S. Dhillon, S. Mallela, and R. Kumar, “A divisive information-theoretic feature clustering algorithm for text classification,” Journal of Machine Learning Research (JMLR), vol. 3, 2003. [10] R. Bekkerman, R. El-Yaniv, N. Tishby, and Y. Winter, “Distributional word clusters vs. words for text categorization,” J. Mach. Learn. Res., vol. 3, pp. 1183–1208, 2003. [11] V. Anantharam, A. A. Gohari, S. Kamath, and C. Nair, “On maximal correlation, hypercontractivity, and the data processing inequality studied by Erkip and Cover,” CoRR, vol. abs/1304.6133, 2013. [12] E. Davies, L. Gross, and B. Simone, “Hypercontractivity: A bibliographic review,” Ideas and methods in quantum and statistical physics (Oslo, 1988), pp. 370–89, 1992. [13] E. Nelson, “Construction of quantum fields from markoff fields,” Journal of Functional Analysis, vol. 12, no. 1, pp. 97–112, 1973. [14] J. Kahn, G. Kalai, and N. Linial, “The influence of variables on boolean functions,” in Proceedings of the 29th Annual Symposium on Foundations of Computer Science, ser. SFCS ’88. IEEE Computer Society, 1988, pp. 68–80. [15] R. O’Donnell, Analysis of boolean functions. Cambridge University Press, 2014. [16] A. Bonami, “Étude des coefficients de fourier des fonctions de Lp(G),” Annales de l’institut Fourier, vol. 20, no. 2, pp. 335–402, 1970. [17] W. Beckner, “Inequalities in fourier analysis,” Annals of Mathematics, pp. 159–182, 1975. [18] L. Gross, “Hypercontractivity and logarithmic sobolev inequalities for the clifford-dirichlet form,” Duke Math. J., vol. 42, no. 3, pp. 383–396, 09 1975. [19] R. Ahlswede and P. Gacs, “Spreading of sets in product spaces and hypercontraction of the markov operator,” Ann. Probab., vol. 4, no. 6, pp. 925–939, 1976. [20] E. Mossel, K. Oleszkiewicz, and A. Sen, “On reverse hypercontractivity,” Geometric and Functional Analysis, vol. 23, no. 3, pp. 1062–1097, 2013. [21] C. Nair and S. Kamath, Personal communication, 2016. [22] A. A. Alemi, I. Fischer, J. V. Dillon, and K. Murphy, “Deep variational information bottleneck,” ICLR, 2017. [23] A. Achille and S. Soatto, “Information dropout: Learning optimal representations through noisy computation,” ArXiv e-prints. 1611.01353, 2016. [24] C. Nair, “An extremal inequality related to hypercontractivity of Gaussian random variables,” in Information Theory and Applications Workshop, 2014. [25] W. Gao, S. Kannan, S. Oh, and P. Viswanath, “Conditional dependence via shannon capacity: Axioms, estimators and applications,” in Proceedings of The 33rd International Conference on Machine Learning, 2016, pp. 2780–2789. [26] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A. Y. Ng, “Multimodal deep learning,” in Proceedings of the 28th international conference on machine learning (ICML-11), 2011, pp. 689–696. [27] N. Srivastava and R. R. Salakhutdinov, “Multimodal learning with deep boltzmann machines,” in Advances in neural information processing systems, 2012, pp. 2222–2230. [28] G. Andrew, R. Arora, J. Bilmes, and K. Livescu, “Deep canonical correlation analysis,” in International Conference on Machine Learning, 2013, pp. 1247–1255. [29] H. Kim, W. Gao, S. Kannan, S. Oh, and P. Viswanath, “Discovering potential correlations via hypercontractivity,” in preparation. 10 [30] C. Bell, “Mutual information and maximal correlation as measures of dependence,” The Annals of Mathematical Statistics, vol. 33, no. 2, pp. 587–595, 1962. [31] T. Michaeli, W. Wang, and K. Livescu, “Nonparametric canonical correlation analysis,” in Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48, ser. ICML’16, 2016, pp. 1967–1976. [32] N. Simon and R. Tibshirani, “Comment on “Detecting Novel Associations In Large Data Sets” by Reshef Et Al, Science Dec 16, 2011,” ArXiv e-prints, Jan. 2014. [33] M. Gorfine, R. Heller, and Y. Heller, “Comment on detecting novel associations in large data sets,” Unpublished (available at http://emotion.technion.ac.il/~gorfinm/filesscience6.pdf on 11 Nov. 2012), 2012. [34] G. Chechik, A. Globerson, N. Tishby, and Y. Weiss, “Information bottleneck for Gaussian variables,” J. Mach. Learn. Res., vol. 6, pp. 165–188, Dec. 2005. 11 | 2017 | 570 |
7,086 | A Dirichlet Mixture Model of Hawkes Processes for Event Sequence Clustering Hongteng Xu∗ School of ECE Georgia Institute of Technology hongtengxu313@gmail.com Hongyuan Zha College of Computing Georgia Institute of Technology zha@cc.gatech.edu Abstract How to cluster event sequences generated via different point processes is an interesting and important problem in statistical machine learning. To solve this problem, we propose and discuss an effective model-based clustering method based on a novel Dirichlet mixture model of a special but significant type of point processes — Hawkes process. The proposed model generates the event sequences with different clusters from the Hawkes processes with different parameters, and uses a Dirichlet distribution as the prior distribution of the clusters. We prove the identifiability of our mixture model and propose an effective variational Bayesian inference algorithm to learn our model. An adaptive inner iteration allocation strategy is designed to accelerate the convergence of our algorithm. Moreover, we investigate the sample complexity and the computational complexity of our learning algorithm in depth. Experiments on both synthetic and real-world data show that the clustering method based on our model can learn structural triggering patterns hidden in asynchronous event sequences robustly and achieve superior performance on clustering purity and consistency compared to existing methods. 1 Introduction In many practical situations, we need to deal with a huge amount of irregular and asynchronous sequential data. Typical examples include the viewing records of users in an IPTV system, the electronic health records of patients in hospitals, among many others. All of these data are so-called event sequences, each of which contains a series of events with different types in the continuous time domain, e.g., when and which TV program a user watched, when and which care unit a patient is transferred to. Given a set of event sequences, an important task is learning their clustering structure robustly. Event sequence clustering is meaningful for many practical applications. Take the previous two examples: clustering IPTV users according to their viewing records is beneficial to the program recommendation system and the ads serving system; clustering patients according to their health records helps hospitals to optimize their medication resources. Event sequence clustering is very challenging. Existing work mainly focuses on clustering synchronous (or aggregated) time series with discrete time-lagged observations [19, 23, 39]. Event sequences, on the contrary, are in the continuous time domain, so it is difficult to find a universal and tractable representation for them. A potential solution is constructing features of event sequences via parametric [22] or nonparametric [18] methods. However, these feature-based methods have a high risk of overfitting because of the large number of parameters. What is worse, these methods actually decompose the clustering problem into two phases: extracting features and learning clusters. As a result, their clustering results are very sensitive to the quality of learned (or predefined) features. ∗Corresponding author. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. To make concrete progress, we propose a Dirichlet Mixture model of Hawkes Processes (DMHP for short) and study its performance on event sequence clustering in depth. In this model, the event sequences belonging to different clusters are modeled via different Hawkes processes. The priors of the Hawkes processes’ parameters are designed based on their physically-meaningful constraints. The prior of the clusters is generated via a Dirichlet distribution. We propose a variational Bayesian inference algorithm to learn the DMHP model in a nested Expectation-Maximization (EM) framework. In particular, we introduce a novel inner iteration allocation strategy into the algorithm with the help of open-loop control theory, which improves the convergence of the algorithm. We prove the local identifiability of our model and show that our learning algorithm has better sample complexity and computational complexity than its competitors. The contributions of our work include: 1) We propose a novel Dirichlet mixture model of Hawkes processes and demonstrate its local identifiability. To our knowledge, it is the first systematical research on the identifiability problem in the task of event sequence clustering. 2) We apply an adaptive inner iteration allocation strategy based on open-loop control theory to our learning algorithm and show its superiority to other strategies. The proposed strategy achieves a trade-off between convergence performance and computational complexity. 3) We propose a DMHP-based clustering method. It requires few parameters and is robust to the problems of overfitting and model misspecification, which achieves encouraging clustering results. 2 Related Work A temporal point process [4] is a random process whose realization consists of an event sequence {(ti, ci)}M i=1 with time stamps ti ∈[0, T] and event types ci ∈C = {1, ..., C}. It can be equivalently represented as C counting processes {Nc(t)}C c=1, where Nc(t) is the number of type-c events occurring at or before time t. A way to characterize point processes is via the intensity function λc(t) = E[dNc(t)|HC t ]/dt, where HC t = {(ti, ci)|ti < t, ci ∈C} collects historical events of all types before time t. It is the expected instantaneous rate of happening type-c events given the history, which captures the phenomena of interests, i.e., self-triggering [13] or self-correcting [44]. Hawkes Processes. A Hawkes process [13] is a kind of point processes modeling complicated event sequences in which historical events have influences on current and future ones. It can also be viewed as a cascade of non-homogeneous Poisson processes [8,34]. We focus on the clustering problem of the event sequences obeying Hawkes processes because Hawkes processes have been proven to be useful for describing real-world data in many applications, e.g., financial analysis [1], social network analysis [3,51], system analysis [22], and e-health [30,42]. Hawkes processes have a particular form of intensity: λc(t) = µc + XC c′=1 Z t 0 φcc′(s)dNc′(t −s), (1) where µc is the exogenous base intensity independent of the history while PC c′=1 R t 0 φcc′(s)dNc′(t−s) the endogenous intensity capturing the peer influence. The decay in the influence of historical type-c′ events on the subsequent type-c events is captured via the so-called impact function φcc′(t), which is nonnegative. A lot of existing work uses predefined impact functions with known parameters, e.g., the exponential functions in [29,50] and the power-law functions in [49]. To enhance the flexibility, a nonparametric model of 1-D Hawkes process was first proposed in [16] based on ordinary differential equation (ODE) and extended to multi-dimensional case in [22,51]. Another nonparametric model is the contrast function-based model in [30], which leads to a Least-Squares (LS) problem [7]. A Bayesian nonparametric model combining Hawkes processes with infinite relational model is proposed in [3]. Recently, the basis representation of impact functions was used in [6,15,41] to avoid discretization. Sequential Data Clustering and Mixture Models. Traditional methods mainly focus on clustering synchronous (or aggregated) time series with discrete time-lagged variables [19, 23, 39]. These methods rely on probabilistic mixture models [46], extracting features from sequential data and then learning clusters via a Gaussian mixture model (GMM) [25,28]. Recently, a mixture model of Markov chains is proposed in [21], which learns potential clusters from aggregate data. For asynchronous event sequences, most of the existing clustering methods can be categorized into featurebased methods, clustering event sequences from learned or predefined features. Typical examples 2 include the Gaussian process-base multi-task learning method in [18] and the multi-task multidimensional Hawkes processes in [22]. Focusing on Hawkes processes, the feature-based mixture models in [5,17,47] combine Hawkes processes with Dirichlet processes [2,36]. However, these methods aim at modeling clusters of events or topics hidden in event sequences (i.e., sub-sequence clustering), which cannot learn clusters of event sequences. To our knowledge, the model-based clustering method for event sequences has been rarely considered. 3 Proposed Model 3.1 Dirichlet Mixture Model of Hawkes Processes Given a set of event sequences S = {sn}N n=1, where sn = {(ti, ci)}Mn i=1 contains a series of events ci ∈C = {1, ..., C} and their time stamps ti ∈[0, Tn], we model them via a mixture model of Hawkes processes. According to the definition of Hawkes process in (1), for the event sequence belonging to the k-th cluster its intensity function of type-c event at time t is λk c(t) = µk c + X ti<t φk cci(t −ti) = µk c + X ti<t XD d=1 ak ccidgd(t −ti), (2) where µk = [µk c] ∈RC + is the exogenous base intensity of the k-th Hawkes process. Following the work in [41], we represent each impact function φk cc′(t) via basis functions as P d ak cc′dgd(t −ti), where gd(t) ≥0 is the d-th basis function and Ak = [ak cc′d] ∈RC×C×D 0+ is the coefficient tensor. Here we use Gaussian basis function, and their number D can be decided automatically using the basis selection method in [41]. In our mixture model, the probability of the appearance of an event sequence s is p(s; Θ) = X k πkHP(s|µk, Ak), HP(s|µk, Ak) = Y i λk ci(ti) exp − X c Z T 0 λk c(s)ds . (3) Here πk’s are the probabilities of clusters and HP(s|µk, Ak) is the conditional probability of the event sequence s given the k-th Hawkes process, which follows the intensity function-based definition in [4]. According to the Bayesian graphical model, we regard the parameters of Hawkes processes, {µk, Ak}, as random variables. For µk’s, we consider its positiveness and assume that they obey C × K independent Rayleigh distributions. For Ak’s, we consider its nonnegativeness and sparsity as the work in [22,41,50]) did, and assume that they obey C × C × D × K independent exponential distributions. The prior of cluster is a Dirichlet distribution. Therefore, we can describe the proposed Dirichlet mixture model of Hawkes process in a generative way as π ∼Dir(α/K, ..., α/K), k|π ∼Category(π), µ ∼Rayleigh(B), A ∼Exp(Σ), s|k, µ, A ∼HP(µk, Ak), Here µ = [µk c] ∈RC×K + and A = [ak cc′d] ∈RC×C×D×K 0+ are parameters of Hawkes processes, and {B = [βk c ], Σ = [σk cc′d]} are hyper-parameters. Denote the latent variables indicating the labels of clusters as matrix Z ∈{0, 1}N×K. We can factorize the joint distribution of all variables as2 p(S, Z, π, µ, A) = p(S|Z, µ, A)p(Z|π)p(π)p(µ)p(A), where p(S|Z, µ, A) = Y n,k HP(sn|µk, Ak)znk, p(Z|π) = Y n,k(πk)znk, p(π) = Dir(π|α), p(µ) = Y c,k Rayleigh(µk c|βk c ), p(A) = Y c,c′,d,k Exp(ak cc′d|σk cc′d). (4) Our mixture model of Hawkes processes are different from the models in [5,17,47]. Those models focus on the sub-sequence clustering problem within an event sequence. The intensity function is a weighted sum of multiple intensity functions of different Hawkes processes. Our model, however, aims at finding the clustering structure across different sequences. The intensity of each event is generated via a single Hawkes process, while the likelihood of an event sequence is a mixture of likelihood functions from different Hawkes processes. 2Rayleigh(x|β) = x β2 e −x2 2β2 , Exp(x|σ) = 1 σ e−x σ , x ≥0. 3 3.2 Local Identifiability One of the most important questions about our mixture model is whether it is identifiable or not. According to the definition of Hawkes process and the work in [26,31], we can prove that our model is locally identifiable. The proof of the following theorem is given in the supplementary file. Theorem 3.1. When the time of observation goes to infinity, the mixture model of the Hawkes processes defined in (3) is locally identifiable, i.e., for each parameter point Θ = vec h π1 ... πK θ1 ... θK i , where θk = {µk, Ak} ∈RC + × RC×C×D 0+ for k = 1, .., K, there exists an open neighborhood of Θ containing no other Θ′ which makes p(s; Θ) = p(s; Θ′) holds for all possible s. 4 Proposed Learning Algorithm 4.1 Variational Bayesian Inference Instead of using purely MCMC-based learning method like [29], we propose an effective variational Bayesian inference algorithm to learn (4) in a nested EM framework. Specifically, we consider a variational distribution having the following factorization: q(Z, π, µ, A) = q(Z)q(π, µ, A) = q(Z)q(π) Y k q(µk)q(Ak). (5) An EM algorithm can be used to optimize (5). Update Responsibility (E-step). The logarithm of the optimized factor q∗(Z) is approximated as log q∗(Z) = Eπ[log p(Z|π)] + Eµ,A[log p(S|Z, µ, A)] + C = X n,k znk E[log πk] + E[log HP(sn|µk, Ak)] + C = X n,k znk E[log πk] + E[ X i log λk ci(ti) − X c Z Tn 0 λk c(s)ds] + C ≈ X n,k znk E[log πk] + X i log E[λk ci(ti)] −Var[λk ci(ti)] 2E2[λkci(ti)] − X c E[ Z Tn 0 λk c(s)ds] | {z } ρnk +C. where C is a constant and Var[·] represents the variance of random variable. Each term E[log λk c(t)] is approximated via its second-order Taylor expansion log E[λk c(t)] −Var[λk c (t)] 2E2[λkc (t)] [37]. Then, the responsibility rnk is calculated as rnk = E[znk] = ρnk/( X j ρnj). (6) Denote Nk = P n rnk for all k’s. Update Parameters (M-step). The logarithm of optimal factor q∗(π, µ, A) is log q∗(π, µ, A) = X k log(p(µk)p(Ak)) + EZ[log p(Z|π)] + log p(π) + X n,k rnk log HP(sn|µk, Ak) + C. We can estimate the parameters of Hawkes processes via: ˆµ, b A = arg maxµ,A log(p(µ)p(A)) + X n,k rnk log HP(sn|µk, Ak). (7) Following the work in [41,47,50], we need to apply an EM algorithm to solve (7) iteratively. After getting optimal ˆµ and b A, we update distributions as Σk = b Ak, Bk = p 2/π ˆµk. (8) Update The Number of Clusters K. When the number of clusters K is unknown, we initialize K randomly and update it in the learning phase. There are multiple methods to update the number of 4 20 40 60 80 100 The number of inner iterations 3.44 3.46 3.48 3.5 Negative Log-likelihood #104 2 Clusters 20 40 60 80 100 The number of inner iterations 5.1 5.15 5.2 Negative Log-likelihood #104 3 Clusters 20 40 60 80 100 The number of inner iterations 7.1 7.2 7.3 7.4 7.5 Negative Log-likelihood #104 4 Clusters 20 40 60 80 100 The number of inner iterations 8.3 8.4 8.5 8.6 Negative Log-likelihood #104 5 Clusters Increasing Constant Decreasing OpenLoop BayesOpt (a) Convergence curve 20 40 60 80 100 The number of inner iterations 2.37 2.38 2.39 2.4 2.41 2.42 Negative Log-likelihood #105 Increasing Constant Decreasing 200 400 600 800 1000 Indices of samples 0 0.2 0.4 0.6 0.8 1 Responsibility Increasing Ground Truth {rn} (15 Inner Iter.) E(rn) (15 Inner Iter.) 200 400 600 800 1000 Indices of samples 0 0.2 0.4 0.6 0.8 1 Responsibility Constant 200 400 600 800 1000 Indices of samples 0 0.2 0.4 0.6 0.8 1 Responsibility Decreasing (b) Responsibility and ground truth Figure 1: The data contain 200 event sequences generated via two 5-dimensional Hawkes processes. (a) Each curve is the average of 5 trials’ results. In each trial, total 100 inner iterations are applied. The increasing (decreasing) strategy changes the number of inner iterations from 2 to 8 (from 8 to 2). The constant strategy fixes the number to 5. (b) The black line is the ground truth. The red dots are responsibilities after 15 inner iterations, and the red line is their average. clusters. Regrading our Dirichlet distribution as a finite approximation of a Dirichlet process, we set a large initial K as the truncation level. A simple empirical method is discarding the empty cluster (i.e., Nk = 0) and merging the cluster with Nk smaller than a threshold Nmin in the learning phase. Besides this, we can apply the MCMC in [11,48] to update K via merging or splitting clusters. Repeating the three steps above, our algorithm maximizes the log-likelihood function (i.e., the logarithm of (4)) and achieves optimal {Σ, B} accordingly. Both the details of our algorithm and its computational complexity are given in the supplementary file. 4.2 Inner Iteration Allocation Strategy and Convergence Analysis Our algorithm is in a nested EM framework, where the outer iteration corresponds to the loop of E-step and M-step and the inner iteration corresponds to the inner EM in the M-step. The runtime of our algorithm is linearly proportional to the total number of inner iterations. Given fixed runtime (or the total number of inner iterations), both the final achievable log-likelihood and convergence behavior of the algorithm highly depend on how we allocate the number of inner iterations across the outer iterations. In this work, we test three inner iteration allocation strategies. The first strategy is heuristic, which fixes, increases, or decreases the number of inner iterations as the outer iteration progresses. Compared with constant inner iteration strategy, the increasing or decreasing strategy might improve the convergence of algorithm [9]. The second strategy is based on open-loop control [27]: in each outer iteration, we compute objective function via two methods respectively — updating parameters directly (i.e., continuing current M-step and going to next inner iteration) or first updating responsibilities and then updating parameters (i.e., going to a new loop of E-step and M-step and starting a new outer iteration). The parameters corresponding to the smaller negative log-likelihood are preserved. The third strategy is applying Bayesian optimization [33,35] to optimize the number of inner iterations per outer iteration via maximizing the expected improvement. We apply these strategies to a synthetic data set and visualize their impacts on the convergence of our algorithm in Fig. 1(a). The open-loop control strategy and the Bayesian optimization strategy obtain comparable performance on the convergence of algorithm. They outperform heuristic strategies (i.e., increasing, decreasing and fixing the number of inner iterations per outer iteration), which reduce the negative log-likelihood more rapidly and reach lower value finally. Although adjusting the number of inner iterations via different methodologies, both these two strategies tend to increase the number of inner iterations w.r.t. the number of outer iterations. In the beginning of algorithm, the open-loop control strategy updates responsibilities frequently, and similarly, the Bayesian optimization strategy assigns small number of inner iterations. The heuristic strategy that increasing the number of inner iterations follows the same tendency, and therefore, is just slightly worse than the open-loop control and the Bayesian optimization. This phenomenon is because the estimated responsibility is not reliable in the beginning. Too many inner iterations at that time might make learning results fall into bad local optimums. Fig. 1(b) further verifies our explanation. With the help of the increasing strategy, most of the responsibilities converge to the ground truth with high confidence after just 15 inner iterations, because 5 80 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 80 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 40 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 40 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 20 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 20 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers (a) MMHP+DPGMM 80 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 80 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 40 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 40 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 20 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 20 Events per Sequence 0.1 0.2 0.3 0.4 Sample Percentage of Minor Cluster 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Distance between Centers (b) DMHP Figure 2: Comparisons for various methods on F1 score of minor cluster. the responsibilities has been updated over 5 times. On the contrary, the responsibilities corresponding to the constant and the decreasing strategies have more uncertainty — many responsibilities are around 0.5 and far from the ground truth. Based on the analysis above, the increasing allocation strategy indeed improves the convergence of our algorithm, and the open-loop control and the Bayesian optimization are superior to other competitors. Because the computational complexity of the open-loop control is much lower than that of the Bayesian optimization, in the following experiments, we apply open-loop control strategy to our learning algorithm. The scheme of our learning algorithm and more detailed convergence analysis can be found in the supplementary file. 4.3 Empirical Analysis of Sample Complexity Focusing on the task of clustering event sequences, we investigate the sample complexity of our DMHP model and its learning algorithm. In particular, we want to show that the clustering method based on our model requires fewer samples than existing methods to identify clusters successfully. Among existing methods, the main competitor of our method is the clustering method based on the multi-task multi-dimensional Hawkes process (MMHP) model in [22]. It learns a specific Hawkes process for each sequence and clusters the sequences via applying the Dirichlet processes Gaussian mixture model (DPGMM) [10,28] to the parameters of the corresponding Hawkes processes. Following the work in [14], we demonstrate the superiority of our DMHP-based clustering method through the comparison on the identifiability of minor clusters given finite number of samples. Specifically, we consider a binary clustering problem with 500 event sequences. For the k-th cluster, k = 1, 2, Nk event sequences are generated via a 1-dimensional Hawkes processes with parameter θk = {µk, Ak}. Taking the parameter as a representation of the clustering center, we can calculate the distance between two clusters as d = ∥θ1 −θ2∥2. Assume that N1 < N2, we denote the first cluster as “minor” cluster, whose sample percentage is π1 = N1 N1+N2 . Applying our DMHP model and its learning algorithm to the data generated with different d’s and π1’s, we can calculate the F1 scores of the minor cluster w.r.t. {d, π}. The high F1 score means that the minor cluster is identified with high accuracy. Fig. 2 visualizes the maps of F1 scores generated via different methods w.r.t. the number of events per sequence. We can find that the F1 score obtained via our DMHP-based method is close to 1 in most situations. Its identifiable area (yellow part) is much larger than that of the MMHP+DPGMM method consistently w.r.t. the number of events per sequence. The unidentifiable cases happen only in the following two situations: the parameters of different clusters are nearly equal (i.e., d →0); or the minor cluster is extremely small (i.e., π1 →0). The enlarged version of Fig. 2 is given in the supplementary file. 5 Experiments To demonstrate the feasibility and the efficiency of our DMHP-based sequence clustering method, we compare it with the state-of-the-art methods, including the vector auto-regressive (VAR) method [12], the Least-Squares (LS) method in [7], and the multi-task multi-dimensional Hawkes process (MMHP) in [22]. All of the three competitors first learn features of sequences and then apply the DPGMM [10] to cluster sequences. The VAR discretizes asynchronous event sequences to time series and learns transition matrices as features. Both the LS and the MMHP learn a specific Hawkes process for each event sequence. For each event sequence, we calculate its infectivity matrix Φ = [φcc′], where the element φcc′ is the integration of impact function (i.e., R ∞ 0 φcc′(t)dt), and use it as the feature. 6 Table 1: Clustering Purity on Synthetic Data. Sine-like φ(t) Piecewise constant φ(t) C K VAR+ LS+ MMHP+ DMHP VAR+ LS+ MMHP+ DMHP DPGMM DPGMM DPGMM DPGMM DPGMM DPGMM 5 2 0.5235 0.5639 0.5917 0.9898 0.5222 0.5589 0.5913 0.8085 3 0.3860 0.5278 0.5565 0.9683 0.3618 0.4402 0.4517 0.7715 4 0.2894 0.4365 0.5112 0.9360 0.2901 0.3365 0.3876 0.7056 5 0.2543 0.3980 0.4656 0.9055 0.2476 0.2980 0.3245 0.6774 For the synthetic data with clustering labels, we use clustering purity [24] to evaluate various methods: Purity = 1 N XK k=1 maxj∈{1,...,K′} |Wk ∩Cj|, where Wk is the learned index set of sequences belonging to the k-th cluster, Cj is the real index set of sequence belonging to the j-th class, and N is the total number of sequences. For the real-world data, we visualize the infectivity matrix of each cluster and measure the clustering consistency via a cross-validation method [38, 40]. The principle is simple: because random sampling does not change the clustering structure of data, a clustering method with high consistency should preserve the pairwise relationships of samples in different trials. Specifically, we test each clustering method with J (= 100) trials. In the j-th trial, data is randomly divided into two folds. After learning the corresponding model from the training fold, we apply the method to the testing fold. We enumerate all pairs of sequences within a same cluster in the j-th trial and count the pairs preserved in all other trials. The clustering consistency is the minimum proportion of preserved pairs over all trials: Consistency = minj∈{1,..,J} X j′̸=j X (n,n′)∈Mj 1{kj′ n = kj′ n′} (J −1)|Mj| , where Mj = {(n, n′)|kj n = kj n′} is the set of sequence pairs within same cluster in the j-th trial, and kj n is the index of cluster of the n-th sequence in the j-th trial. 5.1 Synthetic Data We generate two synthetic data sets with various clusters using sine-like impact functions and piecewise constant impact functions respectively. In each data set, the number of clusters is set from 2 to 5. Each cluster contains 400 event sequences, and each event sequence contains 50 (= Mn) events and 5 (= C) event types. The elements of exogenous base intensity are sampled uniformly from [0, 1]. Each sine-like impact function in the k-th cluster is formulated as φk cc′ = bk cc′(1−cos(ωk cc′(t−sk cc′))), where {bk cc′, ωk cc′, sk cc′} are sampled randomly from [ π 5 , 2π 5 ]. Each piecewise constant impact function is the truncation of the corresponding sine-like impact function, i.e., 2bk cc′ × round(φk cc′/(2bk cc′)). Table 1 shows the clustering purity of various methods on the synthetic data. Compared with the three competitors, our DMHP obtains much better clustering purity consistently. The VAR simply treats asynchronous event sequences as time series, which loses the information like the order of events and the time delay of adjacent events. Both the LS and the MMHP learn Hawkes process for each individual sequence, which might suffer to over-fitting problem in the case having few events per sequence. These competitors decompose sequence clustering into two phases: learning feature and applying DPGMM, which is very sensitive to the quality of feature. The potential problems above lead to unsatisfying clustering results. Our DMHP method, however, is model-based, which learns clustering result directly and reduces the number of unknown variables greatly. As a result, our method avoids the problems of these three competitors and obtains superior clustering results. Additionally, the learning results of the synthetic data with piecewise constant impact functions prove that our DMHP method is relatively robust to the problem of model misspecification — although our Gaussian basis cannot fit piecewise constant impact functions well, our method still outperforms other methods greatly. 5.2 Real-world Data We test our clustering method on two real-world data sets. The first is the ICU patient flow data used in [43], which is extracted from the MIMIC II data set [32]. This data set contains the transition 7 Table 2: Clustering Consistency on Real-world Data. Method VAR+DPGMM LS+DPGMM MMHP+DPGMM DMHP ICU Patient 0.0901 0.1390 0.3313 0.3778 IPTV User 0.0443 0.0389 0.1382 0.2004 5 10 15 20 25 0 20 40 60 DMHP MMHP (a) Histogram of K Cluster 1 2 4 6 8 10 2 4 6 8 10 Cluster 2 2 4 6 8 10 2 4 6 8 10 Cluster 3 2 4 6 8 10 2 4 6 8 10 Cluster 4 2 4 6 8 10 2 4 6 8 10 Cluster 5 2 4 6 8 10 2 4 6 8 10 Cluster 6 2 4 6 8 10 2 4 6 8 10 Cluster 1 2 4 6 8 10 2 4 6 8 10 Cluster 2 2 4 6 8 10 2 4 6 8 10 Cluster 3 2 4 6 8 10 2 4 6 8 10 Cluster 4 2 4 6 8 10 2 4 6 8 10 Cluster 5 2 4 6 8 10 2 4 6 8 10 Cluster 6 2 4 6 8 10 2 4 6 8 10 Cluster 7 2 4 6 8 10 2 4 6 8 10 Cluster 8 2 4 6 8 10 2 4 6 8 10 Cluster 9 2 4 6 8 10 2 4 6 8 10 2 4 6 8 10 Cluster 11 2 4 6 8 10 2 4 6 8 10 Cluster 12 2 4 6 8 10 2 4 6 8 10 Cluster 13 2 4 6 8 10 2 4 6 8 10 Cluster 14 2 4 6 8 10 2 4 6 8 10 Cluster 15 2 4 6 8 10 2 4 6 8 10 Cluster 16 2 4 6 8 10 2 4 6 8 10 Cluster 17 2 4 6 8 10 2 4 6 8 10 Cluster 18 2 4 6 8 10 2 4 6 8 10 Cluster 19 2 4 6 8 10 2 4 6 8 10 2 4 6 8 10 (b) DMHP Cluster 1 2 4 6 8 10 2 4 6 8 10 Cluster 2 2 4 6 8 10 2 4 6 8 10 Cluster 3 2 4 6 8 10 2 4 6 8 10 Cluster 4 2 4 6 8 10 2 4 6 8 10 Cluster 5 2 4 6 8 10 2 4 6 8 10 Cluster 6 2 4 6 8 10 2 4 6 8 10 Cluster 1 2 4 6 8 10 2 4 6 8 10 Cluster 2 2 4 6 8 10 2 4 6 8 10 Cluster 3 2 4 6 8 10 2 4 6 8 10 Cluster 4 2 4 6 8 10 2 4 6 8 10 Cluster 5 2 4 6 8 10 2 4 6 8 10 Cluster 6 2 4 6 8 10 2 4 6 8 10 Cluster 7 2 4 6 8 10 2 4 6 8 10 Cluster 8 2 4 6 8 10 2 4 6 8 10 Cluster 9 2 4 6 8 10 2 4 6 8 10 Cluster 10 2 4 6 8 10 2 4 6 8 10 Cluster 11 2 4 6 8 10 2 4 6 8 10 Cluster 12 2 4 6 8 10 2 4 6 8 10 Cluster 13 2 4 6 8 10 2 4 6 8 10 Cluster 14 2 4 6 8 10 2 4 6 8 10 Cluster 15 2 4 6 8 10 2 4 6 8 10 Cluster 16 2 4 6 8 10 2 4 6 8 10 Cluster 17 2 4 6 8 10 2 4 6 8 10 Cluster 18 2 4 6 8 10 2 4 6 8 10 Cluster 19 2 4 6 8 10 2 4 6 8 10 Cluster 20 2 4 6 8 10 2 4 6 8 10 (c) MMHP+DPGMM Figure 3: Comparisons on the ICU patient flow data. processes of 30, 308 patients among different kinds of care units. The patients can be clustered according to their transition processes. The second is the IPTV data set in [20,22], which contains 7, 100 IPTV users’ viewing records collected via Shanghai Telecomm Inc. The TV programs are categorized into 16 classes and the viewing behaviors more than 20 minutes are recorded. Similarly, the users can be clustered according to their viewing records. The event sequences in these two data have strong but structural triggering patterns, which can be modeled via different Hawkes processes. Table 2 shows the performance of various clustering methods on the clustering consistency. We can find that our method outperforms other methods obviously, which means that the clustering result obtained via our method is more stable and consistent than other methods’ results. In Fig. 3 we visualize the comparison for our method and its main competitor MMHP+DPGMM on the ICU patient flow data. Fig. 3(a) shows the histograms of the number of clusters for the two methods. We can find that MMHP+DPGMM method tends to over-segment data into too many clusters. Our DMHP method, however, can find more compact clustering structure. The distribution of the number of clusters concentrates to 6 and 19 for the two data sets, respectively. In our opinion, this phenomenon reflects the drawback of the feature-based method — the clustering performance is highly dependent on the quality of feature while the clustering structure is not considered sufficiently in the phase of extracting feature. Taking learned infectivity matrices as representations of clusters, we compare our DMHP method with MMHP+DPGMM in Figs. 3(b) and 3(c). The infectivity matrices obtained by our DMHP are sparse and with distinguishable structure, while those obtained by MMHP+DPGMM are chaotic — although MMHP also applies sparse regularizer to each event sequence’ infectivity matrix, it cannot guarantee the average of the infectivity matrices in a cluster is still sparse. Same phenomena can also be observed in the experiments on the IPTV data. More experimental results are given in the supplementary file. 6 Conclusion and Future Work In this paper, we propose and discuss a Dirichlet mixture model of Hawkes processes and achieve a model-based solution to event sequence clustering. We prove the identifiability of our model and analyze the convergence, sample complexity and computational complexity of our learning algorithm. In the aspect of methodology, we plan to study other potential priors, e.g., the prior based on determinantial point processes (DPP) in [45], to improve the estimation of the number of clusters, and further accelerate our learning algorithm via optimizing inner iteration allocation strategy in near future. Additionally, our model can be extended to Dirichlet process mixture model when K →∞. In that case, we plan to apply Bayesian nonparametrics to develop new learning algorithms. The source code can be found at https://github.com/HongtengXu/Hawkes-Process-Toolkit. 8 Acknowledgment This work is supported in part by NSF IIS-1639792, IIS-1717916, and CMMI-1745382. References [1] E. Bacry, K. Dayri, and J.-F. Muzy. Non-parametric kernel estimation for symmetric Hawkes processes. application to high frequency financial data. The European Physical Journal B, 85(5):1–12, 2012. [2] D. M. Blei and M. I. Jordan. Variational inference for Dirichlet process mixtures. Bayesian analysis, 1(1):121–143, 2006. [3] C. Blundell, J. Beck, and K. A. Heller. Modelling reciprocating relationships with Hawkes processes. In NIPS, 2012. [4] D. J. Daley and D. Vere-Jones. An introduction to the theory of point processes: volume II: general theory and structure, volume 2. Springer Science & Business Media, 2007. [5] N. Du, M. Farajtabar, A. Ahmed, A. J. Smola, and L. Song. Dirichlet-Hawkes processes with applications to clustering continuous-time document streams. In KDD, 2015. [6] N. Du, L. Song, M. Yuan, and A. J. Smola. Learning networks of heterogeneous influence. In NIPS, 2012. [7] M. Eichler, R. Dahlhaus, and J. Dueck. Graphical modeling for multivariate Hawkes processes with nonparametric link functions. Journal of Time Series Analysis, 2016. [8] M. Farajtabar, N. Du, M. Gomez-Rodriguez, I. Valera, H. Zha, and L. Song. Shaping social activity by incentivizing users. In NIPS, 2014. [9] G. H. Golub, Z. Zhang, and H. Zha. Large sparse symmetric eigenvalue problems with homogeneous linear constraints: the Lanczos process with inner–outer iterations. Linear Algebra And Its Applications, 309(1):289–306, 2000. [10] D. Görür and C. E. Rasmussen. Dirichlet process Gaussian mixture models: Choice of the base distribution. Journal of Computer Science and Technology, 25(4):653–664, 2010. [11] P. J. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, pages 711–732, 1995. [12] F. Han and H. Liu. Transition matrix estimation in high dimensional time series. In ICML, 2013. [13] A. G. Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1):83–90, 1971. [14] D. Kim. Mixture inference at the edge of identifiability. Ph.D. Thesis, 2008. [15] R. Lemonnier and N. Vayatis. Nonparametric Markovian learning of triggering kernels for mutually exciting and mutually inhibiting multivariate Hawkes processes. In Machine Learning and Knowledge Discovery in Databases, pages 161–176. 2014. [16] E. Lewis and G. Mohler. A nonparametric EM algorithm for multiscale Hawkes processes. Journal of Nonparametric Statistics, 2011. [17] L. Li and H. Zha. Dyadic event attribution in social networks with mixtures of Hawkes processes. In CIKM, 2013. [18] W. Lian, R. Henao, V. Rao, J. Lucas, and L. Carin. A multitask point process predictive model. In ICML, 2015. [19] T. W. Liao. Clustering of time series data: a survey. Pattern recognition, 38(11):1857–1874, 2005. [20] D. Luo, H. Xu, H. Zha, J. Du, R. Xie, X. Yang, and W. Zhang. You are what you watch and when you watch: Inferring household structures from IPTV viewing data. IEEE Transactions on Broadcasting, 60(1):61–72, 2014. [21] D. Luo, H. Xu, Y. Zhen, B. Dilkina, H. Zha, X. Yang, and W. Zhang. Learning mixtures of Markov chains from aggregate data with structural constraints. IEEE Transactions on Knowledge and Data Engineering, 28(6):1518–1531, 2016. [22] D. Luo, H. Xu, Y. Zhen, X. Ning, H. Zha, X. Yang, and W. Zhang. Multi-task multi-dimensional Hawkes processes for modeling event sequences. In IJCAI, 2015. [23] E. A. Maharaj. Cluster of time series. Journal of Classification, 17(2):297–314, 2000. [24] C. D. Manning, P. Raghavan, H. Schütze, et al. Introduction to information retrieval, volume 1. Cambridge university press Cambridge, 2008. 9 [25] C. Maugis, G. Celeux, and M.-L. Martin-Magniette. Variable selection for clustering with Gaussian mixture models. Biometrics, 65(3):701–709, 2009. [26] E. Meijer and J. Y. Ypma. A simple identification proof for a mixture of two univariate normal distributions. Journal of Classification, 25(1):113–123, 2008. [27] B. A. Ogunnaike and W. H. Ray. Process dynamics, modeling, and control. Oxford University Press, USA, 1994. [28] C. E. Rasmussen. The infinite Gaussian mixture model. In NIPS, 1999. [29] J. G. Rasmussen. Bayesian inference for Hawkes processes. Methodology and Computing in Applied Probability, 15(3):623–642, 2013. [30] P. Reynaud-Bouret, S. Schbath, et al. Adaptive estimation for Hawkes processes; application to genome analysis. The Annals of Statistics, 38(5):2781–2822, 2010. [31] T. J. Rothenberg. Identification in parametric models. Econometrica: Journal of the Econometric Society, pages 577–591, 1971. [32] M. Saeed, C. Lieu, G. Raber, and R. G. Mark. MIMIC II: a massive temporal ICU patient database to support research in intelligent patient monitoring. In Computers in Cardiology, 2002, pages 641–644. IEEE, 2002. [33] B. Shahriari, K. Swersky, Z. Wang, R. P. Adams, and N. de Freitas. Taking the human out of the loop: A review of Bayesian optimization. Proceedings of the IEEE, 104(1):148–175, 2016. [34] A. Simma and M. I. Jordan. Modeling events with cascades of Poisson processes. In UAI, 2010. [35] J. Snoek, H. Larochelle, and R. P. Adams. Practical Bayesian optimization of machine learning algorithms. In NIPS, 2012. [36] R. Socher, A. L. Maas, and C. D. Manning. Spectral Chinese restaurant processes: Nonparametric clustering based on similarities. In AISTATS, 2011. [37] Y. W. Teh, D. Newman, and M. Welling. A collapsed variational Bayesian inference algorithm for latent Dirichlet allocation. In NIPS, 2006. [38] R. Tibshirani and G. Walther. Cluster validation by prediction strength. Journal of Computational and Graphical Statistics, 14(3):511–528, 2005. [39] J. J. Van Wijk and E. R. Van Selow. Cluster and calendar based visualization of time series data. In IEEE Symposium on Information Visualization, 1999. [40] U. Von Luxburg. Clustering Stability. Now Publishers Inc, 2010. [41] H. Xu, M. Farajtabar, and H. Zha. Learning Granger causality for Hawkes processes. In ICML, 2016. [42] H. Xu, D. Luo, and H. Zha. Learning Hawkes processes from short doubly-censored event sequences. In ICML, 2017. [43] H. Xu, W. Wu, S. Nemati, and H. Zha. Patient flow prediction via discriminative learning of mutually-correcting processes. IEEE Transactions on Knowledge and Data Engineering, 29(1):157–171, 2017. [44] H. Xu, Y. Zhen, and H. Zha. Trailer generation via a point process-based visual attractiveness model. In IJCAI, 2015. [45] Y. Xu, P. Müller, and D. Telesca. Bayesian inference for latent biologic structure with determinantal point processes (DPP). Biometrics, 2016. [46] S. J. Yakowitz and J. D. Spragins. On the identifiability of finite mixtures. The Annals of Mathematical Statistics, pages 209–214, 1968. [47] S.-H. Yang and H. Zha. Mixture of mutually exciting processes for viral diffusion. In ICML, 2013. [48] Z. Zhang, K. L. Chan, Y. Wu, and C. Chen. Learning a multivariate Gaussian mixture model with the reversible jump MCMC algorithm. Statistics and Computing, 14(4):343–355, 2004. [49] Q. Zhao, M. A. Erdogdu, H. Y. He, A. Rajaraman, and J. Leskovec. SEISMIC: A self-exciting point process model for predicting tweet popularity. In KDD, 2015. [50] K. Zhou, H. Zha, and L. Song. Learning social infectivity in sparse low-rank networks using multi-dimensional Hawkes processes. In AISTATS, 2013. [51] K. Zhou, H. Zha, and L. Song. Learning triggering kernels for multi-dimensional Hawkes processes. In ICML, 2013. 10 | 2017 | 571 |
7,087 | Efficient Approximation Algorithms for String Kernel Based Sequence Classification Muhammad Farhan Department of Computer Science School of Science and Engineering Lahore University of Management Sciences Lahore, Pakistan 14030031@lums.edu.pk Juvaria Tariq Department of Mathematics School of Science and Engineering Lahore University of Management Sciences Lahore, Pakistan jtariq@emory.edu Arif Zaman Department of Computer Science School of Science and Engineering Lahore University of Management Sciences Lahore, Pakistan arifz@lums.edu.pk Mudassir Shabbir Department of Computer Science Information Technology University Lahore, Pakistan mudassir.shabbir@itu.edu.pk Imdad Ullah Khan Department of Computer Science School of Science and Engineering Lahore University of Management Sciences Lahore, Pakistan imdad.khan@lums.edu.pk Abstract Sequence classification algorithms, such as SVM, require a definition of distance (similarity) measure between two sequences. A commonly used notion of similarity is the number of matches between k-mers (k-length subsequences) in the two sequences. Extending this definition, by considering two k-mers to match if their distance is at most m, yields better classification performance. This, however, makes the problem computationally much more complex. Known algorithms to compute this similarity have computational complexity that render them applicable only for small values of k and m. In this work, we develop novel techniques to efficiently and accurately estimate the pairwise similarity score, which enables us to use much larger values of k and m, and get higher predictive accuracy. This opens up a broad avenue of applying this classification approach to audio, images, and text sequences. Our algorithm achieves excellent approximation performance with theoretical guarantees. In the process we solve an open combinatorial problem, which was posed as a major hindrance to the scalability of existing solutions. We give analytical bounds on quality and runtime of our algorithm and report its empirical performance on real world biological and music sequences datasets. 1 Introduction Sequence classification is a fundamental task in pattern recognition, machine learning, and data mining with numerous applications in bioinformatics, text mining, and natural language processing. Detecting proteins homology (shared ancestry measured from similarity of their sequences of amino 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. acids) and predicting proteins fold (functional three dimensional structure) are essential tasks in bioinformatics. Sequence classification algorithms have been applied to both of these problems with great success [3, 10, 13, 18, 19, 20, 25]. Music data, a real valued signal when discretized using vector quantization of MFCC features is another flavor of sequential data [26]. Sequence classification has been used for recognizing genres of music sequences with no annotation and identifying artists from albums [12, 13, 14]. Text documents can also be considered as sequences of words from a language lexicon. Categorizing texts into classes based on their topics is another application domain of sequence classification [11, 15]. While general purpose classification methods may be applicable to sequence classification, huge lengths of sequences, large alphabet sizes, and large scale datasets prove to be rather challenging for such techniques. Furthermore, we cannot directly apply classification algorithms devised for vectors in metric spaces because in almost all practical scenarios sequences have varying lengths unless some mapping is done beforehand. In one of the more successful approaches, the variable-length sequences are represented as fixed dimensional feature vectors. A feature vector typically is the spectra (counts) of all k-length substrings (k-mers) present exactly [18] or inexactly (with up to m mismatches) [19] within a sequence. A kernel function is then defined that takes as input a pair of feature vectors and returns a real-valued similarity score between the pair (typically inner-product of the respective spectra’s). The matrix of pairwise similarity scores (the kernel matrix) thus computed is used as input to a standard support vector machine (SVM) [5, 27] classifier resulting in excellent classification performance in many applications [19]. In this setting k (the length of substrings used as bases of feature map) and m (the mismatch parameter) are independent variables directly related to classification accuracy and time complexity of the algorithm. It has been established that using larger values of k and m improve classification performance [11, 13]. On the other hand, the runtime of kernel computation by the efficient trie-based algorithm [19, 24] is O(km+1|Σ|m(|X| + |Y |)) for two sequences X and Y over alphabet Σ. Computation of mismatch kernel between two sequences X and Y reduces to the following two problems. i) Given two k-mers α and β that are at Hamming distance d from each other, determine the size of intersection of m-mismatch neighborhoods of α and β (k-mers that are at distance at most m from both of them). ii) For 0 ≤d ≤min{2m, k} determine the number of pairs of k-mers (α, β) ∈X × Y such that Hamming distance between α and β is d. In the best known algorithm [13] the former problem is addressed by precomputing the intersection size in constant time for m ≤2 only. While a sorting and enumeration based technique is proposed for the latter problem that has computational complexity O(2k(|X| + |Y |), which makes it applicable for moderately large values of k (of course limited to m ≤2 only). In this paper, we completely resolve the combinatorial problem (problem i) for all values of m. We prove a closed form expression for the size of intersection of m-mismatch neighborhoods that lets us precompute these values in O(m3) time (independent of |Σ|, k, lengths and number of sequences). For the latter problem we devise an efficient approximation scheme inspired by the theory of locality sensitive hashing to accurately estimate the number of k-mer pairs between the two sequences that are at distance d. Combining the above two we design a polynomial time approximation algorithm for kernel computation. We provide probabilistic guarantees on the quality of our algorithm and analytical bounds on its runtime. Furthermore, we test our algorithm on several real world datasets with large values of k and m to demonstrate that we achieve excellent predictive performance. Note that string kernel based sequence classification was previously not feasible for this range of parameters. 2 Related Work In the computational biology community pairwise alignment similarity scores were used traditionally as basis for classification, like the local and global alignment [5, 29]. String kernel based classification was introduced in [30, 9]. Extending this idea, [30] defined the gappy n-gram kernel and used it in conjunction with SVM [27] for text classification. The main drawback of this approach is that runtime for kernel evaluations depends quadratically on lengths of the sequences. An alternative model of string kernels represents sequences as fixed dimensional vectors of counts of occurrences of k-mers in them. These include k-spectrum [18] and substring [28] kernels. This notion is extended to count inexact occurrences of patterns in sequences as in mismatch [19] and profile [10] kernels. In this transformed feature space SVM is used to learn class boundaries. This approach 2 yields excellent classification accuracies [13] but computational complexity of kernel evaluation remains a daunting challenge [11]. The exponential dimensions (|Σ|k) of the feature space for both the k-spectrum kernel and k, mmismatch kernel make explicit transformation of strings computationally prohibitive. SVM does not require the feature vectors explicitly; it only uses pairwise dot products between them. A trie-based strategy to implicitly compute kernel values for pairs of sequences was proposed in [18] and [19]. A (k, m)-mismatch tree is introduced which is a rooted |Σ|-ary tree of depth k, where each internal node has a child corresponding to each symbol in Σ and every leaf corresponds to a k-mer in Σk. The runtime for computing the k, m mismatch kernel value between two sequences X and Y , under this trie-based framework, is O((|X| + |Y |)km+1|Σ|m), where |X| and |Y | are lengths of sequences. This makes the algorithm only feasible for small alphabet sizes and very small number of allowed mismatches. The k-mer based kernel framework has been extended in several ways by defining different string kernels such as restricted gappy kernel, substitution kernel, wildcard kernel [20], cluster kernel [32], sparse spatial kernel [12], abstraction-augmented kernel [16], and generalized similarity kernel [14]. For literature on large scale kernel learning and kernel approximation see [34, 1, 7, 22, 23, 33] and references therein. 3 Algorithm for Kernel Computation In this section we formulate the problem, describe our algorithm and analyze it’s runtime and quality. k-spectrum and k, m-mismatch kernel: Given a sequence X over alphabet Σ, the k, m-mismatch spectrum of X is a |Σ|k-dimensional vector, Φk,m(X) of number of times each possible k-mer occurs in X with at most m mismatches. Formally, Φk,m(X) = (Φk,m(X)[γ])γ∈Σk = X α∈X Im(α, γ) ! γ∈Σk , (1) where Im(α, γ) = 1, if α belongs to the set of k-mers that differ from γ by at most m mismatches, i.e. the Hamming distance between α and γ, d(α, γ) ≤m. Note that for m = 0, it is known as k-spectrum of X. The k, m-mismatch kernel value for two sequences X and Y (the mismatch spectrum similarity score) [19] is defined as: K(X, Y |k, m) = ⟨Φk,m(X), Φk,m(Y )⟩= X γ∈Σk Φk,m(X)[γ]Φk,m(Y )[γ] = X γ∈Σk X α∈X Im(α, γ) X β∈Y Im(β, γ) = X α∈X X β∈Y X γ∈Σk Im(α, γ)Im(β, γ). (2) For a k-mer α, let Nk,m(α) = {γ ∈Σk : d(α, γ) ≤m} be the m-mutational neighborhood of α. Then for a pair of sequences X and Y , the k, m-mismatch kernel given in eq (2) can be equivalently computed as follows [13]: K(X, Y |k, m) = X α∈X X β∈Y X γ∈Σk Im(α, γ)Im(β, γ) = X α∈X X β∈Y |Nk,m(α) ∩Nk,m(β)| = X α∈X X β∈Y Im(α, β), (3) where Im(α, β) = |Nk,m(α) ∩Nk,m(β)| is the size of intersection of m-mutational neighborhoods of α and β. We use the following two facts. Fact 3.1. Im(α, β), the size of the intersection of m-mismatch neighborhoods of α and β, is a function of k, m, |Σ| and d(α, β) and is independent of the actual k-mers α and β or the actual positions where they differ. (See section 3.1) Fact 3.2. If d(α, β) > 2m, then Im(α, β) = 0. In view of the above two facts we can rewrite the kernel value (3) as K(X, Y |k, m) = X α∈X X β∈Y Im(α, β) = min{2m,k} X i=0 Mi · Ii, (4) 3 where Ii = Im(α, β) when d(α, β) = i and Mi is the number of pairs of k-mers (α, β) such that d(α, β) = i, where α ∈X and β ∈Y . Note that bounds on the last summation follows from Fact 3.2 and the fact that the Hamming distance between two k-mers is at most k. Hence the problem of kernel evaluation is reduced to computing Mi’s and evaluating Ii’s. 3.1 Closed form for Intersection Size Let Nk,m(α, β) be the intersection of m-mismatch neighborhoods of α and β i.e. Nk,m(α, β) = Nk,m(α) ∩Nk,m(β). As defined earlier |Nk,m(α, β)| = Im(α, β). Let Nq(α) = {γ ∈Σk : d(α, γ) = q} be the set of k-mers that differ with α in exactly q indices. Note that Nq(α) ∩Nr(α) = ∅for all q ̸= r. Using this and defining nqr(α, β) = |Nq(α) ∩Nr(β)|, Nk,m(α, β) = m [ q=0 m [ r=0 Nq(α) ∩Nr(β) and Im(α, β) = m X q=0 m X r=0 nqr(α, β). Hence we give a formula to compute nij(α, β). Let s = |Σ|. Theorem 3.3. Given two k-mers α and β such that d(α, β) = d, we have that nij(α, β) = i+j−d 2 X t=0 2d −i −j + 2t d −(i −t) d i + j −2t −d (s −2)i+j−2t−d k −d t (s −1)t. Proof. nij(α, β) can be interpreted as the number of ways to make i changes in α and j changes in β to get the same string. For clarity, we first deal with the case when we have d(α, β) = 0, i.e both strings are identical. We wish to find nij(α, β) = |Ni(α) ∩Nj(β)|. It is clear that in this case i = j, otherwise making i and j changes to the same string will not result in the same string. Hence nij = k i (s −1)i. Second we consider α, β such that d(α, β) = k. Clearly k ≥i and k ≥j. Moreover, since both strings do not agree at any index, character at every index has to be changed in at least one of α or β. This gives k ≤i + j. Now for a particular index p, α[p] and β[p] can go through any one of the following three changes. Let α[p] = x, β[p] = y. (I) Both α[p] and β[p] may change from x and y respectively to some character z. Let l1 be the count of indices going through this type of change. (II) α[p] changes from x to y, call the count of these l2. (III) β[p] changes from y to x, let this count be l3. It follows that i = l1 + l2 , j = l1 + l3, , l1 + l2 + l3 = k. This results in l1 = i + j −k. Since l1 is the count of indices at which characters of both strings change, we have s −2 character choices for each such index and k i+j−k possible combinations of indices for l1. From the remaining l2 + l3 = 2k −i −j indices, we choose l2 = k −j indices in 2k−i−j k−j ways and change the characters at these indices of α to characters of β at respective indices. Finally, we are left with only l3 remaining indices and we change them according to the definition of l3. Thus the total number of strings we get after making i changes in α and j changes in β is (s −2)i+j−k k i + j −k 2k −i −j k −j . Now we consider general strings α and β of length k with d(α, β) = d. Without loss of generality assume that they differ in the first d indices. We parameterize the system in terms of the number of changes that occur in the last k −d indices of the strings i.e let t be the number of indices that go through a change in last k −d indices. Number of possible such changes is k −d t (s −1)t. (5) Lets call the first d-length substrings of both strings α′ and β′. There are i −t characters to be changed in α′ and j −t in β′. As reasoned above, we have d ≤(i −t) + (j −t) =⇒t ≤i+j−d 2 . 4 In this setup we get i −t = l1 + l2, j −t = l1 + l3, l1 + l2 + l3 = d and l1 = (i −t) + (j −t) −d. We immediately get that for a fixed t, the total number of resultant strings after making i −t changes in α′ and j −t changes in β′ is 2d −(i −t) −(j −t) d −(i −t) d (i −t) + (j −t) −d (s −2)(i−t)+(j−t)−d. (6) For a fixed t, every substring counted in (5), every substring counted in (6) gives a required string obtained after i and j changes in α and β respectively. The statement of the theorem follows. Corollary 3.4. Runtime of computing Id is O(m3), independent of k and |Σ|. This is so, because if d(α, β) = d, Id = m P q=0 m P r=0 nqr(α, β) and nqr(α, β) can be computed in O(m). 3.2 Computing Mi Recall that given two sequences X and Y , Mi is the number of pairs of k-mers (α, β) such that d(α, β) = i, where α ∈X and β ∈Y . Formally, the problem of computing Mi is as follows: Problem 3.5. Given k, m, and two sets of k-mers SX and SY (set of k-mers extracted from the sequences X and Y respectively) with |SX| = nX and |SY | = nY . Compute Mi = |{(α, β) ∈SX × SY : d(α, β) = i}| for 0 ≤i ≤min{2m, k}. Note that the brute force approach to compute Mi requires O(nX · nY · k) comparisons. Let Qk(j) denote the set of all j-sets of {1, . . . , k} (subsets of indices). For θ ∈Qk(j) and a k-mer α, let α|θ be the j-mer obtained by selecting the characters at the j indices in θ. Let fθ(X, Y ) be the number of pairs of k-mers in SX × SY as follows; fθ(X, Y ) = |{(α, β) ∈SX × SY : d(α|θ, β|θ) = 0}|. We use the following important observations about fθ. Fact 3.6. For 0 ≤i ≤k and θ ∈Qk(k −i), if d(α|θ, β|θ) = 0, then d(α, β) ≤i. Fact 3.7. For 0 ≤i ≤k and θ ∈Qk(k −i), fθ(X, Y ) can be computed in O(kn log n) time. This can be done by first lexicographically sorting the k-mers in each of SX and SY by the indices in θ. The pairs in SX × SY that are the same at indices in θ can then be enumerated in one linear scan over the sorted lists. Let n = nX + nY , runtime of this computation is O(k(n + |Σ|)) if we use counting sort (as in [13]) or O(kn log n) for mergesort (since θ has O(k) indices.) Since this procedure is repeated many times, we refer to this as the SORT-ENUMERATE subroutine. We define Fi(X, Y ) = X θ∈Qk(k−i) fθ(X, Y ). (7) Lemma 3.8. Fi(X, Y ) = i X j=0 k −j k −i Mj. (8) Proof. Let (α, β) be a pair that contributes to Mj, i.e. d(α, β) = j. Then for every θ ∈Qk(k −i) that has all indices within the k −j positions where α and β agree, the pair (α, β) is counted in fθ(X, Y ). The number of such θ’s are k−j k−i , hence Mj is counted k−j k−i times in Fi(X, Y ), yielding the required equality. Corollary 3.9. Mi can readily be computed as: Mi = Fi(X, Y ) − i−1 P j=0 k−j k−i Mj. By definition, Fi(X, Y ) can be computed with k k−i = k i fθ computations. Let t = min{2m, k}. K(X, Y |k, m) can be evaluated by (4) after computing Mi (by (8)) and Ii (by Corollary 3.4) for 0 ≤i ≤t. The overall complexity of this strategy thus is t X i=0 k i (k −i)(n log n + n) ! + O(n) = O(k · 2k−1 · (n log n)). 5 Algorithm 1 : Approximate-Kernel(SX,SY ,k,m,ϵ,δ,B) 1: I, M ′ ←ZEROS(t + 1) 2: σ ←ϵ · √ δ 3: Populate I using Corollary 3.4 4: for i = 0 to t do 5: µF ←0 6: iter ←1 7: varF ←∞ 8: while varF > σ2 ∧iter < B do 9: θ ←RANDOM( k k−i ) 10: µF ←µF · (iter −1) + SORT-ENUMERATE(SX, SY , k, θ) iter ▷Application of Fact 3.7 11: varF ←VARIANCE(µF , varF , iter) ▷Compute online variance 12: iter ←iter + 1 13: F ′[i] ←µF · k k−i 14: M ′[i] ←F ′[i] 15: for j = 0 to i −1 do ▷Application of Corollary 3.9 16: M ′[i] ←M ′[i] − k−j k−i · M ′[j] 17: K′ ←SUMPRODUCT(M ′, I) ▷Applying Equation (4) 18: return K′ We give our algorithm to approximate K(X, Y |k, m), it’s explanation followed by it’s analysis. Algorithm 1 takes ϵ, δ ∈(0, 1), and B ∈Z+ as input parameters; the first two controls the accuracy of estimate while B is an upper bound on the sample size. We use (7) to estimate Fi = Fi(X, Y ) with an online sampling algorithm, where we choose θ ∈Qk(k −i) uniformly at random and compute the online mean and variance of the estimate for Fi. We continue to sample until the variance is below the threshold (σ2 = ϵ2δ) or the sample size reaches the upper bound B. We scale up our estimate by the population size and use it to compute M ′ i (estimates of Mi) using Corollary 3.9. These M ′ i ’s together with the precomputed exact values of Ii’s are used to compute our estimate, K′(X, Y |k, m, σ, δ, B), for the kernel value using (4). First we give an analytical bound on the runtime of Algorithm 1 then we provide guarantees on it’s performance. Theorem 3.10. Runtime of Algorithm 1 is bounded above by O(k2n log n). Proof. Observe that throughout the execution of the algorithm there are at most tB computations of fθ, which by Fact 3.7 needs O(kn log n) time. Since B is an absolute constant and t ≤k, we get that the total runtime of the algorithm is O(k2n log n). Note that in practice the while loop in line 8 is rarely executed for B iterations; the deviation is within the desired range much earlier. Let K′ = K′(X, Y |k, m, ϵ, δ, B) be our estimate (output of Algorithm 1) for K = K(X, Y |k, m). Theorem 3.11. K′ is an unbiased estimator of the true kernel value, i.e. E(K′) = K. Proof. For this we need the following result, whose proof is deferred. Lemma 3.12. E(M ′ i) = Mi. By Line 17 of Algorithm 1, E(K′) = E(Pt i=0 IiM ′ i). Using the fact that Ii’s are constants and Lemma 3.12 we get that E(K′) = t X i=0 IiE(M ′ i) = min{2m,k} X i=0 IiMi = K. Theorem 3.13. For any 0 < ϵ, δ < 1, Algorithm 1 is an (ϵImax, δ)−additive approximation algorithm, i.e. Pr(|K −K′| ≥ϵImax) < δ, where Imax = maxi{Ii}. 6 Note that these are very loose bounds, in practice we get approximation far better than these bounds. Furthermore, though Imax could be large, but it is only a fraction of one of the terms in summation for the kernel value K(X, Y |k, m). Proof. Let F ′ i be our estimate for Fi (X, Y ) = Fi. We use the following bound on the variance of K′ that is proved later. Lemma 3.14. V ar(K′) ≤δ(ϵ · Imax)2. By Lemma 3.12 we have E(K′) = K, hence by Lemma 3.14, Pr[|K′ −K|] ≥ϵImax is equivalent to Pr[|K′ −E(K′)|] ≥ 1 √ δ p V ar(K′). By the Chebychev’s inequality, this latter probability is at most δ. Therefore, Algorithm 1 is an (ϵImax, δ)−additive approximation algorithm. Proof. (Proof of Lemma 3.12) We prove it by induction on i. The base case (i = 0) is true as we compute M ′[0] exactly, i.e. M ′[0] = M[0]. Suppose E(M ′ j) = Mj for 0 ≤j ≤i −1. Let iter be the number of iterations for i, after execution of Line 10 we get F ′[i] = µF k k −i = Piter r=1 fθr(X, Y ) iter k k −i , where θr is the random (k −i)-set chosen in the rth iteration of the while loop. Since θr is chosen uniformly at random we get that E(F ′[i]) = E(µF ) k k −i = E(fθr(X, Y )) k k −i = Fi(X, Y ) k k−i k k −i . (9) After the loop on Line 15 is executed we get that E(M ′[i]) = Fi(X, Y ) − i−1 P j=0 k−j k−i E(M ′ j). Using E(M ′ j) = Mj (inductive hypothesis) in (8) we get that E(M ′ i) = Mi. Proof. (Proof of Lemma 3.14) After execution of the while loop in Algorithm 1, we have F ′ i = iP j=0 k−j k−i M ′ j. We use the following fact that follows from basic calculations. Fact 3.15. Suppose X0, . . . , Xt are random variables and let S = Pt i=0 aiXi, where a0, . . . , at are constants. Then V ar(S) = t X i=0 a2 i V ar(Xi) + 2 t X i=0 t X j=i+1 aiajCov(Xi, Xj). Using fact 3.15 and definitions of Imax and σ we get that V ar(K′) = t X i=0 Ii 2V ar(M ′ i) + 2 t X i=0 t X j=i+1 IiIjCov(M ′ i, M ′ j) ≤I2 max t X i=0 V ar(M ′ i) + 2 t X i=0 t X j=i+1 Cov(M ′ i, M ′ j) ≤I2 maxV ar(F ′ t) ≤I2 maxσ2 = δ(ϵ·Imax)2. The last inequality follows from the following relation derived from definition of F ′ i and Fact 3.15. V ar(F ′ t) = t X i=0 k −i k −t 2 V ar(M ′ i) + 2 t X i=0 t X j=i+1 k −i k −t k −j k −t Cov(M ′ i, M ′ j). (10) 7 4 Evaluation We study the performance of our algorithm in terms of runtime, quality of kernel estimates and predictive accuracies on standard benchmark sequences datasets (Table 1) . For the range of parameters feasible for existing solutions, we generated kernel matrices both by algorithm of [13] (exact) and our algorithm (approximate). These experiments are performed on an Intel Xeon machine with (8 Cores, 2.1 GHz and 32 GB RAM) using the same experimental settings as in [13, 15, 17]. Since our algorithm is applicable for significantly wider range of k and m, we also report classification performance with large k and m. For our algorithm we used B ∈{300, 500} and σ ∈{0.25, 0.5} with no significant difference in results as implied by the theoretical analysis. In all reported results B = 300 and σ = 0.5. In order to perform comparisons, for a few combinations of parameters we generated exact kernel matrices of each dataset on a much more powerful machine (a cluster of 20 nodes, each having 24 CPU’s with 2.5 GHz speed and 128GB RAM). Sources for datasets and source code are available at 1. Table 1: Datasets description Name Task Classes Seq. Av.Len. Evaluation Ding-Dubchak [6] protein fold recognition 27 694 169 10-fold CV SCOP [4, 31] protein homology detection 54 7329 308 54 binary class. Music [21, 26] music genre recognition 10 1000 2368 5-fold CV Artist20 [8, 17] artist identification 20 1413 9854 6-fold CV ISMIR [17] music genre recognition 6 729 10137 5-fold CV Running Times: We report difference in running times for kernels generation in Figure 1. Exact kernels are generated using code provided by authors of [13, 14] for 8 ≤k ≤16 and m = 2 only. We achieve significant speedups for large values of k (for k = 16 we get one order of magnitude gains in computational efficiency on all datasets). The running times for these algorithms are O(2kn) and O(k2n log n) respectively. We can use larger values of k without an exponential penalty, which is visible in the fact that in all graphs, as k increases the growth of running time of the exact algorithm is linear (on the log-scale), while that of our algorithm tends to taper off. Figure 1: Log scaled plot of running time of approximate and exact kernel generation for m = 2 1 10 100 1000 10000 8 10 12 14 16 8 10 12 14 16 8 10 12 14 16 8 10 12 14 16 8 10 12 14 16 DingDubchak SCOP MusicGenre ISMIR2004 Artist20 k Running Time (sec) Exact Approximate Kernel Error Analysis: We show that despite reduction in runtimes, we get excellent approximation of kernel matrices. In Table 2 we report point-to-point error analysis of the approximate kernel matrices. We compare our estimates with exact kernels for m = 2. For m > 2 we report statistical error analyses. More precisely, we evaluate differences with principal submatrices of the exact kernel matrix. These principal submatrices are selected by randomly sampling 50 sequences and computing their pairwise kernel values. We report errors for four datasets; the fifth one, not included for space reasons, showed no difference in error. From Table 2 it is evident that our empirical performance is significantly more precise than the theoretical bounds proved on errors in our estimates. 1https://github.com/mufarhan/sequence_class_NIPS_2017 8 Table 2: Mean absolute error (MAE) and root mean squared error (RMSE) of approximate kernels. For m > 2 we report average MAE and RMSE of three random principal submatrices of size 50 × 50 Music Genre ISMIR Artist20 SCOP (k, m) RMSE MAE RMSE MAE RMSE MAE RMSE MAE (10, 2) 0 0 0 0 0 0 1.3E−6 9.0E−8 (12, 2) 0 0 0 0 0 0 1.4E−6 1.0E−8 (14, 2) 2.0E−8 0 2.0E−8 0 3.3E−8 1.3E−8 2.9E−6 1.3E−8 (16, 2) 1.3E−8 0 4.0E−8 3.3E−9 2.9E−6 1.0E−8 (12, 6) 1.97E−5 8.5E−7 2.4E−4 1.8E−5 Prediction Accuracies: We compare the outputs of SVM on the exact and approximate kernels using the publicly available SVM implementation LIBSVM [2]. We computed exact kernel matrices by brute force algorithm for a few combinations of parameters for each dataset on the much more powerful machine. Generating these kernels took days; we only generated to compare classification performance of our algorithm with the exact one. We demonstrate that our predictive accuracies are sufficiently close to that with exact kernels in Table 3 (bio-sequences) and Table 4 (music). The parameters used for reporting classification performance are chosen in order to maintain comparability with previous studies. Similarly all measurements are made as in [13, 14], for instance for music genre classification we report results of 10-fold cross-validation (see Table 1). For our algorithm we used B = 300 and σ = 0.5 and we take an average of performances over three independent runs. Table 3: Classification performance comparisons on SCOP (ROC) and Ding-Dubchak (Accuracy) SCOP Ding-Dubchak Exact Approx Exact Approx k, m ROC ROC50 ROC ROC50 Accuracy 8, 2 88.09 38.71 88.05 38.60 34.01 31.65 10, 2 81.65 28.18 80.56 26.72 28.1 26.9 12, 2 71.31 23.27 66.93 11.04 27.23 26.66 14, 2 67.91 7.78 63.67 6.66 25.5 25.5 16, 2 64.45 6.89 61.64 5.76 25.94 25.03 10, 5 91.60 53.77 91.67 54.1 45.1 43.80 10, 7 90.27 48.18 90.30 48.44 58.21 57.20 12, 8 91.44 50.54 90.97 52.08 58.21 57.83 Table 4: Classification error comparisons on music datasets exact and estimated kernels Music Genre ISMIR Artist20 k, m Exact Estimate Exact Estimate Exact Estimate 10, 2 61.30 ± 3.3 61.30 ± 3.3 54.32 ± 1.6 54.32 ± 1.6 82.10 ± 2.2 82.10 ± 2.2 14, 2 71.70 ± 3.0 71.70 ± 3.0 55.14 ± 1.1 55.14 ± 1.1 86.84 ± 1.8 86.84 ± 1.8 16, 2 73.90 ± 1.9 73.90 ± 1.9 54.73 ± 1.5 54.73 ± 1.5 87.56 ± 1.8 87.56 ± 1.8 10, 7 37.00 ± 3.5 37.00 ± 3.5 27.16 ± 1.6 55.75 ± 4.7 55.75 ± 4.7 12, 6 54.20 ± 2.7 54.13 ± 2.9 52.12 ± 2.0 52.08 ± 1.5 79.57 ± 2.4 80.00 ± 2.6 12, 8 43.70 ± 3.2 44.20 ± 3.2 47.03 ± 2.6 47.41 ± 2.4 67.57 ± 3.6 5 Conclusion In this work we devised an efficient algorithm for evaluation of string kernels based on inexact matching of subsequences (k-mers). We derived a closed form expression for the size of intersection of m-mismatch neighborhoods of two k-mers. Another significant contribution of this work is a novel statistical estimate of the number of k-mer pairs at a fixed distance between two sequences. Although large values of the parameters k and m were known to yield better classification results, known algorithms are not feasible even for moderately large values. Using the two above mentioned results our algorithm efficiently approximate kernel matrices with probabilistic bounds on the accuracy. Evaluation on several challenging benchmark datasets for large k and m, show that we achieve state of the art classification performance, with an order of magnitude speedup over existing solutions. 9 References [1] F. R. Bach and M. I. Jordan. Predictive low-rank decomposition for kernel methods. In International Conference on Machine Learning, ICML, pages 33–40, 2005. [2] C.-C. Chang and C.-J. Lin. LIBSVM: A library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1–27:27, 2011. [3] J. Cheng and P. Baldi. A machine learning information retrieval approach to protein fold recognition. Bioinformatics, 22(12):1456–1463, 2006. [4] L. Conte, B. Ailey, T. Hubbard, S. Brenner, A. Murzin, and C. Chothia. Scop: A structural classification of proteins database. Nucleic Acids Research, 28(1):257–259, 2000. [5] N. Cristianini and J. Shawe-Taylor. An introduction to support vector machines and other kernel-based learning methods. Cambridge university press, 2000. [6] C. Ding and I. Dubchak. Multi-class protein fold recognition using support vector machines and neural networks. Bioinformatics, 17(4):349–358, 2001. [7] P. Drineas and M. W. Mahoney. On the nyström method for approximating a gram matrix for improved kernel-based learning. The Journal of Machine Learning Research, 6:2153–2175, 2005. [8] D. P. Ellis. Classifying music audio with timbral and chroma features. In ISMIR, volume 7, pages 339–340, 2007. [9] D. Haussler. Convolution kernels on discrete structures. Technical Report UCS-CRL-99-10, University of California at Santa Cruz, 1999. [10] R. Kuang, E. Ie, K. Wang, K. Wang, M. Siddiqi, Y. Freund, and C. Leslie. Profile-based string kernels for remote homology detection and motif extraction. Journal of Bioinformatics and Computational Biology, 3(3):527–550, 2005. [11] P. Kuksa. Scalable kernel methods and algorithms for general sequence analysis. PhD thesis, Department of Computer Science, Rutgers, The State University of New Jersey, 2011. [12] P. Kuksa, P.-H. Huang, and V. Pavlovic. Fast protein homology and fold detection with sparse spatial sample kernels. In 19th International Conference on Pattern Recognition, ICPR, pages 1–4. IEEE, 2008. [13] P. Kuksa, P.-H. Huang, and V. Pavlovic. Scalable algorithms for string kernels with inexact matching. In Advances in Neural Information Processing Systems, NIPS, pages 881–888. MIT Press, 2009. [14] P. Kuksa, I. Khan, and V. Pavlovic. Generalized similarity kernels for efficient sequence classification. In SIAM International Conference on Data Mining, SDM, pages 873–882. SIAM, 2012. [15] P. Kuksa and V. Pavlovic. Spatial representation for efficient sequence classification. In 20th International Conference on Pattern Recognition, ICPR, pages 3320–3323. IEEE, 2010. [16] P. Kuksa, Y. Qi, B. Bai, R. Collobert, J. Weston, V. Pavlovic, and X. Ning. Semi-supervised abstraction-augmented string kernel for multi-level bio-relation extraction. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, ECML-PKDD, pages 128–144. Springer, 2010. [17] P. P. Kuksa. Efficient multivariate sequence classification. In CoRR abs/1409.8211, 2013. [18] C. Leslie, E. Eskin, and W. Noble. The spectrum kernel: A string kernel for svm protein classification. In Pacific Symposium on Biocomputing, volume 7 of PSB, pages 566–575, 2002. [19] C. Leslie, E. Eskin, J. Weston, and W. Noble. Mismatch string kernels for svm protein classification. In Advances in Neural Information Processing Systems, NIPS, pages 1441–1448. MIT Press, 2003. 10 [20] C. Leslie and R. Kuang. Fast string kernels using inexact matching for protein sequences. Journal of Machine Learning Research, 5:1435–1455, 2004. [21] T. Li, M. Ogihara, and Q. Li. A comparative study on content-based music genre classification. In 26th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, ACM/SIGIR, pages 282–289. ACM, 2003. [22] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems, NIPS, pages 1177–1184, 2007. [23] A. Rahimi and B. Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Advances in Neural Information Processing Systems, NIPS, pages 1313–1320, 2008. [24] J. Shawe-Taylor and N. Cristianini. Kernel methods for pattern analysis. Cambridge university press, 2004. [25] S. Sonnenburg, G. Rätsch, and B. Schölkopf. Large scale genomic sequence svm classifiers. In 22nd International Conference on Machine Learning, ICML, pages 848–855. ACM, 2005. [26] G. Tzanetakis and P. Cook. Musical genre classification of audio signals. IEEE Transactions on Speech and Audio Processing, 10(5):293–302, 2002. [27] V. Vapnik. Statistical learning theory, volume 1. Wiley New York, 1998. [28] S. Vishwanathan and A. Smola. Fast kernels for string and tree matching. In Advances in Neural Information Processing Systems, NIPS, pages 585–592, 2002. [29] M. Waterman, J. Joyce, and M. Eggert. Computer alignment of sequences. Phylogenetic analysis of DNA sequences, pages 59–72. [30] C. Watkins. Dynamic alignment kernels. In Advances in Large Margin Classifiers, pages 39–50. MIT Press, 1999. [31] J. Weston, C. Leslie, E. Ie, D. Zhou, A. Elisseeff, and W. Noble. Semi-supervised protein classification using cluster kernels. Bioinformatics, 21(15):3241–3247, 2005. [32] J. Weston, C. Leslie, D. Zhou, A. Elisseeff, and W. Noble. Semi-supervised protein classification using cluster kernels. In Advances in Neural Information Processing Systems, NIPS, pages 595–602. MIT Press, 2004. [33] C. K. I. Williams and M. Seeger. Using the nyström method to speed up kernel machines. In Advances in Neural Information Processing Systems, NIPS, pages 661–667, 2000. [34] T. Yang, Y.-F. Li, M. Mahdavi, R. Jin, and Z.-H. Zhou. Nyström method vs random fourier features: A theoretical and empirical comparison. In Advances in Neural Information Processing Systems, NIPS, pages 476–484, 2012. 11 | 2017 | 572 |
7,088 | Multi-output Polynomial Networks and Factorization Machines Mathieu Blondel NTT Communication Science Laboratories Kyoto, Japan mathieu@mblondel.org Vlad Niculae∗ Cornell University Ithaca, NY vlad@cs.cornell.edu Takuma Otsuka NTT Communication Science Laboratories Kyoto, Japan otsuka.takuma@lab.ntt.co.jp Naonori Ueda NTT Communication Science Laboratories RIKEN Kyoto, Japan ueda.naonori@lab.ntt.co.jp Abstract Factorization machines and polynomial networks are supervised polynomial models based on an efficient low-rank decomposition. We extend these models to the multi-output setting, i.e., for learning vector-valued functions, with application to multi-class or multi-task problems. We cast this as the problem of learning a 3-way tensor whose slices share a common basis and propose a convex formulation of that problem. We then develop an efficient conditional gradient algorithm and prove its global convergence, despite the fact that it involves a non-convex basis selection step. On classification tasks, we show that our algorithm achieves excellent accuracy with much sparser models than existing methods. On recommendation system tasks, we show how to combine our algorithm with a reduction from ordinal regression to multi-output classification and show that the resulting algorithm outperforms simple baselines in terms of ranking accuracy. 1 Introduction Interactions between features play an important role in many classification and regression tasks. Classically, such interactions have been leveraged either explicitly, by mapping features to their products (as in polynomial regression), or implicitly, through the use of the kernel trick. While fast linear model solvers have been engineered for the explicit approach [9, 28], they are typically limited to small numbers of features or low-order feature interactions, due to the fact that the number of parameters that they need to learn scales as O(dt), where d is the number of features and t is the order of interactions considered. Models kernelized with the polynomial kernel do not suffer from this problem; however, the cost of storing and evaluating these models grows linearly with the number of training instances, a problem sometimes referred to as the curse of kernelization [30]. Factorization machines (FMs) [25] are a more recent approach that can use pairwise feature interactions efficiently even in very high-dimensional data. The key idea of FMs is to model the weights of feature interactions using a low-rank matrix. Not only this idea offers clear benefits in terms of model compression compared to the aforementioned approaches, it has also proved instrumental in modeling interactions between categorical variables, converted to binary features via a one-hot encoding. Such binary features are usually so sparse that many interactions are never observed in the ∗Work performed during an internship at NTT Commmunication Science Laboratories, Kyoto. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. training set, preventing classical approaches from capturing their relative importance. By imposing a low rank on the feature interaction weight matrix, FMs encourage shared parameters between interactions, allowing to estimate their weights even if they never occurred in the training set. This property has been used in recommender systems to model interactions between user variables and item variables, and is the basis of several industrial successes of FMs [32, 17]. Originally motivated as neural networks with a polynomial activation (instead of the classical sigmoidal or rectifier activations), polynomial networks (PNs) [20] have been shown to be intimately related to FMs and to only subtly differ in the non-linearity they use [5]. PNs achieve better performance than rectifier networks on pedestrian detection [20] and on dependency parsing [10], and outperform kernel approximations such as the Nyström method [5]. However, existing PN and FM works have been limited to single-output models, i.e., they are designed to learn scalar-valued functions, which restricts them to regression or binary classification problems. Our contributions. In this paper, we generalize FMs and PNs to multi-output models, i.e., for learning vector-valued functions, with application to multi-class or multi-task problems. 1) We cast learning multi-output FMs and PNs as learning a 3-way tensor, whose slices share a common basis (each slice corresponds to one output). To obtain a convex formulation of that problem, we propose to cast it as learning an infinite-dimensional but row-wise sparse matrix. This can be achieved by using group-sparsity inducing penalties. (§3) 2) To solve the obtained optimization problem, we develop a variant of the conditional gradient (a.k.a. Frank-Wolfe) algorithm [11, 15], which repeats the following two steps: i) select a new basis vector to add to the model and ii) refit the model over the current basis vectors. (§4) We prove the global convergence of this algorithm (Theorem 1), despite the fact that the basis selection step is non-convex and more challenging in the shared basis setting. (§5) 3) On multi-class classification tasks, we show that our algorithm achieves comparable accuracy to kernel SVMs but with much more compressed models than the Nyström method. On recommender system tasks, where kernelized models cannot be used (since they do not generalize to unseen user-item pairs), we demonstrate how our algorithm can be combined with a reduction from ordinal regression to multi-output classification and show that the resulting algorithm outperforms singleoutput PNs and FMs both in terms of root mean squared error (RMSE) and ranking accuracy, as measured by nDCG (normalized discounted cumulative gain) scores. (§6) 2 Background and related work Notation. We denote the set {1, . . . , m} by [m]. Given a vector v ∈Rk, we denote its elements by vr ∈R ∀r ∈[k]. Given a matrix V ∈Rk×m, we denote its rows by vr ∈Rm ∀r ∈[k] and its columns by v:,c ∀c ∈[m]. We denote the lp norm of V by ∥V ∥p := ∥vec(V )∥p and its lp/lq norm by ∥V ∥p,q := Pk r=1 ∥vr∥p q 1 p . The number of non-zero rows of V is denoted by ∥V ∥0,∞. Factorization machines (FMs). Given an input vector x ∈Rd, FMs predict a scalar output by ˆyFM := wTx + X i<j wi,jxixj, where w ∈Rd contains feature weights and W ∈Rd×d is a low-rank matrix that contains pairwise feature interaction weights. To obtain a low-rank W , [25] originally proposed to use a change of variable W = HTH, where H ∈Rk×d (with k ∈N+ a rank parameter) and to learn H instead. Noting that this quadratic model results in a non-convex problem in H, [4, 31] proposed to convexify the problem by learning W directly but to encourage low rank using a nuclear norm on W . For learning, [4] proposed a conditional gradient like approach with global convergence guarantees. Polynomial networks (PNs). PNs are a recently-proposed form of neural network where the usual activation function is replaced with a squared activation. Formally, PNs predict a scalar output by ˆyPN := wTx + vTσ(Hx) = wTx + k X r=1 vr σ(hT r x), where σ(a) = a2 (evaluated element-wise) is the squared activation, v ∈Rk is the output layer vector, H ∈Rk×d is the hidden layer matrix and k is the number of hidden units. Because the 2 v1,m + · · · + vk,m v1,1 + · · · + vk,1 W1 W2 . . . Wm h1 hT 1 hk hT k h1 hT 1 hk hT k d d m Figure 1: Our multi-output PNs / FMs learn a tensor whose slices share a common basis {hr}k r=1. r.h.s term can be rewritten as xTW x = Pd i,j=1 wi,jxixj if we set W = HT diag(v)H, we see that PNs are clearly a slight variation of FMs and that learning (v, H) can be recast as learning a low-rank matrix W . Based on this observation, [20] proposed to use GECO [26], a greedy algorithm for convex optimization with a low-rank constraint, similar to the conditional gradient algorithm. [13] proposed a learning algorithm for PNs with global optimality guarantees but their theory imposes non-negativity on the network parameters and they need one distinct hyper-parameter per hidden unit to avoid trivial models. Other low-rank polynomial models were recently introduced in [29, 23] but using a tensor network (a.k.a. tensor train) instead of the canonical polyadic (CP) decomposition. 3 A convex formulation of multi-output PNs and FMs In this section, we generalize PNs and FMs to multi-output problems. For the sake of concreteness, we focus on PNs for multi-class classification. The extension to FMs is straightforward and simply requires to replace σ(hTx) = (hTx)2 by σANOVA(h, x) := P i<j xihixjhj, as noted in [5]. The predictions of multi-class PNs can be naturally defined as ˆyMPN := argmaxc∈[m] wT c x+xTWcx, where m is the number of classes, wc ∈Rd and Wc ∈Rd×d is low-rank. Following [5], we can model the linear term directly in the quadratic term if we augment all data points with an extra feature of value 1, i.e., xT ←[1, xT]. We will therefore simply assume ˆyMPN = argmaxc∈[m] xTWcx henceforth. Our main proposal in this paper is to decompose W1, . . . , Wm using a shared basis: Wc = HT diag(v:,c)H = Pk r=1 vr,chrhT r ∀c ∈[m], (1) where, in neural network terminology, H ∈Rk×d can be interpreted as a hidden layer matrix and V ∈Rk×m as an output layer matrix. Compared to the naive approach of decomposing each Wc as Wc = HT c diag(v:,c)Hc, this reduces the number of parameters from m(dk + k) to dk + mk. While a nuclear norm could be used to promote a low rank on each Wc, similarly as in [4, 31], this is clearly not sufficient to impose a shared basis. A naive approach would be to use non-orthogonal joint diagonalization as a post-processing. However, because this is a non-convex problem for which no globally convergent algorithm is known [24], this would result in a loss of accuracy. Our key idea is to cast the problem of learning a multi-output PN as that of learning an infinite but row-wise sparse matrix. Without loss of generality, we assume that basis vectors (hidden units) lie in the unit ball. We therefore denote the set of basis vectors by H := {h ∈Rd : ∥h∥2 ≤1}. Let us denote this infinite matrix by U ∈R|H|×m (we use a discrete notation for simplicity). We can then write ˆyMPN = argmax c∈[m] o(x; U)c where o(x; U) := X h∈H σ(hTx)uh ∈Rm and uh ∈Rm denotes the weights of basis h across all classes (outputs). In this formulation, we have Wc = P h∈H uh,chhT and sharing a common basis (hidden units) amounts to encouraging the rows of U, uh, to be either dense or entirely sparse. This can be naturally achieved using group-sparsity inducing penalties. Intuitively, V in (1) can be thought as U restricted to its row support. Define the training set by X ∈Rn×d and y ∈[m]n. We then propose to solve the convex problem min Ω(U)≤τ F(U) := n X i=1 ℓ(yi, o(xi; U)) , (2) 3 Table 1: Sparsity-inducing penalties considered in this paper. With some abuse of notation, we denote by eh and ec standard basis vectors of dimension |H| and m, respectively. Selecting an optimal basis vector h⋆to add is a non-convex optimization problem. The constant ǫ ∈(0, 1) is the tolerance parameter used for the power method and ν is the multiplicative approximation we guarantee. Ω(U) Ω∗(G) ∆⋆∈τ · ∂Ω∗(G) Subproblem ν l1 (lasso) ∥U∥1 ∥G∥∞ τ sign(gh⋆,c⋆)eh⋆eT c⋆ h⋆, c⋆∈ argmax h∈H,c∈[m] |gh,c| 1 −ǫ l1/l2 (group lasso) ∥U∥1,2 ∥G∥∞,2 τeh⋆gT h⋆/∥gh⋆∥2 h⋆∈argmax h∈H ∥gh∥2 1−ǫ √m l1/l∞ ∥U∥1,∞ ∥G∥∞,1 τeh⋆sign(gh⋆)T h⋆∈argmax h∈H ∥gh∥1 1−ǫ m where ℓis a smooth and convex multi-class loss function (cf. Appendix A for three common examples), Ωis a sparsity-inducing penalty and τ > 0 is a hyper-parameter. In this paper, we focus on the l1 (lasso), l1/l2 (group lasso) and l1/l∞penalties for Ω, cf. Table 1. However, as we shall see, solving (2) is more challenging with the l1/l2 and l1/l∞penalties than with the l1 penalty. Although our formulation is based on an infinite view, we next show that U ⋆has finite row support. Proposition 1 Finite row support of U ⋆for multi-output PNs and FMs Let U ⋆be an optimal solution of (2), where Ωis one of the penalties in Table 1. Then, ∥U ⋆∥0,∞≤nm + 1. If Ω(·) = ∥· ∥1, we can tighten this bound to ∥U ⋆∥0,∞≤min(nm + 1, dm). Proof is in Appendix B.1. It is open whether we can tighten this result when Ω= ∥· ∥1,2 or ∥· ∥1,∞. 4 A conditional gradient algorithm with approximate basis vector selection At first glance, learning with an infinite number of basis vectors seems impossible. In this section, we show how the well-known conditional gradient algorithm [11, 15] combined with group-sparsity inducing penalties naturally leads to a greedy algorithm that selects and adds basis vectors that are useful across all outputs. On every iteration, the conditional gradient algorithm performs updates of the form U (t+1) = (1 −γ)U (t) + γ∆⋆, where γ ∈[0, 1] is a step size and ∆⋆is obtained by solving a linear approximation of the objective around the current iterate U (t): ∆⋆∈argmin Ω(∆)≤τ ⟨∆, ∇F(U (t))⟩= τ · argmax Ω(∆)≤1 ⟨∆, −∇F(U (t))⟩. (3) Let us denote the negative gradient −∇F(U) by G ∈R|H|×m for short. Its elements are defined by gh,c = − n X i=1 σ(hTxi)∇ℓ(yi, o(xi; U))c , where ∇ℓ(y, o) ∈Rm is the gradient of ℓw.r.t. o (cf. Appendix A). For ReLu activations, solving (3) is known to be NP-hard [1]. Here, we focus on quadratic activations, for which we will be able to provide approximation guarantees. Plugging the expression of σ, we get gh,c = −hTΓch where Γc := XTDcX (PN) or Γc := 1 2 XTDcX −Dc n X i=1 diag(xi)2 (FM) and Dc ∈Rn×n is a diagonal matrix such that (Dc)i,i := ∇ℓ(yi, o(xi; U))c. Let us recall the definition of the dual norm of Ω: Ω∗(G) := maxΩ(∆)≤1⟨∆, G⟩. By comparing this equation to (3), we see that ∆⋆is the argument that achieves the maximum in the dual norm Ω∗(G), up to a constant factor τ. It is easy to verify that any element in the subdifferential of Ω∗(G), which we denote by ∂Ω∗(G) ⊆R|H|×m, achieves that maximum, i.e., ∆⋆∈τ · ∂Ω∗(G). Basis selection. As shown in Table 1, elements of ∂Ω∗(G) (subgradients) are |H| × m matrices with a single non-zero row indexed by h⋆, where h⋆is an optimal basis (hidden unit) selected by h⋆∈argmax h∈H ∥gh∥p, (4) 4 and where p = ∞when Ω= ∥· ∥1, p = 2 when Ω= ∥.∥1,2 and p = 1 when Ω= ∥· ∥1,∞. We call (4) a basis vector selection criterion. Although this selection criterion was derived from the linearization of the objective, it is fairly natural: it chooses the basis vector with largest “violation”, as measured by the lp norm of the negative gradient row gh. Multiplicative approximations. The key challenge in solving (3) or equivalently (4) arises from the fact that G has infinitely many rows gh. We therefore cast basis vector selection as a continuous optimization problem w.r.t. h. Surprisingly, although the entire objective (2) is convex, (4) is not. Instead of the exact maximum, we will therefore only require to find a ˆ∆∈R|H|×m that satisfies Ω( ˆ∆) ≤τ and ⟨ˆ∆, G⟩≥ν⟨∆⋆, G⟩, where ν ∈(0, 1] is a multiplicative approximation (higher is better). It is easy to verify that this is equivalent to replacing the optimal h⋆by an approximate ˆh ∈H that satisfies ∥gˆh∥p ≥ν∥gh⋆∥p. Sparse case. When Ω(·) = ∥· ∥1, we need to solve max h∈H ∥gh∥∞= max h∈H max c∈[m] |hTΓch| = max c∈[m] max h∈H |hTΓch|. It is well known that the optimal solution of maxh∈H |hTΓch| is the dominant eigenvector of Γc. Therefore, we simply need to find the dominant eigenvector hc of each Γc and select ˆh as the hc with largest singular value |hT c Γchc|. Using the power method, we can find an hc that satisfies |hT c Γchc| ≥(1 −ǫ) max h∈H |hTΓch|, (5) for some tolerance parameter ǫ ∈(0, 1). The procedure takes O(Nc log(d)/ǫ) time, where Nc is the number of non-zero elements in Γc [26]. Taking the maximum w.r.t. c ∈[m] on both sides of (5) leads to ∥gˆh∥∞≥ν∥gh⋆∥∞, where ν = 1 −ǫ. However, using Ω= ∥· ∥1 does not encourage selecting an ˆh that is useful for all outputs. In fact, when Ω= ∥· ∥1, our approach is equivalent to imposing independent nuclear norms on W1, . . . , Wm. Group-sparse cases. When Ω(·) = ∥.∥1,2 or Ω(·) = ∥.∥1,∞, we need to solve max h∈H ∥gh∥2 2 = max h∈H f2(h) := m X c=1 (hTΓch)2 or max h∈H ∥gh∥1 = max h∈H f1(h) := m X c=1 |hTΓch|, respectively. Unlike the l1-constrained case, we are clearly selecting a basis vector with largest violation across all outputs. However, we are now faced with a more difficult non-convex optimization problem. Our strategy is to first choose an initialization h(0) which guarantees a certain multiplicative approximation ν, then refine the solution using a monotonically non-increasing iterative procedure. Initialization. We simply choose h(0) as the approximate solution of the Ω= ∥· ∥1 case, i.e., we have ∥gh(0)∥∞≥(1 −ǫ) max h∈H ∥gh∥∞. Now, using √m∥x∥∞≥∥x∥2 ≥∥x∥∞and m∥x∥∞≥∥x∥1 ≥∥x∥∞, this immediately implies ∥gh(0)∥p ≥ν max h∈H ∥gh∥p, with ν = 1−ǫ √m if p = 2 and ν = 1−ǫ m if p = 1. Refining the solution. We now apply another instance of the conditional gradient algorithm to solve the subproblem max∥h∥2≤1 fp(h) itself, leading to the following iterates: h(t+1) = (1 −ηt)h(t) + ηt ∇fp(h(t)) ∥∇fp(h(t))∥2 , (6) where ηt ∈[0, 1]. Following [3, Section 2.2.2], if we use the Armijo rule to select ηt, every limit point of the sequence {h(t)} is a stationary point of fp. In practice, we observe that ηt = 1 is almost always selected. Note that when ηt = 1 and m = 1 (i.e., single-output case), our refining algorithm recovers the power method. Generalized power methods were also studied for structured matrix factorization [16, 21], but with different objectives and constraints. Since the conditional gradient 5 Algorithm 1 Multi-output PN/FM training Input: X, y, k, τ H ←[ ], V ←[ ] for t := 1, . . . , k do Compute oi := Pt−1 r=1 σ(hT r xi)vr ∀i ∈[n] Let gh := [−hTΓ1h, . . . , −hTΓmh]T Find ˆh ≈argmaxh∈H ∥gh∥p Append ˆh to H and 0 to V V ←argmin Ω(V )≤τ Ft(V , H) Optional: V , H ← argmin Ω(V )≤τ hr∈H ∀r∈[t] Ft(V , H) end for Output: V , H (equivalent to U = Pk t=1 ehtvT t ) algorithm assumes a differentiable function, in the case p = 1, we replace the absolute function with the Huber function |x| ≈1 2x2 if |x| ≤1, |x| −1 2 otherwise. Corrective refitting step. After t iterations, U (t) contains at most t non-zero rows. We can therefore always store U (t) as V (t) ∈Rt×m (the output layer matrix) and H(t) ∈Rt×d (the basis vectors / hidden units added so far). In order to improve accuracy, on iteration t, we can then refit the objective Ft(V , H) := Pn i=1 ℓ yi, Pt r=1 σ(hT r xi)vr . We consider two kinds of corrective steps, a convex one that minimizes Ft(V , H(t)) w.r.t. V ∈Rt×m and an optional non-convex one that minimizes Ft(V , H) w.r.t. both V ∈Rt×m and H ∈Rt×d. Refitting allows to remove previously-added bad basis vectors, thanks to the use of sparsity-inducing penalties. Similar refitting procedures are commonly used in matching pursuit [22]. The entire procedure is summarized in Algorithm 1 and implementation details are given in Appendix D. 5 Analysis of Algorithm 1 The main difficulty in analyzing the convergence of Algorithm 1 stems from the fact that we cannot solve the basis vector selection subproblem globally when Ω= ∥· ∥1,2 or ∥· ∥1,∞. Therefore, we need to develop an analysis that can cope with the multiplicative approximation ν. Multiplicative approximations were also considered in [18] but the condition they require is too stringent (cf. Appendix B.2 for a detailed discussion). The next theorem guarantees the number of iterations needed to output a multi-output network that achieves as small objective value as an optimal solution of (2). Theorem 1 Convergence of Algorithm 1 Assume F is smooth with constant β. Let U (t) be the output after t iterations of Algorithm 1 run with constraint parameter τ ν . Then, F(U (t)) − min Ω(U)≤τF(U) ≤ǫ ∀t ≥8τ 2β ǫν2 −2. In [20], single-output PNs were trained using GECO [26], a greedy algorithm with similar O τ 2β ǫν2 guarantees. However, GECO is limited to learning infinite vectors (not matrices) and it does not constrain its iterates like we do. Hence GECO cannot remove bad basis vectors. The proof of Theorem 1 and a detailed comparison with GECO are given in Appendix B.2. Finally, we note that the infinite dimensional view is also key to convex neural networks [2, 1]. However, to our knowledge, we are the first to give an explicit multiplicative approximation guarantee for a non-linear multi-output network. 6 Experimental results 6.1 Experimental setup Datasets. For our multi-class experiments, we use four publicly-available datasets: segment (7 classes), vowel (11 classes), satimage (6 classes) and letter (26 classes) [12]. Quadratic models sub6 stantially improve over linear models on these datasets. For our recommendation system experiments, we use the MovieLens 100k and 1M datasets [14]. See Appendix E for complete details. Model validation. The greedy nature of Algorithm 1 allows us to easily interleave training with model validation. Concretely, we use an outer loop (embarrassingly parallel) for iterating over the range of possible regularization parameters, and an inner loop (Algorithm 1, sequential) for increasing the number of basis vectors. Throughout our experiments, we use 50% of the data for training, 25% for validation, and 25% for evaluation. Unless otherwise specified, we use a multi-class logistic loss. 6.2 Method comparison for the basis vector (hidden unit) selection subproblem 0.00 0.25 0.50 0.75 1.00 best data random init l1 init random init +refine l1 init + refine (proposed) satimage 0.00 0.25 0.50 0.75 1.00 vowel Figure 2: Empirically observed multiplicative approximation factor ˆν = f1(ˆh)/f1(h⋆). As we mentioned previously, the linearized subproblem (basis vector selection) for the l1/l2 and l1/l∞ constrained cases involves a significantly more challenging non-convex optimization problem. In this section, we compare different methods for obtaining an approximate solution ˆh to (4). We focus on the ℓ1/ℓ∞case, since we have a method for computing the true global solution h⋆, albeit with exponential complexity in m (cf. Appendix C). This allows us to report the empirically observed multiplicative approximation factor ˆν := f1(ˆh)/f1(h⋆). Compared methods. We compare l1 init + refine (proposed), random init + refine, l1 init (without refine), random init and best data: ˆh = xi⋆/∥xi⋆∥2 where i⋆= argmax i∈[n] f1(xi/∥xi∥2). Results. We report ˆν in Figure 2. l1 init + refine achieves nearly the global maximum on both datasets and outperforms random init + refine, showing the effectiveness of the proposed initialization and that the iterative update (6) can get stuck in a bad local minimum if initialized badly. On the other hand, l1 init + refine outperforms l1 init alone, showing the importance of iteratively refining the solution. Best data, a heuristic similar to that of approximate kernel SVMs [7], is not competitive. 6.3 Sparsity-inducing penalty comparison 0.86 0.88 0.90 0.92 0.94 letter 0 50 100 150 Max. hidden units 0.50 0.70 Test multi-class accuracy Figure 3: Penalty comparison. In this section, we compare the l1, l1/l2 and l1/l∞penalties for the choice of Ω, when varying the maximum number of basis vectors (hidden units). Figure 3 indicates test set accuracy when using output layer refitting. We also include linear logistic regression, kernel SVMs and the Nyström method as baselines. For the latter two, we use the quadratic kernel (xT i xj + 1)2. Hyper-parameters are chosen so as to maximize validation set accuracy. Results. On the vowel (11 classes) and letter (26 classes) datasets, l1/l2 and l1/l∞penalties outperform l1 norm starting from 20 and 75 hidden units, respectively. On satimage (6 classes) and segment (7 classes), we observed that the three penalties are mostly similar (not shown). We hypothesize that l1/l2 and l1/l∞penalties make a bigger difference when the number of classes is large. Multioutput PNs substantially outperform the Nyström method with comparable number of basis vectors (hidden units). Multi-output PNs reach the same test accuracy as kernel SVMs with very few basis vectors on vowel and satimage but appear to require at least 100 basis vectors to reach good performance on letter. This is not surprising, since kernel SVMs require 3,208 support vectors on letter, as indicated in Table 2 below. 6.4 Multi-class benchmark comparison Compared methods. We compare the proposed conditional gradient algorithm with output layer refitting only and with both output and hidden layer refitting; projected gradient descent (FISTA) 7 Table 2: Muli-class test accuracy and number of basis vectors / support vectors. segment vowel satimage letter Conditional gradient (full refitting, proposed) l1 96.71 (41) 87.83 (12) 89.80 (25) 92.29 (150) l1/l2 96.71 (40) 89.57 (15) 89.08 (18) 91.81 (106) l1/l∞ 96.71 (24) 86.96 (15) 88.99 (20) 92.35 (149) Conditional gradient (output-layer refitting, proposed) l1 97.05 (20) 80.00 (21) 89.71 (40) 91.01 (139) l1/l2 96.36 (21) 85.22 (15) 89.71 (50) 92.24 (150) l1/l∞ 96.19 (16) 86.96 (41) 89.35 (41) 91.68 (128) Projected gradient descent (random init) l1 96.88 (50) 79.13 (50) 89.53 (50) 88.45 (150) l1/l2 96.88 (50) 80.00 (48) 89.80 (50) 88.45 (150) l1/l∞ 96.71 (50) 83.48 (50) 89.08 (50) 88.45 (150) l2 2 96.88 (50) 81.74 (50) 89.98 (50) 88.45 (150) Baselines Linear 92.55 60.00 83.03 71.17 Kernelized 96.71 (238) 85.22 (189) 89.53 (688) 93.73 (3208) OvR PN 94.63 73.91 89.44 75.36 with random initialization; linear and kernelized models; one-vs-rest PNs (i.e., fit one PN per class). We focus on PNs rather than FMs since they are known to work better on classification tasks [5]. Results are included in Table 2. From these results, we can make the following observations and conclusions. When using output-layer refitting on vowel and letter (two datasets with more than 10 classes), group-sparsity inducing penalties lead to better test accuracy. This is to be expected, since these penalties select basis vectors that are useful across all classes. When using full hidden layer and output layer refitting, l1 catches up with l1/l2 and l1/l∞on the vowel and letter datasets. Intuitively, the basis vector selection becomes less important if we make more effort at every iteration by refitting the basis vectors themselves. However, on vowel, l1/l2 is still substantially better than l1 (89.57 vs. 87.83). Compared to projected gradient descent with random initialization, our algorithm (for both output and full refitting) is better on 3/4 (l1), 2/4 (l1/l2) and 3/4 (l1/l∞) of the datasets. In addition, with our algorithm, the best model (chosen against the validation set) is substantially sparser. Multi-output PNs substantially outperform OvR PNs. This is to be expected, since multi-output PNs learn to share basis vectors across different classes. 6.5 Recommender system experiments using ordinal regression A straightforward way to implement recommender systems consists in training a single-output model to regress ratings from one-hot encoded user and item indices [25]. Instead of a single-output PN or FM, we propose to use ordinal McRank, a reduction from ordinal regression to multi-output binary classification, which is known to achieve good nDCG (normalized discounted cumulative gain) scores [19]. This reduction involves training a probabilistic binary classifier for each of the m relevance levels (for instance, m = 5 in the MovieLens datasets). The expected relevance of x (e.g. the concatenation of the one-hot encoded user and item indices) is then computed by ˆy = m X c=1 c p(y = c | x) = m X c=1 c h p(y ≤c | x) −p(y ≤c −1 | x) i , where we use the convention p(y ≤0 | x) = 0. Thus, all we need to do to use ordinal McRank is to train a probabilistic binary classifier p(y ≤c | x) for all c ∈[m]. Our key proposal is to use a multi-output model to learn all m classifiers simultaneously, i.e., in a multi-task fashion. Let xi be a vector representing a user-item pair with corresponding rating yi, for 8 0 10 20 30 40 50 0.94 0.96 0.98 1.00 Movielens 100k RMSE 0 10 20 30 40 50 0.68 0.70 0.72 0.74 0.76 nDCG@1 0 10 20 30 40 50 0.73 0.74 0.75 0.76 0.77 nDCG@5 0 10 20 30 40 50 Max. hidden units 0.90 0.92 0.94 0.96 0.98 1.00 Movielens 1M 0 10 20 30 40 50 Max. hidden units 0.72 0.73 0.74 0.75 0.76 0 10 20 30 40 50 Max. hidden units 0.75 0.76 0.77 Single-output PN Single-output FM Ordinal McRank FM l1/l2 Ordinal McRank FM l1/l Figure 4: Recommender system experiment: RMSE (lower is better) and nDCG (higher is better). i ∈[n]. We form a n × m matrix Y such that yi,c = +1 if yi ≤c and −1 otherwise, and solve min Ω(U)≤τ n X i=1 m X c=1 ℓ yi,c, X h∈H σANOVA(h, xi)uh,c ! , where ℓis set to the binary logistic loss, in order to be able to produce probabilities. After running Algorithm 1 on that objective for k iterations, we obtain H ∈Rk×d and V ∈Rk×m. Because H is shared across all outputs, the only small overhead of using the ordinal McRank reduction, compared to a single-output regression model, therefore comes from learning V ∈Rk×m instead of v ∈Rk. In this experiment, we focus on multi-output factorization machines (FMs), since FMs usually work better than PNs for one-hot encoded data [5]. We show in Figure 4 the RMSE and nDCG (truncated at 1 and 5) achieved when varying k (the maximum number of basis vectors / hidden units). Results. When combined with the ordinal McRank reduction, we found that l1/l2 and l1/l∞– constrained multi-output FMs substantially outperform single-output FMs and PNs on both RMSE and nDCG measures. For instance, on MovieLens 100k and 1M, l1/l∞–constrained multi-output FMs achieve an nDCG@1 of 0.75 and 0.76, respectively, while single-output FMs only achieve 0.71 and 0.75. Similar trends are observed with nDCG@5. We believe that this reduction is more robust to ranking performance measures such as nDCG thanks to its modelling of the expected relevance. 7 Conclusion and future directions We defined the problem of learning multi-output PNs and FMs as that of learning a 3-way tensor whose slices share a common basis. To obtain a convex optimization objective, we reformulated that problem as that of learning an infinite but row-wise sparse matrix. To learn that matrix, we developed a conditional gradient algorithm with corrective refitting, and were able to provide convergence guarantees, despite the non-convexity of the basis vector (hidden unit) selection step. Although not considered in this paper, our algorithm and its analysis can be modified to make use of stochastic gradients. An open question remains whether a conditional gradient algorithm with provable guarantees can be developed for training deep polynomial networks or factorization machines. Such deep models could potentially represent high-degree polynomials with few basis vectors. However, this would require the introduction of a new functional analysis framework. 9 References [1] F. Bach. Breaking the curse of dimensionality with convex neural networks. JMLR, 2017. [2] Y. Bengio, N. Le Roux, P. Vincent, O. Delalleau, and P. Marcotte. Convex neural networks. In NIPS, 2005. [3] D. P. Bertsekas. Nonlinear programming. Athena Scientific Belmont, 1999. [4] M. Blondel, A. Fujino, and N. Ueda. Convex factorization machines. In ECML/PKDD, 2015. [5] M. Blondel, M. Ishihata, A. Fujino, and N. Ueda. Polynomial networks and factorization machines: New insights and efficient training algorithms. In ICML, 2016. [6] M. Blondel, K. Seki, and K. Uehara. Block coordinate descent algorithms for large-scale sparse multiclass classification. Machine Learning, 93(1):31–52, 2013. [7] A. Bordes, S. Ertekin, J. Weston, and L. Bottou. Fast kernel classifiers with online and active learning. JMLR, 6(Sep):1579–1619, 2005. [8] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12(6):805–849, 2012. [9] Y.-W. Chang, C.-J. Hsieh, K.-W. Chang, M. Ringgaard, and C.-J. Lin. Training and testing low-degree polynomial data mappings via linear svm. Journal of Machine Learning Research, 11:1471–1490, 2010. [10] D. Chen and C. D. Manning. A fast and accurate dependency parser using neural networks. In EMNLP, 2014. [11] J. C. Dunn and S. A. Harshbarger. Conditional gradient algorithms with open loop step size rules. Journal of Mathematical Analysis and Applications, 62(2):432–444, 1978. [12] R.-E. Fan and C.-J. Lin. http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/ datasets/, 2011. [13] A. Gautier, Q. N. Nguyen, and M. Hein. Globally optimal training of generalized polynomial neural networks with nonlinear spectral methods. In NIPS, 2016. [14] GroupLens. http://grouplens.org/datasets/movielens/, 1998. [15] M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In ICML, 2013. [16] M. Journée, Y. Nesterov, P. Richtárik, and R. Sepulchre. Generalized power method for sparse principal component analysis. Journal of Machine Learning Research, 11:517–553, 2010. [17] Y. Juan, Y. Zhuang, W.-S. Chin, and C.-J. Lin. Field-aware factorization machines for CTR prediction. In ACM Recsys, 2016. [18] S. Lacoste-Julien, M. Jaggi, M. Schmidt, and P. Pletscher. Block-coordinate Frank-Wolfe optimization for structural SVMs. In ICML, 2012. [19] P. Li, C. J. Burges, and Q. Wu. McRank: Learning to rank using multiple classification and gradient boosting. In NIPS, 2007. [20] R. Livni, S. Shalev-Shwartz, and O. Shamir. On the computational efficiency of training neural networks. In NIPS, 2014. [21] R. Luss and M. Teboulle. Conditional gradient algorithms for rank-one matrix approximations with a sparsity constraint. SIAM Review, 55(1):65–98, 2013. [22] S. G. Mallat and Z. Zhang. Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing, 41(12):3397–3415, 1993. [23] A. Novikov, M. Trofimov, and I. Oseledets. Exponential machines. arXiv preprint arXiv:1605.03795, 2016. 10 [24] A. Podosinnikova, F. Bach, and S. Lacoste-Julien. Beyond CCA: Moment matching for multiview models. In ICML, 2016. [25] S. Rendle. Factorization machines. In ICDM, 2010. [26] S. Shalev-Shwartz, A. Gonen, and O. Shamir. Large-scale convex minimization with a low-rank constraint. In ICML, 2011. [27] S. Shalev-Shwartz, Y. Wexler, and A. Shashua. ShareBoost: Efficient multiclass learning with feature sharing. In NIPS, 2011. [28] S. Sonnenburg and V. Franc. Coffin: A computational framework for linear SVMs. In ICML, 2010. [29] E. Stoudenmire and D. J. Schwab. Supervised learning with tensor networks. In NIPS, 2016. [30] Z. Wang, K. Crammer, and S. Vucetic. Multi-class Pegasos on a budget. In ICML, 2010. [31] M. Yamada, W. Lian, A. Goyal, J. Chen, K. Wimalawarne, S. A. Khan, S. Kaski, H. M. Mamitsuka, and Y. Chang. Convex factorization machine for toxicogenomics prediction. In KDD, 2017. [32] E. Zhong, Y. Shi, N. Liu, and S. Rajan. Scaling factorization machines with parameter server. In CIKM, 2016. 11 | 2017 | 573 |
7,089 | Tractability in Structured Probability Spaces Arthur Choi University of California Los Angeles, CA 90095 aychoi@cs.ucla.edu Yujia Shen University of California Los Angeles, CA 90095 yujias@cs.ucla.edu Adnan Darwiche University of California Los Angeles, CA 90095 darwiche@cs.ucla.edu Abstract Recently, the Probabilistic Sentential Decision Diagram (PSDD) has been proposed as a framework for systematically inducing and learning distributions over structured objects, including combinatorial objects such as permutations and rankings, paths and matchings on a graph, etc. In this paper, we study the scalability of such models in the context of representing and learning distributions over routes on a map. In particular, we introduce the notion of a hierarchical route distribution and show how they can be leveraged to construct tractable PSDDs over route distributions, allowing them to scale to larger maps. We illustrate the utility of our model empirically, in a route prediction task, showing how accuracy can be increased significantly compared to Markov models. 1 Introduction A structured probability space is one where members of the space correspond to structured or combinatorial objects, such as permutations, partial rankings, or routes on a map [Choi et al., 2015, 2016]. Structured spaces have come into focus recently, given their large number of applications and the lack of systematic methods for inducing and learning distributions over such spaces. Some structured objects are supported by specialized distributions, e.g., the Mallows distribution over permutations [Mallows, 1957, Lu and Boutilier, 2011]. For other types of objects, one is basically on their own as far developing representations and corresponding algorithms for inference and learning. Standard techniques, such as probabilistic graphical models, are not suitable for these kind of distributions since the constraints on such objects often lead to almost fully connected graphical models, which are not amenable to inference or learning. A framework known as PSDD was proposed recently for systematically inducing and learning distributions over structured objects [Kisa et al., 2014a,b, Shen et al., 2016, Liang et al., 2017]. According to this framework, one first describes members of the space using propositional logic, then compiles these descriptions into Boolean circuits with specific properties (a circuit encodes a structured space by evaluating to 1 precisely on inputs corresponding to members of the space). By parameterizing these Boolean circuits, one can induce a tractable distribution over objects in the structured space. The only domain specific investment in this framework corresponds to the encoding of objects using propositional logic. Moreover, the only computational bottleneck in this framework is the compilation of propositional logic descriptions to circuits with specific properties, which are known as SDD circuits (for Sentential Decision Diagrams) [Darwiche, 2011, Xue et al., 2012]. Parameterized SDD circuits are known as a PSDDs (for Probabilistic SDDs) and have attractive properties, including tractable inference and closed-form parameter estimation under complete data [Kisa et al., 2014a]. Most of the focus on PSDDs has been dedicated to showing how they can systematically induce and learn distributions over various structured objects. Case studies have been reported relating to total and partial rankings [Choi et al., 2015], game traces, and routes on a map [Choi et al., 2016]. The scalability of these studies varied. For partial rankings, experiments have been reported for hundreds 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. A B C Pr 0 0 0 0.2 0 0 1 0.2 0 1 0 0.0 0 1 1 0.1 1 0 0 0.0 1 0 1 0.3 1 1 0 0.1 1 1 1 0.1 (a) Distribution A B ¬A¬B A ¬B¬A B 1 1 4 C ¬C C 3 (b) SDD A B ¬A¬B A ¬B¬A B 1 .33 .67 1 .75 .25 4 C ¬C .5 .5 C 3 .6 .4 (c) PSDD A B C 3 1 0 2 4 (d) Vtree Figure 1: A probability distribution and its SDD/PSDD representation. The numbers annotating or-gates in (b) & (c) correspond to vtree node IDs in (d). While the circuit appears to be a tree, the input variables are shared and hence the circuit is not a tree. of items. However, for total rankings and routes, the experimental studies were more of a proof of concept, showing for example how the learned PSDD distributions can be superior to ones learned used specialized or baseline methods [Choi et al., 2015]. In this paper, we study a particular structured space, while focusing on computational considerations. The space we consider is that of routes on a map, leading to what we call route distributions. These distributions are of great practical importance as they can be used to estimate traffic jams, predict specific routes, and even project the impact of interventions, such as closing certain routes on a map. The main contribution on this front is the notion of hierarchical simple-route distributions, which correspond to a hierarchical map representation that forces routes to be simple (no loops) at different levels of the hierarchy. We show in particular how this advance leads to the notion of hierarchical PSDDs, allowing one to control the size of component PSDDs by introducing more levels of the hierarchy. This guarantees a representation of polynomial size, but at the expense of losing exactness on some route queries. Not only does this advance the state-of-the-art for learning distributions over routes, but it also suggests a technique that can potentially be applied in other contexts as well. This paper is structured as follows. In Section 2, we review SDD circuits and PSDDs, and in Section 3 we turn to routes as a structured space and their corresponding distributions. Hierarchical distributions are treated in Section 4, with complexity and correctness guarantees. In Section 5, we discuss new techniques for encoding and compiling a PSDD in a hierarchy. We present empirical results in Section 6, and finally conclude with some remarks in Section 7. 2 Probabilistic SDDs PSDDs are a class of tractable probabilistic models, which were originally motivated by the need to represent probability distributions Pr(X) with many instantiations x attaining zero probability, i.e., a structured space [Kisa et al., 2014a, Choi et al., 2015, 2016]. Consider the distribution Pr(X) in Figure 1(a) for an example. To construct a PSDD for such a distribution, we perform the two following steps. We first construct a special Boolean circuit that captures the zero entries in the following sense; see Figure 1(b). For each instantiation x, the circuit evaluates to 0 at instantiation x iff Pr(x) = 0. We then parameterize this Boolean circuit by including a local distribution on the inputs of each or-gate; see Figure 1(c). Such parameters are often learned from data. The Boolean circuit underlying a PSDD is known as a Sentential Decision Diagram (SDD) [Darwiche, 2011]. These circuits satisfy specific syntactic and semantic properties based on a binary tree, called a vtree, whose leaves correspond to variables; see Figure 1(d). SDD circuits alternate between or-gates and and-gates. Their and-gates have two inputs each and satisfy a property called decomposability: each input depends on a different set of variables. The or-gates satisfy a property called determinism: at most one input will be high under any circuit input. The role of the vtree is (roughly) to determine which variables will appear as inputs for gates. 2 s t s t Figure 2: Two paths connecting s and t in a graph. A PSDD is obtained by including a distribution α1, . . . , αn on the inputs of each or-gate; see again Figure 1(c). The semantics of PSDDs are given in [Kisa et al., 2014a].1 The PSDD is a complete and canonical representation of probability distributions. That is, PSDDs can represent any distribution, and there is a unique PSDD for that distribution (under some conditions). A variety of probabilistic queries are tractable on PSDDs, including that of computing the probability of a partial variable instantiation and the most likely instantiation. Moreover, the maximum likelihood parameter estimates of a PSDD are unique given complete data, and these parameters can be computed efficiently using closed-form estimates; see [Kisa et al., 2014a] for details. Finally, PSDDs have been used to learn distributions over combinatorial objects, including rankings and permutations [Choi et al., 2015], as well as paths and games [Choi et al., 2016]. In these applications, the Boolean circuit underlying a PSDD captures variable instantiations that correspond to combinatorial objects, while its parameterization induces a distribution over these objects. As a concrete example, PSDDs were used to induce distributions over the permutations of n items as follows. We have a variable Xij for each i, j ∈{1, . . . , n} denoting that item i is at position j in the permutation. Clearly, not all instantiations of these variables correspond to (valid) permutations. An SDD circuit is then constructed, which outputs 1 iff the corresponding input corresponds to a valid permutation. Each parameterization of this SDD circuit leads to a distribution on permutations and these parameterizations can be learned from data; see Choi et al. [2015]. 3 Route Distributions We consider now the structured space of simple routes on a map, which correspond to connected and loop-free paths on a graph. Our ultimate goal here is to learn distributions over simple routes and use them for reasoning about traffic, but we first discuss how to represent such distributions. Consider a map in the form of an undirected graph G and let X be a set of binary variables, which are in one-to-one correspondence with the edges of graph G. For example, the graph in Figure 2 will lead to 12 binary variables, one for each edge in the graph. A variable instantiation x will then be interpreted as a set of edges in graph G. In particular, instantiation x includes edge e iff the edge variable is set to true in instantiation x. As such, some of the instantiations x will correspond to routes in G and others will not.2 In Figure 2, the left route corresponds to a variable instantiation in which 4 variables are set to true, while all other 8 variables are set to false. Let αG be a Boolean formula obtained by disjoining all instantiations x that correspond to routes in graph G. A probability distribution Pr(X) is called a route distribution iff it assigns a zero probability to every instantiation x that does not correspond to a route, i.e., Pr(x) = 0 if x ̸|= αG. One can systematically induce a route distribution over graph G by simply compiling the Boolean formula αG into an SDD, and then parameterizing the SDD to obtain a PSDD. This approach was actually proposed in Choi et al. [2016], where empirical results were shown for routes on grids of size at most 8 nodes by 8 nodes. Let us now turn to simple routes, which are routes that do not contain loops. The path on the left of Figure 2 is simple, while the one on the right is not simple. Among the instantiations x corresponding to routes, some are simple routes and others are not. Let βG be a Boolean formula obtained by disjoining all instantiations x that correspond to simple routes. We then have βG |= αG. 1Let x be an instantiation of PSDD variables. If the SDD circuit outputs 0 at input x, then Pr(x) = 0. Otherwise, traverse the circuit top-down, visiting the (unique) high input of each visited or-node, and all inputs of each visited and-node. Then Pr(x) is the product of parameters visited during the traversal process. 2An instantiation x corresponds to a route iff the edges it mentions positively can be ordered as a sequence (n1, n2), (n2, n3), (n3, n4), . . . , (nk−1, nk). 3 s t a b = t a b W t a b Figure 3: The set of all s-t paths corresponds to concatenating edge (s, a) with all a-t paths and concatenating edge (s, b) with all b-t paths. Figure 4: Partitioning a map into three regions (intersections are nodes of the graph and roads between intersections are edges of the graph). Regions have black boundaries. Red edges cross regions and blue edges are contained within a region. A simple-route distribution Pr(X) is a distribution such that Pr(x) = 0 if x ̸|= βG. Clearly, simpleroute distributions are a subclass of route distributions. One can also systematically represent and learn simple-route distributions using PSDDs. In this case, one must compile the Boolean formula βG into an SDD whose parameters are then learned from data. Figure 3 shows one way to encode this Boolean formula (recursively), as discussed in Choi et al. [2016]. More efficient approaches are known, based on Knuth’s Simpath algorithm [Knuth, 2009, Minato, 2013, Nishino et al., 2017]. To give a sense of current scalability when compiling simple-routes into SDD circuits, Nishino et al. [2017] reported results on graphs with as many as 100 nodes and 140 edges for a single source and destination pair. To put these results in perspective, we point out that we are not aware of how one may obtain similar results using standard probabilistic graphical model—for example, a Bayesian or a Markov network. Imposing complex constraints, such as the simple-route constraint, typically lead to highly-connected networks with high treewidths.3 While PSDD scalability is favorable in this case—when compared to probabilistic graphical models— our goal is to handle problems that are significantly larger in scale. The classical direction for achieving this goal is to advance current circuit compilation technology, which would allow us to compile propositional logic descriptions that cannot be compiled today. We next propose an alternative, yet a complementary direction, which is based on the notion of hierarchical maps and the corresponding notion of hierarchical distributions. 4 Hierarchical Route Distributions A route distribution can be represented hierarchically if one imposes a hierarchy on the underlying map, leading to a representation that is polynomial in size if one includes enough levels in the hierarchy. Under some conditions which we discuss later, the hierarchical representation can also support inference in time polynomial in its size. The penalty incurred due to this hierarchical representation is a loss of exactness on some queries, which can be controlled as we discuss later. 3If we can represent a uniform distribution of simple routes on a map, then we can count the number of simple paths on a graph, which is a #P-complete problem [Valiant, 1979]. Hence, we do not in general expect a Bayesian or Markov network for such a distribution to have bounded treewidth. 4 We start by discussing hierarchical maps, where a map is represented by a graph G as discussed earlier. Let N1, . . . , Nm be a partitioning of the nodes in graph G and let us call each Ni a region. These regions partition edges X into B, A1, . . . , Am, where B are edges that cross regions and Ai are edges inside region Ni. Consider the following decomposition for distributions over routes: Pr(x) = Pr(b) m Y i=1 Pr(ai | bi). (1) We refer to such a distribution as a decomposable route distribution.4 Here, Bi are edges that cross out of region Ni, and b, ai and bi are partial instantiations that are compatible with instantiation x. To discuss the main insight behind this hierarchical representation, we need to first define a graph GB that is obtained from G by aggregating each region Ni into a single node. We also need to define subgraphs Gbi, obtained from G by keeping only edges Ai and the edges set positively in instantiation bi (the positive edges of bi denote the edges used to enter and exit the region Ni). Hence, graph GB is an abstraction of graph G, while each graph Gbi is a subset of G. Moreover, one can think of each subgraph Gbi as a local map (for region i) together with a particular set of edges that connects it to other regions. We can now state the following key observations. The distribution Pr(B) is a route distribution for the aggregated graph GB. Moreover, each distribution Pr(Ai | bi) is a distribution over (sets of) routes for subgraph Gbi (in general, we may enter and exit a region multiple times). Hence, we are able to represent the route distribution Pr(X) using a set of smaller route distributions. One of these distributions Pr(B) captures routes across regions. The others, Pr(Ai | bi), capture routes that are within a region. The count of these smaller distributions is 1 + Pm i=1 2|Bi|, which is exponential in the size of variable sets B1, . . . , Bn. We will later see that this count can be polynomial for some simple-route distributions. We used αG to represent the instantiations corresponding to routes, and βG to represent the instantiations corresponding to simple routes, with βG |= αG. Some of these simple routes are also simple with respect to the aggregated graph GB (i.e., they will not visit a region Ni more than once), while other simple routes are not simple with respect to graph GB. Let γG be the Boolean expression obtained by disjoining instantiations x that correspond to simple routes that are also simple (and non-empty) with respect to graph GB.5 We then have γG |= βG |= αG and the following result. Theorem 1 Consider graphs G, GB and Gbi as indicated above. Let Pr(B) be a simple-route distribution for graph GB, and Pr(Ai | bi) be a simple-route distribution for graph Gbi. Then the resulting distribution Pr(X), as defined by Equation 1, is a simple-route distribution for graph G. This theorem will not hold if Pr(B) were not a simple-route distribution for graph GB. That is, having each distribution Pr(Ai | bi) be a simple-route distribution for graph Gbi is not sufficient for the hierarchical distribution to be a simple-route distribution for G. Hierarchical distributions that satisfy the conditions of Theorem 1 will be called hierarchical simpleroute distributions. Theorem 2 Let Pr(X) be a hierarchical simple-route distribution for graph G and let γG be as indicated above. We then have Pr(x) = 0 if x ̸|= γG. This means that the distribution will assign a zero probability to all instantiations x |= βG ∧¬γG. These instantiations correspond to routes that are simple for graph G but not simple for graph GB. Hence, simple-route hierarchical distributions correspond to a subclass of the simple-route distributions for graph G. This subclass, however, is interesting for the following reason. Theorem 3 Consider a hierarchical simple-route distribution Pr(X) and let x be an instantiation that sets more than two variables in some Bi to true. Then Pr(x) = 0. 4Note that not all route distributions can be decomposed as such: the decomposition implies the independence of routes on edges Ai given the route on edges B. 5For most practical cases, the independence assumption of the hierarchical decomposition will dictate that routes on GB be non-empty. An empty route on GB corresponds to a route contained within a single region, which we can accommodate using a route distribution for the single region. 5 Basically, a route that is simple for graph GB cannot enter and leave a region more than once. Corollary 1 The hierarchical simple-route distribution Pr(X) can be constructed from distribution Pr(B) and distributions Pr(Ai | bi) for which bi sets no more than two variables to true. Corollary 2 The hierarchical simple-route distribution Pr(X) can be represented by a data structure whose size is O(2|B| + Pm i=1 2|Ai||Bi|2). If we choose our regions Ni to be small enough, then 2|Ai| can be treated as a constant. A tabular representation of the simple-route distribution Pr(B) has size O(2|B|). If representing this table is practical, then inference is also tractable (via variable elimination). However, this distribution can itself be represented by a simple-route hierarchical distribution. This process can continue until we reach a simple-route distribution that admits an efficient representation. We can therefore obtain a final representation which is polynomial in the number of variables X and, hence, polynomial in the size of graph G (however, inference may no longer be tractable). In our approach, we represent the distributions Pr(B) and Pr(Ai | bi) using PSDDs. This allows these distributions to be over a relatively large number of variables (on the order of hundreds), which would not be feasible if we used more classical representations, such as graphical models. This hierarchical representation, which is both small and admits polytime inference, is an approximation as shown by the following theorem. Theorem 4 Consider a decomposable route distribution Pr(X) (as in Equation 1), the corresponding hierarchical simple-route distribution Pr(X | γG), and a query α over variables X. The error of the query Pr(α | γG), relative to Pr(α), is: Pr(α | γG) −Pr(α) Pr(α | γG) = Pr(κG) 1 −Pr(α | κG) Pr(α | γG) where κG = βG ∧¬γG denotes simple-routes in G that are not simple routes in GB. The conditions of this theorem basically require the two distributions to agree on the relative probabilities of simple routes that are also simple in GB. Note also that Pr(γG) + Pr(κG) = 1. Hence, if Pr(γG) ≈1, then we expect the hierarchical distribution to be accurate. This happens when most simple routes are also simple in GB, a condition that may be met by a careful choice of map regions.6 At one extreme, if each region has at most two edges crossing out of it, then Pr(γG) = 1 and the hierarchical distribution is exact. Hierarchical simple-route distributions will assign a zero probability to routes x that are simple in G but not in GB. However, for a mild condition on the hierarchy, we can guarantee that if there is a simple route between nodes s and t in G, there is also a simple route that is simple for GB. Proposition 1 If the subgraphs Gbi are connected, then there is a simple route connecting s and t in G iff there is a simple route connecting s and t in G that is also a simple route for GB. Under this condition, hierarchical simple-route distributions will provide an approximation for any source/destination query. One can compute marginal and MAP queries in polytime on a hierarchical distribution, assuming that one can (in polytime) multiply and sum-out variables from its component distributions—we basically need to sum-out variables Bi from each Pr(Ai|bi), then multiply the results with Pr(B). In our experiments, however, we follow a more direct approach to inference, in which we multiply all component distributions (PSDDs), to yield one PSDD for the hierarchical distribution. This is not always guaranteed to be efficient, but leads to a much simpler implementation. 5 Encoding and Compiling Routes Recall that constructing a PSDD involves two steps: constructing an SDD that represents the structured space, and then parameterizing the SDD. In this section, we discuss how to construct 6If α is independent of γG (and hence α is independent of κG), then the approximation is also exact. At this point, however, we do not know of an intuitive characterization of queries α that satisfy this property. 6 Figure 5: Partitioning of the area around the Financial District of San Francisco, into regions. an SDD that represents the structured space of hierarchical, simple routes. Subsequently, in our experiments, we shall learn the parameters of the PSDD from data. We first consider the space of simple routes that are not necessarily hierarchical. Note here that an SDD of a Boolean formula can be constructed bottom-up, starting with elementary SDDs representing literals and constants, and then constructing more complex SDDs from them using conjoin, disjoin, and negation operators implemented by an SDD library. This approach can be used to construct an SDD that encodes simple routes, using the idea from Figure 3, which is discussed in more detail in Choi et al. [2016]. The GRAPHILLION library can be used to construct a Zero-suppressed Decision Diagram (ZDD) representing all simple routes for a given source/destination pair [Inoue et al., 2014]. The ZDDs can then be disjoined across all source and destination pairs, and then converted to an SDD. An even more efficient algorithm was proposed recently for compiling simple routes to ZSDDs, which we used in our experiments [Nishino et al., 2016, 2017]. Consider now the space of hierarchical simple routes induced by regions N1, . . . , Nm of graph G, with a corresponding partition of edges into B, A1, . . . , Am, as discussed earlier. To compile an SDD for the hierarchical, simple routes of G, we first compile an SDD representing the simple routes over each region. That is, for each region Ni, we take the graph induced by the edges Ai and Bi, and compile an SDD representing all its simple routes (as described above). Similarly, we compile an SDD representing the simple routes of the abstracted graph GB. At this point, we have a hierarchical, simple-route distribution in which components are represented as PSDDs and that we can do inference on using multiplication and summing-out as discussed earlier. In our experiments, however, we take the extra step of multiplying all the m + 1 component PSDDs, to yield a single PSDD over the structured space of hierarchical, simple routes. This simplifies inference and learning as we can now use the linear-time inference and learning procedures known for PSDDs [Kisa et al., 2014a].7 6 Experimental Results In our experiments, we considered a dataset consisting of GPS data collected from taxicab routes in San Francisco.8 We acquired public map data from http://www.openstreetmap.org/, i.e., the undirected graph representing the streets (edges) and intersections (nodes) of San Francisco. We projected the GPS data onto the San Francisco graph using the map-matching API of the graphhopper package.9 For more on map-matching, see, e.g., [Froehlich and Krumm, 2008]. 7In our experiments, we use an additional simplification. Recall from Footnote 5 that if bi sets all variables negatively (i.e., no edges), then Gbi is empty. We now allow the case that Gbi contains all edges Ai (by disjoing the corresponding SDDs). Intuitively, this optionally allows a simple path to exist strictly in region Ri. While the global SDD no longer strictly represents hierarchical simple paths (it may allow sets of independent simple paths at once), we do not have to treat simple paths that are confined to a single region as a special case. 8Available at http://crawdad.org/epfl/mobility/20090224/. 9Available at https://www.graphhopper.com. 7 To partition the graph of San Francisco into regions, we obtained a publicly available dataset of traffic analysis zones, produced by the California Metropolitan Transportation Commission.10 These zones correspond to small area neighborhoods and communities of the San Francisco Bay Area. To facilitate the compilation of regions into SDDs, we further split these zones in half until each region was compilable (horizontally if the region was taller than it was wide, or vertically otherwise). Finally, we restricted our attention to areas around the Financial District of San Francisco, which we were able to compile into a hierarchical distribution using one level of abstraction; see Figure 5. Given the routes over the graph of San Francisco, we first filtered out any routes that did not correspond to a simple path on the San Francisco graph. We next took all routes that were contained solely in the region under consideration. We further took any sub-route that passed through this region, as a route for our region. In total, we were left with 87,032 simple routes. We used half for training, and the other half for testing. For the training set, we also removed all simple routes that were not simple in the hierarchy. We did not remove such routes for the purposes of testing. We first compiled an SDD of hierarchical simple-routes over the region, leading to an SDD with 62,933 nodes, and 152,140 free parameters. We then learned the parameters of our PSDD from the training set, assuming Laplace smoothing [Kisa et al., 2014a]. We considered a route prediction task where we predict the next road segment, given the route taken so far; see, e.g., [Letchner et al., 2006, Simmons et al., 2006, Krumm, 2008]. That is, for each route of the testing set, we consider one edge at a time and try to predict the next edge, given the edges observed so far. We consider three approaches: (1) a naive baseline that uses the relative frequency of edges to predict the next edge, while discounting the last-used edge, (2) a Markov model that predicts, given the last-used edge, what edge would be the most likely one to be traversed next, (3) a PSDD given the current partial route as well as the destination. The last assumption is often the situation in reality, given the ubiquity of GPS routing applications on mobile phones. We remark that Markov models and HMMs are less amenable to accepting a destination as an observation. For the PSDD, the current partial route and the last edge to be used (i.e., the destination) are given as evidence e. The evidence for an endpoint (source or destination) is the edge used (set positively), where the remaining edges are assumed to be unused (and set negatively). For internal nodes on a route, two edges (entering and exiting a node) are set positively and the remaining edges are set negatively in the evidence. To predict the next edge on a partial route, we consider the edges X incident to the current node and compute their marginal probabilities Pr(X | e) according to the PSDD. The probability of the last edge used in the partial route is 1, which we ignore. The remaining edges have a probability that sums to a value less than one; one minus this probability is the probability that the route ends at the current node. Among all these options, we pick the most likely as our prediction (either navigate to a new edge, or stop). Note that for the purposes of training our PSDD, we removed those simple routes that were not simple on the hierarchy. When testing, such routes have a probability of zero on our PSDD. Moreover, partial routes may also have zero probability, if they cannot be extended to a hierarchical simple-route. In this case, we cannot compute the marginals Pr(X | e). Hence, we simply unset our evidence, one edge at a time in the order that we set them (first unsetting negative edges before positive edges), until the evidence becomes consistent again, relative to the PSDD. We summarize the relative accuracies over 43,516 total testing routes: model naive Markov PSDD accuracy 0.736 (326,388/443,481) 0.820 (363,536/443,481) 0.931 (412,958/443,481) For each model, we report the accuracy averaged over all steps on all paths, ignoring those steps where the prediction is trivial (i.e., there is only one edge or no edge available to be used next). We find that the PSDD is much more accurate at predicting the next road segment, compared to the Markov model and the naive baseline. Indeed, this could be expected as (1) the PSDD uses the history of the route so far, and perhaps more importantly, (2) it utilizes knowledge of the destination. 10Available at https://purl.stanford.edu/fv911pc4805. 8 7 Conclusion In this paper, we considered Probabilistic Sentential Decision Diagrams (PSDDs) representing distributions over routes on a map, or equivalently, simple paths on a graph. We considered a hierarchical approximation of simple-route distributions, and examined its relative tractability and its accuracy. We showed how this perspective can be leveraged to represent and learn more scalable PSDDs for simple-route distributions. In a route prediction task, we showed that PSDDs can take advantage of the available observations, such as the route taken so far and the destination of a trip, to make more accurate predictions. Acknowledgments We greatly thank Noah Hadfield-Menell and Andy Shih for their contributions, and Eunice Chen for helpful discussions. This work has been partially supported by NSF grant #IIS-1514253, ONR grant #N00014-15-1-2339 and DARPA XAI grant #N66001-17-2-4032. References A. Choi, G. Van den Broeck, and A. Darwiche. Tractable learning for structured probability spaces: A case study in learning preference distributions. In Proceedings of IJCAI, 2015. A. Choi, N. Tavabi, and A. Darwiche. Structured features in naive Bayes classification. In Proceedings of the 30th AAAI Conference on Artificial Intelligence (AAAI), 2016. A. Darwiche. SDD: A new canonical representation of propositional knowledge bases. In Proceedings of IJCAI, pages 819–826, 2011. J. Froehlich and J. Krumm. Route prediction from trip observations. Technical report, SAE Technical Paper, 2008. T. Inoue, H. Iwashita, J. Kawahara, and S.-i. Minato. Graphillion: software library for very large sets of labeled graphs. International Journal on Software Tools for Technology Transfer, pages 1–10, 2014. D. Kisa, G. Van den Broeck, A. Choi, and A. Darwiche. Probabilistic sentential decision diagrams. In KR, 2014a. D. Kisa, G. Van den Broeck, A. Choi, and A. Darwiche. Probabilistic sentential decision diagrams: Learning with massive logical constraints. In ICML Workshop on Learning Tractable Probabilistic Models (LTPM), 2014b. D. E. Knuth. The Art of Computer Programming, Volume 4, Fascicle 1: Bitwise Tricks & Techniques; Binary Decision Diagrams. Addison-Wesley Professional, 2009. J. Krumm. A Markov model for driver turn prediction. Technical report, SAE Technical Paper, 2008. J. Letchner, J. Krumm, and E. Horvitz. Trip router with individualized preferences (TRIP): incorporating personalization into route planning. In AAAI, pages 1795–1800, 2006. Y. Liang, J. Bekker, and G. Van den Broeck. Learning the structure of probabilistic sentential decision diagrams. In Proceedings of the 33rd Conference on Uncertainty in Artificial Intelligence (UAI), 2017. T. Lu and C. Boutilier. Learning Mallows models with pairwise preferences. In Proceedings of ICML, pages 145–152, 2011. C. L. Mallows. Non-null ranking models. Biometrika, 1957. S. Minato. Techniques of BDD/ZDD: brief history and recent activity. IEICE Transactions, 96-D(7):1419–1429, 2013. M. Nishino, N. Yasuda, S. Minato, and M. Nagata. Zero-suppressed sentential decision diagrams. In AAAI, pages 1058–1066, 2016. M. Nishino, N. Yasuda, S. Minato, and M. Nagata. Compiling graph substructures into sentential decision diagrams. In Proceedings of the Thirty-First Conference on Artificial Intelligence (AAAI), 2017. Y. Shen, A. Choi, and A. Darwiche. Tractable operations for arithmetic circuits of probabilistic models. In Advances in Neural Information Processing Systems 29 (NIPS), 2016. R. Simmons, B. Browning, Y. Zhang, and V. Sadekar. Learning to predict driver route and destination intent. In Intelligent Transportation Systems Conference, pages 127–132, 2006. L. G. Valiant. The complexity of enumeration and reliability problems. SIAM J. Comput., 8(3):410–421, 1979. Y. Xue, A. Choi, and A. Darwiche. Basing decisions on sentences in decision diagrams. In AAAI, pages 842–849, 2012. 9 | 2017 | 574 |
7,090 | Practical Bayesian Optimization for Model Fitting with Bayesian Adaptive Direct Search Luigi Acerbi∗ Center for Neural Science New York University luigi.acerbi@nyu.edu Wei Ji Ma Center for Neural Science & Dept. of Psychology New York University weijima@nyu.edu Abstract Computational models in fields such as computational neuroscience are often evaluated via stochastic simulation or numerical approximation. Fitting these models implies a difficult optimization problem over complex, possibly noisy parameter landscapes. Bayesian optimization (BO) has been successfully applied to solving expensive black-box problems in engineering and machine learning. Here we explore whether BO can be applied as a general tool for model fitting. First, we present a novel hybrid BO algorithm, Bayesian adaptive direct search (BADS), that achieves competitive performance with an affordable computational overhead for the running time of typical models. We then perform an extensive benchmark of BADS vs. many common and state-of-the-art nonconvex, derivativefree optimizers, on a set of model-fitting problems with real data and models from six studies in behavioral, cognitive, and computational neuroscience. With default settings, BADS consistently finds comparable or better solutions than other methods, including ‘vanilla’ BO, showing great promise for advanced BO techniques, and BADS in particular, as a general model-fitting tool. 1 Introduction Many complex, nonlinear computational models in fields such as behaviorial, cognitive, and computational neuroscience cannot be evaluated analytically, but require moderately expensive numerical approximations or simulations. In these cases, finding the maximum-likelihood (ML) solution – for parameter estimation, or model selection – requires the costly exploration of a rough or noisy nonconvex landscape, in which gradients are often unavailable to guide the search. Here we consider the problem of finding the (global) optimum x∗= argminx∈X E [f(x)] of a possibly noisy objective f over a (bounded) domain X ⊆RD, where the function f can be intended as the (negative) log likelihood of a parameter vector x for a given dataset and model, but is generally a black box. With many derivative-free optimization algorithms available to the researcher [1], it is unclear which one should be chosen. Crucially, an inadequate optimizer can hinder progress, limit the complexity of the models that can be fit, and even cast doubt on the reliability of one’s findings. Bayesian optimization (BO) is a state-of-the-art machine learning framework for optimizing expensive and possibly noisy black-box functions [2, 3, 4]. This makes it an ideal candidate for solving difficult model-fitting problems. Yet there are several obstacles to a widespread usage of BO as a general tool for model fitting. First, traditional BO methods target very costly problems, such as hyperparameter tuning [5], whereas evaluating a typical behavioral model might only have a moderate computational cost (e.g., 0.1-10 s per evaluation). This implies major differences in what is considered an acceptable algorithmic overhead, and in the maximum number of allowed function evaluations (e.g., hundreds vs. ∗Current address: Département des neurosciences fondamentales, Université de Genève, CMU, 1 rue Michel-Servet, 1206 Genève, Switzerland. E-mail: luigi.acerbi@gmail.com. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. thousands). Second, it is unclear how BO methods would fare in this regime against commonly used and state-of-the-art, non-Bayesian optimizers. Finally, BO might be perceived by non-practitioners as an advanced tool that requires specific technical knowledge to be implemented or tuned. We address these issues by developing a novel hybrid BO algorithm, Bayesian Adaptive Direct Search (BADS), that achieves competitive performance at a small computational cost. We tested BADS, together with a wide array of commonly used optimizers, on a novel benchmark set of model-fitting problems with real data and models drawn from studies in cognitive, behaviorial and computational neuroscience. Finally, we make BADS available as a free MATLAB package with the same user interface as existing optimizers and that can be used out-of-the-box with no tuning.1 BADS is a hybrid BO method in that it combines the mesh adaptive direct search (MADS) framework [6] (Section 2.1) with a BO search performed via a local Gaussian process (GP) surrogate (Section 2.2), implemented via a number of heuristics for efficiency (Section 3). BADS proves to be highly competitive on both artificial functions and real-world model-fitting problems (Section 4), showing promise as a general tool for model fitting in computational neuroscience and related fields. Related work There is a large literature about (Bayesian) optimization of expensive, possibly stochastic, computer simulations, mostly used in machine learning [3, 4, 5] or engineering (known as kriging-based optimization) [7, 8, 9]. Recent work has combined MADS with treed GP models for constrained optimization (TGP-MADS [9]). Crucially, these methods have large overheads and may require problem-specific tuning, making them impractical as a generic tool for model fitting. Cheaper but less precise surrogate models than GPs have been proposed, such as random forests [10], Parzen estimators [11], and dynamic trees [12]. In this paper, we focus on BO based on traditional GP surrogates, leaving the analysis of alternative models for future work (see Conclusions). 2 Optimization frameworks 2.1 Mesh adaptive direct search (MADS) The MADS algorithm is a directional direct search framework for nonlinear optimization [6, 13]. Briefly, MADS seeks to improve the current solution by testing points in the neighborhood of the current point (the incumbent), by moving one step in each direction on an iteration-dependent mesh. In addition, the MADS framework can incorporate in the optimization any arbitrary search strategy which proposes additional test points that lie on the mesh. MADS defines the current mesh at the k-th iteration as Mk = S x∈Sk x + ∆mesh k Dz : z ∈ND , where Sk ⊂Rn is the set of all points evaluated since the start of the iteration, ∆mesh k ∈R+ is the mesh size, and D is a fixed matrix in RD×nD whose nD columns represent viable search directions. We choose D = [ID, −ID], where ID is the identity matrix in dimension D. Each iteration of MADS comprises of two stages, a SEARCH stage and an optional POLL stage. The SEARCH stage evaluates a finite number of points proposed by a provided search strategy, with the only restriction that the tested points lie on the current mesh. The search strategy is intended to inject problem-specific information in the optimization. In BADS, we exploit the freedom of SEARCH to perform Bayesian optimization in the neighborhood of the incumbent (see Section 2.2 and 3.3). The POLL stage is performed if the SEARCH fails in finding a point with an improved objective value. POLL constructs a poll set of candidate points, Pk, defined as Pk = xk + ∆mesh k v : v ∈Dk , where xk is the incumbent and Dk is the set of polling directions constructed by taking discrete linear combinations of the set of directions D. The poll size parameter ∆poll k ≥∆mesh k defines the maximum length of poll displacement vectors ∆mesh k v, for v ∈Dk (typically, ∆poll k ≈∆mesh k ||v||). Points in the poll set can be evaluated in any order, and the POLL is opportunistic in that it can be stopped as soon as a better solution is found. The POLL stage ensures theoretical convergence to a local stationary point according to Clarke calculus for nonsmooth functions [6, 14]. If either SEARCH or POLL are a success, finding a mesh point with an improved objective value, the incumbent is updated and the mesh size remains the same or is multiplied by a factor τ > 1. If neither SEARCH or POLL are successful, the incumbent does not move and the mesh size is divided by τ. The algorithm proceeds until a stopping criterion is met (e.g., maximum budget of function evaluations). 1Code available at https://github.com/lacerbi/bads. 2 2.2 Bayesian optimization The typical form of Bayesian optimization (BO) [2] builds a Gaussian process (GP) approximation of the objective f, which is used as a relatively inexpensive surrogate to guide the search towards regions that are promising (low GP mean) and/or unknown (high GP uncertainty), according to a rule, the acquisition function, that formalizes the exploitation-exploration trade-off. Gaussian processes GPs are a flexible class of models for specifying prior distributions over unknown functions f : X ⊆RD →R [15]. GPs are specified by a mean function m : X →R and a positive definite covariance, or kernel function k : X ×X →R. Given any finite collection of n points X = x(i) ∈X n i=1, the value of f at these points is assumed to be jointly Gaussian with mean (m(x(1)), . . . , m(x(n)))⊤and covariance matrix K, where Kij = k(x(i), x(j)) for 1 ≤i, j ≤n. We assume i.i.d. Gaussian observation noise such that f evaluated at x(i) returns y(i) ∼N f(x(i)), σ2 , and y = (y(1), . . . , y(n))⊤is the vector of observed values. For a deterministic f, we still assume a small σ > 0 to improve numerical stability of the GP [16]. Conveniently, observation of such (noisy) function values will produce a GP posterior whose latent marginal conditional mean µ(x; {X, y} , θ) and variance s2(x; {X, y} , θ) at a given point are available in closed form (see Supplementary Material), where θ is a hyperparameter vector for the mean, covariance, and likelihood. In the following, we omit the dependency of µ and s2 from the data and GP parameters to reduce clutter. Covariance functions Our main choice of stationary (translationally-invariant) covariance function is the automatic relevance determination (ARD) rational quadratic (RQ) kernel, kRQ (x, x′) = σ2 f 1 + 1 2αr2(x, x′) −α , with r2(x, x′) = D X d=1 1 ℓ2 d (xd −x′ d)2 , (1) where σ2 f is the signal variance, ℓ1, . . . , ℓD are the kernel length scales along each coordinate direction, and α > 0 is the shape parameter. More common choices for Bayesian optimization include the squared exponential (SE) kernel [9] or the twice-differentiable ARD Matérn 5/2 (M5/2) kernel [5], but we found the RQ kernel to work best in combination with our method (see Section 4.2). We also consider composite periodic kernels for circular or periodic variables (see Supplementary Material). Acquisition function For a given GP approximation of f, the acquisition function, a : X →R, determines which point in X should be evaluated next via a proxy optimization xnext = argminxa(x). We consider here the GP lower confidence bound (LCB) metric [17], aLCB (x; {X, y} , θ) = µ (x) − p νβts2 (x), βt = 2 ln Dt2π2/(6δ) (2) where ν > 0 is a tunable parameter, t is the number of function evaluations so far, δ > 0 is a probabilistic tolerance, and βt is a learning rate chosen to minimize cumulative regret under certain assumptions. For BADS we use the recommended values ν = 0.2 and δ = 0.1 [17]. Another popular choice is the (negative) expected improvement (EI) over the current best function value [18], and an historical, less used metric is the (negative) probability of improvement (PI) [19]. 3 Bayesian adaptive direct search (BADS) We describe here the main steps of BADS (Algorithm 1). Briefly, BADS alternates between a series of fast, local BO steps (the SEARCH stage of MADS) and a systematic, slower exploration of the mesh grid (POLL stage). The two stages complement each other, in that the SEARCH can explore the space very effectively, provided an adequate surrogate model. When the SEARCH repeatedly fails, meaning that the GP model is not helping the optimization (e.g., due to a misspecified model, or excess uncertainty), BADS switches to POLL. The POLL stage performs a fail-safe, model-free optimization, during which BADS gathers information about the local shape of the objective function, so as to build a better surrogate for the next SEARCH. This alternation makes BADS able to deal effectively and robustly with a variety of problems. See Supplementary Material for a full description. 3.1 Initial setup Problem specification The algorithm is initialized by providing a starting point x0, vectors of hard lower/upper bounds LB, UB, and optional vectors of plausible lower/upper bounds PLB, PUB, with the 3 Algorithm 1 Bayesian Adaptive Direct Search Input: objective function f, starting point x0, hard bounds LB, UB, (optional: plausible bounds PLB, PUB, barrier function c, additional options) 1: Initialization: ∆mesh 0 ←2−10, ∆poll 0 ←1, k ←0, evaluate f on initial design ▷Section 3.1 2: repeat 3: (update GP approximation at any step; refit hyperparameters if necessary) ▷Section 3.2 4: for 1 . . . nsearch do ▷SEARCH stage, Section 3.3 5: xsearch ←SEARCHORACLE ▷local Bayesian optimization step 6: Evaluate f on xsearch, if improvement is sufficient then break 7: if SEARCH is NOT successful then ▷optional POLL stage, Section 3.3 8: compute poll set Pk 9: evaluate opportunistically f on Pk sorted by acquisition function 10: if iteration k is successful then 11: update incumbent xk+1 12: if POLL was successful then ∆mesh k ←2∆mesh k , ∆poll k ←2∆poll k 13: else 14: ∆mesh k ←1 2∆mesh k , ∆poll k ←1 2∆poll k 15: k ←k + 1 16: until fevals > MaxFunEvals or ∆poll k < 10−6 or stalling ▷stopping criteria 17: return xend = arg mink f(xk) (or xend = arg mink qβ(xk) for noisy objectives, Section 3.4) requirement that for each dimension 1 ≤d ≤D, LBd ≤PLBd < PUBd ≤UBd.2 Plausible bounds identify a region in parameter space where most solutions are expected to lie. Hard upper/lower bounds can be infinite, but plausible bounds need to be finite. Problem variables whose hard bounds are strictly positive and UBd ≥10 · LBd are automatically converted to log space. All variables are then linearly rescaled to the standardized box [−1, 1]D such that the box bounds correspond to [PLB, PUB] in the original space. BADS supports bound or no constraints, and optionally other constraints via a provided barrier function c (see Supplementary Material). The user can also specify circular or periodic dimensions (such as angles); and whether the objective f is deterministic or noisy (stochastic), and in the latter case provide a coarse estimate of the noise (see Section 3.4). Initial design The initial design consists of the provided starting point x0 and ninit = D additional points chosen via a space-filling quasi-random Sobol sequence [20] in the standardized box, and forced to lie on the mesh grid. If the user does not specify whether f is deterministic or stochastic, the algorithm assesses it by performing two consecutive evaluations at x0. 3.2 GP model in BADS The default GP model is specified by a constant mean function m ∈R, a smooth ARD RQ kernel (Eq. 1), and we use aLCB (Eq. 2) as a default acquisition function. Hyperparameters The default GP has hyperparameters θ = (ℓ1, . . . , ℓD, σ2 f, α, σ2, m). We impose an empirical Bayes prior on the GP hyperparameters based on the current training set (see Supplementary Material), and select θ via maximum a posteriori (MAP) estimation. We fit θ via a gradient-based nonlinear optimizer, starting from either the previous value of θ or a weighted draw from the prior, as a means to escape local optima. We refit the hyperparameters every 2D to 5D function evaluations; more often earlier in the optimization, and whenever the current GP is particularly inaccurate at predicting new points, according to a normality test on the residuals, z(i) = y(i) −µ(x(i)) / p s2(x(i)) + σ2 (assumed independent, in first approximation). Training set The GP training set X consists of a subset of the points evaluated so far (the cache), selected to build a local approximation of the objective in the neighborhood of the incumbent xk, constructed as follows. Each time X is rebuilt, points in the cache are sorted by their ℓ-scaled distance r2 (Eq. 1) from xk. First, the closest nmin = 50 points are automatically added to X. Second, up to 10D additional points with r ≤3ρ(α) are included in the set, where ρ(α) ≳1 is a radius 2A variable d can be fixed by setting (x0)d = LBd = UBd = PLBd = PUBd. Fixed variables become constants, and BADS runs on an optimization problem with reduced dimensionality. 4 function that depends on the decay of the kernel. For the RQ kernel, ρRQ(α) = √α √ e1/α −1 (see Supplementary Material). Newly evaluated points are added incrementally to the set, using fast rank-one updates of the GP posterior. The training set is rebuilt any time the incumbent is moved. 3.3 Implementation of the MADS framework We initialize ∆poll 0 = 1 and ∆mesh 0 = 2−10 (in standardized space), such that the initial poll steps can span the plausible region, whereas the mesh grid is relatively fine. We use τ = 2, and increase the mesh size only after a successful POLL. We skip the POLL after a successful SEARCH. Search stage We apply an aggressive, repeated SEARCH strategy that consists of up to nsearch = max{D, ⌊3 + D/2⌋} unsuccessful SEARCH steps. In each step, we use a search oracle, based on a local BO with the current GP, to produce a search point xsearch (see below). We evaluate f(xsearch) and add it to the training set. If the improvement in objective value is none or insufficient, that is less than (∆poll k )3/2, we continue searching, or switch to POLL after nsearch steps. Otherwise, we call it a success and start a new SEARCH from scratch, centered on the updated incumbent. Search oracle We choose xsearch via a fast, approximate optimization inspired by CMA-ES [21]. We sample batches of points in the neighborhood of the incumbent xk, drawn ∼N(xs, λ2(∆poll k )2Σ), where xs is the current search focus, Σ a search covariance matrix, and λ > 0 a scaling factor, and we pick the point that optimizes the acquisition function (see Supplementary Material). We remove from the SEARCH set candidate points that violate non-bound constraints (c(x) > 0), and we project candidate points that fall outside hard bounds to the closest mesh point inside the bounds. Across SEARCH steps, we use both a diagonal matrix Σℓwith diagonal ℓ2 1/|ℓ|2, . . . , ℓ2 D/|ℓ|2 , and a matrix ΣWCM proportional to the weighted covariance matrix of points in X (each point weighted according to a function of its ranking in terms of objective values yi). We choose between Σℓand ΣWCM probabilistically via a hedge strategy, based on their track record of cumulative improvement [22]. Poll stage We incorporate the GP approximation in the POLL in two ways: when constructing the set of polling directions Dk, and when choosing the polling order. We generate Dk according to the random LTMADS algorithm [6], but then rescale each vector coordinate 1 ≤d ≤D proportionally to the GP length scale ℓd (see Supplementary Material). We discard poll vectors that do not satisfy the given bound or nonbound constraints. Second, since the POLL is opportunistic, we evaluate points in the poll set according to the ranking given by the acquisition function [9]. Stopping criteria We stop the optimization when the poll size ∆poll k goes below a threshold (default 10−6); when reaching a maximum number of objective evaluations (default 500D); or if there is no significant improvement of the objective for more than 4 + ⌊D/2⌋iterations. The algorithm returns the optimum xend (transformed back to original coordinates) with the lowest objective value yend. 3.4 Noisy objective In case of a noisy objective, we assume for the noise a hyperprior ln σ ∼N(ln σest, 1), with σest a base noise magnitude (default σest = 1, but the user can provide an estimate). To account for additional uncertainty, we also make the following changes: double the minimum number of points added to the training set, nmin = 100, and increase the maximum number to 200; increase the initial design to ninit = 20; and double the number of allowed stalled iterations before stopping. Uncertainty handling Due to noise, we cannot simply use the output values yi as ground truth in the SEARCH and POLL stages. Instead, we replace yi with the GP latent quantile function [23] qβ (x; {X, y} , θ) ≡qβ(x) = µ (x) + Φ−1(β)s (x) , β ∈[0.5, 1), (3) where Φ−1(·) is the quantile function of the standard normal (plugin approach [24]). Moreover, we modify the MADS procedure by keeping an incumbent set {xi}k i=1, where xi is the incumbent at the end of the i-th iteration. At the end of each POLL we re-evaluate qβ for all elements of the incumbent set, in light of the new points added to the cache. We select as current (active) incumbent the point with lowest qβ(xi). During optimization we set β = 0.5 (mean prediction only), which promotes exploration. We use a conservative βend = 0.999 for the last iteration, to select the optimum xend returned by the algorithm in a robust manner. Instead of yend, we return either µ(xend) or an unbiased estimate of E[f(xend)] obtained by averaging multiple evaluations (see Supplementary Material). 5 4 Experiments We tested BADS and many optimizers with implementation available in MATLAB (R2015b, R2017a) on a large set of artificial and real optimization problems (see Supplementary Material for details). 4.1 Design of the benchmark Algorithms Besides BADS, we tested 16 optimization algorithms, including popular choices such as Nelder-Mead (fminsearch [25]), several constrained nonlinear optimizers in the fmincon function (default interior-point [26], sequential quadratic programming sqp [27], and active-set actset [28]), genetic algorithms (ga [29]), random search (randsearch) as a baseline [30]; and also less-known state-of-the-art methods for nonconvex derivative-free optimization [1], such as Multilevel Coordinate Search (MCS [31]) and CMA-ES [21, 32] (cmaes, in different flavors). For noisy objectives, we included algorithms that explicitly handle uncertainty, such as snobfit [33] and noisy CMA-ES [34]. Finally, to verify the advantage of BADS’ hybrid approach to BO, we also tested a standard, ‘vanilla’ version of BO [5] (bayesopt, R2017a) on the set of real model-fitting problems (see below). For all algorithms, including BADS, we used default settings (no fine-tuning). Problem sets First, we considered a standard benchmark set of artificial, noiseless functions (BBOB09 [35], 24 functions) in dimensions D ∈{3, 6, 10, 15}, for a total of 96 test functions. We also created ‘noisy’ versions of the same set. Second, we collected model-fitting problems from six published or ongoing studies in cognitive and computational neuroscience (CCN17). The objectives of the CCN17 set are negative log likelihood functions of an input parameter vector, for specified datasets and models, and can be deterministic or stochastic. For each study in the CCN17 set we asked its authors for six different real datasets (i.e., subjects or neurons), divided between one or two main models of interest; collecting a total of 36 test functions with D ∈{6, 9, 10, 12, 13}. Procedure We ran 50 independent runs of each algorithm on each test function, with randomized starting points and a budget of 500 × D function evaluations (200 × D for noisy problems). If an algorithm terminated before depleting the budget, it was restarted from a new random point. We consider a run successful if the current best (or returned, for noisy problems) function value is within a given error tolerance ε > 0 from the true optimum fmin (or our best estimate thereof).3 For noiseless problems, we compute the fraction of successful runs as a function of number of objective evaluations, averaged over datasets/functions and over ε ∈[0.01, 10] (log spaced). This is a realistic range for ε, as differences in log likelihood below 0.01 are irrelevant for model selection; an acceptable tolerance is ε ∼0.5 (a difference in deviance, the metric used for AIC or BIC, less than 1); larger ε associate with coarse solutions, but errors larger than 10 would induce excessive biases in model selection. For noisy problems, what matters most is the solution xend that the algorithm actually returns, which, depending on the algorithm, may not necessarily be the point with the lowest observed function value. Since, unlike the noiseless case, we generally do not know the solutions that would be returned by any algorithm at every time step, but only at the last step, we plot instead the fraction of successful runs at 200 × D function evaluations as a function of ε, for ε ∈[0.1, 10] (noise makes higher precisions moot), and averaged over datasets/functions. In all plots we omit error bars for clarity (standard errors would be about the size of the line markers or less). 4.2 Results on artificial functions (BBOB09) The BBOB09 noiseless set [35] comprises of 24 functions divided in 5 groups with different properties: separable; low or moderate conditioning; unimodal with high conditioning; multi-modal with adequate / with weak global structure. First, we use this benchmark to show the performance of different configurations for BADS. Note that we selected the default configuration (RQ kernel, aLCB) and other algorithmic details by testing on a different benchmark set (see Supplementary Material). Fig 1 (left) shows aggregate results across all noiseless functions with D ∈{3, 6, 10, 15}, for alternative choices of kernels and acquisition functions (only a subset is shown, such as the popular M5/2, EI combination), or by altering other features (such as setting nsearch = 1, or fixing the search covariance matrix to Σℓor ΣWCM). Almost all changes from the default configuration worsen performance. 3Note that the error tolerance ε is not a fractional error, as sometimes reported in optimization, because for model comparison we typically care about (absolute) differences in log likelihoods. 6 Function evaluations / D 10 50 100 500 Fraction solved 0 0.25 0.5 0.75 1BBOB09 noiseless (BADS variants) bads (rq,lcb,default) bads (search-wcm) bads (m5/2,ei) bads (search-ℓ) bads (se,pi) bads ( =1) Function evaluations / D 10 50 100 500 Fraction solved 0 0.25 0.5 0.75 1 BBOB09 noiseless bads fmincon (actset) fmincon fmincon (sqp) cmaes (active) mcs fminsearch cmaes global patternsearch simulannealbnd particleswarm ga randsearch Error tolerance ε 0.1 0.3 1 3 10 Fraction solved at 200×D func. evals. 0 0.25 0.5 0.75 1BBOB09 with heteroskedastic noise bads cmaes (noisy,active) cmaes (noisy) snobfit particleswarm patternsearch mcs ga simulannealbnd fmincon (actset) randsearch fmincon fmincon (sqp) fminsearch global search n Figure 1: Artificial test functions (BBOB09). Left & middle: Noiseless functions. Fraction of successful runs (ε ∈[0.01, 10]) vs. # function evaluations per # dimensions, for D ∈{3, 6, 10, 15} (96 test functions); for different BADS configurations (left) and all algorithms (middle). Right: Heteroskedastic noise. Fraction of successful runs at 200 × D objective evaluations vs. tolerance ε. Noiseless functions We then compared BADS to other algorithms (Fig 1 middle). Depending on the number of function evaluations, the best optimizers are BADS, methods of the fmincon family, and, for large budget of function evaluations, CMA-ES with active update of the covariance matrix. Noisy functions We produce noisy versions of the BBOB09 set by adding i.i.d. Gaussian observation noise at each function evaluation, y(i) = f(x(i)) + σ(x(i))η(i), with η(i) ∼N(0, 1). We consider a variant with moderate homoskedastic (constant) noise (σ = 1), and a variant with heteroskedastic noise with σ(x) = 1+0.1×(f(x)−fmin), which follows the observation that variability generally increases for solutions away from the optimum. For many functions in the BBOB09 set, this heteroskedastic noise can become substantial (σ ≫10) away from the optimum. Fig 1 (right) shows aggregate results for the heteroskedastic set (homoskedastic results are similar). BADS outperforms all other optimizers, with CMA-ES (active, with or without the noisy option) coming second. Notably, BADS performs well even on problems with non-stationary (location-dependent) features, such as heteroskedastic noise, thanks to its local GP approximation. 4.3 Results on real model-fitting problems (CCN17) The objectives of the CCN17 set are deterministic (e.g., computed via numerical approximation) for three studies (Fig 2), and noisy (e.g., evaluated via simulation) for the other three (Fig 3). The algorithmic cost of BADS is ∼0.03 s to 0.15 s per function evaluation, depending on D, mostly due to the refitting of the GP hyperparameters. This produces a non-negligible overhead, defined as 100% × (total optimization time / total function time −1). For a fair comparison with other methods with little or no overhead, for deterministic problems we also plot the effective performance of BADS by accounting for the extra cost per function evaluation. In practice, this correction shifts rightward the performance curve of BADS in log-iteration space, since each function evaluation with BADS has an increased fractional time cost. For stochastic problems, we cannot compute effective performance as easily, but there we found small overheads (< 5%), due to more costly evaluations (more than 1 s). For a direct comparison with standard BO, we also tested on the CCN17 set a ‘vanilla’ BO algorithm, as implemented in MATLAB R2017a (bayesopt). This implementation closely follows [5], with optimization instead of marginalization over GP hyperparameters. Due to the fast-growing cost of BO as a function of training set size, we allowed up to 300 training points for the GP, restarting the BO algorithm from scratch with a different initial design every 300 BO iterations (until the total budget of function evaluations was exhausted). The choice of 300 iterations already produced a large average algorithmic overhead of ∼8 s per function evaluation. In showing the results of bayesopt, we display raw performance without penalizing for the overhead. Causal inference in visuo-vestibular perception Causal inference (CI) in perception is the process whereby the brain decides whether to integrate or segregate multisensory cues that could arise from the same or from different sources [39]. This study investigates CI in visuo-vestibular heading 7 10 50 100 500 Function evaluations / D 0 0.25 0.5 0.75 1 Fraction solved CCN17 causal inference [overhead-corrected, 24%] bads bads cmaes (active) cmaes fminsearch patternsearch particleswarm global simulannealbnd fmincon fmincon (sqp) mcs ga fmincon (actset) randsearch bayesopt 10 50 100 500 Function evaluations / D 0 0.25 0.5 0.75 1 Fraction solved CCN17 Bayesian confidence bads bads fmincon fmincon (sqp) fmincon (actset) cmaes (active) cmaes mcs patternsearch fminsearch particleswarm global randsearch simulannealbnd ga bayesopt 10 50 100 500 Function evaluations / D 0 0.25 0.5 0.75 1 Fraction solved CCN17 neuronal selectivity bads bads fmincon fmincon (sqp) fmincon (actset) cmaes (active) cmaes mcs fminsearch patternsearch simulannealbnd ga global particleswarm randsearch bayesopt [overhead-corrected, 68%] [overhead-corrected, 14%] Figure 2: Real model-fitting problems (CCN17, deterministic). Fraction of successful runs (ε ∈ [0.01, 10]) vs. # function evaluations per # dimensions. Left: Causal inference in visuo-vestibular perception [36] (6 subjects, D = 10). Middle: Bayesian confidence in perceptual categorization [37] (6 subjects, D = 13). Right: Neural model of orientation selectivity [38] (6 neurons, D = 12). perception across tasks and under different levels of visual reliability, via a factorial model comparison [36]. For our benchmark we fit three subjects with a Bayesian CI model (D = 10), and another three with a fixed-criterion CI model (D = 10) that disregards visual reliability. Both models include heading-dependent likelihoods and marginalization of the decision variable over the latent space of noisy sensory measurements (xvis, xvest), solved via nested numerical integration in 1-D and 2-D. Bayesian confidence in perceptual categorization This study investigates the Bayesian confidence hypothesis that subjective judgments of confidence are directly related to the posterior probability the observer assigns to a learnt perceptual category [37] (e.g., whether the orientation of a drifting Gabor patch belongs to a ‘narrow’ or to a ‘wide’ category). For our benchmark we fit six subjects to the ‘Ultrastrong’ Bayesian confidence model (D = 13), which uses the same mapping between posterior probability and confidence across two tasks with different distributions of stimuli. This model includes a latent noisy decision variable, marginalized over via 1-D numerical integration. Neural model of orientation selectivity The authors of this study explore the origins of diversity of neuronal orientation selectivity in visual cortex via novel stimuli (orientation mixtures) and modeling [38]. We fit the responses of five V1 and one V2 cells with the authors’ neuronal model (D = 12) that combines effects of filtering, suppression, and response nonlinearity [38]. The model has one circular parameter, the preferred direction of motion of the neuron. The model is analytical but still computationally expensive due to large datasets and a cascade of several nonlinear operations. Word recognition memory This study models a word recognition task in which subjects rated their confidence that a presented word was in a previously studied list [40] (data from [41]). We consider six subjects divided between two normative models, the ‘Retrieving Effectively from Memory’ model [42] (D = 9) and a similar, novel model4 (D = 6). Both models use Monte Carlo methods to draw random samples from a large space of latent noisy memories, yielding a stochastic log likelihood. Target detection and localization This study looks at differences in observers’ decision making strategies in target detection (‘was the target present?’) and localization (‘which one was the target?’) with displays of 2, 3, 4, or 6 oriented Gabor patches.5 Here we fit six subjects with a previously derived ideal observer model [43, 44] (D = 6) with variable-precision noise [45], assuming shared parameters between detection and localization. The log likelihood is evaluated via simulation due to marginalization over latent noisy measurements of stimuli orientations with variable precision. Combinatorial board game playing This study analyzes people’s strategies in a four-in-a-row game played on a 4-by-9 board against human opponents ([46], Experiment 1). We fit the data of six players with the main model (D = 10), which is based on a Best-First exploration of a decision tree guided by a feature-based value heuristic. The model also includes feature dropping, value noise, and lapses, to better capture human variability. Model evaluation is computationally expensive due to the 4Unpublished; upcoming work from Aspen H. Yoo and Wei Ji Ma. 5Unpublished; upcoming work from Andra Mihali and Wei Ji Ma. 8 0.1 0.3 1 3 10 Error tolerance ε 0 0.25 0.5 0.75 1 Fraction solved at 200×D func. evals. CCN17 word recognition memory bads cmaes (noisy,active) cmaes (noisy) fminsearch patternsearch particleswarm fmincon (actset) ga mcs simulannealbnd randsearch snobfit global bayesopt 0.1 0.3 1 3 10 Error tolerance ε 0 0.25 0.5 0.75 1 Fraction solved at 200×D func. evals. CCN17 target detection/localization bads cmaes ( ) cmaes (noisy) snobfit bayesopt particleswarm mcs patternsearch fminsearch simulannealbnd ga global fmincon (actset) randsearch noisy, active 0.1 0.3 1 3 10 Error tolerance ε 0 0.25 0.5 0.75 1 Fraction solved at 200×D func. evals. CCN17 combinatorial game playing bads cmaes (noisy,active) particleswarm bayesopt snobfit mcs patternsearch fminsearch Figure 3: Real model-fitting problems (CCN17, noisy). Fraction of successful runs at 200 × D objective evaluations vs. tolerance ε. Left: Confidence in word recognition memory [40] (6 subjects, D = 6, 9). Middle: Target detection and localization [44] (6 subjects, D = 6). Right: Combinatorial board game playing [46] (6 subjects, D = 10). construction and evaluation of trees of future board states, and achieved via inverse binomial sampling, an unbiased stochastic estimator of the log likelihood [46]. Due to prohibitive computational costs, here we only test major algorithms (MCS is the method used in the paper [46]); see Fig 3 right. In all problems, BADS consistently performs on par with or outperforms all other tested optimizers, even when accounting for its extra algorithmic cost. The second best algorithm is either some flavor of CMA-ES or, for some deterministic problems, a member of the fmincon family. Crucially, their ranking across problems is inconsistent, with both CMA-ES and fmincon performing occasionally quite poorly (e.g., fmincon does poorly in the causal inference set because of small fluctuations in the log likelihood landscape caused by coarse numerical integration). Interestingly, vanilla BO (bayesopt) performs poorly on all problems, often at the level of random search, and always substantially worse than BADS, even without accounting for the much larger overhead of bayesopt. The solutions found by bayesopt are often hundreds (even thousands) points of log likelihood from the optimum. This failure is possibly due to the difficulty of building a global GP surrogate for BO, coupled with strong non-stationarity of the log likelihood functions; and might be ameliorated by more complex forms of BO (e.g., input warping to produce nonstationary kernels [47], hyperparameter marginalization [5]). However, these advanced approaches would substantially increase the already large overhead. Importantly, we expect this poor perfomance to extend to any package which implements vanilla BO (such as BayesOpt [48]), regardless of the efficiency of implementation. 5 Conclusions We have developed a novel BO method and an associated toolbox, BADS, with the goal of fitting moderately expensive computational models out-of-the-box. We have shown on real model-fitting problems that BADS outperforms widely used and state-of-the-art methods for nonconvex, derivativefree optimization, including ‘vanilla’ BO. We attribute the robust performance of BADS to the alternation between the aggressive SEARCH strategy, based on local BO, and the failsafe POLL stage, which protects against failures of the GP surrogate – whereas vanilla BO does not have such failsafe mechanisms, and can be strongly affected by model misspecification. Our results demonstrate that a hybrid Bayesian approach to optimization can be beneficial beyond the domain of very costly black-box functions, in line with recent advancements in probabilistic numerics [49]. Like other surrogate-based methods, the performance of BADS is linked to its ability to obtain a fast approximation of the objective, which generally deteriorates in high dimensions, or for functions with pathological structure (often improvable via reparameterization). From our tests, we recommend BADS, paired with some multi-start optimization strategy, for models with up to ∼15 variables, a noisy or jagged log likelihood landscape, and when algorithmic overhead is ≲75% (e.g., model evaluation ≳0.1 s). Future work with BADS will focus on testing alternative statistical surrogates instead of GPs [12]; combining it with a smart multi-start method for global optimization; providing support for tunable precision of noisy observations [23]; improving the numerical implementation; and recasting some of its heuristics in terms of approximate inference. 9 Acknowledgments We thank Will Adler, Robbe Goris, Andra Mihali, Bas van Opheusden, and Aspen Yoo for sharing data and model evaluation code that we used in the CCN17 benchmark set; Maija Honig, Andra Mihali, Bas van Opheusden, and Aspen Yoo for providing user feedback on earlier versions of the bads package for MATLAB; Will Adler, Andra Mihali, Bas van Opheusden, and Aspen Yoo for helpful feedback on a previous version of this manuscript; John Wixted and colleagues for allowing us to reuse their data for the CCN17 ‘word recognition memory’ problem set; and the three anonymous reviewers for useful feedback. This work has utilized the NYU IT High Performance Computing resources and services. References [1] Rios, L. M. & Sahinidis, N. V. (2013) Derivative-free optimization: A review of algorithms and comparison of software implementations. Journal of Global Optimization 56, 1247–1293. [2] Jones, D. R., Schonlau, M., & Welch, W. J. (1998) Efficient global optimization of expensive black-box functions. Journal of Global Optimization 13, 455–492. [3] Brochu, E., Cora, V. M., & De Freitas, N. (2010) A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. arXiv preprint arXiv:1012.2599. [4] Shahriari, B., Swersky, K., Wang, Z., Adams, R. P., & de Freitas, N. (2016) Taking the human out of the loop: A review of Bayesian optimization. Proceedings of the IEEE 104, 148–175. [5] Snoek, J., Larochelle, H., & Adams, R. P. (2012) Practical Bayesian optimization of machine learning algorithms. Advances in Neural Information Processing Systems 24, 2951–2959. [6] Audet, C. & Dennis Jr, J. E. (2006) Mesh adaptive direct search algorithms for constrained optimization. SIAM Journal on optimization 17, 188–217. [7] Taddy, M. A., Lee, H. K., Gray, G. A., & Griffin, J. D. (2009) Bayesian guided pattern search for robust local optimization. Technometrics 51, 389–401. [8] Picheny, V. & Ginsbourger, D. (2014) Noisy kriging-based optimization methods: A unified implementation within the DiceOptim package. Computational Statistics & Data Analysis 71, 1035–1053. [9] Gramacy, R. B. & Le Digabel, S. (2015) The mesh adaptive direct search algorithm with treed Gaussian process surrogates. Pacific Journal of Optimization 11, 419–447. [10] Hutter, F., Hoos, H. H., & Leyton-Brown, K. (2011) Sequential model-based optimization for general algorithm configuration. LION 5, 507–523. [11] Bergstra, J. S., Bardenet, R., Bengio, Y., & Kégl, B. (2011) Algorithms for hyper-parameter optimization. pp. 2546–2554. [12] Talgorn, B., Le Digabel, S., & Kokkolaras, M. (2015) Statistical surrogate formulations for simulationbased design optimization. Journal of Mechanical Design 137, 021405–1–021405–18. [13] Audet, C., Custódio, A., & Dennis Jr, J. E. (2008) Erratum: Mesh adaptive direct search algorithms for constrained optimization. SIAM Journal on Optimization 18, 1501–1503. [14] Clarke, F. H. (1983) Optimization and Nonsmooth Analysis. (John Wiley & Sons, New York). [15] Rasmussen, C. & Williams, C. K. I. (2006) Gaussian Processes for Machine Learning. (MIT Press). [16] Gramacy, R. B. & Lee, H. K. (2012) Cases for the nugget in modeling computer experiments. Statistics and Computing 22, 713–722. [17] Srinivas, N., Krause, A., Seeger, M., & Kakade, S. M. (2010) Gaussian process optimization in the bandit setting: No regret and experimental design. ICML-10 pp. 1015–1022. [18] Mockus, J., Tiesis, V., & Zilinskas, A. (1978) in Towards Global Optimisation. (North-Holland Amsterdam), pp. 117–129. [19] Kushner, H. J. (1964) A new method of locating the maximum point of an arbitrary multipeak curve in the presence of noise. Journal of Basic Engineering 86, 97–106. [20] Bratley, P. & Fox, B. L. (1988) Algorithm 659: Implementing Sobol’s quasirandom sequence generator. ACM Transactions on Mathematical Software (TOMS) 14, 88–100. [21] Hansen, N., Müller, S. D., & Koumoutsakos, P. (2003) Reducing the time complexity of the derandomized evolution strategy with covariance matrix adaptation (CMA-ES). Evolutionary Computation 11, 1–18. [22] Hoffman, M. D., Brochu, E., & de Freitas, N. (2011) Portfolio allocation for Bayesian optimization. Proceedings of the Twenty-Seventh Conference on Uncertainty in Artificial Intelligence pp. 327–336. 10 [23] Picheny, V., Ginsbourger, D., Richet, Y., & Caplin, G. (2013) Quantile-based optimization of noisy computer experiments with tunable precision. Technometrics 55, 2–13. [24] Picheny, V., Wagner, T., & Ginsbourger, D. (2013) A benchmark of kriging-based infill criteria for noisy optimization. Structural and Multidisciplinary Optimization 48, 607–626. [25] Lagarias, J. C., Reeds, J. A., Wright, M. H., & Wright, P. E. (1998) Convergence properties of the Nelder–Mead simplex method in low dimensions. SIAM Journal on Optimization 9, 112–147. [26] Waltz, R. A., Morales, J. L., Nocedal, J., & Orban, D. (2006) An interior algorithm for nonlinear optimization that combines line search and trust region steps. Mathematical Programming 107, 391–408. [27] Nocedal, J. & Wright, S. (2006) Numerical Optimization, Springer Series in Operations Research. (Springer Verlag), 2nd edition. [28] Gill, P. E., Murray, W., & Wright, M. H. (1981) Practical Optimization. (Academic press). [29] Goldberg, D. E. (1989) Genetic Algorithms in Search, Optimization & Machine Learning. (AddisonWesley). [30] Bergstra, J. & Bengio, Y. (2012) Random search for hyper-parameter optimization. Journal of Machine Learning Research 13, 281–305. [31] Huyer, W. & Neumaier, A. (1999) Global optimization by multilevel coordinate search. Journal of Global Optimization 14, 331–355. [32] Jastrebski, G. A. & Arnold, D. V. (2006) Improving evolution strategies through active covariance matrix adaptation. IEEE Congress on Evolutionary Computation (CEC 2006). pp. 2814–2821. [33] Csendes, T., Pál, L., Sendin, J. O. H., & Banga, J. R. (2008) The GLOBAL optimization method revisited. Optimization Letters 2, 445–454. [34] Hansen, N., Niederberger, A. S., Guzzella, L., & Koumoutsakos, P. (2009) A method for handling uncertainty in evolutionary optimization with an application to feedback control of combustion. IEEE Transactions on Evolutionary Computation 13, 180–197. [35] Hansen, N., Finck, S., Ros, R., & Auger, A. (2009) Real-parameter black-box optimization benchmarking 2009: Noiseless functions definitions. [36] Acerbi, L., Dokka, K., Angelaki, D. E., & Ma, W. J. (2017) Bayesian comparison of explicit and implicit causal inference strategies in multisensory heading perception. bioRxiv preprint bioRxiv:150052. [37] Adler, W. T. & Ma, W. J. (2017) Human confidence reports account for sensory uncertainty but in a non-Bayesian way. bioRxiv preprint bioRxiv:093203. [38] Goris, R. L., Simoncelli, E. P., & Movshon, J. A. (2015) Origin and function of tuning diversity in macaque visual cortex. Neuron 88, 819–831. [39] Körding, K. P., Beierholm, U., Ma, W. J., Quartz, S., Tenenbaum, J. B., & Shams, L. (2007) Causal inference in multisensory perception. PLoS One 2, e943. [40] van den Berg, R., Yoo, A. H., & Ma, W. J. (2017) Fechner’s law in metacognition: A quantitative model of visual working memory confidence. Psychological Review 124, 197–214. [41] Mickes, L., Wixted, J. T., & Wais, P. E. (2007) A direct test of the unequal-variance signal detection model of recognition memory. Psychonomic Bulletin & Review 14, 858–865. [42] Shiffrin, R. M. & Steyvers, M. (1997) A model for recognition memory: REM—retrieving effectively from memory. Psychonomic Bulletin & Review 4, 145–166. [43] Ma, W. J., Navalpakkam, V., Beck, J. M., van Den Berg, R., & Pouget, A. (2011) Behavior and neural basis of near-optimal visual search. Nature Neuroscience 14, 783–790. [44] Mazyar, H., van den Berg, R., & Ma, W. J. (2012) Does precision decrease with set size? J Vis 12, 1–10. [45] van den Berg, R., Shin, H., Chou, W.-C., George, R., & Ma, W. J. (2012) Variability in encoding precision accounts for visual short-term memory limitations. Proc Natl Acad Sci U S A 109, 8780–8785. [46] van Opheusden, B., Bnaya, Z., Galbiati, G., & Ma, W. J. (2016) Do people think like computers? International Conference on Computers and Games pp. 212–224. [47] Snoek, J., Swersky, K., Zemel, R., & Adams, R. (2014) Input warping for Bayesian optimization of non-stationary functions. pp. 1674–1682. [48] Martinez-Cantin, R. (2014) BayesOpt: A Bayesian optimization library for nonlinear optimization, experimental design and bandits. Journal of Machine Learning Research 15, 3735–3739. [49] Hennig, P., Osborne, M. A., & Girolami, M. (2015) Probabilistic numerics and uncertainty in computations. Proceedings of the Royal Society A 471, 20150142. 11 | 2017 | 575 |
7,091 | Multi-Information Source Optimization Matthias Poloczek Department of Systems and Industrial Engineering University of Arizona Tucson, AZ 85721 poloczek@email.arizona.edu Jialei Wang Chief Analytics Office IBM Armonk, NY 10504 jw865@cornell.edu Peter I. Frazier School of Operations Research and Information Engineering Cornell University Ithaca, NY 14853 pf98@cornell.edu Abstract We consider Bayesian methods for multi-information source optimization (MISO), in which we seek to optimize an expensive-to-evaluate black-box objective function while also accessing cheaper but biased and noisy approximations (“information sources”). We present a novel algorithm that outperforms the state of the art for this problem by using a Gaussian process covariance kernel better suited to MISO than those used by previous approaches, and an acquisition function based on a one-step optimality analysis supported by efficient parallelization. We also provide a novel technique to guarantee the asymptotic quality of the solution provided by this algorithm. Experimental evaluations demonstrate that this algorithm consistently finds designs of higher value at less cost than previous approaches. 1 Introduction We consider Bayesian multi-information source optimization (MISO), in which we optimize an expensive-to-evaluate black-box objective function while optionally accessing cheaper biased noisy approximations, often referred to as “information sources (IS)”. This arises when tuning machine learning algorithms: instead of using the whole dataset for the hyperparameter optimization, one may use a small subset or even a smaller related dataset [34, 15, 17]. We also face this problem in robotics: we can evaluate a parameterized robot control policy in simulation, in a laboratory, or in a field test [15]. Cheap approximations promise a route to tractability, but bias and noise complicate their use. An unknown bias arises whenever a computational model incompletely models a real-world phenomenon, and is pervasive in applications. We present a novel algorithm for this problem, misoKG, that is tolerant to both noise and bias and improves substantially over the state of the art. Specifically, our contributions are: • The algorithm uses a novel acquisition function that maximizes the incremental gain per unit cost. This acquisition function generalizes and parallelizes previously proposed knowledgegradient methods for single-IS Bayesian optimization [7, 8, 28, 26, 37] to MISO. • We prove that this algorithm provides an asymptotically near-optimal solution. If the search domain is finite, this result establishes the consistency of misoKG. We present a novel proof technique that yields an elegant, short argument and is thus of independent interest. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Related Work: To our knowledge, MISO was first considered by Swersky, Snoek, and Adams [34], under the the name multi-task Bayesian optimization. This name was used to suggest problems in which the auxiliary tasks could meaningfully be solved on their own, while we use the term MISO to indicate that the IS may be useful only in support of the primary task. Swersky et al. [34] showed that hyperparameter tuning in classification can be accelerated through evaluation on subsets of the validation data. They proposed a GP model to jointly model such “auxiliary tasks” and the primary task, building on previous work on GP regression for multiple tasks in [3, 10, 35]. They choose points to sample via cost-sensitive entropy search [11, 39], sampling in each iteration a point that maximally reduces uncertainty in the optimum’s location, normalized by the query cost. We demonstrate in experiments that our approach improves over the method of Swersky et al. [34], and we believe this improvement results from two factors: first, our statistical model is more flexible in its ability to model bias that varies across the domain; second, our acquisition function directly and maximally reduces simple regret in one step, unlike predictive entropy search which maximally reduces the maximizer’s entropy in one step and hence only indirectly reduces regret. Lam, Allaire, and Willcox [18] also consider MISO, under the name non-hierarchical multi-fidelity optimization. They propose a statistical model that maintains a separate GP for each IS, and fuse them via the method of Winkler [40]. They apply a modified expected improvement acquisition function on these surrogates to first decide what design x∗to evaluate and then select the IS to query; the latter is decided by a heuristic that aims to balance information gain and query cost. We demonstrate in experiments that our approach improves over the method of Lam et al. [18], and we believe this improvement results from two factors: first, their statistical approach assumes an independent prior on each IS, despite their being linked through modeling a common objective; and second their acquisition function selects the point to sample and the IS to query separately via a heuristic rather than jointly using an optimality analysis. Beyond these two works, the most closely related work is in the related problem of multi-fidelity optimization. In this problem, IS are supposed to form a strict hierarchy [16, 14, 6, 24, 20, 19, 15]. In addition, most of these models limit the information that can be obtained from sources of lower fidelity [16, 14, 6, 20, 19]: Given the observation of x at some IS ℓ, one cannot learn more about the value of x at IS with higher fidelity by querying IS ℓanywhere else (see Sect. C for details and a proof). Picheny et al. [24] propose a quantile-based criterion for optimization of stochastic simulators, supposing that all simulators provide unbiased approximations of the true objective. From this body of work, we compare against Kandasamy et al. [15], who present an approach for minimizing both simple and cumulative regret, under the assumption that the maximum bias of an information source strictly decreases with its fidelity. An interesting special case of MISO is warm-starting Bayesian optimization. Here information sources correspond to samples that were taken previously on objective functions related to the current objective. For example, this scenario occurs when we are to re-optimize whenever parameters of the objective change or whenever new data becomes available. Poloczek et al. [25] demonstrated that a variant of the algorithm proposed in this article can reduce the optimization costs significantly by warm-starting Bayesian optimization, as does the algorithm of Swersky et al. [34]. Outside of both the MISO and multi-fidelity settings, Klein et al. [17] considered hyperparameter optimization of machine learning algorithms over a large dataset D. Supposing access to subsets of D of arbitrary sizes, they show how to exploit regularity of performance across dataset sizes to significantly speed up the optimization process for support vector machines and neural networks. Our acquisition function is a generalization of the knowledge-gradient policy of Frazier, Powell, and Dayanik [8] to the MISO setting. This generalization requires extending the one-step optimality analysis used to derive the KG policy in the single-IS setting to account for the impact of sampling a cheap approximation on the marginal GP posterior on the primary task. From this literature, we leverage an idea for computing the expectation of the maximum of a collection of linear functions of a normal random variable, and propose a parallel algorithm to identify and compute the required components. The class of GP covariance kernels we propose are a subset of the class of linear models of coregionalization kernels [10, 2], with a restricted form derived from a generative model particular to MISO. Focusing on a restricted class of kernels designed for our application supports accurate inference with less data, which is important when optimizing expensive-to-evaluate functions. 2 Our work also extends the knowledge-gradient acquisition function to the variable cost setting. Similar extensions of expected improvement to the variable cost setting can be found in Snoek et al. [32] (the EI per second criterion) and in Le Gratiet and Cannamela [19]. We now formalize the problem we consider in Sect. 2, describe our statistical analysis in Sect. 3.1, specify our acquisition function and parallel computation method in Sects. 3.2 and 3.3, provide a theoretical guarantee in Sect. 3.4, present numerical experiments in Sect. 4, and conclude in Sect. 5. 2 Problem Formulation Given a continuous objective function g : D →R on a compact set D ⊂Rd of feasible designs, our goal is to find a design with objective value close to maxx∈D g(x). We have access to M possibly biased and/or noisy IS indexed by ℓ∈[M]0. (Here, for any a ∈Z+ we use [a] as a shorthand for the set {1, 2, . . . , a}, and further define [a]0 = {0, 1, 2, . . . , a}.) Observing IS ℓat design x provides independent, conditional on f(ℓ, x), and normally distributed observations with mean f(ℓ, x) and finite variance λℓ(x). In [34], IS ℓ∈[M]0 are called “auxiliary tasks” and g the primary task. These sources are thought of as approximating g, with variable bias. We suppose that g can be observed directly without bias (but possibly with noise) and set f(0, x) = g(x). The bias f(ℓ, x) −g(x) is also referred to as “model discrepancy” in the engineering and simulation literature [1, 4]. Each IS ℓis also associated with a query cost function cℓ(x) : D →R+. We assume that the cost function cℓ(x) and the variance function λℓ(x) are both known and continuously differentiable (over D). In practice, these functions may either be provided by domain experts or may be estimated along with other model parameters from data (see Sect. 4 and B.2, and [27]). 3 The misoKG Algorithm We now present the misoKG algorithm and describe its two components: a MISO-focused statistical model in Sect. 3.1; and its acquisition function and parallel computation in Sect. 3.2. Sect. 3.3 summarizes the algorithm and Sect. 3.4 provides a theoretical performance guarantee. Extensions of the algorithm are discussed in Sect. D. 3.1 Statistical Model We now describe a generative model for f that results in a Gaussian process prior on f with a parameterized class of mean functions µ : [M]×D 7→R and covariance kernels Σ : ([M]×D)2 7→R. This allows us to use standard tools for Gaussian process inference — first finding the MLE estimate of the parameters indexing this class, and then performing Gaussian process regression using the selected mean function and covariance kernel — while also providing better estimates for MISO than would a generic multi-output GP regression kernel that does not consider the MISO application. We construct our generative model as follows. For each ℓ> 0 suppose that a function δℓ: D 7→R for each ℓ> 0 was drawn from a separate independent GP, δℓ∼GP(µℓ, Σℓ), and let δ0 be identically 0. In our generative model δℓwill be the bias f(ℓ, x) −g(x) for IS ℓ. We additionally set µℓ(x) = 0 to encode a lack of a strong belief on the direction of the bias. (If one had a strong belief that an IS is consistently biased in one direction, one may instead set µℓto a constant estimated using maximum a posteriori estimation.) Next, within our generative model, we suppose that g : D 7→R was drawn from its own independent GP, g ∼GP(µ0, Σ0), for some given µ0 and Σ0, and suppose f(ℓ, x) = f(0, x) + δℓ(x) for each ℓ. We assume that µ0 and Σℓwith ℓ≥0 belong to one of the standard parameterized classes of mean functions and covariance kernels, e.g., constant µ0 and Matérn Σℓ. With this construction, f is a GP: given any finite collection of points ℓi ∈[M], xi ∈D with i = 1, . . . , I, (f(ℓi, xi) : i = 1, . . . , I) is a sum of independent multivariate normal random vectors, and thus is itself multivariate normal. Moreover, we compute the mean function and covariance kernel of f: for ℓ, m ∈[M]0 and x, x′ ∈D, µ(ℓ, x) = E [f(ℓ, x)] = E [g(x)] + E [δℓ(x)] = µ0(x) Σ ((ℓ, x), (m, x′)) = Cov(g(x) + δℓ(x), g(x′) + δm(x′)) = Σ0(x, x′) + 1ℓ,m · Σℓ(x, x′), where 1ℓ,m denotes Kronecker’s delta, and where we have used independence of δℓ, δm, and g. We refer the reader to https://github.com/misoKG/ for an illustration of the model. 3 This generative model draws model discrepancies δℓindependently across IS. This is appropriate when IS are different in kind and share no relationship except that they model a common objective. In the supplement (Sect. B) we generalize this generative model to model correlation between model discrepancies, which is appropriate when IS can be partitioned into groups, such that IS within one group tend to agree more amongst themselves than they do with IS in other groups. Sect. B also discusses the estimation of the hyperparameters in µ0 and Σℓ. 3.2 Acquisition Function Our optimization algorithm proceeds in rounds, selecting a design x ∈D and an information source ℓ∈[M]0 in each. The value of the information obtained by sampling IS ℓat x is the expected gain in the quality of the best design that can be selected using the available information. That is, this value is the difference in the expected quality of the estimated optimum before and after the sample. We then normalize this expected gain by the cost cℓ(x) associated with the respective query, and sample the IS and design with the largest normalized gain. Without normalization we would always query the true objective, since no other IS provides more information about g than g itself. We formalize this idea. Suppose that we have already sampled n points Xn and made the observations Yn. Denote by En the expected value according to the posterior distribution given Xn, Yn, and let µ(n) (ℓ, x) := En [f(ℓ, x)]. The best expected objective value across the designs, as estimated by our statistical model, is maxx′∈D µ(n) (0, x′). Similarly, if we take an additional sample of IS ℓ(n+1) at design x(n+1) and compute our new posterior mean, the new best expected objective value across the designs is maxx′∈D µ(n+1) (0, x′), whose distribution depends on what IS we sample, and where sample it. Thus, the expected value of sampling at (ℓ, x) normalized by the cost is MKGn(ℓ, x) = En maxx′∈D µ(n+1)(0, x′) −maxx′∈D µ(n)(0, x′) cℓ(x) ℓ(n+1) = ℓ, x(n+1) = x , (1) which we refer to as the misoKG factor of the pair (ℓ, x). The misoKG policy then samples at the pair (ℓ, x) that maximizes MKGn(ℓ, x), i.e., (ℓ(n+1), x(n+1)) ∈argmaxℓ∈[M]0,x∈D MKGn(ℓ, x), which is a nested optimization problem. To make this nested optimization problem tractable, we first replace the search domain D in Eq. (1) by a discrete set A ⊂D of points, for example selected by a Latin Hypercube design. We may then compute MKGn(ℓ, x) exactly. Toward that end, note that En max x′∈A µ(n+1)(0, x′) ℓ(n+1) = ℓ, x(n+1) = x = En max x′∈A{µ(n)(0, x′) + ¯σn x′(ℓ, x) · Z} ℓ(n+1) = ℓ, x(n+1) = x , (2) where Z ∼N(0, 1) and ¯σn x′(ℓ, x) = Σn((0, x′), (ℓ, x))/ [λℓ(x) + Σn((ℓ, x), (ℓ, x))] 1 2 . Here Σn is the posterior covariance matrix of f given Xn, Yn. We parallelize the computation of MKGn(ℓ, x) for fixed ℓ, x, enabling it to utilize multiple cores. Then (ℓ(n+1), x(n+1)) is obtained by computing MKGn(ℓ, x) for all (ℓ, x) ∈[M]0 × A, a task that can be parallelized over multiple machines in a cluster. We begin by sorting the points in A in parallel by increasing value of ¯σn x′(ℓ, x) (for fixed ℓ, x). Thereby we remove some points easily identified as dominated. A point xj is dominated if maxi µ(n)(0, xi) + ¯σn xi(ℓ, x)Z is unchanged for all Z if the maximum is taken excluding xj. Note that a point xj is dominated by xk if ¯σn xj(ℓ, x) = ¯σn xk(ℓ, x) and µ(n)(0, xj) ≤µ(n)(0, xk), since xk has a higher expected value than xj for any realization of Z. Let S be the sorted sequence without such dominated points. We will remove more dominated points later. Since cℓ(x) is a constant for fixed ℓ, x, we may express the conditional expectation in Eq. (1) as En h maxi{ai+biZ}−maxi ai cℓ(x) i = En[maxi{ai+biZ}−maxi ai] cℓ(x) , where ai = µ(n)(0, xi) and bi = ¯σn xi(ℓ, x) for xi ∈S. We split S into consecutive sequences S1, S2, . . . , SC, where C is the number of cores used for computing MKGn(ℓ, x) and Si, Si+1 overlap in one element: that is, for Sj = 4 {xj1, . . . , xjk}, x(j−1)k = xj1 and xjk = x(j+1)1 hold. Each xji ∈Sj specifies a linear function aji+bjiZ (ordered by increasing slopes in S). We are interested in the realizations of Z for which aji+bjiZ ≥ai′+bi′Z for any i′ and hence compute the intersections of these functions. The functions for xji and xji+1 intersect in dji = (aji−aji+1)/(bji+1−bji). Observe if dji ≤dji−1, then aji+bjiZ ≤max{aji−1+bji−1Z, aji+1+bji+1Z} for all Z: xji is dominated and hence dropped from Sj. In this case we compute the intersection of the affine functions associated with xj−1 and xj+1 and iterate the process. Points in Sj may be dominated by the rightmost (non-dominated) point in Sj−1. Thus, we compute the intersection of the rightmost point of Sj−1 and the leftmost point of Sj, iteratively dropping all dominated points of Sj. If all points of Sj are dominated, we continue the scan with Sj+1 and so on. Observe that we may stop this scan once there is a point that is not dominated, since the points in any sequence Sj have non-decreasing d-values. If some of the remaining points in Sj are dominated by a point in Sj′ with j′ < j −1, then this will be determined when the scan initiated by Sj′ reaches Sj. Subsequently, we check the other direction, i.e. whether xj1 dominates elements of Sj−1, starting with the rightmost element of Sj−1. These checks for dominance are performed in parallel for neighboring sequences. [8] showed how to compute sequentially the expected maximum of a collection of affine functions. In particular, their Eq. (14) [8, p. 605] gives En [maxi{ai+biZ} −maxi ai] = PC j=1 Pk−1 h=1(bjh+1−bjh)u(−|djh|), where u is defined as u(z) = zΦ(z) + φ(z) for the CDF and PDF of the normal distribution. We compute the inner sums simultaneously; the computation of the outer sum could be parallelized by recursively adding pairs of inner sums, although we do not do so to avoid communication overhead. We summarize the parallel algorithm below. The Parallel Algorithm to compute (ℓ(n+1), x(n+1)): 1. Scatter the pairs (ℓ, x) ∈[M]0 × A among the machines. 2. Each computes MKGn(ℓ, x) for its pairs. To compute MKGn(ℓ, x) in parallel: a. Sort the points in A by ascending ¯σn x′(ℓ, x) in parallel, thereby removing dominated points. Let S be the sorted sequence. b. Split S into sequences S1, . . . , SC, where C is the number of cores used to compute MKGn(ℓ, x). Each core computes P xi∈SC(bi+1 −bi)u(−|di|) in parallel, then the partial sums are added to obtain En [maxi{ai + biZ} −maxi ai]. 3. Determine (ℓ(n+1), x(n+1)) ∈argmaxℓ∈[M]0,x∈D MKGn(ℓ, x) in parallel. 3.3 Summary of the misoKG Algorithm. 1. Using samples from all information sources, estimate hyperparameters of the Gaussian process prior as described in Sect. B.2. Then calculate the posterior on f based on the prior and samples. 2. Until the budget for samples is exhausted do: Determine the information source ℓ∈[M]0 and the design x∈D that maximize the misoKG factor proposed in Eq. (1) and observe IS ℓ(x). Update the posterior distribution with the new observation. 3. Return argmaxx′∈A µ(n)(0, x′). 3.4 Provable Performance Guarantees. The misoKG chooses an IS and an x such that the expected gain normalized by the query cost is maximized. Thus, misoKG is one-step Bayes optimal in this respect, by construction. We establish an additive bound on the difference between misoKG’s solution and the unknown optimum, as the number of queries N →∞. For this argument we suppose that µ(ℓ, x)=0 ∀ℓ, x and Σ0 is either the squared exponential kernel or a four times differentiable Matérn kernel. Moreover, let xOPT∈argmaxx′∈D f(0, x′), and d = maxx′∈D minx′′∈A dist(x′, x′′). 5 Theorem 1. Let x∗ N ∈A be the point that misoKG recommends in iteration N. For each p ∈[0, 1) there is a constant Kp such that with probability p lim N→∞f(0, x∗ N) ≥f(0, xOPT) −Kp · d. We point out that Frazier, Powell, and Dayanik [8] showed in their seminal work an analogous result for the case of a single information source with uniform query cost (Theorem 4 in [8]). In Sect. A we prove the statement for the MISO setting that allows multiple information sources that each have query costs cℓ(x) varying over the search domain D. This proof is simple and short. Also note that Theorem 3 establishes consistency of misoKG for the special case that D is finite, since then d = 0. Interestingly, we can compute Kp given Σ and p. Therefore, we can control the additive error Kp · d by increasing the density of A, leveraging the scalability of our parallel algorithm. 4 Numerical Experiments We now compare misoKG to other state-of-the-art MISO algorithms. We implemented misoKG’s statistical model and acquisition function in Python 2.7 and C++ leveraging functionality from the Metrics Optimization Engine [23]. We used a gradient-based optimizer [28] that first finds an optimizer via multiple restarts for each IS ℓseparately and then picks (ℓ(n+1), x(n+1)) with maximum misoKG factor among these. An implementation of our method is available at https://github.com/misoKG/. We compare to misoEI of Lam et al. [18] and to MTBO+, an improved version of Multi-Task Bayesian Optimization proposed by Swersky et al. [34]. Following a recommendation of Snoek 2016, our implementation of MTBO+ uses an improved formulation of the acquisition function given by HernándezLobato et al. [12], Snoek and et al. [31], but otherwise is identical to MTBO; in particular, it uses the statistical model of [34]. Sect. E provides detailed descriptions of these algorithms. Experimental Setup. We conduct experiments on the following test problems: (1) the 2dimensional Rosenbrock function modified to fit the MISO setting by Lam et al. [18]; (2) a MISO benchmark proposed by Swersky et al. [34] in which we optimize the 4 hyperparameters of a machine learning algorithm, using a small, related set of smaller images as cheap IS; (3) an assemble-to-order problem from Hong and Nelson [13] in which we optimize an 8-dimensional target stock vector to maximize the expected daily profit of a company as estimated by a simulator. In MISO settings the amount of initial data that one can use to inform the methods about each information source is typically dictated by the application, in particular by resource constraints and the availability of the respective source. In our experiments all methods were given identical initial datasets for each information source in every replication; these sets were drawn randomly via Latin Hypercube designs. For the sake of simplicity, we provided the same number of points for each IS, set to 2.5 points per dimension of the design space D. Regarding the kernel and mean function, MTBO+ uses the settings provided in [31]. The other algorithms used the squared exponential kernel and a constant mean function set to the average of a random sample. We report the “gain” over the best initial solution, that is the true objective value of the respective design that a method would return at each iteration minus the best value in the initial data set. If the true objective value is not known for a given design, we report the value obtained from the information source of highest fidelity. This gain is plotted as a function of the total cost, that is the cumulative cost for invoking the information sources plus the fixed cost for the initial data; this metric naturally generalizes the number of function evaluations prevalent in Bayesian optimization. Note that the computational overhead of choosing the next information source and sample is omitted, as it is negligible compared to invoking an information source in real-world applications. Error bars are shown at the mean ± 2 standard errors averaged over at least 100 runs of each algorithm. For deterministic sources a jitter of 10−6 is added to avoid numerical issues during matrix inversion. 4.1 The Rosenbrock Benchmarks We consider the design space D = [−2, 2]2, and M = 2 information sources. IS 0 is the Rosenbrock function g(x) = (1 −x1)2 + 100 · (x2 −x2 1)2 plus optional Gaussian noise u · ε. IS 1 returns 6 5005 5010 5015 5020 5025 5030 Total Cost 0 5 10 15 20 25 30 Gain misoKG MTBO+ misoEI 255 260 265 270 275 280 Total Cost 0 5 10 15 20 25 30 35 40 Gain misoKG MTBO+ misoEI Figure 1: (l) The Rosenbrock benchmark with the parameter setting of [18]: misoKG offers an excellent gain-to-cost ratio and outperforms its competitors substantially. (r) The Rosenbrock benchmark with the alternative setup. g(x)+v·sin(10·x1+5·x2), where the additional oscillatory component serves as model discrepancy. We assume a cost of 1000 for each query to IS 0 and a cost of 1 for IS 1. Since all methods converged to good solutions within few queries, we investigate the ratio of gain to cost: Fig. 1 (l) displays the gain of each method over the best initial solution as a function of the total cost inflicted by querying information sources. The new method misoKG offers a significantly better gain per unit cost and finds an almost optimal solution typically within 5 −10 samples. Interestingly, misoKG relies only on cheap samples, proving its ability to successfully handle uncertainty. MTBO+, on the other hand, struggles initially but then eventually obtains a near-optimal solution, too. To this end, it makes usually one or two queries of the expensive truth source after about 40 steps. misoEI shows a odd behavior: it takes several queries, one of them to IS 0, before it improves over the best initial design for the first time. Then it jumps to a very good solution and subsequently samples only the cheap IS. For the second setup, we set u = 1, v = 2, and suppose for IS 0 uniform noise of λ0(x) = 1 and query cost c0(x) = 50. Now the difference in costs is much smaller, while the variance is considerably bigger. The results are displayed in Fig. 1 (r): as for the first configuration, misoKG outperforms the other methods from the start. Interestingly, misoEI’s performance is drastically decreased compared to the first setup, since it only queries the expensive truth. Looking closer, we see that misoKG initially queries only the cheap information source IS 1 until it comes close to an optimal value after about five samples. It starts to query IS 0 occasionally later. 4.2 The Image Classification Benchmark This classification problem was introduced by Swersky et al. [34] to demonstrate that MTBO can reduce the cost of hyperparameter optimization by leveraging a small dataset as information source. The goal is to optimize four hyperparameters of the logistic regression algorithm [36] using a stochastic gradient method with mini-batches (the learning rate, the L2-regularization parameter, the batch size, and the number of epochs) to minimize the classification error on the MNIST dataset [21]. This dataset contains 70,000 images of handwritten digits: each image has 784 pixels. IS 1 uses the USPS dataset [38] of about 9000 images with 256 pixels each. The query costs are 4.5 for IS 1 and 43.69 for IS 0. A closer examination shows that IS 1 is subject to considerable bias with respect to IS 0, making it a challenge for MISO algorithms. Fig.2 (l) summarizes performance: initially, misoKG and MTBO+ are on par. Both clearly outperform misoEI that therefore was stopped after 50 iterations. misoKG and MTBO+ continued for 150 steps (with a lower number of replications). misoKG usually achieves an optimal test error of about 7.1% on the MNIST testset after about 80 queries, matching the classification performance of the best setting reported by Swersky et al. [34]. Moreover, misoKG achieves better solutions than MTBO+ at the same costs. Note that the results in [34] show that MTBO+ will also converge to the optimum eventually. 7 6.2 6.4 6.6 6.8 7.0 7.2 7.4 log(Total Cost) 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20 Testerror misoKG MTBO+ misoEI 6.08 6.10 6.12 6.14 6.16 6.18 6.20 6.22 log(Total Cost) 0 5 10 15 20 25 30 35 40 Gain misoKG MTBO+ misoEI Figure 2: (l) The performance on the image classification benchmark of [34]. misoKG achieves better test errors after about 80 steps and converges to the global optimum. (r) misoKG outperforms the other algorithms on the assemble-to-order benchmark that has significant model discrepancy. 4.3 The Assemble-To-Order Benchmark The assemble-to-order (ATO) benchmark is a reinforcement learning problem from a business application where the goal is to optimize an 8-dimensional target level vector over [0, 20]8 (see Sect. G for details). We set up three information sources: IS 0 and 2 use the discrete event simulator of Xie et al. [42], whereas the cheapest source IS 1 invokes the implementation of Hong and Nelson. IS 0 models the truth. The two simulators differ subtly in the model of the inventory system. However, the effect in estimated objective value is significant: on average the outputs of both simulators at the same target vector differ by about 5% of the score of the global optimum, which is about 120, whereas the largest observed bias out of 1000 random samples was 31.8. Thus, we are witnessing a significant model discrepancy. Fig. 2 (r) summarizes the performances. misoKG outperforms the other algorithms from the start: misoKG averages at a gain of 26.1, but inflicts only an average query cost of 54.6 to the information sources. This is only 6.3% of the query cost that misoEI requires to achieve a comparable score. Interestingly, misoKG and MTBO+ utilize mostly the cheap biased IS, and therefore are able to obtain significantly better gain to cost ratios than misoEI. misoKG’s typically first calls IS 2 after about 60 −80 steps. In total, misoKG queries IS 2 about ten times within the first 150 steps; in some replications misoKG makes one late call to IS 0 when it has already converged. Our interpretation is that misoKG exploits the cheap, biased IS 1 to zoom in on the global optimum and switches to the unbiased but noisy IS 2 to identify the optimal solution exactly. This is the expected (and desired) behavior for misoKG when the uncertainty of f(0, x∗) is not expected to be reduced sufficiently by queries to IS 1. MTBO+ trades off the gain versus cost differently: it queries IS 0 once or twice after 100 steps and directs all other queries to IS 1, which might explain the observed lower performance. misoEI, which employs a two-step heuristic for trading off predicted gain and query cost, almost always chose to evaluate the most expensive IS. 5 Conclusion We have presented a novel algorithm for MISO that uses a mean function and covariance matrix motivated by a MISO-specific generative model. We have proposed a novel acquisition function that extends the knowledge gradient to the MISO setting and comes with a fast parallel method for computing it. Moreover, we have provided a theoretical guarantee on the solution quality delivered by this algorithm, and demonstrated through numerical experiments that it improves significantly over the state of the art. Acknowledgments This work was partially supported by NSF CAREER CMMI-1254298, NSF CMMI-1536895, NSF IIS-1247696, AFOSR FA9550-12-1-0200, AFOSR FA9550-15-1-0038, and AFOSR FA9550-16-10046. 8 References [1] D. Allaire and K. Willcox. A mathematical and computational framework for multifidelity design and analysis with computer models. International Journal for Uncertainty Quantification, 4(1), 2014. [2] M. A. Alvarez, L. Rosasco, and N. D. Lawrence. Kernels for vector-valued functions: A review. Foundations and Trends in Machine Learning, 4(3):195–266, 2012. [3] E. V. Bonilla, K. M. Chai, and C. Williams. Multi-task gaussian process prediction. In Advances in Neural Information Processing Systems, pages 153–160, 2007. [4] J. Brynjarsdottir and A. O’Hagan. Learning about physical parameters: the importance of model discrepancy. Inverse Problems, 30(11), 2014. [5] E. Çınlar. Probability and Stochastics, volume 261 of Graduate texts in Mathematics. Springer, 2011. [6] A. I. Forrester, A. Sóbester, and A. J. Keane. Multi-fidelity optimization via surrogate modelling. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 463(2088):3251–3269, 2007. [7] P. I. Frazier, W. B. Powell, and S. Dayanik. A knowledge-gradient policy for sequential information collection. SIAM Journal on Control and Optimization, 47(5):2410–2439, 2008. [8] P. I. Frazier, W. B. Powell, and S. Dayanik. The Knowledge Gradient Policy for Correlated Normal Beliefs. INFORMS Journal on Computing, 21(4):599–613, 2009. [9] S. Ghosal and A. Roy. Posterior consistency of Gaussian process prior for nonparametric binary regression. The Annals of Statistics, 34(5):2413–2429, 2006. [10] P. Goovaerts. Geostatistics for Natural Resources Evaluation. Oxford University, 1997. [11] P. Hennig and C. J. Schuler. Entropy search for information-efficient global optimization. The Journal of Machine Learning Research, 13(1):1809–1837, 2012. [12] J. M. Hernández-Lobato, M. W. Hoffman, and Z. Ghahramani. Predictive entropy search for efficient global optimization of black-box functions. In Advances in Neural Information Processing Systems, pages 918–926, 2014. [13] L. J. Hong and B. L. Nelson. Discrete optimization via simulation using compass. Operations Research, 54(1):115–129, 2006. [14] D. Huang, T. Allen, W. Notz, and R. Miller. Sequential kriging optimization using multiplefidelity evaluations. Structural and Multidisciplinary Optimization, 32(5):369–382, 2006. [15] K. Kandasamy, G. Dasarathy, J. B. Oliva, J. Schneider, and B. Poczos. Gaussian process bandit optimisation with multi-fidelity evaluations. In Advances in Neural Information Processing Systems, 2016. The code is available at https://github.com/kirthevasank/mf-gp-ucb. Last Accessed on 04/22/2017. [16] M. C. Kennedy and A. O’Hagan. Predicting the output from a complex computer code when fast approximations are available. Biometrika, 87(1):1–13, 2000. [17] A. Klein, S. Falkner, S. Bartels, P. Hennig, and F. Hutter. Fast bayesian optimization of machine learning hyperparameters on large datasets. CoRR, abs/1605.07079, 2016. [18] R. Lam, D. Allaire, and K. Willcox. Multifidelity optimization using statistical surrogate modeling for non-hierarchical information sources. In 56th AIAA/ASCE/AHS/ASC Structures, Structural Dynamics, and Materials Conference, 2015. [19] L. Le Gratiet and C. Cannamela. Cokriging-based sequential design strategies using fast cross-validation techniques for multi-fidelity computer codes. Technometrics, 57(3):418–427, 2015. 9 [20] L. Le Gratiet and J. Garnier. Recursive co-kriging model for design of computer experiments with multiple levels of fidelity. International Journal for Uncertainty Quantification, 4(5), 2014. [21] Y. LeCun, C. Cortes, and C. J. Burges. The MNIST database of handwritten digits, 2017. http://yann.lecun.com/exdb/mnist/. Last Accessed on 05/15/2017. [22] P. Milgrom and I. Segal. Envelope theorems for arbitrary choice sets. Econometrica, 70(2): 583–601, 2002. [23] MOE. Metrics optimization engine. http://yelp.github.io/MOE/, 2016. Last Accessed on 05/15/2017. [24] V. Picheny, D. Ginsbourger, Y. Richet, and G. Caplin. Quantile-based optimization of noisy computer experiments with tunable precision. Technometrics, 55(1):2–13, 2013. [25] M. Poloczek, J. Wang, and P. I. Frazier. Warm starting bayesian optimization. In Winter Simulation Conference (WSC), pages 770–781. IEEE, 2016. Also available on arXiv https: //arxiv.org/abs/1608.03585. [26] H. Qu, I. O. Ryzhov, M. C. Fu, and Z. Ding. Sequential selection with unknown correlation structures. Operations Research, 63(4):931–948, 2015. [27] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. ISBN ISBN 0-262-18253-X. [28] W. R. Scott, P. I. Frazier, and W. B. Powell. The correlated knowledge gradient for simulation optimization of continuous parameters using gaussian process regression. SIAM Journal on Optimization, 21(3):996–1026, 2011. [29] A. Shah and Z. Ghahramani. Parallel predictive entropy search for batch global optimization of expensive objective functions. In Advances in Neural Information Processing Systems, pages 3330–3338, 2015. [30] J. Snoek. Personal communication, 2016. [31] J. Snoek and et al. Spearmint. http://github.com/HIPS/Spearmint, 2017. Last Accessed on 05/15/2017. [32] J. Snoek, H. Larochelle, and R. P. Adams. Practical bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems, pages 2951–2959, 2012. [33] N. Srinivas, A. Krause, S. M. Kakade, and M. Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. arXiv preprint arXiv:0912.3995, 2009. [34] K. Swersky, J. Snoek, and R. P. Adams. Multi-task bayesian optimization. In Advances in Neural Information Processing Systems, pages 2004–2012, 2013. [35] Y.-W. Teh, M. Seeger, and M. Jordan. Semiparametric latent factor models. In Artificial Intelligence and Statistics 10, 2005. [36] Theano. Theano: Logistic regression, 2017. http://deeplearning.net/tutorial/code/ logistic_sgd.py. Last Accessed on 05/16/2017. [37] S. Toscano-Palmerin and P. I. Frazier. Stratified bayesian optimization. In Proceedings of the 12th International Conference on Monte Carlo and Quasi-Monte Carlo Methods in Scientific Computing, 2016. Accepted for Publication. Also available at https://arxiv.org/abs/ 1602.02338. [38] USPS. USPS dataset, 2017. http://mldata.org/repository/data/viewslug/usps/. Last Accessed on 05/16/2017. [39] J. Villemonteix, E. Vazquez, and E. Walter. An informational approach to the global optimization of expensive-to-evaluate functions. Journal of Global Optimization, 44(4):509–534, 2009. 10 [40] R. L. Winkler. Combining probability distributions from dependent information sources. Management Science, 27(4):479–488, 1981. [41] J. Wu, M. Poloczek, A. G. Wilson, and P. I. Frazier. Bayesian optimization with gradients. In Advances in Neural Information Processing Systems, 2017. Accepted for Publication. Also available at https://arxiv.org/abs/1703.04389. [42] J. Xie, P. I. Frazier, and S. Chick. Assemble to order simulator. http://simopt.org/wiki/ index.php?title=Assemble_to_Order&oldid=447, 2012. Last Accessed on 05/16/2017. 11 | 2017 | 576 |
7,092 | Differentially private Bayesian learning on distributed data Mikko Heikkilä1 mikko.a.heikkila@helsinki.fi Eemil Lagerspetz2 eemil.lagerspetz@helsinki.fi Samuel Kaski3 samuel.kaski@aalto.fi Kana Shimizu4 shimizu.kana.g@gmail.com Sasu Tarkoma2 sasu.tarkoma@helsinki.fi Antti Honkela1,5 antti.honkela@helsinki.fi 1 Helsinki Institute for Information Technology HIIT, Department of Mathematics and Statistics, University of Helsinki 2 Helsinki Institute for Information Technology HIIT, Department of Computer Science, University of Helsinki 3 Helsinki Institute for Information Technology HIIT, Department of Computer Science, Aalto University 4 Department of Computer Science and Engineering, Waseda University 5 Department of Public Health, University of Helsinki Abstract Many applications of machine learning, for example in health care, would benefit from methods that can guarantee privacy of data subjects. Differential privacy (DP) has become established as a standard for protecting learning results. The standard DP algorithms require a single trusted party to have access to the entire data, which is a clear weakness, or add prohibitive amounts of noise. We consider DP Bayesian learning in a distributed setting, where each party only holds a single sample or a few samples of the data. We propose a learning strategy based on a secure multi-party sum function for aggregating summaries from data holders and the Gaussian mechanism for DP. Our method builds on an asymptotically optimal and practically efficient DP Bayesian inference with rapidly diminishing extra cost. 1 Introduction Differential privacy (DP) [9, 11] has recently gained popularity as the theoretically best-founded means of protecting the privacy of data subjects in machine learning. It provides rigorous guarantees against breaches of individual privacy that are robust even against attackers with access to additional side information. DP learning methods have been proposed e.g. for maximum likelihood estimation [24], empirical risk minimisation [5] and Bayesian inference [e.g. 8, 13, 16, 17, 19, 25, 29]. There are DP versions of most popular machine learning methods, including linear regression [16, 28], logistic regression [4], support vector machines [5], and deep learning [1]. Almost all existing DP machine learning methods assume that some trusted party has unrestricted access to all the data in order to add the necessary amount of noise needed for the privacy guarantees. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. This is a highly restrictive assumption for many applications, e.g. for learning with data on mobile devices, and creates huge privacy risks through a potential single point of failure. In this paper we introduce a general strategy for DP Bayesian learning in the distributed setting with minimal overhead. Our method builds on the asymptotically optimal sufficient statistic perturbation mechanism [13, 16] and shares its asymptotic optimality. The method is based on a DP secure multi-party communication (SMC) algorithm, called Distributed Compute algorithm (DCA), for achieving DP in the distributed setting. We demonstrate good performance of the method on DP Bayesian inference using linear regression as an example. 1.1 Our contribution We propose a general approach for privacy-sensitive learning in the distributed setting. Our approach combines SMC with DP Bayesian learning methods, originally introduced for the non-distributed setting including a trusted party, to achieve DP Bayesian learning in the distributed setting. To demonstrate our framework in practice, we combine the Gaussian mechanism for (ϵ, δ)-DP with efficient DP Bayesian inference using sufficient statistics perturbation (SSP) and an efficient SMC approach for secure distributed computation of the required sums of sufficient statistics. We prove that the Gaussian SSP is an efficient (ϵ, δ)-DP Bayesian inference method and that the distributed version approaches this quickly as the number of parties increases. We also address the subtle challenge of normalising the data privately in a distributed manner, required for the proof of DP in distributed DP learning. 2 Background 2.1 Differential privacy Differential privacy (DP) [11] gives strict, mathematically rigorous guarantees against intrusions on individual privacy. A randomised algorithm is differentially private if its results on adjacent data sets are likely to be similar. Here adjacency means that the data sets differ by a single element, i.e., the two data sets have the same number of samples, but they differ on a single one. In this work we utilise a relaxed version of DP called (ϵ, δ)-DP [9, Definition 2.4]. Definition 2.1. A randomised algorithm A is (ϵ, δ)-DP, if for all S ⊆Range (A) and all adjacent data sets D, D′, P(A(D) ∈S) ≤exp(ϵ)P(A(D′) ∈S) + δ. The parameters ϵ and δ in Definition 2.1 control the privacy guarantee: ϵ tunes the amount of privacy (smaller ϵ means stricter privacy), while δ can be interpreted as the proportion of probability space where the privacy guarantee may break down. There are several established mechanisms for ensuring DP. We use the Gaussian mechanism [9, Theorem 3.22]. The theorem says that given a numeric query f with ℓ2-sensitivity ∆2(f), adding noise distributed as N(0, σ2) to each output component guarantees (ϵ, δ)-DP, when σ2 > 2 ln(1.25/δ)(∆2(f)/ϵ)2. (1) Here, the ℓ2-sensitivity of a function f is defined as ∆2(f) = sup D∼D′ ∥f(D) −f(D′)∥2, (2) where the supremum is over all adjacent data sets D, D′. 2.2 Differentially private Bayesian learning Bayesian learning provides a natural complement to DP because it inherently can handle uncertainty, including uncertainty introduced to ensure DP [26], and it provides a flexible framework for data modelling. Three distinct types of mechanisms for DP Bayesian inference have been proposed: 1. Drawing a small number of samples from the posterior or an annealed posterior [7, 25]; 2 2. Sufficient statistics perturbation (SSP) of an exponential family model [13, 16, 19]; and 3. Perturbing the gradients in gradient-based MCMC [25] or optimisation in variational inference [17]. For models where it applies, the SSP approach is asymptotically efficient [13, 16], unlike the posterior sampling mechanisms. The efficiency proof of [16] can be generalised to (ϵ, δ)-DP and Gaussian SSP as shown in the Supplementary Material. The SSP (#2) and gradient perturbation (#3) mechanisms are of similar form in that the DP mechanism ultimately computes a perturbed sum z = N X i=1 zi + η (3) over quantities zi computed for different samples i = 1, . . . , N, where η denotes the noise injected to ensure the DP guarantee. For SSP [13, 16, 19], the zi are the sufficient statistics of a particular sample, whereas for gradient perturbation [17, 25], the zi are the clipped per-sample gradient contributions. When a single party holds the entire data set, the sum z in Eq. (3) can be computed easily, but the case of distributed data makes things more difficult. 3 Secure and private learning with distributed data Let us assume there are N data holders (called clients in the following), who each hold a single data sample. We would like to use the aggregate data for learning, but the clients do not want to reveal their data as such to anybody else. The main problem with the distributed setting is that if each client uses a trusted aggregator (TA) DP technique separately, the noise η in Eq. (3) is added by each client, increasing the total noise variance by a factor of N compared to the non-distributed single TA setting, effectively reducing to naive input perturbation. To reduce the noise level without compromising on privacy, the individual data samples need to be combined without directly revealing them to anyone. Our solution to this problem uses an SMC approach based on a form of secret sharing: each client sends their term of the sum, split to separate messages, to M servers such that together the messages sum up to the desired value, but individually they are just random noise. This can be implemented efficiently using a fixed-point representation of real numbers which allows exact cancelling of the noise in the addition. Like any secret sharing approach, this algorithm is secure as long as not all M servers collude. Cryptography is only required to secure the communication between the client and the server. Since this does not need to be homomorphic as in many other protocols, faster symmetric cryptography can be used for the bulk of the data. We call this the Distributed Compute Algorithm (DCA), which we introduce next in detail. 3.1 Distributed compute algorithm (DCA) In order to add the correct amount of noise while avoiding revealing the unperturbed data to any single party, we combine an encryption scheme with the Gaussian mechanism for DP as illustrated in Fig. 1(a). Each individual client adds a small amount of Gaussian noise to his data, resulting in the aggregated noise to be another Gaussian with large enough variance. The details of the noise scaling are presented in the Section 3.1.2. The scheme relies on several independent aggregators, called Compute nodes (Algorithm 1). At a general level, the clients divide their data and some blinding noise into shares that are each sent to one Compute. After receiving shares from all clients, each Compute decrypts the values, sums them and broadcasts the results. The final results can be obtained by summing up the values from all Computes, which cancels the blinding noise. 3.1.1 Threat model We assume there are at most T clients who may collude to break the privacy, either by revealing the noise they add to their data samples or by abstaining from adding the noise in the first place. The rest are honest-but-curious (HbC), i.e., they will take a peek at other people’s data if given the chance, but they will follow the protocol. 3 zi + ηi N Clients Individual encryption M Compute Nodes Message Router Sum of N decrypted messages DP Result Compute Node Compute Node N messages N messages Sum of N decrypted messages Enc(mi,l) Σi zi+ η (a) DCA setting 0 20 40 60 80 100 Number of clients 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 Scaling factor Scaling factor needed to guarantee privacy Number of colluding clients T=0 T=5 T=10 (b) Extra scaling factor Figure 1: 1(a): Schematic diagram of the Distributed Compute algorithm (DCA). Red refers to encrypted values, blue to unencrypted (but blinded or DP) values. 1(b) Extra scaling factor needed for the noise in the distributed setting with T colluding clients as compared to the trusted aggregator setting. Algorithm 1 Distributed Compute Algorithm for distributed summation with independent Compute nodes Input: d-dimensional vectors zi held by clients i ∈{1, . . . , N}; Distributed Gaussian mechanism noise variances σ2 j , j = 1, . . . , d (public); Number of parties N (public); Number of Compute nodes M (public); Output: Differentially private sum PN i=1 (zi + ηi), where ηi ∼N(0, diag(σ2 j )) 1: Each client i simulates ηi ∼N(0, diag(σ2 j )) and M −1 vectors ri,k of uniformly random fixed-point data with ri,M = −PM−1 k=1 ri,k to ensure that PM k=1 ri,k = 0d (a vector of zeros). 2: Each client i computes the messages mi,1 = zi + ηi + ri,1, mi,k = ri,k, k = 2, . . . M, and sends them securely to the corresponding Compute k. 3: After receiving messages from all of the clients, Compute k decrypts the values and broadcasts the noisy aggregate sums qk = PN i=1 mi,k. A final aggregator will then add these to obtain PM k=1 qk = PN i=1(zi + ηi). To break the privacy of individual clients, all Compute nodes need to collude. We therefore assume that at least one Compute node follows the protocol. We further assume that all parties have an interest in the results and hence will not attempt to pollute the results with invalid values. 3.1.2 Privacy of the mechanism In order to guarantee that the sum-query results returned by Algorithm 1 are DP, we need to show that the variance of the aggregated Gaussian noise is large enough. Theorem 1 (Distributed Gaussian mechanism). If at most T clients collude or drop out of the protocol, the sum-query result returned by Algorithm 1 is (ϵ, δ)-DP, when the variance of the added noise σ2 j fulfils σ2 j ≥ 1 N −T −1σ2 j,std, where N is the number of clients and σ2 j,std is the variance of the noise in the standard (ϵ, δ)-DP Gaussian mechanism given in Eq. (1). Proof. See Supplement. In the case of all HbC clients, T = 0. The extra scaling factor increases the variance of the DP, but this factor quickly approaches 1 as the number of clients increases, as can be seen from Figure 1(b). 4 3.1.3 Fault tolerance The Compute nodes need to know which clients’ contributions they can safely aggregate. This feature is simple to implement e.g. with pairwise-communications between all Compute nodes. In order to avoid having to start from scratch due to insufficient noise for DP, the same strategy used to protect against colluding clients can be utilized: when T > 0, at most T clients in total can drop or collude and the scheme will still remain private. 3.1.4 Computational scalability Most of the operations needed in Algorithm 1 are extremely fast: encryption and decryption can use fast symmetric algorithms such as AES (using slower public key cryptography just for the key of the symmetric system) and the rest is just integer additions for the fixed point arithmetic. The likely first bottlenecks in the implementation would be caused by synchronisation when gathering the messages as well as the generation of cryptographically secure random vectors ri,k. 3.2 Differentially private Bayesian learning on distributed data In order to perform DP Bayesian learning securely in the distributed setting, we use DCA (Algorithm 1) to compute the required data summaries that correspond to Eq. (3). In this Section we consider how to combine this scheme with concrete DP learning methods introduced for the trusted aggregator setting, so as to provide a wide range of possibilities for performing DP Bayesian learning securely with distributed data. The aggregation algorithm is most straightforward to apply to the SSP method [13, 16] for exact and approximate posterior inference on exponential family models. [13] and [16] use Laplacian noise to guarantee ϵ-DP, which is a stricter form of privacy than the (ϵ, δ)-DP used in DCA [9]. We consider here only (ϵ, δ)-DP version of the methods, and discuss the possible Laplace noise mechanism further in Section 7. The model training in this case is done in a single iteration, so a single application of Algorithm 1 is enough for learning. We consider a more detailed example in Section 3.2.1. We can also apply DCA to DP variational inference [17, 19]. These methods rely on possibly clipped gradients or expected sufficient statistics calculated from the data. Typically, each training iteration would use only a mini-batch instead of the full data. To use variational inference in the distributed setting, an arbitrary party keeps track of the current (public) model parameters and the privacy budget, and asks for updates from the clients. At each iteration, the model trainer selects a random mini-batch of fixed public size from the available clients and sends them the current model parameters. The selected clients then calculate the clipped gradients or expected sufficient statistics using their data, add noise to the values scaled reflecting the batch size, and pass them on using DCA. The model trainer receives the decrypted DP sums from the output and updates the model parameters. 3.2.1 Distributed Bayesian linear regression with data projection As an empirical example, we consider Bayesian linear regression (BLR) with data projection in the distributed setting. The standard BLR model depends on the data only through sufficient statistics and the approach discussed in Section 3.2 can be used in a straightforward manner to fit the model by running a single round of DCA. The more efficient BLR with projection (Algorithm 2) [16] reduces the data range, and hence sensitivity, by non-linearly projecting all data points inside stricter bounds, which translates into less added noise. We can select the bounds to optimize bias vs. DP noise variance. In the distributed setting, we need to run an additional round of DCA and use some privacy budget to estimate data standard deviations (stds). However, as shown by the test results (Figures 2 and 3), this can still achieve significantly better utility with a given privacy level. The assumed bounds in Step 1 of Algorithm 2 would typically be available from general knowledge of the data. The initial projection in Step 1 ensures the privacy of the scheme even if the bounds are invalid for some samples. We determine the optimal final projection thresholds pj in Step 3 using the same general approach as [16]: we create an auxiliary data set of equal size as the original with data 5 Algorithm 2 Distributed linear regression with projection Input: Data and target values (xij, yi), j = 1, . . . , d held by clients i ∈{1, . . . , N}; Number of clients N (public); Assumed data and target bounds (−cj, cj), j = 1, . . . , d + 1 (public); Privacy budget (ϵ, δ) (public); Output: DP BLR model sufficient statistics of projected data PN i=1 ˆxiˆxT i +η(1), PN i=1 ˆxT i ˆyi +η(2), calculated using projection to estimated optimal bounds 1: Each client projects his data to the assumed bounds (−cj, cj) ∀j. 2: Calculate marginal std estimates σ(1), . . . , σ(d+1) by running Algorithm 1 using the assumed bounds for sensitivity and a chosen share of the privacy budget. 3: Estimate optimal projection thresholds pj, j = 1, . . . , d + 1 as fractions of std on auxiliary data. Each client then projects his data to the estimated optimal bounds (−pjσ(j), pjσ(j)), j = 1, . . . , d + 1. 4: Aggregate the unique terms in the DP sufficient statistics by running Algorithm 1 using the estimated optimal bounds for sensitivity and the remaining privacy budget, and combine the DP result vectors into the symmetric d × d matrix and d-dimensional vector of DP sufficient statistics. generated as xi ∼N(0, Id) (4) β ∼N(0, λ0I) (5) yi|xi ∼N(xT i β, λ). (6) We then perform grid search on the auxiliary data with varying thresholds to find the one providing optimal prediction performance. The source code for our implementation is available through GitHub1 and a more detailed description can be found in the Supplement. 4 Experimental setup We demonstrate the secure DP Bayesian learning scheme in practice by testing the performance of the BLR with data projection, the implementation of which was discussed in Section 3.2.1, along with the DCA (Algorithm 1) in the all HbC clients distributed setting (T = 0). With the DCA our primary interest is scalability. In the case of BLR implementation, we are mostly interested in comparing the distributed algorithm to the trusted aggregator version as well as comparing the performance of the straightforward BLR to the variant using data projection, since it is not clear a priori if the extra cost in privacy necessitated by the projection in the distributed setting is offset by the reduced noise level. We use simulated data for the DCA scalability testing, and real data for the BLR tests. As real data, we use the Wine Quality [6] (split into white and red wines) and Abalone data sets from the UCI repository[18], as well as the Genomics of Drug Sensitivity in Cancer (GDSC) project data 2. The measured task in the GDSC data is to predict drug sensitivity of cancer cell lines from gene expression data (see Supplement for a more detailed description). The datasets are assumed to be zero-centred. This assumption is not crucial but is done here for simplicity; non-zero data means can be estimated like the marginal stds at the cost of some added noise (see Section 3.2.1). For estimating the marginal std, we also need to assume bounds for the data. For unbounded data, we can enforce arbitrary bounds simply by projecting all data inside the chosen bounds, although very poor choice of bounds will lead to poor performance. With real distributed data, the assumed bounds could differ from the actual data range. In the UCI tests we simulate this effect by scaling each data dimension to have a range of length 10, and then assuming bounds of [−7.5, 7.5], i.e., the assumed bounds clearly overestimate the length of the true range, thus adding more noise to the results. The actual scaling chosen here is arbitrary. With the GDSC data, the true ranges are mostly known due to the nature of the data (see Supplement). 1https://github.com/DPBayes/dca-nips2017 2http://www.cancerrxgene.org/, release 6.1, March 2017 6 N=102 N=103 N=104 N=105 d=10 1.72 1.89 2.99 8.58 d=102 2.03 2.86 12.36 65.64 d=103 3.43 10.56 101.2 610.55 d=104 15.30 84.95 994.96 1592.29 Table 1: DCA experiment average runtimes in seconds with 5 repeats, using M=10 Compute nodes, N clients and vector length d. 1.0 1.78 3.16 5.62 10.0 31.62 epsilon 1.0 1.5 2.0 2.5 3.0 3.5 4.0 MAE NP proj NP TA DDP proj DDP input perturbed proj TA d=11, sample size=1000, repeats=25, δ = 0.0001 (a) Red wine data set 1.0 1.78 3.16 5.62 10.0 31.62 epsilon 1.0 1.5 2.0 2.5 MAE NP proj NP TA DDP proj DDP input perturbed proj TA d=8, sample size=3000, repeats=25, δ = 0.0001 (b) Abalone data set 1.0 1.78 3.16 5.62 10.0 31.62 epsilon 1.0 1.5 2.0 2.5 MAE NP proj NP TA DDP proj DDP input perturbed proj TA d=11, sample size=3000, repeats=25, δ = 0.0001 (c) White wine data set Figure 2: Median of the predictive accuracy measured on mean absolute error (MAE) on several UCI data sets with error bars denoting the interquartile range (lower is better). The performance of the distributed methods (DDP, DDP proj) is indistinguishable from the corresponding undistributed algorithms (TA, TA proj) and the projection (proj TA, proj DDP) can clearly be beneficial for prediction performance. NP refers to non-private version, TA to the trusted aggregator setting, DDP to the distributed scheme. The optimal projection thresholds are searched for using 10 (GDSC) or 20 (UCI) repeats on a grid with 20 points between 0.1 and 2.1 times the std of the auxiliary data set. In the search we use one common threshold for all data dimensions and a separate one for the target. For accuracy measure, we use prediction accuracy on a separate test data set. The size of the test set for UCI in Figure 2 is 500 for red wine, 1000 for white wine, and 1000 for abalone data. The test set size for GDSC in Figure 3 is 100. For UCI, we compare the median performance measured on mean absolute error over 25 cross-validation (CV) runs, while for GDSC we measure mean prediction accuracy to sensitive vs insensitive with Spearman’s rank correlation on 25 CV runs. In both cases, we use input perturbation [11] and the trusted aggregator setting as baselines. 5 Results Table 1 shows runtimes of a distributed Spark implementation of the DCA algorithm. The timing excludes encryption, but running AES for the data of the largest example would take less than 20 s on a single thread on a modern CPU. The runtime modestly increases as N or d is increased. This suggests that the prototype is reasonably scalable. Spark overhead sets a lower bound runtime of approximately 1 s for small problems. For large N and d, sequential communication at the 10 Compute threads is the main bottleneck. Larger N could be handled by introducing more Compute nodes and clients only communicating with a subset of them. Comparing the results on predictive error with and without projection (Fig. 2 and Fig. 3), it is clear that despite incurring extra privacy cost for having to estimate the marginal standard deviations, using the projection can improve the results markedly with a given privacy budget. The results also demonstrate that compared to the trusted aggregator setting, the extra noise added due to the distributed setting with HbC clients is insignificant in practice as the results of the distributed and trusted aggregator algorithms are effectively indistinguishable. 7 1.0 3.0 5.0 7.5 10.0 epsilon 0.00 0.05 0.10 0.15 0.20 0.25 Predictive accuracy NP proj NP TA DDP proj DDP input perturbed proj TA d=10, sample size=840, CV=25, δ=0.0001 (a) Drug sensitivity prediction 1.0 3.0 5.0 7.5 10.0 epsilon 0.00 0.05 0.10 0.15 0.20 0.25 Predictive accuracy NP DDP proj DDP input perturbed d=10, sample size=840, CV=25, δ=0.0001 (b) Drug sensitivity prediction, selected methods Figure 3: Mean drug sensitivity prediction accuracy on GDSC dataset with error bars denoting standard deviation over CV runs (higher is better). Distributed results (DDP, proj DDP) do not differ markedly from the corresponding trusted aggregator (TA, proj TA) results. The projection (proj TA, proj DDP) is clearly beneficial for performance. The actual sample size varies between drugs. NP refers to non-private version, TA to the trusted aggregator setting, DDP to the distributed scheme. 6 Related work The idea of distributed private computation through addition of noise generated in a distributed manner was first proposed by Dwork et al. [10]. However, to the best of our knowledge, there is no prior work on secure DP Bayesian statistical inference in the distributed setting. In machine learning, [20] presented the first method for aggregating classifiers in a DP manner, but their approach is sensitive to the number of parties and sizes of the data sets held by each party and cannot be applied in a completely distributed setting. [21] improved upon this by an algorithm for distributed DP stochastic gradient descent that works for any number of parties. The privacy of the algorithm is based on perturbation of gradients which cannot be directly applied to the efficient SSP mechanism. The idea of aggregating classifiers was further refined in [15] through a method that uses an auxiliary public data set to improve the performance. The first practical method for implementing DP queries in a distributed manner was the distributed Laplace mechanism presented in [22]. The distributed Laplace mechanism could be used instead of the Gaussian mechanism if pure ϵ-DP is required, but the method, like those in [20, 21], needs homomorphic encryption which is computationally more demanding, especially for high-dimensional data. There is a wealth of literature on secure distributed computation of DP sum queries as reviewed in [14]. The methods of [23, 2, 3, 14] also include different forms of noise scaling to provide collusion resistance and/or fault tolerance, where the latter requires a separate recovery round after data holder failures which is not needed by DCA. [12] discusses low level details of an efficient implementation of the distributed Laplace mechanism. Finally, [27] presents several proofs related to the SMC setting and introduce a protocol for generating approximately Gaussian noise in a distributed manner. Compared to their protocol, our method of noise addition is considerably simpler and faster, and produces exactly instead of approximately Gaussian noise with negligible increase in noise level. 7 Discussion We have presented a general framework for performing DP Bayesian learning securely in a distributed setting. Our method combines a practical SMC method for calculating secure sum queries with efficient Bayesian DP learning techniques adapted to the distributed setting. 8 DP methods are based on adding sufficient noise to effectively mask the contribution of any single sample. The extra loss in accuracy due to DP tends to diminish as the number of samples increases and efficient DP estimation methods converge to their non-private counterparts as the number of samples increases [13, 16]. A distributed DP learning method can significantly help in increasing the number of samples because data held by several parties can be combined thus helping make DP learning significantly more effective. Considering the DP and the SMC components separately, although both are necessary for efficient privacy-aware learning, it is clear that the choice of method to use for each sub-problem can be made largely independently. Assessing these separately, we can therefore easily change the privacy mechanism from the Gaussian used in Algorithm 1 to the Laplace mechanism, e.g. by utilising one of the distributed Laplace noise addition methods presented in [14] to obtain a pure ϵ-DP method. If need be, the secure sum algorithm in our method can also be easily replaced with one that better suits the security requirements at hand. While the noise introduced for DP will not improve the performance of an otherwise good learning algorithm, a DP solution to a learning problem can yield better results if the DP guarantees allow access to more data than is available without privacy. Our distributed method can further help make this more efficient by securely and privately combining data from multiple parties. Acknowledgements This work was funded by the Academy of Finland [Centre of Excellence COIN and projects 259440, 278300, 292334, 294238, 297741, 303815, 303816], the Japan Agency for Medical Research and Development (AMED), and JST CREST [JPMJCR1688]. References [1] M. Abadi, A. Chu, I. Goodfellow, H. B. McMahan, I. Mironov, K. Talwar, and L. Zhang. Deep learning with differential privacy. In Proc. CCS 2016, 2016. [2] G. Ács and C. Castelluccia. I have a DREAM! (DiffeRentially privatE smArt Metering). In Proc. 13th International Conference in Information Hiding (IH 2011), pages 118–132, 2011. [3] T. H. H. Chan, E. Shi, and D. Song. Privacy-preserving stream aggregation with fault tolerance. In Proc. 16th Int. Conf. on Financial Cryptography and Data Security (FC 2012), pages 200–214, 2012. [4] K. Chaudhuri and C. Monteleoni. Privacy-preserving logistic regression. In Advances in Neural Information Processing Systems 21, pages 289–296. 2009. [5] K. Chaudhuri, C. Monteleoni, and A. D. Sarwate. Differentially private empirical risk minimization. J. Mach. Learn. Res., 12:1069–1109, 2011. [6] P. Cortez, A. Cerdeira, F. Almeida, T. Matos, and J. Reis. Modeling wine preferences by data mining from physicochemical properties. Decision Support Systems, 47(4):547–553, 2009. [7] C. Dimitrakakis, B. Nelson, A. Mitrokotsa, and B. I. P. Rubinstein. Robust and private Bayesian inference. In Proc. ALT 2014, pages 291–305, 2014. [8] C. Dimitrakakis, B. Nelson, Z. Zhang, A. Mitrokotsa, and B. I. P. Rubinstein. Differential privacy for Bayesian inference through posterior sampling. Journal of Machine Learning Research, 18(11):1–39, 2017. [9] C. Dwork and A. Roth. The algorithmic foundations of differential privacy. Foundations and Trends in Theoretical Computer Science, 9(3-4):211–407, 2014. [10] C. Dwork, K. Kenthapadi, F. McSherry, I. Mironov, and M. Naor. Our data, ourselves: Privacy via distributed noise generation. In Advances in Cryptology (EUROCRYPT 2006), page 486–503, 2006. [11] C. Dwork, F. McSherry, K. Nissim, and A. Smith. Calibrating noise to sensitivity in private data analysis. In Proc. 3rd Theory of Cryptography Conference (TCC 2006), pages 265–284. 2006. 9 [12] F. Eigner, A. Kate, M. Maffei, F. Pampaloni, and I. Pryvalov. Differentially private data aggregation with optimal utility. In Proceedings of the 30th Annual Computer Security Applications Conference, pages 316–325. ACM, 2014. [13] J. Foulds, J. Geumlek, M. Welling, and K. Chaudhuri. On the theory and practice of privacypreserving Bayesian data analysis. In Proceedings of the Thirty-Second Conference on Uncertainty in Artificial Intelligence, UAI’16, pages 192–201, 2016. [14] S. Goryczka and L. Xiong. A comprehensive comparison of multiparty secure additions with differential privacy. IEEE Transactions on Dependable and Secure Computing, 2015. [15] J. Hamm, P. Cao, and M. Belkin. Learning privately from multiparty data. In ICML, 2016. [16] A. Honkela, M. Das, A. Nieminen, O. Dikmen, and S. Kaski. Efficient differentially private learning improves drug sensitivity prediction. 2016. arXiv:1606.02109 [stat.ML]. [17] J. Jälkö, O. Dikmen, and A. Honkela. Differentially private variational inference for nonconjugate models. In Proc. 33rd Conference on Uncertainty in Artificial Intelligence (UAI 2017), 2017. [18] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ ml. [19] M. Park, J. Foulds, K. Chaudhuri, and M. Welling. Variational Bayes in private settings (VIPS). 2016. arXiv:1611.00340. [20] M. Pathak, S. Rane, and B. Raj. Multiparty differential privacy via aggregation of locally trained classifiers. In Advances in Neural Information Processing Systems 23, pages 1876–1884, 2010. [21] A. Rajkumar and S. Agarwal. A differentially private stochastic gradient descent algorithm for multiparty classification. In Proc. AISTATS 2012, pages 933–941, 2012. [22] V. Rastogi and S. Nath. Differentially private aggregation of distributed time-series with transformation and encryption. In Proc. 2010 ACM SIGMOD International Conference on Management of Data (SIGMOD 2010), pages 735–746. ACM, 2010. [23] E. Shi, T. Chan, E. Rieffel, R. Chow, and D. Song. Privacy-preserving aggregation of time-series data. In Proc. NDSS, 2011. [24] A. Smith. Efficient, differentially private point estimators. 2008. arXiv:0809.4794 [cs.CR]. [25] Y. Wang, S. E. Fienberg, and A. J. Smola. Privacy for free: Posterior sampling and stochastic gradient Monte Carlo. In Proc. ICML 2015, pages 2493–2502, 2015. [26] O. Williams and F. McSherry. Probabilistic inference and differential privacy. In Adv. Neural Inf. Process. Syst. 23, 2010. [27] G. Wu, Y. He, J. Wu, and X. Xia. Inherit differential privacy in distributed setting: Multiparty randomized function computation. In 2016 IEEE Trustcom/BigDataSE/ISPA, pages 921–928, 2016. [28] J. Zhang, Z. Zhang, X. Xiao, Y. Yang, and M. Winslett. Functional mechanism: Regression analysis under differential privacy. PVLDB, 5(11):1364–1375, 2012. [29] Z. Zhang, B. Rubinstein, and C. Dimitrakakis. On the differential privacy of Bayesian inference. In Proc. AAAI 2016, 2016. 10 | 2017 | 577 |
7,093 | MMD GAN: Towards Deeper Understanding of Moment Matching Network Chun-Liang Li1,⇤ Wei-Cheng Chang1,⇤ Yu Cheng2 Yiming Yang1 Barnabás Póczos1 1 Carnegie Mellon University, 2AI Foundations, IBM Research {chunlial,wchang2,yiming,bapoczos}@cs.cmu.edu chengyu@us.ibm.com (⇤denotes equal contribution) Abstract Generative moment matching network (GMMN) is a deep generative model that differs from Generative Adversarial Network (GAN) by replacing the discriminator in GAN with a two-sample test based on kernel maximum mean discrepancy (MMD). Although some theoretical guarantees of MMD have been studied, the empirical performance of GMMN is still not as competitive as that of GAN on challenging and large benchmark datasets. The computational efficiency of GMMN is also less desirable in comparison with GAN, partially due to its requirement for a rather large batch size during the training. In this paper, we propose to improve both the model expressiveness of GMMN and its computational efficiency by introducing adversarial kernel learning techniques, as the replacement of a fixed Gaussian kernel in the original GMMN. The new approach combines the key ideas in both GMMN and GAN, hence we name it MMD GAN. The new distance measure in MMD GAN is a meaningful loss that enjoys the advantage of weak⇤topology and can be optimized via gradient descent with relatively small batch sizes. In our evaluation on multiple benchmark datasets, including MNIST, CIFAR-10, CelebA and LSUN, the performance of MMD GAN significantly outperforms GMMN, and is competitive with other representative GAN works. 1 Introduction The essence of unsupervised learning models the underlying distribution PX of the data X. Deep generative model [1, 2] uses deep learning to approximate the distribution of complex datasets with promising results. However, modeling arbitrary density is a statistically challenging task [3]. In many applications, such as caption generation [4], accurate density estimation is not even necessary since we are only interested in sampling from the approximated distribution. Rather than estimating the density of PX , Generative Adversarial Network (GAN) [5] starts from a base distribution PZ over Z, such as Gaussian distribution, then trains a transformation network g✓ such that P✓⇡PX , where P✓is the underlying distribution of g✓(z) and z ⇠PZ. During the training, GAN-based algorithms require an auxiliary network fφ to estimate the distance between PX and P✓. Different probabilistic (pseudo) metrics have been studied [5–8] under GAN framework. Instead of training an auxiliary network fφ for measuring the distance between PX and P✓, Generative moment matching network (GMMN) [9, 10] uses kernel maximum mean discrepancy (MMD) [11], which is the centerpiece of nonparametric two-sample test, to determine the distribution distances. During the training, g✓is trained to pass the hypothesis test (minimize MMD distance). [11] shows even the simple Gaussian kernel enjoys the strong theoretical guarantees (Theorem 1). However, the empirical performance of GMMN does not meet its theoretical properties. There is no promising empirical results comparable with GAN on challenging benchmarks [12, 13]. Computationally, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. it also requires larger batch size than GAN needs for training, which is considered to be less efficient [9, 10, 14, 8] In this work, we try to improve GMMN and consider using MMD with adversarially learned kernels instead of fixed Gaussian kernels to have better hypothesis testing power. The main contributions of this work are: • In Section 2, we prove that training g✓via MMD with learned kernels is continuous and differentiable, which guarantees the model can be trained by gradient descent. Second, we prove a new distance measure via kernel learning, which is a sensitive loss function to the distance between PX and P✓(weak⇤topology). Empirically, the loss decreases when two distributions get closer. • In Section 3, we propose a practical realization called MMD GAN that learns generator g✓with the adversarially trained kernel. We further propose a feasible set reduction to speed up and stabilize the training of MMD GAN. • In Section 5, we show that MMD GAN is computationally more efficient than GMMN, which can be trained with much smaller batch size. We also demonstrate that MMD GAN has promising results on challenging datasets, including CIFAR-10, CelebA and LSUN, where GMMN fails. To our best knowledge, we are the first MMD based work to achieve comparable results with other GAN works on these datasets. Finally, we also study the connection to existing works in Section 4. Interestingly, we show Wasserstein GAN [8] is the special case of the proposed MMD GAN under certain conditions. The unified view shows more connections between moment matching and GAN, which can potentially inspire new algorithms based on well-developed tools in statistics [15]. Our experiment code is available at https://github.com/OctoberChang/MMD-GAN. 2 GAN, Two-Sample Test and GMMN Assume we are given data {xi}n i=1, where xi 2 X and xi ⇠PX . If we are interested in sampling from PX , it is not necessary to estimate the density of PX . Instead, Generative Adversarial Network (GAN) [5] trains a generator g✓parameterized by ✓to transform samples z ⇠PZ, where z 2 Z, into g✓(z) ⇠P✓such that P✓⇡PX . To measure the similarity between PX and P✓via their samples {x}n i=1 and {g✓(zj)}n j=1 during the training, [5] trains the discriminator fφ parameterized by φ for help. The learning is done by playing a two-player game, where fφ tries to distinguish xi and g✓(zj) while g✓aims to confuse fφ by generating g✓(zj) similar to xi. On the other hand, distinguishing two distributions by finite samples is known as Two-Sample Test in statistics. One way to conduct two-sample test is via kernel maximum mean discrepancy (MMD) [11]. Given two distributions P and Q, and a kernel k, the square of MMD distance is defined as Mk(P, Q) = kµP −µQk2 H = EP[k(x, x0)] −2EP,Q[k(x, y)] + EQ[k(y, y0)]. Theorem 1. [11] Given a kernel k, if k is a characteristic kernel, then Mk(P, Q) = 0 iff P = Q. GMMN: One example of characteristic kernel is Gaussian kernel k(x, x0) = exp(kx−x0k2). Based on Theorem 1, [9, 10] propose generative moment-matching network (GMMN), which trains g✓by min ✓ Mk(PX , P✓), (1) with a fixed Gaussian kernel k rather than training an additional discriminator f as GAN. 2.1 MMD with Kernel Learning In practice we use finite samples from distributions to estimate MMD distance. Given X = {x1, · · · , xn} ⇠P and Y = {y1, · · · , yn} ⇠Q, one estimator of Mk(P, Q) is ˆ Mk(X, Y ) = 1 !n 2 " X i6=i0 k(xi, x0 i) −2 !n 2 " X i6=j k(xi, yj) + 1 !n 2 " X j6=j0 k(yj, y0 j). Because of the sampling variance, ˆ M(X, Y ) may not be zero even when P = Q. We then conduct hypothesis test with null hypothesis H0 : P = Q. For a given allowable probability of false rejection ↵, 2 we can only reject H0, which imply P 6= Q, if ˆ M(X, Y ) > c↵for some chose threshold c↵> 0. Otherwise, Q passes the test and Q is indistinguishable from P under this test. Please refer to [11] for more details. Intuitively, if kernel k cannot result in high MMD distance Mk(P, Q) when P 6= Q, ˆ Mk(P, Q) has more chance to be smaller than c↵. Then we are unlikely to reject the null hypothesis H0 with finite samples, which implies Q is not distinguishable from P. Therefore, instead of training g✓via (1) with a pre-specified kernel k as GMMN, we consider training g✓via min ✓ max k2K Mk(PX , P✓), (2) which takes different possible characteristic kernels k 2 K into account. On the other hand, we could also view (2) as replacing the fixed kernel k in (1) with the adversarially learned kernel arg maxk2K Mk(PX , P✓) to have stronger signal where P 6= P✓to train g✓. We refer interested readers to [16] for more rigorous discussions about testing power and increasing MMD distances. However, it is difficult to optimize over all characteristic kernels when we solve (2). By [11, 17] if f is a injective function and k is characteristic, then the resulted kernel ˜k = k ◦f, where ˜k(x, x0) = k(f(x), f(x0)) is still characteristic. If we have a family of injective functions parameterized by φ, which is denoted as fφ, we are able to change the objective to be min ✓ max φ Mk◦fφ(PX , P✓), (3) In this paper, we consider the case that combining Gaussian kernels with injective functions fφ, where ˜k(x, x0) = exp(−kfφ(x) −fφ(x)0k2). One example function class of f is {fφ|fφ(x) = φx, φ > 0}, which is equivalent to the kernel bandwidth tuning. A more complicated realization will be discussed in Section 3. Next, we abuse the notation Mfφ(P, Q) to be MMD distance given the composition kernel of Gaussian kernel and fφ in the following. Note that [18] considers the linear combination of characteristic kernels, which can also be incorporated into the discussed composition kernels. A more general kernel is studied in [19]. 2.2 Properties of MMD with Kernel Learning [8] discuss different distances between distributions adopted by existing deep learning algorithms, and show many of them are discontinuous, such as Jensen-Shannon divergence [5] and Total variation [7], except for Wasserstein distance. The discontinuity makes the gradient descent infeasible for training. From (3), we train g✓via minimizing maxφ Mfφ(PX , P✓). Next, we show maxφ Mfφ(PX , P✓) also enjoys the advantage of being a continuous and differentiable objective in ✓under mild assumptions. Assumption 2. g : Z ⇥Rm ! X is locally Lipschitz, where Z ✓Rd. We will denote g✓(z) the evaluation on (z, ✓) for convenience. Given fφ and a probability distribution Pz over Z, g satisfies Assumption 2 if there are local Lipschitz constants L(✓, z) for fφ ◦g, which is independent of φ, such that Ez⇠Pz[L(✓, z)] < +1. Theorem 3. The generator function g✓parameterized by ✓is under Assumption 2. Let PX be a fixed distribution over X and Z be a random variable over the space Z. We denote P✓the distribution of g✓(Z), then maxφ Mfφ(PX , P✓) is continuous everywhere and differentiable almost everywhere in ✓. If g✓is parameterized by a feed-forward neural network, it satisfies Assumption 2 and can be trained via gradient descent as well as propagation, since the objective is continuous and differentiable followed by Theorem 3. More technical discussions are shown in Appendix B. Theorem 4. (weak⇤topology) Let {Pn} be a sequence of distributions. Considering n ! 1, under mild Assumption, maxφ Mfφ(PX , Pn) ! 0 () Pn D −! PX , where D −! means converging in distribution [3]. Theorem 4 shows that maxφ Mfφ(PX , Pn) is a sensible cost function to the distance between PX and Pn. The distance is decreasing when Pn is getting closer to PX , which benefits the supervision of the improvement during the training. All proofs are omitted to Appendix A. In the next section, we introduce a practical realization of training g✓via optimizing min✓maxφ Mfφ(PX , P✓). 3 3 MMD GAN To approximate (3), we use neural networks to parameterized g✓and fφ with expressive power. For g✓, the assumption is locally Lipschitz, where commonly used feed-forward neural networks satisfy this constraint. Also, the gradient 5✓(maxφ fφ ◦g✓) has to be bounded, which can be done by clipping φ [8] or gradient penalty [20]. The non-trivial part is fφ has to be injective. For an injective function f, there exists an function f −1 such that f −1(f(x)) = x, 8x 2 X and f −1(f(g(z))) = g(z), 8z 2 Z1, which can be approximated by an autoencoder. In the following, we denote φ = {φe, φd} to be the parameter of discriminator networks, which consists of an encoder fφe, and train the corresponding decoder fφd ⇡f −1 to regularize f. The objective (3) is relaxed to be min ✓ max φ Mfφe (P(X), P(g✓(Z))) −λEy2X[g(Z)ky −fφd(fφe(y))k2. (4) Note that we ignore the autoencoder objective when we train ✓, but we use (4) for a concise presentation. We note that the empirical study suggests autoencoder objective is not necessary to lead the successful GAN training as we will show in Section 5, even though the injective property is required in Theorem 1. The proposed algorithm is similar to GAN [5], which aims to optimize two neural networks g✓and fφ in a minmax formulation, while the meaning of the objective is different. In [5], fφe is a discriminator (binary) classifier to distinguish two distributions. In the proposed algorithm, distinguishing two distribution is still done by two-sample test via MMD, but with an adversarially learned kernel parametrized by fφe. g✓is then trained to pass the hypothesis test. More connection and difference with related works is discussed in Section 4. Because of the similarity of GAN, we call the proposed algorithm MMD GAN. We present an implementation with the weight clipping in Algorithm 1, but one can easily extend to other Lipschitz approximations, such as gradient penalty [20]. Algorithm 1: MMD GAN, our proposed algorithm. input :↵the learning rate, c the clipping parameter, B the batch size, nc the number of iterations of discriminator per generator update. initialize generator parameter ✓and discriminator parameter φ; while ✓has not converged do for t = 1, . . . , nc do Sample a minibatches {xi}B i=1 ⇠P(X) and {zj}B j=1 ⇠P(Z) gφ rφMfφe (P(X), P(g✓(Z))) −λEy2X[g(Z)ky −fφd(fφe(y))k2 φ φ + ↵· RMSProp(φ, gφ) φ clip(φ, −c, c) Sample a minibatches {xi}B i=1 ⇠P(X) and {zj}B j=1 ⇠P(Z) g✓ r✓Mfφe(P(X), P(g✓(Z))) ✓ ✓−↵· RMSProp(✓, g✓) Encoding Perspective of MMD GAN: Besides from using kernel selection to explain MMD GAN, the other way to see the proposed MMD GAN is viewing fφe as a feature transformation function, and the kernel two-sample test is performed on this transformed feature space (i.e., the code space of the autoencoder). The optimization is finding a manifold with stronger signals for MMD two-sample test. From this perspective, [9] is the special case of MMD GAN if fφe is the identity mapping function. In such circumstance, the kernel two-sample test is conducted in the original data space. 3.1 Feasible Set Reduction Theorem 5. For any fφ, there exists f 0 φ such that Mfφ(Pr, P✓) = Mf 0 φ(Pr, P✓) and Ex[fφ(x)] ⌫ Ez[fφ0(g✓(z))]. With Theorem 5, we could reduce the feasible set of φ during the optimization by solving min✓maxφ Mfφ(Pr, P✓) s.t. E[fφ(x)] ⌫E[fφ(g✓(z))] 1Note that injective is not necessary invertible. 4 which the optimal solution is still equivalent to solving (2). However, it is hard to solve the constrained optimization problem with backpropagation. We relax the constraint by ordinal regression [21] to be min ✓ max φ Mfφ(Pr, P✓) + λ min ! E[fφ(x)] −E[fφ(g✓(z))], 0 " , which only penalizes the objective when the constraint is violated. In practice, we observe that reducing the feasible set makes the training faster and stabler. 4 Related Works There has been a recent surge on improving GAN [5]. We review some related works here. Connection with WGAN: If we composite fφ with linear kernel instead of Gaussian kernel, and restricting the output dimension h to be 1, we then have the objective min ✓ max φ kE[fφ(x)] −E[fφ(g✓(z))]k2. (5) Parameterizing fφ and g✓with neural networks and assuming 9φ0 2 Φ such f 0 φ = −fφ, 8Φ, recovers Wasserstein GAN (WGAN) [8] 2. If we treat fφ(x) as the data transform function, WGAN can be interpreted as first-order moment matching (linear kernel) while MMD GAN aims to match infinite order of moments with Gaussian kernel form Taylor expansion [9]. Theoretically, Wasserstein distance has similar theoretically guarantee as Theorem 1, 3 and 4. In practice, [22] show neural networks does not have enough capacity to approximate Wasserstein distance. In Section 5, we demonstrate matching high-order moments benefits the results. [23] also propose McGAN that matches second order moment from the primal-dual norm perspective. However, the proposed algorithm requires matrix (tensor) decompositions because of exact moment matching [24], which is hard to scale to higher order moment matching. On the other hand, by giving up exact moment matching, MMD GAN can match high-order moments with kernel tricks. More detailed discussions are in Appendix B.3. Difference from Other Works with Autoencoders: Energy-based GANs [7, 25] also utilizes the autoencoder (AE) in its discriminator from the energy model perspective, which minimizes the reconstruction error of real samples x while maximize the reconstruction error of generated samples g✓(z). In contrast, MMD GAN uses AE to approximate invertible functions by minimizing the reconstruction errors of both real samples x and generated samples g✓(z). Also, [8] show EBGAN approximates total variation, with the drawback of discontinuity, while MMD GAN optimizes MMD distance. The other line of works [2, 26, 9] aims to match the AE codespace f(x), and utilize the decoder fdec(·). [2, 26] match the distribution of f(x) and z via different distribution distances and generate data (e.g. image) by fdec(z). [9] use MMD to match f(x) and g(z), and generate data via fdec(g(z)). The proposed MMD GAN matches the f(x) and f(g(z)), and generates data via g(z) directly as GAN. [27] is similar to MMD GAN but it considers KL-divergence without showing continuity and weak⇤topology guarantee as we prove in Section 2. Other GAN Works: In addition to the discussed works, there are several extended works of GAN. [28] proposes using the linear kernel to match first moment of its discriminator’s latent features. [14] considers the variance of empirical MMD score during the training. Also, [14] only improves the latent feature matching in [28] by using kernel MMD, instead of proposing an adversarial training framework as we studied in Section 2. [29] uses Wasserstein distance to match the distribution of autoencoder loss instead of data. One can consider to extend [29] to higher order matching based on the proposed MMD GAN. A parallel work [30] use energy distance, which can be treated as MMD GAN with different kernel. However, there are some potential problems of its critic. More discussion can be referred to [31]. 5 Experiment We train MMD GAN for image generation on the MNIST [32], CIFAR-10 [33], CelebA [13], and LSUN bedrooms [12] datasets, where the size of training instances are 50K, 50K, 160K, 3M 2Theoretically, they are not equivalent but the practical neural network approximation results in the same algorithm. 5 respectively. All the samples images are generated from a fixed noise random vectors and are not cherry-picked. Network architecture: In our experiments, we follow the architecture of DCGAN [34] to design g✓ by its generator and fφ by its discriminator except for expanding the output layer of fφ to be h dimensions. Kernel designs: The loss function of MMD GAN is implicitly associated with a family of characteristic kernels. Similar to the prior MMD seminal papers [10, 9, 14], we consider a mixture of K RBF kernels k(x, x0) = PK q=1 kσq(x, x0) where kσq is a Gaussian kernel with bandwidth parameter σq. Tuning kernel bandwidth σq optimally still remains an open problem. In this works, we fixed K = 5 and σq to be {1, 2, 4, 8, 16} and left the fφ to learn the kernel (feature representation) under these σq. Hyper-parameters: We use RMSProp [35] with learning rate of 0.00005 for a fair comparison with WGAN as suggested in its original paper [8]. We ensure the boundedness of model parameters of discriminator by clipping the weights point-wisely to the range [−0.01, 0.01] as required by Assumption 2. The dimensionality h of the latent space is manually set according to the complexity of the dataset. We thus use h = 16 for MNIST, h = 64 for CelebA, and h = 128 for CIFAR-10 and LSUN bedrooms. The batch size is set to be B = 64 for all datasets. 5.1 Qualitative Analysis (a) GMMN-D MNIST (b) GMMN-C MNIST (c) MMD GAN MNIST (d) GMMN-D CIFAR-10 (e) GMMN-C CIFAR-10 (f) MMD GAN CIFAR-10 Figure 1: Generated samples from GMMN-D (Dataspace), GMMN-C (Codespace) and our MMD GAN with batch size B = 64. We start with comparing MMD GAN with GMMN on two standard benchmarks, MNIST and CIFAR10. We consider two variants for GMMN. The first one is original GMMN, which trains the generator by minimizing the MMD distance on the original data space. We call it as GMMN-D. To compare with MMD GAN, we also pretrain an autoencoder for projecting data to a manifold, then fix the autoencoder as a feature transformation, and train the generator by minimizing the MMD distance in the code space. We call it as GMMN-C. The results are pictured in Figure 1. Both GMMN-D and GMMN-C are able to generate meaningful digits on MNIST because of the simple data structure. By a closer look, nonetheless, the boundary and shape of the digits in Figure 1a and 1b are often irregular and non-smooth. In contrast, the sample 6 (a) WGAN MNIST (b) WGAN CelebA (c) WGAN LSUN (d) MMD GAN MNIST (e) MMD GAN CelebA (f) MMD GAN LSUN Figure 2: Generated samples from WGAN and MMD GAN on MNIST, CelebA, and LSUN bedroom datasets. digits in Figure 1c are more natural with smooth outline and sharper strike. For CIFAR-10 dataset, both GMMN variants fail to generate meaningful images, but resulting some low level visual features. We observe similar cases in other complex large-scale datasets such as CelebA and LSUN bedrooms, thus results are omitted. On the other hand, the proposed MMD GAN successfully outputs natural images with sharp boundary and high diversity. The results in Figure 1 confirm the success of the proposed adversarial learned kernels to enrich statistical testing power, which is the key difference between GMMN and MMD GAN. If we increase the batch size of GMMN to 1024, the image quality is improved, however, it is still not competitive to MMD GAN with B = 64. The images are put in Appendix C. This demonstrates that the proposed MMD GAN can be trained more efficiently than GMMN with smaller batch size. Comparisons with GANs: There are several representative extensions of GANs. We consider recent state-of-art WGAN [8] based on DCGAN structure [34], because of the connection with MMD GAN discussed in Section 4. The results are shown in Figure 2. For MNIST, the digits generated from WGAN in Figure 2a are more unnatural with peculiar strikes. In Contrary, the digits from MMD GAN in Figure 2d enjoy smoother contour. Furthermore, both WGAN and MMD GAN generate diversified digits, avoiding the mode collapse problems appeared in the literature of training GANs. For CelebA, we can see the difference of generated samples from WGAN and MMD GAN. Specifically, we observe varied poses, expressions, genders, skin colors and light exposure in Figure 2b and 2e. By a closer look (view on-screen with zooming in), we observe that faces from WGAN have higher chances to be blurry and twisted while faces from MMD GAN are more spontaneous with sharp and acute outline of faces. As for LSUN dataset, we could not distinguish salient differences between the samples generated from MMD GAN and WGAN. 5.2 Quantitative Analysis To quantitatively measure the quality and diversity of generated samples, we compute the inception score [28] on CIFAR-10 images. The inception score is used for GANs to measure samples quality and diversity on the pretrained inception model [28]. Models that generate collapsed samples have a relatively low score. Table 1 lists the results for 50K samples generated by various unsupervised 7 generative models trained on CIFAR-10 dataset. The inception scores of [36, 37, 28] are directly derived from the corresponding references. Although both WGAN and MMD GAN can generate sharp images as we show in Section 5.1, our score is better than other GAN techniques except for DFM [36]. This seems to confirm empirically that higher order of moment matching between the real data and fake sample distribution benefits generating more diversified sample images. Also note DFM appears compatible with our method and combing training techniques in DFM is a possible avenue for future work. Method Scores ± std. Real data 11.95 ± .20 DFM [36] 7.72 ALI [37] 5.34 Improved GANs [28] 4.36 MMD GAN 6.17 ± .07 WGAN 5.88 ± .07 GMMN-C 3.94 ± .04 GMMN-D 3.47 ± .03 Table 1: Inception scores Figure 3: Computation time 5.3 Stability of MMD GAN We further illustrate how the MMD distance correlates well with the quality of the generated samples. Figure 4 plots the evolution of the MMD GAN estimate the MMD distance during training for MNIST, CelebA and LSUN datasets. We report the average of the ˆ Mfφ(PX , P✓) with moving average to smooth the graph to reduce the variance caused by mini-batch stochastic training. We observe during the whole training process, samples generated from the same noise vector across iterations, remain similar in nature. (e.g., face identity and bedroom style are alike while details and backgrounds will evolve.) This qualitative observation indicates valuable stability of the training process. The decreasing curve with the improving quality of images supports the weak⇤topology shown in Theorem 4. Also, We can see from the plot that the model converges very quickly. In Figure 4b, for example, it converges shortly after tens of thousands of generator iterations on CelebA dataset. (a) MNIST (b) CelebA (c) LSUN Bedrooms Figure 4: Training curves and generative samples at different stages of training. We can see a clear correlation between lower distance and better sample quality. 5.4 Computation Issue We conduct time complexity analysis with respect to the batch size B. The time complexity of each iteration is O(B) for WGAN and O(KB2) for our proposed MMD GAN with a mixture of K RBF kernels. The quadratic complexity O(B2) of MMD GAN is introduced by computing kernel matrix, which is sometimes criticized for being inapplicable with large batch size in practice. However, we point that there are several recent works, such as EBGAN [7], also matching pairwise relation between samples of batch size, leading to O(B2) complexity as well. 8 Empirically, we find that under GPU environment, the highly parallelized matrix operation tremendously alleviated the quadratic time to almost linear time with modest B. Figure 3 compares the computational time per generator iterations versus different B on Titan X. When B = 64, which is adapted for training MMD GAN in our experiments setting, the time per iteration of WGAN and MMD GAN is 0.268 and 0.676 seconds, respectively. When B = 1024, which is used for training GMMN in its references [9], the time per iteration becomes 4.431 and 8.565 seconds, respectively. This result coheres our argument that the empirical computational time for MMD GAN is not quadratically expensive compared to WGAN with powerful GPU parallel computation. 5.5 Better Lipschitz Approximation and Necessity of Auto-Encoder Although we used weight-clipping for Lipschitz constraint in Assumption 2, one can also use other approximations, such as gradient penalty [20]. On the other hand, in Algorithm 1, we present an algorithm with auto-encoder to be consistent with the theory that requires fφ to be injective. However, we observe that it is not necessary in practice. We show some preliminary results of training MMD GAN with gradient penalty and without the auto-encoder in Figure 5. The preliminary study indicates that MMD GAN can generate satisfactory results with other Lipschitz constraint approximation. One potential future work is conducting more thorough empirical comparison studies between different approximations. (a) Cifar10, Giter = 300K (b) CelebA, Giter = 300K Figure 5: MMD GAN results using gradient penalty [20] and without auto-encoder reconstruction loss during training. 6 Discussion We introduce a new deep generative model trained via MMD with adversarially learned kernels. We further study its theoretical properties and propose a practical realization MMD GAN, which can be trained with much smaller batch size than GMMN and has competitive performances with state-of-theart GANs. We can view MMD GAN as the first practical step forward connecting moment matching network and GAN. One important direction is applying developed tools in moment matching [15] on general GAN works based the connections shown by MMD GAN. Also, in Section 4, we connect WGAN and MMD GAN by first-order and infinite-order moment matching. [24] shows finite-order moment matching (⇠5) achieves the best performance on domain adaption. One could extend MMD GAN to this by using polynomial kernels. Last, in theory, an injective mapping fφ is necessary for the theoretical guarantees. However, we observe that it is not mandatory in practice as we show in Section 5.5. One conjecture is it usually learns the injective mapping with high probability by parameterizing with neural networks, which worth more study as a future work. Acknowledgments We thank the reviewers for their helpful comments. This work is supported in part by the National Science Foundation (NSF) under grants IIS-1546329 and IIS-1563887. 9 References [1] Ruslan Salakhutdinov and Geoffrey Hinton. Deep boltzmann machines. In AISTATS, 2009. [2] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In ICLR, 2013. [3] Larry Wasserman. All of statistics: a concise course in statistical inference. Springer Science & Business Media, 2013. [4] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015. [5] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. [6] Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In NIPS, 2016. [7] J. Zhao, M. Mathieu, and Y. LeCun. Energy-based Generative Adversarial Network. In ICLR, 2017. [8] Martín Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein GAN. In ICML, 2017. [9] Yujia Li, Kevin Swersky, and Richard Zemel. Generative moment matching networks. In ICML, 2015. [10] Gintare Karolina Dziugaite, Daniel M. Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. In UAI, 2015. [11] Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. JMLR, 2012. [12] Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015. [13] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In CVPR, 2015. [14] Dougal J. Sutherland, Hsiao-Yu Fish Tung, Heiko Strathmann, Soumyajit De, Aaditya Ramdas, Alexander J. Smola, and Arthur Gretton. Generative models and model criticism via optimized maximum mean discrepancy. In ICLR, 2017. [15] Krikamol Muandet, Kenji Fukumizu, Bharath Sriperumbudur, and Bernhard Schölkopf. Kernel mean embedding of distributions: A review and beyonds. arXiv preprint arXiv:1605.09522, 2016. [16] Kenji Fukumizu, Arthur Gretton, Gert R Lanckriet, Bernhard Schölkopf, and Bharath K Sriperumbudur. Kernel choice and classifiability for rkhs embeddings of probability distributions. In NIPS, 2009. [17] A. Gretton, B. Sriperumbudur, D. Sejdinovic, H. Strathmann, S. Balakrishnan, M. Pontil, and K. Fukumizu. Optimal kernel choice for large-scale two-sample tests. In NIPS, 2012. [18] Arthur Gretton, Dino Sejdinovic, Heiko Strathmann, Sivaraman Balakrishnan, Massimiliano Pontil, Kenji Fukumizu, and Bharath K Sriperumbudur. Optimal kernel choice for large-scale two-sample tests. In NIPS, 2012. [19] Andrew Gordon Wilson, Zhiting Hu, Ruslan Salakhutdinov, and Eric P Xing. Deep kernel learning. In AISTATS, 2016. [20] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017. 10 [21] Ralf Herbrich, Thore Graepel, and Klaus Obermayer. Support vector learning for ordinal regression. 1999. [22] Sanjeev Arora, Rong Ge, Yingyu Liang, Tengyu Ma, and Yi Zhang. Generalization and equilibrium in generative adversarial nets (gans). arXiv preprint arXiv:1703.00573, 2017. [23] Youssef Mroueh, Tom Sercu, and Vaibhava Goel. Mcgan: Mean and covariance feature matching gan. arxiv pre-print 1702.08398, 2017. [24] Werner Zellinger, Thomas Grubinger, Edwin Lughofer, Thomas Natschläger, and Susanne Saminger-Platz. Central moment discrepancy (cmd) for domain-invariant representation learning. arXiv preprint arXiv:1702.08811, 2017. [25] Shuangfei Zhai, Yu Cheng, Rogério Schmidt Feris, and Zhongfei Zhang. Generative adversarial networks as variational training of energy based models. CoRR, abs/1611.01799, 2016. [26] Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015. [27] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Adversarial generator-encoder networks. arXiv preprint arXiv:1704.02304, 2017. [28] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In NIPS, 2016. [29] David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017. [30] Marc G Bellemare, Ivo Danihelka, Will Dabney, Shakir Mohamed, Balaji Lakshminarayanan, Stephan Hoyer, and Rémi Munos. The cramer distance as a solution to biased wasserstein gradients. arXiv preprint arXiv:1705.10743, 2017. [31] Arthur Gretton. Notes on the cramer gan. https://medium.com/towards-data-science/ notes-on-the-cramer-gan-752abd505c00, 2017. Accessed: 2017-11-2. [32] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. [33] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. [34] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. [35] 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, 2012. [36] D Warde-Farley and Y Bengio. Improving generative adversarial networks with denoising feature matching. In ICLR, 2017. [37] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. In ICLR, 2017. [38] Bharath K. Sriperumbudur, Arthur Gretton, Kenji Fukumizu, Bernhard Schölkopf, and Gert R.G. Lanckriet. Hilbert space embeddings and metrics on probability measures. JMLR, 2010. 11 | 2017 | 578 |
7,094 | Convergence of Gradient EM on Multi-component Mixture of Gaussians Bowei Yan University of Texas at Austin boweiy@utexas.edu Mingzhang Yin University of Texas at Austin mzyin@utexas.edu Purnamrita Sarkar University of Texas at Austin purna.sarkar@austin.utexas.edu Abstract In this paper, we study convergence properties of the gradient variant of Expectation-Maximization algorithm [11] for Gaussian Mixture Models for arbitrary number of clusters and mixing coefficients. We derive the convergence rate depending on the mixing coefficients, minimum and maximum pairwise distances between the true centers, dimensionality and number of components; and obtain a near-optimal local contraction radius. While there have been some recent notable works that derive local convergence rates for EM in the two symmetric mixture of Gaussians, in the more general case, the derivations need structurally different and non-trivial arguments. We use recent tools from learning theory and empirical processes to achieve our theoretical results. 1 Introduction Proposed by [7] in 1977, the Expectation-Maximization (EM) algorithm is a powerful tool for statistical inference in latent variable models. A famous example is the parameter estimation problem under parametric mixture models. In such models, data is generated from a mixture of a known family of parametric distributions. The mixture component from which a datapoint is generated from can be thought of as a latent variable. Typically the marginal data log-likelihood (which integrates the latent variables out) is hard to optimize, and hence EM iteratively optimizes a lower bound of it and obtains a sequence of estimators. This consists of two steps. In the expectation step (E-step) one computes the expectation of the complete data likelihood with respect to the posterior distribution of the unobserved mixture memberships evaluated at the current parameter estimates. In the maximization step (M-step) one this expectation is maximized to obtain new estimators. EM always improves the objective function. While it is established in [4] that the true parameter vector is the global maximizer of the log-likelihood function, there has been much effort to understand the behavior of the local optima obtained via EM. When the exact M-step is burdensome, a popular variant of EM, named Gradient EM is widely used. The idea here is to take a gradient step towards the maxima of the expectation computed in the E-step. [11] introduces a gradient algorithm using one iteration of Newton’s method and shows the local properties of the gradient EM are almost identical with those of the EM. Early literature [22, 24] mostly focuses on the convergence to the stationary points or local optima. In [22] it is proven that the sequence of estimators in EM converges to stationary point when the lower bound function from E-step is continuous. In addition, some conditions are derived under 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. which EM converges to local maxima instead of saddle points; but these are typically hard to check. A link between EM and gradient methods is forged in [24] via a projection matrix and the local convergence rate of EM is obtained. In particular, it is shown that for GMM with well-separated centers, the EM achieves faster convergence rates comparable to a quasi-Newton algorithm. While the convergence of EM deteriorates under worse separations, it is observed in [20] that the mixture density determined by estimator sequence of EM reflects the sample data well. In recent years, there has been a renewed wave of interest in studying the behavior of EM especially in GMMs. The global convergence of EM for a mixture of two equal-proportion Gaussian distributions is fully characterized in [23]. For more than two clusters, a negative result on EM and gradient EM being trapped in local minima arbitrarily far away from the global optimum is shown in [9]. For high dimensional GMMs with M components, the parameters are learned via reducing the dimensionality via a random projection in [5]. In [6] the two-round method is proposed, where one first initializes with more than M points, then prune to get one point in every cluster. It is pointed out in this paper that in high dimensional space, when the clusters are well separated, the mixing weight will go to either 0 or 1 after one single update. It is showed in [25, 17] that one can cluster high dimensional sub-gaussian mixtures by semi-definite programming relaxations. For the convergence rate of EM algorithm, it is observed in [19] that a very small mixing proportion for one mixture component compared to others leads to slow convergence. [2] gives non-asymptotic convergence guarantees in isotropic, balanced, two-component GMM; their result proves the linear convergence of EM if the center is initialized in a small neighborhood of the true parameters. The local convergence result in this paper has a sub-optimal contraction region. K-means clustering is another widely used clustering method. Lloyd’s algorithm for k-means clustering has a similar flavor as EM. At each step, it recomputes the centroids of each cluster and updates the membership assignments alternatively. While EM does soft clustering at each step, Lloyd’s algorithm obtains hard clustering. The clustering error of Lloyd’s algorithm for arbitrary number of clusters is studied in [13]. The authors also show local convergence results where the contraction region is less restrictive than [2]. We would like to point out that there are many notable algorithms [10, 1, 21] with provable guarantees for estimating mixture models. In [14, 8] the authors propose polynomial time algorithms which achieve epsilon approximation to the k-means loss. A spectral algorithm for learning mixtures of gaussians is proposed in [21]. We want to point out that our aim is not to come up with a new algorithm for mixture models, but to understand the interplay of model parameters in the convergence of gradient EM for a mixture of Gaussians with M components. As we discuss later, our work also immediately leads to convergence guarantees of Stochastic Gradient EM. Another important difference is that the aim of these works is recovering the hidden mixture component memberships, whereas our goal is completely different: we are interested in understanding how well EM can estimate the mean parameters under a good initialization. In this paper, we study the convergence rate and local contraction radius of gradient EM under GMM with arbitrary number of clusters and mixing weights which are assumed to be known. For simplicity, we assume that the components share the same covariance matrix, which is known. Thus it suffices to carry out our analysis for isotropic GMMs with identity as the shared covariance matrix. We obtain a near-optimal condition on the contraction region in contrast to [2]’s contraction radius for the mixture of two equal weight Gaussians. We want to point out that, while the authors of [2] provide a general set of conditions to establish local convergence for a broad class of mixture models, the derivation of specific results and conditions on local convergence are tailored to the balance and symmetry of the model. We follow the same general route: first we obtain conditions for population gradient EM, where all sample averages are replaced by their expected counterpart. Then we translate the population version to the sample one. While the first part is conceptually similar, the general setting calls for more involved analysis. The second step typically makes use of concepts from empirical processes, by pairing up Ledoux-Talagrand contraction type arguments with well established symmetrization results. However, in our case, the function is not a contraction like in the symmetric two component case, since it involves the cluster estimates of all M components. Furthermore, the standard analysis of concentration inequalities by McDiarmid’s inequality gets complicated because the bounded difference condition is not satisfied in our setting. We overcome these difficulties by taking advan2 tage of recent tools in Rademacher averaging for vector valued function classes, and variants of McDiarmid type inequalities for functions which have bounded difference with high probability. The rest of the paper is organized as follows. In Section 2, we state the problem and the notations. In Section 3, we provide the main results in local convergence rate and region for both population and sample-based gradient EM in GMMs. Section 4 and 5 provide the proof sketches of population and sample-based theoretical results, followed by the numerical result in Section 6. We conclude the paper with some discussions. 2 Problem Setup and Notations Consider a GMM with M clusters in d dimensional space, with weights π = (π1, · · · , πM). Let µi ∈Rd be the mean of cluster i. Without loss of generality, we assume EX = P i πiµi = 0 and the known covariance matrix for all components is Id. Let µ ∈RMd be the vector stacking the µis vertically. We represent the mixture as X ∼GMM(π, µ, Id), which has the density function p(x|µ) = PM i=1 πiφ(x|µi, Id). where φ(x; µ, Σ) is the PDF of N(µ, Σ). Then the population loglikelihood function as L(µ) = EX log PM i=1 πiφ(X|µi, Id) . The Maximum Likelihood Estimator is then defined as ˆµML = arg max p(X|µ). EM algorithm is based on using an auxiliary function to lower bound the log likelihood. Define Q(µ|µt) = EX [P i p(Z = i|X; µt) log φ(X; µi, Id)], where Z denote the unobserved component membership of data point X. The standard EM update is µt+1 = arg maxµ Q(µ|µt). Define wi(X; µ) = πiφ(X|µi, Id) PM j=1 πjφ(X|µj, Id) (1) The update step for gradient EM, defined via the gradient operator G(µt) : RMd →RMd, is G(µt)(i) := µt+1 i = µt i + s[∇Q(µt|µt)]i = µt i + sEX πiwi(X; µt)(X −µt i) . (2) where s > 0 is the step size and (.)(i) denotes the part of the stacked vector corresponding to the ith mixture component. We will also use Gn(µ) to denote the empirical counterpart of the population gradient operator G(µ) defined in Eq (2). We assume we are given an initialization µ0 i and the true mixing weight πi for each component. 2.1 Notations Define Rmax and Rmin as the largest and smallest distance between cluster centers i.e., Rmax = maxi̸=j ∥µ∗ i −µ∗ j∥, Rmin = mini̸=j ∥µ∗ i −µ∗ j∥. Let πmax and πmin be the maximal and minimal cluster weights, and define κ as κ = πmax πmin . Standard complexity analysis notation o(·), O(·), Θ(·), Ω(·) will be used. f(n) = ˜Ω(g(n)) is short for Ω(g(n)) ignoring logarithmic factors, equivalent to f(n) ≥Cg(n) logk(g(n)), similar for others. We use ⊗to represent the kronecker product. 3 Main Results Despite being a non-convex problem, EM and gradient EM algorithms have been shown to exhibit good convergence behavior in practice, especially with good initializations. However, existing local convergence theory only applies for two-cluster equal-weight GMM. In this section, we present our main result in two parts. First we show the convergence rate and present a near-optimal radius for contraction region for population gradient EM. Then in the second part we connect the population version to finite sample results using concepts from empirical processes and learning theory. 3.1 Local contraction for population gradient EM Intuitively, when µt equals the ground truth µ∗, then the Q(µ|µ∗) function will be well-behaved. This function is a key ingredient in [2], where the curvature of the Q(·|µ) function is shown to be close to the curvature of Q(·|µ∗) when the µ is close to µ∗. This is a local property that only requires the gradient to be stable at one point. 3 Definition 1 (Gradient Stability). The Gradient Stability (GS) condition, denoted by GS(γ, a), is satisfied if there exists γ > 0, such that for µt i ∈B(µ∗ i , a) with some a > 0, for ∀i ∈[M]. ∥∇Q(µt|µ∗) −∇Q(µt|µt)∥≤γ∥µt −µ∗∥ The GS condition is used to prove contraction of the sequence of estimators produced by population gradient EM. However, for most latent variable models, it is typically challenging to verify the GS condition and obtain a tight bound on the parameter γ. We derive the GS condition under milder conditions (see Theorem 4 in Section 4), which bounds the deviation of the partial gradient evaluated at µt i uniformly over all i ∈[M]. This immediately implies the global GS condition defined in Definition 1. Equipped with this result, we achieve a nearly optimal local convergence radius for general GMMs in Theorem 1. The proof of this theorem can be found in Appendix B.2. Theorem 1 (Convergence for Population gradient EM). Let d0 := min{d, M}. If Rmin = ˜Ω(√d0), with initialization µ0 satisfying, ∥µ0 i −µ∗ i ∥≤a, ∀i ∈[M], where a ≤Rmin 2 − p d0O s log max M 2κ πmin , Rmax, d0 ! then the Population EM converges: ∥µt −µ∗∥≤ζt∥µ0 −µ∗∥, ζ = πmax −πmin + 2γ πmax + πmin < 1 where γ = M 2(2κ + 4) (2Rmax + d0)2 exp − Rmin 2 −a 2 √d0/8 < πmin. Remark 1. The local contraction radius is largely improved compared to that in [2], which has Rmin/8 in the two equal sized symmetric GMM setting. It can be seen that in Theorem 1, a/Rmin goes to 1 2 as the signal to noise ratio goes to infinity. We will show in simulations that when initialized from some point that lies Rmin/2 away from the true center, gradient EM only converges to a stationary point which is not a global optimum. More discussion can be found in Section 6. 3.2 Finite sample bound for gradient EM In the finite sample setting, as long as the deviation of the sample gradient from the population gradient is uniformly bounded, the convergence in the population setting implies the convergence in finite sample scenario. Thus the key ingredient in the proof is to get this uniform bound over all parameters in the contraction region A, i.e. bound supµ∈A ∥G(i)(µ) −G(i) n (µ)∥, where G and Gn are defined in Section 2. To prove the result, we expand the difference and define the following function for i ∈[M], where u is a unit vector on a d dimensional sphere Sd−1. This appears because we can write the Euclidean norm of any vector B, as ∥B∥= supu∈Sd−1⟨B, u⟩. gu i (X) = sup µ∈A 1 n n X i=1 w1(Xi; µ)⟨Xi −µ1, u⟩−Ew1(X; µ)⟨X −µ1, u⟩. (3) We will drop the super and subscript and prove results for gu 1 without loss of generality. The outline of the proof is to show that g(X) is close to its expectation. This expectation can be further bounded via the Rademacher complexity of the corresponding function class (defined below in Eq (4)) by the tools like the symmetrization lemma [18]. Consider the following class of functions indexed by µ and some unit vector on d dimensional sphere u ∈Sd−1: Fu i = {f i : X →R|f i(X; µ, u) = wi(X; µ)⟨X −µi, u⟩} (4) We need to bound the M functions classes separately for each mixture. Given a finite n-sample (X1, · · · , Xn), for each class, we define the Rademacher complexity as the expectation of empirical 4 Rademacher complexity. ˆRn(Fu i ) = Eϵ sup µ∈A 1 n n X j=1 ϵif i(Xj; µ, u) ; Rn(Fu i ) = EX ˆRn(Fu i ) where ϵi’s are the i.i.d. Rademacher random variables. For many function classes, the computation of the empirical Rademacher complexity can be hard. For complicated functions which are Lipschitz w.r.t functions from a simpler function class, one can use Ledoux-Talagrand type contraction results [12]. In order to use the Ledoux-Talagrand contraction, one needs a 1-Lipschitz function, which we do not have, because our function involves µi, i ∈[M]. Also, the weight functions wi are not separable in terms of the µi’s. Therefore the classical contraction lemma does not apply. In our analysis, we need to introduce a vector-valued function, with each element involving only one µi, and apply a recent result of vector-versioned contraction lemma [15]. With some careful analysis, we get the following. The details are deferred to Section 5. Proposition 1. Let Fu i as defined in Eq. (4) for ∀i ∈[M], then for some universal constant c, Rn(Fu i ) ≤cM 3/2(1 + Rmax)3√ d max{1, log(κ)} √n After getting the Rademacher complexity, one needs to use concentration results like McDiarmid’s inequality [16] to achieve the finite-sample bound. Unfortunately for the functions defined in Eq. (4), the martingale difference sequence does not have bounded differences. Hence it is difficult to apply McDiarmid’s inequality in its classical form. To resolve this, we instead use an extension of McDiarmid’s inequality which can accommodate sequences which have bounded differences with high probability [3]. Theorem 2 (Convergence for sample-based gradient EM). Let ζ be the contraction parameter in Theorem 1, and ϵunif(n) = ˜O(max{n−1/2M 3(1 + Rmax)3√ d max{1, log(κ)}, (1 + Rmax)d/√n}). (5) If ϵunif(n) ≤(1 −ζ)a, then sample-based gradient EM satisfies
ˆµt i −µ∗ i
≤ζt
µ0 −µ∗
2 + 1 1 −ζ ϵunif(n); ∀i ∈[M] with probability at least 1 −n−cd, where c is a positive constant. Remark 2. When data is observed in a streaming fashion, the gradient update can be modified into a stochastic gradient update, where the gradient is evaluated based on a single observation or a small batch. By the GS condition proved in Theorem 1, combined with Theorem 6 in [2], we immediately extend the guarantees of gradient EM into the guarantees for the stochastic gradient EM. 3.3 Initialization Appropriate initialization for EM is the key to getting good estimation within fewer restarts in practice. There have been a number of interesting initialization algorithms for estimating mixture models. It is pointed out in [9] that in practice, initializing the centers by uniformly drawing from the data is often more reasonable than drawing from a fixed distribution. Under this initialization strategy, we can bound the number of initializations required to find a “good” initialization that falls in the contraction region in Theorem 1. The exact theorem statement and a discussion of random initialization can be found in Appendix D. More sophisticated strategy includes, an approximate solution to k-means on a projected low-dimensional space used in [1] and [10]. While it would be interesting to study different initialization schemes, that is part of future work. 4 Local Convergence of Population Gradient EM In this section we present the proof sketch for Theorem 1. The complete proofs in this section are deferred to Appendix B. To start with, we calculate the closed-form characterization of the gradient of q(µ) as stated in the following lemma. 5 Lemma 1. Define q(µ) = Q(µ|µ∗). The gradient of q(µ) is ∇q(µ) = (diag(π) ⊗Id) (µ∗−µ). If we know the parameter γ in the gradient stability condition, then the convergence rate depends only on the condition number of the Hessian of q(·) and γ. Theorem 3 (Convergence rate for population gradient EM). If Q satisfies the GS condition with parameter 0 < γ < πmin, denote dt := ∥µt −µ∗∥, then with step size s = 2 πmin+πmax , we have: dt+1 ≤ πmax −πmin + 2γ πmax + πmin t d0 The proof uses an approximation on gradient and standard techniques in analysis of gradient descent. Remark 3. It can be verified that the convergence rate is equivalent to that shown in [2] when applied to GMMs. The convergence slows down as the proportion imbalance κ = πmax/πmin increases, which matches the observation in [19]. Now to verify the GS condition, we have the following theorem. Theorem 4 (GS condition for general GMM). If Rmin = ˜Ω( p min{d, M}), and µi ∈ B(µ∗ i , a), ∀i ∈[M] where a ≤ Rmin 2 − p min{d, M} max(4 p 2[log(Rmin/4)]+, 8 √ 3), then ∥∇µiQ(µ|µt) −∇µiq(µ)∥≤ γ M PM i=1 ∥µt i −µ∗ i ∥≤ γ √ M ∥µt −µ∗∥, where γ = M 2(2κ + 4) (2Rmax + min{d, M})2 exp − Rmin 2 −a 2 p min{d, M}/8 . Furthermore, ∥∇Q(µ|µt) −∇q(µ)∥≤γ∥µt −µ∗∥. Proof sketch of Theorem 4. W.l.o.g. we show the proof with the first cluster, consider the difference of the gradient corresponding to µ1. ∇µ1Q(µt|µt) −∇µ1q(µt) =E(w1(X; µt) −w1(X; µ∗))(X −µt 1) (6) For any given X, consider the function µ →w1(X; µ), we have ∇µw1(X; µ) = w1(X; µ)(1 −w1(X; µ))(X −µ1)T −w1(X; µ)w2(X; µ)(X −µ2)T ... −w1(X; µ)wM(X; µ)(X −µM)T (7) Let µu = µ∗+ u(µt −µ∗), ∀u ∈[0, 1], obviously µu ∈ΠM i=1B(µ∗ i , ∥µt i −µ∗ i ∥) ⊂ΠM i=1B(µ∗ i , a). By Taylor’s theorem, ∥E(w1(X; µt 1) −w1(X; µ∗ 1))(X −µt 1)∥=
E Z 1 u=0 ∇uw1(X; µu)du(X −µt 1)
≤U1∥µt 1 −µ∗ 1∥2 + X i̸=1 Ui∥µt i −µ∗ i ∥2 ≤max i∈[M]{Ui} X i ∥µt i −µ∗ i ∥2 (8) where U1 = sup u∈[0,1] ∥Ew1(X; µu)(1 −w1(X; µu))(X −µt 1)(X −µu 1)T ∥op Ui = sup u∈[0,1] ∥Ew1(X; µu)wi(X; µu)(X −µt 1)(X −µu 2)T ∥op Bounding them with careful analysis on Gaussian distribution yields the result. The technical details are deferred to Appendix B. 5 Sample-based Convergence In this section we present the proof sketch for sample-based convergence of gradient EM. The main ingredient in proof of Theorem 2 is the result of the following theorem, which develops an uniform upper bound for the differences between sample-based gradient and population gradient on each cluster center. 6 Theorem 5 (Uniform bound for sample-based gradient EM). Denote A as the contraction region ΠM i=1B(µ∗ i , a). Under the condition of Theorem 1, with probability at least 1 −exp (−cd log n), sup µ∈A
G(i)(µ) −G(i) n (µ)
< ϵunif(n); ∀i ∈[M] where ϵunif(n) is as defined in Eq. (5). Remark 4. It is worth pointing out that, the first part of the bound on ϵunif(n) in Eq. (5) comes from the Rademacher complexity, which is optimal in terms of the order of n and d. However the extra factor of √ d and log(n) comes from the altered McDiarmid’s inequality, tightening which will be left for future work. Proof sketch of Theorem 5. Denote Zi = supµ∈A
G(i)(µ) −G(i) n (µ)
. Recall gu i (X) defined in Eq. (3), then it is not hard to see that Zi = supu∈Sd−1 gu i (X). Consider a 1 2-covering {u(1), · · · , u(K)} of the unit sphere Sd−1, where K is the covering number of an unit sphere in d dimensions. We can show that Zi ≤2 maxj=1,··· ,K gu(j) i (X). As we state below in Lemma 2, we have for each u, with probability at least 1 −exp (−cd log n), gu i (X) = ˜O(max{Rn(Fu i ), (1 + Rmax)d/√n}). Plugging in the Rademacher complexity from Proposition 1, standard bounds on K, and applying union bound, we have Zi ≤˜O(max{n−1/2M 3(1 + Rmax)3√ d max{1, log(κ)}, (1 + Rmax)d/√n}) with probability at least 1 −exp (2d −cd log n) = 1 −exp (−c′d log n). Iteratively applying Theorem 5, we can bound the error in µ for the sample updates. The full proof is deferred to Appendix C. The key step is the following lemma, which bounds the gu i (X) for any given u ∈Sd−1. Without loss of generality we prove the result for i = 1. Lemma 2. Let u be a unit vector. Xi, i = 1, · · · , n are i.i.d. samples from GMM(π, µ∗, Id). gu 1 (X) as defined in Eq. (3). Then with probability 1 −exp(−cd log n) for some constant c > 0, gu 1 (X) = ˜O(max{Rn(Fu 1 ), (1 + Rmax)d/√n}). The quantity gu 1 (X) depends on the sample, the idea for proving Lemma 2 is to show it concentrates around its expectation when sample size is large. Note that when the function class has bounded differences (changing one data point changes the function by a bounded amount almost surely), as in the case in many risk minimization problems in supervised learning, the McDiarmid’s inequality can be used to achieve concentration. However the function class we define in Eq. (4) is not bounded almost everywhere, but with high probability, hence the classical result does not apply. Conditioning on the event where the difference is bounded, we use an extension of McDiarmid’s inequality by [3]. For convenience, we restate a weaker version of the theorem using our notation below. Theorem 6 ([3]). Consider independent random variable X = (X1, · · · , Xn) in the product probability space X = Qn i=1 Xi, where Xi is the probability space for Xi. Also consider a function g : X →R. If there exists a subset Y ⊂X, and a scalar c > 0, such that |g(x) −g(y)| ≤L, ∀x, y ∈Y, xj = yj, ∀j ̸= i. Denote p = 1 −P(X ∈Y), then P(g(X) −E[g(X)|X ∈Y] ≥ϵ) ≤p + exp − 2(ϵ−npL)2 + nL2 . It is worth pointing out that in Theorem 6, the concentration is shown in reference to the conditional expectation E[g(X)|X ∈Y] when the data points are in the bounded difference set. So to fully achieve the type of bound given by McDiarmid’s inequality, we need to further bound the difference of the conditional expectation and the full expectation. Combining the two parts we will be able to show that, the empirical difference is upper bounded using the Rademacher complexity. Now it remains to derive the Rademacher complexity under the given function class. Note that when the function class is a contraction, or Lipschitz with respect to another function (usually of a simpler form), one can use the Ledoux-Talagrand contraction lemma [12] to reduce the Rademacher complexity of the original function class to the Rademacher complexity of the simpler function class. This is essential in getting the Rademacher complexities for complicated function classes. As 7 we mention in Section 3, our function class in Eq. (4) is unfortunately not Lipschitz due to the fact that it involves all cluster centers even for the gradient on one cluster. We get around this problem by introducing a vector valued function, and show that the functions in Eq. (4) are Lipschitz in terms of the vector-valued function. In other words, the absolute difference in the function when the parameter changes is upper bounded by the norm of the vector difference of the vector-valued function. Then we build upon the recent vector-contraction result from [15], and prove the following lemma under our setting. Lemma 3. Let X be nontrivial, symmetric and sub-gaussian. Then there exists a constant C < ∞, depending only on the distribution of X, such that for any subset S of a separable Banach space and function hi : S →R, fi : S →Rk, i ∈[n] satisfying ∀s, s′ ∈S, |hi(s)−hi(s′)| ≤L∥f(s)−f(s′)∥. If ϵik is an independent doubly indexed Rademacher sequence, we have, E sup s∈S X i ϵihi(s) ≤E √ 2L sup s∈S X i,k ϵikfi(s)k, where fi(s)k is the k-th component of fi(s). Remark 5. In contrast to the original form in [15], we have a S as a subset of a separable Banach Space. The proof uses standard tools from measure theory, and is to be found in Appendix C. This equips us to prove Proposition 1. Proof sketch of Proposition 1. For any unit vector u, the Rademacher complexity of Fu 1 is Rn(Fu 1 ) =EXEϵ sup µ∈A 1 n n X i=1 ϵiw1(Xi; µ)⟨Xi −µ1, u⟩ ≤EXEϵ sup µ∈A 1 n n X i=1 ϵiw1(Xi; µ)⟨Xi, u⟩ | {z } (D) + EXEϵ sup µ∈A 1 n n X i=1 ϵiw1(Xi; µ)⟨µ1, u⟩ | {z } (E) (9) We bound the two terms separately. Define ηj(µ) : RMd →RM to be a vector valued function with the k-th coordinate [ηj(µ)]k = ∥µ1∥2 2 −∥µk∥2 2 + ⟨Xj, µk −µ1⟩+ log πk π1 It can be shown that |w1(Xj; µ) −w1(Xj; µ′)| ≤ √ M 4 ∥ηj(µ) −ηj(µ′)∥ (10) Now let ψ1(Xj; µ) = w1(Xj; µ)⟨Xj, u⟩. With Lipschitz property (10) and Lemma C.1, we have E sup µ∈A 1 n n X j=1 ϵjwi(Xj; µ)⟨Xj, u⟩ ≤E √ 2 √ M 4n sup µ∈A n X j=1 M X k=1 ϵjk[ηj(µ)]k The right hand side can be bounded with tools regarding independent sum of sub-gaussian random variables. Similar techniques apply to the (E) term. Adding things up we get the final bound. 6 Experiments In this section we collect some numerical results. In all experiments we set the covariance matrix for each mixture component as identity matrix Id and define signal-to-noise ratio (SNR) as Rmin. Convergence Rate We first evaluate the convergence rate and compare with those given in Theorem 3 and Theorem 4. For this set of experiments, we use a mixture of 3 Gaussians in 2 dimensions. In both experiments Rmax/Rmin = 1.5. In different settings of π, we apply gradient EM with varying SNR from 1 to 5. For each choice of SNR, we perform 10 independent trials with N = 12, 000 8 data points. The average of log ∥µt −ˆµ∥and the standard deviation are plotted versus iterations. In Figure 1 (a) and (b) we plot balanced π (κ = 1) and unbalanced π (κ > 1) respectively. All settings indicate the linear convergence rate as shown in Theorem 3. As SNR grows, the parameter γ in GS condition decreases and thus yields faster convergence rate. Comparing left two panels in Figure 1, increasing imbalance of cluster weights κ slows down the local convergence rate as shown in Theorem 3. (a) (b) (c) (d) Figure 1: (a, b): The influence of SNR on optimization error in different settings. The figures represent the influence of SNR when the GMMs have different cluster centers and weights: (a) π = (1/3, 1/3, 1/3). (b) π = (0.6, 0.3, 0.1). (c) plots statistical error with different initializations arbitrarily close to the boundary of the contraction region. (d) shows the suboptimal stationary point when two centers are initialized from the midpoint of the respective true cluster centers. Contraction Region To show the tightness of the contraction region, we generate a mixture with M = 3, d = 2, and initialize the clusters as follows. We use µ0 2 = µ∗ 2+µ∗ 3 2 −ϵ, µ0 3 = µ∗ 2+µ∗ 3 2 + ϵ, for shrinking ϵ, i.e. increasing a/Rmin and plot the error on the Y axis. Figure 1-(c) shows that gradient EM converges when initialized arbitrarily close to the boundary, thus confirming our near optimal contraction region. Figure 1-(d) shows that when ϵ = 0, i.e. a = Rmin 2 , gradient EM can be trapped at a sub-optimal stationary point. 7 Concluding Remarks In this paper, we obtain local convergence rates and a near optimal contraction radius for population and sample-based gradient EM for multi-component GMMs with arbitrary mixing weights. For simplicity, we assume that the the mixing weights are known, and the covariance matrices are the same across components and known. For our sample-based analysis, we face new challenges where bears structural differences from the two-component, equal-weight setting, which are alleviated via the usage of non-traditional tools like a vector valued contraction argument and martingale concentrations bounds where bounded differences hold only with high probability. Acknowledgments PS was partially supported by NSF grant DMS 1713082. References [1] Pranjal Awasthi and Or Sheffet. Improved spectral-norm bounds for clustering. In APPROXRANDOM, pages 37–49. Springer, 2012. [2] Sivaraman Balakrishnan, Martin J. Wainwright, and Bin Yu. Statistical guarantees for the em algorithm: From population to sample-based analysis. Ann. Statist., 45(1):77–120, 02 2017. [3] Richard Combes. An extension of mcdiarmid’s inequality. arXiv preprint arXiv:1511.05240, 2015. [4] Denis Conniffe. Expected maximum log likelihood estimation. The Statistician, pages 317– 329, 1987. 9 [5] Sanjoy Dasgupta. Learning mixtures of gaussians. In Foundations of Computer Science, 1999. 40th Annual Symposium on, pages 634–644. IEEE, 1999. [6] Sanjoy Dasgupta and Leonard J Schulman. A two-round variant of em for gaussian mixtures. In Proceedings of the Sixteenth conference on Uncertainty in artificial intelligence, pages 152– 159. Morgan Kaufmann Publishers Inc., 2000. [7] Arthur P Dempster, Nan M Laird, and Donald B Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the royal statistical society. Series B (methodological), pages 1–38, 1977. [8] Zachary Friggstad, Mohsen Rezapour, and Mohammad R Salavatipour. Local search yields a ptas for k-means in doubling metrics. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pages 365–374. IEEE, 2016. [9] Chi Jin, Yuchen Zhang, Sivaraman Balakrishnan, Martin J Wainwright, and Michael I Jordan. Local maxima in the likelihood of gaussian mixture models: Structural results and algorithmic consequences. In Advances in Neural Information Processing Systems, pages 4116–4124, 2016. [10] Amit Kumar and Ravindran Kannan. Clustering with spectral norm and the k-means algorithm. In Foundations of Computer Science (FOCS), 2010 51st Annual IEEE Symposium on, pages 299–308. IEEE, 2010. [11] Kenneth Lange. A gradient algorithm locally equivalent to the em algorithm. Journal of the Royal Statistical Society. Series B (Methodological), pages 425–437, 1995. [12] Michel Ledoux and Michel Talagrand. Probability in Banach Spaces: isoperimetry and processes. Springer Science & Business Media, 2013. [13] Yu Lu and Harrison H Zhou. Statistical and computational guarantees of lloyd’s algorithm and its variants. arXiv preprint arXiv:1612.02099, 2016. [14] Jirı Matouˇsek. On approximate geometric k-clustering. Discrete & Computational Geometry, 24(1):61–84, 2000. [15] Andreas Maurer. A vector-contraction inequality for rademacher complexities. In International Conference on Algorithmic Learning Theory, pages 3–17. Springer, 2016. [16] Colin McDiarmid. On the method of bounded differences. Surveys in combinatorics, 141(1):148–188, 1989. [17] Dustin G Mixon, Soledad Villar, and Rachel Ward. Clustering subgaussian mixtures by semidefinite programming. arXiv preprint arXiv:1602.06612, 2016. [18] Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of machine learning. MIT press, 2012. [19] Iftekhar Naim and Daniel Gildea. Convergence of the em algorithm for gaussian mixtures with unbalanced mixing coefficients. arXiv preprint arXiv:1206.6427, 2012. [20] Richard A Redner and Homer F Walker. Mixture densities, maximum likelihood and the em algorithm. SIAM review, 26(2):195–239, 1984. [21] Santosh Vempala and Grant Wang. A spectral algorithm for learning mixture models. Journal of Computer and System Sciences, 68(4):841–860, 2004. [22] CF Jeff Wu. On the convergence properties of the em algorithm. The Annals of statistics, pages 95–103, 1983. [23] Ji Xu, Daniel J Hsu, and Arian Maleki. Global analysis of expectation maximization for mixtures of two gaussians. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 2676–2684. Curran Associates, Inc., 2016. 10 [24] Lei Xu and Michael I Jordan. On convergence properties of the em algorithm for gaussian mixtures. Neural computation, 8(1):129–151, 1996. [25] Bowei Yan and Purnamrita Sarkar. On robustness of kernel clustering. In Advances in Neural Information Processing Systems, pages 3090–3098, 2016. 11 | 2017 | 579 |
7,095 | Learning to Model the Tail Yu-Xiong Wang Deva Ramanan Martial Hebert Robotics Institute, Carnegie Mellon University {yuxiongw,dramanan,hebert}@cs.cmu.edu Abstract We describe an approach to learning from long-tailed, imbalanced datasets that are prevalent in real-world settings. Here, the challenge is to learn accurate “fewshot” models for classes in the tail of the class distribution, for which little data is available. We cast this problem as transfer learning, where knowledge from the data-rich classes in the head of the distribution is transferred to the data-poor classes in the tail. Our key insights are as follows. First, we propose to transfer meta-knowledge about learning-to-learn from the head classes. This knowledge is encoded with a meta-network that operates on the space of model parameters, that is trained to predict many-shot model parameters from few-shot model parameters. Second, we transfer this meta-knowledge in a progressive manner, from classes in the head to the “body”, and from the “body” to the tail. That is, we transfer knowledge in a gradual fashion, regularizing meta-networks for few-shot regression with those trained with more training data. This allows our final network to capture a notion of model dynamics, that predicts how model parameters are likely to change as more training data is gradually added. We demonstrate results on image classification datasets (SUN, Places, and ImageNet) tuned for the long-tailed setting, that significantly outperform common heuristics, such as data resampling or reweighting. 1 Motivation Deep convolutional neural networks (CNNs) have revolutionized the landscape of visual recognition, through the ability to learn “big models” with hundreds of millions of parameters [1, 2, 3, 4]. Such models are typically learned with artificially balanced datasets [5, 6, 7], in which objects of different classes have approximately evenly distributed, very large number of human-annotated images. In real-world applications, however, visual phenomena follow a long-tailed distribution as shown in Fig. 1, in which the number of training examples per class varies significantly from hundreds or thousands for head classes to as few as one for tail classes [8, 9, 10]. Long-tail: Minimizing the skewed distribution by collecting more tail examples is a notoriously difficult task when constructing datasets [11, 6, 12, 10]. Even those datasets that are balanced along one dimension still tend to be imbalanced in others [13]; e.g., balanced scene datasets still contain long-tail sets of objects [14] or scene subclasses [8]. This intrinsic long-tail property poses a multitude of open challenges for recognition in the wild [15], since the models will be largely dominated by those few head classes while degraded for many other tail classes. Rebalancing training data [16, 17] is the most widespread state-of-the-art solution, but this is heuristic and suboptimal — it merely generates redundant data through over-sampling or loses critical information through under-sampling. Head-to-tail knowledge transfer: An attractive alternative is to transfer knowledge from data-rich head classes to data-poor tail classes. While transfer learning from a source to target task is a well studied problem [18, 19], by far the most common approach is fine-tuning a model pre-trained on the source task [20]. In the long-tailed setting, this fails to provide any noticeable improvement since 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 0 50 100 150 200 250 300 350 400 Class index 0 200 400 600 800 1000 1200 # Occurrences Head Long tail (a) Long-tail distribution on the SUN-397 dataset. 𝜃" 𝜃# Living Room 𝜃∗ 𝜃% 𝜃& Library 𝜃" 𝜃& Knowledge Transfer ℱ 𝜃∗ ℱ (b) Knowledge transfer from head to tail classes. Figure 1: Head-to-tail knowledge transfer in model space for long-tail recognition. Fig. 1a shows the number of examples by scene class on SUN-397 [14], a representative dataset that follows an intrinsic long-tailed distribution. In Fig. 1b, from the data-rich head classes (e.g., living rooms), we introduce a meta-learner F to learn the model dynamics — a series of transformations (denoted as solid lines) that represents how few k-shot models θk start from θ1 and gradually evolve to the underlying many-shot models θ∗trained from large sets of samples. The model parameters θ are visualized as points in the “dual” model (parameter) space. We leverage the model dynamics as prior knowledge to facilitate recognizing tail classes (e.g., libraries) by hallucinating their model evolution trajectories (denoted as dashed lines). pre-training on the head is quite similar to training on the unbalanced long-tailed dataset (which is dominated by the head) [10]. Transferring meta-knowledge: Inspired by the recent work on meta-learning [21, 22, 23, 24, 25, 26], we instead transfer meta-level knowledge about learning to learn from the head classes. Specifically, we make use of the approach of [21], which describes a method for learning from small datasets (the “few-shot” learning problem) through estimating a generic model transformation. To do so, [21] learns a meta-level network that operates on the space of model parameters, which is specifically trained to regress many-shot model parameters (trained on large datasets) from few-shot model parameters (trained on small datasets). Our meta-level regressor, which we call MetaModelNet, is trained on classes from the head of the distribution and then applied to those from the tail. As an illustrative example in Fig. 1, consider learning scene classifiers on a long-tailed dataset with many living-rooms but few outside libraries. We learn both many-shot and few-shot living-room models (by subsampling the training data as needed), and train a regressor that maps between the two. We can then apply the regressor on few-shot models of libraries learned from the tail. Progressive transfer: The above description suggests that we need to split up a long-tailed training set into a distinct set of source classes (the head) and target classes (the tail). This is most naturally done by thresholding the number of training examples per class. But what is the correct threshold? A high threshold might result in a meta-network that simply acts as an identity function, returning the input set of model parameters. This certainly would not be useful to apply on few-shot models. Similarly, a low threshold may not be useful when regressing from many-shot models. Instead, we propose a “continuous” strategy that builds multiple regressors across a (logarithmic) range of thresholds (e.g., 1-shot, 2-shot, 4-shot regressors, etc.), corresponding to different head-tail splits. Importantly, these regressors can be efficiently implemented with a single, chained MetaModelNet that is naturally regularized with residual connections, such that the 2-shot regressor need only predict model parameters that are fed into the 4-shot regressor, and so on (until the many-shot regressor that defaults to the identity). By doing so, MetaModelNet encodes a trajectory over the space of model parameters that captures their evolution with increasing sample sizes, as shown in Fig. 1b. Interestingly, such a network is naturally trained in a progressive manner from the head towards the tail, effectively capturing the gradual dynamics of transferring meta-knowledge from data-rich to data-poor regimes. Model dynamics: It is natural to ask what kind of dynamics are learned by MetaModelNet — how can one consistently predict how model parameters will change with more training data? We posit that the network learns to capture implicit data augmentation — for example, given a 1-shot model trained with a single image, the network may learn to implicitly add rotations of that single image. But rather 2 than explicitly creating data, MetaModelNet predicts their impact on the learned model parameters. Interestingly, past work tends to apply the same augmentation strategies across all input classes. But perhaps different classes should be augmented in different ways — e.g., churches maybe viewed from consistent viewpoints and should not be augmented with out-of-plane rotations. MetaModelNet learns class-specific transformations that are smooth across the space of models — e.g., classes with similar model parameters tend to transform in similar ways (see Fig. 1b and Fig. 4 for more details). Our contributions are three-fold. (1) We analyze the dynamics of how model parameters evolve when given access to more training examples. (2) We show that a single meta-network, based on deep residual learning, can learn to accurately predict such dynamics. (3) We train such a meta-network on long-tailed datasets through a recursive approach that gradually transfers meta-knowledge learned from the head to the tail, significantly improving long-tail recognition on a broad range of tasks. 2 Related Work A widespread yet suboptimal strategy is to resample and rebalance training data in the presence of the long tail, either by sampling examples from the rare classes more frequently [16, 17], or reducing the number of examples from the common classes [27]. The former generates redundancy and quickly runs into the problem of over-fitting to the rare classes, whereas the latter loses critical information contained within the large-sample sets. An alternative practice is to introduce additional weights for different classes, which, however, makes optimization of the models very difficult in the large-scale recognition scenarios [28]. Our underlying assumption that model parameters across different classes share similar dynamics is somewhat common in meta-learning [21, 22, 25]. While [22, 25] consider the dynamics during stochastic gradient descent (SGD) optimization, we address the dynamics as more training data is gradually made available. In particular, the model regression network from [21] empirically shows a generic nonlinear transformation from small-sample to large-sample models for different types of feature spaces and classifier models. We extend [21] for long-tail recognition by introducing a single network that can model transformations across different samples sizes. To train such a network, we introduce recursive algorithms for head-to-tail transfer learning and architectural modifications based on deep residual networks (that ensure that transformations of large-sample models default to the identity). Our approach is broadly related to different meta-learning concepts such as learning-to-learn, transfer learning, and multi-task learning [29, 30, 18, 31]. Such approaches tend to learn shared structures from a set of relevant tasks and generalize to novel tasks. Specifically, our approach is inspired by early work on parameter prediction that modifies the weights of one network using another [32, 33, 34, 35, 36, 37, 38, 26, 39]. Such techniques have also been recently explored in the context of regressing classifier weights from training sample [40, 41, 42]. From an optimization perspective, our approach is related to work on learning to optimize, which replaces hand-designed update rules (e.g., SGD) with a learned update rule [22, 24, 25]. The most related formulation is that of one/few-shot learning [43, 44, 45, 46, 47, 48, 21, 49, 35, 50, 23, 51, 52, 53, 54, 55, 56]. Past work has explored strategies of using the common knowledge captured among a set of one-shot learning tasks during meta-training for a novel one-shot learning problem [52, 25, 35, 53]. These techniques, however, are typically developed for a fixed set of few-shot tasks, in which each class has the same, fixed number of training samples. They appear difficult to generalize to novel tasks with a wide range of sample sizes, the hallmark of long-tail recognition. 3 Head-to-Tail Meta-Knowledge Transfer Given a long-tail recognition task of interest and a base recognition model such as a deep CNN, our goal is to transfer knowledge from the data-rich head to the data-poor tail classes. As shown in Fig. 1, knowledge is represented as trajectories in model space that capture the evolution of parameters with more and more training examples. We train a meta-learner (MetaModelNet) to learn such model dynamics from head classes, and then “hallucinate” the evolution of parameters for the tail classes. To simplify exposition, we first describe the approach for a fixed split of our training dataset into a head and tail. We then generalize the approach to multiple splits. 3 Res0 Res1 Res𝑁 … 𝜃∗ … 1Shot 𝜃 2Shot 𝜃 2%Shot 𝜃 2&Shot 𝜃 Res𝑖 ℱ) ℱ& (𝑘= 2&) (a) Learning a sample-size dependent transformation. BN Leaky ReLU Weight BN Leaky ReLU Weight 2𝑖Shot 𝜃 (b) Structure of residual blocks. Figure 2: MetaModelNet architecture for learning model dynamics. We instantiate MetaModelNet as a deep residual network with residual blocks i = 0, 1, . . . , N in Fig. 2a, which accepts few-shot model parameters θ (trained on small datasets across a logarithmic range of sample sizes k, k = 2i) as (multiple) inputs and regresses them to many-shot model parameters θ∗(trained on large datasets) as output. The skip connections ensure the identity regularization. Fi denotes the meta-learner that transforms (regresses) k-shot θ to θ∗. Fig. 2b shows the structure of the residual blocks. Note that the meta-learners Fi for different k are derived from this single, chained meta-network, with nested circles (subnetworks) corresponding to Fi. 3.1 Fixed-size model transformations Let us write Ht for the “head” training set of (x, y) data-label pairs constructed by assembling those classes for which there exist more than t training examples. We will use Ht to learn a meta-network thats maps few-shot model parameters to many-shot parameters, and then apply this network on few-shot models from the tail classes. To do so, we closely follow the model regression framework from [21], but introduce notation that will be useful later. Let us write a base learner as g(x; θ) as a feedforward function g(·) that processes an input sample x given parameters θ. We first learn a set of “optimal” model parameters θ∗by tuning g on Ht with a standard loss function. We also learn few-shot models by randomly sampling a smaller fixed number of examples per class from Ht. We then train a meta-network F(·) to map or regress the few-shot parameters to θ∗. Parameters: In principle, F(·) applies to model parameters from multiple CNN layers. Directly regressing parameters from all layers is, however, difficult to do because of the larger number of parameters. For example, recent similar methods for meta-learning tend to restrict themselves to smaller toy networks [22, 25]. For now, we focus on parameters from the last fully-connected layer for a single class — e.g., θ ∈R4096 for an AlexNet architecture. This allows us to learn regressors that are shared across classes (as in [21]), and so can be applied to any individual test class. This is particularly helpful in the long-tailed setting, where the number of classes in the tail tends to outnumber the head. Later we will show that (nonlinear) fine-tuning of the “entire network” during head-to-tail transfer can further improve performance. Loss function: The meta-network F(·) is itself parameterized with weights w. The objective function for each class is: X θ∈kShot(Ht) n ||F(θ; w) −θ∗||2 + λ X (x,y)∈Ht loss g x; F(θ; w) , y o . (1) The final loss is averaged over all the head classes and minimized with respect to w. Here, kShot(Ht) is the set of few-shot models learned by subsampling k examples per class from Ht, and loss refers to the performance loss used to train the base network (e.g., cross-entropy). λ > 0 is the regularization parameter used to control the trade-off between the two terms. [21] found that the performance loss was useful to learn regressors that maintained high accuracy on the base task. This formulation can be viewed as an extension to those in [21, 25]. With only the performance loss, Eqn. (1) reduces to the loss function in [25]. When the performance loss is evaluated on the subsampled set, Eqn. (1) reduces to the loss function in [21]. 4 Training: What should be the value of k, for the k-shot models being trained? One might be tempted to set k = t, but this implies that there will be some head classes near the cutoff that have only t training examples, implying θ and θ∗will be identical. To ensure that a meaningful mapping is learned, we set k = t/2. In other terms, we intentionally learn very-few-shot models to ensure that target model parameters are sufficiently more general. 3.2 Recursive residual transformations We wish to apply the above module on all possible head-tail splits of a long-tailed training set. To do so, we extend the above approach in three crucial ways: • (Sample-size dependency) Generate a sequence of different meta-learners Fi each tuned for a specific k, where k = k(i) is an increasing function of i (that will be specified shortly). Through a straightforward extension, prior work on model regression [21] learns a single fixed meta-learner for all the k-shot regression tasks. • (Identity regularization) Ensure that the meta-learner defaults to the identity function for large i: Fi →I as i →∞. • (Compositionality) Compose meta-learners out of each other: ∀i < j, Fi(θ) = Fj Fij(θ) where Fij is the regressor that maps between k(i)-shot and k(j)-shot models. Here we dropped the explicit dependence of F(·) on w for notational simplicity. These observations emphasize the importance of (1) the identity regularization and (2) sample-size dependent regressors for long-tailed model transfer. We operationalize these extensions with a recursive residual network: Fi(θ) = Fi+1 θ + f(θ; wi) , (2) where f denotes a residual block parameterized by wi and visualized in Fig. 2b. Inspired by [57, 21], f consists of batch normalization (BN) and leaky ReLU as pre-activation, followed by fully-connected weights. By construction, each residual block transforms an input k(i)-shot model to a k(i + 1)-shot model. The final MetaModelNet can be efficiently implemented through a chained network of N + 1 residual blocks, as shown in Fig. 2a. By feeding in a few-shot model at a particular block, we can derive any meta-learner Fi from the central underlying chain. 3.3 Training Given the network structure defined above, we now describe an efficient method for training based on two insights. (1) The recursive definition of MetaModelNet suggests a recursive strategy for training. We begin with the last block and train it with the largest threshold (e.g., those few classes in the head with many examples). The associated k-shot regressor should be easy to learn because it is similar to an identity mapping. Given the learned parameters for the last block, we then train the next-to-last block, and so on. (2) Inspired by the general observation that recognition performance improves on a logarithmic scale as the number of training samples increases [8, 9, 58], we discretize blocks accordingly, to be tuned for 1-shot, 2-shot, 4-shot, ... recognition. In terms of notation, we write the recursive training procedure as follows. We iterate over blocks i from N to 0, and for each i: • Using Eqn. (1), train parameters of the residual block wi on the head split Ht with k-shot model regression, where k = 2i and t = 2k = 2i+1. The above “back-to-front” training procedure works because whenever block i is trained, all subsequent blocks (i + 1, . . . , N) have already been trained. In practice, rather than holding all subsequent blocks fixed, it is natural to fine-tune them while training block i. One approach might be fine-tuning them on the current k = 2i-shot regression task being considered at iteration i. But because MetaModelNet will be applied across a wide range of k, we fine-tune blocks in a multi-task manner across the current viable range of k = (2i, 2i+1, . . . , 2N) at each iteration i. 5 3.4 Implementation details We learn the CNN models on the long-tailed recognition datasets in different scenarios: (1) using a CNN pre-trained on ILSVRC 2012 [1, 59, 60] as the off-the-shelf feature; (2) fine-tuning the pre-trained CNN; and (3) training a CNN from scratch. We use ResNet152 [4] for its state-of-the-art performance and use ResNet50 [4] and AlexNet [1] for their easy computation. When training the residual block i, we use the corresponding threshold t and obtain Ct head classes. We generate the Ct-way many-shot classifiers on Ht. For few-shot models, we learn Ct-way k-shot classifiers on random subsets of Ht. Through random sampling, we generate S model mini-batches and each model mini-batch consists of Ct weight vector pairs. In addition, to minimize the loss function (1), we randomly sample 256 image-label pairs as a data mini-batch from Ht. We then use Caffe [59] to train our MetaModelNet on the generated model and data mini-batches based on standard SGD. λ is cross-validated. We use 0.01 as the negative slope for leaky ReLU. Computation is naturally divided into two stages: (1) training a collection of few/many-shot models and (2) learning MetaModelNet from those models. (2) is equivalent to progressively learning a nonlinear regressor. (1) can be made efficient because it is naturally parallelizable across models, and moreover, many models make use of only small training sets. 4 Experimental Evaluation In this section, we explore the use of our MetaModelNet on long-tail recognition tasks. We begin with extensive evaluation of our approach on scene classification of the SUN-397 dataset [14], and address the meta-network variations and different design choices. We then visualize and empirically analyze the learned model dynamics. Finally, we evaluate on the challenging large-scale, scene-centric Places [7] and object-centric ImageNet datasets [5] and show the generality of our approach. 4.1 Evaluation and analysis on SUN-397 Dataset and task: We start our evaluation by fine-tuning a pre-trained CNN on SUN-397, a mediumscale, long-tailed dataset with 397 classes and 100–2,361 images per class [14]. To better analyze trends due to skewed distributions, we carve out a more extreme version of the dataset. Following the experimental setup in [61, 62, 63], we first randomly split the dataset into train, validation, and test parts using 50%, 10%, and 40% of the data, respectively. The distribution of classes is uniform across all the three parts. We then randomly discard 49 images per class for the train part, leading to a long-tailed training set with 1–1,132 images per class (median 47). Similarly, we generate a small long-tailed validation set with 1–227 images per class (median 10), which we use for learning hyper-parameters. We also randomly sample 40 images per class for the test part, leading to a balanced test set. We report 397-way multi-class classification accuracy averaged over all classes. 4.1.1 Comparison with state-of-the-art approaches We first focus on fine-tuning the classifier module while freezing the representation module of a pre-trained ResNet152 CNN model [4, 63] for its state-of-the-art performance. Using MetaModelNet, we learn the model dynamics of the classifier module, i.e., how the classifier weight vectors change during fine-tuning. Following the design choices in Section 3.2, our MetaModelNet consists of 7 residual blocks. For few-shot models, we generate S = 1000 1-shot, S = 500 2-shot, and S = 200 4-shot till 64-shot models from the head classes for learning MetaModelNet. At test time, given the weight vectors of all the classes learned through fine-tuning, we feed them as inputs to the different residual blocks according to their training sample size of the corresponding class. We then “hallucinate” the dynamics of these weight vectors and use the outputs of MetaModelNet to modify the parameters of the final recognition model as in [21]. Baselines: In addition to the “plain” baseline that fine-tunes on the target data following the standard practice, we compare against three state-of-the-art baselines that are widely used to address the imbalanced distributions. (1) Over-sampling [16, 17], which uses the balanced sampling via label shuffling as in [16, 17]. (2) Under-sampling [27], which reduces the number of samples per class to 47 at most (the median value). (3) Cost-sensitive [28], which introduces additional weights in the loss function for each class with inverse class frequency. For a fair comparison, fine-tuning is performed 6 Method Plain [4] Over-Sampling [16, 17] Under-Sampling [27] Cost-Sensitive [28] MetaModelNet (Ours) Acc (%) 48.03 52.61 51.72 52.37 57.34 Table 1: Performance comparison between our MetaModelNet and state-of-the-art approaches for long-tailed scene classification when fine-tuning the pre-trained ILSVRC ResNet152 on the SUN-397 dataset. We focus on learning the model dynamics of the classifier module while freezing the CNN representation module. By benefiting from the learned generic model dynamics from head classes, ours significantly outperforms all the baselines for the long-tail recognition. 0 50 100 150 200 250 300 350 400 Class index -40 -20 0 20 40 60 80 Relative accuracy gain (%) 0 200 400 600 800 1000 1200 # Occurrences MetaModelNet (Ours) Over-Sampling Figure 3: Detailed per class performance comparison between our MetaModelNet and the state-ofthe-art over-sampling approach for long-tailed scene classification on the SUN-397 dataset. X-axis: class index. Y-axis (Left): per class classification accuracy improvement relative to the plain baseline. Y-axis (Right): number of training examples. Ours significantly improves for the few-shot tail classes. for around 60 epochs using SGD with an initial learning rate of 0.01, which is reduced by a factor of 10 around every 30 epochs. All the other hyper-parameters are the same for all approaches. Table 1 summarizes the performance comparison averaged over all classes and Fig. 3 details the per class comparison. Table 1 shows that our MetaModelNet provides a promising way of encoding the shared structure across classes in model space. It outperforms existing approaches for long-tail recognition by a large margin. Fig. 3 shows that our approach significantly improves accuracy in the tail. 4.1.2 Ablation analysis We now evaluate variations of our approach and provide ablation analysis. Similar as in Section 4.1.1, we use ResNet152 in the first two sets of experiments and only fine-tune the classifier module. In the last set of experiments, we use ResNet50 [4] for easy computation and fine-tune through the entire network. Tables 2 and 3 summarize the results. Sample-size dependent transformation and identity regularization: We compare to [21], which learns a single transformation for a variety of sample sizes and k-shot models, and importantly, learns a network without identity regularization. For a fair comparison, we consider a variant of MetaModelNet trained on a fixed head and tail split, selected by cross-validation. Table 2 shows that training for a fixed sample size and identity regularization provide a noticeable performance boost (2%). Recursive class splitting: Adding multiple head-tail splits through recursion further improves accuracy by a small but noticeable amount (0.5% as shown in Table 2). We posit that progressive knowledge transfer outperforms the traditional approach because ordering classes by frequency is a natural form of curriculum learning. Joint feature fine-tuning and model dynamics learning: We also explore (nonlinear) fine-tuning of the “entire network” during head-to-tail transfer by jointly learning the classifier dynamics and the feature representation using ResNet50. We explore two approaches as follows. (1) We first fine-tune 7 Method Model Regression [21] MetaModelNet+Fix Split (Ours) MetaModelNet+ Recur Split (Ours) Acc (%) 54.68 56.86 57.34 Table 2: Ablation analysis of variations of our MetaModelNet. In a fixed head-tail split, ours outperforms [21], showing the merit of learning a sample-size dependent transformation. By recursively partitioning the entire classes into different head-tail splits, our performance is further improved. Scenario Pre-Trained Features Fine-Tuned Features (FT) Method Plain [4] MetaModelNet (Ours) Plain [4] Fix FT + MetaModelNet (Ours) Recur FT + MetaModelNet (Ours) Acc (%) 46.90 54.99 49.40 58.53 58.74 Table 3: Ablation analysis of joint feature fine-tuning and model dynamics learning on a ResNet50 base network. Though results with pre-trained features underperform those with a deeper base network (ResNet152, the default in our experiments), fine-tuning such features significantly improves results, even outperforming the deeper base network. By progressively fine-tuning the representation during the recursive training of MetaModelNet, performance significantly improves from 54.99% (changing only the classifier weights) to 58.74% (changing the entire CNN). the whole CNN on the entire long-tailed training dataset, and then learn the classifier dynamics using the fixed, fine-tuned representation. (2) During the recursive head-tail splitting, we fine-tune the entire CNN on the current head classes in Ht (while learning the many-shot parameters θ∗), and then learn classifier dynamics using the fine-tuned features. Table 3 shows that progressively learning classifier dynamics while fine-tuning features performs the best. 4.2 Understanding model dynamics Because model dynamics are highly nonlinear, a theoretical proof is rather challenging and outside the scope of this work. Here we provide some empirical analysis of model dynamics. When analyzing the “dual model (parameter) space”, in which models parameters θ can be viewed as points, Fig. 4 shows that our MetaModelNet learns an approximately-smooth, nonlinear warping of this space that transforms (few-shot) input points to (many-shot) output points. For example, iceberg and mountain scene classes are more similar to each other than to bedrooms. This implies that few-shot iceberg and mountain scene models lie near each other in parameter space, and moreover, they transform in similar ways (when compared to bedrooms). This single meta-network hence encodes class-specific model transformations. We posit that the transformation may capture some form of (class-specific) data-augmentation. Finally, we find that some properties of the learned transformations are quite class-agnostic and apply in generality. Many-shot model parameters tend to have larger magnitudes and norms than few-shot ones (e.g., on SUN-397, the average norm of 1-shot models is 0.53; after transformations through MetaModelNet, the average norm of the output models becomes 1.36). This is consistent with the common empirical observation that classifier weights tend to grow with the amount of training data, showing that they become more confident about their prediction. 4.3 Generalization to other tasks and datasets We now focus on the more challenging, large-scale scene-centric Places [7] and object-centric ImageNet [5] datasets. While we mainly addressed the model dynamics when fine-tuning a pretrained CNN in the previous experiments, here we train AlexNet models [1] from scratch on the target tasks. Table 4 shows the generality of our approach and shows that MetaModelNets facilitate the recognition of other long-tailed datasets with significantly different visual concepts and distributions. Scene classification on the Places dataset: Places-205 [7] is a large-scale dataset which contains 2,448,873 training images approximately evenly distributed across 205 classes. To generate its long-tailed version and better analyze trends due to skewed distributions, we distribute it according to the distribution of SUN and carve out a more extreme version (p2, or 2× the slope in log-log plot) out of the Places training portion, leading to a long-tailed training set with 5–9,900 images per class (median 73). We use the provided validation portion as our test set with 100 images per class. Object classification on the ImageNet dataset: The ILSVRC 2012 classification dataset [5] contains 1,000 classes with 1.2 million training images (approximately balanced between the classes) and 50K validation images. There are 200 classes used for object detection which are defined as 8 -0.4 -0.2 0 0.2 0.4 0.6 -0.4 -0.2 0 0.2 0.4 0.6 (a) PCA visualization. -40 -20 0 20 40 60 -40 -20 0 20 40 Mountain Mountain Snowy Iceberg Hotel Room Bedroom Living Room (b) t-SNE visualization. Figure 4: Visualizing model dynamics. Recall that θ is a fixed-dimensional vector of model parameters — e.g., θ ∈R2048 when considering parameters from the last layer of ResNet. We visualize models as points in this “dual” space. Specifically, we examine the evolution of parameters predicted by MetaModelNet with dimensionality reduction — PCA (Fig. 4a) or t-SNE [64] (Fig. 4b). 1-shot models (purple) to many-shot models (red) are plotted in a rainbow order. These visualizations show that MetaModelNet learns an approximately-smooth, nonlinear warping of this space that transforms (few-shot) input points to (many-shot) output points. PCA suggests that many-shot models tend to have larger norms, while t-SNE (which nonlinearly maps nearby points to stay close) suggests that similar semantic classes tend to be close and transform in similar ways, e.g., the blue rectangle encompasses “room” classes while the red rectangle encompasses “wintry outdoor” classes. Dataset Places-205 [7] ILSVRC-2012 [5] Method Plain [1] MetaModelNet (Ours) Plain [1] MetaModelNet (Ours) Acc (%) 23.53 30.71 68.85 73.46 Table 4: Performance comparisons on long-tailed, large-scale scene-centric Places [7] and objectcentric ImageNet [5] datasets. Our MetaModelNets facilitate the long-tail recognition with significantly diverse visual concepts and distributions. higher-level classes of the original 1,000 classes. Taking the ILSVRC 2012 classification dataset and merging the 1,000 classes into the 200 higher-level classes, we obtain a natural long-tailed distribution. 5 Conclusions In this work we proposed a conceptually simple but powerful approach to address the problem of long-tail recognition through knowledge transfer from the head to the tail of the class distribution. Our key insight is to represent the model dynamics through meta-learning, i.e., how a recognition model transforms and evolves during the learning process when gradually encountering more training examples. To do so, we introduce a meta-network that learns to progressively transfer meta-knowledge from the head to the tail classes. We present several state-of-the-art results on benchmark datasets (SUN, Places, and Imagenet) tuned for the long-tailed setting, that significantly outperform common heuristics, such as data resampling or reweighting. Acknowledgments. We thank Liangyan Gui, Olga Russakovsky, Yao-Hung Hubert Tsai, and Ruslan Salakhutdinov for valuable and insightful discussions. This work was supported in part by ONR MURI N000141612007 and U.S. Army Research Laboratory (ARL) under the Collaborative Technology Alliance Program, Cooperative Agreement W911NF-10-2-0016. DR was supported in part by the National Science Foundation (NSF) under grant number IIS-1618903, Google, and Facebook. We also thank NVIDIA for donating GPUs and AWS Cloud Credits for Research program. References [1] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. [2] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 9 [3] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015. [4] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. [5] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and L. Fei-Fei. ImageNet large scale visual recognition challenge. IJCV, 115(3):211–252, 2015. [6] 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 ECCV, 2014. [7] B. Zhou, A. Lapedriza, A. Khosla, A. Oliva, and A. Torralba. Places: A 10 million image database for scene recognition. TPAMI, 2017. [8] X. Zhu, D. Anguelov, and D. Ramanan. Capturing long-tail distributions of object subcategories. In CVPR, 2014. [9] X. Zhu, C. Vondrick, C. C. Fowlkes, and D. Ramanan. Do we need more training data? IJCV, 119(1):76–92, 2016. [10] G. Van Horn and P. Perona. The devil is in the tails: Fine-grained classification in the wild. arXiv preprint arXiv:1709.01450, 2017. [11] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The PASCAL visual object classes (VOC) challenge. IJCV, 88(2):303–338, 2010. [12] R. Krishna, Y. Zhu, O. Groth, J. Johnson, K. Hata, J. Kravitz, S. Chen, Y. Kalanditis, L.-J. Li, D. A. Shamma, M. Bernstein, and L. Fei-Fei. Visual genome: Connecting language and vision using crowdsourced dense image annotations. IJCV, 123(1):32–73, 2017. [13] W. Ouyang, X. Wang, C. Zhang, and X. Yang. Factors in finetuning deep model for object detection with long-tail distribution. In CVPR, 2016. [14] J. Xiao, K. A. Ehinger, J. Hays, A. Torralba, and A. Oliva. SUN database: Exploring a large collection of scene categories. IJCV, 119(1):3–22, 2016. [15] S. Bengio. Sharing representations for long tail computer vision problems. In ICMI, 2015. [16] L. Shen, Z. Lin, and Q. Huang. Relay backpropagation for effective learning of deep convolutional neural networks. In ECCV, 2016. [17] Q. Zhong, C. Li, Y. Zhang, H. Sun, S. Yang, D. Xie, and S. Pu. Towards good practices for recognition & detection. In CVPR workshops, 2016. [18] S. J. Pan and Q. Yang. A survey on transfer learning. TKDE, 22(10):1345–1359, 2010. [19] J. Yosinski, J. Clune, Y. Bengio, and H. Lipson. How transferable are features in deep neural networks? In NIPS, 2014. [20] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [21] Y.-X. Wang and M. Hebert. Learning to learn: Model regression networks for easy small sample learning. In ECCV, 2016. [22] M. Andrychowicz, M. Denil, S. Gomez, M. W. Hoffman, D. Pfau, T. Schaul, and N. de Freitas. Learning to learn by gradient descent by gradient descent. In NIPS, 2016. [23] Y.-X. Wang and M. Hebert. Learning from small sample sets by combining unsupervised meta-training with CNNs. In NIPS, 2016. [24] K. Li and J. Malik. Learning to optimize. In ICLR, 2017. [25] S. Ravi and H. Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017. [26] A. Sinha, M. Sarkar, A. Mukherjee, and B. Krishnamurthy. Introspection: Accelerating neural network training by learning weight evolution. In ICLR, 2017. [27] H. He and E. A. Garcia. Learning from imbalanced data. TKDE, 21(9):1263–1284, 2009. [28] C. Huang, Y. Li, C. C. Loy, and X. Tang. Learning deep representation for imbalanced classification. In CVPR, 2016. [29] S. Thrun and L. Pratt. Learning to learn. Springer Science & Business Media, 2012. [30] J. Schmidhuber, J. Zhao, and M. Wiering. Shifting inductive bias with success-story algorithm, adaptive levin search, and incremental self-improvement. Machine Learning, 28(1):105–130, 1997. [31] R. Caruana. Multitask learning. Machine Learning, 28(1):41–75, 1997. [32] J. Schmidhuber. Evolutionary principles in self-referential learning. On learning how to learn: The meta-meta-... hook.) Diploma thesis, Institut f. Informatik, Tech. Univ. Munich, 1987. [33] J. Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992. [34] J. Schmidhuber. A neural network that embeds its own meta-levels. In IEEE International Conference on Neural Networks, 1993. 10 [35] L. Bertinetto, J. F. Henriques, J. Valmadre, P. Torr, and A. Vedaldi. Learning feed-forward one-shot learners. In NIPS, 2016. [36] D. Ha, A. Dai, and Q. V. Le. Hypernetworks. In ICLR, 2017. [37] C. Finn, P. Abbeel, and S. Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 2017. [38] S.-A. Rebuffi, H. Bilen, and A. Vedaldi. Learning multiple visual domains with residual adapters. In NIPS, 2017. [39] T. Munkhdalai and H. Yu. Meta networks. In ICML, 2017. [40] R. Socher, M. Ganjoo, C. D. Manning, and A. Ng. Zero-shot learning through cross-modal transfer. In NIPS, 2013. [41] J. Ba, K. Swersky, S. Fidler, and R. Salakhutdinov. Predicting deep zero-shot convolutional neural networks using textual descriptions. In ICCV, 2015. [42] H. Noh, P. H. Seo, and B. Han. Image question answering using convolutional neural network with dynamic parameter prediction. In CVPR, 2016. [43] L. Fei-Fei, R. Fergus, and P. Perona. One-shot learning of object categories. TPAMI, 28(4):594– 611, 2006. [44] Y.-X. Wang and M. Hebert. Model recommendation: Generating object detectors from few samples. In CVPR, 2015. [45] G. Koch, R. Zemel, and R. Salakhutdinov. Siamese neural networks for one-shot image recognition. In ICML Workshops, 2015. [46] B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. [47] A. Santoro, S. Bartunov, M. Botvinick, D. Wierstra, and T. Lillicrap. One-shot learning with memory-augmented neural networks. In ICML, 2016. [48] Y.-X. Wang and M. Hebert. Learning by transferring from unsupervised universal sources. In AAAI, 2016. [49] Z. Li and D. Hoiem. Learning without forgetting. In ECCV, 2016. [50] B. Hariharan and R. Girshick. Low-shot visual recognition by shrinking and hallucinating features. In ICCV, 2017. [51] J. Bromley, J. W. Bentz, L. Bottou, I. Guyon, Y. LeCun, C. Moore, E. Säckinger, and R. Shah. Signature verification using a "siamese" time delay neural network. International Journal of Pattern Recognition and Artificial Intelligence, 7(4):669–688, 1993. [52] O. Vinyals, C. Blundell, T. Lillicrap, K. Kavukcuoglu, and D. Wierstra. Matching networks for one shot learning. In NIPS, 2016. [53] J. Snell, K. Swersky, and R. S. Zemel. Prototypical networks for few-shot learning. In NIPS, 2017. [54] Y. Fu, T. Xiang, Y.-G. Jiang, X. Xue, L. Sigal, and S. Gong. Recent advances in zero-shot recognition: Toward data-efficient understanding of visual content. IEEE Signal Processing Magazine, 35(1):112–125, 2018. [55] D. George, W. Lehrach, K. Kansky, M. Lázaro-Gredilla, C. Laan, B. Marthi, X. Lou, Z. Meng, Y. Liu, H. Wang, A. Lavin, and D. S. Phoenix. A generative vision model that trains with high data efficiency and breaks text-based CAPTCHAs. Science, 2017. [56] E. Triantafillou, R. Zemel, and R. Urtasun. Few-shot learning through an information retrieval lens. In NIPS, 2017. [57] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In ECCV, 2016. [58] C. Sun, A. Shrivastava, S. Singh, and A. Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In ICCV, 2017. [59] 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 ACM MM, 2014. [60] J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In ICML, 2014. [61] P. Agrawal, R. Girshick, and J. Malik. Analyzing the performance of multilayer neural networks for object recognition. In ECCV, 2014. [62] M. Huh, P. Agrawal, and A. A. Efros. What makes ImageNet good for transfer learning? In NIPS workshops, 2016. [63] Y.-X. Wang, D. Ramanan, and M. Hebert. Growing a brain: Fine-tuning by increasing model capacity. In CVPR, 2017. [64] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. JMLR, 9(Nov):2579–2605, 2008. 11 | 2017 | 58 |
7,096 | Bayesian Dyadic Trees and Histograms for Regression Stéphanie van der Pas Mathematical Institute Leiden University Leiden, The Netherlands svdpas@math.leidenuniv.nl Veronika Roˇcková Booth School of Business University of Chicago Chicago, IL, 60637 Veronika.Rockova@ChicagoBooth.edu Abstract Many machine learning tools for regression are based on recursive partitioning of the covariate space into smaller regions, where the regression function can be estimated locally. Among these, regression trees and their ensembles have demonstrated impressive empirical performance. In this work, we shed light on the machinery behind Bayesian variants of these methods. In particular, we study Bayesian regression histograms, such as Bayesian dyadic trees, in the simple regression case with just one predictor. We focus on the reconstruction of regression surfaces that are piecewise constant, where the number of jumps is unknown. We show that with suitably designed priors, posterior distributions concentrate around the true step regression function at a near-minimax rate. These results do not require the knowledge of the true number of steps, nor the width of the true partitioning cells. Thus, Bayesian dyadic regression trees are fully adaptive and can recover the true piecewise regression function nearly as well as if we knew the exact number and location of jumps. Our results constitute the first step towards understanding why Bayesian trees and their ensembles have worked so well in practice. As an aside, we discuss prior distributions on balanced interval partitions and how they relate to an old problem in geometric probability. Namely, we relate the probability of covering the circumference of a circle with random arcs whose endpoints are confined to a grid, a new variant of the original problem. 1 Introduction Histogram regression methods, such as regression trees [1] and their ensembles [2], have an impressive record of empirical success in many areas of application [3, 4, 5, 6, 7]. Tree-based machine learning (ML) methods build a piecewise constant reconstruction of the regression surface based on ideas of recursive partitioning. Perhaps the most popular partitioning schemes are the ones based on parallel-axis splits. One recent example is the Mondrian process [8], which was introduced to the ML community as a prior over tree data structures with interesting self-consistency properties. Many efficient algorithms exist that can be deployed to fit regression histograms underpinned by some partitioning scheme. Among these, Bayesian variants, such as Bayesian CART [9, 10] and BART [11], have appealed to umpteen practitioners. There are several reasons why. Bayesian tree-based regression tools (a) can adapt to regression surfaces without any need for pruning, (b) are reluctant to overfit, (c) provide an avenue for uncertainty statements via posterior distributions. While practical success stories abound [3, 4, 5, 6, 7], the theoretical understanding of Bayesian regression tree methods has been lacking. In this work, we study the quality of posterior distributions with regard to the three properties mentioned above. We provide first theoretical results that contribute to the understanding of Bayesian Gaussian regression methods based on recursive partitioning. Our performance metric will be the speed of posterior concentration/contraction around the true regression function. This is ultimately a frequentist assessment, describing the typical behavior of the posterior under the true generative model [12]. Posterior concentration rate results are now slowly 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. entering the machine learning community as a tool for obtaining more insights into Bayesian methods [13, 14, 15, 16, 17]. Such results quantify not only the typical distance between a point estimator (posterior mean/median) and the truth, but also the typical spread of the posterior around the truth. Ideally, most of the posterior mass should be concentrated in a ball centered around the true value with a radius proportional to the minimax rate [12, 18]. Being inherently a performance measure of both location and spread, optimal posterior concentration provides a necessary certificate for further uncertainty quantification [19, 20, 21]. Beyond uncertainty assessment, theoretical guarantees that describe the average posterior shrinkage behavior have also been a valuable instrument for assessing the suitability of priors. As such, these results can often provide useful guidelines for the choice of tuning parameters, e.g. the latent Dirichlet allocation model [14]. Despite the rapid growth of this frequentist-Bayesian theory field, posterior concentration results for Bayesian regression histograms/trees/forests have, so far, been unavailable. Here, we adopt this theoretical framework to get new insights into why these methods work so well. Related Work Bayesian density estimation with step functions is a relatively well-studied problem [22, 23, 24]. The literature on Bayesian histogram regression is a bit less crowded. Perhaps the closest to our conceptual framework is the work by Coram and Lalley [25], who studied Bayesian non-parametric binary regression with uniform mixture priors on step functions. The authors focused on L1 consistency. Here, we focus on posterior concentration rather than consistency. We are not aware of any other related theoretical study of Bayesian histogram methods for Gaussian regression. Our Contributions In this work we focus on a canonical regression setting with merely one predictor. We study hierarchical priors on step functions and provide conditions under which the posteriors concentrate optimally around the true regression function. We consider the case when the true regression function itself is a step function, i.e. a tree or a tree ensemble, where the number and location of jumps is unknown. We start with a very simple space of approximating step functions, supported on equally sized intervals where the number of splits is equipped with a prior. These partitions include dyadic regression trees. We show that for a suitable complexity prior, all relevant information about the true regression function (jump sizes and the number of jumps) is learned from the data automatically. During the course of the proof, we develop a notion of the complexity of a piecewise constant function relative to its approximating class. Next, we take a larger approximating space consisting of functions supported on balanced partitions that do not necessarily have to be of equal size. These correspond to more general trees with splits at observed values. With a uniform prior over all balanced partitions, we are able to achieve a nearly ideal performance (as if we knew the number and the location of jumps). As an aside, we describe the distribution of interval lengths obtained when the splits are sampled uniformly from a grid. We relate this distribution to the probability of covering the circumference of a circle with random arcs, a problem in geometric probability that dates back to [26, 27]. Our version of this problem assumes that the splits are chosen from a discrete grid rather than from a unit interval. Notation With ∝and ≲we will denote an equality and inequality, up to a constant. The ε-covering number of a set Ωfor a semimetric d, denoted by N(ε, Ω, d), is the minimal number of d-balls of radius ε needed to cover the set Ω. We denote by φ(·) the standard normal density and by P n f = N Pf,i the n-fold product measure of the n independent observations under (1) with a regression function f(·). By Px n = 1 n Pn i=1 δxi we denote the empirical distribution of the observed covariates, by || · ||n the norm on L2(Px n) and by || · ||2 the standard Euclidean norm. 2 Bayesian Histogram Regression We consider a classical nonparametric regression model, where response variables Y (n) = (Y1, . . . , Yn)′ are related to input variables x(n) = (x1, . . . , xn)′ through the function f0 as follows Yi = f0(xi) + εi, εi ∼N(0, 1), i = 1, . . . , n. (1) 2 We assume that the covariate values xi are one-dimensional, fixed and have been rescaled so that xi ∈[0, 1]. Partitioning-based regression methods are often invariant to monotone transformations of observations. In particular, when f0 is a step function, standardizing the distance between the observations, and thereby the split points, has no effect on the nature of the estimation problem. Without loss of generality, we will thereby assume that the observations are aligned on an equispaced grid. Assumption 1. (Equispaced Grid) We assume that the scaled predictor values satisfy xi = i n for each i = 1, . . . , n. This assumption implies that partitions that are balanced in terms of the Lebesque measure will be balanced also in terms of the number of observations. A similar assumption was imposed by Donoho [28] in his study of Dyadic CART. The underlying regression function f0 : [0, 1] →R is assumed to be a step function, i.e. f0(x) = K0 X k=1 β0 kIΩ0 k(x), where {Ω0 k}K0 k=1 is a partition of [0, 1] into K0 non-overlapping intervals. We assume that {Ω0 k}K0 k=1 is minimal, meaning that f0 cannot be represented with a smaller partition (with less than K0 pieces). Each partitioning cell Ω0 k is associated with a step size β0 k, determining the level of the function f0 on Ω0 k. The entire vector of K0 step sizes will be denoted by β0 = (β0 1, . . . , β0 K)′. One might like to think of f0 as a regression tree with K0 bottom leaves. Indeed, every step function can be associated with an equivalence class of trees that live on the same partition but differ in their tree topology. The number of bottom leaves K0 will be treated as unknown throughout this paper. Our goal will be designing a suitable class of priors on step functions so that the posterior concentrates tightly around f0. Our analysis with a single predictor has served as a precursor to a full-blown analysis for high-dimensional regression trees [29]. We consider an approximating space of all step functions (with K = 1, 2, . . . bottom leaves) F = ∪∞ K=1FK, (2) which consists of smaller spaces (or shells) of all K-step functions FK = ( fβ : [0, 1] →R; fβ(x) = K X k=1 βkIΩk(x) ) , each indexed by a partition {Ωk}K k=1 and a vector of K step heights β. The fundamental building block of our theoretical analysis will be the prior on F. This prior distribution has three main ingredients, described in detail below, (a) a prior on the number of steps K, (b) a prior on the partitions {Ωk}K k=1 of size K, and (c) a prior on step sizes β = (β1, . . . , βK)′. 2.1 Prior πK(·) on the Number of Steps K To avoid overfitting, we assign an exponentially decaying prior distribution that penalizes partitions with too many jumps. Definition 2.1. (Prior on K) The prior on the number of partitioning cells K satisfies πK(k) ≡Π(K = k) ∝exp(−cK k log k) for k = 1, 2, . . . . (3) This prior is no stranger to non-parametric problems. It was deployed for stepwise reconstructions of densities [24, 23] and regression surfaces [25]. When cK is large, this prior is concentrated on models with small complexity where overfitting should not occur. Decreasing cK leads to the smearing of the prior mass over partitions with more jumps. This is illustrated in Figure 1, which depicts the prior for various choices of cK. We provide recommendations for the choice of cK in Section 3.1. 2.2 Prior πΩ(· | K) on Interval Partitions {Ωk}K k=1 After selecting the number of steps K from πK(k), we assign a prior over interval partitions πΩ(· |K). We will consider two important special cases. 3 2 4 6 8 10 0.0 0.1 0.2 0.3 0.4 0.5 k G G G G G G G G G G G 1 1/2 1/5 1/10 πK(k) 0.0 0.2 0.4 0.6 0.8 1.0 0 1 2 3 4 5 6 x G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G True K=2 K=5 K=10 f0(x) Figure 1: (Left) Prior on the tree size for several values of cK, (Right) Best approximations of f0 (in the ℓ2 sense) by step functions supported on equispaced blocks of size K ∈{2, 5, 10}. 2.2.1 Equivalent Blocks Perhaps the simplest partition is based on statistically equivalent blocks [30], where all the cells are required to have the same number of points. This is also known as the K-spacing rule that partitions the unit interval using order statistics of the observations. Definition 2.2. (Equivalent Blocks) Let x(i) denote the ith order statistic of x = (x1, . . . , xn)′, where x(n) ≡1 and n = Kc for some c ∈N\{0}. Denote by x(0) ≡0. A partition {Ωk}K k=1 consists of K equivalent blocks, when Ωk = (x(jk), x(jk+1)], where jk = (k −1)c. A variant of this definition can be obtained in terms of interval lengths rather than numbers of observations. Definition 2.3. (Equispaced Blocks) A partition {Ωk}K k=1 consists of K equispaced blocks Ωk, when Ωk = k−1 K , k K for k = 1, . . . , K. When K = 2s for some s ∈N\{0}, the equispaced partition corresponds to a full complete binary tree with splits at dyadic rationals. If the observations xi lie on a regular grid (Assumption 1), then Definition 2.2 and 2.3 are essentially equivalent. We will thereby focus on equivalent blocks (EB) and denote such a partition (for a given K > 0) with ΩEB K . Because there is only one such partition for each K, the prior πΩ(·|K) has a single point mass mass at ΩEB K . With ΩEB = ∪∞ K=1ΩEB K we denote the set of all EB partitions for K = 1, 2, . . . . We will use these partitioning schemes as a jump-off point. 2.2.2 Balanced Intervals Equivalent (equispaced) blocks are deterministic and, as such, do not provide much room for learning about the actual location of jumps in f0. Balanced intervals, introduced below, are a richer class of partitions that tolerate a bit more imbalance. First, we introduce the notion of cell counts µ(Ωk). For each interval Ωk, we write µ(Ωk) = 1 n n X i=1 I(xi ∈Ωk), (4) the proportion of observations falling inside Ωk. Note that for equivalent blocks, we can write µ(Ω1) = · · · = µ(ΩK) = c/n = 1/K. Definition 2.4. (Balanced Intervals) A partition {Ωk}K k=1 is balanced if C2 min K ≤µ(Ωk) ≤C2 max K for all k = 1, . . . , K (5) for some universal constants Cmin ≤1 ≤Cmax not depending on K. 4 Ω2 Ω1 G G G G G G G G G G G G G G 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 c 1 −c c 1 −c K=2 (a) K = 2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Ω2 Ω1 Ω3 G G G G G G G G G G G GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG K=3 (b) K = 3 Figure 2: Two sets EK of possible stick lengths that satisfy the minimal cell-size condition |Ωk| ≥C with n = 10, C = 2/n and K = 2, 3. The following variant of the balancing condition uses interval widths rather than cell counts: eC2 min/K ≤|Ωk| ≤eC2 max/K. Again, under Assumption 1, these two definitions are equivalent. In the sequel, we will denote by ΩBI K the set of all balanced partitions consisting of K intervals and by ΩBI = ∪∞ K=1ΩBI K the set of all balanced intervals of sizes K = 1, 2, . . . . It is worth pointing out that the balance assumption on the interval partitions can be relaxed, at the expense of a log factor in the concentration rate [29]. With balanced partitions, the Kth shell FK of the approximating space F in (2) consists of all step functions that are supported on partitions ΩBI K and have K−1 points of discontinuity uk ∈In ≡{xi : i = 1, . . . , n −1} for k = 1, . . . K −1. For equispaced blocks in Definition 2.3, we assumed that the points of subdivision were deterministic, i.e. uk = k/K. For balanced partitions, we assume that uk are random and chosen amongst the observed values xi. The order statistics of the vector of splits u = (u1, . . . , uK−1)′ uniquely define a segmentation of [0, 1] into K intervals Ωk = (u(k−1), u(k)], where u(k) designates the kth smallest value in u and u(0) ≡0, u(K) = x(n) ≡1. Our prior over balanced intervals πΩ(· | K) will be defined implicitly through a uniform prior over the split vectors u. Namely, the prior over balanced partitions ΩBI K satisfies πΩ({Ωk}K k=1 | K) = 1 card(ΩBI K ) I {Ωk}K k=1 ∈ΩBI K . (6) In the following Lemma, we obtain upper bounds on card(ΩBI K ) and discuss how they relate to an old problem in geometric probability. In the sequel, we denote with |Ωk| the lengths of the segments defined through the split points u. Lemma 2.1. Assume that u = (u1, . . . , uK−1)′ is a vector of independent random variables obtained by uniform sampling (without replacement) from In. Then under Assumption 1, we have for 1/n < C < 1/K Π min 1≤k≤K |Ωk| ≥C = ⌊n(1−K C)⌋+K−1 K−1 n−1 K−1 (7) and Π max 1≤k≤K |Ωk| ≤C = 1 − en X k=1 (−1)k n −1 k ⌊n(1−k C)⌋+K−1 K−1 n−1 K−1 , (8) where en = min{n −1, ⌊1/C⌋}. Proof. The denominator of (7) follows from the fact that there are n −1 possible splits for the K −1 points of discontinuity uk. The numerator is obtained after adapting the proof of Lemma 5 2 of Flatto and Konheim [31]. Without lost of generality, we will assume that C = a/n for some a = 1, . . . , ⌊n/K⌋so that n(1 −KC) is an integer. Because the jumps uk can only occur on the grid In, we have |Ωk| = j/n for some j = 1, . . . , n −1. It follows from Lemma 1 of Flatto and Konheim [31] that the set EK = {|Ωk| : PK k=1 |Ωk| = 1 and |Ωk| ≥C for k = 1, . . . , K} lies in the interior of a convex hull of K points vr = (1 −KC)er + C PK k=1 ek for r = 1, . . . , K, where er = (er1, . . . , erK)′ are unit base vectors, i.e. erj = I(r = j). Two examples of the set EK (for K = 2 and K = 3) are depicted in Figure 2. In both figures, n = 10 (i.e. 9 candidate split points) and a = 2. With K = 2 (Figure 2(a)), there are only 7 = n(1−KC)+K−1 K−1 pairs of interval lengths (|Ω1|, |Ω2|)′ that satisfy the minimal cell condition. These points lie on a grid between the two vertices v1 = (1 −C, C) and v2 = (C, 1 −C). With K = 3, the convex hull of points v1 = (1 −2C, C, C)′, v2 = (C, 1 −2C, C)′ and v1 = (C, C, 1 −2C)′ corresponds to a diagonal dissection of a cube of a side length (1 −3C) (Figure 2(b), again with a = 2 and n = 10). The number of lattice points in the interior (and on the boundary) of such tetrahedron corresponds to an arithmetic sum 1 2(n −3a + 2)(n −3a + 1) = n−3a+2 2 . So far, we showed (7) for K = 2 and K = 3. To complete the induction argument, suppose that the formula holds for some arbitrary K > 0. Then the size of the lattice inside (and on the boundary) of a (K + 1)-tetrahedron of a side length [1 −(K + 1)C] can be obtained by summing lattice sizes inside K-tetrahedrons of increasing side lengths 0, √ 2/n, 2 √ 2/n, . . . , [1 −(K + 1)C] √ 2/n, i.e. n[1−(K+1)C]+K−1 X j=K−1 j K −1 = n[1 −(K + 1)C] + K K , where we used the fact PN j=K j K = N+1 K+1 . The second statement (8) is obtained by writing the event as a complement of the union of events and applying the method of inclusion-exclusion. Remark 2.1. Flatto and Konheim [31] showed that the probability of covering a circle with random arcs of length C is equal to the probability that all segments of the unit interval, obtained with iid random uniform splits, are smaller than C. Similarly, the probability (8) could be related to the probability of covering the circle with random arcs whose endpoints are chosen from a grid of n −1 equidistant points on the circumference. There are n−1 K−1 partitions of size K, of which ⌊n(1−e C2 min)⌋+K−1 K−1 satisfy the minimal cell width balancing condition (where eC2 min > K/n). This number gives an upper bound on the combinatorial complexity of balanced partitions card(ΩBI K ). 2.3 Prior π(β | K) on Step Heights β To complete the prior on FK, we take independent normal priors on each of the coefficients. Namely π(β | K) = K Y k=1 φ(βk), (9) where φ(·) is the standard normal density. 3 Main Results A crucial ingredient of our proof will be understanding how well one can approximate f0 with other step functions (supported on partitions Ω, which are either equivalent blocks ΩEB or balanced partitions ΩBI). We will describe the approximation error in terms of the overlap between the true partition {Ω0 k}K0 k=1 and the approximating partitions {Ωk}K k=1 ∈Ω. More formally, we define the restricted cell count (according to Nobel [32]) as m V ; {Ω0 k}K0 k=1 = |Ω0 k : Ω0 k ∩V ̸= ∅|, the number of cells in {Ω0 k}K0 k=1 that overlap with an interval V ⊂[0, 1]. Next, we define the complexity of f0 as the smallest size of a partition in Ωneeded to completely cover f0 without any overlap. 6 Definition 3.1. (Complexity of f0 w.r.t. Ω) We define K(f0, Ω) as the smallest K such that there exists a K-partition {Ωk}K k=1 in the class of partitions Ωfor which m Ωk; {Ω0 k}K0 k=1 = 1 for all k = 1, . . . , K. The number K(f0, Ω) will be referred to as the complexity of f0 w.r.t. Ω. The complexity number K(f0, Ω) indicates the optimal number of steps needed to approximate f0 with a step function (supported on partitions in Ω) without any error. It depends on the true number of jumps K0 as well as the true interval lengths |Ω0 k|. If the minimal partition {Ω0 k}K0 k=1 resided in the approximating class, i.e. {Ω0 k}K0 k=1 ∈Ω, then we would obtain K(f0, Ω) = K0, the true number of steps. On the other hand, when {Ω0 k}K0 k=1 /∈Ω, the complexity number K(f0, Ω) can be much larger. This is illustrated in Figure 1 (right), where the true partition {Ω0 k}K0 k=1 consists of K0 = 4 unequal pieces and we approximate it with equispaced blocks with K = 2, 5, 10 steps. Because the intervals Ω0 k are not equal and the smallest one has a length 1/10, we need K(f0, ΩEB) = 10 equispaced blocks to perfectly approximate f0. For our analysis, we do not need to assume that {Ω0 k}K0 k=1 ∈Ω (i.e. f0 does not need to be inside the approximating class) or that K(f0, Ω) is finite. The complexity number can increase with n, where sharper performance is obtained when f0 can be approximated error-free with some f ∈Ω, where f has a small number of discontinuities relative to n. Another way to view K(f0, Ω) is as the ideal partition size on which the posterior should concentrate. If this number were known, we could achieve a near-minimax posterior concentration rate n−1/2p K(f0, Ω) log[n/K(f0, Ω)] (Remark 3.3). The actual minimax rate for estimating a piece-wise constant f0 (consisting of K0 > 2 pieces) is n−1/2p K0 log(n/K0) [33]. In our main results, we will target the nearly optimal rate expressed in terms of K(f0, Ω). 3.1 Posterior Concentration for Equivalent Blocks Our first result shows that the minimax rate is nearly achieved, without any assumptions on the number of pieces of f0 or the sizes of the pieces. Theorem 3.1. (Equivalent Blocks) Let f0 : [0, 1] →R be a step function with K0 steps, where K0 is unknown. Denote by F the set of all step functions supported on equivalent blocks, equipped with priors πK(·) and π(β | K) as in (3) and (9). Denote with Kf0 ≡K(f0, ΩEB) and assume ∥β0∥2 ∞≲log n and Kf0 ≲√n. Then, under Assumption 1, we have Π f ∈F : ∥f −f0∥n ≥Mnn−1/2q Kf0 log (n/Kf0) | Y (n) →0 (10) in P n f0-probability, for every Mn →∞as n →∞. Before we proceed with the proof, a few remarks ought to be made. First, it is worthwhile to emphasize that the statement in Theorem 3.1 is a frequentist one as it relates to an aggregated behavior of the posterior distributions obtained under the true generative model P n f0. Second, the theorem shows that the Bayesian procedure performs an automatic adaptation to K(f0, ΩEB). The posterior will concentrate on EB partitions that are fine enough to approximate f0 well. Thus, we are able to recover the true function as well as if we knew K(f0, ΩEB). Third, it is worth mentioning that, under Assumption 1, Theorem 3.1 holds for equivalent as well as equisized blocks. In this vein, it describes the speed of posterior concentration for dyadic regression trees. Indeed, as mentioned previously, with K = 2s for some s ∈N\{0}, the equisized partition corresponds to a full binary tree with splits at dyadic rationals. Another interesting insight is that the Gaussian prior (9), while selected for mathematical convenience, turns out to be sufficient for optimal recovery. In other words, despite the relatively large amount of mass near zero, the Gaussian prior does not rule out optimal posterior concentration. Our standard normal prior is a simpler version of the Bayesian CART prior, which determines the variance from the data [9]. Let Kf0 ≡K(f0, ΩEB) be as in Definition 3.1. Theorem 3.1 is proved by verifying the three conditions of Theorem 4 of [18], for εn = n−1/2p Kf0 log(n/Kf0) and Fn = Skn K=0 FK, with 7 kn of the order Kf0log(n/Kf0). The approximating subspace Fn ⊂F should be rich enough to approximate f0 well and it should receive most of the prior mass. The conditions for posterior contraction at the rate εn are: (C1) sup ε>εn log N ε 36, {f ∈Fn : ∥f −f0∥n < ε}, ∥.∥n ≤nε2 n, (C2) Π(F\Fn) Π(f ∈F : ∥f −f0∥2n ≤ε2n) = o(e−2nε2 n), (C3) Π(f ∈Fn : jεn < ∥f −f0∥n ≤2jεn) Π(f ∈F : ∥f −f0∥2n ≤ε2n) ≤e j2 4 nε2 n for all sufficiently large j. The entropy condition (C1) restricts attention to EB partitions with small K. As will be seen from the proof, the largest allowed partitions have at most (a constant multiple of) Kf0 log (n/Kf0) pieces.. Condition (C2) requires that the prior does not promote partitions with more than Kf0 log (n/Kf0) pieces. This property is guaranteed by the exponentially decaying prior πK(·), which penalizes large partitions. The final condition, (C3), requires that the prior charges a ∥.∥n neighborhood of the true function. In our proof, we verify this condition by showing that the prior mass on step functions of the optimal size Kf0 is sufficiently large. Proof. We verify the three conditions (C1), (C2) and (C3). (C1) Let ε > εn and K ∈N. For fα, fβ ∈FK, we have K−1∥α −β∥2 2 = ∥fα −fβ∥2 n because µ(Ωk) = 1/K for each k. We now argue as in the proof of Theorem 12 of [18] to show that N ε 36, {f ∈FK : ∥f −f0∥n < ε}, ∥.∥n can be covered by the number of √ Kε/36-balls required to cover a √ Kε-ball in RK. This number is bounded above by 108K. Summing over K, we recognize a geometric series. Taking the logarithm of the result, we find that (C1) is satisfied if log(108)(kn + 1) ≤nε2 n. (C2) We bound the denominator by: Π(f ∈F : ∥f −f0∥2 n ≤ε2) ≥πK(Kf0)Π β ∈RK(f0) : ∥β −βext 0 ∥2 2 ≤ε2Kf0 , where βext 0 ∈RKf0 is an extended version of β0 ∈RK0, containing the coefficients for f0 expressed as a step function on the partition {Ω0 k} Kf0 k=1. This can be bounded from below by πK(Kf0) e∥βext 0 ∥2 2/2 Π β ∈RK(f0) : ∥β∥2 2 ≤ε2Kf0/2 > πK(Kf0) e∥βext 0 ∥2 2/2 Z ε2Kf0/2 0 xKf0/2−1e−x/2 2Kf0/2Γ(Kf0/2)dx. We bound this from below by bounding the exponential at the upper integration limit, yielding: πK(Kf0) e∥βext 0 ∥2 2/2 e−ε2Kf0/4 2Kf0 Γ(Kf0/2 + 1)εKf0 K Kf0/2 f0 . (11) For ε = εn →0, we thus find that the denominator in (C2) can be lower bounded with eKf0 log εn−cK Kf0 log Kf0−∥βext 0 ∥2 2/2−Kf0/2[log 2+ε2 n/2]. We bound the numerator: Π(F\Fn) = Π ∞ [ k=kn+1 Fk ! ∝ ∞ X k=kn+1 e−cKk log k ≤e−cK(kn+1) log(kn+1) + Z ∞ kn+1 e−cKx log x, which is of order e−cK(kn+1) log(kn+1). Combining this bound with (11), we find that (C2) is met if: e−Kf0 log εn+(cK+1) Kf0 log Kf0+Kf0∥β0∥2 ∞−cK(kn+1) log(kn+1)+2nε2 n →0 as n →∞. (C3) We bound the numerator by one, and use the bound (11) for the denominator. As εn →0, we obtain the condition −Kf0 log εn + (cK + 1)Kf0 log Kf0 + Kf0∥β0∥2 ∞≤j2 4 nε2 n for all sufficiently large j. 8 Conclusion With εn = n−1/2p Kf0 log(n/Kf0), letting kn ∝nε2 n = Kf0 log(n/Kf0), the condition (C1) is met. With this choice of kn, the condition (C2) holds as well as long as ∥β0∥2 ∞≲ log n and Kf0 ≲√n. Finally, the condition (C3) is met for Kf0 ≲√n. Remark 3.1. It is worth pointing out that the proof will hold for a larger class of priors on K, as long as the prior shrinks at least exponentially fast (meaning that it is bounded from above by ae−bK for constants a, b > 0). However, a prior at this exponential limit will require tuning, because the optimal a and b will depend on K(f0, ΩEB). We recommend using the prior (2.1) that prunes somewhat more aggressively, because it does not require tuning by the user. Indeed, Theorem 3.1 holds regardless of the choice of cK > 0. We conjecture, however, that values cK ≥1/K(f0, ΩEB) lead to a faster concentration speed and we suggest cK = 1 as a default option. Remark 3.2. When Kf0 is known, there is no need for assigning a prior πK(·) and the conditions (C1) and (C3) are verified similarly as before, fixing the number of steps at Kf0. 3.2 Posterior Concentration for Balanced Intervals An analogue of Theorem 3.1 can be obtained for balanced partitions from Section 2.2.2 that correspond to regression trees with splits at actual observations. Now, we assume that f0 is ΩBI-valid and carry out the proof with K(f0, ΩBI) instead of K(f0, ΩEB). The posterior concentration rate is only slightly worse. Theorem 3.2. (Balanced Intervals) Let f0 : [0, 1] →R be a step function with K0 steps, where K0 is unknown. Denote by F the set of all step functions supported on balanced intervals equipped with priors πK(·), πΩ(·|K) and π(β | K) as in (3), (6) and (9). Denote with Kf0 ≡K(f0, ΩBI) and assume ∥β0∥2 ∞≲log2β n and K(f0, ΩBI) ≲√n. Then, under Assumption 1, we have Π f ∈F : ∥f −f0∥n ≥Mnn−1/2 q Kf0 log2β(n/Kf0) | Y (n) →0 (12) in P n f0-probability, for every Mn →∞as n →∞, where β > 1/2. Proof. All three conditions (C1), (C2) and (C3) hold if we choose kn ∝Kf0[log(n/Kf0)]2β−1. The entropy condition will be satisfied when log Pkn k=1 Ckcard(ΩBI k ) ≲n ε2 n for some C > 0, where εn = n−1/2 q Kf0 log2β(n/Kf0). Using the upper bound card(ΩBI k ) < n−1 k−1 < n−1 kn−1 (because kn < n−1 2 for large enough n), the condition (C1) is verified. Using the fact that card(ΩKf0 ) ≲ Kf0 log(n/Kf0), the condition (C2) will be satisfied when, for some D > 0, we have e−Kf0 log εn+(cK+1) Kf0 log Kf0+D Kf0 log(n/Kf0)+Kf0∥β0∥2 ∞−cK(kn+1) log(kn+1)+2nε2 n →0. (13) This holds for our choice of kn under the assumption ∥β0∥2 ∞≲log2β n and Kf0 ≲√n. These choices also yield (C3). Remark 3.3. When Kf0 ≳√n, Theorem 3.1 and Theorem 3.2 still hold, only with the bit slower slower concentration rate n−1/2p Kf0 log n. 4 Discussion We provided the first posterior concentration rate results for Bayesian non-parametric regression with step functions. We showed that under suitable complexity priors, the Bayesian procedure adapts to the unknown aspects of the target step function. Our approach can be extended in three ways: (a) to smooth f0 functions, (b) to dimension reduction with high-dimensional predictors, (c) to more general partitioning schemes that correspond to methods like Bayesian CART and BART. These three extensions are developed in our followup manuscript [29]. 5 Acknowledgment This work was supported by the James S. Kemper Foundation Faculty Research Fund at the University of Chicago Booth School of Business. 9 References [1] L. Breiman, J. H. Friedman, R. A. Olshen, and C. J. Stone. Classification and Regression Trees. Statistics/Probability Series. Wadsworth Publishing Company, Belmont, California, U.S.A., 1984. [2] L. Breiman. Random forests. Mach. Learn., 45:5–32, 2001. [3] A. Berchuck, E. S. Iversen, J. M. Lancaster, J. Pittman, J. Luo, P. Lee, S. Murphy, H. K. Dressman, P. G. Febbo, M. West, J. R. Nevins, and J. R. Marks. Patterns of gene expression that characterize long-term survival in advanced stage serous ovarian cancers. Clin. Cancer Res., 11(10):3686–3696, 2005. [4] S. Abu-Nimeh, D. Nappa, X. Wang, and S. Nair. A comparison of machine learning techniques for phishing detection. In Proceedings of the Anti-phishing Working Groups 2nd Annual eCrime Researchers Summit, eCrime ’07, pages 60–69, New York, NY, USA, 2007. ACM. [5] M. A. Razi and K. Athappilly. A comparative predictive analysis of neural networks (NNs), nonlinear regression and classification and regression tree (CART) models. Expert Syst. Appl., 29(1):65 – 74, 2005. [6] D. P. Green and J. L. Kern. Modeling heterogeneous treatment effects in survey experiments with Bayesian Additive Regression Trees. Public Opin. Q., 76(3):491, 2012. [7] E. C. Polly and M. J. van der Laan. Super learner in prediction. Available at: http://works.bepress.com/mark_van_der_laan/200/, 2010. [8] D. M. Roy and Y. W. Teh. The Mondrian process. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 1377–1384. Curran Associates, Inc., 2009. [9] H. A. Chipman, E. I. George, and R. E. McCulloch. Bayesian CART model search. JASA, 93(443):935–948, 1998. [10] D. Denison, B. Mallick, and A. Smith. A Bayesian CART algorithm. Biometrika, 95(2):363–377, 1998. [11] H. A. Chipman, E. I. George, and R. E. McCulloch. BART: Bayesian Additive Regression Trees. Ann. Appl. Stat., 4(1):266–298, 03 2010. [12] S. Ghosal, J. K. Ghosh, and A. W. van der Vaart. Convergence rates of posterior distributions. Ann. Statist., 28(2):500–531, 04 2000. [13] T. Zhang. Learning bounds for a generalized family of Bayesian posterior distributions. In S. Thrun, L. K. Saul, and P. B. Schölkopf, editors, Advances in Neural Information Processing Systems 16, pages 1149–1156. MIT Press, 2004. [14] J. Tang, Z. Meng, X. Nguyen, Q. Mei, and M. Zhang. Understanding the limiting factors of topic modeling via posterior contraction analysis. In T. Jebara and E. P. Xing, editors, Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 190–198. JMLR Workshop and Conference Proceedings, 2014. [15] N. Korda, E. Kaufmann, and R. Munos. Thompson sampling for 1-dimensional exponential family bandits. In C. J. C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 1448–1456. Curran Associates, Inc., 2013. [16] F.-X. Briol, C. Oates, M. Girolami, and M. A. Osborne. Frank-Wolfe Bayesian quadrature: Probabilistic integration with theoretical guarantees. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 1162–1170. Curran Associates, Inc., 2015. [17] M. Chen, C. Gao, and H. Zhao. Posterior contraction rates of the phylogenetic indian buffet processes. Bayesian Anal., 11(2):477–497, 06 2016. [18] S. Ghosal and A. van der Vaart. Convergence rates of posterior distributions for noniid observations. Ann. Statist., 35(1):192–223, 02 2007. [19] B. Szabó, A. W. van der Vaart, and J. H. van Zanten. Frequentist coverage of adaptive nonparametric Bayesian credible sets. Ann. Statist., 43(4):1391–1428, 08 2015. [20] I. Castillo and R. Nickl. On the Bernstein von Mises phenomenon for nonparametric Bayes procedures. Ann. Statist., 42(5):1941–1969, 2014. 10 [21] J. Rousseau and B. Szabo. Asymptotic frequentist coverage properties of Bayesian credible sets for sieve priors in general settings. ArXiv e-prints, September 2016. [22] I. Castillo. Polya tree posterior distributions on densities. preprint available at http: // www. lpma-paris. fr/ pageperso/ castillo/ polya. pdf , 2016. [23] L. Liu and W. H. Wong. Multivariate density estimation via adaptive partitioning (ii): posterior concentration. arXiv:1508.04812v1, 2015. [24] C. Scricciolo. On rates of convergence for Bayesian density estimation. Scand. J. Stat., 34(3):626–642, 2007. [25] M. Coram and S. Lalley. Consistency of Bayes estimators of a binary regression function. Ann. Statist., 34(3):1233–1269, 2006. [26] L. Shepp. Covering the circle with random arcs. Israel J. Math., 34(11):328–345, 1972. [27] W. Feller. An Introduction to Probability Theory and Its Applications, Vol. 2, 3rd Edition. Wiley, 3rd edition, January 1968. [28] D. L. Donoho. CART and best-ortho-basis: a connection. Ann. Statist., 25(5):1870–1911, 10 1997. [29] V. Rockova and S. L. van der Pas. Posterior concentration for Bayesian regression trees and their ensembles. arXiv:1708.08734, 2017. [30] T. Anderson. Some nonparametric multivariate procedures based on statistically equivalent blocks. In P.R. Krishnaiah, editor, Multivariate Analysis, pages 5–27. Academic Press, New York, 1966. [31] L. Flatto and A. Konheim. The random division of an interval and the random covering of a circle. SIAM Rev., 4:211–222, 1962. [32] A. Nobel. Histogram regression estimation using data-dependent partitions. Ann. Statist., 24(3):1084–1105, 1996. [33] C. Gao, F. Han, and C.H. Zhang. Minimax risk bounds for piecewise constant models. Manuscript, pages 1–36, 2017. 11 | 2017 | 580 |
7,097 | Efficient and Flexible Inference for Stochastic Systems Stefan Bauer∗ Department of Computer Science ETH Zurich bauers@inf.ethz.ch Nico S. Gorbach∗ Department of Computer Science ETH Zurich ngorbach@inf.ethz.ch Ðor ¯de Miladinovi´c Department of Computer Science ETH Zurich djordjem@inf.ethz.ch Joachim M. Buhmann Department of Computer Science ETH Zurich jbuhmann@inf.ethz.ch Abstract Many real world dynamical systems are described by stochastic differential equations. Thus parameter inference is a challenging and important problem in many disciplines. We provide a grid free and flexible algorithm offering parameter and state inference for stochastic systems and compare our approch based on variational approximations to state of the art methods showing significant advantages both in runtime and accuracy. 1 Introduction A dynamical system is represented by a set of K stochastic differential equations (SDE’s) with model parameters θ that describe the evolution of K states X(t) = [x1(t), x2(t), . . . , xK(t)]T such that: dX(t) = f(X(t), θ)dt + ΣdWt, (1) where Wt is a Wiener process. A sequence of observations, y(t) is usually contaminated by some measurement error which we assume to be normally distributed with zero mean and variance for each of the K states, i.e. E ∼N(0, D), with Dik = σ2 kδik. Thus for N distinct time points the overall system may be summarized as Y = AX + E, where X = [x(t1), . . . , x(tN)] = [x1, . . . , xK]T Y = [y(t1), . . . , y(tN)] = [y1, . . . , yK]T , where xk = [xk(t1), . . . , xk(tN)]T is the k’th state sequence and yk = [yk(t1), . . . , yk(tN)]T are the observations. Given the observations Y and the description of the dynamical system (1), the aim is to estimate both state variables X and parameters θ. Related Work. Classic approaches for solving the inverse problem i.e. estimating the parameters given some noisy observations of the process, include the Kalman Filter or its improvements [e.g. Evensen, 2003, Tornøe et al., 2005] and MCMC based approaches [e.g. Lyons et al., 2012]. However, ∗The first two authors contributed equally to this work. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. MCMC based methods do not scale well since the number of particles required for a given accuracy grows exponentially with the dimensionality of the inference problem [Snyder et al., 2008], which is why approximations to the inference problem became increasingly more popular in recent years. Archambeau et al. [2008] proposed a variational formulation for parameter and state inference of stochastic diffuion processes using a linear dynamic approximation: In an iterated two-step approach the mean and covariance of the approximate process (forward propagation) and in the second step the time evolution of the Lagrange multipliers, which ensure the consistency constraints for mean and variance (backward propagation), are calculated in order to obtain a smooth estimate of the states. Both forward and backward smoothing require the repeated solving of ODEs. In order to obtain a good accuracy a fine time grid is additionally needed, which makes the approach computational expensive and infeasible for larger systems [Vrettas et al., 2015]. For parameter estimation the smoothing algorithm is used in the inner loop of a conjugate gradient algorithm to obtain an estimate of the optimal approximation process (given a fixed set of parameters) while in the outer loop a gradient step is taken to improve the current estimate of the parameters. An extension of Archambeau et al. [2008] using local polynomial approximations and mean-field approximations was proposed in Vrettas et al. [2015]. Mean-field approximations remove the need of Lagrange multipliers and thus of the backward propagation while the polynomial approximations remove the need of solving ODEs iteratively in the forward propagation step which makes the smoothing algorithm and thus the inner loop for parameter estimation feasible, even for large systems while achieving a comparable accuracy [Vrettas et al., 2015]. Our contributions. While established methods often assume full observability of the stochastic system for parameter estimation, we solve the more difficult problem of inferring parameters in systems which include unobserved variables by combining state and parameter estimation in one step. Despite the fact that we compare our approach to other methods which solve a simpler problem, we offer improved accuracy in parameter estimation at a fraction of the computational cost. 2 Random Ordinary Differential Equations Compared to stochastic differential equations, random ordinary differential equations (RODEs) have been less popular even though both frameworks are highly connected. RODEs are pathwise ordinary differential equations that contain a stochastic process in their vector field functions. In Kloeden and Jentzen [2007] RODEs have been studied to derive better numerical integration schemes for SDEs, which e.g. allows for stronger pathwise results compared to the L2 results given in Ito stochastic calculus. Moreover, RODEs sometimes have an advantage over SDEs by allowing more realistic noise for some applications e.g. correlated noise or noise with limited variance. Let (Ω, F, P) be a complete probability space, (ζt)t∈[0,T ] be a Rm-valued stochastic process with continuous sample paths and f : Rm × Rd →Rd a continuous function. Then dx(t) dt = f(x(t), ζt(ω)) (2) is a scalar RODE, that is, an ODE dx(t) dt = Fω(t, x) := f(x(t), ω(t)), (3) for all ω ∈Ω. Following Kloeden and Jentzen [2007], we likewise assume that f is arbitrary smooth i.e. f ∈C∞and thus locally Lipschitz in x such that the initial value problem (3) has a unique solution, which we assume to exist on the finite time interval [0, T]. A simple example for a RODE is Example 1 (RODE). dx(t) dt = −x + sin(Wt(ω)), (4) where Wt is a Wiener process. Taylor-like schemes for directly solving RODEs (2) were derived e.g. in Grüne and Kloeden [2001], Jentzen and Kloeden [2009]. One approach for solving the RODE (2) is to use sampling to obtain many ODE’s (3) which can then be solved pathwise using deterministic calculus. However, this pathwise solution of RODEs implies that a massive amount of deterministic ODEs have to be solved efficiently. A study with a high performance focus was conducted in 2 Riesinger et al. [2016], where parallelized pathwise inference for RODEs was implemented using GPU’s. While in principle classic numerical schemes for deterministic systems e.g. Runge-Kutta can be used for each path, they will usually converge with a lower order since the vector field is not smooth enough in time [Asai et al., 2013]. Since the driving stochastic process ζt has at most Hölder continuous sample paths, the sample paths of the solution t →x(t) are continuously differentiable but the derivatives of the solution sample paths are at most Hölder continuous in time. This is caused by the fact that Fω(t, x) of the ODE (3) is usually only continuous, but not differentiable in t, no matter how smooth the function f is in its variables. RODEs offer the opportunity to use deterministic calculus (pathwise), yet being highly connected with an SDE since any RODE with a Wiener process can be written as SDE Jentzen and Kloeden [2011]. To illustrate the point, the example 1 above can be re-written as an SDE by: Example 2 (SDE transformed RODE). d Xt Yt = −Xt + sin(Yt) 0 + 0 1 dWt. (5) It likewise holds that SDEs can be transformed into RODEs. This transformation was first described in Sussmann [1978] and Doss [1977] and generalized to all finite dimensional stochastic differential equations by Imkeller and Schmalfuss [2001]. RODEs can thus be used to find pathwise solutions for SDEs but SDEs can likewise be used to find better solution for RODEs Asai and Kloeden [2013]. Due to space limitations and to circumvent the introduction of a large mathematical framework, we only show the transformation for additive SDE’s following [Jentzen and Kloeden, 2011, chapter 2]. Proposition 1. Any finite dimensional SDE can be transformed into an RODE and the other way round: dxt = f(xt)dt + dWt ⇐⇒dz(t) dt = f(zt + Ot) + Ot, (6) where z(t) := xt −Ot and Ot is the Ornstein-Uhlenbeck stochastic stationary process satisfying the linear SDE dOt = −Otdt + dWt (7) Typically a stationary Ornstein-Uhlenbeck process is used to replace the white noise of the SDE in its transformation to an RODE. By continuity and the Fundamental Theorem of Calculus it then follows that z(t) is pathwise differentiable. While we only showed the transformation for additive SDE’s, it generally holds true that any RODE with a Wiener process can be transformed into an SDE and any finite dimensional SDE with regular coefficients can be transformed into an RODE. This includes nonlinear drifts and diffusions and is true for univariate and multivariate processes [Han and Kloeden, 2017]. There are cases for which this does not hold e.g. a RODE which includes fractional Brownian motion as the driving noise. While the presented method is thus even more general since RODE’s can be solved, we limit ourselves to the problem of solving additive SDE’s by transforming them into a RODE. Since the solution of a RODE is continuously differentiable in time (but not further differentiable in time), classic numerical methods for ODEs rarely do achieve their traditional order and thus efficiency [Kloeden and Jentzen, 2007]. In the following we describe a scalable variational formulation to infer states and parameters of stochastic differential equations by providing an ensemble learning type algorithm for inferring the parameters of the corresponding random ordinary differential equation. 3 Variational Gradient Matching Gradient matching with Gaussian processes was originally motivated in Calderhead et al. [2008] and offers a computationally efficient shortcut for parameter inference in deterministic systems. While the original formulation was based on sampling, Gorbach et al. [2017] proposed a variational formulation offering significant runtime and accuracy improvements. Gradient matching assumes that the covariance kernel Cφk (with hyper-parameters φk) of a Gaussian process prior on state variables is once differentiable to obtain a conditional distribution over state 3 Figure 1: Noise. The left plot shows three typical Wiener processes generated with mean zero and the corresponding Ornstein-Uhlenbeck (OU) process having the same Wiener process in its diffusion (right). The scale on the y-axis shows the mean-reverting behaviour of the OU process (compared to the Wiener process). derivatives using the closure property under differentiation of Gaussian processes: p( ˙X | X, φ) = Y k N( ˙xk | mk, Ak), (8) where the mean and covariance is given by: mk := ′CφkC−1 φkxk, Ak := C′′ φk −′CφkC−1 φkC′ φk, C′′ φk denotes the auto-covariance for each state-derivative with C′ φk and ′Cφk denoting the crosscovariances between the state and its derivative. The posterior distribution over state-variables is p(X | Y, φ, σ) = Y k N (µk(yk), Σk) , (9) where µk(yk) := Cφk(Cφk + σ2 kI)−1yk and Σk := σ2 kCφk(Cφk + σ2 kI)−1. Inserting the GP based prior in the right hand side of a differential equation and assuming additive, normally distributed noise with state-specific error variance γk one obtains a distribution of state derivatives p( ˙X | X, θ, γ) = Y k N ( ˙xk | fk(X, θ), γkI) . (10) which is combined with the smoothed distribution obtained from the data fit (9) in a product of experts approach: p( ˙X | X, θ, φ, γ) ∝p( ˙X | X, φ)p( ˙X | X, θ, γ). After analytically integrating out the latent state-derivatives p(θ | X, φ, γ) ∝p(θ) Y k N fk(X, θ) | mk, Λ−1 k ) . (11) where Λ−1 k := Ak + γkI one aims to determine the maximum a posteriori estimate (MAP) of the parameters θ∗: = arg max θ ln Z p(θ | X, φ, γ)p(X | Y, φ)dX, (12) Since the integral in (12) is in most cases analytically intractable (even for small systems due to the non-linearities and couplings induced by the drift function), a lower bound is established through the 4 introduction of an auxiliary distribution Q: ln Z p(θ | X, φ, γ)p(X | Y, φ)dX (a) = − Z Q(X)dX ln R Q(X)dX R p(θ | X, φ, γ)p(X | Y, φ)dX (b) ≥− Z Q(X) ln Q(X) p(θ | X, φ, γ)p(X | Y, φ)dX = H(Q) + EQ ln p(θ | X, φ, γ) + EQ ln p(X | Y, φ) =: LQ(θ) (13) where H(Q) is the entropy. In (a) the auxiliary distribution Q(X), R Q(X)dX = 1 is introduced and in (b) is using Jensens’s inequality. The lower bound holds with equality whenever Q∗(X) : = p(θ | X, φ, γ)p(X | Y, φ) R p(θ | X, φ, γ)p(X | Y, φ)dX (c) = p(X | Y, θ, φ, γ), where in (c) Bayes rule is used. Unfortunately Q∗is analytically intractable because its normalization given by the integral in the denominator is in most cases analytically intractable due to the strong couplings induced by the nonlinear drift function f in (1). Using mean-field approximations Q := Q : Q(X, θ) = q(θ | λ) Y u q(xu | ψu) , (14) where λ and ψu are the variational parameters. Assuming that the drift in (1) is linear in the parameters θ and that states only appear as monomial factors in arbitrary large products of states the true conditionals p(θ | X, Y, φ) and p(xu | θ, X−u, Y, φ) are Gaussian distributed, where X−u denotes all states excluding state xu (i.e. X−u := {x ∈X | x ̸= xu}) and thus q(θ | λ) and q(xu | ψu) are designed to be Gaussian. This posterior distribution over states is then approximated as p(X|Y, θ, φ, γ, σ) ≈bQ(X) = Q k Q t bqψkt and the log transformed distribution over the ODE parameters given the observations as ln p(θ|Y, φ, γ, σ) ≈L ˆ Q(θ). Algorithm 1 Ensemble based parameter estimation for SDEs 1: Transform the SDE 1 into a RODE 2 2: Simulate a maximum number Nmax of OU-processes and insert them in 2 to obtain Nmax ODEs 3: For each ODE obtain approximate solutions using variational gradient matching [Gorbach et al., 2017] 4: Combine the solutions bθ to obtain an estimate of the parameters for the RODE 2 5: Transform the solutions of the RODE 2 back into solutions of the SDE 1. Gorbach et al. [2017] then use an EM-type approach illustrated in figure 2 iteratively optimizing parameters and the variational lower bound L ˆ Q(θ). The variational parameters can be derived analytically and the algorithm scales linearly in the number states of the differential equation and is thus ideally suited to infer the solutions of the massive number of pathwise ODEs required for the pathwise solution of the RODE formulation of the SDE. Since solution paths of the RODE are only once differentiable, gradient matching (which only makes this assumption w.r.t. solution paths) is ideally suited for estimating the parameters. Our approach is summarized in algorithm 1. However, the application of variational gradient matching [Gorbach et al., 2017] for the pathwise solution of the RODE is not straightforward since e.g. in the case for scalar stochastic differential equations one has to solve dz(t) dt = fθ(zt + Ot) + Ot, (15) for a sampled trajectory Ot of an Ornstein-Uhlenbeck process rather than the classic ODE formulation dz(t) dt = f(zt). We account for the increased uncertainty by assuming an additional state specific Gaussian noise factor δ i.e. assuming f(x + Ot) + Ot + δ for a sampled trajectory Ot in the gradient matching formulation (10). 5 E-‐step M-‐step M-‐step E-‐step max θ log ˙Y k N ˙ Yk | Fk(Y, θ, γkI) N Xk | Yk, σ2I = max θ H(Q) + k EQ log N ˙Yk | Fk(Y, θ, γkI) + DKL Q(ω) k N ˙ Yk | Fk(Y, θ, γkI ˙Yk N ˙ Yk | Fk(Y, θ, γkI We can establish touching lower bounds since we can solve the in 61 θ 62 4 not analytically tractable analytically tractable for a restricted family of ODE's 5 Experiments 74 6 Discussion 75 The contribution of this paper is to integrate out the latent state variables instead o 76 in previous work. Since the integration over state variables is not analytically trac 77 tight variational lower bounds that are analytically tractable provided that the OD 78 state variables appear in quadratic form in equation ??. ODE’s such as the Lotk 79 full-fill such ODE requirements whereas other systems such as the Fitz-High Nag 80 DKL Q(i−1)(X) p(θ, X | Y, φ, γ) 81 LQ(t)(θ) 82 log p(θ, X | Y, φ, γ)dX 83 References 84 B. Calderhead, M. Girolami and N. Lawrence, “Accelerating bayesian infere 85 differential equations with gaussian processes,” Neural Information Processin 86 no. 429-443, 2008. 87 F. Dondelinger, M. Filippone, S. Rogers and D. Husmeier, “Ode parameter infere 88 gradient matching with gaussian processes,” AISTATS, vol. 31, pp. 216–228, 2 89 4 tight variational lower bounds that are analytically tractable provided that the ODE is such that t 78 state variables appear in quadratic form in equation 6. ODE’s such as the Lotka-Volterra syste 79 full-fill such ODE requirements whereas other systems such as the Fitz-High Nagumo sytem do n 80 DKL Q(i−1)(X) p(θ, X | Y, φ, γ) 81 LQ(t)(θ) 82 log p(θ, X | Y, φ, γ)dX 83 ˆθ (i−1) 84 References 85 B. Calderhead, M. Girolami and N. Lawrence, “Accelerating bayesian inference over nonlin 86 differential equations with gaussian processes,” Neural Information Processing Systems, vol. 2 87 no. 429-443, 2008. 88 F. Dondelinger, M. Filippone, S. Rogers and D. Husmeier, “Ode parameter inference using adapti 89 gradient matching with gaussian processes,” AISTATS, vol. 31, pp. 216–228, 2013. 90 4 tight variational lower bounds that are analytically tractable provided that the ODE is such th 78 state variables appear in quadratic form in equation 6. ODE’s such as the Lotka-Volterra s 79 full-fill such ODE requirements whereas other systems such as the Fitz-High Nagumo sytem 80 DKL Q(i−1)(X) p(θ, X | Y, φ, γ) 81 LQ(t)(θ) 82 log p(θ, X | Y, φ, γ)dX 83 ˆθ (i+1) 84 References 85 B. Calderhead, M. Girolami and N. Lawrence, “Accelerating bayesian inference over no 86 differential equations with gaussian processes,” Neural Information Processing Systems, v 87 no. 429-443, 2008. 88 F. Dondelinger, M. Filippone, S. Rogers and D. Husmeier, “Ode parameter inference using ad 89 gradient matching with gaussian processes,” AISTATS, vol. 31, pp. 216–228, 2013. 90 4 tight variational lower bounds that are analytically tractable provided that the ODE is such 78 state variables appear in quadratic form in equation 6. ODE’s such as the Lotka-Volterr 79 full-fill such ODE requirements whereas other systems such as the Fitz-High Nagumo syte 80 DKL Q(i−1)(X) p(θ, X | Y, φ, γ) 81 LQ(t)(θ) 82 log p(θ, X | Y, φ, γ)dX 83 ˆθ (i) 84 References 85 B. Calderhead, M. Girolami and N. Lawrence, “Accelerating bayesian inference over 86 differential equations with gaussian processes,” Neural Information Processing Systems 87 no. 429-443, 2008. 88 F. Dondelinger, M. Filippone, S. Rogers and D. Husmeier, “Ode parameter inference using 89 gradient matching with gaussian processes,” AISTATS, vol. 31, pp. 216–228, 2013. 90 4 tight variational lower bounds that are analytically tractable provided that the 78 state variables appear in quadratic form in equation 6. ODE’s such as the L 79 full-fill such ODE requirements whereas other systems such as the Fitz-High N 80 DKL Q(i−1)(X) p(θ, X | Y, φ, γ) 81 LQ(i)(θ) 82 log p(θ, X | Y, φ, γ)dX 83 ˆθ (i) 84 References 85 B. Calderhead, M. Girolami and N. Lawrence, “Accelerating bayesian inf 86 differential equations with gaussian processes,” Neural Information Proces 87 no. 429-443, 2008. 88 F. Dondelinger, M. Filippone, S. Rogers and D. Husmeier, “Ode parameter inf 89 gradient matching with gaussian processes,” AISTATS, vol. 31, pp. 216–228 90 4 tight variational lower bounds that are analytically tractable provided that the O 78 state variables appear in quadratic form in equation 6. ODE’s such as the Lot 79 full-fill such ODE requirements whereas other systems such as the Fitz-High Na 80 DKL Q(i−1)(X) p(θ, X | Y, φ, γ) 81 LQ(i−1)(θ) 82 log p(θ, X | Y, φ, γ)dX 83 ˆθ (i) 84 References 85 B. Calderhead, M. Girolami and N. Lawrence, “Accelerating bayesian infer 86 differential equations with gaussian processes,” Neural Information Processin 87 no. 429-443, 2008. 88 F. Dondelinger, M. Filippone, S. Rogers and D. Husmeier, “Ode parameter infer 89 gradient matching with gaussian processes,” AISTATS, vol. 31, pp. 216–228, 2 90 4 tight variational lower bounds that are analytically tractable provided that 78 state variables appear in quadratic form in equation 6. ODE’s such as th 79 full-fill such ODE requirements whereas other systems such as the Fitz-Hi 80 DKL Q(i−1)(X) p(θ, X | Y, φ, γ) 81 LQ(i+1)(θ) 82 log p(θ, X | Y, φ, γ)dX 83 ˆθ (i) 84 References 85 B. Calderhead, M. Girolami and N. Lawrence, “Accelerating bayesian 86 differential equations with gaussian processes,” Neural Information Pro 87 no. 429-443, 2008. 88 F. Dondelinger, M. Filippone, S. Rogers and D. Husmeier, “Ode parameter 89 gradient matching with gaussian processes,” AISTATS, vol. 31, pp. 216– 90 4 (ODE parameters) latent state variables state observations GP kernel parameters state-derivative noise Figure 2: Illustration of the "hill climbing" algorithm in Gorbach et al. [2017] . The difference between the lower bound L b Q(·)(θ) and the log integral is given by the Kullback-Leibler divergence (red line). Flexibility and Efficiency Algorithm 1 offers a flexible framework for inference in stochastic dynamical systems e.g. if the parameters bθ are known they can be set to the true values in each iteration, and algorithm 1 then just corresponds to a smoothing algorithm. Compared to the smoothing algorithm in Archambeau et al. [2008] it does not require the computational expensive forward and backward propagation using an ODE solver. If the parameters are not known then algorithm 1 offers a grid free inference procedure for estimating the parameters. Opposite to Vrettas et al. [2011] which consider unobserved state variables in the case of smoothing but assume the system to be fully observed if parameters are estimated, the outlined approach offers an efficient inference framework for the much more complicated problem of inferring the parameters while not all states are observed and still scales linearly in the states if pathwise inference of the RODE is done in parallel. The conceptual difference between the approach of Vrettas et al. [2015] and Gorbach et al. [2017] is illustrated in figure 3. Figure 3: Conceptual Difference. The red line represents an artificial function which has to be approximated. Our approach (right) is grid free and based on the minimization of the differences of the slopes. That is why convergence is vertical with each iteration step corresponding to a dashed line (thickness of the line indicating the convergence direction). Vrettas et al. [2015] approximate the true process by a linearized dynamic process which is discretized (left) and improved by iterated forward and backward smoothing. 4 Experiments We compare our approach on two established benchmark models for stochastic systems especially used for weather forecasts. Vrettas et al. [2011] provide an extensive comparison of the approach of Archambeau et al. [2008] and its improvements compared to classic Kalman filtering as well as more advanced and state of the art inference schemes like 4D-Var [Le Dimet and Talagrand, 1986]. We use the reported results there as a comparison measure. The drift function for the Lorenz96 system consists of equations of the form: fk(x(t), θ) = (xk+1 −xk−2)xk−1 −xk + θ where θ is a scalar forcing parameter, x−1 = xK−1, x0 = xK and xK+1 = x1 (with K being the number of states in the stochastic system (1)). The Lorenz96 system can be seen as a minimalistic weather model [Lorenz and Emanuel, 1998]. 6 The three dimensional Lorenz attractor is described by the parameter vector θ = (σ, ρ, β) and the following time evolution: dX(t) = " σ(x2(t) −x1(t)) ρx1(t) −x2(t) −x1(t)x3(t) x1(t)x2(t) −βx3(t) # dt + Σ 1 2 dWt The runtime for state estimation using the approach of Vrettas et al. [2011] and our method is indicated in table 1. While parameter and state estimation are combined in one step in our approach, parameter estimation using the approach of Vrettas et al. [2011] would imply the iterative use of the smoothing algorithm and thus a multiple factor of the runtime indicated in table 1. While we solve a much more difficult problem by inferring parameters and states at the same time our runtime is only a fraction of the runtime awarded for a single run of the inner loop for parameter estimation in Vrettas et al. [2011]. Method L63/D=3 L96/D=40 L96/D=1000 VGPA_MF 31s 6503s 17345s Our approach 2.4s 14s 383s Table 1: Runtime for one run of the smoothing algorithm of the approach of Vrettas et al. [2015] vs the runtime of our approach in parallel implementation (using 51 OU sample paths). While parameter estimation is done simultaneously in our approach, Vrettas et al. [2015] use the smoothing algorithm iteratively for state estimation in an inner loop such that the runtime for parameter estimations is multiple times higher than the indicated runtime for just one run of the smoothing algorithm. We use our method to infer the states and drift parameters for the Lorenz attractor where the dimension y is unobserved. The estimated state trajectories are shown in figure 4. Estimated Trajectory z y x Simulated Trajectory z y x Figure 4: Lorenz attractor. The Lorenz attractor trajectories are shown on the right -hand side for inferred solutions using an SDE solver, while the left-hand side plot shows the inferred trajectory using our method. Our method was able to accurately resolve the typical “butterfly” pattern despite not observing the drift parameters as well as not observing the dimension y. Only the dimensions x and z were observed. The estimated trajectories for one sample path are also shown in the time domain in section 5.2 of the supplementary material. Our approach offers an appealing shortcut to the inference problem for stochastic dynamical systems and is robust to the noise in the diffusion term. Figure 5 shows the dependence of the inferred parameters on the variance in the diffusion term of the stochastic differential equation. Increasing the time interval of the observed process e.g. from 10 to 60 secs leads to a converging behaviour to the true parameters (figure 6). This is in contrast to the reported results of Archambeau et al. [2008], reported in Vrettas et al. [2011, Figure 29] and shows the asymptotic time consistency of our approach. Figure 5 shows, that in the near noiseless scenario we approximately identify sigma correctly. Estimating the σ term in Figure 6 is more difficult than the other two parameters in the drift 7 30 18 6 1 diffusion 5 6 7 8 9 10 11 est 30 18 6 1 diffusion 25 26 27 28 29 30 est 30 18 6 1 diffusion 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 est Figure 5: Lorenz attractor. Boxplots indicate the median of the inferred parameters over 51 generated OU sample paths. Using a low variance for the diffusion term in simulating one random sample path from the SDE, our approach infers approximately the correct parameters and does not completely deteriorate if the variance is increased by a factor of 30. 10 20 30 40 50 60 final time 6 7 8 9 10 11 est 10 20 30 40 50 60 final time 25.5 26 26.5 27 27.5 28 28.5 est 10 20 30 40 50 60 final time 2.1 2.2 2.3 2.4 2.5 2.6 2.7 est Figure 6: Lorenz attractor. Increasing the time interval of the observed process leads to a convergence towards the true parameters opposed to the results in [Vrettas et al., 2011, Figure 29]. function of the Lorenz attractor system, since the variance of the diffusion and the observation noise unfortunately lead to an identifiability problem for the parameter sigma, which is why longer time periods in Figure 6 do not improve the estimation accuracy for σ. 1 5 10 20 diffusion 6 7 8 9 10 est fully obs. 2/3 observed 1/2 observed 1/3 observed 0 1 2 3 4 5 6 7 8 9 est Figure 7: Lorenz96. Left hand side shows the accuracy of the parameter estimation with increasing diffusion variance (right to left) for a 40 dimensional system, while the plot on the right hand side shows the accuracy with decreasing number of observations. Red dots show the results of the approach of Archambeau et al. [2008] when available as reported in Vrettas et al. [2011]. The correct parameter has the value 8 and our approach performs significantly better, while having a lower runtime and is furthermore able to include unobserved variables (right) For the Lorenz96 system our parameter estimation approach is likewise robust to the variance in the diffusion term (figure 7). It furthermore outperforms the approach of Archambeau et al. [2008] in the cases where results were reported in Vrettas et al. [2011]. The performance level is equal when, for our approach, we assume that only one third of the variables are unobserved. 8 The estimated trajectories for one sample path of the Lorenz96 system are shown in section 5.3 of the supplementary material. 5 Discussion Parameter inference in stochastic systems is a challenging but important problem in many disciplines. Current approaches are based on exploration in the parameter space which is computationally expensive and infeasible for larger systems. Using a gradient matching formulation and adapting it to the inference of random ordinary differential equations, our proposal is a flexible framework which allows to use deterministic calculus for inference in stochastic systems. While our approach tackles a much more difficult problem by combining state and parameter estimation in one step, it offers improved accuracy and is orders of magnitude faster compared to current state of the art methods based on variational inference. Acknowledgements This research was partially supported by the Max Planck ETH Center for Learning Systems and the SystemsX.ch project SignalX. 9 References Cédric Archambeau, Manfred Opper, Yuan Shen, Dan Cornford, and John S Shawe-taylor. Variational inference for diffusion processes. Neural Information Processing Systems (NIPS), 2008. Yusuke Asai and Peter E Kloeden. Numerical schemes for random odes via stochastic differential equations. Commun. Appl. Anal, 17(3):521–528, 2013. Yusuke Asai, Eva Herrmann, and Peter E Kloeden. Stable integration of stiff random ordinary differential equations. Stochastic Analysis and Applications, 31(2):293–313, 2013. Ben Calderhead, Mark Girolami and Neil D. Lawrence. Accelerating bayesian inference over nonliner differential equations with gaussian processes. Neural Information Processing Systems (NIPS), 2008. Halim Doss. Liens entre équations différentielles stochastiques et ordinaires. In Annales de l’IHP Probabilités et statistiques, volume 13, pages 99–125, 1977. Geir Evensen. The ensemble kalman filter: Theoretical formulation and practical implementation. Ocean dynamics, 53(4):343–367, 2003. Nico S Gorbach, Stefan Bauer, and Joachim M Buhmann. Scalable variational inference for dynamical systems. arXiv preprint arXiv:1895944, 2017. Lars Grüne and PE Kloeden. Pathwise approximation of random ordinary differential equations. BIT Numerical Mathematics, 41(4):711–721, 2001. Xiaoying Han and Peter E Kloeden. Random ordinary differential equations and their numerical solution, 2017. Peter Imkeller and Björn Schmalfuss. The conjugacy of stochastic and random differential equations and the existence of global attractors. Journal of Dynamics and Differential Equations, 13(2): 215–249, 2001. Arnulf Jentzen and Peter E Kloeden. Pathwise taylor schemes for random ordinary differential equations. BIT Numerical Mathematics, 49(1):113–140, 2009. Arnulf Jentzen and Peter E Kloeden. Taylor approximations for stochastic partial differential equations. SIAM, 2011. Peter E Kloeden and Arnulf Jentzen. Pathwise convergent higher order numerical schemes for random ordinary differential equations. In Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, volume 463, pages 2929–2944. The Royal Society, 2007. François-Xavier Le Dimet and Olivier Talagrand. Variational algorithms for analysis and assimilation of meteorological observations: theoretical aspects. Tellus A: Dynamic Meteorology and Oceanography, 38(2):97–110, 1986. Edward N Lorenz and Kerry A Emanuel. Optimal sites for supplementary weather observations: Simulation with a small model. Journal of the Atmospheric Sciences, 55(3):399–414, 1998. Simon Lyons, Amos J Storkey, and Simo Särkkä. The coloured noise expansion and parameter estimation of diffusion processes. Neural Information Processing Systems (NIPS), 2012. Christoph Riesinger, Tobias Neckel, and Florian Rupp. Solving random ordinary differential equations on gpu clusters using multiple levels of parallelism. SIAM Journal on Scientific Computing, 38(4): C372–C402, 2016. Chris Snyder, Thomas Bengtsson, Peter Bickel, and Jeff Anderson. Obstacles to high-dimensional particle filtering. Monthly Weather Review, 136(12):4629–4640, 2008. Héctor J Sussmann. On the gap between deterministic and stochastic ordinary differential equations. The Annals of Probability, pages 19–41, 1978. 10 Christoffer W Tornøe, Rune V Overgaard, Henrik Agersø, Henrik A Nielsen, Henrik Madsen, and E Niclas Jonsson. Stochastic differential equations in nonmem R⃝: implementation, application, and comparison with ordinary differential equations. Pharmaceutical research, 22(8):1247–1258, 2005. Michail D Vrettas, Dan Cornford, and Manfred Opper. Estimating parameters in stochastic systems: A variational bayesian approach. Physica D: Nonlinear Phenomena, 240(23):1877–1900, 2011. Michail D Vrettas, Manfred Opper, and Dan Cornford. Variational mean-field algorithm for efficient inference in large systems of stochastic differential equations. Physical Review E, 91(1):012148, 2015. 11 | 2017 | 581 |
7,098 | Learning ReLUs via Gradient Descent Mahdi Soltanolkotabi Ming Hsieh Department of Electrical Engineering University of Southern California Los Angeles, CA soltanol@usc.edu Abstract In this paper we study the problem of learning Rectified Linear Units (ReLUs) which are functions of the form x ↦max(0,⟨w,x⟩) with w ∈Rd denoting the weight vector. We study this problem in the high-dimensional regime where the number of observations are fewer than the dimension of the weight vector. We assume that the weight vector belongs to some closed set (convex or nonconvex) which captures known side-information about its structure. We focus on the realizable model where the inputs are chosen i.i.d. from a Gaussian distribution and the labels are generated according to a planted weight vector. We show that projected gradient descent, when initialized at 0, converges at a linear rate to the planted model with a number of samples that is optimal up to numerical constants. Our results on the dynamics of convergence of these very shallow neural nets may provide some insights towards understanding the dynamics of deeper architectures. 1 Introduction Nonlinear data-fitting problems are fundamental to many supervised learning tasks in signal processing and machine learning. Given training data consisting of n pairs of input features xi ∈Rd and desired outputs yi ∈R we wish to infer a function that best explains the training data. In this paper we focus on fitting Rectified Linear Units (ReLUs) to the data which are functions φw ∶Rd →R of the form φw(x) = max(0,⟨w,x⟩). A natural approach to fitting ReLUs to data is via minimizing the least-squares misfit aggregated over the data. This optimization problem takes the form min w∈Rd L(w) ∶= 1 n n ∑ i=1 (max(0,⟨w,xi⟩) −yi)2 subject to R(w) ≤R, (1.1) with R ∶Rd →R denoting a regularization function that encodes prior information on the weight vector. Fitting nonlinear models such as ReLUs have a rich history in statistics and learning theory [12] with interesting new developments emerging [6] (we shall discuss all these results in greater detail in Section 5). Most recently, nonlinear data fitting problems in the form of neural networks (a.k.a. deep learning) have emerged as powerful tools for automatically extracting interpretable and actionable information from raw forms of data, leading to striking breakthroughs in a multitude of applications [13, 15, 4]. In these and many other empirical domains it is common to use local search heuristics such as gradient or stochastic gradient descent for nonlinear data fitting. These local search heuristics are surprisingly effective on real or randomly generated data. However, despite their empirical success the reasons for their effectiveness remains mysterious. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Focusing on fitting ReLUs, a-priori it is completely unclear why local search heuristics such as gradient descent should converge for problems of the form (1.1), as not only the regularization function maybe nonconvex but also the loss function! Efficient fitting of ReLUs in this highdimensional setting poses new challenges: When are the iterates able to escape local optima and saddle points and converge to global optima? How many samples do we need? How does the number of samples depend on the a-priori prior knowledge available about the weights? What regularizer is best suited to utilizing a particular form of prior knowledge? How many passes (or iterations) of the algorithm is required to get to an accurate solution? At the heart of answering these questions is the ability to predict convergence behavior/rate of (non)convex constrained optimization algorithms. In this paper we build up on a new framework developed in the context of phase retrieval [21] for analyzing nonconvex optimization problems to address such challenges. 2 Precise measures for statistical resources We wish to characterize the rates of convergence for the projected gradient updates (3.2) as a function of the number of samples, the available prior knowledge and the choice of the regularizer. To make these connections precise and quantitative we need a few definitions. Naturally the required number of samples for reliable data fitting depends on how well the regularization function R can capture the properties of the weight vector w. For example, if we know that the weight vector is approximately sparse, naturally using an ℓ1 norm for the regularizer is superior to using an ℓ2 regularizer. To quantify this capability we first need a couple of standard definitions which we adapt from [17, 18, 21]. Definition 2.1 (Descent set and cone) The set of descent of a function R at a point w∗is defined as DR(w∗) = {h ∶R(w∗+ h) ≤R(w∗)}. The cone of descent is defined as a closed cone CR(w∗) that contains the descent set, i.e. DR(w∗) ⊂ CR(w∗). The tangent cone is the conic hull of the descent set. That is, the smallest closed cone CR(w∗) obeying DR(w∗) ⊂CR(w∗). We note that the capability of the regularizer R in capturing the properties of the unknown weight vector w∗depends on the size of the descent cone CR(w∗). The smaller this cone is the more suited the function R is at capturing the properties of w∗. To quantify the size of this set we shall use the notion of mean width. Definition 2.2 (Gaussian width) The Gaussian width of a set C ∈Rd is defined as: ω(C) ∶= Eg[sup z∈C ⟨g,z⟩], where the expectation is taken over g ∼N(0,Ip). Throughout we use Bd/Sd−1 to denote the the unit ball/sphere of Rd. We now have all the definitions in place to quantify the capability of the function R in capturing the properties of the unknown parameter w∗. This naturally leads us to the definition of the minimum required number of samples. Definition 2.3 (minimal number of samples) Let CR(w∗) be a cone of descent of R at w∗. We define the minimal sample function as M(R,w∗) = ω2(CR(w∗) ∩Bd). We shall often use the short hand n0 = M(R,w∗) with the dependence on R,w∗implied. We note that n0 is exactly the minimum number of samples required for structured signal recovery from linear measurements when using convex regularizers [3, 1]. Specifically, the optimization problem n ∑ i=1 (yr −⟨xi,w∗⟩)2 subject to R(w) ≤R(w∗), (2.1) 2 succeeds at recovering an unknown weight vector w∗with high probability from n observations of the form yi = ⟨ai,w∗⟩if and only if n ≥n0.1 While this result is only known to be true for convex regularization functions we believe that n0 also characterizes the minimal number of samples even for nonconvex regularizers in (2.1). See [17] for some results in the nonconvex case as well as the role this quantity plays in the computational complexity of projected gradient schemes for linear inverse problems. Given that with nonlinear samples we have less information (we loose some information compared to linear observations) we can not hope to recover the weight vector from n ≤n0 when using (1.1). Therefore, we can use n0 as a lower-bound on the minimum number of observations required for projected gradient descent iterations (3.2) to succeed at finding the right model. 3 Theoretical results for learning ReLUs A simple heuristic for optimizing (1.1) is to use gradient descent. One challenging aspect of the above loss function is that it is not differentiable and it is not clear how to run projected gradient descent. However, this does not pose a fundamental challenge as the loss function is differentiable except for isolated points and we can use the notion of generalized gradients to define the gradient at a non-differentiable point as one of the limit points of the gradient in a local neighborhood of the non-differentiable point. For the loss in (1.1) the generalized gradient takes the form ∇L(w) ∶= 1 n n ∑ i=1 (ReLU(⟨w,xi⟩) −yi)(1 + sgn(⟨w,xi⟩))xi. (3.1) Therefore, projected gradient descent takes the form wτ+1 = PK (wτ −µτ∇L(wτ)), (3.2) where µτ is the step size and K = {w ∈Rd ∶R(w) ≤R} is the constraint set with PK denoting the Euclidean projection onto this set. Theorem 3.1 Let w∗∈Rd be an arbitrary weight vector and R ∶Rd →R be a proper function (convex or nonconvex). Suppose the feature vectors xi ∈Rd are i.i.d. Gaussian random vectors distributed as N(0,I) with the corresponding labels given by yi = max(0,⟨xi,w∗⟩). To estimate w∗, we start from the initial point w0 = 0 and apply the Projected Gradient Descent (PGD) updates of the form wτ+1 = PK (wτ −µτ∇L(wτ)), (3.3) with K ∶= {w ∈Rd ∶R(w) ≤R(w∗)} and ∇L defined via (3.1). Also set the learning parameter sequence to µ0 = 2 and µτ = 1 for all τ = 1,2,... and let n0 = M(R,w∗), per Definition 2.3, be our lower bound on the number of observations. Also assume n > cn0, (3.4) holds for a fixed numerical constant c. Then there is an event of probability at least 1 −9e−γn such that on this event the updates (3.3) obey ∥wτ −w∗∥ℓ2 ≤(1 2) τ ∥w∗∥ℓ2 . (3.5) Here γ is a fixed numerical constant. The first interesting and perhaps surprising aspect of this result is its generality: it applies not only to convex regularization functions but also nonconvex ones! As we mentioned earlier the optimization problem in (1.1) is not known to be tractable even for convex regularizers. Despite the nonconvexity of both the objective and regularizer, the theorem above shows that with a near minimal number 1We would like to note that n0 only approximately characterizes the minimum number of samples required. A more precise characterization is φ−1(ω2(CR(w∗) ∩Bd)) ≈ω2(CR(w∗) ∩Bd) where φ(t) = √ 2 Γ( t+1 2 ) Γ( t 2 ) ≈ √ t. However, since our results have unspecified constants we avoid this more accurate characterization. 3 0 5 10 15 20 0 0.2 0.4 0.6 0.8 1 Estimation error ReLU samples Linear samples Figure 1: Estimation error (∥wτ −w∗∥ℓ2) obtained via running PGD iterates as a function of the number of iterations τ. The plots are for two different observations models: 1) ReLU observations of the form y =ReLU(Xw∗) and 2) linear observations of the form y = Xw∗. The bold colors depict average behavior over 100 trials. None bold color depict the estimation error of some sample trials. of data samples, projected gradient descent provably learns the original weight vector w∗without getting trapped in any local optima. Another interesting aspect of the above result is that the convergence rate is linear. Therefore, to achieve a relative error of ϵ the total number of iterations is on the order of O(log(1/ϵ)). Thus the overall computational complexity is on the order of O (ndlog(1/ϵ)) (in general the cost is the total number of iterations multiplied by the cost of applying the feature matrix X and its transpose). As a result, the computational complexity is also now optimal in terms of dependence on the matrix dimensions. Indeed, for a dense matrix even verifying that a good solution has been achieved requires one matrix-vector multiplication which takes O(nd) time. 4 Numerical experiments In this section we carry out a simple numerical experiment to corroborate our theoretical results. For this purpose we generate a unit norm sparse vector w∗∈Rd of dimension d = 1000 containing s = d/50 non-zero entries. We also generate a random feature matrix X ∈Rn×d with n = ⌊8slog(d/s)⌋ and containing i.i.d. N(0,1) entries. We now take two sets of observations of size n from θ∗: • ReLU observations: the response vector is equal to y =ReLU(Xw∗). • Linear observations: the response is y = Xw∗. We apply the projected gradient iterations to both observation models starting from w0 = 0. For the ReLU observations we use the step size discussed in Theorem 3.1. For the linear model we apply projected gradient descent updates of the form wτ+1 = PK (wτ −1 nXT (Xwτ −y)). In both cases we use the regularizer R(w) = ∥w∥ℓ0 so that the projection only keeps the top s entries of the vector (a.k.a. iterative hard thresholding). In Figure 1 the resulting estimation errors (∥wτ −w∗∥ℓ2) is depicted as a function of the number of iterations τ. The bold colors depict average behavior over 100 trials. The estimation error of some sample trials are also depicted in none bold 4 colors. This plot clearly show that PGD iterates applied to ReLU observations converge quickly to the ground truth. This figure also clearly demonstrates that the behavior of the PGD iterates applied to both models are similar, further corroborating the results of Theorem 3.1. We note that the sample complexity used in this simulation is 8slog(n/s) which is a constant factor away from n0 ∝slog(n/s) confirming our assertion that the required sample complexity is a constant factor away from n0 (as predicted by Theorem 3.1). 5 Discussions and prior art There is a large body of work on learning nonlinear models. A particular class of such problems that have been studied are the so called idealized Single Index Models (SIMs) [9, 10]. In these problems the inputs are labeled examples {(xi,yi)}n i=1 ∈Rd × R which are guaranteed to satisfy yi = f(⟨w,xi⟩) for some w ∈Rd and nondecreasing (Lipchitz continuous) f ∶R →R. The goal in this problem is to find a (nearly) accurate such f and w. An interesting polynomial-time algorithm called the Isotron exists for this problem [12, 11]. In principle, this approach can also be used to fit ReLUs. However, these results differ from ours in term of both assumptions and results. On the one had, the assumptions are slightly more restrictive as they require bounded features xi, outputs yi and weights. On the other hand, these result hold for much more general distributions and more general models than the realizable model studied in this paper. These results also do not apply in the high dimensional regime where the number of observations is significantly smaller than the number of parameters (see [5] for some results in this direction). In the realizable case, the Isotron result require O( 1 ϵ ) iterations to achieve ϵ error in objective value. In comparison, our results guarantee convergence to a solution with relative error ϵ (∥wτ −w∗∥ℓ2 /∥w∗∥ℓ2 ≤ϵ) after log (1/ϵ) iterations. Focusing on the specific case of ReLU functions, an interesting recent result [6] shows that reliable learning of ReLUs is possible under very general but bounded distributional assumptions. To achieve an accuracy of ϵ the algorithm runs in poly(1/ϵ) time. In comparison, as mentioned earlier our result rquires log(1/ϵ) iterations for reliable parameter estimation. We note however we study the problem in different settings and a direct comparison is not possible between the two results. We would like to note that there is an interesting growing literature on learning shallow neural networks with a single hidden layer with i.i.d. inputs, and under a realizable model (i.e. the labels are generated from a network with planted weights) [23, 2, 25]. For isotropic Gaussian inputs, [23] shows that with two hidden unites (k = 2) there are no critical points for configurations where both weight vectors fall into (or outside) the cone of ground truth weights. With the same assumptions, [2] proves that for a single-hidden ReLU network with a single non-overlapping convolutional filter, all local minimizers of the population loss are global; they also give counter-examples in the overlapping case and prove the problem is NP-hard when inputs are not Gaussian. [25] studies general single-hidden layer networks and shows that a version of gradient descent which uses a fresh batch of samples in each iteration converges to the planted model. This holds using an initialization obtained via a tensor decomposition method. Our approach and convergence results differ from this literature in a variety of different ways. First, we focus on zero hidden layers with a regularization term. Some of this literature focuses on one-hidden layers without (or with specific) regularization. Second, unlike some of these results such as [2, 14], we study the optimization properties of the empirical function, not its expected value. Third, we initialize at zero in lieu of sophisticated initialization schemes. Finally, our framework does not require a fresh batch of samples per new gradient iteration as in [25]. We also note that several publications study the effect of over-parametrization on the training of neural networks without any regularization [19, 8, 16, 22]. Therefore, the global optima are not unique and hence the solutions may not generalize. In comparison we study the problem with an arbitrary regularization which allows for a unique global optima. 6 Proofs 6.1 Preliminaries In this section we gather some useful results on concentration of stochastic processes which will be crucial in our proofs. These results are mostly adapted from [21]. We begin with a lemma which is a direct consequence of Gordon’s escape from the mesh lemma [7]. 5 Lemma 6.1 Assume C ⊂Rd is a cone and Sd−1 is the unit sphere of Rd. Also assume that n ≥max(20ω2(C ∩Sd−1) δ2 , 1 2δ −1), for a fixed numerical constant c. Then for all h ∈C ∣1 n n ∑ i=1 (⟨xi,h⟩)2 −∥h∥2 ℓ2∣≤δ ∥h∥2 ℓ2 , holds with probability at least 1 −2e−δ2 360 n. We also need a generalization of the above lemma stated below. Lemma 6.2 ([21]) Assume C ⊂Rd is a cone (not necessarily convex) and Sd−1 is the unit sphere of Rd. Also assume that n ≥max(80ω2(C ∩Sd−1) δ2 , 2 δ −1), for a fixed numerical constant c. Then for all u,h ∈C ∣1 n n ∑ i=1 ⟨xi,u⟩⟨xi,h⟩−u∗h∣≤δ ∥u∥ℓ2 ∥h∥ℓ2 , holds with probability at least 1 −6e− δ2 1440 n. We next state a generalization of Gordon’s escape through the mesh lemma also from [21]. Lemma 6.3 ([21]) Let s ∈Rd be fixed vector with nonzero entries and construct the diagonal matrix S = diag(s). Also, let X ∈Rn×d have i.i.d. N(0,1) entries. Furthermore, assume T ⊂Rd and define bd(s) = E[∥Sg∥ℓ2], where g ∈Rd is distributed as N(0,In). Also, define σ(T ) ∶= max v∈T ∥v∥ℓ2 . Then for all u ∈T ∣∥SAu∥ℓ2 −bd(s)∥u∥ℓ2∣≤∥s∥ℓ∞ω(T ) + η, holds with probability at least 1 −6e − η2 8∥s∥2 ℓ∞ σ2(T ) . The previous lemma leads to the following Corollary. Corollary 6.4 Let s ∈Rd be fixed vector with nonzero entries and assume T ⊂Bd. Furthermore, assume ∥s∥2 ℓ2 ≥max(20∥s∥2 ℓ∞ ω2(T ) δ2 , 3 2δ −1). Then for all u ∈T , RRRRRRRRRRR ∑n i=1 s2 i (⟨xi,u⟩)2 ∥s∥2 ℓ2 −∥u∥2 ℓ2 RRRRRRRRRRR ≤δ, holds with probability at least 1 −6e− δ2 1440 ∥s∥2 ℓ2 . 6.2 Convergence proof (Proof of Theorem 3.1) In this section we shall prove Theorem 3.1. Throughout, we use the shorthand C to denote the descent cone of R at w∗, i.e. C = CR(w∗). We begin by analyzing the first iteration. Using w0 = 0 we have w1 ∶= PK (w0 −µ0∇L(w0)) = PK ( 2 n n ∑ i=1 yixi) = PK ( 2 n n ∑ i=1 ReLU(⟨xi,w∗⟩)xi). 6 We use the argument of [21][Page 25, inequality (7.34)] which shows that ∥w1 −w∗∥ℓ2 ≤2 ⋅ sup u∈C∩Bd uT ( 2 n n ∑ i=1 ReLU(⟨xi,w∗⟩)xi −w∗). (6.1) Using ReLU(z) = z+∣z∣ 2 we have 2 n n ∑ i=1 ReLU(⟨xi,w∗⟩)⟨xi,u⟩−⟨u,w∗⟩= uT ( 1 nXT X −I)w∗+ 1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,u⟩. (6.2) We proceed by bounding the first term in the above equality. To this aim we decompose u in the direction parallel/perpendicular to that of w∗and arrive at uT ( 1 nXT X −I)w∗=(uT w∗) ∥w∗∥2 ℓ2 (w∗)T ( 1 nXT X −I)w∗+ 1 n⟨X ⎛ ⎝I −w∗(w∗)T ∥w∗∥2 ℓ2 ⎞ ⎠u,Xw∗⟩, ∼(uT w∗)⎛ ⎝ ∥g∥2 ℓ2 n −1⎞ ⎠+ ∥w∗∥ℓ2 √n aT ⎛ ⎝I −w∗(w∗)T ∥w∗∥2 ℓ2 ⎞ ⎠u, ≤∥w∗∥ℓ2 RRRRRRRRRRR ∥g∥2 ℓ2 n −1 RRRRRRRRRRR + ∥w∗∥ℓ2 √n sup u∈C∩Bd aT ⎛ ⎝I −w∗(w∗)T ∥w∗∥2 ℓ2 ⎞ ⎠u, (6.3) with g ∈Rn and a ∈Rd are independent random Gaussian random vectors distributed as N(0,Id) and N(0,In). By concentration of Chi-squared random variables ∣∥g∥2 ℓ2 /n −1∣≤∆, (6.4) holds with probability at least 1 −2e−n ∆2 8 . Also, 1 √naT ⎛ ⎝I −w∗(w∗)T ∥w∗∥2 ℓ2 ⎞ ⎠u ≤ 1 √n (ω (C ∩Bd) + η), (6.5) holds with probability at least 1 −e−η2 2 . Plugging (6.4) with ∆= δ 6 and (6.5) with η = δ 6 √n into (6.3), as long as n ≥36 δ2 ω2 (C ∩Bd), then sup u∈C∩Bd uT ( 1 nXT X −I)w∗≤δ 2 ∥w∗∥ℓ2 , (6.6) holds with probability at least 1 −3e−n δ2 288 . We now focus on bounding the second term in (6.2). To this aim we decompose u in the direction parallel/perpendicular to that of w∗and arrive at ∣1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,u⟩∣= RRRRRRRRRRR (uT w∗) 1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,w∗⟩ ∥w∗∥2 ℓ2 + 1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,u⊥⟩ RRRRRRRRRRR , ≤∥w∗∥ℓ2 RRRRRRRRRRR 1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,w∗⟩ ∥w∗∥2 ℓ2 RRRRRRRRRRR + ∣1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,u⊥⟩∣. (6.7) with u⊥= (I −w∗(w∗)T ∥w∗∥2 ℓ2 )u. Now note that ∣⟨xi,w∗⟩∣⟨xi,w∗⟩ ∥w∗∥2 ℓ2 is sub-exponential and ∥∣⟨xi,w∗⟩∣⟨xi,w∗⟩ ∥w∗∥2 ℓ2 ∥ ψ1 ≤c, with fixed numerical constant. Thus by Bernstein’s type inequality ([24][Proposition 5.16]) RRRRRRRRRRR 1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,w∗⟩ ∥w∗∥2 ℓ2 RRRRRRRRRRR ≤t, (6.8) 7 holds with probability at least 1 −2e−γn min(t2,t) with γ a fixed numerical constant.. Also note that 1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,u⊥⟩∼ ¿ Á Á À 1 n n ∑ i=1 ∣⟨xi,w∗⟩∣2 1 √n⟨g,u⊥⟩. Furthermore, 1 n ∑n i=1 ∣⟨xi,w∗⟩∣2 ≤(1 + ∆)∥w∗∥2 ℓ2, holds with probability at least 1 −2e−n ∆2 8 and sup u∈C∩Sd−1 ∣⟨g,u⊥⟩∣≤(2ω (C ∩Sd−1) + η), holds with probability at least 1 −e−η2 2 . Combining the last two inequalities we conclude that ∣1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,u⊥⟩∣≤ √ 1 + ∆(2ω (C ∩Sd−1) + η) √n ∥w∗∥ℓ2 , (6.9) holds with probability at least 1 −2e−n ∆2 8 −e−η2 2 . Plugging (6.8) and (6.9) with t = δ 6, ∆= 1, and η = δ 6 √ 2 √n into (6.7) ∣1 n n ∑ i=1 ∣⟨xi,w∗⟩∣⟨xi,u⟩∣≤δ 2 ∥w∗∥ℓ2 , (6.10) holds with probability at least 1 −3e−γnδ2 −2e−n 8 as long as n ≥288 ω2(C∩Sd−1) δ2 . Thus pluggin (6.6) and (6.10) into (6.1) we conclude that for δ = 7/400 ∥w1 −w∗∥ℓ2 ≤2 ⋅ sup u∈C∩Bd uT ( 2 n n ∑ i=1 ReLU(⟨xi,w∗⟩)xi −w∗) ≤2δ ∥w∗∥ℓ2 ≤ 7 200 ∥w∗∥ℓ2 , holds with probability at least 1 −8e−γn as long as n ≥cω2 (C ∩Sd−1) for a fixed numerical constant c. To introduce our general convergence analysis we begin by defining E(ϵ) = {w ∈Rd ∶R(w) ≤R(w∗), ∥w −w∗∥ℓ2 ≤ϵ∥w∗∥ℓ2 } with ϵ = 7 200. To prove Theorem 3.1 we use [21][Page 25, inequality (7.34)] which shows that if we apply the projected gradient descent update wτ+1 = PK (wτ −∇L(wτ)), the error hτ = wτ −w∗obeys ∥hτ+1∥ℓ2 = ∥wτ+1 −w∗∥ℓ2 ≤2 ⋅ sup u∈C∩Bn u∗(hτ −∇L(wτ)). (6.11) To complete the convergence analysis it is then sufficient to prove sup u∈C∩Bn u∗(hτ −∇L(wτ)) ≤1 4 ∥hτ∥ℓ2 = 1 4 ∥wτ −w∗∥ℓ2 . (6.12) We will instead prove that the following stronger result holds for all u ∈C ∩Bn and w ∈E(ϵ) u∗(w −w∗−∇L(w)) ≤1 4 ∥w −w∗∥ℓ2 . (6.13) The equation (6.13) above implies (6.12) which when combined with (6.11) proves the convergence result of the Theorem (specifically equation (3.5)). The rest of this section is dedicated to proving (6.13). To this aim note that ReLU(⟨xi,w⟩) = ⟨xi,w⟩+∣⟨xi,w⟩∣ 2 . Thus (see the extended version of this paper [20] for more detailed derivation of the identity below) ⟨∇L(w),u⟩= 1 n n ∑ i=1 ⟨xi,w −w∗⟩⟨xi,u⟩+ 1 n n ∑ i=1 sgn(⟨xi,w∗⟩)⟨xi,w −w∗⟩⟨xi,u⟩ + 1 n n ∑ i=1 (sgn(⟨xi,w⟩) −sgn(⟨xi,w∗⟩))⟨xi,w −w∗⟩⟨xi,u⟩ + 1 2n n ∑ i=1 (1 −sgn(⟨xi,w∗⟩))(sgn(⟨xi,w∗⟩) −sgn(⟨xi,w⟩))∣⟨xi,w∗⟩∣⟨xi,u⟩ 8 Now defining h = w −w∗we conclude that ⟨u,w −w∗−∇L(w)⟩= ⟨u,h −∇L(w)⟩is equal to ⟨u,h −∇L(w)⟩=uT (I −1 nXXT )h −1 n n ∑ i=1 sgn(⟨xi,w∗⟩)⟨xi,h⟩⟨xi,u⟩, + ⟨h,w∗⟩ ∥w∗∥2 ℓ2 1 n n ∑ i=1 (1 −sgn(⟨xi,w⟩)sgn(⟨xi,w∗⟩))sgn(⟨xi,w∗⟩)⟨xi,h⟩⟨xi,u⟩, + sgn(⟨xi,w⟩) 2n n ∑ i=1 (1 −sgn(⟨xi,w∗⟩))(1 −sgn(⟨xi,w⟩)sgn(⟨xi,w∗⟩)) ∣⟨xi,w∗⟩∣⟨xi,u⟩. Now define h⊥= h −(hT w∗)/(∥w∗∥2 ℓ2)w∗. Using this we can rewrite the previous expression in the form (see the proof in the extended version of this paper [20] for more detailed derivation) ⟨u,w −w∗−∇L(w)⟩=uT (I −1 nXXT )h −1 n n ∑ i=1 sgn(⟨xi,w∗⟩)⟨xi,h⟩⟨xi,u⟩, + 1 n n ∑ i=1 (1 −sgn(⟨xi,w⟩)sgn(⟨xi,w∗⟩))sgn(⟨xi,w∗⟩)⟨xi,h⊥⟩⟨xi,u⟩, + 1 n n ∑ i=1 [sgn(⟨xi,w⟩) 2 (1 −sgn(⟨xi,w∗⟩)) + ⟨h,w∗⟩ ∥w∗∥2 ℓ2 ] (1 −sgn(⟨xi,w⟩)sgn(⟨xi,w∗⟩))∣⟨xi,w∗⟩∣⟨xi,u⟩ (6.14) We now proceed by stating bounds on each of the four terms in (6.14). The detailed derivation of these bounds appear in the the extended version of this paper [20]. Lemma 6.5 Assume the setup of Theorem 3.1. Then as long as n ≥cn0, we have u∗(I −1 nX∗X)h ≤δ ∥h∥ℓ2 , (6.15) −1 n n ∑ i=1 sgn(⟨xi,w∗⟩)⟨xi,h⟩⟨xi,u⟩≤δ ∥h∥ℓ2 , (6.16) 1 n n ∑ i=1 (1 −sgn(⟨xi,w⟩)sgn(⟨xi,w∗⟩))sgn(⟨xi,w∗⟩)⟨xi,h⊥⟩⟨xi,u⟩≤2 √ 1 + δ ⎛ ⎝δ + √ 21 20ϵ⎞ ⎠∥h∥ℓ2 , (6.17) 1 n n ∑ i=1 [sgn(⟨xi,w⟩) 2 (1 −sgn(⟨xi,w∗⟩)) + ⟨h,w∗⟩ ∥w∗∥2 ℓ2 ] (1 −sgn(⟨xi,w⟩)sgn(⟨xi,w∗⟩))∣⟨xi,w∗⟩∣⟨xi,u⟩≤4 √ 1 + δ (1 −ϵ)2 ⎛ ⎝δ + √ 21 20ϵ⎞ ⎠∥h∥ℓ2 , (6.18) holds for all u ∈C ∩Sd−1 and w ∈E(ϵ) with probability at least 1 −9e−γn. Combining (6.15), (6.16), (6.17), and (6.18) we conclude that ⟨u,w −w∗−∇L(w)⟩≤2⎛ ⎝δ + √ 1 + δ (1 + 2 (1 −ϵ)2 )⎛ ⎝δ + √ 21 20ϵ⎞ ⎠ ⎞ ⎠∥w −w∗∥ℓ2 , holds for all u ∈C ∩Sd−1 and w ∈E(ϵ) with probability at least 1 −16e−γδ2n −(n + 10)e−γn. Using this inequality with δ = 10−4 and ϵ = 7/200 we conclude that ⟨u,w −w∗−∇L(w)⟩≤1 4 ∥w −w∗∥ℓ2, holds for all u ∈C ∩Sd−1 and w ∈E(ϵ) with high probability. Acknowledgements This work was done in part while the author was visiting the Simon’s Institute for the Theory of Computing. M.S. would like to thank Adam Klivans and Matus Telgarsky for discussions related to [6] and the Isotron algorithm. 9 References [1] D. Amelunxen, M. Lotz, M. B. McCoy, and J. A. Tropp. Living on the edge: Phase transitions in convex programs with random data. Information and Inference, 2014. [2] A. Brutzkus and A. Globerson. Globally optimal gradient descent for a convnet with gaussian inputs. International Conference on Machine Learning (ICML), 2017. [3] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12(6):805–849, 2012. [4] R. Collobert and J. Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th international conference on Machine learning, pages 160–167. ACM, 2008. [5] R. Ganti, N. Rao, R. M. Willett, and R. Nowak. Learning single index models in high dimensions. arXiv preprint arXiv:1506.08910, 2015. [6] S. Goel, V. Kanade, A. Klivans, and J. Thaler. Reliably learning the ReLU in polynomial time. arXiv preprint arXiv:1611.10258, 2016. [7] Y. Gordon. On Milman’s inequality and random subspaces which escape through a mesh in Rn. Springer, 1988. [8] B. D. Haeffele and R. Vidal. Global optimality in tensor factorization, deep learning, and beyond. arXiv preprint arXiv:1506.07540, 2015. [9] J. L. Horowitz and W. Hardle. Direct semiparametric estimation of single-index models with discrete covariates. Journal of the American Statistical Association, 91(436):1632–1640, 1996. [10] H. Ichimura. Semiparametric least squares (SLS) and weighted SLS estimation of single-index models. Journal of Econometrics, 58(1-2):71–120, 1993. [11] S. M. Kakade, V. Kanade, O. Shamir, and A. Kalai. Efficient learning of generalized linear and single index models with isotonic regression. In Advances in Neural Information Processing Systems, pages 927–935, 2011. [12] A. T. Kalai and R. Sastry. The isotron algorithm: High-dimensional isotonic regression. In COLT, 2009. [13] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [14] Y. Li and Y. Yuan. Convergence analysis of two-layer neural networks with ReLU activation. arXiv preprint arXiv:1705.09886, 2017. [15] A. Mohamed, G. E. Dahl, and G. Hinton. Acoustic modeling using deep belief networks. IEEE Transactions on Audio, Speech, and Language Processing, 20(1):14–22, 2012. [16] Quynh Nguyen and Matthias Hein. The loss surface of deep and wide neural networks. arXiv preprint arXiv:1704.08045, 2017. [17] S. Oymak, B. Recht, and M. Soltanolkotabi. Sharp time–data tradeoffs for linear inverse problems. arXiv preprint arXiv:1507.04793, 2015. [18] S. Oymak and M. Soltanolkotabi. Fast and reliable parameter estimation from nonlinear observations. arXiv preprint arXiv:1610.07108, 2016. [19] T. Poston, C-N. Lee, Y. Choie, and Y. Kwon. Local minima and back propagation. In Neural Networks, 1991., IJCNN-91-Seattle International Joint Conference on, volume 2, pages 173–176. IEEE, 1991. [20] M. Soltanolkotabi. Learning ReLUs via gradient descent. arXiv preprint arXiv:1705.04591, 2017. 10 [21] M. Soltanolkotabi. Structured signal recovery from quadratic measurements: Breaking sample complexity barriers via nonconvex optimization. arXiv preprint arXiv:1702.06175, 2017. [22] M. Soltanolkotabi, A. Javanmard, and J. D. Lee. Theoretical insights into the optimization landscape of over-parameterized shallow neural networks. 07 2017. [23] Y. Tian. An analytical formula of population gradient for two-layered relu network and its applications in convergence and critical point analysis. International Conference on Machine Learning (ICML), 2017. [24] R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [25] K. Zhong, Z. Song, P. Jain, P. L. Bartlett, and I. S. Dhillon. Recovery guarantees for one-hiddenlayer neural networks. arXiv preprint arXiv:1706.03175, 2017. 11 | 2017 | 582 |
7,099 | Learning Graph Representations with Embedding Propagation Alberto García-Durán NEC Labs Europe Heidelberg, Germany alberto.duran@neclab.eu Mathias Niepert NEC Labs Europe Heidelberg, Germany mathias.niepert@neclab.eu Abstract We propose Embedding Propagation (EP), an unsupervised learning framework for graph-structured data. EP learns vector representations of graphs by passing two types of messages between neighboring nodes. Forward messages consist of label representations such as representations of words and other attributes associated with the nodes. Backward messages consist of gradients that result from aggregating the label representations and applying a reconstruction loss. Node representations are finally computed from the representation of their labels. With significantly fewer parameters and hyperparameters an instance of EP is competitive with and often outperforms state of the art unsupervised and semi-supervised learning methods on a range of benchmark data sets. 1 Introduction Graph-structured data occurs in numerous application domains such as social networks, bioinformatics, natural language processing, and relational knowledge bases. The computational problems commonly addressed in these domains are network classification [40], statistical relational learning [12, 36], link prediction [22, 24], and anomaly detection [8, 1], to name but a few. In addition, graph-based methods for unsupervised and semi-supervised learning are often applied to data sets with few labeled examples. For instance, spectral decompositions [25] and locally linear embeddings (LLE) [38] are always computed for a data set’s affinity graph, that is, a graph that is first constructed using domain knowledge or some measure of similarity between data points. Novel approaches to unsupervised representation learning for graph-structured data, therefore, are important contributions and are directly applicable to a wide range of problems. EP learns vector representations (embeddings) of graphs by passing messages between neighboring nodes. This is reminiscent of power iteration algorithms which are used for such problems as computing the PageRank for the web graph [33], running label propagation algorithms [47], performing isomorphism testing [16], and spectral clustering [25]. Whenever a computational process can be mapped to message exchanges between nodes, it is implementable in graph processing frameworks such as Pregel [29], GraphLab [23], and GraphX [44]. Graph labels represent vertex attributes such as bag of words, movie genres, categorical features, and continuous features. They are not to be confused with class labels of a supervised classification problem. In the EP learning framework, each vertex v sends and receives two types of messages. Label representations are sent from v’s neighboring nodes to v and are combined so as to reconstruct the representations of v’s labels. The gradients resulting from the application of some reconstruction loss are sent back as messages to the neighboring vertices so as to update their labels’ representations and the representations of v’s labels. This process is repeated for a certain number of iterations or until a convergence threshold is reached. Finally, the label representations of v are used to compute a representation of v itself. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Despite its conceptual simplicity, we show that EP generalizes several existing machine learning methods for graph-structured data. Since EP learns embeddings by incorporating different label types (representing, for instance, text and images) it is a framework for learning with multi-modal data [31]. 2 Previous Work There are numerous methods for embedding learning such as multidimensional scaling (MDS) [20], Laplacian Eigenmap [3], Siamese networks [7], IsoMap [43], and LLE [38]. Most of these approaches construct an affinity graph on the data points first and then embed the graph into a low dimensional space. The corresponding optimization problems often have to be solved in closed form (for instance, due to constraints on the objective that remove degenerate solutions) which is intractable for large graphs. We discuss the relation to LLE [38] in more detail when we analyze our framework. Graph neural networks (GNN) [39] is a general class of recursive neural networks for graphs where each node is associated with one label. Learning is performed with the Almeida-Pineda algorithm [2, 35]. The computation of the node embeddings is performed by backpropagating gradients for a supervised loss after running a recursive propagation model to convergence. In the EP framework gradients are computed and backpropagated immediately for each node. Gated graph sequence neural networks (GG-SNN) [21] modify GNN to use gated recurrent units and modern optimization techniques. Recent work on graph convolutional networks (GCNs) uses a supervised loss to inject class label information into the learned representations [18]. GCNs as well as GNNs and GG-SNNs, can be seen as instances of the Message Passing Neural Network (MPNN) framework, recently introduced in [13]. There are several significant differences between the EP and MPNN framework: (i) all instances of MPNN use a supervised loss but EP is unsupervised and, therefore, classifier agnostic; (ii) EP learns label embeddings for each of the different label types independently and combines them into a joint node representation whereas all existing instances of MPNN do not provide an explicit method for combining heterogeneous feature types. Moreover, EP’s learning principle based on reconstructing each node’s representation from neighboring nodes’ representations is highly suitable for the inductive setting where nodes are missing during training. Most closely related to our work is DEEPWALK [34] which applies a word embedding algorithm to random walks. The idea is that random walks (node sequences) are treated as sentences (word sequences). A SKIPGRAM [30] model is then used to learn node embeddings from the random walks. NODE2VEC [15] is identical to DEEPWALK with the exception that it explores new methods to generate random walks (the input sentences to WORD2VEC), at the cost of introducing more hyperparamenters. LINE [41] optimizes similarities between pairs of node embeddings so as to preserve their first and second-order proximity. The main advantage of EP over these approaches is its ability to incorporate graph attributes such as text and continuous features. PLANETOID [45] combines a learning objective similar to that of DEEPWALK with supervised objectives. It also incorporates bag of words associated with nodes into these supervised objectives. We show experimentally that for graph without attributes, all of the above methods learn embeddings of similar quality and that EP outperforms all other methods significantly on graphs with word labels. We can also show that EP generalizes methods that learn embeddings for multi-relational graphs such as TRANSE [5]. 3 Embedding Propagation {a95} {bio, health, gene} {a237} {learning, rna} {a651} {margin, SVM, loss} {a23} {health, symptom} {a214} {bio, chemical, dna, rna} v Figure 1: A fragment of a citation network. A graph G = (V, E) consists of a set of vertices V and a set of edges E ⊆{(v, w) | v, w ∈V }. The approach works with directed and undirected edges as well as with multiple edge types. N(v) is the set of neighbors of v if G is undirected and the set of in-neighbors if G is directed. The graph G is associated with a set of k label classes L = {L1, ..., Lk} where each Li is a set of labels corresponding to label type i. A label is an identifier of some object and not to be confused with a class label in classification problems. Labels allow us to represent a wide range of objects associated with the vertices such as words, movie genres, and continuous features. To illustrate the concept of label types, Figure 1 2 d1( , ) a95 bio health gene a237 health rna g1 g2 d2( , ) gradients gradients v's current label embeddings v's current label embeddings a95 bio health gene a237 health rna updated embeddings g̃2 g̃1 updated embeddings a23 health symptom v h1(v) h1(v) h2(v) h2(v) embeddings embeddings current embeddings current embeddings v Figure 2: Illustration of the messages passed between a vertex v and its neighbors for the citation network of Figure 1. First, the label embeddings are sent from the neighboring vertices to the vertex v (black node). These embeddings are fed into differentiable functions egi. Here, there is one function for the article identifier label type (yellow shades) and one for the natural language words label type (red shades). The gradients are derived from the distances di between (i) the output of the functions egi applied to the embeddings sent from v’s neighbors and (ii) the output of the functions gi applied to v’s label embeddings. The better the output of the functions egi is able to reconstruct the output of the functions gi, the smaller the value of the distance measure. The gradients are the messages that are propagated back to the neighboring nodes so as to update the corresponding embedding vectors. The figure is best seen in color. depicts a fragment of a citation network. There are two label types. One representing the unique article identifiers and the other representing the identifiers of natural language words occurring in the articles. The functions li : V →2Li map every vertex in the graph to a subset of the labels Li of label type i. We write l(v) = S i li(v) for the set of all labels associated with vertex v. Moreover, we write li(N(v)) = {li(u) | u ∈N(v)} for the multiset of labels of type i associated with the neighbors of vertex v. We begin by describing the general learning framework of EP which proceeds in two steps. • First, EP learns a vector representation for every label by passing messages along the edges of the input graph. We write ℓfor the current vector representation of a label ℓ. For labels of label type i, we apply a learnable embedding function ℓ= fi(ℓ) that maps every label ℓof type i to its embedding ℓ. The embedding functions fi have to be differentiable so as to facilitate parameter updates during learning. For each label type one can chose an appropriate embedding function such as a linear embedding function for text input or a more complex convolutional network for image data. • Second, EP computes a vector representation for each vertex v from the vector representations of v’s labels. We write v for the current vector representation of a vertex v. Let v ∈V , let i ∈{1, ..., k} be a label type, and let di ∈N be the size of the embedding for label type i. Moreover, let hi(v) = gi ({ℓ| ℓ∈li(v)}) and let ehi(v) = egi ({ℓ| ℓ∈li(N(v))}), where gi and egi are differentiable functions that map multisets of di-dimensional vectors to a single di-dimensional vector. We refer to the vector hi(v) as the embedding of label type i for vertex v and to ehi(v) as the reconstruction of the embedding of label type i for vertex v since it is computed from the label embeddings of v’s neighbors. While the gi and egi can be parameterized (typically with a neural network), in many cases they are simple parameter free functions that compute, for instance, the element-wise average or maximum of the input. The first learning procedure is driven by the following objectives for each label type i ∈{1, ..., k} min Li = min X v∈V di ehi(v), hi(v) , (1) where di is some measure of distance between hi(v), the current representation of label type i for vertex v, and its reconstruction ehi(v). Hence, the objective of the approach is to learn the parameters 3 a23 health symptom r label embeddings vertex embedding v Figure 3: For each vertex v, the function r computes a vector representation of the vertex based on the vector representations of v’s labels. of the functions gi and egi (if such parameters exist) and the vector representations of the labels such that the output of egi applied to the type i label embeddings of v’s neighbors is close to the output of gi applied to the type i label embeddings of v. For each vertex v the messages passed to v from its neighbors are the representations of their labels. The messages passed back to v’s neighbors are the gradients which are used to update the label embeddings. The gradients also update v’s label embeddings. Figure 2 illustrates the first part of the unsupervised learning framework for a part of a citation network. A representation is learned both for the article identifiers and the words occurring in the articles. The gradients are computed based on a loss between the reconstruction of the label type embeddings and their current values. Due to the learning principle of EP, nodes that do not have any labels for label type i can be assigned a new dummy label unique to the node and the label type. The representations learned for these dummy labels can then be used as part of the representation of the node itself. Hence, EP is also applicable in situations where data is missing and incomplete. The embedding functions fi can be initialized randomly or with an existing model. For instance, embedding functions for words can be initialized using word embedding algorithms [30] and those for images with pretrained CNNs [19, 11]. Initialized parameters are then refined by the application of EP. We can show empirically, however, that random initializations of the embedding functions fi also lead to effective vertex embeddings. The second step of the learning framework applies a function r to compute the representations of the vertex v from the representations of v’s labels: v = r ({ℓ| ℓ∈l(v)}) . Here, the label embeddings and the parameters of the functions gi and egi (if such parameters exist) remain unchanged. Figure 3 illustrates the second step of EP. We now introduce EP-B, an instance of the EP framework that we have found to be highly effective for several of the typical graph-based learning problems. The instance results from setting gi(H) = egi(H) = 1 |H| P h∈H h for all label types i and all sets of embedding vectors H. In this case we have, for any vertex v and any label type i, hi(v) = 1 |li(v)| X ℓ∈li(v) ℓ, ehi(v) = 1 |li(N(v))| X u∈N(v) X ℓ∈li(u) ℓ. (2) In conjunction with the above functions gi and egi, we can use the margin-based ranking loss1 Li = X v∈V X u∈V \{v} h γ + di ehi(v), hi(v) −di ehi(v), hi(u) i + , (3) where di is the Euclidean distance, [x]+ is the positive part of x, and γ > 0 is a margin hyperparameter. Hence, the objective is to make the distance between ehi(v), the reconstructed embedding of label type i for vertex v, and hi(v), the current embedding of label type i for vertex v, smaller than the distance between ehi(v) and hi(u), the embedding of label type i of a vertex u different from v. We solve the minimization problem with gradient descent algorithms and use one node u for every v in each learning iteration. Despite using only first-order proximity information in the reconstruction of the label embeddings, this learning is effectively propagating embedding information across the graph: an update of a label embedding affects neighboring label embeddings which, in other updates, affects their neighboring label embeddings, and so on; hence the name of this learning framework. 1Directly minimizing Equation (1) could lead to degenerate solutions. 4 Table 1: Number of parameters and hyperparameters for a graph without node attributes. Method #params #hyperparams DEEPWALK [34] 2d|V | 4 NODE2VEC [15] 2d|V | 6 LINE [41] 2d|V | 2 PLANETOID [45] ≫2d|V | ≥6 EP-B d|V | 2 Table 2: Dataset statistics. k is the number of label types. Dataset |V | |E| #classes k BlogCatalog 10,312 333,983 39 1 PPI 3,890 76,584 50 1 POS 4,777 184,812 40 1 Cora 2,708 5,429 7 2 Citeseer 3,327 4,732 6 2 Pubmed 19,717 44,338 3 2 Finally, a simple instance of the function r is a function that concatenates all the embeddings hi(v) for i ∈{1, ..., k} to form one single vector representation v for each node v v = concat [g1({ℓ| ℓ∈l1(v)}), ..., gk({ℓ| ℓ∈lk(v)})] = concat [h1(v), ..., hk(v)] . (4) Figure 3 illustrates the working of this particular function r. We refer to the instance of the learning framework based on the formulas (2),(3), and (4) as EP-B. The resulting vector representation of the vertices can now be used for downstream learning problems such as vertex classification, link prediction, and so on. 4 Formal Analysis We now analyze the computation and model complexities of the EP framework and its connection to existing models. 4.1 Computational and Model Complexity Let G = (V, E) be a graph (either directed or undirected) with k label types L = {L1, ..., Lk}. Moreover, let labmax = maxv∈V,i∈{1,...,k} |li(v)| be the maximum number of labels for any type and any vertex of the input graph, let degmax = maxv∈V |N(v)| be the maximum degree of the input graph, and let τ(n) be the worst-case complexity of computing any of the functions gi and egi on n input vectors of size di. Now, the worst-case complexity of one learning iteration is O (k|V |τ(labmaxdegmax)) . For an input graph without attributes, that is, where the only label type represents node identities, the worst-case complexity of one learning iteration is O(|V |τ(degmax)). If, in addition, the complexity of the single reconstruction function is linear in the number of input vectors, the complexity is O(|V |degmax) and, hence, linear in both the number of nodes and the maximum degree of the input graph. This is the case for most aggregation functions and, in particular, for the functions egi and gi used in EP-B, the particular instance of the learning framework defined by the formulas (2),(3), and (4). Furthermore, the average complexity is linear in the average node degree of the input graph. The worst-case complexity of EP can be limited by not exchanging messages from all neighbors but only a sampled subset of size at most κ. We explore different sampling scenarios in the experimental section. In general, the number of parameters and hyperparameters of the learning framework depends on the parameters of the functions gi and egi, the loss functions, and the number of distinct labels of the input graph. For graphs without attributes, the only parameters of EP-B are the embedding weights and the only hyperparameters are the size of the embedding d and the margin γ. Hence, the number of parameters is d|V | and the number of hyperparameters is 2. Table 1 lists the parameter counts for a set of state of the art methods for learning embeddings for graphs without attributes. 4.2 Comparison to Existing Models EP-B is related to locally linear embeddings (LLE) [38]. In LLE there is a single function eg which computes a linear combination of the vertex embeddings. eg’s weights are learned for each vertex in a separate previous step. Hence, unlike EP-B, eg does not compute the unweighted average of the input embeddings. Moreover, LLE does not learn embeddings for the labels (attribute values) but 5 directly for vertices of the input graph. Finally, LLE is only feasible for graphs where each node has at most a small constant number of neighbors. LLE imposes additional constraints to avoid degenerate solutions to the objective and solves the resulting optimization problem in closed form. This is not feasible for large graphs. In several applications, the nodes of the graphs are associated with a set of words. For instance, in citation networks, the nodes which represent individual articles can be associated with a bag of words. Every label corresponds to one of the words. Figure 1 illustrates a part of such a citation network. In this context, EP-B’s learning of word embeddings is related to the CBOW model [30]. The difference is that for EP-B the context of a word is determined by the neighborhood of the vertices it is associated with and it is the embedding of the word that is reconstructed and not its one-hot encoding. For graphs with several different edge types such as multi-relational graphs, the reconstruction functions egi can be made dependent on the type of the edge. For instance, one could have, for any vertex v and label type i, ehi(v) = 1 |li(N(v))| X u∈N(v) X ℓ∈li(u) ℓ+ r(u,v) , where r(u,v) is the vector representation corresponding to the type of the edge (the relation) from vertex u to vertex v, and hi(v) could be the average embedding of v’s node id labels. In combination with the margin-based ranking loss (3), this is related to embedding models for multi-relational graphs [32] such as TRANSE [5]. 5 Experiments The objectives of the experiments are threefold. First, we compare EP-B to the state of the art on node classification problems. Second, we visualize the learned representations. Third, we investigate the impact of an upper bound on the number of neighbors that are sending messages. We evaluate EP with the following six commonly used benchmark data sets. BlogCatalog [46] is a graph representing the social relationships of the bloggers listed on the BlogCatalog website. The class labels represent user interests. PPI [6] is a subgraph of the protein-protein interactions for Homo Sapiens. The class labels represent biological states. POS [28] is a co-occurrence network of words appearing in the first million bytes of the Wikipedia dump. The class labels represent the Part-of-Speech (POS) tags. Cora, Citeseer and Pubmed [40] are citation networks where nodes represent documents and their corresponding bag-of-words and links represent citations. The class labels represents the main topic of the document. Whereas BlogCatalog, PPI and POS are multi-label classification problems, Cora, Citeseer and Pubmed have exactly one class label per node. Some statistics of these data sets are summarized in Table 2. 5.1 Set-up The input to the node classification problem is a graph (with or without node attributes) where a fraction of the nodes is assigned a class label. The output is an assignment of class labels to the test nodes. Using the node classification data sets, we compare the performance of EP-B to the state of the art approaches DEEPWALK [34], LINE [41], NODE2VEC [15], PLANETOID [45], GCN [18], and also to the baselines WVRN [27] and MAJORITY. WVRN is a weighted relational classifier that estimates the class label of a node with a weigthed mean of its neighbors’ class labels. Since all the input graphs are unweighted, WVRN assigns the class label to a node v that appears most frequently in v’s neighborhood. MAJORITY always chooses the most frequent class labels in the training set. For all data sets and all label types the functions fi are always linear embeddings equivalent to an embedding lookup table. The dimension of the embeddings is always fixed to 128. We used this dimension for all methods which is in line with previous work such as DEEPWALK and NODE2VEC for the data sets under consideration. For EP-B, we chose the margin γ in (3) from the set of values [1, 5, 10, 20] on validation data. For all approaches except LINE, we used the hyperparameter values reported in previous work since these values were tuned to the data sets. As LINE has not been applied to the data sets before, we set its number of samples to 20 million and negative samples to 5. This means that LINE is trained on (at least) an order of magnitude more examples than all other methods. 6 Table 3: Multi-label classification results for BlogCatalog, POS and PPI in the transductive setting. The upper and lower part list micro and macro F1 scores, respectively. BlogCatalog POS PPI Tr [%] 10 50 90 10 50 90 10 50 90 γ = 1 γ = 10 γ = 5 EP-B 35.05 ± 0.41 39.44 ± 0.29 40.41 ± 1.59 46.97 ± 0.36 49.52 ± 0.48 50.05 ± 2.23 17.82 ± 0.77 23.30 ± 0.37 24.74 ± 1.30 DEEPWALK 34.48 ± 0.40 38.11 ± 0.43 38.34 ± 1.82 45.02 ± 1.09 49.10 ± 0.52 49.33 ± 2.39 17.14 ± 0.89 23.52 ± 0.65 25.02 ± 1.38 NODE2VEC 35.54 ± 0.49 39.31 ± 0.25 40.03 ± 1.22 44.66 ± 0.92 48.73 ± 0.59 49.73 ± 2.35 17.00 ± 0.81 23.31 ± 0.62 24.75 ± 2.02 LINE 34.83 ± 0.39 38.99 ± 0.25 38.77 ± 1.08 45.22 ± 0.86 51.64 ± 0.65 52.28 ± 1.87 16.55 ± 1.50 23.01 ± 0.84 25.28 ± 1.68 WVRN 20.50 ± 0.45 30.24 ± 0.96 33.47 ± 1.50 26.07 ± 4.35 29.21 ± 2.21 33.09 ± 2.27 10.99 ± 0.57 18.14 ± 0.60 21.49 ± 1.19 MAJORITY 16.51 ± 0.53 16.88 ± 0.35 16.53 ± 0.74 40.40 ± 0.62 40.47 ± 0.51 40.10 ± 2.57 6.15 ± 0.40 5.94 ± 0.66 5.66 ± 0.92 γ = 1 γ = 10 γ = 5 EP-B 19.08 +- 0.78 25.11 ± 0.43 25.97 ± 1.25 8.85 ± 0.33 10.45 ± 0.69 12.17 ± 1.19 13.80 ± 0.67 18.96 ± 0.43 20.36 ± 1.42 DEEPWALK 18.16 ± 0.44 22.65 ± 0.49 22.86 ± 1.03 8.20 ± 0.27 10.84 ± 0.62 12.23 ± 1.38 13.01 ± 0.90 18.73 ± 0.59 20.01 ± 1.82 NODE2VEC 19.08 ± 0.52 23.97 ± 0.58 24.82 ± 1.00 8.32 ± 0.36 11.07 ± 0.60 12.11 ± 1.93 13,32 ± 0.49 18.57 ± 0.49 19.66 ± 2.34 LINE 18.13 ± 0.33 22.56 ± 0.49 23.00 ± 0.92 8.49 ± 0.41 12.43 ± 0.81 12.40 ± 1.18 12,79 ± 0.48 18.06 ± 0.81 20.59 ± 1.59 WVRN 10.86 ± 0.87 17.46 ± 0.74 20.10 ± 0.98 4.14 ± 0.54 4.42 ± 0.35 4.41 ± 0.53 8.60 ± 0.57 14.65 ± 0.74 17.50 ± 1.42 MAJORITY 2.51 ± 0.09 2.57 ± 0.08 2.53 ± 0.31 3.38 ± 0.13 3.36 ± 0.14 3.36 ± 0.44 1.58 ± 0.25 1.51 ± 0.27 1.44 ± 0.35 Table 4: Multi-label classification results for BlogCatalog, POS and PPI in the inductive setting for Tr = 0.1. The upper and lower part of the table list micro and macro F1 scores, respectively. BlogCatalog POS PPI Removed Nodes [%] 20 40 20 40 20 40 γ = 10 γ = 5 γ = 10 γ = 10 γ = 10 γ = 10 EP-B 29.22 ± 0.95 27.30 ± 1.33 43.23 ± 1.44 42.12 ± 0.78 16.63 ± 0.98 14.87 ± 1.04 DEEPWALK-I 27.84 ± 1.37 27.14 ± 0.99 40.92 ± 1.11 41.02 ± 0.70 15.55 ± 1.06 13.99 ± 1.18 LINE-I 19.15 ± 1.30 19.96 ± 2.44 40.34 ± 1.72 40.08 ± 1.64 14.89 ± 1.16 13.55 ± 0.90 WVRN 19.36 ± 0.59 19.07 ± 1.53 23.35 ± 0.66 27.91 ± 0.53 8.83 ± 0.91 9.41 ± 0.94 MAJORITY 16.84 ± 0.68 16.81 ± 0.55 40.43 ± 0.86 40.59 ± 0.55 6.09 ± 0.40 6.39 ± 0.61 γ = 10 γ = 5 γ = 10 γ = 10 γ = 10 γ = 10 EP-B 12.12 ± 0.75 11.24 ± 0.89 5.47 ± 0.80 5.16 ± 0.49 11.55 ± 0.90 10.38 ± 0.90 DEEPWALK-I 11.96 ± 0.88 10.91 ± 0.95 4.54 ± 0.32 4.46 ± 0.57 10.52 ± 0.56 9.69 ± 1.14 LINE-I 6.64 ± 0.49 6.54 ± 1.87 4.67 ± 0.46 4.24 ± 0.52 9.86 ± 1.07 9.15 ± 0.74 WVRN 9.45 ± 0.65 9.18 ± 0.62 3.74 ± 0.64 3.87 ± 0.44 6.90 ± 1.02 6.81 ± 0.89 MAJORITY 2.50 ± 0.18 2.59 ± 0.19 3.35 ± 0.24 3.27 ± 0.15 1.54 ± 0.31 1.55 ± 0.26 We did not simply copy results from previous work but used the authors’ code to run all experiments again. For DEEPWALK we used the implementation provided by the authors of NODE2VEC (setting p = 1.0 and q = 1.0). We also used the other hyperparameters values for DEEPWALK reported in the NODE2VEC paper to ensure a fair comparison. We did 10 runs for each method in each of the experimental set-ups described in this section, and computed the mean and standard deviation of the corresponding evaluation metrics. We use the same sets of training, validation and test data for each method. All methods were evaluated in the transductive and inductive setting. The transductive setting is the setting where all nodes of the input graph are present during training. In the inductive setting, a certain percentage of the nodes are not part of the graph during unsupervised learning. Instead, these removed nodes are added after the training has concluded. The results computed for the nodes not present during unsupervised training reflect the methods ability to incorporate newly added nodes without retraining the model. For the graphs without attributes (BlogCatalog, PPI and POS) we follow the exact same experimental procedure as in previous work [42, 34, 15]. First, the node embeddings were computed in an unsupervised fashion. Second, we sampled a fraction Tr of nodes uniformly at random and used their embeddings and class labels as training data for a logistic regression classifier. The embeddings and class labels of the remaining nodes were used as test data. EP-B’s margin hyperparameter γ was chosen by 3-fold cross validation for Tr = 0.1 once. The resulting margin γ was used for the same data set and for all other values of Tr. For each method, we use 3-fold cross validation to determine the L2 regularization parameter for the logistic regression classifier from the values [0.01, 0.1, 0.5, 1, 5, 10]. We did this for each value of Tr and the F1 macro and F1 micro scores separately. This proved to be important since the L2 regularization had a considerable impact on the performance of the methods. For the graphs with attributes (Cora, Citeseer, Pubmed) we follow the same experimental procedure as in previous work [45]. We sample 20 nodes uniformly at random for each class as training data, 1000 nodes as test data, and a different 1000 nodes as validation data. In the transductive setting, unsupervised training was performed on the entire graph. In the inductive setting, the 1000 test nodes were removed from the graph before training. The hyperparameter values of GCN for these same data sets in the transductive setting are reported in [18]; we used these values for both the transductive and inductive setting. For EP-B, LINE and DEEPWALK, the learned node embeddings for the 20 nodes per class label were fed to a one-vs-rest logistic regression classifier with L2 regularization. We 7 Table 5: Classification accuracy for Cora, Citeseer, and Pubmed. (Left) The upper and lower part of the table list the results for the transuctive and inductive setting, respectively. (Right) Results for the transductive setting where the directionality of the edges is taken into account. Method Cora Citeseer Pubmed γ = 20 γ = 10 γ = 1 EP-B 78.05 ± 1.49 71.01 ± 1.35 79.56 ± 2.10 DW+BOW 76.15 ± 2.06 61.87 ± 2.30 77.82 ± 2.19 PLANETOID-T 71.90 ± 5.33 58.58 ± 6.35 74.49 ± 4.95 GCN 79.59 ± 2.02 69.21 ± 1.25 77.32 ± 2.66 DEEPWALK 71.11 ± 2.70 47.60 ± 2.34 73.49 ± 3.00 BOW FEAT 58.63 ± 0.68 58.07 ± 1.72 70.49 ± 2.89 γ = 5 γ = 5 γ = 1 EP-B 73.09 ± 1.75 68.61 ± 1.69 79.94 ± 2.30 DW-I+BOW 68.35 ± 1.70 59.47 ± 2.48 74.87 ± 1.23 PLANETOID-I 64.80 ± 3.70 61.97 ± 3.82 75.73 ± 4.21 GCN-I 67.76 ± 2.11 63.40 ± 0.98 73.47 ± 2.48 BOW FEAT 58.63 ± 0.68 58.07 ± 1.72 70.49 ± 2.89 Method Cora Citeseer Pubmed γ = 20 γ = 5 γ = 1 EP-B 77.31 ± 1.43 70.21 ± 1.17 78.77 ± 2.06 DEEPWALK 14.82 ± 2.15 15.79 ± 3.58 32.82 ± 2.12 chose the best value for EP-B’s margins and the L2 regularizer on the validation set from the values [0.01, 0.1, 0.5, 1, 5, 10]. The same was done for the baselines DW+BOW and BOW FEAT. Since PLANETOID jointly optimizes an unsupervised and supervised loss, we applied the learned models directly to classify the nodes. The authors of PLANETOID did not report the number of learning iterations, so we ensured the training had converged. This was the case after 5000, 5000, and 20000 training steps for Cora, Citeseer, and Pubmed, respectively. For EP-B we used ADAM [17] to learn the parameters in a mini-batch setting with a learning rate of 0.001. A single learning epoch iterates through all nodes of the input graph and we fixed the number of epochs to 200 and the mini-batch size to 64. In all cases, the parameteres were initilized following [14] and the learning always converged. EP was implemented with the Theano [4] wrapper Keras [9]. We used the logistic regression classifier from LibLinear [10]. All experiments were run on commodity hardware with 128GB RAM, a single 2.8 GHz CPU, and a TitanX GPU. 5.2 Results The results for BlogCatalog, POS and PPI in the transductive setting are listed in Table 3. The best results are always indicated in bold. We observe that EP-B tends to have the best F1 scores, with the additional aforementioned advantage of fewer parameters and hyperparameters to tune. Even though we use the hyperparameter values reported in NODE2VEC, we do not observe significant differences to DEEPWALK. This is contrary to earlier findings [15]. We conjecture that validating the L2 regularization of the logistic regression classifier is crucial and might not have been performed in some earlier work. The F1 scores of EP-B, DEEPWALK, LINE, and NODE2VEC are significantly higher than those of the baselines WVRN and MAJORITY. The results for the same data sets in the inductive setting are listed in Table 4 for different percentages of nodes removed before unsupervised training. EP reconstructs label embeddings from the embeddings of labels of neighboring nodes. Hence, with EP-B we can directly use the concatenation of the reconstructed embedding ehi(v) as the node embedding for each of the nodes v that were not part of the graph during training. For DEEPWALK and LINE we computed the embeddings of those nodes that were removed during training by averaging the embeddings of neighboring nodes; we indicate this by the suffix I. EP-B outperforms all these methods in the inductive setting. The results for the data sets Cora, Citeseer and Pubmed are listed in Table 5. Since these data sets have bag of words associated with nodes, we include the baseline method DW+BOW. DW+BOW concatenates the embedding of a node learned by DEEPWALK with a vector that encodes the bag of words of the node. PLANETOID-T and PLANETOID-I are the transductive and inductive formulation of PLANETOID [45]. GCN-I is an inductive variant of GCN [18] where edges from training to test nodes are removed from the graph but those from test nodes to training nodes are not. Contrary to other methods, EP-B’s F1 scores on the transductive and inductive setting are very similar, demonstrating its suitability for the inductive setting. DEEPWALK cannot make use of the word labels but we included it in the evaluation to investigate to what extent the word labels improve the performance of the other methods. The baseline BOW FEAT trains a logistic regression classifier on the binary vectors encoding the bag of words of each node. EP-B significantly outperforms all existing approaches in both the transductive and inductive setting on all three data sets with one 8 (a) 0 50 100 150 200 Epoch 0 10 20 30 40 50 60 70 Average Batch Loss κ = 1 κ = 5 κ = 50 κ = degmax = 3992 (b) Figure 4: (a) The plot visualizes embeddings for the Cora data set learned from node identity labels only (left), word labels only (center), and from the combination of the two (right). The Silhouette score is from left to right 0.008, 0.107 and 0.158. (b) Average batch loss vs. number of epochs for different values of the parameter κ for the BlogCatalog data set. exception: for the transductive setting on Cora GCN achieves a higher accuracy. Both PLANETOID-T and DW+BOW do not take full advantage of the information given by the bag of words, since the encoding of the bag of words is only exposed to the respective models for nodes with class labels and, therefore, only for a small fraction of nodes in the graph. This could also explain PLANETOID-T’s high standard deviation since some nodes might be associated with words that occur in the test data but which might not have been encountered during training. This would lead to misclassifications of these nodes. Figure 4 depicts a visualization of the learned embeddings for the Cora citation network by applying tsne [26] to the 128-dimensional embeddings generated by EP-B. Both qualitatively and quantitatively – as demonstrated by the Silhouette score [37] that measures clustering quality – it shows EP-B’s ability to learn and combine embeddings of several label types. Up until now, we did not take into account the direction of the edges, that is, we treated all graphs as undirected. Citation networks, however, are intrinsically directed. The right part of Table 5 shows the performance of EP-B and DEEPWALK when the edge directions are considered. For EP this means label representations are only sent along the directed edges. For DEEPWALK this means that the generated random walks are directed walks. While we observe a significant performance deterioration for DEEPWALK, the accuracy of EP-B does not change significantly. This demonstrates that EP is also applicable when edge directions are taken into account. For densely connected graphs with a high average node degree, it is beneficial to limit the number of neighbors that send label representations in each learning step. This can be accomplished by sampling a subset of at most size κ from the set of all neighbors and to send messages only from the sampled nodes. We evaluated the impact of this strategy by varying the parameter κ in Figure 4. The loss is significantly higher for smaller values of κ. For κ = 50, however, the average loss is almost identical to the case where all neighbors send messages while reducing the training time per epoch by an order of magnitude (from 20s per epoch to less than 1s per epoch). 6 Conclusion and Future Work Embedding Propagation (EP) is an unsupervised machine learning framework for graph-structured data. It learns label and node representations by exchanging messages between nodes. It supports arbitrary label types such as node identities, text, movie genres, and generalizes several existing approaches to graph representation learning. We have shown that EP-B, a simple instance of EP, is competitive with and often outperforms state of the art methods while having fewer parameters and/or hyperparameters. We believe that EP’s crucial advantage over existing methods is its ability to learn label type representations and to combine these label type representations into a joint vertex embedding. Direction of future research include the combination of EP with multitask learning, that is, learning the embeddings of labels and nodes guided by both an unsupervised loss and a supervised loss defined with respect to different tasks; a variant of EP that incorporates image and sequence data; and the integration of EP with an existing distributed graph processing framework. One might also want to investigate the application of the EP framework to multi-relational graphs. 9 References [1] L. Akoglu, H. Tong, and D. Koutra. Graph based anomaly detection and description: a survey. Data Mining and Knowledge Discovery, 29(3):626–688, 2015. [2] L. B. Almeida. Artificial neural networks. chapter A Learning Rule for Asynchronous Perceptrons with Feedback in a Combinatorial Environment, pages 102–111. 1990. [3] M. Belkin and P. Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. In NIPS, volume 14, pages 585–591, 2001. [4] J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, R. Pascanu, G. Desjardins, J. Turian, D. WardeFarley, and Y. Bengio. Theano: A cpu and gpu math compiler in python. In Proc. 9th Python in Science Conf, pages 1–7, 2010. [5] A. Bordes, N. Usunier, A. Garcia-Duran, J. Weston, and O. Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in Neural Information Processing Systems, pages 2787–2795, 2013. [6] B.-J. Breitkreutz, C. Stark, T. Reguly, L. Boucher, A. Breitkreutz, M. Livstone, R. Oughtred, D. H. Lackner, J. Bähler, V. Wood, et al. The biogrid interaction database: 2008 update. Nucleic acids research, 36(suppl 1):D637–D640, 2008. [7] J. Bromley, I. Guyon, Y. Lecun, E. Säckinger, and R. Shah. Signature verification using a "siamese" time delay neural network. In Neural Information Processing Systems, 1994. [8] V. Chandola, A. Banerjee, and V. Kumar. Anomaly detection: A survey. ACM Comput. Surv., 41(3):15:1–15:58, 2009. [9] F. Chollet. Keras. URL http://keras. io, 2016. [10] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. Liblinear: A library for large linear classification. Journal of machine learning research, 9(Aug):1871–1874, 2008. [11] A. Frome, G. S. Corrado, J. Shlens, S. Bengio, J. Dean, T. Mikolov, et al. Devise: A deep visual-semantic embedding model. In Advances in neural information processing systems, pages 2121–2129, 2013. [12] L. Getoor and B. Taskar. Introduction to Statistical Relational Learning (Adaptive Computation and Machine Learning). The MIT Press, 2007. [13] J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, and G. E. Dahl. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212, 2017. [14] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pages 249–256, 2010. [15] A. Grover and J. Leskovec. Node2vec: Scalable feature learning for networks. In Proceedings of the 22Nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 855–864, 2016. [16] K. Kersting, M. Mladenov, R. Garnett, and M. Grohe. Power iterated color refinement. In Twenty-Eighth AAAI Conference on Artificial Intelligence, 2014. [17] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [18] T. N. Kipf and M. Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. [19] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [20] J. B. Kruskal and M. Wish. Multidimensional scaling. Sage Publications, Beverely Hills, California, 1978. 10 [21] Y. Li, D. Tarlow, M. Brockschmidt, and R. Zemel. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493, 2015. [22] D. Liben-Nowell and J. Kleinberg. The link-prediction problem for social networks. J. Am. Soc. Inf. Sci. Technol., 58(7):1019–1031, 2007. [23] Y. Low, J. Gonzalez, A. Kyrola, D. Bickson, C. Guestrin, and J. M. Hellerstein. Graphlab: A new parallel framework for machine learning. In Conference on Uncertainty in Artificial Intelligence (UAI), July 2010. [24] L. Lü and T. Zhou. Link prediction in complex networks: A survey. Physica A: Statistical Mechanics and its Applications, 390(6):1150–1170, 2011. [25] U. Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395–416, 2007. [26] L. v. d. Maaten and G. Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008. [27] S. A. Macskassy and F. Provost. A simple relational classifier. Technical report, DTIC Document, 2003. [28] M. Mahoney. Large text compression benchmark. URL: http://www. mattmahoney. net/text/text. html, 2009. [29] G. Malewicz, M. H. Austern, A. J. Bik, J. C. Dehnert, I. Horn, N. Leiser, and G. Czajkowski. Pregel: A system for large-scale graph processing. In Proceedings of the 2010 ACM SIGMOD International Conference on Management of Data, pages 135–146, 2010. [30] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pages 3111–3119, 2013. [31] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A. Y. Ng. Multimodal deep learning. In Proceedings of the 28th international conference on machine learning, pages 689–696, 2011. [32] M. Nickel, K. Murphy, V. Tresp, and E. Gabrilovich. A review of relational machine learning for knowledge graphs. Proceedings of the IEEE, 104(1):11–33, 2016. [33] L. Page, S. Brin, R. Motwani, and T. Winograd. The pagerank citation ranking: bringing order to the web. 1999. [34] B. Perozzi, R. Al-Rfou, and S. Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 701–710, 2014. [35] F. J. Pineda. Generalization of back-propagation to recurrent neural networks. Phys. Rev. Lett., 59:2229–2232, 1987. [36] L. D. Raedt, K. Kersting, S. Natarajan, and D. Poole. Statistical relational artificial intelligence: Logic, probability, and computation. Synthesis Lectures on Artificial Intelligence and Machine Learning, 10(2):1–189, 2016. [37] P. J. Rousseeuw. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20:53–65, 1987. [38] S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290(5500):2323–2326, 2000. [39] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2009. [40] P. Sen, G. M. Namata, M. Bilgic, L. Getoor, B. Gallagher, and T. Eliassi-Rad. Collective classification in network data. AI Magazine, 29(3):93–106, 2008. 11 [41] J. Tang, M. Qu, M. Wang, M. Zhang, J. Yan, and Q. Mei. Line: Large-scale information network embedding. In Proceedings of the 24th International Conference on World Wide Web, pages 1067–1077. ACM, 2015. [42] L. Tang and H. Liu. Relational learning via latent social dimensions. In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 817–826. ACM, 2009. [43] J. B. Tenenbaum, V. De Silva, and J. C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319–2323, 2000. [44] R. S. Xin, J. E. Gonzalez, M. J. Franklin, and I. Stoica. Graphx: A resilient distributed graph system on spark. In First International Workshop on Graph Data Management Experiences and Systems, pages 2:1–2:6, 2013. [45] Z. Yang, W. W. Cohen, and R. Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. In Proceedings of the 33nd International Conference on Machine Learning, pages 40–48, 2016. [46] R. Zafarani and H. Liu. Social computing data repository at asu. School of Computing, Informatics and Decision Systems Engineering, Arizona State University, 2009. [47] X. Zhu and Z. Ghahramani. Learning from labeled and unlabeled data with label propagation. Technical Report CMU-CALD-02-107, 2002. 12 | 2017 | 583 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.